diff --git a/.github/labeler-issue-triage.yml b/.github/labeler-issue-triage.yml index 82c0bd53414cf..29e3de877b6b4 100644 --- a/.github/labeler-issue-triage.yml +++ b/.github/labeler-issue-triage.yml @@ -9,11 +9,13 @@ v/2.x (legacy): - '### AzureRM Provider Version\s+(|azurerm |AzureRM )(|v|V)2\.\d+' v/3.x: - '### AzureRM Provider Version\s+(|azurerm |AzureRM )(|v|V)3\.\d+' +v/4.x: + - '### AzureRM Provider Version\s+(|azurerm |AzureRM )(|v|V)4\.\d+' service/aadb2c: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_aadb2c_directory((.|\n)*)###' service/advisor: - - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_advisor_recommendations((.|\n)*)###' + - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_advisor_((.|\n)*)###' service/analysis: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_analysis_services_server((.|\n)*)###' @@ -40,7 +42,7 @@ service/authorization: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_(client_config|federated_identity_credential|marketplace_role_assignment|pim_|role_|user_assigned_identity)((.|\n)*)###' service/automanage: - - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_(automanage_configuration|virtual_machine_automanage_configuration_assignment)((.|\n)*)###' + - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_(arc_machine_automanage_configuration_assignment|automanage_configuration|virtual_machine_automanage_configuration_assignment)((.|\n)*)###' service/automation: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_automation_((.|\n)*)###' @@ -103,7 +105,7 @@ service/database-migration: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_database_migration_((.|\n)*)###' service/databox-edge: - - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_databox_edge_((.|\n)*)###' + - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_databox_edge_device((.|\n)*)###' service/databricks: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_databricks_((.|\n)*)###' @@ -120,9 +122,6 @@ service/devtestlabs: service/digital-twins: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_digital_twins_((.|\n)*)###' -service/disks: - - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_disk_pool((.|\n)*)###' - service/dns: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_(dns_|private_dns_a_record\W+|private_dns_aaaa_record\W+|private_dns_cname_record\W+|private_dns_mx_record\W+|private_dns_ptr_record\W+|private_dns_soa_record\W+|private_dns_srv_record\W+|private_dns_txt_record\W+|private_dns_zone\W+|private_dns_zone_virtual_network_link\W+)((.|\n)*)###' @@ -154,7 +153,7 @@ service/frontdoor: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_frontdoor((.|\n)*)###' service/graph: - - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_graph_((.|\n)*)###' + - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_graph_services_account((.|\n)*)###' service/hdinsight: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_hdinsight_((.|\n)*)###' @@ -166,7 +165,7 @@ service/hsm: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_dedicated_hardware_security_module((.|\n)*)###' service/hybrid-compute: - - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_(arc_machine\W+|arc_machine_extension\W+|arc_private_link_scope\W+|hybrid_compute_machine)((.|\n)*)###' + - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_(arc_machine\W+|arc_machine\W+|arc_machine_extension\W+|arc_private_link_scope\W+)((.|\n)*)###' service/iot-central: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_iotcentral_((.|\n)*)###' @@ -174,18 +173,12 @@ service/iot-central: service/iot-hub: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_iothub((.|\n)*)###' -service/iot-time-series: - - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_iot_time_series_insights_((.|\n)*)###' - service/key-vault: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_(key_vault\W+|key_vault_access_policy\W+|key_vault_certificate\W+|key_vault_certificate_contacts\W+|key_vault_certificate_data\W+|key_vault_certificate_issuer\W+|key_vault_certificates\W+|key_vault_encrypted_value\W+|key_vault_key\W+|key_vault_managed_storage_account\W+|key_vault_managed_storage_account_sas_token_definition\W+|key_vault_secret\W+|key_vault_secrets\W+)((.|\n)*)###' service/kusto: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_kusto_((.|\n)*)###' -service/labservice: - - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_lab_service_((.|\n)*)###' - service/lighthouse: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_lighthouse_((.|\n)*)###' @@ -199,10 +192,7 @@ service/log-analytics: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_log_analytics_((.|\n)*)###' service/logic: - - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_(integration_service_environment|logic_app_)((.|\n)*)###' - -service/logz: - - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_logz_((.|\n)*)###' + - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_logic_app_((.|\n)*)###' service/machine-learning: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_machine_learning_((.|\n)*)###' @@ -222,12 +212,6 @@ service/management-groups: service/maps: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_maps_((.|\n)*)###' -service/maria-db: - - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_mariadb_((.|\n)*)###' - -service/media: - - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_media_((.|\n)*)###' - service/mixed-reality: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_spatial_anchors_account((.|\n)*)###' @@ -244,7 +228,7 @@ service/mssqlmanagedinstance: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_mssql_managed_((.|\n)*)###' service/mysql: - - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_mysql_((.|\n)*)###' + - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_mysql_flexible_((.|\n)*)###' service/netapp: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_netapp_((.|\n)*)###' @@ -271,7 +255,7 @@ service/policy: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_(management_group_policy_|policy_|resource_group_policy_assignment\W+|resource_group_policy_exemption\W+|resource_group_policy_remediation\W+|resource_policy_assignment\W+|resource_policy_exemption\W+|resource_policy_remediation\W+|subscription_policy_)((.|\n)*)###' service/portal: - - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_(dashboard\W+|portal_)((.|\n)*)###' + - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_portal_((.|\n)*)###' service/postgresql: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_postgresql_((.|\n)*)###' @@ -327,9 +311,6 @@ service/signalr: service/spring: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_(spring_cloud_accelerator\W+|spring_cloud_active_deployment\W+|spring_cloud_api_portal\W+|spring_cloud_api_portal_custom_domain\W+|spring_cloud_app\W+|spring_cloud_app_cosmosdb_association\W+|spring_cloud_app_dynamics_application_performance_monitoring\W+|spring_cloud_app_mysql_association\W+|spring_cloud_app_redis_association\W+|spring_cloud_application_insights_application_performance_monitoring\W+|spring_cloud_application_live_view\W+|spring_cloud_build_deployment\W+|spring_cloud_build_pack_binding\W+|spring_cloud_builder\W+|spring_cloud_certificate\W+|spring_cloud_configuration_service\W+|spring_cloud_container_deployment\W+|spring_cloud_custom_domain\W+|spring_cloud_customized_accelerator\W+|spring_cloud_dev_tool_portal\W+|spring_cloud_dynatrace_application_performance_monitoring\W+|spring_cloud_elastic_application_performance_monitoring\W+|spring_cloud_gateway\W+|spring_cloud_gateway_custom_domain\W+|spring_cloud_gateway_route_config\W+|spring_cloud_java_deployment\W+|spring_cloud_new_relic_application_performance_monitoring\W+|spring_cloud_service\W+|spring_cloud_storage\W+)((.|\n)*)###' -service/sql: - - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_sql_((.|\n)*)###' - service/storage: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_(storage_account\W+|storage_account_blob_container_sas\W+|storage_account_blob_properties\W+|storage_account_customer_managed_key\W+|storage_account_local_user\W+|storage_account_network_rules\W+|storage_account_queue_properties\W+|storage_account_sas\W+|storage_account_share_properties\W+|storage_account_static_website_properties\W+|storage_blob\W+|storage_blob_inventory_policy\W+|storage_container\W+|storage_container_immutability_policy\W+|storage_containers\W+|storage_data_lake_gen2_filesystem\W+|storage_data_lake_gen2_path\W+|storage_encryption_scope\W+|storage_management_policy\W+|storage_object_replication\W+|storage_queue\W+|storage_share\W+|storage_share_directory\W+|storage_share_file\W+|storage_sync\W+|storage_sync_cloud_endpoint\W+|storage_sync_group\W+|storage_sync_server_endpoint\W+|storage_table\W+|storage_table\W+|storage_table_entities\W+|storage_table_entity\W+)((.|\n)*)###' @@ -351,9 +332,6 @@ service/systemcentervirtualmachinemanager: service/traffic-manager: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_traffic_manager_((.|\n)*)###' -service/video-analyzer: - - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_video_analyzer((.|\n)*)###' - service/virtual-desktops: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_virtual_desktop_((.|\n)*)###' diff --git a/.github/labeler-pull-request-triage.yml b/.github/labeler-pull-request-triage.yml index 6f18bc1c2f615..a3b481100fa22 100644 --- a/.github/labeler-pull-request-triage.yml +++ b/.github/labeler-pull-request-triage.yml @@ -203,11 +203,6 @@ service/digital-twins: - any-glob-to-any-file: - internal/services/digitaltwins/**/* -service/disks: -- changed-files: - - any-glob-to-any-file: - - internal/services/disks/**/* - service/dns: - changed-files: - any-glob-to-any-file: @@ -294,11 +289,6 @@ service/iot-hub: - any-glob-to-any-file: - internal/services/iothub/**/* -service/iot-time-series: -- changed-files: - - any-glob-to-any-file: - - internal/services/iottimeseriesinsights/**/* - service/key-vault: - changed-files: - any-glob-to-any-file: @@ -309,11 +299,6 @@ service/kusto: - any-glob-to-any-file: - internal/services/kusto/**/* -service/labservice: -- changed-files: - - any-glob-to-any-file: - - internal/services/labservice/**/* - service/lighthouse: - changed-files: - any-glob-to-any-file: @@ -339,11 +324,6 @@ service/logic: - any-glob-to-any-file: - internal/services/logic/**/* -service/logz: -- changed-files: - - any-glob-to-any-file: - - internal/services/logz/**/* - service/machine-learning: - changed-files: - any-glob-to-any-file: @@ -374,16 +354,6 @@ service/maps: - any-glob-to-any-file: - internal/services/maps/**/* -service/maria-db: -- changed-files: - - any-glob-to-any-file: - - internal/services/mariadb/**/* - -service/media: -- changed-files: - - any-glob-to-any-file: - - internal/services/media/**/* - service/mixed-reality: - changed-files: - any-glob-to-any-file: @@ -550,11 +520,6 @@ service/spring: - any-glob-to-any-file: - internal/services/springcloud/**/* -service/sql: -- changed-files: - - any-glob-to-any-file: - - internal/services/sql/**/* - service/storage: - changed-files: - any-glob-to-any-file: @@ -590,11 +555,6 @@ service/traffic-manager: - any-glob-to-any-file: - internal/services/trafficmanager/**/* -service/video-analyzer: -- changed-files: - - any-glob-to-any-file: - - internal/services/videoanalyzer/**/* - service/virtual-desktops: - changed-files: - any-glob-to-any-file: diff --git a/.github/workflows/golint.yaml b/.github/workflows/golint.yaml index 4d787af53afd9..37f1113ebfe7f 100644 --- a/.github/workflows/golint.yaml +++ b/.github/workflows/golint.yaml @@ -24,7 +24,7 @@ jobs: - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: ./.go-version - - uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0 + - uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0 with: version: 'v1.55.1' args: -v ./internal/... diff --git a/.github/workflows/link-milestone.yaml b/.github/workflows/link-milestone.yaml index b85abcc5f40bf..e79a639da4bb8 100644 --- a/.github/workflows/link-milestone.yaml +++ b/.github/workflows/link-milestone.yaml @@ -18,7 +18,7 @@ jobs: - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: # we cannot use go-version-file here because no repositories are checked out so there is no file to reference - go-version: '1.21.6' + go-version: '1.22.7' - run: | go install github.com/stephybun/link-milestone@latest link-milestone diff --git a/.github/workflows/pull-request-reviewed.yaml b/.github/workflows/pull-request-reviewed.yaml index 7af02cd81c487..2ca34f43467e3 100644 --- a/.github/workflows/pull-request-reviewed.yaml +++ b/.github/workflows/pull-request-reviewed.yaml @@ -30,7 +30,7 @@ jobs: echo ${{ github.repository }} > wr_actions/ghrepo.txt echo ${{ github.event.pull_request.number }} > wr_actions/prnumber.txt echo "remove-waiting-response" > wr_actions/action.txt - - uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029 # v4.3.5 + - uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: name: artifact path: wr_actions diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index d9e4292172afa..8d6c8fa55b453 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -15,7 +15,7 @@ jobs: with: configuration-path: .github/labeler-pull-request-triage.yml repo-token: "${{ secrets.GITHUB_TOKEN }}" - - uses: CodelyTV/pr-size-labeler@56f6f0fc35c7cc0f72963b8467729e1120cb4bed # v1.10.0 + - uses: CodelyTV/pr-size-labeler@c7a55a022747628b50f3eb5bf863b9e796b8f274 # v1.10.1 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} xs_label: 'size/XS' diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 278b947400651..f1dbfe53a9254 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -26,7 +26,7 @@ jobs: fetch-depth: 0 - name: Generate Release Notes run: sed -n -e "1{/# /d;}" -e "2{/^$/d;}" -e "/# $(git describe --abbrev=0 --exclude="$(git describe --abbrev=0 --match='v*.*.*' --tags)" --match='v*.*.*' --tags | tr -d v)/q;p" CHANGELOG.md > release-notes.txt - - uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029 # v4.3.5 + - uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: name: release-notes path: release-notes.txt diff --git a/.github/workflows/save-artifacts.yaml b/.github/workflows/save-artifacts.yaml index 4550a75e3ffe3..a2c1a460d2c3b 100644 --- a/.github/workflows/save-artifacts.yaml +++ b/.github/workflows/save-artifacts.yaml @@ -14,7 +14,7 @@ jobs: echo ${{ github.repository_owner }} > wr_actions/ghowner.txt echo ${{ github.event.repository.name }} > wr_actions/ghrepo.txt echo ${{ github.event.pull_request.number }} > wr_actions/prnumber.txt - - uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029 # v4.3.5 + - uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: name: artifact path: wr_actions diff --git a/.github/workflows/teamcity-test.yaml b/.github/workflows/teamcity-test.yaml index 20b8cb123b297..732b5318d5d2d 100644 --- a/.github/workflows/teamcity-test.yaml +++ b/.github/workflows/teamcity-test.yaml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - - uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 + - uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 # v4.3.0 with: distribution: zulu java-version: 17 diff --git a/.go-version b/.go-version index 6e83421e4fd7c..5d287e490a76f 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.21.6 \ No newline at end of file +1.22.7 \ No newline at end of file diff --git a/.release/provider-schema.json b/.release/provider-schema.json index 16769fa4b2ff7..5f46822949c21 100644 --- a/.release/provider-schema.json +++ b/.release/provider-schema.json @@ -1 +1 @@ -{"providerName":"azurerm","schemaVersion":"1","providerSchema":{"schema":{"auxiliary_tenant_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":3},"client_certificate":{"type":"TypeString","optional":true,"description":"Base64 encoded PKCS#12 certificate bundle to use when authenticating as a Service Principal using a Client Certificate"},"client_certificate_password":{"type":"TypeString","optional":true,"description":"The password associated with the Client Certificate. For use when authenticating as a Service Principal using a Client Certificate"},"client_certificate_path":{"type":"TypeString","optional":true,"description":"The path to the Client Certificate associated with the Service Principal for use when authenticating as a Service Principal using a Client Certificate."},"client_id":{"type":"TypeString","optional":true,"description":"The Client ID which should be used."},"client_id_file_path":{"type":"TypeString","optional":true,"description":"The path to a file containing the Client ID which should be used."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret which should be used. For use When authenticating as a Service Principal using a Client Secret."},"client_secret_file_path":{"type":"TypeString","optional":true,"description":"The path to a file containing the Client Secret which should be used. For use When authenticating as a Service Principal using a Client Secret."},"disable_correlation_request_id":{"type":"TypeBool","optional":true,"description":"This will disable the x-ms-correlation-request-id header."},"disable_terraform_partner_id":{"type":"TypeBool","optional":true,"description":"This will disable the Terraform Partner ID which is used if a custom `partner_id` isn't specified."},"environment":{"type":"TypeString","optional":true,"description":"The Cloud Environment which should be used. Possible values are public, usgovernment, and china. Defaults to public. Not used and should not be specified when `metadata_host` is specified."},"features":{"type":"TypeList","required":true,"elem":{"schema":{"api_management":{"type":"TypeList","optional":true,"elem":{"schema":{"purge_soft_delete_on_destroy":{"type":"TypeBool","optional":true,"default":true},"recover_soft_deleted":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"app_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"purge_soft_delete_on_destroy":{"type":"TypeBool","optional":true,"default":true},"recover_soft_deleted":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"application_insights":{"type":"TypeList","optional":true,"elem":{"schema":{"disable_generated_rule":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"cognitive_account":{"type":"TypeList","optional":true,"elem":{"schema":{"purge_soft_delete_on_destroy":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"key_vault":{"type":"TypeList","optional":true,"elem":{"schema":{"purge_soft_delete_on_destroy":{"type":"TypeBool","optional":true,"default":true,"description":"When enabled soft-deleted `azurerm_key_vault` resources will be permanently deleted (e.g purged), when destroyed"},"purge_soft_deleted_certificates_on_destroy":{"type":"TypeBool","optional":true,"default":true,"description":"When enabled soft-deleted `azurerm_key_vault_certificate` resources will be permanently deleted (e.g purged), when destroyed"},"purge_soft_deleted_hardware_security_module_keys_on_destroy":{"type":"TypeBool","optional":true,"default":true,"description":"When enabled soft-deleted `azurerm_key_vault_managed_hardware_security_module_key` resources will be permanently deleted (e.g purged), when destroyed"},"purge_soft_deleted_hardware_security_modules_on_destroy":{"type":"TypeBool","optional":true,"default":true,"description":"When enabled soft-deleted `azurerm_key_vault_managed_hardware_security_module` resources will be permanently deleted (e.g purged), when destroyed"},"purge_soft_deleted_keys_on_destroy":{"type":"TypeBool","optional":true,"default":true,"description":"When enabled soft-deleted `azurerm_key_vault_key` resources will be permanently deleted (e.g purged), when destroyed"},"purge_soft_deleted_secrets_on_destroy":{"type":"TypeBool","optional":true,"default":true,"description":"When enabled soft-deleted `azurerm_key_vault_secret` resources will be permanently deleted (e.g purged), when destroyed"},"recover_soft_deleted_certificates":{"type":"TypeBool","optional":true,"default":true,"description":"When enabled soft-deleted `azurerm_key_vault_certificate` resources will be restored, instead of creating new ones"},"recover_soft_deleted_hardware_security_module_keys":{"type":"TypeBool","optional":true,"default":true,"description":"When enabled soft-deleted `azurerm_key_vault_managed_hardware_security_module_key` resources will be restored, instead of creating new ones"},"recover_soft_deleted_key_vaults":{"type":"TypeBool","optional":true,"default":true,"description":"When enabled soft-deleted `azurerm_key_vault` resources will be restored, instead of creating new ones"},"recover_soft_deleted_keys":{"type":"TypeBool","optional":true,"default":true,"description":"When enabled soft-deleted `azurerm_key_vault_key` resources will be restored, instead of creating new ones"},"recover_soft_deleted_secrets":{"type":"TypeBool","optional":true,"default":true,"description":"When enabled soft-deleted `azurerm_key_vault_secret` resources will be restored, instead of creating new ones"}}},"maxItems":1},"log_analytics_workspace":{"type":"TypeList","optional":true,"elem":{"schema":{"permanently_delete_on_destroy":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"machine_learning":{"type":"TypeList","optional":true,"elem":{"schema":{"purge_soft_deleted_workspace_on_destroy":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"managed_disk":{"type":"TypeList","optional":true,"elem":{"schema":{"expand_without_downtime":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"postgresql_flexible_server":{"type":"TypeList","optional":true,"elem":{"schema":{"restart_server_on_configuration_value_change":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"recovery_service":{"type":"TypeList","optional":true,"elem":{"schema":{"purge_protected_items_from_vault_on_destroy":{"type":"TypeBool","optional":true,"default":false},"vm_backup_stop_protection_and_retain_data_on_destroy":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"recovery_services_vaults":{"type":"TypeList","optional":true,"elem":{"schema":{"recover_soft_deleted_backup_protected_vm":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"resource_group":{"type":"TypeList","optional":true,"elem":{"schema":{"prevent_deletion_if_contains_resources":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"subscription":{"type":"TypeList","optional":true,"elem":{"schema":{"prevent_cancellation_on_destroy":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"template_deployment":{"type":"TypeList","optional":true,"elem":{"schema":{"delete_nested_items_during_deletion":{"type":"TypeBool","required":true}}},"maxItems":1},"virtual_machine":{"type":"TypeList","optional":true,"elem":{"schema":{"delete_os_disk_on_deletion":{"type":"TypeBool","optional":true,"default":false},"detach_implicit_data_disk_on_deletion":{"type":"TypeBool","optional":true,"default":false},"graceful_shutdown":{"type":"TypeBool","optional":true,"default":false},"skip_shutdown_and_force_delete":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"virtual_machine_scale_set":{"type":"TypeList","optional":true,"elem":{"schema":{"force_delete":{"type":"TypeBool","optional":true,"default":false},"reimage_on_manual_upgrade":{"type":"TypeBool","optional":true,"default":true},"roll_instances_when_required":{"type":"TypeBool","optional":true,"default":true},"scale_to_zero_before_deletion":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1}}},"maxItems":1,"minItems":1},"metadata_host":{"type":"TypeString","optional":true,"description":"The Hostname which should be used for the Azure Metadata Service."},"msi_endpoint":{"type":"TypeString","optional":true,"description":"The path to a custom endpoint for Managed Service Identity - in most circumstances this should be detected automatically. "},"oidc_request_token":{"type":"TypeString","optional":true,"description":"The bearer token for the request to the OIDC provider. For use when authenticating as a Service Principal using OpenID Connect."},"oidc_request_url":{"type":"TypeString","optional":true,"description":"The URL for the OIDC provider from which to request an ID token. For use when authenticating as a Service Principal using OpenID Connect."},"oidc_token":{"type":"TypeString","optional":true,"description":"The OIDC ID token for use when authenticating as a Service Principal using OpenID Connect."},"oidc_token_file_path":{"type":"TypeString","optional":true,"description":"The path to a file containing an OIDC ID token for use when authenticating as a Service Principal using OpenID Connect."},"partner_id":{"type":"TypeString","optional":true,"description":"A GUID/UUID that is registered with Microsoft to facilitate partner resource usage attribution."},"resource_provider_registrations":{"type":"TypeString","optional":true,"description":"The set of Resource Providers which should be automatically registered for the subscription."},"resource_providers_to_register":{"type":"TypeList","optional":true,"description":"A list of Resource Providers to explicitly register for the subscription, in addition to those specified by the `resource_provider_registrations` property.","elem":{"type":"TypeString"}},"skip_provider_registration":{"type":"TypeBool","optional":true,"description":"Should the AzureRM Provider skip registering all of the Resource Providers that it supports, if they're not already registered?"},"storage_use_azuread":{"type":"TypeBool","optional":true,"description":"Should the AzureRM Provider use Azure AD Authentication when accessing the Storage Data Plane APIs?"},"subscription_id":{"type":"TypeString","required":true,"description":"The Subscription ID which should be used."},"tenant_id":{"type":"TypeString","optional":true,"description":"The Tenant ID which should be used."},"use_aks_workload_identity":{"type":"TypeBool","optional":true,"description":"Allow Azure AKS Workload Identity to be used for Authentication."},"use_cli":{"type":"TypeBool","optional":true,"default":true,"description":"Allow Azure CLI to be used for Authentication."},"use_msi":{"type":"TypeBool","optional":true,"description":"Allow Managed Service Identity to be used for Authentication."},"use_oidc":{"type":"TypeBool","optional":true,"description":"Allow OpenID Connect to be used for authentication"}},"resources":{"azurerm_aadb2c_directory":{"schema":{"billing_type":{"type":"TypeString","description":"The type of billing for the B2C tenant. Possible values include: `MAU` or `Auths`.","computed":true},"country_code":{"type":"TypeString","optional":true,"description":"Country code of the B2C tenant. See https://aka.ms/B2CDataResidency for valid country codes.","computed":true,"forceNew":true},"data_residency_location":{"type":"TypeString","required":true,"description":"Location in which the B2C tenant is hosted and data resides. See https://aka.ms/B2CDataResidency for more information.","forceNew":true},"display_name":{"type":"TypeString","optional":true,"description":"The initial display name of the B2C tenant.","computed":true,"forceNew":true},"domain_name":{"type":"TypeString","required":true,"description":"Domain name of the B2C tenant, including onmicrosoft.com suffix.","forceNew":true},"effective_start_date":{"type":"TypeString","description":"The date from which the billing type took effect. May not be populated until after the first billing cycle.","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"description":"Billing SKU for the B2C tenant. See https://aka.ms/b2cBilling for more information."},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","description":"The Tenant ID for the B2C tenant.","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_active_directory_domain_service":{"schema":{"deployment_id":{"type":"TypeString","computed":true},"domain_configuration_type":{"type":"TypeString","optional":true,"forceNew":true},"domain_name":{"type":"TypeString","required":true,"forceNew":true},"filtered_sync_enabled":{"type":"TypeBool","optional":true,"default":false},"initial_replica_set":{"type":"TypeList","required":true,"elem":{"schema":{"domain_controller_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"external_access_ip_address":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"service_status":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1,"minItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"notifications":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"notify_dc_admins":{"type":"TypeBool","optional":true,"default":false},"notify_global_admins":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"resource_id":{"type":"TypeString","computed":true},"secure_ldap":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"certificate_expiry":{"type":"TypeString","computed":true},"certificate_thumbprint":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","required":true},"external_access_enabled":{"type":"TypeBool","optional":true,"default":false},"pfx_certificate":{"type":"TypeString","required":true},"pfx_certificate_password":{"type":"TypeString","required":true},"public_certificate":{"type":"TypeString","computed":true}}},"maxItems":1},"security":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"kerberos_armoring_enabled":{"type":"TypeBool","optional":true,"default":false},"kerberos_rc4_encryption_enabled":{"type":"TypeBool","optional":true,"default":false},"ntlm_v1_enabled":{"type":"TypeBool","optional":true,"default":false},"sync_kerberos_passwords":{"type":"TypeBool","optional":true,"default":false},"sync_ntlm_passwords":{"type":"TypeBool","optional":true,"default":false},"sync_on_prem_passwords":{"type":"TypeBool","optional":true,"default":false},"tls_v1_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"sku":{"type":"TypeString","required":true},"sync_owner":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","computed":true},"version":{"type":"TypeInt","computed":true}},"timeouts":{"create":180,"read":5,"delete":60,"update":120}},"azurerm_active_directory_domain_service_replica_set":{"schema":{"domain_controller_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"domain_service_id":{"type":"TypeString","required":true,"forceNew":true},"external_access_ip_address":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"service_status":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":180,"read":5,"delete":60}},"azurerm_active_directory_domain_service_trust":{"schema":{"domain_service_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true},"trusted_domain_dns_ips":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":2},"trusted_domain_fqdn":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_advanced_threat_protection":{"schema":{"enabled":{"type":"TypeBool","required":true},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_ai_services":{"schema":{"custom_subdomain_name":{"type":"TypeString","optional":true,"forceNew":true},"customer_managed_key":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_client_id":{"type":"TypeString","optional":true},"key_vault_key_id":{"type":"TypeString","optional":true},"managed_hsm_key_id":{"type":"TypeString","optional":true}}},"maxItems":1},"endpoint":{"type":"TypeString","computed":true},"fqdns":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"local_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_acls":{"type":"TypeList","optional":true,"elem":{"schema":{"default_action":{"type":"TypeString","required":true},"ip_rules":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"virtual_network_rules":{"type":"TypeSet","optional":true,"elem":{"schema":{"ignore_missing_vnet_service_endpoint":{"type":"TypeBool","optional":true,"default":false},"subnet_id":{"type":"TypeString","required":true}}}}}},"maxItems":1},"outbound_network_access_restricted":{"type":"TypeBool","optional":true,"default":false},"primary_access_key":{"type":"TypeString","computed":true},"public_network_access":{"type":"TypeString","optional":true,"default":"Enabled"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_access_key":{"type":"TypeString","computed":true},"sku_name":{"type":"TypeString","required":true},"storage":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_client_id":{"type":"TypeString","optional":true},"storage_account_id":{"type":"TypeString","required":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_analysis_services_server":{"schema":{"admin_users":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"backup_blob_container_uri":{"type":"TypeString","optional":true},"ipv4_firewall_rule":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"range_end":{"type":"TypeString","required":true},"range_start":{"type":"TypeString","required":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"power_bi_service_enabled":{"type":"TypeBool","optional":true},"querypool_connection_mode":{"type":"TypeString","optional":true,"default":"All"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_full_name":{"type":"TypeString","computed":true},"sku":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_connection":{"schema":{"display_name":{"type":"TypeString","optional":true,"default":"Service Bus","forceNew":true},"managed_api_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameter_values":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management":{"schema":{"additional_location":{"type":"TypeList","optional":true,"elem":{"schema":{"capacity":{"type":"TypeInt","optional":true,"computed":true},"gateway_disabled":{"type":"TypeBool","optional":true,"default":false},"gateway_regional_url":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true},"private_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"public_ip_address_id":{"type":"TypeString","optional":true},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"virtual_network_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"subnet_id":{"type":"TypeString","required":true}}},"maxItems":1},"zones":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"certificate":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate_password":{"type":"TypeString","optional":true},"encoded_certificate":{"type":"TypeString","required":true},"expiry":{"type":"TypeString","computed":true},"store_name":{"type":"TypeString","required":true},"subject":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}},"maxItems":10},"client_certificate_enabled":{"type":"TypeBool","optional":true,"default":false},"delegation":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"subscriptions_enabled":{"type":"TypeBool","optional":true,"default":false},"url":{"type":"TypeString","optional":true},"user_registration_enabled":{"type":"TypeBool","optional":true,"default":false},"validation_key":{"type":"TypeString","optional":true}}},"maxItems":1},"developer_portal_url":{"type":"TypeString","computed":true},"gateway_disabled":{"type":"TypeBool","optional":true,"default":false},"gateway_regional_url":{"type":"TypeString","computed":true},"gateway_url":{"type":"TypeString","computed":true},"hostname_configuration":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"developer_portal":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"certificate_password":{"type":"TypeString","optional":true},"certificate_source":{"type":"TypeString","computed":true},"certificate_status":{"type":"TypeString","computed":true},"expiry":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","optional":true},"negotiate_client_certificate":{"type":"TypeBool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"TypeString","optional":true},"subject":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}}},"management":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"certificate_password":{"type":"TypeString","optional":true},"certificate_source":{"type":"TypeString","computed":true},"certificate_status":{"type":"TypeString","computed":true},"expiry":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","optional":true},"negotiate_client_certificate":{"type":"TypeBool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"TypeString","optional":true},"subject":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}}},"portal":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"certificate_password":{"type":"TypeString","optional":true},"certificate_source":{"type":"TypeString","computed":true},"certificate_status":{"type":"TypeString","computed":true},"expiry":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","optional":true},"negotiate_client_certificate":{"type":"TypeBool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"TypeString","optional":true},"subject":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}}},"proxy":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"certificate_password":{"type":"TypeString","optional":true},"certificate_source":{"type":"TypeString","computed":true},"certificate_status":{"type":"TypeString","computed":true},"default_ssl_binding":{"type":"TypeBool","optional":true,"computed":true},"expiry":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","optional":true},"negotiate_client_certificate":{"type":"TypeBool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"TypeString","optional":true},"subject":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}}},"scm":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"certificate_password":{"type":"TypeString","optional":true},"certificate_source":{"type":"TypeString","computed":true},"certificate_status":{"type":"TypeString","computed":true},"expiry":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","optional":true},"negotiate_client_certificate":{"type":"TypeBool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"TypeString","optional":true},"subject":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}}}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"management_api_url":{"type":"TypeString","computed":true},"min_api_version":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"notification_sender_email":{"type":"TypeString","optional":true,"computed":true},"portal_url":{"type":"TypeString","computed":true},"private_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"protocols":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enable_http2":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"public_ip_address_id":{"type":"TypeString","optional":true},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"publisher_email":{"type":"TypeString","required":true},"publisher_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scm_url":{"type":"TypeString","computed":true},"security":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enable_backend_ssl30":{"type":"TypeBool","optional":true,"default":false},"enable_backend_tls10":{"type":"TypeBool","optional":true,"default":false},"enable_backend_tls11":{"type":"TypeBool","optional":true,"default":false},"enable_frontend_ssl30":{"type":"TypeBool","optional":true,"default":false},"enable_frontend_tls10":{"type":"TypeBool","optional":true,"default":false},"enable_frontend_tls11":{"type":"TypeBool","optional":true,"default":false},"tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled":{"type":"TypeBool","optional":true,"default":false},"tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled":{"type":"TypeBool","optional":true,"default":false},"tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled":{"type":"TypeBool","optional":true,"default":false},"tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled":{"type":"TypeBool","optional":true,"default":false},"tls_rsa_with_aes128_cbc_sha256_ciphers_enabled":{"type":"TypeBool","optional":true,"default":false},"tls_rsa_with_aes128_cbc_sha_ciphers_enabled":{"type":"TypeBool","optional":true,"default":false},"tls_rsa_with_aes128_gcm_sha256_ciphers_enabled":{"type":"TypeBool","optional":true,"default":false},"tls_rsa_with_aes256_cbc_sha256_ciphers_enabled":{"type":"TypeBool","optional":true,"default":false},"tls_rsa_with_aes256_cbc_sha_ciphers_enabled":{"type":"TypeBool","optional":true,"default":false},"tls_rsa_with_aes256_gcm_sha384_ciphers_enabled":{"type":"TypeBool","optional":true,"default":false},"triple_des_ciphers_enabled":{"type":"TypeBool","optional":true}}},"maxItems":1},"sign_in":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","required":true}}},"maxItems":1},"sign_up":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","required":true},"terms_of_service":{"type":"TypeList","required":true,"elem":{"schema":{"consent_required":{"type":"TypeBool","required":true},"enabled":{"type":"TypeBool","required":true},"text":{"type":"TypeString","optional":true}}},"maxItems":1}}},"maxItems":1},"sku_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tenant_access":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","required":true},"primary_key":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true}}},"maxItems":1},"virtual_network_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"subnet_id":{"type":"TypeString","required":true}}},"maxItems":1},"virtual_network_type":{"type":"TypeString","optional":true,"default":"None"},"zones":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_api_management_api":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"api_type":{"type":"TypeString","optional":true,"computed":true},"contact":{"type":"TypeList","optional":true,"elem":{"schema":{"email":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true},"url":{"type":"TypeString","optional":true}}},"maxItems":1,"minItems":1},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true,"computed":true},"import":{"type":"TypeList","optional":true,"elem":{"schema":{"content_format":{"type":"TypeString","required":true},"content_value":{"type":"TypeString","required":true},"wsdl_selector":{"type":"TypeList","optional":true,"elem":{"schema":{"endpoint_name":{"type":"TypeString","required":true},"service_name":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"is_current":{"type":"TypeBool","computed":true},"is_online":{"type":"TypeBool","computed":true},"license":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","optional":true},"url":{"type":"TypeString","optional":true}}},"maxItems":1,"minItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"oauth2_authorization":{"type":"TypeList","optional":true,"elem":{"schema":{"authorization_server_name":{"type":"TypeString","required":true},"scope":{"type":"TypeString","optional":true}}},"maxItems":1},"openid_authentication":{"type":"TypeList","optional":true,"elem":{"schema":{"bearer_token_sending_methods":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"openid_provider_name":{"type":"TypeString","required":true}}},"maxItems":1},"path":{"type":"TypeString","optional":true,"computed":true},"protocols":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"revision":{"type":"TypeString","required":true,"forceNew":true},"revision_description":{"type":"TypeString","optional":true},"service_url":{"type":"TypeString","optional":true,"computed":true},"source_api_id":{"type":"TypeString","optional":true},"subscription_key_parameter_names":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"header":{"type":"TypeString","required":true},"query":{"type":"TypeString","required":true}}},"maxItems":1},"subscription_required":{"type":"TypeBool","optional":true,"default":true},"terms_of_service_url":{"type":"TypeString","optional":true},"version":{"type":"TypeString","optional":true,"computed":true},"version_description":{"type":"TypeString","optional":true},"version_set_id":{"type":"TypeString","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_api_diagnostic":{"schema":{"always_log_errors":{"type":"TypeBool","optional":true,"computed":true},"api_management_logger_id":{"type":"TypeString","required":true},"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"api_name":{"type":"TypeString","required":true,"forceNew":true},"backend_request":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"body_bytes":{"type":"TypeInt","optional":true},"data_masking":{"type":"TypeList","optional":true,"elem":{"schema":{"headers":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"query_params":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}}}},"maxItems":1},"headers_to_log":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"backend_response":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"body_bytes":{"type":"TypeInt","optional":true},"data_masking":{"type":"TypeList","optional":true,"elem":{"schema":{"headers":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"query_params":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}}}},"maxItems":1},"headers_to_log":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"frontend_request":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"body_bytes":{"type":"TypeInt","optional":true},"data_masking":{"type":"TypeList","optional":true,"elem":{"schema":{"headers":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"query_params":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}}}},"maxItems":1},"headers_to_log":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"frontend_response":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"body_bytes":{"type":"TypeInt","optional":true},"data_masking":{"type":"TypeList","optional":true,"elem":{"schema":{"headers":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"query_params":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}}}},"maxItems":1},"headers_to_log":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"http_correlation_protocol":{"type":"TypeString","optional":true,"computed":true},"identifier":{"type":"TypeString","required":true,"forceNew":true},"log_client_ip":{"type":"TypeBool","optional":true,"computed":true},"operation_name_format":{"type":"TypeString","optional":true,"default":"Name"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sampling_percentage":{"type":"TypeFloat","optional":true,"computed":true},"verbosity":{"type":"TypeString","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_api_operation":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"api_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"method":{"type":"TypeString","required":true},"operation_id":{"type":"TypeString","required":true,"forceNew":true},"request":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"header":{"type":"TypeList","optional":true,"elem":{"schema":{"default_value":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"example":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"external_value":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"summary":{"type":"TypeString","optional":true},"value":{"type":"TypeString","optional":true}}}},"name":{"type":"TypeString","required":true},"required":{"type":"TypeBool","required":true},"schema_id":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"type_name":{"type":"TypeString","optional":true},"values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"query_parameter":{"type":"TypeList","optional":true,"elem":{"schema":{"default_value":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"example":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"external_value":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"summary":{"type":"TypeString","optional":true},"value":{"type":"TypeString","optional":true}}}},"name":{"type":"TypeString","required":true},"required":{"type":"TypeBool","required":true},"schema_id":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"type_name":{"type":"TypeString","optional":true},"values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"representation":{"type":"TypeList","optional":true,"elem":{"schema":{"content_type":{"type":"TypeString","required":true},"example":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"external_value":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"summary":{"type":"TypeString","optional":true},"value":{"type":"TypeString","optional":true}}}},"form_parameter":{"type":"TypeList","optional":true,"elem":{"schema":{"default_value":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"example":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"external_value":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"summary":{"type":"TypeString","optional":true},"value":{"type":"TypeString","optional":true}}}},"name":{"type":"TypeString","required":true},"required":{"type":"TypeBool","required":true},"schema_id":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"type_name":{"type":"TypeString","optional":true},"values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"schema_id":{"type":"TypeString","optional":true},"type_name":{"type":"TypeString","optional":true}}}}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"response":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"header":{"type":"TypeList","optional":true,"elem":{"schema":{"default_value":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"example":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"external_value":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"summary":{"type":"TypeString","optional":true},"value":{"type":"TypeString","optional":true}}}},"name":{"type":"TypeString","required":true},"required":{"type":"TypeBool","required":true},"schema_id":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"type_name":{"type":"TypeString","optional":true},"values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"representation":{"type":"TypeList","optional":true,"elem":{"schema":{"content_type":{"type":"TypeString","required":true},"example":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"external_value":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"summary":{"type":"TypeString","optional":true},"value":{"type":"TypeString","optional":true}}}},"form_parameter":{"type":"TypeList","optional":true,"elem":{"schema":{"default_value":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"example":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"external_value":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"summary":{"type":"TypeString","optional":true},"value":{"type":"TypeString","optional":true}}}},"name":{"type":"TypeString","required":true},"required":{"type":"TypeBool","required":true},"schema_id":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"type_name":{"type":"TypeString","optional":true},"values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"schema_id":{"type":"TypeString","optional":true},"type_name":{"type":"TypeString","optional":true}}}},"status_code":{"type":"TypeInt","required":true}}}},"template_parameter":{"type":"TypeList","optional":true,"elem":{"schema":{"default_value":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"example":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"external_value":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"summary":{"type":"TypeString","optional":true},"value":{"type":"TypeString","optional":true}}}},"name":{"type":"TypeString","required":true},"required":{"type":"TypeBool","required":true},"schema_id":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"type_name":{"type":"TypeString","optional":true},"values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"url_template":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_api_operation_policy":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"api_name":{"type":"TypeString","required":true,"forceNew":true},"operation_id":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"xml_content":{"type":"TypeString","optional":true,"computed":true},"xml_link":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_api_operation_tag":{"schema":{"api_operation_id":{"type":"TypeString","required":true,"forceNew":true},"display_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_api_policy":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"api_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"xml_content":{"type":"TypeString","optional":true,"computed":true},"xml_link":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_api_release":{"schema":{"api_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"notes":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_api_schema":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"api_name":{"type":"TypeString","required":true,"forceNew":true},"components":{"type":"TypeString","optional":true},"content_type":{"type":"TypeString","required":true},"definitions":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"schema_id":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_api_tag":{"schema":{"api_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_api_management_api_tag_description":{"schema":{"api_tag_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"external_documentation_description":{"type":"TypeString","optional":true},"external_documentation_url":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_api_version_set":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"version_header_name":{"type":"TypeString","optional":true},"version_query_name":{"type":"TypeString","optional":true},"versioning_scheme":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_authorization_server":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"authorization_endpoint":{"type":"TypeString","required":true},"authorization_methods":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"bearer_token_sending_methods":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"client_authentication_method":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true},"client_registration_endpoint":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","optional":true},"default_scope":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"grant_types":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"resource_owner_password":{"type":"TypeString","optional":true},"resource_owner_username":{"type":"TypeString","optional":true},"support_state":{"type":"TypeBool","optional":true},"token_body_parameter":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"token_endpoint":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_backend":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"credentials":{"type":"TypeList","optional":true,"elem":{"schema":{"authorization":{"type":"TypeList","optional":true,"elem":{"schema":{"parameter":{"type":"TypeString","optional":true},"scheme":{"type":"TypeString","optional":true}}},"maxItems":1},"certificate":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"header":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"query":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"protocol":{"type":"TypeString","required":true},"proxy":{"type":"TypeList","optional":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true},"url":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"resource_id":{"type":"TypeString","optional":true},"service_fabric_cluster":{"type":"TypeList","optional":true,"elem":{"schema":{"client_certificate_id":{"type":"TypeString","optional":true,"computed":true},"client_certificate_thumbprint":{"type":"TypeString","optional":true,"computed":true},"management_endpoints":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"max_partition_resolution_retries":{"type":"TypeInt","required":true},"server_certificate_thumbprints":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"server_x509_name":{"type":"TypeSet","optional":true,"elem":{"schema":{"issuer_certificate_thumbprint":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}}}},"maxItems":1},"title":{"type":"TypeString","optional":true},"tls":{"type":"TypeList","optional":true,"elem":{"schema":{"validate_certificate_chain":{"type":"TypeBool","optional":true},"validate_certificate_name":{"type":"TypeBool","optional":true}}},"maxItems":1},"url":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_certificate":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"data":{"type":"TypeString","optional":true},"expiration":{"type":"TypeString","computed":true},"key_vault_identity_client_id":{"type":"TypeString","optional":true},"key_vault_secret_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subject":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_custom_domain":{"schema":{"api_management_id":{"type":"TypeString","required":true,"forceNew":true},"developer_portal":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"certificate_password":{"type":"TypeString","optional":true},"certificate_source":{"type":"TypeString","computed":true},"certificate_status":{"type":"TypeString","computed":true},"expiry":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","optional":true},"negotiate_client_certificate":{"type":"TypeBool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"TypeString","optional":true},"subject":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}}},"gateway":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"certificate_password":{"type":"TypeString","optional":true},"certificate_source":{"type":"TypeString","computed":true},"certificate_status":{"type":"TypeString","computed":true},"default_ssl_binding":{"type":"TypeBool","optional":true,"computed":true},"expiry":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","optional":true},"negotiate_client_certificate":{"type":"TypeBool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"TypeString","optional":true},"subject":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}}},"management":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"certificate_password":{"type":"TypeString","optional":true},"certificate_source":{"type":"TypeString","computed":true},"certificate_status":{"type":"TypeString","computed":true},"expiry":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","optional":true},"negotiate_client_certificate":{"type":"TypeBool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"TypeString","optional":true},"subject":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}}},"portal":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"certificate_password":{"type":"TypeString","optional":true},"certificate_source":{"type":"TypeString","computed":true},"certificate_status":{"type":"TypeString","computed":true},"expiry":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","optional":true},"negotiate_client_certificate":{"type":"TypeBool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"TypeString","optional":true},"subject":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}}},"scm":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"certificate_password":{"type":"TypeString","optional":true},"certificate_source":{"type":"TypeString","computed":true},"certificate_status":{"type":"TypeString","computed":true},"expiry":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","optional":true},"negotiate_client_certificate":{"type":"TypeBool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"TypeString","optional":true},"subject":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_api_management_diagnostic":{"schema":{"always_log_errors":{"type":"TypeBool","optional":true,"computed":true},"api_management_logger_id":{"type":"TypeString","required":true},"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"backend_request":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"body_bytes":{"type":"TypeInt","optional":true},"data_masking":{"type":"TypeList","optional":true,"elem":{"schema":{"headers":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"query_params":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}}}},"maxItems":1},"headers_to_log":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"backend_response":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"body_bytes":{"type":"TypeInt","optional":true},"data_masking":{"type":"TypeList","optional":true,"elem":{"schema":{"headers":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"query_params":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}}}},"maxItems":1},"headers_to_log":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"frontend_request":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"body_bytes":{"type":"TypeInt","optional":true},"data_masking":{"type":"TypeList","optional":true,"elem":{"schema":{"headers":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"query_params":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}}}},"maxItems":1},"headers_to_log":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"frontend_response":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"body_bytes":{"type":"TypeInt","optional":true},"data_masking":{"type":"TypeList","optional":true,"elem":{"schema":{"headers":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"query_params":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}}}},"maxItems":1},"headers_to_log":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"http_correlation_protocol":{"type":"TypeString","optional":true,"computed":true},"identifier":{"type":"TypeString","required":true,"forceNew":true},"log_client_ip":{"type":"TypeBool","optional":true,"computed":true},"operation_name_format":{"type":"TypeString","optional":true,"default":"Name"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sampling_percentage":{"type":"TypeFloat","optional":true,"computed":true},"verbosity":{"type":"TypeString","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_email_template":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"body":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subject":{"type":"TypeString","required":true},"template_name":{"type":"TypeString","required":true,"forceNew":true},"title":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_gateway":{"schema":{"api_management_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"location_data":{"type":"TypeList","required":true,"elem":{"schema":{"city":{"type":"TypeString","optional":true},"district":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"region":{"type":"TypeString","optional":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_gateway_api":{"schema":{"api_id":{"type":"TypeString","required":true,"forceNew":true},"gateway_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_api_management_gateway_certificate_authority":{"schema":{"api_management_id":{"type":"TypeString","required":true,"forceNew":true},"certificate_name":{"type":"TypeString","required":true,"forceNew":true},"gateway_name":{"type":"TypeString","required":true,"forceNew":true},"is_trusted":{"type":"TypeBool","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_gateway_host_name_configuration":{"schema":{"api_management_id":{"type":"TypeString","required":true,"forceNew":true},"certificate_id":{"type":"TypeString","required":true},"gateway_name":{"type":"TypeString","required":true,"forceNew":true},"host_name":{"type":"TypeString","required":true},"http2_enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true,"forceNew":true},"request_client_certificate_enabled":{"type":"TypeBool","optional":true},"tls10_enabled":{"type":"TypeBool","optional":true},"tls11_enabled":{"type":"TypeBool","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_global_schema":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"schema_id":{"type":"TypeString","required":true,"forceNew":true},"type":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_group":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"external_id":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"type":{"type":"TypeString","optional":true,"default":"custom","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_group_user":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"group_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"user_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_api_management_identity_provider_aad":{"schema":{"allowed_tenants":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"client_id":{"type":"TypeString","required":true},"client_library":{"type":"TypeString","optional":true},"client_secret":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"signin_tenant":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_identity_provider_aadb2c":{"schema":{"allowed_tenant":{"type":"TypeString","required":true},"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"authority":{"type":"TypeString","required":true},"client_id":{"type":"TypeString","required":true},"client_library":{"type":"TypeString","optional":true},"client_secret":{"type":"TypeString","required":true},"password_reset_policy":{"type":"TypeString","optional":true},"profile_editing_policy":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"signin_policy":{"type":"TypeString","required":true},"signin_tenant":{"type":"TypeString","required":true},"signup_policy":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_identity_provider_facebook":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"app_id":{"type":"TypeString","required":true},"app_secret":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_identity_provider_google":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_identity_provider_microsoft":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_identity_provider_twitter":{"schema":{"api_key":{"type":"TypeString","required":true},"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"api_secret_key":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_logger":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"application_insights":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"instrumentation_key":{"type":"TypeString","required":true}}},"maxItems":1},"buffered":{"type":"TypeBool","optional":true,"default":true},"description":{"type":"TypeString","optional":true},"eventhub":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"connection_string":{"type":"TypeString","optional":true},"endpoint_uri":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"user_assigned_identity_client_id":{"type":"TypeString","optional":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"resource_id":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_named_value":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"display_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secret":{"type":"TypeBool","optional":true,"default":false},"tags":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"value":{"type":"TypeString","optional":true},"value_from_key_vault":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_client_id":{"type":"TypeString","optional":true},"secret_id":{"type":"TypeString","required":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_notification_recipient_email":{"schema":{"api_management_id":{"type":"TypeString","required":true,"forceNew":true},"email":{"type":"TypeString","required":true,"forceNew":true},"notification_type":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_api_management_notification_recipient_user":{"schema":{"api_management_id":{"type":"TypeString","required":true,"forceNew":true},"notification_type":{"type":"TypeString","required":true,"forceNew":true},"user_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_api_management_openid_connect_provider":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"metadata_endpoint":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_policy":{"schema":{"api_management_id":{"type":"TypeString","required":true,"forceNew":true},"xml_content":{"type":"TypeString","optional":true,"computed":true},"xml_link":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_policy_fragment":{"schema":{"api_management_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"format":{"type":"TypeString","optional":true,"default":"xml"},"name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_product":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"approval_required":{"type":"TypeBool","optional":true},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"product_id":{"type":"TypeString","required":true,"forceNew":true},"published":{"type":"TypeBool","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subscription_required":{"type":"TypeBool","optional":true,"default":true},"subscriptions_limit":{"type":"TypeInt","optional":true},"terms":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_product_api":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"api_name":{"type":"TypeString","required":true,"forceNew":true},"product_id":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_api_management_product_group":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"group_name":{"type":"TypeString","required":true,"forceNew":true},"product_id":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_api_management_product_policy":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"product_id":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"xml_content":{"type":"TypeString","optional":true,"computed":true},"xml_link":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_product_tag":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"api_management_product_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_api_management_redis_cache":{"schema":{"api_management_id":{"type":"TypeString","required":true,"forceNew":true},"cache_location":{"type":"TypeString","optional":true,"default":"default"},"connection_string":{"type":"TypeString","required":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"redis_cache_id":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_subscription":{"schema":{"allow_tracing":{"type":"TypeBool","optional":true,"default":true},"api_id":{"type":"TypeString","optional":true,"forceNew":true},"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"display_name":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","optional":true,"computed":true},"product_id":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_key":{"type":"TypeString","optional":true,"computed":true},"state":{"type":"TypeString","optional":true,"default":"submitted"},"subscription_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"user_id":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_tag":{"schema":{"api_management_id":{"type":"TypeString","required":true,"forceNew":true},"display_name":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_user":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"confirmation":{"type":"TypeString","optional":true,"forceNew":true},"email":{"type":"TypeString","required":true},"first_name":{"type":"TypeString","required":true},"last_name":{"type":"TypeString","required":true},"note":{"type":"TypeString","optional":true},"password":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"state":{"type":"TypeString","optional":true,"computed":true},"user_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":45,"read":5,"delete":45,"update":45}},"azurerm_app_configuration":{"schema":{"encryption":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_client_id":{"type":"TypeString","optional":true},"key_vault_key_identifier":{"type":"TypeString","optional":true}}},"maxItems":1},"endpoint":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"local_auth_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_read_key":{"type":"TypeList","computed":true,"elem":{"schema":{"connection_string":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"secret":{"type":"TypeString","computed":true}}}},"primary_write_key":{"type":"TypeList","computed":true,"elem":{"schema":{"connection_string":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"secret":{"type":"TypeString","computed":true}}}},"public_network_access":{"type":"TypeString","optional":true},"purge_protection_enabled":{"type":"TypeBool","optional":true,"default":false},"replica":{"type":"TypeSet","optional":true,"elem":{"schema":{"endpoint":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}},"minItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_read_key":{"type":"TypeList","computed":true,"elem":{"schema":{"connection_string":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"secret":{"type":"TypeString","computed":true}}}},"secondary_write_key":{"type":"TypeList","computed":true,"elem":{"schema":{"connection_string":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"secret":{"type":"TypeString","computed":true}}}},"sku":{"type":"TypeString","optional":true,"default":"free"},"soft_delete_retention_days":{"type":"TypeInt","optional":true,"default":7,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_app_configuration_feature":{"schema":{"configuration_store_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true},"etag":{"type":"TypeString","optional":true,"computed":true},"key":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"label":{"type":"TypeString","optional":true,"forceNew":true},"locked":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"percentage_filter_value":{"type":"TypeFloat","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"targeting_filter":{"type":"TypeList","optional":true,"elem":{"schema":{"default_rollout_percentage":{"type":"TypeInt","required":true},"groups":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"rollout_percentage":{"type":"TypeInt","required":true}}}},"users":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"timewindow_filter":{"type":"TypeList","optional":true,"elem":{"schema":{"end":{"type":"TypeString","optional":true},"start":{"type":"TypeString","optional":true}}}}},"timeouts":{"create":45,"read":5,"delete":30,"update":30}},"azurerm_app_configuration_key":{"schema":{"configuration_store_id":{"type":"TypeString","required":true,"forceNew":true},"content_type":{"type":"TypeString","optional":true,"computed":true},"etag":{"type":"TypeString","optional":true,"computed":true},"key":{"type":"TypeString","required":true,"forceNew":true},"label":{"type":"TypeString","optional":true,"forceNew":true},"locked":{"type":"TypeBool","optional":true,"default":false},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","optional":true,"default":"kv"},"value":{"type":"TypeString","optional":true},"vault_key_reference":{"type":"TypeString","optional":true}},"timeouts":{"create":45,"read":5,"delete":30,"update":30}},"azurerm_app_service":{"schema":{"app_service_plan_id":{"type":"TypeString","required":true},"app_settings":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","optional":true}}},"maxItems":1},"additional_login_params":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","required":true},"facebook":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true},"app_secret":{"type":"TypeString","required":true},"oauth_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"google":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"oauth_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"issuer":{"type":"TypeString","optional":true},"microsoft":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"oauth_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true},"token_refresh_extension_hours":{"type":"TypeFloat","optional":true,"default":72},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false},"twitter":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true},"consumer_secret":{"type":"TypeString","required":true}}},"maxItems":1},"unauthenticated_client_action":{"type":"TypeString","optional":true}}},"maxItems":1},"backup":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true},"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","required":true},"frequency_unit":{"type":"TypeString","required":true},"keep_at_least_one_backup":{"type":"TypeBool","optional":true,"default":false},"retention_period_in_days":{"type":"TypeInt","optional":true,"default":30},"start_time":{"type":"TypeString","optional":true}}},"maxItems":1},"storage_account_url":{"type":"TypeString","required":true}}},"maxItems":1},"client_affinity_enabled":{"type":"TypeBool","optional":true,"default":false},"client_cert_enabled":{"type":"TypeBool","optional":true,"default":false},"client_cert_mode":{"type":"TypeString","optional":true,"computed":true},"connection_string":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"custom_domain_verification_id":{"type":"TypeString","computed":true},"default_site_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"https_only":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_reference_identity_id":{"type":"TypeString","optional":true,"computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"logs":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"application_logs":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"level":{"type":"TypeString","required":true},"retention_in_days":{"type":"TypeInt","required":true},"sas_url":{"type":"TypeString","required":true}}},"maxItems":1},"file_system_level":{"type":"TypeString","optional":true,"default":"Off"}}},"maxItems":1},"detailed_error_messages_enabled":{"type":"TypeBool","optional":true,"default":false},"failed_request_tracing_enabled":{"type":"TypeBool","optional":true,"default":false},"http_logs":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","required":true},"sas_url":{"type":"TypeString","required":true}}},"maxItems":1},"file_system":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","required":true},"retention_in_mb":{"type":"TypeInt","required":true}}},"maxItems":1}}},"maxItems":1}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"site_config":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"acr_use_managed_identity_credentials":{"type":"TypeBool","optional":true,"default":false},"acr_user_managed_identity_client_id":{"type":"TypeString","optional":true},"always_on":{"type":"TypeBool","optional":true,"default":false},"app_command_line":{"type":"TypeString","optional":true},"auto_swap_slot_name":{"type":"TypeString","optional":true},"cors":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"support_credentials":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"default_documents":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"dotnet_framework_version":{"type":"TypeString","optional":true,"default":"v4.0"},"ftps_state":{"type":"TypeString","optional":true,"computed":true},"health_check_path":{"type":"TypeString","optional":true},"http2_enabled":{"type":"TypeBool","optional":true,"default":false},"ip_restriction":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000},"service_tag":{"type":"TypeString","optional":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true}}}},"java_container":{"type":"TypeString","optional":true},"java_container_version":{"type":"TypeString","optional":true},"java_version":{"type":"TypeString","optional":true},"linux_fx_version":{"type":"TypeString","optional":true,"computed":true},"local_mysql_enabled":{"type":"TypeBool","optional":true,"computed":true},"managed_pipeline_mode":{"type":"TypeString","optional":true,"computed":true},"min_tls_version":{"type":"TypeString","optional":true,"computed":true},"number_of_workers":{"type":"TypeInt","optional":true,"computed":true},"php_version":{"type":"TypeString","optional":true},"python_version":{"type":"TypeString","optional":true},"remote_debugging_enabled":{"type":"TypeBool","optional":true,"default":false},"remote_debugging_version":{"type":"TypeString","optional":true,"computed":true},"scm_ip_restriction":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000},"service_tag":{"type":"TypeString","optional":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true}}}},"scm_type":{"type":"TypeString","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"TypeBool","optional":true},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"computed":true},"websockets_enabled":{"type":"TypeBool","optional":true,"computed":true},"windows_fx_version":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"source_control":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"branch":{"type":"TypeString","optional":true,"computed":true},"manual_integration":{"type":"TypeBool","optional":true,"computed":true},"repo_url":{"type":"TypeString","optional":true,"computed":true},"rollback_enabled":{"type":"TypeBool","optional":true,"computed":true},"use_mercurial":{"type":"TypeBool","optional":true,"computed":true}}},"maxItems":1},"storage_account":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"access_key":{"type":"TypeString","required":true},"account_name":{"type":"TypeString","required":true},"mount_path":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"share_name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_app_service_active_slot":{"schema":{"app_service_name":{"type":"TypeString","required":true,"forceNew":true},"app_service_slot_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_app_service_certificate":{"schema":{"app_service_plan_id":{"type":"TypeString","optional":true,"forceNew":true},"expiration_date":{"type":"TypeString","computed":true},"friendly_name":{"type":"TypeString","computed":true},"host_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"hosting_environment_profile_id":{"type":"TypeString","computed":true},"issue_date":{"type":"TypeString","computed":true},"issuer":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","optional":true,"forceNew":true},"key_vault_secret_id":{"type":"TypeString","optional":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","optional":true,"forceNew":true},"pfx_blob":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subject_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"thumbprint":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_app_service_certificate_binding":{"schema":{"app_service_name":{"type":"TypeString","computed":true},"certificate_id":{"type":"TypeString","required":true,"forceNew":true},"hostname":{"type":"TypeString","computed":true},"hostname_binding_id":{"type":"TypeString","required":true,"forceNew":true},"ssl_state":{"type":"TypeString","required":true,"forceNew":true},"thumbprint":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_app_service_certificate_order":{"schema":{"app_service_certificate_not_renewable_reasons":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"auto_renew":{"type":"TypeBool","optional":true,"default":true},"certificates":{"type":"TypeList","computed":true,"elem":{"schema":{"certificate_name":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","computed":true},"key_vault_secret_name":{"type":"TypeString","computed":true},"provisioning_state":{"type":"TypeString","computed":true}}}},"csr":{"type":"TypeString","optional":true,"computed":true},"distinguished_name":{"type":"TypeString","optional":true,"computed":true},"domain_verification_token":{"type":"TypeString","computed":true},"expiration_time":{"type":"TypeString","computed":true},"intermediate_thumbprint":{"type":"TypeString","computed":true},"is_private_key_external":{"type":"TypeBool","computed":true},"key_size":{"type":"TypeInt","optional":true,"default":2048},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"product_type":{"type":"TypeString","optional":true,"default":"Standard"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"root_thumbprint":{"type":"TypeString","computed":true},"signed_certificate_thumbprint":{"type":"TypeString","computed":true},"status":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"validity_in_years":{"type":"TypeInt","optional":true,"default":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_app_service_connection":{"schema":{"app_service_id":{"type":"TypeString","required":true,"forceNew":true},"authentication":{"type":"TypeList","required":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"client_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true},"principal_id":{"type":"TypeString","optional":true},"secret":{"type":"TypeString","optional":true},"subscription_id":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"client_type":{"type":"TypeString","optional":true,"default":"none"},"name":{"type":"TypeString","required":true,"forceNew":true},"secret_store":{"type":"TypeList","optional":true,"elem":{"schema":{"key_vault_id":{"type":"TypeString","required":true}}},"maxItems":1},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true},"vnet_solution":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_app_service_custom_hostname_binding":{"schema":{"app_service_name":{"type":"TypeString","required":true,"forceNew":true},"hostname":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"ssl_state":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"thumbprint":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"virtual_ip":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_app_service_environment_v3":{"schema":{"allow_new_private_endpoint_connections":{"type":"TypeBool","optional":true,"default":true},"cluster_setting":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"dedicated_host_count":{"type":"TypeInt","optional":true,"forceNew":true},"dns_suffix":{"type":"TypeString","computed":true},"external_inbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"inbound_network_dependencies":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ports":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"internal_inbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"internal_load_balancing_mode":{"type":"TypeString","optional":true,"default":"None","forceNew":true},"ip_ssl_address_count":{"type":"TypeInt","computed":true},"linux_outbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"pricing_tier":{"type":"TypeString","computed":true},"remote_debugging_enabled":{"type":"TypeBool","optional":true,"default":false},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"windows_outbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"zone_redundant":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}},"timeouts":{"create":360,"read":5,"delete":360,"update":360}},"azurerm_app_service_hybrid_connection":{"schema":{"app_service_name":{"type":"TypeString","required":true,"forceNew":true},"hostname":{"type":"TypeString","required":true},"namespace_name":{"type":"TypeString","computed":true},"port":{"type":"TypeInt","required":true},"relay_id":{"type":"TypeString","required":true,"forceNew":true},"relay_name":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"send_key_name":{"type":"TypeString","optional":true,"default":"RootManageSharedAccessKey"},"send_key_value":{"type":"TypeString","computed":true},"service_bus_namespace":{"type":"TypeString","computed":true},"service_bus_suffix":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_app_service_managed_certificate":{"schema":{"canonical_name":{"type":"TypeString","computed":true},"custom_hostname_binding_id":{"type":"TypeString","required":true,"forceNew":true},"expiration_date":{"type":"TypeString","computed":true},"friendly_name":{"type":"TypeString","computed":true},"host_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"issue_date":{"type":"TypeString","computed":true},"issuer":{"type":"TypeString","computed":true},"subject_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"thumbprint":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_app_service_plan":{"schema":{"app_service_environment_id":{"type":"TypeString","optional":true,"forceNew":true},"is_xenon":{"type":"TypeBool","optional":true},"kind":{"type":"TypeString","optional":true,"default":"Windows","forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"maximum_elastic_worker_count":{"type":"TypeInt","optional":true,"computed":true},"maximum_number_of_workers":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"per_site_scaling":{"type":"TypeBool","optional":true},"reserved":{"type":"TypeBool","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeList","required":true,"elem":{"schema":{"capacity":{"type":"TypeInt","optional":true,"computed":true},"size":{"type":"TypeString","required":true},"tier":{"type":"TypeString","required":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zone_redundant":{"type":"TypeBool","optional":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_app_service_public_certificate":{"schema":{"app_service_name":{"type":"TypeString","required":true,"forceNew":true},"blob":{"type":"TypeString","required":true,"forceNew":true},"certificate_location":{"type":"TypeString","required":true,"forceNew":true},"certificate_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"thumbprint":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_app_service_slot":{"schema":{"app_service_name":{"type":"TypeString","required":true,"forceNew":true},"app_service_plan_id":{"type":"TypeString","required":true,"forceNew":true},"app_settings":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","optional":true}}},"maxItems":1},"additional_login_params":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","required":true},"facebook":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true},"app_secret":{"type":"TypeString","required":true},"oauth_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"google":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"oauth_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"issuer":{"type":"TypeString","optional":true},"microsoft":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"oauth_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true},"token_refresh_extension_hours":{"type":"TypeFloat","optional":true,"default":72},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false},"twitter":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true},"consumer_secret":{"type":"TypeString","required":true}}},"maxItems":1},"unauthenticated_client_action":{"type":"TypeString","optional":true}}},"maxItems":1},"client_affinity_enabled":{"type":"TypeBool","optional":true,"computed":true},"connection_string":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"default_site_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"https_only":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_reference_identity_id":{"type":"TypeString","optional":true,"computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"logs":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"application_logs":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"level":{"type":"TypeString","required":true},"retention_in_days":{"type":"TypeInt","required":true},"sas_url":{"type":"TypeString","required":true}}},"maxItems":1},"file_system_level":{"type":"TypeString","optional":true,"default":"Off"}}},"maxItems":1},"detailed_error_messages_enabled":{"type":"TypeBool","optional":true,"default":false},"failed_request_tracing_enabled":{"type":"TypeBool","optional":true,"default":false},"http_logs":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","required":true},"sas_url":{"type":"TypeString","required":true}}},"maxItems":1},"file_system":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","required":true},"retention_in_mb":{"type":"TypeInt","required":true}}},"maxItems":1}}},"maxItems":1}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"site_config":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"acr_use_managed_identity_credentials":{"type":"TypeBool","optional":true,"default":false},"acr_user_managed_identity_client_id":{"type":"TypeString","optional":true},"always_on":{"type":"TypeBool","optional":true,"default":false},"app_command_line":{"type":"TypeString","optional":true},"auto_swap_slot_name":{"type":"TypeString","optional":true},"cors":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"support_credentials":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"default_documents":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"dotnet_framework_version":{"type":"TypeString","optional":true,"default":"v4.0"},"ftps_state":{"type":"TypeString","optional":true,"computed":true},"health_check_path":{"type":"TypeString","optional":true},"http2_enabled":{"type":"TypeBool","optional":true,"default":false},"ip_restriction":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000},"service_tag":{"type":"TypeString","optional":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true}}}},"java_container":{"type":"TypeString","optional":true},"java_container_version":{"type":"TypeString","optional":true},"java_version":{"type":"TypeString","optional":true},"linux_fx_version":{"type":"TypeString","optional":true,"computed":true},"local_mysql_enabled":{"type":"TypeBool","optional":true,"computed":true},"managed_pipeline_mode":{"type":"TypeString","optional":true,"computed":true},"min_tls_version":{"type":"TypeString","optional":true,"computed":true},"number_of_workers":{"type":"TypeInt","optional":true,"computed":true},"php_version":{"type":"TypeString","optional":true},"python_version":{"type":"TypeString","optional":true},"remote_debugging_enabled":{"type":"TypeBool","optional":true,"default":false},"remote_debugging_version":{"type":"TypeString","optional":true,"computed":true},"scm_ip_restriction":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000},"service_tag":{"type":"TypeString","optional":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true}}}},"scm_type":{"type":"TypeString","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"TypeBool","optional":true},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"computed":true},"websockets_enabled":{"type":"TypeBool","optional":true,"computed":true},"windows_fx_version":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"storage_account":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"access_key":{"type":"TypeString","required":true},"account_name":{"type":"TypeString","required":true},"mount_path":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"share_name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_app_service_slot_custom_hostname_binding":{"schema":{"app_service_slot_id":{"type":"TypeString","required":true,"forceNew":true},"hostname":{"type":"TypeString","required":true,"forceNew":true},"ssl_state":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"thumbprint":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"virtual_ip":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_app_service_slot_virtual_network_swift_connection":{"schema":{"app_service_id":{"type":"TypeString","required":true,"forceNew":true},"slot_name":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_app_service_source_control":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The ID of the Windows or Linux Web App.","forceNew":true},"branch":{"type":"TypeString","optional":true,"description":"The branch name to use for deployments.","computed":true,"forceNew":true},"github_action_configuration":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"code_configuration":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"runtime_stack":{"type":"TypeString","required":true,"description":"The value to use for the Runtime Stack in the workflow file content for code base apps.","forceNew":true},"runtime_version":{"type":"TypeString","required":true,"description":"The value to use for the Runtime Version in the workflow file content for code base apps.","forceNew":true}}},"maxItems":1},"container_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"image_name":{"type":"TypeString","required":true,"description":"The image name for the build.","forceNew":true},"registry_password":{"type":"TypeString","optional":true,"description":"The password used to upload the image to the container registry.","forceNew":true},"registry_url":{"type":"TypeString","required":true,"description":"The server URL for the container registry where the build will be hosted.","forceNew":true},"registry_username":{"type":"TypeString","optional":true,"description":"The username used to upload the image to the container registry.","forceNew":true}}},"maxItems":1},"generate_workflow_file":{"type":"TypeBool","optional":true,"default":true,"description":"Should the service generate the GitHub Action Workflow file. Defaults to `true`","forceNew":true},"linux_action":{"type":"TypeBool","description":"Denotes this action uses a Linux base image.","computed":true}}},"maxItems":1},"repo_url":{"type":"TypeString","optional":true,"description":"The URL for the repository.","computed":true,"forceNew":true},"rollback_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Deployment Rollback be enabled? Defaults to `false`.","forceNew":true},"scm_type":{"type":"TypeString","description":"The SCM Type in use. This value is decoded by the service from the repository information supplied.","computed":true},"use_local_git":{"type":"TypeBool","optional":true,"default":false,"description":"Should the App use local Git configuration.","forceNew":true},"use_manual_integration":{"type":"TypeBool","optional":true,"default":false,"description":"Should code be deployed manually. Set to `false` to enable continuous integration, such as webhooks into online repos such as GitHub. Defaults to `false`.","forceNew":true},"use_mercurial":{"type":"TypeBool","optional":true,"default":false,"description":"The repository specified is Mercurial. Defaults to `false`.","forceNew":true},"uses_github_action":{"type":"TypeBool","description":"Indicates if the Slot uses a GitHub action for deployment. This value is decoded by the service from the repository information supplied.","computed":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_app_service_source_control_slot":{"schema":{"branch":{"type":"TypeString","optional":true,"description":"The URL for the repository","computed":true,"forceNew":true},"github_action_configuration":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"code_configuration":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"runtime_stack":{"type":"TypeString","required":true,"description":"The value to use for the Runtime Stack in the workflow file content for code base apps.","forceNew":true},"runtime_version":{"type":"TypeString","required":true,"description":"The value to use for the Runtime Version in the workflow file content for code base apps.","forceNew":true}}},"maxItems":1},"container_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"image_name":{"type":"TypeString","required":true,"description":"The image name for the build.","forceNew":true},"registry_password":{"type":"TypeString","optional":true,"description":"The password used to upload the image to the container registry.","forceNew":true},"registry_url":{"type":"TypeString","required":true,"description":"The server URL for the container registry where the build will be hosted.","forceNew":true},"registry_username":{"type":"TypeString","optional":true,"description":"The username used to upload the image to the container registry.","forceNew":true}}},"maxItems":1},"generate_workflow_file":{"type":"TypeBool","optional":true,"default":true,"description":"Should the service generate the GitHub Action Workflow file. Defaults to `true`","forceNew":true},"linux_action":{"type":"TypeBool","description":"Denotes this action uses a Linux base image.","computed":true}}},"maxItems":1},"repo_url":{"type":"TypeString","optional":true,"description":"The branch name to use for deployments.","computed":true,"forceNew":true},"rollback_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Deployment Rollback be enabled? Defaults to `false`","forceNew":true},"scm_type":{"type":"TypeString","description":"The SCM Type in use. This value is decoded by the service from the repository information supplied.","computed":true},"slot_id":{"type":"TypeString","required":true,"description":"The ID of the Linux or Windows Web App Slot.","forceNew":true},"use_local_git":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Slot use local Git configuration.","forceNew":true},"use_manual_integration":{"type":"TypeBool","optional":true,"default":false,"description":"Should code be deployed manually. Set to `true` to disable continuous integration, such as webhooks into online repos such as GitHub. Defaults to `false`","forceNew":true},"use_mercurial":{"type":"TypeBool","optional":true,"default":false,"description":"The repository specified is Mercurial. Defaults to `false`.","forceNew":true},"uses_github_action":{"type":"TypeBool","description":"Indicates if the Slot uses a GitHub action for deployment. This value is decoded by the service from the repository information supplied.","computed":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_app_service_source_control_token":{"schema":{"token":{"type":"TypeString","required":true},"token_secret":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_app_service_virtual_network_swift_connection":{"schema":{"app_service_id":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_application_gateway":{"schema":{"authentication_certificate":{"type":"TypeList","optional":true,"elem":{"schema":{"data":{"type":"TypeString","required":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true}}}},"autoscale_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"max_capacity":{"type":"TypeInt","optional":true},"min_capacity":{"type":"TypeInt","required":true}}},"maxItems":1},"backend_address_pool":{"type":"TypeSet","required":true,"elem":{"schema":{"fqdns":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"id":{"type":"TypeString","computed":true},"ip_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true}}}},"backend_http_settings":{"type":"TypeSet","required":true,"elem":{"schema":{"affinity_cookie_name":{"type":"TypeString","optional":true},"authentication_certificate":{"type":"TypeList","optional":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true}}}},"connection_draining":{"type":"TypeList","optional":true,"elem":{"schema":{"drain_timeout_sec":{"type":"TypeInt","required":true},"enabled":{"type":"TypeBool","required":true}}},"maxItems":1},"cookie_based_affinity":{"type":"TypeString","required":true},"host_name":{"type":"TypeString","optional":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true},"pick_host_name_from_backend_address":{"type":"TypeBool","optional":true,"default":false},"port":{"type":"TypeInt","required":true},"probe_id":{"type":"TypeString","computed":true},"probe_name":{"type":"TypeString","optional":true},"protocol":{"type":"TypeString","required":true},"request_timeout":{"type":"TypeInt","optional":true,"default":30},"trusted_root_certificate_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"minItems":1},"custom_error_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"custom_error_page_url":{"type":"TypeString","required":true},"id":{"type":"TypeString","computed":true},"status_code":{"type":"TypeString","required":true}}}},"enable_http2":{"type":"TypeBool","optional":true},"fips_enabled":{"type":"TypeBool","optional":true},"firewall_policy_id":{"type":"TypeString","optional":true},"force_firewall_policy_association":{"type":"TypeBool","optional":true},"frontend_ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"private_ip_address":{"type":"TypeString","optional":true,"computed":true},"private_ip_address_allocation":{"type":"TypeString","optional":true,"default":"Dynamic"},"private_link_configuration_id":{"type":"TypeString","computed":true},"private_link_configuration_name":{"type":"TypeString","optional":true},"public_ip_address_id":{"type":"TypeString","optional":true},"subnet_id":{"type":"TypeString","optional":true}}},"minItems":1},"frontend_port":{"type":"TypeSet","required":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"port":{"type":"TypeInt","required":true}}}},"gateway_ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"subnet_id":{"type":"TypeString","required":true}}},"maxItems":2},"global":{"type":"TypeList","optional":true,"elem":{"schema":{"request_buffering_enabled":{"type":"TypeBool","required":true},"response_buffering_enabled":{"type":"TypeBool","required":true}}},"maxItems":1},"http_listener":{"type":"TypeSet","required":true,"elem":{"schema":{"custom_error_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"custom_error_page_url":{"type":"TypeString","required":true},"id":{"type":"TypeString","computed":true},"status_code":{"type":"TypeString","required":true}}}},"firewall_policy_id":{"type":"TypeString","optional":true},"frontend_ip_configuration_id":{"type":"TypeString","computed":true},"frontend_ip_configuration_name":{"type":"TypeString","required":true},"frontend_port_id":{"type":"TypeString","computed":true},"frontend_port_name":{"type":"TypeString","required":true},"host_name":{"type":"TypeString","optional":true},"host_names":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"protocol":{"type":"TypeString","required":true},"require_sni":{"type":"TypeBool","optional":true},"ssl_certificate_id":{"type":"TypeString","computed":true},"ssl_certificate_name":{"type":"TypeString","optional":true},"ssl_profile_id":{"type":"TypeString","computed":true},"ssl_profile_name":{"type":"TypeString","optional":true}}}},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_endpoint_connection":{"type":"TypeSet","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"private_link_configuration":{"type":"TypeSet","optional":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"primary":{"type":"TypeBool","required":true},"private_ip_address":{"type":"TypeString","optional":true,"computed":true},"private_ip_address_allocation":{"type":"TypeString","required":true},"subnet_id":{"type":"TypeString","required":true}}},"minItems":1},"name":{"type":"TypeString","required":true}}}},"probe":{"type":"TypeSet","optional":true,"elem":{"schema":{"host":{"type":"TypeString","optional":true},"id":{"type":"TypeString","computed":true},"interval":{"type":"TypeInt","required":true},"match":{"type":"TypeList","optional":true,"elem":{"schema":{"body":{"type":"TypeString","optional":true},"status_code":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"minimum_servers":{"type":"TypeInt","optional":true,"default":0},"name":{"type":"TypeString","required":true},"path":{"type":"TypeString","required":true},"pick_host_name_from_backend_http_settings":{"type":"TypeBool","optional":true,"default":false},"port":{"type":"TypeInt","optional":true},"protocol":{"type":"TypeString","required":true},"timeout":{"type":"TypeInt","required":true},"unhealthy_threshold":{"type":"TypeInt","required":true}}}},"redirect_configuration":{"type":"TypeSet","optional":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"include_path":{"type":"TypeBool","optional":true,"default":false},"include_query_string":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true},"redirect_type":{"type":"TypeString","required":true},"target_listener_id":{"type":"TypeString","computed":true},"target_listener_name":{"type":"TypeString","optional":true},"target_url":{"type":"TypeString","optional":true}}}},"request_routing_rule":{"type":"TypeSet","required":true,"elem":{"schema":{"backend_address_pool_id":{"type":"TypeString","computed":true},"backend_address_pool_name":{"type":"TypeString","optional":true},"backend_http_settings_id":{"type":"TypeString","computed":true},"backend_http_settings_name":{"type":"TypeString","optional":true},"http_listener_id":{"type":"TypeString","computed":true},"http_listener_name":{"type":"TypeString","required":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"priority":{"type":"TypeInt","optional":true},"redirect_configuration_id":{"type":"TypeString","computed":true},"redirect_configuration_name":{"type":"TypeString","optional":true},"rewrite_rule_set_id":{"type":"TypeString","computed":true},"rewrite_rule_set_name":{"type":"TypeString","optional":true},"rule_type":{"type":"TypeString","required":true},"url_path_map_id":{"type":"TypeString","computed":true},"url_path_map_name":{"type":"TypeString","optional":true}}},"minItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rewrite_rule_set":{"type":"TypeList","optional":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"rewrite_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"condition":{"type":"TypeList","optional":true,"elem":{"schema":{"ignore_case":{"type":"TypeBool","optional":true,"default":false},"negate":{"type":"TypeBool","optional":true,"default":false},"pattern":{"type":"TypeString","required":true},"variable":{"type":"TypeString","required":true}}}},"name":{"type":"TypeString","required":true},"request_header_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"header_name":{"type":"TypeString","required":true},"header_value":{"type":"TypeString","required":true}}}},"response_header_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"header_name":{"type":"TypeString","required":true},"header_value":{"type":"TypeString","required":true}}}},"rule_sequence":{"type":"TypeInt","required":true},"url":{"type":"TypeList","optional":true,"elem":{"schema":{"components":{"type":"TypeString","optional":true},"path":{"type":"TypeString","optional":true},"query_string":{"type":"TypeString","optional":true},"reroute":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1}}}}}}},"sku":{"type":"TypeList","required":true,"elem":{"schema":{"capacity":{"type":"TypeInt","optional":true},"name":{"type":"TypeString","required":true},"tier":{"type":"TypeString","required":true}}},"maxItems":1},"ssl_certificate":{"type":"TypeSet","optional":true,"elem":{"schema":{"data":{"type":"TypeString","optional":true},"id":{"type":"TypeString","computed":true},"key_vault_secret_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"password":{"type":"TypeString","optional":true},"public_cert_data":{"type":"TypeString","computed":true}}}},"ssl_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"cipher_suites":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"disabled_protocols":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"min_protocol_version":{"type":"TypeString","optional":true},"policy_name":{"type":"TypeString","optional":true},"policy_type":{"type":"TypeString","optional":true}}},"maxItems":1},"ssl_profile":{"type":"TypeList","optional":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"ssl_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"cipher_suites":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"disabled_protocols":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"min_protocol_version":{"type":"TypeString","optional":true},"policy_name":{"type":"TypeString","optional":true},"policy_type":{"type":"TypeString","optional":true}}},"maxItems":1},"trusted_client_certificate_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"verify_client_cert_issuer_dn":{"type":"TypeBool","optional":true,"default":false},"verify_client_certificate_revocation":{"type":"TypeString","optional":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"trusted_client_certificate":{"type":"TypeList","optional":true,"elem":{"schema":{"data":{"type":"TypeString","required":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true}}}},"trusted_root_certificate":{"type":"TypeList","optional":true,"elem":{"schema":{"data":{"type":"TypeString","optional":true},"id":{"type":"TypeString","computed":true},"key_vault_secret_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true}}}},"url_path_map":{"type":"TypeList","optional":true,"elem":{"schema":{"default_backend_address_pool_id":{"type":"TypeString","computed":true},"default_backend_address_pool_name":{"type":"TypeString","optional":true},"default_backend_http_settings_id":{"type":"TypeString","computed":true},"default_backend_http_settings_name":{"type":"TypeString","optional":true},"default_redirect_configuration_id":{"type":"TypeString","computed":true},"default_redirect_configuration_name":{"type":"TypeString","optional":true},"default_rewrite_rule_set_id":{"type":"TypeString","computed":true},"default_rewrite_rule_set_name":{"type":"TypeString","optional":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"path_rule":{"type":"TypeList","required":true,"elem":{"schema":{"backend_address_pool_id":{"type":"TypeString","computed":true},"backend_address_pool_name":{"type":"TypeString","optional":true},"backend_http_settings_id":{"type":"TypeString","computed":true},"backend_http_settings_name":{"type":"TypeString","optional":true},"firewall_policy_id":{"type":"TypeString","optional":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"paths":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"redirect_configuration_id":{"type":"TypeString","computed":true},"redirect_configuration_name":{"type":"TypeString","optional":true},"rewrite_rule_set_id":{"type":"TypeString","computed":true},"rewrite_rule_set_name":{"type":"TypeString","optional":true}}}}}}},"waf_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"disabled_rule_group":{"type":"TypeList","optional":true,"elem":{"schema":{"rule_group_name":{"type":"TypeString","required":true},"rules":{"type":"TypeList","optional":true,"elem":{"type":"TypeInt"}}}}},"enabled":{"type":"TypeBool","required":true},"exclusion":{"type":"TypeList","optional":true,"elem":{"schema":{"match_variable":{"type":"TypeString","required":true},"selector":{"type":"TypeString","optional":true},"selector_match_operator":{"type":"TypeString","optional":true}}}},"file_upload_limit_mb":{"type":"TypeInt","optional":true,"default":100},"firewall_mode":{"type":"TypeString","required":true},"max_request_body_size_kb":{"type":"TypeInt","optional":true,"default":128},"request_body_check":{"type":"TypeBool","optional":true,"default":true},"rule_set_type":{"type":"TypeString","optional":true,"default":"OWASP"},"rule_set_version":{"type":"TypeString","required":true}}},"maxItems":1},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_application_insights":{"schema":{"app_id":{"type":"TypeString","computed":true},"application_type":{"type":"TypeString","required":true,"forceNew":true},"connection_string":{"type":"TypeString","computed":true},"daily_data_cap_in_gb":{"type":"TypeFloat","optional":true,"default":100},"daily_data_cap_notifications_disabled":{"type":"TypeBool","optional":true},"disable_ip_masking":{"type":"TypeBool","optional":true,"default":false},"force_customer_storage_for_profiler":{"type":"TypeBool","optional":true,"default":false},"instrumentation_key":{"type":"TypeString","computed":true},"internet_ingestion_enabled":{"type":"TypeBool","optional":true,"default":true},"internet_query_enabled":{"type":"TypeBool","optional":true,"default":true},"local_authentication_disabled":{"type":"TypeBool","optional":true,"default":false},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_in_days":{"type":"TypeInt","optional":true,"default":90},"sampling_percentage":{"type":"TypeFloat","optional":true,"default":100},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","optional":true}},"timeouts":{"create":60,"read":5,"delete":30,"update":30}},"azurerm_application_insights_analytics_item":{"schema":{"application_insights_id":{"type":"TypeString","required":true,"forceNew":true},"content":{"type":"TypeString","required":true},"function_alias":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"scope":{"type":"TypeString","required":true,"forceNew":true},"time_created":{"type":"TypeString","computed":true},"time_modified":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_application_insights_api_key":{"schema":{"api_key":{"type":"TypeString","computed":true},"application_insights_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"read_permissions":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"write_permissions":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_application_insights_smart_detection_rule":{"schema":{"additional_email_recipients":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"application_insights_id":{"type":"TypeString","required":true,"forceNew":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true,"forceNew":true},"send_emails_to_subscription_owners":{"type":"TypeBool","optional":true,"default":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_application_insights_standard_web_test":{"schema":{"application_insights_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true},"frequency":{"type":"TypeInt","optional":true,"default":300},"geo_locations":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"request":{"type":"TypeList","required":true,"elem":{"schema":{"body":{"type":"TypeString","optional":true},"follow_redirects_enabled":{"type":"TypeBool","optional":true,"default":true},"header":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"http_verb":{"type":"TypeString","optional":true,"default":"GET"},"parse_dependent_requests_enabled":{"type":"TypeBool","optional":true,"default":true},"url":{"type":"TypeString","required":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retry_enabled":{"type":"TypeBool","optional":true},"synthetic_monitor_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"timeout":{"type":"TypeInt","optional":true,"default":30},"validation_rules":{"type":"TypeList","optional":true,"elem":{"schema":{"content":{"type":"TypeList","optional":true,"elem":{"schema":{"content_match":{"type":"TypeString","required":true},"ignore_case":{"type":"TypeBool","optional":true,"default":false},"pass_if_text_found":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"expected_status_code":{"type":"TypeInt","optional":true,"default":200},"ssl_cert_remaining_lifetime":{"type":"TypeInt","optional":true},"ssl_check_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_application_insights_web_test":{"schema":{"application_insights_id":{"type":"TypeString","required":true,"forceNew":true},"configuration":{"type":"TypeString","required":true},"description":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true},"frequency":{"type":"TypeInt","optional":true,"default":300},"geo_locations":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"kind":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retry_enabled":{"type":"TypeBool","optional":true},"synthetic_monitor_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"timeout":{"type":"TypeInt","optional":true,"default":30}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_application_insights_workbook":{"schema":{"category":{"type":"TypeString","optional":true,"default":"workbook"},"data_json":{"type":"TypeString","required":true},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"identity":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source_id":{"type":"TypeString","optional":true,"default":"azure monitor"},"storage_container_id":{"type":"TypeString","optional":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_application_insights_workbook_template":{"schema":{"author":{"type":"TypeString","optional":true},"galleries":{"type":"TypeList","required":true,"elem":{"schema":{"category":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"order":{"type":"TypeInt","optional":true,"default":0},"resource_type":{"type":"TypeString","optional":true,"default":"Azure Monitor"},"type":{"type":"TypeString","optional":true,"default":"workbook"}}},"minItems":1},"localized":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","optional":true,"default":0},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"template_data":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_application_load_balancer":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_configuration_endpoint":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_application_load_balancer_frontend":{"schema":{"application_load_balancer_id":{"type":"TypeString","required":true,"forceNew":true},"fully_qualified_domain_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_application_load_balancer_subnet_association":{"schema":{"application_load_balancer_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_application_security_group":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_arc_kubernetes_cluster":{"schema":{"agent_public_key_certificate":{"type":"TypeString","required":true,"forceNew":true},"agent_version":{"type":"TypeString","computed":true},"distribution":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"infrastructure":{"type":"TypeString","computed":true},"kubernetes_version":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"offering":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"total_core_count":{"type":"TypeInt","computed":true},"total_node_count":{"type":"TypeInt","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_arc_kubernetes_cluster_extension":{"schema":{"cluster_id":{"type":"TypeString","required":true,"forceNew":true},"configuration_protected_settings":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"configuration_settings":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"current_version":{"type":"TypeString","computed":true},"extension_type":{"type":"TypeString","required":true,"forceNew":true},"identity":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"release_namespace":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"release_train":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"target_namespace":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"version":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_arc_kubernetes_flux_configuration":{"schema":{"blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"account_key":{"type":"TypeString","optional":true},"container_id":{"type":"TypeString","required":true},"local_auth_reference":{"type":"TypeString","optional":true},"sas_token":{"type":"TypeString","optional":true},"service_principal":{"type":"TypeList","optional":true,"elem":{"schema":{"client_certificate_base64":{"type":"TypeString","optional":true},"client_certificate_password":{"type":"TypeString","optional":true},"client_certificate_send_chain":{"type":"TypeBool","optional":true,"default":false},"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","optional":true},"tenant_id":{"type":"TypeString","required":true}}},"maxItems":1},"sync_interval_in_seconds":{"type":"TypeInt","optional":true,"default":600},"timeout_in_seconds":{"type":"TypeInt","optional":true,"default":600}}},"maxItems":1},"bucket":{"type":"TypeList","optional":true,"elem":{"schema":{"access_key":{"type":"TypeString","optional":true},"bucket_name":{"type":"TypeString","required":true},"local_auth_reference":{"type":"TypeString","optional":true},"secret_key_base64":{"type":"TypeString","optional":true},"sync_interval_in_seconds":{"type":"TypeInt","optional":true,"default":600},"timeout_in_seconds":{"type":"TypeInt","optional":true,"default":600},"tls_enabled":{"type":"TypeBool","optional":true,"default":true},"url":{"type":"TypeString","required":true}}},"maxItems":1},"cluster_id":{"type":"TypeString","required":true,"forceNew":true},"continuous_reconciliation_enabled":{"type":"TypeBool","optional":true,"default":true},"git_repository":{"type":"TypeList","optional":true,"elem":{"schema":{"https_ca_cert_base64":{"type":"TypeString","optional":true},"https_key_base64":{"type":"TypeString","optional":true},"https_user":{"type":"TypeString","optional":true},"local_auth_reference":{"type":"TypeString","optional":true},"reference_type":{"type":"TypeString","required":true},"reference_value":{"type":"TypeString","required":true},"ssh_known_hosts_base64":{"type":"TypeString","optional":true},"ssh_private_key_base64":{"type":"TypeString","optional":true},"sync_interval_in_seconds":{"type":"TypeInt","optional":true,"default":600},"timeout_in_seconds":{"type":"TypeInt","optional":true,"default":600},"url":{"type":"TypeString","required":true}}},"maxItems":1},"kustomizations":{"type":"TypeSet","required":true,"elem":{"schema":{"depends_on":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"garbage_collection_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true},"recreating_enabled":{"type":"TypeBool","optional":true,"default":false},"retry_interval_in_seconds":{"type":"TypeInt","optional":true,"default":600},"sync_interval_in_seconds":{"type":"TypeInt","optional":true,"default":600},"timeout_in_seconds":{"type":"TypeInt","optional":true,"default":600}}},"minItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace":{"type":"TypeString","required":true,"forceNew":true},"scope":{"type":"TypeString","optional":true,"default":"namespace","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_arc_machine_extension":{"schema":{"arc_machine_id":{"type":"TypeString","required":true,"forceNew":true},"automatic_upgrade_enabled":{"type":"TypeBool","optional":true,"default":true},"force_update_tag":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"protected_settings":{"type":"TypeString","optional":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"settings":{"type":"TypeString","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true,"forceNew":true},"type_handler_version":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_arc_private_link_scope":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":false},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_arc_resource_bridge_appliance":{"schema":{"distro":{"type":"TypeString","required":true},"identity":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"infrastructure_provider":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_key_base64":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":30,"update":30}},"azurerm_attestation_provider":{"schema":{"attestation_uri":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"open_enclave_policy_base64":{"type":"TypeString","optional":true},"policy_signing_certificate_data":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sev_snp_policy_base64":{"type":"TypeString","optional":true},"sgx_enclave_policy_base64":{"type":"TypeString","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tpm_policy_base64":{"type":"TypeString","optional":true},"trust_model":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automanage_configuration":{"schema":{"antimalware":{"type":"TypeList","optional":true,"elem":{"schema":{"exclusions":{"type":"TypeList","optional":true,"elem":{"schema":{"extensions":{"type":"TypeString","optional":true},"paths":{"type":"TypeString","optional":true},"processes":{"type":"TypeString","optional":true}}},"maxItems":1},"real_time_protection_enabled":{"type":"TypeBool","optional":true,"default":false},"scheduled_scan_day":{"type":"TypeInt","optional":true,"default":8},"scheduled_scan_enabled":{"type":"TypeBool","optional":true,"default":false},"scheduled_scan_time_in_minutes":{"type":"TypeInt","optional":true,"default":0},"scheduled_scan_type":{"type":"TypeString","optional":true,"default":"Quick"}}},"maxItems":1},"automation_account_enabled":{"type":"TypeBool","optional":true,"default":false},"azure_security_baseline":{"type":"TypeList","optional":true,"elem":{"schema":{"assignment_type":{"type":"TypeString","optional":true,"default":"ApplyAndAutoCorrect"}}},"maxItems":1},"backup":{"type":"TypeList","optional":true,"elem":{"schema":{"instant_rp_retention_range_in_days":{"type":"TypeInt","optional":true,"default":5},"policy_name":{"type":"TypeString","optional":true},"retention_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"daily_schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_duration":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","optional":true},"duration_type":{"type":"TypeString","optional":true,"default":"Days"}}},"maxItems":1},"retention_times":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"retention_policy_type":{"type":"TypeString","optional":true,"default":"LongTermRetentionPolicy"},"weekly_schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_duration":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","optional":true},"duration_type":{"type":"TypeString","optional":true,"default":"Weeks"}}},"maxItems":1},"retention_times":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}},"maxItems":1},"schedule_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"schedule_policy_type":{"type":"TypeString","optional":true,"default":"SimpleSchedulePolicy"},"schedule_run_days":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"schedule_run_frequency":{"type":"TypeString","optional":true,"default":"Daily"},"schedule_run_times":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"time_zone":{"type":"TypeString","optional":true,"default":"UTC"}}},"maxItems":1},"boot_diagnostics_enabled":{"type":"TypeBool","optional":true,"default":false},"defender_for_cloud_enabled":{"type":"TypeBool","optional":true,"default":false},"guest_configuration_enabled":{"type":"TypeBool","optional":true,"default":false},"location":{"type":"TypeString","required":true,"forceNew":true},"log_analytics_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"status_change_alert_enabled":{"type":"TypeBool","optional":true,"default":false},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_account":{"schema":{"dsc_primary_access_key":{"type":"TypeString","computed":true},"dsc_secondary_access_key":{"type":"TypeString","computed":true},"dsc_server_endpoint":{"type":"TypeString","computed":true},"encryption":{"type":"TypeList","optional":true,"elem":{"schema":{"key_source":{"type":"TypeString","optional":true},"key_vault_key_id":{"type":"TypeString","required":true},"user_assigned_identity_id":{"type":"TypeString","optional":true}}}},"hybrid_service_url":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"local_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_endpoint_connection":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_certificate":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"base64":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"exportable":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"thumbprint":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_connection":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"type":{"type":"TypeString","required":true,"forceNew":true},"values":{"type":"TypeMap","required":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_connection_certificate":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"automation_certificate_name":{"type":"TypeString","required":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subscription_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_connection_classic_certificate":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"certificate_asset_name":{"type":"TypeString","required":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subscription_id":{"type":"TypeString","required":true},"subscription_name":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_connection_service_principal":{"schema":{"application_id":{"type":"TypeString","required":true},"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"certificate_thumbprint":{"type":"TypeString","required":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subscription_id":{"type":"TypeString","required":true},"tenant_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_connection_type":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"field":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"is_encrypted":{"type":"TypeBool","optional":true},"is_optional":{"type":"TypeBool","optional":true},"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"is_global":{"type":"TypeBool","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":10}},"azurerm_automation_credential":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_dsc_configuration":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"content_embedded":{"type":"TypeString","required":true},"description":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"log_verbose":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"state":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_dsc_nodeconfiguration":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"configuration_name":{"type":"TypeString","computed":true},"content_embedded":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_hybrid_runbook_worker":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"ip":{"type":"TypeString","computed":true},"last_seen_date_time":{"type":"TypeString","computed":true},"registration_date_time":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"vm_resource_id":{"type":"TypeString","required":true,"forceNew":true},"worker_group_name":{"type":"TypeString","required":true,"forceNew":true},"worker_id":{"type":"TypeString","required":true,"forceNew":true},"worker_name":{"type":"TypeString","computed":true},"worker_type":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":10}},"azurerm_automation_hybrid_runbook_worker_group":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"credential_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":10,"update":10}},"azurerm_automation_job_schedule":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"job_schedule_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"resource_manager_id":{"type":"TypeString","computed":true},"run_on":{"type":"TypeString","optional":true,"forceNew":true},"runbook_name":{"type":"TypeString","required":true,"forceNew":true},"schedule_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_automation_module":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"module_link":{"type":"TypeList","required":true,"elem":{"schema":{"hash":{"type":"TypeList","optional":true,"elem":{"schema":{"algorithm":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}},"maxItems":1},"uri":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_powershell72_module":{"schema":{"automation_account_id":{"type":"TypeString","required":true,"forceNew":true},"module_link":{"type":"TypeList","required":true,"elem":{"schema":{"hash":{"type":"TypeList","optional":true,"elem":{"schema":{"algorithm":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}},"maxItems":1},"uri":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_python3_package":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"content_uri":{"type":"TypeString","required":true,"forceNew":true},"content_version":{"type":"TypeString","optional":true,"forceNew":true},"hash_algorithm":{"type":"TypeString","optional":true,"forceNew":true},"hash_value":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":10,"update":10}},"azurerm_automation_runbook":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"content":{"type":"TypeString","optional":true,"computed":true},"description":{"type":"TypeString","optional":true},"draft":{"type":"TypeList","optional":true,"elem":{"schema":{"content_link":{"type":"TypeList","optional":true,"elem":{"schema":{"hash":{"type":"TypeList","optional":true,"elem":{"schema":{"algorithm":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}},"maxItems":1},"uri":{"type":"TypeString","required":true},"version":{"type":"TypeString","optional":true}}},"maxItems":1},"creation_time":{"type":"TypeString","computed":true},"edit_mode_enabled":{"type":"TypeBool","optional":true},"last_modified_time":{"type":"TypeString","computed":true},"output_types":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"parameters":{"type":"TypeList","optional":true,"elem":{"schema":{"default_value":{"type":"TypeString","optional":true},"key":{"type":"TypeString","required":true},"mandatory":{"type":"TypeBool","optional":true,"default":false},"position":{"type":"TypeInt","optional":true},"type":{"type":"TypeString","required":true}}}}}},"maxItems":1},"job_schedule":{"type":"TypeSet","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"job_schedule_id":{"type":"TypeString","computed":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"run_on":{"type":"TypeString","optional":true},"schedule_name":{"type":"TypeString","required":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"log_activity_trace_level":{"type":"TypeInt","optional":true},"log_progress":{"type":"TypeBool","required":true},"log_verbose":{"type":"TypeBool","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"publish_content_link":{"type":"TypeList","optional":true,"elem":{"schema":{"hash":{"type":"TypeList","optional":true,"elem":{"schema":{"algorithm":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}},"maxItems":1},"uri":{"type":"TypeString","required":true},"version":{"type":"TypeString","optional":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"runbook_type":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_schedule":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"expiry_time":{"type":"TypeString","optional":true,"computed":true},"frequency":{"type":"TypeString","required":true},"interval":{"type":"TypeInt","optional":true,"computed":true},"month_days":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"monthly_occurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"day":{"type":"TypeString","required":true},"occurrence":{"type":"TypeInt","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"start_time":{"type":"TypeString","optional":true,"computed":true},"timezone":{"type":"TypeString","optional":true,"default":"Etc/UTC"},"week_days":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_software_update_configuration":{"schema":{"automation_account_id":{"type":"TypeString","required":true,"forceNew":true},"duration":{"type":"TypeString","optional":true,"default":"PT2H"},"error_code":{"type":"TypeString","computed":true},"error_message":{"type":"TypeString","computed":true},"linux":{"type":"TypeList","optional":true,"elem":{"schema":{"classifications_included":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"excluded_packages":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"included_packages":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"reboot":{"type":"TypeString","optional":true,"default":"IfRequired"}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"non_azure_computer_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"post_task":{"type":"TypeList","optional":true,"elem":{"schema":{"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"source":{"type":"TypeString","optional":true}}},"maxItems":1},"pre_task":{"type":"TypeList","optional":true,"elem":{"schema":{"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"source":{"type":"TypeString","optional":true}}},"maxItems":1},"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"advanced_month_days":{"type":"TypeList","optional":true,"elem":{"type":"TypeInt"}},"advanced_week_days":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"creation_time":{"type":"TypeString","computed":true},"description":{"type":"TypeString","optional":true},"expiry_time":{"type":"TypeString","optional":true,"computed":true},"expiry_time_offset_minutes":{"type":"TypeFloat","optional":true},"frequency":{"type":"TypeString","required":true},"interval":{"type":"TypeInt","optional":true},"is_enabled":{"type":"TypeBool","optional":true,"default":true},"last_modified_time":{"type":"TypeString","computed":true},"monthly_occurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"day":{"type":"TypeString","required":true},"occurrence":{"type":"TypeInt","required":true}}},"maxItems":1},"next_run":{"type":"TypeString","optional":true,"computed":true},"next_run_offset_minutes":{"type":"TypeFloat","optional":true},"start_time":{"type":"TypeString","optional":true,"computed":true},"start_time_offset_minutes":{"type":"TypeFloat","optional":true},"time_zone":{"type":"TypeString","optional":true,"default":"Etc/UTC"}}},"maxItems":1},"target":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_query":{"type":"TypeList","optional":true,"elem":{"schema":{"locations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"scope":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"tag_filter":{"type":"TypeString","optional":true},"tags":{"type":"TypeList","optional":true,"elem":{"schema":{"tag":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}}}}},"non_azure_query":{"type":"TypeList","optional":true,"elem":{"schema":{"function_alias":{"type":"TypeString","optional":true},"workspace_id":{"type":"TypeString","optional":true}}}}}},"maxItems":1},"virtual_machine_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"windows":{"type":"TypeList","optional":true,"elem":{"schema":{"classifications_included":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"excluded_knowledge_base_numbers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"included_knowledge_base_numbers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"reboot":{"type":"TypeString","optional":true,"default":"IfRequired"}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":10,"update":30}},"azurerm_automation_source_control":{"schema":{"automatic_sync":{"type":"TypeBool","optional":true,"default":false},"automation_account_id":{"type":"TypeString","required":true,"forceNew":true},"branch":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"folder_path":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"publish_runbook_enabled":{"type":"TypeBool","optional":true,"default":true},"repository_url":{"type":"TypeString","required":true},"security":{"type":"TypeList","required":true,"elem":{"schema":{"refresh_token":{"type":"TypeString","optional":true},"token":{"type":"TypeString","required":true},"token_type":{"type":"TypeString","required":true}}},"maxItems":1,"minItems":1},"source_control_type":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":10,"update":10}},"azurerm_automation_variable_bool":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"encrypted":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeBool","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_variable_datetime":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"encrypted":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_variable_int":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"encrypted":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeInt","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_variable_object":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"encrypted":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_variable_string":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"encrypted":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_watcher":{"schema":{"automation_account_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"etag":{"type":"TypeString","optional":true},"execution_frequency_in_seconds":{"type":"TypeInt","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"script_name":{"type":"TypeString","required":true,"forceNew":true},"script_parameters":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"script_run_on":{"type":"TypeString","required":true},"status":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":10,"update":10}},"azurerm_automation_webhook":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"expiry_time":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"run_on_worker_group":{"type":"TypeString","optional":true},"runbook_name":{"type":"TypeString","required":true},"uri":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_availability_set":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"managed":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"platform_fault_domain_count":{"type":"TypeInt","optional":true,"default":3,"forceNew":true},"platform_update_domain_count":{"type":"TypeInt","optional":true,"default":5,"forceNew":true},"proximity_placement_group_id":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_backup_container_storage_account":{"schema":{"recovery_vault_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_backup_policy_file_share":{"schema":{"backup":{"type":"TypeList","required":true,"elem":{"schema":{"frequency":{"type":"TypeString","required":true},"hourly":{"type":"TypeList","optional":true,"elem":{"schema":{"interval":{"type":"TypeInt","required":true},"start_time":{"type":"TypeString","required":true},"window_duration":{"type":"TypeInt","required":true}}},"maxItems":1},"time":{"type":"TypeString","optional":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"recovery_vault_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_daily":{"type":"TypeList","required":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true}}},"maxItems":1},"retention_monthly":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"days":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"include_last_days":{"type":"TypeBool","optional":true,"default":false},"weekdays":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"weeks":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"retention_weekly":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"weekdays":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"retention_yearly":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"days":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"include_last_days":{"type":"TypeBool","optional":true,"default":false},"months":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"weekdays":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"weeks":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"timezone":{"type":"TypeString","optional":true,"default":"UTC"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_backup_policy_vm":{"schema":{"backup":{"type":"TypeList","required":true,"elem":{"schema":{"frequency":{"type":"TypeString","required":true},"hour_duration":{"type":"TypeInt","optional":true},"hour_interval":{"type":"TypeInt","optional":true},"time":{"type":"TypeString","required":true},"weekdays":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"instant_restore_resource_group":{"type":"TypeList","optional":true,"elem":{"schema":{"prefix":{"type":"TypeString","required":true},"suffix":{"type":"TypeString","optional":true}}},"maxItems":1},"instant_restore_retention_days":{"type":"TypeInt","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"policy_type":{"type":"TypeString","optional":true,"default":"V1","forceNew":true},"recovery_vault_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_daily":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true}}},"maxItems":1},"retention_monthly":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"days":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"include_last_days":{"type":"TypeBool","optional":true,"default":false},"weekdays":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"weeks":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"retention_weekly":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"weekdays":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"retention_yearly":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"days":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"include_last_days":{"type":"TypeBool","optional":true,"default":false},"months":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"weekdays":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"weeks":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"tiering_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"archived_restore_point":{"type":"TypeList","required":true,"elem":{"schema":{"duration":{"type":"TypeInt","optional":true},"duration_type":{"type":"TypeString","optional":true},"mode":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"timezone":{"type":"TypeString","optional":true,"default":"UTC"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_backup_policy_vm_workload":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"protection_policy":{"type":"TypeSet","required":true,"elem":{"schema":{"backup":{"type":"TypeList","required":true,"elem":{"schema":{"frequency":{"type":"TypeString","optional":true},"frequency_in_minutes":{"type":"TypeInt","optional":true},"time":{"type":"TypeString","optional":true},"weekdays":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"policy_type":{"type":"TypeString","required":true},"retention_daily":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true}}},"maxItems":1},"retention_monthly":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"format_type":{"type":"TypeString","required":true},"monthdays":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"weekdays":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"weeks":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"retention_weekly":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"weekdays":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"retention_yearly":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"format_type":{"type":"TypeString","required":true},"monthdays":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"months":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"weekdays":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"weeks":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"simple_retention":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true}}},"maxItems":1}}}},"recovery_vault_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"settings":{"type":"TypeList","required":true,"elem":{"schema":{"compression_enabled":{"type":"TypeBool","optional":true,"default":false},"time_zone":{"type":"TypeString","required":true}}},"maxItems":1},"workload_type":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_backup_protected_file_share":{"schema":{"backup_policy_id":{"type":"TypeString","required":true},"recovery_vault_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source_file_share_name":{"type":"TypeString","required":true,"forceNew":true},"source_storage_account_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":80,"read":5,"delete":80,"update":80}},"azurerm_backup_protected_vm":{"schema":{"backup_policy_id":{"type":"TypeString","optional":true},"exclude_disk_luns":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"include_disk_luns":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"protection_state":{"type":"TypeString","optional":true,"computed":true},"recovery_vault_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source_vm_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":120,"read":5,"delete":80,"update":120}},"azurerm_bastion_host":{"schema":{"copy_paste_enabled":{"type":"TypeBool","optional":true,"default":true},"dns_name":{"type":"TypeString","computed":true},"file_copy_enabled":{"type":"TypeBool","optional":true,"default":false},"ip_configuration":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"public_ip_address_id":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"ip_connect_enabled":{"type":"TypeBool","optional":true,"default":false},"kerberos_enabled":{"type":"TypeBool","optional":true,"default":false},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scale_units":{"type":"TypeInt","optional":true,"default":2},"shareable_link_enabled":{"type":"TypeBool","optional":true,"default":false},"sku":{"type":"TypeString","optional":true,"default":"Basic"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tunneling_enabled":{"type":"TypeBool","optional":true,"default":false},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_batch_account":{"schema":{"account_endpoint":{"type":"TypeString","computed":true},"allowed_authentication_modes":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"encryption":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"key_vault_key_id":{"type":"TypeString","required":true}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_reference":{"type":"TypeList","optional":true,"elem":{"schema":{"id":{"type":"TypeString","required":true},"url":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_profile":{"type":"TypeList","optional":true,"elem":{"schema":{"account_access":{"type":"TypeList","optional":true,"elem":{"schema":{"default_action":{"type":"TypeString","optional":true,"default":"Deny"},"ip_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"ip_range":{"type":"TypeString","required":true}}}}}},"maxItems":1},"node_management_access":{"type":"TypeList","optional":true,"elem":{"schema":{"default_action":{"type":"TypeString","optional":true,"default":"Deny"},"ip_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"ip_range":{"type":"TypeString","required":true}}}}}},"maxItems":1}}},"maxItems":1},"pool_allocation_mode":{"type":"TypeString","optional":true,"default":"BatchService"},"primary_access_key":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_access_key":{"type":"TypeString","computed":true},"storage_account_authentication_mode":{"type":"TypeString","optional":true},"storage_account_id":{"type":"TypeString","optional":true},"storage_account_node_identity":{"type":"TypeString","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_batch_application":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"allow_updates":{"type":"TypeBool","optional":true,"default":true},"default_version":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_batch_certificate":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"certificate":{"type":"TypeString","required":true},"format":{"type":"TypeString","required":true},"name":{"type":"TypeString","computed":true},"password":{"type":"TypeString","optional":true},"public_data":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"thumbprint":{"type":"TypeString","required":true,"forceNew":true},"thumbprint_algorithm":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_batch_job":{"schema":{"batch_pool_id":{"type":"TypeString","required":true,"forceNew":true},"common_environment_properties":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"display_name":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","optional":true,"default":0},"task_retry_maximum":{"type":"TypeInt","optional":true}},"timeouts":{"create":5,"read":5,"delete":5,"update":5}},"azurerm_batch_pool":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"auto_scale":{"type":"TypeList","optional":true,"elem":{"schema":{"evaluation_interval":{"type":"TypeString","optional":true,"default":"PT15M"},"formula":{"type":"TypeString","required":true}}},"maxItems":1},"certificate":{"type":"TypeList","optional":true,"elem":{"schema":{"id":{"type":"TypeString","required":true},"store_location":{"type":"TypeString","required":true},"store_name":{"type":"TypeString","optional":true},"visibility":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"container_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"container_image_names":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"container_registries":{"type":"TypeList","configMode":"Auto","optional":true,"forceNew":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"registry_server":{"type":"TypeString","required":true,"forceNew":true},"user_assigned_identity_id":{"type":"TypeString","optional":true,"description":"The User Assigned Identity to use for Container Registry access.","forceNew":true},"user_name":{"type":"TypeString","optional":true,"forceNew":true}}}},"type":{"type":"TypeString","optional":true}}},"maxItems":1,"minItems":1},"data_disks":{"type":"TypeList","optional":true,"elem":{"schema":{"caching":{"type":"TypeString","optional":true,"default":"ReadOnly"},"disk_size_gb":{"type":"TypeInt","required":true},"lun":{"type":"TypeInt","required":true},"storage_account_type":{"type":"TypeString","optional":true,"default":"Standard_LRS"}}}},"disk_encryption":{"type":"TypeList","optional":true,"elem":{"schema":{"disk_encryption_target":{"type":"TypeString","required":true}}}},"display_name":{"type":"TypeString","optional":true,"forceNew":true},"extensions":{"type":"TypeList","optional":true,"elem":{"schema":{"auto_upgrade_minor_version":{"type":"TypeBool","optional":true},"automatic_upgrade_enabled":{"type":"TypeBool","optional":true},"name":{"type":"TypeString","required":true},"protected_settings":{"type":"TypeString","optional":true},"provision_after_extensions":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"publisher":{"type":"TypeString","required":true},"settings_json":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"type_handler_version":{"type":"TypeString","optional":true}}}},"fixed_scale":{"type":"TypeList","optional":true,"elem":{"schema":{"node_deallocation_method":{"type":"TypeString","optional":true},"resize_timeout":{"type":"TypeString","optional":true,"default":"PT15M"},"target_dedicated_nodes":{"type":"TypeInt","optional":true,"default":1},"target_low_priority_nodes":{"type":"TypeInt","optional":true,"default":0}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true}}},"maxItems":1},"inter_node_communication":{"type":"TypeString","optional":true,"default":"Enabled"},"license_type":{"type":"TypeString","optional":true},"max_tasks_per_node":{"type":"TypeInt","optional":true,"default":1,"forceNew":true},"metadata":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"mount":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_blob_file_system":{"type":"TypeList","optional":true,"elem":{"schema":{"account_key":{"type":"TypeString","optional":true},"account_name":{"type":"TypeString","required":true},"blobfuse_options":{"type":"TypeString","optional":true},"container_name":{"type":"TypeString","required":true},"identity_id":{"type":"TypeString","optional":true},"relative_mount_path":{"type":"TypeString","required":true},"sas_key":{"type":"TypeString","optional":true}}},"maxItems":1},"azure_file_share":{"type":"TypeList","optional":true,"elem":{"schema":{"account_key":{"type":"TypeString","required":true},"account_name":{"type":"TypeString","required":true},"azure_file_url":{"type":"TypeString","required":true},"mount_options":{"type":"TypeString","optional":true},"relative_mount_path":{"type":"TypeString","required":true}}}},"cifs_mount":{"type":"TypeList","optional":true,"elem":{"schema":{"mount_options":{"type":"TypeString","optional":true},"password":{"type":"TypeString","required":true},"relative_mount_path":{"type":"TypeString","required":true},"source":{"type":"TypeString","required":true},"user_name":{"type":"TypeString","required":true}}}},"nfs_mount":{"type":"TypeList","optional":true,"elem":{"schema":{"mount_options":{"type":"TypeString","optional":true},"relative_mount_path":{"type":"TypeString","required":true},"source":{"type":"TypeString","required":true}}}}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"network_configuration":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"accelerated_networking_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"dynamic_vnet_assignment_scope":{"type":"TypeString","optional":true,"default":"none","forceNew":true},"endpoint_configuration":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"backend_port":{"type":"TypeInt","required":true,"forceNew":true},"frontend_port_range":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_security_group_rules":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"access":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","required":true,"forceNew":true},"source_address_prefix":{"type":"TypeString","required":true,"forceNew":true},"source_port_ranges":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"type":"TypeString","default":"*"}}}}},"protocol":{"type":"TypeString","required":true,"forceNew":true}}}},"public_address_provisioning_type":{"type":"TypeString","optional":true},"public_ips":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"node_agent_sku_id":{"type":"TypeString","required":true,"forceNew":true},"node_placement":{"type":"TypeList","optional":true,"elem":{"schema":{"policy":{"type":"TypeString","optional":true,"default":"Regional"}}}},"os_disk_placement":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"start_task":{"type":"TypeList","optional":true,"elem":{"schema":{"command_line":{"type":"TypeString","required":true},"common_environment_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"container":{"type":"TypeList","optional":true,"elem":{"schema":{"image_name":{"type":"TypeString","required":true},"registry":{"type":"TypeList","optional":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"registry_server":{"type":"TypeString","required":true,"forceNew":true},"user_assigned_identity_id":{"type":"TypeString","optional":true,"description":"The User Assigned Identity to use for Container Registry access.","forceNew":true},"user_name":{"type":"TypeString","optional":true,"forceNew":true}}}},"run_options":{"type":"TypeString","optional":true},"working_directory":{"type":"TypeString","optional":true}}}},"resource_file":{"type":"TypeList","optional":true,"elem":{"schema":{"auto_storage_container_name":{"type":"TypeString","optional":true},"blob_prefix":{"type":"TypeString","optional":true},"file_mode":{"type":"TypeString","optional":true},"file_path":{"type":"TypeString","optional":true},"http_url":{"type":"TypeString","optional":true},"storage_container_url":{"type":"TypeString","optional":true},"user_assigned_identity_id":{"type":"TypeString","optional":true}}}},"task_retry_maximum":{"type":"TypeInt","optional":true},"user_identity":{"type":"TypeList","required":true,"elem":{"schema":{"auto_user":{"type":"TypeList","optional":true,"elem":{"schema":{"elevation_level":{"type":"TypeString","optional":true,"default":"NonAdmin"},"scope":{"type":"TypeString","optional":true,"default":"Task"}}},"maxItems":1},"user_name":{"type":"TypeString","optional":true}}},"maxItems":1},"wait_for_success":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"stop_pending_resize_operation":{"type":"TypeBool","optional":true,"default":false},"storage_image_reference":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"id":{"type":"TypeString","optional":true,"forceNew":true},"offer":{"type":"TypeString","optional":true,"forceNew":true},"publisher":{"type":"TypeString","optional":true,"forceNew":true},"sku":{"type":"TypeString","optional":true,"forceNew":true},"version":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"target_node_communication_mode":{"type":"TypeString","optional":true},"task_scheduling_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"node_fill_type":{"type":"TypeString","optional":true,"computed":true}}}},"user_accounts":{"type":"TypeList","optional":true,"elem":{"schema":{"elevation_level":{"type":"TypeString","required":true},"linux_user_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"gid":{"type":"TypeInt","optional":true},"ssh_private_key":{"type":"TypeString","optional":true},"uid":{"type":"TypeInt","optional":true}}}},"name":{"type":"TypeString","required":true},"password":{"type":"TypeString","required":true},"windows_user_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"login_mode":{"type":"TypeString","required":true}}}}}}},"vm_size":{"type":"TypeString","required":true,"forceNew":true},"windows":{"type":"TypeList","optional":true,"elem":{"schema":{"enable_automatic_updates":{"type":"TypeBool","optional":true,"default":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_billing_account_cost_management_export":{"schema":{"active":{"type":"TypeBool","optional":true,"default":true},"billing_account_id":{"type":"TypeString","required":true,"forceNew":true},"export_data_options":{"type":"TypeList","required":true,"elem":{"schema":{"time_frame":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"export_data_storage_location":{"type":"TypeList","required":true,"elem":{"schema":{"container_id":{"type":"TypeString","required":true,"forceNew":true},"root_folder_path":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"recurrence_period_end_date":{"type":"TypeString","required":true},"recurrence_period_start_date":{"type":"TypeString","required":true},"recurrence_type":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_blueprint_assignment":{"schema":{"blueprint_name":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","required":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"lock_exclude_actions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":200},"lock_exclude_principals":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":5},"lock_mode":{"type":"TypeString","optional":true,"default":"None"},"name":{"type":"TypeString","required":true,"forceNew":true},"parameter_values":{"type":"TypeString","optional":true},"resource_groups":{"type":"TypeString","optional":true},"target_subscription_id":{"type":"TypeString","required":true,"forceNew":true},"type":{"type":"TypeString","computed":true},"version_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":5,"update":30}},"azurerm_bot_channel_alexa":{"schema":{"bot_name":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"skill_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_channel_direct_line_speech":{"schema":{"bot_name":{"type":"TypeString","required":true,"forceNew":true},"cognitive_account_id":{"type":"TypeString","optional":true},"cognitive_service_access_key":{"type":"TypeString","required":true},"cognitive_service_location":{"type":"TypeString","required":true},"custom_speech_model_id":{"type":"TypeString","optional":true},"custom_voice_deployment_id":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_channel_directline":{"schema":{"bot_name":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"site":{"type":"TypeSet","required":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"endpoint_parameters_enabled":{"type":"TypeBool","optional":true},"enhanced_authentication_enabled":{"type":"TypeBool","optional":true,"default":false},"id":{"type":"TypeString","computed":true},"key":{"type":"TypeString","computed":true},"key2":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"storage_enabled":{"type":"TypeBool","optional":true,"default":true},"trusted_origins":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"user_upload_enabled":{"type":"TypeBool","optional":true,"default":true},"v1_allowed":{"type":"TypeBool","optional":true,"default":true},"v3_allowed":{"type":"TypeBool","optional":true,"default":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_channel_email":{"schema":{"bot_name":{"type":"TypeString","required":true,"forceNew":true},"email_address":{"type":"TypeString","required":true},"email_password":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"magic_code":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_channel_facebook":{"schema":{"bot_name":{"type":"TypeString","required":true,"forceNew":true},"facebook_application_id":{"type":"TypeString","required":true},"facebook_application_secret":{"type":"TypeString","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"page":{"type":"TypeSet","required":true,"elem":{"schema":{"access_token":{"type":"TypeString","required":true},"id":{"type":"TypeString","required":true}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_channel_line":{"schema":{"bot_name":{"type":"TypeString","required":true,"forceNew":true},"line_channel":{"type":"TypeSet","required":true,"elem":{"schema":{"access_token":{"type":"TypeString","required":true},"secret":{"type":"TypeString","required":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_channel_ms_teams":{"schema":{"bot_name":{"type":"TypeString","required":true,"forceNew":true},"calling_web_hook":{"type":"TypeString","optional":true,"computed":true},"deployment_environment":{"type":"TypeString","optional":true,"default":"CommercialDeployment"},"enable_calling":{"type":"TypeBool","optional":true,"default":false},"location":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_channel_slack":{"schema":{"bot_name":{"type":"TypeString","required":true,"forceNew":true},"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"landing_page_url":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"signing_secret":{"type":"TypeString","optional":true},"verification_token":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_channel_sms":{"schema":{"bot_name":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"phone_number":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sms_channel_account_security_id":{"type":"TypeString","required":true},"sms_channel_auth_token":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_channel_web_chat":{"schema":{"bot_name":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"site":{"type":"TypeSet","optional":true,"elem":{"schema":{"endpoint_parameters_enabled":{"type":"TypeBool","optional":true},"name":{"type":"TypeString","required":true},"storage_enabled":{"type":"TypeBool","optional":true,"default":true},"user_upload_enabled":{"type":"TypeBool","optional":true,"default":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_channels_registration":{"schema":{"cmk_key_vault_url":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"developer_app_insights_api_key":{"type":"TypeString","optional":true},"developer_app_insights_application_id":{"type":"TypeString","optional":true},"developer_app_insights_key":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true,"computed":true},"endpoint":{"type":"TypeString","optional":true},"icon_url":{"type":"TypeString","optional":true,"default":"https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png"},"location":{"type":"TypeString","required":true,"forceNew":true},"microsoft_app_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"streaming_endpoint_enabled":{"type":"TypeBool","optional":true,"default":false},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_connection":{"schema":{"bot_name":{"type":"TypeString","required":true,"forceNew":true},"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scopes":{"type":"TypeString","optional":true},"service_provider_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_service_azure_bot":{"schema":{"cmk_key_vault_key_url":{"type":"TypeString","optional":true},"developer_app_insights_api_key":{"type":"TypeString","optional":true},"developer_app_insights_application_id":{"type":"TypeString","optional":true},"developer_app_insights_key":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true,"computed":true},"endpoint":{"type":"TypeString","optional":true},"icon_url":{"type":"TypeString","optional":true,"default":"https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png"},"local_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"luis_app_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"luis_key":{"type":"TypeString","optional":true},"microsoft_app_id":{"type":"TypeString","required":true,"forceNew":true},"microsoft_app_msi_id":{"type":"TypeString","optional":true,"forceNew":true},"microsoft_app_tenant_id":{"type":"TypeString","optional":true,"forceNew":true},"microsoft_app_type":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"streaming_endpoint_enabled":{"type":"TypeBool","optional":true,"default":false},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_web_app":{"schema":{"developer_app_insights_api_key":{"type":"TypeString","optional":true},"developer_app_insights_application_id":{"type":"TypeString","optional":true},"developer_app_insights_key":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true,"computed":true},"endpoint":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"luis_app_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"luis_key":{"type":"TypeString","optional":true},"microsoft_app_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_capacity_reservation":{"schema":{"capacity_reservation_group_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeList","required":true,"elem":{"schema":{"capacity":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zone":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_capacity_reservation_group":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cdn_endpoint":{"schema":{"content_types_to_compress":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"delivery_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"cache_expiration_action":{"type":"TypeList","optional":true,"elem":{"schema":{"behavior":{"type":"TypeString","required":true},"duration":{"type":"TypeString","optional":true}}},"maxItems":1},"cache_key_query_string_action":{"type":"TypeList","optional":true,"elem":{"schema":{"behavior":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true}}},"maxItems":1},"cookies_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"selector":{"type":"TypeString","required":true},"transforms":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"device_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","optional":true,"default":"Equal"}}},"maxItems":1},"http_version_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","optional":true,"default":"Equal"}}}},"modify_request_header_action":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","optional":true}}}},"modify_response_header_action":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","optional":true}}}},"name":{"type":"TypeString","required":true},"order":{"type":"TypeInt","required":true},"post_arg_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"selector":{"type":"TypeString","required":true},"transforms":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"query_string_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"remote_address_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true}}}},"request_body_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"request_header_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"selector":{"type":"TypeString","required":true},"transforms":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"request_method_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","optional":true,"default":"Equal"}}},"maxItems":1},"request_scheme_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","optional":true,"default":"Equal"}}},"maxItems":1},"request_uri_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"url_file_extension_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"url_file_name_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"url_path_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"url_redirect_action":{"type":"TypeList","optional":true,"elem":{"schema":{"fragment":{"type":"TypeString","optional":true},"hostname":{"type":"TypeString","optional":true},"path":{"type":"TypeString","optional":true},"protocol":{"type":"TypeString","optional":true,"default":"MatchRequest"},"query_string":{"type":"TypeString","optional":true},"redirect_type":{"type":"TypeString","required":true}}},"maxItems":1},"url_rewrite_action":{"type":"TypeList","optional":true,"elem":{"schema":{"destination":{"type":"TypeString","required":true},"preserve_unmatched_path":{"type":"TypeBool","optional":true,"default":true},"source_pattern":{"type":"TypeString","required":true}}},"maxItems":1}}}},"fqdn":{"type":"TypeString","computed":true},"geo_filter":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"country_codes":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"relative_path":{"type":"TypeString","required":true}}}},"global_delivery_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"cache_expiration_action":{"type":"TypeList","optional":true,"elem":{"schema":{"behavior":{"type":"TypeString","required":true},"duration":{"type":"TypeString","optional":true}}},"maxItems":1},"cache_key_query_string_action":{"type":"TypeList","optional":true,"elem":{"schema":{"behavior":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true}}},"maxItems":1},"modify_request_header_action":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","optional":true}}}},"modify_response_header_action":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","optional":true}}}},"url_redirect_action":{"type":"TypeList","optional":true,"elem":{"schema":{"fragment":{"type":"TypeString","optional":true},"hostname":{"type":"TypeString","optional":true},"path":{"type":"TypeString","optional":true},"protocol":{"type":"TypeString","optional":true,"default":"MatchRequest"},"query_string":{"type":"TypeString","optional":true},"redirect_type":{"type":"TypeString","required":true}}},"maxItems":1},"url_rewrite_action":{"type":"TypeList","optional":true,"elem":{"schema":{"destination":{"type":"TypeString","required":true},"preserve_unmatched_path":{"type":"TypeBool","optional":true,"default":true},"source_pattern":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"is_compression_enabled":{"type":"TypeBool","optional":true},"is_http_allowed":{"type":"TypeBool","optional":true,"default":true},"is_https_allowed":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"optimization_type":{"type":"TypeString","optional":true},"origin":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"schema":{"host_name":{"type":"TypeString","required":true,"forceNew":true},"http_port":{"type":"TypeInt","optional":true,"default":80,"forceNew":true},"https_port":{"type":"TypeInt","optional":true,"default":443,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}}}},"origin_host_header":{"type":"TypeString","optional":true},"origin_path":{"type":"TypeString","optional":true},"probe_path":{"type":"TypeString","optional":true},"profile_name":{"type":"TypeString","required":true,"forceNew":true},"querystring_caching_behaviour":{"type":"TypeString","optional":true,"default":"IgnoreQueryString"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cdn_endpoint_custom_domain":{"schema":{"cdn_endpoint_id":{"type":"TypeString","required":true,"forceNew":true},"cdn_managed_https":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate_type":{"type":"TypeString","required":true},"protocol_type":{"type":"TypeString","required":true},"tls_version":{"type":"TypeString","optional":true,"default":"TLS12"}}},"maxItems":1,"minItems":1},"host_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"user_managed_https":{"type":"TypeList","optional":true,"elem":{"schema":{"key_vault_secret_id":{"type":"TypeString","required":true},"tls_version":{"type":"TypeString","optional":true,"default":"TLS12"}}},"maxItems":1,"minItems":1}},"timeouts":{"create":720,"read":5,"delete":720,"update":1440}},"azurerm_cdn_frontdoor_custom_domain":{"schema":{"cdn_frontdoor_profile_id":{"type":"TypeString","required":true,"forceNew":true},"dns_zone_id":{"type":"TypeString","optional":true},"expiration_date":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tls":{"type":"TypeList","required":true,"elem":{"schema":{"cdn_frontdoor_secret_id":{"type":"TypeString","optional":true,"computed":true},"certificate_type":{"type":"TypeString","optional":true,"default":"ManagedCertificate"},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"TLS12"}}},"maxItems":1},"validation_token":{"type":"TypeString","computed":true}},"timeouts":{"create":720,"read":5,"delete":720,"update":1440}},"azurerm_cdn_frontdoor_custom_domain_association":{"schema":{"cdn_frontdoor_custom_domain_id":{"type":"TypeString","required":true,"forceNew":true},"cdn_frontdoor_route_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cdn_frontdoor_endpoint":{"schema":{"cdn_frontdoor_profile_id":{"type":"TypeString","required":true,"forceNew":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"host_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cdn_frontdoor_firewall_policy":{"schema":{"custom_block_response_body":{"type":"TypeString","optional":true},"custom_block_response_status_code":{"type":"TypeInt","optional":true},"custom_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"match_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":600},"match_variable":{"type":"TypeString","required":true},"negation_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"selector":{"type":"TypeString","optional":true},"transforms":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":5}}},"maxItems":10},"name":{"type":"TypeString","required":true},"priority":{"type":"TypeInt","optional":true,"default":1},"rate_limit_duration_in_minutes":{"type":"TypeInt","optional":true,"default":1},"rate_limit_threshold":{"type":"TypeInt","optional":true,"default":10},"type":{"type":"TypeString","required":true}}},"maxItems":100},"enabled":{"type":"TypeBool","optional":true,"default":true},"frontend_endpoint_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"managed_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"exclusion":{"type":"TypeList","optional":true,"elem":{"schema":{"match_variable":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"selector":{"type":"TypeString","required":true}}},"maxItems":100},"override":{"type":"TypeList","optional":true,"elem":{"schema":{"exclusion":{"type":"TypeList","optional":true,"elem":{"schema":{"match_variable":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"selector":{"type":"TypeString","required":true}}},"maxItems":100},"rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":false},"exclusion":{"type":"TypeList","optional":true,"elem":{"schema":{"match_variable":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"selector":{"type":"TypeString","required":true}}},"maxItems":100},"rule_id":{"type":"TypeString","required":true}}},"maxItems":1000},"rule_group_name":{"type":"TypeString","required":true}}},"maxItems":100},"type":{"type":"TypeString","required":true},"version":{"type":"TypeString","required":true}}},"maxItems":100},"mode":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"redirect_url":{"type":"TypeString","optional":true},"request_body_check_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cdn_frontdoor_origin":{"schema":{"cdn_frontdoor_origin_group_id":{"type":"TypeString","required":true,"forceNew":true},"certificate_name_check_enabled":{"type":"TypeBool","required":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"host_name":{"type":"TypeString","required":true},"http_port":{"type":"TypeInt","optional":true,"default":80},"https_port":{"type":"TypeInt","optional":true,"default":443},"name":{"type":"TypeString","required":true,"forceNew":true},"origin_host_header":{"type":"TypeString","optional":true},"priority":{"type":"TypeInt","optional":true,"default":1},"private_link":{"type":"TypeList","optional":true,"elem":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"private_link_target_id":{"type":"TypeString","required":true},"request_message":{"type":"TypeString","optional":true,"default":"Access request for CDN FrontDoor Private Link Origin"},"target_type":{"type":"TypeString","optional":true}}},"maxItems":1},"weight":{"type":"TypeInt","optional":true,"default":500}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cdn_frontdoor_origin_group":{"schema":{"cdn_frontdoor_profile_id":{"type":"TypeString","required":true,"forceNew":true},"health_probe":{"type":"TypeList","optional":true,"elem":{"schema":{"interval_in_seconds":{"type":"TypeInt","required":true},"path":{"type":"TypeString","optional":true,"default":"/"},"protocol":{"type":"TypeString","required":true},"request_type":{"type":"TypeString","optional":true,"default":"HEAD"}}},"maxItems":1},"load_balancing":{"type":"TypeList","required":true,"elem":{"schema":{"additional_latency_in_milliseconds":{"type":"TypeInt","optional":true,"default":50},"sample_size":{"type":"TypeInt","optional":true,"default":4},"successful_samples_required":{"type":"TypeInt","optional":true,"default":3}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"restore_traffic_time_to_healed_or_new_endpoint_in_minutes":{"type":"TypeInt","optional":true,"default":10},"session_affinity_enabled":{"type":"TypeBool","optional":true,"default":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cdn_frontdoor_profile":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"resource_guid":{"type":"TypeString","computed":true},"response_timeout_seconds":{"type":"TypeInt","optional":true,"default":120},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cdn_frontdoor_route":{"schema":{"cache":{"type":"TypeList","optional":true,"elem":{"schema":{"compression_enabled":{"type":"TypeBool","optional":true,"default":false},"content_types_to_compress":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"query_string_caching_behavior":{"type":"TypeString","optional":true,"default":"IgnoreQueryString"},"query_strings":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"cdn_frontdoor_custom_domain_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"cdn_frontdoor_endpoint_id":{"type":"TypeString","required":true,"forceNew":true},"cdn_frontdoor_origin_group_id":{"type":"TypeString","required":true},"cdn_frontdoor_origin_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"cdn_frontdoor_origin_path":{"type":"TypeString","optional":true},"cdn_frontdoor_rule_set_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true,"default":true},"forwarding_protocol":{"type":"TypeString","optional":true,"default":"MatchRequest"},"https_redirect_enabled":{"type":"TypeBool","optional":true,"default":true},"link_to_default_domain":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true,"forceNew":true},"patterns_to_match":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"supported_protocols":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"maxItems":2}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cdn_frontdoor_rule":{"schema":{"actions":{"type":"TypeList","required":true,"elem":{"schema":{"request_header_action":{"type":"TypeList","optional":true,"elem":{"schema":{"header_action":{"type":"TypeString","required":true},"header_name":{"type":"TypeString","required":true},"value":{"type":"TypeString","optional":true}}}},"response_header_action":{"type":"TypeList","optional":true,"elem":{"schema":{"header_action":{"type":"TypeString","required":true},"header_name":{"type":"TypeString","required":true},"value":{"type":"TypeString","optional":true}}}},"route_configuration_override_action":{"type":"TypeList","optional":true,"elem":{"schema":{"cache_behavior":{"type":"TypeString","optional":true},"cache_duration":{"type":"TypeString","optional":true},"cdn_frontdoor_origin_group_id":{"type":"TypeString","optional":true},"compression_enabled":{"type":"TypeBool","optional":true},"forwarding_protocol":{"type":"TypeString","optional":true},"query_string_caching_behavior":{"type":"TypeString","optional":true},"query_string_parameters":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":100}}},"maxItems":1},"url_redirect_action":{"type":"TypeList","optional":true,"elem":{"schema":{"destination_fragment":{"type":"TypeString","optional":true,"default":""},"destination_hostname":{"type":"TypeString","required":true},"destination_path":{"type":"TypeString","optional":true,"default":""},"query_string":{"type":"TypeString","optional":true,"default":""},"redirect_protocol":{"type":"TypeString","optional":true,"default":"MatchRequest"},"redirect_type":{"type":"TypeString","required":true}}},"maxItems":1},"url_rewrite_action":{"type":"TypeList","optional":true,"elem":{"schema":{"destination":{"type":"TypeString","required":true},"preserve_unmatched_path":{"type":"TypeBool","optional":true,"default":false},"source_pattern":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"behavior_on_match":{"type":"TypeString","optional":true,"default":"Continue"},"cdn_frontdoor_rule_set_id":{"type":"TypeString","required":true,"forceNew":true},"cdn_frontdoor_rule_set_name":{"type":"TypeString","computed":true},"conditions":{"type":"TypeList","optional":true,"elem":{"schema":{"client_port_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true}}}},"cookies_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"cookie_name":{"type":"TypeString","required":true},"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":4}}}},"host_name_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":4}}}},"http_version_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"maxItems":4},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","optional":true,"default":"Equal"}}}},"is_device_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","optional":true,"default":"Equal"}}}},"post_args_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"post_args_name":{"type":"TypeString","required":true},"transforms":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":4}}}},"query_string_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":4}}}},"remote_address_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","optional":true,"default":"IPMatch"}}}},"request_body_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":4}}}},"request_header_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"header_name":{"type":"TypeString","required":true},"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":4}}}},"request_method_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"maxItems":7},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","optional":true,"default":"Equal"}}}},"request_scheme_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString","default":"HTTP"},"maxItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","optional":true,"default":"Equal"}}}},"request_uri_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":4}}}},"server_port_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"maxItems":2},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true}}}},"socket_address_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","optional":true,"default":"IPMatch"}}}},"ssl_protocol_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"maxItems":3},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","optional":true,"default":"Equal"}}}},"url_file_extension_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":4}}}},"url_filename_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":4}}}},"url_path_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":4}}}}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"order":{"type":"TypeInt","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cdn_frontdoor_rule_set":{"schema":{"cdn_frontdoor_profile_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_cdn_frontdoor_secret":{"schema":{"cdn_frontdoor_profile_id":{"type":"TypeString","required":true,"forceNew":true},"cdn_frontdoor_profile_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"secret":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"customer_certificate":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"key_vault_certificate_id":{"type":"TypeString","required":true,"forceNew":true},"subject_alternative_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_cdn_frontdoor_security_policy":{"schema":{"cdn_frontdoor_profile_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"security_policies":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"firewall":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"association":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"domain":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"active":{"type":"TypeBool","computed":true},"cdn_frontdoor_domain_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":500},"patterns_to_match":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"maxItems":1}}},"maxItems":1},"cdn_frontdoor_firewall_policy_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_cdn_profile":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_chaos_studio_capability":{"schema":{"capability_type":{"type":"TypeString","required":true,"forceNew":true},"chaos_studio_target_id":{"type":"TypeString","required":true,"forceNew":true},"urn":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_chaos_studio_experiment":{"schema":{"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"selectors":{"type":"TypeList","required":true,"elem":{"schema":{"chaos_studio_target_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true}}},"minItems":1},"steps":{"type":"TypeList","required":true,"elem":{"schema":{"branch":{"type":"TypeList","required":true,"elem":{"schema":{"actions":{"type":"TypeList","required":true,"elem":{"schema":{"action_type":{"type":"TypeString","required":true},"duration":{"type":"TypeString","optional":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"selector_name":{"type":"TypeString","optional":true},"urn":{"type":"TypeString","optional":true}}},"minItems":1},"name":{"type":"TypeString","required":true}}},"minItems":1},"name":{"type":"TypeString","required":true}}},"minItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_chaos_studio_target":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true},"target_type":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_cognitive_account":{"schema":{"custom_question_answering_search_service_id":{"type":"TypeString","optional":true},"custom_question_answering_search_service_key":{"type":"TypeString","optional":true},"custom_subdomain_name":{"type":"TypeString","optional":true,"forceNew":true},"customer_managed_key":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_client_id":{"type":"TypeString","optional":true},"key_vault_key_id":{"type":"TypeString","required":true}}},"maxItems":1},"dynamic_throttling_enabled":{"type":"TypeBool","optional":true},"endpoint":{"type":"TypeString","computed":true},"fqdns":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"kind":{"type":"TypeString","required":true,"forceNew":true},"local_auth_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"metrics_advisor_aad_client_id":{"type":"TypeString","optional":true,"forceNew":true},"metrics_advisor_aad_tenant_id":{"type":"TypeString","optional":true,"forceNew":true},"metrics_advisor_super_user_name":{"type":"TypeString","optional":true,"forceNew":true},"metrics_advisor_website_name":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_acls":{"type":"TypeList","optional":true,"elem":{"schema":{"default_action":{"type":"TypeString","required":true},"ip_rules":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"virtual_network_rules":{"type":"TypeSet","optional":true,"elem":{"schema":{"ignore_missing_vnet_service_endpoint":{"type":"TypeBool","optional":true,"default":false},"subnet_id":{"type":"TypeString","required":true}}}}}},"maxItems":1},"outbound_network_access_restricted":{"type":"TypeBool","optional":true,"default":false},"primary_access_key":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"qna_runtime_endpoint":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_access_key":{"type":"TypeString","computed":true},"sku_name":{"type":"TypeString","required":true},"storage":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_client_id":{"type":"TypeString","optional":true},"storage_account_id":{"type":"TypeString","required":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cognitive_account_customer_managed_key":{"schema":{"cognitive_account_id":{"type":"TypeString","required":true,"forceNew":true},"identity_client_id":{"type":"TypeString","optional":true},"key_vault_key_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cognitive_deployment":{"schema":{"cognitive_account_id":{"type":"TypeString","required":true,"forceNew":true},"model":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"format":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","optional":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"rai_policy_name":{"type":"TypeString","optional":true},"scale":{"type":"TypeList","required":true,"elem":{"schema":{"capacity":{"type":"TypeInt","optional":true,"default":1},"family":{"type":"TypeString","optional":true,"forceNew":true},"size":{"type":"TypeString","optional":true,"forceNew":true},"tier":{"type":"TypeString","optional":true,"forceNew":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"version_upgrade_option":{"type":"TypeString","optional":true,"default":"OnceNewDefaultVersionAvailable"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_communication_service":{"schema":{"data_location":{"type":"TypeString","optional":true,"default":"United States","forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_communication_service_email_domain_association":{"schema":{"communication_service_id":{"type":"TypeString","required":true,"forceNew":true},"email_service_domain_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":5,"read":5,"delete":5}},"azurerm_confidential_ledger":{"schema":{"azuread_based_service_principal":{"type":"TypeList","required":true,"elem":{"schema":{"ledger_role_name":{"type":"TypeString","required":true},"principal_id":{"type":"TypeString","required":true},"tenant_id":{"type":"TypeString","required":true}}},"minItems":1},"certificate_based_security_principal":{"type":"TypeList","optional":true,"elem":{"schema":{"ledger_role_name":{"type":"TypeString","required":true},"pem_public_key":{"type":"TypeString","required":true}}}},"identity_service_endpoint":{"type":"TypeString","computed":true},"ledger_endpoint":{"type":"TypeString","computed":true},"ledger_type":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_consumption_budget_management_group":{"schema":{"amount":{"type":"TypeFloat","required":true},"etag":{"type":"TypeString","optional":true,"computed":true},"filter":{"type":"TypeList","optional":true,"elem":{"schema":{"dimension":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"operator":{"type":"TypeString","optional":true,"default":"In"},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"tag":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"operator":{"type":"TypeString","optional":true,"default":"In"},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}}}},"maxItems":1},"management_group_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"notification":{"type":"TypeSet","required":true,"elem":{"schema":{"contact_emails":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"enabled":{"type":"TypeBool","optional":true,"default":true},"operator":{"type":"TypeString","required":true},"threshold":{"type":"TypeInt","required":true},"threshold_type":{"type":"TypeString","optional":true,"default":"Actual","forceNew":true}}},"maxItems":5,"minItems":1},"time_grain":{"type":"TypeString","optional":true,"default":"Monthly","forceNew":true},"time_period":{"type":"TypeList","required":true,"elem":{"schema":{"end_date":{"type":"TypeString","optional":true,"computed":true},"start_date":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1,"minItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_consumption_budget_resource_group":{"schema":{"amount":{"type":"TypeFloat","required":true},"etag":{"type":"TypeString","optional":true,"computed":true},"filter":{"type":"TypeList","optional":true,"elem":{"schema":{"dimension":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"operator":{"type":"TypeString","optional":true,"default":"In"},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"tag":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"operator":{"type":"TypeString","optional":true,"default":"In"},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"notification":{"type":"TypeSet","required":true,"elem":{"schema":{"contact_emails":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"contact_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"contact_roles":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true,"default":true},"operator":{"type":"TypeString","required":true},"threshold":{"type":"TypeInt","required":true},"threshold_type":{"type":"TypeString","optional":true,"default":"Actual","forceNew":true}}},"maxItems":5,"minItems":1},"resource_group_id":{"type":"TypeString","required":true,"forceNew":true},"time_grain":{"type":"TypeString","optional":true,"default":"Monthly","forceNew":true},"time_period":{"type":"TypeList","required":true,"elem":{"schema":{"end_date":{"type":"TypeString","optional":true,"computed":true},"start_date":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1,"minItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_consumption_budget_subscription":{"schema":{"amount":{"type":"TypeFloat","required":true},"etag":{"type":"TypeString","optional":true,"computed":true},"filter":{"type":"TypeList","optional":true,"elem":{"schema":{"dimension":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"operator":{"type":"TypeString","optional":true,"default":"In"},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"tag":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"operator":{"type":"TypeString","optional":true,"default":"In"},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"notification":{"type":"TypeSet","required":true,"elem":{"schema":{"contact_emails":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"contact_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"contact_roles":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true,"default":true},"operator":{"type":"TypeString","required":true},"threshold":{"type":"TypeInt","required":true},"threshold_type":{"type":"TypeString","optional":true,"default":"Actual","forceNew":true}}},"maxItems":5,"minItems":1},"subscription_id":{"type":"TypeString","required":true,"forceNew":true},"time_grain":{"type":"TypeString","optional":true,"default":"Monthly","forceNew":true},"time_period":{"type":"TypeList","required":true,"elem":{"schema":{"end_date":{"type":"TypeString","optional":true,"computed":true},"start_date":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1,"minItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_app":{"schema":{"container_app_environment_id":{"type":"TypeString","required":true,"description":"The ID of the Container App Environment to host this Container App.","forceNew":true},"custom_domain_verification_id":{"type":"TypeString","description":"The ID of the Custom Domain Verification for this Container App.","computed":true},"dapr":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The Dapr Application Identifier."},"app_port":{"type":"TypeInt","optional":true,"description":"The port which the application is listening on. This is the same as the `ingress` port."},"app_protocol":{"type":"TypeString","optional":true,"default":"http","description":"The protocol for the app. Possible values include `http` and `grpc`. Defaults to `http`."}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"ingress":{"type":"TypeList","optional":true,"elem":{"schema":{"allow_insecure_connections":{"type":"TypeBool","optional":true,"default":false,"description":"Should this ingress allow insecure connections?"},"custom_domain":{"type":"TypeList","computed":true,"elem":{"schema":{"certificate_binding_type":{"type":"TypeString","description":"The Binding type. Possible values include `Disabled` and `SniEnabled`. Defaults to `Disabled`","computed":true},"certificate_id":{"type":"TypeString","description":"The ID of the Certificate.","computed":true},"name":{"type":"TypeString","description":"The hostname of the Certificate. Must be the CN or a named SAN in the certificate.","computed":true}}}},"exposed_port":{"type":"TypeInt","optional":true,"description":"The exposed port on the container for the Ingress traffic."},"external_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Is this an external Ingress."},"fqdn":{"type":"TypeString","description":"The FQDN of the ingress.","computed":true},"ip_security_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true,"description":"The action. Allow or Deny."},"description":{"type":"TypeString","optional":true,"description":"Describe the IP restriction rule that is being sent to the container-app."},"ip_address_range":{"type":"TypeString","required":true,"description":"The incoming IP address or range of IP addresses (in CIDR notation)."},"name":{"type":"TypeString","required":true,"description":"Name for the IP restriction rule."}}}},"target_port":{"type":"TypeInt","required":true,"description":"The target port on the container for the Ingress traffic."},"traffic_weight":{"type":"TypeList","required":true,"elem":{"schema":{"label":{"type":"TypeString","optional":true,"description":"The label to apply to the revision as a name prefix for routing traffic."},"latest_revision":{"type":"TypeBool","optional":true,"default":false,"description":"This traffic Weight relates to the latest stable Container Revision."},"percentage":{"type":"TypeInt","required":true,"description":"The percentage of traffic to send to this revision."},"revision_suffix":{"type":"TypeString","optional":true,"description":"The suffix string to append to the revision. This must be unique for the Container App's lifetime. A default hash created by the service will be used if this value is omitted."}}}},"transport":{"type":"TypeString","optional":true,"default":"auto","description":"The transport method for the Ingress. Possible values include `auto`, `http`, and `http2`, `tcp`. Defaults to `auto`"}}},"maxItems":1},"latest_revision_fqdn":{"type":"TypeString","description":"The FQDN of the Latest Revision of the Container App.","computed":true},"latest_revision_name":{"type":"TypeString","description":"The name of the latest Container Revision.","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"description":"The name for this Container App.","forceNew":true},"outbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"registry":{"type":"TypeList","optional":true,"elem":{"schema":{"identity":{"type":"TypeString","optional":true,"description":"ID of the System or User Managed Identity used to pull images from the Container Registry"},"password_secret_name":{"type":"TypeString","optional":true,"description":"The name of the Secret Reference containing the password value for this user on the Container Registry."},"server":{"type":"TypeString","required":true,"description":"The hostname for the Container Registry."},"username":{"type":"TypeString","optional":true,"description":"The username to use for this Container Registry."}}},"minItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"revision_mode":{"type":"TypeString","required":true},"secret":{"type":"TypeSet","optional":true,"elem":{"schema":{"identity":{"type":"TypeString","optional":true,"description":"The identity to use for accessing key vault reference."},"key_vault_secret_id":{"type":"TypeString","optional":true,"description":"The Key Vault Secret ID. Could be either one of `id` or `versionless_id`."},"name":{"type":"TypeString","required":true,"description":"The secret name."},"value":{"type":"TypeString","optional":true,"description":"The value for this secret."}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"template":{"type":"TypeList","required":true,"elem":{"schema":{"azure_queue_scale_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"authentication":{"type":"TypeList","required":true,"elem":{"schema":{"secret_name":{"type":"TypeString","required":true},"trigger_parameter":{"type":"TypeString","required":true}}},"minItems":1},"name":{"type":"TypeString","required":true},"queue_length":{"type":"TypeInt","required":true},"queue_name":{"type":"TypeString","required":true}}}},"container":{"type":"TypeList","required":true,"elem":{"schema":{"args":{"type":"TypeList","optional":true,"description":"A list of args to pass to the container.","elem":{"type":"TypeString"}},"command":{"type":"TypeList","optional":true,"description":"A command to pass to the container to override the default. This is provided as a list of command line elements without spaces.","elem":{"type":"TypeString"}},"cpu":{"type":"TypeFloat","required":true,"description":"The amount of vCPU to allocate to the container. Possible values include `0.25`, `0.5`, `0.75`, `1.0`, `1.25`, `1.5`, `1.75`, and `2.0`. **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.0` / `2.0` or `0.5` / `1.0`. When there's a workload profile specified, there's no such constraint."},"env":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name of the environment variable for the container."},"secret_name":{"type":"TypeString","optional":true,"description":"The name of the secret that contains the value for this environment variable."},"value":{"type":"TypeString","optional":true,"description":"The value for this environment variable. **NOTE:** This value is ignored if `secret_name` is used"}}},"minItems":1},"ephemeral_storage":{"type":"TypeString","description":"The amount of ephemeral storage available to the Container App.","computed":true},"image":{"type":"TypeString","required":true,"description":"The image to use to create the container."},"liveness_probe":{"type":"TypeList","optional":true,"elem":{"schema":{"failure_count_threshold":{"type":"TypeInt","optional":true,"default":3,"description":"The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`."},"header":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The HTTP Header Name."},"value":{"type":"TypeString","required":true,"description":"The HTTP Header value."}}}},"host":{"type":"TypeString","optional":true,"description":"The probe hostname. Defaults to the pod IP address. Setting a value for `Host` in `headers` can be used to override this for `http` and `https` type probes."},"initial_delay":{"type":"TypeInt","optional":true,"default":1,"description":"The time in seconds to wait after the container has started before the probe is started."},"interval_seconds":{"type":"TypeInt","optional":true,"default":10,"description":"How often, in seconds, the probe should run. Possible values are between `1` and `240`. Defaults to `10`"},"path":{"type":"TypeString","optional":true,"description":"The URI to use with the `host` for http type probes. Not valid for `TCP` type probes. Defaults to `/`.","computed":true},"port":{"type":"TypeInt","required":true,"description":"The port number on which to connect. Possible values are between `1` and `65535`."},"termination_grace_period_seconds":{"type":"TypeInt","description":"The time in seconds after the container is sent the termination signal before the process if forcibly killed.","computed":true},"timeout":{"type":"TypeInt","optional":true,"default":1,"description":"Time in seconds after which the probe times out. Possible values are between `1` an `240`. Defaults to `1`."},"transport":{"type":"TypeString","required":true,"description":"Type of probe. Possible values are `TCP`, `HTTP`, and `HTTPS`."}}},"minItems":1},"memory":{"type":"TypeString","required":true,"description":"The amount of memory to allocate to the container. Possible values include `0.5Gi`, `1.0Gi`, `1.5Gi`, `2.0Gi`, `2.5Gi`, `3.0Gi`, `3.5Gi`, and `4.0Gi`. **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.25` / `2.5Gi` or `0.75` / `1.5Gi`. When there's a workload profile specified, there's no such constraint."},"name":{"type":"TypeString","required":true,"description":"The name of the container."},"readiness_probe":{"type":"TypeList","optional":true,"elem":{"schema":{"failure_count_threshold":{"type":"TypeInt","optional":true,"default":3,"description":"The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`."},"header":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The HTTP Header Name."},"value":{"type":"TypeString","required":true,"description":"The HTTP Header value."}}}},"host":{"type":"TypeString","optional":true,"description":"The probe hostname. Defaults to the pod IP address. Setting a value for `Host` in `headers` can be used to override this for `http` and `https` type probes."},"interval_seconds":{"type":"TypeInt","optional":true,"default":10,"description":"How often, in seconds, the probe should run. Possible values are between `1` and `240`. Defaults to `10`"},"path":{"type":"TypeString","optional":true,"description":"The URI to use for http type probes. Not valid for `TCP` type probes. Defaults to `/`.","computed":true},"port":{"type":"TypeInt","required":true,"description":"The port number on which to connect. Possible values are between `1` and `65535`."},"success_count_threshold":{"type":"TypeInt","optional":true,"default":3,"description":"The number of consecutive successful responses required to consider this probe as successful. Possible values are between `1` and `10`. Defaults to `3`."},"timeout":{"type":"TypeInt","optional":true,"default":1,"description":"Time in seconds after which the probe times out. Possible values are between `1` an `240`. Defaults to `1`."},"transport":{"type":"TypeString","required":true,"description":"Type of probe. Possible values are `TCP`, `HTTP`, and `HTTPS`."}}},"minItems":1},"startup_probe":{"type":"TypeList","optional":true,"elem":{"schema":{"failure_count_threshold":{"type":"TypeInt","optional":true,"default":3,"description":"The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`."},"header":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The HTTP Header Name."},"value":{"type":"TypeString","required":true,"description":"The HTTP Header value."}}}},"host":{"type":"TypeString","optional":true,"description":"The probe hostname. Defaults to the pod IP address. Setting a value for `Host` in `headers` can be used to override this for `http` and `https` type probes."},"interval_seconds":{"type":"TypeInt","optional":true,"default":10,"description":"How often, in seconds, the probe should run. Possible values are between `1` and `240`. Defaults to `10`"},"path":{"type":"TypeString","optional":true,"description":"The URI to use with the `host` for http type probes. Not valid for `TCP` type probes. Defaults to `/`.","computed":true},"port":{"type":"TypeInt","required":true,"description":"The port number on which to connect. Possible values are between `1` and `65535`."},"termination_grace_period_seconds":{"type":"TypeInt","description":"The time in seconds after the container is sent the termination signal before the process if forcibly killed.","computed":true},"timeout":{"type":"TypeInt","optional":true,"default":1,"description":"Time in seconds after which the probe times out. Possible values are between `1` an `240`. Defaults to `1`."},"transport":{"type":"TypeString","required":true,"description":"Type of probe. Possible values are `TCP`, `HTTP`, and `HTTPS`."}}},"minItems":1},"volume_mounts":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name of the Volume to be mounted in the container."},"path":{"type":"TypeString","required":true,"description":"The path in the container at which to mount this volume."}}}}}},"minItems":1},"custom_scale_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"authentication":{"type":"TypeList","optional":true,"elem":{"schema":{"secret_name":{"type":"TypeString","required":true},"trigger_parameter":{"type":"TypeString","required":true}}},"minItems":1},"custom_rule_type":{"type":"TypeString","required":true},"metadata":{"type":"TypeMap","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true}}}},"http_scale_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"authentication":{"type":"TypeList","optional":true,"elem":{"schema":{"secret_name":{"type":"TypeString","required":true},"trigger_parameter":{"type":"TypeString","optional":true}}},"minItems":1},"concurrent_requests":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}},"init_container":{"type":"TypeList","optional":true,"elem":{"schema":{"args":{"type":"TypeList","optional":true,"description":"A list of args to pass to the container.","elem":{"type":"TypeString"}},"command":{"type":"TypeList","optional":true,"description":"A command to pass to the container to override the default. This is provided as a list of command line elements without spaces.","elem":{"type":"TypeString"}},"cpu":{"type":"TypeFloat","optional":true,"description":"The amount of vCPU to allocate to the container. Possible values include `0.25`, `0.5`, `0.75`, `1.0`, `1.25`, `1.5`, `1.75`, and `2.0`. **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.0` / `2.0` or `0.5` / `1.0`. When there's a workload profile specified, there's no such constraint."},"env":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name of the environment variable for the container."},"secret_name":{"type":"TypeString","optional":true,"description":"The name of the secret that contains the value for this environment variable."},"value":{"type":"TypeString","optional":true,"description":"The value for this environment variable. **NOTE:** This value is ignored if `secret_name` is used"}}},"minItems":1},"ephemeral_storage":{"type":"TypeString","description":"The amount of ephemeral storage available to the Container App.","computed":true},"image":{"type":"TypeString","required":true,"description":"The image to use to create the container."},"memory":{"type":"TypeString","optional":true,"description":"The amount of memory to allocate to the container. Possible values include `0.5Gi`, `1.0Gi`, `1.5Gi`, `2.0Gi`, `2.5Gi`, `3.0Gi`, `3.5Gi`, and `4.0Gi`. **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.25` / `2.5Gi` or `0.75` / `1.5Gi`. When there's a workload profile specified, there's no such constraint."},"name":{"type":"TypeString","required":true,"description":"The name of the container."},"volume_mounts":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name of the Volume to be mounted in the container."},"path":{"type":"TypeString","required":true,"description":"The path in the container at which to mount this volume."}}}}}},"minItems":1},"max_replicas":{"type":"TypeInt","optional":true,"default":10,"description":"The maximum number of replicas for this container."},"min_replicas":{"type":"TypeInt","optional":true,"default":0,"description":"The minimum number of replicas for this container."},"revision_suffix":{"type":"TypeString","optional":true,"description":"The suffix for the revision. This value must be unique for the lifetime of the Resource. If omitted the service will use a hash function to create one.","computed":true},"tcp_scale_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"authentication":{"type":"TypeList","optional":true,"elem":{"schema":{"secret_name":{"type":"TypeString","required":true},"trigger_parameter":{"type":"TypeString","optional":true}}},"minItems":1},"concurrent_requests":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}},"volume":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name of the volume."},"storage_name":{"type":"TypeString","optional":true,"description":"The name of the `AzureFile` storage. Required when `storage_type` is `AzureFile`"},"storage_type":{"type":"TypeString","optional":true,"default":"EmptyDir","description":"The type of storage volume. Possible values include `AzureFile` and `EmptyDir`. Defaults to `EmptyDir`."}}},"minItems":1}}},"maxItems":1},"workload_profile_name":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_app_custom_domain":{"schema":{"certificate_binding_type":{"type":"TypeString","optional":true,"description":"The Binding type. Possible values include `Disabled` and `SniEnabled`.","forceNew":true},"container_app_environment_certificate_id":{"type":"TypeString","optional":true,"forceNew":true},"container_app_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"description":"The hostname of the Certificate. Must be the CN or a named SAN in the certificate.","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_container_app_environment":{"schema":{"custom_domain_verification_id":{"type":"TypeString","description":"The ID of the Custom Domain Verification for this Container App Environment.","computed":true},"dapr_application_insights_connection_string":{"type":"TypeString","optional":true,"description":"Application Insights connection string used by Dapr to export Service to Service communication telemetry.","forceNew":true},"default_domain":{"type":"TypeString","description":"The default publicly resolvable name of this Container App Environment","computed":true},"docker_bridge_cidr":{"type":"TypeString","description":"The network addressing in which the Container Apps in this Container App Environment will reside in CIDR notation.","computed":true},"infrastructure_resource_group_name":{"type":"TypeString","optional":true,"description":"Name of the platform-managed resource group created for the Managed Environment to host infrastructure resources. **Note:** Only valid if a `workload_profile` is specified. If `infrastructure_subnet_id` is specified, this resource group will be created in the same subscription as `infrastructure_subnet_id`.","forceNew":true},"infrastructure_subnet_id":{"type":"TypeString","optional":true,"description":"The existing Subnet to use for the Container Apps Control Plane. **NOTE:** The Subnet must have a `/21` or larger address space.","forceNew":true},"internal_load_balancer_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Container Environment operate in Internal Load Balancing Mode? Defaults to `false`. **Note:** can only be set to `true` if `infrastructure_subnet_id` is specified.","forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"log_analytics_workspace_id":{"type":"TypeString","optional":true,"description":"The ID for the Log Analytics Workspace to link this Container Apps Managed Environment to.","forceNew":true},"mutual_tls_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should mutual transport layer security (mTLS) be enabled? Defaults to `false`. **Note:** This feature is in public preview. Enabling mTLS for your applications may increase response latency and reduce maximum throughput in high-load scenarios."},"name":{"type":"TypeString","required":true,"description":"The name of the Container Apps Managed Environment.","forceNew":true},"platform_reserved_cidr":{"type":"TypeString","description":"The IP range, in CIDR notation, that is reserved for environment infrastructure IP addresses.","computed":true},"platform_reserved_dns_ip_address":{"type":"TypeString","description":"The IP address from the IP range defined by `platform_reserved_cidr` that is reserved for the internal DNS server.","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"static_ip_address":{"type":"TypeString","description":"The Static IP Address of the Environment.","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"workload_profile":{"type":"TypeSet","optional":true,"elem":{"schema":{"maximum_count":{"type":"TypeInt","optional":true},"minimum_count":{"type":"TypeInt","optional":true},"name":{"type":"TypeString","required":true},"workload_profile_type":{"type":"TypeString","required":true}}}},"zone_redundancy_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_app_environment_certificate":{"schema":{"certificate_blob_base64":{"type":"TypeString","required":true,"description":"The Certificate Private Key as a base64 encoded PFX or PEM.","forceNew":true},"certificate_password":{"type":"TypeString","required":true,"description":"The password for the Certificate.","forceNew":true},"container_app_environment_id":{"type":"TypeString","required":true,"description":"The Container App Managed Environment ID to configure this Certificate on.","forceNew":true},"expiration_date":{"type":"TypeString","description":"The expiration date for the Certificate.","computed":true},"issue_date":{"type":"TypeString","description":"The date of issue for the Certificate.","computed":true},"issuer":{"type":"TypeString","description":"The Certificate Issuer.","computed":true},"name":{"type":"TypeString","required":true,"description":"The name of the Container Apps Environment Certificate.","forceNew":true},"subject_name":{"type":"TypeString","description":"The Subject Name for the Certificate.","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"thumbprint":{"type":"TypeString","description":"The Thumbprint of the Certificate.","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_app_environment_custom_domain":{"schema":{"certificate_blob_base64":{"type":"TypeString","required":true,"description":"The Custom Domain Certificate Private Key as a base64 encoded PFX or PEM."},"certificate_password":{"type":"TypeString","required":true,"description":"The Custom Domain Certificate password."},"container_app_environment_id":{"type":"TypeString","required":true,"description":"The Container App Managed Environment ID to configure this Custom Domain on.","forceNew":true},"dns_suffix":{"type":"TypeString","required":true,"description":"The Custom Domain DNS suffix for this Container App Environment."}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_app_environment_dapr_component":{"schema":{"component_type":{"type":"TypeString","required":true,"description":"The Dapr Component Type. For example `state.azure.blobstorage`.","forceNew":true},"container_app_environment_id":{"type":"TypeString","required":true,"description":"The Container App Managed Environment ID to configure this Dapr component on.","forceNew":true},"ignore_errors":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Dapr sidecar to continue initialisation if the component fails to load. Defaults to `false`"},"init_timeout":{"type":"TypeString","optional":true,"default":"5s","description":"The component initialisation timeout in ISO8601 format. e.g. `5s`, `2h`, `1m`. Defaults to `5s`."},"metadata":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name of the Metadata configuration item."},"secret_name":{"type":"TypeString","optional":true,"description":"The name of a secret specified in the `secrets` block that contains the value for this metadata configuration item."},"value":{"type":"TypeString","optional":true,"description":"The value for this metadata configuration item."}}},"minItems":1},"name":{"type":"TypeString","required":true,"description":"The name for this Dapr Component.","forceNew":true},"scopes":{"type":"TypeList","optional":true,"description":"A list of scopes to which this component applies. e.g. a Container App's `dapr.app_id` value.","elem":{"type":"TypeString"},"minItems":1},"secret":{"type":"TypeSet","optional":true,"elem":{"schema":{"identity":{"type":"TypeString","optional":true,"description":"The identity to use for accessing key vault reference."},"key_vault_secret_id":{"type":"TypeString","optional":true,"description":"The Key Vault Secret ID. Could be either one of `id` or `versionless_id`."},"name":{"type":"TypeString","required":true,"description":"The secret name."},"value":{"type":"TypeString","optional":true,"description":"The value for this secret."}}}},"version":{"type":"TypeString","required":true,"description":"The version of the component."}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_app_environment_storage":{"schema":{"access_key":{"type":"TypeString","required":true,"description":"The Storage Account Access Key."},"access_mode":{"type":"TypeString","required":true,"description":"The access mode to connect this storage to the Container App. Possible values include `ReadOnly` and `ReadWrite`.","forceNew":true},"account_name":{"type":"TypeString","required":true,"description":"The Azure Storage Account in which the Share to be used is located.","forceNew":true},"container_app_environment_id":{"type":"TypeString","required":true,"description":"The ID of the Container App Environment to which this storage belongs.","forceNew":true},"name":{"type":"TypeString","required":true,"description":"The name for this Storage.","forceNew":true},"share_name":{"type":"TypeString","required":true,"description":"The name of the Azure Storage Share to use.","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_app_job":{"schema":{"container_app_environment_id":{"type":"TypeString","required":true,"forceNew":true},"event_stream_endpoint":{"type":"TypeString","computed":true},"event_trigger_config":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"parallelism":{"type":"TypeInt","optional":true,"default":1},"replica_completion_count":{"type":"TypeInt","optional":true,"default":1},"scale":{"type":"TypeList","optional":true,"elem":{"schema":{"max_executions":{"type":"TypeInt","optional":true,"default":100},"min_executions":{"type":"TypeInt","optional":true,"default":0},"polling_interval_in_seconds":{"type":"TypeInt","optional":true,"default":30},"rules":{"type":"TypeList","optional":true,"elem":{"schema":{"authentication":{"type":"TypeList","optional":true,"elem":{"schema":{"secret_name":{"type":"TypeString","required":true},"trigger_parameter":{"type":"TypeString","required":true}}},"minItems":1},"custom_rule_type":{"type":"TypeString","required":true},"metadata":{"type":"TypeMap","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true}}}}}}}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"manual_trigger_config":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"parallelism":{"type":"TypeInt","optional":true,"default":1},"replica_completion_count":{"type":"TypeInt","optional":true,"default":1}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"outbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"registry":{"type":"TypeList","optional":true,"elem":{"schema":{"identity":{"type":"TypeString","optional":true,"description":"ID of the System or User Managed Identity used to pull images from the Container Registry"},"password_secret_name":{"type":"TypeString","optional":true,"description":"The name of the Secret Reference containing the password value for this user on the Container Registry."},"server":{"type":"TypeString","required":true,"description":"The hostname for the Container Registry."},"username":{"type":"TypeString","optional":true,"description":"The username to use for this Container Registry."}}},"minItems":1},"replica_retry_limit":{"type":"TypeInt","optional":true},"replica_timeout_in_seconds":{"type":"TypeInt","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"schedule_trigger_config":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"cron_expression":{"type":"TypeString","required":true},"parallelism":{"type":"TypeInt","optional":true,"default":1},"replica_completion_count":{"type":"TypeInt","optional":true,"default":1}}},"maxItems":1},"secret":{"type":"TypeSet","optional":true,"elem":{"schema":{"identity":{"type":"TypeString","optional":true,"description":"The identity to use for accessing key vault reference."},"key_vault_secret_id":{"type":"TypeString","optional":true,"description":"The Key Vault Secret ID. Could be either one of `id` or `versionless_id`."},"name":{"type":"TypeString","required":true,"description":"The secret name."},"value":{"type":"TypeString","optional":true,"description":"The value for this secret."}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"template":{"type":"TypeList","required":true,"elem":{"schema":{"container":{"type":"TypeList","required":true,"elem":{"schema":{"args":{"type":"TypeList","optional":true,"description":"A list of args to pass to the container.","elem":{"type":"TypeString"}},"command":{"type":"TypeList","optional":true,"description":"A command to pass to the container to override the default. This is provided as a list of command line elements without spaces.","elem":{"type":"TypeString"}},"cpu":{"type":"TypeFloat","required":true,"description":"The amount of vCPU to allocate to the container. Possible values include `0.25`, `0.5`, `0.75`, `1.0`, `1.25`, `1.5`, `1.75`, and `2.0`. **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.0` / `2.0` or `0.5` / `1.0`. When there's a workload profile specified, there's no such constraint."},"env":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name of the environment variable for the container."},"secret_name":{"type":"TypeString","optional":true,"description":"The name of the secret that contains the value for this environment variable."},"value":{"type":"TypeString","optional":true,"description":"The value for this environment variable. **NOTE:** This value is ignored if `secret_name` is used"}}},"minItems":1},"ephemeral_storage":{"type":"TypeString","description":"The amount of ephemeral storage available to the Container App.","computed":true},"image":{"type":"TypeString","required":true,"description":"The image to use to create the container."},"liveness_probe":{"type":"TypeList","optional":true,"elem":{"schema":{"failure_count_threshold":{"type":"TypeInt","optional":true,"default":3,"description":"The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`."},"header":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The HTTP Header Name."},"value":{"type":"TypeString","required":true,"description":"The HTTP Header value."}}}},"host":{"type":"TypeString","optional":true,"description":"The probe hostname. Defaults to the pod IP address. Setting a value for `Host` in `headers` can be used to override this for `http` and `https` type probes."},"initial_delay":{"type":"TypeInt","optional":true,"default":1,"description":"The time in seconds to wait after the container has started before the probe is started."},"interval_seconds":{"type":"TypeInt","optional":true,"default":10,"description":"How often, in seconds, the probe should run. Possible values are between `1` and `240`. Defaults to `10`"},"path":{"type":"TypeString","optional":true,"description":"The URI to use with the `host` for http type probes. Not valid for `TCP` type probes. Defaults to `/`.","computed":true},"port":{"type":"TypeInt","required":true,"description":"The port number on which to connect. Possible values are between `1` and `65535`."},"termination_grace_period_seconds":{"type":"TypeInt","description":"The time in seconds after the container is sent the termination signal before the process if forcibly killed.","computed":true},"timeout":{"type":"TypeInt","optional":true,"default":1,"description":"Time in seconds after which the probe times out. Possible values are between `1` an `240`. Defaults to `1`."},"transport":{"type":"TypeString","required":true,"description":"Type of probe. Possible values are `TCP`, `HTTP`, and `HTTPS`."}}},"minItems":1},"memory":{"type":"TypeString","required":true,"description":"The amount of memory to allocate to the container. Possible values include `0.5Gi`, `1.0Gi`, `1.5Gi`, `2.0Gi`, `2.5Gi`, `3.0Gi`, `3.5Gi`, and `4.0Gi`. **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.25` / `2.5Gi` or `0.75` / `1.5Gi`. When there's a workload profile specified, there's no such constraint."},"name":{"type":"TypeString","required":true,"description":"The name of the container."},"readiness_probe":{"type":"TypeList","optional":true,"elem":{"schema":{"failure_count_threshold":{"type":"TypeInt","optional":true,"default":3,"description":"The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`."},"header":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The HTTP Header Name."},"value":{"type":"TypeString","required":true,"description":"The HTTP Header value."}}}},"host":{"type":"TypeString","optional":true,"description":"The probe hostname. Defaults to the pod IP address. Setting a value for `Host` in `headers` can be used to override this for `http` and `https` type probes."},"interval_seconds":{"type":"TypeInt","optional":true,"default":10,"description":"How often, in seconds, the probe should run. Possible values are between `1` and `240`. Defaults to `10`"},"path":{"type":"TypeString","optional":true,"description":"The URI to use for http type probes. Not valid for `TCP` type probes. Defaults to `/`.","computed":true},"port":{"type":"TypeInt","required":true,"description":"The port number on which to connect. Possible values are between `1` and `65535`."},"success_count_threshold":{"type":"TypeInt","optional":true,"default":3,"description":"The number of consecutive successful responses required to consider this probe as successful. Possible values are between `1` and `10`. Defaults to `3`."},"timeout":{"type":"TypeInt","optional":true,"default":1,"description":"Time in seconds after which the probe times out. Possible values are between `1` an `240`. Defaults to `1`."},"transport":{"type":"TypeString","required":true,"description":"Type of probe. Possible values are `TCP`, `HTTP`, and `HTTPS`."}}},"minItems":1},"startup_probe":{"type":"TypeList","optional":true,"elem":{"schema":{"failure_count_threshold":{"type":"TypeInt","optional":true,"default":3,"description":"The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`."},"header":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The HTTP Header Name."},"value":{"type":"TypeString","required":true,"description":"The HTTP Header value."}}}},"host":{"type":"TypeString","optional":true,"description":"The probe hostname. Defaults to the pod IP address. Setting a value for `Host` in `headers` can be used to override this for `http` and `https` type probes."},"interval_seconds":{"type":"TypeInt","optional":true,"default":10,"description":"How often, in seconds, the probe should run. Possible values are between `1` and `240`. Defaults to `10`"},"path":{"type":"TypeString","optional":true,"description":"The URI to use with the `host` for http type probes. Not valid for `TCP` type probes. Defaults to `/`.","computed":true},"port":{"type":"TypeInt","required":true,"description":"The port number on which to connect. Possible values are between `1` and `65535`."},"termination_grace_period_seconds":{"type":"TypeInt","description":"The time in seconds after the container is sent the termination signal before the process if forcibly killed.","computed":true},"timeout":{"type":"TypeInt","optional":true,"default":1,"description":"Time in seconds after which the probe times out. Possible values are between `1` an `240`. Defaults to `1`."},"transport":{"type":"TypeString","required":true,"description":"Type of probe. Possible values are `TCP`, `HTTP`, and `HTTPS`."}}},"minItems":1},"volume_mounts":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name of the Volume to be mounted in the container."},"path":{"type":"TypeString","required":true,"description":"The path in the container at which to mount this volume."}}}}}},"minItems":1},"init_container":{"type":"TypeList","optional":true,"elem":{"schema":{"args":{"type":"TypeList","optional":true,"description":"A list of args to pass to the container.","elem":{"type":"TypeString"}},"command":{"type":"TypeList","optional":true,"description":"A command to pass to the container to override the default. This is provided as a list of command line elements without spaces.","elem":{"type":"TypeString"}},"cpu":{"type":"TypeFloat","optional":true,"description":"The amount of vCPU to allocate to the container. Possible values include `0.25`, `0.5`, `0.75`, `1.0`, `1.25`, `1.5`, `1.75`, and `2.0`. **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.0` / `2.0` or `0.5` / `1.0`. When there's a workload profile specified, there's no such constraint."},"env":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name of the environment variable for the container."},"secret_name":{"type":"TypeString","optional":true,"description":"The name of the secret that contains the value for this environment variable."},"value":{"type":"TypeString","optional":true,"description":"The value for this environment variable. **NOTE:** This value is ignored if `secret_name` is used"}}},"minItems":1},"ephemeral_storage":{"type":"TypeString","description":"The amount of ephemeral storage available to the Container App.","computed":true},"image":{"type":"TypeString","required":true,"description":"The image to use to create the container."},"memory":{"type":"TypeString","optional":true,"description":"The amount of memory to allocate to the container. Possible values include `0.5Gi`, `1.0Gi`, `1.5Gi`, `2.0Gi`, `2.5Gi`, `3.0Gi`, `3.5Gi`, and `4.0Gi`. **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.25` / `2.5Gi` or `0.75` / `1.5Gi`. When there's a workload profile specified, there's no such constraint."},"name":{"type":"TypeString","required":true,"description":"The name of the container."},"volume_mounts":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name of the Volume to be mounted in the container."},"path":{"type":"TypeString","required":true,"description":"The path in the container at which to mount this volume."}}}}}},"minItems":1},"volume":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name of the volume."},"storage_name":{"type":"TypeString","optional":true,"description":"The name of the `AzureFile` storage. Required when `storage_type` is `AzureFile`"},"storage_type":{"type":"TypeString","optional":true,"default":"EmptyDir","description":"The type of storage volume. Possible values include `AzureFile` and `EmptyDir`. Defaults to `EmptyDir`."}}},"minItems":1}}},"maxItems":1},"workload_profile_name":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_connected_registry":{"schema":{"audit_log_enabled":{"type":"TypeBool","optional":true,"default":false},"client_token_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"container_registry_id":{"type":"TypeString","required":true,"forceNew":true},"log_level":{"type":"TypeString","optional":true,"default":"None"},"mode":{"type":"TypeString","optional":true,"default":"ReadWrite","forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"notification":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"digest":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"tag":{"type":"TypeString","optional":true}}}},"parent_registry_id":{"type":"TypeString","optional":true,"forceNew":true},"sync_message_ttl":{"type":"TypeString","optional":true,"default":"P1D"},"sync_schedule":{"type":"TypeString","optional":true,"default":"* * * * *"},"sync_token_id":{"type":"TypeString","required":true,"forceNew":true},"sync_window":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_group":{"schema":{"container":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"commands":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"type":"TypeString"}},"cpu":{"type":"TypeFloat","required":true,"forceNew":true},"cpu_limit":{"type":"TypeFloat","optional":true},"environment_variables":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"image":{"type":"TypeString","required":true,"forceNew":true},"liveness_probe":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"exec":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"failure_threshold":{"type":"TypeInt","optional":true,"forceNew":true},"http_get":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"http_headers":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"path":{"type":"TypeString","optional":true,"forceNew":true},"port":{"type":"TypeInt","optional":true,"forceNew":true},"scheme":{"type":"TypeString","optional":true,"forceNew":true}}}},"initial_delay_seconds":{"type":"TypeInt","optional":true,"forceNew":true},"period_seconds":{"type":"TypeInt","optional":true,"forceNew":true},"success_threshold":{"type":"TypeInt","optional":true,"forceNew":true},"timeout_seconds":{"type":"TypeInt","optional":true,"forceNew":true}}},"maxItems":1},"memory":{"type":"TypeFloat","required":true,"forceNew":true},"memory_limit":{"type":"TypeFloat","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"ports":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"port":{"type":"TypeInt","optional":true,"forceNew":true},"protocol":{"type":"TypeString","optional":true,"default":"TCP","forceNew":true}}}},"readiness_probe":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"exec":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"failure_threshold":{"type":"TypeInt","optional":true,"forceNew":true},"http_get":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"http_headers":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"path":{"type":"TypeString","optional":true,"forceNew":true},"port":{"type":"TypeInt","optional":true,"forceNew":true},"scheme":{"type":"TypeString","optional":true,"forceNew":true}}}},"initial_delay_seconds":{"type":"TypeInt","optional":true,"forceNew":true},"period_seconds":{"type":"TypeInt","optional":true,"forceNew":true},"success_threshold":{"type":"TypeInt","optional":true,"forceNew":true},"timeout_seconds":{"type":"TypeInt","optional":true,"forceNew":true}}},"maxItems":1},"secure_environment_variables":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"security":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"privilege_enabled":{"type":"TypeBool","required":true,"forceNew":true}}}},"volume":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"empty_dir":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"git_repo":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"directory":{"type":"TypeString","optional":true,"forceNew":true},"revision":{"type":"TypeString","optional":true,"forceNew":true},"url":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"mount_path":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"read_only":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"secret":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"share_name":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_key":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_name":{"type":"TypeString","optional":true,"forceNew":true}}}}}}},"diagnostics":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"log_analytics":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"log_type":{"type":"TypeString","optional":true,"forceNew":true},"metadata":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","required":true,"forceNew":true},"workspace_key":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"dns_config":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"nameservers":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"options":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"search_domains":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"dns_name_label":{"type":"TypeString","optional":true,"forceNew":true},"dns_name_label_reuse_policy":{"type":"TypeString","optional":true,"default":"Unsecure"},"exposed_port":{"type":"TypeSet","configMode":"Auto","optional":true,"computed":true,"forceNew":true,"elem":{"schema":{"port":{"type":"TypeInt","optional":true,"forceNew":true},"protocol":{"type":"TypeString","optional":true,"default":"TCP","forceNew":true}}}},"fqdn":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"image_registry_credential":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"user_assigned_identity_id":{"type":"TypeString","optional":true,"description":"The User Assigned Identity to use for Container Registry access.","forceNew":true},"username":{"type":"TypeString","optional":true,"forceNew":true}}}},"init_container":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"commands":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"type":"TypeString"}},"environment_variables":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"image":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"secure_environment_variables":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"security":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"privilege_enabled":{"type":"TypeBool","required":true,"forceNew":true}}}},"volume":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"empty_dir":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"git_repo":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"directory":{"type":"TypeString","optional":true,"forceNew":true},"revision":{"type":"TypeString","optional":true,"forceNew":true},"url":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"mount_path":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"read_only":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"secret":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"share_name":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_key":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_name":{"type":"TypeString","optional":true,"forceNew":true}}}}}}},"ip_address":{"type":"TypeString","computed":true},"ip_address_type":{"type":"TypeString","optional":true,"default":"Public","forceNew":true},"key_vault_key_id":{"type":"TypeString","optional":true,"forceNew":true},"key_vault_user_assigned_identity_id":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_profile_id":{"type":"TypeString","optional":true,"computed":true},"os_type":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"restart_policy":{"type":"TypeString","optional":true,"default":"Always","forceNew":true},"sku":{"type":"TypeString","optional":true,"default":"Standard","forceNew":true},"subnet_ids":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":30,"update":30}},"azurerm_container_registry":{"schema":{"admin_enabled":{"type":"TypeBool","optional":true,"default":false},"admin_password":{"type":"TypeString","computed":true},"admin_username":{"type":"TypeString","computed":true},"anonymous_pull_enabled":{"type":"TypeBool","optional":true},"data_endpoint_enabled":{"type":"TypeBool","optional":true},"encryption":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"identity_client_id":{"type":"TypeString","required":true},"key_vault_key_id":{"type":"TypeString","required":true}}},"maxItems":1},"export_policy_enabled":{"type":"TypeBool","optional":true,"default":true},"georeplications":{"type":"TypeList","optional":true,"elem":{"schema":{"location":{"type":"TypeString","required":true},"regional_endpoint_enabled":{"type":"TypeBool","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zone_redundancy_enabled":{"type":"TypeBool","optional":true,"default":false}}}},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"login_server":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_rule_bypass_option":{"type":"TypeString","optional":true,"default":"AzureServices"},"network_rule_set":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"default_action":{"type":"TypeString","optional":true,"default":"Allow"},"ip_rule":{"type":"TypeSet","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"ip_range":{"type":"TypeString","required":true}}}}}},"maxItems":1},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"quarantine_policy_enabled":{"type":"TypeBool","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_policy_in_days":{"type":"TypeInt","optional":true},"sku":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"trust_policy_enabled":{"type":"TypeBool","optional":true,"default":false},"zone_redundancy_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_registry_agent_pool":{"schema":{"container_registry_name":{"type":"TypeString","required":true,"forceNew":true},"instance_count":{"type":"TypeInt","optional":true,"default":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tier":{"type":"TypeString","optional":true,"default":"S1","forceNew":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_registry_cache_rule":{"schema":{"container_registry_id":{"type":"TypeString","required":true,"forceNew":true},"credential_set_id":{"type":"TypeString","optional":true,"description":"The ARM resource ID of the credential store which is associated with the cache rule."},"name":{"type":"TypeString","required":true,"description":"The name of the cache rule.","forceNew":true},"source_repo":{"type":"TypeString","required":true,"description":"The full source repository path such as 'docker.io/library/ubuntu'.","forceNew":true},"target_repo":{"type":"TypeString","required":true,"description":"The target repository namespace such as 'ubuntu'.","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_registry_scope_map":{"schema":{"actions":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"container_registry_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_registry_task":{"schema":{"agent_pool_name":{"type":"TypeString","optional":true},"agent_setting":{"type":"TypeList","optional":true,"elem":{"schema":{"cpu":{"type":"TypeInt","required":true}}},"maxItems":1},"base_image_trigger":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true},"update_trigger_endpoint":{"type":"TypeString","optional":true},"update_trigger_payload_type":{"type":"TypeString","optional":true}}},"maxItems":1},"container_registry_id":{"type":"TypeString","required":true,"forceNew":true},"docker_step":{"type":"TypeList","optional":true,"elem":{"schema":{"arguments":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"cache_enabled":{"type":"TypeBool","optional":true,"default":true},"context_access_token":{"type":"TypeString","required":true},"context_path":{"type":"TypeString","required":true},"dockerfile_path":{"type":"TypeString","required":true},"image_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"push_enabled":{"type":"TypeBool","optional":true,"default":true},"secret_arguments":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"target":{"type":"TypeString","optional":true}}},"maxItems":1},"enabled":{"type":"TypeBool","optional":true,"default":true},"encoded_step":{"type":"TypeList","optional":true,"elem":{"schema":{"context_access_token":{"type":"TypeString","optional":true},"context_path":{"type":"TypeString","optional":true},"secret_values":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"task_content":{"type":"TypeString","required":true},"value_content":{"type":"TypeString","optional":true},"values":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"file_step":{"type":"TypeList","optional":true,"elem":{"schema":{"context_access_token":{"type":"TypeString","optional":true},"context_path":{"type":"TypeString","optional":true},"secret_values":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"task_file_path":{"type":"TypeString","required":true},"value_file_path":{"type":"TypeString","optional":true},"values":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"is_system_task":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"log_template":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"platform":{"type":"TypeList","optional":true,"elem":{"schema":{"architecture":{"type":"TypeString","optional":true},"os":{"type":"TypeString","required":true},"variant":{"type":"TypeString","optional":true}}},"maxItems":1},"registry_credential":{"type":"TypeList","optional":true,"elem":{"schema":{"custom":{"type":"TypeSet","optional":true,"elem":{"schema":{"identity":{"type":"TypeString","optional":true},"login_server":{"type":"TypeString","required":true},"password":{"type":"TypeString","optional":true},"username":{"type":"TypeString","optional":true}}}},"source":{"type":"TypeList","optional":true,"elem":{"schema":{"login_mode":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"source_trigger":{"type":"TypeList","optional":true,"elem":{"schema":{"authentication":{"type":"TypeList","optional":true,"elem":{"schema":{"expire_in_seconds":{"type":"TypeInt","optional":true},"refresh_token":{"type":"TypeString","optional":true},"scope":{"type":"TypeString","optional":true},"token":{"type":"TypeString","required":true},"token_type":{"type":"TypeString","required":true}}},"maxItems":1},"branch":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"events":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"repository_url":{"type":"TypeString","required":true},"source_type":{"type":"TypeString","required":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"timeout_in_seconds":{"type":"TypeInt","optional":true,"default":3600},"timer_trigger":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true},"schedule":{"type":"TypeString","required":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_registry_task_schedule_run_now":{"schema":{"container_registry_task_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_container_registry_token":{"schema":{"container_registry_name":{"type":"TypeString","required":true,"forceNew":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scope_map_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_registry_token_password":{"schema":{"container_registry_token_id":{"type":"TypeString","required":true,"forceNew":true},"password1":{"type":"TypeList","required":true,"elem":{"schema":{"expiry":{"type":"TypeString","optional":true,"forceNew":true},"value":{"type":"TypeString","computed":true}}},"maxItems":1},"password2":{"type":"TypeList","optional":true,"elem":{"schema":{"expiry":{"type":"TypeString","optional":true,"forceNew":true},"value":{"type":"TypeString","computed":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_registry_webhook":{"schema":{"actions":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"custom_headers":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"registry_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scope":{"type":"TypeString","optional":true,"default":""},"service_uri":{"type":"TypeString","required":true},"status":{"type":"TypeString","optional":true,"default":"enabled"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_account":{"schema":{"access_key_metadata_writes_enabled":{"type":"TypeBool","optional":true,"default":true},"analytical_storage":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"schema_type":{"type":"TypeString","required":true}}},"maxItems":1},"analytical_storage_enabled":{"type":"TypeBool","optional":true,"default":false},"automatic_failover_enabled":{"type":"TypeBool","optional":true,"default":false},"backup":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"interval_in_minutes":{"type":"TypeInt","optional":true,"computed":true},"retention_in_hours":{"type":"TypeInt","optional":true,"computed":true},"storage_redundancy":{"type":"TypeString","optional":true,"computed":true},"tier":{"type":"TypeString","optional":true,"computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"burst_capacity_enabled":{"type":"TypeBool","optional":true,"default":false},"capabilities":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"name":{"type":"TypeString","required":true}}}},"capacity":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"total_throughput_limit":{"type":"TypeInt","required":true}}},"maxItems":1},"consistency_policy":{"type":"TypeList","required":true,"elem":{"schema":{"consistency_level":{"type":"TypeString","required":true},"max_interval_in_seconds":{"type":"TypeInt","optional":true,"default":5},"max_staleness_prefix":{"type":"TypeInt","optional":true,"default":100}}},"maxItems":1},"cors_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_headers":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64},"allowed_methods":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64},"allowed_origins":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64},"exposed_headers":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64},"max_age_in_seconds":{"type":"TypeInt","optional":true}}},"maxItems":1},"create_mode":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"default_identity_type":{"type":"TypeString","optional":true,"default":"FirstPartyIdentity"},"endpoint":{"type":"TypeString","computed":true},"free_tier_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"geo_location":{"type":"TypeSet","required":true,"elem":{"schema":{"failover_priority":{"type":"TypeInt","required":true},"id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true},"zone_redundant":{"type":"TypeBool","optional":true,"default":false}}}},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"ip_range_filter":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"is_virtual_network_filter_enabled":{"type":"TypeBool","optional":true,"default":false},"key_vault_key_id":{"type":"TypeString","optional":true,"forceNew":true},"kind":{"type":"TypeString","optional":true,"default":"GlobalDocumentDB","forceNew":true},"local_authentication_disabled":{"type":"TypeBool","optional":true,"default":false},"location":{"type":"TypeString","required":true,"forceNew":true},"minimal_tls_version":{"type":"TypeString","optional":true,"default":"Tls12"},"mongo_server_version":{"type":"TypeString","optional":true,"computed":true},"multiple_write_locations_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"network_acl_bypass_for_azure_services":{"type":"TypeBool","optional":true,"default":false},"network_acl_bypass_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"offer_type":{"type":"TypeString","required":true},"partition_merge_enabled":{"type":"TypeBool","optional":true,"default":false},"primary_key":{"type":"TypeString","computed":true},"primary_mongodb_connection_string":{"type":"TypeString","computed":true},"primary_readonly_key":{"type":"TypeString","computed":true},"primary_readonly_mongodb_connection_string":{"type":"TypeString","computed":true},"primary_readonly_sql_connection_string":{"type":"TypeString","computed":true},"primary_sql_connection_string":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"read_endpoints":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"restore":{"type":"TypeList","optional":true,"elem":{"schema":{"database":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"collection_names":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true}}}},"gremlin_database":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"graph_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true}}}},"restore_timestamp_in_utc":{"type":"TypeString","required":true,"forceNew":true},"source_cosmosdb_account_id":{"type":"TypeString","required":true,"forceNew":true},"tables_to_restore":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"secondary_key":{"type":"TypeString","computed":true},"secondary_mongodb_connection_string":{"type":"TypeString","computed":true},"secondary_readonly_key":{"type":"TypeString","computed":true},"secondary_readonly_mongodb_connection_string":{"type":"TypeString","computed":true},"secondary_readonly_sql_connection_string":{"type":"TypeString","computed":true},"secondary_sql_connection_string":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_network_rule":{"type":"TypeSet","optional":true,"elem":{"schema":{"id":{"type":"TypeString","required":true},"ignore_missing_vnet_service_endpoint":{"type":"TypeBool","optional":true,"default":false}}}},"write_endpoints":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_cosmosdb_cassandra_cluster":{"schema":{"authentication_method":{"type":"TypeString","optional":true,"default":"Cassandra"},"client_certificate_pems":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"default_admin_password":{"type":"TypeString","required":true,"forceNew":true},"delegated_management_subnet_id":{"type":"TypeString","required":true,"forceNew":true},"external_gossip_certificate_pems":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"external_seed_node_ip_addresses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"hours_between_backups":{"type":"TypeInt","optional":true,"default":24},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"repair_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"version":{"type":"TypeString","optional":true,"default":"3.11","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_cassandra_datacenter":{"schema":{"availability_zones_enabled":{"type":"TypeBool","optional":true,"default":true},"backup_storage_customer_key_uri":{"type":"TypeString","optional":true},"base64_encoded_yaml_fragment":{"type":"TypeString","optional":true},"cassandra_cluster_id":{"type":"TypeString","required":true,"forceNew":true},"delegated_management_subnet_id":{"type":"TypeString","required":true,"forceNew":true},"disk_count":{"type":"TypeInt","optional":true},"disk_sku":{"type":"TypeString","optional":true,"default":"P30"},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_disk_customer_key_uri":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"node_count":{"type":"TypeInt","optional":true,"default":3},"seed_node_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"sku_name":{"type":"TypeString","optional":true,"default":"Standard_E16s_v5"}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_cosmosdb_cassandra_keyspace":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"autoscale_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"max_throughput":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"throughput":{"type":"TypeInt","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_cassandra_table":{"schema":{"analytical_storage_ttl":{"type":"TypeInt","optional":true,"forceNew":true},"autoscale_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"max_throughput":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"cassandra_keyspace_id":{"type":"TypeString","required":true,"forceNew":true},"default_ttl":{"type":"TypeInt","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"schema":{"type":"TypeList","required":true,"elem":{"schema":{"cluster_key":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"order_by":{"type":"TypeString","required":true}}}},"column":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}},"minItems":1},"partition_key":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true}}}}}},"maxItems":1},"throughput":{"type":"TypeInt","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_gremlin_database":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"autoscale_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"max_throughput":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"throughput":{"type":"TypeInt","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_gremlin_graph":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"analytical_storage_ttl":{"type":"TypeInt","optional":true},"autoscale_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"max_throughput":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"conflict_resolution_policy":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"schema":{"conflict_resolution_path":{"type":"TypeString","optional":true},"conflict_resolution_procedure":{"type":"TypeString","optional":true},"mode":{"type":"TypeString","required":true}}},"maxItems":1},"database_name":{"type":"TypeString","required":true,"forceNew":true},"default_ttl":{"type":"TypeInt","optional":true},"index_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"automatic":{"type":"TypeBool","optional":true,"default":true},"composite_index":{"type":"TypeList","optional":true,"elem":{"schema":{"index":{"type":"TypeList","required":true,"elem":{"schema":{"order":{"type":"TypeString","required":true},"path":{"type":"TypeString","required":true}}},"minItems":1}}}},"excluded_paths":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"included_paths":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"indexing_mode":{"type":"TypeString","required":true},"spatial_index":{"type":"TypeList","optional":true,"elem":{"schema":{"path":{"type":"TypeString","required":true},"types":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}}}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"partition_key_path":{"type":"TypeString","required":true,"forceNew":true},"partition_key_version":{"type":"TypeInt","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"throughput":{"type":"TypeInt","optional":true,"computed":true},"unique_key":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"paths":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_mongo_collection":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"analytical_storage_ttl":{"type":"TypeInt","optional":true},"autoscale_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"max_throughput":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"database_name":{"type":"TypeString","required":true,"forceNew":true},"default_ttl_seconds":{"type":"TypeInt","optional":true},"index":{"type":"TypeSet","optional":true,"elem":{"schema":{"keys":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"unique":{"type":"TypeBool","optional":true,"default":false}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"shard_key":{"type":"TypeString","optional":true,"forceNew":true},"system_indexes":{"type":"TypeList","computed":true,"elem":{"schema":{"keys":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"unique":{"type":"TypeBool","computed":true}}}},"throughput":{"type":"TypeInt","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_mongo_database":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"autoscale_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"max_throughput":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"throughput":{"type":"TypeInt","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_mongo_role_definition":{"schema":{"cosmos_mongo_database_id":{"type":"TypeString","required":true,"forceNew":true},"inherited_role_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"privilege":{"type":"TypeList","optional":true,"elem":{"schema":{"actions":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"resource":{"type":"TypeList","required":true,"elem":{"schema":{"collection_name":{"type":"TypeString","optional":true},"db_name":{"type":"TypeString","optional":true}}},"maxItems":1}}}},"role_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_mongo_user_definition":{"schema":{"cosmos_mongo_database_id":{"type":"TypeString","required":true,"forceNew":true},"inherited_role_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_postgresql_cluster":{"schema":{"administrator_login_password":{"type":"TypeString","optional":true},"citus_version":{"type":"TypeString","optional":true,"computed":true},"coordinator_public_ip_access_enabled":{"type":"TypeBool","optional":true,"default":true},"coordinator_server_edition":{"type":"TypeString","optional":true,"default":"GeneralPurpose"},"coordinator_storage_quota_in_mb":{"type":"TypeInt","optional":true},"coordinator_vcore_count":{"type":"TypeInt","optional":true},"earliest_restore_time":{"type":"TypeString","computed":true},"ha_enabled":{"type":"TypeBool","optional":true,"default":false},"location":{"type":"TypeString","required":true,"forceNew":true},"maintenance_window":{"type":"TypeList","optional":true,"elem":{"schema":{"day_of_week":{"type":"TypeInt","optional":true,"default":0},"start_hour":{"type":"TypeInt","optional":true,"default":0},"start_minute":{"type":"TypeInt","optional":true,"default":0}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"node_count":{"type":"TypeInt","required":true},"node_public_ip_access_enabled":{"type":"TypeBool","optional":true,"default":false},"node_server_edition":{"type":"TypeString","optional":true,"default":"MemoryOptimized"},"node_storage_quota_in_mb":{"type":"TypeInt","optional":true,"computed":true},"node_vcores":{"type":"TypeInt","optional":true,"computed":true},"point_in_time_in_utc":{"type":"TypeString","optional":true,"forceNew":true},"preferred_primary_zone":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"servers":{"type":"TypeList","computed":true,"elem":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"shards_on_coordinator_enabled":{"type":"TypeBool","optional":true,"computed":true},"source_location":{"type":"TypeString","optional":true,"forceNew":true},"source_resource_id":{"type":"TypeString","optional":true,"forceNew":true},"sql_version":{"type":"TypeString","optional":true,"computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_cosmosdb_postgresql_coordinator_configuration":{"schema":{"cluster_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_postgresql_firewall_rule":{"schema":{"cluster_id":{"type":"TypeString","required":true,"forceNew":true},"end_ip_address":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"start_ip_address":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_postgresql_node_configuration":{"schema":{"cluster_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_postgresql_role":{"schema":{"cluster_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_cosmosdb_sql_container":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"analytical_storage_ttl":{"type":"TypeInt","optional":true},"autoscale_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"max_throughput":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"conflict_resolution_policy":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"schema":{"conflict_resolution_path":{"type":"TypeString","optional":true},"conflict_resolution_procedure":{"type":"TypeString","optional":true},"mode":{"type":"TypeString","required":true}}},"maxItems":1},"database_name":{"type":"TypeString","required":true,"forceNew":true},"default_ttl":{"type":"TypeInt","optional":true},"indexing_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"composite_index":{"type":"TypeList","optional":true,"elem":{"schema":{"index":{"type":"TypeList","required":true,"elem":{"schema":{"order":{"type":"TypeString","required":true},"path":{"type":"TypeString","required":true}}},"minItems":1}}}},"excluded_path":{"type":"TypeList","optional":true,"elem":{"schema":{"path":{"type":"TypeString","required":true}}}},"included_path":{"type":"TypeList","optional":true,"elem":{"schema":{"path":{"type":"TypeString","required":true}}}},"indexing_mode":{"type":"TypeString","optional":true,"default":"consistent"},"spatial_index":{"type":"TypeList","optional":true,"elem":{"schema":{"path":{"type":"TypeString","required":true},"types":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}}}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"partition_key_kind":{"type":"TypeString","optional":true,"default":"Hash","forceNew":true},"partition_key_paths":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"partition_key_version":{"type":"TypeInt","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"throughput":{"type":"TypeInt","optional":true,"computed":true},"unique_key":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"paths":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_sql_database":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"autoscale_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"max_throughput":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"throughput":{"type":"TypeInt","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_sql_dedicated_gateway":{"schema":{"cosmosdb_account_id":{"type":"TypeString","required":true,"forceNew":true},"instance_count":{"type":"TypeInt","required":true},"instance_size":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_sql_function":{"schema":{"body":{"type":"TypeString","required":true},"container_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_sql_role_assignment":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"principal_id":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"role_definition_id":{"type":"TypeString","required":true},"scope":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_sql_role_definition":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"assignable_scopes":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"permissions":{"type":"TypeSet","required":true,"elem":{"schema":{"data_actions":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"role_definition_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"type":{"type":"TypeString","optional":true,"default":"CustomRole","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_sql_stored_procedure":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"body":{"type":"TypeString","required":true},"container_name":{"type":"TypeString","required":true,"forceNew":true},"database_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_sql_trigger":{"schema":{"body":{"type":"TypeString","required":true},"container_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"operation":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_table":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"autoscale_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"max_throughput":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"throughput":{"type":"TypeInt","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cost_anomaly_alert":{"schema":{"display_name":{"type":"TypeString","required":true},"email_addresses":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"email_subject":{"type":"TypeString","required":true},"message":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"subscription_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cost_management_scheduled_action":{"schema":{"day_of_month":{"type":"TypeInt","optional":true},"days_of_week":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"display_name":{"type":"TypeString","required":true},"email_address_sender":{"type":"TypeString","required":true},"email_addresses":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":20,"minItems":1},"email_subject":{"type":"TypeString","required":true},"end_date":{"type":"TypeString","required":true},"frequency":{"type":"TypeString","required":true},"hour_of_day":{"type":"TypeInt","optional":true},"message":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"start_date":{"type":"TypeString","required":true},"view_id":{"type":"TypeString","required":true,"forceNew":true},"weeks_of_month":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_custom_ip_prefix":{"schema":{"cidr":{"type":"TypeString","required":true,"forceNew":true},"commissioning_enabled":{"type":"TypeBool","optional":true,"default":false},"internet_advertising_disabled":{"type":"TypeBool","optional":true,"default":false},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parent_custom_ip_prefix_id":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"roa_validity_end_date":{"type":"TypeString","optional":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"wan_validation_signed_message":{"type":"TypeString","optional":true,"forceNew":true},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":540,"read":5,"delete":1020,"update":1020}},"azurerm_custom_provider":{"schema":{"action":{"type":"TypeSet","optional":true,"elem":{"schema":{"endpoint":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"resource_type":{"type":"TypeSet","optional":true,"elem":{"schema":{"endpoint":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"routing_type":{"type":"TypeString","optional":true,"default":"Proxy"}}}},"tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"validation":{"type":"TypeSet","optional":true,"elem":{"schema":{"specification":{"type":"TypeString","required":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dashboard_grafana":{"schema":{"api_key_enabled":{"type":"TypeBool","optional":true,"default":false},"auto_generated_domain_name_label_scope":{"type":"TypeString","optional":true,"default":"TenantReuse"},"azure_monitor_workspace_integrations":{"type":"TypeList","optional":true,"elem":{"schema":{"resource_id":{"type":"TypeString","required":true}}}},"deterministic_outbound_ip_enabled":{"type":"TypeBool","optional":true,"default":false},"endpoint":{"type":"TypeString","computed":true},"grafana_major_version":{"type":"TypeString","required":true,"forceNew":true},"grafana_version":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"outbound_ip":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","optional":true,"default":"Standard","forceNew":true},"smtp":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":false},"from_address":{"type":"TypeString","required":true},"from_name":{"type":"TypeString","optional":true,"default":"Azure Managed Grafana Notification"},"host":{"type":"TypeString","required":true},"password":{"type":"TypeString","required":true},"start_tls_policy":{"type":"TypeString","required":true},"user":{"type":"TypeString","required":true},"verification_skip_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zone_redundancy_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory":{"schema":{"customer_managed_key_id":{"type":"TypeString","optional":true},"customer_managed_key_identity_id":{"type":"TypeString","optional":true},"github_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"account_name":{"type":"TypeString","required":true},"branch_name":{"type":"TypeString","required":true},"git_url":{"type":"TypeString","optional":true},"publishing_enabled":{"type":"TypeBool","optional":true,"default":true},"repository_name":{"type":"TypeString","required":true},"root_folder":{"type":"TypeString","required":true}}},"maxItems":1},"global_parameter":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_virtual_network_enabled":{"type":"TypeBool","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_enabled":{"type":"TypeBool","optional":true,"default":true},"purview_id":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"vsts_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"account_name":{"type":"TypeString","required":true},"branch_name":{"type":"TypeString","required":true},"project_name":{"type":"TypeString","required":true},"publishing_enabled":{"type":"TypeBool","optional":true,"default":true},"repository_name":{"type":"TypeString","required":true},"root_folder":{"type":"TypeString","required":true},"tenant_id":{"type":"TypeString","required":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_credential_service_principal":{"schema":{"annotations":{"type":"TypeList","optional":true,"description":"(Optional) List of string annotations.","elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"description":"The resource ID of the parent Data Factory","forceNew":true},"description":{"type":"TypeString","optional":true,"description":"(Optional) Short text description"},"name":{"type":"TypeString","required":true,"description":"The desired name of the credential resource","forceNew":true},"service_principal_id":{"type":"TypeString","required":true,"description":"The Client ID of the Service Principal"},"service_principal_key":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"secret_name":{"type":"TypeString","required":true},"secret_version":{"type":"TypeString","optional":true}}},"maxItems":1},"tenant_id":{"type":"TypeString","required":true,"description":"The Tenant ID of the Service Principal"}},"timeouts":{"create":5,"read":5,"delete":5,"update":5}},"azurerm_data_factory_credential_user_managed_identity":{"schema":{"annotations":{"type":"TypeList","optional":true,"description":"(Optional) List of string annotations.","elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"description":"The resource ID of the parent Data Factory","forceNew":true},"description":{"type":"TypeString","optional":true,"description":"(Optional) Short text description"},"identity_id":{"type":"TypeString","required":true,"description":"The resource ID of the User Assigned Managed Identity","forceNew":true},"name":{"type":"TypeString","required":true,"description":"The desired name of the credential resource","forceNew":true}},"timeouts":{"create":5,"read":5,"delete":5,"update":5}},"azurerm_data_factory_custom_dataset":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"linked_service":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"schema_json":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true,"forceNew":true},"type_properties_json":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_data_flow":{"schema":{"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"script":{"type":"TypeString","optional":true},"script_lines":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"sink":{"type":"TypeList","required":true,"elem":{"schema":{"dataset":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"description":{"type":"TypeString","optional":true},"flowlet":{"type":"TypeList","optional":true,"elem":{"schema":{"dataset_parameters":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"name":{"type":"TypeString","required":true},"rejected_linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"schema_linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}}},"source":{"type":"TypeList","required":true,"elem":{"schema":{"dataset":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"description":{"type":"TypeString","optional":true},"flowlet":{"type":"TypeList","optional":true,"elem":{"schema":{"dataset_parameters":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"name":{"type":"TypeString","required":true},"rejected_linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"schema_linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}}},"transformation":{"type":"TypeList","optional":true,"elem":{"schema":{"dataset":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"description":{"type":"TypeString","optional":true},"flowlet":{"type":"TypeList","optional":true,"elem":{"schema":{"dataset_parameters":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"name":{"type":"TypeString","required":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_dataset_azure_blob":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"dynamic_filename_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_path_enabled":{"type":"TypeBool","optional":true,"default":false},"filename":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"linked_service_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"path":{"type":"TypeString","optional":true},"schema_column":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","optional":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_dataset_azure_sql_table":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"linked_service_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"schema":{"type":"TypeString","optional":true},"schema_column":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","optional":true}}}},"table":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_dataset_binary":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"azure_blob_storage_location":{"type":"TypeList","optional":true,"elem":{"schema":{"container":{"type":"TypeString","required":true},"dynamic_container_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_path_enabled":{"type":"TypeBool","optional":true,"default":false},"filename":{"type":"TypeString","optional":true},"path":{"type":"TypeString","optional":true}}},"maxItems":1},"compression":{"type":"TypeList","optional":true,"elem":{"schema":{"level":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"http_server_location":{"type":"TypeList","optional":true,"elem":{"schema":{"dynamic_filename_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_path_enabled":{"type":"TypeBool","optional":true,"default":false},"filename":{"type":"TypeString","required":true},"path":{"type":"TypeString","required":true},"relative_url":{"type":"TypeString","required":true}}},"maxItems":1},"linked_service_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"sftp_server_location":{"type":"TypeList","optional":true,"elem":{"schema":{"dynamic_filename_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_path_enabled":{"type":"TypeBool","optional":true,"default":false},"filename":{"type":"TypeString","required":true},"path":{"type":"TypeString","required":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_dataset_cosmosdb_sqlapi":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"collection_name":{"type":"TypeString","optional":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"linked_service_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"schema_column":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","optional":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_dataset_delimited_text":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"azure_blob_fs_location":{"type":"TypeList","optional":true,"elem":{"schema":{"dynamic_file_system_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_path_enabled":{"type":"TypeBool","optional":true,"default":false},"file_system":{"type":"TypeString","optional":true},"filename":{"type":"TypeString","optional":true},"path":{"type":"TypeString","optional":true}}},"maxItems":1},"azure_blob_storage_location":{"type":"TypeList","optional":true,"elem":{"schema":{"container":{"type":"TypeString","required":true},"dynamic_container_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_path_enabled":{"type":"TypeBool","optional":true,"default":false},"filename":{"type":"TypeString","optional":true},"path":{"type":"TypeString","optional":true}}},"maxItems":1},"column_delimiter":{"type":"TypeString","optional":true,"default":","},"compression_codec":{"type":"TypeString","optional":true},"compression_level":{"type":"TypeString","optional":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"encoding":{"type":"TypeString","optional":true},"escape_character":{"type":"TypeString","optional":true,"default":"\\"},"first_row_as_header":{"type":"TypeBool","optional":true,"default":false},"folder":{"type":"TypeString","optional":true},"http_server_location":{"type":"TypeList","optional":true,"elem":{"schema":{"dynamic_filename_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_path_enabled":{"type":"TypeBool","optional":true,"default":false},"filename":{"type":"TypeString","required":true},"path":{"type":"TypeString","required":true},"relative_url":{"type":"TypeString","required":true}}},"maxItems":1},"linked_service_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"null_value":{"type":"TypeString","optional":true,"default":""},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"quote_character":{"type":"TypeString","optional":true,"default":"\""},"row_delimiter":{"type":"TypeString","optional":true},"schema_column":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","optional":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_dataset_http":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"linked_service_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"relative_url":{"type":"TypeString","optional":true},"request_body":{"type":"TypeString","optional":true},"request_method":{"type":"TypeString","optional":true},"schema_column":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","optional":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_dataset_json":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"azure_blob_storage_location":{"type":"TypeList","optional":true,"elem":{"schema":{"container":{"type":"TypeString","required":true},"dynamic_container_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_path_enabled":{"type":"TypeBool","optional":true,"default":false},"filename":{"type":"TypeString","required":true},"path":{"type":"TypeString","required":true}}},"maxItems":1},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"encoding":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"http_server_location":{"type":"TypeList","optional":true,"elem":{"schema":{"dynamic_filename_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_path_enabled":{"type":"TypeBool","optional":true,"default":false},"filename":{"type":"TypeString","required":true},"path":{"type":"TypeString","required":true},"relative_url":{"type":"TypeString","required":true}}},"maxItems":1},"linked_service_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"schema_column":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","optional":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_dataset_mysql":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"linked_service_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"schema_column":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","optional":true}}}},"table_name":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_dataset_parquet":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"azure_blob_fs_location":{"type":"TypeList","optional":true,"elem":{"schema":{"dynamic_file_system_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_path_enabled":{"type":"TypeBool","optional":true,"default":false},"file_system":{"type":"TypeString","optional":true},"filename":{"type":"TypeString","optional":true},"path":{"type":"TypeString","optional":true}}},"maxItems":1},"azure_blob_storage_location":{"type":"TypeList","optional":true,"elem":{"schema":{"container":{"type":"TypeString","required":true},"dynamic_container_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_path_enabled":{"type":"TypeBool","optional":true,"default":false},"filename":{"type":"TypeString","optional":true},"path":{"type":"TypeString","optional":true}}},"maxItems":1},"compression_codec":{"type":"TypeString","optional":true},"compression_level":{"type":"TypeString","optional":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"http_server_location":{"type":"TypeList","optional":true,"elem":{"schema":{"dynamic_filename_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_path_enabled":{"type":"TypeBool","optional":true,"default":false},"filename":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true},"relative_url":{"type":"TypeString","required":true}}},"maxItems":1},"linked_service_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"schema_column":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","optional":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_dataset_postgresql":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"linked_service_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"schema_column":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","optional":true}}}},"table_name":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_dataset_snowflake":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"linked_service_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"schema_column":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"precision":{"type":"TypeInt","optional":true},"scale":{"type":"TypeInt","optional":true},"type":{"type":"TypeString","optional":true}}}},"schema_name":{"type":"TypeString","optional":true},"table_name":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_dataset_sql_server_table":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"linked_service_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"schema_column":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","optional":true}}}},"table_name":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_flowlet_data_flow":{"schema":{"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"script":{"type":"TypeString","optional":true},"script_lines":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"sink":{"type":"TypeList","optional":true,"elem":{"schema":{"dataset":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"description":{"type":"TypeString","optional":true},"flowlet":{"type":"TypeList","optional":true,"elem":{"schema":{"dataset_parameters":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"name":{"type":"TypeString","required":true},"rejected_linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"schema_linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}}},"source":{"type":"TypeList","optional":true,"elem":{"schema":{"dataset":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"description":{"type":"TypeString","optional":true},"flowlet":{"type":"TypeList","optional":true,"elem":{"schema":{"dataset_parameters":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"name":{"type":"TypeString","required":true},"rejected_linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"schema_linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}}},"transformation":{"type":"TypeList","optional":true,"elem":{"schema":{"dataset":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"description":{"type":"TypeString","optional":true},"flowlet":{"type":"TypeList","optional":true,"elem":{"schema":{"dataset_parameters":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"name":{"type":"TypeString","required":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_integration_runtime_azure":{"schema":{"cleanup_enabled":{"type":"TypeBool","optional":true,"default":true},"compute_type":{"type":"TypeString","optional":true,"default":"General"},"core_count":{"type":"TypeInt","optional":true,"default":8},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"time_to_live_min":{"type":"TypeInt","optional":true,"default":0},"virtual_network_enabled":{"type":"TypeBool","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_integration_runtime_azure_ssis":{"schema":{"catalog_info":{"type":"TypeList","optional":true,"elem":{"schema":{"administrator_login":{"type":"TypeString","optional":true},"administrator_password":{"type":"TypeString","optional":true},"dual_standby_pair_name":{"type":"TypeString","optional":true},"elastic_pool_name":{"type":"TypeString","optional":true},"pricing_tier":{"type":"TypeString","optional":true},"server_endpoint":{"type":"TypeString","required":true}}},"maxItems":1},"copy_compute_scale":{"type":"TypeList","optional":true,"elem":{"schema":{"data_integration_unit":{"type":"TypeInt","optional":true},"time_to_live":{"type":"TypeInt","optional":true}}},"maxItems":1},"credential_name":{"type":"TypeString","optional":true},"custom_setup_script":{"type":"TypeList","optional":true,"elem":{"schema":{"blob_container_uri":{"type":"TypeString","required":true},"sas_token":{"type":"TypeString","required":true}}},"maxItems":1},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"edition":{"type":"TypeString","optional":true,"default":"Standard"},"express_custom_setup":{"type":"TypeList","optional":true,"elem":{"schema":{"command_key":{"type":"TypeList","optional":true,"elem":{"schema":{"key_vault_password":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"secret_name":{"type":"TypeString","required":true},"secret_version":{"type":"TypeString","optional":true}}},"maxItems":1},"password":{"type":"TypeString","optional":true},"target_name":{"type":"TypeString","required":true},"user_name":{"type":"TypeString","required":true}}}},"component":{"type":"TypeList","optional":true,"elem":{"schema":{"key_vault_license":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"secret_name":{"type":"TypeString","required":true},"secret_version":{"type":"TypeString","optional":true}}},"maxItems":1},"license":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true}}}},"environment":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"powershell_version":{"type":"TypeString","optional":true}}},"maxItems":1},"express_vnet_integration":{"type":"TypeList","optional":true,"elem":{"schema":{"subnet_id":{"type":"TypeString","required":true}}},"maxItems":1},"license_type":{"type":"TypeString","optional":true,"default":"LicenseIncluded"},"location":{"type":"TypeString","required":true,"forceNew":true},"max_parallel_executions_per_node":{"type":"TypeInt","optional":true,"default":1},"name":{"type":"TypeString","required":true,"forceNew":true},"node_size":{"type":"TypeString","required":true},"number_of_nodes":{"type":"TypeInt","optional":true,"default":1},"package_store":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}},"pipeline_external_compute_scale":{"type":"TypeList","optional":true,"elem":{"schema":{"number_of_external_nodes":{"type":"TypeInt","optional":true},"number_of_pipeline_nodes":{"type":"TypeInt","optional":true},"time_to_live":{"type":"TypeInt","optional":true}}},"maxItems":1},"proxy":{"type":"TypeList","optional":true,"elem":{"schema":{"path":{"type":"TypeString","optional":true},"self_hosted_integration_runtime_name":{"type":"TypeString","required":true},"staging_storage_linked_service_name":{"type":"TypeString","required":true}}},"maxItems":1},"vnet_integration":{"type":"TypeList","optional":true,"elem":{"schema":{"public_ips":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":2,"minItems":2},"subnet_id":{"type":"TypeString","optional":true},"subnet_name":{"type":"TypeString","optional":true},"vnet_id":{"type":"TypeString","optional":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_integration_runtime_self_hosted":{"schema":{"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_authorization_key":{"type":"TypeString","computed":true},"rbac_authorization":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"resource_id":{"type":"TypeString","required":true}}}},"secondary_authorization_key":{"type":"TypeString","computed":true},"self_contained_interactive_authoring_enabled":{"type":"TypeBool","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_custom_service":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true,"forceNew":true},"type_properties_json":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_azure_blob_storage":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"connection_string":{"type":"TypeString","optional":true},"connection_string_insecure":{"type":"TypeString","optional":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"key_vault_sas_token":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"secret_name":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"sas_uri":{"type":"TypeString","optional":true},"service_endpoint":{"type":"TypeString","optional":true},"service_principal_id":{"type":"TypeString","optional":true},"service_principal_key":{"type":"TypeString","optional":true},"service_principal_linked_key_vault_key":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"secret_name":{"type":"TypeString","required":true}}},"maxItems":1},"storage_kind":{"type":"TypeString","optional":true},"tenant_id":{"type":"TypeString","optional":true},"use_managed_identity":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_azure_databricks":{"schema":{"access_token":{"type":"TypeString","optional":true},"adb_domain":{"type":"TypeString","required":true},"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"existing_cluster_id":{"type":"TypeString","optional":true},"instance_pool":{"type":"TypeList","optional":true,"elem":{"schema":{"cluster_version":{"type":"TypeString","required":true},"instance_pool_id":{"type":"TypeString","required":true},"max_number_of_workers":{"type":"TypeInt","optional":true},"min_number_of_workers":{"type":"TypeInt","optional":true,"default":1}}},"maxItems":1},"integration_runtime_name":{"type":"TypeString","optional":true},"key_vault_password":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"secret_name":{"type":"TypeString","required":true}}},"maxItems":1},"msi_work_space_resource_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"new_cluster_config":{"type":"TypeList","optional":true,"elem":{"schema":{"cluster_version":{"type":"TypeString","required":true},"custom_tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"driver_node_type":{"type":"TypeString","optional":true},"init_scripts":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"log_destination":{"type":"TypeString","optional":true},"max_number_of_workers":{"type":"TypeInt","optional":true},"min_number_of_workers":{"type":"TypeInt","optional":true,"default":"1"},"node_type":{"type":"TypeString","required":true},"spark_config":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"spark_environment_variables":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_azure_file_storage":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"connection_string":{"type":"TypeString","required":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"file_share":{"type":"TypeString","optional":true},"host":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"key_vault_password":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"secret_name":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"password":{"type":"TypeString","optional":true},"user_id":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_azure_function":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"key":{"type":"TypeString","optional":true},"key_vault_key":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"secret_name":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"url":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_azure_search":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"encrypted_credential":{"type":"TypeString","computed":true},"integration_runtime_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"search_service_key":{"type":"TypeString","required":true},"url":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_azure_sql_database":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"connection_string":{"type":"TypeString","optional":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"key_vault_connection_string":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"secret_name":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_password":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"secret_name":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"service_principal_id":{"type":"TypeString","optional":true},"service_principal_key":{"type":"TypeString","optional":true},"tenant_id":{"type":"TypeString","optional":true},"use_managed_identity":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_azure_table_storage":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"connection_string":{"type":"TypeString","required":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_cosmosdb":{"schema":{"account_endpoint":{"type":"TypeString","optional":true},"account_key":{"type":"TypeString","optional":true},"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"connection_string":{"type":"TypeString","optional":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"database":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_cosmosdb_mongoapi":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"connection_string":{"type":"TypeString","optional":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"database":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"server_version_is_32_or_higher":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_data_lake_storage_gen2":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"service_principal_id":{"type":"TypeString","optional":true},"service_principal_key":{"type":"TypeString","optional":true},"storage_account_key":{"type":"TypeString","optional":true},"tenant":{"type":"TypeString","optional":true},"url":{"type":"TypeString","required":true},"use_managed_identity":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_key_vault":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"key_vault_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_kusto":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"kusto_database_name":{"type":"TypeString","required":true},"kusto_endpoint":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"service_principal_id":{"type":"TypeString","optional":true},"service_principal_key":{"type":"TypeString","optional":true},"tenant":{"type":"TypeString","optional":true},"use_managed_identity":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_mysql":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"connection_string":{"type":"TypeString","required":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_odata":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"basic_authentication":{"type":"TypeList","optional":true,"elem":{"schema":{"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true}}},"maxItems":1},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"url":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_odbc":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"basic_authentication":{"type":"TypeList","optional":true,"elem":{"schema":{"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true}}},"maxItems":1},"connection_string":{"type":"TypeString","required":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_postgresql":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"connection_string":{"type":"TypeString","required":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_sftp":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"authentication_type":{"type":"TypeString","required":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"host":{"type":"TypeString","required":true},"host_key_fingerprint":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"password":{"type":"TypeString","required":true},"port":{"type":"TypeInt","required":true},"skip_host_key_validation":{"type":"TypeBool","optional":true},"username":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_snowflake":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"connection_string":{"type":"TypeString","required":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"key_vault_password":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"secret_name":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_sql_server":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"connection_string":{"type":"TypeString","optional":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"key_vault_connection_string":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"secret_name":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_password":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"secret_name":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"user_name":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_synapse":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"connection_string":{"type":"TypeString","required":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"key_vault_password":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"secret_name":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_web":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"authentication_type":{"type":"TypeString","required":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"password":{"type":"TypeString","optional":true},"url":{"type":"TypeString","required":true},"username":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_managed_private_endpoint":{"schema":{"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"fqdns":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"subresource_name":{"type":"TypeString","optional":true,"forceNew":true},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_data_factory_pipeline":{"schema":{"activities_json":{"type":"TypeString","optional":true},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"concurrency":{"type":"TypeInt","optional":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"moniter_metrics_after_duration":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"variables":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_trigger_blob_event":{"schema":{"activated":{"type":"TypeBool","optional":true,"default":true},"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"blob_path_begins_with":{"type":"TypeString","optional":true},"blob_path_ends_with":{"type":"TypeString","optional":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"events":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"ignore_empty_blobs":{"type":"TypeBool","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"pipeline":{"type":"TypeSet","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}}},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_trigger_custom_event":{"schema":{"activated":{"type":"TypeBool","optional":true,"default":true},"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"eventgrid_topic_id":{"type":"TypeString","required":true,"forceNew":true},"events":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"pipeline":{"type":"TypeSet","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}}},"subject_begins_with":{"type":"TypeString","optional":true},"subject_ends_with":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_trigger_schedule":{"schema":{"activated":{"type":"TypeBool","optional":true,"default":true},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"end_time":{"type":"TypeString","optional":true},"frequency":{"type":"TypeString","optional":true,"default":"Minute"},"interval":{"type":"TypeInt","optional":true,"default":1},"name":{"type":"TypeString","required":true,"forceNew":true},"pipeline":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}}},"pipeline_name":{"type":"TypeString","optional":true,"computed":true},"pipeline_parameters":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"days_of_month":{"type":"TypeList","optional":true,"elem":{"type":"TypeInt"}},"days_of_week":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":7},"hours":{"type":"TypeList","optional":true,"elem":{"type":"TypeInt"}},"minutes":{"type":"TypeList","optional":true,"elem":{"type":"TypeInt"}},"monthly":{"type":"TypeList","optional":true,"elem":{"schema":{"week":{"type":"TypeInt","optional":true},"weekday":{"type":"TypeString","required":true}}},"minItems":1}}},"maxItems":1,"minItems":1},"start_time":{"type":"TypeString","optional":true,"computed":true},"time_zone":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_trigger_tumbling_window":{"schema":{"activated":{"type":"TypeBool","optional":true,"default":true},"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"delay":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"end_time":{"type":"TypeString","optional":true},"frequency":{"type":"TypeString","required":true,"forceNew":true},"interval":{"type":"TypeInt","required":true,"forceNew":true},"max_concurrency":{"type":"TypeInt","optional":true,"default":50},"name":{"type":"TypeString","required":true,"forceNew":true},"pipeline":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"retry":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeInt","optional":true,"default":30}}},"maxItems":1},"start_time":{"type":"TypeString","required":true,"forceNew":true},"trigger_dependency":{"type":"TypeSet","optional":true,"elem":{"schema":{"offset":{"type":"TypeString","optional":true},"size":{"type":"TypeString","optional":true},"trigger_name":{"type":"TypeString","optional":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_protection_backup_instance_blob_storage":{"schema":{"backup_policy_id":{"type":"TypeString","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"storage_account_container_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true},"vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_protection_backup_instance_disk":{"schema":{"backup_policy_id":{"type":"TypeString","required":true},"disk_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"snapshot_resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_protection_backup_instance_kubernetes_cluster":{"schema":{"backup_datasource_parameters":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"cluster_scoped_resources_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"excluded_namespaces":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"excluded_resource_types":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"included_namespaces":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"included_resource_types":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"label_selectors":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"volume_snapshot_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}}},"maxItems":1},"backup_policy_id":{"type":"TypeString","required":true,"forceNew":true},"kubernetes_cluster_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"snapshot_resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_data_protection_backup_instance_postgresql":{"schema":{"backup_policy_id":{"type":"TypeString","required":true},"database_credential_key_vault_secret_id":{"type":"TypeString","optional":true},"database_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_protection_backup_instance_postgresql_flexible_server":{"schema":{"backup_policy_id":{"type":"TypeString","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"server_id":{"type":"TypeString","required":true,"forceNew":true},"vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_data_protection_backup_policy_blob_storage":{"schema":{"backup_repeating_time_intervals":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"operational_default_retention_duration":{"type":"TypeString","optional":true,"forceNew":true},"retention_rule":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"criteria":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"absolute_criteria":{"type":"TypeString","optional":true,"forceNew":true},"days_of_month":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeInt"},"minItems":1},"days_of_week":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"months_of_year":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"scheduled_backup_times":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"weeks_of_month":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1}}},"maxItems":1},"life_cycle":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"data_store_type":{"type":"TypeString","required":true,"forceNew":true},"duration":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","required":true,"forceNew":true}}}},"time_zone":{"type":"TypeString","optional":true,"forceNew":true},"vault_default_retention_duration":{"type":"TypeString","optional":true,"forceNew":true},"vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_data_protection_backup_policy_disk":{"schema":{"backup_repeating_time_intervals":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"default_retention_duration":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"retention_rule":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"criteria":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"absolute_criteria":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"duration":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","required":true,"forceNew":true}}}},"time_zone":{"type":"TypeString","optional":true,"forceNew":true},"vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_data_protection_backup_policy_kubernetes_cluster":{"schema":{"backup_repeating_time_intervals":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"default_retention_rule":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"life_cycle":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"data_store_type":{"type":"TypeString","required":true,"forceNew":true},"duration":{"type":"TypeString","required":true,"forceNew":true}}}}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_rule":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"criteria":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"absolute_criteria":{"type":"TypeString","optional":true,"forceNew":true},"days_of_week":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"months_of_year":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"scheduled_backup_times":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"weeks_of_month":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1}}},"maxItems":1},"life_cycle":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"data_store_type":{"type":"TypeString","required":true,"forceNew":true},"duration":{"type":"TypeString","required":true,"forceNew":true}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","required":true,"forceNew":true}}}},"time_zone":{"type":"TypeString","optional":true,"forceNew":true},"vault_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_data_protection_backup_policy_postgresql":{"schema":{"backup_repeating_time_intervals":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"default_retention_duration":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_rule":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"criteria":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"absolute_criteria":{"type":"TypeString","optional":true,"forceNew":true},"days_of_week":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"months_of_year":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"scheduled_backup_times":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"weeks_of_month":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1}}},"maxItems":1},"duration":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","required":true,"forceNew":true}}}},"time_zone":{"type":"TypeString","optional":true,"forceNew":true},"vault_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_data_protection_backup_policy_postgresql_flexible_server":{"schema":{"backup_repeating_time_intervals":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"default_retention_rule":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"life_cycle":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"data_store_type":{"type":"TypeString","required":true,"forceNew":true},"duration":{"type":"TypeString","required":true,"forceNew":true}}}}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"retention_rule":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"criteria":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"absolute_criteria":{"type":"TypeString","optional":true,"forceNew":true},"days_of_week":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"months_of_year":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"scheduled_backup_times":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"weeks_of_month":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1}}},"maxItems":1},"life_cycle":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"data_store_type":{"type":"TypeString","required":true,"forceNew":true},"duration":{"type":"TypeString","required":true,"forceNew":true}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","required":true,"forceNew":true}}}},"time_zone":{"type":"TypeString","optional":true,"forceNew":true},"vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_data_protection_backup_vault":{"schema":{"datastore_type":{"type":"TypeString","required":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"redundancy":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_duration_in_days":{"type":"TypeFloat","optional":true,"default":14},"soft_delete":{"type":"TypeString","optional":true,"default":"On"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_protection_resource_guard":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"vault_critical_operation_exclusion_list":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_share":{"schema":{"account_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"kind":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"snapshot_schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"recurrence":{"type":"TypeString","required":true},"start_time":{"type":"TypeString","required":true}}},"maxItems":1},"terms":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_share_account":{"schema":{"identity":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_share_dataset_blob_storage":{"schema":{"container_name":{"type":"TypeString","required":true,"forceNew":true},"data_share_id":{"type":"TypeString","required":true,"forceNew":true},"display_name":{"type":"TypeString","computed":true},"file_path":{"type":"TypeString","optional":true,"forceNew":true},"folder_path":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"storage_account":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subscription_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1,"minItems":1}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_data_share_dataset_data_lake_gen2":{"schema":{"display_name":{"type":"TypeString","computed":true},"file_path":{"type":"TypeString","optional":true,"forceNew":true},"file_system_name":{"type":"TypeString","required":true,"forceNew":true},"folder_path":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"share_id":{"type":"TypeString","required":true,"forceNew":true},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_data_share_dataset_kusto_cluster":{"schema":{"display_name":{"type":"TypeString","computed":true},"kusto_cluster_id":{"type":"TypeString","required":true,"forceNew":true},"kusto_cluster_location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"share_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_data_share_dataset_kusto_database":{"schema":{"display_name":{"type":"TypeString","computed":true},"kusto_cluster_location":{"type":"TypeString","computed":true},"kusto_database_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"share_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_database_migration_project":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_name":{"type":"TypeString","required":true,"forceNew":true},"source_platform":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"target_platform":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_database_migration_service":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_databox_edge_device":{"schema":{"device_properties":{"type":"TypeList","computed":true,"elem":{"schema":{"capacity":{"type":"TypeInt","computed":true},"configured_role_types":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"culture":{"type":"TypeString","computed":true},"hcs_version":{"type":"TypeString","computed":true},"model":{"type":"TypeString","computed":true},"node_count":{"type":"TypeInt","computed":true},"serial_number":{"type":"TypeString","computed":true},"software_version":{"type":"TypeString","computed":true},"status":{"type":"TypeString","computed":true},"time_zone":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_databricks_access_connector":{"schema":{"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_databricks_virtual_network_peering":{"schema":{"address_space_prefixes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allow_forwarded_traffic":{"type":"TypeBool","optional":true,"default":false},"allow_gateway_transit":{"type":"TypeBool","optional":true,"default":false},"allow_virtual_network_access":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true,"forceNew":true},"remote_address_space_prefixes":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"remote_virtual_network_id":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"use_remote_gateways":{"type":"TypeBool","optional":true,"default":false},"virtual_network_id":{"type":"TypeString","computed":true},"workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_databricks_workspace":{"schema":{"access_connector_id":{"type":"TypeString","optional":true},"custom_parameters":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"machine_learning_workspace_id":{"type":"TypeString","optional":true,"forceNew":true},"nat_gateway_name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"no_public_ip":{"type":"TypeBool","optional":true,"default":true},"private_subnet_name":{"type":"TypeString","optional":true,"forceNew":true},"private_subnet_network_security_group_association_id":{"type":"TypeString","optional":true},"public_ip_name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"public_subnet_name":{"type":"TypeString","optional":true,"forceNew":true},"public_subnet_network_security_group_association_id":{"type":"TypeString","optional":true},"storage_account_name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"storage_account_sku_name":{"type":"TypeString","optional":true,"computed":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vnet_address_prefix":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}}},"maxItems":1},"customer_managed_key_enabled":{"type":"TypeBool","optional":true,"default":false},"default_storage_firewall_enabled":{"type":"TypeBool","optional":true},"disk_encryption_set_id":{"type":"TypeString","computed":true},"infrastructure_encryption_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"load_balancer_backend_address_pool_id":{"type":"TypeString","optional":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_disk_cmk_key_vault_id":{"type":"TypeString","optional":true},"managed_disk_cmk_key_vault_key_id":{"type":"TypeString","optional":true},"managed_disk_cmk_rotation_to_latest_version_enabled":{"type":"TypeBool","optional":true},"managed_disk_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"managed_resource_group_id":{"type":"TypeString","computed":true},"managed_resource_group_name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"managed_services_cmk_key_vault_id":{"type":"TypeString","optional":true},"managed_services_cmk_key_vault_key_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_security_group_rules_required":{"type":"TypeString","optional":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true},"storage_account_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","computed":true},"workspace_url":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_databricks_workspace_customer_managed_key":{"schema":{"key_vault_key_id":{"type":"TypeString","required":true},"workspace_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_databricks_workspace_root_dbfs_customer_managed_key":{"schema":{"key_vault_id":{"type":"TypeString","optional":true},"key_vault_key_id":{"type":"TypeString","required":true},"workspace_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_datadog_monitor":{"schema":{"datadog_organization":{"type":"TypeList","required":true,"elem":{"schema":{"api_key":{"type":"TypeString","required":true,"forceNew":true},"application_key":{"type":"TypeString","required":true,"forceNew":true},"enterprise_app_id":{"type":"TypeString","optional":true,"forceNew":true},"id":{"type":"TypeString","computed":true},"linking_auth_code":{"type":"TypeString","optional":true,"forceNew":true},"linking_client_id":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","computed":true},"redirect_uri":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"marketplace_subscription_status":{"type":"TypeString","computed":true},"monitoring_enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"user":{"type":"TypeList","required":true,"elem":{"schema":{"email":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"phone_number":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_datadog_monitor_sso_configuration":{"schema":{"datadog_monitor_id":{"type":"TypeString","required":true,"forceNew":true},"enterprise_application_id":{"type":"TypeString","required":true},"login_url":{"type":"TypeString","computed":true},"name":{"type":"TypeString","optional":true,"default":"default"},"single_sign_on_enabled":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_datadog_monitor_tag_rule":{"schema":{"datadog_monitor_id":{"type":"TypeString","required":true,"forceNew":true},"log":{"type":"TypeList","optional":true,"elem":{"schema":{"aad_log_enabled":{"type":"TypeBool","optional":true},"filter":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"resource_log_enabled":{"type":"TypeBool","optional":true},"subscription_log_enabled":{"type":"TypeBool","optional":true}}}},"metric":{"type":"TypeList","optional":true,"elem":{"schema":{"filter":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}}}}},"name":{"type":"TypeString","optional":true,"default":"default"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dedicated_hardware_security_module":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"management_network_profile":{"type":"TypeList","optional":true,"elem":{"schema":{"network_interface_private_ip_addresses":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network_profile":{"type":"TypeList","required":true,"elem":{"schema":{"network_interface_private_ip_addresses":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"stamp_id":{"type":"TypeString","optional":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dedicated_host":{"schema":{"auto_replace_on_failure":{"type":"TypeBool","optional":true,"default":true},"dedicated_host_group_id":{"type":"TypeString","required":true,"forceNew":true},"license_type":{"type":"TypeString","optional":true,"default":"None"},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"platform_fault_domain":{"type":"TypeInt","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dedicated_host_group":{"schema":{"automatic_placement_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"platform_fault_domain_count":{"type":"TypeInt","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zone":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_center":{"schema":{"dev_center_uri":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_center_catalog":{"schema":{"catalog_adogit":{"type":"TypeList","optional":true,"elem":{"schema":{"branch":{"type":"TypeString","required":true},"key_vault_key_url":{"type":"TypeString","required":true},"path":{"type":"TypeString","required":true},"uri":{"type":"TypeString","required":true}}},"maxItems":1},"catalog_github":{"type":"TypeList","optional":true,"elem":{"schema":{"branch":{"type":"TypeString","required":true},"key_vault_key_url":{"type":"TypeString","required":true},"path":{"type":"TypeString","required":true},"uri":{"type":"TypeString","required":true}}},"maxItems":1},"dev_center_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_center_dev_box_definition":{"schema":{"dev_center_id":{"type":"TypeString","required":true,"forceNew":true},"image_reference_id":{"type":"TypeString","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_center_environment_type":{"schema":{"dev_center_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_center_gallery":{"schema":{"dev_center_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"shared_gallery_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_dev_center_network_connection":{"schema":{"domain_join_type":{"type":"TypeString","required":true,"forceNew":true},"domain_name":{"type":"TypeString","optional":true},"domain_password":{"type":"TypeString","optional":true},"domain_username":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"organization_unit":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_center_project":{"schema":{"description":{"type":"TypeString","optional":true,"forceNew":true},"dev_center_id":{"type":"TypeString","required":true,"forceNew":true},"dev_center_uri":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"maximum_dev_boxes_per_user":{"type":"TypeInt","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_center_project_environment_type":{"schema":{"creator_role_assignment_roles":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"deployment_target_id":{"type":"TypeString","required":true},"dev_center_project_id":{"type":"TypeString","required":true,"forceNew":true},"identity":{"type":"TypeList","required":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"user_role_assignment":{"type":"TypeSet","optional":true,"elem":{"schema":{"roles":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"user_id":{"type":"TypeString","required":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_test_global_vm_shutdown_schedule":{"schema":{"daily_recurrence_time":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"notification_settings":{"type":"TypeList","required":true,"elem":{"schema":{"email":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","required":true},"time_in_minutes":{"type":"TypeInt","optional":true,"default":30},"webhook_url":{"type":"TypeString","optional":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"timezone":{"type":"TypeString","required":true},"virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_test_lab":{"schema":{"artifacts_storage_account_id":{"type":"TypeString","computed":true},"default_premium_storage_account_id":{"type":"TypeString","computed":true},"default_storage_account_id":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"premium_data_disk_storage_account_id":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"unique_identifier":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_test_linux_virtual_machine":{"schema":{"allow_claim":{"type":"TypeBool","optional":true,"default":true},"disallow_public_ip_address":{"type":"TypeBool","optional":true,"forceNew":true},"fqdn":{"type":"TypeString","computed":true},"gallery_image_reference":{"type":"TypeList","required":true,"elem":{"schema":{"offer":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"inbound_nat_rule":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"backend_port":{"type":"TypeInt","required":true,"forceNew":true},"frontend_port":{"type":"TypeInt","computed":true},"protocol":{"type":"TypeString","required":true}}}},"lab_name":{"type":"TypeString","required":true,"forceNew":true},"lab_subnet_name":{"type":"TypeString","required":true,"forceNew":true},"lab_virtual_network_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"notes":{"type":"TypeString","optional":true},"password":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"size":{"type":"TypeString","required":true,"forceNew":true},"ssh_key":{"type":"TypeString","optional":true,"forceNew":true},"storage_type":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"unique_identifier":{"type":"TypeString","computed":true},"username":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_test_policy":{"schema":{"description":{"type":"TypeString","optional":true},"evaluator_type":{"type":"TypeString","required":true,"forceNew":true},"fact_data":{"type":"TypeString","optional":true},"lab_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"policy_set_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"threshold":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_test_schedule":{"schema":{"daily_recurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"time":{"type":"TypeString","required":true}}},"maxItems":1},"hourly_recurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"minute":{"type":"TypeInt","required":true}}},"maxItems":1},"lab_name":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"notification_settings":{"type":"TypeList","required":true,"elem":{"schema":{"status":{"type":"TypeString","optional":true,"default":"Disabled"},"time_in_minutes":{"type":"TypeInt","optional":true},"webhook_url":{"type":"TypeString","optional":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"status":{"type":"TypeString","optional":true,"default":"Disabled"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"task_type":{"type":"TypeString","required":true},"time_zone_id":{"type":"TypeString","required":true},"weekly_recurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"time":{"type":"TypeString","required":true},"week_days":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_test_virtual_network":{"schema":{"description":{"type":"TypeString","optional":true},"lab_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subnet":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"shared_public_ip_address":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_ports":{"type":"TypeList","optional":true,"elem":{"schema":{"backend_port":{"type":"TypeInt","optional":true},"transport_protocol":{"type":"TypeString","optional":true}}}}}},"maxItems":1},"use_in_virtual_machine_creation":{"type":"TypeString","optional":true,"default":"Allow"},"use_public_ip_address":{"type":"TypeString","optional":true,"default":"Allow"}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"unique_identifier":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_test_windows_virtual_machine":{"schema":{"allow_claim":{"type":"TypeBool","optional":true,"default":true},"disallow_public_ip_address":{"type":"TypeBool","optional":true,"forceNew":true},"fqdn":{"type":"TypeString","computed":true},"gallery_image_reference":{"type":"TypeList","required":true,"elem":{"schema":{"offer":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"inbound_nat_rule":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"backend_port":{"type":"TypeInt","required":true,"forceNew":true},"frontend_port":{"type":"TypeInt","computed":true},"protocol":{"type":"TypeString","required":true}}}},"lab_name":{"type":"TypeString","required":true,"forceNew":true},"lab_subnet_name":{"type":"TypeString","required":true,"forceNew":true},"lab_virtual_network_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"notes":{"type":"TypeString","optional":true},"password":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"size":{"type":"TypeString","required":true,"forceNew":true},"storage_type":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"unique_identifier":{"type":"TypeString","computed":true},"username":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_digital_twins_endpoint_eventgrid":{"schema":{"dead_letter_storage_secret":{"type":"TypeString","optional":true},"digital_twins_id":{"type":"TypeString","required":true,"forceNew":true},"eventgrid_topic_endpoint":{"type":"TypeString","required":true},"eventgrid_topic_primary_access_key":{"type":"TypeString","required":true},"eventgrid_topic_secondary_access_key":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_digital_twins_endpoint_eventhub":{"schema":{"dead_letter_storage_secret":{"type":"TypeString","optional":true},"digital_twins_id":{"type":"TypeString","required":true,"forceNew":true},"eventhub_primary_connection_string":{"type":"TypeString","required":true},"eventhub_secondary_connection_string":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_digital_twins_endpoint_servicebus":{"schema":{"dead_letter_storage_secret":{"type":"TypeString","optional":true},"digital_twins_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"servicebus_primary_connection_string":{"type":"TypeString","required":true},"servicebus_secondary_connection_string":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_digital_twins_instance":{"schema":{"host_name":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_digital_twins_time_series_database_connection":{"schema":{"digital_twins_id":{"type":"TypeString","required":true,"forceNew":true},"eventhub_consumer_group_name":{"type":"TypeString","optional":true,"default":"$Default","forceNew":true},"eventhub_name":{"type":"TypeString","required":true,"forceNew":true},"eventhub_namespace_endpoint_uri":{"type":"TypeString","required":true,"forceNew":true},"eventhub_namespace_id":{"type":"TypeString","required":true,"forceNew":true},"kusto_cluster_id":{"type":"TypeString","required":true,"forceNew":true},"kusto_cluster_uri":{"type":"TypeString","required":true,"forceNew":true},"kusto_database_name":{"type":"TypeString","required":true,"forceNew":true},"kusto_table_name":{"type":"TypeString","optional":true,"default":"AdtPropertyEvents","forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_disk_access":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_disk_encryption_set":{"schema":{"auto_key_rotation_enabled":{"type":"TypeBool","optional":true,"default":false},"encryption_type":{"type":"TypeString","optional":true,"default":"EncryptionAtRestWithCustomerKey","forceNew":true},"federated_client_id":{"type":"TypeString","optional":true},"identity":{"type":"TypeList","required":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_key_id":{"type":"TypeString","optional":true},"key_vault_key_url":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_hsm_key_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_dns_a_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"records":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"target_resource_id":{"type":"TypeString","optional":true},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dns_aaaa_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"records":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"target_resource_id":{"type":"TypeString","optional":true},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dns_caa_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"record":{"type":"TypeSet","required":true,"elem":{"schema":{"flags":{"type":"TypeInt","required":true},"tag":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dns_cname_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"record":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"target_resource_id":{"type":"TypeString","optional":true},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dns_mx_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","optional":true,"default":"@","forceNew":true},"record":{"type":"TypeSet","required":true,"elem":{"schema":{"exchange":{"type":"TypeString","required":true},"preference":{"type":"TypeString","required":true}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dns_ns_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"records":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dns_ptr_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"records":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dns_srv_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"record":{"type":"TypeSet","required":true,"elem":{"schema":{"port":{"type":"TypeInt","required":true},"priority":{"type":"TypeInt","required":true},"target":{"type":"TypeString","required":true},"weight":{"type":"TypeInt","required":true}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dns_txt_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"record":{"type":"TypeSet","required":true,"elem":{"schema":{"value":{"type":"TypeString","required":true}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dns_zone":{"schema":{"max_number_of_record_sets":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"name_servers":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"number_of_record_sets":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"soa_record":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"email":{"type":"TypeString","required":true},"expire_time":{"type":"TypeInt","optional":true,"default":2419200},"fqdn":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","computed":true},"minimum_ttl":{"type":"TypeInt","optional":true,"default":300},"refresh_time":{"type":"TypeInt","optional":true,"default":3600},"retry_time":{"type":"TypeInt","optional":true,"default":300},"serial_number":{"type":"TypeInt","optional":true,"default":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","optional":true,"default":3600}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_elastic_cloud_elasticsearch":{"schema":{"elastic_cloud_deployment_id":{"type":"TypeString","computed":true},"elastic_cloud_email_address":{"type":"TypeString","required":true,"forceNew":true},"elastic_cloud_sso_default_url":{"type":"TypeString","computed":true},"elastic_cloud_user_id":{"type":"TypeString","computed":true},"elasticsearch_service_url":{"type":"TypeString","computed":true},"kibana_service_url":{"type":"TypeString","computed":true},"kibana_sso_uri":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"logs":{"type":"TypeList","optional":true,"elem":{"schema":{"filtering_tag":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"send_activity_logs":{"type":"TypeBool","optional":true,"default":false},"send_azuread_logs":{"type":"TypeBool","optional":true,"default":false},"send_subscription_logs":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"monitoring_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_elastic_san":{"schema":{"base_size_in_tib":{"type":"TypeInt","required":true},"extended_size_in_tib":{"type":"TypeInt","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"tier":{"type":"TypeString","optional":true,"default":"Premium"}}},"maxItems":1,"minItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"total_iops":{"type":"TypeInt","computed":true},"total_mbps":{"type":"TypeInt","computed":true},"total_size_in_tib":{"type":"TypeInt","computed":true},"total_volume_size_in_gib":{"type":"TypeInt","computed":true},"volume_group_count":{"type":"TypeInt","computed":true},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_elastic_san_volume":{"schema":{"create_source":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"source_id":{"type":"TypeString","required":true,"forceNew":true},"source_type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"size_in_gib":{"type":"TypeInt","required":true},"target_iqn":{"type":"TypeString","computed":true},"target_portal_hostname":{"type":"TypeString","computed":true},"target_portal_port":{"type":"TypeInt","computed":true},"volume_group_id":{"type":"TypeString","required":true,"forceNew":true},"volume_id":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_elastic_san_volume_group":{"schema":{"elastic_san_id":{"type":"TypeString","required":true,"forceNew":true},"encryption":{"type":"TypeList","optional":true,"elem":{"schema":{"current_versioned_key_expiration_timestamp":{"type":"TypeString","computed":true},"current_versioned_key_id":{"type":"TypeString","computed":true},"key_vault_key_id":{"type":"TypeString","required":true},"last_key_rotation_timestamp":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","optional":true}}},"maxItems":1},"encryption_type":{"type":"TypeString","optional":true,"default":"EncryptionAtRestWithPlatformKey"},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"subnet_id":{"type":"TypeString","required":true}}},"minItems":1},"protocol_type":{"type":"TypeString","optional":true,"default":"Iscsi"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_email_communication_service":{"schema":{"data_location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_email_communication_service_domain":{"schema":{"domain_management":{"type":"TypeString","required":true,"forceNew":true},"email_service_id":{"type":"TypeString","required":true,"forceNew":true},"from_sender_domain":{"type":"TypeString","computed":true},"mail_from_sender_domain":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"user_engagement_tracking_enabled":{"type":"TypeBool","optional":true},"verification_records":{"type":"TypeList","computed":true,"elem":{"schema":{"dkim":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"ttl":{"type":"TypeInt","computed":true},"type":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"dkim2":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"ttl":{"type":"TypeInt","computed":true},"type":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"dmarc":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"ttl":{"type":"TypeInt","computed":true},"type":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"domain":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"ttl":{"type":"TypeInt","computed":true},"type":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"spf":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"ttl":{"type":"TypeInt","computed":true},"type":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventgrid_domain":{"schema":{"auto_create_topic_with_first_subscription":{"type":"TypeBool","optional":true,"default":true},"auto_delete_topic_with_last_subscription":{"type":"TypeBool","optional":true,"default":true},"endpoint":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"inbound_ip_rule":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"ip_mask":{"type":"TypeString","required":true}}},"maxItems":128},"input_mapping_default_values":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"data_version":{"type":"TypeString","optional":true,"forceNew":true},"event_type":{"type":"TypeString","optional":true,"forceNew":true},"subject":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"input_mapping_fields":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"data_version":{"type":"TypeString","optional":true,"forceNew":true},"event_time":{"type":"TypeString","optional":true,"forceNew":true},"event_type":{"type":"TypeString","optional":true,"forceNew":true},"id":{"type":"TypeString","optional":true,"forceNew":true},"subject":{"type":"TypeString","optional":true,"forceNew":true},"topic":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"input_schema":{"type":"TypeString","optional":true,"default":"EventGridSchema","forceNew":true},"local_auth_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_access_key":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_access_key":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventgrid_domain_topic":{"schema":{"domain_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_eventgrid_event_subscription":{"schema":{"advanced_filter":{"type":"TypeList","optional":true,"elem":{"schema":{"bool_equals":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"value":{"type":"TypeBool","required":true}}}},"is_not_null":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true}}}},"is_null_or_undefined":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true}}}},"number_greater_than":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"value":{"type":"TypeFloat","required":true}}}},"number_greater_than_or_equals":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"value":{"type":"TypeFloat","required":true}}}},"number_in":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeFloat"},"maxItems":25}}}},"number_in_range":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeList","elem":{"type":"TypeFloat"},"maxItems":2,"minItems":2},"maxItems":25}}}},"number_less_than":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"value":{"type":"TypeFloat","required":true}}}},"number_less_than_or_equals":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"value":{"type":"TypeFloat","required":true}}}},"number_not_in":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeFloat"},"maxItems":25}}}},"number_not_in_range":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeList","elem":{"type":"TypeFloat"},"maxItems":2,"minItems":2},"maxItems":25}}}},"string_begins_with":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_contains":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_ends_with":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_in":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_not_begins_with":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_not_contains":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_not_ends_with":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_not_in":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}}}},"maxItems":1},"advanced_filtering_on_arrays_enabled":{"type":"TypeBool","optional":true,"default":false},"azure_function_endpoint":{"type":"TypeList","optional":true,"elem":{"schema":{"function_id":{"type":"TypeString","required":true},"max_events_per_batch":{"type":"TypeInt","optional":true},"preferred_batch_size_in_kilobytes":{"type":"TypeInt","optional":true}}},"maxItems":1},"dead_letter_identity":{"type":"TypeList","optional":true,"elem":{"schema":{"type":{"type":"TypeString","required":true},"user_assigned_identity":{"type":"TypeString","optional":true}}},"maxItems":1},"delivery_identity":{"type":"TypeList","optional":true,"elem":{"schema":{"type":{"type":"TypeString","required":true},"user_assigned_identity":{"type":"TypeString","optional":true}}},"maxItems":1},"delivery_property":{"type":"TypeList","optional":true,"elem":{"schema":{"header_name":{"type":"TypeString","required":true},"secret":{"type":"TypeBool","optional":true},"source_field":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"value":{"type":"TypeString","optional":true}}}},"event_delivery_schema":{"type":"TypeString","optional":true,"default":"EventGridSchema","forceNew":true},"eventhub_endpoint_id":{"type":"TypeString","optional":true,"computed":true},"expiration_time_utc":{"type":"TypeString","optional":true},"hybrid_connection_endpoint_id":{"type":"TypeString","optional":true,"computed":true},"included_event_types":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"labels":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"retry_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"event_time_to_live":{"type":"TypeInt","required":true},"max_delivery_attempts":{"type":"TypeInt","required":true}}},"maxItems":1},"scope":{"type":"TypeString","required":true,"forceNew":true},"service_bus_queue_endpoint_id":{"type":"TypeString","optional":true},"service_bus_topic_endpoint_id":{"type":"TypeString","optional":true},"storage_blob_dead_letter_destination":{"type":"TypeList","optional":true,"elem":{"schema":{"storage_account_id":{"type":"TypeString","required":true},"storage_blob_container_name":{"type":"TypeString","required":true}}},"maxItems":1},"storage_queue_endpoint":{"type":"TypeList","optional":true,"elem":{"schema":{"queue_message_time_to_live_in_seconds":{"type":"TypeInt","optional":true},"queue_name":{"type":"TypeString","required":true},"storage_account_id":{"type":"TypeString","required":true}}},"maxItems":1},"subject_filter":{"type":"TypeList","optional":true,"elem":{"schema":{"case_sensitive":{"type":"TypeBool","optional":true},"subject_begins_with":{"type":"TypeString","optional":true},"subject_ends_with":{"type":"TypeString","optional":true}}},"maxItems":1},"webhook_endpoint":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory_app_id_or_uri":{"type":"TypeString","optional":true},"active_directory_tenant_id":{"type":"TypeString","optional":true},"base_url":{"type":"TypeString","computed":true},"max_events_per_batch":{"type":"TypeInt","optional":true},"preferred_batch_size_in_kilobytes":{"type":"TypeInt","optional":true},"url":{"type":"TypeString","required":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventgrid_system_topic":{"schema":{"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"metric_arm_resource_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source_arm_resource_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"topic_type":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventgrid_system_topic_event_subscription":{"schema":{"advanced_filter":{"type":"TypeList","optional":true,"elem":{"schema":{"bool_equals":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"value":{"type":"TypeBool","required":true}}}},"is_not_null":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true}}}},"is_null_or_undefined":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true}}}},"number_greater_than":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"value":{"type":"TypeFloat","required":true}}}},"number_greater_than_or_equals":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"value":{"type":"TypeFloat","required":true}}}},"number_in":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeFloat"},"maxItems":25}}}},"number_in_range":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeList","elem":{"type":"TypeFloat"},"maxItems":2,"minItems":2},"maxItems":25}}}},"number_less_than":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"value":{"type":"TypeFloat","required":true}}}},"number_less_than_or_equals":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"value":{"type":"TypeFloat","required":true}}}},"number_not_in":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeFloat"},"maxItems":25}}}},"number_not_in_range":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeList","elem":{"type":"TypeFloat"},"maxItems":2,"minItems":2},"maxItems":25}}}},"string_begins_with":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_contains":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_ends_with":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_in":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_not_begins_with":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_not_contains":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_not_ends_with":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_not_in":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}}}},"maxItems":1},"advanced_filtering_on_arrays_enabled":{"type":"TypeBool","optional":true,"default":false},"azure_function_endpoint":{"type":"TypeList","optional":true,"elem":{"schema":{"function_id":{"type":"TypeString","required":true},"max_events_per_batch":{"type":"TypeInt","optional":true},"preferred_batch_size_in_kilobytes":{"type":"TypeInt","optional":true}}},"maxItems":1},"dead_letter_identity":{"type":"TypeList","optional":true,"elem":{"schema":{"type":{"type":"TypeString","required":true},"user_assigned_identity":{"type":"TypeString","optional":true}}},"maxItems":1},"delivery_identity":{"type":"TypeList","optional":true,"elem":{"schema":{"type":{"type":"TypeString","required":true},"user_assigned_identity":{"type":"TypeString","optional":true}}},"maxItems":1},"delivery_property":{"type":"TypeList","optional":true,"elem":{"schema":{"header_name":{"type":"TypeString","required":true},"secret":{"type":"TypeBool","optional":true},"source_field":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"value":{"type":"TypeString","optional":true}}}},"event_delivery_schema":{"type":"TypeString","optional":true,"default":"EventGridSchema","forceNew":true},"eventhub_endpoint_id":{"type":"TypeString","optional":true,"computed":true},"expiration_time_utc":{"type":"TypeString","optional":true},"hybrid_connection_endpoint_id":{"type":"TypeString","optional":true,"computed":true},"included_event_types":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"labels":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retry_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"event_time_to_live":{"type":"TypeInt","required":true},"max_delivery_attempts":{"type":"TypeInt","required":true}}},"maxItems":1},"service_bus_queue_endpoint_id":{"type":"TypeString","optional":true},"service_bus_topic_endpoint_id":{"type":"TypeString","optional":true},"storage_blob_dead_letter_destination":{"type":"TypeList","optional":true,"elem":{"schema":{"storage_account_id":{"type":"TypeString","required":true},"storage_blob_container_name":{"type":"TypeString","required":true}}},"maxItems":1},"storage_queue_endpoint":{"type":"TypeList","optional":true,"elem":{"schema":{"queue_message_time_to_live_in_seconds":{"type":"TypeInt","optional":true},"queue_name":{"type":"TypeString","required":true},"storage_account_id":{"type":"TypeString","required":true}}},"maxItems":1},"subject_filter":{"type":"TypeList","optional":true,"elem":{"schema":{"case_sensitive":{"type":"TypeBool","optional":true},"subject_begins_with":{"type":"TypeString","optional":true},"subject_ends_with":{"type":"TypeString","optional":true}}},"maxItems":1},"system_topic":{"type":"TypeString","required":true,"forceNew":true},"webhook_endpoint":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory_app_id_or_uri":{"type":"TypeString","optional":true},"active_directory_tenant_id":{"type":"TypeString","optional":true},"base_url":{"type":"TypeString","computed":true},"max_events_per_batch":{"type":"TypeInt","optional":true},"preferred_batch_size_in_kilobytes":{"type":"TypeInt","optional":true},"url":{"type":"TypeString","required":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventgrid_topic":{"schema":{"endpoint":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"inbound_ip_rule":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"ip_mask":{"type":"TypeString","required":true}}},"maxItems":128},"input_mapping_default_values":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"data_version":{"type":"TypeString","optional":true,"forceNew":true},"event_type":{"type":"TypeString","optional":true,"forceNew":true},"subject":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"input_mapping_fields":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"data_version":{"type":"TypeString","optional":true,"forceNew":true},"event_time":{"type":"TypeString","optional":true,"forceNew":true},"event_type":{"type":"TypeString","optional":true,"forceNew":true},"id":{"type":"TypeString","optional":true,"forceNew":true},"subject":{"type":"TypeString","optional":true,"forceNew":true},"topic":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"input_schema":{"type":"TypeString","optional":true,"default":"EventGridSchema","forceNew":true},"local_auth_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_access_key":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_access_key":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventhub":{"schema":{"capture_description":{"type":"TypeList","optional":true,"elem":{"schema":{"destination":{"type":"TypeList","required":true,"elem":{"schema":{"archive_name_format":{"type":"TypeString","required":true},"blob_container_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"storage_account_id":{"type":"TypeString","required":true}}},"maxItems":1},"enabled":{"type":"TypeBool","required":true},"encoding":{"type":"TypeString","required":true},"interval_in_seconds":{"type":"TypeInt","optional":true,"default":300},"size_limit_in_bytes":{"type":"TypeInt","optional":true,"default":314572800},"skip_empty_archives":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"message_retention":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_name":{"type":"TypeString","required":true,"forceNew":true},"partition_count":{"type":"TypeInt","required":true},"partition_ids":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"status":{"type":"TypeString","optional":true,"default":"Active"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventhub_authorization_rule":{"schema":{"eventhub_name":{"type":"TypeString","required":true,"forceNew":true},"listen":{"type":"TypeBool","optional":true,"default":false},"manage":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_name":{"type":"TypeString","required":true,"forceNew":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_connection_string_alias":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_connection_string_alias":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"send":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventhub_cluster":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":300,"update":30}},"azurerm_eventhub_consumer_group":{"schema":{"eventhub_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"user_metadata":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventhub_namespace":{"schema":{"auto_inflate_enabled":{"type":"TypeBool","optional":true,"default":false},"capacity":{"type":"TypeInt","optional":true,"default":1},"dedicated_cluster_id":{"type":"TypeString","optional":true,"forceNew":true},"default_primary_connection_string":{"type":"TypeString","computed":true},"default_primary_connection_string_alias":{"type":"TypeString","computed":true},"default_primary_key":{"type":"TypeString","computed":true},"default_secondary_connection_string":{"type":"TypeString","computed":true},"default_secondary_connection_string_alias":{"type":"TypeString","computed":true},"default_secondary_key":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"local_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"maximum_throughput_units":{"type":"TypeInt","optional":true},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"name":{"type":"TypeString","required":true,"forceNew":true},"network_rulesets":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"default_action":{"type":"TypeString","required":true},"ip_rule":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"ip_mask":{"type":"TypeString","required":true}}},"maxItems":128},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"trusted_service_access_enabled":{"type":"TypeBool","optional":true},"virtual_network_rule":{"type":"TypeSet","configMode":"Auto","optional":true,"elem":{"schema":{"ignore_missing_virtual_network_service_endpoint":{"type":"TypeBool","optional":true},"subnet_id":{"type":"TypeString","required":true}}},"maxItems":128}}},"maxItems":1},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventhub_namespace_authorization_rule":{"schema":{"listen":{"type":"TypeBool","optional":true,"default":false},"manage":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_name":{"type":"TypeString","required":true,"forceNew":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_connection_string_alias":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_connection_string_alias":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"send":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventhub_namespace_customer_managed_key":{"schema":{"eventhub_namespace_id":{"type":"TypeString","required":true,"forceNew":true},"infrastructure_encryption_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"key_vault_key_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"user_assigned_identity_id":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventhub_namespace_disaster_recovery_config":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_name":{"type":"TypeString","required":true,"forceNew":true},"partner_namespace_id":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventhub_namespace_schema_group":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_id":{"type":"TypeString","required":true,"forceNew":true},"schema_compatibility":{"type":"TypeString","required":true,"forceNew":true},"schema_type":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_express_route_circuit":{"schema":{"allow_classic_operations":{"type":"TypeBool","optional":true,"default":false},"authorization_key":{"type":"TypeString","optional":true},"bandwidth_in_gbps":{"type":"TypeFloat","optional":true},"bandwidth_in_mbps":{"type":"TypeInt","optional":true},"express_route_port_id":{"type":"TypeString","optional":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"peering_location":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_key":{"type":"TypeString","computed":true},"service_provider_name":{"type":"TypeString","optional":true,"forceNew":true},"service_provider_provisioning_state":{"type":"TypeString","computed":true},"sku":{"type":"TypeList","required":true,"elem":{"schema":{"family":{"type":"TypeString","required":true},"tier":{"type":"TypeString","required":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_express_route_circuit_authorization":{"schema":{"authorization_key":{"type":"TypeString","computed":true},"authorization_use_status":{"type":"TypeString","computed":true},"express_route_circuit_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_express_route_circuit_connection":{"schema":{"address_prefix_ipv4":{"type":"TypeString","required":true,"forceNew":true},"address_prefix_ipv6":{"type":"TypeString","optional":true},"authorization_key":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"peer_peering_id":{"type":"TypeString","required":true,"forceNew":true},"peering_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_express_route_circuit_peering":{"schema":{"azure_asn":{"type":"TypeInt","computed":true},"express_route_circuit_name":{"type":"TypeString","required":true,"forceNew":true},"gateway_manager_etag":{"type":"TypeString","computed":true},"ipv4_enabled":{"type":"TypeBool","optional":true,"default":true},"ipv6":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"microsoft_peering":{"type":"TypeList","optional":true,"elem":{"schema":{"advertised_communities":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"advertised_public_prefixes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"customer_asn":{"type":"TypeInt","optional":true,"default":0},"routing_registry_name":{"type":"TypeString","optional":true,"default":"NONE"}}},"maxItems":1},"primary_peer_address_prefix":{"type":"TypeString","required":true},"route_filter_id":{"type":"TypeString","optional":true},"secondary_peer_address_prefix":{"type":"TypeString","required":true}}},"maxItems":1},"microsoft_peering_config":{"type":"TypeList","optional":true,"elem":{"schema":{"advertised_communities":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"advertised_public_prefixes":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"customer_asn":{"type":"TypeInt","optional":true,"default":0},"routing_registry_name":{"type":"TypeString","optional":true,"default":"NONE"}}},"maxItems":1},"peer_asn":{"type":"TypeInt","optional":true,"computed":true},"peering_type":{"type":"TypeString","required":true},"primary_azure_port":{"type":"TypeString","computed":true},"primary_peer_address_prefix":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"route_filter_id":{"type":"TypeString","optional":true},"secondary_azure_port":{"type":"TypeString","computed":true},"secondary_peer_address_prefix":{"type":"TypeString","optional":true},"shared_key":{"type":"TypeString","optional":true},"vlan_id":{"type":"TypeInt","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_express_route_connection":{"schema":{"authorization_key":{"type":"TypeString","optional":true},"enable_internet_security":{"type":"TypeBool","optional":true},"express_route_circuit_peering_id":{"type":"TypeString","required":true,"forceNew":true},"express_route_gateway_bypass_enabled":{"type":"TypeBool","optional":true,"default":false},"express_route_gateway_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_link_fast_path_enabled":{"type":"TypeBool","optional":true},"routing":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"associated_route_table_id":{"type":"TypeString","optional":true,"computed":true},"inbound_route_map_id":{"type":"TypeString","optional":true},"outbound_route_map_id":{"type":"TypeString","optional":true},"propagated_route_table":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"labels":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"route_table_ids":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}},"maxItems":1},"routing_weight":{"type":"TypeInt","optional":true,"default":0}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_express_route_gateway":{"schema":{"allow_non_virtual_wan_traffic":{"type":"TypeBool","optional":true,"default":false},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scale_units":{"type":"TypeInt","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_hub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_express_route_port":{"schema":{"bandwidth_in_gbps":{"type":"TypeInt","required":true,"forceNew":true},"billing_type":{"type":"TypeString","optional":true,"default":"MeteredData"},"encapsulation":{"type":"TypeString","required":true,"forceNew":true},"ethertype":{"type":"TypeString","computed":true},"guid":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"link1":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"admin_enabled":{"type":"TypeBool","optional":true,"default":false},"connector_type":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"interface_name":{"type":"TypeString","computed":true},"macsec_cak_keyvault_secret_id":{"type":"TypeString","optional":true},"macsec_cipher":{"type":"TypeString","optional":true,"default":"GcmAes128"},"macsec_ckn_keyvault_secret_id":{"type":"TypeString","optional":true},"macsec_sci_enabled":{"type":"TypeBool","optional":true,"default":false},"patch_panel_id":{"type":"TypeString","computed":true},"rack_id":{"type":"TypeString","computed":true},"router_name":{"type":"TypeString","computed":true}}},"maxItems":1,"minItems":1},"link2":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"admin_enabled":{"type":"TypeBool","optional":true,"default":false},"connector_type":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"interface_name":{"type":"TypeString","computed":true},"macsec_cak_keyvault_secret_id":{"type":"TypeString","optional":true},"macsec_cipher":{"type":"TypeString","optional":true,"default":"GcmAes128"},"macsec_ckn_keyvault_secret_id":{"type":"TypeString","optional":true},"macsec_sci_enabled":{"type":"TypeBool","optional":true,"default":false},"patch_panel_id":{"type":"TypeString","computed":true},"rack_id":{"type":"TypeString","computed":true},"router_name":{"type":"TypeString","computed":true}}},"maxItems":1,"minItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"mtu":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"peering_location":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_express_route_port_authorization":{"schema":{"authorization_key":{"type":"TypeString","computed":true},"authorization_use_status":{"type":"TypeString","computed":true},"express_route_port_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_extended_custom_location":{"schema":{"authentication":{"type":"TypeList","optional":true,"elem":{"schema":{"type":{"type":"TypeString","optional":true},"value":{"type":"TypeString","required":true}}},"maxItems":1},"cluster_extension_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"display_name":{"type":"TypeString","optional":true,"forceNew":true},"host_resource_id":{"type":"TypeString","required":true,"forceNew":true},"host_type":{"type":"TypeString","optional":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_federated_identity_credential":{"schema":{"audience":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":1},"issuer":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parent_id":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subject":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_firewall":{"schema":{"dns_proxy_enabled":{"type":"TypeBool","optional":true,"computed":true},"dns_servers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"firewall_policy_id":{"type":"TypeString","optional":true},"ip_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"private_ip_address":{"type":"TypeString","computed":true},"public_ip_address_id":{"type":"TypeString","optional":true},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"management_ip_configuration":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"private_ip_address":{"type":"TypeString","computed":true},"public_ip_address_id":{"type":"TypeString","required":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"private_ip_ranges":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"sku_tier":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"threat_intel_mode":{"type":"TypeString","optional":true,"computed":true},"virtual_hub":{"type":"TypeList","optional":true,"elem":{"schema":{"private_ip_address":{"type":"TypeString","computed":true},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"public_ip_count":{"type":"TypeInt","optional":true,"default":1},"virtual_hub_id":{"type":"TypeString","required":true}}},"maxItems":1},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_firewall_application_rule_collection":{"schema":{"action":{"type":"TypeString","required":true},"azure_firewall_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rule":{"type":"TypeList","required":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"fqdn_tags":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"protocol":{"type":"TypeList","optional":true,"elem":{"schema":{"port":{"type":"TypeInt","required":true},"type":{"type":"TypeString","required":true}}},"minItems":1},"source_addresses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"source_ip_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"target_fqdns":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"minItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_firewall_nat_rule_collection":{"schema":{"action":{"type":"TypeString","required":true},"azure_firewall_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rule":{"type":"TypeList","required":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"destination_addresses":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"destination_ports":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"protocols":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"source_addresses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"source_ip_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"translated_address":{"type":"TypeString","required":true},"translated_port":{"type":"TypeString","required":true}}},"minItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_firewall_network_rule_collection":{"schema":{"action":{"type":"TypeString","required":true},"azure_firewall_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rule":{"type":"TypeList","required":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"destination_addresses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"destination_fqdns":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"destination_ip_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"destination_ports":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"protocols":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"source_addresses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"source_ip_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"minItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_firewall_policy":{"schema":{"auto_learn_private_ranges_enabled":{"type":"TypeBool","optional":true},"base_policy_id":{"type":"TypeString","optional":true},"child_policies":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"dns":{"type":"TypeList","optional":true,"elem":{"schema":{"proxy_enabled":{"type":"TypeBool","optional":true,"default":false},"servers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1,"minItems":1},"explicit_proxy":{"type":"TypeList","optional":true,"elem":{"schema":{"enable_pac_file":{"type":"TypeBool","optional":true},"enabled":{"type":"TypeBool","optional":true},"http_port":{"type":"TypeInt","optional":true},"https_port":{"type":"TypeInt","optional":true},"pac_file":{"type":"TypeString","optional":true},"pac_file_port":{"type":"TypeInt","optional":true}}},"maxItems":1},"firewalls":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"insights":{"type":"TypeList","optional":true,"elem":{"schema":{"default_log_analytics_workspace_id":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","required":true},"log_analytics_workspace":{"type":"TypeList","optional":true,"elem":{"schema":{"firewall_location":{"type":"TypeString","required":true},"id":{"type":"TypeString","required":true}}}},"retention_in_days":{"type":"TypeInt","optional":true}}},"maxItems":1},"intrusion_detection":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","optional":true},"private_ranges":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"signature_overrides":{"type":"TypeList","optional":true,"elem":{"schema":{"id":{"type":"TypeString","optional":true},"state":{"type":"TypeString","optional":true}}}},"traffic_bypass":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"destination_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"destination_ip_groups":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"destination_ports":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"protocol":{"type":"TypeString","required":true},"source_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"source_ip_groups":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_ip_ranges":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rule_collection_groups":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"sku":{"type":"TypeString","optional":true,"default":"Standard","forceNew":true},"sql_redirect_allowed":{"type":"TypeBool","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"threat_intelligence_allowlist":{"type":"TypeList","optional":true,"elem":{"schema":{"fqdns":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"ip_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1,"minItems":1},"threat_intelligence_mode":{"type":"TypeString","optional":true,"default":"Alert"},"tls_certificate":{"type":"TypeList","optional":true,"elem":{"schema":{"key_vault_secret_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}},"maxItems":1,"minItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_firewall_policy_rule_collection_group":{"schema":{"application_rule_collection":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"priority":{"type":"TypeInt","required":true},"rule":{"type":"TypeList","required":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"destination_addresses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"destination_fqdn_tags":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"destination_fqdns":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"destination_urls":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"http_headers":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"name":{"type":"TypeString","required":true},"protocols":{"type":"TypeList","optional":true,"elem":{"schema":{"port":{"type":"TypeInt","required":true},"type":{"type":"TypeString","required":true}}}},"source_addresses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"source_ip_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"terminate_tls":{"type":"TypeBool","optional":true},"web_categories":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"minItems":1}}},"minItems":1},"firewall_policy_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"nat_rule_collection":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"priority":{"type":"TypeInt","required":true},"rule":{"type":"TypeList","required":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"destination_address":{"type":"TypeString","optional":true},"destination_ports":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"name":{"type":"TypeString","required":true},"protocols":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"source_addresses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"source_ip_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"translated_address":{"type":"TypeString","optional":true},"translated_fqdn":{"type":"TypeString","optional":true},"translated_port":{"type":"TypeInt","required":true}}},"minItems":1}}},"minItems":1},"network_rule_collection":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"priority":{"type":"TypeInt","required":true},"rule":{"type":"TypeList","required":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"destination_addresses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"destination_fqdns":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"destination_ip_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"destination_ports":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"protocols":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"source_addresses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"source_ip_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"minItems":1}}},"minItems":1},"priority":{"type":"TypeInt","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_fluid_relay_server":{"schema":{"frs_tenant_id":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"orderer_endpoints":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_key":{"type":"TypeString","computed":true},"service_endpoints":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"storage_endpoints":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"storage_sku":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":10,"update":10}},"azurerm_frontdoor":{"schema":{"backend_pool":{"type":"TypeList","required":true,"elem":{"schema":{"backend":{"type":"TypeList","required":true,"elem":{"schema":{"address":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"host_header":{"type":"TypeString","required":true},"http_port":{"type":"TypeInt","required":true},"https_port":{"type":"TypeInt","required":true},"priority":{"type":"TypeInt","optional":true,"default":1},"weight":{"type":"TypeInt","optional":true,"default":50}}},"maxItems":500},"health_probe_name":{"type":"TypeString","required":true},"id":{"type":"TypeString","computed":true},"load_balancing_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}},"backend_pool_health_probe":{"type":"TypeList","required":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"id":{"type":"TypeString","computed":true},"interval_in_seconds":{"type":"TypeInt","optional":true,"default":120},"name":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true,"default":"/"},"probe_method":{"type":"TypeString","optional":true,"default":"GET"},"protocol":{"type":"TypeString","optional":true,"default":"Http"}}},"maxItems":5000},"backend_pool_health_probes":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"backend_pool_load_balancing":{"type":"TypeList","required":true,"elem":{"schema":{"additional_latency_milliseconds":{"type":"TypeInt","optional":true,"default":0},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"sample_size":{"type":"TypeInt","optional":true,"default":4},"successful_samples_required":{"type":"TypeInt","optional":true,"default":2}}},"maxItems":5000},"backend_pool_load_balancing_settings":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"backend_pool_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"backend_pools_send_receive_timeout_seconds":{"type":"TypeInt","optional":true,"default":60},"enforce_backend_pools_certificate_name_check":{"type":"TypeBool","required":true}}}},"backend_pools":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"cname":{"type":"TypeString","computed":true},"explicit_resource_order":{"type":"TypeList","computed":true,"elem":{"schema":{"backend_pool_health_probe_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"backend_pool_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"backend_pool_load_balancing_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"frontend_endpoint_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"routing_rule_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"friendly_name":{"type":"TypeString","optional":true},"frontend_endpoint":{"type":"TypeList","required":true,"elem":{"schema":{"host_name":{"type":"TypeString","required":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"session_affinity_enabled":{"type":"TypeBool","optional":true,"default":false},"session_affinity_ttl_seconds":{"type":"TypeInt","optional":true,"default":0},"web_application_firewall_policy_link_id":{"type":"TypeString","optional":true}}},"maxItems":500},"frontend_endpoints":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"header_frontdoor_id":{"type":"TypeString","computed":true},"load_balancer_enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"routing_rule":{"type":"TypeList","required":true,"elem":{"schema":{"accepted_protocols":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":2},"enabled":{"type":"TypeBool","optional":true,"default":true},"forwarding_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"backend_pool_name":{"type":"TypeString","required":true},"cache_duration":{"type":"TypeString","optional":true},"cache_enabled":{"type":"TypeBool","optional":true,"default":false},"cache_query_parameter_strip_directive":{"type":"TypeString","optional":true,"default":"StripAll"},"cache_query_parameters":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"cache_use_dynamic_compression":{"type":"TypeBool","optional":true,"default":false},"custom_forwarding_path":{"type":"TypeString","optional":true},"forwarding_protocol":{"type":"TypeString","optional":true,"default":"HttpsOnly"}}},"maxItems":1},"frontend_endpoints":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":500},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"patterns_to_match":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25},"redirect_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"custom_fragment":{"type":"TypeString","optional":true},"custom_host":{"type":"TypeString","optional":true},"custom_path":{"type":"TypeString","optional":true},"custom_query_string":{"type":"TypeString","optional":true},"redirect_protocol":{"type":"TypeString","required":true},"redirect_type":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":500},"routing_rules":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":360,"read":5,"delete":360,"update":360}},"azurerm_frontdoor_custom_https_configuration":{"schema":{"custom_https_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_key_vault_certificate_secret_name":{"type":"TypeString","optional":true},"azure_key_vault_certificate_secret_version":{"type":"TypeString","optional":true},"azure_key_vault_certificate_vault_id":{"type":"TypeString","optional":true},"certificate_source":{"type":"TypeString","optional":true,"default":"FrontDoor"},"minimum_tls_version":{"type":"TypeString","computed":true},"provisioning_state":{"type":"TypeString","computed":true},"provisioning_substate":{"type":"TypeString","computed":true}}},"maxItems":1},"custom_https_provisioning_enabled":{"type":"TypeBool","required":true},"frontend_endpoint_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":360,"read":5,"delete":360,"update":360}},"azurerm_frontdoor_firewall_policy":{"schema":{"custom_block_response_body":{"type":"TypeString","optional":true},"custom_block_response_status_code":{"type":"TypeInt","optional":true},"custom_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"match_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":600},"match_variable":{"type":"TypeString","required":true},"negation_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"selector":{"type":"TypeString","optional":true},"transforms":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":5}}},"maxItems":10},"name":{"type":"TypeString","required":true},"priority":{"type":"TypeInt","optional":true,"default":1},"rate_limit_duration_in_minutes":{"type":"TypeInt","optional":true,"default":1},"rate_limit_threshold":{"type":"TypeInt","optional":true,"default":10},"type":{"type":"TypeString","required":true}}},"maxItems":100},"enabled":{"type":"TypeBool","optional":true,"default":true},"frontend_endpoint_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","computed":true},"managed_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"exclusion":{"type":"TypeList","optional":true,"elem":{"schema":{"match_variable":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"selector":{"type":"TypeString","required":true}}},"maxItems":100},"override":{"type":"TypeList","optional":true,"elem":{"schema":{"exclusion":{"type":"TypeList","optional":true,"elem":{"schema":{"match_variable":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"selector":{"type":"TypeString","required":true}}},"maxItems":100},"rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":false},"exclusion":{"type":"TypeList","optional":true,"elem":{"schema":{"match_variable":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"selector":{"type":"TypeString","required":true}}},"maxItems":100},"rule_id":{"type":"TypeString","required":true}}},"maxItems":1000},"rule_group_name":{"type":"TypeString","required":true}}},"maxItems":100},"type":{"type":"TypeString","required":true},"version":{"type":"TypeString","required":true}}},"maxItems":100},"mode":{"type":"TypeString","optional":true,"default":"Prevention"},"name":{"type":"TypeString","required":true,"forceNew":true},"redirect_url":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_frontdoor_rules_engine":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"frontdoor_name":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeList","optional":true,"elem":{"schema":{"request_header":{"type":"TypeList","optional":true,"elem":{"schema":{"header_action_type":{"type":"TypeString","optional":true},"header_name":{"type":"TypeString","optional":true},"value":{"type":"TypeString","optional":true}}},"maxItems":100},"response_header":{"type":"TypeList","optional":true,"elem":{"schema":{"header_action_type":{"type":"TypeString","optional":true},"header_name":{"type":"TypeString","optional":true},"value":{"type":"TypeString","optional":true}}},"maxItems":100}}},"maxItems":1},"match_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"selector":{"type":"TypeString","optional":true},"transform":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":6},"value":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"variable":{"type":"TypeString","optional":true}}},"maxItems":100},"name":{"type":"TypeString","required":true},"priority":{"type":"TypeInt","required":true}}},"maxItems":100}},"timeouts":{"create":360,"read":5,"delete":360,"update":360}},"azurerm_function_app":{"schema":{"app_service_plan_id":{"type":"TypeString","required":true},"app_settings":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","optional":true}}},"maxItems":1},"additional_login_params":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","required":true},"facebook":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true},"app_secret":{"type":"TypeString","required":true},"oauth_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"google":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"oauth_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"issuer":{"type":"TypeString","optional":true},"microsoft":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"oauth_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true},"token_refresh_extension_hours":{"type":"TypeFloat","optional":true,"default":72},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false},"twitter":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true},"consumer_secret":{"type":"TypeString","required":true}}},"maxItems":1},"unauthenticated_client_action":{"type":"TypeString","optional":true}}},"maxItems":1},"client_cert_mode":{"type":"TypeString","optional":true},"connection_string":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"custom_domain_verification_id":{"type":"TypeString","computed":true},"daily_memory_time_quota":{"type":"TypeInt","optional":true},"default_hostname":{"type":"TypeString","computed":true},"enable_builtin_logging":{"type":"TypeBool","optional":true,"default":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"https_only":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_reference_identity_id":{"type":"TypeString","optional":true,"computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"os_type":{"type":"TypeString","optional":true,"default":"","forceNew":true},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"site_config":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"always_on":{"type":"TypeBool","optional":true,"default":false},"app_scale_limit":{"type":"TypeInt","optional":true,"computed":true},"auto_swap_slot_name":{"type":"TypeString","optional":true},"cors":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"support_credentials":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"dotnet_framework_version":{"type":"TypeString","optional":true,"default":"v4.0"},"elastic_instance_minimum":{"type":"TypeInt","optional":true,"computed":true},"ftps_state":{"type":"TypeString","optional":true,"computed":true},"health_check_path":{"type":"TypeString","optional":true},"http2_enabled":{"type":"TypeBool","optional":true,"default":false},"ip_restriction":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000},"service_tag":{"type":"TypeString","optional":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true}}}},"java_version":{"type":"TypeString","optional":true},"linux_fx_version":{"type":"TypeString","optional":true,"computed":true},"min_tls_version":{"type":"TypeString","optional":true,"computed":true},"pre_warmed_instance_count":{"type":"TypeInt","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"TypeBool","optional":true,"default":false},"scm_ip_restriction":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000},"service_tag":{"type":"TypeString","optional":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true}}}},"scm_type":{"type":"TypeString","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"TypeBool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"computed":true},"websockets_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"source_control":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"branch":{"type":"TypeString","optional":true,"computed":true},"manual_integration":{"type":"TypeBool","optional":true,"computed":true},"repo_url":{"type":"TypeString","optional":true,"computed":true},"rollback_enabled":{"type":"TypeBool","optional":true,"computed":true},"use_mercurial":{"type":"TypeBool","optional":true,"computed":true}}},"maxItems":1},"storage_account_access_key":{"type":"TypeString","required":true},"storage_account_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"version":{"type":"TypeString","optional":true,"default":"~1"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_function_app_active_slot":{"schema":{"last_successful_swap":{"type":"TypeString","description":"The timestamp of the last successful swap with `Production`","computed":true},"overwrite_network_config":{"type":"TypeBool","optional":true,"default":true,"description":"The swap action should overwrite the Production slot's network configuration with the configuration from this slot. Defaults to `true`.","forceNew":true},"slot_id":{"type":"TypeString","required":true,"description":"The ID of the Slot to swap with `Production`."}},"timeouts":{"create":30,"read":5,"delete":5,"update":30}},"azurerm_function_app_connection":{"schema":{"authentication":{"type":"TypeList","required":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"client_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true},"principal_id":{"type":"TypeString","optional":true},"secret":{"type":"TypeString","optional":true},"subscription_id":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"client_type":{"type":"TypeString","optional":true,"default":"none"},"function_app_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"secret_store":{"type":"TypeList","optional":true,"elem":{"schema":{"key_vault_id":{"type":"TypeString","required":true}}},"maxItems":1},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true},"vnet_solution":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_function_app_function":{"schema":{"config_json":{"type":"TypeString","required":true,"description":"The config for this Function in JSON format."},"config_url":{"type":"TypeString","description":"The URL of the configuration JSON.","computed":true},"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should this function be enabled. Defaults to `true`."},"file":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"content":{"type":"TypeString","required":true,"description":"The content of the file.","forceNew":true},"name":{"type":"TypeString","required":true,"description":"The filename of the file to be uploaded.","forceNew":true}}},"minItems":1},"function_app_id":{"type":"TypeString","required":true,"description":"The ID of the Function App in which this function should reside.","forceNew":true},"invocation_url":{"type":"TypeString","description":"The invocation URL.","computed":true},"language":{"type":"TypeString","optional":true,"description":"The language the Function is written in."},"name":{"type":"TypeString","required":true,"description":"The name of the function.","forceNew":true},"script_root_path_url":{"type":"TypeString","description":"The Script root path URL.","computed":true},"script_url":{"type":"TypeString","description":"The script URL.","computed":true},"secrets_file_url":{"type":"TypeString","description":"The URL for the Secrets File.","computed":true},"test_data":{"type":"TypeString","optional":true,"description":"The test data for the function."},"test_data_url":{"type":"TypeString","description":"The Test data URL.","computed":true},"url":{"type":"TypeString","description":"The function URL.","computed":true}},"timeouts":{"create":30,"read":5,"delete":5,"update":30}},"azurerm_function_app_hybrid_connection":{"schema":{"function_app_id":{"type":"TypeString","required":true,"description":"The ID of the Function App for this Hybrid Connection.","forceNew":true},"hostname":{"type":"TypeString","required":true,"description":"The hostname of the endpoint."},"namespace_name":{"type":"TypeString","description":"The name of the Relay Namespace.","computed":true},"port":{"type":"TypeInt","required":true,"description":"The port to use for the endpoint"},"relay_id":{"type":"TypeString","required":true,"description":"The ID of the Relay Hybrid Connection to use.","forceNew":true},"relay_name":{"type":"TypeString","description":"The name of the Relay in use.","computed":true},"send_key_name":{"type":"TypeString","optional":true,"default":"RootManageSharedAccessKey","description":"The name of the Relay key with `Send` permission to use. Defaults to `RootManageSharedAccessKey`"},"send_key_value":{"type":"TypeString","description":"The Primary Access Key for the `send_key_name`","computed":true},"service_bus_namespace":{"type":"TypeString","description":"The Service Bus Namespace.","computed":true},"service_bus_suffix":{"type":"TypeString","description":"The suffix for the endpoint.","computed":true}},"timeouts":{"create":30,"read":5,"delete":5,"update":30}},"azurerm_function_app_slot":{"schema":{"app_service_plan_id":{"type":"TypeString","required":true,"forceNew":true},"app_settings":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","optional":true}}},"maxItems":1},"additional_login_params":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","required":true},"facebook":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true},"app_secret":{"type":"TypeString","required":true},"oauth_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"google":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"oauth_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"issuer":{"type":"TypeString","optional":true},"microsoft":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"oauth_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true},"token_refresh_extension_hours":{"type":"TypeFloat","optional":true,"default":72},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false},"twitter":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true},"consumer_secret":{"type":"TypeString","required":true}}},"maxItems":1},"unauthenticated_client_action":{"type":"TypeString","optional":true}}},"maxItems":1},"connection_string":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"daily_memory_time_quota":{"type":"TypeInt","optional":true},"default_hostname":{"type":"TypeString","computed":true},"enable_builtin_logging":{"type":"TypeBool","optional":true,"default":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"function_app_name":{"type":"TypeString","required":true,"forceNew":true},"https_only":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"os_type":{"type":"TypeString","optional":true,"forceNew":true},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"site_config":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"always_on":{"type":"TypeBool","optional":true,"default":false},"app_scale_limit":{"type":"TypeInt","optional":true,"computed":true},"auto_swap_slot_name":{"type":"TypeString","optional":true},"cors":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"support_credentials":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"dotnet_framework_version":{"type":"TypeString","optional":true,"default":"v4.0"},"elastic_instance_minimum":{"type":"TypeInt","optional":true,"computed":true},"ftps_state":{"type":"TypeString","optional":true,"computed":true},"health_check_path":{"type":"TypeString","optional":true},"http2_enabled":{"type":"TypeBool","optional":true,"default":false},"ip_restriction":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000},"service_tag":{"type":"TypeString","optional":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true}}}},"java_version":{"type":"TypeString","optional":true},"linux_fx_version":{"type":"TypeString","optional":true,"computed":true},"min_tls_version":{"type":"TypeString","optional":true,"computed":true},"pre_warmed_instance_count":{"type":"TypeInt","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"TypeBool","optional":true,"default":false},"scm_ip_restriction":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000},"service_tag":{"type":"TypeString","optional":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true}}}},"scm_type":{"type":"TypeString","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"TypeBool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"computed":true},"websockets_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"storage_account_access_key":{"type":"TypeString","required":true},"storage_account_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"version":{"type":"TypeString","optional":true,"default":"~1"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_gallery_application":{"schema":{"description":{"type":"TypeString","optional":true},"end_of_life_date":{"type":"TypeString","optional":true},"eula":{"type":"TypeString","optional":true},"gallery_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"privacy_statement_uri":{"type":"TypeString","optional":true},"release_note_uri":{"type":"TypeString","optional":true},"supported_os_type":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_gallery_application_version":{"schema":{"config_file":{"type":"TypeString","optional":true,"forceNew":true},"enable_health_check":{"type":"TypeBool","optional":true,"default":false},"end_of_life_date":{"type":"TypeString","optional":true},"exclude_from_latest":{"type":"TypeBool","optional":true,"default":false},"gallery_application_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"manage_action":{"type":"TypeList","required":true,"elem":{"schema":{"install":{"type":"TypeString","required":true,"forceNew":true},"remove":{"type":"TypeString","required":true,"forceNew":true},"update":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"package_file":{"type":"TypeString","optional":true,"forceNew":true},"source":{"type":"TypeList","required":true,"elem":{"schema":{"default_configuration_link":{"type":"TypeString","optional":true,"forceNew":true},"media_link":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"target_region":{"type":"TypeList","required":true,"elem":{"schema":{"exclude_from_latest":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true},"regional_replica_count":{"type":"TypeInt","required":true},"storage_account_type":{"type":"TypeString","optional":true,"default":"Standard_LRS"}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_graph_services_account":{"schema":{"application_id":{"type":"TypeString","required":true,"forceNew":true},"billing_plan_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_hdinsight_hadoop_cluster":{"schema":{"cluster_version":{"type":"TypeString","required":true,"forceNew":true},"component_version":{"type":"TypeList","required":true,"elem":{"schema":{"hadoop":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"compute_isolation":{"type":"TypeList","optional":true,"elem":{"schema":{"compute_isolation_enabled":{"type":"TypeBool","optional":true,"default":false},"host_sku":{"type":"TypeString","optional":true}}},"maxItems":1},"disk_encryption":{"type":"TypeList","optional":true,"elem":{"schema":{"encryption_algorithm":{"type":"TypeString","optional":true},"encryption_at_host_enabled":{"type":"TypeBool","optional":true},"key_vault_key_id":{"type":"TypeString","optional":true},"key_vault_managed_identity_id":{"type":"TypeString","optional":true}}}},"extension":{"type":"TypeList","optional":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","required":true}}},"maxItems":1},"gateway":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"https_endpoint":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"metastores":{"type":"TypeList","optional":true,"elem":{"schema":{"ambari":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"hive":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"oozie":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"monitor":{"type":"TypeList","optional":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network":{"type":"TypeList","optional":true,"elem":{"schema":{"connection_direction":{"type":"TypeString","optional":true,"default":"Inbound","forceNew":true},"private_link_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}}},"maxItems":1},"private_link_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"group_id":{"type":"TypeString","required":true},"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"primary":{"type":"TypeBool","optional":true},"private_ip_address":{"type":"TypeString","optional":true},"private_ip_allocation_method":{"type":"TypeString","optional":true},"subnet_id":{"type":"TypeString","optional":true}}},"maxItems":1},"name":{"type":"TypeString","required":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"roles":{"type":"TypeList","required":true,"elem":{"schema":{"edge_node":{"type":"TypeList","optional":true,"elem":{"schema":{"https_endpoints":{"type":"TypeList","optional":true,"elem":{"schema":{"access_modes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"destination_port":{"type":"TypeInt","optional":true},"disable_gateway_auth":{"type":"TypeBool","optional":true},"private_ip_address":{"type":"TypeString","optional":true},"sub_domain_suffix":{"type":"TypeString","optional":true}}}},"install_script_action":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"target_instance_count":{"type":"TypeInt","required":true},"uninstall_script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"vm_size":{"type":"TypeString","required":true}}},"maxItems":1},"head_node":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"worker_node":{"type":"TypeList","required":true,"elem":{"schema":{"autoscale":{"type":"TypeList","optional":true,"elem":{"schema":{"capacity":{"type":"TypeList","optional":true,"elem":{"schema":{"max_instance_count":{"type":"TypeInt","required":true},"min_instance_count":{"type":"TypeInt","required":true}}},"maxItems":1},"recurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"days":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"target_instance_count":{"type":"TypeInt","required":true},"time":{"type":"TypeString","required":true}}},"minItems":1},"timezone":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"target_instance_count":{"type":"TypeInt","required":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"zookeeper_node":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"security_profile":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"aadds_resource_id":{"type":"TypeString","required":true,"forceNew":true},"cluster_users_group_dns":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"domain_name":{"type":"TypeString","required":true,"forceNew":true},"domain_user_password":{"type":"TypeString","required":true,"forceNew":true},"domain_username":{"type":"TypeString","required":true,"forceNew":true},"ldaps_urls":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"msi_resource_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"ssh_endpoint":{"type":"TypeString","computed":true},"storage_account":{"type":"TypeList","optional":true,"elem":{"schema":{"is_default":{"type":"TypeBool","required":true,"forceNew":true},"storage_account_key":{"type":"TypeString","required":true,"forceNew":true},"storage_container_id":{"type":"TypeString","required":true,"forceNew":true},"storage_resource_id":{"type":"TypeString","optional":true,"forceNew":true}}}},"storage_account_gen2":{"type":"TypeList","optional":true,"elem":{"schema":{"filesystem_id":{"type":"TypeString","required":true,"forceNew":true},"is_default":{"type":"TypeBool","required":true,"forceNew":true},"managed_identity_resource_id":{"type":"TypeString","required":true,"forceNew":true},"storage_resource_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tier":{"type":"TypeString","required":true,"forceNew":true},"tls_min_version":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_hdinsight_hbase_cluster":{"schema":{"cluster_version":{"type":"TypeString","required":true,"forceNew":true},"component_version":{"type":"TypeList","required":true,"elem":{"schema":{"hbase":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"compute_isolation":{"type":"TypeList","optional":true,"elem":{"schema":{"compute_isolation_enabled":{"type":"TypeBool","optional":true,"default":false},"host_sku":{"type":"TypeString","optional":true}}},"maxItems":1},"disk_encryption":{"type":"TypeList","optional":true,"elem":{"schema":{"encryption_algorithm":{"type":"TypeString","optional":true},"encryption_at_host_enabled":{"type":"TypeBool","optional":true},"key_vault_key_id":{"type":"TypeString","optional":true},"key_vault_managed_identity_id":{"type":"TypeString","optional":true}}}},"extension":{"type":"TypeList","optional":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","required":true}}},"maxItems":1},"gateway":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"https_endpoint":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"metastores":{"type":"TypeList","optional":true,"elem":{"schema":{"ambari":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"hive":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"oozie":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"monitor":{"type":"TypeList","optional":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network":{"type":"TypeList","optional":true,"elem":{"schema":{"connection_direction":{"type":"TypeString","optional":true,"default":"Inbound","forceNew":true},"private_link_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}}},"maxItems":1},"private_link_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"group_id":{"type":"TypeString","required":true},"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"primary":{"type":"TypeBool","optional":true},"private_ip_address":{"type":"TypeString","optional":true},"private_ip_allocation_method":{"type":"TypeString","optional":true},"subnet_id":{"type":"TypeString","optional":true}}},"maxItems":1},"name":{"type":"TypeString","required":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"roles":{"type":"TypeList","required":true,"elem":{"schema":{"head_node":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"worker_node":{"type":"TypeList","required":true,"elem":{"schema":{"autoscale":{"type":"TypeList","optional":true,"elem":{"schema":{"recurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"days":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"target_instance_count":{"type":"TypeInt","required":true},"time":{"type":"TypeString","required":true}}},"minItems":1},"timezone":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"target_instance_count":{"type":"TypeInt","required":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"zookeeper_node":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"security_profile":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"aadds_resource_id":{"type":"TypeString","required":true,"forceNew":true},"cluster_users_group_dns":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"domain_name":{"type":"TypeString","required":true,"forceNew":true},"domain_user_password":{"type":"TypeString","required":true,"forceNew":true},"domain_username":{"type":"TypeString","required":true,"forceNew":true},"ldaps_urls":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"msi_resource_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"ssh_endpoint":{"type":"TypeString","computed":true},"storage_account":{"type":"TypeList","optional":true,"elem":{"schema":{"is_default":{"type":"TypeBool","required":true,"forceNew":true},"storage_account_key":{"type":"TypeString","required":true,"forceNew":true},"storage_container_id":{"type":"TypeString","required":true,"forceNew":true},"storage_resource_id":{"type":"TypeString","optional":true,"forceNew":true}}}},"storage_account_gen2":{"type":"TypeList","optional":true,"elem":{"schema":{"filesystem_id":{"type":"TypeString","required":true,"forceNew":true},"is_default":{"type":"TypeBool","required":true,"forceNew":true},"managed_identity_resource_id":{"type":"TypeString","required":true,"forceNew":true},"storage_resource_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tier":{"type":"TypeString","required":true,"forceNew":true},"tls_min_version":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_hdinsight_interactive_query_cluster":{"schema":{"cluster_version":{"type":"TypeString","required":true,"forceNew":true},"component_version":{"type":"TypeList","required":true,"elem":{"schema":{"interactive_hive":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"compute_isolation":{"type":"TypeList","optional":true,"elem":{"schema":{"compute_isolation_enabled":{"type":"TypeBool","optional":true,"default":false},"host_sku":{"type":"TypeString","optional":true}}},"maxItems":1},"disk_encryption":{"type":"TypeList","optional":true,"elem":{"schema":{"encryption_algorithm":{"type":"TypeString","optional":true},"encryption_at_host_enabled":{"type":"TypeBool","optional":true},"key_vault_key_id":{"type":"TypeString","optional":true},"key_vault_managed_identity_id":{"type":"TypeString","optional":true}}}},"encryption_in_transit_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"extension":{"type":"TypeList","optional":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","required":true}}},"maxItems":1},"gateway":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"https_endpoint":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"metastores":{"type":"TypeList","optional":true,"elem":{"schema":{"ambari":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"hive":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"oozie":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"monitor":{"type":"TypeList","optional":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network":{"type":"TypeList","optional":true,"elem":{"schema":{"connection_direction":{"type":"TypeString","optional":true,"default":"Inbound","forceNew":true},"private_link_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}}},"maxItems":1},"private_link_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"group_id":{"type":"TypeString","required":true},"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"primary":{"type":"TypeBool","optional":true},"private_ip_address":{"type":"TypeString","optional":true},"private_ip_allocation_method":{"type":"TypeString","optional":true},"subnet_id":{"type":"TypeString","optional":true}}},"maxItems":1},"name":{"type":"TypeString","required":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"roles":{"type":"TypeList","required":true,"elem":{"schema":{"head_node":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"worker_node":{"type":"TypeList","required":true,"elem":{"schema":{"autoscale":{"type":"TypeList","optional":true,"elem":{"schema":{"capacity":{"type":"TypeList","optional":true,"elem":{"schema":{"max_instance_count":{"type":"TypeInt","required":true},"min_instance_count":{"type":"TypeInt","required":true}}},"maxItems":1},"recurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"days":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"target_instance_count":{"type":"TypeInt","required":true},"time":{"type":"TypeString","required":true}}},"minItems":1},"timezone":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"target_instance_count":{"type":"TypeInt","required":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"zookeeper_node":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"security_profile":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"aadds_resource_id":{"type":"TypeString","required":true,"forceNew":true},"cluster_users_group_dns":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"domain_name":{"type":"TypeString","required":true,"forceNew":true},"domain_user_password":{"type":"TypeString","required":true,"forceNew":true},"domain_username":{"type":"TypeString","required":true,"forceNew":true},"ldaps_urls":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"msi_resource_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"ssh_endpoint":{"type":"TypeString","computed":true},"storage_account":{"type":"TypeList","optional":true,"elem":{"schema":{"is_default":{"type":"TypeBool","required":true,"forceNew":true},"storage_account_key":{"type":"TypeString","required":true,"forceNew":true},"storage_container_id":{"type":"TypeString","required":true,"forceNew":true},"storage_resource_id":{"type":"TypeString","optional":true,"forceNew":true}}}},"storage_account_gen2":{"type":"TypeList","optional":true,"elem":{"schema":{"filesystem_id":{"type":"TypeString","required":true,"forceNew":true},"is_default":{"type":"TypeBool","required":true,"forceNew":true},"managed_identity_resource_id":{"type":"TypeString","required":true,"forceNew":true},"storage_resource_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tier":{"type":"TypeString","required":true,"forceNew":true},"tls_min_version":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_hdinsight_kafka_cluster":{"schema":{"cluster_version":{"type":"TypeString","required":true,"forceNew":true},"component_version":{"type":"TypeList","required":true,"elem":{"schema":{"kafka":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"compute_isolation":{"type":"TypeList","optional":true,"elem":{"schema":{"compute_isolation_enabled":{"type":"TypeBool","optional":true,"default":false},"host_sku":{"type":"TypeString","optional":true}}},"maxItems":1},"disk_encryption":{"type":"TypeList","optional":true,"elem":{"schema":{"encryption_algorithm":{"type":"TypeString","optional":true},"encryption_at_host_enabled":{"type":"TypeBool","optional":true},"key_vault_key_id":{"type":"TypeString","optional":true},"key_vault_managed_identity_id":{"type":"TypeString","optional":true}}}},"encryption_in_transit_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"extension":{"type":"TypeList","optional":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","required":true}}},"maxItems":1},"gateway":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"https_endpoint":{"type":"TypeString","computed":true},"kafka_rest_proxy_endpoint":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"metastores":{"type":"TypeList","optional":true,"elem":{"schema":{"ambari":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"hive":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"oozie":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"monitor":{"type":"TypeList","optional":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network":{"type":"TypeList","optional":true,"elem":{"schema":{"connection_direction":{"type":"TypeString","optional":true,"default":"Inbound","forceNew":true},"private_link_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}}},"maxItems":1},"private_link_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"group_id":{"type":"TypeString","required":true},"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"primary":{"type":"TypeBool","optional":true},"private_ip_address":{"type":"TypeString","optional":true},"private_ip_allocation_method":{"type":"TypeString","optional":true},"subnet_id":{"type":"TypeString","optional":true}}},"maxItems":1},"name":{"type":"TypeString","required":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rest_proxy":{"type":"TypeList","optional":true,"elem":{"schema":{"security_group_id":{"type":"TypeString","required":true,"forceNew":true},"security_group_name":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"roles":{"type":"TypeList","required":true,"elem":{"schema":{"head_node":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"kafka_management_node":{"type":"TypeList","optional":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"username":{"type":"TypeString","computed":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"worker_node":{"type":"TypeList","required":true,"elem":{"schema":{"number_of_disks_per_node":{"type":"TypeInt","required":true,"forceNew":true},"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"target_instance_count":{"type":"TypeInt","required":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"zookeeper_node":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"security_profile":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"aadds_resource_id":{"type":"TypeString","required":true,"forceNew":true},"cluster_users_group_dns":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"domain_name":{"type":"TypeString","required":true,"forceNew":true},"domain_user_password":{"type":"TypeString","required":true,"forceNew":true},"domain_username":{"type":"TypeString","required":true,"forceNew":true},"ldaps_urls":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"msi_resource_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"ssh_endpoint":{"type":"TypeString","computed":true},"storage_account":{"type":"TypeList","optional":true,"elem":{"schema":{"is_default":{"type":"TypeBool","required":true,"forceNew":true},"storage_account_key":{"type":"TypeString","required":true,"forceNew":true},"storage_container_id":{"type":"TypeString","required":true,"forceNew":true},"storage_resource_id":{"type":"TypeString","optional":true,"forceNew":true}}}},"storage_account_gen2":{"type":"TypeList","optional":true,"elem":{"schema":{"filesystem_id":{"type":"TypeString","required":true,"forceNew":true},"is_default":{"type":"TypeBool","required":true,"forceNew":true},"managed_identity_resource_id":{"type":"TypeString","required":true,"forceNew":true},"storage_resource_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tier":{"type":"TypeString","required":true,"forceNew":true},"tls_min_version":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_hdinsight_spark_cluster":{"schema":{"cluster_version":{"type":"TypeString","required":true,"forceNew":true},"component_version":{"type":"TypeList","required":true,"elem":{"schema":{"spark":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"compute_isolation":{"type":"TypeList","optional":true,"elem":{"schema":{"compute_isolation_enabled":{"type":"TypeBool","optional":true,"default":false},"host_sku":{"type":"TypeString","optional":true}}},"maxItems":1},"disk_encryption":{"type":"TypeList","optional":true,"elem":{"schema":{"encryption_algorithm":{"type":"TypeString","optional":true},"encryption_at_host_enabled":{"type":"TypeBool","optional":true},"key_vault_key_id":{"type":"TypeString","optional":true},"key_vault_managed_identity_id":{"type":"TypeString","optional":true}}}},"encryption_in_transit_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"extension":{"type":"TypeList","optional":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","required":true}}},"maxItems":1},"gateway":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"https_endpoint":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"metastores":{"type":"TypeList","optional":true,"elem":{"schema":{"ambari":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"hive":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"oozie":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"monitor":{"type":"TypeList","optional":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network":{"type":"TypeList","optional":true,"elem":{"schema":{"connection_direction":{"type":"TypeString","optional":true,"default":"Inbound","forceNew":true},"private_link_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}}},"maxItems":1},"private_link_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"group_id":{"type":"TypeString","required":true},"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"primary":{"type":"TypeBool","optional":true},"private_ip_address":{"type":"TypeString","optional":true},"private_ip_allocation_method":{"type":"TypeString","optional":true},"subnet_id":{"type":"TypeString","optional":true}}},"maxItems":1},"name":{"type":"TypeString","required":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"roles":{"type":"TypeList","required":true,"elem":{"schema":{"head_node":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"worker_node":{"type":"TypeList","required":true,"elem":{"schema":{"autoscale":{"type":"TypeList","optional":true,"elem":{"schema":{"capacity":{"type":"TypeList","optional":true,"elem":{"schema":{"max_instance_count":{"type":"TypeInt","required":true},"min_instance_count":{"type":"TypeInt","required":true}}},"maxItems":1},"recurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"days":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"target_instance_count":{"type":"TypeInt","required":true},"time":{"type":"TypeString","required":true}}},"minItems":1},"timezone":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"target_instance_count":{"type":"TypeInt","required":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"zookeeper_node":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"security_profile":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"aadds_resource_id":{"type":"TypeString","required":true,"forceNew":true},"cluster_users_group_dns":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"domain_name":{"type":"TypeString","required":true,"forceNew":true},"domain_user_password":{"type":"TypeString","required":true,"forceNew":true},"domain_username":{"type":"TypeString","required":true,"forceNew":true},"ldaps_urls":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"msi_resource_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"ssh_endpoint":{"type":"TypeString","computed":true},"storage_account":{"type":"TypeList","optional":true,"elem":{"schema":{"is_default":{"type":"TypeBool","required":true,"forceNew":true},"storage_account_key":{"type":"TypeString","required":true,"forceNew":true},"storage_container_id":{"type":"TypeString","required":true,"forceNew":true},"storage_resource_id":{"type":"TypeString","optional":true,"forceNew":true}}}},"storage_account_gen2":{"type":"TypeList","optional":true,"elem":{"schema":{"filesystem_id":{"type":"TypeString","required":true,"forceNew":true},"is_default":{"type":"TypeBool","required":true,"forceNew":true},"managed_identity_resource_id":{"type":"TypeString","required":true,"forceNew":true},"storage_resource_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tier":{"type":"TypeString","required":true,"forceNew":true},"tls_min_version":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_healthbot":{"schema":{"bot_management_portal_url":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_healthcare_dicom_service":{"schema":{"authentication":{"type":"TypeList","computed":true,"elem":{"schema":{"audience":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"authority":{"type":"TypeString","computed":true}}}},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_endpoint":{"type":"TypeSet","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"service_url":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":90,"read":5,"delete":30,"update":90}},"azurerm_healthcare_fhir_service":{"schema":{"access_policy_object_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"authentication":{"type":"TypeList","required":true,"elem":{"schema":{"audience":{"type":"TypeString","required":true},"authority":{"type":"TypeString","required":true},"smart_proxy_enabled":{"type":"TypeBool","optional":true}}},"maxItems":1},"configuration_export_storage_account_name":{"type":"TypeString","optional":true},"container_registry_login_server_url":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"cors":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_headers":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"maxItems":64},"allowed_methods":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"maxItems":64},"allowed_origins":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"maxItems":64},"credentials_allowed":{"type":"TypeBool","optional":true,"default":false},"max_age_in_seconds":{"type":"TypeInt","optional":true}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"kind":{"type":"TypeString","optional":true,"default":"fhir-R4","forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"oci_artifact":{"type":"TypeList","optional":true,"elem":{"schema":{"digest":{"type":"TypeString","optional":true},"image_name":{"type":"TypeString","optional":true},"login_server":{"type":"TypeString","required":true}}}},"public_network_access_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":90,"read":5,"delete":30,"update":90}},"azurerm_healthcare_medtech_service":{"schema":{"device_mapping_json":{"type":"TypeString","required":true},"eventhub_consumer_group_name":{"type":"TypeString","required":true},"eventhub_name":{"type":"TypeString","required":true},"eventhub_namespace_name":{"type":"TypeString","required":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_healthcare_medtech_service_fhir_destination":{"schema":{"destination_fhir_mapping_json":{"type":"TypeString","required":true},"destination_fhir_service_id":{"type":"TypeString","required":true},"destination_identity_resolution_type":{"type":"TypeString","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"medtech_service_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_healthcare_service":{"schema":{"access_policy_object_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"authentication_configuration":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"audience":{"type":"TypeString","optional":true},"authority":{"type":"TypeString","optional":true},"smart_proxy_enabled":{"type":"TypeBool","optional":true}}},"maxItems":1},"configuration_export_storage_account_name":{"type":"TypeString","optional":true},"cors_configuration":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"allow_credentials":{"type":"TypeBool","optional":true},"allowed_headers":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":64},"allowed_methods":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":64},"allowed_origins":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":64},"max_age_in_seconds":{"type":"TypeInt","optional":true}}},"maxItems":1},"cosmosdb_key_vault_key_versionless_id":{"type":"TypeString","optional":true,"forceNew":true},"cosmosdb_throughput":{"type":"TypeInt","optional":true,"default":1000},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"kind":{"type":"TypeString","optional":true,"default":"fhir"},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_healthcare_workspace":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_endpoint_connection":{"type":"TypeSet","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_hpc_cache":{"schema":{"automatically_rotate_key_to_latest_enabled":{"type":"TypeBool","optional":true},"cache_size_in_gb":{"type":"TypeInt","required":true,"forceNew":true},"default_access_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"access_rule":{"type":"TypeSet","required":true,"elem":{"schema":{"access":{"type":"TypeString","required":true},"anonymous_gid":{"type":"TypeInt","optional":true},"anonymous_uid":{"type":"TypeInt","optional":true},"filter":{"type":"TypeString","optional":true},"root_squash_enabled":{"type":"TypeBool","optional":true},"scope":{"type":"TypeString","required":true},"submount_access_enabled":{"type":"TypeBool","optional":true},"suid_enabled":{"type":"TypeBool","optional":true}}},"maxItems":3,"minItems":1}}},"maxItems":1,"minItems":1},"directory_active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"cache_netbios_name":{"type":"TypeString","required":true},"dns_primary_ip":{"type":"TypeString","required":true},"dns_secondary_ip":{"type":"TypeString","optional":true},"domain_name":{"type":"TypeString","required":true},"domain_netbios_name":{"type":"TypeString","required":true},"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true}}},"maxItems":1},"directory_flat_file":{"type":"TypeList","optional":true,"elem":{"schema":{"group_file_uri":{"type":"TypeString","required":true},"password_file_uri":{"type":"TypeString","required":true}}},"maxItems":1},"directory_ldap":{"type":"TypeList","optional":true,"elem":{"schema":{"base_dn":{"type":"TypeString","required":true},"bind":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"dn":{"type":"TypeString","required":true},"password":{"type":"TypeString","required":true}}},"maxItems":1},"certificate_validation_uri":{"type":"TypeString","optional":true},"download_certificate_automatically":{"type":"TypeBool","optional":true},"encrypted":{"type":"TypeBool","optional":true},"server":{"type":"TypeString","required":true}}},"maxItems":1},"dns":{"type":"TypeList","optional":true,"elem":{"schema":{"search_domain":{"type":"TypeString","optional":true},"servers":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":3}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"key_vault_key_id":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"mount_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"mtu":{"type":"TypeInt","optional":true,"default":1500},"name":{"type":"TypeString","required":true,"forceNew":true},"ntp_server":{"type":"TypeString","optional":true,"default":"time.windows.com"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_hpc_cache_access_policy":{"schema":{"access_rule":{"type":"TypeSet","required":true,"elem":{"schema":{"access":{"type":"TypeString","required":true},"anonymous_gid":{"type":"TypeInt","optional":true},"anonymous_uid":{"type":"TypeInt","optional":true},"filter":{"type":"TypeString","optional":true},"root_squash_enabled":{"type":"TypeBool","optional":true},"scope":{"type":"TypeString","required":true},"submount_access_enabled":{"type":"TypeBool","optional":true},"suid_enabled":{"type":"TypeBool","optional":true}}},"maxItems":3,"minItems":1},"hpc_cache_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_hpc_cache_blob_nfs_target":{"schema":{"access_policy_name":{"type":"TypeString","optional":true,"default":"default"},"cache_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_path":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"storage_container_id":{"type":"TypeString","required":true,"forceNew":true},"usage_model":{"type":"TypeString","required":true},"verification_timer_in_seconds":{"type":"TypeInt","optional":true},"write_back_timer_in_seconds":{"type":"TypeInt","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_hpc_cache_blob_target":{"schema":{"access_policy_name":{"type":"TypeString","optional":true,"default":"default"},"cache_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_path":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"storage_container_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_hpc_cache_nfs_target":{"schema":{"cache_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_junction":{"type":"TypeSet","required":true,"elem":{"schema":{"access_policy_name":{"type":"TypeString","optional":true,"default":"default"},"namespace_path":{"type":"TypeString","required":true},"nfs_export":{"type":"TypeString","required":true},"target_path":{"type":"TypeString","optional":true,"default":""}}},"maxItems":10,"minItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"target_host_name":{"type":"TypeString","required":true,"forceNew":true},"usage_model":{"type":"TypeString","required":true},"verification_timer_in_seconds":{"type":"TypeInt","optional":true},"write_back_timer_in_seconds":{"type":"TypeInt","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_image":{"schema":{"data_disk":{"type":"TypeList","optional":true,"elem":{"schema":{"blob_uri":{"type":"TypeString","optional":true,"computed":true},"caching":{"type":"TypeString","optional":true,"default":"None"},"lun":{"type":"TypeInt","optional":true},"managed_disk_id":{"type":"TypeString","optional":true,"forceNew":true},"size_gb":{"type":"TypeInt","optional":true,"computed":true},"storage_type":{"type":"TypeString","required":true,"description":"The type of storage disk","forceNew":true}}}},"hyper_v_generation":{"type":"TypeString","optional":true,"default":"V1","forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"os_disk":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"blob_uri":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"caching":{"type":"TypeString","optional":true,"default":"None"},"disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"managed_disk_id":{"type":"TypeString","optional":true,"computed":true},"os_state":{"type":"TypeString","optional":true},"os_type":{"type":"TypeString","optional":true},"size_gb":{"type":"TypeInt","optional":true,"computed":true,"forceNew":true},"storage_type":{"type":"TypeString","required":true,"description":"The type of storage disk","forceNew":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source_virtual_machine_id":{"type":"TypeString","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zone_resilient":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_iot_security_device_group":{"schema":{"allow_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"connection_from_ips_not_allowed":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"connection_to_ips_not_allowed":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"local_users_not_allowed":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"processes_not_allowed":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"iothub_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"range_rule":{"type":"TypeSet","optional":true,"elem":{"schema":{"duration":{"type":"TypeString","required":true},"max":{"type":"TypeInt","required":true},"min":{"type":"TypeInt","required":true},"type":{"type":"TypeString","required":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iot_security_solution":{"schema":{"additional_workspace":{"type":"TypeSet","optional":true,"elem":{"schema":{"data_types":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","required":true}}}},"disabled_data_sources":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"display_name":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"events_to_export":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"iothub_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"log_analytics_workspace_id":{"type":"TypeString","optional":true},"log_unmasked_ips_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"query_for_resources":{"type":"TypeString","optional":true,"computed":true},"query_subscription_ids":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"recommendations_enabled":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"acr_authentication":{"type":"TypeBool","optional":true,"default":true},"agent_send_unutilized_msg":{"type":"TypeBool","optional":true,"default":true},"baseline":{"type":"TypeBool","optional":true,"default":true},"edge_hub_mem_optimize":{"type":"TypeBool","optional":true,"default":true},"edge_logging_option":{"type":"TypeBool","optional":true,"default":true},"inconsistent_module_settings":{"type":"TypeBool","optional":true,"default":true},"install_agent":{"type":"TypeBool","optional":true,"default":true},"ip_filter_deny_all":{"type":"TypeBool","optional":true,"default":true},"ip_filter_permissive_rule":{"type":"TypeBool","optional":true,"default":true},"open_ports":{"type":"TypeBool","optional":true,"default":true},"permissive_firewall_policy":{"type":"TypeBool","optional":true,"default":true},"permissive_input_firewall_rules":{"type":"TypeBool","optional":true,"default":true},"permissive_output_firewall_rules":{"type":"TypeBool","optional":true,"default":true},"privileged_docker_options":{"type":"TypeBool","optional":true,"default":true},"shared_credentials":{"type":"TypeBool","optional":true,"default":true},"vulnerable_tls_cipher_suite":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iotcentral_application":{"schema":{"display_name":{"type":"TypeString","optional":true,"computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","optional":true,"default":"ST1"},"sub_domain":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"template":{"type":"TypeString","optional":true,"default":"iotc-pnp-preview@1.0.0","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iotcentral_application_network_rule_set":{"schema":{"apply_to_device":{"type":"TypeBool","optional":true,"default":true},"default_action":{"type":"TypeString","optional":true,"default":"Deny"},"iotcentral_application_id":{"type":"TypeString","required":true,"forceNew":true},"ip_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"ip_mask":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iotcentral_organization":{"schema":{"display_name":{"type":"TypeString","required":true},"iotcentral_application_id":{"type":"TypeString","required":true,"forceNew":true},"organization_id":{"type":"TypeString","required":true,"forceNew":true},"parent_organization_id":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub":{"schema":{"cloud_to_device":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"default_ttl":{"type":"TypeString","optional":true,"default":"PT1H"},"feedback":{"type":"TypeList","optional":true,"elem":{"schema":{"lock_duration":{"type":"TypeString","optional":true,"default":"PT60S"},"max_delivery_count":{"type":"TypeInt","optional":true,"default":10},"time_to_live":{"type":"TypeString","optional":true,"default":"PT1H"}}}},"max_delivery_count":{"type":"TypeInt","optional":true,"default":10}}},"maxItems":1},"endpoint":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"authentication_type":{"type":"TypeString","optional":true,"default":"keyBased"},"batch_frequency_in_seconds":{"type":"TypeInt","optional":true,"default":300},"connection_string":{"type":"TypeString","optional":true},"container_name":{"type":"TypeString","optional":true},"encoding":{"type":"TypeString","optional":true,"default":"Avro","forceNew":true},"endpoint_uri":{"type":"TypeString","optional":true},"entity_path":{"type":"TypeString","optional":true},"file_name_format":{"type":"TypeString","optional":true,"default":"{iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}"},"identity_id":{"type":"TypeString","optional":true},"max_chunk_size_in_bytes":{"type":"TypeInt","optional":true,"default":314572800},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}}},"enrichment":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"endpoint_names":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"key":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}},"maxItems":10},"event_hub_events_endpoint":{"type":"TypeString","computed":true},"event_hub_events_namespace":{"type":"TypeString","computed":true},"event_hub_events_path":{"type":"TypeString","computed":true},"event_hub_operations_endpoint":{"type":"TypeString","computed":true},"event_hub_operations_path":{"type":"TypeString","computed":true},"event_hub_partition_count":{"type":"TypeInt","optional":true,"default":4},"event_hub_retention_in_days":{"type":"TypeInt","optional":true,"default":1},"fallback_route":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"condition":{"type":"TypeString","optional":true,"default":"true"},"enabled":{"type":"TypeBool","optional":true,"default":true},"endpoint_names":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"source":{"type":"TypeString","optional":true,"default":"DeviceMessages"}}},"maxItems":1},"file_upload":{"type":"TypeList","optional":true,"elem":{"schema":{"authentication_type":{"type":"TypeString","optional":true,"default":"keyBased"},"connection_string":{"type":"TypeString","required":true},"container_name":{"type":"TypeString","required":true},"default_ttl":{"type":"TypeString","optional":true,"default":"PT1H"},"identity_id":{"type":"TypeString","optional":true},"lock_duration":{"type":"TypeString","optional":true,"default":"PT1M"},"max_delivery_count":{"type":"TypeInt","optional":true,"default":10},"notifications":{"type":"TypeBool","optional":true,"default":false},"sas_ttl":{"type":"TypeString","optional":true,"default":"PT1H"}}},"maxItems":1},"hostname":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"local_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"min_tls_version":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_rule_set":{"type":"TypeList","optional":true,"elem":{"schema":{"apply_to_builtin_eventhub_endpoint":{"type":"TypeBool","optional":true,"default":false},"default_action":{"type":"TypeString","optional":true,"default":"Deny"},"ip_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"ip_mask":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}}}}},"public_network_access_enabled":{"type":"TypeBool","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"route":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"condition":{"type":"TypeString","optional":true,"default":"true"},"enabled":{"type":"TypeBool","required":true},"endpoint_names":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"source":{"type":"TypeString","required":true}}}},"shared_access_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"key_name":{"type":"TypeString","computed":true},"permissions":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true}}}},"sku":{"type":"TypeList","required":true,"elem":{"schema":{"capacity":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_certificate":{"schema":{"certificate_content":{"type":"TypeString","required":true},"iothub_name":{"type":"TypeString","required":true,"forceNew":true},"is_verified":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_consumer_group":{"schema":{"eventhub_endpoint_name":{"type":"TypeString","required":true,"forceNew":true},"iothub_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_iothub_device_update_account":{"schema":{"host_name":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","optional":true,"default":"Standard","forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_device_update_instance":{"schema":{"device_update_account_id":{"type":"TypeString","required":true,"forceNew":true},"diagnostic_enabled":{"type":"TypeBool","optional":true,"default":false},"diagnostic_storage_account":{"type":"TypeList","optional":true,"elem":{"schema":{"connection_string":{"type":"TypeString","required":true},"id":{"type":"TypeString","required":true}}},"maxItems":1},"iothub_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_dps":{"schema":{"allocation_policy":{"type":"TypeString","optional":true,"default":"Hashed"},"data_residency_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"device_provisioning_host_name":{"type":"TypeString","computed":true},"id_scope":{"type":"TypeString","computed":true},"ip_filter_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"ip_mask":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"target":{"type":"TypeString","optional":true}}}},"linked_hub":{"type":"TypeList","optional":true,"elem":{"schema":{"allocation_weight":{"type":"TypeInt","optional":true,"default":1},"apply_allocation_policy":{"type":"TypeBool","optional":true,"default":true},"connection_string":{"type":"TypeString","required":true},"hostname":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_operations_host_name":{"type":"TypeString","computed":true},"sku":{"type":"TypeList","required":true,"elem":{"schema":{"capacity":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_dps_certificate":{"schema":{"certificate_content":{"type":"TypeString","required":true},"iot_dps_name":{"type":"TypeString","required":true,"forceNew":true},"is_verified":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_dps_shared_access_policy":{"schema":{"enrollment_read":{"type":"TypeBool","optional":true,"default":false},"enrollment_write":{"type":"TypeBool","optional":true,"default":false},"iothub_dps_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"registration_read":{"type":"TypeBool","optional":true,"default":false},"registration_write":{"type":"TypeBool","optional":true,"default":false},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"service_config":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_endpoint_cosmosdb_account":{"schema":{"authentication_type":{"type":"TypeString","optional":true,"default":"keyBased"},"container_name":{"type":"TypeString","required":true,"forceNew":true},"database_name":{"type":"TypeString","required":true,"forceNew":true},"endpoint_uri":{"type":"TypeString","required":true,"forceNew":true},"identity_id":{"type":"TypeString","optional":true},"iothub_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"partition_key_name":{"type":"TypeString","optional":true},"partition_key_template":{"type":"TypeString","optional":true},"primary_key":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_key":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_endpoint_eventhub":{"schema":{"authentication_type":{"type":"TypeString","optional":true,"default":"keyBased"},"connection_string":{"type":"TypeString","optional":true},"endpoint_uri":{"type":"TypeString","optional":true},"entity_path":{"type":"TypeString","optional":true},"identity_id":{"type":"TypeString","optional":true},"iothub_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_endpoint_servicebus_queue":{"schema":{"authentication_type":{"type":"TypeString","optional":true,"default":"keyBased"},"connection_string":{"type":"TypeString","optional":true},"endpoint_uri":{"type":"TypeString","optional":true},"entity_path":{"type":"TypeString","optional":true},"identity_id":{"type":"TypeString","optional":true},"iothub_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_endpoint_servicebus_topic":{"schema":{"authentication_type":{"type":"TypeString","optional":true,"default":"keyBased"},"connection_string":{"type":"TypeString","optional":true},"endpoint_uri":{"type":"TypeString","optional":true},"entity_path":{"type":"TypeString","optional":true},"identity_id":{"type":"TypeString","optional":true},"iothub_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_endpoint_storage_container":{"schema":{"authentication_type":{"type":"TypeString","optional":true,"default":"keyBased"},"batch_frequency_in_seconds":{"type":"TypeInt","optional":true,"default":300},"connection_string":{"type":"TypeString","optional":true},"container_name":{"type":"TypeString","required":true},"encoding":{"type":"TypeString","optional":true,"default":"Avro","forceNew":true},"endpoint_uri":{"type":"TypeString","optional":true},"file_name_format":{"type":"TypeString","optional":true,"default":"{iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}"},"identity_id":{"type":"TypeString","optional":true},"iothub_id":{"type":"TypeString","required":true,"forceNew":true},"max_chunk_size_in_bytes":{"type":"TypeInt","optional":true,"default":314572800},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_enrichment":{"schema":{"endpoint_names":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":100},"iothub_name":{"type":"TypeString","required":true,"forceNew":true},"key":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_fallback_route":{"schema":{"condition":{"type":"TypeString","optional":true,"default":"true"},"enabled":{"type":"TypeBool","required":true},"endpoint_names":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":1},"iothub_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source":{"type":"TypeString","optional":true,"default":"DeviceMessages"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_file_upload":{"schema":{"authentication_type":{"type":"TypeString","optional":true,"default":"keyBased"},"connection_string":{"type":"TypeString","required":true},"container_name":{"type":"TypeString","required":true},"default_ttl":{"type":"TypeString","optional":true,"default":"PT1H"},"identity_id":{"type":"TypeString","optional":true},"iothub_id":{"type":"TypeString","required":true,"forceNew":true},"lock_duration":{"type":"TypeString","optional":true,"default":"PT1M"},"max_delivery_count":{"type":"TypeInt","optional":true,"default":10},"notifications_enabled":{"type":"TypeBool","optional":true,"default":false},"sas_ttl":{"type":"TypeString","optional":true,"default":"PT1H"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_route":{"schema":{"condition":{"type":"TypeString","optional":true,"default":"true"},"enabled":{"type":"TypeBool","required":true},"endpoint_names":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":1},"iothub_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_shared_access_policy":{"schema":{"device_connect":{"type":"TypeBool","optional":true,"default":false},"iothub_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"registry_read":{"type":"TypeBool","optional":true,"default":false},"registry_write":{"type":"TypeBool","optional":true,"default":false},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"service_connect":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_ip_group":{"schema":{"cidrs":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"firewall_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"firewall_policy_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_ip_group_cidr":{"schema":{"cidr":{"type":"TypeString","required":true,"forceNew":true},"ip_group_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_key_vault":{"schema":{"access_policy":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"application_id":{"type":"TypeString","optional":true},"certificate_permissions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"key_permissions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"object_id":{"type":"TypeString","required":true},"secret_permissions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"storage_permissions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","required":true}}},"maxItems":1024},"contact":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"email":{"type":"TypeString","required":true},"name":{"type":"TypeString","optional":true},"phone":{"type":"TypeString","optional":true}}}},"enable_rbac_authorization":{"type":"TypeBool","optional":true},"enabled_for_deployment":{"type":"TypeBool","optional":true},"enabled_for_disk_encryption":{"type":"TypeBool","optional":true},"enabled_for_template_deployment":{"type":"TypeBool","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_acls":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"bypass":{"type":"TypeString","required":true},"default_action":{"type":"TypeString","required":true},"ip_rules":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"virtual_network_subnet_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"purge_protection_enabled":{"type":"TypeBool","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true},"soft_delete_retention_days":{"type":"TypeInt","optional":true,"default":90},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","required":true},"vault_uri":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_key_vault_access_policy":{"schema":{"application_id":{"type":"TypeString","optional":true,"forceNew":true},"certificate_permissions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"key_permissions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"key_vault_id":{"type":"TypeString","required":true,"forceNew":true},"object_id":{"type":"TypeString","required":true,"forceNew":true},"secret_permissions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"storage_permissions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_key_vault_certificate":{"schema":{"certificate":{"type":"TypeList","optional":true,"elem":{"schema":{"contents":{"type":"TypeString","required":true},"password":{"type":"TypeString","optional":true}}},"maxItems":1},"certificate_attribute":{"type":"TypeList","computed":true,"elem":{"schema":{"created":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","computed":true},"expires":{"type":"TypeString","computed":true},"not_before":{"type":"TypeString","computed":true},"recovery_level":{"type":"TypeString","computed":true},"updated":{"type":"TypeString","computed":true}}}},"certificate_data":{"type":"TypeString","computed":true},"certificate_data_base64":{"type":"TypeString","computed":true},"certificate_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"issuer_parameters":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true}}},"maxItems":1},"key_properties":{"type":"TypeList","required":true,"elem":{"schema":{"curve":{"type":"TypeString","optional":true,"computed":true},"exportable":{"type":"TypeBool","required":true},"key_size":{"type":"TypeInt","optional":true,"computed":true},"key_type":{"type":"TypeString","required":true},"reuse_key":{"type":"TypeBool","required":true}}},"maxItems":1},"lifetime_action":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeList","required":true,"elem":{"schema":{"action_type":{"type":"TypeString","required":true}}},"maxItems":1},"trigger":{"type":"TypeList","required":true,"elem":{"schema":{"days_before_expiry":{"type":"TypeInt","optional":true},"lifetime_percentage":{"type":"TypeInt","optional":true}}},"maxItems":1}}}},"secret_properties":{"type":"TypeList","required":true,"elem":{"schema":{"content_type":{"type":"TypeString","required":true}}},"maxItems":1},"x509_certificate_properties":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"extended_key_usage":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"key_usage":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"subject":{"type":"TypeString","required":true},"subject_alternative_names":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"dns_names":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"emails":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"upns":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"validity_in_months":{"type":"TypeInt","required":true}}},"maxItems":1}}},"maxItems":1},"key_vault_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_manager_id":{"type":"TypeString","computed":true},"resource_manager_versionless_id":{"type":"TypeString","computed":true},"secret_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"thumbprint":{"type":"TypeString","computed":true},"version":{"type":"TypeString","computed":true},"versionless_id":{"type":"TypeString","computed":true},"versionless_secret_id":{"type":"TypeString","computed":true}},"timeouts":{"create":60,"read":30,"delete":30,"update":30}},"azurerm_key_vault_certificate_contacts":{"schema":{"contact":{"type":"TypeSet","optional":true,"elem":{"schema":{"email":{"type":"TypeString","required":true},"name":{"type":"TypeString","optional":true},"phone":{"type":"TypeString","optional":true}}}},"key_vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_key_vault_certificate_issuer":{"schema":{"account_id":{"type":"TypeString","optional":true},"admin":{"type":"TypeList","optional":true,"elem":{"schema":{"email_address":{"type":"TypeString","required":true},"first_name":{"type":"TypeString","optional":true},"last_name":{"type":"TypeString","optional":true},"phone":{"type":"TypeString","optional":true}}}},"key_vault_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"org_id":{"type":"TypeString","optional":true},"password":{"type":"TypeString","optional":true},"provider_name":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_key_vault_key":{"schema":{"curve":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"e":{"type":"TypeString","computed":true},"expiration_date":{"type":"TypeString","optional":true},"key_opts":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"key_size":{"type":"TypeInt","optional":true,"forceNew":true},"key_type":{"type":"TypeString","required":true,"forceNew":true},"key_vault_id":{"type":"TypeString","required":true,"forceNew":true},"n":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"not_before_date":{"type":"TypeString","optional":true},"public_key_openssh":{"type":"TypeString","computed":true},"public_key_pem":{"type":"TypeString","computed":true},"resource_id":{"type":"TypeString","computed":true},"resource_versionless_id":{"type":"TypeString","computed":true},"rotation_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"automatic":{"type":"TypeList","optional":true,"elem":{"schema":{"time_after_creation":{"type":"TypeString","optional":true},"time_before_expiry":{"type":"TypeString","optional":true}}},"maxItems":1},"expire_after":{"type":"TypeString","optional":true},"notify_before_expiry":{"type":"TypeString","optional":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"version":{"type":"TypeString","computed":true},"versionless_id":{"type":"TypeString","computed":true},"x":{"type":"TypeString","computed":true},"y":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":30,"delete":30,"update":30}},"azurerm_key_vault_managed_hardware_security_module":{"schema":{"admin_object_ids":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"hsm_uri":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_acls":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"bypass":{"type":"TypeString","required":true},"default_action":{"type":"TypeString","required":true}}},"maxItems":1},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"purge_protection_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"security_domain_encrypted_data":{"type":"TypeString","computed":true},"security_domain_key_vault_certificate_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":10,"minItems":3},"security_domain_quorum":{"type":"TypeInt","optional":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"soft_delete_retention_days":{"type":"TypeInt","optional":true,"default":90,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":30}},"azurerm_key_vault_managed_hardware_security_module_key":{"schema":{"curve":{"type":"TypeString","optional":true,"forceNew":true},"expiration_date":{"type":"TypeString","optional":true},"key_opts":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"key_size":{"type":"TypeInt","optional":true,"forceNew":true},"key_type":{"type":"TypeString","required":true,"forceNew":true},"managed_hsm_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"not_before_date":{"type":"TypeString","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"versioned_id":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_key_vault_managed_hardware_security_module_role_assignment":{"schema":{"managed_hsm_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"principal_id":{"type":"TypeString","required":true,"forceNew":true},"resource_id":{"type":"TypeString","computed":true},"role_definition_id":{"type":"TypeString","required":true,"forceNew":true},"scope":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":10}},"azurerm_key_vault_managed_hardware_security_module_role_definition":{"schema":{"description":{"type":"TypeString","optional":true},"managed_hsm_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"permission":{"type":"TypeList","optional":true,"elem":{"schema":{"actions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_actions":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"not_actions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"not_data_actions":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"resource_manager_id":{"type":"TypeString","computed":true},"role_name":{"type":"TypeString","optional":true},"role_type":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":10,"update":10}},"azurerm_key_vault_managed_storage_account":{"schema":{"key_vault_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"regenerate_key_automatically":{"type":"TypeBool","optional":true,"default":false},"regeneration_period":{"type":"TypeString","optional":true},"storage_account_id":{"type":"TypeString","required":true},"storage_account_key":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_key_vault_managed_storage_account_sas_token_definition":{"schema":{"managed_storage_account_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"sas_template_uri":{"type":"TypeString","required":true},"sas_type":{"type":"TypeString","required":true},"secret_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"validity_period":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_key_vault_secret":{"schema":{"content_type":{"type":"TypeString","optional":true},"expiration_date":{"type":"TypeString","optional":true},"key_vault_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"not_before_date":{"type":"TypeString","optional":true},"resource_id":{"type":"TypeString","computed":true},"resource_versionless_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"value":{"type":"TypeString","required":true},"version":{"type":"TypeString","computed":true},"versionless_id":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":30,"delete":30,"update":30}},"azurerm_kubernetes_cluster":{"schema":{"aci_connector_linux":{"type":"TypeList","optional":true,"elem":{"schema":{"connector_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","computed":true},"object_id":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true}}}},"subnet_name":{"type":"TypeString","required":true}}},"maxItems":1},"api_server_access_profile":{"type":"TypeList","optional":true,"elem":{"schema":{"authorized_ip_ranges":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"auto_scaler_profile":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"balance_similar_node_groups":{"type":"TypeBool","optional":true,"default":false},"empty_bulk_delete_max":{"type":"TypeString","optional":true,"computed":true},"expander":{"type":"TypeString","optional":true,"default":"random"},"max_graceful_termination_sec":{"type":"TypeString","optional":true,"computed":true},"max_node_provisioning_time":{"type":"TypeString","optional":true,"default":"15m"},"max_unready_nodes":{"type":"TypeInt","optional":true,"default":3},"max_unready_percentage":{"type":"TypeFloat","optional":true,"default":45},"new_pod_scale_up_delay":{"type":"TypeString","optional":true,"computed":true},"scale_down_delay_after_add":{"type":"TypeString","optional":true,"computed":true},"scale_down_delay_after_delete":{"type":"TypeString","optional":true,"computed":true},"scale_down_delay_after_failure":{"type":"TypeString","optional":true,"computed":true},"scale_down_unneeded":{"type":"TypeString","optional":true,"computed":true},"scale_down_unready":{"type":"TypeString","optional":true,"computed":true},"scale_down_utilization_threshold":{"type":"TypeString","optional":true,"computed":true},"scan_interval":{"type":"TypeString","optional":true,"computed":true},"skip_nodes_with_local_storage":{"type":"TypeBool","optional":true,"default":false},"skip_nodes_with_system_pods":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"automatic_upgrade_channel":{"type":"TypeString","optional":true},"azure_active_directory_role_based_access_control":{"type":"TypeList","optional":true,"elem":{"schema":{"admin_group_object_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"azure_rbac_enabled":{"type":"TypeBool","optional":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"azure_policy_enabled":{"type":"TypeBool","optional":true},"confidential_computing":{"type":"TypeList","optional":true,"elem":{"schema":{"sgx_quote_helper_enabled":{"type":"TypeBool","required":true}}},"maxItems":1},"cost_analysis_enabled":{"type":"TypeBool","optional":true},"current_kubernetes_version":{"type":"TypeString","computed":true},"default_node_pool":{"type":"TypeList","required":true,"elem":{"schema":{"capacity_reservation_group_id":{"type":"TypeString","optional":true,"forceNew":true},"enable_auto_scaling":{"type":"TypeBool","optional":true},"enable_host_encryption":{"type":"TypeBool","optional":true},"enable_node_public_ip":{"type":"TypeBool","optional":true},"fips_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"gpu_instance":{"type":"TypeString","optional":true,"forceNew":true},"host_group_id":{"type":"TypeString","optional":true,"forceNew":true},"kubelet_config":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_unsafe_sysctls":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"container_log_max_line":{"type":"TypeInt","optional":true},"container_log_max_size_mb":{"type":"TypeInt","optional":true},"cpu_cfs_quota_enabled":{"type":"TypeBool","optional":true,"default":true},"cpu_cfs_quota_period":{"type":"TypeString","optional":true},"cpu_manager_policy":{"type":"TypeString","optional":true},"image_gc_high_threshold":{"type":"TypeInt","optional":true},"image_gc_low_threshold":{"type":"TypeInt","optional":true},"pod_max_pid":{"type":"TypeInt","optional":true},"topology_manager_policy":{"type":"TypeString","optional":true}}},"maxItems":1},"kubelet_disk_type":{"type":"TypeString","optional":true,"computed":true},"linux_os_config":{"type":"TypeList","optional":true,"elem":{"schema":{"swap_file_size_mb":{"type":"TypeInt","optional":true},"sysctl_config":{"type":"TypeList","optional":true,"elem":{"schema":{"fs_aio_max_nr":{"type":"TypeInt","optional":true},"fs_file_max":{"type":"TypeInt","optional":true},"fs_inotify_max_user_watches":{"type":"TypeInt","optional":true},"fs_nr_open":{"type":"TypeInt","optional":true},"kernel_threads_max":{"type":"TypeInt","optional":true},"net_core_netdev_max_backlog":{"type":"TypeInt","optional":true},"net_core_optmem_max":{"type":"TypeInt","optional":true},"net_core_rmem_default":{"type":"TypeInt","optional":true},"net_core_rmem_max":{"type":"TypeInt","optional":true},"net_core_somaxconn":{"type":"TypeInt","optional":true},"net_core_wmem_default":{"type":"TypeInt","optional":true},"net_core_wmem_max":{"type":"TypeInt","optional":true},"net_ipv4_ip_local_port_range_max":{"type":"TypeInt","optional":true},"net_ipv4_ip_local_port_range_min":{"type":"TypeInt","optional":true},"net_ipv4_neigh_default_gc_thresh1":{"type":"TypeInt","optional":true},"net_ipv4_neigh_default_gc_thresh2":{"type":"TypeInt","optional":true},"net_ipv4_neigh_default_gc_thresh3":{"type":"TypeInt","optional":true},"net_ipv4_tcp_fin_timeout":{"type":"TypeInt","optional":true},"net_ipv4_tcp_keepalive_intvl":{"type":"TypeInt","optional":true},"net_ipv4_tcp_keepalive_probes":{"type":"TypeInt","optional":true},"net_ipv4_tcp_keepalive_time":{"type":"TypeInt","optional":true},"net_ipv4_tcp_max_syn_backlog":{"type":"TypeInt","optional":true},"net_ipv4_tcp_max_tw_buckets":{"type":"TypeInt","optional":true},"net_ipv4_tcp_tw_reuse":{"type":"TypeBool","optional":true},"net_netfilter_nf_conntrack_buckets":{"type":"TypeInt","optional":true},"net_netfilter_nf_conntrack_max":{"type":"TypeInt","optional":true},"vm_max_map_count":{"type":"TypeInt","optional":true},"vm_swappiness":{"type":"TypeInt","optional":true},"vm_vfs_cache_pressure":{"type":"TypeInt","optional":true}}},"maxItems":1},"transparent_huge_page_defrag":{"type":"TypeString","optional":true},"transparent_huge_page_enabled":{"type":"TypeString","optional":true}}},"maxItems":1},"max_count":{"type":"TypeInt","optional":true},"max_pods":{"type":"TypeInt","optional":true,"computed":true},"min_count":{"type":"TypeInt","optional":true},"name":{"type":"TypeString","required":true},"node_count":{"type":"TypeInt","optional":true,"computed":true},"node_labels":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"node_network_profile":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_host_ports":{"type":"TypeList","optional":true,"elem":{"schema":{"port_end":{"type":"TypeInt","optional":true},"port_start":{"type":"TypeInt","optional":true},"protocol":{"type":"TypeString","optional":true}}}},"application_security_group_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"node_public_ip_tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"node_public_ip_prefix_id":{"type":"TypeString","optional":true,"forceNew":true},"only_critical_addons_enabled":{"type":"TypeBool","optional":true},"orchestrator_version":{"type":"TypeString","optional":true,"computed":true},"os_disk_size_gb":{"type":"TypeInt","optional":true,"computed":true},"os_disk_type":{"type":"TypeString","optional":true,"default":"Managed"},"os_sku":{"type":"TypeString","optional":true,"computed":true},"pod_subnet_id":{"type":"TypeString","optional":true},"proximity_placement_group_id":{"type":"TypeString","optional":true,"forceNew":true},"scale_down_mode":{"type":"TypeString","optional":true,"default":"Delete"},"snapshot_id":{"type":"TypeString","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"temporary_name_for_rotation":{"type":"TypeString","optional":true},"type":{"type":"TypeString","optional":true,"default":"VirtualMachineScaleSets","forceNew":true},"ultra_ssd_enabled":{"type":"TypeBool","optional":true,"default":false},"upgrade_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"drain_timeout_in_minutes":{"type":"TypeInt","optional":true},"max_surge":{"type":"TypeString","required":true},"node_soak_duration_in_minutes":{"type":"TypeInt","optional":true}}},"maxItems":1},"vm_size":{"type":"TypeString","required":true},"vnet_subnet_id":{"type":"TypeString","optional":true},"workload_runtime":{"type":"TypeString","optional":true,"computed":true},"zones":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"dns_prefix":{"type":"TypeString","optional":true,"forceNew":true},"dns_prefix_private_cluster":{"type":"TypeString","optional":true,"forceNew":true},"edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"fqdn":{"type":"TypeString","computed":true},"http_application_routing_enabled":{"type":"TypeBool","optional":true},"http_application_routing_zone_name":{"type":"TypeString","computed":true},"http_proxy_config":{"type":"TypeList","optional":true,"elem":{"schema":{"http_proxy":{"type":"TypeString","optional":true},"https_proxy":{"type":"TypeString","optional":true},"no_proxy":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"trusted_ca":{"type":"TypeString","optional":true}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"image_cleaner_enabled":{"type":"TypeBool","optional":true},"image_cleaner_interval_hours":{"type":"TypeInt","optional":true},"ingress_application_gateway":{"type":"TypeList","optional":true,"elem":{"schema":{"effective_gateway_id":{"type":"TypeString","computed":true},"gateway_id":{"type":"TypeString","optional":true},"gateway_name":{"type":"TypeString","optional":true},"ingress_application_gateway_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","computed":true},"object_id":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true}}}},"subnet_cidr":{"type":"TypeString","optional":true},"subnet_id":{"type":"TypeString","optional":true}}},"maxItems":1},"key_management_service":{"type":"TypeList","optional":true,"elem":{"schema":{"key_vault_key_id":{"type":"TypeString","required":true},"key_vault_network_access":{"type":"TypeString","optional":true,"default":"Public"}}},"maxItems":1},"key_vault_secrets_provider":{"type":"TypeList","optional":true,"elem":{"schema":{"secret_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","computed":true},"object_id":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true}}}},"secret_rotation_enabled":{"type":"TypeBool","optional":true,"default":false},"secret_rotation_interval":{"type":"TypeString","optional":true,"default":"2m"}}},"maxItems":1},"kube_admin_config":{"type":"TypeList","computed":true,"elem":{"schema":{"client_certificate":{"type":"TypeString","computed":true},"client_key":{"type":"TypeString","computed":true},"cluster_ca_certificate":{"type":"TypeString","computed":true},"host":{"type":"TypeString","computed":true},"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"kube_admin_config_raw":{"type":"TypeString","computed":true},"kube_config":{"type":"TypeList","computed":true,"elem":{"schema":{"client_certificate":{"type":"TypeString","computed":true},"client_key":{"type":"TypeString","computed":true},"cluster_ca_certificate":{"type":"TypeString","computed":true},"host":{"type":"TypeString","computed":true},"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"kube_config_raw":{"type":"TypeString","computed":true},"kubelet_identity":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"object_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"user_assigned_identity_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}}},"maxItems":1},"kubernetes_version":{"type":"TypeString","optional":true,"computed":true},"linux_profile":{"type":"TypeList","optional":true,"elem":{"schema":{"admin_username":{"type":"TypeString","required":true,"forceNew":true},"ssh_key":{"type":"TypeList","required":true,"elem":{"schema":{"key_data":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"local_account_disabled":{"type":"TypeBool","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"maintenance_window":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed":{"type":"TypeSet","optional":true,"elem":{"schema":{"day":{"type":"TypeString","required":true},"hours":{"type":"TypeSet","required":true,"elem":{"type":"TypeInt"},"minItems":1}}}},"not_allowed":{"type":"TypeSet","optional":true,"elem":{"schema":{"end":{"type":"TypeString","required":true},"start":{"type":"TypeString","required":true}}}}}},"maxItems":1},"maintenance_window_auto_upgrade":{"type":"TypeList","optional":true,"elem":{"schema":{"day_of_month":{"type":"TypeInt","optional":true},"day_of_week":{"type":"TypeString","optional":true},"duration":{"type":"TypeInt","required":true},"frequency":{"type":"TypeString","required":true},"interval":{"type":"TypeInt","required":true},"not_allowed":{"type":"TypeSet","optional":true,"elem":{"schema":{"end":{"type":"TypeString","required":true},"start":{"type":"TypeString","required":true}}}},"start_date":{"type":"TypeString","optional":true,"computed":true},"start_time":{"type":"TypeString","optional":true},"utc_offset":{"type":"TypeString","optional":true},"week_index":{"type":"TypeString","optional":true}}},"maxItems":1},"maintenance_window_node_os":{"type":"TypeList","optional":true,"elem":{"schema":{"day_of_month":{"type":"TypeInt","optional":true},"day_of_week":{"type":"TypeString","optional":true},"duration":{"type":"TypeInt","required":true},"frequency":{"type":"TypeString","required":true},"interval":{"type":"TypeInt","required":true},"not_allowed":{"type":"TypeSet","optional":true,"elem":{"schema":{"end":{"type":"TypeString","required":true},"start":{"type":"TypeString","required":true}}}},"start_date":{"type":"TypeString","optional":true,"computed":true},"start_time":{"type":"TypeString","optional":true},"utc_offset":{"type":"TypeString","optional":true},"week_index":{"type":"TypeString","optional":true}}},"maxItems":1},"microsoft_defender":{"type":"TypeList","optional":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true}}},"maxItems":1},"monitor_metrics":{"type":"TypeList","optional":true,"elem":{"schema":{"annotations_allowed":{"type":"TypeString","optional":true},"labels_allowed":{"type":"TypeString","optional":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network_profile":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"schema":{"dns_service_ip":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"ip_versions":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"type":"TypeString"}},"load_balancer_profile":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"schema":{"effective_outbound_ips":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"idle_timeout_in_minutes":{"type":"TypeInt","optional":true,"default":30},"managed_outbound_ip_count":{"type":"TypeInt","optional":true,"computed":true},"managed_outbound_ipv6_count":{"type":"TypeInt","optional":true,"computed":true},"outbound_ip_address_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"outbound_ip_prefix_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"outbound_ports_allocated":{"type":"TypeInt","optional":true,"default":0}}},"maxItems":1},"load_balancer_sku":{"type":"TypeString","optional":true,"default":"standard","forceNew":true},"nat_gateway_profile":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"schema":{"effective_outbound_ips":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"idle_timeout_in_minutes":{"type":"TypeInt","optional":true,"default":4},"managed_outbound_ip_count":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"network_data_plane":{"type":"TypeString","optional":true,"default":"azure"},"network_mode":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"network_plugin":{"type":"TypeString","required":true,"forceNew":true},"network_plugin_mode":{"type":"TypeString","optional":true},"network_policy":{"type":"TypeString","optional":true,"computed":true},"outbound_type":{"type":"TypeString","optional":true,"default":"loadBalancer"},"pod_cidr":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"pod_cidrs":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"type":"TypeString"}},"service_cidr":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"service_cidrs":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"node_os_upgrade_channel":{"type":"TypeString","optional":true,"default":"NodeImage"},"node_resource_group":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"node_resource_group_id":{"type":"TypeString","computed":true},"oidc_issuer_enabled":{"type":"TypeBool","optional":true},"oidc_issuer_url":{"type":"TypeString","computed":true},"oms_agent":{"type":"TypeList","optional":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true},"msi_auth_for_monitoring_enabled":{"type":"TypeBool","optional":true},"oms_agent_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","computed":true},"object_id":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true}}}}}},"maxItems":1},"open_service_mesh_enabled":{"type":"TypeBool","optional":true},"portal_fqdn":{"type":"TypeString","computed":true},"private_cluster_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"private_cluster_public_fqdn_enabled":{"type":"TypeBool","optional":true,"default":false},"private_dns_zone_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"private_fqdn":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"role_based_access_control_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"run_command_enabled":{"type":"TypeBool","optional":true,"default":true},"service_mesh_profile":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate_authority":{"type":"TypeList","optional":true,"elem":{"schema":{"cert_chain_object_name":{"type":"TypeString","required":true},"cert_object_name":{"type":"TypeString","required":true},"key_object_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","required":true},"root_cert_object_name":{"type":"TypeString","required":true}}},"maxItems":1},"external_ingress_gateway_enabled":{"type":"TypeBool","optional":true},"internal_ingress_gateway_enabled":{"type":"TypeBool","optional":true},"mode":{"type":"TypeString","required":true},"revisions":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":2,"minItems":1}}},"maxItems":1},"service_principal":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true}}},"maxItems":1},"sku_tier":{"type":"TypeString","optional":true,"default":"Free"},"storage_profile":{"type":"TypeList","optional":true,"elem":{"schema":{"blob_driver_enabled":{"type":"TypeBool","optional":true,"default":false},"disk_driver_enabled":{"type":"TypeBool","optional":true,"default":true},"file_driver_enabled":{"type":"TypeBool","optional":true,"default":true},"snapshot_controller_enabled":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"support_plan":{"type":"TypeString","optional":true,"default":"KubernetesOfficial"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"web_app_routing":{"type":"TypeList","optional":true,"elem":{"schema":{"dns_zone_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"web_app_routing_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","computed":true},"object_id":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true}}}}}},"maxItems":1},"windows_profile":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"admin_password":{"type":"TypeString","required":true},"admin_username":{"type":"TypeString","required":true,"forceNew":true},"gmsa":{"type":"TypeList","optional":true,"elem":{"schema":{"dns_server":{"type":"TypeString","required":true},"root_domain":{"type":"TypeString","required":true}}},"maxItems":1},"license":{"type":"TypeString","optional":true}}},"maxItems":1},"workload_autoscaler_profile":{"type":"TypeList","optional":true,"elem":{"schema":{"keda_enabled":{"type":"TypeBool","optional":true,"default":false},"vertical_pod_autoscaler_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"workload_identity_enabled":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_kubernetes_cluster_extension":{"schema":{"aks_assigned_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"cluster_id":{"type":"TypeString","required":true,"forceNew":true},"configuration_protected_settings":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"configuration_settings":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"current_version":{"type":"TypeString","computed":true},"extension_type":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"plan":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"product":{"type":"TypeString","required":true,"forceNew":true},"promotion_code":{"type":"TypeString","optional":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"release_namespace":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"release_train":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"target_namespace":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"version":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_kubernetes_cluster_node_pool":{"schema":{"capacity_reservation_group_id":{"type":"TypeString","optional":true,"forceNew":true},"enable_auto_scaling":{"type":"TypeBool","optional":true},"enable_host_encryption":{"type":"TypeBool","optional":true,"forceNew":true},"enable_node_public_ip":{"type":"TypeBool","optional":true,"forceNew":true},"eviction_policy":{"type":"TypeString","optional":true,"forceNew":true},"fips_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"gpu_instance":{"type":"TypeString","optional":true,"forceNew":true},"host_group_id":{"type":"TypeString","optional":true,"forceNew":true},"kubelet_config":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"allowed_unsafe_sysctls":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"container_log_max_line":{"type":"TypeInt","optional":true,"forceNew":true},"container_log_max_size_mb":{"type":"TypeInt","optional":true,"forceNew":true},"cpu_cfs_quota_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"cpu_cfs_quota_period":{"type":"TypeString","optional":true,"forceNew":true},"cpu_manager_policy":{"type":"TypeString","optional":true,"forceNew":true},"image_gc_high_threshold":{"type":"TypeInt","optional":true,"forceNew":true},"image_gc_low_threshold":{"type":"TypeInt","optional":true,"forceNew":true},"pod_max_pid":{"type":"TypeInt","optional":true,"forceNew":true},"topology_manager_policy":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"kubelet_disk_type":{"type":"TypeString","optional":true,"computed":true},"kubernetes_cluster_id":{"type":"TypeString","required":true,"forceNew":true},"linux_os_config":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"swap_file_size_mb":{"type":"TypeInt","optional":true,"forceNew":true},"sysctl_config":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"fs_aio_max_nr":{"type":"TypeInt","optional":true,"forceNew":true},"fs_file_max":{"type":"TypeInt","optional":true,"forceNew":true},"fs_inotify_max_user_watches":{"type":"TypeInt","optional":true,"forceNew":true},"fs_nr_open":{"type":"TypeInt","optional":true,"forceNew":true},"kernel_threads_max":{"type":"TypeInt","optional":true,"forceNew":true},"net_core_netdev_max_backlog":{"type":"TypeInt","optional":true,"forceNew":true},"net_core_optmem_max":{"type":"TypeInt","optional":true,"forceNew":true},"net_core_rmem_default":{"type":"TypeInt","optional":true,"forceNew":true},"net_core_rmem_max":{"type":"TypeInt","optional":true,"forceNew":true},"net_core_somaxconn":{"type":"TypeInt","optional":true,"forceNew":true},"net_core_wmem_default":{"type":"TypeInt","optional":true,"forceNew":true},"net_core_wmem_max":{"type":"TypeInt","optional":true,"forceNew":true},"net_ipv4_ip_local_port_range_max":{"type":"TypeInt","optional":true,"forceNew":true},"net_ipv4_ip_local_port_range_min":{"type":"TypeInt","optional":true,"forceNew":true},"net_ipv4_neigh_default_gc_thresh1":{"type":"TypeInt","optional":true,"forceNew":true},"net_ipv4_neigh_default_gc_thresh2":{"type":"TypeInt","optional":true,"forceNew":true},"net_ipv4_neigh_default_gc_thresh3":{"type":"TypeInt","optional":true,"forceNew":true},"net_ipv4_tcp_fin_timeout":{"type":"TypeInt","optional":true,"forceNew":true},"net_ipv4_tcp_keepalive_intvl":{"type":"TypeInt","optional":true,"forceNew":true},"net_ipv4_tcp_keepalive_probes":{"type":"TypeInt","optional":true,"forceNew":true},"net_ipv4_tcp_keepalive_time":{"type":"TypeInt","optional":true,"forceNew":true},"net_ipv4_tcp_max_syn_backlog":{"type":"TypeInt","optional":true,"forceNew":true},"net_ipv4_tcp_max_tw_buckets":{"type":"TypeInt","optional":true,"forceNew":true},"net_ipv4_tcp_tw_reuse":{"type":"TypeBool","optional":true,"forceNew":true},"net_netfilter_nf_conntrack_buckets":{"type":"TypeInt","optional":true,"forceNew":true},"net_netfilter_nf_conntrack_max":{"type":"TypeInt","optional":true,"forceNew":true},"vm_max_map_count":{"type":"TypeInt","optional":true,"forceNew":true},"vm_swappiness":{"type":"TypeInt","optional":true,"forceNew":true},"vm_vfs_cache_pressure":{"type":"TypeInt","optional":true,"forceNew":true}}},"maxItems":1},"transparent_huge_page_defrag":{"type":"TypeString","optional":true,"forceNew":true},"transparent_huge_page_enabled":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"max_count":{"type":"TypeInt","optional":true},"max_pods":{"type":"TypeInt","optional":true,"computed":true,"forceNew":true},"min_count":{"type":"TypeInt","optional":true},"mode":{"type":"TypeString","optional":true,"default":"User"},"name":{"type":"TypeString","required":true,"forceNew":true},"node_count":{"type":"TypeInt","optional":true,"computed":true},"node_labels":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"node_network_profile":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_host_ports":{"type":"TypeList","optional":true,"elem":{"schema":{"port_end":{"type":"TypeInt","optional":true},"port_start":{"type":"TypeInt","optional":true},"protocol":{"type":"TypeString","optional":true}}}},"application_security_group_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"node_public_ip_tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"node_public_ip_prefix_id":{"type":"TypeString","optional":true,"forceNew":true},"node_taints":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"orchestrator_version":{"type":"TypeString","optional":true,"computed":true},"os_disk_size_gb":{"type":"TypeInt","optional":true,"computed":true,"forceNew":true},"os_disk_type":{"type":"TypeString","optional":true,"default":"Managed","forceNew":true},"os_sku":{"type":"TypeString","optional":true,"computed":true},"os_type":{"type":"TypeString","optional":true,"default":"Linux","forceNew":true},"pod_subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"priority":{"type":"TypeString","optional":true,"default":"Regular","forceNew":true},"proximity_placement_group_id":{"type":"TypeString","optional":true,"forceNew":true},"scale_down_mode":{"type":"TypeString","optional":true,"default":"Delete"},"snapshot_id":{"type":"TypeString","optional":true,"forceNew":true},"spot_max_price":{"type":"TypeFloat","optional":true,"default":-1,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ultra_ssd_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"upgrade_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"drain_timeout_in_minutes":{"type":"TypeInt","optional":true},"max_surge":{"type":"TypeString","required":true},"node_soak_duration_in_minutes":{"type":"TypeInt","optional":true}}},"maxItems":1},"vm_size":{"type":"TypeString","required":true,"forceNew":true},"vnet_subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"windows_profile":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"outbound_nat_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true}}},"maxItems":1},"workload_runtime":{"type":"TypeString","optional":true},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_kubernetes_cluster_trusted_access_role_binding":{"schema":{"kubernetes_cluster_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"roles":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"source_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_kubernetes_fleet_manager":{"schema":{"hub_profile":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"dns_prefix":{"type":"TypeString","required":true},"fqdn":{"type":"TypeString","computed":true},"kubernetes_version":{"type":"TypeString","computed":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_kubernetes_fleet_member":{"schema":{"group":{"type":"TypeString","optional":true},"kubernetes_cluster_id":{"type":"TypeString","required":true,"forceNew":true},"kubernetes_fleet_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_kubernetes_fleet_update_run":{"schema":{"fleet_update_strategy_id":{"type":"TypeString","optional":true},"kubernetes_fleet_manager_id":{"type":"TypeString","required":true,"forceNew":true},"managed_cluster_update":{"type":"TypeList","required":true,"elem":{"schema":{"node_image_selection":{"type":"TypeList","optional":true,"elem":{"schema":{"type":{"type":"TypeString","required":true}}},"maxItems":1},"upgrade":{"type":"TypeList","required":true,"elem":{"schema":{"kubernetes_version":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"stage":{"type":"TypeList","optional":true,"elem":{"schema":{"after_stage_wait_in_seconds":{"type":"TypeInt","optional":true},"group":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true}}},"minItems":1},"name":{"type":"TypeString","required":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_kubernetes_fleet_update_strategy":{"schema":{"kubernetes_fleet_manager_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"stage":{"type":"TypeList","required":true,"elem":{"schema":{"after_stage_wait_in_seconds":{"type":"TypeInt","optional":true},"group":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true}}},"minItems":1},"name":{"type":"TypeString","required":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_kubernetes_flux_configuration":{"schema":{"blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"account_key":{"type":"TypeString","optional":true},"container_id":{"type":"TypeString","required":true},"local_auth_reference":{"type":"TypeString","optional":true},"managed_identity":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true}}},"maxItems":1},"sas_token":{"type":"TypeString","optional":true},"service_principal":{"type":"TypeList","optional":true,"elem":{"schema":{"client_certificate_base64":{"type":"TypeString","optional":true},"client_certificate_password":{"type":"TypeString","optional":true},"client_certificate_send_chain":{"type":"TypeBool","optional":true,"default":false},"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","optional":true},"tenant_id":{"type":"TypeString","required":true}}},"maxItems":1},"sync_interval_in_seconds":{"type":"TypeInt","optional":true,"default":600},"timeout_in_seconds":{"type":"TypeInt","optional":true,"default":600}}},"maxItems":1},"bucket":{"type":"TypeList","optional":true,"elem":{"schema":{"access_key":{"type":"TypeString","optional":true},"bucket_name":{"type":"TypeString","required":true},"local_auth_reference":{"type":"TypeString","optional":true},"secret_key_base64":{"type":"TypeString","optional":true},"sync_interval_in_seconds":{"type":"TypeInt","optional":true,"default":600},"timeout_in_seconds":{"type":"TypeInt","optional":true,"default":600},"tls_enabled":{"type":"TypeBool","optional":true,"default":true},"url":{"type":"TypeString","required":true}}},"maxItems":1},"cluster_id":{"type":"TypeString","required":true,"forceNew":true},"continuous_reconciliation_enabled":{"type":"TypeBool","optional":true,"default":true},"git_repository":{"type":"TypeList","optional":true,"elem":{"schema":{"https_ca_cert_base64":{"type":"TypeString","optional":true},"https_key_base64":{"type":"TypeString","optional":true},"https_user":{"type":"TypeString","optional":true},"local_auth_reference":{"type":"TypeString","optional":true},"reference_type":{"type":"TypeString","required":true},"reference_value":{"type":"TypeString","required":true},"ssh_known_hosts_base64":{"type":"TypeString","optional":true},"ssh_private_key_base64":{"type":"TypeString","optional":true},"sync_interval_in_seconds":{"type":"TypeInt","optional":true,"default":600},"timeout_in_seconds":{"type":"TypeInt","optional":true,"default":600},"url":{"type":"TypeString","required":true}}},"maxItems":1},"kustomizations":{"type":"TypeSet","required":true,"elem":{"schema":{"depends_on":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"garbage_collection_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true},"recreating_enabled":{"type":"TypeBool","optional":true,"default":false},"retry_interval_in_seconds":{"type":"TypeInt","optional":true,"default":600},"sync_interval_in_seconds":{"type":"TypeInt","optional":true,"default":600},"timeout_in_seconds":{"type":"TypeInt","optional":true,"default":600}}},"minItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace":{"type":"TypeString","required":true,"forceNew":true},"scope":{"type":"TypeString","optional":true,"default":"namespace","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_kusto_attached_database_configuration":{"schema":{"attached_database_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"cluster_name":{"type":"TypeString","required":true,"forceNew":true},"cluster_resource_id":{"type":"TypeString","required":true,"forceNew":true},"database_name":{"type":"TypeString","required":true,"forceNew":true},"default_principal_modification_kind":{"type":"TypeString","optional":true,"default":"None"},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sharing":{"type":"TypeList","optional":true,"elem":{"schema":{"external_tables_to_exclude":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"external_tables_to_include":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"materialized_views_to_exclude":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"materialized_views_to_include":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"tables_to_exclude":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"tables_to_include":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_kusto_cluster":{"schema":{"allowed_fqdns":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"allowed_ip_ranges":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"auto_stop_enabled":{"type":"TypeBool","optional":true,"default":true},"data_ingestion_uri":{"type":"TypeString","computed":true},"disk_encryption_enabled":{"type":"TypeBool","optional":true,"default":false},"double_encryption_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"language_extensions":{"type":"TypeList","optional":true,"elem":{"schema":{"image":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"optimized_auto_scale":{"type":"TypeList","optional":true,"elem":{"schema":{"maximum_instances":{"type":"TypeInt","required":true},"minimum_instances":{"type":"TypeInt","required":true}}},"maxItems":1},"outbound_network_access_restricted":{"type":"TypeBool","optional":true,"default":false},"public_ip_type":{"type":"TypeString","optional":true,"default":"IPv4"},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"purge_enabled":{"type":"TypeBool","optional":true,"default":false},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeList","required":true,"elem":{"schema":{"capacity":{"type":"TypeInt","optional":true,"computed":true},"name":{"type":"TypeString","required":true}}},"maxItems":1},"streaming_ingestion_enabled":{"type":"TypeBool","optional":true,"default":false},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"trusted_external_tenants":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"type":"TypeString"}},"uri":{"type":"TypeString","computed":true},"virtual_network_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"data_management_public_ip_id":{"type":"TypeString","required":true,"forceNew":true},"engine_public_ip_id":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_kusto_cluster_customer_managed_key":{"schema":{"cluster_id":{"type":"TypeString","required":true,"forceNew":true},"key_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","required":true},"key_version":{"type":"TypeString","optional":true},"user_identity":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_kusto_cluster_managed_private_endpoint":{"schema":{"cluster_name":{"type":"TypeString","required":true,"forceNew":true},"group_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_link_resource_id":{"type":"TypeString","required":true,"forceNew":true},"private_link_resource_region":{"type":"TypeString","optional":true,"forceNew":true},"request_message":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_kusto_cluster_principal_assignment":{"schema":{"cluster_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"principal_id":{"type":"TypeString","required":true,"forceNew":true},"principal_name":{"type":"TypeString","computed":true},"principal_type":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"role":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","required":true,"forceNew":true},"tenant_name":{"type":"TypeString","computed":true}},"timeouts":{"create":60,"read":5,"delete":60}},"azurerm_kusto_cosmosdb_data_connection":{"schema":{"cosmosdb_container_id":{"type":"TypeString","required":true,"forceNew":true},"kusto_database_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_identity_id":{"type":"TypeString","required":true,"forceNew":true},"mapping_rule_name":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"retrieval_start_date":{"type":"TypeString","optional":true,"forceNew":true},"table_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_kusto_database":{"schema":{"cluster_name":{"type":"TypeString","required":true,"forceNew":true},"hot_cache_period":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"size":{"type":"TypeFloat","computed":true},"soft_delete_period":{"type":"TypeString","optional":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_kusto_database_principal_assignment":{"schema":{"cluster_name":{"type":"TypeString","required":true,"forceNew":true},"database_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"principal_id":{"type":"TypeString","required":true,"forceNew":true},"principal_name":{"type":"TypeString","computed":true},"principal_type":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"role":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","required":true,"forceNew":true},"tenant_name":{"type":"TypeString","computed":true}},"timeouts":{"create":60,"read":5,"delete":60}},"azurerm_kusto_eventgrid_data_connection":{"schema":{"blob_storage_event_type":{"type":"TypeString","optional":true,"default":"Microsoft.Storage.BlobCreated"},"cluster_name":{"type":"TypeString","required":true,"forceNew":true},"data_format":{"type":"TypeString","optional":true},"database_name":{"type":"TypeString","required":true,"forceNew":true},"database_routing_type":{"type":"TypeString","optional":true,"default":"Single","forceNew":true},"eventgrid_resource_id":{"type":"TypeString","optional":true},"eventhub_consumer_group_name":{"type":"TypeString","required":true,"forceNew":true},"eventhub_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_identity_resource_id":{"type":"TypeString","optional":true},"mapping_rule_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"skip_first_record":{"type":"TypeBool","optional":true,"default":false},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true},"table_name":{"type":"TypeString","optional":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_kusto_eventhub_data_connection":{"schema":{"cluster_name":{"type":"TypeString","required":true,"forceNew":true},"compression":{"type":"TypeString","optional":true,"default":"None","forceNew":true},"consumer_group":{"type":"TypeString","required":true,"forceNew":true},"data_format":{"type":"TypeString","optional":true},"database_name":{"type":"TypeString","required":true,"forceNew":true},"database_routing_type":{"type":"TypeString","optional":true,"default":"Single","forceNew":true},"event_system_properties":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"eventhub_id":{"type":"TypeString","required":true,"forceNew":true},"identity_id":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"mapping_rule_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"table_name":{"type":"TypeString","optional":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_kusto_iothub_data_connection":{"schema":{"cluster_name":{"type":"TypeString","required":true,"forceNew":true},"consumer_group":{"type":"TypeString","required":true,"forceNew":true},"data_format":{"type":"TypeString","optional":true,"forceNew":true},"database_name":{"type":"TypeString","required":true,"forceNew":true},"database_routing_type":{"type":"TypeString","optional":true,"default":"Single","forceNew":true},"event_system_properties":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"iothub_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"mapping_rule_name":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"shared_access_policy_name":{"type":"TypeString","required":true,"forceNew":true},"table_name":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60}},"azurerm_kusto_script":{"schema":{"continue_on_errors_enabled":{"type":"TypeBool","optional":true,"default":false},"database_id":{"type":"TypeString","required":true,"forceNew":true},"force_an_update_when_value_changed":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"sas_token":{"type":"TypeString","optional":true,"forceNew":true},"script_content":{"type":"TypeString","optional":true,"forceNew":true},"url":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_lb":{"schema":{"edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"frontend_ip_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"gateway_load_balancer_frontend_ip_configuration_id":{"type":"TypeString","optional":true,"computed":true},"id":{"type":"TypeString","computed":true},"inbound_nat_rules":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"load_balancer_rules":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"outbound_rules":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"private_ip_address":{"type":"TypeString","optional":true,"computed":true},"private_ip_address_allocation":{"type":"TypeString","optional":true,"computed":true},"private_ip_address_version":{"type":"TypeString","optional":true,"computed":true},"public_ip_address_id":{"type":"TypeString","optional":true,"computed":true},"public_ip_prefix_id":{"type":"TypeString","optional":true,"computed":true},"subnet_id":{"type":"TypeString","optional":true,"computed":true},"zones":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"minItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","optional":true,"default":"Standard","forceNew":true},"sku_tier":{"type":"TypeString","optional":true,"default":"Regional","forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_lb_backend_address_pool":{"schema":{"backend_ip_configurations":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"inbound_nat_rules":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"load_balancing_rules":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"loadbalancer_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"outbound_rules":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"synchronous_mode":{"type":"TypeString","optional":true,"forceNew":true},"tunnel_interface":{"type":"TypeList","optional":true,"elem":{"schema":{"identifier":{"type":"TypeInt","required":true},"port":{"type":"TypeInt","required":true},"protocol":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}},"minItems":1},"virtual_network_id":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_lb_backend_address_pool_address":{"schema":{"backend_address_ip_configuration_id":{"type":"TypeString","optional":true,"description":"For global load balancer, user needs to specify the `backend_address_ip_configuration_id` of the added regional load balancers"},"backend_address_pool_id":{"type":"TypeString","required":true,"forceNew":true},"inbound_nat_rule_port_mapping":{"type":"TypeList","computed":true,"elem":{"schema":{"backend_port":{"type":"TypeInt","computed":true},"frontend_port":{"type":"TypeInt","computed":true},"inbound_nat_rule_name":{"type":"TypeString","computed":true}}}},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_lb_nat_pool":{"schema":{"backend_port":{"type":"TypeInt","required":true},"floating_ip_enabled":{"type":"TypeBool","optional":true},"frontend_ip_configuration_id":{"type":"TypeString","computed":true},"frontend_ip_configuration_name":{"type":"TypeString","required":true},"frontend_port_end":{"type":"TypeInt","required":true},"frontend_port_start":{"type":"TypeInt","required":true},"idle_timeout_in_minutes":{"type":"TypeInt","optional":true,"default":4},"loadbalancer_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"protocol":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tcp_reset_enabled":{"type":"TypeBool","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_lb_nat_rule":{"schema":{"backend_address_pool_id":{"type":"TypeString","optional":true},"backend_ip_configuration_id":{"type":"TypeString","computed":true},"backend_port":{"type":"TypeInt","required":true},"enable_floating_ip":{"type":"TypeBool","optional":true,"computed":true},"enable_tcp_reset":{"type":"TypeBool","optional":true},"frontend_ip_configuration_id":{"type":"TypeString","computed":true},"frontend_ip_configuration_name":{"type":"TypeString","required":true},"frontend_port":{"type":"TypeInt","optional":true},"frontend_port_end":{"type":"TypeInt","optional":true},"frontend_port_start":{"type":"TypeInt","optional":true},"idle_timeout_in_minutes":{"type":"TypeInt","optional":true,"default":4},"loadbalancer_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"protocol":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_lb_outbound_rule":{"schema":{"allocated_outbound_ports":{"type":"TypeInt","optional":true,"default":1024},"backend_address_pool_id":{"type":"TypeString","required":true},"enable_tcp_reset":{"type":"TypeBool","optional":true,"default":false},"frontend_ip_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true}}},"minItems":1},"idle_timeout_in_minutes":{"type":"TypeInt","optional":true,"default":4},"loadbalancer_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"protocol":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_lb_probe":{"schema":{"interval_in_seconds":{"type":"TypeInt","optional":true,"default":15},"load_balancer_rules":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"loadbalancer_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"number_of_probes":{"type":"TypeInt","optional":true,"default":2},"port":{"type":"TypeInt","required":true},"probe_threshold":{"type":"TypeInt","optional":true,"default":1},"protocol":{"type":"TypeString","optional":true,"default":"Tcp"},"request_path":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_lb_rule":{"schema":{"backend_address_pool_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":2,"minItems":1},"backend_port":{"type":"TypeInt","required":true},"disable_outbound_snat":{"type":"TypeBool","optional":true,"default":false},"enable_floating_ip":{"type":"TypeBool","optional":true,"default":false},"enable_tcp_reset":{"type":"TypeBool","optional":true},"frontend_ip_configuration_id":{"type":"TypeString","computed":true},"frontend_ip_configuration_name":{"type":"TypeString","required":true},"frontend_port":{"type":"TypeInt","required":true},"idle_timeout_in_minutes":{"type":"TypeInt","optional":true,"default":4},"load_distribution":{"type":"TypeString","optional":true,"default":"Default"},"loadbalancer_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"probe_id":{"type":"TypeString","optional":true},"protocol":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_lighthouse_assignment":{"schema":{"lighthouse_definition_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"scope":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_lighthouse_definition":{"schema":{"authorization":{"type":"TypeSet","required":true,"elem":{"schema":{"delegated_role_definition_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_display_name":{"type":"TypeString","optional":true},"principal_id":{"type":"TypeString","required":true},"role_definition_id":{"type":"TypeString","required":true}}},"minItems":1},"description":{"type":"TypeString","optional":true},"eligible_authorization":{"type":"TypeSet","optional":true,"elem":{"schema":{"just_in_time_access_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"approver":{"type":"TypeSet","optional":true,"elem":{"schema":{"principal_display_name":{"type":"TypeString","optional":true},"principal_id":{"type":"TypeString","required":true}}}},"maximum_activation_duration":{"type":"TypeString","optional":true,"default":"PT8H"},"multi_factor_auth_provider":{"type":"TypeString","optional":true}}},"maxItems":1},"principal_display_name":{"type":"TypeString","optional":true},"principal_id":{"type":"TypeString","required":true},"role_definition_id":{"type":"TypeString","required":true}}}},"lighthouse_definition_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"managing_tenant_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"plan":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"product":{"type":"TypeString","required":true},"publisher":{"type":"TypeString","required":true},"version":{"type":"TypeString","required":true}}},"maxItems":1},"scope":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_linux_function_app":{"schema":{"app_settings":{"type":"TypeMap","optional":true,"description":"A map of key-value pairs for [App Settings](https://docs.microsoft.com/en-us/azure/azure-functions/functions-app-settings) and custom values.","elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`."}}},"maxItems":1},"additional_login_parameters":{"type":"TypeMap","optional":true,"description":"Specifies a map of Login Parameters to send to the OpenID Connect authorization endpoint when a user logs in.","elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","optional":true,"description":"The default authentication provider to use when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`.","computed":true},"enabled":{"type":"TypeBool","required":true,"description":"Should the Authentication / Authorization feature be enabled?"},"facebook":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret":{"type":"TypeString","optional":true,"description":"The App Secret of the Facebook app used for Facebook Login. Cannot be specified with `app_secret_setting_name`."},"app_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login. Cannot be specified with `app_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"github":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret of the GitHub app used for GitHub Login. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret":{"type":"TypeString","optional":true,"description":"The client secret associated with the Google web application. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for Google Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","elem":{"type":"TypeString"}}}},"maxItems":1},"issuer":{"type":"TypeString","optional":true,"description":"The OpenID Connect Issuer URI that represents the entity which issues access tokens."},"microsoft":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret":{"type":"TypeString","optional":true,"description":"The OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"The list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, `wl.basic` is used as the default scope.","elem":{"type":"TypeString"}}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true,"description":"The RuntimeVersion of the Authentication / Authorization feature in use.","computed":true},"token_refresh_extension_hours":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Windows Web App durably store platform-specific security tokens that are obtained during login flows? Defaults to `false`."},"twitter":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret":{"type":"TypeString","optional":true,"description":"The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`."},"consumer_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`."}}},"maxItems":1},"unauthenticated_client_action":{"type":"TypeString","optional":true,"description":"The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`.","computed":true}}},"maxItems":1},"auth_settings_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_applications":{"type":"TypeList","optional":true,"description":"The list of allowed Applications for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"allowed_groups":{"type":"TypeList","optional":true,"description":"The list of allowed Group Names for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_identities":{"type":"TypeList","optional":true,"description":"The list of allowed Identities for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret_certificate_thumbprint":{"type":"TypeString","optional":true,"description":"The thumbprint of the certificate used for signing purposes."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client."},"jwt_allowed_client_applications":{"type":"TypeList","optional":true,"description":"A list of Allowed Client Applications in the JWT Claim.","elem":{"type":"TypeString"}},"jwt_allowed_groups":{"type":"TypeList","optional":true,"description":"A list of Allowed Groups in the JWT Claim.","elem":{"type":"TypeString"}},"login_parameters":{"type":"TypeMap","optional":true,"description":"A map of key-value pairs to send to the Authorisation Endpoint when a user logs in.","elem":{"type":"TypeString"}},"tenant_auth_endpoint":{"type":"TypeString","required":true,"description":"The Azure Tenant Endpoint for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`."},"www_authentication_disabled":{"type":"TypeBool","optional":true,"description":"Should the www-authenticate provider should be omitted from the request? Defaults to `false`"}}},"maxItems":1},"apple_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Apple web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Apple Login."},"login_scopes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"auth_enabled":{"type":"TypeBool","optional":true,"description":"Should the AuthV2 Settings be enabled. Defaults to `false`"},"azure_static_web_app_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Static Web App Authentication."}}},"maxItems":1},"config_file_path":{"type":"TypeString","optional":true,"description":"The path to the App Auth settings. **Note:** Relative Paths are evaluated from the Site Root directory."},"custom_oidc_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"authorisation_endpoint":{"type":"TypeString","description":"The endpoint to make the Authorisation Request.","computed":true},"certification_uri":{"type":"TypeString","description":"The endpoint that provides the keys necessary to validate the token.","computed":true},"client_credential_method":{"type":"TypeString","description":"The Client Credential Method used. Currently the only supported value is `ClientSecretPost`.","computed":true},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with this Custom OIDC."},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the secret for this Custom OIDC Client.","computed":true},"issuer_endpoint":{"type":"TypeString","description":"The endpoint that issued the Token.","computed":true},"name":{"type":"TypeString","required":true,"description":"The name of the Custom OIDC Authentication Provider."},"name_claim_type":{"type":"TypeString","optional":true,"description":"The name of the claim that contains the users name."},"openid_configuration_endpoint":{"type":"TypeString","required":true,"description":"The endpoint that contains all the configuration endpoints for this Custom OIDC provider."},"scopes":{"type":"TypeList","optional":true,"description":"The list of the scopes that should be requested while authenticating.","elem":{"type":"TypeString"}},"token_endpoint":{"type":"TypeString","description":"The endpoint used to request a Token.","computed":true}}}},"default_provider":{"type":"TypeString","optional":true,"description":"The Default Authentication Provider to use when the `unauthenticated_action` is set to `RedirectToLoginPage`. Possible values include: `apple`, `azureactivedirectory`, `facebook`, `github`, `google`, `twitter` and the `name` of your `custom_oidc_v2` provider."},"excluded_paths":{"type":"TypeList","optional":true,"description":"The paths which should be excluded from the `unauthenticated_action` when it is set to `RedirectToLoginPage`.","elem":{"type":"TypeString"}},"facebook_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login."},"graph_api_version":{"type":"TypeString","optional":true,"description":"The version of the Facebook API to be used while logging in.","computed":true},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"forward_proxy_convention":{"type":"TypeString","optional":true,"default":"NoProxy","description":"The convention used to determine the url of the request made. Possible values include `ForwardProxyConventionNoProxy`, `ForwardProxyConventionStandard`, `ForwardProxyConventionCustom`. Defaults to `ForwardProxyConventionNoProxy`"},"forward_proxy_custom_host_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the host of the request."},"forward_proxy_custom_scheme_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the scheme of the request."},"github_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Google Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of Login scopes that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"http_route_api_prefix":{"type":"TypeString","optional":true,"default":"/.auth","description":"The prefix that should precede all the authentication and authorisation paths. Defaults to `/.auth`"},"login":{"type":"TypeList","required":true,"elem":{"schema":{"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"External URLs that can be redirected to as part of logging in or logging out of the app. This is an advanced setting typically only needed by Windows Store application backends. **Note:** URLs within the current domain are always implicitly allowed.","elem":{"type":"TypeString"}},"cookie_expiration_convention":{"type":"TypeString","optional":true,"default":"FixedTime","description":"The method by which cookies expire. Possible values include: `FixedTime`, and `IdentityProviderDerived`. Defaults to `FixedTime`."},"cookie_expiration_time":{"type":"TypeString","optional":true,"default":"08:00:00","description":"The time after the request is made when the session cookie should expire. Defaults to `08:00:00`."},"logout_endpoint":{"type":"TypeString","optional":true,"description":"The endpoint to which logout requests should be made."},"nonce_expiration_time":{"type":"TypeString","optional":true,"default":"00:05:00","description":"The time after the request is made when the nonce should expire. Defaults to `00:05:00`."},"preserve_url_fragments_for_logins":{"type":"TypeBool","optional":true,"default":false,"description":"Should the fragments from the request be preserved after the login request is made. Defaults to `false`."},"token_refresh_extension_time":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Token Store configuration Enabled. Defaults to `false`"},"token_store_path":{"type":"TypeString","optional":true,"description":"The directory path in the App Filesystem in which the tokens will be stored."},"token_store_sas_setting_name":{"type":"TypeString","optional":true,"description":"The name of the app setting which contains the SAS URL of the blob storage containing the tokens."},"validate_nonce":{"type":"TypeBool","optional":true,"default":true,"description":"Should the nonce be validated while completing the login flow. Defaults to `true`."}}},"maxItems":1},"microsoft_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Microsoft Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication."},"login_scopes":{"type":"TypeList","optional":true,"description":"The list of Login scopes that will be requested as part of Microsoft Account authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"require_authentication":{"type":"TypeBool","optional":true,"description":"Should the authentication flow be used for all requests."},"require_https":{"type":"TypeBool","optional":true,"default":true,"description":"Should HTTPS be required on connections? Defaults to true."},"runtime_version":{"type":"TypeString","optional":true,"default":"~1","description":"The Runtime Version of the Authentication and Authorisation feature of this App. Defaults to `~1`"},"twitter_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in."}}},"maxItems":1},"unauthenticated_action":{"type":"TypeString","optional":true,"default":"RedirectToLoginPage","description":"The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`."}}},"maxItems":1},"backup":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should this backup job be enabled?"},"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Backup."},"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","required":true,"description":"How often the backup should be executed (e.g. for weekly backup, this should be set to `7` and `frequency_unit` should be set to `Day`)."},"frequency_unit":{"type":"TypeString","required":true,"description":"The unit of time for how often the backup should take place. Possible values include: `Day` and `Hour`."},"keep_at_least_one_backup":{"type":"TypeBool","optional":true,"default":false,"description":"Should the service keep at least one backup, regardless of age of backup. Defaults to `false`."},"last_execution_time":{"type":"TypeString","description":"The time the backup was last attempted.","computed":true},"retention_period_days":{"type":"TypeInt","optional":true,"default":30,"description":"After how many days backups should be deleted."},"start_time":{"type":"TypeString","optional":true,"description":"When the schedule should start working in RFC-3339 format.","computed":true}}},"maxItems":1},"storage_account_url":{"type":"TypeString","required":true,"description":"The SAS URL to the container."}}},"maxItems":1},"builtin_logging_enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should built in logging be enabled. Configures `AzureWebJobsDashboard` app setting based on the configured storage setting"},"client_certificate_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the function app use Client Certificates"},"client_certificate_exclusion_paths":{"type":"TypeString","optional":true,"description":"Paths to exclude when using client certificates, separated by ;"},"client_certificate_mode":{"type":"TypeString","optional":true,"default":"Optional","description":"The mode of the Function App's client certificates requirement for incoming requests. Possible values are `Required`, `Optional`, and `OptionalInteractiveUser` "},"connection_string":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Connection."},"type":{"type":"TypeString","required":true,"description":"Type of database. Possible values include: `MySQL`, `SQLServer`, `SQLAzure`, `Custom`, `NotificationHub`, `ServiceBus`, `EventHub`, `APIHub`, `DocDb`, `RedisCache`, and `PostgreSQL`."},"value":{"type":"TypeString","required":true,"description":"The connection string value."}}}},"content_share_force_disabled":{"type":"TypeBool","optional":true,"default":false,"description":"Force disable the content share settings."},"custom_domain_verification_id":{"type":"TypeString","computed":true},"daily_memory_time_quota":{"type":"TypeInt","optional":true,"default":0,"description":"The amount of memory in gigabyte-seconds that your application is allowed to consume per day. Setting this value only affects function apps in Consumption Plans."},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Is the Linux Function App enabled."},"ftp_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"functions_extension_version":{"type":"TypeString","optional":true,"default":"~4","description":"The runtime version associated with the Function App."},"hosting_environment_id":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","optional":true,"default":false,"description":"Can the Function App only be accessed via HTTPS?"},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_reference_identity_id":{"type":"TypeString","optional":true,"description":"The User Assigned Identity to use for Key Vault access.","computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"description":"Specifies the name of the Function App.","forceNew":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_plan_id":{"type":"TypeString","required":true,"description":"The ID of the App Service Plan within which to create this Function App"},"site_config":{"type":"TypeList","required":true,"elem":{"schema":{"always_on":{"type":"TypeBool","optional":true,"description":"If this Linux Web App is Always On enabled. Defaults to `false`.","computed":true},"api_definition_url":{"type":"TypeString","optional":true,"description":"The URL of the API definition that describes this Linux Function App."},"api_management_api_id":{"type":"TypeString","optional":true,"description":"The ID of the API Management API for this Linux Function App."},"app_command_line":{"type":"TypeString","optional":true,"description":"The program and any arguments used to launch this app via the command line. (Example `node myapp.js`)."},"app_scale_limit":{"type":"TypeInt","optional":true,"description":"The number of workers this function app can scale out to. Only applicable to apps on the Consumption and Premium plan.","computed":true},"app_service_logs":{"type":"TypeList","optional":true,"elem":{"schema":{"disk_quota_mb":{"type":"TypeInt","optional":true,"default":35,"description":"The amount of disk space to use for logs. Valid values are between `25` and `100`."},"retention_period_days":{"type":"TypeInt","optional":true,"description":"The retention period for logs in days. Valid values are between `0` and `99999`. Defaults to `0` (never delete)."}}},"maxItems":1},"application_insights_connection_string":{"type":"TypeString","optional":true,"description":"The Connection String for linking the Linux Function App to Application Insights."},"application_insights_key":{"type":"TypeString","optional":true,"description":"The Instrumentation Key for connecting the Linux Function App to Application Insights."},"application_stack":{"type":"TypeList","optional":true,"elem":{"schema":{"docker":{"type":"TypeList","optional":true,"description":"A docker block","elem":{"schema":{"image_name":{"type":"TypeString","required":true,"description":"The name of the Docker image to use."},"image_tag":{"type":"TypeString","required":true,"description":"The image tag of the image to use."},"registry_password":{"type":"TypeString","optional":true,"description":"The password for the account to use to connect to the registry."},"registry_url":{"type":"TypeString","required":true,"description":"The URL of the docker registry."},"registry_username":{"type":"TypeString","optional":true,"description":"The username to use for connections to the registry."}}}},"dotnet_version":{"type":"TypeString","optional":true,"description":"The version of .Net. Possible values are `3.1`, `6.0` and `7.0`"},"java_version":{"type":"TypeString","optional":true,"description":"The version of Java to use. Possible values are `8`, `11`, and `17`"},"node_version":{"type":"TypeString","optional":true,"description":"The version of Node to use. Possible values include `12`, `14`, `16`, `18` and `20`"},"powershell_core_version":{"type":"TypeString","optional":true,"description":"The version of PowerShell Core to use. Possibles values are `7`, `7.2`, and `7.4`"},"python_version":{"type":"TypeString","optional":true,"description":"The version of Python to use. Possible values include `3.12`, `3.11`, `3.10`, `3.9`, `3.8`, and `3.7`."},"use_custom_runtime":{"type":"TypeBool","optional":true},"use_dotnet_isolated_runtime":{"type":"TypeBool","optional":true,"default":false,"description":"Should the DotNet process use an isolated runtime. Defaults to `false`."}}},"maxItems":1},"container_registry_managed_identity_client_id":{"type":"TypeString","optional":true,"description":"The Client ID of the Managed Service Identity to use for connections to the Azure Container Registry."},"container_registry_use_managed_identity":{"type":"TypeBool","optional":true,"default":false,"description":"Should connections for Azure Container Registry use Managed Identity."},"cors":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","optional":true,"description":"Specifies a list of origins that should be allowed to make cross-origin calls.","elem":{"type":"TypeString"},"minItems":1},"support_credentials":{"type":"TypeBool","optional":true,"default":false,"description":"Are credentials allowed in CORS requests? Defaults to `false`."}}},"maxItems":1},"default_documents":{"type":"TypeList","optional":true,"description":"Specifies a list of Default Documents for the Linux Web App.","computed":true,"elem":{"type":"TypeString"}},"detailed_error_logging_enabled":{"type":"TypeBool","description":"Is detailed error logging enabled","computed":true},"elastic_instance_minimum":{"type":"TypeInt","optional":true,"description":"The number of minimum instances for this Linux Function App. Only affects apps on Elastic Premium plans.","computed":true},"ftps_state":{"type":"TypeString","optional":true,"default":"Disabled","description":"State of FTP / FTPS service for this function app. Possible values include: `AllAllowed`, `FtpsOnly` and `Disabled`. Defaults to `Disabled`."},"health_check_eviction_time_in_min":{"type":"TypeInt","optional":true,"description":"The amount of time in minutes that a node is unhealthy before being removed from the load balancer. Possible values are between `2` and `10`. Only valid in conjunction with `health_check_path`"},"health_check_path":{"type":"TypeString","optional":true,"description":"The path to be checked for this function app health."},"http2_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Specifies if the http2 protocol should be enabled. Defaults to `false`."},"ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"linux_fx_version":{"type":"TypeString","description":"The Linux FX Version","computed":true},"load_balancing_mode":{"type":"TypeString","optional":true,"default":"LeastRequests","description":"The Site load balancing mode. Possible values include: `WeightedRoundRobin`, `LeastRequests`, `LeastResponseTime`, `WeightedTotalTraffic`, `RequestHash`, `PerSiteRoundRobin`. Defaults to `LeastRequests` if omitted."},"managed_pipeline_mode":{"type":"TypeString","optional":true,"default":"Integrated","description":"The Managed Pipeline mode. Possible values include: `Integrated`, `Classic`. Defaults to `Integrated`."},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2","description":"The configures the minimum version of TLS required for SSL requests. Possible values include: `1.0`, `1.1`, and `1.2`. Defaults to `1.2`."},"pre_warmed_instance_count":{"type":"TypeInt","optional":true,"description":"The number of pre-warmed instances for this function app. Only affects apps on an Elastic Premium plan.","computed":true},"remote_debugging_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should Remote Debugging be enabled. Defaults to `false`."},"remote_debugging_version":{"type":"TypeString","optional":true,"description":"The Remote Debugging Version. Possible values include `VS2017`, `VS2019`, and `VS2022``","computed":true},"runtime_scale_monitoring_enabled":{"type":"TypeBool","optional":true,"description":"Should Functions Runtime Scale Monitoring be enabled."},"scm_ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"scm_ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2","description":"Configures the minimum version of TLS required for SSL requests to the SCM site Possible values include: `1.0`, `1.1`, and `1.2`. Defaults to `1.2`."},"scm_type":{"type":"TypeString","description":"The SCM Type in use by the Linux Function App.","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Linux Function App `ip_restriction` configuration be used for the SCM also."},"use_32_bit_worker":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Linux Web App use a 32-bit worker."},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied? Defaults to `false`."},"websockets_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should Web Sockets be enabled. Defaults to `false`."},"worker_count":{"type":"TypeInt","optional":true,"description":"The number of Workers for this Linux Function App.","computed":true}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The Site Credentials Username used for publishing.","computed":true},"password":{"type":"TypeString","description":"The Site Credentials Password used for publishing.","computed":true}}}},"sticky_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"app_setting_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"connection_string_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1}}},"maxItems":1},"storage_account":{"type":"TypeSet","optional":true,"elem":{"schema":{"access_key":{"type":"TypeString","required":true},"account_name":{"type":"TypeString","required":true},"mount_path":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"share_name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"storage_account_access_key":{"type":"TypeString","optional":true,"description":"The access key which will be used to access the storage account for the Function App."},"storage_account_name":{"type":"TypeString","optional":true,"description":"The backend storage account name which will be used by this Function App."},"storage_key_vault_secret_id":{"type":"TypeString","optional":true,"description":"The Key Vault Secret ID, including version, that contains the Connection String to connect to the storage account for this Function App."},"storage_uses_managed_identity":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Function App use its Managed Identity to access storage?"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_network_subnet_id":{"type":"TypeString","optional":true},"vnet_image_pull_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Is container image pull over virtual network enabled? Defaults to `false`."},"webdeploy_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"zip_deploy_file":{"type":"TypeString","optional":true,"description":"The local path and filename of the Zip packaged application to deploy to this Linux Function App. **Note:** Using this value requires either `WEBSITE_RUN_FROM_PACKAGE=1` or `SCM_DO_BUILD_DURING_DEPLOYMENT=true` to be set on the App in `app_settings`.","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_linux_function_app_slot":{"schema":{"app_settings":{"type":"TypeMap","optional":true,"description":"A map of key-value pairs for [App Settings](https://docs.microsoft.com/en-us/azure/azure-functions/functions-app-settings) and custom values.","elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`."}}},"maxItems":1},"additional_login_parameters":{"type":"TypeMap","optional":true,"description":"Specifies a map of Login Parameters to send to the OpenID Connect authorization endpoint when a user logs in.","elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","optional":true,"description":"The default authentication provider to use when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`.","computed":true},"enabled":{"type":"TypeBool","required":true,"description":"Should the Authentication / Authorization feature be enabled?"},"facebook":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret":{"type":"TypeString","optional":true,"description":"The App Secret of the Facebook app used for Facebook Login. Cannot be specified with `app_secret_setting_name`."},"app_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login. Cannot be specified with `app_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"github":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret of the GitHub app used for GitHub Login. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret":{"type":"TypeString","optional":true,"description":"The client secret associated with the Google web application. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for Google Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","elem":{"type":"TypeString"}}}},"maxItems":1},"issuer":{"type":"TypeString","optional":true,"description":"The OpenID Connect Issuer URI that represents the entity which issues access tokens."},"microsoft":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret":{"type":"TypeString","optional":true,"description":"The OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"The list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, `wl.basic` is used as the default scope.","elem":{"type":"TypeString"}}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true,"description":"The RuntimeVersion of the Authentication / Authorization feature in use.","computed":true},"token_refresh_extension_hours":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Windows Web App durably store platform-specific security tokens that are obtained during login flows? Defaults to `false`."},"twitter":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret":{"type":"TypeString","optional":true,"description":"The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`."},"consumer_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`."}}},"maxItems":1},"unauthenticated_client_action":{"type":"TypeString","optional":true,"description":"The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`.","computed":true}}},"maxItems":1},"auth_settings_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_applications":{"type":"TypeList","optional":true,"description":"The list of allowed Applications for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"allowed_groups":{"type":"TypeList","optional":true,"description":"The list of allowed Group Names for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_identities":{"type":"TypeList","optional":true,"description":"The list of allowed Identities for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret_certificate_thumbprint":{"type":"TypeString","optional":true,"description":"The thumbprint of the certificate used for signing purposes."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client."},"jwt_allowed_client_applications":{"type":"TypeList","optional":true,"description":"A list of Allowed Client Applications in the JWT Claim.","elem":{"type":"TypeString"}},"jwt_allowed_groups":{"type":"TypeList","optional":true,"description":"A list of Allowed Groups in the JWT Claim.","elem":{"type":"TypeString"}},"login_parameters":{"type":"TypeMap","optional":true,"description":"A map of key-value pairs to send to the Authorisation Endpoint when a user logs in.","elem":{"type":"TypeString"}},"tenant_auth_endpoint":{"type":"TypeString","required":true,"description":"The Azure Tenant Endpoint for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`."},"www_authentication_disabled":{"type":"TypeBool","optional":true,"description":"Should the www-authenticate provider should be omitted from the request? Defaults to `false`"}}},"maxItems":1},"apple_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Apple web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Apple Login."},"login_scopes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"auth_enabled":{"type":"TypeBool","optional":true,"description":"Should the AuthV2 Settings be enabled. Defaults to `false`"},"azure_static_web_app_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Static Web App Authentication."}}},"maxItems":1},"config_file_path":{"type":"TypeString","optional":true,"description":"The path to the App Auth settings. **Note:** Relative Paths are evaluated from the Site Root directory."},"custom_oidc_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"authorisation_endpoint":{"type":"TypeString","description":"The endpoint to make the Authorisation Request.","computed":true},"certification_uri":{"type":"TypeString","description":"The endpoint that provides the keys necessary to validate the token.","computed":true},"client_credential_method":{"type":"TypeString","description":"The Client Credential Method used. Currently the only supported value is `ClientSecretPost`.","computed":true},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with this Custom OIDC."},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the secret for this Custom OIDC Client.","computed":true},"issuer_endpoint":{"type":"TypeString","description":"The endpoint that issued the Token.","computed":true},"name":{"type":"TypeString","required":true,"description":"The name of the Custom OIDC Authentication Provider."},"name_claim_type":{"type":"TypeString","optional":true,"description":"The name of the claim that contains the users name."},"openid_configuration_endpoint":{"type":"TypeString","required":true,"description":"The endpoint that contains all the configuration endpoints for this Custom OIDC provider."},"scopes":{"type":"TypeList","optional":true,"description":"The list of the scopes that should be requested while authenticating.","elem":{"type":"TypeString"}},"token_endpoint":{"type":"TypeString","description":"The endpoint used to request a Token.","computed":true}}}},"default_provider":{"type":"TypeString","optional":true,"description":"The Default Authentication Provider to use when the `unauthenticated_action` is set to `RedirectToLoginPage`. Possible values include: `apple`, `azureactivedirectory`, `facebook`, `github`, `google`, `twitter` and the `name` of your `custom_oidc_v2` provider."},"excluded_paths":{"type":"TypeList","optional":true,"description":"The paths which should be excluded from the `unauthenticated_action` when it is set to `RedirectToLoginPage`.","elem":{"type":"TypeString"}},"facebook_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login."},"graph_api_version":{"type":"TypeString","optional":true,"description":"The version of the Facebook API to be used while logging in.","computed":true},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"forward_proxy_convention":{"type":"TypeString","optional":true,"default":"NoProxy","description":"The convention used to determine the url of the request made. Possible values include `ForwardProxyConventionNoProxy`, `ForwardProxyConventionStandard`, `ForwardProxyConventionCustom`. Defaults to `ForwardProxyConventionNoProxy`"},"forward_proxy_custom_host_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the host of the request."},"forward_proxy_custom_scheme_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the scheme of the request."},"github_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Google Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of Login scopes that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"http_route_api_prefix":{"type":"TypeString","optional":true,"default":"/.auth","description":"The prefix that should precede all the authentication and authorisation paths. Defaults to `/.auth`"},"login":{"type":"TypeList","required":true,"elem":{"schema":{"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"External URLs that can be redirected to as part of logging in or logging out of the app. This is an advanced setting typically only needed by Windows Store application backends. **Note:** URLs within the current domain are always implicitly allowed.","elem":{"type":"TypeString"}},"cookie_expiration_convention":{"type":"TypeString","optional":true,"default":"FixedTime","description":"The method by which cookies expire. Possible values include: `FixedTime`, and `IdentityProviderDerived`. Defaults to `FixedTime`."},"cookie_expiration_time":{"type":"TypeString","optional":true,"default":"08:00:00","description":"The time after the request is made when the session cookie should expire. Defaults to `08:00:00`."},"logout_endpoint":{"type":"TypeString","optional":true,"description":"The endpoint to which logout requests should be made."},"nonce_expiration_time":{"type":"TypeString","optional":true,"default":"00:05:00","description":"The time after the request is made when the nonce should expire. Defaults to `00:05:00`."},"preserve_url_fragments_for_logins":{"type":"TypeBool","optional":true,"default":false,"description":"Should the fragments from the request be preserved after the login request is made. Defaults to `false`."},"token_refresh_extension_time":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Token Store configuration Enabled. Defaults to `false`"},"token_store_path":{"type":"TypeString","optional":true,"description":"The directory path in the App Filesystem in which the tokens will be stored."},"token_store_sas_setting_name":{"type":"TypeString","optional":true,"description":"The name of the app setting which contains the SAS URL of the blob storage containing the tokens."},"validate_nonce":{"type":"TypeBool","optional":true,"default":true,"description":"Should the nonce be validated while completing the login flow. Defaults to `true`."}}},"maxItems":1},"microsoft_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Microsoft Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication."},"login_scopes":{"type":"TypeList","optional":true,"description":"The list of Login scopes that will be requested as part of Microsoft Account authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"require_authentication":{"type":"TypeBool","optional":true,"description":"Should the authentication flow be used for all requests."},"require_https":{"type":"TypeBool","optional":true,"default":true,"description":"Should HTTPS be required on connections? Defaults to true."},"runtime_version":{"type":"TypeString","optional":true,"default":"~1","description":"The Runtime Version of the Authentication and Authorisation feature of this App. Defaults to `~1`"},"twitter_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in."}}},"maxItems":1},"unauthenticated_action":{"type":"TypeString","optional":true,"default":"RedirectToLoginPage","description":"The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`."}}},"maxItems":1},"backup":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should this backup job be enabled?"},"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Backup."},"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","required":true,"description":"How often the backup should be executed (e.g. for weekly backup, this should be set to `7` and `frequency_unit` should be set to `Day`)."},"frequency_unit":{"type":"TypeString","required":true,"description":"The unit of time for how often the backup should take place. Possible values include: `Day` and `Hour`."},"keep_at_least_one_backup":{"type":"TypeBool","optional":true,"default":false,"description":"Should the service keep at least one backup, regardless of age of backup. Defaults to `false`."},"last_execution_time":{"type":"TypeString","description":"The time the backup was last attempted.","computed":true},"retention_period_days":{"type":"TypeInt","optional":true,"default":30,"description":"After how many days backups should be deleted."},"start_time":{"type":"TypeString","optional":true,"description":"When the schedule should start working in RFC-3339 format.","computed":true}}},"maxItems":1},"storage_account_url":{"type":"TypeString","required":true,"description":"The SAS URL to the container."}}},"maxItems":1},"builtin_logging_enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should built in logging be enabled. Configures `AzureWebJobsDashboard` app setting based on the configured storage setting."},"client_certificate_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Function App Slot use Client Certificates."},"client_certificate_exclusion_paths":{"type":"TypeString","optional":true,"description":"Paths to exclude when using client certificates, separated by ;"},"client_certificate_mode":{"type":"TypeString","optional":true,"default":"Optional","description":"The mode of the Function App Slot's client certificates requirement for incoming requests. Possible values are `Required`, `Optional`, and `OptionalInteractiveUser`."},"connection_string":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Connection."},"type":{"type":"TypeString","required":true,"description":"Type of database. Possible values include: `MySQL`, `SQLServer`, `SQLAzure`, `Custom`, `NotificationHub`, `ServiceBus`, `EventHub`, `APIHub`, `DocDb`, `RedisCache`, and `PostgreSQL`."},"value":{"type":"TypeString","required":true,"description":"The connection string value."}}}},"content_share_force_disabled":{"type":"TypeBool","optional":true,"default":false,"description":"Force disable the content share settings."},"custom_domain_verification_id":{"type":"TypeString","computed":true},"daily_memory_time_quota":{"type":"TypeInt","optional":true,"default":0,"description":"The amount of memory in gigabyte-seconds that your application is allowed to consume per day. Setting this value only affects function apps in Consumption Plans."},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Is the Linux Function App Slot enabled."},"ftp_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"function_app_id":{"type":"TypeString","required":true,"description":"The ID of the Linux Function App this Slot is a member of.","forceNew":true},"functions_extension_version":{"type":"TypeString","optional":true,"default":"~4","description":"The runtime version associated with the Function App Slot."},"hosting_environment_id":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","optional":true,"default":false,"description":"Can the Function App Slot only be accessed via HTTPS?"},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_reference_identity_id":{"type":"TypeString","optional":true,"description":"The User Assigned Identity to use for Key Vault access.","computed":true},"kind":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"description":"Specifies the name of the Function App Slot.","forceNew":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"service_plan_id":{"type":"TypeString","optional":true},"site_config":{"type":"TypeList","required":true,"elem":{"schema":{"always_on":{"type":"TypeBool","optional":true,"description":"If this Linux Web App is Always On enabled. Defaults to `false`.","computed":true},"api_definition_url":{"type":"TypeString","optional":true,"description":"The URL of the API definition that describes this Linux Function App."},"api_management_api_id":{"type":"TypeString","optional":true,"description":"The ID of the API Management API for this Linux Function App."},"app_command_line":{"type":"TypeString","optional":true,"description":"The program and any arguments used to launch this app via the command line. (Example `node myapp.js`)."},"app_scale_limit":{"type":"TypeInt","optional":true,"description":"The number of workers this function app can scale out to. Only applicable to apps on the Consumption and Premium plan.","computed":true},"app_service_logs":{"type":"TypeList","optional":true,"elem":{"schema":{"disk_quota_mb":{"type":"TypeInt","optional":true,"default":35,"description":"The amount of disk space to use for logs. Valid values are between `25` and `100`."},"retention_period_days":{"type":"TypeInt","optional":true,"description":"The retention period for logs in days. Valid values are between `0` and `99999`. Defaults to `0` (never delete)."}}},"maxItems":1},"application_insights_connection_string":{"type":"TypeString","optional":true,"description":"The Connection String for linking the Linux Function App to Application Insights."},"application_insights_key":{"type":"TypeString","optional":true,"description":"The Instrumentation Key for connecting the Linux Function App to Application Insights."},"application_stack":{"type":"TypeList","optional":true,"elem":{"schema":{"docker":{"type":"TypeList","optional":true,"description":"A docker block","elem":{"schema":{"image_name":{"type":"TypeString","required":true,"description":"The name of the Docker image to use."},"image_tag":{"type":"TypeString","required":true,"description":"The image tag of the image to use."},"registry_password":{"type":"TypeString","optional":true,"description":"The password for the account to use to connect to the registry."},"registry_url":{"type":"TypeString","required":true,"description":"The URL of the docker registry."},"registry_username":{"type":"TypeString","optional":true,"description":"The username to use for connections to the registry."}}}},"dotnet_version":{"type":"TypeString","optional":true,"description":"The version of .Net. Possible values are `3.1`, `6.0` and `7.0`"},"java_version":{"type":"TypeString","optional":true,"description":"The version of Java to use. Possible values are `8`, `11`, and `17`"},"node_version":{"type":"TypeString","optional":true,"description":"The version of Node to use. Possible values include `12`, `14`, `16`, `18` and `20`"},"powershell_core_version":{"type":"TypeString","optional":true,"description":"The version of PowerShell Core to use. Possibles values are `7`, `7.2`, and `7.4`"},"python_version":{"type":"TypeString","optional":true,"description":"The version of Python to use. Possible values include `3.12`, `3.11`, `3.10`, `3.9`, `3.8`, and `3.7`."},"use_custom_runtime":{"type":"TypeBool","optional":true},"use_dotnet_isolated_runtime":{"type":"TypeBool","optional":true,"default":false,"description":"Should the DotNet process use an isolated runtime. Defaults to `false`."}}},"maxItems":1},"auto_swap_slot_name":{"type":"TypeString","optional":true},"container_registry_managed_identity_client_id":{"type":"TypeString","optional":true,"description":"The Client ID of the Managed Service Identity to use for connections to the Azure Container Registry."},"container_registry_use_managed_identity":{"type":"TypeBool","optional":true,"default":false,"description":"Should connections for Azure Container Registry use Managed Identity."},"cors":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","optional":true,"description":"Specifies a list of origins that should be allowed to make cross-origin calls.","elem":{"type":"TypeString"},"minItems":1},"support_credentials":{"type":"TypeBool","optional":true,"default":false,"description":"Are credentials allowed in CORS requests? Defaults to `false`."}}},"maxItems":1},"default_documents":{"type":"TypeList","optional":true,"description":"Specifies a list of Default Documents for the Linux Web App.","computed":true,"elem":{"type":"TypeString"}},"detailed_error_logging_enabled":{"type":"TypeBool","description":"Is detailed error logging enabled","computed":true},"elastic_instance_minimum":{"type":"TypeInt","optional":true,"description":"The number of minimum instances for this Linux Function App. Only affects apps on Elastic Premium plans.","computed":true},"ftps_state":{"type":"TypeString","optional":true,"default":"Disabled","description":"State of FTP / FTPS service for this function app. Possible values include: `AllAllowed`, `FtpsOnly` and `Disabled`. Defaults to `Disabled`."},"health_check_eviction_time_in_min":{"type":"TypeInt","optional":true,"default":0,"description":"The amount of time in minutes that a node is unhealthy before being removed from the load balancer. Possible values are between `2` and `10`. Defaults to `10`. Only valid in conjunction with `health_check_path`"},"health_check_path":{"type":"TypeString","optional":true,"description":"The path to be checked for this function app health."},"http2_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Specifies if the http2 protocol should be enabled. Defaults to `false`."},"ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"linux_fx_version":{"type":"TypeString","description":"The Linux FX Version","computed":true},"load_balancing_mode":{"type":"TypeString","optional":true,"default":"LeastRequests","description":"The Site load balancing mode. Possible values include: `WeightedRoundRobin`, `LeastRequests`, `LeastResponseTime`, `WeightedTotalTraffic`, `RequestHash`, `PerSiteRoundRobin`. Defaults to `LeastRequests` if omitted."},"managed_pipeline_mode":{"type":"TypeString","optional":true,"default":"Integrated","description":"The Managed Pipeline mode. Possible values include: `Integrated`, `Classic`. Defaults to `Integrated`."},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2","description":"The configures the minimum version of TLS required for SSL requests. Possible values include: `1.0`, `1.1`, and `1.2`. Defaults to `1.2`."},"pre_warmed_instance_count":{"type":"TypeInt","optional":true,"description":"The number of pre-warmed instances for this function app. Only affects apps on an Elastic Premium plan.","computed":true},"remote_debugging_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should Remote Debugging be enabled. Defaults to `false`."},"remote_debugging_version":{"type":"TypeString","optional":true,"description":"The Remote Debugging Version. Possible values include `VS2017`, `VS2019`, and `VS2022`","computed":true},"runtime_scale_monitoring_enabled":{"type":"TypeBool","optional":true,"description":"Should Functions Runtime Scale Monitoring be enabled."},"scm_ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"scm_ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2","description":"Configures the minimum version of TLS required for SSL requests to the SCM site Possible values include: `1.0`, `1.1`, and `1.2`. Defaults to `1.2`."},"scm_type":{"type":"TypeString","description":"The SCM Type in use by the Linux Function App.","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Linux Function App `ip_restriction` configuration be used for the SCM also."},"use_32_bit_worker":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Linux Web App use a 32-bit worker."},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied? Defaults to `false`."},"websockets_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should Web Sockets be enabled. Defaults to `false`."},"worker_count":{"type":"TypeInt","optional":true,"description":"The number of Workers for this Linux Function App.","computed":true}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The Site Credentials Username used for publishing.","computed":true},"password":{"type":"TypeString","description":"The Site Credentials Password used for publishing.","computed":true}}}},"storage_account":{"type":"TypeSet","optional":true,"elem":{"schema":{"access_key":{"type":"TypeString","required":true},"account_name":{"type":"TypeString","required":true},"mount_path":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"share_name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"storage_account_access_key":{"type":"TypeString","optional":true,"description":"The access key which will be used to access the storage account for the Function App Slot."},"storage_account_name":{"type":"TypeString","optional":true,"description":"The backend storage account name which will be used by this Function App Slot."},"storage_key_vault_secret_id":{"type":"TypeString","optional":true,"description":"The Key Vault Secret ID, including version, that contains the Connection String to connect to the storage account for this Function App."},"storage_uses_managed_identity":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Function App Slot use its Managed Identity to access storage?"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_network_subnet_id":{"type":"TypeString","optional":true},"vnet_image_pull_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Is container image pull over virtual network enabled? Defaults to `false`."},"webdeploy_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_linux_virtual_machine":{"schema":{"additional_capabilities":{"type":"TypeList","optional":true,"elem":{"schema":{"hibernation_enabled":{"type":"TypeBool","optional":true,"default":false},"ultra_ssd_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"admin_password":{"type":"TypeString","optional":true,"forceNew":true},"admin_ssh_key":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"public_key":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}}},"admin_username":{"type":"TypeString","required":true,"forceNew":true},"allow_extension_operations":{"type":"TypeBool","optional":true,"default":true},"availability_set_id":{"type":"TypeString","optional":true,"forceNew":true},"boot_diagnostics":{"type":"TypeList","optional":true,"elem":{"schema":{"storage_account_uri":{"type":"TypeString","optional":true}}},"maxItems":1},"bypass_platform_safety_checks_on_user_schedule_enabled":{"type":"TypeBool","optional":true,"default":false},"capacity_reservation_group_id":{"type":"TypeString","optional":true},"computer_name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"custom_data":{"type":"TypeString","optional":true,"forceNew":true},"dedicated_host_group_id":{"type":"TypeString","optional":true},"dedicated_host_id":{"type":"TypeString","optional":true},"disable_password_authentication":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"disk_controller_type":{"type":"TypeString","optional":true,"computed":true},"edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"encryption_at_host_enabled":{"type":"TypeBool","optional":true},"eviction_policy":{"type":"TypeString","optional":true,"forceNew":true},"extensions_time_budget":{"type":"TypeString","optional":true,"default":"PT1H30M"},"gallery_application":{"type":"TypeList","optional":true,"elem":{"schema":{"automatic_upgrade_enabled":{"type":"TypeBool","optional":true,"default":false},"configuration_blob_uri":{"type":"TypeString","optional":true},"order":{"type":"TypeInt","optional":true,"default":0},"tag":{"type":"TypeString","optional":true},"treat_failure_as_deployment_failure_enabled":{"type":"TypeBool","optional":true,"default":false},"version_id":{"type":"TypeString","required":true}}},"maxItems":100},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"license_type":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"max_bid_price":{"type":"TypeFloat","optional":true,"default":-1},"name":{"type":"TypeString","required":true,"forceNew":true},"network_interface_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"os_disk":{"type":"TypeList","required":true,"elem":{"schema":{"caching":{"type":"TypeString","required":true},"diff_disk_settings":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"option":{"type":"TypeString","required":true,"forceNew":true},"placement":{"type":"TypeString","optional":true,"default":"CacheDisk","forceNew":true}}},"maxItems":1},"disk_encryption_set_id":{"type":"TypeString","optional":true},"disk_size_gb":{"type":"TypeInt","optional":true,"computed":true},"name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"secure_vm_disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"security_encryption_type":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_type":{"type":"TypeString","required":true,"forceNew":true},"write_accelerator_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"os_image_notification":{"type":"TypeList","optional":true,"elem":{"schema":{"timeout":{"type":"TypeString","optional":true,"default":"PT15M"}}},"maxItems":1},"patch_assessment_mode":{"type":"TypeString","optional":true,"default":"ImageDefault"},"patch_mode":{"type":"TypeString","optional":true,"default":"ImageDefault"},"plan":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"product":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"platform_fault_domain":{"type":"TypeInt","optional":true,"default":-1,"forceNew":true},"priority":{"type":"TypeString","optional":true,"default":"Regular","forceNew":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"provision_vm_agent":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"proximity_placement_group_id":{"type":"TypeString","optional":true},"public_ip_address":{"type":"TypeString","computed":true},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"reboot_setting":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secret":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeSet","required":true,"elem":{"schema":{"url":{"type":"TypeString","required":true}}},"minItems":1},"key_vault_id":{"type":"TypeString","required":true}}}},"secure_boot_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"size":{"type":"TypeString","required":true},"source_image_id":{"type":"TypeString","optional":true,"forceNew":true},"source_image_reference":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"offer":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"termination_notification":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","required":true},"timeout":{"type":"TypeString","optional":true,"default":"PT5M"}}},"maxItems":1},"user_data":{"type":"TypeString","optional":true},"virtual_machine_id":{"type":"TypeString","computed":true},"virtual_machine_scale_set_id":{"type":"TypeString","optional":true},"vm_agent_platform_updates_enabled":{"type":"TypeBool","optional":true,"default":false},"vtpm_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"zone":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":45,"read":5,"delete":45,"update":45}},"azurerm_linux_virtual_machine_scale_set":{"schema":{"additional_capabilities":{"type":"TypeList","optional":true,"elem":{"schema":{"ultra_ssd_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}}},"maxItems":1},"admin_password":{"type":"TypeString","optional":true,"forceNew":true},"admin_ssh_key":{"type":"TypeSet","optional":true,"elem":{"schema":{"public_key":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true}}}},"admin_username":{"type":"TypeString","required":true,"forceNew":true},"automatic_instance_repair":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"computed":true},"enabled":{"type":"TypeBool","required":true},"grace_period":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"automatic_os_upgrade_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"disable_automatic_rollback":{"type":"TypeBool","required":true},"enable_automatic_os_upgrade":{"type":"TypeBool","required":true}}},"maxItems":1},"boot_diagnostics":{"type":"TypeList","optional":true,"elem":{"schema":{"storage_account_uri":{"type":"TypeString","optional":true}}},"maxItems":1},"capacity_reservation_group_id":{"type":"TypeString","optional":true,"forceNew":true},"computer_name_prefix":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"custom_data":{"type":"TypeString","optional":true},"data_disk":{"type":"TypeList","optional":true,"elem":{"schema":{"caching":{"type":"TypeString","required":true},"create_option":{"type":"TypeString","optional":true,"default":"Empty"},"disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"disk_size_gb":{"type":"TypeInt","required":true},"lun":{"type":"TypeInt","required":true},"name":{"type":"TypeString","optional":true},"storage_account_type":{"type":"TypeString","required":true},"ultra_ssd_disk_iops_read_write":{"type":"TypeInt","optional":true,"computed":true},"ultra_ssd_disk_mbps_read_write":{"type":"TypeInt","optional":true,"computed":true},"write_accelerator_enabled":{"type":"TypeBool","optional":true,"default":false}}}},"disable_password_authentication":{"type":"TypeBool","optional":true,"default":true},"do_not_run_extensions_on_overprovisioned_machines":{"type":"TypeBool","optional":true,"default":false},"edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"encryption_at_host_enabled":{"type":"TypeBool","optional":true},"eviction_policy":{"type":"TypeString","optional":true,"forceNew":true},"extension":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"auto_upgrade_minor_version":{"type":"TypeBool","optional":true,"default":true},"automatic_upgrade_enabled":{"type":"TypeBool","optional":true,"default":false},"force_update_tag":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"protected_settings":{"type":"TypeString","optional":true},"protected_settings_from_key_vault":{"type":"TypeList","optional":true,"elem":{"schema":{"secret_url":{"type":"TypeString","required":true},"source_vault_id":{"type":"TypeString","required":true}}},"maxItems":1},"provision_after_extensions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"publisher":{"type":"TypeString","required":true},"settings":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"type_handler_version":{"type":"TypeString","required":true}}}},"extension_operations_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"extensions_time_budget":{"type":"TypeString","optional":true,"default":"PT1H30M"},"gallery_application":{"type":"TypeList","optional":true,"elem":{"schema":{"configuration_blob_uri":{"type":"TypeString","optional":true,"forceNew":true},"order":{"type":"TypeInt","optional":true,"default":0,"forceNew":true},"tag":{"type":"TypeString","optional":true,"forceNew":true},"version_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":100},"health_probe_id":{"type":"TypeString","optional":true},"host_group_id":{"type":"TypeString","optional":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"instances":{"type":"TypeInt","optional":true,"default":0},"location":{"type":"TypeString","required":true,"forceNew":true},"max_bid_price":{"type":"TypeFloat","optional":true,"default":-1},"name":{"type":"TypeString","required":true,"forceNew":true},"network_interface":{"type":"TypeList","required":true,"elem":{"schema":{"dns_servers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"enable_accelerated_networking":{"type":"TypeBool","optional":true,"default":false},"enable_ip_forwarding":{"type":"TypeBool","optional":true,"default":false},"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"application_gateway_backend_address_pool_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"application_security_group_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":20},"load_balancer_backend_address_pool_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"load_balancer_inbound_nat_rules_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"primary":{"type":"TypeBool","optional":true,"default":false},"public_ip_address":{"type":"TypeList","optional":true,"elem":{"schema":{"domain_name_label":{"type":"TypeString","optional":true},"idle_timeout_in_minutes":{"type":"TypeInt","optional":true,"computed":true},"ip_tag":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"tag":{"type":"TypeString","required":true,"forceNew":true},"type":{"type":"TypeString","required":true,"forceNew":true}}}},"name":{"type":"TypeString","required":true},"public_ip_prefix_id":{"type":"TypeString","optional":true,"forceNew":true},"version":{"type":"TypeString","optional":true,"default":"IPv4","forceNew":true}}}},"subnet_id":{"type":"TypeString","optional":true},"version":{"type":"TypeString","optional":true,"default":"IPv4"}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"network_security_group_id":{"type":"TypeString","optional":true},"primary":{"type":"TypeBool","optional":true,"default":false}}}},"os_disk":{"type":"TypeList","required":true,"elem":{"schema":{"caching":{"type":"TypeString","required":true},"diff_disk_settings":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"option":{"type":"TypeString","required":true,"forceNew":true},"placement":{"type":"TypeString","optional":true,"default":"CacheDisk","forceNew":true}}},"maxItems":1},"disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"disk_size_gb":{"type":"TypeInt","optional":true,"computed":true},"secure_vm_disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"security_encryption_type":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_type":{"type":"TypeString","required":true,"forceNew":true},"write_accelerator_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"overprovision":{"type":"TypeBool","optional":true,"default":true},"plan":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"product":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"platform_fault_domain_count":{"type":"TypeInt","optional":true,"computed":true,"forceNew":true},"priority":{"type":"TypeString","optional":true,"default":"Regular","forceNew":true},"provision_vm_agent":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"proximity_placement_group_id":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rolling_upgrade_policy":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"cross_zone_upgrades_enabled":{"type":"TypeBool","optional":true},"max_batch_instance_percent":{"type":"TypeInt","required":true},"max_unhealthy_instance_percent":{"type":"TypeInt","required":true},"max_unhealthy_upgraded_instance_percent":{"type":"TypeInt","required":true},"maximum_surge_instances_enabled":{"type":"TypeBool","optional":true},"pause_time_between_batches":{"type":"TypeString","required":true},"prioritize_unhealthy_instances_enabled":{"type":"TypeBool","optional":true}}},"maxItems":1},"scale_in":{"type":"TypeList","optional":true,"elem":{"schema":{"force_deletion_enabled":{"type":"TypeBool","optional":true,"default":false},"rule":{"type":"TypeString","optional":true,"default":"Default"}}},"maxItems":1},"secret":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeSet","required":true,"elem":{"schema":{"url":{"type":"TypeString","required":true}}},"minItems":1},"key_vault_id":{"type":"TypeString","required":true}}}},"secure_boot_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"single_placement_group":{"type":"TypeBool","optional":true,"default":true},"sku":{"type":"TypeString","required":true},"source_image_id":{"type":"TypeString","optional":true},"source_image_reference":{"type":"TypeList","optional":true,"elem":{"schema":{"offer":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true},"version":{"type":"TypeString","required":true}}},"maxItems":1},"spot_restore":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"timeout":{"type":"TypeString","optional":true,"default":"PT1H","forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"termination_notification":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","required":true},"timeout":{"type":"TypeString","optional":true,"default":"PT5M"}}},"maxItems":1},"unique_id":{"type":"TypeString","computed":true},"upgrade_mode":{"type":"TypeString","optional":true,"default":"Manual","forceNew":true},"user_data":{"type":"TypeString","optional":true},"vtpm_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"zone_balance":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_linux_web_app":{"schema":{"app_settings":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`."}}},"maxItems":1},"additional_login_parameters":{"type":"TypeMap","optional":true,"description":"Specifies a map of Login Parameters to send to the OpenID Connect authorization endpoint when a user logs in.","elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","optional":true,"description":"The default authentication provider to use when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`.","computed":true},"enabled":{"type":"TypeBool","required":true,"description":"Should the Authentication / Authorization feature be enabled?"},"facebook":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret":{"type":"TypeString","optional":true,"description":"The App Secret of the Facebook app used for Facebook Login. Cannot be specified with `app_secret_setting_name`."},"app_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login. Cannot be specified with `app_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"github":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret of the GitHub app used for GitHub Login. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret":{"type":"TypeString","optional":true,"description":"The client secret associated with the Google web application. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for Google Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","elem":{"type":"TypeString"}}}},"maxItems":1},"issuer":{"type":"TypeString","optional":true,"description":"The OpenID Connect Issuer URI that represents the entity which issues access tokens."},"microsoft":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret":{"type":"TypeString","optional":true,"description":"The OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"The list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, `wl.basic` is used as the default scope.","elem":{"type":"TypeString"}}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true,"description":"The RuntimeVersion of the Authentication / Authorization feature in use.","computed":true},"token_refresh_extension_hours":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Windows Web App durably store platform-specific security tokens that are obtained during login flows? Defaults to `false`."},"twitter":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret":{"type":"TypeString","optional":true,"description":"The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`."},"consumer_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`."}}},"maxItems":1},"unauthenticated_client_action":{"type":"TypeString","optional":true,"description":"The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`.","computed":true}}},"maxItems":1},"auth_settings_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_applications":{"type":"TypeList","optional":true,"description":"The list of allowed Applications for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"allowed_groups":{"type":"TypeList","optional":true,"description":"The list of allowed Group Names for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_identities":{"type":"TypeList","optional":true,"description":"The list of allowed Identities for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret_certificate_thumbprint":{"type":"TypeString","optional":true,"description":"The thumbprint of the certificate used for signing purposes."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client."},"jwt_allowed_client_applications":{"type":"TypeList","optional":true,"description":"A list of Allowed Client Applications in the JWT Claim.","elem":{"type":"TypeString"}},"jwt_allowed_groups":{"type":"TypeList","optional":true,"description":"A list of Allowed Groups in the JWT Claim.","elem":{"type":"TypeString"}},"login_parameters":{"type":"TypeMap","optional":true,"description":"A map of key-value pairs to send to the Authorisation Endpoint when a user logs in.","elem":{"type":"TypeString"}},"tenant_auth_endpoint":{"type":"TypeString","required":true,"description":"The Azure Tenant Endpoint for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`."},"www_authentication_disabled":{"type":"TypeBool","optional":true,"description":"Should the www-authenticate provider should be omitted from the request? Defaults to `false`"}}},"maxItems":1},"apple_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Apple web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Apple Login."},"login_scopes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"auth_enabled":{"type":"TypeBool","optional":true,"description":"Should the AuthV2 Settings be enabled. Defaults to `false`"},"azure_static_web_app_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Static Web App Authentication."}}},"maxItems":1},"config_file_path":{"type":"TypeString","optional":true,"description":"The path to the App Auth settings. **Note:** Relative Paths are evaluated from the Site Root directory."},"custom_oidc_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"authorisation_endpoint":{"type":"TypeString","description":"The endpoint to make the Authorisation Request.","computed":true},"certification_uri":{"type":"TypeString","description":"The endpoint that provides the keys necessary to validate the token.","computed":true},"client_credential_method":{"type":"TypeString","description":"The Client Credential Method used. Currently the only supported value is `ClientSecretPost`.","computed":true},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with this Custom OIDC."},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the secret for this Custom OIDC Client.","computed":true},"issuer_endpoint":{"type":"TypeString","description":"The endpoint that issued the Token.","computed":true},"name":{"type":"TypeString","required":true,"description":"The name of the Custom OIDC Authentication Provider."},"name_claim_type":{"type":"TypeString","optional":true,"description":"The name of the claim that contains the users name."},"openid_configuration_endpoint":{"type":"TypeString","required":true,"description":"The endpoint that contains all the configuration endpoints for this Custom OIDC provider."},"scopes":{"type":"TypeList","optional":true,"description":"The list of the scopes that should be requested while authenticating.","elem":{"type":"TypeString"}},"token_endpoint":{"type":"TypeString","description":"The endpoint used to request a Token.","computed":true}}}},"default_provider":{"type":"TypeString","optional":true,"description":"The Default Authentication Provider to use when the `unauthenticated_action` is set to `RedirectToLoginPage`. Possible values include: `apple`, `azureactivedirectory`, `facebook`, `github`, `google`, `twitter` and the `name` of your `custom_oidc_v2` provider."},"excluded_paths":{"type":"TypeList","optional":true,"description":"The paths which should be excluded from the `unauthenticated_action` when it is set to `RedirectToLoginPage`.","elem":{"type":"TypeString"}},"facebook_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login."},"graph_api_version":{"type":"TypeString","optional":true,"description":"The version of the Facebook API to be used while logging in.","computed":true},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"forward_proxy_convention":{"type":"TypeString","optional":true,"default":"NoProxy","description":"The convention used to determine the url of the request made. Possible values include `ForwardProxyConventionNoProxy`, `ForwardProxyConventionStandard`, `ForwardProxyConventionCustom`. Defaults to `ForwardProxyConventionNoProxy`"},"forward_proxy_custom_host_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the host of the request."},"forward_proxy_custom_scheme_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the scheme of the request."},"github_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Google Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of Login scopes that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"http_route_api_prefix":{"type":"TypeString","optional":true,"default":"/.auth","description":"The prefix that should precede all the authentication and authorisation paths. Defaults to `/.auth`"},"login":{"type":"TypeList","required":true,"elem":{"schema":{"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"External URLs that can be redirected to as part of logging in or logging out of the app. This is an advanced setting typically only needed by Windows Store application backends. **Note:** URLs within the current domain are always implicitly allowed.","elem":{"type":"TypeString"}},"cookie_expiration_convention":{"type":"TypeString","optional":true,"default":"FixedTime","description":"The method by which cookies expire. Possible values include: `FixedTime`, and `IdentityProviderDerived`. Defaults to `FixedTime`."},"cookie_expiration_time":{"type":"TypeString","optional":true,"default":"08:00:00","description":"The time after the request is made when the session cookie should expire. Defaults to `08:00:00`."},"logout_endpoint":{"type":"TypeString","optional":true,"description":"The endpoint to which logout requests should be made."},"nonce_expiration_time":{"type":"TypeString","optional":true,"default":"00:05:00","description":"The time after the request is made when the nonce should expire. Defaults to `00:05:00`."},"preserve_url_fragments_for_logins":{"type":"TypeBool","optional":true,"default":false,"description":"Should the fragments from the request be preserved after the login request is made. Defaults to `false`."},"token_refresh_extension_time":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Token Store configuration Enabled. Defaults to `false`"},"token_store_path":{"type":"TypeString","optional":true,"description":"The directory path in the App Filesystem in which the tokens will be stored."},"token_store_sas_setting_name":{"type":"TypeString","optional":true,"description":"The name of the app setting which contains the SAS URL of the blob storage containing the tokens."},"validate_nonce":{"type":"TypeBool","optional":true,"default":true,"description":"Should the nonce be validated while completing the login flow. Defaults to `true`."}}},"maxItems":1},"microsoft_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Microsoft Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication."},"login_scopes":{"type":"TypeList","optional":true,"description":"The list of Login scopes that will be requested as part of Microsoft Account authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"require_authentication":{"type":"TypeBool","optional":true,"description":"Should the authentication flow be used for all requests."},"require_https":{"type":"TypeBool","optional":true,"default":true,"description":"Should HTTPS be required on connections? Defaults to true."},"runtime_version":{"type":"TypeString","optional":true,"default":"~1","description":"The Runtime Version of the Authentication and Authorisation feature of this App. Defaults to `~1`"},"twitter_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in."}}},"maxItems":1},"unauthenticated_action":{"type":"TypeString","optional":true,"default":"RedirectToLoginPage","description":"The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`."}}},"maxItems":1},"backup":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should this backup job be enabled?"},"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Backup."},"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","required":true,"description":"How often the backup should be executed (e.g. for weekly backup, this should be set to `7` and `frequency_unit` should be set to `Day`)."},"frequency_unit":{"type":"TypeString","required":true,"description":"The unit of time for how often the backup should take place. Possible values include: `Day` and `Hour`."},"keep_at_least_one_backup":{"type":"TypeBool","optional":true,"default":false,"description":"Should the service keep at least one backup, regardless of age of backup. Defaults to `false`."},"last_execution_time":{"type":"TypeString","description":"The time the backup was last attempted.","computed":true},"retention_period_days":{"type":"TypeInt","optional":true,"default":30,"description":"After how many days backups should be deleted."},"start_time":{"type":"TypeString","optional":true,"description":"When the schedule should start working in RFC-3339 format.","computed":true}}},"maxItems":1},"storage_account_url":{"type":"TypeString","required":true,"description":"The SAS URL to the container."}}},"maxItems":1},"client_affinity_enabled":{"type":"TypeBool","optional":true,"default":false},"client_certificate_enabled":{"type":"TypeBool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"TypeString","optional":true,"description":"Paths to exclude when using client certificates, separated by ;"},"client_certificate_mode":{"type":"TypeString","optional":true,"default":"Required"},"connection_string":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Connection."},"type":{"type":"TypeString","required":true,"description":"Type of database. Possible values include: `MySQL`, `SQLServer`, `SQLAzure`, `Custom`, `NotificationHub`, `ServiceBus`, `EventHub`, `APIHub`, `DocDb`, `RedisCache`, and `PostgreSQL`."},"value":{"type":"TypeString","required":true,"description":"The connection string value."}}}},"custom_domain_verification_id":{"type":"TypeString","computed":true},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"hosting_environment_id":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_reference_identity_id":{"type":"TypeString","optional":true,"computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"logs":{"type":"TypeList","optional":true,"elem":{"schema":{"application_logs":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"level":{"type":"TypeString","required":true},"retention_in_days":{"type":"TypeInt","required":true},"sas_url":{"type":"TypeString","required":true}}},"maxItems":1},"file_system_level":{"type":"TypeString","required":true}}},"maxItems":1},"detailed_error_messages":{"type":"TypeBool","optional":true,"default":false},"failed_request_tracing":{"type":"TypeBool","optional":true,"default":false},"http_logs":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","optional":true,"default":0},"sas_url":{"type":"TypeString","required":true}}},"maxItems":1},"file_system":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","required":true},"retention_in_mb":{"type":"TypeInt","required":true}}},"maxItems":1}}},"maxItems":1}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_plan_id":{"type":"TypeString","required":true},"site_config":{"type":"TypeList","required":true,"elem":{"schema":{"always_on":{"type":"TypeBool","optional":true,"default":true},"api_definition_url":{"type":"TypeString","optional":true},"api_management_api_id":{"type":"TypeString","optional":true},"app_command_line":{"type":"TypeString","optional":true},"application_stack":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"docker_image_name":{"type":"TypeString","optional":true},"docker_registry_password":{"type":"TypeString","optional":true},"docker_registry_url":{"type":"TypeString","optional":true},"docker_registry_username":{"type":"TypeString","optional":true},"dotnet_version":{"type":"TypeString","optional":true},"go_version":{"type":"TypeString","optional":true},"java_server":{"type":"TypeString","optional":true},"java_server_version":{"type":"TypeString","optional":true},"java_version":{"type":"TypeString","optional":true},"node_version":{"type":"TypeString","optional":true},"php_version":{"type":"TypeString","optional":true},"python_version":{"type":"TypeString","optional":true},"ruby_version":{"type":"TypeString","optional":true}}},"maxItems":1},"auto_heal_enabled":{"type":"TypeBool","optional":true},"auto_heal_setting":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeList","optional":true,"elem":{"schema":{"action_type":{"type":"TypeString","required":true},"minimum_process_execution_time":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"trigger":{"type":"TypeList","optional":true,"elem":{"schema":{"requests":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true}}},"maxItems":1},"slow_request":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true},"time_taken":{"type":"TypeString","required":true}}},"maxItems":1},"slow_request_with_path":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true},"time_taken":{"type":"TypeString","required":true}}}},"status_code":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true},"status_code_range":{"type":"TypeString","required":true},"sub_status":{"type":"TypeInt","optional":true},"win32_status_code":{"type":"TypeInt","optional":true}}}}}},"maxItems":1}}},"maxItems":1},"container_registry_managed_identity_client_id":{"type":"TypeString","optional":true},"container_registry_use_managed_identity":{"type":"TypeBool","optional":true,"default":false},"cors":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","optional":true,"description":"Specifies a list of origins that should be allowed to make cross-origin calls.","elem":{"type":"TypeString"},"minItems":1},"support_credentials":{"type":"TypeBool","optional":true,"default":false,"description":"Are credentials allowed in CORS requests? Defaults to `false`."}}},"maxItems":1},"default_documents":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"detailed_error_logging_enabled":{"type":"TypeBool","computed":true},"ftps_state":{"type":"TypeString","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"TypeInt","optional":true,"description":"The amount of time in minutes that a node is unhealthy before being removed from the load balancer. Possible values are between `2` and `10`. Only valid in conjunction with `health_check_path`"},"health_check_path":{"type":"TypeString","optional":true},"http2_enabled":{"type":"TypeBool","optional":true,"default":false},"ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"linux_fx_version":{"type":"TypeString","computed":true},"load_balancing_mode":{"type":"TypeString","optional":true,"default":"LeastRequests"},"local_mysql_enabled":{"type":"TypeBool","optional":true,"default":false},"managed_pipeline_mode":{"type":"TypeString","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"remote_debugging_enabled":{"type":"TypeBool","optional":true,"default":false},"remote_debugging_version":{"type":"TypeString","optional":true,"computed":true},"scm_ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"scm_ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"scm_type":{"type":"TypeString","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false},"use_32_bit_worker":{"type":"TypeBool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied? Defaults to `false`."},"websockets_enabled":{"type":"TypeBool","optional":true,"default":false},"worker_count":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The Site Credentials Username used for publishing.","computed":true},"password":{"type":"TypeString","description":"The Site Credentials Password used for publishing.","computed":true}}}},"sticky_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"app_setting_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"connection_string_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1}}},"maxItems":1},"storage_account":{"type":"TypeSet","optional":true,"elem":{"schema":{"access_key":{"type":"TypeString","required":true},"account_name":{"type":"TypeString","required":true},"mount_path":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"share_name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_network_subnet_id":{"type":"TypeString","optional":true},"webdeploy_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"zip_deploy_file":{"type":"TypeString","optional":true,"description":"The local path and filename of the Zip packaged application to deploy to this Linux Web App. **Note:** Using this value requires either `WEBSITE_RUN_FROM_PACKAGE=1` or `SCM_DO_BUILD_DURING_DEPLOYMENT=true` to be set on the App in `app_settings`.","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_linux_web_app_slot":{"schema":{"app_metadata":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"app_service_id":{"type":"TypeString","required":true},"app_settings":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`."}}},"maxItems":1},"additional_login_parameters":{"type":"TypeMap","optional":true,"description":"Specifies a map of Login Parameters to send to the OpenID Connect authorization endpoint when a user logs in.","elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","optional":true,"description":"The default authentication provider to use when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`.","computed":true},"enabled":{"type":"TypeBool","required":true,"description":"Should the Authentication / Authorization feature be enabled?"},"facebook":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret":{"type":"TypeString","optional":true,"description":"The App Secret of the Facebook app used for Facebook Login. Cannot be specified with `app_secret_setting_name`."},"app_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login. Cannot be specified with `app_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"github":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret of the GitHub app used for GitHub Login. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret":{"type":"TypeString","optional":true,"description":"The client secret associated with the Google web application. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for Google Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","elem":{"type":"TypeString"}}}},"maxItems":1},"issuer":{"type":"TypeString","optional":true,"description":"The OpenID Connect Issuer URI that represents the entity which issues access tokens."},"microsoft":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret":{"type":"TypeString","optional":true,"description":"The OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"The list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, `wl.basic` is used as the default scope.","elem":{"type":"TypeString"}}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true,"description":"The RuntimeVersion of the Authentication / Authorization feature in use.","computed":true},"token_refresh_extension_hours":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Windows Web App durably store platform-specific security tokens that are obtained during login flows? Defaults to `false`."},"twitter":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret":{"type":"TypeString","optional":true,"description":"The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`."},"consumer_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`."}}},"maxItems":1},"unauthenticated_client_action":{"type":"TypeString","optional":true,"description":"The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`.","computed":true}}},"maxItems":1},"auth_settings_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_applications":{"type":"TypeList","optional":true,"description":"The list of allowed Applications for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"allowed_groups":{"type":"TypeList","optional":true,"description":"The list of allowed Group Names for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_identities":{"type":"TypeList","optional":true,"description":"The list of allowed Identities for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret_certificate_thumbprint":{"type":"TypeString","optional":true,"description":"The thumbprint of the certificate used for signing purposes."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client."},"jwt_allowed_client_applications":{"type":"TypeList","optional":true,"description":"A list of Allowed Client Applications in the JWT Claim.","elem":{"type":"TypeString"}},"jwt_allowed_groups":{"type":"TypeList","optional":true,"description":"A list of Allowed Groups in the JWT Claim.","elem":{"type":"TypeString"}},"login_parameters":{"type":"TypeMap","optional":true,"description":"A map of key-value pairs to send to the Authorisation Endpoint when a user logs in.","elem":{"type":"TypeString"}},"tenant_auth_endpoint":{"type":"TypeString","required":true,"description":"The Azure Tenant Endpoint for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`."},"www_authentication_disabled":{"type":"TypeBool","optional":true,"description":"Should the www-authenticate provider should be omitted from the request? Defaults to `false`"}}},"maxItems":1},"apple_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Apple web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Apple Login."},"login_scopes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"auth_enabled":{"type":"TypeBool","optional":true,"description":"Should the AuthV2 Settings be enabled. Defaults to `false`"},"azure_static_web_app_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Static Web App Authentication."}}},"maxItems":1},"config_file_path":{"type":"TypeString","optional":true,"description":"The path to the App Auth settings. **Note:** Relative Paths are evaluated from the Site Root directory."},"custom_oidc_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"authorisation_endpoint":{"type":"TypeString","description":"The endpoint to make the Authorisation Request.","computed":true},"certification_uri":{"type":"TypeString","description":"The endpoint that provides the keys necessary to validate the token.","computed":true},"client_credential_method":{"type":"TypeString","description":"The Client Credential Method used. Currently the only supported value is `ClientSecretPost`.","computed":true},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with this Custom OIDC."},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the secret for this Custom OIDC Client.","computed":true},"issuer_endpoint":{"type":"TypeString","description":"The endpoint that issued the Token.","computed":true},"name":{"type":"TypeString","required":true,"description":"The name of the Custom OIDC Authentication Provider."},"name_claim_type":{"type":"TypeString","optional":true,"description":"The name of the claim that contains the users name."},"openid_configuration_endpoint":{"type":"TypeString","required":true,"description":"The endpoint that contains all the configuration endpoints for this Custom OIDC provider."},"scopes":{"type":"TypeList","optional":true,"description":"The list of the scopes that should be requested while authenticating.","elem":{"type":"TypeString"}},"token_endpoint":{"type":"TypeString","description":"The endpoint used to request a Token.","computed":true}}}},"default_provider":{"type":"TypeString","optional":true,"description":"The Default Authentication Provider to use when the `unauthenticated_action` is set to `RedirectToLoginPage`. Possible values include: `apple`, `azureactivedirectory`, `facebook`, `github`, `google`, `twitter` and the `name` of your `custom_oidc_v2` provider."},"excluded_paths":{"type":"TypeList","optional":true,"description":"The paths which should be excluded from the `unauthenticated_action` when it is set to `RedirectToLoginPage`.","elem":{"type":"TypeString"}},"facebook_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login."},"graph_api_version":{"type":"TypeString","optional":true,"description":"The version of the Facebook API to be used while logging in.","computed":true},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"forward_proxy_convention":{"type":"TypeString","optional":true,"default":"NoProxy","description":"The convention used to determine the url of the request made. Possible values include `ForwardProxyConventionNoProxy`, `ForwardProxyConventionStandard`, `ForwardProxyConventionCustom`. Defaults to `ForwardProxyConventionNoProxy`"},"forward_proxy_custom_host_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the host of the request."},"forward_proxy_custom_scheme_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the scheme of the request."},"github_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Google Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of Login scopes that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"http_route_api_prefix":{"type":"TypeString","optional":true,"default":"/.auth","description":"The prefix that should precede all the authentication and authorisation paths. Defaults to `/.auth`"},"login":{"type":"TypeList","required":true,"elem":{"schema":{"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"External URLs that can be redirected to as part of logging in or logging out of the app. This is an advanced setting typically only needed by Windows Store application backends. **Note:** URLs within the current domain are always implicitly allowed.","elem":{"type":"TypeString"}},"cookie_expiration_convention":{"type":"TypeString","optional":true,"default":"FixedTime","description":"The method by which cookies expire. Possible values include: `FixedTime`, and `IdentityProviderDerived`. Defaults to `FixedTime`."},"cookie_expiration_time":{"type":"TypeString","optional":true,"default":"08:00:00","description":"The time after the request is made when the session cookie should expire. Defaults to `08:00:00`."},"logout_endpoint":{"type":"TypeString","optional":true,"description":"The endpoint to which logout requests should be made."},"nonce_expiration_time":{"type":"TypeString","optional":true,"default":"00:05:00","description":"The time after the request is made when the nonce should expire. Defaults to `00:05:00`."},"preserve_url_fragments_for_logins":{"type":"TypeBool","optional":true,"default":false,"description":"Should the fragments from the request be preserved after the login request is made. Defaults to `false`."},"token_refresh_extension_time":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Token Store configuration Enabled. Defaults to `false`"},"token_store_path":{"type":"TypeString","optional":true,"description":"The directory path in the App Filesystem in which the tokens will be stored."},"token_store_sas_setting_name":{"type":"TypeString","optional":true,"description":"The name of the app setting which contains the SAS URL of the blob storage containing the tokens."},"validate_nonce":{"type":"TypeBool","optional":true,"default":true,"description":"Should the nonce be validated while completing the login flow. Defaults to `true`."}}},"maxItems":1},"microsoft_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Microsoft Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication."},"login_scopes":{"type":"TypeList","optional":true,"description":"The list of Login scopes that will be requested as part of Microsoft Account authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"require_authentication":{"type":"TypeBool","optional":true,"description":"Should the authentication flow be used for all requests."},"require_https":{"type":"TypeBool","optional":true,"default":true,"description":"Should HTTPS be required on connections? Defaults to true."},"runtime_version":{"type":"TypeString","optional":true,"default":"~1","description":"The Runtime Version of the Authentication and Authorisation feature of this App. Defaults to `~1`"},"twitter_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in."}}},"maxItems":1},"unauthenticated_action":{"type":"TypeString","optional":true,"default":"RedirectToLoginPage","description":"The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`."}}},"maxItems":1},"backup":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should this backup job be enabled?"},"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Backup."},"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","required":true,"description":"How often the backup should be executed (e.g. for weekly backup, this should be set to `7` and `frequency_unit` should be set to `Day`)."},"frequency_unit":{"type":"TypeString","required":true,"description":"The unit of time for how often the backup should take place. Possible values include: `Day` and `Hour`."},"keep_at_least_one_backup":{"type":"TypeBool","optional":true,"default":false,"description":"Should the service keep at least one backup, regardless of age of backup. Defaults to `false`."},"last_execution_time":{"type":"TypeString","description":"The time the backup was last attempted.","computed":true},"retention_period_days":{"type":"TypeInt","optional":true,"default":30,"description":"After how many days backups should be deleted."},"start_time":{"type":"TypeString","optional":true,"description":"When the schedule should start working in RFC-3339 format.","computed":true}}},"maxItems":1},"storage_account_url":{"type":"TypeString","required":true,"description":"The SAS URL to the container."}}},"maxItems":1},"client_affinity_enabled":{"type":"TypeBool","optional":true,"default":false},"client_certificate_enabled":{"type":"TypeBool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"TypeString","optional":true,"description":"Paths to exclude when using client certificates, separated by ;"},"client_certificate_mode":{"type":"TypeString","optional":true,"default":"Required"},"connection_string":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Connection."},"type":{"type":"TypeString","required":true,"description":"Type of database. Possible values include: `MySQL`, `SQLServer`, `SQLAzure`, `Custom`, `NotificationHub`, `ServiceBus`, `EventHub`, `APIHub`, `DocDb`, `RedisCache`, and `PostgreSQL`."},"value":{"type":"TypeString","required":true,"description":"The connection string value."}}}},"custom_domain_verification_id":{"type":"TypeString","computed":true},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"hosting_environment_id":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_reference_identity_id":{"type":"TypeString","optional":true,"computed":true},"kind":{"type":"TypeString","computed":true},"logs":{"type":"TypeList","optional":true,"elem":{"schema":{"application_logs":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"level":{"type":"TypeString","required":true},"retention_in_days":{"type":"TypeInt","required":true},"sas_url":{"type":"TypeString","required":true}}},"maxItems":1},"file_system_level":{"type":"TypeString","required":true}}},"maxItems":1},"detailed_error_messages":{"type":"TypeBool","optional":true,"default":false},"failed_request_tracing":{"type":"TypeBool","optional":true,"default":false},"http_logs":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","optional":true,"default":0},"sas_url":{"type":"TypeString","required":true}}},"maxItems":1},"file_system":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","required":true},"retention_in_mb":{"type":"TypeInt","required":true}}},"maxItems":1}}},"maxItems":1}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"service_plan_id":{"type":"TypeString","optional":true},"site_config":{"type":"TypeList","required":true,"elem":{"schema":{"always_on":{"type":"TypeBool","optional":true,"default":true},"api_definition_url":{"type":"TypeString","optional":true},"api_management_api_id":{"type":"TypeString","optional":true},"app_command_line":{"type":"TypeString","optional":true},"application_stack":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"docker_image_name":{"type":"TypeString","optional":true},"docker_registry_password":{"type":"TypeString","optional":true},"docker_registry_url":{"type":"TypeString","optional":true},"docker_registry_username":{"type":"TypeString","optional":true},"dotnet_version":{"type":"TypeString","optional":true},"go_version":{"type":"TypeString","optional":true},"java_server":{"type":"TypeString","optional":true},"java_server_version":{"type":"TypeString","optional":true},"java_version":{"type":"TypeString","optional":true},"node_version":{"type":"TypeString","optional":true},"php_version":{"type":"TypeString","optional":true},"python_version":{"type":"TypeString","optional":true},"ruby_version":{"type":"TypeString","optional":true}}},"maxItems":1},"auto_heal_enabled":{"type":"TypeBool","optional":true},"auto_heal_setting":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeList","optional":true,"elem":{"schema":{"action_type":{"type":"TypeString","required":true},"minimum_process_execution_time":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"trigger":{"type":"TypeList","optional":true,"elem":{"schema":{"requests":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true}}},"maxItems":1},"slow_request":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true},"time_taken":{"type":"TypeString","required":true}}},"maxItems":1},"slow_request_with_path":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true},"time_taken":{"type":"TypeString","required":true}}}},"status_code":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true},"status_code_range":{"type":"TypeString","required":true},"sub_status":{"type":"TypeInt","optional":true},"win32_status_code":{"type":"TypeInt","optional":true}}}}}},"maxItems":1}}},"maxItems":1},"auto_swap_slot_name":{"type":"TypeString","optional":true},"container_registry_managed_identity_client_id":{"type":"TypeString","optional":true},"container_registry_use_managed_identity":{"type":"TypeBool","optional":true,"default":false},"cors":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","optional":true,"description":"Specifies a list of origins that should be allowed to make cross-origin calls.","elem":{"type":"TypeString"},"minItems":1},"support_credentials":{"type":"TypeBool","optional":true,"default":false,"description":"Are credentials allowed in CORS requests? Defaults to `false`."}}},"maxItems":1},"default_documents":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"detailed_error_logging_enabled":{"type":"TypeBool","computed":true},"ftps_state":{"type":"TypeString","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"TypeInt","optional":true,"description":"The amount of time in minutes that a node is unhealthy before being removed from the load balancer. Possible values are between `2` and `10`. Only valid in conjunction with `health_check_path`"},"health_check_path":{"type":"TypeString","optional":true},"http2_enabled":{"type":"TypeBool","optional":true,"default":false},"ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"linux_fx_version":{"type":"TypeString","computed":true},"load_balancing_mode":{"type":"TypeString","optional":true,"default":"LeastRequests"},"local_mysql_enabled":{"type":"TypeBool","optional":true,"default":false},"managed_pipeline_mode":{"type":"TypeString","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"remote_debugging_enabled":{"type":"TypeBool","optional":true,"default":false},"remote_debugging_version":{"type":"TypeString","optional":true,"computed":true},"scm_ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"scm_ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"scm_type":{"type":"TypeString","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false},"use_32_bit_worker":{"type":"TypeBool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied? Defaults to `false`."},"websockets_enabled":{"type":"TypeBool","optional":true,"default":false},"worker_count":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The Site Credentials Username used for publishing.","computed":true},"password":{"type":"TypeString","description":"The Site Credentials Password used for publishing.","computed":true}}}},"storage_account":{"type":"TypeSet","optional":true,"elem":{"schema":{"access_key":{"type":"TypeString","required":true},"account_name":{"type":"TypeString","required":true},"mount_path":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"share_name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_network_subnet_id":{"type":"TypeString","optional":true},"webdeploy_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"zip_deploy_file":{"type":"TypeString","optional":true,"description":"The local path and filename of the Zip packaged application to deploy to this Windows Web App. **Note:** Using this value requires `WEBSITE_RUN_FROM_PACKAGE=1` on the App in `app_settings`.","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_load_test":{"schema":{"data_plane_uri":{"type":"TypeString","computed":true},"description":{"type":"TypeString","optional":true,"forceNew":true},"encryption":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"identity":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"identity_id":{"type":"TypeString","required":true,"forceNew":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"key_url":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_local_network_gateway":{"schema":{"address_space":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"bgp_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"asn":{"type":"TypeInt","required":true},"bgp_peering_address":{"type":"TypeString","required":true},"peer_weight":{"type":"TypeInt","optional":true}}},"maxItems":1},"gateway_address":{"type":"TypeString","optional":true},"gateway_fqdn":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_log_analytics_cluster":{"schema":{"cluster_id":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"size_gb":{"type":"TypeInt","optional":true,"default":1000},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":360,"read":5,"delete":30,"update":360}},"azurerm_log_analytics_cluster_customer_managed_key":{"schema":{"key_vault_key_id":{"type":"TypeString","required":true},"log_analytics_cluster_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":360,"read":5,"delete":30,"update":360}},"azurerm_log_analytics_data_export_rule":{"schema":{"destination_resource_id":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":false},"export_rule_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"table_names":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"workspace_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_log_analytics_datasource_windows_event":{"schema":{"event_log_name":{"type":"TypeString","required":true},"event_types":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"workspace_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_log_analytics_datasource_windows_performance_counter":{"schema":{"counter_name":{"type":"TypeString","required":true},"instance_name":{"type":"TypeString","required":true},"interval_seconds":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"object_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"workspace_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_log_analytics_linked_service":{"schema":{"name":{"type":"TypeString","computed":true},"read_access_id":{"type":"TypeString","optional":true,"computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"workspace_id":{"type":"TypeString","required":true},"write_access_id":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_log_analytics_linked_storage_account":{"schema":{"data_source_type":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"storage_account_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"workspace_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_log_analytics_query_pack":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_log_analytics_query_pack_query":{"schema":{"additional_settings_json":{"type":"TypeString","optional":true},"body":{"type":"TypeString","required":true},"categories":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"query_pack_id":{"type":"TypeString","required":true,"forceNew":true},"resource_types":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"solutions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_log_analytics_saved_search":{"schema":{"category":{"type":"TypeString","required":true,"forceNew":true},"display_name":{"type":"TypeString","required":true,"forceNew":true},"function_alias":{"type":"TypeString","optional":true,"forceNew":true},"function_parameters":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"query":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_log_analytics_solution":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"plan":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"product":{"type":"TypeString","required":true,"forceNew":true},"promotion_code":{"type":"TypeString","optional":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"solution_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"workspace_name":{"type":"TypeString","required":true,"forceNew":true},"workspace_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_log_analytics_storage_insights":{"schema":{"blob_container_names":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"storage_account_id":{"type":"TypeString","required":true},"storage_account_key":{"type":"TypeString","required":true},"table_names":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_log_analytics_workspace":{"schema":{"allow_resource_only_permissions":{"type":"TypeBool","optional":true,"default":true},"cmk_for_query_forced":{"type":"TypeBool","optional":true},"daily_quota_gb":{"type":"TypeFloat","optional":true,"default":-1},"data_collection_rule_id":{"type":"TypeString","optional":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"immediate_data_purge_on_30_days_enabled":{"type":"TypeBool","optional":true},"internet_ingestion_enabled":{"type":"TypeBool","optional":true,"default":true},"internet_query_enabled":{"type":"TypeBool","optional":true,"default":true},"local_authentication_disabled":{"type":"TypeBool","optional":true,"default":false},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_shared_key":{"type":"TypeString","computed":true},"reservation_capacity_in_gb_per_day":{"type":"TypeInt","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_in_days":{"type":"TypeInt","optional":true,"computed":true},"secondary_shared_key":{"type":"TypeString","computed":true},"sku":{"type":"TypeString","optional":true,"computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_log_analytics_workspace_table":{"schema":{"name":{"type":"TypeString","required":true},"plan":{"type":"TypeString","optional":true,"default":"Analytics"},"retention_in_days":{"type":"TypeInt","optional":true},"total_retention_in_days":{"type":"TypeInt","optional":true},"workspace_id":{"type":"TypeString","required":true}},"timeouts":{"create":5,"read":5,"delete":30,"update":5}},"azurerm_logic_app_action_custom":{"schema":{"body":{"type":"TypeString","required":true},"logic_app_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_action_http":{"schema":{"body":{"type":"TypeString","optional":true},"headers":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"logic_app_id":{"type":"TypeString","required":true,"forceNew":true},"method":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"queries":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"run_after":{"type":"TypeSet","optional":true,"elem":{"schema":{"action_name":{"type":"TypeString","required":true},"action_result":{"type":"TypeString","required":true}}},"minItems":1},"uri":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_integration_account":{"schema":{"integration_service_environment_id":{"type":"TypeString","optional":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_integration_account_agreement":{"schema":{"agreement_type":{"type":"TypeString","required":true},"content":{"type":"TypeString","required":true},"guest_identity":{"type":"TypeList","required":true,"elem":{"schema":{"qualifier":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}},"maxItems":1},"guest_partner_name":{"type":"TypeString","required":true},"host_identity":{"type":"TypeList","required":true,"elem":{"schema":{"qualifier":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}},"maxItems":1},"host_partner_name":{"type":"TypeString","required":true},"integration_account_name":{"type":"TypeString","required":true,"forceNew":true},"metadata":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_integration_account_assembly":{"schema":{"assembly_name":{"type":"TypeString","required":true},"assembly_version":{"type":"TypeString","optional":true,"default":"0.0.0.0"},"content":{"type":"TypeString","optional":true},"content_link_uri":{"type":"TypeString","optional":true},"integration_account_name":{"type":"TypeString","required":true,"forceNew":true},"metadata":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_integration_account_batch_configuration":{"schema":{"batch_group_name":{"type":"TypeString","required":true,"forceNew":true},"integration_account_name":{"type":"TypeString","required":true,"forceNew":true},"metadata":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"release_criteria":{"type":"TypeList","required":true,"elem":{"schema":{"batch_size":{"type":"TypeInt","optional":true},"message_count":{"type":"TypeInt","optional":true},"recurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"end_time":{"type":"TypeString","optional":true},"frequency":{"type":"TypeString","required":true},"interval":{"type":"TypeInt","required":true},"schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"hours":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"minutes":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"month_days":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"monthly":{"type":"TypeSet","optional":true,"elem":{"schema":{"week":{"type":"TypeInt","required":true},"weekday":{"type":"TypeString","required":true}}}},"week_days":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"start_time":{"type":"TypeString","optional":true},"time_zone":{"type":"TypeString","optional":true}}},"maxItems":1}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_integration_account_certificate":{"schema":{"integration_account_name":{"type":"TypeString","required":true,"forceNew":true},"key_vault_key":{"type":"TypeList","optional":true,"elem":{"schema":{"key_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","required":true},"key_version":{"type":"TypeString","optional":true}}},"maxItems":1},"metadata":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_certificate":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_integration_account_map":{"schema":{"content":{"type":"TypeString","required":true},"integration_account_name":{"type":"TypeString","required":true,"forceNew":true},"map_type":{"type":"TypeString","required":true},"metadata":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_integration_account_partner":{"schema":{"business_identity":{"type":"TypeSet","required":true,"elem":{"schema":{"qualifier":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"integration_account_name":{"type":"TypeString","required":true,"forceNew":true},"metadata":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_integration_account_schema":{"schema":{"content":{"type":"TypeString","required":true},"file_name":{"type":"TypeString","optional":true},"integration_account_name":{"type":"TypeString","required":true,"forceNew":true},"metadata":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_integration_account_session":{"schema":{"content":{"type":"TypeString","required":true},"integration_account_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_standard":{"schema":{"app_service_plan_id":{"type":"TypeString","required":true},"app_settings":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"bundle_version":{"type":"TypeString","optional":true,"default":"[1.*, 2.0.0)"},"client_affinity_enabled":{"type":"TypeBool","optional":true,"computed":true},"client_certificate_mode":{"type":"TypeString","optional":true},"connection_string":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"custom_domain_verification_id":{"type":"TypeString","computed":true},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"https_only":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"site_config":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"always_on":{"type":"TypeBool","optional":true,"default":false},"app_scale_limit":{"type":"TypeInt","optional":true,"computed":true},"auto_swap_slot_name":{"type":"TypeString","computed":true},"cors":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"support_credentials":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"dotnet_framework_version":{"type":"TypeString","optional":true,"default":"v4.0"},"elastic_instance_minimum":{"type":"TypeInt","optional":true,"computed":true},"ftps_state":{"type":"TypeString","optional":true,"computed":true},"health_check_path":{"type":"TypeString","optional":true},"http2_enabled":{"type":"TypeBool","optional":true,"default":false},"ip_restriction":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000},"service_tag":{"type":"TypeString","optional":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true}}}},"linux_fx_version":{"type":"TypeString","optional":true,"computed":true},"min_tls_version":{"type":"TypeString","optional":true,"computed":true},"pre_warmed_instance_count":{"type":"TypeInt","optional":true,"computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"runtime_scale_monitoring_enabled":{"type":"TypeBool","optional":true,"default":false},"scm_ip_restriction":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000},"service_tag":{"type":"TypeString","optional":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true}}}},"scm_min_tls_version":{"type":"TypeString","optional":true,"computed":true},"scm_type":{"type":"TypeString","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"TypeBool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"computed":true},"websockets_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"storage_account_access_key":{"type":"TypeString","required":true},"storage_account_name":{"type":"TypeString","required":true,"forceNew":true},"storage_account_share_name":{"type":"TypeString","optional":true,"computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"use_extension_bundle":{"type":"TypeBool","optional":true,"default":true},"version":{"type":"TypeString","optional":true,"default":"~4"},"virtual_network_subnet_id":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_trigger_custom":{"schema":{"body":{"type":"TypeString","required":true},"callback_url":{"type":"TypeString","computed":true},"logic_app_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_trigger_http_request":{"schema":{"callback_url":{"type":"TypeString","computed":true},"logic_app_id":{"type":"TypeString","required":true,"forceNew":true},"method":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"relative_path":{"type":"TypeString","optional":true},"schema":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_trigger_recurrence":{"schema":{"frequency":{"type":"TypeString","required":true},"interval":{"type":"TypeInt","required":true},"logic_app_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"at_these_hours":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"at_these_minutes":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"on_these_days":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"start_time":{"type":"TypeString","optional":true},"time_zone":{"type":"TypeString","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_workflow":{"schema":{"access_control":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_caller_ip_address_range":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"content":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_caller_ip_address_range":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"trigger":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_caller_ip_address_range":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"open_authentication_policy":{"type":"TypeSet","optional":true,"elem":{"schema":{"claim":{"type":"TypeSet","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"name":{"type":"TypeString","required":true}}}}}},"maxItems":1},"workflow_management":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_caller_ip_address_range":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}},"maxItems":1},"access_endpoint":{"type":"TypeString","computed":true},"connector_endpoint_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"connector_outbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true,"default":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"integration_service_environment_id":{"type":"TypeString","optional":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"logic_app_integration_account_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"workflow_endpoint_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"workflow_outbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"workflow_parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"workflow_schema":{"type":"TypeString","optional":true,"default":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","forceNew":true},"workflow_version":{"type":"TypeString","optional":true,"default":"1.0.0.0","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_machine_learning_compute_cluster":{"schema":{"description":{"type":"TypeString","optional":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"local_auth_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"machine_learning_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"node_public_ip_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"scale_settings":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"max_node_count":{"type":"TypeInt","required":true,"forceNew":true},"min_node_count":{"type":"TypeInt","required":true,"forceNew":true},"scale_down_nodes_after_idle_duration":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"ssh":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"admin_password":{"type":"TypeString","optional":true,"forceNew":true},"admin_username":{"type":"TypeString","required":true,"forceNew":true},"key_value":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"ssh_public_access_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"subnet_resource_id":{"type":"TypeString","optional":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"vm_priority":{"type":"TypeString","required":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_machine_learning_compute_instance":{"schema":{"assign_to_user":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"object_id":{"type":"TypeString","optional":true},"tenant_id":{"type":"TypeString","optional":true}}},"maxItems":1},"authorization_type":{"type":"TypeString","optional":true,"forceNew":true},"description":{"type":"TypeString","optional":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"local_auth_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"machine_learning_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"node_public_ip_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"ssh":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"port":{"type":"TypeInt","computed":true},"public_key":{"type":"TypeString","required":true},"username":{"type":"TypeString","computed":true}}},"maxItems":1},"subnet_resource_id":{"type":"TypeString","optional":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"virtual_machine_size":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_machine_learning_datastore_blobstorage":{"schema":{"account_key":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true,"forceNew":true},"is_default":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"service_data_auth_identity":{"type":"TypeString","optional":true,"default":"None"},"shared_access_signature":{"type":"TypeString","optional":true},"storage_container_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_machine_learning_datastore_datalake_gen2":{"schema":{"authority_url":{"type":"TypeString","optional":true},"client_id":{"type":"TypeString","optional":true},"client_secret":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true,"forceNew":true},"is_default":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"service_data_identity":{"type":"TypeString","optional":true,"default":"None"},"storage_container_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","optional":true},"workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_machine_learning_datastore_fileshare":{"schema":{"account_key":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true,"forceNew":true},"is_default":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"service_data_identity":{"type":"TypeString","optional":true,"default":"None"},"shared_access_signature":{"type":"TypeString","optional":true},"storage_fileshare_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_machine_learning_inference_cluster":{"schema":{"cluster_purpose":{"type":"TypeString","optional":true,"default":"FastProd","forceNew":true},"description":{"type":"TypeString","optional":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"kubernetes_cluster_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"machine_learning_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"ssl":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"cert":{"type":"TypeString","optional":true,"default":"","forceNew":true},"cname":{"type":"TypeString","optional":true,"default":"","forceNew":true},"key":{"type":"TypeString","optional":true,"default":"","forceNew":true},"leaf_domain_label":{"type":"TypeString","optional":true,"default":"","forceNew":true},"overwrite_existing_domain":{"type":"TypeBool","optional":true,"default":"","forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_machine_learning_synapse_spark":{"schema":{"description":{"type":"TypeString","optional":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"local_auth_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"machine_learning_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"synapse_spark_pool_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_machine_learning_workspace":{"schema":{"application_insights_id":{"type":"TypeString","required":true,"forceNew":true},"container_registry_id":{"type":"TypeString","optional":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"discovery_url":{"type":"TypeString","computed":true},"encryption":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"key_id":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","required":true},"user_assigned_identity_id":{"type":"TypeString","optional":true}}},"maxItems":1},"feature_store":{"type":"TypeList","optional":true,"elem":{"schema":{"computer_spark_runtime_version":{"type":"TypeString","optional":true},"offline_connection_name":{"type":"TypeString","optional":true},"online_connection_name":{"type":"TypeString","optional":true}}},"maxItems":1},"friendly_name":{"type":"TypeString","optional":true},"high_business_impact":{"type":"TypeBool","optional":true,"forceNew":true},"identity":{"type":"TypeList","required":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"image_build_compute_name":{"type":"TypeString","optional":true},"key_vault_id":{"type":"TypeString","required":true,"forceNew":true},"kind":{"type":"TypeString","optional":true,"default":"Default"},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_network":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"isolation_mode":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_user_assigned_identity":{"type":"TypeString","optional":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"serverless_compute":{"type":"TypeList","optional":true,"elem":{"schema":{"public_ip_enabled":{"type":"TypeBool","optional":true,"default":false},"subnet_id":{"type":"TypeString","optional":true}}},"maxItems":1},"sku_name":{"type":"TypeString","optional":true,"default":"Basic"},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"v1_legacy_mode_enabled":{"type":"TypeBool","optional":true,"default":false},"workspace_id":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_maintenance_assignment_dedicated_host":{"schema":{"dedicated_host_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"maintenance_configuration_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_maintenance_assignment_dynamic_scope":{"schema":{"filter":{"type":"TypeList","required":true,"elem":{"schema":{"locations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"os_types":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"resource_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"resource_types":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"tag_filter":{"type":"TypeString","optional":true,"default":"Any"},"tags":{"type":"TypeList","optional":true,"elem":{"schema":{"tag":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}}}},"maxItems":1},"maintenance_configuration_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":10,"update":30}},"azurerm_maintenance_assignment_virtual_machine":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"maintenance_configuration_id":{"type":"TypeString","required":true,"forceNew":true},"virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_maintenance_assignment_virtual_machine_scale_set":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"maintenance_configuration_id":{"type":"TypeString","required":true,"forceNew":true},"virtual_machine_scale_set_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_maintenance_configuration":{"schema":{"in_guest_user_patch_mode":{"type":"TypeString","optional":true},"install_patches":{"type":"TypeList","optional":true,"elem":{"schema":{"linux":{"type":"TypeList","optional":true,"elem":{"schema":{"classifications_to_include":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"package_names_mask_to_exclude":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"package_names_mask_to_include":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"minItems":1},"reboot":{"type":"TypeString","optional":true},"windows":{"type":"TypeList","optional":true,"elem":{"schema":{"classifications_to_include":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"kb_numbers_to_exclude":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"kb_numbers_to_include":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"minItems":1}}},"maxItems":1,"minItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scope":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"visibility":{"type":"TypeString","optional":true,"default":"Custom"},"window":{"type":"TypeList","optional":true,"elem":{"schema":{"duration":{"type":"TypeString","optional":true},"expiration_date_time":{"type":"TypeString","optional":true},"recur_every":{"type":"TypeString","optional":true},"start_date_time":{"type":"TypeString","required":true},"time_zone":{"type":"TypeString","required":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_managed_application":{"schema":{"application_definition_id":{"type":"TypeString","optional":true},"kind":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"outputs":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"parameter_values":{"type":"TypeString","optional":true,"computed":true},"plan":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"product":{"type":"TypeString","required":true,"forceNew":true},"promotion_code":{"type":"TypeString","optional":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_managed_application_definition":{"schema":{"authorization":{"type":"TypeSet","optional":true,"elem":{"schema":{"role_definition_id":{"type":"TypeString","required":true},"service_principal_id":{"type":"TypeString","required":true}}},"minItems":1},"create_ui_definition":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"lock_level":{"type":"TypeString","required":true,"forceNew":true},"main_template":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"package_enabled":{"type":"TypeBool","optional":true,"default":true},"package_file_uri":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_managed_disk":{"schema":{"create_option":{"type":"TypeString","required":true,"forceNew":true},"disk_access_id":{"type":"TypeString","optional":true},"disk_encryption_set_id":{"type":"TypeString","optional":true},"disk_iops_read_only":{"type":"TypeInt","optional":true,"computed":true},"disk_iops_read_write":{"type":"TypeInt","optional":true,"computed":true},"disk_mbps_read_only":{"type":"TypeInt","optional":true,"computed":true},"disk_mbps_read_write":{"type":"TypeInt","optional":true,"computed":true},"disk_size_gb":{"type":"TypeInt","optional":true,"computed":true},"edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"encryption_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"disk_encryption_key":{"type":"TypeList","required":true,"elem":{"schema":{"secret_url":{"type":"TypeString","required":true},"source_vault_id":{"type":"TypeString","required":true}}},"maxItems":1},"key_encryption_key":{"type":"TypeList","optional":true,"elem":{"schema":{"key_url":{"type":"TypeString","required":true},"source_vault_id":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"gallery_image_reference_id":{"type":"TypeString","optional":true,"forceNew":true},"hyper_v_generation":{"type":"TypeString","optional":true,"forceNew":true},"image_reference_id":{"type":"TypeString","optional":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"logical_sector_size":{"type":"TypeInt","optional":true,"computed":true,"forceNew":true},"max_shares":{"type":"TypeInt","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_access_policy":{"type":"TypeString","optional":true},"on_demand_bursting_enabled":{"type":"TypeBool","optional":true},"optimized_frequent_attach_enabled":{"type":"TypeBool","optional":true,"default":false},"os_type":{"type":"TypeString","optional":true},"performance_plus_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secure_vm_disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"security_type":{"type":"TypeString","optional":true,"forceNew":true},"source_resource_id":{"type":"TypeString","optional":true,"forceNew":true},"source_uri":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"storage_account_id":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_type":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tier":{"type":"TypeString","optional":true,"computed":true},"trusted_launch_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"upload_size_bytes":{"type":"TypeInt","optional":true,"forceNew":true},"zone":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_managed_disk_sas_token":{"schema":{"access_level":{"type":"TypeString","required":true,"forceNew":true},"duration_in_seconds":{"type":"TypeInt","required":true,"forceNew":true},"managed_disk_id":{"type":"TypeString","required":true,"forceNew":true},"sas_url":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_managed_lustre_file_system":{"schema":{"encryption_key":{"type":"TypeList","optional":true,"elem":{"schema":{"key_url":{"type":"TypeString","required":true},"source_vault_id":{"type":"TypeString","required":true}}},"maxItems":1},"hsm_setting":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"container_id":{"type":"TypeString","required":true,"forceNew":true},"import_prefix":{"type":"TypeString","optional":true,"forceNew":true},"logging_container_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"maintenance_window":{"type":"TypeList","required":true,"elem":{"schema":{"day_of_week":{"type":"TypeString","required":true},"time_of_day_in_utc":{"type":"TypeString","required":true}}},"maxItems":1},"mgs_address":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"storage_capacity_in_tb":{"type":"TypeInt","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_management_group":{"schema":{"display_name":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"parent_management_group_id":{"type":"TypeString","optional":true,"computed":true},"subscription_ids":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"tenant_scoped_id":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_management_group_policy_assignment":{"schema":{"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true},"enforce":{"type":"TypeBool","optional":true,"default":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","optional":true,"forceNew":true},"management_group_id":{"type":"TypeString","required":true,"forceNew":true},"metadata":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"non_compliance_message":{"type":"TypeList","optional":true,"elem":{"schema":{"content":{"type":"TypeString","required":true},"policy_definition_reference_id":{"type":"TypeString","optional":true}}}},"not_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"overrides":{"type":"TypeList","optional":true,"elem":{"schema":{"selectors":{"type":"TypeList","optional":true,"elem":{"schema":{"in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"kind":{"type":"TypeString","computed":true},"not_in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"value":{"type":"TypeString","required":true}}}},"parameters":{"type":"TypeString","optional":true},"policy_definition_id":{"type":"TypeString","required":true,"forceNew":true},"resource_selectors":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","optional":true},"selectors":{"type":"TypeList","required":true,"elem":{"schema":{"in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"kind":{"type":"TypeString","required":true},"not_in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_management_group_policy_exemption":{"schema":{"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true},"exemption_category":{"type":"TypeString","required":true},"expires_on":{"type":"TypeString","optional":true},"management_group_id":{"type":"TypeString","required":true,"forceNew":true},"metadata":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"policy_assignment_id":{"type":"TypeString","required":true},"policy_definition_reference_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_management_group_policy_remediation":{"schema":{"failure_percentage":{"type":"TypeFloat","optional":true},"location_filters":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"management_group_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parallel_deployments":{"type":"TypeInt","optional":true},"policy_assignment_id":{"type":"TypeString","required":true},"policy_definition_reference_id":{"type":"TypeString","optional":true},"resource_count":{"type":"TypeInt","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_management_group_subscription_association":{"schema":{"management_group_id":{"type":"TypeString","required":true,"forceNew":true},"subscription_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":5,"read":5,"delete":5}},"azurerm_management_group_template_deployment":{"schema":{"debug_level":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"management_group_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"output_content":{"type":"TypeString","computed":true},"parameters_content":{"type":"TypeString","optional":true,"computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"template_content":{"type":"TypeString","optional":true,"computed":true},"template_spec_version_id":{"type":"TypeString","optional":true}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_management_lock":{"schema":{"lock_level":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"notes":{"type":"TypeString","optional":true,"forceNew":true},"scope":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_maps_account":{"schema":{"cors":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_origins":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}},"maxItems":1},"data_store":{"type":"TypeList","optional":true,"elem":{"schema":{"storage_account_id":{"type":"TypeString","optional":true},"unique_name":{"type":"TypeString","required":true}}}},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"local_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_access_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_access_key":{"type":"TypeString","computed":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"x_ms_client_id":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_maps_creator":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"maps_account_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"storage_units":{"type":"TypeInt","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mariadb_configuration":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_mariadb_database":{"schema":{"charset":{"type":"TypeString","required":true,"forceNew":true},"collation":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60}},"azurerm_mariadb_firewall_rule":{"schema":{"end_ip_address":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_name":{"type":"TypeString","required":true,"forceNew":true},"start_ip_address":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mariadb_server":{"schema":{"administrator_login":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"administrator_login_password":{"type":"TypeString","optional":true},"auto_grow_enabled":{"type":"TypeBool","optional":true,"default":true},"backup_retention_days":{"type":"TypeInt","optional":true,"computed":true},"create_mode":{"type":"TypeString","optional":true,"default":"Default"},"creation_source_server_id":{"type":"TypeString","optional":true},"fqdn":{"type":"TypeString","computed":true},"geo_redundant_backup_enabled":{"type":"TypeBool","optional":true,"computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"restore_point_in_time":{"type":"TypeString","optional":true},"sku_name":{"type":"TypeString","required":true},"ssl_enforcement_enabled":{"type":"TypeBool","required":true},"ssl_minimal_tls_version_enforced":{"type":"TypeString","optional":true,"default":"TLS1_2"},"storage_mb":{"type":"TypeInt","optional":true,"computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"version":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":90,"read":5,"delete":60,"update":60}},"azurerm_mariadb_virtual_network_rule":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_name":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_marketplace_agreement":{"schema":{"license_text_link":{"type":"TypeString","computed":true},"offer":{"type":"TypeString","required":true,"forceNew":true},"plan":{"type":"TypeString","required":true,"forceNew":true},"privacy_policy_link":{"type":"TypeString","computed":true},"publisher":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_marketplace_role_assignment":{"schema":{"condition":{"type":"TypeString","optional":true,"forceNew":true},"condition_version":{"type":"TypeString","optional":true,"forceNew":true},"delegated_managed_identity_resource_id":{"type":"TypeString","optional":true,"forceNew":true},"description":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","optional":true,"forceNew":true},"principal_id":{"type":"TypeString","required":true,"forceNew":true},"principal_type":{"type":"TypeString","computed":true},"role_definition_id":{"type":"TypeString","optional":true,"forceNew":true},"role_definition_name":{"type":"TypeString","optional":true,"forceNew":true},"skip_service_principal_aad_check":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_media_services_account_filter":{"schema":{"first_quality_bitrate":{"type":"TypeInt","optional":true},"media_services_account_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"presentation_time_range":{"type":"TypeList","optional":true,"elem":{"schema":{"end_in_units":{"type":"TypeInt","optional":true},"force_end":{"type":"TypeBool","optional":true},"live_backoff_in_units":{"type":"TypeInt","optional":true},"presentation_window_in_units":{"type":"TypeInt","optional":true},"start_in_units":{"type":"TypeInt","optional":true},"unit_timescale_in_milliseconds":{"type":"TypeInt","required":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"track_selection":{"type":"TypeList","optional":true,"elem":{"schema":{"condition":{"type":"TypeList","required":true,"elem":{"schema":{"operation":{"type":"TypeString","required":true},"property":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mobile_network":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"mobile_country_code":{"type":"TypeString","required":true,"forceNew":true},"mobile_network_code":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_key":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_mobile_network_attached_data_network":{"schema":{"dns_addresses":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"mobile_network_data_network_name":{"type":"TypeString","required":true,"forceNew":true},"mobile_network_packet_core_data_plane_id":{"type":"TypeString","required":true,"forceNew":true},"network_address_port_translation":{"type":"TypeList","optional":true,"elem":{"schema":{"icmp_pinhole_timeout_in_seconds":{"type":"TypeInt","optional":true,"default":180},"pinhole_maximum_number":{"type":"TypeInt","optional":true,"default":65536},"port_range":{"type":"TypeList","optional":true,"elem":{"schema":{"maximum":{"type":"TypeInt","optional":true,"default":49999},"minimum":{"type":"TypeInt","optional":true,"default":1024}}},"maxItems":1},"tcp_pinhole_timeout_in_seconds":{"type":"TypeInt","optional":true,"default":180},"tcp_port_reuse_minimum_hold_time_in_seconds":{"type":"TypeInt","optional":true,"default":120},"udp_pinhole_timeout_in_seconds":{"type":"TypeInt","optional":true,"default":180},"udp_port_reuse_minimum_hold_time_in_seconds":{"type":"TypeInt","optional":true,"default":60}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"user_equipment_address_pool_prefixes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"user_equipment_static_address_pool_prefixes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"user_plane_access_ipv4_address":{"type":"TypeString","optional":true},"user_plane_access_ipv4_gateway":{"type":"TypeString","optional":true},"user_plane_access_ipv4_subnet":{"type":"TypeString","optional":true},"user_plane_access_name":{"type":"TypeString","optional":true}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_mobile_network_data_network":{"schema":{"description":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"mobile_network_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":180,"update":30}},"azurerm_mobile_network_packet_core_control_plane":{"schema":{"control_plane_access_ipv4_address":{"type":"TypeString","optional":true},"control_plane_access_ipv4_gateway":{"type":"TypeString","optional":true},"control_plane_access_ipv4_subnet":{"type":"TypeString","optional":true},"control_plane_access_name":{"type":"TypeString","optional":true},"core_network_technology":{"type":"TypeString","optional":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true}}},"maxItems":1},"interoperability_settings_json":{"type":"TypeString","optional":true},"local_diagnostics_access":{"type":"TypeList","required":true,"elem":{"schema":{"authentication_type":{"type":"TypeString","required":true},"https_server_certificate_url":{"type":"TypeString","optional":true}}},"maxItems":1,"minItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"platform":{"type":"TypeList","optional":true,"elem":{"schema":{"arc_kubernetes_cluster_id":{"type":"TypeString","optional":true},"custom_location_id":{"type":"TypeString","optional":true},"edge_device_id":{"type":"TypeString","optional":true},"stack_hci_cluster_id":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"site_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"sku":{"type":"TypeString","required":true},"software_version":{"type":"TypeString","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"user_equipment_mtu_in_bytes":{"type":"TypeInt","optional":true,"default":1440}},"timeouts":{"create":180,"read":5,"delete":180,"update":30}},"azurerm_mobile_network_packet_core_data_plane":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"mobile_network_packet_core_control_plane_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"user_plane_access_ipv4_address":{"type":"TypeString","optional":true},"user_plane_access_ipv4_gateway":{"type":"TypeString","optional":true},"user_plane_access_ipv4_subnet":{"type":"TypeString","optional":true},"user_plane_access_name":{"type":"TypeString","optional":true}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_mobile_network_service":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"mobile_network_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"pcc_rule":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"precedence":{"type":"TypeInt","required":true},"qos_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"allocation_and_retention_priority_level":{"type":"TypeInt","optional":true},"guaranteed_bit_rate":{"type":"TypeList","optional":true,"elem":{"schema":{"downlink":{"type":"TypeString","required":true},"uplink":{"type":"TypeString","required":true}}},"maxItems":1},"maximum_bit_rate":{"type":"TypeList","required":true,"elem":{"schema":{"downlink":{"type":"TypeString","required":true},"uplink":{"type":"TypeString","required":true}}},"maxItems":1},"preemption_capability":{"type":"TypeString","optional":true,"default":"NotPreempt"},"preemption_vulnerability":{"type":"TypeString","optional":true,"default":"Preemptable"},"qos_indicator":{"type":"TypeInt","required":true}}},"maxItems":1},"service_data_flow_template":{"type":"TypeList","required":true,"elem":{"schema":{"direction":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"ports":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"protocol":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"remote_ip_list":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}},"traffic_control_enabled":{"type":"TypeBool","optional":true,"default":true}}}},"service_precedence":{"type":"TypeInt","required":true},"service_qos_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"allocation_and_retention_priority_level":{"type":"TypeInt","optional":true,"default":9},"maximum_bit_rate":{"type":"TypeList","required":true,"elem":{"schema":{"downlink":{"type":"TypeString","required":true},"uplink":{"type":"TypeString","required":true}}},"maxItems":1},"preemption_capability":{"type":"TypeString","optional":true},"preemption_vulnerability":{"type":"TypeString","optional":true},"qos_indicator":{"type":"TypeInt","optional":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_mobile_network_sim":{"schema":{"authentication_key":{"type":"TypeString","required":true},"device_type":{"type":"TypeString","optional":true},"integrated_circuit_card_identifier":{"type":"TypeString","required":true,"forceNew":true},"international_mobile_subscriber_identity":{"type":"TypeString","required":true,"forceNew":true},"mobile_network_sim_group_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"operator_key_code":{"type":"TypeString","required":true},"sim_policy_id":{"type":"TypeString","optional":true},"sim_state":{"type":"TypeString","computed":true},"static_ip_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"attached_data_network_id":{"type":"TypeString","required":true},"slice_id":{"type":"TypeString","required":true},"static_ipv4_address":{"type":"TypeString","optional":true}}},"minItems":1},"vendor_key_fingerprint":{"type":"TypeString","computed":true},"vendor_name":{"type":"TypeString","computed":true}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_mobile_network_sim_group":{"schema":{"encryption_key_url":{"type":"TypeString","optional":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"mobile_network_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_mobile_network_sim_policy":{"schema":{"default_slice_id":{"type":"TypeString","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"mobile_network_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"rat_frequency_selection_priority_index":{"type":"TypeInt","optional":true},"registration_timer_in_seconds":{"type":"TypeInt","optional":true,"default":3240},"slice":{"type":"TypeList","required":true,"elem":{"schema":{"data_network":{"type":"TypeList","required":true,"elem":{"schema":{"additional_allowed_session_types":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"allocation_and_retention_priority_level":{"type":"TypeInt","optional":true,"default":0},"allowed_services_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"data_network_id":{"type":"TypeString","required":true},"default_session_type":{"type":"TypeString","optional":true,"default":"IPv4"},"max_buffered_packets":{"type":"TypeInt","optional":true,"default":10},"preemption_capability":{"type":"TypeString","optional":true,"default":"NotPreempt"},"preemption_vulnerability":{"type":"TypeString","optional":true,"default":"NotPreemptable"},"qos_indicator":{"type":"TypeInt","required":true},"session_aggregate_maximum_bit_rate":{"type":"TypeList","required":true,"elem":{"schema":{"downlink":{"type":"TypeString","required":true},"uplink":{"type":"TypeString","required":true}}},"maxItems":1}}}},"default_data_network_id":{"type":"TypeString","required":true},"slice_id":{"type":"TypeString","required":true}}},"minItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"user_equipment_aggregate_maximum_bit_rate":{"type":"TypeList","required":true,"elem":{"schema":{"downlink":{"type":"TypeString","required":true},"uplink":{"type":"TypeString","required":true}}},"maxItems":1}},"timeouts":{"create":180,"read":5,"delete":180,"update":60}},"azurerm_mobile_network_site":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"mobile_network_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_function_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_mobile_network_slice":{"schema":{"description":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"mobile_network_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"single_network_slice_selection_assistance_information":{"type":"TypeList","required":true,"elem":{"schema":{"slice_differentiator":{"type":"TypeString","optional":true},"slice_service_type":{"type":"TypeInt","required":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_monitor_aad_diagnostic_setting":{"schema":{"enabled_log":{"type":"TypeSet","optional":true,"elem":{"schema":{"category":{"type":"TypeString","required":true},"retention_policy":{"type":"TypeList","required":true,"elem":{"schema":{"days":{"type":"TypeInt","optional":true,"default":0},"enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1}}}},"eventhub_authorization_rule_id":{"type":"TypeString","optional":true,"forceNew":true},"eventhub_name":{"type":"TypeString","optional":true,"forceNew":true},"log_analytics_workspace_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"storage_account_id":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":5,"read":5,"delete":5,"update":5}},"azurerm_monitor_action_group":{"schema":{"arm_role_receiver":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"role_id":{"type":"TypeString","required":true},"use_common_alert_schema":{"type":"TypeBool","optional":true}}}},"automation_runbook_receiver":{"type":"TypeList","optional":true,"elem":{"schema":{"automation_account_id":{"type":"TypeString","required":true},"is_global_runbook":{"type":"TypeBool","required":true},"name":{"type":"TypeString","required":true},"runbook_name":{"type":"TypeString","required":true},"service_uri":{"type":"TypeString","required":true},"use_common_alert_schema":{"type":"TypeBool","optional":true,"default":false},"webhook_resource_id":{"type":"TypeString","required":true}}}},"azure_app_push_receiver":{"type":"TypeList","optional":true,"elem":{"schema":{"email_address":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}},"azure_function_receiver":{"type":"TypeList","optional":true,"elem":{"schema":{"function_app_resource_id":{"type":"TypeString","required":true},"function_name":{"type":"TypeString","required":true},"http_trigger_url":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"use_common_alert_schema":{"type":"TypeBool","optional":true}}}},"email_receiver":{"type":"TypeList","optional":true,"elem":{"schema":{"email_address":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"use_common_alert_schema":{"type":"TypeBool","optional":true}}}},"enabled":{"type":"TypeBool","optional":true,"default":true},"event_hub_receiver":{"type":"TypeList","optional":true,"elem":{"schema":{"event_hub_name":{"type":"TypeString","required":true},"event_hub_namespace":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"subscription_id":{"type":"TypeString","optional":true,"computed":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true},"use_common_alert_schema":{"type":"TypeBool","optional":true}}}},"itsm_receiver":{"type":"TypeList","optional":true,"elem":{"schema":{"connection_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"region":{"type":"TypeString","required":true},"ticket_configuration":{"type":"TypeString","required":true},"workspace_id":{"type":"TypeString","required":true}}}},"location":{"type":"TypeString","optional":true,"default":"global","forceNew":true},"logic_app_receiver":{"type":"TypeList","optional":true,"elem":{"schema":{"callback_url":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"resource_id":{"type":"TypeString","required":true},"use_common_alert_schema":{"type":"TypeBool","optional":true}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"short_name":{"type":"TypeString","required":true},"sms_receiver":{"type":"TypeList","optional":true,"elem":{"schema":{"country_code":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"phone_number":{"type":"TypeString","required":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"voice_receiver":{"type":"TypeList","optional":true,"elem":{"schema":{"country_code":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"phone_number":{"type":"TypeString","required":true}}}},"webhook_receiver":{"type":"TypeList","optional":true,"elem":{"schema":{"aad_auth":{"type":"TypeList","optional":true,"elem":{"schema":{"identifier_uri":{"type":"TypeString","optional":true,"computed":true},"object_id":{"type":"TypeString","required":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"name":{"type":"TypeString","required":true},"service_uri":{"type":"TypeString","required":true},"use_common_alert_schema":{"type":"TypeBool","optional":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_activity_log_alert":{"schema":{"action":{"type":"TypeList","optional":true,"elem":{"schema":{"action_group_id":{"type":"TypeString","required":true},"webhook_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}}},"criteria":{"type":"TypeList","required":true,"elem":{"schema":{"caller":{"type":"TypeString","optional":true},"category":{"type":"TypeString","required":true},"level":{"type":"TypeString","optional":true},"levels":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"operation_name":{"type":"TypeString","optional":true},"recommendation_category":{"type":"TypeString","optional":true},"recommendation_impact":{"type":"TypeString","optional":true},"recommendation_type":{"type":"TypeString","optional":true},"resource_group":{"type":"TypeString","optional":true},"resource_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"resource_health":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"current":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"previous":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"reason":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"resource_id":{"type":"TypeString","optional":true},"resource_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"resource_provider":{"type":"TypeString","optional":true},"resource_providers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"resource_type":{"type":"TypeString","optional":true},"resource_types":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"service_health":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"events":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"locations":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"services":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"status":{"type":"TypeString","optional":true},"statuses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"sub_status":{"type":"TypeString","optional":true},"sub_statuses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"description":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scopes":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_alert_processing_rule_action_group":{"schema":{"add_action_group_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"condition":{"type":"TypeList","optional":true,"elem":{"schema":{"alert_context":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"alert_rule_id":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"alert_rule_name":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"description":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"monitor_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"monitor_service":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"severity":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"signal_type":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"target_resource":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"target_resource_group":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"target_resource_type":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}},"maxItems":1},"description":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"effective_from":{"type":"TypeString","optional":true},"effective_until":{"type":"TypeString","optional":true},"recurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"daily":{"type":"TypeList","optional":true,"elem":{"schema":{"end_time":{"type":"TypeString","required":true},"start_time":{"type":"TypeString","required":true}}}},"monthly":{"type":"TypeList","optional":true,"elem":{"schema":{"days_of_month":{"type":"TypeList","required":true,"elem":{"type":"TypeInt"},"minItems":1},"end_time":{"type":"TypeString","optional":true},"start_time":{"type":"TypeString","optional":true}}}},"weekly":{"type":"TypeList","optional":true,"elem":{"schema":{"days_of_week":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"end_time":{"type":"TypeString","optional":true},"start_time":{"type":"TypeString","optional":true}}}}}},"maxItems":1},"time_zone":{"type":"TypeString","optional":true,"default":"UTC"}}},"maxItems":1},"scopes":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_alert_processing_rule_suppression":{"schema":{"condition":{"type":"TypeList","optional":true,"elem":{"schema":{"alert_context":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"alert_rule_id":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"alert_rule_name":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"description":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"monitor_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"monitor_service":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"severity":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"signal_type":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"target_resource":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"target_resource_group":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"target_resource_type":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}},"maxItems":1},"description":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"effective_from":{"type":"TypeString","optional":true},"effective_until":{"type":"TypeString","optional":true},"recurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"daily":{"type":"TypeList","optional":true,"elem":{"schema":{"end_time":{"type":"TypeString","required":true},"start_time":{"type":"TypeString","required":true}}}},"monthly":{"type":"TypeList","optional":true,"elem":{"schema":{"days_of_month":{"type":"TypeList","required":true,"elem":{"type":"TypeInt"},"minItems":1},"end_time":{"type":"TypeString","optional":true},"start_time":{"type":"TypeString","optional":true}}}},"weekly":{"type":"TypeList","optional":true,"elem":{"schema":{"days_of_week":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"end_time":{"type":"TypeString","optional":true},"start_time":{"type":"TypeString","optional":true}}}}}},"maxItems":1},"time_zone":{"type":"TypeString","optional":true,"default":"UTC"}}},"maxItems":1},"scopes":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_alert_prometheus_rule_group":{"schema":{"cluster_name":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"interval":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rule":{"type":"TypeList","required":true,"elem":{"schema":{"action":{"type":"TypeList","optional":true,"elem":{"schema":{"action_group_id":{"type":"TypeString","required":true},"action_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":5},"alert":{"type":"TypeString","optional":true},"alert_resolution":{"type":"TypeList","optional":true,"elem":{"schema":{"auto_resolved":{"type":"TypeBool","optional":true},"time_to_resolve":{"type":"TypeString","optional":true}}},"maxItems":1},"annotations":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true},"expression":{"type":"TypeString","required":true},"for":{"type":"TypeString","optional":true},"labels":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"record":{"type":"TypeString","optional":true},"severity":{"type":"TypeInt","optional":true}}}},"rule_group_enabled":{"type":"TypeBool","optional":true},"scopes":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_autoscale_setting":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"notification":{"type":"TypeList","optional":true,"elem":{"schema":{"email":{"type":"TypeList","optional":true,"elem":{"schema":{"custom_emails":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"send_to_subscription_administrator":{"type":"TypeBool","optional":true,"default":false},"send_to_subscription_co_administrator":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"webhook":{"type":"TypeList","optional":true,"elem":{"schema":{"properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"service_uri":{"type":"TypeString","required":true}}}}}},"maxItems":1},"predictive":{"type":"TypeList","optional":true,"elem":{"schema":{"look_ahead_time":{"type":"TypeString","optional":true},"scale_mode":{"type":"TypeString","required":true}}},"maxItems":1,"minItems":1},"profile":{"type":"TypeList","required":true,"elem":{"schema":{"capacity":{"type":"TypeList","required":true,"elem":{"schema":{"default":{"type":"TypeInt","required":true},"maximum":{"type":"TypeInt","required":true},"minimum":{"type":"TypeInt","required":true}}},"maxItems":1},"fixed_date":{"type":"TypeList","optional":true,"elem":{"schema":{"end":{"type":"TypeString","required":true},"start":{"type":"TypeString","required":true},"timezone":{"type":"TypeString","optional":true,"default":"UTC"}}},"maxItems":1},"name":{"type":"TypeString","required":true},"recurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"days":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"hours":{"type":"TypeList","required":true,"elem":{"type":"TypeInt"},"maxItems":1},"minutes":{"type":"TypeList","required":true,"elem":{"type":"TypeInt"},"maxItems":1},"timezone":{"type":"TypeString","optional":true,"default":"UTC"}}},"maxItems":1},"rule":{"type":"TypeList","optional":true,"elem":{"schema":{"metric_trigger":{"type":"TypeList","required":true,"elem":{"schema":{"dimensions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}},"divide_by_instance_count":{"type":"TypeBool","optional":true},"metric_name":{"type":"TypeString","required":true},"metric_namespace":{"type":"TypeString","optional":true},"metric_resource_id":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"statistic":{"type":"TypeString","required":true},"threshold":{"type":"TypeFloat","required":true},"time_aggregation":{"type":"TypeString","required":true},"time_grain":{"type":"TypeString","required":true},"time_window":{"type":"TypeString","required":true}}},"maxItems":1},"scale_action":{"type":"TypeList","required":true,"elem":{"schema":{"cooldown":{"type":"TypeString","required":true},"direction":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true},"value":{"type":"TypeInt","required":true}}},"maxItems":1}}},"maxItems":10}}},"maxItems":20},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_data_collection_endpoint":{"schema":{"configuration_access_endpoint":{"type":"TypeString","computed":true},"description":{"type":"TypeString","optional":true},"immutable_id":{"type":"TypeString","computed":true},"kind":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"logs_ingestion_endpoint":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_data_collection_rule":{"schema":{"data_collection_endpoint_id":{"type":"TypeString","optional":true},"data_flow":{"type":"TypeList","required":true,"elem":{"schema":{"built_in_transform":{"type":"TypeString","optional":true},"destinations":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"output_stream":{"type":"TypeString","optional":true},"streams":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"transform_kql":{"type":"TypeString","optional":true}}},"minItems":1},"data_sources":{"type":"TypeList","optional":true,"elem":{"schema":{"data_import":{"type":"TypeList","optional":true,"elem":{"schema":{"event_hub_data_source":{"type":"TypeList","required":true,"elem":{"schema":{"consumer_group":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"stream":{"type":"TypeString","required":true}}}}}},"maxItems":1},"extension":{"type":"TypeList","optional":true,"elem":{"schema":{"extension_json":{"type":"TypeString","optional":true},"extension_name":{"type":"TypeString","required":true},"input_data_sources":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"streams":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"iis_log":{"type":"TypeList","optional":true,"elem":{"schema":{"log_directories":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"name":{"type":"TypeString","required":true},"streams":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"log_file":{"type":"TypeList","optional":true,"elem":{"schema":{"file_patterns":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"format":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"settings":{"type":"TypeList","optional":true,"elem":{"schema":{"text":{"type":"TypeList","required":true,"elem":{"schema":{"record_start_timestamp_format":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"streams":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"performance_counter":{"type":"TypeList","optional":true,"elem":{"schema":{"counter_specifiers":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"name":{"type":"TypeString","required":true},"sampling_frequency_in_seconds":{"type":"TypeInt","required":true},"streams":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"platform_telemetry":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"streams":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"prometheus_forwarder":{"type":"TypeList","optional":true,"elem":{"schema":{"label_include_filter":{"type":"TypeSet","optional":true,"elem":{"schema":{"label":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"name":{"type":"TypeString","required":true},"streams":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"syslog":{"type":"TypeList","optional":true,"elem":{"schema":{"facility_names":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"log_levels":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"name":{"type":"TypeString","required":true},"streams":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"windows_event_log":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"streams":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"x_path_queries":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"windows_firewall_log":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"streams":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}}}},"maxItems":1},"description":{"type":"TypeString","optional":true},"destinations":{"type":"TypeList","required":true,"elem":{"schema":{"azure_monitor_metrics":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true}}},"maxItems":1},"event_hub":{"type":"TypeList","optional":true,"elem":{"schema":{"event_hub_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}},"maxItems":1},"event_hub_direct":{"type":"TypeList","optional":true,"elem":{"schema":{"event_hub_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}},"maxItems":1},"log_analytics":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"workspace_resource_id":{"type":"TypeString","required":true}}}},"monitor_account":{"type":"TypeList","optional":true,"elem":{"schema":{"monitor_account_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}},"storage_blob":{"type":"TypeList","optional":true,"elem":{"schema":{"container_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"storage_account_id":{"type":"TypeString","required":true}}}},"storage_blob_direct":{"type":"TypeList","optional":true,"elem":{"schema":{"container_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"storage_account_id":{"type":"TypeString","required":true}}}},"storage_table_direct":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"storage_account_id":{"type":"TypeString","required":true},"table_name":{"type":"TypeString","required":true}}}}}},"maxItems":1,"minItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"immutable_id":{"type":"TypeString","computed":true},"kind":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"stream_declaration":{"type":"TypeSet","optional":true,"elem":{"schema":{"column":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"stream_name":{"type":"TypeString","required":true}}},"minItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_data_collection_rule_association":{"schema":{"data_collection_endpoint_id":{"type":"TypeString","optional":true},"data_collection_rule_id":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"default":"configurationAccessEndpoint","forceNew":true},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_diagnostic_setting":{"schema":{"enabled_log":{"type":"TypeSet","optional":true,"elem":{"schema":{"category":{"type":"TypeString","optional":true},"category_group":{"type":"TypeString","optional":true},"retention_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"days":{"type":"TypeInt","optional":true},"enabled":{"type":"TypeBool","required":true}}},"maxItems":1}}}},"eventhub_authorization_rule_id":{"type":"TypeString","optional":true},"eventhub_name":{"type":"TypeString","optional":true},"log_analytics_destination_type":{"type":"TypeString","optional":true,"computed":true},"log_analytics_workspace_id":{"type":"TypeString","optional":true},"metric":{"type":"TypeSet","optional":true,"elem":{"schema":{"category":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"retention_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"days":{"type":"TypeInt","optional":true},"enabled":{"type":"TypeBool","required":true}}},"maxItems":1}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"partner_solution_id":{"type":"TypeString","optional":true},"storage_account_id":{"type":"TypeString","optional":true},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":60,"update":30}},"azurerm_monitor_log_profile":{"schema":{"categories":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"locations":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"retention_policy":{"type":"TypeList","required":true,"elem":{"schema":{"days":{"type":"TypeInt","optional":true,"default":0},"enabled":{"type":"TypeBool","required":true}}},"maxItems":1},"servicebus_rule_id":{"type":"TypeString","optional":true},"storage_account_id":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_metric_alert":{"schema":{"action":{"type":"TypeSet","optional":true,"elem":{"schema":{"action_group_id":{"type":"TypeString","required":true},"webhook_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}}},"application_insights_web_test_location_availability_criteria":{"type":"TypeList","optional":true,"elem":{"schema":{"component_id":{"type":"TypeString","required":true},"failed_location_count":{"type":"TypeInt","required":true},"web_test_id":{"type":"TypeString","required":true}}},"maxItems":1,"minItems":1},"auto_mitigate":{"type":"TypeBool","optional":true,"default":true},"criteria":{"type":"TypeList","optional":true,"elem":{"schema":{"aggregation":{"type":"TypeString","required":true},"dimension":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"metric_name":{"type":"TypeString","required":true},"metric_namespace":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"skip_metric_validation":{"type":"TypeBool","optional":true,"default":false},"threshold":{"type":"TypeFloat","required":true}}},"minItems":1},"description":{"type":"TypeString","optional":true},"dynamic_criteria":{"type":"TypeList","optional":true,"elem":{"schema":{"aggregation":{"type":"TypeString","required":true},"alert_sensitivity":{"type":"TypeString","required":true},"dimension":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"evaluation_failure_count":{"type":"TypeInt","optional":true,"default":4},"evaluation_total_count":{"type":"TypeInt","optional":true,"default":4},"ignore_data_before":{"type":"TypeString","optional":true},"metric_name":{"type":"TypeString","required":true},"metric_namespace":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"skip_metric_validation":{"type":"TypeBool","optional":true}}},"maxItems":1,"minItems":1},"enabled":{"type":"TypeBool","optional":true,"default":true},"frequency":{"type":"TypeString","optional":true,"default":"PT1M"},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scopes":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"severity":{"type":"TypeInt","optional":true,"default":3},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"target_resource_location":{"type":"TypeString","optional":true,"description":"The location of the target pluginsdk. Required when using subscription, resource group scope or multiple scopes.","computed":true},"target_resource_type":{"type":"TypeString","optional":true,"description":"The resource type (e.g. Microsoft.Compute/virtualMachines) of the target pluginsdk. Required when using subscription, resource group scope or multiple scopes.","computed":true},"window_size":{"type":"TypeString","optional":true,"default":"PT5M"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_private_link_scope":{"schema":{"ingestion_access_mode":{"type":"TypeString","optional":true,"default":"Open"},"name":{"type":"TypeString","required":true,"forceNew":true},"query_access_mode":{"type":"TypeString","optional":true,"default":"Open"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_private_link_scoped_service":{"schema":{"linked_resource_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scope_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_monitor_scheduled_query_rules_alert":{"schema":{"action":{"type":"TypeList","required":true,"elem":{"schema":{"action_group":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"custom_webhook_payload":{"type":"TypeString","optional":true},"email_subject":{"type":"TypeString","optional":true}}},"maxItems":1},"authorized_resource_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":100},"auto_mitigation_enabled":{"type":"TypeBool","optional":true,"default":false},"data_source_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"frequency":{"type":"TypeInt","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"query":{"type":"TypeString","required":true},"query_type":{"type":"TypeString","optional":true,"default":"ResultCount"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"severity":{"type":"TypeInt","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"throttling":{"type":"TypeInt","optional":true},"time_window":{"type":"TypeInt","required":true},"trigger":{"type":"TypeList","required":true,"elem":{"schema":{"metric_trigger":{"type":"TypeList","optional":true,"elem":{"schema":{"metric_column":{"type":"TypeString","optional":true},"metric_trigger_type":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"threshold":{"type":"TypeFloat","required":true}}},"maxItems":1},"operator":{"type":"TypeString","required":true},"threshold":{"type":"TypeFloat","required":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_scheduled_query_rules_alert_v2":{"schema":{"action":{"type":"TypeList","optional":true,"elem":{"schema":{"action_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"custom_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"auto_mitigation_enabled":{"type":"TypeBool","optional":true,"default":false},"created_with_api_version":{"type":"TypeString","computed":true},"criteria":{"type":"TypeList","required":true,"elem":{"schema":{"dimension":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}},"failing_periods":{"type":"TypeList","optional":true,"elem":{"schema":{"minimum_failing_periods_to_trigger_alert":{"type":"TypeInt","required":true},"number_of_evaluation_periods":{"type":"TypeInt","required":true}}},"maxItems":1},"metric_measure_column":{"type":"TypeString","optional":true},"operator":{"type":"TypeString","required":true},"query":{"type":"TypeString","required":true},"resource_id_column":{"type":"TypeString","optional":true},"threshold":{"type":"TypeFloat","required":true},"time_aggregation_method":{"type":"TypeString","required":true}}},"minItems":1},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"evaluation_frequency":{"type":"TypeString","required":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"is_a_legacy_log_analytics_rule":{"type":"TypeBool","computed":true},"is_workspace_alerts_storage_configured":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"mute_actions_after_alert_duration":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"query_time_range_override":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scopes":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"maxItems":1,"minItems":1},"severity":{"type":"TypeInt","required":true},"skip_query_validation":{"type":"TypeBool","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"target_resource_types":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"window_duration":{"type":"TypeString","required":true},"workspace_alerts_storage_enabled":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_scheduled_query_rules_log":{"schema":{"authorized_resource_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"criteria":{"type":"TypeList","required":true,"elem":{"schema":{"dimension":{"type":"TypeSet","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"operator":{"type":"TypeString","optional":true,"default":"Include"},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}},"metric_name":{"type":"TypeString","required":true}}},"maxItems":1},"data_source_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_smart_detector_alert_rule":{"schema":{"action_group":{"type":"TypeList","required":true,"elem":{"schema":{"email_subject":{"type":"TypeString","optional":true},"ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"webhook_payload":{"type":"TypeString","optional":true}}},"maxItems":1},"description":{"type":"TypeString","optional":true},"detector_type":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"frequency":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scope_resource_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"severity":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"throttling_duration":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_workspace":{"schema":{"default_data_collection_endpoint_id":{"type":"TypeString","computed":true},"default_data_collection_rule_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"query_endpoint":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_database":{"schema":{"auto_pause_delay_in_minutes":{"type":"TypeInt","optional":true,"computed":true},"collation":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"create_mode":{"type":"TypeString","optional":true,"default":"Default","forceNew":true},"creation_source_database_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"elastic_pool_id":{"type":"TypeString","optional":true},"enclave_type":{"type":"TypeString","optional":true,"computed":true},"geo_backup_enabled":{"type":"TypeBool","optional":true,"default":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true}}},"maxItems":1},"import":{"type":"TypeList","optional":true,"elem":{"schema":{"administrator_login":{"type":"TypeString","required":true},"administrator_login_password":{"type":"TypeString","required":true},"authentication_type":{"type":"TypeString","required":true},"storage_account_id":{"type":"TypeString","optional":true},"storage_key":{"type":"TypeString","required":true},"storage_key_type":{"type":"TypeString","required":true},"storage_uri":{"type":"TypeString","required":true}}},"maxItems":1},"ledger_enabled":{"type":"TypeBool","optional":true,"computed":true,"forceNew":true},"license_type":{"type":"TypeString","optional":true,"computed":true},"long_term_retention_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"immutable_backups_enabled":{"type":"TypeBool","optional":true,"default":false},"monthly_retention":{"type":"TypeString","optional":true,"computed":true},"week_of_year":{"type":"TypeInt","optional":true,"computed":true},"weekly_retention":{"type":"TypeString","optional":true,"computed":true},"yearly_retention":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"maintenance_configuration_name":{"type":"TypeString","optional":true,"computed":true},"max_size_gb":{"type":"TypeInt","optional":true,"computed":true},"min_capacity":{"type":"TypeFloat","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"read_replica_count":{"type":"TypeInt","optional":true,"computed":true},"read_scale":{"type":"TypeBool","optional":true,"computed":true},"recover_database_id":{"type":"TypeString","optional":true},"recovery_point_id":{"type":"TypeString","optional":true},"restore_dropped_database_id":{"type":"TypeString","optional":true},"restore_long_term_retention_backup_id":{"type":"TypeString","optional":true},"restore_point_in_time":{"type":"TypeString","optional":true,"computed":true},"sample_name":{"type":"TypeString","optional":true,"computed":true},"secondary_type":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"server_id":{"type":"TypeString","required":true,"forceNew":true},"short_term_retention_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"backup_interval_in_hours":{"type":"TypeInt","optional":true,"default":12},"retention_days":{"type":"TypeInt","required":true}}},"maxItems":1},"sku_name":{"type":"TypeString","optional":true,"computed":true},"storage_account_type":{"type":"TypeString","optional":true,"default":"Geo"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"threat_detection_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"disabled_alerts":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"email_account_admins":{"type":"TypeString","optional":true,"default":"Disabled"},"email_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"retention_days":{"type":"TypeInt","optional":true},"state":{"type":"TypeString","optional":true,"default":"Disabled"},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_endpoint":{"type":"TypeString","optional":true}}},"maxItems":1},"transparent_data_encryption_enabled":{"type":"TypeBool","optional":true,"default":true},"transparent_data_encryption_key_automatic_rotation_enabled":{"type":"TypeBool","optional":true,"default":false},"transparent_data_encryption_key_vault_key_id":{"type":"TypeString","optional":true},"zone_redundant":{"type":"TypeBool","optional":true,"computed":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_mssql_database_extended_auditing_policy":{"schema":{"database_id":{"type":"TypeString","required":true,"forceNew":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"log_monitoring_enabled":{"type":"TypeBool","optional":true,"default":true},"retention_in_days":{"type":"TypeInt","optional":true,"default":0},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_account_access_key_is_secondary":{"type":"TypeBool","optional":true,"default":false},"storage_endpoint":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_database_vulnerability_assessment_rule_baseline":{"schema":{"baseline_name":{"type":"TypeString","optional":true,"default":"default","forceNew":true},"baseline_result":{"type":"TypeSet","required":true,"elem":{"schema":{"result":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}},"database_name":{"type":"TypeString","required":true,"forceNew":true},"rule_id":{"type":"TypeString","required":true,"forceNew":true},"server_vulnerability_assessment_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_elasticpool":{"schema":{"enclave_type":{"type":"TypeString","optional":true,"computed":true},"license_type":{"type":"TypeString","optional":true,"computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"maintenance_configuration_name":{"type":"TypeString","optional":true,"default":"SQL_Default"},"max_size_bytes":{"type":"TypeInt","optional":true,"computed":true},"max_size_gb":{"type":"TypeFloat","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"per_database_settings":{"type":"TypeList","required":true,"elem":{"schema":{"max_capacity":{"type":"TypeFloat","required":true},"min_capacity":{"type":"TypeFloat","required":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeList","required":true,"elem":{"schema":{"capacity":{"type":"TypeInt","required":true},"family":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"tier":{"type":"TypeString","required":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zone_redundant":{"type":"TypeBool","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_failover_group":{"schema":{"databases":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"partner_server":{"type":"TypeList","required":true,"elem":{"schema":{"id":{"type":"TypeString","required":true},"location":{"type":"TypeString","computed":true},"role":{"type":"TypeString","computed":true}}},"minItems":1},"read_write_endpoint_failover_policy":{"type":"TypeList","required":true,"elem":{"schema":{"grace_minutes":{"type":"TypeInt","optional":true},"mode":{"type":"TypeString","required":true}}},"maxItems":1},"readonly_endpoint_failover_policy_enabled":{"type":"TypeBool","optional":true,"computed":true},"server_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_firewall_rule":{"schema":{"end_ip_address":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"server_id":{"type":"TypeString","required":true,"forceNew":true},"start_ip_address":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_job_agent":{"schema":{"database_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_mssql_job_credential":{"schema":{"job_agent_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_mssql_managed_database":{"schema":{"long_term_retention_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"immutable_backups_enabled":{"type":"TypeBool","optional":true,"default":false},"monthly_retention":{"type":"TypeString","optional":true,"computed":true},"week_of_year":{"type":"TypeInt","optional":true,"computed":true},"weekly_retention":{"type":"TypeString","optional":true,"computed":true},"yearly_retention":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"managed_instance_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"point_in_time_restore":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"restore_point_in_time":{"type":"TypeString","required":true,"forceNew":true},"source_database_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"short_term_retention_days":{"type":"TypeInt","optional":true,"default":7}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_managed_instance":{"schema":{"administrator_login":{"type":"TypeString","required":true,"forceNew":true},"administrator_login_password":{"type":"TypeString","required":true},"collation":{"type":"TypeString","optional":true,"default":"SQL_Latin1_General_CP1_CI_AS","forceNew":true},"dns_zone":{"type":"TypeString","computed":true},"dns_zone_partner_id":{"type":"TypeString","optional":true},"fqdn":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"license_type":{"type":"TypeString","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"maintenance_configuration_name":{"type":"TypeString","optional":true,"default":"SQL_Default"},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"name":{"type":"TypeString","required":true,"forceNew":true},"proxy_override":{"type":"TypeString","optional":true,"default":"Default"},"public_data_endpoint_enabled":{"type":"TypeBool","optional":true,"default":false},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true},"storage_account_type":{"type":"TypeString","optional":true,"default":"GRS","forceNew":true},"storage_size_in_gb":{"type":"TypeInt","required":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"timezone_id":{"type":"TypeString","optional":true,"default":"UTC","forceNew":true},"vcores":{"type":"TypeInt","required":true},"zone_redundant_enabled":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":1440,"read":5,"delete":1440,"update":1440}},"azurerm_mssql_managed_instance_active_directory_administrator":{"schema":{"azuread_authentication_only":{"type":"TypeBool","optional":true},"login_username":{"type":"TypeString","required":true},"managed_instance_id":{"type":"TypeString","required":true,"forceNew":true},"object_id":{"type":"TypeString","required":true},"tenant_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_managed_instance_failover_group":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"managed_instance_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"partner_managed_instance_id":{"type":"TypeString","required":true,"forceNew":true},"partner_region":{"type":"TypeList","computed":true,"elem":{"schema":{"location":{"type":"TypeString","computed":true},"role":{"type":"TypeString","computed":true}}}},"read_write_endpoint_failover_policy":{"type":"TypeList","required":true,"elem":{"schema":{"grace_minutes":{"type":"TypeInt","optional":true},"mode":{"type":"TypeString","required":true}}},"maxItems":1},"readonly_endpoint_failover_policy_enabled":{"type":"TypeBool","optional":true,"default":true},"role":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_managed_instance_security_alert_policy":{"schema":{"disabled_alerts":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"email_account_admins_enabled":{"type":"TypeBool","optional":true,"default":false},"email_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true},"managed_instance_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_days":{"type":"TypeInt","optional":true,"default":0},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_endpoint":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_managed_instance_transparent_data_encryption":{"schema":{"auto_rotation_enabled":{"type":"TypeBool","optional":true,"default":false},"key_vault_key_id":{"type":"TypeString","optional":true},"managed_instance_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_managed_instance_vulnerability_assessment":{"schema":{"managed_instance_id":{"type":"TypeString","required":true,"forceNew":true},"recurring_scans":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"email_subscription_admins":{"type":"TypeBool","optional":true,"default":true},"emails":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_container_path":{"type":"TypeString","required":true},"storage_container_sas_key":{"type":"TypeString","optional":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_mssql_outbound_firewall_rule":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"server_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_mssql_server":{"schema":{"administrator_login":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"administrator_login_password":{"type":"TypeString","optional":true},"azuread_administrator":{"type":"TypeList","optional":true,"elem":{"schema":{"azuread_authentication_only":{"type":"TypeBool","optional":true,"computed":true},"login_username":{"type":"TypeString","required":true},"object_id":{"type":"TypeString","required":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1,"minItems":1},"connection_policy":{"type":"TypeString","optional":true,"default":"Default"},"fully_qualified_domain_name":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"name":{"type":"TypeString","required":true,"forceNew":true},"outbound_network_restriction_enabled":{"type":"TypeBool","optional":true,"default":false},"primary_user_assigned_identity_id":{"type":"TypeString","optional":true,"computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"restorable_dropped_database_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"transparent_data_encryption_key_vault_key_id":{"type":"TypeString","optional":true},"version":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_mssql_server_dns_alias":{"schema":{"dns_record":{"type":"TypeString","computed":true},"mssql_server_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":10}},"azurerm_mssql_server_extended_auditing_policy":{"schema":{"audit_actions_and_groups":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true,"default":true},"log_monitoring_enabled":{"type":"TypeBool","optional":true,"default":true},"predicate_expression":{"type":"TypeString","optional":true},"retention_in_days":{"type":"TypeInt","optional":true,"default":0},"server_id":{"type":"TypeString","required":true,"forceNew":true},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_account_access_key_is_secondary":{"type":"TypeBool","optional":true,"default":false},"storage_account_subscription_id":{"type":"TypeString","optional":true},"storage_endpoint":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_server_microsoft_support_auditing_policy":{"schema":{"blob_storage_endpoint":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"log_monitoring_enabled":{"type":"TypeBool","optional":true,"default":true},"server_id":{"type":"TypeString","required":true,"forceNew":true},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_account_subscription_id":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_server_security_alert_policy":{"schema":{"disabled_alerts":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"email_account_admins":{"type":"TypeBool","optional":true,"default":false},"email_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_days":{"type":"TypeInt","optional":true,"default":0},"server_name":{"type":"TypeString","required":true,"forceNew":true},"state":{"type":"TypeString","required":true},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_endpoint":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_server_transparent_data_encryption":{"schema":{"auto_rotation_enabled":{"type":"TypeBool","optional":true,"default":false},"key_vault_key_id":{"type":"TypeString","optional":true},"managed_hsm_key_id":{"type":"TypeString","optional":true},"server_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_server_vulnerability_assessment":{"schema":{"recurring_scans":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"email_subscription_admins":{"type":"TypeBool","optional":true,"default":false},"emails":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"server_security_alert_policy_id":{"type":"TypeString","required":true,"forceNew":true},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_container_path":{"type":"TypeString","required":true},"storage_container_sas_key":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_virtual_machine":{"schema":{"assessment":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"run_immediately":{"type":"TypeBool","optional":true,"default":false},"schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"day_of_week":{"type":"TypeString","required":true},"monthly_occurrence":{"type":"TypeInt","optional":true},"start_time":{"type":"TypeString","required":true},"weekly_interval":{"type":"TypeInt","optional":true}}},"maxItems":1}}},"maxItems":1},"auto_backup":{"type":"TypeList","optional":true,"elem":{"schema":{"encryption_enabled":{"type":"TypeBool","optional":true,"default":false},"encryption_password":{"type":"TypeString","optional":true},"manual_schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"days_of_week":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"full_backup_frequency":{"type":"TypeString","required":true},"full_backup_start_hour":{"type":"TypeInt","required":true},"full_backup_window_in_hours":{"type":"TypeInt","required":true},"log_backup_frequency_in_minutes":{"type":"TypeInt","required":true}}},"maxItems":1},"retention_period_in_days":{"type":"TypeInt","required":true},"storage_account_access_key":{"type":"TypeString","required":true},"storage_blob_endpoint":{"type":"TypeString","required":true},"system_databases_backup_enabled":{"type":"TypeBool","optional":true}}},"maxItems":1},"auto_patching":{"type":"TypeList","optional":true,"elem":{"schema":{"day_of_week":{"type":"TypeString","required":true},"maintenance_window_duration_in_minutes":{"type":"TypeInt","required":true},"maintenance_window_starting_hour":{"type":"TypeInt","required":true}}},"maxItems":1},"key_vault_credential":{"type":"TypeList","optional":true,"elem":{"schema":{"key_vault_url":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true},"service_principal_name":{"type":"TypeString","required":true,"forceNew":true},"service_principal_secret":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"r_services_enabled":{"type":"TypeBool","optional":true},"sql_connectivity_port":{"type":"TypeInt","optional":true,"default":1433},"sql_connectivity_type":{"type":"TypeString","optional":true,"default":"PRIVATE"},"sql_connectivity_update_password":{"type":"TypeString","optional":true},"sql_connectivity_update_username":{"type":"TypeString","optional":true},"sql_instance":{"type":"TypeList","optional":true,"elem":{"schema":{"adhoc_workloads_optimization_enabled":{"type":"TypeBool","optional":true,"default":false},"collation":{"type":"TypeString","optional":true,"default":"SQL_Latin1_General_CP1_CI_AS","forceNew":true},"instant_file_initialization_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"lock_pages_in_memory_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"max_dop":{"type":"TypeInt","optional":true,"default":0},"max_server_memory_mb":{"type":"TypeInt","optional":true,"default":2147483647},"min_server_memory_mb":{"type":"TypeInt","optional":true,"default":0}}},"maxItems":1},"sql_license_type":{"type":"TypeString","optional":true,"forceNew":true},"sql_virtual_machine_group_id":{"type":"TypeString","optional":true},"storage_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"data_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"default_file_path":{"type":"TypeString","required":true},"luns":{"type":"TypeList","required":true,"elem":{"type":"TypeInt"}}}},"maxItems":1},"disk_type":{"type":"TypeString","required":true},"log_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"default_file_path":{"type":"TypeString","required":true},"luns":{"type":"TypeList","required":true,"elem":{"type":"TypeInt"}}}},"maxItems":1},"storage_workload_type":{"type":"TypeString","required":true},"system_db_on_data_disk_enabled":{"type":"TypeBool","optional":true,"default":false},"temp_db_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"data_file_count":{"type":"TypeInt","optional":true,"default":8},"data_file_growth_in_mb":{"type":"TypeInt","optional":true,"default":512},"data_file_size_mb":{"type":"TypeInt","optional":true,"default":256},"default_file_path":{"type":"TypeString","required":true},"log_file_growth_mb":{"type":"TypeInt","optional":true,"default":512},"log_file_size_mb":{"type":"TypeInt","optional":true,"default":256},"luns":{"type":"TypeList","required":true,"elem":{"type":"TypeInt"}}}},"maxItems":1}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true},"wsfc_domain_credential":{"type":"TypeList","optional":true,"elem":{"schema":{"cluster_bootstrap_account_password":{"type":"TypeString","required":true},"cluster_operator_account_password":{"type":"TypeString","required":true},"sql_service_account_password":{"type":"TypeString","required":true}}},"maxItems":1}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_mssql_virtual_machine_availability_group_listener":{"schema":{"availability_group_name":{"type":"TypeString","optional":true,"forceNew":true},"load_balancer_configuration":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"load_balancer_id":{"type":"TypeString","required":true,"forceNew":true},"private_ip_address":{"type":"TypeString","required":true,"forceNew":true},"probe_port":{"type":"TypeInt","required":true,"forceNew":true},"sql_virtual_machine_ids":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"multi_subnet_ip_configuration":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"private_ip_address":{"type":"TypeString","required":true,"forceNew":true},"sql_virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"port":{"type":"TypeInt","optional":true,"forceNew":true},"replica":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"schema":{"commit":{"type":"TypeString","required":true,"forceNew":true},"failover_mode":{"type":"TypeString","required":true,"forceNew":true},"readable_secondary":{"type":"TypeString","required":true,"forceNew":true},"role":{"type":"TypeString","required":true,"forceNew":true},"sql_virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true}}}},"sql_virtual_machine_group_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_mssql_virtual_machine_group":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sql_image_offer":{"type":"TypeString","required":true,"forceNew":true},"sql_image_sku":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"wsfc_domain_profile":{"type":"TypeList","required":true,"elem":{"schema":{"cluster_bootstrap_account_name":{"type":"TypeString","optional":true,"forceNew":true},"cluster_operator_account_name":{"type":"TypeString","optional":true,"forceNew":true},"cluster_subnet_type":{"type":"TypeString","required":true,"forceNew":true},"fqdn":{"type":"TypeString","required":true,"forceNew":true},"organizational_unit_path":{"type":"TypeString","optional":true,"forceNew":true},"sql_service_account_name":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_primary_key":{"type":"TypeString","optional":true},"storage_account_url":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_virtual_network_rule":{"schema":{"ignore_missing_vnet_service_endpoint":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"server_id":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mysql_flexible_database":{"schema":{"charset":{"type":"TypeString","required":true,"forceNew":true},"collation":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60}},"azurerm_mysql_flexible_server":{"schema":{"administrator_login":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"administrator_password":{"type":"TypeString","optional":true},"backup_retention_days":{"type":"TypeInt","optional":true,"default":7},"create_mode":{"type":"TypeString","optional":true,"forceNew":true},"customer_managed_key":{"type":"TypeList","optional":true,"elem":{"schema":{"geo_backup_key_vault_key_id":{"type":"TypeString","optional":true},"geo_backup_user_assigned_identity_id":{"type":"TypeString","optional":true},"key_vault_key_id":{"type":"TypeString","optional":true},"primary_user_assigned_identity_id":{"type":"TypeString","optional":true}}},"maxItems":1},"delegated_subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"fqdn":{"type":"TypeString","computed":true},"geo_redundant_backup_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"high_availability":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"standby_availability_zone":{"type":"TypeString","optional":true}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"maintenance_window":{"type":"TypeList","optional":true,"elem":{"schema":{"day_of_week":{"type":"TypeInt","optional":true,"default":0},"start_hour":{"type":"TypeInt","optional":true,"default":0},"start_minute":{"type":"TypeInt","optional":true,"default":0}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"point_in_time_restore_time_in_utc":{"type":"TypeString","optional":true,"forceNew":true},"private_dns_zone_id":{"type":"TypeString","optional":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"replica_capacity":{"type":"TypeInt","computed":true},"replication_role":{"type":"TypeString","optional":true,"computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","optional":true,"computed":true},"source_server_id":{"type":"TypeString","optional":true,"forceNew":true},"storage":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"auto_grow_enabled":{"type":"TypeBool","optional":true,"default":true},"io_scaling_enabled":{"type":"TypeBool","optional":true,"default":false},"iops":{"type":"TypeInt","optional":true,"computed":true},"size_gb":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"version":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"zone":{"type":"TypeString","optional":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_mysql_flexible_server_active_directory_administrator":{"schema":{"identity_id":{"type":"TypeString","required":true},"login":{"type":"TypeString","required":true},"object_id":{"type":"TypeString","required":true},"server_id":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mysql_flexible_server_configuration":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mysql_flexible_server_firewall_rule":{"schema":{"end_ip_address":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_name":{"type":"TypeString","required":true,"forceNew":true},"start_ip_address":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_nat_gateway":{"schema":{"idle_timeout_in_minutes":{"type":"TypeInt","optional":true,"default":4},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"resource_guid":{"type":"TypeString","computed":true},"sku_name":{"type":"TypeString","optional":true,"default":"Standard"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_nat_gateway_public_ip_association":{"schema":{"nat_gateway_id":{"type":"TypeString","required":true,"forceNew":true},"public_ip_address_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_nat_gateway_public_ip_prefix_association":{"schema":{"nat_gateway_id":{"type":"TypeString","required":true,"forceNew":true},"public_ip_prefix_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_netapp_account":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"aes_encryption_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"If enabled, AES encryption will be enabled for SMB communication."},"dns_servers":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"domain":{"type":"TypeString","required":true},"kerberos_ad_name":{"type":"TypeString","optional":true,"description":"Name of the active directory machine. This optional parameter is used only while creating kerberos volume."},"kerberos_kdc_ip":{"type":"TypeString","optional":true,"description":"IP address of the KDC server (usually same the DC). This optional parameter is used only while creating kerberos volume."},"ldap_over_tls_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Specifies whether or not the LDAP traffic needs to be secured via TLS."},"ldap_signing_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Specifies whether or not the LDAP traffic needs to be signed."},"local_nfs_users_with_ldap_allowed":{"type":"TypeBool","optional":true,"default":false,"description":"If enabled, NFS client local users can also (in addition to LDAP users) access the NFS volumes."},"organizational_unit":{"type":"TypeString","optional":true,"default":"CN=Computers","description":"The Organizational Unit (OU) within the Windows Active Directory where machines will be created. If blank, defaults to 'CN=Computers'"},"password":{"type":"TypeString","required":true},"server_root_ca_certificate":{"type":"TypeString","optional":true,"description":"When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded Active Directory Certificate Service's self-signed root CA certificate, this optional parameter is used only for dual protocol with LDAP user-mapping volumes."},"site_name":{"type":"TypeString","optional":true,"default":"Default-First-Site-Name","description":"The Active Directory site the service will limit Domain Controller discovery to. If blank, defaults to 'Default-First-Site-Name'"},"smb_server_name":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_netapp_account_encryption":{"schema":{"encryption_key":{"type":"TypeString","required":true,"description":"The versionless encryption key url."},"netapp_account_id":{"type":"TypeString","required":true,"description":"The ID of the NetApp Account where encryption will be set."},"system_assigned_identity_principal_id":{"type":"TypeString","optional":true,"description":"The Principal ID of the System Assigned Identity to use for encryption."},"user_assigned_identity_id":{"type":"TypeString","optional":true,"description":"The resource ID of the User Assigned Identity to use for encryption."}},"timeouts":{"create":90,"read":5,"delete":120,"update":120}},"azurerm_netapp_pool":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"encryption_type":{"type":"TypeString","optional":true,"default":"Single","forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"qos_type":{"type":"TypeString","optional":true,"default":"Auto"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_level":{"type":"TypeString","required":true,"forceNew":true},"size_in_tb":{"type":"TypeInt","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_netapp_snapshot":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"pool_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"volume_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_netapp_snapshot_policy":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"daily_schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"hour":{"type":"TypeInt","required":true},"minute":{"type":"TypeInt","required":true},"snapshots_to_keep":{"type":"TypeInt","required":true}}},"maxItems":1},"enabled":{"type":"TypeBool","required":true},"hourly_schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"minute":{"type":"TypeInt","required":true},"snapshots_to_keep":{"type":"TypeInt","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"monthly_schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"days_of_month":{"type":"TypeSet","required":true,"elem":{"type":"TypeInt"},"maxItems":30},"hour":{"type":"TypeInt","required":true},"minute":{"type":"TypeInt","required":true},"snapshots_to_keep":{"type":"TypeInt","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"weekly_schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"days_of_week":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"maxItems":7},"hour":{"type":"TypeInt","required":true},"minute":{"type":"TypeInt","required":true},"snapshots_to_keep":{"type":"TypeInt","required":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_netapp_volume":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"azure_vmware_data_store_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"create_from_snapshot_resource_id":{"type":"TypeString","optional":true,"forceNew":true},"data_protection_replication":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"endpoint_type":{"type":"TypeString","optional":true,"default":"dst"},"remote_volume_location":{"type":"TypeString","required":true,"forceNew":true},"remote_volume_resource_id":{"type":"TypeString","required":true},"replication_frequency":{"type":"TypeString","required":true}}},"maxItems":1},"data_protection_snapshot_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"snapshot_policy_id":{"type":"TypeString","required":true}}},"maxItems":1},"encryption_key_source":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"export_policy_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_clients":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"kerberos_5_read_only_enabled":{"type":"TypeBool","optional":true},"kerberos_5_read_write_enabled":{"type":"TypeBool","optional":true},"kerberos_5i_read_only_enabled":{"type":"TypeBool","optional":true},"kerberos_5i_read_write_enabled":{"type":"TypeBool","optional":true},"kerberos_5p_read_only_enabled":{"type":"TypeBool","optional":true},"kerberos_5p_read_write_enabled":{"type":"TypeBool","optional":true},"protocols_enabled":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1,"minItems":1},"root_access_enabled":{"type":"TypeBool","optional":true},"rule_index":{"type":"TypeInt","required":true},"unix_read_only":{"type":"TypeBool","optional":true},"unix_read_write":{"type":"TypeBool","optional":true}}},"maxItems":5},"kerberos_enabled":{"type":"TypeBool","optional":true,"description":"Enable to allow Kerberos secured volumes. Requires appropriate export rules as well as the parent `azurerm_netapp_account` having a defined AD connection.","forceNew":true},"key_vault_private_endpoint_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"mount_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"network_features":{"type":"TypeString","optional":true,"default":"Basic"},"pool_name":{"type":"TypeString","required":true,"forceNew":true},"protocols":{"type":"TypeSet","optional":true,"computed":true,"forceNew":true,"elem":{"type":"TypeString"},"maxItems":2},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"security_style":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"service_level":{"type":"TypeString","required":true,"forceNew":true},"smb_access_based_enumeration_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Enable access based enumeration setting for SMB/Dual Protocol volume. When enabled, users who do not have permission to access a shared folder or file underneath it, do not see that shared resource displayed in their environment."},"smb_continuous_availability_enabled":{"type":"TypeBool","optional":true,"description":"Continuous availability option should be used only for SQL and FSLogix workloads. Using it for any other SMB workloads is not supported.","forceNew":true},"smb_non_browsable_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Enable non browsable share setting for SMB/Dual Protocol volume. When enabled, it restricts windows clients to browse the share"},"snapshot_directory_visible":{"type":"TypeBool","optional":true,"computed":true},"storage_quota_in_gb":{"type":"TypeInt","required":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"throughput_in_mibps":{"type":"TypeFloat","optional":true,"computed":true},"volume_path":{"type":"TypeString","required":true,"forceNew":true},"zone":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_netapp_volume_group_sap_hana":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"application_identifier":{"type":"TypeString","required":true,"forceNew":true},"group_description":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"volume":{"type":"TypeList","required":true,"elem":{"schema":{"capacity_pool_id":{"type":"TypeString","required":true,"forceNew":true},"data_protection_replication":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"endpoint_type":{"type":"TypeString","optional":true,"default":"dst"},"remote_volume_location":{"type":"TypeString","required":true},"remote_volume_resource_id":{"type":"TypeString","required":true},"replication_frequency":{"type":"TypeString","required":true}}},"maxItems":1},"data_protection_snapshot_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"snapshot_policy_id":{"type":"TypeString","required":true}}},"maxItems":1},"export_policy_rule":{"type":"TypeList","required":true,"elem":{"schema":{"allowed_clients":{"type":"TypeString","required":true},"nfsv3_enabled":{"type":"TypeBool","required":true},"nfsv41_enabled":{"type":"TypeBool","required":true},"root_access_enabled":{"type":"TypeBool","optional":true,"default":true},"rule_index":{"type":"TypeInt","required":true},"unix_read_only":{"type":"TypeBool","optional":true,"default":false},"unix_read_write":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":5,"minItems":1},"id":{"type":"TypeString","computed":true},"mount_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"protocols":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"maxItems":1,"minItems":1},"proximity_placement_group_id":{"type":"TypeString","optional":true,"forceNew":true},"security_style":{"type":"TypeString","required":true,"forceNew":true},"service_level":{"type":"TypeString","required":true,"forceNew":true},"snapshot_directory_visible":{"type":"TypeBool","required":true,"forceNew":true},"storage_quota_in_gb":{"type":"TypeInt","required":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"throughput_in_mibps":{"type":"TypeFloat","required":true},"volume_path":{"type":"TypeString","required":true,"forceNew":true},"volume_spec_name":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":5,"minItems":2}},"timeouts":{"create":90,"read":5,"delete":120,"update":120}},"azurerm_netapp_volume_quota_rule":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"quota_size_in_kib":{"type":"TypeInt","required":true},"quota_target":{"type":"TypeString","optional":true,"forceNew":true},"quota_type":{"type":"TypeString","required":true,"forceNew":true},"volume_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":90,"read":5,"delete":120,"update":120}},"azurerm_network_connection_monitor":{"schema":{"endpoint":{"type":"TypeSet","required":true,"elem":{"schema":{"address":{"type":"TypeString","optional":true},"coverage_level":{"type":"TypeString","optional":true},"excluded_ip_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"filter":{"type":"TypeList","optional":true,"elem":{"schema":{"item":{"type":"TypeSet","optional":true,"elem":{"schema":{"address":{"type":"TypeString","optional":true},"type":{"type":"TypeString","optional":true,"default":"AgentAddress"}}}},"type":{"type":"TypeString","optional":true,"default":"Include"}}},"maxItems":1},"included_ip_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"target_resource_id":{"type":"TypeString","optional":true},"target_resource_type":{"type":"TypeString","optional":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_watcher_id":{"type":"TypeString","required":true,"forceNew":true},"notes":{"type":"TypeString","optional":true},"output_workspace_resource_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"test_configuration":{"type":"TypeSet","required":true,"elem":{"schema":{"http_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"method":{"type":"TypeString","optional":true,"default":"Get"},"path":{"type":"TypeString","optional":true},"port":{"type":"TypeInt","optional":true},"prefer_https":{"type":"TypeBool","optional":true,"default":false},"request_header":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"valid_status_code_ranges":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"icmp_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"trace_route_enabled":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"name":{"type":"TypeString","required":true},"preferred_ip_version":{"type":"TypeString","optional":true},"protocol":{"type":"TypeString","required":true},"success_threshold":{"type":"TypeList","optional":true,"elem":{"schema":{"checks_failed_percent":{"type":"TypeInt","optional":true},"round_trip_time_ms":{"type":"TypeFloat","optional":true}}},"maxItems":1},"tcp_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"destination_port_behavior":{"type":"TypeString","optional":true},"port":{"type":"TypeInt","required":true},"trace_route_enabled":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"test_frequency_in_seconds":{"type":"TypeInt","optional":true,"default":60}}}},"test_group":{"type":"TypeSet","required":true,"elem":{"schema":{"destination_endpoints":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true},"source_endpoints":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"test_configuration_names":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_ddos_protection_plan":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_network_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_function_azure_traffic_collector":{"schema":{"collector_policy_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_hub_id":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_function_collector_policy":{"schema":{"ipfx_emission":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"destination_types":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"maxItems":1}}},"maxItems":1},"ipfx_ingestion":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"source_resource_ids":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"traffic_collector_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_interface":{"schema":{"accelerated_networking_enabled":{"type":"TypeBool","optional":true},"applied_dns_servers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"auxiliary_mode":{"type":"TypeString","optional":true},"auxiliary_sku":{"type":"TypeString","optional":true},"dns_servers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"internal_dns_name_label":{"type":"TypeString","optional":true},"internal_domain_name_suffix":{"type":"TypeString","computed":true},"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"gateway_load_balancer_frontend_ip_configuration_id":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true},"primary":{"type":"TypeBool","optional":true,"computed":true},"private_ip_address":{"type":"TypeString","optional":true,"computed":true},"private_ip_address_allocation":{"type":"TypeString","required":true},"private_ip_address_version":{"type":"TypeString","optional":true,"default":"IPv4"},"public_ip_address_id":{"type":"TypeString","optional":true},"subnet_id":{"type":"TypeString","optional":true}}}},"ip_forwarding_enabled":{"type":"TypeBool","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"mac_address":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_machine_id":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_interface_application_gateway_backend_address_pool_association":{"schema":{"backend_address_pool_id":{"type":"TypeString","required":true,"forceNew":true},"ip_configuration_name":{"type":"TypeString","required":true,"forceNew":true},"network_interface_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_network_interface_application_security_group_association":{"schema":{"application_security_group_id":{"type":"TypeString","required":true,"forceNew":true},"network_interface_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_network_interface_backend_address_pool_association":{"schema":{"backend_address_pool_id":{"type":"TypeString","required":true,"forceNew":true},"ip_configuration_name":{"type":"TypeString","required":true,"forceNew":true},"network_interface_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_network_interface_nat_rule_association":{"schema":{"ip_configuration_name":{"type":"TypeString","required":true,"forceNew":true},"nat_rule_id":{"type":"TypeString","required":true,"forceNew":true},"network_interface_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_network_interface_security_group_association":{"schema":{"network_interface_id":{"type":"TypeString","required":true,"forceNew":true},"network_security_group_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_network_manager":{"schema":{"cross_tenant_scopes":{"type":"TypeList","computed":true,"elem":{"schema":{"management_groups":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"subscriptions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","computed":true}}}},"description":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scope":{"type":"TypeList","required":true,"elem":{"schema":{"management_group_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"subscription_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1,"minItems":1},"scope_accesses":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_manager_admin_rule":{"schema":{"action":{"type":"TypeString","required":true},"admin_rule_collection_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"destination":{"type":"TypeList","optional":true,"elem":{"schema":{"address_prefix":{"type":"TypeString","required":true},"address_prefix_type":{"type":"TypeString","required":true}}}},"destination_port_ranges":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"direction":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","required":true},"protocol":{"type":"TypeString","required":true},"source":{"type":"TypeList","optional":true,"elem":{"schema":{"address_prefix":{"type":"TypeString","required":true},"address_prefix_type":{"type":"TypeString","required":true}}}},"source_port_ranges":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_manager_admin_rule_collection":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_group_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"security_admin_configuration_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_manager_connectivity_configuration":{"schema":{"applies_to_group":{"type":"TypeList","required":true,"elem":{"schema":{"global_mesh_enabled":{"type":"TypeBool","optional":true},"group_connectivity":{"type":"TypeString","required":true},"network_group_id":{"type":"TypeString","required":true},"use_hub_gateway":{"type":"TypeBool","optional":true}}}},"connectivity_topology":{"type":"TypeString","required":true},"delete_existing_peering_enabled":{"type":"TypeBool","optional":true},"description":{"type":"TypeString","optional":true},"global_mesh_enabled":{"type":"TypeBool","optional":true},"hub":{"type":"TypeList","optional":true,"elem":{"schema":{"resource_id":{"type":"TypeString","required":true},"resource_type":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network_manager_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_manager_deployment":{"schema":{"configuration_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"network_manager_id":{"type":"TypeString","required":true,"forceNew":true},"scope_access":{"type":"TypeString","required":true,"forceNew":true},"triggers":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":1440,"read":5,"delete":1440,"update":1440}},"azurerm_network_manager_management_group_connection":{"schema":{"connection_state":{"type":"TypeString","computed":true},"description":{"type":"TypeString","optional":true},"management_group_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_manager_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_manager_network_group":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_manager_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_manager_scope_connection":{"schema":{"connection_state":{"type":"TypeString","computed":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_manager_id":{"type":"TypeString","required":true,"forceNew":true},"target_scope_id":{"type":"TypeString","required":true},"tenant_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_manager_security_admin_configuration":{"schema":{"apply_on_network_intent_policy_based_services":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_manager_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_manager_static_member":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"network_group_id":{"type":"TypeString","required":true,"forceNew":true},"region":{"type":"TypeString","computed":true},"target_virtual_network_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_network_manager_subscription_connection":{"schema":{"connection_state":{"type":"TypeString","computed":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_manager_id":{"type":"TypeString","required":true},"subscription_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_packet_capture":{"schema":{"filter":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"local_ip_address":{"type":"TypeString","optional":true,"forceNew":true},"local_port":{"type":"TypeString","optional":true,"forceNew":true},"protocol":{"type":"TypeString","required":true,"forceNew":true},"remote_ip_address":{"type":"TypeString","optional":true,"forceNew":true},"remote_port":{"type":"TypeString","optional":true,"forceNew":true}}}},"maximum_bytes_per_packet":{"type":"TypeInt","optional":true,"default":0,"forceNew":true},"maximum_bytes_per_session":{"type":"TypeInt","optional":true,"default":1073741824,"forceNew":true},"maximum_capture_duration":{"type":"TypeInt","optional":true,"default":18000,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_watcher_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"storage_location":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"file_path":{"type":"TypeString","optional":true},"storage_account_id":{"type":"TypeString","optional":true},"storage_path":{"type":"TypeString","computed":true}}},"maxItems":1},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_network_profile":{"schema":{"container_network_interface":{"type":"TypeList","required":true,"elem":{"schema":{"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"subnet_id":{"type":"TypeString","required":true}}}},"name":{"type":"TypeString","required":true}}},"maxItems":1},"container_network_interface_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_security_group":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"security_rule":{"type":"TypeSet","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"access":{"type":"TypeString","required":true},"description":{"type":"TypeString","optional":true},"destination_address_prefix":{"type":"TypeString","optional":true},"destination_address_prefixes":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"destination_application_security_group_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"destination_port_range":{"type":"TypeString","optional":true},"destination_port_ranges":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"direction":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"priority":{"type":"TypeInt","required":true},"protocol":{"type":"TypeString","required":true},"source_address_prefix":{"type":"TypeString","optional":true},"source_address_prefixes":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"source_application_security_group_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"source_port_range":{"type":"TypeString","optional":true},"source_port_ranges":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_security_rule":{"schema":{"access":{"type":"TypeString","required":true},"description":{"type":"TypeString","optional":true},"destination_address_prefix":{"type":"TypeString","optional":true},"destination_address_prefixes":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"destination_application_security_group_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":10},"destination_port_range":{"type":"TypeString","optional":true},"destination_port_ranges":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"direction":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_security_group_name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","required":true},"protocol":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source_address_prefix":{"type":"TypeString","optional":true},"source_address_prefixes":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"source_application_security_group_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":10},"source_port_range":{"type":"TypeString","optional":true},"source_port_ranges":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_watcher":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_watcher_flow_log":{"schema":{"enabled":{"type":"TypeBool","required":true},"location":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_security_group_id":{"type":"TypeString","required":true,"forceNew":true},"network_watcher_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_policy":{"type":"TypeList","required":true,"elem":{"schema":{"days":{"type":"TypeInt","required":true},"enabled":{"type":"TypeBool","required":true}}},"maxItems":1},"storage_account_id":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"traffic_analytics":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","required":true},"interval_in_minutes":{"type":"TypeInt","optional":true,"default":60},"workspace_id":{"type":"TypeString","required":true},"workspace_region":{"type":"TypeString","required":true},"workspace_resource_id":{"type":"TypeString","required":true}}},"maxItems":1},"version":{"type":"TypeInt","optional":true,"default":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_new_relic_monitor":{"schema":{"account_creation_source":{"type":"TypeString","optional":true,"default":"LIFTR","forceNew":true},"account_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"ingestion_key":{"type":"TypeString","optional":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"org_creation_source":{"type":"TypeString","optional":true,"default":"LIFTR","forceNew":true},"organization_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"plan":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"billing_cycle":{"type":"TypeString","optional":true,"default":"MONTHLY","forceNew":true},"effective_date":{"type":"TypeString","required":true,"forceNew":true},"plan_id":{"type":"TypeString","optional":true,"default":"newrelic-pay-as-you-go-free-live","forceNew":true},"usage_type":{"type":"TypeString","optional":true,"default":"PAYG","forceNew":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"user":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"email":{"type":"TypeString","required":true,"forceNew":true},"first_name":{"type":"TypeString","required":true,"forceNew":true},"last_name":{"type":"TypeString","required":true,"forceNew":true},"phone_number":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"user_id":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_new_relic_tag_rule":{"schema":{"activity_log_enabled":{"type":"TypeBool","optional":true,"default":false},"azure_active_directory_log_enabled":{"type":"TypeBool","optional":true,"default":false},"log_tag_filter":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"metric_enabled":{"type":"TypeBool","optional":true,"default":false},"metric_tag_filter":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"monitor_id":{"type":"TypeString","required":true,"forceNew":true},"subscription_log_enabled":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_nginx_certificate":{"schema":{"certificate_virtual_path":{"type":"TypeString","required":true},"key_vault_secret_id":{"type":"TypeString","required":true},"key_virtual_path":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"nginx_deployment_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":10,"update":30}},"azurerm_nginx_configuration":{"schema":{"config_file":{"type":"TypeSet","optional":true,"elem":{"schema":{"content":{"type":"TypeString","required":true},"virtual_path":{"type":"TypeString","required":true}}}},"nginx_deployment_id":{"type":"TypeString","required":true,"forceNew":true},"package_data":{"type":"TypeString","optional":true},"protected_file":{"type":"TypeSet","optional":true,"elem":{"schema":{"content":{"type":"TypeString","required":true},"virtual_path":{"type":"TypeString","required":true}}}},"root_file":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":10,"update":10}},"azurerm_nginx_deployment":{"schema":{"auto_scale_profile":{"type":"TypeList","optional":true,"elem":{"schema":{"max_capacity":{"type":"TypeInt","required":true},"min_capacity":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true}}}},"automatic_upgrade_channel":{"type":"TypeString","optional":true,"default":"stable"},"capacity":{"type":"TypeInt","optional":true},"diagnose_support_enabled":{"type":"TypeBool","optional":true},"email":{"type":"TypeString","optional":true},"frontend_private":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"allocation_method":{"type":"TypeString","required":true,"forceNew":true},"ip_address":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}}}},"frontend_public":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"ip_address":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"ip_address":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"logging_storage_account":{"type":"TypeList","optional":true,"elem":{"schema":{"container_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true}}}},"managed_resource_group":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_interface":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"subnet_id":{"type":"TypeString","required":true,"forceNew":true}}}},"nginx_version":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_notification_hub":{"schema":{"apns_credential":{"type":"TypeList","optional":true,"elem":{"schema":{"application_mode":{"type":"TypeString","required":true},"bundle_id":{"type":"TypeString","required":true},"key_id":{"type":"TypeString","required":true},"team_id":{"type":"TypeString","required":true},"token":{"type":"TypeString","required":true}}},"maxItems":1},"gcm_credential":{"type":"TypeList","optional":true,"elem":{"schema":{"api_key":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_notification_hub_authorization_rule":{"schema":{"listen":{"type":"TypeBool","optional":true,"default":false},"manage":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_name":{"type":"TypeString","required":true,"forceNew":true},"notification_hub_name":{"type":"TypeString","required":true,"forceNew":true},"primary_access_key":{"type":"TypeString","computed":true},"primary_connection_string":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_access_key":{"type":"TypeString","computed":true},"secondary_connection_string":{"type":"TypeString","computed":true},"send":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_notification_hub_namespace":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_type":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"servicebus_endpoint":{"type":"TypeString","computed":true},"sku_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_orbital_contact":{"schema":{"contact_profile_id":{"type":"TypeString","required":true,"forceNew":true},"ground_station_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"reservation_end_time":{"type":"TypeString","required":true,"forceNew":true},"reservation_start_time":{"type":"TypeString","required":true,"forceNew":true},"spacecraft_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_orbital_contact_profile":{"schema":{"auto_tracking":{"type":"TypeString","required":true},"event_hub_uri":{"type":"TypeString","optional":true},"links":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"channels":{"type":"TypeList","required":true,"elem":{"schema":{"bandwidth_mhz":{"type":"TypeFloat","required":true},"center_frequency_mhz":{"type":"TypeFloat","required":true},"demodulation_configuration":{"type":"TypeString","optional":true},"end_point":{"type":"TypeSet","required":true,"elem":{"schema":{"end_point_name":{"type":"TypeString","required":true},"ip_address":{"type":"TypeString","optional":true},"port":{"type":"TypeString","required":true},"protocol":{"type":"TypeString","required":true}}}},"modulation_configuration":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true}}},"minItems":1},"direction":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"polarization":{"type":"TypeString","required":true}}},"minItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"minimum_elevation_degrees":{"type":"TypeFloat","optional":true},"minimum_variable_contact_duration":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_configuration_subnet_id":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_orbital_spacecraft":{"schema":{"links":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"bandwidth_mhz":{"type":"TypeFloat","required":true},"center_frequency_mhz":{"type":"TypeFloat","required":true},"direction":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"polarization":{"type":"TypeString","required":true}}},"minItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"norad_id":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"title_line":{"type":"TypeString","required":true},"two_line_elements":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"maxItems":2,"minItems":2}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_orchestrated_virtual_machine_scale_set":{"schema":{"additional_capabilities":{"type":"TypeList","optional":true,"elem":{"schema":{"ultra_ssd_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}}},"maxItems":1},"automatic_instance_repair":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"computed":true},"enabled":{"type":"TypeBool","required":true},"grace_period":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"boot_diagnostics":{"type":"TypeList","optional":true,"elem":{"schema":{"storage_account_uri":{"type":"TypeString","optional":true}}},"maxItems":1},"capacity_reservation_group_id":{"type":"TypeString","optional":true,"forceNew":true},"data_disk":{"type":"TypeList","optional":true,"elem":{"schema":{"caching":{"type":"TypeString","required":true},"create_option":{"type":"TypeString","optional":true,"default":"Empty"},"disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"disk_size_gb":{"type":"TypeInt","optional":true,"computed":true},"lun":{"type":"TypeInt","optional":true,"computed":true},"storage_account_type":{"type":"TypeString","required":true},"ultra_ssd_disk_iops_read_write":{"type":"TypeInt","optional":true,"computed":true},"ultra_ssd_disk_mbps_read_write":{"type":"TypeInt","optional":true,"computed":true},"write_accelerator_enabled":{"type":"TypeBool","optional":true,"default":false}}}},"encryption_at_host_enabled":{"type":"TypeBool","optional":true},"eviction_policy":{"type":"TypeString","optional":true,"forceNew":true},"extension":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"auto_upgrade_minor_version_enabled":{"type":"TypeBool","optional":true,"default":true},"extensions_to_provision_after_vm_creation":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"failure_suppression_enabled":{"type":"TypeBool","optional":true,"default":false},"force_extension_execution_on_change":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"protected_settings":{"type":"TypeString","optional":true},"protected_settings_from_key_vault":{"type":"TypeList","optional":true,"elem":{"schema":{"secret_url":{"type":"TypeString","required":true},"source_vault_id":{"type":"TypeString","required":true}}},"maxItems":1},"publisher":{"type":"TypeString","required":true},"settings":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"type_handler_version":{"type":"TypeString","required":true}}}},"extension_operations_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"extensions_time_budget":{"type":"TypeString","optional":true,"default":"PT1H30M"},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true}}},"maxItems":1},"instances":{"type":"TypeInt","optional":true,"computed":true},"license_type":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"max_bid_price":{"type":"TypeFloat","optional":true,"default":-1},"name":{"type":"TypeString","required":true,"forceNew":true},"network_interface":{"type":"TypeList","optional":true,"elem":{"schema":{"dns_servers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"enable_accelerated_networking":{"type":"TypeBool","optional":true,"default":false},"enable_ip_forwarding":{"type":"TypeBool","optional":true,"default":false},"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"application_gateway_backend_address_pool_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"application_security_group_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":20},"load_balancer_backend_address_pool_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"primary":{"type":"TypeBool","optional":true,"default":false},"public_ip_address":{"type":"TypeList","optional":true,"elem":{"schema":{"domain_name_label":{"type":"TypeString","optional":true},"idle_timeout_in_minutes":{"type":"TypeInt","optional":true,"computed":true},"ip_tag":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"tag":{"type":"TypeString","required":true,"forceNew":true},"type":{"type":"TypeString","required":true,"forceNew":true}}}},"name":{"type":"TypeString","required":true},"public_ip_prefix_id":{"type":"TypeString","optional":true,"forceNew":true},"sku_name":{"type":"TypeString","optional":true,"forceNew":true},"version":{"type":"TypeString","optional":true,"default":"IPv4","forceNew":true}}}},"subnet_id":{"type":"TypeString","optional":true},"version":{"type":"TypeString","optional":true,"default":"IPv4"}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"network_security_group_id":{"type":"TypeString","optional":true},"primary":{"type":"TypeBool","optional":true,"default":false}}}},"os_disk":{"type":"TypeList","optional":true,"elem":{"schema":{"caching":{"type":"TypeString","required":true},"diff_disk_settings":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"option":{"type":"TypeString","required":true,"forceNew":true},"placement":{"type":"TypeString","optional":true,"default":"CacheDisk","forceNew":true}}},"maxItems":1},"disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"disk_size_gb":{"type":"TypeInt","optional":true,"computed":true},"storage_account_type":{"type":"TypeString","required":true,"forceNew":true},"write_accelerator_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"os_profile":{"type":"TypeList","optional":true,"elem":{"schema":{"custom_data":{"type":"TypeString","optional":true},"linux_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"admin_password":{"type":"TypeString","optional":true,"forceNew":true},"admin_ssh_key":{"type":"TypeSet","optional":true,"elem":{"schema":{"public_key":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true}}}},"admin_username":{"type":"TypeString","required":true,"forceNew":true},"computer_name_prefix":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"disable_password_authentication":{"type":"TypeBool","optional":true,"default":true},"patch_assessment_mode":{"type":"TypeString","optional":true,"default":"ImageDefault"},"patch_mode":{"type":"TypeString","optional":true,"default":"ImageDefault"},"provision_vm_agent":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"secret":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeSet","required":true,"elem":{"schema":{"url":{"type":"TypeString","required":true}}},"minItems":1},"key_vault_id":{"type":"TypeString","required":true}}}}}},"maxItems":1},"windows_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"additional_unattend_content":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"content":{"type":"TypeString","required":true,"forceNew":true},"setting":{"type":"TypeString","required":true,"forceNew":true}}}},"admin_password":{"type":"TypeString","required":true,"forceNew":true},"admin_username":{"type":"TypeString","required":true,"forceNew":true},"computer_name_prefix":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"enable_automatic_updates":{"type":"TypeBool","optional":true,"default":true},"hotpatching_enabled":{"type":"TypeBool","optional":true,"default":false},"patch_assessment_mode":{"type":"TypeString","optional":true,"default":"ImageDefault"},"patch_mode":{"type":"TypeString","optional":true,"default":"AutomaticByOS"},"provision_vm_agent":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"secret":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeSet","required":true,"elem":{"schema":{"store":{"type":"TypeString","required":true},"url":{"type":"TypeString","required":true}}},"minItems":1},"key_vault_id":{"type":"TypeString","required":true}}}},"timezone":{"type":"TypeString","optional":true},"winrm_listener":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"certificate_url":{"type":"TypeString","optional":true,"forceNew":true},"protocol":{"type":"TypeString","required":true,"forceNew":true}}}}}},"maxItems":1}}},"maxItems":1},"plan":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"product":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"platform_fault_domain_count":{"type":"TypeInt","required":true,"forceNew":true},"priority":{"type":"TypeString","optional":true,"default":"Regular","forceNew":true},"priority_mix":{"type":"TypeList","optional":true,"elem":{"schema":{"base_regular_count":{"type":"TypeInt","optional":true,"default":0},"regular_percentage_above_base":{"type":"TypeInt","optional":true,"default":0}}},"maxItems":1},"proximity_placement_group_id":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"single_placement_group":{"type":"TypeBool","optional":true,"computed":true},"sku_name":{"type":"TypeString","optional":true},"source_image_id":{"type":"TypeString","optional":true},"source_image_reference":{"type":"TypeList","optional":true,"elem":{"schema":{"offer":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true},"version":{"type":"TypeString","required":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"termination_notification":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","required":true},"timeout":{"type":"TypeString","optional":true,"default":"PT5M"}}},"maxItems":1},"unique_id":{"type":"TypeString","computed":true},"user_data_base64":{"type":"TypeString","optional":true},"zone_balance":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_palo_alto_local_rulestack":{"schema":{"anti_spyware_profile":{"type":"TypeString","optional":true},"anti_virus_profile":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"dns_subscription":{"type":"TypeString","optional":true},"file_blocking_profile":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"url_filtering_profile":{"type":"TypeString","optional":true},"vulnerability_profile":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_palo_alto_local_rulestack_certificate":{"schema":{"audit_comment":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"key_vault_certificate_id":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true},"rulestack_id":{"type":"TypeString","required":true,"forceNew":true},"self_signed":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_palo_alto_local_rulestack_fqdn_list":{"schema":{"audit_comment":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"fully_qualified_domain_names":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"name":{"type":"TypeString","required":true},"rulestack_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_palo_alto_local_rulestack_outbound_trust_certificate_association":{"schema":{"certificate_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_palo_alto_local_rulestack_outbound_untrust_certificate_association":{"schema":{"certificate_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_palo_alto_local_rulestack_prefix_list":{"schema":{"audit_comment":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"prefix_list":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"rulestack_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_palo_alto_local_rulestack_rule":{"schema":{"action":{"type":"TypeString","required":true},"applications":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"audit_comment":{"type":"TypeString","optional":true},"category":{"type":"TypeList","optional":true,"elem":{"schema":{"custom_urls":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"feeds":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1}}},"maxItems":1,"minItems":1},"decryption_rule_type":{"type":"TypeString","optional":true,"default":"None"},"description":{"type":"TypeString","optional":true},"destination":{"type":"TypeList","required":true,"elem":{"schema":{"cidrs":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"countries":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"feeds":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"local_rulestack_fqdn_list_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"local_rulestack_prefix_list_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1,"minItems":1},"enabled":{"type":"TypeBool","optional":true,"default":true},"inspection_certificate_id":{"type":"TypeString","optional":true},"logging_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true},"negate_destination":{"type":"TypeBool","optional":true,"default":false},"negate_source":{"type":"TypeBool","optional":true,"default":false},"priority":{"type":"TypeInt","required":true,"forceNew":true},"protocol":{"type":"TypeString","optional":true},"protocol_ports":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"rulestack_id":{"type":"TypeString","required":true,"forceNew":true},"source":{"type":"TypeList","required":true,"elem":{"schema":{"cidrs":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"countries":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"feeds":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"local_rulestack_prefix_list_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1,"minItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_palo_alto_next_generation_firewall_virtual_hub_local_rulestack":{"schema":{"destination_nat":{"type":"TypeList","optional":true,"elem":{"schema":{"backend_config":{"type":"TypeList","optional":true,"elem":{"schema":{"port":{"type":"TypeInt","required":true},"public_ip_address":{"type":"TypeString","required":true}}},"maxItems":1},"frontend_config":{"type":"TypeList","optional":true,"elem":{"schema":{"port":{"type":"TypeInt","required":true},"public_ip_address_id":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true},"protocol":{"type":"TypeString","required":true}}}},"dns_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_dns_servers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"dns_servers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":2},"use_azure_dns":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network_profile":{"type":"TypeList","required":true,"elem":{"schema":{"egress_nat_ip_address_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"egress_nat_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ip_of_trust_for_user_defined_routes":{"type":"TypeString","computed":true},"network_virtual_appliance_id":{"type":"TypeString","required":true,"forceNew":true},"public_ip_address_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"trusted_address_ranges":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"trusted_subnet_id":{"type":"TypeString","computed":true},"untrusted_subnet_id":{"type":"TypeString","computed":true},"virtual_hub_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rulestack_id":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":120,"update":180}},"azurerm_palo_alto_next_generation_firewall_virtual_hub_panorama":{"schema":{"destination_nat":{"type":"TypeList","optional":true,"elem":{"schema":{"backend_config":{"type":"TypeList","optional":true,"elem":{"schema":{"port":{"type":"TypeInt","required":true},"public_ip_address":{"type":"TypeString","required":true}}},"maxItems":1},"frontend_config":{"type":"TypeList","optional":true,"elem":{"schema":{"port":{"type":"TypeInt","required":true},"public_ip_address_id":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true},"protocol":{"type":"TypeString","required":true}}}},"dns_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_dns_servers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"dns_servers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":2},"use_azure_dns":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_profile":{"type":"TypeList","required":true,"elem":{"schema":{"egress_nat_ip_address_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"egress_nat_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ip_of_trust_for_user_defined_routes":{"type":"TypeString","computed":true},"network_virtual_appliance_id":{"type":"TypeString","required":true,"forceNew":true},"public_ip_address_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"trusted_address_ranges":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"trusted_subnet_id":{"type":"TypeString","computed":true},"untrusted_subnet_id":{"type":"TypeString","computed":true},"virtual_hub_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"panorama":{"type":"TypeList","computed":true,"elem":{"schema":{"device_group_name":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"panorama_server_1":{"type":"TypeString","computed":true},"panorama_server_2":{"type":"TypeString","computed":true},"template_name":{"type":"TypeString","computed":true},"virtual_machine_ssh_key":{"type":"TypeString","computed":true}}}},"panorama_base64_config":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":120,"read":5,"delete":120,"update":120}},"azurerm_palo_alto_next_generation_firewall_virtual_network_local_rulestack":{"schema":{"destination_nat":{"type":"TypeList","optional":true,"elem":{"schema":{"backend_config":{"type":"TypeList","optional":true,"elem":{"schema":{"port":{"type":"TypeInt","required":true},"public_ip_address":{"type":"TypeString","required":true}}},"maxItems":1},"frontend_config":{"type":"TypeList","optional":true,"elem":{"schema":{"port":{"type":"TypeInt","required":true},"public_ip_address_id":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true},"protocol":{"type":"TypeString","required":true}}}},"dns_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_dns_servers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"dns_servers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":2},"use_azure_dns":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network_profile":{"type":"TypeList","required":true,"elem":{"schema":{"egress_nat_ip_address_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"egress_nat_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"public_ip_address_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"trusted_address_ranges":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"vnet_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"ip_of_trust_for_user_defined_routes":{"type":"TypeString","computed":true},"trusted_subnet_id":{"type":"TypeString","optional":true},"untrusted_subnet_id":{"type":"TypeString","optional":true},"virtual_network_id":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rulestack_id":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":120,"update":180}},"azurerm_palo_alto_next_generation_firewall_virtual_network_panorama":{"schema":{"destination_nat":{"type":"TypeList","optional":true,"elem":{"schema":{"backend_config":{"type":"TypeList","optional":true,"elem":{"schema":{"port":{"type":"TypeInt","required":true},"public_ip_address":{"type":"TypeString","required":true}}},"maxItems":1},"frontend_config":{"type":"TypeList","optional":true,"elem":{"schema":{"port":{"type":"TypeInt","required":true},"public_ip_address_id":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true},"protocol":{"type":"TypeString","required":true}}}},"dns_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_dns_servers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"dns_servers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":2},"use_azure_dns":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_profile":{"type":"TypeList","required":true,"elem":{"schema":{"egress_nat_ip_address_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"egress_nat_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"public_ip_address_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"trusted_address_ranges":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"vnet_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"ip_of_trust_for_user_defined_routes":{"type":"TypeString","computed":true},"trusted_subnet_id":{"type":"TypeString","optional":true},"untrusted_subnet_id":{"type":"TypeString","optional":true},"virtual_network_id":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"panorama":{"type":"TypeList","computed":true,"elem":{"schema":{"device_group_name":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"panorama_server_1":{"type":"TypeString","computed":true},"panorama_server_2":{"type":"TypeString","computed":true},"template_name":{"type":"TypeString","computed":true},"virtual_machine_ssh_key":{"type":"TypeString","computed":true}}}},"panorama_base64_config":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_palo_alto_virtual_network_appliance":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"virtual_hub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_pim_active_role_assignment":{"schema":{"justification":{"type":"TypeString","optional":true,"description":"The justification for this role assignment","computed":true,"forceNew":true},"principal_id":{"type":"TypeString","required":true,"description":"Object ID of the principal for this role assignment","forceNew":true},"principal_type":{"type":"TypeString","description":"Type of principal to which the role will be assigned","computed":true},"role_definition_id":{"type":"TypeString","required":true,"description":"Role definition ID for this role assignment","forceNew":true},"schedule":{"type":"TypeList","optional":true,"description":"The schedule details for this role assignment","computed":true,"forceNew":true,"elem":{"schema":{"expiration":{"type":"TypeList","optional":true,"elem":{"schema":{"duration_days":{"type":"TypeInt","optional":true,"description":"The duration of the role assignment in days","computed":true,"forceNew":true},"duration_hours":{"type":"TypeInt","optional":true,"description":"The duration of the role assignment in hours","computed":true,"forceNew":true},"end_date_time":{"type":"TypeString","optional":true,"description":"The end date/time of the role assignment","computed":true,"forceNew":true}}},"maxItems":1},"start_date_time":{"type":"TypeString","optional":true,"description":"The start date/time of the role assignment","computed":true,"forceNew":true}}},"maxItems":1},"scope":{"type":"TypeString","required":true,"description":"Scope for this role assignment, should be a valid resource ID","forceNew":true},"ticket":{"type":"TypeList","optional":true,"description":"Ticket details relating to the assignment","computed":true,"forceNew":true,"elem":{"schema":{"number":{"type":"TypeString","optional":true,"description":"User-supplied ticket number to be included with the request","forceNew":true},"system":{"type":"TypeString","optional":true,"description":"User-supplied ticket system name to be included with the request","forceNew":true}}},"maxItems":1}},"timeouts":{"create":10,"read":5,"delete":10}},"azurerm_pim_eligible_role_assignment":{"schema":{"justification":{"type":"TypeString","optional":true,"description":"The justification for this eligible role assignment","computed":true,"forceNew":true},"principal_id":{"type":"TypeString","required":true,"description":"Object ID of the principal for this eligible role assignment","forceNew":true},"principal_type":{"type":"TypeString","description":"Type of principal to which the role will be assigned","computed":true},"role_definition_id":{"type":"TypeString","required":true,"description":"Role definition ID for this eligible role assignment","forceNew":true},"schedule":{"type":"TypeList","optional":true,"description":"The schedule details for this eligible role assignment","computed":true,"forceNew":true,"elem":{"schema":{"expiration":{"type":"TypeList","optional":true,"elem":{"schema":{"duration_days":{"type":"TypeInt","optional":true,"description":"The duration of the eligible role assignment in days","computed":true,"forceNew":true},"duration_hours":{"type":"TypeInt","optional":true,"description":"The duration of the eligible role assignment in hours","computed":true,"forceNew":true},"end_date_time":{"type":"TypeString","optional":true,"description":"The end date/time of the eligible role assignment","computed":true,"forceNew":true}}},"maxItems":1},"start_date_time":{"type":"TypeString","optional":true,"description":"The start date/time","computed":true,"forceNew":true}}},"maxItems":1},"scope":{"type":"TypeString","required":true,"description":"Scope for this eligible role assignment, should be a valid resource ID","forceNew":true},"ticket":{"type":"TypeList","optional":true,"description":"Ticket details relating to the eligible assignment","computed":true,"forceNew":true,"elem":{"schema":{"number":{"type":"TypeString","optional":true,"description":"User-supplied ticket number to be included with the request","forceNew":true},"system":{"type":"TypeString","optional":true,"description":"User-supplied ticket system name to be included with the request","forceNew":true}}},"maxItems":1}},"timeouts":{"create":10,"read":5,"delete":10}},"azurerm_point_to_site_vpn_gateway":{"schema":{"connection_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"internet_security_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"name":{"type":"TypeString","required":true},"route":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"associated_route_table_id":{"type":"TypeString","required":true},"inbound_route_map_id":{"type":"TypeString","optional":true},"outbound_route_map_id":{"type":"TypeString","optional":true},"propagated_route_table":{"type":"TypeList","optional":true,"elem":{"schema":{"ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"labels":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}},"maxItems":1},"vpn_client_address_pool":{"type":"TypeList","required":true,"elem":{"schema":{"address_prefixes":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}}},"dns_servers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"routing_preference_internet_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"scale_unit":{"type":"TypeInt","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_hub_id":{"type":"TypeString","required":true,"forceNew":true},"vpn_server_configuration_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_policy_definition":{"schema":{"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"management_group_id":{"type":"TypeString","optional":true,"forceNew":true},"metadata":{"type":"TypeString","optional":true,"computed":true},"mode":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeString","optional":true},"policy_rule":{"type":"TypeString","optional":true},"policy_type":{"type":"TypeString","required":true,"forceNew":true},"role_definition_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_policy_set_definition":{"schema":{"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"management_group_id":{"type":"TypeString","optional":true,"forceNew":true},"metadata":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeString","optional":true},"policy_definition_group":{"type":"TypeSet","optional":true,"elem":{"schema":{"additional_metadata_resource_id":{"type":"TypeString","optional":true},"category":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true}}}},"policy_definition_reference":{"type":"TypeList","required":true,"elem":{"schema":{"parameter_values":{"type":"TypeString","optional":true},"policy_definition_id":{"type":"TypeString","required":true},"policy_group_names":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"reference_id":{"type":"TypeString","optional":true,"computed":true}}}},"policy_type":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_policy_virtual_machine_configuration_assignment":{"schema":{"configuration":{"type":"TypeList","required":true,"elem":{"schema":{"assignment_type":{"type":"TypeString","optional":true},"content_hash":{"type":"TypeString","optional":true,"computed":true},"content_uri":{"type":"TypeString","optional":true,"computed":true},"parameter":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"version":{"type":"TypeString","optional":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_portal_dashboard":{"schema":{"dashboard_properties":{"type":"TypeString","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_portal_tenant_configuration":{"schema":{"private_markdown_storage_enforced":{"type":"TypeBool","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_postgresql_active_directory_administrator":{"schema":{"login":{"type":"TypeString","required":true},"object_id":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_postgresql_configuration":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_postgresql_database":{"schema":{"charset":{"type":"TypeString","required":true,"forceNew":true},"collation":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60}},"azurerm_postgresql_firewall_rule":{"schema":{"end_ip_address":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_name":{"type":"TypeString","required":true,"forceNew":true},"start_ip_address":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_postgresql_flexible_server":{"schema":{"administrator_login":{"type":"TypeString","optional":true,"computed":true},"administrator_password":{"type":"TypeString","optional":true},"authentication":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"active_directory_auth_enabled":{"type":"TypeBool","optional":true,"default":false},"password_auth_enabled":{"type":"TypeBool","optional":true,"default":true},"tenant_id":{"type":"TypeString","optional":true}}},"maxItems":1},"auto_grow_enabled":{"type":"TypeBool","optional":true,"default":false},"backup_retention_days":{"type":"TypeInt","optional":true,"computed":true},"create_mode":{"type":"TypeString","optional":true},"customer_managed_key":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"geo_backup_key_vault_key_id":{"type":"TypeString","optional":true},"geo_backup_user_assigned_identity_id":{"type":"TypeString","optional":true},"key_vault_key_id":{"type":"TypeString","required":true},"primary_user_assigned_identity_id":{"type":"TypeString","optional":true}}},"maxItems":1},"delegated_subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"fqdn":{"type":"TypeString","computed":true},"geo_redundant_backup_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"high_availability":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"standby_availability_zone":{"type":"TypeString","optional":true}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"maintenance_window":{"type":"TypeList","optional":true,"elem":{"schema":{"day_of_week":{"type":"TypeInt","optional":true,"default":0},"start_hour":{"type":"TypeInt","optional":true,"default":0},"start_minute":{"type":"TypeInt","optional":true,"default":0}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"point_in_time_restore_time_in_utc":{"type":"TypeString","optional":true,"forceNew":true},"private_dns_zone_id":{"type":"TypeString","optional":true,"computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"replication_role":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","optional":true,"computed":true},"source_server_id":{"type":"TypeString","optional":true,"forceNew":true},"storage_mb":{"type":"TypeInt","optional":true,"computed":true},"storage_tier":{"type":"TypeString","optional":true,"computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"version":{"type":"TypeString","optional":true,"computed":true},"zone":{"type":"TypeString","optional":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_postgresql_flexible_server_active_directory_administrator":{"schema":{"object_id":{"type":"TypeString","required":true,"forceNew":true},"principal_name":{"type":"TypeString","required":true,"forceNew":true},"principal_type":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_postgresql_flexible_server_configuration":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"server_id":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_postgresql_flexible_server_database":{"schema":{"charset":{"type":"TypeString","optional":true,"default":"UTF8","forceNew":true},"collation":{"type":"TypeString","optional":true,"default":"en_US.utf8","forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"server_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_postgresql_flexible_server_firewall_rule":{"schema":{"end_ip_address":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"server_id":{"type":"TypeString","required":true,"forceNew":true},"start_ip_address":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_postgresql_flexible_server_virtual_endpoint":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name of the Virtual Endpoint","forceNew":true},"replica_server_id":{"type":"TypeString","required":true,"description":"The Resource ID of the *Replica* Postgres Flexible Server this should be associated with"},"source_server_id":{"type":"TypeString","required":true,"description":"The Resource ID of the *Source* Postgres Flexible Server this should be associated with","forceNew":true},"type":{"type":"TypeString","required":true,"description":"The type of Virtual Endpoint","forceNew":true}},"timeouts":{"create":10,"read":5,"delete":5,"update":5}},"azurerm_postgresql_server":{"schema":{"administrator_login":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"administrator_login_password":{"type":"TypeString","optional":true},"auto_grow_enabled":{"type":"TypeBool","optional":true,"default":true},"backup_retention_days":{"type":"TypeInt","optional":true,"computed":true},"create_mode":{"type":"TypeString","optional":true,"default":"Default"},"creation_source_server_id":{"type":"TypeString","optional":true},"fqdn":{"type":"TypeString","computed":true},"geo_redundant_backup_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"infrastructure_encryption_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"restore_point_in_time":{"type":"TypeString","optional":true},"sku_name":{"type":"TypeString","required":true},"ssl_enforcement_enabled":{"type":"TypeBool","required":true},"ssl_minimal_tls_version_enforced":{"type":"TypeString","optional":true,"default":"TLS1_2"},"storage_mb":{"type":"TypeInt","optional":true,"computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"threat_detection_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"disabled_alerts":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"email_account_admins":{"type":"TypeBool","optional":true},"email_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true},"retention_days":{"type":"TypeInt","optional":true},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_endpoint":{"type":"TypeString","optional":true}}},"maxItems":1},"version":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_postgresql_server_key":{"schema":{"key_vault_key_id":{"type":"TypeString","required":true},"server_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_postgresql_virtual_network_rule":{"schema":{"ignore_missing_vnet_service_endpoint":{"type":"TypeBool","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_name":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_powerbi_embedded":{"schema":{"administrators":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"mode":{"type":"TypeString","optional":true,"default":"Gen1","forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_a_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"records":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"maxItems":20},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_aaaa_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"records":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_cname_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"record":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_mx_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","optional":true,"default":"@","forceNew":true},"record":{"type":"TypeSet","required":true,"elem":{"schema":{"exchange":{"type":"TypeString","required":true},"preference":{"type":"TypeInt","required":true}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_ptr_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"records":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_resolver":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_network_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_resolver_dns_forwarding_ruleset":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_dns_resolver_outbound_endpoint_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_resolver_forwarding_rule":{"schema":{"dns_forwarding_ruleset_id":{"type":"TypeString","required":true,"forceNew":true},"domain_name":{"type":"TypeString","required":true,"forceNew":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"metadata":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"target_dns_servers":{"type":"TypeList","required":true,"elem":{"schema":{"ip_address":{"type":"TypeString","required":true},"port":{"type":"TypeInt","optional":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_resolver_inbound_endpoint":{"schema":{"ip_configurations":{"type":"TypeList","required":true,"elem":{"schema":{"private_ip_address":{"type":"TypeString","optional":true,"computed":true},"private_ip_allocation_method":{"type":"TypeString","optional":true,"default":"Dynamic"},"subnet_id":{"type":"TypeString","required":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_dns_resolver_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_resolver_outbound_endpoint":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_dns_resolver_id":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_resolver_virtual_network_link":{"schema":{"dns_forwarding_ruleset_id":{"type":"TypeString","required":true,"forceNew":true},"metadata":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_srv_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"record":{"type":"TypeSet","required":true,"elem":{"schema":{"port":{"type":"TypeInt","required":true},"priority":{"type":"TypeInt","required":true},"target":{"type":"TypeString","required":true},"weight":{"type":"TypeInt","required":true}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_txt_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"record":{"type":"TypeSet","required":true,"elem":{"schema":{"value":{"type":"TypeString","required":true}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_zone":{"schema":{"max_number_of_record_sets":{"type":"TypeInt","computed":true},"max_number_of_virtual_network_links":{"type":"TypeInt","computed":true},"max_number_of_virtual_network_links_with_registration":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"number_of_record_sets":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"soa_record":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"schema":{"email":{"type":"TypeString","required":true},"expire_time":{"type":"TypeInt","optional":true,"default":2419200},"fqdn":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","computed":true},"minimum_ttl":{"type":"TypeInt","optional":true,"default":10},"refresh_time":{"type":"TypeInt","optional":true,"default":3600},"retry_time":{"type":"TypeInt","optional":true,"default":300},"serial_number":{"type":"TypeInt","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","optional":true,"default":3600}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_zone_virtual_network_link":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"private_dns_zone_name":{"type":"TypeString","required":true,"forceNew":true},"registration_enabled":{"type":"TypeBool","optional":true,"default":false},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_network_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_endpoint":{"schema":{"custom_dns_configs":{"type":"TypeList","computed":true,"elem":{"schema":{"fqdn":{"type":"TypeString","computed":true},"ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"custom_network_interface_name":{"type":"TypeString","optional":true,"forceNew":true},"ip_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"member_name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_ip_address":{"type":"TypeString","required":true,"forceNew":true},"subresource_name":{"type":"TypeString","optional":true,"forceNew":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_interface":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"private_dns_zone_configs":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"private_dns_zone_id":{"type":"TypeString","computed":true},"record_sets":{"type":"TypeList","computed":true,"elem":{"schema":{"fqdn":{"type":"TypeString","computed":true},"ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"ttl":{"type":"TypeInt","computed":true},"type":{"type":"TypeString","computed":true}}}}}}},"private_dns_zone_group":{"type":"TypeList","optional":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"private_dns_zone_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"private_service_connection":{"type":"TypeList","required":true,"elem":{"schema":{"is_manual_connection":{"type":"TypeBool","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_connection_resource_alias":{"type":"TypeString","optional":true,"forceNew":true},"private_connection_resource_id":{"type":"TypeString","optional":true,"forceNew":true},"private_ip_address":{"type":"TypeString","computed":true},"request_message":{"type":"TypeString","optional":true},"subresource_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_private_endpoint_application_security_group_association":{"schema":{"application_security_group_id":{"type":"TypeString","required":true,"forceNew":true},"private_endpoint_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_private_link_service":{"schema":{"alias":{"type":"TypeString","computed":true},"auto_approval_subscription_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"enable_proxy_protocol":{"type":"TypeBool","optional":true},"fqdns":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"load_balancer_frontend_ip_configuration_ids":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"nat_ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"primary":{"type":"TypeBool","required":true,"forceNew":true},"private_ip_address":{"type":"TypeString","optional":true},"private_ip_address_version":{"type":"TypeString","optional":true,"default":"IPv4"},"subnet_id":{"type":"TypeString","required":true}}},"maxItems":8},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"visibility_subscription_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_proximity_placement_group":{"schema":{"allowed_vm_sizes":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zone":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_public_ip":{"schema":{"allocation_method":{"type":"TypeString","required":true},"ddos_protection_mode":{"type":"TypeString","optional":true,"default":"VirtualNetworkInherited"},"ddos_protection_plan_id":{"type":"TypeString","optional":true},"domain_name_label":{"type":"TypeString","optional":true},"edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"fqdn":{"type":"TypeString","computed":true},"idle_timeout_in_minutes":{"type":"TypeInt","optional":true,"default":4},"ip_address":{"type":"TypeString","computed":true},"ip_tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"ip_version":{"type":"TypeString","optional":true,"default":"IPv4","forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_ip_prefix_id":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"reverse_fqdn":{"type":"TypeString","optional":true},"sku":{"type":"TypeString","optional":true,"default":"Standard","forceNew":true},"sku_tier":{"type":"TypeString","optional":true,"default":"Regional","forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_public_ip_prefix":{"schema":{"ip_prefix":{"type":"TypeString","computed":true},"ip_version":{"type":"TypeString","optional":true,"default":"IPv4","forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"prefix_length":{"type":"TypeInt","optional":true,"default":28,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","optional":true,"default":"Standard","forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_purview_account":{"schema":{"atlas_kafka_endpoint_primary_connection_string":{"type":"TypeString","computed":true},"atlas_kafka_endpoint_secondary_connection_string":{"type":"TypeString","computed":true},"catalog_endpoint":{"type":"TypeString","computed":true},"guardian_endpoint":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","required":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_resource_group_name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"managed_resources":{"type":"TypeList","computed":true,"elem":{"schema":{"event_hub_namespace_id":{"type":"TypeString","computed":true},"resource_group_id":{"type":"TypeString","computed":true},"storage_account_id":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scan_endpoint":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_recovery_services_vault":{"schema":{"classic_vmware_replication_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"cross_region_restore_enabled":{"type":"TypeBool","optional":true,"default":false},"encryption":{"type":"TypeList","optional":true,"elem":{"schema":{"infrastructure_encryption_enabled":{"type":"TypeBool","required":true},"key_id":{"type":"TypeString","required":true},"use_system_assigned_identity":{"type":"TypeBool","optional":true,"default":true},"user_assigned_identity_id":{"type":"TypeString","optional":true}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"immutability":{"type":"TypeString","optional":true,"computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"monitoring":{"type":"TypeList","optional":true,"elem":{"schema":{"alerts_for_all_job_failures_enabled":{"type":"TypeBool","optional":true,"default":true},"alerts_for_critical_operation_failures_enabled":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true},"soft_delete_enabled":{"type":"TypeBool","optional":true,"default":true},"storage_mode_type":{"type":"TypeString","optional":true,"default":"GeoRedundant"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":120,"read":5,"delete":30,"update":60}},"azurerm_recovery_services_vault_resource_guard_association":{"schema":{"resource_guard_id":{"type":"TypeString","required":true,"forceNew":true},"vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_redhat_openshift_cluster":{"schema":{"api_server_profile":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"ip_address":{"type":"TypeString","computed":true},"url":{"type":"TypeString","computed":true},"visibility":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"cluster_profile":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"domain":{"type":"TypeString","required":true,"forceNew":true},"fips_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"managed_resource_group_name":{"type":"TypeString","optional":true,"forceNew":true},"pull_secret":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_id":{"type":"TypeString","computed":true},"version":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"console_url":{"type":"TypeString","computed":true},"ingress_profile":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"ip_address":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"visibility":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"main_profile":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"encryption_at_host_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network_profile":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"outbound_type":{"type":"TypeString","optional":true,"default":"Loadbalancer","forceNew":true},"pod_cidr":{"type":"TypeString","required":true,"forceNew":true},"preconfigured_network_security_group_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"service_cidr":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_principal":{"type":"TypeList","required":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"worker_profile":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"disk_size_gb":{"type":"TypeInt","required":true,"forceNew":true},"encryption_at_host_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"node_count":{"type":"TypeInt","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_redis_cache":{"schema":{"capacity":{"type":"TypeInt","required":true},"family":{"type":"TypeString","required":true},"hostname":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"name":{"type":"TypeString","required":true,"forceNew":true},"non_ssl_port_enabled":{"type":"TypeBool","optional":true,"default":false},"patch_schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"day_of_week":{"type":"TypeString","required":true},"maintenance_window":{"type":"TypeString","optional":true,"default":"PT5H"},"start_hour_utc":{"type":"TypeInt","optional":true}}}},"port":{"type":"TypeInt","computed":true},"primary_access_key":{"type":"TypeString","computed":true},"primary_connection_string":{"type":"TypeString","computed":true},"private_static_ip_address":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"redis_configuration":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"active_directory_authentication_enabled":{"type":"TypeBool","optional":true},"aof_backup_enabled":{"type":"TypeBool","optional":true},"aof_storage_connection_string_0":{"type":"TypeString","optional":true},"aof_storage_connection_string_1":{"type":"TypeString","optional":true},"authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"data_persistence_authentication_method":{"type":"TypeString","optional":true,"default":"SAS"},"maxclients":{"type":"TypeInt","computed":true},"maxfragmentationmemory_reserved":{"type":"TypeInt","optional":true,"computed":true},"maxmemory_delta":{"type":"TypeInt","optional":true,"computed":true},"maxmemory_policy":{"type":"TypeString","optional":true,"default":"volatile-lru"},"maxmemory_reserved":{"type":"TypeInt","optional":true,"computed":true},"notify_keyspace_events":{"type":"TypeString","optional":true},"rdb_backup_enabled":{"type":"TypeBool","optional":true},"rdb_backup_frequency":{"type":"TypeInt","optional":true},"rdb_backup_max_snapshot_count":{"type":"TypeInt","optional":true},"rdb_storage_connection_string":{"type":"TypeString","optional":true},"storage_account_subscription_id":{"type":"TypeString","optional":true}}},"maxItems":1},"redis_version":{"type":"TypeString","optional":true,"default":6},"replicas_per_master":{"type":"TypeInt","optional":true,"computed":true},"replicas_per_primary":{"type":"TypeInt","optional":true,"computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_access_key":{"type":"TypeString","computed":true},"secondary_connection_string":{"type":"TypeString","computed":true},"shard_count":{"type":"TypeInt","optional":true},"sku_name":{"type":"TypeString","required":true},"ssl_port":{"type":"TypeInt","computed":true},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tenant_settings":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_redis_cache_access_policy":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"permissions":{"type":"TypeString","required":true},"redis_cache_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":5,"read":5,"delete":5,"update":5}},"azurerm_redis_cache_access_policy_assignment":{"schema":{"access_policy_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"object_id":{"type":"TypeString","required":true,"forceNew":true},"object_id_alias":{"type":"TypeString","required":true,"forceNew":true},"redis_cache_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":5,"read":5,"delete":5}},"azurerm_redis_enterprise_cluster":{"schema":{"hostname":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2","forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_redis_enterprise_database":{"schema":{"client_protocol":{"type":"TypeString","optional":true,"default":"Encrypted","forceNew":true},"cluster_id":{"type":"TypeString","required":true,"forceNew":true},"clustering_policy":{"type":"TypeString","optional":true,"default":"OSSCluster","forceNew":true},"eviction_policy":{"type":"TypeString","optional":true,"default":"VolatileLRU","forceNew":true},"linked_database_group_nickname":{"type":"TypeString","optional":true,"forceNew":true},"linked_database_id":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":5},"module":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"args":{"type":"TypeString","optional":true,"default":"","forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","computed":true}}},"maxItems":4},"name":{"type":"TypeString","optional":true,"default":"default","forceNew":true},"port":{"type":"TypeInt","optional":true,"default":10000,"forceNew":true},"primary_access_key":{"type":"TypeString","computed":true},"secondary_access_key":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_redis_firewall_rule":{"schema":{"end_ip":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"redis_cache_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"start_ip":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_redis_linked_server":{"schema":{"geo_replicated_primary_host_name":{"type":"TypeString","computed":true},"linked_redis_cache_id":{"type":"TypeString","required":true,"forceNew":true},"linked_redis_cache_location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_role":{"type":"TypeString","required":true,"forceNew":true},"target_redis_cache_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60}},"azurerm_relay_hybrid_connection":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"relay_namespace_name":{"type":"TypeString","required":true,"forceNew":true},"requires_client_authorization":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"user_metadata":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_relay_hybrid_connection_authorization_rule":{"schema":{"hybrid_connection_name":{"type":"TypeString","required":true,"forceNew":true},"listen":{"type":"TypeBool","optional":true,"default":false},"manage":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_name":{"type":"TypeString","required":true,"forceNew":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"send":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_relay_namespace":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"metric_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"sku_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":60,"update":30}},"azurerm_relay_namespace_authorization_rule":{"schema":{"listen":{"type":"TypeBool","optional":true,"default":false},"manage":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_name":{"type":"TypeString","required":true,"forceNew":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"send":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_resource_deployment_script_azure_cli":{"schema":{"cleanup_preference":{"type":"TypeString","optional":true,"default":"Always","forceNew":true},"command_line":{"type":"TypeString","optional":true,"forceNew":true},"container":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"container_group_name":{"type":"TypeString","optional":true}}},"maxItems":1},"environment_variable":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"secure_value":{"type":"TypeString","optional":true},"value":{"type":"TypeString","optional":true}}}},"force_update_tag":{"type":"TypeString","optional":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"outputs":{"type":"TypeString","computed":true},"primary_script_uri":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_interval":{"type":"TypeString","required":true,"forceNew":true},"script_content":{"type":"TypeString","optional":true,"forceNew":true},"storage_account":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}},"maxItems":1},"supporting_script_uris":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"timeout":{"type":"TypeString","optional":true,"default":"P1D","forceNew":true},"version":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_resource_deployment_script_azure_power_shell":{"schema":{"cleanup_preference":{"type":"TypeString","optional":true,"default":"Always","forceNew":true},"command_line":{"type":"TypeString","optional":true,"forceNew":true},"container":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"container_group_name":{"type":"TypeString","optional":true}}},"maxItems":1},"environment_variable":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"secure_value":{"type":"TypeString","optional":true},"value":{"type":"TypeString","optional":true}}}},"force_update_tag":{"type":"TypeString","optional":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"outputs":{"type":"TypeString","computed":true},"primary_script_uri":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_interval":{"type":"TypeString","required":true,"forceNew":true},"script_content":{"type":"TypeString","optional":true,"forceNew":true},"storage_account":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}},"maxItems":1},"supporting_script_uris":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"timeout":{"type":"TypeString","optional":true,"default":"P1D","forceNew":true},"version":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_resource_group":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"managed_by":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_resource_group_cost_management_export":{"schema":{"active":{"type":"TypeBool","optional":true,"default":true},"export_data_options":{"type":"TypeList","required":true,"elem":{"schema":{"time_frame":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"export_data_storage_location":{"type":"TypeList","required":true,"elem":{"schema":{"container_id":{"type":"TypeString","required":true,"forceNew":true},"root_folder_path":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"recurrence_period_end_date":{"type":"TypeString","required":true},"recurrence_period_start_date":{"type":"TypeString","required":true},"recurrence_type":{"type":"TypeString","required":true},"resource_group_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_resource_group_cost_management_view":{"schema":{"accumulated":{"type":"TypeBool","required":true,"forceNew":true},"chart_type":{"type":"TypeString","required":true},"dataset":{"type":"TypeList","required":true,"elem":{"schema":{"aggregation":{"type":"TypeSet","required":true,"elem":{"schema":{"column_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}}}},"granularity":{"type":"TypeString","required":true},"grouping":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"sorting":{"type":"TypeList","optional":true,"elem":{"schema":{"direction":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}}}},"maxItems":1},"display_name":{"type":"TypeString","required":true},"kpi":{"type":"TypeList","optional":true,"elem":{"schema":{"type":{"type":"TypeString","required":true}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"pivot":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"report_type":{"type":"TypeString","required":true},"resource_group_id":{"type":"TypeString","required":true,"forceNew":true},"timeframe":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_resource_group_policy_assignment":{"schema":{"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true},"enforce":{"type":"TypeBool","optional":true,"default":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","optional":true,"forceNew":true},"metadata":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"non_compliance_message":{"type":"TypeList","optional":true,"elem":{"schema":{"content":{"type":"TypeString","required":true},"policy_definition_reference_id":{"type":"TypeString","optional":true}}}},"not_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"overrides":{"type":"TypeList","optional":true,"elem":{"schema":{"selectors":{"type":"TypeList","optional":true,"elem":{"schema":{"in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"kind":{"type":"TypeString","computed":true},"not_in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"value":{"type":"TypeString","required":true}}}},"parameters":{"type":"TypeString","optional":true},"policy_definition_id":{"type":"TypeString","required":true,"forceNew":true},"resource_group_id":{"type":"TypeString","required":true,"forceNew":true},"resource_selectors":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","optional":true},"selectors":{"type":"TypeList","required":true,"elem":{"schema":{"in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"kind":{"type":"TypeString","required":true},"not_in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_resource_group_policy_exemption":{"schema":{"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true},"exemption_category":{"type":"TypeString","required":true},"expires_on":{"type":"TypeString","optional":true},"metadata":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"policy_assignment_id":{"type":"TypeString","required":true,"forceNew":true},"policy_definition_reference_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"resource_group_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_resource_group_policy_remediation":{"schema":{"failure_percentage":{"type":"TypeFloat","optional":true},"location_filters":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"parallel_deployments":{"type":"TypeInt","optional":true},"policy_assignment_id":{"type":"TypeString","required":true},"policy_definition_reference_id":{"type":"TypeString","optional":true},"resource_count":{"type":"TypeInt","optional":true},"resource_discovery_mode":{"type":"TypeString","optional":true,"default":"ExistingNonCompliant"},"resource_group_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_resource_group_template_deployment":{"schema":{"debug_level":{"type":"TypeString","optional":true},"deployment_mode":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"output_content":{"type":"TypeString","computed":true},"parameters_content":{"type":"TypeString","optional":true,"computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"template_content":{"type":"TypeString","optional":true,"computed":true},"template_spec_version_id":{"type":"TypeString","optional":true}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_resource_management_private_link":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_resource_management_private_link_association":{"schema":{"management_group_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","optional":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","required":true,"forceNew":true},"resource_management_private_link_id":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_resource_policy_assignment":{"schema":{"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true},"enforce":{"type":"TypeBool","optional":true,"default":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","optional":true,"forceNew":true},"metadata":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"non_compliance_message":{"type":"TypeList","optional":true,"elem":{"schema":{"content":{"type":"TypeString","required":true},"policy_definition_reference_id":{"type":"TypeString","optional":true}}}},"not_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"overrides":{"type":"TypeList","optional":true,"elem":{"schema":{"selectors":{"type":"TypeList","optional":true,"elem":{"schema":{"in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"kind":{"type":"TypeString","computed":true},"not_in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"value":{"type":"TypeString","required":true}}}},"parameters":{"type":"TypeString","optional":true},"policy_definition_id":{"type":"TypeString","required":true,"forceNew":true},"resource_id":{"type":"TypeString","required":true,"forceNew":true},"resource_selectors":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","optional":true},"selectors":{"type":"TypeList","required":true,"elem":{"schema":{"in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"kind":{"type":"TypeString","required":true},"not_in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_resource_policy_exemption":{"schema":{"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true},"exemption_category":{"type":"TypeString","required":true},"expires_on":{"type":"TypeString","optional":true},"metadata":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"policy_assignment_id":{"type":"TypeString","required":true,"forceNew":true},"policy_definition_reference_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_resource_policy_remediation":{"schema":{"failure_percentage":{"type":"TypeFloat","optional":true},"location_filters":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"parallel_deployments":{"type":"TypeInt","optional":true},"policy_assignment_id":{"type":"TypeString","required":true},"policy_definition_reference_id":{"type":"TypeString","optional":true},"resource_count":{"type":"TypeInt","optional":true},"resource_discovery_mode":{"type":"TypeString","optional":true,"default":"ExistingNonCompliant"},"resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_resource_provider_registration":{"schema":{"feature":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"registered":{"type":"TypeBool","required":true}}}},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":120,"read":5,"delete":30,"update":120}},"azurerm_restore_point_collection":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source_virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_role_assignment":{"schema":{"condition":{"type":"TypeString","optional":true,"forceNew":true},"condition_version":{"type":"TypeString","optional":true,"forceNew":true},"delegated_managed_identity_resource_id":{"type":"TypeString","optional":true,"forceNew":true},"description":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"principal_id":{"type":"TypeString","required":true,"forceNew":true},"principal_type":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"role_definition_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"role_definition_name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"scope":{"type":"TypeString","required":true,"forceNew":true},"skip_service_principal_aad_check":{"type":"TypeBool","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_role_definition":{"schema":{"assignable_scopes":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"permissions":{"type":"TypeList","optional":true,"elem":{"schema":{"actions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_actions":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"not_actions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"not_data_actions":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"role_definition_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"role_definition_resource_id":{"type":"TypeString","computed":true},"scope":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":60}},"azurerm_role_management_policy":{"schema":{"activation_rules":{"type":"TypeList","optional":true,"description":"The activation rules of the policy","computed":true,"elem":{"schema":{"approval_stage":{"type":"TypeList","optional":true,"description":"The approval stages for the activation","elem":{"schema":{"primary_approver":{"type":"TypeSet","required":true,"description":"The IDs of the users or groups who can approve the activation","elem":{"schema":{"object_id":{"type":"TypeString","required":true,"description":"The ID of the object to act as an approver"},"type":{"type":"TypeString","required":true,"description":"The type of object acting as an approver"}}},"minItems":1}}},"maxItems":1},"maximum_duration":{"type":"TypeString","optional":true,"description":"The time after which the an activation can be valid for","computed":true},"require_approval":{"type":"TypeBool","optional":true,"description":"Whether an approval is required for activation","computed":true},"require_justification":{"type":"TypeBool","optional":true,"description":"Whether a justification is required during activation","computed":true},"require_multifactor_authentication":{"type":"TypeBool","optional":true,"description":"Whether multi-factor authentication is required during activation","computed":true},"require_ticket_info":{"type":"TypeBool","optional":true,"description":"Whether ticket information is required during activation","computed":true},"required_conditional_access_authentication_context":{"type":"TypeString","optional":true,"description":"Whether a conditional access context is required during activation","computed":true}}},"maxItems":1},"active_assignment_rules":{"type":"TypeList","optional":true,"description":"The rules for active assignment of the policy","computed":true,"elem":{"schema":{"expiration_required":{"type":"TypeBool","optional":true,"description":"Must the assignment have an expiry date","computed":true},"expire_after":{"type":"TypeString","optional":true,"description":"The duration after which assignments expire","computed":true},"require_justification":{"type":"TypeBool","optional":true,"description":"Whether a justification is required to make an assignment","computed":true},"require_multifactor_authentication":{"type":"TypeBool","optional":true,"description":"Whether multi-factor authentication is required to make an assignment","computed":true},"require_ticket_info":{"type":"TypeBool","optional":true,"description":"Whether ticket information is required to make an assignment","computed":true}}},"maxItems":1},"description":{"type":"TypeString","description":"The Description of the policy","computed":true},"eligible_assignment_rules":{"type":"TypeList","optional":true,"description":"The rules for eligible assignment of the policy","computed":true,"elem":{"schema":{"expiration_required":{"type":"TypeBool","optional":true,"description":"Must the assignment have an expiry date","computed":true},"expire_after":{"type":"TypeString","optional":true,"description":"The duration after which assignments expire","computed":true}}},"maxItems":1},"name":{"type":"TypeString","description":"The name of the policy","computed":true},"notification_rules":{"type":"TypeList","optional":true,"description":"The notification rules of the policy","computed":true,"elem":{"schema":{"active_assignments":{"type":"TypeList","optional":true,"description":"Notifications about active assignments","computed":true,"elem":{"schema":{"admin_notifications":{"type":"TypeList","optional":true,"description":"Admin notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","optional":true,"description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","required":true,"description":"Whether the default recipients are notified"},"notification_level":{"type":"TypeString","required":true,"description":"What level of notifications are sent"}}},"maxItems":1},"approver_notifications":{"type":"TypeList","optional":true,"description":"Approver notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","optional":true,"description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","required":true,"description":"Whether the default recipients are notified"},"notification_level":{"type":"TypeString","required":true,"description":"What level of notifications are sent"}}},"maxItems":1},"assignee_notifications":{"type":"TypeList","optional":true,"description":"Assignee notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","optional":true,"description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","required":true,"description":"Whether the default recipients are notified"},"notification_level":{"type":"TypeString","required":true,"description":"What level of notifications are sent"}}},"maxItems":1}}},"maxItems":1},"eligible_activations":{"type":"TypeList","optional":true,"description":"Notifications about activations of eligible assignments","computed":true,"elem":{"schema":{"admin_notifications":{"type":"TypeList","optional":true,"description":"Admin notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","optional":true,"description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","required":true,"description":"Whether the default recipients are notified"},"notification_level":{"type":"TypeString","required":true,"description":"What level of notifications are sent"}}},"maxItems":1},"approver_notifications":{"type":"TypeList","optional":true,"description":"Approver notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","optional":true,"description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","required":true,"description":"Whether the default recipients are notified"},"notification_level":{"type":"TypeString","required":true,"description":"What level of notifications are sent"}}},"maxItems":1},"assignee_notifications":{"type":"TypeList","optional":true,"description":"Assignee notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","optional":true,"description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","required":true,"description":"Whether the default recipients are notified"},"notification_level":{"type":"TypeString","required":true,"description":"What level of notifications are sent"}}},"maxItems":1}}},"maxItems":1},"eligible_assignments":{"type":"TypeList","optional":true,"description":"Notifications about eligible assignments","computed":true,"elem":{"schema":{"admin_notifications":{"type":"TypeList","optional":true,"description":"Admin notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","optional":true,"description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","required":true,"description":"Whether the default recipients are notified"},"notification_level":{"type":"TypeString","required":true,"description":"What level of notifications are sent"}}},"maxItems":1},"approver_notifications":{"type":"TypeList","optional":true,"description":"Approver notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","optional":true,"description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","required":true,"description":"Whether the default recipients are notified"},"notification_level":{"type":"TypeString","required":true,"description":"What level of notifications are sent"}}},"maxItems":1},"assignee_notifications":{"type":"TypeList","optional":true,"description":"Assignee notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","optional":true,"description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","required":true,"description":"Whether the default recipients are notified"},"notification_level":{"type":"TypeString","required":true,"description":"What level of notifications are sent"}}},"maxItems":1}}},"maxItems":1}}},"maxItems":1},"role_definition_id":{"type":"TypeString","required":true,"description":"ID of the Azure Role to which this policy is assigned","forceNew":true},"scope":{"type":"TypeString","required":true,"description":"The scope of the role to which this policy will apply","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":5,"update":30}},"azurerm_route":{"schema":{"address_prefix":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"next_hop_in_ip_address":{"type":"TypeString","optional":true},"next_hop_type":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"route_table_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_route_filter":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rule":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"access":{"type":"TypeString","required":true},"communities":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"name":{"type":"TypeString","required":true},"rule_type":{"type":"TypeString","required":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_route_map":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeList","optional":true,"elem":{"schema":{"parameter":{"type":"TypeList","optional":true,"elem":{"schema":{"as_path":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"community":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"route_prefix":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"type":{"type":"TypeString","required":true}}}},"match_criterion":{"type":"TypeList","optional":true,"elem":{"schema":{"as_path":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"community":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"match_condition":{"type":"TypeString","required":true},"route_prefix":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"name":{"type":"TypeString","required":true},"next_step_if_matched":{"type":"TypeString","optional":true,"default":"Unknown"}}}},"virtual_hub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_route_server":{"schema":{"branch_to_branch_traffic_enabled":{"type":"TypeBool","optional":true,"default":false},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_ip_address_id":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"routing_state":{"type":"TypeString","computed":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_router_asn":{"type":"TypeInt","computed":true},"virtual_router_ips":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_route_server_bgp_connection":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"peer_asn":{"type":"TypeInt","required":true,"forceNew":true},"peer_ip":{"type":"TypeString","required":true,"forceNew":true},"route_server_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_route_table":{"schema":{"bgp_route_propagation_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"route":{"type":"TypeSet","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"address_prefix":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"next_hop_in_ip_address":{"type":"TypeString","optional":true},"next_hop_type":{"type":"TypeString","required":true}}}},"subnets":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_search_service":{"schema":{"allowed_ips":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"authentication_failure_mode":{"type":"TypeString","optional":true},"customer_managed_key_enforcement_enabled":{"type":"TypeBool","optional":true,"default":false},"hosting_mode":{"type":"TypeString","optional":true,"default":"default","forceNew":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"local_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"partition_count":{"type":"TypeInt","optional":true,"default":1},"primary_key":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"query_keys":{"type":"TypeList","computed":true,"elem":{"schema":{"key":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"replica_count":{"type":"TypeInt","optional":true,"default":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_key":{"type":"TypeString","computed":true},"semantic_search_sku":{"type":"TypeString","optional":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_search_shared_private_link_service":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"request_message":{"type":"TypeString","optional":true},"search_service_id":{"type":"TypeString","required":true,"forceNew":true},"status":{"type":"TypeString","computed":true},"subresource_name":{"type":"TypeString","required":true,"forceNew":true},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_security_center_assessment":{"schema":{"additional_data":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"assessment_policy_id":{"type":"TypeString","required":true,"forceNew":true},"status":{"type":"TypeList","required":true,"elem":{"schema":{"cause":{"type":"TypeString","optional":true},"code":{"type":"TypeString","required":true},"description":{"type":"TypeString","optional":true}}},"maxItems":1},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_security_center_assessment_policy":{"schema":{"categories":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"description":{"type":"TypeString","required":true},"display_name":{"type":"TypeString","required":true},"implementation_effort":{"type":"TypeString","optional":true},"name":{"type":"TypeString","computed":true},"remediation_description":{"type":"TypeString","optional":true},"severity":{"type":"TypeString","optional":true,"default":"Medium"},"threats":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"user_impact":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_security_center_auto_provisioning":{"schema":{"auto_provision":{"type":"TypeString","required":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_security_center_automation":{"schema":{"action":{"type":"TypeList","required":true,"elem":{"schema":{"connection_string":{"type":"TypeString","optional":true},"resource_id":{"type":"TypeString","required":true},"trigger_url":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"minItems":1},"description":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scopes":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"source":{"type":"TypeList","required":true,"elem":{"schema":{"event_source":{"type":"TypeString","required":true},"rule_set":{"type":"TypeList","optional":true,"elem":{"schema":{"rule":{"type":"TypeList","required":true,"elem":{"schema":{"expected_value":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"property_path":{"type":"TypeString","required":true},"property_type":{"type":"TypeString","required":true}}}}}}}}},"minItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_security_center_contact":{"schema":{"alert_notifications":{"type":"TypeBool","required":true},"alerts_to_admins":{"type":"TypeBool","required":true},"email":{"type":"TypeString","required":true},"name":{"type":"TypeString","optional":true,"default":"default1"},"phone":{"type":"TypeString","optional":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_security_center_server_vulnerability_assessment_virtual_machine":{"schema":{"virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":5,"read":5,"delete":10}},"azurerm_security_center_server_vulnerability_assessments_setting":{"schema":{"vulnerability_assessment_provider":{"type":"TypeString","required":true}},"timeouts":{"create":10,"read":5,"delete":10,"update":10}},"azurerm_security_center_setting":{"schema":{"enabled":{"type":"TypeBool","required":true},"setting_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":10,"read":5,"delete":10,"update":10}},"azurerm_security_center_storage_defender":{"schema":{"malware_scanning_on_upload_cap_gb_per_month":{"type":"TypeInt","optional":true,"default":-1},"malware_scanning_on_upload_enabled":{"type":"TypeBool","optional":true,"default":false},"override_subscription_settings_enabled":{"type":"TypeBool","optional":true,"default":false},"scan_results_event_grid_topic_id":{"type":"TypeString","optional":true},"sensitive_data_discovery_enabled":{"type":"TypeBool","optional":true,"default":false},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_security_center_subscription_pricing":{"schema":{"extension":{"type":"TypeSet","optional":true,"elem":{"schema":{"additional_extension_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true}}}},"resource_type":{"type":"TypeString","optional":true,"default":"VirtualMachines"},"subplan":{"type":"TypeString","optional":true},"tier":{"type":"TypeString","required":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_security_center_workspace":{"schema":{"scope":{"type":"TypeString","required":true},"workspace_id":{"type":"TypeString","required":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_sentinel_alert_rule_anomaly_built_in":{"schema":{"anomaly_settings_version":{"type":"TypeInt","computed":true},"anomaly_version":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","optional":true,"computed":true},"enabled":{"type":"TypeBool","required":true},"frequency":{"type":"TypeString","computed":true},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"mode":{"type":"TypeString","required":true},"multi_select_observation":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"supported_values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"name":{"type":"TypeString","optional":true,"computed":true},"prioritized_exclude_observation":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"exclude":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"prioritize":{"type":"TypeString","computed":true}}}},"required_data_connector":{"type":"TypeList","computed":true,"elem":{"schema":{"connector_id":{"type":"TypeString","computed":true},"data_types":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"settings_definition_id":{"type":"TypeString","computed":true},"single_select_observation":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"supported_values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"value":{"type":"TypeString","computed":true}}}},"tactics":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"techniques":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"threshold_observation":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"max":{"type":"TypeString","computed":true},"min":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}}},"timeouts":{"create":30,"read":5,"delete":5,"update":30}},"azurerm_sentinel_alert_rule_anomaly_duplicate":{"schema":{"anomaly_settings_version":{"type":"TypeInt","computed":true},"anomaly_version":{"type":"TypeString","computed":true},"built_in_rule_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","required":true},"frequency":{"type":"TypeString","computed":true},"is_default_settings":{"type":"TypeBool","computed":true},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"mode":{"type":"TypeString","required":true},"multi_select_observation":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"supported_values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}},"name":{"type":"TypeString","computed":true},"prioritized_exclude_observation":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"exclude":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"prioritize":{"type":"TypeString","optional":true}}}},"required_data_connector":{"type":"TypeList","computed":true,"elem":{"schema":{"connector_id":{"type":"TypeString","computed":true},"data_types":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"settings_definition_id":{"type":"TypeString","computed":true},"single_select_observation":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"supported_values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"value":{"type":"TypeString","required":true}}}},"tactics":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"techniques":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"threshold_observation":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"max":{"type":"TypeString","computed":true},"min":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}}},"timeouts":{"create":30,"read":5,"delete":5,"update":30}},"azurerm_sentinel_alert_rule_fusion":{"schema":{"alert_rule_template_guid":{"type":"TypeString","required":true,"forceNew":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"source":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true},"sub_type":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true},"severities_allowed":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1}}}}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_alert_rule_machine_learning_behavior_analytics":{"schema":{"alert_rule_template_guid":{"type":"TypeString","required":true,"forceNew":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_alert_rule_ms_security_incident":{"schema":{"alert_rule_template_guid":{"type":"TypeString","optional":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"display_name_exclude_filter":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"display_name_filter":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"enabled":{"type":"TypeBool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"product_filter":{"type":"TypeString","required":true},"severity_filter":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_alert_rule_nrt":{"schema":{"alert_details_override":{"type":"TypeList","optional":true,"elem":{"schema":{"description_format":{"type":"TypeString","optional":true},"display_name_format":{"type":"TypeString","optional":true},"dynamic_property":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"severity_column_name":{"type":"TypeString","optional":true},"tactics_column_name":{"type":"TypeString","optional":true}}}},"alert_rule_template_guid":{"type":"TypeString","optional":true,"forceNew":true},"alert_rule_template_version":{"type":"TypeString","optional":true,"forceNew":true},"custom_details":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"entity_mapping":{"type":"TypeList","optional":true,"elem":{"schema":{"entity_type":{"type":"TypeString","required":true},"field_mapping":{"type":"TypeList","required":true,"elem":{"schema":{"column_name":{"type":"TypeString","required":true},"identifier":{"type":"TypeString","required":true}}},"maxItems":3}}},"maxItems":5},"event_grouping":{"type":"TypeList","required":true,"elem":{"schema":{"aggregation_method":{"type":"TypeString","required":true}}},"maxItems":1},"incident":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"create_incident_enabled":{"type":"TypeBool","required":true},"grouping":{"type":"TypeList","required":true,"elem":{"schema":{"by_alert_details":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"by_custom_details":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"by_entities":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true,"default":true},"entity_matching_method":{"type":"TypeString","optional":true,"default":"AnyAlert"},"lookback_duration":{"type":"TypeString","optional":true,"default":"PT5M"},"reopen_closed_incidents":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1,"minItems":1}}},"maxItems":1,"minItems":1},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"query":{"type":"TypeString","required":true},"sentinel_entity_mapping":{"type":"TypeList","optional":true,"elem":{"schema":{"column_name":{"type":"TypeString","required":true}}},"maxItems":5},"severity":{"type":"TypeString","required":true},"suppression_duration":{"type":"TypeString","optional":true,"default":"PT5H"},"suppression_enabled":{"type":"TypeBool","optional":true,"default":false},"tactics":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"techniques":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_alert_rule_scheduled":{"schema":{"alert_details_override":{"type":"TypeList","optional":true,"elem":{"schema":{"description_format":{"type":"TypeString","optional":true},"display_name_format":{"type":"TypeString","optional":true},"dynamic_property":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"severity_column_name":{"type":"TypeString","optional":true},"tactics_column_name":{"type":"TypeString","optional":true}}}},"alert_rule_template_guid":{"type":"TypeString","optional":true,"forceNew":true},"alert_rule_template_version":{"type":"TypeString","optional":true},"custom_details":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"entity_mapping":{"type":"TypeList","optional":true,"elem":{"schema":{"entity_type":{"type":"TypeString","required":true},"field_mapping":{"type":"TypeList","required":true,"elem":{"schema":{"column_name":{"type":"TypeString","required":true},"identifier":{"type":"TypeString","required":true}}},"maxItems":3}}},"maxItems":5},"event_grouping":{"type":"TypeList","optional":true,"elem":{"schema":{"aggregation_method":{"type":"TypeString","required":true}}},"maxItems":1},"incident":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"create_incident_enabled":{"type":"TypeBool","required":true},"grouping":{"type":"TypeList","required":true,"elem":{"schema":{"by_alert_details":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"by_custom_details":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"by_entities":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true,"default":true},"entity_matching_method":{"type":"TypeString","optional":true,"default":"AnyAlert"},"lookback_duration":{"type":"TypeString","optional":true,"default":"PT5M"},"reopen_closed_incidents":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1,"minItems":1}}},"maxItems":1,"minItems":1},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"query":{"type":"TypeString","required":true},"query_frequency":{"type":"TypeString","optional":true,"default":"PT5H"},"query_period":{"type":"TypeString","optional":true,"default":"PT5H"},"sentinel_entity_mapping":{"type":"TypeList","optional":true,"elem":{"schema":{"column_name":{"type":"TypeString","required":true}}},"maxItems":5},"severity":{"type":"TypeString","required":true},"suppression_duration":{"type":"TypeString","optional":true,"default":"PT5H"},"suppression_enabled":{"type":"TypeBool","optional":true,"default":false},"tactics":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"techniques":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"trigger_operator":{"type":"TypeString","optional":true,"default":"GreaterThan"},"trigger_threshold":{"type":"TypeInt","optional":true,"default":0}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_alert_rule_threat_intelligence":{"schema":{"alert_rule_template_guid":{"type":"TypeString","required":true,"forceNew":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_automation_rule":{"schema":{"action_incident":{"type":"TypeList","optional":true,"elem":{"schema":{"classification":{"type":"TypeString","optional":true},"classification_comment":{"type":"TypeString","optional":true},"labels":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"order":{"type":"TypeInt","required":true},"owner_id":{"type":"TypeString","optional":true},"severity":{"type":"TypeString","optional":true},"status":{"type":"TypeString","optional":true}}}},"action_playbook":{"type":"TypeList","optional":true,"elem":{"schema":{"logic_app_id":{"type":"TypeString","required":true},"order":{"type":"TypeInt","required":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true}}}},"condition_json":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"expiration":{"type":"TypeString","optional":true},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"order":{"type":"TypeInt","required":true},"triggers_on":{"type":"TypeString","optional":true,"default":"Incidents"},"triggers_when":{"type":"TypeString","optional":true,"default":"Created"}},"timeouts":{"create":5,"read":5,"delete":5,"update":5}},"azurerm_sentinel_data_connector_aws_cloud_trail":{"schema":{"aws_role_arn":{"type":"TypeString","required":true},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_data_connector_aws_s3":{"schema":{"aws_role_arn":{"type":"TypeString","required":true},"destination_table":{"type":"TypeString","required":true},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"sqs_urls":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_data_connector_azure_active_directory":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_azure_advanced_threat_protection":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_azure_security_center":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"subscription_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_dynamics_365":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_iot":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"subscription_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_microsoft_cloud_app_security":{"schema":{"alerts_enabled":{"type":"TypeBool","optional":true,"default":true},"discovery_logs_enabled":{"type":"TypeBool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_data_connector_microsoft_defender_advanced_threat_protection":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_microsoft_threat_intelligence":{"schema":{"bing_safety_phishing_url_lookback_date":{"type":"TypeString","optional":true,"forceNew":true},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"microsoft_emerging_threat_feed_lookback_date":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_microsoft_threat_protection":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_office_365":{"schema":{"exchange_enabled":{"type":"TypeBool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"sharepoint_enabled":{"type":"TypeBool","optional":true,"default":true},"teams_enabled":{"type":"TypeBool","optional":true,"default":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_data_connector_office_365_project":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_office_atp":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_office_irm":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_office_power_bi":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_threat_intelligence":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"lookback_date":{"type":"TypeString","optional":true,"default":"1970-01-01T00:00:00Z","forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_threat_intelligence_taxii":{"schema":{"api_root_url":{"type":"TypeString","required":true},"collection_id":{"type":"TypeString","required":true},"display_name":{"type":"TypeString","required":true},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"lookback_date":{"type":"TypeString","optional":true,"default":"1970-01-01T00:00:00Z"},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","optional":true},"polling_frequency":{"type":"TypeString","optional":true,"default":"OnceAnHour"},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"user_name":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_log_analytics_workspace_onboarding":{"schema":{"customer_managed_key_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_metadata":{"schema":{"author":{"type":"TypeList","optional":true,"elem":{"schema":{"email":{"type":"TypeString","optional":true},"link":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true}}},"maxItems":1},"category":{"type":"TypeList","optional":true,"elem":{"schema":{"domains":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"verticals":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"content_id":{"type":"TypeString","required":true},"content_schema_version":{"type":"TypeString","optional":true,"default":"2.0"},"custom_version":{"type":"TypeString","optional":true},"dependency":{"type":"TypeString","optional":true},"first_publish_date":{"type":"TypeString","optional":true},"icon_id":{"type":"TypeString","optional":true},"kind":{"type":"TypeString","required":true},"last_publish_date":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parent_id":{"type":"TypeString","required":true},"preview_images":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"preview_images_dark":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"providers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"source":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"id":{"type":"TypeString","optional":true},"kind":{"type":"TypeString","required":true},"name":{"type":"TypeString","optional":true}}},"maxItems":1},"support":{"type":"TypeList","optional":true,"elem":{"schema":{"email":{"type":"TypeString","optional":true},"link":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true},"tier":{"type":"TypeString","required":true}}},"maxItems":1},"threat_analysis_tactics":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"threat_analysis_techniques":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"version":{"type":"TypeString","optional":true},"workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_threat_intelligence_indicator":{"schema":{"confidence":{"type":"TypeInt","optional":true,"default":-1},"created_by":{"type":"TypeString","optional":true},"created_on":{"type":"TypeString","computed":true},"defanged":{"type":"TypeBool","computed":true},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"extension":{"type":"TypeString","optional":true,"computed":true},"external_id":{"type":"TypeString","computed":true},"external_last_updated_time_utc":{"type":"TypeString","computed":true},"external_reference":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"hashes":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"id":{"type":"TypeString","computed":true},"source_name":{"type":"TypeString","optional":true},"url":{"type":"TypeString","optional":true}}}},"granular_marking":{"type":"TypeList","optional":true,"elem":{"schema":{"language":{"type":"TypeString","optional":true},"marking_ref":{"type":"TypeString","optional":true},"selectors":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"guid":{"type":"TypeString","computed":true},"indicator_type":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"kill_chain_phase":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","optional":true}}}},"language":{"type":"TypeString","optional":true},"last_updated_time_utc":{"type":"TypeString","computed":true},"object_marking_refs":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"parsed_pattern":{"type":"TypeList","computed":true,"elem":{"schema":{"pattern_type_key":{"type":"TypeString","computed":true},"pattern_type_values":{"type":"TypeList","computed":true,"elem":{"schema":{"value":{"type":"TypeString","computed":true},"value_type":{"type":"TypeString","computed":true}}}}}}},"pattern":{"type":"TypeString","required":true},"pattern_type":{"type":"TypeString","required":true},"pattern_version":{"type":"TypeString","optional":true},"revoked":{"type":"TypeBool","optional":true,"default":false},"source":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"threat_types":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"validate_from_utc":{"type":"TypeString","required":true},"validate_until_utc":{"type":"TypeString","optional":true},"workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_watchlist":{"schema":{"default_duration":{"type":"TypeString","optional":true,"forceNew":true},"description":{"type":"TypeString","optional":true,"forceNew":true},"display_name":{"type":"TypeString","required":true,"forceNew":true},"item_search_key":{"type":"TypeString","required":true,"forceNew":true},"labels":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_watchlist_item":{"schema":{"name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"properties":{"type":"TypeMap","required":true,"elem":{"type":"TypeString"}},"watchlist_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_service_fabric_cluster":{"schema":{"add_on_features":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"azure_active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"client_application_id":{"type":"TypeString","required":true},"cluster_application_id":{"type":"TypeString","required":true},"tenant_id":{"type":"TypeString","required":true}}},"maxItems":1},"certificate":{"type":"TypeList","optional":true,"elem":{"schema":{"thumbprint":{"type":"TypeString","required":true},"thumbprint_secondary":{"type":"TypeString","optional":true},"x509_store_name":{"type":"TypeString","required":true}}},"maxItems":1},"certificate_common_names":{"type":"TypeList","optional":true,"elem":{"schema":{"common_names":{"type":"TypeSet","required":true,"elem":{"schema":{"certificate_common_name":{"type":"TypeString","required":true},"certificate_issuer_thumbprint":{"type":"TypeString","optional":true}}},"minItems":1},"x509_store_name":{"type":"TypeString","required":true}}},"maxItems":1},"client_certificate_common_name":{"type":"TypeList","optional":true,"elem":{"schema":{"common_name":{"type":"TypeString","required":true},"is_admin":{"type":"TypeBool","required":true},"issuer_thumbprint":{"type":"TypeString","optional":true}}}},"client_certificate_thumbprint":{"type":"TypeList","optional":true,"elem":{"schema":{"is_admin":{"type":"TypeBool","required":true},"thumbprint":{"type":"TypeString","required":true}}}},"cluster_code_version":{"type":"TypeString","optional":true,"computed":true},"cluster_endpoint":{"type":"TypeString","computed":true},"diagnostics_config":{"type":"TypeList","optional":true,"elem":{"schema":{"blob_endpoint":{"type":"TypeString","required":true},"protected_account_key_name":{"type":"TypeString","required":true},"queue_endpoint":{"type":"TypeString","required":true},"storage_account_name":{"type":"TypeString","required":true},"table_endpoint":{"type":"TypeString","required":true}}},"maxItems":1},"fabric_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"management_endpoint":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"node_type":{"type":"TypeList","required":true,"elem":{"schema":{"application_ports":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"end_port":{"type":"TypeInt","required":true},"start_port":{"type":"TypeInt","required":true}}},"maxItems":1},"capacities":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"client_endpoint_port":{"type":"TypeInt","required":true},"durability_level":{"type":"TypeString","optional":true,"default":"Bronze"},"ephemeral_ports":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"end_port":{"type":"TypeInt","required":true},"start_port":{"type":"TypeInt","required":true}}},"maxItems":1},"http_endpoint_port":{"type":"TypeInt","required":true},"instance_count":{"type":"TypeInt","required":true},"is_primary":{"type":"TypeBool","required":true},"is_stateless":{"type":"TypeBool","optional":true},"multiple_availability_zones":{"type":"TypeBool","optional":true},"name":{"type":"TypeString","required":true},"placement_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"reverse_proxy_endpoint_port":{"type":"TypeInt","optional":true}}}},"reliability_level":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"reverse_proxy_certificate":{"type":"TypeList","optional":true,"elem":{"schema":{"thumbprint":{"type":"TypeString","required":true},"thumbprint_secondary":{"type":"TypeString","optional":true},"x509_store_name":{"type":"TypeString","required":true}}},"maxItems":1},"reverse_proxy_certificate_common_names":{"type":"TypeList","optional":true,"elem":{"schema":{"common_names":{"type":"TypeSet","required":true,"elem":{"schema":{"certificate_common_name":{"type":"TypeString","required":true},"certificate_issuer_thumbprint":{"type":"TypeString","optional":true}}},"minItems":1},"x509_store_name":{"type":"TypeString","required":true}}},"maxItems":1},"service_fabric_zonal_upgrade_mode":{"type":"TypeString","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"upgrade_mode":{"type":"TypeString","required":true},"upgrade_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"delta_health_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"max_delta_unhealthy_applications_percent":{"type":"TypeInt","optional":true,"default":0},"max_delta_unhealthy_nodes_percent":{"type":"TypeInt","optional":true,"default":0},"max_upgrade_domain_delta_unhealthy_nodes_percent":{"type":"TypeInt","optional":true,"default":0}}},"maxItems":1},"force_restart_enabled":{"type":"TypeBool","optional":true},"health_check_retry_timeout":{"type":"TypeString","optional":true,"default":"00:45:00"},"health_check_stable_duration":{"type":"TypeString","optional":true,"default":"00:01:00"},"health_check_wait_duration":{"type":"TypeString","optional":true,"default":"00:00:30"},"health_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"max_unhealthy_applications_percent":{"type":"TypeInt","optional":true,"default":0},"max_unhealthy_nodes_percent":{"type":"TypeInt","optional":true,"default":0}}},"maxItems":1},"upgrade_domain_timeout":{"type":"TypeString","optional":true,"default":"02:00:00"},"upgrade_replica_set_check_timeout":{"type":"TypeString","optional":true,"default":"10675199.02:48:05.4775807"},"upgrade_timeout":{"type":"TypeString","optional":true,"default":"12:00:00"}}},"maxItems":1},"vm_image":{"type":"TypeString","required":true,"forceNew":true},"vmss_zonal_upgrade_mode":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_service_fabric_managed_cluster":{"schema":{"authentication":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"client_application_id":{"type":"TypeString","required":true},"cluster_application_id":{"type":"TypeString","required":true},"tenant_id":{"type":"TypeString","required":true}}},"maxItems":1},"certificate":{"type":"TypeList","optional":true,"elem":{"schema":{"common_name":{"type":"TypeString","optional":true},"thumbprint":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}}}},"maxItems":1},"backup_service_enabled":{"type":"TypeBool","optional":true},"client_connection_port":{"type":"TypeInt","required":true},"custom_fabric_setting":{"type":"TypeList","optional":true,"elem":{"schema":{"parameter":{"type":"TypeString","required":true},"section":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"dns_name":{"type":"TypeString","optional":true,"computed":true},"dns_service_enabled":{"type":"TypeBool","optional":true},"http_gateway_port":{"type":"TypeInt","required":true},"lb_rule":{"type":"TypeList","required":true,"elem":{"schema":{"backend_port":{"type":"TypeInt","required":true},"frontend_port":{"type":"TypeInt","required":true},"probe_protocol":{"type":"TypeString","required":true},"probe_request_path":{"type":"TypeString","optional":true},"protocol":{"type":"TypeString","required":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"node_type":{"type":"TypeList","optional":true,"elem":{"schema":{"application_port_range":{"type":"TypeString","required":true},"capacities":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"data_disk_size_gb":{"type":"TypeInt","required":true},"data_disk_type":{"type":"TypeString","optional":true,"default":"Standard_LRS"},"ephemeral_port_range":{"type":"TypeString","required":true},"id":{"type":"TypeString","computed":true},"multiple_placement_groups_enabled":{"type":"TypeBool","optional":true},"name":{"type":"TypeString","required":true},"placement_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"primary":{"type":"TypeBool","optional":true},"stateless":{"type":"TypeBool","optional":true},"vm_image_offer":{"type":"TypeString","required":true},"vm_image_publisher":{"type":"TypeString","required":true},"vm_image_sku":{"type":"TypeString","required":true},"vm_image_version":{"type":"TypeString","required":true},"vm_instance_count":{"type":"TypeInt","required":true},"vm_secrets":{"type":"TypeList","optional":true,"elem":{"schema":{"certificates":{"type":"TypeList","required":true,"elem":{"schema":{"store":{"type":"TypeString","required":true},"url":{"type":"TypeString","required":true}}}},"vault_id":{"type":"TypeString","required":true}}}},"vm_size":{"type":"TypeString","required":true}}}},"password":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","optional":true,"default":"Basic","forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"upgrade_wave":{"type":"TypeString","optional":true,"default":"Wave0"},"username":{"type":"TypeString","optional":true}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_service_plan":{"schema":{"app_service_environment_id":{"type":"TypeString","optional":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"maximum_elastic_worker_count":{"type":"TypeInt","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"os_type":{"type":"TypeString","required":true,"forceNew":true},"per_site_scaling_enabled":{"type":"TypeBool","optional":true,"default":false},"reserved":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"worker_count":{"type":"TypeInt","optional":true,"computed":true},"zone_balancing_enabled":{"type":"TypeBool","optional":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_servicebus_namespace":{"schema":{"capacity":{"type":"TypeInt","optional":true,"default":0},"customer_managed_key":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_id":{"type":"TypeString","required":true},"infrastructure_encryption_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"key_vault_key_id":{"type":"TypeString","required":true}}},"maxItems":1},"default_primary_connection_string":{"type":"TypeString","computed":true},"default_primary_key":{"type":"TypeString","computed":true},"default_secondary_connection_string":{"type":"TypeString","computed":true},"default_secondary_key":{"type":"TypeString","computed":true},"endpoint":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"local_auth_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"name":{"type":"TypeString","required":true,"forceNew":true},"network_rule_set":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"default_action":{"type":"TypeString","optional":true,"default":"Allow"},"ip_rules":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"network_rules":{"type":"TypeSet","optional":true,"elem":{"schema":{"ignore_missing_vnet_service_endpoint":{"type":"TypeBool","optional":true,"default":false},"subnet_id":{"type":"TypeString","required":true}}}},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"trusted_services_allowed":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"premium_messaging_partitions":{"type":"TypeInt","optional":true,"default":0,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_servicebus_namespace_authorization_rule":{"schema":{"listen":{"type":"TypeBool","optional":true,"default":false},"manage":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_id":{"type":"TypeString","required":true,"forceNew":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_connection_string_alias":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_connection_string_alias":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"send":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_servicebus_namespace_disaster_recovery_config":{"schema":{"alias_authorization_rule_id":{"type":"TypeString","optional":true},"default_primary_key":{"type":"TypeString","computed":true},"default_secondary_key":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"partner_namespace_id":{"type":"TypeString","required":true},"primary_connection_string_alias":{"type":"TypeString","computed":true},"primary_namespace_id":{"type":"TypeString","required":true,"forceNew":true},"secondary_connection_string_alias":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_servicebus_queue":{"schema":{"auto_delete_on_idle":{"type":"TypeString","optional":true,"default":"P10675199DT2H48M5.4775807S"},"batched_operations_enabled":{"type":"TypeBool","optional":true,"default":true},"dead_lettering_on_message_expiration":{"type":"TypeBool","optional":true,"default":false},"default_message_ttl":{"type":"TypeString","optional":true,"default":"P10675199DT2H48M5.4775807S"},"duplicate_detection_history_time_window":{"type":"TypeString","optional":true,"default":"PT10M"},"express_enabled":{"type":"TypeBool","optional":true,"default":false},"forward_dead_lettered_messages_to":{"type":"TypeString","optional":true},"forward_to":{"type":"TypeString","optional":true},"lock_duration":{"type":"TypeString","optional":true,"default":"PT1M"},"max_delivery_count":{"type":"TypeInt","optional":true,"default":10},"max_message_size_in_kilobytes":{"type":"TypeInt","optional":true,"computed":true},"max_size_in_megabytes":{"type":"TypeInt","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_id":{"type":"TypeString","required":true,"forceNew":true},"partitioning_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"requires_duplicate_detection":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"requires_session":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"status":{"type":"TypeString","optional":true,"default":"Active"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_servicebus_queue_authorization_rule":{"schema":{"listen":{"type":"TypeBool","optional":true,"default":false},"manage":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_connection_string_alias":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"queue_id":{"type":"TypeString","required":true,"forceNew":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_connection_string_alias":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"send":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_servicebus_subscription":{"schema":{"auto_delete_on_idle":{"type":"TypeString","optional":true,"default":"P10675199DT2H48M5.4775807S"},"batched_operations_enabled":{"type":"TypeBool","optional":true},"client_scoped_subscription":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","optional":true,"forceNew":true},"is_client_scoped_subscription_durable":{"type":"TypeBool","computed":true},"is_client_scoped_subscription_shareable":{"type":"TypeBool","optional":true,"default":true,"forceNew":true}}},"maxItems":1},"client_scoped_subscription_enabled":{"type":"TypeBool","optional":true,"default":false},"dead_lettering_on_filter_evaluation_error":{"type":"TypeBool","optional":true,"default":true},"dead_lettering_on_message_expiration":{"type":"TypeBool","optional":true},"default_message_ttl":{"type":"TypeString","optional":true,"default":"P10675199DT2H48M5.4775807S"},"forward_dead_lettered_messages_to":{"type":"TypeString","optional":true},"forward_to":{"type":"TypeString","optional":true},"lock_duration":{"type":"TypeString","optional":true,"default":"PT1M"},"max_delivery_count":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"requires_session":{"type":"TypeBool","optional":true,"forceNew":true},"status":{"type":"TypeString","optional":true,"default":"Active"},"topic_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_servicebus_subscription_rule":{"schema":{"action":{"type":"TypeString","optional":true},"correlation_filter":{"type":"TypeList","optional":true,"elem":{"schema":{"content_type":{"type":"TypeString","optional":true},"correlation_id":{"type":"TypeString","optional":true},"label":{"type":"TypeString","optional":true},"message_id":{"type":"TypeString","optional":true},"properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"reply_to":{"type":"TypeString","optional":true},"reply_to_session_id":{"type":"TypeString","optional":true},"session_id":{"type":"TypeString","optional":true},"to":{"type":"TypeString","optional":true}}},"maxItems":1},"filter_type":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"sql_filter":{"type":"TypeString","optional":true},"sql_filter_compatibility_level":{"type":"TypeInt","computed":true},"subscription_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_servicebus_topic":{"schema":{"auto_delete_on_idle":{"type":"TypeString","optional":true,"default":"P10675199DT2H48M5.4775807S"},"batched_operations_enabled":{"type":"TypeBool","optional":true},"default_message_ttl":{"type":"TypeString","optional":true,"default":"P10675199DT2H48M5.4775807S"},"duplicate_detection_history_time_window":{"type":"TypeString","optional":true,"default":"PT10M"},"express_enabled":{"type":"TypeBool","optional":true},"max_message_size_in_kilobytes":{"type":"TypeInt","optional":true,"computed":true},"max_size_in_megabytes":{"type":"TypeInt","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_id":{"type":"TypeString","required":true,"forceNew":true},"partitioning_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"requires_duplicate_detection":{"type":"TypeBool","optional":true,"forceNew":true},"status":{"type":"TypeString","optional":true,"default":"Active"},"support_ordering":{"type":"TypeBool","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_servicebus_topic_authorization_rule":{"schema":{"listen":{"type":"TypeBool","optional":true,"default":false},"manage":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_connection_string_alias":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_connection_string_alias":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"send":{"type":"TypeBool","optional":true,"default":false},"topic_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_shared_image":{"schema":{"accelerated_network_support_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"architecture":{"type":"TypeString","optional":true,"default":"x64","forceNew":true},"confidential_vm_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"confidential_vm_supported":{"type":"TypeBool","optional":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"disk_types_not_allowed":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"end_of_life_date":{"type":"TypeString","optional":true},"eula":{"type":"TypeString","optional":true,"forceNew":true},"gallery_name":{"type":"TypeString","required":true,"forceNew":true},"hyper_v_generation":{"type":"TypeString","optional":true,"default":"V1","forceNew":true},"identifier":{"type":"TypeList","required":true,"elem":{"schema":{"offer":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"max_recommended_memory_in_gb":{"type":"TypeInt","optional":true},"max_recommended_vcpu_count":{"type":"TypeInt","optional":true},"min_recommended_memory_in_gb":{"type":"TypeInt","optional":true},"min_recommended_vcpu_count":{"type":"TypeInt","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"os_type":{"type":"TypeString","required":true,"forceNew":true},"privacy_statement_uri":{"type":"TypeString","optional":true,"forceNew":true},"purchase_plan":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"product":{"type":"TypeString","optional":true,"forceNew":true},"publisher":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"release_note_uri":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"specialized":{"type":"TypeBool","optional":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"trusted_launch_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"trusted_launch_supported":{"type":"TypeBool","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_shared_image_gallery":{"schema":{"description":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sharing":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"community_gallery":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"eula":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","computed":true},"prefix":{"type":"TypeString","required":true,"forceNew":true},"publisher_email":{"type":"TypeString","required":true,"forceNew":true},"publisher_uri":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"permission":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"unique_name":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_shared_image_version":{"schema":{"blob_uri":{"type":"TypeString","optional":true,"forceNew":true},"deletion_of_replicated_locations_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"end_of_life_date":{"type":"TypeString","optional":true},"exclude_from_latest":{"type":"TypeBool","optional":true,"default":false},"gallery_name":{"type":"TypeString","required":true,"forceNew":true},"image_name":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_image_id":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"os_disk_snapshot_id":{"type":"TypeString","optional":true,"forceNew":true},"replication_mode":{"type":"TypeString","optional":true,"default":"Full","forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"storage_account_id":{"type":"TypeString","optional":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"target_region":{"type":"TypeList","required":true,"elem":{"schema":{"disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"exclude_from_latest_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true},"regional_replica_count":{"type":"TypeInt","required":true},"storage_account_type":{"type":"TypeString","optional":true,"default":"Standard_LRS"}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_signalr_service":{"schema":{"aad_auth_enabled":{"type":"TypeBool","optional":true,"default":true},"connectivity_logs_enabled":{"type":"TypeBool","optional":true,"default":false},"cors":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}}},"hostname":{"type":"TypeString","computed":true},"http_request_logs_enabled":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"ip_address":{"type":"TypeString","computed":true},"live_trace":{"type":"TypeList","optional":true,"elem":{"schema":{"connectivity_logs_enabled":{"type":"TypeBool","optional":true,"default":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"http_request_logs_enabled":{"type":"TypeBool","optional":true,"default":true},"messaging_logs_enabled":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"live_trace_enabled":{"type":"TypeBool","optional":true,"default":false},"local_auth_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"messaging_logs_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_access_key":{"type":"TypeString","computed":true},"primary_connection_string":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"public_port":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_access_key":{"type":"TypeString","computed":true},"secondary_connection_string":{"type":"TypeString","computed":true},"server_port":{"type":"TypeInt","computed":true},"serverless_connection_timeout_in_seconds":{"type":"TypeInt","optional":true,"default":30},"service_mode":{"type":"TypeString","optional":true,"default":"Default"},"sku":{"type":"TypeList","required":true,"elem":{"schema":{"capacity":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tls_client_cert_enabled":{"type":"TypeBool","optional":true,"default":false},"upstream_endpoint":{"type":"TypeSet","optional":true,"elem":{"schema":{"category_pattern":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"event_pattern":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"hub_pattern":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"url_template":{"type":"TypeString","required":true},"user_assigned_identity_id":{"type":"TypeString","optional":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_signalr_service_custom_certificate":{"schema":{"certificate_version":{"type":"TypeString","computed":true},"custom_certificate_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"signalr_service_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_signalr_service_custom_domain":{"schema":{"domain_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"signalr_custom_certificate_id":{"type":"TypeString","required":true,"forceNew":true},"signalr_service_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_signalr_service_network_acl":{"schema":{"default_action":{"type":"TypeString","required":true},"private_endpoint":{"type":"TypeSet","optional":true,"elem":{"schema":{"allowed_request_types":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"denied_request_types":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"id":{"type":"TypeString","required":true}}}},"public_network":{"type":"TypeList","required":true,"elem":{"schema":{"allowed_request_types":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"denied_request_types":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"signalr_service_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_signalr_shared_private_link_resource":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"request_message":{"type":"TypeString","optional":true},"signalr_service_id":{"type":"TypeString","required":true,"forceNew":true},"status":{"type":"TypeString","computed":true},"sub_resource_name":{"type":"TypeString","required":true,"forceNew":true},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_site_recovery_fabric":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"recovery_vault_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_site_recovery_hyperv_network_mapping":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"recovery_vault_id":{"type":"TypeString","required":true,"forceNew":true},"source_network_name":{"type":"TypeString","required":true,"forceNew":true},"source_system_center_virtual_machine_manager_name":{"type":"TypeString","required":true,"forceNew":true},"target_network_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_site_recovery_hyperv_replication_policy":{"schema":{"application_consistent_snapshot_frequency_in_hours":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"recovery_point_retention_in_hours":{"type":"TypeInt","required":true},"recovery_vault_id":{"type":"TypeString","required":true,"forceNew":true},"replication_interval_in_seconds":{"type":"TypeInt","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_site_recovery_hyperv_replication_policy_association":{"schema":{"hyperv_site_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"policy_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60}},"azurerm_site_recovery_network_mapping":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"recovery_vault_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source_network_id":{"type":"TypeString","required":true,"forceNew":true},"source_recovery_fabric_name":{"type":"TypeString","required":true,"forceNew":true},"target_network_id":{"type":"TypeString","required":true,"forceNew":true},"target_recovery_fabric_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_site_recovery_protection_container":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"recovery_fabric_name":{"type":"TypeString","required":true,"forceNew":true},"recovery_vault_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_site_recovery_protection_container_mapping":{"schema":{"automatic_update":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"authentication_type":{"type":"TypeString","optional":true,"default":"SystemAssignedIdentity"},"automation_account_id":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1,"minItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"recovery_fabric_name":{"type":"TypeString","required":true,"forceNew":true},"recovery_replication_policy_id":{"type":"TypeString","required":true,"forceNew":true},"recovery_source_protection_container_name":{"type":"TypeString","required":true,"forceNew":true},"recovery_target_protection_container_id":{"type":"TypeString","required":true,"forceNew":true},"recovery_vault_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_site_recovery_replicated_vm":{"schema":{"managed_disk":{"type":"TypeSet","configMode":"Auto","optional":true,"computed":true,"forceNew":true,"elem":{"schema":{"disk_id":{"type":"TypeString","required":true,"forceNew":true},"staging_storage_account_id":{"type":"TypeString","required":true,"forceNew":true},"target_disk_encryption":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"disk_encryption_key":{"type":"TypeList","configMode":"Auto","required":true,"elem":{"schema":{"secret_url":{"type":"TypeString","required":true,"forceNew":true},"vault_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"key_encryption_key":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"key_url":{"type":"TypeString","required":true,"forceNew":true},"vault_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"target_disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"target_disk_type":{"type":"TypeString","required":true,"forceNew":true},"target_replica_disk_type":{"type":"TypeString","required":true,"forceNew":true},"target_resource_group_id":{"type":"TypeString","required":true,"forceNew":true}}}},"multi_vm_group_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_interface":{"type":"TypeSet","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"failover_test_public_ip_address_id":{"type":"TypeString","optional":true,"computed":true},"failover_test_static_ip":{"type":"TypeString","optional":true,"computed":true},"failover_test_subnet_name":{"type":"TypeString","optional":true,"computed":true},"recovery_public_ip_address_id":{"type":"TypeString","optional":true},"source_network_interface_id":{"type":"TypeString","optional":true,"computed":true},"target_static_ip":{"type":"TypeString","optional":true},"target_subnet_name":{"type":"TypeString","optional":true}}}},"recovery_replication_policy_id":{"type":"TypeString","required":true,"forceNew":true},"recovery_vault_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source_recovery_fabric_name":{"type":"TypeString","required":true,"forceNew":true},"source_recovery_protection_container_name":{"type":"TypeString","required":true,"forceNew":true},"source_vm_id":{"type":"TypeString","required":true,"forceNew":true},"target_availability_set_id":{"type":"TypeString","optional":true},"target_boot_diagnostic_storage_account_id":{"type":"TypeString","optional":true},"target_capacity_reservation_group_id":{"type":"TypeString","optional":true},"target_edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"target_network_id":{"type":"TypeString","optional":true,"computed":true},"target_proximity_placement_group_id":{"type":"TypeString","optional":true},"target_recovery_fabric_id":{"type":"TypeString","required":true,"forceNew":true},"target_recovery_protection_container_id":{"type":"TypeString","required":true,"forceNew":true},"target_resource_group_id":{"type":"TypeString","required":true,"forceNew":true},"target_virtual_machine_scale_set_id":{"type":"TypeString","optional":true},"target_zone":{"type":"TypeString","optional":true,"forceNew":true},"test_network_id":{"type":"TypeString","optional":true,"computed":true},"unmanaged_disk":{"type":"TypeSet","configMode":"Auto","optional":true,"computed":true,"forceNew":true,"elem":{"schema":{"disk_uri":{"type":"TypeString","required":true,"forceNew":true},"staging_storage_account_id":{"type":"TypeString","required":true,"forceNew":true},"target_storage_account_id":{"type":"TypeString","required":true,"forceNew":true}}}}},"timeouts":{"create":180,"read":5,"delete":80,"update":80}},"azurerm_site_recovery_replication_policy":{"schema":{"application_consistent_snapshot_frequency_in_minutes":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"recovery_point_retention_in_minutes":{"type":"TypeInt","required":true},"recovery_vault_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_site_recovery_replication_recovery_plan":{"schema":{"azure_to_azure_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"primary_edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"primary_zone":{"type":"TypeString","optional":true,"forceNew":true},"recovery_edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"recovery_zone":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"boot_recovery_group":{"type":"TypeList","required":true,"elem":{"schema":{"post_action":{"type":"TypeList","optional":true,"elem":{"schema":{"fabric_location":{"type":"TypeString","optional":true},"fail_over_directions":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"fail_over_types":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"manual_action_instruction":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"runbook_id":{"type":"TypeString","optional":true},"script_path":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}}},"pre_action":{"type":"TypeList","optional":true,"elem":{"schema":{"fabric_location":{"type":"TypeString","optional":true},"fail_over_directions":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"fail_over_types":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"manual_action_instruction":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"runbook_id":{"type":"TypeString","optional":true},"script_path":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}}},"replicated_protected_items":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"minItems":1},"failover_recovery_group":{"type":"TypeList","required":true,"elem":{"schema":{"post_action":{"type":"TypeList","optional":true,"elem":{"schema":{"fabric_location":{"type":"TypeString","optional":true},"fail_over_directions":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"fail_over_types":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"manual_action_instruction":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"runbook_id":{"type":"TypeString","optional":true},"script_path":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}}},"pre_action":{"type":"TypeList","optional":true,"elem":{"schema":{"fabric_location":{"type":"TypeString","optional":true},"fail_over_directions":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"fail_over_types":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"manual_action_instruction":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"runbook_id":{"type":"TypeString","optional":true},"script_path":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}}}}},"maxItems":1,"minItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"recovery_vault_id":{"type":"TypeString","required":true,"forceNew":true},"shutdown_recovery_group":{"type":"TypeList","required":true,"elem":{"schema":{"post_action":{"type":"TypeList","optional":true,"elem":{"schema":{"fabric_location":{"type":"TypeString","optional":true},"fail_over_directions":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"fail_over_types":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"manual_action_instruction":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"runbook_id":{"type":"TypeString","optional":true},"script_path":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}}},"pre_action":{"type":"TypeList","optional":true,"elem":{"schema":{"fabric_location":{"type":"TypeString","optional":true},"fail_over_directions":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"fail_over_types":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"manual_action_instruction":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"runbook_id":{"type":"TypeString","optional":true},"script_path":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}}}}},"maxItems":1,"minItems":1},"source_recovery_fabric_id":{"type":"TypeString","required":true,"forceNew":true},"target_recovery_fabric_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_site_recovery_services_vault_hyperv_site":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"recovery_vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":180}},"azurerm_site_recovery_vmware_replicated_vm":{"schema":{"appliance_name":{"type":"TypeString","required":true,"forceNew":true},"default_log_storage_account_id":{"type":"TypeString","optional":true},"default_recovery_disk_type":{"type":"TypeString","optional":true},"default_target_disk_encryption_set_id":{"type":"TypeString","optional":true},"license_type":{"type":"TypeString","optional":true,"default":"NotSpecified"},"managed_disk":{"type":"TypeList","optional":true,"elem":{"schema":{"disk_id":{"type":"TypeString","required":true},"log_storage_account_id":{"type":"TypeString","optional":true},"target_disk_encryption_set_id":{"type":"TypeString","optional":true},"target_disk_type":{"type":"TypeString","required":true}}}},"multi_vm_group_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_interface":{"type":"TypeList","optional":true,"elem":{"schema":{"is_primary":{"type":"TypeBool","required":true},"source_mac_address":{"type":"TypeString","required":true},"target_static_ip":{"type":"TypeString","optional":true},"target_subnet_name":{"type":"TypeString","optional":true},"test_subnet_name":{"type":"TypeString","optional":true}}}},"physical_server_credential_name":{"type":"TypeString","required":true,"forceNew":true},"recovery_replication_policy_id":{"type":"TypeString","required":true},"recovery_vault_id":{"type":"TypeString","required":true},"source_vm_name":{"type":"TypeString","required":true,"forceNew":true},"target_availability_set_id":{"type":"TypeString","optional":true},"target_boot_diagnostics_storage_account_id":{"type":"TypeString","optional":true},"target_network_id":{"type":"TypeString","optional":true},"target_proximity_placement_group_id":{"type":"TypeString","optional":true},"target_resource_group_id":{"type":"TypeString","required":true},"target_vm_name":{"type":"TypeString","required":true,"forceNew":true},"target_vm_size":{"type":"TypeString","optional":true},"target_zone":{"type":"TypeString","optional":true},"test_network_id":{"type":"TypeString","optional":true}},"timeouts":{"create":120,"read":5,"delete":90,"update":90}},"azurerm_site_recovery_vmware_replication_policy":{"schema":{"application_consistent_snapshot_frequency_in_minutes":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"recovery_point_retention_in_minutes":{"type":"TypeInt","required":true},"recovery_vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_site_recovery_vmware_replication_policy_association":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"policy_id":{"type":"TypeString","required":true,"forceNew":true},"recovery_vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_snapshot":{"schema":{"create_option":{"type":"TypeString","required":true},"disk_access_id":{"type":"TypeString","optional":true},"disk_size_gb":{"type":"TypeInt","optional":true,"computed":true},"encryption_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"disk_encryption_key":{"type":"TypeList","required":true,"elem":{"schema":{"secret_url":{"type":"TypeString","required":true},"source_vault_id":{"type":"TypeString","required":true}}},"maxItems":1},"key_encryption_key":{"type":"TypeList","optional":true,"elem":{"schema":{"key_url":{"type":"TypeString","required":true},"source_vault_id":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"incremental_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_access_policy":{"type":"TypeString","optional":true,"default":"AllowAll"},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source_resource_id":{"type":"TypeString","optional":true,"forceNew":true},"source_uri":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_id":{"type":"TypeString","optional":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"trusted_launch_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_source_control_token":{"schema":{"token":{"type":"TypeString","required":true},"token_secret":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}},"timeouts":{"create":5,"read":5,"delete":5,"update":5}},"azurerm_spatial_anchors_account":{"schema":{"account_domain":{"type":"TypeString","computed":true},"account_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_accelerator":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_spring_cloud_active_deployment":{"schema":{"deployment_name":{"type":"TypeString","required":true},"spring_cloud_app_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_api_portal":{"schema":{"api_try_out_enabled":{"type":"TypeBool","optional":true},"gateway_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"https_only_enabled":{"type":"TypeBool","optional":true},"instance_count":{"type":"TypeInt","optional":true,"default":1},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true},"sso":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","optional":true},"client_secret":{"type":"TypeString","optional":true},"issuer_uri":{"type":"TypeString","optional":true},"scope":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"url":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_api_portal_custom_domain":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_api_portal_id":{"type":"TypeString","required":true,"forceNew":true},"thumbprint":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_app":{"schema":{"addon_json":{"type":"TypeString","optional":true,"computed":true},"custom_persistent_disk":{"type":"TypeList","optional":true,"elem":{"schema":{"mount_options":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"mount_path":{"type":"TypeString","required":true},"read_only_enabled":{"type":"TypeBool","optional":true,"default":false},"share_name":{"type":"TypeString","required":true},"storage_name":{"type":"TypeString","required":true}}},"minItems":1},"fqdn":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"ingress_settings":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"backend_protocol":{"type":"TypeString","optional":true,"default":"Default"},"read_timeout_in_seconds":{"type":"TypeInt","optional":true,"default":300},"send_timeout_in_seconds":{"type":"TypeInt","optional":true,"default":60},"session_affinity":{"type":"TypeString","optional":true,"default":"None"},"session_cookie_max_age":{"type":"TypeInt","optional":true}}},"maxItems":1},"is_public":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"persistent_disk":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"mount_path":{"type":"TypeString","optional":true,"default":"/persistent"},"size_in_gb":{"type":"TypeInt","required":true}}},"maxItems":1},"public_endpoint_enabled":{"type":"TypeBool","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_name":{"type":"TypeString","required":true,"forceNew":true},"tls_enabled":{"type":"TypeBool","optional":true,"default":false},"url":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_app_cosmosdb_association":{"schema":{"api_type":{"type":"TypeString","required":true,"forceNew":true},"cosmosdb_access_key":{"type":"TypeString","required":true},"cosmosdb_account_id":{"type":"TypeString","required":true,"forceNew":true},"cosmosdb_cassandra_keyspace_name":{"type":"TypeString","optional":true},"cosmosdb_gremlin_database_name":{"type":"TypeString","optional":true},"cosmosdb_gremlin_graph_name":{"type":"TypeString","optional":true},"cosmosdb_mongo_database_name":{"type":"TypeString","optional":true},"cosmosdb_sql_database_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_app_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_app_dynamics_application_performance_monitoring":{"schema":{"agent_account_access_key":{"type":"TypeString","required":true},"agent_account_name":{"type":"TypeString","required":true},"agent_application_name":{"type":"TypeString","optional":true},"agent_node_name":{"type":"TypeString","optional":true},"agent_tier_name":{"type":"TypeString","optional":true},"agent_unique_host_id":{"type":"TypeString","optional":true},"controller_host_name":{"type":"TypeString","required":true},"controller_port":{"type":"TypeInt","optional":true},"controller_ssl_enabled":{"type":"TypeBool","optional":true},"globally_enabled":{"type":"TypeBool","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_app_mysql_association":{"schema":{"database_name":{"type":"TypeString","required":true},"mysql_server_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true},"spring_cloud_app_id":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_app_redis_association":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"redis_access_key":{"type":"TypeString","required":true},"redis_cache_id":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_app_id":{"type":"TypeString","required":true,"forceNew":true},"ssl_enabled":{"type":"TypeBool","optional":true,"default":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_application_insights_application_performance_monitoring":{"schema":{"connection_string":{"type":"TypeString","optional":true},"globally_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"role_instance":{"type":"TypeString","optional":true},"role_name":{"type":"TypeString","optional":true},"sampling_percentage":{"type":"TypeInt","optional":true},"sampling_requests_per_second":{"type":"TypeInt","optional":true},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_application_live_view":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_spring_cloud_build_deployment":{"schema":{"addon_json":{"type":"TypeString","optional":true,"computed":true},"application_performance_monitoring_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"build_result_id":{"type":"TypeString","required":true},"environment_variables":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"instance_count":{"type":"TypeInt","optional":true,"default":1},"name":{"type":"TypeString","required":true,"forceNew":true},"quota":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"cpu":{"type":"TypeString","optional":true,"computed":true},"memory":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"spring_cloud_app_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_build_pack_binding":{"schema":{"binding_type":{"type":"TypeString","optional":true},"launch":{"type":"TypeList","optional":true,"elem":{"schema":{"properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"secrets":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_builder_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_builder":{"schema":{"build_pack_group":{"type":"TypeSet","required":true,"elem":{"schema":{"build_pack_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"name":{"type":"TypeString","required":true}}},"minItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true},"stack":{"type":"TypeList","required":true,"elem":{"schema":{"id":{"type":"TypeString","required":true},"version":{"type":"TypeString","required":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_certificate":{"schema":{"certificate_content":{"type":"TypeString","optional":true,"forceNew":true},"exclude_private_key":{"type":"TypeBool","optional":true,"forceNew":true},"key_vault_certificate_id":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_name":{"type":"TypeString","required":true,"forceNew":true},"thumbprint":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_spring_cloud_configuration_service":{"schema":{"generation":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"refresh_interval_in_seconds":{"type":"TypeInt","optional":true},"repository":{"type":"TypeList","optional":true,"elem":{"schema":{"ca_certificate_id":{"type":"TypeString","optional":true},"host_key":{"type":"TypeString","optional":true},"host_key_algorithm":{"type":"TypeString","optional":true},"label":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"password":{"type":"TypeString","optional":true},"patterns":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"private_key":{"type":"TypeString","optional":true},"search_paths":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"strict_host_key_checking":{"type":"TypeBool","optional":true},"uri":{"type":"TypeString","required":true},"username":{"type":"TypeString","optional":true}}}},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_connection":{"schema":{"authentication":{"type":"TypeList","required":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"client_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true},"principal_id":{"type":"TypeString","optional":true},"secret":{"type":"TypeString","optional":true},"subscription_id":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"client_type":{"type":"TypeString","optional":true,"default":"none"},"name":{"type":"TypeString","required":true,"forceNew":true},"secret_store":{"type":"TypeList","optional":true,"elem":{"schema":{"key_vault_id":{"type":"TypeString","required":true}}},"maxItems":1},"spring_cloud_id":{"type":"TypeString","required":true,"forceNew":true},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true},"vnet_solution":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_container_deployment":{"schema":{"addon_json":{"type":"TypeString","optional":true,"computed":true},"application_performance_monitoring_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"arguments":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"commands":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"environment_variables":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"image":{"type":"TypeString","required":true},"instance_count":{"type":"TypeInt","optional":true,"default":1},"language_framework":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"quota":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"cpu":{"type":"TypeString","optional":true,"computed":true},"memory":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"server":{"type":"TypeString","required":true},"spring_cloud_app_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_custom_domain":{"schema":{"certificate_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_app_id":{"type":"TypeString","required":true,"forceNew":true},"thumbprint":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_customized_accelerator":{"schema":{"accelerator_tags":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"accelerator_type":{"type":"TypeString","optional":true,"default":"Accelerator"},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true},"git_repository":{"type":"TypeList","required":true,"elem":{"schema":{"basic_auth":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true}}},"maxItems":1},"branch":{"type":"TypeString","optional":true},"ca_certificate_id":{"type":"TypeString","optional":true},"commit":{"type":"TypeString","optional":true},"git_tag":{"type":"TypeString","optional":true},"interval_in_seconds":{"type":"TypeInt","optional":true},"path":{"type":"TypeString","optional":true},"ssh_auth":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"host_key":{"type":"TypeString","optional":true},"host_key_algorithm":{"type":"TypeString","optional":true},"private_key":{"type":"TypeString","required":true}}},"maxItems":1},"url":{"type":"TypeString","required":true}}},"maxItems":1},"icon_url":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_accelerator_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_dev_tool_portal":{"schema":{"application_accelerator_enabled":{"type":"TypeBool","optional":true,"computed":true},"application_live_view_enabled":{"type":"TypeBool","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true},"sso":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","optional":true},"client_secret":{"type":"TypeString","optional":true},"metadata_url":{"type":"TypeString","optional":true},"scope":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_dynatrace_application_performance_monitoring":{"schema":{"api_token":{"type":"TypeString","optional":true},"api_url":{"type":"TypeString","optional":true},"connection_point":{"type":"TypeString","required":true},"environment_id":{"type":"TypeString","optional":true},"globally_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true},"tenant":{"type":"TypeString","required":true},"tenant_token":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_elastic_application_performance_monitoring":{"schema":{"application_packages":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"globally_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"server_url":{"type":"TypeString","required":true},"service_name":{"type":"TypeString","required":true},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_gateway":{"schema":{"api_metadata":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"documentation_url":{"type":"TypeString","optional":true},"server_url":{"type":"TypeString","optional":true},"title":{"type":"TypeString","optional":true},"version":{"type":"TypeString","optional":true}}},"maxItems":1},"application_performance_monitoring_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"application_performance_monitoring_types":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"client_authorization":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"verification_enabled":{"type":"TypeBool","optional":true}}},"maxItems":1},"cors":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_headers":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"allowed_methods":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"allowed_origin_patterns":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"allowed_origins":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"credentials_allowed":{"type":"TypeBool","optional":true},"exposed_headers":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"max_age_seconds":{"type":"TypeInt","optional":true}}},"maxItems":1},"environment_variables":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"https_only":{"type":"TypeBool","optional":true},"instance_count":{"type":"TypeInt","optional":true,"default":1},"local_response_cache_per_instance":{"type":"TypeList","optional":true,"elem":{"schema":{"size":{"type":"TypeString","optional":true},"time_to_live":{"type":"TypeString","optional":true}}},"maxItems":1},"local_response_cache_per_route":{"type":"TypeList","optional":true,"elem":{"schema":{"size":{"type":"TypeString","optional":true},"time_to_live":{"type":"TypeString","optional":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true},"quota":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"cpu":{"type":"TypeString","optional":true,"default":"1"},"memory":{"type":"TypeString","optional":true,"default":"2Gi"}}},"maxItems":1},"sensitive_environment_variables":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true},"sso":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","optional":true},"client_secret":{"type":"TypeString","optional":true},"issuer_uri":{"type":"TypeString","optional":true},"scope":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"url":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_gateway_custom_domain":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_gateway_id":{"type":"TypeString","required":true,"forceNew":true},"thumbprint":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_gateway_route_config":{"schema":{"filters":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"open_api":{"type":"TypeList","optional":true,"elem":{"schema":{"uri":{"type":"TypeString","optional":true}}},"maxItems":1},"predicates":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"protocol":{"type":"TypeString","optional":true,"default":"HTTP"},"route":{"type":"TypeSet","optional":true,"elem":{"schema":{"classification_tags":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"description":{"type":"TypeString","optional":true},"filters":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"order":{"type":"TypeInt","required":true},"predicates":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"sso_validation_enabled":{"type":"TypeBool","optional":true},"title":{"type":"TypeString","optional":true},"token_relay":{"type":"TypeBool","optional":true},"uri":{"type":"TypeString","optional":true}}}},"spring_cloud_app_id":{"type":"TypeString","optional":true},"spring_cloud_gateway_id":{"type":"TypeString","required":true,"forceNew":true},"sso_validation_enabled":{"type":"TypeBool","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_java_deployment":{"schema":{"environment_variables":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"instance_count":{"type":"TypeInt","optional":true,"default":1},"jvm_options":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"quota":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"cpu":{"type":"TypeString","optional":true,"computed":true},"memory":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true,"default":"Java_8"},"spring_cloud_app_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_new_relic_application_performance_monitoring":{"schema":{"agent_enabled":{"type":"TypeBool","optional":true,"default":true},"app_name":{"type":"TypeString","required":true},"app_server_port":{"type":"TypeInt","optional":true},"audit_mode_enabled":{"type":"TypeBool","optional":true},"auto_app_naming_enabled":{"type":"TypeBool","optional":true},"auto_transaction_naming_enabled":{"type":"TypeBool","optional":true,"default":true},"custom_tracing_enabled":{"type":"TypeBool","optional":true,"default":true},"globally_enabled":{"type":"TypeBool","optional":true},"labels":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"license_key":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_service":{"schema":{"build_agent_pool_size":{"type":"TypeString","optional":true},"config_server_git_setting":{"type":"TypeList","optional":true,"elem":{"schema":{"http_basic_auth":{"type":"TypeList","optional":true,"elem":{"schema":{"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true}}},"maxItems":1},"label":{"type":"TypeString","optional":true},"repository":{"type":"TypeList","optional":true,"elem":{"schema":{"http_basic_auth":{"type":"TypeList","optional":true,"elem":{"schema":{"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true}}},"maxItems":1},"label":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"pattern":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"search_paths":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"ssh_auth":{"type":"TypeList","optional":true,"elem":{"schema":{"host_key":{"type":"TypeString","optional":true},"host_key_algorithm":{"type":"TypeString","optional":true},"private_key":{"type":"TypeString","required":true},"strict_host_key_checking_enabled":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"uri":{"type":"TypeString","required":true}}}},"search_paths":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"ssh_auth":{"type":"TypeList","optional":true,"elem":{"schema":{"host_key":{"type":"TypeString","optional":true},"host_key_algorithm":{"type":"TypeString","optional":true},"private_key":{"type":"TypeString","required":true},"strict_host_key_checking_enabled":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"uri":{"type":"TypeString","required":true}}},"maxItems":1},"container_registry":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"password":{"type":"TypeString","required":true},"server":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true}}}},"default_build_service":{"type":"TypeList","optional":true,"elem":{"schema":{"container_registry_name":{"type":"TypeString","optional":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"log_stream_public_endpoint_enabled":{"type":"TypeBool","optional":true},"managed_environment_id":{"type":"TypeString","optional":true},"marketplace":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"plan":{"type":"TypeString","required":true},"product":{"type":"TypeString","required":true},"publisher":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"app_network_resource_group":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"app_subnet_id":{"type":"TypeString","required":true,"forceNew":true},"cidr_ranges":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":3},"outbound_type":{"type":"TypeString","optional":true,"default":"loadBalancer","forceNew":true},"read_timeout_seconds":{"type":"TypeInt","optional":true},"service_runtime_network_resource_group":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"service_runtime_subnet_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"outbound_public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"required_network_traffic_rules":{"type":"TypeList","computed":true,"elem":{"schema":{"direction":{"type":"TypeString","computed":true},"fqdns":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"port":{"type":"TypeInt","computed":true},"protocol":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_registry_enabled":{"type":"TypeBool","optional":true},"service_registry_id":{"type":"TypeString","computed":true},"sku_name":{"type":"TypeString","optional":true,"default":"S0","forceNew":true},"sku_tier":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"trace":{"type":"TypeList","optional":true,"elem":{"schema":{"connection_string":{"type":"TypeString","optional":true},"sample_rate":{"type":"TypeFloat","optional":true,"default":10}}},"maxItems":1},"zone_redundant":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":60,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_storage":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true},"storage_account_key":{"type":"TypeString","required":true},"storage_account_name":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_ssh_public_key":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_key":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":45,"read":5,"delete":45,"update":45}},"azurerm_stack_hci_cluster":{"schema":{"automanage_configuration_id":{"type":"TypeString","optional":true},"client_id":{"type":"TypeString","optional":true,"forceNew":true},"cloud_id":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"resource_provider_object_id":{"type":"TypeString","computed":true},"service_endpoint":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stack_hci_logical_network":{"schema":{"custom_location_id":{"type":"TypeString","required":true,"forceNew":true},"dns_servers":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subnet":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"address_prefix":{"type":"TypeString","optional":true,"forceNew":true},"ip_allocation_method":{"type":"TypeString","required":true,"forceNew":true},"ip_pool":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"end":{"type":"TypeString","required":true,"forceNew":true},"start":{"type":"TypeString","required":true,"forceNew":true}}}},"route":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"address_prefix":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"next_hop_ip_address":{"type":"TypeString","required":true,"forceNew":true}}}},"vlan_id":{"type":"TypeInt","optional":true,"forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_switch_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_static_site":{"schema":{"api_key":{"type":"TypeString","computed":true},"app_settings":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"default_host_name":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_size":{"type":"TypeString","optional":true,"default":"Free"},"sku_tier":{"type":"TypeString","optional":true,"default":"Free"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_static_site_custom_domain":{"schema":{"domain_name":{"type":"TypeString","required":true,"forceNew":true},"static_site_id":{"type":"TypeString","required":true,"forceNew":true},"validation_token":{"type":"TypeString","computed":true},"validation_type":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_static_web_app":{"schema":{"api_key":{"type":"TypeString","computed":true},"app_settings":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"basic_auth":{"type":"TypeList","optional":true,"elem":{"schema":{"environments":{"type":"TypeString","required":true},"password":{"type":"TypeString","required":true}}},"maxItems":1},"configuration_file_changes_enabled":{"type":"TypeBool","optional":true,"default":true},"default_host_name":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"preview_environments_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_size":{"type":"TypeString","optional":true,"default":"Free"},"sku_tier":{"type":"TypeString","optional":true,"default":"Free"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_static_web_app_custom_domain":{"schema":{"domain_name":{"type":"TypeString","required":true,"forceNew":true},"static_web_app_id":{"type":"TypeString","required":true,"forceNew":true},"validation_token":{"type":"TypeString","computed":true},"validation_type":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_static_web_app_function_app_registration":{"schema":{"function_app_id":{"type":"TypeString","required":true,"forceNew":true},"static_web_app_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_storage_account":{"schema":{"access_tier":{"type":"TypeString","optional":true,"computed":true},"account_kind":{"type":"TypeString","optional":true,"default":"StorageV2"},"account_replication_type":{"type":"TypeString","required":true},"account_tier":{"type":"TypeString","required":true,"forceNew":true},"allow_nested_items_to_be_public":{"type":"TypeBool","optional":true,"default":true},"allowed_copy_scope":{"type":"TypeString","optional":true},"azure_files_authentication":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"domain_guid":{"type":"TypeString","required":true},"domain_name":{"type":"TypeString","required":true},"domain_sid":{"type":"TypeString","optional":true},"forest_name":{"type":"TypeString","optional":true},"netbios_domain_name":{"type":"TypeString","optional":true},"storage_sid":{"type":"TypeString","optional":true}}},"maxItems":1},"default_share_level_permission":{"type":"TypeString","optional":true,"default":"None"},"directory_type":{"type":"TypeString","required":true}}},"maxItems":1},"blob_properties":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"change_feed_enabled":{"type":"TypeBool","optional":true,"default":false},"change_feed_retention_in_days":{"type":"TypeInt","optional":true},"container_delete_retention_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"days":{"type":"TypeInt","optional":true,"default":7}}},"maxItems":1},"cors_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_headers":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64,"minItems":1},"allowed_methods":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64},"allowed_origins":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64},"exposed_headers":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64,"minItems":1},"max_age_in_seconds":{"type":"TypeInt","required":true}}},"maxItems":5},"default_service_version":{"type":"TypeString","optional":true,"computed":true},"delete_retention_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"days":{"type":"TypeInt","optional":true,"default":7},"permanent_delete_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"last_access_time_enabled":{"type":"TypeBool","optional":true,"default":false},"restore_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"days":{"type":"TypeInt","required":true}}},"maxItems":1},"versioning_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"cross_tenant_replication_enabled":{"type":"TypeBool","optional":true,"default":false},"custom_domain":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"use_subdomain":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"customer_managed_key":{"type":"TypeList","optional":true,"elem":{"schema":{"key_vault_key_id":{"type":"TypeString","optional":true},"managed_hsm_key_id":{"type":"TypeString","optional":true},"user_assigned_identity_id":{"type":"TypeString","required":true}}},"maxItems":1},"default_to_oauth_authentication":{"type":"TypeBool","optional":true,"default":false},"dns_endpoint_type":{"type":"TypeString","optional":true,"default":"Standard","forceNew":true},"edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"https_traffic_only_enabled":{"type":"TypeBool","optional":true,"default":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"immutability_policy":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"allow_protected_append_writes":{"type":"TypeBool","required":true},"period_since_creation_in_days":{"type":"TypeInt","required":true},"state":{"type":"TypeString","required":true}}},"maxItems":1},"infrastructure_encryption_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"is_hns_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"large_file_share_enabled":{"type":"TypeBool","optional":true,"computed":true},"local_user_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"min_tls_version":{"type":"TypeString","optional":true,"default":"TLS1_2"},"name":{"type":"TypeString","required":true,"forceNew":true},"network_rules":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"bypass":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"default_action":{"type":"TypeString","required":true},"ip_rules":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"private_link_access":{"type":"TypeList","optional":true,"elem":{"schema":{"endpoint_resource_id":{"type":"TypeString","required":true},"endpoint_tenant_id":{"type":"TypeString","optional":true,"computed":true}}}},"virtual_network_subnet_ids":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"nfsv3_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"primary_access_key":{"type":"TypeString","computed":true},"primary_blob_connection_string":{"type":"TypeString","computed":true},"primary_blob_endpoint":{"type":"TypeString","computed":true},"primary_blob_host":{"type":"TypeString","computed":true},"primary_blob_internet_endpoint":{"type":"TypeString","computed":true},"primary_blob_internet_host":{"type":"TypeString","computed":true},"primary_blob_microsoft_endpoint":{"type":"TypeString","computed":true},"primary_blob_microsoft_host":{"type":"TypeString","computed":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_dfs_endpoint":{"type":"TypeString","computed":true},"primary_dfs_host":{"type":"TypeString","computed":true},"primary_dfs_internet_endpoint":{"type":"TypeString","computed":true},"primary_dfs_internet_host":{"type":"TypeString","computed":true},"primary_dfs_microsoft_endpoint":{"type":"TypeString","computed":true},"primary_dfs_microsoft_host":{"type":"TypeString","computed":true},"primary_file_endpoint":{"type":"TypeString","computed":true},"primary_file_host":{"type":"TypeString","computed":true},"primary_file_internet_endpoint":{"type":"TypeString","computed":true},"primary_file_internet_host":{"type":"TypeString","computed":true},"primary_file_microsoft_endpoint":{"type":"TypeString","computed":true},"primary_file_microsoft_host":{"type":"TypeString","computed":true},"primary_location":{"type":"TypeString","computed":true},"primary_queue_endpoint":{"type":"TypeString","computed":true},"primary_queue_host":{"type":"TypeString","computed":true},"primary_queue_microsoft_endpoint":{"type":"TypeString","computed":true},"primary_queue_microsoft_host":{"type":"TypeString","computed":true},"primary_table_endpoint":{"type":"TypeString","computed":true},"primary_table_host":{"type":"TypeString","computed":true},"primary_table_microsoft_endpoint":{"type":"TypeString","computed":true},"primary_table_microsoft_host":{"type":"TypeString","computed":true},"primary_web_endpoint":{"type":"TypeString","computed":true},"primary_web_host":{"type":"TypeString","computed":true},"primary_web_internet_endpoint":{"type":"TypeString","computed":true},"primary_web_internet_host":{"type":"TypeString","computed":true},"primary_web_microsoft_endpoint":{"type":"TypeString","computed":true},"primary_web_microsoft_host":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"queue_encryption_key_type":{"type":"TypeString","optional":true,"default":"Service","forceNew":true},"queue_properties":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"cors_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_headers":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64,"minItems":1},"allowed_methods":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64},"allowed_origins":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64},"exposed_headers":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64,"minItems":1},"max_age_in_seconds":{"type":"TypeInt","required":true}}},"maxItems":5},"hour_metrics":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","required":true},"include_apis":{"type":"TypeBool","optional":true},"retention_policy_days":{"type":"TypeInt","optional":true},"version":{"type":"TypeString","required":true}}},"maxItems":1},"logging":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"delete":{"type":"TypeBool","required":true},"read":{"type":"TypeBool","required":true},"retention_policy_days":{"type":"TypeInt","optional":true},"version":{"type":"TypeString","required":true},"write":{"type":"TypeBool","required":true}}},"maxItems":1},"minute_metrics":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","required":true},"include_apis":{"type":"TypeBool","optional":true},"retention_policy_days":{"type":"TypeInt","optional":true},"version":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"routing":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"choice":{"type":"TypeString","optional":true,"default":"MicrosoftRouting"},"publish_internet_endpoints":{"type":"TypeBool","optional":true,"default":false},"publish_microsoft_endpoints":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"sas_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"expiration_action":{"type":"TypeString","optional":true,"default":"Log"},"expiration_period":{"type":"TypeString","required":true}}},"maxItems":1,"minItems":1},"secondary_access_key":{"type":"TypeString","computed":true},"secondary_blob_connection_string":{"type":"TypeString","computed":true},"secondary_blob_endpoint":{"type":"TypeString","computed":true},"secondary_blob_host":{"type":"TypeString","computed":true},"secondary_blob_internet_endpoint":{"type":"TypeString","computed":true},"secondary_blob_internet_host":{"type":"TypeString","computed":true},"secondary_blob_microsoft_endpoint":{"type":"TypeString","computed":true},"secondary_blob_microsoft_host":{"type":"TypeString","computed":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_dfs_endpoint":{"type":"TypeString","computed":true},"secondary_dfs_host":{"type":"TypeString","computed":true},"secondary_dfs_internet_endpoint":{"type":"TypeString","computed":true},"secondary_dfs_internet_host":{"type":"TypeString","computed":true},"secondary_dfs_microsoft_endpoint":{"type":"TypeString","computed":true},"secondary_dfs_microsoft_host":{"type":"TypeString","computed":true},"secondary_file_endpoint":{"type":"TypeString","computed":true},"secondary_file_host":{"type":"TypeString","computed":true},"secondary_file_internet_endpoint":{"type":"TypeString","computed":true},"secondary_file_internet_host":{"type":"TypeString","computed":true},"secondary_file_microsoft_endpoint":{"type":"TypeString","computed":true},"secondary_file_microsoft_host":{"type":"TypeString","computed":true},"secondary_location":{"type":"TypeString","computed":true},"secondary_queue_endpoint":{"type":"TypeString","computed":true},"secondary_queue_host":{"type":"TypeString","computed":true},"secondary_queue_microsoft_endpoint":{"type":"TypeString","computed":true},"secondary_queue_microsoft_host":{"type":"TypeString","computed":true},"secondary_table_endpoint":{"type":"TypeString","computed":true},"secondary_table_host":{"type":"TypeString","computed":true},"secondary_table_microsoft_endpoint":{"type":"TypeString","computed":true},"secondary_table_microsoft_host":{"type":"TypeString","computed":true},"secondary_web_endpoint":{"type":"TypeString","computed":true},"secondary_web_host":{"type":"TypeString","computed":true},"secondary_web_internet_endpoint":{"type":"TypeString","computed":true},"secondary_web_internet_host":{"type":"TypeString","computed":true},"secondary_web_microsoft_endpoint":{"type":"TypeString","computed":true},"secondary_web_microsoft_host":{"type":"TypeString","computed":true},"sftp_enabled":{"type":"TypeBool","optional":true,"default":false},"share_properties":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"cors_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_headers":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64,"minItems":1},"allowed_methods":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64},"allowed_origins":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64},"exposed_headers":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64,"minItems":1},"max_age_in_seconds":{"type":"TypeInt","required":true}}},"maxItems":5},"retention_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"days":{"type":"TypeInt","optional":true,"default":7}}},"maxItems":1},"smb":{"type":"TypeList","optional":true,"elem":{"schema":{"authentication_types":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"channel_encryption_type":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"kerberos_ticket_encryption_type":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"multichannel_enabled":{"type":"TypeBool","optional":true,"default":false},"versions":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}},"maxItems":1},"shared_access_key_enabled":{"type":"TypeBool","optional":true,"default":true},"static_website":{"type":"TypeList","optional":true,"elem":{"schema":{"error_404_document":{"type":"TypeString","optional":true},"index_document":{"type":"TypeString","optional":true}}},"maxItems":1},"table_encryption_key_type":{"type":"TypeString","optional":true,"default":"Service","forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_storage_account_customer_managed_key":{"schema":{"federated_identity_client_id":{"type":"TypeString","optional":true},"key_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","optional":true},"key_vault_uri":{"type":"TypeString","optional":true,"computed":true},"key_version":{"type":"TypeString","optional":true},"managed_hsm_key_id":{"type":"TypeString","optional":true},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true},"user_assigned_identity_id":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_account_local_user":{"schema":{"home_directory":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","computed":true},"permission_scope":{"type":"TypeList","optional":true,"elem":{"schema":{"permissions":{"type":"TypeList","required":true,"elem":{"schema":{"create":{"type":"TypeBool","optional":true,"default":false},"delete":{"type":"TypeBool","optional":true,"default":false},"list":{"type":"TypeBool","optional":true,"default":false},"read":{"type":"TypeBool","optional":true,"default":false},"write":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"resource_name":{"type":"TypeString","required":true},"service":{"type":"TypeString","required":true}}}},"sid":{"type":"TypeString","computed":true},"ssh_authorized_key":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"key":{"type":"TypeString","required":true}}}},"ssh_key_enabled":{"type":"TypeBool","optional":true,"default":false},"ssh_password_enabled":{"type":"TypeBool","optional":true,"default":false},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_account_network_rules":{"schema":{"bypass":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"default_action":{"type":"TypeString","required":true},"ip_rules":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"private_link_access":{"type":"TypeList","optional":true,"elem":{"schema":{"endpoint_resource_id":{"type":"TypeString","required":true},"endpoint_tenant_id":{"type":"TypeString","optional":true,"computed":true}}}},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_subnet_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_storage_blob":{"schema":{"access_tier":{"type":"TypeString","optional":true,"computed":true},"cache_control":{"type":"TypeString","optional":true},"content_md5":{"type":"TypeString","optional":true,"forceNew":true},"content_type":{"type":"TypeString","optional":true,"default":"application/octet-stream"},"encryption_scope":{"type":"TypeString","optional":true,"forceNew":true},"metadata":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"parallelism":{"type":"TypeInt","optional":true,"default":8,"forceNew":true},"size":{"type":"TypeInt","optional":true,"default":0,"forceNew":true},"source":{"type":"TypeString","optional":true,"forceNew":true},"source_content":{"type":"TypeString","optional":true,"forceNew":true},"source_uri":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_name":{"type":"TypeString","required":true,"forceNew":true},"storage_container_name":{"type":"TypeString","required":true,"forceNew":true},"type":{"type":"TypeString","required":true,"forceNew":true},"url":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_blob_inventory_policy":{"schema":{"rules":{"type":"TypeSet","required":true,"elem":{"schema":{"filter":{"type":"TypeList","optional":true,"elem":{"schema":{"blob_types":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"exclude_prefixes":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":10},"include_blob_versions":{"type":"TypeBool","optional":true,"default":false},"include_deleted":{"type":"TypeBool","optional":true,"default":false},"include_snapshots":{"type":"TypeBool","optional":true,"default":false},"prefix_match":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":10}}},"maxItems":1},"format":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"schedule":{"type":"TypeString","required":true},"schema_fields":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"scope":{"type":"TypeString","required":true},"storage_container_name":{"type":"TypeString","required":true}}}},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_container":{"schema":{"container_access_type":{"type":"TypeString","optional":true,"default":"private"},"default_encryption_scope":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"encryption_scope_override_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"has_immutability_policy":{"type":"TypeBool","computed":true},"has_legal_hold":{"type":"TypeBool","computed":true},"metadata":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_manager_id":{"type":"TypeString","computed":true},"storage_account_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_container_immutability_policy":{"schema":{"immutability_period_in_days":{"type":"TypeInt","required":true},"locked":{"type":"TypeBool","optional":true,"default":false},"protected_append_writes_all_enabled":{"type":"TypeBool","optional":true,"default":false},"protected_append_writes_enabled":{"type":"TypeBool","optional":true,"default":false},"storage_container_resource_manager_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":10,"read":5,"delete":10,"update":10}},"azurerm_storage_data_lake_gen2_filesystem":{"schema":{"ace":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"id":{"type":"TypeString","optional":true},"permissions":{"type":"TypeString","required":true},"scope":{"type":"TypeString","optional":true,"default":"access"},"type":{"type":"TypeString","required":true}}}},"default_encryption_scope":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"group":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"owner":{"type":"TypeString","optional":true,"computed":true},"properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_data_lake_gen2_path":{"schema":{"ace":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"id":{"type":"TypeString","optional":true},"permissions":{"type":"TypeString","required":true},"scope":{"type":"TypeString","optional":true,"default":"access"},"type":{"type":"TypeString","required":true}}}},"filesystem_name":{"type":"TypeString","required":true,"forceNew":true},"group":{"type":"TypeString","optional":true,"computed":true},"owner":{"type":"TypeString","optional":true,"computed":true},"path":{"type":"TypeString","required":true,"forceNew":true},"resource":{"type":"TypeString","required":true,"forceNew":true},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_encryption_scope":{"schema":{"infrastructure_encryption_required":{"type":"TypeBool","optional":true,"forceNew":true},"key_vault_key_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"source":{"type":"TypeString","required":true},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_management_policy":{"schema":{"rule":{"type":"TypeList","optional":true,"elem":{"schema":{"actions":{"type":"TypeList","required":true,"elem":{"schema":{"base_blob":{"type":"TypeList","optional":true,"elem":{"schema":{"auto_tier_to_hot_from_cool_enabled":{"type":"TypeBool","optional":true},"delete_after_days_since_creation_greater_than":{"type":"TypeInt","optional":true,"default":-1},"delete_after_days_since_last_access_time_greater_than":{"type":"TypeInt","optional":true,"default":-1},"delete_after_days_since_modification_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_archive_after_days_since_creation_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_archive_after_days_since_last_access_time_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_archive_after_days_since_last_tier_change_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_archive_after_days_since_modification_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_cold_after_days_since_creation_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_cold_after_days_since_last_access_time_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_cold_after_days_since_modification_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_cool_after_days_since_creation_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_cool_after_days_since_last_access_time_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_cool_after_days_since_modification_greater_than":{"type":"TypeInt","optional":true,"default":-1}}},"maxItems":1},"snapshot":{"type":"TypeList","optional":true,"elem":{"schema":{"change_tier_to_archive_after_days_since_creation":{"type":"TypeInt","optional":true,"default":-1},"change_tier_to_cool_after_days_since_creation":{"type":"TypeInt","optional":true,"default":-1},"delete_after_days_since_creation_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_archive_after_days_since_last_tier_change_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_cold_after_days_since_creation_greater_than":{"type":"TypeInt","optional":true,"default":-1}}},"maxItems":1},"version":{"type":"TypeList","optional":true,"elem":{"schema":{"change_tier_to_archive_after_days_since_creation":{"type":"TypeInt","optional":true,"default":-1},"change_tier_to_cool_after_days_since_creation":{"type":"TypeInt","optional":true,"default":-1},"delete_after_days_since_creation":{"type":"TypeInt","optional":true,"default":-1},"tier_to_archive_after_days_since_last_tier_change_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_cold_after_days_since_creation_greater_than":{"type":"TypeInt","optional":true,"default":-1}}},"maxItems":1}}},"maxItems":1},"enabled":{"type":"TypeBool","required":true},"filters":{"type":"TypeList","required":true,"elem":{"schema":{"blob_types":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"match_blob_index_tag":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"operation":{"type":"TypeString","optional":true,"default":"=="},"value":{"type":"TypeString","required":true}}}},"prefix_match":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"name":{"type":"TypeString","required":true}}},"minItems":1},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_mover":{"schema":{"description":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_mover_agent":{"schema":{"arc_virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true},"arc_virtual_machine_uuid":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"storage_mover_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_mover_job_definition":{"schema":{"agent_name":{"type":"TypeString","optional":true},"copy_mode":{"type":"TypeString","required":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"source_name":{"type":"TypeString","required":true,"forceNew":true},"source_sub_path":{"type":"TypeString","optional":true,"forceNew":true},"storage_mover_project_id":{"type":"TypeString","required":true,"forceNew":true},"target_name":{"type":"TypeString","required":true,"forceNew":true},"target_sub_path":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_mover_project":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"storage_mover_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_mover_source_endpoint":{"schema":{"description":{"type":"TypeString","optional":true},"export":{"type":"TypeString","optional":true,"forceNew":true},"host":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"nfs_version":{"type":"TypeString","optional":true,"default":"NFSauto","forceNew":true},"storage_mover_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_mover_target_endpoint":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true},"storage_container_name":{"type":"TypeString","required":true,"forceNew":true},"storage_mover_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_object_replication":{"schema":{"destination_object_replication_id":{"type":"TypeString","computed":true},"destination_storage_account_id":{"type":"TypeString","required":true,"forceNew":true},"rules":{"type":"TypeSet","required":true,"elem":{"schema":{"copy_blobs_created_after":{"type":"TypeString","optional":true,"default":"OnlyNewObjects"},"destination_container_name":{"type":"TypeString","required":true,"forceNew":true},"filter_out_blobs_with_prefix":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"source_container_name":{"type":"TypeString","required":true,"forceNew":true}}}},"source_object_replication_id":{"type":"TypeString","computed":true},"source_storage_account_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_queue":{"schema":{"metadata":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_manager_id":{"type":"TypeString","computed":true},"storage_account_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_share":{"schema":{"access_tier":{"type":"TypeString","optional":true,"computed":true},"acl":{"type":"TypeSet","optional":true,"elem":{"schema":{"access_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"expiry":{"type":"TypeString","optional":true},"permissions":{"type":"TypeString","required":true},"start":{"type":"TypeString","optional":true}}}},"id":{"type":"TypeString","required":true}}}},"enabled_protocol":{"type":"TypeString","optional":true,"default":"SMB","forceNew":true},"metadata":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"quota":{"type":"TypeInt","required":true},"resource_manager_id":{"type":"TypeString","computed":true},"storage_account_name":{"type":"TypeString","required":true,"forceNew":true},"url":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_share_directory":{"schema":{"metadata":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"storage_share_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_share_file":{"schema":{"content_disposition":{"type":"TypeString","optional":true},"content_encoding":{"type":"TypeString","optional":true},"content_length":{"type":"TypeInt","computed":true},"content_md5":{"type":"TypeString","optional":true,"forceNew":true},"content_type":{"type":"TypeString","optional":true,"default":"application/octet-stream"},"metadata":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"path":{"type":"TypeString","optional":true,"default":"","forceNew":true},"source":{"type":"TypeString","optional":true,"forceNew":true},"storage_share_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_sync":{"schema":{"incoming_traffic_policy":{"type":"TypeString","optional":true,"default":"AllowAllTraffic"},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"registered_servers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_sync_cloud_endpoint":{"schema":{"file_share_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true},"storage_account_tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"storage_sync_group_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":45,"read":5,"delete":45}},"azurerm_storage_sync_group":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"storage_sync_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_storage_sync_server_endpoint":{"schema":{"cloud_tiering_enabled":{"type":"TypeBool","optional":true,"default":false},"initial_download_policy":{"type":"TypeString","optional":true,"default":"NamespaceThenModifiedFiles","forceNew":true},"local_cache_mode":{"type":"TypeString","optional":true,"default":"UpdateLocallyCachedFiles"},"name":{"type":"TypeString","required":true,"forceNew":true},"registered_server_id":{"type":"TypeString","required":true,"forceNew":true},"server_local_path":{"type":"TypeString","required":true,"forceNew":true},"storage_sync_group_id":{"type":"TypeString","required":true,"forceNew":true},"tier_files_older_than_days":{"type":"TypeInt","optional":true},"volume_free_space_percent":{"type":"TypeInt","optional":true,"default":20}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_table":{"schema":{"acl":{"type":"TypeSet","optional":true,"elem":{"schema":{"access_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"expiry":{"type":"TypeString","required":true},"permissions":{"type":"TypeString","required":true},"start":{"type":"TypeString","required":true}}}},"id":{"type":"TypeString","required":true}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"storage_account_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_table_entity":{"schema":{"entity":{"type":"TypeMap","required":true,"elem":{"type":"TypeString"}},"partition_key":{"type":"TypeString","required":true,"forceNew":true},"row_key":{"type":"TypeString","required":true,"forceNew":true},"storage_table_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_cluster":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"streaming_capacity":{"type":"TypeInt","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_stream_analytics_function_javascript_uda":{"schema":{"input":{"type":"TypeList","required":true,"elem":{"schema":{"configuration_parameter":{"type":"TypeBool","optional":true,"default":false},"type":{"type":"TypeString","required":true}}},"minItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"output":{"type":"TypeList","required":true,"elem":{"schema":{"type":{"type":"TypeString","required":true}}},"maxItems":1},"script":{"type":"TypeString","required":true},"stream_analytics_job_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_function_javascript_udf":{"schema":{"input":{"type":"TypeList","required":true,"elem":{"schema":{"configuration_parameter":{"type":"TypeBool","optional":true,"default":false},"type":{"type":"TypeString","required":true}}},"minItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"output":{"type":"TypeList","required":true,"elem":{"schema":{"type":{"type":"TypeString","required":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"script":{"type":"TypeString","required":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_job":{"schema":{"compatibility_level":{"type":"TypeString","optional":true,"computed":true},"content_storage_policy":{"type":"TypeString","optional":true,"default":"SystemAccount"},"data_locale":{"type":"TypeString","optional":true,"default":"en-US"},"events_late_arrival_max_delay_in_seconds":{"type":"TypeInt","optional":true,"default":5},"events_out_of_order_max_delay_in_seconds":{"type":"TypeInt","optional":true,"default":0},"events_out_of_order_policy":{"type":"TypeString","optional":true,"default":"Adjust"},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"job_id":{"type":"TypeString","computed":true},"job_storage_account":{"type":"TypeList","optional":true,"elem":{"schema":{"account_key":{"type":"TypeString","required":true},"account_name":{"type":"TypeString","required":true},"authentication_mode":{"type":"TypeString","optional":true,"default":"ConnectionString"}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"output_error_policy":{"type":"TypeString","optional":true,"default":"Drop"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","optional":true,"default":"Standard"},"stream_analytics_cluster_id":{"type":"TypeString","optional":true},"streaming_units":{"type":"TypeInt","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"transformation_query":{"type":"TypeString","required":true},"type":{"type":"TypeString","optional":true,"default":"Cloud","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_job_schedule":{"schema":{"last_output_time":{"type":"TypeString","computed":true},"start_mode":{"type":"TypeString","required":true},"start_time":{"type":"TypeString","optional":true,"computed":true},"stream_analytics_job_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_managed_private_endpoint":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"stream_analytics_cluster_name":{"type":"TypeString","required":true,"forceNew":true},"subresource_name":{"type":"TypeString","required":true,"forceNew":true},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":5}},"azurerm_stream_analytics_output_blob":{"schema":{"authentication_mode":{"type":"TypeString","optional":true,"default":"ConnectionString"},"batch_max_wait_time":{"type":"TypeString","optional":true},"batch_min_rows":{"type":"TypeInt","optional":true},"blob_write_mode":{"type":"TypeString","optional":true,"default":"Append"},"date_format":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"path_pattern":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"serialization":{"type":"TypeList","required":true,"elem":{"schema":{"encoding":{"type":"TypeString","optional":true},"field_delimiter":{"type":"TypeString","optional":true},"format":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"storage_account_key":{"type":"TypeString","optional":true},"storage_account_name":{"type":"TypeString","required":true},"storage_container_name":{"type":"TypeString","required":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true},"time_format":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_output_cosmosdb":{"schema":{"container_name":{"type":"TypeString","required":true},"cosmosdb_account_key":{"type":"TypeString","required":true},"cosmosdb_sql_database_id":{"type":"TypeString","required":true},"document_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"partition_key":{"type":"TypeString","optional":true},"stream_analytics_job_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_output_eventhub":{"schema":{"authentication_mode":{"type":"TypeString","optional":true,"default":"ConnectionString"},"eventhub_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"partition_key":{"type":"TypeString","optional":true},"property_columns":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"serialization":{"type":"TypeList","required":true,"elem":{"schema":{"encoding":{"type":"TypeString","optional":true},"field_delimiter":{"type":"TypeString","optional":true},"format":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"servicebus_namespace":{"type":"TypeString","required":true},"shared_access_policy_key":{"type":"TypeString","optional":true},"shared_access_policy_name":{"type":"TypeString","optional":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_output_function":{"schema":{"api_key":{"type":"TypeString","required":true},"batch_max_count":{"type":"TypeInt","optional":true,"default":100},"batch_max_in_bytes":{"type":"TypeInt","optional":true,"default":262144},"function_app":{"type":"TypeString","required":true},"function_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_output_mssql":{"schema":{"authentication_mode":{"type":"TypeString","optional":true,"default":"ConnectionString"},"database":{"type":"TypeString","required":true,"forceNew":true},"max_batch_count":{"type":"TypeFloat","optional":true,"default":10000},"max_writer_count":{"type":"TypeFloat","optional":true,"default":1},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true},"table":{"type":"TypeString","required":true,"forceNew":true},"user":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_output_powerbi":{"schema":{"dataset":{"type":"TypeString","required":true},"group_id":{"type":"TypeString","required":true},"group_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"stream_analytics_job_id":{"type":"TypeString","required":true,"forceNew":true},"table":{"type":"TypeString","required":true},"token_user_display_name":{"type":"TypeString","optional":true},"token_user_principal_name":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_output_servicebus_queue":{"schema":{"authentication_mode":{"type":"TypeString","optional":true,"default":"ConnectionString"},"name":{"type":"TypeString","required":true,"forceNew":true},"property_columns":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"queue_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"serialization":{"type":"TypeList","required":true,"elem":{"schema":{"encoding":{"type":"TypeString","optional":true},"field_delimiter":{"type":"TypeString","optional":true},"format":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"servicebus_namespace":{"type":"TypeString","required":true},"shared_access_policy_key":{"type":"TypeString","optional":true},"shared_access_policy_name":{"type":"TypeString","optional":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true},"system_property_columns":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_output_servicebus_topic":{"schema":{"authentication_mode":{"type":"TypeString","optional":true,"default":"ConnectionString"},"name":{"type":"TypeString","required":true,"forceNew":true},"property_columns":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"serialization":{"type":"TypeList","required":true,"elem":{"schema":{"encoding":{"type":"TypeString","optional":true},"field_delimiter":{"type":"TypeString","optional":true},"format":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"servicebus_namespace":{"type":"TypeString","required":true},"shared_access_policy_key":{"type":"TypeString","optional":true},"shared_access_policy_name":{"type":"TypeString","optional":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true},"system_property_columns":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"topic_name":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_output_synapse":{"schema":{"database":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true},"table":{"type":"TypeString","required":true,"forceNew":true},"user":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_output_table":{"schema":{"batch_size":{"type":"TypeInt","required":true},"columns_to_remove":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"partition_key":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"row_key":{"type":"TypeString","required":true},"storage_account_key":{"type":"TypeString","required":true},"storage_account_name":{"type":"TypeString","required":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true},"table":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_reference_input_blob":{"schema":{"authentication_mode":{"type":"TypeString","optional":true,"default":"ConnectionString"},"date_format":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"path_pattern":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"serialization":{"type":"TypeList","required":true,"elem":{"schema":{"encoding":{"type":"TypeString","optional":true},"field_delimiter":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"storage_account_key":{"type":"TypeString","optional":true},"storage_account_name":{"type":"TypeString","required":true},"storage_container_name":{"type":"TypeString","required":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true},"time_format":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_reference_input_mssql":{"schema":{"database":{"type":"TypeString","required":true},"delta_snapshot_query":{"type":"TypeString","optional":true},"full_snapshot_query":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true},"refresh_interval_duration":{"type":"TypeString","optional":true},"refresh_type":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true},"table":{"type":"TypeString","optional":true},"username":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_stream_input_blob":{"schema":{"date_format":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"path_pattern":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"serialization":{"type":"TypeList","required":true,"elem":{"schema":{"encoding":{"type":"TypeString","optional":true},"field_delimiter":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"storage_account_key":{"type":"TypeString","required":true},"storage_account_name":{"type":"TypeString","required":true},"storage_container_name":{"type":"TypeString","required":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true},"time_format":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_stream_input_eventhub":{"schema":{"authentication_mode":{"type":"TypeString","optional":true,"default":"ConnectionString"},"eventhub_consumer_group_name":{"type":"TypeString","optional":true},"eventhub_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"partition_key":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"serialization":{"type":"TypeList","required":true,"elem":{"schema":{"encoding":{"type":"TypeString","optional":true},"field_delimiter":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"servicebus_namespace":{"type":"TypeString","required":true},"shared_access_policy_key":{"type":"TypeString","optional":true},"shared_access_policy_name":{"type":"TypeString","optional":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_stream_input_eventhub_v2":{"schema":{"authentication_mode":{"type":"TypeString","optional":true,"default":"ConnectionString"},"eventhub_consumer_group_name":{"type":"TypeString","optional":true},"eventhub_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"partition_key":{"type":"TypeString","optional":true},"serialization":{"type":"TypeList","required":true,"elem":{"schema":{"encoding":{"type":"TypeString","optional":true},"field_delimiter":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"servicebus_namespace":{"type":"TypeString","required":true},"shared_access_policy_key":{"type":"TypeString","optional":true},"shared_access_policy_name":{"type":"TypeString","optional":true},"stream_analytics_job_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_stream_input_iothub":{"schema":{"endpoint":{"type":"TypeString","required":true},"eventhub_consumer_group_name":{"type":"TypeString","required":true},"iothub_namespace":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"serialization":{"type":"TypeList","required":true,"elem":{"schema":{"encoding":{"type":"TypeString","optional":true},"field_delimiter":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"shared_access_policy_key":{"type":"TypeString","required":true,"forceNew":true},"shared_access_policy_name":{"type":"TypeString","required":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_subnet":{"schema":{"address_prefixes":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"default_outbound_access_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"delegation":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"service_delegation":{"type":"TypeList","required":true,"elem":{"schema":{"actions":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true}}},"maxItems":1}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"private_endpoint_network_policies":{"type":"TypeString","optional":true,"computed":true},"private_link_service_network_policies_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_endpoint_policy_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"service_endpoints":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"virtual_network_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_subnet_nat_gateway_association":{"schema":{"nat_gateway_id":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_subnet_network_security_group_association":{"schema":{"network_security_group_id":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_subnet_route_table_association":{"schema":{"route_table_id":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_subnet_service_endpoint_storage_policy":{"schema":{"definition":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"service":{"type":"TypeString","optional":true,"default":"Microsoft.Storage"},"service_resources":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}},"maxItems":2,"minItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_subscription":{"schema":{"alias":{"type":"TypeString","optional":true,"description":"The Alias Name of the subscription. If omitted a new UUID will be generated for this property.","computed":true,"forceNew":true},"billing_scope_id":{"type":"TypeString","optional":true},"subscription_id":{"type":"TypeString","optional":true,"description":"The GUID of the Subscription.","computed":true,"forceNew":true},"subscription_name":{"type":"TypeString","required":true,"description":"The Display Name for the Subscription."},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","description":"The Tenant ID to which the subscription belongs","computed":true},"workload":{"type":"TypeString","optional":true,"description":"The workload type for the Subscription. Possible values are `Production` (default) and `DevTest`.","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_subscription_cost_management_export":{"schema":{"active":{"type":"TypeBool","optional":true,"default":true},"export_data_options":{"type":"TypeList","required":true,"elem":{"schema":{"time_frame":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"export_data_storage_location":{"type":"TypeList","required":true,"elem":{"schema":{"container_id":{"type":"TypeString","required":true,"forceNew":true},"root_folder_path":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"recurrence_period_end_date":{"type":"TypeString","required":true},"recurrence_period_start_date":{"type":"TypeString","required":true},"recurrence_type":{"type":"TypeString","required":true},"subscription_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_subscription_cost_management_view":{"schema":{"accumulated":{"type":"TypeBool","required":true,"forceNew":true},"chart_type":{"type":"TypeString","required":true},"dataset":{"type":"TypeList","required":true,"elem":{"schema":{"aggregation":{"type":"TypeSet","required":true,"elem":{"schema":{"column_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}}}},"granularity":{"type":"TypeString","required":true},"grouping":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"sorting":{"type":"TypeList","optional":true,"elem":{"schema":{"direction":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}}}},"maxItems":1},"display_name":{"type":"TypeString","required":true},"kpi":{"type":"TypeList","optional":true,"elem":{"schema":{"type":{"type":"TypeString","required":true}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"pivot":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"report_type":{"type":"TypeString","required":true},"subscription_id":{"type":"TypeString","required":true,"forceNew":true},"timeframe":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_subscription_policy_assignment":{"schema":{"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true},"enforce":{"type":"TypeBool","optional":true,"default":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","optional":true,"forceNew":true},"metadata":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"non_compliance_message":{"type":"TypeList","optional":true,"elem":{"schema":{"content":{"type":"TypeString","required":true},"policy_definition_reference_id":{"type":"TypeString","optional":true}}}},"not_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"overrides":{"type":"TypeList","optional":true,"elem":{"schema":{"selectors":{"type":"TypeList","optional":true,"elem":{"schema":{"in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"kind":{"type":"TypeString","computed":true},"not_in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"value":{"type":"TypeString","required":true}}}},"parameters":{"type":"TypeString","optional":true},"policy_definition_id":{"type":"TypeString","required":true,"forceNew":true},"resource_selectors":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","optional":true},"selectors":{"type":"TypeList","required":true,"elem":{"schema":{"in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"kind":{"type":"TypeString","required":true},"not_in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}}}}},"subscription_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_subscription_policy_exemption":{"schema":{"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true},"exemption_category":{"type":"TypeString","required":true},"expires_on":{"type":"TypeString","optional":true},"metadata":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"policy_assignment_id":{"type":"TypeString","required":true,"forceNew":true},"policy_definition_reference_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"subscription_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_subscription_policy_remediation":{"schema":{"failure_percentage":{"type":"TypeFloat","optional":true},"location_filters":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"parallel_deployments":{"type":"TypeInt","optional":true},"policy_assignment_id":{"type":"TypeString","required":true},"policy_definition_reference_id":{"type":"TypeString","optional":true},"resource_count":{"type":"TypeInt","optional":true},"resource_discovery_mode":{"type":"TypeString","optional":true,"default":"ExistingNonCompliant"},"subscription_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_subscription_template_deployment":{"schema":{"debug_level":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"output_content":{"type":"TypeString","computed":true},"parameters_content":{"type":"TypeString","optional":true,"computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"template_content":{"type":"TypeString","optional":true,"computed":true},"template_spec_version_id":{"type":"TypeString","optional":true}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_synapse_firewall_rule":{"schema":{"end_ip_address":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"start_ip_address":{"type":"TypeString","required":true},"synapse_workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_integration_runtime_azure":{"schema":{"compute_type":{"type":"TypeString","optional":true,"default":"General"},"core_count":{"type":"TypeInt","optional":true,"default":8},"description":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"synapse_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"time_to_live_min":{"type":"TypeInt","optional":true,"default":0}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_integration_runtime_self_hosted":{"schema":{"authorization_key_primary":{"type":"TypeString","computed":true},"authorization_key_secondary":{"type":"TypeString","computed":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"synapse_workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_linked_service":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"description":{"type":"TypeString","optional":true},"integration_runtime":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"synapse_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"type":{"type":"TypeString","required":true,"forceNew":true},"type_properties_json":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_managed_private_endpoint":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"subresource_name":{"type":"TypeString","required":true,"forceNew":true},"synapse_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_synapse_private_link_hub":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_role_assignment":{"schema":{"principal_id":{"type":"TypeString","required":true,"forceNew":true},"principal_type":{"type":"TypeString","optional":true,"forceNew":true},"role_name":{"type":"TypeString","required":true,"forceNew":true},"synapse_spark_pool_id":{"type":"TypeString","optional":true,"forceNew":true},"synapse_workspace_id":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_synapse_spark_pool":{"schema":{"auto_pause":{"type":"TypeList","optional":true,"elem":{"schema":{"delay_in_minutes":{"type":"TypeInt","required":true}}},"maxItems":1},"auto_scale":{"type":"TypeList","optional":true,"elem":{"schema":{"max_node_count":{"type":"TypeInt","required":true},"min_node_count":{"type":"TypeInt","required":true}}},"maxItems":1},"cache_size":{"type":"TypeInt","optional":true},"compute_isolation_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_executor_allocation_enabled":{"type":"TypeBool","optional":true,"default":false},"library_requirement":{"type":"TypeList","optional":true,"elem":{"schema":{"content":{"type":"TypeString","required":true},"filename":{"type":"TypeString","required":true}}},"maxItems":1},"max_executors":{"type":"TypeInt","optional":true},"min_executors":{"type":"TypeInt","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"node_count":{"type":"TypeInt","optional":true,"computed":true},"node_size":{"type":"TypeString","required":true},"node_size_family":{"type":"TypeString","required":true},"session_level_packages_enabled":{"type":"TypeBool","optional":true,"default":false},"spark_config":{"type":"TypeList","optional":true,"elem":{"schema":{"content":{"type":"TypeString","required":true},"filename":{"type":"TypeString","required":true}}},"maxItems":1},"spark_events_folder":{"type":"TypeString","optional":true,"default":"/events"},"spark_log_folder":{"type":"TypeString","optional":true,"default":"/logs"},"spark_version":{"type":"TypeString","optional":true,"default":"2.4"},"synapse_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_sql_pool":{"schema":{"collation":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"create_mode":{"type":"TypeString","optional":true,"default":"Default","forceNew":true},"data_encrypted":{"type":"TypeBool","optional":true},"geo_backup_policy_enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true,"forceNew":true},"recovery_database_id":{"type":"TypeString","optional":true,"forceNew":true},"restore":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"point_in_time":{"type":"TypeString","required":true,"forceNew":true},"source_database_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"sku_name":{"type":"TypeString","required":true},"storage_account_type":{"type":"TypeString","required":true,"forceNew":true},"synapse_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_sql_pool_extended_auditing_policy":{"schema":{"log_monitoring_enabled":{"type":"TypeBool","optional":true,"default":true},"retention_in_days":{"type":"TypeInt","optional":true,"default":0},"sql_pool_id":{"type":"TypeString","required":true,"forceNew":true},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_account_access_key_is_secondary":{"type":"TypeBool","optional":true,"default":false},"storage_endpoint":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_sql_pool_security_alert_policy":{"schema":{"disabled_alerts":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"email_account_admins_enabled":{"type":"TypeBool","optional":true,"default":false},"email_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"policy_state":{"type":"TypeString","required":true},"retention_days":{"type":"TypeInt","optional":true,"default":0},"sql_pool_id":{"type":"TypeString","required":true,"forceNew":true},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_endpoint":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_sql_pool_vulnerability_assessment":{"schema":{"recurring_scans":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"email_subscription_admins_enabled":{"type":"TypeBool","optional":true,"default":true},"emails":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"sql_pool_security_alert_policy_id":{"type":"TypeString","required":true,"forceNew":true},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_container_path":{"type":"TypeString","required":true},"storage_container_sas_key":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_sql_pool_vulnerability_assessment_baseline":{"schema":{"baseline":{"type":"TypeList","optional":true,"elem":{"schema":{"result":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}},"name":{"type":"TypeString","required":true},"rule_name":{"type":"TypeString","required":true},"sql_pool_vulnerability_assessment_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_sql_pool_workload_classifier":{"schema":{"context":{"type":"TypeString","optional":true},"end_time":{"type":"TypeString","optional":true},"importance":{"type":"TypeString","optional":true},"label":{"type":"TypeString","optional":true},"member_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"start_time":{"type":"TypeString","optional":true},"workload_group_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_sql_pool_workload_group":{"schema":{"importance":{"type":"TypeString","optional":true,"default":"normal"},"max_resource_percent":{"type":"TypeInt","required":true},"max_resource_percent_per_request":{"type":"TypeFloat","optional":true,"default":3},"min_resource_percent":{"type":"TypeInt","required":true},"min_resource_percent_per_request":{"type":"TypeFloat","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"query_execution_timeout_in_seconds":{"type":"TypeInt","optional":true},"sql_pool_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_workspace":{"schema":{"azure_devops_repo":{"type":"TypeList","optional":true,"elem":{"schema":{"account_name":{"type":"TypeString","required":true},"branch_name":{"type":"TypeString","required":true},"last_commit_id":{"type":"TypeString","optional":true},"project_name":{"type":"TypeString","required":true},"repository_name":{"type":"TypeString","required":true},"root_folder":{"type":"TypeString","required":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"azuread_authentication_only":{"type":"TypeBool","optional":true,"default":false},"compute_subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"connectivity_endpoints":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"customer_managed_key":{"type":"TypeList","optional":true,"elem":{"schema":{"key_name":{"type":"TypeString","optional":true,"default":"cmk"},"key_versionless_id":{"type":"TypeString","required":true},"user_assigned_identity_id":{"type":"TypeString","optional":true}}},"maxItems":1},"data_exfiltration_protection_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"github_repo":{"type":"TypeList","optional":true,"elem":{"schema":{"account_name":{"type":"TypeString","required":true},"branch_name":{"type":"TypeString","required":true},"git_url":{"type":"TypeString","optional":true},"last_commit_id":{"type":"TypeString","optional":true},"repository_name":{"type":"TypeString","required":true},"root_folder":{"type":"TypeString","required":true}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"linking_allowed_for_aad_tenant_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_resource_group_name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"managed_virtual_network_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"purview_id":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sql_administrator_login":{"type":"TypeString","optional":true,"forceNew":true},"sql_administrator_login_password":{"type":"TypeString","optional":true},"sql_identity_control_enabled":{"type":"TypeBool","optional":true},"storage_data_lake_gen2_filesystem_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_workspace_aad_admin":{"schema":{"login":{"type":"TypeString","required":true},"object_id":{"type":"TypeString","required":true},"synapse_workspace_id":{"type":"TypeString","required":true},"tenant_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_workspace_extended_auditing_policy":{"schema":{"log_monitoring_enabled":{"type":"TypeBool","optional":true,"default":true},"retention_in_days":{"type":"TypeInt","optional":true,"default":0},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_account_access_key_is_secondary":{"type":"TypeBool","optional":true,"default":false},"storage_endpoint":{"type":"TypeString","optional":true},"synapse_workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_workspace_key":{"schema":{"active":{"type":"TypeBool","required":true},"customer_managed_key_name":{"type":"TypeString","required":true},"customer_managed_key_versionless_id":{"type":"TypeString","optional":true},"synapse_workspace_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_workspace_security_alert_policy":{"schema":{"disabled_alerts":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"email_account_admins_enabled":{"type":"TypeBool","optional":true,"default":false},"email_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"policy_state":{"type":"TypeString","required":true},"retention_days":{"type":"TypeInt","optional":true,"default":0},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_endpoint":{"type":"TypeString","optional":true},"synapse_workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_workspace_sql_aad_admin":{"schema":{"login":{"type":"TypeString","required":true},"object_id":{"type":"TypeString","required":true},"synapse_workspace_id":{"type":"TypeString","required":true},"tenant_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_workspace_vulnerability_assessment":{"schema":{"recurring_scans":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"email_subscription_admins_enabled":{"type":"TypeBool","optional":true,"default":true},"emails":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_container_path":{"type":"TypeString","required":true},"storage_container_sas_key":{"type":"TypeString","optional":true},"workspace_security_alert_policy_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_system_center_virtual_machine_manager_availability_set":{"schema":{"custom_location_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"system_center_virtual_machine_manager_server_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_system_center_virtual_machine_manager_cloud":{"schema":{"custom_location_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"system_center_virtual_machine_manager_server_inventory_item_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_system_center_virtual_machine_manager_server":{"schema":{"custom_location_id":{"type":"TypeString","required":true,"forceNew":true},"fqdn":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"port":{"type":"TypeInt","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"username":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_system_center_virtual_machine_manager_virtual_machine_template":{"schema":{"custom_location_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"system_center_virtual_machine_manager_server_inventory_item_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_system_center_virtual_machine_manager_virtual_network":{"schema":{"custom_location_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"system_center_virtual_machine_manager_server_inventory_item_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_tenant_template_deployment":{"schema":{"debug_level":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"output_content":{"type":"TypeString","computed":true},"parameters_content":{"type":"TypeString","optional":true,"computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"template_content":{"type":"TypeString","optional":true,"computed":true},"template_spec_version_id":{"type":"TypeString","optional":true}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_traffic_manager_azure_endpoint":{"schema":{"always_serve_enabled":{"type":"TypeBool","optional":true,"default":false},"custom_header":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"enabled":{"type":"TypeBool","optional":true,"default":true},"geo_mappings":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","optional":true,"default":1},"profile_id":{"type":"TypeString","required":true,"forceNew":true},"subnet":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"first":{"type":"TypeString","required":true},"last":{"type":"TypeString","optional":true},"scope":{"type":"TypeInt","optional":true}}}},"target_resource_id":{"type":"TypeString","required":true},"weight":{"type":"TypeInt","optional":true,"default":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_traffic_manager_external_endpoint":{"schema":{"always_serve_enabled":{"type":"TypeBool","optional":true,"default":false},"custom_header":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"enabled":{"type":"TypeBool","optional":true,"default":true},"endpoint_location":{"type":"TypeString","optional":true,"computed":true},"geo_mappings":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","optional":true,"default":1},"profile_id":{"type":"TypeString","required":true,"forceNew":true},"subnet":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"first":{"type":"TypeString","required":true},"last":{"type":"TypeString","optional":true},"scope":{"type":"TypeInt","optional":true}}}},"target":{"type":"TypeString","required":true},"weight":{"type":"TypeInt","optional":true,"default":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_traffic_manager_nested_endpoint":{"schema":{"custom_header":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"enabled":{"type":"TypeBool","optional":true,"default":true},"endpoint_location":{"type":"TypeString","optional":true,"computed":true},"geo_mappings":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"minimum_child_endpoints":{"type":"TypeInt","required":true},"minimum_required_child_endpoints_ipv4":{"type":"TypeInt","optional":true},"minimum_required_child_endpoints_ipv6":{"type":"TypeInt","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","optional":true,"default":1},"profile_id":{"type":"TypeString","required":true,"forceNew":true},"subnet":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"first":{"type":"TypeString","required":true},"last":{"type":"TypeString","optional":true},"scope":{"type":"TypeInt","optional":true}}}},"target_resource_id":{"type":"TypeString","required":true},"weight":{"type":"TypeInt","optional":true,"default":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_traffic_manager_profile":{"schema":{"dns_config":{"type":"TypeList","required":true,"elem":{"schema":{"relative_name":{"type":"TypeString","required":true,"forceNew":true},"ttl":{"type":"TypeInt","required":true}}},"maxItems":1},"fqdn":{"type":"TypeString","computed":true},"max_return":{"type":"TypeInt","optional":true},"monitor_config":{"type":"TypeList","required":true,"elem":{"schema":{"custom_header":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"expected_status_code_ranges":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"interval_in_seconds":{"type":"TypeInt","optional":true,"default":30},"path":{"type":"TypeString","optional":true},"port":{"type":"TypeInt","required":true},"protocol":{"type":"TypeString","required":true},"timeout_in_seconds":{"type":"TypeInt","optional":true,"default":10},"tolerated_number_of_failures":{"type":"TypeInt","optional":true,"default":3}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"profile_status":{"type":"TypeString","optional":true,"default":"Enabled"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"traffic_routing_method":{"type":"TypeString","required":true},"traffic_view_enabled":{"type":"TypeBool","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_user_assigned_identity":{"schema":{"client_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"principal_id":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_desktop_application":{"schema":{"application_group_id":{"type":"TypeString","required":true,"forceNew":true},"command_line_argument_policy":{"type":"TypeString","required":true},"command_line_arguments":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"friendly_name":{"type":"TypeString","optional":true,"computed":true},"icon_index":{"type":"TypeInt","optional":true},"icon_path":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"path":{"type":"TypeString","required":true},"show_in_portal":{"type":"TypeBool","optional":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_virtual_desktop_application_group":{"schema":{"default_desktop_display_name":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"friendly_name":{"type":"TypeString","optional":true},"host_pool_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_virtual_desktop_host_pool":{"schema":{"custom_rdp_properties":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"friendly_name":{"type":"TypeString","optional":true},"load_balancer_type":{"type":"TypeString","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"maximum_sessions_allowed":{"type":"TypeInt","optional":true,"default":999999},"name":{"type":"TypeString","required":true,"forceNew":true},"personal_desktop_assignment_type":{"type":"TypeString","optional":true,"forceNew":true},"preferred_app_group_type":{"type":"TypeString","optional":true,"default":"Desktop","description":"Preferred App Group type to display"},"public_network_access":{"type":"TypeString","optional":true,"default":"Enabled"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scheduled_agent_updates":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":false},"schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"day_of_week":{"type":"TypeString","required":true},"hour_of_day":{"type":"TypeInt","required":true}}},"maxItems":2},"timezone":{"type":"TypeString","optional":true,"default":"UTC"},"use_session_host_timezone":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"start_vm_on_connect":{"type":"TypeBool","optional":true,"default":false},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true,"forceNew":true},"validate_environment":{"type":"TypeBool","optional":true,"default":false},"vm_template":{"type":"TypeString","optional":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_virtual_desktop_host_pool_registration_info":{"schema":{"expiration_date":{"type":"TypeString","required":true},"hostpool_id":{"type":"TypeString","required":true,"forceNew":true},"token":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_desktop_scaling_plan":{"schema":{"description":{"type":"TypeString","optional":true},"exclusion_tag":{"type":"TypeString","optional":true},"friendly_name":{"type":"TypeString","optional":true},"host_pool":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"hostpool_id":{"type":"TypeString","required":true},"scaling_plan_enabled":{"type":"TypeBool","required":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"days_of_week":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"off_peak_load_balancing_algorithm":{"type":"TypeString","required":true},"off_peak_start_time":{"type":"TypeString","required":true},"peak_load_balancing_algorithm":{"type":"TypeString","required":true},"peak_start_time":{"type":"TypeString","required":true},"ramp_down_capacity_threshold_percent":{"type":"TypeInt","required":true},"ramp_down_force_logoff_users":{"type":"TypeBool","required":true},"ramp_down_load_balancing_algorithm":{"type":"TypeString","required":true},"ramp_down_minimum_hosts_percent":{"type":"TypeInt","required":true},"ramp_down_notification_message":{"type":"TypeString","required":true},"ramp_down_start_time":{"type":"TypeString","required":true},"ramp_down_stop_hosts_when":{"type":"TypeString","required":true},"ramp_down_wait_time_minutes":{"type":"TypeInt","required":true},"ramp_up_capacity_threshold_percent":{"type":"TypeInt","optional":true},"ramp_up_load_balancing_algorithm":{"type":"TypeString","required":true},"ramp_up_minimum_hosts_percent":{"type":"TypeInt","optional":true},"ramp_up_start_time":{"type":"TypeString","required":true}}},"minItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"time_zone":{"type":"TypeString","required":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_virtual_desktop_scaling_plan_host_pool_association":{"schema":{"enabled":{"type":"TypeBool","required":true},"host_pool_id":{"type":"TypeString","required":true,"forceNew":true},"scaling_plan_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_virtual_desktop_workspace":{"schema":{"description":{"type":"TypeString","optional":true},"friendly_name":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_virtual_desktop_workspace_application_group_association":{"schema":{"application_group_id":{"type":"TypeString","required":true,"forceNew":true},"workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60}},"azurerm_virtual_hub":{"schema":{"address_prefix":{"type":"TypeString","optional":true,"forceNew":true},"default_route_table_id":{"type":"TypeString","computed":true},"hub_routing_preference":{"type":"TypeString","optional":true,"default":"ExpressRoute"},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"route":{"type":"TypeSet","optional":true,"elem":{"schema":{"address_prefixes":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"next_hop_ip_address":{"type":"TypeString","required":true}}}},"sku":{"type":"TypeString","optional":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_router_asn":{"type":"TypeInt","computed":true},"virtual_router_auto_scale_min_capacity":{"type":"TypeInt","optional":true,"default":2},"virtual_router_ips":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"virtual_wan_id":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_virtual_hub_bgp_connection":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"peer_asn":{"type":"TypeInt","required":true,"forceNew":true},"peer_ip":{"type":"TypeString","required":true,"forceNew":true},"virtual_hub_id":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_connection_id":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_hub_connection":{"schema":{"internet_security_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"remote_virtual_network_id":{"type":"TypeString","required":true,"forceNew":true},"routing":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"associated_route_table_id":{"type":"TypeString","optional":true,"computed":true},"inbound_route_map_id":{"type":"TypeString","optional":true},"outbound_route_map_id":{"type":"TypeString","optional":true},"propagated_route_table":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"labels":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"route_table_ids":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"static_vnet_local_route_override_criteria":{"type":"TypeString","optional":true,"default":"Contains","forceNew":true},"static_vnet_route":{"type":"TypeList","optional":true,"elem":{"schema":{"address_prefixes":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","optional":true},"next_hop_ip_address":{"type":"TypeString","optional":true}}}}}},"maxItems":1},"virtual_hub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_virtual_hub_ip":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"private_ip_address":{"type":"TypeString","optional":true},"private_ip_allocation_method":{"type":"TypeString","optional":true,"default":"Dynamic"},"public_ip_address_id":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"virtual_hub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_virtual_hub_route_table":{"schema":{"labels":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"route":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"destinations":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"destinations_type":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"next_hop":{"type":"TypeString","required":true},"next_hop_type":{"type":"TypeString","optional":true,"default":"ResourceId"}}}},"virtual_hub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_hub_route_table_route":{"schema":{"destinations":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"destinations_type":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"next_hop":{"type":"TypeString","required":true},"next_hop_type":{"type":"TypeString","optional":true,"default":"ResourceId"},"route_table_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_hub_routing_intent":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"routing_policy":{"type":"TypeList","required":true,"elem":{"schema":{"destinations":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"next_hop":{"type":"TypeString","required":true}}}},"virtual_hub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_hub_security_partner_provider":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"security_provider_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_hub_id":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_machine":{"schema":{"additional_capabilities":{"type":"TypeList","optional":true,"elem":{"schema":{"ultra_ssd_enabled":{"type":"TypeBool","required":true,"forceNew":true}}},"maxItems":1},"availability_set_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"boot_diagnostics":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","required":true},"storage_uri":{"type":"TypeString","required":true}}},"maxItems":1},"delete_data_disks_on_termination":{"type":"TypeBool","optional":true,"default":false},"delete_os_disk_on_termination":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"license_type":{"type":"TypeString","optional":true,"computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_interface_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"os_profile":{"type":"TypeSet","optional":true,"elem":{"schema":{"admin_password":{"type":"TypeString","optional":true},"admin_username":{"type":"TypeString","required":true},"computer_name":{"type":"TypeString","required":true,"forceNew":true},"custom_data":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}}},"maxItems":1},"os_profile_linux_config":{"type":"TypeSet","optional":true,"elem":{"schema":{"disable_password_authentication":{"type":"TypeBool","required":true},"ssh_keys":{"type":"TypeList","optional":true,"elem":{"schema":{"key_data":{"type":"TypeString","required":true},"path":{"type":"TypeString","required":true}}}}}},"maxItems":1},"os_profile_secrets":{"type":"TypeList","optional":true,"elem":{"schema":{"source_vault_id":{"type":"TypeString","required":true},"vault_certificates":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate_store":{"type":"TypeString","optional":true},"certificate_url":{"type":"TypeString","required":true}}}}}}},"os_profile_windows_config":{"type":"TypeSet","optional":true,"elem":{"schema":{"additional_unattend_config":{"type":"TypeList","optional":true,"elem":{"schema":{"component":{"type":"TypeString","required":true},"content":{"type":"TypeString","required":true},"pass":{"type":"TypeString","required":true},"setting_name":{"type":"TypeString","required":true}}}},"enable_automatic_upgrades":{"type":"TypeBool","optional":true,"default":false},"provision_vm_agent":{"type":"TypeBool","optional":true,"default":false},"timezone":{"type":"TypeString","optional":true,"forceNew":true},"winrm":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate_url":{"type":"TypeString","optional":true},"protocol":{"type":"TypeString","required":true}}}}}},"maxItems":1},"plan":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"product":{"type":"TypeString","required":true},"publisher":{"type":"TypeString","required":true}}},"maxItems":1},"primary_network_interface_id":{"type":"TypeString","optional":true},"proximity_placement_group_id":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"storage_data_disk":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"caching":{"type":"TypeString","optional":true,"computed":true},"create_option":{"type":"TypeString","required":true},"disk_size_gb":{"type":"TypeInt","optional":true,"computed":true},"lun":{"type":"TypeInt","required":true},"managed_disk_id":{"type":"TypeString","optional":true,"computed":true},"managed_disk_type":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true},"vhd_uri":{"type":"TypeString","optional":true},"write_accelerator_enabled":{"type":"TypeBool","optional":true,"default":false}}}},"storage_image_reference":{"type":"TypeSet","optional":true,"computed":true,"forceNew":true,"elem":{"schema":{"id":{"type":"TypeString","optional":true,"forceNew":true},"offer":{"type":"TypeString","optional":true,"forceNew":true},"publisher":{"type":"TypeString","optional":true,"forceNew":true},"sku":{"type":"TypeString","optional":true,"forceNew":true},"version":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}}},"maxItems":1},"storage_os_disk":{"type":"TypeList","required":true,"elem":{"schema":{"caching":{"type":"TypeString","optional":true,"computed":true},"create_option":{"type":"TypeString","required":true},"disk_size_gb":{"type":"TypeInt","optional":true,"computed":true},"image_uri":{"type":"TypeString","optional":true},"managed_disk_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"managed_disk_type":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true},"os_type":{"type":"TypeString","optional":true,"computed":true},"vhd_uri":{"type":"TypeString","optional":true,"forceNew":true},"write_accelerator_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"vm_size":{"type":"TypeString","required":true},"zones":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"maxItems":1}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_virtual_machine_automanage_configuration_assignment":{"schema":{"configuration_id":{"type":"TypeString","required":true,"forceNew":true},"virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_virtual_machine_data_disk_attachment":{"schema":{"caching":{"type":"TypeString","required":true},"create_option":{"type":"TypeString","optional":true,"default":"Attach","forceNew":true},"lun":{"type":"TypeInt","required":true,"forceNew":true},"managed_disk_id":{"type":"TypeString","required":true,"forceNew":true},"virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true},"write_accelerator_enabled":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_machine_extension":{"schema":{"auto_upgrade_minor_version":{"type":"TypeBool","optional":true},"automatic_upgrade_enabled":{"type":"TypeBool","optional":true},"failure_suppression_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"protected_settings":{"type":"TypeString","optional":true},"protected_settings_from_key_vault":{"type":"TypeList","optional":true,"elem":{"schema":{"secret_url":{"type":"TypeString","required":true},"source_vault_id":{"type":"TypeString","required":true}}},"maxItems":1},"provision_after_extensions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"publisher":{"type":"TypeString","required":true,"forceNew":true},"settings":{"type":"TypeString","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true},"type_handler_version":{"type":"TypeString","required":true},"virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_machine_gallery_application_assignment":{"schema":{"configuration_blob_uri":{"type":"TypeString","optional":true,"forceNew":true},"gallery_application_version_id":{"type":"TypeString","required":true,"forceNew":true},"order":{"type":"TypeInt","optional":true,"default":0},"tag":{"type":"TypeString","optional":true,"forceNew":true},"virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_machine_implicit_data_disk_from_source":{"schema":{"caching":{"type":"TypeString","optional":true},"create_option":{"type":"TypeString","required":true,"forceNew":true},"disk_size_gb":{"type":"TypeInt","required":true,"forceNew":true},"lun":{"type":"TypeInt","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"source_resource_id":{"type":"TypeString","required":true,"forceNew":true},"virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true},"write_accelerator_enabled":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_machine_packet_capture":{"schema":{"filter":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"local_ip_address":{"type":"TypeString","optional":true,"forceNew":true},"local_port":{"type":"TypeString","optional":true,"forceNew":true},"protocol":{"type":"TypeString","required":true,"forceNew":true},"remote_ip_address":{"type":"TypeString","optional":true,"forceNew":true},"remote_port":{"type":"TypeString","optional":true,"forceNew":true}}}},"maximum_bytes_per_packet":{"type":"TypeInt","optional":true,"default":0,"forceNew":true},"maximum_bytes_per_session":{"type":"TypeInt","optional":true,"default":1073741824,"forceNew":true},"maximum_capture_duration_in_seconds":{"type":"TypeInt","optional":true,"default":18000,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_watcher_id":{"type":"TypeString","required":true,"forceNew":true},"storage_location":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"file_path":{"type":"TypeString","optional":true},"storage_account_id":{"type":"TypeString","optional":true},"storage_path":{"type":"TypeString","computed":true}}},"maxItems":1},"virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_virtual_machine_restore_point":{"schema":{"crash_consistency_mode_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"excluded_disks":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"virtual_machine_restore_point_collection_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_virtual_machine_restore_point_collection":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source_virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_machine_run_command":{"schema":{"error_blob_managed_identity":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","optional":true},"object_id":{"type":"TypeString","optional":true}}},"maxItems":1},"error_blob_uri":{"type":"TypeString","optional":true},"instance_view":{"type":"TypeList","computed":true,"elem":{"schema":{"end_time":{"type":"TypeString","computed":true},"error_message":{"type":"TypeString","computed":true},"execution_message":{"type":"TypeString","computed":true},"execution_state":{"type":"TypeString","computed":true},"exit_code":{"type":"TypeInt","computed":true},"output":{"type":"TypeString","computed":true},"start_time":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"output_blob_managed_identity":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","optional":true},"object_id":{"type":"TypeString","optional":true}}},"maxItems":1},"output_blob_uri":{"type":"TypeString","optional":true},"parameter":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"protected_parameter":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"run_as_password":{"type":"TypeString","optional":true},"run_as_user":{"type":"TypeString","optional":true},"source":{"type":"TypeList","required":true,"elem":{"schema":{"command_id":{"type":"TypeString","optional":true},"script":{"type":"TypeString","optional":true},"script_uri":{"type":"TypeString","optional":true},"script_uri_managed_identity":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","optional":true},"object_id":{"type":"TypeString","optional":true}}},"maxItems":1}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_machine_scale_set":{"schema":{"automatic_os_upgrade":{"type":"TypeBool","optional":true,"default":false},"boot_diagnostics":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"storage_uri":{"type":"TypeString","required":true}}},"maxItems":1},"eviction_policy":{"type":"TypeString","optional":true,"forceNew":true},"extension":{"type":"TypeSet","optional":true,"elem":{"schema":{"auto_upgrade_minor_version":{"type":"TypeBool","optional":true},"name":{"type":"TypeString","required":true},"protected_settings":{"type":"TypeString","optional":true},"provision_after_extensions":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"publisher":{"type":"TypeString","required":true},"settings":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"type_handler_version":{"type":"TypeString","required":true}}}},"health_probe_id":{"type":"TypeString","optional":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"license_type":{"type":"TypeString","optional":true,"computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_profile":{"type":"TypeSet","required":true,"elem":{"schema":{"accelerated_networking":{"type":"TypeBool","optional":true},"dns_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"dns_servers":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"application_gateway_backend_address_pool_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"application_security_group_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":20},"load_balancer_backend_address_pool_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"load_balancer_inbound_nat_rules_ids":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"primary":{"type":"TypeBool","required":true},"public_ip_address_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"domain_name_label":{"type":"TypeString","required":true},"idle_timeout":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true}}},"maxItems":1},"subnet_id":{"type":"TypeString","required":true}}}},"ip_forwarding":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true},"network_security_group_id":{"type":"TypeString","optional":true},"primary":{"type":"TypeBool","required":true}}}},"os_profile":{"type":"TypeList","required":true,"elem":{"schema":{"admin_password":{"type":"TypeString","optional":true},"admin_username":{"type":"TypeString","required":true},"computer_name_prefix":{"type":"TypeString","required":true,"forceNew":true},"custom_data":{"type":"TypeString","optional":true}}},"maxItems":1},"os_profile_linux_config":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"disable_password_authentication":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"ssh_keys":{"type":"TypeList","optional":true,"elem":{"schema":{"key_data":{"type":"TypeString","optional":true},"path":{"type":"TypeString","required":true}}}}}},"maxItems":1},"os_profile_secrets":{"type":"TypeSet","optional":true,"elem":{"schema":{"source_vault_id":{"type":"TypeString","required":true},"vault_certificates":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate_store":{"type":"TypeString","optional":true},"certificate_url":{"type":"TypeString","required":true}}}}}}},"os_profile_windows_config":{"type":"TypeSet","optional":true,"elem":{"schema":{"additional_unattend_config":{"type":"TypeList","optional":true,"elem":{"schema":{"component":{"type":"TypeString","required":true},"content":{"type":"TypeString","required":true},"pass":{"type":"TypeString","required":true},"setting_name":{"type":"TypeString","required":true}}}},"enable_automatic_upgrades":{"type":"TypeBool","optional":true},"provision_vm_agent":{"type":"TypeBool","optional":true},"winrm":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate_url":{"type":"TypeString","optional":true},"protocol":{"type":"TypeString","required":true}}}}}},"maxItems":1},"overprovision":{"type":"TypeBool","optional":true,"default":true},"plan":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"product":{"type":"TypeString","required":true},"publisher":{"type":"TypeString","required":true}}},"maxItems":1},"priority":{"type":"TypeString","optional":true,"forceNew":true},"proximity_placement_group_id":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rolling_upgrade_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"max_batch_instance_percent":{"type":"TypeInt","optional":true,"default":20},"max_unhealthy_instance_percent":{"type":"TypeInt","optional":true,"default":20},"max_unhealthy_upgraded_instance_percent":{"type":"TypeInt","optional":true,"default":20},"pause_time_between_batches":{"type":"TypeString","optional":true,"default":"PT0S"}}},"maxItems":1},"single_placement_group":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"sku":{"type":"TypeList","required":true,"elem":{"schema":{"capacity":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true},"tier":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"storage_profile_data_disk":{"type":"TypeList","optional":true,"elem":{"schema":{"caching":{"type":"TypeString","optional":true,"computed":true},"create_option":{"type":"TypeString","required":true},"disk_size_gb":{"type":"TypeInt","optional":true,"computed":true},"lun":{"type":"TypeInt","required":true},"managed_disk_type":{"type":"TypeString","optional":true,"computed":true}}}},"storage_profile_image_reference":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"id":{"type":"TypeString","optional":true},"offer":{"type":"TypeString","optional":true},"publisher":{"type":"TypeString","optional":true},"sku":{"type":"TypeString","optional":true},"version":{"type":"TypeString","optional":true}}},"maxItems":1},"storage_profile_os_disk":{"type":"TypeSet","required":true,"elem":{"schema":{"caching":{"type":"TypeString","optional":true,"computed":true},"create_option":{"type":"TypeString","required":true},"image":{"type":"TypeString","optional":true},"managed_disk_type":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","optional":true},"os_type":{"type":"TypeString","optional":true},"vhd_containers":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"upgrade_policy_mode":{"type":"TypeString","required":true},"zones":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_virtual_machine_scale_set_extension":{"schema":{"auto_upgrade_minor_version":{"type":"TypeBool","optional":true,"default":true},"automatic_upgrade_enabled":{"type":"TypeBool","optional":true},"failure_suppression_enabled":{"type":"TypeBool","optional":true,"default":false},"force_update_tag":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"protected_settings":{"type":"TypeString","optional":true},"protected_settings_from_key_vault":{"type":"TypeList","optional":true,"elem":{"schema":{"secret_url":{"type":"TypeString","required":true},"source_vault_id":{"type":"TypeString","required":true}}},"maxItems":1},"provision_after_extensions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"publisher":{"type":"TypeString","required":true,"forceNew":true},"settings":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true,"forceNew":true},"type_handler_version":{"type":"TypeString","required":true},"virtual_machine_scale_set_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_machine_scale_set_packet_capture":{"schema":{"filter":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"local_ip_address":{"type":"TypeString","optional":true,"forceNew":true},"local_port":{"type":"TypeString","optional":true,"forceNew":true},"protocol":{"type":"TypeString","required":true,"forceNew":true},"remote_ip_address":{"type":"TypeString","optional":true,"forceNew":true},"remote_port":{"type":"TypeString","optional":true,"forceNew":true}}}},"machine_scope":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"exclude_instance_ids":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"include_instance_ids":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"maximum_bytes_per_packet":{"type":"TypeInt","optional":true,"default":0,"forceNew":true},"maximum_bytes_per_session":{"type":"TypeInt","optional":true,"default":1073741824,"forceNew":true},"maximum_capture_duration_in_seconds":{"type":"TypeInt","optional":true,"default":18000,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_watcher_id":{"type":"TypeString","required":true,"forceNew":true},"storage_location":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"file_path":{"type":"TypeString","optional":true},"storage_account_id":{"type":"TypeString","optional":true},"storage_path":{"type":"TypeString","computed":true}}},"maxItems":1},"virtual_machine_scale_set_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_virtual_network":{"schema":{"address_space":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"bgp_community":{"type":"TypeString","optional":true},"ddos_protection_plan":{"type":"TypeList","optional":true,"elem":{"schema":{"enable":{"type":"TypeBool","required":true},"id":{"type":"TypeString","required":true}}},"maxItems":1},"dns_servers":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"encryption":{"type":"TypeList","optional":true,"elem":{"schema":{"enforcement":{"type":"TypeString","required":true}}},"maxItems":1},"flow_timeout_in_minutes":{"type":"TypeInt","optional":true},"guid":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subnet":{"type":"TypeSet","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"address_prefixes":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"default_outbound_access_enabled":{"type":"TypeBool","optional":true,"default":true},"delegation":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"service_delegation":{"type":"TypeList","configMode":"Auto","required":true,"elem":{"schema":{"actions":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"private_endpoint_network_policies":{"type":"TypeString","optional":true,"default":"Disabled"},"private_link_service_network_policies_enabled":{"type":"TypeBool","optional":true,"default":true},"route_table_id":{"type":"TypeString","optional":true},"security_group":{"type":"TypeString","optional":true},"service_endpoint_policy_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"service_endpoints":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_network_dns_servers":{"schema":{"dns_servers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"virtual_network_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_network_gateway":{"schema":{"active_active":{"type":"TypeBool","optional":true,"computed":true},"bgp_route_translation_for_nat_enabled":{"type":"TypeBool","optional":true,"default":false},"bgp_settings":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"asn":{"type":"TypeInt","optional":true},"peer_weight":{"type":"TypeInt","optional":true},"peering_addresses":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"apipa_addresses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"default_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ip_configuration_name":{"type":"TypeString","optional":true,"computed":true},"tunnel_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":2,"minItems":1}}},"maxItems":1},"custom_route":{"type":"TypeList","optional":true,"elem":{"schema":{"address_prefixes":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"default_local_network_gateway_id":{"type":"TypeString","optional":true},"dns_forwarding_enabled":{"type":"TypeBool","optional":true},"edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"enable_bgp":{"type":"TypeBool","optional":true,"computed":true},"generation":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","optional":true,"default":"vnetGatewayConfig"},"private_ip_address_allocation":{"type":"TypeString","optional":true,"default":"Dynamic"},"public_ip_address_id":{"type":"TypeString","required":true},"subnet_id":{"type":"TypeString","required":true}}},"maxItems":3},"ip_sec_replay_protection_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"policy_group":{"type":"TypeList","optional":true,"elem":{"schema":{"is_default":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true},"policy_member":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"priority":{"type":"TypeInt","optional":true,"default":0}}}},"private_ip_address_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"remote_vnet_traffic_enabled":{"type":"TypeBool","optional":true,"default":false},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true,"forceNew":true},"virtual_wan_traffic_enabled":{"type":"TypeBool","optional":true,"default":false},"vpn_client_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"aad_audience":{"type":"TypeString","optional":true},"aad_issuer":{"type":"TypeString","optional":true},"aad_tenant":{"type":"TypeString","optional":true},"address_space":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"ipsec_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"dh_group":{"type":"TypeString","required":true},"ike_encryption":{"type":"TypeString","required":true},"ike_integrity":{"type":"TypeString","required":true},"ipsec_encryption":{"type":"TypeString","required":true},"ipsec_integrity":{"type":"TypeString","required":true},"pfs_group":{"type":"TypeString","required":true},"sa_data_size_in_kilobytes":{"type":"TypeInt","required":true},"sa_lifetime_in_seconds":{"type":"TypeInt","required":true}}},"maxItems":1},"radius_server":{"type":"TypeList","optional":true,"elem":{"schema":{"address":{"type":"TypeString","required":true},"score":{"type":"TypeInt","required":true},"secret":{"type":"TypeString","required":true}}}},"radius_server_address":{"type":"TypeString","optional":true},"radius_server_secret":{"type":"TypeString","optional":true},"revoked_certificate":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"thumbprint":{"type":"TypeString","required":true}}}},"root_certificate":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"public_cert_data":{"type":"TypeString","required":true}}}},"virtual_network_gateway_client_connection":{"type":"TypeList","optional":true,"elem":{"schema":{"address_prefixes":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"policy_group_names":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}},"vpn_auth_types":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"},"maxItems":3},"vpn_client_protocols":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"vpn_type":{"type":"TypeString","optional":true,"default":"RouteBased","forceNew":true}},"timeouts":{"create":90,"read":5,"delete":60,"update":60}},"azurerm_virtual_network_gateway_connection":{"schema":{"authorization_key":{"type":"TypeString","optional":true},"connection_mode":{"type":"TypeString","optional":true,"default":"Default","forceNew":true},"connection_protocol":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"custom_bgp_addresses":{"type":"TypeList","optional":true,"elem":{"schema":{"primary":{"type":"TypeString","required":true},"secondary":{"type":"TypeString","optional":true}}},"maxItems":1},"dpd_timeout_seconds":{"type":"TypeInt","optional":true,"forceNew":true},"egress_nat_rule_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"enable_bgp":{"type":"TypeBool","optional":true,"computed":true},"express_route_circuit_id":{"type":"TypeString","optional":true,"forceNew":true},"express_route_gateway_bypass":{"type":"TypeBool","optional":true,"computed":true},"ingress_nat_rule_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"ipsec_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"dh_group":{"type":"TypeString","required":true},"ike_encryption":{"type":"TypeString","required":true},"ike_integrity":{"type":"TypeString","required":true},"ipsec_encryption":{"type":"TypeString","required":true},"ipsec_integrity":{"type":"TypeString","required":true},"pfs_group":{"type":"TypeString","required":true},"sa_datasize":{"type":"TypeInt","optional":true,"computed":true},"sa_lifetime":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"local_azure_ip_address_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"local_network_gateway_id":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"peer_virtual_network_gateway_id":{"type":"TypeString","optional":true,"forceNew":true},"private_link_fast_path_enabled":{"type":"TypeBool","optional":true,"default":false},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"routing_weight":{"type":"TypeInt","optional":true,"computed":true},"shared_key":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"traffic_selector_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"local_address_cidrs":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"remote_address_cidrs":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}},"type":{"type":"TypeString","required":true,"forceNew":true},"use_policy_based_traffic_selectors":{"type":"TypeBool","optional":true,"computed":true},"virtual_network_gateway_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_network_gateway_nat_rule":{"schema":{"external_mapping":{"type":"TypeList","required":true,"elem":{"schema":{"address_space":{"type":"TypeString","required":true},"port_range":{"type":"TypeString","optional":true}}}},"internal_mapping":{"type":"TypeList","required":true,"elem":{"schema":{"address_space":{"type":"TypeString","required":true},"port_range":{"type":"TypeString","optional":true}}}},"ip_configuration_id":{"type":"TypeString","optional":true},"mode":{"type":"TypeString","optional":true,"default":"EgressSnat","forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"type":{"type":"TypeString","optional":true,"default":"Static","forceNew":true},"virtual_network_gateway_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_network_peering":{"schema":{"allow_forwarded_traffic":{"type":"TypeBool","optional":true,"default":false},"allow_gateway_transit":{"type":"TypeBool","optional":true,"default":false},"allow_virtual_network_access":{"type":"TypeBool","optional":true,"default":true},"local_subnet_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"only_ipv6_peering_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"peer_complete_virtual_networks_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"remote_subnet_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"remote_virtual_network_id":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"triggers":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"use_remote_gateways":{"type":"TypeBool","optional":true,"default":false},"virtual_network_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_wan":{"schema":{"allow_branch_to_branch_traffic":{"type":"TypeBool","optional":true,"default":true},"disable_vpn_encryption":{"type":"TypeBool","optional":true,"default":false},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"office365_local_breakout_category":{"type":"TypeString","optional":true,"default":"None"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","optional":true,"default":"Standard"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_vmware_cluster":{"schema":{"cluster_node_count":{"type":"TypeInt","required":true},"cluster_number":{"type":"TypeInt","computed":true},"hosts":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"vmware_cloud_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":300,"read":5,"delete":300,"update":300}},"azurerm_vmware_express_route_authorization":{"schema":{"express_route_authorization_id":{"type":"TypeString","computed":true},"express_route_authorization_key":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_cloud_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_vmware_netapp_volume_attachment":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"netapp_volume_id":{"type":"TypeString","required":true,"forceNew":true},"vmware_cluster_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_vmware_private_cloud":{"schema":{"circuit":{"type":"TypeList","computed":true,"elem":{"schema":{"express_route_id":{"type":"TypeString","computed":true},"express_route_private_peering_id":{"type":"TypeString","computed":true},"primary_subnet_cidr":{"type":"TypeString","computed":true},"secondary_subnet_cidr":{"type":"TypeString","computed":true}}}},"hcx_cloud_manager_endpoint":{"type":"TypeString","computed":true},"internet_connection_enabled":{"type":"TypeBool","optional":true,"default":false},"location":{"type":"TypeString","required":true,"forceNew":true},"management_cluster":{"type":"TypeList","required":true,"elem":{"schema":{"hosts":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"id":{"type":"TypeInt","computed":true},"size":{"type":"TypeInt","required":true}}},"maxItems":1},"management_subnet_cidr":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_subnet_cidr":{"type":"TypeString","required":true,"forceNew":true},"nsxt_certificate_thumbprint":{"type":"TypeString","computed":true},"nsxt_manager_endpoint":{"type":"TypeString","computed":true},"nsxt_password":{"type":"TypeString","optional":true,"forceNew":true},"provisioning_subnet_cidr":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"vcenter_certificate_thumbprint":{"type":"TypeString","computed":true},"vcenter_password":{"type":"TypeString","optional":true,"forceNew":true},"vcsa_endpoint":{"type":"TypeString","computed":true},"vmotion_subnet_cidr":{"type":"TypeString","computed":true}},"timeouts":{"create":600,"read":5,"delete":600,"update":600}},"azurerm_voice_services_communications_gateway":{"schema":{"api_bridge":{"type":"TypeString","optional":true},"auto_generated_domain_name_label_scope":{"type":"TypeString","optional":true,"default":"TenantReuse","forceNew":true},"codecs":{"type":"TypeString","required":true},"connectivity":{"type":"TypeString","required":true,"forceNew":true},"e911_type":{"type":"TypeString","required":true},"emergency_dial_strings":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"microsoft_teams_voicemail_pilot_number":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"on_prem_mcp_enabled":{"type":"TypeBool","optional":true},"platforms":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_location":{"type":"TypeSet","required":true,"elem":{"schema":{"allowed_media_source_address_prefixes":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"allowed_signaling_source_address_prefixes":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"esrp_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true},"operator_addresses":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_voice_services_communications_gateway_test_line":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"phone_number":{"type":"TypeString","required":true},"purpose":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"voice_services_communications_gateway_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_vpn_gateway":{"schema":{"bgp_route_translation_for_nat_enabled":{"type":"TypeBool","optional":true,"default":false},"bgp_settings":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"asn":{"type":"TypeInt","required":true,"forceNew":true},"bgp_peering_address":{"type":"TypeString","computed":true},"instance_0_bgp_peering_address":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"custom_ips":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"default_ips":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"ip_configuration_id":{"type":"TypeString","computed":true},"tunnel_ips":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"instance_1_bgp_peering_address":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"custom_ips":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"default_ips":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"ip_configuration_id":{"type":"TypeString","computed":true},"tunnel_ips":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"peer_weight":{"type":"TypeInt","required":true,"forceNew":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"routing_preference":{"type":"TypeString","optional":true,"default":"Microsoft Network","forceNew":true},"scale_unit":{"type":"TypeInt","optional":true,"default":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_hub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_vpn_gateway_connection":{"schema":{"internet_security_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"remote_vpn_site_id":{"type":"TypeString","required":true,"forceNew":true},"routing":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"associated_route_table":{"type":"TypeString","required":true},"inbound_route_map_id":{"type":"TypeString","optional":true},"outbound_route_map_id":{"type":"TypeString","optional":true},"propagated_route_table":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"labels":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"route_table_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}},"maxItems":1},"traffic_selector_policy":{"type":"TypeSet","optional":true,"elem":{"schema":{"local_address_ranges":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"remote_address_ranges":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}}},"vpn_gateway_id":{"type":"TypeString","required":true,"forceNew":true},"vpn_link":{"type":"TypeList","required":true,"elem":{"schema":{"bandwidth_mbps":{"type":"TypeInt","optional":true,"default":10},"bgp_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"connection_mode":{"type":"TypeString","optional":true,"default":"Default"},"custom_bgp_address":{"type":"TypeSet","optional":true,"elem":{"schema":{"ip_address":{"type":"TypeString","required":true},"ip_configuration_id":{"type":"TypeString","required":true}}}},"egress_nat_rule_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"ingress_nat_rule_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"ipsec_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"dh_group":{"type":"TypeString","required":true},"encryption_algorithm":{"type":"TypeString","required":true},"ike_encryption_algorithm":{"type":"TypeString","required":true},"ike_integrity_algorithm":{"type":"TypeString","required":true},"integrity_algorithm":{"type":"TypeString","required":true},"pfs_group":{"type":"TypeString","required":true},"sa_data_size_kb":{"type":"TypeInt","required":true},"sa_lifetime_sec":{"type":"TypeInt","required":true}}},"minItems":1},"local_azure_ip_address_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true},"policy_based_traffic_selector_enabled":{"type":"TypeBool","optional":true,"default":false},"protocol":{"type":"TypeString","optional":true,"default":"IKEv2"},"ratelimit_enabled":{"type":"TypeBool","optional":true,"default":false},"route_weight":{"type":"TypeInt","optional":true,"default":0},"shared_key":{"type":"TypeString","optional":true},"vpn_site_link_id":{"type":"TypeString","required":true,"forceNew":true}}},"minItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_vpn_gateway_nat_rule":{"schema":{"external_mapping":{"type":"TypeList","optional":true,"elem":{"schema":{"address_space":{"type":"TypeString","required":true},"port_range":{"type":"TypeString","optional":true}}}},"internal_mapping":{"type":"TypeList","optional":true,"elem":{"schema":{"address_space":{"type":"TypeString","required":true},"port_range":{"type":"TypeString","optional":true}}}},"ip_configuration_id":{"type":"TypeString","optional":true},"mode":{"type":"TypeString","optional":true,"default":"EgressSnat","forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"type":{"type":"TypeString","optional":true,"default":"Static","forceNew":true},"vpn_gateway_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_vpn_server_configuration":{"schema":{"azure_active_directory_authentication":{"type":"TypeList","optional":true,"elem":{"schema":{"audience":{"type":"TypeString","required":true},"issuer":{"type":"TypeString","required":true},"tenant":{"type":"TypeString","required":true}}},"minItems":1},"client_revoked_certificate":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"thumbprint":{"type":"TypeString","required":true}}}},"client_root_certificate":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"public_cert_data":{"type":"TypeString","required":true}}}},"ipsec_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"dh_group":{"type":"TypeString","required":true},"ike_encryption":{"type":"TypeString","required":true},"ike_integrity":{"type":"TypeString","required":true},"ipsec_encryption":{"type":"TypeString","required":true},"ipsec_integrity":{"type":"TypeString","required":true},"pfs_group":{"type":"TypeString","required":true},"sa_data_size_kilobytes":{"type":"TypeInt","required":true},"sa_lifetime_seconds":{"type":"TypeInt","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"radius":{"type":"TypeList","optional":true,"elem":{"schema":{"client_root_certificate":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"thumbprint":{"type":"TypeString","required":true}}}},"server":{"type":"TypeList","optional":true,"elem":{"schema":{"address":{"type":"TypeString","required":true},"score":{"type":"TypeInt","required":true},"secret":{"type":"TypeString","required":true}}}},"server_root_certificate":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"public_cert_data":{"type":"TypeString","required":true}}}}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"vpn_authentication_types":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"vpn_protocols":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_vpn_server_configuration_policy_group":{"schema":{"is_default":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"policy":{"type":"TypeSet","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"priority":{"type":"TypeInt","optional":true,"default":0},"vpn_server_configuration_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_vpn_site":{"schema":{"address_cidrs":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"device_model":{"type":"TypeString","optional":true},"device_vendor":{"type":"TypeString","optional":true},"link":{"type":"TypeList","optional":true,"elem":{"schema":{"bgp":{"type":"TypeList","optional":true,"elem":{"schema":{"asn":{"type":"TypeInt","required":true},"peering_address":{"type":"TypeString","required":true}}},"maxItems":1},"fqdn":{"type":"TypeString","optional":true},"id":{"type":"TypeString","computed":true},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"provider_name":{"type":"TypeString","optional":true},"speed_in_mbps":{"type":"TypeInt","optional":true,"default":0}}},"minItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"o365_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"traffic_category":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"allow_endpoint_enabled":{"type":"TypeBool","optional":true,"default":false},"default_endpoint_enabled":{"type":"TypeBool","optional":true,"default":false},"optimize_endpoint_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_wan_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_web_app_active_slot":{"schema":{"last_successful_swap":{"type":"TypeString","description":"The timestamp of the last successful swap with `Production`","computed":true},"overwrite_network_config":{"type":"TypeBool","optional":true,"default":true,"description":"The swap action should overwrite the Production slot's network configuration with the configuration from this slot. Defaults to `true`.","forceNew":true},"slot_id":{"type":"TypeString","required":true,"description":"The ID of the Slot to swap with `Production`."}},"timeouts":{"create":30,"read":5,"delete":5,"update":30}},"azurerm_web_app_hybrid_connection":{"schema":{"hostname":{"type":"TypeString","required":true,"description":"The hostname of the endpoint."},"namespace_name":{"type":"TypeString","description":"The name of the Relay Namespace.","computed":true},"port":{"type":"TypeInt","required":true,"description":"The port to use for the endpoint"},"relay_id":{"type":"TypeString","required":true,"description":"The ID of the Relay Hybrid Connection to use.","forceNew":true},"relay_name":{"type":"TypeString","description":"The name of the Relay in use.","computed":true},"send_key_name":{"type":"TypeString","optional":true,"default":"RootManageSharedAccessKey","description":"The name of the Relay key with `Send` permission to use. Defaults to `RootManageSharedAccessKey`"},"send_key_value":{"type":"TypeString","description":"The Primary Access Key for the `send_key_name`","computed":true},"service_bus_namespace":{"type":"TypeString","description":"The Service Bus Namespace.","computed":true},"service_bus_suffix":{"type":"TypeString","description":"The suffix for the endpoint.","computed":true},"web_app_id":{"type":"TypeString","required":true,"description":"The ID of the Web App for this Hybrid Connection.","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":5,"update":30}},"azurerm_web_application_firewall_policy":{"schema":{"custom_rules":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"group_rate_limit_by":{"type":"TypeString","optional":true},"match_conditions":{"type":"TypeList","required":true,"elem":{"schema":{"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"match_variables":{"type":"TypeList","required":true,"elem":{"schema":{"selector":{"type":"TypeString","optional":true},"variable_name":{"type":"TypeString","required":true}}}},"negation_condition":{"type":"TypeBool","optional":true},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"name":{"type":"TypeString","optional":true},"priority":{"type":"TypeInt","required":true},"rate_limit_duration":{"type":"TypeString","optional":true},"rate_limit_threshold":{"type":"TypeInt","optional":true},"rule_type":{"type":"TypeString","required":true}}}},"http_listener_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_rules":{"type":"TypeList","required":true,"elem":{"schema":{"exclusion":{"type":"TypeList","optional":true,"elem":{"schema":{"excluded_rule_set":{"type":"TypeList","optional":true,"elem":{"schema":{"rule_group":{"type":"TypeList","optional":true,"elem":{"schema":{"excluded_rules":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"rule_group_name":{"type":"TypeString","required":true}}}},"type":{"type":"TypeString","optional":true,"default":"OWASP"},"version":{"type":"TypeString","optional":true,"default":"3.2"}}},"maxItems":1},"match_variable":{"type":"TypeString","required":true},"selector":{"type":"TypeString","required":true},"selector_match_operator":{"type":"TypeString","required":true}}}},"managed_rule_set":{"type":"TypeList","required":true,"elem":{"schema":{"rule_group_override":{"type":"TypeList","optional":true,"elem":{"schema":{"rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true,"default":false},"id":{"type":"TypeString","required":true}}}},"rule_group_name":{"type":"TypeString","required":true}}}},"type":{"type":"TypeString","optional":true,"default":"OWASP"},"version":{"type":"TypeString","required":true}}}}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"path_based_rule_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"policy_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"file_upload_limit_in_mb":{"type":"TypeInt","optional":true,"default":100},"js_challenge_cookie_expiration_in_minutes":{"type":"TypeInt","optional":true,"default":30},"log_scrubbing":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"rule":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"match_variable":{"type":"TypeString","required":true},"selector":{"type":"TypeString","optional":true,"description":"When matchVariable is a collection, operator used to specify which elements in the collection this rule applies to."},"selector_match_operator":{"type":"TypeString","optional":true,"default":"Equals"}}}}}},"maxItems":1},"max_request_body_size_in_kb":{"type":"TypeInt","optional":true,"default":128},"mode":{"type":"TypeString","optional":true,"default":"Prevention"},"request_body_check":{"type":"TypeBool","optional":true,"default":true},"request_body_inspect_limit_in_kb":{"type":"TypeInt","optional":true,"default":128}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_web_pubsub":{"schema":{"aad_auth_enabled":{"type":"TypeBool","optional":true,"default":true},"capacity":{"type":"TypeInt","optional":true,"default":1},"external_ip":{"type":"TypeString","computed":true},"hostname":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"live_trace":{"type":"TypeList","optional":true,"elem":{"schema":{"connectivity_logs_enabled":{"type":"TypeBool","optional":true,"default":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"http_request_logs_enabled":{"type":"TypeBool","optional":true,"default":true},"messaging_logs_enabled":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"local_auth_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_access_key":{"type":"TypeString","computed":true},"primary_connection_string":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"public_port":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_access_key":{"type":"TypeString","computed":true},"secondary_connection_string":{"type":"TypeString","computed":true},"server_port":{"type":"TypeInt","computed":true},"sku":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tls_client_cert_enabled":{"type":"TypeBool","optional":true,"default":false},"version":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_web_pubsub_custom_certificate":{"schema":{"certificate_version":{"type":"TypeString","computed":true},"custom_certificate_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"web_pubsub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_web_pubsub_custom_domain":{"schema":{"domain_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"web_pubsub_custom_certificate_id":{"type":"TypeString","required":true,"forceNew":true},"web_pubsub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_web_pubsub_hub":{"schema":{"anonymous_connections_enabled":{"type":"TypeBool","optional":true,"default":false},"event_handler":{"type":"TypeList","optional":true,"elem":{"schema":{"auth":{"type":"TypeList","optional":true,"elem":{"schema":{"managed_identity_id":{"type":"TypeString","required":true}}},"maxItems":1,"minItems":1},"system_events":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"url_template":{"type":"TypeString","required":true},"user_event_pattern":{"type":"TypeString","optional":true}}}},"event_listener":{"type":"TypeList","optional":true,"elem":{"schema":{"eventhub_name":{"type":"TypeString","required":true},"eventhub_namespace_name":{"type":"TypeString","required":true},"system_event_name_filter":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"user_event_name_filter":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"web_pubsub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_web_pubsub_network_acl":{"schema":{"default_action":{"type":"TypeString","optional":true,"default":"Deny"},"private_endpoint":{"type":"TypeSet","optional":true,"elem":{"schema":{"allowed_request_types":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"denied_request_types":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"id":{"type":"TypeString","required":true}}}},"public_network":{"type":"TypeList","required":true,"elem":{"schema":{"allowed_request_types":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"denied_request_types":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"web_pubsub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_web_pubsub_shared_private_link_resource":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"request_message":{"type":"TypeString","optional":true},"status":{"type":"TypeString","computed":true},"subresource_name":{"type":"TypeString","required":true,"forceNew":true},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true},"web_pubsub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_windows_function_app":{"schema":{"app_settings":{"type":"TypeMap","optional":true,"description":"A map of key-value pairs for [App Settings](https://docs.microsoft.com/en-us/azure/azure-functions/functions-app-settings) and custom values.","elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`."}}},"maxItems":1},"additional_login_parameters":{"type":"TypeMap","optional":true,"description":"Specifies a map of Login Parameters to send to the OpenID Connect authorization endpoint when a user logs in.","elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","optional":true,"description":"The default authentication provider to use when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`.","computed":true},"enabled":{"type":"TypeBool","required":true,"description":"Should the Authentication / Authorization feature be enabled?"},"facebook":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret":{"type":"TypeString","optional":true,"description":"The App Secret of the Facebook app used for Facebook Login. Cannot be specified with `app_secret_setting_name`."},"app_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login. Cannot be specified with `app_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"github":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret of the GitHub app used for GitHub Login. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret":{"type":"TypeString","optional":true,"description":"The client secret associated with the Google web application. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for Google Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","elem":{"type":"TypeString"}}}},"maxItems":1},"issuer":{"type":"TypeString","optional":true,"description":"The OpenID Connect Issuer URI that represents the entity which issues access tokens."},"microsoft":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret":{"type":"TypeString","optional":true,"description":"The OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"The list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, `wl.basic` is used as the default scope.","elem":{"type":"TypeString"}}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true,"description":"The RuntimeVersion of the Authentication / Authorization feature in use.","computed":true},"token_refresh_extension_hours":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Windows Web App durably store platform-specific security tokens that are obtained during login flows? Defaults to `false`."},"twitter":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret":{"type":"TypeString","optional":true,"description":"The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`."},"consumer_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`."}}},"maxItems":1},"unauthenticated_client_action":{"type":"TypeString","optional":true,"description":"The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`.","computed":true}}},"maxItems":1},"auth_settings_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_applications":{"type":"TypeList","optional":true,"description":"The list of allowed Applications for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"allowed_groups":{"type":"TypeList","optional":true,"description":"The list of allowed Group Names for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_identities":{"type":"TypeList","optional":true,"description":"The list of allowed Identities for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret_certificate_thumbprint":{"type":"TypeString","optional":true,"description":"The thumbprint of the certificate used for signing purposes."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client."},"jwt_allowed_client_applications":{"type":"TypeList","optional":true,"description":"A list of Allowed Client Applications in the JWT Claim.","elem":{"type":"TypeString"}},"jwt_allowed_groups":{"type":"TypeList","optional":true,"description":"A list of Allowed Groups in the JWT Claim.","elem":{"type":"TypeString"}},"login_parameters":{"type":"TypeMap","optional":true,"description":"A map of key-value pairs to send to the Authorisation Endpoint when a user logs in.","elem":{"type":"TypeString"}},"tenant_auth_endpoint":{"type":"TypeString","required":true,"description":"The Azure Tenant Endpoint for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`."},"www_authentication_disabled":{"type":"TypeBool","optional":true,"description":"Should the www-authenticate provider should be omitted from the request? Defaults to `false`"}}},"maxItems":1},"apple_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Apple web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Apple Login."},"login_scopes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"auth_enabled":{"type":"TypeBool","optional":true,"description":"Should the AuthV2 Settings be enabled. Defaults to `false`"},"azure_static_web_app_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Static Web App Authentication."}}},"maxItems":1},"config_file_path":{"type":"TypeString","optional":true,"description":"The path to the App Auth settings. **Note:** Relative Paths are evaluated from the Site Root directory."},"custom_oidc_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"authorisation_endpoint":{"type":"TypeString","description":"The endpoint to make the Authorisation Request.","computed":true},"certification_uri":{"type":"TypeString","description":"The endpoint that provides the keys necessary to validate the token.","computed":true},"client_credential_method":{"type":"TypeString","description":"The Client Credential Method used. Currently the only supported value is `ClientSecretPost`.","computed":true},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with this Custom OIDC."},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the secret for this Custom OIDC Client.","computed":true},"issuer_endpoint":{"type":"TypeString","description":"The endpoint that issued the Token.","computed":true},"name":{"type":"TypeString","required":true,"description":"The name of the Custom OIDC Authentication Provider."},"name_claim_type":{"type":"TypeString","optional":true,"description":"The name of the claim that contains the users name."},"openid_configuration_endpoint":{"type":"TypeString","required":true,"description":"The endpoint that contains all the configuration endpoints for this Custom OIDC provider."},"scopes":{"type":"TypeList","optional":true,"description":"The list of the scopes that should be requested while authenticating.","elem":{"type":"TypeString"}},"token_endpoint":{"type":"TypeString","description":"The endpoint used to request a Token.","computed":true}}}},"default_provider":{"type":"TypeString","optional":true,"description":"The Default Authentication Provider to use when the `unauthenticated_action` is set to `RedirectToLoginPage`. Possible values include: `apple`, `azureactivedirectory`, `facebook`, `github`, `google`, `twitter` and the `name` of your `custom_oidc_v2` provider."},"excluded_paths":{"type":"TypeList","optional":true,"description":"The paths which should be excluded from the `unauthenticated_action` when it is set to `RedirectToLoginPage`.","elem":{"type":"TypeString"}},"facebook_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login."},"graph_api_version":{"type":"TypeString","optional":true,"description":"The version of the Facebook API to be used while logging in.","computed":true},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"forward_proxy_convention":{"type":"TypeString","optional":true,"default":"NoProxy","description":"The convention used to determine the url of the request made. Possible values include `ForwardProxyConventionNoProxy`, `ForwardProxyConventionStandard`, `ForwardProxyConventionCustom`. Defaults to `ForwardProxyConventionNoProxy`"},"forward_proxy_custom_host_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the host of the request."},"forward_proxy_custom_scheme_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the scheme of the request."},"github_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Google Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of Login scopes that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"http_route_api_prefix":{"type":"TypeString","optional":true,"default":"/.auth","description":"The prefix that should precede all the authentication and authorisation paths. Defaults to `/.auth`"},"login":{"type":"TypeList","required":true,"elem":{"schema":{"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"External URLs that can be redirected to as part of logging in or logging out of the app. This is an advanced setting typically only needed by Windows Store application backends. **Note:** URLs within the current domain are always implicitly allowed.","elem":{"type":"TypeString"}},"cookie_expiration_convention":{"type":"TypeString","optional":true,"default":"FixedTime","description":"The method by which cookies expire. Possible values include: `FixedTime`, and `IdentityProviderDerived`. Defaults to `FixedTime`."},"cookie_expiration_time":{"type":"TypeString","optional":true,"default":"08:00:00","description":"The time after the request is made when the session cookie should expire. Defaults to `08:00:00`."},"logout_endpoint":{"type":"TypeString","optional":true,"description":"The endpoint to which logout requests should be made."},"nonce_expiration_time":{"type":"TypeString","optional":true,"default":"00:05:00","description":"The time after the request is made when the nonce should expire. Defaults to `00:05:00`."},"preserve_url_fragments_for_logins":{"type":"TypeBool","optional":true,"default":false,"description":"Should the fragments from the request be preserved after the login request is made. Defaults to `false`."},"token_refresh_extension_time":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Token Store configuration Enabled. Defaults to `false`"},"token_store_path":{"type":"TypeString","optional":true,"description":"The directory path in the App Filesystem in which the tokens will be stored."},"token_store_sas_setting_name":{"type":"TypeString","optional":true,"description":"The name of the app setting which contains the SAS URL of the blob storage containing the tokens."},"validate_nonce":{"type":"TypeBool","optional":true,"default":true,"description":"Should the nonce be validated while completing the login flow. Defaults to `true`."}}},"maxItems":1},"microsoft_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Microsoft Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication."},"login_scopes":{"type":"TypeList","optional":true,"description":"The list of Login scopes that will be requested as part of Microsoft Account authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"require_authentication":{"type":"TypeBool","optional":true,"description":"Should the authentication flow be used for all requests."},"require_https":{"type":"TypeBool","optional":true,"default":true,"description":"Should HTTPS be required on connections? Defaults to true."},"runtime_version":{"type":"TypeString","optional":true,"default":"~1","description":"The Runtime Version of the Authentication and Authorisation feature of this App. Defaults to `~1`"},"twitter_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in."}}},"maxItems":1},"unauthenticated_action":{"type":"TypeString","optional":true,"default":"RedirectToLoginPage","description":"The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`."}}},"maxItems":1},"backup":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should this backup job be enabled?"},"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Backup."},"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","required":true,"description":"How often the backup should be executed (e.g. for weekly backup, this should be set to `7` and `frequency_unit` should be set to `Day`)."},"frequency_unit":{"type":"TypeString","required":true,"description":"The unit of time for how often the backup should take place. Possible values include: `Day` and `Hour`."},"keep_at_least_one_backup":{"type":"TypeBool","optional":true,"default":false,"description":"Should the service keep at least one backup, regardless of age of backup. Defaults to `false`."},"last_execution_time":{"type":"TypeString","description":"The time the backup was last attempted.","computed":true},"retention_period_days":{"type":"TypeInt","optional":true,"default":30,"description":"After how many days backups should be deleted."},"start_time":{"type":"TypeString","optional":true,"description":"When the schedule should start working in RFC-3339 format.","computed":true}}},"maxItems":1},"storage_account_url":{"type":"TypeString","required":true,"description":"The SAS URL to the container."}}},"maxItems":1},"builtin_logging_enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should built in logging be enabled. Configures `AzureWebJobsDashboard` app setting based on the configured storage setting"},"client_certificate_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the function app use Client Certificates"},"client_certificate_exclusion_paths":{"type":"TypeString","optional":true,"description":"Paths to exclude when using client certificates, separated by ;"},"client_certificate_mode":{"type":"TypeString","optional":true,"default":"Optional","description":"The mode of the Function App's client certificates requirement for incoming requests. Possible values are `Required`, `Optional`, and `OptionalInteractiveUser` "},"connection_string":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Connection."},"type":{"type":"TypeString","required":true,"description":"Type of database. Possible values include: `MySQL`, `SQLServer`, `SQLAzure`, `Custom`, `NotificationHub`, `ServiceBus`, `EventHub`, `APIHub`, `DocDb`, `RedisCache`, and `PostgreSQL`."},"value":{"type":"TypeString","required":true,"description":"The connection string value."}}}},"content_share_force_disabled":{"type":"TypeBool","optional":true,"default":false,"description":"Force disable the content share settings."},"custom_domain_verification_id":{"type":"TypeString","computed":true},"daily_memory_time_quota":{"type":"TypeInt","optional":true,"default":0,"description":"The amount of memory in gigabyte-seconds that your application is allowed to consume per day. Setting this value only affects function apps in Consumption Plans."},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Is the Windows Function App enabled."},"ftp_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"functions_extension_version":{"type":"TypeString","optional":true,"default":"~4","description":"The runtime version associated with the Function App."},"hosting_environment_id":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","optional":true,"description":"Can the Function App only be accessed via HTTPS?","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_reference_identity_id":{"type":"TypeString","optional":true,"description":"The User Assigned Identity to use for Key Vault access.","computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"description":"Specifies the name of the Function App.","forceNew":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_plan_id":{"type":"TypeString","required":true,"description":"The ID of the App Service Plan within which to create this Function App"},"site_config":{"type":"TypeList","required":true,"elem":{"schema":{"always_on":{"type":"TypeBool","optional":true,"description":"If this Windows Web App is Always On enabled. Defaults to `false`.","computed":true},"api_definition_url":{"type":"TypeString","optional":true,"description":"The URL of the API definition that describes this Windows Function App."},"api_management_api_id":{"type":"TypeString","optional":true,"description":"The ID of the API Management API for this Windows Function App."},"app_command_line":{"type":"TypeString","optional":true,"description":"The program and any arguments used to launch this app via the command line. (Example `node myapp.js`)."},"app_scale_limit":{"type":"TypeInt","optional":true,"description":"The number of workers this function app can scale out to. Only applicable to apps on the Consumption and Premium plan.","computed":true},"app_service_logs":{"type":"TypeList","optional":true,"elem":{"schema":{"disk_quota_mb":{"type":"TypeInt","optional":true,"default":35,"description":"The amount of disk space to use for logs. Valid values are between `25` and `100`."},"retention_period_days":{"type":"TypeInt","optional":true,"description":"The retention period for logs in days. Valid values are between `0` and `99999`. Defaults to `0` (never delete)."}}},"maxItems":1},"application_insights_connection_string":{"type":"TypeString","optional":true,"description":"The Connection String for linking the Windows Function App to Application Insights."},"application_insights_key":{"type":"TypeString","optional":true,"description":"The Instrumentation Key for connecting the Windows Function App to Application Insights."},"application_stack":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"dotnet_version":{"type":"TypeString","optional":true,"default":"v4.0","description":"The version of .Net. Possible values are `v3.0`, `v4.0`, `v6.0` and `v7.0`"},"java_version":{"type":"TypeString","optional":true,"description":"The version of Java to use. Possible values are `1.8`, `11` and `17`"},"node_version":{"type":"TypeString","optional":true,"description":"The version of Node to use. Possible values include `12`, `14`, `16` and `18`"},"powershell_core_version":{"type":"TypeString","optional":true,"description":"The PowerShell Core version to use. Possible values are `7`, `7.2`, and `7.4`"},"use_custom_runtime":{"type":"TypeBool","optional":true,"description":"Does the Function App use a custom Application Stack?","computed":true},"use_dotnet_isolated_runtime":{"type":"TypeBool","optional":true,"description":"Should the DotNet process use an isolated runtime. Defaults to `false`.","computed":true}}},"maxItems":1},"cors":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","optional":true,"description":"Specifies a list of origins that should be allowed to make cross-origin calls.","elem":{"type":"TypeString"},"minItems":1},"support_credentials":{"type":"TypeBool","optional":true,"default":false,"description":"Are credentials allowed in CORS requests? Defaults to `false`."}}},"maxItems":1},"default_documents":{"type":"TypeList","optional":true,"description":"Specifies a list of Default Documents for the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"detailed_error_logging_enabled":{"type":"TypeBool","description":"Is detailed error logging enabled","computed":true},"elastic_instance_minimum":{"type":"TypeInt","optional":true,"description":"The number of minimum instances for this Windows Function App. Only affects apps on Elastic Premium plans.","computed":true},"ftps_state":{"type":"TypeString","optional":true,"default":"Disabled","description":"State of FTP / FTPS service for this function app. Possible values include: `AllAllowed`, `FtpsOnly` and `Disabled`. Defaults to `Disabled`."},"health_check_eviction_time_in_min":{"type":"TypeInt","optional":true,"description":"The amount of time in minutes that a node is unhealthy before being removed from the load balancer. Possible values are between `2` and `10`. Only valid in conjunction with `health_check_path`"},"health_check_path":{"type":"TypeString","optional":true,"description":"The path to be checked for this function app health."},"http2_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Specifies if the http2 protocol should be enabled. Defaults to `false`."},"ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"load_balancing_mode":{"type":"TypeString","optional":true,"default":"LeastRequests","description":"The Site load balancing mode. Possible values include: `WeightedRoundRobin`, `LeastRequests`, `LeastResponseTime`, `WeightedTotalTraffic`, `RequestHash`, `PerSiteRoundRobin`. Defaults to `LeastRequests` if omitted."},"managed_pipeline_mode":{"type":"TypeString","optional":true,"default":"Integrated","description":"The Managed Pipeline mode. Possible values include: `Integrated`, `Classic`. Defaults to `Integrated`."},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2","description":"The configures the minimum version of TLS required for SSL requests. Possible values include: `1.0`, `1.1`, and `1.2`. Defaults to `1.2`."},"pre_warmed_instance_count":{"type":"TypeInt","optional":true,"description":"The number of pre-warmed instances for this function app. Only affects apps on an Elastic Premium plan.","computed":true},"remote_debugging_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should Remote Debugging be enabled. Defaults to `false`."},"remote_debugging_version":{"type":"TypeString","optional":true,"description":"The Remote Debugging Version. Possible values include `VS2017`, `VS2019`, and `VS2022`","computed":true},"runtime_scale_monitoring_enabled":{"type":"TypeBool","optional":true,"description":"Should Functions Runtime Scale Monitoring be enabled."},"scm_ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"scm_ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2","description":"Configures the minimum version of TLS required for SSL requests to the SCM site Possible values include: `1.0`, `1.1`, and `1.2`. Defaults to `1.2`."},"scm_type":{"type":"TypeString","description":"The SCM Type in use by the Windows Function App.","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Windows Function App `ip_restriction` configuration be used for the SCM also."},"use_32_bit_worker":{"type":"TypeBool","optional":true,"default":true,"description":"Should the Windows Web App use a 32-bit worker."},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied? Defaults to `false`."},"websockets_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should Web Sockets be enabled. Defaults to `false`."},"windows_fx_version":{"type":"TypeString","description":"The Windows FX Version string.","computed":true},"worker_count":{"type":"TypeInt","optional":true,"description":"The number of Workers for this Windows Function App.","computed":true}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The Site Credentials Username used for publishing.","computed":true},"password":{"type":"TypeString","description":"The Site Credentials Password used for publishing.","computed":true}}}},"sticky_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"app_setting_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"connection_string_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1}}},"maxItems":1},"storage_account":{"type":"TypeSet","optional":true,"elem":{"schema":{"access_key":{"type":"TypeString","required":true},"account_name":{"type":"TypeString","required":true},"mount_path":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"share_name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"storage_account_access_key":{"type":"TypeString","optional":true,"description":"The access key which will be used to access the storage account for the Function App."},"storage_account_name":{"type":"TypeString","optional":true,"description":"The backend storage account name which will be used by this Function App."},"storage_key_vault_secret_id":{"type":"TypeString","optional":true,"description":"The Key Vault Secret ID, including version, that contains the Connection String to connect to the storage account for this Function App."},"storage_uses_managed_identity":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Function App use its Managed Identity to access storage?"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_network_subnet_id":{"type":"TypeString","optional":true},"vnet_image_pull_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Is container image pull over virtual network enabled? Defaults to `false`."},"webdeploy_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"zip_deploy_file":{"type":"TypeString","optional":true,"description":"The local path and filename of the Zip packaged application to deploy to this Windows Function App. **Note:** Using this value requires `WEBSITE_RUN_FROM_PACKAGE=1` to be set on the App in `app_settings`.","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_windows_function_app_slot":{"schema":{"app_settings":{"type":"TypeMap","optional":true,"description":"A map of key-value pairs for [App Settings](https://docs.microsoft.com/en-us/azure/azure-functions/functions-app-settings) and custom values.","elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`."}}},"maxItems":1},"additional_login_parameters":{"type":"TypeMap","optional":true,"description":"Specifies a map of Login Parameters to send to the OpenID Connect authorization endpoint when a user logs in.","elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","optional":true,"description":"The default authentication provider to use when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`.","computed":true},"enabled":{"type":"TypeBool","required":true,"description":"Should the Authentication / Authorization feature be enabled?"},"facebook":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret":{"type":"TypeString","optional":true,"description":"The App Secret of the Facebook app used for Facebook Login. Cannot be specified with `app_secret_setting_name`."},"app_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login. Cannot be specified with `app_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"github":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret of the GitHub app used for GitHub Login. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret":{"type":"TypeString","optional":true,"description":"The client secret associated with the Google web application. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for Google Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","elem":{"type":"TypeString"}}}},"maxItems":1},"issuer":{"type":"TypeString","optional":true,"description":"The OpenID Connect Issuer URI that represents the entity which issues access tokens."},"microsoft":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret":{"type":"TypeString","optional":true,"description":"The OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"The list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, `wl.basic` is used as the default scope.","elem":{"type":"TypeString"}}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true,"description":"The RuntimeVersion of the Authentication / Authorization feature in use.","computed":true},"token_refresh_extension_hours":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Windows Web App durably store platform-specific security tokens that are obtained during login flows? Defaults to `false`."},"twitter":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret":{"type":"TypeString","optional":true,"description":"The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`."},"consumer_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`."}}},"maxItems":1},"unauthenticated_client_action":{"type":"TypeString","optional":true,"description":"The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`.","computed":true}}},"maxItems":1},"auth_settings_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_applications":{"type":"TypeList","optional":true,"description":"The list of allowed Applications for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"allowed_groups":{"type":"TypeList","optional":true,"description":"The list of allowed Group Names for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_identities":{"type":"TypeList","optional":true,"description":"The list of allowed Identities for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret_certificate_thumbprint":{"type":"TypeString","optional":true,"description":"The thumbprint of the certificate used for signing purposes."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client."},"jwt_allowed_client_applications":{"type":"TypeList","optional":true,"description":"A list of Allowed Client Applications in the JWT Claim.","elem":{"type":"TypeString"}},"jwt_allowed_groups":{"type":"TypeList","optional":true,"description":"A list of Allowed Groups in the JWT Claim.","elem":{"type":"TypeString"}},"login_parameters":{"type":"TypeMap","optional":true,"description":"A map of key-value pairs to send to the Authorisation Endpoint when a user logs in.","elem":{"type":"TypeString"}},"tenant_auth_endpoint":{"type":"TypeString","required":true,"description":"The Azure Tenant Endpoint for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`."},"www_authentication_disabled":{"type":"TypeBool","optional":true,"description":"Should the www-authenticate provider should be omitted from the request? Defaults to `false`"}}},"maxItems":1},"apple_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Apple web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Apple Login."},"login_scopes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"auth_enabled":{"type":"TypeBool","optional":true,"description":"Should the AuthV2 Settings be enabled. Defaults to `false`"},"azure_static_web_app_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Static Web App Authentication."}}},"maxItems":1},"config_file_path":{"type":"TypeString","optional":true,"description":"The path to the App Auth settings. **Note:** Relative Paths are evaluated from the Site Root directory."},"custom_oidc_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"authorisation_endpoint":{"type":"TypeString","description":"The endpoint to make the Authorisation Request.","computed":true},"certification_uri":{"type":"TypeString","description":"The endpoint that provides the keys necessary to validate the token.","computed":true},"client_credential_method":{"type":"TypeString","description":"The Client Credential Method used. Currently the only supported value is `ClientSecretPost`.","computed":true},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with this Custom OIDC."},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the secret for this Custom OIDC Client.","computed":true},"issuer_endpoint":{"type":"TypeString","description":"The endpoint that issued the Token.","computed":true},"name":{"type":"TypeString","required":true,"description":"The name of the Custom OIDC Authentication Provider."},"name_claim_type":{"type":"TypeString","optional":true,"description":"The name of the claim that contains the users name."},"openid_configuration_endpoint":{"type":"TypeString","required":true,"description":"The endpoint that contains all the configuration endpoints for this Custom OIDC provider."},"scopes":{"type":"TypeList","optional":true,"description":"The list of the scopes that should be requested while authenticating.","elem":{"type":"TypeString"}},"token_endpoint":{"type":"TypeString","description":"The endpoint used to request a Token.","computed":true}}}},"default_provider":{"type":"TypeString","optional":true,"description":"The Default Authentication Provider to use when the `unauthenticated_action` is set to `RedirectToLoginPage`. Possible values include: `apple`, `azureactivedirectory`, `facebook`, `github`, `google`, `twitter` and the `name` of your `custom_oidc_v2` provider."},"excluded_paths":{"type":"TypeList","optional":true,"description":"The paths which should be excluded from the `unauthenticated_action` when it is set to `RedirectToLoginPage`.","elem":{"type":"TypeString"}},"facebook_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login."},"graph_api_version":{"type":"TypeString","optional":true,"description":"The version of the Facebook API to be used while logging in.","computed":true},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"forward_proxy_convention":{"type":"TypeString","optional":true,"default":"NoProxy","description":"The convention used to determine the url of the request made. Possible values include `ForwardProxyConventionNoProxy`, `ForwardProxyConventionStandard`, `ForwardProxyConventionCustom`. Defaults to `ForwardProxyConventionNoProxy`"},"forward_proxy_custom_host_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the host of the request."},"forward_proxy_custom_scheme_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the scheme of the request."},"github_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Google Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of Login scopes that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"http_route_api_prefix":{"type":"TypeString","optional":true,"default":"/.auth","description":"The prefix that should precede all the authentication and authorisation paths. Defaults to `/.auth`"},"login":{"type":"TypeList","required":true,"elem":{"schema":{"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"External URLs that can be redirected to as part of logging in or logging out of the app. This is an advanced setting typically only needed by Windows Store application backends. **Note:** URLs within the current domain are always implicitly allowed.","elem":{"type":"TypeString"}},"cookie_expiration_convention":{"type":"TypeString","optional":true,"default":"FixedTime","description":"The method by which cookies expire. Possible values include: `FixedTime`, and `IdentityProviderDerived`. Defaults to `FixedTime`."},"cookie_expiration_time":{"type":"TypeString","optional":true,"default":"08:00:00","description":"The time after the request is made when the session cookie should expire. Defaults to `08:00:00`."},"logout_endpoint":{"type":"TypeString","optional":true,"description":"The endpoint to which logout requests should be made."},"nonce_expiration_time":{"type":"TypeString","optional":true,"default":"00:05:00","description":"The time after the request is made when the nonce should expire. Defaults to `00:05:00`."},"preserve_url_fragments_for_logins":{"type":"TypeBool","optional":true,"default":false,"description":"Should the fragments from the request be preserved after the login request is made. Defaults to `false`."},"token_refresh_extension_time":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Token Store configuration Enabled. Defaults to `false`"},"token_store_path":{"type":"TypeString","optional":true,"description":"The directory path in the App Filesystem in which the tokens will be stored."},"token_store_sas_setting_name":{"type":"TypeString","optional":true,"description":"The name of the app setting which contains the SAS URL of the blob storage containing the tokens."},"validate_nonce":{"type":"TypeBool","optional":true,"default":true,"description":"Should the nonce be validated while completing the login flow. Defaults to `true`."}}},"maxItems":1},"microsoft_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Microsoft Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication."},"login_scopes":{"type":"TypeList","optional":true,"description":"The list of Login scopes that will be requested as part of Microsoft Account authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"require_authentication":{"type":"TypeBool","optional":true,"description":"Should the authentication flow be used for all requests."},"require_https":{"type":"TypeBool","optional":true,"default":true,"description":"Should HTTPS be required on connections? Defaults to true."},"runtime_version":{"type":"TypeString","optional":true,"default":"~1","description":"The Runtime Version of the Authentication and Authorisation feature of this App. Defaults to `~1`"},"twitter_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in."}}},"maxItems":1},"unauthenticated_action":{"type":"TypeString","optional":true,"default":"RedirectToLoginPage","description":"The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`."}}},"maxItems":1},"backup":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should this backup job be enabled?"},"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Backup."},"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","required":true,"description":"How often the backup should be executed (e.g. for weekly backup, this should be set to `7` and `frequency_unit` should be set to `Day`)."},"frequency_unit":{"type":"TypeString","required":true,"description":"The unit of time for how often the backup should take place. Possible values include: `Day` and `Hour`."},"keep_at_least_one_backup":{"type":"TypeBool","optional":true,"default":false,"description":"Should the service keep at least one backup, regardless of age of backup. Defaults to `false`."},"last_execution_time":{"type":"TypeString","description":"The time the backup was last attempted.","computed":true},"retention_period_days":{"type":"TypeInt","optional":true,"default":30,"description":"After how many days backups should be deleted."},"start_time":{"type":"TypeString","optional":true,"description":"When the schedule should start working in RFC-3339 format.","computed":true}}},"maxItems":1},"storage_account_url":{"type":"TypeString","required":true,"description":"The SAS URL to the container."}}},"maxItems":1},"builtin_logging_enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should built in logging be enabled. Configures `AzureWebJobsDashboard` app setting based on the configured storage setting."},"client_certificate_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Function App Slot use Client Certificates."},"client_certificate_exclusion_paths":{"type":"TypeString","optional":true,"description":"Paths to exclude when using client certificates, separated by ;"},"client_certificate_mode":{"type":"TypeString","optional":true,"default":"Optional","description":"The mode of the Function App Slot's client certificates requirement for incoming requests. Possible values are `Required`, `Optional`, and `OptionalInteractiveUser`."},"connection_string":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Connection."},"type":{"type":"TypeString","required":true,"description":"Type of database. Possible values include: `MySQL`, `SQLServer`, `SQLAzure`, `Custom`, `NotificationHub`, `ServiceBus`, `EventHub`, `APIHub`, `DocDb`, `RedisCache`, and `PostgreSQL`."},"value":{"type":"TypeString","required":true,"description":"The connection string value."}}}},"content_share_force_disabled":{"type":"TypeBool","optional":true,"default":false,"description":"Force disable the content share settings."},"custom_domain_verification_id":{"type":"TypeString","description":"The identifier used by App Service to perform domain ownership verification via DNS TXT record.","computed":true},"daily_memory_time_quota":{"type":"TypeInt","optional":true,"default":0,"description":"The amount of memory in gigabyte-seconds that your application is allowed to consume per day. Setting this value only affects function apps in Consumption Plans."},"default_hostname":{"type":"TypeString","description":"The default hostname of the Windows Function App Slot.","computed":true},"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Is the Windows Function App Slot enabled."},"ftp_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"function_app_id":{"type":"TypeString","required":true,"description":"The ID of the Windows Function App this Slot is a member of.","forceNew":true},"functions_extension_version":{"type":"TypeString","optional":true,"default":"~4","description":"The runtime version associated with the Function App Slot."},"hosting_environment_id":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","optional":true,"default":false,"description":"Can the Function App Slot only be accessed via HTTPS?"},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_reference_identity_id":{"type":"TypeString","optional":true,"description":"The User Assigned Identity to use for Key Vault access.","computed":true},"kind":{"type":"TypeString","description":"The Kind value for this Windows Function App Slot.","computed":true},"name":{"type":"TypeString","required":true,"description":"Specifies the name of the Windows Function App Slot.","forceNew":true},"outbound_ip_address_list":{"type":"TypeList","description":"A list of outbound IP addresses. For example `[\"52.23.25.3\", \"52.143.43.12\"]`.","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","description":"A comma separated list of outbound IP addresses as a string. For example `52.23.25.3,52.143.43.12`.","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","description":"A list of possible outbound IP addresses, not all of which are necessarily in use. This is a superset of `outbound_ip_address_list`. For example `[\"52.23.25.3\", \"52.143.43.12\"]`.","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","description":"A comma separated list of possible outbound IP addresses as a string. For example `52.23.25.3,52.143.43.12,52.143.43.17`. This is a superset of `outbound_ip_addresses`. For example `[\"52.23.25.3\", \"52.143.43.12\",\"52.143.43.17\"]`.","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"service_plan_id":{"type":"TypeString","optional":true},"site_config":{"type":"TypeList","required":true,"elem":{"schema":{"always_on":{"type":"TypeBool","optional":true,"description":"If this Windows Web App is Always On enabled. Defaults to `false`.","computed":true},"api_definition_url":{"type":"TypeString","optional":true,"description":"The URL of the API definition that describes this Windows Function App."},"api_management_api_id":{"type":"TypeString","optional":true,"description":"The ID of the API Management API for this Windows Function App."},"app_command_line":{"type":"TypeString","optional":true,"description":"The program and any arguments used to launch this app via the command line. (Example `node myapp.js`)."},"app_scale_limit":{"type":"TypeInt","optional":true,"description":"The number of workers this function app can scale out to. Only applicable to apps on the Consumption and Premium plan.","computed":true},"app_service_logs":{"type":"TypeList","optional":true,"elem":{"schema":{"disk_quota_mb":{"type":"TypeInt","optional":true,"default":35,"description":"The amount of disk space to use for logs. Valid values are between `25` and `100`."},"retention_period_days":{"type":"TypeInt","optional":true,"description":"The retention period for logs in days. Valid values are between `0` and `99999`. Defaults to `0` (never delete)."}}},"maxItems":1},"application_insights_connection_string":{"type":"TypeString","optional":true,"description":"The Connection String for linking the Windows Function App to Application Insights."},"application_insights_key":{"type":"TypeString","optional":true,"description":"The Instrumentation Key for connecting the Windows Function App to Application Insights."},"application_stack":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"dotnet_version":{"type":"TypeString","optional":true,"default":"v4.0","description":"The version of .Net. Possible values are `v3.0`, `v4.0`, `v6.0` and `v7.0`"},"java_version":{"type":"TypeString","optional":true,"description":"The version of Java to use. Possible values are `1.8`, `11` and `17`"},"node_version":{"type":"TypeString","optional":true,"description":"The version of Node to use. Possible values include `12`, `14`, `16` and `18`"},"powershell_core_version":{"type":"TypeString","optional":true,"description":"The PowerShell Core version to use. Possible values are `7`, `7.2`, and `7.4`"},"use_custom_runtime":{"type":"TypeBool","optional":true,"description":"Does the Function App use a custom Application Stack?","computed":true},"use_dotnet_isolated_runtime":{"type":"TypeBool","optional":true,"description":"Should the DotNet process use an isolated runtime. Defaults to `false`.","computed":true}}},"maxItems":1},"auto_swap_slot_name":{"type":"TypeString","optional":true},"cors":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","optional":true,"description":"Specifies a list of origins that should be allowed to make cross-origin calls.","elem":{"type":"TypeString"},"minItems":1},"support_credentials":{"type":"TypeBool","optional":true,"default":false,"description":"Are credentials allowed in CORS requests? Defaults to `false`."}}},"maxItems":1},"default_documents":{"type":"TypeList","optional":true,"description":"Specifies a list of Default Documents for the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"detailed_error_logging_enabled":{"type":"TypeBool","description":"Is detailed error logging enabled","computed":true},"elastic_instance_minimum":{"type":"TypeInt","optional":true,"description":"The number of minimum instances for this Windows Function App. Only affects apps on Elastic Premium plans.","computed":true},"ftps_state":{"type":"TypeString","optional":true,"default":"Disabled","description":"State of FTP / FTPS service for this function app. Possible values include: `AllAllowed`, `FtpsOnly` and `Disabled`. Defaults to `Disabled`."},"health_check_eviction_time_in_min":{"type":"TypeInt","optional":true,"default":0,"description":"The amount of time in minutes that a node is unhealthy before being removed from the load balancer. Possible values are between `2` and `10`. Defaults to `10`. Only valid in conjunction with `health_check_path`"},"health_check_path":{"type":"TypeString","optional":true,"description":"The path to be checked for this function app health."},"http2_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Specifies if the http2 protocol should be enabled. Defaults to `false`."},"ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"load_balancing_mode":{"type":"TypeString","optional":true,"default":"LeastRequests","description":"The Site load balancing mode. Possible values include: `WeightedRoundRobin`, `LeastRequests`, `LeastResponseTime`, `WeightedTotalTraffic`, `RequestHash`, `PerSiteRoundRobin`. Defaults to `LeastRequests` if omitted."},"managed_pipeline_mode":{"type":"TypeString","optional":true,"default":"Integrated","description":"The Managed Pipeline mode. Possible values include: `Integrated`, `Classic`. Defaults to `Integrated`."},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2","description":"The configures the minimum version of TLS required for SSL requests. Possible values include: `1.0`, `1.1`, and `1.2`. Defaults to `1.2`."},"pre_warmed_instance_count":{"type":"TypeInt","optional":true,"description":"The number of pre-warmed instances for this function app. Only affects apps on an Elastic Premium plan.","computed":true},"remote_debugging_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should Remote Debugging be enabled. Defaults to `false`."},"remote_debugging_version":{"type":"TypeString","optional":true,"description":"The Remote Debugging Version. Possible values include `VS2017`, `VS2019`, and `VS2022`","computed":true},"runtime_scale_monitoring_enabled":{"type":"TypeBool","optional":true,"description":"Should Functions Runtime Scale Monitoring be enabled."},"scm_ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"scm_ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2","description":"Configures the minimum version of TLS required for SSL requests to the SCM site Possible values include: `1.0`, `1.1`, and `1.2`. Defaults to `1.2`."},"scm_type":{"type":"TypeString","description":"The SCM Type in use by the Windows Function App.","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Windows Function App `ip_restriction` configuration be used for the SCM also."},"use_32_bit_worker":{"type":"TypeBool","optional":true,"default":true,"description":"Should the Windows Function App use a 32-bit worker."},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied? Defaults to `false`."},"websockets_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should Web Sockets be enabled. Defaults to `false`."},"windows_fx_version":{"type":"TypeString","description":"The Windows FX Version string.","computed":true},"worker_count":{"type":"TypeInt","optional":true,"description":"The number of Workers for this Windows Function App.","computed":true}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The Site Credentials Username used for publishing.","computed":true},"password":{"type":"TypeString","description":"The Site Credentials Password used for publishing.","computed":true}}}},"storage_account":{"type":"TypeSet","optional":true,"elem":{"schema":{"access_key":{"type":"TypeString","required":true},"account_name":{"type":"TypeString","required":true},"mount_path":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"share_name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"storage_account_access_key":{"type":"TypeString","optional":true,"description":"The access key which will be used to access the storage account for the Function App Slot."},"storage_account_name":{"type":"TypeString","optional":true,"description":"The backend storage account name which will be used by this Function App Slot."},"storage_key_vault_secret_id":{"type":"TypeString","optional":true,"description":"The Key Vault Secret ID, including version, that contains the Connection String to connect to the storage account for this Function App."},"storage_uses_managed_identity":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Function App Slot use its Managed Identity to access storage?"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_network_subnet_id":{"type":"TypeString","optional":true},"vnet_image_pull_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Is container image pull over virtual network enabled? Defaults to `false`."},"webdeploy_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_windows_virtual_machine":{"schema":{"additional_capabilities":{"type":"TypeList","optional":true,"elem":{"schema":{"hibernation_enabled":{"type":"TypeBool","optional":true,"default":false},"ultra_ssd_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"additional_unattend_content":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"content":{"type":"TypeString","required":true,"forceNew":true},"setting":{"type":"TypeString","required":true,"forceNew":true}}}},"admin_password":{"type":"TypeString","required":true,"forceNew":true},"admin_username":{"type":"TypeString","required":true,"forceNew":true},"allow_extension_operations":{"type":"TypeBool","optional":true,"default":true},"availability_set_id":{"type":"TypeString","optional":true,"forceNew":true},"boot_diagnostics":{"type":"TypeList","optional":true,"elem":{"schema":{"storage_account_uri":{"type":"TypeString","optional":true}}},"maxItems":1},"bypass_platform_safety_checks_on_user_schedule_enabled":{"type":"TypeBool","optional":true,"default":false},"capacity_reservation_group_id":{"type":"TypeString","optional":true},"computer_name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"custom_data":{"type":"TypeString","optional":true,"forceNew":true},"dedicated_host_group_id":{"type":"TypeString","optional":true},"dedicated_host_id":{"type":"TypeString","optional":true},"disk_controller_type":{"type":"TypeString","optional":true,"computed":true},"edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"enable_automatic_updates":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"encryption_at_host_enabled":{"type":"TypeBool","optional":true},"eviction_policy":{"type":"TypeString","optional":true,"forceNew":true},"extensions_time_budget":{"type":"TypeString","optional":true,"default":"PT1H30M"},"gallery_application":{"type":"TypeList","optional":true,"elem":{"schema":{"automatic_upgrade_enabled":{"type":"TypeBool","optional":true,"default":false},"configuration_blob_uri":{"type":"TypeString","optional":true},"order":{"type":"TypeInt","optional":true,"default":0},"tag":{"type":"TypeString","optional":true},"treat_failure_as_deployment_failure_enabled":{"type":"TypeBool","optional":true,"default":false},"version_id":{"type":"TypeString","required":true}}},"maxItems":100},"hotpatching_enabled":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"license_type":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"max_bid_price":{"type":"TypeFloat","optional":true,"default":-1},"name":{"type":"TypeString","required":true,"forceNew":true},"network_interface_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"os_disk":{"type":"TypeList","required":true,"elem":{"schema":{"caching":{"type":"TypeString","required":true},"diff_disk_settings":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"option":{"type":"TypeString","required":true,"forceNew":true},"placement":{"type":"TypeString","optional":true,"default":"CacheDisk","forceNew":true}}},"maxItems":1},"disk_encryption_set_id":{"type":"TypeString","optional":true},"disk_size_gb":{"type":"TypeInt","optional":true,"computed":true},"name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"secure_vm_disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"security_encryption_type":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_type":{"type":"TypeString","required":true,"forceNew":true},"write_accelerator_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"os_image_notification":{"type":"TypeList","optional":true,"elem":{"schema":{"timeout":{"type":"TypeString","optional":true,"default":"PT15M"}}},"maxItems":1},"patch_assessment_mode":{"type":"TypeString","optional":true,"default":"ImageDefault"},"patch_mode":{"type":"TypeString","optional":true,"default":"AutomaticByOS"},"plan":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"product":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"platform_fault_domain":{"type":"TypeInt","optional":true,"default":-1,"forceNew":true},"priority":{"type":"TypeString","optional":true,"default":"Regular","forceNew":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"provision_vm_agent":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"proximity_placement_group_id":{"type":"TypeString","optional":true},"public_ip_address":{"type":"TypeString","computed":true},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"reboot_setting":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secret":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeSet","required":true,"elem":{"schema":{"store":{"type":"TypeString","required":true},"url":{"type":"TypeString","required":true}}},"minItems":1},"key_vault_id":{"type":"TypeString","required":true}}}},"secure_boot_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"size":{"type":"TypeString","required":true},"source_image_id":{"type":"TypeString","optional":true,"forceNew":true},"source_image_reference":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"offer":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"termination_notification":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","required":true},"timeout":{"type":"TypeString","optional":true,"default":"PT5M"}}},"maxItems":1},"timezone":{"type":"TypeString","optional":true,"forceNew":true},"user_data":{"type":"TypeString","optional":true},"virtual_machine_id":{"type":"TypeString","computed":true},"virtual_machine_scale_set_id":{"type":"TypeString","optional":true},"vm_agent_platform_updates_enabled":{"type":"TypeBool","optional":true,"default":false},"vtpm_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"winrm_listener":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"certificate_url":{"type":"TypeString","optional":true,"forceNew":true},"protocol":{"type":"TypeString","required":true,"forceNew":true}}}},"zone":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":45,"read":5,"delete":45,"update":45}},"azurerm_windows_virtual_machine_scale_set":{"schema":{"additional_capabilities":{"type":"TypeList","optional":true,"elem":{"schema":{"ultra_ssd_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}}},"maxItems":1},"additional_unattend_content":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"content":{"type":"TypeString","required":true,"forceNew":true},"setting":{"type":"TypeString","required":true,"forceNew":true}}}},"admin_password":{"type":"TypeString","required":true,"forceNew":true},"admin_username":{"type":"TypeString","required":true,"forceNew":true},"automatic_instance_repair":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"computed":true},"enabled":{"type":"TypeBool","required":true},"grace_period":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"automatic_os_upgrade_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"disable_automatic_rollback":{"type":"TypeBool","required":true},"enable_automatic_os_upgrade":{"type":"TypeBool","required":true}}},"maxItems":1},"boot_diagnostics":{"type":"TypeList","optional":true,"elem":{"schema":{"storage_account_uri":{"type":"TypeString","optional":true}}},"maxItems":1},"capacity_reservation_group_id":{"type":"TypeString","optional":true,"forceNew":true},"computer_name_prefix":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"custom_data":{"type":"TypeString","optional":true},"data_disk":{"type":"TypeList","optional":true,"elem":{"schema":{"caching":{"type":"TypeString","required":true},"create_option":{"type":"TypeString","optional":true,"default":"Empty"},"disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"disk_size_gb":{"type":"TypeInt","required":true},"lun":{"type":"TypeInt","required":true},"name":{"type":"TypeString","optional":true},"storage_account_type":{"type":"TypeString","required":true},"ultra_ssd_disk_iops_read_write":{"type":"TypeInt","optional":true,"computed":true},"ultra_ssd_disk_mbps_read_write":{"type":"TypeInt","optional":true,"computed":true},"write_accelerator_enabled":{"type":"TypeBool","optional":true,"default":false}}}},"do_not_run_extensions_on_overprovisioned_machines":{"type":"TypeBool","optional":true,"default":false},"edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"enable_automatic_updates":{"type":"TypeBool","optional":true,"default":true},"encryption_at_host_enabled":{"type":"TypeBool","optional":true},"eviction_policy":{"type":"TypeString","optional":true,"forceNew":true},"extension":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"auto_upgrade_minor_version":{"type":"TypeBool","optional":true,"default":true},"automatic_upgrade_enabled":{"type":"TypeBool","optional":true,"default":false},"force_update_tag":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"protected_settings":{"type":"TypeString","optional":true},"protected_settings_from_key_vault":{"type":"TypeList","optional":true,"elem":{"schema":{"secret_url":{"type":"TypeString","required":true},"source_vault_id":{"type":"TypeString","required":true}}},"maxItems":1},"provision_after_extensions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"publisher":{"type":"TypeString","required":true},"settings":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"type_handler_version":{"type":"TypeString","required":true}}}},"extension_operations_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"extensions_time_budget":{"type":"TypeString","optional":true,"default":"PT1H30M"},"gallery_application":{"type":"TypeList","optional":true,"elem":{"schema":{"configuration_blob_uri":{"type":"TypeString","optional":true,"forceNew":true},"order":{"type":"TypeInt","optional":true,"default":0,"forceNew":true},"tag":{"type":"TypeString","optional":true,"forceNew":true},"version_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":100},"health_probe_id":{"type":"TypeString","optional":true},"host_group_id":{"type":"TypeString","optional":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"instances":{"type":"TypeInt","required":true},"license_type":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"max_bid_price":{"type":"TypeFloat","optional":true,"default":-1},"name":{"type":"TypeString","required":true,"forceNew":true},"network_interface":{"type":"TypeList","required":true,"elem":{"schema":{"dns_servers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"enable_accelerated_networking":{"type":"TypeBool","optional":true,"default":false},"enable_ip_forwarding":{"type":"TypeBool","optional":true,"default":false},"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"application_gateway_backend_address_pool_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"application_security_group_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":20},"load_balancer_backend_address_pool_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"load_balancer_inbound_nat_rules_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"primary":{"type":"TypeBool","optional":true,"default":false},"public_ip_address":{"type":"TypeList","optional":true,"elem":{"schema":{"domain_name_label":{"type":"TypeString","optional":true},"idle_timeout_in_minutes":{"type":"TypeInt","optional":true,"computed":true},"ip_tag":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"tag":{"type":"TypeString","required":true,"forceNew":true},"type":{"type":"TypeString","required":true,"forceNew":true}}}},"name":{"type":"TypeString","required":true},"public_ip_prefix_id":{"type":"TypeString","optional":true,"forceNew":true},"version":{"type":"TypeString","optional":true,"default":"IPv4","forceNew":true}}}},"subnet_id":{"type":"TypeString","optional":true},"version":{"type":"TypeString","optional":true,"default":"IPv4"}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"network_security_group_id":{"type":"TypeString","optional":true},"primary":{"type":"TypeBool","optional":true,"default":false}}}},"os_disk":{"type":"TypeList","required":true,"elem":{"schema":{"caching":{"type":"TypeString","required":true},"diff_disk_settings":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"option":{"type":"TypeString","required":true,"forceNew":true},"placement":{"type":"TypeString","optional":true,"default":"CacheDisk","forceNew":true}}},"maxItems":1},"disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"disk_size_gb":{"type":"TypeInt","optional":true,"computed":true},"secure_vm_disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"security_encryption_type":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_type":{"type":"TypeString","required":true,"forceNew":true},"write_accelerator_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"overprovision":{"type":"TypeBool","optional":true,"default":true},"plan":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"product":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"platform_fault_domain_count":{"type":"TypeInt","optional":true,"computed":true,"forceNew":true},"priority":{"type":"TypeString","optional":true,"default":"Regular","forceNew":true},"provision_vm_agent":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"proximity_placement_group_id":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rolling_upgrade_policy":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"cross_zone_upgrades_enabled":{"type":"TypeBool","optional":true},"max_batch_instance_percent":{"type":"TypeInt","required":true},"max_unhealthy_instance_percent":{"type":"TypeInt","required":true},"max_unhealthy_upgraded_instance_percent":{"type":"TypeInt","required":true},"maximum_surge_instances_enabled":{"type":"TypeBool","optional":true},"pause_time_between_batches":{"type":"TypeString","required":true},"prioritize_unhealthy_instances_enabled":{"type":"TypeBool","optional":true}}},"maxItems":1},"scale_in":{"type":"TypeList","optional":true,"elem":{"schema":{"force_deletion_enabled":{"type":"TypeBool","optional":true,"default":false},"rule":{"type":"TypeString","optional":true,"default":"Default"}}},"maxItems":1},"secret":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeSet","required":true,"elem":{"schema":{"store":{"type":"TypeString","required":true},"url":{"type":"TypeString","required":true}}},"minItems":1},"key_vault_id":{"type":"TypeString","required":true}}}},"secure_boot_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"single_placement_group":{"type":"TypeBool","optional":true,"default":true},"sku":{"type":"TypeString","required":true},"source_image_id":{"type":"TypeString","optional":true},"source_image_reference":{"type":"TypeList","optional":true,"elem":{"schema":{"offer":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true},"version":{"type":"TypeString","required":true}}},"maxItems":1},"spot_restore":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"timeout":{"type":"TypeString","optional":true,"default":"PT1H","forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"termination_notification":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","required":true},"timeout":{"type":"TypeString","optional":true,"default":"PT5M"}}},"maxItems":1},"timezone":{"type":"TypeString","optional":true},"unique_id":{"type":"TypeString","computed":true},"upgrade_mode":{"type":"TypeString","optional":true,"default":"Manual","forceNew":true},"user_data":{"type":"TypeString","optional":true},"vtpm_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"winrm_listener":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"certificate_url":{"type":"TypeString","optional":true,"forceNew":true},"protocol":{"type":"TypeString","required":true,"forceNew":true}}}},"zone_balance":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_windows_web_app":{"schema":{"app_settings":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`."}}},"maxItems":1},"additional_login_parameters":{"type":"TypeMap","optional":true,"description":"Specifies a map of Login Parameters to send to the OpenID Connect authorization endpoint when a user logs in.","elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","optional":true,"description":"The default authentication provider to use when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`.","computed":true},"enabled":{"type":"TypeBool","required":true,"description":"Should the Authentication / Authorization feature be enabled?"},"facebook":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret":{"type":"TypeString","optional":true,"description":"The App Secret of the Facebook app used for Facebook Login. Cannot be specified with `app_secret_setting_name`."},"app_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login. Cannot be specified with `app_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"github":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret of the GitHub app used for GitHub Login. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret":{"type":"TypeString","optional":true,"description":"The client secret associated with the Google web application. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for Google Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","elem":{"type":"TypeString"}}}},"maxItems":1},"issuer":{"type":"TypeString","optional":true,"description":"The OpenID Connect Issuer URI that represents the entity which issues access tokens."},"microsoft":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret":{"type":"TypeString","optional":true,"description":"The OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"The list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, `wl.basic` is used as the default scope.","elem":{"type":"TypeString"}}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true,"description":"The RuntimeVersion of the Authentication / Authorization feature in use.","computed":true},"token_refresh_extension_hours":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Windows Web App durably store platform-specific security tokens that are obtained during login flows? Defaults to `false`."},"twitter":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret":{"type":"TypeString","optional":true,"description":"The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`."},"consumer_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`."}}},"maxItems":1},"unauthenticated_client_action":{"type":"TypeString","optional":true,"description":"The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`.","computed":true}}},"maxItems":1},"auth_settings_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_applications":{"type":"TypeList","optional":true,"description":"The list of allowed Applications for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"allowed_groups":{"type":"TypeList","optional":true,"description":"The list of allowed Group Names for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_identities":{"type":"TypeList","optional":true,"description":"The list of allowed Identities for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret_certificate_thumbprint":{"type":"TypeString","optional":true,"description":"The thumbprint of the certificate used for signing purposes."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client."},"jwt_allowed_client_applications":{"type":"TypeList","optional":true,"description":"A list of Allowed Client Applications in the JWT Claim.","elem":{"type":"TypeString"}},"jwt_allowed_groups":{"type":"TypeList","optional":true,"description":"A list of Allowed Groups in the JWT Claim.","elem":{"type":"TypeString"}},"login_parameters":{"type":"TypeMap","optional":true,"description":"A map of key-value pairs to send to the Authorisation Endpoint when a user logs in.","elem":{"type":"TypeString"}},"tenant_auth_endpoint":{"type":"TypeString","required":true,"description":"The Azure Tenant Endpoint for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`."},"www_authentication_disabled":{"type":"TypeBool","optional":true,"description":"Should the www-authenticate provider should be omitted from the request? Defaults to `false`"}}},"maxItems":1},"apple_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Apple web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Apple Login."},"login_scopes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"auth_enabled":{"type":"TypeBool","optional":true,"description":"Should the AuthV2 Settings be enabled. Defaults to `false`"},"azure_static_web_app_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Static Web App Authentication."}}},"maxItems":1},"config_file_path":{"type":"TypeString","optional":true,"description":"The path to the App Auth settings. **Note:** Relative Paths are evaluated from the Site Root directory."},"custom_oidc_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"authorisation_endpoint":{"type":"TypeString","description":"The endpoint to make the Authorisation Request.","computed":true},"certification_uri":{"type":"TypeString","description":"The endpoint that provides the keys necessary to validate the token.","computed":true},"client_credential_method":{"type":"TypeString","description":"The Client Credential Method used. Currently the only supported value is `ClientSecretPost`.","computed":true},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with this Custom OIDC."},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the secret for this Custom OIDC Client.","computed":true},"issuer_endpoint":{"type":"TypeString","description":"The endpoint that issued the Token.","computed":true},"name":{"type":"TypeString","required":true,"description":"The name of the Custom OIDC Authentication Provider."},"name_claim_type":{"type":"TypeString","optional":true,"description":"The name of the claim that contains the users name."},"openid_configuration_endpoint":{"type":"TypeString","required":true,"description":"The endpoint that contains all the configuration endpoints for this Custom OIDC provider."},"scopes":{"type":"TypeList","optional":true,"description":"The list of the scopes that should be requested while authenticating.","elem":{"type":"TypeString"}},"token_endpoint":{"type":"TypeString","description":"The endpoint used to request a Token.","computed":true}}}},"default_provider":{"type":"TypeString","optional":true,"description":"The Default Authentication Provider to use when the `unauthenticated_action` is set to `RedirectToLoginPage`. Possible values include: `apple`, `azureactivedirectory`, `facebook`, `github`, `google`, `twitter` and the `name` of your `custom_oidc_v2` provider."},"excluded_paths":{"type":"TypeList","optional":true,"description":"The paths which should be excluded from the `unauthenticated_action` when it is set to `RedirectToLoginPage`.","elem":{"type":"TypeString"}},"facebook_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login."},"graph_api_version":{"type":"TypeString","optional":true,"description":"The version of the Facebook API to be used while logging in.","computed":true},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"forward_proxy_convention":{"type":"TypeString","optional":true,"default":"NoProxy","description":"The convention used to determine the url of the request made. Possible values include `ForwardProxyConventionNoProxy`, `ForwardProxyConventionStandard`, `ForwardProxyConventionCustom`. Defaults to `ForwardProxyConventionNoProxy`"},"forward_proxy_custom_host_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the host of the request."},"forward_proxy_custom_scheme_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the scheme of the request."},"github_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Google Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of Login scopes that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"http_route_api_prefix":{"type":"TypeString","optional":true,"default":"/.auth","description":"The prefix that should precede all the authentication and authorisation paths. Defaults to `/.auth`"},"login":{"type":"TypeList","required":true,"elem":{"schema":{"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"External URLs that can be redirected to as part of logging in or logging out of the app. This is an advanced setting typically only needed by Windows Store application backends. **Note:** URLs within the current domain are always implicitly allowed.","elem":{"type":"TypeString"}},"cookie_expiration_convention":{"type":"TypeString","optional":true,"default":"FixedTime","description":"The method by which cookies expire. Possible values include: `FixedTime`, and `IdentityProviderDerived`. Defaults to `FixedTime`."},"cookie_expiration_time":{"type":"TypeString","optional":true,"default":"08:00:00","description":"The time after the request is made when the session cookie should expire. Defaults to `08:00:00`."},"logout_endpoint":{"type":"TypeString","optional":true,"description":"The endpoint to which logout requests should be made."},"nonce_expiration_time":{"type":"TypeString","optional":true,"default":"00:05:00","description":"The time after the request is made when the nonce should expire. Defaults to `00:05:00`."},"preserve_url_fragments_for_logins":{"type":"TypeBool","optional":true,"default":false,"description":"Should the fragments from the request be preserved after the login request is made. Defaults to `false`."},"token_refresh_extension_time":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Token Store configuration Enabled. Defaults to `false`"},"token_store_path":{"type":"TypeString","optional":true,"description":"The directory path in the App Filesystem in which the tokens will be stored."},"token_store_sas_setting_name":{"type":"TypeString","optional":true,"description":"The name of the app setting which contains the SAS URL of the blob storage containing the tokens."},"validate_nonce":{"type":"TypeBool","optional":true,"default":true,"description":"Should the nonce be validated while completing the login flow. Defaults to `true`."}}},"maxItems":1},"microsoft_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Microsoft Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication."},"login_scopes":{"type":"TypeList","optional":true,"description":"The list of Login scopes that will be requested as part of Microsoft Account authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"require_authentication":{"type":"TypeBool","optional":true,"description":"Should the authentication flow be used for all requests."},"require_https":{"type":"TypeBool","optional":true,"default":true,"description":"Should HTTPS be required on connections? Defaults to true."},"runtime_version":{"type":"TypeString","optional":true,"default":"~1","description":"The Runtime Version of the Authentication and Authorisation feature of this App. Defaults to `~1`"},"twitter_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in."}}},"maxItems":1},"unauthenticated_action":{"type":"TypeString","optional":true,"default":"RedirectToLoginPage","description":"The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`."}}},"maxItems":1},"backup":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should this backup job be enabled?"},"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Backup."},"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","required":true,"description":"How often the backup should be executed (e.g. for weekly backup, this should be set to `7` and `frequency_unit` should be set to `Day`)."},"frequency_unit":{"type":"TypeString","required":true,"description":"The unit of time for how often the backup should take place. Possible values include: `Day` and `Hour`."},"keep_at_least_one_backup":{"type":"TypeBool","optional":true,"default":false,"description":"Should the service keep at least one backup, regardless of age of backup. Defaults to `false`."},"last_execution_time":{"type":"TypeString","description":"The time the backup was last attempted.","computed":true},"retention_period_days":{"type":"TypeInt","optional":true,"default":30,"description":"After how many days backups should be deleted."},"start_time":{"type":"TypeString","optional":true,"description":"When the schedule should start working in RFC-3339 format.","computed":true}}},"maxItems":1},"storage_account_url":{"type":"TypeString","required":true,"description":"The SAS URL to the container."}}},"maxItems":1},"client_affinity_enabled":{"type":"TypeBool","optional":true,"default":false},"client_certificate_enabled":{"type":"TypeBool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"TypeString","optional":true,"description":"Paths to exclude when using client certificates, separated by ;"},"client_certificate_mode":{"type":"TypeString","optional":true,"default":"Required"},"connection_string":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Connection."},"type":{"type":"TypeString","required":true,"description":"Type of database. Possible values include: `MySQL`, `SQLServer`, `SQLAzure`, `Custom`, `NotificationHub`, `ServiceBus`, `EventHub`, `APIHub`, `DocDb`, `RedisCache`, and `PostgreSQL`."},"value":{"type":"TypeString","required":true,"description":"The connection string value."}}}},"custom_domain_verification_id":{"type":"TypeString","computed":true},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"hosting_environment_id":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_reference_identity_id":{"type":"TypeString","optional":true,"computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"logs":{"type":"TypeList","optional":true,"elem":{"schema":{"application_logs":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"level":{"type":"TypeString","required":true},"retention_in_days":{"type":"TypeInt","required":true},"sas_url":{"type":"TypeString","required":true}}},"maxItems":1},"file_system_level":{"type":"TypeString","required":true}}},"maxItems":1},"detailed_error_messages":{"type":"TypeBool","optional":true,"default":false},"failed_request_tracing":{"type":"TypeBool","optional":true,"default":false},"http_logs":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","optional":true,"default":0},"sas_url":{"type":"TypeString","required":true}}},"maxItems":1},"file_system":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","required":true},"retention_in_mb":{"type":"TypeInt","required":true}}},"maxItems":1}}},"maxItems":1}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_plan_id":{"type":"TypeString","required":true},"site_config":{"type":"TypeList","required":true,"elem":{"schema":{"always_on":{"type":"TypeBool","optional":true,"default":true},"api_definition_url":{"type":"TypeString","optional":true},"api_management_api_id":{"type":"TypeString","optional":true},"app_command_line":{"type":"TypeString","optional":true},"application_stack":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"current_stack":{"type":"TypeString","optional":true,"computed":true},"docker_image_name":{"type":"TypeString","optional":true},"docker_registry_password":{"type":"TypeString","optional":true},"docker_registry_url":{"type":"TypeString","optional":true},"docker_registry_username":{"type":"TypeString","optional":true},"dotnet_core_version":{"type":"TypeString","optional":true,"description":"The version of DotNetCore to use."},"dotnet_version":{"type":"TypeString","optional":true,"computed":true},"java_container":{"type":"TypeString","optional":true},"java_container_version":{"type":"TypeString","optional":true},"java_embedded_server_enabled":{"type":"TypeBool","optional":true,"description":"Should the application use the embedded web server for the version of Java in use.","computed":true},"java_version":{"type":"TypeString","optional":true},"node_version":{"type":"TypeString","optional":true},"php_version":{"type":"TypeString","optional":true,"computed":true},"python":{"type":"TypeBool","optional":true,"default":false},"tomcat_version":{"type":"TypeString","optional":true}}},"maxItems":1},"auto_heal_enabled":{"type":"TypeBool","optional":true,"default":false},"auto_heal_setting":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeList","required":true,"elem":{"schema":{"action_type":{"type":"TypeString","required":true},"custom_action":{"type":"TypeList","optional":true,"elem":{"schema":{"executable":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true}}},"maxItems":1},"minimum_process_execution_time":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"trigger":{"type":"TypeList","required":true,"elem":{"schema":{"private_memory_kb":{"type":"TypeInt","optional":true},"requests":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true}}},"maxItems":1},"slow_request":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true},"time_taken":{"type":"TypeString","required":true}}},"maxItems":1},"slow_request_with_path":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true},"time_taken":{"type":"TypeString","required":true}}}},"status_code":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true},"status_code_range":{"type":"TypeString","required":true},"sub_status":{"type":"TypeInt","optional":true},"win32_status_code":{"type":"TypeInt","optional":true}}}}}},"maxItems":1}}},"maxItems":1},"container_registry_managed_identity_client_id":{"type":"TypeString","optional":true},"container_registry_use_managed_identity":{"type":"TypeBool","optional":true,"default":false},"cors":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","optional":true,"description":"Specifies a list of origins that should be allowed to make cross-origin calls.","elem":{"type":"TypeString"},"minItems":1},"support_credentials":{"type":"TypeBool","optional":true,"default":false,"description":"Are credentials allowed in CORS requests? Defaults to `false`."}}},"maxItems":1},"default_documents":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"detailed_error_logging_enabled":{"type":"TypeBool","computed":true},"ftps_state":{"type":"TypeString","optional":true,"default":"Disabled"},"handler_mapping":{"type":"TypeSet","optional":true,"elem":{"schema":{"arguments":{"type":"TypeString","optional":true},"extension":{"type":"TypeString","required":true},"script_processor_path":{"type":"TypeString","required":true}}}},"health_check_eviction_time_in_min":{"type":"TypeInt","optional":true,"description":"The amount of time in minutes that a node is unhealthy before being removed from the load balancer. Possible values are between `2` and `10`. Only valid in conjunction with `health_check_path`"},"health_check_path":{"type":"TypeString","optional":true},"http2_enabled":{"type":"TypeBool","optional":true,"default":false},"ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"linux_fx_version":{"type":"TypeString","computed":true},"load_balancing_mode":{"type":"TypeString","optional":true,"default":"LeastRequests"},"local_mysql_enabled":{"type":"TypeBool","optional":true,"default":false},"managed_pipeline_mode":{"type":"TypeString","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"remote_debugging_enabled":{"type":"TypeBool","optional":true,"default":false},"remote_debugging_version":{"type":"TypeString","optional":true,"computed":true},"scm_ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"scm_ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"scm_type":{"type":"TypeString","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false},"use_32_bit_worker":{"type":"TypeBool","optional":true,"default":true},"virtual_application":{"type":"TypeSet","optional":true,"elem":{"schema":{"physical_path":{"type":"TypeString","required":true},"preload":{"type":"TypeBool","required":true},"virtual_directory":{"type":"TypeSet","optional":true,"elem":{"schema":{"physical_path":{"type":"TypeString","optional":true},"virtual_path":{"type":"TypeString","optional":true}}}},"virtual_path":{"type":"TypeString","required":true}}}},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied? Defaults to `false`."},"websockets_enabled":{"type":"TypeBool","optional":true,"default":false},"windows_fx_version":{"type":"TypeString","computed":true},"worker_count":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The Site Credentials Username used for publishing.","computed":true},"password":{"type":"TypeString","description":"The Site Credentials Password used for publishing.","computed":true}}}},"sticky_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"app_setting_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"connection_string_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1}}},"maxItems":1},"storage_account":{"type":"TypeSet","optional":true,"elem":{"schema":{"access_key":{"type":"TypeString","required":true},"account_name":{"type":"TypeString","required":true},"mount_path":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"share_name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_network_subnet_id":{"type":"TypeString","optional":true},"webdeploy_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"zip_deploy_file":{"type":"TypeString","optional":true,"description":"The local path and filename of the Zip packaged application to deploy to this Windows Web App. **Note:** Using this value requires either `WEBSITE_RUN_FROM_PACKAGE=1` or `SCM_DO_BUILD_DURING_DEPLOYMENT=true` to be set on the App in `app_settings`.","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_windows_web_app_slot":{"schema":{"app_service_id":{"type":"TypeString","required":true,"forceNew":true},"app_settings":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`."}}},"maxItems":1},"additional_login_parameters":{"type":"TypeMap","optional":true,"description":"Specifies a map of Login Parameters to send to the OpenID Connect authorization endpoint when a user logs in.","elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","optional":true,"description":"The default authentication provider to use when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`.","computed":true},"enabled":{"type":"TypeBool","required":true,"description":"Should the Authentication / Authorization feature be enabled?"},"facebook":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret":{"type":"TypeString","optional":true,"description":"The App Secret of the Facebook app used for Facebook Login. Cannot be specified with `app_secret_setting_name`."},"app_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login. Cannot be specified with `app_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"github":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret of the GitHub app used for GitHub Login. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret":{"type":"TypeString","optional":true,"description":"The client secret associated with the Google web application. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for Google Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","elem":{"type":"TypeString"}}}},"maxItems":1},"issuer":{"type":"TypeString","optional":true,"description":"The OpenID Connect Issuer URI that represents the entity which issues access tokens."},"microsoft":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret":{"type":"TypeString","optional":true,"description":"The OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"The list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, `wl.basic` is used as the default scope.","elem":{"type":"TypeString"}}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true,"description":"The RuntimeVersion of the Authentication / Authorization feature in use.","computed":true},"token_refresh_extension_hours":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Windows Web App durably store platform-specific security tokens that are obtained during login flows? Defaults to `false`."},"twitter":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret":{"type":"TypeString","optional":true,"description":"The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`."},"consumer_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`."}}},"maxItems":1},"unauthenticated_client_action":{"type":"TypeString","optional":true,"description":"The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`.","computed":true}}},"maxItems":1},"auth_settings_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_applications":{"type":"TypeList","optional":true,"description":"The list of allowed Applications for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"allowed_groups":{"type":"TypeList","optional":true,"description":"The list of allowed Group Names for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_identities":{"type":"TypeList","optional":true,"description":"The list of allowed Identities for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret_certificate_thumbprint":{"type":"TypeString","optional":true,"description":"The thumbprint of the certificate used for signing purposes."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client."},"jwt_allowed_client_applications":{"type":"TypeList","optional":true,"description":"A list of Allowed Client Applications in the JWT Claim.","elem":{"type":"TypeString"}},"jwt_allowed_groups":{"type":"TypeList","optional":true,"description":"A list of Allowed Groups in the JWT Claim.","elem":{"type":"TypeString"}},"login_parameters":{"type":"TypeMap","optional":true,"description":"A map of key-value pairs to send to the Authorisation Endpoint when a user logs in.","elem":{"type":"TypeString"}},"tenant_auth_endpoint":{"type":"TypeString","required":true,"description":"The Azure Tenant Endpoint for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`."},"www_authentication_disabled":{"type":"TypeBool","optional":true,"description":"Should the www-authenticate provider should be omitted from the request? Defaults to `false`"}}},"maxItems":1},"apple_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Apple web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Apple Login."},"login_scopes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"auth_enabled":{"type":"TypeBool","optional":true,"description":"Should the AuthV2 Settings be enabled. Defaults to `false`"},"azure_static_web_app_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Static Web App Authentication."}}},"maxItems":1},"config_file_path":{"type":"TypeString","optional":true,"description":"The path to the App Auth settings. **Note:** Relative Paths are evaluated from the Site Root directory."},"custom_oidc_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"authorisation_endpoint":{"type":"TypeString","description":"The endpoint to make the Authorisation Request.","computed":true},"certification_uri":{"type":"TypeString","description":"The endpoint that provides the keys necessary to validate the token.","computed":true},"client_credential_method":{"type":"TypeString","description":"The Client Credential Method used. Currently the only supported value is `ClientSecretPost`.","computed":true},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with this Custom OIDC."},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the secret for this Custom OIDC Client.","computed":true},"issuer_endpoint":{"type":"TypeString","description":"The endpoint that issued the Token.","computed":true},"name":{"type":"TypeString","required":true,"description":"The name of the Custom OIDC Authentication Provider."},"name_claim_type":{"type":"TypeString","optional":true,"description":"The name of the claim that contains the users name."},"openid_configuration_endpoint":{"type":"TypeString","required":true,"description":"The endpoint that contains all the configuration endpoints for this Custom OIDC provider."},"scopes":{"type":"TypeList","optional":true,"description":"The list of the scopes that should be requested while authenticating.","elem":{"type":"TypeString"}},"token_endpoint":{"type":"TypeString","description":"The endpoint used to request a Token.","computed":true}}}},"default_provider":{"type":"TypeString","optional":true,"description":"The Default Authentication Provider to use when the `unauthenticated_action` is set to `RedirectToLoginPage`. Possible values include: `apple`, `azureactivedirectory`, `facebook`, `github`, `google`, `twitter` and the `name` of your `custom_oidc_v2` provider."},"excluded_paths":{"type":"TypeList","optional":true,"description":"The paths which should be excluded from the `unauthenticated_action` when it is set to `RedirectToLoginPage`.","elem":{"type":"TypeString"}},"facebook_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login."},"graph_api_version":{"type":"TypeString","optional":true,"description":"The version of the Facebook API to be used while logging in.","computed":true},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"forward_proxy_convention":{"type":"TypeString","optional":true,"default":"NoProxy","description":"The convention used to determine the url of the request made. Possible values include `ForwardProxyConventionNoProxy`, `ForwardProxyConventionStandard`, `ForwardProxyConventionCustom`. Defaults to `ForwardProxyConventionNoProxy`"},"forward_proxy_custom_host_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the host of the request."},"forward_proxy_custom_scheme_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the scheme of the request."},"github_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Google Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of Login scopes that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"http_route_api_prefix":{"type":"TypeString","optional":true,"default":"/.auth","description":"The prefix that should precede all the authentication and authorisation paths. Defaults to `/.auth`"},"login":{"type":"TypeList","required":true,"elem":{"schema":{"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"External URLs that can be redirected to as part of logging in or logging out of the app. This is an advanced setting typically only needed by Windows Store application backends. **Note:** URLs within the current domain are always implicitly allowed.","elem":{"type":"TypeString"}},"cookie_expiration_convention":{"type":"TypeString","optional":true,"default":"FixedTime","description":"The method by which cookies expire. Possible values include: `FixedTime`, and `IdentityProviderDerived`. Defaults to `FixedTime`."},"cookie_expiration_time":{"type":"TypeString","optional":true,"default":"08:00:00","description":"The time after the request is made when the session cookie should expire. Defaults to `08:00:00`."},"logout_endpoint":{"type":"TypeString","optional":true,"description":"The endpoint to which logout requests should be made."},"nonce_expiration_time":{"type":"TypeString","optional":true,"default":"00:05:00","description":"The time after the request is made when the nonce should expire. Defaults to `00:05:00`."},"preserve_url_fragments_for_logins":{"type":"TypeBool","optional":true,"default":false,"description":"Should the fragments from the request be preserved after the login request is made. Defaults to `false`."},"token_refresh_extension_time":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Token Store configuration Enabled. Defaults to `false`"},"token_store_path":{"type":"TypeString","optional":true,"description":"The directory path in the App Filesystem in which the tokens will be stored."},"token_store_sas_setting_name":{"type":"TypeString","optional":true,"description":"The name of the app setting which contains the SAS URL of the blob storage containing the tokens."},"validate_nonce":{"type":"TypeBool","optional":true,"default":true,"description":"Should the nonce be validated while completing the login flow. Defaults to `true`."}}},"maxItems":1},"microsoft_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Microsoft Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication."},"login_scopes":{"type":"TypeList","optional":true,"description":"The list of Login scopes that will be requested as part of Microsoft Account authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"require_authentication":{"type":"TypeBool","optional":true,"description":"Should the authentication flow be used for all requests."},"require_https":{"type":"TypeBool","optional":true,"default":true,"description":"Should HTTPS be required on connections? Defaults to true."},"runtime_version":{"type":"TypeString","optional":true,"default":"~1","description":"The Runtime Version of the Authentication and Authorisation feature of this App. Defaults to `~1`"},"twitter_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in."}}},"maxItems":1},"unauthenticated_action":{"type":"TypeString","optional":true,"default":"RedirectToLoginPage","description":"The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`."}}},"maxItems":1},"backup":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should this backup job be enabled?"},"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Backup."},"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","required":true,"description":"How often the backup should be executed (e.g. for weekly backup, this should be set to `7` and `frequency_unit` should be set to `Day`)."},"frequency_unit":{"type":"TypeString","required":true,"description":"The unit of time for how often the backup should take place. Possible values include: `Day` and `Hour`."},"keep_at_least_one_backup":{"type":"TypeBool","optional":true,"default":false,"description":"Should the service keep at least one backup, regardless of age of backup. Defaults to `false`."},"last_execution_time":{"type":"TypeString","description":"The time the backup was last attempted.","computed":true},"retention_period_days":{"type":"TypeInt","optional":true,"default":30,"description":"After how many days backups should be deleted."},"start_time":{"type":"TypeString","optional":true,"description":"When the schedule should start working in RFC-3339 format.","computed":true}}},"maxItems":1},"storage_account_url":{"type":"TypeString","required":true,"description":"The SAS URL to the container."}}},"maxItems":1},"client_affinity_enabled":{"type":"TypeBool","optional":true,"default":false},"client_certificate_enabled":{"type":"TypeBool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"TypeString","optional":true,"description":"Paths to exclude when using client certificates, separated by ;"},"client_certificate_mode":{"type":"TypeString","optional":true,"default":"Required"},"connection_string":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Connection."},"type":{"type":"TypeString","required":true,"description":"Type of database. Possible values include: `MySQL`, `SQLServer`, `SQLAzure`, `Custom`, `NotificationHub`, `ServiceBus`, `EventHub`, `APIHub`, `DocDb`, `RedisCache`, and `PostgreSQL`."},"value":{"type":"TypeString","required":true,"description":"The connection string value."}}}},"custom_domain_verification_id":{"type":"TypeString","computed":true},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"hosting_environment_id":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_reference_identity_id":{"type":"TypeString","optional":true,"computed":true},"kind":{"type":"TypeString","computed":true},"logs":{"type":"TypeList","optional":true,"elem":{"schema":{"application_logs":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"level":{"type":"TypeString","required":true},"retention_in_days":{"type":"TypeInt","required":true},"sas_url":{"type":"TypeString","required":true}}},"maxItems":1},"file_system_level":{"type":"TypeString","required":true}}},"maxItems":1},"detailed_error_messages":{"type":"TypeBool","optional":true,"default":false},"failed_request_tracing":{"type":"TypeBool","optional":true,"default":false},"http_logs":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","optional":true,"default":0},"sas_url":{"type":"TypeString","required":true}}},"maxItems":1},"file_system":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","required":true},"retention_in_mb":{"type":"TypeInt","required":true}}},"maxItems":1}}},"maxItems":1}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"service_plan_id":{"type":"TypeString","optional":true},"site_config":{"type":"TypeList","required":true,"elem":{"schema":{"always_on":{"type":"TypeBool","optional":true,"default":true},"api_definition_url":{"type":"TypeString","optional":true},"api_management_api_id":{"type":"TypeString","optional":true},"app_command_line":{"type":"TypeString","optional":true},"application_stack":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"current_stack":{"type":"TypeString","optional":true,"computed":true},"docker_image_name":{"type":"TypeString","optional":true},"docker_registry_password":{"type":"TypeString","optional":true},"docker_registry_url":{"type":"TypeString","optional":true},"docker_registry_username":{"type":"TypeString","optional":true},"dotnet_core_version":{"type":"TypeString","optional":true,"description":"The version of DotNetCore to use."},"dotnet_version":{"type":"TypeString","optional":true,"computed":true},"java_container":{"type":"TypeString","optional":true},"java_container_version":{"type":"TypeString","optional":true},"java_embedded_server_enabled":{"type":"TypeBool","optional":true,"description":"Should the application use the embedded web server for the version of Java in use.","computed":true},"java_version":{"type":"TypeString","optional":true},"node_version":{"type":"TypeString","optional":true},"php_version":{"type":"TypeString","optional":true,"computed":true},"python":{"type":"TypeBool","optional":true,"default":false},"tomcat_version":{"type":"TypeString","optional":true}}},"maxItems":1},"auto_heal_enabled":{"type":"TypeBool","optional":true,"default":false},"auto_heal_setting":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeList","required":true,"elem":{"schema":{"action_type":{"type":"TypeString","required":true},"custom_action":{"type":"TypeList","optional":true,"elem":{"schema":{"executable":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true}}},"maxItems":1},"minimum_process_execution_time":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"trigger":{"type":"TypeList","required":true,"elem":{"schema":{"private_memory_kb":{"type":"TypeInt","optional":true},"requests":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true}}},"maxItems":1},"slow_request":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true},"time_taken":{"type":"TypeString","required":true}}},"maxItems":1},"slow_request_with_path":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true},"time_taken":{"type":"TypeString","required":true}}}},"status_code":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true},"status_code_range":{"type":"TypeString","required":true},"sub_status":{"type":"TypeInt","optional":true},"win32_status_code":{"type":"TypeInt","optional":true}}}}}},"maxItems":1}}},"maxItems":1},"auto_swap_slot_name":{"type":"TypeString","optional":true},"container_registry_managed_identity_client_id":{"type":"TypeString","optional":true},"container_registry_use_managed_identity":{"type":"TypeBool","optional":true,"default":false},"cors":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","optional":true,"description":"Specifies a list of origins that should be allowed to make cross-origin calls.","elem":{"type":"TypeString"},"minItems":1},"support_credentials":{"type":"TypeBool","optional":true,"default":false,"description":"Are credentials allowed in CORS requests? Defaults to `false`."}}},"maxItems":1},"default_documents":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"detailed_error_logging_enabled":{"type":"TypeBool","computed":true},"ftps_state":{"type":"TypeString","optional":true,"default":"Disabled"},"handler_mapping":{"type":"TypeSet","optional":true,"elem":{"schema":{"arguments":{"type":"TypeString","optional":true},"extension":{"type":"TypeString","required":true},"script_processor_path":{"type":"TypeString","required":true}}}},"health_check_eviction_time_in_min":{"type":"TypeInt","optional":true,"description":"The amount of time in minutes that a node is unhealthy before being removed from the load balancer. Possible values are between `2` and `10`. Only valid in conjunction with `health_check_path`"},"health_check_path":{"type":"TypeString","optional":true},"http2_enabled":{"type":"TypeBool","optional":true,"default":false},"ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"load_balancing_mode":{"type":"TypeString","optional":true,"default":"LeastRequests"},"local_mysql_enabled":{"type":"TypeBool","optional":true,"default":false},"managed_pipeline_mode":{"type":"TypeString","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"remote_debugging_enabled":{"type":"TypeBool","optional":true,"default":false},"remote_debugging_version":{"type":"TypeString","optional":true,"computed":true},"scm_ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"scm_ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"scm_type":{"type":"TypeString","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false},"use_32_bit_worker":{"type":"TypeBool","optional":true,"computed":true},"virtual_application":{"type":"TypeSet","optional":true,"elem":{"schema":{"physical_path":{"type":"TypeString","required":true},"preload":{"type":"TypeBool","required":true},"virtual_directory":{"type":"TypeSet","optional":true,"elem":{"schema":{"physical_path":{"type":"TypeString","optional":true},"virtual_path":{"type":"TypeString","optional":true}}}},"virtual_path":{"type":"TypeString","required":true}}}},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied? Defaults to `false`."},"websockets_enabled":{"type":"TypeBool","optional":true,"default":false},"windows_fx_version":{"type":"TypeString","computed":true},"worker_count":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The Site Credentials Username used for publishing.","computed":true},"password":{"type":"TypeString","description":"The Site Credentials Password used for publishing.","computed":true}}}},"storage_account":{"type":"TypeSet","optional":true,"elem":{"schema":{"access_key":{"type":"TypeString","required":true},"account_name":{"type":"TypeString","required":true},"mount_path":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"share_name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_network_subnet_id":{"type":"TypeString","optional":true},"webdeploy_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"zip_deploy_file":{"type":"TypeString","optional":true,"description":"The local path and filename of the Zip packaged application to deploy to this Windows Web App. **Note:** Using this value requires `WEBSITE_RUN_FROM_PACKAGE=1` on the App in `app_settings`.","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_workloads_sap_discovery_virtual_instance":{"schema":{"central_server_virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true},"environment":{"type":"TypeString","required":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_resource_group_name":{"type":"TypeString","optional":true,"forceNew":true},"managed_storage_account_name":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sap_product":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_workloads_sap_single_node_virtual_instance":{"schema":{"app_location":{"type":"TypeString","required":true,"forceNew":true},"environment":{"type":"TypeString","required":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_resource_group_name":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sap_fqdn":{"type":"TypeString","required":true,"forceNew":true},"sap_product":{"type":"TypeString","required":true,"forceNew":true},"single_server_configuration":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"app_resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"database_type":{"type":"TypeString","optional":true,"forceNew":true},"disk_volume_configuration":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"number_of_disks":{"type":"TypeInt","required":true,"forceNew":true},"size_in_gb":{"type":"TypeInt","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"volume_name":{"type":"TypeString","required":true,"forceNew":true}}}},"secondary_ip_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"virtual_machine_configuration":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"image":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"offer":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"os_profile":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"admin_username":{"type":"TypeString","required":true,"forceNew":true},"ssh_private_key":{"type":"TypeString","required":true,"forceNew":true},"ssh_public_key":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"virtual_machine_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"virtual_machine_resource_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"data_disk":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"names":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"volume_name":{"type":"TypeString","required":true,"forceNew":true}}}},"host_name":{"type":"TypeString","optional":true,"forceNew":true},"network_interface_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"os_disk_name":{"type":"TypeString","optional":true,"forceNew":true},"virtual_machine_name":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_workloads_sap_three_tier_virtual_instance":{"schema":{"app_location":{"type":"TypeString","required":true,"forceNew":true},"environment":{"type":"TypeString","required":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_resource_group_name":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sap_fqdn":{"type":"TypeString","required":true,"forceNew":true},"sap_product":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"three_tier_configuration":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"app_resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"application_server_configuration":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"instance_count":{"type":"TypeInt","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"virtual_machine_configuration":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"image":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"offer":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"os_profile":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"admin_username":{"type":"TypeString","required":true,"forceNew":true},"ssh_private_key":{"type":"TypeString","required":true,"forceNew":true},"ssh_public_key":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"virtual_machine_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"central_server_configuration":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"instance_count":{"type":"TypeInt","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"virtual_machine_configuration":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"image":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"offer":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"os_profile":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"admin_username":{"type":"TypeString","required":true,"forceNew":true},"ssh_private_key":{"type":"TypeString","required":true,"forceNew":true},"ssh_public_key":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"virtual_machine_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"database_server_configuration":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"database_type":{"type":"TypeString","optional":true,"forceNew":true},"disk_volume_configuration":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"number_of_disks":{"type":"TypeInt","required":true,"forceNew":true},"size_in_gb":{"type":"TypeInt","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"volume_name":{"type":"TypeString","required":true,"forceNew":true}}}},"instance_count":{"type":"TypeInt","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"virtual_machine_configuration":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"image":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"offer":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"os_profile":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"admin_username":{"type":"TypeString","required":true,"forceNew":true},"ssh_private_key":{"type":"TypeString","required":true,"forceNew":true},"ssh_public_key":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"virtual_machine_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"high_availability_type":{"type":"TypeString","optional":true,"forceNew":true},"resource_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"application_server":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"availability_set_name":{"type":"TypeString","optional":true,"forceNew":true},"virtual_machine":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"data_disk":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"names":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"volume_name":{"type":"TypeString","required":true,"forceNew":true}}}},"host_name":{"type":"TypeString","optional":true,"forceNew":true},"network_interface_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"os_disk_name":{"type":"TypeString","optional":true,"forceNew":true},"virtual_machine_name":{"type":"TypeString","optional":true,"forceNew":true}}}}}},"maxItems":1},"central_server":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"availability_set_name":{"type":"TypeString","optional":true,"forceNew":true},"load_balancer":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"backend_pool_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"frontend_ip_configuration_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"health_probe_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"virtual_machine":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"data_disk":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"names":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"volume_name":{"type":"TypeString","required":true,"forceNew":true}}}},"host_name":{"type":"TypeString","optional":true,"forceNew":true},"network_interface_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"os_disk_name":{"type":"TypeString","optional":true,"forceNew":true},"virtual_machine_name":{"type":"TypeString","optional":true,"forceNew":true}}}}}},"maxItems":1},"database_server":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"availability_set_name":{"type":"TypeString","optional":true,"forceNew":true},"load_balancer":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"backend_pool_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"frontend_ip_configuration_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"health_probe_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"virtual_machine":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"data_disk":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"names":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"volume_name":{"type":"TypeString","required":true,"forceNew":true}}}},"host_name":{"type":"TypeString","optional":true,"forceNew":true},"network_interface_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"os_disk_name":{"type":"TypeString","optional":true,"forceNew":true},"virtual_machine_name":{"type":"TypeString","optional":true,"forceNew":true}}}}}},"maxItems":1},"shared_storage":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"account_name":{"type":"TypeString","optional":true,"forceNew":true},"private_endpoint_name":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"secondary_ip_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"transport_create_and_mount":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"resource_group_id":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_name":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}}},"dataSources":{"azurerm_aadb2c_directory":{"schema":{"billing_type":{"type":"TypeString","description":"The type of billing for the B2C tenant. Possible values include: `MAU` or `Auths`.","computed":true},"data_residency_location":{"type":"TypeString","description":"Location in which the B2C tenant is hosted and data resides.","computed":true},"domain_name":{"type":"TypeString","required":true,"description":"Domain name of the B2C tenant, including onmicrosoft.com suffix."},"effective_start_date":{"type":"TypeString","description":"The date from which the billing type took effect. May not be populated until after the first billing cycle.","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","description":"Billing SKU for the B2C tenant.","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","description":"The Tenant ID for the B2C tenant.","computed":true}},"timeouts":{"read":5}},"azurerm_active_directory_domain_service":{"schema":{"deployment_id":{"type":"TypeString","computed":true},"domain_configuration_type":{"type":"TypeString","computed":true},"domain_name":{"type":"TypeString","computed":true},"filtered_sync_enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"notifications":{"type":"TypeList","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"notify_dc_admins":{"type":"TypeBool","computed":true},"notify_global_admins":{"type":"TypeBool","computed":true}}}},"replica_sets":{"type":"TypeList","computed":true,"elem":{"schema":{"domain_controller_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"external_access_ip_address":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true},"service_status":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"resource_id":{"type":"TypeString","computed":true},"secure_ldap":{"type":"TypeList","computed":true,"elem":{"schema":{"certificate_expiry":{"type":"TypeString","computed":true},"certificate_thumbprint":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","computed":true},"external_access_enabled":{"type":"TypeBool","computed":true},"public_certificate":{"type":"TypeString","computed":true}}}},"security":{"type":"TypeList","computed":true,"elem":{"schema":{"kerberos_armoring_enabled":{"type":"TypeBool","computed":true},"kerberos_rc4_encryption_enabled":{"type":"TypeBool","computed":true},"ntlm_v1_enabled":{"type":"TypeBool","computed":true},"sync_kerberos_passwords":{"type":"TypeBool","computed":true},"sync_ntlm_passwords":{"type":"TypeBool","computed":true},"sync_on_prem_passwords":{"type":"TypeBool","computed":true},"tls_v1_enabled":{"type":"TypeBool","computed":true}}}},"sku":{"type":"TypeString","computed":true},"sync_owner":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","computed":true},"version":{"type":"TypeInt","computed":true}},"timeouts":{"read":5}},"azurerm_advisor_recommendations":{"schema":{"filter_by_category":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"filter_by_resource_groups":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"recommendations":{"type":"TypeList","computed":true,"elem":{"schema":{"category":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"impact":{"type":"TypeString","computed":true},"recommendation_name":{"type":"TypeString","computed":true},"recommendation_type_id":{"type":"TypeString","computed":true},"resource_name":{"type":"TypeString","computed":true},"resource_type":{"type":"TypeString","computed":true},"suppression_names":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"updated_time":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":10}},"azurerm_api_management":{"schema":{"additional_location":{"type":"TypeList","computed":true,"elem":{"schema":{"capacity":{"type":"TypeInt","computed":true},"gateway_regional_url":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"private_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"public_ip_address_id":{"type":"TypeString","computed":true},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"developer_portal_url":{"type":"TypeString","computed":true},"gateway_regional_url":{"type":"TypeString","computed":true},"gateway_url":{"type":"TypeString","computed":true},"hostname_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"developer_portal":{"type":"TypeList","computed":true,"elem":{"schema":{"host_name":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","computed":true},"negotiate_client_certificate":{"type":"TypeBool","computed":true}}}},"management":{"type":"TypeList","computed":true,"elem":{"schema":{"host_name":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","computed":true},"negotiate_client_certificate":{"type":"TypeBool","computed":true}}}},"portal":{"type":"TypeList","computed":true,"elem":{"schema":{"host_name":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","computed":true},"negotiate_client_certificate":{"type":"TypeBool","computed":true}}}},"proxy":{"type":"TypeList","computed":true,"elem":{"schema":{"default_ssl_binding":{"type":"TypeBool","computed":true},"host_name":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","computed":true},"negotiate_client_certificate":{"type":"TypeBool","computed":true}}}},"scm":{"type":"TypeList","computed":true,"elem":{"schema":{"host_name":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","computed":true},"negotiate_client_certificate":{"type":"TypeBool","computed":true}}}}}}},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"management_api_url":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"notification_sender_email":{"type":"TypeString","computed":true},"portal_url":{"type":"TypeString","computed":true},"private_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"public_ip_address_id":{"type":"TypeString","computed":true},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"publisher_email":{"type":"TypeString","computed":true},"publisher_name":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"scm_url":{"type":"TypeString","computed":true},"sku_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tenant_access":{"type":"TypeList","computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","computed":true},"primary_key":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_api_management_api":{"schema":{"api_management_name":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","computed":true},"is_current":{"type":"TypeBool","computed":true},"is_online":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"path":{"type":"TypeString","computed":true},"protocols":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"revision":{"type":"TypeString","required":true},"service_url":{"type":"TypeString","computed":true},"soap_pass_through":{"type":"TypeBool","computed":true},"subscription_key_parameter_names":{"type":"TypeList","computed":true,"elem":{"schema":{"header":{"type":"TypeString","computed":true},"query":{"type":"TypeString","computed":true}}}},"subscription_required":{"type":"TypeBool","computed":true},"version":{"type":"TypeString","computed":true},"version_set_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_api_management_api_version_set":{"schema":{"api_management_name":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"version_header_name":{"type":"TypeString","computed":true},"version_query_name":{"type":"TypeString","computed":true},"versioning_scheme":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_api_management_gateway":{"schema":{"api_management_id":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"location_data":{"type":"TypeList","computed":true,"elem":{"schema":{"city":{"type":"TypeString","computed":true},"district":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"region":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_api_management_gateway_host_name_configuration":{"schema":{"api_management_id":{"type":"TypeString","required":true},"certificate_id":{"type":"TypeString","computed":true},"gateway_name":{"type":"TypeString","required":true},"host_name":{"type":"TypeString","computed":true},"http2_enabled":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"request_client_certificate_enabled":{"type":"TypeBool","computed":true},"tls10_enabled":{"type":"TypeBool","computed":true},"tls11_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_api_management_group":{"schema":{"api_management_name":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","computed":true},"external_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"type":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_api_management_product":{"schema":{"api_management_name":{"type":"TypeString","required":true},"approval_required":{"type":"TypeBool","computed":true},"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","computed":true},"product_id":{"type":"TypeString","required":true},"published":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subscription_required":{"type":"TypeBool","computed":true},"subscriptions_limit":{"type":"TypeInt","computed":true},"terms":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_api_management_user":{"schema":{"api_management_name":{"type":"TypeString","required":true},"email":{"type":"TypeString","computed":true},"first_name":{"type":"TypeString","computed":true},"last_name":{"type":"TypeString","computed":true},"note":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"state":{"type":"TypeString","computed":true},"user_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_app_configuration":{"schema":{"encryption":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_client_id":{"type":"TypeString","computed":true},"key_vault_key_identifier":{"type":"TypeString","computed":true}}}},"endpoint":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"local_auth_enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"primary_read_key":{"type":"TypeList","computed":true,"elem":{"schema":{"connection_string":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"secret":{"type":"TypeString","computed":true}}}},"primary_write_key":{"type":"TypeList","computed":true,"elem":{"schema":{"connection_string":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"secret":{"type":"TypeString","computed":true}}}},"public_network_access":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"purge_protection_enabled":{"type":"TypeBool","computed":true},"replica":{"type":"TypeList","computed":true,"elem":{"schema":{"endpoint":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"secondary_read_key":{"type":"TypeList","computed":true,"elem":{"schema":{"connection_string":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"secret":{"type":"TypeString","computed":true}}}},"secondary_write_key":{"type":"TypeList","computed":true,"elem":{"schema":{"connection_string":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"secret":{"type":"TypeString","computed":true}}}},"sku":{"type":"TypeString","computed":true},"soft_delete_retention_days":{"type":"TypeInt","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_app_configuration_key":{"schema":{"configuration_store_id":{"type":"TypeString","required":true},"content_type":{"type":"TypeString","computed":true},"etag":{"type":"TypeString","computed":true},"key":{"type":"TypeString","required":true},"label":{"type":"TypeString","optional":true,"default":""},"locked":{"type":"TypeBool","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true},"vault_key_reference":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_app_configuration_keys":{"schema":{"configuration_store_id":{"type":"TypeString","required":true},"items":{"type":"TypeList","computed":true,"elem":{"schema":{"content_type":{"type":"TypeString","computed":true},"etag":{"type":"TypeString","computed":true},"key":{"type":"TypeString","computed":true},"label":{"type":"TypeString","computed":true},"locked":{"type":"TypeBool","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true},"vault_key_reference":{"type":"TypeString","computed":true}}}},"key":{"type":"TypeString","optional":true,"default":""},"label":{"type":"TypeString","optional":true,"default":""}},"timeouts":{"read":5}},"azurerm_app_service":{"schema":{"app_service_plan_id":{"type":"TypeString","computed":true},"app_settings":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"client_affinity_enabled":{"type":"TypeBool","computed":true},"client_cert_enabled":{"type":"TypeBool","computed":true},"connection_string":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"custom_domain_verification_id":{"type":"TypeString","computed":true},"default_site_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","computed":true},"https_only":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"site_config":{"type":"TypeList","computed":true,"elem":{"schema":{"acr_use_managed_identity_credentials":{"type":"TypeBool","computed":true},"acr_user_managed_identity_client_id":{"type":"TypeString","computed":true},"always_on":{"type":"TypeBool","computed":true},"app_command_line":{"type":"TypeString","computed":true},"cors":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"support_credentials":{"type":"TypeBool","computed":true}}}},"default_documents":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"dotnet_framework_version":{"type":"TypeString","computed":true},"ftps_state":{"type":"TypeString","computed":true},"health_check_path":{"type":"TypeString","computed":true},"http2_enabled":{"type":"TypeBool","computed":true},"ip_restriction":{"type":"TypeList","computed":true,"elem":{"schema":{"action":{"type":"TypeString","computed":true},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"x_fd_health_probe":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_for":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_host":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"ip_address":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"priority":{"type":"TypeInt","computed":true},"service_tag":{"type":"TypeString","computed":true},"virtual_network_subnet_id":{"type":"TypeString","computed":true}}}},"java_container":{"type":"TypeString","computed":true},"java_container_version":{"type":"TypeString","computed":true},"java_version":{"type":"TypeString","computed":true},"linux_fx_version":{"type":"TypeString","computed":true},"local_mysql_enabled":{"type":"TypeBool","computed":true},"managed_pipeline_mode":{"type":"TypeString","computed":true},"min_tls_version":{"type":"TypeString","computed":true},"number_of_workers":{"type":"TypeInt","computed":true},"php_version":{"type":"TypeString","computed":true},"python_version":{"type":"TypeString","computed":true},"remote_debugging_enabled":{"type":"TypeBool","computed":true},"remote_debugging_version":{"type":"TypeString","computed":true},"scm_ip_restriction":{"type":"TypeList","computed":true,"elem":{"schema":{"action":{"type":"TypeString","computed":true},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"x_fd_health_probe":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_for":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_host":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"ip_address":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"priority":{"type":"TypeInt","computed":true},"service_tag":{"type":"TypeString","computed":true},"virtual_network_subnet_id":{"type":"TypeString","computed":true}}}},"scm_type":{"type":"TypeString","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","computed":true},"use_32_bit_worker_process":{"type":"TypeBool","computed":true},"vnet_route_all_enabled":{"type":"TypeBool","computed":true},"websockets_enabled":{"type":"TypeBool","computed":true},"windows_fx_version":{"type":"TypeString","computed":true}}}},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"source_control":{"type":"TypeList","computed":true,"elem":{"schema":{"branch":{"type":"TypeString","computed":true},"manual_integration":{"type":"TypeBool","computed":true},"repo_url":{"type":"TypeString","computed":true},"rollback_enabled":{"type":"TypeBool","computed":true},"use_mercurial":{"type":"TypeBool","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_app_service_certificate":{"schema":{"expiration_date":{"type":"TypeString","computed":true},"friendly_name":{"type":"TypeString","computed":true},"host_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"issue_date":{"type":"TypeString","computed":true},"issuer":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"subject_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"thumbprint":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_app_service_certificate_order":{"schema":{"app_service_certificate_not_renewable_reasons":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"auto_renew":{"type":"TypeBool","computed":true},"certificates":{"type":"TypeList","computed":true,"elem":{"schema":{"certificate_name":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","computed":true},"key_vault_secret_name":{"type":"TypeString","computed":true},"provisioning_state":{"type":"TypeString","computed":true}}}},"csr":{"type":"TypeString","computed":true},"distinguished_name":{"type":"TypeString","computed":true},"domain_verification_token":{"type":"TypeString","computed":true},"expiration_time":{"type":"TypeString","computed":true},"intermediate_thumbprint":{"type":"TypeString","computed":true},"is_private_key_external":{"type":"TypeBool","computed":true},"key_size":{"type":"TypeInt","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"product_type":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"root_thumbprint":{"type":"TypeString","computed":true},"signed_certificate_thumbprint":{"type":"TypeString","computed":true},"status":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"validity_in_years":{"type":"TypeInt","computed":true}},"timeouts":{"read":5}},"azurerm_app_service_environment_v3":{"schema":{"allow_new_private_endpoint_connections":{"type":"TypeBool","computed":true},"cluster_setting":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"dedicated_host_count":{"type":"TypeInt","computed":true},"dns_suffix":{"type":"TypeString","computed":true},"external_inbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"inbound_network_dependencies":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ports":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"internal_inbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"internal_load_balancing_mode":{"type":"TypeString","computed":true},"ip_ssl_address_count":{"type":"TypeInt","computed":true},"linux_outbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"pricing_tier":{"type":"TypeString","computed":true},"remote_debugging_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"subnet_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"windows_outbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"zone_redundant":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_app_service_plan":{"schema":{"app_service_environment_id":{"type":"TypeString","computed":true},"is_xenon":{"type":"TypeBool","computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"maximum_elastic_worker_count":{"type":"TypeInt","computed":true},"maximum_number_of_workers":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true},"per_site_scaling":{"type":"TypeBool","computed":true},"reserved":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeList","computed":true,"elem":{"schema":{"capacity":{"type":"TypeInt","computed":true},"size":{"type":"TypeString","computed":true},"tier":{"type":"TypeString","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"zone_redundant":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_application_gateway":{"schema":{"authentication_certificate":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"autoscale_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"max_capacity":{"type":"TypeInt","computed":true},"min_capacity":{"type":"TypeInt","computed":true}}}},"backend_address_pool":{"type":"TypeList","computed":true,"elem":{"schema":{"fqdns":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"id":{"type":"TypeString","computed":true},"ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true}}}},"backend_http_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"affinity_cookie_name":{"type":"TypeString","computed":true},"authentication_certificate":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"connection_draining":{"type":"TypeList","computed":true,"elem":{"schema":{"drain_timeout_sec":{"type":"TypeInt","computed":true},"enabled":{"type":"TypeBool","computed":true}}}},"cookie_based_affinity":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"path":{"type":"TypeString","computed":true},"pick_host_name_from_backend_address":{"type":"TypeBool","computed":true},"port":{"type":"TypeInt","computed":true},"probe_id":{"type":"TypeString","computed":true},"probe_name":{"type":"TypeString","computed":true},"protocol":{"type":"TypeString","computed":true},"request_timeout":{"type":"TypeInt","computed":true},"trusted_root_certificate_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"custom_error_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"custom_error_page_url":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"status_code":{"type":"TypeString","computed":true}}}},"fips_enabled":{"type":"TypeBool","computed":true},"firewall_policy_id":{"type":"TypeString","computed":true},"force_firewall_policy_association":{"type":"TypeBool","computed":true},"frontend_ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_address_allocation":{"type":"TypeString","computed":true},"private_link_configuration_id":{"type":"TypeString","computed":true},"private_link_configuration_name":{"type":"TypeString","computed":true},"public_ip_address_id":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"frontend_port":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"port":{"type":"TypeInt","computed":true}}}},"gateway_ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"global":{"type":"TypeList","computed":true,"elem":{"schema":{"request_buffering_enabled":{"type":"TypeBool","computed":true},"response_buffering_enabled":{"type":"TypeBool","computed":true}}}},"http2_enabled":{"type":"TypeBool","computed":true},"http_listener":{"type":"TypeList","computed":true,"elem":{"schema":{"custom_error_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"custom_error_page_url":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"status_code":{"type":"TypeString","computed":true}}}},"firewall_policy_id":{"type":"TypeString","computed":true},"frontend_ip_configuration_id":{"type":"TypeString","computed":true},"frontend_ip_configuration_name":{"type":"TypeString","computed":true},"frontend_port_id":{"type":"TypeString","computed":true},"frontend_port_name":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","computed":true},"host_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"protocol":{"type":"TypeString","computed":true},"require_sni":{"type":"TypeBool","computed":true},"ssl_certificate_id":{"type":"TypeString","computed":true},"ssl_certificate_name":{"type":"TypeString","computed":true},"ssl_profile_id":{"type":"TypeString","computed":true},"ssl_profile_name":{"type":"TypeString","computed":true}}}},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"private_endpoint_connection":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"private_link_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"primary":{"type":"TypeBool","computed":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_address_allocation":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","computed":true}}}},"probe":{"type":"TypeList","computed":true,"elem":{"schema":{"host":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"interval":{"type":"TypeInt","computed":true},"match":{"type":"TypeList","computed":true,"elem":{"schema":{"body":{"type":"TypeString","computed":true},"status_code":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"minimum_servers":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","computed":true},"path":{"type":"TypeString","computed":true},"pick_host_name_from_backend_http_settings":{"type":"TypeBool","computed":true},"port":{"type":"TypeInt","computed":true},"protocol":{"type":"TypeString","computed":true},"timeout":{"type":"TypeInt","computed":true},"unhealthy_threshold":{"type":"TypeInt","computed":true}}}},"redirect_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"include_path":{"type":"TypeBool","computed":true},"include_query_string":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","computed":true},"redirect_type":{"type":"TypeString","computed":true},"target_listener_id":{"type":"TypeString","computed":true},"target_listener_name":{"type":"TypeString","computed":true},"target_url":{"type":"TypeString","computed":true}}}},"request_routing_rule":{"type":"TypeList","computed":true,"elem":{"schema":{"backend_address_pool_id":{"type":"TypeString","computed":true},"backend_address_pool_name":{"type":"TypeString","computed":true},"backend_http_settings_id":{"type":"TypeString","computed":true},"backend_http_settings_name":{"type":"TypeString","computed":true},"http_listener_id":{"type":"TypeString","computed":true},"http_listener_name":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"priority":{"type":"TypeInt","computed":true},"redirect_configuration_id":{"type":"TypeString","computed":true},"redirect_configuration_name":{"type":"TypeString","computed":true},"rewrite_rule_set_id":{"type":"TypeString","computed":true},"rewrite_rule_set_name":{"type":"TypeString","computed":true},"rule_type":{"type":"TypeString","computed":true},"url_path_map_id":{"type":"TypeString","computed":true},"url_path_map_name":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"rewrite_rule_set":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"rewrite_rule":{"type":"TypeList","computed":true,"elem":{"schema":{"condition":{"type":"TypeList","computed":true,"elem":{"schema":{"ignore_case":{"type":"TypeBool","computed":true},"negate":{"type":"TypeBool","computed":true},"pattern":{"type":"TypeString","computed":true},"variable":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","computed":true},"request_header_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"header_name":{"type":"TypeString","computed":true},"header_value":{"type":"TypeString","computed":true}}}},"response_header_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"header_name":{"type":"TypeString","computed":true},"header_value":{"type":"TypeString","computed":true}}}},"rule_sequence":{"type":"TypeInt","computed":true},"url":{"type":"TypeList","computed":true,"elem":{"schema":{"components":{"type":"TypeString","computed":true},"path":{"type":"TypeString","computed":true},"query_string":{"type":"TypeString","computed":true},"reroute":{"type":"TypeBool","computed":true}}}}}}}}}},"sku":{"type":"TypeList","computed":true,"elem":{"schema":{"capacity":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","computed":true},"tier":{"type":"TypeString","computed":true}}}},"ssl_certificate":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"key_vault_secret_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"public_cert_data":{"type":"TypeString","computed":true}}}},"ssl_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"cipher_suites":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"disabled_protocols":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"min_protocol_version":{"type":"TypeString","computed":true},"policy_name":{"type":"TypeString","computed":true},"policy_type":{"type":"TypeString","computed":true}}}},"ssl_profile":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"ssl_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"cipher_suites":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"disabled_protocols":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"min_protocol_version":{"type":"TypeString","computed":true},"policy_name":{"type":"TypeString","computed":true},"policy_type":{"type":"TypeString","computed":true}}}},"trusted_client_certificate_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"verify_client_certificate_issuer_dn":{"type":"TypeBool","computed":true},"verify_client_certificate_revocation":{"type":"TypeString","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"trusted_client_certificate":{"type":"TypeList","computed":true,"elem":{"schema":{"data":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"trusted_root_certificate":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"key_vault_secret_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"url_path_map":{"type":"TypeList","computed":true,"elem":{"schema":{"default_backend_address_pool_id":{"type":"TypeString","computed":true},"default_backend_address_pool_name":{"type":"TypeString","computed":true},"default_backend_http_settings_id":{"type":"TypeString","computed":true},"default_backend_http_settings_name":{"type":"TypeString","computed":true},"default_redirect_configuration_id":{"type":"TypeString","computed":true},"default_redirect_configuration_name":{"type":"TypeString","computed":true},"default_rewrite_rule_set_id":{"type":"TypeString","computed":true},"default_rewrite_rule_set_name":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"path_rule":{"type":"TypeList","computed":true,"elem":{"schema":{"backend_address_pool_id":{"type":"TypeString","computed":true},"backend_address_pool_name":{"type":"TypeString","computed":true},"backend_http_settings_id":{"type":"TypeString","computed":true},"backend_http_settings_name":{"type":"TypeString","computed":true},"firewall_policy_id":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"paths":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"redirect_configuration_id":{"type":"TypeString","computed":true},"redirect_configuration_name":{"type":"TypeString","computed":true},"rewrite_rule_set_id":{"type":"TypeString","computed":true},"rewrite_rule_set_name":{"type":"TypeString","computed":true}}}}}}},"waf_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"disabled_rule_group":{"type":"TypeList","computed":true,"elem":{"schema":{"rule_group_name":{"type":"TypeString","computed":true},"rules":{"type":"TypeList","computed":true,"elem":{"type":"TypeInt"}}}}},"enabled":{"type":"TypeBool","computed":true},"exclusion":{"type":"TypeList","computed":true,"elem":{"schema":{"match_variable":{"type":"TypeString","computed":true},"selector":{"type":"TypeString","computed":true},"selector_match_operator":{"type":"TypeString","computed":true}}}},"file_upload_limit_mb":{"type":"TypeInt","computed":true},"firewall_mode":{"type":"TypeString","computed":true},"max_request_body_size_kb":{"type":"TypeInt","computed":true},"request_body_check":{"type":"TypeBool","computed":true},"rule_set_type":{"type":"TypeString","computed":true},"rule_set_version":{"type":"TypeString","computed":true}}}},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_application_insights":{"schema":{"app_id":{"type":"TypeString","computed":true},"application_type":{"type":"TypeString","computed":true},"connection_string":{"type":"TypeString","computed":true},"instrumentation_key":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"retention_in_days":{"type":"TypeInt","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_application_security_group":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_arc_machine":{"schema":{"active_directory_fqdn":{"type":"TypeString","computed":true},"agent":{"type":"TypeList","computed":true,"elem":{"schema":{"extensions_allow_list":{"type":"TypeList","computed":true,"elem":{"schema":{"publisher":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"extensions_block_list":{"type":"TypeList","computed":true,"elem":{"schema":{"publisher":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"extensions_enabled":{"type":"TypeBool","computed":true},"guest_configuration_enabled":{"type":"TypeBool","computed":true},"incoming_connections_ports":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"proxy_bypass":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"proxy_url":{"type":"TypeString","computed":true}}}},"agent_version":{"type":"TypeString","computed":true},"client_public_key":{"type":"TypeString","computed":true},"cloud_metadata":{"type":"TypeList","computed":true,"elem":{"schema":{"provider":{"type":"TypeString","computed":true}}}},"detected_properties":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"display_name":{"type":"TypeString","computed":true},"dns_fqdn":{"type":"TypeString","computed":true},"domain_name":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"last_status_change_time":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"location_data":{"type":"TypeList","computed":true,"elem":{"schema":{"city":{"type":"TypeString","computed":true},"country_or_region":{"type":"TypeString","computed":true},"district":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"machine_fqdn":{"type":"TypeString","computed":true},"mssql_discovered":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"os_name":{"type":"TypeString","computed":true},"os_profile":{"type":"TypeList","computed":true,"elem":{"schema":{"computer_name":{"type":"TypeString","computed":true},"linux":{"type":"TypeList","computed":true,"elem":{"schema":{"patch":{"type":"TypeList","computed":true,"elem":{"schema":{"assessment_mode":{"type":"TypeString","computed":true},"patch_mode":{"type":"TypeString","computed":true}}}}}}},"windows":{"type":"TypeList","computed":true,"elem":{"schema":{"patch":{"type":"TypeList","computed":true,"elem":{"schema":{"assessment_mode":{"type":"TypeString","computed":true},"patch_mode":{"type":"TypeString","computed":true}}}}}}}}}},"os_sku":{"type":"TypeString","computed":true},"os_type":{"type":"TypeString","computed":true},"os_version":{"type":"TypeString","computed":true},"parent_cluster_resource_id":{"type":"TypeString","computed":true},"private_link_scope_resource_id":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"service_status":{"type":"TypeList","computed":true,"elem":{"schema":{"extension_service":{"type":"TypeList","computed":true,"elem":{"schema":{"startup_type":{"type":"TypeString","computed":true},"status":{"type":"TypeString","computed":true}}}},"guest_configuration_service":{"type":"TypeList","computed":true,"elem":{"schema":{"startup_type":{"type":"TypeString","computed":true},"status":{"type":"TypeString","computed":true}}}}}}},"status":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"vm_id":{"type":"TypeString","computed":true},"vm_uuid":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_arc_resource_bridge_appliance":{"schema":{"distro":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"infrastructure_provider":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"public_key_base64":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_attestation_provider":{"schema":{"attestation_uri":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"trust_model":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_automation_account":{"schema":{"endpoint":{"type":"TypeString","computed":true},"hybrid_service_url":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","computed":true},"private_endpoint_connection":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"secondary_key":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_automation_runbook":{"schema":{"automation_account_name":{"type":"TypeString","required":true},"content":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"log_activity_trace_level":{"type":"TypeInt","computed":true},"log_progress":{"type":"TypeBool","computed":true},"log_verbose":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"runbook_type":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_automation_variable_bool":{"schema":{"automation_account_name":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"encrypted":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_automation_variable_datetime":{"schema":{"automation_account_name":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"encrypted":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_automation_variable_int":{"schema":{"automation_account_name":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"encrypted":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeInt","computed":true}},"timeouts":{"read":5}},"azurerm_automation_variable_object":{"schema":{"automation_account_name":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"encrypted":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_automation_variable_string":{"schema":{"automation_account_name":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"encrypted":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_automation_variables":{"schema":{"automation_account_id":{"type":"TypeString","required":true},"bool":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"encrypted":{"type":"TypeBool","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"value":{"type":"TypeBool","computed":true}}}},"datetime":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"encrypted":{"type":"TypeBool","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"encrypted":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"encrypted":{"type":"TypeBool","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"int":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"encrypted":{"type":"TypeBool","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"value":{"type":"TypeInt","computed":true}}}},"null":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"encrypted":{"type":"TypeBool","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"object":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"encrypted":{"type":"TypeBool","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"string":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"encrypted":{"type":"TypeBool","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_availability_set":{"schema":{"location":{"type":"TypeString","computed":true},"managed":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"platform_fault_domain_count":{"type":"TypeInt","computed":true},"platform_update_domain_count":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_backup_policy_file_share":{"schema":{"name":{"type":"TypeString","required":true},"recovery_vault_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_backup_policy_vm":{"schema":{"name":{"type":"TypeString","required":true},"recovery_vault_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_bastion_host":{"schema":{"copy_paste_enabled":{"type":"TypeBool","computed":true},"dns_name":{"type":"TypeString","computed":true},"file_copy_enabled":{"type":"TypeBool","computed":true},"ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"public_ip_address_id":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"ip_connect_enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"scale_units":{"type":"TypeInt","computed":true},"shareable_link_enabled":{"type":"TypeBool","computed":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tunneling_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_batch_account":{"schema":{"account_endpoint":{"type":"TypeString","computed":true},"encryption":{"type":"TypeList","computed":true,"elem":{"schema":{"key_vault_key_id":{"type":"TypeString","computed":true}}}},"key_vault_reference":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"url":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"pool_allocation_mode":{"type":"TypeString","computed":true},"primary_access_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_access_key":{"type":"TypeString","computed":true},"storage_account_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_batch_application":{"schema":{"account_name":{"type":"TypeString","required":true},"allow_updates":{"type":"TypeBool","computed":true},"default_version":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_batch_certificate":{"schema":{"account_name":{"type":"TypeString","required":true},"format":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"public_data":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"thumbprint":{"type":"TypeString","computed":true},"thumbprint_algorithm":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_batch_pool":{"schema":{"account_name":{"type":"TypeString","required":true},"auto_scale":{"type":"TypeList","computed":true,"elem":{"schema":{"evaluation_interval":{"type":"TypeString","computed":true},"formula":{"type":"TypeString","computed":true}}}},"certificate":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"store_location":{"type":"TypeString","computed":true},"store_name":{"type":"TypeString","computed":true},"visibility":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}}},"container_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"container_image_names":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"container_registries":{"type":"TypeList","computed":true,"elem":{"schema":{"password":{"type":"TypeString","computed":true},"registry_server":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true},"user_name":{"type":"TypeString","computed":true}}}},"type":{"type":"TypeString","computed":true}}}},"data_disks":{"type":"TypeList","computed":true,"elem":{"schema":{"caching":{"type":"TypeString","computed":true},"disk_size_gb":{"type":"TypeInt","computed":true},"lun":{"type":"TypeInt","computed":true},"storage_account_type":{"type":"TypeString","computed":true}}}},"disk_encryption":{"type":"TypeList","computed":true,"elem":{"schema":{"disk_encryption_target":{"type":"TypeString","computed":true}}}},"display_name":{"type":"TypeString","computed":true},"extensions":{"type":"TypeList","computed":true,"elem":{"schema":{"auto_upgrade_minor_version":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","computed":true},"protected_settings":{"type":"TypeString","computed":true},"provision_after_extensions":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"publisher":{"type":"TypeString","computed":true},"settings_json":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true},"type_handler_version":{"type":"TypeString","computed":true}}}},"fixed_scale":{"type":"TypeList","computed":true,"elem":{"schema":{"resize_timeout":{"type":"TypeString","computed":true},"target_dedicated_nodes":{"type":"TypeInt","computed":true},"target_low_priority_nodes":{"type":"TypeInt","computed":true}}}},"inter_node_communication":{"type":"TypeString","computed":true},"license_type":{"type":"TypeString","computed":true},"max_tasks_per_node":{"type":"TypeInt","computed":true},"metadata":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"mount":{"type":"TypeList","computed":true,"elem":{"schema":{"azure_blob_file_system":{"type":"TypeList","optional":true,"elem":{"schema":{"account_key":{"type":"TypeString","computed":true},"account_name":{"type":"TypeString","computed":true},"blobfuse_options":{"type":"TypeString","computed":true},"container_name":{"type":"TypeString","computed":true},"identity_id":{"type":"TypeString","computed":true},"relative_mount_path":{"type":"TypeString","computed":true},"sas_key":{"type":"TypeString","computed":true}}}},"azure_file_share":{"type":"TypeList","optional":true,"elem":{"schema":{"account_key":{"type":"TypeString","computed":true},"account_name":{"type":"TypeString","computed":true},"azure_file_url":{"type":"TypeString","computed":true},"mount_options":{"type":"TypeString","computed":true},"relative_mount_path":{"type":"TypeString","computed":true}}}},"cifs_mount":{"type":"TypeList","computed":true,"elem":{"schema":{"mount_options":{"type":"TypeString","computed":true},"password":{"type":"TypeString","computed":true},"relative_mount_path":{"type":"TypeString","computed":true},"source":{"type":"TypeString","computed":true},"user_name":{"type":"TypeString","computed":true}}}},"nfs_mount":{"type":"TypeList","computed":true,"elem":{"schema":{"mount_options":{"type":"TypeString","computed":true},"relative_mount_path":{"type":"TypeString","computed":true},"source":{"type":"TypeString","computed":true}}}}}}},"name":{"type":"TypeString","required":true},"network_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"accelerated_networking_enabled":{"type":"TypeBool","computed":true},"dynamic_vnet_assignment_scope":{"type":"TypeString","computed":true},"endpoint_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"backend_port":{"type":"TypeInt","computed":true},"frontend_port_range":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"network_security_group_rules":{"type":"TypeList","computed":true,"elem":{"schema":{"access":{"type":"TypeString","computed":true},"priority":{"type":"TypeInt","computed":true},"source_address_prefix":{"type":"TypeString","computed":true},"source_port_ranges":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"protocol":{"type":"TypeString","computed":true}}}},"public_address_provisioning_type":{"type":"TypeString","computed":true},"public_ips":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","computed":true}}}},"node_agent_sku_id":{"type":"TypeString","computed":true},"node_placement":{"type":"TypeList","computed":true,"elem":{"schema":{"policy":{"type":"TypeString","computed":true}}}},"os_disk_placement":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"start_task":{"type":"TypeList","computed":true,"elem":{"schema":{"command_line":{"type":"TypeString","computed":true},"common_environment_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"container":{"type":"TypeList","computed":true,"elem":{"schema":{"image_name":{"type":"TypeString","computed":true},"registry":{"type":"TypeList","computed":true,"elem":{"schema":{"password":{"type":"TypeString","computed":true},"registry_server":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true},"user_name":{"type":"TypeString","computed":true}}}},"run_options":{"type":"TypeString","computed":true},"working_directory":{"type":"TypeString","computed":true}}}},"resource_file":{"type":"TypeList","computed":true,"elem":{"schema":{"auto_storage_container_name":{"type":"TypeString","computed":true},"blob_prefix":{"type":"TypeString","computed":true},"file_mode":{"type":"TypeString","computed":true},"file_path":{"type":"TypeString","computed":true},"http_url":{"type":"TypeString","computed":true},"storage_container_url":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true}}}},"task_retry_maximum":{"type":"TypeInt","computed":true},"user_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"auto_user":{"type":"TypeList","computed":true,"elem":{"schema":{"elevation_level":{"type":"TypeString","computed":true},"scope":{"type":"TypeString","computed":true}}}},"user_name":{"type":"TypeString","computed":true}}}},"wait_for_success":{"type":"TypeBool","computed":true}}}},"storage_image_reference":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"offer":{"type":"TypeString","computed":true},"publisher":{"type":"TypeString","computed":true},"sku":{"type":"TypeString","computed":true},"version":{"type":"TypeString","computed":true}}}},"task_scheduling_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"node_fill_type":{"type":"TypeString","computed":true}}}},"user_accounts":{"type":"TypeList","computed":true,"elem":{"schema":{"elevation_level":{"type":"TypeString","computed":true},"linux_user_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"gid":{"type":"TypeInt","computed":true},"ssh_private_key":{"type":"TypeString","computed":true},"uid":{"type":"TypeInt","computed":true}}}},"name":{"type":"TypeString","computed":true},"password":{"type":"TypeString","computed":true},"windows_user_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"login_mode":{"type":"TypeString","computed":true}}}}}}},"vm_size":{"type":"TypeString","computed":true},"windows":{"type":"TypeList","computed":true,"elem":{"schema":{"enable_automatic_updates":{"type":"TypeBool","computed":true}}}}},"timeouts":{"read":5}},"azurerm_billing_enrollment_account_scope":{"schema":{"billing_account_name":{"type":"TypeString","required":true},"enrollment_account_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_billing_mca_account_scope":{"schema":{"billing_account_name":{"type":"TypeString","required":true},"billing_profile_name":{"type":"TypeString","required":true},"invoice_section_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_billing_mpa_account_scope":{"schema":{"billing_account_name":{"type":"TypeString","required":true},"customer_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_blueprint_definition":{"schema":{"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","computed":true},"last_modified":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"scope_id":{"type":"TypeString","required":true},"target_scope":{"type":"TypeString","computed":true},"time_created":{"type":"TypeString","computed":true},"versions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_blueprint_published_version":{"schema":{"blueprint_name":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","computed":true},"last_modified":{"type":"TypeString","computed":true},"scope_id":{"type":"TypeString","required":true},"target_scope":{"type":"TypeString","computed":true},"time_created":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true},"version":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_cdn_frontdoor_custom_domain":{"schema":{"cdn_frontdoor_profile_id":{"type":"TypeString","computed":true},"dns_zone_id":{"type":"TypeString","computed":true},"expiration_date":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"profile_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tls":{"type":"TypeList","computed":true,"elem":{"schema":{"cdn_frontdoor_secret_id":{"type":"TypeString","computed":true},"certificate_type":{"type":"TypeString","computed":true},"minimum_tls_version":{"type":"TypeString","computed":true}}}},"validation_token":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_cdn_frontdoor_endpoint":{"schema":{"enabled":{"type":"TypeBool","computed":true},"host_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"profile_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_cdn_frontdoor_firewall_policy":{"schema":{"enabled":{"type":"TypeBool","computed":true},"frontend_endpoint_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"mode":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"redirect_url":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_cdn_frontdoor_origin_group":{"schema":{"cdn_frontdoor_profile_id":{"type":"TypeString","computed":true},"health_probe":{"type":"TypeList","computed":true,"elem":{"schema":{"interval_in_seconds":{"type":"TypeInt","computed":true},"path":{"type":"TypeString","computed":true},"protocol":{"type":"TypeString","computed":true},"request_type":{"type":"TypeString","computed":true}}}},"load_balancing":{"type":"TypeList","computed":true,"elem":{"schema":{"additional_latency_in_milliseconds":{"type":"TypeInt","computed":true},"sample_size":{"type":"TypeInt","computed":true},"successful_samples_required":{"type":"TypeInt","computed":true}}}},"name":{"type":"TypeString","required":true},"profile_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"restore_traffic_time_to_healed_or_new_endpoint_in_minutes":{"type":"TypeInt","computed":true},"session_affinity_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_cdn_frontdoor_profile":{"schema":{"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"resource_guid":{"type":"TypeString","computed":true},"response_timeout_seconds":{"type":"TypeInt","computed":true},"sku_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_cdn_frontdoor_rule_set":{"schema":{"cdn_frontdoor_profile_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"profile_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_cdn_frontdoor_secret":{"schema":{"cdn_frontdoor_profile_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"profile_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"secret":{"type":"TypeList","computed":true,"elem":{"schema":{"customer_certificate":{"type":"TypeList","computed":true,"elem":{"schema":{"expiration_date":{"type":"TypeString","computed":true},"key_vault_certificate_id":{"type":"TypeString","computed":true},"subject_alternative_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}}}}}},"timeouts":{"read":5}},"azurerm_cdn_profile":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_client_config":{"schema":{"client_id":{"type":"TypeString","computed":true},"object_id":{"type":"TypeString","computed":true},"subscription_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_cognitive_account":{"schema":{"endpoint":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"primary_access_key":{"type":"TypeString","computed":true},"qna_runtime_endpoint":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_access_key":{"type":"TypeString","computed":true},"sku_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_communication_service":{"schema":{"data_location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_confidential_ledger":{"schema":{"azuread_based_service_principal":{"type":"TypeList","computed":true,"elem":{"schema":{"ledger_role_name":{"type":"TypeString","computed":true},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true}}}},"certificate_based_security_principal":{"type":"TypeList","computed":true,"elem":{"schema":{"ledger_role_name":{"type":"TypeString","computed":true},"pem_public_key":{"type":"TypeString","computed":true}}}},"identity_service_endpoint":{"type":"TypeString","computed":true},"ledger_endpoint":{"type":"TypeString","computed":true},"ledger_type":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_consumption_budget_resource_group":{"schema":{"amount":{"type":"TypeFloat","computed":true},"filter":{"type":"TypeList","computed":true,"elem":{"schema":{"dimension":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"operator":{"type":"TypeString","computed":true},"values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"not":{"type":"TypeList","computed":true,"elem":{"schema":{"dimension":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"operator":{"type":"TypeString","computed":true},"values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"tag":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"operator":{"type":"TypeString","computed":true},"values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}}}}},"tag":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"operator":{"type":"TypeString","computed":true},"values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}}}}},"name":{"type":"TypeString","required":true},"notification":{"type":"TypeList","computed":true,"elem":{"schema":{"contact_emails":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"contact_groups":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"contact_roles":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","computed":true},"operator":{"type":"TypeString","computed":true},"threshold":{"type":"TypeInt","computed":true},"threshold_type":{"type":"TypeString","computed":true}}}},"resource_group_id":{"type":"TypeString","required":true},"time_grain":{"type":"TypeString","computed":true},"time_period":{"type":"TypeList","computed":true,"elem":{"schema":{"end_date":{"type":"TypeString","computed":true},"start_date":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_consumption_budget_subscription":{"schema":{"amount":{"type":"TypeFloat","computed":true},"filter":{"type":"TypeList","computed":true,"elem":{"schema":{"dimension":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"operator":{"type":"TypeString","computed":true},"values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"not":{"type":"TypeList","computed":true,"elem":{"schema":{"dimension":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"operator":{"type":"TypeString","computed":true},"values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"tag":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"operator":{"type":"TypeString","computed":true},"values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}}}}},"tag":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"operator":{"type":"TypeString","computed":true},"values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}}}}},"name":{"type":"TypeString","required":true},"notification":{"type":"TypeList","computed":true,"elem":{"schema":{"contact_emails":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"contact_groups":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"contact_roles":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","computed":true},"operator":{"type":"TypeString","computed":true},"threshold":{"type":"TypeInt","computed":true},"threshold_type":{"type":"TypeString","computed":true}}}},"subscription_id":{"type":"TypeString","required":true},"time_grain":{"type":"TypeString","computed":true},"time_period":{"type":"TypeList","computed":true,"elem":{"schema":{"end_date":{"type":"TypeString","computed":true},"start_date":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_container_app":{"schema":{"container_app_environment_id":{"type":"TypeString","computed":true},"custom_domain_verification_id":{"type":"TypeString","description":"The ID of the Custom Domain Verification for this Container App.","computed":true},"dapr":{"type":"TypeList","computed":true,"elem":{"schema":{"app_id":{"type":"TypeString","description":"The Dapr Application Identifier.","computed":true},"app_port":{"type":"TypeInt","description":"The port which the application is listening on. This is the same as the `ingress` port.","computed":true},"app_protocol":{"type":"TypeString","description":"The protocol for the app. Possible values include `http` and `grpc`. Defaults to `http`.","computed":true}}}},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"ingress":{"type":"TypeList","computed":true,"elem":{"schema":{"allow_insecure_connections":{"type":"TypeBool","description":"Should this ingress allow insecure connections?","computed":true},"custom_domain":{"type":"TypeList","computed":true,"elem":{"schema":{"certificate_binding_type":{"type":"TypeString","description":"The Binding type. Possible values include `Disabled` and `SniEnabled`. Defaults to `Disabled`","computed":true},"certificate_id":{"type":"TypeString","description":"The ID of the Certificate.","computed":true},"name":{"type":"TypeString","description":"The hostname of the Certificate. Must be the CN or a named SAN in the certificate.","computed":true}}}},"exposed_port":{"type":"TypeInt","description":"The exposed port on the container for the Ingress traffic.","computed":true},"external_enabled":{"type":"TypeBool","description":"Is this an external Ingress.","computed":true},"fqdn":{"type":"TypeString","description":"The FQDN of the ingress.","computed":true},"ip_security_restriction":{"type":"TypeList","computed":true,"elem":{"schema":{"action":{"type":"TypeString","description":"The action. Allow or Deny.","computed":true},"description":{"type":"TypeString","description":"Describe the IP restriction rule that is being sent to the container-app.","computed":true},"ip_address_range":{"type":"TypeString","description":"CIDR notation to match incoming IP address.","computed":true},"name":{"type":"TypeString","description":"Name for the IP restriction rule.","computed":true}}}},"target_port":{"type":"TypeInt","description":"The target port on the container for the Ingress traffic.","computed":true},"traffic_weight":{"type":"TypeList","computed":true,"elem":{"schema":{"label":{"type":"TypeString","description":"The label to apply to the revision as a name prefix for routing traffic.","computed":true},"latest_revision":{"type":"TypeBool","description":"This traffic Weight relates to the latest stable Container Revision.","computed":true},"percentage":{"type":"TypeInt","description":"The percentage of traffic to send to this revision.","computed":true},"revision_suffix":{"type":"TypeString","description":"The suffix string to append to the revision. This must be unique for the Container App's lifetime. A default hash created by the service will be used if this value is omitted.","computed":true}}}},"transport":{"type":"TypeString","description":"The transport method for the Ingress. Possible values include `auto`, `http`, and `http2`, `tcp`. Defaults to `auto`","computed":true}}}},"latest_revision_fqdn":{"type":"TypeString","description":"The fully qualified domain name of the latest Container App.","computed":true},"latest_revision_name":{"type":"TypeString","description":"The name of the latest Container Revision.","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"outbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"registry":{"type":"TypeList","computed":true,"elem":{"schema":{"identity":{"type":"TypeString","description":"ID of the System or User Managed Identity used to pull images from the Container Registry","computed":true},"password_secret_name":{"type":"TypeString","description":"The name of the Secret Reference containing the password value for this user on the Container Registry.","computed":true},"server":{"type":"TypeString","description":"The hostname for the Container Registry.","computed":true},"username":{"type":"TypeString","description":"The username to use for this Container Registry.","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"revision_mode":{"type":"TypeString","computed":true},"secret":{"type":"TypeSet","computed":true,"elem":{"schema":{"identity":{"type":"TypeString","description":"The identity to use for accessing key vault reference.","computed":true},"key_vault_secret_id":{"type":"TypeString","description":"The id of the key vault secret.","computed":true},"name":{"type":"TypeString","description":"The secret name.","computed":true},"value":{"type":"TypeString","description":"The value for this secret.","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"template":{"type":"TypeList","computed":true,"elem":{"schema":{"azure_queue_scale_rule":{"type":"TypeList","computed":true,"elem":{"schema":{"authentication":{"type":"TypeList","computed":true,"elem":{"schema":{"secret_name":{"type":"TypeString","computed":true},"trigger_parameter":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","computed":true},"queue_length":{"type":"TypeInt","computed":true},"queue_name":{"type":"TypeString","computed":true}}}},"container":{"type":"TypeList","computed":true,"elem":{"schema":{"args":{"type":"TypeList","description":"A list of args to pass to the container.","computed":true,"elem":{"type":"TypeString"}},"command":{"type":"TypeList","description":"A command to pass to the container to override the default. This is provided as a list of command line elements without spaces.","computed":true,"elem":{"type":"TypeString"}},"cpu":{"type":"TypeFloat","description":"The amount of vCPU to allocate to the container. Possible values include `0.25`, `0.5`, `0.75`, `1.0`, `1.25`, `1.5`, `1.75`, and `2.0`. **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.0` / `2.0` or `0.5` / `1.0`","computed":true},"env":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The name of the environment variable for the container.","computed":true},"secret_name":{"type":"TypeString","description":"The name of the secret that contains the value for this environment variable.","computed":true},"value":{"type":"TypeString","description":"The value for this environment variable. **NOTE:** This value is ignored if `secret_name` is used","computed":true}}}},"ephemeral_storage":{"type":"TypeString","description":"The amount of ephemeral storage available to the Container App.","computed":true},"image":{"type":"TypeString","description":"The image to use to create the container.","computed":true},"liveness_probe":{"type":"TypeList","computed":true,"elem":{"schema":{"failure_count_threshold":{"type":"TypeInt","description":"The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`.","computed":true},"header":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The HTTP Header Name.","computed":true},"value":{"type":"TypeString","description":"The HTTP Header value.","computed":true}}}},"host":{"type":"TypeString","description":"The probe hostname. Defaults to the pod IP address. Setting a value for `Host` in `headers` can be used to override this for `http` and `https` type probes.","computed":true},"initial_delay":{"type":"TypeInt","description":"The time in seconds to wait after the container has started before the probe is started.","computed":true},"interval_seconds":{"type":"TypeInt","description":"How often, in seconds, the probe should run. Possible values are between `1` and `240`. Defaults to `10`","computed":true},"path":{"type":"TypeString","description":"The URI to use with the `host` for http type probes. Not valid for `TCP` type probes. Defaults to `/`.","computed":true},"port":{"type":"TypeInt","description":"The port number on which to connect. Possible values are between `1` and `65535`.","computed":true},"termination_grace_period_seconds":{"type":"TypeInt","description":"The time in seconds after the container is sent the termination signal before the process if forcibly killed.","computed":true},"timeout":{"type":"TypeInt","description":"Time in seconds after which the probe times out. Possible values are between `1` an `240`. Defaults to `1`.","computed":true},"transport":{"type":"TypeString","description":"Type of probe. Possible values are `TCP`, `HTTP`, and `HTTPS`.","computed":true}}}},"memory":{"type":"TypeString","description":"The amount of memory to allocate to the container. Possible values include `0.5Gi`, `1.0Gi`, `1.5Gi`, `2.0Gi`, `2.5Gi`, `3.0Gi`, `3.5Gi`, and `4.0Gi`. **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.25` / `2.5Gi` or `0.75` / `1.5Gi`","computed":true},"name":{"type":"TypeString","description":"The name of the container.","computed":true},"readiness_probe":{"type":"TypeList","computed":true,"elem":{"schema":{"failure_count_threshold":{"type":"TypeInt","description":"The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`.","computed":true},"header":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The HTTP Header Name.","computed":true},"value":{"type":"TypeString","description":"The HTTP Header value.","computed":true}}}},"host":{"type":"TypeString","description":"The probe hostname. Defaults to the pod IP address. Setting a value for `Host` in `headers` can be used to override this for `http` and `https` type probes.","computed":true},"interval_seconds":{"type":"TypeInt","description":"How often, in seconds, the probe should run. Possible values are between `1` and `240`. Defaults to `10`","computed":true},"path":{"type":"TypeString","description":"The URI to use for http type probes. Not valid for `TCP` type probes. Defaults to `/`.","computed":true},"port":{"type":"TypeInt","description":"The port number on which to connect. Possible values are between `1` and `65535`.","computed":true},"success_count_threshold":{"type":"TypeInt","description":"The number of consecutive successful responses required to consider this probe as successful. Possible values are between `1` and `10`. Defaults to `3`.","computed":true},"timeout":{"type":"TypeInt","description":"Time in seconds after which the probe times out. Possible values are between `1` an `240`. Defaults to `1`.","computed":true},"transport":{"type":"TypeString","description":"Type of probe. Possible values are `TCP`, `HTTP`, and `HTTPS`.","computed":true}}}},"startup_probe":{"type":"TypeList","computed":true,"elem":{"schema":{"failure_count_threshold":{"type":"TypeInt","description":"The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`.","computed":true},"header":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The HTTP Header Name.","computed":true},"value":{"type":"TypeString","description":"The HTTP Header value.","computed":true}}}},"host":{"type":"TypeString","computed":true},"interval_seconds":{"type":"TypeInt","description":"How often, in seconds, the probe should run. Possible values are between `1` and `240`. Defaults to `10`","computed":true},"path":{"type":"TypeString","computed":true},"port":{"type":"TypeInt","computed":true},"termination_grace_period_seconds":{"type":"TypeInt","description":"The time in seconds after the container is sent the termination signal before the process if forcibly killed.","computed":true},"timeout":{"type":"TypeInt","description":"Time in seconds after which the probe times out. Possible values are between `1` an `240`. Defaults to `1`.","computed":true},"transport":{"type":"TypeString","computed":true}}}},"volume_mounts":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The name of the Volume to be mounted in the container.","computed":true},"path":{"type":"TypeString","description":"The path in the container at which to mount this volume.","computed":true}}}}}}},"custom_scale_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"authentication":{"type":"TypeList","computed":true,"elem":{"schema":{"secret_name":{"type":"TypeString","computed":true},"trigger_parameter":{"type":"TypeString","computed":true}}}},"custom_rule_type":{"type":"TypeString","computed":true},"metadata":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true}}}},"http_scale_rule":{"type":"TypeList","computed":true,"elem":{"schema":{"authentication":{"type":"TypeList","computed":true,"elem":{"schema":{"secret_name":{"type":"TypeString","computed":true},"trigger_parameter":{"type":"TypeString","computed":true}}}},"concurrent_requests":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"init_container":{"type":"TypeList","computed":true,"elem":{"schema":{"args":{"type":"TypeList","description":"A list of args to pass to the container.","computed":true,"elem":{"type":"TypeString"}},"command":{"type":"TypeList","description":"A command to pass to the container to override the default. This is provided as a list of command line elements without spaces.","computed":true,"elem":{"type":"TypeString"}},"cpu":{"type":"TypeFloat","description":"The amount of vCPU to allocate to the container. Possible values include `0.25`, `0.5`, `0.75`, `1.0`, `1.25`, `1.5`, `1.75`, and `2.0`. **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.0` / `2.0` or `0.5` / `1.0`","computed":true},"env":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The name of the environment variable for the container.","computed":true},"secret_name":{"type":"TypeString","description":"The name of the secret that contains the value for this environment variable.","computed":true},"value":{"type":"TypeString","description":"The value for this environment variable. **NOTE:** This value is ignored if `secret_name` is used","computed":true}}}},"ephemeral_storage":{"type":"TypeString","description":"The amount of ephemeral storage available to the Container App.","computed":true},"image":{"type":"TypeString","description":"The image to use to create the container.","computed":true},"memory":{"type":"TypeString","description":"The amount of memory to allocate to the container. Possible values include `0.5Gi`, `1.0Gi`, `1.5Gi`, `2.0Gi`, `2.5Gi`, `3.0Gi`, `3.5Gi`, and `4.0Gi`. **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.25` / `2.5Gi` or `0.75` / `1.5Gi`","computed":true},"name":{"type":"TypeString","description":"The name of the container.","computed":true},"volume_mounts":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The name of the Volume to be mounted in the container.","computed":true},"path":{"type":"TypeString","description":"The path in the container at which to mount this volume.","computed":true}}}}}}},"max_replicas":{"type":"TypeInt","description":"The maximum number of replicas for this container.","computed":true},"min_replicas":{"type":"TypeInt","description":"The minimum number of replicas for this container.","computed":true},"revision_suffix":{"type":"TypeString","computed":true},"tcp_scale_rule":{"type":"TypeList","computed":true,"elem":{"schema":{"authentication":{"type":"TypeList","computed":true,"elem":{"schema":{"secret_name":{"type":"TypeString","computed":true},"trigger_parameter":{"type":"TypeString","computed":true}}}},"concurrent_requests":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"volume":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"storage_name":{"type":"TypeString","computed":true},"storage_type":{"type":"TypeString","computed":true}}}}}}},"workload_profile_name":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_container_app_environment":{"schema":{"custom_domain_verification_id":{"type":"TypeString","description":"The ID of the Custom Domain Verification for this Container App Environment.","computed":true},"default_domain":{"type":"TypeString","description":"The default publicly resolvable name of this Container App Environment","computed":true},"docker_bridge_cidr":{"type":"TypeString","description":"The network addressing in which the Container Apps in this Container App Environment will reside in CIDR notation.","computed":true},"infrastructure_subnet_id":{"type":"TypeString","description":"The existing Subnet in use by the Container Apps Control Plane.","computed":true},"internal_load_balancer_enabled":{"type":"TypeBool","description":"Does the Container Environment operate in Internal Load Balancing Mode?","computed":true},"location":{"type":"TypeString","computed":true},"log_analytics_workspace_name":{"type":"TypeString","description":"The name of the Log Analytics Workspace this Container Apps Managed Environment is linked to.","computed":true},"name":{"type":"TypeString","required":true,"description":"The name of the Container Apps Managed Environment."},"platform_reserved_cidr":{"type":"TypeString","description":"The IP range, in CIDR notation, that is reserved for environment infrastructure IP addresses.","computed":true},"platform_reserved_dns_ip_address":{"type":"TypeString","description":"The IP address from the IP range defined by `platform_reserved_cidr` that is reserved for the internal DNS server.","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"static_ip_address":{"type":"TypeString","description":"The Static IP Address of the Environment.","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_container_app_environment_certificate":{"schema":{"container_app_environment_id":{"type":"TypeString","required":true,"description":"The Container App Managed Environment ID to configure this Certificate on.","forceNew":true},"expiration_date":{"type":"TypeString","description":"The expiration date for the Certificate.","computed":true},"issue_date":{"type":"TypeString","description":"The date of issue for the Certificate.","computed":true},"issuer":{"type":"TypeString","description":"The Certificate Issuer.","computed":true},"name":{"type":"TypeString","required":true,"description":"The name of the Container Apps Certificate.","forceNew":true},"subject_name":{"type":"TypeString","description":"The Subject Name for the Certificate.","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"thumbprint":{"type":"TypeString","description":"The Thumbprint of the Certificate.","computed":true}},"timeouts":{"read":5}},"azurerm_container_group":{"schema":{"fqdn":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"ip_address":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"subnet_ids":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_container_registry":{"schema":{"admin_enabled":{"type":"TypeBool","computed":true},"admin_password":{"type":"TypeString","computed":true},"admin_username":{"type":"TypeString","computed":true},"data_endpoint_enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"login_server":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_container_registry_cache_rule":{"schema":{"container_registry_id":{"type":"TypeString","required":true},"credential_set_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"source_repo":{"type":"TypeString","computed":true},"target_repo":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_container_registry_scope_map":{"schema":{"actions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"container_registry_name":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_container_registry_token":{"schema":{"container_registry_name":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"scope_map_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_cosmosdb_account":{"schema":{"automatic_failover_enabled":{"type":"TypeBool","computed":true},"capabilities":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true}}}},"consistency_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"consistency_level":{"type":"TypeString","computed":true},"max_interval_in_seconds":{"type":"TypeInt","computed":true},"max_staleness_prefix":{"type":"TypeInt","computed":true}}}},"endpoint":{"type":"TypeString","computed":true},"free_tier_enabled":{"type":"TypeBool","computed":true},"geo_location":{"type":"TypeList","computed":true,"elem":{"schema":{"failover_priority":{"type":"TypeInt","computed":true},"id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true}}}},"ip_range_filter":{"type":"TypeString","computed":true},"is_virtual_network_filter_enabled":{"type":"TypeBool","computed":true},"key_vault_key_id":{"type":"TypeString","computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"multiple_write_locations_enabled":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"offer_type":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"primary_mongodb_connection_string":{"type":"TypeString","computed":true},"primary_readonly_key":{"type":"TypeString","computed":true},"primary_readonly_mongodb_connection_string":{"type":"TypeString","computed":true},"primary_readonly_sql_connection_string":{"type":"TypeString","computed":true},"primary_sql_connection_string":{"type":"TypeString","computed":true},"read_endpoints":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"secondary_key":{"type":"TypeString","computed":true},"secondary_mongodb_connection_string":{"type":"TypeString","computed":true},"secondary_readonly_key":{"type":"TypeString","computed":true},"secondary_readonly_mongodb_connection_string":{"type":"TypeString","computed":true},"secondary_readonly_sql_connection_string":{"type":"TypeString","computed":true},"secondary_sql_connection_string":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"virtual_network_rule":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true}}}},"write_endpoints":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_cosmosdb_mongo_database":{"schema":{"account_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_cosmosdb_restorable_database_accounts":{"schema":{"accounts":{"type":"TypeList","computed":true,"elem":{"schema":{"api_type":{"type":"TypeString","computed":true},"creation_time":{"type":"TypeString","computed":true},"deletion_time":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"restorable_locations":{"type":"TypeList","computed":true,"elem":{"schema":{"creation_time":{"type":"TypeString","computed":true},"deletion_time":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"regional_database_account_instance_id":{"type":"TypeString","computed":true}}}}}}},"location":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_cosmosdb_sql_database":{"schema":{"account_name":{"type":"TypeString","required":true},"autoscale_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"max_throughput":{"type":"TypeInt","computed":true}}}},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"throughput":{"type":"TypeInt","computed":true}},"timeouts":{"read":5}},"azurerm_cosmosdb_sql_role_definition":{"schema":{"account_name":{"type":"TypeString","required":true},"assignable_scopes":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"permissions":{"type":"TypeSet","computed":true,"elem":{"schema":{"data_actions":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"role_definition_id":{"type":"TypeString","required":true},"type":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_dashboard_grafana":{"schema":{"api_key_enabled":{"type":"TypeBool","computed":true},"auto_generated_domain_name_label_scope":{"type":"TypeString","computed":true},"azure_monitor_workspace_integrations":{"type":"TypeList","computed":true,"elem":{"schema":{"resource_id":{"type":"TypeString","computed":true}}}},"deterministic_outbound_ip_enabled":{"type":"TypeBool","computed":true},"endpoint":{"type":"TypeString","computed":true},"grafana_major_version":{"type":"TypeString","computed":true},"grafana_version":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"outbound_ips":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"public_network_access_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"zone_redundancy_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_data_factory":{"schema":{"github_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"account_name":{"type":"TypeString","computed":true},"branch_name":{"type":"TypeString","computed":true},"git_url":{"type":"TypeString","computed":true},"repository_name":{"type":"TypeString","computed":true},"root_folder":{"type":"TypeString","computed":true}}}},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"vsts_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"account_name":{"type":"TypeString","computed":true},"branch_name":{"type":"TypeString","computed":true},"project_name":{"type":"TypeString","computed":true},"repository_name":{"type":"TypeString","computed":true},"root_folder":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_data_factory_trigger_schedule":{"schema":{"activated":{"type":"TypeBool","computed":true},"annotations":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"end_time":{"type":"TypeString","computed":true},"frequency":{"type":"TypeString","computed":true},"interval":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true},"pipeline_name":{"type":"TypeString","computed":true},"schedule":{"type":"TypeList","computed":true,"elem":{"schema":{"days_of_month":{"type":"TypeList","computed":true,"elem":{"type":"TypeInt"}},"days_of_week":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"hours":{"type":"TypeList","computed":true,"elem":{"type":"TypeInt"}},"minutes":{"type":"TypeList","computed":true,"elem":{"type":"TypeInt"}},"monthly":{"type":"TypeList","computed":true,"elem":{"schema":{"week":{"type":"TypeInt","computed":true},"weekday":{"type":"TypeString","computed":true}}}}}}},"start_time":{"type":"TypeString","computed":true},"time_zone":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_data_factory_trigger_schedules":{"schema":{"data_factory_id":{"type":"TypeString","required":true},"items":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_data_protection_backup_vault":{"schema":{"datastore_type":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"redundancy":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_data_share":{"schema":{"account_id":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"kind":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"snapshot_schedule":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"recurrence":{"type":"TypeString","computed":true},"start_time":{"type":"TypeString","computed":true}}}},"terms":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_data_share_account":{"schema":{"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_data_share_dataset_blob_storage":{"schema":{"container_name":{"type":"TypeString","computed":true},"data_share_id":{"type":"TypeString","required":true},"display_name":{"type":"TypeString","computed":true},"file_path":{"type":"TypeString","computed":true},"folder_path":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"storage_account":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","computed":true},"subscription_id":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_data_share_dataset_data_lake_gen2":{"schema":{"display_name":{"type":"TypeString","computed":true},"file_path":{"type":"TypeString","computed":true},"file_system_name":{"type":"TypeString","computed":true},"folder_path":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"share_id":{"type":"TypeString","required":true},"storage_account_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_data_share_dataset_kusto_cluster":{"schema":{"display_name":{"type":"TypeString","computed":true},"kusto_cluster_id":{"type":"TypeString","computed":true},"kusto_cluster_location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"share_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_data_share_dataset_kusto_database":{"schema":{"display_name":{"type":"TypeString","computed":true},"kusto_cluster_location":{"type":"TypeString","computed":true},"kusto_database_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"share_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_database_migration_project":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"service_name":{"type":"TypeString","required":true},"source_platform":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"target_platform":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_database_migration_service":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_databox_edge_device":{"schema":{"device_properties":{"type":"TypeList","computed":true,"elem":{"schema":{"capacity":{"type":"TypeInt","computed":true},"configured_role_types":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"culture":{"type":"TypeString","computed":true},"hcs_version":{"type":"TypeString","computed":true},"model":{"type":"TypeString","computed":true},"node_count":{"type":"TypeInt","computed":true},"serial_number":{"type":"TypeString","computed":true},"software_version":{"type":"TypeString","computed":true},"status":{"type":"TypeString","computed":true},"time_zone":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_databricks_access_connector":{"schema":{"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_databricks_workspace":{"schema":{"location":{"type":"TypeString","computed":true},"managed_disk_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeString","computed":true},"storage_account_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","computed":true},"workspace_url":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_databricks_workspace_private_endpoint_connection":{"schema":{"connections":{"type":"TypeList","computed":true,"elem":{"schema":{"action_required":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"status":{"type":"TypeString","computed":true},"workspace_private_endpoint_id":{"type":"TypeString","computed":true}}}},"private_endpoint_id":{"type":"TypeString","required":true},"workspace_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_dedicated_host":{"schema":{"dedicated_host_group_name":{"type":"TypeString","required":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_dedicated_host_group":{"schema":{"automatic_placement_enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"platform_fault_domain_count":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_dev_test_lab":{"schema":{"artifacts_storage_account_id":{"type":"TypeString","computed":true},"default_premium_storage_account_id":{"type":"TypeString","computed":true},"default_storage_account_id":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"premium_data_disk_storage_account_id":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"storage_type":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"unique_identifier":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_dev_test_virtual_network":{"schema":{"allowed_subnets":{"type":"TypeList","computed":true,"elem":{"schema":{"allow_public_ip":{"type":"TypeString","computed":true},"lab_subnet_name":{"type":"TypeString","computed":true},"resource_id":{"type":"TypeString","computed":true}}}},"lab_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"subnet_overrides":{"type":"TypeList","computed":true,"elem":{"schema":{"lab_subnet_name":{"type":"TypeString","computed":true},"resource_id":{"type":"TypeString","computed":true},"use_in_vm_creation_permission":{"type":"TypeString","computed":true},"use_public_ip_address_permission":{"type":"TypeString","computed":true},"virtual_network_pool_name":{"type":"TypeString","computed":true}}}},"unique_identifier":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_digital_twins_instance":{"schema":{"host_name":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_disk_access":{"schema":{"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_disk_encryption_set":{"schema":{"auto_key_rotation_enabled":{"type":"TypeBool","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"key_vault_key_url":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_dns_a_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"records":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"target_resource_id":{"type":"TypeString","computed":true},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_dns_aaaa_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"records":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"target_resource_id":{"type":"TypeString","computed":true},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_dns_caa_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"record":{"type":"TypeSet","computed":true,"elem":{"schema":{"flags":{"type":"TypeInt","computed":true},"tag":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_dns_cname_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"record":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"target_resource_id":{"type":"TypeString","computed":true},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_dns_mx_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","optional":true},"record":{"type":"TypeSet","computed":true,"elem":{"schema":{"exchange":{"type":"TypeString","computed":true},"preference":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_dns_ns_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"records":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_dns_ptr_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"records":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_dns_soa_record":{"schema":{"email":{"type":"TypeString","computed":true},"expire_time":{"type":"TypeInt","computed":true},"fqdn":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","computed":true},"minimum_ttl":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","optional":true,"default":"@"},"refresh_time":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true},"retry_time":{"type":"TypeInt","computed":true},"serial_number":{"type":"TypeInt","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_dns_srv_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"record":{"type":"TypeSet","computed":true,"elem":{"schema":{"port":{"type":"TypeInt","computed":true},"priority":{"type":"TypeInt","computed":true},"target":{"type":"TypeString","computed":true},"weight":{"type":"TypeInt","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_dns_txt_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"record":{"type":"TypeSet","computed":true,"elem":{"schema":{"value":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_dns_zone":{"schema":{"max_number_of_record_sets":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true},"name_servers":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"number_of_record_sets":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","optional":true,"computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_elastic_cloud_elasticsearch":{"schema":{"elastic_cloud_deployment_id":{"type":"TypeString","computed":true},"elastic_cloud_email_address":{"type":"TypeString","computed":true},"elastic_cloud_sso_default_url":{"type":"TypeString","computed":true},"elastic_cloud_user_id":{"type":"TypeString","computed":true},"elasticsearch_service_url":{"type":"TypeString","computed":true},"kibana_service_url":{"type":"TypeString","computed":true},"kibana_sso_uri":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"logs":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"filtering_tag":{"type":"TypeList","computed":true,"elem":{"schema":{"action":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"send_activity_logs":{"type":"TypeBool","computed":true},"send_azuread_logs":{"type":"TypeBool","computed":true},"send_subscription_logs":{"type":"TypeBool","computed":true}}}},"monitoring_enabled":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_elastic_san":{"schema":{"base_size_in_tib":{"type":"TypeInt","computed":true},"extended_size_in_tib":{"type":"TypeInt","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"tier":{"type":"TypeString","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"total_iops":{"type":"TypeInt","computed":true},"total_mbps":{"type":"TypeInt","computed":true},"total_size_in_tib":{"type":"TypeInt","computed":true},"total_volume_size_in_gib":{"type":"TypeInt","computed":true},"volume_group_count":{"type":"TypeInt","computed":true},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_elastic_san_volume_group":{"schema":{"elastic_san_id":{"type":"TypeString","required":true},"encryption":{"type":"TypeList","computed":true,"elem":{"schema":{"current_versioned_key_expiration_timestamp":{"type":"TypeString","computed":true},"current_versioned_key_id":{"type":"TypeString","computed":true},"key_vault_key_id":{"type":"TypeString","computed":true},"last_key_rotation_timestamp":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true}}}},"encryption_type":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","required":true},"network_rule":{"type":"TypeList","computed":true,"elem":{"schema":{"action":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"protocol_type":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_elastic_san_volume_snapshot":{"schema":{"name":{"type":"TypeString","required":true},"source_id":{"type":"TypeString","computed":true},"source_volume_size_in_gib":{"type":"TypeInt","computed":true},"volume_group_id":{"type":"TypeString","required":true,"forceNew":true},"volume_name":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_eventgrid_domain":{"schema":{"endpoint":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"inbound_ip_rule":{"type":"TypeList","computed":true,"elem":{"schema":{"action":{"type":"TypeString","computed":true},"ip_mask":{"type":"TypeString","computed":true}}}},"input_mapping_default_values":{"type":"TypeList","computed":true,"elem":{"schema":{"data_version":{"type":"TypeString","computed":true},"event_type":{"type":"TypeString","computed":true},"subject":{"type":"TypeString","computed":true}}}},"input_mapping_fields":{"type":"TypeList","computed":true,"elem":{"schema":{"data_version":{"type":"TypeString","computed":true},"event_time":{"type":"TypeString","computed":true},"event_type":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"subject":{"type":"TypeString","computed":true},"topic":{"type":"TypeString","computed":true}}}},"input_schema":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"primary_access_key":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_access_key":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_eventgrid_domain_topic":{"schema":{"domain_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_eventgrid_system_topic":{"schema":{"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"metric_arm_resource_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"source_arm_resource_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"topic_type":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_eventgrid_topic":{"schema":{"endpoint":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"primary_access_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_access_key":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_eventhub":{"schema":{"name":{"type":"TypeString","required":true},"namespace_name":{"type":"TypeString","required":true},"partition_count":{"type":"TypeInt","computed":true},"partition_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_eventhub_authorization_rule":{"schema":{"eventhub_name":{"type":"TypeString","required":true},"listen":{"type":"TypeBool","optional":true,"default":false},"manage":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true},"namespace_name":{"type":"TypeString","required":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_connection_string_alias":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_connection_string_alias":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"send":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"read":5}},"azurerm_eventhub_cluster":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_eventhub_consumer_group":{"schema":{"eventhub_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"namespace_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"user_metadata":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_eventhub_namespace":{"schema":{"auto_inflate_enabled":{"type":"TypeBool","computed":true},"capacity":{"type":"TypeInt","computed":true},"dedicated_cluster_id":{"type":"TypeString","computed":true},"default_primary_connection_string":{"type":"TypeString","computed":true},"default_primary_connection_string_alias":{"type":"TypeString","computed":true},"default_primary_key":{"type":"TypeString","computed":true},"default_secondary_connection_string":{"type":"TypeString","computed":true},"default_secondary_connection_string_alias":{"type":"TypeString","computed":true},"default_secondary_key":{"type":"TypeString","computed":true},"kafka_enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"maximum_throughput_units":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_eventhub_namespace_authorization_rule":{"schema":{"listen":{"type":"TypeBool","computed":true},"manage":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"namespace_name":{"type":"TypeString","required":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_connection_string_alias":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_connection_string_alias":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"send":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_eventhub_sas":{"schema":{"connection_string":{"type":"TypeString","required":true},"expiry":{"type":"TypeString","required":true},"sas":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_express_route_circuit":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"peerings":{"type":"TypeList","computed":true,"elem":{"schema":{"azure_asn":{"type":"TypeInt","computed":true},"peer_asn":{"type":"TypeInt","computed":true},"peering_type":{"type":"TypeString","computed":true},"primary_peer_address_prefix":{"type":"TypeString","computed":true},"secondary_peer_address_prefix":{"type":"TypeString","computed":true},"shared_key":{"type":"TypeString","computed":true},"vlan_id":{"type":"TypeInt","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"service_key":{"type":"TypeString","computed":true},"service_provider_properties":{"type":"TypeList","computed":true,"elem":{"schema":{"bandwidth_in_mbps":{"type":"TypeInt","computed":true},"peering_location":{"type":"TypeString","computed":true},"service_provider_name":{"type":"TypeString","computed":true}}}},"service_provider_provisioning_state":{"type":"TypeString","computed":true},"sku":{"type":"TypeList","computed":true,"elem":{"schema":{"family":{"type":"TypeString","computed":true},"tier":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_express_route_circuit_peering":{"schema":{"azure_asn":{"type":"TypeInt","computed":true},"express_route_circuit_name":{"type":"TypeString","required":true},"gateway_manager_etag":{"type":"TypeString","computed":true},"ipv4_enabled":{"type":"TypeBool","computed":true},"peer_asn":{"type":"TypeInt","computed":true},"peering_type":{"type":"TypeString","required":true},"primary_azure_port":{"type":"TypeString","computed":true},"primary_peer_address_prefix":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"route_filter_id":{"type":"TypeString","computed":true},"secondary_azure_port":{"type":"TypeString","computed":true},"secondary_peer_address_prefix":{"type":"TypeString","computed":true},"shared_key":{"type":"TypeString","computed":true},"vlan_id":{"type":"TypeInt","computed":true}},"timeouts":{"read":5}},"azurerm_extended_locations":{"schema":{"extended_locations":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_firewall":{"schema":{"dns_proxy_enabled":{"type":"TypeBool","optional":true,"computed":true},"dns_servers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"firewall_policy_id":{"type":"TypeString","computed":true},"ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"private_ip_address":{"type":"TypeString","computed":true},"public_ip_address_id":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"management_ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"private_ip_address":{"type":"TypeString","computed":true},"public_ip_address_id":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"sku_tier":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"threat_intel_mode":{"type":"TypeString","computed":true},"virtual_hub":{"type":"TypeList","computed":true,"elem":{"schema":{"private_ip_address":{"type":"TypeString","computed":true},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"public_ip_count":{"type":"TypeInt","computed":true},"virtual_hub_id":{"type":"TypeString","computed":true}}}},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_firewall_policy":{"schema":{"base_policy_id":{"type":"TypeString","computed":true},"child_policies":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"dns":{"type":"TypeList","computed":true,"elem":{"schema":{"network_rule_fqdn_enabled":{"type":"TypeBool","computed":true},"proxy_enabled":{"type":"TypeBool","computed":true},"servers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"firewalls":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"rule_collection_groups":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"threat_intelligence_allowlist":{"type":"TypeList","computed":true,"elem":{"schema":{"fqdns":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"threat_intelligence_mode":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_function_app":{"schema":{"app_service_plan_id":{"type":"TypeString","computed":true},"app_settings":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"client_cert_mode":{"type":"TypeString","computed":true},"connection_string":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"custom_domain_verification_id":{"type":"TypeString","computed":true},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"os_type":{"type":"TypeString","computed":true},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"site_config":{"type":"TypeList","computed":true,"elem":{"schema":{"always_on":{"type":"TypeBool","computed":true},"app_scale_limit":{"type":"TypeInt","computed":true},"auto_swap_slot_name":{"type":"TypeString","computed":true},"cors":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"support_credentials":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"dotnet_framework_version":{"type":"TypeString","computed":true},"elastic_instance_minimum":{"type":"TypeInt","computed":true},"ftps_state":{"type":"TypeString","computed":true},"health_check_path":{"type":"TypeString","computed":true},"http2_enabled":{"type":"TypeBool","computed":true},"ip_restriction":{"type":"TypeList","computed":true,"elem":{"schema":{"action":{"type":"TypeString","computed":true},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"x_fd_health_probe":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_for":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_host":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"ip_address":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"priority":{"type":"TypeInt","computed":true},"service_tag":{"type":"TypeString","computed":true},"virtual_network_subnet_id":{"type":"TypeString","computed":true}}}},"java_version":{"type":"TypeString","computed":true},"linux_fx_version":{"type":"TypeString","computed":true},"min_tls_version":{"type":"TypeString","computed":true},"pre_warmed_instance_count":{"type":"TypeInt","computed":true},"runtime_scale_monitoring_enabled":{"type":"TypeBool","computed":true},"scm_ip_restriction":{"type":"TypeList","computed":true,"elem":{"schema":{"action":{"type":"TypeString","computed":true},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"x_fd_health_probe":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_for":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_host":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"ip_address":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"priority":{"type":"TypeInt","computed":true},"service_tag":{"type":"TypeString","computed":true},"virtual_network_subnet_id":{"type":"TypeString","computed":true}}}},"scm_type":{"type":"TypeString","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","computed":true},"use_32_bit_worker_process":{"type":"TypeBool","computed":true},"vnet_route_all_enabled":{"type":"TypeBool","computed":true},"websockets_enabled":{"type":"TypeBool","computed":true}}}},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"source_control":{"type":"TypeList","computed":true,"elem":{"schema":{"branch":{"type":"TypeString","computed":true},"manual_integration":{"type":"TypeBool","computed":true},"repo_url":{"type":"TypeString","computed":true},"rollback_enabled":{"type":"TypeBool","computed":true},"use_mercurial":{"type":"TypeBool","computed":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_function_app_host_keys":{"schema":{"blobs_extension_key":{"type":"TypeString","computed":true},"default_function_key":{"type":"TypeString","computed":true},"durabletask_extension_key":{"type":"TypeString","computed":true},"event_grid_extension_config_key":{"type":"TypeString","computed":true},"event_grid_extension_key":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"signalr_extension_key":{"type":"TypeString","computed":true},"webpubsub_extension_key":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_hdinsight_cluster":{"schema":{"cluster_id":{"type":"TypeString","computed":true},"cluster_version":{"type":"TypeString","computed":true},"component_versions":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"edge_ssh_endpoint":{"type":"TypeString","computed":true},"gateway":{"type":"TypeList","computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","computed":true},"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"https_endpoint":{"type":"TypeString","computed":true},"kafka_rest_proxy_endpoint":{"type":"TypeString","computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"ssh_endpoint":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tier":{"type":"TypeString","computed":true},"tls_min_version":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_healthcare_dicom_service":{"schema":{"authentication":{"type":"TypeList","computed":true,"elem":{"schema":{"audience":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"authority":{"type":"TypeString","computed":true}}}},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"private_endpoint":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"service_url":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_healthcare_fhir_service":{"schema":{"access_policy_object_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"authentication":{"type":"TypeList","computed":true,"elem":{"schema":{"audience":{"type":"TypeString","computed":true},"authority":{"type":"TypeString","computed":true},"smart_proxy_enabled":{"type":"TypeBool","computed":true}}}},"configuration_export_storage_account_name":{"type":"TypeString","computed":true},"container_registry_login_server_url":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"cors":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_headers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allowed_methods":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allowed_origins":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"credentials_allowed":{"type":"TypeBool","computed":true},"max_age_in_seconds":{"type":"TypeInt","computed":true}}}},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_healthcare_medtech_service":{"schema":{"device_mapping_json":{"type":"TypeString","computed":true},"eventhub_consumer_group_name":{"type":"TypeString","computed":true},"eventhub_name":{"type":"TypeString","computed":true},"eventhub_namespace_name":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","required":true},"workspace_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_healthcare_service":{"schema":{"access_policy_object_ids":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"authentication_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"audience":{"type":"TypeString","computed":true},"authority":{"type":"TypeString","computed":true},"smart_proxy_enabled":{"type":"TypeBool","computed":true}}}},"cors_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"allow_credentials":{"type":"TypeBool","computed":true},"allowed_headers":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"allowed_methods":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allowed_origins":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"max_age_in_seconds":{"type":"TypeInt","computed":true}}}},"cosmosdb_key_vault_key_versionless_id":{"type":"TypeString","computed":true},"cosmosdb_throughput":{"type":"TypeInt","computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_healthcare_workspace":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_image":{"schema":{"data_disk":{"type":"TypeList","computed":true,"elem":{"schema":{"blob_uri":{"type":"TypeString","computed":true},"caching":{"type":"TypeString","computed":true},"lun":{"type":"TypeInt","computed":true},"managed_disk_id":{"type":"TypeString","computed":true},"size_gb":{"type":"TypeInt","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","optional":true},"name_regex":{"type":"TypeString","optional":true},"os_disk":{"type":"TypeList","computed":true,"elem":{"schema":{"blob_uri":{"type":"TypeString","computed":true},"caching":{"type":"TypeString","computed":true},"managed_disk_id":{"type":"TypeString","computed":true},"os_state":{"type":"TypeString","computed":true},"os_type":{"type":"TypeString","computed":true},"size_gb":{"type":"TypeInt","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"sort_descending":{"type":"TypeBool","optional":true,"default":false},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"zone_resilient":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_images":{"schema":{"images":{"type":"TypeList","computed":true,"elem":{"schema":{"data_disk":{"type":"TypeList","computed":true,"elem":{"schema":{"blob_uri":{"type":"TypeString","computed":true},"caching":{"type":"TypeString","computed":true},"lun":{"type":"TypeInt","computed":true},"managed_disk_id":{"type":"TypeString","computed":true},"size_gb":{"type":"TypeInt","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"os_disk":{"type":"TypeList","computed":true,"elem":{"schema":{"blob_uri":{"type":"TypeString","computed":true},"caching":{"type":"TypeString","computed":true},"disk_encryption_set_id":{"type":"TypeString","computed":true},"managed_disk_id":{"type":"TypeString","computed":true},"os_state":{"type":"TypeString","computed":true},"os_type":{"type":"TypeString","computed":true},"size_gb":{"type":"TypeInt","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"zone_resilient":{"type":"TypeBool","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"tags_filter":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_iothub":{"schema":{"hostname":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_iothub_dps":{"schema":{"allocation_policy":{"type":"TypeString","computed":true},"device_provisioning_host_name":{"type":"TypeString","computed":true},"id_scope":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"service_operations_host_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_iothub_dps_shared_access_policy":{"schema":{"iothub_dps_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_iothub_shared_access_policy":{"schema":{"iothub_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_ip_group":{"schema":{"cidrs":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_ip_groups":{"schema":{"ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":10}},"azurerm_key_vault":{"schema":{"access_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"application_id":{"type":"TypeString","computed":true},"certificate_permissions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"key_permissions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"object_id":{"type":"TypeString","computed":true},"secret_permissions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"storage_permissions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","computed":true}}}},"enable_rbac_authorization":{"type":"TypeBool","computed":true},"enabled_for_deployment":{"type":"TypeBool","computed":true},"enabled_for_disk_encryption":{"type":"TypeBool","computed":true},"enabled_for_template_deployment":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"network_acls":{"type":"TypeList","computed":true,"elem":{"schema":{"bypass":{"type":"TypeString","computed":true},"default_action":{"type":"TypeString","computed":true},"ip_rules":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"virtual_network_subnet_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"public_network_access_enabled":{"type":"TypeBool","computed":true},"purge_protection_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","computed":true},"vault_uri":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_key_vault_access_policy":{"schema":{"certificate_permissions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"key_permissions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"secret_permissions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_key_vault_certificate":{"schema":{"certificate_data":{"type":"TypeString","computed":true},"certificate_data_base64":{"type":"TypeString","computed":true},"certificate_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"issuer_parameters":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true}}}},"key_properties":{"type":"TypeList","computed":true,"elem":{"schema":{"curve":{"type":"TypeString","computed":true},"exportable":{"type":"TypeBool","computed":true},"key_size":{"type":"TypeInt","computed":true},"key_type":{"type":"TypeString","computed":true},"reuse_key":{"type":"TypeBool","computed":true}}}},"lifetime_action":{"type":"TypeList","computed":true,"elem":{"schema":{"action":{"type":"TypeList","computed":true,"elem":{"schema":{"action_type":{"type":"TypeString","computed":true}}}},"trigger":{"type":"TypeList","computed":true,"elem":{"schema":{"days_before_expiry":{"type":"TypeInt","computed":true},"lifetime_percentage":{"type":"TypeInt","computed":true}}}}}}},"secret_properties":{"type":"TypeList","computed":true,"elem":{"schema":{"content_type":{"type":"TypeString","computed":true}}}},"x509_certificate_properties":{"type":"TypeList","computed":true,"elem":{"schema":{"extended_key_usage":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"key_usage":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"subject":{"type":"TypeString","computed":true},"subject_alternative_names":{"type":"TypeList","computed":true,"elem":{"schema":{"dns_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"emails":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"upns":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"validity_in_months":{"type":"TypeInt","computed":true}}}}}}},"expires":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"not_before":{"type":"TypeString","computed":true},"resource_manager_id":{"type":"TypeString","computed":true},"resource_manager_versionless_id":{"type":"TypeString","computed":true},"secret_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"thumbprint":{"type":"TypeString","computed":true},"version":{"type":"TypeString","optional":true,"computed":true},"versionless_id":{"type":"TypeString","computed":true},"versionless_secret_id":{"type":"TypeString","computed":true}},"timeouts":{"read":30}},"azurerm_key_vault_certificate_data":{"schema":{"certificates_count":{"type":"TypeInt","computed":true},"expires":{"type":"TypeString","computed":true},"hex":{"type":"TypeString","computed":true},"key":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"not_before":{"type":"TypeString","computed":true},"pem":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"version":{"type":"TypeString","optional":true,"computed":true}},"timeouts":{"read":5}},"azurerm_key_vault_certificate_issuer":{"schema":{"account_id":{"type":"TypeString","computed":true},"admin":{"type":"TypeList","computed":true,"elem":{"schema":{"email_address":{"type":"TypeString","computed":true},"first_name":{"type":"TypeString","computed":true},"last_name":{"type":"TypeString","computed":true},"phone":{"type":"TypeString","computed":true}}}},"key_vault_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"org_id":{"type":"TypeString","computed":true},"provider_name":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_key_vault_certificates":{"schema":{"certificates":{"type":"TypeList","computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}}}},"include_pending":{"type":"TypeBool","optional":true,"default":true},"key_vault_id":{"type":"TypeString","required":true},"names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_key_vault_encrypted_value":{"schema":{"algorithm":{"type":"TypeString","required":true},"decoded_plain_text_value":{"type":"TypeString","computed":true},"encrypted_data":{"type":"TypeString","optional":true},"key_vault_key_id":{"type":"TypeString","required":true},"plain_text_value":{"type":"TypeString","optional":true}},"timeouts":{"read":5}},"azurerm_key_vault_key":{"schema":{"curve":{"type":"TypeString","computed":true},"e":{"type":"TypeString","computed":true},"key_opts":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"key_size":{"type":"TypeInt","computed":true},"key_type":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","required":true},"n":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"public_key_openssh":{"type":"TypeString","computed":true},"public_key_pem":{"type":"TypeString","computed":true},"resource_id":{"type":"TypeString","computed":true},"resource_versionless_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"version":{"type":"TypeString","computed":true},"versionless_id":{"type":"TypeString","computed":true},"x":{"type":"TypeString","computed":true},"y":{"type":"TypeString","computed":true}},"timeouts":{"read":30}},"azurerm_key_vault_managed_hardware_security_module":{"schema":{"admin_object_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"hsm_uri":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"purge_protection_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"soft_delete_retention_days":{"type":"TypeInt","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_key_vault_managed_hardware_security_module_role_definition":{"schema":{"assignable_scopes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"description":{"type":"TypeString","computed":true},"managed_hsm_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"permission":{"type":"TypeList","computed":true,"elem":{"schema":{"actions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"data_actions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"not_actions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"not_data_actions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"resource_manager_id":{"type":"TypeString","computed":true},"role_name":{"type":"TypeString","computed":true},"role_type":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_key_vault_secret":{"schema":{"content_type":{"type":"TypeString","computed":true},"expiration_date":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"not_before_date":{"type":"TypeString","computed":true},"resource_id":{"type":"TypeString","computed":true},"resource_versionless_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"value":{"type":"TypeString","computed":true},"version":{"type":"TypeString","optional":true},"versionless_id":{"type":"TypeString","computed":true}},"timeouts":{"read":30}},"azurerm_key_vault_secrets":{"schema":{"key_vault_id":{"type":"TypeString","required":true},"names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"secrets":{"type":"TypeList","computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}}}}},"timeouts":{"read":5}},"azurerm_kubernetes_cluster":{"schema":{"aci_connector_linux":{"type":"TypeList","computed":true,"elem":{"schema":{"subnet_name":{"type":"TypeString","computed":true}}}},"agent_pool_profile":{"type":"TypeList","computed":true,"elem":{"schema":{"auto_scaling_enabled":{"type":"TypeBool","computed":true},"count":{"type":"TypeInt","computed":true},"max_count":{"type":"TypeInt","computed":true},"max_pods":{"type":"TypeInt","computed":true},"min_count":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","computed":true},"node_labels":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"node_public_ip_enabled":{"type":"TypeBool","computed":true},"node_public_ip_prefix_id":{"type":"TypeString","computed":true},"node_taints":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"orchestrator_version":{"type":"TypeString","computed":true},"os_disk_size_gb":{"type":"TypeInt","computed":true},"os_type":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true},"upgrade_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"drain_timeout_in_minutes":{"type":"TypeInt","computed":true},"max_surge":{"type":"TypeString","computed":true},"node_soak_duration_in_minutes":{"type":"TypeInt","computed":true}}}},"vm_size":{"type":"TypeString","computed":true},"vnet_subnet_id":{"type":"TypeString","computed":true},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"api_server_authorized_ip_ranges":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"azure_active_directory_role_based_access_control":{"type":"TypeList","computed":true,"elem":{"schema":{"admin_group_object_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"azure_rbac_enabled":{"type":"TypeBool","computed":true},"tenant_id":{"type":"TypeString","computed":true}}}},"azure_policy_enabled":{"type":"TypeBool","computed":true},"current_kubernetes_version":{"type":"TypeString","computed":true},"disk_encryption_set_id":{"type":"TypeString","computed":true},"dns_prefix":{"type":"TypeString","computed":true},"fqdn":{"type":"TypeString","computed":true},"http_application_routing_enabled":{"type":"TypeBool","computed":true},"http_application_routing_zone_name":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"ingress_application_gateway":{"type":"TypeList","computed":true,"elem":{"schema":{"effective_gateway_id":{"type":"TypeString","computed":true},"gateway_id":{"type":"TypeString","computed":true},"gateway_name":{"type":"TypeString","computed":true},"ingress_application_gateway_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","computed":true},"object_id":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true}}}},"subnet_cidr":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"key_management_service":{"type":"TypeList","computed":true,"elem":{"schema":{"key_vault_key_id":{"type":"TypeString","computed":true},"key_vault_network_access":{"type":"TypeString","computed":true}}}},"key_vault_secrets_provider":{"type":"TypeList","computed":true,"elem":{"schema":{"secret_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","computed":true},"object_id":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true}}}},"secret_rotation_enabled":{"type":"TypeBool","computed":true},"secret_rotation_interval":{"type":"TypeString","computed":true}}}},"kube_admin_config":{"type":"TypeList","computed":true,"elem":{"schema":{"client_certificate":{"type":"TypeString","computed":true},"client_key":{"type":"TypeString","computed":true},"cluster_ca_certificate":{"type":"TypeString","computed":true},"host":{"type":"TypeString","computed":true},"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"kube_admin_config_raw":{"type":"TypeString","computed":true},"kube_config":{"type":"TypeList","computed":true,"elem":{"schema":{"client_certificate":{"type":"TypeString","computed":true},"client_key":{"type":"TypeString","computed":true},"cluster_ca_certificate":{"type":"TypeString","computed":true},"host":{"type":"TypeString","computed":true},"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"kube_config_raw":{"type":"TypeString","computed":true},"kubelet_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","computed":true},"object_id":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true}}}},"kubernetes_version":{"type":"TypeString","computed":true},"linux_profile":{"type":"TypeList","computed":true,"elem":{"schema":{"admin_username":{"type":"TypeString","computed":true},"ssh_key":{"type":"TypeList","computed":true,"elem":{"schema":{"key_data":{"type":"TypeString","computed":true}}}}}}},"location":{"type":"TypeString","computed":true},"microsoft_defender":{"type":"TypeList","computed":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","required":true},"network_profile":{"type":"TypeList","computed":true,"elem":{"schema":{"dns_service_ip":{"type":"TypeString","computed":true},"docker_bridge_cidr":{"type":"TypeString","computed":true},"load_balancer_sku":{"type":"TypeString","computed":true},"network_plugin":{"type":"TypeString","computed":true},"network_policy":{"type":"TypeString","computed":true},"pod_cidr":{"type":"TypeString","computed":true},"service_cidr":{"type":"TypeString","computed":true}}}},"node_resource_group":{"type":"TypeString","computed":true},"node_resource_group_id":{"type":"TypeString","computed":true},"oidc_issuer_enabled":{"type":"TypeBool","computed":true},"oidc_issuer_url":{"type":"TypeString","computed":true},"oms_agent":{"type":"TypeList","computed":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","computed":true},"msi_auth_for_monitoring_enabled":{"type":"TypeBool","computed":true},"oms_agent_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","computed":true},"object_id":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true}}}}}}},"open_service_mesh_enabled":{"type":"TypeBool","computed":true},"private_cluster_enabled":{"type":"TypeBool","computed":true},"private_fqdn":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"role_based_access_control_enabled":{"type":"TypeBool","computed":true},"service_mesh_profile":{"type":"TypeList","computed":true,"elem":{"schema":{"certificate_authority":{"type":"TypeList","computed":true,"elem":{"schema":{"cert_chain_object_name":{"type":"TypeString","computed":true},"cert_object_name":{"type":"TypeString","computed":true},"key_object_name":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","computed":true},"root_cert_object_name":{"type":"TypeString","computed":true}}}},"external_ingress_gateway_enabled":{"type":"TypeBool","computed":true},"internal_ingress_gateway_enabled":{"type":"TypeBool","computed":true},"mode":{"type":"TypeString","computed":true},"revisions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"service_principal":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","computed":true}}}},"storage_profile":{"type":"TypeList","computed":true,"elem":{"schema":{"blob_driver_enabled":{"type":"TypeBool","computed":true},"disk_driver_enabled":{"type":"TypeBool","computed":true},"file_driver_enabled":{"type":"TypeBool","computed":true},"snapshot_controller_enabled":{"type":"TypeBool","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"windows_profile":{"type":"TypeList","computed":true,"elem":{"schema":{"admin_username":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_kubernetes_cluster_node_pool":{"schema":{"auto_scaling_enabled":{"type":"TypeBool","computed":true},"eviction_policy":{"type":"TypeString","computed":true},"kubernetes_cluster_name":{"type":"TypeString","required":true},"max_count":{"type":"TypeInt","computed":true},"max_pods":{"type":"TypeInt","computed":true},"min_count":{"type":"TypeInt","computed":true},"mode":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"node_count":{"type":"TypeInt","computed":true},"node_labels":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"node_public_ip_enabled":{"type":"TypeBool","computed":true},"node_public_ip_prefix_id":{"type":"TypeString","computed":true},"node_taints":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"orchestrator_version":{"type":"TypeString","computed":true},"os_disk_size_gb":{"type":"TypeInt","computed":true},"os_disk_type":{"type":"TypeString","computed":true},"os_type":{"type":"TypeString","computed":true},"priority":{"type":"TypeString","computed":true},"proximity_placement_group_id":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"spot_max_price":{"type":"TypeFloat","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"upgrade_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"drain_timeout_in_minutes":{"type":"TypeInt","computed":true},"max_surge":{"type":"TypeString","computed":true},"node_soak_duration_in_minutes":{"type":"TypeInt","computed":true}}}},"vm_size":{"type":"TypeString","computed":true},"vnet_subnet_id":{"type":"TypeString","computed":true},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_kubernetes_node_pool_snapshot":{"schema":{"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"source_node_pool_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_kubernetes_service_versions":{"schema":{"default_version":{"type":"TypeString","computed":true},"include_preview":{"type":"TypeBool","optional":true,"default":true},"latest_version":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"version_prefix":{"type":"TypeString","optional":true},"versions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_kusto_cluster":{"schema":{"data_ingestion_uri":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"uri":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_kusto_database":{"schema":{"cluster_name":{"type":"TypeString","required":true},"hot_cache_period":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"size":{"type":"TypeFloat","computed":true},"soft_delete_period":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_lb":{"schema":{"frontend_ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_address_allocation":{"type":"TypeString","computed":true},"private_ip_address_version":{"type":"TypeString","computed":true},"public_ip_address_id":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_lb_backend_address_pool":{"schema":{"backend_address":{"type":"TypeList","computed":true,"elem":{"schema":{"inbound_nat_rule_port_mapping":{"type":"TypeList","computed":true,"elem":{"schema":{"backend_port":{"type":"TypeInt","computed":true},"frontend_port":{"type":"TypeInt","computed":true},"inbound_nat_rule_name":{"type":"TypeString","computed":true}}}},"ip_address":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"virtual_network_id":{"type":"TypeString","computed":true}}}},"backend_ip_configurations":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true}}}},"inbound_nat_rules":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"load_balancing_rules":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"loadbalancer_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"outbound_rules":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_lb_outbound_rule":{"schema":{"allocated_outbound_ports":{"type":"TypeInt","computed":true},"backend_address_pool_id":{"type":"TypeString","computed":true},"frontend_ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"idle_timeout_in_minutes":{"type":"TypeInt","computed":true},"loadbalancer_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"protocol":{"type":"TypeString","computed":true},"tcp_reset_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_lb_rule":{"schema":{"backend_address_pool_id":{"type":"TypeString","computed":true},"backend_port":{"type":"TypeInt","computed":true},"disable_outbound_snat":{"type":"TypeBool","computed":true},"enable_floating_ip":{"type":"TypeBool","computed":true},"enable_tcp_reset":{"type":"TypeBool","computed":true},"frontend_ip_configuration_name":{"type":"TypeString","computed":true},"frontend_port":{"type":"TypeInt","computed":true},"idle_timeout_in_minutes":{"type":"TypeInt","computed":true},"load_distribution":{"type":"TypeString","computed":true},"loadbalancer_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"probe_id":{"type":"TypeString","computed":true},"protocol":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_linux_function_app":{"schema":{"app_settings":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"active_directory":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","description":"The list of Allowed audience values considered when validating JWTs issued by Azure Active Directory.","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The ID of the Client to use to authenticate with Azure Active Directory.","computed":true},"client_secret":{"type":"TypeString","description":"The Client Secret for the Client ID.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the client secret of the Client.","computed":true}}}},"additional_login_parameters":{"type":"TypeMap","description":"The map of Login Parameters sent to the OpenID Connect authorization endpoint when a user logs in.","computed":true,"elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","description":"Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","description":"The default authentication provider used when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`.","computed":true},"enabled":{"type":"TypeBool","description":"Is the Authentication / Authorization feature enabled?","computed":true},"facebook":{"type":"TypeList","computed":true,"elem":{"schema":{"app_id":{"type":"TypeString","description":"The App ID of the Facebook app used for login.","computed":true},"app_secret":{"type":"TypeString","description":"The App Secret of the Facebook app used for Facebook Login.","computed":true},"app_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `app_secret` value used for Facebook Login.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of Facebook Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"github":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The ID of the GitHub app used for login.","computed":true},"client_secret":{"type":"TypeString","description":"The Client Secret of the GitHub app used for GitHub Login.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for GitHub Login.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of GitHub Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"google":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The OpenID Connect Client ID for the Google web application.","computed":true},"client_secret":{"type":"TypeString","description":"The client secret associated with the Google web application.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for Google Login.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes that requested as part of Google Sign-In authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"issuer":{"type":"TypeString","description":"The OpenID Connect Issuer URI that represents the entity which issues access tokens.","computed":true},"microsoft":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The OAuth 2.0 client ID that was created for the app used for authentication.","computed":true},"client_secret":{"type":"TypeString","description":"The OAuth 2.0 client secret that was created for the app used for authentication.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of Microsoft Account authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"runtime_version":{"type":"TypeString","description":"The RuntimeVersion of the Authentication / Authorization feature in use.","computed":true},"token_refresh_extension_hours":{"type":"TypeFloat","description":"The number of hours after session token expiration that a session token can be used to call the token refresh API.","computed":true},"token_store_enabled":{"type":"TypeBool","description":"Are platform-specific security tokens that are obtained during login flows durably stored?","computed":true},"twitter":{"type":"TypeList","computed":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in.","computed":true},"consumer_secret":{"type":"TypeString","description":"The OAuth 1.0a consumer secret of the Twitter application used for sign-in.","computed":true},"consumer_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in.","computed":true}}}},"unauthenticated_client_action":{"type":"TypeString","description":"The action taken when an unauthenticated client attempts to access the app.","computed":true}}}},"auth_settings_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"active_directory_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_applications":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allowed_audiences":{"type":"TypeList","description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","computed":true,"elem":{"type":"TypeString"}},"allowed_groups":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allowed_identities":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The ID of the Client to use to authenticate with Azure Active Directory.","computed":true},"client_secret_certificate_thumbprint":{"type":"TypeString","description":"The thumbprint of the certificate used for signing purposes.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the client secret of the Client.","computed":true},"jwt_allowed_client_applications":{"type":"TypeList","description":"A list of Allowed Client Applications in the JWT Claim.","computed":true,"elem":{"type":"TypeString"}},"jwt_allowed_groups":{"type":"TypeList","description":"A list of Allowed Groups in the JWT Claim.","computed":true,"elem":{"type":"TypeString"}},"login_parameters":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tenant_auth_endpoint":{"type":"TypeString","description":"The Azure Tenant URI for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`","computed":true},"www_authentication_disabled":{"type":"TypeBool","description":"Is the www-authenticate provider omitted from the request?","computed":true}}}},"apple_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The OpenID Connect Client ID for the Apple web application.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for Apple Login.","computed":true},"login_scopes":{"type":"TypeList","description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of Apple Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","computed":true,"elem":{"type":"TypeString"}}}}},"auth_enabled":{"type":"TypeBool","description":"Is the AuthV2 Settings be enabled.","computed":true},"azure_static_web_app_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The ID of the Client used to authenticate with Azure Static Web App Authentication.","computed":true}}}},"config_file_path":{"type":"TypeString","description":"The path to the App Auth settings.","computed":true},"custom_oidc_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"authorisation_endpoint":{"type":"TypeString","description":"The endpoint to make the Authorisation Request.","computed":true},"certification_uri":{"type":"TypeString","description":"The endpoint that provides the keys necessary to validate the token.","computed":true},"client_credential_method":{"type":"TypeString","description":"The Client Credential Method used. Currently the only supported value is `ClientSecretPost`","computed":true},"client_id":{"type":"TypeString","description":"The ID of the Client used to authenticate with this Custom OIDC.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the secret for this Custom OIDC Client.","computed":true},"issuer_endpoint":{"type":"TypeString","description":"The endpoint that issued the Token.","computed":true},"name":{"type":"TypeString","description":"The name of the Custom OIDC Authentication Provider.","computed":true},"name_claim_type":{"type":"TypeString","description":"The name of the claim that contains the users name.","computed":true},"openid_configuration_endpoint":{"type":"TypeString","description":"The endpoint that contains all the configuration endpoints for this Custom OIDC provider.","computed":true},"scopes":{"type":"TypeList","description":"The list of the scopes that should be requested while authenticating.","computed":true,"elem":{"type":"TypeString"}},"token_endpoint":{"type":"TypeString","description":"The endpoint used to request a Token.","computed":true}}}},"default_provider":{"type":"TypeString","description":"The Default Authentication Provider used when the `unauthenticated_action` is set to `RedirectToLoginPage`.","computed":true},"excluded_paths":{"type":"TypeList","description":"The paths which are excluded from the `unauthenticated_action` when it is set to `RedirectToLoginPage`.","computed":true,"elem":{"type":"TypeString"}},"facebook_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"app_id":{"type":"TypeString","description":"The App ID of the Facebook app used for login.","computed":true},"app_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `app_secret` value used for Facebook Login.","computed":true},"graph_api_version":{"type":"TypeString","description":"The version of the Facebook API to be used while logging in.","computed":true},"login_scopes":{"type":"TypeList","description":"Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"forward_proxy_convention":{"type":"TypeString","description":"The convention used to determine the url of the request made.","computed":true},"forward_proxy_custom_host_header_name":{"type":"TypeString","description":"The name of the header containing the host of the request.","computed":true},"forward_proxy_custom_scheme_header_name":{"type":"TypeString","description":"The name of the header containing the scheme of the request.","computed":true},"github_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The ID of the GitHub app used for login.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for GitHub Login.","computed":true},"login_scopes":{"type":"TypeList","description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"google_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","description":"Specifies a list of Allowed Audiences that will be requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The OpenID Connect Client ID for the Google web application.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for Google Login.","computed":true},"login_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","computed":true,"elem":{"type":"TypeString"}}}}},"http_route_api_prefix":{"type":"TypeString","description":"The prefix that precedes all the authentication and authorisation paths.","computed":true},"login":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_external_redirect_urls":{"type":"TypeList","description":"External URLs that can be redirected to as part of logging in or logging out of the app. This is an advanced setting typically only needed by Windows Store application backends. **Note:** URLs within the current domain are always implicitly allowed.","computed":true,"elem":{"type":"TypeString"}},"cookie_expiration_convention":{"type":"TypeString","computed":true},"cookie_expiration_time":{"type":"TypeString","description":"The time after the request is made when the session cookie will expire.","computed":true},"logout_endpoint":{"type":"TypeString","description":"The endpoint to which logout requests are made.","computed":true},"nonce_expiration_time":{"type":"TypeString","description":"The time after the request is made when the nonce will expire.","computed":true},"preserve_url_fragments_for_logins":{"type":"TypeBool","description":"Are the fragments from the request be preserved after the login request is made.","computed":true},"token_refresh_extension_time":{"type":"TypeFloat","description":"The number of hours after session token expiration that a session token can be used to call the token refresh API.","computed":true},"token_store_enabled":{"type":"TypeBool","description":"Is the Token Store configuration Enabled.","computed":true},"token_store_path":{"type":"TypeString","description":"The directory path in the App Filesystem in which the tokens are stored.","computed":true},"token_store_sas_setting_name":{"type":"TypeString","description":"The name of the app setting which contains the SAS URL of the blob storage containing the tokens.","computed":true},"validate_nonce":{"type":"TypeBool","description":"Is the nonce be validated while completing the login flow.","computed":true}}}},"microsoft_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","description":"Specifies a list of Allowed Audiences that will be requested as part of Microsoft Sign-In authentication.","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The OAuth 2.0 client ID that was created for the app used for authentication.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication.","computed":true},"login_scopes":{"type":"TypeList","description":"The list of Login scopes that will be requested as part of Microsoft Account authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"require_authentication":{"type":"TypeBool","description":"Is the authentication flow used for all requests.","computed":true},"require_https":{"type":"TypeBool","description":"Is HTTPS required on connections?","computed":true},"runtime_version":{"type":"TypeString","description":"The Runtime Version of the Authentication and Authorisation feature of this App.","computed":true},"twitter_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in.","computed":true},"consumer_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in.","computed":true}}}},"unauthenticated_action":{"type":"TypeString","computed":true}}}},"availability":{"type":"TypeString","computed":true},"backup":{"type":"TypeList","computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","description":"Is this backup job enabled?","computed":true},"name":{"type":"TypeString","description":"The name of this Backup.","computed":true},"schedule":{"type":"TypeList","computed":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","description":"How often the backup should is executed in multiples of the `frequency_unit`.","computed":true},"frequency_unit":{"type":"TypeString","description":"The unit of time for how often the backup takes place.","computed":true},"keep_at_least_one_backup":{"type":"TypeBool","description":"Does the service keep at least one backup, regardless of age of backup.","computed":true},"last_execution_time":{"type":"TypeString","description":"The time the backup was last attempted.","computed":true},"retention_period_days":{"type":"TypeInt","description":"After how many days are backups deleted.","computed":true},"start_time":{"type":"TypeString","description":"When the schedule should start working in RFC-3339 format.","computed":true}}}},"storage_account_url":{"type":"TypeString","description":"The SAS URL to the container.","computed":true}}}},"builtin_logging_enabled":{"type":"TypeBool","computed":true},"client_certificate_enabled":{"type":"TypeBool","computed":true},"client_certificate_exclusion_paths":{"type":"TypeString","description":"Paths to exclude when using client certificates, separated by ;","computed":true},"client_certificate_mode":{"type":"TypeString","computed":true},"connection_string":{"type":"TypeSet","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The name of this Connection.","computed":true},"type":{"type":"TypeString","description":"The type of database.","computed":true},"value":{"type":"TypeString","description":"The connection string value.","computed":true}}}},"content_share_force_disabled":{"type":"TypeBool","computed":true},"custom_domain_verification_id":{"type":"TypeString","computed":true},"daily_memory_time_quota":{"type":"TypeInt","computed":true},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","computed":true},"ftp_publish_basic_authentication_enabled":{"type":"TypeBool","computed":true},"functions_extension_version":{"type":"TypeString","computed":true},"hosting_environment_id":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"service_plan_id":{"type":"TypeString","computed":true},"site_config":{"type":"TypeList","computed":true,"elem":{"schema":{"always_on":{"type":"TypeBool","computed":true},"api_definition_url":{"type":"TypeString","computed":true},"api_management_api_id":{"type":"TypeString","computed":true},"app_command_line":{"type":"TypeString","computed":true},"app_scale_limit":{"type":"TypeInt","computed":true},"app_service_logs":{"type":"TypeList","computed":true,"elem":{"schema":{"disk_quota_mb":{"type":"TypeInt","computed":true},"retention_period_days":{"type":"TypeInt","computed":true}}}},"application_insights_connection_string":{"type":"TypeString","computed":true},"application_insights_key":{"type":"TypeString","computed":true},"application_stack":{"type":"TypeList","computed":true,"elem":{"schema":{"docker":{"type":"TypeList","computed":true,"elem":{"schema":{"image_name":{"type":"TypeString","computed":true},"image_tag":{"type":"TypeString","computed":true},"registry_password":{"type":"TypeString","computed":true},"registry_url":{"type":"TypeString","computed":true},"registry_username":{"type":"TypeString","computed":true}}}},"dotnet_version":{"type":"TypeString","computed":true},"java_version":{"type":"TypeString","computed":true},"node_version":{"type":"TypeString","computed":true},"powershell_core_version":{"type":"TypeString","computed":true},"python_version":{"type":"TypeString","computed":true},"use_custom_runtime":{"type":"TypeBool","computed":true},"use_dotnet_isolated_runtime":{"type":"TypeBool","computed":true}}}},"container_registry_managed_identity_client_id":{"type":"TypeString","computed":true},"container_registry_use_managed_identity":{"type":"TypeBool","computed":true},"cors":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeList","description":"The list of origins that are allowed to make cross-origin calls.","computed":true,"elem":{"type":"TypeString"}},"support_credentials":{"type":"TypeBool","description":"Are credentials allowed in CORS requests?","computed":true}}}},"default_documents":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"detailed_error_logging_enabled":{"type":"TypeBool","computed":true},"elastic_instance_minimum":{"type":"TypeInt","computed":true},"ftps_state":{"type":"TypeString","computed":true},"health_check_eviction_time_in_min":{"type":"TypeInt","computed":true},"health_check_path":{"type":"TypeString","computed":true},"http2_enabled":{"type":"TypeBool","computed":true},"ip_restriction":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","description":"The action to take.","computed":true},"description":{"type":"TypeString","description":"The description of the ip restriction rule.","computed":true},"headers":{"type":"TypeList","computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","description":"The list of Azure Front Door IDs.","computed":true,"elem":{"type":"TypeString"}},"x_fd_health_probe":{"type":"TypeList","description":"Specifies if a Front Door Health Probe is expected.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_for":{"type":"TypeList","description":"The list of addresses for which matching is applied.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_host":{"type":"TypeList","description":"The list of Hosts for which matching will be applied.","computed":true,"elem":{"type":"TypeString"}}}}},"ip_address":{"type":"TypeString","description":"The CIDR notation of the IP or IP Range to match.","computed":true},"name":{"type":"TypeString","description":"The name used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","description":"The priority value of this `ip_restriction`.","computed":true},"service_tag":{"type":"TypeString","description":"The Service Tag used for this IP Restriction.","computed":true},"virtual_network_subnet_id":{"type":"TypeString","description":"The Virtual Network Subnet ID used for this IP Restriction.","computed":true}}}},"ip_restriction_default_action":{"type":"TypeString","computed":true},"linux_fx_version":{"type":"TypeString","computed":true},"load_balancing_mode":{"type":"TypeString","computed":true},"managed_pipeline_mode":{"type":"TypeString","computed":true},"minimum_tls_version":{"type":"TypeString","computed":true},"pre_warmed_instance_count":{"type":"TypeInt","computed":true},"remote_debugging_enabled":{"type":"TypeBool","computed":true},"remote_debugging_version":{"type":"TypeString","computed":true},"runtime_scale_monitoring_enabled":{"type":"TypeBool","computed":true},"scm_ip_restriction":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","description":"The action to take.","computed":true},"description":{"type":"TypeString","description":"The description of the ip restriction rule.","computed":true},"headers":{"type":"TypeList","computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","description":"The list of Azure Front Door IDs.","computed":true,"elem":{"type":"TypeString"}},"x_fd_health_probe":{"type":"TypeList","description":"Specifies if a Front Door Health Probe is expected.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_for":{"type":"TypeList","description":"The list of addresses for which matching is applied.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_host":{"type":"TypeList","description":"The list of Hosts for which matching will be applied.","computed":true,"elem":{"type":"TypeString"}}}}},"ip_address":{"type":"TypeString","description":"The CIDR notation of the IP or IP Range to match.","computed":true},"name":{"type":"TypeString","description":"The name used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","description":"The priority value of this `ip_restriction`.","computed":true},"service_tag":{"type":"TypeString","description":"The Service Tag used for this IP Restriction.","computed":true},"virtual_network_subnet_id":{"type":"TypeString","description":"The Virtual Network Subnet ID used for this IP Restriction.","computed":true}}}},"scm_ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"TypeString","computed":true},"scm_type":{"type":"TypeString","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","computed":true},"use_32_bit_worker":{"type":"TypeBool","computed":true},"vnet_route_all_enabled":{"type":"TypeBool","computed":true},"websockets_enabled":{"type":"TypeBool","computed":true},"worker_count":{"type":"TypeInt","computed":true}}}},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The Site Credentials Username used for publishing.","computed":true},"password":{"type":"TypeString","description":"The Site Credentials Password used for publishing.","computed":true}}}},"sticky_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"app_setting_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"connection_string_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"storage_account_access_key":{"type":"TypeString","computed":true},"storage_account_name":{"type":"TypeString","computed":true},"storage_key_vault_secret_id":{"type":"TypeString","description":"The Key Vault Secret ID, including version, that contains the Connection String used to connect to the storage account for this Function App.","computed":true},"storage_uses_managed_identity":{"type":"TypeBool","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"usage":{"type":"TypeString","computed":true},"virtual_network_subnet_id":{"type":"TypeString","computed":true},"webdeploy_publish_basic_authentication_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"read":25}},"azurerm_linux_web_app":{"schema":{"app_metadata":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"app_settings":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"active_directory":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","description":"The list of Allowed audience values considered when validating JWTs issued by Azure Active Directory.","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The ID of the Client to use to authenticate with Azure Active Directory.","computed":true},"client_secret":{"type":"TypeString","description":"The Client Secret for the Client ID.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the client secret of the Client.","computed":true}}}},"additional_login_parameters":{"type":"TypeMap","description":"The map of Login Parameters sent to the OpenID Connect authorization endpoint when a user logs in.","computed":true,"elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","description":"Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","description":"The default authentication provider used when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`.","computed":true},"enabled":{"type":"TypeBool","description":"Is the Authentication / Authorization feature enabled?","computed":true},"facebook":{"type":"TypeList","computed":true,"elem":{"schema":{"app_id":{"type":"TypeString","description":"The App ID of the Facebook app used for login.","computed":true},"app_secret":{"type":"TypeString","description":"The App Secret of the Facebook app used for Facebook Login.","computed":true},"app_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `app_secret` value used for Facebook Login.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of Facebook Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"github":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The ID of the GitHub app used for login.","computed":true},"client_secret":{"type":"TypeString","description":"The Client Secret of the GitHub app used for GitHub Login.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for GitHub Login.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of GitHub Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"google":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The OpenID Connect Client ID for the Google web application.","computed":true},"client_secret":{"type":"TypeString","description":"The client secret associated with the Google web application.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for Google Login.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes that requested as part of Google Sign-In authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"issuer":{"type":"TypeString","description":"The OpenID Connect Issuer URI that represents the entity which issues access tokens.","computed":true},"microsoft":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The OAuth 2.0 client ID that was created for the app used for authentication.","computed":true},"client_secret":{"type":"TypeString","description":"The OAuth 2.0 client secret that was created for the app used for authentication.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of Microsoft Account authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"runtime_version":{"type":"TypeString","description":"The RuntimeVersion of the Authentication / Authorization feature in use.","computed":true},"token_refresh_extension_hours":{"type":"TypeFloat","description":"The number of hours after session token expiration that a session token can be used to call the token refresh API.","computed":true},"token_store_enabled":{"type":"TypeBool","description":"Are platform-specific security tokens that are obtained during login flows durably stored?","computed":true},"twitter":{"type":"TypeList","computed":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in.","computed":true},"consumer_secret":{"type":"TypeString","description":"The OAuth 1.0a consumer secret of the Twitter application used for sign-in.","computed":true},"consumer_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in.","computed":true}}}},"unauthenticated_client_action":{"type":"TypeString","description":"The action taken when an unauthenticated client attempts to access the app.","computed":true}}}},"auth_settings_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"active_directory_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_applications":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allowed_audiences":{"type":"TypeList","description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","computed":true,"elem":{"type":"TypeString"}},"allowed_groups":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allowed_identities":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The ID of the Client to use to authenticate with Azure Active Directory.","computed":true},"client_secret_certificate_thumbprint":{"type":"TypeString","description":"The thumbprint of the certificate used for signing purposes.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the client secret of the Client.","computed":true},"jwt_allowed_client_applications":{"type":"TypeList","description":"A list of Allowed Client Applications in the JWT Claim.","computed":true,"elem":{"type":"TypeString"}},"jwt_allowed_groups":{"type":"TypeList","description":"A list of Allowed Groups in the JWT Claim.","computed":true,"elem":{"type":"TypeString"}},"login_parameters":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tenant_auth_endpoint":{"type":"TypeString","description":"The Azure Tenant URI for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`","computed":true},"www_authentication_disabled":{"type":"TypeBool","description":"Is the www-authenticate provider omitted from the request?","computed":true}}}},"apple_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The OpenID Connect Client ID for the Apple web application.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for Apple Login.","computed":true},"login_scopes":{"type":"TypeList","description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of Apple Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","computed":true,"elem":{"type":"TypeString"}}}}},"auth_enabled":{"type":"TypeBool","description":"Is the AuthV2 Settings be enabled.","computed":true},"azure_static_web_app_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The ID of the Client used to authenticate with Azure Static Web App Authentication.","computed":true}}}},"config_file_path":{"type":"TypeString","description":"The path to the App Auth settings.","computed":true},"custom_oidc_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"authorisation_endpoint":{"type":"TypeString","description":"The endpoint to make the Authorisation Request.","computed":true},"certification_uri":{"type":"TypeString","description":"The endpoint that provides the keys necessary to validate the token.","computed":true},"client_credential_method":{"type":"TypeString","description":"The Client Credential Method used. Currently the only supported value is `ClientSecretPost`","computed":true},"client_id":{"type":"TypeString","description":"The ID of the Client used to authenticate with this Custom OIDC.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the secret for this Custom OIDC Client.","computed":true},"issuer_endpoint":{"type":"TypeString","description":"The endpoint that issued the Token.","computed":true},"name":{"type":"TypeString","description":"The name of the Custom OIDC Authentication Provider.","computed":true},"name_claim_type":{"type":"TypeString","description":"The name of the claim that contains the users name.","computed":true},"openid_configuration_endpoint":{"type":"TypeString","description":"The endpoint that contains all the configuration endpoints for this Custom OIDC provider.","computed":true},"scopes":{"type":"TypeList","description":"The list of the scopes that should be requested while authenticating.","computed":true,"elem":{"type":"TypeString"}},"token_endpoint":{"type":"TypeString","description":"The endpoint used to request a Token.","computed":true}}}},"default_provider":{"type":"TypeString","description":"The Default Authentication Provider used when the `unauthenticated_action` is set to `RedirectToLoginPage`.","computed":true},"excluded_paths":{"type":"TypeList","description":"The paths which are excluded from the `unauthenticated_action` when it is set to `RedirectToLoginPage`.","computed":true,"elem":{"type":"TypeString"}},"facebook_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"app_id":{"type":"TypeString","description":"The App ID of the Facebook app used for login.","computed":true},"app_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `app_secret` value used for Facebook Login.","computed":true},"graph_api_version":{"type":"TypeString","description":"The version of the Facebook API to be used while logging in.","computed":true},"login_scopes":{"type":"TypeList","description":"Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"forward_proxy_convention":{"type":"TypeString","description":"The convention used to determine the url of the request made.","computed":true},"forward_proxy_custom_host_header_name":{"type":"TypeString","description":"The name of the header containing the host of the request.","computed":true},"forward_proxy_custom_scheme_header_name":{"type":"TypeString","description":"The name of the header containing the scheme of the request.","computed":true},"github_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The ID of the GitHub app used for login.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for GitHub Login.","computed":true},"login_scopes":{"type":"TypeList","description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"google_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","description":"Specifies a list of Allowed Audiences that will be requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The OpenID Connect Client ID for the Google web application.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for Google Login.","computed":true},"login_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","computed":true,"elem":{"type":"TypeString"}}}}},"http_route_api_prefix":{"type":"TypeString","description":"The prefix that precedes all the authentication and authorisation paths.","computed":true},"login":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_external_redirect_urls":{"type":"TypeList","description":"External URLs that can be redirected to as part of logging in or logging out of the app. This is an advanced setting typically only needed by Windows Store application backends. **Note:** URLs within the current domain are always implicitly allowed.","computed":true,"elem":{"type":"TypeString"}},"cookie_expiration_convention":{"type":"TypeString","computed":true},"cookie_expiration_time":{"type":"TypeString","description":"The time after the request is made when the session cookie will expire.","computed":true},"logout_endpoint":{"type":"TypeString","description":"The endpoint to which logout requests are made.","computed":true},"nonce_expiration_time":{"type":"TypeString","description":"The time after the request is made when the nonce will expire.","computed":true},"preserve_url_fragments_for_logins":{"type":"TypeBool","description":"Are the fragments from the request be preserved after the login request is made.","computed":true},"token_refresh_extension_time":{"type":"TypeFloat","description":"The number of hours after session token expiration that a session token can be used to call the token refresh API.","computed":true},"token_store_enabled":{"type":"TypeBool","description":"Is the Token Store configuration Enabled.","computed":true},"token_store_path":{"type":"TypeString","description":"The directory path in the App Filesystem in which the tokens are stored.","computed":true},"token_store_sas_setting_name":{"type":"TypeString","description":"The name of the app setting which contains the SAS URL of the blob storage containing the tokens.","computed":true},"validate_nonce":{"type":"TypeBool","description":"Is the nonce be validated while completing the login flow.","computed":true}}}},"microsoft_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","description":"Specifies a list of Allowed Audiences that will be requested as part of Microsoft Sign-In authentication.","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The OAuth 2.0 client ID that was created for the app used for authentication.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication.","computed":true},"login_scopes":{"type":"TypeList","description":"The list of Login scopes that will be requested as part of Microsoft Account authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"require_authentication":{"type":"TypeBool","description":"Is the authentication flow used for all requests.","computed":true},"require_https":{"type":"TypeBool","description":"Is HTTPS required on connections?","computed":true},"runtime_version":{"type":"TypeString","description":"The Runtime Version of the Authentication and Authorisation feature of this App.","computed":true},"twitter_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in.","computed":true},"consumer_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in.","computed":true}}}},"unauthenticated_action":{"type":"TypeString","computed":true}}}},"availability":{"type":"TypeString","computed":true},"backup":{"type":"TypeList","computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","description":"Is this backup job enabled?","computed":true},"name":{"type":"TypeString","description":"The name of this Backup.","computed":true},"schedule":{"type":"TypeList","computed":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","description":"How often the backup should is executed in multiples of the `frequency_unit`.","computed":true},"frequency_unit":{"type":"TypeString","description":"The unit of time for how often the backup takes place.","computed":true},"keep_at_least_one_backup":{"type":"TypeBool","description":"Does the service keep at least one backup, regardless of age of backup.","computed":true},"last_execution_time":{"type":"TypeString","description":"The time the backup was last attempted.","computed":true},"retention_period_days":{"type":"TypeInt","description":"After how many days are backups deleted.","computed":true},"start_time":{"type":"TypeString","description":"When the schedule should start working in RFC-3339 format.","computed":true}}}},"storage_account_url":{"type":"TypeString","description":"The SAS URL to the container.","computed":true}}}},"client_affinity_enabled":{"type":"TypeBool","computed":true},"client_certificate_enabled":{"type":"TypeBool","computed":true},"client_certificate_exclusion_paths":{"type":"TypeString","description":"Paths to exclude when using client certificates, separated by ;","computed":true},"client_certificate_mode":{"type":"TypeString","computed":true},"connection_string":{"type":"TypeSet","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The name of this Connection.","computed":true},"type":{"type":"TypeString","description":"The type of database.","computed":true},"value":{"type":"TypeString","description":"The connection string value.","computed":true}}}},"custom_domain_verification_id":{"type":"TypeString","computed":true},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","computed":true},"ftp_publish_basic_authentication_enabled":{"type":"TypeBool","computed":true},"hosting_environment_id":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"key_vault_reference_identity_id":{"type":"TypeString","computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"logs":{"type":"TypeList","computed":true,"elem":{"schema":{"application_logs":{"type":"TypeList","computed":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","computed":true,"elem":{"schema":{"level":{"type":"TypeString","computed":true},"retention_in_days":{"type":"TypeInt","computed":true},"sas_url":{"type":"TypeString","computed":true}}}},"file_system_level":{"type":"TypeString","computed":true}}}},"detailed_error_messages":{"type":"TypeBool","computed":true},"failed_request_tracing":{"type":"TypeBool","computed":true},"http_logs":{"type":"TypeList","computed":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","computed":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","computed":true},"sas_url":{"type":"TypeString","computed":true}}}},"file_system":{"type":"TypeList","computed":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","computed":true},"retention_in_mb":{"type":"TypeInt","computed":true}}}}}}}}}},"name":{"type":"TypeString","required":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"service_plan_id":{"type":"TypeString","computed":true},"site_config":{"type":"TypeList","computed":true,"elem":{"schema":{"always_on":{"type":"TypeBool","computed":true},"api_definition_url":{"type":"TypeString","computed":true},"api_management_api_id":{"type":"TypeString","computed":true},"app_command_line":{"type":"TypeString","computed":true},"application_stack":{"type":"TypeList","computed":true,"elem":{"schema":{"docker_image_name":{"type":"TypeString","computed":true},"docker_registry_password":{"type":"TypeString","computed":true},"docker_registry_url":{"type":"TypeString","computed":true},"docker_registry_username":{"type":"TypeString","computed":true},"dotnet_version":{"type":"TypeString","computed":true},"go_version":{"type":"TypeString","computed":true},"java_server":{"type":"TypeString","computed":true},"java_server_version":{"type":"TypeString","computed":true},"java_version":{"type":"TypeString","computed":true},"node_version":{"type":"TypeString","computed":true},"php_version":{"type":"TypeString","computed":true},"python_version":{"type":"TypeString","computed":true},"ruby_version":{"type":"TypeString","computed":true}}}},"auto_heal_enabled":{"type":"TypeBool","computed":true},"auto_heal_setting":{"type":"TypeList","computed":true,"elem":{"schema":{"action":{"type":"TypeList","computed":true,"elem":{"schema":{"action_type":{"type":"TypeString","computed":true},"minimum_process_execution_time":{"type":"TypeString","computed":true}}}},"trigger":{"type":"TypeList","computed":true,"elem":{"schema":{"requests":{"type":"TypeList","computed":true,"elem":{"schema":{"count":{"type":"TypeInt","computed":true},"interval":{"type":"TypeString","computed":true}}}},"slow_request":{"type":"TypeList","computed":true,"elem":{"schema":{"count":{"type":"TypeInt","computed":true},"interval":{"type":"TypeString","computed":true},"path":{"type":"TypeString","computed":true},"time_taken":{"type":"TypeString","computed":true}}}},"slow_request_with_path":{"type":"TypeList","computed":true,"elem":{"schema":{"count":{"type":"TypeInt","computed":true},"interval":{"type":"TypeString","computed":true},"path":{"type":"TypeString","computed":true},"time_taken":{"type":"TypeString","computed":true}}}},"status_code":{"type":"TypeList","computed":true,"elem":{"schema":{"count":{"type":"TypeInt","computed":true},"interval":{"type":"TypeString","computed":true},"path":{"type":"TypeString","computed":true},"status_code_range":{"type":"TypeString","computed":true},"sub_status":{"type":"TypeInt","computed":true},"win32_status_code":{"type":"TypeInt","computed":true}}}}}}}}}},"container_registry_managed_identity_client_id":{"type":"TypeString","computed":true},"container_registry_use_managed_identity":{"type":"TypeBool","computed":true},"cors":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeList","description":"The list of origins that are allowed to make cross-origin calls.","computed":true,"elem":{"type":"TypeString"}},"support_credentials":{"type":"TypeBool","description":"Are credentials allowed in CORS requests?","computed":true}}}},"default_documents":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"detailed_error_logging_enabled":{"type":"TypeBool","computed":true},"ftps_state":{"type":"TypeString","computed":true},"health_check_eviction_time_in_min":{"type":"TypeInt","computed":true},"health_check_path":{"type":"TypeString","computed":true},"http2_enabled":{"type":"TypeBool","computed":true},"ip_restriction":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","description":"The action to take.","computed":true},"description":{"type":"TypeString","description":"The description of the ip restriction rule.","computed":true},"headers":{"type":"TypeList","computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","description":"The list of Azure Front Door IDs.","computed":true,"elem":{"type":"TypeString"}},"x_fd_health_probe":{"type":"TypeList","description":"Specifies if a Front Door Health Probe is expected.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_for":{"type":"TypeList","description":"The list of addresses for which matching is applied.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_host":{"type":"TypeList","description":"The list of Hosts for which matching will be applied.","computed":true,"elem":{"type":"TypeString"}}}}},"ip_address":{"type":"TypeString","description":"The CIDR notation of the IP or IP Range to match.","computed":true},"name":{"type":"TypeString","description":"The name used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","description":"The priority value of this `ip_restriction`.","computed":true},"service_tag":{"type":"TypeString","description":"The Service Tag used for this IP Restriction.","computed":true},"virtual_network_subnet_id":{"type":"TypeString","description":"The Virtual Network Subnet ID used for this IP Restriction.","computed":true}}}},"ip_restriction_default_action":{"type":"TypeString","computed":true},"linux_fx_version":{"type":"TypeString","computed":true},"load_balancing_mode":{"type":"TypeString","computed":true},"local_mysql_enabled":{"type":"TypeBool","computed":true},"managed_pipeline_mode":{"type":"TypeString","computed":true},"minimum_tls_version":{"type":"TypeString","computed":true},"remote_debugging_enabled":{"type":"TypeBool","computed":true},"remote_debugging_version":{"type":"TypeString","computed":true},"scm_ip_restriction":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","description":"The action to take.","computed":true},"description":{"type":"TypeString","description":"The description of the ip restriction rule.","computed":true},"headers":{"type":"TypeList","computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","description":"The list of Azure Front Door IDs.","computed":true,"elem":{"type":"TypeString"}},"x_fd_health_probe":{"type":"TypeList","description":"Specifies if a Front Door Health Probe is expected.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_for":{"type":"TypeList","description":"The list of addresses for which matching is applied.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_host":{"type":"TypeList","description":"The list of Hosts for which matching will be applied.","computed":true,"elem":{"type":"TypeString"}}}}},"ip_address":{"type":"TypeString","description":"The CIDR notation of the IP or IP Range to match.","computed":true},"name":{"type":"TypeString","description":"The name used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","description":"The priority value of this `ip_restriction`.","computed":true},"service_tag":{"type":"TypeString","description":"The Service Tag used for this IP Restriction.","computed":true},"virtual_network_subnet_id":{"type":"TypeString","description":"The Virtual Network Subnet ID used for this IP Restriction.","computed":true}}}},"scm_ip_restriction_default_action":{"type":"TypeString","computed":true},"scm_minimum_tls_version":{"type":"TypeString","computed":true},"scm_type":{"type":"TypeString","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","computed":true},"use_32_bit_worker":{"type":"TypeBool","computed":true},"vnet_route_all_enabled":{"type":"TypeBool","computed":true},"websockets_enabled":{"type":"TypeBool","computed":true},"worker_count":{"type":"TypeInt","computed":true}}}},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The Site Credentials Username used for publishing.","computed":true},"password":{"type":"TypeString","description":"The Site Credentials Password used for publishing.","computed":true}}}},"sticky_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"app_setting_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"connection_string_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"storage_account":{"type":"TypeList","computed":true,"elem":{"schema":{"access_key":{"type":"TypeString","computed":true},"account_name":{"type":"TypeString","computed":true},"mount_path":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"share_name":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"usage":{"type":"TypeString","computed":true},"virtual_network_subnet_id":{"type":"TypeString","computed":true},"webdeploy_publish_basic_authentication_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_load_test":{"schema":{"data_plane_uri":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"encryption":{"type":"TypeList","computed":true,"elem":{"schema":{"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"key_url":{"type":"TypeString","computed":true}}}},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_local_network_gateway":{"schema":{"address_space":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"bgp_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"asn":{"type":"TypeInt","required":true},"bgp_peering_address":{"type":"TypeString","required":true},"peer_weight":{"type":"TypeInt","computed":true}}}},"gateway_address":{"type":"TypeString","computed":true},"gateway_fqdn":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_location":{"schema":{"display_name":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true},"zone_mappings":{"type":"TypeList","computed":true,"elem":{"schema":{"logical_zone":{"type":"TypeString","computed":true},"physical_zone":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_log_analytics_workspace":{"schema":{"daily_quota_gb":{"type":"TypeFloat","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"primary_shared_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"retention_in_days":{"type":"TypeInt","computed":true},"secondary_shared_key":{"type":"TypeString","computed":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_logic_app_integration_account":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_logic_app_standard":{"schema":{"app_service_plan_id":{"type":"TypeString","computed":true},"app_settings":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"bundle_version":{"type":"TypeString","computed":true},"client_affinity_enabled":{"type":"TypeBool","computed":true},"client_certificate_mode":{"type":"TypeString","computed":true},"connection_string":{"type":"TypeSet","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"custom_domain_verification_id":{"type":"TypeString","computed":true},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","computed":true},"https_only":{"type":"TypeBool","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"site_config":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"always_on":{"type":"TypeBool","optional":true,"default":false},"app_scale_limit":{"type":"TypeInt","optional":true,"computed":true},"auto_swap_slot_name":{"type":"TypeString","computed":true},"cors":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"support_credentials":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"dotnet_framework_version":{"type":"TypeString","optional":true,"default":"v4.0"},"elastic_instance_minimum":{"type":"TypeInt","optional":true,"computed":true},"ftps_state":{"type":"TypeString","optional":true,"computed":true},"health_check_path":{"type":"TypeString","optional":true},"http2_enabled":{"type":"TypeBool","optional":true,"default":false},"ip_restriction":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000},"service_tag":{"type":"TypeString","optional":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true}}}},"linux_fx_version":{"type":"TypeString","optional":true,"computed":true},"min_tls_version":{"type":"TypeString","optional":true,"computed":true},"pre_warmed_instance_count":{"type":"TypeInt","optional":true,"computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"runtime_scale_monitoring_enabled":{"type":"TypeBool","optional":true,"default":false},"scm_ip_restriction":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000},"service_tag":{"type":"TypeString","optional":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true}}}},"scm_min_tls_version":{"type":"TypeString","optional":true,"computed":true},"scm_type":{"type":"TypeString","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"TypeBool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"computed":true},"websockets_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"storage_account_access_key":{"type":"TypeString","computed":true},"storage_account_name":{"type":"TypeString","computed":true},"storage_account_share_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"use_extension_bundle":{"type":"TypeBool","computed":true},"version":{"type":"TypeString","computed":true},"virtual_network_subnet_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_logic_app_workflow":{"schema":{"access_endpoint":{"type":"TypeString","computed":true},"connector_endpoint_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"connector_outbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"logic_app_integration_account_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"workflow_endpoint_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"workflow_outbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"workflow_schema":{"type":"TypeString","computed":true},"workflow_version":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_machine_learning_workspace":{"schema":{"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_maintenance_configuration":{"schema":{"in_guest_user_patch_mode":{"type":"TypeString","computed":true},"install_patches":{"type":"TypeList","computed":true,"elem":{"schema":{"linux":{"type":"TypeList","computed":true,"elem":{"schema":{"classifications_to_include":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"package_names_mask_to_exclude":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"package_names_mask_to_include":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"reboot":{"type":"TypeString","computed":true},"windows":{"type":"TypeList","computed":true,"elem":{"schema":{"classifications_to_include":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"kb_numbers_to_exclude":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"kb_numbers_to_include":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"properties":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"scope":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"visibility":{"type":"TypeString","computed":true},"window":{"type":"TypeList","computed":true,"elem":{"schema":{"duration":{"type":"TypeString","computed":true},"expiration_date_time":{"type":"TypeString","computed":true},"recur_every":{"type":"TypeString","computed":true},"start_date_time":{"type":"TypeString","computed":true},"time_zone":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_managed_api":{"schema":{"location":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_managed_application_definition":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_managed_disk":{"schema":{"create_option":{"type":"TypeString","computed":true},"disk_access_id":{"type":"TypeString","computed":true},"disk_encryption_set_id":{"type":"TypeString","computed":true},"disk_iops_read_write":{"type":"TypeInt","computed":true},"disk_mbps_read_write":{"type":"TypeInt","computed":true},"disk_size_gb":{"type":"TypeInt","computed":true},"encryption_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"disk_encryption_key":{"type":"TypeList","computed":true,"elem":{"schema":{"secret_url":{"type":"TypeString","computed":true},"source_vault_id":{"type":"TypeString","computed":true}}}},"enabled":{"type":"TypeBool","computed":true},"key_encryption_key":{"type":"TypeList","computed":true,"elem":{"schema":{"key_url":{"type":"TypeString","computed":true},"source_vault_id":{"type":"TypeString","computed":true}}}}}}},"image_reference_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"network_access_policy":{"type":"TypeString","computed":true},"os_type":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"source_resource_id":{"type":"TypeString","computed":true},"source_uri":{"type":"TypeString","computed":true},"storage_account_id":{"type":"TypeString","computed":true},"storage_account_type":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_management_group":{"schema":{"all_management_group_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"all_subscription_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"display_name":{"type":"TypeString","optional":true,"computed":true},"management_group_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","optional":true,"computed":true},"parent_management_group_id":{"type":"TypeString","computed":true},"subscription_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"tenant_scoped_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_management_group_template_deployment":{"schema":{"management_group_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"output_content":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_maps_account":{"schema":{"name":{"type":"TypeString","required":true},"primary_access_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_access_key":{"type":"TypeString","computed":true},"sku_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"x_ms_client_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_marketplace_agreement":{"schema":{"license_text_link":{"type":"TypeString","computed":true},"offer":{"type":"TypeString","required":true},"plan":{"type":"TypeString","required":true},"privacy_policy_link":{"type":"TypeString","computed":true},"publisher":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_mobile_network":{"schema":{"location":{"type":"TypeString","computed":true},"mobile_country_code":{"type":"TypeString","computed":true},"mobile_network_code":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_key":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_mobile_network_attached_data_network":{"schema":{"dns_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","computed":true},"mobile_network_data_network_name":{"type":"TypeString","required":true},"mobile_network_packet_core_data_plane_id":{"type":"TypeString","required":true},"network_address_port_translation":{"type":"TypeList","computed":true,"elem":{"schema":{"icmp_pinhole_timeout_in_seconds":{"type":"TypeInt","computed":true},"pinhole_maximum_number":{"type":"TypeInt","optional":true},"port_range":{"type":"TypeList","computed":true,"elem":{"schema":{"maximum":{"type":"TypeInt","computed":true},"minimum":{"type":"TypeInt","computed":true}}}},"tcp_pinhole_timeout_in_seconds":{"type":"TypeInt","computed":true},"tcp_port_reuse_minimum_hold_time_in_seconds":{"type":"TypeInt","computed":true},"udp_pinhole_timeout_in_seconds":{"type":"TypeInt","computed":true},"udp_port_reuse_minimum_hold_time_in_seconds":{"type":"TypeInt","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"user_equipment_address_pool_prefixes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"user_equipment_static_address_pool_prefixes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"user_plane_access_ipv4_address":{"type":"TypeString","computed":true},"user_plane_access_ipv4_gateway":{"type":"TypeString","computed":true},"user_plane_access_ipv4_subnet":{"type":"TypeString","computed":true},"user_plane_access_name":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_mobile_network_data_network":{"schema":{"description":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"mobile_network_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_mobile_network_packet_core_control_plane":{"schema":{"control_plane_access_ipv4_address":{"type":"TypeString","computed":true},"control_plane_access_ipv4_gateway":{"type":"TypeString","computed":true},"control_plane_access_ipv4_subnet":{"type":"TypeString","computed":true},"control_plane_access_name":{"type":"TypeString","computed":true},"core_network_technology":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true}}}},"interoperability_settings_json":{"type":"TypeString","computed":true},"local_diagnostics_access":{"type":"TypeList","computed":true,"elem":{"schema":{"authentication_type":{"type":"TypeString","computed":true},"https_server_certificate_url":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"platform":{"type":"TypeList","computed":true,"elem":{"schema":{"arc_kubernetes_cluster_id":{"type":"TypeString","computed":true},"custom_location_id":{"type":"TypeString","computed":true},"edge_device_id":{"type":"TypeString","computed":true},"stack_hci_cluster_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"site_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"sku":{"type":"TypeString","computed":true},"software_version":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"user_equipment_mtu_in_bytes":{"type":"TypeInt","computed":true}},"timeouts":{"read":5}},"azurerm_mobile_network_packet_core_data_plane":{"schema":{"location":{"type":"TypeString","computed":true},"mobile_network_packet_core_control_plane_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"user_plane_access_ipv4_address":{"type":"TypeString","computed":true},"user_plane_access_ipv4_gateway":{"type":"TypeString","computed":true},"user_plane_access_ipv4_subnet":{"type":"TypeString","computed":true},"user_plane_access_name":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_mobile_network_service":{"schema":{"location":{"type":"TypeString","computed":true},"mobile_network_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"pcc_rule":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"precedence":{"type":"TypeInt","computed":true},"qos_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"allocation_and_retention_priority_level":{"type":"TypeInt","computed":true},"guaranteed_bit_rate":{"type":"TypeList","computed":true,"elem":{"schema":{"downlink":{"type":"TypeString","computed":true},"uplink":{"type":"TypeString","computed":true}}}},"maximum_bit_rate":{"type":"TypeList","computed":true,"elem":{"schema":{"downlink":{"type":"TypeString","computed":true},"uplink":{"type":"TypeString","computed":true}}}},"preemption_capability":{"type":"TypeString","computed":true},"preemption_vulnerability":{"type":"TypeString","computed":true},"qos_indicator":{"type":"TypeInt","computed":true}}}},"service_data_flow_template":{"type":"TypeList","computed":true,"elem":{"schema":{"direction":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"ports":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"protocol":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"remote_ip_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"traffic_control_enabled":{"type":"TypeBool","computed":true}}}},"service_precedence":{"type":"TypeInt","computed":true},"service_qos_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"allocation_and_retention_priority_level":{"type":"TypeInt","computed":true},"maximum_bit_rate":{"type":"TypeList","computed":true,"elem":{"schema":{"downlink":{"type":"TypeString","computed":true},"uplink":{"type":"TypeString","computed":true}}}},"preemption_capability":{"type":"TypeString","computed":true},"preemption_vulnerability":{"type":"TypeString","computed":true},"qos_indicator":{"type":"TypeInt","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_mobile_network_sim":{"schema":{"device_type":{"type":"TypeString","computed":true},"integrated_circuit_card_identifier":{"type":"TypeString","computed":true},"international_mobile_subscriber_identity":{"type":"TypeString","computed":true},"mobile_network_sim_group_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"sim_policy_id":{"type":"TypeString","computed":true},"sim_state":{"type":"TypeString","computed":true},"static_ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"attached_data_network_id":{"type":"TypeString","computed":true},"slice_id":{"type":"TypeString","computed":true},"static_ipv4_address":{"type":"TypeString","computed":true}}}},"vendor_key_fingerprint":{"type":"TypeString","computed":true},"vendor_name":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_mobile_network_sim_group":{"schema":{"encryption_key_url":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"mobile_network_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_mobile_network_sim_policy":{"schema":{"default_slice_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"mobile_network_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"rat_frequency_selection_priority_index":{"type":"TypeInt","computed":true},"registration_timer_in_seconds":{"type":"TypeInt","computed":true},"slice":{"type":"TypeList","computed":true,"elem":{"schema":{"data_network":{"type":"TypeList","computed":true,"elem":{"schema":{"additional_allowed_session_types":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allocation_and_retention_priority_level":{"type":"TypeInt","computed":true},"allowed_services_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"data_network_id":{"type":"TypeString","computed":true},"default_session_type":{"type":"TypeString","computed":true},"max_buffered_packets":{"type":"TypeInt","computed":true},"preemption_capability":{"type":"TypeString","computed":true},"preemption_vulnerability":{"type":"TypeString","computed":true},"qos_indicator":{"type":"TypeInt","computed":true},"session_aggregate_maximum_bit_rate":{"type":"TypeList","computed":true,"elem":{"schema":{"downlink":{"type":"TypeString","computed":true},"uplink":{"type":"TypeString","computed":true}}}}}}},"default_data_network_id":{"type":"TypeString","computed":true},"slice_id":{"type":"TypeString","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"user_equipment_aggregate_maximum_bit_rate":{"type":"TypeList","computed":true,"elem":{"schema":{"downlink":{"type":"TypeString","computed":true},"uplink":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_mobile_network_site":{"schema":{"location":{"type":"TypeString","computed":true},"mobile_network_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"network_function_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_mobile_network_slice":{"schema":{"description":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"mobile_network_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"single_network_slice_selection_assistance_information":{"type":"TypeList","computed":true,"elem":{"schema":{"slice_differentiator":{"type":"TypeString","computed":true},"slice_service_type":{"type":"TypeInt","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_monitor_action_group":{"schema":{"arm_role_receiver":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"role_id":{"type":"TypeString","computed":true},"use_common_alert_schema":{"type":"TypeBool","computed":true}}}},"automation_runbook_receiver":{"type":"TypeList","computed":true,"elem":{"schema":{"automation_account_id":{"type":"TypeString","computed":true},"is_global_runbook":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","computed":true},"runbook_name":{"type":"TypeString","computed":true},"service_uri":{"type":"TypeString","computed":true},"use_common_alert_schema":{"type":"TypeBool","computed":true},"webhook_resource_id":{"type":"TypeString","computed":true}}}},"azure_app_push_receiver":{"type":"TypeList","computed":true,"elem":{"schema":{"email_address":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"azure_function_receiver":{"type":"TypeList","computed":true,"elem":{"schema":{"function_app_resource_id":{"type":"TypeString","computed":true},"function_name":{"type":"TypeString","computed":true},"http_trigger_url":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"use_common_alert_schema":{"type":"TypeBool","computed":true}}}},"email_receiver":{"type":"TypeList","computed":true,"elem":{"schema":{"email_address":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"use_common_alert_schema":{"type":"TypeBool","computed":true}}}},"enabled":{"type":"TypeBool","computed":true},"event_hub_receiver":{"type":"TypeList","computed":true,"elem":{"schema":{"event_hub_name":{"type":"TypeString","required":true},"event_hub_namespace":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"subscription_id":{"type":"TypeString","optional":true,"computed":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true},"use_common_alert_schema":{"type":"TypeBool","optional":true}}}},"itsm_receiver":{"type":"TypeList","computed":true,"elem":{"schema":{"connection_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"region":{"type":"TypeString","computed":true},"ticket_configuration":{"type":"TypeString","computed":true},"workspace_id":{"type":"TypeString","computed":true}}}},"logic_app_receiver":{"type":"TypeList","computed":true,"elem":{"schema":{"callback_url":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"resource_id":{"type":"TypeString","computed":true},"use_common_alert_schema":{"type":"TypeBool","computed":true}}}},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"short_name":{"type":"TypeString","computed":true},"sms_receiver":{"type":"TypeList","computed":true,"elem":{"schema":{"country_code":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"phone_number":{"type":"TypeString","computed":true}}}},"voice_receiver":{"type":"TypeList","computed":true,"elem":{"schema":{"country_code":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"phone_number":{"type":"TypeString","computed":true}}}},"webhook_receiver":{"type":"TypeList","computed":true,"elem":{"schema":{"aad_auth":{"type":"TypeList","computed":true,"elem":{"schema":{"identifier_uri":{"type":"TypeString","computed":true},"object_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","computed":true},"service_uri":{"type":"TypeString","computed":true},"use_common_alert_schema":{"type":"TypeBool","computed":true}}}}},"timeouts":{"read":5}},"azurerm_monitor_data_collection_endpoint":{"schema":{"configuration_access_endpoint":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"immutable_id":{"type":"TypeString","computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"logs_ingestion_endpoint":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_monitor_data_collection_rule":{"schema":{"data_collection_endpoint_id":{"type":"TypeString","computed":true},"data_flow":{"type":"TypeList","computed":true,"elem":{"schema":{"built_in_transform":{"type":"TypeString","computed":true},"destinations":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"output_stream":{"type":"TypeString","computed":true},"streams":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"transform_kql":{"type":"TypeString","computed":true}}}},"data_sources":{"type":"TypeList","computed":true,"elem":{"schema":{"data_import":{"type":"TypeList","computed":true,"elem":{"schema":{"event_hub_data_source":{"type":"TypeList","computed":true,"elem":{"schema":{"consumer_group":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"stream":{"type":"TypeString","computed":true}}}}}}},"extension":{"type":"TypeList","computed":true,"elem":{"schema":{"extension_json":{"type":"TypeString","computed":true},"extension_name":{"type":"TypeString","computed":true},"input_data_sources":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"streams":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"iis_log":{"type":"TypeList","computed":true,"elem":{"schema":{"log_directories":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"streams":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"log_file":{"type":"TypeList","optional":true,"elem":{"schema":{"file_patterns":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"format":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"settings":{"type":"TypeList","computed":true,"elem":{"schema":{"text":{"type":"TypeList","computed":true,"elem":{"schema":{"record_start_timestamp_format":{"type":"TypeString","computed":true}}}}}}},"streams":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"performance_counter":{"type":"TypeList","computed":true,"elem":{"schema":{"counter_specifiers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"sampling_frequency_in_seconds":{"type":"TypeInt","computed":true},"streams":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"platform_telemetry":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"streams":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"prometheus_forwarder":{"type":"TypeList","computed":true,"elem":{"schema":{"label_include_filter":{"type":"TypeList","computed":true,"elem":{"schema":{"label":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","computed":true},"streams":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"syslog":{"type":"TypeList","computed":true,"elem":{"schema":{"facility_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"log_levels":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"streams":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"windows_event_log":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"streams":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"x_path_queries":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"windows_firewall_log":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"streams":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}}}}},"description":{"type":"TypeString","computed":true},"destinations":{"type":"TypeList","computed":true,"elem":{"schema":{"azure_monitor_metrics":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true}}}},"event_hub":{"type":"TypeList","optional":true,"elem":{"schema":{"event_hub_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}},"maxItems":1},"event_hub_direct":{"type":"TypeList","optional":true,"elem":{"schema":{"event_hub_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}},"maxItems":1},"log_analytics":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"workspace_resource_id":{"type":"TypeString","computed":true}}}},"monitor_account":{"type":"TypeList","computed":true,"elem":{"schema":{"monitor_account_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"storage_blob":{"type":"TypeList","computed":true,"elem":{"schema":{"container_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"storage_account_id":{"type":"TypeString","computed":true}}}},"storage_blob_direct":{"type":"TypeList","computed":true,"elem":{"schema":{"container_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"storage_account_id":{"type":"TypeString","computed":true}}}},"storage_table_direct":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"storage_account_id":{"type":"TypeString","computed":true},"table_name":{"type":"TypeString","computed":true}}}}}}},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"immutable_id":{"type":"TypeString","computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"stream_declaration":{"type":"TypeList","computed":true,"elem":{"schema":{"column":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"stream_name":{"type":"TypeString","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_monitor_diagnostic_categories":{"schema":{"log_category_groups":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"log_category_types":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"metrics":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"resource_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_monitor_scheduled_query_rules_alert":{"schema":{"action":{"type":"TypeSet","computed":true,"elem":{"schema":{"action_group":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"custom_webhook_payload":{"type":"TypeString","computed":true},"email_subject":{"type":"TypeString","computed":true}}}},"authorized_resource_ids":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"data_source_id":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","computed":true},"frequency":{"type":"TypeInt","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"query":{"type":"TypeString","computed":true},"query_type":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"severity":{"type":"TypeInt","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"throttling":{"type":"TypeInt","computed":true},"time_window":{"type":"TypeInt","computed":true},"trigger":{"type":"TypeSet","computed":true,"elem":{"schema":{"metric_trigger":{"type":"TypeSet","computed":true,"elem":{"schema":{"metric_column":{"type":"TypeString","computed":true},"metric_trigger_type":{"type":"TypeString","computed":true},"operator":{"type":"TypeString","computed":true},"threshold":{"type":"TypeFloat","computed":true}}}},"operator":{"type":"TypeString","computed":true},"threshold":{"type":"TypeFloat","computed":true}}}}},"timeouts":{"read":5}},"azurerm_monitor_scheduled_query_rules_log":{"schema":{"authorized_resource_ids":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"criteria":{"type":"TypeSet","computed":true,"elem":{"schema":{"dimension":{"type":"TypeSet","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"operator":{"type":"TypeString","computed":true},"values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"metric_name":{"type":"TypeString","computed":true}}}},"data_source_id":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_monitor_workspace":{"schema":{"default_data_collection_endpoint_id":{"type":"TypeString","computed":true},"default_data_collection_rule_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"query_endpoint":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_mssql_database":{"schema":{"collation":{"type":"TypeString","computed":true},"elastic_pool_id":{"type":"TypeString","computed":true},"enclave_type":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true}}}},"license_type":{"type":"TypeString","computed":true},"max_size_gb":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true},"read_replica_count":{"type":"TypeInt","computed":true},"read_scale":{"type":"TypeBool","computed":true},"server_id":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"storage_account_type":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"transparent_data_encryption_enabled":{"type":"TypeBool","computed":true},"transparent_data_encryption_key_automatic_rotation_enabled":{"type":"TypeBool","computed":true},"transparent_data_encryption_key_vault_key_id":{"type":"TypeString","computed":true},"zone_redundant":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_mssql_elasticpool":{"schema":{"enclave_type":{"type":"TypeString","computed":true},"license_type":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"max_size_bytes":{"type":"TypeInt","computed":true},"max_size_gb":{"type":"TypeFloat","computed":true},"name":{"type":"TypeString","required":true},"per_db_max_capacity":{"type":"TypeInt","computed":true},"per_db_min_capacity":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true},"server_name":{"type":"TypeString","required":true},"sku":{"type":"TypeList","computed":true,"elem":{"schema":{"capacity":{"type":"TypeInt","computed":true},"family":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"tier":{"type":"TypeString","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"zone_redundant":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_mssql_managed_instance":{"schema":{"administrator_login":{"type":"TypeString","computed":true},"collation":{"type":"TypeString","computed":true},"customer_managed_key_id":{"type":"TypeString","computed":true},"dns_zone":{"type":"TypeString","computed":true},"dns_zone_partner_id":{"type":"TypeString","computed":true},"fqdn":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"license_type":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"minimum_tls_version":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"proxy_override":{"type":"TypeString","computed":true},"public_data_endpoint_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"storage_account_type":{"type":"TypeString","computed":true},"storage_size_in_gb":{"type":"TypeInt","computed":true},"subnet_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"timezone_id":{"type":"TypeString","computed":true},"vcores":{"type":"TypeInt","computed":true}},"timeouts":{"read":5}},"azurerm_mssql_server":{"schema":{"administrator_login":{"type":"TypeString","computed":true},"fully_qualified_domain_name":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"restorable_dropped_database_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"transparent_data_encryption_key_vault_key_id":{"type":"TypeString","computed":true},"version":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_mysql_flexible_server":{"schema":{"administrator_login":{"type":"TypeString","computed":true},"backup_retention_days":{"type":"TypeInt","computed":true},"delegated_subnet_id":{"type":"TypeString","computed":true},"fqdn":{"type":"TypeString","computed":true},"geo_redundant_backup_enabled":{"type":"TypeBool","computed":true},"high_availability":{"type":"TypeList","computed":true,"elem":{"schema":{"mode":{"type":"TypeString","computed":true},"standby_availability_zone":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"maintenance_window":{"type":"TypeList","computed":true,"elem":{"schema":{"day_of_week":{"type":"TypeInt","computed":true},"start_hour":{"type":"TypeInt","computed":true},"start_minute":{"type":"TypeInt","computed":true}}}},"name":{"type":"TypeString","required":true},"private_dns_zone_id":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"replica_capacity":{"type":"TypeInt","computed":true},"replication_role":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"restore_point_in_time":{"type":"TypeString","computed":true},"sku_name":{"type":"TypeString","computed":true},"storage":{"type":"TypeList","computed":true,"elem":{"schema":{"auto_grow_enabled":{"type":"TypeBool","computed":true},"io_scaling_enabled":{"type":"TypeBool","computed":true},"iops":{"type":"TypeInt","computed":true},"size_gb":{"type":"TypeInt","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"version":{"type":"TypeString","computed":true},"zone":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_nat_gateway":{"schema":{"idle_timeout_in_minutes":{"type":"TypeInt","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"public_ip_address_ids":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"public_ip_prefix_ids":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"resource_guid":{"type":"TypeString","computed":true},"sku_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_netapp_account":{"schema":{"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_netapp_account_encryption":{"schema":{"encryption_key":{"type":"TypeString","optional":true,"description":"The versionless encryption key url."},"netapp_account_id":{"type":"TypeString","required":true,"description":"The ID of the NetApp Account where encryption will be set."},"system_assigned_identity_principal_id":{"type":"TypeString","optional":true,"description":"The Principal ID of the System Assigned Identity to use for encryption."},"user_assigned_identity_id":{"type":"TypeString","optional":true,"description":"The resource ID of the User Assigned Identity to use for encryption."}},"timeouts":{"read":5}},"azurerm_netapp_pool":{"schema":{"account_name":{"type":"TypeString","required":true},"encryption_type":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"service_level":{"type":"TypeString","computed":true},"size_in_tb":{"type":"TypeInt","computed":true}},"timeouts":{"read":5}},"azurerm_netapp_snapshot":{"schema":{"account_name":{"type":"TypeString","required":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"pool_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"volume_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_netapp_snapshot_policy":{"schema":{"account_name":{"type":"TypeString","required":true},"daily_schedule":{"type":"TypeList","computed":true,"elem":{"schema":{"hour":{"type":"TypeInt","computed":true},"minute":{"type":"TypeInt","computed":true},"snapshots_to_keep":{"type":"TypeInt","computed":true}}}},"enabled":{"type":"TypeBool","computed":true},"hourly_schedule":{"type":"TypeList","computed":true,"elem":{"schema":{"minute":{"type":"TypeInt","computed":true},"snapshots_to_keep":{"type":"TypeInt","computed":true}}}},"location":{"type":"TypeString","computed":true},"monthly_schedule":{"type":"TypeList","computed":true,"elem":{"schema":{"days_of_month":{"type":"TypeSet","computed":true,"elem":{"type":"TypeInt"}},"hour":{"type":"TypeInt","computed":true},"minute":{"type":"TypeInt","computed":true},"snapshots_to_keep":{"type":"TypeInt","computed":true}}}},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"weekly_schedule":{"type":"TypeList","computed":true,"elem":{"schema":{"days_of_week":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"hour":{"type":"TypeInt","computed":true},"minute":{"type":"TypeInt","computed":true},"snapshots_to_keep":{"type":"TypeInt","computed":true}}}}},"timeouts":{"read":5}},"azurerm_netapp_volume":{"schema":{"account_name":{"type":"TypeString","required":true},"data_protection_replication":{"type":"TypeList","computed":true,"elem":{"schema":{"endpoint_type":{"type":"TypeString","computed":true},"remote_volume_location":{"type":"TypeString","computed":true},"remote_volume_resource_id":{"type":"TypeString","computed":true},"replication_frequency":{"type":"TypeString","computed":true}}}},"encryption_key_source":{"type":"TypeString","computed":true},"key_vault_private_endpoint_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"mount_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"network_features":{"type":"TypeString","computed":true},"pool_name":{"type":"TypeString","required":true},"protocols":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"security_style":{"type":"TypeString","optional":true},"service_level":{"type":"TypeString","computed":true},"smb_access_based_enumeration_enabled":{"type":"TypeBool","computed":true},"smb_non_browsable_enabled":{"type":"TypeBool","computed":true},"storage_quota_in_gb":{"type":"TypeInt","computed":true},"subnet_id":{"type":"TypeString","computed":true},"volume_path":{"type":"TypeString","computed":true},"zone":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_netapp_volume_group_sap_hana":{"schema":{"account_name":{"type":"TypeString","required":true},"application_identifier":{"type":"TypeString","computed":true},"group_description":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"volume":{"type":"TypeList","computed":true,"elem":{"schema":{"capacity_pool_id":{"type":"TypeString","computed":true},"data_protection_replication":{"type":"TypeList","computed":true,"elem":{"schema":{"endpoint_type":{"type":"TypeString","computed":true},"remote_volume_location":{"type":"TypeString","computed":true},"remote_volume_resource_id":{"type":"TypeString","computed":true},"replication_frequency":{"type":"TypeString","computed":true}}}},"data_protection_snapshot_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"snapshot_policy_id":{"type":"TypeString","computed":true}}}},"export_policy_rule":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_clients":{"type":"TypeString","computed":true},"nfsv3_enabled":{"type":"TypeBool","computed":true},"nfsv41_enabled":{"type":"TypeBool","computed":true},"root_access_enabled":{"type":"TypeBool","computed":true},"rule_index":{"type":"TypeInt","computed":true},"unix_read_only":{"type":"TypeBool","computed":true},"unix_read_write":{"type":"TypeBool","computed":true}}}},"id":{"type":"TypeString","computed":true},"mount_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"protocols":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"proximity_placement_group_id":{"type":"TypeString","computed":true},"security_style":{"type":"TypeString","computed":true},"service_level":{"type":"TypeString","computed":true},"snapshot_directory_visible":{"type":"TypeBool","computed":true},"storage_quota_in_gb":{"type":"TypeInt","computed":true},"subnet_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"throughput_in_mibps":{"type":"TypeFloat","required":true},"volume_path":{"type":"TypeString","computed":true},"volume_spec_name":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_netapp_volume_quota_rule":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"quota_size_in_kib":{"type":"TypeInt","computed":true},"quota_target":{"type":"TypeString","computed":true},"quota_type":{"type":"TypeString","computed":true},"volume_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"read":5}},"azurerm_network_ddos_protection_plan":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"virtual_network_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_network_interface":{"schema":{"accelerated_networking_enabled":{"type":"TypeBool","computed":true},"applied_dns_servers":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"dns_servers":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"internal_dns_name_label":{"type":"TypeString","computed":true},"ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"application_gateway_backend_address_pools_ids":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"application_security_group_ids":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"gateway_load_balancer_frontend_ip_configuration_id":{"type":"TypeString","computed":true},"load_balancer_backend_address_pools_ids":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"load_balancer_inbound_nat_rules_ids":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"primary":{"type":"TypeBool","computed":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_address_allocation":{"type":"TypeString","computed":true},"private_ip_address_version":{"type":"TypeString","computed":true},"public_ip_address_id":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"ip_forwarding_enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"mac_address":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"network_security_group_id":{"type":"TypeString","computed":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"virtual_machine_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_network_manager":{"schema":{"cross_tenant_scopes":{"type":"TypeList","computed":true,"elem":{"schema":{"management_groups":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"subscriptions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","computed":true}}}},"description":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"scope":{"type":"TypeList","computed":true,"elem":{"schema":{"management_group_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"subscription_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"scope_accesses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_network_manager_connectivity_configuration":{"schema":{"applies_to_group":{"type":"TypeList","computed":true,"elem":{"schema":{"global_mesh_enabled":{"type":"TypeBool","computed":true},"group_connectivity":{"type":"TypeString","computed":true},"network_group_id":{"type":"TypeString","computed":true},"use_hub_gateway":{"type":"TypeBool","computed":true}}}},"connectivity_topology":{"type":"TypeString","computed":true},"delete_existing_peering_enabled":{"type":"TypeBool","computed":true},"description":{"type":"TypeString","computed":true},"global_mesh_enabled":{"type":"TypeBool","computed":true},"hub":{"type":"TypeList","computed":true,"elem":{"schema":{"resource_id":{"type":"TypeString","computed":true},"resource_type":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","required":true},"network_manager_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_network_manager_network_group":{"schema":{"description":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"network_manager_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_network_security_group":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"security_rule":{"type":"TypeList","computed":true,"elem":{"schema":{"access":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"destination_address_prefix":{"type":"TypeString","computed":true},"destination_address_prefixes":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"destination_application_security_group_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"destination_port_range":{"type":"TypeString","computed":true},"destination_port_ranges":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"direction":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"priority":{"type":"TypeInt","computed":true},"protocol":{"type":"TypeString","computed":true},"source_address_prefix":{"type":"TypeString","computed":true},"source_address_prefixes":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"source_application_security_group_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"source_port_range":{"type":"TypeString","computed":true},"source_port_ranges":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_network_service_tags":{"schema":{"address_prefixes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ipv4_cidrs":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ipv6_cidrs":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"location_filter":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","computed":true},"service":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_network_watcher":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_nginx_certificate":{"schema":{"certificate_virtual_path":{"type":"TypeString","computed":true},"error_code":{"type":"TypeString","computed":true},"error_message":{"type":"TypeString","computed":true},"key_vault_secret_creation_date":{"type":"TypeString","computed":true},"key_vault_secret_id":{"type":"TypeString","computed":true},"key_vault_secret_version":{"type":"TypeString","computed":true},"key_virtual_path":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"nginx_deployment_id":{"type":"TypeString","required":true},"sha1_thumbprint":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_nginx_configuration":{"schema":{"config_file":{"type":"TypeSet","computed":true,"elem":{"schema":{"content":{"type":"TypeString","computed":true},"virtual_path":{"type":"TypeString","computed":true}}}},"nginx_deployment_id":{"type":"TypeString","required":true},"package_data":{"type":"TypeString","computed":true},"protected_file":{"type":"TypeSet","computed":true,"elem":{"schema":{"content":{"type":"TypeString","computed":true},"virtual_path":{"type":"TypeString","computed":true}}}},"root_file":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_nginx_deployment":{"schema":{"auto_scale_profile":{"type":"TypeList","computed":true,"elem":{"schema":{"max_capacity":{"type":"TypeInt","computed":true},"min_capacity":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","computed":true}}}},"automatic_upgrade_channel":{"type":"TypeString","computed":true},"capacity":{"type":"TypeInt","computed":true},"diagnose_support_enabled":{"type":"TypeBool","computed":true},"email":{"type":"TypeString","computed":true},"frontend_private":{"type":"TypeList","computed":true,"elem":{"schema":{"allocation_method":{"type":"TypeString","computed":true},"ip_address":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"frontend_public":{"type":"TypeList","computed":true,"elem":{"schema":{"ip_address":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"ip_address":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"logging_storage_account":{"type":"TypeList","computed":true,"elem":{"schema":{"container_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"managed_resource_group":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"network_interface":{"type":"TypeList","computed":true,"elem":{"schema":{"subnet_id":{"type":"TypeString","computed":true}}}},"nginx_version":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_notification_hub":{"schema":{"apns_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"application_mode":{"type":"TypeString","computed":true},"bundle_id":{"type":"TypeString","computed":true},"key_id":{"type":"TypeString","computed":true},"team_id":{"type":"TypeString","computed":true},"token":{"type":"TypeString","computed":true}}}},"gcm_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"api_key":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"namespace_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_notification_hub_namespace":{"schema":{"enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"namespace_type":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"servicebus_endpoint":{"type":"TypeString","computed":true},"sku":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_orchestrated_virtual_machine_scale_set":{"schema":{"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"network_interface":{"type":"TypeList","computed":true,"elem":{"schema":{"accelerated_networking_enabled":{"type":"TypeBool","computed":true},"dns_servers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"application_gateway_backend_address_pool_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"application_security_group_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"load_balancer_backend_address_pool_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"load_balancer_inbound_nat_rules_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"primary":{"type":"TypeBool","computed":true},"public_ip_address":{"type":"TypeList","computed":true,"elem":{"schema":{"domain_name_label":{"type":"TypeString","computed":true},"idle_timeout_in_minutes":{"type":"TypeInt","computed":true},"ip_tag":{"type":"TypeList","computed":true,"elem":{"schema":{"tag":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","computed":true},"public_ip_prefix_id":{"type":"TypeString","computed":true},"version":{"type":"TypeString","computed":true}}}},"subnet_id":{"type":"TypeString","computed":true},"version":{"type":"TypeString","computed":true}}}},"ip_forwarding_enabled":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","computed":true},"network_security_group_id":{"type":"TypeString","computed":true},"primary":{"type":"TypeBool","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_palo_alto_local_rulestack":{"schema":{"anti_spyware_profile":{"type":"TypeString","computed":true},"anti_virus_profile":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"dns_subscription":{"type":"TypeString","computed":true},"file_blocking_profile":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"outbound_trust_certificate":{"type":"TypeString","computed":true},"outbound_untrust_certificate":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"url_filtering_profile":{"type":"TypeString","computed":true},"vulnerability_profile":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_platform_image":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"offer":{"type":"TypeString","required":true},"publisher":{"type":"TypeString","required":true},"sku":{"type":"TypeString","required":true},"version":{"type":"TypeString","optional":true,"computed":true}},"timeouts":{"read":5}},"azurerm_policy_assignment":{"schema":{"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","computed":true},"enforce":{"type":"TypeBool","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"metadata":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"non_compliance_message":{"type":"TypeList","computed":true,"elem":{"schema":{"content":{"type":"TypeString","computed":true},"policy_definition_reference_id":{"type":"TypeString","computed":true}}}},"not_scopes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"parameters":{"type":"TypeString","computed":true},"policy_definition_id":{"type":"TypeString","computed":true},"scope_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"read":5}},"azurerm_policy_definition":{"schema":{"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","optional":true,"computed":true},"management_group_name":{"type":"TypeString","optional":true},"metadata":{"type":"TypeString","computed":true},"mode":{"type":"TypeString","computed":true},"name":{"type":"TypeString","optional":true,"computed":true},"parameters":{"type":"TypeString","computed":true},"policy_rule":{"type":"TypeString","computed":true},"policy_type":{"type":"TypeString","computed":true},"role_definition_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_policy_definition_built_in":{"schema":{"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","optional":true,"computed":true},"management_group_name":{"type":"TypeString","optional":true},"metadata":{"type":"TypeString","computed":true},"mode":{"type":"TypeString","computed":true},"name":{"type":"TypeString","optional":true,"computed":true},"parameters":{"type":"TypeString","computed":true},"policy_rule":{"type":"TypeString","computed":true},"policy_type":{"type":"TypeString","computed":true},"role_definition_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_policy_set_definition":{"schema":{"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","optional":true,"computed":true},"management_group_name":{"type":"TypeString","optional":true},"metadata":{"type":"TypeString","computed":true},"name":{"type":"TypeString","optional":true,"computed":true},"parameters":{"type":"TypeString","computed":true},"policy_definition_group":{"type":"TypeList","computed":true,"elem":{"schema":{"additional_metadata_resource_id":{"type":"TypeString","computed":true},"category":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"policy_definition_reference":{"type":"TypeList","computed":true,"elem":{"schema":{"parameter_values":{"type":"TypeString","computed":true},"parameters":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"policy_definition_id":{"type":"TypeString","computed":true},"policy_group_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"reference_id":{"type":"TypeString","computed":true}}}},"policy_definitions":{"type":"TypeString","computed":true},"policy_type":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_policy_virtual_machine_configuration_assignment":{"schema":{"assignment_hash":{"type":"TypeString","computed":true},"compliance_status":{"type":"TypeString","computed":true},"content_hash":{"type":"TypeString","computed":true},"content_uri":{"type":"TypeString","computed":true},"last_compliance_status_checked":{"type":"TypeString","computed":true},"latest_report_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"virtual_machine_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_portal_dashboard":{"schema":{"dashboard_properties":{"type":"TypeString","optional":true,"computed":true},"display_name":{"type":"TypeString","optional":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_postgresql_flexible_server":{"schema":{"administrator_login":{"type":"TypeString","computed":true},"auto_grow_enabled":{"type":"TypeBool","computed":true},"backup_retention_days":{"type":"TypeInt","computed":true},"delegated_subnet_id":{"type":"TypeString","computed":true},"fqdn":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"storage_mb":{"type":"TypeInt","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"version":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_postgresql_server":{"schema":{"administrator_login":{"type":"TypeString","computed":true},"fqdn":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"version":{"type":"TypeString","computed":true}},"timeouts":{"read":10}},"azurerm_private_dns_a_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"records":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_private_dns_aaaa_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"records":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_private_dns_cname_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"record":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"target_resource_id":{"type":"TypeString","computed":true},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_private_dns_mx_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","optional":true},"record":{"type":"TypeSet","computed":true,"elem":{"schema":{"exchange":{"type":"TypeString","computed":true},"preference":{"type":"TypeInt","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_private_dns_ptr_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"records":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_private_dns_resolver":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"virtual_network_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_private_dns_resolver_dns_forwarding_ruleset":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"private_dns_resolver_outbound_endpoint_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_private_dns_resolver_forwarding_rule":{"schema":{"dns_forwarding_ruleset_id":{"type":"TypeString","required":true},"domain_name":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","computed":true},"metadata":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"target_dns_servers":{"type":"TypeList","computed":true,"elem":{"schema":{"ip_address":{"type":"TypeString","computed":true},"port":{"type":"TypeInt","computed":true}}}}},"timeouts":{"read":5}},"azurerm_private_dns_resolver_inbound_endpoint":{"schema":{"ip_configurations":{"type":"TypeList","computed":true,"elem":{"schema":{"private_ip_address":{"type":"TypeString","computed":true},"private_ip_allocation_method":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"private_dns_resolver_id":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_private_dns_resolver_outbound_endpoint":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"private_dns_resolver_id":{"type":"TypeString","required":true},"subnet_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_private_dns_resolver_virtual_network_link":{"schema":{"dns_forwarding_ruleset_id":{"type":"TypeString","required":true},"metadata":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"virtual_network_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_private_dns_soa_record":{"schema":{"email":{"type":"TypeString","computed":true},"expire_time":{"type":"TypeInt","computed":true},"fqdn":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","computed":true},"minimum_ttl":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","optional":true,"default":"@"},"refresh_time":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true},"retry_time":{"type":"TypeInt","computed":true},"serial_number":{"type":"TypeInt","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_private_dns_srv_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"record":{"type":"TypeSet","computed":true,"elem":{"schema":{"port":{"type":"TypeInt","computed":true},"priority":{"type":"TypeInt","computed":true},"target":{"type":"TypeString","computed":true},"weight":{"type":"TypeInt","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_private_dns_txt_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"record":{"type":"TypeSet","computed":true,"elem":{"schema":{"value":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_private_dns_zone":{"schema":{"max_number_of_record_sets":{"type":"TypeInt","computed":true},"max_number_of_virtual_network_links":{"type":"TypeInt","computed":true},"max_number_of_virtual_network_links_with_registration":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true},"number_of_record_sets":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","optional":true,"computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_private_dns_zone_virtual_network_link":{"schema":{"name":{"type":"TypeString","required":true},"private_dns_zone_name":{"type":"TypeString","required":true},"registration_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"virtual_network_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_private_endpoint_connection":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"network_interface":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"private_service_connection":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"private_ip_address":{"type":"TypeString","computed":true},"request_response":{"type":"TypeString","computed":true},"status":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_private_link_service":{"schema":{"alias":{"type":"TypeString","computed":true},"auto_approval_subscription_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"enable_proxy_protocol":{"type":"TypeBool","computed":true},"load_balancer_frontend_ip_configuration_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"nat_ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"primary":{"type":"TypeBool","computed":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_address_version":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"visibility_subscription_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_private_link_service_endpoint_connections":{"schema":{"location":{"type":"TypeString","computed":true},"private_endpoint_connections":{"type":"TypeList","computed":true,"elem":{"schema":{"action_required":{"type":"TypeString","computed":true},"connection_id":{"type":"TypeString","computed":true},"connection_name":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"private_endpoint_id":{"type":"TypeString","computed":true},"private_endpoint_name":{"type":"TypeString","computed":true},"status":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"service_id":{"type":"TypeString","required":true},"service_name":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_proximity_placement_group":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_public_ip":{"schema":{"allocation_method":{"type":"TypeString","computed":true},"ddos_protection_mode":{"type":"TypeString","computed":true},"ddos_protection_plan_id":{"type":"TypeString","computed":true},"domain_name_label":{"type":"TypeString","computed":true},"fqdn":{"type":"TypeString","computed":true},"idle_timeout_in_minutes":{"type":"TypeInt","computed":true},"ip_address":{"type":"TypeString","computed":true},"ip_tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ip_version":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"reverse_fqdn":{"type":"TypeString","computed":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_public_ip_prefix":{"schema":{"ip_prefix":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"prefix_length":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_public_ips":{"schema":{"allocation_type":{"type":"TypeString","optional":true},"attachment_status":{"type":"TypeString","optional":true},"name_prefix":{"type":"TypeString","optional":true},"public_ips":{"type":"TypeList","computed":true,"elem":{"schema":{"domain_name_label":{"type":"TypeString","computed":true},"fqdn":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"ip_address":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_public_maintenance_configurations":{"schema":{"configs":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"duration":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"maintenance_scope":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"recur_every":{"type":"TypeString","computed":true},"time_zone":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","optional":true},"recur_every":{"type":"TypeString","optional":true},"scope":{"type":"TypeString","optional":true}},"timeouts":{"read":5}},"azurerm_recovery_services_vault":{"schema":{"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_redis_cache":{"schema":{"capacity":{"type":"TypeInt","computed":true},"family":{"type":"TypeString","computed":true},"hostname":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"minimum_tls_version":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"non_ssl_port_enabled":{"type":"TypeBool","computed":true},"patch_schedule":{"type":"TypeList","computed":true,"elem":{"schema":{"day_of_week":{"type":"TypeString","computed":true},"maintenance_window":{"type":"TypeString","computed":true},"start_hour_utc":{"type":"TypeInt","computed":true}}}},"port":{"type":"TypeInt","computed":true},"primary_access_key":{"type":"TypeString","computed":true},"primary_connection_string":{"type":"TypeString","computed":true},"private_static_ip_address":{"type":"TypeString","computed":true},"redis_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"active_directory_authentication_enabled":{"type":"TypeBool","computed":true},"aof_backup_enabled":{"type":"TypeBool","computed":true},"aof_storage_connection_string_0":{"type":"TypeString","computed":true},"aof_storage_connection_string_1":{"type":"TypeString","computed":true},"authentication_enabled":{"type":"TypeBool","computed":true},"data_persistence_authentication_method":{"type":"TypeString","computed":true},"maxclients":{"type":"TypeInt","computed":true},"maxfragmentationmemory_reserved":{"type":"TypeInt","computed":true},"maxmemory_delta":{"type":"TypeInt","computed":true},"maxmemory_policy":{"type":"TypeString","computed":true},"maxmemory_reserved":{"type":"TypeInt","computed":true},"notify_keyspace_events":{"type":"TypeString","computed":true},"rdb_backup_enabled":{"type":"TypeBool","computed":true},"rdb_backup_frequency":{"type":"TypeInt","computed":true},"rdb_backup_max_snapshot_count":{"type":"TypeInt","computed":true},"rdb_storage_connection_string":{"type":"TypeString","computed":true},"storage_account_subscription_id":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"secondary_access_key":{"type":"TypeString","computed":true},"secondary_connection_string":{"type":"TypeString","computed":true},"shard_count":{"type":"TypeInt","computed":true},"sku_name":{"type":"TypeString","computed":true},"ssl_port":{"type":"TypeInt","computed":true},"subnet_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_redis_enterprise_database":{"schema":{"cluster_id":{"type":"TypeString","required":true},"linked_database_group_nickname":{"type":"TypeString","computed":true},"linked_database_id":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"primary_access_key":{"type":"TypeString","computed":true},"secondary_access_key":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_resource_group":{"schema":{"location":{"type":"TypeString","computed":true},"managed_by":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_resource_group_template_deployment":{"schema":{"name":{"type":"TypeString","required":true},"output_content":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_resources":{"schema":{"name":{"type":"TypeString","optional":true,"computed":true},"required_tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","optional":true,"computed":true},"resources":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true}}}},"type":{"type":"TypeString","optional":true,"computed":true}},"timeouts":{"read":5}},"azurerm_role_definition":{"schema":{"assignable_scopes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"description":{"type":"TypeString","computed":true},"name":{"type":"TypeString","optional":true,"computed":true},"permissions":{"type":"TypeList","computed":true,"elem":{"schema":{"actions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"condition":{"type":"TypeString","computed":true},"condition_version":{"type":"TypeString","computed":true},"data_actions":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"not_actions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"not_data_actions":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"role_definition_id":{"type":"TypeString","optional":true,"computed":true},"scope":{"type":"TypeString","optional":true},"type":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_role_management_policy":{"schema":{"activation_rules":{"type":"TypeList","description":"The activation rules of the policy","computed":true,"elem":{"schema":{"approval_stage":{"type":"TypeList","description":"The approval stages for the activation","computed":true,"elem":{"schema":{"primary_approver":{"type":"TypeSet","description":"The IDs of the users or groups who can approve the activation","computed":true,"elem":{"schema":{"object_id":{"type":"TypeString","description":"The ID of the object to act as an approver","computed":true},"type":{"type":"TypeString","description":"The type of object acting as an approver","computed":true}}}}}}},"maximum_duration":{"type":"TypeString","description":"The time after which the an activation can be valid for","computed":true},"require_approval":{"type":"TypeBool","description":"Whether an approval is required for activation","computed":true},"require_justification":{"type":"TypeBool","description":"Whether a justification is required during activation","computed":true},"require_multifactor_authentication":{"type":"TypeBool","description":"Whether multi-factor authentication is required during activation","computed":true},"require_ticket_info":{"type":"TypeBool","description":"Whether ticket information is required during activation","computed":true},"required_conditional_access_authentication_context":{"type":"TypeString","description":"Whether a conditional access context is required during activation","computed":true}}}},"active_assignment_rules":{"type":"TypeList","description":"The rules for active assignment of the policy","computed":true,"elem":{"schema":{"expiration_required":{"type":"TypeBool","description":"Must the assignment have an expiry date","computed":true},"expire_after":{"type":"TypeString","description":"The duration after which assignments expire","computed":true},"require_justification":{"type":"TypeBool","description":"Whether a justification is required to make an assignment","computed":true},"require_multifactor_authentication":{"type":"TypeBool","description":"Whether multi-factor authentication is required to make an assignment","computed":true},"require_ticket_info":{"type":"TypeBool","description":"Whether ticket information is required to make an assignment","computed":true}}}},"description":{"type":"TypeString","description":"The Description of the policy","computed":true},"eligible_assignment_rules":{"type":"TypeList","description":"The rules for eligible assignment of the policy","computed":true,"elem":{"schema":{"expiration_required":{"type":"TypeBool","description":"Must the assignment have an expiry date","computed":true},"expire_after":{"type":"TypeString","description":"The duration after which assignments expire","computed":true}}}},"name":{"type":"TypeString","description":"The name of the policy","computed":true},"notification_rules":{"type":"TypeList","description":"The notification rules of the policy","computed":true,"elem":{"schema":{"active_assignments":{"type":"TypeList","description":"Notifications about active assignments","computed":true,"elem":{"schema":{"admin_notifications":{"type":"TypeList","description":"Admin notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","description":"Whether the default recipients are notified","computed":true},"notification_level":{"type":"TypeString","description":"What level of notifications are sent","computed":true}}}},"approver_notifications":{"type":"TypeList","description":"Approver notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","description":"Whether the default recipients are notified","computed":true},"notification_level":{"type":"TypeString","description":"What level of notifications are sent","computed":true}}}},"assignee_notifications":{"type":"TypeList","description":"Assignee notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","description":"Whether the default recipients are notified","computed":true},"notification_level":{"type":"TypeString","description":"What level of notifications are sent","computed":true}}}}}}},"eligible_activations":{"type":"TypeList","description":"Notifications about activations of eligible assignments","computed":true,"elem":{"schema":{"admin_notifications":{"type":"TypeList","description":"Admin notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","description":"Whether the default recipients are notified","computed":true},"notification_level":{"type":"TypeString","description":"What level of notifications are sent","computed":true}}}},"approver_notifications":{"type":"TypeList","description":"Approver notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","description":"Whether the default recipients are notified","computed":true},"notification_level":{"type":"TypeString","description":"What level of notifications are sent","computed":true}}}},"assignee_notifications":{"type":"TypeList","description":"Assignee notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","description":"Whether the default recipients are notified","computed":true},"notification_level":{"type":"TypeString","description":"What level of notifications are sent","computed":true}}}}}}},"eligible_assignments":{"type":"TypeList","description":"Notifications about eligible assignments","computed":true,"elem":{"schema":{"admin_notifications":{"type":"TypeList","description":"Admin notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","description":"Whether the default recipients are notified","computed":true},"notification_level":{"type":"TypeString","description":"What level of notifications are sent","computed":true}}}},"approver_notifications":{"type":"TypeList","description":"Approver notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","description":"Whether the default recipients are notified","computed":true},"notification_level":{"type":"TypeString","description":"What level of notifications are sent","computed":true}}}},"assignee_notifications":{"type":"TypeList","description":"Assignee notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","description":"Whether the default recipients are notified","computed":true},"notification_level":{"type":"TypeString","description":"What level of notifications are sent","computed":true}}}}}}}}}},"role_definition_id":{"type":"TypeString","required":true,"description":"ID of the Azure Role to which this policy is assigned"},"scope":{"type":"TypeString","required":true,"description":"The scope of the role to which this policy will apply"}},"timeouts":{"read":5}},"azurerm_route_filter":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"rule":{"type":"TypeList","computed":true,"elem":{"schema":{"access":{"type":"TypeString","computed":true},"communities":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"rule_type":{"type":"TypeString","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_route_table":{"schema":{"bgp_route_propagation_enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"route":{"type":"TypeList","computed":true,"elem":{"schema":{"address_prefix":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"next_hop_in_ip_address":{"type":"TypeString","computed":true},"next_hop_type":{"type":"TypeString","computed":true}}}},"subnets":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_search_service":{"schema":{"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","required":true},"partition_count":{"type":"TypeInt","computed":true},"primary_key":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"query_keys":{"type":"TypeList","computed":true,"elem":{"schema":{"key":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"replica_count":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_key":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_sentinel_alert_rule":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_sentinel_alert_rule_anomaly":{"schema":{"anomaly_settings_version":{"type":"TypeInt","computed":true},"anomaly_version":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","optional":true,"computed":true},"enabled":{"type":"TypeBool","computed":true},"frequency":{"type":"TypeString","computed":true},"log_analytics_workspace_id":{"type":"TypeString","required":true},"mode":{"type":"TypeString","computed":true},"multi_select_observation":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"supported_values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"name":{"type":"TypeString","optional":true,"computed":true},"prioritized_exclude_observation":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"exclude":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"prioritize":{"type":"TypeString","computed":true}}}},"required_data_connector":{"type":"TypeList","computed":true,"elem":{"schema":{"connector_id":{"type":"TypeString","computed":true},"data_types":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"settings_definition_id":{"type":"TypeString","computed":true},"single_select_observation":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"supported_values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"value":{"type":"TypeString","computed":true}}}},"tactics":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"techniques":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"threshold_observation":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"max":{"type":"TypeString","computed":true},"min":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_sentinel_alert_rule_template":{"schema":{"display_name":{"type":"TypeString","optional":true,"computed":true},"log_analytics_workspace_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","optional":true,"computed":true},"nrt_template":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"query":{"type":"TypeString","computed":true},"severity":{"type":"TypeString","computed":true},"tactics":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"scheduled_template":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"query":{"type":"TypeString","computed":true},"query_frequency":{"type":"TypeString","computed":true},"query_period":{"type":"TypeString","computed":true},"severity":{"type":"TypeString","computed":true},"tactics":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"trigger_operator":{"type":"TypeString","computed":true},"trigger_threshold":{"type":"TypeInt","computed":true}}}},"security_incident_template":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"product_filter":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_service_plan":{"schema":{"app_service_environment_id":{"type":"TypeString","computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"maximum_elastic_worker_count":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true},"os_type":{"type":"TypeString","computed":true},"per_site_scaling_enabled":{"type":"TypeBool","computed":true},"reserved":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"worker_count":{"type":"TypeInt","computed":true},"zone_balancing_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_servicebus_namespace":{"schema":{"capacity":{"type":"TypeInt","computed":true},"default_primary_connection_string":{"type":"TypeString","computed":true},"default_primary_key":{"type":"TypeString","computed":true},"default_secondary_connection_string":{"type":"TypeString","computed":true},"default_secondary_key":{"type":"TypeString","computed":true},"endpoint":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"premium_messaging_partitions":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_servicebus_namespace_authorization_rule":{"schema":{"name":{"type":"TypeString","required":true},"namespace_id":{"type":"TypeString","optional":true},"namespace_name":{"type":"TypeString","optional":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_connection_string_alias":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","optional":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_connection_string_alias":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_servicebus_namespace_disaster_recovery_config":{"schema":{"alias_authorization_rule_id":{"type":"TypeString","optional":true},"default_primary_key":{"type":"TypeString","computed":true},"default_secondary_key":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"namespace_id":{"type":"TypeString","optional":true},"namespace_name":{"type":"TypeString","optional":true},"partner_namespace_id":{"type":"TypeString","computed":true},"primary_connection_string_alias":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","optional":true},"secondary_connection_string_alias":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_servicebus_queue":{"schema":{"auto_delete_on_idle":{"type":"TypeString","computed":true},"dead_lettering_on_message_expiration":{"type":"TypeBool","computed":true},"default_message_ttl":{"type":"TypeString","computed":true},"duplicate_detection_history_time_window":{"type":"TypeString","computed":true},"enable_batched_operations":{"type":"TypeBool","computed":true},"enable_express":{"type":"TypeBool","computed":true},"enable_partitioning":{"type":"TypeBool","computed":true},"forward_dead_lettered_messages_to":{"type":"TypeString","computed":true},"forward_to":{"type":"TypeString","computed":true},"lock_duration":{"type":"TypeString","computed":true},"max_delivery_count":{"type":"TypeInt","computed":true},"max_size_in_megabytes":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true},"namespace_id":{"type":"TypeString","optional":true},"namespace_name":{"type":"TypeString","optional":true},"requires_duplicate_detection":{"type":"TypeBool","computed":true},"requires_session":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","optional":true},"status":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_servicebus_queue_authorization_rule":{"schema":{"listen":{"type":"TypeBool","computed":true},"manage":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"namespace_name":{"type":"TypeString","optional":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_connection_string_alias":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"queue_id":{"type":"TypeString","optional":true},"queue_name":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","optional":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_connection_string_alias":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"send":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_servicebus_subscription":{"schema":{"auto_delete_on_idle":{"type":"TypeString","computed":true},"dead_lettering_on_filter_evaluation_error":{"type":"TypeBool","computed":true},"dead_lettering_on_message_expiration":{"type":"TypeBool","computed":true},"default_message_ttl":{"type":"TypeString","computed":true},"enable_batched_operations":{"type":"TypeBool","computed":true},"forward_dead_lettered_messages_to":{"type":"TypeString","computed":true},"forward_to":{"type":"TypeString","computed":true},"lock_duration":{"type":"TypeString","computed":true},"max_delivery_count":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true},"namespace_name":{"type":"TypeString","optional":true},"requires_session":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","optional":true},"topic_id":{"type":"TypeString","optional":true},"topic_name":{"type":"TypeString","optional":true}},"timeouts":{"read":5}},"azurerm_servicebus_topic":{"schema":{"auto_delete_on_idle":{"type":"TypeString","computed":true},"default_message_ttl":{"type":"TypeString","computed":true},"duplicate_detection_history_time_window":{"type":"TypeString","computed":true},"enable_batched_operations":{"type":"TypeBool","computed":true},"enable_express":{"type":"TypeBool","computed":true},"enable_partitioning":{"type":"TypeBool","computed":true},"max_size_in_megabytes":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true},"namespace_id":{"type":"TypeString","optional":true},"namespace_name":{"type":"TypeString","optional":true},"requires_duplicate_detection":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","optional":true},"status":{"type":"TypeString","computed":true},"support_ordering":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_servicebus_topic_authorization_rule":{"schema":{"listen":{"type":"TypeBool","computed":true},"manage":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"namespace_name":{"type":"TypeString","optional":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_connection_string_alias":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"queue_name":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","optional":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_connection_string_alias":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"send":{"type":"TypeBool","computed":true},"topic_id":{"type":"TypeString","optional":true},"topic_name":{"type":"TypeString","optional":true}},"timeouts":{"read":5}},"azurerm_shared_image":{"schema":{"architecture":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"eula":{"type":"TypeString","computed":true},"gallery_name":{"type":"TypeString","required":true},"hyper_v_generation":{"type":"TypeString","computed":true},"identifier":{"type":"TypeList","computed":true,"elem":{"schema":{"offer":{"type":"TypeString","computed":true},"publisher":{"type":"TypeString","computed":true},"sku":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"os_type":{"type":"TypeString","computed":true},"privacy_statement_uri":{"type":"TypeString","computed":true},"purchase_plan":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"product":{"type":"TypeString","computed":true},"publisher":{"type":"TypeString","computed":true}}}},"release_note_uri":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"specialized":{"type":"TypeBool","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_shared_image_gallery":{"schema":{"description":{"type":"TypeString","computed":true},"image_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"unique_name":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_shared_image_version":{"schema":{"exclude_from_latest":{"type":"TypeBool","computed":true},"gallery_name":{"type":"TypeString","required":true},"image_name":{"type":"TypeString","required":true},"location":{"type":"TypeString","computed":true},"managed_image_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"os_disk_image_size_gb":{"type":"TypeInt","computed":true},"os_disk_snapshot_id":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sort_versions_by_semver":{"type":"TypeBool","optional":true,"default":false},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"target_region":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"regional_replica_count":{"type":"TypeInt","computed":true},"storage_account_type":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_shared_image_versions":{"schema":{"gallery_name":{"type":"TypeString","required":true},"image_name":{"type":"TypeString","required":true},"images":{"type":"TypeList","computed":true,"elem":{"schema":{"exclude_from_latest":{"type":"TypeBool","computed":true},"id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"managed_image_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"target_region":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"regional_replica_count":{"type":"TypeInt","computed":true},"storage_account_type":{"type":"TypeString","computed":true}}}}}}},"resource_group_name":{"type":"TypeString","required":true},"tags_filter":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_signalr_service":{"schema":{"aad_auth_enabled":{"type":"TypeBool","computed":true},"hostname":{"type":"TypeString","computed":true},"ip_address":{"type":"TypeString","computed":true},"local_auth_enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"primary_access_key":{"type":"TypeString","computed":true},"primary_connection_string":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"public_port":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_access_key":{"type":"TypeString","computed":true},"secondary_connection_string":{"type":"TypeString","computed":true},"server_port":{"type":"TypeInt","computed":true},"serverless_connection_timeout_in_seconds":{"type":"TypeInt","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tls_client_cert_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_site_recovery_fabric":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"recovery_vault_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_site_recovery_protection_container":{"schema":{"name":{"type":"TypeString","required":true},"recovery_fabric_name":{"type":"TypeString","required":true},"recovery_vault_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_site_recovery_replication_policy":{"schema":{"application_consistent_snapshot_frequency_in_minutes":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true},"recovery_point_retention_in_minutes":{"type":"TypeInt","computed":true},"recovery_vault_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_site_recovery_replication_recovery_plan":{"schema":{"azure_to_azure_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"primary_edge_zone":{"type":"TypeString","computed":true},"primary_zone":{"type":"TypeString","computed":true},"recovery_edge_zone":{"type":"TypeString","computed":true},"recovery_zone":{"type":"TypeString","computed":true}}}},"failover_deployment_model":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"recovery_group":{"type":"TypeSet","computed":true,"elem":{"schema":{"post_action":{"type":"TypeSet","computed":true,"elem":{"type":"TypeList","elem":{"schema":{"fabric_location":{"type":"TypeString","computed":true},"fail_over_directions":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"fail_over_types":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"manual_action_instruction":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"runbook_id":{"type":"TypeString","computed":true},"script_path":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}}},"pre_action":{"type":"TypeSet","computed":true,"elem":{"type":"TypeList","elem":{"schema":{"fabric_location":{"type":"TypeString","computed":true},"fail_over_directions":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"fail_over_types":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"manual_action_instruction":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"runbook_id":{"type":"TypeString","computed":true},"script_path":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}}},"replicated_protected_items":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true}}}},"recovery_vault_id":{"type":"TypeString","required":true},"source_recovery_fabric_id":{"type":"TypeString","computed":true},"target_recovery_fabric_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_snapshot":{"schema":{"creation_option":{"type":"TypeString","computed":true},"disk_size_gb":{"type":"TypeInt","computed":true},"encryption_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"disk_encryption_key":{"type":"TypeList","computed":true,"elem":{"schema":{"secret_url":{"type":"TypeString","computed":true},"source_vault_id":{"type":"TypeString","computed":true}}}},"enabled":{"type":"TypeBool","computed":true},"key_encryption_key":{"type":"TypeList","computed":true,"elem":{"schema":{"key_url":{"type":"TypeString","computed":true},"source_vault_id":{"type":"TypeString","computed":true}}}}}}},"name":{"type":"TypeString","required":true},"os_type":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"source_resource_id":{"type":"TypeString","computed":true},"source_uri":{"type":"TypeString","computed":true},"storage_account_id":{"type":"TypeString","computed":true},"time_created":{"type":"TypeString","computed":true},"trusted_launch_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_source_control_token":{"schema":{"token":{"type":"TypeString","computed":true},"token_secret":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_spatial_anchors_account":{"schema":{"account_domain":{"type":"TypeString","computed":true},"account_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_spring_cloud_app":{"schema":{"fqdn":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"is_public":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"persistent_disk":{"type":"TypeList","computed":true,"elem":{"schema":{"mount_path":{"type":"TypeString","computed":true},"size_in_gb":{"type":"TypeInt","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"service_name":{"type":"TypeString","required":true},"tls_enabled":{"type":"TypeBool","computed":true},"url":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_spring_cloud_service":{"schema":{"config_server_git_setting":{"type":"TypeList","computed":true,"elem":{"schema":{"http_basic_auth":{"type":"TypeList","computed":true,"elem":{"schema":{"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"label":{"type":"TypeString","computed":true},"repository":{"type":"TypeList","computed":true,"elem":{"schema":{"http_basic_auth":{"type":"TypeList","computed":true,"elem":{"schema":{"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"label":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"pattern":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"search_paths":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ssh_auth":{"type":"TypeList","computed":true,"elem":{"schema":{"host_key":{"type":"TypeString","computed":true},"host_key_algorithm":{"type":"TypeString","computed":true},"private_key":{"type":"TypeString","computed":true},"strict_host_key_checking_enabled":{"type":"TypeBool","computed":true}}}},"uri":{"type":"TypeString","computed":true}}}},"search_paths":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ssh_auth":{"type":"TypeList","computed":true,"elem":{"schema":{"host_key":{"type":"TypeString","computed":true},"host_key_algorithm":{"type":"TypeString","computed":true},"private_key":{"type":"TypeString","computed":true},"strict_host_key_checking_enabled":{"type":"TypeBool","computed":true}}}},"uri":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"outbound_public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"required_network_traffic_rules":{"type":"TypeList","computed":true,"elem":{"schema":{"direction":{"type":"TypeString","computed":true},"fqdns":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"port":{"type":"TypeInt","computed":true},"protocol":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_ssh_public_key":{"schema":{"name":{"type":"TypeString","required":true},"public_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_stack_hci_cluster":{"schema":{"automanage_configuration_id":{"type":"TypeString","computed":true},"client_id":{"type":"TypeString","computed":true},"cloud_id":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"resource_provider_object_id":{"type":"TypeString","computed":true},"service_endpoint":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_static_web_app":{"schema":{"api_key":{"type":"TypeString","computed":true},"app_settings":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"basic_auth":{"type":"TypeList","computed":true,"elem":{"schema":{"environments":{"type":"TypeString","computed":true}}}},"configuration_file_changes_enabled":{"type":"TypeBool","computed":true},"default_host_name":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"preview_environments_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku_size":{"type":"TypeString","computed":true},"sku_tier":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_storage_account":{"schema":{"access_tier":{"type":"TypeString","computed":true},"account_kind":{"type":"TypeString","computed":true},"account_replication_type":{"type":"TypeString","computed":true},"account_tier":{"type":"TypeString","computed":true},"allow_nested_items_to_be_public":{"type":"TypeBool","computed":true},"azure_files_authentication":{"type":"TypeList","computed":true,"elem":{"schema":{"active_directory":{"type":"TypeList","computed":true,"elem":{"schema":{"domain_guid":{"type":"TypeString","computed":true},"domain_name":{"type":"TypeString","computed":true},"domain_sid":{"type":"TypeString","computed":true},"forest_name":{"type":"TypeString","computed":true},"netbios_domain_name":{"type":"TypeString","computed":true},"storage_sid":{"type":"TypeString","computed":true}}}},"default_share_level_permission":{"type":"TypeString","computed":true},"directory_type":{"type":"TypeString","computed":true}}}},"custom_domain":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true}}}},"dns_endpoint_type":{"type":"TypeString","computed":true},"https_traffic_only_enabled":{"type":"TypeBool","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"infrastructure_encryption_enabled":{"type":"TypeBool","computed":true},"is_hns_enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"min_tls_version":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"nfsv3_enabled":{"type":"TypeBool","computed":true},"primary_access_key":{"type":"TypeString","computed":true},"primary_blob_connection_string":{"type":"TypeString","computed":true},"primary_blob_endpoint":{"type":"TypeString","computed":true},"primary_blob_host":{"type":"TypeString","computed":true},"primary_blob_internet_endpoint":{"type":"TypeString","computed":true},"primary_blob_internet_host":{"type":"TypeString","computed":true},"primary_blob_microsoft_endpoint":{"type":"TypeString","computed":true},"primary_blob_microsoft_host":{"type":"TypeString","computed":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_dfs_endpoint":{"type":"TypeString","computed":true},"primary_dfs_host":{"type":"TypeString","computed":true},"primary_dfs_internet_endpoint":{"type":"TypeString","computed":true},"primary_dfs_internet_host":{"type":"TypeString","computed":true},"primary_dfs_microsoft_endpoint":{"type":"TypeString","computed":true},"primary_dfs_microsoft_host":{"type":"TypeString","computed":true},"primary_file_endpoint":{"type":"TypeString","computed":true},"primary_file_host":{"type":"TypeString","computed":true},"primary_file_internet_endpoint":{"type":"TypeString","computed":true},"primary_file_internet_host":{"type":"TypeString","computed":true},"primary_file_microsoft_endpoint":{"type":"TypeString","computed":true},"primary_file_microsoft_host":{"type":"TypeString","computed":true},"primary_location":{"type":"TypeString","computed":true},"primary_queue_endpoint":{"type":"TypeString","computed":true},"primary_queue_host":{"type":"TypeString","computed":true},"primary_queue_microsoft_endpoint":{"type":"TypeString","computed":true},"primary_queue_microsoft_host":{"type":"TypeString","computed":true},"primary_table_endpoint":{"type":"TypeString","computed":true},"primary_table_host":{"type":"TypeString","computed":true},"primary_table_microsoft_endpoint":{"type":"TypeString","computed":true},"primary_table_microsoft_host":{"type":"TypeString","computed":true},"primary_web_endpoint":{"type":"TypeString","computed":true},"primary_web_host":{"type":"TypeString","computed":true},"primary_web_internet_endpoint":{"type":"TypeString","computed":true},"primary_web_internet_host":{"type":"TypeString","computed":true},"primary_web_microsoft_endpoint":{"type":"TypeString","computed":true},"primary_web_microsoft_host":{"type":"TypeString","computed":true},"queue_encryption_key_type":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_access_key":{"type":"TypeString","computed":true},"secondary_blob_connection_string":{"type":"TypeString","computed":true},"secondary_blob_endpoint":{"type":"TypeString","computed":true},"secondary_blob_host":{"type":"TypeString","computed":true},"secondary_blob_internet_endpoint":{"type":"TypeString","computed":true},"secondary_blob_internet_host":{"type":"TypeString","computed":true},"secondary_blob_microsoft_endpoint":{"type":"TypeString","computed":true},"secondary_blob_microsoft_host":{"type":"TypeString","computed":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_dfs_endpoint":{"type":"TypeString","computed":true},"secondary_dfs_host":{"type":"TypeString","computed":true},"secondary_dfs_internet_endpoint":{"type":"TypeString","computed":true},"secondary_dfs_internet_host":{"type":"TypeString","computed":true},"secondary_dfs_microsoft_endpoint":{"type":"TypeString","computed":true},"secondary_dfs_microsoft_host":{"type":"TypeString","computed":true},"secondary_file_endpoint":{"type":"TypeString","computed":true},"secondary_file_host":{"type":"TypeString","computed":true},"secondary_file_internet_endpoint":{"type":"TypeString","computed":true},"secondary_file_internet_host":{"type":"TypeString","computed":true},"secondary_file_microsoft_endpoint":{"type":"TypeString","computed":true},"secondary_file_microsoft_host":{"type":"TypeString","computed":true},"secondary_location":{"type":"TypeString","computed":true},"secondary_queue_endpoint":{"type":"TypeString","computed":true},"secondary_queue_host":{"type":"TypeString","computed":true},"secondary_queue_microsoft_endpoint":{"type":"TypeString","computed":true},"secondary_queue_microsoft_host":{"type":"TypeString","computed":true},"secondary_table_endpoint":{"type":"TypeString","computed":true},"secondary_table_host":{"type":"TypeString","computed":true},"secondary_table_microsoft_endpoint":{"type":"TypeString","computed":true},"secondary_table_microsoft_host":{"type":"TypeString","computed":true},"secondary_web_endpoint":{"type":"TypeString","computed":true},"secondary_web_host":{"type":"TypeString","computed":true},"secondary_web_internet_endpoint":{"type":"TypeString","computed":true},"secondary_web_internet_host":{"type":"TypeString","computed":true},"secondary_web_microsoft_endpoint":{"type":"TypeString","computed":true},"secondary_web_microsoft_host":{"type":"TypeString","computed":true},"table_encryption_key_type":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_storage_account_blob_container_sas":{"schema":{"cache_control":{"type":"TypeString","optional":true},"connection_string":{"type":"TypeString","required":true},"container_name":{"type":"TypeString","required":true},"content_disposition":{"type":"TypeString","optional":true},"content_encoding":{"type":"TypeString","optional":true},"content_language":{"type":"TypeString","optional":true},"content_type":{"type":"TypeString","optional":true},"expiry":{"type":"TypeString","required":true},"https_only":{"type":"TypeBool","optional":true,"default":true},"ip_address":{"type":"TypeString","optional":true},"permissions":{"type":"TypeList","required":true,"elem":{"schema":{"add":{"type":"TypeBool","required":true},"create":{"type":"TypeBool","required":true},"delete":{"type":"TypeBool","required":true},"list":{"type":"TypeBool","required":true},"read":{"type":"TypeBool","required":true},"write":{"type":"TypeBool","required":true}}},"maxItems":1},"sas":{"type":"TypeString","computed":true},"start":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_storage_account_sas":{"schema":{"connection_string":{"type":"TypeString","required":true},"expiry":{"type":"TypeString","required":true},"https_only":{"type":"TypeBool","optional":true,"default":true},"ip_addresses":{"type":"TypeString","optional":true},"permissions":{"type":"TypeList","required":true,"elem":{"schema":{"add":{"type":"TypeBool","required":true},"create":{"type":"TypeBool","required":true},"delete":{"type":"TypeBool","required":true},"filter":{"type":"TypeBool","required":true},"list":{"type":"TypeBool","required":true},"process":{"type":"TypeBool","required":true},"read":{"type":"TypeBool","required":true},"tag":{"type":"TypeBool","required":true},"update":{"type":"TypeBool","required":true},"write":{"type":"TypeBool","required":true}}},"maxItems":1},"resource_types":{"type":"TypeList","required":true,"elem":{"schema":{"container":{"type":"TypeBool","required":true},"object":{"type":"TypeBool","required":true},"service":{"type":"TypeBool","required":true}}},"maxItems":1},"sas":{"type":"TypeString","computed":true},"services":{"type":"TypeList","required":true,"elem":{"schema":{"blob":{"type":"TypeBool","required":true},"file":{"type":"TypeBool","required":true},"queue":{"type":"TypeBool","required":true},"table":{"type":"TypeBool","required":true}}},"maxItems":1},"signed_version":{"type":"TypeString","optional":true,"default":"2022-11-02"},"start":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_storage_blob":{"schema":{"access_tier":{"type":"TypeString","computed":true},"content_md5":{"type":"TypeString","computed":true},"content_type":{"type":"TypeString","computed":true},"encryption_scope":{"type":"TypeString","computed":true},"metadata":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"storage_account_name":{"type":"TypeString","required":true},"storage_container_name":{"type":"TypeString","required":true},"type":{"type":"TypeString","computed":true},"url":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_storage_container":{"schema":{"container_access_type":{"type":"TypeString","computed":true},"default_encryption_scope":{"type":"TypeString","computed":true},"encryption_scope_override_enabled":{"type":"TypeBool","computed":true},"has_immutability_policy":{"type":"TypeBool","computed":true},"has_legal_hold":{"type":"TypeBool","computed":true},"metadata":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"resource_manager_id":{"type":"TypeString","computed":true},"storage_account_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_storage_containers":{"schema":{"containers":{"type":"TypeList","computed":true,"elem":{"schema":{"data_plane_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"resource_manager_id":{"type":"TypeString","computed":true}}}},"name_prefix":{"type":"TypeString","optional":true},"storage_account_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_storage_encryption_scope":{"schema":{"key_vault_key_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"source":{"type":"TypeString","computed":true},"storage_account_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_storage_management_policy":{"schema":{"rule":{"type":"TypeList","computed":true,"elem":{"schema":{"actions":{"type":"TypeList","computed":true,"elem":{"schema":{"base_blob":{"type":"TypeList","computed":true,"elem":{"schema":{"auto_tier_to_hot_from_cool_enabled":{"type":"TypeBool","computed":true},"delete_after_days_since_creation_greater_than":{"type":"TypeInt","computed":true},"delete_after_days_since_last_access_time_greater_than":{"type":"TypeInt","computed":true},"delete_after_days_since_modification_greater_than":{"type":"TypeInt","computed":true},"tier_to_archive_after_days_since_creation_greater_than":{"type":"TypeInt","computed":true},"tier_to_archive_after_days_since_last_access_time_greater_than":{"type":"TypeInt","computed":true},"tier_to_archive_after_days_since_last_tier_change_greater_than":{"type":"TypeInt","computed":true},"tier_to_archive_after_days_since_modification_greater_than":{"type":"TypeInt","computed":true},"tier_to_cold_after_days_since_creation_greater_than":{"type":"TypeInt","computed":true},"tier_to_cold_after_days_since_last_access_time_greater_than":{"type":"TypeInt","computed":true},"tier_to_cold_after_days_since_modification_greater_than":{"type":"TypeInt","computed":true},"tier_to_cool_after_days_since_creation_greater_than":{"type":"TypeInt","computed":true},"tier_to_cool_after_days_since_last_access_time_greater_than":{"type":"TypeInt","computed":true},"tier_to_cool_after_days_since_modification_greater_than":{"type":"TypeInt","computed":true}}}},"snapshot":{"type":"TypeList","computed":true,"elem":{"schema":{"change_tier_to_archive_after_days_since_creation":{"type":"TypeInt","computed":true},"change_tier_to_cool_after_days_since_creation":{"type":"TypeInt","computed":true},"delete_after_days_since_creation_greater_than":{"type":"TypeInt","computed":true},"tier_to_archive_after_days_since_last_tier_change_greater_than":{"type":"TypeInt","computed":true},"tier_to_cold_after_days_since_creation_greater_than":{"type":"TypeInt","computed":true}}}},"version":{"type":"TypeList","computed":true,"elem":{"schema":{"change_tier_to_archive_after_days_since_creation":{"type":"TypeInt","computed":true},"change_tier_to_cool_after_days_since_creation":{"type":"TypeInt","computed":true},"delete_after_days_since_creation":{"type":"TypeInt","computed":true},"tier_to_archive_after_days_since_last_tier_change_greater_than":{"type":"TypeInt","computed":true},"tier_to_cold_after_days_since_creation_greater_than":{"type":"TypeInt","computed":true}}}}}}},"enabled":{"type":"TypeBool","computed":true},"filters":{"type":"TypeList","computed":true,"elem":{"schema":{"blob_types":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"match_blob_index_tag":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"operation":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"prefix_match":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}}},"name":{"type":"TypeString","computed":true}}}},"storage_account_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_storage_queue":{"schema":{"metadata":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"resource_manager_id":{"type":"TypeString","computed":true},"storage_account_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_storage_share":{"schema":{"acl":{"type":"TypeList","optional":true,"elem":{"schema":{"access_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"expiry":{"type":"TypeString","computed":true},"permissions":{"type":"TypeString","computed":true},"start":{"type":"TypeString","computed":true}}}},"id":{"type":"TypeString","computed":true}}}},"metadata":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"quota":{"type":"TypeInt","computed":true},"resource_manager_id":{"type":"TypeString","computed":true},"storage_account_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_storage_sync":{"schema":{"incoming_traffic_policy":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_storage_sync_group":{"schema":{"name":{"type":"TypeString","required":true},"storage_sync_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_storage_table":{"schema":{"acl":{"type":"TypeSet","computed":true,"elem":{"schema":{"access_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"expiry":{"type":"TypeString","computed":true},"permissions":{"type":"TypeString","computed":true},"start":{"type":"TypeString","computed":true}}}},"id":{"type":"TypeString","computed":true}}}},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_manager_id":{"type":"TypeString","computed":true},"storage_account_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_storage_table_entities":{"schema":{"filter":{"type":"TypeString","required":true},"items":{"type":"TypeList","computed":true,"elem":{"schema":{"partition_key":{"type":"TypeString","computed":true},"properties":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"row_key":{"type":"TypeString","computed":true}}}},"select":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"storage_table_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_storage_table_entity":{"schema":{"entity":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"partition_key":{"type":"TypeString","required":true},"row_key":{"type":"TypeString","required":true},"storage_table_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_stream_analytics_job":{"schema":{"compatibility_level":{"type":"TypeString","computed":true},"data_locale":{"type":"TypeString","computed":true},"events_late_arrival_max_delay_in_seconds":{"type":"TypeInt","computed":true},"events_out_of_order_max_delay_in_seconds":{"type":"TypeInt","computed":true},"events_out_of_order_policy":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"job_id":{"type":"TypeString","computed":true},"last_output_time":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"output_error_policy":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"start_mode":{"type":"TypeString","computed":true},"start_time":{"type":"TypeString","computed":true},"streaming_units":{"type":"TypeInt","computed":true},"transformation_query":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_subnet":{"schema":{"address_prefix":{"type":"TypeString","computed":true},"address_prefixes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"default_outbound_access_enabled":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"network_security_group_id":{"type":"TypeString","computed":true},"private_endpoint_network_policies":{"type":"TypeString","computed":true},"private_link_service_network_policies_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"route_table_id":{"type":"TypeString","computed":true},"service_endpoints":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"virtual_network_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_subscription":{"schema":{"display_name":{"type":"TypeString","computed":true},"location_placement_id":{"type":"TypeString","computed":true},"quota_id":{"type":"TypeString","computed":true},"spending_limit":{"type":"TypeString","computed":true},"state":{"type":"TypeString","computed":true},"subscription_id":{"type":"TypeString","optional":true,"computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_subscription_template_deployment":{"schema":{"name":{"type":"TypeString","required":true},"output_content":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_subscriptions":{"schema":{"display_name_contains":{"type":"TypeString","optional":true},"display_name_prefix":{"type":"TypeString","optional":true},"subscriptions":{"type":"TypeList","computed":true,"elem":{"schema":{"display_name":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"location_placement_id":{"type":"TypeString","computed":true},"quota_id":{"type":"TypeString","computed":true},"spending_limit":{"type":"TypeString","computed":true},"state":{"type":"TypeString","computed":true},"subscription_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_synapse_workspace":{"schema":{"connectivity_endpoints":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_system_center_virtual_machine_manager_inventory_items":{"schema":{"inventory_items":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"uuid":{"type":"TypeString","computed":true}}}},"inventory_type":{"type":"TypeString","required":true},"system_center_virtual_machine_manager_server_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_template_spec_version":{"schema":{"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"template_body":{"type":"TypeString","computed":true},"version":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_tenant_template_deployment":{"schema":{"name":{"type":"TypeString","required":true},"output_content":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_traffic_manager_geographical_location":{"schema":{"name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_traffic_manager_profile":{"schema":{"dns_config":{"type":"TypeList","computed":true,"elem":{"schema":{"relative_name":{"type":"TypeString","computed":true},"ttl":{"type":"TypeInt","computed":true}}}},"fqdn":{"type":"TypeString","computed":true},"monitor_config":{"type":"TypeList","computed":true,"elem":{"schema":{"custom_header":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"expected_status_code_ranges":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"interval_in_seconds":{"type":"TypeInt","computed":true},"path":{"type":"TypeString","computed":true},"port":{"type":"TypeInt","computed":true},"protocol":{"type":"TypeString","computed":true},"timeout_in_seconds":{"type":"TypeInt","computed":true},"tolerated_number_of_failures":{"type":"TypeInt","computed":true}}}},"name":{"type":"TypeString","required":true},"profile_status":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"traffic_routing_method":{"type":"TypeString","computed":true},"traffic_view_enabled":{"type":"TypeBool","optional":true}},"timeouts":{"read":5}},"azurerm_user_assigned_identity":{"schema":{"client_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"principal_id":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_virtual_desktop_application_group":{"schema":{"description":{"type":"TypeString","computed":true},"friendly_name":{"type":"TypeString","computed":true},"host_pool_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true},"workspace_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_virtual_desktop_host_pool":{"schema":{"custom_rdp_properties":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"friendly_name":{"type":"TypeString","computed":true},"load_balancer_type":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"maximum_sessions_allowed":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true},"personal_desktop_assignment_type":{"type":"TypeString","computed":true},"preferred_app_group_type":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"scheduled_agent_updates":{"type":"TypeList","computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","computed":true},"schedule":{"type":"TypeList","computed":true,"elem":{"schema":{"day_of_week":{"type":"TypeString","computed":true},"hour_of_day":{"type":"TypeInt","computed":true}}}},"timezone":{"type":"TypeString","computed":true},"use_session_host_timezone":{"type":"TypeBool","computed":true}}}},"start_vm_on_connect":{"type":"TypeBool","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true},"validate_environment":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_virtual_desktop_workspace":{"schema":{"description":{"type":"TypeString","computed":true},"friendly_name":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_virtual_hub":{"schema":{"address_prefix":{"type":"TypeString","computed":true},"default_route_table_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"virtual_router_asn":{"type":"TypeInt","computed":true},"virtual_router_ips":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"virtual_wan_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_virtual_hub_connection":{"schema":{"internet_security_enabled":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"remote_virtual_network_id":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"routing":{"type":"TypeList","computed":true,"elem":{"schema":{"associated_route_table_id":{"type":"TypeString","computed":true},"inbound_route_map_id":{"type":"TypeString","computed":true},"outbound_route_map_id":{"type":"TypeString","computed":true},"propagated_route_table":{"type":"TypeList","computed":true,"elem":{"schema":{"labels":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"route_table_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"static_vnet_local_route_override_criteria":{"type":"TypeString","computed":true},"static_vnet_route":{"type":"TypeList","computed":true,"elem":{"schema":{"address_prefixes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"next_hop_ip_address":{"type":"TypeString","computed":true}}}}}}},"virtual_hub_id":{"type":"TypeString","computed":true},"virtual_hub_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_virtual_hub_route_table":{"schema":{"labels":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"route":{"type":"TypeList","computed":true,"elem":{"schema":{"destinations":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"destinations_type":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"next_hop":{"type":"TypeString","computed":true},"next_hop_type":{"type":"TypeString","computed":true}}}},"virtual_hub_id":{"type":"TypeString","computed":true},"virtual_hub_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_virtual_machine":{"schema":{"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"power_state":{"type":"TypeString","computed":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"public_ip_address":{"type":"TypeString","computed":true},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_virtual_machine_scale_set":{"schema":{"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"instances":{"type":"TypeList","computed":true,"elem":{"schema":{"computer_name":{"type":"TypeString","computed":true},"instance_id":{"type":"TypeString","computed":true},"latest_model_applied":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","computed":true},"power_state":{"type":"TypeString","computed":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"public_ip_address":{"type":"TypeString","computed":true},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"virtual_machine_id":{"type":"TypeString","computed":true},"zone":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"network_interface":{"type":"TypeList","computed":true,"elem":{"schema":{"dns_servers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"enable_accelerated_networking":{"type":"TypeBool","computed":true},"enable_ip_forwarding":{"type":"TypeBool","computed":true},"ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"application_gateway_backend_address_pool_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"application_security_group_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"load_balancer_backend_address_pool_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"load_balancer_inbound_nat_rules_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"primary":{"type":"TypeBool","computed":true},"public_ip_address":{"type":"TypeList","computed":true,"elem":{"schema":{"domain_name_label":{"type":"TypeString","computed":true},"idle_timeout_in_minutes":{"type":"TypeInt","computed":true},"ip_tag":{"type":"TypeList","computed":true,"elem":{"schema":{"tag":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","computed":true},"public_ip_prefix_id":{"type":"TypeString","computed":true},"version":{"type":"TypeString","computed":true}}}},"subnet_id":{"type":"TypeString","computed":true},"version":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","computed":true},"network_security_group_id":{"type":"TypeString","computed":true},"primary":{"type":"TypeBool","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_virtual_network":{"schema":{"address_space":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"dns_servers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"guid":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"subnets":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"vnet_peerings":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"vnet_peerings_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_virtual_network_gateway":{"schema":{"active_active":{"type":"TypeBool","computed":true},"bgp_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"asn":{"type":"TypeInt","computed":true},"peer_weight":{"type":"TypeInt","computed":true},"peering_address":{"type":"TypeString","computed":true}}}},"custom_route":{"type":"TypeList","computed":true,"elem":{"schema":{"address_prefixes":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}}},"default_local_network_gateway_id":{"type":"TypeString","computed":true},"enable_bgp":{"type":"TypeBool","computed":true},"generation":{"type":"TypeString","computed":true},"ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_address_allocation":{"type":"TypeString","computed":true},"public_ip_address_id":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"private_ip_address_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true},"vpn_client_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"aad_audience":{"type":"TypeString","computed":true},"aad_issuer":{"type":"TypeString","computed":true},"aad_tenant":{"type":"TypeString","computed":true},"address_space":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"radius_server_address":{"type":"TypeString","computed":true},"radius_server_secret":{"type":"TypeString","computed":true},"revoked_certificate":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}}},"root_certificate":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"public_cert_data":{"type":"TypeString","computed":true}}}},"vpn_client_protocols":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}}},"vpn_type":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_virtual_network_gateway_connection":{"schema":{"authorization_key":{"type":"TypeString","computed":true},"connection_protocol":{"type":"TypeString","computed":true},"dpd_timeout_seconds":{"type":"TypeInt","computed":true},"egress_bytes_transferred":{"type":"TypeInt","computed":true},"enable_bgp":{"type":"TypeBool","computed":true},"express_route_circuit_id":{"type":"TypeString","computed":true},"express_route_gateway_bypass":{"type":"TypeBool","computed":true},"ingress_bytes_transferred":{"type":"TypeInt","computed":true},"ipsec_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"dh_group":{"type":"TypeString","computed":true},"ike_encryption":{"type":"TypeString","computed":true},"ike_integrity":{"type":"TypeString","computed":true},"ipsec_encryption":{"type":"TypeString","computed":true},"ipsec_integrity":{"type":"TypeString","computed":true},"pfs_group":{"type":"TypeString","computed":true},"sa_datasize":{"type":"TypeInt","computed":true},"sa_lifetime":{"type":"TypeInt","computed":true}}}},"local_azure_ip_address_enabled":{"type":"TypeBool","computed":true},"local_network_gateway_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"peer_virtual_network_gateway_id":{"type":"TypeString","computed":true},"private_link_fast_path_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"resource_guid":{"type":"TypeString","computed":true},"routing_weight":{"type":"TypeInt","computed":true},"shared_key":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"traffic_selector_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"local_address_cidrs":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"remote_address_cidrs":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"type":{"type":"TypeString","computed":true},"use_policy_based_traffic_selectors":{"type":"TypeBool","computed":true},"virtual_network_gateway_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_virtual_wan":{"schema":{"allow_branch_to_branch_traffic":{"type":"TypeBool","computed":true},"disable_vpn_encryption":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"office365_local_breakout_category":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"virtual_hub_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"vpn_site_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_vmware_private_cloud":{"schema":{"circuit":{"type":"TypeList","computed":true,"elem":{"schema":{"express_route_id":{"type":"TypeString","computed":true},"express_route_private_peering_id":{"type":"TypeString","computed":true},"primary_subnet_cidr":{"type":"TypeString","computed":true},"secondary_subnet_cidr":{"type":"TypeString","computed":true}}}},"hcx_cloud_manager_endpoint":{"type":"TypeString","computed":true},"internet_connection_enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"management_cluster":{"type":"TypeList","computed":true,"elem":{"schema":{"hosts":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"id":{"type":"TypeInt","computed":true},"size":{"type":"TypeInt","computed":true}}}},"management_subnet_cidr":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"network_subnet_cidr":{"type":"TypeString","computed":true},"nsxt_certificate_thumbprint":{"type":"TypeString","computed":true},"nsxt_manager_endpoint":{"type":"TypeString","computed":true},"provisioning_subnet_cidr":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"vcenter_certificate_thumbprint":{"type":"TypeString","computed":true},"vcsa_endpoint":{"type":"TypeString","computed":true},"vmotion_subnet_cidr":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_vpn_gateway":{"schema":{"bgp_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"asn":{"type":"TypeInt","computed":true},"bgp_peering_address":{"type":"TypeString","computed":true},"instance_0_bgp_peering_address":{"type":"TypeList","computed":true,"elem":{"schema":{"custom_ips":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"default_ips":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ip_configuration_id":{"type":"TypeString","computed":true},"tunnel_ips":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"instance_1_bgp_peering_address":{"type":"TypeList","computed":true,"elem":{"schema":{"custom_ips":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"default_ips":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ip_configuration_id":{"type":"TypeString","computed":true},"tunnel_ips":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"peer_weight":{"type":"TypeInt","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"scale_unit":{"type":"TypeInt","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"virtual_hub_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_web_application_firewall_policy":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_web_pubsub":{"schema":{"aad_auth_enabled":{"type":"TypeBool","computed":true},"capacity":{"type":"TypeInt","computed":true},"external_ip":{"type":"TypeString","computed":true},"hostname":{"type":"TypeString","computed":true},"local_auth_enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"primary_access_key":{"type":"TypeString","computed":true},"primary_connection_string":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"public_port":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_access_key":{"type":"TypeString","computed":true},"secondary_connection_string":{"type":"TypeString","computed":true},"server_port":{"type":"TypeInt","computed":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tls_client_cert_enabled":{"type":"TypeBool","computed":true},"version":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_web_pubsub_private_link_resource":{"schema":{"shared_private_link_resource_types":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"subresource_name":{"type":"TypeString","computed":true}}}},"web_pubsub_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_windows_function_app":{"schema":{"app_settings":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"active_directory":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","description":"The list of Allowed audience values considered when validating JWTs issued by Azure Active Directory.","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The ID of the Client to use to authenticate with Azure Active Directory.","computed":true},"client_secret":{"type":"TypeString","description":"The Client Secret for the Client ID.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the client secret of the Client.","computed":true}}}},"additional_login_parameters":{"type":"TypeMap","description":"The map of Login Parameters sent to the OpenID Connect authorization endpoint when a user logs in.","computed":true,"elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","description":"Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","description":"The default authentication provider used when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`.","computed":true},"enabled":{"type":"TypeBool","description":"Is the Authentication / Authorization feature enabled?","computed":true},"facebook":{"type":"TypeList","computed":true,"elem":{"schema":{"app_id":{"type":"TypeString","description":"The App ID of the Facebook app used for login.","computed":true},"app_secret":{"type":"TypeString","description":"The App Secret of the Facebook app used for Facebook Login.","computed":true},"app_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `app_secret` value used for Facebook Login.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of Facebook Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"github":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The ID of the GitHub app used for login.","computed":true},"client_secret":{"type":"TypeString","description":"The Client Secret of the GitHub app used for GitHub Login.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for GitHub Login.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of GitHub Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"google":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The OpenID Connect Client ID for the Google web application.","computed":true},"client_secret":{"type":"TypeString","description":"The client secret associated with the Google web application.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for Google Login.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes that requested as part of Google Sign-In authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"issuer":{"type":"TypeString","description":"The OpenID Connect Issuer URI that represents the entity which issues access tokens.","computed":true},"microsoft":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The OAuth 2.0 client ID that was created for the app used for authentication.","computed":true},"client_secret":{"type":"TypeString","description":"The OAuth 2.0 client secret that was created for the app used for authentication.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of Microsoft Account authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"runtime_version":{"type":"TypeString","description":"The RuntimeVersion of the Authentication / Authorization feature in use.","computed":true},"token_refresh_extension_hours":{"type":"TypeFloat","description":"The number of hours after session token expiration that a session token can be used to call the token refresh API.","computed":true},"token_store_enabled":{"type":"TypeBool","description":"Are platform-specific security tokens that are obtained during login flows durably stored?","computed":true},"twitter":{"type":"TypeList","computed":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in.","computed":true},"consumer_secret":{"type":"TypeString","description":"The OAuth 1.0a consumer secret of the Twitter application used for sign-in.","computed":true},"consumer_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in.","computed":true}}}},"unauthenticated_client_action":{"type":"TypeString","description":"The action taken when an unauthenticated client attempts to access the app.","computed":true}}}},"auth_settings_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"active_directory_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_applications":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allowed_audiences":{"type":"TypeList","description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","computed":true,"elem":{"type":"TypeString"}},"allowed_groups":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allowed_identities":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The ID of the Client to use to authenticate with Azure Active Directory.","computed":true},"client_secret_certificate_thumbprint":{"type":"TypeString","description":"The thumbprint of the certificate used for signing purposes.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the client secret of the Client.","computed":true},"jwt_allowed_client_applications":{"type":"TypeList","description":"A list of Allowed Client Applications in the JWT Claim.","computed":true,"elem":{"type":"TypeString"}},"jwt_allowed_groups":{"type":"TypeList","description":"A list of Allowed Groups in the JWT Claim.","computed":true,"elem":{"type":"TypeString"}},"login_parameters":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tenant_auth_endpoint":{"type":"TypeString","description":"The Azure Tenant URI for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`","computed":true},"www_authentication_disabled":{"type":"TypeBool","description":"Is the www-authenticate provider omitted from the request?","computed":true}}}},"apple_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The OpenID Connect Client ID for the Apple web application.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for Apple Login.","computed":true},"login_scopes":{"type":"TypeList","description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of Apple Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","computed":true,"elem":{"type":"TypeString"}}}}},"auth_enabled":{"type":"TypeBool","description":"Is the AuthV2 Settings be enabled.","computed":true},"azure_static_web_app_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The ID of the Client used to authenticate with Azure Static Web App Authentication.","computed":true}}}},"config_file_path":{"type":"TypeString","description":"The path to the App Auth settings.","computed":true},"custom_oidc_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"authorisation_endpoint":{"type":"TypeString","description":"The endpoint to make the Authorisation Request.","computed":true},"certification_uri":{"type":"TypeString","description":"The endpoint that provides the keys necessary to validate the token.","computed":true},"client_credential_method":{"type":"TypeString","description":"The Client Credential Method used. Currently the only supported value is `ClientSecretPost`","computed":true},"client_id":{"type":"TypeString","description":"The ID of the Client used to authenticate with this Custom OIDC.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the secret for this Custom OIDC Client.","computed":true},"issuer_endpoint":{"type":"TypeString","description":"The endpoint that issued the Token.","computed":true},"name":{"type":"TypeString","description":"The name of the Custom OIDC Authentication Provider.","computed":true},"name_claim_type":{"type":"TypeString","description":"The name of the claim that contains the users name.","computed":true},"openid_configuration_endpoint":{"type":"TypeString","description":"The endpoint that contains all the configuration endpoints for this Custom OIDC provider.","computed":true},"scopes":{"type":"TypeList","description":"The list of the scopes that should be requested while authenticating.","computed":true,"elem":{"type":"TypeString"}},"token_endpoint":{"type":"TypeString","description":"The endpoint used to request a Token.","computed":true}}}},"default_provider":{"type":"TypeString","description":"The Default Authentication Provider used when the `unauthenticated_action` is set to `RedirectToLoginPage`.","computed":true},"excluded_paths":{"type":"TypeList","description":"The paths which are excluded from the `unauthenticated_action` when it is set to `RedirectToLoginPage`.","computed":true,"elem":{"type":"TypeString"}},"facebook_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"app_id":{"type":"TypeString","description":"The App ID of the Facebook app used for login.","computed":true},"app_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `app_secret` value used for Facebook Login.","computed":true},"graph_api_version":{"type":"TypeString","description":"The version of the Facebook API to be used while logging in.","computed":true},"login_scopes":{"type":"TypeList","description":"Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"forward_proxy_convention":{"type":"TypeString","description":"The convention used to determine the url of the request made.","computed":true},"forward_proxy_custom_host_header_name":{"type":"TypeString","description":"The name of the header containing the host of the request.","computed":true},"forward_proxy_custom_scheme_header_name":{"type":"TypeString","description":"The name of the header containing the scheme of the request.","computed":true},"github_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The ID of the GitHub app used for login.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for GitHub Login.","computed":true},"login_scopes":{"type":"TypeList","description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"google_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","description":"Specifies a list of Allowed Audiences that will be requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The OpenID Connect Client ID for the Google web application.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for Google Login.","computed":true},"login_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","computed":true,"elem":{"type":"TypeString"}}}}},"http_route_api_prefix":{"type":"TypeString","description":"The prefix that precedes all the authentication and authorisation paths.","computed":true},"login":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_external_redirect_urls":{"type":"TypeList","description":"External URLs that can be redirected to as part of logging in or logging out of the app. This is an advanced setting typically only needed by Windows Store application backends. **Note:** URLs within the current domain are always implicitly allowed.","computed":true,"elem":{"type":"TypeString"}},"cookie_expiration_convention":{"type":"TypeString","computed":true},"cookie_expiration_time":{"type":"TypeString","description":"The time after the request is made when the session cookie will expire.","computed":true},"logout_endpoint":{"type":"TypeString","description":"The endpoint to which logout requests are made.","computed":true},"nonce_expiration_time":{"type":"TypeString","description":"The time after the request is made when the nonce will expire.","computed":true},"preserve_url_fragments_for_logins":{"type":"TypeBool","description":"Are the fragments from the request be preserved after the login request is made.","computed":true},"token_refresh_extension_time":{"type":"TypeFloat","description":"The number of hours after session token expiration that a session token can be used to call the token refresh API.","computed":true},"token_store_enabled":{"type":"TypeBool","description":"Is the Token Store configuration Enabled.","computed":true},"token_store_path":{"type":"TypeString","description":"The directory path in the App Filesystem in which the tokens are stored.","computed":true},"token_store_sas_setting_name":{"type":"TypeString","description":"The name of the app setting which contains the SAS URL of the blob storage containing the tokens.","computed":true},"validate_nonce":{"type":"TypeBool","description":"Is the nonce be validated while completing the login flow.","computed":true}}}},"microsoft_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","description":"Specifies a list of Allowed Audiences that will be requested as part of Microsoft Sign-In authentication.","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The OAuth 2.0 client ID that was created for the app used for authentication.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication.","computed":true},"login_scopes":{"type":"TypeList","description":"The list of Login scopes that will be requested as part of Microsoft Account authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"require_authentication":{"type":"TypeBool","description":"Is the authentication flow used for all requests.","computed":true},"require_https":{"type":"TypeBool","description":"Is HTTPS required on connections?","computed":true},"runtime_version":{"type":"TypeString","description":"The Runtime Version of the Authentication and Authorisation feature of this App.","computed":true},"twitter_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in.","computed":true},"consumer_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in.","computed":true}}}},"unauthenticated_action":{"type":"TypeString","computed":true}}}},"backup":{"type":"TypeList","computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","description":"Is this backup job enabled?","computed":true},"name":{"type":"TypeString","description":"The name of this Backup.","computed":true},"schedule":{"type":"TypeList","computed":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","description":"How often the backup should is executed in multiples of the `frequency_unit`.","computed":true},"frequency_unit":{"type":"TypeString","description":"The unit of time for how often the backup takes place.","computed":true},"keep_at_least_one_backup":{"type":"TypeBool","description":"Does the service keep at least one backup, regardless of age of backup.","computed":true},"last_execution_time":{"type":"TypeString","description":"The time the backup was last attempted.","computed":true},"retention_period_days":{"type":"TypeInt","description":"After how many days are backups deleted.","computed":true},"start_time":{"type":"TypeString","description":"When the schedule should start working in RFC-3339 format.","computed":true}}}},"storage_account_url":{"type":"TypeString","description":"The SAS URL to the container.","computed":true}}}},"builtin_logging_enabled":{"type":"TypeBool","computed":true},"client_certificate_enabled":{"type":"TypeBool","computed":true},"client_certificate_exclusion_paths":{"type":"TypeString","description":"Paths to exclude when using client certificates, separated by ;","computed":true},"client_certificate_mode":{"type":"TypeString","computed":true},"connection_string":{"type":"TypeSet","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The name of this Connection.","computed":true},"type":{"type":"TypeString","description":"The type of database.","computed":true},"value":{"type":"TypeString","description":"The connection string value.","computed":true}}}},"content_share_force_disabled":{"type":"TypeBool","computed":true},"custom_domain_verification_id":{"type":"TypeString","computed":true},"daily_memory_time_quota":{"type":"TypeInt","computed":true},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","computed":true},"ftp_publish_basic_authentication_enabled":{"type":"TypeBool","computed":true},"functions_extension_version":{"type":"TypeString","computed":true},"hosting_environment_id":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"service_plan_id":{"type":"TypeString","computed":true},"site_config":{"type":"TypeList","computed":true,"elem":{"schema":{"always_on":{"type":"TypeBool","computed":true},"api_definition_url":{"type":"TypeString","computed":true},"api_management_api_id":{"type":"TypeString","computed":true},"app_command_line":{"type":"TypeString","computed":true},"app_scale_limit":{"type":"TypeInt","computed":true},"app_service_logs":{"type":"TypeList","computed":true,"elem":{"schema":{"disk_quota_mb":{"type":"TypeInt","computed":true},"retention_period_days":{"type":"TypeInt","computed":true}}}},"application_insights_connection_string":{"type":"TypeString","computed":true},"application_insights_key":{"type":"TypeString","computed":true},"application_stack":{"type":"TypeList","computed":true,"elem":{"schema":{"dotnet_version":{"type":"TypeString","computed":true},"java_version":{"type":"TypeString","computed":true},"node_version":{"type":"TypeString","computed":true},"powershell_core_version":{"type":"TypeString","computed":true},"use_custom_runtime":{"type":"TypeBool","computed":true},"use_dotnet_isolated_runtime":{"type":"TypeBool","computed":true}}}},"cors":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeList","description":"The list of origins that are allowed to make cross-origin calls.","computed":true,"elem":{"type":"TypeString"}},"support_credentials":{"type":"TypeBool","description":"Are credentials allowed in CORS requests?","computed":true}}}},"default_documents":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"detailed_error_logging_enabled":{"type":"TypeBool","computed":true},"elastic_instance_minimum":{"type":"TypeInt","computed":true},"ftps_state":{"type":"TypeString","computed":true},"health_check_eviction_time_in_min":{"type":"TypeInt","computed":true},"health_check_path":{"type":"TypeString","computed":true},"http2_enabled":{"type":"TypeBool","computed":true},"ip_restriction":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","description":"The action to take.","computed":true},"description":{"type":"TypeString","description":"The description of the ip restriction rule.","computed":true},"headers":{"type":"TypeList","computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","description":"The list of Azure Front Door IDs.","computed":true,"elem":{"type":"TypeString"}},"x_fd_health_probe":{"type":"TypeList","description":"Specifies if a Front Door Health Probe is expected.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_for":{"type":"TypeList","description":"The list of addresses for which matching is applied.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_host":{"type":"TypeList","description":"The list of Hosts for which matching will be applied.","computed":true,"elem":{"type":"TypeString"}}}}},"ip_address":{"type":"TypeString","description":"The CIDR notation of the IP or IP Range to match.","computed":true},"name":{"type":"TypeString","description":"The name used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","description":"The priority value of this `ip_restriction`.","computed":true},"service_tag":{"type":"TypeString","description":"The Service Tag used for this IP Restriction.","computed":true},"virtual_network_subnet_id":{"type":"TypeString","description":"The Virtual Network Subnet ID used for this IP Restriction.","computed":true}}}},"ip_restriction_default_action":{"type":"TypeString","computed":true},"load_balancing_mode":{"type":"TypeString","computed":true},"managed_pipeline_mode":{"type":"TypeString","computed":true},"minimum_tls_version":{"type":"TypeString","computed":true},"pre_warmed_instance_count":{"type":"TypeInt","computed":true},"remote_debugging_enabled":{"type":"TypeBool","computed":true},"remote_debugging_version":{"type":"TypeString","computed":true},"runtime_scale_monitoring_enabled":{"type":"TypeBool","computed":true},"scm_ip_restriction":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","description":"The action to take.","computed":true},"description":{"type":"TypeString","description":"The description of the ip restriction rule.","computed":true},"headers":{"type":"TypeList","computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","description":"The list of Azure Front Door IDs.","computed":true,"elem":{"type":"TypeString"}},"x_fd_health_probe":{"type":"TypeList","description":"Specifies if a Front Door Health Probe is expected.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_for":{"type":"TypeList","description":"The list of addresses for which matching is applied.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_host":{"type":"TypeList","description":"The list of Hosts for which matching will be applied.","computed":true,"elem":{"type":"TypeString"}}}}},"ip_address":{"type":"TypeString","description":"The CIDR notation of the IP or IP Range to match.","computed":true},"name":{"type":"TypeString","description":"The name used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","description":"The priority value of this `ip_restriction`.","computed":true},"service_tag":{"type":"TypeString","description":"The Service Tag used for this IP Restriction.","computed":true},"virtual_network_subnet_id":{"type":"TypeString","description":"The Virtual Network Subnet ID used for this IP Restriction.","computed":true}}}},"scm_ip_restriction_default_action":{"type":"TypeString","computed":true},"scm_minimum_tls_version":{"type":"TypeString","computed":true},"scm_type":{"type":"TypeString","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","computed":true},"use_32_bit_worker":{"type":"TypeBool","computed":true},"vnet_route_all_enabled":{"type":"TypeBool","computed":true},"websockets_enabled":{"type":"TypeBool","computed":true},"windows_fx_version":{"type":"TypeString","computed":true},"worker_count":{"type":"TypeInt","computed":true}}}},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The Site Credentials Username used for publishing.","computed":true},"password":{"type":"TypeString","description":"The Site Credentials Password used for publishing.","computed":true}}}},"sticky_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"app_setting_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"connection_string_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"storage_account_access_key":{"type":"TypeString","computed":true},"storage_account_name":{"type":"TypeString","computed":true},"storage_key_vault_secret_id":{"type":"TypeString","description":"The Key Vault Secret ID, including version, that contains the Connection String used to connect to the storage account for this Function App.","computed":true},"storage_uses_managed_identity":{"type":"TypeBool","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"virtual_network_subnet_id":{"type":"TypeString","computed":true},"webdeploy_publish_basic_authentication_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"read":10}},"azurerm_windows_web_app":{"schema":{"app_settings":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"active_directory":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","description":"The list of Allowed audience values considered when validating JWTs issued by Azure Active Directory.","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The ID of the Client to use to authenticate with Azure Active Directory.","computed":true},"client_secret":{"type":"TypeString","description":"The Client Secret for the Client ID.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the client secret of the Client.","computed":true}}}},"additional_login_parameters":{"type":"TypeMap","description":"The map of Login Parameters sent to the OpenID Connect authorization endpoint when a user logs in.","computed":true,"elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","description":"Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","description":"The default authentication provider used when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`.","computed":true},"enabled":{"type":"TypeBool","description":"Is the Authentication / Authorization feature enabled?","computed":true},"facebook":{"type":"TypeList","computed":true,"elem":{"schema":{"app_id":{"type":"TypeString","description":"The App ID of the Facebook app used for login.","computed":true},"app_secret":{"type":"TypeString","description":"The App Secret of the Facebook app used for Facebook Login.","computed":true},"app_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `app_secret` value used for Facebook Login.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of Facebook Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"github":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The ID of the GitHub app used for login.","computed":true},"client_secret":{"type":"TypeString","description":"The Client Secret of the GitHub app used for GitHub Login.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for GitHub Login.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of GitHub Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"google":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The OpenID Connect Client ID for the Google web application.","computed":true},"client_secret":{"type":"TypeString","description":"The client secret associated with the Google web application.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for Google Login.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes that requested as part of Google Sign-In authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"issuer":{"type":"TypeString","description":"The OpenID Connect Issuer URI that represents the entity which issues access tokens.","computed":true},"microsoft":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The OAuth 2.0 client ID that was created for the app used for authentication.","computed":true},"client_secret":{"type":"TypeString","description":"The OAuth 2.0 client secret that was created for the app used for authentication.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of Microsoft Account authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"runtime_version":{"type":"TypeString","description":"The RuntimeVersion of the Authentication / Authorization feature in use.","computed":true},"token_refresh_extension_hours":{"type":"TypeFloat","description":"The number of hours after session token expiration that a session token can be used to call the token refresh API.","computed":true},"token_store_enabled":{"type":"TypeBool","description":"Are platform-specific security tokens that are obtained during login flows durably stored?","computed":true},"twitter":{"type":"TypeList","computed":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in.","computed":true},"consumer_secret":{"type":"TypeString","description":"The OAuth 1.0a consumer secret of the Twitter application used for sign-in.","computed":true},"consumer_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in.","computed":true}}}},"unauthenticated_client_action":{"type":"TypeString","description":"The action taken when an unauthenticated client attempts to access the app.","computed":true}}}},"auth_settings_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"active_directory_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_applications":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allowed_audiences":{"type":"TypeList","description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","computed":true,"elem":{"type":"TypeString"}},"allowed_groups":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allowed_identities":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The ID of the Client to use to authenticate with Azure Active Directory.","computed":true},"client_secret_certificate_thumbprint":{"type":"TypeString","description":"The thumbprint of the certificate used for signing purposes.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the client secret of the Client.","computed":true},"jwt_allowed_client_applications":{"type":"TypeList","description":"A list of Allowed Client Applications in the JWT Claim.","computed":true,"elem":{"type":"TypeString"}},"jwt_allowed_groups":{"type":"TypeList","description":"A list of Allowed Groups in the JWT Claim.","computed":true,"elem":{"type":"TypeString"}},"login_parameters":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tenant_auth_endpoint":{"type":"TypeString","description":"The Azure Tenant URI for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`","computed":true},"www_authentication_disabled":{"type":"TypeBool","description":"Is the www-authenticate provider omitted from the request?","computed":true}}}},"apple_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The OpenID Connect Client ID for the Apple web application.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for Apple Login.","computed":true},"login_scopes":{"type":"TypeList","description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of Apple Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","computed":true,"elem":{"type":"TypeString"}}}}},"auth_enabled":{"type":"TypeBool","description":"Is the AuthV2 Settings be enabled.","computed":true},"azure_static_web_app_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The ID of the Client used to authenticate with Azure Static Web App Authentication.","computed":true}}}},"config_file_path":{"type":"TypeString","description":"The path to the App Auth settings.","computed":true},"custom_oidc_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"authorisation_endpoint":{"type":"TypeString","description":"The endpoint to make the Authorisation Request.","computed":true},"certification_uri":{"type":"TypeString","description":"The endpoint that provides the keys necessary to validate the token.","computed":true},"client_credential_method":{"type":"TypeString","description":"The Client Credential Method used. Currently the only supported value is `ClientSecretPost`","computed":true},"client_id":{"type":"TypeString","description":"The ID of the Client used to authenticate with this Custom OIDC.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the secret for this Custom OIDC Client.","computed":true},"issuer_endpoint":{"type":"TypeString","description":"The endpoint that issued the Token.","computed":true},"name":{"type":"TypeString","description":"The name of the Custom OIDC Authentication Provider.","computed":true},"name_claim_type":{"type":"TypeString","description":"The name of the claim that contains the users name.","computed":true},"openid_configuration_endpoint":{"type":"TypeString","description":"The endpoint that contains all the configuration endpoints for this Custom OIDC provider.","computed":true},"scopes":{"type":"TypeList","description":"The list of the scopes that should be requested while authenticating.","computed":true,"elem":{"type":"TypeString"}},"token_endpoint":{"type":"TypeString","description":"The endpoint used to request a Token.","computed":true}}}},"default_provider":{"type":"TypeString","description":"The Default Authentication Provider used when the `unauthenticated_action` is set to `RedirectToLoginPage`.","computed":true},"excluded_paths":{"type":"TypeList","description":"The paths which are excluded from the `unauthenticated_action` when it is set to `RedirectToLoginPage`.","computed":true,"elem":{"type":"TypeString"}},"facebook_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"app_id":{"type":"TypeString","description":"The App ID of the Facebook app used for login.","computed":true},"app_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `app_secret` value used for Facebook Login.","computed":true},"graph_api_version":{"type":"TypeString","description":"The version of the Facebook API to be used while logging in.","computed":true},"login_scopes":{"type":"TypeList","description":"Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"forward_proxy_convention":{"type":"TypeString","description":"The convention used to determine the url of the request made.","computed":true},"forward_proxy_custom_host_header_name":{"type":"TypeString","description":"The name of the header containing the host of the request.","computed":true},"forward_proxy_custom_scheme_header_name":{"type":"TypeString","description":"The name of the header containing the scheme of the request.","computed":true},"github_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The ID of the GitHub app used for login.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for GitHub Login.","computed":true},"login_scopes":{"type":"TypeList","description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"google_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","description":"Specifies a list of Allowed Audiences that will be requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The OpenID Connect Client ID for the Google web application.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for Google Login.","computed":true},"login_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","computed":true,"elem":{"type":"TypeString"}}}}},"http_route_api_prefix":{"type":"TypeString","description":"The prefix that precedes all the authentication and authorisation paths.","computed":true},"login":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_external_redirect_urls":{"type":"TypeList","description":"External URLs that can be redirected to as part of logging in or logging out of the app. This is an advanced setting typically only needed by Windows Store application backends. **Note:** URLs within the current domain are always implicitly allowed.","computed":true,"elem":{"type":"TypeString"}},"cookie_expiration_convention":{"type":"TypeString","computed":true},"cookie_expiration_time":{"type":"TypeString","description":"The time after the request is made when the session cookie will expire.","computed":true},"logout_endpoint":{"type":"TypeString","description":"The endpoint to which logout requests are made.","computed":true},"nonce_expiration_time":{"type":"TypeString","description":"The time after the request is made when the nonce will expire.","computed":true},"preserve_url_fragments_for_logins":{"type":"TypeBool","description":"Are the fragments from the request be preserved after the login request is made.","computed":true},"token_refresh_extension_time":{"type":"TypeFloat","description":"The number of hours after session token expiration that a session token can be used to call the token refresh API.","computed":true},"token_store_enabled":{"type":"TypeBool","description":"Is the Token Store configuration Enabled.","computed":true},"token_store_path":{"type":"TypeString","description":"The directory path in the App Filesystem in which the tokens are stored.","computed":true},"token_store_sas_setting_name":{"type":"TypeString","description":"The name of the app setting which contains the SAS URL of the blob storage containing the tokens.","computed":true},"validate_nonce":{"type":"TypeBool","description":"Is the nonce be validated while completing the login flow.","computed":true}}}},"microsoft_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","description":"Specifies a list of Allowed Audiences that will be requested as part of Microsoft Sign-In authentication.","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The OAuth 2.0 client ID that was created for the app used for authentication.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication.","computed":true},"login_scopes":{"type":"TypeList","description":"The list of Login scopes that will be requested as part of Microsoft Account authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"require_authentication":{"type":"TypeBool","description":"Is the authentication flow used for all requests.","computed":true},"require_https":{"type":"TypeBool","description":"Is HTTPS required on connections?","computed":true},"runtime_version":{"type":"TypeString","description":"The Runtime Version of the Authentication and Authorisation feature of this App.","computed":true},"twitter_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in.","computed":true},"consumer_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in.","computed":true}}}},"unauthenticated_action":{"type":"TypeString","computed":true}}}},"backup":{"type":"TypeList","computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","description":"Is this backup job enabled?","computed":true},"name":{"type":"TypeString","description":"The name of this Backup.","computed":true},"schedule":{"type":"TypeList","computed":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","description":"How often the backup should is executed in multiples of the `frequency_unit`.","computed":true},"frequency_unit":{"type":"TypeString","description":"The unit of time for how often the backup takes place.","computed":true},"keep_at_least_one_backup":{"type":"TypeBool","description":"Does the service keep at least one backup, regardless of age of backup.","computed":true},"last_execution_time":{"type":"TypeString","description":"The time the backup was last attempted.","computed":true},"retention_period_days":{"type":"TypeInt","description":"After how many days are backups deleted.","computed":true},"start_time":{"type":"TypeString","description":"When the schedule should start working in RFC-3339 format.","computed":true}}}},"storage_account_url":{"type":"TypeString","description":"The SAS URL to the container.","computed":true}}}},"client_affinity_enabled":{"type":"TypeBool","computed":true},"client_certificate_enabled":{"type":"TypeBool","computed":true},"client_certificate_exclusion_paths":{"type":"TypeString","description":"Paths to exclude when using client certificates, separated by ;","computed":true},"client_certificate_mode":{"type":"TypeString","computed":true},"connection_string":{"type":"TypeSet","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The name of this Connection.","computed":true},"type":{"type":"TypeString","description":"The type of database.","computed":true},"value":{"type":"TypeString","description":"The connection string value.","computed":true}}}},"custom_domain_verification_id":{"type":"TypeString","computed":true},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","computed":true},"ftp_publish_basic_authentication_enabled":{"type":"TypeBool","computed":true},"hosting_environment_id":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"logs":{"type":"TypeList","computed":true,"elem":{"schema":{"application_logs":{"type":"TypeList","computed":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","computed":true,"elem":{"schema":{"level":{"type":"TypeString","computed":true},"retention_in_days":{"type":"TypeInt","computed":true},"sas_url":{"type":"TypeString","computed":true}}}},"file_system_level":{"type":"TypeString","computed":true}}}},"detailed_error_messages":{"type":"TypeBool","computed":true},"failed_request_tracing":{"type":"TypeBool","computed":true},"http_logs":{"type":"TypeList","computed":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","computed":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","computed":true},"sas_url":{"type":"TypeString","computed":true}}}},"file_system":{"type":"TypeList","computed":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","computed":true},"retention_in_mb":{"type":"TypeInt","computed":true}}}}}}}}}},"name":{"type":"TypeString","required":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"service_plan_id":{"type":"TypeString","computed":true},"site_config":{"type":"TypeList","computed":true,"elem":{"schema":{"always_on":{"type":"TypeBool","computed":true},"api_definition_url":{"type":"TypeString","computed":true},"api_management_api_id":{"type":"TypeString","computed":true},"app_command_line":{"type":"TypeString","computed":true},"application_stack":{"type":"TypeList","computed":true,"elem":{"schema":{"current_stack":{"type":"TypeString","computed":true},"docker_image_name":{"type":"TypeString","computed":true},"docker_registry_password":{"type":"TypeString","computed":true},"docker_registry_url":{"type":"TypeString","computed":true},"docker_registry_username":{"type":"TypeString","computed":true},"dotnet_core_version":{"type":"TypeString","computed":true},"dotnet_version":{"type":"TypeString","computed":true},"java_container":{"type":"TypeString","computed":true},"java_container_version":{"type":"TypeString","computed":true},"java_embedded_server_enabled":{"type":"TypeBool","computed":true},"java_version":{"type":"TypeString","computed":true},"node_version":{"type":"TypeString","computed":true},"php_version":{"type":"TypeString","computed":true},"python":{"type":"TypeBool","computed":true},"python_version":{"type":"TypeString","computed":true},"tomcat_version":{"type":"TypeString","computed":true}}}},"auto_heal_enabled":{"type":"TypeBool","computed":true},"auto_heal_setting":{"type":"TypeList","computed":true,"elem":{"schema":{"action":{"type":"TypeList","computed":true,"elem":{"schema":{"action_type":{"type":"TypeString","computed":true},"custom_action":{"type":"TypeList","computed":true,"elem":{"schema":{"executable":{"type":"TypeString","computed":true},"parameters":{"type":"TypeString","computed":true}}}},"minimum_process_execution_time":{"type":"TypeString","computed":true}}}},"trigger":{"type":"TypeList","computed":true,"elem":{"schema":{"private_memory_kb":{"type":"TypeInt","computed":true},"requests":{"type":"TypeList","computed":true,"elem":{"schema":{"count":{"type":"TypeInt","computed":true},"interval":{"type":"TypeString","computed":true}}}},"slow_request":{"type":"TypeList","computed":true,"elem":{"schema":{"count":{"type":"TypeInt","computed":true},"interval":{"type":"TypeString","computed":true},"path":{"type":"TypeString","computed":true},"time_taken":{"type":"TypeString","computed":true}}}},"slow_request_with_path":{"type":"TypeList","computed":true,"elem":{"schema":{"count":{"type":"TypeInt","computed":true},"interval":{"type":"TypeString","computed":true},"path":{"type":"TypeString","computed":true},"time_taken":{"type":"TypeString","computed":true}}}},"status_code":{"type":"TypeList","computed":true,"elem":{"schema":{"count":{"type":"TypeInt","computed":true},"interval":{"type":"TypeString","computed":true},"path":{"type":"TypeString","computed":true},"status_code_range":{"type":"TypeString","computed":true},"sub_status":{"type":"TypeInt","computed":true},"win32_status_code":{"type":"TypeInt","computed":true}}}}}}}}}},"container_registry_managed_identity_client_id":{"type":"TypeString","computed":true},"container_registry_use_managed_identity":{"type":"TypeBool","computed":true},"cors":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeList","description":"The list of origins that are allowed to make cross-origin calls.","computed":true,"elem":{"type":"TypeString"}},"support_credentials":{"type":"TypeBool","description":"Are credentials allowed in CORS requests?","computed":true}}}},"default_documents":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"detailed_error_logging_enabled":{"type":"TypeBool","computed":true},"ftps_state":{"type":"TypeString","computed":true},"handler_mapping":{"type":"TypeSet","computed":true,"elem":{"schema":{"arguments":{"type":"TypeString","computed":true},"extension":{"type":"TypeString","computed":true},"script_processor_path":{"type":"TypeString","computed":true}}}},"health_check_eviction_time_in_min":{"type":"TypeInt","computed":true},"health_check_path":{"type":"TypeString","computed":true},"http2_enabled":{"type":"TypeBool","computed":true},"ip_restriction":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","description":"The action to take.","computed":true},"description":{"type":"TypeString","description":"The description of the ip restriction rule.","computed":true},"headers":{"type":"TypeList","computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","description":"The list of Azure Front Door IDs.","computed":true,"elem":{"type":"TypeString"}},"x_fd_health_probe":{"type":"TypeList","description":"Specifies if a Front Door Health Probe is expected.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_for":{"type":"TypeList","description":"The list of addresses for which matching is applied.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_host":{"type":"TypeList","description":"The list of Hosts for which matching will be applied.","computed":true,"elem":{"type":"TypeString"}}}}},"ip_address":{"type":"TypeString","description":"The CIDR notation of the IP or IP Range to match.","computed":true},"name":{"type":"TypeString","description":"The name used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","description":"The priority value of this `ip_restriction`.","computed":true},"service_tag":{"type":"TypeString","description":"The Service Tag used for this IP Restriction.","computed":true},"virtual_network_subnet_id":{"type":"TypeString","description":"The Virtual Network Subnet ID used for this IP Restriction.","computed":true}}}},"ip_restriction_default_action":{"type":"TypeString","computed":true},"load_balancing_mode":{"type":"TypeString","computed":true},"local_mysql_enabled":{"type":"TypeBool","computed":true},"managed_pipeline_mode":{"type":"TypeString","computed":true},"minimum_tls_version":{"type":"TypeString","computed":true},"remote_debugging_enabled":{"type":"TypeBool","computed":true},"remote_debugging_version":{"type":"TypeString","computed":true},"scm_ip_restriction":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","description":"The action to take.","computed":true},"description":{"type":"TypeString","description":"The description of the ip restriction rule.","computed":true},"headers":{"type":"TypeList","computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","description":"The list of Azure Front Door IDs.","computed":true,"elem":{"type":"TypeString"}},"x_fd_health_probe":{"type":"TypeList","description":"Specifies if a Front Door Health Probe is expected.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_for":{"type":"TypeList","description":"The list of addresses for which matching is applied.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_host":{"type":"TypeList","description":"The list of Hosts for which matching will be applied.","computed":true,"elem":{"type":"TypeString"}}}}},"ip_address":{"type":"TypeString","description":"The CIDR notation of the IP or IP Range to match.","computed":true},"name":{"type":"TypeString","description":"The name used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","description":"The priority value of this `ip_restriction`.","computed":true},"service_tag":{"type":"TypeString","description":"The Service Tag used for this IP Restriction.","computed":true},"virtual_network_subnet_id":{"type":"TypeString","description":"The Virtual Network Subnet ID used for this IP Restriction.","computed":true}}}},"scm_ip_restriction_default_action":{"type":"TypeString","computed":true},"scm_minimum_tls_version":{"type":"TypeString","computed":true},"scm_type":{"type":"TypeString","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","computed":true},"use_32_bit_worker":{"type":"TypeBool","computed":true},"virtual_application":{"type":"TypeList","computed":true,"elem":{"schema":{"physical_path":{"type":"TypeString","computed":true},"preload":{"type":"TypeBool","computed":true},"virtual_directory":{"type":"TypeList","computed":true,"elem":{"schema":{"physical_path":{"type":"TypeString","computed":true},"virtual_path":{"type":"TypeString","computed":true}}}},"virtual_path":{"type":"TypeString","computed":true}}}},"vnet_route_all_enabled":{"type":"TypeBool","computed":true},"websockets_enabled":{"type":"TypeBool","computed":true},"windows_fx_version":{"type":"TypeString","computed":true},"worker_count":{"type":"TypeInt","computed":true}}}},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The Site Credentials Username used for publishing.","computed":true},"password":{"type":"TypeString","description":"The Site Credentials Password used for publishing.","computed":true}}}},"sticky_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"app_setting_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"connection_string_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"storage_account":{"type":"TypeList","computed":true,"elem":{"schema":{"access_key":{"type":"TypeString","computed":true},"account_name":{"type":"TypeString","computed":true},"mount_path":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"share_name":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"virtual_network_subnet_id":{"type":"TypeString","computed":true},"webdeploy_publish_basic_authentication_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"read":10}}}}} +{"providerName":"azurerm","schemaVersion":"1","providerSchema":{"schema":{"auxiliary_tenant_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":3},"client_certificate":{"type":"TypeString","optional":true,"description":"Base64 encoded PKCS#12 certificate bundle to use when authenticating as a Service Principal using a Client Certificate"},"client_certificate_password":{"type":"TypeString","optional":true,"description":"The password associated with the Client Certificate. For use when authenticating as a Service Principal using a Client Certificate"},"client_certificate_path":{"type":"TypeString","optional":true,"description":"The path to the Client Certificate associated with the Service Principal for use when authenticating as a Service Principal using a Client Certificate."},"client_id":{"type":"TypeString","optional":true,"description":"The Client ID which should be used."},"client_id_file_path":{"type":"TypeString","optional":true,"description":"The path to a file containing the Client ID which should be used."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret which should be used. For use When authenticating as a Service Principal using a Client Secret."},"client_secret_file_path":{"type":"TypeString","optional":true,"description":"The path to a file containing the Client Secret which should be used. For use When authenticating as a Service Principal using a Client Secret."},"disable_correlation_request_id":{"type":"TypeBool","optional":true,"description":"This will disable the x-ms-correlation-request-id header."},"disable_terraform_partner_id":{"type":"TypeBool","optional":true,"description":"This will disable the Terraform Partner ID which is used if a custom `partner_id` isn't specified."},"environment":{"type":"TypeString","optional":true,"description":"The Cloud Environment which should be used. Possible values are public, usgovernment, and china. Defaults to public. Not used and should not be specified when `metadata_host` is specified."},"features":{"type":"TypeList","required":true,"elem":{"schema":{"api_management":{"type":"TypeList","optional":true,"elem":{"schema":{"purge_soft_delete_on_destroy":{"type":"TypeBool","optional":true,"default":true},"recover_soft_deleted":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"app_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"purge_soft_delete_on_destroy":{"type":"TypeBool","optional":true,"default":true},"recover_soft_deleted":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"application_insights":{"type":"TypeList","optional":true,"elem":{"schema":{"disable_generated_rule":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"cognitive_account":{"type":"TypeList","optional":true,"elem":{"schema":{"purge_soft_delete_on_destroy":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"key_vault":{"type":"TypeList","optional":true,"elem":{"schema":{"purge_soft_delete_on_destroy":{"type":"TypeBool","optional":true,"default":true,"description":"When enabled soft-deleted `azurerm_key_vault` resources will be permanently deleted (e.g purged), when destroyed"},"purge_soft_deleted_certificates_on_destroy":{"type":"TypeBool","optional":true,"default":true,"description":"When enabled soft-deleted `azurerm_key_vault_certificate` resources will be permanently deleted (e.g purged), when destroyed"},"purge_soft_deleted_hardware_security_module_keys_on_destroy":{"type":"TypeBool","optional":true,"default":true,"description":"When enabled soft-deleted `azurerm_key_vault_managed_hardware_security_module_key` resources will be permanently deleted (e.g purged), when destroyed"},"purge_soft_deleted_hardware_security_modules_on_destroy":{"type":"TypeBool","optional":true,"default":true,"description":"When enabled soft-deleted `azurerm_key_vault_managed_hardware_security_module` resources will be permanently deleted (e.g purged), when destroyed"},"purge_soft_deleted_keys_on_destroy":{"type":"TypeBool","optional":true,"default":true,"description":"When enabled soft-deleted `azurerm_key_vault_key` resources will be permanently deleted (e.g purged), when destroyed"},"purge_soft_deleted_secrets_on_destroy":{"type":"TypeBool","optional":true,"default":true,"description":"When enabled soft-deleted `azurerm_key_vault_secret` resources will be permanently deleted (e.g purged), when destroyed"},"recover_soft_deleted_certificates":{"type":"TypeBool","optional":true,"default":true,"description":"When enabled soft-deleted `azurerm_key_vault_certificate` resources will be restored, instead of creating new ones"},"recover_soft_deleted_hardware_security_module_keys":{"type":"TypeBool","optional":true,"default":true,"description":"When enabled soft-deleted `azurerm_key_vault_managed_hardware_security_module_key` resources will be restored, instead of creating new ones"},"recover_soft_deleted_key_vaults":{"type":"TypeBool","optional":true,"default":true,"description":"When enabled soft-deleted `azurerm_key_vault` resources will be restored, instead of creating new ones"},"recover_soft_deleted_keys":{"type":"TypeBool","optional":true,"default":true,"description":"When enabled soft-deleted `azurerm_key_vault_key` resources will be restored, instead of creating new ones"},"recover_soft_deleted_secrets":{"type":"TypeBool","optional":true,"default":true,"description":"When enabled soft-deleted `azurerm_key_vault_secret` resources will be restored, instead of creating new ones"}}},"maxItems":1},"log_analytics_workspace":{"type":"TypeList","optional":true,"elem":{"schema":{"permanently_delete_on_destroy":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"machine_learning":{"type":"TypeList","optional":true,"elem":{"schema":{"purge_soft_deleted_workspace_on_destroy":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"managed_disk":{"type":"TypeList","optional":true,"elem":{"schema":{"expand_without_downtime":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"postgresql_flexible_server":{"type":"TypeList","optional":true,"elem":{"schema":{"restart_server_on_configuration_value_change":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"recovery_service":{"type":"TypeList","optional":true,"elem":{"schema":{"purge_protected_items_from_vault_on_destroy":{"type":"TypeBool","optional":true,"default":false},"vm_backup_stop_protection_and_retain_data_on_destroy":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"recovery_services_vaults":{"type":"TypeList","optional":true,"elem":{"schema":{"recover_soft_deleted_backup_protected_vm":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"resource_group":{"type":"TypeList","optional":true,"elem":{"schema":{"prevent_deletion_if_contains_resources":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"subscription":{"type":"TypeList","optional":true,"elem":{"schema":{"prevent_cancellation_on_destroy":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"template_deployment":{"type":"TypeList","optional":true,"elem":{"schema":{"delete_nested_items_during_deletion":{"type":"TypeBool","required":true}}},"maxItems":1},"virtual_machine":{"type":"TypeList","optional":true,"elem":{"schema":{"delete_os_disk_on_deletion":{"type":"TypeBool","optional":true,"default":false},"detach_implicit_data_disk_on_deletion":{"type":"TypeBool","optional":true,"default":false},"graceful_shutdown":{"type":"TypeBool","optional":true,"default":false},"skip_shutdown_and_force_delete":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"virtual_machine_scale_set":{"type":"TypeList","optional":true,"elem":{"schema":{"force_delete":{"type":"TypeBool","optional":true,"default":false},"reimage_on_manual_upgrade":{"type":"TypeBool","optional":true,"default":true},"roll_instances_when_required":{"type":"TypeBool","optional":true,"default":true},"scale_to_zero_before_deletion":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1}}},"maxItems":1,"minItems":1},"metadata_host":{"type":"TypeString","optional":true,"description":"The Hostname which should be used for the Azure Metadata Service."},"msi_endpoint":{"type":"TypeString","optional":true,"description":"The path to a custom endpoint for Managed Service Identity - in most circumstances this should be detected automatically. "},"oidc_request_token":{"type":"TypeString","optional":true,"description":"The bearer token for the request to the OIDC provider. For use when authenticating as a Service Principal using OpenID Connect."},"oidc_request_url":{"type":"TypeString","optional":true,"description":"The URL for the OIDC provider from which to request an ID token. For use when authenticating as a Service Principal using OpenID Connect."},"oidc_token":{"type":"TypeString","optional":true,"description":"The OIDC ID token for use when authenticating as a Service Principal using OpenID Connect."},"oidc_token_file_path":{"type":"TypeString","optional":true,"description":"The path to a file containing an OIDC ID token for use when authenticating as a Service Principal using OpenID Connect."},"partner_id":{"type":"TypeString","optional":true,"description":"A GUID/UUID that is registered with Microsoft to facilitate partner resource usage attribution."},"resource_provider_registrations":{"type":"TypeString","optional":true,"description":"The set of Resource Providers which should be automatically registered for the subscription."},"resource_providers_to_register":{"type":"TypeList","optional":true,"description":"A list of Resource Providers to explicitly register for the subscription, in addition to those specified by the `resource_provider_registrations` property.","elem":{"type":"TypeString"}},"skip_provider_registration":{"type":"TypeBool","optional":true,"description":"Should the AzureRM Provider skip registering all of the Resource Providers that it supports, if they're not already registered?"},"storage_use_azuread":{"type":"TypeBool","optional":true,"description":"Should the AzureRM Provider use Azure AD Authentication when accessing the Storage Data Plane APIs?"},"subscription_id":{"type":"TypeString","optional":true,"description":"The Subscription ID which should be used."},"tenant_id":{"type":"TypeString","optional":true,"description":"The Tenant ID which should be used."},"use_aks_workload_identity":{"type":"TypeBool","optional":true,"description":"Allow Azure AKS Workload Identity to be used for Authentication."},"use_cli":{"type":"TypeBool","optional":true,"default":true,"description":"Allow Azure CLI to be used for Authentication."},"use_msi":{"type":"TypeBool","optional":true,"description":"Allow Managed Service Identity to be used for Authentication."},"use_oidc":{"type":"TypeBool","optional":true,"description":"Allow OpenID Connect to be used for authentication"}},"resources":{"azurerm_aadb2c_directory":{"schema":{"billing_type":{"type":"TypeString","description":"The type of billing for the B2C tenant. Possible values include: `MAU` or `Auths`.","computed":true},"country_code":{"type":"TypeString","optional":true,"description":"Country code of the B2C tenant. See https://aka.ms/B2CDataResidency for valid country codes.","computed":true,"forceNew":true},"data_residency_location":{"type":"TypeString","required":true,"description":"Location in which the B2C tenant is hosted and data resides. See https://aka.ms/B2CDataResidency for more information.","forceNew":true},"display_name":{"type":"TypeString","optional":true,"description":"The initial display name of the B2C tenant.","computed":true,"forceNew":true},"domain_name":{"type":"TypeString","required":true,"description":"Domain name of the B2C tenant, including onmicrosoft.com suffix.","forceNew":true},"effective_start_date":{"type":"TypeString","description":"The date from which the billing type took effect. May not be populated until after the first billing cycle.","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"description":"Billing SKU for the B2C tenant. See https://aka.ms/b2cBilling for more information."},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","description":"The Tenant ID for the B2C tenant.","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_active_directory_domain_service":{"schema":{"deployment_id":{"type":"TypeString","computed":true},"domain_configuration_type":{"type":"TypeString","optional":true,"forceNew":true},"domain_name":{"type":"TypeString","required":true,"forceNew":true},"filtered_sync_enabled":{"type":"TypeBool","optional":true,"default":false},"initial_replica_set":{"type":"TypeList","required":true,"elem":{"schema":{"domain_controller_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"external_access_ip_address":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"service_status":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1,"minItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"notifications":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"notify_dc_admins":{"type":"TypeBool","optional":true,"default":false},"notify_global_admins":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"resource_id":{"type":"TypeString","computed":true},"secure_ldap":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"certificate_expiry":{"type":"TypeString","computed":true},"certificate_thumbprint":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","required":true},"external_access_enabled":{"type":"TypeBool","optional":true,"default":false},"pfx_certificate":{"type":"TypeString","required":true},"pfx_certificate_password":{"type":"TypeString","required":true},"public_certificate":{"type":"TypeString","computed":true}}},"maxItems":1},"security":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"kerberos_armoring_enabled":{"type":"TypeBool","optional":true,"default":false},"kerberos_rc4_encryption_enabled":{"type":"TypeBool","optional":true,"default":false},"ntlm_v1_enabled":{"type":"TypeBool","optional":true,"default":false},"sync_kerberos_passwords":{"type":"TypeBool","optional":true,"default":false},"sync_ntlm_passwords":{"type":"TypeBool","optional":true,"default":false},"sync_on_prem_passwords":{"type":"TypeBool","optional":true,"default":false},"tls_v1_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"sku":{"type":"TypeString","required":true},"sync_owner":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","computed":true},"version":{"type":"TypeInt","computed":true}},"timeouts":{"create":180,"read":5,"delete":60,"update":120}},"azurerm_active_directory_domain_service_replica_set":{"schema":{"domain_controller_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"domain_service_id":{"type":"TypeString","required":true,"forceNew":true},"external_access_ip_address":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"service_status":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":180,"read":5,"delete":60}},"azurerm_active_directory_domain_service_trust":{"schema":{"domain_service_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true},"trusted_domain_dns_ips":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":2},"trusted_domain_fqdn":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_advanced_threat_protection":{"schema":{"enabled":{"type":"TypeBool","required":true},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_advisor_suppression":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"recommendation_id":{"type":"TypeString","required":true,"forceNew":true},"resource_id":{"type":"TypeString","required":true,"forceNew":true},"suppression_id":{"type":"TypeString","computed":true},"ttl":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_ai_services":{"schema":{"custom_subdomain_name":{"type":"TypeString","optional":true,"forceNew":true},"customer_managed_key":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_client_id":{"type":"TypeString","optional":true},"key_vault_key_id":{"type":"TypeString","optional":true},"managed_hsm_key_id":{"type":"TypeString","optional":true}}},"maxItems":1},"endpoint":{"type":"TypeString","computed":true},"fqdns":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"local_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_acls":{"type":"TypeList","optional":true,"elem":{"schema":{"default_action":{"type":"TypeString","required":true},"ip_rules":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"virtual_network_rules":{"type":"TypeSet","optional":true,"elem":{"schema":{"ignore_missing_vnet_service_endpoint":{"type":"TypeBool","optional":true,"default":false},"subnet_id":{"type":"TypeString","required":true}}}}}},"maxItems":1},"outbound_network_access_restricted":{"type":"TypeBool","optional":true,"default":false},"primary_access_key":{"type":"TypeString","computed":true},"public_network_access":{"type":"TypeString","optional":true,"default":"Enabled"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_access_key":{"type":"TypeString","computed":true},"sku_name":{"type":"TypeString","required":true},"storage":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_client_id":{"type":"TypeString","optional":true},"storage_account_id":{"type":"TypeString","required":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_analysis_services_server":{"schema":{"admin_users":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"backup_blob_container_uri":{"type":"TypeString","optional":true},"ipv4_firewall_rule":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"range_end":{"type":"TypeString","required":true},"range_start":{"type":"TypeString","required":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"power_bi_service_enabled":{"type":"TypeBool","optional":true},"querypool_connection_mode":{"type":"TypeString","optional":true,"default":"All"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_full_name":{"type":"TypeString","computed":true},"sku":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_connection":{"schema":{"display_name":{"type":"TypeString","optional":true,"default":"Service Bus","forceNew":true},"managed_api_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameter_values":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management":{"schema":{"additional_location":{"type":"TypeList","optional":true,"elem":{"schema":{"capacity":{"type":"TypeInt","optional":true,"computed":true},"gateway_disabled":{"type":"TypeBool","optional":true,"default":false},"gateway_regional_url":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true},"private_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"public_ip_address_id":{"type":"TypeString","optional":true},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"virtual_network_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"subnet_id":{"type":"TypeString","required":true}}},"maxItems":1},"zones":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"certificate":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate_password":{"type":"TypeString","optional":true},"encoded_certificate":{"type":"TypeString","required":true},"expiry":{"type":"TypeString","computed":true},"store_name":{"type":"TypeString","required":true},"subject":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}},"maxItems":10},"client_certificate_enabled":{"type":"TypeBool","optional":true,"default":false},"delegation":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"subscriptions_enabled":{"type":"TypeBool","optional":true,"default":false},"url":{"type":"TypeString","optional":true},"user_registration_enabled":{"type":"TypeBool","optional":true,"default":false},"validation_key":{"type":"TypeString","optional":true}}},"maxItems":1},"developer_portal_url":{"type":"TypeString","computed":true},"gateway_disabled":{"type":"TypeBool","optional":true,"default":false},"gateway_regional_url":{"type":"TypeString","computed":true},"gateway_url":{"type":"TypeString","computed":true},"hostname_configuration":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"developer_portal":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"certificate_password":{"type":"TypeString","optional":true},"certificate_source":{"type":"TypeString","computed":true},"certificate_status":{"type":"TypeString","computed":true},"expiry":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","optional":true},"negotiate_client_certificate":{"type":"TypeBool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"TypeString","optional":true},"subject":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}}},"management":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"certificate_password":{"type":"TypeString","optional":true},"certificate_source":{"type":"TypeString","computed":true},"certificate_status":{"type":"TypeString","computed":true},"expiry":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","optional":true},"negotiate_client_certificate":{"type":"TypeBool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"TypeString","optional":true},"subject":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}}},"portal":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"certificate_password":{"type":"TypeString","optional":true},"certificate_source":{"type":"TypeString","computed":true},"certificate_status":{"type":"TypeString","computed":true},"expiry":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","optional":true},"negotiate_client_certificate":{"type":"TypeBool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"TypeString","optional":true},"subject":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}}},"proxy":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"certificate_password":{"type":"TypeString","optional":true},"certificate_source":{"type":"TypeString","computed":true},"certificate_status":{"type":"TypeString","computed":true},"default_ssl_binding":{"type":"TypeBool","optional":true,"computed":true},"expiry":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","optional":true},"negotiate_client_certificate":{"type":"TypeBool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"TypeString","optional":true},"subject":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}}},"scm":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"certificate_password":{"type":"TypeString","optional":true},"certificate_source":{"type":"TypeString","computed":true},"certificate_status":{"type":"TypeString","computed":true},"expiry":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","optional":true},"negotiate_client_certificate":{"type":"TypeBool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"TypeString","optional":true},"subject":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}}}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"management_api_url":{"type":"TypeString","computed":true},"min_api_version":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"notification_sender_email":{"type":"TypeString","optional":true,"computed":true},"portal_url":{"type":"TypeString","computed":true},"private_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"protocols":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enable_http2":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"public_ip_address_id":{"type":"TypeString","optional":true},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"publisher_email":{"type":"TypeString","required":true},"publisher_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scm_url":{"type":"TypeString","computed":true},"security":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enable_backend_ssl30":{"type":"TypeBool","optional":true,"default":false},"enable_backend_tls10":{"type":"TypeBool","optional":true,"default":false},"enable_backend_tls11":{"type":"TypeBool","optional":true,"default":false},"enable_frontend_ssl30":{"type":"TypeBool","optional":true,"default":false},"enable_frontend_tls10":{"type":"TypeBool","optional":true,"default":false},"enable_frontend_tls11":{"type":"TypeBool","optional":true,"default":false},"tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled":{"type":"TypeBool","optional":true,"default":false},"tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled":{"type":"TypeBool","optional":true,"default":false},"tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled":{"type":"TypeBool","optional":true,"default":false},"tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled":{"type":"TypeBool","optional":true,"default":false},"tls_rsa_with_aes128_cbc_sha256_ciphers_enabled":{"type":"TypeBool","optional":true,"default":false},"tls_rsa_with_aes128_cbc_sha_ciphers_enabled":{"type":"TypeBool","optional":true,"default":false},"tls_rsa_with_aes128_gcm_sha256_ciphers_enabled":{"type":"TypeBool","optional":true,"default":false},"tls_rsa_with_aes256_cbc_sha256_ciphers_enabled":{"type":"TypeBool","optional":true,"default":false},"tls_rsa_with_aes256_cbc_sha_ciphers_enabled":{"type":"TypeBool","optional":true,"default":false},"tls_rsa_with_aes256_gcm_sha384_ciphers_enabled":{"type":"TypeBool","optional":true,"default":false},"triple_des_ciphers_enabled":{"type":"TypeBool","optional":true}}},"maxItems":1},"sign_in":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","required":true}}},"maxItems":1},"sign_up":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","required":true},"terms_of_service":{"type":"TypeList","required":true,"elem":{"schema":{"consent_required":{"type":"TypeBool","required":true},"enabled":{"type":"TypeBool","required":true},"text":{"type":"TypeString","optional":true}}},"maxItems":1}}},"maxItems":1},"sku_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tenant_access":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","required":true},"primary_key":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true}}},"maxItems":1},"virtual_network_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"subnet_id":{"type":"TypeString","required":true}}},"maxItems":1},"virtual_network_type":{"type":"TypeString","optional":true,"default":"None"},"zones":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_api_management_api":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"api_type":{"type":"TypeString","optional":true,"computed":true},"contact":{"type":"TypeList","optional":true,"elem":{"schema":{"email":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true},"url":{"type":"TypeString","optional":true}}},"maxItems":1,"minItems":1},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true,"computed":true},"import":{"type":"TypeList","optional":true,"elem":{"schema":{"content_format":{"type":"TypeString","required":true},"content_value":{"type":"TypeString","required":true},"wsdl_selector":{"type":"TypeList","optional":true,"elem":{"schema":{"endpoint_name":{"type":"TypeString","required":true},"service_name":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"is_current":{"type":"TypeBool","computed":true},"is_online":{"type":"TypeBool","computed":true},"license":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","optional":true},"url":{"type":"TypeString","optional":true}}},"maxItems":1,"minItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"oauth2_authorization":{"type":"TypeList","optional":true,"elem":{"schema":{"authorization_server_name":{"type":"TypeString","required":true},"scope":{"type":"TypeString","optional":true}}},"maxItems":1},"openid_authentication":{"type":"TypeList","optional":true,"elem":{"schema":{"bearer_token_sending_methods":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"openid_provider_name":{"type":"TypeString","required":true}}},"maxItems":1},"path":{"type":"TypeString","optional":true,"computed":true},"protocols":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"revision":{"type":"TypeString","required":true,"forceNew":true},"revision_description":{"type":"TypeString","optional":true},"service_url":{"type":"TypeString","optional":true,"computed":true},"source_api_id":{"type":"TypeString","optional":true},"subscription_key_parameter_names":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"header":{"type":"TypeString","required":true},"query":{"type":"TypeString","required":true}}},"maxItems":1},"subscription_required":{"type":"TypeBool","optional":true,"default":true},"terms_of_service_url":{"type":"TypeString","optional":true},"version":{"type":"TypeString","optional":true,"computed":true},"version_description":{"type":"TypeString","optional":true},"version_set_id":{"type":"TypeString","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_api_diagnostic":{"schema":{"always_log_errors":{"type":"TypeBool","optional":true,"computed":true},"api_management_logger_id":{"type":"TypeString","required":true},"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"api_name":{"type":"TypeString","required":true,"forceNew":true},"backend_request":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"body_bytes":{"type":"TypeInt","optional":true},"data_masking":{"type":"TypeList","optional":true,"elem":{"schema":{"headers":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"query_params":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}}}},"maxItems":1},"headers_to_log":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"backend_response":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"body_bytes":{"type":"TypeInt","optional":true},"data_masking":{"type":"TypeList","optional":true,"elem":{"schema":{"headers":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"query_params":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}}}},"maxItems":1},"headers_to_log":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"frontend_request":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"body_bytes":{"type":"TypeInt","optional":true},"data_masking":{"type":"TypeList","optional":true,"elem":{"schema":{"headers":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"query_params":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}}}},"maxItems":1},"headers_to_log":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"frontend_response":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"body_bytes":{"type":"TypeInt","optional":true},"data_masking":{"type":"TypeList","optional":true,"elem":{"schema":{"headers":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"query_params":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}}}},"maxItems":1},"headers_to_log":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"http_correlation_protocol":{"type":"TypeString","optional":true,"computed":true},"identifier":{"type":"TypeString","required":true,"forceNew":true},"log_client_ip":{"type":"TypeBool","optional":true,"computed":true},"operation_name_format":{"type":"TypeString","optional":true,"default":"Name"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sampling_percentage":{"type":"TypeFloat","optional":true,"computed":true},"verbosity":{"type":"TypeString","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_api_operation":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"api_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"method":{"type":"TypeString","required":true},"operation_id":{"type":"TypeString","required":true,"forceNew":true},"request":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"header":{"type":"TypeList","optional":true,"elem":{"schema":{"default_value":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"example":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"external_value":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"summary":{"type":"TypeString","optional":true},"value":{"type":"TypeString","optional":true}}}},"name":{"type":"TypeString","required":true},"required":{"type":"TypeBool","required":true},"schema_id":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"type_name":{"type":"TypeString","optional":true},"values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"query_parameter":{"type":"TypeList","optional":true,"elem":{"schema":{"default_value":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"example":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"external_value":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"summary":{"type":"TypeString","optional":true},"value":{"type":"TypeString","optional":true}}}},"name":{"type":"TypeString","required":true},"required":{"type":"TypeBool","required":true},"schema_id":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"type_name":{"type":"TypeString","optional":true},"values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"representation":{"type":"TypeList","optional":true,"elem":{"schema":{"content_type":{"type":"TypeString","required":true},"example":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"external_value":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"summary":{"type":"TypeString","optional":true},"value":{"type":"TypeString","optional":true}}}},"form_parameter":{"type":"TypeList","optional":true,"elem":{"schema":{"default_value":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"example":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"external_value":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"summary":{"type":"TypeString","optional":true},"value":{"type":"TypeString","optional":true}}}},"name":{"type":"TypeString","required":true},"required":{"type":"TypeBool","required":true},"schema_id":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"type_name":{"type":"TypeString","optional":true},"values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"schema_id":{"type":"TypeString","optional":true},"type_name":{"type":"TypeString","optional":true}}}}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"response":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"header":{"type":"TypeList","optional":true,"elem":{"schema":{"default_value":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"example":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"external_value":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"summary":{"type":"TypeString","optional":true},"value":{"type":"TypeString","optional":true}}}},"name":{"type":"TypeString","required":true},"required":{"type":"TypeBool","required":true},"schema_id":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"type_name":{"type":"TypeString","optional":true},"values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"representation":{"type":"TypeList","optional":true,"elem":{"schema":{"content_type":{"type":"TypeString","required":true},"example":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"external_value":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"summary":{"type":"TypeString","optional":true},"value":{"type":"TypeString","optional":true}}}},"form_parameter":{"type":"TypeList","optional":true,"elem":{"schema":{"default_value":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"example":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"external_value":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"summary":{"type":"TypeString","optional":true},"value":{"type":"TypeString","optional":true}}}},"name":{"type":"TypeString","required":true},"required":{"type":"TypeBool","required":true},"schema_id":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"type_name":{"type":"TypeString","optional":true},"values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"schema_id":{"type":"TypeString","optional":true},"type_name":{"type":"TypeString","optional":true}}}},"status_code":{"type":"TypeInt","required":true}}}},"template_parameter":{"type":"TypeList","optional":true,"elem":{"schema":{"default_value":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"example":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"external_value":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"summary":{"type":"TypeString","optional":true},"value":{"type":"TypeString","optional":true}}}},"name":{"type":"TypeString","required":true},"required":{"type":"TypeBool","required":true},"schema_id":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"type_name":{"type":"TypeString","optional":true},"values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"url_template":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_api_operation_policy":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"api_name":{"type":"TypeString","required":true,"forceNew":true},"operation_id":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"xml_content":{"type":"TypeString","optional":true,"computed":true},"xml_link":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_api_operation_tag":{"schema":{"api_operation_id":{"type":"TypeString","required":true,"forceNew":true},"display_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_api_policy":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"api_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"xml_content":{"type":"TypeString","optional":true,"computed":true},"xml_link":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_api_release":{"schema":{"api_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"notes":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_api_schema":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"api_name":{"type":"TypeString","required":true,"forceNew":true},"components":{"type":"TypeString","optional":true},"content_type":{"type":"TypeString","required":true},"definitions":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"schema_id":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_api_tag":{"schema":{"api_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_api_management_api_tag_description":{"schema":{"api_tag_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"external_documentation_description":{"type":"TypeString","optional":true},"external_documentation_url":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_api_version_set":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"version_header_name":{"type":"TypeString","optional":true},"version_query_name":{"type":"TypeString","optional":true},"versioning_scheme":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_authorization_server":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"authorization_endpoint":{"type":"TypeString","required":true},"authorization_methods":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"bearer_token_sending_methods":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"client_authentication_method":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true},"client_registration_endpoint":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","optional":true},"default_scope":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"grant_types":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"resource_owner_password":{"type":"TypeString","optional":true},"resource_owner_username":{"type":"TypeString","optional":true},"support_state":{"type":"TypeBool","optional":true},"token_body_parameter":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"token_endpoint":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_backend":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"credentials":{"type":"TypeList","optional":true,"elem":{"schema":{"authorization":{"type":"TypeList","optional":true,"elem":{"schema":{"parameter":{"type":"TypeString","optional":true},"scheme":{"type":"TypeString","optional":true}}},"maxItems":1},"certificate":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"header":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"query":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"protocol":{"type":"TypeString","required":true},"proxy":{"type":"TypeList","optional":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true},"url":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"resource_id":{"type":"TypeString","optional":true},"service_fabric_cluster":{"type":"TypeList","optional":true,"elem":{"schema":{"client_certificate_id":{"type":"TypeString","optional":true,"computed":true},"client_certificate_thumbprint":{"type":"TypeString","optional":true,"computed":true},"management_endpoints":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"max_partition_resolution_retries":{"type":"TypeInt","required":true},"server_certificate_thumbprints":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"server_x509_name":{"type":"TypeSet","optional":true,"elem":{"schema":{"issuer_certificate_thumbprint":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}}}},"maxItems":1},"title":{"type":"TypeString","optional":true},"tls":{"type":"TypeList","optional":true,"elem":{"schema":{"validate_certificate_chain":{"type":"TypeBool","optional":true},"validate_certificate_name":{"type":"TypeBool","optional":true}}},"maxItems":1},"url":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_certificate":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"data":{"type":"TypeString","optional":true},"expiration":{"type":"TypeString","computed":true},"key_vault_identity_client_id":{"type":"TypeString","optional":true},"key_vault_secret_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subject":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_custom_domain":{"schema":{"api_management_id":{"type":"TypeString","required":true,"forceNew":true},"developer_portal":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"certificate_password":{"type":"TypeString","optional":true},"certificate_source":{"type":"TypeString","computed":true},"certificate_status":{"type":"TypeString","computed":true},"expiry":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","optional":true},"negotiate_client_certificate":{"type":"TypeBool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"TypeString","optional":true},"subject":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}}},"gateway":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"certificate_password":{"type":"TypeString","optional":true},"certificate_source":{"type":"TypeString","computed":true},"certificate_status":{"type":"TypeString","computed":true},"default_ssl_binding":{"type":"TypeBool","optional":true,"computed":true},"expiry":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","optional":true},"negotiate_client_certificate":{"type":"TypeBool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"TypeString","optional":true},"subject":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}}},"management":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"certificate_password":{"type":"TypeString","optional":true},"certificate_source":{"type":"TypeString","computed":true},"certificate_status":{"type":"TypeString","computed":true},"expiry":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","optional":true},"negotiate_client_certificate":{"type":"TypeBool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"TypeString","optional":true},"subject":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}}},"portal":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"certificate_password":{"type":"TypeString","optional":true},"certificate_source":{"type":"TypeString","computed":true},"certificate_status":{"type":"TypeString","computed":true},"expiry":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","optional":true},"negotiate_client_certificate":{"type":"TypeBool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"TypeString","optional":true},"subject":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}}},"scm":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"certificate_password":{"type":"TypeString","optional":true},"certificate_source":{"type":"TypeString","computed":true},"certificate_status":{"type":"TypeString","computed":true},"expiry":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","optional":true},"negotiate_client_certificate":{"type":"TypeBool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"TypeString","optional":true},"subject":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_api_management_diagnostic":{"schema":{"always_log_errors":{"type":"TypeBool","optional":true,"computed":true},"api_management_logger_id":{"type":"TypeString","required":true},"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"backend_request":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"body_bytes":{"type":"TypeInt","optional":true},"data_masking":{"type":"TypeList","optional":true,"elem":{"schema":{"headers":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"query_params":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}}}},"maxItems":1},"headers_to_log":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"backend_response":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"body_bytes":{"type":"TypeInt","optional":true},"data_masking":{"type":"TypeList","optional":true,"elem":{"schema":{"headers":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"query_params":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}}}},"maxItems":1},"headers_to_log":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"frontend_request":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"body_bytes":{"type":"TypeInt","optional":true},"data_masking":{"type":"TypeList","optional":true,"elem":{"schema":{"headers":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"query_params":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}}}},"maxItems":1},"headers_to_log":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"frontend_response":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"body_bytes":{"type":"TypeInt","optional":true},"data_masking":{"type":"TypeList","optional":true,"elem":{"schema":{"headers":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"query_params":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}}}},"maxItems":1},"headers_to_log":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"http_correlation_protocol":{"type":"TypeString","optional":true,"computed":true},"identifier":{"type":"TypeString","required":true,"forceNew":true},"log_client_ip":{"type":"TypeBool","optional":true,"computed":true},"operation_name_format":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sampling_percentage":{"type":"TypeFloat","optional":true,"computed":true},"verbosity":{"type":"TypeString","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_email_template":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"body":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subject":{"type":"TypeString","required":true},"template_name":{"type":"TypeString","required":true,"forceNew":true},"title":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_gateway":{"schema":{"api_management_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"location_data":{"type":"TypeList","required":true,"elem":{"schema":{"city":{"type":"TypeString","optional":true},"district":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"region":{"type":"TypeString","optional":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_gateway_api":{"schema":{"api_id":{"type":"TypeString","required":true,"forceNew":true},"gateway_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_api_management_gateway_certificate_authority":{"schema":{"api_management_id":{"type":"TypeString","required":true,"forceNew":true},"certificate_name":{"type":"TypeString","required":true,"forceNew":true},"gateway_name":{"type":"TypeString","required":true,"forceNew":true},"is_trusted":{"type":"TypeBool","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_gateway_host_name_configuration":{"schema":{"api_management_id":{"type":"TypeString","required":true,"forceNew":true},"certificate_id":{"type":"TypeString","required":true},"gateway_name":{"type":"TypeString","required":true,"forceNew":true},"host_name":{"type":"TypeString","required":true},"http2_enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true,"forceNew":true},"request_client_certificate_enabled":{"type":"TypeBool","optional":true},"tls10_enabled":{"type":"TypeBool","optional":true},"tls11_enabled":{"type":"TypeBool","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_global_schema":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"schema_id":{"type":"TypeString","required":true,"forceNew":true},"type":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_group":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"external_id":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"type":{"type":"TypeString","optional":true,"default":"custom","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_group_user":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"group_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"user_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_api_management_identity_provider_aad":{"schema":{"allowed_tenants":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"client_id":{"type":"TypeString","required":true},"client_library":{"type":"TypeString","optional":true},"client_secret":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"signin_tenant":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_identity_provider_aadb2c":{"schema":{"allowed_tenant":{"type":"TypeString","required":true},"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"authority":{"type":"TypeString","required":true},"client_id":{"type":"TypeString","required":true},"client_library":{"type":"TypeString","optional":true},"client_secret":{"type":"TypeString","required":true},"password_reset_policy":{"type":"TypeString","optional":true},"profile_editing_policy":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"signin_policy":{"type":"TypeString","required":true},"signin_tenant":{"type":"TypeString","required":true},"signup_policy":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_identity_provider_facebook":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"app_id":{"type":"TypeString","required":true},"app_secret":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_identity_provider_google":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_identity_provider_microsoft":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_identity_provider_twitter":{"schema":{"api_key":{"type":"TypeString","required":true},"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"api_secret_key":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_logger":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"application_insights":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"connection_string":{"type":"TypeString","optional":true},"instrumentation_key":{"type":"TypeString","optional":true}}},"maxItems":1},"buffered":{"type":"TypeBool","optional":true,"default":true},"description":{"type":"TypeString","optional":true},"eventhub":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"connection_string":{"type":"TypeString","optional":true},"endpoint_uri":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"user_assigned_identity_client_id":{"type":"TypeString","optional":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"resource_id":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_named_value":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"display_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secret":{"type":"TypeBool","optional":true,"default":false},"tags":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"value":{"type":"TypeString","optional":true},"value_from_key_vault":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_client_id":{"type":"TypeString","optional":true},"secret_id":{"type":"TypeString","required":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_notification_recipient_email":{"schema":{"api_management_id":{"type":"TypeString","required":true,"forceNew":true},"email":{"type":"TypeString","required":true,"forceNew":true},"notification_type":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_api_management_notification_recipient_user":{"schema":{"api_management_id":{"type":"TypeString","required":true,"forceNew":true},"notification_type":{"type":"TypeString","required":true,"forceNew":true},"user_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_api_management_openid_connect_provider":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"metadata_endpoint":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_policy":{"schema":{"api_management_id":{"type":"TypeString","required":true,"forceNew":true},"xml_content":{"type":"TypeString","optional":true,"computed":true},"xml_link":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_policy_fragment":{"schema":{"api_management_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"format":{"type":"TypeString","optional":true,"default":"xml"},"name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_product":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"approval_required":{"type":"TypeBool","optional":true},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"product_id":{"type":"TypeString","required":true,"forceNew":true},"published":{"type":"TypeBool","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subscription_required":{"type":"TypeBool","optional":true,"default":true},"subscriptions_limit":{"type":"TypeInt","optional":true},"terms":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_product_api":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"api_name":{"type":"TypeString","required":true,"forceNew":true},"product_id":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_api_management_product_group":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"group_name":{"type":"TypeString","required":true,"forceNew":true},"product_id":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_api_management_product_policy":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"product_id":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"xml_content":{"type":"TypeString","optional":true,"computed":true},"xml_link":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_product_tag":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"api_management_product_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_api_management_redis_cache":{"schema":{"api_management_id":{"type":"TypeString","required":true,"forceNew":true},"cache_location":{"type":"TypeString","optional":true,"default":"default"},"connection_string":{"type":"TypeString","required":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"redis_cache_id":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_subscription":{"schema":{"allow_tracing":{"type":"TypeBool","optional":true,"default":true},"api_id":{"type":"TypeString","optional":true,"forceNew":true},"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"display_name":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","optional":true,"computed":true},"product_id":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_key":{"type":"TypeString","optional":true,"computed":true},"state":{"type":"TypeString","optional":true,"default":"submitted"},"subscription_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"user_id":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_tag":{"schema":{"api_management_id":{"type":"TypeString","required":true,"forceNew":true},"display_name":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_api_management_user":{"schema":{"api_management_name":{"type":"TypeString","required":true,"forceNew":true},"confirmation":{"type":"TypeString","optional":true,"forceNew":true},"email":{"type":"TypeString","required":true},"first_name":{"type":"TypeString","required":true},"last_name":{"type":"TypeString","required":true},"note":{"type":"TypeString","optional":true},"password":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"state":{"type":"TypeString","optional":true,"computed":true},"user_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":45,"read":5,"delete":45,"update":45}},"azurerm_app_configuration":{"schema":{"encryption":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_client_id":{"type":"TypeString","optional":true},"key_vault_key_identifier":{"type":"TypeString","optional":true}}},"maxItems":1},"endpoint":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"local_auth_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_read_key":{"type":"TypeList","computed":true,"elem":{"schema":{"connection_string":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"secret":{"type":"TypeString","computed":true}}}},"primary_write_key":{"type":"TypeList","computed":true,"elem":{"schema":{"connection_string":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"secret":{"type":"TypeString","computed":true}}}},"public_network_access":{"type":"TypeString","optional":true},"purge_protection_enabled":{"type":"TypeBool","optional":true,"default":false},"replica":{"type":"TypeSet","optional":true,"elem":{"schema":{"endpoint":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}},"minItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_read_key":{"type":"TypeList","computed":true,"elem":{"schema":{"connection_string":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"secret":{"type":"TypeString","computed":true}}}},"secondary_write_key":{"type":"TypeList","computed":true,"elem":{"schema":{"connection_string":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"secret":{"type":"TypeString","computed":true}}}},"sku":{"type":"TypeString","optional":true,"default":"free"},"soft_delete_retention_days":{"type":"TypeInt","optional":true,"default":7,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_app_configuration_feature":{"schema":{"configuration_store_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true},"etag":{"type":"TypeString","optional":true,"computed":true},"key":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"label":{"type":"TypeString","optional":true,"forceNew":true},"locked":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"percentage_filter_value":{"type":"TypeFloat","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"targeting_filter":{"type":"TypeList","optional":true,"elem":{"schema":{"default_rollout_percentage":{"type":"TypeInt","required":true},"groups":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"rollout_percentage":{"type":"TypeInt","required":true}}}},"users":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"timewindow_filter":{"type":"TypeList","optional":true,"elem":{"schema":{"end":{"type":"TypeString","optional":true},"start":{"type":"TypeString","optional":true}}}}},"timeouts":{"create":45,"read":5,"delete":30,"update":30}},"azurerm_app_configuration_key":{"schema":{"configuration_store_id":{"type":"TypeString","required":true,"forceNew":true},"content_type":{"type":"TypeString","optional":true,"computed":true},"etag":{"type":"TypeString","optional":true,"computed":true},"key":{"type":"TypeString","required":true,"forceNew":true},"label":{"type":"TypeString","optional":true,"forceNew":true},"locked":{"type":"TypeBool","optional":true,"default":false},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","optional":true,"default":"kv"},"value":{"type":"TypeString","optional":true},"vault_key_reference":{"type":"TypeString","optional":true}},"timeouts":{"create":45,"read":5,"delete":30,"update":30}},"azurerm_app_service":{"schema":{"app_service_plan_id":{"type":"TypeString","required":true},"app_settings":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","optional":true}}},"maxItems":1},"additional_login_params":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","required":true},"facebook":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true},"app_secret":{"type":"TypeString","required":true},"oauth_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"google":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"oauth_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"issuer":{"type":"TypeString","optional":true},"microsoft":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"oauth_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true},"token_refresh_extension_hours":{"type":"TypeFloat","optional":true,"default":72},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false},"twitter":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true},"consumer_secret":{"type":"TypeString","required":true}}},"maxItems":1},"unauthenticated_client_action":{"type":"TypeString","optional":true}}},"maxItems":1},"backup":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true},"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","required":true},"frequency_unit":{"type":"TypeString","required":true},"keep_at_least_one_backup":{"type":"TypeBool","optional":true,"default":false},"retention_period_in_days":{"type":"TypeInt","optional":true,"default":30},"start_time":{"type":"TypeString","optional":true}}},"maxItems":1},"storage_account_url":{"type":"TypeString","required":true}}},"maxItems":1},"client_affinity_enabled":{"type":"TypeBool","optional":true,"default":false},"client_cert_enabled":{"type":"TypeBool","optional":true,"default":false},"client_cert_mode":{"type":"TypeString","optional":true,"computed":true},"connection_string":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"custom_domain_verification_id":{"type":"TypeString","computed":true},"default_site_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"https_only":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_reference_identity_id":{"type":"TypeString","optional":true,"computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"logs":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"application_logs":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"level":{"type":"TypeString","required":true},"retention_in_days":{"type":"TypeInt","required":true},"sas_url":{"type":"TypeString","required":true}}},"maxItems":1},"file_system_level":{"type":"TypeString","optional":true,"default":"Off"}}},"maxItems":1},"detailed_error_messages_enabled":{"type":"TypeBool","optional":true,"default":false},"failed_request_tracing_enabled":{"type":"TypeBool","optional":true,"default":false},"http_logs":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","required":true},"sas_url":{"type":"TypeString","required":true}}},"maxItems":1},"file_system":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","required":true},"retention_in_mb":{"type":"TypeInt","required":true}}},"maxItems":1}}},"maxItems":1}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"site_config":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"acr_use_managed_identity_credentials":{"type":"TypeBool","optional":true,"default":false},"acr_user_managed_identity_client_id":{"type":"TypeString","optional":true},"always_on":{"type":"TypeBool","optional":true,"default":false},"app_command_line":{"type":"TypeString","optional":true},"auto_swap_slot_name":{"type":"TypeString","optional":true},"cors":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"support_credentials":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"default_documents":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"dotnet_framework_version":{"type":"TypeString","optional":true,"default":"v4.0"},"ftps_state":{"type":"TypeString","optional":true,"computed":true},"health_check_path":{"type":"TypeString","optional":true},"http2_enabled":{"type":"TypeBool","optional":true,"default":false},"ip_restriction":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000},"service_tag":{"type":"TypeString","optional":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true}}}},"java_container":{"type":"TypeString","optional":true},"java_container_version":{"type":"TypeString","optional":true},"java_version":{"type":"TypeString","optional":true},"linux_fx_version":{"type":"TypeString","optional":true,"computed":true},"local_mysql_enabled":{"type":"TypeBool","optional":true,"computed":true},"managed_pipeline_mode":{"type":"TypeString","optional":true,"computed":true},"min_tls_version":{"type":"TypeString","optional":true,"computed":true},"number_of_workers":{"type":"TypeInt","optional":true,"computed":true},"php_version":{"type":"TypeString","optional":true},"python_version":{"type":"TypeString","optional":true},"remote_debugging_enabled":{"type":"TypeBool","optional":true,"default":false},"remote_debugging_version":{"type":"TypeString","optional":true,"computed":true},"scm_ip_restriction":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000},"service_tag":{"type":"TypeString","optional":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true}}}},"scm_type":{"type":"TypeString","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"TypeBool","optional":true},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"computed":true},"websockets_enabled":{"type":"TypeBool","optional":true,"computed":true},"windows_fx_version":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"source_control":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"branch":{"type":"TypeString","optional":true,"computed":true},"manual_integration":{"type":"TypeBool","optional":true,"computed":true},"repo_url":{"type":"TypeString","optional":true,"computed":true},"rollback_enabled":{"type":"TypeBool","optional":true,"computed":true},"use_mercurial":{"type":"TypeBool","optional":true,"computed":true}}},"maxItems":1},"storage_account":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"access_key":{"type":"TypeString","required":true},"account_name":{"type":"TypeString","required":true},"mount_path":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"share_name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_app_service_active_slot":{"schema":{"app_service_name":{"type":"TypeString","required":true,"forceNew":true},"app_service_slot_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_app_service_certificate":{"schema":{"app_service_plan_id":{"type":"TypeString","optional":true,"forceNew":true},"expiration_date":{"type":"TypeString","computed":true},"friendly_name":{"type":"TypeString","computed":true},"host_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"hosting_environment_profile_id":{"type":"TypeString","computed":true},"issue_date":{"type":"TypeString","computed":true},"issuer":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","optional":true,"forceNew":true},"key_vault_secret_id":{"type":"TypeString","optional":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","optional":true,"forceNew":true},"pfx_blob":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subject_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"thumbprint":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_app_service_certificate_binding":{"schema":{"app_service_name":{"type":"TypeString","computed":true},"certificate_id":{"type":"TypeString","required":true,"forceNew":true},"hostname":{"type":"TypeString","computed":true},"hostname_binding_id":{"type":"TypeString","required":true,"forceNew":true},"ssl_state":{"type":"TypeString","required":true,"forceNew":true},"thumbprint":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_app_service_certificate_order":{"schema":{"app_service_certificate_not_renewable_reasons":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"auto_renew":{"type":"TypeBool","optional":true,"default":true},"certificates":{"type":"TypeList","computed":true,"elem":{"schema":{"certificate_name":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","computed":true},"key_vault_secret_name":{"type":"TypeString","computed":true},"provisioning_state":{"type":"TypeString","computed":true}}}},"csr":{"type":"TypeString","optional":true,"computed":true},"distinguished_name":{"type":"TypeString","optional":true,"computed":true},"domain_verification_token":{"type":"TypeString","computed":true},"expiration_time":{"type":"TypeString","computed":true},"intermediate_thumbprint":{"type":"TypeString","computed":true},"is_private_key_external":{"type":"TypeBool","computed":true},"key_size":{"type":"TypeInt","optional":true,"default":2048},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"product_type":{"type":"TypeString","optional":true,"default":"Standard"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"root_thumbprint":{"type":"TypeString","computed":true},"signed_certificate_thumbprint":{"type":"TypeString","computed":true},"status":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"validity_in_years":{"type":"TypeInt","optional":true,"default":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_app_service_connection":{"schema":{"app_service_id":{"type":"TypeString","required":true,"forceNew":true},"authentication":{"type":"TypeList","required":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"client_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true},"principal_id":{"type":"TypeString","optional":true},"secret":{"type":"TypeString","optional":true},"subscription_id":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"client_type":{"type":"TypeString","optional":true,"default":"none"},"name":{"type":"TypeString","required":true,"forceNew":true},"secret_store":{"type":"TypeList","optional":true,"elem":{"schema":{"key_vault_id":{"type":"TypeString","required":true}}},"maxItems":1},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true},"vnet_solution":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_app_service_custom_hostname_binding":{"schema":{"app_service_name":{"type":"TypeString","required":true,"forceNew":true},"hostname":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"ssl_state":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"thumbprint":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"virtual_ip":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_app_service_environment_v3":{"schema":{"allow_new_private_endpoint_connections":{"type":"TypeBool","optional":true,"default":true},"cluster_setting":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"dedicated_host_count":{"type":"TypeInt","optional":true,"forceNew":true},"dns_suffix":{"type":"TypeString","computed":true},"external_inbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"inbound_network_dependencies":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ports":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"internal_inbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"internal_load_balancing_mode":{"type":"TypeString","optional":true,"default":"None","forceNew":true},"ip_ssl_address_count":{"type":"TypeInt","computed":true},"linux_outbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"pricing_tier":{"type":"TypeString","computed":true},"remote_debugging_enabled":{"type":"TypeBool","optional":true,"default":false},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"windows_outbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"zone_redundant":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}},"timeouts":{"create":360,"read":5,"delete":360,"update":360}},"azurerm_app_service_hybrid_connection":{"schema":{"app_service_name":{"type":"TypeString","required":true,"forceNew":true},"hostname":{"type":"TypeString","required":true},"namespace_name":{"type":"TypeString","computed":true},"port":{"type":"TypeInt","required":true},"relay_id":{"type":"TypeString","required":true,"forceNew":true},"relay_name":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"send_key_name":{"type":"TypeString","optional":true,"default":"RootManageSharedAccessKey"},"send_key_value":{"type":"TypeString","computed":true},"service_bus_namespace":{"type":"TypeString","computed":true},"service_bus_suffix":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_app_service_managed_certificate":{"schema":{"canonical_name":{"type":"TypeString","computed":true},"custom_hostname_binding_id":{"type":"TypeString","required":true,"forceNew":true},"expiration_date":{"type":"TypeString","computed":true},"friendly_name":{"type":"TypeString","computed":true},"host_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"issue_date":{"type":"TypeString","computed":true},"issuer":{"type":"TypeString","computed":true},"subject_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"thumbprint":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_app_service_plan":{"schema":{"app_service_environment_id":{"type":"TypeString","optional":true,"forceNew":true},"is_xenon":{"type":"TypeBool","optional":true},"kind":{"type":"TypeString","optional":true,"default":"Windows","forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"maximum_elastic_worker_count":{"type":"TypeInt","optional":true,"computed":true},"maximum_number_of_workers":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"per_site_scaling":{"type":"TypeBool","optional":true},"reserved":{"type":"TypeBool","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeList","required":true,"elem":{"schema":{"capacity":{"type":"TypeInt","optional":true,"computed":true},"size":{"type":"TypeString","required":true},"tier":{"type":"TypeString","required":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zone_redundant":{"type":"TypeBool","optional":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_app_service_public_certificate":{"schema":{"app_service_name":{"type":"TypeString","required":true,"forceNew":true},"blob":{"type":"TypeString","required":true,"forceNew":true},"certificate_location":{"type":"TypeString","required":true,"forceNew":true},"certificate_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"thumbprint":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_app_service_slot":{"schema":{"app_service_name":{"type":"TypeString","required":true,"forceNew":true},"app_service_plan_id":{"type":"TypeString","required":true,"forceNew":true},"app_settings":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","optional":true}}},"maxItems":1},"additional_login_params":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","required":true},"facebook":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true},"app_secret":{"type":"TypeString","required":true},"oauth_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"google":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"oauth_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"issuer":{"type":"TypeString","optional":true},"microsoft":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"oauth_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true},"token_refresh_extension_hours":{"type":"TypeFloat","optional":true,"default":72},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false},"twitter":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true},"consumer_secret":{"type":"TypeString","required":true}}},"maxItems":1},"unauthenticated_client_action":{"type":"TypeString","optional":true}}},"maxItems":1},"client_affinity_enabled":{"type":"TypeBool","optional":true,"computed":true},"connection_string":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"default_site_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"https_only":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_reference_identity_id":{"type":"TypeString","optional":true,"computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"logs":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"application_logs":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"level":{"type":"TypeString","required":true},"retention_in_days":{"type":"TypeInt","required":true},"sas_url":{"type":"TypeString","required":true}}},"maxItems":1},"file_system_level":{"type":"TypeString","optional":true,"default":"Off"}}},"maxItems":1},"detailed_error_messages_enabled":{"type":"TypeBool","optional":true,"default":false},"failed_request_tracing_enabled":{"type":"TypeBool","optional":true,"default":false},"http_logs":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","required":true},"sas_url":{"type":"TypeString","required":true}}},"maxItems":1},"file_system":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","required":true},"retention_in_mb":{"type":"TypeInt","required":true}}},"maxItems":1}}},"maxItems":1}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"site_config":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"acr_use_managed_identity_credentials":{"type":"TypeBool","optional":true,"default":false},"acr_user_managed_identity_client_id":{"type":"TypeString","optional":true},"always_on":{"type":"TypeBool","optional":true,"default":false},"app_command_line":{"type":"TypeString","optional":true},"auto_swap_slot_name":{"type":"TypeString","optional":true},"cors":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"support_credentials":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"default_documents":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"dotnet_framework_version":{"type":"TypeString","optional":true,"default":"v4.0"},"ftps_state":{"type":"TypeString","optional":true,"computed":true},"health_check_path":{"type":"TypeString","optional":true},"http2_enabled":{"type":"TypeBool","optional":true,"default":false},"ip_restriction":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000},"service_tag":{"type":"TypeString","optional":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true}}}},"java_container":{"type":"TypeString","optional":true},"java_container_version":{"type":"TypeString","optional":true},"java_version":{"type":"TypeString","optional":true},"linux_fx_version":{"type":"TypeString","optional":true,"computed":true},"local_mysql_enabled":{"type":"TypeBool","optional":true,"computed":true},"managed_pipeline_mode":{"type":"TypeString","optional":true,"computed":true},"min_tls_version":{"type":"TypeString","optional":true,"computed":true},"number_of_workers":{"type":"TypeInt","optional":true,"computed":true},"php_version":{"type":"TypeString","optional":true},"python_version":{"type":"TypeString","optional":true},"remote_debugging_enabled":{"type":"TypeBool","optional":true,"default":false},"remote_debugging_version":{"type":"TypeString","optional":true,"computed":true},"scm_ip_restriction":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000},"service_tag":{"type":"TypeString","optional":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true}}}},"scm_type":{"type":"TypeString","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"TypeBool","optional":true},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"computed":true},"websockets_enabled":{"type":"TypeBool","optional":true,"computed":true},"windows_fx_version":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"storage_account":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"access_key":{"type":"TypeString","required":true},"account_name":{"type":"TypeString","required":true},"mount_path":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"share_name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_app_service_slot_custom_hostname_binding":{"schema":{"app_service_slot_id":{"type":"TypeString","required":true,"forceNew":true},"hostname":{"type":"TypeString","required":true,"forceNew":true},"ssl_state":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"thumbprint":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"virtual_ip":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_app_service_slot_virtual_network_swift_connection":{"schema":{"app_service_id":{"type":"TypeString","required":true,"forceNew":true},"slot_name":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_app_service_source_control":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The ID of the Windows or Linux Web App.","forceNew":true},"branch":{"type":"TypeString","optional":true,"description":"The branch name to use for deployments.","computed":true,"forceNew":true},"github_action_configuration":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"code_configuration":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"runtime_stack":{"type":"TypeString","required":true,"description":"The value to use for the Runtime Stack in the workflow file content for code base apps.","forceNew":true},"runtime_version":{"type":"TypeString","required":true,"description":"The value to use for the Runtime Version in the workflow file content for code base apps.","forceNew":true}}},"maxItems":1},"container_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"image_name":{"type":"TypeString","required":true,"description":"The image name for the build.","forceNew":true},"registry_password":{"type":"TypeString","optional":true,"description":"The password used to upload the image to the container registry.","forceNew":true},"registry_url":{"type":"TypeString","required":true,"description":"The server URL for the container registry where the build will be hosted.","forceNew":true},"registry_username":{"type":"TypeString","optional":true,"description":"The username used to upload the image to the container registry.","forceNew":true}}},"maxItems":1},"generate_workflow_file":{"type":"TypeBool","optional":true,"default":true,"description":"Should the service generate the GitHub Action Workflow file. Defaults to `true`","forceNew":true},"linux_action":{"type":"TypeBool","description":"Denotes this action uses a Linux base image.","computed":true}}},"maxItems":1},"repo_url":{"type":"TypeString","optional":true,"description":"The URL for the repository.","computed":true,"forceNew":true},"rollback_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Deployment Rollback be enabled? Defaults to `false`.","forceNew":true},"scm_type":{"type":"TypeString","description":"The SCM Type in use. This value is decoded by the service from the repository information supplied.","computed":true},"use_local_git":{"type":"TypeBool","optional":true,"default":false,"description":"Should the App use local Git configuration.","forceNew":true},"use_manual_integration":{"type":"TypeBool","optional":true,"default":false,"description":"Should code be deployed manually. Set to `false` to enable continuous integration, such as webhooks into online repos such as GitHub. Defaults to `false`.","forceNew":true},"use_mercurial":{"type":"TypeBool","optional":true,"default":false,"description":"The repository specified is Mercurial. Defaults to `false`.","forceNew":true},"uses_github_action":{"type":"TypeBool","description":"Indicates if the Slot uses a GitHub action for deployment. This value is decoded by the service from the repository information supplied.","computed":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_app_service_source_control_slot":{"schema":{"branch":{"type":"TypeString","optional":true,"description":"The URL for the repository","computed":true,"forceNew":true},"github_action_configuration":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"code_configuration":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"runtime_stack":{"type":"TypeString","required":true,"description":"The value to use for the Runtime Stack in the workflow file content for code base apps.","forceNew":true},"runtime_version":{"type":"TypeString","required":true,"description":"The value to use for the Runtime Version in the workflow file content for code base apps.","forceNew":true}}},"maxItems":1},"container_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"image_name":{"type":"TypeString","required":true,"description":"The image name for the build.","forceNew":true},"registry_password":{"type":"TypeString","optional":true,"description":"The password used to upload the image to the container registry.","forceNew":true},"registry_url":{"type":"TypeString","required":true,"description":"The server URL for the container registry where the build will be hosted.","forceNew":true},"registry_username":{"type":"TypeString","optional":true,"description":"The username used to upload the image to the container registry.","forceNew":true}}},"maxItems":1},"generate_workflow_file":{"type":"TypeBool","optional":true,"default":true,"description":"Should the service generate the GitHub Action Workflow file. Defaults to `true`","forceNew":true},"linux_action":{"type":"TypeBool","description":"Denotes this action uses a Linux base image.","computed":true}}},"maxItems":1},"repo_url":{"type":"TypeString","optional":true,"description":"The branch name to use for deployments.","computed":true,"forceNew":true},"rollback_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Deployment Rollback be enabled? Defaults to `false`","forceNew":true},"scm_type":{"type":"TypeString","description":"The SCM Type in use. This value is decoded by the service from the repository information supplied.","computed":true},"slot_id":{"type":"TypeString","required":true,"description":"The ID of the Linux or Windows Web App Slot.","forceNew":true},"use_local_git":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Slot use local Git configuration.","forceNew":true},"use_manual_integration":{"type":"TypeBool","optional":true,"default":false,"description":"Should code be deployed manually. Set to `true` to disable continuous integration, such as webhooks into online repos such as GitHub. Defaults to `false`","forceNew":true},"use_mercurial":{"type":"TypeBool","optional":true,"default":false,"description":"The repository specified is Mercurial. Defaults to `false`.","forceNew":true},"uses_github_action":{"type":"TypeBool","description":"Indicates if the Slot uses a GitHub action for deployment. This value is decoded by the service from the repository information supplied.","computed":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_app_service_source_control_token":{"schema":{"token":{"type":"TypeString","required":true},"token_secret":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_app_service_virtual_network_swift_connection":{"schema":{"app_service_id":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_application_gateway":{"schema":{"authentication_certificate":{"type":"TypeList","optional":true,"elem":{"schema":{"data":{"type":"TypeString","required":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true}}}},"autoscale_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"max_capacity":{"type":"TypeInt","optional":true},"min_capacity":{"type":"TypeInt","required":true}}},"maxItems":1},"backend_address_pool":{"type":"TypeSet","required":true,"elem":{"schema":{"fqdns":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"id":{"type":"TypeString","computed":true},"ip_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true}}}},"backend_http_settings":{"type":"TypeSet","required":true,"elem":{"schema":{"affinity_cookie_name":{"type":"TypeString","optional":true},"authentication_certificate":{"type":"TypeList","optional":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true}}}},"connection_draining":{"type":"TypeList","optional":true,"elem":{"schema":{"drain_timeout_sec":{"type":"TypeInt","required":true},"enabled":{"type":"TypeBool","required":true}}},"maxItems":1},"cookie_based_affinity":{"type":"TypeString","required":true},"host_name":{"type":"TypeString","optional":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true},"pick_host_name_from_backend_address":{"type":"TypeBool","optional":true,"default":false},"port":{"type":"TypeInt","required":true},"probe_id":{"type":"TypeString","computed":true},"probe_name":{"type":"TypeString","optional":true},"protocol":{"type":"TypeString","required":true},"request_timeout":{"type":"TypeInt","optional":true,"default":30},"trusted_root_certificate_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"minItems":1},"custom_error_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"custom_error_page_url":{"type":"TypeString","required":true},"id":{"type":"TypeString","computed":true},"status_code":{"type":"TypeString","required":true}}}},"enable_http2":{"type":"TypeBool","optional":true},"fips_enabled":{"type":"TypeBool","optional":true},"firewall_policy_id":{"type":"TypeString","optional":true},"force_firewall_policy_association":{"type":"TypeBool","optional":true},"frontend_ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"private_ip_address":{"type":"TypeString","optional":true,"computed":true},"private_ip_address_allocation":{"type":"TypeString","optional":true,"default":"Dynamic"},"private_link_configuration_id":{"type":"TypeString","computed":true},"private_link_configuration_name":{"type":"TypeString","optional":true},"public_ip_address_id":{"type":"TypeString","optional":true},"subnet_id":{"type":"TypeString","optional":true}}},"minItems":1},"frontend_port":{"type":"TypeSet","required":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"port":{"type":"TypeInt","required":true}}}},"gateway_ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"subnet_id":{"type":"TypeString","required":true}}},"maxItems":2},"global":{"type":"TypeList","optional":true,"elem":{"schema":{"request_buffering_enabled":{"type":"TypeBool","required":true},"response_buffering_enabled":{"type":"TypeBool","required":true}}},"maxItems":1},"http_listener":{"type":"TypeSet","required":true,"elem":{"schema":{"custom_error_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"custom_error_page_url":{"type":"TypeString","required":true},"id":{"type":"TypeString","computed":true},"status_code":{"type":"TypeString","required":true}}}},"firewall_policy_id":{"type":"TypeString","optional":true},"frontend_ip_configuration_id":{"type":"TypeString","computed":true},"frontend_ip_configuration_name":{"type":"TypeString","required":true},"frontend_port_id":{"type":"TypeString","computed":true},"frontend_port_name":{"type":"TypeString","required":true},"host_name":{"type":"TypeString","optional":true},"host_names":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"protocol":{"type":"TypeString","required":true},"require_sni":{"type":"TypeBool","optional":true},"ssl_certificate_id":{"type":"TypeString","computed":true},"ssl_certificate_name":{"type":"TypeString","optional":true},"ssl_profile_id":{"type":"TypeString","computed":true},"ssl_profile_name":{"type":"TypeString","optional":true}}}},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_endpoint_connection":{"type":"TypeSet","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"private_link_configuration":{"type":"TypeSet","optional":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"primary":{"type":"TypeBool","required":true},"private_ip_address":{"type":"TypeString","optional":true,"computed":true},"private_ip_address_allocation":{"type":"TypeString","required":true},"subnet_id":{"type":"TypeString","required":true}}},"minItems":1},"name":{"type":"TypeString","required":true}}}},"probe":{"type":"TypeSet","optional":true,"elem":{"schema":{"host":{"type":"TypeString","optional":true},"id":{"type":"TypeString","computed":true},"interval":{"type":"TypeInt","required":true},"match":{"type":"TypeList","optional":true,"elem":{"schema":{"body":{"type":"TypeString","optional":true},"status_code":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"minimum_servers":{"type":"TypeInt","optional":true,"default":0},"name":{"type":"TypeString","required":true},"path":{"type":"TypeString","required":true},"pick_host_name_from_backend_http_settings":{"type":"TypeBool","optional":true,"default":false},"port":{"type":"TypeInt","optional":true},"protocol":{"type":"TypeString","required":true},"timeout":{"type":"TypeInt","required":true},"unhealthy_threshold":{"type":"TypeInt","required":true}}}},"redirect_configuration":{"type":"TypeSet","optional":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"include_path":{"type":"TypeBool","optional":true,"default":false},"include_query_string":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true},"redirect_type":{"type":"TypeString","required":true},"target_listener_id":{"type":"TypeString","computed":true},"target_listener_name":{"type":"TypeString","optional":true},"target_url":{"type":"TypeString","optional":true}}}},"request_routing_rule":{"type":"TypeSet","required":true,"elem":{"schema":{"backend_address_pool_id":{"type":"TypeString","computed":true},"backend_address_pool_name":{"type":"TypeString","optional":true},"backend_http_settings_id":{"type":"TypeString","computed":true},"backend_http_settings_name":{"type":"TypeString","optional":true},"http_listener_id":{"type":"TypeString","computed":true},"http_listener_name":{"type":"TypeString","required":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"priority":{"type":"TypeInt","optional":true},"redirect_configuration_id":{"type":"TypeString","computed":true},"redirect_configuration_name":{"type":"TypeString","optional":true},"rewrite_rule_set_id":{"type":"TypeString","computed":true},"rewrite_rule_set_name":{"type":"TypeString","optional":true},"rule_type":{"type":"TypeString","required":true},"url_path_map_id":{"type":"TypeString","computed":true},"url_path_map_name":{"type":"TypeString","optional":true}}},"minItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rewrite_rule_set":{"type":"TypeList","optional":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"rewrite_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"condition":{"type":"TypeList","optional":true,"elem":{"schema":{"ignore_case":{"type":"TypeBool","optional":true,"default":false},"negate":{"type":"TypeBool","optional":true,"default":false},"pattern":{"type":"TypeString","required":true},"variable":{"type":"TypeString","required":true}}}},"name":{"type":"TypeString","required":true},"request_header_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"header_name":{"type":"TypeString","required":true},"header_value":{"type":"TypeString","required":true}}}},"response_header_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"header_name":{"type":"TypeString","required":true},"header_value":{"type":"TypeString","required":true}}}},"rule_sequence":{"type":"TypeInt","required":true},"url":{"type":"TypeList","optional":true,"elem":{"schema":{"components":{"type":"TypeString","optional":true},"path":{"type":"TypeString","optional":true},"query_string":{"type":"TypeString","optional":true},"reroute":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1}}}}}}},"sku":{"type":"TypeList","required":true,"elem":{"schema":{"capacity":{"type":"TypeInt","optional":true},"name":{"type":"TypeString","required":true},"tier":{"type":"TypeString","required":true}}},"maxItems":1},"ssl_certificate":{"type":"TypeSet","optional":true,"elem":{"schema":{"data":{"type":"TypeString","optional":true},"id":{"type":"TypeString","computed":true},"key_vault_secret_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"password":{"type":"TypeString","optional":true},"public_cert_data":{"type":"TypeString","computed":true}}}},"ssl_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"cipher_suites":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"disabled_protocols":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"min_protocol_version":{"type":"TypeString","optional":true},"policy_name":{"type":"TypeString","optional":true},"policy_type":{"type":"TypeString","optional":true}}},"maxItems":1},"ssl_profile":{"type":"TypeList","optional":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"ssl_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"cipher_suites":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"disabled_protocols":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"min_protocol_version":{"type":"TypeString","optional":true},"policy_name":{"type":"TypeString","optional":true},"policy_type":{"type":"TypeString","optional":true}}},"maxItems":1},"trusted_client_certificate_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"verify_client_cert_issuer_dn":{"type":"TypeBool","optional":true,"default":false},"verify_client_certificate_revocation":{"type":"TypeString","optional":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"trusted_client_certificate":{"type":"TypeList","optional":true,"elem":{"schema":{"data":{"type":"TypeString","required":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true}}}},"trusted_root_certificate":{"type":"TypeList","optional":true,"elem":{"schema":{"data":{"type":"TypeString","optional":true},"id":{"type":"TypeString","computed":true},"key_vault_secret_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true}}}},"url_path_map":{"type":"TypeList","optional":true,"elem":{"schema":{"default_backend_address_pool_id":{"type":"TypeString","computed":true},"default_backend_address_pool_name":{"type":"TypeString","optional":true},"default_backend_http_settings_id":{"type":"TypeString","computed":true},"default_backend_http_settings_name":{"type":"TypeString","optional":true},"default_redirect_configuration_id":{"type":"TypeString","computed":true},"default_redirect_configuration_name":{"type":"TypeString","optional":true},"default_rewrite_rule_set_id":{"type":"TypeString","computed":true},"default_rewrite_rule_set_name":{"type":"TypeString","optional":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"path_rule":{"type":"TypeList","required":true,"elem":{"schema":{"backend_address_pool_id":{"type":"TypeString","computed":true},"backend_address_pool_name":{"type":"TypeString","optional":true},"backend_http_settings_id":{"type":"TypeString","computed":true},"backend_http_settings_name":{"type":"TypeString","optional":true},"firewall_policy_id":{"type":"TypeString","optional":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"paths":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"redirect_configuration_id":{"type":"TypeString","computed":true},"redirect_configuration_name":{"type":"TypeString","optional":true},"rewrite_rule_set_id":{"type":"TypeString","computed":true},"rewrite_rule_set_name":{"type":"TypeString","optional":true}}}}}}},"waf_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"disabled_rule_group":{"type":"TypeList","optional":true,"elem":{"schema":{"rule_group_name":{"type":"TypeString","required":true},"rules":{"type":"TypeList","optional":true,"elem":{"type":"TypeInt"}}}}},"enabled":{"type":"TypeBool","required":true},"exclusion":{"type":"TypeList","optional":true,"elem":{"schema":{"match_variable":{"type":"TypeString","required":true},"selector":{"type":"TypeString","optional":true},"selector_match_operator":{"type":"TypeString","optional":true}}}},"file_upload_limit_mb":{"type":"TypeInt","optional":true,"default":100},"firewall_mode":{"type":"TypeString","required":true},"max_request_body_size_kb":{"type":"TypeInt","optional":true,"default":128},"request_body_check":{"type":"TypeBool","optional":true,"default":true},"rule_set_type":{"type":"TypeString","optional":true,"default":"OWASP"},"rule_set_version":{"type":"TypeString","required":true}}},"maxItems":1},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_application_insights":{"schema":{"app_id":{"type":"TypeString","computed":true},"application_type":{"type":"TypeString","required":true,"forceNew":true},"connection_string":{"type":"TypeString","computed":true},"daily_data_cap_in_gb":{"type":"TypeFloat","optional":true,"default":100},"daily_data_cap_notifications_disabled":{"type":"TypeBool","optional":true},"disable_ip_masking":{"type":"TypeBool","optional":true,"default":false},"force_customer_storage_for_profiler":{"type":"TypeBool","optional":true,"default":false},"instrumentation_key":{"type":"TypeString","computed":true},"internet_ingestion_enabled":{"type":"TypeBool","optional":true,"default":true},"internet_query_enabled":{"type":"TypeBool","optional":true,"default":true},"local_authentication_disabled":{"type":"TypeBool","optional":true,"default":false},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_in_days":{"type":"TypeInt","optional":true,"default":90},"sampling_percentage":{"type":"TypeFloat","optional":true,"default":100},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","optional":true}},"timeouts":{"create":60,"read":5,"delete":30,"update":30}},"azurerm_application_insights_analytics_item":{"schema":{"application_insights_id":{"type":"TypeString","required":true,"forceNew":true},"content":{"type":"TypeString","required":true},"function_alias":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"scope":{"type":"TypeString","required":true,"forceNew":true},"time_created":{"type":"TypeString","computed":true},"time_modified":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_application_insights_api_key":{"schema":{"api_key":{"type":"TypeString","computed":true},"application_insights_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"read_permissions":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"write_permissions":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_application_insights_smart_detection_rule":{"schema":{"additional_email_recipients":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"application_insights_id":{"type":"TypeString","required":true,"forceNew":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true,"forceNew":true},"send_emails_to_subscription_owners":{"type":"TypeBool","optional":true,"default":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_application_insights_standard_web_test":{"schema":{"application_insights_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true},"frequency":{"type":"TypeInt","optional":true,"default":300},"geo_locations":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"request":{"type":"TypeList","required":true,"elem":{"schema":{"body":{"type":"TypeString","optional":true},"follow_redirects_enabled":{"type":"TypeBool","optional":true,"default":true},"header":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"http_verb":{"type":"TypeString","optional":true,"default":"GET"},"parse_dependent_requests_enabled":{"type":"TypeBool","optional":true,"default":true},"url":{"type":"TypeString","required":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retry_enabled":{"type":"TypeBool","optional":true},"synthetic_monitor_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"timeout":{"type":"TypeInt","optional":true,"default":30},"validation_rules":{"type":"TypeList","optional":true,"elem":{"schema":{"content":{"type":"TypeList","optional":true,"elem":{"schema":{"content_match":{"type":"TypeString","required":true},"ignore_case":{"type":"TypeBool","optional":true,"default":false},"pass_if_text_found":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"expected_status_code":{"type":"TypeInt","optional":true,"default":200},"ssl_cert_remaining_lifetime":{"type":"TypeInt","optional":true},"ssl_check_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_application_insights_web_test":{"schema":{"application_insights_id":{"type":"TypeString","required":true,"forceNew":true},"configuration":{"type":"TypeString","required":true},"description":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true},"frequency":{"type":"TypeInt","optional":true,"default":300},"geo_locations":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"kind":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retry_enabled":{"type":"TypeBool","optional":true},"synthetic_monitor_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"timeout":{"type":"TypeInt","optional":true,"default":30}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_application_insights_workbook":{"schema":{"category":{"type":"TypeString","optional":true,"default":"workbook"},"data_json":{"type":"TypeString","required":true},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"identity":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source_id":{"type":"TypeString","optional":true,"default":"azure monitor"},"storage_container_id":{"type":"TypeString","optional":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_application_insights_workbook_template":{"schema":{"author":{"type":"TypeString","optional":true},"galleries":{"type":"TypeList","required":true,"elem":{"schema":{"category":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"order":{"type":"TypeInt","optional":true,"default":0},"resource_type":{"type":"TypeString","optional":true,"default":"Azure Monitor"},"type":{"type":"TypeString","optional":true,"default":"workbook"}}},"minItems":1},"localized":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","optional":true,"default":0},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"template_data":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_application_load_balancer":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_configuration_endpoint":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_application_load_balancer_frontend":{"schema":{"application_load_balancer_id":{"type":"TypeString","required":true,"forceNew":true},"fully_qualified_domain_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_application_load_balancer_subnet_association":{"schema":{"application_load_balancer_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_application_security_group":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_arc_kubernetes_cluster":{"schema":{"agent_public_key_certificate":{"type":"TypeString","required":true,"forceNew":true},"agent_version":{"type":"TypeString","computed":true},"distribution":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"infrastructure":{"type":"TypeString","computed":true},"kubernetes_version":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"offering":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"total_core_count":{"type":"TypeInt","computed":true},"total_node_count":{"type":"TypeInt","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_arc_kubernetes_cluster_extension":{"schema":{"cluster_id":{"type":"TypeString","required":true,"forceNew":true},"configuration_protected_settings":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"configuration_settings":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"current_version":{"type":"TypeString","computed":true},"extension_type":{"type":"TypeString","required":true,"forceNew":true},"identity":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"release_namespace":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"release_train":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"target_namespace":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"version":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_arc_kubernetes_flux_configuration":{"schema":{"blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"account_key":{"type":"TypeString","optional":true},"container_id":{"type":"TypeString","required":true},"local_auth_reference":{"type":"TypeString","optional":true},"sas_token":{"type":"TypeString","optional":true},"service_principal":{"type":"TypeList","optional":true,"elem":{"schema":{"client_certificate_base64":{"type":"TypeString","optional":true},"client_certificate_password":{"type":"TypeString","optional":true},"client_certificate_send_chain":{"type":"TypeBool","optional":true,"default":false},"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","optional":true},"tenant_id":{"type":"TypeString","required":true}}},"maxItems":1},"sync_interval_in_seconds":{"type":"TypeInt","optional":true,"default":600},"timeout_in_seconds":{"type":"TypeInt","optional":true,"default":600}}},"maxItems":1},"bucket":{"type":"TypeList","optional":true,"elem":{"schema":{"access_key":{"type":"TypeString","optional":true},"bucket_name":{"type":"TypeString","required":true},"local_auth_reference":{"type":"TypeString","optional":true},"secret_key_base64":{"type":"TypeString","optional":true},"sync_interval_in_seconds":{"type":"TypeInt","optional":true,"default":600},"timeout_in_seconds":{"type":"TypeInt","optional":true,"default":600},"tls_enabled":{"type":"TypeBool","optional":true,"default":true},"url":{"type":"TypeString","required":true}}},"maxItems":1},"cluster_id":{"type":"TypeString","required":true,"forceNew":true},"continuous_reconciliation_enabled":{"type":"TypeBool","optional":true,"default":true},"git_repository":{"type":"TypeList","optional":true,"elem":{"schema":{"https_ca_cert_base64":{"type":"TypeString","optional":true},"https_key_base64":{"type":"TypeString","optional":true},"https_user":{"type":"TypeString","optional":true},"local_auth_reference":{"type":"TypeString","optional":true},"reference_type":{"type":"TypeString","required":true},"reference_value":{"type":"TypeString","required":true},"ssh_known_hosts_base64":{"type":"TypeString","optional":true},"ssh_private_key_base64":{"type":"TypeString","optional":true},"sync_interval_in_seconds":{"type":"TypeInt","optional":true,"default":600},"timeout_in_seconds":{"type":"TypeInt","optional":true,"default":600},"url":{"type":"TypeString","required":true}}},"maxItems":1},"kustomizations":{"type":"TypeSet","required":true,"elem":{"schema":{"depends_on":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"garbage_collection_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true},"recreating_enabled":{"type":"TypeBool","optional":true,"default":false},"retry_interval_in_seconds":{"type":"TypeInt","optional":true,"default":600},"sync_interval_in_seconds":{"type":"TypeInt","optional":true,"default":600},"timeout_in_seconds":{"type":"TypeInt","optional":true,"default":600}}},"minItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace":{"type":"TypeString","required":true,"forceNew":true},"scope":{"type":"TypeString","optional":true,"default":"namespace","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_arc_machine":{"schema":{"kind":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_arc_machine_automanage_configuration_assignment":{"schema":{"arc_machine_id":{"type":"TypeString","required":true,"forceNew":true},"configuration_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_arc_machine_extension":{"schema":{"arc_machine_id":{"type":"TypeString","required":true,"forceNew":true},"automatic_upgrade_enabled":{"type":"TypeBool","optional":true,"default":true},"force_update_tag":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"protected_settings":{"type":"TypeString","optional":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"settings":{"type":"TypeString","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true,"forceNew":true},"type_handler_version":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_arc_private_link_scope":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":false},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_arc_resource_bridge_appliance":{"schema":{"distro":{"type":"TypeString","required":true},"identity":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"infrastructure_provider":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_key_base64":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":30,"update":30}},"azurerm_attestation_provider":{"schema":{"attestation_uri":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"open_enclave_policy_base64":{"type":"TypeString","optional":true},"policy_signing_certificate_data":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sev_snp_policy_base64":{"type":"TypeString","optional":true},"sgx_enclave_policy_base64":{"type":"TypeString","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tpm_policy_base64":{"type":"TypeString","optional":true},"trust_model":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automanage_configuration":{"schema":{"antimalware":{"type":"TypeList","optional":true,"elem":{"schema":{"exclusions":{"type":"TypeList","optional":true,"elem":{"schema":{"extensions":{"type":"TypeString","optional":true},"paths":{"type":"TypeString","optional":true},"processes":{"type":"TypeString","optional":true}}},"maxItems":1},"real_time_protection_enabled":{"type":"TypeBool","optional":true,"default":false},"scheduled_scan_day":{"type":"TypeInt","optional":true,"default":8},"scheduled_scan_enabled":{"type":"TypeBool","optional":true,"default":false},"scheduled_scan_time_in_minutes":{"type":"TypeInt","optional":true,"default":0},"scheduled_scan_type":{"type":"TypeString","optional":true,"default":"Quick"}}},"maxItems":1},"automation_account_enabled":{"type":"TypeBool","optional":true,"default":false},"azure_security_baseline":{"type":"TypeList","optional":true,"elem":{"schema":{"assignment_type":{"type":"TypeString","optional":true,"default":"ApplyAndAutoCorrect"}}},"maxItems":1},"backup":{"type":"TypeList","optional":true,"elem":{"schema":{"instant_rp_retention_range_in_days":{"type":"TypeInt","optional":true,"default":5},"policy_name":{"type":"TypeString","optional":true},"retention_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"daily_schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_duration":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","optional":true},"duration_type":{"type":"TypeString","optional":true,"default":"Days"}}},"maxItems":1},"retention_times":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"retention_policy_type":{"type":"TypeString","optional":true,"default":"LongTermRetentionPolicy"},"weekly_schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_duration":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","optional":true},"duration_type":{"type":"TypeString","optional":true,"default":"Weeks"}}},"maxItems":1},"retention_times":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}},"maxItems":1},"schedule_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"schedule_policy_type":{"type":"TypeString","optional":true,"default":"SimpleSchedulePolicy"},"schedule_run_days":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"schedule_run_frequency":{"type":"TypeString","optional":true,"default":"Daily"},"schedule_run_times":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"time_zone":{"type":"TypeString","optional":true,"default":"UTC"}}},"maxItems":1},"boot_diagnostics_enabled":{"type":"TypeBool","optional":true,"default":false},"defender_for_cloud_enabled":{"type":"TypeBool","optional":true,"default":false},"guest_configuration_enabled":{"type":"TypeBool","optional":true,"default":false},"location":{"type":"TypeString","required":true,"forceNew":true},"log_analytics_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"status_change_alert_enabled":{"type":"TypeBool","optional":true,"default":false},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_account":{"schema":{"dsc_primary_access_key":{"type":"TypeString","computed":true},"dsc_secondary_access_key":{"type":"TypeString","computed":true},"dsc_server_endpoint":{"type":"TypeString","computed":true},"encryption":{"type":"TypeList","optional":true,"elem":{"schema":{"key_source":{"type":"TypeString","optional":true},"key_vault_key_id":{"type":"TypeString","required":true},"user_assigned_identity_id":{"type":"TypeString","optional":true}}}},"hybrid_service_url":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"local_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_endpoint_connection":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_certificate":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"base64":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"exportable":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"thumbprint":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_connection":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"type":{"type":"TypeString","required":true,"forceNew":true},"values":{"type":"TypeMap","required":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_connection_certificate":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"automation_certificate_name":{"type":"TypeString","required":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subscription_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_connection_classic_certificate":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"certificate_asset_name":{"type":"TypeString","required":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subscription_id":{"type":"TypeString","required":true},"subscription_name":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_connection_service_principal":{"schema":{"application_id":{"type":"TypeString","required":true},"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"certificate_thumbprint":{"type":"TypeString","required":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subscription_id":{"type":"TypeString","required":true},"tenant_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_connection_type":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"field":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"is_encrypted":{"type":"TypeBool","optional":true},"is_optional":{"type":"TypeBool","optional":true},"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"is_global":{"type":"TypeBool","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":10}},"azurerm_automation_credential":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_dsc_configuration":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"content_embedded":{"type":"TypeString","required":true},"description":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"log_verbose":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"state":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_dsc_nodeconfiguration":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"configuration_name":{"type":"TypeString","computed":true},"content_embedded":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_hybrid_runbook_worker":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"ip":{"type":"TypeString","computed":true},"last_seen_date_time":{"type":"TypeString","computed":true},"registration_date_time":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"vm_resource_id":{"type":"TypeString","required":true,"forceNew":true},"worker_group_name":{"type":"TypeString","required":true,"forceNew":true},"worker_id":{"type":"TypeString","required":true,"forceNew":true},"worker_name":{"type":"TypeString","computed":true},"worker_type":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":10}},"azurerm_automation_hybrid_runbook_worker_group":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"credential_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":10,"update":10}},"azurerm_automation_job_schedule":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"job_schedule_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"resource_manager_id":{"type":"TypeString","computed":true},"run_on":{"type":"TypeString","optional":true,"forceNew":true},"runbook_name":{"type":"TypeString","required":true,"forceNew":true},"schedule_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_automation_module":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"module_link":{"type":"TypeList","required":true,"elem":{"schema":{"hash":{"type":"TypeList","optional":true,"elem":{"schema":{"algorithm":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}},"maxItems":1},"uri":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_powershell72_module":{"schema":{"automation_account_id":{"type":"TypeString","required":true,"forceNew":true},"module_link":{"type":"TypeList","required":true,"elem":{"schema":{"hash":{"type":"TypeList","optional":true,"elem":{"schema":{"algorithm":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}},"maxItems":1},"uri":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_python3_package":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"content_uri":{"type":"TypeString","required":true,"forceNew":true},"content_version":{"type":"TypeString","optional":true,"forceNew":true},"hash_algorithm":{"type":"TypeString","optional":true,"forceNew":true},"hash_value":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":10,"update":10}},"azurerm_automation_runbook":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"content":{"type":"TypeString","optional":true,"computed":true},"description":{"type":"TypeString","optional":true},"draft":{"type":"TypeList","optional":true,"elem":{"schema":{"content_link":{"type":"TypeList","optional":true,"elem":{"schema":{"hash":{"type":"TypeList","optional":true,"elem":{"schema":{"algorithm":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}},"maxItems":1},"uri":{"type":"TypeString","required":true},"version":{"type":"TypeString","optional":true}}},"maxItems":1},"creation_time":{"type":"TypeString","computed":true},"edit_mode_enabled":{"type":"TypeBool","optional":true},"last_modified_time":{"type":"TypeString","computed":true},"output_types":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"parameters":{"type":"TypeList","optional":true,"elem":{"schema":{"default_value":{"type":"TypeString","optional":true},"key":{"type":"TypeString","required":true},"mandatory":{"type":"TypeBool","optional":true,"default":false},"position":{"type":"TypeInt","optional":true},"type":{"type":"TypeString","required":true}}}}}},"maxItems":1},"job_schedule":{"type":"TypeSet","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"job_schedule_id":{"type":"TypeString","computed":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"run_on":{"type":"TypeString","optional":true},"schedule_name":{"type":"TypeString","required":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"log_activity_trace_level":{"type":"TypeInt","optional":true},"log_progress":{"type":"TypeBool","required":true},"log_verbose":{"type":"TypeBool","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"publish_content_link":{"type":"TypeList","optional":true,"elem":{"schema":{"hash":{"type":"TypeList","optional":true,"elem":{"schema":{"algorithm":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}},"maxItems":1},"uri":{"type":"TypeString","required":true},"version":{"type":"TypeString","optional":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"runbook_type":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_schedule":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"expiry_time":{"type":"TypeString","optional":true,"computed":true},"frequency":{"type":"TypeString","required":true},"interval":{"type":"TypeInt","optional":true,"computed":true},"month_days":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"monthly_occurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"day":{"type":"TypeString","required":true},"occurrence":{"type":"TypeInt","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"start_time":{"type":"TypeString","optional":true,"computed":true},"timezone":{"type":"TypeString","optional":true,"default":"Etc/UTC"},"week_days":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_software_update_configuration":{"schema":{"automation_account_id":{"type":"TypeString","required":true,"forceNew":true},"duration":{"type":"TypeString","optional":true,"default":"PT2H"},"error_code":{"type":"TypeString","computed":true},"error_message":{"type":"TypeString","computed":true},"linux":{"type":"TypeList","optional":true,"elem":{"schema":{"classifications_included":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"excluded_packages":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"included_packages":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"reboot":{"type":"TypeString","optional":true,"default":"IfRequired"}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"non_azure_computer_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"post_task":{"type":"TypeList","optional":true,"elem":{"schema":{"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"source":{"type":"TypeString","optional":true}}},"maxItems":1},"pre_task":{"type":"TypeList","optional":true,"elem":{"schema":{"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"source":{"type":"TypeString","optional":true}}},"maxItems":1},"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"advanced_month_days":{"type":"TypeList","optional":true,"elem":{"type":"TypeInt"}},"advanced_week_days":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"creation_time":{"type":"TypeString","computed":true},"description":{"type":"TypeString","optional":true},"expiry_time":{"type":"TypeString","optional":true,"computed":true},"expiry_time_offset_minutes":{"type":"TypeFloat","optional":true},"frequency":{"type":"TypeString","required":true},"interval":{"type":"TypeInt","optional":true},"is_enabled":{"type":"TypeBool","optional":true,"default":true},"last_modified_time":{"type":"TypeString","computed":true},"monthly_occurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"day":{"type":"TypeString","required":true},"occurrence":{"type":"TypeInt","required":true}}},"maxItems":1},"next_run":{"type":"TypeString","optional":true,"computed":true},"next_run_offset_minutes":{"type":"TypeFloat","optional":true},"start_time":{"type":"TypeString","optional":true,"computed":true},"start_time_offset_minutes":{"type":"TypeFloat","optional":true},"time_zone":{"type":"TypeString","optional":true,"default":"Etc/UTC"}}},"maxItems":1},"target":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_query":{"type":"TypeList","optional":true,"elem":{"schema":{"locations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"scope":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"tag_filter":{"type":"TypeString","optional":true},"tags":{"type":"TypeList","optional":true,"elem":{"schema":{"tag":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}}}}},"non_azure_query":{"type":"TypeList","optional":true,"elem":{"schema":{"function_alias":{"type":"TypeString","optional":true},"workspace_id":{"type":"TypeString","optional":true}}}}}},"maxItems":1},"virtual_machine_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"windows":{"type":"TypeList","optional":true,"elem":{"schema":{"classifications_included":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"excluded_knowledge_base_numbers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"included_knowledge_base_numbers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"reboot":{"type":"TypeString","optional":true,"default":"IfRequired"}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":10,"update":30}},"azurerm_automation_source_control":{"schema":{"automatic_sync":{"type":"TypeBool","optional":true,"default":false},"automation_account_id":{"type":"TypeString","required":true,"forceNew":true},"branch":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"folder_path":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"publish_runbook_enabled":{"type":"TypeBool","optional":true,"default":true},"repository_url":{"type":"TypeString","required":true},"security":{"type":"TypeList","required":true,"elem":{"schema":{"refresh_token":{"type":"TypeString","optional":true},"token":{"type":"TypeString","required":true},"token_type":{"type":"TypeString","required":true}}},"maxItems":1,"minItems":1},"source_control_type":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":10,"update":10}},"azurerm_automation_variable_bool":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"encrypted":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeBool","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_variable_datetime":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"encrypted":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_variable_int":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"encrypted":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeInt","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_variable_object":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"encrypted":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_variable_string":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"encrypted":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_automation_watcher":{"schema":{"automation_account_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"etag":{"type":"TypeString","optional":true},"execution_frequency_in_seconds":{"type":"TypeInt","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"script_name":{"type":"TypeString","required":true,"forceNew":true},"script_parameters":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"script_run_on":{"type":"TypeString","required":true},"status":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":10,"update":10}},"azurerm_automation_webhook":{"schema":{"automation_account_name":{"type":"TypeString","required":true,"forceNew":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"expiry_time":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"run_on_worker_group":{"type":"TypeString","optional":true},"runbook_name":{"type":"TypeString","required":true},"uri":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_availability_set":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"managed":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"platform_fault_domain_count":{"type":"TypeInt","optional":true,"default":3,"forceNew":true},"platform_update_domain_count":{"type":"TypeInt","optional":true,"default":5,"forceNew":true},"proximity_placement_group_id":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_backup_container_storage_account":{"schema":{"recovery_vault_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_backup_policy_file_share":{"schema":{"backup":{"type":"TypeList","required":true,"elem":{"schema":{"frequency":{"type":"TypeString","required":true},"hourly":{"type":"TypeList","optional":true,"elem":{"schema":{"interval":{"type":"TypeInt","required":true},"start_time":{"type":"TypeString","required":true},"window_duration":{"type":"TypeInt","required":true}}},"maxItems":1},"time":{"type":"TypeString","optional":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"recovery_vault_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_daily":{"type":"TypeList","required":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true}}},"maxItems":1},"retention_monthly":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"days":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"include_last_days":{"type":"TypeBool","optional":true,"default":false},"weekdays":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"weeks":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"retention_weekly":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"weekdays":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"retention_yearly":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"days":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"include_last_days":{"type":"TypeBool","optional":true,"default":false},"months":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"weekdays":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"weeks":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"timezone":{"type":"TypeString","optional":true,"default":"UTC"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_backup_policy_vm":{"schema":{"backup":{"type":"TypeList","required":true,"elem":{"schema":{"frequency":{"type":"TypeString","required":true},"hour_duration":{"type":"TypeInt","optional":true},"hour_interval":{"type":"TypeInt","optional":true},"time":{"type":"TypeString","required":true},"weekdays":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"instant_restore_resource_group":{"type":"TypeList","optional":true,"elem":{"schema":{"prefix":{"type":"TypeString","required":true},"suffix":{"type":"TypeString","optional":true}}},"maxItems":1},"instant_restore_retention_days":{"type":"TypeInt","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"policy_type":{"type":"TypeString","optional":true,"default":"V1","forceNew":true},"recovery_vault_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_daily":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true}}},"maxItems":1},"retention_monthly":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"days":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"include_last_days":{"type":"TypeBool","optional":true,"default":false},"weekdays":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"weeks":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"retention_weekly":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"weekdays":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"retention_yearly":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"days":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"include_last_days":{"type":"TypeBool","optional":true,"default":false},"months":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"weekdays":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"weeks":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"tiering_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"archived_restore_point":{"type":"TypeList","required":true,"elem":{"schema":{"duration":{"type":"TypeInt","optional":true},"duration_type":{"type":"TypeString","optional":true},"mode":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"timezone":{"type":"TypeString","optional":true,"default":"UTC"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_backup_policy_vm_workload":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"protection_policy":{"type":"TypeSet","required":true,"elem":{"schema":{"backup":{"type":"TypeList","required":true,"elem":{"schema":{"frequency":{"type":"TypeString","optional":true},"frequency_in_minutes":{"type":"TypeInt","optional":true},"time":{"type":"TypeString","optional":true},"weekdays":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"policy_type":{"type":"TypeString","required":true},"retention_daily":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true}}},"maxItems":1},"retention_monthly":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"format_type":{"type":"TypeString","required":true},"monthdays":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"weekdays":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"weeks":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"retention_weekly":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"weekdays":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"retention_yearly":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"format_type":{"type":"TypeString","required":true},"monthdays":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"months":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"weekdays":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"weeks":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"simple_retention":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true}}},"maxItems":1}}}},"recovery_vault_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"settings":{"type":"TypeList","required":true,"elem":{"schema":{"compression_enabled":{"type":"TypeBool","optional":true,"default":false},"time_zone":{"type":"TypeString","required":true}}},"maxItems":1},"workload_type":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_backup_protected_file_share":{"schema":{"backup_policy_id":{"type":"TypeString","required":true},"recovery_vault_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source_file_share_name":{"type":"TypeString","required":true,"forceNew":true},"source_storage_account_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":80,"read":5,"delete":80,"update":80}},"azurerm_backup_protected_vm":{"schema":{"backup_policy_id":{"type":"TypeString","optional":true},"exclude_disk_luns":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"include_disk_luns":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"protection_state":{"type":"TypeString","optional":true,"computed":true},"recovery_vault_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source_vm_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":120,"read":5,"delete":80,"update":120}},"azurerm_bastion_host":{"schema":{"copy_paste_enabled":{"type":"TypeBool","optional":true,"default":true},"dns_name":{"type":"TypeString","computed":true},"file_copy_enabled":{"type":"TypeBool","optional":true,"default":false},"ip_configuration":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"public_ip_address_id":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"ip_connect_enabled":{"type":"TypeBool","optional":true,"default":false},"kerberos_enabled":{"type":"TypeBool","optional":true,"default":false},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scale_units":{"type":"TypeInt","optional":true,"default":2},"shareable_link_enabled":{"type":"TypeBool","optional":true,"default":false},"sku":{"type":"TypeString","optional":true,"default":"Basic"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tunneling_enabled":{"type":"TypeBool","optional":true,"default":false},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_batch_account":{"schema":{"account_endpoint":{"type":"TypeString","computed":true},"allowed_authentication_modes":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"encryption":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"key_vault_key_id":{"type":"TypeString","required":true}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_reference":{"type":"TypeList","optional":true,"elem":{"schema":{"id":{"type":"TypeString","required":true},"url":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_profile":{"type":"TypeList","optional":true,"elem":{"schema":{"account_access":{"type":"TypeList","optional":true,"elem":{"schema":{"default_action":{"type":"TypeString","optional":true,"default":"Deny"},"ip_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"ip_range":{"type":"TypeString","required":true}}}}}},"maxItems":1},"node_management_access":{"type":"TypeList","optional":true,"elem":{"schema":{"default_action":{"type":"TypeString","optional":true,"default":"Deny"},"ip_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"ip_range":{"type":"TypeString","required":true}}}}}},"maxItems":1}}},"maxItems":1},"pool_allocation_mode":{"type":"TypeString","optional":true,"default":"BatchService"},"primary_access_key":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_access_key":{"type":"TypeString","computed":true},"storage_account_authentication_mode":{"type":"TypeString","optional":true},"storage_account_id":{"type":"TypeString","optional":true},"storage_account_node_identity":{"type":"TypeString","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_batch_application":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"allow_updates":{"type":"TypeBool","optional":true,"default":true},"default_version":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_batch_certificate":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"certificate":{"type":"TypeString","required":true},"format":{"type":"TypeString","required":true},"name":{"type":"TypeString","computed":true},"password":{"type":"TypeString","optional":true},"public_data":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"thumbprint":{"type":"TypeString","required":true,"forceNew":true},"thumbprint_algorithm":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_batch_job":{"schema":{"batch_pool_id":{"type":"TypeString","required":true,"forceNew":true},"common_environment_properties":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"display_name":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","optional":true,"default":0},"task_retry_maximum":{"type":"TypeInt","optional":true}},"timeouts":{"create":5,"read":5,"delete":5,"update":5}},"azurerm_batch_pool":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"auto_scale":{"type":"TypeList","optional":true,"elem":{"schema":{"evaluation_interval":{"type":"TypeString","optional":true,"default":"PT15M"},"formula":{"type":"TypeString","required":true}}},"maxItems":1},"certificate":{"type":"TypeList","optional":true,"elem":{"schema":{"id":{"type":"TypeString","required":true},"store_location":{"type":"TypeString","required":true},"store_name":{"type":"TypeString","optional":true},"visibility":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"container_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"container_image_names":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"container_registries":{"type":"TypeList","configMode":"Auto","optional":true,"forceNew":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"registry_server":{"type":"TypeString","required":true,"forceNew":true},"user_assigned_identity_id":{"type":"TypeString","optional":true,"description":"The User Assigned Identity to use for Container Registry access.","forceNew":true},"user_name":{"type":"TypeString","optional":true,"forceNew":true}}}},"type":{"type":"TypeString","optional":true}}},"maxItems":1,"minItems":1},"data_disks":{"type":"TypeList","optional":true,"elem":{"schema":{"caching":{"type":"TypeString","optional":true,"default":"ReadOnly"},"disk_size_gb":{"type":"TypeInt","required":true},"lun":{"type":"TypeInt","required":true},"storage_account_type":{"type":"TypeString","optional":true,"default":"Standard_LRS"}}}},"disk_encryption":{"type":"TypeList","optional":true,"elem":{"schema":{"disk_encryption_target":{"type":"TypeString","required":true}}}},"display_name":{"type":"TypeString","optional":true,"forceNew":true},"extensions":{"type":"TypeList","optional":true,"elem":{"schema":{"auto_upgrade_minor_version":{"type":"TypeBool","optional":true},"automatic_upgrade_enabled":{"type":"TypeBool","optional":true},"name":{"type":"TypeString","required":true},"protected_settings":{"type":"TypeString","optional":true},"provision_after_extensions":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"publisher":{"type":"TypeString","required":true},"settings_json":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"type_handler_version":{"type":"TypeString","optional":true}}}},"fixed_scale":{"type":"TypeList","optional":true,"elem":{"schema":{"node_deallocation_method":{"type":"TypeString","optional":true},"resize_timeout":{"type":"TypeString","optional":true,"default":"PT15M"},"target_dedicated_nodes":{"type":"TypeInt","optional":true,"default":1},"target_low_priority_nodes":{"type":"TypeInt","optional":true,"default":0}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true}}},"maxItems":1},"inter_node_communication":{"type":"TypeString","optional":true,"default":"Enabled"},"license_type":{"type":"TypeString","optional":true},"max_tasks_per_node":{"type":"TypeInt","optional":true,"default":1,"forceNew":true},"metadata":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"mount":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_blob_file_system":{"type":"TypeList","optional":true,"elem":{"schema":{"account_key":{"type":"TypeString","optional":true},"account_name":{"type":"TypeString","required":true},"blobfuse_options":{"type":"TypeString","optional":true},"container_name":{"type":"TypeString","required":true},"identity_id":{"type":"TypeString","optional":true},"relative_mount_path":{"type":"TypeString","required":true},"sas_key":{"type":"TypeString","optional":true}}},"maxItems":1},"azure_file_share":{"type":"TypeList","optional":true,"elem":{"schema":{"account_key":{"type":"TypeString","required":true},"account_name":{"type":"TypeString","required":true},"azure_file_url":{"type":"TypeString","required":true},"mount_options":{"type":"TypeString","optional":true},"relative_mount_path":{"type":"TypeString","required":true}}}},"cifs_mount":{"type":"TypeList","optional":true,"elem":{"schema":{"mount_options":{"type":"TypeString","optional":true},"password":{"type":"TypeString","required":true},"relative_mount_path":{"type":"TypeString","required":true},"source":{"type":"TypeString","required":true},"user_name":{"type":"TypeString","required":true}}}},"nfs_mount":{"type":"TypeList","optional":true,"elem":{"schema":{"mount_options":{"type":"TypeString","optional":true},"relative_mount_path":{"type":"TypeString","required":true},"source":{"type":"TypeString","required":true}}}}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"network_configuration":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"accelerated_networking_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"dynamic_vnet_assignment_scope":{"type":"TypeString","optional":true,"default":"none","forceNew":true},"endpoint_configuration":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"backend_port":{"type":"TypeInt","required":true,"forceNew":true},"frontend_port_range":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_security_group_rules":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"access":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","required":true,"forceNew":true},"source_address_prefix":{"type":"TypeString","required":true,"forceNew":true},"source_port_ranges":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"type":"TypeString","default":"*"}}}}},"protocol":{"type":"TypeString","required":true,"forceNew":true}}}},"public_address_provisioning_type":{"type":"TypeString","optional":true},"public_ips":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"node_agent_sku_id":{"type":"TypeString","required":true,"forceNew":true},"node_placement":{"type":"TypeList","optional":true,"elem":{"schema":{"policy":{"type":"TypeString","optional":true,"default":"Regional"}}}},"os_disk_placement":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"start_task":{"type":"TypeList","optional":true,"elem":{"schema":{"command_line":{"type":"TypeString","required":true},"common_environment_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"container":{"type":"TypeList","optional":true,"elem":{"schema":{"image_name":{"type":"TypeString","required":true},"registry":{"type":"TypeList","optional":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"registry_server":{"type":"TypeString","required":true,"forceNew":true},"user_assigned_identity_id":{"type":"TypeString","optional":true,"description":"The User Assigned Identity to use for Container Registry access.","forceNew":true},"user_name":{"type":"TypeString","optional":true,"forceNew":true}}}},"run_options":{"type":"TypeString","optional":true},"working_directory":{"type":"TypeString","optional":true}}}},"resource_file":{"type":"TypeList","optional":true,"elem":{"schema":{"auto_storage_container_name":{"type":"TypeString","optional":true},"blob_prefix":{"type":"TypeString","optional":true},"file_mode":{"type":"TypeString","optional":true},"file_path":{"type":"TypeString","optional":true},"http_url":{"type":"TypeString","optional":true},"storage_container_url":{"type":"TypeString","optional":true},"user_assigned_identity_id":{"type":"TypeString","optional":true}}}},"task_retry_maximum":{"type":"TypeInt","optional":true},"user_identity":{"type":"TypeList","required":true,"elem":{"schema":{"auto_user":{"type":"TypeList","optional":true,"elem":{"schema":{"elevation_level":{"type":"TypeString","optional":true,"default":"NonAdmin"},"scope":{"type":"TypeString","optional":true,"default":"Task"}}},"maxItems":1},"user_name":{"type":"TypeString","optional":true}}},"maxItems":1},"wait_for_success":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"stop_pending_resize_operation":{"type":"TypeBool","optional":true,"default":false},"storage_image_reference":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"id":{"type":"TypeString","optional":true,"forceNew":true},"offer":{"type":"TypeString","optional":true,"forceNew":true},"publisher":{"type":"TypeString","optional":true,"forceNew":true},"sku":{"type":"TypeString","optional":true,"forceNew":true},"version":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"target_node_communication_mode":{"type":"TypeString","optional":true},"task_scheduling_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"node_fill_type":{"type":"TypeString","optional":true,"computed":true}}}},"user_accounts":{"type":"TypeList","optional":true,"elem":{"schema":{"elevation_level":{"type":"TypeString","required":true},"linux_user_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"gid":{"type":"TypeInt","optional":true},"ssh_private_key":{"type":"TypeString","optional":true},"uid":{"type":"TypeInt","optional":true}}}},"name":{"type":"TypeString","required":true},"password":{"type":"TypeString","required":true},"windows_user_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"login_mode":{"type":"TypeString","required":true}}}}}}},"vm_size":{"type":"TypeString","required":true,"forceNew":true},"windows":{"type":"TypeList","optional":true,"elem":{"schema":{"enable_automatic_updates":{"type":"TypeBool","optional":true,"default":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_billing_account_cost_management_export":{"schema":{"active":{"type":"TypeBool","optional":true,"default":true},"billing_account_id":{"type":"TypeString","required":true,"forceNew":true},"export_data_options":{"type":"TypeList","required":true,"elem":{"schema":{"time_frame":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"export_data_storage_location":{"type":"TypeList","required":true,"elem":{"schema":{"container_id":{"type":"TypeString","required":true,"forceNew":true},"root_folder_path":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"recurrence_period_end_date":{"type":"TypeString","required":true},"recurrence_period_start_date":{"type":"TypeString","required":true},"recurrence_type":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_blueprint_assignment":{"schema":{"blueprint_name":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","required":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"lock_exclude_actions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":200},"lock_exclude_principals":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":5},"lock_mode":{"type":"TypeString","optional":true,"default":"None"},"name":{"type":"TypeString","required":true,"forceNew":true},"parameter_values":{"type":"TypeString","optional":true},"resource_groups":{"type":"TypeString","optional":true},"target_subscription_id":{"type":"TypeString","required":true,"forceNew":true},"type":{"type":"TypeString","computed":true},"version_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":5,"update":30}},"azurerm_bot_channel_alexa":{"schema":{"bot_name":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"skill_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_channel_direct_line_speech":{"schema":{"bot_name":{"type":"TypeString","required":true,"forceNew":true},"cognitive_account_id":{"type":"TypeString","optional":true},"cognitive_service_access_key":{"type":"TypeString","required":true},"cognitive_service_location":{"type":"TypeString","required":true},"custom_speech_model_id":{"type":"TypeString","optional":true},"custom_voice_deployment_id":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_channel_directline":{"schema":{"bot_name":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"site":{"type":"TypeSet","required":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"endpoint_parameters_enabled":{"type":"TypeBool","optional":true},"enhanced_authentication_enabled":{"type":"TypeBool","optional":true,"default":false},"id":{"type":"TypeString","computed":true},"key":{"type":"TypeString","computed":true},"key2":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"storage_enabled":{"type":"TypeBool","optional":true,"default":true},"trusted_origins":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"user_upload_enabled":{"type":"TypeBool","optional":true,"default":true},"v1_allowed":{"type":"TypeBool","optional":true,"default":true},"v3_allowed":{"type":"TypeBool","optional":true,"default":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_channel_email":{"schema":{"bot_name":{"type":"TypeString","required":true,"forceNew":true},"email_address":{"type":"TypeString","required":true},"email_password":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"magic_code":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_channel_facebook":{"schema":{"bot_name":{"type":"TypeString","required":true,"forceNew":true},"facebook_application_id":{"type":"TypeString","required":true},"facebook_application_secret":{"type":"TypeString","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"page":{"type":"TypeSet","required":true,"elem":{"schema":{"access_token":{"type":"TypeString","required":true},"id":{"type":"TypeString","required":true}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_channel_line":{"schema":{"bot_name":{"type":"TypeString","required":true,"forceNew":true},"line_channel":{"type":"TypeSet","required":true,"elem":{"schema":{"access_token":{"type":"TypeString","required":true},"secret":{"type":"TypeString","required":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_channel_ms_teams":{"schema":{"bot_name":{"type":"TypeString","required":true,"forceNew":true},"calling_web_hook":{"type":"TypeString","optional":true,"computed":true},"deployment_environment":{"type":"TypeString","optional":true,"default":"CommercialDeployment"},"enable_calling":{"type":"TypeBool","optional":true,"default":false},"location":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_channel_slack":{"schema":{"bot_name":{"type":"TypeString","required":true,"forceNew":true},"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"landing_page_url":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"signing_secret":{"type":"TypeString","optional":true},"verification_token":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_channel_sms":{"schema":{"bot_name":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"phone_number":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sms_channel_account_security_id":{"type":"TypeString","required":true},"sms_channel_auth_token":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_channel_web_chat":{"schema":{"bot_name":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"site":{"type":"TypeSet","optional":true,"elem":{"schema":{"endpoint_parameters_enabled":{"type":"TypeBool","optional":true},"name":{"type":"TypeString","required":true},"storage_enabled":{"type":"TypeBool","optional":true,"default":true},"user_upload_enabled":{"type":"TypeBool","optional":true,"default":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_channels_registration":{"schema":{"cmk_key_vault_url":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"developer_app_insights_api_key":{"type":"TypeString","optional":true},"developer_app_insights_application_id":{"type":"TypeString","optional":true},"developer_app_insights_key":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true,"computed":true},"endpoint":{"type":"TypeString","optional":true},"icon_url":{"type":"TypeString","optional":true,"default":"https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png"},"location":{"type":"TypeString","required":true,"forceNew":true},"microsoft_app_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"streaming_endpoint_enabled":{"type":"TypeBool","optional":true,"default":false},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_connection":{"schema":{"bot_name":{"type":"TypeString","required":true,"forceNew":true},"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scopes":{"type":"TypeString","optional":true},"service_provider_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_service_azure_bot":{"schema":{"cmk_key_vault_key_url":{"type":"TypeString","optional":true},"developer_app_insights_api_key":{"type":"TypeString","optional":true},"developer_app_insights_application_id":{"type":"TypeString","optional":true},"developer_app_insights_key":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true,"computed":true},"endpoint":{"type":"TypeString","optional":true},"icon_url":{"type":"TypeString","optional":true,"default":"https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png"},"local_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"luis_app_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"luis_key":{"type":"TypeString","optional":true},"microsoft_app_id":{"type":"TypeString","required":true,"forceNew":true},"microsoft_app_msi_id":{"type":"TypeString","optional":true,"forceNew":true},"microsoft_app_tenant_id":{"type":"TypeString","optional":true,"forceNew":true},"microsoft_app_type":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"streaming_endpoint_enabled":{"type":"TypeBool","optional":true,"default":false},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_bot_web_app":{"schema":{"developer_app_insights_api_key":{"type":"TypeString","optional":true},"developer_app_insights_application_id":{"type":"TypeString","optional":true},"developer_app_insights_key":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true,"computed":true},"endpoint":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"luis_app_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"luis_key":{"type":"TypeString","optional":true},"microsoft_app_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_capacity_reservation":{"schema":{"capacity_reservation_group_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeList","required":true,"elem":{"schema":{"capacity":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zone":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_capacity_reservation_group":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cdn_endpoint":{"schema":{"content_types_to_compress":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"delivery_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"cache_expiration_action":{"type":"TypeList","optional":true,"elem":{"schema":{"behavior":{"type":"TypeString","required":true},"duration":{"type":"TypeString","optional":true}}},"maxItems":1},"cache_key_query_string_action":{"type":"TypeList","optional":true,"elem":{"schema":{"behavior":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true}}},"maxItems":1},"cookies_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"selector":{"type":"TypeString","required":true},"transforms":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"device_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","optional":true,"default":"Equal"}}},"maxItems":1},"http_version_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","optional":true,"default":"Equal"}}}},"modify_request_header_action":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","optional":true}}}},"modify_response_header_action":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","optional":true}}}},"name":{"type":"TypeString","required":true},"order":{"type":"TypeInt","required":true},"post_arg_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"selector":{"type":"TypeString","required":true},"transforms":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"query_string_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"remote_address_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true}}}},"request_body_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"request_header_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"selector":{"type":"TypeString","required":true},"transforms":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"request_method_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","optional":true,"default":"Equal"}}},"maxItems":1},"request_scheme_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","optional":true,"default":"Equal"}}},"maxItems":1},"request_uri_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"url_file_extension_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"url_file_name_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"url_path_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"url_redirect_action":{"type":"TypeList","optional":true,"elem":{"schema":{"fragment":{"type":"TypeString","optional":true},"hostname":{"type":"TypeString","optional":true},"path":{"type":"TypeString","optional":true},"protocol":{"type":"TypeString","optional":true,"default":"MatchRequest"},"query_string":{"type":"TypeString","optional":true},"redirect_type":{"type":"TypeString","required":true}}},"maxItems":1},"url_rewrite_action":{"type":"TypeList","optional":true,"elem":{"schema":{"destination":{"type":"TypeString","required":true},"preserve_unmatched_path":{"type":"TypeBool","optional":true,"default":true},"source_pattern":{"type":"TypeString","required":true}}},"maxItems":1}}}},"fqdn":{"type":"TypeString","computed":true},"geo_filter":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"country_codes":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"relative_path":{"type":"TypeString","required":true}}}},"global_delivery_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"cache_expiration_action":{"type":"TypeList","optional":true,"elem":{"schema":{"behavior":{"type":"TypeString","required":true},"duration":{"type":"TypeString","optional":true}}},"maxItems":1},"cache_key_query_string_action":{"type":"TypeList","optional":true,"elem":{"schema":{"behavior":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true}}},"maxItems":1},"modify_request_header_action":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","optional":true}}}},"modify_response_header_action":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","optional":true}}}},"url_redirect_action":{"type":"TypeList","optional":true,"elem":{"schema":{"fragment":{"type":"TypeString","optional":true},"hostname":{"type":"TypeString","optional":true},"path":{"type":"TypeString","optional":true},"protocol":{"type":"TypeString","optional":true,"default":"MatchRequest"},"query_string":{"type":"TypeString","optional":true},"redirect_type":{"type":"TypeString","required":true}}},"maxItems":1},"url_rewrite_action":{"type":"TypeList","optional":true,"elem":{"schema":{"destination":{"type":"TypeString","required":true},"preserve_unmatched_path":{"type":"TypeBool","optional":true,"default":true},"source_pattern":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"is_compression_enabled":{"type":"TypeBool","optional":true},"is_http_allowed":{"type":"TypeBool","optional":true,"default":true},"is_https_allowed":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"optimization_type":{"type":"TypeString","optional":true},"origin":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"schema":{"host_name":{"type":"TypeString","required":true,"forceNew":true},"http_port":{"type":"TypeInt","optional":true,"default":80,"forceNew":true},"https_port":{"type":"TypeInt","optional":true,"default":443,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}}}},"origin_host_header":{"type":"TypeString","optional":true},"origin_path":{"type":"TypeString","optional":true},"probe_path":{"type":"TypeString","optional":true},"profile_name":{"type":"TypeString","required":true,"forceNew":true},"querystring_caching_behaviour":{"type":"TypeString","optional":true,"default":"IgnoreQueryString"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cdn_endpoint_custom_domain":{"schema":{"cdn_endpoint_id":{"type":"TypeString","required":true,"forceNew":true},"cdn_managed_https":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate_type":{"type":"TypeString","required":true},"protocol_type":{"type":"TypeString","required":true},"tls_version":{"type":"TypeString","optional":true,"default":"TLS12"}}},"maxItems":1,"minItems":1},"host_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"user_managed_https":{"type":"TypeList","optional":true,"elem":{"schema":{"key_vault_secret_id":{"type":"TypeString","required":true},"tls_version":{"type":"TypeString","optional":true,"default":"TLS12"}}},"maxItems":1,"minItems":1}},"timeouts":{"create":720,"read":5,"delete":720,"update":1440}},"azurerm_cdn_frontdoor_custom_domain":{"schema":{"cdn_frontdoor_profile_id":{"type":"TypeString","required":true,"forceNew":true},"dns_zone_id":{"type":"TypeString","optional":true},"expiration_date":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tls":{"type":"TypeList","required":true,"elem":{"schema":{"cdn_frontdoor_secret_id":{"type":"TypeString","optional":true,"computed":true},"certificate_type":{"type":"TypeString","optional":true,"default":"ManagedCertificate"},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"TLS12"}}},"maxItems":1},"validation_token":{"type":"TypeString","computed":true}},"timeouts":{"create":720,"read":5,"delete":720,"update":1440}},"azurerm_cdn_frontdoor_custom_domain_association":{"schema":{"cdn_frontdoor_custom_domain_id":{"type":"TypeString","required":true,"forceNew":true},"cdn_frontdoor_route_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cdn_frontdoor_endpoint":{"schema":{"cdn_frontdoor_profile_id":{"type":"TypeString","required":true,"forceNew":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"host_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cdn_frontdoor_firewall_policy":{"schema":{"custom_block_response_body":{"type":"TypeString","optional":true},"custom_block_response_status_code":{"type":"TypeInt","optional":true},"custom_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"match_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":600},"match_variable":{"type":"TypeString","required":true},"negation_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"selector":{"type":"TypeString","optional":true},"transforms":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":5}}},"maxItems":10},"name":{"type":"TypeString","required":true},"priority":{"type":"TypeInt","optional":true,"default":1},"rate_limit_duration_in_minutes":{"type":"TypeInt","optional":true,"default":1},"rate_limit_threshold":{"type":"TypeInt","optional":true,"default":10},"type":{"type":"TypeString","required":true}}},"maxItems":100},"enabled":{"type":"TypeBool","optional":true,"default":true},"frontend_endpoint_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"managed_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"exclusion":{"type":"TypeList","optional":true,"elem":{"schema":{"match_variable":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"selector":{"type":"TypeString","required":true}}},"maxItems":100},"override":{"type":"TypeList","optional":true,"elem":{"schema":{"exclusion":{"type":"TypeList","optional":true,"elem":{"schema":{"match_variable":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"selector":{"type":"TypeString","required":true}}},"maxItems":100},"rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":false},"exclusion":{"type":"TypeList","optional":true,"elem":{"schema":{"match_variable":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"selector":{"type":"TypeString","required":true}}},"maxItems":100},"rule_id":{"type":"TypeString","required":true}}},"maxItems":1000},"rule_group_name":{"type":"TypeString","required":true}}},"maxItems":100},"type":{"type":"TypeString","required":true},"version":{"type":"TypeString","required":true}}},"maxItems":100},"mode":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"redirect_url":{"type":"TypeString","optional":true},"request_body_check_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cdn_frontdoor_origin":{"schema":{"cdn_frontdoor_origin_group_id":{"type":"TypeString","required":true,"forceNew":true},"certificate_name_check_enabled":{"type":"TypeBool","required":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"host_name":{"type":"TypeString","required":true},"http_port":{"type":"TypeInt","optional":true,"default":80},"https_port":{"type":"TypeInt","optional":true,"default":443},"name":{"type":"TypeString","required":true,"forceNew":true},"origin_host_header":{"type":"TypeString","optional":true},"priority":{"type":"TypeInt","optional":true,"default":1},"private_link":{"type":"TypeList","optional":true,"elem":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"private_link_target_id":{"type":"TypeString","required":true},"request_message":{"type":"TypeString","optional":true,"default":"Access request for CDN FrontDoor Private Link Origin"},"target_type":{"type":"TypeString","optional":true}}},"maxItems":1},"weight":{"type":"TypeInt","optional":true,"default":500}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cdn_frontdoor_origin_group":{"schema":{"cdn_frontdoor_profile_id":{"type":"TypeString","required":true,"forceNew":true},"health_probe":{"type":"TypeList","optional":true,"elem":{"schema":{"interval_in_seconds":{"type":"TypeInt","required":true},"path":{"type":"TypeString","optional":true,"default":"/"},"protocol":{"type":"TypeString","required":true},"request_type":{"type":"TypeString","optional":true,"default":"HEAD"}}},"maxItems":1},"load_balancing":{"type":"TypeList","required":true,"elem":{"schema":{"additional_latency_in_milliseconds":{"type":"TypeInt","optional":true,"default":50},"sample_size":{"type":"TypeInt","optional":true,"default":4},"successful_samples_required":{"type":"TypeInt","optional":true,"default":3}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"restore_traffic_time_to_healed_or_new_endpoint_in_minutes":{"type":"TypeInt","optional":true,"default":10},"session_affinity_enabled":{"type":"TypeBool","optional":true,"default":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cdn_frontdoor_profile":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"resource_guid":{"type":"TypeString","computed":true},"response_timeout_seconds":{"type":"TypeInt","optional":true,"default":120},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cdn_frontdoor_route":{"schema":{"cache":{"type":"TypeList","optional":true,"elem":{"schema":{"compression_enabled":{"type":"TypeBool","optional":true,"default":false},"content_types_to_compress":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"query_string_caching_behavior":{"type":"TypeString","optional":true,"default":"IgnoreQueryString"},"query_strings":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"cdn_frontdoor_custom_domain_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"cdn_frontdoor_endpoint_id":{"type":"TypeString","required":true,"forceNew":true},"cdn_frontdoor_origin_group_id":{"type":"TypeString","required":true},"cdn_frontdoor_origin_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"cdn_frontdoor_origin_path":{"type":"TypeString","optional":true},"cdn_frontdoor_rule_set_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true,"default":true},"forwarding_protocol":{"type":"TypeString","optional":true,"default":"MatchRequest"},"https_redirect_enabled":{"type":"TypeBool","optional":true,"default":true},"link_to_default_domain":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true,"forceNew":true},"patterns_to_match":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"supported_protocols":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"maxItems":2}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cdn_frontdoor_rule":{"schema":{"actions":{"type":"TypeList","required":true,"elem":{"schema":{"request_header_action":{"type":"TypeList","optional":true,"elem":{"schema":{"header_action":{"type":"TypeString","required":true},"header_name":{"type":"TypeString","required":true},"value":{"type":"TypeString","optional":true}}}},"response_header_action":{"type":"TypeList","optional":true,"elem":{"schema":{"header_action":{"type":"TypeString","required":true},"header_name":{"type":"TypeString","required":true},"value":{"type":"TypeString","optional":true}}}},"route_configuration_override_action":{"type":"TypeList","optional":true,"elem":{"schema":{"cache_behavior":{"type":"TypeString","optional":true},"cache_duration":{"type":"TypeString","optional":true},"cdn_frontdoor_origin_group_id":{"type":"TypeString","optional":true},"compression_enabled":{"type":"TypeBool","optional":true},"forwarding_protocol":{"type":"TypeString","optional":true},"query_string_caching_behavior":{"type":"TypeString","optional":true},"query_string_parameters":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":100}}},"maxItems":1},"url_redirect_action":{"type":"TypeList","optional":true,"elem":{"schema":{"destination_fragment":{"type":"TypeString","optional":true,"default":""},"destination_hostname":{"type":"TypeString","required":true},"destination_path":{"type":"TypeString","optional":true,"default":""},"query_string":{"type":"TypeString","optional":true,"default":""},"redirect_protocol":{"type":"TypeString","optional":true,"default":"MatchRequest"},"redirect_type":{"type":"TypeString","required":true}}},"maxItems":1},"url_rewrite_action":{"type":"TypeList","optional":true,"elem":{"schema":{"destination":{"type":"TypeString","required":true},"preserve_unmatched_path":{"type":"TypeBool","optional":true,"default":false},"source_pattern":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"behavior_on_match":{"type":"TypeString","optional":true,"default":"Continue"},"cdn_frontdoor_rule_set_id":{"type":"TypeString","required":true,"forceNew":true},"cdn_frontdoor_rule_set_name":{"type":"TypeString","computed":true},"conditions":{"type":"TypeList","optional":true,"elem":{"schema":{"client_port_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true}}}},"cookies_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"cookie_name":{"type":"TypeString","required":true},"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":4}}}},"host_name_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":4}}}},"http_version_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"maxItems":4},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","optional":true,"default":"Equal"}}}},"is_device_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","optional":true,"default":"Equal"}}}},"post_args_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"post_args_name":{"type":"TypeString","required":true},"transforms":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":4}}}},"query_string_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":4}}}},"remote_address_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","optional":true,"default":"IPMatch"}}}},"request_body_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":4}}}},"request_header_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"header_name":{"type":"TypeString","required":true},"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":4}}}},"request_method_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"maxItems":7},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","optional":true,"default":"Equal"}}}},"request_scheme_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString","default":"HTTP"},"maxItems":1},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","optional":true,"default":"Equal"}}}},"request_uri_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":4}}}},"server_port_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"maxItems":2},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true}}}},"socket_address_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","optional":true,"default":"IPMatch"}}}},"ssl_protocol_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"maxItems":3},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","optional":true,"default":"Equal"}}}},"url_file_extension_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":4}}}},"url_filename_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":4}}}},"url_path_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":4}}}}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"order":{"type":"TypeInt","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cdn_frontdoor_rule_set":{"schema":{"cdn_frontdoor_profile_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_cdn_frontdoor_secret":{"schema":{"cdn_frontdoor_profile_id":{"type":"TypeString","required":true,"forceNew":true},"cdn_frontdoor_profile_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"secret":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"customer_certificate":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"key_vault_certificate_id":{"type":"TypeString","required":true,"forceNew":true},"subject_alternative_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_cdn_frontdoor_security_policy":{"schema":{"cdn_frontdoor_profile_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"security_policies":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"firewall":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"association":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"domain":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"active":{"type":"TypeBool","computed":true},"cdn_frontdoor_domain_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":500},"patterns_to_match":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"maxItems":1}}},"maxItems":1},"cdn_frontdoor_firewall_policy_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_cdn_profile":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_chaos_studio_capability":{"schema":{"capability_type":{"type":"TypeString","required":true,"forceNew":true},"chaos_studio_target_id":{"type":"TypeString","required":true,"forceNew":true},"urn":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_chaos_studio_experiment":{"schema":{"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"selectors":{"type":"TypeList","required":true,"elem":{"schema":{"chaos_studio_target_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true}}},"minItems":1},"steps":{"type":"TypeList","required":true,"elem":{"schema":{"branch":{"type":"TypeList","required":true,"elem":{"schema":{"actions":{"type":"TypeList","required":true,"elem":{"schema":{"action_type":{"type":"TypeString","required":true},"duration":{"type":"TypeString","optional":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"selector_name":{"type":"TypeString","optional":true},"urn":{"type":"TypeString","optional":true}}},"minItems":1},"name":{"type":"TypeString","required":true}}},"minItems":1},"name":{"type":"TypeString","required":true}}},"minItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_chaos_studio_target":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true},"target_type":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_cognitive_account":{"schema":{"custom_question_answering_search_service_id":{"type":"TypeString","optional":true},"custom_question_answering_search_service_key":{"type":"TypeString","optional":true},"custom_subdomain_name":{"type":"TypeString","optional":true,"forceNew":true},"customer_managed_key":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_client_id":{"type":"TypeString","optional":true},"key_vault_key_id":{"type":"TypeString","required":true}}},"maxItems":1},"dynamic_throttling_enabled":{"type":"TypeBool","optional":true},"endpoint":{"type":"TypeString","computed":true},"fqdns":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"kind":{"type":"TypeString","required":true,"forceNew":true},"local_auth_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"metrics_advisor_aad_client_id":{"type":"TypeString","optional":true,"forceNew":true},"metrics_advisor_aad_tenant_id":{"type":"TypeString","optional":true,"forceNew":true},"metrics_advisor_super_user_name":{"type":"TypeString","optional":true,"forceNew":true},"metrics_advisor_website_name":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_acls":{"type":"TypeList","optional":true,"elem":{"schema":{"default_action":{"type":"TypeString","required":true},"ip_rules":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"virtual_network_rules":{"type":"TypeSet","optional":true,"elem":{"schema":{"ignore_missing_vnet_service_endpoint":{"type":"TypeBool","optional":true,"default":false},"subnet_id":{"type":"TypeString","required":true}}}}}},"maxItems":1},"outbound_network_access_restricted":{"type":"TypeBool","optional":true,"default":false},"primary_access_key":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"qna_runtime_endpoint":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_access_key":{"type":"TypeString","computed":true},"sku_name":{"type":"TypeString","required":true},"storage":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_client_id":{"type":"TypeString","optional":true},"storage_account_id":{"type":"TypeString","required":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cognitive_account_customer_managed_key":{"schema":{"cognitive_account_id":{"type":"TypeString","required":true,"forceNew":true},"identity_client_id":{"type":"TypeString","optional":true},"key_vault_key_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cognitive_deployment":{"schema":{"cognitive_account_id":{"type":"TypeString","required":true,"forceNew":true},"model":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"format":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","optional":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"rai_policy_name":{"type":"TypeString","optional":true},"sku":{"type":"TypeList","required":true,"elem":{"schema":{"capacity":{"type":"TypeInt","optional":true,"default":1},"family":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"size":{"type":"TypeString","optional":true,"forceNew":true},"tier":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"version_upgrade_option":{"type":"TypeString","optional":true,"default":"OnceNewDefaultVersionAvailable"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_communication_service":{"schema":{"data_location":{"type":"TypeString","optional":true,"default":"United States","forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_communication_service_email_domain_association":{"schema":{"communication_service_id":{"type":"TypeString","required":true,"forceNew":true},"email_service_domain_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":5,"read":5,"delete":5}},"azurerm_confidential_ledger":{"schema":{"azuread_based_service_principal":{"type":"TypeList","required":true,"elem":{"schema":{"ledger_role_name":{"type":"TypeString","required":true},"principal_id":{"type":"TypeString","required":true},"tenant_id":{"type":"TypeString","required":true}}},"minItems":1},"certificate_based_security_principal":{"type":"TypeList","optional":true,"elem":{"schema":{"ledger_role_name":{"type":"TypeString","required":true},"pem_public_key":{"type":"TypeString","required":true}}}},"identity_service_endpoint":{"type":"TypeString","computed":true},"ledger_endpoint":{"type":"TypeString","computed":true},"ledger_type":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_consumption_budget_management_group":{"schema":{"amount":{"type":"TypeFloat","required":true},"etag":{"type":"TypeString","optional":true,"computed":true},"filter":{"type":"TypeList","optional":true,"elem":{"schema":{"dimension":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"operator":{"type":"TypeString","optional":true,"default":"In"},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"tag":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"operator":{"type":"TypeString","optional":true,"default":"In"},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}}}},"maxItems":1},"management_group_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"notification":{"type":"TypeSet","required":true,"elem":{"schema":{"contact_emails":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"enabled":{"type":"TypeBool","optional":true,"default":true},"operator":{"type":"TypeString","required":true},"threshold":{"type":"TypeInt","required":true},"threshold_type":{"type":"TypeString","optional":true,"default":"Actual","forceNew":true}}},"maxItems":5,"minItems":1},"time_grain":{"type":"TypeString","optional":true,"default":"Monthly","forceNew":true},"time_period":{"type":"TypeList","required":true,"elem":{"schema":{"end_date":{"type":"TypeString","optional":true,"computed":true},"start_date":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1,"minItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_consumption_budget_resource_group":{"schema":{"amount":{"type":"TypeFloat","required":true},"etag":{"type":"TypeString","optional":true,"computed":true},"filter":{"type":"TypeList","optional":true,"elem":{"schema":{"dimension":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"operator":{"type":"TypeString","optional":true,"default":"In"},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"tag":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"operator":{"type":"TypeString","optional":true,"default":"In"},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"notification":{"type":"TypeSet","required":true,"elem":{"schema":{"contact_emails":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"contact_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"contact_roles":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true,"default":true},"operator":{"type":"TypeString","required":true},"threshold":{"type":"TypeInt","required":true},"threshold_type":{"type":"TypeString","optional":true,"default":"Actual","forceNew":true}}},"maxItems":5,"minItems":1},"resource_group_id":{"type":"TypeString","required":true,"forceNew":true},"time_grain":{"type":"TypeString","optional":true,"default":"Monthly","forceNew":true},"time_period":{"type":"TypeList","required":true,"elem":{"schema":{"end_date":{"type":"TypeString","optional":true,"computed":true},"start_date":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1,"minItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_consumption_budget_subscription":{"schema":{"amount":{"type":"TypeFloat","required":true},"etag":{"type":"TypeString","optional":true,"computed":true},"filter":{"type":"TypeList","optional":true,"elem":{"schema":{"dimension":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"operator":{"type":"TypeString","optional":true,"default":"In"},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"tag":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"operator":{"type":"TypeString","optional":true,"default":"In"},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"notification":{"type":"TypeSet","required":true,"elem":{"schema":{"contact_emails":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"contact_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"contact_roles":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true,"default":true},"operator":{"type":"TypeString","required":true},"threshold":{"type":"TypeInt","required":true},"threshold_type":{"type":"TypeString","optional":true,"default":"Actual","forceNew":true}}},"maxItems":5,"minItems":1},"subscription_id":{"type":"TypeString","required":true,"forceNew":true},"time_grain":{"type":"TypeString","optional":true,"default":"Monthly","forceNew":true},"time_period":{"type":"TypeList","required":true,"elem":{"schema":{"end_date":{"type":"TypeString","optional":true,"computed":true},"start_date":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1,"minItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_app":{"schema":{"container_app_environment_id":{"type":"TypeString","required":true,"description":"The ID of the Container App Environment to host this Container App.","forceNew":true},"custom_domain_verification_id":{"type":"TypeString","description":"The ID of the Custom Domain Verification for this Container App.","computed":true},"dapr":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The Dapr Application Identifier."},"app_port":{"type":"TypeInt","optional":true,"description":"The port which the application is listening on. This is the same as the `ingress` port."},"app_protocol":{"type":"TypeString","optional":true,"default":"http","description":"The protocol for the app. Possible values include `http` and `grpc`. Defaults to `http`."}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"ingress":{"type":"TypeList","optional":true,"elem":{"schema":{"allow_insecure_connections":{"type":"TypeBool","optional":true,"default":false,"description":"Should this ingress allow insecure connections?"},"custom_domain":{"type":"TypeList","computed":true,"elem":{"schema":{"certificate_binding_type":{"type":"TypeString","description":"The Binding type. Possible values include `Disabled` and `SniEnabled`. Defaults to `Disabled`","computed":true},"certificate_id":{"type":"TypeString","description":"The ID of the Certificate.","computed":true},"name":{"type":"TypeString","description":"The hostname of the Certificate. Must be the CN or a named SAN in the certificate.","computed":true}}}},"exposed_port":{"type":"TypeInt","optional":true,"description":"The exposed port on the container for the Ingress traffic."},"external_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Is this an external Ingress."},"fqdn":{"type":"TypeString","description":"The FQDN of the ingress.","computed":true},"ip_security_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true,"description":"The action. Allow or Deny."},"description":{"type":"TypeString","optional":true,"description":"Describe the IP restriction rule that is being sent to the container-app."},"ip_address_range":{"type":"TypeString","required":true,"description":"The incoming IP address or range of IP addresses (in CIDR notation)."},"name":{"type":"TypeString","required":true,"description":"Name for the IP restriction rule."}}}},"target_port":{"type":"TypeInt","required":true,"description":"The target port on the container for the Ingress traffic."},"traffic_weight":{"type":"TypeList","required":true,"elem":{"schema":{"label":{"type":"TypeString","optional":true,"description":"The label to apply to the revision as a name prefix for routing traffic."},"latest_revision":{"type":"TypeBool","optional":true,"default":false,"description":"This traffic Weight relates to the latest stable Container Revision."},"percentage":{"type":"TypeInt","required":true,"description":"The percentage of traffic to send to this revision."},"revision_suffix":{"type":"TypeString","optional":true,"description":"The suffix string to append to the revision. This must be unique for the Container App's lifetime. A default hash created by the service will be used if this value is omitted."}}}},"transport":{"type":"TypeString","optional":true,"default":"auto","description":"The transport method for the Ingress. Possible values include `auto`, `http`, and `http2`, `tcp`. Defaults to `auto`"}}},"maxItems":1},"latest_revision_fqdn":{"type":"TypeString","description":"The FQDN of the Latest Revision of the Container App.","computed":true},"latest_revision_name":{"type":"TypeString","description":"The name of the latest Container Revision.","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"description":"The name for this Container App.","forceNew":true},"outbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"registry":{"type":"TypeList","optional":true,"elem":{"schema":{"identity":{"type":"TypeString","optional":true,"description":"ID of the System or User Managed Identity used to pull images from the Container Registry"},"password_secret_name":{"type":"TypeString","optional":true,"description":"The name of the Secret Reference containing the password value for this user on the Container Registry."},"server":{"type":"TypeString","required":true,"description":"The hostname for the Container Registry."},"username":{"type":"TypeString","optional":true,"description":"The username to use for this Container Registry."}}},"minItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"revision_mode":{"type":"TypeString","required":true},"secret":{"type":"TypeSet","optional":true,"elem":{"schema":{"identity":{"type":"TypeString","optional":true,"description":"The identity to use for accessing key vault reference."},"key_vault_secret_id":{"type":"TypeString","optional":true,"description":"The Key Vault Secret ID. Could be either one of `id` or `versionless_id`."},"name":{"type":"TypeString","required":true,"description":"The secret name."},"value":{"type":"TypeString","optional":true,"description":"The value for this secret."}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"template":{"type":"TypeList","required":true,"elem":{"schema":{"azure_queue_scale_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"authentication":{"type":"TypeList","required":true,"elem":{"schema":{"secret_name":{"type":"TypeString","required":true},"trigger_parameter":{"type":"TypeString","required":true}}},"minItems":1},"name":{"type":"TypeString","required":true},"queue_length":{"type":"TypeInt","required":true},"queue_name":{"type":"TypeString","required":true}}}},"container":{"type":"TypeList","required":true,"elem":{"schema":{"args":{"type":"TypeList","optional":true,"description":"A list of args to pass to the container.","elem":{"type":"TypeString"}},"command":{"type":"TypeList","optional":true,"description":"A command to pass to the container to override the default. This is provided as a list of command line elements without spaces.","elem":{"type":"TypeString"}},"cpu":{"type":"TypeFloat","required":true,"description":"The amount of vCPU to allocate to the container. Possible values include `0.25`, `0.5`, `0.75`, `1.0`, `1.25`, `1.5`, `1.75`, and `2.0`. **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.0` / `2.0` or `0.5` / `1.0`. When there's a workload profile specified, there's no such constraint."},"env":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name of the environment variable for the container."},"secret_name":{"type":"TypeString","optional":true,"description":"The name of the secret that contains the value for this environment variable."},"value":{"type":"TypeString","optional":true,"description":"The value for this environment variable. **NOTE:** This value is ignored if `secret_name` is used"}}},"minItems":1},"ephemeral_storage":{"type":"TypeString","description":"The amount of ephemeral storage available to the Container App.","computed":true},"image":{"type":"TypeString","required":true,"description":"The image to use to create the container."},"liveness_probe":{"type":"TypeList","optional":true,"elem":{"schema":{"failure_count_threshold":{"type":"TypeInt","optional":true,"default":3,"description":"The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`."},"header":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The HTTP Header Name."},"value":{"type":"TypeString","required":true,"description":"The HTTP Header value."}}}},"host":{"type":"TypeString","optional":true,"description":"The probe hostname. Defaults to the pod IP address. Setting a value for `Host` in `headers` can be used to override this for `http` and `https` type probes."},"initial_delay":{"type":"TypeInt","optional":true,"default":1,"description":"The time in seconds to wait after the container has started before the probe is started."},"interval_seconds":{"type":"TypeInt","optional":true,"default":10,"description":"How often, in seconds, the probe should run. Possible values are between `1` and `240`. Defaults to `10`"},"path":{"type":"TypeString","optional":true,"description":"The URI to use with the `host` for http type probes. Not valid for `TCP` type probes. Defaults to `/`.","computed":true},"port":{"type":"TypeInt","required":true,"description":"The port number on which to connect. Possible values are between `1` and `65535`."},"termination_grace_period_seconds":{"type":"TypeInt","description":"The time in seconds after the container is sent the termination signal before the process if forcibly killed.","computed":true},"timeout":{"type":"TypeInt","optional":true,"default":1,"description":"Time in seconds after which the probe times out. Possible values are between `1` an `240`. Defaults to `1`."},"transport":{"type":"TypeString","required":true,"description":"Type of probe. Possible values are `TCP`, `HTTP`, and `HTTPS`."}}},"minItems":1},"memory":{"type":"TypeString","required":true,"description":"The amount of memory to allocate to the container. Possible values include `0.5Gi`, `1.0Gi`, `1.5Gi`, `2.0Gi`, `2.5Gi`, `3.0Gi`, `3.5Gi`, and `4.0Gi`. **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.25` / `2.5Gi` or `0.75` / `1.5Gi`. When there's a workload profile specified, there's no such constraint."},"name":{"type":"TypeString","required":true,"description":"The name of the container."},"readiness_probe":{"type":"TypeList","optional":true,"elem":{"schema":{"failure_count_threshold":{"type":"TypeInt","optional":true,"default":3,"description":"The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`."},"header":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The HTTP Header Name."},"value":{"type":"TypeString","required":true,"description":"The HTTP Header value."}}}},"host":{"type":"TypeString","optional":true,"description":"The probe hostname. Defaults to the pod IP address. Setting a value for `Host` in `headers` can be used to override this for `http` and `https` type probes."},"interval_seconds":{"type":"TypeInt","optional":true,"default":10,"description":"How often, in seconds, the probe should run. Possible values are between `1` and `240`. Defaults to `10`"},"path":{"type":"TypeString","optional":true,"description":"The URI to use for http type probes. Not valid for `TCP` type probes. Defaults to `/`.","computed":true},"port":{"type":"TypeInt","required":true,"description":"The port number on which to connect. Possible values are between `1` and `65535`."},"success_count_threshold":{"type":"TypeInt","optional":true,"default":3,"description":"The number of consecutive successful responses required to consider this probe as successful. Possible values are between `1` and `10`. Defaults to `3`."},"timeout":{"type":"TypeInt","optional":true,"default":1,"description":"Time in seconds after which the probe times out. Possible values are between `1` an `240`. Defaults to `1`."},"transport":{"type":"TypeString","required":true,"description":"Type of probe. Possible values are `TCP`, `HTTP`, and `HTTPS`."}}},"minItems":1},"startup_probe":{"type":"TypeList","optional":true,"elem":{"schema":{"failure_count_threshold":{"type":"TypeInt","optional":true,"default":3,"description":"The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`."},"header":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The HTTP Header Name."},"value":{"type":"TypeString","required":true,"description":"The HTTP Header value."}}}},"host":{"type":"TypeString","optional":true,"description":"The probe hostname. Defaults to the pod IP address. Setting a value for `Host` in `headers` can be used to override this for `http` and `https` type probes."},"interval_seconds":{"type":"TypeInt","optional":true,"default":10,"description":"How often, in seconds, the probe should run. Possible values are between `1` and `240`. Defaults to `10`"},"path":{"type":"TypeString","optional":true,"description":"The URI to use with the `host` for http type probes. Not valid for `TCP` type probes. Defaults to `/`.","computed":true},"port":{"type":"TypeInt","required":true,"description":"The port number on which to connect. Possible values are between `1` and `65535`."},"termination_grace_period_seconds":{"type":"TypeInt","description":"The time in seconds after the container is sent the termination signal before the process if forcibly killed.","computed":true},"timeout":{"type":"TypeInt","optional":true,"default":1,"description":"Time in seconds after which the probe times out. Possible values are between `1` an `240`. Defaults to `1`."},"transport":{"type":"TypeString","required":true,"description":"Type of probe. Possible values are `TCP`, `HTTP`, and `HTTPS`."}}},"minItems":1},"volume_mounts":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name of the Volume to be mounted in the container."},"path":{"type":"TypeString","required":true,"description":"The path in the container at which to mount this volume."}}}}}},"minItems":1},"custom_scale_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"authentication":{"type":"TypeList","optional":true,"elem":{"schema":{"secret_name":{"type":"TypeString","required":true},"trigger_parameter":{"type":"TypeString","required":true}}},"minItems":1},"custom_rule_type":{"type":"TypeString","required":true},"metadata":{"type":"TypeMap","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true}}}},"http_scale_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"authentication":{"type":"TypeList","optional":true,"elem":{"schema":{"secret_name":{"type":"TypeString","required":true},"trigger_parameter":{"type":"TypeString","optional":true}}},"minItems":1},"concurrent_requests":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}},"init_container":{"type":"TypeList","optional":true,"elem":{"schema":{"args":{"type":"TypeList","optional":true,"description":"A list of args to pass to the container.","elem":{"type":"TypeString"}},"command":{"type":"TypeList","optional":true,"description":"A command to pass to the container to override the default. This is provided as a list of command line elements without spaces.","elem":{"type":"TypeString"}},"cpu":{"type":"TypeFloat","optional":true,"description":"The amount of vCPU to allocate to the container. Possible values include `0.25`, `0.5`, `0.75`, `1.0`, `1.25`, `1.5`, `1.75`, and `2.0`. **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.0` / `2.0` or `0.5` / `1.0`. When there's a workload profile specified, there's no such constraint."},"env":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name of the environment variable for the container."},"secret_name":{"type":"TypeString","optional":true,"description":"The name of the secret that contains the value for this environment variable."},"value":{"type":"TypeString","optional":true,"description":"The value for this environment variable. **NOTE:** This value is ignored if `secret_name` is used"}}},"minItems":1},"ephemeral_storage":{"type":"TypeString","description":"The amount of ephemeral storage available to the Container App.","computed":true},"image":{"type":"TypeString","required":true,"description":"The image to use to create the container."},"memory":{"type":"TypeString","optional":true,"description":"The amount of memory to allocate to the container. Possible values include `0.5Gi`, `1.0Gi`, `1.5Gi`, `2.0Gi`, `2.5Gi`, `3.0Gi`, `3.5Gi`, and `4.0Gi`. **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.25` / `2.5Gi` or `0.75` / `1.5Gi`. When there's a workload profile specified, there's no such constraint."},"name":{"type":"TypeString","required":true,"description":"The name of the container."},"volume_mounts":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name of the Volume to be mounted in the container."},"path":{"type":"TypeString","required":true,"description":"The path in the container at which to mount this volume."}}}}}},"minItems":1},"max_replicas":{"type":"TypeInt","optional":true,"default":10,"description":"The maximum number of replicas for this container."},"min_replicas":{"type":"TypeInt","optional":true,"default":0,"description":"The minimum number of replicas for this container."},"revision_suffix":{"type":"TypeString","optional":true,"description":"The suffix for the revision. This value must be unique for the lifetime of the Resource. If omitted the service will use a hash function to create one.","computed":true},"tcp_scale_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"authentication":{"type":"TypeList","optional":true,"elem":{"schema":{"secret_name":{"type":"TypeString","required":true},"trigger_parameter":{"type":"TypeString","optional":true}}},"minItems":1},"concurrent_requests":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}},"volume":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name of the volume."},"storage_name":{"type":"TypeString","optional":true,"description":"The name of the `AzureFile` storage. Required when `storage_type` is `AzureFile`"},"storage_type":{"type":"TypeString","optional":true,"default":"EmptyDir","description":"The type of storage volume. Possible values include `AzureFile` and `EmptyDir`. Defaults to `EmptyDir`."}}},"minItems":1}}},"maxItems":1},"workload_profile_name":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_app_custom_domain":{"schema":{"certificate_binding_type":{"type":"TypeString","optional":true,"description":"The Binding type. Possible values include `Disabled` and `SniEnabled`.","forceNew":true},"container_app_environment_certificate_id":{"type":"TypeString","optional":true,"forceNew":true},"container_app_environment_managed_certificate_id":{"type":"TypeString","computed":true},"container_app_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"description":"The hostname of the Certificate. Must be the CN or a named SAN in the certificate.","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_container_app_environment":{"schema":{"custom_domain_verification_id":{"type":"TypeString","description":"The ID of the Custom Domain Verification for this Container App Environment.","computed":true},"dapr_application_insights_connection_string":{"type":"TypeString","optional":true,"description":"Application Insights connection string used by Dapr to export Service to Service communication telemetry.","forceNew":true},"default_domain":{"type":"TypeString","description":"The default publicly resolvable name of this Container App Environment","computed":true},"docker_bridge_cidr":{"type":"TypeString","description":"The network addressing in which the Container Apps in this Container App Environment will reside in CIDR notation.","computed":true},"infrastructure_resource_group_name":{"type":"TypeString","optional":true,"description":"Name of the platform-managed resource group created for the Managed Environment to host infrastructure resources. **Note:** Only valid if a `workload_profile` is specified. If `infrastructure_subnet_id` is specified, this resource group will be created in the same subscription as `infrastructure_subnet_id`.","forceNew":true},"infrastructure_subnet_id":{"type":"TypeString","optional":true,"description":"The existing Subnet to use for the Container Apps Control Plane. **NOTE:** The Subnet must have a `/21` or larger address space.","forceNew":true},"internal_load_balancer_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Container Environment operate in Internal Load Balancing Mode? Defaults to `false`. **Note:** can only be set to `true` if `infrastructure_subnet_id` is specified.","forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"log_analytics_workspace_id":{"type":"TypeString","optional":true,"description":"The ID for the Log Analytics Workspace to link this Container Apps Managed Environment to.","forceNew":true},"mutual_tls_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should mutual transport layer security (mTLS) be enabled? Defaults to `false`. **Note:** This feature is in public preview. Enabling mTLS for your applications may increase response latency and reduce maximum throughput in high-load scenarios."},"name":{"type":"TypeString","required":true,"description":"The name of the Container Apps Managed Environment.","forceNew":true},"platform_reserved_cidr":{"type":"TypeString","description":"The IP range, in CIDR notation, that is reserved for environment infrastructure IP addresses.","computed":true},"platform_reserved_dns_ip_address":{"type":"TypeString","description":"The IP address from the IP range defined by `platform_reserved_cidr` that is reserved for the internal DNS server.","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"static_ip_address":{"type":"TypeString","description":"The Static IP Address of the Environment.","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"workload_profile":{"type":"TypeSet","optional":true,"elem":{"schema":{"maximum_count":{"type":"TypeInt","optional":true},"minimum_count":{"type":"TypeInt","optional":true},"name":{"type":"TypeString","required":true},"workload_profile_type":{"type":"TypeString","required":true}}}},"zone_redundancy_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_app_environment_certificate":{"schema":{"certificate_blob_base64":{"type":"TypeString","required":true,"description":"The Certificate Private Key as a base64 encoded PFX or PEM.","forceNew":true},"certificate_password":{"type":"TypeString","required":true,"description":"The password for the Certificate.","forceNew":true},"container_app_environment_id":{"type":"TypeString","required":true,"description":"The Container App Managed Environment ID to configure this Certificate on.","forceNew":true},"expiration_date":{"type":"TypeString","description":"The expiration date for the Certificate.","computed":true},"issue_date":{"type":"TypeString","description":"The date of issue for the Certificate.","computed":true},"issuer":{"type":"TypeString","description":"The Certificate Issuer.","computed":true},"name":{"type":"TypeString","required":true,"description":"The name of the Container Apps Environment Certificate.","forceNew":true},"subject_name":{"type":"TypeString","description":"The Subject Name for the Certificate.","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"thumbprint":{"type":"TypeString","description":"The Thumbprint of the Certificate.","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_app_environment_custom_domain":{"schema":{"certificate_blob_base64":{"type":"TypeString","required":true,"description":"The Custom Domain Certificate Private Key as a base64 encoded PFX or PEM."},"certificate_password":{"type":"TypeString","required":true,"description":"The Custom Domain Certificate password."},"container_app_environment_id":{"type":"TypeString","required":true,"description":"The Container App Managed Environment ID to configure this Custom Domain on.","forceNew":true},"dns_suffix":{"type":"TypeString","required":true,"description":"The Custom Domain DNS suffix for this Container App Environment."}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_app_environment_dapr_component":{"schema":{"component_type":{"type":"TypeString","required":true,"description":"The Dapr Component Type. For example `state.azure.blobstorage`.","forceNew":true},"container_app_environment_id":{"type":"TypeString","required":true,"description":"The Container App Managed Environment ID to configure this Dapr component on.","forceNew":true},"ignore_errors":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Dapr sidecar to continue initialisation if the component fails to load. Defaults to `false`"},"init_timeout":{"type":"TypeString","optional":true,"default":"5s","description":"The component initialisation timeout in ISO8601 format. e.g. `5s`, `2h`, `1m`. Defaults to `5s`."},"metadata":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name of the Metadata configuration item."},"secret_name":{"type":"TypeString","optional":true,"description":"The name of a secret specified in the `secrets` block that contains the value for this metadata configuration item."},"value":{"type":"TypeString","optional":true,"description":"The value for this metadata configuration item."}}},"minItems":1},"name":{"type":"TypeString","required":true,"description":"The name for this Dapr Component.","forceNew":true},"scopes":{"type":"TypeList","optional":true,"description":"A list of scopes to which this component applies. e.g. a Container App's `dapr.app_id` value.","elem":{"type":"TypeString"},"minItems":1},"secret":{"type":"TypeSet","optional":true,"elem":{"schema":{"identity":{"type":"TypeString","optional":true,"description":"The identity to use for accessing key vault reference."},"key_vault_secret_id":{"type":"TypeString","optional":true,"description":"The Key Vault Secret ID. Could be either one of `id` or `versionless_id`."},"name":{"type":"TypeString","required":true,"description":"The secret name."},"value":{"type":"TypeString","optional":true,"description":"The value for this secret."}}}},"version":{"type":"TypeString","required":true,"description":"The version of the component."}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_app_environment_storage":{"schema":{"access_key":{"type":"TypeString","required":true,"description":"The Storage Account Access Key."},"access_mode":{"type":"TypeString","required":true,"description":"The access mode to connect this storage to the Container App. Possible values include `ReadOnly` and `ReadWrite`.","forceNew":true},"account_name":{"type":"TypeString","required":true,"description":"The Azure Storage Account in which the Share to be used is located.","forceNew":true},"container_app_environment_id":{"type":"TypeString","required":true,"description":"The ID of the Container App Environment to which this storage belongs.","forceNew":true},"name":{"type":"TypeString","required":true,"description":"The name for this Storage.","forceNew":true},"share_name":{"type":"TypeString","required":true,"description":"The name of the Azure Storage Share to use.","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_app_job":{"schema":{"container_app_environment_id":{"type":"TypeString","required":true,"forceNew":true},"event_stream_endpoint":{"type":"TypeString","computed":true},"event_trigger_config":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"parallelism":{"type":"TypeInt","optional":true,"default":1},"replica_completion_count":{"type":"TypeInt","optional":true,"default":1},"scale":{"type":"TypeList","optional":true,"elem":{"schema":{"max_executions":{"type":"TypeInt","optional":true,"default":100},"min_executions":{"type":"TypeInt","optional":true,"default":0},"polling_interval_in_seconds":{"type":"TypeInt","optional":true,"default":30},"rules":{"type":"TypeList","optional":true,"elem":{"schema":{"authentication":{"type":"TypeList","optional":true,"elem":{"schema":{"secret_name":{"type":"TypeString","required":true},"trigger_parameter":{"type":"TypeString","required":true}}},"minItems":1},"custom_rule_type":{"type":"TypeString","required":true},"metadata":{"type":"TypeMap","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true}}}}}}}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"manual_trigger_config":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"parallelism":{"type":"TypeInt","optional":true,"default":1},"replica_completion_count":{"type":"TypeInt","optional":true,"default":1}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"outbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"registry":{"type":"TypeList","optional":true,"elem":{"schema":{"identity":{"type":"TypeString","optional":true,"description":"ID of the System or User Managed Identity used to pull images from the Container Registry"},"password_secret_name":{"type":"TypeString","optional":true,"description":"The name of the Secret Reference containing the password value for this user on the Container Registry."},"server":{"type":"TypeString","required":true,"description":"The hostname for the Container Registry."},"username":{"type":"TypeString","optional":true,"description":"The username to use for this Container Registry."}}},"minItems":1},"replica_retry_limit":{"type":"TypeInt","optional":true},"replica_timeout_in_seconds":{"type":"TypeInt","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"schedule_trigger_config":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"cron_expression":{"type":"TypeString","required":true},"parallelism":{"type":"TypeInt","optional":true,"default":1},"replica_completion_count":{"type":"TypeInt","optional":true,"default":1}}},"maxItems":1},"secret":{"type":"TypeSet","optional":true,"elem":{"schema":{"identity":{"type":"TypeString","optional":true,"description":"The identity to use for accessing key vault reference."},"key_vault_secret_id":{"type":"TypeString","optional":true,"description":"The Key Vault Secret ID. Could be either one of `id` or `versionless_id`."},"name":{"type":"TypeString","required":true,"description":"The secret name."},"value":{"type":"TypeString","optional":true,"description":"The value for this secret."}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"template":{"type":"TypeList","required":true,"elem":{"schema":{"container":{"type":"TypeList","required":true,"elem":{"schema":{"args":{"type":"TypeList","optional":true,"description":"A list of args to pass to the container.","elem":{"type":"TypeString"}},"command":{"type":"TypeList","optional":true,"description":"A command to pass to the container to override the default. This is provided as a list of command line elements without spaces.","elem":{"type":"TypeString"}},"cpu":{"type":"TypeFloat","required":true,"description":"The amount of vCPU to allocate to the container. Possible values include `0.25`, `0.5`, `0.75`, `1.0`, `1.25`, `1.5`, `1.75`, and `2.0`. **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.0` / `2.0` or `0.5` / `1.0`. When there's a workload profile specified, there's no such constraint."},"env":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name of the environment variable for the container."},"secret_name":{"type":"TypeString","optional":true,"description":"The name of the secret that contains the value for this environment variable."},"value":{"type":"TypeString","optional":true,"description":"The value for this environment variable. **NOTE:** This value is ignored if `secret_name` is used"}}},"minItems":1},"ephemeral_storage":{"type":"TypeString","description":"The amount of ephemeral storage available to the Container App.","computed":true},"image":{"type":"TypeString","required":true,"description":"The image to use to create the container."},"liveness_probe":{"type":"TypeList","optional":true,"elem":{"schema":{"failure_count_threshold":{"type":"TypeInt","optional":true,"default":3,"description":"The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`."},"header":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The HTTP Header Name."},"value":{"type":"TypeString","required":true,"description":"The HTTP Header value."}}}},"host":{"type":"TypeString","optional":true,"description":"The probe hostname. Defaults to the pod IP address. Setting a value for `Host` in `headers` can be used to override this for `http` and `https` type probes."},"initial_delay":{"type":"TypeInt","optional":true,"default":1,"description":"The time in seconds to wait after the container has started before the probe is started."},"interval_seconds":{"type":"TypeInt","optional":true,"default":10,"description":"How often, in seconds, the probe should run. Possible values are between `1` and `240`. Defaults to `10`"},"path":{"type":"TypeString","optional":true,"description":"The URI to use with the `host` for http type probes. Not valid for `TCP` type probes. Defaults to `/`.","computed":true},"port":{"type":"TypeInt","required":true,"description":"The port number on which to connect. Possible values are between `1` and `65535`."},"termination_grace_period_seconds":{"type":"TypeInt","description":"The time in seconds after the container is sent the termination signal before the process if forcibly killed.","computed":true},"timeout":{"type":"TypeInt","optional":true,"default":1,"description":"Time in seconds after which the probe times out. Possible values are between `1` an `240`. Defaults to `1`."},"transport":{"type":"TypeString","required":true,"description":"Type of probe. Possible values are `TCP`, `HTTP`, and `HTTPS`."}}},"minItems":1},"memory":{"type":"TypeString","required":true,"description":"The amount of memory to allocate to the container. Possible values include `0.5Gi`, `1.0Gi`, `1.5Gi`, `2.0Gi`, `2.5Gi`, `3.0Gi`, `3.5Gi`, and `4.0Gi`. **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.25` / `2.5Gi` or `0.75` / `1.5Gi`. When there's a workload profile specified, there's no such constraint."},"name":{"type":"TypeString","required":true,"description":"The name of the container."},"readiness_probe":{"type":"TypeList","optional":true,"elem":{"schema":{"failure_count_threshold":{"type":"TypeInt","optional":true,"default":3,"description":"The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`."},"header":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The HTTP Header Name."},"value":{"type":"TypeString","required":true,"description":"The HTTP Header value."}}}},"host":{"type":"TypeString","optional":true,"description":"The probe hostname. Defaults to the pod IP address. Setting a value for `Host` in `headers` can be used to override this for `http` and `https` type probes."},"interval_seconds":{"type":"TypeInt","optional":true,"default":10,"description":"How often, in seconds, the probe should run. Possible values are between `1` and `240`. Defaults to `10`"},"path":{"type":"TypeString","optional":true,"description":"The URI to use for http type probes. Not valid for `TCP` type probes. Defaults to `/`.","computed":true},"port":{"type":"TypeInt","required":true,"description":"The port number on which to connect. Possible values are between `1` and `65535`."},"success_count_threshold":{"type":"TypeInt","optional":true,"default":3,"description":"The number of consecutive successful responses required to consider this probe as successful. Possible values are between `1` and `10`. Defaults to `3`."},"timeout":{"type":"TypeInt","optional":true,"default":1,"description":"Time in seconds after which the probe times out. Possible values are between `1` an `240`. Defaults to `1`."},"transport":{"type":"TypeString","required":true,"description":"Type of probe. Possible values are `TCP`, `HTTP`, and `HTTPS`."}}},"minItems":1},"startup_probe":{"type":"TypeList","optional":true,"elem":{"schema":{"failure_count_threshold":{"type":"TypeInt","optional":true,"default":3,"description":"The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`."},"header":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The HTTP Header Name."},"value":{"type":"TypeString","required":true,"description":"The HTTP Header value."}}}},"host":{"type":"TypeString","optional":true,"description":"The probe hostname. Defaults to the pod IP address. Setting a value for `Host` in `headers` can be used to override this for `http` and `https` type probes."},"interval_seconds":{"type":"TypeInt","optional":true,"default":10,"description":"How often, in seconds, the probe should run. Possible values are between `1` and `240`. Defaults to `10`"},"path":{"type":"TypeString","optional":true,"description":"The URI to use with the `host` for http type probes. Not valid for `TCP` type probes. Defaults to `/`.","computed":true},"port":{"type":"TypeInt","required":true,"description":"The port number on which to connect. Possible values are between `1` and `65535`."},"termination_grace_period_seconds":{"type":"TypeInt","description":"The time in seconds after the container is sent the termination signal before the process if forcibly killed.","computed":true},"timeout":{"type":"TypeInt","optional":true,"default":1,"description":"Time in seconds after which the probe times out. Possible values are between `1` an `240`. Defaults to `1`."},"transport":{"type":"TypeString","required":true,"description":"Type of probe. Possible values are `TCP`, `HTTP`, and `HTTPS`."}}},"minItems":1},"volume_mounts":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name of the Volume to be mounted in the container."},"path":{"type":"TypeString","required":true,"description":"The path in the container at which to mount this volume."}}}}}},"minItems":1},"init_container":{"type":"TypeList","optional":true,"elem":{"schema":{"args":{"type":"TypeList","optional":true,"description":"A list of args to pass to the container.","elem":{"type":"TypeString"}},"command":{"type":"TypeList","optional":true,"description":"A command to pass to the container to override the default. This is provided as a list of command line elements without spaces.","elem":{"type":"TypeString"}},"cpu":{"type":"TypeFloat","optional":true,"description":"The amount of vCPU to allocate to the container. Possible values include `0.25`, `0.5`, `0.75`, `1.0`, `1.25`, `1.5`, `1.75`, and `2.0`. **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.0` / `2.0` or `0.5` / `1.0`. When there's a workload profile specified, there's no such constraint."},"env":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name of the environment variable for the container."},"secret_name":{"type":"TypeString","optional":true,"description":"The name of the secret that contains the value for this environment variable."},"value":{"type":"TypeString","optional":true,"description":"The value for this environment variable. **NOTE:** This value is ignored if `secret_name` is used"}}},"minItems":1},"ephemeral_storage":{"type":"TypeString","description":"The amount of ephemeral storage available to the Container App.","computed":true},"image":{"type":"TypeString","required":true,"description":"The image to use to create the container."},"memory":{"type":"TypeString","optional":true,"description":"The amount of memory to allocate to the container. Possible values include `0.5Gi`, `1.0Gi`, `1.5Gi`, `2.0Gi`, `2.5Gi`, `3.0Gi`, `3.5Gi`, and `4.0Gi`. **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.25` / `2.5Gi` or `0.75` / `1.5Gi`. When there's a workload profile specified, there's no such constraint."},"name":{"type":"TypeString","required":true,"description":"The name of the container."},"volume_mounts":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name of the Volume to be mounted in the container."},"path":{"type":"TypeString","required":true,"description":"The path in the container at which to mount this volume."}}}}}},"minItems":1},"volume":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name of the volume."},"storage_name":{"type":"TypeString","optional":true,"description":"The name of the `AzureFile` storage. Required when `storage_type` is `AzureFile`"},"storage_type":{"type":"TypeString","optional":true,"default":"EmptyDir","description":"The type of storage volume. Possible values include `AzureFile` and `EmptyDir`. Defaults to `EmptyDir`."}}},"minItems":1}}},"maxItems":1},"workload_profile_name":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_connected_registry":{"schema":{"audit_log_enabled":{"type":"TypeBool","optional":true,"default":false},"client_token_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"container_registry_id":{"type":"TypeString","required":true,"forceNew":true},"log_level":{"type":"TypeString","optional":true,"default":"None"},"mode":{"type":"TypeString","optional":true,"default":"ReadWrite","forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"notification":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"digest":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"tag":{"type":"TypeString","optional":true}}}},"parent_registry_id":{"type":"TypeString","optional":true,"forceNew":true},"sync_message_ttl":{"type":"TypeString","optional":true,"default":"P1D"},"sync_schedule":{"type":"TypeString","optional":true,"default":"* * * * *"},"sync_token_id":{"type":"TypeString","required":true,"forceNew":true},"sync_window":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_group":{"schema":{"container":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"commands":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"type":"TypeString"}},"cpu":{"type":"TypeFloat","required":true,"forceNew":true},"cpu_limit":{"type":"TypeFloat","optional":true},"environment_variables":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"image":{"type":"TypeString","required":true,"forceNew":true},"liveness_probe":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"exec":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"failure_threshold":{"type":"TypeInt","optional":true,"forceNew":true},"http_get":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"http_headers":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"path":{"type":"TypeString","optional":true,"forceNew":true},"port":{"type":"TypeInt","optional":true,"forceNew":true},"scheme":{"type":"TypeString","optional":true,"forceNew":true}}}},"initial_delay_seconds":{"type":"TypeInt","optional":true,"forceNew":true},"period_seconds":{"type":"TypeInt","optional":true,"forceNew":true},"success_threshold":{"type":"TypeInt","optional":true,"forceNew":true},"timeout_seconds":{"type":"TypeInt","optional":true,"forceNew":true}}},"maxItems":1},"memory":{"type":"TypeFloat","required":true,"forceNew":true},"memory_limit":{"type":"TypeFloat","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"ports":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"port":{"type":"TypeInt","optional":true,"forceNew":true},"protocol":{"type":"TypeString","optional":true,"default":"TCP","forceNew":true}}}},"readiness_probe":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"exec":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"failure_threshold":{"type":"TypeInt","optional":true,"forceNew":true},"http_get":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"http_headers":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"path":{"type":"TypeString","optional":true,"forceNew":true},"port":{"type":"TypeInt","optional":true,"forceNew":true},"scheme":{"type":"TypeString","optional":true,"forceNew":true}}}},"initial_delay_seconds":{"type":"TypeInt","optional":true,"forceNew":true},"period_seconds":{"type":"TypeInt","optional":true,"forceNew":true},"success_threshold":{"type":"TypeInt","optional":true,"forceNew":true},"timeout_seconds":{"type":"TypeInt","optional":true,"forceNew":true}}},"maxItems":1},"secure_environment_variables":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"security":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"privilege_enabled":{"type":"TypeBool","required":true,"forceNew":true}}}},"volume":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"empty_dir":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"git_repo":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"directory":{"type":"TypeString","optional":true,"forceNew":true},"revision":{"type":"TypeString","optional":true,"forceNew":true},"url":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"mount_path":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"read_only":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"secret":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"share_name":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_key":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_name":{"type":"TypeString","optional":true,"forceNew":true}}}}}}},"diagnostics":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"log_analytics":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"log_type":{"type":"TypeString","optional":true,"forceNew":true},"metadata":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","required":true,"forceNew":true},"workspace_key":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"dns_config":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"nameservers":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"options":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"search_domains":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"dns_name_label":{"type":"TypeString","optional":true,"forceNew":true},"dns_name_label_reuse_policy":{"type":"TypeString","optional":true,"default":"Unsecure"},"exposed_port":{"type":"TypeSet","configMode":"Auto","optional":true,"computed":true,"forceNew":true,"elem":{"schema":{"port":{"type":"TypeInt","optional":true,"forceNew":true},"protocol":{"type":"TypeString","optional":true,"default":"TCP","forceNew":true}}}},"fqdn":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"image_registry_credential":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"user_assigned_identity_id":{"type":"TypeString","optional":true,"description":"The User Assigned Identity to use for Container Registry access.","forceNew":true},"username":{"type":"TypeString","optional":true,"forceNew":true}}}},"init_container":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"commands":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"type":"TypeString"}},"environment_variables":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"image":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"secure_environment_variables":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"security":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"privilege_enabled":{"type":"TypeBool","required":true,"forceNew":true}}}},"volume":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"empty_dir":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"git_repo":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"directory":{"type":"TypeString","optional":true,"forceNew":true},"revision":{"type":"TypeString","optional":true,"forceNew":true},"url":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"mount_path":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"read_only":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"secret":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"share_name":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_key":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_name":{"type":"TypeString","optional":true,"forceNew":true}}}}}}},"ip_address":{"type":"TypeString","computed":true},"ip_address_type":{"type":"TypeString","optional":true,"default":"Public","forceNew":true},"key_vault_key_id":{"type":"TypeString","optional":true,"forceNew":true},"key_vault_user_assigned_identity_id":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_profile_id":{"type":"TypeString","optional":true,"computed":true},"os_type":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"restart_policy":{"type":"TypeString","optional":true,"default":"Always","forceNew":true},"sku":{"type":"TypeString","optional":true,"default":"Standard","forceNew":true},"subnet_ids":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":30,"update":30}},"azurerm_container_registry":{"schema":{"admin_enabled":{"type":"TypeBool","optional":true,"default":false},"admin_password":{"type":"TypeString","computed":true},"admin_username":{"type":"TypeString","computed":true},"anonymous_pull_enabled":{"type":"TypeBool","optional":true},"data_endpoint_enabled":{"type":"TypeBool","optional":true},"encryption":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"identity_client_id":{"type":"TypeString","required":true},"key_vault_key_id":{"type":"TypeString","required":true}}},"maxItems":1},"export_policy_enabled":{"type":"TypeBool","optional":true,"default":true},"georeplications":{"type":"TypeList","optional":true,"elem":{"schema":{"location":{"type":"TypeString","required":true},"regional_endpoint_enabled":{"type":"TypeBool","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zone_redundancy_enabled":{"type":"TypeBool","optional":true,"default":false}}}},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"login_server":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_rule_bypass_option":{"type":"TypeString","optional":true,"default":"AzureServices"},"network_rule_set":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"default_action":{"type":"TypeString","optional":true,"default":"Allow"},"ip_rule":{"type":"TypeSet","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"ip_range":{"type":"TypeString","required":true}}}}}},"maxItems":1},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"quarantine_policy_enabled":{"type":"TypeBool","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_policy_in_days":{"type":"TypeInt","optional":true},"sku":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"trust_policy_enabled":{"type":"TypeBool","optional":true,"default":false},"zone_redundancy_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_registry_agent_pool":{"schema":{"container_registry_name":{"type":"TypeString","required":true,"forceNew":true},"instance_count":{"type":"TypeInt","optional":true,"default":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tier":{"type":"TypeString","optional":true,"default":"S1","forceNew":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_registry_cache_rule":{"schema":{"container_registry_id":{"type":"TypeString","required":true,"forceNew":true},"credential_set_id":{"type":"TypeString","optional":true,"description":"The ARM resource ID of the credential store which is associated with the cache rule."},"name":{"type":"TypeString","required":true,"description":"The name of the cache rule.","forceNew":true},"source_repo":{"type":"TypeString","required":true,"description":"The full source repository path such as 'docker.io/library/ubuntu'.","forceNew":true},"target_repo":{"type":"TypeString","required":true,"description":"The target repository namespace such as 'ubuntu'.","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_registry_scope_map":{"schema":{"actions":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"container_registry_name":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_registry_task":{"schema":{"agent_pool_name":{"type":"TypeString","optional":true},"agent_setting":{"type":"TypeList","optional":true,"elem":{"schema":{"cpu":{"type":"TypeInt","required":true}}},"maxItems":1},"base_image_trigger":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true},"update_trigger_endpoint":{"type":"TypeString","optional":true},"update_trigger_payload_type":{"type":"TypeString","optional":true}}},"maxItems":1},"container_registry_id":{"type":"TypeString","required":true,"forceNew":true},"docker_step":{"type":"TypeList","optional":true,"elem":{"schema":{"arguments":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"cache_enabled":{"type":"TypeBool","optional":true,"default":true},"context_access_token":{"type":"TypeString","required":true},"context_path":{"type":"TypeString","required":true},"dockerfile_path":{"type":"TypeString","required":true},"image_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"push_enabled":{"type":"TypeBool","optional":true,"default":true},"secret_arguments":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"target":{"type":"TypeString","optional":true}}},"maxItems":1},"enabled":{"type":"TypeBool","optional":true,"default":true},"encoded_step":{"type":"TypeList","optional":true,"elem":{"schema":{"context_access_token":{"type":"TypeString","optional":true},"context_path":{"type":"TypeString","optional":true},"secret_values":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"task_content":{"type":"TypeString","required":true},"value_content":{"type":"TypeString","optional":true},"values":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"file_step":{"type":"TypeList","optional":true,"elem":{"schema":{"context_access_token":{"type":"TypeString","optional":true},"context_path":{"type":"TypeString","optional":true},"secret_values":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"task_file_path":{"type":"TypeString","required":true},"value_file_path":{"type":"TypeString","optional":true},"values":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"is_system_task":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"log_template":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"platform":{"type":"TypeList","optional":true,"elem":{"schema":{"architecture":{"type":"TypeString","optional":true},"os":{"type":"TypeString","required":true},"variant":{"type":"TypeString","optional":true}}},"maxItems":1},"registry_credential":{"type":"TypeList","optional":true,"elem":{"schema":{"custom":{"type":"TypeSet","optional":true,"elem":{"schema":{"identity":{"type":"TypeString","optional":true},"login_server":{"type":"TypeString","required":true},"password":{"type":"TypeString","optional":true},"username":{"type":"TypeString","optional":true}}}},"source":{"type":"TypeList","optional":true,"elem":{"schema":{"login_mode":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"source_trigger":{"type":"TypeList","optional":true,"elem":{"schema":{"authentication":{"type":"TypeList","optional":true,"elem":{"schema":{"expire_in_seconds":{"type":"TypeInt","optional":true},"refresh_token":{"type":"TypeString","optional":true},"scope":{"type":"TypeString","optional":true},"token":{"type":"TypeString","required":true},"token_type":{"type":"TypeString","required":true}}},"maxItems":1},"branch":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"events":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"repository_url":{"type":"TypeString","required":true},"source_type":{"type":"TypeString","required":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"timeout_in_seconds":{"type":"TypeInt","optional":true,"default":3600},"timer_trigger":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true},"schedule":{"type":"TypeString","required":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_registry_task_schedule_run_now":{"schema":{"container_registry_task_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_container_registry_token":{"schema":{"container_registry_name":{"type":"TypeString","required":true,"forceNew":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scope_map_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_registry_token_password":{"schema":{"container_registry_token_id":{"type":"TypeString","required":true,"forceNew":true},"password1":{"type":"TypeList","required":true,"elem":{"schema":{"expiry":{"type":"TypeString","optional":true,"forceNew":true},"value":{"type":"TypeString","computed":true}}},"maxItems":1},"password2":{"type":"TypeList","optional":true,"elem":{"schema":{"expiry":{"type":"TypeString","optional":true,"forceNew":true},"value":{"type":"TypeString","computed":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_container_registry_webhook":{"schema":{"actions":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"custom_headers":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"registry_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scope":{"type":"TypeString","optional":true,"default":""},"service_uri":{"type":"TypeString","required":true},"status":{"type":"TypeString","optional":true,"default":"enabled"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_account":{"schema":{"access_key_metadata_writes_enabled":{"type":"TypeBool","optional":true,"default":true},"analytical_storage":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"schema_type":{"type":"TypeString","required":true}}},"maxItems":1},"analytical_storage_enabled":{"type":"TypeBool","optional":true,"default":false},"automatic_failover_enabled":{"type":"TypeBool","optional":true,"default":false},"backup":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"interval_in_minutes":{"type":"TypeInt","optional":true,"computed":true},"retention_in_hours":{"type":"TypeInt","optional":true,"computed":true},"storage_redundancy":{"type":"TypeString","optional":true,"computed":true},"tier":{"type":"TypeString","optional":true,"computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"burst_capacity_enabled":{"type":"TypeBool","optional":true,"default":false},"capabilities":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"name":{"type":"TypeString","required":true}}}},"capacity":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"total_throughput_limit":{"type":"TypeInt","required":true}}},"maxItems":1},"consistency_policy":{"type":"TypeList","required":true,"elem":{"schema":{"consistency_level":{"type":"TypeString","required":true},"max_interval_in_seconds":{"type":"TypeInt","optional":true,"default":5},"max_staleness_prefix":{"type":"TypeInt","optional":true,"default":100}}},"maxItems":1},"cors_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_headers":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64},"allowed_methods":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64},"allowed_origins":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64},"exposed_headers":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64},"max_age_in_seconds":{"type":"TypeInt","optional":true}}},"maxItems":1},"create_mode":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"default_identity_type":{"type":"TypeString","optional":true,"default":"FirstPartyIdentity"},"endpoint":{"type":"TypeString","computed":true},"free_tier_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"geo_location":{"type":"TypeSet","required":true,"elem":{"schema":{"failover_priority":{"type":"TypeInt","required":true},"id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true},"zone_redundant":{"type":"TypeBool","optional":true,"default":false}}}},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"ip_range_filter":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"is_virtual_network_filter_enabled":{"type":"TypeBool","optional":true,"default":false},"key_vault_key_id":{"type":"TypeString","optional":true,"forceNew":true},"kind":{"type":"TypeString","optional":true,"default":"GlobalDocumentDB","forceNew":true},"local_authentication_disabled":{"type":"TypeBool","optional":true,"default":false},"location":{"type":"TypeString","required":true,"forceNew":true},"minimal_tls_version":{"type":"TypeString","optional":true,"default":"Tls12"},"mongo_server_version":{"type":"TypeString","optional":true,"computed":true},"multiple_write_locations_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"network_acl_bypass_for_azure_services":{"type":"TypeBool","optional":true,"default":false},"network_acl_bypass_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"offer_type":{"type":"TypeString","required":true},"partition_merge_enabled":{"type":"TypeBool","optional":true,"default":false},"primary_key":{"type":"TypeString","computed":true},"primary_mongodb_connection_string":{"type":"TypeString","computed":true},"primary_readonly_key":{"type":"TypeString","computed":true},"primary_readonly_mongodb_connection_string":{"type":"TypeString","computed":true},"primary_readonly_sql_connection_string":{"type":"TypeString","computed":true},"primary_sql_connection_string":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"read_endpoints":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"restore":{"type":"TypeList","optional":true,"elem":{"schema":{"database":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"collection_names":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true}}}},"gremlin_database":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"graph_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true}}}},"restore_timestamp_in_utc":{"type":"TypeString","required":true,"forceNew":true},"source_cosmosdb_account_id":{"type":"TypeString","required":true,"forceNew":true},"tables_to_restore":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"secondary_key":{"type":"TypeString","computed":true},"secondary_mongodb_connection_string":{"type":"TypeString","computed":true},"secondary_readonly_key":{"type":"TypeString","computed":true},"secondary_readonly_mongodb_connection_string":{"type":"TypeString","computed":true},"secondary_readonly_sql_connection_string":{"type":"TypeString","computed":true},"secondary_sql_connection_string":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_network_rule":{"type":"TypeSet","optional":true,"elem":{"schema":{"id":{"type":"TypeString","required":true},"ignore_missing_vnet_service_endpoint":{"type":"TypeBool","optional":true,"default":false}}}},"write_endpoints":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_cosmosdb_cassandra_cluster":{"schema":{"authentication_method":{"type":"TypeString","optional":true,"default":"Cassandra"},"client_certificate_pems":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"default_admin_password":{"type":"TypeString","required":true,"forceNew":true},"delegated_management_subnet_id":{"type":"TypeString","required":true,"forceNew":true},"external_gossip_certificate_pems":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"external_seed_node_ip_addresses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"hours_between_backups":{"type":"TypeInt","optional":true,"default":24},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"repair_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"version":{"type":"TypeString","optional":true,"default":"3.11","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_cassandra_datacenter":{"schema":{"availability_zones_enabled":{"type":"TypeBool","optional":true,"default":true},"backup_storage_customer_key_uri":{"type":"TypeString","optional":true},"base64_encoded_yaml_fragment":{"type":"TypeString","optional":true},"cassandra_cluster_id":{"type":"TypeString","required":true,"forceNew":true},"delegated_management_subnet_id":{"type":"TypeString","required":true,"forceNew":true},"disk_count":{"type":"TypeInt","optional":true},"disk_sku":{"type":"TypeString","optional":true,"default":"P30"},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_disk_customer_key_uri":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"node_count":{"type":"TypeInt","optional":true,"default":3},"seed_node_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"sku_name":{"type":"TypeString","optional":true,"default":"Standard_E16s_v5"}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_cosmosdb_cassandra_keyspace":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"autoscale_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"max_throughput":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"throughput":{"type":"TypeInt","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_cassandra_table":{"schema":{"analytical_storage_ttl":{"type":"TypeInt","optional":true,"forceNew":true},"autoscale_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"max_throughput":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"cassandra_keyspace_id":{"type":"TypeString","required":true,"forceNew":true},"default_ttl":{"type":"TypeInt","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"schema":{"type":"TypeList","required":true,"elem":{"schema":{"cluster_key":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"order_by":{"type":"TypeString","required":true}}}},"column":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}},"minItems":1},"partition_key":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true}}}}}},"maxItems":1},"throughput":{"type":"TypeInt","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_gremlin_database":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"autoscale_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"max_throughput":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"throughput":{"type":"TypeInt","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_gremlin_graph":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"analytical_storage_ttl":{"type":"TypeInt","optional":true},"autoscale_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"max_throughput":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"conflict_resolution_policy":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"schema":{"conflict_resolution_path":{"type":"TypeString","optional":true},"conflict_resolution_procedure":{"type":"TypeString","optional":true},"mode":{"type":"TypeString","required":true}}},"maxItems":1},"database_name":{"type":"TypeString","required":true,"forceNew":true},"default_ttl":{"type":"TypeInt","optional":true},"index_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"automatic":{"type":"TypeBool","optional":true,"default":true},"composite_index":{"type":"TypeList","optional":true,"elem":{"schema":{"index":{"type":"TypeList","required":true,"elem":{"schema":{"order":{"type":"TypeString","required":true},"path":{"type":"TypeString","required":true}}},"minItems":1}}}},"excluded_paths":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"included_paths":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"indexing_mode":{"type":"TypeString","required":true},"spatial_index":{"type":"TypeList","optional":true,"elem":{"schema":{"path":{"type":"TypeString","required":true},"types":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}}}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"partition_key_path":{"type":"TypeString","required":true,"forceNew":true},"partition_key_version":{"type":"TypeInt","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"throughput":{"type":"TypeInt","optional":true,"computed":true},"unique_key":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"paths":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_mongo_collection":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"analytical_storage_ttl":{"type":"TypeInt","optional":true},"autoscale_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"max_throughput":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"database_name":{"type":"TypeString","required":true,"forceNew":true},"default_ttl_seconds":{"type":"TypeInt","optional":true},"index":{"type":"TypeSet","optional":true,"elem":{"schema":{"keys":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"unique":{"type":"TypeBool","optional":true,"default":false}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"shard_key":{"type":"TypeString","optional":true,"forceNew":true},"system_indexes":{"type":"TypeList","computed":true,"elem":{"schema":{"keys":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"unique":{"type":"TypeBool","computed":true}}}},"throughput":{"type":"TypeInt","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_mongo_database":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"autoscale_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"max_throughput":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"throughput":{"type":"TypeInt","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_mongo_role_definition":{"schema":{"cosmos_mongo_database_id":{"type":"TypeString","required":true,"forceNew":true},"inherited_role_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"privilege":{"type":"TypeList","optional":true,"elem":{"schema":{"actions":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"resource":{"type":"TypeList","required":true,"elem":{"schema":{"collection_name":{"type":"TypeString","optional":true},"db_name":{"type":"TypeString","optional":true}}},"maxItems":1}}}},"role_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_mongo_user_definition":{"schema":{"cosmos_mongo_database_id":{"type":"TypeString","required":true,"forceNew":true},"inherited_role_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_postgresql_cluster":{"schema":{"administrator_login_password":{"type":"TypeString","optional":true},"citus_version":{"type":"TypeString","optional":true,"computed":true},"coordinator_public_ip_access_enabled":{"type":"TypeBool","optional":true,"default":true},"coordinator_server_edition":{"type":"TypeString","optional":true,"default":"GeneralPurpose"},"coordinator_storage_quota_in_mb":{"type":"TypeInt","optional":true},"coordinator_vcore_count":{"type":"TypeInt","optional":true},"earliest_restore_time":{"type":"TypeString","computed":true},"ha_enabled":{"type":"TypeBool","optional":true,"default":false},"location":{"type":"TypeString","required":true,"forceNew":true},"maintenance_window":{"type":"TypeList","optional":true,"elem":{"schema":{"day_of_week":{"type":"TypeInt","optional":true,"default":0},"start_hour":{"type":"TypeInt","optional":true,"default":0},"start_minute":{"type":"TypeInt","optional":true,"default":0}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"node_count":{"type":"TypeInt","required":true},"node_public_ip_access_enabled":{"type":"TypeBool","optional":true,"default":false},"node_server_edition":{"type":"TypeString","optional":true,"default":"MemoryOptimized"},"node_storage_quota_in_mb":{"type":"TypeInt","optional":true,"computed":true},"node_vcores":{"type":"TypeInt","optional":true,"computed":true},"point_in_time_in_utc":{"type":"TypeString","optional":true,"forceNew":true},"preferred_primary_zone":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"servers":{"type":"TypeList","computed":true,"elem":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"shards_on_coordinator_enabled":{"type":"TypeBool","optional":true,"computed":true},"source_location":{"type":"TypeString","optional":true,"forceNew":true},"source_resource_id":{"type":"TypeString","optional":true,"forceNew":true},"sql_version":{"type":"TypeString","optional":true,"computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_cosmosdb_postgresql_coordinator_configuration":{"schema":{"cluster_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_postgresql_firewall_rule":{"schema":{"cluster_id":{"type":"TypeString","required":true,"forceNew":true},"end_ip_address":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"start_ip_address":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_postgresql_node_configuration":{"schema":{"cluster_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_postgresql_role":{"schema":{"cluster_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_cosmosdb_sql_container":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"analytical_storage_ttl":{"type":"TypeInt","optional":true},"autoscale_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"max_throughput":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"conflict_resolution_policy":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"schema":{"conflict_resolution_path":{"type":"TypeString","optional":true},"conflict_resolution_procedure":{"type":"TypeString","optional":true},"mode":{"type":"TypeString","required":true}}},"maxItems":1},"database_name":{"type":"TypeString","required":true,"forceNew":true},"default_ttl":{"type":"TypeInt","optional":true},"indexing_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"composite_index":{"type":"TypeList","optional":true,"elem":{"schema":{"index":{"type":"TypeList","required":true,"elem":{"schema":{"order":{"type":"TypeString","required":true},"path":{"type":"TypeString","required":true}}},"minItems":1}}}},"excluded_path":{"type":"TypeList","optional":true,"elem":{"schema":{"path":{"type":"TypeString","required":true}}}},"included_path":{"type":"TypeList","optional":true,"elem":{"schema":{"path":{"type":"TypeString","required":true}}}},"indexing_mode":{"type":"TypeString","optional":true,"default":"consistent"},"spatial_index":{"type":"TypeList","optional":true,"elem":{"schema":{"path":{"type":"TypeString","required":true},"types":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}}}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"partition_key_kind":{"type":"TypeString","optional":true,"default":"Hash","forceNew":true},"partition_key_paths":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"partition_key_version":{"type":"TypeInt","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"throughput":{"type":"TypeInt","optional":true,"computed":true},"unique_key":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"paths":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_sql_database":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"autoscale_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"max_throughput":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"throughput":{"type":"TypeInt","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_sql_dedicated_gateway":{"schema":{"cosmosdb_account_id":{"type":"TypeString","required":true,"forceNew":true},"instance_count":{"type":"TypeInt","required":true},"instance_size":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_sql_function":{"schema":{"body":{"type":"TypeString","required":true},"container_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_sql_role_assignment":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"principal_id":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"role_definition_id":{"type":"TypeString","required":true},"scope":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_sql_role_definition":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"assignable_scopes":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"permissions":{"type":"TypeSet","required":true,"elem":{"schema":{"data_actions":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"role_definition_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"type":{"type":"TypeString","optional":true,"default":"CustomRole","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_sql_stored_procedure":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"body":{"type":"TypeString","required":true},"container_name":{"type":"TypeString","required":true,"forceNew":true},"database_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_sql_trigger":{"schema":{"body":{"type":"TypeString","required":true},"container_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"operation":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cosmosdb_table":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"autoscale_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"max_throughput":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"throughput":{"type":"TypeInt","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cost_anomaly_alert":{"schema":{"display_name":{"type":"TypeString","required":true},"email_addresses":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"email_subject":{"type":"TypeString","required":true},"message":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"subscription_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_cost_management_scheduled_action":{"schema":{"day_of_month":{"type":"TypeInt","optional":true},"days_of_week":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"display_name":{"type":"TypeString","required":true},"email_address_sender":{"type":"TypeString","required":true},"email_addresses":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":20,"minItems":1},"email_subject":{"type":"TypeString","required":true},"end_date":{"type":"TypeString","required":true},"frequency":{"type":"TypeString","required":true},"hour_of_day":{"type":"TypeInt","optional":true},"message":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"start_date":{"type":"TypeString","required":true},"view_id":{"type":"TypeString","required":true,"forceNew":true},"weeks_of_month":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_custom_ip_prefix":{"schema":{"cidr":{"type":"TypeString","required":true,"forceNew":true},"commissioning_enabled":{"type":"TypeBool","optional":true,"default":false},"internet_advertising_disabled":{"type":"TypeBool","optional":true,"default":false},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parent_custom_ip_prefix_id":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"roa_validity_end_date":{"type":"TypeString","optional":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"wan_validation_signed_message":{"type":"TypeString","optional":true,"forceNew":true},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":540,"read":5,"delete":1020,"update":1020}},"azurerm_custom_provider":{"schema":{"action":{"type":"TypeSet","optional":true,"elem":{"schema":{"endpoint":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"resource_type":{"type":"TypeSet","optional":true,"elem":{"schema":{"endpoint":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"routing_type":{"type":"TypeString","optional":true,"default":"Proxy"}}}},"tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"validation":{"type":"TypeSet","optional":true,"elem":{"schema":{"specification":{"type":"TypeString","required":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dashboard_grafana":{"schema":{"api_key_enabled":{"type":"TypeBool","optional":true,"default":false},"auto_generated_domain_name_label_scope":{"type":"TypeString","optional":true,"default":"TenantReuse"},"azure_monitor_workspace_integrations":{"type":"TypeList","optional":true,"elem":{"schema":{"resource_id":{"type":"TypeString","required":true}}}},"deterministic_outbound_ip_enabled":{"type":"TypeBool","optional":true,"default":false},"endpoint":{"type":"TypeString","computed":true},"grafana_major_version":{"type":"TypeString","required":true,"forceNew":true},"grafana_version":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"outbound_ip":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","optional":true,"default":"Standard","forceNew":true},"smtp":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":false},"from_address":{"type":"TypeString","required":true},"from_name":{"type":"TypeString","optional":true,"default":"Azure Managed Grafana Notification"},"host":{"type":"TypeString","required":true},"password":{"type":"TypeString","required":true},"start_tls_policy":{"type":"TypeString","required":true},"user":{"type":"TypeString","required":true},"verification_skip_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zone_redundancy_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory":{"schema":{"customer_managed_key_id":{"type":"TypeString","optional":true},"customer_managed_key_identity_id":{"type":"TypeString","optional":true},"github_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"account_name":{"type":"TypeString","required":true},"branch_name":{"type":"TypeString","required":true},"git_url":{"type":"TypeString","optional":true},"publishing_enabled":{"type":"TypeBool","optional":true,"default":true},"repository_name":{"type":"TypeString","required":true},"root_folder":{"type":"TypeString","required":true}}},"maxItems":1},"global_parameter":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_virtual_network_enabled":{"type":"TypeBool","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_enabled":{"type":"TypeBool","optional":true,"default":true},"purview_id":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"vsts_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"account_name":{"type":"TypeString","required":true},"branch_name":{"type":"TypeString","required":true},"project_name":{"type":"TypeString","required":true},"publishing_enabled":{"type":"TypeBool","optional":true,"default":true},"repository_name":{"type":"TypeString","required":true},"root_folder":{"type":"TypeString","required":true},"tenant_id":{"type":"TypeString","required":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_credential_service_principal":{"schema":{"annotations":{"type":"TypeList","optional":true,"description":"(Optional) List of string annotations.","elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"description":"The resource ID of the parent Data Factory","forceNew":true},"description":{"type":"TypeString","optional":true,"description":"(Optional) Short text description"},"name":{"type":"TypeString","required":true,"description":"The desired name of the credential resource","forceNew":true},"service_principal_id":{"type":"TypeString","required":true,"description":"The Client ID of the Service Principal"},"service_principal_key":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"secret_name":{"type":"TypeString","required":true},"secret_version":{"type":"TypeString","optional":true}}},"maxItems":1},"tenant_id":{"type":"TypeString","required":true,"description":"The Tenant ID of the Service Principal"}},"timeouts":{"create":5,"read":5,"delete":5,"update":5}},"azurerm_data_factory_credential_user_managed_identity":{"schema":{"annotations":{"type":"TypeList","optional":true,"description":"(Optional) List of string annotations.","elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"description":"The resource ID of the parent Data Factory","forceNew":true},"description":{"type":"TypeString","optional":true,"description":"(Optional) Short text description"},"identity_id":{"type":"TypeString","required":true,"description":"The resource ID of the User Assigned Managed Identity","forceNew":true},"name":{"type":"TypeString","required":true,"description":"The desired name of the credential resource","forceNew":true}},"timeouts":{"create":5,"read":5,"delete":5,"update":5}},"azurerm_data_factory_custom_dataset":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"linked_service":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"schema_json":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true,"forceNew":true},"type_properties_json":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_data_flow":{"schema":{"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"script":{"type":"TypeString","optional":true},"script_lines":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"sink":{"type":"TypeList","required":true,"elem":{"schema":{"dataset":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"description":{"type":"TypeString","optional":true},"flowlet":{"type":"TypeList","optional":true,"elem":{"schema":{"dataset_parameters":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"name":{"type":"TypeString","required":true},"rejected_linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"schema_linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}}},"source":{"type":"TypeList","required":true,"elem":{"schema":{"dataset":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"description":{"type":"TypeString","optional":true},"flowlet":{"type":"TypeList","optional":true,"elem":{"schema":{"dataset_parameters":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"name":{"type":"TypeString","required":true},"rejected_linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"schema_linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}}},"transformation":{"type":"TypeList","optional":true,"elem":{"schema":{"dataset":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"description":{"type":"TypeString","optional":true},"flowlet":{"type":"TypeList","optional":true,"elem":{"schema":{"dataset_parameters":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"name":{"type":"TypeString","required":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_dataset_azure_blob":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"dynamic_filename_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_path_enabled":{"type":"TypeBool","optional":true,"default":false},"filename":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"linked_service_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"path":{"type":"TypeString","optional":true},"schema_column":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","optional":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_dataset_azure_sql_table":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"linked_service_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"schema":{"type":"TypeString","optional":true},"schema_column":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","optional":true}}}},"table":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_dataset_binary":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"azure_blob_storage_location":{"type":"TypeList","optional":true,"elem":{"schema":{"container":{"type":"TypeString","required":true},"dynamic_container_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_path_enabled":{"type":"TypeBool","optional":true,"default":false},"filename":{"type":"TypeString","optional":true},"path":{"type":"TypeString","optional":true}}},"maxItems":1},"compression":{"type":"TypeList","optional":true,"elem":{"schema":{"level":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"http_server_location":{"type":"TypeList","optional":true,"elem":{"schema":{"dynamic_filename_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_path_enabled":{"type":"TypeBool","optional":true,"default":false},"filename":{"type":"TypeString","required":true},"path":{"type":"TypeString","required":true},"relative_url":{"type":"TypeString","required":true}}},"maxItems":1},"linked_service_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"sftp_server_location":{"type":"TypeList","optional":true,"elem":{"schema":{"dynamic_filename_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_path_enabled":{"type":"TypeBool","optional":true,"default":false},"filename":{"type":"TypeString","required":true},"path":{"type":"TypeString","required":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_dataset_cosmosdb_sqlapi":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"collection_name":{"type":"TypeString","optional":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"linked_service_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"schema_column":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","optional":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_dataset_delimited_text":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"azure_blob_fs_location":{"type":"TypeList","optional":true,"elem":{"schema":{"dynamic_file_system_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_path_enabled":{"type":"TypeBool","optional":true,"default":false},"file_system":{"type":"TypeString","optional":true},"filename":{"type":"TypeString","optional":true},"path":{"type":"TypeString","optional":true}}},"maxItems":1},"azure_blob_storage_location":{"type":"TypeList","optional":true,"elem":{"schema":{"container":{"type":"TypeString","required":true},"dynamic_container_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_path_enabled":{"type":"TypeBool","optional":true,"default":false},"filename":{"type":"TypeString","optional":true},"path":{"type":"TypeString","optional":true}}},"maxItems":1},"column_delimiter":{"type":"TypeString","optional":true,"default":","},"compression_codec":{"type":"TypeString","optional":true},"compression_level":{"type":"TypeString","optional":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"encoding":{"type":"TypeString","optional":true},"escape_character":{"type":"TypeString","optional":true,"default":"\\"},"first_row_as_header":{"type":"TypeBool","optional":true,"default":false},"folder":{"type":"TypeString","optional":true},"http_server_location":{"type":"TypeList","optional":true,"elem":{"schema":{"dynamic_filename_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_path_enabled":{"type":"TypeBool","optional":true,"default":false},"filename":{"type":"TypeString","required":true},"path":{"type":"TypeString","required":true},"relative_url":{"type":"TypeString","required":true}}},"maxItems":1},"linked_service_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"null_value":{"type":"TypeString","optional":true,"default":""},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"quote_character":{"type":"TypeString","optional":true,"default":"\""},"row_delimiter":{"type":"TypeString","optional":true},"schema_column":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","optional":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_dataset_http":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"linked_service_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"relative_url":{"type":"TypeString","optional":true},"request_body":{"type":"TypeString","optional":true},"request_method":{"type":"TypeString","optional":true},"schema_column":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","optional":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_dataset_json":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"azure_blob_storage_location":{"type":"TypeList","optional":true,"elem":{"schema":{"container":{"type":"TypeString","required":true},"dynamic_container_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_path_enabled":{"type":"TypeBool","optional":true,"default":false},"filename":{"type":"TypeString","required":true},"path":{"type":"TypeString","required":true}}},"maxItems":1},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"encoding":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"http_server_location":{"type":"TypeList","optional":true,"elem":{"schema":{"dynamic_filename_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_path_enabled":{"type":"TypeBool","optional":true,"default":false},"filename":{"type":"TypeString","required":true},"path":{"type":"TypeString","required":true},"relative_url":{"type":"TypeString","required":true}}},"maxItems":1},"linked_service_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"schema_column":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","optional":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_dataset_mysql":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"linked_service_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"schema_column":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","optional":true}}}},"table_name":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_dataset_parquet":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"azure_blob_fs_location":{"type":"TypeList","optional":true,"elem":{"schema":{"dynamic_file_system_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_path_enabled":{"type":"TypeBool","optional":true,"default":false},"file_system":{"type":"TypeString","optional":true},"filename":{"type":"TypeString","optional":true},"path":{"type":"TypeString","optional":true}}},"maxItems":1},"azure_blob_storage_location":{"type":"TypeList","optional":true,"elem":{"schema":{"container":{"type":"TypeString","required":true},"dynamic_container_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_path_enabled":{"type":"TypeBool","optional":true,"default":false},"filename":{"type":"TypeString","optional":true},"path":{"type":"TypeString","optional":true}}},"maxItems":1},"compression_codec":{"type":"TypeString","optional":true},"compression_level":{"type":"TypeString","optional":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"http_server_location":{"type":"TypeList","optional":true,"elem":{"schema":{"dynamic_filename_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_path_enabled":{"type":"TypeBool","optional":true,"default":false},"filename":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true},"relative_url":{"type":"TypeString","required":true}}},"maxItems":1},"linked_service_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"schema_column":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","optional":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_dataset_postgresql":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"linked_service_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"schema_column":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","optional":true}}}},"table_name":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_dataset_snowflake":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"linked_service_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"schema_column":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"precision":{"type":"TypeInt","optional":true},"scale":{"type":"TypeInt","optional":true},"type":{"type":"TypeString","optional":true}}}},"schema_name":{"type":"TypeString","optional":true},"table_name":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_dataset_sql_server_table":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"linked_service_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"schema_column":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","optional":true}}}},"table_name":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_flowlet_data_flow":{"schema":{"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"script":{"type":"TypeString","optional":true},"script_lines":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"sink":{"type":"TypeList","optional":true,"elem":{"schema":{"dataset":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"description":{"type":"TypeString","optional":true},"flowlet":{"type":"TypeList","optional":true,"elem":{"schema":{"dataset_parameters":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"name":{"type":"TypeString","required":true},"rejected_linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"schema_linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}}},"source":{"type":"TypeList","optional":true,"elem":{"schema":{"dataset":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"description":{"type":"TypeString","optional":true},"flowlet":{"type":"TypeList","optional":true,"elem":{"schema":{"dataset_parameters":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"name":{"type":"TypeString","required":true},"rejected_linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"schema_linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}}},"transformation":{"type":"TypeList","optional":true,"elem":{"schema":{"dataset":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"description":{"type":"TypeString","optional":true},"flowlet":{"type":"TypeList","optional":true,"elem":{"schema":{"dataset_parameters":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"linked_service":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"name":{"type":"TypeString","required":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_integration_runtime_azure":{"schema":{"cleanup_enabled":{"type":"TypeBool","optional":true,"default":true},"compute_type":{"type":"TypeString","optional":true,"default":"General"},"core_count":{"type":"TypeInt","optional":true,"default":8},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"time_to_live_min":{"type":"TypeInt","optional":true,"default":0},"virtual_network_enabled":{"type":"TypeBool","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_integration_runtime_azure_ssis":{"schema":{"catalog_info":{"type":"TypeList","optional":true,"elem":{"schema":{"administrator_login":{"type":"TypeString","optional":true},"administrator_password":{"type":"TypeString","optional":true},"dual_standby_pair_name":{"type":"TypeString","optional":true},"elastic_pool_name":{"type":"TypeString","optional":true},"pricing_tier":{"type":"TypeString","optional":true},"server_endpoint":{"type":"TypeString","required":true}}},"maxItems":1},"copy_compute_scale":{"type":"TypeList","optional":true,"elem":{"schema":{"data_integration_unit":{"type":"TypeInt","optional":true},"time_to_live":{"type":"TypeInt","optional":true}}},"maxItems":1},"credential_name":{"type":"TypeString","optional":true},"custom_setup_script":{"type":"TypeList","optional":true,"elem":{"schema":{"blob_container_uri":{"type":"TypeString","required":true},"sas_token":{"type":"TypeString","required":true}}},"maxItems":1},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"edition":{"type":"TypeString","optional":true,"default":"Standard"},"express_custom_setup":{"type":"TypeList","optional":true,"elem":{"schema":{"command_key":{"type":"TypeList","optional":true,"elem":{"schema":{"key_vault_password":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"secret_name":{"type":"TypeString","required":true},"secret_version":{"type":"TypeString","optional":true}}},"maxItems":1},"password":{"type":"TypeString","optional":true},"target_name":{"type":"TypeString","required":true},"user_name":{"type":"TypeString","required":true}}}},"component":{"type":"TypeList","optional":true,"elem":{"schema":{"key_vault_license":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"secret_name":{"type":"TypeString","required":true},"secret_version":{"type":"TypeString","optional":true}}},"maxItems":1},"license":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true}}}},"environment":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"powershell_version":{"type":"TypeString","optional":true}}},"maxItems":1},"express_vnet_integration":{"type":"TypeList","optional":true,"elem":{"schema":{"subnet_id":{"type":"TypeString","required":true}}},"maxItems":1},"license_type":{"type":"TypeString","optional":true,"default":"LicenseIncluded"},"location":{"type":"TypeString","required":true,"forceNew":true},"max_parallel_executions_per_node":{"type":"TypeInt","optional":true,"default":1},"name":{"type":"TypeString","required":true,"forceNew":true},"node_size":{"type":"TypeString","required":true},"number_of_nodes":{"type":"TypeInt","optional":true,"default":1},"package_store":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}},"pipeline_external_compute_scale":{"type":"TypeList","optional":true,"elem":{"schema":{"number_of_external_nodes":{"type":"TypeInt","optional":true},"number_of_pipeline_nodes":{"type":"TypeInt","optional":true},"time_to_live":{"type":"TypeInt","optional":true}}},"maxItems":1},"proxy":{"type":"TypeList","optional":true,"elem":{"schema":{"path":{"type":"TypeString","optional":true},"self_hosted_integration_runtime_name":{"type":"TypeString","required":true},"staging_storage_linked_service_name":{"type":"TypeString","required":true}}},"maxItems":1},"vnet_integration":{"type":"TypeList","optional":true,"elem":{"schema":{"public_ips":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":2,"minItems":2},"subnet_id":{"type":"TypeString","optional":true},"subnet_name":{"type":"TypeString","optional":true},"vnet_id":{"type":"TypeString","optional":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_integration_runtime_self_hosted":{"schema":{"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_authorization_key":{"type":"TypeString","computed":true},"rbac_authorization":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"resource_id":{"type":"TypeString","required":true}}}},"secondary_authorization_key":{"type":"TypeString","computed":true},"self_contained_interactive_authoring_enabled":{"type":"TypeBool","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_custom_service":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true,"forceNew":true},"type_properties_json":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_azure_blob_storage":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"connection_string":{"type":"TypeString","optional":true},"connection_string_insecure":{"type":"TypeString","optional":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"key_vault_sas_token":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"secret_name":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"sas_uri":{"type":"TypeString","optional":true},"service_endpoint":{"type":"TypeString","optional":true},"service_principal_id":{"type":"TypeString","optional":true},"service_principal_key":{"type":"TypeString","optional":true},"service_principal_linked_key_vault_key":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"secret_name":{"type":"TypeString","required":true}}},"maxItems":1},"storage_kind":{"type":"TypeString","optional":true},"tenant_id":{"type":"TypeString","optional":true},"use_managed_identity":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_azure_databricks":{"schema":{"access_token":{"type":"TypeString","optional":true},"adb_domain":{"type":"TypeString","required":true},"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"existing_cluster_id":{"type":"TypeString","optional":true},"instance_pool":{"type":"TypeList","optional":true,"elem":{"schema":{"cluster_version":{"type":"TypeString","required":true},"instance_pool_id":{"type":"TypeString","required":true},"max_number_of_workers":{"type":"TypeInt","optional":true},"min_number_of_workers":{"type":"TypeInt","optional":true,"default":1}}},"maxItems":1},"integration_runtime_name":{"type":"TypeString","optional":true},"key_vault_password":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"secret_name":{"type":"TypeString","required":true}}},"maxItems":1},"msi_work_space_resource_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"new_cluster_config":{"type":"TypeList","optional":true,"elem":{"schema":{"cluster_version":{"type":"TypeString","required":true},"custom_tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"driver_node_type":{"type":"TypeString","optional":true},"init_scripts":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"log_destination":{"type":"TypeString","optional":true},"max_number_of_workers":{"type":"TypeInt","optional":true},"min_number_of_workers":{"type":"TypeInt","optional":true,"default":"1"},"node_type":{"type":"TypeString","required":true},"spark_config":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"spark_environment_variables":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_azure_file_storage":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"connection_string":{"type":"TypeString","required":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"file_share":{"type":"TypeString","optional":true},"host":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"key_vault_password":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"secret_name":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"password":{"type":"TypeString","optional":true},"user_id":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_azure_function":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"key":{"type":"TypeString","optional":true},"key_vault_key":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"secret_name":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"url":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_azure_search":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"encrypted_credential":{"type":"TypeString","computed":true},"integration_runtime_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"search_service_key":{"type":"TypeString","required":true},"url":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_azure_sql_database":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"connection_string":{"type":"TypeString","optional":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"key_vault_connection_string":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"secret_name":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_password":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"secret_name":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"service_principal_id":{"type":"TypeString","optional":true},"service_principal_key":{"type":"TypeString","optional":true},"tenant_id":{"type":"TypeString","optional":true},"use_managed_identity":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_azure_table_storage":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"connection_string":{"type":"TypeString","required":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_cosmosdb":{"schema":{"account_endpoint":{"type":"TypeString","optional":true},"account_key":{"type":"TypeString","optional":true},"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"connection_string":{"type":"TypeString","optional":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"database":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_cosmosdb_mongoapi":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"connection_string":{"type":"TypeString","optional":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"database":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"server_version_is_32_or_higher":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_data_lake_storage_gen2":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"service_principal_id":{"type":"TypeString","optional":true},"service_principal_key":{"type":"TypeString","optional":true},"storage_account_key":{"type":"TypeString","optional":true},"tenant":{"type":"TypeString","optional":true},"url":{"type":"TypeString","required":true},"use_managed_identity":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_key_vault":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"key_vault_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_kusto":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"kusto_database_name":{"type":"TypeString","required":true},"kusto_endpoint":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"service_principal_id":{"type":"TypeString","optional":true},"service_principal_key":{"type":"TypeString","optional":true},"tenant":{"type":"TypeString","optional":true},"use_managed_identity":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_mysql":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"connection_string":{"type":"TypeString","required":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_odata":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"basic_authentication":{"type":"TypeList","optional":true,"elem":{"schema":{"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true}}},"maxItems":1},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"url":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_odbc":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"basic_authentication":{"type":"TypeList","optional":true,"elem":{"schema":{"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true}}},"maxItems":1},"connection_string":{"type":"TypeString","required":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_postgresql":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"connection_string":{"type":"TypeString","required":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_sftp":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"authentication_type":{"type":"TypeString","required":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"host":{"type":"TypeString","required":true},"host_key_fingerprint":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"password":{"type":"TypeString","required":true},"port":{"type":"TypeInt","required":true},"skip_host_key_validation":{"type":"TypeBool","optional":true},"username":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_snowflake":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"connection_string":{"type":"TypeString","required":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"key_vault_password":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"secret_name":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_sql_server":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"connection_string":{"type":"TypeString","optional":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"key_vault_connection_string":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"secret_name":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_password":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"secret_name":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"user_name":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_synapse":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"connection_string":{"type":"TypeString","required":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"key_vault_password":{"type":"TypeList","optional":true,"elem":{"schema":{"linked_service_name":{"type":"TypeString","required":true},"secret_name":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_linked_service_web":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"authentication_type":{"type":"TypeString","required":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"integration_runtime_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"password":{"type":"TypeString","optional":true},"url":{"type":"TypeString","required":true},"username":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_managed_private_endpoint":{"schema":{"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"fqdns":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"subresource_name":{"type":"TypeString","optional":true,"forceNew":true},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_data_factory_pipeline":{"schema":{"activities_json":{"type":"TypeString","optional":true},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"concurrency":{"type":"TypeInt","optional":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"folder":{"type":"TypeString","optional":true},"moniter_metrics_after_duration":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"variables":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_trigger_blob_event":{"schema":{"activated":{"type":"TypeBool","optional":true,"default":true},"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"blob_path_begins_with":{"type":"TypeString","optional":true},"blob_path_ends_with":{"type":"TypeString","optional":true},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"events":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"ignore_empty_blobs":{"type":"TypeBool","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"pipeline":{"type":"TypeSet","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}}},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_trigger_custom_event":{"schema":{"activated":{"type":"TypeBool","optional":true,"default":true},"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"eventgrid_topic_id":{"type":"TypeString","required":true,"forceNew":true},"events":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"pipeline":{"type":"TypeSet","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}}},"subject_begins_with":{"type":"TypeString","optional":true},"subject_ends_with":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_trigger_schedule":{"schema":{"activated":{"type":"TypeBool","optional":true,"default":true},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"end_time":{"type":"TypeString","optional":true},"frequency":{"type":"TypeString","optional":true,"default":"Minute"},"interval":{"type":"TypeInt","optional":true,"default":1},"name":{"type":"TypeString","required":true,"forceNew":true},"pipeline":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}}},"pipeline_name":{"type":"TypeString","optional":true,"computed":true},"pipeline_parameters":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"days_of_month":{"type":"TypeList","optional":true,"elem":{"type":"TypeInt"}},"days_of_week":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":7},"hours":{"type":"TypeList","optional":true,"elem":{"type":"TypeInt"}},"minutes":{"type":"TypeList","optional":true,"elem":{"type":"TypeInt"}},"monthly":{"type":"TypeList","optional":true,"elem":{"schema":{"week":{"type":"TypeInt","optional":true},"weekday":{"type":"TypeString","required":true}}},"minItems":1}}},"maxItems":1,"minItems":1},"start_time":{"type":"TypeString","optional":true,"computed":true},"time_zone":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_factory_trigger_tumbling_window":{"schema":{"activated":{"type":"TypeBool","optional":true,"default":true},"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true,"forceNew":true},"delay":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"end_time":{"type":"TypeString","optional":true},"frequency":{"type":"TypeString","required":true,"forceNew":true},"interval":{"type":"TypeInt","required":true,"forceNew":true},"max_concurrency":{"type":"TypeInt","optional":true,"default":50},"name":{"type":"TypeString","required":true,"forceNew":true},"pipeline":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"retry":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeInt","optional":true,"default":30}}},"maxItems":1},"start_time":{"type":"TypeString","required":true,"forceNew":true},"trigger_dependency":{"type":"TypeSet","optional":true,"elem":{"schema":{"offset":{"type":"TypeString","optional":true},"size":{"type":"TypeString","optional":true},"trigger_name":{"type":"TypeString","optional":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_protection_backup_instance_blob_storage":{"schema":{"backup_policy_id":{"type":"TypeString","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"storage_account_container_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true},"vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_protection_backup_instance_disk":{"schema":{"backup_policy_id":{"type":"TypeString","required":true},"disk_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"snapshot_resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_protection_backup_instance_kubernetes_cluster":{"schema":{"backup_datasource_parameters":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"cluster_scoped_resources_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"excluded_namespaces":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"excluded_resource_types":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"included_namespaces":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"included_resource_types":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"label_selectors":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"volume_snapshot_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}}},"maxItems":1},"backup_policy_id":{"type":"TypeString","required":true,"forceNew":true},"kubernetes_cluster_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"snapshot_resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_data_protection_backup_instance_postgresql":{"schema":{"backup_policy_id":{"type":"TypeString","required":true},"database_credential_key_vault_secret_id":{"type":"TypeString","optional":true},"database_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_protection_backup_instance_postgresql_flexible_server":{"schema":{"backup_policy_id":{"type":"TypeString","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"server_id":{"type":"TypeString","required":true,"forceNew":true},"vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_data_protection_backup_policy_blob_storage":{"schema":{"backup_repeating_time_intervals":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"operational_default_retention_duration":{"type":"TypeString","optional":true,"forceNew":true},"retention_rule":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"criteria":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"absolute_criteria":{"type":"TypeString","optional":true,"forceNew":true},"days_of_month":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeInt"},"minItems":1},"days_of_week":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"months_of_year":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"scheduled_backup_times":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"weeks_of_month":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1}}},"maxItems":1},"life_cycle":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"data_store_type":{"type":"TypeString","required":true,"forceNew":true},"duration":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","required":true,"forceNew":true}}}},"time_zone":{"type":"TypeString","optional":true,"forceNew":true},"vault_default_retention_duration":{"type":"TypeString","optional":true,"forceNew":true},"vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_data_protection_backup_policy_disk":{"schema":{"backup_repeating_time_intervals":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"default_retention_duration":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"retention_rule":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"criteria":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"absolute_criteria":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"duration":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","required":true,"forceNew":true}}}},"time_zone":{"type":"TypeString","optional":true,"forceNew":true},"vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_data_protection_backup_policy_kubernetes_cluster":{"schema":{"backup_repeating_time_intervals":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"default_retention_rule":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"life_cycle":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"data_store_type":{"type":"TypeString","required":true,"forceNew":true},"duration":{"type":"TypeString","required":true,"forceNew":true}}}}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_rule":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"criteria":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"absolute_criteria":{"type":"TypeString","optional":true,"forceNew":true},"days_of_week":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"months_of_year":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"scheduled_backup_times":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"weeks_of_month":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1}}},"maxItems":1},"life_cycle":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"data_store_type":{"type":"TypeString","required":true,"forceNew":true},"duration":{"type":"TypeString","required":true,"forceNew":true}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","required":true,"forceNew":true}}}},"time_zone":{"type":"TypeString","optional":true,"forceNew":true},"vault_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_data_protection_backup_policy_mysql_flexible_server":{"schema":{"backup_repeating_time_intervals":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"default_retention_rule":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"life_cycle":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"data_store_type":{"type":"TypeString","required":true,"forceNew":true},"duration":{"type":"TypeString","required":true,"forceNew":true}}}}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"retention_rule":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"criteria":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"absolute_criteria":{"type":"TypeString","optional":true,"forceNew":true},"days_of_week":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"months_of_year":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"scheduled_backup_times":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"weeks_of_month":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1}}},"maxItems":1},"life_cycle":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"data_store_type":{"type":"TypeString","required":true,"forceNew":true},"duration":{"type":"TypeString","required":true,"forceNew":true}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","required":true,"forceNew":true}}}},"time_zone":{"type":"TypeString","optional":true,"forceNew":true},"vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_data_protection_backup_policy_postgresql":{"schema":{"backup_repeating_time_intervals":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"default_retention_duration":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_rule":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"criteria":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"absolute_criteria":{"type":"TypeString","optional":true,"forceNew":true},"days_of_week":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"months_of_year":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"scheduled_backup_times":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"weeks_of_month":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1}}},"maxItems":1},"duration":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","required":true,"forceNew":true}}}},"time_zone":{"type":"TypeString","optional":true,"forceNew":true},"vault_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_data_protection_backup_policy_postgresql_flexible_server":{"schema":{"backup_repeating_time_intervals":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"default_retention_rule":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"life_cycle":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"data_store_type":{"type":"TypeString","required":true,"forceNew":true},"duration":{"type":"TypeString","required":true,"forceNew":true}}}}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"retention_rule":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"criteria":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"absolute_criteria":{"type":"TypeString","optional":true,"forceNew":true},"days_of_week":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"months_of_year":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"scheduled_backup_times":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"weeks_of_month":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1}}},"maxItems":1},"life_cycle":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"data_store_type":{"type":"TypeString","required":true,"forceNew":true},"duration":{"type":"TypeString","required":true,"forceNew":true}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","required":true,"forceNew":true}}}},"time_zone":{"type":"TypeString","optional":true,"forceNew":true},"vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_data_protection_backup_vault":{"schema":{"cross_region_restore_enabled":{"type":"TypeBool","optional":true},"datastore_type":{"type":"TypeString","required":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"redundancy":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_duration_in_days":{"type":"TypeFloat","optional":true,"default":14},"soft_delete":{"type":"TypeString","optional":true,"default":"On"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_protection_resource_guard":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"vault_critical_operation_exclusion_list":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_share":{"schema":{"account_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"kind":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"snapshot_schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"recurrence":{"type":"TypeString","required":true},"start_time":{"type":"TypeString","required":true}}},"maxItems":1},"terms":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_share_account":{"schema":{"identity":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_data_share_dataset_blob_storage":{"schema":{"container_name":{"type":"TypeString","required":true,"forceNew":true},"data_share_id":{"type":"TypeString","required":true,"forceNew":true},"display_name":{"type":"TypeString","computed":true},"file_path":{"type":"TypeString","optional":true,"forceNew":true},"folder_path":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"storage_account":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subscription_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1,"minItems":1}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_data_share_dataset_data_lake_gen2":{"schema":{"display_name":{"type":"TypeString","computed":true},"file_path":{"type":"TypeString","optional":true,"forceNew":true},"file_system_name":{"type":"TypeString","required":true,"forceNew":true},"folder_path":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"share_id":{"type":"TypeString","required":true,"forceNew":true},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_data_share_dataset_kusto_cluster":{"schema":{"display_name":{"type":"TypeString","computed":true},"kusto_cluster_id":{"type":"TypeString","required":true,"forceNew":true},"kusto_cluster_location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"share_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_data_share_dataset_kusto_database":{"schema":{"display_name":{"type":"TypeString","computed":true},"kusto_cluster_location":{"type":"TypeString","computed":true},"kusto_database_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"share_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_database_migration_project":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_name":{"type":"TypeString","required":true,"forceNew":true},"source_platform":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"target_platform":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_database_migration_service":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_databox_edge_device":{"schema":{"device_properties":{"type":"TypeList","computed":true,"elem":{"schema":{"capacity":{"type":"TypeInt","computed":true},"configured_role_types":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"culture":{"type":"TypeString","computed":true},"hcs_version":{"type":"TypeString","computed":true},"model":{"type":"TypeString","computed":true},"node_count":{"type":"TypeInt","computed":true},"serial_number":{"type":"TypeString","computed":true},"software_version":{"type":"TypeString","computed":true},"status":{"type":"TypeString","computed":true},"time_zone":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_databricks_access_connector":{"schema":{"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_databricks_virtual_network_peering":{"schema":{"address_space_prefixes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allow_forwarded_traffic":{"type":"TypeBool","optional":true,"default":false},"allow_gateway_transit":{"type":"TypeBool","optional":true,"default":false},"allow_virtual_network_access":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true,"forceNew":true},"remote_address_space_prefixes":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"remote_virtual_network_id":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"use_remote_gateways":{"type":"TypeBool","optional":true,"default":false},"virtual_network_id":{"type":"TypeString","computed":true},"workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_databricks_workspace":{"schema":{"access_connector_id":{"type":"TypeString","optional":true},"custom_parameters":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"machine_learning_workspace_id":{"type":"TypeString","optional":true,"forceNew":true},"nat_gateway_name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"no_public_ip":{"type":"TypeBool","optional":true,"default":true},"private_subnet_name":{"type":"TypeString","optional":true,"forceNew":true},"private_subnet_network_security_group_association_id":{"type":"TypeString","optional":true},"public_ip_name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"public_subnet_name":{"type":"TypeString","optional":true,"forceNew":true},"public_subnet_network_security_group_association_id":{"type":"TypeString","optional":true},"storage_account_name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"storage_account_sku_name":{"type":"TypeString","optional":true,"computed":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vnet_address_prefix":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}}},"maxItems":1},"customer_managed_key_enabled":{"type":"TypeBool","optional":true,"default":false},"default_storage_firewall_enabled":{"type":"TypeBool","optional":true},"disk_encryption_set_id":{"type":"TypeString","computed":true},"infrastructure_encryption_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"load_balancer_backend_address_pool_id":{"type":"TypeString","optional":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_disk_cmk_key_vault_id":{"type":"TypeString","optional":true},"managed_disk_cmk_key_vault_key_id":{"type":"TypeString","optional":true},"managed_disk_cmk_rotation_to_latest_version_enabled":{"type":"TypeBool","optional":true},"managed_disk_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"managed_resource_group_id":{"type":"TypeString","computed":true},"managed_resource_group_name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"managed_services_cmk_key_vault_id":{"type":"TypeString","optional":true},"managed_services_cmk_key_vault_key_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_security_group_rules_required":{"type":"TypeString","optional":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true},"storage_account_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","computed":true},"workspace_url":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_databricks_workspace_customer_managed_key":{"schema":{"key_vault_key_id":{"type":"TypeString","required":true},"workspace_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_databricks_workspace_root_dbfs_customer_managed_key":{"schema":{"key_vault_id":{"type":"TypeString","optional":true},"key_vault_key_id":{"type":"TypeString","required":true},"workspace_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_datadog_monitor":{"schema":{"datadog_organization":{"type":"TypeList","required":true,"elem":{"schema":{"api_key":{"type":"TypeString","required":true,"forceNew":true},"application_key":{"type":"TypeString","required":true,"forceNew":true},"enterprise_app_id":{"type":"TypeString","optional":true,"forceNew":true},"id":{"type":"TypeString","computed":true},"linking_auth_code":{"type":"TypeString","optional":true,"forceNew":true},"linking_client_id":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","computed":true},"redirect_uri":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"marketplace_subscription_status":{"type":"TypeString","computed":true},"monitoring_enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"user":{"type":"TypeList","required":true,"elem":{"schema":{"email":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"phone_number":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_datadog_monitor_sso_configuration":{"schema":{"datadog_monitor_id":{"type":"TypeString","required":true,"forceNew":true},"enterprise_application_id":{"type":"TypeString","required":true},"login_url":{"type":"TypeString","computed":true},"name":{"type":"TypeString","optional":true,"default":"default"},"single_sign_on_enabled":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_datadog_monitor_tag_rule":{"schema":{"datadog_monitor_id":{"type":"TypeString","required":true,"forceNew":true},"log":{"type":"TypeList","optional":true,"elem":{"schema":{"aad_log_enabled":{"type":"TypeBool","optional":true},"filter":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"resource_log_enabled":{"type":"TypeBool","optional":true},"subscription_log_enabled":{"type":"TypeBool","optional":true}}}},"metric":{"type":"TypeList","optional":true,"elem":{"schema":{"filter":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}}}}},"name":{"type":"TypeString","optional":true,"default":"default"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dedicated_hardware_security_module":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"management_network_profile":{"type":"TypeList","optional":true,"elem":{"schema":{"network_interface_private_ip_addresses":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network_profile":{"type":"TypeList","required":true,"elem":{"schema":{"network_interface_private_ip_addresses":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"stamp_id":{"type":"TypeString","optional":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dedicated_host":{"schema":{"auto_replace_on_failure":{"type":"TypeBool","optional":true,"default":true},"dedicated_host_group_id":{"type":"TypeString","required":true,"forceNew":true},"license_type":{"type":"TypeString","optional":true,"default":"None"},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"platform_fault_domain":{"type":"TypeInt","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dedicated_host_group":{"schema":{"automatic_placement_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"platform_fault_domain_count":{"type":"TypeInt","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zone":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_center":{"schema":{"dev_center_uri":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_center_catalog":{"schema":{"catalog_adogit":{"type":"TypeList","optional":true,"elem":{"schema":{"branch":{"type":"TypeString","required":true},"key_vault_key_url":{"type":"TypeString","required":true},"path":{"type":"TypeString","required":true},"uri":{"type":"TypeString","required":true}}},"maxItems":1},"catalog_github":{"type":"TypeList","optional":true,"elem":{"schema":{"branch":{"type":"TypeString","required":true},"key_vault_key_url":{"type":"TypeString","required":true},"path":{"type":"TypeString","required":true},"uri":{"type":"TypeString","required":true}}},"maxItems":1},"dev_center_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_center_dev_box_definition":{"schema":{"dev_center_id":{"type":"TypeString","required":true,"forceNew":true},"image_reference_id":{"type":"TypeString","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_center_environment_type":{"schema":{"dev_center_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_center_gallery":{"schema":{"dev_center_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"shared_gallery_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_dev_center_network_connection":{"schema":{"domain_join_type":{"type":"TypeString","required":true,"forceNew":true},"domain_name":{"type":"TypeString","optional":true},"domain_password":{"type":"TypeString","optional":true},"domain_username":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"organization_unit":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_center_project":{"schema":{"description":{"type":"TypeString","optional":true,"forceNew":true},"dev_center_id":{"type":"TypeString","required":true,"forceNew":true},"dev_center_uri":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"maximum_dev_boxes_per_user":{"type":"TypeInt","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_center_project_environment_type":{"schema":{"creator_role_assignment_roles":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"deployment_target_id":{"type":"TypeString","required":true},"dev_center_project_id":{"type":"TypeString","required":true,"forceNew":true},"identity":{"type":"TypeList","required":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"user_role_assignment":{"type":"TypeSet","optional":true,"elem":{"schema":{"roles":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"user_id":{"type":"TypeString","required":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_test_global_vm_shutdown_schedule":{"schema":{"daily_recurrence_time":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"notification_settings":{"type":"TypeList","required":true,"elem":{"schema":{"email":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","required":true},"time_in_minutes":{"type":"TypeInt","optional":true,"default":30},"webhook_url":{"type":"TypeString","optional":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"timezone":{"type":"TypeString","required":true},"virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_test_lab":{"schema":{"artifacts_storage_account_id":{"type":"TypeString","computed":true},"default_premium_storage_account_id":{"type":"TypeString","computed":true},"default_storage_account_id":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"premium_data_disk_storage_account_id":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"unique_identifier":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_test_linux_virtual_machine":{"schema":{"allow_claim":{"type":"TypeBool","optional":true,"default":true},"disallow_public_ip_address":{"type":"TypeBool","optional":true,"forceNew":true},"fqdn":{"type":"TypeString","computed":true},"gallery_image_reference":{"type":"TypeList","required":true,"elem":{"schema":{"offer":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"inbound_nat_rule":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"backend_port":{"type":"TypeInt","required":true,"forceNew":true},"frontend_port":{"type":"TypeInt","computed":true},"protocol":{"type":"TypeString","required":true}}}},"lab_name":{"type":"TypeString","required":true,"forceNew":true},"lab_subnet_name":{"type":"TypeString","required":true,"forceNew":true},"lab_virtual_network_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"notes":{"type":"TypeString","optional":true},"password":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"size":{"type":"TypeString","required":true,"forceNew":true},"ssh_key":{"type":"TypeString","optional":true,"forceNew":true},"storage_type":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"unique_identifier":{"type":"TypeString","computed":true},"username":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_test_policy":{"schema":{"description":{"type":"TypeString","optional":true},"evaluator_type":{"type":"TypeString","required":true,"forceNew":true},"fact_data":{"type":"TypeString","optional":true},"lab_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"policy_set_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"threshold":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_test_schedule":{"schema":{"daily_recurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"time":{"type":"TypeString","required":true}}},"maxItems":1},"hourly_recurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"minute":{"type":"TypeInt","required":true}}},"maxItems":1},"lab_name":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"notification_settings":{"type":"TypeList","required":true,"elem":{"schema":{"status":{"type":"TypeString","optional":true,"default":"Disabled"},"time_in_minutes":{"type":"TypeInt","optional":true},"webhook_url":{"type":"TypeString","optional":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"status":{"type":"TypeString","optional":true,"default":"Disabled"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"task_type":{"type":"TypeString","required":true},"time_zone_id":{"type":"TypeString","required":true},"weekly_recurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"time":{"type":"TypeString","required":true},"week_days":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_test_virtual_network":{"schema":{"description":{"type":"TypeString","optional":true},"lab_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subnet":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"shared_public_ip_address":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_ports":{"type":"TypeList","optional":true,"elem":{"schema":{"backend_port":{"type":"TypeInt","optional":true},"transport_protocol":{"type":"TypeString","optional":true}}}}}},"maxItems":1},"use_in_virtual_machine_creation":{"type":"TypeString","optional":true,"default":"Allow"},"use_public_ip_address":{"type":"TypeString","optional":true,"default":"Allow"}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"unique_identifier":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dev_test_windows_virtual_machine":{"schema":{"allow_claim":{"type":"TypeBool","optional":true,"default":true},"disallow_public_ip_address":{"type":"TypeBool","optional":true,"forceNew":true},"fqdn":{"type":"TypeString","computed":true},"gallery_image_reference":{"type":"TypeList","required":true,"elem":{"schema":{"offer":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"inbound_nat_rule":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"backend_port":{"type":"TypeInt","required":true,"forceNew":true},"frontend_port":{"type":"TypeInt","computed":true},"protocol":{"type":"TypeString","required":true}}}},"lab_name":{"type":"TypeString","required":true,"forceNew":true},"lab_subnet_name":{"type":"TypeString","required":true,"forceNew":true},"lab_virtual_network_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"notes":{"type":"TypeString","optional":true},"password":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"size":{"type":"TypeString","required":true,"forceNew":true},"storage_type":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"unique_identifier":{"type":"TypeString","computed":true},"username":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_digital_twins_endpoint_eventgrid":{"schema":{"dead_letter_storage_secret":{"type":"TypeString","optional":true},"digital_twins_id":{"type":"TypeString","required":true,"forceNew":true},"eventgrid_topic_endpoint":{"type":"TypeString","required":true},"eventgrid_topic_primary_access_key":{"type":"TypeString","required":true},"eventgrid_topic_secondary_access_key":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_digital_twins_endpoint_eventhub":{"schema":{"dead_letter_storage_secret":{"type":"TypeString","optional":true},"digital_twins_id":{"type":"TypeString","required":true,"forceNew":true},"eventhub_primary_connection_string":{"type":"TypeString","required":true},"eventhub_secondary_connection_string":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_digital_twins_endpoint_servicebus":{"schema":{"dead_letter_storage_secret":{"type":"TypeString","optional":true},"digital_twins_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"servicebus_primary_connection_string":{"type":"TypeString","required":true},"servicebus_secondary_connection_string":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_digital_twins_instance":{"schema":{"host_name":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_digital_twins_time_series_database_connection":{"schema":{"digital_twins_id":{"type":"TypeString","required":true,"forceNew":true},"eventhub_consumer_group_name":{"type":"TypeString","optional":true,"default":"$Default","forceNew":true},"eventhub_name":{"type":"TypeString","required":true,"forceNew":true},"eventhub_namespace_endpoint_uri":{"type":"TypeString","required":true,"forceNew":true},"eventhub_namespace_id":{"type":"TypeString","required":true,"forceNew":true},"kusto_cluster_id":{"type":"TypeString","required":true,"forceNew":true},"kusto_cluster_uri":{"type":"TypeString","required":true,"forceNew":true},"kusto_database_name":{"type":"TypeString","required":true,"forceNew":true},"kusto_table_name":{"type":"TypeString","optional":true,"default":"AdtPropertyEvents","forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_disk_access":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_disk_encryption_set":{"schema":{"auto_key_rotation_enabled":{"type":"TypeBool","optional":true,"default":false},"encryption_type":{"type":"TypeString","optional":true,"default":"EncryptionAtRestWithCustomerKey","forceNew":true},"federated_client_id":{"type":"TypeString","optional":true},"identity":{"type":"TypeList","required":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_key_id":{"type":"TypeString","optional":true},"key_vault_key_url":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_hsm_key_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_dns_a_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"records":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"target_resource_id":{"type":"TypeString","optional":true},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dns_aaaa_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"records":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"target_resource_id":{"type":"TypeString","optional":true},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dns_caa_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"record":{"type":"TypeSet","required":true,"elem":{"schema":{"flags":{"type":"TypeInt","required":true},"tag":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dns_cname_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"record":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"target_resource_id":{"type":"TypeString","optional":true},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dns_mx_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","optional":true,"default":"@","forceNew":true},"record":{"type":"TypeSet","required":true,"elem":{"schema":{"exchange":{"type":"TypeString","required":true},"preference":{"type":"TypeString","required":true}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dns_ns_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"records":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dns_ptr_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"records":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dns_srv_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"record":{"type":"TypeSet","required":true,"elem":{"schema":{"port":{"type":"TypeInt","required":true},"priority":{"type":"TypeInt","required":true},"target":{"type":"TypeString","required":true},"weight":{"type":"TypeInt","required":true}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dns_txt_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"record":{"type":"TypeSet","required":true,"elem":{"schema":{"value":{"type":"TypeString","required":true}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_dns_zone":{"schema":{"max_number_of_record_sets":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"name_servers":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"number_of_record_sets":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"soa_record":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"email":{"type":"TypeString","required":true},"expire_time":{"type":"TypeInt","optional":true,"default":2419200},"fqdn":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","computed":true},"minimum_ttl":{"type":"TypeInt","optional":true,"default":300},"refresh_time":{"type":"TypeInt","optional":true,"default":3600},"retry_time":{"type":"TypeInt","optional":true,"default":300},"serial_number":{"type":"TypeInt","optional":true,"default":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","optional":true,"default":3600}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_elastic_cloud_elasticsearch":{"schema":{"elastic_cloud_deployment_id":{"type":"TypeString","computed":true},"elastic_cloud_email_address":{"type":"TypeString","required":true,"forceNew":true},"elastic_cloud_sso_default_url":{"type":"TypeString","computed":true},"elastic_cloud_user_id":{"type":"TypeString","computed":true},"elasticsearch_service_url":{"type":"TypeString","computed":true},"kibana_service_url":{"type":"TypeString","computed":true},"kibana_sso_uri":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"logs":{"type":"TypeList","optional":true,"elem":{"schema":{"filtering_tag":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"send_activity_logs":{"type":"TypeBool","optional":true,"default":false},"send_azuread_logs":{"type":"TypeBool","optional":true,"default":false},"send_subscription_logs":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"monitoring_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_elastic_san":{"schema":{"base_size_in_tib":{"type":"TypeInt","required":true},"extended_size_in_tib":{"type":"TypeInt","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"tier":{"type":"TypeString","optional":true,"default":"Premium"}}},"maxItems":1,"minItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"total_iops":{"type":"TypeInt","computed":true},"total_mbps":{"type":"TypeInt","computed":true},"total_size_in_tib":{"type":"TypeInt","computed":true},"total_volume_size_in_gib":{"type":"TypeInt","computed":true},"volume_group_count":{"type":"TypeInt","computed":true},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_elastic_san_volume":{"schema":{"create_source":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"source_id":{"type":"TypeString","required":true,"forceNew":true},"source_type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"size_in_gib":{"type":"TypeInt","required":true},"target_iqn":{"type":"TypeString","computed":true},"target_portal_hostname":{"type":"TypeString","computed":true},"target_portal_port":{"type":"TypeInt","computed":true},"volume_group_id":{"type":"TypeString","required":true,"forceNew":true},"volume_id":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_elastic_san_volume_group":{"schema":{"elastic_san_id":{"type":"TypeString","required":true,"forceNew":true},"encryption":{"type":"TypeList","optional":true,"elem":{"schema":{"current_versioned_key_expiration_timestamp":{"type":"TypeString","computed":true},"current_versioned_key_id":{"type":"TypeString","computed":true},"key_vault_key_id":{"type":"TypeString","required":true},"last_key_rotation_timestamp":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","optional":true}}},"maxItems":1},"encryption_type":{"type":"TypeString","optional":true,"default":"EncryptionAtRestWithPlatformKey"},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"subnet_id":{"type":"TypeString","required":true}}},"minItems":1},"protocol_type":{"type":"TypeString","optional":true,"default":"Iscsi"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_email_communication_service":{"schema":{"data_location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_email_communication_service_domain":{"schema":{"domain_management":{"type":"TypeString","required":true,"forceNew":true},"email_service_id":{"type":"TypeString","required":true,"forceNew":true},"from_sender_domain":{"type":"TypeString","computed":true},"mail_from_sender_domain":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"user_engagement_tracking_enabled":{"type":"TypeBool","optional":true},"verification_records":{"type":"TypeList","computed":true,"elem":{"schema":{"dkim":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"ttl":{"type":"TypeInt","computed":true},"type":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"dkim2":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"ttl":{"type":"TypeInt","computed":true},"type":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"dmarc":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"ttl":{"type":"TypeInt","computed":true},"type":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"domain":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"ttl":{"type":"TypeInt","computed":true},"type":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"spf":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"ttl":{"type":"TypeInt","computed":true},"type":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventgrid_domain":{"schema":{"auto_create_topic_with_first_subscription":{"type":"TypeBool","optional":true,"default":true},"auto_delete_topic_with_last_subscription":{"type":"TypeBool","optional":true,"default":true},"endpoint":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"inbound_ip_rule":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"ip_mask":{"type":"TypeString","required":true}}},"maxItems":128},"input_mapping_default_values":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"data_version":{"type":"TypeString","optional":true,"forceNew":true},"event_type":{"type":"TypeString","optional":true,"forceNew":true},"subject":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"input_mapping_fields":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"data_version":{"type":"TypeString","optional":true,"forceNew":true},"event_time":{"type":"TypeString","optional":true,"forceNew":true},"event_type":{"type":"TypeString","optional":true,"forceNew":true},"id":{"type":"TypeString","optional":true,"forceNew":true},"subject":{"type":"TypeString","optional":true,"forceNew":true},"topic":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"input_schema":{"type":"TypeString","optional":true,"default":"EventGridSchema","forceNew":true},"local_auth_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_access_key":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_access_key":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventgrid_domain_topic":{"schema":{"domain_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_eventgrid_event_subscription":{"schema":{"advanced_filter":{"type":"TypeList","optional":true,"elem":{"schema":{"bool_equals":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"value":{"type":"TypeBool","required":true}}}},"is_not_null":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true}}}},"is_null_or_undefined":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true}}}},"number_greater_than":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"value":{"type":"TypeFloat","required":true}}}},"number_greater_than_or_equals":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"value":{"type":"TypeFloat","required":true}}}},"number_in":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeFloat"},"maxItems":25}}}},"number_in_range":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeList","elem":{"type":"TypeFloat"},"maxItems":2,"minItems":2},"maxItems":25}}}},"number_less_than":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"value":{"type":"TypeFloat","required":true}}}},"number_less_than_or_equals":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"value":{"type":"TypeFloat","required":true}}}},"number_not_in":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeFloat"},"maxItems":25}}}},"number_not_in_range":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeList","elem":{"type":"TypeFloat"},"maxItems":2,"minItems":2},"maxItems":25}}}},"string_begins_with":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_contains":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_ends_with":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_in":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_not_begins_with":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_not_contains":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_not_ends_with":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_not_in":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}}}},"maxItems":1},"advanced_filtering_on_arrays_enabled":{"type":"TypeBool","optional":true,"default":false},"azure_function_endpoint":{"type":"TypeList","optional":true,"elem":{"schema":{"function_id":{"type":"TypeString","required":true},"max_events_per_batch":{"type":"TypeInt","optional":true},"preferred_batch_size_in_kilobytes":{"type":"TypeInt","optional":true}}},"maxItems":1},"dead_letter_identity":{"type":"TypeList","optional":true,"elem":{"schema":{"type":{"type":"TypeString","required":true},"user_assigned_identity":{"type":"TypeString","optional":true}}},"maxItems":1},"delivery_identity":{"type":"TypeList","optional":true,"elem":{"schema":{"type":{"type":"TypeString","required":true},"user_assigned_identity":{"type":"TypeString","optional":true}}},"maxItems":1},"delivery_property":{"type":"TypeList","optional":true,"elem":{"schema":{"header_name":{"type":"TypeString","required":true},"secret":{"type":"TypeBool","optional":true},"source_field":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"value":{"type":"TypeString","optional":true}}}},"event_delivery_schema":{"type":"TypeString","optional":true,"default":"EventGridSchema","forceNew":true},"eventhub_endpoint_id":{"type":"TypeString","optional":true,"computed":true},"expiration_time_utc":{"type":"TypeString","optional":true},"hybrid_connection_endpoint_id":{"type":"TypeString","optional":true,"computed":true},"included_event_types":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"labels":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"retry_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"event_time_to_live":{"type":"TypeInt","required":true},"max_delivery_attempts":{"type":"TypeInt","required":true}}},"maxItems":1},"scope":{"type":"TypeString","required":true,"forceNew":true},"service_bus_queue_endpoint_id":{"type":"TypeString","optional":true},"service_bus_topic_endpoint_id":{"type":"TypeString","optional":true},"storage_blob_dead_letter_destination":{"type":"TypeList","optional":true,"elem":{"schema":{"storage_account_id":{"type":"TypeString","required":true},"storage_blob_container_name":{"type":"TypeString","required":true}}},"maxItems":1},"storage_queue_endpoint":{"type":"TypeList","optional":true,"elem":{"schema":{"queue_message_time_to_live_in_seconds":{"type":"TypeInt","optional":true},"queue_name":{"type":"TypeString","required":true},"storage_account_id":{"type":"TypeString","required":true}}},"maxItems":1},"subject_filter":{"type":"TypeList","optional":true,"elem":{"schema":{"case_sensitive":{"type":"TypeBool","optional":true},"subject_begins_with":{"type":"TypeString","optional":true},"subject_ends_with":{"type":"TypeString","optional":true}}},"maxItems":1},"webhook_endpoint":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory_app_id_or_uri":{"type":"TypeString","optional":true},"active_directory_tenant_id":{"type":"TypeString","optional":true},"base_url":{"type":"TypeString","computed":true},"max_events_per_batch":{"type":"TypeInt","optional":true},"preferred_batch_size_in_kilobytes":{"type":"TypeInt","optional":true},"url":{"type":"TypeString","required":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventgrid_system_topic":{"schema":{"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"metric_arm_resource_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source_arm_resource_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"topic_type":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventgrid_system_topic_event_subscription":{"schema":{"advanced_filter":{"type":"TypeList","optional":true,"elem":{"schema":{"bool_equals":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"value":{"type":"TypeBool","required":true}}}},"is_not_null":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true}}}},"is_null_or_undefined":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true}}}},"number_greater_than":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"value":{"type":"TypeFloat","required":true}}}},"number_greater_than_or_equals":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"value":{"type":"TypeFloat","required":true}}}},"number_in":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeFloat"},"maxItems":25}}}},"number_in_range":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeList","elem":{"type":"TypeFloat"},"maxItems":2,"minItems":2},"maxItems":25}}}},"number_less_than":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"value":{"type":"TypeFloat","required":true}}}},"number_less_than_or_equals":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"value":{"type":"TypeFloat","required":true}}}},"number_not_in":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeFloat"},"maxItems":25}}}},"number_not_in_range":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeList","elem":{"type":"TypeFloat"},"maxItems":2,"minItems":2},"maxItems":25}}}},"string_begins_with":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_contains":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_ends_with":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_in":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_not_begins_with":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_not_contains":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_not_ends_with":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}},"string_not_in":{"type":"TypeList","optional":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25}}}}}},"maxItems":1},"advanced_filtering_on_arrays_enabled":{"type":"TypeBool","optional":true,"default":false},"azure_function_endpoint":{"type":"TypeList","optional":true,"elem":{"schema":{"function_id":{"type":"TypeString","required":true},"max_events_per_batch":{"type":"TypeInt","optional":true},"preferred_batch_size_in_kilobytes":{"type":"TypeInt","optional":true}}},"maxItems":1},"dead_letter_identity":{"type":"TypeList","optional":true,"elem":{"schema":{"type":{"type":"TypeString","required":true},"user_assigned_identity":{"type":"TypeString","optional":true}}},"maxItems":1},"delivery_identity":{"type":"TypeList","optional":true,"elem":{"schema":{"type":{"type":"TypeString","required":true},"user_assigned_identity":{"type":"TypeString","optional":true}}},"maxItems":1},"delivery_property":{"type":"TypeList","optional":true,"elem":{"schema":{"header_name":{"type":"TypeString","required":true},"secret":{"type":"TypeBool","optional":true},"source_field":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"value":{"type":"TypeString","optional":true}}}},"event_delivery_schema":{"type":"TypeString","optional":true,"default":"EventGridSchema","forceNew":true},"eventhub_endpoint_id":{"type":"TypeString","optional":true,"computed":true},"expiration_time_utc":{"type":"TypeString","optional":true},"hybrid_connection_endpoint_id":{"type":"TypeString","optional":true,"computed":true},"included_event_types":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"labels":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retry_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"event_time_to_live":{"type":"TypeInt","required":true},"max_delivery_attempts":{"type":"TypeInt","required":true}}},"maxItems":1},"service_bus_queue_endpoint_id":{"type":"TypeString","optional":true},"service_bus_topic_endpoint_id":{"type":"TypeString","optional":true},"storage_blob_dead_letter_destination":{"type":"TypeList","optional":true,"elem":{"schema":{"storage_account_id":{"type":"TypeString","required":true},"storage_blob_container_name":{"type":"TypeString","required":true}}},"maxItems":1},"storage_queue_endpoint":{"type":"TypeList","optional":true,"elem":{"schema":{"queue_message_time_to_live_in_seconds":{"type":"TypeInt","optional":true},"queue_name":{"type":"TypeString","required":true},"storage_account_id":{"type":"TypeString","required":true}}},"maxItems":1},"subject_filter":{"type":"TypeList","optional":true,"elem":{"schema":{"case_sensitive":{"type":"TypeBool","optional":true},"subject_begins_with":{"type":"TypeString","optional":true},"subject_ends_with":{"type":"TypeString","optional":true}}},"maxItems":1},"system_topic":{"type":"TypeString","required":true,"forceNew":true},"webhook_endpoint":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory_app_id_or_uri":{"type":"TypeString","optional":true},"active_directory_tenant_id":{"type":"TypeString","optional":true},"base_url":{"type":"TypeString","computed":true},"max_events_per_batch":{"type":"TypeInt","optional":true},"preferred_batch_size_in_kilobytes":{"type":"TypeInt","optional":true},"url":{"type":"TypeString","required":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventgrid_topic":{"schema":{"endpoint":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"inbound_ip_rule":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"ip_mask":{"type":"TypeString","required":true}}},"maxItems":128},"input_mapping_default_values":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"data_version":{"type":"TypeString","optional":true,"forceNew":true},"event_type":{"type":"TypeString","optional":true,"forceNew":true},"subject":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"input_mapping_fields":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"data_version":{"type":"TypeString","optional":true,"forceNew":true},"event_time":{"type":"TypeString","optional":true,"forceNew":true},"event_type":{"type":"TypeString","optional":true,"forceNew":true},"id":{"type":"TypeString","optional":true,"forceNew":true},"subject":{"type":"TypeString","optional":true,"forceNew":true},"topic":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"input_schema":{"type":"TypeString","optional":true,"default":"EventGridSchema","forceNew":true},"local_auth_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_access_key":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_access_key":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventhub":{"schema":{"capture_description":{"type":"TypeList","optional":true,"elem":{"schema":{"destination":{"type":"TypeList","required":true,"elem":{"schema":{"archive_name_format":{"type":"TypeString","required":true},"blob_container_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"storage_account_id":{"type":"TypeString","required":true}}},"maxItems":1},"enabled":{"type":"TypeBool","required":true},"encoding":{"type":"TypeString","required":true},"interval_in_seconds":{"type":"TypeInt","optional":true,"default":300},"size_limit_in_bytes":{"type":"TypeInt","optional":true,"default":314572800},"skip_empty_archives":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"message_retention":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_name":{"type":"TypeString","required":true,"forceNew":true},"partition_count":{"type":"TypeInt","required":true},"partition_ids":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"status":{"type":"TypeString","optional":true,"default":"Active"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventhub_authorization_rule":{"schema":{"eventhub_name":{"type":"TypeString","required":true,"forceNew":true},"listen":{"type":"TypeBool","optional":true,"default":false},"manage":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_name":{"type":"TypeString","required":true,"forceNew":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_connection_string_alias":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_connection_string_alias":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"send":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventhub_cluster":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":300,"update":30}},"azurerm_eventhub_consumer_group":{"schema":{"eventhub_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"user_metadata":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventhub_namespace":{"schema":{"auto_inflate_enabled":{"type":"TypeBool","optional":true,"default":false},"capacity":{"type":"TypeInt","optional":true,"default":1},"dedicated_cluster_id":{"type":"TypeString","optional":true,"forceNew":true},"default_primary_connection_string":{"type":"TypeString","computed":true},"default_primary_connection_string_alias":{"type":"TypeString","computed":true},"default_primary_key":{"type":"TypeString","computed":true},"default_secondary_connection_string":{"type":"TypeString","computed":true},"default_secondary_connection_string_alias":{"type":"TypeString","computed":true},"default_secondary_key":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"local_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"maximum_throughput_units":{"type":"TypeInt","optional":true},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"name":{"type":"TypeString","required":true,"forceNew":true},"network_rulesets":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"default_action":{"type":"TypeString","required":true},"ip_rule":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"ip_mask":{"type":"TypeString","required":true}}},"maxItems":128},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"trusted_service_access_enabled":{"type":"TypeBool","optional":true},"virtual_network_rule":{"type":"TypeSet","configMode":"Auto","optional":true,"elem":{"schema":{"ignore_missing_virtual_network_service_endpoint":{"type":"TypeBool","optional":true},"subnet_id":{"type":"TypeString","required":true}}},"maxItems":128}}},"maxItems":1},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventhub_namespace_authorization_rule":{"schema":{"listen":{"type":"TypeBool","optional":true,"default":false},"manage":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_name":{"type":"TypeString","required":true,"forceNew":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_connection_string_alias":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_connection_string_alias":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"send":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventhub_namespace_customer_managed_key":{"schema":{"eventhub_namespace_id":{"type":"TypeString","required":true,"forceNew":true},"infrastructure_encryption_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"key_vault_key_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"user_assigned_identity_id":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventhub_namespace_disaster_recovery_config":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_name":{"type":"TypeString","required":true,"forceNew":true},"partner_namespace_id":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_eventhub_namespace_schema_group":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_id":{"type":"TypeString","required":true,"forceNew":true},"schema_compatibility":{"type":"TypeString","required":true,"forceNew":true},"schema_type":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_express_route_circuit":{"schema":{"allow_classic_operations":{"type":"TypeBool","optional":true,"default":false},"authorization_key":{"type":"TypeString","optional":true},"bandwidth_in_gbps":{"type":"TypeFloat","optional":true},"bandwidth_in_mbps":{"type":"TypeInt","optional":true},"express_route_port_id":{"type":"TypeString","optional":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"peering_location":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_key":{"type":"TypeString","computed":true},"service_provider_name":{"type":"TypeString","optional":true,"forceNew":true},"service_provider_provisioning_state":{"type":"TypeString","computed":true},"sku":{"type":"TypeList","required":true,"elem":{"schema":{"family":{"type":"TypeString","required":true},"tier":{"type":"TypeString","required":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_express_route_circuit_authorization":{"schema":{"authorization_key":{"type":"TypeString","computed":true},"authorization_use_status":{"type":"TypeString","computed":true},"express_route_circuit_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_express_route_circuit_connection":{"schema":{"address_prefix_ipv4":{"type":"TypeString","required":true,"forceNew":true},"address_prefix_ipv6":{"type":"TypeString","optional":true},"authorization_key":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"peer_peering_id":{"type":"TypeString","required":true,"forceNew":true},"peering_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_express_route_circuit_peering":{"schema":{"azure_asn":{"type":"TypeInt","computed":true},"express_route_circuit_name":{"type":"TypeString","required":true,"forceNew":true},"gateway_manager_etag":{"type":"TypeString","computed":true},"ipv4_enabled":{"type":"TypeBool","optional":true,"default":true},"ipv6":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"microsoft_peering":{"type":"TypeList","optional":true,"elem":{"schema":{"advertised_communities":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"advertised_public_prefixes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"customer_asn":{"type":"TypeInt","optional":true,"default":0},"routing_registry_name":{"type":"TypeString","optional":true,"default":"NONE"}}},"maxItems":1},"primary_peer_address_prefix":{"type":"TypeString","required":true},"route_filter_id":{"type":"TypeString","optional":true},"secondary_peer_address_prefix":{"type":"TypeString","required":true}}},"maxItems":1},"microsoft_peering_config":{"type":"TypeList","optional":true,"elem":{"schema":{"advertised_communities":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"advertised_public_prefixes":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"customer_asn":{"type":"TypeInt","optional":true,"default":0},"routing_registry_name":{"type":"TypeString","optional":true,"default":"NONE"}}},"maxItems":1},"peer_asn":{"type":"TypeInt","optional":true,"computed":true},"peering_type":{"type":"TypeString","required":true},"primary_azure_port":{"type":"TypeString","computed":true},"primary_peer_address_prefix":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"route_filter_id":{"type":"TypeString","optional":true},"secondary_azure_port":{"type":"TypeString","computed":true},"secondary_peer_address_prefix":{"type":"TypeString","optional":true},"shared_key":{"type":"TypeString","optional":true},"vlan_id":{"type":"TypeInt","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_express_route_connection":{"schema":{"authorization_key":{"type":"TypeString","optional":true},"enable_internet_security":{"type":"TypeBool","optional":true},"express_route_circuit_peering_id":{"type":"TypeString","required":true,"forceNew":true},"express_route_gateway_bypass_enabled":{"type":"TypeBool","optional":true,"default":false},"express_route_gateway_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_link_fast_path_enabled":{"type":"TypeBool","optional":true},"routing":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"associated_route_table_id":{"type":"TypeString","optional":true,"computed":true},"inbound_route_map_id":{"type":"TypeString","optional":true},"outbound_route_map_id":{"type":"TypeString","optional":true},"propagated_route_table":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"labels":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"route_table_ids":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}},"maxItems":1},"routing_weight":{"type":"TypeInt","optional":true,"default":0}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_express_route_gateway":{"schema":{"allow_non_virtual_wan_traffic":{"type":"TypeBool","optional":true,"default":false},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scale_units":{"type":"TypeInt","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_hub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_express_route_port":{"schema":{"bandwidth_in_gbps":{"type":"TypeInt","required":true,"forceNew":true},"billing_type":{"type":"TypeString","optional":true,"default":"MeteredData"},"encapsulation":{"type":"TypeString","required":true,"forceNew":true},"ethertype":{"type":"TypeString","computed":true},"guid":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"link1":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"admin_enabled":{"type":"TypeBool","optional":true,"default":false},"connector_type":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"interface_name":{"type":"TypeString","computed":true},"macsec_cak_keyvault_secret_id":{"type":"TypeString","optional":true},"macsec_cipher":{"type":"TypeString","optional":true,"default":"GcmAes128"},"macsec_ckn_keyvault_secret_id":{"type":"TypeString","optional":true},"macsec_sci_enabled":{"type":"TypeBool","optional":true,"default":false},"patch_panel_id":{"type":"TypeString","computed":true},"rack_id":{"type":"TypeString","computed":true},"router_name":{"type":"TypeString","computed":true}}},"maxItems":1,"minItems":1},"link2":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"admin_enabled":{"type":"TypeBool","optional":true,"default":false},"connector_type":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"interface_name":{"type":"TypeString","computed":true},"macsec_cak_keyvault_secret_id":{"type":"TypeString","optional":true},"macsec_cipher":{"type":"TypeString","optional":true,"default":"GcmAes128"},"macsec_ckn_keyvault_secret_id":{"type":"TypeString","optional":true},"macsec_sci_enabled":{"type":"TypeBool","optional":true,"default":false},"patch_panel_id":{"type":"TypeString","computed":true},"rack_id":{"type":"TypeString","computed":true},"router_name":{"type":"TypeString","computed":true}}},"maxItems":1,"minItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"mtu":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"peering_location":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_express_route_port_authorization":{"schema":{"authorization_key":{"type":"TypeString","computed":true},"authorization_use_status":{"type":"TypeString","computed":true},"express_route_port_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_extended_custom_location":{"schema":{"authentication":{"type":"TypeList","optional":true,"elem":{"schema":{"type":{"type":"TypeString","optional":true},"value":{"type":"TypeString","required":true}}},"maxItems":1},"cluster_extension_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"display_name":{"type":"TypeString","optional":true,"forceNew":true},"host_resource_id":{"type":"TypeString","required":true,"forceNew":true},"host_type":{"type":"TypeString","optional":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_federated_identity_credential":{"schema":{"audience":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":1},"issuer":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parent_id":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subject":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_firewall":{"schema":{"dns_proxy_enabled":{"type":"TypeBool","optional":true,"computed":true},"dns_servers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"firewall_policy_id":{"type":"TypeString","optional":true},"ip_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"private_ip_address":{"type":"TypeString","computed":true},"public_ip_address_id":{"type":"TypeString","optional":true},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"management_ip_configuration":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"private_ip_address":{"type":"TypeString","computed":true},"public_ip_address_id":{"type":"TypeString","required":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"private_ip_ranges":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"sku_tier":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"threat_intel_mode":{"type":"TypeString","optional":true,"computed":true},"virtual_hub":{"type":"TypeList","optional":true,"elem":{"schema":{"private_ip_address":{"type":"TypeString","computed":true},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"public_ip_count":{"type":"TypeInt","optional":true,"default":1},"virtual_hub_id":{"type":"TypeString","required":true}}},"maxItems":1},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_firewall_application_rule_collection":{"schema":{"action":{"type":"TypeString","required":true},"azure_firewall_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rule":{"type":"TypeList","required":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"fqdn_tags":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"protocol":{"type":"TypeList","optional":true,"elem":{"schema":{"port":{"type":"TypeInt","required":true},"type":{"type":"TypeString","required":true}}},"minItems":1},"source_addresses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"source_ip_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"target_fqdns":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"minItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_firewall_nat_rule_collection":{"schema":{"action":{"type":"TypeString","required":true},"azure_firewall_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rule":{"type":"TypeList","required":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"destination_addresses":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"destination_ports":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"protocols":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"source_addresses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"source_ip_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"translated_address":{"type":"TypeString","required":true},"translated_port":{"type":"TypeString","required":true}}},"minItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_firewall_network_rule_collection":{"schema":{"action":{"type":"TypeString","required":true},"azure_firewall_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rule":{"type":"TypeList","required":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"destination_addresses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"destination_fqdns":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"destination_ip_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"destination_ports":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"protocols":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"source_addresses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"source_ip_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"minItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_firewall_policy":{"schema":{"auto_learn_private_ranges_enabled":{"type":"TypeBool","optional":true},"base_policy_id":{"type":"TypeString","optional":true},"child_policies":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"dns":{"type":"TypeList","optional":true,"elem":{"schema":{"proxy_enabled":{"type":"TypeBool","optional":true,"default":false},"servers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1,"minItems":1},"explicit_proxy":{"type":"TypeList","optional":true,"elem":{"schema":{"enable_pac_file":{"type":"TypeBool","optional":true},"enabled":{"type":"TypeBool","optional":true},"http_port":{"type":"TypeInt","optional":true},"https_port":{"type":"TypeInt","optional":true},"pac_file":{"type":"TypeString","optional":true},"pac_file_port":{"type":"TypeInt","optional":true}}},"maxItems":1},"firewalls":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"insights":{"type":"TypeList","optional":true,"elem":{"schema":{"default_log_analytics_workspace_id":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","required":true},"log_analytics_workspace":{"type":"TypeList","optional":true,"elem":{"schema":{"firewall_location":{"type":"TypeString","required":true},"id":{"type":"TypeString","required":true}}}},"retention_in_days":{"type":"TypeInt","optional":true}}},"maxItems":1},"intrusion_detection":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","optional":true},"private_ranges":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"signature_overrides":{"type":"TypeList","optional":true,"elem":{"schema":{"id":{"type":"TypeString","optional":true},"state":{"type":"TypeString","optional":true}}}},"traffic_bypass":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"destination_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"destination_ip_groups":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"destination_ports":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"protocol":{"type":"TypeString","required":true},"source_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"source_ip_groups":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_ip_ranges":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rule_collection_groups":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"sku":{"type":"TypeString","optional":true,"default":"Standard","forceNew":true},"sql_redirect_allowed":{"type":"TypeBool","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"threat_intelligence_allowlist":{"type":"TypeList","optional":true,"elem":{"schema":{"fqdns":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"ip_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1,"minItems":1},"threat_intelligence_mode":{"type":"TypeString","optional":true,"default":"Alert"},"tls_certificate":{"type":"TypeList","optional":true,"elem":{"schema":{"key_vault_secret_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}},"maxItems":1,"minItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_firewall_policy_rule_collection_group":{"schema":{"application_rule_collection":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"priority":{"type":"TypeInt","required":true},"rule":{"type":"TypeList","required":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"destination_addresses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"destination_fqdn_tags":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"destination_fqdns":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"destination_urls":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"http_headers":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"name":{"type":"TypeString","required":true},"protocols":{"type":"TypeList","optional":true,"elem":{"schema":{"port":{"type":"TypeInt","required":true},"type":{"type":"TypeString","required":true}}}},"source_addresses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"source_ip_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"terminate_tls":{"type":"TypeBool","optional":true},"web_categories":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"minItems":1}}},"minItems":1},"firewall_policy_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"nat_rule_collection":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"priority":{"type":"TypeInt","required":true},"rule":{"type":"TypeList","required":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"destination_address":{"type":"TypeString","optional":true},"destination_ports":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"name":{"type":"TypeString","required":true},"protocols":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"source_addresses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"source_ip_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"translated_address":{"type":"TypeString","optional":true},"translated_fqdn":{"type":"TypeString","optional":true},"translated_port":{"type":"TypeInt","required":true}}},"minItems":1}}},"minItems":1},"network_rule_collection":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"priority":{"type":"TypeInt","required":true},"rule":{"type":"TypeList","required":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"destination_addresses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"destination_fqdns":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"destination_ip_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"destination_ports":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"protocols":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"source_addresses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"source_ip_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"minItems":1}}},"minItems":1},"priority":{"type":"TypeInt","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_fluid_relay_server":{"schema":{"frs_tenant_id":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"orderer_endpoints":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_key":{"type":"TypeString","computed":true},"service_endpoints":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"storage_endpoints":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"storage_sku":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":10,"update":10}},"azurerm_frontdoor":{"schema":{"backend_pool":{"type":"TypeList","required":true,"elem":{"schema":{"backend":{"type":"TypeList","required":true,"elem":{"schema":{"address":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"host_header":{"type":"TypeString","required":true},"http_port":{"type":"TypeInt","required":true},"https_port":{"type":"TypeInt","required":true},"priority":{"type":"TypeInt","optional":true,"default":1},"weight":{"type":"TypeInt","optional":true,"default":50}}},"maxItems":500},"health_probe_name":{"type":"TypeString","required":true},"id":{"type":"TypeString","computed":true},"load_balancing_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}},"backend_pool_health_probe":{"type":"TypeList","required":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"id":{"type":"TypeString","computed":true},"interval_in_seconds":{"type":"TypeInt","optional":true,"default":120},"name":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true,"default":"/"},"probe_method":{"type":"TypeString","optional":true,"default":"GET"},"protocol":{"type":"TypeString","optional":true,"default":"Http"}}},"maxItems":5000},"backend_pool_health_probes":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"backend_pool_load_balancing":{"type":"TypeList","required":true,"elem":{"schema":{"additional_latency_milliseconds":{"type":"TypeInt","optional":true,"default":0},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"sample_size":{"type":"TypeInt","optional":true,"default":4},"successful_samples_required":{"type":"TypeInt","optional":true,"default":2}}},"maxItems":5000},"backend_pool_load_balancing_settings":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"backend_pool_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"backend_pools_send_receive_timeout_seconds":{"type":"TypeInt","optional":true,"default":60},"enforce_backend_pools_certificate_name_check":{"type":"TypeBool","required":true}}}},"backend_pools":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"cname":{"type":"TypeString","computed":true},"explicit_resource_order":{"type":"TypeList","computed":true,"elem":{"schema":{"backend_pool_health_probe_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"backend_pool_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"backend_pool_load_balancing_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"frontend_endpoint_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"routing_rule_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"friendly_name":{"type":"TypeString","optional":true},"frontend_endpoint":{"type":"TypeList","required":true,"elem":{"schema":{"host_name":{"type":"TypeString","required":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"session_affinity_enabled":{"type":"TypeBool","optional":true,"default":false},"session_affinity_ttl_seconds":{"type":"TypeInt","optional":true,"default":0},"web_application_firewall_policy_link_id":{"type":"TypeString","optional":true}}},"maxItems":500},"frontend_endpoints":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"header_frontdoor_id":{"type":"TypeString","computed":true},"load_balancer_enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"routing_rule":{"type":"TypeList","required":true,"elem":{"schema":{"accepted_protocols":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":2},"enabled":{"type":"TypeBool","optional":true,"default":true},"forwarding_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"backend_pool_name":{"type":"TypeString","required":true},"cache_duration":{"type":"TypeString","optional":true},"cache_enabled":{"type":"TypeBool","optional":true,"default":false},"cache_query_parameter_strip_directive":{"type":"TypeString","optional":true,"default":"StripAll"},"cache_query_parameters":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"cache_use_dynamic_compression":{"type":"TypeBool","optional":true,"default":false},"custom_forwarding_path":{"type":"TypeString","optional":true},"forwarding_protocol":{"type":"TypeString","optional":true,"default":"HttpsOnly"}}},"maxItems":1},"frontend_endpoints":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":500},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"patterns_to_match":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":25},"redirect_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"custom_fragment":{"type":"TypeString","optional":true},"custom_host":{"type":"TypeString","optional":true},"custom_path":{"type":"TypeString","optional":true},"custom_query_string":{"type":"TypeString","optional":true},"redirect_protocol":{"type":"TypeString","required":true},"redirect_type":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":500},"routing_rules":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":360,"read":5,"delete":360,"update":360}},"azurerm_frontdoor_custom_https_configuration":{"schema":{"custom_https_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_key_vault_certificate_secret_name":{"type":"TypeString","optional":true},"azure_key_vault_certificate_secret_version":{"type":"TypeString","optional":true},"azure_key_vault_certificate_vault_id":{"type":"TypeString","optional":true},"certificate_source":{"type":"TypeString","optional":true,"default":"FrontDoor"},"minimum_tls_version":{"type":"TypeString","computed":true},"provisioning_state":{"type":"TypeString","computed":true},"provisioning_substate":{"type":"TypeString","computed":true}}},"maxItems":1},"custom_https_provisioning_enabled":{"type":"TypeBool","required":true},"frontend_endpoint_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":360,"read":5,"delete":360,"update":360}},"azurerm_frontdoor_firewall_policy":{"schema":{"custom_block_response_body":{"type":"TypeString","optional":true},"custom_block_response_status_code":{"type":"TypeInt","optional":true},"custom_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"match_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"match_values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":600},"match_variable":{"type":"TypeString","required":true},"negation_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"selector":{"type":"TypeString","optional":true},"transforms":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":5}}},"maxItems":10},"name":{"type":"TypeString","required":true},"priority":{"type":"TypeInt","optional":true,"default":1},"rate_limit_duration_in_minutes":{"type":"TypeInt","optional":true,"default":1},"rate_limit_threshold":{"type":"TypeInt","optional":true,"default":10},"type":{"type":"TypeString","required":true}}},"maxItems":100},"enabled":{"type":"TypeBool","optional":true,"default":true},"frontend_endpoint_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","computed":true},"managed_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"exclusion":{"type":"TypeList","optional":true,"elem":{"schema":{"match_variable":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"selector":{"type":"TypeString","required":true}}},"maxItems":100},"override":{"type":"TypeList","optional":true,"elem":{"schema":{"exclusion":{"type":"TypeList","optional":true,"elem":{"schema":{"match_variable":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"selector":{"type":"TypeString","required":true}}},"maxItems":100},"rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":false},"exclusion":{"type":"TypeList","optional":true,"elem":{"schema":{"match_variable":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"selector":{"type":"TypeString","required":true}}},"maxItems":100},"rule_id":{"type":"TypeString","required":true}}},"maxItems":1000},"rule_group_name":{"type":"TypeString","required":true}}},"maxItems":100},"type":{"type":"TypeString","required":true},"version":{"type":"TypeString","required":true}}},"maxItems":100},"mode":{"type":"TypeString","optional":true,"default":"Prevention"},"name":{"type":"TypeString","required":true,"forceNew":true},"redirect_url":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_frontdoor_rules_engine":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"frontdoor_name":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeList","optional":true,"elem":{"schema":{"request_header":{"type":"TypeList","optional":true,"elem":{"schema":{"header_action_type":{"type":"TypeString","optional":true},"header_name":{"type":"TypeString","optional":true},"value":{"type":"TypeString","optional":true}}},"maxItems":100},"response_header":{"type":"TypeList","optional":true,"elem":{"schema":{"header_action_type":{"type":"TypeString","optional":true},"header_name":{"type":"TypeString","optional":true},"value":{"type":"TypeString","optional":true}}},"maxItems":100}}},"maxItems":1},"match_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"negate_condition":{"type":"TypeBool","optional":true,"default":false},"operator":{"type":"TypeString","required":true},"selector":{"type":"TypeString","optional":true},"transform":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":6},"value":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":25},"variable":{"type":"TypeString","optional":true}}},"maxItems":100},"name":{"type":"TypeString","required":true},"priority":{"type":"TypeInt","required":true}}},"maxItems":100}},"timeouts":{"create":360,"read":5,"delete":360,"update":360}},"azurerm_function_app":{"schema":{"app_service_plan_id":{"type":"TypeString","required":true},"app_settings":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","optional":true}}},"maxItems":1},"additional_login_params":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","required":true},"facebook":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true},"app_secret":{"type":"TypeString","required":true},"oauth_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"google":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"oauth_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"issuer":{"type":"TypeString","optional":true},"microsoft":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"oauth_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true},"token_refresh_extension_hours":{"type":"TypeFloat","optional":true,"default":72},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false},"twitter":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true},"consumer_secret":{"type":"TypeString","required":true}}},"maxItems":1},"unauthenticated_client_action":{"type":"TypeString","optional":true}}},"maxItems":1},"client_cert_mode":{"type":"TypeString","optional":true},"connection_string":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"custom_domain_verification_id":{"type":"TypeString","computed":true},"daily_memory_time_quota":{"type":"TypeInt","optional":true},"default_hostname":{"type":"TypeString","computed":true},"enable_builtin_logging":{"type":"TypeBool","optional":true,"default":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"https_only":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_reference_identity_id":{"type":"TypeString","optional":true,"computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"os_type":{"type":"TypeString","optional":true,"default":"","forceNew":true},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"site_config":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"always_on":{"type":"TypeBool","optional":true,"default":false},"app_scale_limit":{"type":"TypeInt","optional":true,"computed":true},"auto_swap_slot_name":{"type":"TypeString","optional":true},"cors":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"support_credentials":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"dotnet_framework_version":{"type":"TypeString","optional":true,"default":"v4.0"},"elastic_instance_minimum":{"type":"TypeInt","optional":true,"computed":true},"ftps_state":{"type":"TypeString","optional":true,"computed":true},"health_check_path":{"type":"TypeString","optional":true},"http2_enabled":{"type":"TypeBool","optional":true,"default":false},"ip_restriction":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000},"service_tag":{"type":"TypeString","optional":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true}}}},"java_version":{"type":"TypeString","optional":true},"linux_fx_version":{"type":"TypeString","optional":true,"computed":true},"min_tls_version":{"type":"TypeString","optional":true,"computed":true},"pre_warmed_instance_count":{"type":"TypeInt","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"TypeBool","optional":true,"default":false},"scm_ip_restriction":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000},"service_tag":{"type":"TypeString","optional":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true}}}},"scm_type":{"type":"TypeString","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"TypeBool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"computed":true},"websockets_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"source_control":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"branch":{"type":"TypeString","optional":true,"computed":true},"manual_integration":{"type":"TypeBool","optional":true,"computed":true},"repo_url":{"type":"TypeString","optional":true,"computed":true},"rollback_enabled":{"type":"TypeBool","optional":true,"computed":true},"use_mercurial":{"type":"TypeBool","optional":true,"computed":true}}},"maxItems":1},"storage_account_access_key":{"type":"TypeString","required":true},"storage_account_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"version":{"type":"TypeString","optional":true,"default":"~1"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_function_app_active_slot":{"schema":{"last_successful_swap":{"type":"TypeString","description":"The timestamp of the last successful swap with `Production`","computed":true},"overwrite_network_config":{"type":"TypeBool","optional":true,"default":true,"description":"The swap action should overwrite the Production slot's network configuration with the configuration from this slot. Defaults to `true`.","forceNew":true},"slot_id":{"type":"TypeString","required":true,"description":"The ID of the Slot to swap with `Production`."}},"timeouts":{"create":30,"read":5,"delete":5,"update":30}},"azurerm_function_app_connection":{"schema":{"authentication":{"type":"TypeList","required":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"client_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true},"principal_id":{"type":"TypeString","optional":true},"secret":{"type":"TypeString","optional":true},"subscription_id":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"client_type":{"type":"TypeString","optional":true,"default":"none"},"function_app_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"secret_store":{"type":"TypeList","optional":true,"elem":{"schema":{"key_vault_id":{"type":"TypeString","required":true}}},"maxItems":1},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true},"vnet_solution":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_function_app_function":{"schema":{"config_json":{"type":"TypeString","required":true,"description":"The config for this Function in JSON format."},"config_url":{"type":"TypeString","description":"The URL of the configuration JSON.","computed":true},"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should this function be enabled. Defaults to `true`."},"file":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"content":{"type":"TypeString","required":true,"description":"The content of the file.","forceNew":true},"name":{"type":"TypeString","required":true,"description":"The filename of the file to be uploaded.","forceNew":true}}},"minItems":1},"function_app_id":{"type":"TypeString","required":true,"description":"The ID of the Function App in which this function should reside.","forceNew":true},"invocation_url":{"type":"TypeString","description":"The invocation URL.","computed":true},"language":{"type":"TypeString","optional":true,"description":"The language the Function is written in."},"name":{"type":"TypeString","required":true,"description":"The name of the function.","forceNew":true},"script_root_path_url":{"type":"TypeString","description":"The Script root path URL.","computed":true},"script_url":{"type":"TypeString","description":"The script URL.","computed":true},"secrets_file_url":{"type":"TypeString","description":"The URL for the Secrets File.","computed":true},"test_data":{"type":"TypeString","optional":true,"description":"The test data for the function."},"test_data_url":{"type":"TypeString","description":"The Test data URL.","computed":true},"url":{"type":"TypeString","description":"The function URL.","computed":true}},"timeouts":{"create":30,"read":5,"delete":5,"update":30}},"azurerm_function_app_hybrid_connection":{"schema":{"function_app_id":{"type":"TypeString","required":true,"description":"The ID of the Function App for this Hybrid Connection.","forceNew":true},"hostname":{"type":"TypeString","required":true,"description":"The hostname of the endpoint."},"namespace_name":{"type":"TypeString","description":"The name of the Relay Namespace.","computed":true},"port":{"type":"TypeInt","required":true,"description":"The port to use for the endpoint"},"relay_id":{"type":"TypeString","required":true,"description":"The ID of the Relay Hybrid Connection to use.","forceNew":true},"relay_name":{"type":"TypeString","description":"The name of the Relay in use.","computed":true},"send_key_name":{"type":"TypeString","optional":true,"default":"RootManageSharedAccessKey","description":"The name of the Relay key with `Send` permission to use. Defaults to `RootManageSharedAccessKey`"},"send_key_value":{"type":"TypeString","description":"The Primary Access Key for the `send_key_name`","computed":true},"service_bus_namespace":{"type":"TypeString","description":"The Service Bus Namespace.","computed":true},"service_bus_suffix":{"type":"TypeString","description":"The suffix for the endpoint.","computed":true}},"timeouts":{"create":30,"read":5,"delete":5,"update":30}},"azurerm_function_app_slot":{"schema":{"app_service_plan_id":{"type":"TypeString","required":true,"forceNew":true},"app_settings":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","optional":true}}},"maxItems":1},"additional_login_params":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","required":true},"facebook":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true},"app_secret":{"type":"TypeString","required":true},"oauth_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"google":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"oauth_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"issuer":{"type":"TypeString","optional":true},"microsoft":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true},"oauth_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true},"token_refresh_extension_hours":{"type":"TypeFloat","optional":true,"default":72},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false},"twitter":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true},"consumer_secret":{"type":"TypeString","required":true}}},"maxItems":1},"unauthenticated_client_action":{"type":"TypeString","optional":true}}},"maxItems":1},"connection_string":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"daily_memory_time_quota":{"type":"TypeInt","optional":true},"default_hostname":{"type":"TypeString","computed":true},"enable_builtin_logging":{"type":"TypeBool","optional":true,"default":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"function_app_name":{"type":"TypeString","required":true,"forceNew":true},"https_only":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"os_type":{"type":"TypeString","optional":true,"forceNew":true},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"site_config":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"always_on":{"type":"TypeBool","optional":true,"default":false},"app_scale_limit":{"type":"TypeInt","optional":true,"computed":true},"auto_swap_slot_name":{"type":"TypeString","optional":true},"cors":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"support_credentials":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"dotnet_framework_version":{"type":"TypeString","optional":true,"default":"v4.0"},"elastic_instance_minimum":{"type":"TypeInt","optional":true,"computed":true},"ftps_state":{"type":"TypeString","optional":true,"computed":true},"health_check_path":{"type":"TypeString","optional":true},"http2_enabled":{"type":"TypeBool","optional":true,"default":false},"ip_restriction":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000},"service_tag":{"type":"TypeString","optional":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true}}}},"java_version":{"type":"TypeString","optional":true},"linux_fx_version":{"type":"TypeString","optional":true,"computed":true},"min_tls_version":{"type":"TypeString","optional":true,"computed":true},"pre_warmed_instance_count":{"type":"TypeInt","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"TypeBool","optional":true,"default":false},"scm_ip_restriction":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000},"service_tag":{"type":"TypeString","optional":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true}}}},"scm_type":{"type":"TypeString","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"TypeBool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"computed":true},"websockets_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"storage_account_access_key":{"type":"TypeString","required":true},"storage_account_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"version":{"type":"TypeString","optional":true,"default":"~1"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_gallery_application":{"schema":{"description":{"type":"TypeString","optional":true},"end_of_life_date":{"type":"TypeString","optional":true},"eula":{"type":"TypeString","optional":true},"gallery_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"privacy_statement_uri":{"type":"TypeString","optional":true},"release_note_uri":{"type":"TypeString","optional":true},"supported_os_type":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_gallery_application_version":{"schema":{"config_file":{"type":"TypeString","optional":true,"forceNew":true},"enable_health_check":{"type":"TypeBool","optional":true,"default":false},"end_of_life_date":{"type":"TypeString","optional":true},"exclude_from_latest":{"type":"TypeBool","optional":true,"default":false},"gallery_application_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"manage_action":{"type":"TypeList","required":true,"elem":{"schema":{"install":{"type":"TypeString","required":true,"forceNew":true},"remove":{"type":"TypeString","required":true,"forceNew":true},"update":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"package_file":{"type":"TypeString","optional":true,"forceNew":true},"source":{"type":"TypeList","required":true,"elem":{"schema":{"default_configuration_link":{"type":"TypeString","optional":true,"forceNew":true},"media_link":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"target_region":{"type":"TypeList","required":true,"elem":{"schema":{"exclude_from_latest":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true},"regional_replica_count":{"type":"TypeInt","required":true},"storage_account_type":{"type":"TypeString","optional":true,"default":"Standard_LRS"}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_graph_services_account":{"schema":{"application_id":{"type":"TypeString","required":true,"forceNew":true},"billing_plan_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_hdinsight_hadoop_cluster":{"schema":{"cluster_version":{"type":"TypeString","required":true,"forceNew":true},"component_version":{"type":"TypeList","required":true,"elem":{"schema":{"hadoop":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"compute_isolation":{"type":"TypeList","optional":true,"elem":{"schema":{"compute_isolation_enabled":{"type":"TypeBool","optional":true,"default":false},"host_sku":{"type":"TypeString","optional":true}}},"maxItems":1},"disk_encryption":{"type":"TypeList","optional":true,"elem":{"schema":{"encryption_algorithm":{"type":"TypeString","optional":true},"encryption_at_host_enabled":{"type":"TypeBool","optional":true},"key_vault_key_id":{"type":"TypeString","optional":true},"key_vault_managed_identity_id":{"type":"TypeString","optional":true}}}},"extension":{"type":"TypeList","optional":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","required":true}}},"maxItems":1},"gateway":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"https_endpoint":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"metastores":{"type":"TypeList","optional":true,"elem":{"schema":{"ambari":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"hive":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"oozie":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"monitor":{"type":"TypeList","optional":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network":{"type":"TypeList","optional":true,"elem":{"schema":{"connection_direction":{"type":"TypeString","optional":true,"default":"Inbound","forceNew":true},"private_link_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}}},"maxItems":1},"private_link_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"group_id":{"type":"TypeString","required":true},"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"primary":{"type":"TypeBool","optional":true},"private_ip_address":{"type":"TypeString","optional":true},"private_ip_allocation_method":{"type":"TypeString","optional":true},"subnet_id":{"type":"TypeString","optional":true}}},"maxItems":1},"name":{"type":"TypeString","required":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"roles":{"type":"TypeList","required":true,"elem":{"schema":{"edge_node":{"type":"TypeList","optional":true,"elem":{"schema":{"https_endpoints":{"type":"TypeList","optional":true,"elem":{"schema":{"access_modes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"destination_port":{"type":"TypeInt","optional":true},"disable_gateway_auth":{"type":"TypeBool","optional":true},"private_ip_address":{"type":"TypeString","optional":true},"sub_domain_suffix":{"type":"TypeString","optional":true}}}},"install_script_action":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"target_instance_count":{"type":"TypeInt","required":true},"uninstall_script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"vm_size":{"type":"TypeString","required":true}}},"maxItems":1},"head_node":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"worker_node":{"type":"TypeList","required":true,"elem":{"schema":{"autoscale":{"type":"TypeList","optional":true,"elem":{"schema":{"capacity":{"type":"TypeList","optional":true,"elem":{"schema":{"max_instance_count":{"type":"TypeInt","required":true},"min_instance_count":{"type":"TypeInt","required":true}}},"maxItems":1},"recurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"days":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"target_instance_count":{"type":"TypeInt","required":true},"time":{"type":"TypeString","required":true}}},"minItems":1},"timezone":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"target_instance_count":{"type":"TypeInt","required":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"zookeeper_node":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"security_profile":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"aadds_resource_id":{"type":"TypeString","required":true,"forceNew":true},"cluster_users_group_dns":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"domain_name":{"type":"TypeString","required":true,"forceNew":true},"domain_user_password":{"type":"TypeString","required":true,"forceNew":true},"domain_username":{"type":"TypeString","required":true,"forceNew":true},"ldaps_urls":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"msi_resource_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"ssh_endpoint":{"type":"TypeString","computed":true},"storage_account":{"type":"TypeList","optional":true,"elem":{"schema":{"is_default":{"type":"TypeBool","required":true,"forceNew":true},"storage_account_key":{"type":"TypeString","required":true,"forceNew":true},"storage_container_id":{"type":"TypeString","required":true,"forceNew":true},"storage_resource_id":{"type":"TypeString","optional":true,"forceNew":true}}}},"storage_account_gen2":{"type":"TypeList","optional":true,"elem":{"schema":{"filesystem_id":{"type":"TypeString","required":true,"forceNew":true},"is_default":{"type":"TypeBool","required":true,"forceNew":true},"managed_identity_resource_id":{"type":"TypeString","required":true,"forceNew":true},"storage_resource_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tier":{"type":"TypeString","required":true,"forceNew":true},"tls_min_version":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_hdinsight_hbase_cluster":{"schema":{"cluster_version":{"type":"TypeString","required":true,"forceNew":true},"component_version":{"type":"TypeList","required":true,"elem":{"schema":{"hbase":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"compute_isolation":{"type":"TypeList","optional":true,"elem":{"schema":{"compute_isolation_enabled":{"type":"TypeBool","optional":true,"default":false},"host_sku":{"type":"TypeString","optional":true}}},"maxItems":1},"disk_encryption":{"type":"TypeList","optional":true,"elem":{"schema":{"encryption_algorithm":{"type":"TypeString","optional":true},"encryption_at_host_enabled":{"type":"TypeBool","optional":true},"key_vault_key_id":{"type":"TypeString","optional":true},"key_vault_managed_identity_id":{"type":"TypeString","optional":true}}}},"extension":{"type":"TypeList","optional":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","required":true}}},"maxItems":1},"gateway":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"https_endpoint":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"metastores":{"type":"TypeList","optional":true,"elem":{"schema":{"ambari":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"hive":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"oozie":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"monitor":{"type":"TypeList","optional":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network":{"type":"TypeList","optional":true,"elem":{"schema":{"connection_direction":{"type":"TypeString","optional":true,"default":"Inbound","forceNew":true},"private_link_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}}},"maxItems":1},"private_link_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"group_id":{"type":"TypeString","required":true},"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"primary":{"type":"TypeBool","optional":true},"private_ip_address":{"type":"TypeString","optional":true},"private_ip_allocation_method":{"type":"TypeString","optional":true},"subnet_id":{"type":"TypeString","optional":true}}},"maxItems":1},"name":{"type":"TypeString","required":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"roles":{"type":"TypeList","required":true,"elem":{"schema":{"head_node":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"worker_node":{"type":"TypeList","required":true,"elem":{"schema":{"autoscale":{"type":"TypeList","optional":true,"elem":{"schema":{"recurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"days":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"target_instance_count":{"type":"TypeInt","required":true},"time":{"type":"TypeString","required":true}}},"minItems":1},"timezone":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"target_instance_count":{"type":"TypeInt","required":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"zookeeper_node":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"security_profile":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"aadds_resource_id":{"type":"TypeString","required":true,"forceNew":true},"cluster_users_group_dns":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"domain_name":{"type":"TypeString","required":true,"forceNew":true},"domain_user_password":{"type":"TypeString","required":true,"forceNew":true},"domain_username":{"type":"TypeString","required":true,"forceNew":true},"ldaps_urls":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"msi_resource_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"ssh_endpoint":{"type":"TypeString","computed":true},"storage_account":{"type":"TypeList","optional":true,"elem":{"schema":{"is_default":{"type":"TypeBool","required":true,"forceNew":true},"storage_account_key":{"type":"TypeString","required":true,"forceNew":true},"storage_container_id":{"type":"TypeString","required":true,"forceNew":true},"storage_resource_id":{"type":"TypeString","optional":true,"forceNew":true}}}},"storage_account_gen2":{"type":"TypeList","optional":true,"elem":{"schema":{"filesystem_id":{"type":"TypeString","required":true,"forceNew":true},"is_default":{"type":"TypeBool","required":true,"forceNew":true},"managed_identity_resource_id":{"type":"TypeString","required":true,"forceNew":true},"storage_resource_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tier":{"type":"TypeString","required":true,"forceNew":true},"tls_min_version":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_hdinsight_interactive_query_cluster":{"schema":{"cluster_version":{"type":"TypeString","required":true,"forceNew":true},"component_version":{"type":"TypeList","required":true,"elem":{"schema":{"interactive_hive":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"compute_isolation":{"type":"TypeList","optional":true,"elem":{"schema":{"compute_isolation_enabled":{"type":"TypeBool","optional":true,"default":false},"host_sku":{"type":"TypeString","optional":true}}},"maxItems":1},"disk_encryption":{"type":"TypeList","optional":true,"elem":{"schema":{"encryption_algorithm":{"type":"TypeString","optional":true},"encryption_at_host_enabled":{"type":"TypeBool","optional":true},"key_vault_key_id":{"type":"TypeString","optional":true},"key_vault_managed_identity_id":{"type":"TypeString","optional":true}}}},"encryption_in_transit_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"extension":{"type":"TypeList","optional":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","required":true}}},"maxItems":1},"gateway":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"https_endpoint":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"metastores":{"type":"TypeList","optional":true,"elem":{"schema":{"ambari":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"hive":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"oozie":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"monitor":{"type":"TypeList","optional":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network":{"type":"TypeList","optional":true,"elem":{"schema":{"connection_direction":{"type":"TypeString","optional":true,"default":"Inbound","forceNew":true},"private_link_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}}},"maxItems":1},"private_link_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"group_id":{"type":"TypeString","required":true},"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"primary":{"type":"TypeBool","optional":true},"private_ip_address":{"type":"TypeString","optional":true},"private_ip_allocation_method":{"type":"TypeString","optional":true},"subnet_id":{"type":"TypeString","optional":true}}},"maxItems":1},"name":{"type":"TypeString","required":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"roles":{"type":"TypeList","required":true,"elem":{"schema":{"head_node":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"worker_node":{"type":"TypeList","required":true,"elem":{"schema":{"autoscale":{"type":"TypeList","optional":true,"elem":{"schema":{"recurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"days":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"target_instance_count":{"type":"TypeInt","required":true},"time":{"type":"TypeString","required":true}}},"minItems":1},"timezone":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"target_instance_count":{"type":"TypeInt","required":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"zookeeper_node":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"security_profile":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"aadds_resource_id":{"type":"TypeString","required":true,"forceNew":true},"cluster_users_group_dns":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"domain_name":{"type":"TypeString","required":true,"forceNew":true},"domain_user_password":{"type":"TypeString","required":true,"forceNew":true},"domain_username":{"type":"TypeString","required":true,"forceNew":true},"ldaps_urls":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"msi_resource_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"ssh_endpoint":{"type":"TypeString","computed":true},"storage_account":{"type":"TypeList","optional":true,"elem":{"schema":{"is_default":{"type":"TypeBool","required":true,"forceNew":true},"storage_account_key":{"type":"TypeString","required":true,"forceNew":true},"storage_container_id":{"type":"TypeString","required":true,"forceNew":true},"storage_resource_id":{"type":"TypeString","optional":true,"forceNew":true}}}},"storage_account_gen2":{"type":"TypeList","optional":true,"elem":{"schema":{"filesystem_id":{"type":"TypeString","required":true,"forceNew":true},"is_default":{"type":"TypeBool","required":true,"forceNew":true},"managed_identity_resource_id":{"type":"TypeString","required":true,"forceNew":true},"storage_resource_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tier":{"type":"TypeString","required":true,"forceNew":true},"tls_min_version":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_hdinsight_kafka_cluster":{"schema":{"cluster_version":{"type":"TypeString","required":true,"forceNew":true},"component_version":{"type":"TypeList","required":true,"elem":{"schema":{"kafka":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"compute_isolation":{"type":"TypeList","optional":true,"elem":{"schema":{"compute_isolation_enabled":{"type":"TypeBool","optional":true,"default":false},"host_sku":{"type":"TypeString","optional":true}}},"maxItems":1},"disk_encryption":{"type":"TypeList","optional":true,"elem":{"schema":{"encryption_algorithm":{"type":"TypeString","optional":true},"encryption_at_host_enabled":{"type":"TypeBool","optional":true},"key_vault_key_id":{"type":"TypeString","optional":true},"key_vault_managed_identity_id":{"type":"TypeString","optional":true}}}},"encryption_in_transit_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"extension":{"type":"TypeList","optional":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","required":true}}},"maxItems":1},"gateway":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"https_endpoint":{"type":"TypeString","computed":true},"kafka_rest_proxy_endpoint":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"metastores":{"type":"TypeList","optional":true,"elem":{"schema":{"ambari":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"hive":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"oozie":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"monitor":{"type":"TypeList","optional":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network":{"type":"TypeList","optional":true,"elem":{"schema":{"connection_direction":{"type":"TypeString","optional":true,"default":"Inbound","forceNew":true},"private_link_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}}},"maxItems":1},"private_link_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"group_id":{"type":"TypeString","required":true},"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"primary":{"type":"TypeBool","optional":true},"private_ip_address":{"type":"TypeString","optional":true},"private_ip_allocation_method":{"type":"TypeString","optional":true},"subnet_id":{"type":"TypeString","optional":true}}},"maxItems":1},"name":{"type":"TypeString","required":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rest_proxy":{"type":"TypeList","optional":true,"elem":{"schema":{"security_group_id":{"type":"TypeString","required":true,"forceNew":true},"security_group_name":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"roles":{"type":"TypeList","required":true,"elem":{"schema":{"head_node":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"kafka_management_node":{"type":"TypeList","optional":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"username":{"type":"TypeString","computed":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"worker_node":{"type":"TypeList","required":true,"elem":{"schema":{"number_of_disks_per_node":{"type":"TypeInt","required":true,"forceNew":true},"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"target_instance_count":{"type":"TypeInt","required":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"zookeeper_node":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"security_profile":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"aadds_resource_id":{"type":"TypeString","required":true,"forceNew":true},"cluster_users_group_dns":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"domain_name":{"type":"TypeString","required":true,"forceNew":true},"domain_user_password":{"type":"TypeString","required":true,"forceNew":true},"domain_username":{"type":"TypeString","required":true,"forceNew":true},"ldaps_urls":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"msi_resource_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"ssh_endpoint":{"type":"TypeString","computed":true},"storage_account":{"type":"TypeList","optional":true,"elem":{"schema":{"is_default":{"type":"TypeBool","required":true,"forceNew":true},"storage_account_key":{"type":"TypeString","required":true,"forceNew":true},"storage_container_id":{"type":"TypeString","required":true,"forceNew":true},"storage_resource_id":{"type":"TypeString","optional":true,"forceNew":true}}}},"storage_account_gen2":{"type":"TypeList","optional":true,"elem":{"schema":{"filesystem_id":{"type":"TypeString","required":true,"forceNew":true},"is_default":{"type":"TypeBool","required":true,"forceNew":true},"managed_identity_resource_id":{"type":"TypeString","required":true,"forceNew":true},"storage_resource_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tier":{"type":"TypeString","required":true,"forceNew":true},"tls_min_version":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_hdinsight_spark_cluster":{"schema":{"cluster_version":{"type":"TypeString","required":true,"forceNew":true},"component_version":{"type":"TypeList","required":true,"elem":{"schema":{"spark":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"compute_isolation":{"type":"TypeList","optional":true,"elem":{"schema":{"compute_isolation_enabled":{"type":"TypeBool","optional":true,"default":false},"host_sku":{"type":"TypeString","optional":true}}},"maxItems":1},"disk_encryption":{"type":"TypeList","optional":true,"elem":{"schema":{"encryption_algorithm":{"type":"TypeString","optional":true},"encryption_at_host_enabled":{"type":"TypeBool","optional":true},"key_vault_key_id":{"type":"TypeString","optional":true},"key_vault_managed_identity_id":{"type":"TypeString","optional":true}}}},"encryption_in_transit_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"extension":{"type":"TypeList","optional":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","required":true}}},"maxItems":1},"gateway":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"https_endpoint":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"metastores":{"type":"TypeList","optional":true,"elem":{"schema":{"ambari":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"hive":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"oozie":{"type":"TypeList","optional":true,"elem":{"schema":{"database_name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"monitor":{"type":"TypeList","optional":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network":{"type":"TypeList","optional":true,"elem":{"schema":{"connection_direction":{"type":"TypeString","optional":true,"default":"Inbound","forceNew":true},"private_link_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}}},"maxItems":1},"private_link_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"group_id":{"type":"TypeString","required":true},"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"primary":{"type":"TypeBool","optional":true},"private_ip_address":{"type":"TypeString","optional":true},"private_ip_allocation_method":{"type":"TypeString","optional":true},"subnet_id":{"type":"TypeString","optional":true}}},"maxItems":1},"name":{"type":"TypeString","required":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"roles":{"type":"TypeList","required":true,"elem":{"schema":{"head_node":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"worker_node":{"type":"TypeList","required":true,"elem":{"schema":{"autoscale":{"type":"TypeList","optional":true,"elem":{"schema":{"capacity":{"type":"TypeList","optional":true,"elem":{"schema":{"max_instance_count":{"type":"TypeInt","required":true},"min_instance_count":{"type":"TypeInt","required":true}}},"maxItems":1},"recurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"days":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"target_instance_count":{"type":"TypeInt","required":true},"time":{"type":"TypeString","required":true}}},"minItems":1},"timezone":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"target_instance_count":{"type":"TypeInt","required":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"zookeeper_node":{"type":"TypeList","required":true,"elem":{"schema":{"password":{"type":"TypeString","optional":true,"forceNew":true},"script_actions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true},"uri":{"type":"TypeString","required":true}}},"minItems":1},"ssh_keys":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"security_profile":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"aadds_resource_id":{"type":"TypeString","required":true,"forceNew":true},"cluster_users_group_dns":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"domain_name":{"type":"TypeString","required":true,"forceNew":true},"domain_user_password":{"type":"TypeString","required":true,"forceNew":true},"domain_username":{"type":"TypeString","required":true,"forceNew":true},"ldaps_urls":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"msi_resource_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"ssh_endpoint":{"type":"TypeString","computed":true},"storage_account":{"type":"TypeList","optional":true,"elem":{"schema":{"is_default":{"type":"TypeBool","required":true,"forceNew":true},"storage_account_key":{"type":"TypeString","required":true,"forceNew":true},"storage_container_id":{"type":"TypeString","required":true,"forceNew":true},"storage_resource_id":{"type":"TypeString","optional":true,"forceNew":true}}}},"storage_account_gen2":{"type":"TypeList","optional":true,"elem":{"schema":{"filesystem_id":{"type":"TypeString","required":true,"forceNew":true},"is_default":{"type":"TypeBool","required":true,"forceNew":true},"managed_identity_resource_id":{"type":"TypeString","required":true,"forceNew":true},"storage_resource_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tier":{"type":"TypeString","required":true,"forceNew":true},"tls_min_version":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_healthbot":{"schema":{"bot_management_portal_url":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_healthcare_dicom_service":{"schema":{"authentication":{"type":"TypeList","computed":true,"elem":{"schema":{"audience":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"authority":{"type":"TypeString","computed":true}}}},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_endpoint":{"type":"TypeSet","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"service_url":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":90,"read":5,"delete":30,"update":90}},"azurerm_healthcare_fhir_service":{"schema":{"access_policy_object_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"authentication":{"type":"TypeList","required":true,"elem":{"schema":{"audience":{"type":"TypeString","required":true},"authority":{"type":"TypeString","required":true},"smart_proxy_enabled":{"type":"TypeBool","optional":true}}},"maxItems":1},"configuration_export_storage_account_name":{"type":"TypeString","optional":true},"container_registry_login_server_url":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"cors":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_headers":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"maxItems":64},"allowed_methods":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"maxItems":64},"allowed_origins":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"maxItems":64},"credentials_allowed":{"type":"TypeBool","optional":true,"default":false},"max_age_in_seconds":{"type":"TypeInt","optional":true}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"kind":{"type":"TypeString","optional":true,"default":"fhir-R4","forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"oci_artifact":{"type":"TypeList","optional":true,"elem":{"schema":{"digest":{"type":"TypeString","optional":true},"image_name":{"type":"TypeString","optional":true},"login_server":{"type":"TypeString","required":true}}}},"public_network_access_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":90,"read":5,"delete":30,"update":90}},"azurerm_healthcare_medtech_service":{"schema":{"device_mapping_json":{"type":"TypeString","required":true},"eventhub_consumer_group_name":{"type":"TypeString","required":true},"eventhub_name":{"type":"TypeString","required":true},"eventhub_namespace_name":{"type":"TypeString","required":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_healthcare_medtech_service_fhir_destination":{"schema":{"destination_fhir_mapping_json":{"type":"TypeString","required":true},"destination_fhir_service_id":{"type":"TypeString","required":true},"destination_identity_resolution_type":{"type":"TypeString","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"medtech_service_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_healthcare_service":{"schema":{"access_policy_object_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"authentication_configuration":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"audience":{"type":"TypeString","optional":true},"authority":{"type":"TypeString","optional":true},"smart_proxy_enabled":{"type":"TypeBool","optional":true}}},"maxItems":1},"configuration_export_storage_account_name":{"type":"TypeString","optional":true},"cors_configuration":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"allow_credentials":{"type":"TypeBool","optional":true},"allowed_headers":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":64},"allowed_methods":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":64},"allowed_origins":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":64},"max_age_in_seconds":{"type":"TypeInt","optional":true}}},"maxItems":1},"cosmosdb_key_vault_key_versionless_id":{"type":"TypeString","optional":true,"forceNew":true},"cosmosdb_throughput":{"type":"TypeInt","optional":true,"default":1000},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"kind":{"type":"TypeString","optional":true,"default":"fhir"},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_healthcare_workspace":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_endpoint_connection":{"type":"TypeSet","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_hpc_cache":{"schema":{"automatically_rotate_key_to_latest_enabled":{"type":"TypeBool","optional":true},"cache_size_in_gb":{"type":"TypeInt","required":true,"forceNew":true},"default_access_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"access_rule":{"type":"TypeSet","required":true,"elem":{"schema":{"access":{"type":"TypeString","required":true},"anonymous_gid":{"type":"TypeInt","optional":true},"anonymous_uid":{"type":"TypeInt","optional":true},"filter":{"type":"TypeString","optional":true},"root_squash_enabled":{"type":"TypeBool","optional":true},"scope":{"type":"TypeString","required":true},"submount_access_enabled":{"type":"TypeBool","optional":true},"suid_enabled":{"type":"TypeBool","optional":true}}},"maxItems":3,"minItems":1}}},"maxItems":1,"minItems":1},"directory_active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"cache_netbios_name":{"type":"TypeString","required":true},"dns_primary_ip":{"type":"TypeString","required":true},"dns_secondary_ip":{"type":"TypeString","optional":true},"domain_name":{"type":"TypeString","required":true},"domain_netbios_name":{"type":"TypeString","required":true},"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true}}},"maxItems":1},"directory_flat_file":{"type":"TypeList","optional":true,"elem":{"schema":{"group_file_uri":{"type":"TypeString","required":true},"password_file_uri":{"type":"TypeString","required":true}}},"maxItems":1},"directory_ldap":{"type":"TypeList","optional":true,"elem":{"schema":{"base_dn":{"type":"TypeString","required":true},"bind":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"dn":{"type":"TypeString","required":true},"password":{"type":"TypeString","required":true}}},"maxItems":1},"certificate_validation_uri":{"type":"TypeString","optional":true},"download_certificate_automatically":{"type":"TypeBool","optional":true},"encrypted":{"type":"TypeBool","optional":true},"server":{"type":"TypeString","required":true}}},"maxItems":1},"dns":{"type":"TypeList","optional":true,"elem":{"schema":{"search_domain":{"type":"TypeString","optional":true},"servers":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":3}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"key_vault_key_id":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"mount_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"mtu":{"type":"TypeInt","optional":true,"default":1500},"name":{"type":"TypeString","required":true,"forceNew":true},"ntp_server":{"type":"TypeString","optional":true,"default":"time.windows.com"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_hpc_cache_access_policy":{"schema":{"access_rule":{"type":"TypeSet","required":true,"elem":{"schema":{"access":{"type":"TypeString","required":true},"anonymous_gid":{"type":"TypeInt","optional":true},"anonymous_uid":{"type":"TypeInt","optional":true},"filter":{"type":"TypeString","optional":true},"root_squash_enabled":{"type":"TypeBool","optional":true},"scope":{"type":"TypeString","required":true},"submount_access_enabled":{"type":"TypeBool","optional":true},"suid_enabled":{"type":"TypeBool","optional":true}}},"maxItems":3,"minItems":1},"hpc_cache_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_hpc_cache_blob_nfs_target":{"schema":{"access_policy_name":{"type":"TypeString","optional":true,"default":"default"},"cache_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_path":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"storage_container_id":{"type":"TypeString","required":true,"forceNew":true},"usage_model":{"type":"TypeString","required":true},"verification_timer_in_seconds":{"type":"TypeInt","optional":true},"write_back_timer_in_seconds":{"type":"TypeInt","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_hpc_cache_blob_target":{"schema":{"access_policy_name":{"type":"TypeString","optional":true,"default":"default"},"cache_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_path":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"storage_container_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_hpc_cache_nfs_target":{"schema":{"cache_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_junction":{"type":"TypeSet","required":true,"elem":{"schema":{"access_policy_name":{"type":"TypeString","optional":true,"default":"default"},"namespace_path":{"type":"TypeString","required":true},"nfs_export":{"type":"TypeString","required":true},"target_path":{"type":"TypeString","optional":true,"default":""}}},"maxItems":10,"minItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"target_host_name":{"type":"TypeString","required":true,"forceNew":true},"usage_model":{"type":"TypeString","required":true},"verification_timer_in_seconds":{"type":"TypeInt","optional":true},"write_back_timer_in_seconds":{"type":"TypeInt","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_image":{"schema":{"data_disk":{"type":"TypeList","optional":true,"elem":{"schema":{"blob_uri":{"type":"TypeString","optional":true,"computed":true},"caching":{"type":"TypeString","optional":true,"default":"None"},"disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"lun":{"type":"TypeInt","optional":true},"managed_disk_id":{"type":"TypeString","optional":true,"forceNew":true},"size_gb":{"type":"TypeInt","optional":true,"computed":true},"storage_type":{"type":"TypeString","required":true,"description":"The type of storage disk","forceNew":true}}}},"hyper_v_generation":{"type":"TypeString","optional":true,"default":"V1","forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"os_disk":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"blob_uri":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"caching":{"type":"TypeString","optional":true,"default":"None"},"disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"managed_disk_id":{"type":"TypeString","optional":true,"computed":true},"os_state":{"type":"TypeString","optional":true},"os_type":{"type":"TypeString","optional":true},"size_gb":{"type":"TypeInt","optional":true,"computed":true,"forceNew":true},"storage_type":{"type":"TypeString","required":true,"description":"The type of storage disk","forceNew":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source_virtual_machine_id":{"type":"TypeString","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zone_resilient":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_iot_security_device_group":{"schema":{"allow_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"connection_from_ips_not_allowed":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"connection_to_ips_not_allowed":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"local_users_not_allowed":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"processes_not_allowed":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"iothub_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"range_rule":{"type":"TypeSet","optional":true,"elem":{"schema":{"duration":{"type":"TypeString","required":true},"max":{"type":"TypeInt","required":true},"min":{"type":"TypeInt","required":true},"type":{"type":"TypeString","required":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iot_security_solution":{"schema":{"additional_workspace":{"type":"TypeSet","optional":true,"elem":{"schema":{"data_types":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","required":true}}}},"disabled_data_sources":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"display_name":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"events_to_export":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"iothub_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"log_analytics_workspace_id":{"type":"TypeString","optional":true},"log_unmasked_ips_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"query_for_resources":{"type":"TypeString","optional":true,"computed":true},"query_subscription_ids":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"recommendations_enabled":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"acr_authentication":{"type":"TypeBool","optional":true,"default":true},"agent_send_unutilized_msg":{"type":"TypeBool","optional":true,"default":true},"baseline":{"type":"TypeBool","optional":true,"default":true},"edge_hub_mem_optimize":{"type":"TypeBool","optional":true,"default":true},"edge_logging_option":{"type":"TypeBool","optional":true,"default":true},"inconsistent_module_settings":{"type":"TypeBool","optional":true,"default":true},"install_agent":{"type":"TypeBool","optional":true,"default":true},"ip_filter_deny_all":{"type":"TypeBool","optional":true,"default":true},"ip_filter_permissive_rule":{"type":"TypeBool","optional":true,"default":true},"open_ports":{"type":"TypeBool","optional":true,"default":true},"permissive_firewall_policy":{"type":"TypeBool","optional":true,"default":true},"permissive_input_firewall_rules":{"type":"TypeBool","optional":true,"default":true},"permissive_output_firewall_rules":{"type":"TypeBool","optional":true,"default":true},"privileged_docker_options":{"type":"TypeBool","optional":true,"default":true},"shared_credentials":{"type":"TypeBool","optional":true,"default":true},"vulnerable_tls_cipher_suite":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iotcentral_application":{"schema":{"display_name":{"type":"TypeString","optional":true,"computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","optional":true,"default":"ST1"},"sub_domain":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"template":{"type":"TypeString","optional":true,"default":"iotc-pnp-preview@1.0.0","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iotcentral_application_network_rule_set":{"schema":{"apply_to_device":{"type":"TypeBool","optional":true,"default":true},"default_action":{"type":"TypeString","optional":true,"default":"Deny"},"iotcentral_application_id":{"type":"TypeString","required":true,"forceNew":true},"ip_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"ip_mask":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iotcentral_organization":{"schema":{"display_name":{"type":"TypeString","required":true},"iotcentral_application_id":{"type":"TypeString","required":true,"forceNew":true},"organization_id":{"type":"TypeString","required":true,"forceNew":true},"parent_organization_id":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub":{"schema":{"cloud_to_device":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"default_ttl":{"type":"TypeString","optional":true,"default":"PT1H"},"feedback":{"type":"TypeList","optional":true,"elem":{"schema":{"lock_duration":{"type":"TypeString","optional":true,"default":"PT60S"},"max_delivery_count":{"type":"TypeInt","optional":true,"default":10},"time_to_live":{"type":"TypeString","optional":true,"default":"PT1H"}}}},"max_delivery_count":{"type":"TypeInt","optional":true,"default":10}}},"maxItems":1},"endpoint":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"authentication_type":{"type":"TypeString","optional":true,"default":"keyBased"},"batch_frequency_in_seconds":{"type":"TypeInt","optional":true,"default":300},"connection_string":{"type":"TypeString","optional":true},"container_name":{"type":"TypeString","optional":true},"encoding":{"type":"TypeString","optional":true,"default":"Avro","forceNew":true},"endpoint_uri":{"type":"TypeString","optional":true},"entity_path":{"type":"TypeString","optional":true},"file_name_format":{"type":"TypeString","optional":true,"default":"{iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}"},"identity_id":{"type":"TypeString","optional":true},"max_chunk_size_in_bytes":{"type":"TypeInt","optional":true,"default":314572800},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}}},"enrichment":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"endpoint_names":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"key":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}},"maxItems":10},"event_hub_events_endpoint":{"type":"TypeString","computed":true},"event_hub_events_namespace":{"type":"TypeString","computed":true},"event_hub_events_path":{"type":"TypeString","computed":true},"event_hub_operations_endpoint":{"type":"TypeString","computed":true},"event_hub_operations_path":{"type":"TypeString","computed":true},"event_hub_partition_count":{"type":"TypeInt","optional":true,"default":4},"event_hub_retention_in_days":{"type":"TypeInt","optional":true,"default":1},"fallback_route":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"condition":{"type":"TypeString","optional":true,"default":"true"},"enabled":{"type":"TypeBool","optional":true,"default":true},"endpoint_names":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"source":{"type":"TypeString","optional":true,"default":"DeviceMessages"}}},"maxItems":1},"file_upload":{"type":"TypeList","optional":true,"elem":{"schema":{"authentication_type":{"type":"TypeString","optional":true,"default":"keyBased"},"connection_string":{"type":"TypeString","required":true},"container_name":{"type":"TypeString","required":true},"default_ttl":{"type":"TypeString","optional":true,"default":"PT1H"},"identity_id":{"type":"TypeString","optional":true},"lock_duration":{"type":"TypeString","optional":true,"default":"PT1M"},"max_delivery_count":{"type":"TypeInt","optional":true,"default":10},"notifications":{"type":"TypeBool","optional":true,"default":false},"sas_ttl":{"type":"TypeString","optional":true,"default":"PT1H"}}},"maxItems":1},"hostname":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"local_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"min_tls_version":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_rule_set":{"type":"TypeList","optional":true,"elem":{"schema":{"apply_to_builtin_eventhub_endpoint":{"type":"TypeBool","optional":true,"default":false},"default_action":{"type":"TypeString","optional":true,"default":"Deny"},"ip_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"ip_mask":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}}}}},"public_network_access_enabled":{"type":"TypeBool","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"route":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"condition":{"type":"TypeString","optional":true,"default":"true"},"enabled":{"type":"TypeBool","required":true},"endpoint_names":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"source":{"type":"TypeString","required":true}}}},"shared_access_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"key_name":{"type":"TypeString","computed":true},"permissions":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true}}}},"sku":{"type":"TypeList","required":true,"elem":{"schema":{"capacity":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_certificate":{"schema":{"certificate_content":{"type":"TypeString","required":true},"iothub_name":{"type":"TypeString","required":true,"forceNew":true},"is_verified":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_consumer_group":{"schema":{"eventhub_endpoint_name":{"type":"TypeString","required":true,"forceNew":true},"iothub_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_iothub_device_update_account":{"schema":{"host_name":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","optional":true,"default":"Standard","forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_device_update_instance":{"schema":{"device_update_account_id":{"type":"TypeString","required":true,"forceNew":true},"diagnostic_enabled":{"type":"TypeBool","optional":true,"default":false},"diagnostic_storage_account":{"type":"TypeList","optional":true,"elem":{"schema":{"connection_string":{"type":"TypeString","required":true},"id":{"type":"TypeString","required":true}}},"maxItems":1},"iothub_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_dps":{"schema":{"allocation_policy":{"type":"TypeString","optional":true,"default":"Hashed"},"data_residency_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"device_provisioning_host_name":{"type":"TypeString","computed":true},"id_scope":{"type":"TypeString","computed":true},"ip_filter_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"ip_mask":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"target":{"type":"TypeString","optional":true}}}},"linked_hub":{"type":"TypeList","optional":true,"elem":{"schema":{"allocation_weight":{"type":"TypeInt","optional":true,"default":1},"apply_allocation_policy":{"type":"TypeBool","optional":true,"default":true},"connection_string":{"type":"TypeString","required":true},"hostname":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_operations_host_name":{"type":"TypeString","computed":true},"sku":{"type":"TypeList","required":true,"elem":{"schema":{"capacity":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_dps_certificate":{"schema":{"certificate_content":{"type":"TypeString","required":true},"iot_dps_name":{"type":"TypeString","required":true,"forceNew":true},"is_verified":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_dps_shared_access_policy":{"schema":{"enrollment_read":{"type":"TypeBool","optional":true,"default":false},"enrollment_write":{"type":"TypeBool","optional":true,"default":false},"iothub_dps_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"registration_read":{"type":"TypeBool","optional":true,"default":false},"registration_write":{"type":"TypeBool","optional":true,"default":false},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"service_config":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_endpoint_cosmosdb_account":{"schema":{"authentication_type":{"type":"TypeString","optional":true,"default":"keyBased"},"container_name":{"type":"TypeString","required":true,"forceNew":true},"database_name":{"type":"TypeString","required":true,"forceNew":true},"endpoint_uri":{"type":"TypeString","required":true,"forceNew":true},"identity_id":{"type":"TypeString","optional":true},"iothub_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"partition_key_name":{"type":"TypeString","optional":true},"partition_key_template":{"type":"TypeString","optional":true},"primary_key":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_key":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_endpoint_eventhub":{"schema":{"authentication_type":{"type":"TypeString","optional":true,"default":"keyBased"},"connection_string":{"type":"TypeString","optional":true},"endpoint_uri":{"type":"TypeString","optional":true},"entity_path":{"type":"TypeString","optional":true},"identity_id":{"type":"TypeString","optional":true},"iothub_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_endpoint_servicebus_queue":{"schema":{"authentication_type":{"type":"TypeString","optional":true,"default":"keyBased"},"connection_string":{"type":"TypeString","optional":true},"endpoint_uri":{"type":"TypeString","optional":true},"entity_path":{"type":"TypeString","optional":true},"identity_id":{"type":"TypeString","optional":true},"iothub_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_endpoint_servicebus_topic":{"schema":{"authentication_type":{"type":"TypeString","optional":true,"default":"keyBased"},"connection_string":{"type":"TypeString","optional":true},"endpoint_uri":{"type":"TypeString","optional":true},"entity_path":{"type":"TypeString","optional":true},"identity_id":{"type":"TypeString","optional":true},"iothub_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_endpoint_storage_container":{"schema":{"authentication_type":{"type":"TypeString","optional":true,"default":"keyBased"},"batch_frequency_in_seconds":{"type":"TypeInt","optional":true,"default":300},"connection_string":{"type":"TypeString","optional":true},"container_name":{"type":"TypeString","required":true},"encoding":{"type":"TypeString","optional":true,"default":"Avro","forceNew":true},"endpoint_uri":{"type":"TypeString","optional":true},"file_name_format":{"type":"TypeString","optional":true,"default":"{iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}"},"identity_id":{"type":"TypeString","optional":true},"iothub_id":{"type":"TypeString","required":true,"forceNew":true},"max_chunk_size_in_bytes":{"type":"TypeInt","optional":true,"default":314572800},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_enrichment":{"schema":{"endpoint_names":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":100},"iothub_name":{"type":"TypeString","required":true,"forceNew":true},"key":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_fallback_route":{"schema":{"condition":{"type":"TypeString","optional":true,"default":"true"},"enabled":{"type":"TypeBool","required":true},"endpoint_names":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":1},"iothub_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source":{"type":"TypeString","optional":true,"default":"DeviceMessages"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_file_upload":{"schema":{"authentication_type":{"type":"TypeString","optional":true,"default":"keyBased"},"connection_string":{"type":"TypeString","required":true},"container_name":{"type":"TypeString","required":true},"default_ttl":{"type":"TypeString","optional":true,"default":"PT1H"},"identity_id":{"type":"TypeString","optional":true},"iothub_id":{"type":"TypeString","required":true,"forceNew":true},"lock_duration":{"type":"TypeString","optional":true,"default":"PT1M"},"max_delivery_count":{"type":"TypeInt","optional":true,"default":10},"notifications_enabled":{"type":"TypeBool","optional":true,"default":false},"sas_ttl":{"type":"TypeString","optional":true,"default":"PT1H"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_route":{"schema":{"condition":{"type":"TypeString","optional":true,"default":"true"},"enabled":{"type":"TypeBool","required":true},"endpoint_names":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":1},"iothub_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_iothub_shared_access_policy":{"schema":{"device_connect":{"type":"TypeBool","optional":true,"default":false},"iothub_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"registry_read":{"type":"TypeBool","optional":true,"default":false},"registry_write":{"type":"TypeBool","optional":true,"default":false},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"service_connect":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_ip_group":{"schema":{"cidrs":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"firewall_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"firewall_policy_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_ip_group_cidr":{"schema":{"cidr":{"type":"TypeString","required":true,"forceNew":true},"ip_group_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_key_vault":{"schema":{"access_policy":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"application_id":{"type":"TypeString","optional":true},"certificate_permissions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"key_permissions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"object_id":{"type":"TypeString","required":true},"secret_permissions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"storage_permissions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","required":true}}},"maxItems":1024},"contact":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"email":{"type":"TypeString","required":true},"name":{"type":"TypeString","optional":true},"phone":{"type":"TypeString","optional":true}}}},"enable_rbac_authorization":{"type":"TypeBool","optional":true},"enabled_for_deployment":{"type":"TypeBool","optional":true},"enabled_for_disk_encryption":{"type":"TypeBool","optional":true},"enabled_for_template_deployment":{"type":"TypeBool","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_acls":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"bypass":{"type":"TypeString","required":true},"default_action":{"type":"TypeString","required":true},"ip_rules":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"virtual_network_subnet_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"purge_protection_enabled":{"type":"TypeBool","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true},"soft_delete_retention_days":{"type":"TypeInt","optional":true,"default":90},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","required":true},"vault_uri":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_key_vault_access_policy":{"schema":{"application_id":{"type":"TypeString","optional":true,"forceNew":true},"certificate_permissions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"key_permissions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"key_vault_id":{"type":"TypeString","required":true,"forceNew":true},"object_id":{"type":"TypeString","required":true,"forceNew":true},"secret_permissions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"storage_permissions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_key_vault_certificate":{"schema":{"certificate":{"type":"TypeList","optional":true,"elem":{"schema":{"contents":{"type":"TypeString","required":true},"password":{"type":"TypeString","optional":true}}},"maxItems":1},"certificate_attribute":{"type":"TypeList","computed":true,"elem":{"schema":{"created":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","computed":true},"expires":{"type":"TypeString","computed":true},"not_before":{"type":"TypeString","computed":true},"recovery_level":{"type":"TypeString","computed":true},"updated":{"type":"TypeString","computed":true}}}},"certificate_data":{"type":"TypeString","computed":true},"certificate_data_base64":{"type":"TypeString","computed":true},"certificate_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"issuer_parameters":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true}}},"maxItems":1},"key_properties":{"type":"TypeList","required":true,"elem":{"schema":{"curve":{"type":"TypeString","optional":true,"computed":true},"exportable":{"type":"TypeBool","required":true},"key_size":{"type":"TypeInt","optional":true,"computed":true},"key_type":{"type":"TypeString","required":true},"reuse_key":{"type":"TypeBool","required":true}}},"maxItems":1},"lifetime_action":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeList","required":true,"elem":{"schema":{"action_type":{"type":"TypeString","required":true}}},"maxItems":1},"trigger":{"type":"TypeList","required":true,"elem":{"schema":{"days_before_expiry":{"type":"TypeInt","optional":true},"lifetime_percentage":{"type":"TypeInt","optional":true}}},"maxItems":1}}}},"secret_properties":{"type":"TypeList","required":true,"elem":{"schema":{"content_type":{"type":"TypeString","required":true}}},"maxItems":1},"x509_certificate_properties":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"extended_key_usage":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"key_usage":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"subject":{"type":"TypeString","required":true},"subject_alternative_names":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"dns_names":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"emails":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"upns":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"validity_in_months":{"type":"TypeInt","required":true}}},"maxItems":1}}},"maxItems":1},"key_vault_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_manager_id":{"type":"TypeString","computed":true},"resource_manager_versionless_id":{"type":"TypeString","computed":true},"secret_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"thumbprint":{"type":"TypeString","computed":true},"version":{"type":"TypeString","computed":true},"versionless_id":{"type":"TypeString","computed":true},"versionless_secret_id":{"type":"TypeString","computed":true}},"timeouts":{"create":60,"read":30,"delete":30,"update":30}},"azurerm_key_vault_certificate_contacts":{"schema":{"contact":{"type":"TypeSet","optional":true,"elem":{"schema":{"email":{"type":"TypeString","required":true},"name":{"type":"TypeString","optional":true},"phone":{"type":"TypeString","optional":true}}}},"key_vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_key_vault_certificate_issuer":{"schema":{"account_id":{"type":"TypeString","optional":true},"admin":{"type":"TypeList","optional":true,"elem":{"schema":{"email_address":{"type":"TypeString","required":true},"first_name":{"type":"TypeString","optional":true},"last_name":{"type":"TypeString","optional":true},"phone":{"type":"TypeString","optional":true}}}},"key_vault_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"org_id":{"type":"TypeString","optional":true},"password":{"type":"TypeString","optional":true},"provider_name":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_key_vault_key":{"schema":{"curve":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"e":{"type":"TypeString","computed":true},"expiration_date":{"type":"TypeString","optional":true},"key_opts":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"key_size":{"type":"TypeInt","optional":true,"forceNew":true},"key_type":{"type":"TypeString","required":true,"forceNew":true},"key_vault_id":{"type":"TypeString","required":true,"forceNew":true},"n":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"not_before_date":{"type":"TypeString","optional":true},"public_key_openssh":{"type":"TypeString","computed":true},"public_key_pem":{"type":"TypeString","computed":true},"resource_id":{"type":"TypeString","computed":true},"resource_versionless_id":{"type":"TypeString","computed":true},"rotation_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"automatic":{"type":"TypeList","optional":true,"elem":{"schema":{"time_after_creation":{"type":"TypeString","optional":true},"time_before_expiry":{"type":"TypeString","optional":true}}},"maxItems":1},"expire_after":{"type":"TypeString","optional":true},"notify_before_expiry":{"type":"TypeString","optional":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"version":{"type":"TypeString","computed":true},"versionless_id":{"type":"TypeString","computed":true},"x":{"type":"TypeString","computed":true},"y":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":30,"delete":30,"update":30}},"azurerm_key_vault_managed_hardware_security_module":{"schema":{"admin_object_ids":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"hsm_uri":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_acls":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"bypass":{"type":"TypeString","required":true},"default_action":{"type":"TypeString","required":true}}},"maxItems":1},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"purge_protection_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"security_domain_encrypted_data":{"type":"TypeString","computed":true},"security_domain_key_vault_certificate_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":10,"minItems":3},"security_domain_quorum":{"type":"TypeInt","optional":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"soft_delete_retention_days":{"type":"TypeInt","optional":true,"default":90,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":30}},"azurerm_key_vault_managed_hardware_security_module_key":{"schema":{"curve":{"type":"TypeString","optional":true,"forceNew":true},"expiration_date":{"type":"TypeString","optional":true},"key_opts":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"key_size":{"type":"TypeInt","optional":true,"forceNew":true},"key_type":{"type":"TypeString","required":true,"forceNew":true},"managed_hsm_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"not_before_date":{"type":"TypeString","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"versioned_id":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_key_vault_managed_hardware_security_module_key_rotation_policy":{"schema":{"expire_after":{"type":"TypeString","required":true},"managed_hsm_key_id":{"type":"TypeString","required":true,"forceNew":true},"time_after_creation":{"type":"TypeString","optional":true},"time_before_expiry":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_key_vault_managed_hardware_security_module_role_assignment":{"schema":{"managed_hsm_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"principal_id":{"type":"TypeString","required":true,"forceNew":true},"resource_id":{"type":"TypeString","computed":true},"role_definition_id":{"type":"TypeString","required":true,"forceNew":true},"scope":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":10}},"azurerm_key_vault_managed_hardware_security_module_role_definition":{"schema":{"description":{"type":"TypeString","optional":true},"managed_hsm_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"permission":{"type":"TypeList","optional":true,"elem":{"schema":{"actions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_actions":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"not_actions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"not_data_actions":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"resource_manager_id":{"type":"TypeString","computed":true},"role_name":{"type":"TypeString","optional":true},"role_type":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":10,"update":10}},"azurerm_key_vault_managed_storage_account":{"schema":{"key_vault_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"regenerate_key_automatically":{"type":"TypeBool","optional":true,"default":false},"regeneration_period":{"type":"TypeString","optional":true},"storage_account_id":{"type":"TypeString","required":true},"storage_account_key":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_key_vault_managed_storage_account_sas_token_definition":{"schema":{"managed_storage_account_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"sas_template_uri":{"type":"TypeString","required":true},"sas_type":{"type":"TypeString","required":true},"secret_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"validity_period":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_key_vault_secret":{"schema":{"content_type":{"type":"TypeString","optional":true},"expiration_date":{"type":"TypeString","optional":true},"key_vault_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"not_before_date":{"type":"TypeString","optional":true},"resource_id":{"type":"TypeString","computed":true},"resource_versionless_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"value":{"type":"TypeString","required":true},"version":{"type":"TypeString","computed":true},"versionless_id":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":30,"delete":30,"update":30}},"azurerm_kubernetes_cluster":{"schema":{"aci_connector_linux":{"type":"TypeList","optional":true,"elem":{"schema":{"connector_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","computed":true},"object_id":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true}}}},"subnet_name":{"type":"TypeString","required":true}}},"maxItems":1},"api_server_access_profile":{"type":"TypeList","optional":true,"elem":{"schema":{"authorized_ip_ranges":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"auto_scaler_profile":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"balance_similar_node_groups":{"type":"TypeBool","optional":true,"default":false},"empty_bulk_delete_max":{"type":"TypeString","optional":true,"computed":true},"expander":{"type":"TypeString","optional":true,"default":"random"},"max_graceful_termination_sec":{"type":"TypeString","optional":true,"computed":true},"max_node_provisioning_time":{"type":"TypeString","optional":true,"default":"15m"},"max_unready_nodes":{"type":"TypeInt","optional":true,"default":3},"max_unready_percentage":{"type":"TypeFloat","optional":true,"default":45},"new_pod_scale_up_delay":{"type":"TypeString","optional":true,"computed":true},"scale_down_delay_after_add":{"type":"TypeString","optional":true,"computed":true},"scale_down_delay_after_delete":{"type":"TypeString","optional":true,"computed":true},"scale_down_delay_after_failure":{"type":"TypeString","optional":true,"computed":true},"scale_down_unneeded":{"type":"TypeString","optional":true,"computed":true},"scale_down_unready":{"type":"TypeString","optional":true,"computed":true},"scale_down_utilization_threshold":{"type":"TypeString","optional":true,"computed":true},"scan_interval":{"type":"TypeString","optional":true,"computed":true},"skip_nodes_with_local_storage":{"type":"TypeBool","optional":true,"default":false},"skip_nodes_with_system_pods":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"automatic_upgrade_channel":{"type":"TypeString","optional":true},"azure_active_directory_role_based_access_control":{"type":"TypeList","optional":true,"elem":{"schema":{"admin_group_object_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"azure_rbac_enabled":{"type":"TypeBool","optional":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"azure_policy_enabled":{"type":"TypeBool","optional":true},"confidential_computing":{"type":"TypeList","optional":true,"elem":{"schema":{"sgx_quote_helper_enabled":{"type":"TypeBool","required":true}}},"maxItems":1},"cost_analysis_enabled":{"type":"TypeBool","optional":true},"current_kubernetes_version":{"type":"TypeString","computed":true},"default_node_pool":{"type":"TypeList","required":true,"elem":{"schema":{"auto_scaling_enabled":{"type":"TypeBool","optional":true},"capacity_reservation_group_id":{"type":"TypeString","optional":true,"forceNew":true},"fips_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"gpu_instance":{"type":"TypeString","optional":true,"forceNew":true},"host_encryption_enabled":{"type":"TypeBool","optional":true},"host_group_id":{"type":"TypeString","optional":true,"forceNew":true},"kubelet_config":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_unsafe_sysctls":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"container_log_max_line":{"type":"TypeInt","optional":true},"container_log_max_size_mb":{"type":"TypeInt","optional":true},"cpu_cfs_quota_enabled":{"type":"TypeBool","optional":true,"default":true},"cpu_cfs_quota_period":{"type":"TypeString","optional":true},"cpu_manager_policy":{"type":"TypeString","optional":true},"image_gc_high_threshold":{"type":"TypeInt","optional":true},"image_gc_low_threshold":{"type":"TypeInt","optional":true},"pod_max_pid":{"type":"TypeInt","optional":true},"topology_manager_policy":{"type":"TypeString","optional":true}}},"maxItems":1},"kubelet_disk_type":{"type":"TypeString","optional":true,"computed":true},"linux_os_config":{"type":"TypeList","optional":true,"elem":{"schema":{"swap_file_size_mb":{"type":"TypeInt","optional":true},"sysctl_config":{"type":"TypeList","optional":true,"elem":{"schema":{"fs_aio_max_nr":{"type":"TypeInt","optional":true},"fs_file_max":{"type":"TypeInt","optional":true},"fs_inotify_max_user_watches":{"type":"TypeInt","optional":true},"fs_nr_open":{"type":"TypeInt","optional":true},"kernel_threads_max":{"type":"TypeInt","optional":true},"net_core_netdev_max_backlog":{"type":"TypeInt","optional":true},"net_core_optmem_max":{"type":"TypeInt","optional":true},"net_core_rmem_default":{"type":"TypeInt","optional":true},"net_core_rmem_max":{"type":"TypeInt","optional":true},"net_core_somaxconn":{"type":"TypeInt","optional":true},"net_core_wmem_default":{"type":"TypeInt","optional":true},"net_core_wmem_max":{"type":"TypeInt","optional":true},"net_ipv4_ip_local_port_range_max":{"type":"TypeInt","optional":true},"net_ipv4_ip_local_port_range_min":{"type":"TypeInt","optional":true},"net_ipv4_neigh_default_gc_thresh1":{"type":"TypeInt","optional":true},"net_ipv4_neigh_default_gc_thresh2":{"type":"TypeInt","optional":true},"net_ipv4_neigh_default_gc_thresh3":{"type":"TypeInt","optional":true},"net_ipv4_tcp_fin_timeout":{"type":"TypeInt","optional":true},"net_ipv4_tcp_keepalive_intvl":{"type":"TypeInt","optional":true},"net_ipv4_tcp_keepalive_probes":{"type":"TypeInt","optional":true},"net_ipv4_tcp_keepalive_time":{"type":"TypeInt","optional":true},"net_ipv4_tcp_max_syn_backlog":{"type":"TypeInt","optional":true},"net_ipv4_tcp_max_tw_buckets":{"type":"TypeInt","optional":true},"net_ipv4_tcp_tw_reuse":{"type":"TypeBool","optional":true},"net_netfilter_nf_conntrack_buckets":{"type":"TypeInt","optional":true},"net_netfilter_nf_conntrack_max":{"type":"TypeInt","optional":true},"vm_max_map_count":{"type":"TypeInt","optional":true},"vm_swappiness":{"type":"TypeInt","optional":true},"vm_vfs_cache_pressure":{"type":"TypeInt","optional":true}}},"maxItems":1},"transparent_huge_page_defrag":{"type":"TypeString","optional":true},"transparent_huge_page_enabled":{"type":"TypeString","optional":true}}},"maxItems":1},"max_count":{"type":"TypeInt","optional":true},"max_pods":{"type":"TypeInt","optional":true,"computed":true},"min_count":{"type":"TypeInt","optional":true},"name":{"type":"TypeString","required":true},"node_count":{"type":"TypeInt","optional":true,"computed":true},"node_labels":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"node_network_profile":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_host_ports":{"type":"TypeList","optional":true,"elem":{"schema":{"port_end":{"type":"TypeInt","optional":true},"port_start":{"type":"TypeInt","optional":true},"protocol":{"type":"TypeString","optional":true}}}},"application_security_group_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"node_public_ip_tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"node_public_ip_enabled":{"type":"TypeBool","optional":true},"node_public_ip_prefix_id":{"type":"TypeString","optional":true,"forceNew":true},"only_critical_addons_enabled":{"type":"TypeBool","optional":true},"orchestrator_version":{"type":"TypeString","optional":true,"computed":true},"os_disk_size_gb":{"type":"TypeInt","optional":true,"computed":true},"os_disk_type":{"type":"TypeString","optional":true,"default":"Managed"},"os_sku":{"type":"TypeString","optional":true,"computed":true},"pod_subnet_id":{"type":"TypeString","optional":true},"proximity_placement_group_id":{"type":"TypeString","optional":true,"forceNew":true},"scale_down_mode":{"type":"TypeString","optional":true,"default":"Delete"},"snapshot_id":{"type":"TypeString","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"temporary_name_for_rotation":{"type":"TypeString","optional":true},"type":{"type":"TypeString","optional":true,"default":"VirtualMachineScaleSets","forceNew":true},"ultra_ssd_enabled":{"type":"TypeBool","optional":true,"default":false},"upgrade_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"drain_timeout_in_minutes":{"type":"TypeInt","optional":true},"max_surge":{"type":"TypeString","required":true},"node_soak_duration_in_minutes":{"type":"TypeInt","optional":true}}},"maxItems":1},"vm_size":{"type":"TypeString","required":true},"vnet_subnet_id":{"type":"TypeString","optional":true},"workload_runtime":{"type":"TypeString","optional":true,"computed":true},"zones":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"dns_prefix":{"type":"TypeString","optional":true,"forceNew":true},"dns_prefix_private_cluster":{"type":"TypeString","optional":true,"forceNew":true},"edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"fqdn":{"type":"TypeString","computed":true},"http_application_routing_enabled":{"type":"TypeBool","optional":true},"http_application_routing_zone_name":{"type":"TypeString","computed":true},"http_proxy_config":{"type":"TypeList","optional":true,"elem":{"schema":{"http_proxy":{"type":"TypeString","optional":true},"https_proxy":{"type":"TypeString","optional":true},"no_proxy":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"trusted_ca":{"type":"TypeString","optional":true}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"image_cleaner_enabled":{"type":"TypeBool","optional":true},"image_cleaner_interval_hours":{"type":"TypeInt","optional":true},"ingress_application_gateway":{"type":"TypeList","optional":true,"elem":{"schema":{"effective_gateway_id":{"type":"TypeString","computed":true},"gateway_id":{"type":"TypeString","optional":true},"gateway_name":{"type":"TypeString","optional":true},"ingress_application_gateway_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","computed":true},"object_id":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true}}}},"subnet_cidr":{"type":"TypeString","optional":true},"subnet_id":{"type":"TypeString","optional":true}}},"maxItems":1},"key_management_service":{"type":"TypeList","optional":true,"elem":{"schema":{"key_vault_key_id":{"type":"TypeString","required":true},"key_vault_network_access":{"type":"TypeString","optional":true,"default":"Public"}}},"maxItems":1},"key_vault_secrets_provider":{"type":"TypeList","optional":true,"elem":{"schema":{"secret_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","computed":true},"object_id":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true}}}},"secret_rotation_enabled":{"type":"TypeBool","optional":true,"default":false},"secret_rotation_interval":{"type":"TypeString","optional":true,"default":"2m"}}},"maxItems":1},"kube_admin_config":{"type":"TypeList","computed":true,"elem":{"schema":{"client_certificate":{"type":"TypeString","computed":true},"client_key":{"type":"TypeString","computed":true},"cluster_ca_certificate":{"type":"TypeString","computed":true},"host":{"type":"TypeString","computed":true},"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"kube_admin_config_raw":{"type":"TypeString","computed":true},"kube_config":{"type":"TypeList","computed":true,"elem":{"schema":{"client_certificate":{"type":"TypeString","computed":true},"client_key":{"type":"TypeString","computed":true},"cluster_ca_certificate":{"type":"TypeString","computed":true},"host":{"type":"TypeString","computed":true},"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"kube_config_raw":{"type":"TypeString","computed":true},"kubelet_identity":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"object_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"user_assigned_identity_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}}},"maxItems":1},"kubernetes_version":{"type":"TypeString","optional":true,"computed":true},"linux_profile":{"type":"TypeList","optional":true,"elem":{"schema":{"admin_username":{"type":"TypeString","required":true,"forceNew":true},"ssh_key":{"type":"TypeList","required":true,"elem":{"schema":{"key_data":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"local_account_disabled":{"type":"TypeBool","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"maintenance_window":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed":{"type":"TypeSet","optional":true,"elem":{"schema":{"day":{"type":"TypeString","required":true},"hours":{"type":"TypeSet","required":true,"elem":{"type":"TypeInt"},"minItems":1}}}},"not_allowed":{"type":"TypeSet","optional":true,"elem":{"schema":{"end":{"type":"TypeString","required":true},"start":{"type":"TypeString","required":true}}}}}},"maxItems":1},"maintenance_window_auto_upgrade":{"type":"TypeList","optional":true,"elem":{"schema":{"day_of_month":{"type":"TypeInt","optional":true},"day_of_week":{"type":"TypeString","optional":true},"duration":{"type":"TypeInt","required":true},"frequency":{"type":"TypeString","required":true},"interval":{"type":"TypeInt","required":true},"not_allowed":{"type":"TypeSet","optional":true,"elem":{"schema":{"end":{"type":"TypeString","required":true},"start":{"type":"TypeString","required":true}}}},"start_date":{"type":"TypeString","optional":true,"computed":true},"start_time":{"type":"TypeString","optional":true},"utc_offset":{"type":"TypeString","optional":true},"week_index":{"type":"TypeString","optional":true}}},"maxItems":1},"maintenance_window_node_os":{"type":"TypeList","optional":true,"elem":{"schema":{"day_of_month":{"type":"TypeInt","optional":true},"day_of_week":{"type":"TypeString","optional":true},"duration":{"type":"TypeInt","required":true},"frequency":{"type":"TypeString","required":true},"interval":{"type":"TypeInt","required":true},"not_allowed":{"type":"TypeSet","optional":true,"elem":{"schema":{"end":{"type":"TypeString","required":true},"start":{"type":"TypeString","required":true}}}},"start_date":{"type":"TypeString","optional":true,"computed":true},"start_time":{"type":"TypeString","optional":true},"utc_offset":{"type":"TypeString","optional":true},"week_index":{"type":"TypeString","optional":true}}},"maxItems":1},"microsoft_defender":{"type":"TypeList","optional":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true}}},"maxItems":1},"monitor_metrics":{"type":"TypeList","optional":true,"elem":{"schema":{"annotations_allowed":{"type":"TypeString","optional":true},"labels_allowed":{"type":"TypeString","optional":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network_profile":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"schema":{"dns_service_ip":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"ip_versions":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"type":"TypeString"}},"load_balancer_profile":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"schema":{"effective_outbound_ips":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"idle_timeout_in_minutes":{"type":"TypeInt","optional":true,"default":30},"managed_outbound_ip_count":{"type":"TypeInt","optional":true,"computed":true},"managed_outbound_ipv6_count":{"type":"TypeInt","optional":true,"computed":true},"outbound_ip_address_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"outbound_ip_prefix_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"outbound_ports_allocated":{"type":"TypeInt","optional":true,"default":0}}},"maxItems":1},"load_balancer_sku":{"type":"TypeString","optional":true,"default":"standard","forceNew":true},"nat_gateway_profile":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"schema":{"effective_outbound_ips":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"idle_timeout_in_minutes":{"type":"TypeInt","optional":true,"default":4},"managed_outbound_ip_count":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"network_data_plane":{"type":"TypeString","optional":true,"default":"azure"},"network_mode":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"network_plugin":{"type":"TypeString","required":true,"forceNew":true},"network_plugin_mode":{"type":"TypeString","optional":true},"network_policy":{"type":"TypeString","optional":true,"computed":true},"outbound_type":{"type":"TypeString","optional":true,"default":"loadBalancer"},"pod_cidr":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"pod_cidrs":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"type":"TypeString"}},"service_cidr":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"service_cidrs":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"node_os_upgrade_channel":{"type":"TypeString","optional":true,"default":"NodeImage"},"node_resource_group":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"node_resource_group_id":{"type":"TypeString","computed":true},"oidc_issuer_enabled":{"type":"TypeBool","optional":true},"oidc_issuer_url":{"type":"TypeString","computed":true},"oms_agent":{"type":"TypeList","optional":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true},"msi_auth_for_monitoring_enabled":{"type":"TypeBool","optional":true},"oms_agent_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","computed":true},"object_id":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true}}}}}},"maxItems":1},"open_service_mesh_enabled":{"type":"TypeBool","optional":true},"portal_fqdn":{"type":"TypeString","computed":true},"private_cluster_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"private_cluster_public_fqdn_enabled":{"type":"TypeBool","optional":true,"default":false},"private_dns_zone_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"private_fqdn":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"role_based_access_control_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"run_command_enabled":{"type":"TypeBool","optional":true,"default":true},"service_mesh_profile":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate_authority":{"type":"TypeList","optional":true,"elem":{"schema":{"cert_chain_object_name":{"type":"TypeString","required":true},"cert_object_name":{"type":"TypeString","required":true},"key_object_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","required":true},"root_cert_object_name":{"type":"TypeString","required":true}}},"maxItems":1},"external_ingress_gateway_enabled":{"type":"TypeBool","optional":true},"internal_ingress_gateway_enabled":{"type":"TypeBool","optional":true},"mode":{"type":"TypeString","required":true},"revisions":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":2,"minItems":1}}},"maxItems":1},"service_principal":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true}}},"maxItems":1},"sku_tier":{"type":"TypeString","optional":true,"default":"Free"},"storage_profile":{"type":"TypeList","optional":true,"elem":{"schema":{"blob_driver_enabled":{"type":"TypeBool","optional":true,"default":false},"disk_driver_enabled":{"type":"TypeBool","optional":true,"default":true},"file_driver_enabled":{"type":"TypeBool","optional":true,"default":true},"snapshot_controller_enabled":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"support_plan":{"type":"TypeString","optional":true,"default":"KubernetesOfficial"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"web_app_routing":{"type":"TypeList","optional":true,"elem":{"schema":{"dns_zone_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"web_app_routing_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","computed":true},"object_id":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true}}}}}},"maxItems":1},"windows_profile":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"admin_password":{"type":"TypeString","required":true},"admin_username":{"type":"TypeString","required":true,"forceNew":true},"gmsa":{"type":"TypeList","optional":true,"elem":{"schema":{"dns_server":{"type":"TypeString","required":true},"root_domain":{"type":"TypeString","required":true}}},"maxItems":1},"license":{"type":"TypeString","optional":true}}},"maxItems":1},"workload_autoscaler_profile":{"type":"TypeList","optional":true,"elem":{"schema":{"keda_enabled":{"type":"TypeBool","optional":true,"default":false},"vertical_pod_autoscaler_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"workload_identity_enabled":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_kubernetes_cluster_extension":{"schema":{"aks_assigned_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"cluster_id":{"type":"TypeString","required":true,"forceNew":true},"configuration_protected_settings":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"configuration_settings":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"current_version":{"type":"TypeString","computed":true},"extension_type":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"plan":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"product":{"type":"TypeString","required":true,"forceNew":true},"promotion_code":{"type":"TypeString","optional":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"release_namespace":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"release_train":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"target_namespace":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"version":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_kubernetes_cluster_node_pool":{"schema":{"auto_scaling_enabled":{"type":"TypeBool","optional":true},"capacity_reservation_group_id":{"type":"TypeString","optional":true,"forceNew":true},"eviction_policy":{"type":"TypeString","optional":true,"forceNew":true},"fips_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"gpu_instance":{"type":"TypeString","optional":true,"forceNew":true},"host_encryption_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"host_group_id":{"type":"TypeString","optional":true,"forceNew":true},"kubelet_config":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"allowed_unsafe_sysctls":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"container_log_max_line":{"type":"TypeInt","optional":true,"forceNew":true},"container_log_max_size_mb":{"type":"TypeInt","optional":true,"forceNew":true},"cpu_cfs_quota_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"cpu_cfs_quota_period":{"type":"TypeString","optional":true,"forceNew":true},"cpu_manager_policy":{"type":"TypeString","optional":true,"forceNew":true},"image_gc_high_threshold":{"type":"TypeInt","optional":true,"forceNew":true},"image_gc_low_threshold":{"type":"TypeInt","optional":true,"forceNew":true},"pod_max_pid":{"type":"TypeInt","optional":true,"forceNew":true},"topology_manager_policy":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"kubelet_disk_type":{"type":"TypeString","optional":true,"computed":true},"kubernetes_cluster_id":{"type":"TypeString","required":true,"forceNew":true},"linux_os_config":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"swap_file_size_mb":{"type":"TypeInt","optional":true,"forceNew":true},"sysctl_config":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"fs_aio_max_nr":{"type":"TypeInt","optional":true,"forceNew":true},"fs_file_max":{"type":"TypeInt","optional":true,"forceNew":true},"fs_inotify_max_user_watches":{"type":"TypeInt","optional":true,"forceNew":true},"fs_nr_open":{"type":"TypeInt","optional":true,"forceNew":true},"kernel_threads_max":{"type":"TypeInt","optional":true,"forceNew":true},"net_core_netdev_max_backlog":{"type":"TypeInt","optional":true,"forceNew":true},"net_core_optmem_max":{"type":"TypeInt","optional":true,"forceNew":true},"net_core_rmem_default":{"type":"TypeInt","optional":true,"forceNew":true},"net_core_rmem_max":{"type":"TypeInt","optional":true,"forceNew":true},"net_core_somaxconn":{"type":"TypeInt","optional":true,"forceNew":true},"net_core_wmem_default":{"type":"TypeInt","optional":true,"forceNew":true},"net_core_wmem_max":{"type":"TypeInt","optional":true,"forceNew":true},"net_ipv4_ip_local_port_range_max":{"type":"TypeInt","optional":true,"forceNew":true},"net_ipv4_ip_local_port_range_min":{"type":"TypeInt","optional":true,"forceNew":true},"net_ipv4_neigh_default_gc_thresh1":{"type":"TypeInt","optional":true,"forceNew":true},"net_ipv4_neigh_default_gc_thresh2":{"type":"TypeInt","optional":true,"forceNew":true},"net_ipv4_neigh_default_gc_thresh3":{"type":"TypeInt","optional":true,"forceNew":true},"net_ipv4_tcp_fin_timeout":{"type":"TypeInt","optional":true,"forceNew":true},"net_ipv4_tcp_keepalive_intvl":{"type":"TypeInt","optional":true,"forceNew":true},"net_ipv4_tcp_keepalive_probes":{"type":"TypeInt","optional":true,"forceNew":true},"net_ipv4_tcp_keepalive_time":{"type":"TypeInt","optional":true,"forceNew":true},"net_ipv4_tcp_max_syn_backlog":{"type":"TypeInt","optional":true,"forceNew":true},"net_ipv4_tcp_max_tw_buckets":{"type":"TypeInt","optional":true,"forceNew":true},"net_ipv4_tcp_tw_reuse":{"type":"TypeBool","optional":true,"forceNew":true},"net_netfilter_nf_conntrack_buckets":{"type":"TypeInt","optional":true,"forceNew":true},"net_netfilter_nf_conntrack_max":{"type":"TypeInt","optional":true,"forceNew":true},"vm_max_map_count":{"type":"TypeInt","optional":true,"forceNew":true},"vm_swappiness":{"type":"TypeInt","optional":true,"forceNew":true},"vm_vfs_cache_pressure":{"type":"TypeInt","optional":true,"forceNew":true}}},"maxItems":1},"transparent_huge_page_defrag":{"type":"TypeString","optional":true,"forceNew":true},"transparent_huge_page_enabled":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"max_count":{"type":"TypeInt","optional":true},"max_pods":{"type":"TypeInt","optional":true,"computed":true,"forceNew":true},"min_count":{"type":"TypeInt","optional":true},"mode":{"type":"TypeString","optional":true,"default":"User"},"name":{"type":"TypeString","required":true,"forceNew":true},"node_count":{"type":"TypeInt","optional":true,"computed":true},"node_labels":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"node_network_profile":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_host_ports":{"type":"TypeList","optional":true,"elem":{"schema":{"port_end":{"type":"TypeInt","optional":true},"port_start":{"type":"TypeInt","optional":true},"protocol":{"type":"TypeString","optional":true}}}},"application_security_group_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"node_public_ip_tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"node_public_ip_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"node_public_ip_prefix_id":{"type":"TypeString","optional":true,"forceNew":true},"node_taints":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"orchestrator_version":{"type":"TypeString","optional":true,"computed":true},"os_disk_size_gb":{"type":"TypeInt","optional":true,"computed":true,"forceNew":true},"os_disk_type":{"type":"TypeString","optional":true,"default":"Managed","forceNew":true},"os_sku":{"type":"TypeString","optional":true,"computed":true},"os_type":{"type":"TypeString","optional":true,"default":"Linux","forceNew":true},"pod_subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"priority":{"type":"TypeString","optional":true,"default":"Regular","forceNew":true},"proximity_placement_group_id":{"type":"TypeString","optional":true,"forceNew":true},"scale_down_mode":{"type":"TypeString","optional":true,"default":"Delete"},"snapshot_id":{"type":"TypeString","optional":true,"forceNew":true},"spot_max_price":{"type":"TypeFloat","optional":true,"default":-1,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ultra_ssd_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"upgrade_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"drain_timeout_in_minutes":{"type":"TypeInt","optional":true},"max_surge":{"type":"TypeString","required":true},"node_soak_duration_in_minutes":{"type":"TypeInt","optional":true}}},"maxItems":1},"vm_size":{"type":"TypeString","required":true,"forceNew":true},"vnet_subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"windows_profile":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"outbound_nat_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true}}},"maxItems":1},"workload_runtime":{"type":"TypeString","optional":true},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_kubernetes_cluster_trusted_access_role_binding":{"schema":{"kubernetes_cluster_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"roles":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"source_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_kubernetes_fleet_manager":{"schema":{"hub_profile":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"dns_prefix":{"type":"TypeString","required":true},"fqdn":{"type":"TypeString","computed":true},"kubernetes_version":{"type":"TypeString","computed":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_kubernetes_fleet_member":{"schema":{"group":{"type":"TypeString","optional":true},"kubernetes_cluster_id":{"type":"TypeString","required":true,"forceNew":true},"kubernetes_fleet_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_kubernetes_fleet_update_run":{"schema":{"fleet_update_strategy_id":{"type":"TypeString","optional":true},"kubernetes_fleet_manager_id":{"type":"TypeString","required":true,"forceNew":true},"managed_cluster_update":{"type":"TypeList","required":true,"elem":{"schema":{"node_image_selection":{"type":"TypeList","optional":true,"elem":{"schema":{"type":{"type":"TypeString","required":true}}},"maxItems":1},"upgrade":{"type":"TypeList","required":true,"elem":{"schema":{"kubernetes_version":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"stage":{"type":"TypeList","optional":true,"elem":{"schema":{"after_stage_wait_in_seconds":{"type":"TypeInt","optional":true},"group":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true}}},"minItems":1},"name":{"type":"TypeString","required":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_kubernetes_fleet_update_strategy":{"schema":{"kubernetes_fleet_manager_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"stage":{"type":"TypeList","required":true,"elem":{"schema":{"after_stage_wait_in_seconds":{"type":"TypeInt","optional":true},"group":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true}}},"minItems":1},"name":{"type":"TypeString","required":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_kubernetes_flux_configuration":{"schema":{"blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"account_key":{"type":"TypeString","optional":true},"container_id":{"type":"TypeString","required":true},"local_auth_reference":{"type":"TypeString","optional":true},"managed_identity":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true}}},"maxItems":1},"sas_token":{"type":"TypeString","optional":true},"service_principal":{"type":"TypeList","optional":true,"elem":{"schema":{"client_certificate_base64":{"type":"TypeString","optional":true},"client_certificate_password":{"type":"TypeString","optional":true},"client_certificate_send_chain":{"type":"TypeBool","optional":true,"default":false},"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","optional":true},"tenant_id":{"type":"TypeString","required":true}}},"maxItems":1},"sync_interval_in_seconds":{"type":"TypeInt","optional":true,"default":600},"timeout_in_seconds":{"type":"TypeInt","optional":true,"default":600}}},"maxItems":1},"bucket":{"type":"TypeList","optional":true,"elem":{"schema":{"access_key":{"type":"TypeString","optional":true},"bucket_name":{"type":"TypeString","required":true},"local_auth_reference":{"type":"TypeString","optional":true},"secret_key_base64":{"type":"TypeString","optional":true},"sync_interval_in_seconds":{"type":"TypeInt","optional":true,"default":600},"timeout_in_seconds":{"type":"TypeInt","optional":true,"default":600},"tls_enabled":{"type":"TypeBool","optional":true,"default":true},"url":{"type":"TypeString","required":true}}},"maxItems":1},"cluster_id":{"type":"TypeString","required":true,"forceNew":true},"continuous_reconciliation_enabled":{"type":"TypeBool","optional":true,"default":true},"git_repository":{"type":"TypeList","optional":true,"elem":{"schema":{"https_ca_cert_base64":{"type":"TypeString","optional":true},"https_key_base64":{"type":"TypeString","optional":true},"https_user":{"type":"TypeString","optional":true},"local_auth_reference":{"type":"TypeString","optional":true},"reference_type":{"type":"TypeString","required":true},"reference_value":{"type":"TypeString","required":true},"ssh_known_hosts_base64":{"type":"TypeString","optional":true},"ssh_private_key_base64":{"type":"TypeString","optional":true},"sync_interval_in_seconds":{"type":"TypeInt","optional":true,"default":600},"timeout_in_seconds":{"type":"TypeInt","optional":true,"default":600},"url":{"type":"TypeString","required":true}}},"maxItems":1},"kustomizations":{"type":"TypeSet","required":true,"elem":{"schema":{"depends_on":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"garbage_collection_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true},"recreating_enabled":{"type":"TypeBool","optional":true,"default":false},"retry_interval_in_seconds":{"type":"TypeInt","optional":true,"default":600},"sync_interval_in_seconds":{"type":"TypeInt","optional":true,"default":600},"timeout_in_seconds":{"type":"TypeInt","optional":true,"default":600}}},"minItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace":{"type":"TypeString","required":true,"forceNew":true},"scope":{"type":"TypeString","optional":true,"default":"namespace","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_kusto_attached_database_configuration":{"schema":{"attached_database_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"cluster_name":{"type":"TypeString","required":true,"forceNew":true},"cluster_resource_id":{"type":"TypeString","required":true,"forceNew":true},"database_name":{"type":"TypeString","required":true,"forceNew":true},"default_principal_modification_kind":{"type":"TypeString","optional":true,"default":"None"},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sharing":{"type":"TypeList","optional":true,"elem":{"schema":{"external_tables_to_exclude":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"external_tables_to_include":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"materialized_views_to_exclude":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"materialized_views_to_include":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"tables_to_exclude":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"tables_to_include":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_kusto_cluster":{"schema":{"allowed_fqdns":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"allowed_ip_ranges":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"auto_stop_enabled":{"type":"TypeBool","optional":true,"default":true},"data_ingestion_uri":{"type":"TypeString","computed":true},"disk_encryption_enabled":{"type":"TypeBool","optional":true,"default":false},"double_encryption_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"language_extensions":{"type":"TypeList","optional":true,"elem":{"schema":{"image":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"optimized_auto_scale":{"type":"TypeList","optional":true,"elem":{"schema":{"maximum_instances":{"type":"TypeInt","required":true},"minimum_instances":{"type":"TypeInt","required":true}}},"maxItems":1},"outbound_network_access_restricted":{"type":"TypeBool","optional":true,"default":false},"public_ip_type":{"type":"TypeString","optional":true,"default":"IPv4"},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"purge_enabled":{"type":"TypeBool","optional":true,"default":false},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeList","required":true,"elem":{"schema":{"capacity":{"type":"TypeInt","optional":true,"computed":true},"name":{"type":"TypeString","required":true}}},"maxItems":1},"streaming_ingestion_enabled":{"type":"TypeBool","optional":true,"default":false},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"trusted_external_tenants":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"type":"TypeString"}},"uri":{"type":"TypeString","computed":true},"virtual_network_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"data_management_public_ip_id":{"type":"TypeString","required":true,"forceNew":true},"engine_public_ip_id":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_kusto_cluster_customer_managed_key":{"schema":{"cluster_id":{"type":"TypeString","required":true,"forceNew":true},"key_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","required":true},"key_version":{"type":"TypeString","optional":true},"user_identity":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_kusto_cluster_managed_private_endpoint":{"schema":{"cluster_name":{"type":"TypeString","required":true,"forceNew":true},"group_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_link_resource_id":{"type":"TypeString","required":true,"forceNew":true},"private_link_resource_region":{"type":"TypeString","optional":true,"forceNew":true},"request_message":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_kusto_cluster_principal_assignment":{"schema":{"cluster_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"principal_id":{"type":"TypeString","required":true,"forceNew":true},"principal_name":{"type":"TypeString","computed":true},"principal_type":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"role":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","required":true,"forceNew":true},"tenant_name":{"type":"TypeString","computed":true}},"timeouts":{"create":60,"read":5,"delete":60}},"azurerm_kusto_cosmosdb_data_connection":{"schema":{"cosmosdb_container_id":{"type":"TypeString","required":true,"forceNew":true},"kusto_database_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_identity_id":{"type":"TypeString","required":true,"forceNew":true},"mapping_rule_name":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"retrieval_start_date":{"type":"TypeString","optional":true,"forceNew":true},"table_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_kusto_database":{"schema":{"cluster_name":{"type":"TypeString","required":true,"forceNew":true},"hot_cache_period":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"size":{"type":"TypeFloat","computed":true},"soft_delete_period":{"type":"TypeString","optional":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_kusto_database_principal_assignment":{"schema":{"cluster_name":{"type":"TypeString","required":true,"forceNew":true},"database_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"principal_id":{"type":"TypeString","required":true,"forceNew":true},"principal_name":{"type":"TypeString","computed":true},"principal_type":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"role":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","required":true,"forceNew":true},"tenant_name":{"type":"TypeString","computed":true}},"timeouts":{"create":60,"read":5,"delete":60}},"azurerm_kusto_eventgrid_data_connection":{"schema":{"blob_storage_event_type":{"type":"TypeString","optional":true,"default":"Microsoft.Storage.BlobCreated"},"cluster_name":{"type":"TypeString","required":true,"forceNew":true},"data_format":{"type":"TypeString","optional":true},"database_name":{"type":"TypeString","required":true,"forceNew":true},"database_routing_type":{"type":"TypeString","optional":true,"default":"Single","forceNew":true},"eventgrid_resource_id":{"type":"TypeString","optional":true},"eventhub_consumer_group_name":{"type":"TypeString","required":true,"forceNew":true},"eventhub_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_identity_resource_id":{"type":"TypeString","optional":true},"mapping_rule_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"skip_first_record":{"type":"TypeBool","optional":true,"default":false},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true},"table_name":{"type":"TypeString","optional":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_kusto_eventhub_data_connection":{"schema":{"cluster_name":{"type":"TypeString","required":true,"forceNew":true},"compression":{"type":"TypeString","optional":true,"default":"None","forceNew":true},"consumer_group":{"type":"TypeString","required":true,"forceNew":true},"data_format":{"type":"TypeString","optional":true},"database_name":{"type":"TypeString","required":true,"forceNew":true},"database_routing_type":{"type":"TypeString","optional":true,"default":"Single","forceNew":true},"event_system_properties":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"eventhub_id":{"type":"TypeString","required":true,"forceNew":true},"identity_id":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"mapping_rule_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"table_name":{"type":"TypeString","optional":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_kusto_iothub_data_connection":{"schema":{"cluster_name":{"type":"TypeString","required":true,"forceNew":true},"consumer_group":{"type":"TypeString","required":true,"forceNew":true},"data_format":{"type":"TypeString","optional":true,"forceNew":true},"database_name":{"type":"TypeString","required":true,"forceNew":true},"database_routing_type":{"type":"TypeString","optional":true,"default":"Single","forceNew":true},"event_system_properties":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"iothub_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"mapping_rule_name":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"shared_access_policy_name":{"type":"TypeString","required":true,"forceNew":true},"table_name":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60}},"azurerm_kusto_script":{"schema":{"continue_on_errors_enabled":{"type":"TypeBool","optional":true,"default":false},"database_id":{"type":"TypeString","required":true,"forceNew":true},"force_an_update_when_value_changed":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"sas_token":{"type":"TypeString","optional":true,"forceNew":true},"script_content":{"type":"TypeString","optional":true,"forceNew":true},"url":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_lb":{"schema":{"edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"frontend_ip_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"gateway_load_balancer_frontend_ip_configuration_id":{"type":"TypeString","optional":true,"computed":true},"id":{"type":"TypeString","computed":true},"inbound_nat_rules":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"load_balancer_rules":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"outbound_rules":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"private_ip_address":{"type":"TypeString","optional":true,"computed":true},"private_ip_address_allocation":{"type":"TypeString","optional":true,"computed":true},"private_ip_address_version":{"type":"TypeString","optional":true,"computed":true},"public_ip_address_id":{"type":"TypeString","optional":true,"computed":true},"public_ip_prefix_id":{"type":"TypeString","optional":true,"computed":true},"subnet_id":{"type":"TypeString","optional":true,"computed":true},"zones":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"minItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","optional":true,"default":"Standard","forceNew":true},"sku_tier":{"type":"TypeString","optional":true,"default":"Regional","forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_lb_backend_address_pool":{"schema":{"backend_ip_configurations":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"inbound_nat_rules":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"load_balancing_rules":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"loadbalancer_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"outbound_rules":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"synchronous_mode":{"type":"TypeString","optional":true,"forceNew":true},"tunnel_interface":{"type":"TypeList","optional":true,"elem":{"schema":{"identifier":{"type":"TypeInt","required":true},"port":{"type":"TypeInt","required":true},"protocol":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}},"minItems":1},"virtual_network_id":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_lb_backend_address_pool_address":{"schema":{"backend_address_ip_configuration_id":{"type":"TypeString","optional":true,"description":"For global load balancer, user needs to specify the `backend_address_ip_configuration_id` of the added regional load balancers"},"backend_address_pool_id":{"type":"TypeString","required":true,"forceNew":true},"inbound_nat_rule_port_mapping":{"type":"TypeList","computed":true,"elem":{"schema":{"backend_port":{"type":"TypeInt","computed":true},"frontend_port":{"type":"TypeInt","computed":true},"inbound_nat_rule_name":{"type":"TypeString","computed":true}}}},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_lb_nat_pool":{"schema":{"backend_port":{"type":"TypeInt","required":true},"floating_ip_enabled":{"type":"TypeBool","optional":true},"frontend_ip_configuration_id":{"type":"TypeString","computed":true},"frontend_ip_configuration_name":{"type":"TypeString","required":true},"frontend_port_end":{"type":"TypeInt","required":true},"frontend_port_start":{"type":"TypeInt","required":true},"idle_timeout_in_minutes":{"type":"TypeInt","optional":true,"default":4},"loadbalancer_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"protocol":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tcp_reset_enabled":{"type":"TypeBool","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_lb_nat_rule":{"schema":{"backend_address_pool_id":{"type":"TypeString","optional":true},"backend_ip_configuration_id":{"type":"TypeString","computed":true},"backend_port":{"type":"TypeInt","required":true},"enable_floating_ip":{"type":"TypeBool","optional":true,"computed":true},"enable_tcp_reset":{"type":"TypeBool","optional":true},"frontend_ip_configuration_id":{"type":"TypeString","computed":true},"frontend_ip_configuration_name":{"type":"TypeString","required":true},"frontend_port":{"type":"TypeInt","optional":true},"frontend_port_end":{"type":"TypeInt","optional":true},"frontend_port_start":{"type":"TypeInt","optional":true},"idle_timeout_in_minutes":{"type":"TypeInt","optional":true,"default":4},"loadbalancer_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"protocol":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_lb_outbound_rule":{"schema":{"allocated_outbound_ports":{"type":"TypeInt","optional":true,"default":1024},"backend_address_pool_id":{"type":"TypeString","required":true},"enable_tcp_reset":{"type":"TypeBool","optional":true,"default":false},"frontend_ip_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true}}},"minItems":1},"idle_timeout_in_minutes":{"type":"TypeInt","optional":true,"default":4},"loadbalancer_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"protocol":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_lb_probe":{"schema":{"interval_in_seconds":{"type":"TypeInt","optional":true,"default":15},"load_balancer_rules":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"loadbalancer_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"number_of_probes":{"type":"TypeInt","optional":true,"default":2},"port":{"type":"TypeInt","required":true},"probe_threshold":{"type":"TypeInt","optional":true,"default":1},"protocol":{"type":"TypeString","optional":true,"default":"Tcp"},"request_path":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_lb_rule":{"schema":{"backend_address_pool_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":2,"minItems":1},"backend_port":{"type":"TypeInt","required":true},"disable_outbound_snat":{"type":"TypeBool","optional":true,"default":false},"enable_floating_ip":{"type":"TypeBool","optional":true,"default":false},"enable_tcp_reset":{"type":"TypeBool","optional":true},"frontend_ip_configuration_id":{"type":"TypeString","computed":true},"frontend_ip_configuration_name":{"type":"TypeString","required":true},"frontend_port":{"type":"TypeInt","required":true},"idle_timeout_in_minutes":{"type":"TypeInt","optional":true,"default":4},"load_distribution":{"type":"TypeString","optional":true,"default":"Default"},"loadbalancer_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"probe_id":{"type":"TypeString","optional":true},"protocol":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_lighthouse_assignment":{"schema":{"lighthouse_definition_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"scope":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_lighthouse_definition":{"schema":{"authorization":{"type":"TypeSet","required":true,"elem":{"schema":{"delegated_role_definition_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_display_name":{"type":"TypeString","optional":true},"principal_id":{"type":"TypeString","required":true},"role_definition_id":{"type":"TypeString","required":true}}},"minItems":1},"description":{"type":"TypeString","optional":true},"eligible_authorization":{"type":"TypeSet","optional":true,"elem":{"schema":{"just_in_time_access_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"approver":{"type":"TypeSet","optional":true,"elem":{"schema":{"principal_display_name":{"type":"TypeString","optional":true},"principal_id":{"type":"TypeString","required":true}}}},"maximum_activation_duration":{"type":"TypeString","optional":true,"default":"PT8H"},"multi_factor_auth_provider":{"type":"TypeString","optional":true}}},"maxItems":1},"principal_display_name":{"type":"TypeString","optional":true},"principal_id":{"type":"TypeString","required":true},"role_definition_id":{"type":"TypeString","required":true}}}},"lighthouse_definition_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"managing_tenant_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"plan":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"product":{"type":"TypeString","required":true},"publisher":{"type":"TypeString","required":true},"version":{"type":"TypeString","required":true}}},"maxItems":1},"scope":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_linux_function_app":{"schema":{"app_settings":{"type":"TypeMap","optional":true,"description":"A map of key-value pairs for [App Settings](https://docs.microsoft.com/en-us/azure/azure-functions/functions-app-settings) and custom values.","elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`."}}},"maxItems":1},"additional_login_parameters":{"type":"TypeMap","optional":true,"description":"Specifies a map of Login Parameters to send to the OpenID Connect authorization endpoint when a user logs in.","elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","optional":true,"description":"The default authentication provider to use when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`.","computed":true},"enabled":{"type":"TypeBool","required":true,"description":"Should the Authentication / Authorization feature be enabled?"},"facebook":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret":{"type":"TypeString","optional":true,"description":"The App Secret of the Facebook app used for Facebook Login. Cannot be specified with `app_secret_setting_name`."},"app_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login. Cannot be specified with `app_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"github":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret of the GitHub app used for GitHub Login. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret":{"type":"TypeString","optional":true,"description":"The client secret associated with the Google web application. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for Google Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","elem":{"type":"TypeString"}}}},"maxItems":1},"issuer":{"type":"TypeString","optional":true,"description":"The OpenID Connect Issuer URI that represents the entity which issues access tokens."},"microsoft":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret":{"type":"TypeString","optional":true,"description":"The OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"The list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, `wl.basic` is used as the default scope.","elem":{"type":"TypeString"}}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true,"description":"The RuntimeVersion of the Authentication / Authorization feature in use.","computed":true},"token_refresh_extension_hours":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Windows Web App durably store platform-specific security tokens that are obtained during login flows? Defaults to `false`."},"twitter":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret":{"type":"TypeString","optional":true,"description":"The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`."},"consumer_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`."}}},"maxItems":1},"unauthenticated_client_action":{"type":"TypeString","optional":true,"description":"The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`.","computed":true}}},"maxItems":1},"auth_settings_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_applications":{"type":"TypeList","optional":true,"description":"The list of allowed Applications for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"allowed_groups":{"type":"TypeList","optional":true,"description":"The list of allowed Group Names for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_identities":{"type":"TypeList","optional":true,"description":"The list of allowed Identities for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret_certificate_thumbprint":{"type":"TypeString","optional":true,"description":"The thumbprint of the certificate used for signing purposes."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client."},"jwt_allowed_client_applications":{"type":"TypeList","optional":true,"description":"A list of Allowed Client Applications in the JWT Claim.","elem":{"type":"TypeString"}},"jwt_allowed_groups":{"type":"TypeList","optional":true,"description":"A list of Allowed Groups in the JWT Claim.","elem":{"type":"TypeString"}},"login_parameters":{"type":"TypeMap","optional":true,"description":"A map of key-value pairs to send to the Authorisation Endpoint when a user logs in.","elem":{"type":"TypeString"}},"tenant_auth_endpoint":{"type":"TypeString","required":true,"description":"The Azure Tenant Endpoint for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`."},"www_authentication_disabled":{"type":"TypeBool","optional":true,"description":"Should the www-authenticate provider should be omitted from the request? Defaults to `false`"}}},"maxItems":1},"apple_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Apple web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Apple Login."},"login_scopes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"auth_enabled":{"type":"TypeBool","optional":true,"description":"Should the AuthV2 Settings be enabled. Defaults to `false`"},"azure_static_web_app_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Static Web App Authentication."}}},"maxItems":1},"config_file_path":{"type":"TypeString","optional":true,"description":"The path to the App Auth settings. **Note:** Relative Paths are evaluated from the Site Root directory."},"custom_oidc_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"authorisation_endpoint":{"type":"TypeString","description":"The endpoint to make the Authorisation Request.","computed":true},"certification_uri":{"type":"TypeString","description":"The endpoint that provides the keys necessary to validate the token.","computed":true},"client_credential_method":{"type":"TypeString","description":"The Client Credential Method used. Currently the only supported value is `ClientSecretPost`.","computed":true},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with this Custom OIDC."},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the secret for this Custom OIDC Client.","computed":true},"issuer_endpoint":{"type":"TypeString","description":"The endpoint that issued the Token.","computed":true},"name":{"type":"TypeString","required":true,"description":"The name of the Custom OIDC Authentication Provider."},"name_claim_type":{"type":"TypeString","optional":true,"description":"The name of the claim that contains the users name."},"openid_configuration_endpoint":{"type":"TypeString","required":true,"description":"The endpoint that contains all the configuration endpoints for this Custom OIDC provider."},"scopes":{"type":"TypeList","optional":true,"description":"The list of the scopes that should be requested while authenticating.","elem":{"type":"TypeString"}},"token_endpoint":{"type":"TypeString","description":"The endpoint used to request a Token.","computed":true}}}},"default_provider":{"type":"TypeString","optional":true,"description":"The Default Authentication Provider to use when the `unauthenticated_action` is set to `RedirectToLoginPage`. Possible values include: `apple`, `azureactivedirectory`, `facebook`, `github`, `google`, `twitter` and the `name` of your `custom_oidc_v2` provider."},"excluded_paths":{"type":"TypeList","optional":true,"description":"The paths which should be excluded from the `unauthenticated_action` when it is set to `RedirectToLoginPage`.","elem":{"type":"TypeString"}},"facebook_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login."},"graph_api_version":{"type":"TypeString","optional":true,"description":"The version of the Facebook API to be used while logging in.","computed":true},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"forward_proxy_convention":{"type":"TypeString","optional":true,"default":"NoProxy","description":"The convention used to determine the url of the request made. Possible values include `ForwardProxyConventionNoProxy`, `ForwardProxyConventionStandard`, `ForwardProxyConventionCustom`. Defaults to `ForwardProxyConventionNoProxy`"},"forward_proxy_custom_host_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the host of the request."},"forward_proxy_custom_scheme_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the scheme of the request."},"github_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Google Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of Login scopes that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"http_route_api_prefix":{"type":"TypeString","optional":true,"default":"/.auth","description":"The prefix that should precede all the authentication and authorisation paths. Defaults to `/.auth`"},"login":{"type":"TypeList","required":true,"elem":{"schema":{"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"External URLs that can be redirected to as part of logging in or logging out of the app. This is an advanced setting typically only needed by Windows Store application backends. **Note:** URLs within the current domain are always implicitly allowed.","elem":{"type":"TypeString"}},"cookie_expiration_convention":{"type":"TypeString","optional":true,"default":"FixedTime","description":"The method by which cookies expire. Possible values include: `FixedTime`, and `IdentityProviderDerived`. Defaults to `FixedTime`."},"cookie_expiration_time":{"type":"TypeString","optional":true,"default":"08:00:00","description":"The time after the request is made when the session cookie should expire. Defaults to `08:00:00`."},"logout_endpoint":{"type":"TypeString","optional":true,"description":"The endpoint to which logout requests should be made."},"nonce_expiration_time":{"type":"TypeString","optional":true,"default":"00:05:00","description":"The time after the request is made when the nonce should expire. Defaults to `00:05:00`."},"preserve_url_fragments_for_logins":{"type":"TypeBool","optional":true,"default":false,"description":"Should the fragments from the request be preserved after the login request is made. Defaults to `false`."},"token_refresh_extension_time":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Token Store configuration Enabled. Defaults to `false`"},"token_store_path":{"type":"TypeString","optional":true,"description":"The directory path in the App Filesystem in which the tokens will be stored."},"token_store_sas_setting_name":{"type":"TypeString","optional":true,"description":"The name of the app setting which contains the SAS URL of the blob storage containing the tokens."},"validate_nonce":{"type":"TypeBool","optional":true,"default":true,"description":"Should the nonce be validated while completing the login flow. Defaults to `true`."}}},"maxItems":1},"microsoft_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Microsoft Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication."},"login_scopes":{"type":"TypeList","optional":true,"description":"The list of Login scopes that will be requested as part of Microsoft Account authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"require_authentication":{"type":"TypeBool","optional":true,"description":"Should the authentication flow be used for all requests."},"require_https":{"type":"TypeBool","optional":true,"default":true,"description":"Should HTTPS be required on connections? Defaults to true."},"runtime_version":{"type":"TypeString","optional":true,"default":"~1","description":"The Runtime Version of the Authentication and Authorisation feature of this App. Defaults to `~1`"},"twitter_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in."}}},"maxItems":1},"unauthenticated_action":{"type":"TypeString","optional":true,"default":"RedirectToLoginPage","description":"The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`."}}},"maxItems":1},"backup":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should this backup job be enabled?"},"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Backup."},"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","required":true,"description":"How often the backup should be executed (e.g. for weekly backup, this should be set to `7` and `frequency_unit` should be set to `Day`)."},"frequency_unit":{"type":"TypeString","required":true,"description":"The unit of time for how often the backup should take place. Possible values include: `Day` and `Hour`."},"keep_at_least_one_backup":{"type":"TypeBool","optional":true,"default":false,"description":"Should the service keep at least one backup, regardless of age of backup. Defaults to `false`."},"last_execution_time":{"type":"TypeString","description":"The time the backup was last attempted.","computed":true},"retention_period_days":{"type":"TypeInt","optional":true,"default":30,"description":"After how many days backups should be deleted."},"start_time":{"type":"TypeString","optional":true,"description":"When the schedule should start working in RFC-3339 format.","computed":true}}},"maxItems":1},"storage_account_url":{"type":"TypeString","required":true,"description":"The SAS URL to the container."}}},"maxItems":1},"builtin_logging_enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should built in logging be enabled. Configures `AzureWebJobsDashboard` app setting based on the configured storage setting"},"client_certificate_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the function app use Client Certificates"},"client_certificate_exclusion_paths":{"type":"TypeString","optional":true,"description":"Paths to exclude when using client certificates, separated by ;"},"client_certificate_mode":{"type":"TypeString","optional":true,"default":"Optional","description":"The mode of the Function App's client certificates requirement for incoming requests. Possible values are `Required`, `Optional`, and `OptionalInteractiveUser` "},"connection_string":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Connection."},"type":{"type":"TypeString","required":true,"description":"Type of database. Possible values include: `MySQL`, `SQLServer`, `SQLAzure`, `Custom`, `NotificationHub`, `ServiceBus`, `EventHub`, `APIHub`, `DocDb`, `RedisCache`, and `PostgreSQL`."},"value":{"type":"TypeString","required":true,"description":"The connection string value."}}}},"content_share_force_disabled":{"type":"TypeBool","optional":true,"default":false,"description":"Force disable the content share settings."},"custom_domain_verification_id":{"type":"TypeString","computed":true},"daily_memory_time_quota":{"type":"TypeInt","optional":true,"default":0,"description":"The amount of memory in gigabyte-seconds that your application is allowed to consume per day. Setting this value only affects function apps in Consumption Plans."},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Is the Linux Function App enabled."},"ftp_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"functions_extension_version":{"type":"TypeString","optional":true,"default":"~4","description":"The runtime version associated with the Function App."},"hosting_environment_id":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","optional":true,"default":false,"description":"Can the Function App only be accessed via HTTPS?"},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_reference_identity_id":{"type":"TypeString","optional":true,"description":"The User Assigned Identity to use for Key Vault access.","computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"description":"Specifies the name of the Function App.","forceNew":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_plan_id":{"type":"TypeString","required":true,"description":"The ID of the App Service Plan within which to create this Function App"},"site_config":{"type":"TypeList","required":true,"elem":{"schema":{"always_on":{"type":"TypeBool","optional":true,"description":"If this Linux Web App is Always On enabled. Defaults to `false`.","computed":true},"api_definition_url":{"type":"TypeString","optional":true,"description":"The URL of the API definition that describes this Linux Function App."},"api_management_api_id":{"type":"TypeString","optional":true,"description":"The ID of the API Management API for this Linux Function App."},"app_command_line":{"type":"TypeString","optional":true,"description":"The program and any arguments used to launch this app via the command line. (Example `node myapp.js`)."},"app_scale_limit":{"type":"TypeInt","optional":true,"description":"The number of workers this function app can scale out to. Only applicable to apps on the Consumption and Premium plan.","computed":true},"app_service_logs":{"type":"TypeList","optional":true,"elem":{"schema":{"disk_quota_mb":{"type":"TypeInt","optional":true,"default":35,"description":"The amount of disk space to use for logs. Valid values are between `25` and `100`."},"retention_period_days":{"type":"TypeInt","optional":true,"description":"The retention period for logs in days. Valid values are between `0` and `99999`. Defaults to `0` (never delete)."}}},"maxItems":1},"application_insights_connection_string":{"type":"TypeString","optional":true,"description":"The Connection String for linking the Linux Function App to Application Insights."},"application_insights_key":{"type":"TypeString","optional":true,"description":"The Instrumentation Key for connecting the Linux Function App to Application Insights."},"application_stack":{"type":"TypeList","optional":true,"elem":{"schema":{"docker":{"type":"TypeList","optional":true,"description":"A docker block","elem":{"schema":{"image_name":{"type":"TypeString","required":true,"description":"The name of the Docker image to use."},"image_tag":{"type":"TypeString","required":true,"description":"The image tag of the image to use."},"registry_password":{"type":"TypeString","optional":true,"description":"The password for the account to use to connect to the registry."},"registry_url":{"type":"TypeString","required":true,"description":"The URL of the docker registry."},"registry_username":{"type":"TypeString","optional":true,"description":"The username to use for connections to the registry."}}}},"dotnet_version":{"type":"TypeString","optional":true,"description":"The version of .Net. Possible values are `3.1`, `6.0` and `7.0`"},"java_version":{"type":"TypeString","optional":true,"description":"The version of Java to use. Possible values are `8`, `11`, and `17`"},"node_version":{"type":"TypeString","optional":true,"description":"The version of Node to use. Possible values include `12`, `14`, `16`, `18` and `20`"},"powershell_core_version":{"type":"TypeString","optional":true,"description":"The version of PowerShell Core to use. Possibles values are `7`, `7.2`, and `7.4`"},"python_version":{"type":"TypeString","optional":true,"description":"The version of Python to use. Possible values include `3.12`, `3.11`, `3.10`, `3.9`, `3.8`, and `3.7`."},"use_custom_runtime":{"type":"TypeBool","optional":true},"use_dotnet_isolated_runtime":{"type":"TypeBool","optional":true,"default":false,"description":"Should the DotNet process use an isolated runtime. Defaults to `false`."}}},"maxItems":1},"container_registry_managed_identity_client_id":{"type":"TypeString","optional":true,"description":"The Client ID of the Managed Service Identity to use for connections to the Azure Container Registry."},"container_registry_use_managed_identity":{"type":"TypeBool","optional":true,"default":false,"description":"Should connections for Azure Container Registry use Managed Identity."},"cors":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","optional":true,"description":"Specifies a list of origins that should be allowed to make cross-origin calls.","elem":{"type":"TypeString"},"minItems":1},"support_credentials":{"type":"TypeBool","optional":true,"default":false,"description":"Are credentials allowed in CORS requests? Defaults to `false`."}}},"maxItems":1},"default_documents":{"type":"TypeList","optional":true,"description":"Specifies a list of Default Documents for the Linux Web App.","computed":true,"elem":{"type":"TypeString"}},"detailed_error_logging_enabled":{"type":"TypeBool","description":"Is detailed error logging enabled","computed":true},"elastic_instance_minimum":{"type":"TypeInt","optional":true,"description":"The number of minimum instances for this Linux Function App. Only affects apps on Elastic Premium plans.","computed":true},"ftps_state":{"type":"TypeString","optional":true,"default":"Disabled","description":"State of FTP / FTPS service for this function app. Possible values include: `AllAllowed`, `FtpsOnly` and `Disabled`. Defaults to `Disabled`."},"health_check_eviction_time_in_min":{"type":"TypeInt","optional":true,"description":"The amount of time in minutes that a node is unhealthy before being removed from the load balancer. Possible values are between `2` and `10`. Only valid in conjunction with `health_check_path`"},"health_check_path":{"type":"TypeString","optional":true,"description":"The path to be checked for this function app health."},"http2_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Specifies if the http2 protocol should be enabled. Defaults to `false`."},"ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"linux_fx_version":{"type":"TypeString","description":"The Linux FX Version","computed":true},"load_balancing_mode":{"type":"TypeString","optional":true,"default":"LeastRequests","description":"The Site load balancing mode. Possible values include: `WeightedRoundRobin`, `LeastRequests`, `LeastResponseTime`, `WeightedTotalTraffic`, `RequestHash`, `PerSiteRoundRobin`. Defaults to `LeastRequests` if omitted."},"managed_pipeline_mode":{"type":"TypeString","optional":true,"default":"Integrated","description":"The Managed Pipeline mode. Possible values include: `Integrated`, `Classic`. Defaults to `Integrated`."},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2","description":"The configures the minimum version of TLS required for SSL requests. Possible values include: `1.0`, `1.1`, and `1.2`. Defaults to `1.2`."},"pre_warmed_instance_count":{"type":"TypeInt","optional":true,"description":"The number of pre-warmed instances for this function app. Only affects apps on an Elastic Premium plan.","computed":true},"remote_debugging_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should Remote Debugging be enabled. Defaults to `false`."},"remote_debugging_version":{"type":"TypeString","optional":true,"description":"The Remote Debugging Version. Possible values include `VS2017`, `VS2019`, and `VS2022``","computed":true},"runtime_scale_monitoring_enabled":{"type":"TypeBool","optional":true,"description":"Should Functions Runtime Scale Monitoring be enabled."},"scm_ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"scm_ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2","description":"Configures the minimum version of TLS required for SSL requests to the SCM site Possible values include: `1.0`, `1.1`, and `1.2`. Defaults to `1.2`."},"scm_type":{"type":"TypeString","description":"The SCM Type in use by the Linux Function App.","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Linux Function App `ip_restriction` configuration be used for the SCM also."},"use_32_bit_worker":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Linux Web App use a 32-bit worker."},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied? Defaults to `false`."},"websockets_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should Web Sockets be enabled. Defaults to `false`."},"worker_count":{"type":"TypeInt","optional":true,"description":"The number of Workers for this Linux Function App.","computed":true}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The Site Credentials Username used for publishing.","computed":true},"password":{"type":"TypeString","description":"The Site Credentials Password used for publishing.","computed":true}}}},"sticky_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"app_setting_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"connection_string_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1}}},"maxItems":1},"storage_account":{"type":"TypeSet","optional":true,"elem":{"schema":{"access_key":{"type":"TypeString","required":true},"account_name":{"type":"TypeString","required":true},"mount_path":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"share_name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"storage_account_access_key":{"type":"TypeString","optional":true,"description":"The access key which will be used to access the storage account for the Function App."},"storage_account_name":{"type":"TypeString","optional":true,"description":"The backend storage account name which will be used by this Function App."},"storage_key_vault_secret_id":{"type":"TypeString","optional":true,"description":"The Key Vault Secret ID, including version, that contains the Connection String to connect to the storage account for this Function App."},"storage_uses_managed_identity":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Function App use its Managed Identity to access storage?"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_network_subnet_id":{"type":"TypeString","optional":true},"vnet_image_pull_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Is container image pull over virtual network enabled? Defaults to `false`."},"webdeploy_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"zip_deploy_file":{"type":"TypeString","optional":true,"description":"The local path and filename of the Zip packaged application to deploy to this Linux Function App. **Note:** Using this value requires either `WEBSITE_RUN_FROM_PACKAGE=1` or `SCM_DO_BUILD_DURING_DEPLOYMENT=true` to be set on the App in `app_settings`.","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_linux_function_app_slot":{"schema":{"app_settings":{"type":"TypeMap","optional":true,"description":"A map of key-value pairs for [App Settings](https://docs.microsoft.com/en-us/azure/azure-functions/functions-app-settings) and custom values.","elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`."}}},"maxItems":1},"additional_login_parameters":{"type":"TypeMap","optional":true,"description":"Specifies a map of Login Parameters to send to the OpenID Connect authorization endpoint when a user logs in.","elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","optional":true,"description":"The default authentication provider to use when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`.","computed":true},"enabled":{"type":"TypeBool","required":true,"description":"Should the Authentication / Authorization feature be enabled?"},"facebook":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret":{"type":"TypeString","optional":true,"description":"The App Secret of the Facebook app used for Facebook Login. Cannot be specified with `app_secret_setting_name`."},"app_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login. Cannot be specified with `app_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"github":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret of the GitHub app used for GitHub Login. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret":{"type":"TypeString","optional":true,"description":"The client secret associated with the Google web application. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for Google Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","elem":{"type":"TypeString"}}}},"maxItems":1},"issuer":{"type":"TypeString","optional":true,"description":"The OpenID Connect Issuer URI that represents the entity which issues access tokens."},"microsoft":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret":{"type":"TypeString","optional":true,"description":"The OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"The list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, `wl.basic` is used as the default scope.","elem":{"type":"TypeString"}}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true,"description":"The RuntimeVersion of the Authentication / Authorization feature in use.","computed":true},"token_refresh_extension_hours":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Windows Web App durably store platform-specific security tokens that are obtained during login flows? Defaults to `false`."},"twitter":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret":{"type":"TypeString","optional":true,"description":"The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`."},"consumer_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`."}}},"maxItems":1},"unauthenticated_client_action":{"type":"TypeString","optional":true,"description":"The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`.","computed":true}}},"maxItems":1},"auth_settings_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_applications":{"type":"TypeList","optional":true,"description":"The list of allowed Applications for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"allowed_groups":{"type":"TypeList","optional":true,"description":"The list of allowed Group Names for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_identities":{"type":"TypeList","optional":true,"description":"The list of allowed Identities for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret_certificate_thumbprint":{"type":"TypeString","optional":true,"description":"The thumbprint of the certificate used for signing purposes."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client."},"jwt_allowed_client_applications":{"type":"TypeList","optional":true,"description":"A list of Allowed Client Applications in the JWT Claim.","elem":{"type":"TypeString"}},"jwt_allowed_groups":{"type":"TypeList","optional":true,"description":"A list of Allowed Groups in the JWT Claim.","elem":{"type":"TypeString"}},"login_parameters":{"type":"TypeMap","optional":true,"description":"A map of key-value pairs to send to the Authorisation Endpoint when a user logs in.","elem":{"type":"TypeString"}},"tenant_auth_endpoint":{"type":"TypeString","required":true,"description":"The Azure Tenant Endpoint for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`."},"www_authentication_disabled":{"type":"TypeBool","optional":true,"description":"Should the www-authenticate provider should be omitted from the request? Defaults to `false`"}}},"maxItems":1},"apple_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Apple web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Apple Login."},"login_scopes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"auth_enabled":{"type":"TypeBool","optional":true,"description":"Should the AuthV2 Settings be enabled. Defaults to `false`"},"azure_static_web_app_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Static Web App Authentication."}}},"maxItems":1},"config_file_path":{"type":"TypeString","optional":true,"description":"The path to the App Auth settings. **Note:** Relative Paths are evaluated from the Site Root directory."},"custom_oidc_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"authorisation_endpoint":{"type":"TypeString","description":"The endpoint to make the Authorisation Request.","computed":true},"certification_uri":{"type":"TypeString","description":"The endpoint that provides the keys necessary to validate the token.","computed":true},"client_credential_method":{"type":"TypeString","description":"The Client Credential Method used. Currently the only supported value is `ClientSecretPost`.","computed":true},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with this Custom OIDC."},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the secret for this Custom OIDC Client.","computed":true},"issuer_endpoint":{"type":"TypeString","description":"The endpoint that issued the Token.","computed":true},"name":{"type":"TypeString","required":true,"description":"The name of the Custom OIDC Authentication Provider."},"name_claim_type":{"type":"TypeString","optional":true,"description":"The name of the claim that contains the users name."},"openid_configuration_endpoint":{"type":"TypeString","required":true,"description":"The endpoint that contains all the configuration endpoints for this Custom OIDC provider."},"scopes":{"type":"TypeList","optional":true,"description":"The list of the scopes that should be requested while authenticating.","elem":{"type":"TypeString"}},"token_endpoint":{"type":"TypeString","description":"The endpoint used to request a Token.","computed":true}}}},"default_provider":{"type":"TypeString","optional":true,"description":"The Default Authentication Provider to use when the `unauthenticated_action` is set to `RedirectToLoginPage`. Possible values include: `apple`, `azureactivedirectory`, `facebook`, `github`, `google`, `twitter` and the `name` of your `custom_oidc_v2` provider."},"excluded_paths":{"type":"TypeList","optional":true,"description":"The paths which should be excluded from the `unauthenticated_action` when it is set to `RedirectToLoginPage`.","elem":{"type":"TypeString"}},"facebook_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login."},"graph_api_version":{"type":"TypeString","optional":true,"description":"The version of the Facebook API to be used while logging in.","computed":true},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"forward_proxy_convention":{"type":"TypeString","optional":true,"default":"NoProxy","description":"The convention used to determine the url of the request made. Possible values include `ForwardProxyConventionNoProxy`, `ForwardProxyConventionStandard`, `ForwardProxyConventionCustom`. Defaults to `ForwardProxyConventionNoProxy`"},"forward_proxy_custom_host_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the host of the request."},"forward_proxy_custom_scheme_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the scheme of the request."},"github_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Google Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of Login scopes that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"http_route_api_prefix":{"type":"TypeString","optional":true,"default":"/.auth","description":"The prefix that should precede all the authentication and authorisation paths. Defaults to `/.auth`"},"login":{"type":"TypeList","required":true,"elem":{"schema":{"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"External URLs that can be redirected to as part of logging in or logging out of the app. This is an advanced setting typically only needed by Windows Store application backends. **Note:** URLs within the current domain are always implicitly allowed.","elem":{"type":"TypeString"}},"cookie_expiration_convention":{"type":"TypeString","optional":true,"default":"FixedTime","description":"The method by which cookies expire. Possible values include: `FixedTime`, and `IdentityProviderDerived`. Defaults to `FixedTime`."},"cookie_expiration_time":{"type":"TypeString","optional":true,"default":"08:00:00","description":"The time after the request is made when the session cookie should expire. Defaults to `08:00:00`."},"logout_endpoint":{"type":"TypeString","optional":true,"description":"The endpoint to which logout requests should be made."},"nonce_expiration_time":{"type":"TypeString","optional":true,"default":"00:05:00","description":"The time after the request is made when the nonce should expire. Defaults to `00:05:00`."},"preserve_url_fragments_for_logins":{"type":"TypeBool","optional":true,"default":false,"description":"Should the fragments from the request be preserved after the login request is made. Defaults to `false`."},"token_refresh_extension_time":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Token Store configuration Enabled. Defaults to `false`"},"token_store_path":{"type":"TypeString","optional":true,"description":"The directory path in the App Filesystem in which the tokens will be stored."},"token_store_sas_setting_name":{"type":"TypeString","optional":true,"description":"The name of the app setting which contains the SAS URL of the blob storage containing the tokens."},"validate_nonce":{"type":"TypeBool","optional":true,"default":true,"description":"Should the nonce be validated while completing the login flow. Defaults to `true`."}}},"maxItems":1},"microsoft_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Microsoft Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication."},"login_scopes":{"type":"TypeList","optional":true,"description":"The list of Login scopes that will be requested as part of Microsoft Account authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"require_authentication":{"type":"TypeBool","optional":true,"description":"Should the authentication flow be used for all requests."},"require_https":{"type":"TypeBool","optional":true,"default":true,"description":"Should HTTPS be required on connections? Defaults to true."},"runtime_version":{"type":"TypeString","optional":true,"default":"~1","description":"The Runtime Version of the Authentication and Authorisation feature of this App. Defaults to `~1`"},"twitter_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in."}}},"maxItems":1},"unauthenticated_action":{"type":"TypeString","optional":true,"default":"RedirectToLoginPage","description":"The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`."}}},"maxItems":1},"backup":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should this backup job be enabled?"},"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Backup."},"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","required":true,"description":"How often the backup should be executed (e.g. for weekly backup, this should be set to `7` and `frequency_unit` should be set to `Day`)."},"frequency_unit":{"type":"TypeString","required":true,"description":"The unit of time for how often the backup should take place. Possible values include: `Day` and `Hour`."},"keep_at_least_one_backup":{"type":"TypeBool","optional":true,"default":false,"description":"Should the service keep at least one backup, regardless of age of backup. Defaults to `false`."},"last_execution_time":{"type":"TypeString","description":"The time the backup was last attempted.","computed":true},"retention_period_days":{"type":"TypeInt","optional":true,"default":30,"description":"After how many days backups should be deleted."},"start_time":{"type":"TypeString","optional":true,"description":"When the schedule should start working in RFC-3339 format.","computed":true}}},"maxItems":1},"storage_account_url":{"type":"TypeString","required":true,"description":"The SAS URL to the container."}}},"maxItems":1},"builtin_logging_enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should built in logging be enabled. Configures `AzureWebJobsDashboard` app setting based on the configured storage setting."},"client_certificate_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Function App Slot use Client Certificates."},"client_certificate_exclusion_paths":{"type":"TypeString","optional":true,"description":"Paths to exclude when using client certificates, separated by ;"},"client_certificate_mode":{"type":"TypeString","optional":true,"default":"Optional","description":"The mode of the Function App Slot's client certificates requirement for incoming requests. Possible values are `Required`, `Optional`, and `OptionalInteractiveUser`."},"connection_string":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Connection."},"type":{"type":"TypeString","required":true,"description":"Type of database. Possible values include: `MySQL`, `SQLServer`, `SQLAzure`, `Custom`, `NotificationHub`, `ServiceBus`, `EventHub`, `APIHub`, `DocDb`, `RedisCache`, and `PostgreSQL`."},"value":{"type":"TypeString","required":true,"description":"The connection string value."}}}},"content_share_force_disabled":{"type":"TypeBool","optional":true,"default":false,"description":"Force disable the content share settings."},"custom_domain_verification_id":{"type":"TypeString","computed":true},"daily_memory_time_quota":{"type":"TypeInt","optional":true,"default":0,"description":"The amount of memory in gigabyte-seconds that your application is allowed to consume per day. Setting this value only affects function apps in Consumption Plans."},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Is the Linux Function App Slot enabled."},"ftp_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"function_app_id":{"type":"TypeString","required":true,"description":"The ID of the Linux Function App this Slot is a member of.","forceNew":true},"functions_extension_version":{"type":"TypeString","optional":true,"default":"~4","description":"The runtime version associated with the Function App Slot."},"hosting_environment_id":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","optional":true,"default":false,"description":"Can the Function App Slot only be accessed via HTTPS?"},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_reference_identity_id":{"type":"TypeString","optional":true,"description":"The User Assigned Identity to use for Key Vault access.","computed":true},"kind":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"description":"Specifies the name of the Function App Slot.","forceNew":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"service_plan_id":{"type":"TypeString","optional":true},"site_config":{"type":"TypeList","required":true,"elem":{"schema":{"always_on":{"type":"TypeBool","optional":true,"description":"If this Linux Web App is Always On enabled. Defaults to `false`.","computed":true},"api_definition_url":{"type":"TypeString","optional":true,"description":"The URL of the API definition that describes this Linux Function App."},"api_management_api_id":{"type":"TypeString","optional":true,"description":"The ID of the API Management API for this Linux Function App."},"app_command_line":{"type":"TypeString","optional":true,"description":"The program and any arguments used to launch this app via the command line. (Example `node myapp.js`)."},"app_scale_limit":{"type":"TypeInt","optional":true,"description":"The number of workers this function app can scale out to. Only applicable to apps on the Consumption and Premium plan.","computed":true},"app_service_logs":{"type":"TypeList","optional":true,"elem":{"schema":{"disk_quota_mb":{"type":"TypeInt","optional":true,"default":35,"description":"The amount of disk space to use for logs. Valid values are between `25` and `100`."},"retention_period_days":{"type":"TypeInt","optional":true,"description":"The retention period for logs in days. Valid values are between `0` and `99999`. Defaults to `0` (never delete)."}}},"maxItems":1},"application_insights_connection_string":{"type":"TypeString","optional":true,"description":"The Connection String for linking the Linux Function App to Application Insights."},"application_insights_key":{"type":"TypeString","optional":true,"description":"The Instrumentation Key for connecting the Linux Function App to Application Insights."},"application_stack":{"type":"TypeList","optional":true,"elem":{"schema":{"docker":{"type":"TypeList","optional":true,"description":"A docker block","elem":{"schema":{"image_name":{"type":"TypeString","required":true,"description":"The name of the Docker image to use."},"image_tag":{"type":"TypeString","required":true,"description":"The image tag of the image to use."},"registry_password":{"type":"TypeString","optional":true,"description":"The password for the account to use to connect to the registry."},"registry_url":{"type":"TypeString","required":true,"description":"The URL of the docker registry."},"registry_username":{"type":"TypeString","optional":true,"description":"The username to use for connections to the registry."}}}},"dotnet_version":{"type":"TypeString","optional":true,"description":"The version of .Net. Possible values are `3.1`, `6.0` and `7.0`"},"java_version":{"type":"TypeString","optional":true,"description":"The version of Java to use. Possible values are `8`, `11`, and `17`"},"node_version":{"type":"TypeString","optional":true,"description":"The version of Node to use. Possible values include `12`, `14`, `16`, `18` and `20`"},"powershell_core_version":{"type":"TypeString","optional":true,"description":"The version of PowerShell Core to use. Possibles values are `7`, `7.2`, and `7.4`"},"python_version":{"type":"TypeString","optional":true,"description":"The version of Python to use. Possible values include `3.12`, `3.11`, `3.10`, `3.9`, `3.8`, and `3.7`."},"use_custom_runtime":{"type":"TypeBool","optional":true},"use_dotnet_isolated_runtime":{"type":"TypeBool","optional":true,"default":false,"description":"Should the DotNet process use an isolated runtime. Defaults to `false`."}}},"maxItems":1},"auto_swap_slot_name":{"type":"TypeString","optional":true},"container_registry_managed_identity_client_id":{"type":"TypeString","optional":true,"description":"The Client ID of the Managed Service Identity to use for connections to the Azure Container Registry."},"container_registry_use_managed_identity":{"type":"TypeBool","optional":true,"default":false,"description":"Should connections for Azure Container Registry use Managed Identity."},"cors":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","optional":true,"description":"Specifies a list of origins that should be allowed to make cross-origin calls.","elem":{"type":"TypeString"},"minItems":1},"support_credentials":{"type":"TypeBool","optional":true,"default":false,"description":"Are credentials allowed in CORS requests? Defaults to `false`."}}},"maxItems":1},"default_documents":{"type":"TypeList","optional":true,"description":"Specifies a list of Default Documents for the Linux Web App.","computed":true,"elem":{"type":"TypeString"}},"detailed_error_logging_enabled":{"type":"TypeBool","description":"Is detailed error logging enabled","computed":true},"elastic_instance_minimum":{"type":"TypeInt","optional":true,"description":"The number of minimum instances for this Linux Function App. Only affects apps on Elastic Premium plans.","computed":true},"ftps_state":{"type":"TypeString","optional":true,"default":"Disabled","description":"State of FTP / FTPS service for this function app. Possible values include: `AllAllowed`, `FtpsOnly` and `Disabled`. Defaults to `Disabled`."},"health_check_eviction_time_in_min":{"type":"TypeInt","optional":true,"default":0,"description":"The amount of time in minutes that a node is unhealthy before being removed from the load balancer. Possible values are between `2` and `10`. Defaults to `10`. Only valid in conjunction with `health_check_path`"},"health_check_path":{"type":"TypeString","optional":true,"description":"The path to be checked for this function app health."},"http2_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Specifies if the http2 protocol should be enabled. Defaults to `false`."},"ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"linux_fx_version":{"type":"TypeString","description":"The Linux FX Version","computed":true},"load_balancing_mode":{"type":"TypeString","optional":true,"default":"LeastRequests","description":"The Site load balancing mode. Possible values include: `WeightedRoundRobin`, `LeastRequests`, `LeastResponseTime`, `WeightedTotalTraffic`, `RequestHash`, `PerSiteRoundRobin`. Defaults to `LeastRequests` if omitted."},"managed_pipeline_mode":{"type":"TypeString","optional":true,"default":"Integrated","description":"The Managed Pipeline mode. Possible values include: `Integrated`, `Classic`. Defaults to `Integrated`."},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2","description":"The configures the minimum version of TLS required for SSL requests. Possible values include: `1.0`, `1.1`, and `1.2`. Defaults to `1.2`."},"pre_warmed_instance_count":{"type":"TypeInt","optional":true,"description":"The number of pre-warmed instances for this function app. Only affects apps on an Elastic Premium plan.","computed":true},"remote_debugging_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should Remote Debugging be enabled. Defaults to `false`."},"remote_debugging_version":{"type":"TypeString","optional":true,"description":"The Remote Debugging Version. Possible values include `VS2017`, `VS2019`, and `VS2022`","computed":true},"runtime_scale_monitoring_enabled":{"type":"TypeBool","optional":true,"description":"Should Functions Runtime Scale Monitoring be enabled."},"scm_ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"scm_ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2","description":"Configures the minimum version of TLS required for SSL requests to the SCM site Possible values include: `1.0`, `1.1`, and `1.2`. Defaults to `1.2`."},"scm_type":{"type":"TypeString","description":"The SCM Type in use by the Linux Function App.","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Linux Function App `ip_restriction` configuration be used for the SCM also."},"use_32_bit_worker":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Linux Web App use a 32-bit worker."},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied? Defaults to `false`."},"websockets_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should Web Sockets be enabled. Defaults to `false`."},"worker_count":{"type":"TypeInt","optional":true,"description":"The number of Workers for this Linux Function App.","computed":true}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The Site Credentials Username used for publishing.","computed":true},"password":{"type":"TypeString","description":"The Site Credentials Password used for publishing.","computed":true}}}},"storage_account":{"type":"TypeSet","optional":true,"elem":{"schema":{"access_key":{"type":"TypeString","required":true},"account_name":{"type":"TypeString","required":true},"mount_path":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"share_name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"storage_account_access_key":{"type":"TypeString","optional":true,"description":"The access key which will be used to access the storage account for the Function App Slot."},"storage_account_name":{"type":"TypeString","optional":true,"description":"The backend storage account name which will be used by this Function App Slot."},"storage_key_vault_secret_id":{"type":"TypeString","optional":true,"description":"The Key Vault Secret ID, including version, that contains the Connection String to connect to the storage account for this Function App."},"storage_uses_managed_identity":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Function App Slot use its Managed Identity to access storage?"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_network_subnet_id":{"type":"TypeString","optional":true},"vnet_image_pull_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Is container image pull over virtual network enabled? Defaults to `false`."},"webdeploy_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_linux_virtual_machine":{"schema":{"additional_capabilities":{"type":"TypeList","optional":true,"elem":{"schema":{"hibernation_enabled":{"type":"TypeBool","optional":true,"default":false},"ultra_ssd_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"admin_password":{"type":"TypeString","optional":true,"forceNew":true},"admin_ssh_key":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"public_key":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true,"forceNew":true}}}},"admin_username":{"type":"TypeString","required":true,"forceNew":true},"allow_extension_operations":{"type":"TypeBool","optional":true,"default":true},"availability_set_id":{"type":"TypeString","optional":true,"forceNew":true},"boot_diagnostics":{"type":"TypeList","optional":true,"elem":{"schema":{"storage_account_uri":{"type":"TypeString","optional":true}}},"maxItems":1},"bypass_platform_safety_checks_on_user_schedule_enabled":{"type":"TypeBool","optional":true,"default":false},"capacity_reservation_group_id":{"type":"TypeString","optional":true},"computer_name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"custom_data":{"type":"TypeString","optional":true,"forceNew":true},"dedicated_host_group_id":{"type":"TypeString","optional":true},"dedicated_host_id":{"type":"TypeString","optional":true},"disable_password_authentication":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"disk_controller_type":{"type":"TypeString","optional":true,"computed":true},"edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"encryption_at_host_enabled":{"type":"TypeBool","optional":true},"eviction_policy":{"type":"TypeString","optional":true,"forceNew":true},"extensions_time_budget":{"type":"TypeString","optional":true,"default":"PT1H30M"},"gallery_application":{"type":"TypeList","optional":true,"elem":{"schema":{"automatic_upgrade_enabled":{"type":"TypeBool","optional":true,"default":false},"configuration_blob_uri":{"type":"TypeString","optional":true},"order":{"type":"TypeInt","optional":true,"default":0},"tag":{"type":"TypeString","optional":true},"treat_failure_as_deployment_failure_enabled":{"type":"TypeBool","optional":true,"default":false},"version_id":{"type":"TypeString","required":true}}},"maxItems":100},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"license_type":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"max_bid_price":{"type":"TypeFloat","optional":true,"default":-1},"name":{"type":"TypeString","required":true,"forceNew":true},"network_interface_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"os_disk":{"type":"TypeList","required":true,"elem":{"schema":{"caching":{"type":"TypeString","required":true},"diff_disk_settings":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"option":{"type":"TypeString","required":true,"forceNew":true},"placement":{"type":"TypeString","optional":true,"default":"CacheDisk","forceNew":true}}},"maxItems":1},"disk_encryption_set_id":{"type":"TypeString","optional":true},"disk_size_gb":{"type":"TypeInt","optional":true,"computed":true},"name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"secure_vm_disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"security_encryption_type":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_type":{"type":"TypeString","required":true,"forceNew":true},"write_accelerator_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"os_image_notification":{"type":"TypeList","optional":true,"elem":{"schema":{"timeout":{"type":"TypeString","optional":true,"default":"PT15M"}}},"maxItems":1},"patch_assessment_mode":{"type":"TypeString","optional":true,"default":"ImageDefault"},"patch_mode":{"type":"TypeString","optional":true,"default":"ImageDefault"},"plan":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"product":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"platform_fault_domain":{"type":"TypeInt","optional":true,"default":-1,"forceNew":true},"priority":{"type":"TypeString","optional":true,"default":"Regular","forceNew":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"provision_vm_agent":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"proximity_placement_group_id":{"type":"TypeString","optional":true},"public_ip_address":{"type":"TypeString","computed":true},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"reboot_setting":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secret":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeSet","required":true,"elem":{"schema":{"url":{"type":"TypeString","required":true}}},"minItems":1},"key_vault_id":{"type":"TypeString","required":true}}}},"secure_boot_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"size":{"type":"TypeString","required":true},"source_image_id":{"type":"TypeString","optional":true,"forceNew":true},"source_image_reference":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"offer":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"termination_notification":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","required":true},"timeout":{"type":"TypeString","optional":true,"default":"PT5M"}}},"maxItems":1},"user_data":{"type":"TypeString","optional":true},"virtual_machine_id":{"type":"TypeString","computed":true},"virtual_machine_scale_set_id":{"type":"TypeString","optional":true},"vm_agent_platform_updates_enabled":{"type":"TypeBool","optional":true,"default":false},"vtpm_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"zone":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":45,"read":5,"delete":45,"update":45}},"azurerm_linux_virtual_machine_scale_set":{"schema":{"additional_capabilities":{"type":"TypeList","optional":true,"elem":{"schema":{"ultra_ssd_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}}},"maxItems":1},"admin_password":{"type":"TypeString","optional":true,"forceNew":true},"admin_ssh_key":{"type":"TypeSet","optional":true,"elem":{"schema":{"public_key":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true}}}},"admin_username":{"type":"TypeString","required":true,"forceNew":true},"automatic_instance_repair":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"computed":true},"enabled":{"type":"TypeBool","required":true},"grace_period":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"automatic_os_upgrade_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"disable_automatic_rollback":{"type":"TypeBool","required":true},"enable_automatic_os_upgrade":{"type":"TypeBool","required":true}}},"maxItems":1},"boot_diagnostics":{"type":"TypeList","optional":true,"elem":{"schema":{"storage_account_uri":{"type":"TypeString","optional":true}}},"maxItems":1},"capacity_reservation_group_id":{"type":"TypeString","optional":true,"forceNew":true},"computer_name_prefix":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"custom_data":{"type":"TypeString","optional":true},"data_disk":{"type":"TypeList","optional":true,"elem":{"schema":{"caching":{"type":"TypeString","required":true},"create_option":{"type":"TypeString","optional":true,"default":"Empty"},"disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"disk_size_gb":{"type":"TypeInt","required":true},"lun":{"type":"TypeInt","required":true},"name":{"type":"TypeString","optional":true},"storage_account_type":{"type":"TypeString","required":true},"ultra_ssd_disk_iops_read_write":{"type":"TypeInt","optional":true,"computed":true},"ultra_ssd_disk_mbps_read_write":{"type":"TypeInt","optional":true,"computed":true},"write_accelerator_enabled":{"type":"TypeBool","optional":true,"default":false}}}},"disable_password_authentication":{"type":"TypeBool","optional":true,"default":true},"do_not_run_extensions_on_overprovisioned_machines":{"type":"TypeBool","optional":true,"default":false},"edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"encryption_at_host_enabled":{"type":"TypeBool","optional":true},"eviction_policy":{"type":"TypeString","optional":true,"forceNew":true},"extension":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"auto_upgrade_minor_version":{"type":"TypeBool","optional":true,"default":true},"automatic_upgrade_enabled":{"type":"TypeBool","optional":true,"default":false},"force_update_tag":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"protected_settings":{"type":"TypeString","optional":true},"protected_settings_from_key_vault":{"type":"TypeList","optional":true,"elem":{"schema":{"secret_url":{"type":"TypeString","required":true},"source_vault_id":{"type":"TypeString","required":true}}},"maxItems":1},"provision_after_extensions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"publisher":{"type":"TypeString","required":true},"settings":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"type_handler_version":{"type":"TypeString","required":true}}}},"extension_operations_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"extensions_time_budget":{"type":"TypeString","optional":true,"default":"PT1H30M"},"gallery_application":{"type":"TypeList","optional":true,"elem":{"schema":{"configuration_blob_uri":{"type":"TypeString","optional":true,"forceNew":true},"order":{"type":"TypeInt","optional":true,"default":0,"forceNew":true},"tag":{"type":"TypeString","optional":true,"forceNew":true},"version_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":100},"health_probe_id":{"type":"TypeString","optional":true},"host_group_id":{"type":"TypeString","optional":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"instances":{"type":"TypeInt","optional":true,"default":0},"location":{"type":"TypeString","required":true,"forceNew":true},"max_bid_price":{"type":"TypeFloat","optional":true,"default":-1},"name":{"type":"TypeString","required":true,"forceNew":true},"network_interface":{"type":"TypeList","required":true,"elem":{"schema":{"dns_servers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"enable_accelerated_networking":{"type":"TypeBool","optional":true,"default":false},"enable_ip_forwarding":{"type":"TypeBool","optional":true,"default":false},"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"application_gateway_backend_address_pool_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"application_security_group_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":20},"load_balancer_backend_address_pool_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"load_balancer_inbound_nat_rules_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"primary":{"type":"TypeBool","optional":true,"default":false},"public_ip_address":{"type":"TypeList","optional":true,"elem":{"schema":{"domain_name_label":{"type":"TypeString","optional":true},"idle_timeout_in_minutes":{"type":"TypeInt","optional":true,"computed":true},"ip_tag":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"tag":{"type":"TypeString","required":true,"forceNew":true},"type":{"type":"TypeString","required":true,"forceNew":true}}}},"name":{"type":"TypeString","required":true},"public_ip_prefix_id":{"type":"TypeString","optional":true,"forceNew":true},"version":{"type":"TypeString","optional":true,"default":"IPv4","forceNew":true}}}},"subnet_id":{"type":"TypeString","optional":true},"version":{"type":"TypeString","optional":true,"default":"IPv4"}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"network_security_group_id":{"type":"TypeString","optional":true},"primary":{"type":"TypeBool","optional":true,"default":false}}}},"os_disk":{"type":"TypeList","required":true,"elem":{"schema":{"caching":{"type":"TypeString","required":true},"diff_disk_settings":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"option":{"type":"TypeString","required":true,"forceNew":true},"placement":{"type":"TypeString","optional":true,"default":"CacheDisk","forceNew":true}}},"maxItems":1},"disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"disk_size_gb":{"type":"TypeInt","optional":true,"computed":true},"secure_vm_disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"security_encryption_type":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_type":{"type":"TypeString","required":true,"forceNew":true},"write_accelerator_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"overprovision":{"type":"TypeBool","optional":true,"default":true},"plan":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"product":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"platform_fault_domain_count":{"type":"TypeInt","optional":true,"computed":true,"forceNew":true},"priority":{"type":"TypeString","optional":true,"default":"Regular","forceNew":true},"provision_vm_agent":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"proximity_placement_group_id":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rolling_upgrade_policy":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"cross_zone_upgrades_enabled":{"type":"TypeBool","optional":true},"max_batch_instance_percent":{"type":"TypeInt","required":true},"max_unhealthy_instance_percent":{"type":"TypeInt","required":true},"max_unhealthy_upgraded_instance_percent":{"type":"TypeInt","required":true},"maximum_surge_instances_enabled":{"type":"TypeBool","optional":true},"pause_time_between_batches":{"type":"TypeString","required":true},"prioritize_unhealthy_instances_enabled":{"type":"TypeBool","optional":true}}},"maxItems":1},"scale_in":{"type":"TypeList","optional":true,"elem":{"schema":{"force_deletion_enabled":{"type":"TypeBool","optional":true,"default":false},"rule":{"type":"TypeString","optional":true,"default":"Default"}}},"maxItems":1},"secret":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeSet","required":true,"elem":{"schema":{"url":{"type":"TypeString","required":true}}},"minItems":1},"key_vault_id":{"type":"TypeString","required":true}}}},"secure_boot_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"single_placement_group":{"type":"TypeBool","optional":true,"default":true},"sku":{"type":"TypeString","required":true},"source_image_id":{"type":"TypeString","optional":true},"source_image_reference":{"type":"TypeList","optional":true,"elem":{"schema":{"offer":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true},"version":{"type":"TypeString","required":true}}},"maxItems":1},"spot_restore":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"timeout":{"type":"TypeString","optional":true,"default":"PT1H","forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"termination_notification":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","required":true},"timeout":{"type":"TypeString","optional":true,"default":"PT5M"}}},"maxItems":1},"unique_id":{"type":"TypeString","computed":true},"upgrade_mode":{"type":"TypeString","optional":true,"default":"Manual","forceNew":true},"user_data":{"type":"TypeString","optional":true},"vtpm_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"zone_balance":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"zones":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_linux_web_app":{"schema":{"app_settings":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`."}}},"maxItems":1},"additional_login_parameters":{"type":"TypeMap","optional":true,"description":"Specifies a map of Login Parameters to send to the OpenID Connect authorization endpoint when a user logs in.","elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","optional":true,"description":"The default authentication provider to use when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`.","computed":true},"enabled":{"type":"TypeBool","required":true,"description":"Should the Authentication / Authorization feature be enabled?"},"facebook":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret":{"type":"TypeString","optional":true,"description":"The App Secret of the Facebook app used for Facebook Login. Cannot be specified with `app_secret_setting_name`."},"app_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login. Cannot be specified with `app_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"github":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret of the GitHub app used for GitHub Login. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret":{"type":"TypeString","optional":true,"description":"The client secret associated with the Google web application. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for Google Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","elem":{"type":"TypeString"}}}},"maxItems":1},"issuer":{"type":"TypeString","optional":true,"description":"The OpenID Connect Issuer URI that represents the entity which issues access tokens."},"microsoft":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret":{"type":"TypeString","optional":true,"description":"The OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"The list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, `wl.basic` is used as the default scope.","elem":{"type":"TypeString"}}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true,"description":"The RuntimeVersion of the Authentication / Authorization feature in use.","computed":true},"token_refresh_extension_hours":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Windows Web App durably store platform-specific security tokens that are obtained during login flows? Defaults to `false`."},"twitter":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret":{"type":"TypeString","optional":true,"description":"The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`."},"consumer_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`."}}},"maxItems":1},"unauthenticated_client_action":{"type":"TypeString","optional":true,"description":"The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`.","computed":true}}},"maxItems":1},"auth_settings_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_applications":{"type":"TypeList","optional":true,"description":"The list of allowed Applications for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"allowed_groups":{"type":"TypeList","optional":true,"description":"The list of allowed Group Names for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_identities":{"type":"TypeList","optional":true,"description":"The list of allowed Identities for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret_certificate_thumbprint":{"type":"TypeString","optional":true,"description":"The thumbprint of the certificate used for signing purposes."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client."},"jwt_allowed_client_applications":{"type":"TypeList","optional":true,"description":"A list of Allowed Client Applications in the JWT Claim.","elem":{"type":"TypeString"}},"jwt_allowed_groups":{"type":"TypeList","optional":true,"description":"A list of Allowed Groups in the JWT Claim.","elem":{"type":"TypeString"}},"login_parameters":{"type":"TypeMap","optional":true,"description":"A map of key-value pairs to send to the Authorisation Endpoint when a user logs in.","elem":{"type":"TypeString"}},"tenant_auth_endpoint":{"type":"TypeString","required":true,"description":"The Azure Tenant Endpoint for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`."},"www_authentication_disabled":{"type":"TypeBool","optional":true,"description":"Should the www-authenticate provider should be omitted from the request? Defaults to `false`"}}},"maxItems":1},"apple_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Apple web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Apple Login."},"login_scopes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"auth_enabled":{"type":"TypeBool","optional":true,"description":"Should the AuthV2 Settings be enabled. Defaults to `false`"},"azure_static_web_app_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Static Web App Authentication."}}},"maxItems":1},"config_file_path":{"type":"TypeString","optional":true,"description":"The path to the App Auth settings. **Note:** Relative Paths are evaluated from the Site Root directory."},"custom_oidc_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"authorisation_endpoint":{"type":"TypeString","description":"The endpoint to make the Authorisation Request.","computed":true},"certification_uri":{"type":"TypeString","description":"The endpoint that provides the keys necessary to validate the token.","computed":true},"client_credential_method":{"type":"TypeString","description":"The Client Credential Method used. Currently the only supported value is `ClientSecretPost`.","computed":true},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with this Custom OIDC."},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the secret for this Custom OIDC Client.","computed":true},"issuer_endpoint":{"type":"TypeString","description":"The endpoint that issued the Token.","computed":true},"name":{"type":"TypeString","required":true,"description":"The name of the Custom OIDC Authentication Provider."},"name_claim_type":{"type":"TypeString","optional":true,"description":"The name of the claim that contains the users name."},"openid_configuration_endpoint":{"type":"TypeString","required":true,"description":"The endpoint that contains all the configuration endpoints for this Custom OIDC provider."},"scopes":{"type":"TypeList","optional":true,"description":"The list of the scopes that should be requested while authenticating.","elem":{"type":"TypeString"}},"token_endpoint":{"type":"TypeString","description":"The endpoint used to request a Token.","computed":true}}}},"default_provider":{"type":"TypeString","optional":true,"description":"The Default Authentication Provider to use when the `unauthenticated_action` is set to `RedirectToLoginPage`. Possible values include: `apple`, `azureactivedirectory`, `facebook`, `github`, `google`, `twitter` and the `name` of your `custom_oidc_v2` provider."},"excluded_paths":{"type":"TypeList","optional":true,"description":"The paths which should be excluded from the `unauthenticated_action` when it is set to `RedirectToLoginPage`.","elem":{"type":"TypeString"}},"facebook_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login."},"graph_api_version":{"type":"TypeString","optional":true,"description":"The version of the Facebook API to be used while logging in.","computed":true},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"forward_proxy_convention":{"type":"TypeString","optional":true,"default":"NoProxy","description":"The convention used to determine the url of the request made. Possible values include `ForwardProxyConventionNoProxy`, `ForwardProxyConventionStandard`, `ForwardProxyConventionCustom`. Defaults to `ForwardProxyConventionNoProxy`"},"forward_proxy_custom_host_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the host of the request."},"forward_proxy_custom_scheme_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the scheme of the request."},"github_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Google Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of Login scopes that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"http_route_api_prefix":{"type":"TypeString","optional":true,"default":"/.auth","description":"The prefix that should precede all the authentication and authorisation paths. Defaults to `/.auth`"},"login":{"type":"TypeList","required":true,"elem":{"schema":{"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"External URLs that can be redirected to as part of logging in or logging out of the app. This is an advanced setting typically only needed by Windows Store application backends. **Note:** URLs within the current domain are always implicitly allowed.","elem":{"type":"TypeString"}},"cookie_expiration_convention":{"type":"TypeString","optional":true,"default":"FixedTime","description":"The method by which cookies expire. Possible values include: `FixedTime`, and `IdentityProviderDerived`. Defaults to `FixedTime`."},"cookie_expiration_time":{"type":"TypeString","optional":true,"default":"08:00:00","description":"The time after the request is made when the session cookie should expire. Defaults to `08:00:00`."},"logout_endpoint":{"type":"TypeString","optional":true,"description":"The endpoint to which logout requests should be made."},"nonce_expiration_time":{"type":"TypeString","optional":true,"default":"00:05:00","description":"The time after the request is made when the nonce should expire. Defaults to `00:05:00`."},"preserve_url_fragments_for_logins":{"type":"TypeBool","optional":true,"default":false,"description":"Should the fragments from the request be preserved after the login request is made. Defaults to `false`."},"token_refresh_extension_time":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Token Store configuration Enabled. Defaults to `false`"},"token_store_path":{"type":"TypeString","optional":true,"description":"The directory path in the App Filesystem in which the tokens will be stored."},"token_store_sas_setting_name":{"type":"TypeString","optional":true,"description":"The name of the app setting which contains the SAS URL of the blob storage containing the tokens."},"validate_nonce":{"type":"TypeBool","optional":true,"default":true,"description":"Should the nonce be validated while completing the login flow. Defaults to `true`."}}},"maxItems":1},"microsoft_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Microsoft Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication."},"login_scopes":{"type":"TypeList","optional":true,"description":"The list of Login scopes that will be requested as part of Microsoft Account authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"require_authentication":{"type":"TypeBool","optional":true,"description":"Should the authentication flow be used for all requests."},"require_https":{"type":"TypeBool","optional":true,"default":true,"description":"Should HTTPS be required on connections? Defaults to true."},"runtime_version":{"type":"TypeString","optional":true,"default":"~1","description":"The Runtime Version of the Authentication and Authorisation feature of this App. Defaults to `~1`"},"twitter_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in."}}},"maxItems":1},"unauthenticated_action":{"type":"TypeString","optional":true,"default":"RedirectToLoginPage","description":"The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`."}}},"maxItems":1},"backup":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should this backup job be enabled?"},"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Backup."},"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","required":true,"description":"How often the backup should be executed (e.g. for weekly backup, this should be set to `7` and `frequency_unit` should be set to `Day`)."},"frequency_unit":{"type":"TypeString","required":true,"description":"The unit of time for how often the backup should take place. Possible values include: `Day` and `Hour`."},"keep_at_least_one_backup":{"type":"TypeBool","optional":true,"default":false,"description":"Should the service keep at least one backup, regardless of age of backup. Defaults to `false`."},"last_execution_time":{"type":"TypeString","description":"The time the backup was last attempted.","computed":true},"retention_period_days":{"type":"TypeInt","optional":true,"default":30,"description":"After how many days backups should be deleted."},"start_time":{"type":"TypeString","optional":true,"description":"When the schedule should start working in RFC-3339 format.","computed":true}}},"maxItems":1},"storage_account_url":{"type":"TypeString","required":true,"description":"The SAS URL to the container."}}},"maxItems":1},"client_affinity_enabled":{"type":"TypeBool","optional":true,"default":false},"client_certificate_enabled":{"type":"TypeBool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"TypeString","optional":true,"description":"Paths to exclude when using client certificates, separated by ;"},"client_certificate_mode":{"type":"TypeString","optional":true,"default":"Required"},"connection_string":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Connection."},"type":{"type":"TypeString","required":true,"description":"Type of database. Possible values include: `MySQL`, `SQLServer`, `SQLAzure`, `Custom`, `NotificationHub`, `ServiceBus`, `EventHub`, `APIHub`, `DocDb`, `RedisCache`, and `PostgreSQL`."},"value":{"type":"TypeString","required":true,"description":"The connection string value."}}}},"custom_domain_verification_id":{"type":"TypeString","computed":true},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"hosting_environment_id":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_reference_identity_id":{"type":"TypeString","optional":true,"computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"logs":{"type":"TypeList","optional":true,"elem":{"schema":{"application_logs":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"level":{"type":"TypeString","required":true},"retention_in_days":{"type":"TypeInt","required":true},"sas_url":{"type":"TypeString","required":true}}},"maxItems":1},"file_system_level":{"type":"TypeString","required":true}}},"maxItems":1},"detailed_error_messages":{"type":"TypeBool","optional":true,"default":false},"failed_request_tracing":{"type":"TypeBool","optional":true,"default":false},"http_logs":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","optional":true,"default":0},"sas_url":{"type":"TypeString","required":true}}},"maxItems":1},"file_system":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","required":true},"retention_in_mb":{"type":"TypeInt","required":true}}},"maxItems":1}}},"maxItems":1}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_plan_id":{"type":"TypeString","required":true},"site_config":{"type":"TypeList","required":true,"elem":{"schema":{"always_on":{"type":"TypeBool","optional":true,"default":true},"api_definition_url":{"type":"TypeString","optional":true},"api_management_api_id":{"type":"TypeString","optional":true},"app_command_line":{"type":"TypeString","optional":true},"application_stack":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"docker_image_name":{"type":"TypeString","optional":true},"docker_registry_password":{"type":"TypeString","optional":true},"docker_registry_url":{"type":"TypeString","optional":true},"docker_registry_username":{"type":"TypeString","optional":true},"dotnet_version":{"type":"TypeString","optional":true},"go_version":{"type":"TypeString","optional":true},"java_server":{"type":"TypeString","optional":true},"java_server_version":{"type":"TypeString","optional":true},"java_version":{"type":"TypeString","optional":true},"node_version":{"type":"TypeString","optional":true},"php_version":{"type":"TypeString","optional":true},"python_version":{"type":"TypeString","optional":true},"ruby_version":{"type":"TypeString","optional":true}}},"maxItems":1},"auto_heal_setting":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeList","optional":true,"elem":{"schema":{"action_type":{"type":"TypeString","required":true},"minimum_process_execution_time":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"trigger":{"type":"TypeList","optional":true,"elem":{"schema":{"requests":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true}}},"maxItems":1},"slow_request":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true},"time_taken":{"type":"TypeString","required":true}}},"maxItems":1},"slow_request_with_path":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true},"time_taken":{"type":"TypeString","required":true}}}},"status_code":{"type":"TypeSet","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true},"status_code_range":{"type":"TypeString","required":true},"sub_status":{"type":"TypeInt","optional":true},"win32_status_code":{"type":"TypeInt","optional":true}}}}}},"maxItems":1}}},"maxItems":1},"container_registry_managed_identity_client_id":{"type":"TypeString","optional":true},"container_registry_use_managed_identity":{"type":"TypeBool","optional":true,"default":false},"cors":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","optional":true,"description":"Specifies a list of origins that should be allowed to make cross-origin calls.","elem":{"type":"TypeString"},"minItems":1},"support_credentials":{"type":"TypeBool","optional":true,"default":false,"description":"Are credentials allowed in CORS requests? Defaults to `false`."}}},"maxItems":1},"default_documents":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"detailed_error_logging_enabled":{"type":"TypeBool","computed":true},"ftps_state":{"type":"TypeString","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"TypeInt","optional":true,"description":"The amount of time in minutes that a node is unhealthy before being removed from the load balancer. Possible values are between `2` and `10`. Only valid in conjunction with `health_check_path`"},"health_check_path":{"type":"TypeString","optional":true},"http2_enabled":{"type":"TypeBool","optional":true,"default":false},"ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"linux_fx_version":{"type":"TypeString","computed":true},"load_balancing_mode":{"type":"TypeString","optional":true,"default":"LeastRequests"},"local_mysql_enabled":{"type":"TypeBool","optional":true,"default":false},"managed_pipeline_mode":{"type":"TypeString","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"remote_debugging_enabled":{"type":"TypeBool","optional":true,"default":false},"remote_debugging_version":{"type":"TypeString","optional":true,"computed":true},"scm_ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"scm_ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"scm_type":{"type":"TypeString","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false},"use_32_bit_worker":{"type":"TypeBool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied? Defaults to `false`."},"websockets_enabled":{"type":"TypeBool","optional":true,"default":false},"worker_count":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The Site Credentials Username used for publishing.","computed":true},"password":{"type":"TypeString","description":"The Site Credentials Password used for publishing.","computed":true}}}},"sticky_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"app_setting_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"connection_string_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1}}},"maxItems":1},"storage_account":{"type":"TypeSet","optional":true,"elem":{"schema":{"access_key":{"type":"TypeString","required":true},"account_name":{"type":"TypeString","required":true},"mount_path":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"share_name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_network_subnet_id":{"type":"TypeString","optional":true},"webdeploy_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"zip_deploy_file":{"type":"TypeString","optional":true,"description":"The local path and filename of the Zip packaged application to deploy to this Linux Web App. **Note:** Using this value requires either `WEBSITE_RUN_FROM_PACKAGE=1` or `SCM_DO_BUILD_DURING_DEPLOYMENT=true` to be set on the App in `app_settings`.","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_linux_web_app_slot":{"schema":{"app_metadata":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"app_service_id":{"type":"TypeString","required":true},"app_settings":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`."}}},"maxItems":1},"additional_login_parameters":{"type":"TypeMap","optional":true,"description":"Specifies a map of Login Parameters to send to the OpenID Connect authorization endpoint when a user logs in.","elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","optional":true,"description":"The default authentication provider to use when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`.","computed":true},"enabled":{"type":"TypeBool","required":true,"description":"Should the Authentication / Authorization feature be enabled?"},"facebook":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret":{"type":"TypeString","optional":true,"description":"The App Secret of the Facebook app used for Facebook Login. Cannot be specified with `app_secret_setting_name`."},"app_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login. Cannot be specified with `app_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"github":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret of the GitHub app used for GitHub Login. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret":{"type":"TypeString","optional":true,"description":"The client secret associated with the Google web application. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for Google Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","elem":{"type":"TypeString"}}}},"maxItems":1},"issuer":{"type":"TypeString","optional":true,"description":"The OpenID Connect Issuer URI that represents the entity which issues access tokens."},"microsoft":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret":{"type":"TypeString","optional":true,"description":"The OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"The list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, `wl.basic` is used as the default scope.","elem":{"type":"TypeString"}}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true,"description":"The RuntimeVersion of the Authentication / Authorization feature in use.","computed":true},"token_refresh_extension_hours":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Windows Web App durably store platform-specific security tokens that are obtained during login flows? Defaults to `false`."},"twitter":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret":{"type":"TypeString","optional":true,"description":"The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`."},"consumer_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`."}}},"maxItems":1},"unauthenticated_client_action":{"type":"TypeString","optional":true,"description":"The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`.","computed":true}}},"maxItems":1},"auth_settings_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_applications":{"type":"TypeList","optional":true,"description":"The list of allowed Applications for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"allowed_groups":{"type":"TypeList","optional":true,"description":"The list of allowed Group Names for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_identities":{"type":"TypeList","optional":true,"description":"The list of allowed Identities for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret_certificate_thumbprint":{"type":"TypeString","optional":true,"description":"The thumbprint of the certificate used for signing purposes."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client."},"jwt_allowed_client_applications":{"type":"TypeList","optional":true,"description":"A list of Allowed Client Applications in the JWT Claim.","elem":{"type":"TypeString"}},"jwt_allowed_groups":{"type":"TypeList","optional":true,"description":"A list of Allowed Groups in the JWT Claim.","elem":{"type":"TypeString"}},"login_parameters":{"type":"TypeMap","optional":true,"description":"A map of key-value pairs to send to the Authorisation Endpoint when a user logs in.","elem":{"type":"TypeString"}},"tenant_auth_endpoint":{"type":"TypeString","required":true,"description":"The Azure Tenant Endpoint for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`."},"www_authentication_disabled":{"type":"TypeBool","optional":true,"description":"Should the www-authenticate provider should be omitted from the request? Defaults to `false`"}}},"maxItems":1},"apple_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Apple web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Apple Login."},"login_scopes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"auth_enabled":{"type":"TypeBool","optional":true,"description":"Should the AuthV2 Settings be enabled. Defaults to `false`"},"azure_static_web_app_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Static Web App Authentication."}}},"maxItems":1},"config_file_path":{"type":"TypeString","optional":true,"description":"The path to the App Auth settings. **Note:** Relative Paths are evaluated from the Site Root directory."},"custom_oidc_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"authorisation_endpoint":{"type":"TypeString","description":"The endpoint to make the Authorisation Request.","computed":true},"certification_uri":{"type":"TypeString","description":"The endpoint that provides the keys necessary to validate the token.","computed":true},"client_credential_method":{"type":"TypeString","description":"The Client Credential Method used. Currently the only supported value is `ClientSecretPost`.","computed":true},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with this Custom OIDC."},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the secret for this Custom OIDC Client.","computed":true},"issuer_endpoint":{"type":"TypeString","description":"The endpoint that issued the Token.","computed":true},"name":{"type":"TypeString","required":true,"description":"The name of the Custom OIDC Authentication Provider."},"name_claim_type":{"type":"TypeString","optional":true,"description":"The name of the claim that contains the users name."},"openid_configuration_endpoint":{"type":"TypeString","required":true,"description":"The endpoint that contains all the configuration endpoints for this Custom OIDC provider."},"scopes":{"type":"TypeList","optional":true,"description":"The list of the scopes that should be requested while authenticating.","elem":{"type":"TypeString"}},"token_endpoint":{"type":"TypeString","description":"The endpoint used to request a Token.","computed":true}}}},"default_provider":{"type":"TypeString","optional":true,"description":"The Default Authentication Provider to use when the `unauthenticated_action` is set to `RedirectToLoginPage`. Possible values include: `apple`, `azureactivedirectory`, `facebook`, `github`, `google`, `twitter` and the `name` of your `custom_oidc_v2` provider."},"excluded_paths":{"type":"TypeList","optional":true,"description":"The paths which should be excluded from the `unauthenticated_action` when it is set to `RedirectToLoginPage`.","elem":{"type":"TypeString"}},"facebook_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login."},"graph_api_version":{"type":"TypeString","optional":true,"description":"The version of the Facebook API to be used while logging in.","computed":true},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"forward_proxy_convention":{"type":"TypeString","optional":true,"default":"NoProxy","description":"The convention used to determine the url of the request made. Possible values include `ForwardProxyConventionNoProxy`, `ForwardProxyConventionStandard`, `ForwardProxyConventionCustom`. Defaults to `ForwardProxyConventionNoProxy`"},"forward_proxy_custom_host_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the host of the request."},"forward_proxy_custom_scheme_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the scheme of the request."},"github_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Google Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of Login scopes that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"http_route_api_prefix":{"type":"TypeString","optional":true,"default":"/.auth","description":"The prefix that should precede all the authentication and authorisation paths. Defaults to `/.auth`"},"login":{"type":"TypeList","required":true,"elem":{"schema":{"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"External URLs that can be redirected to as part of logging in or logging out of the app. This is an advanced setting typically only needed by Windows Store application backends. **Note:** URLs within the current domain are always implicitly allowed.","elem":{"type":"TypeString"}},"cookie_expiration_convention":{"type":"TypeString","optional":true,"default":"FixedTime","description":"The method by which cookies expire. Possible values include: `FixedTime`, and `IdentityProviderDerived`. Defaults to `FixedTime`."},"cookie_expiration_time":{"type":"TypeString","optional":true,"default":"08:00:00","description":"The time after the request is made when the session cookie should expire. Defaults to `08:00:00`."},"logout_endpoint":{"type":"TypeString","optional":true,"description":"The endpoint to which logout requests should be made."},"nonce_expiration_time":{"type":"TypeString","optional":true,"default":"00:05:00","description":"The time after the request is made when the nonce should expire. Defaults to `00:05:00`."},"preserve_url_fragments_for_logins":{"type":"TypeBool","optional":true,"default":false,"description":"Should the fragments from the request be preserved after the login request is made. Defaults to `false`."},"token_refresh_extension_time":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Token Store configuration Enabled. Defaults to `false`"},"token_store_path":{"type":"TypeString","optional":true,"description":"The directory path in the App Filesystem in which the tokens will be stored."},"token_store_sas_setting_name":{"type":"TypeString","optional":true,"description":"The name of the app setting which contains the SAS URL of the blob storage containing the tokens."},"validate_nonce":{"type":"TypeBool","optional":true,"default":true,"description":"Should the nonce be validated while completing the login flow. Defaults to `true`."}}},"maxItems":1},"microsoft_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Microsoft Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication."},"login_scopes":{"type":"TypeList","optional":true,"description":"The list of Login scopes that will be requested as part of Microsoft Account authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"require_authentication":{"type":"TypeBool","optional":true,"description":"Should the authentication flow be used for all requests."},"require_https":{"type":"TypeBool","optional":true,"default":true,"description":"Should HTTPS be required on connections? Defaults to true."},"runtime_version":{"type":"TypeString","optional":true,"default":"~1","description":"The Runtime Version of the Authentication and Authorisation feature of this App. Defaults to `~1`"},"twitter_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in."}}},"maxItems":1},"unauthenticated_action":{"type":"TypeString","optional":true,"default":"RedirectToLoginPage","description":"The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`."}}},"maxItems":1},"backup":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should this backup job be enabled?"},"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Backup."},"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","required":true,"description":"How often the backup should be executed (e.g. for weekly backup, this should be set to `7` and `frequency_unit` should be set to `Day`)."},"frequency_unit":{"type":"TypeString","required":true,"description":"The unit of time for how often the backup should take place. Possible values include: `Day` and `Hour`."},"keep_at_least_one_backup":{"type":"TypeBool","optional":true,"default":false,"description":"Should the service keep at least one backup, regardless of age of backup. Defaults to `false`."},"last_execution_time":{"type":"TypeString","description":"The time the backup was last attempted.","computed":true},"retention_period_days":{"type":"TypeInt","optional":true,"default":30,"description":"After how many days backups should be deleted."},"start_time":{"type":"TypeString","optional":true,"description":"When the schedule should start working in RFC-3339 format.","computed":true}}},"maxItems":1},"storage_account_url":{"type":"TypeString","required":true,"description":"The SAS URL to the container."}}},"maxItems":1},"client_affinity_enabled":{"type":"TypeBool","optional":true,"default":false},"client_certificate_enabled":{"type":"TypeBool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"TypeString","optional":true,"description":"Paths to exclude when using client certificates, separated by ;"},"client_certificate_mode":{"type":"TypeString","optional":true,"default":"Required"},"connection_string":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Connection."},"type":{"type":"TypeString","required":true,"description":"Type of database. Possible values include: `MySQL`, `SQLServer`, `SQLAzure`, `Custom`, `NotificationHub`, `ServiceBus`, `EventHub`, `APIHub`, `DocDb`, `RedisCache`, and `PostgreSQL`."},"value":{"type":"TypeString","required":true,"description":"The connection string value."}}}},"custom_domain_verification_id":{"type":"TypeString","computed":true},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"hosting_environment_id":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_reference_identity_id":{"type":"TypeString","optional":true,"computed":true},"kind":{"type":"TypeString","computed":true},"logs":{"type":"TypeList","optional":true,"elem":{"schema":{"application_logs":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"level":{"type":"TypeString","required":true},"retention_in_days":{"type":"TypeInt","required":true},"sas_url":{"type":"TypeString","required":true}}},"maxItems":1},"file_system_level":{"type":"TypeString","required":true}}},"maxItems":1},"detailed_error_messages":{"type":"TypeBool","optional":true,"default":false},"failed_request_tracing":{"type":"TypeBool","optional":true,"default":false},"http_logs":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","optional":true,"default":0},"sas_url":{"type":"TypeString","required":true}}},"maxItems":1},"file_system":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","required":true},"retention_in_mb":{"type":"TypeInt","required":true}}},"maxItems":1}}},"maxItems":1}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"service_plan_id":{"type":"TypeString","optional":true},"site_config":{"type":"TypeList","required":true,"elem":{"schema":{"always_on":{"type":"TypeBool","optional":true,"default":true},"api_definition_url":{"type":"TypeString","optional":true},"api_management_api_id":{"type":"TypeString","optional":true},"app_command_line":{"type":"TypeString","optional":true},"application_stack":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"docker_image_name":{"type":"TypeString","optional":true},"docker_registry_password":{"type":"TypeString","optional":true},"docker_registry_url":{"type":"TypeString","optional":true},"docker_registry_username":{"type":"TypeString","optional":true},"dotnet_version":{"type":"TypeString","optional":true},"go_version":{"type":"TypeString","optional":true},"java_server":{"type":"TypeString","optional":true},"java_server_version":{"type":"TypeString","optional":true},"java_version":{"type":"TypeString","optional":true},"node_version":{"type":"TypeString","optional":true},"php_version":{"type":"TypeString","optional":true},"python_version":{"type":"TypeString","optional":true},"ruby_version":{"type":"TypeString","optional":true}}},"maxItems":1},"auto_heal_setting":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeList","optional":true,"elem":{"schema":{"action_type":{"type":"TypeString","required":true},"minimum_process_execution_time":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"trigger":{"type":"TypeList","optional":true,"elem":{"schema":{"requests":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true}}},"maxItems":1},"slow_request":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true},"time_taken":{"type":"TypeString","required":true}}},"maxItems":1},"slow_request_with_path":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true},"time_taken":{"type":"TypeString","required":true}}}},"status_code":{"type":"TypeSet","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true},"status_code_range":{"type":"TypeString","required":true},"sub_status":{"type":"TypeInt","optional":true},"win32_status_code":{"type":"TypeInt","optional":true}}}}}},"maxItems":1}}},"maxItems":1},"auto_swap_slot_name":{"type":"TypeString","optional":true},"container_registry_managed_identity_client_id":{"type":"TypeString","optional":true},"container_registry_use_managed_identity":{"type":"TypeBool","optional":true,"default":false},"cors":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","optional":true,"description":"Specifies a list of origins that should be allowed to make cross-origin calls.","elem":{"type":"TypeString"},"minItems":1},"support_credentials":{"type":"TypeBool","optional":true,"default":false,"description":"Are credentials allowed in CORS requests? Defaults to `false`."}}},"maxItems":1},"default_documents":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"detailed_error_logging_enabled":{"type":"TypeBool","computed":true},"ftps_state":{"type":"TypeString","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"TypeInt","optional":true,"description":"The amount of time in minutes that a node is unhealthy before being removed from the load balancer. Possible values are between `2` and `10`. Only valid in conjunction with `health_check_path`"},"health_check_path":{"type":"TypeString","optional":true},"http2_enabled":{"type":"TypeBool","optional":true,"default":false},"ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"linux_fx_version":{"type":"TypeString","computed":true},"load_balancing_mode":{"type":"TypeString","optional":true,"default":"LeastRequests"},"local_mysql_enabled":{"type":"TypeBool","optional":true,"default":false},"managed_pipeline_mode":{"type":"TypeString","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"remote_debugging_enabled":{"type":"TypeBool","optional":true,"default":false},"remote_debugging_version":{"type":"TypeString","optional":true,"computed":true},"scm_ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"scm_ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"scm_type":{"type":"TypeString","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false},"use_32_bit_worker":{"type":"TypeBool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied? Defaults to `false`."},"websockets_enabled":{"type":"TypeBool","optional":true,"default":false},"worker_count":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The Site Credentials Username used for publishing.","computed":true},"password":{"type":"TypeString","description":"The Site Credentials Password used for publishing.","computed":true}}}},"storage_account":{"type":"TypeSet","optional":true,"elem":{"schema":{"access_key":{"type":"TypeString","required":true},"account_name":{"type":"TypeString","required":true},"mount_path":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"share_name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_network_subnet_id":{"type":"TypeString","optional":true},"webdeploy_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"zip_deploy_file":{"type":"TypeString","optional":true,"description":"The local path and filename of the Zip packaged application to deploy to this Windows Web App. **Note:** Using this value requires `WEBSITE_RUN_FROM_PACKAGE=1` on the App in `app_settings`.","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_load_test":{"schema":{"data_plane_uri":{"type":"TypeString","computed":true},"description":{"type":"TypeString","optional":true,"forceNew":true},"encryption":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"identity":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"identity_id":{"type":"TypeString","required":true,"forceNew":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"key_url":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_local_network_gateway":{"schema":{"address_space":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"bgp_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"asn":{"type":"TypeInt","required":true},"bgp_peering_address":{"type":"TypeString","required":true},"peer_weight":{"type":"TypeInt","optional":true}}},"maxItems":1},"gateway_address":{"type":"TypeString","optional":true},"gateway_fqdn":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_log_analytics_cluster":{"schema":{"cluster_id":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"size_gb":{"type":"TypeInt","optional":true,"default":100},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":360,"read":5,"delete":30,"update":360}},"azurerm_log_analytics_cluster_customer_managed_key":{"schema":{"key_vault_key_id":{"type":"TypeString","required":true},"log_analytics_cluster_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":360,"read":5,"delete":30,"update":360}},"azurerm_log_analytics_data_export_rule":{"schema":{"destination_resource_id":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":false},"export_rule_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"table_names":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"workspace_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_log_analytics_datasource_windows_event":{"schema":{"event_log_name":{"type":"TypeString","required":true},"event_types":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"workspace_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_log_analytics_datasource_windows_performance_counter":{"schema":{"counter_name":{"type":"TypeString","required":true},"instance_name":{"type":"TypeString","required":true},"interval_seconds":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"object_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"workspace_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_log_analytics_linked_service":{"schema":{"name":{"type":"TypeString","computed":true},"read_access_id":{"type":"TypeString","optional":true,"computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"workspace_id":{"type":"TypeString","required":true},"write_access_id":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_log_analytics_linked_storage_account":{"schema":{"data_source_type":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"storage_account_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"workspace_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_log_analytics_query_pack":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_log_analytics_query_pack_query":{"schema":{"additional_settings_json":{"type":"TypeString","optional":true},"body":{"type":"TypeString","required":true},"categories":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"query_pack_id":{"type":"TypeString","required":true,"forceNew":true},"resource_types":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"solutions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_log_analytics_saved_search":{"schema":{"category":{"type":"TypeString","required":true,"forceNew":true},"display_name":{"type":"TypeString","required":true,"forceNew":true},"function_alias":{"type":"TypeString","optional":true,"forceNew":true},"function_parameters":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"query":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_log_analytics_solution":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"plan":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"product":{"type":"TypeString","required":true,"forceNew":true},"promotion_code":{"type":"TypeString","optional":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"solution_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"workspace_name":{"type":"TypeString","required":true,"forceNew":true},"workspace_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_log_analytics_storage_insights":{"schema":{"blob_container_names":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"storage_account_id":{"type":"TypeString","required":true},"storage_account_key":{"type":"TypeString","required":true},"table_names":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_log_analytics_workspace":{"schema":{"allow_resource_only_permissions":{"type":"TypeBool","optional":true,"default":true},"cmk_for_query_forced":{"type":"TypeBool","optional":true},"daily_quota_gb":{"type":"TypeFloat","optional":true,"default":-1},"data_collection_rule_id":{"type":"TypeString","optional":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"immediate_data_purge_on_30_days_enabled":{"type":"TypeBool","optional":true},"internet_ingestion_enabled":{"type":"TypeBool","optional":true,"default":true},"internet_query_enabled":{"type":"TypeBool","optional":true,"default":true},"local_authentication_disabled":{"type":"TypeBool","optional":true,"default":false},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_shared_key":{"type":"TypeString","computed":true},"reservation_capacity_in_gb_per_day":{"type":"TypeInt","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_in_days":{"type":"TypeInt","optional":true,"computed":true},"secondary_shared_key":{"type":"TypeString","computed":true},"sku":{"type":"TypeString","optional":true,"computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_log_analytics_workspace_table":{"schema":{"name":{"type":"TypeString","required":true},"plan":{"type":"TypeString","optional":true,"default":"Analytics"},"retention_in_days":{"type":"TypeInt","optional":true},"total_retention_in_days":{"type":"TypeInt","optional":true},"workspace_id":{"type":"TypeString","required":true}},"timeouts":{"create":5,"read":5,"delete":30,"update":5}},"azurerm_logic_app_action_custom":{"schema":{"body":{"type":"TypeString","required":true},"logic_app_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_action_http":{"schema":{"body":{"type":"TypeString","optional":true},"headers":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"logic_app_id":{"type":"TypeString","required":true,"forceNew":true},"method":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"queries":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"run_after":{"type":"TypeSet","optional":true,"elem":{"schema":{"action_name":{"type":"TypeString","required":true},"action_result":{"type":"TypeString","required":true}}},"minItems":1},"uri":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_integration_account":{"schema":{"integration_service_environment_id":{"type":"TypeString","optional":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_integration_account_agreement":{"schema":{"agreement_type":{"type":"TypeString","required":true},"content":{"type":"TypeString","required":true},"guest_identity":{"type":"TypeList","required":true,"elem":{"schema":{"qualifier":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}},"maxItems":1},"guest_partner_name":{"type":"TypeString","required":true},"host_identity":{"type":"TypeList","required":true,"elem":{"schema":{"qualifier":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}},"maxItems":1},"host_partner_name":{"type":"TypeString","required":true},"integration_account_name":{"type":"TypeString","required":true,"forceNew":true},"metadata":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_integration_account_assembly":{"schema":{"assembly_name":{"type":"TypeString","required":true},"assembly_version":{"type":"TypeString","optional":true,"default":"0.0.0.0"},"content":{"type":"TypeString","optional":true},"content_link_uri":{"type":"TypeString","optional":true},"integration_account_name":{"type":"TypeString","required":true,"forceNew":true},"metadata":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_integration_account_batch_configuration":{"schema":{"batch_group_name":{"type":"TypeString","required":true,"forceNew":true},"integration_account_name":{"type":"TypeString","required":true,"forceNew":true},"metadata":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"release_criteria":{"type":"TypeList","required":true,"elem":{"schema":{"batch_size":{"type":"TypeInt","optional":true},"message_count":{"type":"TypeInt","optional":true},"recurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"end_time":{"type":"TypeString","optional":true},"frequency":{"type":"TypeString","required":true},"interval":{"type":"TypeInt","required":true},"schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"hours":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"minutes":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"month_days":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"monthly":{"type":"TypeSet","optional":true,"elem":{"schema":{"week":{"type":"TypeInt","required":true},"weekday":{"type":"TypeString","required":true}}}},"week_days":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"start_time":{"type":"TypeString","optional":true},"time_zone":{"type":"TypeString","optional":true}}},"maxItems":1}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_integration_account_certificate":{"schema":{"integration_account_name":{"type":"TypeString","required":true,"forceNew":true},"key_vault_key":{"type":"TypeList","optional":true,"elem":{"schema":{"key_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","required":true},"key_version":{"type":"TypeString","optional":true}}},"maxItems":1},"metadata":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_certificate":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_integration_account_map":{"schema":{"content":{"type":"TypeString","required":true},"integration_account_name":{"type":"TypeString","required":true,"forceNew":true},"map_type":{"type":"TypeString","required":true},"metadata":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_integration_account_partner":{"schema":{"business_identity":{"type":"TypeSet","required":true,"elem":{"schema":{"qualifier":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"integration_account_name":{"type":"TypeString","required":true,"forceNew":true},"metadata":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_integration_account_schema":{"schema":{"content":{"type":"TypeString","required":true},"file_name":{"type":"TypeString","optional":true},"integration_account_name":{"type":"TypeString","required":true,"forceNew":true},"metadata":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_integration_account_session":{"schema":{"content":{"type":"TypeString","required":true},"integration_account_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_standard":{"schema":{"app_service_plan_id":{"type":"TypeString","required":true},"app_settings":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"bundle_version":{"type":"TypeString","optional":true,"default":"[1.*, 2.0.0)"},"client_affinity_enabled":{"type":"TypeBool","optional":true,"computed":true},"client_certificate_mode":{"type":"TypeString","optional":true},"connection_string":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"custom_domain_verification_id":{"type":"TypeString","computed":true},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"https_only":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"site_config":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"always_on":{"type":"TypeBool","optional":true,"default":false},"app_scale_limit":{"type":"TypeInt","optional":true,"computed":true},"auto_swap_slot_name":{"type":"TypeString","computed":true},"cors":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"support_credentials":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"dotnet_framework_version":{"type":"TypeString","optional":true,"default":"v4.0"},"elastic_instance_minimum":{"type":"TypeInt","optional":true,"computed":true},"ftps_state":{"type":"TypeString","optional":true,"computed":true},"health_check_path":{"type":"TypeString","optional":true},"http2_enabled":{"type":"TypeBool","optional":true,"default":false},"ip_restriction":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000},"service_tag":{"type":"TypeString","optional":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true}}}},"linux_fx_version":{"type":"TypeString","optional":true,"computed":true},"min_tls_version":{"type":"TypeString","optional":true,"computed":true},"pre_warmed_instance_count":{"type":"TypeInt","optional":true,"computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"runtime_scale_monitoring_enabled":{"type":"TypeBool","optional":true,"default":false},"scm_ip_restriction":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000},"service_tag":{"type":"TypeString","optional":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true}}}},"scm_min_tls_version":{"type":"TypeString","optional":true,"computed":true},"scm_type":{"type":"TypeString","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"TypeBool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"computed":true},"websockets_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"storage_account_access_key":{"type":"TypeString","required":true},"storage_account_name":{"type":"TypeString","required":true,"forceNew":true},"storage_account_share_name":{"type":"TypeString","optional":true,"computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"use_extension_bundle":{"type":"TypeBool","optional":true,"default":true},"version":{"type":"TypeString","optional":true,"default":"~4"},"virtual_network_subnet_id":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_trigger_custom":{"schema":{"body":{"type":"TypeString","required":true},"callback_url":{"type":"TypeString","computed":true},"logic_app_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_trigger_http_request":{"schema":{"callback_url":{"type":"TypeString","computed":true},"logic_app_id":{"type":"TypeString","required":true,"forceNew":true},"method":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"relative_path":{"type":"TypeString","optional":true},"schema":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_trigger_recurrence":{"schema":{"frequency":{"type":"TypeString","required":true},"interval":{"type":"TypeInt","required":true},"logic_app_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"at_these_hours":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"at_these_minutes":{"type":"TypeSet","optional":true,"elem":{"type":"TypeInt"}},"on_these_days":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"start_time":{"type":"TypeString","optional":true},"time_zone":{"type":"TypeString","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_logic_app_workflow":{"schema":{"access_control":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_caller_ip_address_range":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"content":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_caller_ip_address_range":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"trigger":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_caller_ip_address_range":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"open_authentication_policy":{"type":"TypeSet","optional":true,"elem":{"schema":{"claim":{"type":"TypeSet","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"name":{"type":"TypeString","required":true}}}}}},"maxItems":1},"workflow_management":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_caller_ip_address_range":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}},"maxItems":1},"access_endpoint":{"type":"TypeString","computed":true},"connector_endpoint_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"connector_outbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true,"default":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"integration_service_environment_id":{"type":"TypeString","optional":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"logic_app_integration_account_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"workflow_endpoint_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"workflow_outbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"workflow_parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"workflow_schema":{"type":"TypeString","optional":true,"default":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","forceNew":true},"workflow_version":{"type":"TypeString","optional":true,"default":"1.0.0.0","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_machine_learning_compute_cluster":{"schema":{"description":{"type":"TypeString","optional":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"local_auth_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"machine_learning_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"node_public_ip_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"scale_settings":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"max_node_count":{"type":"TypeInt","required":true,"forceNew":true},"min_node_count":{"type":"TypeInt","required":true,"forceNew":true},"scale_down_nodes_after_idle_duration":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"ssh":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"admin_password":{"type":"TypeString","optional":true,"forceNew":true},"admin_username":{"type":"TypeString","required":true,"forceNew":true},"key_value":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"ssh_public_access_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"subnet_resource_id":{"type":"TypeString","optional":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"vm_priority":{"type":"TypeString","required":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_machine_learning_compute_instance":{"schema":{"assign_to_user":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"object_id":{"type":"TypeString","optional":true},"tenant_id":{"type":"TypeString","optional":true}}},"maxItems":1},"authorization_type":{"type":"TypeString","optional":true,"forceNew":true},"description":{"type":"TypeString","optional":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"local_auth_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"machine_learning_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"node_public_ip_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"ssh":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"port":{"type":"TypeInt","computed":true},"public_key":{"type":"TypeString","required":true},"username":{"type":"TypeString","computed":true}}},"maxItems":1},"subnet_resource_id":{"type":"TypeString","optional":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"virtual_machine_size":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_machine_learning_datastore_blobstorage":{"schema":{"account_key":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true,"forceNew":true},"is_default":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"service_data_auth_identity":{"type":"TypeString","optional":true,"default":"None"},"shared_access_signature":{"type":"TypeString","optional":true},"storage_container_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_machine_learning_datastore_datalake_gen2":{"schema":{"authority_url":{"type":"TypeString","optional":true},"client_id":{"type":"TypeString","optional":true},"client_secret":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true,"forceNew":true},"is_default":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"service_data_identity":{"type":"TypeString","optional":true,"default":"None"},"storage_container_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","optional":true},"workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_machine_learning_datastore_fileshare":{"schema":{"account_key":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true,"forceNew":true},"is_default":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"service_data_identity":{"type":"TypeString","optional":true,"default":"None"},"shared_access_signature":{"type":"TypeString","optional":true},"storage_fileshare_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_machine_learning_inference_cluster":{"schema":{"cluster_purpose":{"type":"TypeString","optional":true,"default":"FastProd","forceNew":true},"description":{"type":"TypeString","optional":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"kubernetes_cluster_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"machine_learning_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"ssl":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"cert":{"type":"TypeString","optional":true,"default":"","forceNew":true},"cname":{"type":"TypeString","optional":true,"default":"","forceNew":true},"key":{"type":"TypeString","optional":true,"default":"","forceNew":true},"leaf_domain_label":{"type":"TypeString","optional":true,"default":"","forceNew":true},"overwrite_existing_domain":{"type":"TypeBool","optional":true,"default":"","forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_machine_learning_synapse_spark":{"schema":{"description":{"type":"TypeString","optional":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"local_auth_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"machine_learning_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"synapse_spark_pool_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_machine_learning_workspace":{"schema":{"application_insights_id":{"type":"TypeString","required":true,"forceNew":true},"container_registry_id":{"type":"TypeString","optional":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"discovery_url":{"type":"TypeString","computed":true},"encryption":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"key_id":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","required":true},"user_assigned_identity_id":{"type":"TypeString","optional":true}}},"maxItems":1},"feature_store":{"type":"TypeList","optional":true,"elem":{"schema":{"computer_spark_runtime_version":{"type":"TypeString","optional":true},"offline_connection_name":{"type":"TypeString","optional":true},"online_connection_name":{"type":"TypeString","optional":true}}},"maxItems":1},"friendly_name":{"type":"TypeString","optional":true},"high_business_impact":{"type":"TypeBool","optional":true,"forceNew":true},"identity":{"type":"TypeList","required":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"image_build_compute_name":{"type":"TypeString","optional":true},"key_vault_id":{"type":"TypeString","required":true,"forceNew":true},"kind":{"type":"TypeString","optional":true,"default":"Default"},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_network":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"isolation_mode":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_user_assigned_identity":{"type":"TypeString","optional":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"serverless_compute":{"type":"TypeList","optional":true,"elem":{"schema":{"public_ip_enabled":{"type":"TypeBool","optional":true,"default":false},"subnet_id":{"type":"TypeString","optional":true}}},"maxItems":1},"sku_name":{"type":"TypeString","optional":true,"default":"Basic"},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"v1_legacy_mode_enabled":{"type":"TypeBool","optional":true,"default":false},"workspace_id":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_maintenance_assignment_dedicated_host":{"schema":{"dedicated_host_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"maintenance_configuration_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_maintenance_assignment_dynamic_scope":{"schema":{"filter":{"type":"TypeList","required":true,"elem":{"schema":{"locations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"os_types":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"resource_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"resource_types":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"tag_filter":{"type":"TypeString","optional":true,"default":"Any"},"tags":{"type":"TypeList","optional":true,"elem":{"schema":{"tag":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}}}},"maxItems":1},"maintenance_configuration_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":10,"update":30}},"azurerm_maintenance_assignment_virtual_machine":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"maintenance_configuration_id":{"type":"TypeString","required":true,"forceNew":true},"virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_maintenance_assignment_virtual_machine_scale_set":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"maintenance_configuration_id":{"type":"TypeString","required":true,"forceNew":true},"virtual_machine_scale_set_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_maintenance_configuration":{"schema":{"in_guest_user_patch_mode":{"type":"TypeString","optional":true},"install_patches":{"type":"TypeList","optional":true,"elem":{"schema":{"linux":{"type":"TypeList","optional":true,"elem":{"schema":{"classifications_to_include":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"package_names_mask_to_exclude":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"package_names_mask_to_include":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"minItems":1},"reboot":{"type":"TypeString","optional":true},"windows":{"type":"TypeList","optional":true,"elem":{"schema":{"classifications_to_include":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"kb_numbers_to_exclude":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"kb_numbers_to_include":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"minItems":1}}},"maxItems":1,"minItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scope":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"visibility":{"type":"TypeString","optional":true,"default":"Custom"},"window":{"type":"TypeList","optional":true,"elem":{"schema":{"duration":{"type":"TypeString","optional":true},"expiration_date_time":{"type":"TypeString","optional":true},"recur_every":{"type":"TypeString","optional":true},"start_date_time":{"type":"TypeString","required":true},"time_zone":{"type":"TypeString","required":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_managed_application":{"schema":{"application_definition_id":{"type":"TypeString","optional":true},"kind":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"outputs":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"parameter_values":{"type":"TypeString","optional":true,"computed":true},"plan":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"product":{"type":"TypeString","required":true,"forceNew":true},"promotion_code":{"type":"TypeString","optional":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_managed_application_definition":{"schema":{"authorization":{"type":"TypeSet","optional":true,"elem":{"schema":{"role_definition_id":{"type":"TypeString","required":true},"service_principal_id":{"type":"TypeString","required":true}}},"minItems":1},"create_ui_definition":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"lock_level":{"type":"TypeString","required":true,"forceNew":true},"main_template":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"package_enabled":{"type":"TypeBool","optional":true,"default":true},"package_file_uri":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_managed_disk":{"schema":{"create_option":{"type":"TypeString","required":true,"forceNew":true},"disk_access_id":{"type":"TypeString","optional":true},"disk_encryption_set_id":{"type":"TypeString","optional":true},"disk_iops_read_only":{"type":"TypeInt","optional":true,"computed":true},"disk_iops_read_write":{"type":"TypeInt","optional":true,"computed":true},"disk_mbps_read_only":{"type":"TypeInt","optional":true,"computed":true},"disk_mbps_read_write":{"type":"TypeInt","optional":true,"computed":true},"disk_size_gb":{"type":"TypeInt","optional":true,"computed":true},"edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"encryption_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"disk_encryption_key":{"type":"TypeList","required":true,"elem":{"schema":{"secret_url":{"type":"TypeString","required":true},"source_vault_id":{"type":"TypeString","required":true}}},"maxItems":1},"key_encryption_key":{"type":"TypeList","optional":true,"elem":{"schema":{"key_url":{"type":"TypeString","required":true},"source_vault_id":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"gallery_image_reference_id":{"type":"TypeString","optional":true,"forceNew":true},"hyper_v_generation":{"type":"TypeString","optional":true,"forceNew":true},"image_reference_id":{"type":"TypeString","optional":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"logical_sector_size":{"type":"TypeInt","optional":true,"computed":true,"forceNew":true},"max_shares":{"type":"TypeInt","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_access_policy":{"type":"TypeString","optional":true},"on_demand_bursting_enabled":{"type":"TypeBool","optional":true},"optimized_frequent_attach_enabled":{"type":"TypeBool","optional":true,"default":false},"os_type":{"type":"TypeString","optional":true},"performance_plus_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secure_vm_disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"security_type":{"type":"TypeString","optional":true,"forceNew":true},"source_resource_id":{"type":"TypeString","optional":true,"forceNew":true},"source_uri":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"storage_account_id":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_type":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tier":{"type":"TypeString","optional":true,"computed":true},"trusted_launch_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"upload_size_bytes":{"type":"TypeInt","optional":true,"forceNew":true},"zone":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_managed_disk_sas_token":{"schema":{"access_level":{"type":"TypeString","required":true,"forceNew":true},"duration_in_seconds":{"type":"TypeInt","required":true,"forceNew":true},"managed_disk_id":{"type":"TypeString","required":true,"forceNew":true},"sas_url":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_managed_lustre_file_system":{"schema":{"encryption_key":{"type":"TypeList","optional":true,"elem":{"schema":{"key_url":{"type":"TypeString","required":true},"source_vault_id":{"type":"TypeString","required":true}}},"maxItems":1},"hsm_setting":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"container_id":{"type":"TypeString","required":true,"forceNew":true},"import_prefix":{"type":"TypeString","optional":true,"forceNew":true},"logging_container_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"maintenance_window":{"type":"TypeList","required":true,"elem":{"schema":{"day_of_week":{"type":"TypeString","required":true},"time_of_day_in_utc":{"type":"TypeString","required":true}}},"maxItems":1},"mgs_address":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"storage_capacity_in_tb":{"type":"TypeInt","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_management_group":{"schema":{"display_name":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"parent_management_group_id":{"type":"TypeString","optional":true,"computed":true},"subscription_ids":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"tenant_scoped_id":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_management_group_policy_assignment":{"schema":{"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true},"enforce":{"type":"TypeBool","optional":true,"default":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","optional":true,"forceNew":true},"management_group_id":{"type":"TypeString","required":true,"forceNew":true},"metadata":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"non_compliance_message":{"type":"TypeList","optional":true,"elem":{"schema":{"content":{"type":"TypeString","required":true},"policy_definition_reference_id":{"type":"TypeString","optional":true}}}},"not_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"overrides":{"type":"TypeList","optional":true,"elem":{"schema":{"selectors":{"type":"TypeList","optional":true,"elem":{"schema":{"in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"kind":{"type":"TypeString","computed":true},"not_in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"value":{"type":"TypeString","required":true}}}},"parameters":{"type":"TypeString","optional":true},"policy_definition_id":{"type":"TypeString","required":true,"forceNew":true},"resource_selectors":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","optional":true},"selectors":{"type":"TypeList","required":true,"elem":{"schema":{"in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"kind":{"type":"TypeString","required":true},"not_in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_management_group_policy_exemption":{"schema":{"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true},"exemption_category":{"type":"TypeString","required":true},"expires_on":{"type":"TypeString","optional":true},"management_group_id":{"type":"TypeString","required":true,"forceNew":true},"metadata":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"policy_assignment_id":{"type":"TypeString","required":true},"policy_definition_reference_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_management_group_policy_remediation":{"schema":{"failure_percentage":{"type":"TypeFloat","optional":true},"location_filters":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"management_group_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parallel_deployments":{"type":"TypeInt","optional":true},"policy_assignment_id":{"type":"TypeString","required":true},"policy_definition_reference_id":{"type":"TypeString","optional":true},"resource_count":{"type":"TypeInt","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_management_group_subscription_association":{"schema":{"management_group_id":{"type":"TypeString","required":true,"forceNew":true},"subscription_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":5,"read":5,"delete":5}},"azurerm_management_group_template_deployment":{"schema":{"debug_level":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"management_group_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"output_content":{"type":"TypeString","computed":true},"parameters_content":{"type":"TypeString","optional":true,"computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"template_content":{"type":"TypeString","optional":true,"computed":true},"template_spec_version_id":{"type":"TypeString","optional":true}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_management_lock":{"schema":{"lock_level":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"notes":{"type":"TypeString","optional":true,"forceNew":true},"scope":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_maps_account":{"schema":{"cors":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_origins":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}},"maxItems":1},"data_store":{"type":"TypeList","optional":true,"elem":{"schema":{"storage_account_id":{"type":"TypeString","optional":true},"unique_name":{"type":"TypeString","required":true}}}},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"local_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_access_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_access_key":{"type":"TypeString","computed":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"x_ms_client_id":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_maps_creator":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"maps_account_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"storage_units":{"type":"TypeInt","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_marketplace_agreement":{"schema":{"license_text_link":{"type":"TypeString","computed":true},"offer":{"type":"TypeString","required":true,"forceNew":true},"plan":{"type":"TypeString","required":true,"forceNew":true},"privacy_policy_link":{"type":"TypeString","computed":true},"publisher":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_marketplace_role_assignment":{"schema":{"condition":{"type":"TypeString","optional":true,"forceNew":true},"condition_version":{"type":"TypeString","optional":true,"forceNew":true},"delegated_managed_identity_resource_id":{"type":"TypeString","optional":true,"forceNew":true},"description":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","optional":true,"forceNew":true},"principal_id":{"type":"TypeString","required":true,"forceNew":true},"principal_type":{"type":"TypeString","computed":true},"role_definition_id":{"type":"TypeString","optional":true,"forceNew":true},"role_definition_name":{"type":"TypeString","optional":true,"forceNew":true},"skip_service_principal_aad_check":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_mobile_network":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"mobile_country_code":{"type":"TypeString","required":true,"forceNew":true},"mobile_network_code":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_key":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_mobile_network_attached_data_network":{"schema":{"dns_addresses":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"mobile_network_data_network_name":{"type":"TypeString","required":true,"forceNew":true},"mobile_network_packet_core_data_plane_id":{"type":"TypeString","required":true,"forceNew":true},"network_address_port_translation":{"type":"TypeList","optional":true,"elem":{"schema":{"icmp_pinhole_timeout_in_seconds":{"type":"TypeInt","optional":true,"default":180},"pinhole_maximum_number":{"type":"TypeInt","optional":true,"default":65536},"port_range":{"type":"TypeList","optional":true,"elem":{"schema":{"maximum":{"type":"TypeInt","optional":true,"default":49999},"minimum":{"type":"TypeInt","optional":true,"default":1024}}},"maxItems":1},"tcp_pinhole_timeout_in_seconds":{"type":"TypeInt","optional":true,"default":180},"tcp_port_reuse_minimum_hold_time_in_seconds":{"type":"TypeInt","optional":true,"default":120},"udp_pinhole_timeout_in_seconds":{"type":"TypeInt","optional":true,"default":180},"udp_port_reuse_minimum_hold_time_in_seconds":{"type":"TypeInt","optional":true,"default":60}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"user_equipment_address_pool_prefixes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"user_equipment_static_address_pool_prefixes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"user_plane_access_ipv4_address":{"type":"TypeString","optional":true},"user_plane_access_ipv4_gateway":{"type":"TypeString","optional":true},"user_plane_access_ipv4_subnet":{"type":"TypeString","optional":true},"user_plane_access_name":{"type":"TypeString","optional":true}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_mobile_network_data_network":{"schema":{"description":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"mobile_network_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":180,"update":30}},"azurerm_mobile_network_packet_core_control_plane":{"schema":{"control_plane_access_ipv4_address":{"type":"TypeString","optional":true},"control_plane_access_ipv4_gateway":{"type":"TypeString","optional":true},"control_plane_access_ipv4_subnet":{"type":"TypeString","optional":true},"control_plane_access_name":{"type":"TypeString","optional":true},"core_network_technology":{"type":"TypeString","optional":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true}}},"maxItems":1},"interoperability_settings_json":{"type":"TypeString","optional":true},"local_diagnostics_access":{"type":"TypeList","required":true,"elem":{"schema":{"authentication_type":{"type":"TypeString","required":true},"https_server_certificate_url":{"type":"TypeString","optional":true}}},"maxItems":1,"minItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"platform":{"type":"TypeList","optional":true,"elem":{"schema":{"arc_kubernetes_cluster_id":{"type":"TypeString","optional":true},"custom_location_id":{"type":"TypeString","optional":true},"edge_device_id":{"type":"TypeString","optional":true},"stack_hci_cluster_id":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"site_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"sku":{"type":"TypeString","required":true},"software_version":{"type":"TypeString","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"user_equipment_mtu_in_bytes":{"type":"TypeInt","optional":true,"default":1440}},"timeouts":{"create":180,"read":5,"delete":180,"update":30}},"azurerm_mobile_network_packet_core_data_plane":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"mobile_network_packet_core_control_plane_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"user_plane_access_ipv4_address":{"type":"TypeString","optional":true},"user_plane_access_ipv4_gateway":{"type":"TypeString","optional":true},"user_plane_access_ipv4_subnet":{"type":"TypeString","optional":true},"user_plane_access_name":{"type":"TypeString","optional":true}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_mobile_network_service":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"mobile_network_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"pcc_rule":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"precedence":{"type":"TypeInt","required":true},"qos_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"allocation_and_retention_priority_level":{"type":"TypeInt","optional":true},"guaranteed_bit_rate":{"type":"TypeList","optional":true,"elem":{"schema":{"downlink":{"type":"TypeString","required":true},"uplink":{"type":"TypeString","required":true}}},"maxItems":1},"maximum_bit_rate":{"type":"TypeList","required":true,"elem":{"schema":{"downlink":{"type":"TypeString","required":true},"uplink":{"type":"TypeString","required":true}}},"maxItems":1},"preemption_capability":{"type":"TypeString","optional":true,"default":"NotPreempt"},"preemption_vulnerability":{"type":"TypeString","optional":true,"default":"Preemptable"},"qos_indicator":{"type":"TypeInt","required":true}}},"maxItems":1},"service_data_flow_template":{"type":"TypeList","required":true,"elem":{"schema":{"direction":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"ports":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"protocol":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"remote_ip_list":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}},"traffic_control_enabled":{"type":"TypeBool","optional":true,"default":true}}}},"service_precedence":{"type":"TypeInt","required":true},"service_qos_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"allocation_and_retention_priority_level":{"type":"TypeInt","optional":true,"default":9},"maximum_bit_rate":{"type":"TypeList","required":true,"elem":{"schema":{"downlink":{"type":"TypeString","required":true},"uplink":{"type":"TypeString","required":true}}},"maxItems":1},"preemption_capability":{"type":"TypeString","optional":true},"preemption_vulnerability":{"type":"TypeString","optional":true},"qos_indicator":{"type":"TypeInt","optional":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_mobile_network_sim":{"schema":{"authentication_key":{"type":"TypeString","required":true},"device_type":{"type":"TypeString","optional":true},"integrated_circuit_card_identifier":{"type":"TypeString","required":true,"forceNew":true},"international_mobile_subscriber_identity":{"type":"TypeString","required":true,"forceNew":true},"mobile_network_sim_group_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"operator_key_code":{"type":"TypeString","required":true},"sim_policy_id":{"type":"TypeString","optional":true},"sim_state":{"type":"TypeString","computed":true},"static_ip_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"attached_data_network_id":{"type":"TypeString","required":true},"slice_id":{"type":"TypeString","required":true},"static_ipv4_address":{"type":"TypeString","optional":true}}},"minItems":1},"vendor_key_fingerprint":{"type":"TypeString","computed":true},"vendor_name":{"type":"TypeString","computed":true}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_mobile_network_sim_group":{"schema":{"encryption_key_url":{"type":"TypeString","optional":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"mobile_network_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_mobile_network_sim_policy":{"schema":{"default_slice_id":{"type":"TypeString","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"mobile_network_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"rat_frequency_selection_priority_index":{"type":"TypeInt","optional":true},"registration_timer_in_seconds":{"type":"TypeInt","optional":true,"default":3240},"slice":{"type":"TypeList","required":true,"elem":{"schema":{"data_network":{"type":"TypeList","required":true,"elem":{"schema":{"additional_allowed_session_types":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"allocation_and_retention_priority_level":{"type":"TypeInt","optional":true,"default":0},"allowed_services_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"data_network_id":{"type":"TypeString","required":true},"default_session_type":{"type":"TypeString","optional":true,"default":"IPv4"},"max_buffered_packets":{"type":"TypeInt","optional":true,"default":10},"preemption_capability":{"type":"TypeString","optional":true,"default":"NotPreempt"},"preemption_vulnerability":{"type":"TypeString","optional":true,"default":"NotPreemptable"},"qos_indicator":{"type":"TypeInt","required":true},"session_aggregate_maximum_bit_rate":{"type":"TypeList","required":true,"elem":{"schema":{"downlink":{"type":"TypeString","required":true},"uplink":{"type":"TypeString","required":true}}},"maxItems":1}}}},"default_data_network_id":{"type":"TypeString","required":true},"slice_id":{"type":"TypeString","required":true}}},"minItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"user_equipment_aggregate_maximum_bit_rate":{"type":"TypeList","required":true,"elem":{"schema":{"downlink":{"type":"TypeString","required":true},"uplink":{"type":"TypeString","required":true}}},"maxItems":1}},"timeouts":{"create":180,"read":5,"delete":180,"update":60}},"azurerm_mobile_network_site":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"mobile_network_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_function_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_mobile_network_slice":{"schema":{"description":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"mobile_network_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"single_network_slice_selection_assistance_information":{"type":"TypeList","required":true,"elem":{"schema":{"slice_differentiator":{"type":"TypeString","optional":true},"slice_service_type":{"type":"TypeInt","required":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_monitor_aad_diagnostic_setting":{"schema":{"enabled_log":{"type":"TypeSet","optional":true,"elem":{"schema":{"category":{"type":"TypeString","required":true},"retention_policy":{"type":"TypeList","required":true,"elem":{"schema":{"days":{"type":"TypeInt","optional":true,"default":0},"enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1}}}},"eventhub_authorization_rule_id":{"type":"TypeString","optional":true,"forceNew":true},"eventhub_name":{"type":"TypeString","optional":true,"forceNew":true},"log_analytics_workspace_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"storage_account_id":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":5,"read":5,"delete":5,"update":5}},"azurerm_monitor_action_group":{"schema":{"arm_role_receiver":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"role_id":{"type":"TypeString","required":true},"use_common_alert_schema":{"type":"TypeBool","optional":true}}}},"automation_runbook_receiver":{"type":"TypeList","optional":true,"elem":{"schema":{"automation_account_id":{"type":"TypeString","required":true},"is_global_runbook":{"type":"TypeBool","required":true},"name":{"type":"TypeString","required":true},"runbook_name":{"type":"TypeString","required":true},"service_uri":{"type":"TypeString","required":true},"use_common_alert_schema":{"type":"TypeBool","optional":true,"default":false},"webhook_resource_id":{"type":"TypeString","required":true}}}},"azure_app_push_receiver":{"type":"TypeList","optional":true,"elem":{"schema":{"email_address":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}},"azure_function_receiver":{"type":"TypeList","optional":true,"elem":{"schema":{"function_app_resource_id":{"type":"TypeString","required":true},"function_name":{"type":"TypeString","required":true},"http_trigger_url":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"use_common_alert_schema":{"type":"TypeBool","optional":true}}}},"email_receiver":{"type":"TypeList","optional":true,"elem":{"schema":{"email_address":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"use_common_alert_schema":{"type":"TypeBool","optional":true}}}},"enabled":{"type":"TypeBool","optional":true,"default":true},"event_hub_receiver":{"type":"TypeList","optional":true,"elem":{"schema":{"event_hub_name":{"type":"TypeString","required":true},"event_hub_namespace":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"subscription_id":{"type":"TypeString","optional":true,"computed":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true},"use_common_alert_schema":{"type":"TypeBool","optional":true}}}},"itsm_receiver":{"type":"TypeList","optional":true,"elem":{"schema":{"connection_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"region":{"type":"TypeString","required":true},"ticket_configuration":{"type":"TypeString","required":true},"workspace_id":{"type":"TypeString","required":true}}}},"location":{"type":"TypeString","optional":true,"default":"global","forceNew":true},"logic_app_receiver":{"type":"TypeList","optional":true,"elem":{"schema":{"callback_url":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"resource_id":{"type":"TypeString","required":true},"use_common_alert_schema":{"type":"TypeBool","optional":true}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"short_name":{"type":"TypeString","required":true},"sms_receiver":{"type":"TypeList","optional":true,"elem":{"schema":{"country_code":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"phone_number":{"type":"TypeString","required":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"voice_receiver":{"type":"TypeList","optional":true,"elem":{"schema":{"country_code":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"phone_number":{"type":"TypeString","required":true}}}},"webhook_receiver":{"type":"TypeList","optional":true,"elem":{"schema":{"aad_auth":{"type":"TypeList","optional":true,"elem":{"schema":{"identifier_uri":{"type":"TypeString","optional":true,"computed":true},"object_id":{"type":"TypeString","required":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"name":{"type":"TypeString","required":true},"service_uri":{"type":"TypeString","required":true},"use_common_alert_schema":{"type":"TypeBool","optional":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_activity_log_alert":{"schema":{"action":{"type":"TypeList","optional":true,"elem":{"schema":{"action_group_id":{"type":"TypeString","required":true},"webhook_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}}},"criteria":{"type":"TypeList","required":true,"elem":{"schema":{"caller":{"type":"TypeString","optional":true},"category":{"type":"TypeString","required":true},"level":{"type":"TypeString","optional":true},"levels":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"operation_name":{"type":"TypeString","optional":true},"recommendation_category":{"type":"TypeString","optional":true},"recommendation_impact":{"type":"TypeString","optional":true},"recommendation_type":{"type":"TypeString","optional":true},"resource_group":{"type":"TypeString","optional":true},"resource_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"resource_health":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"current":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"previous":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"reason":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"resource_id":{"type":"TypeString","optional":true},"resource_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"resource_provider":{"type":"TypeString","optional":true},"resource_providers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"resource_type":{"type":"TypeString","optional":true},"resource_types":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"service_health":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"events":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"locations":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"services":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"status":{"type":"TypeString","optional":true},"statuses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"sub_status":{"type":"TypeString","optional":true},"sub_statuses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"description":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scopes":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_alert_processing_rule_action_group":{"schema":{"add_action_group_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"condition":{"type":"TypeList","optional":true,"elem":{"schema":{"alert_context":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"alert_rule_id":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"alert_rule_name":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"description":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"monitor_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"monitor_service":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"severity":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"signal_type":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"target_resource":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"target_resource_group":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"target_resource_type":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}},"maxItems":1},"description":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"effective_from":{"type":"TypeString","optional":true},"effective_until":{"type":"TypeString","optional":true},"recurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"daily":{"type":"TypeList","optional":true,"elem":{"schema":{"end_time":{"type":"TypeString","required":true},"start_time":{"type":"TypeString","required":true}}}},"monthly":{"type":"TypeList","optional":true,"elem":{"schema":{"days_of_month":{"type":"TypeList","required":true,"elem":{"type":"TypeInt"},"minItems":1},"end_time":{"type":"TypeString","optional":true},"start_time":{"type":"TypeString","optional":true}}}},"weekly":{"type":"TypeList","optional":true,"elem":{"schema":{"days_of_week":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"end_time":{"type":"TypeString","optional":true},"start_time":{"type":"TypeString","optional":true}}}}}},"maxItems":1},"time_zone":{"type":"TypeString","optional":true,"default":"UTC"}}},"maxItems":1},"scopes":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_alert_processing_rule_suppression":{"schema":{"condition":{"type":"TypeList","optional":true,"elem":{"schema":{"alert_context":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"alert_rule_id":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"alert_rule_name":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"description":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"monitor_condition":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"monitor_service":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"severity":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"signal_type":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"target_resource":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"target_resource_group":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"target_resource_type":{"type":"TypeList","optional":true,"elem":{"schema":{"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}},"maxItems":1},"description":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"effective_from":{"type":"TypeString","optional":true},"effective_until":{"type":"TypeString","optional":true},"recurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"daily":{"type":"TypeList","optional":true,"elem":{"schema":{"end_time":{"type":"TypeString","required":true},"start_time":{"type":"TypeString","required":true}}}},"monthly":{"type":"TypeList","optional":true,"elem":{"schema":{"days_of_month":{"type":"TypeList","required":true,"elem":{"type":"TypeInt"},"minItems":1},"end_time":{"type":"TypeString","optional":true},"start_time":{"type":"TypeString","optional":true}}}},"weekly":{"type":"TypeList","optional":true,"elem":{"schema":{"days_of_week":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"end_time":{"type":"TypeString","optional":true},"start_time":{"type":"TypeString","optional":true}}}}}},"maxItems":1},"time_zone":{"type":"TypeString","optional":true,"default":"UTC"}}},"maxItems":1},"scopes":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_alert_prometheus_rule_group":{"schema":{"cluster_name":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"interval":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rule":{"type":"TypeList","required":true,"elem":{"schema":{"action":{"type":"TypeList","optional":true,"elem":{"schema":{"action_group_id":{"type":"TypeString","required":true},"action_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":5},"alert":{"type":"TypeString","optional":true},"alert_resolution":{"type":"TypeList","optional":true,"elem":{"schema":{"auto_resolved":{"type":"TypeBool","optional":true},"time_to_resolve":{"type":"TypeString","optional":true}}},"maxItems":1},"annotations":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true},"expression":{"type":"TypeString","required":true},"for":{"type":"TypeString","optional":true},"labels":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"record":{"type":"TypeString","optional":true},"severity":{"type":"TypeInt","optional":true}}}},"rule_group_enabled":{"type":"TypeBool","optional":true},"scopes":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_autoscale_setting":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"notification":{"type":"TypeList","optional":true,"elem":{"schema":{"email":{"type":"TypeList","optional":true,"elem":{"schema":{"custom_emails":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"send_to_subscription_administrator":{"type":"TypeBool","optional":true,"default":false},"send_to_subscription_co_administrator":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"webhook":{"type":"TypeList","optional":true,"elem":{"schema":{"properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"service_uri":{"type":"TypeString","required":true}}}}}},"maxItems":1},"predictive":{"type":"TypeList","optional":true,"elem":{"schema":{"look_ahead_time":{"type":"TypeString","optional":true},"scale_mode":{"type":"TypeString","required":true}}},"maxItems":1,"minItems":1},"profile":{"type":"TypeList","required":true,"elem":{"schema":{"capacity":{"type":"TypeList","required":true,"elem":{"schema":{"default":{"type":"TypeInt","required":true},"maximum":{"type":"TypeInt","required":true},"minimum":{"type":"TypeInt","required":true}}},"maxItems":1},"fixed_date":{"type":"TypeList","optional":true,"elem":{"schema":{"end":{"type":"TypeString","required":true},"start":{"type":"TypeString","required":true},"timezone":{"type":"TypeString","optional":true,"default":"UTC"}}},"maxItems":1},"name":{"type":"TypeString","required":true},"recurrence":{"type":"TypeList","optional":true,"elem":{"schema":{"days":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"hours":{"type":"TypeList","required":true,"elem":{"type":"TypeInt"},"maxItems":1},"minutes":{"type":"TypeList","required":true,"elem":{"type":"TypeInt"},"maxItems":1},"timezone":{"type":"TypeString","optional":true,"default":"UTC"}}},"maxItems":1},"rule":{"type":"TypeList","optional":true,"elem":{"schema":{"metric_trigger":{"type":"TypeList","required":true,"elem":{"schema":{"dimensions":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}},"divide_by_instance_count":{"type":"TypeBool","optional":true},"metric_name":{"type":"TypeString","required":true},"metric_namespace":{"type":"TypeString","optional":true},"metric_resource_id":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"statistic":{"type":"TypeString","required":true},"threshold":{"type":"TypeFloat","required":true},"time_aggregation":{"type":"TypeString","required":true},"time_grain":{"type":"TypeString","required":true},"time_window":{"type":"TypeString","required":true}}},"maxItems":1},"scale_action":{"type":"TypeList","required":true,"elem":{"schema":{"cooldown":{"type":"TypeString","required":true},"direction":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true},"value":{"type":"TypeInt","required":true}}},"maxItems":1}}},"maxItems":10}}},"maxItems":20},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_data_collection_endpoint":{"schema":{"configuration_access_endpoint":{"type":"TypeString","computed":true},"description":{"type":"TypeString","optional":true},"immutable_id":{"type":"TypeString","computed":true},"kind":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"logs_ingestion_endpoint":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_data_collection_rule":{"schema":{"data_collection_endpoint_id":{"type":"TypeString","optional":true},"data_flow":{"type":"TypeList","required":true,"elem":{"schema":{"built_in_transform":{"type":"TypeString","optional":true},"destinations":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"output_stream":{"type":"TypeString","optional":true},"streams":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"transform_kql":{"type":"TypeString","optional":true}}},"minItems":1},"data_sources":{"type":"TypeList","optional":true,"elem":{"schema":{"data_import":{"type":"TypeList","optional":true,"elem":{"schema":{"event_hub_data_source":{"type":"TypeList","required":true,"elem":{"schema":{"consumer_group":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"stream":{"type":"TypeString","required":true}}}}}},"maxItems":1},"extension":{"type":"TypeList","optional":true,"elem":{"schema":{"extension_json":{"type":"TypeString","optional":true},"extension_name":{"type":"TypeString","required":true},"input_data_sources":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"streams":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"iis_log":{"type":"TypeList","optional":true,"elem":{"schema":{"log_directories":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"name":{"type":"TypeString","required":true},"streams":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"log_file":{"type":"TypeList","optional":true,"elem":{"schema":{"file_patterns":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"format":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"settings":{"type":"TypeList","optional":true,"elem":{"schema":{"text":{"type":"TypeList","required":true,"elem":{"schema":{"record_start_timestamp_format":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"streams":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"performance_counter":{"type":"TypeList","optional":true,"elem":{"schema":{"counter_specifiers":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"name":{"type":"TypeString","required":true},"sampling_frequency_in_seconds":{"type":"TypeInt","required":true},"streams":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"platform_telemetry":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"streams":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"prometheus_forwarder":{"type":"TypeList","optional":true,"elem":{"schema":{"label_include_filter":{"type":"TypeSet","optional":true,"elem":{"schema":{"label":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"name":{"type":"TypeString","required":true},"streams":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"syslog":{"type":"TypeList","optional":true,"elem":{"schema":{"facility_names":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"log_levels":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"name":{"type":"TypeString","required":true},"streams":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"windows_event_log":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"streams":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"x_path_queries":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"windows_firewall_log":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"streams":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}}}},"maxItems":1},"description":{"type":"TypeString","optional":true},"destinations":{"type":"TypeList","required":true,"elem":{"schema":{"azure_monitor_metrics":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true}}},"maxItems":1},"event_hub":{"type":"TypeList","optional":true,"elem":{"schema":{"event_hub_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}},"maxItems":1},"event_hub_direct":{"type":"TypeList","optional":true,"elem":{"schema":{"event_hub_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}},"maxItems":1},"log_analytics":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"workspace_resource_id":{"type":"TypeString","required":true}}}},"monitor_account":{"type":"TypeList","optional":true,"elem":{"schema":{"monitor_account_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}},"storage_blob":{"type":"TypeList","optional":true,"elem":{"schema":{"container_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"storage_account_id":{"type":"TypeString","required":true}}}},"storage_blob_direct":{"type":"TypeList","optional":true,"elem":{"schema":{"container_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"storage_account_id":{"type":"TypeString","required":true}}}},"storage_table_direct":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"storage_account_id":{"type":"TypeString","required":true},"table_name":{"type":"TypeString","required":true}}}}}},"maxItems":1,"minItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"immutable_id":{"type":"TypeString","computed":true},"kind":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"stream_declaration":{"type":"TypeSet","optional":true,"elem":{"schema":{"column":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"stream_name":{"type":"TypeString","required":true}}},"minItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_data_collection_rule_association":{"schema":{"data_collection_endpoint_id":{"type":"TypeString","optional":true},"data_collection_rule_id":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"default":"configurationAccessEndpoint","forceNew":true},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_diagnostic_setting":{"schema":{"enabled_log":{"type":"TypeSet","optional":true,"elem":{"schema":{"category":{"type":"TypeString","optional":true},"category_group":{"type":"TypeString","optional":true},"retention_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"days":{"type":"TypeInt","optional":true},"enabled":{"type":"TypeBool","required":true}}},"maxItems":1}}}},"eventhub_authorization_rule_id":{"type":"TypeString","optional":true},"eventhub_name":{"type":"TypeString","optional":true},"log_analytics_destination_type":{"type":"TypeString","optional":true,"computed":true},"log_analytics_workspace_id":{"type":"TypeString","optional":true},"metric":{"type":"TypeSet","optional":true,"elem":{"schema":{"category":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"retention_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"days":{"type":"TypeInt","optional":true},"enabled":{"type":"TypeBool","required":true}}},"maxItems":1}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"partner_solution_id":{"type":"TypeString","optional":true},"storage_account_id":{"type":"TypeString","optional":true},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":60,"update":30}},"azurerm_monitor_metric_alert":{"schema":{"action":{"type":"TypeSet","optional":true,"elem":{"schema":{"action_group_id":{"type":"TypeString","required":true},"webhook_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}}},"application_insights_web_test_location_availability_criteria":{"type":"TypeList","optional":true,"elem":{"schema":{"component_id":{"type":"TypeString","required":true},"failed_location_count":{"type":"TypeInt","required":true},"web_test_id":{"type":"TypeString","required":true}}},"maxItems":1,"minItems":1},"auto_mitigate":{"type":"TypeBool","optional":true,"default":true},"criteria":{"type":"TypeList","optional":true,"elem":{"schema":{"aggregation":{"type":"TypeString","required":true},"dimension":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"metric_name":{"type":"TypeString","required":true},"metric_namespace":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"skip_metric_validation":{"type":"TypeBool","optional":true,"default":false},"threshold":{"type":"TypeFloat","required":true}}},"minItems":1},"description":{"type":"TypeString","optional":true},"dynamic_criteria":{"type":"TypeList","optional":true,"elem":{"schema":{"aggregation":{"type":"TypeString","required":true},"alert_sensitivity":{"type":"TypeString","required":true},"dimension":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1}}}},"evaluation_failure_count":{"type":"TypeInt","optional":true,"default":4},"evaluation_total_count":{"type":"TypeInt","optional":true,"default":4},"ignore_data_before":{"type":"TypeString","optional":true},"metric_name":{"type":"TypeString","required":true},"metric_namespace":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"skip_metric_validation":{"type":"TypeBool","optional":true}}},"maxItems":1,"minItems":1},"enabled":{"type":"TypeBool","optional":true,"default":true},"frequency":{"type":"TypeString","optional":true,"default":"PT1M"},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scopes":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"severity":{"type":"TypeInt","optional":true,"default":3},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"target_resource_location":{"type":"TypeString","optional":true,"description":"The location of the target pluginsdk. Required when using subscription, resource group scope or multiple scopes.","computed":true},"target_resource_type":{"type":"TypeString","optional":true,"description":"The resource type (e.g. Microsoft.Compute/virtualMachines) of the target pluginsdk. Required when using subscription, resource group scope or multiple scopes.","computed":true},"window_size":{"type":"TypeString","optional":true,"default":"PT5M"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_private_link_scope":{"schema":{"ingestion_access_mode":{"type":"TypeString","optional":true,"default":"Open"},"name":{"type":"TypeString","required":true,"forceNew":true},"query_access_mode":{"type":"TypeString","optional":true,"default":"Open"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_private_link_scoped_service":{"schema":{"linked_resource_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scope_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_monitor_scheduled_query_rules_alert":{"schema":{"action":{"type":"TypeList","required":true,"elem":{"schema":{"action_group":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"custom_webhook_payload":{"type":"TypeString","optional":true},"email_subject":{"type":"TypeString","optional":true}}},"maxItems":1},"authorized_resource_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":100},"auto_mitigation_enabled":{"type":"TypeBool","optional":true,"default":false},"data_source_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"frequency":{"type":"TypeInt","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"query":{"type":"TypeString","required":true},"query_type":{"type":"TypeString","optional":true,"default":"ResultCount"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"severity":{"type":"TypeInt","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"throttling":{"type":"TypeInt","optional":true},"time_window":{"type":"TypeInt","required":true},"trigger":{"type":"TypeList","required":true,"elem":{"schema":{"metric_trigger":{"type":"TypeList","optional":true,"elem":{"schema":{"metric_column":{"type":"TypeString","optional":true},"metric_trigger_type":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"threshold":{"type":"TypeFloat","required":true}}},"maxItems":1},"operator":{"type":"TypeString","required":true},"threshold":{"type":"TypeFloat","required":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_scheduled_query_rules_alert_v2":{"schema":{"action":{"type":"TypeList","optional":true,"elem":{"schema":{"action_groups":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"custom_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"auto_mitigation_enabled":{"type":"TypeBool","optional":true,"default":false},"created_with_api_version":{"type":"TypeString","computed":true},"criteria":{"type":"TypeList","required":true,"elem":{"schema":{"dimension":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}},"failing_periods":{"type":"TypeList","optional":true,"elem":{"schema":{"minimum_failing_periods_to_trigger_alert":{"type":"TypeInt","required":true},"number_of_evaluation_periods":{"type":"TypeInt","required":true}}},"maxItems":1},"metric_measure_column":{"type":"TypeString","optional":true},"operator":{"type":"TypeString","required":true},"query":{"type":"TypeString","required":true},"resource_id_column":{"type":"TypeString","optional":true},"threshold":{"type":"TypeFloat","required":true},"time_aggregation_method":{"type":"TypeString","required":true}}},"minItems":1},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"evaluation_frequency":{"type":"TypeString","required":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"is_a_legacy_log_analytics_rule":{"type":"TypeBool","computed":true},"is_workspace_alerts_storage_configured":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"mute_actions_after_alert_duration":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"query_time_range_override":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scopes":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"maxItems":1,"minItems":1},"severity":{"type":"TypeInt","required":true},"skip_query_validation":{"type":"TypeBool","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"target_resource_types":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"window_duration":{"type":"TypeString","required":true},"workspace_alerts_storage_enabled":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_scheduled_query_rules_log":{"schema":{"authorized_resource_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"criteria":{"type":"TypeList","required":true,"elem":{"schema":{"dimension":{"type":"TypeSet","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"operator":{"type":"TypeString","optional":true,"default":"Include"},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}},"metric_name":{"type":"TypeString","required":true}}},"maxItems":1},"data_source_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_smart_detector_alert_rule":{"schema":{"action_group":{"type":"TypeList","required":true,"elem":{"schema":{"email_subject":{"type":"TypeString","optional":true},"ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"webhook_payload":{"type":"TypeString","optional":true}}},"maxItems":1},"description":{"type":"TypeString","optional":true},"detector_type":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"frequency":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scope_resource_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"severity":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"throttling_duration":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_monitor_workspace":{"schema":{"default_data_collection_endpoint_id":{"type":"TypeString","computed":true},"default_data_collection_rule_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"query_endpoint":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_database":{"schema":{"auto_pause_delay_in_minutes":{"type":"TypeInt","optional":true,"computed":true},"collation":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"create_mode":{"type":"TypeString","optional":true,"default":"Default","forceNew":true},"creation_source_database_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"elastic_pool_id":{"type":"TypeString","optional":true},"enclave_type":{"type":"TypeString","optional":true,"computed":true},"geo_backup_enabled":{"type":"TypeBool","optional":true,"default":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true}}},"maxItems":1},"import":{"type":"TypeList","optional":true,"elem":{"schema":{"administrator_login":{"type":"TypeString","required":true},"administrator_login_password":{"type":"TypeString","required":true},"authentication_type":{"type":"TypeString","required":true},"storage_account_id":{"type":"TypeString","optional":true},"storage_key":{"type":"TypeString","required":true},"storage_key_type":{"type":"TypeString","required":true},"storage_uri":{"type":"TypeString","required":true}}},"maxItems":1},"ledger_enabled":{"type":"TypeBool","optional":true,"computed":true,"forceNew":true},"license_type":{"type":"TypeString","optional":true,"computed":true},"long_term_retention_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"monthly_retention":{"type":"TypeString","optional":true,"computed":true},"week_of_year":{"type":"TypeInt","optional":true,"computed":true},"weekly_retention":{"type":"TypeString","optional":true,"computed":true},"yearly_retention":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"maintenance_configuration_name":{"type":"TypeString","optional":true,"computed":true},"max_size_gb":{"type":"TypeInt","optional":true,"computed":true},"min_capacity":{"type":"TypeFloat","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"read_replica_count":{"type":"TypeInt","optional":true,"computed":true},"read_scale":{"type":"TypeBool","optional":true,"computed":true},"recover_database_id":{"type":"TypeString","optional":true},"recovery_point_id":{"type":"TypeString","optional":true},"restore_dropped_database_id":{"type":"TypeString","optional":true},"restore_long_term_retention_backup_id":{"type":"TypeString","optional":true},"restore_point_in_time":{"type":"TypeString","optional":true,"computed":true},"sample_name":{"type":"TypeString","optional":true,"computed":true},"secondary_type":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"server_id":{"type":"TypeString","required":true,"forceNew":true},"short_term_retention_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"backup_interval_in_hours":{"type":"TypeInt","optional":true,"default":12},"retention_days":{"type":"TypeInt","required":true}}},"maxItems":1},"sku_name":{"type":"TypeString","optional":true,"computed":true},"storage_account_type":{"type":"TypeString","optional":true,"default":"Geo"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"threat_detection_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"disabled_alerts":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"email_account_admins":{"type":"TypeString","optional":true,"default":"Disabled"},"email_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"retention_days":{"type":"TypeInt","optional":true},"state":{"type":"TypeString","optional":true,"default":"Disabled"},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_endpoint":{"type":"TypeString","optional":true}}},"maxItems":1},"transparent_data_encryption_enabled":{"type":"TypeBool","optional":true,"default":true},"transparent_data_encryption_key_automatic_rotation_enabled":{"type":"TypeBool","optional":true,"default":false},"transparent_data_encryption_key_vault_key_id":{"type":"TypeString","optional":true},"zone_redundant":{"type":"TypeBool","optional":true,"computed":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_mssql_database_extended_auditing_policy":{"schema":{"database_id":{"type":"TypeString","required":true,"forceNew":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"log_monitoring_enabled":{"type":"TypeBool","optional":true,"default":true},"retention_in_days":{"type":"TypeInt","optional":true,"default":0},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_account_access_key_is_secondary":{"type":"TypeBool","optional":true,"default":false},"storage_endpoint":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_database_vulnerability_assessment_rule_baseline":{"schema":{"baseline_name":{"type":"TypeString","optional":true,"default":"default","forceNew":true},"baseline_result":{"type":"TypeSet","required":true,"elem":{"schema":{"result":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}},"database_name":{"type":"TypeString","required":true,"forceNew":true},"rule_id":{"type":"TypeString","required":true,"forceNew":true},"server_vulnerability_assessment_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_elasticpool":{"schema":{"enclave_type":{"type":"TypeString","optional":true,"computed":true},"license_type":{"type":"TypeString","optional":true,"computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"maintenance_configuration_name":{"type":"TypeString","optional":true,"default":"SQL_Default"},"max_size_bytes":{"type":"TypeInt","optional":true,"computed":true},"max_size_gb":{"type":"TypeFloat","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"per_database_settings":{"type":"TypeList","required":true,"elem":{"schema":{"max_capacity":{"type":"TypeFloat","required":true},"min_capacity":{"type":"TypeFloat","required":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeList","required":true,"elem":{"schema":{"capacity":{"type":"TypeInt","required":true},"family":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"tier":{"type":"TypeString","required":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zone_redundant":{"type":"TypeBool","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_failover_group":{"schema":{"databases":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"partner_server":{"type":"TypeList","required":true,"elem":{"schema":{"id":{"type":"TypeString","required":true},"location":{"type":"TypeString","computed":true},"role":{"type":"TypeString","computed":true}}},"minItems":1},"read_write_endpoint_failover_policy":{"type":"TypeList","required":true,"elem":{"schema":{"grace_minutes":{"type":"TypeInt","optional":true},"mode":{"type":"TypeString","required":true}}},"maxItems":1},"readonly_endpoint_failover_policy_enabled":{"type":"TypeBool","optional":true,"computed":true},"server_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_firewall_rule":{"schema":{"end_ip_address":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"server_id":{"type":"TypeString","required":true,"forceNew":true},"start_ip_address":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_job_agent":{"schema":{"database_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_mssql_job_credential":{"schema":{"job_agent_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_mssql_managed_database":{"schema":{"long_term_retention_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"monthly_retention":{"type":"TypeString","optional":true,"computed":true},"week_of_year":{"type":"TypeInt","optional":true,"computed":true},"weekly_retention":{"type":"TypeString","optional":true,"computed":true},"yearly_retention":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"managed_instance_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"point_in_time_restore":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"restore_point_in_time":{"type":"TypeString","required":true,"forceNew":true},"source_database_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"short_term_retention_days":{"type":"TypeInt","optional":true,"default":7}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_managed_instance":{"schema":{"administrator_login":{"type":"TypeString","required":true,"forceNew":true},"administrator_login_password":{"type":"TypeString","required":true},"collation":{"type":"TypeString","optional":true,"default":"SQL_Latin1_General_CP1_CI_AS","forceNew":true},"dns_zone":{"type":"TypeString","computed":true},"dns_zone_partner_id":{"type":"TypeString","optional":true},"fqdn":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"license_type":{"type":"TypeString","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"maintenance_configuration_name":{"type":"TypeString","optional":true,"default":"SQL_Default"},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"name":{"type":"TypeString","required":true,"forceNew":true},"proxy_override":{"type":"TypeString","optional":true,"default":"Default"},"public_data_endpoint_enabled":{"type":"TypeBool","optional":true,"default":false},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_principal_type":{"type":"TypeString","optional":true},"sku_name":{"type":"TypeString","required":true},"storage_account_type":{"type":"TypeString","optional":true,"default":"GRS","forceNew":true},"storage_size_in_gb":{"type":"TypeInt","required":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"timezone_id":{"type":"TypeString","optional":true,"default":"UTC","forceNew":true},"vcores":{"type":"TypeInt","required":true},"zone_redundant_enabled":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":1440,"read":5,"delete":1440,"update":1440}},"azurerm_mssql_managed_instance_active_directory_administrator":{"schema":{"azuread_authentication_only":{"type":"TypeBool","optional":true},"login_username":{"type":"TypeString","required":true},"managed_instance_id":{"type":"TypeString","required":true,"forceNew":true},"object_id":{"type":"TypeString","required":true},"tenant_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":180,"update":30}},"azurerm_mssql_managed_instance_failover_group":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"managed_instance_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"partner_managed_instance_id":{"type":"TypeString","required":true,"forceNew":true},"partner_region":{"type":"TypeList","computed":true,"elem":{"schema":{"location":{"type":"TypeString","computed":true},"role":{"type":"TypeString","computed":true}}}},"read_write_endpoint_failover_policy":{"type":"TypeList","required":true,"elem":{"schema":{"grace_minutes":{"type":"TypeInt","optional":true},"mode":{"type":"TypeString","required":true}}},"maxItems":1},"readonly_endpoint_failover_policy_enabled":{"type":"TypeBool","optional":true,"default":true},"role":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_managed_instance_security_alert_policy":{"schema":{"disabled_alerts":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"email_account_admins_enabled":{"type":"TypeBool","optional":true,"default":false},"email_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true},"managed_instance_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_days":{"type":"TypeInt","optional":true,"default":0},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_endpoint":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_managed_instance_transparent_data_encryption":{"schema":{"auto_rotation_enabled":{"type":"TypeBool","optional":true,"default":false},"key_vault_key_id":{"type":"TypeString","optional":true},"managed_instance_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_managed_instance_vulnerability_assessment":{"schema":{"managed_instance_id":{"type":"TypeString","required":true,"forceNew":true},"recurring_scans":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"email_subscription_admins":{"type":"TypeBool","optional":true,"default":true},"emails":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_container_path":{"type":"TypeString","required":true},"storage_container_sas_key":{"type":"TypeString","optional":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_mssql_outbound_firewall_rule":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"server_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_mssql_server":{"schema":{"administrator_login":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"administrator_login_password":{"type":"TypeString","optional":true},"azuread_administrator":{"type":"TypeList","optional":true,"elem":{"schema":{"azuread_authentication_only":{"type":"TypeBool","optional":true,"computed":true},"login_username":{"type":"TypeString","required":true},"object_id":{"type":"TypeString","required":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1,"minItems":1},"connection_policy":{"type":"TypeString","optional":true,"default":"Default"},"fully_qualified_domain_name":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"name":{"type":"TypeString","required":true,"forceNew":true},"outbound_network_restriction_enabled":{"type":"TypeBool","optional":true,"default":false},"primary_user_assigned_identity_id":{"type":"TypeString","optional":true,"computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"restorable_dropped_database_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"transparent_data_encryption_key_vault_key_id":{"type":"TypeString","optional":true},"version":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_mssql_server_dns_alias":{"schema":{"dns_record":{"type":"TypeString","computed":true},"mssql_server_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":10}},"azurerm_mssql_server_extended_auditing_policy":{"schema":{"audit_actions_and_groups":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true,"default":true},"log_monitoring_enabled":{"type":"TypeBool","optional":true,"default":true},"predicate_expression":{"type":"TypeString","optional":true},"retention_in_days":{"type":"TypeInt","optional":true,"default":0},"server_id":{"type":"TypeString","required":true,"forceNew":true},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_account_access_key_is_secondary":{"type":"TypeBool","optional":true,"default":false},"storage_account_subscription_id":{"type":"TypeString","optional":true},"storage_endpoint":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_server_microsoft_support_auditing_policy":{"schema":{"blob_storage_endpoint":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"log_monitoring_enabled":{"type":"TypeBool","optional":true,"default":true},"server_id":{"type":"TypeString","required":true,"forceNew":true},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_account_subscription_id":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_server_security_alert_policy":{"schema":{"disabled_alerts":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"email_account_admins":{"type":"TypeBool","optional":true,"default":false},"email_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_days":{"type":"TypeInt","optional":true,"default":0},"server_name":{"type":"TypeString","required":true,"forceNew":true},"state":{"type":"TypeString","required":true},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_endpoint":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_server_transparent_data_encryption":{"schema":{"auto_rotation_enabled":{"type":"TypeBool","optional":true,"default":false},"key_vault_key_id":{"type":"TypeString","optional":true},"managed_hsm_key_id":{"type":"TypeString","optional":true},"server_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_server_vulnerability_assessment":{"schema":{"recurring_scans":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"email_subscription_admins":{"type":"TypeBool","optional":true,"default":false},"emails":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"server_security_alert_policy_id":{"type":"TypeString","required":true,"forceNew":true},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_container_path":{"type":"TypeString","required":true},"storage_container_sas_key":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_virtual_machine":{"schema":{"assessment":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"run_immediately":{"type":"TypeBool","optional":true,"default":false},"schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"day_of_week":{"type":"TypeString","required":true},"monthly_occurrence":{"type":"TypeInt","optional":true},"start_time":{"type":"TypeString","required":true},"weekly_interval":{"type":"TypeInt","optional":true}}},"maxItems":1}}},"maxItems":1},"auto_backup":{"type":"TypeList","optional":true,"elem":{"schema":{"encryption_enabled":{"type":"TypeBool","optional":true,"default":false},"encryption_password":{"type":"TypeString","optional":true},"manual_schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"days_of_week":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"full_backup_frequency":{"type":"TypeString","required":true},"full_backup_start_hour":{"type":"TypeInt","required":true},"full_backup_window_in_hours":{"type":"TypeInt","required":true},"log_backup_frequency_in_minutes":{"type":"TypeInt","required":true}}},"maxItems":1},"retention_period_in_days":{"type":"TypeInt","required":true},"storage_account_access_key":{"type":"TypeString","required":true},"storage_blob_endpoint":{"type":"TypeString","required":true},"system_databases_backup_enabled":{"type":"TypeBool","optional":true}}},"maxItems":1},"auto_patching":{"type":"TypeList","optional":true,"elem":{"schema":{"day_of_week":{"type":"TypeString","required":true},"maintenance_window_duration_in_minutes":{"type":"TypeInt","required":true},"maintenance_window_starting_hour":{"type":"TypeInt","required":true}}},"maxItems":1},"key_vault_credential":{"type":"TypeList","optional":true,"elem":{"schema":{"key_vault_url":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true},"service_principal_name":{"type":"TypeString","required":true,"forceNew":true},"service_principal_secret":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"r_services_enabled":{"type":"TypeBool","optional":true},"sql_connectivity_port":{"type":"TypeInt","optional":true,"default":1433},"sql_connectivity_type":{"type":"TypeString","optional":true,"default":"PRIVATE"},"sql_connectivity_update_password":{"type":"TypeString","optional":true},"sql_connectivity_update_username":{"type":"TypeString","optional":true},"sql_instance":{"type":"TypeList","optional":true,"elem":{"schema":{"adhoc_workloads_optimization_enabled":{"type":"TypeBool","optional":true,"default":false},"collation":{"type":"TypeString","optional":true,"default":"SQL_Latin1_General_CP1_CI_AS","forceNew":true},"instant_file_initialization_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"lock_pages_in_memory_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"max_dop":{"type":"TypeInt","optional":true,"default":0},"max_server_memory_mb":{"type":"TypeInt","optional":true,"default":2147483647},"min_server_memory_mb":{"type":"TypeInt","optional":true,"default":0}}},"maxItems":1},"sql_license_type":{"type":"TypeString","optional":true,"forceNew":true},"sql_virtual_machine_group_id":{"type":"TypeString","optional":true},"storage_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"data_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"default_file_path":{"type":"TypeString","required":true},"luns":{"type":"TypeList","required":true,"elem":{"type":"TypeInt"}}}},"maxItems":1},"disk_type":{"type":"TypeString","required":true},"log_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"default_file_path":{"type":"TypeString","required":true},"luns":{"type":"TypeList","required":true,"elem":{"type":"TypeInt"}}}},"maxItems":1},"storage_workload_type":{"type":"TypeString","required":true},"system_db_on_data_disk_enabled":{"type":"TypeBool","optional":true,"default":false},"temp_db_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"data_file_count":{"type":"TypeInt","optional":true,"default":8},"data_file_growth_in_mb":{"type":"TypeInt","optional":true,"default":512},"data_file_size_mb":{"type":"TypeInt","optional":true,"default":256},"default_file_path":{"type":"TypeString","required":true},"log_file_growth_mb":{"type":"TypeInt","optional":true,"default":512},"log_file_size_mb":{"type":"TypeInt","optional":true,"default":256},"luns":{"type":"TypeList","required":true,"elem":{"type":"TypeInt"}}}},"maxItems":1}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true},"wsfc_domain_credential":{"type":"TypeList","optional":true,"elem":{"schema":{"cluster_bootstrap_account_password":{"type":"TypeString","required":true},"cluster_operator_account_password":{"type":"TypeString","required":true},"sql_service_account_password":{"type":"TypeString","required":true}}},"maxItems":1}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_mssql_virtual_machine_availability_group_listener":{"schema":{"availability_group_name":{"type":"TypeString","optional":true,"forceNew":true},"load_balancer_configuration":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"load_balancer_id":{"type":"TypeString","required":true,"forceNew":true},"private_ip_address":{"type":"TypeString","required":true,"forceNew":true},"probe_port":{"type":"TypeInt","required":true,"forceNew":true},"sql_virtual_machine_ids":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"multi_subnet_ip_configuration":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"private_ip_address":{"type":"TypeString","required":true,"forceNew":true},"sql_virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"port":{"type":"TypeInt","optional":true,"forceNew":true},"replica":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"schema":{"commit":{"type":"TypeString","required":true,"forceNew":true},"failover_mode":{"type":"TypeString","required":true,"forceNew":true},"readable_secondary":{"type":"TypeString","required":true,"forceNew":true},"role":{"type":"TypeString","required":true,"forceNew":true},"sql_virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true}}}},"sql_virtual_machine_group_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_mssql_virtual_machine_group":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sql_image_offer":{"type":"TypeString","required":true,"forceNew":true},"sql_image_sku":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"wsfc_domain_profile":{"type":"TypeList","required":true,"elem":{"schema":{"cluster_bootstrap_account_name":{"type":"TypeString","optional":true,"forceNew":true},"cluster_operator_account_name":{"type":"TypeString","optional":true,"forceNew":true},"cluster_subnet_type":{"type":"TypeString","required":true,"forceNew":true},"fqdn":{"type":"TypeString","required":true,"forceNew":true},"organizational_unit_path":{"type":"TypeString","optional":true,"forceNew":true},"sql_service_account_name":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_primary_key":{"type":"TypeString","optional":true},"storage_account_url":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mssql_virtual_network_rule":{"schema":{"ignore_missing_vnet_service_endpoint":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"server_id":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mysql_flexible_database":{"schema":{"charset":{"type":"TypeString","required":true,"forceNew":true},"collation":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60}},"azurerm_mysql_flexible_server":{"schema":{"administrator_login":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"administrator_password":{"type":"TypeString","optional":true},"backup_retention_days":{"type":"TypeInt","optional":true,"default":7},"create_mode":{"type":"TypeString","optional":true,"forceNew":true},"customer_managed_key":{"type":"TypeList","optional":true,"elem":{"schema":{"geo_backup_key_vault_key_id":{"type":"TypeString","optional":true},"geo_backup_user_assigned_identity_id":{"type":"TypeString","optional":true},"key_vault_key_id":{"type":"TypeString","optional":true},"primary_user_assigned_identity_id":{"type":"TypeString","optional":true}}},"maxItems":1},"delegated_subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"fqdn":{"type":"TypeString","computed":true},"geo_redundant_backup_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"high_availability":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"standby_availability_zone":{"type":"TypeString","optional":true}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"maintenance_window":{"type":"TypeList","optional":true,"elem":{"schema":{"day_of_week":{"type":"TypeInt","optional":true,"default":0},"start_hour":{"type":"TypeInt","optional":true,"default":0},"start_minute":{"type":"TypeInt","optional":true,"default":0}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"point_in_time_restore_time_in_utc":{"type":"TypeString","optional":true,"forceNew":true},"private_dns_zone_id":{"type":"TypeString","optional":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"replica_capacity":{"type":"TypeInt","computed":true},"replication_role":{"type":"TypeString","optional":true,"computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","optional":true,"computed":true},"source_server_id":{"type":"TypeString","optional":true,"forceNew":true},"storage":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"auto_grow_enabled":{"type":"TypeBool","optional":true,"default":true},"io_scaling_enabled":{"type":"TypeBool","optional":true,"default":false},"iops":{"type":"TypeInt","optional":true,"computed":true},"size_gb":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"version":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"zone":{"type":"TypeString","optional":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_mysql_flexible_server_active_directory_administrator":{"schema":{"identity_id":{"type":"TypeString","required":true},"login":{"type":"TypeString","required":true},"object_id":{"type":"TypeString","required":true},"server_id":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mysql_flexible_server_configuration":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_mysql_flexible_server_firewall_rule":{"schema":{"end_ip_address":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_name":{"type":"TypeString","required":true,"forceNew":true},"start_ip_address":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_nat_gateway":{"schema":{"idle_timeout_in_minutes":{"type":"TypeInt","optional":true,"default":4},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"resource_guid":{"type":"TypeString","computed":true},"sku_name":{"type":"TypeString","optional":true,"default":"Standard"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_nat_gateway_public_ip_association":{"schema":{"nat_gateway_id":{"type":"TypeString","required":true,"forceNew":true},"public_ip_address_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_nat_gateway_public_ip_prefix_association":{"schema":{"nat_gateway_id":{"type":"TypeString","required":true,"forceNew":true},"public_ip_prefix_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_netapp_account":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"aes_encryption_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"If enabled, AES encryption will be enabled for SMB communication."},"dns_servers":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"domain":{"type":"TypeString","required":true},"kerberos_ad_name":{"type":"TypeString","optional":true,"description":"Name of the active directory machine. This optional parameter is used only while creating kerberos volume."},"kerberos_kdc_ip":{"type":"TypeString","optional":true,"description":"IP address of the KDC server (usually same the DC). This optional parameter is used only while creating kerberos volume."},"ldap_over_tls_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Specifies whether or not the LDAP traffic needs to be secured via TLS."},"ldap_signing_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Specifies whether or not the LDAP traffic needs to be signed."},"local_nfs_users_with_ldap_allowed":{"type":"TypeBool","optional":true,"default":false,"description":"If enabled, NFS client local users can also (in addition to LDAP users) access the NFS volumes."},"organizational_unit":{"type":"TypeString","optional":true,"default":"CN=Computers","description":"The Organizational Unit (OU) within the Windows Active Directory where machines will be created. If blank, defaults to 'CN=Computers'"},"password":{"type":"TypeString","required":true},"server_root_ca_certificate":{"type":"TypeString","optional":true,"description":"When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded Active Directory Certificate Service's self-signed root CA certificate, this optional parameter is used only for dual protocol with LDAP user-mapping volumes."},"site_name":{"type":"TypeString","optional":true,"default":"Default-First-Site-Name","description":"The Active Directory site the service will limit Domain Controller discovery to. If blank, defaults to 'Default-First-Site-Name'"},"smb_server_name":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_netapp_account_encryption":{"schema":{"encryption_key":{"type":"TypeString","required":true,"description":"The versionless encryption key url."},"netapp_account_id":{"type":"TypeString","required":true,"description":"The ID of the NetApp Account where encryption will be set."},"system_assigned_identity_principal_id":{"type":"TypeString","optional":true,"description":"The Principal ID of the System Assigned Identity to use for encryption."},"user_assigned_identity_id":{"type":"TypeString","optional":true,"description":"The resource ID of the User Assigned Identity to use for encryption."}},"timeouts":{"create":90,"read":5,"delete":120,"update":120}},"azurerm_netapp_pool":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"encryption_type":{"type":"TypeString","optional":true,"default":"Single","forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"qos_type":{"type":"TypeString","optional":true,"default":"Auto"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_level":{"type":"TypeString","required":true,"forceNew":true},"size_in_tb":{"type":"TypeInt","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_netapp_snapshot":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"pool_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"volume_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_netapp_snapshot_policy":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"daily_schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"hour":{"type":"TypeInt","required":true},"minute":{"type":"TypeInt","required":true},"snapshots_to_keep":{"type":"TypeInt","required":true}}},"maxItems":1},"enabled":{"type":"TypeBool","required":true},"hourly_schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"minute":{"type":"TypeInt","required":true},"snapshots_to_keep":{"type":"TypeInt","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"monthly_schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"days_of_month":{"type":"TypeSet","required":true,"elem":{"type":"TypeInt"},"maxItems":30},"hour":{"type":"TypeInt","required":true},"minute":{"type":"TypeInt","required":true},"snapshots_to_keep":{"type":"TypeInt","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"weekly_schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"days_of_week":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"maxItems":7},"hour":{"type":"TypeInt","required":true},"minute":{"type":"TypeInt","required":true},"snapshots_to_keep":{"type":"TypeInt","required":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_netapp_volume":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"azure_vmware_data_store_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"create_from_snapshot_resource_id":{"type":"TypeString","optional":true,"forceNew":true},"data_protection_replication":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"endpoint_type":{"type":"TypeString","optional":true,"default":"dst"},"remote_volume_location":{"type":"TypeString","required":true,"forceNew":true},"remote_volume_resource_id":{"type":"TypeString","required":true},"replication_frequency":{"type":"TypeString","required":true}}},"maxItems":1},"data_protection_snapshot_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"snapshot_policy_id":{"type":"TypeString","required":true}}},"maxItems":1},"encryption_key_source":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"export_policy_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_clients":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"kerberos_5_read_only_enabled":{"type":"TypeBool","optional":true},"kerberos_5_read_write_enabled":{"type":"TypeBool","optional":true},"kerberos_5i_read_only_enabled":{"type":"TypeBool","optional":true},"kerberos_5i_read_write_enabled":{"type":"TypeBool","optional":true},"kerberos_5p_read_only_enabled":{"type":"TypeBool","optional":true},"kerberos_5p_read_write_enabled":{"type":"TypeBool","optional":true},"protocols_enabled":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1,"minItems":1},"root_access_enabled":{"type":"TypeBool","optional":true},"rule_index":{"type":"TypeInt","required":true},"unix_read_only":{"type":"TypeBool","optional":true},"unix_read_write":{"type":"TypeBool","optional":true}}},"maxItems":5},"kerberos_enabled":{"type":"TypeBool","optional":true,"description":"Enable to allow Kerberos secured volumes. Requires appropriate export rules as well as the parent `azurerm_netapp_account` having a defined AD connection.","forceNew":true},"key_vault_private_endpoint_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"mount_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"network_features":{"type":"TypeString","optional":true,"default":"Basic"},"pool_name":{"type":"TypeString","required":true,"forceNew":true},"protocols":{"type":"TypeSet","optional":true,"computed":true,"forceNew":true,"elem":{"type":"TypeString"},"maxItems":2},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"security_style":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"service_level":{"type":"TypeString","required":true,"forceNew":true},"smb3_protocol_encryption_enabled":{"type":"TypeBool","optional":true,"description":"SMB3 encryption option should be used only for SMB/DualProtocol volumes. Using it for any other workloads is not supported.","forceNew":true},"smb_access_based_enumeration_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Enable access based enumeration setting for SMB/Dual Protocol volume. When enabled, users who do not have permission to access a shared folder or file underneath it, do not see that shared resource displayed in their environment."},"smb_continuous_availability_enabled":{"type":"TypeBool","optional":true,"description":"Continuous availability option should be used only for SQL and FSLogix workloads. Using it for any other SMB workloads is not supported.","forceNew":true},"smb_non_browsable_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Enable non browsable share setting for SMB/Dual Protocol volume. When enabled, it restricts windows clients to browse the share"},"snapshot_directory_visible":{"type":"TypeBool","optional":true,"computed":true},"storage_quota_in_gb":{"type":"TypeInt","required":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"throughput_in_mibps":{"type":"TypeFloat","optional":true,"computed":true},"volume_path":{"type":"TypeString","required":true,"forceNew":true},"zone":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_netapp_volume_group_sap_hana":{"schema":{"account_name":{"type":"TypeString","required":true,"forceNew":true},"application_identifier":{"type":"TypeString","required":true,"forceNew":true},"group_description":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"volume":{"type":"TypeList","required":true,"elem":{"schema":{"capacity_pool_id":{"type":"TypeString","required":true,"forceNew":true},"data_protection_replication":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"endpoint_type":{"type":"TypeString","optional":true,"default":"dst"},"remote_volume_location":{"type":"TypeString","required":true},"remote_volume_resource_id":{"type":"TypeString","required":true},"replication_frequency":{"type":"TypeString","required":true}}},"maxItems":1},"data_protection_snapshot_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"snapshot_policy_id":{"type":"TypeString","required":true}}},"maxItems":1},"export_policy_rule":{"type":"TypeList","required":true,"elem":{"schema":{"allowed_clients":{"type":"TypeString","required":true},"nfsv3_enabled":{"type":"TypeBool","required":true},"nfsv41_enabled":{"type":"TypeBool","required":true},"root_access_enabled":{"type":"TypeBool","optional":true,"default":true},"rule_index":{"type":"TypeInt","required":true},"unix_read_only":{"type":"TypeBool","optional":true,"default":false},"unix_read_write":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":5,"minItems":1},"id":{"type":"TypeString","computed":true},"mount_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"protocols":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"maxItems":1,"minItems":1},"proximity_placement_group_id":{"type":"TypeString","optional":true,"forceNew":true},"security_style":{"type":"TypeString","required":true,"forceNew":true},"service_level":{"type":"TypeString","required":true,"forceNew":true},"snapshot_directory_visible":{"type":"TypeBool","required":true,"forceNew":true},"storage_quota_in_gb":{"type":"TypeInt","required":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"throughput_in_mibps":{"type":"TypeFloat","required":true},"volume_path":{"type":"TypeString","required":true,"forceNew":true},"volume_spec_name":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":5,"minItems":2}},"timeouts":{"create":90,"read":5,"delete":120,"update":120}},"azurerm_netapp_volume_quota_rule":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"quota_size_in_kib":{"type":"TypeInt","required":true},"quota_target":{"type":"TypeString","optional":true,"forceNew":true},"quota_type":{"type":"TypeString","required":true,"forceNew":true},"volume_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":90,"read":5,"delete":120,"update":120}},"azurerm_network_connection_monitor":{"schema":{"endpoint":{"type":"TypeSet","required":true,"elem":{"schema":{"address":{"type":"TypeString","optional":true},"coverage_level":{"type":"TypeString","optional":true},"excluded_ip_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"filter":{"type":"TypeList","optional":true,"elem":{"schema":{"item":{"type":"TypeSet","optional":true,"elem":{"schema":{"address":{"type":"TypeString","optional":true},"type":{"type":"TypeString","optional":true,"default":"AgentAddress"}}}},"type":{"type":"TypeString","optional":true,"default":"Include"}}},"maxItems":1},"included_ip_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"target_resource_id":{"type":"TypeString","optional":true},"target_resource_type":{"type":"TypeString","optional":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_watcher_id":{"type":"TypeString","required":true,"forceNew":true},"notes":{"type":"TypeString","optional":true},"output_workspace_resource_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"test_configuration":{"type":"TypeSet","required":true,"elem":{"schema":{"http_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"method":{"type":"TypeString","optional":true,"default":"Get"},"path":{"type":"TypeString","optional":true},"port":{"type":"TypeInt","optional":true},"prefer_https":{"type":"TypeBool","optional":true,"default":false},"request_header":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"valid_status_code_ranges":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"icmp_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"trace_route_enabled":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"name":{"type":"TypeString","required":true},"preferred_ip_version":{"type":"TypeString","optional":true},"protocol":{"type":"TypeString","required":true},"success_threshold":{"type":"TypeList","optional":true,"elem":{"schema":{"checks_failed_percent":{"type":"TypeInt","optional":true},"round_trip_time_ms":{"type":"TypeFloat","optional":true}}},"maxItems":1},"tcp_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"destination_port_behavior":{"type":"TypeString","optional":true},"port":{"type":"TypeInt","required":true},"trace_route_enabled":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"test_frequency_in_seconds":{"type":"TypeInt","optional":true,"default":60}}}},"test_group":{"type":"TypeSet","required":true,"elem":{"schema":{"destination_endpoints":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true},"source_endpoints":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"test_configuration_names":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_ddos_protection_plan":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_network_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_function_azure_traffic_collector":{"schema":{"collector_policy_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_hub_id":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_function_collector_policy":{"schema":{"ipfx_emission":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"destination_types":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"maxItems":1}}},"maxItems":1},"ipfx_ingestion":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"source_resource_ids":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"traffic_collector_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_interface":{"schema":{"accelerated_networking_enabled":{"type":"TypeBool","optional":true},"applied_dns_servers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"auxiliary_mode":{"type":"TypeString","optional":true},"auxiliary_sku":{"type":"TypeString","optional":true},"dns_servers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"internal_dns_name_label":{"type":"TypeString","optional":true},"internal_domain_name_suffix":{"type":"TypeString","computed":true},"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"gateway_load_balancer_frontend_ip_configuration_id":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true},"primary":{"type":"TypeBool","optional":true,"computed":true},"private_ip_address":{"type":"TypeString","optional":true,"computed":true},"private_ip_address_allocation":{"type":"TypeString","required":true},"private_ip_address_version":{"type":"TypeString","optional":true,"default":"IPv4"},"public_ip_address_id":{"type":"TypeString","optional":true},"subnet_id":{"type":"TypeString","optional":true}}}},"ip_forwarding_enabled":{"type":"TypeBool","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"mac_address":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_machine_id":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_interface_application_gateway_backend_address_pool_association":{"schema":{"backend_address_pool_id":{"type":"TypeString","required":true,"forceNew":true},"ip_configuration_name":{"type":"TypeString","required":true,"forceNew":true},"network_interface_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_network_interface_application_security_group_association":{"schema":{"application_security_group_id":{"type":"TypeString","required":true,"forceNew":true},"network_interface_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_network_interface_backend_address_pool_association":{"schema":{"backend_address_pool_id":{"type":"TypeString","required":true,"forceNew":true},"ip_configuration_name":{"type":"TypeString","required":true,"forceNew":true},"network_interface_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_network_interface_nat_rule_association":{"schema":{"ip_configuration_name":{"type":"TypeString","required":true,"forceNew":true},"nat_rule_id":{"type":"TypeString","required":true,"forceNew":true},"network_interface_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_network_interface_security_group_association":{"schema":{"network_interface_id":{"type":"TypeString","required":true,"forceNew":true},"network_security_group_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_network_manager":{"schema":{"cross_tenant_scopes":{"type":"TypeList","computed":true,"elem":{"schema":{"management_groups":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"subscriptions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","computed":true}}}},"description":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scope":{"type":"TypeList","required":true,"elem":{"schema":{"management_group_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"subscription_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1,"minItems":1},"scope_accesses":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_manager_admin_rule":{"schema":{"action":{"type":"TypeString","required":true},"admin_rule_collection_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"destination":{"type":"TypeList","optional":true,"elem":{"schema":{"address_prefix":{"type":"TypeString","required":true},"address_prefix_type":{"type":"TypeString","required":true}}}},"destination_port_ranges":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"direction":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","required":true},"protocol":{"type":"TypeString","required":true},"source":{"type":"TypeList","optional":true,"elem":{"schema":{"address_prefix":{"type":"TypeString","required":true},"address_prefix_type":{"type":"TypeString","required":true}}}},"source_port_ranges":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_manager_admin_rule_collection":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_group_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"security_admin_configuration_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_manager_connectivity_configuration":{"schema":{"applies_to_group":{"type":"TypeList","required":true,"elem":{"schema":{"global_mesh_enabled":{"type":"TypeBool","optional":true},"group_connectivity":{"type":"TypeString","required":true},"network_group_id":{"type":"TypeString","required":true},"use_hub_gateway":{"type":"TypeBool","optional":true}}}},"connectivity_topology":{"type":"TypeString","required":true},"delete_existing_peering_enabled":{"type":"TypeBool","optional":true},"description":{"type":"TypeString","optional":true},"global_mesh_enabled":{"type":"TypeBool","optional":true},"hub":{"type":"TypeList","optional":true,"elem":{"schema":{"resource_id":{"type":"TypeString","required":true},"resource_type":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network_manager_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_manager_deployment":{"schema":{"configuration_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"network_manager_id":{"type":"TypeString","required":true,"forceNew":true},"scope_access":{"type":"TypeString","required":true,"forceNew":true},"triggers":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":1440,"read":5,"delete":1440,"update":1440}},"azurerm_network_manager_management_group_connection":{"schema":{"connection_state":{"type":"TypeString","computed":true},"description":{"type":"TypeString","optional":true},"management_group_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_manager_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_manager_network_group":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_manager_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_manager_scope_connection":{"schema":{"connection_state":{"type":"TypeString","computed":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_manager_id":{"type":"TypeString","required":true,"forceNew":true},"target_scope_id":{"type":"TypeString","required":true},"tenant_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_manager_security_admin_configuration":{"schema":{"apply_on_network_intent_policy_based_services":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_manager_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_manager_static_member":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"network_group_id":{"type":"TypeString","required":true,"forceNew":true},"region":{"type":"TypeString","computed":true},"target_virtual_network_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_network_manager_subscription_connection":{"schema":{"connection_state":{"type":"TypeString","computed":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_manager_id":{"type":"TypeString","required":true},"subscription_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_packet_capture":{"schema":{"filter":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"local_ip_address":{"type":"TypeString","optional":true,"forceNew":true},"local_port":{"type":"TypeString","optional":true,"forceNew":true},"protocol":{"type":"TypeString","required":true,"forceNew":true},"remote_ip_address":{"type":"TypeString","optional":true,"forceNew":true},"remote_port":{"type":"TypeString","optional":true,"forceNew":true}}}},"maximum_bytes_per_packet":{"type":"TypeInt","optional":true,"default":0,"forceNew":true},"maximum_bytes_per_session":{"type":"TypeInt","optional":true,"default":1073741824,"forceNew":true},"maximum_capture_duration":{"type":"TypeInt","optional":true,"default":18000,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_watcher_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"storage_location":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"file_path":{"type":"TypeString","optional":true},"storage_account_id":{"type":"TypeString","optional":true},"storage_path":{"type":"TypeString","computed":true}}},"maxItems":1},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_network_profile":{"schema":{"container_network_interface":{"type":"TypeList","required":true,"elem":{"schema":{"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"subnet_id":{"type":"TypeString","required":true}}}},"name":{"type":"TypeString","required":true}}},"maxItems":1},"container_network_interface_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_security_group":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"security_rule":{"type":"TypeSet","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"access":{"type":"TypeString","required":true},"description":{"type":"TypeString","optional":true},"destination_address_prefix":{"type":"TypeString","optional":true},"destination_address_prefixes":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"destination_application_security_group_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"destination_port_range":{"type":"TypeString","optional":true},"destination_port_ranges":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"direction":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"priority":{"type":"TypeInt","required":true},"protocol":{"type":"TypeString","required":true},"source_address_prefix":{"type":"TypeString","optional":true},"source_address_prefixes":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"source_application_security_group_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"source_port_range":{"type":"TypeString","optional":true},"source_port_ranges":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_security_rule":{"schema":{"access":{"type":"TypeString","required":true},"description":{"type":"TypeString","optional":true},"destination_address_prefix":{"type":"TypeString","optional":true},"destination_address_prefixes":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"destination_application_security_group_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":10},"destination_port_range":{"type":"TypeString","optional":true},"destination_port_ranges":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"direction":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_security_group_name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","required":true},"protocol":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source_address_prefix":{"type":"TypeString","optional":true},"source_address_prefixes":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"source_application_security_group_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":10},"source_port_range":{"type":"TypeString","optional":true},"source_port_ranges":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_watcher":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_network_watcher_flow_log":{"schema":{"enabled":{"type":"TypeBool","required":true},"location":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_security_group_id":{"type":"TypeString","required":true,"forceNew":true},"network_watcher_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_policy":{"type":"TypeList","required":true,"elem":{"schema":{"days":{"type":"TypeInt","required":true},"enabled":{"type":"TypeBool","required":true}}},"maxItems":1},"storage_account_id":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"traffic_analytics":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","required":true},"interval_in_minutes":{"type":"TypeInt","optional":true,"default":60},"workspace_id":{"type":"TypeString","required":true},"workspace_region":{"type":"TypeString","required":true},"workspace_resource_id":{"type":"TypeString","required":true}}},"maxItems":1},"version":{"type":"TypeInt","optional":true,"default":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_new_relic_monitor":{"schema":{"account_creation_source":{"type":"TypeString","optional":true,"default":"LIFTR","forceNew":true},"account_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"ingestion_key":{"type":"TypeString","optional":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"org_creation_source":{"type":"TypeString","optional":true,"default":"LIFTR","forceNew":true},"organization_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"plan":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"billing_cycle":{"type":"TypeString","optional":true,"default":"MONTHLY","forceNew":true},"effective_date":{"type":"TypeString","required":true,"forceNew":true},"plan_id":{"type":"TypeString","optional":true,"default":"newrelic-pay-as-you-go-free-live","forceNew":true},"usage_type":{"type":"TypeString","optional":true,"default":"PAYG","forceNew":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"user":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"email":{"type":"TypeString","required":true,"forceNew":true},"first_name":{"type":"TypeString","required":true,"forceNew":true},"last_name":{"type":"TypeString","required":true,"forceNew":true},"phone_number":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"user_id":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_new_relic_tag_rule":{"schema":{"activity_log_enabled":{"type":"TypeBool","optional":true,"default":false},"azure_active_directory_log_enabled":{"type":"TypeBool","optional":true,"default":false},"log_tag_filter":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"metric_enabled":{"type":"TypeBool","optional":true,"default":false},"metric_tag_filter":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"monitor_id":{"type":"TypeString","required":true,"forceNew":true},"subscription_log_enabled":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_nginx_certificate":{"schema":{"certificate_virtual_path":{"type":"TypeString","required":true},"key_vault_secret_id":{"type":"TypeString","required":true},"key_virtual_path":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"nginx_deployment_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":10,"update":30}},"azurerm_nginx_configuration":{"schema":{"config_file":{"type":"TypeSet","optional":true,"elem":{"schema":{"content":{"type":"TypeString","required":true},"virtual_path":{"type":"TypeString","required":true}}}},"nginx_deployment_id":{"type":"TypeString","required":true,"forceNew":true},"package_data":{"type":"TypeString","optional":true},"protected_file":{"type":"TypeSet","optional":true,"elem":{"schema":{"content":{"type":"TypeString","required":true},"virtual_path":{"type":"TypeString","required":true}}}},"root_file":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":10,"update":10}},"azurerm_nginx_deployment":{"schema":{"auto_scale_profile":{"type":"TypeList","optional":true,"elem":{"schema":{"max_capacity":{"type":"TypeInt","required":true},"min_capacity":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true}}}},"automatic_upgrade_channel":{"type":"TypeString","optional":true,"default":"stable"},"capacity":{"type":"TypeInt","optional":true},"diagnose_support_enabled":{"type":"TypeBool","optional":true},"email":{"type":"TypeString","optional":true},"frontend_private":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"allocation_method":{"type":"TypeString","required":true,"forceNew":true},"ip_address":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}}}},"frontend_public":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"ip_address":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"ip_address":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"logging_storage_account":{"type":"TypeList","optional":true,"elem":{"schema":{"container_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true}}}},"managed_resource_group":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_interface":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"subnet_id":{"type":"TypeString","required":true,"forceNew":true}}}},"nginx_version":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_notification_hub":{"schema":{"apns_credential":{"type":"TypeList","optional":true,"elem":{"schema":{"application_mode":{"type":"TypeString","required":true},"bundle_id":{"type":"TypeString","required":true},"key_id":{"type":"TypeString","required":true},"team_id":{"type":"TypeString","required":true},"token":{"type":"TypeString","required":true}}},"maxItems":1},"browser_credential":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"subject":{"type":"TypeString","required":true},"vapid_private_key":{"type":"TypeString","required":true},"vapid_public_key":{"type":"TypeString","required":true}}},"maxItems":1},"gcm_credential":{"type":"TypeList","optional":true,"elem":{"schema":{"api_key":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_notification_hub_authorization_rule":{"schema":{"listen":{"type":"TypeBool","optional":true,"default":false},"manage":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_name":{"type":"TypeString","required":true,"forceNew":true},"notification_hub_name":{"type":"TypeString","required":true,"forceNew":true},"primary_access_key":{"type":"TypeString","computed":true},"primary_connection_string":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_access_key":{"type":"TypeString","computed":true},"secondary_connection_string":{"type":"TypeString","computed":true},"send":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_notification_hub_namespace":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_type":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"servicebus_endpoint":{"type":"TypeString","computed":true},"sku_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_orbital_contact":{"schema":{"contact_profile_id":{"type":"TypeString","required":true,"forceNew":true},"ground_station_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"reservation_end_time":{"type":"TypeString","required":true,"forceNew":true},"reservation_start_time":{"type":"TypeString","required":true,"forceNew":true},"spacecraft_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_orbital_contact_profile":{"schema":{"auto_tracking":{"type":"TypeString","required":true},"event_hub_uri":{"type":"TypeString","optional":true},"links":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"channels":{"type":"TypeList","required":true,"elem":{"schema":{"bandwidth_mhz":{"type":"TypeFloat","required":true},"center_frequency_mhz":{"type":"TypeFloat","required":true},"demodulation_configuration":{"type":"TypeString","optional":true},"end_point":{"type":"TypeSet","required":true,"elem":{"schema":{"end_point_name":{"type":"TypeString","required":true},"ip_address":{"type":"TypeString","optional":true},"port":{"type":"TypeString","required":true},"protocol":{"type":"TypeString","required":true}}}},"modulation_configuration":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true}}},"minItems":1},"direction":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"polarization":{"type":"TypeString","required":true}}},"minItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"minimum_elevation_degrees":{"type":"TypeFloat","optional":true},"minimum_variable_contact_duration":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_configuration_subnet_id":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_orbital_spacecraft":{"schema":{"links":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"bandwidth_mhz":{"type":"TypeFloat","required":true},"center_frequency_mhz":{"type":"TypeFloat","required":true},"direction":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"polarization":{"type":"TypeString","required":true}}},"minItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"norad_id":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"title_line":{"type":"TypeString","required":true},"two_line_elements":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"maxItems":2,"minItems":2}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_orchestrated_virtual_machine_scale_set":{"schema":{"additional_capabilities":{"type":"TypeList","optional":true,"elem":{"schema":{"ultra_ssd_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}}},"maxItems":1},"automatic_instance_repair":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"computed":true},"enabled":{"type":"TypeBool","required":true},"grace_period":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"boot_diagnostics":{"type":"TypeList","optional":true,"elem":{"schema":{"storage_account_uri":{"type":"TypeString","optional":true}}},"maxItems":1},"capacity_reservation_group_id":{"type":"TypeString","optional":true,"forceNew":true},"data_disk":{"type":"TypeList","optional":true,"elem":{"schema":{"caching":{"type":"TypeString","required":true},"create_option":{"type":"TypeString","optional":true,"default":"Empty"},"disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"disk_size_gb":{"type":"TypeInt","optional":true,"computed":true},"lun":{"type":"TypeInt","optional":true,"computed":true},"storage_account_type":{"type":"TypeString","required":true},"ultra_ssd_disk_iops_read_write":{"type":"TypeInt","optional":true,"computed":true},"ultra_ssd_disk_mbps_read_write":{"type":"TypeInt","optional":true,"computed":true},"write_accelerator_enabled":{"type":"TypeBool","optional":true,"default":false}}}},"encryption_at_host_enabled":{"type":"TypeBool","optional":true},"eviction_policy":{"type":"TypeString","optional":true,"forceNew":true},"extension":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"auto_upgrade_minor_version_enabled":{"type":"TypeBool","optional":true,"default":true},"extensions_to_provision_after_vm_creation":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"failure_suppression_enabled":{"type":"TypeBool","optional":true,"default":false},"force_extension_execution_on_change":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"protected_settings":{"type":"TypeString","optional":true},"protected_settings_from_key_vault":{"type":"TypeList","optional":true,"elem":{"schema":{"secret_url":{"type":"TypeString","required":true},"source_vault_id":{"type":"TypeString","required":true}}},"maxItems":1},"publisher":{"type":"TypeString","required":true},"settings":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"type_handler_version":{"type":"TypeString","required":true}}}},"extension_operations_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"extensions_time_budget":{"type":"TypeString","optional":true,"default":"PT1H30M"},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true}}},"maxItems":1},"instances":{"type":"TypeInt","optional":true,"computed":true},"license_type":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"max_bid_price":{"type":"TypeFloat","optional":true,"default":-1},"name":{"type":"TypeString","required":true,"forceNew":true},"network_interface":{"type":"TypeList","optional":true,"elem":{"schema":{"dns_servers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"enable_accelerated_networking":{"type":"TypeBool","optional":true,"default":false},"enable_ip_forwarding":{"type":"TypeBool","optional":true,"default":false},"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"application_gateway_backend_address_pool_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"application_security_group_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":20},"load_balancer_backend_address_pool_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"primary":{"type":"TypeBool","optional":true,"default":false},"public_ip_address":{"type":"TypeList","optional":true,"elem":{"schema":{"domain_name_label":{"type":"TypeString","optional":true},"idle_timeout_in_minutes":{"type":"TypeInt","optional":true,"computed":true},"ip_tag":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"tag":{"type":"TypeString","required":true,"forceNew":true},"type":{"type":"TypeString","required":true,"forceNew":true}}}},"name":{"type":"TypeString","required":true},"public_ip_prefix_id":{"type":"TypeString","optional":true,"forceNew":true},"sku_name":{"type":"TypeString","optional":true,"forceNew":true},"version":{"type":"TypeString","optional":true,"default":"IPv4","forceNew":true}}}},"subnet_id":{"type":"TypeString","optional":true},"version":{"type":"TypeString","optional":true,"default":"IPv4"}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"network_security_group_id":{"type":"TypeString","optional":true},"primary":{"type":"TypeBool","optional":true,"default":false}}}},"os_disk":{"type":"TypeList","optional":true,"elem":{"schema":{"caching":{"type":"TypeString","required":true},"diff_disk_settings":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"option":{"type":"TypeString","required":true,"forceNew":true},"placement":{"type":"TypeString","optional":true,"default":"CacheDisk","forceNew":true}}},"maxItems":1},"disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"disk_size_gb":{"type":"TypeInt","optional":true,"computed":true},"storage_account_type":{"type":"TypeString","required":true,"forceNew":true},"write_accelerator_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"os_profile":{"type":"TypeList","optional":true,"elem":{"schema":{"custom_data":{"type":"TypeString","optional":true},"linux_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"admin_password":{"type":"TypeString","optional":true,"forceNew":true},"admin_ssh_key":{"type":"TypeSet","optional":true,"elem":{"schema":{"public_key":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true}}}},"admin_username":{"type":"TypeString","required":true,"forceNew":true},"computer_name_prefix":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"disable_password_authentication":{"type":"TypeBool","optional":true,"default":true},"patch_assessment_mode":{"type":"TypeString","optional":true,"default":"ImageDefault"},"patch_mode":{"type":"TypeString","optional":true,"default":"ImageDefault"},"provision_vm_agent":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"secret":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeSet","required":true,"elem":{"schema":{"url":{"type":"TypeString","required":true}}},"minItems":1},"key_vault_id":{"type":"TypeString","required":true}}}}}},"maxItems":1},"windows_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"additional_unattend_content":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"content":{"type":"TypeString","required":true,"forceNew":true},"setting":{"type":"TypeString","required":true,"forceNew":true}}}},"admin_password":{"type":"TypeString","required":true,"forceNew":true},"admin_username":{"type":"TypeString","required":true,"forceNew":true},"computer_name_prefix":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"enable_automatic_updates":{"type":"TypeBool","optional":true,"default":true},"hotpatching_enabled":{"type":"TypeBool","optional":true,"default":false},"patch_assessment_mode":{"type":"TypeString","optional":true,"default":"ImageDefault"},"patch_mode":{"type":"TypeString","optional":true,"default":"AutomaticByOS"},"provision_vm_agent":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"secret":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeSet","required":true,"elem":{"schema":{"store":{"type":"TypeString","required":true},"url":{"type":"TypeString","required":true}}},"minItems":1},"key_vault_id":{"type":"TypeString","required":true}}}},"timezone":{"type":"TypeString","optional":true},"winrm_listener":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"certificate_url":{"type":"TypeString","optional":true,"forceNew":true},"protocol":{"type":"TypeString","required":true,"forceNew":true}}}}}},"maxItems":1}}},"maxItems":1},"plan":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"product":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"platform_fault_domain_count":{"type":"TypeInt","required":true,"forceNew":true},"priority":{"type":"TypeString","optional":true,"default":"Regular","forceNew":true},"priority_mix":{"type":"TypeList","optional":true,"elem":{"schema":{"base_regular_count":{"type":"TypeInt","optional":true,"default":0},"regular_percentage_above_base":{"type":"TypeInt","optional":true,"default":0}}},"maxItems":1},"proximity_placement_group_id":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"single_placement_group":{"type":"TypeBool","optional":true,"computed":true},"sku_name":{"type":"TypeString","optional":true},"source_image_id":{"type":"TypeString","optional":true},"source_image_reference":{"type":"TypeList","optional":true,"elem":{"schema":{"offer":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true},"version":{"type":"TypeString","required":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"termination_notification":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","required":true},"timeout":{"type":"TypeString","optional":true,"default":"PT5M"}}},"maxItems":1},"unique_id":{"type":"TypeString","computed":true},"user_data_base64":{"type":"TypeString","optional":true},"zone_balance":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"zones":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_palo_alto_local_rulestack":{"schema":{"anti_spyware_profile":{"type":"TypeString","optional":true},"anti_virus_profile":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"dns_subscription":{"type":"TypeString","optional":true},"file_blocking_profile":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"url_filtering_profile":{"type":"TypeString","optional":true},"vulnerability_profile":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_palo_alto_local_rulestack_certificate":{"schema":{"audit_comment":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"key_vault_certificate_id":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true},"rulestack_id":{"type":"TypeString","required":true,"forceNew":true},"self_signed":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_palo_alto_local_rulestack_fqdn_list":{"schema":{"audit_comment":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"fully_qualified_domain_names":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"name":{"type":"TypeString","required":true},"rulestack_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_palo_alto_local_rulestack_outbound_trust_certificate_association":{"schema":{"certificate_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_palo_alto_local_rulestack_outbound_untrust_certificate_association":{"schema":{"certificate_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_palo_alto_local_rulestack_prefix_list":{"schema":{"audit_comment":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"prefix_list":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"rulestack_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_palo_alto_local_rulestack_rule":{"schema":{"action":{"type":"TypeString","required":true},"applications":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"audit_comment":{"type":"TypeString","optional":true},"category":{"type":"TypeList","optional":true,"elem":{"schema":{"custom_urls":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"feeds":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1}}},"maxItems":1,"minItems":1},"decryption_rule_type":{"type":"TypeString","optional":true,"default":"None"},"description":{"type":"TypeString","optional":true},"destination":{"type":"TypeList","required":true,"elem":{"schema":{"cidrs":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"countries":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"feeds":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"local_rulestack_fqdn_list_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"local_rulestack_prefix_list_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1,"minItems":1},"enabled":{"type":"TypeBool","optional":true,"default":true},"inspection_certificate_id":{"type":"TypeString","optional":true},"logging_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true},"negate_destination":{"type":"TypeBool","optional":true,"default":false},"negate_source":{"type":"TypeBool","optional":true,"default":false},"priority":{"type":"TypeInt","required":true,"forceNew":true},"protocol":{"type":"TypeString","optional":true},"protocol_ports":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"rulestack_id":{"type":"TypeString","required":true,"forceNew":true},"source":{"type":"TypeList","required":true,"elem":{"schema":{"cidrs":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"countries":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"feeds":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"local_rulestack_prefix_list_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1,"minItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_palo_alto_next_generation_firewall_virtual_hub_local_rulestack":{"schema":{"destination_nat":{"type":"TypeList","optional":true,"elem":{"schema":{"backend_config":{"type":"TypeList","optional":true,"elem":{"schema":{"port":{"type":"TypeInt","required":true},"public_ip_address":{"type":"TypeString","required":true}}},"maxItems":1},"frontend_config":{"type":"TypeList","optional":true,"elem":{"schema":{"port":{"type":"TypeInt","required":true},"public_ip_address_id":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true},"protocol":{"type":"TypeString","required":true}}}},"dns_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_dns_servers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"dns_servers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":2},"use_azure_dns":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network_profile":{"type":"TypeList","required":true,"elem":{"schema":{"egress_nat_ip_address_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"egress_nat_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ip_of_trust_for_user_defined_routes":{"type":"TypeString","computed":true},"network_virtual_appliance_id":{"type":"TypeString","required":true,"forceNew":true},"public_ip_address_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"trusted_address_ranges":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"trusted_subnet_id":{"type":"TypeString","computed":true},"untrusted_subnet_id":{"type":"TypeString","computed":true},"virtual_hub_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rulestack_id":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":120,"update":180}},"azurerm_palo_alto_next_generation_firewall_virtual_hub_panorama":{"schema":{"destination_nat":{"type":"TypeList","optional":true,"elem":{"schema":{"backend_config":{"type":"TypeList","optional":true,"elem":{"schema":{"port":{"type":"TypeInt","required":true},"public_ip_address":{"type":"TypeString","required":true}}},"maxItems":1},"frontend_config":{"type":"TypeList","optional":true,"elem":{"schema":{"port":{"type":"TypeInt","required":true},"public_ip_address_id":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true},"protocol":{"type":"TypeString","required":true}}}},"dns_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_dns_servers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"dns_servers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":2},"use_azure_dns":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_profile":{"type":"TypeList","required":true,"elem":{"schema":{"egress_nat_ip_address_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"egress_nat_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ip_of_trust_for_user_defined_routes":{"type":"TypeString","computed":true},"network_virtual_appliance_id":{"type":"TypeString","required":true,"forceNew":true},"public_ip_address_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"trusted_address_ranges":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"trusted_subnet_id":{"type":"TypeString","computed":true},"untrusted_subnet_id":{"type":"TypeString","computed":true},"virtual_hub_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"panorama":{"type":"TypeList","computed":true,"elem":{"schema":{"device_group_name":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"panorama_server_1":{"type":"TypeString","computed":true},"panorama_server_2":{"type":"TypeString","computed":true},"template_name":{"type":"TypeString","computed":true},"virtual_machine_ssh_key":{"type":"TypeString","computed":true}}}},"panorama_base64_config":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":120,"read":5,"delete":120,"update":120}},"azurerm_palo_alto_next_generation_firewall_virtual_network_local_rulestack":{"schema":{"destination_nat":{"type":"TypeList","optional":true,"elem":{"schema":{"backend_config":{"type":"TypeList","optional":true,"elem":{"schema":{"port":{"type":"TypeInt","required":true},"public_ip_address":{"type":"TypeString","required":true}}},"maxItems":1},"frontend_config":{"type":"TypeList","optional":true,"elem":{"schema":{"port":{"type":"TypeInt","required":true},"public_ip_address_id":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true},"protocol":{"type":"TypeString","required":true}}}},"dns_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_dns_servers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"dns_servers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":2},"use_azure_dns":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network_profile":{"type":"TypeList","required":true,"elem":{"schema":{"egress_nat_ip_address_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"egress_nat_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"public_ip_address_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"trusted_address_ranges":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"vnet_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"ip_of_trust_for_user_defined_routes":{"type":"TypeString","computed":true},"trusted_subnet_id":{"type":"TypeString","optional":true},"untrusted_subnet_id":{"type":"TypeString","optional":true},"virtual_network_id":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rulestack_id":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":120,"update":180}},"azurerm_palo_alto_next_generation_firewall_virtual_network_panorama":{"schema":{"destination_nat":{"type":"TypeList","optional":true,"elem":{"schema":{"backend_config":{"type":"TypeList","optional":true,"elem":{"schema":{"port":{"type":"TypeInt","required":true},"public_ip_address":{"type":"TypeString","required":true}}},"maxItems":1},"frontend_config":{"type":"TypeList","optional":true,"elem":{"schema":{"port":{"type":"TypeInt","required":true},"public_ip_address_id":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true},"protocol":{"type":"TypeString","required":true}}}},"dns_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_dns_servers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"dns_servers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":2},"use_azure_dns":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_profile":{"type":"TypeList","required":true,"elem":{"schema":{"egress_nat_ip_address_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"egress_nat_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"public_ip_address_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"trusted_address_ranges":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"vnet_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"ip_of_trust_for_user_defined_routes":{"type":"TypeString","computed":true},"trusted_subnet_id":{"type":"TypeString","optional":true},"untrusted_subnet_id":{"type":"TypeString","optional":true},"virtual_network_id":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"panorama":{"type":"TypeList","computed":true,"elem":{"schema":{"device_group_name":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"panorama_server_1":{"type":"TypeString","computed":true},"panorama_server_2":{"type":"TypeString","computed":true},"template_name":{"type":"TypeString","computed":true},"virtual_machine_ssh_key":{"type":"TypeString","computed":true}}}},"panorama_base64_config":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_palo_alto_virtual_network_appliance":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"virtual_hub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_pim_active_role_assignment":{"schema":{"justification":{"type":"TypeString","optional":true,"description":"The justification for this role assignment","computed":true,"forceNew":true},"principal_id":{"type":"TypeString","required":true,"description":"Object ID of the principal for this role assignment","forceNew":true},"principal_type":{"type":"TypeString","description":"Type of principal to which the role will be assigned","computed":true},"role_definition_id":{"type":"TypeString","required":true,"description":"Role definition ID for this role assignment","forceNew":true},"schedule":{"type":"TypeList","optional":true,"description":"The schedule details for this role assignment","computed":true,"forceNew":true,"elem":{"schema":{"expiration":{"type":"TypeList","optional":true,"elem":{"schema":{"duration_days":{"type":"TypeInt","optional":true,"description":"The duration of the role assignment in days","computed":true,"forceNew":true},"duration_hours":{"type":"TypeInt","optional":true,"description":"The duration of the role assignment in hours","computed":true,"forceNew":true},"end_date_time":{"type":"TypeString","optional":true,"description":"The end date/time of the role assignment","computed":true,"forceNew":true}}},"maxItems":1},"start_date_time":{"type":"TypeString","optional":true,"description":"The start date/time of the role assignment","computed":true,"forceNew":true}}},"maxItems":1},"scope":{"type":"TypeString","required":true,"description":"Scope for this role assignment, should be a valid resource ID","forceNew":true},"ticket":{"type":"TypeList","optional":true,"description":"Ticket details relating to the assignment","computed":true,"forceNew":true,"elem":{"schema":{"number":{"type":"TypeString","optional":true,"description":"User-supplied ticket number to be included with the request","forceNew":true},"system":{"type":"TypeString","optional":true,"description":"User-supplied ticket system name to be included with the request","forceNew":true}}},"maxItems":1}},"timeouts":{"create":10,"read":5,"delete":10}},"azurerm_pim_eligible_role_assignment":{"schema":{"justification":{"type":"TypeString","optional":true,"description":"The justification for this eligible role assignment","computed":true,"forceNew":true},"principal_id":{"type":"TypeString","required":true,"description":"Object ID of the principal for this eligible role assignment","forceNew":true},"principal_type":{"type":"TypeString","description":"Type of principal to which the role will be assigned","computed":true},"role_definition_id":{"type":"TypeString","required":true,"description":"Role definition ID for this eligible role assignment","forceNew":true},"schedule":{"type":"TypeList","optional":true,"description":"The schedule details for this eligible role assignment","computed":true,"forceNew":true,"elem":{"schema":{"expiration":{"type":"TypeList","optional":true,"elem":{"schema":{"duration_days":{"type":"TypeInt","optional":true,"description":"The duration of the eligible role assignment in days","computed":true,"forceNew":true},"duration_hours":{"type":"TypeInt","optional":true,"description":"The duration of the eligible role assignment in hours","computed":true,"forceNew":true},"end_date_time":{"type":"TypeString","optional":true,"description":"The end date/time of the eligible role assignment","computed":true,"forceNew":true}}},"maxItems":1},"start_date_time":{"type":"TypeString","optional":true,"description":"The start date/time","computed":true,"forceNew":true}}},"maxItems":1},"scope":{"type":"TypeString","required":true,"description":"Scope for this eligible role assignment, should be a valid resource ID","forceNew":true},"ticket":{"type":"TypeList","optional":true,"description":"Ticket details relating to the eligible assignment","computed":true,"forceNew":true,"elem":{"schema":{"number":{"type":"TypeString","optional":true,"description":"User-supplied ticket number to be included with the request","forceNew":true},"system":{"type":"TypeString","optional":true,"description":"User-supplied ticket system name to be included with the request","forceNew":true}}},"maxItems":1}},"timeouts":{"create":10,"read":5,"delete":10}},"azurerm_point_to_site_vpn_gateway":{"schema":{"connection_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"internet_security_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"name":{"type":"TypeString","required":true},"route":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"associated_route_table_id":{"type":"TypeString","required":true},"inbound_route_map_id":{"type":"TypeString","optional":true},"outbound_route_map_id":{"type":"TypeString","optional":true},"propagated_route_table":{"type":"TypeList","optional":true,"elem":{"schema":{"ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"labels":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}},"maxItems":1},"vpn_client_address_pool":{"type":"TypeList","required":true,"elem":{"schema":{"address_prefixes":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}}},"dns_servers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"routing_preference_internet_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"scale_unit":{"type":"TypeInt","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_hub_id":{"type":"TypeString","required":true,"forceNew":true},"vpn_server_configuration_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_policy_definition":{"schema":{"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"management_group_id":{"type":"TypeString","optional":true,"forceNew":true},"metadata":{"type":"TypeString","optional":true,"computed":true},"mode":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeString","optional":true},"policy_rule":{"type":"TypeString","optional":true},"policy_type":{"type":"TypeString","required":true,"forceNew":true},"role_definition_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_policy_set_definition":{"schema":{"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"management_group_id":{"type":"TypeString","optional":true,"forceNew":true},"metadata":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeString","optional":true},"policy_definition_group":{"type":"TypeSet","optional":true,"elem":{"schema":{"additional_metadata_resource_id":{"type":"TypeString","optional":true},"category":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true}}}},"policy_definition_reference":{"type":"TypeList","required":true,"elem":{"schema":{"parameter_values":{"type":"TypeString","optional":true},"policy_definition_id":{"type":"TypeString","required":true},"policy_group_names":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"reference_id":{"type":"TypeString","optional":true,"computed":true}}}},"policy_type":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_policy_virtual_machine_configuration_assignment":{"schema":{"configuration":{"type":"TypeList","required":true,"elem":{"schema":{"assignment_type":{"type":"TypeString","optional":true},"content_hash":{"type":"TypeString","optional":true,"computed":true},"content_uri":{"type":"TypeString","optional":true,"computed":true},"parameter":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"version":{"type":"TypeString","optional":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_portal_dashboard":{"schema":{"dashboard_properties":{"type":"TypeString","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_portal_tenant_configuration":{"schema":{"private_markdown_storage_enforced":{"type":"TypeBool","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_postgresql_active_directory_administrator":{"schema":{"login":{"type":"TypeString","required":true},"object_id":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_postgresql_configuration":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_postgresql_database":{"schema":{"charset":{"type":"TypeString","required":true,"forceNew":true},"collation":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60}},"azurerm_postgresql_firewall_rule":{"schema":{"end_ip_address":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_name":{"type":"TypeString","required":true,"forceNew":true},"start_ip_address":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_postgresql_flexible_server":{"schema":{"administrator_login":{"type":"TypeString","optional":true,"computed":true},"administrator_password":{"type":"TypeString","optional":true},"authentication":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"active_directory_auth_enabled":{"type":"TypeBool","optional":true,"default":false},"password_auth_enabled":{"type":"TypeBool","optional":true,"default":true},"tenant_id":{"type":"TypeString","optional":true}}},"maxItems":1},"auto_grow_enabled":{"type":"TypeBool","optional":true,"default":false},"backup_retention_days":{"type":"TypeInt","optional":true,"computed":true},"create_mode":{"type":"TypeString","optional":true},"customer_managed_key":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"geo_backup_key_vault_key_id":{"type":"TypeString","optional":true},"geo_backup_user_assigned_identity_id":{"type":"TypeString","optional":true},"key_vault_key_id":{"type":"TypeString","required":true},"primary_user_assigned_identity_id":{"type":"TypeString","optional":true}}},"maxItems":1},"delegated_subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"fqdn":{"type":"TypeString","computed":true},"geo_redundant_backup_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"high_availability":{"type":"TypeList","optional":true,"elem":{"schema":{"mode":{"type":"TypeString","required":true},"standby_availability_zone":{"type":"TypeString","optional":true}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"maintenance_window":{"type":"TypeList","optional":true,"elem":{"schema":{"day_of_week":{"type":"TypeInt","optional":true,"default":0},"start_hour":{"type":"TypeInt","optional":true,"default":0},"start_minute":{"type":"TypeInt","optional":true,"default":0}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"point_in_time_restore_time_in_utc":{"type":"TypeString","optional":true,"forceNew":true},"private_dns_zone_id":{"type":"TypeString","optional":true,"computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"replication_role":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","optional":true,"computed":true},"source_server_id":{"type":"TypeString","optional":true,"forceNew":true},"storage_mb":{"type":"TypeInt","optional":true,"computed":true},"storage_tier":{"type":"TypeString","optional":true,"computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"version":{"type":"TypeString","optional":true,"computed":true},"zone":{"type":"TypeString","optional":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_postgresql_flexible_server_active_directory_administrator":{"schema":{"object_id":{"type":"TypeString","required":true,"forceNew":true},"principal_name":{"type":"TypeString","required":true,"forceNew":true},"principal_type":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_postgresql_flexible_server_configuration":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"server_id":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_postgresql_flexible_server_database":{"schema":{"charset":{"type":"TypeString","optional":true,"default":"UTF8","forceNew":true},"collation":{"type":"TypeString","optional":true,"default":"en_US.utf8","forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"server_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_postgresql_flexible_server_firewall_rule":{"schema":{"end_ip_address":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"server_id":{"type":"TypeString","required":true,"forceNew":true},"start_ip_address":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_postgresql_flexible_server_virtual_endpoint":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name of the Virtual Endpoint","forceNew":true},"replica_server_id":{"type":"TypeString","required":true,"description":"The Resource ID of the *Replica* Postgres Flexible Server this should be associated with"},"source_server_id":{"type":"TypeString","required":true,"description":"The Resource ID of the *Source* Postgres Flexible Server this should be associated with","forceNew":true},"type":{"type":"TypeString","required":true,"description":"The type of Virtual Endpoint","forceNew":true}},"timeouts":{"create":10,"read":5,"delete":5,"update":5}},"azurerm_postgresql_server":{"schema":{"administrator_login":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"administrator_login_password":{"type":"TypeString","optional":true},"auto_grow_enabled":{"type":"TypeBool","optional":true,"default":true},"backup_retention_days":{"type":"TypeInt","optional":true,"computed":true},"create_mode":{"type":"TypeString","optional":true,"default":"Default"},"creation_source_server_id":{"type":"TypeString","optional":true},"fqdn":{"type":"TypeString","computed":true},"geo_redundant_backup_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"infrastructure_encryption_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"restore_point_in_time":{"type":"TypeString","optional":true},"sku_name":{"type":"TypeString","required":true},"ssl_enforcement_enabled":{"type":"TypeBool","required":true},"ssl_minimal_tls_version_enforced":{"type":"TypeString","optional":true,"default":"TLS1_2"},"storage_mb":{"type":"TypeInt","optional":true,"computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"threat_detection_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"disabled_alerts":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"email_account_admins":{"type":"TypeBool","optional":true},"email_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true},"retention_days":{"type":"TypeInt","optional":true},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_endpoint":{"type":"TypeString","optional":true}}},"maxItems":1},"version":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_postgresql_server_key":{"schema":{"key_vault_key_id":{"type":"TypeString","required":true},"server_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_postgresql_virtual_network_rule":{"schema":{"ignore_missing_vnet_service_endpoint":{"type":"TypeBool","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_name":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_powerbi_embedded":{"schema":{"administrators":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"mode":{"type":"TypeString","optional":true,"default":"Gen1","forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_a_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"records":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"maxItems":20},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_aaaa_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"records":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_cname_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"record":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_mx_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","optional":true,"default":"@","forceNew":true},"record":{"type":"TypeSet","required":true,"elem":{"schema":{"exchange":{"type":"TypeString","required":true},"preference":{"type":"TypeInt","required":true}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_ptr_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"records":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_resolver":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_network_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_resolver_dns_forwarding_ruleset":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_dns_resolver_outbound_endpoint_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_resolver_forwarding_rule":{"schema":{"dns_forwarding_ruleset_id":{"type":"TypeString","required":true,"forceNew":true},"domain_name":{"type":"TypeString","required":true,"forceNew":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"metadata":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"target_dns_servers":{"type":"TypeList","required":true,"elem":{"schema":{"ip_address":{"type":"TypeString","required":true},"port":{"type":"TypeInt","optional":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_resolver_inbound_endpoint":{"schema":{"ip_configurations":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"private_ip_address":{"type":"TypeString","optional":true,"computed":true},"private_ip_allocation_method":{"type":"TypeString","optional":true,"default":"Dynamic"},"subnet_id":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_dns_resolver_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_resolver_outbound_endpoint":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_dns_resolver_id":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_resolver_virtual_network_link":{"schema":{"dns_forwarding_ruleset_id":{"type":"TypeString","required":true,"forceNew":true},"metadata":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_srv_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"record":{"type":"TypeSet","required":true,"elem":{"schema":{"port":{"type":"TypeInt","required":true},"priority":{"type":"TypeInt","required":true},"target":{"type":"TypeString","required":true},"weight":{"type":"TypeInt","required":true}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_txt_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"record":{"type":"TypeSet","required":true,"elem":{"schema":{"value":{"type":"TypeString","required":true}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","required":true},"zone_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_zone":{"schema":{"max_number_of_record_sets":{"type":"TypeInt","computed":true},"max_number_of_virtual_network_links":{"type":"TypeInt","computed":true},"max_number_of_virtual_network_links_with_registration":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"number_of_record_sets":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"soa_record":{"type":"TypeList","optional":true,"computed":true,"forceNew":true,"elem":{"schema":{"email":{"type":"TypeString","required":true},"expire_time":{"type":"TypeInt","optional":true,"default":2419200},"fqdn":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","computed":true},"minimum_ttl":{"type":"TypeInt","optional":true,"default":10},"refresh_time":{"type":"TypeInt","optional":true,"default":3600},"retry_time":{"type":"TypeInt","optional":true,"default":300},"serial_number":{"type":"TypeInt","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","optional":true,"default":3600}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_dns_zone_virtual_network_link":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"private_dns_zone_name":{"type":"TypeString","required":true,"forceNew":true},"registration_enabled":{"type":"TypeBool","optional":true,"default":false},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_network_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_private_endpoint":{"schema":{"custom_dns_configs":{"type":"TypeList","computed":true,"elem":{"schema":{"fqdn":{"type":"TypeString","computed":true},"ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"custom_network_interface_name":{"type":"TypeString","optional":true,"forceNew":true},"ip_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"member_name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_ip_address":{"type":"TypeString","required":true,"forceNew":true},"subresource_name":{"type":"TypeString","optional":true,"forceNew":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_interface":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"private_dns_zone_configs":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"private_dns_zone_id":{"type":"TypeString","computed":true},"record_sets":{"type":"TypeList","computed":true,"elem":{"schema":{"fqdn":{"type":"TypeString","computed":true},"ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"ttl":{"type":"TypeInt","computed":true},"type":{"type":"TypeString","computed":true}}}}}}},"private_dns_zone_group":{"type":"TypeList","optional":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"private_dns_zone_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"private_service_connection":{"type":"TypeList","required":true,"elem":{"schema":{"is_manual_connection":{"type":"TypeBool","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_connection_resource_alias":{"type":"TypeString","optional":true,"forceNew":true},"private_connection_resource_id":{"type":"TypeString","optional":true,"forceNew":true},"private_ip_address":{"type":"TypeString","computed":true},"request_message":{"type":"TypeString","optional":true},"subresource_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_private_endpoint_application_security_group_association":{"schema":{"application_security_group_id":{"type":"TypeString","required":true,"forceNew":true},"private_endpoint_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_private_link_service":{"schema":{"alias":{"type":"TypeString","computed":true},"auto_approval_subscription_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"enable_proxy_protocol":{"type":"TypeBool","optional":true},"fqdns":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"load_balancer_frontend_ip_configuration_ids":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"nat_ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"primary":{"type":"TypeBool","required":true,"forceNew":true},"private_ip_address":{"type":"TypeString","optional":true},"private_ip_address_version":{"type":"TypeString","optional":true,"default":"IPv4"},"subnet_id":{"type":"TypeString","required":true}}},"maxItems":8},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"visibility_subscription_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_proximity_placement_group":{"schema":{"allowed_vm_sizes":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zone":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_public_ip":{"schema":{"allocation_method":{"type":"TypeString","required":true},"ddos_protection_mode":{"type":"TypeString","optional":true,"default":"VirtualNetworkInherited"},"ddos_protection_plan_id":{"type":"TypeString","optional":true},"domain_name_label":{"type":"TypeString","optional":true},"edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"fqdn":{"type":"TypeString","computed":true},"idle_timeout_in_minutes":{"type":"TypeInt","optional":true,"default":4},"ip_address":{"type":"TypeString","computed":true},"ip_tags":{"type":"TypeMap","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"ip_version":{"type":"TypeString","optional":true,"default":"IPv4","forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_ip_prefix_id":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"reverse_fqdn":{"type":"TypeString","optional":true},"sku":{"type":"TypeString","optional":true,"default":"Standard","forceNew":true},"sku_tier":{"type":"TypeString","optional":true,"default":"Regional","forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_public_ip_prefix":{"schema":{"ip_prefix":{"type":"TypeString","computed":true},"ip_version":{"type":"TypeString","optional":true,"default":"IPv4","forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"prefix_length":{"type":"TypeInt","optional":true,"default":28,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","optional":true,"default":"Standard","forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_purview_account":{"schema":{"atlas_kafka_endpoint_primary_connection_string":{"type":"TypeString","computed":true},"atlas_kafka_endpoint_secondary_connection_string":{"type":"TypeString","computed":true},"catalog_endpoint":{"type":"TypeString","computed":true},"guardian_endpoint":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","required":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_resource_group_name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"managed_resources":{"type":"TypeList","computed":true,"elem":{"schema":{"event_hub_namespace_id":{"type":"TypeString","computed":true},"resource_group_id":{"type":"TypeString","computed":true},"storage_account_id":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scan_endpoint":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_recovery_services_vault":{"schema":{"classic_vmware_replication_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"cross_region_restore_enabled":{"type":"TypeBool","optional":true,"default":false},"encryption":{"type":"TypeList","optional":true,"elem":{"schema":{"infrastructure_encryption_enabled":{"type":"TypeBool","required":true},"key_id":{"type":"TypeString","required":true},"use_system_assigned_identity":{"type":"TypeBool","optional":true,"default":true},"user_assigned_identity_id":{"type":"TypeString","optional":true}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"immutability":{"type":"TypeString","optional":true,"computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"monitoring":{"type":"TypeList","optional":true,"elem":{"schema":{"alerts_for_all_job_failures_enabled":{"type":"TypeBool","optional":true,"default":true},"alerts_for_critical_operation_failures_enabled":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true},"soft_delete_enabled":{"type":"TypeBool","optional":true,"default":true},"storage_mode_type":{"type":"TypeString","optional":true,"default":"GeoRedundant"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":120,"read":5,"delete":30,"update":60}},"azurerm_recovery_services_vault_resource_guard_association":{"schema":{"resource_guard_id":{"type":"TypeString","required":true,"forceNew":true},"vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_redhat_openshift_cluster":{"schema":{"api_server_profile":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"ip_address":{"type":"TypeString","computed":true},"url":{"type":"TypeString","computed":true},"visibility":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"cluster_profile":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"domain":{"type":"TypeString","required":true,"forceNew":true},"fips_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"managed_resource_group_name":{"type":"TypeString","optional":true,"forceNew":true},"pull_secret":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_id":{"type":"TypeString","computed":true},"version":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"console_url":{"type":"TypeString","computed":true},"ingress_profile":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"ip_address":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"visibility":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"main_profile":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"encryption_at_host_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network_profile":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"outbound_type":{"type":"TypeString","optional":true,"default":"Loadbalancer","forceNew":true},"pod_cidr":{"type":"TypeString","required":true,"forceNew":true},"preconfigured_network_security_group_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"service_cidr":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_principal":{"type":"TypeList","required":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true},"client_secret":{"type":"TypeString","required":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"worker_profile":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"disk_size_gb":{"type":"TypeInt","required":true,"forceNew":true},"encryption_at_host_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"node_count":{"type":"TypeInt","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"vm_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_redis_cache":{"schema":{"access_keys_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"capacity":{"type":"TypeInt","required":true},"family":{"type":"TypeString","required":true},"hostname":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"name":{"type":"TypeString","required":true,"forceNew":true},"non_ssl_port_enabled":{"type":"TypeBool","optional":true,"default":false},"patch_schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"day_of_week":{"type":"TypeString","required":true},"maintenance_window":{"type":"TypeString","optional":true,"default":"PT5H"},"start_hour_utc":{"type":"TypeInt","optional":true}}}},"port":{"type":"TypeInt","computed":true},"primary_access_key":{"type":"TypeString","computed":true},"primary_connection_string":{"type":"TypeString","computed":true},"private_static_ip_address":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"redis_configuration":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"active_directory_authentication_enabled":{"type":"TypeBool","optional":true},"aof_backup_enabled":{"type":"TypeBool","optional":true},"aof_storage_connection_string_0":{"type":"TypeString","optional":true},"aof_storage_connection_string_1":{"type":"TypeString","optional":true},"authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"data_persistence_authentication_method":{"type":"TypeString","optional":true},"maxclients":{"type":"TypeInt","computed":true},"maxfragmentationmemory_reserved":{"type":"TypeInt","optional":true,"computed":true},"maxmemory_delta":{"type":"TypeInt","optional":true,"computed":true},"maxmemory_policy":{"type":"TypeString","optional":true,"default":"volatile-lru"},"maxmemory_reserved":{"type":"TypeInt","optional":true,"computed":true},"notify_keyspace_events":{"type":"TypeString","optional":true},"rdb_backup_enabled":{"type":"TypeBool","optional":true},"rdb_backup_frequency":{"type":"TypeInt","optional":true},"rdb_backup_max_snapshot_count":{"type":"TypeInt","optional":true},"rdb_storage_connection_string":{"type":"TypeString","optional":true},"storage_account_subscription_id":{"type":"TypeString","optional":true}}},"maxItems":1},"redis_version":{"type":"TypeString","optional":true,"default":6},"replicas_per_master":{"type":"TypeInt","optional":true,"computed":true},"replicas_per_primary":{"type":"TypeInt","optional":true,"computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_access_key":{"type":"TypeString","computed":true},"secondary_connection_string":{"type":"TypeString","computed":true},"shard_count":{"type":"TypeInt","optional":true},"sku_name":{"type":"TypeString","required":true},"ssl_port":{"type":"TypeInt","computed":true},"subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tenant_settings":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_redis_cache_access_policy":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"permissions":{"type":"TypeString","required":true},"redis_cache_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":5,"read":5,"delete":5,"update":5}},"azurerm_redis_cache_access_policy_assignment":{"schema":{"access_policy_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"object_id":{"type":"TypeString","required":true,"forceNew":true},"object_id_alias":{"type":"TypeString","required":true,"forceNew":true},"redis_cache_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":5,"read":5,"delete":5}},"azurerm_redis_enterprise_cluster":{"schema":{"hostname":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2","forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_redis_enterprise_database":{"schema":{"client_protocol":{"type":"TypeString","optional":true,"default":"Encrypted","forceNew":true},"cluster_id":{"type":"TypeString","required":true,"forceNew":true},"clustering_policy":{"type":"TypeString","optional":true,"default":"OSSCluster","forceNew":true},"eviction_policy":{"type":"TypeString","optional":true,"default":"VolatileLRU","forceNew":true},"linked_database_group_nickname":{"type":"TypeString","optional":true,"forceNew":true},"linked_database_id":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":5},"module":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"args":{"type":"TypeString","optional":true,"default":"","forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","computed":true}}},"maxItems":4},"name":{"type":"TypeString","optional":true,"default":"default","forceNew":true},"port":{"type":"TypeInt","optional":true,"default":10000,"forceNew":true},"primary_access_key":{"type":"TypeString","computed":true},"secondary_access_key":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_redis_firewall_rule":{"schema":{"end_ip":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"redis_cache_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"start_ip":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_redis_linked_server":{"schema":{"geo_replicated_primary_host_name":{"type":"TypeString","computed":true},"linked_redis_cache_id":{"type":"TypeString","required":true,"forceNew":true},"linked_redis_cache_location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server_role":{"type":"TypeString","required":true,"forceNew":true},"target_redis_cache_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60}},"azurerm_relay_hybrid_connection":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"relay_namespace_name":{"type":"TypeString","required":true,"forceNew":true},"requires_client_authorization":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"user_metadata":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_relay_hybrid_connection_authorization_rule":{"schema":{"hybrid_connection_name":{"type":"TypeString","required":true,"forceNew":true},"listen":{"type":"TypeBool","optional":true,"default":false},"manage":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_name":{"type":"TypeString","required":true,"forceNew":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"send":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_relay_namespace":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"metric_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"sku_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":60,"update":30}},"azurerm_relay_namespace_authorization_rule":{"schema":{"listen":{"type":"TypeBool","optional":true,"default":false},"manage":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_name":{"type":"TypeString","required":true,"forceNew":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"send":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_resource_deployment_script_azure_cli":{"schema":{"cleanup_preference":{"type":"TypeString","optional":true,"default":"Always","forceNew":true},"command_line":{"type":"TypeString","optional":true,"forceNew":true},"container":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"container_group_name":{"type":"TypeString","optional":true}}},"maxItems":1},"environment_variable":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"secure_value":{"type":"TypeString","optional":true},"value":{"type":"TypeString","optional":true}}}},"force_update_tag":{"type":"TypeString","optional":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"outputs":{"type":"TypeString","computed":true},"primary_script_uri":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_interval":{"type":"TypeString","required":true,"forceNew":true},"script_content":{"type":"TypeString","optional":true,"forceNew":true},"storage_account":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}},"maxItems":1},"supporting_script_uris":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"timeout":{"type":"TypeString","optional":true,"default":"P1D","forceNew":true},"version":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_resource_deployment_script_azure_power_shell":{"schema":{"cleanup_preference":{"type":"TypeString","optional":true,"default":"Always","forceNew":true},"command_line":{"type":"TypeString","optional":true,"forceNew":true},"container":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"container_group_name":{"type":"TypeString","optional":true}}},"maxItems":1},"environment_variable":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"secure_value":{"type":"TypeString","optional":true},"value":{"type":"TypeString","optional":true}}}},"force_update_tag":{"type":"TypeString","optional":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"outputs":{"type":"TypeString","computed":true},"primary_script_uri":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"retention_interval":{"type":"TypeString","required":true,"forceNew":true},"script_content":{"type":"TypeString","optional":true,"forceNew":true},"storage_account":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"key":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}},"maxItems":1},"supporting_script_uris":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"timeout":{"type":"TypeString","optional":true,"default":"P1D","forceNew":true},"version":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_resource_group":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"managed_by":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_resource_group_cost_management_export":{"schema":{"active":{"type":"TypeBool","optional":true,"default":true},"export_data_options":{"type":"TypeList","required":true,"elem":{"schema":{"time_frame":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"export_data_storage_location":{"type":"TypeList","required":true,"elem":{"schema":{"container_id":{"type":"TypeString","required":true,"forceNew":true},"root_folder_path":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"recurrence_period_end_date":{"type":"TypeString","required":true},"recurrence_period_start_date":{"type":"TypeString","required":true},"recurrence_type":{"type":"TypeString","required":true},"resource_group_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_resource_group_cost_management_view":{"schema":{"accumulated":{"type":"TypeBool","required":true,"forceNew":true},"chart_type":{"type":"TypeString","required":true},"dataset":{"type":"TypeList","required":true,"elem":{"schema":{"aggregation":{"type":"TypeSet","required":true,"elem":{"schema":{"column_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}}}},"granularity":{"type":"TypeString","required":true},"grouping":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"sorting":{"type":"TypeList","optional":true,"elem":{"schema":{"direction":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}}}},"maxItems":1},"display_name":{"type":"TypeString","required":true},"kpi":{"type":"TypeList","optional":true,"elem":{"schema":{"type":{"type":"TypeString","required":true}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"pivot":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"report_type":{"type":"TypeString","required":true},"resource_group_id":{"type":"TypeString","required":true,"forceNew":true},"timeframe":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_resource_group_policy_assignment":{"schema":{"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true},"enforce":{"type":"TypeBool","optional":true,"default":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","optional":true,"forceNew":true},"metadata":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"non_compliance_message":{"type":"TypeList","optional":true,"elem":{"schema":{"content":{"type":"TypeString","required":true},"policy_definition_reference_id":{"type":"TypeString","optional":true}}}},"not_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"overrides":{"type":"TypeList","optional":true,"elem":{"schema":{"selectors":{"type":"TypeList","optional":true,"elem":{"schema":{"in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"kind":{"type":"TypeString","computed":true},"not_in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"value":{"type":"TypeString","required":true}}}},"parameters":{"type":"TypeString","optional":true},"policy_definition_id":{"type":"TypeString","required":true,"forceNew":true},"resource_group_id":{"type":"TypeString","required":true,"forceNew":true},"resource_selectors":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","optional":true},"selectors":{"type":"TypeList","required":true,"elem":{"schema":{"in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"kind":{"type":"TypeString","required":true},"not_in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_resource_group_policy_exemption":{"schema":{"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true},"exemption_category":{"type":"TypeString","required":true},"expires_on":{"type":"TypeString","optional":true},"metadata":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"policy_assignment_id":{"type":"TypeString","required":true,"forceNew":true},"policy_definition_reference_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"resource_group_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_resource_group_policy_remediation":{"schema":{"failure_percentage":{"type":"TypeFloat","optional":true},"location_filters":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"parallel_deployments":{"type":"TypeInt","optional":true},"policy_assignment_id":{"type":"TypeString","required":true},"policy_definition_reference_id":{"type":"TypeString","optional":true},"resource_count":{"type":"TypeInt","optional":true},"resource_discovery_mode":{"type":"TypeString","optional":true,"default":"ExistingNonCompliant"},"resource_group_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_resource_group_template_deployment":{"schema":{"debug_level":{"type":"TypeString","optional":true},"deployment_mode":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"output_content":{"type":"TypeString","computed":true},"parameters_content":{"type":"TypeString","optional":true,"computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"template_content":{"type":"TypeString","optional":true,"computed":true},"template_spec_version_id":{"type":"TypeString","optional":true}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_resource_management_private_link":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_resource_management_private_link_association":{"schema":{"management_group_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","optional":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","required":true,"forceNew":true},"resource_management_private_link_id":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_resource_policy_assignment":{"schema":{"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true},"enforce":{"type":"TypeBool","optional":true,"default":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","optional":true,"forceNew":true},"metadata":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"non_compliance_message":{"type":"TypeList","optional":true,"elem":{"schema":{"content":{"type":"TypeString","required":true},"policy_definition_reference_id":{"type":"TypeString","optional":true}}}},"not_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"overrides":{"type":"TypeList","optional":true,"elem":{"schema":{"selectors":{"type":"TypeList","optional":true,"elem":{"schema":{"in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"kind":{"type":"TypeString","computed":true},"not_in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"value":{"type":"TypeString","required":true}}}},"parameters":{"type":"TypeString","optional":true},"policy_definition_id":{"type":"TypeString","required":true,"forceNew":true},"resource_id":{"type":"TypeString","required":true,"forceNew":true},"resource_selectors":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","optional":true},"selectors":{"type":"TypeList","required":true,"elem":{"schema":{"in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"kind":{"type":"TypeString","required":true},"not_in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_resource_policy_exemption":{"schema":{"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true},"exemption_category":{"type":"TypeString","required":true},"expires_on":{"type":"TypeString","optional":true},"metadata":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"policy_assignment_id":{"type":"TypeString","required":true,"forceNew":true},"policy_definition_reference_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_resource_policy_remediation":{"schema":{"failure_percentage":{"type":"TypeFloat","optional":true},"location_filters":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"parallel_deployments":{"type":"TypeInt","optional":true},"policy_assignment_id":{"type":"TypeString","required":true},"policy_definition_reference_id":{"type":"TypeString","optional":true},"resource_count":{"type":"TypeInt","optional":true},"resource_discovery_mode":{"type":"TypeString","optional":true,"default":"ExistingNonCompliant"},"resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_resource_provider_registration":{"schema":{"feature":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"registered":{"type":"TypeBool","required":true}}}},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":120,"read":5,"delete":30,"update":120}},"azurerm_restore_point_collection":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source_virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_role_assignment":{"schema":{"condition":{"type":"TypeString","optional":true,"forceNew":true},"condition_version":{"type":"TypeString","optional":true,"forceNew":true},"delegated_managed_identity_resource_id":{"type":"TypeString","optional":true,"forceNew":true},"description":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"principal_id":{"type":"TypeString","required":true,"forceNew":true},"principal_type":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"role_definition_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"role_definition_name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"scope":{"type":"TypeString","required":true,"forceNew":true},"skip_service_principal_aad_check":{"type":"TypeBool","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_role_definition":{"schema":{"assignable_scopes":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"permissions":{"type":"TypeList","optional":true,"elem":{"schema":{"actions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"data_actions":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"not_actions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"not_data_actions":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"role_definition_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"role_definition_resource_id":{"type":"TypeString","computed":true},"scope":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":60}},"azurerm_role_management_policy":{"schema":{"activation_rules":{"type":"TypeList","optional":true,"description":"The activation rules of the policy","computed":true,"elem":{"schema":{"approval_stage":{"type":"TypeList","optional":true,"description":"The approval stages for the activation","elem":{"schema":{"primary_approver":{"type":"TypeSet","required":true,"description":"The IDs of the users or groups who can approve the activation","elem":{"schema":{"object_id":{"type":"TypeString","required":true,"description":"The ID of the object to act as an approver"},"type":{"type":"TypeString","required":true,"description":"The type of object acting as an approver"}}},"minItems":1}}},"maxItems":1},"maximum_duration":{"type":"TypeString","optional":true,"description":"The time after which the an activation can be valid for","computed":true},"require_approval":{"type":"TypeBool","optional":true,"description":"Whether an approval is required for activation","computed":true},"require_justification":{"type":"TypeBool","optional":true,"description":"Whether a justification is required during activation","computed":true},"require_multifactor_authentication":{"type":"TypeBool","optional":true,"description":"Whether multi-factor authentication is required during activation","computed":true},"require_ticket_info":{"type":"TypeBool","optional":true,"description":"Whether ticket information is required during activation","computed":true},"required_conditional_access_authentication_context":{"type":"TypeString","optional":true,"description":"Whether a conditional access context is required during activation","computed":true}}},"maxItems":1},"active_assignment_rules":{"type":"TypeList","optional":true,"description":"The rules for active assignment of the policy","computed":true,"elem":{"schema":{"expiration_required":{"type":"TypeBool","optional":true,"description":"Must the assignment have an expiry date","computed":true},"expire_after":{"type":"TypeString","optional":true,"description":"The duration after which assignments expire","computed":true},"require_justification":{"type":"TypeBool","optional":true,"description":"Whether a justification is required to make an assignment","computed":true},"require_multifactor_authentication":{"type":"TypeBool","optional":true,"description":"Whether multi-factor authentication is required to make an assignment","computed":true},"require_ticket_info":{"type":"TypeBool","optional":true,"description":"Whether ticket information is required to make an assignment","computed":true}}},"maxItems":1},"description":{"type":"TypeString","description":"The Description of the policy","computed":true},"eligible_assignment_rules":{"type":"TypeList","optional":true,"description":"The rules for eligible assignment of the policy","computed":true,"elem":{"schema":{"expiration_required":{"type":"TypeBool","optional":true,"description":"Must the assignment have an expiry date","computed":true},"expire_after":{"type":"TypeString","optional":true,"description":"The duration after which assignments expire","computed":true}}},"maxItems":1},"name":{"type":"TypeString","description":"The name of the policy","computed":true},"notification_rules":{"type":"TypeList","optional":true,"description":"The notification rules of the policy","computed":true,"elem":{"schema":{"active_assignments":{"type":"TypeList","optional":true,"description":"Notifications about active assignments","computed":true,"elem":{"schema":{"admin_notifications":{"type":"TypeList","optional":true,"description":"Admin notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","optional":true,"description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","required":true,"description":"Whether the default recipients are notified"},"notification_level":{"type":"TypeString","required":true,"description":"What level of notifications are sent"}}},"maxItems":1},"approver_notifications":{"type":"TypeList","optional":true,"description":"Approver notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","optional":true,"description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","required":true,"description":"Whether the default recipients are notified"},"notification_level":{"type":"TypeString","required":true,"description":"What level of notifications are sent"}}},"maxItems":1},"assignee_notifications":{"type":"TypeList","optional":true,"description":"Assignee notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","optional":true,"description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","required":true,"description":"Whether the default recipients are notified"},"notification_level":{"type":"TypeString","required":true,"description":"What level of notifications are sent"}}},"maxItems":1}}},"maxItems":1},"eligible_activations":{"type":"TypeList","optional":true,"description":"Notifications about activations of eligible assignments","computed":true,"elem":{"schema":{"admin_notifications":{"type":"TypeList","optional":true,"description":"Admin notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","optional":true,"description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","required":true,"description":"Whether the default recipients are notified"},"notification_level":{"type":"TypeString","required":true,"description":"What level of notifications are sent"}}},"maxItems":1},"approver_notifications":{"type":"TypeList","optional":true,"description":"Approver notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","optional":true,"description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","required":true,"description":"Whether the default recipients are notified"},"notification_level":{"type":"TypeString","required":true,"description":"What level of notifications are sent"}}},"maxItems":1},"assignee_notifications":{"type":"TypeList","optional":true,"description":"Assignee notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","optional":true,"description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","required":true,"description":"Whether the default recipients are notified"},"notification_level":{"type":"TypeString","required":true,"description":"What level of notifications are sent"}}},"maxItems":1}}},"maxItems":1},"eligible_assignments":{"type":"TypeList","optional":true,"description":"Notifications about eligible assignments","computed":true,"elem":{"schema":{"admin_notifications":{"type":"TypeList","optional":true,"description":"Admin notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","optional":true,"description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","required":true,"description":"Whether the default recipients are notified"},"notification_level":{"type":"TypeString","required":true,"description":"What level of notifications are sent"}}},"maxItems":1},"approver_notifications":{"type":"TypeList","optional":true,"description":"Approver notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","optional":true,"description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","required":true,"description":"Whether the default recipients are notified"},"notification_level":{"type":"TypeString","required":true,"description":"What level of notifications are sent"}}},"maxItems":1},"assignee_notifications":{"type":"TypeList","optional":true,"description":"Assignee notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","optional":true,"description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","required":true,"description":"Whether the default recipients are notified"},"notification_level":{"type":"TypeString","required":true,"description":"What level of notifications are sent"}}},"maxItems":1}}},"maxItems":1}}},"maxItems":1},"role_definition_id":{"type":"TypeString","required":true,"description":"ID of the Azure Role to which this policy is assigned","forceNew":true},"scope":{"type":"TypeString","required":true,"description":"The scope of the role to which this policy will apply","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":5,"update":30}},"azurerm_route":{"schema":{"address_prefix":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"next_hop_in_ip_address":{"type":"TypeString","optional":true},"next_hop_type":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"route_table_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_route_filter":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rule":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"access":{"type":"TypeString","required":true},"communities":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"name":{"type":"TypeString","required":true},"rule_type":{"type":"TypeString","required":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_route_map":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeList","optional":true,"elem":{"schema":{"parameter":{"type":"TypeList","optional":true,"elem":{"schema":{"as_path":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"community":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"route_prefix":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"type":{"type":"TypeString","required":true}}}},"match_criterion":{"type":"TypeList","optional":true,"elem":{"schema":{"as_path":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"community":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"match_condition":{"type":"TypeString","required":true},"route_prefix":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"name":{"type":"TypeString","required":true},"next_step_if_matched":{"type":"TypeString","optional":true,"default":"Unknown"}}}},"virtual_hub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_route_server":{"schema":{"branch_to_branch_traffic_enabled":{"type":"TypeBool","optional":true,"default":false},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_ip_address_id":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"routing_state":{"type":"TypeString","computed":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_router_asn":{"type":"TypeInt","computed":true},"virtual_router_ips":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_route_server_bgp_connection":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"peer_asn":{"type":"TypeInt","required":true,"forceNew":true},"peer_ip":{"type":"TypeString","required":true,"forceNew":true},"route_server_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_route_table":{"schema":{"bgp_route_propagation_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"route":{"type":"TypeSet","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"address_prefix":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"next_hop_in_ip_address":{"type":"TypeString","optional":true},"next_hop_type":{"type":"TypeString","required":true}}}},"subnets":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_search_service":{"schema":{"allowed_ips":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"authentication_failure_mode":{"type":"TypeString","optional":true},"customer_managed_key_enforcement_enabled":{"type":"TypeBool","optional":true,"default":false},"hosting_mode":{"type":"TypeString","optional":true,"default":"default","forceNew":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"local_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"partition_count":{"type":"TypeInt","optional":true,"default":1},"primary_key":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"query_keys":{"type":"TypeList","computed":true,"elem":{"schema":{"key":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"replica_count":{"type":"TypeInt","optional":true,"default":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_key":{"type":"TypeString","computed":true},"semantic_search_sku":{"type":"TypeString","optional":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_search_shared_private_link_service":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"request_message":{"type":"TypeString","optional":true},"search_service_id":{"type":"TypeString","required":true,"forceNew":true},"status":{"type":"TypeString","computed":true},"subresource_name":{"type":"TypeString","required":true,"forceNew":true},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_security_center_assessment":{"schema":{"additional_data":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"assessment_policy_id":{"type":"TypeString","required":true,"forceNew":true},"status":{"type":"TypeList","required":true,"elem":{"schema":{"cause":{"type":"TypeString","optional":true},"code":{"type":"TypeString","required":true},"description":{"type":"TypeString","optional":true}}},"maxItems":1},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_security_center_assessment_policy":{"schema":{"categories":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"description":{"type":"TypeString","required":true},"display_name":{"type":"TypeString","required":true},"implementation_effort":{"type":"TypeString","optional":true},"name":{"type":"TypeString","computed":true},"remediation_description":{"type":"TypeString","optional":true},"severity":{"type":"TypeString","optional":true,"default":"Medium"},"threats":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"user_impact":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_security_center_auto_provisioning":{"schema":{"auto_provision":{"type":"TypeString","required":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_security_center_automation":{"schema":{"action":{"type":"TypeList","required":true,"elem":{"schema":{"connection_string":{"type":"TypeString","optional":true},"resource_id":{"type":"TypeString","required":true},"trigger_url":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"minItems":1},"description":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scopes":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"source":{"type":"TypeList","required":true,"elem":{"schema":{"event_source":{"type":"TypeString","required":true},"rule_set":{"type":"TypeList","optional":true,"elem":{"schema":{"rule":{"type":"TypeList","required":true,"elem":{"schema":{"expected_value":{"type":"TypeString","required":true},"operator":{"type":"TypeString","required":true},"property_path":{"type":"TypeString","required":true},"property_type":{"type":"TypeString","required":true}}}}}}}}},"minItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_security_center_contact":{"schema":{"alert_notifications":{"type":"TypeBool","required":true},"alerts_to_admins":{"type":"TypeBool","required":true},"email":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"phone":{"type":"TypeString","optional":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_security_center_server_vulnerability_assessment_virtual_machine":{"schema":{"virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":5,"read":5,"delete":10}},"azurerm_security_center_server_vulnerability_assessments_setting":{"schema":{"vulnerability_assessment_provider":{"type":"TypeString","required":true}},"timeouts":{"create":10,"read":5,"delete":10,"update":10}},"azurerm_security_center_setting":{"schema":{"enabled":{"type":"TypeBool","required":true},"setting_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":10,"read":5,"delete":10,"update":10}},"azurerm_security_center_storage_defender":{"schema":{"malware_scanning_on_upload_cap_gb_per_month":{"type":"TypeInt","optional":true,"default":-1},"malware_scanning_on_upload_enabled":{"type":"TypeBool","optional":true,"default":false},"override_subscription_settings_enabled":{"type":"TypeBool","optional":true,"default":false},"scan_results_event_grid_topic_id":{"type":"TypeString","optional":true},"sensitive_data_discovery_enabled":{"type":"TypeBool","optional":true,"default":false},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_security_center_subscription_pricing":{"schema":{"extension":{"type":"TypeSet","optional":true,"elem":{"schema":{"additional_extension_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true}}}},"resource_type":{"type":"TypeString","optional":true,"default":"VirtualMachines"},"subplan":{"type":"TypeString","optional":true},"tier":{"type":"TypeString","required":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_security_center_workspace":{"schema":{"scope":{"type":"TypeString","required":true},"workspace_id":{"type":"TypeString","required":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_sentinel_alert_rule_anomaly_built_in":{"schema":{"anomaly_settings_version":{"type":"TypeInt","computed":true},"anomaly_version":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","optional":true,"computed":true},"enabled":{"type":"TypeBool","required":true},"frequency":{"type":"TypeString","computed":true},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"mode":{"type":"TypeString","required":true},"multi_select_observation":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"supported_values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"name":{"type":"TypeString","optional":true,"computed":true},"prioritized_exclude_observation":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"exclude":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"prioritize":{"type":"TypeString","computed":true}}}},"required_data_connector":{"type":"TypeList","computed":true,"elem":{"schema":{"connector_id":{"type":"TypeString","computed":true},"data_types":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"settings_definition_id":{"type":"TypeString","computed":true},"single_select_observation":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"supported_values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"value":{"type":"TypeString","computed":true}}}},"tactics":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"techniques":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"threshold_observation":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"max":{"type":"TypeString","computed":true},"min":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}}},"timeouts":{"create":30,"read":5,"delete":5,"update":30}},"azurerm_sentinel_alert_rule_anomaly_duplicate":{"schema":{"anomaly_settings_version":{"type":"TypeInt","computed":true},"anomaly_version":{"type":"TypeString","computed":true},"built_in_rule_id":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","required":true},"frequency":{"type":"TypeString","computed":true},"is_default_settings":{"type":"TypeBool","computed":true},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"mode":{"type":"TypeString","required":true},"multi_select_observation":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"supported_values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"values":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}},"name":{"type":"TypeString","computed":true},"prioritized_exclude_observation":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"exclude":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"prioritize":{"type":"TypeString","optional":true}}}},"required_data_connector":{"type":"TypeList","computed":true,"elem":{"schema":{"connector_id":{"type":"TypeString","computed":true},"data_types":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"settings_definition_id":{"type":"TypeString","computed":true},"single_select_observation":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"supported_values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"value":{"type":"TypeString","required":true}}}},"tactics":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"techniques":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"threshold_observation":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"max":{"type":"TypeString","computed":true},"min":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}}},"timeouts":{"create":30,"read":5,"delete":5,"update":30}},"azurerm_sentinel_alert_rule_fusion":{"schema":{"alert_rule_template_guid":{"type":"TypeString","required":true,"forceNew":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"source":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true},"sub_type":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true},"severities_allowed":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1}}}}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_alert_rule_machine_learning_behavior_analytics":{"schema":{"alert_rule_template_guid":{"type":"TypeString","required":true,"forceNew":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_alert_rule_ms_security_incident":{"schema":{"alert_rule_template_guid":{"type":"TypeString","optional":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"display_name_exclude_filter":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"display_name_filter":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"minItems":1},"enabled":{"type":"TypeBool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"product_filter":{"type":"TypeString","required":true},"severity_filter":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_alert_rule_nrt":{"schema":{"alert_details_override":{"type":"TypeList","optional":true,"elem":{"schema":{"description_format":{"type":"TypeString","optional":true},"display_name_format":{"type":"TypeString","optional":true},"dynamic_property":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"severity_column_name":{"type":"TypeString","optional":true},"tactics_column_name":{"type":"TypeString","optional":true}}}},"alert_rule_template_guid":{"type":"TypeString","optional":true,"forceNew":true},"alert_rule_template_version":{"type":"TypeString","optional":true,"forceNew":true},"custom_details":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"entity_mapping":{"type":"TypeList","optional":true,"elem":{"schema":{"entity_type":{"type":"TypeString","required":true},"field_mapping":{"type":"TypeList","required":true,"elem":{"schema":{"column_name":{"type":"TypeString","required":true},"identifier":{"type":"TypeString","required":true}}},"maxItems":3}}},"maxItems":5},"event_grouping":{"type":"TypeList","required":true,"elem":{"schema":{"aggregation_method":{"type":"TypeString","required":true}}},"maxItems":1},"incident":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"create_incident_enabled":{"type":"TypeBool","required":true},"grouping":{"type":"TypeList","required":true,"elem":{"schema":{"by_alert_details":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"by_custom_details":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"by_entities":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true,"default":true},"entity_matching_method":{"type":"TypeString","optional":true,"default":"AnyAlert"},"lookback_duration":{"type":"TypeString","optional":true,"default":"PT5M"},"reopen_closed_incidents":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1,"minItems":1}}},"maxItems":1,"minItems":1},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"query":{"type":"TypeString","required":true},"sentinel_entity_mapping":{"type":"TypeList","optional":true,"elem":{"schema":{"column_name":{"type":"TypeString","required":true}}},"maxItems":5},"severity":{"type":"TypeString","required":true},"suppression_duration":{"type":"TypeString","optional":true,"default":"PT5H"},"suppression_enabled":{"type":"TypeBool","optional":true,"default":false},"tactics":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"techniques":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_alert_rule_scheduled":{"schema":{"alert_details_override":{"type":"TypeList","optional":true,"elem":{"schema":{"description_format":{"type":"TypeString","optional":true},"display_name_format":{"type":"TypeString","optional":true},"dynamic_property":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"severity_column_name":{"type":"TypeString","optional":true},"tactics_column_name":{"type":"TypeString","optional":true}}}},"alert_rule_template_guid":{"type":"TypeString","optional":true,"forceNew":true},"alert_rule_template_version":{"type":"TypeString","optional":true},"custom_details":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"entity_mapping":{"type":"TypeList","optional":true,"elem":{"schema":{"entity_type":{"type":"TypeString","required":true},"field_mapping":{"type":"TypeList","required":true,"elem":{"schema":{"column_name":{"type":"TypeString","required":true},"identifier":{"type":"TypeString","required":true}}},"maxItems":3}}},"maxItems":5},"event_grouping":{"type":"TypeList","optional":true,"elem":{"schema":{"aggregation_method":{"type":"TypeString","required":true}}},"maxItems":1},"incident":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"create_incident_enabled":{"type":"TypeBool","required":true},"grouping":{"type":"TypeList","required":true,"elem":{"schema":{"by_alert_details":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"by_custom_details":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"by_entities":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true,"default":true},"entity_matching_method":{"type":"TypeString","optional":true,"default":"AnyAlert"},"lookback_duration":{"type":"TypeString","optional":true,"default":"PT5M"},"reopen_closed_incidents":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1,"minItems":1}}},"maxItems":1,"minItems":1},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"query":{"type":"TypeString","required":true},"query_frequency":{"type":"TypeString","optional":true,"default":"PT5H"},"query_period":{"type":"TypeString","optional":true,"default":"PT5H"},"sentinel_entity_mapping":{"type":"TypeList","optional":true,"elem":{"schema":{"column_name":{"type":"TypeString","required":true}}},"maxItems":5},"severity":{"type":"TypeString","required":true},"suppression_duration":{"type":"TypeString","optional":true,"default":"PT5H"},"suppression_enabled":{"type":"TypeBool","optional":true,"default":false},"tactics":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"techniques":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"trigger_operator":{"type":"TypeString","optional":true,"default":"GreaterThan"},"trigger_threshold":{"type":"TypeInt","optional":true,"default":0}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_alert_rule_threat_intelligence":{"schema":{"alert_rule_template_guid":{"type":"TypeString","required":true,"forceNew":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_automation_rule":{"schema":{"action_incident":{"type":"TypeList","optional":true,"elem":{"schema":{"classification":{"type":"TypeString","optional":true},"classification_comment":{"type":"TypeString","optional":true},"labels":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"order":{"type":"TypeInt","required":true},"owner_id":{"type":"TypeString","optional":true},"severity":{"type":"TypeString","optional":true},"status":{"type":"TypeString","optional":true}}}},"action_playbook":{"type":"TypeList","optional":true,"elem":{"schema":{"logic_app_id":{"type":"TypeString","required":true},"order":{"type":"TypeInt","required":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true}}}},"condition_json":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"expiration":{"type":"TypeString","optional":true},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"order":{"type":"TypeInt","required":true},"triggers_on":{"type":"TypeString","optional":true,"default":"Incidents"},"triggers_when":{"type":"TypeString","optional":true,"default":"Created"}},"timeouts":{"create":5,"read":5,"delete":5,"update":5}},"azurerm_sentinel_data_connector_aws_cloud_trail":{"schema":{"aws_role_arn":{"type":"TypeString","required":true},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_data_connector_aws_s3":{"schema":{"aws_role_arn":{"type":"TypeString","required":true},"destination_table":{"type":"TypeString","required":true},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"sqs_urls":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_data_connector_azure_active_directory":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_azure_advanced_threat_protection":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_azure_security_center":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"subscription_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_dynamics_365":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_iot":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"subscription_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_microsoft_cloud_app_security":{"schema":{"alerts_enabled":{"type":"TypeBool","optional":true,"default":true},"discovery_logs_enabled":{"type":"TypeBool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_data_connector_microsoft_defender_advanced_threat_protection":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_microsoft_threat_intelligence":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"microsoft_emerging_threat_feed_lookback_date":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_microsoft_threat_protection":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_office_365":{"schema":{"exchange_enabled":{"type":"TypeBool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"sharepoint_enabled":{"type":"TypeBool","optional":true,"default":true},"teams_enabled":{"type":"TypeBool","optional":true,"default":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_data_connector_office_365_project":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_office_atp":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_office_irm":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_office_power_bi":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_threat_intelligence":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"lookback_date":{"type":"TypeString","optional":true,"default":"1970-01-01T00:00:00Z","forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_data_connector_threat_intelligence_taxii":{"schema":{"api_root_url":{"type":"TypeString","required":true},"collection_id":{"type":"TypeString","required":true},"display_name":{"type":"TypeString","required":true},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"lookback_date":{"type":"TypeString","optional":true,"default":"1970-01-01T00:00:00Z"},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","optional":true},"polling_frequency":{"type":"TypeString","optional":true,"default":"OnceAnHour"},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"user_name":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_log_analytics_workspace_onboarding":{"schema":{"customer_managed_key_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_metadata":{"schema":{"author":{"type":"TypeList","optional":true,"elem":{"schema":{"email":{"type":"TypeString","optional":true},"link":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true}}},"maxItems":1},"category":{"type":"TypeList","optional":true,"elem":{"schema":{"domains":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"verticals":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"content_id":{"type":"TypeString","required":true},"content_schema_version":{"type":"TypeString","optional":true,"default":"2.0"},"custom_version":{"type":"TypeString","optional":true},"dependency":{"type":"TypeString","optional":true},"first_publish_date":{"type":"TypeString","optional":true},"icon_id":{"type":"TypeString","optional":true},"kind":{"type":"TypeString","required":true},"last_publish_date":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"parent_id":{"type":"TypeString","required":true},"preview_images":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"preview_images_dark":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"providers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"source":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"id":{"type":"TypeString","optional":true},"kind":{"type":"TypeString","required":true},"name":{"type":"TypeString","optional":true}}},"maxItems":1},"support":{"type":"TypeList","optional":true,"elem":{"schema":{"email":{"type":"TypeString","optional":true},"link":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true},"tier":{"type":"TypeString","required":true}}},"maxItems":1},"threat_analysis_tactics":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"threat_analysis_techniques":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"version":{"type":"TypeString","optional":true},"workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_threat_intelligence_indicator":{"schema":{"confidence":{"type":"TypeInt","optional":true,"default":-1},"created_by":{"type":"TypeString","optional":true},"created_on":{"type":"TypeString","computed":true},"defanged":{"type":"TypeBool","computed":true},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","required":true},"extension":{"type":"TypeString","optional":true,"computed":true},"external_id":{"type":"TypeString","computed":true},"external_last_updated_time_utc":{"type":"TypeString","computed":true},"external_reference":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"hashes":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"id":{"type":"TypeString","computed":true},"source_name":{"type":"TypeString","optional":true},"url":{"type":"TypeString","optional":true}}}},"granular_marking":{"type":"TypeList","optional":true,"elem":{"schema":{"language":{"type":"TypeString","optional":true},"marking_ref":{"type":"TypeString","optional":true},"selectors":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"guid":{"type":"TypeString","computed":true},"indicator_type":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"kill_chain_phase":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","optional":true}}}},"language":{"type":"TypeString","optional":true},"last_updated_time_utc":{"type":"TypeString","computed":true},"object_marking_refs":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"parsed_pattern":{"type":"TypeList","computed":true,"elem":{"schema":{"pattern_type_key":{"type":"TypeString","computed":true},"pattern_type_values":{"type":"TypeList","computed":true,"elem":{"schema":{"value":{"type":"TypeString","computed":true},"value_type":{"type":"TypeString","computed":true}}}}}}},"pattern":{"type":"TypeString","required":true},"pattern_type":{"type":"TypeString","required":true},"pattern_version":{"type":"TypeString","optional":true},"revoked":{"type":"TypeBool","optional":true,"default":false},"source":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"threat_types":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"validate_from_utc":{"type":"TypeString","required":true},"validate_until_utc":{"type":"TypeString","optional":true},"workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_sentinel_watchlist":{"schema":{"default_duration":{"type":"TypeString","optional":true,"forceNew":true},"description":{"type":"TypeString","optional":true,"forceNew":true},"display_name":{"type":"TypeString","required":true,"forceNew":true},"item_search_key":{"type":"TypeString","required":true,"forceNew":true},"labels":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"log_analytics_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_sentinel_watchlist_item":{"schema":{"name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"properties":{"type":"TypeMap","required":true,"elem":{"type":"TypeString"}},"watchlist_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_service_fabric_cluster":{"schema":{"add_on_features":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"azure_active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"client_application_id":{"type":"TypeString","required":true},"cluster_application_id":{"type":"TypeString","required":true},"tenant_id":{"type":"TypeString","required":true}}},"maxItems":1},"certificate":{"type":"TypeList","optional":true,"elem":{"schema":{"thumbprint":{"type":"TypeString","required":true},"thumbprint_secondary":{"type":"TypeString","optional":true},"x509_store_name":{"type":"TypeString","required":true}}},"maxItems":1},"certificate_common_names":{"type":"TypeList","optional":true,"elem":{"schema":{"common_names":{"type":"TypeSet","required":true,"elem":{"schema":{"certificate_common_name":{"type":"TypeString","required":true},"certificate_issuer_thumbprint":{"type":"TypeString","optional":true}}},"minItems":1},"x509_store_name":{"type":"TypeString","required":true}}},"maxItems":1},"client_certificate_common_name":{"type":"TypeList","optional":true,"elem":{"schema":{"common_name":{"type":"TypeString","required":true},"is_admin":{"type":"TypeBool","required":true},"issuer_thumbprint":{"type":"TypeString","optional":true}}}},"client_certificate_thumbprint":{"type":"TypeList","optional":true,"elem":{"schema":{"is_admin":{"type":"TypeBool","required":true},"thumbprint":{"type":"TypeString","required":true}}}},"cluster_code_version":{"type":"TypeString","optional":true,"computed":true},"cluster_endpoint":{"type":"TypeString","computed":true},"diagnostics_config":{"type":"TypeList","optional":true,"elem":{"schema":{"blob_endpoint":{"type":"TypeString","required":true},"protected_account_key_name":{"type":"TypeString","required":true},"queue_endpoint":{"type":"TypeString","required":true},"storage_account_name":{"type":"TypeString","required":true},"table_endpoint":{"type":"TypeString","required":true}}},"maxItems":1},"fabric_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"management_endpoint":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"node_type":{"type":"TypeList","required":true,"elem":{"schema":{"application_ports":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"end_port":{"type":"TypeInt","required":true},"start_port":{"type":"TypeInt","required":true}}},"maxItems":1},"capacities":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"client_endpoint_port":{"type":"TypeInt","required":true},"durability_level":{"type":"TypeString","optional":true,"default":"Bronze"},"ephemeral_ports":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"end_port":{"type":"TypeInt","required":true},"start_port":{"type":"TypeInt","required":true}}},"maxItems":1},"http_endpoint_port":{"type":"TypeInt","required":true},"instance_count":{"type":"TypeInt","required":true},"is_primary":{"type":"TypeBool","required":true},"is_stateless":{"type":"TypeBool","optional":true},"multiple_availability_zones":{"type":"TypeBool","optional":true},"name":{"type":"TypeString","required":true},"placement_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"reverse_proxy_endpoint_port":{"type":"TypeInt","optional":true}}}},"reliability_level":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"reverse_proxy_certificate":{"type":"TypeList","optional":true,"elem":{"schema":{"thumbprint":{"type":"TypeString","required":true},"thumbprint_secondary":{"type":"TypeString","optional":true},"x509_store_name":{"type":"TypeString","required":true}}},"maxItems":1},"reverse_proxy_certificate_common_names":{"type":"TypeList","optional":true,"elem":{"schema":{"common_names":{"type":"TypeSet","required":true,"elem":{"schema":{"certificate_common_name":{"type":"TypeString","required":true},"certificate_issuer_thumbprint":{"type":"TypeString","optional":true}}},"minItems":1},"x509_store_name":{"type":"TypeString","required":true}}},"maxItems":1},"service_fabric_zonal_upgrade_mode":{"type":"TypeString","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"upgrade_mode":{"type":"TypeString","required":true},"upgrade_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"delta_health_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"max_delta_unhealthy_applications_percent":{"type":"TypeInt","optional":true,"default":0},"max_delta_unhealthy_nodes_percent":{"type":"TypeInt","optional":true,"default":0},"max_upgrade_domain_delta_unhealthy_nodes_percent":{"type":"TypeInt","optional":true,"default":0}}},"maxItems":1},"force_restart_enabled":{"type":"TypeBool","optional":true},"health_check_retry_timeout":{"type":"TypeString","optional":true,"default":"00:45:00"},"health_check_stable_duration":{"type":"TypeString","optional":true,"default":"00:01:00"},"health_check_wait_duration":{"type":"TypeString","optional":true,"default":"00:00:30"},"health_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"max_unhealthy_applications_percent":{"type":"TypeInt","optional":true,"default":0},"max_unhealthy_nodes_percent":{"type":"TypeInt","optional":true,"default":0}}},"maxItems":1},"upgrade_domain_timeout":{"type":"TypeString","optional":true,"default":"02:00:00"},"upgrade_replica_set_check_timeout":{"type":"TypeString","optional":true,"default":"10675199.02:48:05.4775807"},"upgrade_timeout":{"type":"TypeString","optional":true,"default":"12:00:00"}}},"maxItems":1},"vm_image":{"type":"TypeString","required":true,"forceNew":true},"vmss_zonal_upgrade_mode":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_service_fabric_managed_cluster":{"schema":{"authentication":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"client_application_id":{"type":"TypeString","required":true},"cluster_application_id":{"type":"TypeString","required":true},"tenant_id":{"type":"TypeString","required":true}}},"maxItems":1},"certificate":{"type":"TypeList","optional":true,"elem":{"schema":{"common_name":{"type":"TypeString","optional":true},"thumbprint":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}}}},"maxItems":1},"backup_service_enabled":{"type":"TypeBool","optional":true},"client_connection_port":{"type":"TypeInt","required":true},"custom_fabric_setting":{"type":"TypeList","optional":true,"elem":{"schema":{"parameter":{"type":"TypeString","required":true},"section":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"dns_name":{"type":"TypeString","optional":true,"computed":true},"dns_service_enabled":{"type":"TypeBool","optional":true},"http_gateway_port":{"type":"TypeInt","required":true},"lb_rule":{"type":"TypeList","required":true,"elem":{"schema":{"backend_port":{"type":"TypeInt","required":true},"frontend_port":{"type":"TypeInt","required":true},"probe_protocol":{"type":"TypeString","required":true},"probe_request_path":{"type":"TypeString","optional":true},"protocol":{"type":"TypeString","required":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"node_type":{"type":"TypeList","optional":true,"elem":{"schema":{"application_port_range":{"type":"TypeString","required":true},"capacities":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"data_disk_size_gb":{"type":"TypeInt","required":true},"data_disk_type":{"type":"TypeString","optional":true,"default":"Standard_LRS"},"ephemeral_port_range":{"type":"TypeString","required":true},"id":{"type":"TypeString","computed":true},"multiple_placement_groups_enabled":{"type":"TypeBool","optional":true},"name":{"type":"TypeString","required":true},"placement_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"primary":{"type":"TypeBool","optional":true},"stateless":{"type":"TypeBool","optional":true},"vm_image_offer":{"type":"TypeString","required":true},"vm_image_publisher":{"type":"TypeString","required":true},"vm_image_sku":{"type":"TypeString","required":true},"vm_image_version":{"type":"TypeString","required":true},"vm_instance_count":{"type":"TypeInt","required":true},"vm_secrets":{"type":"TypeList","optional":true,"elem":{"schema":{"certificates":{"type":"TypeList","required":true,"elem":{"schema":{"store":{"type":"TypeString","required":true},"url":{"type":"TypeString","required":true}}}},"vault_id":{"type":"TypeString","required":true}}}},"vm_size":{"type":"TypeString","required":true}}}},"password":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","optional":true,"default":"Basic","forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"upgrade_wave":{"type":"TypeString","optional":true,"default":"Wave0"},"username":{"type":"TypeString","optional":true}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_service_plan":{"schema":{"app_service_environment_id":{"type":"TypeString","optional":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"maximum_elastic_worker_count":{"type":"TypeInt","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"os_type":{"type":"TypeString","required":true,"forceNew":true},"per_site_scaling_enabled":{"type":"TypeBool","optional":true,"default":false},"reserved":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"worker_count":{"type":"TypeInt","optional":true,"computed":true},"zone_balancing_enabled":{"type":"TypeBool","optional":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_servicebus_namespace":{"schema":{"capacity":{"type":"TypeInt","optional":true,"default":0},"customer_managed_key":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_id":{"type":"TypeString","required":true},"infrastructure_encryption_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"key_vault_key_id":{"type":"TypeString","required":true}}},"maxItems":1},"default_primary_connection_string":{"type":"TypeString","computed":true},"default_primary_key":{"type":"TypeString","computed":true},"default_secondary_connection_string":{"type":"TypeString","computed":true},"default_secondary_key":{"type":"TypeString","computed":true},"endpoint":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"local_auth_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"name":{"type":"TypeString","required":true,"forceNew":true},"network_rule_set":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"default_action":{"type":"TypeString","optional":true,"default":"Allow"},"ip_rules":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"network_rules":{"type":"TypeSet","optional":true,"elem":{"schema":{"ignore_missing_vnet_service_endpoint":{"type":"TypeBool","optional":true,"default":false},"subnet_id":{"type":"TypeString","required":true}}}},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"trusted_services_allowed":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"premium_messaging_partitions":{"type":"TypeInt","optional":true,"default":0,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_servicebus_namespace_authorization_rule":{"schema":{"listen":{"type":"TypeBool","optional":true,"default":false},"manage":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_id":{"type":"TypeString","required":true,"forceNew":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_connection_string_alias":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_connection_string_alias":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"send":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_servicebus_namespace_disaster_recovery_config":{"schema":{"alias_authorization_rule_id":{"type":"TypeString","optional":true},"default_primary_key":{"type":"TypeString","computed":true},"default_secondary_key":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"partner_namespace_id":{"type":"TypeString","required":true},"primary_connection_string_alias":{"type":"TypeString","computed":true},"primary_namespace_id":{"type":"TypeString","required":true,"forceNew":true},"secondary_connection_string_alias":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_servicebus_queue":{"schema":{"auto_delete_on_idle":{"type":"TypeString","optional":true,"computed":true},"batched_operations_enabled":{"type":"TypeBool","optional":true,"default":true},"dead_lettering_on_message_expiration":{"type":"TypeBool","optional":true,"default":false},"default_message_ttl":{"type":"TypeString","optional":true,"computed":true},"duplicate_detection_history_time_window":{"type":"TypeString","optional":true,"default":"PT10M"},"express_enabled":{"type":"TypeBool","optional":true,"default":false},"forward_dead_lettered_messages_to":{"type":"TypeString","optional":true},"forward_to":{"type":"TypeString","optional":true},"lock_duration":{"type":"TypeString","optional":true,"default":"PT1M"},"max_delivery_count":{"type":"TypeInt","optional":true,"default":10},"max_message_size_in_kilobytes":{"type":"TypeInt","optional":true,"computed":true},"max_size_in_megabytes":{"type":"TypeInt","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_id":{"type":"TypeString","required":true,"forceNew":true},"partitioning_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"requires_duplicate_detection":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"requires_session":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"status":{"type":"TypeString","optional":true,"default":"Active"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_servicebus_queue_authorization_rule":{"schema":{"listen":{"type":"TypeBool","optional":true,"default":false},"manage":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_connection_string_alias":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"queue_id":{"type":"TypeString","required":true,"forceNew":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_connection_string_alias":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"send":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_servicebus_subscription":{"schema":{"auto_delete_on_idle":{"type":"TypeString","optional":true,"default":"P10675199DT2H48M5.4775807S"},"batched_operations_enabled":{"type":"TypeBool","optional":true},"client_scoped_subscription":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","optional":true,"forceNew":true},"is_client_scoped_subscription_durable":{"type":"TypeBool","computed":true},"is_client_scoped_subscription_shareable":{"type":"TypeBool","optional":true,"default":true,"forceNew":true}}},"maxItems":1},"client_scoped_subscription_enabled":{"type":"TypeBool","optional":true,"default":false},"dead_lettering_on_filter_evaluation_error":{"type":"TypeBool","optional":true,"default":true},"dead_lettering_on_message_expiration":{"type":"TypeBool","optional":true},"default_message_ttl":{"type":"TypeString","optional":true,"default":"P10675199DT2H48M5.4775807S"},"forward_dead_lettered_messages_to":{"type":"TypeString","optional":true},"forward_to":{"type":"TypeString","optional":true},"lock_duration":{"type":"TypeString","optional":true,"default":"PT1M"},"max_delivery_count":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"requires_session":{"type":"TypeBool","optional":true,"forceNew":true},"status":{"type":"TypeString","optional":true,"default":"Active"},"topic_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_servicebus_subscription_rule":{"schema":{"action":{"type":"TypeString","optional":true},"correlation_filter":{"type":"TypeList","optional":true,"elem":{"schema":{"content_type":{"type":"TypeString","optional":true},"correlation_id":{"type":"TypeString","optional":true},"label":{"type":"TypeString","optional":true},"message_id":{"type":"TypeString","optional":true},"properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"reply_to":{"type":"TypeString","optional":true},"reply_to_session_id":{"type":"TypeString","optional":true},"session_id":{"type":"TypeString","optional":true},"to":{"type":"TypeString","optional":true}}},"maxItems":1},"filter_type":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"sql_filter":{"type":"TypeString","optional":true},"sql_filter_compatibility_level":{"type":"TypeInt","computed":true},"subscription_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_servicebus_topic":{"schema":{"auto_delete_on_idle":{"type":"TypeString","optional":true,"default":"P10675199DT2H48M5.4775807S"},"batched_operations_enabled":{"type":"TypeBool","optional":true},"default_message_ttl":{"type":"TypeString","optional":true,"default":"P10675199DT2H48M5.4775807S"},"duplicate_detection_history_time_window":{"type":"TypeString","optional":true,"default":"PT10M"},"express_enabled":{"type":"TypeBool","optional":true},"max_message_size_in_kilobytes":{"type":"TypeInt","optional":true,"computed":true},"max_size_in_megabytes":{"type":"TypeInt","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"namespace_id":{"type":"TypeString","required":true,"forceNew":true},"partitioning_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"requires_duplicate_detection":{"type":"TypeBool","optional":true,"forceNew":true},"status":{"type":"TypeString","optional":true,"default":"Active"},"support_ordering":{"type":"TypeBool","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_servicebus_topic_authorization_rule":{"schema":{"listen":{"type":"TypeBool","optional":true,"default":false},"manage":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_connection_string_alias":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_connection_string_alias":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"send":{"type":"TypeBool","optional":true,"default":false},"topic_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_shared_image":{"schema":{"accelerated_network_support_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"architecture":{"type":"TypeString","optional":true,"default":"x64","forceNew":true},"confidential_vm_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"confidential_vm_supported":{"type":"TypeBool","optional":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"disk_controller_type_nvme_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"disk_types_not_allowed":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"end_of_life_date":{"type":"TypeString","optional":true},"eula":{"type":"TypeString","optional":true,"forceNew":true},"gallery_name":{"type":"TypeString","required":true,"forceNew":true},"hibernation_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"hyper_v_generation":{"type":"TypeString","optional":true,"default":"V1","forceNew":true},"identifier":{"type":"TypeList","required":true,"elem":{"schema":{"offer":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"max_recommended_memory_in_gb":{"type":"TypeInt","optional":true},"max_recommended_vcpu_count":{"type":"TypeInt","optional":true},"min_recommended_memory_in_gb":{"type":"TypeInt","optional":true},"min_recommended_vcpu_count":{"type":"TypeInt","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"os_type":{"type":"TypeString","required":true,"forceNew":true},"privacy_statement_uri":{"type":"TypeString","optional":true,"forceNew":true},"purchase_plan":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"product":{"type":"TypeString","optional":true,"forceNew":true},"publisher":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"release_note_uri":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"specialized":{"type":"TypeBool","optional":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"trusted_launch_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"trusted_launch_supported":{"type":"TypeBool","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_shared_image_gallery":{"schema":{"description":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sharing":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"community_gallery":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"eula":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","computed":true},"prefix":{"type":"TypeString","required":true,"forceNew":true},"publisher_email":{"type":"TypeString","required":true,"forceNew":true},"publisher_uri":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"permission":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"unique_name":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_shared_image_version":{"schema":{"blob_uri":{"type":"TypeString","optional":true,"forceNew":true},"deletion_of_replicated_locations_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"end_of_life_date":{"type":"TypeString","optional":true},"exclude_from_latest":{"type":"TypeBool","optional":true,"default":false},"gallery_name":{"type":"TypeString","required":true,"forceNew":true},"image_name":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_image_id":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"os_disk_snapshot_id":{"type":"TypeString","optional":true,"forceNew":true},"replication_mode":{"type":"TypeString","optional":true,"default":"Full","forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"storage_account_id":{"type":"TypeString","optional":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"target_region":{"type":"TypeList","required":true,"elem":{"schema":{"disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"exclude_from_latest_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true},"regional_replica_count":{"type":"TypeInt","required":true},"storage_account_type":{"type":"TypeString","optional":true,"default":"Standard_LRS"}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_signalr_service":{"schema":{"aad_auth_enabled":{"type":"TypeBool","optional":true,"default":true},"connectivity_logs_enabled":{"type":"TypeBool","optional":true,"default":false},"cors":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}}},"hostname":{"type":"TypeString","computed":true},"http_request_logs_enabled":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"ip_address":{"type":"TypeString","computed":true},"live_trace":{"type":"TypeList","optional":true,"elem":{"schema":{"connectivity_logs_enabled":{"type":"TypeBool","optional":true,"default":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"http_request_logs_enabled":{"type":"TypeBool","optional":true,"default":true},"messaging_logs_enabled":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"live_trace_enabled":{"type":"TypeBool","optional":true,"default":false},"local_auth_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"messaging_logs_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_access_key":{"type":"TypeString","computed":true},"primary_connection_string":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"public_port":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_access_key":{"type":"TypeString","computed":true},"secondary_connection_string":{"type":"TypeString","computed":true},"server_port":{"type":"TypeInt","computed":true},"serverless_connection_timeout_in_seconds":{"type":"TypeInt","optional":true,"default":30},"service_mode":{"type":"TypeString","optional":true,"default":"Default"},"sku":{"type":"TypeList","required":true,"elem":{"schema":{"capacity":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tls_client_cert_enabled":{"type":"TypeBool","optional":true,"default":false},"upstream_endpoint":{"type":"TypeSet","optional":true,"elem":{"schema":{"category_pattern":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"event_pattern":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"hub_pattern":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"url_template":{"type":"TypeString","required":true},"user_assigned_identity_id":{"type":"TypeString","optional":true}}}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_signalr_service_custom_certificate":{"schema":{"certificate_version":{"type":"TypeString","computed":true},"custom_certificate_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"signalr_service_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_signalr_service_custom_domain":{"schema":{"domain_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"signalr_custom_certificate_id":{"type":"TypeString","required":true,"forceNew":true},"signalr_service_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_signalr_service_network_acl":{"schema":{"default_action":{"type":"TypeString","required":true},"private_endpoint":{"type":"TypeSet","optional":true,"elem":{"schema":{"allowed_request_types":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"denied_request_types":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"id":{"type":"TypeString","required":true}}}},"public_network":{"type":"TypeList","required":true,"elem":{"schema":{"allowed_request_types":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"denied_request_types":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"signalr_service_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_signalr_shared_private_link_resource":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"request_message":{"type":"TypeString","optional":true},"signalr_service_id":{"type":"TypeString","required":true,"forceNew":true},"status":{"type":"TypeString","computed":true},"sub_resource_name":{"type":"TypeString","required":true,"forceNew":true},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_site_recovery_fabric":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"recovery_vault_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_site_recovery_hyperv_network_mapping":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"recovery_vault_id":{"type":"TypeString","required":true,"forceNew":true},"source_network_name":{"type":"TypeString","required":true,"forceNew":true},"source_system_center_virtual_machine_manager_name":{"type":"TypeString","required":true,"forceNew":true},"target_network_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_site_recovery_hyperv_replication_policy":{"schema":{"application_consistent_snapshot_frequency_in_hours":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"recovery_point_retention_in_hours":{"type":"TypeInt","required":true},"recovery_vault_id":{"type":"TypeString","required":true,"forceNew":true},"replication_interval_in_seconds":{"type":"TypeInt","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_site_recovery_hyperv_replication_policy_association":{"schema":{"hyperv_site_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"policy_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60}},"azurerm_site_recovery_network_mapping":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"recovery_vault_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source_network_id":{"type":"TypeString","required":true,"forceNew":true},"source_recovery_fabric_name":{"type":"TypeString","required":true,"forceNew":true},"target_network_id":{"type":"TypeString","required":true,"forceNew":true},"target_recovery_fabric_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_site_recovery_protection_container":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"recovery_fabric_name":{"type":"TypeString","required":true,"forceNew":true},"recovery_vault_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_site_recovery_protection_container_mapping":{"schema":{"automatic_update":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"authentication_type":{"type":"TypeString","optional":true,"default":"SystemAssignedIdentity"},"automation_account_id":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1,"minItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"recovery_fabric_name":{"type":"TypeString","required":true,"forceNew":true},"recovery_replication_policy_id":{"type":"TypeString","required":true,"forceNew":true},"recovery_source_protection_container_name":{"type":"TypeString","required":true,"forceNew":true},"recovery_target_protection_container_id":{"type":"TypeString","required":true,"forceNew":true},"recovery_vault_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_site_recovery_replicated_vm":{"schema":{"managed_disk":{"type":"TypeSet","configMode":"Auto","optional":true,"computed":true,"forceNew":true,"elem":{"schema":{"disk_id":{"type":"TypeString","required":true,"forceNew":true},"staging_storage_account_id":{"type":"TypeString","required":true,"forceNew":true},"target_disk_encryption":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"disk_encryption_key":{"type":"TypeList","configMode":"Auto","required":true,"elem":{"schema":{"secret_url":{"type":"TypeString","required":true,"forceNew":true},"vault_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"key_encryption_key":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"key_url":{"type":"TypeString","required":true,"forceNew":true},"vault_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"target_disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"target_disk_type":{"type":"TypeString","required":true,"forceNew":true},"target_replica_disk_type":{"type":"TypeString","required":true,"forceNew":true},"target_resource_group_id":{"type":"TypeString","required":true,"forceNew":true}}}},"multi_vm_group_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_interface":{"type":"TypeSet","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"failover_test_public_ip_address_id":{"type":"TypeString","optional":true,"computed":true},"failover_test_static_ip":{"type":"TypeString","optional":true,"computed":true},"failover_test_subnet_name":{"type":"TypeString","optional":true,"computed":true},"recovery_public_ip_address_id":{"type":"TypeString","optional":true},"source_network_interface_id":{"type":"TypeString","optional":true,"computed":true},"target_static_ip":{"type":"TypeString","optional":true},"target_subnet_name":{"type":"TypeString","optional":true}}}},"recovery_replication_policy_id":{"type":"TypeString","required":true,"forceNew":true},"recovery_vault_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source_recovery_fabric_name":{"type":"TypeString","required":true,"forceNew":true},"source_recovery_protection_container_name":{"type":"TypeString","required":true,"forceNew":true},"source_vm_id":{"type":"TypeString","required":true,"forceNew":true},"target_availability_set_id":{"type":"TypeString","optional":true},"target_boot_diagnostic_storage_account_id":{"type":"TypeString","optional":true},"target_capacity_reservation_group_id":{"type":"TypeString","optional":true},"target_edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"target_network_id":{"type":"TypeString","optional":true,"computed":true},"target_proximity_placement_group_id":{"type":"TypeString","optional":true},"target_recovery_fabric_id":{"type":"TypeString","required":true,"forceNew":true},"target_recovery_protection_container_id":{"type":"TypeString","required":true,"forceNew":true},"target_resource_group_id":{"type":"TypeString","required":true,"forceNew":true},"target_virtual_machine_scale_set_id":{"type":"TypeString","optional":true},"target_zone":{"type":"TypeString","optional":true,"forceNew":true},"test_network_id":{"type":"TypeString","optional":true,"computed":true},"unmanaged_disk":{"type":"TypeSet","configMode":"Auto","optional":true,"computed":true,"forceNew":true,"elem":{"schema":{"disk_uri":{"type":"TypeString","required":true,"forceNew":true},"staging_storage_account_id":{"type":"TypeString","required":true,"forceNew":true},"target_storage_account_id":{"type":"TypeString","required":true,"forceNew":true}}}}},"timeouts":{"create":180,"read":5,"delete":80,"update":80}},"azurerm_site_recovery_replication_policy":{"schema":{"application_consistent_snapshot_frequency_in_minutes":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"recovery_point_retention_in_minutes":{"type":"TypeInt","required":true},"recovery_vault_name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_site_recovery_replication_recovery_plan":{"schema":{"azure_to_azure_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"primary_edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"primary_zone":{"type":"TypeString","optional":true,"forceNew":true},"recovery_edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"recovery_zone":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"boot_recovery_group":{"type":"TypeList","required":true,"elem":{"schema":{"post_action":{"type":"TypeList","optional":true,"elem":{"schema":{"fabric_location":{"type":"TypeString","optional":true},"fail_over_directions":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"fail_over_types":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"manual_action_instruction":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"runbook_id":{"type":"TypeString","optional":true},"script_path":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}}},"pre_action":{"type":"TypeList","optional":true,"elem":{"schema":{"fabric_location":{"type":"TypeString","optional":true},"fail_over_directions":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"fail_over_types":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"manual_action_instruction":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"runbook_id":{"type":"TypeString","optional":true},"script_path":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}}},"replicated_protected_items":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}},"minItems":1},"failover_recovery_group":{"type":"TypeList","required":true,"elem":{"schema":{"post_action":{"type":"TypeList","optional":true,"elem":{"schema":{"fabric_location":{"type":"TypeString","optional":true},"fail_over_directions":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"fail_over_types":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"manual_action_instruction":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"runbook_id":{"type":"TypeString","optional":true},"script_path":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}}},"pre_action":{"type":"TypeList","optional":true,"elem":{"schema":{"fabric_location":{"type":"TypeString","optional":true},"fail_over_directions":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"fail_over_types":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"manual_action_instruction":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"runbook_id":{"type":"TypeString","optional":true},"script_path":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}}}}},"maxItems":1,"minItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"recovery_vault_id":{"type":"TypeString","required":true,"forceNew":true},"shutdown_recovery_group":{"type":"TypeList","required":true,"elem":{"schema":{"post_action":{"type":"TypeList","optional":true,"elem":{"schema":{"fabric_location":{"type":"TypeString","optional":true},"fail_over_directions":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"fail_over_types":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"manual_action_instruction":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"runbook_id":{"type":"TypeString","optional":true},"script_path":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}}},"pre_action":{"type":"TypeList","optional":true,"elem":{"schema":{"fabric_location":{"type":"TypeString","optional":true},"fail_over_directions":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"fail_over_types":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"manual_action_instruction":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"runbook_id":{"type":"TypeString","optional":true},"script_path":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}}}}},"maxItems":1,"minItems":1},"source_recovery_fabric_id":{"type":"TypeString","required":true,"forceNew":true},"target_recovery_fabric_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_site_recovery_services_vault_hyperv_site":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"recovery_vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":180}},"azurerm_site_recovery_vmware_replicated_vm":{"schema":{"appliance_name":{"type":"TypeString","required":true,"forceNew":true},"default_log_storage_account_id":{"type":"TypeString","optional":true},"default_recovery_disk_type":{"type":"TypeString","optional":true},"default_target_disk_encryption_set_id":{"type":"TypeString","optional":true},"license_type":{"type":"TypeString","optional":true,"default":"NotSpecified"},"managed_disk":{"type":"TypeList","optional":true,"elem":{"schema":{"disk_id":{"type":"TypeString","required":true},"log_storage_account_id":{"type":"TypeString","optional":true},"target_disk_encryption_set_id":{"type":"TypeString","optional":true},"target_disk_type":{"type":"TypeString","required":true}}}},"multi_vm_group_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_interface":{"type":"TypeList","optional":true,"elem":{"schema":{"is_primary":{"type":"TypeBool","required":true},"source_mac_address":{"type":"TypeString","required":true},"target_static_ip":{"type":"TypeString","optional":true},"target_subnet_name":{"type":"TypeString","optional":true},"test_subnet_name":{"type":"TypeString","optional":true}}}},"physical_server_credential_name":{"type":"TypeString","required":true,"forceNew":true},"recovery_replication_policy_id":{"type":"TypeString","required":true},"recovery_vault_id":{"type":"TypeString","required":true},"source_vm_name":{"type":"TypeString","required":true,"forceNew":true},"target_availability_set_id":{"type":"TypeString","optional":true},"target_boot_diagnostics_storage_account_id":{"type":"TypeString","optional":true},"target_network_id":{"type":"TypeString","optional":true},"target_proximity_placement_group_id":{"type":"TypeString","optional":true},"target_resource_group_id":{"type":"TypeString","required":true},"target_vm_name":{"type":"TypeString","required":true,"forceNew":true},"target_vm_size":{"type":"TypeString","optional":true},"target_zone":{"type":"TypeString","optional":true},"test_network_id":{"type":"TypeString","optional":true}},"timeouts":{"create":120,"read":5,"delete":90,"update":90}},"azurerm_site_recovery_vmware_replication_policy":{"schema":{"application_consistent_snapshot_frequency_in_minutes":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"recovery_point_retention_in_minutes":{"type":"TypeInt","required":true},"recovery_vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_site_recovery_vmware_replication_policy_association":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"policy_id":{"type":"TypeString","required":true,"forceNew":true},"recovery_vault_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_snapshot":{"schema":{"create_option":{"type":"TypeString","required":true},"disk_access_id":{"type":"TypeString","optional":true},"disk_size_gb":{"type":"TypeInt","optional":true,"computed":true},"encryption_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"disk_encryption_key":{"type":"TypeList","required":true,"elem":{"schema":{"secret_url":{"type":"TypeString","required":true},"source_vault_id":{"type":"TypeString","required":true}}},"maxItems":1},"key_encryption_key":{"type":"TypeList","optional":true,"elem":{"schema":{"key_url":{"type":"TypeString","required":true},"source_vault_id":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"incremental_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_access_policy":{"type":"TypeString","optional":true,"default":"AllowAll"},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source_resource_id":{"type":"TypeString","optional":true,"forceNew":true},"source_uri":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_id":{"type":"TypeString","optional":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"trusted_launch_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_source_control_token":{"schema":{"token":{"type":"TypeString","required":true},"token_secret":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}},"timeouts":{"create":5,"read":5,"delete":5,"update":5}},"azurerm_spatial_anchors_account":{"schema":{"account_domain":{"type":"TypeString","computed":true},"account_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_accelerator":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_spring_cloud_active_deployment":{"schema":{"deployment_name":{"type":"TypeString","required":true},"spring_cloud_app_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_api_portal":{"schema":{"api_try_out_enabled":{"type":"TypeBool","optional":true},"gateway_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"https_only_enabled":{"type":"TypeBool","optional":true},"instance_count":{"type":"TypeInt","optional":true,"default":1},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true},"sso":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","optional":true},"client_secret":{"type":"TypeString","optional":true},"issuer_uri":{"type":"TypeString","optional":true},"scope":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"url":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_api_portal_custom_domain":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_api_portal_id":{"type":"TypeString","required":true,"forceNew":true},"thumbprint":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_app":{"schema":{"addon_json":{"type":"TypeString","optional":true,"computed":true},"custom_persistent_disk":{"type":"TypeList","optional":true,"elem":{"schema":{"mount_options":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"mount_path":{"type":"TypeString","required":true},"read_only_enabled":{"type":"TypeBool","optional":true,"default":false},"share_name":{"type":"TypeString","required":true},"storage_name":{"type":"TypeString","required":true}}},"minItems":1},"fqdn":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"ingress_settings":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"backend_protocol":{"type":"TypeString","optional":true,"default":"Default"},"read_timeout_in_seconds":{"type":"TypeInt","optional":true,"default":300},"send_timeout_in_seconds":{"type":"TypeInt","optional":true,"default":60},"session_affinity":{"type":"TypeString","optional":true,"default":"None"},"session_cookie_max_age":{"type":"TypeInt","optional":true}}},"maxItems":1},"is_public":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"persistent_disk":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"mount_path":{"type":"TypeString","optional":true,"default":"/persistent"},"size_in_gb":{"type":"TypeInt","required":true}}},"maxItems":1},"public_endpoint_enabled":{"type":"TypeBool","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_name":{"type":"TypeString","required":true,"forceNew":true},"tls_enabled":{"type":"TypeBool","optional":true,"default":false},"url":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_app_cosmosdb_association":{"schema":{"api_type":{"type":"TypeString","required":true,"forceNew":true},"cosmosdb_access_key":{"type":"TypeString","required":true},"cosmosdb_account_id":{"type":"TypeString","required":true,"forceNew":true},"cosmosdb_cassandra_keyspace_name":{"type":"TypeString","optional":true},"cosmosdb_gremlin_database_name":{"type":"TypeString","optional":true},"cosmosdb_gremlin_graph_name":{"type":"TypeString","optional":true},"cosmosdb_mongo_database_name":{"type":"TypeString","optional":true},"cosmosdb_sql_database_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_app_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_app_dynamics_application_performance_monitoring":{"schema":{"agent_account_access_key":{"type":"TypeString","required":true},"agent_account_name":{"type":"TypeString","required":true},"agent_application_name":{"type":"TypeString","optional":true},"agent_node_name":{"type":"TypeString","optional":true},"agent_tier_name":{"type":"TypeString","optional":true},"agent_unique_host_id":{"type":"TypeString","optional":true},"controller_host_name":{"type":"TypeString","required":true},"controller_port":{"type":"TypeInt","optional":true},"controller_ssl_enabled":{"type":"TypeBool","optional":true},"globally_enabled":{"type":"TypeBool","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_app_mysql_association":{"schema":{"database_name":{"type":"TypeString","required":true},"mysql_server_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true},"spring_cloud_app_id":{"type":"TypeString","required":true,"forceNew":true},"username":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_app_redis_association":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"redis_access_key":{"type":"TypeString","required":true},"redis_cache_id":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_app_id":{"type":"TypeString","required":true,"forceNew":true},"ssl_enabled":{"type":"TypeBool","optional":true,"default":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_application_insights_application_performance_monitoring":{"schema":{"connection_string":{"type":"TypeString","optional":true},"globally_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"role_instance":{"type":"TypeString","optional":true},"role_name":{"type":"TypeString","optional":true},"sampling_percentage":{"type":"TypeInt","optional":true},"sampling_requests_per_second":{"type":"TypeInt","optional":true},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_application_live_view":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_spring_cloud_build_deployment":{"schema":{"addon_json":{"type":"TypeString","optional":true,"computed":true},"application_performance_monitoring_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"build_result_id":{"type":"TypeString","required":true},"environment_variables":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"instance_count":{"type":"TypeInt","optional":true,"default":1},"name":{"type":"TypeString","required":true,"forceNew":true},"quota":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"cpu":{"type":"TypeString","optional":true,"computed":true},"memory":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"spring_cloud_app_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_build_pack_binding":{"schema":{"binding_type":{"type":"TypeString","optional":true},"launch":{"type":"TypeList","optional":true,"elem":{"schema":{"properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"secrets":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_builder_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_builder":{"schema":{"build_pack_group":{"type":"TypeSet","required":true,"elem":{"schema":{"build_pack_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"name":{"type":"TypeString","required":true}}},"minItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true},"stack":{"type":"TypeList","required":true,"elem":{"schema":{"id":{"type":"TypeString","required":true},"version":{"type":"TypeString","required":true}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_certificate":{"schema":{"certificate_content":{"type":"TypeString","optional":true,"forceNew":true},"exclude_private_key":{"type":"TypeBool","optional":true,"forceNew":true},"key_vault_certificate_id":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_name":{"type":"TypeString","required":true,"forceNew":true},"thumbprint":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_spring_cloud_configuration_service":{"schema":{"generation":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"refresh_interval_in_seconds":{"type":"TypeInt","optional":true},"repository":{"type":"TypeList","optional":true,"elem":{"schema":{"ca_certificate_id":{"type":"TypeString","optional":true},"host_key":{"type":"TypeString","optional":true},"host_key_algorithm":{"type":"TypeString","optional":true},"label":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"password":{"type":"TypeString","optional":true},"patterns":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"private_key":{"type":"TypeString","optional":true},"search_paths":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"strict_host_key_checking":{"type":"TypeBool","optional":true},"uri":{"type":"TypeString","required":true},"username":{"type":"TypeString","optional":true}}}},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_connection":{"schema":{"authentication":{"type":"TypeList","required":true,"elem":{"schema":{"certificate":{"type":"TypeString","optional":true},"client_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true},"principal_id":{"type":"TypeString","optional":true},"secret":{"type":"TypeString","optional":true},"subscription_id":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"client_type":{"type":"TypeString","optional":true,"default":"none"},"name":{"type":"TypeString","required":true,"forceNew":true},"secret_store":{"type":"TypeList","optional":true,"elem":{"schema":{"key_vault_id":{"type":"TypeString","required":true}}},"maxItems":1},"spring_cloud_id":{"type":"TypeString","required":true,"forceNew":true},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true},"vnet_solution":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_container_deployment":{"schema":{"addon_json":{"type":"TypeString","optional":true,"computed":true},"application_performance_monitoring_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"arguments":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"commands":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"environment_variables":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"image":{"type":"TypeString","required":true},"instance_count":{"type":"TypeInt","optional":true,"default":1},"language_framework":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"quota":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"cpu":{"type":"TypeString","optional":true,"computed":true},"memory":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"server":{"type":"TypeString","required":true},"spring_cloud_app_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_custom_domain":{"schema":{"certificate_name":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_app_id":{"type":"TypeString","required":true,"forceNew":true},"thumbprint":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_customized_accelerator":{"schema":{"accelerator_tags":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"accelerator_type":{"type":"TypeString","optional":true,"default":"Accelerator"},"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true},"git_repository":{"type":"TypeList","required":true,"elem":{"schema":{"basic_auth":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true}}},"maxItems":1},"branch":{"type":"TypeString","optional":true},"ca_certificate_id":{"type":"TypeString","optional":true},"commit":{"type":"TypeString","optional":true},"git_tag":{"type":"TypeString","optional":true},"interval_in_seconds":{"type":"TypeInt","optional":true},"path":{"type":"TypeString","optional":true},"ssh_auth":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"host_key":{"type":"TypeString","optional":true},"host_key_algorithm":{"type":"TypeString","optional":true},"private_key":{"type":"TypeString","required":true}}},"maxItems":1},"url":{"type":"TypeString","required":true}}},"maxItems":1},"icon_url":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_accelerator_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_dev_tool_portal":{"schema":{"application_accelerator_enabled":{"type":"TypeBool","optional":true,"computed":true},"application_live_view_enabled":{"type":"TypeBool","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true},"sso":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","optional":true},"client_secret":{"type":"TypeString","optional":true},"metadata_url":{"type":"TypeString","optional":true},"scope":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_dynatrace_application_performance_monitoring":{"schema":{"api_token":{"type":"TypeString","optional":true},"api_url":{"type":"TypeString","optional":true},"connection_point":{"type":"TypeString","required":true},"environment_id":{"type":"TypeString","optional":true},"globally_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true},"tenant":{"type":"TypeString","required":true},"tenant_token":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_elastic_application_performance_monitoring":{"schema":{"application_packages":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"globally_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"server_url":{"type":"TypeString","required":true},"service_name":{"type":"TypeString","required":true},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_gateway":{"schema":{"api_metadata":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"documentation_url":{"type":"TypeString","optional":true},"server_url":{"type":"TypeString","optional":true},"title":{"type":"TypeString","optional":true},"version":{"type":"TypeString","optional":true}}},"maxItems":1},"application_performance_monitoring_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"application_performance_monitoring_types":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"client_authorization":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"verification_enabled":{"type":"TypeBool","optional":true}}},"maxItems":1},"cors":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_headers":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"allowed_methods":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"allowed_origin_patterns":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"allowed_origins":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"credentials_allowed":{"type":"TypeBool","optional":true},"exposed_headers":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"max_age_seconds":{"type":"TypeInt","optional":true}}},"maxItems":1},"environment_variables":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"https_only":{"type":"TypeBool","optional":true},"instance_count":{"type":"TypeInt","optional":true,"default":1},"local_response_cache_per_instance":{"type":"TypeList","optional":true,"elem":{"schema":{"size":{"type":"TypeString","optional":true},"time_to_live":{"type":"TypeString","optional":true}}},"maxItems":1},"local_response_cache_per_route":{"type":"TypeList","optional":true,"elem":{"schema":{"size":{"type":"TypeString","optional":true},"time_to_live":{"type":"TypeString","optional":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true},"quota":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"cpu":{"type":"TypeString","optional":true,"default":"1"},"memory":{"type":"TypeString","optional":true,"default":"2Gi"}}},"maxItems":1},"sensitive_environment_variables":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true},"sso":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","optional":true},"client_secret":{"type":"TypeString","optional":true},"issuer_uri":{"type":"TypeString","optional":true},"scope":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"url":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_gateway_custom_domain":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_gateway_id":{"type":"TypeString","required":true,"forceNew":true},"thumbprint":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_gateway_route_config":{"schema":{"filters":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"open_api":{"type":"TypeList","optional":true,"elem":{"schema":{"uri":{"type":"TypeString","optional":true}}},"maxItems":1},"predicates":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"protocol":{"type":"TypeString","required":true},"route":{"type":"TypeSet","optional":true,"elem":{"schema":{"classification_tags":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"description":{"type":"TypeString","optional":true},"filters":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"order":{"type":"TypeInt","required":true},"predicates":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"sso_validation_enabled":{"type":"TypeBool","optional":true},"title":{"type":"TypeString","optional":true},"token_relay":{"type":"TypeBool","optional":true},"uri":{"type":"TypeString","optional":true}}}},"spring_cloud_app_id":{"type":"TypeString","optional":true},"spring_cloud_gateway_id":{"type":"TypeString","required":true,"forceNew":true},"sso_validation_enabled":{"type":"TypeBool","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_java_deployment":{"schema":{"environment_variables":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"instance_count":{"type":"TypeInt","optional":true,"default":1},"jvm_options":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"quota":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"cpu":{"type":"TypeString","optional":true,"computed":true},"memory":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true,"default":"Java_8"},"spring_cloud_app_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_new_relic_application_performance_monitoring":{"schema":{"agent_enabled":{"type":"TypeBool","optional":true,"default":true},"app_name":{"type":"TypeString","required":true},"app_server_port":{"type":"TypeInt","optional":true},"audit_mode_enabled":{"type":"TypeBool","optional":true},"auto_app_naming_enabled":{"type":"TypeBool","optional":true},"auto_transaction_naming_enabled":{"type":"TypeBool","optional":true,"default":true},"custom_tracing_enabled":{"type":"TypeBool","optional":true,"default":true},"globally_enabled":{"type":"TypeBool","optional":true},"labels":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"license_key":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_service":{"schema":{"build_agent_pool_size":{"type":"TypeString","optional":true},"config_server_git_setting":{"type":"TypeList","optional":true,"elem":{"schema":{"http_basic_auth":{"type":"TypeList","optional":true,"elem":{"schema":{"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true}}},"maxItems":1},"label":{"type":"TypeString","optional":true},"repository":{"type":"TypeList","optional":true,"elem":{"schema":{"http_basic_auth":{"type":"TypeList","optional":true,"elem":{"schema":{"password":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true}}},"maxItems":1},"label":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"pattern":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"search_paths":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"ssh_auth":{"type":"TypeList","optional":true,"elem":{"schema":{"host_key":{"type":"TypeString","optional":true},"host_key_algorithm":{"type":"TypeString","optional":true},"private_key":{"type":"TypeString","required":true},"strict_host_key_checking_enabled":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"uri":{"type":"TypeString","required":true}}}},"search_paths":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"ssh_auth":{"type":"TypeList","optional":true,"elem":{"schema":{"host_key":{"type":"TypeString","optional":true},"host_key_algorithm":{"type":"TypeString","optional":true},"private_key":{"type":"TypeString","required":true},"strict_host_key_checking_enabled":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"uri":{"type":"TypeString","required":true}}},"maxItems":1},"container_registry":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"password":{"type":"TypeString","required":true},"server":{"type":"TypeString","required":true},"username":{"type":"TypeString","required":true}}}},"default_build_service":{"type":"TypeList","optional":true,"elem":{"schema":{"container_registry_name":{"type":"TypeString","optional":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"log_stream_public_endpoint_enabled":{"type":"TypeBool","optional":true},"managed_environment_id":{"type":"TypeString","optional":true},"marketplace":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"plan":{"type":"TypeString","required":true},"product":{"type":"TypeString","required":true},"publisher":{"type":"TypeString","required":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"network":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"app_network_resource_group":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"app_subnet_id":{"type":"TypeString","required":true,"forceNew":true},"cidr_ranges":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":3},"outbound_type":{"type":"TypeString","optional":true,"default":"loadBalancer","forceNew":true},"read_timeout_seconds":{"type":"TypeInt","optional":true},"service_runtime_network_resource_group":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"service_runtime_subnet_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"outbound_public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"required_network_traffic_rules":{"type":"TypeList","computed":true,"elem":{"schema":{"direction":{"type":"TypeString","computed":true},"fqdns":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"port":{"type":"TypeInt","computed":true},"protocol":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_registry_enabled":{"type":"TypeBool","optional":true},"service_registry_id":{"type":"TypeString","computed":true},"sku_name":{"type":"TypeString","optional":true,"default":"S0","forceNew":true},"sku_tier":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"trace":{"type":"TypeList","optional":true,"elem":{"schema":{"connection_string":{"type":"TypeString","optional":true},"sample_rate":{"type":"TypeFloat","optional":true,"default":10}}},"maxItems":1},"zone_redundant":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":60,"read":5,"delete":30,"update":30}},"azurerm_spring_cloud_storage":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"spring_cloud_service_id":{"type":"TypeString","required":true,"forceNew":true},"storage_account_key":{"type":"TypeString","required":true},"storage_account_name":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_ssh_public_key":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_key":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":45,"read":5,"delete":45,"update":45}},"azurerm_stack_hci_cluster":{"schema":{"automanage_configuration_id":{"type":"TypeString","optional":true},"client_id":{"type":"TypeString","optional":true,"forceNew":true},"cloud_id":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"resource_provider_object_id":{"type":"TypeString","computed":true},"service_endpoint":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stack_hci_deployment_setting":{"schema":{"arc_resource_ids":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"scale_unit":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"active_directory_organizational_unit_path":{"type":"TypeString","required":true,"forceNew":true},"bitlocker_boot_volume_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"bitlocker_data_volume_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"cluster":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"azure_service_endpoint":{"type":"TypeString","required":true,"forceNew":true},"cloud_account_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"witness_path":{"type":"TypeString","required":true,"forceNew":true},"witness_type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"credential_guard_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"domain_fqdn":{"type":"TypeString","required":true,"forceNew":true},"drift_control_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"drtm_protection_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"episodic_data_upload_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"eu_location_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"host_network":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"intent":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"adapter":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"adapter_property_override":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"jumbo_packet":{"type":"TypeString","optional":true,"forceNew":true},"network_direct":{"type":"TypeString","optional":true,"forceNew":true},"network_direct_technology":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"adapter_property_override_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"qos_policy_override":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"bandwidth_percentage_smb":{"type":"TypeString","optional":true,"forceNew":true},"priority_value8021_action_cluster":{"type":"TypeString","optional":true,"forceNew":true},"priority_value8021_action_smb":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"qos_policy_override_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"traffic_type":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"virtual_switch_configuration_override":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"enable_iov":{"type":"TypeString","optional":true,"forceNew":true},"load_balancing_algorithm":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"virtual_switch_configuration_override_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}}},"minItems":1},"storage_auto_ip_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"storage_connectivity_switchless_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"storage_network":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"network_adapter_name":{"type":"TypeString","required":true,"forceNew":true},"vlan_id":{"type":"TypeString","required":true,"forceNew":true}}},"minItems":1}}},"maxItems":1},"hvci_protection_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"infrastructure_network":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"dhcp_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"dns_server":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"},"minItems":1},"gateway":{"type":"TypeString","required":true,"forceNew":true},"ip_pool":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"ending_address":{"type":"TypeString","required":true,"forceNew":true},"starting_address":{"type":"TypeString","required":true,"forceNew":true}}},"minItems":1},"subnet_mask":{"type":"TypeString","required":true,"forceNew":true}}},"minItems":1},"name_prefix":{"type":"TypeString","required":true,"forceNew":true},"optional_service":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"custom_location":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"physical_node":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"ipv4_address":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}}},"minItems":1},"secrets_location":{"type":"TypeString","required":true,"forceNew":true},"side_channel_mitigation_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"smb_cluster_encryption_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"smb_signing_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"storage":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"configuration_mode":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"streaming_data_client_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"wdac_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true}}},"minItems":1},"stack_hci_cluster_id":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":360,"read":5,"delete":60}},"azurerm_stack_hci_logical_network":{"schema":{"custom_location_id":{"type":"TypeString","required":true,"forceNew":true},"dns_servers":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subnet":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"address_prefix":{"type":"TypeString","optional":true,"forceNew":true},"ip_allocation_method":{"type":"TypeString","required":true,"forceNew":true},"ip_pool":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"end":{"type":"TypeString","required":true,"forceNew":true},"start":{"type":"TypeString","required":true,"forceNew":true}}}},"route":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"address_prefix":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"next_hop_ip_address":{"type":"TypeString","required":true,"forceNew":true}}}},"vlan_id":{"type":"TypeInt","optional":true,"forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_switch_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stack_hci_storage_path":{"schema":{"custom_location_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"path":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_static_site":{"schema":{"api_key":{"type":"TypeString","computed":true},"app_settings":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"default_host_name":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_size":{"type":"TypeString","optional":true,"default":"Free"},"sku_tier":{"type":"TypeString","optional":true,"default":"Free"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_static_site_custom_domain":{"schema":{"domain_name":{"type":"TypeString","required":true,"forceNew":true},"static_site_id":{"type":"TypeString","required":true,"forceNew":true},"validation_token":{"type":"TypeString","computed":true},"validation_type":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_static_web_app":{"schema":{"api_key":{"type":"TypeString","computed":true},"app_settings":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"basic_auth":{"type":"TypeList","optional":true,"elem":{"schema":{"environments":{"type":"TypeString","required":true},"password":{"type":"TypeString","required":true}}},"maxItems":1},"configuration_file_changes_enabled":{"type":"TypeBool","optional":true,"default":true},"default_host_name":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"preview_environments_enabled":{"type":"TypeBool","optional":true,"default":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_size":{"type":"TypeString","optional":true,"default":"Free"},"sku_tier":{"type":"TypeString","optional":true,"default":"Free"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_static_web_app_custom_domain":{"schema":{"domain_name":{"type":"TypeString","required":true,"forceNew":true},"static_web_app_id":{"type":"TypeString","required":true,"forceNew":true},"validation_token":{"type":"TypeString","computed":true},"validation_type":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_static_web_app_function_app_registration":{"schema":{"function_app_id":{"type":"TypeString","required":true,"forceNew":true},"static_web_app_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_storage_account":{"schema":{"access_tier":{"type":"TypeString","optional":true,"computed":true},"account_kind":{"type":"TypeString","optional":true,"default":"StorageV2"},"account_replication_type":{"type":"TypeString","required":true},"account_tier":{"type":"TypeString","required":true,"forceNew":true},"allow_nested_items_to_be_public":{"type":"TypeBool","optional":true,"default":true},"allowed_copy_scope":{"type":"TypeString","optional":true},"azure_files_authentication":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"domain_guid":{"type":"TypeString","required":true},"domain_name":{"type":"TypeString","required":true},"domain_sid":{"type":"TypeString","optional":true},"forest_name":{"type":"TypeString","optional":true},"netbios_domain_name":{"type":"TypeString","optional":true},"storage_sid":{"type":"TypeString","optional":true}}},"maxItems":1},"default_share_level_permission":{"type":"TypeString","optional":true,"default":"None"},"directory_type":{"type":"TypeString","required":true}}},"maxItems":1},"blob_properties":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"change_feed_enabled":{"type":"TypeBool","optional":true,"default":false},"change_feed_retention_in_days":{"type":"TypeInt","optional":true},"container_delete_retention_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"days":{"type":"TypeInt","optional":true,"default":7}}},"maxItems":1},"cors_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_headers":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64,"minItems":1},"allowed_methods":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64},"allowed_origins":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64},"exposed_headers":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64,"minItems":1},"max_age_in_seconds":{"type":"TypeInt","required":true}}},"maxItems":5},"default_service_version":{"type":"TypeString","optional":true,"computed":true},"delete_retention_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"days":{"type":"TypeInt","optional":true,"default":7},"permanent_delete_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"last_access_time_enabled":{"type":"TypeBool","optional":true,"default":false},"restore_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"days":{"type":"TypeInt","required":true}}},"maxItems":1},"versioning_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"cross_tenant_replication_enabled":{"type":"TypeBool","optional":true,"default":false},"custom_domain":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"use_subdomain":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"customer_managed_key":{"type":"TypeList","optional":true,"elem":{"schema":{"key_vault_key_id":{"type":"TypeString","optional":true},"managed_hsm_key_id":{"type":"TypeString","optional":true},"user_assigned_identity_id":{"type":"TypeString","required":true}}},"maxItems":1},"default_to_oauth_authentication":{"type":"TypeBool","optional":true,"default":false},"dns_endpoint_type":{"type":"TypeString","optional":true,"default":"Standard","forceNew":true},"edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"https_traffic_only_enabled":{"type":"TypeBool","optional":true,"default":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"immutability_policy":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"allow_protected_append_writes":{"type":"TypeBool","required":true},"period_since_creation_in_days":{"type":"TypeInt","required":true},"state":{"type":"TypeString","required":true}}},"maxItems":1},"infrastructure_encryption_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"is_hns_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"large_file_share_enabled":{"type":"TypeBool","optional":true,"computed":true},"local_user_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"min_tls_version":{"type":"TypeString","optional":true,"default":"TLS1_2"},"name":{"type":"TypeString","required":true,"forceNew":true},"network_rules":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"bypass":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"default_action":{"type":"TypeString","required":true},"ip_rules":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"private_link_access":{"type":"TypeList","optional":true,"elem":{"schema":{"endpoint_resource_id":{"type":"TypeString","required":true},"endpoint_tenant_id":{"type":"TypeString","optional":true,"computed":true}}}},"virtual_network_subnet_ids":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"nfsv3_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"primary_access_key":{"type":"TypeString","computed":true},"primary_blob_connection_string":{"type":"TypeString","computed":true},"primary_blob_endpoint":{"type":"TypeString","computed":true},"primary_blob_host":{"type":"TypeString","computed":true},"primary_blob_internet_endpoint":{"type":"TypeString","computed":true},"primary_blob_internet_host":{"type":"TypeString","computed":true},"primary_blob_microsoft_endpoint":{"type":"TypeString","computed":true},"primary_blob_microsoft_host":{"type":"TypeString","computed":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_dfs_endpoint":{"type":"TypeString","computed":true},"primary_dfs_host":{"type":"TypeString","computed":true},"primary_dfs_internet_endpoint":{"type":"TypeString","computed":true},"primary_dfs_internet_host":{"type":"TypeString","computed":true},"primary_dfs_microsoft_endpoint":{"type":"TypeString","computed":true},"primary_dfs_microsoft_host":{"type":"TypeString","computed":true},"primary_file_endpoint":{"type":"TypeString","computed":true},"primary_file_host":{"type":"TypeString","computed":true},"primary_file_internet_endpoint":{"type":"TypeString","computed":true},"primary_file_internet_host":{"type":"TypeString","computed":true},"primary_file_microsoft_endpoint":{"type":"TypeString","computed":true},"primary_file_microsoft_host":{"type":"TypeString","computed":true},"primary_location":{"type":"TypeString","computed":true},"primary_queue_endpoint":{"type":"TypeString","computed":true},"primary_queue_host":{"type":"TypeString","computed":true},"primary_queue_microsoft_endpoint":{"type":"TypeString","computed":true},"primary_queue_microsoft_host":{"type":"TypeString","computed":true},"primary_table_endpoint":{"type":"TypeString","computed":true},"primary_table_host":{"type":"TypeString","computed":true},"primary_table_microsoft_endpoint":{"type":"TypeString","computed":true},"primary_table_microsoft_host":{"type":"TypeString","computed":true},"primary_web_endpoint":{"type":"TypeString","computed":true},"primary_web_host":{"type":"TypeString","computed":true},"primary_web_internet_endpoint":{"type":"TypeString","computed":true},"primary_web_internet_host":{"type":"TypeString","computed":true},"primary_web_microsoft_endpoint":{"type":"TypeString","computed":true},"primary_web_microsoft_host":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"queue_encryption_key_type":{"type":"TypeString","optional":true,"default":"Service","forceNew":true},"queue_properties":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"cors_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_headers":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64,"minItems":1},"allowed_methods":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64},"allowed_origins":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64},"exposed_headers":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64,"minItems":1},"max_age_in_seconds":{"type":"TypeInt","required":true}}},"maxItems":5},"hour_metrics":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","required":true},"include_apis":{"type":"TypeBool","optional":true},"retention_policy_days":{"type":"TypeInt","optional":true},"version":{"type":"TypeString","required":true}}},"maxItems":1},"logging":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"delete":{"type":"TypeBool","required":true},"read":{"type":"TypeBool","required":true},"retention_policy_days":{"type":"TypeInt","optional":true},"version":{"type":"TypeString","required":true},"write":{"type":"TypeBool","required":true}}},"maxItems":1},"minute_metrics":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","required":true},"include_apis":{"type":"TypeBool","optional":true},"retention_policy_days":{"type":"TypeInt","optional":true},"version":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"routing":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"choice":{"type":"TypeString","optional":true,"default":"MicrosoftRouting"},"publish_internet_endpoints":{"type":"TypeBool","optional":true,"default":false},"publish_microsoft_endpoints":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"sas_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"expiration_action":{"type":"TypeString","optional":true,"default":"Log"},"expiration_period":{"type":"TypeString","required":true}}},"maxItems":1,"minItems":1},"secondary_access_key":{"type":"TypeString","computed":true},"secondary_blob_connection_string":{"type":"TypeString","computed":true},"secondary_blob_endpoint":{"type":"TypeString","computed":true},"secondary_blob_host":{"type":"TypeString","computed":true},"secondary_blob_internet_endpoint":{"type":"TypeString","computed":true},"secondary_blob_internet_host":{"type":"TypeString","computed":true},"secondary_blob_microsoft_endpoint":{"type":"TypeString","computed":true},"secondary_blob_microsoft_host":{"type":"TypeString","computed":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_dfs_endpoint":{"type":"TypeString","computed":true},"secondary_dfs_host":{"type":"TypeString","computed":true},"secondary_dfs_internet_endpoint":{"type":"TypeString","computed":true},"secondary_dfs_internet_host":{"type":"TypeString","computed":true},"secondary_dfs_microsoft_endpoint":{"type":"TypeString","computed":true},"secondary_dfs_microsoft_host":{"type":"TypeString","computed":true},"secondary_file_endpoint":{"type":"TypeString","computed":true},"secondary_file_host":{"type":"TypeString","computed":true},"secondary_file_internet_endpoint":{"type":"TypeString","computed":true},"secondary_file_internet_host":{"type":"TypeString","computed":true},"secondary_file_microsoft_endpoint":{"type":"TypeString","computed":true},"secondary_file_microsoft_host":{"type":"TypeString","computed":true},"secondary_location":{"type":"TypeString","computed":true},"secondary_queue_endpoint":{"type":"TypeString","computed":true},"secondary_queue_host":{"type":"TypeString","computed":true},"secondary_queue_microsoft_endpoint":{"type":"TypeString","computed":true},"secondary_queue_microsoft_host":{"type":"TypeString","computed":true},"secondary_table_endpoint":{"type":"TypeString","computed":true},"secondary_table_host":{"type":"TypeString","computed":true},"secondary_table_microsoft_endpoint":{"type":"TypeString","computed":true},"secondary_table_microsoft_host":{"type":"TypeString","computed":true},"secondary_web_endpoint":{"type":"TypeString","computed":true},"secondary_web_host":{"type":"TypeString","computed":true},"secondary_web_internet_endpoint":{"type":"TypeString","computed":true},"secondary_web_internet_host":{"type":"TypeString","computed":true},"secondary_web_microsoft_endpoint":{"type":"TypeString","computed":true},"secondary_web_microsoft_host":{"type":"TypeString","computed":true},"sftp_enabled":{"type":"TypeBool","optional":true,"default":false},"share_properties":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"cors_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_headers":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64,"minItems":1},"allowed_methods":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64},"allowed_origins":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64},"exposed_headers":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"maxItems":64,"minItems":1},"max_age_in_seconds":{"type":"TypeInt","required":true}}},"maxItems":5},"retention_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"days":{"type":"TypeInt","optional":true,"default":7}}},"maxItems":1},"smb":{"type":"TypeList","optional":true,"elem":{"schema":{"authentication_types":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"channel_encryption_type":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"kerberos_ticket_encryption_type":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"multichannel_enabled":{"type":"TypeBool","optional":true,"default":false},"versions":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}},"maxItems":1},"shared_access_key_enabled":{"type":"TypeBool","optional":true,"default":true},"static_website":{"type":"TypeList","optional":true,"elem":{"schema":{"error_404_document":{"type":"TypeString","optional":true},"index_document":{"type":"TypeString","optional":true}}},"maxItems":1},"table_encryption_key_type":{"type":"TypeString","optional":true,"default":"Service","forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_storage_account_customer_managed_key":{"schema":{"federated_identity_client_id":{"type":"TypeString","optional":true},"key_name":{"type":"TypeString","required":true},"key_vault_id":{"type":"TypeString","optional":true},"key_vault_uri":{"type":"TypeString","optional":true,"computed":true},"key_version":{"type":"TypeString","optional":true},"managed_hsm_key_id":{"type":"TypeString","optional":true},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true},"user_assigned_identity_id":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_account_local_user":{"schema":{"home_directory":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","computed":true},"permission_scope":{"type":"TypeList","optional":true,"elem":{"schema":{"permissions":{"type":"TypeList","required":true,"elem":{"schema":{"create":{"type":"TypeBool","optional":true,"default":false},"delete":{"type":"TypeBool","optional":true,"default":false},"list":{"type":"TypeBool","optional":true,"default":false},"read":{"type":"TypeBool","optional":true,"default":false},"write":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"resource_name":{"type":"TypeString","required":true},"service":{"type":"TypeString","required":true}}}},"sid":{"type":"TypeString","computed":true},"ssh_authorized_key":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"key":{"type":"TypeString","required":true}}}},"ssh_key_enabled":{"type":"TypeBool","optional":true,"default":false},"ssh_password_enabled":{"type":"TypeBool","optional":true,"default":false},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_account_network_rules":{"schema":{"bypass":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"default_action":{"type":"TypeString","required":true},"ip_rules":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"private_link_access":{"type":"TypeList","optional":true,"elem":{"schema":{"endpoint_resource_id":{"type":"TypeString","required":true},"endpoint_tenant_id":{"type":"TypeString","optional":true,"computed":true}}}},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_subnet_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_storage_blob":{"schema":{"access_tier":{"type":"TypeString","optional":true,"computed":true},"cache_control":{"type":"TypeString","optional":true},"content_md5":{"type":"TypeString","optional":true,"forceNew":true},"content_type":{"type":"TypeString","optional":true,"default":"application/octet-stream"},"encryption_scope":{"type":"TypeString","optional":true,"forceNew":true},"metadata":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"parallelism":{"type":"TypeInt","optional":true,"default":8,"forceNew":true},"size":{"type":"TypeInt","optional":true,"default":0,"forceNew":true},"source":{"type":"TypeString","optional":true,"forceNew":true},"source_content":{"type":"TypeString","optional":true},"source_uri":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_name":{"type":"TypeString","required":true,"forceNew":true},"storage_container_name":{"type":"TypeString","required":true,"forceNew":true},"type":{"type":"TypeString","required":true,"forceNew":true},"url":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_blob_inventory_policy":{"schema":{"rules":{"type":"TypeSet","required":true,"elem":{"schema":{"filter":{"type":"TypeList","optional":true,"elem":{"schema":{"blob_types":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"exclude_prefixes":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":10},"include_blob_versions":{"type":"TypeBool","optional":true,"default":false},"include_deleted":{"type":"TypeBool","optional":true,"default":false},"include_snapshots":{"type":"TypeBool","optional":true,"default":false},"prefix_match":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":10}}},"maxItems":1},"format":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"schedule":{"type":"TypeString","required":true},"schema_fields":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"scope":{"type":"TypeString","required":true},"storage_container_name":{"type":"TypeString","required":true}}}},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_container":{"schema":{"container_access_type":{"type":"TypeString","optional":true,"default":"private"},"default_encryption_scope":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"encryption_scope_override_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"has_immutability_policy":{"type":"TypeBool","computed":true},"has_legal_hold":{"type":"TypeBool","computed":true},"metadata":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_manager_id":{"type":"TypeString","computed":true},"storage_account_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_container_immutability_policy":{"schema":{"immutability_period_in_days":{"type":"TypeInt","required":true},"locked":{"type":"TypeBool","optional":true,"default":false},"protected_append_writes_all_enabled":{"type":"TypeBool","optional":true,"default":false},"protected_append_writes_enabled":{"type":"TypeBool","optional":true,"default":false},"storage_container_resource_manager_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":10,"read":5,"delete":10,"update":10}},"azurerm_storage_data_lake_gen2_filesystem":{"schema":{"ace":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"id":{"type":"TypeString","optional":true},"permissions":{"type":"TypeString","required":true},"scope":{"type":"TypeString","optional":true,"default":"access"},"type":{"type":"TypeString","required":true}}}},"default_encryption_scope":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"group":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"owner":{"type":"TypeString","optional":true,"computed":true},"properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_data_lake_gen2_path":{"schema":{"ace":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"id":{"type":"TypeString","optional":true},"permissions":{"type":"TypeString","required":true},"scope":{"type":"TypeString","optional":true,"default":"access"},"type":{"type":"TypeString","required":true}}}},"filesystem_name":{"type":"TypeString","required":true,"forceNew":true},"group":{"type":"TypeString","optional":true,"computed":true},"owner":{"type":"TypeString","optional":true,"computed":true},"path":{"type":"TypeString","required":true,"forceNew":true},"resource":{"type":"TypeString","required":true,"forceNew":true},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_encryption_scope":{"schema":{"infrastructure_encryption_required":{"type":"TypeBool","optional":true,"forceNew":true},"key_vault_key_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"source":{"type":"TypeString","required":true},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_management_policy":{"schema":{"rule":{"type":"TypeList","optional":true,"elem":{"schema":{"actions":{"type":"TypeList","required":true,"elem":{"schema":{"base_blob":{"type":"TypeList","optional":true,"elem":{"schema":{"auto_tier_to_hot_from_cool_enabled":{"type":"TypeBool","optional":true},"delete_after_days_since_creation_greater_than":{"type":"TypeInt","optional":true,"default":-1},"delete_after_days_since_last_access_time_greater_than":{"type":"TypeInt","optional":true,"default":-1},"delete_after_days_since_modification_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_archive_after_days_since_creation_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_archive_after_days_since_last_access_time_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_archive_after_days_since_last_tier_change_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_archive_after_days_since_modification_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_cold_after_days_since_creation_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_cold_after_days_since_last_access_time_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_cold_after_days_since_modification_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_cool_after_days_since_creation_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_cool_after_days_since_last_access_time_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_cool_after_days_since_modification_greater_than":{"type":"TypeInt","optional":true,"default":-1}}},"maxItems":1},"snapshot":{"type":"TypeList","optional":true,"elem":{"schema":{"change_tier_to_archive_after_days_since_creation":{"type":"TypeInt","optional":true,"default":-1},"change_tier_to_cool_after_days_since_creation":{"type":"TypeInt","optional":true,"default":-1},"delete_after_days_since_creation_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_archive_after_days_since_last_tier_change_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_cold_after_days_since_creation_greater_than":{"type":"TypeInt","optional":true,"default":-1}}},"maxItems":1},"version":{"type":"TypeList","optional":true,"elem":{"schema":{"change_tier_to_archive_after_days_since_creation":{"type":"TypeInt","optional":true,"default":-1},"change_tier_to_cool_after_days_since_creation":{"type":"TypeInt","optional":true,"default":-1},"delete_after_days_since_creation":{"type":"TypeInt","optional":true,"default":-1},"tier_to_archive_after_days_since_last_tier_change_greater_than":{"type":"TypeInt","optional":true,"default":-1},"tier_to_cold_after_days_since_creation_greater_than":{"type":"TypeInt","optional":true,"default":-1}}},"maxItems":1}}},"maxItems":1},"enabled":{"type":"TypeBool","required":true},"filters":{"type":"TypeList","required":true,"elem":{"schema":{"blob_types":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"match_blob_index_tag":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"operation":{"type":"TypeString","optional":true,"default":"=="},"value":{"type":"TypeString","required":true}}}},"prefix_match":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"name":{"type":"TypeString","required":true}}},"minItems":1},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_mover":{"schema":{"description":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_mover_agent":{"schema":{"arc_virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true},"arc_virtual_machine_uuid":{"type":"TypeString","required":true,"forceNew":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"storage_mover_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_mover_job_definition":{"schema":{"agent_name":{"type":"TypeString","optional":true},"copy_mode":{"type":"TypeString","required":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"source_name":{"type":"TypeString","required":true,"forceNew":true},"source_sub_path":{"type":"TypeString","optional":true,"forceNew":true},"storage_mover_project_id":{"type":"TypeString","required":true,"forceNew":true},"target_name":{"type":"TypeString","required":true,"forceNew":true},"target_sub_path":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_mover_project":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"storage_mover_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_mover_source_endpoint":{"schema":{"description":{"type":"TypeString","optional":true},"export":{"type":"TypeString","optional":true,"forceNew":true},"host":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"nfs_version":{"type":"TypeString","optional":true,"default":"NFSauto","forceNew":true},"storage_mover_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_mover_target_endpoint":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true},"storage_container_name":{"type":"TypeString","required":true,"forceNew":true},"storage_mover_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_object_replication":{"schema":{"destination_object_replication_id":{"type":"TypeString","computed":true},"destination_storage_account_id":{"type":"TypeString","required":true,"forceNew":true},"rules":{"type":"TypeSet","required":true,"elem":{"schema":{"copy_blobs_created_after":{"type":"TypeString","optional":true,"default":"OnlyNewObjects"},"destination_container_name":{"type":"TypeString","required":true},"filter_out_blobs_with_prefix":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"source_container_name":{"type":"TypeString","required":true}}}},"source_object_replication_id":{"type":"TypeString","computed":true},"source_storage_account_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_queue":{"schema":{"metadata":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_manager_id":{"type":"TypeString","computed":true},"storage_account_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_share":{"schema":{"access_tier":{"type":"TypeString","optional":true,"computed":true},"acl":{"type":"TypeSet","optional":true,"elem":{"schema":{"access_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"expiry":{"type":"TypeString","optional":true},"permissions":{"type":"TypeString","required":true},"start":{"type":"TypeString","optional":true}}}},"id":{"type":"TypeString","required":true}}}},"enabled_protocol":{"type":"TypeString","optional":true,"default":"SMB","forceNew":true},"metadata":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"quota":{"type":"TypeInt","required":true},"resource_manager_id":{"type":"TypeString","computed":true},"storage_account_name":{"type":"TypeString","required":true,"forceNew":true},"url":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_share_directory":{"schema":{"metadata":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"storage_share_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_share_file":{"schema":{"content_disposition":{"type":"TypeString","optional":true},"content_encoding":{"type":"TypeString","optional":true},"content_length":{"type":"TypeInt","computed":true},"content_md5":{"type":"TypeString","optional":true,"forceNew":true},"content_type":{"type":"TypeString","optional":true,"default":"application/octet-stream"},"metadata":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"path":{"type":"TypeString","optional":true,"default":"","forceNew":true},"source":{"type":"TypeString","optional":true,"forceNew":true},"storage_share_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_sync":{"schema":{"incoming_traffic_policy":{"type":"TypeString","optional":true,"default":"AllowAllTraffic"},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"registered_servers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_sync_cloud_endpoint":{"schema":{"file_share_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"storage_account_id":{"type":"TypeString","required":true,"forceNew":true},"storage_account_tenant_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"storage_sync_group_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":45,"read":5,"delete":45}},"azurerm_storage_sync_group":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"storage_sync_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_storage_sync_server_endpoint":{"schema":{"cloud_tiering_enabled":{"type":"TypeBool","optional":true,"default":false},"initial_download_policy":{"type":"TypeString","optional":true,"default":"NamespaceThenModifiedFiles","forceNew":true},"local_cache_mode":{"type":"TypeString","optional":true,"default":"UpdateLocallyCachedFiles"},"name":{"type":"TypeString","required":true,"forceNew":true},"registered_server_id":{"type":"TypeString","required":true,"forceNew":true},"server_local_path":{"type":"TypeString","required":true,"forceNew":true},"storage_sync_group_id":{"type":"TypeString","required":true,"forceNew":true},"tier_files_older_than_days":{"type":"TypeInt","optional":true},"volume_free_space_percent":{"type":"TypeInt","optional":true,"default":20}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_table":{"schema":{"acl":{"type":"TypeSet","optional":true,"elem":{"schema":{"access_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"expiry":{"type":"TypeString","required":true},"permissions":{"type":"TypeString","required":true},"start":{"type":"TypeString","required":true}}}},"id":{"type":"TypeString","required":true}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"storage_account_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_storage_table_entity":{"schema":{"entity":{"type":"TypeMap","required":true,"elem":{"type":"TypeString"}},"partition_key":{"type":"TypeString","required":true,"forceNew":true},"row_key":{"type":"TypeString","required":true,"forceNew":true},"storage_table_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_cluster":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"streaming_capacity":{"type":"TypeInt","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_stream_analytics_function_javascript_uda":{"schema":{"input":{"type":"TypeList","required":true,"elem":{"schema":{"configuration_parameter":{"type":"TypeBool","optional":true,"default":false},"type":{"type":"TypeString","required":true}}},"minItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"output":{"type":"TypeList","required":true,"elem":{"schema":{"type":{"type":"TypeString","required":true}}},"maxItems":1},"script":{"type":"TypeString","required":true},"stream_analytics_job_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_function_javascript_udf":{"schema":{"input":{"type":"TypeList","required":true,"elem":{"schema":{"configuration_parameter":{"type":"TypeBool","optional":true,"default":false},"type":{"type":"TypeString","required":true}}},"minItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"output":{"type":"TypeList","required":true,"elem":{"schema":{"type":{"type":"TypeString","required":true}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"script":{"type":"TypeString","required":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_job":{"schema":{"compatibility_level":{"type":"TypeString","optional":true,"computed":true},"content_storage_policy":{"type":"TypeString","optional":true,"default":"SystemAccount"},"data_locale":{"type":"TypeString","optional":true,"default":"en-US"},"events_late_arrival_max_delay_in_seconds":{"type":"TypeInt","optional":true,"default":5},"events_out_of_order_max_delay_in_seconds":{"type":"TypeInt","optional":true,"default":0},"events_out_of_order_policy":{"type":"TypeString","optional":true,"default":"Adjust"},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"job_id":{"type":"TypeString","computed":true},"job_storage_account":{"type":"TypeList","optional":true,"elem":{"schema":{"account_key":{"type":"TypeString","required":true},"account_name":{"type":"TypeString","required":true},"authentication_mode":{"type":"TypeString","optional":true,"default":"ConnectionString"}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"output_error_policy":{"type":"TypeString","optional":true,"default":"Drop"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","optional":true,"default":"Standard"},"stream_analytics_cluster_id":{"type":"TypeString","optional":true},"streaming_units":{"type":"TypeInt","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"transformation_query":{"type":"TypeString","required":true},"type":{"type":"TypeString","optional":true,"default":"Cloud","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_job_schedule":{"schema":{"last_output_time":{"type":"TypeString","computed":true},"start_mode":{"type":"TypeString","required":true},"start_time":{"type":"TypeString","optional":true,"computed":true},"stream_analytics_job_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_managed_private_endpoint":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"stream_analytics_cluster_name":{"type":"TypeString","required":true,"forceNew":true},"subresource_name":{"type":"TypeString","required":true,"forceNew":true},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":5}},"azurerm_stream_analytics_output_blob":{"schema":{"authentication_mode":{"type":"TypeString","optional":true,"default":"ConnectionString"},"batch_max_wait_time":{"type":"TypeString","optional":true},"batch_min_rows":{"type":"TypeInt","optional":true},"blob_write_mode":{"type":"TypeString","optional":true,"default":"Append"},"date_format":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"path_pattern":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"serialization":{"type":"TypeList","required":true,"elem":{"schema":{"encoding":{"type":"TypeString","optional":true},"field_delimiter":{"type":"TypeString","optional":true},"format":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"storage_account_key":{"type":"TypeString","optional":true},"storage_account_name":{"type":"TypeString","required":true},"storage_container_name":{"type":"TypeString","required":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true},"time_format":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_output_cosmosdb":{"schema":{"container_name":{"type":"TypeString","required":true},"cosmosdb_account_key":{"type":"TypeString","required":true},"cosmosdb_sql_database_id":{"type":"TypeString","required":true},"document_id":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"partition_key":{"type":"TypeString","optional":true},"stream_analytics_job_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_output_eventhub":{"schema":{"authentication_mode":{"type":"TypeString","optional":true,"default":"ConnectionString"},"eventhub_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"partition_key":{"type":"TypeString","optional":true},"property_columns":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"serialization":{"type":"TypeList","required":true,"elem":{"schema":{"encoding":{"type":"TypeString","optional":true},"field_delimiter":{"type":"TypeString","optional":true},"format":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"servicebus_namespace":{"type":"TypeString","required":true},"shared_access_policy_key":{"type":"TypeString","optional":true},"shared_access_policy_name":{"type":"TypeString","optional":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_output_function":{"schema":{"api_key":{"type":"TypeString","required":true},"batch_max_count":{"type":"TypeInt","optional":true,"default":100},"batch_max_in_bytes":{"type":"TypeInt","optional":true,"default":262144},"function_app":{"type":"TypeString","required":true},"function_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_output_mssql":{"schema":{"authentication_mode":{"type":"TypeString","optional":true,"default":"ConnectionString"},"database":{"type":"TypeString","required":true,"forceNew":true},"max_batch_count":{"type":"TypeFloat","optional":true,"default":10000},"max_writer_count":{"type":"TypeFloat","optional":true,"default":1},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true},"table":{"type":"TypeString","required":true,"forceNew":true},"user":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_output_powerbi":{"schema":{"dataset":{"type":"TypeString","required":true},"group_id":{"type":"TypeString","required":true},"group_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"stream_analytics_job_id":{"type":"TypeString","required":true,"forceNew":true},"table":{"type":"TypeString","required":true},"token_user_display_name":{"type":"TypeString","optional":true},"token_user_principal_name":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_output_servicebus_queue":{"schema":{"authentication_mode":{"type":"TypeString","optional":true,"default":"ConnectionString"},"name":{"type":"TypeString","required":true,"forceNew":true},"property_columns":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"queue_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"serialization":{"type":"TypeList","required":true,"elem":{"schema":{"encoding":{"type":"TypeString","optional":true},"field_delimiter":{"type":"TypeString","optional":true},"format":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"servicebus_namespace":{"type":"TypeString","required":true},"shared_access_policy_key":{"type":"TypeString","optional":true},"shared_access_policy_name":{"type":"TypeString","optional":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true},"system_property_columns":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_output_servicebus_topic":{"schema":{"authentication_mode":{"type":"TypeString","optional":true,"default":"ConnectionString"},"name":{"type":"TypeString","required":true,"forceNew":true},"property_columns":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"serialization":{"type":"TypeList","required":true,"elem":{"schema":{"encoding":{"type":"TypeString","optional":true},"field_delimiter":{"type":"TypeString","optional":true},"format":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"servicebus_namespace":{"type":"TypeString","required":true},"shared_access_policy_key":{"type":"TypeString","optional":true},"shared_access_policy_name":{"type":"TypeString","optional":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true},"system_property_columns":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"topic_name":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_output_synapse":{"schema":{"database":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true,"forceNew":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true},"table":{"type":"TypeString","required":true,"forceNew":true},"user":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_output_table":{"schema":{"batch_size":{"type":"TypeInt","required":true},"columns_to_remove":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"partition_key":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"row_key":{"type":"TypeString","required":true},"storage_account_key":{"type":"TypeString","required":true},"storage_account_name":{"type":"TypeString","required":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true},"table":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_reference_input_blob":{"schema":{"authentication_mode":{"type":"TypeString","optional":true,"default":"ConnectionString"},"date_format":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"path_pattern":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"serialization":{"type":"TypeList","required":true,"elem":{"schema":{"encoding":{"type":"TypeString","optional":true},"field_delimiter":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"storage_account_key":{"type":"TypeString","optional":true},"storage_account_name":{"type":"TypeString","required":true},"storage_container_name":{"type":"TypeString","required":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true},"time_format":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_reference_input_mssql":{"schema":{"database":{"type":"TypeString","required":true},"delta_snapshot_query":{"type":"TypeString","optional":true},"full_snapshot_query":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true},"refresh_interval_duration":{"type":"TypeString","optional":true},"refresh_type":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"server":{"type":"TypeString","required":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true},"table":{"type":"TypeString","optional":true},"username":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_stream_input_blob":{"schema":{"date_format":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"path_pattern":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"serialization":{"type":"TypeList","required":true,"elem":{"schema":{"encoding":{"type":"TypeString","optional":true},"field_delimiter":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"storage_account_key":{"type":"TypeString","required":true},"storage_account_name":{"type":"TypeString","required":true},"storage_container_name":{"type":"TypeString","required":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true},"time_format":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_stream_input_eventhub":{"schema":{"authentication_mode":{"type":"TypeString","optional":true,"default":"ConnectionString"},"eventhub_consumer_group_name":{"type":"TypeString","optional":true},"eventhub_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"partition_key":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"serialization":{"type":"TypeList","required":true,"elem":{"schema":{"encoding":{"type":"TypeString","optional":true},"field_delimiter":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"servicebus_namespace":{"type":"TypeString","required":true},"shared_access_policy_key":{"type":"TypeString","optional":true},"shared_access_policy_name":{"type":"TypeString","optional":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_stream_input_eventhub_v2":{"schema":{"authentication_mode":{"type":"TypeString","optional":true,"default":"ConnectionString"},"eventhub_consumer_group_name":{"type":"TypeString","optional":true},"eventhub_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"partition_key":{"type":"TypeString","optional":true},"serialization":{"type":"TypeList","required":true,"elem":{"schema":{"encoding":{"type":"TypeString","optional":true},"field_delimiter":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"servicebus_namespace":{"type":"TypeString","required":true},"shared_access_policy_key":{"type":"TypeString","optional":true},"shared_access_policy_name":{"type":"TypeString","optional":true},"stream_analytics_job_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_stream_analytics_stream_input_iothub":{"schema":{"endpoint":{"type":"TypeString","required":true},"eventhub_consumer_group_name":{"type":"TypeString","required":true},"iothub_namespace":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"serialization":{"type":"TypeList","required":true,"elem":{"schema":{"encoding":{"type":"TypeString","optional":true},"field_delimiter":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"shared_access_policy_key":{"type":"TypeString","required":true,"forceNew":true},"shared_access_policy_name":{"type":"TypeString","required":true},"stream_analytics_job_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_subnet":{"schema":{"address_prefixes":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"default_outbound_access_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"delegation":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"service_delegation":{"type":"TypeList","required":true,"elem":{"schema":{"actions":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true}}},"maxItems":1}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"private_endpoint_network_policies":{"type":"TypeString","optional":true,"default":"Disabled"},"private_link_service_network_policies_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_endpoint_policy_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"service_endpoints":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"virtual_network_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_subnet_nat_gateway_association":{"schema":{"nat_gateway_id":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_subnet_network_security_group_association":{"schema":{"network_security_group_id":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_subnet_route_table_association":{"schema":{"route_table_id":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_subnet_service_endpoint_storage_policy":{"schema":{"definition":{"type":"TypeList","optional":true,"elem":{"schema":{"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"service":{"type":"TypeString","optional":true,"default":"Microsoft.Storage"},"service_resources":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}},"maxItems":2,"minItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_subscription":{"schema":{"alias":{"type":"TypeString","optional":true,"description":"The Alias Name of the subscription. If omitted a new UUID will be generated for this property.","computed":true,"forceNew":true},"billing_scope_id":{"type":"TypeString","optional":true},"subscription_id":{"type":"TypeString","optional":true,"description":"The GUID of the Subscription.","computed":true,"forceNew":true},"subscription_name":{"type":"TypeString","required":true,"description":"The Display Name for the Subscription."},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","description":"The Tenant ID to which the subscription belongs","computed":true},"workload":{"type":"TypeString","optional":true,"description":"The workload type for the Subscription. Possible values are `Production` (default) and `DevTest`.","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_subscription_cost_management_export":{"schema":{"active":{"type":"TypeBool","optional":true,"default":true},"export_data_options":{"type":"TypeList","required":true,"elem":{"schema":{"time_frame":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"export_data_storage_location":{"type":"TypeList","required":true,"elem":{"schema":{"container_id":{"type":"TypeString","required":true,"forceNew":true},"root_folder_path":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"recurrence_period_end_date":{"type":"TypeString","required":true},"recurrence_period_start_date":{"type":"TypeString","required":true},"recurrence_type":{"type":"TypeString","required":true},"subscription_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_subscription_cost_management_view":{"schema":{"accumulated":{"type":"TypeBool","required":true,"forceNew":true},"chart_type":{"type":"TypeString","required":true},"dataset":{"type":"TypeList","required":true,"elem":{"schema":{"aggregation":{"type":"TypeSet","required":true,"elem":{"schema":{"column_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true}}}},"granularity":{"type":"TypeString","required":true},"grouping":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"sorting":{"type":"TypeList","optional":true,"elem":{"schema":{"direction":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}}}}}},"maxItems":1},"display_name":{"type":"TypeString","required":true},"kpi":{"type":"TypeList","optional":true,"elem":{"schema":{"type":{"type":"TypeString","required":true}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"pivot":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"report_type":{"type":"TypeString","required":true},"subscription_id":{"type":"TypeString","required":true,"forceNew":true},"timeframe":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_subscription_policy_assignment":{"schema":{"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true},"enforce":{"type":"TypeBool","optional":true,"default":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","optional":true,"forceNew":true},"metadata":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"non_compliance_message":{"type":"TypeList","optional":true,"elem":{"schema":{"content":{"type":"TypeString","required":true},"policy_definition_reference_id":{"type":"TypeString","optional":true}}}},"not_scopes":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"overrides":{"type":"TypeList","optional":true,"elem":{"schema":{"selectors":{"type":"TypeList","optional":true,"elem":{"schema":{"in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"kind":{"type":"TypeString","computed":true},"not_in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"value":{"type":"TypeString","required":true}}}},"parameters":{"type":"TypeString","optional":true},"policy_definition_id":{"type":"TypeString","required":true,"forceNew":true},"resource_selectors":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","optional":true},"selectors":{"type":"TypeList","required":true,"elem":{"schema":{"in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"kind":{"type":"TypeString","required":true},"not_in":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}}}}},"subscription_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_subscription_policy_exemption":{"schema":{"description":{"type":"TypeString","optional":true},"display_name":{"type":"TypeString","optional":true},"exemption_category":{"type":"TypeString","required":true},"expires_on":{"type":"TypeString","optional":true},"metadata":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"policy_assignment_id":{"type":"TypeString","required":true,"forceNew":true},"policy_definition_reference_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"subscription_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_subscription_policy_remediation":{"schema":{"failure_percentage":{"type":"TypeFloat","optional":true},"location_filters":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"parallel_deployments":{"type":"TypeInt","optional":true},"policy_assignment_id":{"type":"TypeString","required":true},"policy_definition_reference_id":{"type":"TypeString","optional":true},"resource_count":{"type":"TypeInt","optional":true},"resource_discovery_mode":{"type":"TypeString","optional":true,"default":"ExistingNonCompliant"},"subscription_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_subscription_template_deployment":{"schema":{"debug_level":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"output_content":{"type":"TypeString","computed":true},"parameters_content":{"type":"TypeString","optional":true,"computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"template_content":{"type":"TypeString","optional":true,"computed":true},"template_spec_version_id":{"type":"TypeString","optional":true}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_synapse_firewall_rule":{"schema":{"end_ip_address":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"start_ip_address":{"type":"TypeString","required":true},"synapse_workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_integration_runtime_azure":{"schema":{"compute_type":{"type":"TypeString","optional":true,"default":"General"},"core_count":{"type":"TypeInt","optional":true,"default":8},"description":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"synapse_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"time_to_live_min":{"type":"TypeInt","optional":true,"default":0}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_integration_runtime_self_hosted":{"schema":{"authorization_key_primary":{"type":"TypeString","computed":true},"authorization_key_secondary":{"type":"TypeString","computed":true},"description":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"synapse_workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_linked_service":{"schema":{"additional_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"annotations":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"description":{"type":"TypeString","optional":true},"integration_runtime":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"parameters":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"synapse_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"type":{"type":"TypeString","required":true,"forceNew":true},"type_properties_json":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_managed_private_endpoint":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"subresource_name":{"type":"TypeString","required":true,"forceNew":true},"synapse_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_synapse_private_link_hub":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_role_assignment":{"schema":{"principal_id":{"type":"TypeString","required":true,"forceNew":true},"principal_type":{"type":"TypeString","optional":true,"forceNew":true},"role_name":{"type":"TypeString","required":true,"forceNew":true},"synapse_spark_pool_id":{"type":"TypeString","optional":true,"forceNew":true},"synapse_workspace_id":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_synapse_spark_pool":{"schema":{"auto_pause":{"type":"TypeList","optional":true,"elem":{"schema":{"delay_in_minutes":{"type":"TypeInt","required":true}}},"maxItems":1},"auto_scale":{"type":"TypeList","optional":true,"elem":{"schema":{"max_node_count":{"type":"TypeInt","required":true},"min_node_count":{"type":"TypeInt","required":true}}},"maxItems":1},"cache_size":{"type":"TypeInt","optional":true},"compute_isolation_enabled":{"type":"TypeBool","optional":true,"default":false},"dynamic_executor_allocation_enabled":{"type":"TypeBool","optional":true,"default":false},"library_requirement":{"type":"TypeList","optional":true,"elem":{"schema":{"content":{"type":"TypeString","required":true},"filename":{"type":"TypeString","required":true}}},"maxItems":1},"max_executors":{"type":"TypeInt","optional":true},"min_executors":{"type":"TypeInt","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"node_count":{"type":"TypeInt","optional":true,"computed":true},"node_size":{"type":"TypeString","required":true},"node_size_family":{"type":"TypeString","required":true},"session_level_packages_enabled":{"type":"TypeBool","optional":true,"default":false},"spark_config":{"type":"TypeList","optional":true,"elem":{"schema":{"content":{"type":"TypeString","required":true},"filename":{"type":"TypeString","required":true}}},"maxItems":1},"spark_events_folder":{"type":"TypeString","optional":true,"default":"/events"},"spark_log_folder":{"type":"TypeString","optional":true,"default":"/logs"},"spark_version":{"type":"TypeString","required":true},"synapse_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_sql_pool":{"schema":{"collation":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"create_mode":{"type":"TypeString","optional":true,"default":"Default","forceNew":true},"data_encrypted":{"type":"TypeBool","optional":true},"geo_backup_policy_enabled":{"type":"TypeBool","optional":true,"default":true},"name":{"type":"TypeString","required":true,"forceNew":true},"recovery_database_id":{"type":"TypeString","optional":true,"forceNew":true},"restore":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"point_in_time":{"type":"TypeString","required":true,"forceNew":true},"source_database_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"sku_name":{"type":"TypeString","required":true},"storage_account_type":{"type":"TypeString","required":true,"forceNew":true},"synapse_workspace_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_sql_pool_extended_auditing_policy":{"schema":{"log_monitoring_enabled":{"type":"TypeBool","optional":true,"default":true},"retention_in_days":{"type":"TypeInt","optional":true,"default":0},"sql_pool_id":{"type":"TypeString","required":true,"forceNew":true},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_account_access_key_is_secondary":{"type":"TypeBool","optional":true,"default":false},"storage_endpoint":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_sql_pool_security_alert_policy":{"schema":{"disabled_alerts":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"email_account_admins_enabled":{"type":"TypeBool","optional":true,"default":false},"email_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"policy_state":{"type":"TypeString","required":true},"retention_days":{"type":"TypeInt","optional":true,"default":0},"sql_pool_id":{"type":"TypeString","required":true,"forceNew":true},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_endpoint":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_sql_pool_vulnerability_assessment":{"schema":{"recurring_scans":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"email_subscription_admins_enabled":{"type":"TypeBool","optional":true,"default":true},"emails":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"sql_pool_security_alert_policy_id":{"type":"TypeString","required":true,"forceNew":true},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_container_path":{"type":"TypeString","required":true},"storage_container_sas_key":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_sql_pool_vulnerability_assessment_baseline":{"schema":{"baseline":{"type":"TypeList","optional":true,"elem":{"schema":{"result":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}},"name":{"type":"TypeString","required":true},"rule_name":{"type":"TypeString","required":true},"sql_pool_vulnerability_assessment_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_sql_pool_workload_classifier":{"schema":{"context":{"type":"TypeString","optional":true},"end_time":{"type":"TypeString","optional":true},"importance":{"type":"TypeString","optional":true},"label":{"type":"TypeString","optional":true},"member_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"start_time":{"type":"TypeString","optional":true},"workload_group_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_sql_pool_workload_group":{"schema":{"importance":{"type":"TypeString","optional":true,"default":"normal"},"max_resource_percent":{"type":"TypeInt","required":true},"max_resource_percent_per_request":{"type":"TypeFloat","optional":true,"default":3},"min_resource_percent":{"type":"TypeInt","required":true},"min_resource_percent_per_request":{"type":"TypeFloat","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"query_execution_timeout_in_seconds":{"type":"TypeInt","optional":true},"sql_pool_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_workspace":{"schema":{"azure_devops_repo":{"type":"TypeList","optional":true,"elem":{"schema":{"account_name":{"type":"TypeString","required":true},"branch_name":{"type":"TypeString","required":true},"last_commit_id":{"type":"TypeString","optional":true},"project_name":{"type":"TypeString","required":true},"repository_name":{"type":"TypeString","required":true},"root_folder":{"type":"TypeString","required":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"azuread_authentication_only":{"type":"TypeBool","optional":true,"default":false},"compute_subnet_id":{"type":"TypeString","optional":true,"forceNew":true},"connectivity_endpoints":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"customer_managed_key":{"type":"TypeList","optional":true,"elem":{"schema":{"key_name":{"type":"TypeString","optional":true,"default":"cmk"},"key_versionless_id":{"type":"TypeString","required":true},"user_assigned_identity_id":{"type":"TypeString","optional":true}}},"maxItems":1},"data_exfiltration_protection_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"github_repo":{"type":"TypeList","optional":true,"elem":{"schema":{"account_name":{"type":"TypeString","required":true},"branch_name":{"type":"TypeString","required":true},"git_url":{"type":"TypeString","optional":true},"last_commit_id":{"type":"TypeString","optional":true},"repository_name":{"type":"TypeString","required":true},"root_folder":{"type":"TypeString","required":true}}},"maxItems":1},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"linking_allowed_for_aad_tenant_ids":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_resource_group_name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"managed_virtual_network_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"purview_id":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sql_administrator_login":{"type":"TypeString","optional":true,"forceNew":true},"sql_administrator_login_password":{"type":"TypeString","optional":true},"sql_identity_control_enabled":{"type":"TypeBool","optional":true},"storage_data_lake_gen2_filesystem_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_workspace_aad_admin":{"schema":{"login":{"type":"TypeString","required":true},"object_id":{"type":"TypeString","required":true},"synapse_workspace_id":{"type":"TypeString","required":true},"tenant_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_workspace_extended_auditing_policy":{"schema":{"log_monitoring_enabled":{"type":"TypeBool","optional":true,"default":true},"retention_in_days":{"type":"TypeInt","optional":true,"default":0},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_account_access_key_is_secondary":{"type":"TypeBool","optional":true,"default":false},"storage_endpoint":{"type":"TypeString","optional":true},"synapse_workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_workspace_key":{"schema":{"active":{"type":"TypeBool","required":true},"customer_managed_key_name":{"type":"TypeString","required":true},"customer_managed_key_versionless_id":{"type":"TypeString","optional":true},"synapse_workspace_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_workspace_security_alert_policy":{"schema":{"disabled_alerts":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"email_account_admins_enabled":{"type":"TypeBool","optional":true,"default":false},"email_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"policy_state":{"type":"TypeString","required":true},"retention_days":{"type":"TypeInt","optional":true,"default":0},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_endpoint":{"type":"TypeString","optional":true},"synapse_workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_workspace_sql_aad_admin":{"schema":{"login":{"type":"TypeString","required":true},"object_id":{"type":"TypeString","required":true},"synapse_workspace_id":{"type":"TypeString","required":true},"tenant_id":{"type":"TypeString","required":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_synapse_workspace_vulnerability_assessment":{"schema":{"recurring_scans":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"email_subscription_admins_enabled":{"type":"TypeBool","optional":true,"default":true},"emails":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"storage_account_access_key":{"type":"TypeString","optional":true},"storage_container_path":{"type":"TypeString","required":true},"storage_container_sas_key":{"type":"TypeString","optional":true},"workspace_security_alert_policy_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_system_center_virtual_machine_manager_availability_set":{"schema":{"custom_location_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"system_center_virtual_machine_manager_server_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_system_center_virtual_machine_manager_cloud":{"schema":{"custom_location_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"system_center_virtual_machine_manager_server_inventory_item_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_system_center_virtual_machine_manager_server":{"schema":{"custom_location_id":{"type":"TypeString","required":true,"forceNew":true},"fqdn":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"password":{"type":"TypeString","required":true,"forceNew":true},"port":{"type":"TypeInt","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"username":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_system_center_virtual_machine_manager_virtual_machine_template":{"schema":{"custom_location_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"system_center_virtual_machine_manager_server_inventory_item_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_system_center_virtual_machine_manager_virtual_network":{"schema":{"custom_location_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"system_center_virtual_machine_manager_server_inventory_item_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_tenant_template_deployment":{"schema":{"debug_level":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"output_content":{"type":"TypeString","computed":true},"parameters_content":{"type":"TypeString","optional":true,"computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"template_content":{"type":"TypeString","optional":true,"computed":true},"template_spec_version_id":{"type":"TypeString","optional":true}},"timeouts":{"create":180,"read":5,"delete":180,"update":180}},"azurerm_traffic_manager_azure_endpoint":{"schema":{"always_serve_enabled":{"type":"TypeBool","optional":true,"default":false},"custom_header":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"enabled":{"type":"TypeBool","optional":true,"default":true},"geo_mappings":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","optional":true,"default":1},"profile_id":{"type":"TypeString","required":true,"forceNew":true},"subnet":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"first":{"type":"TypeString","required":true},"last":{"type":"TypeString","optional":true},"scope":{"type":"TypeInt","optional":true}}}},"target_resource_id":{"type":"TypeString","required":true},"weight":{"type":"TypeInt","optional":true,"default":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_traffic_manager_external_endpoint":{"schema":{"always_serve_enabled":{"type":"TypeBool","optional":true,"default":false},"custom_header":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"enabled":{"type":"TypeBool","optional":true,"default":true},"endpoint_location":{"type":"TypeString","optional":true,"computed":true},"geo_mappings":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","optional":true,"default":1},"profile_id":{"type":"TypeString","required":true,"forceNew":true},"subnet":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"first":{"type":"TypeString","required":true},"last":{"type":"TypeString","optional":true},"scope":{"type":"TypeInt","optional":true}}}},"target":{"type":"TypeString","required":true},"weight":{"type":"TypeInt","optional":true,"default":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_traffic_manager_nested_endpoint":{"schema":{"custom_header":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"enabled":{"type":"TypeBool","optional":true,"default":true},"endpoint_location":{"type":"TypeString","optional":true,"computed":true},"geo_mappings":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"minimum_child_endpoints":{"type":"TypeInt","required":true},"minimum_required_child_endpoints_ipv4":{"type":"TypeInt","optional":true},"minimum_required_child_endpoints_ipv6":{"type":"TypeInt","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"priority":{"type":"TypeInt","optional":true,"default":1},"profile_id":{"type":"TypeString","required":true,"forceNew":true},"subnet":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"first":{"type":"TypeString","required":true},"last":{"type":"TypeString","optional":true},"scope":{"type":"TypeInt","optional":true}}}},"target_resource_id":{"type":"TypeString","required":true},"weight":{"type":"TypeInt","optional":true,"default":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_traffic_manager_profile":{"schema":{"dns_config":{"type":"TypeList","required":true,"elem":{"schema":{"relative_name":{"type":"TypeString","required":true,"forceNew":true},"ttl":{"type":"TypeInt","required":true}}},"maxItems":1},"fqdn":{"type":"TypeString","computed":true},"max_return":{"type":"TypeInt","optional":true},"monitor_config":{"type":"TypeList","required":true,"elem":{"schema":{"custom_header":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"expected_status_code_ranges":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"interval_in_seconds":{"type":"TypeInt","optional":true,"default":30},"path":{"type":"TypeString","optional":true},"port":{"type":"TypeInt","required":true},"protocol":{"type":"TypeString","required":true},"timeout_in_seconds":{"type":"TypeInt","optional":true,"default":10},"tolerated_number_of_failures":{"type":"TypeInt","optional":true,"default":3}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"profile_status":{"type":"TypeString","optional":true,"default":"Enabled"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"traffic_routing_method":{"type":"TypeString","required":true},"traffic_view_enabled":{"type":"TypeBool","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_user_assigned_identity":{"schema":{"client_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"principal_id":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_desktop_application":{"schema":{"application_group_id":{"type":"TypeString","required":true,"forceNew":true},"command_line_argument_policy":{"type":"TypeString","required":true},"command_line_arguments":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"friendly_name":{"type":"TypeString","optional":true,"computed":true},"icon_index":{"type":"TypeInt","optional":true},"icon_path":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"path":{"type":"TypeString","required":true},"show_in_portal":{"type":"TypeBool","optional":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_virtual_desktop_application_group":{"schema":{"default_desktop_display_name":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"friendly_name":{"type":"TypeString","optional":true},"host_pool_id":{"type":"TypeString","required":true,"forceNew":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_virtual_desktop_host_pool":{"schema":{"custom_rdp_properties":{"type":"TypeString","optional":true},"description":{"type":"TypeString","optional":true},"friendly_name":{"type":"TypeString","optional":true},"load_balancer_type":{"type":"TypeString","required":true},"location":{"type":"TypeString","required":true,"forceNew":true},"maximum_sessions_allowed":{"type":"TypeInt","optional":true,"default":999999},"name":{"type":"TypeString","required":true,"forceNew":true},"personal_desktop_assignment_type":{"type":"TypeString","optional":true,"forceNew":true},"preferred_app_group_type":{"type":"TypeString","optional":true,"default":"Desktop","description":"Preferred App Group type to display"},"public_network_access":{"type":"TypeString","optional":true,"default":"Enabled"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"scheduled_agent_updates":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":false},"schedule":{"type":"TypeList","optional":true,"elem":{"schema":{"day_of_week":{"type":"TypeString","required":true},"hour_of_day":{"type":"TypeInt","required":true}}},"maxItems":2},"timezone":{"type":"TypeString","optional":true,"default":"UTC"},"use_session_host_timezone":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"start_vm_on_connect":{"type":"TypeBool","optional":true,"default":false},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true,"forceNew":true},"validate_environment":{"type":"TypeBool","optional":true,"default":false},"vm_template":{"type":"TypeString","optional":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_virtual_desktop_host_pool_registration_info":{"schema":{"expiration_date":{"type":"TypeString","required":true},"hostpool_id":{"type":"TypeString","required":true,"forceNew":true},"token":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_desktop_scaling_plan":{"schema":{"description":{"type":"TypeString","optional":true},"exclusion_tag":{"type":"TypeString","optional":true},"friendly_name":{"type":"TypeString","optional":true},"host_pool":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"hostpool_id":{"type":"TypeString","required":true},"scaling_plan_enabled":{"type":"TypeBool","required":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"days_of_week":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"off_peak_load_balancing_algorithm":{"type":"TypeString","required":true},"off_peak_start_time":{"type":"TypeString","required":true},"peak_load_balancing_algorithm":{"type":"TypeString","required":true},"peak_start_time":{"type":"TypeString","required":true},"ramp_down_capacity_threshold_percent":{"type":"TypeInt","required":true},"ramp_down_force_logoff_users":{"type":"TypeBool","required":true},"ramp_down_load_balancing_algorithm":{"type":"TypeString","required":true},"ramp_down_minimum_hosts_percent":{"type":"TypeInt","required":true},"ramp_down_notification_message":{"type":"TypeString","required":true},"ramp_down_start_time":{"type":"TypeString","required":true},"ramp_down_stop_hosts_when":{"type":"TypeString","required":true},"ramp_down_wait_time_minutes":{"type":"TypeInt","required":true},"ramp_up_capacity_threshold_percent":{"type":"TypeInt","optional":true},"ramp_up_load_balancing_algorithm":{"type":"TypeString","required":true},"ramp_up_minimum_hosts_percent":{"type":"TypeInt","optional":true},"ramp_up_start_time":{"type":"TypeString","required":true}}},"minItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"time_zone":{"type":"TypeString","required":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_virtual_desktop_scaling_plan_host_pool_association":{"schema":{"enabled":{"type":"TypeBool","required":true},"host_pool_id":{"type":"TypeString","required":true,"forceNew":true},"scaling_plan_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_virtual_desktop_workspace":{"schema":{"description":{"type":"TypeString","optional":true},"friendly_name":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_virtual_desktop_workspace_application_group_association":{"schema":{"application_group_id":{"type":"TypeString","required":true,"forceNew":true},"workspace_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60}},"azurerm_virtual_hub":{"schema":{"address_prefix":{"type":"TypeString","optional":true,"forceNew":true},"default_route_table_id":{"type":"TypeString","computed":true},"hub_routing_preference":{"type":"TypeString","optional":true,"default":"ExpressRoute"},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"route":{"type":"TypeSet","optional":true,"elem":{"schema":{"address_prefixes":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"next_hop_ip_address":{"type":"TypeString","required":true}}}},"sku":{"type":"TypeString","optional":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_router_asn":{"type":"TypeInt","computed":true},"virtual_router_auto_scale_min_capacity":{"type":"TypeInt","optional":true,"default":2},"virtual_router_ips":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"virtual_wan_id":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_virtual_hub_bgp_connection":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"peer_asn":{"type":"TypeInt","required":true,"forceNew":true},"peer_ip":{"type":"TypeString","required":true,"forceNew":true},"virtual_hub_id":{"type":"TypeString","required":true,"forceNew":true},"virtual_network_connection_id":{"type":"TypeString","optional":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_hub_connection":{"schema":{"internet_security_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"remote_virtual_network_id":{"type":"TypeString","required":true,"forceNew":true},"routing":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"associated_route_table_id":{"type":"TypeString","optional":true,"computed":true},"inbound_route_map_id":{"type":"TypeString","optional":true},"outbound_route_map_id":{"type":"TypeString","optional":true},"propagated_route_table":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"labels":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"route_table_ids":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"static_vnet_local_route_override_criteria":{"type":"TypeString","optional":true,"default":"Contains","forceNew":true},"static_vnet_route":{"type":"TypeList","optional":true,"elem":{"schema":{"address_prefixes":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","optional":true},"next_hop_ip_address":{"type":"TypeString","optional":true}}}}}},"maxItems":1},"virtual_hub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_virtual_hub_ip":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"private_ip_address":{"type":"TypeString","optional":true},"private_ip_allocation_method":{"type":"TypeString","optional":true,"default":"Dynamic"},"public_ip_address_id":{"type":"TypeString","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"virtual_hub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_virtual_hub_route_table":{"schema":{"labels":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"route":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"destinations":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"destinations_type":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"next_hop":{"type":"TypeString","required":true},"next_hop_type":{"type":"TypeString","optional":true,"default":"ResourceId"}}}},"virtual_hub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_hub_route_table_route":{"schema":{"destinations":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"destinations_type":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true,"forceNew":true},"next_hop":{"type":"TypeString","required":true},"next_hop_type":{"type":"TypeString","optional":true,"default":"ResourceId"},"route_table_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_hub_routing_intent":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"routing_policy":{"type":"TypeList","required":true,"elem":{"schema":{"destinations":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"next_hop":{"type":"TypeString","required":true}}}},"virtual_hub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_hub_security_partner_provider":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"security_provider_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_hub_id":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_machine":{"schema":{"additional_capabilities":{"type":"TypeList","optional":true,"elem":{"schema":{"ultra_ssd_enabled":{"type":"TypeBool","required":true,"forceNew":true}}},"maxItems":1},"availability_set_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"boot_diagnostics":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","required":true},"storage_uri":{"type":"TypeString","required":true}}},"maxItems":1},"delete_data_disks_on_termination":{"type":"TypeBool","optional":true,"default":false},"delete_os_disk_on_termination":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"license_type":{"type":"TypeString","optional":true,"computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_interface_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"os_profile":{"type":"TypeSet","optional":true,"elem":{"schema":{"admin_password":{"type":"TypeString","optional":true},"admin_username":{"type":"TypeString","required":true},"computer_name":{"type":"TypeString","required":true,"forceNew":true},"custom_data":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}}},"maxItems":1},"os_profile_linux_config":{"type":"TypeSet","optional":true,"elem":{"schema":{"disable_password_authentication":{"type":"TypeBool","required":true},"ssh_keys":{"type":"TypeList","optional":true,"elem":{"schema":{"key_data":{"type":"TypeString","required":true},"path":{"type":"TypeString","required":true}}}}}},"maxItems":1},"os_profile_secrets":{"type":"TypeList","optional":true,"elem":{"schema":{"source_vault_id":{"type":"TypeString","required":true},"vault_certificates":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate_store":{"type":"TypeString","optional":true},"certificate_url":{"type":"TypeString","required":true}}}}}}},"os_profile_windows_config":{"type":"TypeSet","optional":true,"elem":{"schema":{"additional_unattend_config":{"type":"TypeList","optional":true,"elem":{"schema":{"component":{"type":"TypeString","required":true},"content":{"type":"TypeString","required":true},"pass":{"type":"TypeString","required":true},"setting_name":{"type":"TypeString","required":true}}}},"enable_automatic_upgrades":{"type":"TypeBool","optional":true,"default":false},"provision_vm_agent":{"type":"TypeBool","optional":true,"default":false},"timezone":{"type":"TypeString","optional":true,"forceNew":true},"winrm":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate_url":{"type":"TypeString","optional":true},"protocol":{"type":"TypeString","required":true}}}}}},"maxItems":1},"plan":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"product":{"type":"TypeString","required":true},"publisher":{"type":"TypeString","required":true}}},"maxItems":1},"primary_network_interface_id":{"type":"TypeString","optional":true},"proximity_placement_group_id":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"storage_data_disk":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"caching":{"type":"TypeString","optional":true,"computed":true},"create_option":{"type":"TypeString","required":true},"disk_size_gb":{"type":"TypeInt","optional":true,"computed":true},"lun":{"type":"TypeInt","required":true},"managed_disk_id":{"type":"TypeString","optional":true,"computed":true},"managed_disk_type":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true},"vhd_uri":{"type":"TypeString","optional":true},"write_accelerator_enabled":{"type":"TypeBool","optional":true,"default":false}}}},"storage_image_reference":{"type":"TypeSet","optional":true,"computed":true,"forceNew":true,"elem":{"schema":{"id":{"type":"TypeString","optional":true,"forceNew":true},"offer":{"type":"TypeString","optional":true,"forceNew":true},"publisher":{"type":"TypeString","optional":true,"forceNew":true},"sku":{"type":"TypeString","optional":true,"forceNew":true},"version":{"type":"TypeString","optional":true,"computed":true,"forceNew":true}}},"maxItems":1},"storage_os_disk":{"type":"TypeList","required":true,"elem":{"schema":{"caching":{"type":"TypeString","optional":true,"computed":true},"create_option":{"type":"TypeString","required":true},"disk_size_gb":{"type":"TypeInt","optional":true,"computed":true},"image_uri":{"type":"TypeString","optional":true},"managed_disk_id":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"managed_disk_type":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","required":true},"os_type":{"type":"TypeString","optional":true,"computed":true},"vhd_uri":{"type":"TypeString","optional":true,"forceNew":true},"write_accelerator_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"vm_size":{"type":"TypeString","required":true},"zones":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"},"maxItems":1}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_virtual_machine_automanage_configuration_assignment":{"schema":{"configuration_id":{"type":"TypeString","required":true,"forceNew":true},"virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_virtual_machine_data_disk_attachment":{"schema":{"caching":{"type":"TypeString","required":true},"create_option":{"type":"TypeString","optional":true,"default":"Attach","forceNew":true},"lun":{"type":"TypeInt","required":true,"forceNew":true},"managed_disk_id":{"type":"TypeString","required":true,"forceNew":true},"virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true},"write_accelerator_enabled":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_machine_extension":{"schema":{"auto_upgrade_minor_version":{"type":"TypeBool","optional":true},"automatic_upgrade_enabled":{"type":"TypeBool","optional":true},"failure_suppression_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"protected_settings":{"type":"TypeString","optional":true},"protected_settings_from_key_vault":{"type":"TypeList","optional":true,"elem":{"schema":{"secret_url":{"type":"TypeString","required":true},"source_vault_id":{"type":"TypeString","required":true}}},"maxItems":1},"provision_after_extensions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"publisher":{"type":"TypeString","required":true,"forceNew":true},"settings":{"type":"TypeString","optional":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true},"type_handler_version":{"type":"TypeString","required":true},"virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_machine_gallery_application_assignment":{"schema":{"configuration_blob_uri":{"type":"TypeString","optional":true,"forceNew":true},"gallery_application_version_id":{"type":"TypeString","required":true,"forceNew":true},"order":{"type":"TypeInt","optional":true,"default":0},"tag":{"type":"TypeString","optional":true,"forceNew":true},"virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_machine_implicit_data_disk_from_source":{"schema":{"caching":{"type":"TypeString","optional":true},"create_option":{"type":"TypeString","required":true,"forceNew":true},"disk_size_gb":{"type":"TypeInt","required":true,"forceNew":true},"lun":{"type":"TypeInt","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"source_resource_id":{"type":"TypeString","required":true,"forceNew":true},"virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true},"write_accelerator_enabled":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_machine_packet_capture":{"schema":{"filter":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"local_ip_address":{"type":"TypeString","optional":true,"forceNew":true},"local_port":{"type":"TypeString","optional":true,"forceNew":true},"protocol":{"type":"TypeString","required":true,"forceNew":true},"remote_ip_address":{"type":"TypeString","optional":true,"forceNew":true},"remote_port":{"type":"TypeString","optional":true,"forceNew":true}}}},"maximum_bytes_per_packet":{"type":"TypeInt","optional":true,"default":0,"forceNew":true},"maximum_bytes_per_session":{"type":"TypeInt","optional":true,"default":1073741824,"forceNew":true},"maximum_capture_duration_in_seconds":{"type":"TypeInt","optional":true,"default":18000,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_watcher_id":{"type":"TypeString","required":true,"forceNew":true},"storage_location":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"file_path":{"type":"TypeString","optional":true},"storage_account_id":{"type":"TypeString","optional":true},"storage_path":{"type":"TypeString","computed":true}}},"maxItems":1},"virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_virtual_machine_restore_point":{"schema":{"crash_consistency_mode_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"excluded_disks":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"virtual_machine_restore_point_collection_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_virtual_machine_restore_point_collection":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"source_virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_machine_run_command":{"schema":{"error_blob_managed_identity":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","optional":true},"object_id":{"type":"TypeString","optional":true}}},"maxItems":1},"error_blob_uri":{"type":"TypeString","optional":true},"instance_view":{"type":"TypeList","computed":true,"elem":{"schema":{"end_time":{"type":"TypeString","computed":true},"error_message":{"type":"TypeString","computed":true},"execution_message":{"type":"TypeString","computed":true},"execution_state":{"type":"TypeString","computed":true},"exit_code":{"type":"TypeInt","computed":true},"output":{"type":"TypeString","computed":true},"start_time":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"output_blob_managed_identity":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","optional":true},"object_id":{"type":"TypeString","optional":true}}},"maxItems":1},"output_blob_uri":{"type":"TypeString","optional":true},"parameter":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"protected_parameter":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"run_as_password":{"type":"TypeString","optional":true},"run_as_user":{"type":"TypeString","optional":true},"source":{"type":"TypeList","required":true,"elem":{"schema":{"command_id":{"type":"TypeString","optional":true},"script":{"type":"TypeString","optional":true},"script_uri":{"type":"TypeString","optional":true},"script_uri_managed_identity":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","optional":true},"object_id":{"type":"TypeString","optional":true}}},"maxItems":1}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_machine_scale_set":{"schema":{"automatic_os_upgrade":{"type":"TypeBool","optional":true,"default":false},"boot_diagnostics":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"storage_uri":{"type":"TypeString","required":true}}},"maxItems":1},"eviction_policy":{"type":"TypeString","optional":true,"forceNew":true},"extension":{"type":"TypeSet","optional":true,"elem":{"schema":{"auto_upgrade_minor_version":{"type":"TypeBool","optional":true},"name":{"type":"TypeString","required":true},"protected_settings":{"type":"TypeString","optional":true},"provision_after_extensions":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"publisher":{"type":"TypeString","required":true},"settings":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"type_handler_version":{"type":"TypeString","required":true}}}},"health_probe_id":{"type":"TypeString","optional":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"license_type":{"type":"TypeString","optional":true,"computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_profile":{"type":"TypeSet","required":true,"elem":{"schema":{"accelerated_networking":{"type":"TypeBool","optional":true},"dns_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"dns_servers":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"application_gateway_backend_address_pool_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"application_security_group_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":20},"load_balancer_backend_address_pool_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"load_balancer_inbound_nat_rules_ids":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"primary":{"type":"TypeBool","required":true},"public_ip_address_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"domain_name_label":{"type":"TypeString","required":true},"idle_timeout":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true}}},"maxItems":1},"subnet_id":{"type":"TypeString","required":true}}}},"ip_forwarding":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true},"network_security_group_id":{"type":"TypeString","optional":true},"primary":{"type":"TypeBool","required":true}}}},"os_profile":{"type":"TypeList","required":true,"elem":{"schema":{"admin_password":{"type":"TypeString","optional":true},"admin_username":{"type":"TypeString","required":true},"computer_name_prefix":{"type":"TypeString","required":true,"forceNew":true},"custom_data":{"type":"TypeString","optional":true}}},"maxItems":1},"os_profile_linux_config":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"disable_password_authentication":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"ssh_keys":{"type":"TypeList","optional":true,"elem":{"schema":{"key_data":{"type":"TypeString","optional":true},"path":{"type":"TypeString","required":true}}}}}},"maxItems":1},"os_profile_secrets":{"type":"TypeSet","optional":true,"elem":{"schema":{"source_vault_id":{"type":"TypeString","required":true},"vault_certificates":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate_store":{"type":"TypeString","optional":true},"certificate_url":{"type":"TypeString","required":true}}}}}}},"os_profile_windows_config":{"type":"TypeSet","optional":true,"elem":{"schema":{"additional_unattend_config":{"type":"TypeList","optional":true,"elem":{"schema":{"component":{"type":"TypeString","required":true},"content":{"type":"TypeString","required":true},"pass":{"type":"TypeString","required":true},"setting_name":{"type":"TypeString","required":true}}}},"enable_automatic_upgrades":{"type":"TypeBool","optional":true},"provision_vm_agent":{"type":"TypeBool","optional":true},"winrm":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate_url":{"type":"TypeString","optional":true},"protocol":{"type":"TypeString","required":true}}}}}},"maxItems":1},"overprovision":{"type":"TypeBool","optional":true,"default":true},"plan":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"product":{"type":"TypeString","required":true},"publisher":{"type":"TypeString","required":true}}},"maxItems":1},"priority":{"type":"TypeString","optional":true,"forceNew":true},"proximity_placement_group_id":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rolling_upgrade_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"max_batch_instance_percent":{"type":"TypeInt","optional":true,"default":20},"max_unhealthy_instance_percent":{"type":"TypeInt","optional":true,"default":20},"max_unhealthy_upgraded_instance_percent":{"type":"TypeInt","optional":true,"default":20},"pause_time_between_batches":{"type":"TypeString","optional":true,"default":"PT0S"}}},"maxItems":1},"single_placement_group":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"sku":{"type":"TypeList","required":true,"elem":{"schema":{"capacity":{"type":"TypeInt","required":true},"name":{"type":"TypeString","required":true},"tier":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"storage_profile_data_disk":{"type":"TypeList","optional":true,"elem":{"schema":{"caching":{"type":"TypeString","optional":true,"computed":true},"create_option":{"type":"TypeString","required":true},"disk_size_gb":{"type":"TypeInt","optional":true,"computed":true},"lun":{"type":"TypeInt","required":true},"managed_disk_type":{"type":"TypeString","optional":true,"computed":true}}}},"storage_profile_image_reference":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"id":{"type":"TypeString","optional":true},"offer":{"type":"TypeString","optional":true},"publisher":{"type":"TypeString","optional":true},"sku":{"type":"TypeString","optional":true},"version":{"type":"TypeString","optional":true}}},"maxItems":1},"storage_profile_os_disk":{"type":"TypeSet","required":true,"elem":{"schema":{"caching":{"type":"TypeString","optional":true,"computed":true},"create_option":{"type":"TypeString","required":true},"image":{"type":"TypeString","optional":true},"managed_disk_type":{"type":"TypeString","optional":true,"computed":true},"name":{"type":"TypeString","optional":true},"os_type":{"type":"TypeString","optional":true},"vhd_containers":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"upgrade_policy_mode":{"type":"TypeString","required":true},"zones":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_virtual_machine_scale_set_extension":{"schema":{"auto_upgrade_minor_version":{"type":"TypeBool","optional":true,"default":true},"automatic_upgrade_enabled":{"type":"TypeBool","optional":true},"failure_suppression_enabled":{"type":"TypeBool","optional":true,"default":false},"force_update_tag":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"protected_settings":{"type":"TypeString","optional":true},"protected_settings_from_key_vault":{"type":"TypeList","optional":true,"elem":{"schema":{"secret_url":{"type":"TypeString","required":true},"source_vault_id":{"type":"TypeString","required":true}}},"maxItems":1},"provision_after_extensions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"publisher":{"type":"TypeString","required":true,"forceNew":true},"settings":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true,"forceNew":true},"type_handler_version":{"type":"TypeString","required":true},"virtual_machine_scale_set_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_machine_scale_set_packet_capture":{"schema":{"filter":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"local_ip_address":{"type":"TypeString","optional":true,"forceNew":true},"local_port":{"type":"TypeString","optional":true,"forceNew":true},"protocol":{"type":"TypeString","required":true,"forceNew":true},"remote_ip_address":{"type":"TypeString","optional":true,"forceNew":true},"remote_port":{"type":"TypeString","optional":true,"forceNew":true}}}},"machine_scope":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"exclude_instance_ids":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"include_instance_ids":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"maximum_bytes_per_packet":{"type":"TypeInt","optional":true,"default":0,"forceNew":true},"maximum_bytes_per_session":{"type":"TypeInt","optional":true,"default":1073741824,"forceNew":true},"maximum_capture_duration_in_seconds":{"type":"TypeInt","optional":true,"default":18000,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_watcher_id":{"type":"TypeString","required":true,"forceNew":true},"storage_location":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"file_path":{"type":"TypeString","optional":true},"storage_account_id":{"type":"TypeString","optional":true},"storage_path":{"type":"TypeString","computed":true}}},"maxItems":1},"virtual_machine_scale_set_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_virtual_network":{"schema":{"address_space":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"},"minItems":1},"bgp_community":{"type":"TypeString","optional":true},"ddos_protection_plan":{"type":"TypeList","optional":true,"elem":{"schema":{"enable":{"type":"TypeBool","required":true},"id":{"type":"TypeString","required":true}}},"maxItems":1},"dns_servers":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"encryption":{"type":"TypeList","optional":true,"elem":{"schema":{"enforcement":{"type":"TypeString","required":true}}},"maxItems":1},"flow_timeout_in_minutes":{"type":"TypeInt","optional":true},"guid":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subnet":{"type":"TypeSet","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"address_prefixes":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"default_outbound_access_enabled":{"type":"TypeBool","optional":true,"default":true},"delegation":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"service_delegation":{"type":"TypeList","configMode":"Auto","required":true,"elem":{"schema":{"actions":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true}}},"maxItems":1}}},"maxItems":1},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"private_endpoint_network_policies":{"type":"TypeString","optional":true,"default":"Disabled"},"private_link_service_network_policies_enabled":{"type":"TypeBool","optional":true,"default":true},"route_table_id":{"type":"TypeString","optional":true},"security_group":{"type":"TypeString","optional":true},"service_endpoint_policy_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"service_endpoints":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_network_dns_servers":{"schema":{"dns_servers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"virtual_network_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_network_gateway":{"schema":{"active_active":{"type":"TypeBool","optional":true,"computed":true},"bgp_route_translation_for_nat_enabled":{"type":"TypeBool","optional":true,"default":false},"bgp_settings":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"asn":{"type":"TypeInt","optional":true},"peer_weight":{"type":"TypeInt","optional":true},"peering_addresses":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"apipa_addresses":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"default_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ip_configuration_name":{"type":"TypeString","optional":true,"computed":true},"tunnel_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":2,"minItems":1}}},"maxItems":1},"custom_route":{"type":"TypeList","optional":true,"elem":{"schema":{"address_prefixes":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"default_local_network_gateway_id":{"type":"TypeString","optional":true},"dns_forwarding_enabled":{"type":"TypeBool","optional":true},"edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"enable_bgp":{"type":"TypeBool","optional":true,"computed":true},"generation":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","optional":true,"default":"vnetGatewayConfig"},"private_ip_address_allocation":{"type":"TypeString","optional":true,"default":"Dynamic"},"public_ip_address_id":{"type":"TypeString","required":true},"subnet_id":{"type":"TypeString","required":true}}},"maxItems":3},"ip_sec_replay_protection_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"policy_group":{"type":"TypeList","optional":true,"elem":{"schema":{"is_default":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true},"policy_member":{"type":"TypeList","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"priority":{"type":"TypeInt","optional":true,"default":0}}}},"private_ip_address_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"remote_vnet_traffic_enabled":{"type":"TypeBool","optional":true,"default":false},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true,"forceNew":true},"virtual_wan_traffic_enabled":{"type":"TypeBool","optional":true,"default":false},"vpn_client_configuration":{"type":"TypeList","optional":true,"elem":{"schema":{"aad_audience":{"type":"TypeString","optional":true},"aad_issuer":{"type":"TypeString","optional":true},"aad_tenant":{"type":"TypeString","optional":true},"address_space":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"ipsec_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"dh_group":{"type":"TypeString","required":true},"ike_encryption":{"type":"TypeString","required":true},"ike_integrity":{"type":"TypeString","required":true},"ipsec_encryption":{"type":"TypeString","required":true},"ipsec_integrity":{"type":"TypeString","required":true},"pfs_group":{"type":"TypeString","required":true},"sa_data_size_in_kilobytes":{"type":"TypeInt","required":true},"sa_lifetime_in_seconds":{"type":"TypeInt","required":true}}},"maxItems":1},"radius_server":{"type":"TypeList","optional":true,"elem":{"schema":{"address":{"type":"TypeString","required":true},"score":{"type":"TypeInt","required":true},"secret":{"type":"TypeString","required":true}}}},"radius_server_address":{"type":"TypeString","optional":true},"radius_server_secret":{"type":"TypeString","optional":true},"revoked_certificate":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"thumbprint":{"type":"TypeString","required":true}}}},"root_certificate":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"public_cert_data":{"type":"TypeString","required":true}}}},"virtual_network_gateway_client_connection":{"type":"TypeList","optional":true,"elem":{"schema":{"address_prefixes":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"policy_group_names":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}},"vpn_auth_types":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"},"maxItems":3},"vpn_client_protocols":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"vpn_type":{"type":"TypeString","optional":true,"default":"RouteBased","forceNew":true}},"timeouts":{"create":90,"read":5,"delete":60,"update":60}},"azurerm_virtual_network_gateway_connection":{"schema":{"authorization_key":{"type":"TypeString","optional":true},"connection_mode":{"type":"TypeString","optional":true,"default":"Default","forceNew":true},"connection_protocol":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"custom_bgp_addresses":{"type":"TypeList","optional":true,"elem":{"schema":{"primary":{"type":"TypeString","required":true},"secondary":{"type":"TypeString","optional":true}}},"maxItems":1},"dpd_timeout_seconds":{"type":"TypeInt","optional":true,"forceNew":true},"egress_nat_rule_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"enable_bgp":{"type":"TypeBool","optional":true,"computed":true},"express_route_circuit_id":{"type":"TypeString","optional":true,"forceNew":true},"express_route_gateway_bypass":{"type":"TypeBool","optional":true,"computed":true},"ingress_nat_rule_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"ipsec_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"dh_group":{"type":"TypeString","required":true},"ike_encryption":{"type":"TypeString","required":true},"ike_integrity":{"type":"TypeString","required":true},"ipsec_encryption":{"type":"TypeString","required":true},"ipsec_integrity":{"type":"TypeString","required":true},"pfs_group":{"type":"TypeString","required":true},"sa_datasize":{"type":"TypeInt","optional":true,"computed":true},"sa_lifetime":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"local_azure_ip_address_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"local_network_gateway_id":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"peer_virtual_network_gateway_id":{"type":"TypeString","optional":true,"forceNew":true},"private_link_fast_path_enabled":{"type":"TypeBool","optional":true,"default":false},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"routing_weight":{"type":"TypeInt","optional":true,"computed":true},"shared_key":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"traffic_selector_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"local_address_cidrs":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"remote_address_cidrs":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}}},"type":{"type":"TypeString","required":true,"forceNew":true},"use_policy_based_traffic_selectors":{"type":"TypeBool","optional":true,"computed":true},"virtual_network_gateway_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_network_gateway_nat_rule":{"schema":{"external_mapping":{"type":"TypeList","required":true,"elem":{"schema":{"address_space":{"type":"TypeString","required":true},"port_range":{"type":"TypeString","optional":true}}}},"internal_mapping":{"type":"TypeList","required":true,"elem":{"schema":{"address_space":{"type":"TypeString","required":true},"port_range":{"type":"TypeString","optional":true}}}},"ip_configuration_id":{"type":"TypeString","optional":true},"mode":{"type":"TypeString","optional":true,"default":"EgressSnat","forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"type":{"type":"TypeString","optional":true,"default":"Static","forceNew":true},"virtual_network_gateway_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_network_peering":{"schema":{"allow_forwarded_traffic":{"type":"TypeBool","optional":true,"default":false},"allow_gateway_transit":{"type":"TypeBool","optional":true,"default":false},"allow_virtual_network_access":{"type":"TypeBool","optional":true,"default":true},"local_subnet_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"only_ipv6_peering_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"peer_complete_virtual_networks_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"remote_subnet_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"remote_virtual_network_id":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"triggers":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"use_remote_gateways":{"type":"TypeBool","optional":true,"default":false},"virtual_network_name":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_virtual_wan":{"schema":{"allow_branch_to_branch_traffic":{"type":"TypeBool","optional":true,"default":true},"disable_vpn_encryption":{"type":"TypeBool","optional":true,"default":false},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"office365_local_breakout_category":{"type":"TypeString","optional":true,"default":"None"},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","optional":true,"default":"Standard"}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_vmware_cluster":{"schema":{"cluster_node_count":{"type":"TypeInt","required":true},"cluster_number":{"type":"TypeInt","computed":true},"hosts":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"vmware_cloud_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":300,"read":5,"delete":300,"update":300}},"azurerm_vmware_express_route_authorization":{"schema":{"express_route_authorization_id":{"type":"TypeString","computed":true},"express_route_authorization_key":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"private_cloud_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_vmware_netapp_volume_attachment":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"netapp_volume_id":{"type":"TypeString","required":true,"forceNew":true},"vmware_cluster_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_vmware_private_cloud":{"schema":{"circuit":{"type":"TypeList","computed":true,"elem":{"schema":{"express_route_id":{"type":"TypeString","computed":true},"express_route_private_peering_id":{"type":"TypeString","computed":true},"primary_subnet_cidr":{"type":"TypeString","computed":true},"secondary_subnet_cidr":{"type":"TypeString","computed":true}}}},"hcx_cloud_manager_endpoint":{"type":"TypeString","computed":true},"internet_connection_enabled":{"type":"TypeBool","optional":true,"default":false},"location":{"type":"TypeString","required":true,"forceNew":true},"management_cluster":{"type":"TypeList","required":true,"elem":{"schema":{"hosts":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"id":{"type":"TypeInt","computed":true},"size":{"type":"TypeInt","required":true}}},"maxItems":1},"management_subnet_cidr":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"network_subnet_cidr":{"type":"TypeString","required":true,"forceNew":true},"nsxt_certificate_thumbprint":{"type":"TypeString","computed":true},"nsxt_manager_endpoint":{"type":"TypeString","computed":true},"nsxt_password":{"type":"TypeString","optional":true,"forceNew":true},"provisioning_subnet_cidr":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"vcenter_certificate_thumbprint":{"type":"TypeString","computed":true},"vcenter_password":{"type":"TypeString","optional":true,"forceNew":true},"vcsa_endpoint":{"type":"TypeString","computed":true},"vmotion_subnet_cidr":{"type":"TypeString","computed":true}},"timeouts":{"create":600,"read":5,"delete":600,"update":600}},"azurerm_voice_services_communications_gateway":{"schema":{"api_bridge":{"type":"TypeString","optional":true},"auto_generated_domain_name_label_scope":{"type":"TypeString","optional":true,"default":"TenantReuse","forceNew":true},"codecs":{"type":"TypeString","required":true},"connectivity":{"type":"TypeString","required":true,"forceNew":true},"e911_type":{"type":"TypeString","required":true},"emergency_dial_strings":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"microsoft_teams_voicemail_pilot_number":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true,"forceNew":true},"on_prem_mcp_enabled":{"type":"TypeBool","optional":true},"platforms":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_location":{"type":"TypeSet","required":true,"elem":{"schema":{"allowed_media_source_address_prefixes":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"allowed_signaling_source_address_prefixes":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"esrp_addresses":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true},"operator_addresses":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_voice_services_communications_gateway_test_line":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"phone_number":{"type":"TypeString","required":true},"purpose":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"voice_services_communications_gateway_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_vpn_gateway":{"schema":{"bgp_route_translation_for_nat_enabled":{"type":"TypeBool","optional":true,"default":false},"bgp_settings":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"asn":{"type":"TypeInt","required":true,"forceNew":true},"bgp_peering_address":{"type":"TypeString","computed":true},"instance_0_bgp_peering_address":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"custom_ips":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"default_ips":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"ip_configuration_id":{"type":"TypeString","computed":true},"tunnel_ips":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"instance_1_bgp_peering_address":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"custom_ips":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"default_ips":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"ip_configuration_id":{"type":"TypeString","computed":true},"tunnel_ips":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"peer_weight":{"type":"TypeInt","required":true,"forceNew":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"routing_preference":{"type":"TypeString","optional":true,"default":"Microsoft Network","forceNew":true},"scale_unit":{"type":"TypeInt","optional":true,"default":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_hub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_vpn_gateway_connection":{"schema":{"internet_security_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true,"forceNew":true},"remote_vpn_site_id":{"type":"TypeString","required":true,"forceNew":true},"routing":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"associated_route_table":{"type":"TypeString","required":true},"inbound_route_map_id":{"type":"TypeString","optional":true},"outbound_route_map_id":{"type":"TypeString","optional":true},"propagated_route_table":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"labels":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"route_table_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}}}},"maxItems":1}}},"maxItems":1},"traffic_selector_policy":{"type":"TypeSet","optional":true,"elem":{"schema":{"local_address_ranges":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"remote_address_ranges":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}}}}},"vpn_gateway_id":{"type":"TypeString","required":true,"forceNew":true},"vpn_link":{"type":"TypeList","required":true,"elem":{"schema":{"bandwidth_mbps":{"type":"TypeInt","optional":true,"default":10},"bgp_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"connection_mode":{"type":"TypeString","optional":true,"default":"Default"},"custom_bgp_address":{"type":"TypeSet","optional":true,"elem":{"schema":{"ip_address":{"type":"TypeString","required":true},"ip_configuration_id":{"type":"TypeString","required":true}}}},"egress_nat_rule_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"ingress_nat_rule_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"ipsec_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"dh_group":{"type":"TypeString","required":true},"encryption_algorithm":{"type":"TypeString","required":true},"ike_encryption_algorithm":{"type":"TypeString","required":true},"ike_integrity_algorithm":{"type":"TypeString","required":true},"integrity_algorithm":{"type":"TypeString","required":true},"pfs_group":{"type":"TypeString","required":true},"sa_data_size_kb":{"type":"TypeInt","required":true},"sa_lifetime_sec":{"type":"TypeInt","required":true}}},"minItems":1},"local_azure_ip_address_enabled":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true},"policy_based_traffic_selector_enabled":{"type":"TypeBool","optional":true,"default":false},"protocol":{"type":"TypeString","optional":true,"default":"IKEv2"},"ratelimit_enabled":{"type":"TypeBool","optional":true,"default":false},"route_weight":{"type":"TypeInt","optional":true,"default":0},"shared_key":{"type":"TypeString","optional":true},"vpn_site_link_id":{"type":"TypeString","required":true,"forceNew":true}}},"minItems":1}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_vpn_gateway_nat_rule":{"schema":{"external_mapping":{"type":"TypeList","optional":true,"elem":{"schema":{"address_space":{"type":"TypeString","required":true},"port_range":{"type":"TypeString","optional":true}}}},"internal_mapping":{"type":"TypeList","optional":true,"elem":{"schema":{"address_space":{"type":"TypeString","required":true},"port_range":{"type":"TypeString","optional":true}}}},"ip_configuration_id":{"type":"TypeString","optional":true},"mode":{"type":"TypeString","optional":true,"default":"EgressSnat","forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"type":{"type":"TypeString","optional":true,"default":"Static","forceNew":true},"vpn_gateway_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_vpn_server_configuration":{"schema":{"azure_active_directory_authentication":{"type":"TypeList","optional":true,"elem":{"schema":{"audience":{"type":"TypeString","required":true},"issuer":{"type":"TypeString","required":true},"tenant":{"type":"TypeString","required":true}}},"minItems":1},"client_revoked_certificate":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"thumbprint":{"type":"TypeString","required":true}}}},"client_root_certificate":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"public_cert_data":{"type":"TypeString","required":true}}}},"ipsec_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"dh_group":{"type":"TypeString","required":true},"ike_encryption":{"type":"TypeString","required":true},"ike_integrity":{"type":"TypeString","required":true},"ipsec_encryption":{"type":"TypeString","required":true},"ipsec_integrity":{"type":"TypeString","required":true},"pfs_group":{"type":"TypeString","required":true},"sa_data_size_kilobytes":{"type":"TypeInt","required":true},"sa_lifetime_seconds":{"type":"TypeInt","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"radius":{"type":"TypeList","optional":true,"elem":{"schema":{"client_root_certificate":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"thumbprint":{"type":"TypeString","required":true}}}},"server":{"type":"TypeList","optional":true,"elem":{"schema":{"address":{"type":"TypeString","required":true},"score":{"type":"TypeInt","required":true},"secret":{"type":"TypeString","required":true}}}},"server_root_certificate":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"public_cert_data":{"type":"TypeString","required":true}}}}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"vpn_authentication_types":{"type":"TypeList","required":true,"elem":{"type":"TypeString"}},"vpn_protocols":{"type":"TypeSet","optional":true,"computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":90,"read":5,"delete":90,"update":90}},"azurerm_vpn_server_configuration_policy_group":{"schema":{"is_default":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"policy":{"type":"TypeSet","required":true,"elem":{"schema":{"name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true},"value":{"type":"TypeString","required":true}}}},"priority":{"type":"TypeInt","optional":true,"default":0},"vpn_server_configuration_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_vpn_site":{"schema":{"address_cidrs":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"device_model":{"type":"TypeString","optional":true},"device_vendor":{"type":"TypeString","optional":true},"link":{"type":"TypeList","optional":true,"elem":{"schema":{"bgp":{"type":"TypeList","optional":true,"elem":{"schema":{"asn":{"type":"TypeInt","required":true},"peering_address":{"type":"TypeString","required":true}}},"maxItems":1},"fqdn":{"type":"TypeString","optional":true},"id":{"type":"TypeString","computed":true},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"provider_name":{"type":"TypeString","optional":true},"speed_in_mbps":{"type":"TypeInt","optional":true,"default":0}}},"minItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"o365_policy":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"traffic_category":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"allow_endpoint_enabled":{"type":"TypeBool","optional":true,"default":false},"default_endpoint_enabled":{"type":"TypeBool","optional":true,"default":false},"optimize_endpoint_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_wan_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_web_app_active_slot":{"schema":{"last_successful_swap":{"type":"TypeString","description":"The timestamp of the last successful swap with `Production`","computed":true},"overwrite_network_config":{"type":"TypeBool","optional":true,"default":true,"description":"The swap action should overwrite the Production slot's network configuration with the configuration from this slot. Defaults to `true`.","forceNew":true},"slot_id":{"type":"TypeString","required":true,"description":"The ID of the Slot to swap with `Production`."}},"timeouts":{"create":30,"read":5,"delete":5,"update":30}},"azurerm_web_app_hybrid_connection":{"schema":{"hostname":{"type":"TypeString","required":true,"description":"The hostname of the endpoint."},"namespace_name":{"type":"TypeString","description":"The name of the Relay Namespace.","computed":true},"port":{"type":"TypeInt","required":true,"description":"The port to use for the endpoint"},"relay_id":{"type":"TypeString","required":true,"description":"The ID of the Relay Hybrid Connection to use.","forceNew":true},"relay_name":{"type":"TypeString","description":"The name of the Relay in use.","computed":true},"send_key_name":{"type":"TypeString","optional":true,"default":"RootManageSharedAccessKey","description":"The name of the Relay key with `Send` permission to use. Defaults to `RootManageSharedAccessKey`"},"send_key_value":{"type":"TypeString","description":"The Primary Access Key for the `send_key_name`","computed":true},"service_bus_namespace":{"type":"TypeString","description":"The Service Bus Namespace.","computed":true},"service_bus_suffix":{"type":"TypeString","description":"The suffix for the endpoint.","computed":true},"web_app_id":{"type":"TypeString","required":true,"description":"The ID of the Web App for this Hybrid Connection.","forceNew":true}},"timeouts":{"create":30,"read":5,"delete":5,"update":30}},"azurerm_web_application_firewall_policy":{"schema":{"custom_rules":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"group_rate_limit_by":{"type":"TypeString","optional":true},"match_conditions":{"type":"TypeList","required":true,"elem":{"schema":{"match_values":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"match_variables":{"type":"TypeList","required":true,"elem":{"schema":{"selector":{"type":"TypeString","optional":true},"variable_name":{"type":"TypeString","required":true}}}},"negation_condition":{"type":"TypeBool","optional":true},"operator":{"type":"TypeString","required":true},"transforms":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"name":{"type":"TypeString","optional":true},"priority":{"type":"TypeInt","required":true},"rate_limit_duration":{"type":"TypeString","optional":true},"rate_limit_threshold":{"type":"TypeInt","optional":true},"rule_type":{"type":"TypeString","required":true}}}},"http_listener_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_rules":{"type":"TypeList","required":true,"elem":{"schema":{"exclusion":{"type":"TypeList","optional":true,"elem":{"schema":{"excluded_rule_set":{"type":"TypeList","optional":true,"elem":{"schema":{"rule_group":{"type":"TypeList","optional":true,"elem":{"schema":{"excluded_rules":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"rule_group_name":{"type":"TypeString","required":true}}}},"type":{"type":"TypeString","optional":true,"default":"OWASP"},"version":{"type":"TypeString","optional":true,"default":"3.2"}}},"maxItems":1},"match_variable":{"type":"TypeString","required":true},"selector":{"type":"TypeString","required":true},"selector_match_operator":{"type":"TypeString","required":true}}}},"managed_rule_set":{"type":"TypeList","required":true,"elem":{"schema":{"rule_group_override":{"type":"TypeList","optional":true,"elem":{"schema":{"rule":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true},"enabled":{"type":"TypeBool","optional":true,"default":false},"id":{"type":"TypeString","required":true}}}},"rule_group_name":{"type":"TypeString","required":true}}}},"type":{"type":"TypeString","optional":true,"default":"OWASP"},"version":{"type":"TypeString","required":true}}}}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"path_based_rule_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"policy_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"file_upload_limit_in_mb":{"type":"TypeInt","optional":true,"default":100},"js_challenge_cookie_expiration_in_minutes":{"type":"TypeInt","optional":true,"default":30},"log_scrubbing":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"rule":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true},"match_variable":{"type":"TypeString","required":true},"selector":{"type":"TypeString","optional":true,"description":"When matchVariable is a collection, operator used to specify which elements in the collection this rule applies to."},"selector_match_operator":{"type":"TypeString","optional":true,"default":"Equals"}}}}}},"maxItems":1},"max_request_body_size_in_kb":{"type":"TypeInt","optional":true,"default":128},"mode":{"type":"TypeString","optional":true,"default":"Prevention"},"request_body_check":{"type":"TypeBool","optional":true,"default":true},"request_body_enforcement":{"type":"TypeBool","optional":true,"default":true},"request_body_inspect_limit_in_kb":{"type":"TypeInt","optional":true,"default":128}}},"maxItems":1},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_web_pubsub":{"schema":{"aad_auth_enabled":{"type":"TypeBool","optional":true,"default":true},"capacity":{"type":"TypeInt","optional":true,"default":1},"external_ip":{"type":"TypeString","computed":true},"hostname":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"live_trace":{"type":"TypeList","optional":true,"elem":{"schema":{"connectivity_logs_enabled":{"type":"TypeBool","optional":true,"default":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"http_request_logs_enabled":{"type":"TypeBool","optional":true,"default":true},"messaging_logs_enabled":{"type":"TypeBool","optional":true,"default":true}}},"maxItems":1},"local_auth_enabled":{"type":"TypeBool","optional":true,"default":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"primary_access_key":{"type":"TypeString","computed":true},"primary_connection_string":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"public_port":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secondary_access_key":{"type":"TypeString","computed":true},"secondary_connection_string":{"type":"TypeString","computed":true},"server_port":{"type":"TypeInt","computed":true},"sku":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tls_client_cert_enabled":{"type":"TypeBool","optional":true,"default":false},"version":{"type":"TypeString","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_web_pubsub_custom_certificate":{"schema":{"certificate_version":{"type":"TypeString","computed":true},"custom_certificate_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"web_pubsub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_web_pubsub_custom_domain":{"schema":{"domain_name":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"web_pubsub_custom_certificate_id":{"type":"TypeString","required":true,"forceNew":true},"web_pubsub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30}},"azurerm_web_pubsub_hub":{"schema":{"anonymous_connections_enabled":{"type":"TypeBool","optional":true,"default":false},"event_handler":{"type":"TypeList","optional":true,"elem":{"schema":{"auth":{"type":"TypeList","optional":true,"elem":{"schema":{"managed_identity_id":{"type":"TypeString","required":true}}},"maxItems":1,"minItems":1},"system_events":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"url_template":{"type":"TypeString","required":true},"user_event_pattern":{"type":"TypeString","optional":true}}}},"event_listener":{"type":"TypeList","optional":true,"elem":{"schema":{"eventhub_name":{"type":"TypeString","required":true},"eventhub_namespace_name":{"type":"TypeString","required":true},"system_event_name_filter":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"user_event_name_filter":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"web_pubsub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_web_pubsub_network_acl":{"schema":{"default_action":{"type":"TypeString","optional":true,"default":"Deny"},"private_endpoint":{"type":"TypeSet","optional":true,"elem":{"schema":{"allowed_request_types":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"denied_request_types":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"id":{"type":"TypeString","required":true}}}},"public_network":{"type":"TypeList","required":true,"elem":{"schema":{"allowed_request_types":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"denied_request_types":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"web_pubsub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_web_pubsub_shared_private_link_resource":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"request_message":{"type":"TypeString","optional":true},"status":{"type":"TypeString","computed":true},"subresource_name":{"type":"TypeString","required":true,"forceNew":true},"target_resource_id":{"type":"TypeString","required":true,"forceNew":true},"web_pubsub_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_windows_function_app":{"schema":{"app_settings":{"type":"TypeMap","optional":true,"description":"A map of key-value pairs for [App Settings](https://docs.microsoft.com/en-us/azure/azure-functions/functions-app-settings) and custom values.","elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`."}}},"maxItems":1},"additional_login_parameters":{"type":"TypeMap","optional":true,"description":"Specifies a map of Login Parameters to send to the OpenID Connect authorization endpoint when a user logs in.","elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","optional":true,"description":"The default authentication provider to use when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`.","computed":true},"enabled":{"type":"TypeBool","required":true,"description":"Should the Authentication / Authorization feature be enabled?"},"facebook":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret":{"type":"TypeString","optional":true,"description":"The App Secret of the Facebook app used for Facebook Login. Cannot be specified with `app_secret_setting_name`."},"app_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login. Cannot be specified with `app_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"github":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret of the GitHub app used for GitHub Login. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret":{"type":"TypeString","optional":true,"description":"The client secret associated with the Google web application. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for Google Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","elem":{"type":"TypeString"}}}},"maxItems":1},"issuer":{"type":"TypeString","optional":true,"description":"The OpenID Connect Issuer URI that represents the entity which issues access tokens."},"microsoft":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret":{"type":"TypeString","optional":true,"description":"The OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"The list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, `wl.basic` is used as the default scope.","elem":{"type":"TypeString"}}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true,"description":"The RuntimeVersion of the Authentication / Authorization feature in use.","computed":true},"token_refresh_extension_hours":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Windows Web App durably store platform-specific security tokens that are obtained during login flows? Defaults to `false`."},"twitter":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret":{"type":"TypeString","optional":true,"description":"The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`."},"consumer_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`."}}},"maxItems":1},"unauthenticated_client_action":{"type":"TypeString","optional":true,"description":"The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`.","computed":true}}},"maxItems":1},"auth_settings_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_applications":{"type":"TypeList","optional":true,"description":"The list of allowed Applications for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"allowed_groups":{"type":"TypeList","optional":true,"description":"The list of allowed Group Names for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_identities":{"type":"TypeList","optional":true,"description":"The list of allowed Identities for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret_certificate_thumbprint":{"type":"TypeString","optional":true,"description":"The thumbprint of the certificate used for signing purposes."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client."},"jwt_allowed_client_applications":{"type":"TypeList","optional":true,"description":"A list of Allowed Client Applications in the JWT Claim.","elem":{"type":"TypeString"}},"jwt_allowed_groups":{"type":"TypeList","optional":true,"description":"A list of Allowed Groups in the JWT Claim.","elem":{"type":"TypeString"}},"login_parameters":{"type":"TypeMap","optional":true,"description":"A map of key-value pairs to send to the Authorisation Endpoint when a user logs in.","elem":{"type":"TypeString"}},"tenant_auth_endpoint":{"type":"TypeString","required":true,"description":"The Azure Tenant Endpoint for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`."},"www_authentication_disabled":{"type":"TypeBool","optional":true,"description":"Should the www-authenticate provider should be omitted from the request? Defaults to `false`"}}},"maxItems":1},"apple_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Apple web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Apple Login."},"login_scopes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"auth_enabled":{"type":"TypeBool","optional":true,"description":"Should the AuthV2 Settings be enabled. Defaults to `false`"},"azure_static_web_app_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Static Web App Authentication."}}},"maxItems":1},"config_file_path":{"type":"TypeString","optional":true,"description":"The path to the App Auth settings. **Note:** Relative Paths are evaluated from the Site Root directory."},"custom_oidc_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"authorisation_endpoint":{"type":"TypeString","description":"The endpoint to make the Authorisation Request.","computed":true},"certification_uri":{"type":"TypeString","description":"The endpoint that provides the keys necessary to validate the token.","computed":true},"client_credential_method":{"type":"TypeString","description":"The Client Credential Method used. Currently the only supported value is `ClientSecretPost`.","computed":true},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with this Custom OIDC."},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the secret for this Custom OIDC Client.","computed":true},"issuer_endpoint":{"type":"TypeString","description":"The endpoint that issued the Token.","computed":true},"name":{"type":"TypeString","required":true,"description":"The name of the Custom OIDC Authentication Provider."},"name_claim_type":{"type":"TypeString","optional":true,"description":"The name of the claim that contains the users name."},"openid_configuration_endpoint":{"type":"TypeString","required":true,"description":"The endpoint that contains all the configuration endpoints for this Custom OIDC provider."},"scopes":{"type":"TypeList","optional":true,"description":"The list of the scopes that should be requested while authenticating.","elem":{"type":"TypeString"}},"token_endpoint":{"type":"TypeString","description":"The endpoint used to request a Token.","computed":true}}}},"default_provider":{"type":"TypeString","optional":true,"description":"The Default Authentication Provider to use when the `unauthenticated_action` is set to `RedirectToLoginPage`. Possible values include: `apple`, `azureactivedirectory`, `facebook`, `github`, `google`, `twitter` and the `name` of your `custom_oidc_v2` provider."},"excluded_paths":{"type":"TypeList","optional":true,"description":"The paths which should be excluded from the `unauthenticated_action` when it is set to `RedirectToLoginPage`.","elem":{"type":"TypeString"}},"facebook_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login."},"graph_api_version":{"type":"TypeString","optional":true,"description":"The version of the Facebook API to be used while logging in.","computed":true},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"forward_proxy_convention":{"type":"TypeString","optional":true,"default":"NoProxy","description":"The convention used to determine the url of the request made. Possible values include `ForwardProxyConventionNoProxy`, `ForwardProxyConventionStandard`, `ForwardProxyConventionCustom`. Defaults to `ForwardProxyConventionNoProxy`"},"forward_proxy_custom_host_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the host of the request."},"forward_proxy_custom_scheme_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the scheme of the request."},"github_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Google Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of Login scopes that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"http_route_api_prefix":{"type":"TypeString","optional":true,"default":"/.auth","description":"The prefix that should precede all the authentication and authorisation paths. Defaults to `/.auth`"},"login":{"type":"TypeList","required":true,"elem":{"schema":{"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"External URLs that can be redirected to as part of logging in or logging out of the app. This is an advanced setting typically only needed by Windows Store application backends. **Note:** URLs within the current domain are always implicitly allowed.","elem":{"type":"TypeString"}},"cookie_expiration_convention":{"type":"TypeString","optional":true,"default":"FixedTime","description":"The method by which cookies expire. Possible values include: `FixedTime`, and `IdentityProviderDerived`. Defaults to `FixedTime`."},"cookie_expiration_time":{"type":"TypeString","optional":true,"default":"08:00:00","description":"The time after the request is made when the session cookie should expire. Defaults to `08:00:00`."},"logout_endpoint":{"type":"TypeString","optional":true,"description":"The endpoint to which logout requests should be made."},"nonce_expiration_time":{"type":"TypeString","optional":true,"default":"00:05:00","description":"The time after the request is made when the nonce should expire. Defaults to `00:05:00`."},"preserve_url_fragments_for_logins":{"type":"TypeBool","optional":true,"default":false,"description":"Should the fragments from the request be preserved after the login request is made. Defaults to `false`."},"token_refresh_extension_time":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Token Store configuration Enabled. Defaults to `false`"},"token_store_path":{"type":"TypeString","optional":true,"description":"The directory path in the App Filesystem in which the tokens will be stored."},"token_store_sas_setting_name":{"type":"TypeString","optional":true,"description":"The name of the app setting which contains the SAS URL of the blob storage containing the tokens."},"validate_nonce":{"type":"TypeBool","optional":true,"default":true,"description":"Should the nonce be validated while completing the login flow. Defaults to `true`."}}},"maxItems":1},"microsoft_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Microsoft Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication."},"login_scopes":{"type":"TypeList","optional":true,"description":"The list of Login scopes that will be requested as part of Microsoft Account authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"require_authentication":{"type":"TypeBool","optional":true,"description":"Should the authentication flow be used for all requests."},"require_https":{"type":"TypeBool","optional":true,"default":true,"description":"Should HTTPS be required on connections? Defaults to true."},"runtime_version":{"type":"TypeString","optional":true,"default":"~1","description":"The Runtime Version of the Authentication and Authorisation feature of this App. Defaults to `~1`"},"twitter_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in."}}},"maxItems":1},"unauthenticated_action":{"type":"TypeString","optional":true,"default":"RedirectToLoginPage","description":"The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`."}}},"maxItems":1},"backup":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should this backup job be enabled?"},"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Backup."},"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","required":true,"description":"How often the backup should be executed (e.g. for weekly backup, this should be set to `7` and `frequency_unit` should be set to `Day`)."},"frequency_unit":{"type":"TypeString","required":true,"description":"The unit of time for how often the backup should take place. Possible values include: `Day` and `Hour`."},"keep_at_least_one_backup":{"type":"TypeBool","optional":true,"default":false,"description":"Should the service keep at least one backup, regardless of age of backup. Defaults to `false`."},"last_execution_time":{"type":"TypeString","description":"The time the backup was last attempted.","computed":true},"retention_period_days":{"type":"TypeInt","optional":true,"default":30,"description":"After how many days backups should be deleted."},"start_time":{"type":"TypeString","optional":true,"description":"When the schedule should start working in RFC-3339 format.","computed":true}}},"maxItems":1},"storage_account_url":{"type":"TypeString","required":true,"description":"The SAS URL to the container."}}},"maxItems":1},"builtin_logging_enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should built in logging be enabled. Configures `AzureWebJobsDashboard` app setting based on the configured storage setting"},"client_certificate_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the function app use Client Certificates"},"client_certificate_exclusion_paths":{"type":"TypeString","optional":true,"description":"Paths to exclude when using client certificates, separated by ;"},"client_certificate_mode":{"type":"TypeString","optional":true,"default":"Optional","description":"The mode of the Function App's client certificates requirement for incoming requests. Possible values are `Required`, `Optional`, and `OptionalInteractiveUser` "},"connection_string":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Connection."},"type":{"type":"TypeString","required":true,"description":"Type of database. Possible values include: `MySQL`, `SQLServer`, `SQLAzure`, `Custom`, `NotificationHub`, `ServiceBus`, `EventHub`, `APIHub`, `DocDb`, `RedisCache`, and `PostgreSQL`."},"value":{"type":"TypeString","required":true,"description":"The connection string value."}}}},"content_share_force_disabled":{"type":"TypeBool","optional":true,"default":false,"description":"Force disable the content share settings."},"custom_domain_verification_id":{"type":"TypeString","computed":true},"daily_memory_time_quota":{"type":"TypeInt","optional":true,"default":0,"description":"The amount of memory in gigabyte-seconds that your application is allowed to consume per day. Setting this value only affects function apps in Consumption Plans."},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Is the Windows Function App enabled."},"ftp_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"functions_extension_version":{"type":"TypeString","optional":true,"default":"~4","description":"The runtime version associated with the Function App."},"hosting_environment_id":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","optional":true,"description":"Can the Function App only be accessed via HTTPS?","computed":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_reference_identity_id":{"type":"TypeString","optional":true,"description":"The User Assigned Identity to use for Key Vault access.","computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"description":"Specifies the name of the Function App.","forceNew":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_plan_id":{"type":"TypeString","required":true,"description":"The ID of the App Service Plan within which to create this Function App"},"site_config":{"type":"TypeList","required":true,"elem":{"schema":{"always_on":{"type":"TypeBool","optional":true,"description":"If this Windows Web App is Always On enabled. Defaults to `false`.","computed":true},"api_definition_url":{"type":"TypeString","optional":true,"description":"The URL of the API definition that describes this Windows Function App."},"api_management_api_id":{"type":"TypeString","optional":true,"description":"The ID of the API Management API for this Windows Function App."},"app_command_line":{"type":"TypeString","optional":true,"description":"The program and any arguments used to launch this app via the command line. (Example `node myapp.js`)."},"app_scale_limit":{"type":"TypeInt","optional":true,"description":"The number of workers this function app can scale out to. Only applicable to apps on the Consumption and Premium plan.","computed":true},"app_service_logs":{"type":"TypeList","optional":true,"elem":{"schema":{"disk_quota_mb":{"type":"TypeInt","optional":true,"default":35,"description":"The amount of disk space to use for logs. Valid values are between `25` and `100`."},"retention_period_days":{"type":"TypeInt","optional":true,"description":"The retention period for logs in days. Valid values are between `0` and `99999`. Defaults to `0` (never delete)."}}},"maxItems":1},"application_insights_connection_string":{"type":"TypeString","optional":true,"description":"The Connection String for linking the Windows Function App to Application Insights."},"application_insights_key":{"type":"TypeString","optional":true,"description":"The Instrumentation Key for connecting the Windows Function App to Application Insights."},"application_stack":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"dotnet_version":{"type":"TypeString","optional":true,"default":"v4.0","description":"The version of .Net. Possible values are `v3.0`, `v4.0`, `v6.0` and `v7.0`"},"java_version":{"type":"TypeString","optional":true,"description":"The version of Java to use. Possible values are `1.8`, `11` and `17`"},"node_version":{"type":"TypeString","optional":true,"description":"The version of Node to use. Possible values include `12`, `14`, `16` and `18`"},"powershell_core_version":{"type":"TypeString","optional":true,"description":"The PowerShell Core version to use. Possible values are `7`, `7.2`, and `7.4`"},"use_custom_runtime":{"type":"TypeBool","optional":true,"description":"Does the Function App use a custom Application Stack?","computed":true},"use_dotnet_isolated_runtime":{"type":"TypeBool","optional":true,"description":"Should the DotNet process use an isolated runtime. Defaults to `false`.","computed":true}}},"maxItems":1},"cors":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","optional":true,"description":"Specifies a list of origins that should be allowed to make cross-origin calls.","elem":{"type":"TypeString"},"minItems":1},"support_credentials":{"type":"TypeBool","optional":true,"default":false,"description":"Are credentials allowed in CORS requests? Defaults to `false`."}}},"maxItems":1},"default_documents":{"type":"TypeList","optional":true,"description":"Specifies a list of Default Documents for the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"detailed_error_logging_enabled":{"type":"TypeBool","description":"Is detailed error logging enabled","computed":true},"elastic_instance_minimum":{"type":"TypeInt","optional":true,"description":"The number of minimum instances for this Windows Function App. Only affects apps on Elastic Premium plans.","computed":true},"ftps_state":{"type":"TypeString","optional":true,"default":"Disabled","description":"State of FTP / FTPS service for this function app. Possible values include: `AllAllowed`, `FtpsOnly` and `Disabled`. Defaults to `Disabled`."},"health_check_eviction_time_in_min":{"type":"TypeInt","optional":true,"description":"The amount of time in minutes that a node is unhealthy before being removed from the load balancer. Possible values are between `2` and `10`. Only valid in conjunction with `health_check_path`"},"health_check_path":{"type":"TypeString","optional":true,"description":"The path to be checked for this function app health."},"http2_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Specifies if the http2 protocol should be enabled. Defaults to `false`."},"ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"load_balancing_mode":{"type":"TypeString","optional":true,"default":"LeastRequests","description":"The Site load balancing mode. Possible values include: `WeightedRoundRobin`, `LeastRequests`, `LeastResponseTime`, `WeightedTotalTraffic`, `RequestHash`, `PerSiteRoundRobin`. Defaults to `LeastRequests` if omitted."},"managed_pipeline_mode":{"type":"TypeString","optional":true,"default":"Integrated","description":"The Managed Pipeline mode. Possible values include: `Integrated`, `Classic`. Defaults to `Integrated`."},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2","description":"The configures the minimum version of TLS required for SSL requests. Possible values include: `1.0`, `1.1`, and `1.2`. Defaults to `1.2`."},"pre_warmed_instance_count":{"type":"TypeInt","optional":true,"description":"The number of pre-warmed instances for this function app. Only affects apps on an Elastic Premium plan.","computed":true},"remote_debugging_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should Remote Debugging be enabled. Defaults to `false`."},"remote_debugging_version":{"type":"TypeString","optional":true,"description":"The Remote Debugging Version. Possible values include `VS2017`, `VS2019`, and `VS2022`","computed":true},"runtime_scale_monitoring_enabled":{"type":"TypeBool","optional":true,"description":"Should Functions Runtime Scale Monitoring be enabled."},"scm_ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"scm_ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2","description":"Configures the minimum version of TLS required for SSL requests to the SCM site Possible values include: `1.0`, `1.1`, and `1.2`. Defaults to `1.2`."},"scm_type":{"type":"TypeString","description":"The SCM Type in use by the Windows Function App.","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Windows Function App `ip_restriction` configuration be used for the SCM also."},"use_32_bit_worker":{"type":"TypeBool","optional":true,"default":true,"description":"Should the Windows Web App use a 32-bit worker."},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied? Defaults to `false`."},"websockets_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should Web Sockets be enabled. Defaults to `false`."},"windows_fx_version":{"type":"TypeString","description":"The Windows FX Version string.","computed":true},"worker_count":{"type":"TypeInt","optional":true,"description":"The number of Workers for this Windows Function App.","computed":true}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The Site Credentials Username used for publishing.","computed":true},"password":{"type":"TypeString","description":"The Site Credentials Password used for publishing.","computed":true}}}},"sticky_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"app_setting_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"connection_string_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1}}},"maxItems":1},"storage_account":{"type":"TypeSet","optional":true,"elem":{"schema":{"access_key":{"type":"TypeString","required":true},"account_name":{"type":"TypeString","required":true},"mount_path":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"share_name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"storage_account_access_key":{"type":"TypeString","optional":true,"description":"The access key which will be used to access the storage account for the Function App."},"storage_account_name":{"type":"TypeString","optional":true,"description":"The backend storage account name which will be used by this Function App."},"storage_key_vault_secret_id":{"type":"TypeString","optional":true,"description":"The Key Vault Secret ID, including version, that contains the Connection String to connect to the storage account for this Function App."},"storage_uses_managed_identity":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Function App use its Managed Identity to access storage?"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_network_subnet_id":{"type":"TypeString","optional":true},"vnet_image_pull_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Is container image pull over virtual network enabled? Defaults to `false`."},"webdeploy_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"zip_deploy_file":{"type":"TypeString","optional":true,"description":"The local path and filename of the Zip packaged application to deploy to this Windows Function App. **Note:** Using this value requires `WEBSITE_RUN_FROM_PACKAGE=1` to be set on the App in `app_settings`.","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_windows_function_app_slot":{"schema":{"app_settings":{"type":"TypeMap","optional":true,"description":"A map of key-value pairs for [App Settings](https://docs.microsoft.com/en-us/azure/azure-functions/functions-app-settings) and custom values.","elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`."}}},"maxItems":1},"additional_login_parameters":{"type":"TypeMap","optional":true,"description":"Specifies a map of Login Parameters to send to the OpenID Connect authorization endpoint when a user logs in.","elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","optional":true,"description":"The default authentication provider to use when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`.","computed":true},"enabled":{"type":"TypeBool","required":true,"description":"Should the Authentication / Authorization feature be enabled?"},"facebook":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret":{"type":"TypeString","optional":true,"description":"The App Secret of the Facebook app used for Facebook Login. Cannot be specified with `app_secret_setting_name`."},"app_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login. Cannot be specified with `app_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"github":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret of the GitHub app used for GitHub Login. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret":{"type":"TypeString","optional":true,"description":"The client secret associated with the Google web application. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for Google Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","elem":{"type":"TypeString"}}}},"maxItems":1},"issuer":{"type":"TypeString","optional":true,"description":"The OpenID Connect Issuer URI that represents the entity which issues access tokens."},"microsoft":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret":{"type":"TypeString","optional":true,"description":"The OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"The list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, `wl.basic` is used as the default scope.","elem":{"type":"TypeString"}}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true,"description":"The RuntimeVersion of the Authentication / Authorization feature in use.","computed":true},"token_refresh_extension_hours":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Windows Web App durably store platform-specific security tokens that are obtained during login flows? Defaults to `false`."},"twitter":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret":{"type":"TypeString","optional":true,"description":"The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`."},"consumer_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`."}}},"maxItems":1},"unauthenticated_client_action":{"type":"TypeString","optional":true,"description":"The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`.","computed":true}}},"maxItems":1},"auth_settings_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_applications":{"type":"TypeList","optional":true,"description":"The list of allowed Applications for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"allowed_groups":{"type":"TypeList","optional":true,"description":"The list of allowed Group Names for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_identities":{"type":"TypeList","optional":true,"description":"The list of allowed Identities for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret_certificate_thumbprint":{"type":"TypeString","optional":true,"description":"The thumbprint of the certificate used for signing purposes."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client."},"jwt_allowed_client_applications":{"type":"TypeList","optional":true,"description":"A list of Allowed Client Applications in the JWT Claim.","elem":{"type":"TypeString"}},"jwt_allowed_groups":{"type":"TypeList","optional":true,"description":"A list of Allowed Groups in the JWT Claim.","elem":{"type":"TypeString"}},"login_parameters":{"type":"TypeMap","optional":true,"description":"A map of key-value pairs to send to the Authorisation Endpoint when a user logs in.","elem":{"type":"TypeString"}},"tenant_auth_endpoint":{"type":"TypeString","required":true,"description":"The Azure Tenant Endpoint for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`."},"www_authentication_disabled":{"type":"TypeBool","optional":true,"description":"Should the www-authenticate provider should be omitted from the request? Defaults to `false`"}}},"maxItems":1},"apple_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Apple web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Apple Login."},"login_scopes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"auth_enabled":{"type":"TypeBool","optional":true,"description":"Should the AuthV2 Settings be enabled. Defaults to `false`"},"azure_static_web_app_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Static Web App Authentication."}}},"maxItems":1},"config_file_path":{"type":"TypeString","optional":true,"description":"The path to the App Auth settings. **Note:** Relative Paths are evaluated from the Site Root directory."},"custom_oidc_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"authorisation_endpoint":{"type":"TypeString","description":"The endpoint to make the Authorisation Request.","computed":true},"certification_uri":{"type":"TypeString","description":"The endpoint that provides the keys necessary to validate the token.","computed":true},"client_credential_method":{"type":"TypeString","description":"The Client Credential Method used. Currently the only supported value is `ClientSecretPost`.","computed":true},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with this Custom OIDC."},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the secret for this Custom OIDC Client.","computed":true},"issuer_endpoint":{"type":"TypeString","description":"The endpoint that issued the Token.","computed":true},"name":{"type":"TypeString","required":true,"description":"The name of the Custom OIDC Authentication Provider."},"name_claim_type":{"type":"TypeString","optional":true,"description":"The name of the claim that contains the users name."},"openid_configuration_endpoint":{"type":"TypeString","required":true,"description":"The endpoint that contains all the configuration endpoints for this Custom OIDC provider."},"scopes":{"type":"TypeList","optional":true,"description":"The list of the scopes that should be requested while authenticating.","elem":{"type":"TypeString"}},"token_endpoint":{"type":"TypeString","description":"The endpoint used to request a Token.","computed":true}}}},"default_provider":{"type":"TypeString","optional":true,"description":"The Default Authentication Provider to use when the `unauthenticated_action` is set to `RedirectToLoginPage`. Possible values include: `apple`, `azureactivedirectory`, `facebook`, `github`, `google`, `twitter` and the `name` of your `custom_oidc_v2` provider."},"excluded_paths":{"type":"TypeList","optional":true,"description":"The paths which should be excluded from the `unauthenticated_action` when it is set to `RedirectToLoginPage`.","elem":{"type":"TypeString"}},"facebook_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login."},"graph_api_version":{"type":"TypeString","optional":true,"description":"The version of the Facebook API to be used while logging in.","computed":true},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"forward_proxy_convention":{"type":"TypeString","optional":true,"default":"NoProxy","description":"The convention used to determine the url of the request made. Possible values include `ForwardProxyConventionNoProxy`, `ForwardProxyConventionStandard`, `ForwardProxyConventionCustom`. Defaults to `ForwardProxyConventionNoProxy`"},"forward_proxy_custom_host_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the host of the request."},"forward_proxy_custom_scheme_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the scheme of the request."},"github_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Google Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of Login scopes that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"http_route_api_prefix":{"type":"TypeString","optional":true,"default":"/.auth","description":"The prefix that should precede all the authentication and authorisation paths. Defaults to `/.auth`"},"login":{"type":"TypeList","required":true,"elem":{"schema":{"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"External URLs that can be redirected to as part of logging in or logging out of the app. This is an advanced setting typically only needed by Windows Store application backends. **Note:** URLs within the current domain are always implicitly allowed.","elem":{"type":"TypeString"}},"cookie_expiration_convention":{"type":"TypeString","optional":true,"default":"FixedTime","description":"The method by which cookies expire. Possible values include: `FixedTime`, and `IdentityProviderDerived`. Defaults to `FixedTime`."},"cookie_expiration_time":{"type":"TypeString","optional":true,"default":"08:00:00","description":"The time after the request is made when the session cookie should expire. Defaults to `08:00:00`."},"logout_endpoint":{"type":"TypeString","optional":true,"description":"The endpoint to which logout requests should be made."},"nonce_expiration_time":{"type":"TypeString","optional":true,"default":"00:05:00","description":"The time after the request is made when the nonce should expire. Defaults to `00:05:00`."},"preserve_url_fragments_for_logins":{"type":"TypeBool","optional":true,"default":false,"description":"Should the fragments from the request be preserved after the login request is made. Defaults to `false`."},"token_refresh_extension_time":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Token Store configuration Enabled. Defaults to `false`"},"token_store_path":{"type":"TypeString","optional":true,"description":"The directory path in the App Filesystem in which the tokens will be stored."},"token_store_sas_setting_name":{"type":"TypeString","optional":true,"description":"The name of the app setting which contains the SAS URL of the blob storage containing the tokens."},"validate_nonce":{"type":"TypeBool","optional":true,"default":true,"description":"Should the nonce be validated while completing the login flow. Defaults to `true`."}}},"maxItems":1},"microsoft_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Microsoft Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication."},"login_scopes":{"type":"TypeList","optional":true,"description":"The list of Login scopes that will be requested as part of Microsoft Account authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"require_authentication":{"type":"TypeBool","optional":true,"description":"Should the authentication flow be used for all requests."},"require_https":{"type":"TypeBool","optional":true,"default":true,"description":"Should HTTPS be required on connections? Defaults to true."},"runtime_version":{"type":"TypeString","optional":true,"default":"~1","description":"The Runtime Version of the Authentication and Authorisation feature of this App. Defaults to `~1`"},"twitter_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in."}}},"maxItems":1},"unauthenticated_action":{"type":"TypeString","optional":true,"default":"RedirectToLoginPage","description":"The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`."}}},"maxItems":1},"backup":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should this backup job be enabled?"},"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Backup."},"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","required":true,"description":"How often the backup should be executed (e.g. for weekly backup, this should be set to `7` and `frequency_unit` should be set to `Day`)."},"frequency_unit":{"type":"TypeString","required":true,"description":"The unit of time for how often the backup should take place. Possible values include: `Day` and `Hour`."},"keep_at_least_one_backup":{"type":"TypeBool","optional":true,"default":false,"description":"Should the service keep at least one backup, regardless of age of backup. Defaults to `false`."},"last_execution_time":{"type":"TypeString","description":"The time the backup was last attempted.","computed":true},"retention_period_days":{"type":"TypeInt","optional":true,"default":30,"description":"After how many days backups should be deleted."},"start_time":{"type":"TypeString","optional":true,"description":"When the schedule should start working in RFC-3339 format.","computed":true}}},"maxItems":1},"storage_account_url":{"type":"TypeString","required":true,"description":"The SAS URL to the container."}}},"maxItems":1},"builtin_logging_enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should built in logging be enabled. Configures `AzureWebJobsDashboard` app setting based on the configured storage setting."},"client_certificate_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Function App Slot use Client Certificates."},"client_certificate_exclusion_paths":{"type":"TypeString","optional":true,"description":"Paths to exclude when using client certificates, separated by ;"},"client_certificate_mode":{"type":"TypeString","optional":true,"default":"Optional","description":"The mode of the Function App Slot's client certificates requirement for incoming requests. Possible values are `Required`, `Optional`, and `OptionalInteractiveUser`."},"connection_string":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Connection."},"type":{"type":"TypeString","required":true,"description":"Type of database. Possible values include: `MySQL`, `SQLServer`, `SQLAzure`, `Custom`, `NotificationHub`, `ServiceBus`, `EventHub`, `APIHub`, `DocDb`, `RedisCache`, and `PostgreSQL`."},"value":{"type":"TypeString","required":true,"description":"The connection string value."}}}},"content_share_force_disabled":{"type":"TypeBool","optional":true,"default":false,"description":"Force disable the content share settings."},"custom_domain_verification_id":{"type":"TypeString","description":"The identifier used by App Service to perform domain ownership verification via DNS TXT record.","computed":true},"daily_memory_time_quota":{"type":"TypeInt","optional":true,"default":0,"description":"The amount of memory in gigabyte-seconds that your application is allowed to consume per day. Setting this value only affects function apps in Consumption Plans."},"default_hostname":{"type":"TypeString","description":"The default hostname of the Windows Function App Slot.","computed":true},"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Is the Windows Function App Slot enabled."},"ftp_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"function_app_id":{"type":"TypeString","required":true,"description":"The ID of the Windows Function App this Slot is a member of.","forceNew":true},"functions_extension_version":{"type":"TypeString","optional":true,"default":"~4","description":"The runtime version associated with the Function App Slot."},"hosting_environment_id":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","optional":true,"default":false,"description":"Can the Function App Slot only be accessed via HTTPS?"},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_reference_identity_id":{"type":"TypeString","optional":true,"description":"The User Assigned Identity to use for Key Vault access.","computed":true},"kind":{"type":"TypeString","description":"The Kind value for this Windows Function App Slot.","computed":true},"name":{"type":"TypeString","required":true,"description":"Specifies the name of the Windows Function App Slot.","forceNew":true},"outbound_ip_address_list":{"type":"TypeList","description":"A list of outbound IP addresses. For example `[\"52.23.25.3\", \"52.143.43.12\"]`.","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","description":"A comma separated list of outbound IP addresses as a string. For example `52.23.25.3,52.143.43.12`.","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","description":"A list of possible outbound IP addresses, not all of which are necessarily in use. This is a superset of `outbound_ip_address_list`. For example `[\"52.23.25.3\", \"52.143.43.12\"]`.","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","description":"A comma separated list of possible outbound IP addresses as a string. For example `52.23.25.3,52.143.43.12,52.143.43.17`. This is a superset of `outbound_ip_addresses`. For example `[\"52.23.25.3\", \"52.143.43.12\",\"52.143.43.17\"]`.","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"service_plan_id":{"type":"TypeString","optional":true},"site_config":{"type":"TypeList","required":true,"elem":{"schema":{"always_on":{"type":"TypeBool","optional":true,"description":"If this Windows Web App is Always On enabled. Defaults to `false`.","computed":true},"api_definition_url":{"type":"TypeString","optional":true,"description":"The URL of the API definition that describes this Windows Function App."},"api_management_api_id":{"type":"TypeString","optional":true,"description":"The ID of the API Management API for this Windows Function App."},"app_command_line":{"type":"TypeString","optional":true,"description":"The program and any arguments used to launch this app via the command line. (Example `node myapp.js`)."},"app_scale_limit":{"type":"TypeInt","optional":true,"description":"The number of workers this function app can scale out to. Only applicable to apps on the Consumption and Premium plan.","computed":true},"app_service_logs":{"type":"TypeList","optional":true,"elem":{"schema":{"disk_quota_mb":{"type":"TypeInt","optional":true,"default":35,"description":"The amount of disk space to use for logs. Valid values are between `25` and `100`."},"retention_period_days":{"type":"TypeInt","optional":true,"description":"The retention period for logs in days. Valid values are between `0` and `99999`. Defaults to `0` (never delete)."}}},"maxItems":1},"application_insights_connection_string":{"type":"TypeString","optional":true,"description":"The Connection String for linking the Windows Function App to Application Insights."},"application_insights_key":{"type":"TypeString","optional":true,"description":"The Instrumentation Key for connecting the Windows Function App to Application Insights."},"application_stack":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"dotnet_version":{"type":"TypeString","optional":true,"default":"v4.0","description":"The version of .Net. Possible values are `v3.0`, `v4.0`, `v6.0` and `v7.0`"},"java_version":{"type":"TypeString","optional":true,"description":"The version of Java to use. Possible values are `1.8`, `11` and `17`"},"node_version":{"type":"TypeString","optional":true,"description":"The version of Node to use. Possible values include `12`, `14`, `16` and `18`"},"powershell_core_version":{"type":"TypeString","optional":true,"description":"The PowerShell Core version to use. Possible values are `7`, `7.2`, and `7.4`"},"use_custom_runtime":{"type":"TypeBool","optional":true,"description":"Does the Function App use a custom Application Stack?","computed":true},"use_dotnet_isolated_runtime":{"type":"TypeBool","optional":true,"description":"Should the DotNet process use an isolated runtime. Defaults to `false`.","computed":true}}},"maxItems":1},"auto_swap_slot_name":{"type":"TypeString","optional":true},"cors":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","optional":true,"description":"Specifies a list of origins that should be allowed to make cross-origin calls.","elem":{"type":"TypeString"},"minItems":1},"support_credentials":{"type":"TypeBool","optional":true,"default":false,"description":"Are credentials allowed in CORS requests? Defaults to `false`."}}},"maxItems":1},"default_documents":{"type":"TypeList","optional":true,"description":"Specifies a list of Default Documents for the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"detailed_error_logging_enabled":{"type":"TypeBool","description":"Is detailed error logging enabled","computed":true},"elastic_instance_minimum":{"type":"TypeInt","optional":true,"description":"The number of minimum instances for this Windows Function App. Only affects apps on Elastic Premium plans.","computed":true},"ftps_state":{"type":"TypeString","optional":true,"default":"Disabled","description":"State of FTP / FTPS service for this function app. Possible values include: `AllAllowed`, `FtpsOnly` and `Disabled`. Defaults to `Disabled`."},"health_check_eviction_time_in_min":{"type":"TypeInt","optional":true,"default":0,"description":"The amount of time in minutes that a node is unhealthy before being removed from the load balancer. Possible values are between `2` and `10`. Defaults to `10`. Only valid in conjunction with `health_check_path`"},"health_check_path":{"type":"TypeString","optional":true,"description":"The path to be checked for this function app health."},"http2_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Specifies if the http2 protocol should be enabled. Defaults to `false`."},"ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"load_balancing_mode":{"type":"TypeString","optional":true,"default":"LeastRequests","description":"The Site load balancing mode. Possible values include: `WeightedRoundRobin`, `LeastRequests`, `LeastResponseTime`, `WeightedTotalTraffic`, `RequestHash`, `PerSiteRoundRobin`. Defaults to `LeastRequests` if omitted."},"managed_pipeline_mode":{"type":"TypeString","optional":true,"default":"Integrated","description":"The Managed Pipeline mode. Possible values include: `Integrated`, `Classic`. Defaults to `Integrated`."},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2","description":"The configures the minimum version of TLS required for SSL requests. Possible values include: `1.0`, `1.1`, and `1.2`. Defaults to `1.2`."},"pre_warmed_instance_count":{"type":"TypeInt","optional":true,"description":"The number of pre-warmed instances for this function app. Only affects apps on an Elastic Premium plan.","computed":true},"remote_debugging_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should Remote Debugging be enabled. Defaults to `false`."},"remote_debugging_version":{"type":"TypeString","optional":true,"description":"The Remote Debugging Version. Possible values include `VS2017`, `VS2019`, and `VS2022`","computed":true},"runtime_scale_monitoring_enabled":{"type":"TypeBool","optional":true,"description":"Should Functions Runtime Scale Monitoring be enabled."},"scm_ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"scm_ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2","description":"Configures the minimum version of TLS required for SSL requests to the SCM site Possible values include: `1.0`, `1.1`, and `1.2`. Defaults to `1.2`."},"scm_type":{"type":"TypeString","description":"The SCM Type in use by the Windows Function App.","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Windows Function App `ip_restriction` configuration be used for the SCM also."},"use_32_bit_worker":{"type":"TypeBool","optional":true,"default":true,"description":"Should the Windows Function App use a 32-bit worker."},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied? Defaults to `false`."},"websockets_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should Web Sockets be enabled. Defaults to `false`."},"windows_fx_version":{"type":"TypeString","description":"The Windows FX Version string.","computed":true},"worker_count":{"type":"TypeInt","optional":true,"description":"The number of Workers for this Windows Function App.","computed":true}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The Site Credentials Username used for publishing.","computed":true},"password":{"type":"TypeString","description":"The Site Credentials Password used for publishing.","computed":true}}}},"storage_account":{"type":"TypeSet","optional":true,"elem":{"schema":{"access_key":{"type":"TypeString","required":true},"account_name":{"type":"TypeString","required":true},"mount_path":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"share_name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"storage_account_access_key":{"type":"TypeString","optional":true,"description":"The access key which will be used to access the storage account for the Function App Slot."},"storage_account_name":{"type":"TypeString","optional":true,"description":"The backend storage account name which will be used by this Function App Slot."},"storage_key_vault_secret_id":{"type":"TypeString","optional":true,"description":"The Key Vault Secret ID, including version, that contains the Connection String to connect to the storage account for this Function App."},"storage_uses_managed_identity":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Function App Slot use its Managed Identity to access storage?"},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_network_subnet_id":{"type":"TypeString","optional":true},"vnet_image_pull_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Is container image pull over virtual network enabled? Defaults to `false`."},"webdeploy_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_windows_virtual_machine":{"schema":{"additional_capabilities":{"type":"TypeList","optional":true,"elem":{"schema":{"hibernation_enabled":{"type":"TypeBool","optional":true,"default":false},"ultra_ssd_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"additional_unattend_content":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"content":{"type":"TypeString","required":true,"forceNew":true},"setting":{"type":"TypeString","required":true,"forceNew":true}}}},"admin_password":{"type":"TypeString","required":true,"forceNew":true},"admin_username":{"type":"TypeString","required":true,"forceNew":true},"allow_extension_operations":{"type":"TypeBool","optional":true,"default":true},"availability_set_id":{"type":"TypeString","optional":true,"forceNew":true},"boot_diagnostics":{"type":"TypeList","optional":true,"elem":{"schema":{"storage_account_uri":{"type":"TypeString","optional":true}}},"maxItems":1},"bypass_platform_safety_checks_on_user_schedule_enabled":{"type":"TypeBool","optional":true,"default":false},"capacity_reservation_group_id":{"type":"TypeString","optional":true},"computer_name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"custom_data":{"type":"TypeString","optional":true,"forceNew":true},"dedicated_host_group_id":{"type":"TypeString","optional":true},"dedicated_host_id":{"type":"TypeString","optional":true},"disk_controller_type":{"type":"TypeString","optional":true,"computed":true},"edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"enable_automatic_updates":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"encryption_at_host_enabled":{"type":"TypeBool","optional":true},"eviction_policy":{"type":"TypeString","optional":true,"forceNew":true},"extensions_time_budget":{"type":"TypeString","optional":true,"default":"PT1H30M"},"gallery_application":{"type":"TypeList","optional":true,"elem":{"schema":{"automatic_upgrade_enabled":{"type":"TypeBool","optional":true,"default":false},"configuration_blob_uri":{"type":"TypeString","optional":true},"order":{"type":"TypeInt","optional":true,"default":0},"tag":{"type":"TypeString","optional":true},"treat_failure_as_deployment_failure_enabled":{"type":"TypeBool","optional":true,"default":false},"version_id":{"type":"TypeString","required":true}}},"maxItems":100},"hotpatching_enabled":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"license_type":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"max_bid_price":{"type":"TypeFloat","optional":true,"default":-1},"name":{"type":"TypeString","required":true,"forceNew":true},"network_interface_ids":{"type":"TypeList","required":true,"elem":{"type":"TypeString"},"minItems":1},"os_disk":{"type":"TypeList","required":true,"elem":{"schema":{"caching":{"type":"TypeString","required":true},"diff_disk_settings":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"option":{"type":"TypeString","required":true,"forceNew":true},"placement":{"type":"TypeString","optional":true,"default":"CacheDisk","forceNew":true}}},"maxItems":1},"disk_encryption_set_id":{"type":"TypeString","optional":true},"disk_size_gb":{"type":"TypeInt","optional":true,"computed":true},"name":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"secure_vm_disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"security_encryption_type":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_type":{"type":"TypeString","required":true,"forceNew":true},"write_accelerator_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"os_image_notification":{"type":"TypeList","optional":true,"elem":{"schema":{"timeout":{"type":"TypeString","optional":true,"default":"PT15M"}}},"maxItems":1},"patch_assessment_mode":{"type":"TypeString","optional":true,"default":"ImageDefault"},"patch_mode":{"type":"TypeString","optional":true,"default":"AutomaticByOS"},"plan":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"product":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"platform_fault_domain":{"type":"TypeInt","optional":true,"default":-1,"forceNew":true},"priority":{"type":"TypeString","optional":true,"default":"Regular","forceNew":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"provision_vm_agent":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"proximity_placement_group_id":{"type":"TypeString","optional":true},"public_ip_address":{"type":"TypeString","computed":true},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"reboot_setting":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"secret":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeSet","required":true,"elem":{"schema":{"store":{"type":"TypeString","required":true},"url":{"type":"TypeString","required":true}}},"minItems":1},"key_vault_id":{"type":"TypeString","required":true}}}},"secure_boot_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"size":{"type":"TypeString","required":true},"source_image_id":{"type":"TypeString","optional":true,"forceNew":true},"source_image_reference":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"offer":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"termination_notification":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","required":true},"timeout":{"type":"TypeString","optional":true,"default":"PT5M"}}},"maxItems":1},"timezone":{"type":"TypeString","optional":true,"forceNew":true},"user_data":{"type":"TypeString","optional":true},"virtual_machine_id":{"type":"TypeString","computed":true},"virtual_machine_scale_set_id":{"type":"TypeString","optional":true},"vm_agent_platform_updates_enabled":{"type":"TypeBool","optional":true,"default":false},"vtpm_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"winrm_listener":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"certificate_url":{"type":"TypeString","optional":true,"forceNew":true},"protocol":{"type":"TypeString","required":true,"forceNew":true}}}},"zone":{"type":"TypeString","optional":true,"forceNew":true}},"timeouts":{"create":45,"read":5,"delete":45,"update":45}},"azurerm_windows_virtual_machine_scale_set":{"schema":{"additional_capabilities":{"type":"TypeList","optional":true,"elem":{"schema":{"ultra_ssd_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true}}},"maxItems":1},"additional_unattend_content":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"content":{"type":"TypeString","required":true,"forceNew":true},"setting":{"type":"TypeString","required":true,"forceNew":true}}}},"admin_password":{"type":"TypeString","required":true,"forceNew":true},"admin_username":{"type":"TypeString","required":true,"forceNew":true},"automatic_instance_repair":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"computed":true},"enabled":{"type":"TypeBool","required":true},"grace_period":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"automatic_os_upgrade_policy":{"type":"TypeList","optional":true,"elem":{"schema":{"disable_automatic_rollback":{"type":"TypeBool","required":true},"enable_automatic_os_upgrade":{"type":"TypeBool","required":true}}},"maxItems":1},"boot_diagnostics":{"type":"TypeList","optional":true,"elem":{"schema":{"storage_account_uri":{"type":"TypeString","optional":true}}},"maxItems":1},"capacity_reservation_group_id":{"type":"TypeString","optional":true,"forceNew":true},"computer_name_prefix":{"type":"TypeString","optional":true,"computed":true,"forceNew":true},"custom_data":{"type":"TypeString","optional":true},"data_disk":{"type":"TypeList","optional":true,"elem":{"schema":{"caching":{"type":"TypeString","required":true},"create_option":{"type":"TypeString","optional":true,"default":"Empty"},"disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"disk_size_gb":{"type":"TypeInt","required":true},"lun":{"type":"TypeInt","required":true},"name":{"type":"TypeString","optional":true},"storage_account_type":{"type":"TypeString","required":true},"ultra_ssd_disk_iops_read_write":{"type":"TypeInt","optional":true,"computed":true},"ultra_ssd_disk_mbps_read_write":{"type":"TypeInt","optional":true,"computed":true},"write_accelerator_enabled":{"type":"TypeBool","optional":true,"default":false}}}},"do_not_run_extensions_on_overprovisioned_machines":{"type":"TypeBool","optional":true,"default":false},"edge_zone":{"type":"TypeString","optional":true,"forceNew":true},"enable_automatic_updates":{"type":"TypeBool","optional":true,"default":true},"encryption_at_host_enabled":{"type":"TypeBool","optional":true},"eviction_policy":{"type":"TypeString","optional":true,"forceNew":true},"extension":{"type":"TypeSet","optional":true,"computed":true,"elem":{"schema":{"auto_upgrade_minor_version":{"type":"TypeBool","optional":true,"default":true},"automatic_upgrade_enabled":{"type":"TypeBool","optional":true,"default":false},"force_update_tag":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"protected_settings":{"type":"TypeString","optional":true},"protected_settings_from_key_vault":{"type":"TypeList","optional":true,"elem":{"schema":{"secret_url":{"type":"TypeString","required":true},"source_vault_id":{"type":"TypeString","required":true}}},"maxItems":1},"provision_after_extensions":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"publisher":{"type":"TypeString","required":true},"settings":{"type":"TypeString","optional":true},"type":{"type":"TypeString","required":true},"type_handler_version":{"type":"TypeString","required":true}}}},"extension_operations_enabled":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"extensions_time_budget":{"type":"TypeString","optional":true,"default":"PT1H30M"},"gallery_application":{"type":"TypeList","optional":true,"elem":{"schema":{"configuration_blob_uri":{"type":"TypeString","optional":true,"forceNew":true},"order":{"type":"TypeInt","optional":true,"default":0,"forceNew":true},"tag":{"type":"TypeString","optional":true,"forceNew":true},"version_id":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":100},"health_probe_id":{"type":"TypeString","optional":true},"host_group_id":{"type":"TypeString","optional":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"instances":{"type":"TypeInt","required":true},"license_type":{"type":"TypeString","optional":true},"location":{"type":"TypeString","required":true,"forceNew":true},"max_bid_price":{"type":"TypeFloat","optional":true,"default":-1},"name":{"type":"TypeString","required":true,"forceNew":true},"network_interface":{"type":"TypeList","required":true,"elem":{"schema":{"dns_servers":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"enable_accelerated_networking":{"type":"TypeBool","optional":true,"default":false},"enable_ip_forwarding":{"type":"TypeBool","optional":true,"default":false},"ip_configuration":{"type":"TypeList","required":true,"elem":{"schema":{"application_gateway_backend_address_pool_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"application_security_group_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":20},"load_balancer_backend_address_pool_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"load_balancer_inbound_nat_rules_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"primary":{"type":"TypeBool","optional":true,"default":false},"public_ip_address":{"type":"TypeList","optional":true,"elem":{"schema":{"domain_name_label":{"type":"TypeString","optional":true},"idle_timeout_in_minutes":{"type":"TypeInt","optional":true,"computed":true},"ip_tag":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"tag":{"type":"TypeString","required":true,"forceNew":true},"type":{"type":"TypeString","required":true,"forceNew":true}}}},"name":{"type":"TypeString","required":true},"public_ip_prefix_id":{"type":"TypeString","optional":true,"forceNew":true},"version":{"type":"TypeString","optional":true,"default":"IPv4","forceNew":true}}}},"subnet_id":{"type":"TypeString","optional":true},"version":{"type":"TypeString","optional":true,"default":"IPv4"}}}},"name":{"type":"TypeString","required":true,"forceNew":true},"network_security_group_id":{"type":"TypeString","optional":true},"primary":{"type":"TypeBool","optional":true,"default":false}}}},"os_disk":{"type":"TypeList","required":true,"elem":{"schema":{"caching":{"type":"TypeString","required":true},"diff_disk_settings":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"option":{"type":"TypeString","required":true,"forceNew":true},"placement":{"type":"TypeString","optional":true,"default":"CacheDisk","forceNew":true}}},"maxItems":1},"disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"disk_size_gb":{"type":"TypeInt","optional":true,"computed":true},"secure_vm_disk_encryption_set_id":{"type":"TypeString","optional":true,"forceNew":true},"security_encryption_type":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_type":{"type":"TypeString","required":true,"forceNew":true},"write_accelerator_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"overprovision":{"type":"TypeBool","optional":true,"default":true},"plan":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"forceNew":true},"product":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"platform_fault_domain_count":{"type":"TypeInt","optional":true,"computed":true,"forceNew":true},"priority":{"type":"TypeString","optional":true,"default":"Regular","forceNew":true},"provision_vm_agent":{"type":"TypeBool","optional":true,"default":true,"forceNew":true},"proximity_placement_group_id":{"type":"TypeString","optional":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"rolling_upgrade_policy":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"cross_zone_upgrades_enabled":{"type":"TypeBool","optional":true},"max_batch_instance_percent":{"type":"TypeInt","required":true},"max_unhealthy_instance_percent":{"type":"TypeInt","required":true},"max_unhealthy_upgraded_instance_percent":{"type":"TypeInt","required":true},"maximum_surge_instances_enabled":{"type":"TypeBool","optional":true},"pause_time_between_batches":{"type":"TypeString","required":true},"prioritize_unhealthy_instances_enabled":{"type":"TypeBool","optional":true}}},"maxItems":1},"scale_in":{"type":"TypeList","optional":true,"elem":{"schema":{"force_deletion_enabled":{"type":"TypeBool","optional":true,"default":false},"rule":{"type":"TypeString","optional":true,"default":"Default"}}},"maxItems":1},"secret":{"type":"TypeList","optional":true,"elem":{"schema":{"certificate":{"type":"TypeSet","required":true,"elem":{"schema":{"store":{"type":"TypeString","required":true},"url":{"type":"TypeString","required":true}}},"minItems":1},"key_vault_id":{"type":"TypeString","required":true}}}},"secure_boot_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"single_placement_group":{"type":"TypeBool","optional":true,"default":true},"sku":{"type":"TypeString","required":true},"source_image_id":{"type":"TypeString","optional":true},"source_image_reference":{"type":"TypeList","optional":true,"elem":{"schema":{"offer":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true},"version":{"type":"TypeString","required":true}}},"maxItems":1},"spot_restore":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"timeout":{"type":"TypeString","optional":true,"default":"PT1H","forceNew":true}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"termination_notification":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","required":true},"timeout":{"type":"TypeString","optional":true,"default":"PT5M"}}},"maxItems":1},"timezone":{"type":"TypeString","optional":true},"unique_id":{"type":"TypeString","computed":true},"upgrade_mode":{"type":"TypeString","optional":true,"default":"Manual","forceNew":true},"user_data":{"type":"TypeString","optional":true},"vtpm_enabled":{"type":"TypeBool","optional":true,"forceNew":true},"winrm_listener":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"certificate_url":{"type":"TypeString","optional":true,"forceNew":true},"protocol":{"type":"TypeString","required":true,"forceNew":true}}}},"zone_balance":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"zones":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_windows_web_app":{"schema":{"app_settings":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`."}}},"maxItems":1},"additional_login_parameters":{"type":"TypeMap","optional":true,"description":"Specifies a map of Login Parameters to send to the OpenID Connect authorization endpoint when a user logs in.","elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","optional":true,"description":"The default authentication provider to use when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`.","computed":true},"enabled":{"type":"TypeBool","required":true,"description":"Should the Authentication / Authorization feature be enabled?"},"facebook":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret":{"type":"TypeString","optional":true,"description":"The App Secret of the Facebook app used for Facebook Login. Cannot be specified with `app_secret_setting_name`."},"app_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login. Cannot be specified with `app_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"github":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret of the GitHub app used for GitHub Login. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret":{"type":"TypeString","optional":true,"description":"The client secret associated with the Google web application. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for Google Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","elem":{"type":"TypeString"}}}},"maxItems":1},"issuer":{"type":"TypeString","optional":true,"description":"The OpenID Connect Issuer URI that represents the entity which issues access tokens."},"microsoft":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret":{"type":"TypeString","optional":true,"description":"The OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"The list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, `wl.basic` is used as the default scope.","elem":{"type":"TypeString"}}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true,"description":"The RuntimeVersion of the Authentication / Authorization feature in use.","computed":true},"token_refresh_extension_hours":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Windows Web App durably store platform-specific security tokens that are obtained during login flows? Defaults to `false`."},"twitter":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret":{"type":"TypeString","optional":true,"description":"The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`."},"consumer_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`."}}},"maxItems":1},"unauthenticated_client_action":{"type":"TypeString","optional":true,"description":"The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`.","computed":true}}},"maxItems":1},"auth_settings_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_applications":{"type":"TypeList","optional":true,"description":"The list of allowed Applications for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"allowed_groups":{"type":"TypeList","optional":true,"description":"The list of allowed Group Names for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_identities":{"type":"TypeList","optional":true,"description":"The list of allowed Identities for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret_certificate_thumbprint":{"type":"TypeString","optional":true,"description":"The thumbprint of the certificate used for signing purposes."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client."},"jwt_allowed_client_applications":{"type":"TypeList","optional":true,"description":"A list of Allowed Client Applications in the JWT Claim.","elem":{"type":"TypeString"}},"jwt_allowed_groups":{"type":"TypeList","optional":true,"description":"A list of Allowed Groups in the JWT Claim.","elem":{"type":"TypeString"}},"login_parameters":{"type":"TypeMap","optional":true,"description":"A map of key-value pairs to send to the Authorisation Endpoint when a user logs in.","elem":{"type":"TypeString"}},"tenant_auth_endpoint":{"type":"TypeString","required":true,"description":"The Azure Tenant Endpoint for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`."},"www_authentication_disabled":{"type":"TypeBool","optional":true,"description":"Should the www-authenticate provider should be omitted from the request? Defaults to `false`"}}},"maxItems":1},"apple_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Apple web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Apple Login."},"login_scopes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"auth_enabled":{"type":"TypeBool","optional":true,"description":"Should the AuthV2 Settings be enabled. Defaults to `false`"},"azure_static_web_app_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Static Web App Authentication."}}},"maxItems":1},"config_file_path":{"type":"TypeString","optional":true,"description":"The path to the App Auth settings. **Note:** Relative Paths are evaluated from the Site Root directory."},"custom_oidc_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"authorisation_endpoint":{"type":"TypeString","description":"The endpoint to make the Authorisation Request.","computed":true},"certification_uri":{"type":"TypeString","description":"The endpoint that provides the keys necessary to validate the token.","computed":true},"client_credential_method":{"type":"TypeString","description":"The Client Credential Method used. Currently the only supported value is `ClientSecretPost`.","computed":true},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with this Custom OIDC."},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the secret for this Custom OIDC Client.","computed":true},"issuer_endpoint":{"type":"TypeString","description":"The endpoint that issued the Token.","computed":true},"name":{"type":"TypeString","required":true,"description":"The name of the Custom OIDC Authentication Provider."},"name_claim_type":{"type":"TypeString","optional":true,"description":"The name of the claim that contains the users name."},"openid_configuration_endpoint":{"type":"TypeString","required":true,"description":"The endpoint that contains all the configuration endpoints for this Custom OIDC provider."},"scopes":{"type":"TypeList","optional":true,"description":"The list of the scopes that should be requested while authenticating.","elem":{"type":"TypeString"}},"token_endpoint":{"type":"TypeString","description":"The endpoint used to request a Token.","computed":true}}}},"default_provider":{"type":"TypeString","optional":true,"description":"The Default Authentication Provider to use when the `unauthenticated_action` is set to `RedirectToLoginPage`. Possible values include: `apple`, `azureactivedirectory`, `facebook`, `github`, `google`, `twitter` and the `name` of your `custom_oidc_v2` provider."},"excluded_paths":{"type":"TypeList","optional":true,"description":"The paths which should be excluded from the `unauthenticated_action` when it is set to `RedirectToLoginPage`.","elem":{"type":"TypeString"}},"facebook_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login."},"graph_api_version":{"type":"TypeString","optional":true,"description":"The version of the Facebook API to be used while logging in.","computed":true},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"forward_proxy_convention":{"type":"TypeString","optional":true,"default":"NoProxy","description":"The convention used to determine the url of the request made. Possible values include `ForwardProxyConventionNoProxy`, `ForwardProxyConventionStandard`, `ForwardProxyConventionCustom`. Defaults to `ForwardProxyConventionNoProxy`"},"forward_proxy_custom_host_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the host of the request."},"forward_proxy_custom_scheme_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the scheme of the request."},"github_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Google Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of Login scopes that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"http_route_api_prefix":{"type":"TypeString","optional":true,"default":"/.auth","description":"The prefix that should precede all the authentication and authorisation paths. Defaults to `/.auth`"},"login":{"type":"TypeList","required":true,"elem":{"schema":{"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"External URLs that can be redirected to as part of logging in or logging out of the app. This is an advanced setting typically only needed by Windows Store application backends. **Note:** URLs within the current domain are always implicitly allowed.","elem":{"type":"TypeString"}},"cookie_expiration_convention":{"type":"TypeString","optional":true,"default":"FixedTime","description":"The method by which cookies expire. Possible values include: `FixedTime`, and `IdentityProviderDerived`. Defaults to `FixedTime`."},"cookie_expiration_time":{"type":"TypeString","optional":true,"default":"08:00:00","description":"The time after the request is made when the session cookie should expire. Defaults to `08:00:00`."},"logout_endpoint":{"type":"TypeString","optional":true,"description":"The endpoint to which logout requests should be made."},"nonce_expiration_time":{"type":"TypeString","optional":true,"default":"00:05:00","description":"The time after the request is made when the nonce should expire. Defaults to `00:05:00`."},"preserve_url_fragments_for_logins":{"type":"TypeBool","optional":true,"default":false,"description":"Should the fragments from the request be preserved after the login request is made. Defaults to `false`."},"token_refresh_extension_time":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Token Store configuration Enabled. Defaults to `false`"},"token_store_path":{"type":"TypeString","optional":true,"description":"The directory path in the App Filesystem in which the tokens will be stored."},"token_store_sas_setting_name":{"type":"TypeString","optional":true,"description":"The name of the app setting which contains the SAS URL of the blob storage containing the tokens."},"validate_nonce":{"type":"TypeBool","optional":true,"default":true,"description":"Should the nonce be validated while completing the login flow. Defaults to `true`."}}},"maxItems":1},"microsoft_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Microsoft Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication."},"login_scopes":{"type":"TypeList","optional":true,"description":"The list of Login scopes that will be requested as part of Microsoft Account authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"require_authentication":{"type":"TypeBool","optional":true,"description":"Should the authentication flow be used for all requests."},"require_https":{"type":"TypeBool","optional":true,"default":true,"description":"Should HTTPS be required on connections? Defaults to true."},"runtime_version":{"type":"TypeString","optional":true,"default":"~1","description":"The Runtime Version of the Authentication and Authorisation feature of this App. Defaults to `~1`"},"twitter_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in."}}},"maxItems":1},"unauthenticated_action":{"type":"TypeString","optional":true,"default":"RedirectToLoginPage","description":"The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`."}}},"maxItems":1},"backup":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should this backup job be enabled?"},"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Backup."},"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","required":true,"description":"How often the backup should be executed (e.g. for weekly backup, this should be set to `7` and `frequency_unit` should be set to `Day`)."},"frequency_unit":{"type":"TypeString","required":true,"description":"The unit of time for how often the backup should take place. Possible values include: `Day` and `Hour`."},"keep_at_least_one_backup":{"type":"TypeBool","optional":true,"default":false,"description":"Should the service keep at least one backup, regardless of age of backup. Defaults to `false`."},"last_execution_time":{"type":"TypeString","description":"The time the backup was last attempted.","computed":true},"retention_period_days":{"type":"TypeInt","optional":true,"default":30,"description":"After how many days backups should be deleted."},"start_time":{"type":"TypeString","optional":true,"description":"When the schedule should start working in RFC-3339 format.","computed":true}}},"maxItems":1},"storage_account_url":{"type":"TypeString","required":true,"description":"The SAS URL to the container."}}},"maxItems":1},"client_affinity_enabled":{"type":"TypeBool","optional":true,"default":false},"client_certificate_enabled":{"type":"TypeBool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"TypeString","optional":true,"description":"Paths to exclude when using client certificates, separated by ;"},"client_certificate_mode":{"type":"TypeString","optional":true,"default":"Required"},"connection_string":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Connection."},"type":{"type":"TypeString","required":true,"description":"Type of database. Possible values include: `MySQL`, `SQLServer`, `SQLAzure`, `Custom`, `NotificationHub`, `ServiceBus`, `EventHub`, `APIHub`, `DocDb`, `RedisCache`, and `PostgreSQL`."},"value":{"type":"TypeString","required":true,"description":"The connection string value."}}}},"custom_domain_verification_id":{"type":"TypeString","computed":true},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"hosting_environment_id":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_reference_identity_id":{"type":"TypeString","optional":true,"computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"logs":{"type":"TypeList","optional":true,"elem":{"schema":{"application_logs":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"level":{"type":"TypeString","required":true},"retention_in_days":{"type":"TypeInt","required":true},"sas_url":{"type":"TypeString","required":true}}},"maxItems":1},"file_system_level":{"type":"TypeString","required":true}}},"maxItems":1},"detailed_error_messages":{"type":"TypeBool","optional":true,"default":false},"failed_request_tracing":{"type":"TypeBool","optional":true,"default":false},"http_logs":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","optional":true,"default":0},"sas_url":{"type":"TypeString","required":true}}},"maxItems":1},"file_system":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","required":true},"retention_in_mb":{"type":"TypeInt","required":true}}},"maxItems":1}}},"maxItems":1}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_plan_id":{"type":"TypeString","required":true},"site_config":{"type":"TypeList","required":true,"elem":{"schema":{"always_on":{"type":"TypeBool","optional":true,"default":true},"api_definition_url":{"type":"TypeString","optional":true},"api_management_api_id":{"type":"TypeString","optional":true},"app_command_line":{"type":"TypeString","optional":true},"application_stack":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"current_stack":{"type":"TypeString","optional":true,"computed":true},"docker_image_name":{"type":"TypeString","optional":true},"docker_registry_password":{"type":"TypeString","optional":true},"docker_registry_url":{"type":"TypeString","optional":true},"docker_registry_username":{"type":"TypeString","optional":true},"dotnet_core_version":{"type":"TypeString","optional":true,"description":"The version of DotNetCore to use."},"dotnet_version":{"type":"TypeString","optional":true,"computed":true},"java_container":{"type":"TypeString","optional":true},"java_container_version":{"type":"TypeString","optional":true},"java_embedded_server_enabled":{"type":"TypeBool","optional":true,"description":"Should the application use the embedded web server for the version of Java in use.","computed":true},"java_version":{"type":"TypeString","optional":true},"node_version":{"type":"TypeString","optional":true},"php_version":{"type":"TypeString","optional":true,"computed":true},"python":{"type":"TypeBool","optional":true,"default":false},"tomcat_version":{"type":"TypeString","optional":true}}},"maxItems":1},"auto_heal_setting":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeList","required":true,"elem":{"schema":{"action_type":{"type":"TypeString","required":true},"custom_action":{"type":"TypeList","optional":true,"elem":{"schema":{"executable":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true}}},"maxItems":1},"minimum_process_execution_time":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"trigger":{"type":"TypeList","required":true,"elem":{"schema":{"private_memory_kb":{"type":"TypeInt","optional":true},"requests":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true}}},"maxItems":1},"slow_request":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true},"time_taken":{"type":"TypeString","required":true}}},"maxItems":1},"slow_request_with_path":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true},"time_taken":{"type":"TypeString","required":true}}}},"status_code":{"type":"TypeSet","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true},"status_code_range":{"type":"TypeString","required":true},"sub_status":{"type":"TypeInt","optional":true},"win32_status_code":{"type":"TypeInt","optional":true}}}}}},"maxItems":1}}},"maxItems":1},"container_registry_managed_identity_client_id":{"type":"TypeString","optional":true},"container_registry_use_managed_identity":{"type":"TypeBool","optional":true,"default":false},"cors":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","optional":true,"description":"Specifies a list of origins that should be allowed to make cross-origin calls.","elem":{"type":"TypeString"},"minItems":1},"support_credentials":{"type":"TypeBool","optional":true,"default":false,"description":"Are credentials allowed in CORS requests? Defaults to `false`."}}},"maxItems":1},"default_documents":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"detailed_error_logging_enabled":{"type":"TypeBool","computed":true},"ftps_state":{"type":"TypeString","optional":true,"default":"Disabled"},"handler_mapping":{"type":"TypeSet","optional":true,"elem":{"schema":{"arguments":{"type":"TypeString","optional":true},"extension":{"type":"TypeString","required":true},"script_processor_path":{"type":"TypeString","required":true}}}},"health_check_eviction_time_in_min":{"type":"TypeInt","optional":true,"description":"The amount of time in minutes that a node is unhealthy before being removed from the load balancer. Possible values are between `2` and `10`. Only valid in conjunction with `health_check_path`"},"health_check_path":{"type":"TypeString","optional":true},"http2_enabled":{"type":"TypeBool","optional":true,"default":false},"ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"linux_fx_version":{"type":"TypeString","computed":true},"load_balancing_mode":{"type":"TypeString","optional":true,"default":"LeastRequests"},"local_mysql_enabled":{"type":"TypeBool","optional":true,"default":false},"managed_pipeline_mode":{"type":"TypeString","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"remote_debugging_enabled":{"type":"TypeBool","optional":true,"default":false},"remote_debugging_version":{"type":"TypeString","optional":true,"computed":true},"scm_ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"scm_ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"scm_type":{"type":"TypeString","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false},"use_32_bit_worker":{"type":"TypeBool","optional":true,"default":true},"virtual_application":{"type":"TypeSet","optional":true,"elem":{"schema":{"physical_path":{"type":"TypeString","required":true},"preload":{"type":"TypeBool","required":true},"virtual_directory":{"type":"TypeSet","optional":true,"elem":{"schema":{"physical_path":{"type":"TypeString","optional":true},"virtual_path":{"type":"TypeString","optional":true}}}},"virtual_path":{"type":"TypeString","required":true}}}},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied? Defaults to `false`."},"websockets_enabled":{"type":"TypeBool","optional":true,"default":false},"windows_fx_version":{"type":"TypeString","computed":true},"worker_count":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The Site Credentials Username used for publishing.","computed":true},"password":{"type":"TypeString","description":"The Site Credentials Password used for publishing.","computed":true}}}},"sticky_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"app_setting_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1},"connection_string_names":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"minItems":1}}},"maxItems":1},"storage_account":{"type":"TypeSet","optional":true,"elem":{"schema":{"access_key":{"type":"TypeString","required":true},"account_name":{"type":"TypeString","required":true},"mount_path":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"share_name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_network_subnet_id":{"type":"TypeString","optional":true},"webdeploy_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"zip_deploy_file":{"type":"TypeString","optional":true,"description":"The local path and filename of the Zip packaged application to deploy to this Windows Web App. **Note:** Using this value requires either `WEBSITE_RUN_FROM_PACKAGE=1` or `SCM_DO_BUILD_DURING_DEPLOYMENT=true` to be set on the App in `app_settings`.","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_windows_web_app_slot":{"schema":{"app_service_id":{"type":"TypeString","required":true,"forceNew":true},"app_settings":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`."}}},"maxItems":1},"additional_login_parameters":{"type":"TypeMap","optional":true,"description":"Specifies a map of Login Parameters to send to the OpenID Connect authorization endpoint when a user logs in.","elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","optional":true,"description":"The default authentication provider to use when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`.","computed":true},"enabled":{"type":"TypeBool","required":true,"description":"Should the Authentication / Authorization feature be enabled?"},"facebook":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret":{"type":"TypeString","optional":true,"description":"The App Secret of the Facebook app used for Facebook Login. Cannot be specified with `app_secret_setting_name`."},"app_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login. Cannot be specified with `app_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"github":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret":{"type":"TypeString","optional":true,"description":"The Client Secret of the GitHub app used for GitHub Login. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret":{"type":"TypeString","optional":true,"description":"The client secret associated with the Google web application. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the `client_secret` value used for Google Login. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","elem":{"type":"TypeString"}}}},"maxItems":1},"issuer":{"type":"TypeString","optional":true,"description":"The OpenID Connect Issuer URI that represents the entity which issues access tokens."},"microsoft":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret":{"type":"TypeString","optional":true,"description":"The OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret_setting_name`."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`."},"oauth_scopes":{"type":"TypeList","optional":true,"description":"The list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, `wl.basic` is used as the default scope.","elem":{"type":"TypeString"}}}},"maxItems":1},"runtime_version":{"type":"TypeString","optional":true,"description":"The RuntimeVersion of the Authentication / Authorization feature in use.","computed":true},"token_refresh_extension_hours":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Windows Web App durably store platform-specific security tokens that are obtained during login flows? Defaults to `false`."},"twitter":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret":{"type":"TypeString","optional":true,"description":"The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`."},"consumer_secret_setting_name":{"type":"TypeString","optional":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`."}}},"maxItems":1},"unauthenticated_client_action":{"type":"TypeString","optional":true,"description":"The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`.","computed":true}}},"maxItems":1},"auth_settings_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"active_directory_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_applications":{"type":"TypeList","optional":true,"description":"The list of allowed Applications for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","elem":{"type":"TypeString"}},"allowed_groups":{"type":"TypeList","optional":true,"description":"The list of allowed Group Names for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"allowed_identities":{"type":"TypeList","optional":true,"description":"The list of allowed Identities for the Default Authorisation Policy.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Active Directory."},"client_secret_certificate_thumbprint":{"type":"TypeString","optional":true,"description":"The thumbprint of the certificate used for signing purposes."},"client_secret_setting_name":{"type":"TypeString","optional":true,"description":"The App Setting name that contains the client secret of the Client."},"jwt_allowed_client_applications":{"type":"TypeList","optional":true,"description":"A list of Allowed Client Applications in the JWT Claim.","elem":{"type":"TypeString"}},"jwt_allowed_groups":{"type":"TypeList","optional":true,"description":"A list of Allowed Groups in the JWT Claim.","elem":{"type":"TypeString"}},"login_parameters":{"type":"TypeMap","optional":true,"description":"A map of key-value pairs to send to the Authorisation Endpoint when a user logs in.","elem":{"type":"TypeString"}},"tenant_auth_endpoint":{"type":"TypeString","required":true,"description":"The Azure Tenant Endpoint for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`."},"www_authentication_disabled":{"type":"TypeBool","optional":true,"description":"Should the www-authenticate provider should be omitted from the request? Defaults to `false`"}}},"maxItems":1},"apple_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Apple web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Apple Login."},"login_scopes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"auth_enabled":{"type":"TypeBool","optional":true,"description":"Should the AuthV2 Settings be enabled. Defaults to `false`"},"azure_static_web_app_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with Azure Static Web App Authentication."}}},"maxItems":1},"config_file_path":{"type":"TypeString","optional":true,"description":"The path to the App Auth settings. **Note:** Relative Paths are evaluated from the Site Root directory."},"custom_oidc_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"authorisation_endpoint":{"type":"TypeString","description":"The endpoint to make the Authorisation Request.","computed":true},"certification_uri":{"type":"TypeString","description":"The endpoint that provides the keys necessary to validate the token.","computed":true},"client_credential_method":{"type":"TypeString","description":"The Client Credential Method used. Currently the only supported value is `ClientSecretPost`.","computed":true},"client_id":{"type":"TypeString","required":true,"description":"The ID of the Client to use to authenticate with this Custom OIDC."},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the secret for this Custom OIDC Client.","computed":true},"issuer_endpoint":{"type":"TypeString","description":"The endpoint that issued the Token.","computed":true},"name":{"type":"TypeString","required":true,"description":"The name of the Custom OIDC Authentication Provider."},"name_claim_type":{"type":"TypeString","optional":true,"description":"The name of the claim that contains the users name."},"openid_configuration_endpoint":{"type":"TypeString","required":true,"description":"The endpoint that contains all the configuration endpoints for this Custom OIDC provider."},"scopes":{"type":"TypeList","optional":true,"description":"The list of the scopes that should be requested while authenticating.","elem":{"type":"TypeString"}},"token_endpoint":{"type":"TypeString","description":"The endpoint used to request a Token.","computed":true}}}},"default_provider":{"type":"TypeString","optional":true,"description":"The Default Authentication Provider to use when the `unauthenticated_action` is set to `RedirectToLoginPage`. Possible values include: `apple`, `azureactivedirectory`, `facebook`, `github`, `google`, `twitter` and the `name` of your `custom_oidc_v2` provider."},"excluded_paths":{"type":"TypeList","optional":true,"description":"The paths which should be excluded from the `unauthenticated_action` when it is set to `RedirectToLoginPage`.","elem":{"type":"TypeString"}},"facebook_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"app_id":{"type":"TypeString","required":true,"description":"The App ID of the Facebook app used for login."},"app_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `app_secret` value used for Facebook Login."},"graph_api_version":{"type":"TypeString","optional":true,"description":"The version of the Facebook API to be used while logging in.","computed":true},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of scopes to be requested as part of Facebook Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"forward_proxy_convention":{"type":"TypeString","optional":true,"default":"NoProxy","description":"The convention used to determine the url of the request made. Possible values include `ForwardProxyConventionNoProxy`, `ForwardProxyConventionStandard`, `ForwardProxyConventionCustom`. Defaults to `ForwardProxyConventionNoProxy`"},"forward_proxy_custom_host_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the host of the request."},"forward_proxy_custom_scheme_header_name":{"type":"TypeString","optional":true,"description":"The name of the header containing the scheme of the request."},"github_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"client_id":{"type":"TypeString","required":true,"description":"The ID of the GitHub app used for login."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for GitHub Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"google_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OpenID Connect Client ID for the Google web application."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the `client_secret` value used for Google Login."},"login_scopes":{"type":"TypeList","optional":true,"description":"Specifies a list of Login scopes that will be requested as part of Google Sign-In authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"http_route_api_prefix":{"type":"TypeString","optional":true,"default":"/.auth","description":"The prefix that should precede all the authentication and authorisation paths. Defaults to `/.auth`"},"login":{"type":"TypeList","required":true,"elem":{"schema":{"allowed_external_redirect_urls":{"type":"TypeList","optional":true,"description":"External URLs that can be redirected to as part of logging in or logging out of the app. This is an advanced setting typically only needed by Windows Store application backends. **Note:** URLs within the current domain are always implicitly allowed.","elem":{"type":"TypeString"}},"cookie_expiration_convention":{"type":"TypeString","optional":true,"default":"FixedTime","description":"The method by which cookies expire. Possible values include: `FixedTime`, and `IdentityProviderDerived`. Defaults to `FixedTime`."},"cookie_expiration_time":{"type":"TypeString","optional":true,"default":"08:00:00","description":"The time after the request is made when the session cookie should expire. Defaults to `08:00:00`."},"logout_endpoint":{"type":"TypeString","optional":true,"description":"The endpoint to which logout requests should be made."},"nonce_expiration_time":{"type":"TypeString","optional":true,"default":"00:05:00","description":"The time after the request is made when the nonce should expire. Defaults to `00:05:00`."},"preserve_url_fragments_for_logins":{"type":"TypeBool","optional":true,"default":false,"description":"Should the fragments from the request be preserved after the login request is made. Defaults to `false`."},"token_refresh_extension_time":{"type":"TypeFloat","optional":true,"default":72,"description":"The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours."},"token_store_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should the Token Store configuration Enabled. Defaults to `false`"},"token_store_path":{"type":"TypeString","optional":true,"description":"The directory path in the App Filesystem in which the tokens will be stored."},"token_store_sas_setting_name":{"type":"TypeString","optional":true,"description":"The name of the app setting which contains the SAS URL of the blob storage containing the tokens."},"validate_nonce":{"type":"TypeBool","optional":true,"default":true,"description":"Should the nonce be validated while completing the login flow. Defaults to `true`."}}},"maxItems":1},"microsoft_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","optional":true,"description":"Specifies a list of Allowed Audiences that will be requested as part of Microsoft Sign-In authentication.","elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","required":true,"description":"The OAuth 2.0 client ID that was created for the app used for authentication."},"client_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication."},"login_scopes":{"type":"TypeList","optional":true,"description":"The list of Login scopes that will be requested as part of Microsoft Account authentication.","elem":{"type":"TypeString"}}}},"maxItems":1},"require_authentication":{"type":"TypeBool","optional":true,"description":"Should the authentication flow be used for all requests."},"require_https":{"type":"TypeBool","optional":true,"default":true,"description":"Should HTTPS be required on connections? Defaults to true."},"runtime_version":{"type":"TypeString","optional":true,"default":"~1","description":"The Runtime Version of the Authentication and Authorisation feature of this App. Defaults to `~1`"},"twitter_v2":{"type":"TypeList","optional":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","required":true,"description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in."},"consumer_secret_setting_name":{"type":"TypeString","required":true,"description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in."}}},"maxItems":1},"unauthenticated_action":{"type":"TypeString","optional":true,"default":"RedirectToLoginPage","description":"The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`."}}},"maxItems":1},"backup":{"type":"TypeList","optional":true,"elem":{"schema":{"enabled":{"type":"TypeBool","optional":true,"default":true,"description":"Should this backup job be enabled?"},"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Backup."},"schedule":{"type":"TypeList","required":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","required":true,"description":"How often the backup should be executed (e.g. for weekly backup, this should be set to `7` and `frequency_unit` should be set to `Day`)."},"frequency_unit":{"type":"TypeString","required":true,"description":"The unit of time for how often the backup should take place. Possible values include: `Day` and `Hour`."},"keep_at_least_one_backup":{"type":"TypeBool","optional":true,"default":false,"description":"Should the service keep at least one backup, regardless of age of backup. Defaults to `false`."},"last_execution_time":{"type":"TypeString","description":"The time the backup was last attempted.","computed":true},"retention_period_days":{"type":"TypeInt","optional":true,"default":30,"description":"After how many days backups should be deleted."},"start_time":{"type":"TypeString","optional":true,"description":"When the schedule should start working in RFC-3339 format.","computed":true}}},"maxItems":1},"storage_account_url":{"type":"TypeString","required":true,"description":"The SAS URL to the container."}}},"maxItems":1},"client_affinity_enabled":{"type":"TypeBool","optional":true,"default":false},"client_certificate_enabled":{"type":"TypeBool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"TypeString","optional":true,"description":"Paths to exclude when using client certificates, separated by ;"},"client_certificate_mode":{"type":"TypeString","optional":true,"default":"Required"},"connection_string":{"type":"TypeSet","optional":true,"elem":{"schema":{"name":{"type":"TypeString","required":true,"description":"The name which should be used for this Connection."},"type":{"type":"TypeString","required":true,"description":"Type of database. Possible values include: `MySQL`, `SQLServer`, `SQLAzure`, `Custom`, `NotificationHub`, `ServiceBus`, `EventHub`, `APIHub`, `DocDb`, `RedisCache`, and `PostgreSQL`."},"value":{"type":"TypeString","required":true,"description":"The connection string value."}}}},"custom_domain_verification_id":{"type":"TypeString","computed":true},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"hosting_environment_id":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","optional":true,"default":false},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"key_vault_reference_identity_id":{"type":"TypeString","optional":true,"computed":true},"kind":{"type":"TypeString","computed":true},"logs":{"type":"TypeList","optional":true,"elem":{"schema":{"application_logs":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"level":{"type":"TypeString","required":true},"retention_in_days":{"type":"TypeInt","required":true},"sas_url":{"type":"TypeString","required":true}}},"maxItems":1},"file_system_level":{"type":"TypeString","required":true}}},"maxItems":1},"detailed_error_messages":{"type":"TypeBool","optional":true,"default":false},"failed_request_tracing":{"type":"TypeBool","optional":true,"default":false},"http_logs":{"type":"TypeList","optional":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","optional":true,"default":0},"sas_url":{"type":"TypeString","required":true}}},"maxItems":1},"file_system":{"type":"TypeList","optional":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","required":true},"retention_in_mb":{"type":"TypeInt","required":true}}},"maxItems":1}}},"maxItems":1}}},"maxItems":1},"name":{"type":"TypeString","required":true,"forceNew":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"service_plan_id":{"type":"TypeString","optional":true},"site_config":{"type":"TypeList","required":true,"elem":{"schema":{"always_on":{"type":"TypeBool","optional":true,"default":true},"api_definition_url":{"type":"TypeString","optional":true},"api_management_api_id":{"type":"TypeString","optional":true},"app_command_line":{"type":"TypeString","optional":true},"application_stack":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"current_stack":{"type":"TypeString","optional":true,"computed":true},"docker_image_name":{"type":"TypeString","optional":true},"docker_registry_password":{"type":"TypeString","optional":true},"docker_registry_url":{"type":"TypeString","optional":true},"docker_registry_username":{"type":"TypeString","optional":true},"dotnet_core_version":{"type":"TypeString","optional":true,"description":"The version of DotNetCore to use."},"dotnet_version":{"type":"TypeString","optional":true,"computed":true},"java_container":{"type":"TypeString","optional":true},"java_container_version":{"type":"TypeString","optional":true},"java_embedded_server_enabled":{"type":"TypeBool","optional":true,"description":"Should the application use the embedded web server for the version of Java in use.","computed":true},"java_version":{"type":"TypeString","optional":true},"node_version":{"type":"TypeString","optional":true},"php_version":{"type":"TypeString","optional":true,"computed":true},"python":{"type":"TypeBool","optional":true,"default":false},"tomcat_version":{"type":"TypeString","optional":true}}},"maxItems":1},"auto_heal_setting":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeList","required":true,"elem":{"schema":{"action_type":{"type":"TypeString","required":true},"custom_action":{"type":"TypeList","optional":true,"elem":{"schema":{"executable":{"type":"TypeString","required":true},"parameters":{"type":"TypeString","optional":true}}},"maxItems":1},"minimum_process_execution_time":{"type":"TypeString","optional":true,"computed":true}}},"maxItems":1},"trigger":{"type":"TypeList","required":true,"elem":{"schema":{"private_memory_kb":{"type":"TypeInt","optional":true},"requests":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true}}},"maxItems":1},"slow_request":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true},"time_taken":{"type":"TypeString","required":true}}},"maxItems":1},"slow_request_with_path":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true},"time_taken":{"type":"TypeString","required":true}}}},"status_code":{"type":"TypeSet","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","required":true},"interval":{"type":"TypeString","required":true},"path":{"type":"TypeString","optional":true},"status_code_range":{"type":"TypeString","required":true},"sub_status":{"type":"TypeInt","optional":true},"win32_status_code":{"type":"TypeInt","optional":true}}}}}},"maxItems":1}}},"maxItems":1},"auto_swap_slot_name":{"type":"TypeString","optional":true},"container_registry_managed_identity_client_id":{"type":"TypeString","optional":true},"container_registry_use_managed_identity":{"type":"TypeBool","optional":true,"default":false},"cors":{"type":"TypeList","optional":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","optional":true,"description":"Specifies a list of origins that should be allowed to make cross-origin calls.","elem":{"type":"TypeString"},"minItems":1},"support_credentials":{"type":"TypeBool","optional":true,"default":false,"description":"Are credentials allowed in CORS requests? Defaults to `false`."}}},"maxItems":1},"default_documents":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"detailed_error_logging_enabled":{"type":"TypeBool","computed":true},"ftps_state":{"type":"TypeString","optional":true,"default":"Disabled"},"handler_mapping":{"type":"TypeSet","optional":true,"elem":{"schema":{"arguments":{"type":"TypeString","optional":true},"extension":{"type":"TypeString","required":true},"script_processor_path":{"type":"TypeString","required":true}}}},"health_check_eviction_time_in_min":{"type":"TypeInt","optional":true,"description":"The amount of time in minutes that a node is unhealthy before being removed from the load balancer. Possible values are between `2` and `10`. Only valid in conjunction with `health_check_path`"},"health_check_path":{"type":"TypeString","optional":true},"http2_enabled":{"type":"TypeBool","optional":true,"default":false},"ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"load_balancing_mode":{"type":"TypeString","optional":true,"default":"LeastRequests"},"local_mysql_enabled":{"type":"TypeBool","optional":true,"default":false},"managed_pipeline_mode":{"type":"TypeString","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"remote_debugging_enabled":{"type":"TypeBool","optional":true,"default":false},"remote_debugging_version":{"type":"TypeString","optional":true,"computed":true},"scm_ip_restriction":{"type":"TypeList","optional":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow","description":"The action to take. Possible values are `Allow` or `Deny`."},"description":{"type":"TypeString","optional":true,"description":"The description of the IP restriction rule."},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","optional":true,"description":"Specifies a list of Azure Front Door IDs.","elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeList","optional":true,"description":"Specifies a list of addresses for which matching should be applied. Omitting this value means allow any.","elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeList","optional":true,"description":"Specifies a list of Hosts for which matching should be applied.","elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true,"description":"The CIDR notation of the IP or IP Range to match. For example: `10.0.0.0/24` or `192.168.10.1/32` or `fe80::/64` or `13.107.6.152/31,13.107.128.0/22`"},"name":{"type":"TypeString","optional":true,"description":"The name which should be used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000,"description":"The priority value of this `ip_restriction`."},"service_tag":{"type":"TypeString","optional":true,"description":"The Service Tag used for this IP Restriction."},"virtual_network_subnet_id":{"type":"TypeString","optional":true,"description":"The Virtual Network Subnet ID used for this IP Restriction."}}}},"scm_ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"TypeString","optional":true,"default":"1.2"},"scm_type":{"type":"TypeString","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false},"use_32_bit_worker":{"type":"TypeBool","optional":true,"computed":true},"virtual_application":{"type":"TypeSet","optional":true,"elem":{"schema":{"physical_path":{"type":"TypeString","required":true},"preload":{"type":"TypeBool","required":true},"virtual_directory":{"type":"TypeSet","optional":true,"elem":{"schema":{"physical_path":{"type":"TypeString","optional":true},"virtual_path":{"type":"TypeString","optional":true}}}},"virtual_path":{"type":"TypeString","required":true}}}},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"default":false,"description":"Should all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied? Defaults to `false`."},"websockets_enabled":{"type":"TypeBool","optional":true,"default":false},"windows_fx_version":{"type":"TypeString","computed":true},"worker_count":{"type":"TypeInt","optional":true,"computed":true}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The Site Credentials Username used for publishing.","computed":true},"password":{"type":"TypeString","description":"The Site Credentials Password used for publishing.","computed":true}}}},"storage_account":{"type":"TypeSet","optional":true,"elem":{"schema":{"access_key":{"type":"TypeString","required":true},"account_name":{"type":"TypeString","required":true},"mount_path":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"share_name":{"type":"TypeString","required":true},"type":{"type":"TypeString","required":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"virtual_network_subnet_id":{"type":"TypeString","optional":true},"webdeploy_publish_basic_authentication_enabled":{"type":"TypeBool","optional":true,"default":true},"zip_deploy_file":{"type":"TypeString","optional":true,"description":"The local path and filename of the Zip packaged application to deploy to this Windows Web App. **Note:** Using this value requires `WEBSITE_RUN_FROM_PACKAGE=1` on the App in `app_settings`.","computed":true}},"timeouts":{"create":30,"read":5,"delete":30,"update":30}},"azurerm_workloads_sap_discovery_virtual_instance":{"schema":{"central_server_virtual_machine_id":{"type":"TypeString","required":true,"forceNew":true},"environment":{"type":"TypeString","required":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_resource_group_name":{"type":"TypeString","optional":true,"forceNew":true},"managed_storage_account_name":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sap_product":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_workloads_sap_single_node_virtual_instance":{"schema":{"app_location":{"type":"TypeString","required":true,"forceNew":true},"environment":{"type":"TypeString","required":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_resource_group_name":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sap_fqdn":{"type":"TypeString","required":true,"forceNew":true},"sap_product":{"type":"TypeString","required":true,"forceNew":true},"single_server_configuration":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"app_resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"database_type":{"type":"TypeString","optional":true,"forceNew":true},"disk_volume_configuration":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"number_of_disks":{"type":"TypeInt","required":true,"forceNew":true},"size_in_gb":{"type":"TypeInt","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"volume_name":{"type":"TypeString","required":true,"forceNew":true}}}},"secondary_ip_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"virtual_machine_configuration":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"image":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"offer":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"os_profile":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"admin_username":{"type":"TypeString","required":true,"forceNew":true},"ssh_private_key":{"type":"TypeString","required":true,"forceNew":true},"ssh_public_key":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"virtual_machine_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"virtual_machine_resource_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"data_disk":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"names":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"volume_name":{"type":"TypeString","required":true,"forceNew":true}}}},"host_name":{"type":"TypeString","optional":true,"forceNew":true},"network_interface_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"os_disk_name":{"type":"TypeString","optional":true,"forceNew":true},"virtual_machine_name":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}},"azurerm_workloads_sap_three_tier_virtual_instance":{"schema":{"app_location":{"type":"TypeString","required":true,"forceNew":true},"environment":{"type":"TypeString","required":true,"forceNew":true},"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","required":true,"forceNew":true},"managed_resource_group_name":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sap_fqdn":{"type":"TypeString","required":true,"forceNew":true},"sap_product":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"three_tier_configuration":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"app_resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"application_server_configuration":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"instance_count":{"type":"TypeInt","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"virtual_machine_configuration":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"image":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"offer":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"os_profile":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"admin_username":{"type":"TypeString","required":true,"forceNew":true},"ssh_private_key":{"type":"TypeString","required":true,"forceNew":true},"ssh_public_key":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"virtual_machine_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"central_server_configuration":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"instance_count":{"type":"TypeInt","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"virtual_machine_configuration":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"image":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"offer":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"os_profile":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"admin_username":{"type":"TypeString","required":true,"forceNew":true},"ssh_private_key":{"type":"TypeString","required":true,"forceNew":true},"ssh_public_key":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"virtual_machine_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"database_server_configuration":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"database_type":{"type":"TypeString","optional":true,"forceNew":true},"disk_volume_configuration":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"number_of_disks":{"type":"TypeInt","required":true,"forceNew":true},"size_in_gb":{"type":"TypeInt","required":true,"forceNew":true},"sku_name":{"type":"TypeString","required":true,"forceNew":true},"volume_name":{"type":"TypeString","required":true,"forceNew":true}}}},"instance_count":{"type":"TypeInt","required":true,"forceNew":true},"subnet_id":{"type":"TypeString","required":true,"forceNew":true},"virtual_machine_configuration":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"image":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"offer":{"type":"TypeString","required":true,"forceNew":true},"publisher":{"type":"TypeString","required":true,"forceNew":true},"sku":{"type":"TypeString","required":true,"forceNew":true},"version":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"os_profile":{"type":"TypeList","required":true,"forceNew":true,"elem":{"schema":{"admin_username":{"type":"TypeString","required":true,"forceNew":true},"ssh_private_key":{"type":"TypeString","required":true,"forceNew":true},"ssh_public_key":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"virtual_machine_size":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"high_availability_type":{"type":"TypeString","optional":true,"forceNew":true},"resource_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"application_server":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"availability_set_name":{"type":"TypeString","optional":true,"forceNew":true},"virtual_machine":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"data_disk":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"names":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"volume_name":{"type":"TypeString","required":true,"forceNew":true}}}},"host_name":{"type":"TypeString","optional":true,"forceNew":true},"network_interface_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"os_disk_name":{"type":"TypeString","optional":true,"forceNew":true},"virtual_machine_name":{"type":"TypeString","optional":true,"forceNew":true}}}}}},"maxItems":1},"central_server":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"availability_set_name":{"type":"TypeString","optional":true,"forceNew":true},"load_balancer":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"backend_pool_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"frontend_ip_configuration_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"health_probe_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"virtual_machine":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"data_disk":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"names":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"volume_name":{"type":"TypeString","required":true,"forceNew":true}}}},"host_name":{"type":"TypeString","optional":true,"forceNew":true},"network_interface_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"os_disk_name":{"type":"TypeString","optional":true,"forceNew":true},"virtual_machine_name":{"type":"TypeString","optional":true,"forceNew":true}}}}}},"maxItems":1},"database_server":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"availability_set_name":{"type":"TypeString","optional":true,"forceNew":true},"load_balancer":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"backend_pool_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"frontend_ip_configuration_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"health_probe_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1},"virtual_machine":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"data_disk":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"schema":{"names":{"type":"TypeList","required":true,"forceNew":true,"elem":{"type":"TypeString"}},"volume_name":{"type":"TypeString","required":true,"forceNew":true}}}},"host_name":{"type":"TypeString","optional":true,"forceNew":true},"network_interface_names":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"os_disk_name":{"type":"TypeString","optional":true,"forceNew":true},"virtual_machine_name":{"type":"TypeString","optional":true,"forceNew":true}}}}}},"maxItems":1},"shared_storage":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"account_name":{"type":"TypeString","optional":true,"forceNew":true},"private_endpoint_name":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1},"secondary_ip_enabled":{"type":"TypeBool","optional":true,"default":false,"forceNew":true},"transport_create_and_mount":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"resource_group_id":{"type":"TypeString","optional":true,"forceNew":true},"storage_account_name":{"type":"TypeString","optional":true,"forceNew":true}}},"maxItems":1}}},"maxItems":1}},"timeouts":{"create":60,"read":5,"delete":60,"update":60}}},"dataSources":{"azurerm_aadb2c_directory":{"schema":{"billing_type":{"type":"TypeString","description":"The type of billing for the B2C tenant. Possible values include: `MAU` or `Auths`.","computed":true},"data_residency_location":{"type":"TypeString","description":"Location in which the B2C tenant is hosted and data resides.","computed":true},"domain_name":{"type":"TypeString","required":true,"description":"Domain name of the B2C tenant, including onmicrosoft.com suffix."},"effective_start_date":{"type":"TypeString","description":"The date from which the billing type took effect. May not be populated until after the first billing cycle.","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","description":"Billing SKU for the B2C tenant.","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","description":"The Tenant ID for the B2C tenant.","computed":true}},"timeouts":{"read":5}},"azurerm_active_directory_domain_service":{"schema":{"deployment_id":{"type":"TypeString","computed":true},"domain_configuration_type":{"type":"TypeString","computed":true},"domain_name":{"type":"TypeString","computed":true},"filtered_sync_enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"notifications":{"type":"TypeList","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"notify_dc_admins":{"type":"TypeBool","computed":true},"notify_global_admins":{"type":"TypeBool","computed":true}}}},"replica_sets":{"type":"TypeList","computed":true,"elem":{"schema":{"domain_controller_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"external_access_ip_address":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true},"service_status":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"resource_id":{"type":"TypeString","computed":true},"secure_ldap":{"type":"TypeList","computed":true,"elem":{"schema":{"certificate_expiry":{"type":"TypeString","computed":true},"certificate_thumbprint":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","computed":true},"external_access_enabled":{"type":"TypeBool","computed":true},"public_certificate":{"type":"TypeString","computed":true}}}},"security":{"type":"TypeList","computed":true,"elem":{"schema":{"kerberos_armoring_enabled":{"type":"TypeBool","computed":true},"kerberos_rc4_encryption_enabled":{"type":"TypeBool","computed":true},"ntlm_v1_enabled":{"type":"TypeBool","computed":true},"sync_kerberos_passwords":{"type":"TypeBool","computed":true},"sync_ntlm_passwords":{"type":"TypeBool","computed":true},"sync_on_prem_passwords":{"type":"TypeBool","computed":true},"tls_v1_enabled":{"type":"TypeBool","computed":true}}}},"sku":{"type":"TypeString","computed":true},"sync_owner":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","computed":true},"version":{"type":"TypeInt","computed":true}},"timeouts":{"read":5}},"azurerm_advisor_recommendations":{"schema":{"filter_by_category":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"filter_by_resource_groups":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"recommendations":{"type":"TypeList","computed":true,"elem":{"schema":{"category":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"impact":{"type":"TypeString","computed":true},"recommendation_name":{"type":"TypeString","computed":true},"recommendation_type_id":{"type":"TypeString","computed":true},"resource_name":{"type":"TypeString","computed":true},"resource_type":{"type":"TypeString","computed":true},"suppression_names":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"updated_time":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":10}},"azurerm_api_management":{"schema":{"additional_location":{"type":"TypeList","computed":true,"elem":{"schema":{"capacity":{"type":"TypeInt","computed":true},"gateway_regional_url":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"private_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"public_ip_address_id":{"type":"TypeString","computed":true},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"developer_portal_url":{"type":"TypeString","computed":true},"gateway_regional_url":{"type":"TypeString","computed":true},"gateway_url":{"type":"TypeString","computed":true},"hostname_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"developer_portal":{"type":"TypeList","computed":true,"elem":{"schema":{"host_name":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","computed":true},"negotiate_client_certificate":{"type":"TypeBool","computed":true}}}},"management":{"type":"TypeList","computed":true,"elem":{"schema":{"host_name":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","computed":true},"negotiate_client_certificate":{"type":"TypeBool","computed":true}}}},"portal":{"type":"TypeList","computed":true,"elem":{"schema":{"host_name":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","computed":true},"negotiate_client_certificate":{"type":"TypeBool","computed":true}}}},"proxy":{"type":"TypeList","computed":true,"elem":{"schema":{"default_ssl_binding":{"type":"TypeBool","computed":true},"host_name":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","computed":true},"negotiate_client_certificate":{"type":"TypeBool","computed":true}}}},"scm":{"type":"TypeList","computed":true,"elem":{"schema":{"host_name":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","computed":true},"negotiate_client_certificate":{"type":"TypeBool","computed":true}}}}}}},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"management_api_url":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"notification_sender_email":{"type":"TypeString","computed":true},"portal_url":{"type":"TypeString","computed":true},"private_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"public_ip_address_id":{"type":"TypeString","computed":true},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"publisher_email":{"type":"TypeString","computed":true},"publisher_name":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"scm_url":{"type":"TypeString","computed":true},"sku_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"tenant_access":{"type":"TypeList","computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","computed":true},"primary_key":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_api_management_api":{"schema":{"api_management_name":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","computed":true},"is_current":{"type":"TypeBool","computed":true},"is_online":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"path":{"type":"TypeString","computed":true},"protocols":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"revision":{"type":"TypeString","required":true},"service_url":{"type":"TypeString","computed":true},"soap_pass_through":{"type":"TypeBool","computed":true},"subscription_key_parameter_names":{"type":"TypeList","computed":true,"elem":{"schema":{"header":{"type":"TypeString","computed":true},"query":{"type":"TypeString","computed":true}}}},"subscription_required":{"type":"TypeBool","computed":true},"version":{"type":"TypeString","computed":true},"version_set_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_api_management_api_version_set":{"schema":{"api_management_name":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"version_header_name":{"type":"TypeString","computed":true},"version_query_name":{"type":"TypeString","computed":true},"versioning_scheme":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_api_management_gateway":{"schema":{"api_management_id":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"location_data":{"type":"TypeList","computed":true,"elem":{"schema":{"city":{"type":"TypeString","computed":true},"district":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"region":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_api_management_gateway_host_name_configuration":{"schema":{"api_management_id":{"type":"TypeString","required":true},"certificate_id":{"type":"TypeString","computed":true},"gateway_name":{"type":"TypeString","required":true},"host_name":{"type":"TypeString","computed":true},"http2_enabled":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"request_client_certificate_enabled":{"type":"TypeBool","computed":true},"tls10_enabled":{"type":"TypeBool","computed":true},"tls11_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_api_management_group":{"schema":{"api_management_name":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","computed":true},"external_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"type":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_api_management_product":{"schema":{"api_management_name":{"type":"TypeString","required":true},"approval_required":{"type":"TypeBool","computed":true},"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","computed":true},"product_id":{"type":"TypeString","required":true},"published":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"subscription_required":{"type":"TypeBool","computed":true},"subscriptions_limit":{"type":"TypeInt","computed":true},"terms":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_api_management_user":{"schema":{"api_management_name":{"type":"TypeString","required":true},"email":{"type":"TypeString","computed":true},"first_name":{"type":"TypeString","computed":true},"last_name":{"type":"TypeString","computed":true},"note":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"state":{"type":"TypeString","computed":true},"user_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_app_configuration":{"schema":{"encryption":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_client_id":{"type":"TypeString","computed":true},"key_vault_key_identifier":{"type":"TypeString","computed":true}}}},"endpoint":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"local_auth_enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"primary_read_key":{"type":"TypeList","computed":true,"elem":{"schema":{"connection_string":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"secret":{"type":"TypeString","computed":true}}}},"primary_write_key":{"type":"TypeList","computed":true,"elem":{"schema":{"connection_string":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"secret":{"type":"TypeString","computed":true}}}},"public_network_access":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"purge_protection_enabled":{"type":"TypeBool","computed":true},"replica":{"type":"TypeList","computed":true,"elem":{"schema":{"endpoint":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"secondary_read_key":{"type":"TypeList","computed":true,"elem":{"schema":{"connection_string":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"secret":{"type":"TypeString","computed":true}}}},"secondary_write_key":{"type":"TypeList","computed":true,"elem":{"schema":{"connection_string":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"secret":{"type":"TypeString","computed":true}}}},"sku":{"type":"TypeString","computed":true},"soft_delete_retention_days":{"type":"TypeInt","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_app_configuration_key":{"schema":{"configuration_store_id":{"type":"TypeString","required":true},"content_type":{"type":"TypeString","computed":true},"etag":{"type":"TypeString","computed":true},"key":{"type":"TypeString","required":true},"label":{"type":"TypeString","optional":true,"default":""},"locked":{"type":"TypeBool","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true},"vault_key_reference":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_app_configuration_keys":{"schema":{"configuration_store_id":{"type":"TypeString","required":true},"items":{"type":"TypeList","computed":true,"elem":{"schema":{"content_type":{"type":"TypeString","computed":true},"etag":{"type":"TypeString","computed":true},"key":{"type":"TypeString","computed":true},"label":{"type":"TypeString","computed":true},"locked":{"type":"TypeBool","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true},"vault_key_reference":{"type":"TypeString","computed":true}}}},"key":{"type":"TypeString","optional":true,"default":""},"label":{"type":"TypeString","optional":true,"default":""}},"timeouts":{"read":5}},"azurerm_app_service":{"schema":{"app_service_plan_id":{"type":"TypeString","computed":true},"app_settings":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"client_affinity_enabled":{"type":"TypeBool","computed":true},"client_cert_enabled":{"type":"TypeBool","computed":true},"connection_string":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"custom_domain_verification_id":{"type":"TypeString","computed":true},"default_site_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","computed":true},"https_only":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"site_config":{"type":"TypeList","computed":true,"elem":{"schema":{"acr_use_managed_identity_credentials":{"type":"TypeBool","computed":true},"acr_user_managed_identity_client_id":{"type":"TypeString","computed":true},"always_on":{"type":"TypeBool","computed":true},"app_command_line":{"type":"TypeString","computed":true},"cors":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"support_credentials":{"type":"TypeBool","computed":true}}}},"default_documents":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"dotnet_framework_version":{"type":"TypeString","computed":true},"ftps_state":{"type":"TypeString","computed":true},"health_check_path":{"type":"TypeString","computed":true},"http2_enabled":{"type":"TypeBool","computed":true},"ip_restriction":{"type":"TypeList","computed":true,"elem":{"schema":{"action":{"type":"TypeString","computed":true},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"x_fd_health_probe":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_for":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_host":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"ip_address":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"priority":{"type":"TypeInt","computed":true},"service_tag":{"type":"TypeString","computed":true},"virtual_network_subnet_id":{"type":"TypeString","computed":true}}}},"java_container":{"type":"TypeString","computed":true},"java_container_version":{"type":"TypeString","computed":true},"java_version":{"type":"TypeString","computed":true},"linux_fx_version":{"type":"TypeString","computed":true},"local_mysql_enabled":{"type":"TypeBool","computed":true},"managed_pipeline_mode":{"type":"TypeString","computed":true},"min_tls_version":{"type":"TypeString","computed":true},"number_of_workers":{"type":"TypeInt","computed":true},"php_version":{"type":"TypeString","computed":true},"python_version":{"type":"TypeString","computed":true},"remote_debugging_enabled":{"type":"TypeBool","computed":true},"remote_debugging_version":{"type":"TypeString","computed":true},"scm_ip_restriction":{"type":"TypeList","computed":true,"elem":{"schema":{"action":{"type":"TypeString","computed":true},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"x_fd_health_probe":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_for":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_host":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"ip_address":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"priority":{"type":"TypeInt","computed":true},"service_tag":{"type":"TypeString","computed":true},"virtual_network_subnet_id":{"type":"TypeString","computed":true}}}},"scm_type":{"type":"TypeString","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","computed":true},"use_32_bit_worker_process":{"type":"TypeBool","computed":true},"vnet_route_all_enabled":{"type":"TypeBool","computed":true},"websockets_enabled":{"type":"TypeBool","computed":true},"windows_fx_version":{"type":"TypeString","computed":true}}}},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"source_control":{"type":"TypeList","computed":true,"elem":{"schema":{"branch":{"type":"TypeString","computed":true},"manual_integration":{"type":"TypeBool","computed":true},"repo_url":{"type":"TypeString","computed":true},"rollback_enabled":{"type":"TypeBool","computed":true},"use_mercurial":{"type":"TypeBool","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_app_service_certificate":{"schema":{"expiration_date":{"type":"TypeString","computed":true},"friendly_name":{"type":"TypeString","computed":true},"host_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"issue_date":{"type":"TypeString","computed":true},"issuer":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"subject_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"thumbprint":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_app_service_certificate_order":{"schema":{"app_service_certificate_not_renewable_reasons":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"auto_renew":{"type":"TypeBool","computed":true},"certificates":{"type":"TypeList","computed":true,"elem":{"schema":{"certificate_name":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","computed":true},"key_vault_secret_name":{"type":"TypeString","computed":true},"provisioning_state":{"type":"TypeString","computed":true}}}},"csr":{"type":"TypeString","computed":true},"distinguished_name":{"type":"TypeString","computed":true},"domain_verification_token":{"type":"TypeString","computed":true},"expiration_time":{"type":"TypeString","computed":true},"intermediate_thumbprint":{"type":"TypeString","computed":true},"is_private_key_external":{"type":"TypeBool","computed":true},"key_size":{"type":"TypeInt","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"product_type":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"root_thumbprint":{"type":"TypeString","computed":true},"signed_certificate_thumbprint":{"type":"TypeString","computed":true},"status":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"validity_in_years":{"type":"TypeInt","computed":true}},"timeouts":{"read":5}},"azurerm_app_service_environment_v3":{"schema":{"allow_new_private_endpoint_connections":{"type":"TypeBool","computed":true},"cluster_setting":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"dedicated_host_count":{"type":"TypeInt","computed":true},"dns_suffix":{"type":"TypeString","computed":true},"external_inbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"inbound_network_dependencies":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ports":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"internal_inbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"internal_load_balancing_mode":{"type":"TypeString","computed":true},"ip_ssl_address_count":{"type":"TypeInt","computed":true},"linux_outbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"pricing_tier":{"type":"TypeString","computed":true},"remote_debugging_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"subnet_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"windows_outbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"zone_redundant":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_app_service_plan":{"schema":{"app_service_environment_id":{"type":"TypeString","computed":true},"is_xenon":{"type":"TypeBool","computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"maximum_elastic_worker_count":{"type":"TypeInt","computed":true},"maximum_number_of_workers":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true},"per_site_scaling":{"type":"TypeBool","computed":true},"reserved":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeList","computed":true,"elem":{"schema":{"capacity":{"type":"TypeInt","computed":true},"size":{"type":"TypeString","computed":true},"tier":{"type":"TypeString","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"zone_redundant":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_application_gateway":{"schema":{"authentication_certificate":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"autoscale_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"max_capacity":{"type":"TypeInt","computed":true},"min_capacity":{"type":"TypeInt","computed":true}}}},"backend_address_pool":{"type":"TypeList","computed":true,"elem":{"schema":{"fqdns":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"id":{"type":"TypeString","computed":true},"ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true}}}},"backend_http_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"affinity_cookie_name":{"type":"TypeString","computed":true},"authentication_certificate":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"connection_draining":{"type":"TypeList","computed":true,"elem":{"schema":{"drain_timeout_sec":{"type":"TypeInt","computed":true},"enabled":{"type":"TypeBool","computed":true}}}},"cookie_based_affinity":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"path":{"type":"TypeString","computed":true},"pick_host_name_from_backend_address":{"type":"TypeBool","computed":true},"port":{"type":"TypeInt","computed":true},"probe_id":{"type":"TypeString","computed":true},"probe_name":{"type":"TypeString","computed":true},"protocol":{"type":"TypeString","computed":true},"request_timeout":{"type":"TypeInt","computed":true},"trusted_root_certificate_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"custom_error_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"custom_error_page_url":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"status_code":{"type":"TypeString","computed":true}}}},"fips_enabled":{"type":"TypeBool","computed":true},"firewall_policy_id":{"type":"TypeString","computed":true},"force_firewall_policy_association":{"type":"TypeBool","computed":true},"frontend_ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_address_allocation":{"type":"TypeString","computed":true},"private_link_configuration_id":{"type":"TypeString","computed":true},"private_link_configuration_name":{"type":"TypeString","computed":true},"public_ip_address_id":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"frontend_port":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"port":{"type":"TypeInt","computed":true}}}},"gateway_ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"global":{"type":"TypeList","computed":true,"elem":{"schema":{"request_buffering_enabled":{"type":"TypeBool","computed":true},"response_buffering_enabled":{"type":"TypeBool","computed":true}}}},"http2_enabled":{"type":"TypeBool","computed":true},"http_listener":{"type":"TypeList","computed":true,"elem":{"schema":{"custom_error_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"custom_error_page_url":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"status_code":{"type":"TypeString","computed":true}}}},"firewall_policy_id":{"type":"TypeString","computed":true},"frontend_ip_configuration_id":{"type":"TypeString","computed":true},"frontend_ip_configuration_name":{"type":"TypeString","computed":true},"frontend_port_id":{"type":"TypeString","computed":true},"frontend_port_name":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","computed":true},"host_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"protocol":{"type":"TypeString","computed":true},"require_sni":{"type":"TypeBool","computed":true},"ssl_certificate_id":{"type":"TypeString","computed":true},"ssl_certificate_name":{"type":"TypeString","computed":true},"ssl_profile_id":{"type":"TypeString","computed":true},"ssl_profile_name":{"type":"TypeString","computed":true}}}},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"private_endpoint_connection":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"private_link_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"primary":{"type":"TypeBool","computed":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_address_allocation":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","computed":true}}}},"probe":{"type":"TypeList","computed":true,"elem":{"schema":{"host":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"interval":{"type":"TypeInt","computed":true},"match":{"type":"TypeList","computed":true,"elem":{"schema":{"body":{"type":"TypeString","computed":true},"status_code":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"minimum_servers":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","computed":true},"path":{"type":"TypeString","computed":true},"pick_host_name_from_backend_http_settings":{"type":"TypeBool","computed":true},"port":{"type":"TypeInt","computed":true},"protocol":{"type":"TypeString","computed":true},"timeout":{"type":"TypeInt","computed":true},"unhealthy_threshold":{"type":"TypeInt","computed":true}}}},"redirect_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"include_path":{"type":"TypeBool","computed":true},"include_query_string":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","computed":true},"redirect_type":{"type":"TypeString","computed":true},"target_listener_id":{"type":"TypeString","computed":true},"target_listener_name":{"type":"TypeString","computed":true},"target_url":{"type":"TypeString","computed":true}}}},"request_routing_rule":{"type":"TypeList","computed":true,"elem":{"schema":{"backend_address_pool_id":{"type":"TypeString","computed":true},"backend_address_pool_name":{"type":"TypeString","computed":true},"backend_http_settings_id":{"type":"TypeString","computed":true},"backend_http_settings_name":{"type":"TypeString","computed":true},"http_listener_id":{"type":"TypeString","computed":true},"http_listener_name":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"priority":{"type":"TypeInt","computed":true},"redirect_configuration_id":{"type":"TypeString","computed":true},"redirect_configuration_name":{"type":"TypeString","computed":true},"rewrite_rule_set_id":{"type":"TypeString","computed":true},"rewrite_rule_set_name":{"type":"TypeString","computed":true},"rule_type":{"type":"TypeString","computed":true},"url_path_map_id":{"type":"TypeString","computed":true},"url_path_map_name":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"rewrite_rule_set":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"rewrite_rule":{"type":"TypeList","computed":true,"elem":{"schema":{"condition":{"type":"TypeList","computed":true,"elem":{"schema":{"ignore_case":{"type":"TypeBool","computed":true},"negate":{"type":"TypeBool","computed":true},"pattern":{"type":"TypeString","computed":true},"variable":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","computed":true},"request_header_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"header_name":{"type":"TypeString","computed":true},"header_value":{"type":"TypeString","computed":true}}}},"response_header_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"header_name":{"type":"TypeString","computed":true},"header_value":{"type":"TypeString","computed":true}}}},"rule_sequence":{"type":"TypeInt","computed":true},"url":{"type":"TypeList","computed":true,"elem":{"schema":{"components":{"type":"TypeString","computed":true},"path":{"type":"TypeString","computed":true},"query_string":{"type":"TypeString","computed":true},"reroute":{"type":"TypeBool","computed":true}}}}}}}}}},"sku":{"type":"TypeList","computed":true,"elem":{"schema":{"capacity":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","computed":true},"tier":{"type":"TypeString","computed":true}}}},"ssl_certificate":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"key_vault_secret_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"public_cert_data":{"type":"TypeString","computed":true}}}},"ssl_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"cipher_suites":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"disabled_protocols":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"min_protocol_version":{"type":"TypeString","computed":true},"policy_name":{"type":"TypeString","computed":true},"policy_type":{"type":"TypeString","computed":true}}}},"ssl_profile":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"ssl_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"cipher_suites":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"disabled_protocols":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"min_protocol_version":{"type":"TypeString","computed":true},"policy_name":{"type":"TypeString","computed":true},"policy_type":{"type":"TypeString","computed":true}}}},"trusted_client_certificate_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"verify_client_certificate_issuer_dn":{"type":"TypeBool","computed":true},"verify_client_certificate_revocation":{"type":"TypeString","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"trusted_client_certificate":{"type":"TypeList","computed":true,"elem":{"schema":{"data":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"trusted_root_certificate":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"key_vault_secret_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"url_path_map":{"type":"TypeList","computed":true,"elem":{"schema":{"default_backend_address_pool_id":{"type":"TypeString","computed":true},"default_backend_address_pool_name":{"type":"TypeString","computed":true},"default_backend_http_settings_id":{"type":"TypeString","computed":true},"default_backend_http_settings_name":{"type":"TypeString","computed":true},"default_redirect_configuration_id":{"type":"TypeString","computed":true},"default_redirect_configuration_name":{"type":"TypeString","computed":true},"default_rewrite_rule_set_id":{"type":"TypeString","computed":true},"default_rewrite_rule_set_name":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"path_rule":{"type":"TypeList","computed":true,"elem":{"schema":{"backend_address_pool_id":{"type":"TypeString","computed":true},"backend_address_pool_name":{"type":"TypeString","computed":true},"backend_http_settings_id":{"type":"TypeString","computed":true},"backend_http_settings_name":{"type":"TypeString","computed":true},"firewall_policy_id":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"paths":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"redirect_configuration_id":{"type":"TypeString","computed":true},"redirect_configuration_name":{"type":"TypeString","computed":true},"rewrite_rule_set_id":{"type":"TypeString","computed":true},"rewrite_rule_set_name":{"type":"TypeString","computed":true}}}}}}},"waf_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"disabled_rule_group":{"type":"TypeList","computed":true,"elem":{"schema":{"rule_group_name":{"type":"TypeString","computed":true},"rules":{"type":"TypeList","computed":true,"elem":{"type":"TypeInt"}}}}},"enabled":{"type":"TypeBool","computed":true},"exclusion":{"type":"TypeList","computed":true,"elem":{"schema":{"match_variable":{"type":"TypeString","computed":true},"selector":{"type":"TypeString","computed":true},"selector_match_operator":{"type":"TypeString","computed":true}}}},"file_upload_limit_mb":{"type":"TypeInt","computed":true},"firewall_mode":{"type":"TypeString","computed":true},"max_request_body_size_kb":{"type":"TypeInt","computed":true},"request_body_check":{"type":"TypeBool","computed":true},"rule_set_type":{"type":"TypeString","computed":true},"rule_set_version":{"type":"TypeString","computed":true}}}},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_application_insights":{"schema":{"app_id":{"type":"TypeString","computed":true},"application_type":{"type":"TypeString","computed":true},"connection_string":{"type":"TypeString","computed":true},"instrumentation_key":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"retention_in_days":{"type":"TypeInt","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_application_security_group":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_arc_machine":{"schema":{"active_directory_fqdn":{"type":"TypeString","computed":true},"agent":{"type":"TypeList","computed":true,"elem":{"schema":{"extensions_allow_list":{"type":"TypeList","computed":true,"elem":{"schema":{"publisher":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"extensions_block_list":{"type":"TypeList","computed":true,"elem":{"schema":{"publisher":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"extensions_enabled":{"type":"TypeBool","computed":true},"guest_configuration_enabled":{"type":"TypeBool","computed":true},"incoming_connections_ports":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"proxy_bypass":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"proxy_url":{"type":"TypeString","computed":true}}}},"agent_version":{"type":"TypeString","computed":true},"client_public_key":{"type":"TypeString","computed":true},"cloud_metadata":{"type":"TypeList","computed":true,"elem":{"schema":{"provider":{"type":"TypeString","computed":true}}}},"detected_properties":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"display_name":{"type":"TypeString","computed":true},"dns_fqdn":{"type":"TypeString","computed":true},"domain_name":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"last_status_change_time":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"location_data":{"type":"TypeList","computed":true,"elem":{"schema":{"city":{"type":"TypeString","computed":true},"country_or_region":{"type":"TypeString","computed":true},"district":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"machine_fqdn":{"type":"TypeString","computed":true},"mssql_discovered":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"os_name":{"type":"TypeString","computed":true},"os_profile":{"type":"TypeList","computed":true,"elem":{"schema":{"computer_name":{"type":"TypeString","computed":true},"linux":{"type":"TypeList","computed":true,"elem":{"schema":{"patch":{"type":"TypeList","computed":true,"elem":{"schema":{"assessment_mode":{"type":"TypeString","computed":true},"patch_mode":{"type":"TypeString","computed":true}}}}}}},"windows":{"type":"TypeList","computed":true,"elem":{"schema":{"patch":{"type":"TypeList","computed":true,"elem":{"schema":{"assessment_mode":{"type":"TypeString","computed":true},"patch_mode":{"type":"TypeString","computed":true}}}}}}}}}},"os_sku":{"type":"TypeString","computed":true},"os_type":{"type":"TypeString","computed":true},"os_version":{"type":"TypeString","computed":true},"parent_cluster_resource_id":{"type":"TypeString","computed":true},"private_link_scope_resource_id":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"service_status":{"type":"TypeList","computed":true,"elem":{"schema":{"extension_service":{"type":"TypeList","computed":true,"elem":{"schema":{"startup_type":{"type":"TypeString","computed":true},"status":{"type":"TypeString","computed":true}}}},"guest_configuration_service":{"type":"TypeList","computed":true,"elem":{"schema":{"startup_type":{"type":"TypeString","computed":true},"status":{"type":"TypeString","computed":true}}}}}}},"status":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"vm_id":{"type":"TypeString","computed":true},"vm_uuid":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_arc_resource_bridge_appliance":{"schema":{"distro":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"infrastructure_provider":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"public_key_base64":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_attestation_provider":{"schema":{"attestation_uri":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"trust_model":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_automation_account":{"schema":{"endpoint":{"type":"TypeString","computed":true},"hybrid_service_url":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","computed":true},"private_endpoint_connection":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"secondary_key":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_automation_runbook":{"schema":{"automation_account_name":{"type":"TypeString","required":true},"content":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"log_activity_trace_level":{"type":"TypeInt","computed":true},"log_progress":{"type":"TypeBool","computed":true},"log_verbose":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"runbook_type":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_automation_variable_bool":{"schema":{"automation_account_name":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"encrypted":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_automation_variable_datetime":{"schema":{"automation_account_name":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"encrypted":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_automation_variable_int":{"schema":{"automation_account_name":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"encrypted":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeInt","computed":true}},"timeouts":{"read":5}},"azurerm_automation_variable_object":{"schema":{"automation_account_name":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"encrypted":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_automation_variable_string":{"schema":{"automation_account_name":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"encrypted":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"value":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_automation_variables":{"schema":{"automation_account_id":{"type":"TypeString","required":true},"bool":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"encrypted":{"type":"TypeBool","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"value":{"type":"TypeBool","computed":true}}}},"datetime":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"encrypted":{"type":"TypeBool","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"encrypted":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"encrypted":{"type":"TypeBool","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"int":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"encrypted":{"type":"TypeBool","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"value":{"type":"TypeInt","computed":true}}}},"null":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"encrypted":{"type":"TypeBool","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"object":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"encrypted":{"type":"TypeBool","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"string":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"encrypted":{"type":"TypeBool","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_availability_set":{"schema":{"location":{"type":"TypeString","computed":true},"managed":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"platform_fault_domain_count":{"type":"TypeInt","computed":true},"platform_update_domain_count":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_backup_policy_file_share":{"schema":{"name":{"type":"TypeString","required":true},"recovery_vault_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_backup_policy_vm":{"schema":{"name":{"type":"TypeString","required":true},"recovery_vault_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_bastion_host":{"schema":{"copy_paste_enabled":{"type":"TypeBool","computed":true},"dns_name":{"type":"TypeString","computed":true},"file_copy_enabled":{"type":"TypeBool","computed":true},"ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"public_ip_address_id":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"ip_connect_enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"scale_units":{"type":"TypeInt","computed":true},"shareable_link_enabled":{"type":"TypeBool","computed":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tunneling_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_batch_account":{"schema":{"account_endpoint":{"type":"TypeString","computed":true},"encryption":{"type":"TypeList","computed":true,"elem":{"schema":{"key_vault_key_id":{"type":"TypeString","computed":true}}}},"key_vault_reference":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"url":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"pool_allocation_mode":{"type":"TypeString","computed":true},"primary_access_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_access_key":{"type":"TypeString","computed":true},"storage_account_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_batch_application":{"schema":{"account_name":{"type":"TypeString","required":true},"allow_updates":{"type":"TypeBool","computed":true},"default_version":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_batch_certificate":{"schema":{"account_name":{"type":"TypeString","required":true},"format":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"public_data":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"thumbprint":{"type":"TypeString","computed":true},"thumbprint_algorithm":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_batch_pool":{"schema":{"account_name":{"type":"TypeString","required":true},"auto_scale":{"type":"TypeList","computed":true,"elem":{"schema":{"evaluation_interval":{"type":"TypeString","computed":true},"formula":{"type":"TypeString","computed":true}}}},"certificate":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"store_location":{"type":"TypeString","computed":true},"store_name":{"type":"TypeString","computed":true},"visibility":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}}},"container_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"container_image_names":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"container_registries":{"type":"TypeList","computed":true,"elem":{"schema":{"password":{"type":"TypeString","computed":true},"registry_server":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true},"user_name":{"type":"TypeString","computed":true}}}},"type":{"type":"TypeString","computed":true}}}},"data_disks":{"type":"TypeList","computed":true,"elem":{"schema":{"caching":{"type":"TypeString","computed":true},"disk_size_gb":{"type":"TypeInt","computed":true},"lun":{"type":"TypeInt","computed":true},"storage_account_type":{"type":"TypeString","computed":true}}}},"disk_encryption":{"type":"TypeList","computed":true,"elem":{"schema":{"disk_encryption_target":{"type":"TypeString","computed":true}}}},"display_name":{"type":"TypeString","computed":true},"extensions":{"type":"TypeList","computed":true,"elem":{"schema":{"auto_upgrade_minor_version":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","computed":true},"protected_settings":{"type":"TypeString","computed":true},"provision_after_extensions":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"publisher":{"type":"TypeString","computed":true},"settings_json":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true},"type_handler_version":{"type":"TypeString","computed":true}}}},"fixed_scale":{"type":"TypeList","computed":true,"elem":{"schema":{"resize_timeout":{"type":"TypeString","computed":true},"target_dedicated_nodes":{"type":"TypeInt","computed":true},"target_low_priority_nodes":{"type":"TypeInt","computed":true}}}},"inter_node_communication":{"type":"TypeString","computed":true},"license_type":{"type":"TypeString","computed":true},"max_tasks_per_node":{"type":"TypeInt","computed":true},"metadata":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"mount":{"type":"TypeList","computed":true,"elem":{"schema":{"azure_blob_file_system":{"type":"TypeList","optional":true,"elem":{"schema":{"account_key":{"type":"TypeString","computed":true},"account_name":{"type":"TypeString","computed":true},"blobfuse_options":{"type":"TypeString","computed":true},"container_name":{"type":"TypeString","computed":true},"identity_id":{"type":"TypeString","computed":true},"relative_mount_path":{"type":"TypeString","computed":true},"sas_key":{"type":"TypeString","computed":true}}}},"azure_file_share":{"type":"TypeList","optional":true,"elem":{"schema":{"account_key":{"type":"TypeString","computed":true},"account_name":{"type":"TypeString","computed":true},"azure_file_url":{"type":"TypeString","computed":true},"mount_options":{"type":"TypeString","computed":true},"relative_mount_path":{"type":"TypeString","computed":true}}}},"cifs_mount":{"type":"TypeList","computed":true,"elem":{"schema":{"mount_options":{"type":"TypeString","computed":true},"password":{"type":"TypeString","computed":true},"relative_mount_path":{"type":"TypeString","computed":true},"source":{"type":"TypeString","computed":true},"user_name":{"type":"TypeString","computed":true}}}},"nfs_mount":{"type":"TypeList","computed":true,"elem":{"schema":{"mount_options":{"type":"TypeString","computed":true},"relative_mount_path":{"type":"TypeString","computed":true},"source":{"type":"TypeString","computed":true}}}}}}},"name":{"type":"TypeString","required":true},"network_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"accelerated_networking_enabled":{"type":"TypeBool","computed":true},"dynamic_vnet_assignment_scope":{"type":"TypeString","computed":true},"endpoint_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"backend_port":{"type":"TypeInt","computed":true},"frontend_port_range":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"network_security_group_rules":{"type":"TypeList","computed":true,"elem":{"schema":{"access":{"type":"TypeString","computed":true},"priority":{"type":"TypeInt","computed":true},"source_address_prefix":{"type":"TypeString","computed":true},"source_port_ranges":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"protocol":{"type":"TypeString","computed":true}}}},"public_address_provisioning_type":{"type":"TypeString","computed":true},"public_ips":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"subnet_id":{"type":"TypeString","computed":true}}}},"node_agent_sku_id":{"type":"TypeString","computed":true},"node_placement":{"type":"TypeList","computed":true,"elem":{"schema":{"policy":{"type":"TypeString","computed":true}}}},"os_disk_placement":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"start_task":{"type":"TypeList","computed":true,"elem":{"schema":{"command_line":{"type":"TypeString","computed":true},"common_environment_properties":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"container":{"type":"TypeList","computed":true,"elem":{"schema":{"image_name":{"type":"TypeString","computed":true},"registry":{"type":"TypeList","computed":true,"elem":{"schema":{"password":{"type":"TypeString","computed":true},"registry_server":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true},"user_name":{"type":"TypeString","computed":true}}}},"run_options":{"type":"TypeString","computed":true},"working_directory":{"type":"TypeString","computed":true}}}},"resource_file":{"type":"TypeList","computed":true,"elem":{"schema":{"auto_storage_container_name":{"type":"TypeString","computed":true},"blob_prefix":{"type":"TypeString","computed":true},"file_mode":{"type":"TypeString","computed":true},"file_path":{"type":"TypeString","computed":true},"http_url":{"type":"TypeString","computed":true},"storage_container_url":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true}}}},"task_retry_maximum":{"type":"TypeInt","computed":true},"user_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"auto_user":{"type":"TypeList","computed":true,"elem":{"schema":{"elevation_level":{"type":"TypeString","computed":true},"scope":{"type":"TypeString","computed":true}}}},"user_name":{"type":"TypeString","computed":true}}}},"wait_for_success":{"type":"TypeBool","computed":true}}}},"storage_image_reference":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"offer":{"type":"TypeString","computed":true},"publisher":{"type":"TypeString","computed":true},"sku":{"type":"TypeString","computed":true},"version":{"type":"TypeString","computed":true}}}},"task_scheduling_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"node_fill_type":{"type":"TypeString","computed":true}}}},"user_accounts":{"type":"TypeList","computed":true,"elem":{"schema":{"elevation_level":{"type":"TypeString","computed":true},"linux_user_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"gid":{"type":"TypeInt","computed":true},"ssh_private_key":{"type":"TypeString","computed":true},"uid":{"type":"TypeInt","computed":true}}}},"name":{"type":"TypeString","computed":true},"password":{"type":"TypeString","computed":true},"windows_user_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"login_mode":{"type":"TypeString","computed":true}}}}}}},"vm_size":{"type":"TypeString","computed":true},"windows":{"type":"TypeList","computed":true,"elem":{"schema":{"enable_automatic_updates":{"type":"TypeBool","computed":true}}}}},"timeouts":{"read":5}},"azurerm_billing_enrollment_account_scope":{"schema":{"billing_account_name":{"type":"TypeString","required":true},"enrollment_account_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_billing_mca_account_scope":{"schema":{"billing_account_name":{"type":"TypeString","required":true},"billing_profile_name":{"type":"TypeString","required":true},"invoice_section_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_billing_mpa_account_scope":{"schema":{"billing_account_name":{"type":"TypeString","required":true},"customer_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_blueprint_definition":{"schema":{"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","computed":true},"last_modified":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"scope_id":{"type":"TypeString","required":true},"target_scope":{"type":"TypeString","computed":true},"time_created":{"type":"TypeString","computed":true},"versions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_blueprint_published_version":{"schema":{"blueprint_name":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","computed":true},"last_modified":{"type":"TypeString","computed":true},"scope_id":{"type":"TypeString","required":true},"target_scope":{"type":"TypeString","computed":true},"time_created":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true},"version":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_cdn_frontdoor_custom_domain":{"schema":{"cdn_frontdoor_profile_id":{"type":"TypeString","computed":true},"dns_zone_id":{"type":"TypeString","computed":true},"expiration_date":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"profile_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tls":{"type":"TypeList","computed":true,"elem":{"schema":{"cdn_frontdoor_secret_id":{"type":"TypeString","computed":true},"certificate_type":{"type":"TypeString","computed":true},"minimum_tls_version":{"type":"TypeString","computed":true}}}},"validation_token":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_cdn_frontdoor_endpoint":{"schema":{"enabled":{"type":"TypeBool","computed":true},"host_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"profile_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_cdn_frontdoor_firewall_policy":{"schema":{"enabled":{"type":"TypeBool","computed":true},"frontend_endpoint_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"mode":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"redirect_url":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_cdn_frontdoor_origin_group":{"schema":{"cdn_frontdoor_profile_id":{"type":"TypeString","computed":true},"health_probe":{"type":"TypeList","computed":true,"elem":{"schema":{"interval_in_seconds":{"type":"TypeInt","computed":true},"path":{"type":"TypeString","computed":true},"protocol":{"type":"TypeString","computed":true},"request_type":{"type":"TypeString","computed":true}}}},"load_balancing":{"type":"TypeList","computed":true,"elem":{"schema":{"additional_latency_in_milliseconds":{"type":"TypeInt","computed":true},"sample_size":{"type":"TypeInt","computed":true},"successful_samples_required":{"type":"TypeInt","computed":true}}}},"name":{"type":"TypeString","required":true},"profile_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"restore_traffic_time_to_healed_or_new_endpoint_in_minutes":{"type":"TypeInt","computed":true},"session_affinity_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_cdn_frontdoor_profile":{"schema":{"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"resource_guid":{"type":"TypeString","computed":true},"response_timeout_seconds":{"type":"TypeInt","computed":true},"sku_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_cdn_frontdoor_rule_set":{"schema":{"cdn_frontdoor_profile_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"profile_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_cdn_frontdoor_secret":{"schema":{"cdn_frontdoor_profile_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"profile_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"secret":{"type":"TypeList","computed":true,"elem":{"schema":{"customer_certificate":{"type":"TypeList","computed":true,"elem":{"schema":{"expiration_date":{"type":"TypeString","computed":true},"key_vault_certificate_id":{"type":"TypeString","computed":true},"subject_alternative_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}}}}}},"timeouts":{"read":5}},"azurerm_cdn_profile":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_client_config":{"schema":{"client_id":{"type":"TypeString","computed":true},"object_id":{"type":"TypeString","computed":true},"subscription_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_cognitive_account":{"schema":{"endpoint":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"primary_access_key":{"type":"TypeString","computed":true},"qna_runtime_endpoint":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_access_key":{"type":"TypeString","computed":true},"sku_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_communication_service":{"schema":{"data_location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_confidential_ledger":{"schema":{"azuread_based_service_principal":{"type":"TypeList","computed":true,"elem":{"schema":{"ledger_role_name":{"type":"TypeString","computed":true},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true}}}},"certificate_based_security_principal":{"type":"TypeList","computed":true,"elem":{"schema":{"ledger_role_name":{"type":"TypeString","computed":true},"pem_public_key":{"type":"TypeString","computed":true}}}},"identity_service_endpoint":{"type":"TypeString","computed":true},"ledger_endpoint":{"type":"TypeString","computed":true},"ledger_type":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_consumption_budget_resource_group":{"schema":{"amount":{"type":"TypeFloat","computed":true},"filter":{"type":"TypeList","computed":true,"elem":{"schema":{"dimension":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"operator":{"type":"TypeString","computed":true},"values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"not":{"type":"TypeList","computed":true,"elem":{"schema":{"dimension":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"operator":{"type":"TypeString","computed":true},"values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"tag":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"operator":{"type":"TypeString","computed":true},"values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}}}}},"tag":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"operator":{"type":"TypeString","computed":true},"values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}}}}},"name":{"type":"TypeString","required":true},"notification":{"type":"TypeList","computed":true,"elem":{"schema":{"contact_emails":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"contact_groups":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"contact_roles":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","computed":true},"operator":{"type":"TypeString","computed":true},"threshold":{"type":"TypeInt","computed":true},"threshold_type":{"type":"TypeString","computed":true}}}},"resource_group_id":{"type":"TypeString","required":true},"time_grain":{"type":"TypeString","computed":true},"time_period":{"type":"TypeList","computed":true,"elem":{"schema":{"end_date":{"type":"TypeString","computed":true},"start_date":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_consumption_budget_subscription":{"schema":{"amount":{"type":"TypeFloat","computed":true},"filter":{"type":"TypeList","computed":true,"elem":{"schema":{"dimension":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"operator":{"type":"TypeString","computed":true},"values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"not":{"type":"TypeList","computed":true,"elem":{"schema":{"dimension":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"operator":{"type":"TypeString","computed":true},"values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"tag":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"operator":{"type":"TypeString","computed":true},"values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}}}}},"tag":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"operator":{"type":"TypeString","computed":true},"values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}}}}},"name":{"type":"TypeString","required":true},"notification":{"type":"TypeList","computed":true,"elem":{"schema":{"contact_emails":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"contact_groups":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"contact_roles":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"enabled":{"type":"TypeBool","computed":true},"operator":{"type":"TypeString","computed":true},"threshold":{"type":"TypeInt","computed":true},"threshold_type":{"type":"TypeString","computed":true}}}},"subscription_id":{"type":"TypeString","required":true},"time_grain":{"type":"TypeString","computed":true},"time_period":{"type":"TypeList","computed":true,"elem":{"schema":{"end_date":{"type":"TypeString","computed":true},"start_date":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_container_app":{"schema":{"container_app_environment_id":{"type":"TypeString","computed":true},"custom_domain_verification_id":{"type":"TypeString","description":"The ID of the Custom Domain Verification for this Container App.","computed":true},"dapr":{"type":"TypeList","computed":true,"elem":{"schema":{"app_id":{"type":"TypeString","description":"The Dapr Application Identifier.","computed":true},"app_port":{"type":"TypeInt","description":"The port which the application is listening on. This is the same as the `ingress` port.","computed":true},"app_protocol":{"type":"TypeString","description":"The protocol for the app. Possible values include `http` and `grpc`. Defaults to `http`.","computed":true}}}},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"ingress":{"type":"TypeList","computed":true,"elem":{"schema":{"allow_insecure_connections":{"type":"TypeBool","description":"Should this ingress allow insecure connections?","computed":true},"custom_domain":{"type":"TypeList","computed":true,"elem":{"schema":{"certificate_binding_type":{"type":"TypeString","description":"The Binding type. Possible values include `Disabled` and `SniEnabled`. Defaults to `Disabled`","computed":true},"certificate_id":{"type":"TypeString","description":"The ID of the Certificate.","computed":true},"name":{"type":"TypeString","description":"The hostname of the Certificate. Must be the CN or a named SAN in the certificate.","computed":true}}}},"exposed_port":{"type":"TypeInt","description":"The exposed port on the container for the Ingress traffic.","computed":true},"external_enabled":{"type":"TypeBool","description":"Is this an external Ingress.","computed":true},"fqdn":{"type":"TypeString","description":"The FQDN of the ingress.","computed":true},"ip_security_restriction":{"type":"TypeList","computed":true,"elem":{"schema":{"action":{"type":"TypeString","description":"The action. Allow or Deny.","computed":true},"description":{"type":"TypeString","description":"Describe the IP restriction rule that is being sent to the container-app.","computed":true},"ip_address_range":{"type":"TypeString","description":"CIDR notation to match incoming IP address.","computed":true},"name":{"type":"TypeString","description":"Name for the IP restriction rule.","computed":true}}}},"target_port":{"type":"TypeInt","description":"The target port on the container for the Ingress traffic.","computed":true},"traffic_weight":{"type":"TypeList","computed":true,"elem":{"schema":{"label":{"type":"TypeString","description":"The label to apply to the revision as a name prefix for routing traffic.","computed":true},"latest_revision":{"type":"TypeBool","description":"This traffic Weight relates to the latest stable Container Revision.","computed":true},"percentage":{"type":"TypeInt","description":"The percentage of traffic to send to this revision.","computed":true},"revision_suffix":{"type":"TypeString","description":"The suffix string to append to the revision. This must be unique for the Container App's lifetime. A default hash created by the service will be used if this value is omitted.","computed":true}}}},"transport":{"type":"TypeString","description":"The transport method for the Ingress. Possible values include `auto`, `http`, and `http2`, `tcp`. Defaults to `auto`","computed":true}}}},"latest_revision_fqdn":{"type":"TypeString","description":"The fully qualified domain name of the latest Container App.","computed":true},"latest_revision_name":{"type":"TypeString","description":"The name of the latest Container Revision.","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"outbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"registry":{"type":"TypeList","computed":true,"elem":{"schema":{"identity":{"type":"TypeString","description":"ID of the System or User Managed Identity used to pull images from the Container Registry","computed":true},"password_secret_name":{"type":"TypeString","description":"The name of the Secret Reference containing the password value for this user on the Container Registry.","computed":true},"server":{"type":"TypeString","description":"The hostname for the Container Registry.","computed":true},"username":{"type":"TypeString","description":"The username to use for this Container Registry.","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"revision_mode":{"type":"TypeString","computed":true},"secret":{"type":"TypeSet","computed":true,"elem":{"schema":{"identity":{"type":"TypeString","description":"The identity to use for accessing key vault reference.","computed":true},"key_vault_secret_id":{"type":"TypeString","description":"The id of the key vault secret.","computed":true},"name":{"type":"TypeString","description":"The secret name.","computed":true},"value":{"type":"TypeString","description":"The value for this secret.","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"template":{"type":"TypeList","computed":true,"elem":{"schema":{"azure_queue_scale_rule":{"type":"TypeList","computed":true,"elem":{"schema":{"authentication":{"type":"TypeList","computed":true,"elem":{"schema":{"secret_name":{"type":"TypeString","computed":true},"trigger_parameter":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","computed":true},"queue_length":{"type":"TypeInt","computed":true},"queue_name":{"type":"TypeString","computed":true}}}},"container":{"type":"TypeList","computed":true,"elem":{"schema":{"args":{"type":"TypeList","description":"A list of args to pass to the container.","computed":true,"elem":{"type":"TypeString"}},"command":{"type":"TypeList","description":"A command to pass to the container to override the default. This is provided as a list of command line elements without spaces.","computed":true,"elem":{"type":"TypeString"}},"cpu":{"type":"TypeFloat","description":"The amount of vCPU to allocate to the container. Possible values include `0.25`, `0.5`, `0.75`, `1.0`, `1.25`, `1.5`, `1.75`, and `2.0`. **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.0` / `2.0` or `0.5` / `1.0`","computed":true},"env":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The name of the environment variable for the container.","computed":true},"secret_name":{"type":"TypeString","description":"The name of the secret that contains the value for this environment variable.","computed":true},"value":{"type":"TypeString","description":"The value for this environment variable. **NOTE:** This value is ignored if `secret_name` is used","computed":true}}}},"ephemeral_storage":{"type":"TypeString","description":"The amount of ephemeral storage available to the Container App.","computed":true},"image":{"type":"TypeString","description":"The image to use to create the container.","computed":true},"liveness_probe":{"type":"TypeList","computed":true,"elem":{"schema":{"failure_count_threshold":{"type":"TypeInt","description":"The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`.","computed":true},"header":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The HTTP Header Name.","computed":true},"value":{"type":"TypeString","description":"The HTTP Header value.","computed":true}}}},"host":{"type":"TypeString","description":"The probe hostname. Defaults to the pod IP address. Setting a value for `Host` in `headers` can be used to override this for `http` and `https` type probes.","computed":true},"initial_delay":{"type":"TypeInt","description":"The time in seconds to wait after the container has started before the probe is started.","computed":true},"interval_seconds":{"type":"TypeInt","description":"How often, in seconds, the probe should run. Possible values are between `1` and `240`. Defaults to `10`","computed":true},"path":{"type":"TypeString","description":"The URI to use with the `host` for http type probes. Not valid for `TCP` type probes. Defaults to `/`.","computed":true},"port":{"type":"TypeInt","description":"The port number on which to connect. Possible values are between `1` and `65535`.","computed":true},"termination_grace_period_seconds":{"type":"TypeInt","description":"The time in seconds after the container is sent the termination signal before the process if forcibly killed.","computed":true},"timeout":{"type":"TypeInt","description":"Time in seconds after which the probe times out. Possible values are between `1` an `240`. Defaults to `1`.","computed":true},"transport":{"type":"TypeString","description":"Type of probe. Possible values are `TCP`, `HTTP`, and `HTTPS`.","computed":true}}}},"memory":{"type":"TypeString","description":"The amount of memory to allocate to the container. Possible values include `0.5Gi`, `1.0Gi`, `1.5Gi`, `2.0Gi`, `2.5Gi`, `3.0Gi`, `3.5Gi`, and `4.0Gi`. **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.25` / `2.5Gi` or `0.75` / `1.5Gi`","computed":true},"name":{"type":"TypeString","description":"The name of the container.","computed":true},"readiness_probe":{"type":"TypeList","computed":true,"elem":{"schema":{"failure_count_threshold":{"type":"TypeInt","description":"The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`.","computed":true},"header":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The HTTP Header Name.","computed":true},"value":{"type":"TypeString","description":"The HTTP Header value.","computed":true}}}},"host":{"type":"TypeString","description":"The probe hostname. Defaults to the pod IP address. Setting a value for `Host` in `headers` can be used to override this for `http` and `https` type probes.","computed":true},"interval_seconds":{"type":"TypeInt","description":"How often, in seconds, the probe should run. Possible values are between `1` and `240`. Defaults to `10`","computed":true},"path":{"type":"TypeString","description":"The URI to use for http type probes. Not valid for `TCP` type probes. Defaults to `/`.","computed":true},"port":{"type":"TypeInt","description":"The port number on which to connect. Possible values are between `1` and `65535`.","computed":true},"success_count_threshold":{"type":"TypeInt","description":"The number of consecutive successful responses required to consider this probe as successful. Possible values are between `1` and `10`. Defaults to `3`.","computed":true},"timeout":{"type":"TypeInt","description":"Time in seconds after which the probe times out. Possible values are between `1` an `240`. Defaults to `1`.","computed":true},"transport":{"type":"TypeString","description":"Type of probe. Possible values are `TCP`, `HTTP`, and `HTTPS`.","computed":true}}}},"startup_probe":{"type":"TypeList","computed":true,"elem":{"schema":{"failure_count_threshold":{"type":"TypeInt","description":"The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`.","computed":true},"header":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The HTTP Header Name.","computed":true},"value":{"type":"TypeString","description":"The HTTP Header value.","computed":true}}}},"host":{"type":"TypeString","computed":true},"interval_seconds":{"type":"TypeInt","description":"How often, in seconds, the probe should run. Possible values are between `1` and `240`. Defaults to `10`","computed":true},"path":{"type":"TypeString","computed":true},"port":{"type":"TypeInt","computed":true},"termination_grace_period_seconds":{"type":"TypeInt","description":"The time in seconds after the container is sent the termination signal before the process if forcibly killed.","computed":true},"timeout":{"type":"TypeInt","description":"Time in seconds after which the probe times out. Possible values are between `1` an `240`. Defaults to `1`.","computed":true},"transport":{"type":"TypeString","computed":true}}}},"volume_mounts":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The name of the Volume to be mounted in the container.","computed":true},"path":{"type":"TypeString","description":"The path in the container at which to mount this volume.","computed":true}}}}}}},"custom_scale_rule":{"type":"TypeList","optional":true,"elem":{"schema":{"authentication":{"type":"TypeList","computed":true,"elem":{"schema":{"secret_name":{"type":"TypeString","computed":true},"trigger_parameter":{"type":"TypeString","computed":true}}}},"custom_rule_type":{"type":"TypeString","computed":true},"metadata":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true}}}},"http_scale_rule":{"type":"TypeList","computed":true,"elem":{"schema":{"authentication":{"type":"TypeList","computed":true,"elem":{"schema":{"secret_name":{"type":"TypeString","computed":true},"trigger_parameter":{"type":"TypeString","computed":true}}}},"concurrent_requests":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"init_container":{"type":"TypeList","computed":true,"elem":{"schema":{"args":{"type":"TypeList","description":"A list of args to pass to the container.","computed":true,"elem":{"type":"TypeString"}},"command":{"type":"TypeList","description":"A command to pass to the container to override the default. This is provided as a list of command line elements without spaces.","computed":true,"elem":{"type":"TypeString"}},"cpu":{"type":"TypeFloat","description":"The amount of vCPU to allocate to the container. Possible values include `0.25`, `0.5`, `0.75`, `1.0`, `1.25`, `1.5`, `1.75`, and `2.0`. **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.0` / `2.0` or `0.5` / `1.0`","computed":true},"env":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The name of the environment variable for the container.","computed":true},"secret_name":{"type":"TypeString","description":"The name of the secret that contains the value for this environment variable.","computed":true},"value":{"type":"TypeString","description":"The value for this environment variable. **NOTE:** This value is ignored if `secret_name` is used","computed":true}}}},"ephemeral_storage":{"type":"TypeString","description":"The amount of ephemeral storage available to the Container App.","computed":true},"image":{"type":"TypeString","description":"The image to use to create the container.","computed":true},"memory":{"type":"TypeString","description":"The amount of memory to allocate to the container. Possible values include `0.5Gi`, `1.0Gi`, `1.5Gi`, `2.0Gi`, `2.5Gi`, `3.0Gi`, `3.5Gi`, and `4.0Gi`. **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.25` / `2.5Gi` or `0.75` / `1.5Gi`","computed":true},"name":{"type":"TypeString","description":"The name of the container.","computed":true},"volume_mounts":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The name of the Volume to be mounted in the container.","computed":true},"path":{"type":"TypeString","description":"The path in the container at which to mount this volume.","computed":true}}}}}}},"max_replicas":{"type":"TypeInt","description":"The maximum number of replicas for this container.","computed":true},"min_replicas":{"type":"TypeInt","description":"The minimum number of replicas for this container.","computed":true},"revision_suffix":{"type":"TypeString","computed":true},"tcp_scale_rule":{"type":"TypeList","computed":true,"elem":{"schema":{"authentication":{"type":"TypeList","computed":true,"elem":{"schema":{"secret_name":{"type":"TypeString","computed":true},"trigger_parameter":{"type":"TypeString","computed":true}}}},"concurrent_requests":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"volume":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"storage_name":{"type":"TypeString","computed":true},"storage_type":{"type":"TypeString","computed":true}}}}}}},"workload_profile_name":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_container_app_environment":{"schema":{"custom_domain_verification_id":{"type":"TypeString","description":"The ID of the Custom Domain Verification for this Container App Environment.","computed":true},"default_domain":{"type":"TypeString","description":"The default publicly resolvable name of this Container App Environment","computed":true},"docker_bridge_cidr":{"type":"TypeString","description":"The network addressing in which the Container Apps in this Container App Environment will reside in CIDR notation.","computed":true},"infrastructure_subnet_id":{"type":"TypeString","description":"The existing Subnet in use by the Container Apps Control Plane.","computed":true},"internal_load_balancer_enabled":{"type":"TypeBool","description":"Does the Container Environment operate in Internal Load Balancing Mode?","computed":true},"location":{"type":"TypeString","computed":true},"log_analytics_workspace_name":{"type":"TypeString","description":"The name of the Log Analytics Workspace this Container Apps Managed Environment is linked to.","computed":true},"name":{"type":"TypeString","required":true,"description":"The name of the Container Apps Managed Environment."},"platform_reserved_cidr":{"type":"TypeString","description":"The IP range, in CIDR notation, that is reserved for environment infrastructure IP addresses.","computed":true},"platform_reserved_dns_ip_address":{"type":"TypeString","description":"The IP address from the IP range defined by `platform_reserved_cidr` that is reserved for the internal DNS server.","computed":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"static_ip_address":{"type":"TypeString","description":"The Static IP Address of the Environment.","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_container_app_environment_certificate":{"schema":{"container_app_environment_id":{"type":"TypeString","required":true,"description":"The Container App Managed Environment ID to configure this Certificate on.","forceNew":true},"expiration_date":{"type":"TypeString","description":"The expiration date for the Certificate.","computed":true},"issue_date":{"type":"TypeString","description":"The date of issue for the Certificate.","computed":true},"issuer":{"type":"TypeString","description":"The Certificate Issuer.","computed":true},"name":{"type":"TypeString","required":true,"description":"The name of the Container Apps Certificate.","forceNew":true},"subject_name":{"type":"TypeString","description":"The Subject Name for the Certificate.","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"thumbprint":{"type":"TypeString","description":"The Thumbprint of the Certificate.","computed":true}},"timeouts":{"read":5}},"azurerm_container_group":{"schema":{"fqdn":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"ip_address":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"subnet_ids":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_container_registry":{"schema":{"admin_enabled":{"type":"TypeBool","computed":true},"admin_password":{"type":"TypeString","computed":true},"admin_username":{"type":"TypeString","computed":true},"data_endpoint_enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"login_server":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_container_registry_cache_rule":{"schema":{"container_registry_id":{"type":"TypeString","required":true},"credential_set_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"source_repo":{"type":"TypeString","computed":true},"target_repo":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_container_registry_scope_map":{"schema":{"actions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"container_registry_name":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_container_registry_token":{"schema":{"container_registry_name":{"type":"TypeString","required":true},"enabled":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"scope_map_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_cosmosdb_account":{"schema":{"automatic_failover_enabled":{"type":"TypeBool","computed":true},"capabilities":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true}}}},"consistency_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"consistency_level":{"type":"TypeString","computed":true},"max_interval_in_seconds":{"type":"TypeInt","computed":true},"max_staleness_prefix":{"type":"TypeInt","computed":true}}}},"endpoint":{"type":"TypeString","computed":true},"free_tier_enabled":{"type":"TypeBool","computed":true},"geo_location":{"type":"TypeList","computed":true,"elem":{"schema":{"failover_priority":{"type":"TypeInt","computed":true},"id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true}}}},"ip_range_filter":{"type":"TypeString","computed":true},"is_virtual_network_filter_enabled":{"type":"TypeBool","computed":true},"key_vault_key_id":{"type":"TypeString","computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"multiple_write_locations_enabled":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"offer_type":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"primary_mongodb_connection_string":{"type":"TypeString","computed":true},"primary_readonly_key":{"type":"TypeString","computed":true},"primary_readonly_mongodb_connection_string":{"type":"TypeString","computed":true},"primary_readonly_sql_connection_string":{"type":"TypeString","computed":true},"primary_sql_connection_string":{"type":"TypeString","computed":true},"read_endpoints":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"secondary_key":{"type":"TypeString","computed":true},"secondary_mongodb_connection_string":{"type":"TypeString","computed":true},"secondary_readonly_key":{"type":"TypeString","computed":true},"secondary_readonly_mongodb_connection_string":{"type":"TypeString","computed":true},"secondary_readonly_sql_connection_string":{"type":"TypeString","computed":true},"secondary_sql_connection_string":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"virtual_network_rule":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true}}}},"write_endpoints":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_cosmosdb_mongo_database":{"schema":{"account_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_cosmosdb_restorable_database_accounts":{"schema":{"accounts":{"type":"TypeList","computed":true,"elem":{"schema":{"api_type":{"type":"TypeString","computed":true},"creation_time":{"type":"TypeString","computed":true},"deletion_time":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"restorable_locations":{"type":"TypeList","computed":true,"elem":{"schema":{"creation_time":{"type":"TypeString","computed":true},"deletion_time":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"regional_database_account_instance_id":{"type":"TypeString","computed":true}}}}}}},"location":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_cosmosdb_sql_database":{"schema":{"account_name":{"type":"TypeString","required":true},"autoscale_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"max_throughput":{"type":"TypeInt","computed":true}}}},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"throughput":{"type":"TypeInt","computed":true}},"timeouts":{"read":5}},"azurerm_cosmosdb_sql_role_definition":{"schema":{"account_name":{"type":"TypeString","required":true},"assignable_scopes":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"permissions":{"type":"TypeSet","computed":true,"elem":{"schema":{"data_actions":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"role_definition_id":{"type":"TypeString","required":true},"type":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_dashboard_grafana":{"schema":{"api_key_enabled":{"type":"TypeBool","computed":true},"auto_generated_domain_name_label_scope":{"type":"TypeString","computed":true},"azure_monitor_workspace_integrations":{"type":"TypeList","computed":true,"elem":{"schema":{"resource_id":{"type":"TypeString","computed":true}}}},"deterministic_outbound_ip_enabled":{"type":"TypeBool","computed":true},"endpoint":{"type":"TypeString","computed":true},"grafana_major_version":{"type":"TypeString","computed":true},"grafana_version":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","optional":true,"forceNew":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"forceNew":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true,"forceNew":true}}},"maxItems":1},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"outbound_ips":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"public_network_access_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"zone_redundancy_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_data_factory":{"schema":{"github_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"account_name":{"type":"TypeString","computed":true},"branch_name":{"type":"TypeString","computed":true},"git_url":{"type":"TypeString","computed":true},"repository_name":{"type":"TypeString","computed":true},"root_folder":{"type":"TypeString","computed":true}}}},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"vsts_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"account_name":{"type":"TypeString","computed":true},"branch_name":{"type":"TypeString","computed":true},"project_name":{"type":"TypeString","computed":true},"repository_name":{"type":"TypeString","computed":true},"root_folder":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_data_factory_trigger_schedule":{"schema":{"activated":{"type":"TypeBool","computed":true},"annotations":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"data_factory_id":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"end_time":{"type":"TypeString","computed":true},"frequency":{"type":"TypeString","computed":true},"interval":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true},"pipeline_name":{"type":"TypeString","computed":true},"schedule":{"type":"TypeList","computed":true,"elem":{"schema":{"days_of_month":{"type":"TypeList","computed":true,"elem":{"type":"TypeInt"}},"days_of_week":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"hours":{"type":"TypeList","computed":true,"elem":{"type":"TypeInt"}},"minutes":{"type":"TypeList","computed":true,"elem":{"type":"TypeInt"}},"monthly":{"type":"TypeList","computed":true,"elem":{"schema":{"week":{"type":"TypeInt","computed":true},"weekday":{"type":"TypeString","computed":true}}}}}}},"start_time":{"type":"TypeString","computed":true},"time_zone":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_data_factory_trigger_schedules":{"schema":{"data_factory_id":{"type":"TypeString","required":true},"items":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_data_protection_backup_vault":{"schema":{"datastore_type":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"redundancy":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_data_share":{"schema":{"account_id":{"type":"TypeString","required":true},"description":{"type":"TypeString","computed":true},"kind":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"snapshot_schedule":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"recurrence":{"type":"TypeString","computed":true},"start_time":{"type":"TypeString","computed":true}}}},"terms":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_data_share_account":{"schema":{"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_data_share_dataset_blob_storage":{"schema":{"container_name":{"type":"TypeString","computed":true},"data_share_id":{"type":"TypeString","required":true},"display_name":{"type":"TypeString","computed":true},"file_path":{"type":"TypeString","computed":true},"folder_path":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"storage_account":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","computed":true},"subscription_id":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_data_share_dataset_data_lake_gen2":{"schema":{"display_name":{"type":"TypeString","computed":true},"file_path":{"type":"TypeString","computed":true},"file_system_name":{"type":"TypeString","computed":true},"folder_path":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"share_id":{"type":"TypeString","required":true},"storage_account_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_data_share_dataset_kusto_cluster":{"schema":{"display_name":{"type":"TypeString","computed":true},"kusto_cluster_id":{"type":"TypeString","computed":true},"kusto_cluster_location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"share_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_data_share_dataset_kusto_database":{"schema":{"display_name":{"type":"TypeString","computed":true},"kusto_cluster_location":{"type":"TypeString","computed":true},"kusto_database_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"share_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_database_migration_project":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"service_name":{"type":"TypeString","required":true},"source_platform":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"target_platform":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_database_migration_service":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_databox_edge_device":{"schema":{"device_properties":{"type":"TypeList","computed":true,"elem":{"schema":{"capacity":{"type":"TypeInt","computed":true},"configured_role_types":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"culture":{"type":"TypeString","computed":true},"hcs_version":{"type":"TypeString","computed":true},"model":{"type":"TypeString","computed":true},"node_count":{"type":"TypeInt","computed":true},"serial_number":{"type":"TypeString","computed":true},"software_version":{"type":"TypeString","computed":true},"status":{"type":"TypeString","computed":true},"time_zone":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"sku_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_databricks_access_connector":{"schema":{"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_databricks_workspace":{"schema":{"location":{"type":"TypeString","computed":true},"managed_disk_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeString","computed":true},"storage_account_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","computed":true},"workspace_url":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_databricks_workspace_private_endpoint_connection":{"schema":{"connections":{"type":"TypeList","computed":true,"elem":{"schema":{"action_required":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"status":{"type":"TypeString","computed":true},"workspace_private_endpoint_id":{"type":"TypeString","computed":true}}}},"private_endpoint_id":{"type":"TypeString","required":true},"workspace_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_dedicated_host":{"schema":{"dedicated_host_group_name":{"type":"TypeString","required":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_dedicated_host_group":{"schema":{"automatic_placement_enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"platform_fault_domain_count":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_dev_test_lab":{"schema":{"artifacts_storage_account_id":{"type":"TypeString","computed":true},"default_premium_storage_account_id":{"type":"TypeString","computed":true},"default_storage_account_id":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"premium_data_disk_storage_account_id":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"storage_type":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"unique_identifier":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_dev_test_virtual_network":{"schema":{"allowed_subnets":{"type":"TypeList","computed":true,"elem":{"schema":{"allow_public_ip":{"type":"TypeString","computed":true},"lab_subnet_name":{"type":"TypeString","computed":true},"resource_id":{"type":"TypeString","computed":true}}}},"lab_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"subnet_overrides":{"type":"TypeList","computed":true,"elem":{"schema":{"lab_subnet_name":{"type":"TypeString","computed":true},"resource_id":{"type":"TypeString","computed":true},"use_in_vm_creation_permission":{"type":"TypeString","computed":true},"use_public_ip_address_permission":{"type":"TypeString","computed":true},"virtual_network_pool_name":{"type":"TypeString","computed":true}}}},"unique_identifier":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_digital_twins_instance":{"schema":{"host_name":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_disk_access":{"schema":{"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_disk_encryption_set":{"schema":{"auto_key_rotation_enabled":{"type":"TypeBool","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"key_vault_key_url":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_dns_a_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"records":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"target_resource_id":{"type":"TypeString","computed":true},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_dns_aaaa_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"records":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"target_resource_id":{"type":"TypeString","computed":true},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_dns_caa_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"record":{"type":"TypeSet","computed":true,"elem":{"schema":{"flags":{"type":"TypeInt","computed":true},"tag":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_dns_cname_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"record":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"target_resource_id":{"type":"TypeString","computed":true},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_dns_mx_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","optional":true},"record":{"type":"TypeSet","computed":true,"elem":{"schema":{"exchange":{"type":"TypeString","computed":true},"preference":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_dns_ns_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"records":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_dns_ptr_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"records":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_dns_soa_record":{"schema":{"email":{"type":"TypeString","computed":true},"expire_time":{"type":"TypeInt","computed":true},"fqdn":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","computed":true},"minimum_ttl":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","optional":true,"default":"@"},"refresh_time":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true},"retry_time":{"type":"TypeInt","computed":true},"serial_number":{"type":"TypeInt","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_dns_srv_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"record":{"type":"TypeSet","computed":true,"elem":{"schema":{"port":{"type":"TypeInt","computed":true},"priority":{"type":"TypeInt","computed":true},"target":{"type":"TypeString","computed":true},"weight":{"type":"TypeInt","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_dns_txt_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"record":{"type":"TypeSet","computed":true,"elem":{"schema":{"value":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_dns_zone":{"schema":{"max_number_of_record_sets":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true},"name_servers":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"number_of_record_sets":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","optional":true,"computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_elastic_cloud_elasticsearch":{"schema":{"elastic_cloud_deployment_id":{"type":"TypeString","computed":true},"elastic_cloud_email_address":{"type":"TypeString","computed":true},"elastic_cloud_sso_default_url":{"type":"TypeString","computed":true},"elastic_cloud_user_id":{"type":"TypeString","computed":true},"elasticsearch_service_url":{"type":"TypeString","computed":true},"kibana_service_url":{"type":"TypeString","computed":true},"kibana_sso_uri":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"logs":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"filtering_tag":{"type":"TypeList","computed":true,"elem":{"schema":{"action":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"send_activity_logs":{"type":"TypeBool","computed":true},"send_azuread_logs":{"type":"TypeBool","computed":true},"send_subscription_logs":{"type":"TypeBool","computed":true}}}},"monitoring_enabled":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_elastic_san":{"schema":{"base_size_in_tib":{"type":"TypeInt","computed":true},"extended_size_in_tib":{"type":"TypeInt","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"tier":{"type":"TypeString","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"total_iops":{"type":"TypeInt","computed":true},"total_mbps":{"type":"TypeInt","computed":true},"total_size_in_tib":{"type":"TypeInt","computed":true},"total_volume_size_in_gib":{"type":"TypeInt","computed":true},"volume_group_count":{"type":"TypeInt","computed":true},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_elastic_san_volume_group":{"schema":{"elastic_san_id":{"type":"TypeString","required":true},"encryption":{"type":"TypeList","computed":true,"elem":{"schema":{"current_versioned_key_expiration_timestamp":{"type":"TypeString","computed":true},"current_versioned_key_id":{"type":"TypeString","computed":true},"key_vault_key_id":{"type":"TypeString","computed":true},"last_key_rotation_timestamp":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true}}}},"encryption_type":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","required":true},"network_rule":{"type":"TypeList","computed":true,"elem":{"schema":{"action":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"protocol_type":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_elastic_san_volume_snapshot":{"schema":{"name":{"type":"TypeString","required":true},"source_id":{"type":"TypeString","computed":true},"source_volume_size_in_gib":{"type":"TypeInt","computed":true},"volume_group_id":{"type":"TypeString","required":true,"forceNew":true},"volume_name":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_eventgrid_domain":{"schema":{"endpoint":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"inbound_ip_rule":{"type":"TypeList","computed":true,"elem":{"schema":{"action":{"type":"TypeString","computed":true},"ip_mask":{"type":"TypeString","computed":true}}}},"input_mapping_default_values":{"type":"TypeList","computed":true,"elem":{"schema":{"data_version":{"type":"TypeString","computed":true},"event_type":{"type":"TypeString","computed":true},"subject":{"type":"TypeString","computed":true}}}},"input_mapping_fields":{"type":"TypeList","computed":true,"elem":{"schema":{"data_version":{"type":"TypeString","computed":true},"event_time":{"type":"TypeString","computed":true},"event_type":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"subject":{"type":"TypeString","computed":true},"topic":{"type":"TypeString","computed":true}}}},"input_schema":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"primary_access_key":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_access_key":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_eventgrid_domain_topic":{"schema":{"domain_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_eventgrid_system_topic":{"schema":{"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"metric_arm_resource_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"source_arm_resource_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"topic_type":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_eventgrid_topic":{"schema":{"endpoint":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"primary_access_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_access_key":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_eventhub":{"schema":{"name":{"type":"TypeString","required":true},"namespace_name":{"type":"TypeString","required":true},"partition_count":{"type":"TypeInt","computed":true},"partition_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_eventhub_authorization_rule":{"schema":{"eventhub_name":{"type":"TypeString","required":true},"listen":{"type":"TypeBool","optional":true,"default":false},"manage":{"type":"TypeBool","optional":true,"default":false},"name":{"type":"TypeString","required":true},"namespace_name":{"type":"TypeString","required":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_connection_string_alias":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_connection_string_alias":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"send":{"type":"TypeBool","optional":true,"default":false}},"timeouts":{"read":5}},"azurerm_eventhub_cluster":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_eventhub_consumer_group":{"schema":{"eventhub_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"namespace_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"user_metadata":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_eventhub_namespace":{"schema":{"auto_inflate_enabled":{"type":"TypeBool","computed":true},"capacity":{"type":"TypeInt","computed":true},"dedicated_cluster_id":{"type":"TypeString","computed":true},"default_primary_connection_string":{"type":"TypeString","computed":true},"default_primary_connection_string_alias":{"type":"TypeString","computed":true},"default_primary_key":{"type":"TypeString","computed":true},"default_secondary_connection_string":{"type":"TypeString","computed":true},"default_secondary_connection_string_alias":{"type":"TypeString","computed":true},"default_secondary_key":{"type":"TypeString","computed":true},"kafka_enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"maximum_throughput_units":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_eventhub_namespace_authorization_rule":{"schema":{"listen":{"type":"TypeBool","computed":true},"manage":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"namespace_name":{"type":"TypeString","required":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_connection_string_alias":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_connection_string_alias":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"send":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_eventhub_sas":{"schema":{"connection_string":{"type":"TypeString","required":true},"expiry":{"type":"TypeString","required":true},"sas":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_express_route_circuit":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"peerings":{"type":"TypeList","computed":true,"elem":{"schema":{"azure_asn":{"type":"TypeInt","computed":true},"peer_asn":{"type":"TypeInt","computed":true},"peering_type":{"type":"TypeString","computed":true},"primary_peer_address_prefix":{"type":"TypeString","computed":true},"secondary_peer_address_prefix":{"type":"TypeString","computed":true},"shared_key":{"type":"TypeString","computed":true},"vlan_id":{"type":"TypeInt","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"service_key":{"type":"TypeString","computed":true},"service_provider_properties":{"type":"TypeList","computed":true,"elem":{"schema":{"bandwidth_in_mbps":{"type":"TypeInt","computed":true},"peering_location":{"type":"TypeString","computed":true},"service_provider_name":{"type":"TypeString","computed":true}}}},"service_provider_provisioning_state":{"type":"TypeString","computed":true},"sku":{"type":"TypeList","computed":true,"elem":{"schema":{"family":{"type":"TypeString","computed":true},"tier":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_express_route_circuit_peering":{"schema":{"azure_asn":{"type":"TypeInt","computed":true},"express_route_circuit_name":{"type":"TypeString","required":true},"gateway_manager_etag":{"type":"TypeString","computed":true},"ipv4_enabled":{"type":"TypeBool","computed":true},"peer_asn":{"type":"TypeInt","computed":true},"peering_type":{"type":"TypeString","required":true},"primary_azure_port":{"type":"TypeString","computed":true},"primary_peer_address_prefix":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"route_filter_id":{"type":"TypeString","computed":true},"secondary_azure_port":{"type":"TypeString","computed":true},"secondary_peer_address_prefix":{"type":"TypeString","computed":true},"shared_key":{"type":"TypeString","computed":true},"vlan_id":{"type":"TypeInt","computed":true}},"timeouts":{"read":5}},"azurerm_extended_locations":{"schema":{"extended_locations":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_firewall":{"schema":{"dns_proxy_enabled":{"type":"TypeBool","optional":true,"computed":true},"dns_servers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"firewall_policy_id":{"type":"TypeString","computed":true},"ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"private_ip_address":{"type":"TypeString","computed":true},"public_ip_address_id":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"management_ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"private_ip_address":{"type":"TypeString","computed":true},"public_ip_address_id":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"sku_tier":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"threat_intel_mode":{"type":"TypeString","computed":true},"virtual_hub":{"type":"TypeList","computed":true,"elem":{"schema":{"private_ip_address":{"type":"TypeString","computed":true},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"public_ip_count":{"type":"TypeInt","computed":true},"virtual_hub_id":{"type":"TypeString","computed":true}}}},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_firewall_policy":{"schema":{"base_policy_id":{"type":"TypeString","computed":true},"child_policies":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"dns":{"type":"TypeList","computed":true,"elem":{"schema":{"network_rule_fqdn_enabled":{"type":"TypeBool","computed":true},"proxy_enabled":{"type":"TypeBool","computed":true},"servers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"firewalls":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"rule_collection_groups":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"threat_intelligence_allowlist":{"type":"TypeList","computed":true,"elem":{"schema":{"fqdns":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"threat_intelligence_mode":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_function_app":{"schema":{"app_service_plan_id":{"type":"TypeString","computed":true},"app_settings":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"client_cert_mode":{"type":"TypeString","computed":true},"connection_string":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"custom_domain_verification_id":{"type":"TypeString","computed":true},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"os_type":{"type":"TypeString","computed":true},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"site_config":{"type":"TypeList","computed":true,"elem":{"schema":{"always_on":{"type":"TypeBool","computed":true},"app_scale_limit":{"type":"TypeInt","computed":true},"auto_swap_slot_name":{"type":"TypeString","computed":true},"cors":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"support_credentials":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"dotnet_framework_version":{"type":"TypeString","computed":true},"elastic_instance_minimum":{"type":"TypeInt","computed":true},"ftps_state":{"type":"TypeString","computed":true},"health_check_path":{"type":"TypeString","computed":true},"http2_enabled":{"type":"TypeBool","computed":true},"ip_restriction":{"type":"TypeList","computed":true,"elem":{"schema":{"action":{"type":"TypeString","computed":true},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"x_fd_health_probe":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_for":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_host":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"ip_address":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"priority":{"type":"TypeInt","computed":true},"service_tag":{"type":"TypeString","computed":true},"virtual_network_subnet_id":{"type":"TypeString","computed":true}}}},"java_version":{"type":"TypeString","computed":true},"linux_fx_version":{"type":"TypeString","computed":true},"min_tls_version":{"type":"TypeString","computed":true},"pre_warmed_instance_count":{"type":"TypeInt","computed":true},"runtime_scale_monitoring_enabled":{"type":"TypeBool","computed":true},"scm_ip_restriction":{"type":"TypeList","computed":true,"elem":{"schema":{"action":{"type":"TypeString","computed":true},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"x_fd_health_probe":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_for":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_host":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}},"maxItems":1},"ip_address":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"priority":{"type":"TypeInt","computed":true},"service_tag":{"type":"TypeString","computed":true},"virtual_network_subnet_id":{"type":"TypeString","computed":true}}}},"scm_type":{"type":"TypeString","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","computed":true},"use_32_bit_worker_process":{"type":"TypeBool","computed":true},"vnet_route_all_enabled":{"type":"TypeBool","computed":true},"websockets_enabled":{"type":"TypeBool","computed":true}}}},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"source_control":{"type":"TypeList","computed":true,"elem":{"schema":{"branch":{"type":"TypeString","computed":true},"manual_integration":{"type":"TypeBool","computed":true},"repo_url":{"type":"TypeString","computed":true},"rollback_enabled":{"type":"TypeBool","computed":true},"use_mercurial":{"type":"TypeBool","computed":true}}}},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_function_app_host_keys":{"schema":{"blobs_extension_key":{"type":"TypeString","computed":true},"default_function_key":{"type":"TypeString","computed":true},"durabletask_extension_key":{"type":"TypeString","computed":true},"event_grid_extension_config_key":{"type":"TypeString","computed":true},"event_grid_extension_key":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"signalr_extension_key":{"type":"TypeString","computed":true},"webpubsub_extension_key":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_hdinsight_cluster":{"schema":{"cluster_id":{"type":"TypeString","computed":true},"cluster_version":{"type":"TypeString","computed":true},"component_versions":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"edge_ssh_endpoint":{"type":"TypeString","computed":true},"gateway":{"type":"TypeList","computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","computed":true},"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"https_endpoint":{"type":"TypeString","computed":true},"kafka_rest_proxy_endpoint":{"type":"TypeString","computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"ssh_endpoint":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tier":{"type":"TypeString","computed":true},"tls_min_version":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_healthcare_dicom_service":{"schema":{"authentication":{"type":"TypeList","computed":true,"elem":{"schema":{"audience":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"authority":{"type":"TypeString","computed":true}}}},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"private_endpoint":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"service_url":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_healthcare_fhir_service":{"schema":{"access_policy_object_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"authentication":{"type":"TypeList","computed":true,"elem":{"schema":{"audience":{"type":"TypeString","computed":true},"authority":{"type":"TypeString","computed":true},"smart_proxy_enabled":{"type":"TypeBool","computed":true}}}},"configuration_export_storage_account_name":{"type":"TypeString","computed":true},"container_registry_login_server_url":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"cors":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_headers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allowed_methods":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allowed_origins":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"credentials_allowed":{"type":"TypeBool","computed":true},"max_age_in_seconds":{"type":"TypeInt","computed":true}}}},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_healthcare_medtech_service":{"schema":{"device_mapping_json":{"type":"TypeString","computed":true},"eventhub_consumer_group_name":{"type":"TypeString","computed":true},"eventhub_name":{"type":"TypeString","computed":true},"eventhub_namespace_name":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","required":true},"workspace_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_healthcare_service":{"schema":{"access_policy_object_ids":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"authentication_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"audience":{"type":"TypeString","computed":true},"authority":{"type":"TypeString","computed":true},"smart_proxy_enabled":{"type":"TypeBool","computed":true}}}},"cors_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"allow_credentials":{"type":"TypeBool","computed":true},"allowed_headers":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"allowed_methods":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allowed_origins":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"max_age_in_seconds":{"type":"TypeInt","computed":true}}}},"cosmosdb_key_vault_key_versionless_id":{"type":"TypeString","computed":true},"cosmosdb_throughput":{"type":"TypeInt","computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_healthcare_workspace":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_image":{"schema":{"data_disk":{"type":"TypeList","computed":true,"elem":{"schema":{"blob_uri":{"type":"TypeString","computed":true},"caching":{"type":"TypeString","computed":true},"lun":{"type":"TypeInt","computed":true},"managed_disk_id":{"type":"TypeString","computed":true},"size_gb":{"type":"TypeInt","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","optional":true},"name_regex":{"type":"TypeString","optional":true},"os_disk":{"type":"TypeList","computed":true,"elem":{"schema":{"blob_uri":{"type":"TypeString","computed":true},"caching":{"type":"TypeString","computed":true},"managed_disk_id":{"type":"TypeString","computed":true},"os_state":{"type":"TypeString","computed":true},"os_type":{"type":"TypeString","computed":true},"size_gb":{"type":"TypeInt","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"sort_descending":{"type":"TypeBool","optional":true,"default":false},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"zone_resilient":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_images":{"schema":{"images":{"type":"TypeList","computed":true,"elem":{"schema":{"data_disk":{"type":"TypeList","computed":true,"elem":{"schema":{"blob_uri":{"type":"TypeString","computed":true},"caching":{"type":"TypeString","computed":true},"lun":{"type":"TypeInt","computed":true},"managed_disk_id":{"type":"TypeString","computed":true},"size_gb":{"type":"TypeInt","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"os_disk":{"type":"TypeList","computed":true,"elem":{"schema":{"blob_uri":{"type":"TypeString","computed":true},"caching":{"type":"TypeString","computed":true},"disk_encryption_set_id":{"type":"TypeString","computed":true},"managed_disk_id":{"type":"TypeString","computed":true},"os_state":{"type":"TypeString","computed":true},"os_type":{"type":"TypeString","computed":true},"size_gb":{"type":"TypeInt","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"zone_resilient":{"type":"TypeBool","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"tags_filter":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_iothub":{"schema":{"hostname":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_iothub_dps":{"schema":{"allocation_policy":{"type":"TypeString","computed":true},"device_provisioning_host_name":{"type":"TypeString","computed":true},"id_scope":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"service_operations_host_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_iothub_dps_shared_access_policy":{"schema":{"iothub_dps_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_iothub_shared_access_policy":{"schema":{"iothub_name":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_ip_group":{"schema":{"cidrs":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_ip_groups":{"schema":{"ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":10}},"azurerm_key_vault":{"schema":{"access_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"application_id":{"type":"TypeString","computed":true},"certificate_permissions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"key_permissions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"object_id":{"type":"TypeString","computed":true},"secret_permissions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"storage_permissions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","computed":true}}}},"enable_rbac_authorization":{"type":"TypeBool","computed":true},"enabled_for_deployment":{"type":"TypeBool","computed":true},"enabled_for_disk_encryption":{"type":"TypeBool","computed":true},"enabled_for_template_deployment":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"network_acls":{"type":"TypeList","computed":true,"elem":{"schema":{"bypass":{"type":"TypeString","computed":true},"default_action":{"type":"TypeString","computed":true},"ip_rules":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"virtual_network_subnet_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"public_network_access_enabled":{"type":"TypeBool","computed":true},"purge_protection_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","computed":true},"vault_uri":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_key_vault_access_policy":{"schema":{"certificate_permissions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"key_permissions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"secret_permissions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_key_vault_certificate":{"schema":{"certificate_data":{"type":"TypeString","computed":true},"certificate_data_base64":{"type":"TypeString","computed":true},"certificate_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"issuer_parameters":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true}}}},"key_properties":{"type":"TypeList","computed":true,"elem":{"schema":{"curve":{"type":"TypeString","computed":true},"exportable":{"type":"TypeBool","computed":true},"key_size":{"type":"TypeInt","computed":true},"key_type":{"type":"TypeString","computed":true},"reuse_key":{"type":"TypeBool","computed":true}}}},"lifetime_action":{"type":"TypeList","computed":true,"elem":{"schema":{"action":{"type":"TypeList","computed":true,"elem":{"schema":{"action_type":{"type":"TypeString","computed":true}}}},"trigger":{"type":"TypeList","computed":true,"elem":{"schema":{"days_before_expiry":{"type":"TypeInt","computed":true},"lifetime_percentage":{"type":"TypeInt","computed":true}}}}}}},"secret_properties":{"type":"TypeList","computed":true,"elem":{"schema":{"content_type":{"type":"TypeString","computed":true}}}},"x509_certificate_properties":{"type":"TypeList","computed":true,"elem":{"schema":{"extended_key_usage":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"key_usage":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"subject":{"type":"TypeString","computed":true},"subject_alternative_names":{"type":"TypeList","computed":true,"elem":{"schema":{"dns_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"emails":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"upns":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"validity_in_months":{"type":"TypeInt","computed":true}}}}}}},"expires":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"not_before":{"type":"TypeString","computed":true},"resource_manager_id":{"type":"TypeString","computed":true},"resource_manager_versionless_id":{"type":"TypeString","computed":true},"secret_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"thumbprint":{"type":"TypeString","computed":true},"version":{"type":"TypeString","optional":true,"computed":true},"versionless_id":{"type":"TypeString","computed":true},"versionless_secret_id":{"type":"TypeString","computed":true}},"timeouts":{"read":30}},"azurerm_key_vault_certificate_data":{"schema":{"certificates_count":{"type":"TypeInt","computed":true},"expires":{"type":"TypeString","computed":true},"hex":{"type":"TypeString","computed":true},"key":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"not_before":{"type":"TypeString","computed":true},"pem":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"version":{"type":"TypeString","optional":true,"computed":true}},"timeouts":{"read":5}},"azurerm_key_vault_certificate_issuer":{"schema":{"account_id":{"type":"TypeString","computed":true},"admin":{"type":"TypeList","computed":true,"elem":{"schema":{"email_address":{"type":"TypeString","computed":true},"first_name":{"type":"TypeString","computed":true},"last_name":{"type":"TypeString","computed":true},"phone":{"type":"TypeString","computed":true}}}},"key_vault_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"org_id":{"type":"TypeString","computed":true},"provider_name":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_key_vault_certificates":{"schema":{"certificates":{"type":"TypeList","computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}}}},"include_pending":{"type":"TypeBool","optional":true,"default":true},"key_vault_id":{"type":"TypeString","required":true},"names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_key_vault_encrypted_value":{"schema":{"algorithm":{"type":"TypeString","required":true},"decoded_plain_text_value":{"type":"TypeString","computed":true},"encrypted_data":{"type":"TypeString","optional":true},"key_vault_key_id":{"type":"TypeString","required":true},"plain_text_value":{"type":"TypeString","optional":true}},"timeouts":{"read":5}},"azurerm_key_vault_key":{"schema":{"curve":{"type":"TypeString","computed":true},"e":{"type":"TypeString","computed":true},"key_opts":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"key_size":{"type":"TypeInt","computed":true},"key_type":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","required":true},"n":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"public_key_openssh":{"type":"TypeString","computed":true},"public_key_pem":{"type":"TypeString","computed":true},"resource_id":{"type":"TypeString","computed":true},"resource_versionless_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"version":{"type":"TypeString","computed":true},"versionless_id":{"type":"TypeString","computed":true},"x":{"type":"TypeString","computed":true},"y":{"type":"TypeString","computed":true}},"timeouts":{"read":30}},"azurerm_key_vault_managed_hardware_security_module":{"schema":{"admin_object_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"hsm_uri":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"purge_protection_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"soft_delete_retention_days":{"type":"TypeInt","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_key_vault_managed_hardware_security_module_role_definition":{"schema":{"assignable_scopes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"description":{"type":"TypeString","computed":true},"managed_hsm_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"permission":{"type":"TypeList","computed":true,"elem":{"schema":{"actions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"data_actions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"not_actions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"not_data_actions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"resource_manager_id":{"type":"TypeString","computed":true},"role_name":{"type":"TypeString","computed":true},"role_type":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_key_vault_secret":{"schema":{"content_type":{"type":"TypeString","computed":true},"expiration_date":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"not_before_date":{"type":"TypeString","computed":true},"resource_id":{"type":"TypeString","computed":true},"resource_versionless_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"value":{"type":"TypeString","computed":true},"version":{"type":"TypeString","optional":true},"versionless_id":{"type":"TypeString","computed":true}},"timeouts":{"read":30}},"azurerm_key_vault_secrets":{"schema":{"key_vault_id":{"type":"TypeString","required":true},"names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"secrets":{"type":"TypeList","computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","computed":true},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}}}}},"timeouts":{"read":5}},"azurerm_kubernetes_cluster":{"schema":{"aci_connector_linux":{"type":"TypeList","computed":true,"elem":{"schema":{"subnet_name":{"type":"TypeString","computed":true}}}},"agent_pool_profile":{"type":"TypeList","computed":true,"elem":{"schema":{"auto_scaling_enabled":{"type":"TypeBool","computed":true},"count":{"type":"TypeInt","computed":true},"max_count":{"type":"TypeInt","computed":true},"max_pods":{"type":"TypeInt","computed":true},"min_count":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","computed":true},"node_labels":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"node_public_ip_enabled":{"type":"TypeBool","computed":true},"node_public_ip_prefix_id":{"type":"TypeString","computed":true},"node_taints":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"orchestrator_version":{"type":"TypeString","computed":true},"os_disk_size_gb":{"type":"TypeInt","computed":true},"os_type":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true},"upgrade_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"drain_timeout_in_minutes":{"type":"TypeInt","computed":true},"max_surge":{"type":"TypeString","computed":true},"node_soak_duration_in_minutes":{"type":"TypeInt","computed":true}}}},"vm_size":{"type":"TypeString","computed":true},"vnet_subnet_id":{"type":"TypeString","computed":true},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"api_server_authorized_ip_ranges":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"azure_active_directory_role_based_access_control":{"type":"TypeList","computed":true,"elem":{"schema":{"admin_group_object_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"azure_rbac_enabled":{"type":"TypeBool","computed":true},"tenant_id":{"type":"TypeString","computed":true}}}},"azure_policy_enabled":{"type":"TypeBool","computed":true},"current_kubernetes_version":{"type":"TypeString","computed":true},"disk_encryption_set_id":{"type":"TypeString","computed":true},"dns_prefix":{"type":"TypeString","computed":true},"fqdn":{"type":"TypeString","computed":true},"http_application_routing_enabled":{"type":"TypeBool","computed":true},"http_application_routing_zone_name":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"ingress_application_gateway":{"type":"TypeList","computed":true,"elem":{"schema":{"effective_gateway_id":{"type":"TypeString","computed":true},"gateway_id":{"type":"TypeString","computed":true},"gateway_name":{"type":"TypeString","computed":true},"ingress_application_gateway_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","computed":true},"object_id":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true}}}},"subnet_cidr":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"key_management_service":{"type":"TypeList","computed":true,"elem":{"schema":{"key_vault_key_id":{"type":"TypeString","computed":true},"key_vault_network_access":{"type":"TypeString","computed":true}}}},"key_vault_secrets_provider":{"type":"TypeList","computed":true,"elem":{"schema":{"secret_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","computed":true},"object_id":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true}}}},"secret_rotation_enabled":{"type":"TypeBool","computed":true},"secret_rotation_interval":{"type":"TypeString","computed":true}}}},"kube_admin_config":{"type":"TypeList","computed":true,"elem":{"schema":{"client_certificate":{"type":"TypeString","computed":true},"client_key":{"type":"TypeString","computed":true},"cluster_ca_certificate":{"type":"TypeString","computed":true},"host":{"type":"TypeString","computed":true},"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"kube_admin_config_raw":{"type":"TypeString","computed":true},"kube_config":{"type":"TypeList","computed":true,"elem":{"schema":{"client_certificate":{"type":"TypeString","computed":true},"client_key":{"type":"TypeString","computed":true},"cluster_ca_certificate":{"type":"TypeString","computed":true},"host":{"type":"TypeString","computed":true},"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"kube_config_raw":{"type":"TypeString","computed":true},"kubelet_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","computed":true},"object_id":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true}}}},"kubernetes_version":{"type":"TypeString","computed":true},"linux_profile":{"type":"TypeList","computed":true,"elem":{"schema":{"admin_username":{"type":"TypeString","computed":true},"ssh_key":{"type":"TypeList","computed":true,"elem":{"schema":{"key_data":{"type":"TypeString","computed":true}}}}}}},"location":{"type":"TypeString","computed":true},"microsoft_defender":{"type":"TypeList","computed":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","required":true},"network_profile":{"type":"TypeList","computed":true,"elem":{"schema":{"dns_service_ip":{"type":"TypeString","computed":true},"docker_bridge_cidr":{"type":"TypeString","computed":true},"load_balancer_sku":{"type":"TypeString","computed":true},"network_plugin":{"type":"TypeString","computed":true},"network_policy":{"type":"TypeString","computed":true},"pod_cidr":{"type":"TypeString","computed":true},"service_cidr":{"type":"TypeString","computed":true}}}},"node_resource_group":{"type":"TypeString","computed":true},"node_resource_group_id":{"type":"TypeString","computed":true},"oidc_issuer_enabled":{"type":"TypeBool","computed":true},"oidc_issuer_url":{"type":"TypeString","computed":true},"oms_agent":{"type":"TypeList","computed":true,"elem":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","computed":true},"msi_auth_for_monitoring_enabled":{"type":"TypeBool","computed":true},"oms_agent_identity":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","computed":true},"object_id":{"type":"TypeString","computed":true},"user_assigned_identity_id":{"type":"TypeString","computed":true}}}}}}},"open_service_mesh_enabled":{"type":"TypeBool","computed":true},"private_cluster_enabled":{"type":"TypeBool","computed":true},"private_fqdn":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"role_based_access_control_enabled":{"type":"TypeBool","computed":true},"service_mesh_profile":{"type":"TypeList","computed":true,"elem":{"schema":{"certificate_authority":{"type":"TypeList","computed":true,"elem":{"schema":{"cert_chain_object_name":{"type":"TypeString","computed":true},"cert_object_name":{"type":"TypeString","computed":true},"key_object_name":{"type":"TypeString","computed":true},"key_vault_id":{"type":"TypeString","computed":true},"root_cert_object_name":{"type":"TypeString","computed":true}}}},"external_ingress_gateway_enabled":{"type":"TypeBool","computed":true},"internal_ingress_gateway_enabled":{"type":"TypeBool","computed":true},"mode":{"type":"TypeString","computed":true},"revisions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"service_principal":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","computed":true}}}},"storage_profile":{"type":"TypeList","computed":true,"elem":{"schema":{"blob_driver_enabled":{"type":"TypeBool","computed":true},"disk_driver_enabled":{"type":"TypeBool","computed":true},"file_driver_enabled":{"type":"TypeBool","computed":true},"snapshot_controller_enabled":{"type":"TypeBool","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"windows_profile":{"type":"TypeList","computed":true,"elem":{"schema":{"admin_username":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_kubernetes_cluster_node_pool":{"schema":{"auto_scaling_enabled":{"type":"TypeBool","computed":true},"eviction_policy":{"type":"TypeString","computed":true},"kubernetes_cluster_name":{"type":"TypeString","required":true},"max_count":{"type":"TypeInt","computed":true},"max_pods":{"type":"TypeInt","computed":true},"min_count":{"type":"TypeInt","computed":true},"mode":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"node_count":{"type":"TypeInt","computed":true},"node_labels":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"node_public_ip_enabled":{"type":"TypeBool","computed":true},"node_public_ip_prefix_id":{"type":"TypeString","computed":true},"node_taints":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"orchestrator_version":{"type":"TypeString","computed":true},"os_disk_size_gb":{"type":"TypeInt","computed":true},"os_disk_type":{"type":"TypeString","computed":true},"os_type":{"type":"TypeString","computed":true},"priority":{"type":"TypeString","computed":true},"proximity_placement_group_id":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"spot_max_price":{"type":"TypeFloat","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"upgrade_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"drain_timeout_in_minutes":{"type":"TypeInt","computed":true},"max_surge":{"type":"TypeString","computed":true},"node_soak_duration_in_minutes":{"type":"TypeInt","computed":true}}}},"vm_size":{"type":"TypeString","computed":true},"vnet_subnet_id":{"type":"TypeString","computed":true},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_kubernetes_node_pool_snapshot":{"schema":{"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"source_node_pool_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_kubernetes_service_versions":{"schema":{"default_version":{"type":"TypeString","computed":true},"include_preview":{"type":"TypeBool","optional":true,"default":true},"latest_version":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true,"forceNew":true},"version_prefix":{"type":"TypeString","optional":true},"versions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_kusto_cluster":{"schema":{"data_ingestion_uri":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"uri":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_kusto_database":{"schema":{"cluster_name":{"type":"TypeString","required":true},"hot_cache_period":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"size":{"type":"TypeFloat","computed":true},"soft_delete_period":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_lb":{"schema":{"frontend_ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_address_allocation":{"type":"TypeString","computed":true},"private_ip_address_version":{"type":"TypeString","computed":true},"public_ip_address_id":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_lb_backend_address_pool":{"schema":{"backend_address":{"type":"TypeList","computed":true,"elem":{"schema":{"inbound_nat_rule_port_mapping":{"type":"TypeList","computed":true,"elem":{"schema":{"backend_port":{"type":"TypeInt","computed":true},"frontend_port":{"type":"TypeInt","computed":true},"inbound_nat_rule_name":{"type":"TypeString","computed":true}}}},"ip_address":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"virtual_network_id":{"type":"TypeString","computed":true}}}},"backend_ip_configurations":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true}}}},"inbound_nat_rules":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"load_balancing_rules":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"loadbalancer_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"outbound_rules":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_lb_outbound_rule":{"schema":{"allocated_outbound_ports":{"type":"TypeInt","computed":true},"backend_address_pool_id":{"type":"TypeString","computed":true},"frontend_ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"idle_timeout_in_minutes":{"type":"TypeInt","computed":true},"loadbalancer_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"protocol":{"type":"TypeString","computed":true},"tcp_reset_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_lb_rule":{"schema":{"backend_address_pool_id":{"type":"TypeString","computed":true},"backend_port":{"type":"TypeInt","computed":true},"disable_outbound_snat":{"type":"TypeBool","computed":true},"enable_floating_ip":{"type":"TypeBool","computed":true},"enable_tcp_reset":{"type":"TypeBool","computed":true},"frontend_ip_configuration_name":{"type":"TypeString","computed":true},"frontend_port":{"type":"TypeInt","computed":true},"idle_timeout_in_minutes":{"type":"TypeInt","computed":true},"load_distribution":{"type":"TypeString","computed":true},"loadbalancer_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"probe_id":{"type":"TypeString","computed":true},"protocol":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_linux_function_app":{"schema":{"app_settings":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"active_directory":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","description":"The list of Allowed audience values considered when validating JWTs issued by Azure Active Directory.","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The ID of the Client to use to authenticate with Azure Active Directory.","computed":true},"client_secret":{"type":"TypeString","description":"The Client Secret for the Client ID.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the client secret of the Client.","computed":true}}}},"additional_login_parameters":{"type":"TypeMap","description":"The map of Login Parameters sent to the OpenID Connect authorization endpoint when a user logs in.","computed":true,"elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","description":"Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","description":"The default authentication provider used when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`.","computed":true},"enabled":{"type":"TypeBool","description":"Is the Authentication / Authorization feature enabled?","computed":true},"facebook":{"type":"TypeList","computed":true,"elem":{"schema":{"app_id":{"type":"TypeString","description":"The App ID of the Facebook app used for login.","computed":true},"app_secret":{"type":"TypeString","description":"The App Secret of the Facebook app used for Facebook Login.","computed":true},"app_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `app_secret` value used for Facebook Login.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of Facebook Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"github":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The ID of the GitHub app used for login.","computed":true},"client_secret":{"type":"TypeString","description":"The Client Secret of the GitHub app used for GitHub Login.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for GitHub Login.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of GitHub Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"google":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The OpenID Connect Client ID for the Google web application.","computed":true},"client_secret":{"type":"TypeString","description":"The client secret associated with the Google web application.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for Google Login.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes that requested as part of Google Sign-In authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"issuer":{"type":"TypeString","description":"The OpenID Connect Issuer URI that represents the entity which issues access tokens.","computed":true},"microsoft":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The OAuth 2.0 client ID that was created for the app used for authentication.","computed":true},"client_secret":{"type":"TypeString","description":"The OAuth 2.0 client secret that was created for the app used for authentication.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of Microsoft Account authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"runtime_version":{"type":"TypeString","description":"The RuntimeVersion of the Authentication / Authorization feature in use.","computed":true},"token_refresh_extension_hours":{"type":"TypeFloat","description":"The number of hours after session token expiration that a session token can be used to call the token refresh API.","computed":true},"token_store_enabled":{"type":"TypeBool","description":"Are platform-specific security tokens that are obtained during login flows durably stored?","computed":true},"twitter":{"type":"TypeList","computed":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in.","computed":true},"consumer_secret":{"type":"TypeString","description":"The OAuth 1.0a consumer secret of the Twitter application used for sign-in.","computed":true},"consumer_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in.","computed":true}}}},"unauthenticated_client_action":{"type":"TypeString","description":"The action taken when an unauthenticated client attempts to access the app.","computed":true}}}},"auth_settings_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"active_directory_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_applications":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allowed_audiences":{"type":"TypeList","description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","computed":true,"elem":{"type":"TypeString"}},"allowed_groups":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allowed_identities":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The ID of the Client to use to authenticate with Azure Active Directory.","computed":true},"client_secret_certificate_thumbprint":{"type":"TypeString","description":"The thumbprint of the certificate used for signing purposes.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the client secret of the Client.","computed":true},"jwt_allowed_client_applications":{"type":"TypeList","description":"A list of Allowed Client Applications in the JWT Claim.","computed":true,"elem":{"type":"TypeString"}},"jwt_allowed_groups":{"type":"TypeList","description":"A list of Allowed Groups in the JWT Claim.","computed":true,"elem":{"type":"TypeString"}},"login_parameters":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tenant_auth_endpoint":{"type":"TypeString","description":"The Azure Tenant URI for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`","computed":true},"www_authentication_disabled":{"type":"TypeBool","description":"Is the www-authenticate provider omitted from the request?","computed":true}}}},"apple_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The OpenID Connect Client ID for the Apple web application.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for Apple Login.","computed":true},"login_scopes":{"type":"TypeList","description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of Apple Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","computed":true,"elem":{"type":"TypeString"}}}}},"auth_enabled":{"type":"TypeBool","description":"Is the AuthV2 Settings be enabled.","computed":true},"azure_static_web_app_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The ID of the Client used to authenticate with Azure Static Web App Authentication.","computed":true}}}},"config_file_path":{"type":"TypeString","description":"The path to the App Auth settings.","computed":true},"custom_oidc_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"authorisation_endpoint":{"type":"TypeString","description":"The endpoint to make the Authorisation Request.","computed":true},"certification_uri":{"type":"TypeString","description":"The endpoint that provides the keys necessary to validate the token.","computed":true},"client_credential_method":{"type":"TypeString","description":"The Client Credential Method used. Currently the only supported value is `ClientSecretPost`","computed":true},"client_id":{"type":"TypeString","description":"The ID of the Client used to authenticate with this Custom OIDC.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the secret for this Custom OIDC Client.","computed":true},"issuer_endpoint":{"type":"TypeString","description":"The endpoint that issued the Token.","computed":true},"name":{"type":"TypeString","description":"The name of the Custom OIDC Authentication Provider.","computed":true},"name_claim_type":{"type":"TypeString","description":"The name of the claim that contains the users name.","computed":true},"openid_configuration_endpoint":{"type":"TypeString","description":"The endpoint that contains all the configuration endpoints for this Custom OIDC provider.","computed":true},"scopes":{"type":"TypeList","description":"The list of the scopes that should be requested while authenticating.","computed":true,"elem":{"type":"TypeString"}},"token_endpoint":{"type":"TypeString","description":"The endpoint used to request a Token.","computed":true}}}},"default_provider":{"type":"TypeString","description":"The Default Authentication Provider used when the `unauthenticated_action` is set to `RedirectToLoginPage`.","computed":true},"excluded_paths":{"type":"TypeList","description":"The paths which are excluded from the `unauthenticated_action` when it is set to `RedirectToLoginPage`.","computed":true,"elem":{"type":"TypeString"}},"facebook_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"app_id":{"type":"TypeString","description":"The App ID of the Facebook app used for login.","computed":true},"app_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `app_secret` value used for Facebook Login.","computed":true},"graph_api_version":{"type":"TypeString","description":"The version of the Facebook API to be used while logging in.","computed":true},"login_scopes":{"type":"TypeList","description":"Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"forward_proxy_convention":{"type":"TypeString","description":"The convention used to determine the url of the request made.","computed":true},"forward_proxy_custom_host_header_name":{"type":"TypeString","description":"The name of the header containing the host of the request.","computed":true},"forward_proxy_custom_scheme_header_name":{"type":"TypeString","description":"The name of the header containing the scheme of the request.","computed":true},"github_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The ID of the GitHub app used for login.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for GitHub Login.","computed":true},"login_scopes":{"type":"TypeList","description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"google_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","description":"Specifies a list of Allowed Audiences that will be requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The OpenID Connect Client ID for the Google web application.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for Google Login.","computed":true},"login_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","computed":true,"elem":{"type":"TypeString"}}}}},"http_route_api_prefix":{"type":"TypeString","description":"The prefix that precedes all the authentication and authorisation paths.","computed":true},"login":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_external_redirect_urls":{"type":"TypeList","description":"External URLs that can be redirected to as part of logging in or logging out of the app. This is an advanced setting typically only needed by Windows Store application backends. **Note:** URLs within the current domain are always implicitly allowed.","computed":true,"elem":{"type":"TypeString"}},"cookie_expiration_convention":{"type":"TypeString","computed":true},"cookie_expiration_time":{"type":"TypeString","description":"The time after the request is made when the session cookie will expire.","computed":true},"logout_endpoint":{"type":"TypeString","description":"The endpoint to which logout requests are made.","computed":true},"nonce_expiration_time":{"type":"TypeString","description":"The time after the request is made when the nonce will expire.","computed":true},"preserve_url_fragments_for_logins":{"type":"TypeBool","description":"Are the fragments from the request be preserved after the login request is made.","computed":true},"token_refresh_extension_time":{"type":"TypeFloat","description":"The number of hours after session token expiration that a session token can be used to call the token refresh API.","computed":true},"token_store_enabled":{"type":"TypeBool","description":"Is the Token Store configuration Enabled.","computed":true},"token_store_path":{"type":"TypeString","description":"The directory path in the App Filesystem in which the tokens are stored.","computed":true},"token_store_sas_setting_name":{"type":"TypeString","description":"The name of the app setting which contains the SAS URL of the blob storage containing the tokens.","computed":true},"validate_nonce":{"type":"TypeBool","description":"Is the nonce be validated while completing the login flow.","computed":true}}}},"microsoft_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","description":"Specifies a list of Allowed Audiences that will be requested as part of Microsoft Sign-In authentication.","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The OAuth 2.0 client ID that was created for the app used for authentication.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication.","computed":true},"login_scopes":{"type":"TypeList","description":"The list of Login scopes that will be requested as part of Microsoft Account authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"require_authentication":{"type":"TypeBool","description":"Is the authentication flow used for all requests.","computed":true},"require_https":{"type":"TypeBool","description":"Is HTTPS required on connections?","computed":true},"runtime_version":{"type":"TypeString","description":"The Runtime Version of the Authentication and Authorisation feature of this App.","computed":true},"twitter_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in.","computed":true},"consumer_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in.","computed":true}}}},"unauthenticated_action":{"type":"TypeString","computed":true}}}},"availability":{"type":"TypeString","computed":true},"backup":{"type":"TypeList","computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","description":"Is this backup job enabled?","computed":true},"name":{"type":"TypeString","description":"The name of this Backup.","computed":true},"schedule":{"type":"TypeList","computed":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","description":"How often the backup should is executed in multiples of the `frequency_unit`.","computed":true},"frequency_unit":{"type":"TypeString","description":"The unit of time for how often the backup takes place.","computed":true},"keep_at_least_one_backup":{"type":"TypeBool","description":"Does the service keep at least one backup, regardless of age of backup.","computed":true},"last_execution_time":{"type":"TypeString","description":"The time the backup was last attempted.","computed":true},"retention_period_days":{"type":"TypeInt","description":"After how many days are backups deleted.","computed":true},"start_time":{"type":"TypeString","description":"When the schedule should start working in RFC-3339 format.","computed":true}}}},"storage_account_url":{"type":"TypeString","description":"The SAS URL to the container.","computed":true}}}},"builtin_logging_enabled":{"type":"TypeBool","computed":true},"client_certificate_enabled":{"type":"TypeBool","computed":true},"client_certificate_exclusion_paths":{"type":"TypeString","description":"Paths to exclude when using client certificates, separated by ;","computed":true},"client_certificate_mode":{"type":"TypeString","computed":true},"connection_string":{"type":"TypeSet","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The name of this Connection.","computed":true},"type":{"type":"TypeString","description":"The type of database.","computed":true},"value":{"type":"TypeString","description":"The connection string value.","computed":true}}}},"content_share_force_disabled":{"type":"TypeBool","computed":true},"custom_domain_verification_id":{"type":"TypeString","computed":true},"daily_memory_time_quota":{"type":"TypeInt","computed":true},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","computed":true},"ftp_publish_basic_authentication_enabled":{"type":"TypeBool","computed":true},"functions_extension_version":{"type":"TypeString","computed":true},"hosting_environment_id":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"service_plan_id":{"type":"TypeString","computed":true},"site_config":{"type":"TypeList","computed":true,"elem":{"schema":{"always_on":{"type":"TypeBool","computed":true},"api_definition_url":{"type":"TypeString","computed":true},"api_management_api_id":{"type":"TypeString","computed":true},"app_command_line":{"type":"TypeString","computed":true},"app_scale_limit":{"type":"TypeInt","computed":true},"app_service_logs":{"type":"TypeList","computed":true,"elem":{"schema":{"disk_quota_mb":{"type":"TypeInt","computed":true},"retention_period_days":{"type":"TypeInt","computed":true}}}},"application_insights_connection_string":{"type":"TypeString","computed":true},"application_insights_key":{"type":"TypeString","computed":true},"application_stack":{"type":"TypeList","computed":true,"elem":{"schema":{"docker":{"type":"TypeList","computed":true,"elem":{"schema":{"image_name":{"type":"TypeString","computed":true},"image_tag":{"type":"TypeString","computed":true},"registry_password":{"type":"TypeString","computed":true},"registry_url":{"type":"TypeString","computed":true},"registry_username":{"type":"TypeString","computed":true}}}},"dotnet_version":{"type":"TypeString","computed":true},"java_version":{"type":"TypeString","computed":true},"node_version":{"type":"TypeString","computed":true},"powershell_core_version":{"type":"TypeString","computed":true},"python_version":{"type":"TypeString","computed":true},"use_custom_runtime":{"type":"TypeBool","computed":true},"use_dotnet_isolated_runtime":{"type":"TypeBool","computed":true}}}},"container_registry_managed_identity_client_id":{"type":"TypeString","computed":true},"container_registry_use_managed_identity":{"type":"TypeBool","computed":true},"cors":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeList","description":"The list of origins that are allowed to make cross-origin calls.","computed":true,"elem":{"type":"TypeString"}},"support_credentials":{"type":"TypeBool","description":"Are credentials allowed in CORS requests?","computed":true}}}},"default_documents":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"detailed_error_logging_enabled":{"type":"TypeBool","computed":true},"elastic_instance_minimum":{"type":"TypeInt","computed":true},"ftps_state":{"type":"TypeString","computed":true},"health_check_eviction_time_in_min":{"type":"TypeInt","computed":true},"health_check_path":{"type":"TypeString","computed":true},"http2_enabled":{"type":"TypeBool","computed":true},"ip_restriction":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","description":"The action to take.","computed":true},"description":{"type":"TypeString","description":"The description of the ip restriction rule.","computed":true},"headers":{"type":"TypeList","computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","description":"The list of Azure Front Door IDs.","computed":true,"elem":{"type":"TypeString"}},"x_fd_health_probe":{"type":"TypeList","description":"Specifies if a Front Door Health Probe is expected.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_for":{"type":"TypeList","description":"The list of addresses for which matching is applied.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_host":{"type":"TypeList","description":"The list of Hosts for which matching will be applied.","computed":true,"elem":{"type":"TypeString"}}}}},"ip_address":{"type":"TypeString","description":"The CIDR notation of the IP or IP Range to match.","computed":true},"name":{"type":"TypeString","description":"The name used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","description":"The priority value of this `ip_restriction`.","computed":true},"service_tag":{"type":"TypeString","description":"The Service Tag used for this IP Restriction.","computed":true},"virtual_network_subnet_id":{"type":"TypeString","description":"The Virtual Network Subnet ID used for this IP Restriction.","computed":true}}}},"ip_restriction_default_action":{"type":"TypeString","computed":true},"linux_fx_version":{"type":"TypeString","computed":true},"load_balancing_mode":{"type":"TypeString","computed":true},"managed_pipeline_mode":{"type":"TypeString","computed":true},"minimum_tls_version":{"type":"TypeString","computed":true},"pre_warmed_instance_count":{"type":"TypeInt","computed":true},"remote_debugging_enabled":{"type":"TypeBool","computed":true},"remote_debugging_version":{"type":"TypeString","computed":true},"runtime_scale_monitoring_enabled":{"type":"TypeBool","computed":true},"scm_ip_restriction":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","description":"The action to take.","computed":true},"description":{"type":"TypeString","description":"The description of the ip restriction rule.","computed":true},"headers":{"type":"TypeList","computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","description":"The list of Azure Front Door IDs.","computed":true,"elem":{"type":"TypeString"}},"x_fd_health_probe":{"type":"TypeList","description":"Specifies if a Front Door Health Probe is expected.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_for":{"type":"TypeList","description":"The list of addresses for which matching is applied.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_host":{"type":"TypeList","description":"The list of Hosts for which matching will be applied.","computed":true,"elem":{"type":"TypeString"}}}}},"ip_address":{"type":"TypeString","description":"The CIDR notation of the IP or IP Range to match.","computed":true},"name":{"type":"TypeString","description":"The name used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","description":"The priority value of this `ip_restriction`.","computed":true},"service_tag":{"type":"TypeString","description":"The Service Tag used for this IP Restriction.","computed":true},"virtual_network_subnet_id":{"type":"TypeString","description":"The Virtual Network Subnet ID used for this IP Restriction.","computed":true}}}},"scm_ip_restriction_default_action":{"type":"TypeString","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"TypeString","computed":true},"scm_type":{"type":"TypeString","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","computed":true},"use_32_bit_worker":{"type":"TypeBool","computed":true},"vnet_route_all_enabled":{"type":"TypeBool","computed":true},"websockets_enabled":{"type":"TypeBool","computed":true},"worker_count":{"type":"TypeInt","computed":true}}}},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The Site Credentials Username used for publishing.","computed":true},"password":{"type":"TypeString","description":"The Site Credentials Password used for publishing.","computed":true}}}},"sticky_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"app_setting_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"connection_string_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"storage_account_access_key":{"type":"TypeString","computed":true},"storage_account_name":{"type":"TypeString","computed":true},"storage_key_vault_secret_id":{"type":"TypeString","description":"The Key Vault Secret ID, including version, that contains the Connection String used to connect to the storage account for this Function App.","computed":true},"storage_uses_managed_identity":{"type":"TypeBool","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"usage":{"type":"TypeString","computed":true},"virtual_network_subnet_id":{"type":"TypeString","computed":true},"webdeploy_publish_basic_authentication_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"read":25}},"azurerm_linux_web_app":{"schema":{"app_metadata":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"app_settings":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"active_directory":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","description":"The list of Allowed audience values considered when validating JWTs issued by Azure Active Directory.","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The ID of the Client to use to authenticate with Azure Active Directory.","computed":true},"client_secret":{"type":"TypeString","description":"The Client Secret for the Client ID.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the client secret of the Client.","computed":true}}}},"additional_login_parameters":{"type":"TypeMap","description":"The map of Login Parameters sent to the OpenID Connect authorization endpoint when a user logs in.","computed":true,"elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","description":"Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","description":"The default authentication provider used when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`.","computed":true},"enabled":{"type":"TypeBool","description":"Is the Authentication / Authorization feature enabled?","computed":true},"facebook":{"type":"TypeList","computed":true,"elem":{"schema":{"app_id":{"type":"TypeString","description":"The App ID of the Facebook app used for login.","computed":true},"app_secret":{"type":"TypeString","description":"The App Secret of the Facebook app used for Facebook Login.","computed":true},"app_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `app_secret` value used for Facebook Login.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of Facebook Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"github":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The ID of the GitHub app used for login.","computed":true},"client_secret":{"type":"TypeString","description":"The Client Secret of the GitHub app used for GitHub Login.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for GitHub Login.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of GitHub Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"google":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The OpenID Connect Client ID for the Google web application.","computed":true},"client_secret":{"type":"TypeString","description":"The client secret associated with the Google web application.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for Google Login.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes that requested as part of Google Sign-In authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"issuer":{"type":"TypeString","description":"The OpenID Connect Issuer URI that represents the entity which issues access tokens.","computed":true},"microsoft":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The OAuth 2.0 client ID that was created for the app used for authentication.","computed":true},"client_secret":{"type":"TypeString","description":"The OAuth 2.0 client secret that was created for the app used for authentication.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of Microsoft Account authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"runtime_version":{"type":"TypeString","description":"The RuntimeVersion of the Authentication / Authorization feature in use.","computed":true},"token_refresh_extension_hours":{"type":"TypeFloat","description":"The number of hours after session token expiration that a session token can be used to call the token refresh API.","computed":true},"token_store_enabled":{"type":"TypeBool","description":"Are platform-specific security tokens that are obtained during login flows durably stored?","computed":true},"twitter":{"type":"TypeList","computed":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in.","computed":true},"consumer_secret":{"type":"TypeString","description":"The OAuth 1.0a consumer secret of the Twitter application used for sign-in.","computed":true},"consumer_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in.","computed":true}}}},"unauthenticated_client_action":{"type":"TypeString","description":"The action taken when an unauthenticated client attempts to access the app.","computed":true}}}},"auth_settings_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"active_directory_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_applications":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allowed_audiences":{"type":"TypeList","description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","computed":true,"elem":{"type":"TypeString"}},"allowed_groups":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allowed_identities":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The ID of the Client to use to authenticate with Azure Active Directory.","computed":true},"client_secret_certificate_thumbprint":{"type":"TypeString","description":"The thumbprint of the certificate used for signing purposes.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the client secret of the Client.","computed":true},"jwt_allowed_client_applications":{"type":"TypeList","description":"A list of Allowed Client Applications in the JWT Claim.","computed":true,"elem":{"type":"TypeString"}},"jwt_allowed_groups":{"type":"TypeList","description":"A list of Allowed Groups in the JWT Claim.","computed":true,"elem":{"type":"TypeString"}},"login_parameters":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tenant_auth_endpoint":{"type":"TypeString","description":"The Azure Tenant URI for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`","computed":true},"www_authentication_disabled":{"type":"TypeBool","description":"Is the www-authenticate provider omitted from the request?","computed":true}}}},"apple_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The OpenID Connect Client ID for the Apple web application.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for Apple Login.","computed":true},"login_scopes":{"type":"TypeList","description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of Apple Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","computed":true,"elem":{"type":"TypeString"}}}}},"auth_enabled":{"type":"TypeBool","description":"Is the AuthV2 Settings be enabled.","computed":true},"azure_static_web_app_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The ID of the Client used to authenticate with Azure Static Web App Authentication.","computed":true}}}},"config_file_path":{"type":"TypeString","description":"The path to the App Auth settings.","computed":true},"custom_oidc_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"authorisation_endpoint":{"type":"TypeString","description":"The endpoint to make the Authorisation Request.","computed":true},"certification_uri":{"type":"TypeString","description":"The endpoint that provides the keys necessary to validate the token.","computed":true},"client_credential_method":{"type":"TypeString","description":"The Client Credential Method used. Currently the only supported value is `ClientSecretPost`","computed":true},"client_id":{"type":"TypeString","description":"The ID of the Client used to authenticate with this Custom OIDC.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the secret for this Custom OIDC Client.","computed":true},"issuer_endpoint":{"type":"TypeString","description":"The endpoint that issued the Token.","computed":true},"name":{"type":"TypeString","description":"The name of the Custom OIDC Authentication Provider.","computed":true},"name_claim_type":{"type":"TypeString","description":"The name of the claim that contains the users name.","computed":true},"openid_configuration_endpoint":{"type":"TypeString","description":"The endpoint that contains all the configuration endpoints for this Custom OIDC provider.","computed":true},"scopes":{"type":"TypeList","description":"The list of the scopes that should be requested while authenticating.","computed":true,"elem":{"type":"TypeString"}},"token_endpoint":{"type":"TypeString","description":"The endpoint used to request a Token.","computed":true}}}},"default_provider":{"type":"TypeString","description":"The Default Authentication Provider used when the `unauthenticated_action` is set to `RedirectToLoginPage`.","computed":true},"excluded_paths":{"type":"TypeList","description":"The paths which are excluded from the `unauthenticated_action` when it is set to `RedirectToLoginPage`.","computed":true,"elem":{"type":"TypeString"}},"facebook_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"app_id":{"type":"TypeString","description":"The App ID of the Facebook app used for login.","computed":true},"app_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `app_secret` value used for Facebook Login.","computed":true},"graph_api_version":{"type":"TypeString","description":"The version of the Facebook API to be used while logging in.","computed":true},"login_scopes":{"type":"TypeList","description":"Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"forward_proxy_convention":{"type":"TypeString","description":"The convention used to determine the url of the request made.","computed":true},"forward_proxy_custom_host_header_name":{"type":"TypeString","description":"The name of the header containing the host of the request.","computed":true},"forward_proxy_custom_scheme_header_name":{"type":"TypeString","description":"The name of the header containing the scheme of the request.","computed":true},"github_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The ID of the GitHub app used for login.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for GitHub Login.","computed":true},"login_scopes":{"type":"TypeList","description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"google_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","description":"Specifies a list of Allowed Audiences that will be requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The OpenID Connect Client ID for the Google web application.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for Google Login.","computed":true},"login_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","computed":true,"elem":{"type":"TypeString"}}}}},"http_route_api_prefix":{"type":"TypeString","description":"The prefix that precedes all the authentication and authorisation paths.","computed":true},"login":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_external_redirect_urls":{"type":"TypeList","description":"External URLs that can be redirected to as part of logging in or logging out of the app. This is an advanced setting typically only needed by Windows Store application backends. **Note:** URLs within the current domain are always implicitly allowed.","computed":true,"elem":{"type":"TypeString"}},"cookie_expiration_convention":{"type":"TypeString","computed":true},"cookie_expiration_time":{"type":"TypeString","description":"The time after the request is made when the session cookie will expire.","computed":true},"logout_endpoint":{"type":"TypeString","description":"The endpoint to which logout requests are made.","computed":true},"nonce_expiration_time":{"type":"TypeString","description":"The time after the request is made when the nonce will expire.","computed":true},"preserve_url_fragments_for_logins":{"type":"TypeBool","description":"Are the fragments from the request be preserved after the login request is made.","computed":true},"token_refresh_extension_time":{"type":"TypeFloat","description":"The number of hours after session token expiration that a session token can be used to call the token refresh API.","computed":true},"token_store_enabled":{"type":"TypeBool","description":"Is the Token Store configuration Enabled.","computed":true},"token_store_path":{"type":"TypeString","description":"The directory path in the App Filesystem in which the tokens are stored.","computed":true},"token_store_sas_setting_name":{"type":"TypeString","description":"The name of the app setting which contains the SAS URL of the blob storage containing the tokens.","computed":true},"validate_nonce":{"type":"TypeBool","description":"Is the nonce be validated while completing the login flow.","computed":true}}}},"microsoft_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","description":"Specifies a list of Allowed Audiences that will be requested as part of Microsoft Sign-In authentication.","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The OAuth 2.0 client ID that was created for the app used for authentication.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication.","computed":true},"login_scopes":{"type":"TypeList","description":"The list of Login scopes that will be requested as part of Microsoft Account authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"require_authentication":{"type":"TypeBool","description":"Is the authentication flow used for all requests.","computed":true},"require_https":{"type":"TypeBool","description":"Is HTTPS required on connections?","computed":true},"runtime_version":{"type":"TypeString","description":"The Runtime Version of the Authentication and Authorisation feature of this App.","computed":true},"twitter_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in.","computed":true},"consumer_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in.","computed":true}}}},"unauthenticated_action":{"type":"TypeString","computed":true}}}},"availability":{"type":"TypeString","computed":true},"backup":{"type":"TypeList","computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","description":"Is this backup job enabled?","computed":true},"name":{"type":"TypeString","description":"The name of this Backup.","computed":true},"schedule":{"type":"TypeList","computed":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","description":"How often the backup should is executed in multiples of the `frequency_unit`.","computed":true},"frequency_unit":{"type":"TypeString","description":"The unit of time for how often the backup takes place.","computed":true},"keep_at_least_one_backup":{"type":"TypeBool","description":"Does the service keep at least one backup, regardless of age of backup.","computed":true},"last_execution_time":{"type":"TypeString","description":"The time the backup was last attempted.","computed":true},"retention_period_days":{"type":"TypeInt","description":"After how many days are backups deleted.","computed":true},"start_time":{"type":"TypeString","description":"When the schedule should start working in RFC-3339 format.","computed":true}}}},"storage_account_url":{"type":"TypeString","description":"The SAS URL to the container.","computed":true}}}},"client_affinity_enabled":{"type":"TypeBool","computed":true},"client_certificate_enabled":{"type":"TypeBool","computed":true},"client_certificate_exclusion_paths":{"type":"TypeString","description":"Paths to exclude when using client certificates, separated by ;","computed":true},"client_certificate_mode":{"type":"TypeString","computed":true},"connection_string":{"type":"TypeSet","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The name of this Connection.","computed":true},"type":{"type":"TypeString","description":"The type of database.","computed":true},"value":{"type":"TypeString","description":"The connection string value.","computed":true}}}},"custom_domain_verification_id":{"type":"TypeString","computed":true},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","computed":true},"ftp_publish_basic_authentication_enabled":{"type":"TypeBool","computed":true},"hosting_environment_id":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"key_vault_reference_identity_id":{"type":"TypeString","computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"logs":{"type":"TypeList","computed":true,"elem":{"schema":{"application_logs":{"type":"TypeList","computed":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","computed":true,"elem":{"schema":{"level":{"type":"TypeString","computed":true},"retention_in_days":{"type":"TypeInt","computed":true},"sas_url":{"type":"TypeString","computed":true}}}},"file_system_level":{"type":"TypeString","computed":true}}}},"detailed_error_messages":{"type":"TypeBool","computed":true},"failed_request_tracing":{"type":"TypeBool","computed":true},"http_logs":{"type":"TypeList","computed":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","computed":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","computed":true},"sas_url":{"type":"TypeString","computed":true}}}},"file_system":{"type":"TypeList","computed":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","computed":true},"retention_in_mb":{"type":"TypeInt","computed":true}}}}}}}}}},"name":{"type":"TypeString","required":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"service_plan_id":{"type":"TypeString","computed":true},"site_config":{"type":"TypeList","computed":true,"elem":{"schema":{"always_on":{"type":"TypeBool","computed":true},"api_definition_url":{"type":"TypeString","computed":true},"api_management_api_id":{"type":"TypeString","computed":true},"app_command_line":{"type":"TypeString","computed":true},"application_stack":{"type":"TypeList","computed":true,"elem":{"schema":{"docker_image_name":{"type":"TypeString","computed":true},"docker_registry_password":{"type":"TypeString","computed":true},"docker_registry_url":{"type":"TypeString","computed":true},"docker_registry_username":{"type":"TypeString","computed":true},"dotnet_version":{"type":"TypeString","computed":true},"go_version":{"type":"TypeString","computed":true},"java_server":{"type":"TypeString","computed":true},"java_server_version":{"type":"TypeString","computed":true},"java_version":{"type":"TypeString","computed":true},"node_version":{"type":"TypeString","computed":true},"php_version":{"type":"TypeString","computed":true},"python_version":{"type":"TypeString","computed":true},"ruby_version":{"type":"TypeString","computed":true}}}},"auto_heal_setting":{"type":"TypeList","computed":true,"elem":{"schema":{"action":{"type":"TypeList","computed":true,"elem":{"schema":{"action_type":{"type":"TypeString","computed":true},"minimum_process_execution_time":{"type":"TypeString","computed":true}}}},"trigger":{"type":"TypeList","computed":true,"elem":{"schema":{"requests":{"type":"TypeList","computed":true,"elem":{"schema":{"count":{"type":"TypeInt","computed":true},"interval":{"type":"TypeString","computed":true}}}},"slow_request":{"type":"TypeList","optional":true,"elem":{"schema":{"count":{"type":"TypeInt","computed":true},"interval":{"type":"TypeString","computed":true},"time_taken":{"type":"TypeString","computed":true}}}},"slow_request_with_path":{"type":"TypeList","computed":true,"elem":{"schema":{"count":{"type":"TypeInt","computed":true},"interval":{"type":"TypeString","computed":true},"path":{"type":"TypeString","computed":true},"time_taken":{"type":"TypeString","computed":true}}}},"status_code":{"type":"TypeSet","computed":true,"elem":{"schema":{"count":{"type":"TypeInt","computed":true},"interval":{"type":"TypeString","computed":true},"path":{"type":"TypeString","computed":true},"status_code_range":{"type":"TypeString","computed":true},"sub_status":{"type":"TypeInt","computed":true},"win32_status_code":{"type":"TypeInt","computed":true}}}}}}}}}},"container_registry_managed_identity_client_id":{"type":"TypeString","computed":true},"container_registry_use_managed_identity":{"type":"TypeBool","computed":true},"cors":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeList","description":"The list of origins that are allowed to make cross-origin calls.","computed":true,"elem":{"type":"TypeString"}},"support_credentials":{"type":"TypeBool","description":"Are credentials allowed in CORS requests?","computed":true}}}},"default_documents":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"detailed_error_logging_enabled":{"type":"TypeBool","computed":true},"ftps_state":{"type":"TypeString","computed":true},"health_check_eviction_time_in_min":{"type":"TypeInt","computed":true},"health_check_path":{"type":"TypeString","computed":true},"http2_enabled":{"type":"TypeBool","computed":true},"ip_restriction":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","description":"The action to take.","computed":true},"description":{"type":"TypeString","description":"The description of the ip restriction rule.","computed":true},"headers":{"type":"TypeList","computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","description":"The list of Azure Front Door IDs.","computed":true,"elem":{"type":"TypeString"}},"x_fd_health_probe":{"type":"TypeList","description":"Specifies if a Front Door Health Probe is expected.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_for":{"type":"TypeList","description":"The list of addresses for which matching is applied.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_host":{"type":"TypeList","description":"The list of Hosts for which matching will be applied.","computed":true,"elem":{"type":"TypeString"}}}}},"ip_address":{"type":"TypeString","description":"The CIDR notation of the IP or IP Range to match.","computed":true},"name":{"type":"TypeString","description":"The name used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","description":"The priority value of this `ip_restriction`.","computed":true},"service_tag":{"type":"TypeString","description":"The Service Tag used for this IP Restriction.","computed":true},"virtual_network_subnet_id":{"type":"TypeString","description":"The Virtual Network Subnet ID used for this IP Restriction.","computed":true}}}},"ip_restriction_default_action":{"type":"TypeString","computed":true},"linux_fx_version":{"type":"TypeString","computed":true},"load_balancing_mode":{"type":"TypeString","computed":true},"local_mysql_enabled":{"type":"TypeBool","computed":true},"managed_pipeline_mode":{"type":"TypeString","computed":true},"minimum_tls_version":{"type":"TypeString","computed":true},"remote_debugging_enabled":{"type":"TypeBool","computed":true},"remote_debugging_version":{"type":"TypeString","computed":true},"scm_ip_restriction":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","description":"The action to take.","computed":true},"description":{"type":"TypeString","description":"The description of the ip restriction rule.","computed":true},"headers":{"type":"TypeList","computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","description":"The list of Azure Front Door IDs.","computed":true,"elem":{"type":"TypeString"}},"x_fd_health_probe":{"type":"TypeList","description":"Specifies if a Front Door Health Probe is expected.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_for":{"type":"TypeList","description":"The list of addresses for which matching is applied.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_host":{"type":"TypeList","description":"The list of Hosts for which matching will be applied.","computed":true,"elem":{"type":"TypeString"}}}}},"ip_address":{"type":"TypeString","description":"The CIDR notation of the IP or IP Range to match.","computed":true},"name":{"type":"TypeString","description":"The name used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","description":"The priority value of this `ip_restriction`.","computed":true},"service_tag":{"type":"TypeString","description":"The Service Tag used for this IP Restriction.","computed":true},"virtual_network_subnet_id":{"type":"TypeString","description":"The Virtual Network Subnet ID used for this IP Restriction.","computed":true}}}},"scm_ip_restriction_default_action":{"type":"TypeString","computed":true},"scm_minimum_tls_version":{"type":"TypeString","computed":true},"scm_type":{"type":"TypeString","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","computed":true},"use_32_bit_worker":{"type":"TypeBool","computed":true},"vnet_route_all_enabled":{"type":"TypeBool","computed":true},"websockets_enabled":{"type":"TypeBool","computed":true},"worker_count":{"type":"TypeInt","computed":true}}}},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The Site Credentials Username used for publishing.","computed":true},"password":{"type":"TypeString","description":"The Site Credentials Password used for publishing.","computed":true}}}},"sticky_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"app_setting_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"connection_string_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"storage_account":{"type":"TypeList","computed":true,"elem":{"schema":{"access_key":{"type":"TypeString","computed":true},"account_name":{"type":"TypeString","computed":true},"mount_path":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"share_name":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"usage":{"type":"TypeString","computed":true},"virtual_network_subnet_id":{"type":"TypeString","computed":true},"webdeploy_publish_basic_authentication_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_load_test":{"schema":{"data_plane_uri":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"encryption":{"type":"TypeList","computed":true,"elem":{"schema":{"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"key_url":{"type":"TypeString","computed":true}}}},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_local_network_gateway":{"schema":{"address_space":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"bgp_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"asn":{"type":"TypeInt","required":true},"bgp_peering_address":{"type":"TypeString","required":true},"peer_weight":{"type":"TypeInt","computed":true}}}},"gateway_address":{"type":"TypeString","computed":true},"gateway_fqdn":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_location":{"schema":{"display_name":{"type":"TypeString","computed":true},"location":{"type":"TypeString","required":true},"zone_mappings":{"type":"TypeList","computed":true,"elem":{"schema":{"logical_zone":{"type":"TypeString","computed":true},"physical_zone":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_log_analytics_workspace":{"schema":{"daily_quota_gb":{"type":"TypeFloat","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"primary_shared_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"retention_in_days":{"type":"TypeInt","computed":true},"secondary_shared_key":{"type":"TypeString","computed":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"workspace_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_logic_app_integration_account":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_logic_app_standard":{"schema":{"app_service_plan_id":{"type":"TypeString","computed":true},"app_settings":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"bundle_version":{"type":"TypeString","computed":true},"client_affinity_enabled":{"type":"TypeBool","computed":true},"client_certificate_mode":{"type":"TypeString","computed":true},"connection_string":{"type":"TypeSet","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"custom_domain_verification_id":{"type":"TypeString","computed":true},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","computed":true},"https_only":{"type":"TypeBool","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"site_config":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"always_on":{"type":"TypeBool","optional":true,"default":false},"app_scale_limit":{"type":"TypeInt","optional":true,"computed":true},"auto_swap_slot_name":{"type":"TypeString","computed":true},"cors":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeSet","required":true,"elem":{"type":"TypeString"}},"support_credentials":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"dotnet_framework_version":{"type":"TypeString","optional":true,"default":"v4.0"},"elastic_instance_minimum":{"type":"TypeInt","optional":true,"computed":true},"ftps_state":{"type":"TypeString","optional":true,"computed":true},"health_check_path":{"type":"TypeString","optional":true},"http2_enabled":{"type":"TypeBool","optional":true,"default":false},"ip_restriction":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000},"service_tag":{"type":"TypeString","optional":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true}}}},"linux_fx_version":{"type":"TypeString","optional":true,"computed":true},"min_tls_version":{"type":"TypeString","optional":true,"computed":true},"pre_warmed_instance_count":{"type":"TypeInt","optional":true,"computed":true},"public_network_access_enabled":{"type":"TypeBool","optional":true,"default":true},"runtime_scale_monitoring_enabled":{"type":"TypeBool","optional":true,"default":false},"scm_ip_restriction":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","optional":true,"default":"Allow"},"headers":{"type":"TypeList","configMode":"Auto","optional":true,"computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_fd_health_probe":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":1},"x_forwarded_for":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8},"x_forwarded_host":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"},"maxItems":8}}},"maxItems":1},"ip_address":{"type":"TypeString","optional":true},"name":{"type":"TypeString","optional":true,"computed":true},"priority":{"type":"TypeInt","optional":true,"default":65000},"service_tag":{"type":"TypeString","optional":true},"virtual_network_subnet_id":{"type":"TypeString","optional":true}}}},"scm_min_tls_version":{"type":"TypeString","optional":true,"computed":true},"scm_type":{"type":"TypeString","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"TypeBool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"TypeBool","optional":true,"computed":true},"websockets_enabled":{"type":"TypeBool","optional":true,"default":false}}},"maxItems":1},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"storage_account_access_key":{"type":"TypeString","computed":true},"storage_account_name":{"type":"TypeString","computed":true},"storage_account_share_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"use_extension_bundle":{"type":"TypeBool","computed":true},"version":{"type":"TypeString","computed":true},"virtual_network_subnet_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_logic_app_workflow":{"schema":{"access_endpoint":{"type":"TypeString","computed":true},"connector_endpoint_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"connector_outbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"logic_app_integration_account_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"parameters":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"workflow_endpoint_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"workflow_outbound_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"workflow_schema":{"type":"TypeString","computed":true},"workflow_version":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_machine_learning_workspace":{"schema":{"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_maintenance_configuration":{"schema":{"in_guest_user_patch_mode":{"type":"TypeString","computed":true},"install_patches":{"type":"TypeList","computed":true,"elem":{"schema":{"linux":{"type":"TypeList","computed":true,"elem":{"schema":{"classifications_to_include":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"package_names_mask_to_exclude":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"package_names_mask_to_include":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"reboot":{"type":"TypeString","computed":true},"windows":{"type":"TypeList","computed":true,"elem":{"schema":{"classifications_to_include":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"kb_numbers_to_exclude":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"kb_numbers_to_include":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"properties":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"scope":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"visibility":{"type":"TypeString","computed":true},"window":{"type":"TypeList","computed":true,"elem":{"schema":{"duration":{"type":"TypeString","computed":true},"expiration_date_time":{"type":"TypeString","computed":true},"recur_every":{"type":"TypeString","computed":true},"start_date_time":{"type":"TypeString","computed":true},"time_zone":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_managed_api":{"schema":{"location":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_managed_application_definition":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_managed_disk":{"schema":{"create_option":{"type":"TypeString","computed":true},"disk_access_id":{"type":"TypeString","computed":true},"disk_encryption_set_id":{"type":"TypeString","computed":true},"disk_iops_read_write":{"type":"TypeInt","computed":true},"disk_mbps_read_write":{"type":"TypeInt","computed":true},"disk_size_gb":{"type":"TypeInt","computed":true},"encryption_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"disk_encryption_key":{"type":"TypeList","computed":true,"elem":{"schema":{"secret_url":{"type":"TypeString","computed":true},"source_vault_id":{"type":"TypeString","computed":true}}}},"enabled":{"type":"TypeBool","computed":true},"key_encryption_key":{"type":"TypeList","computed":true,"elem":{"schema":{"key_url":{"type":"TypeString","computed":true},"source_vault_id":{"type":"TypeString","computed":true}}}}}}},"image_reference_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"network_access_policy":{"type":"TypeString","computed":true},"os_type":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"source_resource_id":{"type":"TypeString","computed":true},"source_uri":{"type":"TypeString","computed":true},"storage_account_id":{"type":"TypeString","computed":true},"storage_account_type":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_management_group":{"schema":{"all_management_group_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"all_subscription_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"display_name":{"type":"TypeString","optional":true,"computed":true},"management_group_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","optional":true,"computed":true},"parent_management_group_id":{"type":"TypeString","computed":true},"subscription_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"tenant_scoped_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_management_group_template_deployment":{"schema":{"management_group_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"output_content":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_maps_account":{"schema":{"name":{"type":"TypeString","required":true},"primary_access_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_access_key":{"type":"TypeString","computed":true},"sku_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"x_ms_client_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_marketplace_agreement":{"schema":{"license_text_link":{"type":"TypeString","computed":true},"offer":{"type":"TypeString","required":true},"plan":{"type":"TypeString","required":true},"privacy_policy_link":{"type":"TypeString","computed":true},"publisher":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_mobile_network":{"schema":{"location":{"type":"TypeString","computed":true},"mobile_country_code":{"type":"TypeString","computed":true},"mobile_network_code":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"service_key":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_mobile_network_attached_data_network":{"schema":{"dns_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","computed":true},"mobile_network_data_network_name":{"type":"TypeString","required":true},"mobile_network_packet_core_data_plane_id":{"type":"TypeString","required":true},"network_address_port_translation":{"type":"TypeList","computed":true,"elem":{"schema":{"icmp_pinhole_timeout_in_seconds":{"type":"TypeInt","computed":true},"pinhole_maximum_number":{"type":"TypeInt","optional":true},"port_range":{"type":"TypeList","computed":true,"elem":{"schema":{"maximum":{"type":"TypeInt","computed":true},"minimum":{"type":"TypeInt","computed":true}}}},"tcp_pinhole_timeout_in_seconds":{"type":"TypeInt","computed":true},"tcp_port_reuse_minimum_hold_time_in_seconds":{"type":"TypeInt","computed":true},"udp_pinhole_timeout_in_seconds":{"type":"TypeInt","computed":true},"udp_port_reuse_minimum_hold_time_in_seconds":{"type":"TypeInt","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"user_equipment_address_pool_prefixes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"user_equipment_static_address_pool_prefixes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"user_plane_access_ipv4_address":{"type":"TypeString","computed":true},"user_plane_access_ipv4_gateway":{"type":"TypeString","computed":true},"user_plane_access_ipv4_subnet":{"type":"TypeString","computed":true},"user_plane_access_name":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_mobile_network_data_network":{"schema":{"description":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"mobile_network_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_mobile_network_packet_core_control_plane":{"schema":{"control_plane_access_ipv4_address":{"type":"TypeString","computed":true},"control_plane_access_ipv4_gateway":{"type":"TypeString","computed":true},"control_plane_access_ipv4_subnet":{"type":"TypeString","computed":true},"control_plane_access_name":{"type":"TypeString","computed":true},"core_network_technology":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true}}}},"interoperability_settings_json":{"type":"TypeString","computed":true},"local_diagnostics_access":{"type":"TypeList","computed":true,"elem":{"schema":{"authentication_type":{"type":"TypeString","computed":true},"https_server_certificate_url":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"platform":{"type":"TypeList","computed":true,"elem":{"schema":{"arc_kubernetes_cluster_id":{"type":"TypeString","computed":true},"custom_location_id":{"type":"TypeString","computed":true},"edge_device_id":{"type":"TypeString","computed":true},"stack_hci_cluster_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"site_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"sku":{"type":"TypeString","computed":true},"software_version":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"user_equipment_mtu_in_bytes":{"type":"TypeInt","computed":true}},"timeouts":{"read":5}},"azurerm_mobile_network_packet_core_data_plane":{"schema":{"location":{"type":"TypeString","computed":true},"mobile_network_packet_core_control_plane_id":{"type":"TypeString","required":true,"forceNew":true},"name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"user_plane_access_ipv4_address":{"type":"TypeString","computed":true},"user_plane_access_ipv4_gateway":{"type":"TypeString","computed":true},"user_plane_access_ipv4_subnet":{"type":"TypeString","computed":true},"user_plane_access_name":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_mobile_network_service":{"schema":{"location":{"type":"TypeString","computed":true},"mobile_network_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"pcc_rule":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"precedence":{"type":"TypeInt","computed":true},"qos_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"allocation_and_retention_priority_level":{"type":"TypeInt","computed":true},"guaranteed_bit_rate":{"type":"TypeList","computed":true,"elem":{"schema":{"downlink":{"type":"TypeString","computed":true},"uplink":{"type":"TypeString","computed":true}}}},"maximum_bit_rate":{"type":"TypeList","computed":true,"elem":{"schema":{"downlink":{"type":"TypeString","computed":true},"uplink":{"type":"TypeString","computed":true}}}},"preemption_capability":{"type":"TypeString","computed":true},"preemption_vulnerability":{"type":"TypeString","computed":true},"qos_indicator":{"type":"TypeInt","computed":true}}}},"service_data_flow_template":{"type":"TypeList","computed":true,"elem":{"schema":{"direction":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"ports":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"protocol":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"remote_ip_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"traffic_control_enabled":{"type":"TypeBool","computed":true}}}},"service_precedence":{"type":"TypeInt","computed":true},"service_qos_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"allocation_and_retention_priority_level":{"type":"TypeInt","computed":true},"maximum_bit_rate":{"type":"TypeList","computed":true,"elem":{"schema":{"downlink":{"type":"TypeString","computed":true},"uplink":{"type":"TypeString","computed":true}}}},"preemption_capability":{"type":"TypeString","computed":true},"preemption_vulnerability":{"type":"TypeString","computed":true},"qos_indicator":{"type":"TypeInt","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_mobile_network_sim":{"schema":{"device_type":{"type":"TypeString","computed":true},"integrated_circuit_card_identifier":{"type":"TypeString","computed":true},"international_mobile_subscriber_identity":{"type":"TypeString","computed":true},"mobile_network_sim_group_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"sim_policy_id":{"type":"TypeString","computed":true},"sim_state":{"type":"TypeString","computed":true},"static_ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"attached_data_network_id":{"type":"TypeString","computed":true},"slice_id":{"type":"TypeString","computed":true},"static_ipv4_address":{"type":"TypeString","computed":true}}}},"vendor_key_fingerprint":{"type":"TypeString","computed":true},"vendor_name":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_mobile_network_sim_group":{"schema":{"encryption_key_url":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"mobile_network_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_mobile_network_sim_policy":{"schema":{"default_slice_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"mobile_network_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"rat_frequency_selection_priority_index":{"type":"TypeInt","computed":true},"registration_timer_in_seconds":{"type":"TypeInt","computed":true},"slice":{"type":"TypeList","computed":true,"elem":{"schema":{"data_network":{"type":"TypeList","computed":true,"elem":{"schema":{"additional_allowed_session_types":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allocation_and_retention_priority_level":{"type":"TypeInt","computed":true},"allowed_services_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"data_network_id":{"type":"TypeString","computed":true},"default_session_type":{"type":"TypeString","computed":true},"max_buffered_packets":{"type":"TypeInt","computed":true},"preemption_capability":{"type":"TypeString","computed":true},"preemption_vulnerability":{"type":"TypeString","computed":true},"qos_indicator":{"type":"TypeInt","computed":true},"session_aggregate_maximum_bit_rate":{"type":"TypeList","computed":true,"elem":{"schema":{"downlink":{"type":"TypeString","computed":true},"uplink":{"type":"TypeString","computed":true}}}}}}},"default_data_network_id":{"type":"TypeString","computed":true},"slice_id":{"type":"TypeString","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"user_equipment_aggregate_maximum_bit_rate":{"type":"TypeList","computed":true,"elem":{"schema":{"downlink":{"type":"TypeString","computed":true},"uplink":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_mobile_network_site":{"schema":{"location":{"type":"TypeString","computed":true},"mobile_network_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"network_function_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_mobile_network_slice":{"schema":{"description":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"mobile_network_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"single_network_slice_selection_assistance_information":{"type":"TypeList","computed":true,"elem":{"schema":{"slice_differentiator":{"type":"TypeString","computed":true},"slice_service_type":{"type":"TypeInt","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_monitor_action_group":{"schema":{"arm_role_receiver":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"role_id":{"type":"TypeString","computed":true},"use_common_alert_schema":{"type":"TypeBool","computed":true}}}},"automation_runbook_receiver":{"type":"TypeList","computed":true,"elem":{"schema":{"automation_account_id":{"type":"TypeString","computed":true},"is_global_runbook":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","computed":true},"runbook_name":{"type":"TypeString","computed":true},"service_uri":{"type":"TypeString","computed":true},"use_common_alert_schema":{"type":"TypeBool","computed":true},"webhook_resource_id":{"type":"TypeString","computed":true}}}},"azure_app_push_receiver":{"type":"TypeList","computed":true,"elem":{"schema":{"email_address":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"azure_function_receiver":{"type":"TypeList","computed":true,"elem":{"schema":{"function_app_resource_id":{"type":"TypeString","computed":true},"function_name":{"type":"TypeString","computed":true},"http_trigger_url":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"use_common_alert_schema":{"type":"TypeBool","computed":true}}}},"email_receiver":{"type":"TypeList","computed":true,"elem":{"schema":{"email_address":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"use_common_alert_schema":{"type":"TypeBool","computed":true}}}},"enabled":{"type":"TypeBool","computed":true},"event_hub_receiver":{"type":"TypeList","computed":true,"elem":{"schema":{"event_hub_name":{"type":"TypeString","required":true},"event_hub_namespace":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true},"subscription_id":{"type":"TypeString","optional":true,"computed":true},"tenant_id":{"type":"TypeString","optional":true,"computed":true},"use_common_alert_schema":{"type":"TypeBool","optional":true}}}},"itsm_receiver":{"type":"TypeList","computed":true,"elem":{"schema":{"connection_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"region":{"type":"TypeString","computed":true},"ticket_configuration":{"type":"TypeString","computed":true},"workspace_id":{"type":"TypeString","computed":true}}}},"logic_app_receiver":{"type":"TypeList","computed":true,"elem":{"schema":{"callback_url":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"resource_id":{"type":"TypeString","computed":true},"use_common_alert_schema":{"type":"TypeBool","computed":true}}}},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"short_name":{"type":"TypeString","computed":true},"sms_receiver":{"type":"TypeList","computed":true,"elem":{"schema":{"country_code":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"phone_number":{"type":"TypeString","computed":true}}}},"voice_receiver":{"type":"TypeList","computed":true,"elem":{"schema":{"country_code":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"phone_number":{"type":"TypeString","computed":true}}}},"webhook_receiver":{"type":"TypeList","computed":true,"elem":{"schema":{"aad_auth":{"type":"TypeList","computed":true,"elem":{"schema":{"identifier_uri":{"type":"TypeString","computed":true},"object_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","computed":true},"service_uri":{"type":"TypeString","computed":true},"use_common_alert_schema":{"type":"TypeBool","computed":true}}}}},"timeouts":{"read":5}},"azurerm_monitor_data_collection_endpoint":{"schema":{"configuration_access_endpoint":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"immutable_id":{"type":"TypeString","computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"logs_ingestion_endpoint":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_monitor_data_collection_rule":{"schema":{"data_collection_endpoint_id":{"type":"TypeString","computed":true},"data_flow":{"type":"TypeList","computed":true,"elem":{"schema":{"built_in_transform":{"type":"TypeString","computed":true},"destinations":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"output_stream":{"type":"TypeString","computed":true},"streams":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"transform_kql":{"type":"TypeString","computed":true}}}},"data_sources":{"type":"TypeList","computed":true,"elem":{"schema":{"data_import":{"type":"TypeList","computed":true,"elem":{"schema":{"event_hub_data_source":{"type":"TypeList","computed":true,"elem":{"schema":{"consumer_group":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"stream":{"type":"TypeString","computed":true}}}}}}},"extension":{"type":"TypeList","computed":true,"elem":{"schema":{"extension_json":{"type":"TypeString","computed":true},"extension_name":{"type":"TypeString","computed":true},"input_data_sources":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"streams":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"iis_log":{"type":"TypeList","computed":true,"elem":{"schema":{"log_directories":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"streams":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"log_file":{"type":"TypeList","optional":true,"elem":{"schema":{"file_patterns":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"format":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"settings":{"type":"TypeList","computed":true,"elem":{"schema":{"text":{"type":"TypeList","computed":true,"elem":{"schema":{"record_start_timestamp_format":{"type":"TypeString","computed":true}}}}}}},"streams":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"performance_counter":{"type":"TypeList","computed":true,"elem":{"schema":{"counter_specifiers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"sampling_frequency_in_seconds":{"type":"TypeInt","computed":true},"streams":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"platform_telemetry":{"type":"TypeList","optional":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"streams":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"prometheus_forwarder":{"type":"TypeList","computed":true,"elem":{"schema":{"label_include_filter":{"type":"TypeList","computed":true,"elem":{"schema":{"label":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","computed":true},"streams":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"syslog":{"type":"TypeList","computed":true,"elem":{"schema":{"facility_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"log_levels":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"streams":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"windows_event_log":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"streams":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"x_path_queries":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"windows_firewall_log":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"streams":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}}}}},"description":{"type":"TypeString","computed":true},"destinations":{"type":"TypeList","computed":true,"elem":{"schema":{"azure_monitor_metrics":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true}}}},"event_hub":{"type":"TypeList","optional":true,"elem":{"schema":{"event_hub_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}},"maxItems":1},"event_hub_direct":{"type":"TypeList","optional":true,"elem":{"schema":{"event_hub_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}},"maxItems":1},"log_analytics":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"workspace_resource_id":{"type":"TypeString","computed":true}}}},"monitor_account":{"type":"TypeList","computed":true,"elem":{"schema":{"monitor_account_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"storage_blob":{"type":"TypeList","computed":true,"elem":{"schema":{"container_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"storage_account_id":{"type":"TypeString","computed":true}}}},"storage_blob_direct":{"type":"TypeList","computed":true,"elem":{"schema":{"container_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"storage_account_id":{"type":"TypeString","computed":true}}}},"storage_table_direct":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"storage_account_id":{"type":"TypeString","computed":true},"table_name":{"type":"TypeString","computed":true}}}}}}},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"immutable_id":{"type":"TypeString","computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"stream_declaration":{"type":"TypeList","computed":true,"elem":{"schema":{"column":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"stream_name":{"type":"TypeString","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_monitor_diagnostic_categories":{"schema":{"log_category_groups":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"log_category_types":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"metrics":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"resource_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_monitor_scheduled_query_rules_alert":{"schema":{"action":{"type":"TypeSet","computed":true,"elem":{"schema":{"action_group":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"custom_webhook_payload":{"type":"TypeString","computed":true},"email_subject":{"type":"TypeString","computed":true}}}},"authorized_resource_ids":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"data_source_id":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","computed":true},"frequency":{"type":"TypeInt","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"query":{"type":"TypeString","computed":true},"query_type":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"severity":{"type":"TypeInt","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"throttling":{"type":"TypeInt","computed":true},"time_window":{"type":"TypeInt","computed":true},"trigger":{"type":"TypeSet","computed":true,"elem":{"schema":{"metric_trigger":{"type":"TypeSet","computed":true,"elem":{"schema":{"metric_column":{"type":"TypeString","computed":true},"metric_trigger_type":{"type":"TypeString","computed":true},"operator":{"type":"TypeString","computed":true},"threshold":{"type":"TypeFloat","computed":true}}}},"operator":{"type":"TypeString","computed":true},"threshold":{"type":"TypeFloat","computed":true}}}}},"timeouts":{"read":5}},"azurerm_monitor_scheduled_query_rules_log":{"schema":{"authorized_resource_ids":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"criteria":{"type":"TypeSet","computed":true,"elem":{"schema":{"dimension":{"type":"TypeSet","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"operator":{"type":"TypeString","computed":true},"values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"metric_name":{"type":"TypeString","computed":true}}}},"data_source_id":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_monitor_workspace":{"schema":{"default_data_collection_endpoint_id":{"type":"TypeString","computed":true},"default_data_collection_rule_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"query_endpoint":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_mssql_database":{"schema":{"collation":{"type":"TypeString","computed":true},"elastic_pool_id":{"type":"TypeString","computed":true},"enclave_type":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true}}}},"license_type":{"type":"TypeString","computed":true},"max_size_gb":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true},"read_replica_count":{"type":"TypeInt","computed":true},"read_scale":{"type":"TypeBool","computed":true},"server_id":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"storage_account_type":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"transparent_data_encryption_enabled":{"type":"TypeBool","computed":true},"transparent_data_encryption_key_automatic_rotation_enabled":{"type":"TypeBool","computed":true},"transparent_data_encryption_key_vault_key_id":{"type":"TypeString","computed":true},"zone_redundant":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_mssql_elasticpool":{"schema":{"enclave_type":{"type":"TypeString","computed":true},"license_type":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"max_size_bytes":{"type":"TypeInt","computed":true},"max_size_gb":{"type":"TypeFloat","computed":true},"name":{"type":"TypeString","required":true},"per_db_max_capacity":{"type":"TypeInt","computed":true},"per_db_min_capacity":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true},"server_name":{"type":"TypeString","required":true},"sku":{"type":"TypeList","computed":true,"elem":{"schema":{"capacity":{"type":"TypeInt","computed":true},"family":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"tier":{"type":"TypeString","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"zone_redundant":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_mssql_managed_instance":{"schema":{"administrator_login":{"type":"TypeString","computed":true},"collation":{"type":"TypeString","computed":true},"customer_managed_key_id":{"type":"TypeString","computed":true},"dns_zone":{"type":"TypeString","computed":true},"dns_zone_partner_id":{"type":"TypeString","computed":true},"fqdn":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"license_type":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"minimum_tls_version":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"proxy_override":{"type":"TypeString","computed":true},"public_data_endpoint_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"storage_account_type":{"type":"TypeString","computed":true},"storage_size_in_gb":{"type":"TypeInt","computed":true},"subnet_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"timezone_id":{"type":"TypeString","computed":true},"vcores":{"type":"TypeInt","computed":true}},"timeouts":{"read":5}},"azurerm_mssql_server":{"schema":{"administrator_login":{"type":"TypeString","computed":true},"fully_qualified_domain_name":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"restorable_dropped_database_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"transparent_data_encryption_key_vault_key_id":{"type":"TypeString","computed":true},"version":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_mysql_flexible_server":{"schema":{"administrator_login":{"type":"TypeString","computed":true},"backup_retention_days":{"type":"TypeInt","computed":true},"delegated_subnet_id":{"type":"TypeString","computed":true},"fqdn":{"type":"TypeString","computed":true},"geo_redundant_backup_enabled":{"type":"TypeBool","computed":true},"high_availability":{"type":"TypeList","computed":true,"elem":{"schema":{"mode":{"type":"TypeString","computed":true},"standby_availability_zone":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"maintenance_window":{"type":"TypeList","computed":true,"elem":{"schema":{"day_of_week":{"type":"TypeInt","computed":true},"start_hour":{"type":"TypeInt","computed":true},"start_minute":{"type":"TypeInt","computed":true}}}},"name":{"type":"TypeString","required":true},"private_dns_zone_id":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"replica_capacity":{"type":"TypeInt","computed":true},"replication_role":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"restore_point_in_time":{"type":"TypeString","computed":true},"sku_name":{"type":"TypeString","computed":true},"storage":{"type":"TypeList","computed":true,"elem":{"schema":{"auto_grow_enabled":{"type":"TypeBool","computed":true},"io_scaling_enabled":{"type":"TypeBool","computed":true},"iops":{"type":"TypeInt","computed":true},"size_gb":{"type":"TypeInt","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"version":{"type":"TypeString","computed":true},"zone":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_nat_gateway":{"schema":{"idle_timeout_in_minutes":{"type":"TypeInt","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"public_ip_address_ids":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"public_ip_prefix_ids":{"type":"TypeList","optional":true,"computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"resource_guid":{"type":"TypeString","computed":true},"sku_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_netapp_account":{"schema":{"identity":{"type":"TypeList","optional":true,"elem":{"schema":{"identity_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}}},"maxItems":1},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_netapp_account_encryption":{"schema":{"encryption_key":{"type":"TypeString","optional":true,"description":"The versionless encryption key url."},"netapp_account_id":{"type":"TypeString","required":true,"description":"The ID of the NetApp Account where encryption will be set."},"system_assigned_identity_principal_id":{"type":"TypeString","optional":true,"description":"The Principal ID of the System Assigned Identity to use for encryption."},"user_assigned_identity_id":{"type":"TypeString","optional":true,"description":"The resource ID of the User Assigned Identity to use for encryption."}},"timeouts":{"read":5}},"azurerm_netapp_pool":{"schema":{"account_name":{"type":"TypeString","required":true},"encryption_type":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"service_level":{"type":"TypeString","computed":true},"size_in_tb":{"type":"TypeInt","computed":true}},"timeouts":{"read":5}},"azurerm_netapp_snapshot":{"schema":{"account_name":{"type":"TypeString","required":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"pool_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"volume_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_netapp_snapshot_policy":{"schema":{"account_name":{"type":"TypeString","required":true},"daily_schedule":{"type":"TypeList","computed":true,"elem":{"schema":{"hour":{"type":"TypeInt","computed":true},"minute":{"type":"TypeInt","computed":true},"snapshots_to_keep":{"type":"TypeInt","computed":true}}}},"enabled":{"type":"TypeBool","computed":true},"hourly_schedule":{"type":"TypeList","computed":true,"elem":{"schema":{"minute":{"type":"TypeInt","computed":true},"snapshots_to_keep":{"type":"TypeInt","computed":true}}}},"location":{"type":"TypeString","computed":true},"monthly_schedule":{"type":"TypeList","computed":true,"elem":{"schema":{"days_of_month":{"type":"TypeSet","computed":true,"elem":{"type":"TypeInt"}},"hour":{"type":"TypeInt","computed":true},"minute":{"type":"TypeInt","computed":true},"snapshots_to_keep":{"type":"TypeInt","computed":true}}}},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"weekly_schedule":{"type":"TypeList","computed":true,"elem":{"schema":{"days_of_week":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"hour":{"type":"TypeInt","computed":true},"minute":{"type":"TypeInt","computed":true},"snapshots_to_keep":{"type":"TypeInt","computed":true}}}}},"timeouts":{"read":5}},"azurerm_netapp_volume":{"schema":{"account_name":{"type":"TypeString","required":true},"data_protection_replication":{"type":"TypeList","computed":true,"elem":{"schema":{"endpoint_type":{"type":"TypeString","computed":true},"remote_volume_location":{"type":"TypeString","computed":true},"remote_volume_resource_id":{"type":"TypeString","computed":true},"replication_frequency":{"type":"TypeString","computed":true}}}},"encryption_key_source":{"type":"TypeString","computed":true},"key_vault_private_endpoint_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"mount_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"network_features":{"type":"TypeString","computed":true},"pool_name":{"type":"TypeString","required":true},"protocols":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"security_style":{"type":"TypeString","optional":true},"service_level":{"type":"TypeString","computed":true},"smb_access_based_enumeration_enabled":{"type":"TypeBool","computed":true},"smb_non_browsable_enabled":{"type":"TypeBool","computed":true},"storage_quota_in_gb":{"type":"TypeInt","computed":true},"subnet_id":{"type":"TypeString","computed":true},"volume_path":{"type":"TypeString","computed":true},"zone":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_netapp_volume_group_sap_hana":{"schema":{"account_name":{"type":"TypeString","required":true},"application_identifier":{"type":"TypeString","computed":true},"group_description":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"volume":{"type":"TypeList","computed":true,"elem":{"schema":{"capacity_pool_id":{"type":"TypeString","computed":true},"data_protection_replication":{"type":"TypeList","computed":true,"elem":{"schema":{"endpoint_type":{"type":"TypeString","computed":true},"remote_volume_location":{"type":"TypeString","computed":true},"remote_volume_resource_id":{"type":"TypeString","computed":true},"replication_frequency":{"type":"TypeString","computed":true}}}},"data_protection_snapshot_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"snapshot_policy_id":{"type":"TypeString","computed":true}}}},"export_policy_rule":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_clients":{"type":"TypeString","computed":true},"nfsv3_enabled":{"type":"TypeBool","computed":true},"nfsv41_enabled":{"type":"TypeBool","computed":true},"root_access_enabled":{"type":"TypeBool","computed":true},"rule_index":{"type":"TypeInt","computed":true},"unix_read_only":{"type":"TypeBool","computed":true},"unix_read_write":{"type":"TypeBool","computed":true}}}},"id":{"type":"TypeString","computed":true},"mount_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"protocols":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"proximity_placement_group_id":{"type":"TypeString","computed":true},"security_style":{"type":"TypeString","computed":true},"service_level":{"type":"TypeString","computed":true},"snapshot_directory_visible":{"type":"TypeBool","computed":true},"storage_quota_in_gb":{"type":"TypeInt","computed":true},"subnet_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"throughput_in_mibps":{"type":"TypeFloat","required":true},"volume_path":{"type":"TypeString","computed":true},"volume_spec_name":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_netapp_volume_quota_rule":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"quota_size_in_kib":{"type":"TypeInt","computed":true},"quota_target":{"type":"TypeString","computed":true},"quota_type":{"type":"TypeString","computed":true},"volume_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"read":5}},"azurerm_network_ddos_protection_plan":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"virtual_network_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_network_interface":{"schema":{"accelerated_networking_enabled":{"type":"TypeBool","computed":true},"applied_dns_servers":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"dns_servers":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"internal_dns_name_label":{"type":"TypeString","computed":true},"ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"application_gateway_backend_address_pools_ids":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"application_security_group_ids":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"gateway_load_balancer_frontend_ip_configuration_id":{"type":"TypeString","computed":true},"load_balancer_backend_address_pools_ids":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"load_balancer_inbound_nat_rules_ids":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"primary":{"type":"TypeBool","computed":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_address_allocation":{"type":"TypeString","computed":true},"private_ip_address_version":{"type":"TypeString","computed":true},"public_ip_address_id":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"ip_forwarding_enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"mac_address":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"network_security_group_id":{"type":"TypeString","computed":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"virtual_machine_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_network_manager":{"schema":{"cross_tenant_scopes":{"type":"TypeList","computed":true,"elem":{"schema":{"management_groups":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"subscriptions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","computed":true}}}},"description":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"scope":{"type":"TypeList","computed":true,"elem":{"schema":{"management_group_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"subscription_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"scope_accesses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_network_manager_connectivity_configuration":{"schema":{"applies_to_group":{"type":"TypeList","computed":true,"elem":{"schema":{"global_mesh_enabled":{"type":"TypeBool","computed":true},"group_connectivity":{"type":"TypeString","computed":true},"network_group_id":{"type":"TypeString","computed":true},"use_hub_gateway":{"type":"TypeBool","computed":true}}}},"connectivity_topology":{"type":"TypeString","computed":true},"delete_existing_peering_enabled":{"type":"TypeBool","computed":true},"description":{"type":"TypeString","computed":true},"global_mesh_enabled":{"type":"TypeBool","computed":true},"hub":{"type":"TypeList","computed":true,"elem":{"schema":{"resource_id":{"type":"TypeString","computed":true},"resource_type":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","required":true},"network_manager_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_network_manager_network_group":{"schema":{"description":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"network_manager_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_network_security_group":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"security_rule":{"type":"TypeList","computed":true,"elem":{"schema":{"access":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"destination_address_prefix":{"type":"TypeString","computed":true},"destination_address_prefixes":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"destination_application_security_group_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"destination_port_range":{"type":"TypeString","computed":true},"destination_port_ranges":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"direction":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"priority":{"type":"TypeInt","computed":true},"protocol":{"type":"TypeString","computed":true},"source_address_prefix":{"type":"TypeString","computed":true},"source_address_prefixes":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"source_application_security_group_ids":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"source_port_range":{"type":"TypeString","computed":true},"source_port_ranges":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_network_service_tags":{"schema":{"address_prefixes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ipv4_cidrs":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ipv6_cidrs":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","required":true,"forceNew":true},"location_filter":{"type":"TypeString","optional":true,"forceNew":true},"name":{"type":"TypeString","computed":true},"service":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_network_watcher":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_nginx_certificate":{"schema":{"certificate_virtual_path":{"type":"TypeString","computed":true},"error_code":{"type":"TypeString","computed":true},"error_message":{"type":"TypeString","computed":true},"key_vault_secret_creation_date":{"type":"TypeString","computed":true},"key_vault_secret_id":{"type":"TypeString","computed":true},"key_vault_secret_version":{"type":"TypeString","computed":true},"key_virtual_path":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"nginx_deployment_id":{"type":"TypeString","required":true},"sha1_thumbprint":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_nginx_configuration":{"schema":{"config_file":{"type":"TypeSet","computed":true,"elem":{"schema":{"content":{"type":"TypeString","computed":true},"virtual_path":{"type":"TypeString","computed":true}}}},"nginx_deployment_id":{"type":"TypeString","required":true},"package_data":{"type":"TypeString","computed":true},"protected_file":{"type":"TypeSet","computed":true,"elem":{"schema":{"content":{"type":"TypeString","computed":true},"virtual_path":{"type":"TypeString","computed":true}}}},"root_file":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_nginx_deployment":{"schema":{"auto_scale_profile":{"type":"TypeList","computed":true,"elem":{"schema":{"max_capacity":{"type":"TypeInt","computed":true},"min_capacity":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","computed":true}}}},"automatic_upgrade_channel":{"type":"TypeString","computed":true},"capacity":{"type":"TypeInt","computed":true},"diagnose_support_enabled":{"type":"TypeBool","computed":true},"email":{"type":"TypeString","computed":true},"frontend_private":{"type":"TypeList","computed":true,"elem":{"schema":{"allocation_method":{"type":"TypeString","computed":true},"ip_address":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"frontend_public":{"type":"TypeList","computed":true,"elem":{"schema":{"ip_address":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"ip_address":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"logging_storage_account":{"type":"TypeList","computed":true,"elem":{"schema":{"container_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"managed_resource_group":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"network_interface":{"type":"TypeList","computed":true,"elem":{"schema":{"subnet_id":{"type":"TypeString","computed":true}}}},"nginx_version":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_notification_hub":{"schema":{"apns_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"application_mode":{"type":"TypeString","computed":true},"bundle_id":{"type":"TypeString","computed":true},"key_id":{"type":"TypeString","computed":true},"team_id":{"type":"TypeString","computed":true},"token":{"type":"TypeString","computed":true}}}},"gcm_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"api_key":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"namespace_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_notification_hub_namespace":{"schema":{"enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"namespace_type":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"servicebus_endpoint":{"type":"TypeString","computed":true},"sku":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_orchestrated_virtual_machine_scale_set":{"schema":{"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"network_interface":{"type":"TypeList","computed":true,"elem":{"schema":{"accelerated_networking_enabled":{"type":"TypeBool","computed":true},"dns_servers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"application_gateway_backend_address_pool_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"application_security_group_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"load_balancer_backend_address_pool_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"load_balancer_inbound_nat_rules_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"primary":{"type":"TypeBool","computed":true},"public_ip_address":{"type":"TypeList","computed":true,"elem":{"schema":{"domain_name_label":{"type":"TypeString","computed":true},"idle_timeout_in_minutes":{"type":"TypeInt","computed":true},"ip_tag":{"type":"TypeList","computed":true,"elem":{"schema":{"tag":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","computed":true},"public_ip_prefix_id":{"type":"TypeString","computed":true},"version":{"type":"TypeString","computed":true}}}},"subnet_id":{"type":"TypeString","computed":true},"version":{"type":"TypeString","computed":true}}}},"ip_forwarding_enabled":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","computed":true},"network_security_group_id":{"type":"TypeString","computed":true},"primary":{"type":"TypeBool","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_palo_alto_local_rulestack":{"schema":{"anti_spyware_profile":{"type":"TypeString","computed":true},"anti_virus_profile":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"dns_subscription":{"type":"TypeString","computed":true},"file_blocking_profile":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"outbound_trust_certificate":{"type":"TypeString","computed":true},"outbound_untrust_certificate":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"url_filtering_profile":{"type":"TypeString","computed":true},"vulnerability_profile":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_platform_image":{"schema":{"location":{"type":"TypeString","required":true,"forceNew":true},"offer":{"type":"TypeString","required":true},"publisher":{"type":"TypeString","required":true},"sku":{"type":"TypeString","required":true},"version":{"type":"TypeString","optional":true,"computed":true}},"timeouts":{"read":5}},"azurerm_policy_assignment":{"schema":{"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","computed":true},"enforce":{"type":"TypeBool","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"metadata":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"non_compliance_message":{"type":"TypeList","computed":true,"elem":{"schema":{"content":{"type":"TypeString","computed":true},"policy_definition_reference_id":{"type":"TypeString","computed":true}}}},"not_scopes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"parameters":{"type":"TypeString","computed":true},"policy_definition_id":{"type":"TypeString","computed":true},"scope_id":{"type":"TypeString","required":true,"forceNew":true}},"timeouts":{"read":5}},"azurerm_policy_definition":{"schema":{"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","optional":true,"computed":true},"management_group_name":{"type":"TypeString","optional":true},"metadata":{"type":"TypeString","computed":true},"mode":{"type":"TypeString","computed":true},"name":{"type":"TypeString","optional":true,"computed":true},"parameters":{"type":"TypeString","computed":true},"policy_rule":{"type":"TypeString","computed":true},"policy_type":{"type":"TypeString","computed":true},"role_definition_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_policy_definition_built_in":{"schema":{"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","optional":true,"computed":true},"management_group_name":{"type":"TypeString","optional":true},"metadata":{"type":"TypeString","computed":true},"mode":{"type":"TypeString","computed":true},"name":{"type":"TypeString","optional":true,"computed":true},"parameters":{"type":"TypeString","computed":true},"policy_rule":{"type":"TypeString","computed":true},"policy_type":{"type":"TypeString","computed":true},"role_definition_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_policy_set_definition":{"schema":{"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","optional":true,"computed":true},"management_group_name":{"type":"TypeString","optional":true},"metadata":{"type":"TypeString","computed":true},"name":{"type":"TypeString","optional":true,"computed":true},"parameters":{"type":"TypeString","computed":true},"policy_definition_group":{"type":"TypeList","computed":true,"elem":{"schema":{"additional_metadata_resource_id":{"type":"TypeString","computed":true},"category":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"policy_definition_reference":{"type":"TypeList","computed":true,"elem":{"schema":{"parameter_values":{"type":"TypeString","computed":true},"parameters":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"policy_definition_id":{"type":"TypeString","computed":true},"policy_group_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"reference_id":{"type":"TypeString","computed":true}}}},"policy_definitions":{"type":"TypeString","computed":true},"policy_type":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_policy_virtual_machine_configuration_assignment":{"schema":{"assignment_hash":{"type":"TypeString","computed":true},"compliance_status":{"type":"TypeString","computed":true},"content_hash":{"type":"TypeString","computed":true},"content_uri":{"type":"TypeString","computed":true},"last_compliance_status_checked":{"type":"TypeString","computed":true},"latest_report_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"virtual_machine_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_portal_dashboard":{"schema":{"dashboard_properties":{"type":"TypeString","optional":true,"computed":true},"display_name":{"type":"TypeString","optional":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_postgresql_flexible_server":{"schema":{"administrator_login":{"type":"TypeString","computed":true},"auto_grow_enabled":{"type":"TypeBool","computed":true},"backup_retention_days":{"type":"TypeInt","computed":true},"delegated_subnet_id":{"type":"TypeString","computed":true},"fqdn":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"storage_mb":{"type":"TypeInt","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"version":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_postgresql_server":{"schema":{"administrator_login":{"type":"TypeString","computed":true},"fqdn":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"version":{"type":"TypeString","computed":true}},"timeouts":{"read":10}},"azurerm_private_dns_a_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"records":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_private_dns_aaaa_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"records":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_private_dns_cname_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"record":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"target_resource_id":{"type":"TypeString","computed":true},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_private_dns_mx_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","optional":true},"record":{"type":"TypeSet","computed":true,"elem":{"schema":{"exchange":{"type":"TypeString","computed":true},"preference":{"type":"TypeInt","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_private_dns_ptr_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"records":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_private_dns_resolver":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"virtual_network_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_private_dns_resolver_dns_forwarding_ruleset":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"private_dns_resolver_outbound_endpoint_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_private_dns_resolver_forwarding_rule":{"schema":{"dns_forwarding_ruleset_id":{"type":"TypeString","required":true},"domain_name":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","computed":true},"metadata":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"target_dns_servers":{"type":"TypeList","computed":true,"elem":{"schema":{"ip_address":{"type":"TypeString","computed":true},"port":{"type":"TypeInt","computed":true}}}}},"timeouts":{"read":5}},"azurerm_private_dns_resolver_inbound_endpoint":{"schema":{"ip_configurations":{"type":"TypeList","computed":true,"elem":{"schema":{"private_ip_address":{"type":"TypeString","computed":true},"private_ip_allocation_method":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"private_dns_resolver_id":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_private_dns_resolver_outbound_endpoint":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"private_dns_resolver_id":{"type":"TypeString","required":true},"subnet_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_private_dns_resolver_virtual_network_link":{"schema":{"dns_forwarding_ruleset_id":{"type":"TypeString","required":true},"metadata":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"virtual_network_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_private_dns_soa_record":{"schema":{"email":{"type":"TypeString","computed":true},"expire_time":{"type":"TypeInt","computed":true},"fqdn":{"type":"TypeString","computed":true},"host_name":{"type":"TypeString","computed":true},"minimum_ttl":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","optional":true,"default":"@"},"refresh_time":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true},"retry_time":{"type":"TypeInt","computed":true},"serial_number":{"type":"TypeInt","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_private_dns_srv_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"record":{"type":"TypeSet","computed":true,"elem":{"schema":{"port":{"type":"TypeInt","computed":true},"priority":{"type":"TypeInt","computed":true},"target":{"type":"TypeString","computed":true},"weight":{"type":"TypeInt","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_private_dns_txt_record":{"schema":{"fqdn":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"record":{"type":"TypeSet","computed":true,"elem":{"schema":{"value":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ttl":{"type":"TypeInt","computed":true},"zone_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_private_dns_zone":{"schema":{"max_number_of_record_sets":{"type":"TypeInt","computed":true},"max_number_of_virtual_network_links":{"type":"TypeInt","computed":true},"max_number_of_virtual_network_links_with_registration":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true},"number_of_record_sets":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","optional":true,"computed":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_private_dns_zone_virtual_network_link":{"schema":{"name":{"type":"TypeString","required":true},"private_dns_zone_name":{"type":"TypeString","required":true},"registration_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"virtual_network_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_private_endpoint_connection":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"network_interface":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"private_service_connection":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"private_ip_address":{"type":"TypeString","computed":true},"request_response":{"type":"TypeString","computed":true},"status":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_private_link_service":{"schema":{"alias":{"type":"TypeString","computed":true},"auto_approval_subscription_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"enable_proxy_protocol":{"type":"TypeBool","computed":true},"load_balancer_frontend_ip_configuration_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"nat_ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"primary":{"type":"TypeBool","computed":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_address_version":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"visibility_subscription_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_private_link_service_endpoint_connections":{"schema":{"location":{"type":"TypeString","computed":true},"private_endpoint_connections":{"type":"TypeList","computed":true,"elem":{"schema":{"action_required":{"type":"TypeString","computed":true},"connection_id":{"type":"TypeString","computed":true},"connection_name":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"private_endpoint_id":{"type":"TypeString","computed":true},"private_endpoint_name":{"type":"TypeString","computed":true},"status":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"service_id":{"type":"TypeString","required":true},"service_name":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_proximity_placement_group":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_public_ip":{"schema":{"allocation_method":{"type":"TypeString","computed":true},"ddos_protection_mode":{"type":"TypeString","computed":true},"ddos_protection_plan_id":{"type":"TypeString","computed":true},"domain_name_label":{"type":"TypeString","computed":true},"fqdn":{"type":"TypeString","computed":true},"idle_timeout_in_minutes":{"type":"TypeInt","computed":true},"ip_address":{"type":"TypeString","computed":true},"ip_tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"ip_version":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"reverse_fqdn":{"type":"TypeString","computed":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_public_ip_prefix":{"schema":{"ip_prefix":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"prefix_length":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_public_ips":{"schema":{"allocation_type":{"type":"TypeString","optional":true},"attachment_status":{"type":"TypeString","optional":true},"name_prefix":{"type":"TypeString","optional":true},"public_ips":{"type":"TypeList","computed":true,"elem":{"schema":{"domain_name_label":{"type":"TypeString","computed":true},"fqdn":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"ip_address":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_public_maintenance_configurations":{"schema":{"configs":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"duration":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"maintenance_scope":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"recur_every":{"type":"TypeString","computed":true},"time_zone":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","optional":true},"recur_every":{"type":"TypeString","optional":true},"scope":{"type":"TypeString","optional":true}},"timeouts":{"read":5}},"azurerm_recovery_services_vault":{"schema":{"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_redis_cache":{"schema":{"access_keys_authentication_enabled":{"type":"TypeBool","computed":true},"capacity":{"type":"TypeInt","computed":true},"family":{"type":"TypeString","computed":true},"hostname":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"minimum_tls_version":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"non_ssl_port_enabled":{"type":"TypeBool","computed":true},"patch_schedule":{"type":"TypeList","computed":true,"elem":{"schema":{"day_of_week":{"type":"TypeString","computed":true},"maintenance_window":{"type":"TypeString","computed":true},"start_hour_utc":{"type":"TypeInt","computed":true}}}},"port":{"type":"TypeInt","computed":true},"primary_access_key":{"type":"TypeString","computed":true},"primary_connection_string":{"type":"TypeString","computed":true},"private_static_ip_address":{"type":"TypeString","computed":true},"redis_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"active_directory_authentication_enabled":{"type":"TypeBool","computed":true},"aof_backup_enabled":{"type":"TypeBool","computed":true},"aof_storage_connection_string_0":{"type":"TypeString","computed":true},"aof_storage_connection_string_1":{"type":"TypeString","computed":true},"authentication_enabled":{"type":"TypeBool","computed":true},"data_persistence_authentication_method":{"type":"TypeString","computed":true},"maxclients":{"type":"TypeInt","computed":true},"maxfragmentationmemory_reserved":{"type":"TypeInt","computed":true},"maxmemory_delta":{"type":"TypeInt","computed":true},"maxmemory_policy":{"type":"TypeString","computed":true},"maxmemory_reserved":{"type":"TypeInt","computed":true},"notify_keyspace_events":{"type":"TypeString","computed":true},"rdb_backup_enabled":{"type":"TypeBool","computed":true},"rdb_backup_frequency":{"type":"TypeInt","computed":true},"rdb_backup_max_snapshot_count":{"type":"TypeInt","computed":true},"rdb_storage_connection_string":{"type":"TypeString","computed":true},"storage_account_subscription_id":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"secondary_access_key":{"type":"TypeString","computed":true},"secondary_connection_string":{"type":"TypeString","computed":true},"shard_count":{"type":"TypeInt","computed":true},"sku_name":{"type":"TypeString","computed":true},"ssl_port":{"type":"TypeInt","computed":true},"subnet_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"zones":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_redis_enterprise_database":{"schema":{"cluster_id":{"type":"TypeString","required":true},"linked_database_group_nickname":{"type":"TypeString","computed":true},"linked_database_id":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"primary_access_key":{"type":"TypeString","computed":true},"secondary_access_key":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_resource_group":{"schema":{"location":{"type":"TypeString","computed":true},"managed_by":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_resource_group_template_deployment":{"schema":{"name":{"type":"TypeString","required":true},"output_content":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_resources":{"schema":{"name":{"type":"TypeString","optional":true,"computed":true},"required_tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","optional":true,"computed":true},"resources":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true}}}},"type":{"type":"TypeString","optional":true,"computed":true}},"timeouts":{"read":5}},"azurerm_role_definition":{"schema":{"assignable_scopes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"description":{"type":"TypeString","computed":true},"name":{"type":"TypeString","optional":true,"computed":true},"permissions":{"type":"TypeList","computed":true,"elem":{"schema":{"actions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"condition":{"type":"TypeString","computed":true},"condition_version":{"type":"TypeString","computed":true},"data_actions":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}},"not_actions":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"not_data_actions":{"type":"TypeSet","optional":true,"elem":{"type":"TypeString"}}}}},"role_definition_id":{"type":"TypeString","optional":true,"computed":true},"scope":{"type":"TypeString","optional":true},"type":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_role_management_policy":{"schema":{"activation_rules":{"type":"TypeList","description":"The activation rules of the policy","computed":true,"elem":{"schema":{"approval_stage":{"type":"TypeList","description":"The approval stages for the activation","computed":true,"elem":{"schema":{"primary_approver":{"type":"TypeSet","description":"The IDs of the users or groups who can approve the activation","computed":true,"elem":{"schema":{"object_id":{"type":"TypeString","description":"The ID of the object to act as an approver","computed":true},"type":{"type":"TypeString","description":"The type of object acting as an approver","computed":true}}}}}}},"maximum_duration":{"type":"TypeString","description":"The time after which the an activation can be valid for","computed":true},"require_approval":{"type":"TypeBool","description":"Whether an approval is required for activation","computed":true},"require_justification":{"type":"TypeBool","description":"Whether a justification is required during activation","computed":true},"require_multifactor_authentication":{"type":"TypeBool","description":"Whether multi-factor authentication is required during activation","computed":true},"require_ticket_info":{"type":"TypeBool","description":"Whether ticket information is required during activation","computed":true},"required_conditional_access_authentication_context":{"type":"TypeString","description":"Whether a conditional access context is required during activation","computed":true}}}},"active_assignment_rules":{"type":"TypeList","description":"The rules for active assignment of the policy","computed":true,"elem":{"schema":{"expiration_required":{"type":"TypeBool","description":"Must the assignment have an expiry date","computed":true},"expire_after":{"type":"TypeString","description":"The duration after which assignments expire","computed":true},"require_justification":{"type":"TypeBool","description":"Whether a justification is required to make an assignment","computed":true},"require_multifactor_authentication":{"type":"TypeBool","description":"Whether multi-factor authentication is required to make an assignment","computed":true},"require_ticket_info":{"type":"TypeBool","description":"Whether ticket information is required to make an assignment","computed":true}}}},"description":{"type":"TypeString","description":"The Description of the policy","computed":true},"eligible_assignment_rules":{"type":"TypeList","description":"The rules for eligible assignment of the policy","computed":true,"elem":{"schema":{"expiration_required":{"type":"TypeBool","description":"Must the assignment have an expiry date","computed":true},"expire_after":{"type":"TypeString","description":"The duration after which assignments expire","computed":true}}}},"name":{"type":"TypeString","description":"The name of the policy","computed":true},"notification_rules":{"type":"TypeList","description":"The notification rules of the policy","computed":true,"elem":{"schema":{"active_assignments":{"type":"TypeList","description":"Notifications about active assignments","computed":true,"elem":{"schema":{"admin_notifications":{"type":"TypeList","description":"Admin notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","description":"Whether the default recipients are notified","computed":true},"notification_level":{"type":"TypeString","description":"What level of notifications are sent","computed":true}}}},"approver_notifications":{"type":"TypeList","description":"Approver notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","description":"Whether the default recipients are notified","computed":true},"notification_level":{"type":"TypeString","description":"What level of notifications are sent","computed":true}}}},"assignee_notifications":{"type":"TypeList","description":"Assignee notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","description":"Whether the default recipients are notified","computed":true},"notification_level":{"type":"TypeString","description":"What level of notifications are sent","computed":true}}}}}}},"eligible_activations":{"type":"TypeList","description":"Notifications about activations of eligible assignments","computed":true,"elem":{"schema":{"admin_notifications":{"type":"TypeList","description":"Admin notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","description":"Whether the default recipients are notified","computed":true},"notification_level":{"type":"TypeString","description":"What level of notifications are sent","computed":true}}}},"approver_notifications":{"type":"TypeList","description":"Approver notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","description":"Whether the default recipients are notified","computed":true},"notification_level":{"type":"TypeString","description":"What level of notifications are sent","computed":true}}}},"assignee_notifications":{"type":"TypeList","description":"Assignee notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","description":"Whether the default recipients are notified","computed":true},"notification_level":{"type":"TypeString","description":"What level of notifications are sent","computed":true}}}}}}},"eligible_assignments":{"type":"TypeList","description":"Notifications about eligible assignments","computed":true,"elem":{"schema":{"admin_notifications":{"type":"TypeList","description":"Admin notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","description":"Whether the default recipients are notified","computed":true},"notification_level":{"type":"TypeString","description":"What level of notifications are sent","computed":true}}}},"approver_notifications":{"type":"TypeList","description":"Approver notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","description":"Whether the default recipients are notified","computed":true},"notification_level":{"type":"TypeString","description":"What level of notifications are sent","computed":true}}}},"assignee_notifications":{"type":"TypeList","description":"Assignee notification settings","computed":true,"elem":{"schema":{"additional_recipients":{"type":"TypeSet","description":"The additional recipients to notify","computed":true,"elem":{"type":"TypeString"}},"default_recipients":{"type":"TypeBool","description":"Whether the default recipients are notified","computed":true},"notification_level":{"type":"TypeString","description":"What level of notifications are sent","computed":true}}}}}}}}}},"role_definition_id":{"type":"TypeString","required":true,"description":"ID of the Azure Role to which this policy is assigned"},"scope":{"type":"TypeString","required":true,"description":"The scope of the role to which this policy will apply"}},"timeouts":{"read":5}},"azurerm_route_filter":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"rule":{"type":"TypeList","computed":true,"elem":{"schema":{"access":{"type":"TypeString","computed":true},"communities":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"rule_type":{"type":"TypeString","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_route_table":{"schema":{"bgp_route_propagation_enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"route":{"type":"TypeList","computed":true,"elem":{"schema":{"address_prefix":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"next_hop_in_ip_address":{"type":"TypeString","computed":true},"next_hop_type":{"type":"TypeString","computed":true}}}},"subnets":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_search_service":{"schema":{"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","required":true},"partition_count":{"type":"TypeInt","computed":true},"primary_key":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"query_keys":{"type":"TypeList","computed":true,"elem":{"schema":{"key":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true}}}},"replica_count":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_key":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_sentinel_alert_rule":{"schema":{"log_analytics_workspace_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_sentinel_alert_rule_anomaly":{"schema":{"anomaly_settings_version":{"type":"TypeInt","computed":true},"anomaly_version":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"display_name":{"type":"TypeString","optional":true,"computed":true},"enabled":{"type":"TypeBool","computed":true},"frequency":{"type":"TypeString","computed":true},"log_analytics_workspace_id":{"type":"TypeString","required":true},"mode":{"type":"TypeString","computed":true},"multi_select_observation":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"supported_values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"name":{"type":"TypeString","optional":true,"computed":true},"prioritized_exclude_observation":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"exclude":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"prioritize":{"type":"TypeString","computed":true}}}},"required_data_connector":{"type":"TypeList","computed":true,"elem":{"schema":{"connector_id":{"type":"TypeString","computed":true},"data_types":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"settings_definition_id":{"type":"TypeString","computed":true},"single_select_observation":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"supported_values":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"value":{"type":"TypeString","computed":true}}}},"tactics":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"techniques":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"threshold_observation":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"max":{"type":"TypeString","computed":true},"min":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_sentinel_alert_rule_template":{"schema":{"display_name":{"type":"TypeString","optional":true,"computed":true},"log_analytics_workspace_id":{"type":"TypeString","required":true},"name":{"type":"TypeString","optional":true,"computed":true},"nrt_template":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"query":{"type":"TypeString","computed":true},"severity":{"type":"TypeString","computed":true},"tactics":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"scheduled_template":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"query":{"type":"TypeString","computed":true},"query_frequency":{"type":"TypeString","computed":true},"query_period":{"type":"TypeString","computed":true},"severity":{"type":"TypeString","computed":true},"tactics":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"trigger_operator":{"type":"TypeString","computed":true},"trigger_threshold":{"type":"TypeInt","computed":true}}}},"security_incident_template":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"product_filter":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_service_plan":{"schema":{"app_service_environment_id":{"type":"TypeString","computed":true},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"maximum_elastic_worker_count":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true},"os_type":{"type":"TypeString","computed":true},"per_site_scaling_enabled":{"type":"TypeBool","computed":true},"reserved":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"worker_count":{"type":"TypeInt","computed":true},"zone_balancing_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_servicebus_namespace":{"schema":{"capacity":{"type":"TypeInt","computed":true},"default_primary_connection_string":{"type":"TypeString","computed":true},"default_primary_key":{"type":"TypeString","computed":true},"default_secondary_connection_string":{"type":"TypeString","computed":true},"default_secondary_key":{"type":"TypeString","computed":true},"endpoint":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"premium_messaging_partitions":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_servicebus_namespace_authorization_rule":{"schema":{"name":{"type":"TypeString","required":true},"namespace_id":{"type":"TypeString","optional":true},"namespace_name":{"type":"TypeString","optional":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_connection_string_alias":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","optional":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_connection_string_alias":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_servicebus_namespace_disaster_recovery_config":{"schema":{"alias_authorization_rule_id":{"type":"TypeString","optional":true},"default_primary_key":{"type":"TypeString","computed":true},"default_secondary_key":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"namespace_id":{"type":"TypeString","optional":true},"namespace_name":{"type":"TypeString","optional":true},"partner_namespace_id":{"type":"TypeString","computed":true},"primary_connection_string_alias":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","optional":true},"secondary_connection_string_alias":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_servicebus_queue":{"schema":{"auto_delete_on_idle":{"type":"TypeString","computed":true},"dead_lettering_on_message_expiration":{"type":"TypeBool","computed":true},"default_message_ttl":{"type":"TypeString","computed":true},"duplicate_detection_history_time_window":{"type":"TypeString","computed":true},"enable_batched_operations":{"type":"TypeBool","computed":true},"enable_express":{"type":"TypeBool","computed":true},"enable_partitioning":{"type":"TypeBool","computed":true},"forward_dead_lettered_messages_to":{"type":"TypeString","computed":true},"forward_to":{"type":"TypeString","computed":true},"lock_duration":{"type":"TypeString","computed":true},"max_delivery_count":{"type":"TypeInt","computed":true},"max_size_in_megabytes":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true},"namespace_id":{"type":"TypeString","optional":true},"namespace_name":{"type":"TypeString","optional":true},"requires_duplicate_detection":{"type":"TypeBool","computed":true},"requires_session":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","optional":true},"status":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_servicebus_queue_authorization_rule":{"schema":{"listen":{"type":"TypeBool","computed":true},"manage":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"namespace_name":{"type":"TypeString","optional":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_connection_string_alias":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"queue_id":{"type":"TypeString","optional":true},"queue_name":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","optional":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_connection_string_alias":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"send":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_servicebus_subscription":{"schema":{"auto_delete_on_idle":{"type":"TypeString","computed":true},"dead_lettering_on_filter_evaluation_error":{"type":"TypeBool","computed":true},"dead_lettering_on_message_expiration":{"type":"TypeBool","computed":true},"default_message_ttl":{"type":"TypeString","computed":true},"enable_batched_operations":{"type":"TypeBool","computed":true},"forward_dead_lettered_messages_to":{"type":"TypeString","computed":true},"forward_to":{"type":"TypeString","computed":true},"lock_duration":{"type":"TypeString","computed":true},"max_delivery_count":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true},"namespace_name":{"type":"TypeString","optional":true},"requires_session":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","optional":true},"topic_id":{"type":"TypeString","optional":true},"topic_name":{"type":"TypeString","optional":true}},"timeouts":{"read":5}},"azurerm_servicebus_topic":{"schema":{"auto_delete_on_idle":{"type":"TypeString","computed":true},"default_message_ttl":{"type":"TypeString","computed":true},"duplicate_detection_history_time_window":{"type":"TypeString","computed":true},"enable_batched_operations":{"type":"TypeBool","computed":true},"enable_express":{"type":"TypeBool","computed":true},"enable_partitioning":{"type":"TypeBool","computed":true},"max_size_in_megabytes":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true},"namespace_id":{"type":"TypeString","optional":true},"namespace_name":{"type":"TypeString","optional":true},"requires_duplicate_detection":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","optional":true},"status":{"type":"TypeString","computed":true},"support_ordering":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_servicebus_topic_authorization_rule":{"schema":{"listen":{"type":"TypeBool","computed":true},"manage":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"namespace_name":{"type":"TypeString","optional":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_connection_string_alias":{"type":"TypeString","computed":true},"primary_key":{"type":"TypeString","computed":true},"queue_name":{"type":"TypeString","optional":true},"resource_group_name":{"type":"TypeString","optional":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_connection_string_alias":{"type":"TypeString","computed":true},"secondary_key":{"type":"TypeString","computed":true},"send":{"type":"TypeBool","computed":true},"topic_id":{"type":"TypeString","optional":true},"topic_name":{"type":"TypeString","optional":true}},"timeouts":{"read":5}},"azurerm_shared_image":{"schema":{"accelerated_network_support_enabled":{"type":"TypeBool","computed":true},"architecture":{"type":"TypeString","computed":true},"confidential_vm_enabled":{"type":"TypeBool","computed":true},"confidential_vm_supported":{"type":"TypeBool","computed":true},"description":{"type":"TypeString","computed":true},"eula":{"type":"TypeString","computed":true},"gallery_name":{"type":"TypeString","required":true},"hibernation_enabled":{"type":"TypeBool","computed":true},"hyper_v_generation":{"type":"TypeString","computed":true},"identifier":{"type":"TypeList","computed":true,"elem":{"schema":{"offer":{"type":"TypeString","computed":true},"publisher":{"type":"TypeString","computed":true},"sku":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"os_type":{"type":"TypeString","computed":true},"privacy_statement_uri":{"type":"TypeString","computed":true},"purchase_plan":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"product":{"type":"TypeString","computed":true},"publisher":{"type":"TypeString","computed":true}}}},"release_note_uri":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"specialized":{"type":"TypeBool","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"trusted_launch_enabled":{"type":"TypeBool","computed":true},"trusted_launch_supported":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_shared_image_gallery":{"schema":{"description":{"type":"TypeString","computed":true},"image_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"unique_name":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_shared_image_version":{"schema":{"exclude_from_latest":{"type":"TypeBool","computed":true},"gallery_name":{"type":"TypeString","required":true},"image_name":{"type":"TypeString","required":true},"location":{"type":"TypeString","computed":true},"managed_image_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"os_disk_image_size_gb":{"type":"TypeInt","computed":true},"os_disk_snapshot_id":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sort_versions_by_semver":{"type":"TypeBool","optional":true,"default":false},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"target_region":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"regional_replica_count":{"type":"TypeInt","computed":true},"storage_account_type":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_shared_image_versions":{"schema":{"gallery_name":{"type":"TypeString","required":true},"image_name":{"type":"TypeString","required":true},"images":{"type":"TypeList","computed":true,"elem":{"schema":{"exclude_from_latest":{"type":"TypeBool","computed":true},"id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"managed_image_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"target_region":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"regional_replica_count":{"type":"TypeInt","computed":true},"storage_account_type":{"type":"TypeString","computed":true}}}}}}},"resource_group_name":{"type":"TypeString","required":true},"tags_filter":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_signalr_service":{"schema":{"aad_auth_enabled":{"type":"TypeBool","computed":true},"hostname":{"type":"TypeString","computed":true},"ip_address":{"type":"TypeString","computed":true},"local_auth_enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"primary_access_key":{"type":"TypeString","computed":true},"primary_connection_string":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"public_port":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_access_key":{"type":"TypeString","computed":true},"secondary_connection_string":{"type":"TypeString","computed":true},"server_port":{"type":"TypeInt","computed":true},"serverless_connection_timeout_in_seconds":{"type":"TypeInt","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tls_client_cert_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_site_recovery_fabric":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"recovery_vault_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_site_recovery_protection_container":{"schema":{"name":{"type":"TypeString","required":true},"recovery_fabric_name":{"type":"TypeString","required":true},"recovery_vault_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_site_recovery_replication_policy":{"schema":{"application_consistent_snapshot_frequency_in_minutes":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true},"recovery_point_retention_in_minutes":{"type":"TypeInt","computed":true},"recovery_vault_name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_site_recovery_replication_recovery_plan":{"schema":{"azure_to_azure_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"primary_edge_zone":{"type":"TypeString","computed":true},"primary_zone":{"type":"TypeString","computed":true},"recovery_edge_zone":{"type":"TypeString","computed":true},"recovery_zone":{"type":"TypeString","computed":true}}}},"failover_deployment_model":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"recovery_group":{"type":"TypeSet","computed":true,"elem":{"schema":{"post_action":{"type":"TypeSet","computed":true,"elem":{"type":"TypeList","elem":{"schema":{"fabric_location":{"type":"TypeString","computed":true},"fail_over_directions":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"fail_over_types":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"manual_action_instruction":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"runbook_id":{"type":"TypeString","computed":true},"script_path":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}}},"pre_action":{"type":"TypeSet","computed":true,"elem":{"type":"TypeList","elem":{"schema":{"fabric_location":{"type":"TypeString","computed":true},"fail_over_directions":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"fail_over_types":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"manual_action_instruction":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"runbook_id":{"type":"TypeString","computed":true},"script_path":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}}},"replicated_protected_items":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true}}}},"recovery_vault_id":{"type":"TypeString","required":true},"source_recovery_fabric_id":{"type":"TypeString","computed":true},"target_recovery_fabric_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_snapshot":{"schema":{"creation_option":{"type":"TypeString","computed":true},"disk_size_gb":{"type":"TypeInt","computed":true},"encryption_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"disk_encryption_key":{"type":"TypeList","computed":true,"elem":{"schema":{"secret_url":{"type":"TypeString","computed":true},"source_vault_id":{"type":"TypeString","computed":true}}}},"enabled":{"type":"TypeBool","computed":true},"key_encryption_key":{"type":"TypeList","computed":true,"elem":{"schema":{"key_url":{"type":"TypeString","computed":true},"source_vault_id":{"type":"TypeString","computed":true}}}}}}},"name":{"type":"TypeString","required":true},"os_type":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"source_resource_id":{"type":"TypeString","computed":true},"source_uri":{"type":"TypeString","computed":true},"storage_account_id":{"type":"TypeString","computed":true},"time_created":{"type":"TypeString","computed":true},"trusted_launch_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_source_control_token":{"schema":{"token":{"type":"TypeString","computed":true},"token_secret":{"type":"TypeString","computed":true},"type":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_spatial_anchors_account":{"schema":{"account_domain":{"type":"TypeString","computed":true},"account_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_spring_cloud_app":{"schema":{"fqdn":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"is_public":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"persistent_disk":{"type":"TypeList","computed":true,"elem":{"schema":{"mount_path":{"type":"TypeString","computed":true},"size_in_gb":{"type":"TypeInt","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"service_name":{"type":"TypeString","required":true},"tls_enabled":{"type":"TypeBool","computed":true},"url":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_spring_cloud_service":{"schema":{"config_server_git_setting":{"type":"TypeList","computed":true,"elem":{"schema":{"http_basic_auth":{"type":"TypeList","computed":true,"elem":{"schema":{"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"label":{"type":"TypeString","computed":true},"repository":{"type":"TypeList","computed":true,"elem":{"schema":{"http_basic_auth":{"type":"TypeList","computed":true,"elem":{"schema":{"password":{"type":"TypeString","computed":true},"username":{"type":"TypeString","computed":true}}}},"label":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"pattern":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"search_paths":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ssh_auth":{"type":"TypeList","computed":true,"elem":{"schema":{"host_key":{"type":"TypeString","computed":true},"host_key_algorithm":{"type":"TypeString","computed":true},"private_key":{"type":"TypeString","computed":true},"strict_host_key_checking_enabled":{"type":"TypeBool","computed":true}}}},"uri":{"type":"TypeString","computed":true}}}},"search_paths":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ssh_auth":{"type":"TypeList","computed":true,"elem":{"schema":{"host_key":{"type":"TypeString","computed":true},"host_key_algorithm":{"type":"TypeString","computed":true},"private_key":{"type":"TypeString","computed":true},"strict_host_key_checking_enabled":{"type":"TypeBool","computed":true}}}},"uri":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"outbound_public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"required_network_traffic_rules":{"type":"TypeList","computed":true,"elem":{"schema":{"direction":{"type":"TypeString","computed":true},"fqdns":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"port":{"type":"TypeInt","computed":true},"protocol":{"type":"TypeString","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_ssh_public_key":{"schema":{"name":{"type":"TypeString","required":true},"public_key":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_stack_hci_cluster":{"schema":{"automanage_configuration_id":{"type":"TypeString","computed":true},"client_id":{"type":"TypeString","computed":true},"cloud_id":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true,"forceNew":true},"resource_provider_object_id":{"type":"TypeString","computed":true},"service_endpoint":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_static_web_app":{"schema":{"api_key":{"type":"TypeString","computed":true},"app_settings":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"basic_auth":{"type":"TypeList","computed":true,"elem":{"schema":{"environments":{"type":"TypeString","computed":true}}}},"configuration_file_changes_enabled":{"type":"TypeBool","computed":true},"default_host_name":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true,"forceNew":true},"preview_environments_enabled":{"type":"TypeBool","computed":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku_size":{"type":"TypeString","computed":true},"sku_tier":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_storage_account":{"schema":{"access_tier":{"type":"TypeString","computed":true},"account_kind":{"type":"TypeString","computed":true},"account_replication_type":{"type":"TypeString","computed":true},"account_tier":{"type":"TypeString","computed":true},"allow_nested_items_to_be_public":{"type":"TypeBool","computed":true},"azure_files_authentication":{"type":"TypeList","computed":true,"elem":{"schema":{"active_directory":{"type":"TypeList","computed":true,"elem":{"schema":{"domain_guid":{"type":"TypeString","computed":true},"domain_name":{"type":"TypeString","computed":true},"domain_sid":{"type":"TypeString","computed":true},"forest_name":{"type":"TypeString","computed":true},"netbios_domain_name":{"type":"TypeString","computed":true},"storage_sid":{"type":"TypeString","computed":true}}}},"default_share_level_permission":{"type":"TypeString","computed":true},"directory_type":{"type":"TypeString","computed":true}}}},"custom_domain":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true}}}},"dns_endpoint_type":{"type":"TypeString","computed":true},"https_traffic_only_enabled":{"type":"TypeBool","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"infrastructure_encryption_enabled":{"type":"TypeBool","computed":true},"is_hns_enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"min_tls_version":{"type":"TypeString","optional":true},"name":{"type":"TypeString","required":true},"nfsv3_enabled":{"type":"TypeBool","computed":true},"primary_access_key":{"type":"TypeString","computed":true},"primary_blob_connection_string":{"type":"TypeString","computed":true},"primary_blob_endpoint":{"type":"TypeString","computed":true},"primary_blob_host":{"type":"TypeString","computed":true},"primary_blob_internet_endpoint":{"type":"TypeString","computed":true},"primary_blob_internet_host":{"type":"TypeString","computed":true},"primary_blob_microsoft_endpoint":{"type":"TypeString","computed":true},"primary_blob_microsoft_host":{"type":"TypeString","computed":true},"primary_connection_string":{"type":"TypeString","computed":true},"primary_dfs_endpoint":{"type":"TypeString","computed":true},"primary_dfs_host":{"type":"TypeString","computed":true},"primary_dfs_internet_endpoint":{"type":"TypeString","computed":true},"primary_dfs_internet_host":{"type":"TypeString","computed":true},"primary_dfs_microsoft_endpoint":{"type":"TypeString","computed":true},"primary_dfs_microsoft_host":{"type":"TypeString","computed":true},"primary_file_endpoint":{"type":"TypeString","computed":true},"primary_file_host":{"type":"TypeString","computed":true},"primary_file_internet_endpoint":{"type":"TypeString","computed":true},"primary_file_internet_host":{"type":"TypeString","computed":true},"primary_file_microsoft_endpoint":{"type":"TypeString","computed":true},"primary_file_microsoft_host":{"type":"TypeString","computed":true},"primary_location":{"type":"TypeString","computed":true},"primary_queue_endpoint":{"type":"TypeString","computed":true},"primary_queue_host":{"type":"TypeString","computed":true},"primary_queue_microsoft_endpoint":{"type":"TypeString","computed":true},"primary_queue_microsoft_host":{"type":"TypeString","computed":true},"primary_table_endpoint":{"type":"TypeString","computed":true},"primary_table_host":{"type":"TypeString","computed":true},"primary_table_microsoft_endpoint":{"type":"TypeString","computed":true},"primary_table_microsoft_host":{"type":"TypeString","computed":true},"primary_web_endpoint":{"type":"TypeString","computed":true},"primary_web_host":{"type":"TypeString","computed":true},"primary_web_internet_endpoint":{"type":"TypeString","computed":true},"primary_web_internet_host":{"type":"TypeString","computed":true},"primary_web_microsoft_endpoint":{"type":"TypeString","computed":true},"primary_web_microsoft_host":{"type":"TypeString","computed":true},"queue_encryption_key_type":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_access_key":{"type":"TypeString","computed":true},"secondary_blob_connection_string":{"type":"TypeString","computed":true},"secondary_blob_endpoint":{"type":"TypeString","computed":true},"secondary_blob_host":{"type":"TypeString","computed":true},"secondary_blob_internet_endpoint":{"type":"TypeString","computed":true},"secondary_blob_internet_host":{"type":"TypeString","computed":true},"secondary_blob_microsoft_endpoint":{"type":"TypeString","computed":true},"secondary_blob_microsoft_host":{"type":"TypeString","computed":true},"secondary_connection_string":{"type":"TypeString","computed":true},"secondary_dfs_endpoint":{"type":"TypeString","computed":true},"secondary_dfs_host":{"type":"TypeString","computed":true},"secondary_dfs_internet_endpoint":{"type":"TypeString","computed":true},"secondary_dfs_internet_host":{"type":"TypeString","computed":true},"secondary_dfs_microsoft_endpoint":{"type":"TypeString","computed":true},"secondary_dfs_microsoft_host":{"type":"TypeString","computed":true},"secondary_file_endpoint":{"type":"TypeString","computed":true},"secondary_file_host":{"type":"TypeString","computed":true},"secondary_file_internet_endpoint":{"type":"TypeString","computed":true},"secondary_file_internet_host":{"type":"TypeString","computed":true},"secondary_file_microsoft_endpoint":{"type":"TypeString","computed":true},"secondary_file_microsoft_host":{"type":"TypeString","computed":true},"secondary_location":{"type":"TypeString","computed":true},"secondary_queue_endpoint":{"type":"TypeString","computed":true},"secondary_queue_host":{"type":"TypeString","computed":true},"secondary_queue_microsoft_endpoint":{"type":"TypeString","computed":true},"secondary_queue_microsoft_host":{"type":"TypeString","computed":true},"secondary_table_endpoint":{"type":"TypeString","computed":true},"secondary_table_host":{"type":"TypeString","computed":true},"secondary_table_microsoft_endpoint":{"type":"TypeString","computed":true},"secondary_table_microsoft_host":{"type":"TypeString","computed":true},"secondary_web_endpoint":{"type":"TypeString","computed":true},"secondary_web_host":{"type":"TypeString","computed":true},"secondary_web_internet_endpoint":{"type":"TypeString","computed":true},"secondary_web_internet_host":{"type":"TypeString","computed":true},"secondary_web_microsoft_endpoint":{"type":"TypeString","computed":true},"secondary_web_microsoft_host":{"type":"TypeString","computed":true},"table_encryption_key_type":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_storage_account_blob_container_sas":{"schema":{"cache_control":{"type":"TypeString","optional":true},"connection_string":{"type":"TypeString","required":true},"container_name":{"type":"TypeString","required":true},"content_disposition":{"type":"TypeString","optional":true},"content_encoding":{"type":"TypeString","optional":true},"content_language":{"type":"TypeString","optional":true},"content_type":{"type":"TypeString","optional":true},"expiry":{"type":"TypeString","required":true},"https_only":{"type":"TypeBool","optional":true,"default":true},"ip_address":{"type":"TypeString","optional":true},"permissions":{"type":"TypeList","required":true,"elem":{"schema":{"add":{"type":"TypeBool","required":true},"create":{"type":"TypeBool","required":true},"delete":{"type":"TypeBool","required":true},"list":{"type":"TypeBool","required":true},"read":{"type":"TypeBool","required":true},"write":{"type":"TypeBool","required":true}}},"maxItems":1},"sas":{"type":"TypeString","computed":true},"start":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_storage_account_sas":{"schema":{"connection_string":{"type":"TypeString","required":true},"expiry":{"type":"TypeString","required":true},"https_only":{"type":"TypeBool","optional":true,"default":true},"ip_addresses":{"type":"TypeString","optional":true},"permissions":{"type":"TypeList","required":true,"elem":{"schema":{"add":{"type":"TypeBool","required":true},"create":{"type":"TypeBool","required":true},"delete":{"type":"TypeBool","required":true},"filter":{"type":"TypeBool","required":true},"list":{"type":"TypeBool","required":true},"process":{"type":"TypeBool","required":true},"read":{"type":"TypeBool","required":true},"tag":{"type":"TypeBool","required":true},"update":{"type":"TypeBool","required":true},"write":{"type":"TypeBool","required":true}}},"maxItems":1},"resource_types":{"type":"TypeList","required":true,"elem":{"schema":{"container":{"type":"TypeBool","required":true},"object":{"type":"TypeBool","required":true},"service":{"type":"TypeBool","required":true}}},"maxItems":1},"sas":{"type":"TypeString","computed":true},"services":{"type":"TypeList","required":true,"elem":{"schema":{"blob":{"type":"TypeBool","required":true},"file":{"type":"TypeBool","required":true},"queue":{"type":"TypeBool","required":true},"table":{"type":"TypeBool","required":true}}},"maxItems":1},"signed_version":{"type":"TypeString","optional":true,"default":"2022-11-02"},"start":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_storage_blob":{"schema":{"access_tier":{"type":"TypeString","computed":true},"content_md5":{"type":"TypeString","computed":true},"content_type":{"type":"TypeString","computed":true},"encryption_scope":{"type":"TypeString","computed":true},"metadata":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"storage_account_name":{"type":"TypeString","required":true},"storage_container_name":{"type":"TypeString","required":true},"type":{"type":"TypeString","computed":true},"url":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_storage_container":{"schema":{"container_access_type":{"type":"TypeString","computed":true},"default_encryption_scope":{"type":"TypeString","computed":true},"encryption_scope_override_enabled":{"type":"TypeBool","computed":true},"has_immutability_policy":{"type":"TypeBool","computed":true},"has_legal_hold":{"type":"TypeBool","computed":true},"metadata":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"resource_manager_id":{"type":"TypeString","computed":true},"storage_account_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_storage_containers":{"schema":{"containers":{"type":"TypeList","computed":true,"elem":{"schema":{"data_plane_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"resource_manager_id":{"type":"TypeString","computed":true}}}},"name_prefix":{"type":"TypeString","optional":true},"storage_account_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_storage_encryption_scope":{"schema":{"key_vault_key_id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"source":{"type":"TypeString","computed":true},"storage_account_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_storage_management_policy":{"schema":{"rule":{"type":"TypeList","computed":true,"elem":{"schema":{"actions":{"type":"TypeList","computed":true,"elem":{"schema":{"base_blob":{"type":"TypeList","computed":true,"elem":{"schema":{"auto_tier_to_hot_from_cool_enabled":{"type":"TypeBool","computed":true},"delete_after_days_since_creation_greater_than":{"type":"TypeInt","computed":true},"delete_after_days_since_last_access_time_greater_than":{"type":"TypeInt","computed":true},"delete_after_days_since_modification_greater_than":{"type":"TypeInt","computed":true},"tier_to_archive_after_days_since_creation_greater_than":{"type":"TypeInt","computed":true},"tier_to_archive_after_days_since_last_access_time_greater_than":{"type":"TypeInt","computed":true},"tier_to_archive_after_days_since_last_tier_change_greater_than":{"type":"TypeInt","computed":true},"tier_to_archive_after_days_since_modification_greater_than":{"type":"TypeInt","computed":true},"tier_to_cold_after_days_since_creation_greater_than":{"type":"TypeInt","computed":true},"tier_to_cold_after_days_since_last_access_time_greater_than":{"type":"TypeInt","computed":true},"tier_to_cold_after_days_since_modification_greater_than":{"type":"TypeInt","computed":true},"tier_to_cool_after_days_since_creation_greater_than":{"type":"TypeInt","computed":true},"tier_to_cool_after_days_since_last_access_time_greater_than":{"type":"TypeInt","computed":true},"tier_to_cool_after_days_since_modification_greater_than":{"type":"TypeInt","computed":true}}}},"snapshot":{"type":"TypeList","computed":true,"elem":{"schema":{"change_tier_to_archive_after_days_since_creation":{"type":"TypeInt","computed":true},"change_tier_to_cool_after_days_since_creation":{"type":"TypeInt","computed":true},"delete_after_days_since_creation_greater_than":{"type":"TypeInt","computed":true},"tier_to_archive_after_days_since_last_tier_change_greater_than":{"type":"TypeInt","computed":true},"tier_to_cold_after_days_since_creation_greater_than":{"type":"TypeInt","computed":true}}}},"version":{"type":"TypeList","computed":true,"elem":{"schema":{"change_tier_to_archive_after_days_since_creation":{"type":"TypeInt","computed":true},"change_tier_to_cool_after_days_since_creation":{"type":"TypeInt","computed":true},"delete_after_days_since_creation":{"type":"TypeInt","computed":true},"tier_to_archive_after_days_since_last_tier_change_greater_than":{"type":"TypeInt","computed":true},"tier_to_cold_after_days_since_creation_greater_than":{"type":"TypeInt","computed":true}}}}}}},"enabled":{"type":"TypeBool","computed":true},"filters":{"type":"TypeList","computed":true,"elem":{"schema":{"blob_types":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"match_blob_index_tag":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"operation":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"prefix_match":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}}},"name":{"type":"TypeString","computed":true}}}},"storage_account_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_storage_queue":{"schema":{"metadata":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"resource_manager_id":{"type":"TypeString","computed":true},"storage_account_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_storage_share":{"schema":{"acl":{"type":"TypeList","optional":true,"elem":{"schema":{"access_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"expiry":{"type":"TypeString","computed":true},"permissions":{"type":"TypeString","computed":true},"start":{"type":"TypeString","computed":true}}}},"id":{"type":"TypeString","computed":true}}}},"metadata":{"type":"TypeMap","optional":true,"computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"quota":{"type":"TypeInt","computed":true},"resource_manager_id":{"type":"TypeString","computed":true},"storage_account_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_storage_sync":{"schema":{"incoming_traffic_policy":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_storage_sync_group":{"schema":{"name":{"type":"TypeString","required":true},"storage_sync_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_storage_table":{"schema":{"acl":{"type":"TypeSet","computed":true,"elem":{"schema":{"access_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"expiry":{"type":"TypeString","computed":true},"permissions":{"type":"TypeString","computed":true},"start":{"type":"TypeString","computed":true}}}},"id":{"type":"TypeString","computed":true}}}},"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_manager_id":{"type":"TypeString","computed":true},"storage_account_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_storage_table_entities":{"schema":{"filter":{"type":"TypeString","required":true},"items":{"type":"TypeList","computed":true,"elem":{"schema":{"partition_key":{"type":"TypeString","computed":true},"properties":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"row_key":{"type":"TypeString","computed":true}}}},"select":{"type":"TypeList","optional":true,"elem":{"type":"TypeString"}},"storage_table_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_storage_table_entity":{"schema":{"entity":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"partition_key":{"type":"TypeString","required":true},"row_key":{"type":"TypeString","required":true},"storage_table_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_stream_analytics_job":{"schema":{"compatibility_level":{"type":"TypeString","computed":true},"data_locale":{"type":"TypeString","computed":true},"events_late_arrival_max_delay_in_seconds":{"type":"TypeInt","computed":true},"events_out_of_order_max_delay_in_seconds":{"type":"TypeInt","computed":true},"events_out_of_order_policy":{"type":"TypeString","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"job_id":{"type":"TypeString","computed":true},"last_output_time":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"output_error_policy":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"start_mode":{"type":"TypeString","computed":true},"start_time":{"type":"TypeString","computed":true},"streaming_units":{"type":"TypeInt","computed":true},"transformation_query":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_subnet":{"schema":{"address_prefix":{"type":"TypeString","computed":true},"address_prefixes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"default_outbound_access_enabled":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"network_security_group_id":{"type":"TypeString","computed":true},"private_endpoint_network_policies":{"type":"TypeString","computed":true},"private_link_service_network_policies_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"route_table_id":{"type":"TypeString","computed":true},"service_endpoints":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"virtual_network_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_subscription":{"schema":{"display_name":{"type":"TypeString","computed":true},"location_placement_id":{"type":"TypeString","computed":true},"quota_id":{"type":"TypeString","computed":true},"spending_limit":{"type":"TypeString","computed":true},"state":{"type":"TypeString","computed":true},"subscription_id":{"type":"TypeString","optional":true,"computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_subscription_template_deployment":{"schema":{"name":{"type":"TypeString","required":true},"output_content":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_subscriptions":{"schema":{"display_name_contains":{"type":"TypeString","optional":true},"display_name_prefix":{"type":"TypeString","optional":true},"subscriptions":{"type":"TypeList","computed":true,"elem":{"schema":{"display_name":{"type":"TypeString","computed":true},"id":{"type":"TypeString","computed":true},"location_placement_id":{"type":"TypeString","computed":true},"quota_id":{"type":"TypeString","computed":true},"spending_limit":{"type":"TypeString","computed":true},"state":{"type":"TypeString","computed":true},"subscription_id":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","computed":true}}}}},"timeouts":{"read":5}},"azurerm_synapse_workspace":{"schema":{"connectivity_endpoints":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_system_center_virtual_machine_manager_inventory_items":{"schema":{"inventory_items":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"uuid":{"type":"TypeString","computed":true}}}},"inventory_type":{"type":"TypeString","required":true},"system_center_virtual_machine_manager_server_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_template_spec_version":{"schema":{"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"template_body":{"type":"TypeString","computed":true},"version":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_tenant_template_deployment":{"schema":{"name":{"type":"TypeString","required":true},"output_content":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_traffic_manager_geographical_location":{"schema":{"name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_traffic_manager_profile":{"schema":{"dns_config":{"type":"TypeList","computed":true,"elem":{"schema":{"relative_name":{"type":"TypeString","computed":true},"ttl":{"type":"TypeInt","computed":true}}}},"fqdn":{"type":"TypeString","computed":true},"monitor_config":{"type":"TypeList","computed":true,"elem":{"schema":{"custom_header":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"value":{"type":"TypeString","computed":true}}}},"expected_status_code_ranges":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"interval_in_seconds":{"type":"TypeInt","computed":true},"path":{"type":"TypeString","computed":true},"port":{"type":"TypeInt","computed":true},"protocol":{"type":"TypeString","computed":true},"timeout_in_seconds":{"type":"TypeInt","computed":true},"tolerated_number_of_failures":{"type":"TypeInt","computed":true}}}},"name":{"type":"TypeString","required":true},"profile_status":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}},"traffic_routing_method":{"type":"TypeString","computed":true},"traffic_view_enabled":{"type":"TypeBool","optional":true}},"timeouts":{"read":5}},"azurerm_user_assigned_identity":{"schema":{"client_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"principal_id":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tenant_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_virtual_desktop_application_group":{"schema":{"description":{"type":"TypeString","computed":true},"friendly_name":{"type":"TypeString","computed":true},"host_pool_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true},"workspace_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_virtual_desktop_host_pool":{"schema":{"custom_rdp_properties":{"type":"TypeString","computed":true},"description":{"type":"TypeString","computed":true},"friendly_name":{"type":"TypeString","computed":true},"load_balancer_type":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"maximum_sessions_allowed":{"type":"TypeInt","computed":true},"name":{"type":"TypeString","required":true},"personal_desktop_assignment_type":{"type":"TypeString","computed":true},"preferred_app_group_type":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"scheduled_agent_updates":{"type":"TypeList","computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","computed":true},"schedule":{"type":"TypeList","computed":true,"elem":{"schema":{"day_of_week":{"type":"TypeString","computed":true},"hour_of_day":{"type":"TypeInt","computed":true}}}},"timezone":{"type":"TypeString","computed":true},"use_session_host_timezone":{"type":"TypeBool","computed":true}}}},"start_vm_on_connect":{"type":"TypeBool","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true},"validate_environment":{"type":"TypeBool","computed":true}},"timeouts":{"read":5}},"azurerm_virtual_desktop_workspace":{"schema":{"description":{"type":"TypeString","computed":true},"friendly_name":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_virtual_hub":{"schema":{"address_prefix":{"type":"TypeString","computed":true},"default_route_table_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"virtual_router_asn":{"type":"TypeInt","computed":true},"virtual_router_ips":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"virtual_wan_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_virtual_hub_connection":{"schema":{"internet_security_enabled":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","required":true},"remote_virtual_network_id":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"routing":{"type":"TypeList","computed":true,"elem":{"schema":{"associated_route_table_id":{"type":"TypeString","computed":true},"inbound_route_map_id":{"type":"TypeString","computed":true},"outbound_route_map_id":{"type":"TypeString","computed":true},"propagated_route_table":{"type":"TypeList","computed":true,"elem":{"schema":{"labels":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"route_table_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"static_vnet_local_route_override_criteria":{"type":"TypeString","computed":true},"static_vnet_route":{"type":"TypeList","computed":true,"elem":{"schema":{"address_prefixes":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"next_hop_ip_address":{"type":"TypeString","computed":true}}}}}}},"virtual_hub_id":{"type":"TypeString","computed":true},"virtual_hub_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_virtual_hub_route_table":{"schema":{"labels":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"route":{"type":"TypeList","computed":true,"elem":{"schema":{"destinations":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"destinations_type":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"next_hop":{"type":"TypeString","computed":true},"next_hop_type":{"type":"TypeString","computed":true}}}},"virtual_hub_id":{"type":"TypeString","computed":true},"virtual_hub_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_virtual_machine":{"schema":{"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"power_state":{"type":"TypeString","computed":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"public_ip_address":{"type":"TypeString","computed":true},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_virtual_machine_scale_set":{"schema":{"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"instances":{"type":"TypeList","computed":true,"elem":{"schema":{"computer_name":{"type":"TypeString","computed":true},"instance_id":{"type":"TypeString","computed":true},"latest_model_applied":{"type":"TypeBool","computed":true},"name":{"type":"TypeString","computed":true},"power_state":{"type":"TypeString","computed":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"public_ip_address":{"type":"TypeString","computed":true},"public_ip_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"virtual_machine_id":{"type":"TypeString","computed":true},"zone":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"network_interface":{"type":"TypeList","computed":true,"elem":{"schema":{"dns_servers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"enable_accelerated_networking":{"type":"TypeBool","computed":true},"enable_ip_forwarding":{"type":"TypeBool","computed":true},"ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"application_gateway_backend_address_pool_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"application_security_group_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"load_balancer_backend_address_pool_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"load_balancer_inbound_nat_rules_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"name":{"type":"TypeString","computed":true},"primary":{"type":"TypeBool","computed":true},"public_ip_address":{"type":"TypeList","computed":true,"elem":{"schema":{"domain_name_label":{"type":"TypeString","computed":true},"idle_timeout_in_minutes":{"type":"TypeInt","computed":true},"ip_tag":{"type":"TypeList","computed":true,"elem":{"schema":{"tag":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","computed":true},"public_ip_prefix_id":{"type":"TypeString","computed":true},"version":{"type":"TypeString","computed":true}}}},"subnet_id":{"type":"TypeString","computed":true},"version":{"type":"TypeString","computed":true}}}},"name":{"type":"TypeString","computed":true},"network_security_group_id":{"type":"TypeString","computed":true},"primary":{"type":"TypeBool","computed":true}}}},"resource_group_name":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_virtual_network":{"schema":{"address_space":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"dns_servers":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"guid":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"subnets":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"vnet_peerings":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"vnet_peerings_addresses":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_virtual_network_gateway":{"schema":{"active_active":{"type":"TypeBool","computed":true},"bgp_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"asn":{"type":"TypeInt","computed":true},"peer_weight":{"type":"TypeInt","computed":true},"peering_address":{"type":"TypeString","computed":true}}}},"custom_route":{"type":"TypeList","computed":true,"elem":{"schema":{"address_prefixes":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}}},"default_local_network_gateway_id":{"type":"TypeString","computed":true},"enable_bgp":{"type":"TypeBool","computed":true},"generation":{"type":"TypeString","computed":true},"ip_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"id":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"private_ip_address":{"type":"TypeString","computed":true},"private_ip_address_allocation":{"type":"TypeString","computed":true},"public_ip_address_id":{"type":"TypeString","computed":true},"subnet_id":{"type":"TypeString","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"private_ip_address_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"type":{"type":"TypeString","computed":true},"vpn_client_configuration":{"type":"TypeList","computed":true,"elem":{"schema":{"aad_audience":{"type":"TypeString","computed":true},"aad_issuer":{"type":"TypeString","computed":true},"aad_tenant":{"type":"TypeString","computed":true},"address_space":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"radius_server_address":{"type":"TypeString","computed":true},"radius_server_secret":{"type":"TypeString","computed":true},"revoked_certificate":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}}},"root_certificate":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"public_cert_data":{"type":"TypeString","computed":true}}}},"vpn_client_protocols":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}}}},"vpn_type":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_virtual_network_gateway_connection":{"schema":{"authorization_key":{"type":"TypeString","computed":true},"connection_protocol":{"type":"TypeString","computed":true},"dpd_timeout_seconds":{"type":"TypeInt","computed":true},"egress_bytes_transferred":{"type":"TypeInt","computed":true},"enable_bgp":{"type":"TypeBool","computed":true},"express_route_circuit_id":{"type":"TypeString","computed":true},"express_route_gateway_bypass":{"type":"TypeBool","computed":true},"ingress_bytes_transferred":{"type":"TypeInt","computed":true},"ipsec_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"dh_group":{"type":"TypeString","computed":true},"ike_encryption":{"type":"TypeString","computed":true},"ike_integrity":{"type":"TypeString","computed":true},"ipsec_encryption":{"type":"TypeString","computed":true},"ipsec_integrity":{"type":"TypeString","computed":true},"pfs_group":{"type":"TypeString","computed":true},"sa_datasize":{"type":"TypeInt","computed":true},"sa_lifetime":{"type":"TypeInt","computed":true}}}},"local_azure_ip_address_enabled":{"type":"TypeBool","computed":true},"local_network_gateway_id":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"peer_virtual_network_gateway_id":{"type":"TypeString","computed":true},"private_link_fast_path_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"resource_guid":{"type":"TypeString","computed":true},"routing_weight":{"type":"TypeInt","computed":true},"shared_key":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"traffic_selector_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"local_address_cidrs":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"remote_address_cidrs":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"type":{"type":"TypeString","computed":true},"use_policy_based_traffic_selectors":{"type":"TypeBool","computed":true},"virtual_network_gateway_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_virtual_wan":{"schema":{"allow_branch_to_branch_traffic":{"type":"TypeBool","computed":true},"disable_vpn_encryption":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"office365_local_breakout_category":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"virtual_hub_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"vpn_site_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_vmware_private_cloud":{"schema":{"circuit":{"type":"TypeList","computed":true,"elem":{"schema":{"express_route_id":{"type":"TypeString","computed":true},"express_route_private_peering_id":{"type":"TypeString","computed":true},"primary_subnet_cidr":{"type":"TypeString","computed":true},"secondary_subnet_cidr":{"type":"TypeString","computed":true}}}},"hcx_cloud_manager_endpoint":{"type":"TypeString","computed":true},"internet_connection_enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"management_cluster":{"type":"TypeList","computed":true,"elem":{"schema":{"hosts":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"id":{"type":"TypeInt","computed":true},"size":{"type":"TypeInt","computed":true}}}},"management_subnet_cidr":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"network_subnet_cidr":{"type":"TypeString","computed":true},"nsxt_certificate_thumbprint":{"type":"TypeString","computed":true},"nsxt_manager_endpoint":{"type":"TypeString","computed":true},"provisioning_subnet_cidr":{"type":"TypeString","computed":true},"resource_group_name":{"type":"TypeString","required":true},"sku_name":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"vcenter_certificate_thumbprint":{"type":"TypeString","computed":true},"vcsa_endpoint":{"type":"TypeString","computed":true},"vmotion_subnet_cidr":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_vpn_gateway":{"schema":{"bgp_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"asn":{"type":"TypeInt","computed":true},"bgp_peering_address":{"type":"TypeString","computed":true},"instance_0_bgp_peering_address":{"type":"TypeList","computed":true,"elem":{"schema":{"custom_ips":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"default_ips":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ip_configuration_id":{"type":"TypeString","computed":true},"tunnel_ips":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"instance_1_bgp_peering_address":{"type":"TypeList","computed":true,"elem":{"schema":{"custom_ips":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"default_ips":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"ip_configuration_id":{"type":"TypeString","computed":true},"tunnel_ips":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"peer_weight":{"type":"TypeInt","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"scale_unit":{"type":"TypeInt","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"virtual_hub_id":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_vpn_server_configuration":{"schema":{"azure_active_directory_authentication":{"type":"TypeList","computed":true,"elem":{"schema":{"audience":{"type":"TypeString","computed":true},"issuer":{"type":"TypeString","computed":true},"tenant":{"type":"TypeString","computed":true}}}},"client_revoked_certificate":{"type":"TypeSet","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}}},"client_root_certificate":{"type":"TypeSet","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"public_cert_data":{"type":"TypeString","computed":true}}}},"ipsec_policy":{"type":"TypeList","computed":true,"elem":{"schema":{"dh_group":{"type":"TypeString","computed":true},"ike_encryption":{"type":"TypeString","computed":true},"ike_integrity":{"type":"TypeString","computed":true},"ipsec_encryption":{"type":"TypeString","computed":true},"ipsec_integrity":{"type":"TypeString","computed":true},"pfs_group":{"type":"TypeString","computed":true},"sa_data_size_kilobytes":{"type":"TypeInt","computed":true},"sa_lifetime_seconds":{"type":"TypeInt","computed":true}}}},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"radius":{"type":"TypeList","computed":true,"elem":{"schema":{"client_root_certificate":{"type":"TypeSet","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"thumbprint":{"type":"TypeString","computed":true}}}},"server":{"type":"TypeList","computed":true,"elem":{"schema":{"address":{"type":"TypeString","computed":true},"score":{"type":"TypeInt","computed":true},"secret":{"type":"TypeString","computed":true}}}},"server_root_certificate":{"type":"TypeSet","computed":true,"elem":{"schema":{"name":{"type":"TypeString","computed":true},"public_cert_data":{"type":"TypeString","computed":true}}}}}}},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"vpn_authentication_types":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"vpn_protocols":{"type":"TypeSet","computed":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_web_application_firewall_policy":{"schema":{"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"resource_group_name":{"type":"TypeString","required":true},"tags":{"type":"TypeMap","optional":true,"elem":{"type":"TypeString"}}},"timeouts":{"read":5}},"azurerm_web_pubsub":{"schema":{"aad_auth_enabled":{"type":"TypeBool","computed":true},"capacity":{"type":"TypeInt","computed":true},"external_ip":{"type":"TypeString","computed":true},"hostname":{"type":"TypeString","computed":true},"local_auth_enabled":{"type":"TypeBool","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"primary_access_key":{"type":"TypeString","computed":true},"primary_connection_string":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"public_port":{"type":"TypeInt","computed":true},"resource_group_name":{"type":"TypeString","required":true},"secondary_access_key":{"type":"TypeString","computed":true},"secondary_connection_string":{"type":"TypeString","computed":true},"server_port":{"type":"TypeInt","computed":true},"sku":{"type":"TypeString","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tls_client_cert_enabled":{"type":"TypeBool","computed":true},"version":{"type":"TypeString","computed":true}},"timeouts":{"read":5}},"azurerm_web_pubsub_private_link_resource":{"schema":{"shared_private_link_resource_types":{"type":"TypeList","computed":true,"elem":{"schema":{"description":{"type":"TypeString","computed":true},"subresource_name":{"type":"TypeString","computed":true}}}},"web_pubsub_id":{"type":"TypeString","required":true}},"timeouts":{"read":5}},"azurerm_windows_function_app":{"schema":{"app_settings":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"active_directory":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","description":"The list of Allowed audience values considered when validating JWTs issued by Azure Active Directory.","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The ID of the Client to use to authenticate with Azure Active Directory.","computed":true},"client_secret":{"type":"TypeString","description":"The Client Secret for the Client ID.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the client secret of the Client.","computed":true}}}},"additional_login_parameters":{"type":"TypeMap","description":"The map of Login Parameters sent to the OpenID Connect authorization endpoint when a user logs in.","computed":true,"elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","description":"Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","description":"The default authentication provider used when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`.","computed":true},"enabled":{"type":"TypeBool","description":"Is the Authentication / Authorization feature enabled?","computed":true},"facebook":{"type":"TypeList","computed":true,"elem":{"schema":{"app_id":{"type":"TypeString","description":"The App ID of the Facebook app used for login.","computed":true},"app_secret":{"type":"TypeString","description":"The App Secret of the Facebook app used for Facebook Login.","computed":true},"app_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `app_secret` value used for Facebook Login.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of Facebook Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"github":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The ID of the GitHub app used for login.","computed":true},"client_secret":{"type":"TypeString","description":"The Client Secret of the GitHub app used for GitHub Login.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for GitHub Login.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of GitHub Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"google":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The OpenID Connect Client ID for the Google web application.","computed":true},"client_secret":{"type":"TypeString","description":"The client secret associated with the Google web application.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for Google Login.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes that requested as part of Google Sign-In authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"issuer":{"type":"TypeString","description":"The OpenID Connect Issuer URI that represents the entity which issues access tokens.","computed":true},"microsoft":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The OAuth 2.0 client ID that was created for the app used for authentication.","computed":true},"client_secret":{"type":"TypeString","description":"The OAuth 2.0 client secret that was created for the app used for authentication.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of Microsoft Account authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"runtime_version":{"type":"TypeString","description":"The RuntimeVersion of the Authentication / Authorization feature in use.","computed":true},"token_refresh_extension_hours":{"type":"TypeFloat","description":"The number of hours after session token expiration that a session token can be used to call the token refresh API.","computed":true},"token_store_enabled":{"type":"TypeBool","description":"Are platform-specific security tokens that are obtained during login flows durably stored?","computed":true},"twitter":{"type":"TypeList","computed":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in.","computed":true},"consumer_secret":{"type":"TypeString","description":"The OAuth 1.0a consumer secret of the Twitter application used for sign-in.","computed":true},"consumer_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in.","computed":true}}}},"unauthenticated_client_action":{"type":"TypeString","description":"The action taken when an unauthenticated client attempts to access the app.","computed":true}}}},"auth_settings_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"active_directory_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_applications":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allowed_audiences":{"type":"TypeList","description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","computed":true,"elem":{"type":"TypeString"}},"allowed_groups":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allowed_identities":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The ID of the Client to use to authenticate with Azure Active Directory.","computed":true},"client_secret_certificate_thumbprint":{"type":"TypeString","description":"The thumbprint of the certificate used for signing purposes.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the client secret of the Client.","computed":true},"jwt_allowed_client_applications":{"type":"TypeList","description":"A list of Allowed Client Applications in the JWT Claim.","computed":true,"elem":{"type":"TypeString"}},"jwt_allowed_groups":{"type":"TypeList","description":"A list of Allowed Groups in the JWT Claim.","computed":true,"elem":{"type":"TypeString"}},"login_parameters":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tenant_auth_endpoint":{"type":"TypeString","description":"The Azure Tenant URI for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`","computed":true},"www_authentication_disabled":{"type":"TypeBool","description":"Is the www-authenticate provider omitted from the request?","computed":true}}}},"apple_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The OpenID Connect Client ID for the Apple web application.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for Apple Login.","computed":true},"login_scopes":{"type":"TypeList","description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of Apple Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","computed":true,"elem":{"type":"TypeString"}}}}},"auth_enabled":{"type":"TypeBool","description":"Is the AuthV2 Settings be enabled.","computed":true},"azure_static_web_app_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The ID of the Client used to authenticate with Azure Static Web App Authentication.","computed":true}}}},"config_file_path":{"type":"TypeString","description":"The path to the App Auth settings.","computed":true},"custom_oidc_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"authorisation_endpoint":{"type":"TypeString","description":"The endpoint to make the Authorisation Request.","computed":true},"certification_uri":{"type":"TypeString","description":"The endpoint that provides the keys necessary to validate the token.","computed":true},"client_credential_method":{"type":"TypeString","description":"The Client Credential Method used. Currently the only supported value is `ClientSecretPost`","computed":true},"client_id":{"type":"TypeString","description":"The ID of the Client used to authenticate with this Custom OIDC.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the secret for this Custom OIDC Client.","computed":true},"issuer_endpoint":{"type":"TypeString","description":"The endpoint that issued the Token.","computed":true},"name":{"type":"TypeString","description":"The name of the Custom OIDC Authentication Provider.","computed":true},"name_claim_type":{"type":"TypeString","description":"The name of the claim that contains the users name.","computed":true},"openid_configuration_endpoint":{"type":"TypeString","description":"The endpoint that contains all the configuration endpoints for this Custom OIDC provider.","computed":true},"scopes":{"type":"TypeList","description":"The list of the scopes that should be requested while authenticating.","computed":true,"elem":{"type":"TypeString"}},"token_endpoint":{"type":"TypeString","description":"The endpoint used to request a Token.","computed":true}}}},"default_provider":{"type":"TypeString","description":"The Default Authentication Provider used when the `unauthenticated_action` is set to `RedirectToLoginPage`.","computed":true},"excluded_paths":{"type":"TypeList","description":"The paths which are excluded from the `unauthenticated_action` when it is set to `RedirectToLoginPage`.","computed":true,"elem":{"type":"TypeString"}},"facebook_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"app_id":{"type":"TypeString","description":"The App ID of the Facebook app used for login.","computed":true},"app_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `app_secret` value used for Facebook Login.","computed":true},"graph_api_version":{"type":"TypeString","description":"The version of the Facebook API to be used while logging in.","computed":true},"login_scopes":{"type":"TypeList","description":"Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"forward_proxy_convention":{"type":"TypeString","description":"The convention used to determine the url of the request made.","computed":true},"forward_proxy_custom_host_header_name":{"type":"TypeString","description":"The name of the header containing the host of the request.","computed":true},"forward_proxy_custom_scheme_header_name":{"type":"TypeString","description":"The name of the header containing the scheme of the request.","computed":true},"github_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The ID of the GitHub app used for login.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for GitHub Login.","computed":true},"login_scopes":{"type":"TypeList","description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"google_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","description":"Specifies a list of Allowed Audiences that will be requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The OpenID Connect Client ID for the Google web application.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for Google Login.","computed":true},"login_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","computed":true,"elem":{"type":"TypeString"}}}}},"http_route_api_prefix":{"type":"TypeString","description":"The prefix that precedes all the authentication and authorisation paths.","computed":true},"login":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_external_redirect_urls":{"type":"TypeList","description":"External URLs that can be redirected to as part of logging in or logging out of the app. This is an advanced setting typically only needed by Windows Store application backends. **Note:** URLs within the current domain are always implicitly allowed.","computed":true,"elem":{"type":"TypeString"}},"cookie_expiration_convention":{"type":"TypeString","computed":true},"cookie_expiration_time":{"type":"TypeString","description":"The time after the request is made when the session cookie will expire.","computed":true},"logout_endpoint":{"type":"TypeString","description":"The endpoint to which logout requests are made.","computed":true},"nonce_expiration_time":{"type":"TypeString","description":"The time after the request is made when the nonce will expire.","computed":true},"preserve_url_fragments_for_logins":{"type":"TypeBool","description":"Are the fragments from the request be preserved after the login request is made.","computed":true},"token_refresh_extension_time":{"type":"TypeFloat","description":"The number of hours after session token expiration that a session token can be used to call the token refresh API.","computed":true},"token_store_enabled":{"type":"TypeBool","description":"Is the Token Store configuration Enabled.","computed":true},"token_store_path":{"type":"TypeString","description":"The directory path in the App Filesystem in which the tokens are stored.","computed":true},"token_store_sas_setting_name":{"type":"TypeString","description":"The name of the app setting which contains the SAS URL of the blob storage containing the tokens.","computed":true},"validate_nonce":{"type":"TypeBool","description":"Is the nonce be validated while completing the login flow.","computed":true}}}},"microsoft_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","description":"Specifies a list of Allowed Audiences that will be requested as part of Microsoft Sign-In authentication.","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The OAuth 2.0 client ID that was created for the app used for authentication.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication.","computed":true},"login_scopes":{"type":"TypeList","description":"The list of Login scopes that will be requested as part of Microsoft Account authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"require_authentication":{"type":"TypeBool","description":"Is the authentication flow used for all requests.","computed":true},"require_https":{"type":"TypeBool","description":"Is HTTPS required on connections?","computed":true},"runtime_version":{"type":"TypeString","description":"The Runtime Version of the Authentication and Authorisation feature of this App.","computed":true},"twitter_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in.","computed":true},"consumer_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in.","computed":true}}}},"unauthenticated_action":{"type":"TypeString","computed":true}}}},"backup":{"type":"TypeList","computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","description":"Is this backup job enabled?","computed":true},"name":{"type":"TypeString","description":"The name of this Backup.","computed":true},"schedule":{"type":"TypeList","computed":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","description":"How often the backup should is executed in multiples of the `frequency_unit`.","computed":true},"frequency_unit":{"type":"TypeString","description":"The unit of time for how often the backup takes place.","computed":true},"keep_at_least_one_backup":{"type":"TypeBool","description":"Does the service keep at least one backup, regardless of age of backup.","computed":true},"last_execution_time":{"type":"TypeString","description":"The time the backup was last attempted.","computed":true},"retention_period_days":{"type":"TypeInt","description":"After how many days are backups deleted.","computed":true},"start_time":{"type":"TypeString","description":"When the schedule should start working in RFC-3339 format.","computed":true}}}},"storage_account_url":{"type":"TypeString","description":"The SAS URL to the container.","computed":true}}}},"builtin_logging_enabled":{"type":"TypeBool","computed":true},"client_certificate_enabled":{"type":"TypeBool","computed":true},"client_certificate_exclusion_paths":{"type":"TypeString","description":"Paths to exclude when using client certificates, separated by ;","computed":true},"client_certificate_mode":{"type":"TypeString","computed":true},"connection_string":{"type":"TypeSet","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The name of this Connection.","computed":true},"type":{"type":"TypeString","description":"The type of database.","computed":true},"value":{"type":"TypeString","description":"The connection string value.","computed":true}}}},"content_share_force_disabled":{"type":"TypeBool","computed":true},"custom_domain_verification_id":{"type":"TypeString","computed":true},"daily_memory_time_quota":{"type":"TypeInt","computed":true},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","computed":true},"ftp_publish_basic_authentication_enabled":{"type":"TypeBool","computed":true},"functions_extension_version":{"type":"TypeString","computed":true},"hosting_environment_id":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"name":{"type":"TypeString","required":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"service_plan_id":{"type":"TypeString","computed":true},"site_config":{"type":"TypeList","computed":true,"elem":{"schema":{"always_on":{"type":"TypeBool","computed":true},"api_definition_url":{"type":"TypeString","computed":true},"api_management_api_id":{"type":"TypeString","computed":true},"app_command_line":{"type":"TypeString","computed":true},"app_scale_limit":{"type":"TypeInt","computed":true},"app_service_logs":{"type":"TypeList","computed":true,"elem":{"schema":{"disk_quota_mb":{"type":"TypeInt","computed":true},"retention_period_days":{"type":"TypeInt","computed":true}}}},"application_insights_connection_string":{"type":"TypeString","computed":true},"application_insights_key":{"type":"TypeString","computed":true},"application_stack":{"type":"TypeList","computed":true,"elem":{"schema":{"dotnet_version":{"type":"TypeString","computed":true},"java_version":{"type":"TypeString","computed":true},"node_version":{"type":"TypeString","computed":true},"powershell_core_version":{"type":"TypeString","computed":true},"use_custom_runtime":{"type":"TypeBool","computed":true},"use_dotnet_isolated_runtime":{"type":"TypeBool","computed":true}}}},"cors":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeList","description":"The list of origins that are allowed to make cross-origin calls.","computed":true,"elem":{"type":"TypeString"}},"support_credentials":{"type":"TypeBool","description":"Are credentials allowed in CORS requests?","computed":true}}}},"default_documents":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"detailed_error_logging_enabled":{"type":"TypeBool","computed":true},"elastic_instance_minimum":{"type":"TypeInt","computed":true},"ftps_state":{"type":"TypeString","computed":true},"health_check_eviction_time_in_min":{"type":"TypeInt","computed":true},"health_check_path":{"type":"TypeString","computed":true},"http2_enabled":{"type":"TypeBool","computed":true},"ip_restriction":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","description":"The action to take.","computed":true},"description":{"type":"TypeString","description":"The description of the ip restriction rule.","computed":true},"headers":{"type":"TypeList","computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","description":"The list of Azure Front Door IDs.","computed":true,"elem":{"type":"TypeString"}},"x_fd_health_probe":{"type":"TypeList","description":"Specifies if a Front Door Health Probe is expected.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_for":{"type":"TypeList","description":"The list of addresses for which matching is applied.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_host":{"type":"TypeList","description":"The list of Hosts for which matching will be applied.","computed":true,"elem":{"type":"TypeString"}}}}},"ip_address":{"type":"TypeString","description":"The CIDR notation of the IP or IP Range to match.","computed":true},"name":{"type":"TypeString","description":"The name used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","description":"The priority value of this `ip_restriction`.","computed":true},"service_tag":{"type":"TypeString","description":"The Service Tag used for this IP Restriction.","computed":true},"virtual_network_subnet_id":{"type":"TypeString","description":"The Virtual Network Subnet ID used for this IP Restriction.","computed":true}}}},"ip_restriction_default_action":{"type":"TypeString","computed":true},"load_balancing_mode":{"type":"TypeString","computed":true},"managed_pipeline_mode":{"type":"TypeString","computed":true},"minimum_tls_version":{"type":"TypeString","computed":true},"pre_warmed_instance_count":{"type":"TypeInt","computed":true},"remote_debugging_enabled":{"type":"TypeBool","computed":true},"remote_debugging_version":{"type":"TypeString","computed":true},"runtime_scale_monitoring_enabled":{"type":"TypeBool","computed":true},"scm_ip_restriction":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","description":"The action to take.","computed":true},"description":{"type":"TypeString","description":"The description of the ip restriction rule.","computed":true},"headers":{"type":"TypeList","computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","description":"The list of Azure Front Door IDs.","computed":true,"elem":{"type":"TypeString"}},"x_fd_health_probe":{"type":"TypeList","description":"Specifies if a Front Door Health Probe is expected.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_for":{"type":"TypeList","description":"The list of addresses for which matching is applied.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_host":{"type":"TypeList","description":"The list of Hosts for which matching will be applied.","computed":true,"elem":{"type":"TypeString"}}}}},"ip_address":{"type":"TypeString","description":"The CIDR notation of the IP or IP Range to match.","computed":true},"name":{"type":"TypeString","description":"The name used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","description":"The priority value of this `ip_restriction`.","computed":true},"service_tag":{"type":"TypeString","description":"The Service Tag used for this IP Restriction.","computed":true},"virtual_network_subnet_id":{"type":"TypeString","description":"The Virtual Network Subnet ID used for this IP Restriction.","computed":true}}}},"scm_ip_restriction_default_action":{"type":"TypeString","computed":true},"scm_minimum_tls_version":{"type":"TypeString","computed":true},"scm_type":{"type":"TypeString","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","computed":true},"use_32_bit_worker":{"type":"TypeBool","computed":true},"vnet_route_all_enabled":{"type":"TypeBool","computed":true},"websockets_enabled":{"type":"TypeBool","computed":true},"windows_fx_version":{"type":"TypeString","computed":true},"worker_count":{"type":"TypeInt","computed":true}}}},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The Site Credentials Username used for publishing.","computed":true},"password":{"type":"TypeString","description":"The Site Credentials Password used for publishing.","computed":true}}}},"sticky_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"app_setting_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"connection_string_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"storage_account_access_key":{"type":"TypeString","computed":true},"storage_account_name":{"type":"TypeString","computed":true},"storage_key_vault_secret_id":{"type":"TypeString","description":"The Key Vault Secret ID, including version, that contains the Connection String used to connect to the storage account for this Function App.","computed":true},"storage_uses_managed_identity":{"type":"TypeBool","computed":true},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"virtual_network_subnet_id":{"type":"TypeString","computed":true},"webdeploy_publish_basic_authentication_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"read":10}},"azurerm_windows_web_app":{"schema":{"app_settings":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"auth_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"active_directory":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","description":"The list of Allowed audience values considered when validating JWTs issued by Azure Active Directory.","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The ID of the Client to use to authenticate with Azure Active Directory.","computed":true},"client_secret":{"type":"TypeString","description":"The Client Secret for the Client ID.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the client secret of the Client.","computed":true}}}},"additional_login_parameters":{"type":"TypeMap","description":"The map of Login Parameters sent to the OpenID Connect authorization endpoint when a user logs in.","computed":true,"elem":{"type":"TypeString"}},"allowed_external_redirect_urls":{"type":"TypeList","description":"Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Web App.","computed":true,"elem":{"type":"TypeString"}},"default_provider":{"type":"TypeString","description":"The default authentication provider used when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`.","computed":true},"enabled":{"type":"TypeBool","description":"Is the Authentication / Authorization feature enabled?","computed":true},"facebook":{"type":"TypeList","computed":true,"elem":{"schema":{"app_id":{"type":"TypeString","description":"The App ID of the Facebook app used for login.","computed":true},"app_secret":{"type":"TypeString","description":"The App Secret of the Facebook app used for Facebook Login.","computed":true},"app_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `app_secret` value used for Facebook Login.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of Facebook Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"github":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The ID of the GitHub app used for login.","computed":true},"client_secret":{"type":"TypeString","description":"The Client Secret of the GitHub app used for GitHub Login.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for GitHub Login.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of GitHub Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"google":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The OpenID Connect Client ID for the Google web application.","computed":true},"client_secret":{"type":"TypeString","description":"The client secret associated with the Google web application.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for Google Login.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes that requested as part of Google Sign-In authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"issuer":{"type":"TypeString","description":"The OpenID Connect Issuer URI that represents the entity which issues access tokens.","computed":true},"microsoft":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The OAuth 2.0 client ID that was created for the app used for authentication.","computed":true},"client_secret":{"type":"TypeString","description":"The OAuth 2.0 client secret that was created for the app used for authentication.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication.","computed":true},"oauth_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of Microsoft Account authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"runtime_version":{"type":"TypeString","description":"The RuntimeVersion of the Authentication / Authorization feature in use.","computed":true},"token_refresh_extension_hours":{"type":"TypeFloat","description":"The number of hours after session token expiration that a session token can be used to call the token refresh API.","computed":true},"token_store_enabled":{"type":"TypeBool","description":"Are platform-specific security tokens that are obtained during login flows durably stored?","computed":true},"twitter":{"type":"TypeList","computed":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in.","computed":true},"consumer_secret":{"type":"TypeString","description":"The OAuth 1.0a consumer secret of the Twitter application used for sign-in.","computed":true},"consumer_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in.","computed":true}}}},"unauthenticated_client_action":{"type":"TypeString","description":"The action taken when an unauthenticated client attempts to access the app.","computed":true}}}},"auth_settings_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"active_directory_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_applications":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allowed_audiences":{"type":"TypeList","description":"Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.","computed":true,"elem":{"type":"TypeString"}},"allowed_groups":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"allowed_identities":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The ID of the Client to use to authenticate with Azure Active Directory.","computed":true},"client_secret_certificate_thumbprint":{"type":"TypeString","description":"The thumbprint of the certificate used for signing purposes.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the client secret of the Client.","computed":true},"jwt_allowed_client_applications":{"type":"TypeList","description":"A list of Allowed Client Applications in the JWT Claim.","computed":true,"elem":{"type":"TypeString"}},"jwt_allowed_groups":{"type":"TypeList","description":"A list of Allowed Groups in the JWT Claim.","computed":true,"elem":{"type":"TypeString"}},"login_parameters":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"tenant_auth_endpoint":{"type":"TypeString","description":"The Azure Tenant URI for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`","computed":true},"www_authentication_disabled":{"type":"TypeBool","description":"Is the www-authenticate provider omitted from the request?","computed":true}}}},"apple_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The OpenID Connect Client ID for the Apple web application.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for Apple Login.","computed":true},"login_scopes":{"type":"TypeList","description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of Apple Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","computed":true,"elem":{"type":"TypeString"}}}}},"auth_enabled":{"type":"TypeBool","description":"Is the AuthV2 Settings be enabled.","computed":true},"azure_static_web_app_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The ID of the Client used to authenticate with Azure Static Web App Authentication.","computed":true}}}},"config_file_path":{"type":"TypeString","description":"The path to the App Auth settings.","computed":true},"custom_oidc_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"authorisation_endpoint":{"type":"TypeString","description":"The endpoint to make the Authorisation Request.","computed":true},"certification_uri":{"type":"TypeString","description":"The endpoint that provides the keys necessary to validate the token.","computed":true},"client_credential_method":{"type":"TypeString","description":"The Client Credential Method used. Currently the only supported value is `ClientSecretPost`","computed":true},"client_id":{"type":"TypeString","description":"The ID of the Client used to authenticate with this Custom OIDC.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The App Setting name that contains the secret for this Custom OIDC Client.","computed":true},"issuer_endpoint":{"type":"TypeString","description":"The endpoint that issued the Token.","computed":true},"name":{"type":"TypeString","description":"The name of the Custom OIDC Authentication Provider.","computed":true},"name_claim_type":{"type":"TypeString","description":"The name of the claim that contains the users name.","computed":true},"openid_configuration_endpoint":{"type":"TypeString","description":"The endpoint that contains all the configuration endpoints for this Custom OIDC provider.","computed":true},"scopes":{"type":"TypeList","description":"The list of the scopes that should be requested while authenticating.","computed":true,"elem":{"type":"TypeString"}},"token_endpoint":{"type":"TypeString","description":"The endpoint used to request a Token.","computed":true}}}},"default_provider":{"type":"TypeString","description":"The Default Authentication Provider used when the `unauthenticated_action` is set to `RedirectToLoginPage`.","computed":true},"excluded_paths":{"type":"TypeList","description":"The paths which are excluded from the `unauthenticated_action` when it is set to `RedirectToLoginPage`.","computed":true,"elem":{"type":"TypeString"}},"facebook_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"app_id":{"type":"TypeString","description":"The App ID of the Facebook app used for login.","computed":true},"app_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `app_secret` value used for Facebook Login.","computed":true},"graph_api_version":{"type":"TypeString","description":"The version of the Facebook API to be used while logging in.","computed":true},"login_scopes":{"type":"TypeList","description":"Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"forward_proxy_convention":{"type":"TypeString","description":"The convention used to determine the url of the request made.","computed":true},"forward_proxy_custom_host_header_name":{"type":"TypeString","description":"The name of the header containing the host of the request.","computed":true},"forward_proxy_custom_scheme_header_name":{"type":"TypeString","description":"The name of the header containing the scheme of the request.","computed":true},"github_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"client_id":{"type":"TypeString","description":"The ID of the GitHub app used for login.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for GitHub Login.","computed":true},"login_scopes":{"type":"TypeList","description":"Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"google_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","description":"Specifies a list of Allowed Audiences that will be requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The OpenID Connect Client ID for the Google web application.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the `client_secret` value used for Google Login.","computed":true},"login_scopes":{"type":"TypeList","description":"The list of OAuth 2.0 scopes requested as part of Google Sign-In authentication. If not specified, \"openid\", \"profile\", and \"email\" are used as default scopes.","computed":true,"elem":{"type":"TypeString"}}}}},"http_route_api_prefix":{"type":"TypeString","description":"The prefix that precedes all the authentication and authorisation paths.","computed":true},"login":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_external_redirect_urls":{"type":"TypeList","description":"External URLs that can be redirected to as part of logging in or logging out of the app. This is an advanced setting typically only needed by Windows Store application backends. **Note:** URLs within the current domain are always implicitly allowed.","computed":true,"elem":{"type":"TypeString"}},"cookie_expiration_convention":{"type":"TypeString","computed":true},"cookie_expiration_time":{"type":"TypeString","description":"The time after the request is made when the session cookie will expire.","computed":true},"logout_endpoint":{"type":"TypeString","description":"The endpoint to which logout requests are made.","computed":true},"nonce_expiration_time":{"type":"TypeString","description":"The time after the request is made when the nonce will expire.","computed":true},"preserve_url_fragments_for_logins":{"type":"TypeBool","description":"Are the fragments from the request be preserved after the login request is made.","computed":true},"token_refresh_extension_time":{"type":"TypeFloat","description":"The number of hours after session token expiration that a session token can be used to call the token refresh API.","computed":true},"token_store_enabled":{"type":"TypeBool","description":"Is the Token Store configuration Enabled.","computed":true},"token_store_path":{"type":"TypeString","description":"The directory path in the App Filesystem in which the tokens are stored.","computed":true},"token_store_sas_setting_name":{"type":"TypeString","description":"The name of the app setting which contains the SAS URL of the blob storage containing the tokens.","computed":true},"validate_nonce":{"type":"TypeBool","description":"Is the nonce be validated while completing the login flow.","computed":true}}}},"microsoft_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_audiences":{"type":"TypeList","description":"Specifies a list of Allowed Audiences that will be requested as part of Microsoft Sign-In authentication.","computed":true,"elem":{"type":"TypeString"}},"client_id":{"type":"TypeString","description":"The OAuth 2.0 client ID that was created for the app used for authentication.","computed":true},"client_secret_setting_name":{"type":"TypeString","description":"The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication.","computed":true},"login_scopes":{"type":"TypeList","description":"The list of Login scopes that will be requested as part of Microsoft Account authentication.","computed":true,"elem":{"type":"TypeString"}}}}},"require_authentication":{"type":"TypeBool","description":"Is the authentication flow used for all requests.","computed":true},"require_https":{"type":"TypeBool","description":"Is HTTPS required on connections?","computed":true},"runtime_version":{"type":"TypeString","description":"The Runtime Version of the Authentication and Authorisation feature of this App.","computed":true},"twitter_v2":{"type":"TypeList","computed":true,"elem":{"schema":{"consumer_key":{"type":"TypeString","description":"The OAuth 1.0a consumer key of the Twitter application used for sign-in.","computed":true},"consumer_secret_setting_name":{"type":"TypeString","description":"The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in.","computed":true}}}},"unauthenticated_action":{"type":"TypeString","computed":true}}}},"backup":{"type":"TypeList","computed":true,"elem":{"schema":{"enabled":{"type":"TypeBool","description":"Is this backup job enabled?","computed":true},"name":{"type":"TypeString","description":"The name of this Backup.","computed":true},"schedule":{"type":"TypeList","computed":true,"elem":{"schema":{"frequency_interval":{"type":"TypeInt","description":"How often the backup should is executed in multiples of the `frequency_unit`.","computed":true},"frequency_unit":{"type":"TypeString","description":"The unit of time for how often the backup takes place.","computed":true},"keep_at_least_one_backup":{"type":"TypeBool","description":"Does the service keep at least one backup, regardless of age of backup.","computed":true},"last_execution_time":{"type":"TypeString","description":"The time the backup was last attempted.","computed":true},"retention_period_days":{"type":"TypeInt","description":"After how many days are backups deleted.","computed":true},"start_time":{"type":"TypeString","description":"When the schedule should start working in RFC-3339 format.","computed":true}}}},"storage_account_url":{"type":"TypeString","description":"The SAS URL to the container.","computed":true}}}},"client_affinity_enabled":{"type":"TypeBool","computed":true},"client_certificate_enabled":{"type":"TypeBool","computed":true},"client_certificate_exclusion_paths":{"type":"TypeString","description":"Paths to exclude when using client certificates, separated by ;","computed":true},"client_certificate_mode":{"type":"TypeString","computed":true},"connection_string":{"type":"TypeSet","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The name of this Connection.","computed":true},"type":{"type":"TypeString","description":"The type of database.","computed":true},"value":{"type":"TypeString","description":"The connection string value.","computed":true}}}},"custom_domain_verification_id":{"type":"TypeString","computed":true},"default_hostname":{"type":"TypeString","computed":true},"enabled":{"type":"TypeBool","computed":true},"ftp_publish_basic_authentication_enabled":{"type":"TypeBool","computed":true},"hosting_environment_id":{"type":"TypeString","computed":true},"https_only":{"type":"TypeBool","computed":true},"identity":{"type":"TypeList","computed":true,"elem":{"schema":{"identity_ids":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"principal_id":{"type":"TypeString","computed":true},"tenant_id":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"kind":{"type":"TypeString","computed":true},"location":{"type":"TypeString","computed":true},"logs":{"type":"TypeList","computed":true,"elem":{"schema":{"application_logs":{"type":"TypeList","computed":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","computed":true,"elem":{"schema":{"level":{"type":"TypeString","computed":true},"retention_in_days":{"type":"TypeInt","computed":true},"sas_url":{"type":"TypeString","computed":true}}}},"file_system_level":{"type":"TypeString","computed":true}}}},"detailed_error_messages":{"type":"TypeBool","computed":true},"failed_request_tracing":{"type":"TypeBool","computed":true},"http_logs":{"type":"TypeList","computed":true,"elem":{"schema":{"azure_blob_storage":{"type":"TypeList","computed":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","computed":true},"sas_url":{"type":"TypeString","computed":true}}}},"file_system":{"type":"TypeList","computed":true,"elem":{"schema":{"retention_in_days":{"type":"TypeInt","computed":true},"retention_in_mb":{"type":"TypeInt","computed":true}}}}}}}}}},"name":{"type":"TypeString","required":true},"outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"outbound_ip_addresses":{"type":"TypeString","computed":true},"possible_outbound_ip_address_list":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"possible_outbound_ip_addresses":{"type":"TypeString","computed":true},"public_network_access_enabled":{"type":"TypeBool","computed":true},"resource_group_name":{"type":"TypeString","required":true},"service_plan_id":{"type":"TypeString","computed":true},"site_config":{"type":"TypeList","computed":true,"elem":{"schema":{"always_on":{"type":"TypeBool","computed":true},"api_definition_url":{"type":"TypeString","computed":true},"api_management_api_id":{"type":"TypeString","computed":true},"app_command_line":{"type":"TypeString","computed":true},"application_stack":{"type":"TypeList","computed":true,"elem":{"schema":{"current_stack":{"type":"TypeString","computed":true},"docker_image_name":{"type":"TypeString","computed":true},"docker_registry_password":{"type":"TypeString","computed":true},"docker_registry_url":{"type":"TypeString","computed":true},"docker_registry_username":{"type":"TypeString","computed":true},"dotnet_core_version":{"type":"TypeString","computed":true},"dotnet_version":{"type":"TypeString","computed":true},"java_container":{"type":"TypeString","computed":true},"java_container_version":{"type":"TypeString","computed":true},"java_embedded_server_enabled":{"type":"TypeBool","computed":true},"java_version":{"type":"TypeString","computed":true},"node_version":{"type":"TypeString","computed":true},"php_version":{"type":"TypeString","computed":true},"python":{"type":"TypeBool","computed":true},"python_version":{"type":"TypeString","computed":true},"tomcat_version":{"type":"TypeString","computed":true}}}},"auto_heal_setting":{"type":"TypeList","computed":true,"elem":{"schema":{"action":{"type":"TypeList","computed":true,"elem":{"schema":{"action_type":{"type":"TypeString","computed":true},"custom_action":{"type":"TypeList","computed":true,"elem":{"schema":{"executable":{"type":"TypeString","computed":true},"parameters":{"type":"TypeString","computed":true}}}},"minimum_process_execution_time":{"type":"TypeString","computed":true}}}},"trigger":{"type":"TypeList","computed":true,"elem":{"schema":{"private_memory_kb":{"type":"TypeInt","computed":true},"requests":{"type":"TypeList","computed":true,"elem":{"schema":{"count":{"type":"TypeInt","computed":true},"interval":{"type":"TypeString","computed":true}}}},"slow_request":{"type":"TypeList","computed":true,"elem":{"schema":{"count":{"type":"TypeInt","computed":true},"interval":{"type":"TypeString","computed":true},"time_taken":{"type":"TypeString","computed":true}}}},"slow_request_with_path":{"type":"TypeList","computed":true,"elem":{"schema":{"count":{"type":"TypeInt","computed":true},"interval":{"type":"TypeString","computed":true},"path":{"type":"TypeString","computed":true},"time_taken":{"type":"TypeString","computed":true}}}},"status_code":{"type":"TypeSet","computed":true,"elem":{"schema":{"count":{"type":"TypeInt","computed":true},"interval":{"type":"TypeString","computed":true},"path":{"type":"TypeString","computed":true},"status_code_range":{"type":"TypeString","computed":true},"sub_status":{"type":"TypeInt","computed":true},"win32_status_code":{"type":"TypeInt","computed":true}}}}}}}}}},"container_registry_managed_identity_client_id":{"type":"TypeString","computed":true},"container_registry_use_managed_identity":{"type":"TypeBool","computed":true},"cors":{"type":"TypeList","computed":true,"elem":{"schema":{"allowed_origins":{"type":"TypeList","description":"The list of origins that are allowed to make cross-origin calls.","computed":true,"elem":{"type":"TypeString"}},"support_credentials":{"type":"TypeBool","description":"Are credentials allowed in CORS requests?","computed":true}}}},"default_documents":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"detailed_error_logging_enabled":{"type":"TypeBool","computed":true},"ftps_state":{"type":"TypeString","computed":true},"handler_mapping":{"type":"TypeSet","computed":true,"elem":{"schema":{"arguments":{"type":"TypeString","computed":true},"extension":{"type":"TypeString","computed":true},"script_processor_path":{"type":"TypeString","computed":true}}}},"health_check_eviction_time_in_min":{"type":"TypeInt","computed":true},"health_check_path":{"type":"TypeString","computed":true},"http2_enabled":{"type":"TypeBool","computed":true},"ip_restriction":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","description":"The action to take.","computed":true},"description":{"type":"TypeString","description":"The description of the ip restriction rule.","computed":true},"headers":{"type":"TypeList","computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","description":"The list of Azure Front Door IDs.","computed":true,"elem":{"type":"TypeString"}},"x_fd_health_probe":{"type":"TypeList","description":"Specifies if a Front Door Health Probe is expected.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_for":{"type":"TypeList","description":"The list of addresses for which matching is applied.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_host":{"type":"TypeList","description":"The list of Hosts for which matching will be applied.","computed":true,"elem":{"type":"TypeString"}}}}},"ip_address":{"type":"TypeString","description":"The CIDR notation of the IP or IP Range to match.","computed":true},"name":{"type":"TypeString","description":"The name used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","description":"The priority value of this `ip_restriction`.","computed":true},"service_tag":{"type":"TypeString","description":"The Service Tag used for this IP Restriction.","computed":true},"virtual_network_subnet_id":{"type":"TypeString","description":"The Virtual Network Subnet ID used for this IP Restriction.","computed":true}}}},"ip_restriction_default_action":{"type":"TypeString","computed":true},"load_balancing_mode":{"type":"TypeString","computed":true},"local_mysql_enabled":{"type":"TypeBool","computed":true},"managed_pipeline_mode":{"type":"TypeString","computed":true},"minimum_tls_version":{"type":"TypeString","computed":true},"remote_debugging_enabled":{"type":"TypeBool","computed":true},"remote_debugging_version":{"type":"TypeString","computed":true},"scm_ip_restriction":{"type":"TypeList","optional":true,"computed":true,"elem":{"schema":{"action":{"type":"TypeString","description":"The action to take.","computed":true},"description":{"type":"TypeString","description":"The description of the ip restriction rule.","computed":true},"headers":{"type":"TypeList","computed":true,"elem":{"schema":{"x_azure_fdid":{"type":"TypeList","description":"The list of Azure Front Door IDs.","computed":true,"elem":{"type":"TypeString"}},"x_fd_health_probe":{"type":"TypeList","description":"Specifies if a Front Door Health Probe is expected.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_for":{"type":"TypeList","description":"The list of addresses for which matching is applied.","computed":true,"elem":{"type":"TypeString"}},"x_forwarded_host":{"type":"TypeList","description":"The list of Hosts for which matching will be applied.","computed":true,"elem":{"type":"TypeString"}}}}},"ip_address":{"type":"TypeString","description":"The CIDR notation of the IP or IP Range to match.","computed":true},"name":{"type":"TypeString","description":"The name used for this `ip_restriction`.","computed":true},"priority":{"type":"TypeInt","description":"The priority value of this `ip_restriction`.","computed":true},"service_tag":{"type":"TypeString","description":"The Service Tag used for this IP Restriction.","computed":true},"virtual_network_subnet_id":{"type":"TypeString","description":"The Virtual Network Subnet ID used for this IP Restriction.","computed":true}}}},"scm_ip_restriction_default_action":{"type":"TypeString","computed":true},"scm_minimum_tls_version":{"type":"TypeString","computed":true},"scm_type":{"type":"TypeString","computed":true},"scm_use_main_ip_restriction":{"type":"TypeBool","computed":true},"use_32_bit_worker":{"type":"TypeBool","computed":true},"virtual_application":{"type":"TypeList","computed":true,"elem":{"schema":{"physical_path":{"type":"TypeString","computed":true},"preload":{"type":"TypeBool","computed":true},"virtual_directory":{"type":"TypeList","computed":true,"elem":{"schema":{"physical_path":{"type":"TypeString","computed":true},"virtual_path":{"type":"TypeString","computed":true}}}},"virtual_path":{"type":"TypeString","computed":true}}}},"vnet_route_all_enabled":{"type":"TypeBool","computed":true},"websockets_enabled":{"type":"TypeBool","computed":true},"windows_fx_version":{"type":"TypeString","computed":true},"worker_count":{"type":"TypeInt","computed":true}}}},"site_credential":{"type":"TypeList","computed":true,"elem":{"schema":{"name":{"type":"TypeString","description":"The Site Credentials Username used for publishing.","computed":true},"password":{"type":"TypeString","description":"The Site Credentials Password used for publishing.","computed":true}}}},"sticky_settings":{"type":"TypeList","computed":true,"elem":{"schema":{"app_setting_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}},"connection_string_names":{"type":"TypeList","computed":true,"elem":{"type":"TypeString"}}}}},"storage_account":{"type":"TypeList","computed":true,"elem":{"schema":{"access_key":{"type":"TypeString","computed":true},"account_name":{"type":"TypeString","computed":true},"mount_path":{"type":"TypeString","computed":true},"name":{"type":"TypeString","computed":true},"share_name":{"type":"TypeString","computed":true},"type":{"type":"TypeString","computed":true}}}},"tags":{"type":"TypeMap","computed":true,"elem":{"type":"TypeString"}},"virtual_network_subnet_id":{"type":"TypeString","computed":true},"webdeploy_publish_basic_authentication_enabled":{"type":"TypeBool","computed":true}},"timeouts":{"read":10}}}}} diff --git a/.teamcity/components/generated/services.kt b/.teamcity/components/generated/services.kt index 7ccb891219106..ad0bae3b4be45 100644 --- a/.teamcity/components/generated/services.kt +++ b/.teamcity/components/generated/services.kt @@ -47,7 +47,6 @@ var services = mapOf( "devcenter" to "Dev Center", "devtestlabs" to "Dev Test", "digitaltwins" to "Digital Twins", - "disks" to "Disks", "domainservices" to "DomainServices", "elastic" to "Elastic", "elasticsan" to "ElasticSan", @@ -66,14 +65,12 @@ var services = mapOf( "iothub" to "IoT Hub", "keyvault" to "KeyVault", "kusto" to "Kusto", - "labservice" to "Lab Service", "legacy" to "Legacy", "lighthouse" to "Lighthouse", "loadbalancer" to "Load Balancer", "loadtestservice" to "LoadTestService", "loganalytics" to "Log Analytics", "logic" to "Logic", - "logz" to "Logz", "machinelearning" to "Machine Learning", "maintenance" to "Maintenance", "managedapplications" to "Managed Applications", @@ -81,8 +78,6 @@ var services = mapOf( "managedidentity" to "ManagedIdentity", "managementgroup" to "Management Group", "maps" to "Maps", - "mariadb" to "MariaDB", - "media" to "Media", "mssql" to "Microsoft SQL Server / Azure SQL", "mssqlmanagedinstance" to "Microsoft SQL Server Managed Instances", "mixedreality" to "Mixed Reality", @@ -110,7 +105,6 @@ var services = mapOf( "redisenterprise" to "Redis Enterprise", "relay" to "Relay", "resource" to "Resources", - "sql" to "SQL", "search" to "Search", "securitycenter" to "Security Center", "sentinel" to "Sentinel", @@ -128,10 +122,8 @@ var services = mapOf( "subscription" to "Subscription", "synapse" to "Synapse", "systemcentervirtualmachinemanager" to "System Center Virtual Machine Manager", - "iottimeseriesinsights" to "Time Series Insights", "trafficmanager" to "Traffic Manager", "vmware" to "VMware", - "videoanalyzer" to "Video Analyzer", "voiceservices" to "Voice Services", "web" to "Web", "workloads" to "Workloads" diff --git a/.teamcity/components/settings.kt b/.teamcity/components/settings.kt index 9c72211aef0f3..1a8f41454b798 100644 --- a/.teamcity/components/settings.kt +++ b/.teamcity/components/settings.kt @@ -66,7 +66,7 @@ var serviceTestConfigurationOverrides = mapOf( // Container App Managed Environments are limited to 20 per location, using 10 as they can take some time to clear // Enable rotation test to mitigate resource burden in a single region - "containerapps" to testConfiguration(parallelism = 10, locationOverride = LocationConfiguration("eastus2","westus2","southcentralus", true)), + "containerapps" to testConfiguration(parallelism = 10, locationOverride = LocationConfiguration("eastus2","westus2","northcentralus", true)), // The AKS API has a low rate limit "containers" to testConfiguration(parallelism = 5, locationOverride = LocationConfiguration("eastus","westeurope","eastus2", false), timeout = 18), diff --git a/CHANGELOG-v3.md b/CHANGELOG-v3.md index 795f8756818f2..6174423116a69 100644 --- a/CHANGELOG-v3.md +++ b/CHANGELOG-v3.md @@ -1,3 +1,1867 @@ +## 3.116.0 (August 16, 2024) + +DEPRECATIONS: + +All Azure Kubernetes Service (AKS) properties related to preview features are deprecated since they will not be available in a stable API. Please see https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/4.0-upgrade-guide#aks-migration-to-stable-api for more details ([#26863](https://github.com/hashicorp/terraform-provider-azurerm/issues/26863)) + +FEATURES: + +* New Resource: `azurerm_ai_services` ([#26008](https://github.com/hashicorp/terraform-provider-azurerm/issues/26008)) +* New Resource: `azurerm_communication_service_email_domain_association` ([#26432](https://github.com/hashicorp/terraform-provider-azurerm/issues/26432)) +* New Resource: `azurerm_dev_center_project_environment_type` ([#26941](https://github.com/hashicorp/terraform-provider-azurerm/issues/26941)) +* New Resource: `azurerm_extended_location_custom_location` ([#24267](https://github.com/hashicorp/terraform-provider-azurerm/issues/24267)) +* New Resource: `azurerm_postgresql_flexible_server_virtual_endpoint` ([#26708](https://github.com/hashicorp/terraform-provider-azurerm/issues/26708)) + +ENHANCEMENTS: + +* `notificationhub` - updating to use version `2023-09-01` ([#26528](https://github.com/hashicorp/terraform-provider-azurerm/issues/26528)) +* `azurerm_api_management_api` - update validation of `path` to allow single character strings ([#26922](https://github.com/hashicorp/terraform-provider-azurerm/issues/26922)) +* `azurerm_cosmosdb_account` - add support for the property `burst_capacity_enabled` ([#26986](https://github.com/hashicorp/terraform-provider-azurerm/issues/26986)) +* `azurerm_linux_function_app` - add support for `vnet_image_pull_enabled` property in 4.0 ([#27001](https://github.com/hashicorp/terraform-provider-azurerm/issues/27001)) +* `azurerm_linux_function_app_slot` - add support for `vnet_image_pull_enabled` property in 4.0 ([#27001](https://github.com/hashicorp/terraform-provider-azurerm/issues/27001)) +* `azurerm_logic_app_standard` - add support for `v8.0` in `site_config.dotnet_framework_version` ([#26983](https://github.com/hashicorp/terraform-provider-azurerm/issues/26983)) +* `azurerm_management_group_policy_assignment` - remove length restriction on name ([#27055](https://github.com/hashicorp/terraform-provider-azurerm/issues/27055)) +* `azurerm_recovery_services_vault` - add support for the `identity` block ([#26254](https://github.com/hashicorp/terraform-provider-azurerm/issues/26254)) +* `azurerm_web_application_firewall_policy` - add support for the `js_challenge_cookie_expiration_in_minutes` property ([#26878](https://github.com/hashicorp/terraform-provider-azurerm/issues/26878)) +* `azurerm_windows_function_app` - add support for `vnet_image_pull_enabled` property in 4.0 ([#27001](https://github.com/hashicorp/terraform-provider-azurerm/issues/27001)) +* `azurerm_windows_function_app_slot` - add support for `vnet_image_pull_enabled` property in 4.0 ([#27001](https://github.com/hashicorp/terraform-provider-azurerm/issues/27001)) + +BUG FIXES: + +* Data Source: `azurerm_storage_account` - add `default_share_level_permission` to the `azure_files_authentication` to prevent invalid address errors ([#26996](https://github.com/hashicorp/terraform-provider-azurerm/issues/26996)) +* Data Source: `azurerm_search_service` - expose the `tags` property ([#26978](https://github.com/hashicorp/terraform-provider-azurerm/issues/26978)) +* Data Source: `azurerm_virtual_machine` - populate missing `power_state` ([#26991](https://github.com/hashicorp/terraform-provider-azurerm/issues/26991)) +* Data Source: `azurerm_virtual_machine_scale_set` - populate missing `power_state` ([#26991](https://github.com/hashicorp/terraform-provider-azurerm/issues/26991)) +* `azurerm_api_management_api_schema` - correctly unmarshal `definition` and `components` ([#26531](https://github.com/hashicorp/terraform-provider-azurerm/issues/26531)) +* `azurerm_cdn_frontdoor_secret` - fix issue where `expiration_date` was being set into the parent block ([#26982](https://github.com/hashicorp/terraform-provider-azurerm/issues/26982)) +* `azurerm_container_app_environment` - fix diff suppress on `infrastructure_resource_group_name` ([#27007](https://github.com/hashicorp/terraform-provider-azurerm/issues/27007)) +* `azurerm_express_route_connection` - prevent sending `private_link_fast_path_enabled` in the payload if it hasn't been explicitly set ([#26928](https://github.com/hashicorp/terraform-provider-azurerm/issues/26928)) +* `azurerm_machine_learning_workspace` - `serverless_compute` can now be updated ([#26940](https://github.com/hashicorp/terraform-provider-azurerm/issues/26940)) +* `azurerm_mssql_database` - fix issue where the database cannot be upgraded to use serverless due to the behaviour of the `license_type` field ([#26850](https://github.com/hashicorp/terraform-provider-azurerm/issues/26850)) +* `azurerm_mssql_database` - prevent error when creating `Free` edition by setting `long_term_retention_policy` and `short_term_retention_policy` as empty ([#26894](https://github.com/hashicorp/terraform-provider-azurerm/issues/26894)) +* `azurerm_nginx_deployment` - omit `capacity` when creating deployments with a basic plan ([#26223](https://github.com/hashicorp/terraform-provider-azurerm/issues/26223)) +* `azurerm_role_management_policy` - prevent panic when updating `activation_rules.approval_stage` ([#26800](https://github.com/hashicorp/terraform-provider-azurerm/issues/26800)) +* `azurerm_sentinel_threat_intelligence_indicator` - prevent panic when importing this resource ([#26976](https://github.com/hashicorp/terraform-provider-azurerm/issues/26976)) +* `azurerm_servicebus_namespace` - fix panic reading encryption with versionless ids ([#27060](https://github.com/hashicorp/terraform-provider-azurerm/issues/27060)) +* `azurerm_synapse_spark_pool` - prevent plan diff due to API behaviour by setting `node_count` as Computed ([#26953](https://github.com/hashicorp/terraform-provider-azurerm/issues/26953)) +* `azurerm_virtual_network_gateway_connection` - fix issue where `ingress_nat_rule_ids` was updating the egress rules on updates ([#27022](https://github.com/hashicorp/terraform-provider-azurerm/issues/27022)) + +## 3.115.0 (August 09, 2024) + +ENHANCEMENTS: + +* `cosmosdb` - updating to use version `2024-05-15` ([#26758](https://github.com/hashicorp/terraform-provider-azurerm/issues/26758)) +* `healthcare` - updating to use version `2024-03-31` ([#26699](https://github.com/hashicorp/terraform-provider-azurerm/issues/26699)) +* `redis` - updating to use version `2024-03-01` ([#26932](https://github.com/hashicorp/terraform-provider-azurerm/issues/26932)) +* `azurerm_cosmosdb_account` - avoid infinite diff to `default_identity_type` for legacy resources where an empty string is returned by the RP ([#26525](https://github.com/hashicorp/terraform-provider-azurerm/issues/26525)) +* `azurerm_linux_virtual_machine_scale_set` - add support for the `action` property in the `automatic_instance_repair` block ([#26227](https://github.com/hashicorp/terraform-provider-azurerm/issues/26227)) +* `azurerm_log_analytics_saved_search` - update the regex for the `function_parameters` property to support more paramters ([#26701](https://github.com/hashicorp/terraform-provider-azurerm/issues/26701)) +* `azurerm_monitor_data_collection_rule` - update `performance_counter.x.sampling_frequency_in_seconds` range `1` to `1800` ([#26898](https://github.com/hashicorp/terraform-provider-azurerm/issues/26898)) +* `azurerm_orchestrated_virtual_machine_scale_set` - add support for the `action` property in the `automatic_instance_repair` block ([#26227](https://github.com/hashicorp/terraform-provider-azurerm/issues/26227)) +* `azurerm_security_center_storage_defender` - add support for the property `scan_results_event_grid_topic_id` ([#26599](https://github.com/hashicorp/terraform-provider-azurerm/issues/26599)) +* `azurerm_storage_account` - add support for the property `default_share_level_permission` in the `azure_files_authentication` block ([#26924](https://github.com/hashicorp/terraform-provider-azurerm/issues/26924)) +* `azurerm_web_application_firewall_policy` - `excluded_rule_set.0.type` supports `Microsoft_BotManagerRuleSet` ([#26903](https://github.com/hashicorp/terraform-provider-azurerm/issues/26903)) +* `azurerm_windows_virtual_machine_scale_set` - add support for the `action` property in the `automatic_instance_repair` block ([#26227](https://github.com/hashicorp/terraform-provider-azurerm/issues/26227)) + +BUG FIXES: + +* `azurerm_container_group` - retrieve and set `storage_account_key` in the payload when updating the resource ([#26640](https://github.com/hashicorp/terraform-provider-azurerm/issues/26640)) +* `azurerm_key_vault_managed_hardware_security_module_role_assignment` - fixed a crash in error messages ([#26972](https://github.com/hashicorp/terraform-provider-azurerm/issues/26972)) +* `azurerm_kubernetes_cluster` - allow an empty list for `dns_zone_ids` in the `web_app_routing` block ([#26747](https://github.com/hashicorp/terraform-provider-azurerm/issues/26747)) +* `azurerm_storage_share_file` - fix a bug when encoding the MD5 hash for the `content_md5` property ([#25715](https://github.com/hashicorp/terraform-provider-azurerm/issues/25715)) + +## 3.114.0 (August 01, 2024) + +UPGRADE NOTES: +* **4.0 Beta:** This release includes a new feature-flag to opt-into the 4.0 Beta - which (when enabled) introduces a number of behavioural changes, field renames and removes some older deprecated resources and data sources. Please read the disclaimers carefully that are outlined in our [guide on how to opt-into the 4.0 Beta](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/4.0-beta) before enabling this, as this will cause irreversible changes to your state. The 4.0 Beta is still a work-in-progress at this time and the changes listed in the [4.0 Upgrade Guide](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/4.0-upgrade-guide) may change. We're interested to hear your feedback which can be provided by following [this link](https://github.com/terraform-providers/terraform-provider-azurerm/issues/new?template=Beta_Feedback.md). + +FEATURES: + +* **New Resource:** `azurerm_dev_center_network_connection` ([#26718](https://github.com/hashicorp/terraform-provider-azurerm/issues/26718)) +* **New Resource:** `azurerm_stack_hci_logical_network` ([#26473](https://github.com/hashicorp/terraform-provider-azurerm/issues/26473)) + +ENHANCEMENTS: + +* dependencies: updating `go-azure-helpers` to `v0.70.1` ([#26757](https://github.com/hashicorp/terraform-provider-azurerm/issues/26757)) +* `arckubernetes` - updating to use version `2024-01-01` ([#26761](https://github.com/hashicorp/terraform-provider-azurerm/issues/26761)) +* `data.azurerm_storage_account` - the `enable_https_traffic_only` property has been superseded by `https_traffic_only_enabled` ([#26740](https://github.com/hashicorp/terraform-provider-azurerm/issues/26740)) +* `azurerm_log_analytics_cluster` - add support for setting `size_gb` to `100` [GH-#26865] +* `azurerm_storage_account` - the `enable_https_traffic_only` property has been superseded by `https_traffic_only_enabled` ([#26740](https://github.com/hashicorp/terraform-provider-azurerm/issues/26740)) + +BUG FIXES: + +* `azurerm_dns_cname_record` - split create and update function to fix lifecycle - ignore ([#26610](https://github.com/hashicorp/terraform-provider-azurerm/issues/26610)) +* `azurerm_dns_srv_record` - split create and update function to fix lifecycle - ignore ([#26627](https://github.com/hashicorp/terraform-provider-azurerm/issues/26627)) +* `azurerm_kubernetes_cluster` - fix issue that prevented `max_count` from being updated ([#26417](https://github.com/hashicorp/terraform-provider-azurerm/issues/26417)) +* `azurerm_linux_web_app` - correctly set `site_config.always_on` as configured during Update ([#25753](https://github.com/hashicorp/terraform-provider-azurerm/issues/25753)) +* `azurerm_linux_web_app_slot` - correctly set `site_config.always_on` as configured during Update ([#25753](https://github.com/hashicorp/terraform-provider-azurerm/issues/25753)) +* `azurerm_management_group_policy_remediation` - fix panic in deprecated schema change for 4.0 ([#26767](https://github.com/hashicorp/terraform-provider-azurerm/issues/26767)) +* `azurerm_network_security_rule` - fix panic when updating `source_port_ranges` ([#26883](https://github.com/hashicorp/terraform-provider-azurerm/issues/26883)) +* `azurerm_public_ip` - fix panix when updating `idle_timeout_in_minutes` + +DEPRECATIONS: +* `azurerm_redis_cache` - `enable_non_ssl_port` has been superseded by `non_ssl_port_enabled` and `redis_configuration. enable_authentication` has been superseded by `redis_configuration.authentication_enabled` ([#26608](https://github.com/hashicorp/terraform-provider-azurerm/issues/26608)) + + +## 3.113.0 (July 18, 2024) + +ENHANCEMENTS: + +* dependencies: updating to `v0.20240715.1100358` of `hashicorp/go-azure-sdk` ([#26638](https://github.com/hashicorp/terraform-provider-azurerm/issues/26638)) +* `storage` - updating to use `hashicorp/go-azure-sdk` ([#26218](https://github.com/hashicorp/terraform-provider-azurerm/issues/26218)) + +BUG FIXES: + +* `azurerm_storage_account` - fix a validation bug when replacing a StorageV2 account with a StorageV1 account ([#26639](https://github.com/hashicorp/terraform-provider-azurerm/issues/26639)) +* `azurerm_storage_account` - resolve an issue refreshing blob or queue properties after recreation ([#26218](https://github.com/hashicorp/terraform-provider-azurerm/issues/26218)) +* `azurerm_storage_account` - resolve an issue setting tags for an existing storage account where a policy mandates them ([#26218](https://github.com/hashicorp/terraform-provider-azurerm/issues/26218)) +* `azurerm_storage_account` - fix a persistent diff with the `customer_managed_key` block ([#26218](https://github.com/hashicorp/terraform-provider-azurerm/issues/26218)) +* `azurerm_storage_account` - resolve several consistency related issues when crreating a new storage account ([#26218](https://github.com/hashicorp/terraform-provider-azurerm/issues/26218)) + +DEPRECATIONS: + +* `azurerm_eventhub_namespace` - deprecate the `zone_redundant` field in v4.0 ([#26611](https://github.com/hashicorp/terraform-provider-azurerm/issues/26611)) +* `azurerm_servicebus_namespace` - deprecate the `zone_redundant` field in v4.0 ([#26611](https://github.com/hashicorp/terraform-provider-azurerm/issues/26611)) + +## 3.112.0 (July 12, 2024) + +FEATURES: + +* New Data Source: `azurerm_elastic_san_volume_snapshot` ([#26439](https://github.com/hashicorp/terraform-provider-azurerm/issues/26439)) +* New Resource: `azurerm_dev_center_dev_box_definition` ([#26307](https://github.com/hashicorp/terraform-provider-azurerm/issues/26307)) +* New Resource: `azurerm_dev_center_environment_type` ([#26291](https://github.com/hashicorp/terraform-provider-azurerm/issues/26291)) +* New Resource: `azurerm_virtual_machine_restore_point` ([#26526](https://github.com/hashicorp/terraform-provider-azurerm/issues/26526)) +* New Resource: `azurerm_virtual_machine_restore_point_collection` ([#26526](https://github.com/hashicorp/terraform-provider-azurerm/issues/26526)) + +ENHANCEMENTS: + +* dependencies: updating to `v0.20240710.1114656` of `github.com/hashicorp/go-azure-sdk` ([#26588](https://github.com/hashicorp/terraform-provider-azurerm/issues/26588)) +* dependencies: updating to `v0.70.0` of `go-azure-helpers` ([#26601](https://github.com/hashicorp/terraform-provider-azurerm/issues/26601)) +* `containerservice`: updating the Fleet resources to use API Version `2024-04-01` ([#26588](https://github.com/hashicorp/terraform-provider-azurerm/issues/26588)) +* Data Source: `azurerm_network_service_tags` - extend validation for `service` to allow `AzureFrontDoor.Backend`, `AzureFrontDoor.Frontend`, and `AzureFrontDoor.FirstParty` ([#26429](https://github.com/hashicorp/terraform-provider-azurerm/issues/26429)) +* `azurerm_api_management_identity_provider_aad` - support for the `client_library` property ([#26093](https://github.com/hashicorp/terraform-provider-azurerm/issues/26093)) +* `azurerm_api_management_identity_provider_aadb2c` - support for the `client_library` property ([#26093](https://github.com/hashicorp/terraform-provider-azurerm/issues/26093)) +* `azurerm_dev_test_virtual_network` - support for the `shared_public_ip_address` property ([#26299](https://github.com/hashicorp/terraform-provider-azurerm/issues/26299)) +* `azurerm_kubernetes_cluster` - support for the `certificate_authority` block under the `service_mesh_profile` block ([#26543](https://github.com/hashicorp/terraform-provider-azurerm/issues/26543)) +* `azurerm_linux_web_app` - support the value `8.3` for the `php_version` property ([#26194](https://github.com/hashicorp/terraform-provider-azurerm/issues/26194)) +* `azurerm_machine_learning_compute_cluster` - the `identity` property can now be updated ([#26404](https://github.com/hashicorp/terraform-provider-azurerm/issues/26404)) +* `azurerm_web_application_firewall_policy` - support for the `JSChallenge` value for `managed_rules.managed_rule_set.rule_group_override.rule_action` ([#26561](https://github.com/hashicorp/terraform-provider-azurerm/issues/26561)) + +BUG FIXES: + +* Data Source: `azurerm_communication_service` - `primary_connection_string`, `primary_key`, `secondary_connection_string` and `secondary_key` are marked as Sensitive ([#26560](https://github.com/hashicorp/terraform-provider-azurerm/issues/26560)) +* `azurerm_app_configuration_feature` - fix issue when updating the resource without an existing `targeting_filter` ([#26506](https://github.com/hashicorp/terraform-provider-azurerm/issues/26506)) +* `azurerm_backup_policy_vm` - split create and update function to fix lifecycle - ignore ([#26591](https://github.com/hashicorp/terraform-provider-azurerm/issues/26591)) +* `azurerm_backup_protected_vm` - split create and update function to fix lifecycle - ignore ([#26583](https://github.com/hashicorp/terraform-provider-azurerm/issues/26583)) +* `azurerm_communication_service` - the `primary_connection_string`, `primary_key`, `secondary_connection_string`, and `secondary_key` properties are now sensitive ([#26560](https://github.com/hashicorp/terraform-provider-azurerm/issues/26560)) +* `azurerm_mysql_flexible_server_configuration` - add locks to prevent conflicts when deleting the resource ([#26289](https://github.com/hashicorp/terraform-provider-azurerm/issues/26289)) +* `azurerm_nginx_deployment` - changing the `frontend_public.ip_address`, `frontend_private.ip_address`, `frontend_private.allocation_method`, and `frontend_private.subnet_id` now creates a new resource ([#26298](https://github.com/hashicorp/terraform-provider-azurerm/issues/26298)) +* `azurerm_palo_alto_local_rulestack_rule` - correctl read the `protocol` property on read when the `protocol_ports` property is configured ([#26510](https://github.com/hashicorp/terraform-provider-azurerm/issues/26510)) +* `azurerm_servicebus_namespace` - parse the identity returned by the API insensitively before setting into state ([#26540](https://github.com/hashicorp/terraform-provider-azurerm/issues/26540)) + +DEPRECATIONS: + +* `azurerm_servicebus_queue` - `enable_batched_operations`, `enable_express` and `enable_partitioning` are superseded by `batched_operations_enabled`, `express_enabled` and `partitioning_enabled` ([#26479](https://github.com/hashicorp/terraform-provider-azurerm/issues/26479)) +* `azurerm_servicebus_subscription` - `enable_batched_operations` has been superseded by `batched_operations_enabled` ([#26479](https://github.com/hashicorp/terraform-provider-azurerm/issues/26479)) +* `azurerm_servicebus_topic` - `enable_batched_operations`, `enable_express` and `enable_partitioning` are superseded by `batched_operations_enabled`, `express_enabled` and `partitioning_enabled` ([#26479](https://github.com/hashicorp/terraform-provider-azurerm/issues/26479)) + +## 3.111.0 (July 04, 2024) + +FEATURES: + +* **New Resource:** `azurerm_restore_point_collection` ([#26518](https://github.com/hashicorp/terraform-provider-azurerm/issues/26518)) + +ENHANCEMENTS: + +* dependencies: updating to `v0.20240701.1082110` of `github.com/hashicorp/go-azure-sdk` ([#26502](https://github.com/hashicorp/terraform-provider-azurerm/issues/26502)) +* `azurerm_disk_encryption_set` - support for the `managed_hsm_key_id` property ([#26201](https://github.com/hashicorp/terraform-provider-azurerm/issues/26201)) +* `azurerm_firewall_policy` - remove Computed from the `sku` property and add a default of `Standard` in 4.0 ([#26499](https://github.com/hashicorp/terraform-provider-azurerm/issues/26499)) +* `azurerm_kubernetes_cluster` - support updating `default_node_pool.os_sku` between `Ubuntu` and `AzureLinux` ([#26262](https://github.com/hashicorp/terraform-provider-azurerm/issues/26262)) +* `azurerm_kubernetes_cluster_node_pool` - support updating `os_sku` between `Ubuntu` and `AzureLinux` ([#26139](https://github.com/hashicorp/terraform-provider-azurerm/issues/26139)) +* `azurerm_service_plan` - support for new the Flex Consumption plan ([#26351](https://github.com/hashicorp/terraform-provider-azurerm/issues/26351)) + +BUG FIXES: + +* `azurerm_kubernetes_cluster` - prevent a panic ([#26478](https://github.com/hashicorp/terraform-provider-azurerm/issues/26478)) +* `azurerm_kubernetes_cluster` - prevent a diff in `upgrade_settings` when the API returns an empty object ([#26541](https://github.com/hashicorp/terraform-provider-azurerm/issues/26541)) +* `azurerm_kubernetes_cluster_node_pool` - prevent a diff in `upgrade_settings` when the API returns an empty object ([#26541](https://github.com/hashicorp/terraform-provider-azurerm/issues/26541)) +* `azurerm_virtual_network_gateway` - split create and update function to fix lifecycle - ignore ([#26451](https://github.com/hashicorp/terraform-provider-azurerm/issues/26451)) +* `azurerm_virtual_network_gateway_connection` - split create and update function to fix lifecycle - ignore ([#26431](https://github.com/hashicorp/terraform-provider-azurerm/issues/26431)) + +## 3.110.0 (June 27, 2024) + +FEATURES: + +* **New Data Source:** `azurerm_load_test` ([#26376](https://github.com/hashicorp/terraform-provider-azurerm/issues/26376)) +* **New Resource:** `azurerm_virtual_desktop_scaling_plan_host_pool_association` ([#24670](https://github.com/hashicorp/terraform-provider-azurerm/issues/24670)) + +ENHANCEMENTS: + +* Data Source: `azurerm_monitor_data_collection_endpoint` - support for the `immutable_id` property ([#26380](https://github.com/hashicorp/terraform-provider-azurerm/issues/26380)) +* Data Source: `azurerm_nginx_certificate` - export the properties `sha1_thumbprint`, `key_vault_secret_version`, `key_vault_secret_creation_date`, `error_code` and `error_message` ([#26160](https://github.com/hashicorp/terraform-provider-azurerm/issues/26160)) +* `azurerm_backup_policy_vm` - support for the `tiering_policy` property ([#26263](https://github.com/hashicorp/terraform-provider-azurerm/issues/26263)) +* `azurerm_kubernetes_cluster_node_pool` - Pod Disruption Budgets are now respected when deleting a node pool ([#26471](https://github.com/hashicorp/terraform-provider-azurerm/issues/26471)) +* `azurerm_monitor_data_collection_endpoint` - support for the `immutable_id` property ([#26380](https://github.com/hashicorp/terraform-provider-azurerm/issues/26380)) +* `azurerm_mssql_managed_instance` - support the value `GZRS` for the `storage_account_type` property ([#26448](https://github.com/hashicorp/terraform-provider-azurerm/issues/26448)) +* `azurerm_mssql_managed_instance_transparent_data_encryption` - support for the `managed_hsm_key_id` property ([#26496](https://github.com/hashicorp/terraform-provider-azurerm/issues/26496)) +* `azurerm_redis_cache_access_policy` - allow updates to `permissions` ([#26440](https://github.com/hashicorp/terraform-provider-azurerm/issues/26440)) +* `azurerm_redhat_openshift_cluster` - support for the `managed_resource_group_name` property ([#25529](https://github.com/hashicorp/terraform-provider-azurerm/issues/25529)) +* `azurerm_redhat_openshift_cluster` - support for the `preconfigured_network_security_group_enabled` property ([#26082](https://github.com/hashicorp/terraform-provider-azurerm/issues/26082)) +* `azurerm_iotcentral_application` - remove Computed from `template` and set default of `iotc-pnp-preview@1.0.0` in 4.0 ([#26485](https://github.com/hashicorp/terraform-provider-azurerm/issues/26485)) +* `azurerm_digital_twins_time_series_database_connection` - remove Computed from `kusto_table_name` and set a default of `AdtPropertyEvents` in 4.0 ([#26484](https://github.com/hashicorp/terraform-provider-azurerm/issues/26484)) + +BUG FIXES: + +* Data Source: `azurerm_express_route_circuit_peering` - fix issue where data source attempts to parse an empty string instead of generating the resource ID ([#26441](https://github.com/hashicorp/terraform-provider-azurerm/issues/26441)) +* `azurerm_express_route_gateway` - prevent a panic ([#26467](https://github.com/hashicorp/terraform-provider-azurerm/issues/26467)) +* `azurerm_monitor_scheduled_query_rules_alert_v2` - correctly handle the `identity` block if not specified ([#26364](https://github.com/hashicorp/terraform-provider-azurerm/issues/26364)) +* `azurerm_security_center_automation` - prevent resource recreation when `tags` are updated ([#26292](https://github.com/hashicorp/terraform-provider-azurerm/issues/26292)) +* `azurerm_synapse_workspace` - fix issue where `azure_devops_repo` or `github_repo` configuration could not be removed ([#26421](https://github.com/hashicorp/terraform-provider-azurerm/issues/26421)) +* `azurerm_virtual_network_dns_servers` - split create and update function to fix lifecycle - ignore ([#26427](https://github.com/hashicorp/terraform-provider-azurerm/issues/26427)) +* `azurerm_linux_function_app` - set `allowed_applications` in the request payload ([#26462](https://github.com/hashicorp/terraform-provider-azurerm/issues/26462)) +* `azurerm_linux_function_app_slot` - set `allowed_applications` in the request payload ([#26462](https://github.com/hashicorp/terraform-provider-azurerm/issues/26462)) +* `azurerm_windows_function_app` - set `allowed_applications` in the request payload ([#26462](https://github.com/hashicorp/terraform-provider-azurerm/issues/26462)) +* `azurerm_windows_function_app_slot` - set `allowed_applications` in the request payload ([#26462](https://github.com/hashicorp/terraform-provider-azurerm/issues/26462)) +* `azurerm_linux_web_app` - set `allowed_applications` in the request payload ([#26462](https://github.com/hashicorp/terraform-provider-azurerm/issues/26462)) +* `azurerm_linux_web_app_slot` - set `allowed_applications` in the request payload ([#26462](https://github.com/hashicorp/terraform-provider-azurerm/issues/26462)) +* `azurerm_windows_web_app` - set `allowed_applications` in the request payload ([#26462](https://github.com/hashicorp/terraform-provider-azurerm/issues/26462)) +* `azurerm_windows_web_app_slot` - set `allowed_applications` in the request payload ([#26462](https://github.com/hashicorp/terraform-provider-azurerm/issues/26462)) +* `azurerm_api_management` - remove ForceNew from `additional_location.zones` ([#26384](https://github.com/hashicorp/terraform-provider-azurerm/issues/26384)) +* `azurerm_logic_app_integration_account_schema` - the `name` property now allows underscores ([#26475](https://github.com/hashicorp/terraform-provider-azurerm/issues/26475)) +* `azurerm_palo_alto_local_rulestack_rule` - prevent error when switching between `protocol` and `protocol_ports` ([#26490](https://github.com/hashicorp/terraform-provider-azurerm/issues/26490)) + +DEPRECATIONS: + +* `azurerm_analysis_service_server` - the property `enable_power_bi_service` has been superseded by `power_bi_service_enabled` ([#26456](https://github.com/hashicorp/terraform-provider-azurerm/issues/26456)) + +## 3.109.0 (June 20, 2024) + +FEATURES: + +* **New Data Source:** `azurerm_automation_runbook` ([#26359](https://github.com/hashicorp/terraform-provider-azurerm/issues/26359)) +* **New Resource:** `azurerm_data_protection_backup_instance_postgresql_flexible_server` ([#26249](https://github.com/hashicorp/terraform-provider-azurerm/issues/26249)) +* **New Resource:** `azurerm_email_communication_service_domain` ([#26179](https://github.com/hashicorp/terraform-provider-azurerm/issues/26179)) +* **New Resource:** `azurerm_system_center_virtual_machine_manager_cloud` ([#25429](https://github.com/hashicorp/terraform-provider-azurerm/issues/25429)) +* **New Resource:** `azurerm_system_center_virtual_machine_manager_virtual_machine_template` ([#25449](https://github.com/hashicorp/terraform-provider-azurerm/issues/25449)) +* **New Resource:** `azurerm_system_center_virtual_machine_manager_virtual_network` ([#25451](https://github.com/hashicorp/terraform-provider-azurerm/issues/25451)) + +ENHANCEMENTS: + +* Data Source: `azurerm_hdinsight_cluster` - export the `cluster_id` attribute ([#26228](https://github.com/hashicorp/terraform-provider-azurerm/issues/26228)) +* `azurerm_cosmosdb_sql_container` - support for the `partition_key_kind` and `partition_key_paths` properties ([#26372](https://github.com/hashicorp/terraform-provider-azurerm/issues/26372)) +* `azurerm_data_protection_backup_instance_blob_storage` - support for the `storage_account_container_names` property ([#26232](https://github.com/hashicorp/terraform-provider-azurerm/issues/26232)) +* `azurerm_virtual_network_peering` - support for the `peer_complete_virtual_networks_enabled`, `only_ipv6_peering_enabled`, `local_subnet_names`, and `remote_subnet_names` properties ([#26229](https://github.com/hashicorp/terraform-provider-azurerm/issues/26229)) +* `azurerm_virtual_desktop_host_pool` - changing the `preferred_app_group_type` property no longer creates a new resource ([#26333](https://github.com/hashicorp/terraform-provider-azurerm/issues/26333)) +* `azurerm_maps_account` - support for the `location`, `identity`, `cors` and `data_store` properties ([#26397](https://github.com/hashicorp/terraform-provider-azurerm/issues/26397)) + +BUG FIXES: + +* `azurerm_automation_job_schedule` - updates `azurerm_automation_job_schedule` to use a composite resource id and allows `azurerm_automation_runbook` to be updated without causing `azurerm_automation_job_schedule` to recreate ([#22164](https://github.com/hashicorp/terraform-provider-azurerm/issues/22164)) +* `azurerm_databricks_workspace`- correctly allow disabling the default firewall ([#26339](https://github.com/hashicorp/terraform-provider-azurerm/issues/26339)) +* `azurerm_virtual_hub_*` - spliting create and update so lifecycle ignore changes works correctly ([#26310](https://github.com/hashicorp/terraform-provider-azurerm/issues/26310)) + +DEPRECATIONS: + +* Data Source: `azurerm_mariadb_server` - deprecated since the service is retiring. Please use `azurerm_mysql_flexible_server` instead ([#26354](https://github.com/hashicorp/terraform-provider-azurerm/issues/26354)) +* `azurerm_mariadb_configuration` - deprecated since the service is retiring. Please use `azurerm_mysql_flexible_server_configuration` instead ([#26354](https://github.com/hashicorp/terraform-provider-azurerm/issues/26354)) +* `azurerm_mariadb_database` - deprecated since the service is retiring. Please use `azurerm_mysql_flexible_database` instead ([#26354](https://github.com/hashicorp/terraform-provider-azurerm/issues/26354)) +* `azurerm_mariadb_firewall_rule` - deprecated since the service is retiring. Please use `azurerm_mysql_flexible_server_firewall_rule` instead ([#26354](https://github.com/hashicorp/terraform-provider-azurerm/issues/26354)) +* `azurerm_mariadb_server` - deprecated since the service is retiring. Please use `azurerm_mysql_flexible_server` instead ([#26354](https://github.com/hashicorp/terraform-provider-azurerm/issues/26354)) +* `azurerm_mariadb_virtual_network_rule` - deprecated since the service is retiring ([#26354](https://github.com/hashicorp/terraform-provider-azurerm/issues/26354)) + +## 3.108.0 (June 13, 2024) + +FEATURES: + +* **New Data Source:** `azurerm_role_management_policy` ([#25900](https://github.com/hashicorp/terraform-provider-azurerm/issues/25900)) +* **New Resource:** `azurerm_role_management_policy` ([#25900](https://github.com/hashicorp/terraform-provider-azurerm/issues/25900)) + +ENHANCEMENTS: + +* provider: support subscription ID hinting when using Azure CLI authentication ([#26282](https://github.com/hashicorp/terraform-provider-azurerm/issues/26282)) +* `serviceconnector`: updating to use API Version `2024-04-01` ([#26248](https://github.com/hashicorp/terraform-provider-azurerm/issues/26248)) +* `azurerm_container_groups` - can now be created with a User Assigned Identity when running Windows ([#26308](https://github.com/hashicorp/terraform-provider-azurerm/issues/26308)) +* `azurerm_kubernetes_cluster` - updating the `network_profile.network_policy` property to `azure` and `calico` when it hasn't been previously set is supported ([#26176](https://github.com/hashicorp/terraform-provider-azurerm/issues/26176)) +* `azurerm_kubernetes_cluster` - respect Pod Distruption Budgets when rotating the `default_node_pool` ([#26274](https://github.com/hashicorp/terraform-provider-azurerm/issues/26274)) +* `azurerm_lb_backend_address_pool` - support for the `synchronous_mode` property ([#26309](https://github.com/hashicorp/terraform-provider-azurerm/issues/26309)) +* `azurerm_private_endpoint` - support symultaneous creation of multiple resources of this type per subnet ([#26006](https://github.com/hashicorp/terraform-provider-azurerm/issues/26006)) + +BUG FIXES: + +* `azurerm_express_route_circuit_peering`, `azurerm_express_route_circuit`, `azurerm_express_route_gateway`, `azurerm_express_route_port` - split create and update ([#26237](https://github.com/hashicorp/terraform-provider-azurerm/issues/26237)) +* `azurerm_lb_backend_address_pool_address` - when using this resource, values are no longer reset on `azurerm_lb_backend_address_pool` ([#26264](https://github.com/hashicorp/terraform-provider-azurerm/issues/26264)) +* `azurerm_route_filter` - spliting create and update so lifecycle ignore changes works correctly ([#26266](https://github.com/hashicorp/terraform-provider-azurerm/issues/26266)) +* `azurerm_route_server` - spliting create and update so lifecycle ignore changes works correctly ([#26266](https://github.com/hashicorp/terraform-provider-azurerm/issues/26266)) +* `azurerm_synapse_workspace` - updates the client used in all operations of `azurerm_synapse_workspace_sql_aad_admin` to prevent this resource from modifying the same resource as `azurerm_synapse_workspace_aad_admin` ([#26317](https://github.com/hashicorp/terraform-provider-azurerm/issues/26317)) +* `azurerm_virtual_network` - correctly parse network securty group IDs ([#26283](https://github.com/hashicorp/terraform-provider-azurerm/issues/26283)) + +DEPRECATIONS: + +* Data Source: `azurerm_network_interface` - the `enable_ip_forwarding` and `enable_accelerated_networking` properties have been deprecated and superseded by the `ip_forwarding_enabled` and `accelerated_networking_enabled` properties ([#26293](https://github.com/hashicorp/terraform-provider-azurerm/issues/26293)) +* `azurerm_api_management` - the `policy` block has been deprecated is superseded by the `azurerm_api_management_policy` resource ([#26305](https://github.com/hashicorp/terraform-provider-azurerm/issues/26305)) +* `azurerm_kubernetes_cluster` - the `ebpf_data_plane` property has been deprecated and superseded by the `network_data_plane` property ([#26251](https://github.com/hashicorp/terraform-provider-azurerm/issues/26251)) +* `azurerm_network_interface` - the `enable_ip_forwarding` and `enable_accelerated_networking` properties have been deprecated and superseded by the `ip_forwarding_enabled` and `accelerated_networking_enabled` properties ([#26293](https://github.com/hashicorp/terraform-provider-azurerm/issues/26293)) +* `azurerm_synapse_workspace` - the `aad_admin` and `sql_aad_admin` blocks have been deprecated and superseded by the `azurerm_synapse_workspace_aad_admin` and `azurerm_synapse_workspace_sql_aad_admin` resources ([#26317](https://github.com/hashicorp/terraform-provider-azurerm/issues/26317)) + +## 3.107.0 (June 06, 2024) + +FEATURES: + +* **New Resource:** `azurerm_data_protection_backup_policy_postgresql_flexible_server` ([#26024](https://github.com/hashicorp/terraform-provider-azurerm/issues/26024)) + +ENHANCEMENTS: + +* dependencies: updating to `v0.20240604.1114748` of `github.com/hashicorp/go-azure-sdk` ([#26216](https://github.com/hashicorp/terraform-provider-azurerm/issues/26216)) +* `advisor`: update API version to `2023-01-01` ([#26205](https://github.com/hashicorp/terraform-provider-azurerm/issues/26205)) +* `keyvault`: handling the Resources API returning Key Vaults that have been deleted when populating the cache ([#26199](https://github.com/hashicorp/terraform-provider-azurerm/issues/26199)) +* `machinelearning`: update API version to `2024-04-01` ([#26168](https://github.com/hashicorp/terraform-provider-azurerm/issues/26168)) +* `network/privatelinkservices` - update to use `hashicorp/go-azure-sdk` ([#26212](https://github.com/hashicorp/terraform-provider-azurerm/issues/26212)) +* `network/serviceendpointpolicies` - update to use `hashicorp/go-azure-sdk` ([#26196](https://github.com/hashicorp/terraform-provider-azurerm/issues/26196)) +* `network/virtualnetworks` - update to use `hashicorp/go-azure-sdk` ([#26217](https://github.com/hashicorp/terraform-provider-azurerm/issues/26217)) +* `network/virtualwans`: update route resources to use `hashicorp/go-azure-sdk` ([#26189](https://github.com/hashicorp/terraform-provider-azurerm/issues/26189)) +* `azurerm_container_app_job` - support for the `key_vault_secret_id` and `identity` properties in the `secret` block ([#25969](https://github.com/hashicorp/terraform-provider-azurerm/issues/25969)) +* `azurerm_kubernetes_cluster` - support forthe `dns_zone_ids` popperty in the `web_app_routing` block ([#26117](https://github.com/hashicorp/terraform-provider-azurerm/issues/26117)) +* `azurerm_notification_hub_authorization_rule` - support for the `primary_connection_string` and `secondary_connection_string` properties ([#26188](https://github.com/hashicorp/terraform-provider-azurerm/issues/26188)) +* `azurerm_subnet` - support for the `default_outbound_access_enabled` property ([#25259](https://github.com/hashicorp/terraform-provider-azurerm/issues/25259)) + +BUG FIXES: + +* `azurerm_api_management_named_value` - will now enforce setting the `secret` property when setting the `value_from_key_vault` property ([#26150](https://github.com/hashicorp/terraform-provider-azurerm/issues/26150)) +* `azurerm_storage_sync_server_endpoint` - improve pooling to work around api inconsistencies ([#26204](https://github.com/hashicorp/terraform-provider-azurerm/issues/26204)) +* `azurerm_virtual_network` - split create and update function to fix lifecycle - ignore ([#26246](https://github.com/hashicorp/terraform-provider-azurerm/issues/26246)) +* `azurerm_vpn_server_configuration` - split create and update function to fix lifecycle - ignore ([#26175](https://github.com/hashicorp/terraform-provider-azurerm/issues/26175)) +* `azurerm_vpn_server_configuration_policy_group` - split create and update function to fix lifecycle - ignore ([#26207](https://github.com/hashicorp/terraform-provider-azurerm/issues/26207)) +* `azurerm_vpn_site` - split create and update function to fix lifecycle - ignore changes ([#26163](https://github.com/hashicorp/terraform-provider-azurerm/issues/26163)) + +DEPRECATIONS: + +* `azurerm_kubernetes_cluster` - the property `dns_zone_id` has been superseded by the property `dns_zone_ids` in the `web_app_routing` block ([#26117](https://github.com/hashicorp/terraform-provider-azurerm/issues/26117)) +* `azurerm_nginx_deployment` - the block `configuration` has been deprecated and superseded by the resource `azurerm_nginx_configuration` ([#25773](https://github.com/hashicorp/terraform-provider-azurerm/issues/25773)) + +## 3.106.1 (May 31, 2024) + +BUG FIXES: + +* Data Source: `azurerm_kubernetes_cluster` - fix a crash when reading/setting `upgrade_settings` ([#26173](https://github.com/hashicorp/terraform-provider-azurerm/issues/26173)) + +## 3.106.0 (May 31, 2024) + +UPGRADE NOTES: + +* This release updates the Key Vault cache to load Key Vaults using both the Key Vaults List API **and** the Resources API to workaround the API returning incomplete/stale data. To achieve this, and provide consistency between tooling, we are intentionally using the same older version of the Resources API as the current version of Azure CLI. ([#26070](https://github.com/hashicorp/terraform-provider-azurerm/issues/26070)) + +FEATURES: + +* **New Data Source:** `azurerm_arc_resource_bridge_appliance` ([#25731](https://github.com/hashicorp/terraform-provider-azurerm/issues/25731)) +* **New Data Source:** `azurerm_elastic_san_volume_group` ([#26111](https://github.com/hashicorp/terraform-provider-azurerm/issues/26111)) +* **New Data Source:** `azurerm_storage_queue` ([#26087](https://github.com/hashicorp/terraform-provider-azurerm/issues/26087)) +* **New Data Source:** `azurerm_storage_table` ([#26126](https://github.com/hashicorp/terraform-provider-azurerm/issues/26126)) +* **New Resource:** `azurerm_container_registry_cache_rule` ([#26034](https://github.com/hashicorp/terraform-provider-azurerm/issues/26034)) +* **New Resource:** `azurerm_virtual_machine_implicit_data_disk_from_source` ([#25537](https://github.com/hashicorp/terraform-provider-azurerm/issues/25537)) + +ENHANCEMENTS: + +* Data Source: azurerm_kubernetes_cluster - add support for the `drain_timeout_in_minutes` and `node_soak_duration_in_minutes` properties in the `upgrade_settings` block ([#26137](https://github.com/hashicorp/terraform-provider-azurerm/issues/26137)) +* dependencies: updating to `v0.20240529.1155048` of `github.com/hashicorp/go-azure-sdk` ([#26148](https://github.com/hashicorp/terraform-provider-azurerm/issues/26148)) +* `containerapps`: update API version to `2024-03-01` ([#25993](https://github.com/hashicorp/terraform-provider-azurerm/issues/25993)) +* `expressroute`: update to use `hashicorp/go-azure-sdk` ([#26066](https://github.com/hashicorp/terraform-provider-azurerm/issues/26066)) +* `keyvault`: populating the cache using both the Key Vault List and Resources API to workaround incomplete/stale data being returned ([#26070](https://github.com/hashicorp/terraform-provider-azurerm/issues/26070)) +* `servicenetworking`: updating to API Version `2023-11-01` ([#26148](https://github.com/hashicorp/terraform-provider-azurerm/issues/26148)) +* `virtualnetworkpeerings`: update to use `hashicorp/go-azure-sdk` ([#26065](https://github.com/hashicorp/terraform-provider-azurerm/issues/26065)) +* `azurerm_automation_powershell72_module` - support for the `tags` property ([#26106](https://github.com/hashicorp/terraform-provider-azurerm/issues/26106)) +* `azurerm_bastion_host` - support for `Developer` SKU ([#26068](https://github.com/hashicorp/terraform-provider-azurerm/issues/26068)) +* `azurerm_container_app_environment` - support for the `mutual_tls_enabled` property ([#25993](https://github.com/hashicorp/terraform-provider-azurerm/issues/25993)) +* `azurerm_container_registry` - validation to fail fast when setting `public_network_access_enabled` with an invalid SKU ([#26054](https://github.com/hashicorp/terraform-provider-azurerm/issues/26054)) +* `azurerm_key_vault_managed_hardware_security_module` - the `public_network_access_enabled` property can now be updated ([#26075](https://github.com/hashicorp/terraform-provider-azurerm/issues/26075)) +* `azurerm_kubernetes_cluster` - support for the `cost_analysis_enabled` property ([#26052](https://github.com/hashicorp/terraform-provider-azurerm/issues/26052)) +* `azurerm_kubernetes_cluster` - support for the `drain_timeout_in_minutes` and `node_soak_duration_in_minutes` properties in the `upgrade_settings` block ([#26137](https://github.com/hashicorp/terraform-provider-azurerm/issues/26137)) +* `azurerm_kubernetes_cluster_node_pool` - support for the `drain_timeout_in_minutes` and `node_soak_duration_in_minutes` properties in the `upgrade_settings` block ([#26137](https://github.com/hashicorp/terraform-provider-azurerm/issues/26137)) +* `azurerm_linux_virtual_machine` - the `hibernation_enabled` property can now be updated ([#26112](https://github.com/hashicorp/terraform-provider-azurerm/issues/26112)) +* `azurerm_logic_app_trigger_custom` - support for the property `callback_url` ([#25979](https://github.com/hashicorp/terraform-provider-azurerm/issues/25979)) +* `azurerm_machine_learning_workspace` - support for the `serverless_compute` block ([#25660](https://github.com/hashicorp/terraform-provider-azurerm/issues/25660)) +* `azurerm_mssql_elasticpool` - support the sku `HS_PRMS` ([#26161](https://github.com/hashicorp/terraform-provider-azurerm/issues/26161)) +* `azurerm_new_relic_monitor` - support for the `identity` block ([#26115](https://github.com/hashicorp/terraform-provider-azurerm/issues/26115)) +* `azurerm_route_map` - the `parameter` property is now Optional when the action type is `Drop` ([#26003](https://github.com/hashicorp/terraform-provider-azurerm/issues/26003)) +* `azurerm_windows_virtual_machine` - the `hibernation_enabled` property can now be updated ([#26112](https://github.com/hashicorp/terraform-provider-azurerm/issues/26112)) + +BUG FIXES: + +* Data Source: `azurerm_system_center_virtual_machine_manager_inventory_items` - normalise the resource ID for Intentory Items ([#25955](https://github.com/hashicorp/terraform-provider-azurerm/issues/25955)) +* `azurerm_app_configuration_feature` - update polling interval to tolerate eventual consistency of the API ([#26025](https://github.com/hashicorp/terraform-provider-azurerm/issues/26025)) +* `azurerm_app_configuration_key` - update polling interval to tolerate eventual consistency of the API ([#26025](https://github.com/hashicorp/terraform-provider-azurerm/issues/26025)) +* `azurerm_eventhub_namespace_customer_managed_key` - validating that the User Assigned Identity used for accessing the Key Vault is assigned to the EventHub Namespace ([#28509](https://github.com/hashicorp/terraform-provider-azurerm/issues/28509)) +* `azurerm_linux_function_app` - fix update handling of `health_check_eviction_time_in_min` and `WEBSITE_HEALTHCHECK_MAXPINGFAILURES` ([#26107](https://github.com/hashicorp/terraform-provider-azurerm/issues/26107)) +* `azurerm_linux_function_app_slot` - fix update handling of `health_check_eviction_time_in_min` and `WEBSITE_HEALTHCHECK_MAXPINGFAILURES` ([#26107](https://github.com/hashicorp/terraform-provider-azurerm/issues/26107)) +* `azurerm_linux_web_app` - fix update handling of `health_check_eviction_time_in_min` and `WEBSITE_HEALTHCHECK_MAXPINGFAILURES` ([#26107](https://github.com/hashicorp/terraform-provider-azurerm/issues/26107)) +* `azurerm_linux_web_app_slot` - fix update handling of `health_check_eviction_time_in_min` and `WEBSITE_HEALTHCHECK_MAXPINGFAILURES` ([#26107](https://github.com/hashicorp/terraform-provider-azurerm/issues/26107)) +* `azurerm_postgresql_flexible_server` - prevent premature check on updated `storage_mb` value that prevents the resource from being re-created ([#25986](https://github.com/hashicorp/terraform-provider-azurerm/issues/25986)) +* `azurerm_redis_access_cache_policy_assignment` - add locks to stabilize creation of multiple policy assignments ([#26085](https://github.com/hashicorp/terraform-provider-azurerm/issues/26085)) +* `azurerm_redis_access_cache_policy` - add locks to stabilize creation of multiple policy assignments ([#26085](https://github.com/hashicorp/terraform-provider-azurerm/issues/26085)) +* `azurerm_windows_function_app` - fix update handling of `health_check_eviction_time_in_min` and `WEBSITE_HEALTHCHECK_MAXPINGFAILURES` ([#26107](https://github.com/hashicorp/terraform-provider-azurerm/issues/26107)) +* `azurerm_windows_function_app_slot` - fix update handling of `health_check_eviction_time_in_min` and `WEBSITE_HEALTHCHECK_MAXPINGFAILURES` ([#26107](https://github.com/hashicorp/terraform-provider-azurerm/issues/26107)) +* `azurerm_windows_web_app` - fix update handling of `health_check_eviction_time_in_min` and `WEBSITE_HEALTHCHECK_MAXPINGFAILURES` ([#26107](https://github.com/hashicorp/terraform-provider-azurerm/issues/26107)) +* `azurerm_windows_web_app_slot` - fix update handling of `health_check_eviction_time_in_min` and `WEBSITE_HEALTHCHECK_MAXPINGFAILURES` ([#26107](https://github.com/hashicorp/terraform-provider-azurerm/issues/26107)) + +## 3.105.0 (May 24, 2024) + +BREAKING CHANGE: + +* `azurerm_kubernetes_cluster` - the properties `workload_autoscaler_profile.vertical_pod_autoscaler_update_mode` and `workload_autoscaler_profile.vertical_pod_autoscaler_controlled_values` are no longer populated since they're not exported in API version `2023-09-02-preview` ([#25663](https://github.com/hashicorp/terraform-provider-azurerm/issues/25663)) + +FEATURES: + +* New Resource: `azurerm_api_management_policy_fragment` ([#24968](https://github.com/hashicorp/terraform-provider-azurerm/issues/24968)) + +ENHANCEMENTS: + +* dependencies: updating to `v0.20240522.1080424` of `github.com/hashicorp/go-azure-sdk` ([#26069](https://github.com/hashicorp/terraform-provider-azurerm/issues/26069)) +* `containerservice`: updating to use API Version `2023-09-02-preview` ([#25663](https://github.com/hashicorp/terraform-provider-azurerm/issues/25663)) +* `azurerm_application_insights_standard_web_test` - `http_verb` can now be set to `HEAD` and `OPTIONS` ([#26077](https://github.com/hashicorp/terraform-provider-azurerm/issues/26077)) +* `azurerm_cdn_frontdoor_rule` - updating the validation for `match_values` within the `uri_path_condition` block to support a forward-slash ([#26017](https://github.com/hashicorp/terraform-provider-azurerm/issues/26017)) +* `azurerm_linux_web_app` - normalising the value for `virtual_network_subnet_id` ([#25885](https://github.com/hashicorp/terraform-provider-azurerm/issues/25885)) +* `azurerm_machine_learning_compute_cluster` - add validation for `name` ([#26060](https://github.com/hashicorp/terraform-provider-azurerm/issues/26060)) +* `azurerm_machine_learning_compute_cluster` - improve validation to allow an empty `subnet_resource_id` when the Workspace is using a managed Virtual Network ([#26073](https://github.com/hashicorp/terraform-provider-azurerm/issues/26073)) +* `azurerm_postgresql_flexible_server` - the field `public_network_access_enabled` is now configurable (previously this was computed-only/not settable via the API) ([#25812](https://github.com/hashicorp/terraform-provider-azurerm/issues/25812)) +* `azurerm_snapshot` - support for `disk_access_id` ([#25996](https://github.com/hashicorp/terraform-provider-azurerm/issues/25996)) +* `azurerm_windows_web_app` - normalising the value for `virtual_network_subnet_id` ([#25885](https://github.com/hashicorp/terraform-provider-azurerm/issues/25885)) + +BUG FIXES: + +* `azurerm_container_app_environment_custom_domain`: parsing the Log Analytics Workspace ID insensitively to workaround the API returning this inconsistently ([#26074](https://github.com/hashicorp/terraform-provider-azurerm/issues/26074)) +* `azurerm_container_app_job` - updating the validation for the `name` field ([#26049](https://github.com/hashicorp/terraform-provider-azurerm/issues/26049)) +* `azurerm_container_app_job` - updating the validation for the `name` field within the `custom_scale_rule` block ([#26049](https://github.com/hashicorp/terraform-provider-azurerm/issues/26049)) +* `azurerm_container_app_job` - updating the validation for the `name` field within the `rules` block ([#26049](https://github.com/hashicorp/terraform-provider-azurerm/issues/26049)) +* `azurerm_linux_function_app_slot` - fixed panic when planning from a version older than 3.88.0 ([#25838](https://github.com/hashicorp/terraform-provider-azurerm/issues/25838)) +* `azurerm_pim_active_role_assignment` - fix a persistent diff when `ticket` is not specified ([#26059](https://github.com/hashicorp/terraform-provider-azurerm/issues/26059)) +* `azurerm_pim_eligible_role_assignment` - fix a persistent diff when `ticket` is not specified ([#26059](https://github.com/hashicorp/terraform-provider-azurerm/issues/26059)) +* `azurerm_policy_definition` - recreate the resource if the `parameters` property is updated to include fewer items ([#26083](https://github.com/hashicorp/terraform-provider-azurerm/issues/26083)) +* `azurerm_windows_function_app_slot` - set Server Farm ID in payload when using a Virtual Network Subnet for the slot ([#25634](https://github.com/hashicorp/terraform-provider-azurerm/issues/25634)) +* `azurerm_windows_web_app_slot` - set Server Farm ID in payload when using a Virtual Network Subnet for the slot ([#25634](https://github.com/hashicorp/terraform-provider-azurerm/issues/25634)) + + +## 3.104.2 (May 20, 2024) + +NOTE: This is a re-release of `v3.104.1` to include missing changes, please refer to the changelog entries for `v3.104.1`. + +## 3.104.1 (May 20, 2024) + +BUG FIXES: + +* `azurerm_pim_active_role_assignment` - fix a regression where roles assignments could not be created with no expiration ([#26029](https://github.com/hashicorp/terraform-provider-azurerm/issues/26029)) +* `azurerm_pim_eligible_role_assignment` - fix a regression where roles assignments could not be created with no expiration ([#26029](https://github.com/hashicorp/terraform-provider-azurerm/issues/26029)) + +## 3.104.0 (May 16, 2024) + +FEATURES: + +* New Data Source: `azurerm_elastic_san` ([#25719](https://github.com/hashicorp/terraform-provider-azurerm/issues/25719)) + +ENHANCEMENTS: + +* New Resource - `azurerm_key_vault_managed_hardware_security_module_key` ([#25935](https://github.com/hashicorp/terraform-provider-azurerm/issues/25935)) +* Data Source - `azurerm_kubernetes_service_version` - support for the `default_version` property ([#25953](https://github.com/hashicorp/terraform-provider-azurerm/issues/25953)) +* `network/applicationgateways` - update to use `hashicorp/go-azure-sdk` ([#25844](https://github.com/hashicorp/terraform-provider-azurerm/issues/25844)) +* `dataprotection` - update API version to `2024-04-01` ([#25882](https://github.com/hashicorp/terraform-provider-azurerm/issues/25882)) +* `databasemigration` - update API version to `2021-06-30` ([#25997](https://github.com/hashicorp/terraform-provider-azurerm/issues/25997)) +* `network/ips` - update to use `hashicorp/go-azure-sdk` ([#25905](https://github.com/hashicorp/terraform-provider-azurerm/issues/25905)) +* `network/localnetworkgateway` - update to use `hashicorp/go-azure-sdk` ([#25905](https://github.com/hashicorp/terraform-provider-azurerm/issues/25905)) +* `network/natgateway` - update to use `hashicorp/go-azure-sdk` ([#25905](https://github.com/hashicorp/terraform-provider-azurerm/issues/25905)) +* `network/networksecuritygroup` - update to use `hashicorp/go-azure-sdk` ([#25971](https://github.com/hashicorp/terraform-provider-azurerm/issues/25971)) +* `network/publicips` - update to use `hashicorp/go-azure-sdk` ([#25971](https://github.com/hashicorp/terraform-provider-azurerm/issues/25971)) +* `network/virtualwan` - update to use `hashicorp/go-azure-sdk` ([#25971](https://github.com/hashicorp/terraform-provider-azurerm/issues/25971)) +* `network/vpn` - update to use `hashicorp/go-azure-sdk` ([#25971](https://github.com/hashicorp/terraform-provider-azurerm/issues/25971)) +* `azurerm_databricks_workspace` - support for the `default_storage_firewall_enabled` property ([#25919](https://github.com/hashicorp/terraform-provider-azurerm/issues/25919)) +* `azurerm_key_vault` - allow previously existing key vaults to continue to manage the `contact` field prior to the `v3.93.0` conditional polling change ([#25777](https://github.com/hashicorp/terraform-provider-azurerm/issues/25777)) +* `azurerm_linux_function_app` - support for the PowerShell `7.4` ([#25980](https://github.com/hashicorp/terraform-provider-azurerm/issues/25980)) +* `azurerm_log_analytics_cluster` - support for the value `UserAssigned` in the `identity.type` property ([#25940](https://github.com/hashicorp/terraform-provider-azurerm/issues/25940)) +* `azurerm_pim_active_role_assignment` - remove hard dependency on the `roleAssignmentScheduleRequests` API, so that role assignments will not become unmanageable over time ([#25956](https://github.com/hashicorp/terraform-provider-azurerm/issues/25956)) +* `azurerm_pim_eligible_role_assignment` - remove hard dependency on the `roleEligibilityScheduleRequests` API, so that role assignments will not become unmanageable over time ([#25956](https://github.com/hashicorp/terraform-provider-azurerm/issues/25956)) +* `azurerm_windows_function_app` - support for the PowerShell `7.4` ([#25980](https://github.com/hashicorp/terraform-provider-azurerm/issues/25980)) + +BUG FIXES: + +* `azurerm_container_app_job` - Allow `event_trigger_config.scale.min_executions` to be `0` ([#25931](https://github.com/hashicorp/terraform-provider-azurerm/issues/25931)) +* `azurerm_container_app_job` - update validation to allow the `replica_retry_limit` property to be set to `0` ([#25984](https://github.com/hashicorp/terraform-provider-azurerm/issues/25984)) +* `azurerm_data_factory_trigger_custom_event` - one of `subject_begins_with` and `subject_ends_with` no longer need to be set ([#25932](https://github.com/hashicorp/terraform-provider-azurerm/issues/25932)) +* `azurerm_kubernetes_cluster_node_pool` - prevent race condition by checking the virtual network status when creating a node pool with a subnet ID ([#25888](https://github.com/hashicorp/terraform-provider-azurerm/issues/25888)) +* `azurerm_postgresql_flexible_server` - fix for default `storage_tier` value when `storage_mb` field has been changed ([#25947](https://github.com/hashicorp/terraform-provider-azurerm/issues/25947)) +* `azurerm_pim_active_role_assignment` - resolve a number of potential crashes ([#25956](https://github.com/hashicorp/terraform-provider-azurerm/issues/25956)) +* `azurerm_pim_eligible_role_assignment` - resolve a number of potential crashes ([#25956](https://github.com/hashicorp/terraform-provider-azurerm/issues/25956)) +* `azurerm_redis_enterprise_cluster_location_zone_support` - add `Central India` zones support ([#26000](https://github.com/hashicorp/terraform-provider-azurerm/issues/26000)) +* `azurerm_sentinel_alert_rule_scheduled` - the `alert_rule_template_version` property is no longer `ForceNew` ([#25688](https://github.com/hashicorp/terraform-provider-azurerm/issues/25688)) +* `azurerm_storage_sync_server_endpoint` - preventing a crashed due to `initial_upload_policy` ([#25968](https://github.com/hashicorp/terraform-provider-azurerm/issues/25968)) + +## 3.103.1 (May 10, 2024) + +BUG FIXES + +* `loadtest` - fixing an issue where the SDK Clients weren't registered ([#25920](https://github.com/hashicorp/terraform-provider-azurerm/issues/25920)) + +## 3.103.0 (May 09, 2024) + +FEATURES: + +* New Resource: `azurerm_container_app_job` ([#23871](https://github.com/hashicorp/terraform-provider-azurerm/issues/23871)) +* New Resource: `azurerm_container_app_environment_custom_domain` ([#24346](https://github.com/hashicorp/terraform-provider-azurerm/issues/24346)) +* New Resource: `azurerm_data_factory_credential_service_principal` ([#25805](https://github.com/hashicorp/terraform-provider-azurerm/issues/25805)) +* New Resource: `azurerm_network_manager_connectivity_configuration` ([#25746](https://github.com/hashicorp/terraform-provider-azurerm/issues/25746)) +* New Resource: `azurerm_maintenance_assignment_dynamic_scope` ([#25467](https://github.com/hashicorp/terraform-provider-azurerm/issues/25467)) +* New Resource: `azurerm_virtual_machine_gallery_application_assignment` ([#22945](https://github.com/hashicorp/terraform-provider-azurerm/issues/22945)) +* New Resource: `azurerm_virtual_machine_automanage_configuration_assignment` ([#25480](https://github.com/hashicorp/terraform-provider-azurerm/issues/25480)) + +ENHANCEMENTS: + +* provider - support for the `recover_soft_deleted_backup_protected_vm` feature ([#24157](https://github.com/hashicorp/terraform-provider-azurerm/issues/24157)) +* dependencies: updating `github.com/hashicorp/go-azure-helpers` to `v0.69.0` ([#25903](https://github.com/hashicorp/terraform-provider-azurerm/issues/25903)) +* `loganalytics` - update cluster resource to api version `2022-01-01` ([#25686](https://github.com/hashicorp/terraform-provider-azurerm/issues/25686)) +* `azurerm_bastion_host` - support for the `kerberos_enabled` property ([#25823](https://github.com/hashicorp/terraform-provider-azurerm/issues/25823)) +* `azurerm_container_app` - secrets can now be removed ([#25743](https://github.com/hashicorp/terraform-provider-azurerm/issues/25743)) +* `azurerm_container_app_environment` - support for the `custom_domain_verification_id` property ([#24346](https://github.com/hashicorp/terraform-provider-azurerm/issues/24346)) +* `azurerm_linux_virtual_machine` - support for the additional capability `hibernation_enabled` ([#25807](https://github.com/hashicorp/terraform-provider-azurerm/issues/25807)) +* `azurerm_linux_virtual_machine` - support for additional values for the `license_type` property ([#25909](https://github.com/hashicorp/terraform-provider-azurerm/issues/25909)) +* `azurerm_linux_virtual_machine_scale_set` - support for the `maximum_surge_instances` property for vmss rolling upgrades ([#24914](https://github.com/hashicorp/terraform-provider-azurerm/issues/24914)) +* `azurerm_windows_virtual_machine` - support for the additional capability `hibernation_enabled` ([#25807](https://github.com/hashicorp/terraform-provider-azurerm/issues/25807)) +* `azurerm_windows_virtual_machine_scale_set` - support for the `maximum_surge_instances_enabled` property for vmss rolling upgrades ([#24914](https://github.com/hashicorp/terraform-provider-azurerm/issues/24914)) +* `azurerm_storage_account` - support for the `permanent_delete_enabled` property within retention policies ([#25778](https://github.com/hashicorp/terraform-provider-azurerm/issues/25778)) + +BUG FIXES: + +* `azurerm_kubernetes_cluster` - erase `load_balancer_profile` when changing `network_profile.outbound_type` from `loadBalancer` to another outbound type ([#25530](https://github.com/hashicorp/terraform-provider-azurerm/issues/25530)) +* `azurerm_log_analytics_saved_search` - the `function_parameters` property now repsects the order of elements ([#25869](https://github.com/hashicorp/terraform-provider-azurerm/issues/25869)) +* `azurerm_linux_web_app` - fix `slow_request` with `path` issue in `auto_heal` by adding support for `slow_request_with_path` block ([#20049](https://github.com/hashicorp/terraform-provider-azurerm/issues/20049)) +* `azurerm_linux_web_app_slot` - fix `slow_request` with `path` issue in `auto_heal` by adding support for `slow_request_with_path` block ([#20049](https://github.com/hashicorp/terraform-provider-azurerm/issues/20049)) +* `azurerm_monitor_private_link_scoped_service` - normalize case of the `linked_resource_id` property during reads ([#25787](https://github.com/hashicorp/terraform-provider-azurerm/issues/25787)) +* `azurerm_role_assignment` - add addtional retry logic to assist with cross-tenant use ([#25853](https://github.com/hashicorp/terraform-provider-azurerm/issues/25853)) +* `azurerm_web_pubsub_network_acl` - fixing a crash when `networkACL.PublicNetwork.Deny` was nil ([#25886](https://github.com/hashicorp/terraform-provider-azurerm/issues/25886)) +* `azurerm_windows_web_app` - fix `slow_request` with `path` issue in `auto_heal` by adding support for `slow_request_with_path` block ([#20049](https://github.com/hashicorp/terraform-provider-azurerm/issues/20049)) +* `azurerm_windows_web_app_slot` - fix `slow_request` with `path` issue in `auto_heal` by adding support for `slow_request_with_path` block ([#20049](https://github.com/hashicorp/terraform-provider-azurerm/issues/20049)) + +DEPRECATIONS: +* `azurerm_subnet` - the `private_endpoint_network_policies_enabled` property has been deprecated in favour of the `private_endpoint_network_policies` property ([#25779](https://github.com/hashicorp/terraform-provider-azurerm/issues/25779)) + +## 3.102.0 (May 02, 2024) + +FEATURES: + +* New Resource: `azurerm_storage_sync_server_endpoint` ([#25831](https://github.com/hashicorp/terraform-provider-azurerm/issues/25831)) +* New Resource: `azurerm_storage_container_immutability_policy` ([#25804](https://github.com/hashicorp/terraform-provider-azurerm/issues/25804)) + +ENHANCEMENTS: + +* `azurerm_load_test` - add support for `encryption` ([#25759](https://github.com/hashicorp/terraform-provider-azurerm/issues/25759)) +* `azurerm_network_connection_monitor` - update validation for `target_resource_type` and `target_resource_id` ([#25745](https://github.com/hashicorp/terraform-provider-azurerm/issues/25745)) +* `azurerm_mssql_managed_database` - support for a Restorable Database ID to be used as the `source_database_id` for point in time restore ([#25568](https://github.com/hashicorp/terraform-provider-azurerm/issues/25568)) +* `azurerm_storage_account` - support for the `managed_hsm_key_id` property ([#25088](https://github.com/hashicorp/terraform-provider-azurerm/issues/25088)) +* `azurerm_storage_account_customer_managed_key` - support for the `managed_hsm_key_id` property ([#25088](https://github.com/hashicorp/terraform-provider-azurerm/issues/25088)) + +BUG FIXES: + +* `azurerm_linux_function_app` - now sets docker registry url in `linux_fx_version` by default ([#23911](https://github.com/hashicorp/terraform-provider-azurerm/issues/23911)) +* `azurerm_resource_group` - work around sporadic eventual consistency errors ([#25758](https://github.com/hashicorp/terraform-provider-azurerm/issues/25758)) + +DEPRECATIONS: + +* `azurerm_key_vault_managed_hardware_security_module_role_assignment` - the `vault_base_url` property has been deprecated in favour of the `managed_hsm_id` property ([#25601](https://github.com/hashicorp/terraform-provider-azurerm/issues/25601)) + +## 3.101.0 (April 25, 2024) + +ENHANCEMENTS: + +* dependencies: updating to `v0.20240424.1114424` of `github.com/hashicorp/go-azure-sdk` ([#25749](https://github.com/hashicorp/terraform-provider-azurerm/issues/25749)) +* dependencies: updating to `v0.27.0` of `github.com/tombuildsstuff/giovanni` ([#25702](https://github.com/hashicorp/terraform-provider-azurerm/issues/25702)) +* dependencies: updating `golang.org/x/net` to `0.23.0` +* `azurerm_cognitive_account` - the `kind` property now supports `ConversationalLanguageUnderstanding` ([#25735](https://github.com/hashicorp/terraform-provider-azurerm/issues/25735)) +* `azurerm_container_app_custom_domain` - support the ability to use Azure Managed Certificates ([#25356](https://github.com/hashicorp/terraform-provider-azurerm/issues/25356)) + +BUG FIXES: + +* Data Source: `azurerm_application_insights` - set correct AppID in data source ([#25687](https://github.com/hashicorp/terraform-provider-azurerm/issues/25687)) +* `azurerm_virtual_network` - suppress diff in ordering for `address_space` due to inconsistent API response ([#23793](https://github.com/hashicorp/terraform-provider-azurerm/issues/23793)) +* `azurerm_storage_data_lake_gen2_filesystem` - add context deadline for import ([#25712](https://github.com/hashicorp/terraform-provider-azurerm/issues/25712)) +* `azurerm_virtual_network_gateway` - preserve existing `nat_rules` on updates ([#25690](https://github.com/hashicorp/terraform-provider-azurerm/issues/25690)) + +## 3.100.0 (April 18, 2024) + +ENHANCEMENTS: + +* dependencies: updating `hashicorp/go-azure-sdk` to `v0.20240417.1084633` ([#25659](https://github.com/hashicorp/terraform-provider-azurerm/issues/25659)) +* `compute` - update Virtual Machine and Virtual Machine Scale Set resources and data sources to use `hashicorp/go-azure-sdk` ([#25533](https://github.com/hashicorp/terraform-provider-azurerm/issues/25533)) +* `machine_learning` - Add new `machine_learning` block that supports `purge_soft_deleted_workspace_on_destroy` ([#25624](https://github.com/hashicorp/terraform-provider-azurerm/issues/25624)) +* `loganalytics` - update cluster resource to use `hashicorp/go-azure-sdk` ([#23373](https://github.com/hashicorp/terraform-provider-azurerm/issues/23373)) +* Data Source: `azurerm_management_group` - now exports the `tenant_scoped_id` attribute ([#25555](https://github.com/hashicorp/terraform-provider-azurerm/issues/25555)) +* `azurerm_container_app` - the `ingress.ip_security_restriction.ip_address_range` property will now accept an IP address as valid input ([#25609](https://github.com/hashicorp/terraform-provider-azurerm/issues/25609)) +* `azurerm_container_group` - the `identity` block can now be updated ([#25543](https://github.com/hashicorp/terraform-provider-azurerm/issues/25543)) +* `azurerm_express_route_connection` - support for the `private_link_fast_path_enabled` property ([#25596](https://github.com/hashicorp/terraform-provider-azurerm/issues/25596)) +* `azurerm_hdinsight_hadoop_cluster` - support for the `private_link_configuration` block ([#25629](https://github.com/hashicorp/terraform-provider-azurerm/issues/25629)) +* `azurerm_hdinsight_hbase_cluster` - support for the `private_link_configuration` block ([#25629](https://github.com/hashicorp/terraform-provider-azurerm/issues/25629)) +* `azurerm_hdinsight_interactive_query_cluster` - support for the `private_link_configuration` block ([#25629](https://github.com/hashicorp/terraform-provider-azurerm/issues/25629)) +* `azurerm_hdinsight_kafka_cluster` - support for the `private_link_configuration` block ([#25629](https://github.com/hashicorp/terraform-provider-azurerm/issues/25629)) +* `azurerm_hdinsight_spark_cluster` - support for the `private_link_configuration` block ([#25629](https://github.com/hashicorp/terraform-provider-azurerm/issues/25629)) +* `azurerm_management_group` - now exports the `tenant_scoped_id` attribute ([#25555](https://github.com/hashicorp/terraform-provider-azurerm/issues/25555)) +* `azurerm_monitor_activity_log_alert` - support for the `location` property ([#25389](https://github.com/hashicorp/terraform-provider-azurerm/issues/25389)) +* `azurerm_mysql_flexible_server` - update validating regex for `sku_name` ([#25642](https://github.com/hashicorp/terraform-provider-azurerm/issues/25642)) +* `azurerm_postgresql_flexible_server` - support for the `GeoRestore` `create_mode` ([#25664](https://github.com/hashicorp/terraform-provider-azurerm/issues/25664)) +* `azurerm_virtual_network_gateway_connection` - support for the `private_link_fast_path_enabled` property ([#25650](https://github.com/hashicorp/terraform-provider-azurerm/issues/25650)) +* `azurerm_windows_web_app` - support for the `handler_mapping` block ([#25631](https://github.com/hashicorp/terraform-provider-azurerm/issues/25631)) +* `azurerm_windows_web_app_slot` - support for the `handler_mapping` block ([#25631](https://github.com/hashicorp/terraform-provider-azurerm/issues/25631)) + +BUG FIXES: + +* storage: prevent a bug causing the second storage account key to be used for authentication instead of the first ([#25652](https://github.com/hashicorp/terraform-provider-azurerm/issues/25652)) +* `azurerm_active_directory_domain_service` - prevent an issue where `filtered_sync_enabled` was not being updated ([#25594](https://github.com/hashicorp/terraform-provider-azurerm/issues/25594)) +* `azurerm_application_insights` - add a state migration to fix the resource ID casing of Application Insights resources ([#25628](https://github.com/hashicorp/terraform-provider-azurerm/issues/25628)) +* `azurerm_function_app_hybrid_connection` - can now use relay resources created in a different resource group ([#25541](https://github.com/hashicorp/terraform-provider-azurerm/issues/25541)) +* `azurerm_kubernetes_cluster_node_pool` - prevent plan diff when the `windows_profile.outbound_nat_enabled` property is unset ([#25644](https://github.com/hashicorp/terraform-provider-azurerm/issues/25644)) +* `azurerm_machine_learning_compute_cluster` - fix location to point to parent resource for computes ([#25643](https://github.com/hashicorp/terraform-provider-azurerm/issues/25643)) +* `azurerm_machine_learning_compute_instance` - fix location to point to parent resource for computes ([#25643](https://github.com/hashicorp/terraform-provider-azurerm/issues/25643)) +* `azurerm_storage_account` - check replication type when evaluating support level for shares and queues for V1 storage accounts ([#25581](https://github.com/hashicorp/terraform-provider-azurerm/issues/25581)) +* `azurerm_storage_account` - added a sanity check for `dns_endpoint_type` and `blob_properties.restore_policy` ([#25450](https://github.com/hashicorp/terraform-provider-azurerm/issues/25450)) +* `azurerm_web_app_hybrid_connection` - can now use relay resources created in a different resource group ([#25541](https://github.com/hashicorp/terraform-provider-azurerm/issues/25541)) +* `azurerm_windows_web_app` - prevent removal of `site_config.application_stack.node_version` when `app_settings` are updated ([#25488](https://github.com/hashicorp/terraform-provider-azurerm/issues/25488)) +* `azurerm_windows_web_app_slot` - prevent removal of `site_config.application_stack.node_version` when `app_settings` are updated ([#25489](https://github.com/hashicorp/terraform-provider-azurerm/issues/25489)) + +DEPRECATIONS: + +* `logz` - the Logz resources are deprecated and will be removed in v4.0 of the AzureRM Provider since the API no longer allows new instances to be created ([#25405](https://github.com/hashicorp/terraform-provider-azurerm/issues/25405)) +* `azurerm_machine_learning_compute_instance` - marked the `location` field as deprecated in v4.0 of the provider ([#25643](https://github.com/hashicorp/terraform-provider-azurerm/issues/25643)) +* `azurerm_kubernetes_cluster` - the following properties have been deprecated since the API no longer supports cluster creation with legacy Azure Entra integration: `client_app_id`, `server_app_id`, `server_app_secret` and `managed` ([#25200](https://github.com/hashicorp/terraform-provider-azurerm/issues/25200)) + +## 3.99.0 (April 11, 2024) + +BREAKING CHANGE: + +* `azurerm_linux_web_app` - `site_config.0.application_stack.0.java_version` must be specified with `java_server` and `java_server_version` ([#25553](https://github.com/hashicorp/terraform-provider-azurerm/issues/25553)) + +ENHANCEMENTS: + +* dependencies: updating to `v0.20240411.1104331` of `github.com/hashicorp/go-azure-sdk/resourcemanager` and `github.com/hashicorp/go-azure-sdk/sdk` ([#25546](https://github.com/hashicorp/terraform-provider-azurerm/issues/25546)) +* dependencies: updating to `v0.26.1` of `github.com/tombuildsstuff/giovanni` ([#25551](https://github.com/hashicorp/terraform-provider-azurerm/issues/25551)) +* `azurerm_key_vault` - deprecate the `contact` property from v3.x provider and update properties to Computed & Optional ([#25552](https://github.com/hashicorp/terraform-provider-azurerm/issues/25552)) +* `azurerm_key_vault_certificate_contacts` - in v4.0 make the `contact` property optional to allow for deletion of contacts from the key vault ([#25552](https://github.com/hashicorp/terraform-provider-azurerm/issues/25552)) +* `azurerm_signalr_service` - support for setting the `sku` property to `Premium_P2` ([#25578](https://github.com/hashicorp/terraform-provider-azurerm/issues/25578)) +* `azurerm_snapshot` - support for the `network_access_policy` and `public_network_access_enabled` properties ([#25421](https://github.com/hashicorp/terraform-provider-azurerm/issues/25421)) +* `azurerm_storage_account` - extend the support level of `(blob|queue|share)_properties` for Storage kind ([#25427](https://github.com/hashicorp/terraform-provider-azurerm/issues/25427)) +* `azurerm_storage_blob` - support for the `encryption_scope` property ([#25551](https://github.com/hashicorp/terraform-provider-azurerm/issues/25551)) +* `azurerm_storage_container` - support for the `default_encryption_scope` and `encryption_scope_override_enabled` properties ([#25551](https://github.com/hashicorp/terraform-provider-azurerm/issues/25551)) +* `azurerm_storage_data_lake_gen2_filesystem` - support for the `default_encryption_scope` property ([#25551](https://github.com/hashicorp/terraform-provider-azurerm/issues/25551)) +* `azurerm_subnet` - the `delegation.x.service_delegation.x.name` property now supports `Oracle.Database/networkAttachments` ([#25571](https://github.com/hashicorp/terraform-provider-azurerm/issues/25571)) +* `azurerm_web_pubsub` - support setting the `sku` property to `Premium_P2` ([#25578](https://github.com/hashicorp/terraform-provider-azurerm/issues/25578)) + +BUG FIXES: + +* provider: fix an issue where the provider was not correctly configured when using a custom metadata host ([#25546](https://github.com/hashicorp/terraform-provider-azurerm/issues/25546)) +* storage: fix a number of potential crashes during plan/apply with resources using the Storage data plane API ([#25525](https://github.com/hashicorp/terraform-provider-azurerm/issues/25525)) +* `azurerm_application_insights` - fix issue where the wrong Application ID was set into the property `app_id` ([#25520](https://github.com/hashicorp/terraform-provider-azurerm/issues/25520)) +* `azurerm_application_insights_api_key` - add a state migration to re-case static segments of the resource ID ([#25567](https://github.com/hashicorp/terraform-provider-azurerm/issues/25567)) +* `azurerm_container_app_environment_certificate` - the `subject_name` attribute is now correctly populated ([#25516](https://github.com/hashicorp/terraform-provider-azurerm/issues/25516)) +* `azurerm_function_app_slot` - will now taint the resource when partially created ([#24520](https://github.com/hashicorp/terraform-provider-azurerm/issues/24520)) +* `azurerm_linux_function_app` - will now taint the resource when partially created ([#24520](https://github.com/hashicorp/terraform-provider-azurerm/issues/24520)) +* `azurerm_managed_disk` - filtering the Resource SKUs response to reduce the memory overhead, when determining whether a Managed Disk can be online resized or not ([#25549](https://github.com/hashicorp/terraform-provider-azurerm/issues/25549)) +* `azurerm_monitor_alert_prometheus_rule_group` - the `severity` property is now set correctly when `0` ([#25408](https://github.com/hashicorp/terraform-provider-azurerm/issues/25408)) +* `azurerm_monitor_smart_detector_alert_rule` - normalising the value for `id` within the `action_group` block ([#25559](https://github.com/hashicorp/terraform-provider-azurerm/issues/25559)) +* `azurerm_redis_cache_access_policy_assignment` - the `object_id_alias` property now allows usernames ([#25523](https://github.com/hashicorp/terraform-provider-azurerm/issues/25523)) +* `azurerm_windows_function_app` - will not taint the resource when partially created ([#24520](https://github.com/hashicorp/terraform-provider-azurerm/issues/24520)) +* `azurerm_windows_function_app` - will not taint the resource when partially created ([#24520](https://github.com/hashicorp/terraform-provider-azurerm/issues/24520)) + +DEPRECATIONS: + +* `azurerm_cosmosdb_account` - the `connection_strings` property has been superseded by the primary and secondary connection strings for sql, mongodb and readonly ([#25510](https://github.com/hashicorp/terraform-provider-azurerm/issues/25510)) +* `azurerm_cosmosdb_account` - the `enable_free_tier` property has been superseded by `free_tier_enabled` ([#25510](https://github.com/hashicorp/terraform-provider-azurerm/issues/25510)) +* `azurerm_cosmosdb_account` - the `enable_multiple_write_locations` property has been superseded by `multiple_write_locations_enabled` ([#25510](https://github.com/hashicorp/terraform-provider-azurerm/issues/25510)) +* `azurerm_cosmosdb_account` - the `enable_automatic_failover` property has been superseded by `automatic_failover_enabled` ([#25510](https://github.com/hashicorp/terraform-provider-azurerm/issues/25510)) + +## 3.98.0 (April 04, 2024) + +FEATURES: + +* New Resource: `azurerm_static_web_app_function_app_registration` ([#25331](https://github.com/hashicorp/terraform-provider-azurerm/issues/25331)) +* New Resource: `azurerm_system_center_virtual_machine_manager_inventory_items` ([#25110](https://github.com/hashicorp/terraform-provider-azurerm/issues/25110)) +* New Resource: `azurerm_workloads_sap_discovery_virtual_instance` ([#24342](https://github.com/hashicorp/terraform-provider-azurerm/issues/24342)) +* New Resource: `azurerm_redis_cache_policy` ([#25477](https://github.com/hashicorp/terraform-provider-azurerm/issues/25477)) +* New Resource: `azurerm_redis_cache_policy_assignment` ([#25477](https://github.com/hashicorp/terraform-provider-azurerm/issues/25477)) + +ENHANCEMENTS: + +* dependencies: updating to `v0.20240402.1085733` of `github.com/hashicorp/go-azure-sdk` ([#25482](https://github.com/hashicorp/terraform-provider-azurerm/issues/25482)) +* dependencies: updating to `v0.67.0` of `github.com/hashicorp/go-azure-helpers` ([#25446](https://github.com/hashicorp/terraform-provider-azurerm/issues/25446)) +* dependencies: updating to `v0.25.4` of `github.com/tombuildsstuff/giovanni` ([#25404](https://github.com/hashicorp/terraform-provider-azurerm/issues/25404)) +* `alertsmanagement` - updating remaining resources to use `hashicorp/go-azure-sdk` ([#25486](https://github.com/hashicorp/terraform-provider-azurerm/issues/25486)) +* `applicationinsights` - updating remaining resources to use `hashicorp/go-azure-sdk` ([#25376](https://github.com/hashicorp/terraform-provider-azurerm/issues/25376)) +* `compute` - update to API version `2024-03-01` ([#25436](https://github.com/hashicorp/terraform-provider-azurerm/issues/25436)) +* `compute` - update shared image resources and data sources to use `hashicorp/go-azure-sdk` ([#25503](https://github.com/hashicorp/terraform-provider-azurerm/issues/25503)) +* `containerinstance` - update to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#25416](https://github.com/hashicorp/terraform-provider-azurerm/issues/25416)) +* `maintenance` - updating to API Version `2023-04-01` ([#25388](https://github.com/hashicorp/terraform-provider-azurerm/issues/25388)) +* `recovery_services` - Add `recovery_service` block to the provider that supports `vm_backup_stop_protection_and_retain_data_on_destroy` and `purge_protected_items_from_vault_on_destroy`([#25515](https://github.com/hashicorp/terraform-provider-azurerm/issues/25515)) +* `storage` - the Storage Account cache is now populated using `hashicorp/go-azure-sdk` ([#25437](https://github.com/hashicorp/terraform-provider-azurerm/issues/25437)) +* `azurerm_bot_service_azure_bot` - support for the `cmk_key_vault_key_url` property ([#23640](https://github.com/hashicorp/terraform-provider-azurerm/issues/23640)) +* `azurerm_capacity_reservation` - update validation for `capacity` ([#25471](https://github.com/hashicorp/terraform-provider-azurerm/issues/25471)) +* `azurerm_container_app` - add support for `key_vault_id` and `identity` properties in the `secret` block ([#24773](https://github.com/hashicorp/terraform-provider-azurerm/issues/24773)) +* `azurerm_databricks_workspace` - expose `managed_services_cmk_key_vault_id` and `managed_disk_cmk_key_vault_id and key_vault_id` to support cross subscription CMK's. ([#25091](https://github.com/hashicorp/terraform-provider-azurerm/issues/25091)) +* `azurerm_databricks_workspace_root_dbfs_customer_managed_key` - expose `key_vault_id` to support cross subscription CMK's. ([#25091](https://github.com/hashicorp/terraform-provider-azurerm/issues/25091)) +* `azurerm_managed_hsm_role_*_ids` - use specific resource id to replace generic nested item id ([#25323](https://github.com/hashicorp/terraform-provider-azurerm/issues/25323)) +* `azurerm_mssql_database` - add support for `secondary_type` ([#25360](https://github.com/hashicorp/terraform-provider-azurerm/issues/25360)) +* `azurerm_monitor_scheduled_query_rules_alert_v2` - support for the `identity` block ([#25365](https://github.com/hashicorp/terraform-provider-azurerm/issues/25365)) +* `azurerm_mssql_server_extended_auditing_policy` - support for `audit_actions_and_groups` and `predicate_expression` ([#25425](https://github.com/hashicorp/terraform-provider-azurerm/issues/25425)) +* `azurerm_netapp_account` - can now be imported ([#25384](https://github.com/hashicorp/terraform-provider-azurerm/issues/25384)) +* `azurerm_netapp_volume` - support for the `kerberos_enabled`, `smb_continuous_availability_enabled`, `kerberos_5_read_only_enabled`, `kerberos_5_read_write_enabled`, `kerberos_5i_read_only_enabled`, `kerberos_5i_read_write_enabled`, `kerberos_5p_read_only_enabled`, and `kerberos_5p_read_write_enabled` properties ([#25385](https://github.com/hashicorp/terraform-provider-azurerm/issues/25385)) +* `azurerm_recovery_services_vault` - upgrading to version `2024-01-01` ([#25325](https://github.com/hashicorp/terraform-provider-azurerm/issues/25325)) +* `azurerm_stack_hci_cluster` - the `client_id` property is now optional ([#25407](https://github.com/hashicorp/terraform-provider-azurerm/issues/25407)) +* `azurerm_storage_encryption_scope` - refactoring to use `hashicorp/go-azure-sdk` rather than `Azure/azure-sdk-for-go` ([#25437](https://github.com/hashicorp/terraform-provider-azurerm/issues/25437)) +* `azurerm_mssql_elasticpool` - the `maintenance_configuration_name` property now supports values `SQL_SouthAfricaNorth_DB_1`, `SQL_SouthAfricaNorth_DB_2`, `SQL_WestUS3_DB_1` and `SQL_WestUS3_DB_2` ([#25500](https://github.com/hashicorp/terraform-provider-azurerm/issues/25500)) +* `azurerm_lighthouse_assignment` - updating API Version from `2019-06-01` to `2022-10-01` ([#25473](https://github.com/hashicorp/terraform-provider-azurerm/issues/25473)) + +BUG FIXES: + +* `network` - updating the `GatewaySubnet` validation to show the Subnet Name when the validation fails ([#25484](https://github.com/hashicorp/terraform-provider-azurerm/issues/25484)) +* `azurerm_function_app_hybrid_connection` - fix an issue during creation when `send_key_name` is specified ([#25379](https://github.com/hashicorp/terraform-provider-azurerm/issues/25379)) +* `azurerm_linux_web_app_slot` - fix a crash when upgrading the provider to v3.88.0 or later ([#25406](https://github.com/hashicorp/terraform-provider-azurerm/issues/25406)) +* `azurerm_mssql_database` - update the behavior of the `enclave_type` field. ([#25508](https://github.com/hashicorp/terraform-provider-azurerm/issues/25508)) +* `azurerm_mssql_elasticpool` - update the behavior of the `enclave_type` field. ([#25508](https://github.com/hashicorp/terraform-provider-azurerm/issues/25508)) +* `azurerm_network_manager_deployment` - add locking ([#25368](https://github.com/hashicorp/terraform-provider-azurerm/issues/25368)) +* `azurerm_resource_group_template_deployment` - changes to `parameters_content` and `template_content` now force `output_content` to be updated in the plan ([#25403](https://github.com/hashicorp/terraform-provider-azurerm/issues/25403)) +* `azurerm_storage_blob` - fix a potential crash when the endpoint is unreachable ([#25404](https://github.com/hashicorp/terraform-provider-azurerm/issues/25404)) +* `azurerm_storage_container` - fix a potential crash when the endpoint is unreachable ([#25404](https://github.com/hashicorp/terraform-provider-azurerm/issues/25404)) +* `azurerm_storage_data_lake_gen2_filesystem` - fix a potential crash when the endpoint is unreachable ([#25404](https://github.com/hashicorp/terraform-provider-azurerm/issues/25404)) +* `azurerm_storage_data_lake_gen2_filesystem_path` - fix a potential crash when the endpoint is unreachable ([#25404](https://github.com/hashicorp/terraform-provider-azurerm/issues/25404)) +* `azurerm_storage_queue` - fix a potential crash when the endpoint is unreachable ([#25404](https://github.com/hashicorp/terraform-provider-azurerm/issues/25404)) +* `azurerm_storage_share` - fix a potential crash when the endpoint is unreachable ([#25404](https://github.com/hashicorp/terraform-provider-azurerm/issues/25404)) +* `azurerm_storage_share_directory` - fix a potential crash when the endpoint is unreachable ([#25404](https://github.com/hashicorp/terraform-provider-azurerm/issues/25404)) +* `azurerm_storage_share_directory` - resolve an issue where directories might fail to destroy ([#25404](https://github.com/hashicorp/terraform-provider-azurerm/issues/25404)) +* `azurerm_storage_share_file` - fix a potential crash when the endpoint is unreachable ([#25404](https://github.com/hashicorp/terraform-provider-azurerm/issues/25404)) +* `azurerm_storage_share_file` - fix several bugs with path handling when creating files in subdirectories ([#25404](https://github.com/hashicorp/terraform-provider-azurerm/issues/25404)) +* `azurerm_web_app_hybrid_connection` - fix an issue during creation when `send_key_name` is specified ([#25379](https://github.com/hashicorp/terraform-provider-azurerm/issues/25379)) +* `azurerm_windows_web_app` - prevent a panic during resource upgrade ([#25509](https://github.com/hashicorp/terraform-provider-azurerm/issues/25509)) + +## 3.97.1 (March 22, 2024) + +ENHANCEMENTS: + +* `azurerm_nginx_deployment` - support for the `configuration` block ([#24276](https://github.com/hashicorp/terraform-provider-azurerm/issues/24276)) + +BUG FIXES: + +* `azurerm_data_factory_integration_runtime_self_hosted` - ensure that autorizationh keys are exported ([#25246](https://github.com/hashicorp/terraform-provider-azurerm/issues/25246)) +* `azurerm_storage_account` - defaulting the value for `dns_endpoint_type` to `Standard` when it's not returned from the Azure API ([#25367](https://github.com/hashicorp/terraform-provider-azurerm/issues/25367)) + + +## 3.97.0 (March 21, 2024) + +BREAKING CHANGES: + +* `azurerm_linux_function_app` - `app_settings["WEBSITE_RUN_FROM_PACKAGE"]` must be added to `ignore_changes` for deployments where an external tool modifies the `WEBSITE_RUN_FROM_PACKAGE` property in the `app_settings` block. ([#24848](https://github.com/hashicorp/terraform-provider-azurerm/issues/24848)) +* `azurerm_linux_function_app_slot` - `app_settings["WEBSITE_RUN_FROM_PACKAGE"]` must be added to `ignore_changes` for deployments where an external tool modifies the `WEBSITE_RUN_FROM_PACKAGE` property in the `app_settings` block. ([#24848](https://github.com/hashicorp/terraform-provider-azurerm/issues/24848)) + +FEATURES: + +* New Resource: `azurerm_elastic_san_volume` ([#24802](https://github.com/hashicorp/terraform-provider-azurerm/issues/24802)) + +ENHANCEMENTS: + +* dependencies: updating to `v0.25.3` of `github.com/tombuildsstuff/giovanni` ([#25362](https://github.com/hashicorp/terraform-provider-azurerm/issues/25362)) +* dependencies: updating to `v0.20240321.1145953` of `github.com/hashicorp/go-azure-sdk` ([#25332](https://github.com/hashicorp/terraform-provider-azurerm/issues/25332)) +* dependencies: updating to `v0.25.2` of `github.com/tombuildsstuff/giovanni` ([#25305](https://github.com/hashicorp/terraform-provider-azurerm/issues/25305)) +* `azurestackhci`: updating to API Version `2024-01-01` ([#25279](https://github.com/hashicorp/terraform-provider-azurerm/issues/25279)) +* `monitor/scheduledqueryrules`: updating to API version `2023-03-15-preview` ([#25350](https://github.com/hashicorp/terraform-provider-azurerm/issues/25350)) +* `cosmosdb`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#25166](https://github.com/hashicorp/terraform-provider-azurerm/issues/25166)) +* Data Source `azurerm_stack_hci_cluster`: refactoring the association to use `hashicorp/go-azure-sdk` ([#25293](https://github.com/hashicorp/terraform-provider-azurerm/issues/25293)) +* `azurerm_app_configuration` - support for Environments other than Azure Public ([#25271](https://github.com/hashicorp/terraform-provider-azurerm/issues/25271)) +* `azurerm_automanage_configuration` - refactoring to use `hashicorp/go-azure-sdk` ([#25293](https://github.com/hashicorp/terraform-provider-azurerm/issues/25293)) +* `azurerm_container_app_environment` - add support for `Consumption` workload profile ([#25285](https://github.com/hashicorp/terraform-provider-azurerm/issues/25285)) +* `azurerm_cosmosdb_postgresql_cluster` - expose list of server names and FQDN in the `servers` block ([#25240](https://github.com/hashicorp/terraform-provider-azurerm/issues/25240)) +* `azurerm_data_share` - hyphens are now allowed in the resource's name ([#25242](https://github.com/hashicorp/terraform-provider-azurerm/issues/25242)) +* `azurerm_data_factory_integration_runtime_azure_ssis` - support for the `copy_compute_scale` and `pipeline_external_compute_scale` blocks ([#25281](https://github.com/hashicorp/terraform-provider-azurerm/issues/25281)) +* `azurerm_healthcare_service` - support for the `identity` and `configuration_export_storage_account_name` properties ([#25193](https://github.com/hashicorp/terraform-provider-azurerm/issues/25193)) +* `azurerm_nginx_deployment` - support the `auto_scale_profile` block ([#24950](https://github.com/hashicorp/terraform-provider-azurerm/issues/24950)) +* `azurerm_netapp_account_resource` - support for the `kerberos_ad_name`, `kerberos_kdc_ip property`, `enable_aes_encryption`, `local_nfs_users_with_ldap_allowed`, `server_root_ca_certificate`, `ldap_over_tls_enabled`, and `ldap_signing_enabled` properties ([#25340](https://github.com/hashicorp/terraform-provider-azurerm/issues/25340)) +* `azurerm_netapp_account_resource` - support for [Support for Azure Netapp Files - AD Site Name #12462] via the `site_name` property ([#25340](https://github.com/hashicorp/terraform-provider-azurerm/issues/25340)) +* `azurerm_stack_hci_cluster`: refactoring the association to use `hashicorp/go-azure-sdk` ([#25293](https://github.com/hashicorp/terraform-provider-azurerm/issues/25293)) +* `azurerm_storage_account` - support for the `dns_endpoint_type` property ([#22583](https://github.com/hashicorp/terraform-provider-azurerm/issues/22583)) +* `azurerm_storage_blob_inventory_policy` - refactoring to use `hashicorp/go-azure-sdk` ([#25268](https://github.com/hashicorp/terraform-provider-azurerm/issues/25268)) +* `azurerm_synapse_spark_pool` - added support for `3.4` ([#25319](https://github.com/hashicorp/terraform-provider-azurerm/issues/25319)) + +BUG FIXES: + +* Data Source: `azurerm_storage_blob` - fix a bug that incorrectly parsed the endpoint in the resource ID ([#25283](https://github.com/hashicorp/terraform-provider-azurerm/issues/25283)) +* Data Source: `azurerm_storage_table_entity` - fixing a regression when parsing the table endpoint ([#25307](https://github.com/hashicorp/terraform-provider-azurerm/issues/25307)) +* `netapp_account_resource` - correct the `smb_server_name` property validation ([#25340](https://github.com/hashicorp/terraform-provider-azurerm/issues/25340)) +* `azurerm_backup_policy_file_share` - prevent a bug when the `include_last_days` property does not work when `days` is empty ([#25280](https://github.com/hashicorp/terraform-provider-azurerm/issues/25280)) +* `azurerm_backup_policy_vm` - prevent a bug when the `include_last_days` property does not work when `days` is empty ([#25280](https://github.com/hashicorp/terraform-provider-azurerm/issues/25280)) +* `azurerm_container_app_custom_domain` - prevent an issue where the secret was not being passed through (#25196) ([#25251](https://github.com/hashicorp/terraform-provider-azurerm/issues/25251)) +* `azurerm_data_protection_backup_instance_kubernetes_cluster` - prevent the protection errosr `ScenarioPluginInvalidWorkflowDataRequest` and `UserErrorKubernetesBackupExtensionUnhealthy` [azurerm_data_protection_backup_instance_kubernetes_cluster is created with message "Fix protection error for the backup instance" and code ScenarioPluginInvalidWorkflowDataRequest #25294] ([#25345](https://github.com/hashicorp/terraform-provider-azurerm/issues/25345)) +* `azurerm_purview_account` - will now allow for PurView accounts with missing or disabled eventhubs without keys ([#25301](https://github.com/hashicorp/terraform-provider-azurerm/issues/25301)) +* `azurerm_storage_account` - fix a crash when the storage account becomes unavailable whilst reading ([#25332](https://github.com/hashicorp/terraform-provider-azurerm/issues/25332)) +* `azurerm_storage_blob` - fixing a regression where blobs within a nested directory wouldn't be parsed correctly ([#25305](https://github.com/hashicorp/terraform-provider-azurerm/issues/25305)) +* `azurerm_storage_data_lake_gen2_path` - fixing a bug where there was no timeout available during import ([#25282](https://github.com/hashicorp/terraform-provider-azurerm/issues/25282)) +* `azurerm_storage_queue` - fixing a bug where the Table URI was obtained rather than the Queue URI ([#25262](https://github.com/hashicorp/terraform-provider-azurerm/issues/25262)) +* `azurerm_subscription` - fixing an issue when creating a subscription alias ([#25181](https://github.com/hashicorp/terraform-provider-azurerm/issues/25181)) + + +## 3.96.0 (March 14, 2024) + +ENHANCEMENTS: + +* dependencies: updating to `v0.20240314.1083835` of `github.com/hashicorp/go-azure-sdk` ([#25255](https://github.com/hashicorp/terraform-provider-azurerm/issues/25255)) +* dependencies: updating to `v0.25.1` of `github.com/tombuildsstuff/giovanni` ([#24798](https://github.com/hashicorp/terraform-provider-azurerm/issues/24798)) +* dependencies: updating to `v1.33.0` of `google.golang.org/protobuf` ([#25243](https://github.com/hashicorp/terraform-provider-azurerm/issues/25243)) +* `storage`: updating the data plane resources to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24798](https://github.com/hashicorp/terraform-provider-azurerm/issues/24798)) +* Data Source: `azurerm_storage_table_entities` - support for AAD authentication ([#24798](https://github.com/hashicorp/terraform-provider-azurerm/issues/24798)) +* Data Source: `azurerm_storage_table_entity` - support for AAD authentication ([#24798](https://github.com/hashicorp/terraform-provider-azurerm/issues/24798)) +* `azurerm_kusto_cluster` - support `None` pattern for the `virtual_network_configuration` block ([#24733](https://github.com/hashicorp/terraform-provider-azurerm/issues/24733)) +* `azurerm_linux_function_app` - support for the Node `20` runtime ([#24073](https://github.com/hashicorp/terraform-provider-azurerm/issues/24073)) +* `azurerm_linux_function_app_slot` - support for the Node `20` runtime ([#24073](https://github.com/hashicorp/terraform-provider-azurerm/issues/24073)) +* `azurerm_stack_hci_cluster` - support the `identity`, `cloud_id`, `service_endpoint` and `resource_provider_object_id` properties ([#25031](https://github.com/hashicorp/terraform-provider-azurerm/issues/25031)) +* `azurerm_storage_share_file` - support for AAD authentication ([#24798](https://github.com/hashicorp/terraform-provider-azurerm/issues/24798)) +* `azurerm_storage_share_directory` - support for AAD authentication, deprecate `share_name` and `storage_account_name` in favor of `storage_share_id` ([#24798](https://github.com/hashicorp/terraform-provider-azurerm/issues/24798)) +* `azurerm_storage_table_entity` - support for AAD authentication, deprecate `share_name` and `storage_account_name` in favor of `storage_table_id` ([#24798](https://github.com/hashicorp/terraform-provider-azurerm/issues/24798)) +* `azurerm_storage_table_entity` - support for AAD authentication ([#24798](https://github.com/hashicorp/terraform-provider-azurerm/issues/24798)) +* `azurerm_windows_function_app` - support for the Node `20` runtime ([#24073](https://github.com/hashicorp/terraform-provider-azurerm/issues/24073)) +* `azurerm_windows_function_app_slot` - support for the Node `20` runtime ([#24073](https://github.com/hashicorp/terraform-provider-azurerm/issues/24073)) +* `azurerm_windows_web_app` - support for the Node `20` runtime ([#24073](https://github.com/hashicorp/terraform-provider-azurerm/issues/24073)) +* `azurerm_windows_web_app_slot` - support for the Node `20` runtime ([#24073](https://github.com/hashicorp/terraform-provider-azurerm/issues/24073)) + +BUG FIXES: + +* `azurerm_container_app_custom_domain` - fix resource ID parsing bug preventing import ([#25192](https://github.com/hashicorp/terraform-provider-azurerm/issues/25192)) +* `azurerm_windows_web_app` - fix incorrect warning message when checking name availability ([#25214](https://github.com/hashicorp/terraform-provider-azurerm/issues/25214)) +* `azurerm_virtual_machine_run_command` - prevent a bug during updates ([#25186](https://github.com/hashicorp/terraform-provider-azurerm/issues/25186)) +* Data Source: `azurerm_storage_table_entities` - Fix `items.x.properties` truncating to one entry ([#25211](https://github.com/hashicorp/terraform-provider-azurerm/issues/25211)) + +## 3.95.0 (March 08, 2024) + +FEATURES: + +* New Resource: `azurerm_container_app_custom_domain` ([#24421](https://github.com/hashicorp/terraform-provider-azurerm/issues/24421)) +* New Resource: `azurerm_data_protection_backup_instance_kubernetes_cluster` ([#24940](https://github.com/hashicorp/terraform-provider-azurerm/issues/24940)) +* New Resource: `azurerm_static_web_app` ([#25117](https://github.com/hashicorp/terraform-provider-azurerm/issues/25117)) +* New resource: `azurerm_static_web_app_custom_domain` ([#25117](https://github.com/hashicorp/terraform-provider-azurerm/issues/25117)) +* New resource: `azurerm_system_center_virtual_machine_manager_availability_set` ([#24975](https://github.com/hashicorp/terraform-provider-azurerm/issues/24975)) +* New Resource: `azurerm_workloads_sap_three_tier_virtual_instance` ([#24384](https://github.com/hashicorp/terraform-provider-azurerm/issues/24384)) +* New Resource: `azurerm_workloads_sap_single_node_virtual_instance` ([#24331](https://github.com/hashicorp/terraform-provider-azurerm/issues/24331)) + +ENHANCEMENTS: + +* `dependencies`: updating to v0.20240229.1102109 of `github.com/hashicorp/go-azure-sdk` ([#25102](https://github.com/hashicorp/terraform-provider-azurerm/issues/25102)) +* `monitor`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` [GH-#25102] +* `network`: updating to API Version `2023-09-01` ([#25095](https://github.com/hashicorp/terraform-provider-azurerm/issues/25095)) +* `azurerm_data_factory_integration_runtime_managed` - support for the `credential_name` property ([#25033](https://github.com/hashicorp/terraform-provider-azurerm/issues/25033)) +* `azurerm_linux_function_app` - support for the `description` property in the `ip_restriction` block ([#24527](https://github.com/hashicorp/terraform-provider-azurerm/issues/24527)) +* `azurerm_linux_function_app` - support for the `ip_restriction_default_action` and `scm_ip_restriction_default_action` properties ([#25131](https://github.com/hashicorp/terraform-provider-azurerm/issues/25131)) +* `azurerm_linux_function_app_slot` - support for the `description` property in the `ip_restriction` block ([#24527](https://github.com/hashicorp/terraform-provider-azurerm/issues/24527)) +* `azurerm_linux_function_app_slot` - support for the `ip_restriction_default_action` and `scm_ip_restriction_default_action` properties ([#25131](https://github.com/hashicorp/terraform-provider-azurerm/issues/25131)) +* `azurerm_linux_web_app` - support for the `description` property in the `ip_restriction` block ([#24527](https://github.com/hashicorp/terraform-provider-azurerm/issues/24527)) +* `azurerm_linux_web_app` - support for the `ip_restriction_default_action` and `scm_ip_restriction_default_action` properties ([#25131](https://github.com/hashicorp/terraform-provider-azurerm/issues/25131)) +* `azurerm_linux_web_app_slot` - support for the `description` property in the `ip_restriction` block ([#24527](https://github.com/hashicorp/terraform-provider-azurerm/issues/24527)) +* `azurerm_linux_web_app_slot` - support for the `ip_restriction_default_action` and `scm_ip_restriction_default_action` properties ([#25131](https://github.com/hashicorp/terraform-provider-azurerm/issues/25131)) +* `azurerm_mysql_flexible_server` - setting the `storage.size_gb` property to a smaller value now forces a new resource to be created ([#25074](https://github.com/hashicorp/terraform-provider-azurerm/issues/25074)) +* `azurerm_orbital_contact_profile` - changing the `channels` property no longer creates a new resource ([#25129](https://github.com/hashicorp/terraform-provider-azurerm/issues/25129)) +* `azurerm_private_dns_resolver_inbound_endpoint` - the `private_ip_address` property is no longer required when `private_ip_allocation_method` is `Dynamic` ([#25035](https://github.com/hashicorp/terraform-provider-azurerm/issues/25035)) +* `stream_analytics_output_blob` - support for the `blob_write_mode` property ([#25127](https://github.com/hashicorp/terraform-provider-azurerm/issues/25127)) +* `azurerm_windows_function_app` - support for the `description` property in the `ip_restriction` block ([#24527](https://github.com/hashicorp/terraform-provider-azurerm/issues/24527)) +* `azurerm_windows_function_app` - support for the `ip_restriction_default_action` and `scm_ip_restriction_default_action` properties ([#25131](https://github.com/hashicorp/terraform-provider-azurerm/issues/25131)) +* `azurerm_windows_function_app_slot` - support for the `description` property in the `ip_restriction` block ([#24527](https://github.com/hashicorp/terraform-provider-azurerm/issues/24527)) +* `azurerm_windows_function_app_slot` - support for the `ip_restriction_default_action` and `scm_ip_restriction_default_action` properties ([#25131](https://github.com/hashicorp/terraform-provider-azurerm/issues/25131)) +* `azurerm_windows_web_app` - support for the `description` property in the `ip_restriction` block ([#24527](https://github.com/hashicorp/terraform-provider-azurerm/issues/24527)) +* `azurerm_windows_web_app` - support for the `ip_restriction_default_action` and `scm_ip_restriction_default_action` properties ([#25131](https://github.com/hashicorp/terraform-provider-azurerm/issues/25131)) +* `azurerm_windows_web_app_slot` - support for the `description` property in the `ip_restriction` block ([#24527](https://github.com/hashicorp/terraform-provider-azurerm/issues/24527)) +* `azurerm_windows_web_app_slot` - support for the `ip_restriction_default_action` and `scm_ip_restriction_default_action` properties ([#25131](https://github.com/hashicorp/terraform-provider-azurerm/issues/25131)) + +BUG FIXES: + +* Data Source: `azurerm_function_app_host_keys` - correctly set `event_grid_extension_key` by searching for the renamed property in the API response ([#25108](https://github.com/hashicorp/terraform-provider-azurerm/issues/25108)) +* `azurerm_app_service_public_certificate` - fix issue where certificate information was not being set correctly in the read ([#24943](https://github.com/hashicorp/terraform-provider-azurerm/issues/24943)) +* `azurerm_container_registry` - prevent recreation of the resource when the `georeplication.tags` are updated ([#24994](https://github.com/hashicorp/terraform-provider-azurerm/issues/24994)) +* `azurerm_firewall_policy_rule_collection_group` - fix issue where the client subscription ID was used to construct the `firewall_policy_id` ([#25145](https://github.com/hashicorp/terraform-provider-azurerm/issues/25145)) +* `azurerm_function_app_hybrid_connection` - fix issue where `SendKeyValue` was not populated in the API payload ([#23761](https://github.com/hashicorp/terraform-provider-azurerm/issues/23761)) +* `azurerm_orbital_contact_profile` - fix creation of the resource when `event_hub_uri` is not specified ([#25128](https://github.com/hashicorp/terraform-provider-azurerm/issues/25128)) +* `azurerm_recovery_services_vault` - prevent a panic when `immutability` is updated ([#25132](https://github.com/hashicorp/terraform-provider-azurerm/issues/25132)) +* `azurerm_storage_account` - fix issue where the queue encryption key type was set as the table encryption key type ([#25046](https://github.com/hashicorp/terraform-provider-azurerm/issues/25046)) +* `azurerm_web_app_hybrid_connection` - fix issue where `SendKeyValue` was not populated in the API payload ([#23761](https://github.com/hashicorp/terraform-provider-azurerm/issues/23761)) +* `azurerm_mssql_database` - fix incorrect error due to typo when using `restore_long_term_retention_backup_id` ([#25180](https://github.com/hashicorp/terraform-provider-azurerm/issues/25180)) + +DEPRECATIONS: + +* Deprecated Resource: `azurerm_static_site` ([#25117](https://github.com/hashicorp/terraform-provider-azurerm/issues/25117)) +* Deprecated Resource: `azurerm_static_site_custom_domain` ([#25117](https://github.com/hashicorp/terraform-provider-azurerm/issues/25117)) +* `azurerm_kubernetes_fleet_manager` - the `hub_profile` property has been deprecated ([#25010](https://github.com/hashicorp/terraform-provider-azurerm/issues/25010)) + +## 3.94.0 (February 29, 2024) + +FEATURES: + +* **New Resource**: `azurerm_kubernetes_fleet_update_run` ([#24813](https://github.com/hashicorp/terraform-provider-azurerm/issues/24813)) + +ENHANCEMENTS: + +* dependencies: updating to `v0.20240228.1142829` of `github.com/hashicorp/go-azure-sdk` ([#25081](https://github.com/hashicorp/terraform-provider-azurerm/issues/25081)) +* `servicefabric`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#25002](https://github.com/hashicorp/terraform-provider-azurerm/issues/25002)) +* `springcloud`: updating to API Version `2024-01-01-preview` ([#24937](https://github.com/hashicorp/terraform-provider-azurerm/issues/24937)) +* `securitycenter`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#25081](https://github.com/hashicorp/terraform-provider-azurerm/issues/25081)) +* Data Source: `azurerm_storage_table_entities` - support for `select` ([#24987](https://github.com/hashicorp/terraform-provider-azurerm/issues/24987)) +* Data Source: `azurerm_netapp_volume` - support for the `smb_access_based_enumeration` and `smb_non_browsable` properties ([#24514](https://github.com/hashicorp/terraform-provider-azurerm/issues/24514)) +* `azurerm_cosmosdb_account` - add support for the `minimal_tls_version` property ([#24966](https://github.com/hashicorp/terraform-provider-azurerm/issues/24966)) +* `azurerm_federated_identity_credential` - the federated credentials can now be changed without creating a new resource ([#25003](https://github.com/hashicorp/terraform-provider-azurerm/issues/25003)) +* `azurerm_kubernetes_cluster` - support for the `current_kubernetes_version` property ([#25079](https://github.com/hashicorp/terraform-provider-azurerm/issues/25079)) +* `azurerm_kubernetes_cluster` - private DNS is now allowed for the `web_app_routing` property ([#25038](https://github.com/hashicorp/terraform-provider-azurerm/issues/25038)) +* `azurerm_kubernetes_cluster` - migration between different `outbound_type`s is now allowed ([#25021](https://github.com/hashicorp/terraform-provider-azurerm/issues/25021)) +* `azurerm_mssql_database` - support for the `recovery_point_id` and `restore_long_term_retention_backup_id` properties ([#24904](https://github.com/hashicorp/terraform-provider-azurerm/issues/24904)) +* `azurerm_linux_virtual_machine` - support for the `automatic_upgrade_enabled`, `disk_controller_type`, `os_image_notification`, `treat_failure_as_deployment_failure_enabled`, and `vm_agent_platform_updates_enabled`properties ([#23394](https://github.com/hashicorp/terraform-provider-azurerm/issues/23394)) +* `azurerm_nginx_deployment` - support for the `automatic_upgrade_channel` property ([#24867](https://github.com/hashicorp/terraform-provider-azurerm/issues/24867)) +* `azurerm_netapp_volume` - support for the `smb_access_based_enumeration` and `smb_non_browsable` properties ([#24514](https://github.com/hashicorp/terraform-provider-azurerm/issues/24514)) +* `azurerm_netapp_pool` - support for the `encryption_type` property ([#24993](https://github.com/hashicorp/terraform-provider-azurerm/issues/24993)) +* `azurerm_role_definition` - upgrade to the API version `2022-05-01-preview` ([#25008](https://github.com/hashicorp/terraform-provider-azurerm/issues/25008)) +* `azurerm_redis_cache` - allow AAD auth for all SKUs ([#25006](https://github.com/hashicorp/terraform-provider-azurerm/issues/25006)) +* `azurerm_sql_managed_instance` - support for the `zone_redundant_enabled` property ([#25089](https://github.com/hashicorp/terraform-provider-azurerm/issues/25089)) +* `azurerm_spring_cloud_gateway` - support for the `application_performance_monitoring_ids` property ([#24919](https://github.com/hashicorp/terraform-provider-azurerm/issues/24919)) +* `azurerm_spring_cloud_configuration_service` - support for the `refresh_interval_in_seconds` property ([#25009](https://github.com/hashicorp/terraform-provider-azurerm/issues/25009)) +* `azurerm_synapse_workspace` - support for using the `user_assigned_identity_id` property within the `customer_managed_key` block ([#25027](https://github.com/hashicorp/terraform-provider-azurerm/issues/25027)) +* `azurerm_windows_virtual_machine` - support for the `automatic_upgrade_enabled`, `disk_controller_type`, `os_image_notification`, `treat_failure_as_deployment_failure_enabled`, and `vm_agent_platform_updates_enabled`properties ([#23394](https://github.com/hashicorp/terraform-provider-azurerm/issues/23394)) + +BUG FIXES: + +* `azurerm_api_management_notification_recipient_email` - fixing an issue where response pages weren't iterated over correctly ([#25055](https://github.com/hashicorp/terraform-provider-azurerm/issues/25055)) +* `azurerm_api_management_notification_recipient_user` - fixing an issue where response pages weren't iterated over correctly ([#25055](https://github.com/hashicorp/terraform-provider-azurerm/issues/25055)) +* `azurerm_batch_pool` - fix setting the `extension.settings_json` property ([#24976](https://github.com/hashicorp/terraform-provider-azurerm/issues/24976)) +* `azurerm_key_vault_key` - `expiration_date` can be updated if newer date is ahead ([#25000](https://github.com/hashicorp/terraform-provider-azurerm/issues/25000)) +* `azurerm_pim_active_role_assignment` - fix an isue where the resource would disappear or fail to import after 45 days ([#24524](https://github.com/hashicorp/terraform-provider-azurerm/issues/24524)) +* `azurerm_pim_eligible_role_assignment` - fix an isue where the resource would disappear or fail to import after 45 days ([#24524](https://github.com/hashicorp/terraform-provider-azurerm/issues/24524)) +* `azurerm_recovery_services_vault` - validate that `use_system_assigned_identity` and `user_assigned_identity_id` cannot be set at the same time ([#24091](https://github.com/hashicorp/terraform-provider-azurerm/issues/24091)) +* `azurerm_recovery_vaults` will now create properly with `SystemAssigned,UserAssigned` identity ([#24978](https://github.com/hashicorp/terraform-provider-azurerm/issues/24978)) +* `azurerm_subscription` - fixing an issue where response pages weren't iterated over correctly ([#25055](https://github.com/hashicorp/terraform-provider-azurerm/issues/25055)) + +## 3.93.0 (February 22, 2024) + +FEATURES: + +* **New Data Source**: `azurerm_express_route_circuit_peering` ([#24971](https://github.com/hashicorp/terraform-provider-azurerm/issues/24971)) +* **New Data Source**: `azurerm_storage_table_entities` ([#24973](https://github.com/hashicorp/terraform-provider-azurerm/issues/24973)) +* **New Resource**: `azurerm_dev_center_catalog` ([#24833](https://github.com/hashicorp/terraform-provider-azurerm/issues/24833)) +* **New Resource**: `azurerm_system_center_virtual_machine_manager_server` ([#24278](https://github.com/hashicorp/terraform-provider-azurerm/issues/24278)) + +BUG FIXES: + +* `azurerm_key_vault` - conditionally polling the Data Plane endpoint when `public_network_access_enabled` is set to false ([#23823](https://github.com/hashicorp/terraform-provider-azurerm/issues/23823)) +* `azurerm_storage_account` - allow the `identity.type` property to be `SystemAssigned, UserAssigned` when using a Customer Managed Key ([#24923](https://github.com/hashicorp/terraform-provider-azurerm/issues/24923)) +* `azurerm_automation_account` - prevent the `identity.identity_ids` User Assigned identity being set when not specified in config ([#24977](https://github.com/hashicorp/terraform-provider-azurerm/issues/24977)) + +ENHANCEMENTS: + +* dependencies: updating to `v0.20240221.1170458` of `hashicorp/go-azure-sdk` ([#24967](https://github.com/hashicorp/terraform-provider-azurerm/issues/24967)) +* dependencies: refactor `azurerm_spring_cloud_configuration_service` to use `go-azure-sdk` ([#24918](https://github.com/hashicorp/terraform-provider-azurerm/issues/24918)) +* provider: support or the feature flag `virtual_machine_scale_set.reimage_on_manual_upgrade` ([#22975](https://github.com/hashicorp/terraform-provider-azurerm/issues/22975)) +* `sentinel`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24962](https://github.com/hashicorp/terraform-provider-azurerm/issues/24962)) +* `sqlvirtualmachines`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24912](https://github.com/hashicorp/terraform-provider-azurerm/issues/24912)) +* `nginx` : updating to use `2024-01-01-preview` ([#24868](https://github.com/hashicorp/terraform-provider-azurerm/issues/24868)) +* `azurerm_cosmosdb_account` - support for the `backup.tier` property ([#24595](https://github.com/hashicorp/terraform-provider-azurerm/issues/24595)) +* `azurerm_linux_virtual_machine` - the `virtual_machine_scale_set_id` proeprty can now be changed without creating a new resource ([#24768](https://github.com/hashicorp/terraform-provider-azurerm/issues/24768)) +* `azurerm_machine_learning_workspace` - support for the `managed_network.isolation_mode` property ([#24951](https://github.com/hashicorp/terraform-provider-azurerm/issues/24951)) +* `azurerm_private_dns_resolver_inbound_endpoint` - support the `static` value for the `private_ip_allocation_method` property ([#24952](https://github.com/hashicorp/terraform-provider-azurerm/issues/24952)) +* `azurerm_postgresql_flexible_server` - expose the `storage_tier` field ([#24892](https://github.com/hashicorp/terraform-provider-azurerm/issues/24892)) +* `azurerm_redis_cache` - support for the `preferred_data_persistence_auth_method` property ([#24370](https://github.com/hashicorp/terraform-provider-azurerm/issues/24370)) +* `azurerm_servicebus_namespace` - support for the `premium_messaging_partitions` property ([#24676](https://github.com/hashicorp/terraform-provider-azurerm/issues/24676)) +* `azurerm_windows_virtual_machine` - the `virtual_machine_scale_set_id` proeprty can now be changed without creating a new resource ([#24768](https://github.com/hashicorp/terraform-provider-azurerm/issues/24768)) + +BUG FIXES: + +* `azurerm_cognitive_deployment` - the `version_upgrade_option` property can not be updated without creating a new resource ([#24922](https://github.com/hashicorp/terraform-provider-azurerm/issues/24922)) +* `azurerm_data_protection_backup_vault` - support or the `soft_delete` and `retention_duration_in_days` properties ([#24775](https://github.com/hashicorp/terraform-provider-azurerm/issues/24775)) +* `azurerm_data_factory_pipeline` - correctly handle incorrect header values ([#24921](https://github.com/hashicorp/terraform-provider-azurerm/issues/24921)) +* `azurerm_kusto_cluster` - `optimized_auto_scale` is now updated after `sku` has been updated ([#24906](https://github.com/hashicorp/terraform-provider-azurerm/issues/24906)) +* `azurerm_key_vault_certificate` - will now only update the `lifetime_action` of the certificate block unless otherwise required ([#24755](https://github.com/hashicorp/terraform-provider-azurerm/issues/24755)) +* `azurerm_linux_virtual_machine_scale_set` - correctly include `public_ip_prefix_id` during updates ([#24939](https://github.com/hashicorp/terraform-provider-azurerm/issues/24939)) +* `azurerm_postgresql_flexible_server` - the `customer_managed_key.key_vault_key_id` property is now required ([#24981](https://github.com/hashicorp/terraform-provider-azurerm/issues/24981)) +* `azurerm_nginx_deployment` - changing the `sku` property now creates a new resource ([#24905](https://github.com/hashicorp/terraform-provider-azurerm/issues/24905)) +* `azurerm_orchestrated_virtual_machine_scale_set` - the `disk_size_gb` and `lun` parameters of `data_disks` are optional now ([#24944](https://github.com/hashicorp/terraform-provider-azurerm/issues/24944)) +* `azurerm_storage_account` - change order of API calls to be GET-then-PUT ratehr then PATCHES ([#23935](https://github.com/hashicorp/terraform-provider-azurerm/issues/23935)) +* `azurerm_storage_account` - improve the validation around the `immutability_policy` being used with `blob_properties` ([#24938](https://github.com/hashicorp/terraform-provider-azurerm/issues/24938)) +* `azurerm_security_center_setting` - prevent a bug when name is `SENTINEL` ([#24497](https://github.com/hashicorp/terraform-provider-azurerm/issues/24497)) +* `azurerm_windows_virtual_machine_scale_set` - correctly include `public_ip_prefix_id` during updates ([#24939](https://github.com/hashicorp/terraform-provider-azurerm/issues/24939)) + + + +## 3.92.0 (February 15, 2024) + +FEATURES: + +* **New Data Source**: `azurerm_virtual_desktop_application_group` ([#24771](https://github.com/hashicorp/terraform-provider-azurerm/issues/24771)) + +ENHANCEMENTS: + +* provider: support for the feature flag `postgresql_flexible_server.restart_server_on_configuration_value_change property` ([#23811](https://github.com/hashicorp/terraform-provider-azurerm/issues/23811)) +* dependencies: updating to v0.20240214.1142753 of `github.com/hashicorp/go-azure-sdk` ([#24889](https://github.com/hashicorp/terraform-provider-azurerm/issues/24889)) +* `automation`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24858](https://github.com/hashicorp/terraform-provider-azurerm/issues/24858)) +* `maintenance`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24819](https://github.com/hashicorp/terraform-provider-azurerm/issues/24819)) +* `containerapps`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24862](https://github.com/hashicorp/terraform-provider-azurerm/issues/24862)) +* `containerservices`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24872](https://github.com/hashicorp/terraform-provider-azurerm/issues/24872)) +* `timeseriesinsights`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24889](https://github.com/hashicorp/terraform-provider-azurerm/issues/24889)) +* `azurerm_container_app_environment`: support for the `infrastructure_resource_group_name` property ([#24361](https://github.com/hashicorp/terraform-provider-azurerm/issues/24361)) +* `azurerm_cost_anomaly_alert` - support for the `subscription_id` property ([#24258](https://github.com/hashicorp/terraform-provider-azurerm/issues/24258)) +* `azurerm_cosmosdb_account` - add default values for the `consistency_policy` code block ([#24830](https://github.com/hashicorp/terraform-provider-azurerm/issues/24830)) +* `azurerm_dashboard_grafana` - support for the `smtp` block ([#24717](https://github.com/hashicorp/terraform-provider-azurerm/issues/24717)) +* `azurerm_key_vault_certificates` - support for the `tags` property ([#24857](https://github.com/hashicorp/terraform-provider-azurerm/issues/24857)) +* `azurerm_key_vault_secrets` - support for the `tags` property ([#24857](https://github.com/hashicorp/terraform-provider-azurerm/issues/24857)) +* `azurerm_orchestrated_virtual_machine_scale_set` - support for the `additional_unattend_content` block ([#24292](https://github.com/hashicorp/terraform-provider-azurerm/issues/24292)) +* `azurerm_virtual_desktop_host_pool` - support for the `vm_template` property ([#24369](https://github.com/hashicorp/terraform-provider-azurerm/issues/24369)) + +BUG FIXES: + +* `azurerm_container_app_environment`: avoid unwanted changes when updating and using `log_analytics_workspace_id` ([#24303](https://github.com/hashicorp/terraform-provider-azurerm/issues/24303)) +* `azurerm_cosmosdb_account` - fixed regression in the `backup` code block ([#24830](https://github.com/hashicorp/terraform-provider-azurerm/issues/24830)) +* `azurerm_data_factory` - allow the `git_url` property to be blank/empty ([#24879](https://github.com/hashicorp/terraform-provider-azurerm/issues/24879)) +* `azurerm_linux_web_app_slot` - the `worker_count` property now works correctly in the `site_config` block ([#24515](https://github.com/hashicorp/terraform-provider-azurerm/issues/24515)) +* `azurerm_linux_web_app` - support `off` for the `file_system_level` property ([#24877](https://github.com/hashicorp/terraform-provider-azurerm/issues/24877)) +* `azurerm_linux_web_app_slot` - support `off` for the `file_system_level` property ([#24877](https://github.com/hashicorp/terraform-provider-azurerm/issues/24877)) +* `azurerm_private_endpoint` - fixing an issue where updating the Private Endpoint would remove any Application Security Group Association ([#24846](https://github.com/hashicorp/terraform-provider-azurerm/issues/24846)) +* `azurerm_search_service` - fixed the update function to adjust for changed API behaviour ([#24837](https://github.com/hashicorp/terraform-provider-azurerm/issues/24837)) +* `azurerm_search_service` - fixed the update function to adjust for changed API behaviour ([#24903](https://github.com/hashicorp/terraform-provider-azurerm/issues/24903)) +* `azurerm_windows_web_app` - support `off` for the `file_system_level` property ([#24877](https://github.com/hashicorp/terraform-provider-azurerm/issues/24877)) +* `azurerm_windows_web_app_slot` - support `off` for the `file_system_level` property ([#24877](https://github.com/hashicorp/terraform-provider-azurerm/issues/24877)) + +## 3.91.0 (February 08, 2024) + +FEATURES: + +* **New Data Source**: `azurerm_databricks_access_connector` ([#24769](https://github.com/hashicorp/terraform-provider-azurerm/issues/24769)) +* **New Resource**: `azurerm_data_protection_backup_policy_kubernetes_cluster` ([#24718](https://github.com/hashicorp/terraform-provider-azurerm/issues/24718)) +* **New Resource**: `azurerm_chaos_studio_experiment` ([#24779](https://github.com/hashicorp/terraform-provider-azurerm/issues/24779)) +* **New Resource**: `azurerm_chaos_studio_capability` ([#24779](https://github.com/hashicorp/terraform-provider-azurerm/issues/24779)) +* **New Resource**: `azurerm_dev_center_gallery` ([#23760](https://github.com/hashicorp/terraform-provider-azurerm/issues/23760)) +* **New Resource:** `azurerm_kubernetes_fleet_member` ([#24792](https://github.com/hashicorp/terraform-provider-azurerm/issues/24792)) +* **New Resource:** `azurerm_iotcentral_organization` ([#23132](https://github.com/hashicorp/terraform-provider-azurerm/issues/23132)) +* **New Resource:** `azurerm_spring_cloud_app_dynamics_application_performance_monitoring` ([#24750](https://github.com/hashicorp/terraform-provider-azurerm/issues/24750)) + +ENHANCEMENTS: + +* dependencies: updating to `v0.20240208.1095436` of `github.com/hashicorp/go-azure-sdk/resource-manager` ([#24819](https://github.com/hashicorp/terraform-provider-azurerm/issues/24819)) +* dependencies: updating to `v0.20240208.1095436` of `github.com/hashicorp/go-azure-sdk/sdk` ([#24819](https://github.com/hashicorp/terraform-provider-azurerm/issues/24819)) +* dependencies: refactor `azurerm_app_service_environment_v3` to use `go-azure-sdk` ([#24760](https://github.com/hashicorp/terraform-provider-azurerm/issues/24760)) +* dependencies: refactor `azurerm_role_definition` to use `go-azure-sdk` ([#24266](https://github.com/hashicorp/terraform-provider-azurerm/issues/24266)) +* `managedhsm`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24761](https://github.com/hashicorp/terraform-provider-azurerm/issues/24761)) +* `hdinsight`: updating to API Version `2023-07-01` ([#24761](https://github.com/hashicorp/terraform-provider-azurerm/issues/24761)) +* `streamanalytics`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24819](https://github.com/hashicorp/terraform-provider-azurerm/issues/24819)) +* `azurerm_app_service_environment_v3` - support for the `remote_debugging_enabled` property ([#24760](https://github.com/hashicorp/terraform-provider-azurerm/issues/24760)) +* `azurerm_storage_account` - support for the `local_user_enabled` property ([#24800](https://github.com/hashicorp/terraform-provider-azurerm/issues/24800)) +* `azurerm_log_analytics_workspace_table` - support for the `total_retention_in_days` property ([#24513](https://github.com/hashicorp/terraform-provider-azurerm/issues/24513)) +* `azurerm_maching_learning_workspace` - support for the `feature_store` and `kind` properties ([#24716](https://github.com/hashicorp/terraform-provider-azurerm/issues/24716)) +* `azurerm_traffic_manager_azure_endpoint` - support for the `always_serve_enabled` property ([#24573](https://github.com/hashicorp/terraform-provider-azurerm/issues/24573)) +* `azurerm_traffic_manager_external_endpoint` - support for the `always_serve_enabled` property ([#24573](https://github.com/hashicorp/terraform-provider-azurerm/issues/24573)) + +BUG FIXES: + +* `azurerm_api_management` - the `virtual_network_configuration` property now updates correctly outside of `virtual_network_type` ([#24569](https://github.com/hashicorp/terraform-provider-azurerm/issues/24569)) + +## 3.90.0 (February 01, 2024) + +UPGRADE NOTES: + +* provider - The provider will now automatically register the `AppConfiguration`, `DataFactory`, and `SignalRService` Resource Providers. When running Terraform with limited permissions, note that you [must disable automatic Resource Provider Registration and ensure that any Resource Providers Terraform requires are registered]([XXX](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs#skip_provider_registration)). ([#24645](https://github.com/hashicorp/terraform-provider-azurerm/issues/24645)) + +FEATURES: + +* **New Data Source**: `azurerm_nginx_configuration` ([#24642](https://github.com/hashicorp/terraform-provider-azurerm/issues/24642)) +* **New Data Source**: `azurerm_virtual_desktop_workspace` ([#24732](https://github.com/hashicorp/terraform-provider-azurerm/issues/24732)) +* **New Resource**: `azurerm_kubernetes_fleet_update_strategy` ([#24328](https://github.com/hashicorp/terraform-provider-azurerm/issues/24328)) +* **New Resource**: `azurerm_site_recovery_vmware_replicated_vm` ([#22477](https://github.com/hashicorp/terraform-provider-azurerm/issues/22477)) +* **New Resource**: `azurerm_spring_cloud_new_relic_application_performance_monitoring` ([#24699](https://github.com/hashicorp/terraform-provider-azurerm/issues/24699)) + +ENHANCEMENTS: + +* provider: registering the Resource Provider `Microsoft.AppConfiguration` ([#24645](https://github.com/hashicorp/terraform-provider-azurerm/issues/24645)) +* provider: registering the Resource Provider `Microsoft.DataFactory` ([#24645](https://github.com/hashicorp/terraform-provider-azurerm/issues/24645)) +* provider: registering the Resource Provider `Microsoft.SignalRService` ([#24645](https://github.com/hashicorp/terraform-provider-azurerm/issues/24645)) +* provider: the Provider is now built using Go 1.21.6 ([#24653](https://github.com/hashicorp/terraform-provider-azurerm/issues/24653)) +* dependencies: the dependency `github.com/hashicorp/go-azure-sdk` has been split into multiple Go Modules - and as such will be referred to by those paths going forwards ([#24636](https://github.com/hashicorp/terraform-provider-azurerm/issues/24636)) +* dependencies: updating to ``v0.20240201.1064937` of `github.com/hashicorp/go-azure-sdk/resource-manager` ([#24738](https://github.com/hashicorp/terraform-provider-azurerm/issues/24738)) +* dependencies: updating to `v0.20240201.1064937` of `github.com/hashicorp/go-azure-sdk/sdk` ([#24738](https://github.com/hashicorp/terraform-provider-azurerm/issues/24738)) +* `appservice`: update to `go-azure-sdk` and API version `2023-01-01` ([#24688](https://github.com/hashicorp/terraform-provider-azurerm/issues/24688)) +* `datafactory`: updating to use `tombuildsstuff/kermit` ([#24675](https://github.com/hashicorp/terraform-provider-azurerm/issues/24675)) +* `hdinsight`: refactoring to use `github.com/hashicorp/go-azure-sdk/resource-manager` ([#24011](https://github.com/hashicorp/terraform-provider-azurerm/issues/24011)) +* `hdinsight`: updating to API Version `2021-06-01` ([#24011](https://github.com/hashicorp/terraform-provider-azurerm/issues/24011)) +* `loadbalancer`: updating to use `hashicorp/go-azure-sdk` ([#24291](https://github.com/hashicorp/terraform-provider-azurerm/issues/24291)) +* `nginx`: updating to API Version `2023-09-01` ([#24640](https://github.com/hashicorp/terraform-provider-azurerm/issues/24640)) +* `servicefabricmanagedcluster`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24654](https://github.com/hashicorp/terraform-provider-azurerm/issues/24654)) +* `springcloud`: updating to use API Version `2023-11-01-preview` ([#24690](https://github.com/hashicorp/terraform-provider-azurerm/issues/24690)) +* `subscriptions`: refactoring to use `hashicorp/go-azure-sdk` ([#24663](https://github.com/hashicorp/terraform-provider-azurerm/issues/24663)) +* Data Source: `azurerm_stream_analytics_job` - support for User Assigned Identities ([#24738](https://github.com/hashicorp/terraform-provider-azurerm/issues/24738)) +* `azurerm_cosmosdb_account` - support for the `gremlin_database` and `tables_to_restore` properties ([#24627](https://github.com/hashicorp/terraform-provider-azurerm/issues/24627)) +* `azurerm_bot_channel_email` - support for the `magic_code` property ([#23129](https://github.com/hashicorp/terraform-provider-azurerm/issues/23129)) +* `azurerm_cosmosdb_account` - support for the `partition_merge_enabled` property ([#24615](https://github.com/hashicorp/terraform-provider-azurerm/issues/24615)) +* `azurerm_mssql_managed_database` - support for the `immutable_backups_enabled` property ([#24745](https://github.com/hashicorp/terraform-provider-azurerm/issues/24745)) +* `azurerm_mssql_database` - support for the `immutable_backups_enabled` property ([#24745](https://github.com/hashicorp/terraform-provider-azurerm/issues/24745)) +* `azurerm_palo_alto_next_generation_firewall_virtual_hub_panorama` - support for the `trusted_address_ranges` property ([#24459](https://github.com/hashicorp/terraform-provider-azurerm/issues/24459)) +* `azurerm_palo_alto_next_generation_firewall_virtual_network_local_rulestack` - support for the `trusted_address_ranges` property ([#24459](https://github.com/hashicorp/terraform-provider-azurerm/issues/24459)) +* `azurerm_palo_alto_next_generation_firewall_virtual_network_panorama` - support for the `trusted_address_ranges` property ([#24459](https://github.com/hashicorp/terraform-provider-azurerm/issues/24459)) +* `azurerm_servicebus_namespace` - updating to use API Version `2022-10-01-preview` ([#24650](https://github.com/hashicorp/terraform-provider-azurerm/issues/24650)) +* `azurerm_spring_cloud_api_portal` - support for the `api_try_out_enabled` property ([#24696](https://github.com/hashicorp/terraform-provider-azurerm/issues/24696)) +* `azurerm_spring_cloud_gateway` - support for the `local_response_cache_per_route` and `local_response_cache_per_instance` properties ([#24697](https://github.com/hashicorp/terraform-provider-azurerm/issues/24697)) +* `azurerm_stream_analytics_job` - support for User Assigned Identities ([#24738](https://github.com/hashicorp/terraform-provider-azurerm/issues/24738)) +* `azurerm_subscription` - refactoring to use `hashicorp/go-azure-sdk` to set tags on the subscription ([#24734](https://github.com/hashicorp/terraform-provider-azurerm/issues/24734)) +* `azurerm_virtual_desktop_workspace` - correctly validate the `name` property ([#24668](https://github.com/hashicorp/terraform-provider-azurerm/issues/24668)) + + +BUG FIXES: + +* provider: skip registration for resource providers that are unavailable ([#24571](https://github.com/hashicorp/terraform-provider-azurerm/issues/24571)) +* `azurerm_app_configuration` - no longer require `lifecycle_ignore_changes` for the `value` property when using a key vault reference ([#24702](https://github.com/hashicorp/terraform-provider-azurerm/issues/24702)) +* `azurerm_app_service_managed_certificate` - fix casing issue in `app_service_plan_id` by parsing insensitively ([#24664](https://github.com/hashicorp/terraform-provider-azurerm/issues/24664)) +* `azurerm_cognitive_deployment` - updates now include the `version` property ([#24700](https://github.com/hashicorp/terraform-provider-azurerm/issues/24700)) +* `azurerm_dns_cname_record` - prevent casing issue in `target_resource_id` by parsing the ID insensitively ([#24181](https://github.com/hashicorp/terraform-provider-azurerm/issues/24181)) +* `azurerm_mssql_managed_instance_failover_group` - prevent an issue when trying to create a failover group with a managed instance from a different subscription ([#24646](https://github.com/hashicorp/terraform-provider-azurerm/issues/24646)) +* `azurerm_storage_account` - conditionally update properties only when needed ([#24669](https://github.com/hashicorp/terraform-provider-azurerm/issues/24669)) +* `azurerm_storage_account` - change update order for `access_tier`to prevent errors when uploading blobs to the archive tier ([#22250](https://github.com/hashicorp/terraform-provider-azurerm/issues/22250)) + +## 3.89.0 (January 25, 2024) + +FEATURES: + +* New Data Source: `azurerm_data_factory_trigger_schedule` ([#24572](https://github.com/hashicorp/terraform-provider-azurerm/issues/24572)) +* New Data Source: `azurerm_data_factory_trigger_schedules` ([#24572](https://github.com/hashicorp/terraform-provider-azurerm/issues/24572)) +* New Data Source: `azurerm_ip_groups` ([#24540](https://github.com/hashicorp/terraform-provider-azurerm/issues/24540)) +* New Data Source: `azurerm_nginx_certificate` ([#24577](https://github.com/hashicorp/terraform-provider-azurerm/issues/24577)) +* New Resource: `azurerm_chaos_studio_target` ([#24580](https://github.com/hashicorp/terraform-provider-azurerm/issues/24580)) +* New Resource: `azurerm_elastic_san_volume_group` ([#24166](https://github.com/hashicorp/terraform-provider-azurerm/issues/24166)) +* New Resource: `azurerm_netapp_account_encryption` ([#23733](https://github.com/hashicorp/terraform-provider-azurerm/issues/23733)) +* New Resource: `azurerm_redhat_openshift_cluster` ([#24375](https://github.com/hashicorp/terraform-provider-azurerm/issues/24375)) + +ENHANCEMENTS: + +* dependencies: updating to `v0.66.1` of `github.com/hashicorp/go-azure-helpers` ([#24561](https://github.com/hashicorp/terraform-provider-azurerm/issues/24561)) +* dependencies: updating to `v0.20240124.1115501` of `github.com/hashicorp/go-azure-sdk` ([#24619](https://github.com/hashicorp/terraform-provider-azurerm/issues/24619)) +* `bot`: updating to API Version `2021-05-01-preview` ([#24555](https://github.com/hashicorp/terraform-provider-azurerm/issues/24555)) +* `containerservice`: the SDK Clients now support logging ([#24564](https://github.com/hashicorp/terraform-provider-azurerm/issues/24564)) +* `cosmosdb`: updating to API Version `2023-04-15` ([#24541](https://github.com/hashicorp/terraform-provider-azurerm/issues/24541)) +* `loadtestservice`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` (and support logging) ([#24578](https://github.com/hashicorp/terraform-provider-azurerm/issues/24578)) +* `managedidentity`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` (and support logging) ([#24578](https://github.com/hashicorp/terraform-provider-azurerm/issues/24578)) +* `azurerm_api_management_api` - change the `id` format so specific `revision`s can be managed by Terraform ([#23031](https://github.com/hashicorp/terraform-provider-azurerm/issues/23031)) +* `azurerm_data_protection_backup_vault` - the `redundancy` propety can now be set to `ZoneRedundant` ([#24556](https://github.com/hashicorp/terraform-provider-azurerm/issues/24556)) +* `azurerm_data_factory_integration_runtime_azure_ssis` - support for the `credential_name` property ([#24458](https://github.com/hashicorp/terraform-provider-azurerm/issues/24458)) +* `azurerm_orchestrated_virtual_machine_scale_set` - support `2022-datacenter-azure-edition-hotpatch` and `2022-datacenter-azure-edition-hotpatch-smalldisk` hotpatching images ([#23500](https://github.com/hashicorp/terraform-provider-azurerm/issues/23500)) +* `azurerm_stream_analytics_job` - support for the `sku_name` property ([#24554](https://github.com/hashicorp/terraform-provider-azurerm/issues/24554)) + +BUG FIXES: + +* Data Source: `azurerm_app_service` - parsing the API Response for `app_service_plan_id` case-insensitively ([#24626](https://github.com/hashicorp/terraform-provider-azurerm/issues/24626)) +* Data Source: `azurerm_function_app` - parsing the API Response for `app_service_plan_id` case-insensitively ([#24626](https://github.com/hashicorp/terraform-provider-azurerm/issues/24626)) +* `azurerm_app_configuration_key` - the value for the `value` property can now be removed/emptied ([#24582](https://github.com/hashicorp/terraform-provider-azurerm/issues/24582)) + +* `azurerm_app_service` - parsing the API Response for `app_service_plan_id` case-insensitively ([#24626](https://github.com/hashicorp/terraform-provider-azurerm/issues/24626)) +* `azurerm_app_service_plan` - fix casing in `serverFarms` due to ID update ([#24562](https://github.com/hashicorp/terraform-provider-azurerm/issues/24562)) +* `azurerm_app_service_slot` - parsing the API Response for `app_service_plan_id` case-insensitively ([#24626](https://github.com/hashicorp/terraform-provider-azurerm/issues/24626)) +* `azurerm_automation_schedule` - only one `monthly_occurence` block can now be specified ([#24614](https://github.com/hashicorp/terraform-provider-azurerm/issues/24614)) +* `azurerm_cognitive_deployment` - the `model.version` property is no longer required ([#24264](https://github.com/hashicorp/terraform-provider-azurerm/issues/24264)) +* `azurerm_container_app` - multiple `custom_scale_rule` can not be updated ([#24509](https://github.com/hashicorp/terraform-provider-azurerm/issues/24509)) +* `azurerm_container_registry_task_schedule_run_now` - prevent issue where the incorrect scheduled run in tracked if there have been multiple ([#24592](https://github.com/hashicorp/terraform-provider-azurerm/issues/24592)) +* `azurerm_function_app` - parsing the API Response for `app_service_plan_id` case-insensitively ([#24626](https://github.com/hashicorp/terraform-provider-azurerm/issues/24626)) +* `azurerm_function_app_slot` - parsing the API Response for `app_service_plan_id` case-insensitively ([#24626](https://github.com/hashicorp/terraform-provider-azurerm/issues/24626)) +* `azurerm_logic_app_standard` - now will parse the app service ID insensitively ([#24562](https://github.com/hashicorp/terraform-provider-azurerm/issues/24562)) +* `azurerm_logic_app_workflow` - the `workflow_parameters` will now correctly handle information specified by `$connections` ([#24141](https://github.com/hashicorp/terraform-provider-azurerm/issues/24141)) +* `azurerm_mssql_managed_instance_security_alert_policy` - can not update empty storage attributes ([#24553](https://github.com/hashicorp/terraform-provider-azurerm/issues/24553)) +* `azurerm_network_interface` - the `ip_configuration` properties are no longer added to a Load Balancer Backend if one of those `ip_configurations` is associated with a backend ([#24470](https://github.com/hashicorp/terraform-provider-azurerm/issues/24470)) + +## 3.88.0 (January 18, 2024) + +FEATURES: + +* New Data Source: `azurerm_nginx_deployment` ([#24492](https://github.com/hashicorp/terraform-provider-azurerm/issues/24492)) +* New Resource: `azurerm_spring_cloud_dynatrace_application_performance_monitoring` ([#23889](https://github.com/hashicorp/terraform-provider-azurerm/issues/23889)) +* New Resource: `azurerm_virtual_machine_run_command` ([#23377](https://github.com/hashicorp/terraform-provider-azurerm/issues/23377)) + +ENHANCEMENTS: + +* dependencies: updating to `v0.20240117.1163544` of `github.com/hashicorp/go-azure-sdk` ([#24481](https://github.com/hashicorp/terraform-provider-azurerm/issues/24481)) +* dependencies: updating to `v0.65.1` of `github.com/hashicorp/go-azure-helpers` ([#24479](https://github.com/hashicorp/terraform-provider-azurerm/issues/24479)) +* `datashare`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24481](https://github.com/hashicorp/terraform-provider-azurerm/issues/24481)) +* `kusto`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24477](https://github.com/hashicorp/terraform-provider-azurerm/issues/24477)) +* Data Source: `azurerm_application_gateway` - support for the `trusted_client_certificate.data` property ([#24474](https://github.com/hashicorp/terraform-provider-azurerm/issues/24474)) +* `azurerm_service_plan`: refactoring to use `hashicorp/go-azure-sdk` ([#24483](https://github.com/hashicorp/terraform-provider-azurerm/issues/24483)) +* `azurerm_container_group` - support for the `priority` property ([#24374](https://github.com/hashicorp/terraform-provider-azurerm/issues/24374)) +* `azurerm_mssql_managed_database` - support for the `point_in_time_restore` property ([#24535](https://github.com/hashicorp/terraform-provider-azurerm/issues/24535)) +* `azurerm_mssql_managed_instance` - now exports the `dns_zone` attribute ([#24435](https://github.com/hashicorp/terraform-provider-azurerm/issues/24435)) +* `azurerm_linux_web_app_slot` - support for setting `python_version` to `3.12` ([#24363](https://github.com/hashicorp/terraform-provider-azurerm/issues/24363)) +* `azurerm_linux_web_app` - support for setting `python_version` to `3.12` ([#24363](https://github.com/hashicorp/terraform-provider-azurerm/issues/24363)) +* `azurerm_linux_function_app_slot` - support for setting `python_version` to `3.12` ([#24363](https://github.com/hashicorp/terraform-provider-azurerm/issues/24363)) +* `azurerm_linux_function_app` - support for setting `python_version` to `3.12` ([#24363](https://github.com/hashicorp/terraform-provider-azurerm/issues/24363)) + +BUG FIXES: + +* `azurerm_application_gateway` - the `components` property within the `url` block is no longer computed ([#24480](https://github.com/hashicorp/terraform-provider-azurerm/issues/24480)) +* `azurerm_cdn_frontdoor_route` - prevent an issue where `cdn_frontdoor_origin_path` gets removed on update if unchanged. ([#24488](https://github.com/hashicorp/terraform-provider-azurerm/issues/24488)) +* `azurerm_cognitive_account` - fixing support for the `DC0` SKU ([#24526](https://github.com/hashicorp/terraform-provider-azurerm/issues/24526)) + +## 3.87.0 (January 11, 2024) + +FEATURES: + +* New Data Source: `azurerm_network_manager` ([#24398](https://github.com/hashicorp/terraform-provider-azurerm/issues/24398)) +* New Resource: `azurerm_security_center_server_vulnerability_assessments_setting` ([#24299](https://github.com/hashicorp/terraform-provider-azurerm/issues/24299)) + +ENHANCEMENTS: + +* dependencies: updating to `v0.20240111.1094251` of `github.com/hashicorp/go-azure-sdk` ([#24463](https://github.com/hashicorp/terraform-provider-azurerm/issues/24463)) +* Data Source: `azurerm_mssql_database` - support for `identity`, `transparent_data_encryption_enabled`, `transparent_data_encryption_key_vault_key_id` and `transparent_data_encryption_key_automatic_rotation_enabled` ([#24412](https://github.com/hashicorp/terraform-provider-azurerm/issues/24412)) +* Data Source: `azurerm_mssql_server` - support for `transparent_data_encryption_key_vault_key_id` ([#24412](https://github.com/hashicorp/terraform-provider-azurerm/issues/24412)) +* `machinelearning`: updating to API Version `2023-10-01` ([#24416](https://github.com/hashicorp/terraform-provider-azurerm/issues/24416)) +* `paloaltonetworks`: updating to API Version `2023-09-01` ([#24290](https://github.com/hashicorp/terraform-provider-azurerm/issues/24290)) +* `azurerm_container_app` - update create time validations for `ingress.0.traffic_weight` ([#24042](https://github.com/hashicorp/terraform-provider-azurerm/issues/24042)) +* `azurerm_container_app`- support for the `ip_security_restriction` block ([#23870](https://github.com/hashicorp/terraform-provider-azurerm/issues/23870)) +* `azurerm_kubernetes_cluster` - properties in `default_node_pool.linux_os_config.sysctl_config` are now updateable via node pool cycling ([#24397](https://github.com/hashicorp/terraform-provider-azurerm/issues/24397)) +* `azurerm_linux_web_app` - support the `VS2022` value for the `remote_debugging_version` property ([#24407](https://github.com/hashicorp/terraform-provider-azurerm/issues/24407)) +* `azurerm_mssql_database` - support for `identity`, `transparent_data_encryption_key_vault_key_id` and `transparent_data_encryption_key_automatic_rotation_enabled` ([#24412](https://github.com/hashicorp/terraform-provider-azurerm/issues/24412)) +* `azurerm_postgres_flexible_server` - the `sku_name` property now supports being set to `MO_Standard_E96ds_v5` ([#24367](https://github.com/hashicorp/terraform-provider-azurerm/issues/24367)) +* `azurerm_role_assignment` - support for the `principal_type` property ([#24271](https://github.com/hashicorp/terraform-provider-azurerm/issues/24271)) +* `azurerm_windows_web_app` - support the `VS2022` value for the `remote_debugging_version` property ([#24407](https://github.com/hashicorp/terraform-provider-azurerm/issues/24407)) +* `azurerm_cdn_frontdoor_firewall_policy` - support for `request_body_check_enabled` property ([#24406](https://github.com/hashicorp/terraform-provider-azurerm/issues/24406)) + +BUG FIXES: + +* Data Source: `azurerm_role_definition` - fix `role_definition_id` ([#24418](https://github.com/hashicorp/terraform-provider-azurerm/issues/24418)) +* `azurerm_api_management` - the `sku_name` property can now be updated ([#24431](https://github.com/hashicorp/terraform-provider-azurerm/issues/24431)) +* `azurerm_arc_kubernetes_flux_configuration` - prevent a bug where certain sensitive properties for `bucket` and `git_repository` were being overwritten after an update to the resource is made ([#24066](https://github.com/hashicorp/terraform-provider-azurerm/issues/24066)) +* `azurerm_kubernetes_flux_configuration` - prevent a bug where certain sensitive properties for `bucket` and `git_repository` were being overwritten after an update to the resource is made ([#24066](https://github.com/hashicorp/terraform-provider-azurerm/issues/24066)) +* `azure_linux_web_app` - prevent a bug in App Service processing of `application_stack` in updates to `site_config` ([#24424](https://github.com/hashicorp/terraform-provider-azurerm/issues/24424)) +* `azure_linux_web_app_slot` - Fix bug in App Service processing of `application_stack` in updates to `site_config` ([#24424](https://github.com/hashicorp/terraform-provider-azurerm/issues/24424)) +* `azurerm_network_manager_deployment` - update creation wait logic to better tolerate the api returning not found ([#24330](https://github.com/hashicorp/terraform-provider-azurerm/issues/24330)) +* `azurerm_virtual_machine_data_disk_attachment` - do not update applications profile with disks ([#24145](https://github.com/hashicorp/terraform-provider-azurerm/issues/24145)) +* `azure_windows_web_app` - prevent a bug in App Service processing of `application_stack` in updates to `site_config` ([#24424](https://github.com/hashicorp/terraform-provider-azurerm/issues/24424)) +* `azure_windows_web_app_slot` - prevent a bug in App Service processing of `application_stack` in updates to `site_config` ([#24424](https://github.com/hashicorp/terraform-provider-azurerm/issues/24424)) +* `azurerm_maintenance_configuration` - set the `reboot` property in flatten from `AlwaysReboot` to `Always` ([#24376](https://github.com/hashicorp/terraform-provider-azurerm/issues/24376)) +* `azurerm_container_app_environment` - the `workload_profile` property can now be updated ([#24409](https://github.com/hashicorp/terraform-provider-azurerm/issues/24409)) + +## 3.86.0 (January 04, 2024) + +FEATURES: + +* New Data Source: `azurerm_dashboard_grafana` ([#24243](https://github.com/hashicorp/terraform-provider-azurerm/issues/24243)) +* New Resource: `azurerm_log_analytics_workspace_table` ([#24229](https://github.com/hashicorp/terraform-provider-azurerm/issues/24229)) +* New Resource: `azurerm_automation_powershell72_module` ([#23980](https://github.com/hashicorp/terraform-provider-azurerm/issues/23980)) +* New Resource: `azurerm_data_factory_credential_user_managed_identity` ([#24307](https://github.com/hashicorp/terraform-provider-azurerm/issues/24307)) + +ENHANCEMENTS: + +* dependencies: updating to `v0.20231215.1114251` of `hashicorp/go-azure-sdk` ([#24251](https://github.com/hashicorp/terraform-provider-azurerm/issues/24251)) +* dependencies: `azurerm_spring_cloud_api_portal` - update to use `hashicorp/go-azure-sdk` ([#24321](https://github.com/hashicorp/terraform-provider-azurerm/issues/24321)) +* Data Source: `azurerm_kusto_cluster` - now exports the `identity` block ([#24314](https://github.com/hashicorp/terraform-provider-azurerm/issues/24314)) +* `azurerm_data_protection_backup_policy_postgresql` - support for the `time_zone` property ([#24312](https://github.com/hashicorp/terraform-provider-azurerm/issues/24312)) +* `azurerm_data_protection_backup_policy_disk` - support for the `time_zone` property ([#24312](https://github.com/hashicorp/terraform-provider-azurerm/issues/24312)) +* `azurerm_key_vault_managed_hardware_security_module` -the `tags` property can now be updated ([#24333](https://github.com/hashicorp/terraform-provider-azurerm/issues/24333)) +* `azurerm_logic_app_standard` - support for the `site_config.0.public_network_access_enabled` property ([#24257](https://github.com/hashicorp/terraform-provider-azurerm/issues/24257)) +* `azurerm_log_analytics_workspace_table` - support for the `plan` property ([#24341](https://github.com/hashicorp/terraform-provider-azurerm/issues/24341)) +* `azurerm_linux_web_app` - support the value `20-lts` for the `node_version` property ([#24289](https://github.com/hashicorp/terraform-provider-azurerm/issues/24289)) +* `azurerm_recovery_services_vault` - support creation with immutability set to locked ([#23806](https://github.com/hashicorp/terraform-provider-azurerm/issues/23806)) +* `azurerm_spring_cloud_service` - support for the `sku_tier` property ([#24103](https://github.com/hashicorp/terraform-provider-azurerm/issues/24103)) + +BUG FIXES: + +* Data Source: `azurerm_role_definition` - correctly export the `role_definition_id` attribute ([#24320](https://github.com/hashicorp/terraform-provider-azurerm/issues/24320)) +* `azurerm_bot_service` - fixing a bug where `public_network_access_enabled` was always set to `true` ([#24255](https://github.com/hashicorp/terraform-provider-azurerm/issues/24255)) +* `azurerm_bot_service_azure_bot` - `tags` can now be updated ([#24332](https://github.com/hashicorp/terraform-provider-azurerm/issues/24332)) +* `azurerm_cosmosdb_account` - fix validation for the `ip_range_filter` property ([#24306](https://github.com/hashicorp/terraform-provider-azurerm/issues/24306)) +* `azurerm_linux_virtual_machine` - the `additional_capabilities.0.ultra_ssd_enabled` can now be changed during the update ([#24274](https://github.com/hashicorp/terraform-provider-azurerm/issues/24274)) +* `azurerm_logic_app_standard` - update the default value of `version` from `~3` which is no longer supported to `~4` ([#24134](https://github.com/hashicorp/terraform-provider-azurerm/issues/24134)) +* `azurerm_logic_app_standard` - fix a crash when setting the default `version` 4.0 flag ([#24322](https://github.com/hashicorp/terraform-provider-azurerm/issues/24322)) +* `azurerm_iothub_device_update_account` - changing the `sku` property now creates a new resource ([#24324](https://github.com/hashicorp/terraform-provider-azurerm/issues/24324)) +* `azurerm_iothub` - prevent an inconsistant value after an apply ([#24326](https://github.com/hashicorp/terraform-provider-azurerm/issues/24326)) +* `azurerm_orchestrated_virtual_machine_scale_set` - correctly update the resource when hotpatch is enabled ([#24335](https://github.com/hashicorp/terraform-provider-azurerm/issues/24335)) +* `azurerm_windows_virtual_machine` - the `additional_capabilities.0.ultra_ssd_enabled` can now be changed during the update ([#24274](https://github.com/hashicorp/terraform-provider-azurerm/issues/24274)) +* `azurerm_scheduled_query_rules_alert` - changing the `data_source_id` now creates a new resource ([#24327](https://github.com/hashicorp/terraform-provider-azurerm/issues/24327)) +* `azurerm_scheduled_query_rules_log` - changing the `data_source_id` now creates a new resource ([#24327](https://github.com/hashicorp/terraform-provider-azurerm/issues/24327)) + +## 3.85.0 (December 14, 2023) + +FEATURES: + +* New Data Source: `azurerm_locations` ([#23324](https://github.com/hashicorp/terraform-provider-azurerm/issues/23324)) + +ENHANCEMENTS: + +* provider: support for authenticating using Azure Kubernetes Service Workload Identity ([#23965](https://github.com/hashicorp/terraform-provider-azurerm/issues/23965)) +* dependencies: updating to `v0.65.0` of `github.com/hashicorp/go-azure-helpers` ([#24222](https://github.com/hashicorp/terraform-provider-azurerm/issues/24222)) +* dependencies: updating to `v0.20231214.1220802` of `github.com/hashicorp/go-azure-sdk` ([#24246](https://github.com/hashicorp/terraform-provider-azurerm/issues/24246)) +* dependencies: updating to version `v0.20231214.1160726` of `github.com/hashicorp/go-azure-sdk` ([#24241](https://github.com/hashicorp/terraform-provider-azurerm/issues/24241)) +* dependencies: update `security/automation` to use `hashicorp/go-azure-sdk` ([#24156](https://github.com/hashicorp/terraform-provider-azurerm/issues/24156)) +* dependencies `dataprotection`: updating to API Version `2023-05-01` ([#24143](https://github.com/hashicorp/terraform-provider-azurerm/issues/24143)) +* `kusto`: removing the remnants of the old Resource ID Parsers now this uses `hashicorp/go-azure-sdk` ([#24238](https://github.com/hashicorp/terraform-provider-azurerm/issues/24238)) +* Data Source: `azurerm_cognitive_account` - export the `identity` block ([#24214](https://github.com/hashicorp/terraform-provider-azurerm/issues/24214)) +* Data Source: `azurerm_monitor_workspace` - add support for the `default_data_collection_endpoint_id` and `default_data_collection_rule_id` properties ([#24153](https://github.com/hashicorp/terraform-provider-azurerm/issues/24153)) +* Data Source: `azurerm_shared_image_gallery` - add support for the `image_names` property ([#24176](https://github.com/hashicorp/terraform-provider-azurerm/issues/24176)) +* `azurerm_dns_txt_record` - allow up to `4096` characters for the property `record.value` ([#24169](https://github.com/hashicorp/terraform-provider-azurerm/issues/24169)) +* `azurerm_container_app` - support for the `workload_profile_name` property ([#24219](https://github.com/hashicorp/terraform-provider-azurerm/issues/24219)) +* `azurerm_container_app` - suppot for the `init_container` block ([#23955](https://github.com/hashicorp/terraform-provider-azurerm/issues/23955)) +* `azurerm_hpc_cache_blob_nfs_target` - support for the `verification_timer_in_seconds` and `write_back_timer_in_seconds` properties ([#24207](https://github.com/hashicorp/terraform-provider-azurerm/issues/24207)) +* `azurerm_hpc_cache_nfs_target` - support for the `verification_timer_in_seconds` and `write_back_timer_in_seconds` properties ([#24208](https://github.com/hashicorp/terraform-provider-azurerm/issues/24208)) +* `azurerm_linux_web_app` - make `client_secret_setting_name` optional and conflict with `client_secret_certificate_thumbprint` ([#21834](https://github.com/hashicorp/terraform-provider-azurerm/issues/21834)) +* `azurerm_linux_web_app_slot` - make `client_secret_setting_name` optional and conflict with `client_secret_certificate_thumbprint` ([#21834](https://github.com/hashicorp/terraform-provider-azurerm/issues/21834)) +* `azurerm_linux_web_app` - fix a bug in `app_settings` where settings could be lost ([#24221](https://github.com/hashicorp/terraform-provider-azurerm/issues/24221)) +* `azurerm_linux_web_app_slot` - fix a bug in `app_settings` where settings could be lost ([#24221](https://github.com/hashicorp/terraform-provider-azurerm/issues/24221)) +* `azurerm_log_analytics_workspace` - add support for the `immediate_data_purge_on_30_days_enabled` property ([#24015](https://github.com/hashicorp/terraform-provider-azurerm/issues/24015)) +* `azurerm_mssql_server` - support for other identity types for the key vault key ([#24236](https://github.com/hashicorp/terraform-provider-azurerm/issues/24236)) +* `azurerm_machine_learning_datastore_blobstorage` - resource now skips validation when being created ([#24078](https://github.com/hashicorp/terraform-provider-azurerm/issues/24078)) +* `azurerm_machine_learning_datastore_datalake_gen2` - resource now skips validation when being created ([#24078](https://github.com/hashicorp/terraform-provider-azurerm/issues/24078)) +* `azurerm_machine_learning_datastore_fileshare` - resource now skips validation when being created ([#24078](https://github.com/hashicorp/terraform-provider-azurerm/issues/24078)) +* `azurerm_monitor_workspace` - support for the `default_data_collection_endpoint_id` and `default_data_collection_rule_id` properties ([#24153](https://github.com/hashicorp/terraform-provider-azurerm/issues/24153)) +* `azurerm_redis_cache` - support for the `storage_account_subscription_id` property ([#24101](https://github.com/hashicorp/terraform-provider-azurerm/issues/24101)) +* `azurerm_storage_blob` - support for the `source_content` type `Page` ([#24177](https://github.com/hashicorp/terraform-provider-azurerm/issues/24177)) +* `azurerm_web_application_firewall_policy` - support new values to the `rule_group_name` property ([#24194](https://github.com/hashicorp/terraform-provider-azurerm/issues/24194)) +* `azurerm_windows_web_app` - make the `client_secret_setting_name` property optional and conflicts with the `client_secret_certificate_thumbprint` property ([#21834](https://github.com/hashicorp/terraform-provider-azurerm/issues/21834)) +* `azurerm_windows_web_app_slot` - make the `client_secret_setting_name` property optional and conflicts with the `client_secret_certificate_thumbprint` property ([#21834](https://github.com/hashicorp/terraform-provider-azurerm/issues/21834)) +* `azurerm_windows_web_app` - fix a bug in `app_settings` where settings could be lost ([#24221](https://github.com/hashicorp/terraform-provider-azurerm/issues/24221)) +* `azurerm_windows_web_app_slot` - fix a bug in `app_settings` where settings could be lost ([#24221](https://github.com/hashicorp/terraform-provider-azurerm/issues/24221)) +* `azurerm_cognitive_account` - add `ContentSafety` to the `kind` property validation ([#24205](https://github.com/hashicorp/terraform-provider-azurerm/issues/24205)) + +BUG FIXES: + +* provider: fix an authentication issue with Azure Storage when running in Azure China cloud ([#24246](https://github.com/hashicorp/terraform-provider-azurerm/issues/24246)) +* Data Source: `azurerm_role_definition` - fix bug where `role_definition_id` and `scope` were being incorrectly set ([#24211](https://github.com/hashicorp/terraform-provider-azurerm/issues/24211)) +* `azurerm_batch_account` - fix bug where `UserAssigned, SystemAssigned` could be passed to the resource even though it isn't supported ([#24204](https://github.com/hashicorp/terraform-provider-azurerm/issues/24204)) +* `azurerm_batch_pool` - fix bug where `settings_json` and `protected_settings` were not being unmarshaled ([#24075](https://github.com/hashicorp/terraform-provider-azurerm/issues/24075)) +* `azurerm_bot_service_azure_bot` - fix bug where `public_network_access_enabled` was being set as the value for `LuisKey` ([#24164](https://github.com/hashicorp/terraform-provider-azurerm/issues/24164)) +* `azurerm_cognitive_account_customer_managed_key` - `identity_client_id` is no longer passed to the api when it is empty ([#24231](https://github.com/hashicorp/terraform-provider-azurerm/issues/24231)) +* `azurerm_linux_web_app_slot` - error when `service_plan_id` is identical to the parent `service_plan_id` ([#23403](https://github.com/hashicorp/terraform-provider-azurerm/issues/23403)) +* `azurerm_management_group_template_deployment` - fixing a bug where `template_spec_version_id` couldn't be updated ([#24072](https://github.com/hashicorp/terraform-provider-azurerm/issues/24072)) +* `azurerm_pim_active_role_assignment` - fix an importing issue by filtering available role assignments based on the provided `scope` ([#24077](https://github.com/hashicorp/terraform-provider-azurerm/issues/24077)) +* `azurerm_pim_eligible_role_assignment` - fix an importing issue by filtering available role assignments based on the provided `scope` ([#24077](https://github.com/hashicorp/terraform-provider-azurerm/issues/24077)) +* `azurerm_resource_group_template_deployment` - fixing a bug where `template_spec_version_id` couldn't be updated ([#24072](https://github.com/hashicorp/terraform-provider-azurerm/issues/24072)) +* `azurerm_security_center_setting` - fix the casing for the `setting_name` `Sentinel` ([#24210](https://github.com/hashicorp/terraform-provider-azurerm/issues/24210)) +* `azurerm_storage_account` - Fix crash when checking for `routingInputs.PublishInternetEndpoints` and `routingInputs.PublishMicrosoftEndpoints` ([#24228](https://github.com/hashicorp/terraform-provider-azurerm/issues/24228)) +* `azurerm_storage_share_file` - prevent panic when the file specified by `source` is empty ([#24179](https://github.com/hashicorp/terraform-provider-azurerm/issues/24179)) +* `azurerm_subscription_template_deployment` - fixing a bug where `template_spec_version_id` couldn't be updated ([#24072](https://github.com/hashicorp/terraform-provider-azurerm/issues/24072)) +* `azurerm_tenant_template_deployment` - fixing a bug where `template_spec_version_id` couldn't be updated ([#24072](https://github.com/hashicorp/terraform-provider-azurerm/issues/24072)) +* `azurerm_virtual_machine` - prevent a panic by nil checking the first element of `additional_capabilities` ([#24159](https://github.com/hashicorp/terraform-provider-azurerm/issues/24159)) +* `azurerm_windows_web_app_slot` - error when `service_plan_id` is identical to the parent `service_plan_id` ([#23403](https://github.com/hashicorp/terraform-provider-azurerm/issues/23403)) + +## 3.84.0 (December 07, 2023) + +FEATURES: + +* **New Data Source:** `azurerm_storage_containers` ([#24061](https://github.com/hashicorp/terraform-provider-azurerm/issues/24061)) +* **New Resource:** `azurerm_elastic_san` ([#23619](https://github.com/hashicorp/terraform-provider-azurerm/issues/23619)) +* **New Resource:** `azurerm_key_vault_managed_hardware_security_module_role_assignment` ([#22332](https://github.com/hashicorp/terraform-provider-azurerm/issues/22332)) +* **New Resource:** `azurerm_key_vault_managed_hardware_security_module_role_definition` ([#22332](https://github.com/hashicorp/terraform-provider-azurerm/issues/22332)) + +ENHANCEMENTS: + +* dependencies: updating mssql elasticpools from `v5.0` to `2023-05-01-preview` +* dependencies: updating to `v0.20231207.1122031` of `github.com/hashicorp/go-azure-sdk` ([#24149](https://github.com/hashicorp/terraform-provider-azurerm/issues/24149)) +* Data Source: `azurerm_storage_account` - export the primary and secondary internet and microsoft hostnames for blobs, dfs, files, queues, tables and web ([#23517](https://github.com/hashicorp/terraform-provider-azurerm/issues/23517)) +* Data Source: `azurerm_cosmosdb_account` - export the `connection_strings`, `primary_sql_connection_string`, `secondary_sql_connection_string`, `primary_readonly_sql_connection_string`, `secondary_readonly_sql_connection_string`, `primary_mongodb_connection_string`, `secondary_mongodb_connection_string`, `primary_readonly_mongodb_connection_string`, and `secondary_readonly_mongodb_connection_string` attributes ([#24129](https://github.com/hashicorp/terraform-provider-azurerm/issues/24129)) +* `azurerm_bot_service_azure_bot` - support for the `public_network_access_enabled` property ([#24125](https://github.com/hashicorp/terraform-provider-azurerm/issues/24125)) +* `azurerm_container_app_environment` - support for the `workload_profile` property ([#23478](https://github.com/hashicorp/terraform-provider-azurerm/issues/23478)) +* `azurerm_cosmosdb_cassandra_datacenter` - support for the `seed_node_ip_addresses` property ([#24076](https://github.com/hashicorp/terraform-provider-azurerm/issues/24076)) +* `azurerm_firewall` - support for the `dns_proxy_enabled` property ([#20519](https://github.com/hashicorp/terraform-provider-azurerm/issues/20519)) +* `azurerm_kubernetes_cluster` - support for the `support_plan` property and the `sku_tier` `Premium` ([#23970](https://github.com/hashicorp/terraform-provider-azurerm/issues/23970)) +* `azurerm_mssql_database` - support for `enclave_type` field ([#24054](https://github.com/hashicorp/terraform-provider-azurerm/issues/24054)) +* `azurerm_mssql_elasticpool` - support for `enclave_type` field ([#24054](https://github.com/hashicorp/terraform-provider-azurerm/issues/24054)) +* `azurerm_mssql_managed_instance` - support for more `vcores`: `6`, `10`, `12`, `20`, `48`, `56`, `96`, `128` ([#24085](https://github.com/hashicorp/terraform-provider-azurerm/issues/24085)) +* `azurerm_redis_linked_server` - support for the property `geo_replicated_primary_host_name` ([#23984](https://github.com/hashicorp/terraform-provider-azurerm/issues/23984)) +* `azurerm_storage_account` - expose the primary and secondary internet and microsoft hostnames for blobs, dfs, files, queues, tables and web ([#23517](https://github.com/hashicorp/terraform-provider-azurerm/issues/23517)) +* `azurerm_synapse_role_assignment` - support for the `principal_type` property ([#24089](https://github.com/hashicorp/terraform-provider-azurerm/issues/24089)) +* `azurerm_spring_cloud_build_deployment` - support for the `application_performance_monitoring_ids` property ([#23969](https://github.com/hashicorp/terraform-provider-azurerm/issues/23969)) +* `azurerm_virtual_network_gateway` - support for the `bgp_route_translation_for_nat_enabled`, `dns_forwarding_enabled`, `ip_sec_replay_protection_enabled`, `remote_vnet_traffic_enabled`, `virtual_wan_traffic_enabled`, `radius_server`, `virtual_network_gateway_client_connection`, `policy_group`, and `ipsec_policy` property ([#23220](https://github.com/hashicorp/terraform-provider-azurerm/issues/23220)) + +BUG FIXES: + +* `azurerm_application_insights_api_key` - prevent a bug where multiple keys couldn't be created for an Application Insights instance ([#23463](https://github.com/hashicorp/terraform-provider-azurerm/issues/23463)) +* `azurerm_container_registry` - the `network_rule_set.virtual_network` property has been deprecated ([#24140](https://github.com/hashicorp/terraform-provider-azurerm/issues/24140)) +* `azurerm_hdinsight_hadoop_cluster` - set `roles.edge_node.install_script_action.parameters` into state by retrieving the value provided in the user config since this property isn't returned by the API ([#23971](https://github.com/hashicorp/terraform-provider-azurerm/issues/23971)) +* `azurerm_kubernetes_cluster` - prevent a bug where maintenance window start date was always recalculated and sent to the API ([#23985](https://github.com/hashicorp/terraform-provider-azurerm/issues/23985)) +* `azurerm_mssql_database` - will no longer send all long retention values in payload unless set ([#24124](https://github.com/hashicorp/terraform-provider-azurerm/issues/24124)) +* `azurerm_mssql_managed_database` - will no longer send all long retention values in payload unless set ([#24124](https://github.com/hashicorp/terraform-provider-azurerm/issues/24124)) +* `azurerm_mssql_server_microsoft_support_auditing_policy` - only include storage endpoint in payload if set ([#24122](https://github.com/hashicorp/terraform-provider-azurerm/issues/24122)) +* `azurerm_mobile_network_packet_core_control_plane` - prevent a panic if the HTTP Response is nil ([#24083](https://github.com/hashicorp/terraform-provider-azurerm/issues/24083)) +* `azurerm_storage_account` - revert plan time name validation `(#23799)` ([#24142](https://github.com/hashicorp/terraform-provider-azurerm/issues/24142)) +* `azurerm_web_application_firewall_policy` - split create and update function to fix lifecycle - ignore changes ([#23412](https://github.com/hashicorp/terraform-provider-azurerm/issues/23412)) + +## 3.83.0 (November 30, 2023) + +UPGRADE NOTES: + +* Key Vaults are now loaded using [the `ListBySubscription` API within the Key Vault Resource Provider](https://learn.microsoft.com/en-us/rest/api/keyvault/keyvault/vaults/list-by-subscription?view=rest-keyvault-keyvault-2022-07-01&tabs=HTTP) rather than [the Resources API](https://learn.microsoft.com/en-us/rest/api/keyvault/keyvault/vaults/list?view=rest-keyvault-keyvault-2022-07-01&tabs=HTTP). This change means that the Provider now caches the list of Key Vaults available within a Subscription, rather than loading these piecemeal to workaround stale data returned from the Resources API ([#24019](https://github.com/hashicorp/terraform-provider-azurerm/issues/24019)) + +FEATURES: + +* New Data Source: `azurerm_stack_hci_cluster` ([#24032](https://github.com/hashicorp/terraform-provider-azurerm/issues/24032)) + +ENHANCEMENTS: + +* dependencies: updating to `v0.20231129.1103252` of `github.com/hashicorp/go-azure-sdk` ([#24063](https://github.com/hashicorp/terraform-provider-azurerm/issues/24063)) +* `automation`: updating to API Version `2023-11-01` ([#24017](https://github.com/hashicorp/terraform-provider-azurerm/issues/24017)) +* `keyvault`: the cache is now populated using the `ListBySubscription` endpoint on the KeyVault Resource Provider rather than via the `Resources` API ([#24019](https://github.com/hashicorp/terraform-provider-azurerm/issues/24019)). +* `keyvault`: updating the cache to populate all Key Vaults available within the Subscription to reduce the number of API calls ([#24019](https://github.com/hashicorp/terraform-provider-azurerm/issues/24019)) +* Data Source `azurerm_private_dns_zone`: refactoring to use the `ListBySubscription` API rather than the Resources API when `resource_group_name` is omitted ([#24024](https://github.com/hashicorp/terraform-provider-azurerm/issues/24024)) +* `azurerm_dashboard_grafana` - support for `grafana_major_version` ([#24014](https://github.com/hashicorp/terraform-provider-azurerm/issues/24014)) +* `azurerm_linux_web_app` - add support for dotnet 8 ([#23893](https://github.com/hashicorp/terraform-provider-azurerm/issues/23893)) +* `azurerm_linux_web_app_slot` - add support for dotnet 8 ([#23893](https://github.com/hashicorp/terraform-provider-azurerm/issues/23893)) +* `azurerm_media_transform` - deprecate `face_detector_preset` and `video_analyzer_preset` ([#24002](https://github.com/hashicorp/terraform-provider-azurerm/issues/24002)) +* `azurerm_postgresql_database` - update the validation of `collation` to include `Norwegian_Norway.1252` ([#24070](https://github.com/hashicorp/terraform-provider-azurerm/issues/24070)) +* `azurerm_postgresql_flexible_server` - updating to API Version `2023-06-01-preview` ([#24016](https://github.com/hashicorp/terraform-provider-azurerm/issues/24016)) +* `azurerm_redis_cache` - support for the `active_directory_authentication_enabled` property ([#23976](https://github.com/hashicorp/terraform-provider-azurerm/issues/23976)) +* `azurerm_windows_web_app` - add support for dotnet 8 ([#23893](https://github.com/hashicorp/terraform-provider-azurerm/issues/23893)) +* `azurerm_windows_web_app_slot` - add support for dotnet 8 ([#23893](https://github.com/hashicorp/terraform-provider-azurerm/issues/23893)) +* `azurerm_storage_account` - add `name` validation in custom diff ([#23799](https://github.com/hashicorp/terraform-provider-azurerm/issues/23799)) + +BUG FIXES: + +* authentication: fix a bug where auxiliary tenants were not correctly authorized ([#24063](https://github.com/hashicorp/terraform-provider-azurerm/issues/24063)) +* `azurerm_app_configuration` - normalize location in `replica` block ([#24074](https://github.com/hashicorp/terraform-provider-azurerm/issues/24074)) +* `azurerm_cosmosdb_account` - cosmosdb version and capabilities can now be updated at the same time ([#24029](https://github.com/hashicorp/terraform-provider-azurerm/issues/24029)) +* `azurerm_data_factory_flowlet_data_flow` - `source` and `sink` properties are now optional ([#23987](https://github.com/hashicorp/terraform-provider-azurerm/issues/23987)) +* `azurerm_datadog_monitor_tag_rule` - correctly handle default rule ([#22806](https://github.com/hashicorp/terraform-provider-azurerm/issues/22806)) +* `azurerm_ip_group`: fixing a crash when `firewall_ids` and `firewall_policy_ids` weren't parsed correctly from the API Response ([#24031](https://github.com/hashicorp/terraform-provider-azurerm/issues/24031)) +* `azurerm_nginx_deployment` - add default value of `20` for `capacity` ([#24033](https://github.com/hashicorp/terraform-provider-azurerm/issues/24033)) + +## 3.82.0 (November 23, 2023) + +FEATURES: + +* New Data Source: `azurerm_monitor_workspace` ([#23928](https://github.com/hashicorp/terraform-provider-azurerm/issues/23928)) +* New Resource: `azurerm_application_load_balancer_subnet_association` ([#23628](https://github.com/hashicorp/terraform-provider-azurerm/issues/23628)) + +ENHANCEMENTS: + +* dependencies: updating to `v0.20231117.1130141` of `github.com/hashicorp/go-azure-sdk` ([#23945](https://github.com/hashicorp/terraform-provider-azurerm/issues/23945)) +* `azurestackhci`: updating to API Version `2023-08-01` ([#23939](https://github.com/hashicorp/terraform-provider-azurerm/issues/23939)) +* `dashboard`: updating to API Version `2023-09-01` ([#23929](https://github.com/hashicorp/terraform-provider-azurerm/issues/23929)) +* `hpccache`: updating to API version `2023-05-01` ([#24005](https://github.com/hashicorp/terraform-provider-azurerm/issues/24005)) +* `mssql`: updating resources using `hashicorp/go-azure-sdk` to API Version `2023-02-01-preview` ([#23721](https://github.com/hashicorp/terraform-provider-azurerm/issues/23721)) +* `templatespecversions`: updating to API Version `2022-02-01` ([#24007](https://github.com/hashicorp/terraform-provider-azurerm/issues/24007)) +* Data Source: `azurerm_template_spec_version` - refactoring to use `hashicorp/go-azure-sdk` ([#24007](https://github.com/hashicorp/terraform-provider-azurerm/issues/24007)) +* `azurerm_cosmosdb_postgresql_cluster` - `coordinator_storage_quota_in_mb` and `coordinator_vcore_count` are no longer required for read replicas ([#23928](https://github.com/hashicorp/terraform-provider-azurerm/issues/23928)) +* `azurerm_dashboard_grafana` - `sku` can now be set to `Essential` ([#23934](https://github.com/hashicorp/terraform-provider-azurerm/issues/23934)) +* `azurerm_gallery_application_version` - add support for the `config_file`, `package_file` and `target_region.exclude_from_latest` properties ([#23816](https://github.com/hashicorp/terraform-provider-azurerm/issues/23816)) +* `azurerm_hdinsight_hadoop_cluster` - `script_actions` is no longer Force New ([#23888](https://github.com/hashicorp/terraform-provider-azurerm/issues/23888)) +* `azurerm_hdinsight_hbase_cluster` - `script_actions` is no longer Force New ([#23888](https://github.com/hashicorp/terraform-provider-azurerm/issues/23888)) +* `azurerm_hdinsight_interactive_query_cluster` - `script_actions` is no longer Force New ([#23888](https://github.com/hashicorp/terraform-provider-azurerm/issues/23888)) +* `azurerm_hdinsight_kafka_cluster` - `script_actions` is no longer Force New ([#23888](https://github.com/hashicorp/terraform-provider-azurerm/issues/23888)) +* `azurerm_hdinsight_spark_cluster` - `script_actions` is no longer Force New ([#23888](https://github.com/hashicorp/terraform-provider-azurerm/issues/23888)) +* `azurerm_kubernetes_cluster` - add support for the `gpu_instance` property ([#23887](https://github.com/hashicorp/terraform-provider-azurerm/issues/23887)) +* `azurerm_kubernetes_cluster_node_pool` - add support for the `gpu_instance` property ([#23887](https://github.com/hashicorp/terraform-provider-azurerm/issues/23887)) +* `azurerm_log_analytics_workspace` - add support for the `identity` property ([#23864](https://github.com/hashicorp/terraform-provider-azurerm/issues/23864)) +* `azurerm_linux_function_app` - add support for dotnet 8 ([#23638](https://github.com/hashicorp/terraform-provider-azurerm/issues/23638)) +* `azurerm_linux_function_app_slot` - add support for dotnet 8 ([#23638](https://github.com/hashicorp/terraform-provider-azurerm/issues/23638)) +* `azurerm_managed_lustre_file_system` - export attribute `mgs_address` ([#23942](https://github.com/hashicorp/terraform-provider-azurerm/issues/23942)) +* `azurerm_mssql_database` - support for Hyperscale SKUs ([#23974](https://github.com/hashicorp/terraform-provider-azurerm/issues/23974)) +* `azurerm_mssql_database` - refactoring to use `hashicorp/go-azure-sdk` ([#23721](https://github.com/hashicorp/terraform-provider-azurerm/issues/23721)) +* `azurerm_mssql_server` - refactoring to use `hashicorp/go-azure-sdk` ([#23721](https://github.com/hashicorp/terraform-provider-azurerm/issues/23721)) +* `azurerm_shared_image` - add support for `trusted_launch_supported` ([#23781](https://github.com/hashicorp/terraform-provider-azurerm/issues/23781)) +* `azurerm_spring_cloud_container_deployment` - add support for the `application_performance_monitoring_ids` property ([#23862](https://github.com/hashicorp/terraform-provider-azurerm/issues/23862)) +* `azurerm_spring_cloud_customized_accelerator` - add support for the `accelerator_type` and `path` properties ([#23797](https://github.com/hashicorp/terraform-provider-azurerm/issues/23797)) +* `azurerm_point_to_site_vpn_gateway` - allow multiple `connection_configurations` blocks ([#23936](https://github.com/hashicorp/terraform-provider-azurerm/issues/23936)) +* `azurerm_private_dns_cname_record` - `ttl` can now be set to 0 ([#23918](https://github.com/hashicorp/terraform-provider-azurerm/issues/23918)) +* `azurerm_windows_function_app` - add support for dotnet 8 ([#23638](https://github.com/hashicorp/terraform-provider-azurerm/issues/23638)) +* `azurerm_windows_function_app_slot` - add support for dotnet 8 ([#23638](https://github.com/hashicorp/terraform-provider-azurerm/issues/23638)) + +BUG FIXES: +* `azurerm_api_management` - correct a bug with additional location zones within the `additional_location` block ([#23943](https://github.com/hashicorp/terraform-provider-azurerm/issues/23943)) +* `azurerm_dev_test_linux_virtual_machine` - `storage_type` is now ForceNew to match the updated API behaviour ([#23973](https://github.com/hashicorp/terraform-provider-azurerm/issues/23973)) +* `azurerm_dev_test_windows_virtual_machine` - `storage_type` is now ForceNew to match the updated API behaviour ([#23973](https://github.com/hashicorp/terraform-provider-azurerm/issues/23973)) +* `azurerm_disk_encryption_set` - resource will recreate if `identity` changes from `SystemAssigned` to `UserAssigned` ([#23904](https://github.com/hashicorp/terraform-provider-azurerm/issues/23904)) +* `azurerm_eventhub_cluster`: `sku_name` is no longer ForceNew ([#24009](https://github.com/hashicorp/terraform-provider-azurerm/issues/24009)) +* `azurerm_firewall` - recasing the value for `firewall_policy_id` to workaround the API returning the incorrect casing ([#23993](https://github.com/hashicorp/terraform-provider-azurerm/issues/23993)) +* `azurerm_security_center_subscription_pricing` - fix a bug preventing removal of `extensions` and downgrading `tier` to `Free` ([#23821](https://github.com/hashicorp/terraform-provider-azurerm/issues/23821)) +* `azurerm_windows_web_app` - fix an issue of incorrect application stack settings during update ([#23372](https://github.com/hashicorp/terraform-provider-azurerm/issues/23372)) + +## 3.81.0 (November 16, 2023) + +ENHANCEMENTS: + +* dependencies: updating to `v0.20231116.1162710` of `github.com/hashicorp/go-azure-sdk` ([#23922](https://github.com/hashicorp/terraform-provider-azurerm/issues/23922)) +* `managedservices`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#23890](https://github.com/hashicorp/terraform-provider-azurerm/issues/23890)) +* `network`: updating to API Version `2023-06-01` ([#23875](https://github.com/hashicorp/terraform-provider-azurerm/issues/23875)) +* `servicelinker`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#23890](https://github.com/hashicorp/terraform-provider-azurerm/issues/23890)) +* `storage`: refactoring usages of `github.com/hashicorp/go-azure-sdk` to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#23890](https://github.com/hashicorp/terraform-provider-azurerm/issues/23890)) +* Data Source: `azurerm_network_ddos_protection_plan`: refactoring to use `hashicorp/go-azure-sdk` ([#23849](https://github.com/hashicorp/terraform-provider-azurerm/issues/23849)) +* `azurerm_linux_function_app` - add support for disabling Basic Auth for default Publishing Profile via new properties `ftp_publish_basic_authentication_enabled` and `webdeploy_publish_basic_authentication_enabled` ([#23900](https://github.com/hashicorp/terraform-provider-azurerm/issues/23900)) +* `azurerm_linux_function_app_slot` - add support for disabling Basic Auth for default Publishing Profile via new properties `ftp_publish_basic_authentication_enabled` and `webdeploy_publish_basic_authentication_enabled` ([#23900](https://github.com/hashicorp/terraform-provider-azurerm/issues/23900)) +* `azurerm_linux_web_app` - add support for disabling Basic Auth for default Publishing Profile via new properties `ftp_publish_basic_authentication_enabled` and `webdeploy_publish_basic_authentication_enabled` ([#23900](https://github.com/hashicorp/terraform-provider-azurerm/issues/23900)) +* `azurerm_linux_web_app_slot` - add support for disabling Basic Auth for default Publishing Profile via new properties `ftp_publish_basic_authentication_enabled` and `webdeploy_publish_basic_authentication_enabled` ([#23900](https://github.com/hashicorp/terraform-provider-azurerm/issues/23900)) +* `azurerm_logic_app_integration_account_certificate` - `name` now accepts underscores ([#23866](https://github.com/hashicorp/terraform-provider-azurerm/issues/23866)) +* `azurerm_logic_app_integration_account_partner` - `business_identity.value` now accepts underscores ([#23866](https://github.com/hashicorp/terraform-provider-azurerm/issues/23866)) +* `azurerm_monitor_data_collection_rule` - added support for `WorkspaceTransforms` as `kind` ([#23873](https://github.com/hashicorp/terraform-provider-azurerm/issues/23873)) +* `azurerm_network_ddos_protection_plan`: refactoring to use `hashicorp/go-azure-sdk` ([#23849](https://github.com/hashicorp/terraform-provider-azurerm/issues/23849)) +* `azurerm_windows_function_app` - add support for disabling Basic Auth for default Publishing Profile via new properties `ftp_publish_basic_authentication_enabled` and `webdeploy_publish_basic_authentication_enabled` ([#23900](https://github.com/hashicorp/terraform-provider-azurerm/issues/23900)) +* `azurerm_windows_function_app_slot` - add support for disabling Basic Auth for default Publishing Profile via new properties `ftp_publish_basic_authentication_enabled` and `webdeploy_publish_basic_authentication_enabled` ([#23900](https://github.com/hashicorp/terraform-provider-azurerm/issues/23900)) +* `azurerm_windows_web_app` - add support for disabling Basic Auth for default Publishing Profile via new properties `ftp_publish_basic_authentication_enabled` and `webdeploy_publish_basic_authentication_enabled` ([#23900](https://github.com/hashicorp/terraform-provider-azurerm/issues/23900)) +* `azurerm_windows_web_app_slot` - add support for disabling Basic Auth for default Publishing Profile via new properties `ftp_publish_basic_authentication_enabled` and `webdeploy_publish_basic_authentication_enabled` ([#23900](https://github.com/hashicorp/terraform-provider-azurerm/issues/23900)) + +## 3.80.0 (November 09, 2023) + +ENHANCEMENTS: + +* `internal/sdk` - Added support for pointer Types in resource models ([#23810](https://github.com/hashicorp/terraform-provider-azurerm/issues/23810)) +* dependencies: updating to `v0.63.0` of `github.com/hashicorp/go-azure-helpers` ([#23785](https://github.com/hashicorp/terraform-provider-azurerm/issues/23785)) +* dependencies: updating to `v0.20231106.1151347` of `github.com/hashicorp/go-azure-sdk` ([#23787](https://github.com/hashicorp/terraform-provider-azurerm/issues/23787)) +* `azurerm_cognitive_deployment` - support for the `version_upgrade_option` property ([#22520](https://github.com/hashicorp/terraform-provider-azurerm/issues/22520)) +* `azurerm_firewall_policy_rule_collection_group` - add support for the property `http_headers` ([#23641](https://github.com/hashicorp/terraform-provider-azurerm/issues/23641)) +* `azurerm_kubernetes_cluster` - `fips_enabled` can be updated in the `default_node_pool` without recreating the cluster ([#23612](https://github.com/hashicorp/terraform-provider-azurerm/issues/23612)) +* `azurerm_kusto_cluster` - the cluster `name` can now include dashes ([#23790](https://github.com/hashicorp/terraform-provider-azurerm/issues/23790)) +* `azurerm_postgresql_database` - update the validation of `collation` to include support for `French_France.1252` ([#23783](https://github.com/hashicorp/terraform-provider-azurerm/issues/23783)) + +BUG FIXES: + +* Data Source: `azurerm_data_protection_backup_vault` - removing `import` support, since Data Sources don't support being imported ([#23820](https://github.com/hashicorp/terraform-provider-azurerm/issues/23820)) +* Data Source: `azurerm_kusto_database` - removing `import` support, since Data Sources don't support being imported ([#23820](https://github.com/hashicorp/terraform-provider-azurerm/issues/23820)) +* Data Source: `azurerm_virtual_hub_route_table` - removing `import` support, since Data Sources don't support being imported ([#23820](https://github.com/hashicorp/terraform-provider-azurerm/issues/23820)) +* `azurerm_windows_web_app` - prevent a panic with the `auto_heal.actions` property ([#23836](https://github.com/hashicorp/terraform-provider-azurerm/issues/23836)) +* `azurerm_windows_web_app` - prevent a panic with the `auto_heal.triggers` property ([#23812](https://github.com/hashicorp/terraform-provider-azurerm/issues/23812)) + +## 3.79.0 (November 02, 2023) + +ENHANCEMENTS: + +* provider: log instead of error when RPs are unavailable when validating RP registrations ([#23380](https://github.com/hashicorp/terraform-provider-azurerm/issues/23380)) +* `azurerm_arc_kuberenetes_cluster_extension_resource` - the `version` and `release_train` properties can now be set simultaneously ([#23692](https://github.com/hashicorp/terraform-provider-azurerm/issues/23692)) +* `azurerm_container_apps` - support for the `ingress.exposed_port` property ([#23752](https://github.com/hashicorp/terraform-provider-azurerm/issues/23752)) +* `azurerm_cosmosdb_postgresql_cluster` - read replica clusters can be created without specifying `administrator_login_password` property ([#23750](https://github.com/hashicorp/terraform-provider-azurerm/issues/23750)) +* `azurerm_managed_application` - arrays can be supplied in the `parameter_values` property ([#23754](https://github.com/hashicorp/terraform-provider-azurerm/issues/23754)) +* `azurerm_storage_management_policy` - support for properties `rule.*.actions.*.base_blob.0.tier_to_cold_after_days_since_{modification|last_access_time|creation}_greater_than and rule.*.actions.*.{snapshot|version}.0.tier_to_cold_after_days_since_creation_greater_than` ([#23574](https://github.com/hashicorp/terraform-provider-azurerm/issues/23574)) + +BUG FIXES: + +* `azurerm_api_management_diagnostic` - the `operation_name_format` attribute will only be sent if `identifier` is set to `applicationinsights` ([#23736](https://github.com/hashicorp/terraform-provider-azurerm/issues/23736)) +* `azurerm_backup_policy_vm` - fix payload by using current datetime ([#23586](https://github.com/hashicorp/terraform-provider-azurerm/issues/23586)) +* `azurerm_kubernetes_cluster` - the `custom_ca_trust_certificates_base64` property can not be removed, only updated ([#23737](https://github.com/hashicorp/terraform-provider-azurerm/issues/23737)) + +## 3.78.0 (October 26, 2023) + +FEATURES: + +* New Resource: `azurerm_resource_management_private_link_association` ([#23546](https://github.com/hashicorp/terraform-provider-azurerm/issues/23546)) + +ENHANCEMENTS: + +* dependencies: updating to `v0.20231025.1113325` of `github.com/hashicorp/go-azure-sdk` ([#23684](https://github.com/hashicorp/terraform-provider-azurerm/issues/23684)) +* dependencies: updating to `v1.58.3` of `google.golang.org/grpc` ([#23691](https://github.com/hashicorp/terraform-provider-azurerm/issues/23691)) +* dependencies: updating search service from `2022-09-01` to `2023-11-01` ([#23698](https://github.com/hashicorp/terraform-provider-azurerm/issues/23698)) +* Data Source: `azurerm_monitor_workspace` - export `query_endpoint` ([#23629](https://github.com/hashicorp/terraform-provider-azurerm/issues/23629)) +* `azurerm_express_route_port` - support for `macsec_sci_enabled` ([#23625](https://github.com/hashicorp/terraform-provider-azurerm/issues/23625)) +* `azurerm_eventhub_namespace_customer_managed_key` - support for the `user_assigned_identity_id` property ([#23635](https://github.com/hashicorp/terraform-provider-azurerm/issues/23635)) +* `azurerm_postgresql_flexible_server` - `private_dns_zone_id` is no longer ForceNew and case is suppressed ([#23660](https://github.com/hashicorp/terraform-provider-azurerm/issues/23660)) +* `azurerm_synapse_workspace` - add support for `azuread_authentication_only` ([#23659](https://github.com/hashicorp/terraform-provider-azurerm/issues/23659)) +* `azurerm_redis_enterprise_cluster` - support for new location `Japan East` ([#23696](https://github.com/hashicorp/terraform-provider-azurerm/issues/23696)) +* `azurerm_search_service` - support for `semantic_search_sku` field ([#23698](https://github.com/hashicorp/terraform-provider-azurerm/issues/23698)) + +BUG FIXES: + +* `azurerm_palo_alto_next_generation_firewall_virtual_network_local_rulestack` - added lock for ruleStackID ([#23601](https://github.com/hashicorp/terraform-provider-azurerm/issues/23601)) +* `azurerm_cognitive_deployment` - remove forceNew tag from `rai_policy_name` ([#23697](https://github.com/hashicorp/terraform-provider-azurerm/issues/23697)) + +## 3.77.0 (October 19, 2023) + +FEATURES: + +* New Resources: `azurerm_application_load_balancer_frontend` ([#23411](https://github.com/hashicorp/terraform-provider-azurerm/issues/23411)) +* New Resources: `azurerm_dev_center` ([#23538](https://github.com/hashicorp/terraform-provider-azurerm/issues/23538)) +* New Resources: `azurerm_dev_center_project` ([#23538](https://github.com/hashicorp/terraform-provider-azurerm/issues/23538)) + +ENHANCEMENTS: + +* dependencies: updating to `v0.62.0` of `github.com/hashicorp/go-azure-helpers` ([#23581](https://github.com/hashicorp/terraform-provider-azurerm/issues/23581)) +* dependencies: updating Kusto SDK from `2023-05-02` to `2023-08-15` ([#23598](https://github.com/hashicorp/terraform-provider-azurerm/issues/23598)) +* dependencies: updating nginx from `2022-08-01` to `2023-04-01` ([#23583](https://github.com/hashicorp/terraform-provider-azurerm/issues/23583)) +* `netapp`: updating to use API Version `2023-05-01` ([#23576](https://github.com/hashicorp/terraform-provider-azurerm/issues/23576)) +* `springcloud`: updating to use API Version `2023-09-01-preview` ([#23544](https://github.com/hashicorp/terraform-provider-azurerm/issues/23544)) +* `storage`: updating to use API Version `2023-01-01` ([#23543](https://github.com/hashicorp/terraform-provider-azurerm/issues/23543)) +* `internal/sdk`: fixing an issue where struct fields containing `removedInNextMajorVersion` wouldn't be decoded correctly ([#23564](https://github.com/hashicorp/terraform-provider-azurerm/issues/23564)) +* `internal/sdk`: struct tag parsing is now handled consistently during both encoding and decoding ([#23568](https://github.com/hashicorp/terraform-provider-azurerm/issues/23568)) +* provider: the `roll_instances_when_required` provider feature in the `virtual_machine_scale_set` block is now optional ([#22976](https://github.com/hashicorp/terraform-provider-azurerm/issues/22976)) +* Data Source: `azurerm_automation_account`: refactoring the remaining usage of `Azure/azure-sdk-for-go` to use `hashicorp/go-azure-sdk` ([#23555](https://github.com/hashicorp/terraform-provider-azurerm/issues/23555)) +* `azurerm_automation_account`: refactoring the remaining usage of `Azure/azure-sdk-for-go` to use `hashicorp/go-azure-sdk` ([#23555](https://github.com/hashicorp/terraform-provider-azurerm/issues/23555)) +* `azurerm_resource_deployment_script_azure_cli` - improve validation for the `version` property to support newer versions ([#23370](https://github.com/hashicorp/terraform-provider-azurerm/issues/23370)) +* `azurerm_resource_deployment_script_azure_power_shell` - improve validation for the `version` property to support newer versions ([#23370](https://github.com/hashicorp/terraform-provider-azurerm/issues/23370)) +* `azurerm_nginx_deployment` - support for the `capacity` and `email` properties ([#23596](https://github.com/hashicorp/terraform-provider-azurerm/issues/23596)) + +BUG FIXES: + +* Data Source: `azurerm_virtual_hub_connection` - export the `inbound_route_map_id`, `outbound_route_map_id`, and `static_vnet_local_route_override_criteria` attributes in the `routing` block, and fix a bug where these attributes could not be set ([#23491](https://github.com/hashicorp/terraform-provider-azurerm/issues/23491)) +* `azurerm_cdn_frontdoor_rule` - the `url_filename_condition` properties `match_values` is now optional if `operator` is set to `Any` ([#23541](https://github.com/hashicorp/terraform-provider-azurerm/issues/23541)) +* `azurerm_shared_image_gallery` - added the `Private` and `Groups` options for the `sharing.permission` property ([#23570](https://github.com/hashicorp/terraform-provider-azurerm/issues/23570)) +* `azurerm_redis_cache` - fixed incorrect ssl values for `redis_primary_connection_string` and `secondary_connection_string` ([#23575](https://github.com/hashicorp/terraform-provider-azurerm/issues/23575)) +* `azurerm_monitor_activity_log_alert` - the `recommend_category` property now can be set to `HighAvailability` ([#23605](https://github.com/hashicorp/terraform-provider-azurerm/issues/23605)) +* `azurerm_recovery_services_vault` - the `encryption` property can now be used with the `cross_region_restore_enabled` property ([#23618](https://github.com/hashicorp/terraform-provider-azurerm/issues/23618)) +* `azurerm_storage_account_customer_managed_key` - prevent a panic when the keyvault id is empty ([#23599](https://github.com/hashicorp/terraform-provider-azurerm/issues/23599)) + +## 3.76.0 (October 12, 2023) + +FEATURES: + +* New Resource: `azurerm_security_center_storage_defender` ([#23242](https://github.com/hashicorp/terraform-provider-azurerm/issues/23242)) +* New Resource: `azurerm_spring_cloud_application_insights_application_performance_monitoring` ([#23107](https://github.com/hashicorp/terraform-provider-azurerm/issues/23107)) + +ENHANCEMENTS: + +* provider: updating to build using Go `1.21.3` ([#23514](https://github.com/hashicorp/terraform-provider-azurerm/issues/23514)) +* dependencies: updating to `v0.20231012.1141427` of `github.com/hashicorp/go-azure-sdk` ([#23534](https://github.com/hashicorp/terraform-provider-azurerm/issues/23534)) +* Data Source: `azurerm_application_gateway` - support for `backend_http_settings`, `global`, `gateway_ip_configuration` and additional attributes ([#23318](https://github.com/hashicorp/terraform-provider-azurerm/issues/23318)) +* Data Source: `azurerm_network_service_tags` - export the `name` attribute ([#23382](https://github.com/hashicorp/terraform-provider-azurerm/issues/23382)) +* `azurerm_cosmosdb_postgresql_cluster` - add support for `sql_version` of `16` and `citus_version` of `12.1` ([#23476](https://github.com/hashicorp/terraform-provider-azurerm/issues/23476)) +* `azurerm_palo_alto_local_rulestack` - correctly normalize the `location` property ([#23483](https://github.com/hashicorp/terraform-provider-azurerm/issues/23483)) +* `azurerm_static_site` - add support for `app_settings` ([#23421](https://github.com/hashicorp/terraform-provider-azurerm/issues/23421)) + +BUG FIXES: + +* `azurerm_automation_schedule` - fix a bug when updating `start_time` ([#23494](https://github.com/hashicorp/terraform-provider-azurerm/issues/23494)) +* `azurerm_eventhub` - remove ForceNew and check `partition_count` is not decreased ([#23499](https://github.com/hashicorp/terraform-provider-azurerm/issues/23499)) +* `azurerm_managed_lustre_file_system` - update validation for `storage_capacity_in_tb` according to `sku_name` in use ([#23428](https://github.com/hashicorp/terraform-provider-azurerm/issues/23428)) +* `azurerm_virtual_machine` - fix a crash when the API response for the `os_profile` block contains nil properties ([#23535](https://github.com/hashicorp/terraform-provider-azurerm/issues/23535)) + +## 3.75.0 (September 28, 2023) + +FEATURES: + +* New Resource: `azurerm_application_load_balancer` ([#22517](https://github.com/hashicorp/terraform-provider-azurerm/issues/22517)) +* New Resource: `azurerm_resource_management_private_link` ([#23098](https://github.com/hashicorp/terraform-provider-azurerm/issues/23098)) + +ENHANCEMENTS: + +* dependencies: `firewall` migrated to `hashicorp/go-azure-sdk` ([#22863](https://github.com/hashicorp/terraform-provider-azurerm/issues/22863)) +* `azurerm_bot_service_azure_bot` - add support for the `icon_url` property ([#23114](https://github.com/hashicorp/terraform-provider-azurerm/issues/23114)) +* `azurerm_cognitive_deployment` - `capacity` property is now updateable ([#23251](https://github.com/hashicorp/terraform-provider-azurerm/issues/23251)) +* `azurerm_container_group` - added support for `key_vault_user_identity_id` ([#23332](https://github.com/hashicorp/terraform-provider-azurerm/issues/23332)) +* `azurerm_data_factory` - added support for the `publish_enabled` property ([#2334](https://github.com/hashicorp/terraform-provider-azurerm/issues/2334)) +* `azurerm_firewall_policy_rule_collection_group` - add support for the `description` property ([#23354](https://github.com/hashicorp/terraform-provider-azurerm/issues/23354)) +* `azurerm_kubernetes_cluster` - `network_profile.network_policy` can be migrated to `cilium` ([#23342](https://github.com/hashicorp/terraform-provider-azurerm/issues/23342)) +* `azurerm_log_analytics_workspace` - add support for the `data_collection_rule_id` property ([#23347](https://github.com/hashicorp/terraform-provider-azurerm/issues/23347)) +* `azurerm_mysql_flexible_server` - add support for the `io_scaling_enabled` property ([#23329](https://github.com/hashicorp/terraform-provider-azurerm/issues/23329)) + +BUG FIXES: + +* `azurerm_api_management_api` - fix importing `openapi` format content file issue ([#23348](https://github.com/hashicorp/terraform-provider-azurerm/issues/23348)) +* `azurerm_cdn_frontdoor_rule` - allow a `cache_duration` of `00:00:00` ([#23384](https://github.com/hashicorp/terraform-provider-azurerm/issues/23384)) +* `azurerm_cosmosdb_cassandra_datacenter` - `sku_name` is now updatable ([#23419](https://github.com/hashicorp/terraform-provider-azurerm/issues/23419)) +* `azurerm_key_vault_certificate` - fix a bug that prevented soft-deleted certificates from being recovered ([#23204](https://github.com/hashicorp/terraform-provider-azurerm/issues/23204)) +* `azurerm_log_analytics_solution` - fix create and update lifecycle of resource by splitting methods ([#23333](https://github.com/hashicorp/terraform-provider-azurerm/issues/23333)) +* `azurerm_management_group_subscription_association` - mark resource as gone correctly if not found when retrieving ([#23335](https://github.com/hashicorp/terraform-provider-azurerm/issues/23335)) +* `azurerm_management_lock` - add polling after create and delete to check for RP propagation ([#23345](https://github.com/hashicorp/terraform-provider-azurerm/issues/23345)) +* `azurerm_monitor_diagnostic_setting` - added validation to ensure at least one of `category` or `category_group` is supplied ([#23308](https://github.com/hashicorp/terraform-provider-azurerm/issues/23308)) +* `azurerm_palo_alto_local_rulestack_prefix_list` - fix rulestack not being committed on delete ([#23362](https://github.com/hashicorp/terraform-provider-azurerm/issues/23362)) +* `azurerm_palo_alto_local_rulestack_fqdn_list` - fix rulestack not being committed on delete ([#23362](https://github.com/hashicorp/terraform-provider-azurerm/issues/23362)) +* `security_center_subscription_pricing_resource` - disabled extensions logic now works as expected ([#22997](https://github.com/hashicorp/terraform-provider-azurerm/issues/22997)) + + +## 3.74.0 (September 21, 2023) + +NOTES: + +* `azurerm_synapse_sql_pool` - users that have imported `azurerm_synapse_sql_pool` resources that were created outside of Terraform using an `LRS` storage account type will need to use `ignore_changes` to avoid the resource from being destroyed and recreated. + +FEATURES: + +* **New Resource**: `azurerm_arc_resource_bridge_appliance` ([#23108](https://github.com/hashicorp/terraform-provider-azurerm/issues/23108)) +* **New Resource**: `azurerm_data_factory_dataset_azure_sql_table` ([#23264](https://github.com/hashicorp/terraform-provider-azurerm/issues/23264)) +* **New Resource**: `azurerm_function_app_connection` ([#23127](https://github.com/hashicorp/terraform-provider-azurerm/issues/23127)) + +ENHANCEMENTS: + +* dependencies: updating to `v0.20230918.1115907` of `github.com/hashicorp/go-azure-sdk` ([#23337](https://github.com/hashicorp/terraform-provider-azurerm/issues/23337)) +* dependencies: downgrading to `v1.12.5` of `github.com/rickb777/date` ([#23296](https://github.com/hashicorp/terraform-provider-azurerm/issues/23296)) +* `mysql`: updating to use API Version `2022-01-01` ([#23320](https://github.com/hashicorp/terraform-provider-azurerm/issues/23320)) +* `azurerm_app_configuration` - support for the `replica` block ([#22452](https://github.com/hashicorp/terraform-provider-azurerm/issues/22452)) +* `azurerm_bot_channel_directline` - support for `user_upload_enabled`, `endpoint_parameters_enabled`, and `storage_enabled` ([#23149](https://github.com/hashicorp/terraform-provider-azurerm/issues/23149)) +* `azurerm_container_app` - support for scale rules ([#23294](https://github.com/hashicorp/terraform-provider-azurerm/issues/23294)) +* `azurerm_container_app_environment` - support for zone redundancy ([#23313](https://github.com/hashicorp/terraform-provider-azurerm/issues/23313)) +* `azurerm_container_group` - support for the `key_vault_user_identity_id` property for Customer Managed Keys ([#23332](https://github.com/hashicorp/terraform-provider-azurerm/issues/23332)) +* `azurerm_cosmosdb_account` - support for MongoDB connection strings ([#23331](https://github.com/hashicorp/terraform-provider-azurerm/issues/23331)) +* `azurerm_data_factory_dataset_delimited_text` - support for the `dynamic_file_system_enabled`, `dynamic_path_enabled`, and `dynamic_filename_enabled` properties ([#23261](https://github.com/hashicorp/terraform-provider-azurerm/issues/23261)) +* `azurerm_data_factory_dataset_parquet` - support for the `azure_blob_fs_location` block ([#23261](https://github.com/hashicorp/terraform-provider-azurerm/issues/23261)) +* `azurerm_monitor_diagnostic_setting` - validation to ensure either `category` or `category_group` are supplied in `enabled_log` and `log` blocks ([#23308](https://github.com/hashicorp/terraform-provider-azurerm/issues/23308)) +* `azurerm_network_interface` - support for the `auxiliary_mode` and `auxiliary_sku` properties ([#22979](https://github.com/hashicorp/terraform-provider-azurerm/issues/22979)) +* `azurerm_postgresql_flexible_server` - increased the maximum supported value for `storage_mb` ([#23277](https://github.com/hashicorp/terraform-provider-azurerm/issues/23277)) +* `azurerm_shared_image_version` - support for the `replicated_region_deletion_enabled` and `target_region.exclude_from_latest_enabled` properties ([#23147](https://github.com/hashicorp/terraform-provider-azurerm/issues/23147)) +* `azurerm_storage_account` - support for setting `domain_name` and `domain_guid` for `AADKERB` ([#22833](https://github.com/hashicorp/terraform-provider-azurerm/issues/22833)) +* `azurerm_storage_account_customer_managed_key` - support for cross-tenant customer-managed keys with the `federated_identity_client_id`, and `key_vault_uri` properties ([#20356](https://github.com/hashicorp/terraform-provider-azurerm/issues/20356)) +* `azurerm_web_application_firewall_policy` - support for the `rate_limit_duration`, `rate_limit_threshold`, `group_rate_limit_by`, and `request_body_inspect_limit_in_kb` properties ([#23239](https://github.com/hashicorp/terraform-provider-azurerm/issues/23239)) + +BUG FIXES: + +* Data Source: `azurerm_container_app_environment`: fix `log_analytics_workspace_name` output to correct value ([#23298](https://github.com/hashicorp/terraform-provider-azurerm/issues/23298)) +* `azurerm_api_management_api` - set the `service_url` property when importing the resource ([#23011](https://github.com/hashicorp/terraform-provider-azurerm/issues/23011)) +* `azurerm_app_configuration` - prevent crash by nil checking the encryption configuration ([#23302](https://github.com/hashicorp/terraform-provider-azurerm/issues/23302)) +* `azurerm_app_configuration_feature` - update `percentage_filter_value` to accept correct type of float ([#23263](https://github.com/hashicorp/terraform-provider-azurerm/issues/23263)) +* `azurerm_container_app` - fix an issue with `commands` and `args` being overwritten when using multiple containers ([#23338](https://github.com/hashicorp/terraform-provider-azurerm/issues/23338)) +* `azurerm_key_vault_certificate` - fix issue where certificates couldn't be recovered anymore ([#23204](https://github.com/hashicorp/terraform-provider-azurerm/issues/23204)) +* `azurerm_key_vault_key` - the ForceNew when `expiration_date` is removed from the config file ([#23327](https://github.com/hashicorp/terraform-provider-azurerm/issues/23327)) +* `azurerm_linux_function_app` - fix a bug in setting the storage settings when using Elastic Premium plans ([#21212](https://github.com/hashicorp/terraform-provider-azurerm/issues/21212)) +* `azurerm_linux_web_app` - fix docker app stack update ([#23303](https://github.com/hashicorp/terraform-provider-azurerm/issues/23303)) +* `azurerm_linux_web_app` - fix crash in auto heal expansion ([#21328](https://github.com/hashicorp/terraform-provider-azurerm/issues/21328)) +* `azurerm_linux_web_app_slot` - fix docker app stack update ([#23303](https://github.com/hashicorp/terraform-provider-azurerm/issues/23303)) +* `azurerm_linux_web_app_slot` - fix crash in auto heal expansion ([#21328](https://github.com/hashicorp/terraform-provider-azurerm/issues/21328)) +* `azurerm_log_analytics_solution` - fix bug where the resource wasn't handling successful creation on subsequent applies ([#23312](https://github.com/hashicorp/terraform-provider-azurerm/issues/23312)) +* `azurerm_management_group_subscription_association` - fix bug to correctly mark resource as gone if not found during read ([#23335](https://github.com/hashicorp/terraform-provider-azurerm/issues/23335)) +* `azurerm_mssql_elasticpool` - remove check that prevents `license_type` from being set for certain skus ([#23262](https://github.com/hashicorp/terraform-provider-azurerm/issues/23262)) +* `azurerm_servicebus_queue` - fixing an issue where `auto_delete_on_idle` couldn't be set to `P10675199DT2H48M5.4775807S` ([#23296](https://github.com/hashicorp/terraform-provider-azurerm/issues/23296)) +* `azurerm_servicebus_topic` - fixing an issue where `auto_delete_on_idle` couldn't be set to `P10675199DT2H48M5.4775807S` ([#23296](https://github.com/hashicorp/terraform-provider-azurerm/issues/23296)) +* `azurerm_storage_account` - prevent sending unsupported blob properties in payload for `Storage` account kind ([#23288](https://github.com/hashicorp/terraform-provider-azurerm/issues/23288)) +* `azurerm_synapse_sql_pool` - expose `storage_account_type` ([#23217](https://github.com/hashicorp/terraform-provider-azurerm/issues/23217)) +* `azurerm_windows_function_app` - fix a bug in setting the storage settings when using Elastic Premium plans ([#21212](https://github.com/hashicorp/terraform-provider-azurerm/issues/21212)) +* `azurerm_windows_web_app` - fix docker app stack update ([#23303](https://github.com/hashicorp/terraform-provider-azurerm/issues/23303)) +* `azurerm_windows_web_app_slot` - fix docker app stack update ([#23303](https://github.com/hashicorp/terraform-provider-azurerm/issues/23303)) + +DEPRECATIONS: + +* `azurerm_application_gateway` - deprecate `Standard` and `WAF` skus ([#23310](https://github.com/hashicorp/terraform-provider-azurerm/issues/23310)) +* `azurerm_bot_channel_web_chat` - deprecate `site_names` in favour of `site` block ([#23161](https://github.com/hashicorp/terraform-provider-azurerm/issues/23161)) +* `azurerm_monitor_diagnostic_setting` - deprecate `retention_policy` in favour of `azurerm_storage_management_policy` ([#23260](https://github.com/hashicorp/terraform-provider-azurerm/issues/23260)) + +## 3.73.0 (September 14, 2023) + +FEATURES: + +* **New Resource**: `azurerm_iothub_endpoint_cosmosdb_account` ([#23065](https://github.com/hashicorp/terraform-provider-azurerm/issues/23065)) +* **New Resource**: `azurerm_virtual_hub_routing_intent` ([#23138](https://github.com/hashicorp/terraform-provider-azurerm/issues/23138)) + +ENHANCEMENTS: + +* dependencies: updating to `v0.1.1` of `github.com/btubbs/datetime` ([#23221](https://github.com/hashicorp/terraform-provider-azurerm/issues/23221)) +* dependencies: updating to `v1.3.1` of `github.com/google/uuid` ([#23221](https://github.com/hashicorp/terraform-provider-azurerm/issues/23221)) +* dependencies: updating to `v0.61.0` of `github.com/hashicorp/go-azure-helpers` ([#23249](https://github.com/hashicorp/terraform-provider-azurerm/issues/23249)) +* dependencies: updating to `v0.20230907.1113401` of `github.com/hashicorp/go-azure-sdk` ([#23221](https://github.com/hashicorp/terraform-provider-azurerm/issues/23221)) +* dependencies: updating to `v1.5.0` of `github.com/hashicorp/go-hclog` ([#23221](https://github.com/hashicorp/terraform-provider-azurerm/issues/23221)) +* dependencies: updating to `v2.29.0` of `github.com/hashicorp/terraform-plugin-sdk/v2` ([#23221](https://github.com/hashicorp/terraform-provider-azurerm/issues/23221)) +* dependencies: updating to `v1.5.1` of `github.com/hashicorp/terraform-plugin-testing` ([#23221](https://github.com/hashicorp/terraform-provider-azurerm/issues/23221)) +* dependencies: updating to `v1.20.2` of `github.com/rickb777/date` ([#23221](https://github.com/hashicorp/terraform-provider-azurerm/issues/23221)) +* dependencies: updating to `v0.13.0` of `golang.org/x/crypto` ([#23221](https://github.com/hashicorp/terraform-provider-azurerm/issues/23221)) +* dependencies: updating to `v0.15.0` of `golang.org/x/net` ([#23221](https://github.com/hashicorp/terraform-provider-azurerm/issues/23221)) +* dependencies: updating to `v0.13.0` of `golang.org/x/tools` ([#23221](https://github.com/hashicorp/terraform-provider-azurerm/issues/23221)) +* `azurerm_bot_channel_ms_teams` - support for `deployment_environment` ([#23122](https://github.com/hashicorp/terraform-provider-azurerm/issues/23122)) +* `azurerm_managed_disk` - updating to use API Version `2023-04-02` ([#23233](https://github.com/hashicorp/terraform-provider-azurerm/issues/23233)) +* `azurerm_managed_disk` - support for `optimized_frequent_attach_enabled` ([#23241](https://github.com/hashicorp/terraform-provider-azurerm/issues/23241)) +* `azurerm_managed_disk` - support for `performance_plus_enabled` ([#23241](https://github.com/hashicorp/terraform-provider-azurerm/issues/23241)) +* `azurerm_maps_account` - support for `local_authentication_enabled` ([#23216](https://github.com/hashicorp/terraform-provider-azurerm/issues/23216)) +* `azurerm_mssql_elasticpool` - support for configuring `license_type` when using the `Hyperscale` sku ([#23256](https://github.com/hashicorp/terraform-provider-azurerm/issues/23256)) +* `azurerm_security_center_assessment_policy` - refactoring to use `hashicorp/go-azure-sdk` ([#23158](https://github.com/hashicorp/terraform-provider-azurerm/issues/23158)) + +BUG FIXES: + +* `azurerm_api_management` - split create and update methods ([#23259](https://github.com/hashicorp/terraform-provider-azurerm/issues/23259)) +* `azurerm_api_management_backend` - fixing a panic when flattening the `credentials` block ([#23219](https://github.com/hashicorp/terraform-provider-azurerm/issues/23219)) +* `azurerm_key_vault_certificate` - fixing a regression where certificates from a custom/unknown issuer would be polled indefinitely ([#23214](https://github.com/hashicorp/terraform-provider-azurerm/issues/23214)) +* `azurerm_redis_cache` - prevent sending `redis_configuration.aof_backup_enabled` when the sku is not `Premium` to avoid API error ([#22774](https://github.com/hashicorp/terraform-provider-azurerm/issues/22774)) +* `azurerm_web_application_firewall_policy` - capture and toggle state of `custom_rule` blocks with an `enabled` field ([#23163](https://github.com/hashicorp/terraform-provider-azurerm/issues/23163)) + +## 3.72.0 (September 07, 2023) + +FEATURES: + +* Provider Feature: subscription cancellation on `destroy` can now be disabled via the provider `features` block ([#19936](https://github.com/hashicorp/terraform-provider-azurerm/issues/19936)) +* **New Data Source**: `netapp_volume_quota_rule` ([#23042](https://github.com/hashicorp/terraform-provider-azurerm/issues/23042)) +* **New Resource**: `azurerm_automation_python3_package` ([#23087](https://github.com/hashicorp/terraform-provider-azurerm/issues/23087)) +* **New Resource**: `netapp_volume_quota_rule` ([#23042](https://github.com/hashicorp/terraform-provider-azurerm/issues/23042)) + +ENHANCEMENTS: + +* dependencies: updating to `v0.20230906.1160501` of `github.com/hashicorp/go-azure-sdk` ([#23191](https://github.com/hashicorp/terraform-provider-azurerm/issues/23191)) +* `containerapps`: updating to API Version `2023-05-01` ([#22804](https://github.com/hashicorp/terraform-provider-azurerm/issues/22804)) +* `keyvault`: upgrade remaining resources to `2023-02-01` ([#23089](https://github.com/hashicorp/terraform-provider-azurerm/issues/23089)) +* `redisenterprise`: updating to API Version `2023-07-01` ([#23178](https://github.com/hashicorp/terraform-provider-azurerm/issues/23178)) +* `vpngateway`: updating to use `hashicorp/go-azure-sdk` ([#22906](https://github.com/hashicorp/terraform-provider-azurerm/issues/22906)) +* `internal/sdk`: typed resources using a custom importer now get a timed context ([#23160](https://github.com/hashicorp/terraform-provider-azurerm/issues/23160)) +* `azurerm_batch_pool` - support for `accelerated_networking_enabled` ([#23021](https://github.com/hashicorp/terraform-provider-azurerm/issues/23021)) +* `azurerm_batch_pool` - support for `automatic_upgrade_enabled` ([#23021](https://github.com/hashicorp/terraform-provider-azurerm/issues/23021)) +* `azurerm_bot_channel_direct_line_speech` - support for the `cognitive_account_id` property ([#23106](https://github.com/hashicorp/terraform-provider-azurerm/issues/23106)) +* `azurerm_bot_service_azure_bot` - support for the `local_authentication_enabled` property ([#23096](https://github.com/hashicorp/terraform-provider-azurerm/issues/23096)) +* `azurerm_container_app_environment` - support for the `dapr_application_insights_connection_string` ([#23080](https://github.com/hashicorp/terraform-provider-azurerm/issues/23080)) +* `azurerm_cosmosdb_cassandra_datacenter` - refactoring to use `hashicorp/go-azure-sdk` ([#23110](https://github.com/hashicorp/terraform-provider-azurerm/issues/23110)) +* `azurerm_cosmosdb_cassandra_datacenter` - updating to API Version `2023-04-15` ([#23110](https://github.com/hashicorp/terraform-provider-azurerm/issues/23110)) +* `azurerm_kubernetes_cluster` - Azure CNI can be updated to use `overlay` ([#22709](https://github.com/hashicorp/terraform-provider-azurerm/issues/22709)) +* `azurerm_monitor_diagnostic_setting` - deprecating `retention_policy` within `enabled_log` ([#23029](https://github.com/hashicorp/terraform-provider-azurerm/issues/23029)) +* `azurerm_mssql_database` - split create and update methods ([#23209](https://github.com/hashicorp/terraform-provider-azurerm/issues/23209)) +* `azurerm_postgresql_database` - `collation` can now be set to `English_United Kingdom.1252` ([#23171](https://github.com/hashicorp/terraform-provider-azurerm/issues/23171)) +* `azurerm_postgresql_flexible_database` - `collation` can now be set to `English_United Kingdom.1252` ([#23171](https://github.com/hashicorp/terraform-provider-azurerm/issues/23171)) +* `azurerm_postgresql_flexible_server` - support for the `auto_grow_enabled` property ([#23069](https://github.com/hashicorp/terraform-provider-azurerm/issues/23069)) +* `azurerm_redis_enterprise_cluster` - support for Flash clusters in Brazil South ([#23200](https://github.com/hashicorp/terraform-provider-azurerm/issues/23200)) +* `azurerm_resource_provider_registration` - refactoring to use `hashicorp/go-azure-sdk` ([#23072](https://github.com/hashicorp/terraform-provider-azurerm/issues/23072)) +* `azurerm_virtual_machine_extension` - support for `provision_after_extensions` ([#23124](https://github.com/hashicorp/terraform-provider-azurerm/issues/23124)) +* `azurerm_virtual_network_gateway` - increasing the default timeout for create to `90m` ([#23003](https://github.com/hashicorp/terraform-provider-azurerm/issues/23003)) +* `azurerm_virtual_hub_connection` - support for `inbound_route_map_id`, `outbound_route_map_id`, and `static_vnet_local_route_override_criteria` properties ([#23049](https://github.com/hashicorp/terraform-provider-azurerm/issues/23049)) + +BUG FIXES: + +* `azurerm_api_management_api_policy` - added state migration to mutate id's ending in `policies/policy` ([#23128](https://github.com/hashicorp/terraform-provider-azurerm/issues/23128)) +* `azurerm_api_management_api_operation_policy` - added state migration to mutate id's ending in `policies/policy` ([#23128](https://github.com/hashicorp/terraform-provider-azurerm/issues/23128)) +* `azurerm_api_management_product_policy` - added state migration to mutate id's ending in `policies/policy` ([#23128](https://github.com/hashicorp/terraform-provider-azurerm/issues/23128)) +* `azurerm_automation_account` - fixes logic for `local_authentication_enabled` ([#23082](https://github.com/hashicorp/terraform-provider-azurerm/issues/23082)) +* `azurerm_key_vault_managed_storage_account` - check id can be parsed correctly before setting it in state ([#23022](https://github.com/hashicorp/terraform-provider-azurerm/issues/23022)) +* `azurerm_monitor_diagnostic_setting` - fix `enabled_log` feature flagged schema ([#23093](https://github.com/hashicorp/terraform-provider-azurerm/issues/23093)) +* `azurerm_pim_active_role_assignment`: polling for the duration of the timeout, rather than a fixed 5 minute value ([#22932](https://github.com/hashicorp/terraform-provider-azurerm/issues/22932)) +* `azurerm_policy_set_definition` - only sending `parameters` when a value is configured ([#23155](https://github.com/hashicorp/terraform-provider-azurerm/issues/23155)) +* `azurerm_synapse_workspace` - fixes index out-of-range panic when parsing `storage_data_lake_gen2_filesystem_id` ([#23019](https://github.com/hashicorp/terraform-provider-azurerm/issues/23019)) +* `machine_learning_datastore_*` - fixes container ids ([#23140](https://github.com/hashicorp/terraform-provider-azurerm/issues/23140)) +* `azurerm_key_vault_certificate` - id now points to new version when certificate is updated ([#23135](https://github.com/hashicorp/terraform-provider-azurerm/issues/23135)) +* `azurerm_site_recovery_replicated_vm` - update `network_interface` diff so replicated items now can be updated ([#23199](https://github.com/hashicorp/terraform-provider-azurerm/issues/23199)) + +DEPRECATION: + +* Data Source: `azure_monitor_log_profile` - Azure is retiring Azure Log Profiles on the 30th of September 2026 ([#23146](https://github.com/hashicorp/terraform-provider-azurerm/issues/23146)) +* `azure_monitor_log_profile` - Azure is retiring Azure Log Profiles on the 30th of September 2026 ([#23146](https://github.com/hashicorp/terraform-provider-azurerm/issues/23146)) + +## 3.71.0 (August 24, 2023) + +BREAKING CHANGES: + +* **App Service `win32_status` property** - Due to a change made in the service to the underlying type of the Auto Heal property `win32_status` combined with a prior bug (in `v3.62.1` and earlier) causing the value of this property to be stored incorrectly in state as an empty string, the value of this property could not be updated or state migrated to accommodate the necessary type change in the state. This results in the resources named above returning an error of a number is needed when decoding the state for this value. Unfortunately, this is a breaking change and will require users of this field to change their Terraform Configuration. The field `win32_status` has been replaced by `win32_status_code` (this remains an int, as in 3.63.0 onwards) for `azurerm_linux_web_app`, `azurerm_linux_web_app_slot`, `azurerm_windows_web_app`, `azurerm_windows_web_app_slot resources`. ([#23075](https://github.com/hashicorp/terraform-provider-azurerm/issues/23075)) + +FEATURES: + +* **New Resource**: `azurerm_databricks_workspace_root_dbfs_customer_managed_key` ([#22579](https://github.com/hashicorp/terraform-provider-azurerm/issues/22579)) + +ENHANCEMENTS: + +* dependencies: updating to `v0.20230824.1130652` of `github.com/hashicorp/go-azure-sdk` ([#23076](https://github.com/hashicorp/terraform-provider-azurerm/issues/23076)) +* `trafficmanager`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#22579](https://github.com/hashicorp/terraform-provider-azurerm/issues/22579)) +* `webpubsub`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#22579](https://github.com/hashicorp/terraform-provider-azurerm/issues/22579)) +* `automation`: upgrade remaining resources to `2022-08-08` ([#22989](https://github.com/hashicorp/terraform-provider-azurerm/issues/22989)) +* `azurerm_storage_management_policy` - move to `hashicorp/go-azure-sdk` ([#23035](https://github.com/hashicorp/terraform-provider-azurerm/issues/23035)) +* Data Source: `azurerm_disk_encryption_set` - support for the `identity` block ([#23005](https://github.com/hashicorp/terraform-provider-azurerm/issues/23005)) +* `azurerm_container_group` - support for the `sku` and `(init_)container.*.security` properties ([#23034](https://github.com/hashicorp/terraform-provider-azurerm/issues/23034)) +* `azurerm_kubernetes_cluster` - extend allowed ranges for various `sysctl_config` attribute ranges ([#23077](https://github.com/hashicorp/terraform-provider-azurerm/issues/23077)) +* `azurerm_kubernetes_cluster_node_pool` - extend allowed ranges for various `sysctl_config` attribute ranges ([#23077](https://github.com/hashicorp/terraform-provider-azurerm/issues/23077)) +* `azurerm_kubernetes_cluster` - clusters can be updated to use the `cilium` dataplane by setting the value in `ebpf_data_plane` ([#22952](https://github.com/hashicorp/terraform-provider-azurerm/issues/22952)) +* `azurerm_linux_virtual_machine_scale_set` - cancel rolling upgrades that are in progress before destroying the resource ([#22991](https://github.com/hashicorp/terraform-provider-azurerm/issues/22991)) +* `azurerm_servicebus_namespace` - support for `network_rule_set` block ([#23057](https://github.com/hashicorp/terraform-provider-azurerm/issues/23057)) +* `azurerm_windows_virtual_machine_scale_set` - cancel rolling upgrades that are in progress before destroying the resource ([#22991](https://github.com/hashicorp/terraform-provider-azurerm/issues/22991)) +* `azurerm_synapse_spark_pool` - support addtional values for the `node_size_family` property ([#23040](https://github.com/hashicorp/terraform-provider-azurerm/issues/23040)) + +BUG FIXES: + +* `azurerm_api_management_policy` - fixes an error caused by a migration ([#23018](https://github.com/hashicorp/terraform-provider-azurerm/issues/23018)) +* `azurerm_kubernetes_cluster` - deprecate `public_network_access_enabled` and prevent sending it to the API since it isn't functional ([#22478](https://github.com/hashicorp/terraform-provider-azurerm/issues/22478)) + +## 3.70.0 (August 17, 2023) + +FEATURES: + +* **New Resource**: `azurerm_mssql_virtual_machine_availability_group_listener` ([#22808](https://github.com/hashicorp/terraform-provider-azurerm/issues/22808)) +* **New Resource**: `azurerm_mssql_virtual_machine_group` ([#22808](https://github.com/hashicorp/terraform-provider-azurerm/issues/22808)) + +ENHANCEMENTS: + +* dependencies: updating to `v0.20230815.1165905` of `github.com/hashicorp/go-azure-sdk` ([#22981](https://github.com/hashicorp/terraform-provider-azurerm/issues/22981)) +* `apimanagement`: updating to use `hashicorp/go-azure-sdk` ([#22783](https://github.com/hashicorp/terraform-provider-azurerm/issues/22783)) +* `cosmos`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#22874](https://github.com/hashicorp/terraform-provider-azurerm/issues/22874)) +* `devtestlabs`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#22981](https://github.com/hashicorp/terraform-provider-azurerm/issues/22981)) +* `policy`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#22874](https://github.com/hashicorp/terraform-provider-azurerm/issues/22874)) +* `postgresql`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#22874](https://github.com/hashicorp/terraform-provider-azurerm/issues/22874)) +* `recoveryservices`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#22874](https://github.com/hashicorp/terraform-provider-azurerm/issues/22874)) +* `resources`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#22874](https://github.com/hashicorp/terraform-provider-azurerm/issues/22874)) +* `storage`: updating Storage Account and Storage Blob Container to use Common IDs to enable migrating to `hashicorp/go-azure-sdk` in the future ([#22915](https://github.com/hashicorp/terraform-provider-azurerm/issues/22915)) +* Data Source: `azurerm_kubernetes_cluster` - add support for the `current_kubernetes_version` property ([#22986](https://github.com/hashicorp/terraform-provider-azurerm/issues/22986)) +* `azurerm_mssql_virtual_machine` - add support for the `sql_virtual_machine_group_id` and `wsfc_domain_credential` properties ([#22808](https://github.com/hashicorp/terraform-provider-azurerm/issues/22808)) +* `azurerm_netapp_pool` - `size_in_tb` can be sized down to 2 TB ([#22943](https://github.com/hashicorp/terraform-provider-azurerm/issues/22943)) +* `azurerm_stack_hci_cluster` - add support for the `automanage_configuration_id` property ([#22857](https://github.com/hashicorp/terraform-provider-azurerm/issues/22857)) +* Data Source: `azurerm_disk_encryption_set` - now exports `key_vault_key_url` ([#22893](https://github.com/hashicorp/terraform-provider-azurerm/issues/22893)) +* `azurerm_disk_encryption_set` - now exports `key_vault_key_url` ([#22893](https://github.com/hashicorp/terraform-provider-azurerm/issues/22893)) + +BUG FIXES: + +* `azurerm_cognitive_deployment` - add lock on parent resource to prevent errors when deleting the resource ([#22940](https://github.com/hashicorp/terraform-provider-azurerm/issues/22940)) +* `azurerm_cost_management_scheduled_action` - fix update for `email_address_sender` ([#22930](https://github.com/hashicorp/terraform-provider-azurerm/issues/22930)) +* `azurerm_disk_encryption_set` - now correctly supports key rotation by specifying a versionless Key ID when setting `auto_key_rotation_enabled` to `true` ([#22893](https://github.com/hashicorp/terraform-provider-azurerm/issues/22893)) +* `azurerm_iothub_dps` - updating the validation for `target` within the `ip_filter_rule` block to match the values defined in the Azure API Definitions ([#22891](https://github.com/hashicorp/terraform-provider-azurerm/issues/22891)) +* `azurerm_postgresql_database` - reworking the validation for database collation ([#22928](https://github.com/hashicorp/terraform-provider-azurerm/issues/22928)) +* `azurerm_postgresql_flexible_database` - reworking the validation for database collation ([#22928](https://github.com/hashicorp/terraform-provider-azurerm/issues/22928)) +* `azurerm_storage_management_policy` - check for an existing resource to prevent overwriting property values ([#22966](https://github.com/hashicorp/terraform-provider-azurerm/issues/22966)) +* `azurerm_virtual_network_gateway_connection` - `custom_bgp_addresses.secondary` is now `Optional` rather than `Required` ([#22912](https://github.com/hashicorp/terraform-provider-azurerm/issues/22912)) +* `azurerm_web_application_firewall_policy` - fix handling not found in read ([#22982](https://github.com/hashicorp/terraform-provider-azurerm/issues/22982)) + ## 3.69.0 (August 10, 2023) FEATURES: diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f733bb0cce2e..3d09a3e6f00ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,1870 +1,126 @@ -## 3.116.0 (August 16, 2024) - -DEPRECATIONS: - -All Azure Kubernetes Service (AKS) properties related to preview features are deprecated since they will not be available in a stable API. Please see https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/4.0-upgrade-guide#aks-migration-to-stable-api for more details ([#26863](https://github.com/hashicorp/terraform-provider-azurerm/issues/26863)) - -FEATURES: - -* New Resource: `azurerm_ai_services` ([#26008](https://github.com/hashicorp/terraform-provider-azurerm/issues/26008)) -* New Resource: `azurerm_communication_service_email_domain_association` ([#26432](https://github.com/hashicorp/terraform-provider-azurerm/issues/26432)) -* New Resource: `azurerm_dev_center_project_environment_type` ([#26941](https://github.com/hashicorp/terraform-provider-azurerm/issues/26941)) -* New Resource: `azurerm_extended_location_custom_location` ([#24267](https://github.com/hashicorp/terraform-provider-azurerm/issues/24267)) -* New Resource: `azurerm_postgresql_flexible_server_virtual_endpoint` ([#26708](https://github.com/hashicorp/terraform-provider-azurerm/issues/26708)) - -ENHANCEMENTS: - -* `notificationhub` - updating to use version `2023-09-01` ([#26528](https://github.com/hashicorp/terraform-provider-azurerm/issues/26528)) -* `azurerm_api_management_api` - update validation of `path` to allow single character strings ([#26922](https://github.com/hashicorp/terraform-provider-azurerm/issues/26922)) -* `azurerm_cosmosdb_account` - add support for the property `burst_capacity_enabled` ([#26986](https://github.com/hashicorp/terraform-provider-azurerm/issues/26986)) -* `azurerm_linux_function_app` - add support for `vnet_image_pull_enabled` property in 4.0 ([#27001](https://github.com/hashicorp/terraform-provider-azurerm/issues/27001)) -* `azurerm_linux_function_app_slot` - add support for `vnet_image_pull_enabled` property in 4.0 ([#27001](https://github.com/hashicorp/terraform-provider-azurerm/issues/27001)) -* `azurerm_logic_app_standard` - add support for `v8.0` in `site_config.dotnet_framework_version` ([#26983](https://github.com/hashicorp/terraform-provider-azurerm/issues/26983)) -* `azurerm_management_group_policy_assignment` - remove length restriction on name ([#27055](https://github.com/hashicorp/terraform-provider-azurerm/issues/27055)) -* `azurerm_recovery_services_vault` - add support for the `identity` block ([#26254](https://github.com/hashicorp/terraform-provider-azurerm/issues/26254)) -* `azurerm_web_application_firewall_policy` - add support for the `js_challenge_cookie_expiration_in_minutes` property ([#26878](https://github.com/hashicorp/terraform-provider-azurerm/issues/26878)) -* `azurerm_windows_function_app` - add support for `vnet_image_pull_enabled` property in 4.0 ([#27001](https://github.com/hashicorp/terraform-provider-azurerm/issues/27001)) -* `azurerm_windows_function_app_slot` - add support for `vnet_image_pull_enabled` property in 4.0 ([#27001](https://github.com/hashicorp/terraform-provider-azurerm/issues/27001)) - -BUG FIXES: - -* Data Source: `azurerm_storage_account` - add `default_share_level_permission` to the `azure_files_authentication` to prevent invalid address errors ([#26996](https://github.com/hashicorp/terraform-provider-azurerm/issues/26996)) -* Data Source: `azurerm_search_service` - expose the `tags` property ([#26978](https://github.com/hashicorp/terraform-provider-azurerm/issues/26978)) -* Data Source: `azurerm_virtual_machine` - populate missing `power_state` ([#26991](https://github.com/hashicorp/terraform-provider-azurerm/issues/26991)) -* Data Source: `azurerm_virtual_machine_scale_set` - populate missing `power_state` ([#26991](https://github.com/hashicorp/terraform-provider-azurerm/issues/26991)) -* `azurerm_api_management_api_schema` - correctly unmarshal `definition` and `components` ([#26531](https://github.com/hashicorp/terraform-provider-azurerm/issues/26531)) -* `azurerm_cdn_frontdoor_secret` - fix issue where `expiration_date` was being set into the parent block ([#26982](https://github.com/hashicorp/terraform-provider-azurerm/issues/26982)) -* `azurerm_container_app_environment` - fix diff suppress on `infrastructure_resource_group_name` ([#27007](https://github.com/hashicorp/terraform-provider-azurerm/issues/27007)) -* `azurerm_express_route_connection` - prevent sending `private_link_fast_path_enabled` in the payload if it hasn't been explicitly set ([#26928](https://github.com/hashicorp/terraform-provider-azurerm/issues/26928)) -* `azurerm_machine_learning_workspace` - `serverless_compute` can now be updated ([#26940](https://github.com/hashicorp/terraform-provider-azurerm/issues/26940)) -* `azurerm_mssql_database` - fix issue where the database cannot be upgraded to use serverless due to the behaviour of the `license_type` field ([#26850](https://github.com/hashicorp/terraform-provider-azurerm/issues/26850)) -* `azurerm_mssql_database` - prevent error when creating `Free` edition by setting `long_term_retention_policy` and `short_term_retention_policy` as empty ([#26894](https://github.com/hashicorp/terraform-provider-azurerm/issues/26894)) -* `azurerm_nginx_deployment` - omit `capacity` when creating deployments with a basic plan ([#26223](https://github.com/hashicorp/terraform-provider-azurerm/issues/26223)) -* `azurerm_role_management_policy` - prevent panic when updating `activation_rules.approval_stage` ([#26800](https://github.com/hashicorp/terraform-provider-azurerm/issues/26800)) -* `azurerm_sentinel_threat_intelligence_indicator` - prevent panic when importing this resource ([#26976](https://github.com/hashicorp/terraform-provider-azurerm/issues/26976)) -* `azurerm_servicebus_namespace` - fix panic reading encryption with versionless ids ([#27060](https://github.com/hashicorp/terraform-provider-azurerm/issues/27060)) -* `azurerm_synapse_spark_pool` - prevent plan diff due to API behaviour by setting `node_count` as Computed ([#26953](https://github.com/hashicorp/terraform-provider-azurerm/issues/26953)) -* `azurerm_virtual_network_gateway_connection` - fix issue where `ingress_nat_rule_ids` was updating the egress rules on updates ([#27022](https://github.com/hashicorp/terraform-provider-azurerm/issues/27022)) - -## 3.115.0 (August 09, 2024) - -ENHANCEMENTS: - -* `cosmosdb` - updating to use version `2024-05-15` ([#26758](https://github.com/hashicorp/terraform-provider-azurerm/issues/26758)) -* `healthcare` - updating to use version `2024-03-31` ([#26699](https://github.com/hashicorp/terraform-provider-azurerm/issues/26699)) -* `redis` - updating to use version `2024-03-01` ([#26932](https://github.com/hashicorp/terraform-provider-azurerm/issues/26932)) -* `azurerm_cosmosdb_account` - avoid infinite diff to `default_identity_type` for legacy resources where an empty string is returned by the RP ([#26525](https://github.com/hashicorp/terraform-provider-azurerm/issues/26525)) -* `azurerm_linux_virtual_machine_scale_set` - add support for the `action` property in the `automatic_instance_repair` block ([#26227](https://github.com/hashicorp/terraform-provider-azurerm/issues/26227)) -* `azurerm_log_analytics_saved_search` - update the regex for the `function_parameters` property to support more paramters ([#26701](https://github.com/hashicorp/terraform-provider-azurerm/issues/26701)) -* `azurerm_monitor_data_collection_rule` - update `performance_counter.x.sampling_frequency_in_seconds` range `1` to `1800` ([#26898](https://github.com/hashicorp/terraform-provider-azurerm/issues/26898)) -* `azurerm_orchestrated_virtual_machine_scale_set` - add support for the `action` property in the `automatic_instance_repair` block ([#26227](https://github.com/hashicorp/terraform-provider-azurerm/issues/26227)) -* `azurerm_security_center_storage_defender` - add support for the property `scan_results_event_grid_topic_id` ([#26599](https://github.com/hashicorp/terraform-provider-azurerm/issues/26599)) -* `azurerm_storage_account` - add support for the property `default_share_level_permission` in the `azure_files_authentication` block ([#26924](https://github.com/hashicorp/terraform-provider-azurerm/issues/26924)) -* `azurerm_web_application_firewall_policy` - `excluded_rule_set.0.type` supports `Microsoft_BotManagerRuleSet` ([#26903](https://github.com/hashicorp/terraform-provider-azurerm/issues/26903)) -* `azurerm_windows_virtual_machine_scale_set` - add support for the `action` property in the `automatic_instance_repair` block ([#26227](https://github.com/hashicorp/terraform-provider-azurerm/issues/26227)) - -BUG FIXES: - -* `azurerm_container_group` - retrieve and set `storage_account_key` in the payload when updating the resource ([#26640](https://github.com/hashicorp/terraform-provider-azurerm/issues/26640)) -* `azurerm_key_vault_managed_hardware_security_module_role_assignment` - fixed a crash in error messages ([#26972](https://github.com/hashicorp/terraform-provider-azurerm/issues/26972)) -* `azurerm_kubernetes_cluster` - allow an empty list for `dns_zone_ids` in the `web_app_routing` block ([#26747](https://github.com/hashicorp/terraform-provider-azurerm/issues/26747)) -* `azurerm_storage_share_file` - fix a bug when encoding the MD5 hash for the `content_md5` property ([#25715](https://github.com/hashicorp/terraform-provider-azurerm/issues/25715)) - -## 3.114.0 (August 01, 2024) - -UPGRADE NOTES: -* **4.0 Beta:** This release includes a new feature-flag to opt-into the 4.0 Beta - which (when enabled) introduces a number of behavioural changes, field renames and removes some older deprecated resources and data sources. Please read the disclaimers carefully that are outlined in our [guide on how to opt-into the 4.0 Beta](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/4.0-beta) before enabling this, as this will cause irreversible changes to your state. The 4.0 Beta is still a work-in-progress at this time and the changes listed in the [4.0 Upgrade Guide](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/4.0-upgrade-guide) may change. We're interested to hear your feedback which can be provided by following [this link](https://github.com/terraform-providers/terraform-provider-azurerm/issues/new?template=Beta_Feedback.md). - -FEATURES: - -* **New Resource:** `azurerm_dev_center_network_connection` ([#26718](https://github.com/hashicorp/terraform-provider-azurerm/issues/26718)) -* **New Resource:** `azurerm_stack_hci_logical_network` ([#26473](https://github.com/hashicorp/terraform-provider-azurerm/issues/26473)) - -ENHANCEMENTS: - -* dependencies: updating `go-azure-helpers` to `v0.70.1` ([#26757](https://github.com/hashicorp/terraform-provider-azurerm/issues/26757)) -* `arckubernetes` - updating to use version `2024-01-01` ([#26761](https://github.com/hashicorp/terraform-provider-azurerm/issues/26761)) -* `data.azurerm_storage_account` - the `enable_https_traffic_only` property has been superseded by `https_traffic_only_enabled` ([#26740](https://github.com/hashicorp/terraform-provider-azurerm/issues/26740)) -* `azurerm_log_analytics_cluster` - add support for setting `size_gb` to `100` [GH-#26865] -* `azurerm_storage_account` - the `enable_https_traffic_only` property has been superseded by `https_traffic_only_enabled` ([#26740](https://github.com/hashicorp/terraform-provider-azurerm/issues/26740)) - -BUG FIXES: - -* `azurerm_dns_cname_record` - split create and update function to fix lifecycle - ignore ([#26610](https://github.com/hashicorp/terraform-provider-azurerm/issues/26610)) -* `azurerm_dns_srv_record` - split create and update function to fix lifecycle - ignore ([#26627](https://github.com/hashicorp/terraform-provider-azurerm/issues/26627)) -* `azurerm_kubernetes_cluster` - fix issue that prevented `max_count` from being updated ([#26417](https://github.com/hashicorp/terraform-provider-azurerm/issues/26417)) -* `azurerm_linux_web_app` - correctly set `site_config.always_on` as configured during Update ([#25753](https://github.com/hashicorp/terraform-provider-azurerm/issues/25753)) -* `azurerm_linux_web_app_slot` - correctly set `site_config.always_on` as configured during Update ([#25753](https://github.com/hashicorp/terraform-provider-azurerm/issues/25753)) -* `azurerm_management_group_policy_remediation` - fix panic in deprecated schema change for 4.0 ([#26767](https://github.com/hashicorp/terraform-provider-azurerm/issues/26767)) -* `azurerm_network_security_rule` - fix panic when updating `source_port_ranges` ([#26883](https://github.com/hashicorp/terraform-provider-azurerm/issues/26883)) -* `azurerm_public_ip` - fix panix when updating `idle_timeout_in_minutes` - -DEPRECATIONS: -* `azurerm_redis_cache` - `enable_non_ssl_port` has been superseded by `non_ssl_port_enabled` and `redis_configuration. enable_authentication` has been superseded by `redis_configuration.authentication_enabled` ([#26608](https://github.com/hashicorp/terraform-provider-azurerm/issues/26608)) - - -## 3.113.0 (July 18, 2024) - -ENHANCEMENTS: - -* dependencies: updating to `v0.20240715.1100358` of `hashicorp/go-azure-sdk` ([#26638](https://github.com/hashicorp/terraform-provider-azurerm/issues/26638)) -* `storage` - updating to use `hashicorp/go-azure-sdk` ([#26218](https://github.com/hashicorp/terraform-provider-azurerm/issues/26218)) - -BUG FIXES: - -* `azurerm_storage_account` - fix a validation bug when replacing a StorageV2 account with a StorageV1 account ([#26639](https://github.com/hashicorp/terraform-provider-azurerm/issues/26639)) -* `azurerm_storage_account` - resolve an issue refreshing blob or queue properties after recreation ([#26218](https://github.com/hashicorp/terraform-provider-azurerm/issues/26218)) -* `azurerm_storage_account` - resolve an issue setting tags for an existing storage account where a policy mandates them ([#26218](https://github.com/hashicorp/terraform-provider-azurerm/issues/26218)) -* `azurerm_storage_account` - fix a persistent diff with the `customer_managed_key` block ([#26218](https://github.com/hashicorp/terraform-provider-azurerm/issues/26218)) -* `azurerm_storage_account` - resolve several consistency related issues when crreating a new storage account ([#26218](https://github.com/hashicorp/terraform-provider-azurerm/issues/26218)) - -DEPRECATIONS: - -* `azurerm_eventhub_namespace` - deprecate the `zone_redundant` field in v4.0 ([#26611](https://github.com/hashicorp/terraform-provider-azurerm/issues/26611)) -* `azurerm_servicebus_namespace` - deprecate the `zone_redundant` field in v4.0 ([#26611](https://github.com/hashicorp/terraform-provider-azurerm/issues/26611)) - -## 3.112.0 (July 12, 2024) - -FEATURES: - -* New Data Source: `azurerm_elastic_san_volume_snapshot` ([#26439](https://github.com/hashicorp/terraform-provider-azurerm/issues/26439)) -* New Resource: `azurerm_dev_center_dev_box_definition` ([#26307](https://github.com/hashicorp/terraform-provider-azurerm/issues/26307)) -* New Resource: `azurerm_dev_center_environment_type` ([#26291](https://github.com/hashicorp/terraform-provider-azurerm/issues/26291)) -* New Resource: `azurerm_virtual_machine_restore_point` ([#26526](https://github.com/hashicorp/terraform-provider-azurerm/issues/26526)) -* New Resource: `azurerm_virtual_machine_restore_point_collection` ([#26526](https://github.com/hashicorp/terraform-provider-azurerm/issues/26526)) - -ENHANCEMENTS: - -* dependencies: updating to `v0.20240710.1114656` of `github.com/hashicorp/go-azure-sdk` ([#26588](https://github.com/hashicorp/terraform-provider-azurerm/issues/26588)) -* dependencies: updating to `v0.70.0` of `go-azure-helpers` ([#26601](https://github.com/hashicorp/terraform-provider-azurerm/issues/26601)) -* `containerservice`: updating the Fleet resources to use API Version `2024-04-01` ([#26588](https://github.com/hashicorp/terraform-provider-azurerm/issues/26588)) -* Data Source: `azurerm_network_service_tags` - extend validation for `service` to allow `AzureFrontDoor.Backend`, `AzureFrontDoor.Frontend`, and `AzureFrontDoor.FirstParty` ([#26429](https://github.com/hashicorp/terraform-provider-azurerm/issues/26429)) -* `azurerm_api_management_identity_provider_aad` - support for the `client_library` property ([#26093](https://github.com/hashicorp/terraform-provider-azurerm/issues/26093)) -* `azurerm_api_management_identity_provider_aadb2c` - support for the `client_library` property ([#26093](https://github.com/hashicorp/terraform-provider-azurerm/issues/26093)) -* `azurerm_dev_test_virtual_network` - support for the `shared_public_ip_address` property ([#26299](https://github.com/hashicorp/terraform-provider-azurerm/issues/26299)) -* `azurerm_kubernetes_cluster` - support for the `certificate_authority` block under the `service_mesh_profile` block ([#26543](https://github.com/hashicorp/terraform-provider-azurerm/issues/26543)) -* `azurerm_linux_web_app` - support the value `8.3` for the `php_version` property ([#26194](https://github.com/hashicorp/terraform-provider-azurerm/issues/26194)) -* `azurerm_machine_learning_compute_cluster` - the `identity` property can now be updated ([#26404](https://github.com/hashicorp/terraform-provider-azurerm/issues/26404)) -* `azurerm_web_application_firewall_policy` - support for the `JSChallenge` value for `managed_rules.managed_rule_set.rule_group_override.rule_action` ([#26561](https://github.com/hashicorp/terraform-provider-azurerm/issues/26561)) - -BUG FIXES: - -* Data Source: `azurerm_communication_service` - `primary_connection_string`, `primary_key`, `secondary_connection_string` and `secondary_key` are marked as Sensitive ([#26560](https://github.com/hashicorp/terraform-provider-azurerm/issues/26560)) -* `azurerm_app_configuration_feature` - fix issue when updating the resource without an existing `targeting_filter` ([#26506](https://github.com/hashicorp/terraform-provider-azurerm/issues/26506)) -* `azurerm_backup_policy_vm` - split create and update function to fix lifecycle - ignore ([#26591](https://github.com/hashicorp/terraform-provider-azurerm/issues/26591)) -* `azurerm_backup_protected_vm` - split create and update function to fix lifecycle - ignore ([#26583](https://github.com/hashicorp/terraform-provider-azurerm/issues/26583)) -* `azurerm_communication_service` - the `primary_connection_string`, `primary_key`, `secondary_connection_string`, and `secondary_key` properties are now sensitive ([#26560](https://github.com/hashicorp/terraform-provider-azurerm/issues/26560)) -* `azurerm_mysql_flexible_server_configuration` - add locks to prevent conflicts when deleting the resource ([#26289](https://github.com/hashicorp/terraform-provider-azurerm/issues/26289)) -* `azurerm_nginx_deployment` - changing the `frontend_public.ip_address`, `frontend_private.ip_address`, `frontend_private.allocation_method`, and `frontend_private.subnet_id` now creates a new resource ([#26298](https://github.com/hashicorp/terraform-provider-azurerm/issues/26298)) -* `azurerm_palo_alto_local_rulestack_rule` - correctl read the `protocol` property on read when the `protocol_ports` property is configured ([#26510](https://github.com/hashicorp/terraform-provider-azurerm/issues/26510)) -* `azurerm_servicebus_namespace` - parse the identity returned by the API insensitively before setting into state ([#26540](https://github.com/hashicorp/terraform-provider-azurerm/issues/26540)) - -DEPRECATIONS: - -* `azurerm_servicebus_queue` - `enable_batched_operations`, `enable_express` and `enable_partitioning` are superseded by `batched_operations_enabled`, `express_enabled` and `partitioning_enabled` ([#26479](https://github.com/hashicorp/terraform-provider-azurerm/issues/26479)) -* `azurerm_servicebus_subscription` - `enable_batched_operations` has been superseded by `batched_operations_enabled` ([#26479](https://github.com/hashicorp/terraform-provider-azurerm/issues/26479)) -* `azurerm_servicebus_topic` - `enable_batched_operations`, `enable_express` and `enable_partitioning` are superseded by `batched_operations_enabled`, `express_enabled` and `partitioning_enabled` ([#26479](https://github.com/hashicorp/terraform-provider-azurerm/issues/26479)) - -## 3.111.0 (July 04, 2024) - -FEATURES: - -* **New Resource:** `azurerm_restore_point_collection` ([#26518](https://github.com/hashicorp/terraform-provider-azurerm/issues/26518)) - -ENHANCEMENTS: - -* dependencies: updating to `v0.20240701.1082110` of `github.com/hashicorp/go-azure-sdk` ([#26502](https://github.com/hashicorp/terraform-provider-azurerm/issues/26502)) -* `azurerm_disk_encryption_set` - support for the `managed_hsm_key_id` property ([#26201](https://github.com/hashicorp/terraform-provider-azurerm/issues/26201)) -* `azurerm_firewall_policy` - remove Computed from the `sku` property and add a default of `Standard` in 4.0 ([#26499](https://github.com/hashicorp/terraform-provider-azurerm/issues/26499)) -* `azurerm_kubernetes_cluster` - support updating `default_node_pool.os_sku` between `Ubuntu` and `AzureLinux` ([#26262](https://github.com/hashicorp/terraform-provider-azurerm/issues/26262)) -* `azurerm_kubernetes_cluster_node_pool` - support updating `os_sku` between `Ubuntu` and `AzureLinux` ([#26139](https://github.com/hashicorp/terraform-provider-azurerm/issues/26139)) -* `azurerm_service_plan` - support for new the Flex Consumption plan ([#26351](https://github.com/hashicorp/terraform-provider-azurerm/issues/26351)) - -BUG FIXES: - -* `azurerm_kubernetes_cluster` - prevent a panic ([#26478](https://github.com/hashicorp/terraform-provider-azurerm/issues/26478)) -* `azurerm_kubernetes_cluster` - prevent a diff in `upgrade_settings` when the API returns an empty object ([#26541](https://github.com/hashicorp/terraform-provider-azurerm/issues/26541)) -* `azurerm_kubernetes_cluster_node_pool` - prevent a diff in `upgrade_settings` when the API returns an empty object ([#26541](https://github.com/hashicorp/terraform-provider-azurerm/issues/26541)) -* `azurerm_virtual_network_gateway` - split create and update function to fix lifecycle - ignore ([#26451](https://github.com/hashicorp/terraform-provider-azurerm/issues/26451)) -* `azurerm_virtual_network_gateway_connection` - split create and update function to fix lifecycle - ignore ([#26431](https://github.com/hashicorp/terraform-provider-azurerm/issues/26431)) - -## 3.110.0 (June 27, 2024) - -FEATURES: - -* **New Data Source:** `azurerm_load_test` ([#26376](https://github.com/hashicorp/terraform-provider-azurerm/issues/26376)) -* **New Resource:** `azurerm_virtual_desktop_scaling_plan_host_pool_association` ([#24670](https://github.com/hashicorp/terraform-provider-azurerm/issues/24670)) - -ENHANCEMENTS: - -* Data Source: `azurerm_monitor_data_collection_endpoint` - support for the `immutable_id` property ([#26380](https://github.com/hashicorp/terraform-provider-azurerm/issues/26380)) -* Data Source: `azurerm_nginx_certificate` - export the properties `sha1_thumbprint`, `key_vault_secret_version`, `key_vault_secret_creation_date`, `error_code` and `error_message` ([#26160](https://github.com/hashicorp/terraform-provider-azurerm/issues/26160)) -* `azurerm_backup_policy_vm` - support for the `tiering_policy` property ([#26263](https://github.com/hashicorp/terraform-provider-azurerm/issues/26263)) -* `azurerm_kubernetes_cluster_node_pool` - Pod Disruption Budgets are now respected when deleting a node pool ([#26471](https://github.com/hashicorp/terraform-provider-azurerm/issues/26471)) -* `azurerm_monitor_data_collection_endpoint` - support for the `immutable_id` property ([#26380](https://github.com/hashicorp/terraform-provider-azurerm/issues/26380)) -* `azurerm_mssql_managed_instance` - support the value `GZRS` for the `storage_account_type` property ([#26448](https://github.com/hashicorp/terraform-provider-azurerm/issues/26448)) -* `azurerm_mssql_managed_instance_transparent_data_encryption` - support for the `managed_hsm_key_id` property ([#26496](https://github.com/hashicorp/terraform-provider-azurerm/issues/26496)) -* `azurerm_redis_cache_access_policy` - allow updates to `permissions` ([#26440](https://github.com/hashicorp/terraform-provider-azurerm/issues/26440)) -* `azurerm_redhat_openshift_cluster` - support for the `managed_resource_group_name` property ([#25529](https://github.com/hashicorp/terraform-provider-azurerm/issues/25529)) -* `azurerm_redhat_openshift_cluster` - support for the `preconfigured_network_security_group_enabled` property ([#26082](https://github.com/hashicorp/terraform-provider-azurerm/issues/26082)) -* `azurerm_iotcentral_application` - remove Computed from `template` and set default of `iotc-pnp-preview@1.0.0` in 4.0 ([#26485](https://github.com/hashicorp/terraform-provider-azurerm/issues/26485)) -* `azurerm_digital_twins_time_series_database_connection` - remove Computed from `kusto_table_name` and set a default of `AdtPropertyEvents` in 4.0 ([#26484](https://github.com/hashicorp/terraform-provider-azurerm/issues/26484)) - -BUG FIXES: - -* Data Source: `azurerm_express_route_circuit_peering` - fix issue where data source attempts to parse an empty string instead of generating the resource ID ([#26441](https://github.com/hashicorp/terraform-provider-azurerm/issues/26441)) -* `azurerm_express_route_gateway` - prevent a panic ([#26467](https://github.com/hashicorp/terraform-provider-azurerm/issues/26467)) -* `azurerm_monitor_scheduled_query_rules_alert_v2` - correctly handle the `identity` block if not specified ([#26364](https://github.com/hashicorp/terraform-provider-azurerm/issues/26364)) -* `azurerm_security_center_automation` - prevent resource recreation when `tags` are updated ([#26292](https://github.com/hashicorp/terraform-provider-azurerm/issues/26292)) -* `azurerm_synapse_workspace` - fix issue where `azure_devops_repo` or `github_repo` configuration could not be removed ([#26421](https://github.com/hashicorp/terraform-provider-azurerm/issues/26421)) -* `azurerm_virtual_network_dns_servers` - split create and update function to fix lifecycle - ignore ([#26427](https://github.com/hashicorp/terraform-provider-azurerm/issues/26427)) -* `azurerm_linux_function_app` - set `allowed_applications` in the request payload ([#26462](https://github.com/hashicorp/terraform-provider-azurerm/issues/26462)) -* `azurerm_linux_function_app_slot` - set `allowed_applications` in the request payload ([#26462](https://github.com/hashicorp/terraform-provider-azurerm/issues/26462)) -* `azurerm_windows_function_app` - set `allowed_applications` in the request payload ([#26462](https://github.com/hashicorp/terraform-provider-azurerm/issues/26462)) -* `azurerm_windows_function_app_slot` - set `allowed_applications` in the request payload ([#26462](https://github.com/hashicorp/terraform-provider-azurerm/issues/26462)) -* `azurerm_linux_web_app` - set `allowed_applications` in the request payload ([#26462](https://github.com/hashicorp/terraform-provider-azurerm/issues/26462)) -* `azurerm_linux_web_app_slot` - set `allowed_applications` in the request payload ([#26462](https://github.com/hashicorp/terraform-provider-azurerm/issues/26462)) -* `azurerm_windows_web_app` - set `allowed_applications` in the request payload ([#26462](https://github.com/hashicorp/terraform-provider-azurerm/issues/26462)) -* `azurerm_windows_web_app_slot` - set `allowed_applications` in the request payload ([#26462](https://github.com/hashicorp/terraform-provider-azurerm/issues/26462)) -* `azurerm_api_management` - remove ForceNew from `additional_location.zones` ([#26384](https://github.com/hashicorp/terraform-provider-azurerm/issues/26384)) -* `azurerm_logic_app_integration_account_schema` - the `name` property now allows underscores ([#26475](https://github.com/hashicorp/terraform-provider-azurerm/issues/26475)) -* `azurerm_palo_alto_local_rulestack_rule` - prevent error when switching between `protocol` and `protocol_ports` ([#26490](https://github.com/hashicorp/terraform-provider-azurerm/issues/26490)) - -DEPRECATIONS: - -* `azurerm_analysis_service_server` - the property `enable_power_bi_service` has been superseded by `power_bi_service_enabled` ([#26456](https://github.com/hashicorp/terraform-provider-azurerm/issues/26456)) - -## 3.109.0 (June 20, 2024) - -FEATURES: - -* **New Data Source:** `azurerm_automation_runbook` ([#26359](https://github.com/hashicorp/terraform-provider-azurerm/issues/26359)) -* **New Resource:** `azurerm_data_protection_backup_instance_postgresql_flexible_server` ([#26249](https://github.com/hashicorp/terraform-provider-azurerm/issues/26249)) -* **New Resource:** `azurerm_email_communication_service_domain` ([#26179](https://github.com/hashicorp/terraform-provider-azurerm/issues/26179)) -* **New Resource:** `azurerm_system_center_virtual_machine_manager_cloud` ([#25429](https://github.com/hashicorp/terraform-provider-azurerm/issues/25429)) -* **New Resource:** `azurerm_system_center_virtual_machine_manager_virtual_machine_template` ([#25449](https://github.com/hashicorp/terraform-provider-azurerm/issues/25449)) -* **New Resource:** `azurerm_system_center_virtual_machine_manager_virtual_network` ([#25451](https://github.com/hashicorp/terraform-provider-azurerm/issues/25451)) - -ENHANCEMENTS: - -* Data Source: `azurerm_hdinsight_cluster` - export the `cluster_id` attribute ([#26228](https://github.com/hashicorp/terraform-provider-azurerm/issues/26228)) -* `azurerm_cosmosdb_sql_container` - support for the `partition_key_kind` and `partition_key_paths` properties ([#26372](https://github.com/hashicorp/terraform-provider-azurerm/issues/26372)) -* `azurerm_data_protection_backup_instance_blob_storage` - support for the `storage_account_container_names` property ([#26232](https://github.com/hashicorp/terraform-provider-azurerm/issues/26232)) -* `azurerm_virtual_network_peering` - support for the `peer_complete_virtual_networks_enabled`, `only_ipv6_peering_enabled`, `local_subnet_names`, and `remote_subnet_names` properties ([#26229](https://github.com/hashicorp/terraform-provider-azurerm/issues/26229)) -* `azurerm_virtual_desktop_host_pool` - changing the `preferred_app_group_type` property no longer creates a new resource ([#26333](https://github.com/hashicorp/terraform-provider-azurerm/issues/26333)) -* `azurerm_maps_account` - support for the `location`, `identity`, `cors` and `data_store` properties ([#26397](https://github.com/hashicorp/terraform-provider-azurerm/issues/26397)) - -BUG FIXES: - -* `azurerm_automation_job_schedule` - updates `azurerm_automation_job_schedule` to use a composite resource id and allows `azurerm_automation_runbook` to be updated without causing `azurerm_automation_job_schedule` to recreate ([#22164](https://github.com/hashicorp/terraform-provider-azurerm/issues/22164)) -* `azurerm_databricks_workspace`- correctly allow disabling the default firewall ([#26339](https://github.com/hashicorp/terraform-provider-azurerm/issues/26339)) -* `azurerm_virtual_hub_*` - spliting create and update so lifecycle ignore changes works correctly ([#26310](https://github.com/hashicorp/terraform-provider-azurerm/issues/26310)) - -DEPRECATIONS: - -* Data Source: `azurerm_mariadb_server` - deprecated since the service is retiring. Please use `azurerm_mysql_flexible_server` instead ([#26354](https://github.com/hashicorp/terraform-provider-azurerm/issues/26354)) -* `azurerm_mariadb_configuration` - deprecated since the service is retiring. Please use `azurerm_mysql_flexible_server_configuration` instead ([#26354](https://github.com/hashicorp/terraform-provider-azurerm/issues/26354)) -* `azurerm_mariadb_database` - deprecated since the service is retiring. Please use `azurerm_mysql_flexible_database` instead ([#26354](https://github.com/hashicorp/terraform-provider-azurerm/issues/26354)) -* `azurerm_mariadb_firewall_rule` - deprecated since the service is retiring. Please use `azurerm_mysql_flexible_server_firewall_rule` instead ([#26354](https://github.com/hashicorp/terraform-provider-azurerm/issues/26354)) -* `azurerm_mariadb_server` - deprecated since the service is retiring. Please use `azurerm_mysql_flexible_server` instead ([#26354](https://github.com/hashicorp/terraform-provider-azurerm/issues/26354)) -* `azurerm_mariadb_virtual_network_rule` - deprecated since the service is retiring ([#26354](https://github.com/hashicorp/terraform-provider-azurerm/issues/26354)) - -## 3.108.0 (June 13, 2024) - -FEATURES: - -* **New Data Source:** `azurerm_role_management_policy` ([#25900](https://github.com/hashicorp/terraform-provider-azurerm/issues/25900)) -* **New Resource:** `azurerm_role_management_policy` ([#25900](https://github.com/hashicorp/terraform-provider-azurerm/issues/25900)) - -ENHANCEMENTS: - -* provider: support subscription ID hinting when using Azure CLI authentication ([#26282](https://github.com/hashicorp/terraform-provider-azurerm/issues/26282)) -* `serviceconnector`: updating to use API Version `2024-04-01` ([#26248](https://github.com/hashicorp/terraform-provider-azurerm/issues/26248)) -* `azurerm_container_groups` - can now be created with a User Assigned Identity when running Windows ([#26308](https://github.com/hashicorp/terraform-provider-azurerm/issues/26308)) -* `azurerm_kubernetes_cluster` - updating the `network_profile.network_policy` property to `azure` and `calico` when it hasn't been previously set is supported ([#26176](https://github.com/hashicorp/terraform-provider-azurerm/issues/26176)) -* `azurerm_kubernetes_cluster` - respect Pod Distruption Budgets when rotating the `default_node_pool` ([#26274](https://github.com/hashicorp/terraform-provider-azurerm/issues/26274)) -* `azurerm_lb_backend_address_pool` - support for the `synchronous_mode` property ([#26309](https://github.com/hashicorp/terraform-provider-azurerm/issues/26309)) -* `azurerm_private_endpoint` - support symultaneous creation of multiple resources of this type per subnet ([#26006](https://github.com/hashicorp/terraform-provider-azurerm/issues/26006)) - -BUG FIXES: - -* `azurerm_express_route_circuit_peering`, `azurerm_express_route_circuit`, `azurerm_express_route_gateway`, `azurerm_express_route_port` - split create and update ([#26237](https://github.com/hashicorp/terraform-provider-azurerm/issues/26237)) -* `azurerm_lb_backend_address_pool_address` - when using this resource, values are no longer reset on `azurerm_lb_backend_address_pool` ([#26264](https://github.com/hashicorp/terraform-provider-azurerm/issues/26264)) -* `azurerm_route_filter` - spliting create and update so lifecycle ignore changes works correctly ([#26266](https://github.com/hashicorp/terraform-provider-azurerm/issues/26266)) -* `azurerm_route_server` - spliting create and update so lifecycle ignore changes works correctly ([#26266](https://github.com/hashicorp/terraform-provider-azurerm/issues/26266)) -* `azurerm_synapse_workspace` - updates the client used in all operations of `azurerm_synapse_workspace_sql_aad_admin` to prevent this resource from modifying the same resource as `azurerm_synapse_workspace_aad_admin` ([#26317](https://github.com/hashicorp/terraform-provider-azurerm/issues/26317)) -* `azurerm_virtual_network` - correctly parse network securty group IDs ([#26283](https://github.com/hashicorp/terraform-provider-azurerm/issues/26283)) - -DEPRECATIONS: - -* Data Source: `azurerm_network_interface` - the `enable_ip_forwarding` and `enable_accelerated_networking` properties have been deprecated and superseded by the `ip_forwarding_enabled` and `accelerated_networking_enabled` properties ([#26293](https://github.com/hashicorp/terraform-provider-azurerm/issues/26293)) -* `azurerm_api_management` - the `policy` block has been deprecated is superseded by the `azurerm_api_management_policy` resource ([#26305](https://github.com/hashicorp/terraform-provider-azurerm/issues/26305)) -* `azurerm_kubernetes_cluster` - the `ebpf_data_plane` property has been deprecated and superseded by the `network_data_plane` property ([#26251](https://github.com/hashicorp/terraform-provider-azurerm/issues/26251)) -* `azurerm_network_interface` - the `enable_ip_forwarding` and `enable_accelerated_networking` properties have been deprecated and superseded by the `ip_forwarding_enabled` and `accelerated_networking_enabled` properties ([#26293](https://github.com/hashicorp/terraform-provider-azurerm/issues/26293)) -* `azurerm_synapse_workspace` - the `aad_admin` and `sql_aad_admin` blocks have been deprecated and superseded by the `azurerm_synapse_workspace_aad_admin` and `azurerm_synapse_workspace_sql_aad_admin` resources ([#26317](https://github.com/hashicorp/terraform-provider-azurerm/issues/26317)) - -## 3.107.0 (June 06, 2024) - -FEATURES: - -* **New Resource:** `azurerm_data_protection_backup_policy_postgresql_flexible_server` ([#26024](https://github.com/hashicorp/terraform-provider-azurerm/issues/26024)) - -ENHANCEMENTS: - -* dependencies: updating to `v0.20240604.1114748` of `github.com/hashicorp/go-azure-sdk` ([#26216](https://github.com/hashicorp/terraform-provider-azurerm/issues/26216)) -* `advisor`: update API version to `2023-01-01` ([#26205](https://github.com/hashicorp/terraform-provider-azurerm/issues/26205)) -* `keyvault`: handling the Resources API returning Key Vaults that have been deleted when populating the cache ([#26199](https://github.com/hashicorp/terraform-provider-azurerm/issues/26199)) -* `machinelearning`: update API version to `2024-04-01` ([#26168](https://github.com/hashicorp/terraform-provider-azurerm/issues/26168)) -* `network/privatelinkservices` - update to use `hashicorp/go-azure-sdk` ([#26212](https://github.com/hashicorp/terraform-provider-azurerm/issues/26212)) -* `network/serviceendpointpolicies` - update to use `hashicorp/go-azure-sdk` ([#26196](https://github.com/hashicorp/terraform-provider-azurerm/issues/26196)) -* `network/virtualnetworks` - update to use `hashicorp/go-azure-sdk` ([#26217](https://github.com/hashicorp/terraform-provider-azurerm/issues/26217)) -* `network/virtualwans`: update route resources to use `hashicorp/go-azure-sdk` ([#26189](https://github.com/hashicorp/terraform-provider-azurerm/issues/26189)) -* `azurerm_container_app_job` - support for the `key_vault_secret_id` and `identity` properties in the `secret` block ([#25969](https://github.com/hashicorp/terraform-provider-azurerm/issues/25969)) -* `azurerm_kubernetes_cluster` - support forthe `dns_zone_ids` popperty in the `web_app_routing` block ([#26117](https://github.com/hashicorp/terraform-provider-azurerm/issues/26117)) -* `azurerm_notification_hub_authorization_rule` - support for the `primary_connection_string` and `secondary_connection_string` properties ([#26188](https://github.com/hashicorp/terraform-provider-azurerm/issues/26188)) -* `azurerm_subnet` - support for the `default_outbound_access_enabled` property ([#25259](https://github.com/hashicorp/terraform-provider-azurerm/issues/25259)) - -BUG FIXES: - -* `azurerm_api_management_named_value` - will now enforce setting the `secret` property when setting the `value_from_key_vault` property ([#26150](https://github.com/hashicorp/terraform-provider-azurerm/issues/26150)) -* `azurerm_storage_sync_server_endpoint` - improve pooling to work around api inconsistencies ([#26204](https://github.com/hashicorp/terraform-provider-azurerm/issues/26204)) -* `azurerm_virtual_network` - split create and update function to fix lifecycle - ignore ([#26246](https://github.com/hashicorp/terraform-provider-azurerm/issues/26246)) -* `azurerm_vpn_server_configuration` - split create and update function to fix lifecycle - ignore ([#26175](https://github.com/hashicorp/terraform-provider-azurerm/issues/26175)) -* `azurerm_vpn_server_configuration_policy_group` - split create and update function to fix lifecycle - ignore ([#26207](https://github.com/hashicorp/terraform-provider-azurerm/issues/26207)) -* `azurerm_vpn_site` - split create and update function to fix lifecycle - ignore changes ([#26163](https://github.com/hashicorp/terraform-provider-azurerm/issues/26163)) - -DEPRECATIONS: - -* `azurerm_kubernetes_cluster` - the property `dns_zone_id` has been superseded by the property `dns_zone_ids` in the `web_app_routing` block ([#26117](https://github.com/hashicorp/terraform-provider-azurerm/issues/26117)) -* `azurerm_nginx_deployment` - the block `configuration` has been deprecated and superseded by the resource `azurerm_nginx_configuration` ([#25773](https://github.com/hashicorp/terraform-provider-azurerm/issues/25773)) - -## 3.106.1 (May 31, 2024) - -BUG FIXES: - -* Data Source: `azurerm_kubernetes_cluster` - fix a crash when reading/setting `upgrade_settings` ([#26173](https://github.com/hashicorp/terraform-provider-azurerm/issues/26173)) - -## 3.106.0 (May 31, 2024) - -UPGRADE NOTES: - -* This release updates the Key Vault cache to load Key Vaults using both the Key Vaults List API **and** the Resources API to workaround the API returning incomplete/stale data. To achieve this, and provide consistency between tooling, we are intentionally using the same older version of the Resources API as the current version of Azure CLI. ([#26070](https://github.com/hashicorp/terraform-provider-azurerm/issues/26070)) - -FEATURES: - -* **New Data Source:** `azurerm_arc_resource_bridge_appliance` ([#25731](https://github.com/hashicorp/terraform-provider-azurerm/issues/25731)) -* **New Data Source:** `azurerm_elastic_san_volume_group` ([#26111](https://github.com/hashicorp/terraform-provider-azurerm/issues/26111)) -* **New Data Source:** `azurerm_storage_queue` ([#26087](https://github.com/hashicorp/terraform-provider-azurerm/issues/26087)) -* **New Data Source:** `azurerm_storage_table` ([#26126](https://github.com/hashicorp/terraform-provider-azurerm/issues/26126)) -* **New Resource:** `azurerm_container_registry_cache_rule` ([#26034](https://github.com/hashicorp/terraform-provider-azurerm/issues/26034)) -* **New Resource:** `azurerm_virtual_machine_implicit_data_disk_from_source` ([#25537](https://github.com/hashicorp/terraform-provider-azurerm/issues/25537)) - -ENHANCEMENTS: - -* Data Source: azurerm_kubernetes_cluster - add support for the `drain_timeout_in_minutes` and `node_soak_duration_in_minutes` properties in the `upgrade_settings` block ([#26137](https://github.com/hashicorp/terraform-provider-azurerm/issues/26137)) -* dependencies: updating to `v0.20240529.1155048` of `github.com/hashicorp/go-azure-sdk` ([#26148](https://github.com/hashicorp/terraform-provider-azurerm/issues/26148)) -* `containerapps`: update API version to `2024-03-01` ([#25993](https://github.com/hashicorp/terraform-provider-azurerm/issues/25993)) -* `expressroute`: update to use `hashicorp/go-azure-sdk` ([#26066](https://github.com/hashicorp/terraform-provider-azurerm/issues/26066)) -* `keyvault`: populating the cache using both the Key Vault List and Resources API to workaround incomplete/stale data being returned ([#26070](https://github.com/hashicorp/terraform-provider-azurerm/issues/26070)) -* `servicenetworking`: updating to API Version `2023-11-01` ([#26148](https://github.com/hashicorp/terraform-provider-azurerm/issues/26148)) -* `virtualnetworkpeerings`: update to use `hashicorp/go-azure-sdk` ([#26065](https://github.com/hashicorp/terraform-provider-azurerm/issues/26065)) -* `azurerm_automation_powershell72_module` - support for the `tags` property ([#26106](https://github.com/hashicorp/terraform-provider-azurerm/issues/26106)) -* `azurerm_bastion_host` - support for `Developer` SKU ([#26068](https://github.com/hashicorp/terraform-provider-azurerm/issues/26068)) -* `azurerm_container_app_environment` - support for the `mutual_tls_enabled` property ([#25993](https://github.com/hashicorp/terraform-provider-azurerm/issues/25993)) -* `azurerm_container_registry` - validation to fail fast when setting `public_network_access_enabled` with an invalid SKU ([#26054](https://github.com/hashicorp/terraform-provider-azurerm/issues/26054)) -* `azurerm_key_vault_managed_hardware_security_module` - the `public_network_access_enabled` property can now be updated ([#26075](https://github.com/hashicorp/terraform-provider-azurerm/issues/26075)) -* `azurerm_kubernetes_cluster` - support for the `cost_analysis_enabled` property ([#26052](https://github.com/hashicorp/terraform-provider-azurerm/issues/26052)) -* `azurerm_kubernetes_cluster` - support for the `drain_timeout_in_minutes` and `node_soak_duration_in_minutes` properties in the `upgrade_settings` block ([#26137](https://github.com/hashicorp/terraform-provider-azurerm/issues/26137)) -* `azurerm_kubernetes_cluster_node_pool` - support for the `drain_timeout_in_minutes` and `node_soak_duration_in_minutes` properties in the `upgrade_settings` block ([#26137](https://github.com/hashicorp/terraform-provider-azurerm/issues/26137)) -* `azurerm_linux_virtual_machine` - the `hibernation_enabled` property can now be updated ([#26112](https://github.com/hashicorp/terraform-provider-azurerm/issues/26112)) -* `azurerm_logic_app_trigger_custom` - support for the property `callback_url` ([#25979](https://github.com/hashicorp/terraform-provider-azurerm/issues/25979)) -* `azurerm_machine_learning_workspace` - support for the `serverless_compute` block ([#25660](https://github.com/hashicorp/terraform-provider-azurerm/issues/25660)) -* `azurerm_mssql_elasticpool` - support the sku `HS_PRMS` ([#26161](https://github.com/hashicorp/terraform-provider-azurerm/issues/26161)) -* `azurerm_new_relic_monitor` - support for the `identity` block ([#26115](https://github.com/hashicorp/terraform-provider-azurerm/issues/26115)) -* `azurerm_route_map` - the `parameter` property is now Optional when the action type is `Drop` ([#26003](https://github.com/hashicorp/terraform-provider-azurerm/issues/26003)) -* `azurerm_windows_virtual_machine` - the `hibernation_enabled` property can now be updated ([#26112](https://github.com/hashicorp/terraform-provider-azurerm/issues/26112)) - -BUG FIXES: - -* Data Source: `azurerm_system_center_virtual_machine_manager_inventory_items` - normalise the resource ID for Intentory Items ([#25955](https://github.com/hashicorp/terraform-provider-azurerm/issues/25955)) -* `azurerm_app_configuration_feature` - update polling interval to tolerate eventual consistency of the API ([#26025](https://github.com/hashicorp/terraform-provider-azurerm/issues/26025)) -* `azurerm_app_configuration_key` - update polling interval to tolerate eventual consistency of the API ([#26025](https://github.com/hashicorp/terraform-provider-azurerm/issues/26025)) -* `azurerm_eventhub_namespace_customer_managed_key` - validating that the User Assigned Identity used for accessing the Key Vault is assigned to the EventHub Namespace ([#28509](https://github.com/hashicorp/terraform-provider-azurerm/issues/28509)) -* `azurerm_linux_function_app` - fix update handling of `health_check_eviction_time_in_min` and `WEBSITE_HEALTHCHECK_MAXPINGFAILURES` ([#26107](https://github.com/hashicorp/terraform-provider-azurerm/issues/26107)) -* `azurerm_linux_function_app_slot` - fix update handling of `health_check_eviction_time_in_min` and `WEBSITE_HEALTHCHECK_MAXPINGFAILURES` ([#26107](https://github.com/hashicorp/terraform-provider-azurerm/issues/26107)) -* `azurerm_linux_web_app` - fix update handling of `health_check_eviction_time_in_min` and `WEBSITE_HEALTHCHECK_MAXPINGFAILURES` ([#26107](https://github.com/hashicorp/terraform-provider-azurerm/issues/26107)) -* `azurerm_linux_web_app_slot` - fix update handling of `health_check_eviction_time_in_min` and `WEBSITE_HEALTHCHECK_MAXPINGFAILURES` ([#26107](https://github.com/hashicorp/terraform-provider-azurerm/issues/26107)) -* `azurerm_postgresql_flexible_server` - prevent premature check on updated `storage_mb` value that prevents the resource from being re-created ([#25986](https://github.com/hashicorp/terraform-provider-azurerm/issues/25986)) -* `azurerm_redis_access_cache_policy_assignment` - add locks to stabilize creation of multiple policy assignments ([#26085](https://github.com/hashicorp/terraform-provider-azurerm/issues/26085)) -* `azurerm_redis_access_cache_policy` - add locks to stabilize creation of multiple policy assignments ([#26085](https://github.com/hashicorp/terraform-provider-azurerm/issues/26085)) -* `azurerm_windows_function_app` - fix update handling of `health_check_eviction_time_in_min` and `WEBSITE_HEALTHCHECK_MAXPINGFAILURES` ([#26107](https://github.com/hashicorp/terraform-provider-azurerm/issues/26107)) -* `azurerm_windows_function_app_slot` - fix update handling of `health_check_eviction_time_in_min` and `WEBSITE_HEALTHCHECK_MAXPINGFAILURES` ([#26107](https://github.com/hashicorp/terraform-provider-azurerm/issues/26107)) -* `azurerm_windows_web_app` - fix update handling of `health_check_eviction_time_in_min` and `WEBSITE_HEALTHCHECK_MAXPINGFAILURES` ([#26107](https://github.com/hashicorp/terraform-provider-azurerm/issues/26107)) -* `azurerm_windows_web_app_slot` - fix update handling of `health_check_eviction_time_in_min` and `WEBSITE_HEALTHCHECK_MAXPINGFAILURES` ([#26107](https://github.com/hashicorp/terraform-provider-azurerm/issues/26107)) - -## 3.105.0 (May 24, 2024) - -BREAKING CHANGE: - -* `azurerm_kubernetes_cluster` - the properties `workload_autoscaler_profile.vertical_pod_autoscaler_update_mode` and `workload_autoscaler_profile.vertical_pod_autoscaler_controlled_values` are no longer populated since they're not exported in API version `2023-09-02-preview` ([#25663](https://github.com/hashicorp/terraform-provider-azurerm/issues/25663)) - -FEATURES: - -* New Resource: `azurerm_api_management_policy_fragment` ([#24968](https://github.com/hashicorp/terraform-provider-azurerm/issues/24968)) - -ENHANCEMENTS: - -* dependencies: updating to `v0.20240522.1080424` of `github.com/hashicorp/go-azure-sdk` ([#26069](https://github.com/hashicorp/terraform-provider-azurerm/issues/26069)) -* `containerservice`: updating to use API Version `2023-09-02-preview` ([#25663](https://github.com/hashicorp/terraform-provider-azurerm/issues/25663)) -* `azurerm_application_insights_standard_web_test` - `http_verb` can now be set to `HEAD` and `OPTIONS` ([#26077](https://github.com/hashicorp/terraform-provider-azurerm/issues/26077)) -* `azurerm_cdn_frontdoor_rule` - updating the validation for `match_values` within the `uri_path_condition` block to support a forward-slash ([#26017](https://github.com/hashicorp/terraform-provider-azurerm/issues/26017)) -* `azurerm_linux_web_app` - normalising the value for `virtual_network_subnet_id` ([#25885](https://github.com/hashicorp/terraform-provider-azurerm/issues/25885)) -* `azurerm_machine_learning_compute_cluster` - add validation for `name` ([#26060](https://github.com/hashicorp/terraform-provider-azurerm/issues/26060)) -* `azurerm_machine_learning_compute_cluster` - improve validation to allow an empty `subnet_resource_id` when the Workspace is using a managed Virtual Network ([#26073](https://github.com/hashicorp/terraform-provider-azurerm/issues/26073)) -* `azurerm_postgresql_flexible_server` - the field `public_network_access_enabled` is now configurable (previously this was computed-only/not settable via the API) ([#25812](https://github.com/hashicorp/terraform-provider-azurerm/issues/25812)) -* `azurerm_snapshot` - support for `disk_access_id` ([#25996](https://github.com/hashicorp/terraform-provider-azurerm/issues/25996)) -* `azurerm_windows_web_app` - normalising the value for `virtual_network_subnet_id` ([#25885](https://github.com/hashicorp/terraform-provider-azurerm/issues/25885)) - -BUG FIXES: - -* `azurerm_container_app_environment_custom_domain`: parsing the Log Analytics Workspace ID insensitively to workaround the API returning this inconsistently ([#26074](https://github.com/hashicorp/terraform-provider-azurerm/issues/26074)) -* `azurerm_container_app_job` - updating the validation for the `name` field ([#26049](https://github.com/hashicorp/terraform-provider-azurerm/issues/26049)) -* `azurerm_container_app_job` - updating the validation for the `name` field within the `custom_scale_rule` block ([#26049](https://github.com/hashicorp/terraform-provider-azurerm/issues/26049)) -* `azurerm_container_app_job` - updating the validation for the `name` field within the `rules` block ([#26049](https://github.com/hashicorp/terraform-provider-azurerm/issues/26049)) -* `azurerm_linux_function_app_slot` - fixed panic when planning from a version older than 3.88.0 ([#25838](https://github.com/hashicorp/terraform-provider-azurerm/issues/25838)) -* `azurerm_pim_active_role_assignment` - fix a persistent diff when `ticket` is not specified ([#26059](https://github.com/hashicorp/terraform-provider-azurerm/issues/26059)) -* `azurerm_pim_eligible_role_assignment` - fix a persistent diff when `ticket` is not specified ([#26059](https://github.com/hashicorp/terraform-provider-azurerm/issues/26059)) -* `azurerm_policy_definition` - recreate the resource if the `parameters` property is updated to include fewer items ([#26083](https://github.com/hashicorp/terraform-provider-azurerm/issues/26083)) -* `azurerm_windows_function_app_slot` - set Server Farm ID in payload when using a Virtual Network Subnet for the slot ([#25634](https://github.com/hashicorp/terraform-provider-azurerm/issues/25634)) -* `azurerm_windows_web_app_slot` - set Server Farm ID in payload when using a Virtual Network Subnet for the slot ([#25634](https://github.com/hashicorp/terraform-provider-azurerm/issues/25634)) - - -## 3.104.2 (May 20, 2024) - -NOTE: This is a re-release of `v3.104.1` to include missing changes, please refer to the changelog entries for `v3.104.1`. - -## 3.104.1 (May 20, 2024) - -BUG FIXES: - -* `azurerm_pim_active_role_assignment` - fix a regression where roles assignments could not be created with no expiration ([#26029](https://github.com/hashicorp/terraform-provider-azurerm/issues/26029)) -* `azurerm_pim_eligible_role_assignment` - fix a regression where roles assignments could not be created with no expiration ([#26029](https://github.com/hashicorp/terraform-provider-azurerm/issues/26029)) - -## 3.104.0 (May 16, 2024) - -FEATURES: - -* New Data Source: `azurerm_elastic_san` ([#25719](https://github.com/hashicorp/terraform-provider-azurerm/issues/25719)) - -ENHANCEMENTS: - -* New Resource - `azurerm_key_vault_managed_hardware_security_module_key` ([#25935](https://github.com/hashicorp/terraform-provider-azurerm/issues/25935)) -* Data Source - `azurerm_kubernetes_service_version` - support for the `default_version` property ([#25953](https://github.com/hashicorp/terraform-provider-azurerm/issues/25953)) -* `network/applicationgateways` - update to use `hashicorp/go-azure-sdk` ([#25844](https://github.com/hashicorp/terraform-provider-azurerm/issues/25844)) -* `dataprotection` - update API version to `2024-04-01` ([#25882](https://github.com/hashicorp/terraform-provider-azurerm/issues/25882)) -* `databasemigration` - update API version to `2021-06-30` ([#25997](https://github.com/hashicorp/terraform-provider-azurerm/issues/25997)) -* `network/ips` - update to use `hashicorp/go-azure-sdk` ([#25905](https://github.com/hashicorp/terraform-provider-azurerm/issues/25905)) -* `network/localnetworkgateway` - update to use `hashicorp/go-azure-sdk` ([#25905](https://github.com/hashicorp/terraform-provider-azurerm/issues/25905)) -* `network/natgateway` - update to use `hashicorp/go-azure-sdk` ([#25905](https://github.com/hashicorp/terraform-provider-azurerm/issues/25905)) -* `network/networksecuritygroup` - update to use `hashicorp/go-azure-sdk` ([#25971](https://github.com/hashicorp/terraform-provider-azurerm/issues/25971)) -* `network/publicips` - update to use `hashicorp/go-azure-sdk` ([#25971](https://github.com/hashicorp/terraform-provider-azurerm/issues/25971)) -* `network/virtualwan` - update to use `hashicorp/go-azure-sdk` ([#25971](https://github.com/hashicorp/terraform-provider-azurerm/issues/25971)) -* `network/vpn` - update to use `hashicorp/go-azure-sdk` ([#25971](https://github.com/hashicorp/terraform-provider-azurerm/issues/25971)) -* `azurerm_databricks_workspace` - support for the `default_storage_firewall_enabled` property ([#25919](https://github.com/hashicorp/terraform-provider-azurerm/issues/25919)) -* `azurerm_key_vault` - allow previously existing key vaults to continue to manage the `contact` field prior to the `v3.93.0` conditional polling change ([#25777](https://github.com/hashicorp/terraform-provider-azurerm/issues/25777)) -* `azurerm_linux_function_app` - support for the PowerShell `7.4` ([#25980](https://github.com/hashicorp/terraform-provider-azurerm/issues/25980)) -* `azurerm_log_analytics_cluster` - support for the value `UserAssigned` in the `identity.type` property ([#25940](https://github.com/hashicorp/terraform-provider-azurerm/issues/25940)) -* `azurerm_pim_active_role_assignment` - remove hard dependency on the `roleAssignmentScheduleRequests` API, so that role assignments will not become unmanageable over time ([#25956](https://github.com/hashicorp/terraform-provider-azurerm/issues/25956)) -* `azurerm_pim_eligible_role_assignment` - remove hard dependency on the `roleEligibilityScheduleRequests` API, so that role assignments will not become unmanageable over time ([#25956](https://github.com/hashicorp/terraform-provider-azurerm/issues/25956)) -* `azurerm_windows_function_app` - support for the PowerShell `7.4` ([#25980](https://github.com/hashicorp/terraform-provider-azurerm/issues/25980)) - -BUG FIXES: - -* `azurerm_container_app_job` - Allow `event_trigger_config.scale.min_executions` to be `0` ([#25931](https://github.com/hashicorp/terraform-provider-azurerm/issues/25931)) -* `azurerm_container_app_job` - update validation to allow the `replica_retry_limit` property to be set to `0` ([#25984](https://github.com/hashicorp/terraform-provider-azurerm/issues/25984)) -* `azurerm_data_factory_trigger_custom_event` - one of `subject_begins_with` and `subject_ends_with` no longer need to be set ([#25932](https://github.com/hashicorp/terraform-provider-azurerm/issues/25932)) -* `azurerm_kubernetes_cluster_node_pool` - prevent race condition by checking the virtual network status when creating a node pool with a subnet ID ([#25888](https://github.com/hashicorp/terraform-provider-azurerm/issues/25888)) -* `azurerm_postgresql_flexible_server` - fix for default `storage_tier` value when `storage_mb` field has been changed ([#25947](https://github.com/hashicorp/terraform-provider-azurerm/issues/25947)) -* `azurerm_pim_active_role_assignment` - resolve a number of potential crashes ([#25956](https://github.com/hashicorp/terraform-provider-azurerm/issues/25956)) -* `azurerm_pim_eligible_role_assignment` - resolve a number of potential crashes ([#25956](https://github.com/hashicorp/terraform-provider-azurerm/issues/25956)) -* `azurerm_redis_enterprise_cluster_location_zone_support` - add `Central India` zones support ([#26000](https://github.com/hashicorp/terraform-provider-azurerm/issues/26000)) -* `azurerm_sentinel_alert_rule_scheduled` - the `alert_rule_template_version` property is no longer `ForceNew` ([#25688](https://github.com/hashicorp/terraform-provider-azurerm/issues/25688)) -* `azurerm_storage_sync_server_endpoint` - preventing a crashed due to `initial_upload_policy` ([#25968](https://github.com/hashicorp/terraform-provider-azurerm/issues/25968)) - -## 3.103.1 (May 10, 2024) - -BUG FIXES - -* `loadtest` - fixing an issue where the SDK Clients weren't registered ([#25920](https://github.com/hashicorp/terraform-provider-azurerm/issues/25920)) - -## 3.103.0 (May 09, 2024) +## 4.3.0 (September 19, 2024) FEATURES: -* New Resource: `azurerm_container_app_job` ([#23871](https://github.com/hashicorp/terraform-provider-azurerm/issues/23871)) -* New Resource: `azurerm_container_app_environment_custom_domain` ([#24346](https://github.com/hashicorp/terraform-provider-azurerm/issues/24346)) -* New Resource: `azurerm_data_factory_credential_service_principal` ([#25805](https://github.com/hashicorp/terraform-provider-azurerm/issues/25805)) -* New Resource: `azurerm_network_manager_connectivity_configuration` ([#25746](https://github.com/hashicorp/terraform-provider-azurerm/issues/25746)) -* New Resource: `azurerm_maintenance_assignment_dynamic_scope` ([#25467](https://github.com/hashicorp/terraform-provider-azurerm/issues/25467)) -* New Resource: `azurerm_virtual_machine_gallery_application_assignment` ([#22945](https://github.com/hashicorp/terraform-provider-azurerm/issues/22945)) -* New Resource: `azurerm_virtual_machine_automanage_configuration_assignment` ([#25480](https://github.com/hashicorp/terraform-provider-azurerm/issues/25480)) +* **New Resource**: `azurerm_advisor_suppression` ([#26177](https://github.com/hashicorp/terraform-provider-azurerm/issues/26177)) +* **New Resource**: `azurerm_data_protection_backup_policy_mysql_flexible_server` ([#26955](https://github.com/hashicorp/terraform-provider-azurerm/issues/26955)) +* **New Resource**: `azurerm_key_vault_managed_hardware_security_module_key_rotation_policy` ([#27306](https://github.com/hashicorp/terraform-provider-azurerm/issues/27306)) +* **New Resource**: `azurerm_stack_hci_deployment_setting` ([#25646](https://github.com/hashicorp/terraform-provider-azurerm/issues/25646)) +* **New Resource**: `azurerm_stack_hci_storage_path` ([#26509](https://github.com/hashicorp/terraform-provider-azurerm/issues/26509)) +* **New Data Source**: `azurerm_vpn_server_configuration` ([#27054](https://github.com/hashicorp/terraform-provider-azurerm/issues/27054)) -ENHANCEMENTS: +ENHANCEMENTS: -* provider - support for the `recover_soft_deleted_backup_protected_vm` feature ([#24157](https://github.com/hashicorp/terraform-provider-azurerm/issues/24157)) -* dependencies: updating `github.com/hashicorp/go-azure-helpers` to `v0.69.0` ([#25903](https://github.com/hashicorp/terraform-provider-azurerm/issues/25903)) -* `loganalytics` - update cluster resource to api version `2022-01-01` ([#25686](https://github.com/hashicorp/terraform-provider-azurerm/issues/25686)) -* `azurerm_bastion_host` - support for the `kerberos_enabled` property ([#25823](https://github.com/hashicorp/terraform-provider-azurerm/issues/25823)) -* `azurerm_container_app` - secrets can now be removed ([#25743](https://github.com/hashicorp/terraform-provider-azurerm/issues/25743)) -* `azurerm_container_app_environment` - support for the `custom_domain_verification_id` property ([#24346](https://github.com/hashicorp/terraform-provider-azurerm/issues/24346)) -* `azurerm_linux_virtual_machine` - support for the additional capability `hibernation_enabled` ([#25807](https://github.com/hashicorp/terraform-provider-azurerm/issues/25807)) -* `azurerm_linux_virtual_machine` - support for additional values for the `license_type` property ([#25909](https://github.com/hashicorp/terraform-provider-azurerm/issues/25909)) -* `azurerm_linux_virtual_machine_scale_set` - support for the `maximum_surge_instances` property for vmss rolling upgrades ([#24914](https://github.com/hashicorp/terraform-provider-azurerm/issues/24914)) -* `azurerm_windows_virtual_machine` - support for the additional capability `hibernation_enabled` ([#25807](https://github.com/hashicorp/terraform-provider-azurerm/issues/25807)) -* `azurerm_windows_virtual_machine_scale_set` - support for the `maximum_surge_instances_enabled` property for vmss rolling upgrades ([#24914](https://github.com/hashicorp/terraform-provider-azurerm/issues/24914)) -* `azurerm_storage_account` - support for the `permanent_delete_enabled` property within retention policies ([#25778](https://github.com/hashicorp/terraform-provider-azurerm/issues/25778)) +* `managementgroups` - migrate to `hashicorp/go-azure-sdk` ([#26430](https://github.com/hashicorp/terraform-provider-azurerm/issues/26430)) +* `nginx` - upgrade api version to `2024-06-01-preview` ([#27345](https://github.com/hashicorp/terraform-provider-azurerm/issues/27345)) +* `azurerm_linux[windows]_web[function]_app[app_slot]` - upgrade api version from `2023-01-01` to `2023-12-01` ([#27196](https://github.com/hashicorp/terraform-provider-azurerm/issues/27196)) +* `azurerm_cosmosdb_account` - support for the capability `EnableNoSQLVectorSearch` ([#27357](https://github.com/hashicorp/terraform-provider-azurerm/issues/27357))azurerm_container_app_custom_domain - fix parsing the certificate ID error #25972 +* `azurerm_container_app_custom_domain` - support other certificate types ([#25972](https://github.com/hashicorp/terraform-provider-azurerm/issues/25972)) +* `azurerm_linux_virtual_machine_scale_set` - the `zones` property can now be updated without creating a new resource ([#27288](https://github.com/hashicorp/terraform-provider-azurerm/issues/27288)) +* `azurerm_orchestrated_virtual_machine_scale_set` - the `zones` property can now be updated without creating a new resource ([#27288](https://github.com/hashicorp/terraform-provider-azurerm/issues/27288)) +* `azurerm_role_management_policy` - support for resource scope ([#27205](https://github.com/hashicorp/terraform-provider-azurerm/issues/27205)) +* `azurerm_spring_cloud_gateway` - changing the `environment_variables` and `sensitive_environment_variables` properties no longer creates a new resource ([#27404](https://github.com/hashicorp/terraform-provider-azurerm/issues/27404)) +* `azurerm_static_web_app` - support for the `public_network_access_enabled` property ([#26345](https://github.com/hashicorp/terraform-provider-azurerm/issues/26345)) +* `azurerm_shared_image` - support for the `disk_controller_type_nvme_enabled` property ([#26370](https://github.com/hashicorp/terraform-provider-azurerm/issues/26370)) +* `azurerm_storage_blob` - changing the `source` property no longer creates a new resource ([#27394](https://github.com/hashicorp/terraform-provider-azurerm/issues/27394)) +* `azurerm_storage_object_replication` - changing the `rules.x. source_container_name` and `rules.x. destination_container_name` properties no longer creates a new resource ([#27394](https://github.com/hashicorp/terraform-provider-azurerm/issues/27394)) +* `azurerm_windows_virtual_machine_scale_set` - the `zones` property can now be updated without creating a new resource ([#27288](https://github.com/hashicorp/terraform-provider-azurerm/issues/27288)) BUG FIXES: -* `azurerm_kubernetes_cluster` - erase `load_balancer_profile` when changing `network_profile.outbound_type` from `loadBalancer` to another outbound type ([#25530](https://github.com/hashicorp/terraform-provider-azurerm/issues/25530)) -* `azurerm_log_analytics_saved_search` - the `function_parameters` property now repsects the order of elements ([#25869](https://github.com/hashicorp/terraform-provider-azurerm/issues/25869)) -* `azurerm_linux_web_app` - fix `slow_request` with `path` issue in `auto_heal` by adding support for `slow_request_with_path` block ([#20049](https://github.com/hashicorp/terraform-provider-azurerm/issues/20049)) -* `azurerm_linux_web_app_slot` - fix `slow_request` with `path` issue in `auto_heal` by adding support for `slow_request_with_path` block ([#20049](https://github.com/hashicorp/terraform-provider-azurerm/issues/20049)) -* `azurerm_monitor_private_link_scoped_service` - normalize case of the `linked_resource_id` property during reads ([#25787](https://github.com/hashicorp/terraform-provider-azurerm/issues/25787)) -* `azurerm_role_assignment` - add addtional retry logic to assist with cross-tenant use ([#25853](https://github.com/hashicorp/terraform-provider-azurerm/issues/25853)) -* `azurerm_web_pubsub_network_acl` - fixing a crash when `networkACL.PublicNetwork.Deny` was nil ([#25886](https://github.com/hashicorp/terraform-provider-azurerm/issues/25886)) -* `azurerm_windows_web_app` - fix `slow_request` with `path` issue in `auto_heal` by adding support for `slow_request_with_path` block ([#20049](https://github.com/hashicorp/terraform-provider-azurerm/issues/20049)) -* `azurerm_windows_web_app_slot` - fix `slow_request` with `path` issue in `auto_heal` by adding support for `slow_request_with_path` block ([#20049](https://github.com/hashicorp/terraform-provider-azurerm/issues/20049)) +* `azurerm_application_insights` - fix crash when read for `DataVolumeCap` is `nil` ([#27352](https://github.com/hashicorp/terraform-provider-azurerm/issues/27352)) +* `azurerm_container_app` - relax validation on the ingress traffic property ([#27396](https://github.com/hashicorp/terraform-provider-azurerm/issues/27396)) +* `azurerm_log_analytics_workspace_table` - will now correctly set `total_retention_in_days` when `sku` is `Basic` ([#27420](https://github.com/hashicorp/terraform-provider-azurerm/issues/27420)) -DEPRECATIONS: -* `azurerm_subnet` - the `private_endpoint_network_policies_enabled` property has been deprecated in favour of the `private_endpoint_network_policies` property ([#25779](https://github.com/hashicorp/terraform-provider-azurerm/issues/25779)) - -## 3.102.0 (May 02, 2024) +## 4.2.0 (September 12, 2024) FEATURES: -* New Resource: `azurerm_storage_sync_server_endpoint` ([#25831](https://github.com/hashicorp/terraform-provider-azurerm/issues/25831)) -* New Resource: `azurerm_storage_container_immutability_policy` ([#25804](https://github.com/hashicorp/terraform-provider-azurerm/issues/25804)) - -ENHANCEMENTS: - -* `azurerm_load_test` - add support for `encryption` ([#25759](https://github.com/hashicorp/terraform-provider-azurerm/issues/25759)) -* `azurerm_network_connection_monitor` - update validation for `target_resource_type` and `target_resource_id` ([#25745](https://github.com/hashicorp/terraform-provider-azurerm/issues/25745)) -* `azurerm_mssql_managed_database` - support for a Restorable Database ID to be used as the `source_database_id` for point in time restore ([#25568](https://github.com/hashicorp/terraform-provider-azurerm/issues/25568)) -* `azurerm_storage_account` - support for the `managed_hsm_key_id` property ([#25088](https://github.com/hashicorp/terraform-provider-azurerm/issues/25088)) -* `azurerm_storage_account_customer_managed_key` - support for the `managed_hsm_key_id` property ([#25088](https://github.com/hashicorp/terraform-provider-azurerm/issues/25088)) - -BUG FIXES: - -* `azurerm_linux_function_app` - now sets docker registry url in `linux_fx_version` by default ([#23911](https://github.com/hashicorp/terraform-provider-azurerm/issues/23911)) -* `azurerm_resource_group` - work around sporadic eventual consistency errors ([#25758](https://github.com/hashicorp/terraform-provider-azurerm/issues/25758)) - -DEPRECATIONS: - -* `azurerm_key_vault_managed_hardware_security_module_role_assignment` - the `vault_base_url` property has been deprecated in favour of the `managed_hsm_id` property ([#25601](https://github.com/hashicorp/terraform-provider-azurerm/issues/25601)) - -## 3.101.0 (April 25, 2024) +* **New Resource**: `azurerm_arc_machine` ([#26647](https://github.com/hashicorp/terraform-provider-azurerm/issues/26647)) +* **New Resource**: `azurerm_arc_machine_automanage_configuration_assignment` ([#26657](https://github.com/hashicorp/terraform-provider-azurerm/issues/26657)) ENHANCEMENTS: -* dependencies: updating to `v0.20240424.1114424` of `github.com/hashicorp/go-azure-sdk` ([#25749](https://github.com/hashicorp/terraform-provider-azurerm/issues/25749)) -* dependencies: updating to `v0.27.0` of `github.com/tombuildsstuff/giovanni` ([#25702](https://github.com/hashicorp/terraform-provider-azurerm/issues/25702)) -* dependencies: updating `golang.org/x/net` to `0.23.0` -* `azurerm_cognitive_account` - the `kind` property now supports `ConversationalLanguageUnderstanding` ([#25735](https://github.com/hashicorp/terraform-provider-azurerm/issues/25735)) -* `azurerm_container_app_custom_domain` - support the ability to use Azure Managed Certificates ([#25356](https://github.com/hashicorp/terraform-provider-azurerm/issues/25356)) +* `network/bastionhosts` - upgrade api version from `2023-11-01` to `2024-01-01` ([#27277](https://github.com/hashicorp/terraform-provider-azurerm/issues/27277)) +* `recoveryservices` - upgrade `recoveryservicessiterecovery` from `2022-10-0`1 to `2024-04-01` ([#27281](https://github.com/hashicorp/terraform-provider-azurerm/issues/27281)) +* `azurerm_data_protection_backup_vault` - support for the `property cross_region_restore_enabled` property ([#27197](https://github.com/hashicorp/terraform-provider-azurerm/issues/27197)) +* `azurem_mssql_managed_instance` - support for the `service_principal_type` property ([#27240](https://github.com/hashicorp/terraform-provider-azurerm/issues/27240)) BUG FIXES: -* Data Source: `azurerm_application_insights` - set correct AppID in data source ([#25687](https://github.com/hashicorp/terraform-provider-azurerm/issues/25687)) -* `azurerm_virtual_network` - suppress diff in ordering for `address_space` due to inconsistent API response ([#23793](https://github.com/hashicorp/terraform-provider-azurerm/issues/23793)) -* `azurerm_storage_data_lake_gen2_filesystem` - add context deadline for import ([#25712](https://github.com/hashicorp/terraform-provider-azurerm/issues/25712)) -* `azurerm_virtual_network_gateway` - preserve existing `nat_rules` on updates ([#25690](https://github.com/hashicorp/terraform-provider-azurerm/issues/25690)) +* `azurerm_cosmosdb_account` - fix crash during state migration ([#27302](https://github.com/hashicorp/terraform-provider-azurerm/issues/27302)) +* `azurerm_servicebus_queue` - fix defaults of the `default_message_ttl` and `auto_delete_on_idle` properties ([#27305](https://github.com/hashicorp/terraform-provider-azurerm/issues/27305)) -## 3.100.0 (April 18, 2024) +## 4.1.0 (September 05, 2024) ENHANCEMENTS: -* dependencies: updating `hashicorp/go-azure-sdk` to `v0.20240417.1084633` ([#25659](https://github.com/hashicorp/terraform-provider-azurerm/issues/25659)) -* `compute` - update Virtual Machine and Virtual Machine Scale Set resources and data sources to use `hashicorp/go-azure-sdk` ([#25533](https://github.com/hashicorp/terraform-provider-azurerm/issues/25533)) -* `machine_learning` - Add new `machine_learning` block that supports `purge_soft_deleted_workspace_on_destroy` ([#25624](https://github.com/hashicorp/terraform-provider-azurerm/issues/25624)) -* `loganalytics` - update cluster resource to use `hashicorp/go-azure-sdk` ([#23373](https://github.com/hashicorp/terraform-provider-azurerm/issues/23373)) -* Data Source: `azurerm_management_group` - now exports the `tenant_scoped_id` attribute ([#25555](https://github.com/hashicorp/terraform-provider-azurerm/issues/25555)) -* `azurerm_container_app` - the `ingress.ip_security_restriction.ip_address_range` property will now accept an IP address as valid input ([#25609](https://github.com/hashicorp/terraform-provider-azurerm/issues/25609)) -* `azurerm_container_group` - the `identity` block can now be updated ([#25543](https://github.com/hashicorp/terraform-provider-azurerm/issues/25543)) -* `azurerm_express_route_connection` - support for the `private_link_fast_path_enabled` property ([#25596](https://github.com/hashicorp/terraform-provider-azurerm/issues/25596)) -* `azurerm_hdinsight_hadoop_cluster` - support for the `private_link_configuration` block ([#25629](https://github.com/hashicorp/terraform-provider-azurerm/issues/25629)) -* `azurerm_hdinsight_hbase_cluster` - support for the `private_link_configuration` block ([#25629](https://github.com/hashicorp/terraform-provider-azurerm/issues/25629)) -* `azurerm_hdinsight_interactive_query_cluster` - support for the `private_link_configuration` block ([#25629](https://github.com/hashicorp/terraform-provider-azurerm/issues/25629)) -* `azurerm_hdinsight_kafka_cluster` - support for the `private_link_configuration` block ([#25629](https://github.com/hashicorp/terraform-provider-azurerm/issues/25629)) -* `azurerm_hdinsight_spark_cluster` - support for the `private_link_configuration` block ([#25629](https://github.com/hashicorp/terraform-provider-azurerm/issues/25629)) -* `azurerm_management_group` - now exports the `tenant_scoped_id` attribute ([#25555](https://github.com/hashicorp/terraform-provider-azurerm/issues/25555)) -* `azurerm_monitor_activity_log_alert` - support for the `location` property ([#25389](https://github.com/hashicorp/terraform-provider-azurerm/issues/25389)) -* `azurerm_mysql_flexible_server` - update validating regex for `sku_name` ([#25642](https://github.com/hashicorp/terraform-provider-azurerm/issues/25642)) -* `azurerm_postgresql_flexible_server` - support for the `GeoRestore` `create_mode` ([#25664](https://github.com/hashicorp/terraform-provider-azurerm/issues/25664)) -* `azurerm_virtual_network_gateway_connection` - support for the `private_link_fast_path_enabled` property ([#25650](https://github.com/hashicorp/terraform-provider-azurerm/issues/25650)) -* `azurerm_windows_web_app` - support for the `handler_mapping` block ([#25631](https://github.com/hashicorp/terraform-provider-azurerm/issues/25631)) -* `azurerm_windows_web_app_slot` - support for the `handler_mapping` block ([#25631](https://github.com/hashicorp/terraform-provider-azurerm/issues/25631)) +* dependencies - bump `hashicorp/go-azure-sdk` to `v0.20240903.1111904` ([#27268](https://github.com/hashicorp/terraform-provider-azurerm/issues/27268)) +* Virtual Machine Scale Sets - upgrade api version from `2024-03-01` to `2024-07-01` ([#27230](https://github.com/hashicorp/terraform-provider-azurerm/issues/27230)) +* `hdinsights` - update the HDInsights Node definition validation of VM sizes to include new V5 types ([#27270](https://github.com/hashicorp/terraform-provider-azurerm/issues/27270)) +* `azurerm_api_management_logger` - support for the `application_insights.connection_string` property ([#27137](https://github.com/hashicorp/terraform-provider-azurerm/issues/27137)) +* `azurerm_bot_service_azure_bot` - will now send the value for the `developer_app_insights_api_key` property ([#27280](https://github.com/hashicorp/terraform-provider-azurerm/issues/27280)) +* `azurerm_netapp_volume` - support for the `smb3_protocol_encryption_enabled` property ([#27228](https://github.com/hashicorp/terraform-provider-azurerm/issues/27228)) +* `azurerm_subnet` - support `Microsoft.DevOpsInfrastructure` as delegation service ([#27259](https://github.com/hashicorp/terraform-provider-azurerm/issues/27259)) BUG FIXES: -* storage: prevent a bug causing the second storage account key to be used for authentication instead of the first ([#25652](https://github.com/hashicorp/terraform-provider-azurerm/issues/25652)) -* `azurerm_active_directory_domain_service` - prevent an issue where `filtered_sync_enabled` was not being updated ([#25594](https://github.com/hashicorp/terraform-provider-azurerm/issues/25594)) -* `azurerm_application_insights` - add a state migration to fix the resource ID casing of Application Insights resources ([#25628](https://github.com/hashicorp/terraform-provider-azurerm/issues/25628)) -* `azurerm_function_app_hybrid_connection` - can now use relay resources created in a different resource group ([#25541](https://github.com/hashicorp/terraform-provider-azurerm/issues/25541)) -* `azurerm_kubernetes_cluster_node_pool` - prevent plan diff when the `windows_profile.outbound_nat_enabled` property is unset ([#25644](https://github.com/hashicorp/terraform-provider-azurerm/issues/25644)) -* `azurerm_machine_learning_compute_cluster` - fix location to point to parent resource for computes ([#25643](https://github.com/hashicorp/terraform-provider-azurerm/issues/25643)) -* `azurerm_machine_learning_compute_instance` - fix location to point to parent resource for computes ([#25643](https://github.com/hashicorp/terraform-provider-azurerm/issues/25643)) -* `azurerm_storage_account` - check replication type when evaluating support level for shares and queues for V1 storage accounts ([#25581](https://github.com/hashicorp/terraform-provider-azurerm/issues/25581)) -* `azurerm_storage_account` - added a sanity check for `dns_endpoint_type` and `blob_properties.restore_policy` ([#25450](https://github.com/hashicorp/terraform-provider-azurerm/issues/25450)) -* `azurerm_web_app_hybrid_connection` - can now use relay resources created in a different resource group ([#25541](https://github.com/hashicorp/terraform-provider-azurerm/issues/25541)) -* `azurerm_windows_web_app` - prevent removal of `site_config.application_stack.node_version` when `app_settings` are updated ([#25488](https://github.com/hashicorp/terraform-provider-azurerm/issues/25488)) -* `azurerm_windows_web_app_slot` - prevent removal of `site_config.application_stack.node_version` when `app_settings` are updated ([#25489](https://github.com/hashicorp/terraform-provider-azurerm/issues/25489)) - -DEPRECATIONS: - -* `logz` - the Logz resources are deprecated and will be removed in v4.0 of the AzureRM Provider since the API no longer allows new instances to be created ([#25405](https://github.com/hashicorp/terraform-provider-azurerm/issues/25405)) -* `azurerm_machine_learning_compute_instance` - marked the `location` field as deprecated in v4.0 of the provider ([#25643](https://github.com/hashicorp/terraform-provider-azurerm/issues/25643)) -* `azurerm_kubernetes_cluster` - the following properties have been deprecated since the API no longer supports cluster creation with legacy Azure Entra integration: `client_app_id`, `server_app_id`, `server_app_secret` and `managed` ([#25200](https://github.com/hashicorp/terraform-provider-azurerm/issues/25200)) - -## 3.99.0 (April 11, 2024) - -BREAKING CHANGE: - -* `azurerm_linux_web_app` - `site_config.0.application_stack.0.java_version` must be specified with `java_server` and `java_server_version` ([#25553](https://github.com/hashicorp/terraform-provider-azurerm/issues/25553)) - -ENHANCEMENTS: - -* dependencies: updating to `v0.20240411.1104331` of `github.com/hashicorp/go-azure-sdk/resourcemanager` and `github.com/hashicorp/go-azure-sdk/sdk` ([#25546](https://github.com/hashicorp/terraform-provider-azurerm/issues/25546)) -* dependencies: updating to `v0.26.1` of `github.com/tombuildsstuff/giovanni` ([#25551](https://github.com/hashicorp/terraform-provider-azurerm/issues/25551)) -* `azurerm_key_vault` - deprecate the `contact` property from v3.x provider and update properties to Computed & Optional ([#25552](https://github.com/hashicorp/terraform-provider-azurerm/issues/25552)) -* `azurerm_key_vault_certificate_contacts` - in v4.0 make the `contact` property optional to allow for deletion of contacts from the key vault ([#25552](https://github.com/hashicorp/terraform-provider-azurerm/issues/25552)) -* `azurerm_signalr_service` - support for setting the `sku` property to `Premium_P2` ([#25578](https://github.com/hashicorp/terraform-provider-azurerm/issues/25578)) -* `azurerm_snapshot` - support for the `network_access_policy` and `public_network_access_enabled` properties ([#25421](https://github.com/hashicorp/terraform-provider-azurerm/issues/25421)) -* `azurerm_storage_account` - extend the support level of `(blob|queue|share)_properties` for Storage kind ([#25427](https://github.com/hashicorp/terraform-provider-azurerm/issues/25427)) -* `azurerm_storage_blob` - support for the `encryption_scope` property ([#25551](https://github.com/hashicorp/terraform-provider-azurerm/issues/25551)) -* `azurerm_storage_container` - support for the `default_encryption_scope` and `encryption_scope_override_enabled` properties ([#25551](https://github.com/hashicorp/terraform-provider-azurerm/issues/25551)) -* `azurerm_storage_data_lake_gen2_filesystem` - support for the `default_encryption_scope` property ([#25551](https://github.com/hashicorp/terraform-provider-azurerm/issues/25551)) -* `azurerm_subnet` - the `delegation.x.service_delegation.x.name` property now supports `Oracle.Database/networkAttachments` ([#25571](https://github.com/hashicorp/terraform-provider-azurerm/issues/25571)) -* `azurerm_web_pubsub` - support setting the `sku` property to `Premium_P2` ([#25578](https://github.com/hashicorp/terraform-provider-azurerm/issues/25578)) - -BUG FIXES: - -* provider: fix an issue where the provider was not correctly configured when using a custom metadata host ([#25546](https://github.com/hashicorp/terraform-provider-azurerm/issues/25546)) -* storage: fix a number of potential crashes during plan/apply with resources using the Storage data plane API ([#25525](https://github.com/hashicorp/terraform-provider-azurerm/issues/25525)) -* `azurerm_application_insights` - fix issue where the wrong Application ID was set into the property `app_id` ([#25520](https://github.com/hashicorp/terraform-provider-azurerm/issues/25520)) -* `azurerm_application_insights_api_key` - add a state migration to re-case static segments of the resource ID ([#25567](https://github.com/hashicorp/terraform-provider-azurerm/issues/25567)) -* `azurerm_container_app_environment_certificate` - the `subject_name` attribute is now correctly populated ([#25516](https://github.com/hashicorp/terraform-provider-azurerm/issues/25516)) -* `azurerm_function_app_slot` - will now taint the resource when partially created ([#24520](https://github.com/hashicorp/terraform-provider-azurerm/issues/24520)) -* `azurerm_linux_function_app` - will now taint the resource when partially created ([#24520](https://github.com/hashicorp/terraform-provider-azurerm/issues/24520)) -* `azurerm_managed_disk` - filtering the Resource SKUs response to reduce the memory overhead, when determining whether a Managed Disk can be online resized or not ([#25549](https://github.com/hashicorp/terraform-provider-azurerm/issues/25549)) -* `azurerm_monitor_alert_prometheus_rule_group` - the `severity` property is now set correctly when `0` ([#25408](https://github.com/hashicorp/terraform-provider-azurerm/issues/25408)) -* `azurerm_monitor_smart_detector_alert_rule` - normalising the value for `id` within the `action_group` block ([#25559](https://github.com/hashicorp/terraform-provider-azurerm/issues/25559)) -* `azurerm_redis_cache_access_policy_assignment` - the `object_id_alias` property now allows usernames ([#25523](https://github.com/hashicorp/terraform-provider-azurerm/issues/25523)) -* `azurerm_windows_function_app` - will not taint the resource when partially created ([#24520](https://github.com/hashicorp/terraform-provider-azurerm/issues/24520)) -* `azurerm_windows_function_app` - will not taint the resource when partially created ([#24520](https://github.com/hashicorp/terraform-provider-azurerm/issues/24520)) - -DEPRECATIONS: - -* `azurerm_cosmosdb_account` - the `connection_strings` property has been superseded by the primary and secondary connection strings for sql, mongodb and readonly ([#25510](https://github.com/hashicorp/terraform-provider-azurerm/issues/25510)) -* `azurerm_cosmosdb_account` - the `enable_free_tier` property has been superseded by `free_tier_enabled` ([#25510](https://github.com/hashicorp/terraform-provider-azurerm/issues/25510)) -* `azurerm_cosmosdb_account` - the `enable_multiple_write_locations` property has been superseded by `multiple_write_locations_enabled` ([#25510](https://github.com/hashicorp/terraform-provider-azurerm/issues/25510)) -* `azurerm_cosmosdb_account` - the `enable_automatic_failover` property has been superseded by `automatic_failover_enabled` ([#25510](https://github.com/hashicorp/terraform-provider-azurerm/issues/25510)) - -## 3.98.0 (April 04, 2024) - -FEATURES: - -* New Resource: `azurerm_static_web_app_function_app_registration` ([#25331](https://github.com/hashicorp/terraform-provider-azurerm/issues/25331)) -* New Resource: `azurerm_system_center_virtual_machine_manager_inventory_items` ([#25110](https://github.com/hashicorp/terraform-provider-azurerm/issues/25110)) -* New Resource: `azurerm_workloads_sap_discovery_virtual_instance` ([#24342](https://github.com/hashicorp/terraform-provider-azurerm/issues/24342)) -* New Resource: `azurerm_redis_cache_policy` ([#25477](https://github.com/hashicorp/terraform-provider-azurerm/issues/25477)) -* New Resource: `azurerm_redis_cache_policy_assignment` ([#25477](https://github.com/hashicorp/terraform-provider-azurerm/issues/25477)) - -ENHANCEMENTS: - -* dependencies: updating to `v0.20240402.1085733` of `github.com/hashicorp/go-azure-sdk` ([#25482](https://github.com/hashicorp/terraform-provider-azurerm/issues/25482)) -* dependencies: updating to `v0.67.0` of `github.com/hashicorp/go-azure-helpers` ([#25446](https://github.com/hashicorp/terraform-provider-azurerm/issues/25446)) -* dependencies: updating to `v0.25.4` of `github.com/tombuildsstuff/giovanni` ([#25404](https://github.com/hashicorp/terraform-provider-azurerm/issues/25404)) -* `alertsmanagement` - updating remaining resources to use `hashicorp/go-azure-sdk` ([#25486](https://github.com/hashicorp/terraform-provider-azurerm/issues/25486)) -* `applicationinsights` - updating remaining resources to use `hashicorp/go-azure-sdk` ([#25376](https://github.com/hashicorp/terraform-provider-azurerm/issues/25376)) -* `compute` - update to API version `2024-03-01` ([#25436](https://github.com/hashicorp/terraform-provider-azurerm/issues/25436)) -* `compute` - update shared image resources and data sources to use `hashicorp/go-azure-sdk` ([#25503](https://github.com/hashicorp/terraform-provider-azurerm/issues/25503)) -* `containerinstance` - update to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#25416](https://github.com/hashicorp/terraform-provider-azurerm/issues/25416)) -* `maintenance` - updating to API Version `2023-04-01` ([#25388](https://github.com/hashicorp/terraform-provider-azurerm/issues/25388)) -* `recovery_services` - Add `recovery_service` block to the provider that supports `vm_backup_stop_protection_and_retain_data_on_destroy` and `purge_protected_items_from_vault_on_destroy`([#25515](https://github.com/hashicorp/terraform-provider-azurerm/issues/25515)) -* `storage` - the Storage Account cache is now populated using `hashicorp/go-azure-sdk` ([#25437](https://github.com/hashicorp/terraform-provider-azurerm/issues/25437)) -* `azurerm_bot_service_azure_bot` - support for the `cmk_key_vault_key_url` property ([#23640](https://github.com/hashicorp/terraform-provider-azurerm/issues/23640)) -* `azurerm_capacity_reservation` - update validation for `capacity` ([#25471](https://github.com/hashicorp/terraform-provider-azurerm/issues/25471)) -* `azurerm_container_app` - add support for `key_vault_id` and `identity` properties in the `secret` block ([#24773](https://github.com/hashicorp/terraform-provider-azurerm/issues/24773)) -* `azurerm_databricks_workspace` - expose `managed_services_cmk_key_vault_id` and `managed_disk_cmk_key_vault_id and key_vault_id` to support cross subscription CMK's. ([#25091](https://github.com/hashicorp/terraform-provider-azurerm/issues/25091)) -* `azurerm_databricks_workspace_root_dbfs_customer_managed_key` - expose `key_vault_id` to support cross subscription CMK's. ([#25091](https://github.com/hashicorp/terraform-provider-azurerm/issues/25091)) -* `azurerm_managed_hsm_role_*_ids` - use specific resource id to replace generic nested item id ([#25323](https://github.com/hashicorp/terraform-provider-azurerm/issues/25323)) -* `azurerm_mssql_database` - add support for `secondary_type` ([#25360](https://github.com/hashicorp/terraform-provider-azurerm/issues/25360)) -* `azurerm_monitor_scheduled_query_rules_alert_v2` - support for the `identity` block ([#25365](https://github.com/hashicorp/terraform-provider-azurerm/issues/25365)) -* `azurerm_mssql_server_extended_auditing_policy` - support for `audit_actions_and_groups` and `predicate_expression` ([#25425](https://github.com/hashicorp/terraform-provider-azurerm/issues/25425)) -* `azurerm_netapp_account` - can now be imported ([#25384](https://github.com/hashicorp/terraform-provider-azurerm/issues/25384)) -* `azurerm_netapp_volume` - support for the `kerberos_enabled`, `smb_continuous_availability_enabled`, `kerberos_5_read_only_enabled`, `kerberos_5_read_write_enabled`, `kerberos_5i_read_only_enabled`, `kerberos_5i_read_write_enabled`, `kerberos_5p_read_only_enabled`, and `kerberos_5p_read_write_enabled` properties ([#25385](https://github.com/hashicorp/terraform-provider-azurerm/issues/25385)) -* `azurerm_recovery_services_vault` - upgrading to version `2024-01-01` ([#25325](https://github.com/hashicorp/terraform-provider-azurerm/issues/25325)) -* `azurerm_stack_hci_cluster` - the `client_id` property is now optional ([#25407](https://github.com/hashicorp/terraform-provider-azurerm/issues/25407)) -* `azurerm_storage_encryption_scope` - refactoring to use `hashicorp/go-azure-sdk` rather than `Azure/azure-sdk-for-go` ([#25437](https://github.com/hashicorp/terraform-provider-azurerm/issues/25437)) -* `azurerm_mssql_elasticpool` - the `maintenance_configuration_name` property now supports values `SQL_SouthAfricaNorth_DB_1`, `SQL_SouthAfricaNorth_DB_2`, `SQL_WestUS3_DB_1` and `SQL_WestUS3_DB_2` ([#25500](https://github.com/hashicorp/terraform-provider-azurerm/issues/25500)) -* `azurerm_lighthouse_assignment` - updating API Version from `2019-06-01` to `2022-10-01` ([#25473](https://github.com/hashicorp/terraform-provider-azurerm/issues/25473)) - -BUG FIXES: - -* `network` - updating the `GatewaySubnet` validation to show the Subnet Name when the validation fails ([#25484](https://github.com/hashicorp/terraform-provider-azurerm/issues/25484)) -* `azurerm_function_app_hybrid_connection` - fix an issue during creation when `send_key_name` is specified ([#25379](https://github.com/hashicorp/terraform-provider-azurerm/issues/25379)) -* `azurerm_linux_web_app_slot` - fix a crash when upgrading the provider to v3.88.0 or later ([#25406](https://github.com/hashicorp/terraform-provider-azurerm/issues/25406)) -* `azurerm_mssql_database` - update the behavior of the `enclave_type` field. ([#25508](https://github.com/hashicorp/terraform-provider-azurerm/issues/25508)) -* `azurerm_mssql_elasticpool` - update the behavior of the `enclave_type` field. ([#25508](https://github.com/hashicorp/terraform-provider-azurerm/issues/25508)) -* `azurerm_network_manager_deployment` - add locking ([#25368](https://github.com/hashicorp/terraform-provider-azurerm/issues/25368)) -* `azurerm_resource_group_template_deployment` - changes to `parameters_content` and `template_content` now force `output_content` to be updated in the plan ([#25403](https://github.com/hashicorp/terraform-provider-azurerm/issues/25403)) -* `azurerm_storage_blob` - fix a potential crash when the endpoint is unreachable ([#25404](https://github.com/hashicorp/terraform-provider-azurerm/issues/25404)) -* `azurerm_storage_container` - fix a potential crash when the endpoint is unreachable ([#25404](https://github.com/hashicorp/terraform-provider-azurerm/issues/25404)) -* `azurerm_storage_data_lake_gen2_filesystem` - fix a potential crash when the endpoint is unreachable ([#25404](https://github.com/hashicorp/terraform-provider-azurerm/issues/25404)) -* `azurerm_storage_data_lake_gen2_filesystem_path` - fix a potential crash when the endpoint is unreachable ([#25404](https://github.com/hashicorp/terraform-provider-azurerm/issues/25404)) -* `azurerm_storage_queue` - fix a potential crash when the endpoint is unreachable ([#25404](https://github.com/hashicorp/terraform-provider-azurerm/issues/25404)) -* `azurerm_storage_share` - fix a potential crash when the endpoint is unreachable ([#25404](https://github.com/hashicorp/terraform-provider-azurerm/issues/25404)) -* `azurerm_storage_share_directory` - fix a potential crash when the endpoint is unreachable ([#25404](https://github.com/hashicorp/terraform-provider-azurerm/issues/25404)) -* `azurerm_storage_share_directory` - resolve an issue where directories might fail to destroy ([#25404](https://github.com/hashicorp/terraform-provider-azurerm/issues/25404)) -* `azurerm_storage_share_file` - fix a potential crash when the endpoint is unreachable ([#25404](https://github.com/hashicorp/terraform-provider-azurerm/issues/25404)) -* `azurerm_storage_share_file` - fix several bugs with path handling when creating files in subdirectories ([#25404](https://github.com/hashicorp/terraform-provider-azurerm/issues/25404)) -* `azurerm_web_app_hybrid_connection` - fix an issue during creation when `send_key_name` is specified ([#25379](https://github.com/hashicorp/terraform-provider-azurerm/issues/25379)) -* `azurerm_windows_web_app` - prevent a panic during resource upgrade ([#25509](https://github.com/hashicorp/terraform-provider-azurerm/issues/25509)) - -## 3.97.1 (March 22, 2024) - -ENHANCEMENTS: - -* `azurerm_nginx_deployment` - support for the `configuration` block ([#24276](https://github.com/hashicorp/terraform-provider-azurerm/issues/24276)) - -BUG FIXES: - -* `azurerm_data_factory_integration_runtime_self_hosted` - ensure that autorizationh keys are exported ([#25246](https://github.com/hashicorp/terraform-provider-azurerm/issues/25246)) -* `azurerm_storage_account` - defaulting the value for `dns_endpoint_type` to `Standard` when it's not returned from the Azure API ([#25367](https://github.com/hashicorp/terraform-provider-azurerm/issues/25367)) - - -## 3.97.0 (March 21, 2024) - -BREAKING CHANGES: - -* `azurerm_linux_function_app` - `app_settings["WEBSITE_RUN_FROM_PACKAGE"]` must be added to `ignore_changes` for deployments where an external tool modifies the `WEBSITE_RUN_FROM_PACKAGE` property in the `app_settings` block. ([#24848](https://github.com/hashicorp/terraform-provider-azurerm/issues/24848)) -* `azurerm_linux_function_app_slot` - `app_settings["WEBSITE_RUN_FROM_PACKAGE"]` must be added to `ignore_changes` for deployments where an external tool modifies the `WEBSITE_RUN_FROM_PACKAGE` property in the `app_settings` block. ([#24848](https://github.com/hashicorp/terraform-provider-azurerm/issues/24848)) - -FEATURES: - -* New Resource: `azurerm_elastic_san_volume` ([#24802](https://github.com/hashicorp/terraform-provider-azurerm/issues/24802)) - -ENHANCEMENTS: - -* dependencies: updating to `v0.25.3` of `github.com/tombuildsstuff/giovanni` ([#25362](https://github.com/hashicorp/terraform-provider-azurerm/issues/25362)) -* dependencies: updating to `v0.20240321.1145953` of `github.com/hashicorp/go-azure-sdk` ([#25332](https://github.com/hashicorp/terraform-provider-azurerm/issues/25332)) -* dependencies: updating to `v0.25.2` of `github.com/tombuildsstuff/giovanni` ([#25305](https://github.com/hashicorp/terraform-provider-azurerm/issues/25305)) -* `azurestackhci`: updating to API Version `2024-01-01` ([#25279](https://github.com/hashicorp/terraform-provider-azurerm/issues/25279)) -* `monitor/scheduledqueryrules`: updating to API version `2023-03-15-preview` ([#25350](https://github.com/hashicorp/terraform-provider-azurerm/issues/25350)) -* `cosmosdb`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#25166](https://github.com/hashicorp/terraform-provider-azurerm/issues/25166)) -* Data Source `azurerm_stack_hci_cluster`: refactoring the association to use `hashicorp/go-azure-sdk` ([#25293](https://github.com/hashicorp/terraform-provider-azurerm/issues/25293)) -* `azurerm_app_configuration` - support for Environments other than Azure Public ([#25271](https://github.com/hashicorp/terraform-provider-azurerm/issues/25271)) -* `azurerm_automanage_configuration` - refactoring to use `hashicorp/go-azure-sdk` ([#25293](https://github.com/hashicorp/terraform-provider-azurerm/issues/25293)) -* `azurerm_container_app_environment` - add support for `Consumption` workload profile ([#25285](https://github.com/hashicorp/terraform-provider-azurerm/issues/25285)) -* `azurerm_cosmosdb_postgresql_cluster` - expose list of server names and FQDN in the `servers` block ([#25240](https://github.com/hashicorp/terraform-provider-azurerm/issues/25240)) -* `azurerm_data_share` - hyphens are now allowed in the resource's name ([#25242](https://github.com/hashicorp/terraform-provider-azurerm/issues/25242)) -* `azurerm_data_factory_integration_runtime_azure_ssis` - support for the `copy_compute_scale` and `pipeline_external_compute_scale` blocks ([#25281](https://github.com/hashicorp/terraform-provider-azurerm/issues/25281)) -* `azurerm_healthcare_service` - support for the `identity` and `configuration_export_storage_account_name` properties ([#25193](https://github.com/hashicorp/terraform-provider-azurerm/issues/25193)) -* `azurerm_nginx_deployment` - support the `auto_scale_profile` block ([#24950](https://github.com/hashicorp/terraform-provider-azurerm/issues/24950)) -* `azurerm_netapp_account_resource` - support for the `kerberos_ad_name`, `kerberos_kdc_ip property`, `enable_aes_encryption`, `local_nfs_users_with_ldap_allowed`, `server_root_ca_certificate`, `ldap_over_tls_enabled`, and `ldap_signing_enabled` properties ([#25340](https://github.com/hashicorp/terraform-provider-azurerm/issues/25340)) -* `azurerm_netapp_account_resource` - support for [Support for Azure Netapp Files - AD Site Name #12462] via the `site_name` property ([#25340](https://github.com/hashicorp/terraform-provider-azurerm/issues/25340)) -* `azurerm_stack_hci_cluster`: refactoring the association to use `hashicorp/go-azure-sdk` ([#25293](https://github.com/hashicorp/terraform-provider-azurerm/issues/25293)) -* `azurerm_storage_account` - support for the `dns_endpoint_type` property ([#22583](https://github.com/hashicorp/terraform-provider-azurerm/issues/22583)) -* `azurerm_storage_blob_inventory_policy` - refactoring to use `hashicorp/go-azure-sdk` ([#25268](https://github.com/hashicorp/terraform-provider-azurerm/issues/25268)) -* `azurerm_synapse_spark_pool` - added support for `3.4` ([#25319](https://github.com/hashicorp/terraform-provider-azurerm/issues/25319)) - -BUG FIXES: - -* Data Source: `azurerm_storage_blob` - fix a bug that incorrectly parsed the endpoint in the resource ID ([#25283](https://github.com/hashicorp/terraform-provider-azurerm/issues/25283)) -* Data Source: `azurerm_storage_table_entity` - fixing a regression when parsing the table endpoint ([#25307](https://github.com/hashicorp/terraform-provider-azurerm/issues/25307)) -* `netapp_account_resource` - correct the `smb_server_name` property validation ([#25340](https://github.com/hashicorp/terraform-provider-azurerm/issues/25340)) -* `azurerm_backup_policy_file_share` - prevent a bug when the `include_last_days` property does not work when `days` is empty ([#25280](https://github.com/hashicorp/terraform-provider-azurerm/issues/25280)) -* `azurerm_backup_policy_vm` - prevent a bug when the `include_last_days` property does not work when `days` is empty ([#25280](https://github.com/hashicorp/terraform-provider-azurerm/issues/25280)) -* `azurerm_container_app_custom_domain` - prevent an issue where the secret was not being passed through (#25196) ([#25251](https://github.com/hashicorp/terraform-provider-azurerm/issues/25251)) -* `azurerm_data_protection_backup_instance_kubernetes_cluster` - prevent the protection errosr `ScenarioPluginInvalidWorkflowDataRequest` and `UserErrorKubernetesBackupExtensionUnhealthy` [azurerm_data_protection_backup_instance_kubernetes_cluster is created with message "Fix protection error for the backup instance" and code ScenarioPluginInvalidWorkflowDataRequest #25294] ([#25345](https://github.com/hashicorp/terraform-provider-azurerm/issues/25345)) -* `azurerm_purview_account` - will now allow for PurView accounts with missing or disabled eventhubs without keys ([#25301](https://github.com/hashicorp/terraform-provider-azurerm/issues/25301)) -* `azurerm_storage_account` - fix a crash when the storage account becomes unavailable whilst reading ([#25332](https://github.com/hashicorp/terraform-provider-azurerm/issues/25332)) -* `azurerm_storage_blob` - fixing a regression where blobs within a nested directory wouldn't be parsed correctly ([#25305](https://github.com/hashicorp/terraform-provider-azurerm/issues/25305)) -* `azurerm_storage_data_lake_gen2_path` - fixing a bug where there was no timeout available during import ([#25282](https://github.com/hashicorp/terraform-provider-azurerm/issues/25282)) -* `azurerm_storage_queue` - fixing a bug where the Table URI was obtained rather than the Queue URI ([#25262](https://github.com/hashicorp/terraform-provider-azurerm/issues/25262)) -* `azurerm_subscription` - fixing an issue when creating a subscription alias ([#25181](https://github.com/hashicorp/terraform-provider-azurerm/issues/25181)) - - -## 3.96.0 (March 14, 2024) - -ENHANCEMENTS: - -* dependencies: updating to `v0.20240314.1083835` of `github.com/hashicorp/go-azure-sdk` ([#25255](https://github.com/hashicorp/terraform-provider-azurerm/issues/25255)) -* dependencies: updating to `v0.25.1` of `github.com/tombuildsstuff/giovanni` ([#24798](https://github.com/hashicorp/terraform-provider-azurerm/issues/24798)) -* dependencies: updating to `v1.33.0` of `google.golang.org/protobuf` ([#25243](https://github.com/hashicorp/terraform-provider-azurerm/issues/25243)) -* `storage`: updating the data plane resources to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24798](https://github.com/hashicorp/terraform-provider-azurerm/issues/24798)) -* Data Source: `azurerm_storage_table_entities` - support for AAD authentication ([#24798](https://github.com/hashicorp/terraform-provider-azurerm/issues/24798)) -* Data Source: `azurerm_storage_table_entity` - support for AAD authentication ([#24798](https://github.com/hashicorp/terraform-provider-azurerm/issues/24798)) -* `azurerm_kusto_cluster` - support `None` pattern for the `virtual_network_configuration` block ([#24733](https://github.com/hashicorp/terraform-provider-azurerm/issues/24733)) -* `azurerm_linux_function_app` - support for the Node `20` runtime ([#24073](https://github.com/hashicorp/terraform-provider-azurerm/issues/24073)) -* `azurerm_linux_function_app_slot` - support for the Node `20` runtime ([#24073](https://github.com/hashicorp/terraform-provider-azurerm/issues/24073)) -* `azurerm_stack_hci_cluster` - support the `identity`, `cloud_id`, `service_endpoint` and `resource_provider_object_id` properties ([#25031](https://github.com/hashicorp/terraform-provider-azurerm/issues/25031)) -* `azurerm_storage_share_file` - support for AAD authentication ([#24798](https://github.com/hashicorp/terraform-provider-azurerm/issues/24798)) -* `azurerm_storage_share_directory` - support for AAD authentication, deprecate `share_name` and `storage_account_name` in favor of `storage_share_id` ([#24798](https://github.com/hashicorp/terraform-provider-azurerm/issues/24798)) -* `azurerm_storage_table_entity` - support for AAD authentication, deprecate `share_name` and `storage_account_name` in favor of `storage_table_id` ([#24798](https://github.com/hashicorp/terraform-provider-azurerm/issues/24798)) -* `azurerm_storage_table_entity` - support for AAD authentication ([#24798](https://github.com/hashicorp/terraform-provider-azurerm/issues/24798)) -* `azurerm_windows_function_app` - support for the Node `20` runtime ([#24073](https://github.com/hashicorp/terraform-provider-azurerm/issues/24073)) -* `azurerm_windows_function_app_slot` - support for the Node `20` runtime ([#24073](https://github.com/hashicorp/terraform-provider-azurerm/issues/24073)) -* `azurerm_windows_web_app` - support for the Node `20` runtime ([#24073](https://github.com/hashicorp/terraform-provider-azurerm/issues/24073)) -* `azurerm_windows_web_app_slot` - support for the Node `20` runtime ([#24073](https://github.com/hashicorp/terraform-provider-azurerm/issues/24073)) - -BUG FIXES: - -* `azurerm_container_app_custom_domain` - fix resource ID parsing bug preventing import ([#25192](https://github.com/hashicorp/terraform-provider-azurerm/issues/25192)) -* `azurerm_windows_web_app` - fix incorrect warning message when checking name availability ([#25214](https://github.com/hashicorp/terraform-provider-azurerm/issues/25214)) -* `azurerm_virtual_machine_run_command` - prevent a bug during updates ([#25186](https://github.com/hashicorp/terraform-provider-azurerm/issues/25186)) -* Data Source: `azurerm_storage_table_entities` - Fix `items.x.properties` truncating to one entry ([#25211](https://github.com/hashicorp/terraform-provider-azurerm/issues/25211)) - -## 3.95.0 (March 08, 2024) - -FEATURES: - -* New Resource: `azurerm_container_app_custom_domain` ([#24421](https://github.com/hashicorp/terraform-provider-azurerm/issues/24421)) -* New Resource: `azurerm_data_protection_backup_instance_kubernetes_cluster` ([#24940](https://github.com/hashicorp/terraform-provider-azurerm/issues/24940)) -* New Resource: `azurerm_static_web_app` ([#25117](https://github.com/hashicorp/terraform-provider-azurerm/issues/25117)) -* New resource: `azurerm_static_web_app_custom_domain` ([#25117](https://github.com/hashicorp/terraform-provider-azurerm/issues/25117)) -* New resource: `azurerm_system_center_virtual_machine_manager_availability_set` ([#24975](https://github.com/hashicorp/terraform-provider-azurerm/issues/24975)) -* New Resource: `azurerm_workloads_sap_three_tier_virtual_instance` ([#24384](https://github.com/hashicorp/terraform-provider-azurerm/issues/24384)) -* New Resource: `azurerm_workloads_sap_single_node_virtual_instance` ([#24331](https://github.com/hashicorp/terraform-provider-azurerm/issues/24331)) - -ENHANCEMENTS: - -* `dependencies`: updating to v0.20240229.1102109 of `github.com/hashicorp/go-azure-sdk` ([#25102](https://github.com/hashicorp/terraform-provider-azurerm/issues/25102)) -* `monitor`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` [GH-#25102] -* `network`: updating to API Version `2023-09-01` ([#25095](https://github.com/hashicorp/terraform-provider-azurerm/issues/25095)) -* `azurerm_data_factory_integration_runtime_managed` - support for the `credential_name` property ([#25033](https://github.com/hashicorp/terraform-provider-azurerm/issues/25033)) -* `azurerm_linux_function_app` - support for the `description` property in the `ip_restriction` block ([#24527](https://github.com/hashicorp/terraform-provider-azurerm/issues/24527)) -* `azurerm_linux_function_app` - support for the `ip_restriction_default_action` and `scm_ip_restriction_default_action` properties ([#25131](https://github.com/hashicorp/terraform-provider-azurerm/issues/25131)) -* `azurerm_linux_function_app_slot` - support for the `description` property in the `ip_restriction` block ([#24527](https://github.com/hashicorp/terraform-provider-azurerm/issues/24527)) -* `azurerm_linux_function_app_slot` - support for the `ip_restriction_default_action` and `scm_ip_restriction_default_action` properties ([#25131](https://github.com/hashicorp/terraform-provider-azurerm/issues/25131)) -* `azurerm_linux_web_app` - support for the `description` property in the `ip_restriction` block ([#24527](https://github.com/hashicorp/terraform-provider-azurerm/issues/24527)) -* `azurerm_linux_web_app` - support for the `ip_restriction_default_action` and `scm_ip_restriction_default_action` properties ([#25131](https://github.com/hashicorp/terraform-provider-azurerm/issues/25131)) -* `azurerm_linux_web_app_slot` - support for the `description` property in the `ip_restriction` block ([#24527](https://github.com/hashicorp/terraform-provider-azurerm/issues/24527)) -* `azurerm_linux_web_app_slot` - support for the `ip_restriction_default_action` and `scm_ip_restriction_default_action` properties ([#25131](https://github.com/hashicorp/terraform-provider-azurerm/issues/25131)) -* `azurerm_mysql_flexible_server` - setting the `storage.size_gb` property to a smaller value now forces a new resource to be created ([#25074](https://github.com/hashicorp/terraform-provider-azurerm/issues/25074)) -* `azurerm_orbital_contact_profile` - changing the `channels` property no longer creates a new resource ([#25129](https://github.com/hashicorp/terraform-provider-azurerm/issues/25129)) -* `azurerm_private_dns_resolver_inbound_endpoint` - the `private_ip_address` property is no longer required when `private_ip_allocation_method` is `Dynamic` ([#25035](https://github.com/hashicorp/terraform-provider-azurerm/issues/25035)) -* `stream_analytics_output_blob` - support for the `blob_write_mode` property ([#25127](https://github.com/hashicorp/terraform-provider-azurerm/issues/25127)) -* `azurerm_windows_function_app` - support for the `description` property in the `ip_restriction` block ([#24527](https://github.com/hashicorp/terraform-provider-azurerm/issues/24527)) -* `azurerm_windows_function_app` - support for the `ip_restriction_default_action` and `scm_ip_restriction_default_action` properties ([#25131](https://github.com/hashicorp/terraform-provider-azurerm/issues/25131)) -* `azurerm_windows_function_app_slot` - support for the `description` property in the `ip_restriction` block ([#24527](https://github.com/hashicorp/terraform-provider-azurerm/issues/24527)) -* `azurerm_windows_function_app_slot` - support for the `ip_restriction_default_action` and `scm_ip_restriction_default_action` properties ([#25131](https://github.com/hashicorp/terraform-provider-azurerm/issues/25131)) -* `azurerm_windows_web_app` - support for the `description` property in the `ip_restriction` block ([#24527](https://github.com/hashicorp/terraform-provider-azurerm/issues/24527)) -* `azurerm_windows_web_app` - support for the `ip_restriction_default_action` and `scm_ip_restriction_default_action` properties ([#25131](https://github.com/hashicorp/terraform-provider-azurerm/issues/25131)) -* `azurerm_windows_web_app_slot` - support for the `description` property in the `ip_restriction` block ([#24527](https://github.com/hashicorp/terraform-provider-azurerm/issues/24527)) -* `azurerm_windows_web_app_slot` - support for the `ip_restriction_default_action` and `scm_ip_restriction_default_action` properties ([#25131](https://github.com/hashicorp/terraform-provider-azurerm/issues/25131)) - -BUG FIXES: - -* Data Source: `azurerm_function_app_host_keys` - correctly set `event_grid_extension_key` by searching for the renamed property in the API response ([#25108](https://github.com/hashicorp/terraform-provider-azurerm/issues/25108)) -* `azurerm_app_service_public_certificate` - fix issue where certificate information was not being set correctly in the read ([#24943](https://github.com/hashicorp/terraform-provider-azurerm/issues/24943)) -* `azurerm_container_registry` - prevent recreation of the resource when the `georeplication.tags` are updated ([#24994](https://github.com/hashicorp/terraform-provider-azurerm/issues/24994)) -* `azurerm_firewall_policy_rule_collection_group` - fix issue where the client subscription ID was used to construct the `firewall_policy_id` ([#25145](https://github.com/hashicorp/terraform-provider-azurerm/issues/25145)) -* `azurerm_function_app_hybrid_connection` - fix issue where `SendKeyValue` was not populated in the API payload ([#23761](https://github.com/hashicorp/terraform-provider-azurerm/issues/23761)) -* `azurerm_orbital_contact_profile` - fix creation of the resource when `event_hub_uri` is not specified ([#25128](https://github.com/hashicorp/terraform-provider-azurerm/issues/25128)) -* `azurerm_recovery_services_vault` - prevent a panic when `immutability` is updated ([#25132](https://github.com/hashicorp/terraform-provider-azurerm/issues/25132)) -* `azurerm_storage_account` - fix issue where the queue encryption key type was set as the table encryption key type ([#25046](https://github.com/hashicorp/terraform-provider-azurerm/issues/25046)) -* `azurerm_web_app_hybrid_connection` - fix issue where `SendKeyValue` was not populated in the API payload ([#23761](https://github.com/hashicorp/terraform-provider-azurerm/issues/23761)) -* `azurerm_mssql_database` - fix incorrect error due to typo when using `restore_long_term_retention_backup_id` ([#25180](https://github.com/hashicorp/terraform-provider-azurerm/issues/25180)) - -DEPRECATIONS: - -* Deprecated Resource: `azurerm_static_site` ([#25117](https://github.com/hashicorp/terraform-provider-azurerm/issues/25117)) -* Deprecated Resource: `azurerm_static_site_custom_domain` ([#25117](https://github.com/hashicorp/terraform-provider-azurerm/issues/25117)) -* `azurerm_kubernetes_fleet_manager` - the `hub_profile` property has been deprecated ([#25010](https://github.com/hashicorp/terraform-provider-azurerm/issues/25010)) - -## 3.94.0 (February 29, 2024) - -FEATURES: - -* **New Resource**: `azurerm_kubernetes_fleet_update_run` ([#24813](https://github.com/hashicorp/terraform-provider-azurerm/issues/24813)) - -ENHANCEMENTS: +* `azurerm_mysql_flexible_server` - correctly set `source_server_id` in the state file ([#27295](https://github.com/hashicorp/terraform-provider-azurerm/issues/27295)) +* `azurerm_cosmosdb_account` - the `ip_range_filter` property now supports IPV4 addresses ([#27208](https://github.com/hashicorp/terraform-provider-azurerm/issues/27208)) +* `azurerm_cosmosdb_account` - added state migration for `ip_range_filter` underlying type change from `string` to `set` ([#27276](https://github.com/hashicorp/terraform-provider-azurerm/issues/27276)) +* `azurerm_linux_virtual_machine` - the `admin_ssh_key.public_key` property now supports ed25519 ssh keys ([#27202](https://github.com/hashicorp/terraform-provider-azurerm/issues/27202)) +* `azurerm_sentinel_automation_rule` - no longer panics when using `condition_json` ([#27269](https://github.com/hashicorp/terraform-provider-azurerm/issues/27269)) +* `azurerm_kubernetes_cluster` - the `host_encryption_enabled` and `node_public_ip_enabled` properties are now set correctly ([#27218](https://github.com/hashicorp/terraform-provider-azurerm/issues/27218)) -* dependencies: updating to `v0.20240228.1142829` of `github.com/hashicorp/go-azure-sdk` ([#25081](https://github.com/hashicorp/terraform-provider-azurerm/issues/25081)) -* `servicefabric`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#25002](https://github.com/hashicorp/terraform-provider-azurerm/issues/25002)) -* `springcloud`: updating to API Version `2024-01-01-preview` ([#24937](https://github.com/hashicorp/terraform-provider-azurerm/issues/24937)) -* `securitycenter`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#25081](https://github.com/hashicorp/terraform-provider-azurerm/issues/25081)) -* Data Source: `azurerm_storage_table_entities` - support for `select` ([#24987](https://github.com/hashicorp/terraform-provider-azurerm/issues/24987)) -* Data Source: `azurerm_netapp_volume` - support for the `smb_access_based_enumeration` and `smb_non_browsable` properties ([#24514](https://github.com/hashicorp/terraform-provider-azurerm/issues/24514)) -* `azurerm_cosmosdb_account` - add support for the `minimal_tls_version` property ([#24966](https://github.com/hashicorp/terraform-provider-azurerm/issues/24966)) -* `azurerm_federated_identity_credential` - the federated credentials can now be changed without creating a new resource ([#25003](https://github.com/hashicorp/terraform-provider-azurerm/issues/25003)) -* `azurerm_kubernetes_cluster` - support for the `current_kubernetes_version` property ([#25079](https://github.com/hashicorp/terraform-provider-azurerm/issues/25079)) -* `azurerm_kubernetes_cluster` - private DNS is now allowed for the `web_app_routing` property ([#25038](https://github.com/hashicorp/terraform-provider-azurerm/issues/25038)) -* `azurerm_kubernetes_cluster` - migration between different `outbound_type`s is now allowed ([#25021](https://github.com/hashicorp/terraform-provider-azurerm/issues/25021)) -* `azurerm_mssql_database` - support for the `recovery_point_id` and `restore_long_term_retention_backup_id` properties ([#24904](https://github.com/hashicorp/terraform-provider-azurerm/issues/24904)) -* `azurerm_linux_virtual_machine` - support for the `automatic_upgrade_enabled`, `disk_controller_type`, `os_image_notification`, `treat_failure_as_deployment_failure_enabled`, and `vm_agent_platform_updates_enabled`properties ([#23394](https://github.com/hashicorp/terraform-provider-azurerm/issues/23394)) -* `azurerm_nginx_deployment` - support for the `automatic_upgrade_channel` property ([#24867](https://github.com/hashicorp/terraform-provider-azurerm/issues/24867)) -* `azurerm_netapp_volume` - support for the `smb_access_based_enumeration` and `smb_non_browsable` properties ([#24514](https://github.com/hashicorp/terraform-provider-azurerm/issues/24514)) -* `azurerm_netapp_pool` - support for the `encryption_type` property ([#24993](https://github.com/hashicorp/terraform-provider-azurerm/issues/24993)) -* `azurerm_role_definition` - upgrade to the API version `2022-05-01-preview` ([#25008](https://github.com/hashicorp/terraform-provider-azurerm/issues/25008)) -* `azurerm_redis_cache` - allow AAD auth for all SKUs ([#25006](https://github.com/hashicorp/terraform-provider-azurerm/issues/25006)) -* `azurerm_sql_managed_instance` - support for the `zone_redundant_enabled` property ([#25089](https://github.com/hashicorp/terraform-provider-azurerm/issues/25089)) -* `azurerm_spring_cloud_gateway` - support for the `application_performance_monitoring_ids` property ([#24919](https://github.com/hashicorp/terraform-provider-azurerm/issues/24919)) -* `azurerm_spring_cloud_configuration_service` - support for the `refresh_interval_in_seconds` property ([#25009](https://github.com/hashicorp/terraform-provider-azurerm/issues/25009)) -* `azurerm_synapse_workspace` - support for using the `user_assigned_identity_id` property within the `customer_managed_key` block ([#25027](https://github.com/hashicorp/terraform-provider-azurerm/issues/25027)) -* `azurerm_windows_virtual_machine` - support for the `automatic_upgrade_enabled`, `disk_controller_type`, `os_image_notification`, `treat_failure_as_deployment_failure_enabled`, and `vm_agent_platform_updates_enabled`properties ([#23394](https://github.com/hashicorp/terraform-provider-azurerm/issues/23394)) +## 4.0.1 (August 23, 2024) BUG FIXES: -* `azurerm_api_management_notification_recipient_email` - fixing an issue where response pages weren't iterated over correctly ([#25055](https://github.com/hashicorp/terraform-provider-azurerm/issues/25055)) -* `azurerm_api_management_notification_recipient_user` - fixing an issue where response pages weren't iterated over correctly ([#25055](https://github.com/hashicorp/terraform-provider-azurerm/issues/25055)) -* `azurerm_batch_pool` - fix setting the `extension.settings_json` property ([#24976](https://github.com/hashicorp/terraform-provider-azurerm/issues/24976)) -* `azurerm_key_vault_key` - `expiration_date` can be updated if newer date is ahead ([#25000](https://github.com/hashicorp/terraform-provider-azurerm/issues/25000)) -* `azurerm_pim_active_role_assignment` - fix an isue where the resource would disappear or fail to import after 45 days ([#24524](https://github.com/hashicorp/terraform-provider-azurerm/issues/24524)) -* `azurerm_pim_eligible_role_assignment` - fix an isue where the resource would disappear or fail to import after 45 days ([#24524](https://github.com/hashicorp/terraform-provider-azurerm/issues/24524)) -* `azurerm_recovery_services_vault` - validate that `use_system_assigned_identity` and `user_assigned_identity_id` cannot be set at the same time ([#24091](https://github.com/hashicorp/terraform-provider-azurerm/issues/24091)) -* `azurerm_recovery_vaults` will now create properly with `SystemAssigned,UserAssigned` identity ([#24978](https://github.com/hashicorp/terraform-provider-azurerm/issues/24978)) -* `azurerm_subscription` - fixing an issue where response pages weren't iterated over correctly ([#25055](https://github.com/hashicorp/terraform-provider-azurerm/issues/25055)) +* provider: fix a validation bug that prevents `terraform validate` from working when `subscription_id` is not specified ([#27178](https://github.com/hashicorp/terraform-provider-azurerm/issues/27178)) +* `azurerm_cognitive_deployment` - fixed replacement of `scale` block with `sku` ([#27173](https://github.com/hashicorp/terraform-provider-azurerm/issues/27173)) +* `azurerm_kubernetes_cluster` - prevent a panic ([#27183](https://github.com/hashicorp/terraform-provider-azurerm/issues/27183)) +* `azurerm_kubernetes_cluster_node_pool` - prevent a panic caused by renamed `enable_*` properties ([#27164](https://github.com/hashicorp/terraform-provider-azurerm/issues/27164)) +* `azurerm_sentinel_data_connector_microsoft_threat_intelligence` - prevent error by removing deprecated property `bing_safety_phishing_url_lookback_date` ([#27171](https://github.com/hashicorp/terraform-provider-azurerm/issues/27171)) -## 3.93.0 (February 22, 2024) - -FEATURES: - -* **New Data Source**: `azurerm_express_route_circuit_peering` ([#24971](https://github.com/hashicorp/terraform-provider-azurerm/issues/24971)) -* **New Data Source**: `azurerm_storage_table_entities` ([#24973](https://github.com/hashicorp/terraform-provider-azurerm/issues/24973)) -* **New Resource**: `azurerm_dev_center_catalog` ([#24833](https://github.com/hashicorp/terraform-provider-azurerm/issues/24833)) -* **New Resource**: `azurerm_system_center_virtual_machine_manager_server` ([#24278](https://github.com/hashicorp/terraform-provider-azurerm/issues/24278)) - -BUG FIXES: - -* `azurerm_key_vault` - conditionally polling the Data Plane endpoint when `public_network_access_enabled` is set to false ([#23823](https://github.com/hashicorp/terraform-provider-azurerm/issues/23823)) -* `azurerm_storage_account` - allow the `identity.type` property to be `SystemAssigned, UserAssigned` when using a Customer Managed Key ([#24923](https://github.com/hashicorp/terraform-provider-azurerm/issues/24923)) -* `azurerm_automation_account` - prevent the `identity.identity_ids` User Assigned identity being set when not specified in config ([#24977](https://github.com/hashicorp/terraform-provider-azurerm/issues/24977)) - -ENHANCEMENTS: - -* dependencies: updating to `v0.20240221.1170458` of `hashicorp/go-azure-sdk` ([#24967](https://github.com/hashicorp/terraform-provider-azurerm/issues/24967)) -* dependencies: refactor `azurerm_spring_cloud_configuration_service` to use `go-azure-sdk` ([#24918](https://github.com/hashicorp/terraform-provider-azurerm/issues/24918)) -* provider: support or the feature flag `virtual_machine_scale_set.reimage_on_manual_upgrade` ([#22975](https://github.com/hashicorp/terraform-provider-azurerm/issues/22975)) -* `sentinel`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24962](https://github.com/hashicorp/terraform-provider-azurerm/issues/24962)) -* `sqlvirtualmachines`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24912](https://github.com/hashicorp/terraform-provider-azurerm/issues/24912)) -* `nginx` : updating to use `2024-01-01-preview` ([#24868](https://github.com/hashicorp/terraform-provider-azurerm/issues/24868)) -* `azurerm_cosmosdb_account` - support for the `backup.tier` property ([#24595](https://github.com/hashicorp/terraform-provider-azurerm/issues/24595)) -* `azurerm_linux_virtual_machine` - the `virtual_machine_scale_set_id` proeprty can now be changed without creating a new resource ([#24768](https://github.com/hashicorp/terraform-provider-azurerm/issues/24768)) -* `azurerm_machine_learning_workspace` - support for the `managed_network.isolation_mode` property ([#24951](https://github.com/hashicorp/terraform-provider-azurerm/issues/24951)) -* `azurerm_private_dns_resolver_inbound_endpoint` - support the `static` value for the `private_ip_allocation_method` property ([#24952](https://github.com/hashicorp/terraform-provider-azurerm/issues/24952)) -* `azurerm_postgresql_flexible_server` - expose the `storage_tier` field ([#24892](https://github.com/hashicorp/terraform-provider-azurerm/issues/24892)) -* `azurerm_redis_cache` - support for the `preferred_data_persistence_auth_method` property ([#24370](https://github.com/hashicorp/terraform-provider-azurerm/issues/24370)) -* `azurerm_servicebus_namespace` - support for the `premium_messaging_partitions` property ([#24676](https://github.com/hashicorp/terraform-provider-azurerm/issues/24676)) -* `azurerm_windows_virtual_machine` - the `virtual_machine_scale_set_id` proeprty can now be changed without creating a new resource ([#24768](https://github.com/hashicorp/terraform-provider-azurerm/issues/24768)) - -BUG FIXES: - -* `azurerm_cognitive_deployment` - the `version_upgrade_option` property can not be updated without creating a new resource ([#24922](https://github.com/hashicorp/terraform-provider-azurerm/issues/24922)) -* `azurerm_data_protection_backup_vault` - support or the `soft_delete` and `retention_duration_in_days` properties ([#24775](https://github.com/hashicorp/terraform-provider-azurerm/issues/24775)) -* `azurerm_data_factory_pipeline` - correctly handle incorrect header values ([#24921](https://github.com/hashicorp/terraform-provider-azurerm/issues/24921)) -* `azurerm_kusto_cluster` - `optimized_auto_scale` is now updated after `sku` has been updated ([#24906](https://github.com/hashicorp/terraform-provider-azurerm/issues/24906)) -* `azurerm_key_vault_certificate` - will now only update the `lifetime_action` of the certificate block unless otherwise required ([#24755](https://github.com/hashicorp/terraform-provider-azurerm/issues/24755)) -* `azurerm_linux_virtual_machine_scale_set` - correctly include `public_ip_prefix_id` during updates ([#24939](https://github.com/hashicorp/terraform-provider-azurerm/issues/24939)) -* `azurerm_postgresql_flexible_server` - the `customer_managed_key.key_vault_key_id` property is now required ([#24981](https://github.com/hashicorp/terraform-provider-azurerm/issues/24981)) -* `azurerm_nginx_deployment` - changing the `sku` property now creates a new resource ([#24905](https://github.com/hashicorp/terraform-provider-azurerm/issues/24905)) -* `azurerm_orchestrated_virtual_machine_scale_set` - the `disk_size_gb` and `lun` parameters of `data_disks` are optional now ([#24944](https://github.com/hashicorp/terraform-provider-azurerm/issues/24944)) -* `azurerm_storage_account` - change order of API calls to be GET-then-PUT ratehr then PATCHES ([#23935](https://github.com/hashicorp/terraform-provider-azurerm/issues/23935)) -* `azurerm_storage_account` - improve the validation around the `immutability_policy` being used with `blob_properties` ([#24938](https://github.com/hashicorp/terraform-provider-azurerm/issues/24938)) -* `azurerm_security_center_setting` - prevent a bug when name is `SENTINEL` ([#24497](https://github.com/hashicorp/terraform-provider-azurerm/issues/24497)) -* `azurerm_windows_virtual_machine_scale_set` - correctly include `public_ip_prefix_id` during updates ([#24939](https://github.com/hashicorp/terraform-provider-azurerm/issues/24939)) - - - -## 3.92.0 (February 15, 2024) - -FEATURES: - -* **New Data Source**: `azurerm_virtual_desktop_application_group` ([#24771](https://github.com/hashicorp/terraform-provider-azurerm/issues/24771)) - -ENHANCEMENTS: - -* provider: support for the feature flag `postgresql_flexible_server.restart_server_on_configuration_value_change property` ([#23811](https://github.com/hashicorp/terraform-provider-azurerm/issues/23811)) -* dependencies: updating to v0.20240214.1142753 of `github.com/hashicorp/go-azure-sdk` ([#24889](https://github.com/hashicorp/terraform-provider-azurerm/issues/24889)) -* `automation`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24858](https://github.com/hashicorp/terraform-provider-azurerm/issues/24858)) -* `maintenance`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24819](https://github.com/hashicorp/terraform-provider-azurerm/issues/24819)) -* `containerapps`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24862](https://github.com/hashicorp/terraform-provider-azurerm/issues/24862)) -* `containerservices`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24872](https://github.com/hashicorp/terraform-provider-azurerm/issues/24872)) -* `timeseriesinsights`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24889](https://github.com/hashicorp/terraform-provider-azurerm/issues/24889)) -* `azurerm_container_app_environment`: support for the `infrastructure_resource_group_name` property ([#24361](https://github.com/hashicorp/terraform-provider-azurerm/issues/24361)) -* `azurerm_cost_anomaly_alert` - support for the `subscription_id` property ([#24258](https://github.com/hashicorp/terraform-provider-azurerm/issues/24258)) -* `azurerm_cosmosdb_account` - add default values for the `consistency_policy` code block ([#24830](https://github.com/hashicorp/terraform-provider-azurerm/issues/24830)) -* `azurerm_dashboard_grafana` - support for the `smtp` block ([#24717](https://github.com/hashicorp/terraform-provider-azurerm/issues/24717)) -* `azurerm_key_vault_certificates` - support for the `tags` property ([#24857](https://github.com/hashicorp/terraform-provider-azurerm/issues/24857)) -* `azurerm_key_vault_secrets` - support for the `tags` property ([#24857](https://github.com/hashicorp/terraform-provider-azurerm/issues/24857)) -* `azurerm_orchestrated_virtual_machine_scale_set` - support for the `additional_unattend_content` block ([#24292](https://github.com/hashicorp/terraform-provider-azurerm/issues/24292)) -* `azurerm_virtual_desktop_host_pool` - support for the `vm_template` property ([#24369](https://github.com/hashicorp/terraform-provider-azurerm/issues/24369)) - -BUG FIXES: - -* `azurerm_container_app_environment`: avoid unwanted changes when updating and using `log_analytics_workspace_id` ([#24303](https://github.com/hashicorp/terraform-provider-azurerm/issues/24303)) -* `azurerm_cosmosdb_account` - fixed regression in the `backup` code block ([#24830](https://github.com/hashicorp/terraform-provider-azurerm/issues/24830)) -* `azurerm_data_factory` - allow the `git_url` property to be blank/empty ([#24879](https://github.com/hashicorp/terraform-provider-azurerm/issues/24879)) -* `azurerm_linux_web_app_slot` - the `worker_count` property now works correctly in the `site_config` block ([#24515](https://github.com/hashicorp/terraform-provider-azurerm/issues/24515)) -* `azurerm_linux_web_app` - support `off` for the `file_system_level` property ([#24877](https://github.com/hashicorp/terraform-provider-azurerm/issues/24877)) -* `azurerm_linux_web_app_slot` - support `off` for the `file_system_level` property ([#24877](https://github.com/hashicorp/terraform-provider-azurerm/issues/24877)) -* `azurerm_private_endpoint` - fixing an issue where updating the Private Endpoint would remove any Application Security Group Association ([#24846](https://github.com/hashicorp/terraform-provider-azurerm/issues/24846)) -* `azurerm_search_service` - fixed the update function to adjust for changed API behaviour ([#24837](https://github.com/hashicorp/terraform-provider-azurerm/issues/24837)) -* `azurerm_search_service` - fixed the update function to adjust for changed API behaviour ([#24903](https://github.com/hashicorp/terraform-provider-azurerm/issues/24903)) -* `azurerm_windows_web_app` - support `off` for the `file_system_level` property ([#24877](https://github.com/hashicorp/terraform-provider-azurerm/issues/24877)) -* `azurerm_windows_web_app_slot` - support `off` for the `file_system_level` property ([#24877](https://github.com/hashicorp/terraform-provider-azurerm/issues/24877)) - -## 3.91.0 (February 08, 2024) - -FEATURES: - -* **New Data Source**: `azurerm_databricks_access_connector` ([#24769](https://github.com/hashicorp/terraform-provider-azurerm/issues/24769)) -* **New Resource**: `azurerm_data_protection_backup_policy_kubernetes_cluster` ([#24718](https://github.com/hashicorp/terraform-provider-azurerm/issues/24718)) -* **New Resource**: `azurerm_chaos_studio_experiment` ([#24779](https://github.com/hashicorp/terraform-provider-azurerm/issues/24779)) -* **New Resource**: `azurerm_chaos_studio_capability` ([#24779](https://github.com/hashicorp/terraform-provider-azurerm/issues/24779)) -* **New Resource**: `azurerm_dev_center_gallery` ([#23760](https://github.com/hashicorp/terraform-provider-azurerm/issues/23760)) -* **New Resource:** `azurerm_kubernetes_fleet_member` ([#24792](https://github.com/hashicorp/terraform-provider-azurerm/issues/24792)) -* **New Resource:** `azurerm_iotcentral_organization` ([#23132](https://github.com/hashicorp/terraform-provider-azurerm/issues/23132)) -* **New Resource:** `azurerm_spring_cloud_app_dynamics_application_performance_monitoring` ([#24750](https://github.com/hashicorp/terraform-provider-azurerm/issues/24750)) - -ENHANCEMENTS: - -* dependencies: updating to `v0.20240208.1095436` of `github.com/hashicorp/go-azure-sdk/resource-manager` ([#24819](https://github.com/hashicorp/terraform-provider-azurerm/issues/24819)) -* dependencies: updating to `v0.20240208.1095436` of `github.com/hashicorp/go-azure-sdk/sdk` ([#24819](https://github.com/hashicorp/terraform-provider-azurerm/issues/24819)) -* dependencies: refactor `azurerm_app_service_environment_v3` to use `go-azure-sdk` ([#24760](https://github.com/hashicorp/terraform-provider-azurerm/issues/24760)) -* dependencies: refactor `azurerm_role_definition` to use `go-azure-sdk` ([#24266](https://github.com/hashicorp/terraform-provider-azurerm/issues/24266)) -* `managedhsm`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24761](https://github.com/hashicorp/terraform-provider-azurerm/issues/24761)) -* `hdinsight`: updating to API Version `2023-07-01` ([#24761](https://github.com/hashicorp/terraform-provider-azurerm/issues/24761)) -* `streamanalytics`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24819](https://github.com/hashicorp/terraform-provider-azurerm/issues/24819)) -* `azurerm_app_service_environment_v3` - support for the `remote_debugging_enabled` property ([#24760](https://github.com/hashicorp/terraform-provider-azurerm/issues/24760)) -* `azurerm_storage_account` - support for the `local_user_enabled` property ([#24800](https://github.com/hashicorp/terraform-provider-azurerm/issues/24800)) -* `azurerm_log_analytics_workspace_table` - support for the `total_retention_in_days` property ([#24513](https://github.com/hashicorp/terraform-provider-azurerm/issues/24513)) -* `azurerm_maching_learning_workspace` - support for the `feature_store` and `kind` properties ([#24716](https://github.com/hashicorp/terraform-provider-azurerm/issues/24716)) -* `azurerm_traffic_manager_azure_endpoint` - support for the `always_serve_enabled` property ([#24573](https://github.com/hashicorp/terraform-provider-azurerm/issues/24573)) -* `azurerm_traffic_manager_external_endpoint` - support for the `always_serve_enabled` property ([#24573](https://github.com/hashicorp/terraform-provider-azurerm/issues/24573)) - -BUG FIXES: - -* `azurerm_api_management` - the `virtual_network_configuration` property now updates correctly outside of `virtual_network_type` ([#24569](https://github.com/hashicorp/terraform-provider-azurerm/issues/24569)) - -## 3.90.0 (February 01, 2024) - -UPGRADE NOTES: - -* provider - The provider will now automatically register the `AppConfiguration`, `DataFactory`, and `SignalRService` Resource Providers. When running Terraform with limited permissions, note that you [must disable automatic Resource Provider Registration and ensure that any Resource Providers Terraform requires are registered]([XXX](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs#skip_provider_registration)). ([#24645](https://github.com/hashicorp/terraform-provider-azurerm/issues/24645)) - -FEATURES: - -* **New Data Source**: `azurerm_nginx_configuration` ([#24642](https://github.com/hashicorp/terraform-provider-azurerm/issues/24642)) -* **New Data Source**: `azurerm_virtual_desktop_workspace` ([#24732](https://github.com/hashicorp/terraform-provider-azurerm/issues/24732)) -* **New Resource**: `azurerm_kubernetes_fleet_update_strategy` ([#24328](https://github.com/hashicorp/terraform-provider-azurerm/issues/24328)) -* **New Resource**: `azurerm_site_recovery_vmware_replicated_vm` ([#22477](https://github.com/hashicorp/terraform-provider-azurerm/issues/22477)) -* **New Resource**: `azurerm_spring_cloud_new_relic_application_performance_monitoring` ([#24699](https://github.com/hashicorp/terraform-provider-azurerm/issues/24699)) - -ENHANCEMENTS: - -* provider: registering the Resource Provider `Microsoft.AppConfiguration` ([#24645](https://github.com/hashicorp/terraform-provider-azurerm/issues/24645)) -* provider: registering the Resource Provider `Microsoft.DataFactory` ([#24645](https://github.com/hashicorp/terraform-provider-azurerm/issues/24645)) -* provider: registering the Resource Provider `Microsoft.SignalRService` ([#24645](https://github.com/hashicorp/terraform-provider-azurerm/issues/24645)) -* provider: the Provider is now built using Go 1.21.6 ([#24653](https://github.com/hashicorp/terraform-provider-azurerm/issues/24653)) -* dependencies: the dependency `github.com/hashicorp/go-azure-sdk` has been split into multiple Go Modules - and as such will be referred to by those paths going forwards ([#24636](https://github.com/hashicorp/terraform-provider-azurerm/issues/24636)) -* dependencies: updating to ``v0.20240201.1064937` of `github.com/hashicorp/go-azure-sdk/resource-manager` ([#24738](https://github.com/hashicorp/terraform-provider-azurerm/issues/24738)) -* dependencies: updating to `v0.20240201.1064937` of `github.com/hashicorp/go-azure-sdk/sdk` ([#24738](https://github.com/hashicorp/terraform-provider-azurerm/issues/24738)) -* `appservice`: update to `go-azure-sdk` and API version `2023-01-01` ([#24688](https://github.com/hashicorp/terraform-provider-azurerm/issues/24688)) -* `datafactory`: updating to use `tombuildsstuff/kermit` ([#24675](https://github.com/hashicorp/terraform-provider-azurerm/issues/24675)) -* `hdinsight`: refactoring to use `github.com/hashicorp/go-azure-sdk/resource-manager` ([#24011](https://github.com/hashicorp/terraform-provider-azurerm/issues/24011)) -* `hdinsight`: updating to API Version `2021-06-01` ([#24011](https://github.com/hashicorp/terraform-provider-azurerm/issues/24011)) -* `loadbalancer`: updating to use `hashicorp/go-azure-sdk` ([#24291](https://github.com/hashicorp/terraform-provider-azurerm/issues/24291)) -* `nginx`: updating to API Version `2023-09-01` ([#24640](https://github.com/hashicorp/terraform-provider-azurerm/issues/24640)) -* `servicefabricmanagedcluster`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24654](https://github.com/hashicorp/terraform-provider-azurerm/issues/24654)) -* `springcloud`: updating to use API Version `2023-11-01-preview` ([#24690](https://github.com/hashicorp/terraform-provider-azurerm/issues/24690)) -* `subscriptions`: refactoring to use `hashicorp/go-azure-sdk` ([#24663](https://github.com/hashicorp/terraform-provider-azurerm/issues/24663)) -* Data Source: `azurerm_stream_analytics_job` - support for User Assigned Identities ([#24738](https://github.com/hashicorp/terraform-provider-azurerm/issues/24738)) -* `azurerm_cosmosdb_account` - support for the `gremlin_database` and `tables_to_restore` properties ([#24627](https://github.com/hashicorp/terraform-provider-azurerm/issues/24627)) -* `azurerm_bot_channel_email` - support for the `magic_code` property ([#23129](https://github.com/hashicorp/terraform-provider-azurerm/issues/23129)) -* `azurerm_cosmosdb_account` - support for the `partition_merge_enabled` property ([#24615](https://github.com/hashicorp/terraform-provider-azurerm/issues/24615)) -* `azurerm_mssql_managed_database` - support for the `immutable_backups_enabled` property ([#24745](https://github.com/hashicorp/terraform-provider-azurerm/issues/24745)) -* `azurerm_mssql_database` - support for the `immutable_backups_enabled` property ([#24745](https://github.com/hashicorp/terraform-provider-azurerm/issues/24745)) -* `azurerm_palo_alto_next_generation_firewall_virtual_hub_panorama` - support for the `trusted_address_ranges` property ([#24459](https://github.com/hashicorp/terraform-provider-azurerm/issues/24459)) -* `azurerm_palo_alto_next_generation_firewall_virtual_network_local_rulestack` - support for the `trusted_address_ranges` property ([#24459](https://github.com/hashicorp/terraform-provider-azurerm/issues/24459)) -* `azurerm_palo_alto_next_generation_firewall_virtual_network_panorama` - support for the `trusted_address_ranges` property ([#24459](https://github.com/hashicorp/terraform-provider-azurerm/issues/24459)) -* `azurerm_servicebus_namespace` - updating to use API Version `2022-10-01-preview` ([#24650](https://github.com/hashicorp/terraform-provider-azurerm/issues/24650)) -* `azurerm_spring_cloud_api_portal` - support for the `api_try_out_enabled` property ([#24696](https://github.com/hashicorp/terraform-provider-azurerm/issues/24696)) -* `azurerm_spring_cloud_gateway` - support for the `local_response_cache_per_route` and `local_response_cache_per_instance` properties ([#24697](https://github.com/hashicorp/terraform-provider-azurerm/issues/24697)) -* `azurerm_stream_analytics_job` - support for User Assigned Identities ([#24738](https://github.com/hashicorp/terraform-provider-azurerm/issues/24738)) -* `azurerm_subscription` - refactoring to use `hashicorp/go-azure-sdk` to set tags on the subscription ([#24734](https://github.com/hashicorp/terraform-provider-azurerm/issues/24734)) -* `azurerm_virtual_desktop_workspace` - correctly validate the `name` property ([#24668](https://github.com/hashicorp/terraform-provider-azurerm/issues/24668)) - - -BUG FIXES: - -* provider: skip registration for resource providers that are unavailable ([#24571](https://github.com/hashicorp/terraform-provider-azurerm/issues/24571)) -* `azurerm_app_configuration` - no longer require `lifecycle_ignore_changes` for the `value` property when using a key vault reference ([#24702](https://github.com/hashicorp/terraform-provider-azurerm/issues/24702)) -* `azurerm_app_service_managed_certificate` - fix casing issue in `app_service_plan_id` by parsing insensitively ([#24664](https://github.com/hashicorp/terraform-provider-azurerm/issues/24664)) -* `azurerm_cognitive_deployment` - updates now include the `version` property ([#24700](https://github.com/hashicorp/terraform-provider-azurerm/issues/24700)) -* `azurerm_dns_cname_record` - prevent casing issue in `target_resource_id` by parsing the ID insensitively ([#24181](https://github.com/hashicorp/terraform-provider-azurerm/issues/24181)) -* `azurerm_mssql_managed_instance_failover_group` - prevent an issue when trying to create a failover group with a managed instance from a different subscription ([#24646](https://github.com/hashicorp/terraform-provider-azurerm/issues/24646)) -* `azurerm_storage_account` - conditionally update properties only when needed ([#24669](https://github.com/hashicorp/terraform-provider-azurerm/issues/24669)) -* `azurerm_storage_account` - change update order for `access_tier`to prevent errors when uploading blobs to the archive tier ([#22250](https://github.com/hashicorp/terraform-provider-azurerm/issues/22250)) - -## 3.89.0 (January 25, 2024) - -FEATURES: - -* New Data Source: `azurerm_data_factory_trigger_schedule` ([#24572](https://github.com/hashicorp/terraform-provider-azurerm/issues/24572)) -* New Data Source: `azurerm_data_factory_trigger_schedules` ([#24572](https://github.com/hashicorp/terraform-provider-azurerm/issues/24572)) -* New Data Source: `azurerm_ip_groups` ([#24540](https://github.com/hashicorp/terraform-provider-azurerm/issues/24540)) -* New Data Source: `azurerm_nginx_certificate` ([#24577](https://github.com/hashicorp/terraform-provider-azurerm/issues/24577)) -* New Resource: `azurerm_chaos_studio_target` ([#24580](https://github.com/hashicorp/terraform-provider-azurerm/issues/24580)) -* New Resource: `azurerm_elastic_san_volume_group` ([#24166](https://github.com/hashicorp/terraform-provider-azurerm/issues/24166)) -* New Resource: `azurerm_netapp_account_encryption` ([#23733](https://github.com/hashicorp/terraform-provider-azurerm/issues/23733)) -* New Resource: `azurerm_redhat_openshift_cluster` ([#24375](https://github.com/hashicorp/terraform-provider-azurerm/issues/24375)) - -ENHANCEMENTS: - -* dependencies: updating to `v0.66.1` of `github.com/hashicorp/go-azure-helpers` ([#24561](https://github.com/hashicorp/terraform-provider-azurerm/issues/24561)) -* dependencies: updating to `v0.20240124.1115501` of `github.com/hashicorp/go-azure-sdk` ([#24619](https://github.com/hashicorp/terraform-provider-azurerm/issues/24619)) -* `bot`: updating to API Version `2021-05-01-preview` ([#24555](https://github.com/hashicorp/terraform-provider-azurerm/issues/24555)) -* `containerservice`: the SDK Clients now support logging ([#24564](https://github.com/hashicorp/terraform-provider-azurerm/issues/24564)) -* `cosmosdb`: updating to API Version `2023-04-15` ([#24541](https://github.com/hashicorp/terraform-provider-azurerm/issues/24541)) -* `loadtestservice`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` (and support logging) ([#24578](https://github.com/hashicorp/terraform-provider-azurerm/issues/24578)) -* `managedidentity`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` (and support logging) ([#24578](https://github.com/hashicorp/terraform-provider-azurerm/issues/24578)) -* `azurerm_api_management_api` - change the `id` format so specific `revision`s can be managed by Terraform ([#23031](https://github.com/hashicorp/terraform-provider-azurerm/issues/23031)) -* `azurerm_data_protection_backup_vault` - the `redundancy` propety can now be set to `ZoneRedundant` ([#24556](https://github.com/hashicorp/terraform-provider-azurerm/issues/24556)) -* `azurerm_data_factory_integration_runtime_azure_ssis` - support for the `credential_name` property ([#24458](https://github.com/hashicorp/terraform-provider-azurerm/issues/24458)) -* `azurerm_orchestrated_virtual_machine_scale_set` - support `2022-datacenter-azure-edition-hotpatch` and `2022-datacenter-azure-edition-hotpatch-smalldisk` hotpatching images ([#23500](https://github.com/hashicorp/terraform-provider-azurerm/issues/23500)) -* `azurerm_stream_analytics_job` - support for the `sku_name` property ([#24554](https://github.com/hashicorp/terraform-provider-azurerm/issues/24554)) - -BUG FIXES: - -* Data Source: `azurerm_app_service` - parsing the API Response for `app_service_plan_id` case-insensitively ([#24626](https://github.com/hashicorp/terraform-provider-azurerm/issues/24626)) -* Data Source: `azurerm_function_app` - parsing the API Response for `app_service_plan_id` case-insensitively ([#24626](https://github.com/hashicorp/terraform-provider-azurerm/issues/24626)) -* `azurerm_app_configuration_key` - the value for the `value` property can now be removed/emptied ([#24582](https://github.com/hashicorp/terraform-provider-azurerm/issues/24582)) - -* `azurerm_app_service` - parsing the API Response for `app_service_plan_id` case-insensitively ([#24626](https://github.com/hashicorp/terraform-provider-azurerm/issues/24626)) -* `azurerm_app_service_plan` - fix casing in `serverFarms` due to ID update ([#24562](https://github.com/hashicorp/terraform-provider-azurerm/issues/24562)) -* `azurerm_app_service_slot` - parsing the API Response for `app_service_plan_id` case-insensitively ([#24626](https://github.com/hashicorp/terraform-provider-azurerm/issues/24626)) -* `azurerm_automation_schedule` - only one `monthly_occurence` block can now be specified ([#24614](https://github.com/hashicorp/terraform-provider-azurerm/issues/24614)) -* `azurerm_cognitive_deployment` - the `model.version` property is no longer required ([#24264](https://github.com/hashicorp/terraform-provider-azurerm/issues/24264)) -* `azurerm_container_app` - multiple `custom_scale_rule` can not be updated ([#24509](https://github.com/hashicorp/terraform-provider-azurerm/issues/24509)) -* `azurerm_container_registry_task_schedule_run_now` - prevent issue where the incorrect scheduled run in tracked if there have been multiple ([#24592](https://github.com/hashicorp/terraform-provider-azurerm/issues/24592)) -* `azurerm_function_app` - parsing the API Response for `app_service_plan_id` case-insensitively ([#24626](https://github.com/hashicorp/terraform-provider-azurerm/issues/24626)) -* `azurerm_function_app_slot` - parsing the API Response for `app_service_plan_id` case-insensitively ([#24626](https://github.com/hashicorp/terraform-provider-azurerm/issues/24626)) -* `azurerm_logic_app_standard` - now will parse the app service ID insensitively ([#24562](https://github.com/hashicorp/terraform-provider-azurerm/issues/24562)) -* `azurerm_logic_app_workflow` - the `workflow_parameters` will now correctly handle information specified by `$connections` ([#24141](https://github.com/hashicorp/terraform-provider-azurerm/issues/24141)) -* `azurerm_mssql_managed_instance_security_alert_policy` - can not update empty storage attributes ([#24553](https://github.com/hashicorp/terraform-provider-azurerm/issues/24553)) -* `azurerm_network_interface` - the `ip_configuration` properties are no longer added to a Load Balancer Backend if one of those `ip_configurations` is associated with a backend ([#24470](https://github.com/hashicorp/terraform-provider-azurerm/issues/24470)) - -## 3.88.0 (January 18, 2024) - -FEATURES: - -* New Data Source: `azurerm_nginx_deployment` ([#24492](https://github.com/hashicorp/terraform-provider-azurerm/issues/24492)) -* New Resource: `azurerm_spring_cloud_dynatrace_application_performance_monitoring` ([#23889](https://github.com/hashicorp/terraform-provider-azurerm/issues/23889)) -* New Resource: `azurerm_virtual_machine_run_command` ([#23377](https://github.com/hashicorp/terraform-provider-azurerm/issues/23377)) - -ENHANCEMENTS: - -* dependencies: updating to `v0.20240117.1163544` of `github.com/hashicorp/go-azure-sdk` ([#24481](https://github.com/hashicorp/terraform-provider-azurerm/issues/24481)) -* dependencies: updating to `v0.65.1` of `github.com/hashicorp/go-azure-helpers` ([#24479](https://github.com/hashicorp/terraform-provider-azurerm/issues/24479)) -* `datashare`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24481](https://github.com/hashicorp/terraform-provider-azurerm/issues/24481)) -* `kusto`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24477](https://github.com/hashicorp/terraform-provider-azurerm/issues/24477)) -* Data Source: `azurerm_application_gateway` - support for the `trusted_client_certificate.data` property ([#24474](https://github.com/hashicorp/terraform-provider-azurerm/issues/24474)) -* `azurerm_service_plan`: refactoring to use `hashicorp/go-azure-sdk` ([#24483](https://github.com/hashicorp/terraform-provider-azurerm/issues/24483)) -* `azurerm_container_group` - support for the `priority` property ([#24374](https://github.com/hashicorp/terraform-provider-azurerm/issues/24374)) -* `azurerm_mssql_managed_database` - support for the `point_in_time_restore` property ([#24535](https://github.com/hashicorp/terraform-provider-azurerm/issues/24535)) -* `azurerm_mssql_managed_instance` - now exports the `dns_zone` attribute ([#24435](https://github.com/hashicorp/terraform-provider-azurerm/issues/24435)) -* `azurerm_linux_web_app_slot` - support for setting `python_version` to `3.12` ([#24363](https://github.com/hashicorp/terraform-provider-azurerm/issues/24363)) -* `azurerm_linux_web_app` - support for setting `python_version` to `3.12` ([#24363](https://github.com/hashicorp/terraform-provider-azurerm/issues/24363)) -* `azurerm_linux_function_app_slot` - support for setting `python_version` to `3.12` ([#24363](https://github.com/hashicorp/terraform-provider-azurerm/issues/24363)) -* `azurerm_linux_function_app` - support for setting `python_version` to `3.12` ([#24363](https://github.com/hashicorp/terraform-provider-azurerm/issues/24363)) - -BUG FIXES: - -* `azurerm_application_gateway` - the `components` property within the `url` block is no longer computed ([#24480](https://github.com/hashicorp/terraform-provider-azurerm/issues/24480)) -* `azurerm_cdn_frontdoor_route` - prevent an issue where `cdn_frontdoor_origin_path` gets removed on update if unchanged. ([#24488](https://github.com/hashicorp/terraform-provider-azurerm/issues/24488)) -* `azurerm_cognitive_account` - fixing support for the `DC0` SKU ([#24526](https://github.com/hashicorp/terraform-provider-azurerm/issues/24526)) - -## 3.87.0 (January 11, 2024) - -FEATURES: - -* New Data Source: `azurerm_network_manager` ([#24398](https://github.com/hashicorp/terraform-provider-azurerm/issues/24398)) -* New Resource: `azurerm_security_center_server_vulnerability_assessments_setting` ([#24299](https://github.com/hashicorp/terraform-provider-azurerm/issues/24299)) - -ENHANCEMENTS: - -* dependencies: updating to `v0.20240111.1094251` of `github.com/hashicorp/go-azure-sdk` ([#24463](https://github.com/hashicorp/terraform-provider-azurerm/issues/24463)) -* Data Source: `azurerm_mssql_database` - support for `identity`, `transparent_data_encryption_enabled`, `transparent_data_encryption_key_vault_key_id` and `transparent_data_encryption_key_automatic_rotation_enabled` ([#24412](https://github.com/hashicorp/terraform-provider-azurerm/issues/24412)) -* Data Source: `azurerm_mssql_server` - support for `transparent_data_encryption_key_vault_key_id` ([#24412](https://github.com/hashicorp/terraform-provider-azurerm/issues/24412)) -* `machinelearning`: updating to API Version `2023-10-01` ([#24416](https://github.com/hashicorp/terraform-provider-azurerm/issues/24416)) -* `paloaltonetworks`: updating to API Version `2023-09-01` ([#24290](https://github.com/hashicorp/terraform-provider-azurerm/issues/24290)) -* `azurerm_container_app` - update create time validations for `ingress.0.traffic_weight` ([#24042](https://github.com/hashicorp/terraform-provider-azurerm/issues/24042)) -* `azurerm_container_app`- support for the `ip_security_restriction` block ([#23870](https://github.com/hashicorp/terraform-provider-azurerm/issues/23870)) -* `azurerm_kubernetes_cluster` - properties in `default_node_pool.linux_os_config.sysctl_config` are now updateable via node pool cycling ([#24397](https://github.com/hashicorp/terraform-provider-azurerm/issues/24397)) -* `azurerm_linux_web_app` - support the `VS2022` value for the `remote_debugging_version` property ([#24407](https://github.com/hashicorp/terraform-provider-azurerm/issues/24407)) -* `azurerm_mssql_database` - support for `identity`, `transparent_data_encryption_key_vault_key_id` and `transparent_data_encryption_key_automatic_rotation_enabled` ([#24412](https://github.com/hashicorp/terraform-provider-azurerm/issues/24412)) -* `azurerm_postgres_flexible_server` - the `sku_name` property now supports being set to `MO_Standard_E96ds_v5` ([#24367](https://github.com/hashicorp/terraform-provider-azurerm/issues/24367)) -* `azurerm_role_assignment` - support for the `principal_type` property ([#24271](https://github.com/hashicorp/terraform-provider-azurerm/issues/24271)) -* `azurerm_windows_web_app` - support the `VS2022` value for the `remote_debugging_version` property ([#24407](https://github.com/hashicorp/terraform-provider-azurerm/issues/24407)) -* `azurerm_cdn_frontdoor_firewall_policy` - support for `request_body_check_enabled` property ([#24406](https://github.com/hashicorp/terraform-provider-azurerm/issues/24406)) - -BUG FIXES: - -* Data Source: `azurerm_role_definition` - fix `role_definition_id` ([#24418](https://github.com/hashicorp/terraform-provider-azurerm/issues/24418)) -* `azurerm_api_management` - the `sku_name` property can now be updated ([#24431](https://github.com/hashicorp/terraform-provider-azurerm/issues/24431)) -* `azurerm_arc_kubernetes_flux_configuration` - prevent a bug where certain sensitive properties for `bucket` and `git_repository` were being overwritten after an update to the resource is made ([#24066](https://github.com/hashicorp/terraform-provider-azurerm/issues/24066)) -* `azurerm_kubernetes_flux_configuration` - prevent a bug where certain sensitive properties for `bucket` and `git_repository` were being overwritten after an update to the resource is made ([#24066](https://github.com/hashicorp/terraform-provider-azurerm/issues/24066)) -* `azure_linux_web_app` - prevent a bug in App Service processing of `application_stack` in updates to `site_config` ([#24424](https://github.com/hashicorp/terraform-provider-azurerm/issues/24424)) -* `azure_linux_web_app_slot` - Fix bug in App Service processing of `application_stack` in updates to `site_config` ([#24424](https://github.com/hashicorp/terraform-provider-azurerm/issues/24424)) -* `azurerm_network_manager_deployment` - update creation wait logic to better tolerate the api returning not found ([#24330](https://github.com/hashicorp/terraform-provider-azurerm/issues/24330)) -* `azurerm_virtual_machine_data_disk_attachment` - do not update applications profile with disks ([#24145](https://github.com/hashicorp/terraform-provider-azurerm/issues/24145)) -* `azure_windows_web_app` - prevent a bug in App Service processing of `application_stack` in updates to `site_config` ([#24424](https://github.com/hashicorp/terraform-provider-azurerm/issues/24424)) -* `azure_windows_web_app_slot` - prevent a bug in App Service processing of `application_stack` in updates to `site_config` ([#24424](https://github.com/hashicorp/terraform-provider-azurerm/issues/24424)) -* `azurerm_maintenance_configuration` - set the `reboot` property in flatten from `AlwaysReboot` to `Always` ([#24376](https://github.com/hashicorp/terraform-provider-azurerm/issues/24376)) -* `azurerm_container_app_environment` - the `workload_profile` property can now be updated ([#24409](https://github.com/hashicorp/terraform-provider-azurerm/issues/24409)) - -## 3.86.0 (January 04, 2024) - -FEATURES: - -* New Data Source: `azurerm_dashboard_grafana` ([#24243](https://github.com/hashicorp/terraform-provider-azurerm/issues/24243)) -* New Resource: `azurerm_log_analytics_workspace_table` ([#24229](https://github.com/hashicorp/terraform-provider-azurerm/issues/24229)) -* New Resource: `azurerm_automation_powershell72_module` ([#23980](https://github.com/hashicorp/terraform-provider-azurerm/issues/23980)) -* New Resource: `azurerm_data_factory_credential_user_managed_identity` ([#24307](https://github.com/hashicorp/terraform-provider-azurerm/issues/24307)) - -ENHANCEMENTS: - -* dependencies: updating to `v0.20231215.1114251` of `hashicorp/go-azure-sdk` ([#24251](https://github.com/hashicorp/terraform-provider-azurerm/issues/24251)) -* dependencies: `azurerm_spring_cloud_api_portal` - update to use `hashicorp/go-azure-sdk` ([#24321](https://github.com/hashicorp/terraform-provider-azurerm/issues/24321)) -* Data Source: `azurerm_kusto_cluster` - now exports the `identity` block ([#24314](https://github.com/hashicorp/terraform-provider-azurerm/issues/24314)) -* `azurerm_data_protection_backup_policy_postgresql` - support for the `time_zone` property ([#24312](https://github.com/hashicorp/terraform-provider-azurerm/issues/24312)) -* `azurerm_data_protection_backup_policy_disk` - support for the `time_zone` property ([#24312](https://github.com/hashicorp/terraform-provider-azurerm/issues/24312)) -* `azurerm_key_vault_managed_hardware_security_module` -the `tags` property can now be updated ([#24333](https://github.com/hashicorp/terraform-provider-azurerm/issues/24333)) -* `azurerm_logic_app_standard` - support for the `site_config.0.public_network_access_enabled` property ([#24257](https://github.com/hashicorp/terraform-provider-azurerm/issues/24257)) -* `azurerm_log_analytics_workspace_table` - support for the `plan` property ([#24341](https://github.com/hashicorp/terraform-provider-azurerm/issues/24341)) -* `azurerm_linux_web_app` - support the value `20-lts` for the `node_version` property ([#24289](https://github.com/hashicorp/terraform-provider-azurerm/issues/24289)) -* `azurerm_recovery_services_vault` - support creation with immutability set to locked ([#23806](https://github.com/hashicorp/terraform-provider-azurerm/issues/23806)) -* `azurerm_spring_cloud_service` - support for the `sku_tier` property ([#24103](https://github.com/hashicorp/terraform-provider-azurerm/issues/24103)) - -BUG FIXES: - -* Data Source: `azurerm_role_definition` - correctly export the `role_definition_id` attribute ([#24320](https://github.com/hashicorp/terraform-provider-azurerm/issues/24320)) -* `azurerm_bot_service` - fixing a bug where `public_network_access_enabled` was always set to `true` ([#24255](https://github.com/hashicorp/terraform-provider-azurerm/issues/24255)) -* `azurerm_bot_service_azure_bot` - `tags` can now be updated ([#24332](https://github.com/hashicorp/terraform-provider-azurerm/issues/24332)) -* `azurerm_cosmosdb_account` - fix validation for the `ip_range_filter` property ([#24306](https://github.com/hashicorp/terraform-provider-azurerm/issues/24306)) -* `azurerm_linux_virtual_machine` - the `additional_capabilities.0.ultra_ssd_enabled` can now be changed during the update ([#24274](https://github.com/hashicorp/terraform-provider-azurerm/issues/24274)) -* `azurerm_logic_app_standard` - update the default value of `version` from `~3` which is no longer supported to `~4` ([#24134](https://github.com/hashicorp/terraform-provider-azurerm/issues/24134)) -* `azurerm_logic_app_standard` - fix a crash when setting the default `version` 4.0 flag ([#24322](https://github.com/hashicorp/terraform-provider-azurerm/issues/24322)) -* `azurerm_iothub_device_update_account` - changing the `sku` property now creates a new resource ([#24324](https://github.com/hashicorp/terraform-provider-azurerm/issues/24324)) -* `azurerm_iothub` - prevent an inconsistant value after an apply ([#24326](https://github.com/hashicorp/terraform-provider-azurerm/issues/24326)) -* `azurerm_orchestrated_virtual_machine_scale_set` - correctly update the resource when hotpatch is enabled ([#24335](https://github.com/hashicorp/terraform-provider-azurerm/issues/24335)) -* `azurerm_windows_virtual_machine` - the `additional_capabilities.0.ultra_ssd_enabled` can now be changed during the update ([#24274](https://github.com/hashicorp/terraform-provider-azurerm/issues/24274)) -* `azurerm_scheduled_query_rules_alert` - changing the `data_source_id` now creates a new resource ([#24327](https://github.com/hashicorp/terraform-provider-azurerm/issues/24327)) -* `azurerm_scheduled_query_rules_log` - changing the `data_source_id` now creates a new resource ([#24327](https://github.com/hashicorp/terraform-provider-azurerm/issues/24327)) - -## 3.85.0 (December 14, 2023) - -FEATURES: - -* New Data Source: `azurerm_locations` ([#23324](https://github.com/hashicorp/terraform-provider-azurerm/issues/23324)) - -ENHANCEMENTS: - -* provider: support for authenticating using Azure Kubernetes Service Workload Identity ([#23965](https://github.com/hashicorp/terraform-provider-azurerm/issues/23965)) -* dependencies: updating to `v0.65.0` of `github.com/hashicorp/go-azure-helpers` ([#24222](https://github.com/hashicorp/terraform-provider-azurerm/issues/24222)) -* dependencies: updating to `v0.20231214.1220802` of `github.com/hashicorp/go-azure-sdk` ([#24246](https://github.com/hashicorp/terraform-provider-azurerm/issues/24246)) -* dependencies: updating to version `v0.20231214.1160726` of `github.com/hashicorp/go-azure-sdk` ([#24241](https://github.com/hashicorp/terraform-provider-azurerm/issues/24241)) -* dependencies: update `security/automation` to use `hashicorp/go-azure-sdk` ([#24156](https://github.com/hashicorp/terraform-provider-azurerm/issues/24156)) -* dependencies `dataprotection`: updating to API Version `2023-05-01` ([#24143](https://github.com/hashicorp/terraform-provider-azurerm/issues/24143)) -* `kusto`: removing the remnants of the old Resource ID Parsers now this uses `hashicorp/go-azure-sdk` ([#24238](https://github.com/hashicorp/terraform-provider-azurerm/issues/24238)) -* Data Source: `azurerm_cognitive_account` - export the `identity` block ([#24214](https://github.com/hashicorp/terraform-provider-azurerm/issues/24214)) -* Data Source: `azurerm_monitor_workspace` - add support for the `default_data_collection_endpoint_id` and `default_data_collection_rule_id` properties ([#24153](https://github.com/hashicorp/terraform-provider-azurerm/issues/24153)) -* Data Source: `azurerm_shared_image_gallery` - add support for the `image_names` property ([#24176](https://github.com/hashicorp/terraform-provider-azurerm/issues/24176)) -* `azurerm_dns_txt_record` - allow up to `4096` characters for the property `record.value` ([#24169](https://github.com/hashicorp/terraform-provider-azurerm/issues/24169)) -* `azurerm_container_app` - support for the `workload_profile_name` property ([#24219](https://github.com/hashicorp/terraform-provider-azurerm/issues/24219)) -* `azurerm_container_app` - suppot for the `init_container` block ([#23955](https://github.com/hashicorp/terraform-provider-azurerm/issues/23955)) -* `azurerm_hpc_cache_blob_nfs_target` - support for the `verification_timer_in_seconds` and `write_back_timer_in_seconds` properties ([#24207](https://github.com/hashicorp/terraform-provider-azurerm/issues/24207)) -* `azurerm_hpc_cache_nfs_target` - support for the `verification_timer_in_seconds` and `write_back_timer_in_seconds` properties ([#24208](https://github.com/hashicorp/terraform-provider-azurerm/issues/24208)) -* `azurerm_linux_web_app` - make `client_secret_setting_name` optional and conflict with `client_secret_certificate_thumbprint` ([#21834](https://github.com/hashicorp/terraform-provider-azurerm/issues/21834)) -* `azurerm_linux_web_app_slot` - make `client_secret_setting_name` optional and conflict with `client_secret_certificate_thumbprint` ([#21834](https://github.com/hashicorp/terraform-provider-azurerm/issues/21834)) -* `azurerm_linux_web_app` - fix a bug in `app_settings` where settings could be lost ([#24221](https://github.com/hashicorp/terraform-provider-azurerm/issues/24221)) -* `azurerm_linux_web_app_slot` - fix a bug in `app_settings` where settings could be lost ([#24221](https://github.com/hashicorp/terraform-provider-azurerm/issues/24221)) -* `azurerm_log_analytics_workspace` - add support for the `immediate_data_purge_on_30_days_enabled` property ([#24015](https://github.com/hashicorp/terraform-provider-azurerm/issues/24015)) -* `azurerm_mssql_server` - support for other identity types for the key vault key ([#24236](https://github.com/hashicorp/terraform-provider-azurerm/issues/24236)) -* `azurerm_machine_learning_datastore_blobstorage` - resource now skips validation when being created ([#24078](https://github.com/hashicorp/terraform-provider-azurerm/issues/24078)) -* `azurerm_machine_learning_datastore_datalake_gen2` - resource now skips validation when being created ([#24078](https://github.com/hashicorp/terraform-provider-azurerm/issues/24078)) -* `azurerm_machine_learning_datastore_fileshare` - resource now skips validation when being created ([#24078](https://github.com/hashicorp/terraform-provider-azurerm/issues/24078)) -* `azurerm_monitor_workspace` - support for the `default_data_collection_endpoint_id` and `default_data_collection_rule_id` properties ([#24153](https://github.com/hashicorp/terraform-provider-azurerm/issues/24153)) -* `azurerm_redis_cache` - support for the `storage_account_subscription_id` property ([#24101](https://github.com/hashicorp/terraform-provider-azurerm/issues/24101)) -* `azurerm_storage_blob` - support for the `source_content` type `Page` ([#24177](https://github.com/hashicorp/terraform-provider-azurerm/issues/24177)) -* `azurerm_web_application_firewall_policy` - support new values to the `rule_group_name` property ([#24194](https://github.com/hashicorp/terraform-provider-azurerm/issues/24194)) -* `azurerm_windows_web_app` - make the `client_secret_setting_name` property optional and conflicts with the `client_secret_certificate_thumbprint` property ([#21834](https://github.com/hashicorp/terraform-provider-azurerm/issues/21834)) -* `azurerm_windows_web_app_slot` - make the `client_secret_setting_name` property optional and conflicts with the `client_secret_certificate_thumbprint` property ([#21834](https://github.com/hashicorp/terraform-provider-azurerm/issues/21834)) -* `azurerm_windows_web_app` - fix a bug in `app_settings` where settings could be lost ([#24221](https://github.com/hashicorp/terraform-provider-azurerm/issues/24221)) -* `azurerm_windows_web_app_slot` - fix a bug in `app_settings` where settings could be lost ([#24221](https://github.com/hashicorp/terraform-provider-azurerm/issues/24221)) -* `azurerm_cognitive_account` - add `ContentSafety` to the `kind` property validation ([#24205](https://github.com/hashicorp/terraform-provider-azurerm/issues/24205)) - -BUG FIXES: - -* provider: fix an authentication issue with Azure Storage when running in Azure China cloud ([#24246](https://github.com/hashicorp/terraform-provider-azurerm/issues/24246)) -* Data Source: `azurerm_role_definition` - fix bug where `role_definition_id` and `scope` were being incorrectly set ([#24211](https://github.com/hashicorp/terraform-provider-azurerm/issues/24211)) -* `azurerm_batch_account` - fix bug where `UserAssigned, SystemAssigned` could be passed to the resource even though it isn't supported ([#24204](https://github.com/hashicorp/terraform-provider-azurerm/issues/24204)) -* `azurerm_batch_pool` - fix bug where `settings_json` and `protected_settings` were not being unmarshaled ([#24075](https://github.com/hashicorp/terraform-provider-azurerm/issues/24075)) -* `azurerm_bot_service_azure_bot` - fix bug where `public_network_access_enabled` was being set as the value for `LuisKey` ([#24164](https://github.com/hashicorp/terraform-provider-azurerm/issues/24164)) -* `azurerm_cognitive_account_customer_managed_key` - `identity_client_id` is no longer passed to the api when it is empty ([#24231](https://github.com/hashicorp/terraform-provider-azurerm/issues/24231)) -* `azurerm_linux_web_app_slot` - error when `service_plan_id` is identical to the parent `service_plan_id` ([#23403](https://github.com/hashicorp/terraform-provider-azurerm/issues/23403)) -* `azurerm_management_group_template_deployment` - fixing a bug where `template_spec_version_id` couldn't be updated ([#24072](https://github.com/hashicorp/terraform-provider-azurerm/issues/24072)) -* `azurerm_pim_active_role_assignment` - fix an importing issue by filtering available role assignments based on the provided `scope` ([#24077](https://github.com/hashicorp/terraform-provider-azurerm/issues/24077)) -* `azurerm_pim_eligible_role_assignment` - fix an importing issue by filtering available role assignments based on the provided `scope` ([#24077](https://github.com/hashicorp/terraform-provider-azurerm/issues/24077)) -* `azurerm_resource_group_template_deployment` - fixing a bug where `template_spec_version_id` couldn't be updated ([#24072](https://github.com/hashicorp/terraform-provider-azurerm/issues/24072)) -* `azurerm_security_center_setting` - fix the casing for the `setting_name` `Sentinel` ([#24210](https://github.com/hashicorp/terraform-provider-azurerm/issues/24210)) -* `azurerm_storage_account` - Fix crash when checking for `routingInputs.PublishInternetEndpoints` and `routingInputs.PublishMicrosoftEndpoints` ([#24228](https://github.com/hashicorp/terraform-provider-azurerm/issues/24228)) -* `azurerm_storage_share_file` - prevent panic when the file specified by `source` is empty ([#24179](https://github.com/hashicorp/terraform-provider-azurerm/issues/24179)) -* `azurerm_subscription_template_deployment` - fixing a bug where `template_spec_version_id` couldn't be updated ([#24072](https://github.com/hashicorp/terraform-provider-azurerm/issues/24072)) -* `azurerm_tenant_template_deployment` - fixing a bug where `template_spec_version_id` couldn't be updated ([#24072](https://github.com/hashicorp/terraform-provider-azurerm/issues/24072)) -* `azurerm_virtual_machine` - prevent a panic by nil checking the first element of `additional_capabilities` ([#24159](https://github.com/hashicorp/terraform-provider-azurerm/issues/24159)) -* `azurerm_windows_web_app_slot` - error when `service_plan_id` is identical to the parent `service_plan_id` ([#23403](https://github.com/hashicorp/terraform-provider-azurerm/issues/23403)) - -## 3.84.0 (December 07, 2023) - -FEATURES: - -* **New Data Source:** `azurerm_storage_containers` ([#24061](https://github.com/hashicorp/terraform-provider-azurerm/issues/24061)) -* **New Resource:** `azurerm_elastic_san` ([#23619](https://github.com/hashicorp/terraform-provider-azurerm/issues/23619)) -* **New Resource:** `azurerm_key_vault_managed_hardware_security_module_role_assignment` ([#22332](https://github.com/hashicorp/terraform-provider-azurerm/issues/22332)) -* **New Resource:** `azurerm_key_vault_managed_hardware_security_module_role_definition` ([#22332](https://github.com/hashicorp/terraform-provider-azurerm/issues/22332)) - -ENHANCEMENTS: - -* dependencies: updating mssql elasticpools from `v5.0` to `2023-05-01-preview` -* dependencies: updating to `v0.20231207.1122031` of `github.com/hashicorp/go-azure-sdk` ([#24149](https://github.com/hashicorp/terraform-provider-azurerm/issues/24149)) -* Data Source: `azurerm_storage_account` - export the primary and secondary internet and microsoft hostnames for blobs, dfs, files, queues, tables and web ([#23517](https://github.com/hashicorp/terraform-provider-azurerm/issues/23517)) -* Data Source: `azurerm_cosmosdb_account` - export the `connection_strings`, `primary_sql_connection_string`, `secondary_sql_connection_string`, `primary_readonly_sql_connection_string`, `secondary_readonly_sql_connection_string`, `primary_mongodb_connection_string`, `secondary_mongodb_connection_string`, `primary_readonly_mongodb_connection_string`, and `secondary_readonly_mongodb_connection_string` attributes ([#24129](https://github.com/hashicorp/terraform-provider-azurerm/issues/24129)) -* `azurerm_bot_service_azure_bot` - support for the `public_network_access_enabled` property ([#24125](https://github.com/hashicorp/terraform-provider-azurerm/issues/24125)) -* `azurerm_container_app_environment` - support for the `workload_profile` property ([#23478](https://github.com/hashicorp/terraform-provider-azurerm/issues/23478)) -* `azurerm_cosmosdb_cassandra_datacenter` - support for the `seed_node_ip_addresses` property ([#24076](https://github.com/hashicorp/terraform-provider-azurerm/issues/24076)) -* `azurerm_firewall` - support for the `dns_proxy_enabled` property ([#20519](https://github.com/hashicorp/terraform-provider-azurerm/issues/20519)) -* `azurerm_kubernetes_cluster` - support for the `support_plan` property and the `sku_tier` `Premium` ([#23970](https://github.com/hashicorp/terraform-provider-azurerm/issues/23970)) -* `azurerm_mssql_database` - support for `enclave_type` field ([#24054](https://github.com/hashicorp/terraform-provider-azurerm/issues/24054)) -* `azurerm_mssql_elasticpool` - support for `enclave_type` field ([#24054](https://github.com/hashicorp/terraform-provider-azurerm/issues/24054)) -* `azurerm_mssql_managed_instance` - support for more `vcores`: `6`, `10`, `12`, `20`, `48`, `56`, `96`, `128` ([#24085](https://github.com/hashicorp/terraform-provider-azurerm/issues/24085)) -* `azurerm_redis_linked_server` - support for the property `geo_replicated_primary_host_name` ([#23984](https://github.com/hashicorp/terraform-provider-azurerm/issues/23984)) -* `azurerm_storage_account` - expose the primary and secondary internet and microsoft hostnames for blobs, dfs, files, queues, tables and web ([#23517](https://github.com/hashicorp/terraform-provider-azurerm/issues/23517)) -* `azurerm_synapse_role_assignment` - support for the `principal_type` property ([#24089](https://github.com/hashicorp/terraform-provider-azurerm/issues/24089)) -* `azurerm_spring_cloud_build_deployment` - support for the `application_performance_monitoring_ids` property ([#23969](https://github.com/hashicorp/terraform-provider-azurerm/issues/23969)) -* `azurerm_virtual_network_gateway` - support for the `bgp_route_translation_for_nat_enabled`, `dns_forwarding_enabled`, `ip_sec_replay_protection_enabled`, `remote_vnet_traffic_enabled`, `virtual_wan_traffic_enabled`, `radius_server`, `virtual_network_gateway_client_connection`, `policy_group`, and `ipsec_policy` property ([#23220](https://github.com/hashicorp/terraform-provider-azurerm/issues/23220)) - -BUG FIXES: - -* `azurerm_application_insights_api_key` - prevent a bug where multiple keys couldn't be created for an Application Insights instance ([#23463](https://github.com/hashicorp/terraform-provider-azurerm/issues/23463)) -* `azurerm_container_registry` - the `network_rule_set.virtual_network` property has been deprecated ([#24140](https://github.com/hashicorp/terraform-provider-azurerm/issues/24140)) -* `azurerm_hdinsight_hadoop_cluster` - set `roles.edge_node.install_script_action.parameters` into state by retrieving the value provided in the user config since this property isn't returned by the API ([#23971](https://github.com/hashicorp/terraform-provider-azurerm/issues/23971)) -* `azurerm_kubernetes_cluster` - prevent a bug where maintenance window start date was always recalculated and sent to the API ([#23985](https://github.com/hashicorp/terraform-provider-azurerm/issues/23985)) -* `azurerm_mssql_database` - will no longer send all long retention values in payload unless set ([#24124](https://github.com/hashicorp/terraform-provider-azurerm/issues/24124)) -* `azurerm_mssql_managed_database` - will no longer send all long retention values in payload unless set ([#24124](https://github.com/hashicorp/terraform-provider-azurerm/issues/24124)) -* `azurerm_mssql_server_microsoft_support_auditing_policy` - only include storage endpoint in payload if set ([#24122](https://github.com/hashicorp/terraform-provider-azurerm/issues/24122)) -* `azurerm_mobile_network_packet_core_control_plane` - prevent a panic if the HTTP Response is nil ([#24083](https://github.com/hashicorp/terraform-provider-azurerm/issues/24083)) -* `azurerm_storage_account` - revert plan time name validation `(#23799)` ([#24142](https://github.com/hashicorp/terraform-provider-azurerm/issues/24142)) -* `azurerm_web_application_firewall_policy` - split create and update function to fix lifecycle - ignore changes ([#23412](https://github.com/hashicorp/terraform-provider-azurerm/issues/23412)) - -## 3.83.0 (November 30, 2023) - -UPGRADE NOTES: - -* Key Vaults are now loaded using [the `ListBySubscription` API within the Key Vault Resource Provider](https://learn.microsoft.com/en-us/rest/api/keyvault/keyvault/vaults/list-by-subscription?view=rest-keyvault-keyvault-2022-07-01&tabs=HTTP) rather than [the Resources API](https://learn.microsoft.com/en-us/rest/api/keyvault/keyvault/vaults/list?view=rest-keyvault-keyvault-2022-07-01&tabs=HTTP). This change means that the Provider now caches the list of Key Vaults available within a Subscription, rather than loading these piecemeal to workaround stale data returned from the Resources API ([#24019](https://github.com/hashicorp/terraform-provider-azurerm/issues/24019)) - -FEATURES: - -* New Data Source: `azurerm_stack_hci_cluster` ([#24032](https://github.com/hashicorp/terraform-provider-azurerm/issues/24032)) - -ENHANCEMENTS: - -* dependencies: updating to `v0.20231129.1103252` of `github.com/hashicorp/go-azure-sdk` ([#24063](https://github.com/hashicorp/terraform-provider-azurerm/issues/24063)) -* `automation`: updating to API Version `2023-11-01` ([#24017](https://github.com/hashicorp/terraform-provider-azurerm/issues/24017)) -* `keyvault`: the cache is now populated using the `ListBySubscription` endpoint on the KeyVault Resource Provider rather than via the `Resources` API ([#24019](https://github.com/hashicorp/terraform-provider-azurerm/issues/24019)). -* `keyvault`: updating the cache to populate all Key Vaults available within the Subscription to reduce the number of API calls ([#24019](https://github.com/hashicorp/terraform-provider-azurerm/issues/24019)) -* Data Source `azurerm_private_dns_zone`: refactoring to use the `ListBySubscription` API rather than the Resources API when `resource_group_name` is omitted ([#24024](https://github.com/hashicorp/terraform-provider-azurerm/issues/24024)) -* `azurerm_dashboard_grafana` - support for `grafana_major_version` ([#24014](https://github.com/hashicorp/terraform-provider-azurerm/issues/24014)) -* `azurerm_linux_web_app` - add support for dotnet 8 ([#23893](https://github.com/hashicorp/terraform-provider-azurerm/issues/23893)) -* `azurerm_linux_web_app_slot` - add support for dotnet 8 ([#23893](https://github.com/hashicorp/terraform-provider-azurerm/issues/23893)) -* `azurerm_media_transform` - deprecate `face_detector_preset` and `video_analyzer_preset` ([#24002](https://github.com/hashicorp/terraform-provider-azurerm/issues/24002)) -* `azurerm_postgresql_database` - update the validation of `collation` to include `Norwegian_Norway.1252` ([#24070](https://github.com/hashicorp/terraform-provider-azurerm/issues/24070)) -* `azurerm_postgresql_flexible_server` - updating to API Version `2023-06-01-preview` ([#24016](https://github.com/hashicorp/terraform-provider-azurerm/issues/24016)) -* `azurerm_redis_cache` - support for the `active_directory_authentication_enabled` property ([#23976](https://github.com/hashicorp/terraform-provider-azurerm/issues/23976)) -* `azurerm_windows_web_app` - add support for dotnet 8 ([#23893](https://github.com/hashicorp/terraform-provider-azurerm/issues/23893)) -* `azurerm_windows_web_app_slot` - add support for dotnet 8 ([#23893](https://github.com/hashicorp/terraform-provider-azurerm/issues/23893)) -* `azurerm_storage_account` - add `name` validation in custom diff ([#23799](https://github.com/hashicorp/terraform-provider-azurerm/issues/23799)) - -BUG FIXES: - -* authentication: fix a bug where auxiliary tenants were not correctly authorized ([#24063](https://github.com/hashicorp/terraform-provider-azurerm/issues/24063)) -* `azurerm_app_configuration` - normalize location in `replica` block ([#24074](https://github.com/hashicorp/terraform-provider-azurerm/issues/24074)) -* `azurerm_cosmosdb_account` - cosmosdb version and capabilities can now be updated at the same time ([#24029](https://github.com/hashicorp/terraform-provider-azurerm/issues/24029)) -* `azurerm_data_factory_flowlet_data_flow` - `source` and `sink` properties are now optional ([#23987](https://github.com/hashicorp/terraform-provider-azurerm/issues/23987)) -* `azurerm_datadog_monitor_tag_rule` - correctly handle default rule ([#22806](https://github.com/hashicorp/terraform-provider-azurerm/issues/22806)) -* `azurerm_ip_group`: fixing a crash when `firewall_ids` and `firewall_policy_ids` weren't parsed correctly from the API Response ([#24031](https://github.com/hashicorp/terraform-provider-azurerm/issues/24031)) -* `azurerm_nginx_deployment` - add default value of `20` for `capacity` ([#24033](https://github.com/hashicorp/terraform-provider-azurerm/issues/24033)) - -## 3.82.0 (November 23, 2023) - -FEATURES: - -* New Data Source: `azurerm_monitor_workspace` ([#23928](https://github.com/hashicorp/terraform-provider-azurerm/issues/23928)) -* New Resource: `azurerm_application_load_balancer_subnet_association` ([#23628](https://github.com/hashicorp/terraform-provider-azurerm/issues/23628)) - -ENHANCEMENTS: - -* dependencies: updating to `v0.20231117.1130141` of `github.com/hashicorp/go-azure-sdk` ([#23945](https://github.com/hashicorp/terraform-provider-azurerm/issues/23945)) -* `azurestackhci`: updating to API Version `2023-08-01` ([#23939](https://github.com/hashicorp/terraform-provider-azurerm/issues/23939)) -* `dashboard`: updating to API Version `2023-09-01` ([#23929](https://github.com/hashicorp/terraform-provider-azurerm/issues/23929)) -* `hpccache`: updating to API version `2023-05-01` ([#24005](https://github.com/hashicorp/terraform-provider-azurerm/issues/24005)) -* `mssql`: updating resources using `hashicorp/go-azure-sdk` to API Version `2023-02-01-preview` ([#23721](https://github.com/hashicorp/terraform-provider-azurerm/issues/23721)) -* `templatespecversions`: updating to API Version `2022-02-01` ([#24007](https://github.com/hashicorp/terraform-provider-azurerm/issues/24007)) -* Data Source: `azurerm_template_spec_version` - refactoring to use `hashicorp/go-azure-sdk` ([#24007](https://github.com/hashicorp/terraform-provider-azurerm/issues/24007)) -* `azurerm_cosmosdb_postgresql_cluster` - `coordinator_storage_quota_in_mb` and `coordinator_vcore_count` are no longer required for read replicas ([#23928](https://github.com/hashicorp/terraform-provider-azurerm/issues/23928)) -* `azurerm_dashboard_grafana` - `sku` can now be set to `Essential` ([#23934](https://github.com/hashicorp/terraform-provider-azurerm/issues/23934)) -* `azurerm_gallery_application_version` - add support for the `config_file`, `package_file` and `target_region.exclude_from_latest` properties ([#23816](https://github.com/hashicorp/terraform-provider-azurerm/issues/23816)) -* `azurerm_hdinsight_hadoop_cluster` - `script_actions` is no longer Force New ([#23888](https://github.com/hashicorp/terraform-provider-azurerm/issues/23888)) -* `azurerm_hdinsight_hbase_cluster` - `script_actions` is no longer Force New ([#23888](https://github.com/hashicorp/terraform-provider-azurerm/issues/23888)) -* `azurerm_hdinsight_interactive_query_cluster` - `script_actions` is no longer Force New ([#23888](https://github.com/hashicorp/terraform-provider-azurerm/issues/23888)) -* `azurerm_hdinsight_kafka_cluster` - `script_actions` is no longer Force New ([#23888](https://github.com/hashicorp/terraform-provider-azurerm/issues/23888)) -* `azurerm_hdinsight_spark_cluster` - `script_actions` is no longer Force New ([#23888](https://github.com/hashicorp/terraform-provider-azurerm/issues/23888)) -* `azurerm_kubernetes_cluster` - add support for the `gpu_instance` property ([#23887](https://github.com/hashicorp/terraform-provider-azurerm/issues/23887)) -* `azurerm_kubernetes_cluster_node_pool` - add support for the `gpu_instance` property ([#23887](https://github.com/hashicorp/terraform-provider-azurerm/issues/23887)) -* `azurerm_log_analytics_workspace` - add support for the `identity` property ([#23864](https://github.com/hashicorp/terraform-provider-azurerm/issues/23864)) -* `azurerm_linux_function_app` - add support for dotnet 8 ([#23638](https://github.com/hashicorp/terraform-provider-azurerm/issues/23638)) -* `azurerm_linux_function_app_slot` - add support for dotnet 8 ([#23638](https://github.com/hashicorp/terraform-provider-azurerm/issues/23638)) -* `azurerm_managed_lustre_file_system` - export attribute `mgs_address` ([#23942](https://github.com/hashicorp/terraform-provider-azurerm/issues/23942)) -* `azurerm_mssql_database` - support for Hyperscale SKUs ([#23974](https://github.com/hashicorp/terraform-provider-azurerm/issues/23974)) -* `azurerm_mssql_database` - refactoring to use `hashicorp/go-azure-sdk` ([#23721](https://github.com/hashicorp/terraform-provider-azurerm/issues/23721)) -* `azurerm_mssql_server` - refactoring to use `hashicorp/go-azure-sdk` ([#23721](https://github.com/hashicorp/terraform-provider-azurerm/issues/23721)) -* `azurerm_shared_image` - add support for `trusted_launch_supported` ([#23781](https://github.com/hashicorp/terraform-provider-azurerm/issues/23781)) -* `azurerm_spring_cloud_container_deployment` - add support for the `application_performance_monitoring_ids` property ([#23862](https://github.com/hashicorp/terraform-provider-azurerm/issues/23862)) -* `azurerm_spring_cloud_customized_accelerator` - add support for the `accelerator_type` and `path` properties ([#23797](https://github.com/hashicorp/terraform-provider-azurerm/issues/23797)) -* `azurerm_point_to_site_vpn_gateway` - allow multiple `connection_configurations` blocks ([#23936](https://github.com/hashicorp/terraform-provider-azurerm/issues/23936)) -* `azurerm_private_dns_cname_record` - `ttl` can now be set to 0 ([#23918](https://github.com/hashicorp/terraform-provider-azurerm/issues/23918)) -* `azurerm_windows_function_app` - add support for dotnet 8 ([#23638](https://github.com/hashicorp/terraform-provider-azurerm/issues/23638)) -* `azurerm_windows_function_app_slot` - add support for dotnet 8 ([#23638](https://github.com/hashicorp/terraform-provider-azurerm/issues/23638)) - -BUG FIXES: -* `azurerm_api_management` - correct a bug with additional location zones within the `additional_location` block ([#23943](https://github.com/hashicorp/terraform-provider-azurerm/issues/23943)) -* `azurerm_dev_test_linux_virtual_machine` - `storage_type` is now ForceNew to match the updated API behaviour ([#23973](https://github.com/hashicorp/terraform-provider-azurerm/issues/23973)) -* `azurerm_dev_test_windows_virtual_machine` - `storage_type` is now ForceNew to match the updated API behaviour ([#23973](https://github.com/hashicorp/terraform-provider-azurerm/issues/23973)) -* `azurerm_disk_encryption_set` - resource will recreate if `identity` changes from `SystemAssigned` to `UserAssigned` ([#23904](https://github.com/hashicorp/terraform-provider-azurerm/issues/23904)) -* `azurerm_eventhub_cluster`: `sku_name` is no longer ForceNew ([#24009](https://github.com/hashicorp/terraform-provider-azurerm/issues/24009)) -* `azurerm_firewall` - recasing the value for `firewall_policy_id` to workaround the API returning the incorrect casing ([#23993](https://github.com/hashicorp/terraform-provider-azurerm/issues/23993)) -* `azurerm_security_center_subscription_pricing` - fix a bug preventing removal of `extensions` and downgrading `tier` to `Free` ([#23821](https://github.com/hashicorp/terraform-provider-azurerm/issues/23821)) -* `azurerm_windows_web_app` - fix an issue of incorrect application stack settings during update ([#23372](https://github.com/hashicorp/terraform-provider-azurerm/issues/23372)) - -## 3.81.0 (November 16, 2023) - -ENHANCEMENTS: - -* dependencies: updating to `v0.20231116.1162710` of `github.com/hashicorp/go-azure-sdk` ([#23922](https://github.com/hashicorp/terraform-provider-azurerm/issues/23922)) -* `managedservices`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#23890](https://github.com/hashicorp/terraform-provider-azurerm/issues/23890)) -* `network`: updating to API Version `2023-06-01` ([#23875](https://github.com/hashicorp/terraform-provider-azurerm/issues/23875)) -* `servicelinker`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#23890](https://github.com/hashicorp/terraform-provider-azurerm/issues/23890)) -* `storage`: refactoring usages of `github.com/hashicorp/go-azure-sdk` to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#23890](https://github.com/hashicorp/terraform-provider-azurerm/issues/23890)) -* Data Source: `azurerm_network_ddos_protection_plan`: refactoring to use `hashicorp/go-azure-sdk` ([#23849](https://github.com/hashicorp/terraform-provider-azurerm/issues/23849)) -* `azurerm_linux_function_app` - add support for disabling Basic Auth for default Publishing Profile via new properties `ftp_publish_basic_authentication_enabled` and `webdeploy_publish_basic_authentication_enabled` ([#23900](https://github.com/hashicorp/terraform-provider-azurerm/issues/23900)) -* `azurerm_linux_function_app_slot` - add support for disabling Basic Auth for default Publishing Profile via new properties `ftp_publish_basic_authentication_enabled` and `webdeploy_publish_basic_authentication_enabled` ([#23900](https://github.com/hashicorp/terraform-provider-azurerm/issues/23900)) -* `azurerm_linux_web_app` - add support for disabling Basic Auth for default Publishing Profile via new properties `ftp_publish_basic_authentication_enabled` and `webdeploy_publish_basic_authentication_enabled` ([#23900](https://github.com/hashicorp/terraform-provider-azurerm/issues/23900)) -* `azurerm_linux_web_app_slot` - add support for disabling Basic Auth for default Publishing Profile via new properties `ftp_publish_basic_authentication_enabled` and `webdeploy_publish_basic_authentication_enabled` ([#23900](https://github.com/hashicorp/terraform-provider-azurerm/issues/23900)) -* `azurerm_logic_app_integration_account_certificate` - `name` now accepts underscores ([#23866](https://github.com/hashicorp/terraform-provider-azurerm/issues/23866)) -* `azurerm_logic_app_integration_account_partner` - `business_identity.value` now accepts underscores ([#23866](https://github.com/hashicorp/terraform-provider-azurerm/issues/23866)) -* `azurerm_monitor_data_collection_rule` - added support for `WorkspaceTransforms` as `kind` ([#23873](https://github.com/hashicorp/terraform-provider-azurerm/issues/23873)) -* `azurerm_network_ddos_protection_plan`: refactoring to use `hashicorp/go-azure-sdk` ([#23849](https://github.com/hashicorp/terraform-provider-azurerm/issues/23849)) -* `azurerm_windows_function_app` - add support for disabling Basic Auth for default Publishing Profile via new properties `ftp_publish_basic_authentication_enabled` and `webdeploy_publish_basic_authentication_enabled` ([#23900](https://github.com/hashicorp/terraform-provider-azurerm/issues/23900)) -* `azurerm_windows_function_app_slot` - add support for disabling Basic Auth for default Publishing Profile via new properties `ftp_publish_basic_authentication_enabled` and `webdeploy_publish_basic_authentication_enabled` ([#23900](https://github.com/hashicorp/terraform-provider-azurerm/issues/23900)) -* `azurerm_windows_web_app` - add support for disabling Basic Auth for default Publishing Profile via new properties `ftp_publish_basic_authentication_enabled` and `webdeploy_publish_basic_authentication_enabled` ([#23900](https://github.com/hashicorp/terraform-provider-azurerm/issues/23900)) -* `azurerm_windows_web_app_slot` - add support for disabling Basic Auth for default Publishing Profile via new properties `ftp_publish_basic_authentication_enabled` and `webdeploy_publish_basic_authentication_enabled` ([#23900](https://github.com/hashicorp/terraform-provider-azurerm/issues/23900)) - -## 3.80.0 (November 09, 2023) - -ENHANCEMENTS: - -* `internal/sdk` - Added support for pointer Types in resource models ([#23810](https://github.com/hashicorp/terraform-provider-azurerm/issues/23810)) -* dependencies: updating to `v0.63.0` of `github.com/hashicorp/go-azure-helpers` ([#23785](https://github.com/hashicorp/terraform-provider-azurerm/issues/23785)) -* dependencies: updating to `v0.20231106.1151347` of `github.com/hashicorp/go-azure-sdk` ([#23787](https://github.com/hashicorp/terraform-provider-azurerm/issues/23787)) -* `azurerm_cognitive_deployment` - support for the `version_upgrade_option` property ([#22520](https://github.com/hashicorp/terraform-provider-azurerm/issues/22520)) -* `azurerm_firewall_policy_rule_collection_group` - add support for the property `http_headers` ([#23641](https://github.com/hashicorp/terraform-provider-azurerm/issues/23641)) -* `azurerm_kubernetes_cluster` - `fips_enabled` can be updated in the `default_node_pool` without recreating the cluster ([#23612](https://github.com/hashicorp/terraform-provider-azurerm/issues/23612)) -* `azurerm_kusto_cluster` - the cluster `name` can now include dashes ([#23790](https://github.com/hashicorp/terraform-provider-azurerm/issues/23790)) -* `azurerm_postgresql_database` - update the validation of `collation` to include support for `French_France.1252` ([#23783](https://github.com/hashicorp/terraform-provider-azurerm/issues/23783)) - -BUG FIXES: - -* Data Source: `azurerm_data_protection_backup_vault` - removing `import` support, since Data Sources don't support being imported ([#23820](https://github.com/hashicorp/terraform-provider-azurerm/issues/23820)) -* Data Source: `azurerm_kusto_database` - removing `import` support, since Data Sources don't support being imported ([#23820](https://github.com/hashicorp/terraform-provider-azurerm/issues/23820)) -* Data Source: `azurerm_virtual_hub_route_table` - removing `import` support, since Data Sources don't support being imported ([#23820](https://github.com/hashicorp/terraform-provider-azurerm/issues/23820)) -* `azurerm_windows_web_app` - prevent a panic with the `auto_heal.actions` property ([#23836](https://github.com/hashicorp/terraform-provider-azurerm/issues/23836)) -* `azurerm_windows_web_app` - prevent a panic with the `auto_heal.triggers` property ([#23812](https://github.com/hashicorp/terraform-provider-azurerm/issues/23812)) - -## 3.79.0 (November 02, 2023) - -ENHANCEMENTS: - -* provider: log instead of error when RPs are unavailable when validating RP registrations ([#23380](https://github.com/hashicorp/terraform-provider-azurerm/issues/23380)) -* `azurerm_arc_kuberenetes_cluster_extension_resource` - the `version` and `release_train` properties can now be set simultaneously ([#23692](https://github.com/hashicorp/terraform-provider-azurerm/issues/23692)) -* `azurerm_container_apps` - support for the `ingress.exposed_port` property ([#23752](https://github.com/hashicorp/terraform-provider-azurerm/issues/23752)) -* `azurerm_cosmosdb_postgresql_cluster` - read replica clusters can be created without specifying `administrator_login_password` property ([#23750](https://github.com/hashicorp/terraform-provider-azurerm/issues/23750)) -* `azurerm_managed_application` - arrays can be supplied in the `parameter_values` property ([#23754](https://github.com/hashicorp/terraform-provider-azurerm/issues/23754)) -* `azurerm_storage_management_policy` - support for properties `rule.*.actions.*.base_blob.0.tier_to_cold_after_days_since_{modification|last_access_time|creation}_greater_than and rule.*.actions.*.{snapshot|version}.0.tier_to_cold_after_days_since_creation_greater_than` ([#23574](https://github.com/hashicorp/terraform-provider-azurerm/issues/23574)) - -BUG FIXES: - -* `azurerm_api_management_diagnostic` - the `operation_name_format` attribute will only be sent if `identifier` is set to `applicationinsights` ([#23736](https://github.com/hashicorp/terraform-provider-azurerm/issues/23736)) -* `azurerm_backup_policy_vm` - fix payload by using current datetime ([#23586](https://github.com/hashicorp/terraform-provider-azurerm/issues/23586)) -* `azurerm_kubernetes_cluster` - the `custom_ca_trust_certificates_base64` property can not be removed, only updated ([#23737](https://github.com/hashicorp/terraform-provider-azurerm/issues/23737)) - -## 3.78.0 (October 26, 2023) - -FEATURES: - -* New Resource: `azurerm_resource_management_private_link_association` ([#23546](https://github.com/hashicorp/terraform-provider-azurerm/issues/23546)) - -ENHANCEMENTS: - -* dependencies: updating to `v0.20231025.1113325` of `github.com/hashicorp/go-azure-sdk` ([#23684](https://github.com/hashicorp/terraform-provider-azurerm/issues/23684)) -* dependencies: updating to `v1.58.3` of `google.golang.org/grpc` ([#23691](https://github.com/hashicorp/terraform-provider-azurerm/issues/23691)) -* dependencies: updating search service from `2022-09-01` to `2023-11-01` ([#23698](https://github.com/hashicorp/terraform-provider-azurerm/issues/23698)) -* Data Source: `azurerm_monitor_workspace` - export `query_endpoint` ([#23629](https://github.com/hashicorp/terraform-provider-azurerm/issues/23629)) -* `azurerm_express_route_port` - support for `macsec_sci_enabled` ([#23625](https://github.com/hashicorp/terraform-provider-azurerm/issues/23625)) -* `azurerm_eventhub_namespace_customer_managed_key` - support for the `user_assigned_identity_id` property ([#23635](https://github.com/hashicorp/terraform-provider-azurerm/issues/23635)) -* `azurerm_postgresql_flexible_server` - `private_dns_zone_id` is no longer ForceNew and case is suppressed ([#23660](https://github.com/hashicorp/terraform-provider-azurerm/issues/23660)) -* `azurerm_synapse_workspace` - add support for `azuread_authentication_only` ([#23659](https://github.com/hashicorp/terraform-provider-azurerm/issues/23659)) -* `azurerm_redis_enterprise_cluster` - support for new location `Japan East` ([#23696](https://github.com/hashicorp/terraform-provider-azurerm/issues/23696)) -* `azurerm_search_service` - support for `semantic_search_sku` field ([#23698](https://github.com/hashicorp/terraform-provider-azurerm/issues/23698)) - -BUG FIXES: - -* `azurerm_palo_alto_next_generation_firewall_virtual_network_local_rulestack` - added lock for ruleStackID ([#23601](https://github.com/hashicorp/terraform-provider-azurerm/issues/23601)) -* `azurerm_cognitive_deployment` - remove forceNew tag from `rai_policy_name` ([#23697](https://github.com/hashicorp/terraform-provider-azurerm/issues/23697)) - -## 3.77.0 (October 19, 2023) - -FEATURES: - -* New Resources: `azurerm_application_load_balancer_frontend` ([#23411](https://github.com/hashicorp/terraform-provider-azurerm/issues/23411)) -* New Resources: `azurerm_dev_center` ([#23538](https://github.com/hashicorp/terraform-provider-azurerm/issues/23538)) -* New Resources: `azurerm_dev_center_project` ([#23538](https://github.com/hashicorp/terraform-provider-azurerm/issues/23538)) - -ENHANCEMENTS: - -* dependencies: updating to `v0.62.0` of `github.com/hashicorp/go-azure-helpers` ([#23581](https://github.com/hashicorp/terraform-provider-azurerm/issues/23581)) -* dependencies: updating Kusto SDK from `2023-05-02` to `2023-08-15` ([#23598](https://github.com/hashicorp/terraform-provider-azurerm/issues/23598)) -* dependencies: updating nginx from `2022-08-01` to `2023-04-01` ([#23583](https://github.com/hashicorp/terraform-provider-azurerm/issues/23583)) -* `netapp`: updating to use API Version `2023-05-01` ([#23576](https://github.com/hashicorp/terraform-provider-azurerm/issues/23576)) -* `springcloud`: updating to use API Version `2023-09-01-preview` ([#23544](https://github.com/hashicorp/terraform-provider-azurerm/issues/23544)) -* `storage`: updating to use API Version `2023-01-01` ([#23543](https://github.com/hashicorp/terraform-provider-azurerm/issues/23543)) -* `internal/sdk`: fixing an issue where struct fields containing `removedInNextMajorVersion` wouldn't be decoded correctly ([#23564](https://github.com/hashicorp/terraform-provider-azurerm/issues/23564)) -* `internal/sdk`: struct tag parsing is now handled consistently during both encoding and decoding ([#23568](https://github.com/hashicorp/terraform-provider-azurerm/issues/23568)) -* provider: the `roll_instances_when_required` provider feature in the `virtual_machine_scale_set` block is now optional ([#22976](https://github.com/hashicorp/terraform-provider-azurerm/issues/22976)) -* Data Source: `azurerm_automation_account`: refactoring the remaining usage of `Azure/azure-sdk-for-go` to use `hashicorp/go-azure-sdk` ([#23555](https://github.com/hashicorp/terraform-provider-azurerm/issues/23555)) -* `azurerm_automation_account`: refactoring the remaining usage of `Azure/azure-sdk-for-go` to use `hashicorp/go-azure-sdk` ([#23555](https://github.com/hashicorp/terraform-provider-azurerm/issues/23555)) -* `azurerm_resource_deployment_script_azure_cli` - improve validation for the `version` property to support newer versions ([#23370](https://github.com/hashicorp/terraform-provider-azurerm/issues/23370)) -* `azurerm_resource_deployment_script_azure_power_shell` - improve validation for the `version` property to support newer versions ([#23370](https://github.com/hashicorp/terraform-provider-azurerm/issues/23370)) -* `azurerm_nginx_deployment` - support for the `capacity` and `email` properties ([#23596](https://github.com/hashicorp/terraform-provider-azurerm/issues/23596)) - -BUG FIXES: - -* Data Source: `azurerm_virtual_hub_connection` - export the `inbound_route_map_id`, `outbound_route_map_id`, and `static_vnet_local_route_override_criteria` attributes in the `routing` block, and fix a bug where these attributes could not be set ([#23491](https://github.com/hashicorp/terraform-provider-azurerm/issues/23491)) -* `azurerm_cdn_frontdoor_rule` - the `url_filename_condition` properties `match_values` is now optional if `operator` is set to `Any` ([#23541](https://github.com/hashicorp/terraform-provider-azurerm/issues/23541)) -* `azurerm_shared_image_gallery` - added the `Private` and `Groups` options for the `sharing.permission` property ([#23570](https://github.com/hashicorp/terraform-provider-azurerm/issues/23570)) -* `azurerm_redis_cache` - fixed incorrect ssl values for `redis_primary_connection_string` and `secondary_connection_string` ([#23575](https://github.com/hashicorp/terraform-provider-azurerm/issues/23575)) -* `azurerm_monitor_activity_log_alert` - the `recommend_category` property now can be set to `HighAvailability` ([#23605](https://github.com/hashicorp/terraform-provider-azurerm/issues/23605)) -* `azurerm_recovery_services_vault` - the `encryption` property can now be used with the `cross_region_restore_enabled` property ([#23618](https://github.com/hashicorp/terraform-provider-azurerm/issues/23618)) -* `azurerm_storage_account_customer_managed_key` - prevent a panic when the keyvault id is empty ([#23599](https://github.com/hashicorp/terraform-provider-azurerm/issues/23599)) - -## 3.76.0 (October 12, 2023) - -FEATURES: - -* New Resource: `azurerm_security_center_storage_defender` ([#23242](https://github.com/hashicorp/terraform-provider-azurerm/issues/23242)) -* New Resource: `azurerm_spring_cloud_application_insights_application_performance_monitoring` ([#23107](https://github.com/hashicorp/terraform-provider-azurerm/issues/23107)) - -ENHANCEMENTS: - -* provider: updating to build using Go `1.21.3` ([#23514](https://github.com/hashicorp/terraform-provider-azurerm/issues/23514)) -* dependencies: updating to `v0.20231012.1141427` of `github.com/hashicorp/go-azure-sdk` ([#23534](https://github.com/hashicorp/terraform-provider-azurerm/issues/23534)) -* Data Source: `azurerm_application_gateway` - support for `backend_http_settings`, `global`, `gateway_ip_configuration` and additional attributes ([#23318](https://github.com/hashicorp/terraform-provider-azurerm/issues/23318)) -* Data Source: `azurerm_network_service_tags` - export the `name` attribute ([#23382](https://github.com/hashicorp/terraform-provider-azurerm/issues/23382)) -* `azurerm_cosmosdb_postgresql_cluster` - add support for `sql_version` of `16` and `citus_version` of `12.1` ([#23476](https://github.com/hashicorp/terraform-provider-azurerm/issues/23476)) -* `azurerm_palo_alto_local_rulestack` - correctly normalize the `location` property ([#23483](https://github.com/hashicorp/terraform-provider-azurerm/issues/23483)) -* `azurerm_static_site` - add support for `app_settings` ([#23421](https://github.com/hashicorp/terraform-provider-azurerm/issues/23421)) - -BUG FIXES: - -* `azurerm_automation_schedule` - fix a bug when updating `start_time` ([#23494](https://github.com/hashicorp/terraform-provider-azurerm/issues/23494)) -* `azurerm_eventhub` - remove ForceNew and check `partition_count` is not decreased ([#23499](https://github.com/hashicorp/terraform-provider-azurerm/issues/23499)) -* `azurerm_managed_lustre_file_system` - update validation for `storage_capacity_in_tb` according to `sku_name` in use ([#23428](https://github.com/hashicorp/terraform-provider-azurerm/issues/23428)) -* `azurerm_virtual_machine` - fix a crash when the API response for the `os_profile` block contains nil properties ([#23535](https://github.com/hashicorp/terraform-provider-azurerm/issues/23535)) - -## 3.75.0 (September 28, 2023) - -FEATURES: - -* New Resource: `azurerm_application_load_balancer` ([#22517](https://github.com/hashicorp/terraform-provider-azurerm/issues/22517)) -* New Resource: `azurerm_resource_management_private_link` ([#23098](https://github.com/hashicorp/terraform-provider-azurerm/issues/23098)) - -ENHANCEMENTS: - -* dependencies: `firewall` migrated to `hashicorp/go-azure-sdk` ([#22863](https://github.com/hashicorp/terraform-provider-azurerm/issues/22863)) -* `azurerm_bot_service_azure_bot` - add support for the `icon_url` property ([#23114](https://github.com/hashicorp/terraform-provider-azurerm/issues/23114)) -* `azurerm_cognitive_deployment` - `capacity` property is now updateable ([#23251](https://github.com/hashicorp/terraform-provider-azurerm/issues/23251)) -* `azurerm_container_group` - added support for `key_vault_user_identity_id` ([#23332](https://github.com/hashicorp/terraform-provider-azurerm/issues/23332)) -* `azurerm_data_factory` - added support for the `publish_enabled` property ([#2334](https://github.com/hashicorp/terraform-provider-azurerm/issues/2334)) -* `azurerm_firewall_policy_rule_collection_group` - add support for the `description` property ([#23354](https://github.com/hashicorp/terraform-provider-azurerm/issues/23354)) -* `azurerm_kubernetes_cluster` - `network_profile.network_policy` can be migrated to `cilium` ([#23342](https://github.com/hashicorp/terraform-provider-azurerm/issues/23342)) -* `azurerm_log_analytics_workspace` - add support for the `data_collection_rule_id` property ([#23347](https://github.com/hashicorp/terraform-provider-azurerm/issues/23347)) -* `azurerm_mysql_flexible_server` - add support for the `io_scaling_enabled` property ([#23329](https://github.com/hashicorp/terraform-provider-azurerm/issues/23329)) - -BUG FIXES: - -* `azurerm_api_management_api` - fix importing `openapi` format content file issue ([#23348](https://github.com/hashicorp/terraform-provider-azurerm/issues/23348)) -* `azurerm_cdn_frontdoor_rule` - allow a `cache_duration` of `00:00:00` ([#23384](https://github.com/hashicorp/terraform-provider-azurerm/issues/23384)) -* `azurerm_cosmosdb_cassandra_datacenter` - `sku_name` is now updatable ([#23419](https://github.com/hashicorp/terraform-provider-azurerm/issues/23419)) -* `azurerm_key_vault_certificate` - fix a bug that prevented soft-deleted certificates from being recovered ([#23204](https://github.com/hashicorp/terraform-provider-azurerm/issues/23204)) -* `azurerm_log_analytics_solution` - fix create and update lifecycle of resource by splitting methods ([#23333](https://github.com/hashicorp/terraform-provider-azurerm/issues/23333)) -* `azurerm_management_group_subscription_association` - mark resource as gone correctly if not found when retrieving ([#23335](https://github.com/hashicorp/terraform-provider-azurerm/issues/23335)) -* `azurerm_management_lock` - add polling after create and delete to check for RP propagation ([#23345](https://github.com/hashicorp/terraform-provider-azurerm/issues/23345)) -* `azurerm_monitor_diagnostic_setting` - added validation to ensure at least one of `category` or `category_group` is supplied ([#23308](https://github.com/hashicorp/terraform-provider-azurerm/issues/23308)) -* `azurerm_palo_alto_local_rulestack_prefix_list` - fix rulestack not being committed on delete ([#23362](https://github.com/hashicorp/terraform-provider-azurerm/issues/23362)) -* `azurerm_palo_alto_local_rulestack_fqdn_list` - fix rulestack not being committed on delete ([#23362](https://github.com/hashicorp/terraform-provider-azurerm/issues/23362)) -* `security_center_subscription_pricing_resource` - disabled extensions logic now works as expected ([#22997](https://github.com/hashicorp/terraform-provider-azurerm/issues/22997)) - - -## 3.74.0 (September 21, 2023) +## 4.0.0 (August 22, 2024) NOTES: -* `azurerm_synapse_sql_pool` - users that have imported `azurerm_synapse_sql_pool` resources that were created outside of Terraform using an `LRS` storage account type will need to use `ignore_changes` to avoid the resource from being destroyed and recreated. - -FEATURES: - -* **New Resource**: `azurerm_arc_resource_bridge_appliance` ([#23108](https://github.com/hashicorp/terraform-provider-azurerm/issues/23108)) -* **New Resource**: `azurerm_data_factory_dataset_azure_sql_table` ([#23264](https://github.com/hashicorp/terraform-provider-azurerm/issues/23264)) -* **New Resource**: `azurerm_function_app_connection` ([#23127](https://github.com/hashicorp/terraform-provider-azurerm/issues/23127)) - -ENHANCEMENTS: - -* dependencies: updating to `v0.20230918.1115907` of `github.com/hashicorp/go-azure-sdk` ([#23337](https://github.com/hashicorp/terraform-provider-azurerm/issues/23337)) -* dependencies: downgrading to `v1.12.5` of `github.com/rickb777/date` ([#23296](https://github.com/hashicorp/terraform-provider-azurerm/issues/23296)) -* `mysql`: updating to use API Version `2022-01-01` ([#23320](https://github.com/hashicorp/terraform-provider-azurerm/issues/23320)) -* `azurerm_app_configuration` - support for the `replica` block ([#22452](https://github.com/hashicorp/terraform-provider-azurerm/issues/22452)) -* `azurerm_bot_channel_directline` - support for `user_upload_enabled`, `endpoint_parameters_enabled`, and `storage_enabled` ([#23149](https://github.com/hashicorp/terraform-provider-azurerm/issues/23149)) -* `azurerm_container_app` - support for scale rules ([#23294](https://github.com/hashicorp/terraform-provider-azurerm/issues/23294)) -* `azurerm_container_app_environment` - support for zone redundancy ([#23313](https://github.com/hashicorp/terraform-provider-azurerm/issues/23313)) -* `azurerm_container_group` - support for the `key_vault_user_identity_id` property for Customer Managed Keys ([#23332](https://github.com/hashicorp/terraform-provider-azurerm/issues/23332)) -* `azurerm_cosmosdb_account` - support for MongoDB connection strings ([#23331](https://github.com/hashicorp/terraform-provider-azurerm/issues/23331)) -* `azurerm_data_factory_dataset_delimited_text` - support for the `dynamic_file_system_enabled`, `dynamic_path_enabled`, and `dynamic_filename_enabled` properties ([#23261](https://github.com/hashicorp/terraform-provider-azurerm/issues/23261)) -* `azurerm_data_factory_dataset_parquet` - support for the `azure_blob_fs_location` block ([#23261](https://github.com/hashicorp/terraform-provider-azurerm/issues/23261)) -* `azurerm_monitor_diagnostic_setting` - validation to ensure either `category` or `category_group` are supplied in `enabled_log` and `log` blocks ([#23308](https://github.com/hashicorp/terraform-provider-azurerm/issues/23308)) -* `azurerm_network_interface` - support for the `auxiliary_mode` and `auxiliary_sku` properties ([#22979](https://github.com/hashicorp/terraform-provider-azurerm/issues/22979)) -* `azurerm_postgresql_flexible_server` - increased the maximum supported value for `storage_mb` ([#23277](https://github.com/hashicorp/terraform-provider-azurerm/issues/23277)) -* `azurerm_shared_image_version` - support for the `replicated_region_deletion_enabled` and `target_region.exclude_from_latest_enabled` properties ([#23147](https://github.com/hashicorp/terraform-provider-azurerm/issues/23147)) -* `azurerm_storage_account` - support for setting `domain_name` and `domain_guid` for `AADKERB` ([#22833](https://github.com/hashicorp/terraform-provider-azurerm/issues/22833)) -* `azurerm_storage_account_customer_managed_key` - support for cross-tenant customer-managed keys with the `federated_identity_client_id`, and `key_vault_uri` properties ([#20356](https://github.com/hashicorp/terraform-provider-azurerm/issues/20356)) -* `azurerm_web_application_firewall_policy` - support for the `rate_limit_duration`, `rate_limit_threshold`, `group_rate_limit_by`, and `request_body_inspect_limit_in_kb` properties ([#23239](https://github.com/hashicorp/terraform-provider-azurerm/issues/23239)) - -BUG FIXES: - -* Data Source: `azurerm_container_app_environment`: fix `log_analytics_workspace_name` output to correct value ([#23298](https://github.com/hashicorp/terraform-provider-azurerm/issues/23298)) -* `azurerm_api_management_api` - set the `service_url` property when importing the resource ([#23011](https://github.com/hashicorp/terraform-provider-azurerm/issues/23011)) -* `azurerm_app_configuration` - prevent crash by nil checking the encryption configuration ([#23302](https://github.com/hashicorp/terraform-provider-azurerm/issues/23302)) -* `azurerm_app_configuration_feature` - update `percentage_filter_value` to accept correct type of float ([#23263](https://github.com/hashicorp/terraform-provider-azurerm/issues/23263)) -* `azurerm_container_app` - fix an issue with `commands` and `args` being overwritten when using multiple containers ([#23338](https://github.com/hashicorp/terraform-provider-azurerm/issues/23338)) -* `azurerm_key_vault_certificate` - fix issue where certificates couldn't be recovered anymore ([#23204](https://github.com/hashicorp/terraform-provider-azurerm/issues/23204)) -* `azurerm_key_vault_key` - the ForceNew when `expiration_date` is removed from the config file ([#23327](https://github.com/hashicorp/terraform-provider-azurerm/issues/23327)) -* `azurerm_linux_function_app` - fix a bug in setting the storage settings when using Elastic Premium plans ([#21212](https://github.com/hashicorp/terraform-provider-azurerm/issues/21212)) -* `azurerm_linux_web_app` - fix docker app stack update ([#23303](https://github.com/hashicorp/terraform-provider-azurerm/issues/23303)) -* `azurerm_linux_web_app` - fix crash in auto heal expansion ([#21328](https://github.com/hashicorp/terraform-provider-azurerm/issues/21328)) -* `azurerm_linux_web_app_slot` - fix docker app stack update ([#23303](https://github.com/hashicorp/terraform-provider-azurerm/issues/23303)) -* `azurerm_linux_web_app_slot` - fix crash in auto heal expansion ([#21328](https://github.com/hashicorp/terraform-provider-azurerm/issues/21328)) -* `azurerm_log_analytics_solution` - fix bug where the resource wasn't handling successful creation on subsequent applies ([#23312](https://github.com/hashicorp/terraform-provider-azurerm/issues/23312)) -* `azurerm_management_group_subscription_association` - fix bug to correctly mark resource as gone if not found during read ([#23335](https://github.com/hashicorp/terraform-provider-azurerm/issues/23335)) -* `azurerm_mssql_elasticpool` - remove check that prevents `license_type` from being set for certain skus ([#23262](https://github.com/hashicorp/terraform-provider-azurerm/issues/23262)) -* `azurerm_servicebus_queue` - fixing an issue where `auto_delete_on_idle` couldn't be set to `P10675199DT2H48M5.4775807S` ([#23296](https://github.com/hashicorp/terraform-provider-azurerm/issues/23296)) -* `azurerm_servicebus_topic` - fixing an issue where `auto_delete_on_idle` couldn't be set to `P10675199DT2H48M5.4775807S` ([#23296](https://github.com/hashicorp/terraform-provider-azurerm/issues/23296)) -* `azurerm_storage_account` - prevent sending unsupported blob properties in payload for `Storage` account kind ([#23288](https://github.com/hashicorp/terraform-provider-azurerm/issues/23288)) -* `azurerm_synapse_sql_pool` - expose `storage_account_type` ([#23217](https://github.com/hashicorp/terraform-provider-azurerm/issues/23217)) -* `azurerm_windows_function_app` - fix a bug in setting the storage settings when using Elastic Premium plans ([#21212](https://github.com/hashicorp/terraform-provider-azurerm/issues/21212)) -* `azurerm_windows_web_app` - fix docker app stack update ([#23303](https://github.com/hashicorp/terraform-provider-azurerm/issues/23303)) -* `azurerm_windows_web_app_slot` - fix docker app stack update ([#23303](https://github.com/hashicorp/terraform-provider-azurerm/issues/23303)) - -DEPRECATIONS: - -* `azurerm_application_gateway` - deprecate `Standard` and `WAF` skus ([#23310](https://github.com/hashicorp/terraform-provider-azurerm/issues/23310)) -* `azurerm_bot_channel_web_chat` - deprecate `site_names` in favour of `site` block ([#23161](https://github.com/hashicorp/terraform-provider-azurerm/issues/23161)) -* `azurerm_monitor_diagnostic_setting` - deprecate `retention_policy` in favour of `azurerm_storage_management_policy` ([#23260](https://github.com/hashicorp/terraform-provider-azurerm/issues/23260)) - -## 3.73.0 (September 14, 2023) - -FEATURES: - -* **New Resource**: `azurerm_iothub_endpoint_cosmosdb_account` ([#23065](https://github.com/hashicorp/terraform-provider-azurerm/issues/23065)) -* **New Resource**: `azurerm_virtual_hub_routing_intent` ([#23138](https://github.com/hashicorp/terraform-provider-azurerm/issues/23138)) - -ENHANCEMENTS: - -* dependencies: updating to `v0.1.1` of `github.com/btubbs/datetime` ([#23221](https://github.com/hashicorp/terraform-provider-azurerm/issues/23221)) -* dependencies: updating to `v1.3.1` of `github.com/google/uuid` ([#23221](https://github.com/hashicorp/terraform-provider-azurerm/issues/23221)) -* dependencies: updating to `v0.61.0` of `github.com/hashicorp/go-azure-helpers` ([#23249](https://github.com/hashicorp/terraform-provider-azurerm/issues/23249)) -* dependencies: updating to `v0.20230907.1113401` of `github.com/hashicorp/go-azure-sdk` ([#23221](https://github.com/hashicorp/terraform-provider-azurerm/issues/23221)) -* dependencies: updating to `v1.5.0` of `github.com/hashicorp/go-hclog` ([#23221](https://github.com/hashicorp/terraform-provider-azurerm/issues/23221)) -* dependencies: updating to `v2.29.0` of `github.com/hashicorp/terraform-plugin-sdk/v2` ([#23221](https://github.com/hashicorp/terraform-provider-azurerm/issues/23221)) -* dependencies: updating to `v1.5.1` of `github.com/hashicorp/terraform-plugin-testing` ([#23221](https://github.com/hashicorp/terraform-provider-azurerm/issues/23221)) -* dependencies: updating to `v1.20.2` of `github.com/rickb777/date` ([#23221](https://github.com/hashicorp/terraform-provider-azurerm/issues/23221)) -* dependencies: updating to `v0.13.0` of `golang.org/x/crypto` ([#23221](https://github.com/hashicorp/terraform-provider-azurerm/issues/23221)) -* dependencies: updating to `v0.15.0` of `golang.org/x/net` ([#23221](https://github.com/hashicorp/terraform-provider-azurerm/issues/23221)) -* dependencies: updating to `v0.13.0` of `golang.org/x/tools` ([#23221](https://github.com/hashicorp/terraform-provider-azurerm/issues/23221)) -* `azurerm_bot_channel_ms_teams` - support for `deployment_environment` ([#23122](https://github.com/hashicorp/terraform-provider-azurerm/issues/23122)) -* `azurerm_managed_disk` - updating to use API Version `2023-04-02` ([#23233](https://github.com/hashicorp/terraform-provider-azurerm/issues/23233)) -* `azurerm_managed_disk` - support for `optimized_frequent_attach_enabled` ([#23241](https://github.com/hashicorp/terraform-provider-azurerm/issues/23241)) -* `azurerm_managed_disk` - support for `performance_plus_enabled` ([#23241](https://github.com/hashicorp/terraform-provider-azurerm/issues/23241)) -* `azurerm_maps_account` - support for `local_authentication_enabled` ([#23216](https://github.com/hashicorp/terraform-provider-azurerm/issues/23216)) -* `azurerm_mssql_elasticpool` - support for configuring `license_type` when using the `Hyperscale` sku ([#23256](https://github.com/hashicorp/terraform-provider-azurerm/issues/23256)) -* `azurerm_security_center_assessment_policy` - refactoring to use `hashicorp/go-azure-sdk` ([#23158](https://github.com/hashicorp/terraform-provider-azurerm/issues/23158)) - -BUG FIXES: - -* `azurerm_api_management` - split create and update methods ([#23259](https://github.com/hashicorp/terraform-provider-azurerm/issues/23259)) -* `azurerm_api_management_backend` - fixing a panic when flattening the `credentials` block ([#23219](https://github.com/hashicorp/terraform-provider-azurerm/issues/23219)) -* `azurerm_key_vault_certificate` - fixing a regression where certificates from a custom/unknown issuer would be polled indefinitely ([#23214](https://github.com/hashicorp/terraform-provider-azurerm/issues/23214)) -* `azurerm_redis_cache` - prevent sending `redis_configuration.aof_backup_enabled` when the sku is not `Premium` to avoid API error ([#22774](https://github.com/hashicorp/terraform-provider-azurerm/issues/22774)) -* `azurerm_web_application_firewall_policy` - capture and toggle state of `custom_rule` blocks with an `enabled` field ([#23163](https://github.com/hashicorp/terraform-provider-azurerm/issues/23163)) - -## 3.72.0 (September 07, 2023) - -FEATURES: - -* Provider Feature: subscription cancellation on `destroy` can now be disabled via the provider `features` block ([#19936](https://github.com/hashicorp/terraform-provider-azurerm/issues/19936)) -* **New Data Source**: `netapp_volume_quota_rule` ([#23042](https://github.com/hashicorp/terraform-provider-azurerm/issues/23042)) -* **New Resource**: `azurerm_automation_python3_package` ([#23087](https://github.com/hashicorp/terraform-provider-azurerm/issues/23087)) -* **New Resource**: `netapp_volume_quota_rule` ([#23042](https://github.com/hashicorp/terraform-provider-azurerm/issues/23042)) - -ENHANCEMENTS: - -* dependencies: updating to `v0.20230906.1160501` of `github.com/hashicorp/go-azure-sdk` ([#23191](https://github.com/hashicorp/terraform-provider-azurerm/issues/23191)) -* `containerapps`: updating to API Version `2023-05-01` ([#22804](https://github.com/hashicorp/terraform-provider-azurerm/issues/22804)) -* `keyvault`: upgrade remaining resources to `2023-02-01` ([#23089](https://github.com/hashicorp/terraform-provider-azurerm/issues/23089)) -* `redisenterprise`: updating to API Version `2023-07-01` ([#23178](https://github.com/hashicorp/terraform-provider-azurerm/issues/23178)) -* `vpngateway`: updating to use `hashicorp/go-azure-sdk` ([#22906](https://github.com/hashicorp/terraform-provider-azurerm/issues/22906)) -* `internal/sdk`: typed resources using a custom importer now get a timed context ([#23160](https://github.com/hashicorp/terraform-provider-azurerm/issues/23160)) -* `azurerm_batch_pool` - support for `accelerated_networking_enabled` ([#23021](https://github.com/hashicorp/terraform-provider-azurerm/issues/23021)) -* `azurerm_batch_pool` - support for `automatic_upgrade_enabled` ([#23021](https://github.com/hashicorp/terraform-provider-azurerm/issues/23021)) -* `azurerm_bot_channel_direct_line_speech` - support for the `cognitive_account_id` property ([#23106](https://github.com/hashicorp/terraform-provider-azurerm/issues/23106)) -* `azurerm_bot_service_azure_bot` - support for the `local_authentication_enabled` property ([#23096](https://github.com/hashicorp/terraform-provider-azurerm/issues/23096)) -* `azurerm_container_app_environment` - support for the `dapr_application_insights_connection_string` ([#23080](https://github.com/hashicorp/terraform-provider-azurerm/issues/23080)) -* `azurerm_cosmosdb_cassandra_datacenter` - refactoring to use `hashicorp/go-azure-sdk` ([#23110](https://github.com/hashicorp/terraform-provider-azurerm/issues/23110)) -* `azurerm_cosmosdb_cassandra_datacenter` - updating to API Version `2023-04-15` ([#23110](https://github.com/hashicorp/terraform-provider-azurerm/issues/23110)) -* `azurerm_kubernetes_cluster` - Azure CNI can be updated to use `overlay` ([#22709](https://github.com/hashicorp/terraform-provider-azurerm/issues/22709)) -* `azurerm_monitor_diagnostic_setting` - deprecating `retention_policy` within `enabled_log` ([#23029](https://github.com/hashicorp/terraform-provider-azurerm/issues/23029)) -* `azurerm_mssql_database` - split create and update methods ([#23209](https://github.com/hashicorp/terraform-provider-azurerm/issues/23209)) -* `azurerm_postgresql_database` - `collation` can now be set to `English_United Kingdom.1252` ([#23171](https://github.com/hashicorp/terraform-provider-azurerm/issues/23171)) -* `azurerm_postgresql_flexible_database` - `collation` can now be set to `English_United Kingdom.1252` ([#23171](https://github.com/hashicorp/terraform-provider-azurerm/issues/23171)) -* `azurerm_postgresql_flexible_server` - support for the `auto_grow_enabled` property ([#23069](https://github.com/hashicorp/terraform-provider-azurerm/issues/23069)) -* `azurerm_redis_enterprise_cluster` - support for Flash clusters in Brazil South ([#23200](https://github.com/hashicorp/terraform-provider-azurerm/issues/23200)) -* `azurerm_resource_provider_registration` - refactoring to use `hashicorp/go-azure-sdk` ([#23072](https://github.com/hashicorp/terraform-provider-azurerm/issues/23072)) -* `azurerm_virtual_machine_extension` - support for `provision_after_extensions` ([#23124](https://github.com/hashicorp/terraform-provider-azurerm/issues/23124)) -* `azurerm_virtual_network_gateway` - increasing the default timeout for create to `90m` ([#23003](https://github.com/hashicorp/terraform-provider-azurerm/issues/23003)) -* `azurerm_virtual_hub_connection` - support for `inbound_route_map_id`, `outbound_route_map_id`, and `static_vnet_local_route_override_criteria` properties ([#23049](https://github.com/hashicorp/terraform-provider-azurerm/issues/23049)) - -BUG FIXES: - -* `azurerm_api_management_api_policy` - added state migration to mutate id's ending in `policies/policy` ([#23128](https://github.com/hashicorp/terraform-provider-azurerm/issues/23128)) -* `azurerm_api_management_api_operation_policy` - added state migration to mutate id's ending in `policies/policy` ([#23128](https://github.com/hashicorp/terraform-provider-azurerm/issues/23128)) -* `azurerm_api_management_product_policy` - added state migration to mutate id's ending in `policies/policy` ([#23128](https://github.com/hashicorp/terraform-provider-azurerm/issues/23128)) -* `azurerm_automation_account` - fixes logic for `local_authentication_enabled` ([#23082](https://github.com/hashicorp/terraform-provider-azurerm/issues/23082)) -* `azurerm_key_vault_managed_storage_account` - check id can be parsed correctly before setting it in state ([#23022](https://github.com/hashicorp/terraform-provider-azurerm/issues/23022)) -* `azurerm_monitor_diagnostic_setting` - fix `enabled_log` feature flagged schema ([#23093](https://github.com/hashicorp/terraform-provider-azurerm/issues/23093)) -* `azurerm_pim_active_role_assignment`: polling for the duration of the timeout, rather than a fixed 5 minute value ([#22932](https://github.com/hashicorp/terraform-provider-azurerm/issues/22932)) -* `azurerm_policy_set_definition` - only sending `parameters` when a value is configured ([#23155](https://github.com/hashicorp/terraform-provider-azurerm/issues/23155)) -* `azurerm_synapse_workspace` - fixes index out-of-range panic when parsing `storage_data_lake_gen2_filesystem_id` ([#23019](https://github.com/hashicorp/terraform-provider-azurerm/issues/23019)) -* `machine_learning_datastore_*` - fixes container ids ([#23140](https://github.com/hashicorp/terraform-provider-azurerm/issues/23140)) -* `azurerm_key_vault_certificate` - id now points to new version when certificate is updated ([#23135](https://github.com/hashicorp/terraform-provider-azurerm/issues/23135)) -* `azurerm_site_recovery_replicated_vm` - update `network_interface` diff so replicated items now can be updated ([#23199](https://github.com/hashicorp/terraform-provider-azurerm/issues/23199)) - -DEPRECATION: - -* Data Source: `azure_monitor_log_profile` - Azure is retiring Azure Log Profiles on the 30th of September 2026 ([#23146](https://github.com/hashicorp/terraform-provider-azurerm/issues/23146)) -* `azure_monitor_log_profile` - Azure is retiring Azure Log Profiles on the 30th of September 2026 ([#23146](https://github.com/hashicorp/terraform-provider-azurerm/issues/23146)) - -## 3.71.0 (August 24, 2023) - -BREAKING CHANGES: - -* **App Service `win32_status` property** - Due to a change made in the service to the underlying type of the Auto Heal property `win32_status` combined with a prior bug (in `v3.62.1` and earlier) causing the value of this property to be stored incorrectly in state as an empty string, the value of this property could not be updated or state migrated to accommodate the necessary type change in the state. This results in the resources named above returning an error of a number is needed when decoding the state for this value. Unfortunately, this is a breaking change and will require users of this field to change their Terraform Configuration. The field `win32_status` has been replaced by `win32_status_code` (this remains an int, as in 3.63.0 onwards) for `azurerm_linux_web_app`, `azurerm_linux_web_app_slot`, `azurerm_windows_web_app`, `azurerm_windows_web_app_slot resources`. ([#23075](https://github.com/hashicorp/terraform-provider-azurerm/issues/23075)) - -FEATURES: - -* **New Resource**: `azurerm_databricks_workspace_root_dbfs_customer_managed_key` ([#22579](https://github.com/hashicorp/terraform-provider-azurerm/issues/22579)) - -ENHANCEMENTS: - -* dependencies: updating to `v0.20230824.1130652` of `github.com/hashicorp/go-azure-sdk` ([#23076](https://github.com/hashicorp/terraform-provider-azurerm/issues/23076)) -* `trafficmanager`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#22579](https://github.com/hashicorp/terraform-provider-azurerm/issues/22579)) -* `webpubsub`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#22579](https://github.com/hashicorp/terraform-provider-azurerm/issues/22579)) -* `automation`: upgrade remaining resources to `2022-08-08` ([#22989](https://github.com/hashicorp/terraform-provider-azurerm/issues/22989)) -* `azurerm_storage_management_policy` - move to `hashicorp/go-azure-sdk` ([#23035](https://github.com/hashicorp/terraform-provider-azurerm/issues/23035)) -* Data Source: `azurerm_disk_encryption_set` - support for the `identity` block ([#23005](https://github.com/hashicorp/terraform-provider-azurerm/issues/23005)) -* `azurerm_container_group` - support for the `sku` and `(init_)container.*.security` properties ([#23034](https://github.com/hashicorp/terraform-provider-azurerm/issues/23034)) -* `azurerm_kubernetes_cluster` - extend allowed ranges for various `sysctl_config` attribute ranges ([#23077](https://github.com/hashicorp/terraform-provider-azurerm/issues/23077)) -* `azurerm_kubernetes_cluster_node_pool` - extend allowed ranges for various `sysctl_config` attribute ranges ([#23077](https://github.com/hashicorp/terraform-provider-azurerm/issues/23077)) -* `azurerm_kubernetes_cluster` - clusters can be updated to use the `cilium` dataplane by setting the value in `ebpf_data_plane` ([#22952](https://github.com/hashicorp/terraform-provider-azurerm/issues/22952)) -* `azurerm_linux_virtual_machine_scale_set` - cancel rolling upgrades that are in progress before destroying the resource ([#22991](https://github.com/hashicorp/terraform-provider-azurerm/issues/22991)) -* `azurerm_servicebus_namespace` - support for `network_rule_set` block ([#23057](https://github.com/hashicorp/terraform-provider-azurerm/issues/23057)) -* `azurerm_windows_virtual_machine_scale_set` - cancel rolling upgrades that are in progress before destroying the resource ([#22991](https://github.com/hashicorp/terraform-provider-azurerm/issues/22991)) -* `azurerm_synapse_spark_pool` - support addtional values for the `node_size_family` property ([#23040](https://github.com/hashicorp/terraform-provider-azurerm/issues/23040)) - -BUG FIXES: - -* `azurerm_api_management_policy` - fixes an error caused by a migration ([#23018](https://github.com/hashicorp/terraform-provider-azurerm/issues/23018)) -* `azurerm_kubernetes_cluster` - deprecate `public_network_access_enabled` and prevent sending it to the API since it isn't functional ([#22478](https://github.com/hashicorp/terraform-provider-azurerm/issues/22478)) - -## 3.70.0 (August 17, 2023) - -FEATURES: - -* **New Resource**: `azurerm_mssql_virtual_machine_availability_group_listener` ([#22808](https://github.com/hashicorp/terraform-provider-azurerm/issues/22808)) -* **New Resource**: `azurerm_mssql_virtual_machine_group` ([#22808](https://github.com/hashicorp/terraform-provider-azurerm/issues/22808)) +* **Major Version**: Version 4.0 of the Azure Provider is a major version - some behaviours have changed and some deprecated fields/resources have been removed - please refer to [the 4.0 upgrade guide for more information](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/4.0-upgrade-guide). +* When upgrading to v4.0 of the AzureRM Provider, we recommend upgrading to the latest version of Terraform Core ([which can be found here](https://www.terraform.io/downloads)). ENHANCEMENTS: -* dependencies: updating to `v0.20230815.1165905` of `github.com/hashicorp/go-azure-sdk` ([#22981](https://github.com/hashicorp/terraform-provider-azurerm/issues/22981)) -* `apimanagement`: updating to use `hashicorp/go-azure-sdk` ([#22783](https://github.com/hashicorp/terraform-provider-azurerm/issues/22783)) -* `cosmos`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#22874](https://github.com/hashicorp/terraform-provider-azurerm/issues/22874)) -* `devtestlabs`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#22981](https://github.com/hashicorp/terraform-provider-azurerm/issues/22981)) -* `policy`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#22874](https://github.com/hashicorp/terraform-provider-azurerm/issues/22874)) -* `postgresql`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#22874](https://github.com/hashicorp/terraform-provider-azurerm/issues/22874)) -* `recoveryservices`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#22874](https://github.com/hashicorp/terraform-provider-azurerm/issues/22874)) -* `resources`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#22874](https://github.com/hashicorp/terraform-provider-azurerm/issues/22874)) -* `storage`: updating Storage Account and Storage Blob Container to use Common IDs to enable migrating to `hashicorp/go-azure-sdk` in the future ([#22915](https://github.com/hashicorp/terraform-provider-azurerm/issues/22915)) -* Data Source: `azurerm_kubernetes_cluster` - add support for the `current_kubernetes_version` property ([#22986](https://github.com/hashicorp/terraform-provider-azurerm/issues/22986)) -* `azurerm_mssql_virtual_machine` - add support for the `sql_virtual_machine_group_id` and `wsfc_domain_credential` properties ([#22808](https://github.com/hashicorp/terraform-provider-azurerm/issues/22808)) -* `azurerm_netapp_pool` - `size_in_tb` can be sized down to 2 TB ([#22943](https://github.com/hashicorp/terraform-provider-azurerm/issues/22943)) -* `azurerm_stack_hci_cluster` - add support for the `automanage_configuration_id` property ([#22857](https://github.com/hashicorp/terraform-provider-azurerm/issues/22857)) -* Data Source: `azurerm_disk_encryption_set` - now exports `key_vault_key_url` ([#22893](https://github.com/hashicorp/terraform-provider-azurerm/issues/22893)) -* `azurerm_disk_encryption_set` - now exports `key_vault_key_url` ([#22893](https://github.com/hashicorp/terraform-provider-azurerm/issues/22893)) +* Data Source: `azurerm_shared_image` - add support for the `trusted_launch_supported`, `trusted_launch_enabled`, `confidential_vm_supported`, `confidential_vm_enabled`, `accelerated_network_support_enabled` and `hibernation_enabled` properties ([#26975](https://github.com/hashicorp/terraform-provider-azurerm/issues/26975)) +* dependencies: updating `hashicorp/go-azure-sdk` to `v0.20240819.1075239` ([#27107](https://github.com/hashicorp/terraform-provider-azurerm/issues/27107)) +* `applicationgateways` - updating to use `2023-11-01` ([#26776](https://github.com/hashicorp/terraform-provider-azurerm/issues/26776)) +* `containerregistry` - updating to use `2023-06-01-preview` ([#23393](https://github.com/hashicorp/terraform-provider-azurerm/issues/23393)) +* `containerservice` - updating to `2024-05-01` ([#27105](https://github.com/hashicorp/terraform-provider-azurerm/issues/27105)) +* `mssql` - updating to use `hashicorp/go-azure-sdk` and `023-08-01-preview` ([#27073](https://github.com/hashicorp/terraform-provider-azurerm/issues/27073)) +* `mssqlmanagedinstance` - updating to use `hashicorp/go-azure-sdk` and `2023-08-01-preview` ([#26872](https://github.com/hashicorp/terraform-provider-azurerm/issues/26872)) +* `azurerm_image` - add support for the `disk_encryption_set_id` property to the `data_disk` block ([#27015](https://github.com/hashicorp/terraform-provider-azurerm/issues/27015)) +* `azurerm_log_analytics_workspace_table` - add support for more `total_retention_in_days` and `retention_in_days` values ([#27053](https://github.com/hashicorp/terraform-provider-azurerm/issues/27053)) +* `azurerm_mssql_elasticpool` - add support for the `HS_MOPRMS` and `MOPRMS` skus ([#27085](https://github.com/hashicorp/terraform-provider-azurerm/issues/27085)) +* `azurerm_netapp_pool` - allow `1` as a valid value for `size_in_tb` ([#27095](https://github.com/hashicorp/terraform-provider-azurerm/issues/27095)) +* `azurerm_notification_hub` - add support for the `browser_credential` property ([#27058](https://github.com/hashicorp/terraform-provider-azurerm/issues/27058)) +* `azurerm_redis_cache` - add support for the `access_keys_authentication_enabled` property ([#27039](https://github.com/hashicorp/terraform-provider-azurerm/issues/27039)) +* `azurerm_role_assignment` - add support for the `/`, `/providers/Microsoft.Capacity` and `/providers/Microsoft.BillingBenefits` scopes ([#26663](https://github.com/hashicorp/terraform-provider-azurerm/issues/26663)) +* `azurerm_shared_image` - add support for the `hibernation_enabled` property ([#26975](https://github.com/hashicorp/terraform-provider-azurerm/issues/26975)) +* `azurerm_storage_account` - support `queue_encryption_key_type` and `table_encryption_key_type` for more storage account kinds ([#27112](https://github.com/hashicorp/terraform-provider-azurerm/issues/27112)) +* `azurerm_web_application_firewall_policy` - add support for the `request_body_enforcement` property ([#27094](https://github.com/hashicorp/terraform-provider-azurerm/issues/27094)) BUG FIXES: -* `azurerm_cognitive_deployment` - add lock on parent resource to prevent errors when deleting the resource ([#22940](https://github.com/hashicorp/terraform-provider-azurerm/issues/22940)) -* `azurerm_cost_management_scheduled_action` - fix update for `email_address_sender` ([#22930](https://github.com/hashicorp/terraform-provider-azurerm/issues/22930)) -* `azurerm_disk_encryption_set` - now correctly supports key rotation by specifying a versionless Key ID when setting `auto_key_rotation_enabled` to `true` ([#22893](https://github.com/hashicorp/terraform-provider-azurerm/issues/22893)) -* `azurerm_iothub_dps` - updating the validation for `target` within the `ip_filter_rule` block to match the values defined in the Azure API Definitions ([#22891](https://github.com/hashicorp/terraform-provider-azurerm/issues/22891)) -* `azurerm_postgresql_database` - reworking the validation for database collation ([#22928](https://github.com/hashicorp/terraform-provider-azurerm/issues/22928)) -* `azurerm_postgresql_flexible_database` - reworking the validation for database collation ([#22928](https://github.com/hashicorp/terraform-provider-azurerm/issues/22928)) -* `azurerm_storage_management_policy` - check for an existing resource to prevent overwriting property values ([#22966](https://github.com/hashicorp/terraform-provider-azurerm/issues/22966)) -* `azurerm_virtual_network_gateway_connection` - `custom_bgp_addresses.secondary` is now `Optional` rather than `Required` ([#22912](https://github.com/hashicorp/terraform-provider-azurerm/issues/22912)) -* `azurerm_web_application_firewall_policy` - fix handling not found in read ([#22982](https://github.com/hashicorp/terraform-provider-azurerm/issues/22982)) +* `azurerm_ip_group_cidr` - fixed the position of the CIDR check to correctly refresh the resource when it's no longer present ([#27103](https://github.com/hashicorp/terraform-provider-azurerm/issues/27103)) +* `azurerm_monitor_diagnostic_setting` - add further polling to work around an eventual consistency issue when creating the resource ([#27088](https://github.com/hashicorp/terraform-provider-azurerm/issues/27088)) +* `azurerm_storage_account` - prevent API error by populating `infrastructure_encryption_enabled` when updating `customer_managed_key` ([#26971](https://github.com/hashicorp/terraform-provider-azurerm/issues/26971)) +* `azurerm_storage_blob_inventory_policy` - the `filter` property can now be set when `scope` is `container` ([#27113](https://github.com/hashicorp/terraform-provider-azurerm/issues/27113)) +* `azurerm_virtual_network_dns_servers` - moved locks to prevent the creation of subnets with stale data ([#27036](https://github.com/hashicorp/terraform-provider-azurerm/issues/27036)) +* `azurerm_virtual_network_gateway_connection` - allow `0` as a valid value for `ipsec_policy.sa_datasize` ([#27056](https://github.com/hashicorp/terraform-provider-azurerm/issues/27056)) --- -For information on changes between the v3.69.0 and v3.0.0 releases, please see [the previous v3.x changelog entries](https://github.com/hashicorp/terraform-provider-azurerm/blob/main/CHANGELOG-v3.md). +For information on changes between the v3.116.0 and v3.0.0 releases, please see [the previous v3.x changelog entries](https://github.com/hashicorp/terraform-provider-azurerm/blob/main/CHANGELOG-v3.md). For information on changes between the v2.99.0 and v2.0.0 releases, please see [the previous v2.x changelog entries](https://github.com/hashicorp/terraform-provider-azurerm/blob/main/CHANGELOG-v2.md). diff --git a/DEVELOPER.md b/DEVELOPER.md index ee4a63420415c..2995d70fbbe1e 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -1,7 +1,7 @@ ## Developer Requirements * [Terraform (Core)](https://www.terraform.io/downloads.html) - version 1.x (0.12.x and above are compatible however 1.x is recommended) -* [Go](https://golang.org/doc/install) version 1.21.x (to build the provider plugin) +* [Go](https://golang.org/doc/install) version 1.22.x (to build the provider plugin) ## Contributor Guides @@ -83,7 +83,7 @@ The following Environment Variables must be set in your shell prior to running a - `ARM_SUBSCRIPTION_ID` - `ARM_TENANT_ID` - `ARM_ENVIRONMENT` -- `ARM_METADATA_HOST` +- `ARM_METADATA_HOSTNAME` - `ARM_TEST_LOCATION` - `ARM_TEST_LOCATION_ALT` - `ARM_TEST_LOCATION_ALT2` diff --git a/README.md b/README.md index d3a28291429ff..74105fe0616e1 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ The AzureRM Terraform Provider allows managing resources within Azure Resource Manager. -When using version 3.0 of the AzureRM Provider we recommend using Terraform 1.x ([the latest version can be found here](https://www.terraform.io/downloads)). Whilst older versions of Terraform Core (0.12.x and later) remain compatible with v3.0 of the AzureRM Provider - support for versions prior to 1.0 will be removed in the next major release of the AzureRM Provider (v4.0). +When using version 4.0 of the AzureRM Provider we recommend using the latest version of Terraform Core ([the latest version can be found here](https://developer.hashicorp.com/terraform/install)). * [Terraform Website](https://www.terraform.io) * [AzureRM Provider Documentation](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs) diff --git a/go.mod b/go.mod index bcaf2c387c7e5..2006dc70da327 100644 --- a/go.mod +++ b/go.mod @@ -17,8 +17,8 @@ require ( github.com/google/go-cmp v0.6.0 github.com/google/uuid v1.6.0 github.com/hashicorp/go-azure-helpers v0.70.1 - github.com/hashicorp/go-azure-sdk/resource-manager v0.20240731.1212841 - github.com/hashicorp/go-azure-sdk/sdk v0.20240731.1212841 + github.com/hashicorp/go-azure-sdk/resource-manager v0.20240906.1232634 + github.com/hashicorp/go-azure-sdk/sdk v0.20240906.1232634 github.com/hashicorp/go-hclog v1.6.3 github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/go-uuid v1.0.3 @@ -93,4 +93,4 @@ require ( software.sslmate.com/src/go-pkcs12 v0.4.0 // indirect ) -go 1.21 +go 1.22 diff --git a/go.sum b/go.sum index 7dc7466ae5651..58f227ff9677b 100644 --- a/go.sum +++ b/go.sum @@ -93,10 +93,10 @@ github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-azure-helpers v0.70.1 h1:7hlnRrZobMZxpOzdlNEsayzAayj/KRG4wpDS1jgo4GM= github.com/hashicorp/go-azure-helpers v0.70.1/go.mod h1:BmbF4JDYXK5sEmFeU5hcn8Br21uElcqLfdQxjatwQKw= -github.com/hashicorp/go-azure-sdk/resource-manager v0.20240731.1212841 h1:H7BkxZl0qitdWq7sEGzNqkn5/11YTamwq2XTI8/7Jq0= -github.com/hashicorp/go-azure-sdk/resource-manager v0.20240731.1212841/go.mod h1:/4Ly9Gppp/Nu9AaWDfod6atYQ4n2OqN0ERpE2xZQz8A= -github.com/hashicorp/go-azure-sdk/sdk v0.20240731.1212841 h1:RzWuy96j/7q3Vi2aZoiIrokm8yotUNX1UGD3pbWi5Ck= -github.com/hashicorp/go-azure-sdk/sdk v0.20240731.1212841/go.mod h1:dMKF6bXrgGmy1d3pLzkmBpG2JIHgSAV2/OMSCEgyMwE= +github.com/hashicorp/go-azure-sdk/resource-manager v0.20240906.1232634 h1:hsjAS5gcfhn5FdCiZ08nuAsvQJtlTEsGxJDxqBT6zoA= +github.com/hashicorp/go-azure-sdk/resource-manager v0.20240906.1232634/go.mod h1:0IyF1dmWLHTZak+t9eQeg0VZ7rA/5du4swTm99NX+6I= +github.com/hashicorp/go-azure-sdk/sdk v0.20240906.1232634 h1:FGtv7+jcrx2m35qEKjK177zRXoBmPn3WntuqtqjcHwM= +github.com/hashicorp/go-azure-sdk/sdk v0.20240906.1232634/go.mod h1:dMKF6bXrgGmy1d3pLzkmBpG2JIHgSAV2/OMSCEgyMwE= github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= diff --git a/helpers/validate/time.go b/helpers/validate/time.go index 1c1b0a3f1c3ac..d50f68b1e10fe 100644 --- a/helpers/validate/time.go +++ b/helpers/validate/time.go @@ -5,6 +5,7 @@ package validate import ( "fmt" + "strings" "time" iso8601 "github.com/btubbs/datetime" @@ -65,6 +66,42 @@ func ISO8601DateTime(i interface{}, k string) (warnings []string, errors []error return warnings, errors } +func ISO8601RepeatingTime(i interface{}, k string) (warnings []string, errors []error) { + v, ok := i.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected type of %s to be string", k)) + return + } + + if !strings.HasPrefix(v, "R/") { + errors = append(errors, fmt.Errorf("%s must start with 'R/'", k)) + return + } + + partsWithoutPrefix := strings.TrimPrefix(v, "R/") + + pIndex := strings.Index(partsWithoutPrefix, "/P") + if pIndex == -1 { + errors = append(errors, fmt.Errorf("%s must end with duration", k)) + return + } + + dateTime := partsWithoutPrefix[:pIndex] + duration := partsWithoutPrefix[pIndex+1:] + + if _, err := iso8601.Parse(dateTime, time.UTC); err != nil { + errors = append(errors, fmt.Errorf("%q has the invalid ISO8601 date format %q: %+v", k, i, err)) + return + } + + if _, err := period.Parse(duration); err != nil { + errors = append(errors, err) + return + } + + return warnings, errors +} + func AzureTimeZoneString() func(interface{}, string) ([]string, []error) { // List collected from https://support.microsoft.com/en-gb/help/973627/microsoft-time-zone-index-values // TODO look into programatic retrieval https://docs.microsoft.com/en-us/rest/api/maps/timezone/gettimezoneenumwindows diff --git a/helpers/validate/time_test.go b/helpers/validate/time_test.go index d275f76bfeb1d..f6980acd18773 100644 --- a/helpers/validate/time_test.go +++ b/helpers/validate/time_test.go @@ -106,3 +106,63 @@ func TestISO8601Duration(t *testing.T) { } } } + +func TestISO8601RepeatingTime(t *testing.T) { + cases := []struct { + Value string + Errors int + }{ + { + Value: "R/2021-05-23T02:30:00+00:00/P1W", + Errors: 0, + }, + { + Value: "R/2021-05-23T02:30:00+00:00/PT20S", + Errors: 0, + }, + { + Value: "R/2021-05-23T02:30:00+00:00/PT0.5S", + Errors: 0, + }, + { + Value: "R", + Errors: 1, + }, + { + Value: "R/", + Errors: 1, + }, + { + Value: "2021-05-23T02:30:03+01:02", + Errors: 1, + }, + { + Value: "P1W", + Errors: 1, + }, + { + Value: "R/2021-05-23T02:30:00+00:00", + Errors: 1, + }, + { + Value: "C/2021-05-23T02:30:00+00:00", + Errors: 1, + }, + { + Value: "2021-05-23T02:30:00+00:00/D1W", + Errors: 1, + }, + { + Value: "2021-05-23T02:30:00+00:00/P1W", + Errors: 1, + }, + } + + for _, tc := range cases { + _, errors := ISO8601RepeatingTime(tc.Value, "example") + + if len(errors) != tc.Errors { + t.Fatalf("Expected ISO8601RepeatingTime to trigger '%d' errors for '%s' - got '%d'", tc.Errors, tc.Value, len(errors)) + } + } +} diff --git a/internal/acceptance/helpers/is_not_resource_action.go b/internal/acceptance/helpers/is_not_resource_action.go new file mode 100644 index 0000000000000..1bdf047f96d05 --- /dev/null +++ b/internal/acceptance/helpers/is_not_resource_action.go @@ -0,0 +1,92 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package helpers + +import ( + "context" + "fmt" + + "github.com/hashicorp/terraform-plugin-testing/plancheck" +) + +var _ plancheck.PlanCheck = isNotResourceAction{} + +type isNotResourceAction struct { + resourceAddress string + actionType plancheck.ResourceActionType +} + +// CheckPlan implements the plan check logic. +func (e isNotResourceAction) CheckPlan(ctx context.Context, req plancheck.CheckPlanRequest, resp *plancheck.CheckPlanResponse) { + foundResource := false + + for _, rc := range req.Plan.ResourceChanges { + if e.resourceAddress != rc.Address { + continue + } + + switch e.actionType { + case plancheck.ResourceActionNoop: + if rc.Change.Actions.NoOp() { + resp.Error = fmt.Errorf("'%s' - expected action to not be %s", rc.Address, e.actionType) + return + } + case plancheck.ResourceActionCreate: + if rc.Change.Actions.Create() { + resp.Error = fmt.Errorf("'%s' - expected action to not be %s", rc.Address, e.actionType) + return + } + case plancheck.ResourceActionRead: + if rc.Change.Actions.Read() { + resp.Error = fmt.Errorf("'%s' - expected action to not be %s", rc.Address, e.actionType) + return + } + case plancheck.ResourceActionUpdate: + if rc.Change.Actions.Update() { + resp.Error = fmt.Errorf("'%s' - expected action to not be %s", rc.Address, e.actionType) + return + } + case plancheck.ResourceActionDestroy: + if rc.Change.Actions.Delete() { + resp.Error = fmt.Errorf("'%s' - expected action to not be %s", rc.Address, e.actionType) + return + } + case plancheck.ResourceActionDestroyBeforeCreate: + if rc.Change.Actions.DestroyBeforeCreate() { + resp.Error = fmt.Errorf("'%s' - expected action to not be %s", rc.Address, e.actionType) + return + } + case plancheck.ResourceActionCreateBeforeDestroy: + if rc.Change.Actions.CreateBeforeDestroy() { + resp.Error = fmt.Errorf("'%s' - expected action to not be %s", rc.Address, e.actionType) + return + } + case plancheck.ResourceActionReplace: + if rc.Change.Actions.Replace() { + resp.Error = fmt.Errorf("'%s' - expected action to not be %s", rc.Address, e.actionType) + return + } + default: + resp.Error = fmt.Errorf("%s - unexpected ResourceActionType: %s", rc.Address, e.actionType) + return + } + + foundResource = true + break + } + + if !foundResource { + resp.Error = fmt.Errorf("%s - Resource not found in plan ResourceChanges", e.resourceAddress) + return + } +} + +// IsNotResourceAction returns a plan check that asserts that a given resource will not have a specific resource change type in the plan. +// Valid actionType are an enum of type plancheck.ResourceActionType, examples: NoOp, DestroyBeforeCreate, Update (in-place), etc. +func IsNotResourceAction(resourceAddress string, actionType plancheck.ResourceActionType) plancheck.PlanCheck { + return isNotResourceAction{ + resourceAddress: resourceAddress, + actionType: actionType, + } +} diff --git a/internal/acceptance/testcase.go b/internal/acceptance/testcase.go index 539ecc66c1b3a..b6e8ef66f974c 100644 --- a/internal/acceptance/testcase.go +++ b/internal/acceptance/testcase.go @@ -9,6 +9,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/plancheck" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/helpers" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/testclient" @@ -48,6 +49,48 @@ func (td TestData) ResourceTest(t *testing.T, testResource types.TestResource, s RefreshState: true, } + newSteps := make([]TestStep, 0) + for _, step := range steps { + // This block adds a check to make sure tests aren't recreating a resource + if (step.Config != "" || step.ConfigDirectory != nil || step.ConfigFile != nil) && !step.PlanOnly { + step.ConfigPlanChecks = resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + helpers.IsNotResourceAction(td.ResourceName, plancheck.ResourceActionReplace), + }, + } + } + + if !step.ImportState { + newSteps = append(newSteps, step) + } else { + newSteps = append(newSteps, refreshStep) + newSteps = append(newSteps, step) + } + } + steps = newSteps + + testCase := resource.TestCase{ + PreCheck: func() { PreCheck(t) }, + CheckDestroy: func(s *terraform.State) error { + client, err := testclient.Build() + if err != nil { + return fmt.Errorf("building client: %+v", err) + } + return helpers.CheckDestroyedFunc(client, testResource, td.ResourceType, td.ResourceName)(s) + }, + Steps: steps, + } + td.runAcceptanceTest(t, testCase) +} + +// ResourceTestIgnoreRecreate should be used when checking that a resource should be recreated during a test. +func (td TestData) ResourceTestIgnoreRecreate(t *testing.T, testResource types.TestResource, steps []TestStep) { + // Testing framework as of 1.6.0 no longer auto-refreshes state, so adding it back in here for all steps that update + // the config rather than having to modify 1000's of tests individually to add a refresh-only step + var refreshStep = TestStep{ + RefreshState: true, + } + newSteps := make([]TestStep, 0) for _, step := range steps { if !step.ImportState { diff --git a/internal/clients/client.go b/internal/clients/client.go index 5abe26789c57a..82a630a75a9f3 100644 --- a/internal/clients/client.go +++ b/internal/clients/client.go @@ -17,7 +17,7 @@ import ( eventgrid_v2022_06_15 "github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15" fluidrelay_2022_05_26 "github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26" hdinsight_v2021_06_01 "github.com/hashicorp/go-azure-sdk/resource-manager/hdinsight/2021-06-01" - nginx_2024_01_01_preview "github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview" + nginx_2024_06_01_preview "github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview" redis_2024_03_01 "github.com/hashicorp/go-azure-sdk/resource-manager/redis/2024-03-01" servicenetworking_2023_11_01 "github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-11-01" storagecache_2023_05_01 "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01" @@ -66,7 +66,6 @@ import ( desktopvirtualization "github.com/hashicorp/terraform-provider-azurerm/internal/services/desktopvirtualization/client" devtestlabs "github.com/hashicorp/terraform-provider-azurerm/internal/services/devtestlabs/client" digitaltwins "github.com/hashicorp/terraform-provider-azurerm/internal/services/digitaltwins/client" - disks "github.com/hashicorp/terraform-provider-azurerm/internal/services/disks/client" dns "github.com/hashicorp/terraform-provider-azurerm/internal/services/dns/client" domainservices "github.com/hashicorp/terraform-provider-azurerm/internal/services/domainservices/client" elastic "github.com/hashicorp/terraform-provider-azurerm/internal/services/elastic/client" @@ -83,24 +82,19 @@ import ( hybridcompute "github.com/hashicorp/terraform-provider-azurerm/internal/services/hybridcompute/client" iotcentral "github.com/hashicorp/terraform-provider-azurerm/internal/services/iotcentral/client" iothub "github.com/hashicorp/terraform-provider-azurerm/internal/services/iothub/client" - timeseriesinsights "github.com/hashicorp/terraform-provider-azurerm/internal/services/iottimeseriesinsights/client" keyvault "github.com/hashicorp/terraform-provider-azurerm/internal/services/keyvault/client" kusto "github.com/hashicorp/terraform-provider-azurerm/internal/services/kusto/client" - labservice "github.com/hashicorp/terraform-provider-azurerm/internal/services/labservice/client" lighthouse "github.com/hashicorp/terraform-provider-azurerm/internal/services/lighthouse/client" loadbalancers "github.com/hashicorp/terraform-provider-azurerm/internal/services/loadbalancer/client" loadtestservice "github.com/hashicorp/terraform-provider-azurerm/internal/services/loadtestservice/client" loganalytics "github.com/hashicorp/terraform-provider-azurerm/internal/services/loganalytics/client" logic "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/client" - logz "github.com/hashicorp/terraform-provider-azurerm/internal/services/logz/client" machinelearning "github.com/hashicorp/terraform-provider-azurerm/internal/services/machinelearning/client" maintenance "github.com/hashicorp/terraform-provider-azurerm/internal/services/maintenance/client" managedapplication "github.com/hashicorp/terraform-provider-azurerm/internal/services/managedapplications/client" managedhsm "github.com/hashicorp/terraform-provider-azurerm/internal/services/managedhsm/client" managementgroup "github.com/hashicorp/terraform-provider-azurerm/internal/services/managementgroup/client" maps "github.com/hashicorp/terraform-provider-azurerm/internal/services/maps/client" - mariadb "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/client" - media "github.com/hashicorp/terraform-provider-azurerm/internal/services/media/client" mixedreality "github.com/hashicorp/terraform-provider-azurerm/internal/services/mixedreality/client" mobilenetwork "github.com/hashicorp/terraform-provider-azurerm/internal/services/mobilenetwork/client" monitor "github.com/hashicorp/terraform-provider-azurerm/internal/services/monitor/client" @@ -138,7 +132,6 @@ import ( serviceNetworking "github.com/hashicorp/terraform-provider-azurerm/internal/services/servicenetworking/client" signalr "github.com/hashicorp/terraform-provider-azurerm/internal/services/signalr/client" appPlatform "github.com/hashicorp/terraform-provider-azurerm/internal/services/springcloud/client" - sql "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/client" storage "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/client" storageCache "github.com/hashicorp/terraform-provider-azurerm/internal/services/storagecache/client" storageMover "github.com/hashicorp/terraform-provider-azurerm/internal/services/storagemover/client" @@ -147,7 +140,6 @@ import ( synapse "github.com/hashicorp/terraform-provider-azurerm/internal/services/synapse/client" systemCenterVirtualMachineManager "github.com/hashicorp/terraform-provider-azurerm/internal/services/systemcentervirtualmachinemanager/client" trafficManager "github.com/hashicorp/terraform-provider-azurerm/internal/services/trafficmanager/client" - videoAnalyzer "github.com/hashicorp/terraform-provider-azurerm/internal/services/videoanalyzer/client" vmware "github.com/hashicorp/terraform-provider-azurerm/internal/services/vmware/client" voiceServices "github.com/hashicorp/terraform-provider-azurerm/internal/services/voiceservices/client" web "github.com/hashicorp/terraform-provider-azurerm/internal/services/web/client" @@ -204,7 +196,6 @@ type Client struct { DesktopVirtualization *desktopvirtualization.Client DevTestLabs *devtestlabs.Client DigitalTwins *digitaltwins.Client - Disks *disks.Client Dns *dns_v2018_05_01.Client DomainServices *domainservices.Client Elastic *elastic.Client @@ -224,21 +215,17 @@ type Client struct { IoTTimeSeriesInsights *timeseriesinsights_v2020_05_15.Client KeyVault *keyvault.Client Kusto *kusto.Client - LabService *labservice.Client Lighthouse *lighthouse.Client LoadBalancers *loadbalancers.Client LoadTestService *loadtestservice.AutoClient LogAnalytics *loganalytics.Client Logic *logic.Client - Logz *logz.Client MachineLearning *machinelearning.Client Maintenance *maintenance.Client ManagedApplication *managedapplication.Client ManagementGroups *managementgroup.Client ManagedHSMs *managedhsm.Client Maps *maps.Client - MariaDB *mariadb.Client - Media *media.Client MixedReality *mixedreality.Client Monitor *monitor.Client MobileNetwork *mobilenetwork.Client @@ -249,7 +236,7 @@ type Client struct { Network *network.Client NetworkFunction *networkfunction.Client NewRelic *newrelic.Client - Nginx *nginx_2024_01_01_preview.Client + Nginx *nginx_2024_06_01_preview.Client NotificationHubs *notificationhub.Client Orbital *orbital.Client PaloAlto *paloalto.Client @@ -280,11 +267,9 @@ type Client struct { StorageMover *storageMover.Client StreamAnalytics *streamAnalytics.Client Subscription *subscription.Client - Sql *sql.Client Synapse *synapse.Client SystemCenterVirtualMachineManager *systemcentervirtualmachinemanager_2023_10_07.Client TrafficManager *trafficManager.Client - VideoAnalyzer *videoAnalyzer.Client Vmware *vmware.Client VoiceServices *voiceServices.Client Web *web.Client @@ -428,9 +413,6 @@ func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error if client.DigitalTwins, err = digitaltwins.NewClient(o); err != nil { return fmt.Errorf("building clients for DigitalTwins: %+v", err) } - if client.Disks, err = disks.NewClient(o); err != nil { - return fmt.Errorf("building clients for Disks: %+v", err) - } if client.Dns, err = dns.NewClient(o); err != nil { return fmt.Errorf("building clients for Dns: %+v", err) } @@ -477,18 +459,12 @@ func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error if client.IoTHub, err = iothub.NewClient(o); err != nil { return fmt.Errorf("building clients for IoTHub: %+v", err) } - if client.IoTTimeSeriesInsights, err = timeseriesinsights.NewClient(o); err != nil { - return fmt.Errorf("building clients for IoT TimeSeries Insights: %+v", err) - } if client.KeyVault, err = keyvault.NewClient(o); err != nil { return fmt.Errorf("building clients for Key Vault: %+v", err) } if client.Kusto, err = kusto.NewClient(o); err != nil { return fmt.Errorf("building clients for Kusto: %+v", err) } - if client.LabService, err = labservice.NewClient(o); err != nil { - return fmt.Errorf("building clients for LabService: %+v", err) - } if client.Lighthouse, err = lighthouse.NewClient(o); err != nil { return fmt.Errorf("building clients for Lighthouse: %+v", err) } @@ -504,9 +480,6 @@ func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error if client.Logic, err = logic.NewClient(o); err != nil { return fmt.Errorf("building clients for Logic: %+v", err) } - if client.Logz, err = logz.NewClient(o); err != nil { - return fmt.Errorf("building clients for Logz: %+v", err) - } if client.MachineLearning, err = machinelearning.NewClient(o); err != nil { return fmt.Errorf("building clients for Machine Learning: %+v", err) } @@ -516,19 +489,15 @@ func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error if client.ManagedApplication, err = managedapplication.NewClient(o); err != nil { return fmt.Errorf("building clients for Managed Applications: %+v", err) } - client.ManagementGroups = managementgroup.NewClient(o) + if client.ManagementGroups, err = managementgroup.NewClient(o); err != nil { + return fmt.Errorf("building clients for Management Groups: %+v", err) + } if client.ManagedHSMs, err = managedhsm.NewClient(o); err != nil { return fmt.Errorf("building clients for ManagedHSM: %+v", err) } if client.Maps, err = maps.NewClient(o); err != nil { return fmt.Errorf("building clients for Maps: %+v", err) } - if client.MariaDB, err = mariadb.NewClient(o); err != nil { - return fmt.Errorf("building clients for Maria DB: %+v", err) - } - if client.Media, err = media.NewClient(o); err != nil { - return fmt.Errorf("building clients for Media: %+v", err) - } if client.MixedReality, err = mixedreality.NewClient(o); err != nil { return fmt.Errorf("building clients for Mixed Reality: %+v", err) } @@ -541,7 +510,9 @@ func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error if client.MSSQL, err = mssql.NewClient(o); err != nil { return fmt.Errorf("building clients for MSSQL: %+v", err) } - client.MSSQLManagedInstance = mssqlmanagedinstance.NewClient(o) + if client.MSSQLManagedInstance, err = mssqlmanagedinstance.NewClient(o); err != nil { + return fmt.Errorf("building clients for MSSQLManagedInstance: %+v", err) + } if client.MySQL, err = mysql.NewClient(o); err != nil { return fmt.Errorf("building clients for MySQL: %+v", err) } @@ -635,7 +606,6 @@ func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error if client.SignalR, err = signalr.NewClient(o); err != nil { return fmt.Errorf("building clients for SignalR: %+v", err) } - client.Sql = sql.NewClient(o) if client.Storage, err = storage.NewClient(o); err != nil { return fmt.Errorf("building clients for Storage: %+v", err) } @@ -659,9 +629,6 @@ func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error if client.TrafficManager, err = trafficManager.NewClient(o); err != nil { return fmt.Errorf("building clients for Traffic Manager: %+v", err) } - if client.VideoAnalyzer, err = videoAnalyzer.NewClient(o); err != nil { - return fmt.Errorf("building clients for Video Analyzer: %+v", err) - } if client.Vmware, err = vmware.NewClient(o); err != nil { return fmt.Errorf("building clients for VMWare: %+v", err) } diff --git a/internal/clients/graph/client.go b/internal/clients/graph/client.go index 63131098ca5a3..d70ee4597a66b 100644 --- a/internal/clients/graph/client.go +++ b/internal/clients/graph/client.go @@ -41,7 +41,7 @@ type directoryObjectModel struct { } func graphClient(authorizer auth.Authorizer, environment environments.Environment) (*msgraph.Client, error) { - client, err := msgraph.NewMsGraphClient(environment.MicrosoftGraph, "Graph", msgraph.VersionOnePointZero) + client, err := msgraph.NewClient(environment.MicrosoftGraph, "Graph", msgraph.VersionOnePointZero) if err != nil { return nil, fmt.Errorf("building client: %+v", err) } diff --git a/internal/features/defaults.go b/internal/features/defaults.go index 12c24186eb3c4..1d152cea3acc1 100644 --- a/internal/features/defaults.go +++ b/internal/features/defaults.go @@ -36,7 +36,7 @@ func Default() UserFeatures { RecoverSoftDeletedHSMKeys: true, }, LogAnalyticsWorkspace: LogAnalyticsWorkspaceFeatures{ - PermanentlyDeleteOnDestroy: true, + PermanentlyDeleteOnDestroy: false, }, ManagedDisk: ManagedDiskFeatures{ ExpandWithoutDowntime: true, diff --git a/internal/features/four_point_oh.go b/internal/features/four_point_oh.go index 1921cf388799c..cb63f60555ab4 100644 --- a/internal/features/four_point_oh.go +++ b/internal/features/four_point_oh.go @@ -29,7 +29,7 @@ func DeprecatedInFourPointOh(deprecationMessage string) string { // This exists to allow breaking changes to be piped through the provider // during the development of 3.x until 4.0 is ready. func FourPointOh() bool { - return false + return true } // FourPointOhBeta returns whether this provider is running in 4.0 mode diff --git a/internal/provider/features.go b/internal/provider/features.go index 38ef20645d163..1c42fa1b7bcf9 100644 --- a/internal/provider/features.go +++ b/internal/provider/features.go @@ -183,7 +183,7 @@ func schemaFeatures(supportLegacyTestSuite bool) *pluginsdk.Schema { "permanently_delete_on_destroy": { Type: pluginsdk.TypeBool, Optional: true, - Default: !features.FourPointOhBeta(), + Default: false, }, }, }, diff --git a/internal/provider/features_test.go b/internal/provider/features_test.go index 583923509168f..7dc3bd30c3697 100644 --- a/internal/provider/features_test.go +++ b/internal/provider/features_test.go @@ -49,7 +49,7 @@ func TestExpandFeatures(t *testing.T) { RecoverSoftDeletedHSMKeys: true, }, LogAnalyticsWorkspace: features.LogAnalyticsWorkspaceFeatures{ - PermanentlyDeleteOnDestroy: true, + PermanentlyDeleteOnDestroy: false, }, ManagedDisk: features.ManagedDiskFeatures{ ExpandWithoutDowntime: true, @@ -1193,7 +1193,7 @@ func TestExpandFeaturesLogAnalyticsWorkspace(t *testing.T) { }, Expected: features.UserFeatures{ LogAnalyticsWorkspace: features.LogAnalyticsWorkspaceFeatures{ - PermanentlyDeleteOnDestroy: !features.FourPointOhBeta(), + PermanentlyDeleteOnDestroy: false, }, }, }, diff --git a/internal/provider/framework/config.go b/internal/provider/framework/config.go index d1664c6b06ff6..5fabeb930c92a 100644 --- a/internal/provider/framework/config.go +++ b/internal/provider/framework/config.go @@ -28,6 +28,12 @@ func (p *ProviderConfig) Load(ctx context.Context, data *ProviderModel, tfVersio env := &environments.Environment{} var err error + subscriptionId := getEnvStringOrDefault(data.SubscriptionId, "ARM_SUBSCRIPTION_ID", "") + if subscriptionId == "" { + diags.Append(diag.NewErrorDiagnostic("Configuring subscription", "`subscription_id` is a required provider property when performing a plan/apply operation")) + return + } + if metadataHost := getEnvStringOrDefault(data.MetaDataHost, "ARM_METADATA_HOSTNAME", ""); metadataHost != "" { env, err = environments.FromEndpoint(ctx, metadataHost) if err != nil { @@ -98,7 +104,7 @@ func (p *ProviderConfig) Load(ctx context.Context, data *ProviderModel, tfVersio CustomManagedIdentityEndpoint: getEnvStringOrDefault(data.MSIEndpoint, "ARM_MSI_ENDPOINT", ""), - AzureCliSubscriptionIDHint: getEnvStringOrDefault(data.SubscriptionId, "ARM_SUBSCRIPTION_ID", ""), + AzureCliSubscriptionIDHint: subscriptionId, EnableAuthenticatingUsingClientCertificate: true, EnableAuthenticatingUsingClientSecret: true, @@ -511,11 +517,11 @@ func (p *ProviderConfig) Load(ctx context.Context, data *ProviderModel, tfVersio } } - subscriptionId := commonids.NewSubscriptionID(client.Account.SubscriptionId) + subId := commonids.NewSubscriptionID(client.Account.SubscriptionId) ctx2, cancel := context.WithTimeout(ctx, 30*time.Minute) defer cancel() - if err = resourceproviders.EnsureRegistered(ctx2, client.Resource.ResourceProvidersClient, subscriptionId, requiredResourceProviders); err != nil { + if err = resourceproviders.EnsureRegistered(ctx2, client.Resource.ResourceProvidersClient, subId, requiredResourceProviders); err != nil { diags.AddError("registering resource providers", err.Error()) return } diff --git a/internal/provider/framework/provider.go b/internal/provider/framework/provider.go index 6a92879b7e444..73846ced22b47 100644 --- a/internal/provider/framework/provider.go +++ b/internal/provider/framework/provider.go @@ -56,8 +56,7 @@ func (p *azureRmFrameworkProvider) Schema(_ context.Context, _ provider.SchemaRe "subscription_id": schema.StringAttribute{ // Note: There is no equivalent of `DefaultFunc` in the provider schema package. This property is Required, but can be // set via env var instead of provider config, so needs to be toggled in schema based on the presence of that env var. - Required: getEnvStringOrDefault(types.StringUnknown(), "ARM_SUBSCRIPTION_ID", "") == "", - Optional: getEnvStringOrDefault(types.StringUnknown(), "ARM_SUBSCRIPTION_ID", "") != "", + Optional: true, Description: "The Subscription ID which should be used.", }, diff --git a/internal/provider/provider.go b/internal/provider/provider.go index ed0e7bd8fdd4a..2160d4a2893c3 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -143,7 +143,7 @@ func azureProvider(supportLegacyTestSuite bool) *schema.Provider { Schema: map[string]*schema.Schema{ "subscription_id": { Type: schema.TypeString, - Required: true, + Optional: true, DefaultFunc: schema.EnvDefaultFunc("ARM_SUBSCRIPTION_ID", nil), Description: "The Subscription ID which should be used.", }, @@ -385,6 +385,11 @@ func azureProvider(supportLegacyTestSuite bool) *schema.Provider { // This separation allows us to robustly test different authentication scenarios. func providerConfigure(p *schema.Provider) schema.ConfigureContextFunc { return func(ctx context.Context, d *schema.ResourceData) (interface{}, diag.Diagnostics) { + subscriptionId := d.Get("subscription_id").(string) + if subscriptionId == "" { + return nil, diag.FromErr(fmt.Errorf("`subscription_id` is a required provider property when performing a plan/apply operation")) + } + var auxTenants []string if v, ok := d.Get("auxiliary_tenant_ids").([]interface{}); ok && len(v) > 0 { auxTenants = *utils.ExpandStringSlice(v) @@ -467,7 +472,7 @@ func providerConfigure(p *schema.Provider) schema.ConfigureContextFunc { CustomManagedIdentityEndpoint: d.Get("msi_endpoint").(string), - AzureCliSubscriptionIDHint: d.Get("subscription_id").(string), + AzureCliSubscriptionIDHint: subscriptionId, EnableAuthenticatingUsingClientCertificate: true, EnableAuthenticatingUsingClientSecret: true, diff --git a/internal/provider/provider_schema_test.go b/internal/provider/provider_schema_test.go index 240fa4dc1c2c4..1d95d613d93c9 100644 --- a/internal/provider/provider_schema_test.go +++ b/internal/provider/provider_schema_test.go @@ -10,7 +10,6 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" ) @@ -184,9 +183,11 @@ func TestResourcesHaveEnabledFieldsMarkedAsBooleans(t *testing.T) { "recommendations_enabled": {}, }, } + /* these fields should be look at post 4.0 if features.FourPointOhBeta() { resourceFieldsWhichNeedToBeAddressed = map[string]map[string]struct{}{} } + */ for _, resourceName := range resourceNames { resource := provider.ResourcesMap[resourceName] @@ -327,9 +328,12 @@ func TestResourcesDoNotContainANameFieldWithADefaultOfDefault(t *testing.T) { "name": {}, }, } + + /* these fields should be look at post 4.0 if features.FourPointOhBeta() { resourceFieldsWhichNeedToBeAddressed = map[string]map[string]struct{}{} } + */ for _, resourceName := range resourceNames { resource := provider.ResourcesMap[resourceName] @@ -412,46 +416,6 @@ func runInputForValidateFunction(validateFunc pluginsdk.SchemaValidateFunc, inpu return len(warnings) == 0 && len(errs) == 0 } -func TestDataSourcesWithAnEncryptionBlockBehaveConsistently(t *testing.T) { - // This test validates that Data Sources do not contain an `encryption` block which is marked as Computed: true - // or a field named `enabled` or `key_source`. - // - // This hides the fact that encryption is enabled on this resource - and (rather than exposing an `encryption` - // block as Computed) should instead be exposed as a non-Computed block. - // - // In cases where the block contains `key_source`, this field should be removed and instead inferred based on - // the presence of the block, using a custom encryption key (and thus a `key_source` of {likely} `Microsoft.KeyVault`) - // when the block is specified - and the default value (generally the RP name) when the block is omitted. - provider := TestAzureProvider() - - // intentionally sorting these so the output is consistent - dataSourceNames := make([]string, 0) - for dataSourceName := range provider.DataSourcesMap { - dataSourceNames = append(dataSourceNames, dataSourceName) - } - sort.Strings(dataSourceNames) - - // TODO: 4.0 - work through this list - dataSourcesWhichNeedToBeAddressed := map[string]struct{}{ - "azurerm_managed_disk": {}, - "azurerm_snapshot": {}, - } - if features.FourPointOhBeta() { - dataSourcesWhichNeedToBeAddressed = map[string]struct{}{} - } - - for _, dataSourceName := range dataSourceNames { - dataSource := provider.DataSourcesMap[dataSourceName] - if err := schemaContainsAnEncryptionBlock(dataSource.Schema, false); err != nil { - if _, ok := dataSourcesWhichNeedToBeAddressed[dataSourceName]; ok { - continue - } - - t.Fatalf("the Data Source %q contains an `encryption` block marked as Computed - this should be marked as non-Computed (and the key source automatically inferred): %+v", dataSourceName, err) - } - } -} - func TestResourcesWithAnEncryptionBlockBehaveConsistently(t *testing.T) { // This test validates that Resources do not contain an `encryption` block which is marked as Computed: true // or a field named `enabled` or `key_source`. @@ -480,9 +444,12 @@ func TestResourcesWithAnEncryptionBlockBehaveConsistently(t *testing.T) { "azurerm_snapshot": {}, "azurerm_load_test": {}, } + + /* these fields should be look at post 4.0 if features.FourPointOhBeta() { resourcesWhichNeedToBeAddressed = map[string]struct{}{} } + */ for _, resourceName := range resourceNames { resource := provider.ResourcesMap[resourceName] @@ -594,9 +561,9 @@ func TestResourcesDoNotContainLocalAuthenticationDisabled(t *testing.T) { "azurerm_log_analytics_workspace": {}, "azurerm_search_service": {}, } - if features.FourPointOhBeta() { + /*if features.FourPointOhBeta() { resourcesWhichNeedToBeAddressed = map[string]struct{}{} - } + }*/ for _, resourceName := range resourceNames { resource := provider.ResourcesMap[resourceName] diff --git a/internal/provider/provider_test.go b/internal/provider/provider_test.go index 76a79ea3bdd50..c2aec5c5a19db 100644 --- a/internal/provider/provider_test.go +++ b/internal/provider/provider_test.go @@ -206,8 +206,10 @@ func TestAccProvider_resourceProviders_legacyWithAdditional(t *testing.T) { } expectedResourceProviders := resourceproviders.Legacy().Merge(resourceproviders.ResourceProviders{ - "Microsoft.ApiManagement": {}, - "Microsoft.KeyVault": {}, + "Microsoft.ApiManagement": {}, + "Microsoft.ContainerService": {}, + "Microsoft.KeyVault": {}, + "Microsoft.Kubernetes": {}, }) registeredResourceProviders := provider.Meta().(*clients.Client).Account.RegisteredResourceProviders diff --git a/internal/provider/services.go b/internal/provider/services.go index fcb3b3ce04b99..e350c7df91e7a 100644 --- a/internal/provider/services.go +++ b/internal/provider/services.go @@ -46,7 +46,6 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/services/desktopvirtualization" "github.com/hashicorp/terraform-provider-azurerm/internal/services/devtestlabs" "github.com/hashicorp/terraform-provider-azurerm/internal/services/digitaltwins" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/disks" "github.com/hashicorp/terraform-provider-azurerm/internal/services/dns" "github.com/hashicorp/terraform-provider-azurerm/internal/services/domainservices" "github.com/hashicorp/terraform-provider-azurerm/internal/services/elastic" @@ -64,17 +63,14 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/services/hybridcompute" "github.com/hashicorp/terraform-provider-azurerm/internal/services/iotcentral" "github.com/hashicorp/terraform-provider-azurerm/internal/services/iothub" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/iottimeseriesinsights" "github.com/hashicorp/terraform-provider-azurerm/internal/services/keyvault" "github.com/hashicorp/terraform-provider-azurerm/internal/services/kusto" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/labservice" "github.com/hashicorp/terraform-provider-azurerm/internal/services/legacy" "github.com/hashicorp/terraform-provider-azurerm/internal/services/lighthouse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/loadbalancer" "github.com/hashicorp/terraform-provider-azurerm/internal/services/loadtestservice" "github.com/hashicorp/terraform-provider-azurerm/internal/services/loganalytics" "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logz" "github.com/hashicorp/terraform-provider-azurerm/internal/services/machinelearning" "github.com/hashicorp/terraform-provider-azurerm/internal/services/maintenance" "github.com/hashicorp/terraform-provider-azurerm/internal/services/managedapplications" @@ -82,8 +78,6 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/services/managedidentity" "github.com/hashicorp/terraform-provider-azurerm/internal/services/managementgroup" "github.com/hashicorp/terraform-provider-azurerm/internal/services/maps" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/media" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mixedreality" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mobilenetwork" "github.com/hashicorp/terraform-provider-azurerm/internal/services/monitor" @@ -121,7 +115,6 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/services/servicenetworking" "github.com/hashicorp/terraform-provider-azurerm/internal/services/signalr" "github.com/hashicorp/terraform-provider-azurerm/internal/services/springcloud" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql" "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage" "github.com/hashicorp/terraform-provider-azurerm/internal/services/storagecache" "github.com/hashicorp/terraform-provider-azurerm/internal/services/storagemover" @@ -130,7 +123,6 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/services/synapse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/systemcentervirtualmachinemanager" "github.com/hashicorp/terraform-provider-azurerm/internal/services/trafficmanager" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/videoanalyzer" "github.com/hashicorp/terraform-provider-azurerm/internal/services/vmware" "github.com/hashicorp/terraform-provider-azurerm/internal/services/voiceservices" "github.com/hashicorp/terraform-provider-azurerm/internal/services/web" @@ -151,6 +143,7 @@ func SupportedTypedServices() []sdk.TypedServiceRegistration { authorization.Registration{}, automanage.Registration{}, automation.Registration{}, + advisor.Registration{}, azurestackhci.Registration{}, batch.Registration{}, bot.Registration{}, @@ -168,7 +161,6 @@ func SupportedTypedServices() []sdk.TypedServiceRegistration { dataprotection.Registration{}, desktopvirtualization.Registration{}, digitaltwins.Registration{}, - disks.Registration{}, domainservices.Registration{}, elasticsan.Registration{}, eventhub.Registration{}, @@ -180,14 +172,12 @@ func SupportedTypedServices() []sdk.TypedServiceRegistration { iothub.Registration{}, keyvault.Registration{}, kusto.Registration{}, - labservice.Registration{}, loadbalancer.Registration{}, loadtestservice.Registration{}, loganalytics.Registration{}, machinelearning.Registration{}, maintenance.Registration{}, managedhsm.Registration{}, - media.Registration{}, mobilenetwork.Registration{}, monitor.Registration{}, mssql.Registration{}, @@ -279,7 +269,6 @@ func SupportedUntypedServices() []sdk.UntypedServiceRegistration { hsm.Registration{}, iotcentral.Registration{}, iothub.Registration{}, - iottimeseriesinsights.Registration{}, keyvault.Registration{}, kusto.Registration{}, legacy.Registration{}, @@ -287,7 +276,6 @@ func SupportedUntypedServices() []sdk.UntypedServiceRegistration { loadbalancer.Registration{}, loganalytics.Registration{}, logic.Registration{}, - logz.Registration{}, machinelearning.Registration{}, maintenance.Registration{}, managedapplications.Registration{}, @@ -295,8 +283,6 @@ func SupportedUntypedServices() []sdk.UntypedServiceRegistration { managedidentity.Registration{}, managementgroup.Registration{}, maps.Registration{}, - mariadb.Registration{}, - media.Registration{}, mixedreality.Registration{}, monitor.Registration{}, mssql.Registration{}, @@ -323,14 +309,12 @@ func SupportedUntypedServices() []sdk.UntypedServiceRegistration { servicefabric.Registration{}, signalr.Registration{}, springcloud.Registration{}, - sql.Registration{}, storage.Registration{}, storagecache.Registration{}, streamanalytics.Registration{}, subscription.Registration{}, synapse.Registration{}, trafficmanager.Registration{}, - videoanalyzer.Registration{}, vmware.Registration{}, web.Registration{}, } diff --git a/internal/resourceproviders/errors.go b/internal/resourceproviders/errors.go index 6f078c8a3b37b..e1bd0343f02c4 100644 --- a/internal/resourceproviders/errors.go +++ b/internal/resourceproviders/errors.go @@ -7,11 +7,13 @@ import ( "errors" "fmt" "sync" + + "github.com/hashicorp/terraform-provider-azurerm/internal/features" ) var ErrNoAuthorization = errors.New("authorization failed") -const registrationErrorFmt = `%s. +const registrationErrorV3Fmt = `%s. Terraform automatically attempts to register the Azure Resource Providers it supports, to ensure it is able to provision resources. @@ -20,7 +22,27 @@ If you don't have permission to register Resource Providers you may wish to disa functionality by adding the following to the Provider block: provider "azurerm" { - "resource_provider_registrations = "none" + skip_provider_registration = true +} +Please note that if you opt out of Resource Provider Registration and Terraform tries +to provision a resource from a Resource Provider which is unregistered, then the errors +may appear misleading - for example: +> API version 2019-XX-XX was not found for Microsoft.Foo +Could suggest that the Resource Provider "Microsoft.Foo" requires registration, but +this could also indicate that this Azure Region doesn't support this API version. +More information on the "skip_provider_registration" property can be found here: +https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs#skip_provider_registration +Encountered the following errors: +%v` + +const registrationErrorV4Fmt = `%s. +Terraform automatically attempts to register the Azure Resource Providers it supports, to +ensure it is able to provision resources. +If you don't have permission to register Resource Providers you may wish to disable this +functionality by adding the following to the Provider block: + +provider "azurerm" { + resource_provider_registrations = "none" } Please note that if you opt out of Resource Provider Registration and Terraform tries @@ -33,7 +55,7 @@ Could suggest that the Resource Provider "Microsoft.Foo" requires registration, this could also indicate that this Azure Region doesn't support this API version. More information on the "resource_provider_registrations" property can be found here: -https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs#resource_provider_registrations +https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs#resource-provider-registrations Encountered the following errors: @@ -43,9 +65,15 @@ Encountered the following errors: // resource providers. func userError(err error) error { if errors.Is(err, ErrNoAuthorization) { - return fmt.Errorf(registrationErrorFmt, "Terraform does not have the necessary permissions to register Resource Providers", err) + if !features.FourPointOhBeta() { + return fmt.Errorf(registrationErrorV3Fmt, "Terraform does not have the necessary permissions to register Resource Providers", err) + } + return fmt.Errorf(registrationErrorV4Fmt, "Terraform does not have the necessary permissions to register Resource Providers", err) + } + if !features.FourPointOhBeta() { + return fmt.Errorf(registrationErrorV3Fmt, "Encountered an error whilst ensuring Resource Providers are registered", err) } - return fmt.Errorf(registrationErrorFmt, "Encountered an error whilst ensuring Resource Providers are registered", err) + return fmt.Errorf(registrationErrorV4Fmt, "Encountered an error whilst ensuring Resource Providers are registered", err) } // registrationErrors is a container for errors encountered when attempting to register resource providers. It makes diff --git a/internal/services/advisor/advisor_suppression_resource.go b/internal/services/advisor/advisor_suppression_resource.go new file mode 100644 index 0000000000000..600381ae97b1f --- /dev/null +++ b/internal/services/advisor/advisor_suppression_resource.go @@ -0,0 +1,179 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package advisor + +import ( + "context" + "fmt" + "time" + + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions" + "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/advisor/validate" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" +) + +var _ sdk.Resource = AdvisorSuppressionResource{} + +type AdvisorSuppressionResource struct{} + +type AdvisorSuppressionResourceModel struct { + Name string `tfschema:"name"` + SuppressionID string `tfschema:"suppression_id"` + RecommendationID string `tfschema:"recommendation_id"` + ResourceID string `tfschema:"resource_id"` + TTL string `tfschema:"ttl"` +} + +func (AdvisorSuppressionResource) Arguments() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + }, + "recommendation_id": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + }, + "resource_id": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: azure.ValidateResourceID, + }, + "ttl": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validate.Duration, + }, + } +} + +func (AdvisorSuppressionResource) Attributes() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{ + "suppression_id": { + Type: pluginsdk.TypeString, + Computed: true, + }, + } +} + +func (AdvisorSuppressionResource) ModelObject() interface{} { + return &AdvisorSuppressionResourceModel{} +} + +func (AdvisorSuppressionResource) ResourceType() string { + return "azurerm_advisor_suppression" +} + +func (r AdvisorSuppressionResource) Create() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 30 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.Advisor.SuppressionsClient + + var model AdvisorSuppressionResourceModel + + if err := metadata.Decode(&model); err != nil { + return err + } + + id := suppressions.NewScopedSuppressionID(model.ResourceID, model.RecommendationID, model.Name) + + existing, err := client.Get(ctx, id) + if err != nil && !response.WasNotFound(existing.HttpResponse) { + return fmt.Errorf("checking for presence of existing %s: %+v", id, err) + } + if !response.WasNotFound(existing.HttpResponse) { + return metadata.ResourceRequiresImport(r.ResourceType(), id) + } + + param := suppressions.SuppressionContract{ + Name: pointer.To(model.Name), + Properties: &suppressions.SuppressionProperties{ + SuppressionId: pointer.To(model.SuppressionID), + }, + } + + if model.TTL != "" { + param.Properties.Ttl = pointer.To(model.TTL) + } + + if _, err := client.Create(ctx, id, param); err != nil { + return fmt.Errorf("creating %s: %+v", id, err) + } + + metadata.SetID(id) + return nil + }, + } +} + +func (AdvisorSuppressionResource) Read() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 5 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.Advisor.SuppressionsClient + + state := AdvisorSuppressionResourceModel{} + + id, err := suppressions.ParseScopedSuppressionID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + resp, err := client.Get(ctx, *id) + if err != nil { + if response.WasNotFound(resp.HttpResponse) { + return metadata.MarkAsGone(id) + } + + return fmt.Errorf("retrieving %s: %+v", id, err) + } + + state.Name = id.SuppressionName + state.ResourceID = id.ResourceUri + state.RecommendationID = id.RecommendationId + + if model := resp.Model; model != nil { + if props := model.Properties; props != nil { + state.TTL = pointer.From(props.Ttl) + state.SuppressionID = pointer.From(props.SuppressionId) + } + } + + return metadata.Encode(&state) + }, + } +} + +func (AdvisorSuppressionResource) Delete() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 30 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.Advisor.SuppressionsClient + + id, err := suppressions.ParseScopedSuppressionID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + if _, err := client.Delete(ctx, *id); err != nil { + return fmt.Errorf("deleting %s: %+v", *id, err) + } + + return nil + }, + } +} + +func (AdvisorSuppressionResource) IDValidationFunc() pluginsdk.SchemaValidateFunc { + return suppressions.ValidateScopedSuppressionID +} diff --git a/internal/services/advisor/advisor_suppression_resource_test.go b/internal/services/advisor/advisor_suppression_resource_test.go new file mode 100644 index 0000000000000..2edd06996697a --- /dev/null +++ b/internal/services/advisor/advisor_suppression_resource_test.go @@ -0,0 +1,72 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package advisor_test + +import ( + "context" + "fmt" + "testing" + + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" + "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" +) + +type AdvisorSuppressionResource struct{} + +func TestAccAnalysisServicesServer_basic(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_advisor_suppression", "test") + r := AdvisorSuppressionResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + +func (AdvisorSuppressionResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { + id, err := suppressions.ParseScopedSuppressionID(state.ID) + if err != nil { + return nil, err + } + + resp, err := clients.Advisor.SuppressionsClient.Get(ctx, *id) + if err != nil { + return nil, fmt.Errorf("retrieving %s: %+v", *id, err) + } + + return pointer.To(resp.Model != nil && resp.Model.Id != nil), nil +} + +func (t AdvisorSuppressionResource) basic(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +data "azurerm_client_config" "current" {} + +data "azurerm_advisor_recommendations" "test" {} + +# The recommendation_names local variable is used to sort the recommendation names. +locals { + recommendation_names = sort(data.azurerm_advisor_recommendations.test.recommendations[*].recommendation_name) +} + +resource "azurerm_advisor_suppression" "test" { + name = "acctest%d" + recommendation_id = local.recommendation_names[0] + resource_id = "/subscriptions/${data.azurerm_client_config.current.subscription_id}" + ttl = "00:30:00" +} +`, data.RandomInteger) +} diff --git a/internal/services/advisor/client/client.go b/internal/services/advisor/client/client.go index 5ecfa8308ba29..30287025ec695 100644 --- a/internal/services/advisor/client/client.go +++ b/internal/services/advisor/client/client.go @@ -7,21 +7,30 @@ import ( "fmt" "github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/getrecommendations" + "github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) type Client struct { RecommendationsClient *getrecommendations.GetRecommendationsClient + SuppressionsClient *suppressions.SuppressionsClient } func NewClient(o *common.ClientOptions) (*Client, error) { recommendationsClient, err := getrecommendations.NewGetRecommendationsClientWithBaseURI(o.Environment.ResourceManager) if err != nil { - return nil, fmt.Errorf("building Recommendations client: %+v", err) + return nil, fmt.Errorf("building recommendations client: %+v", err) } o.Configure(recommendationsClient.Client, o.Authorizers.ResourceManager) + suppressionsClient, err := suppressions.NewSuppressionsClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building suppressions client: %+v", err) + } + o.Configure(suppressionsClient.Client, o.Authorizers.ResourceManager) + return &Client{ RecommendationsClient: recommendationsClient, + SuppressionsClient: suppressionsClient, }, nil } diff --git a/internal/services/advisor/registration.go b/internal/services/advisor/registration.go index e6aeffa59df62..1fee463358adb 100644 --- a/internal/services/advisor/registration.go +++ b/internal/services/advisor/registration.go @@ -10,7 +10,10 @@ import ( type Registration struct{} -var _ sdk.UntypedServiceRegistrationWithAGitHubLabel = Registration{} +var ( + _ sdk.TypedServiceRegistrationWithAGitHubLabel = Registration{} + _ sdk.UntypedServiceRegistrationWithAGitHubLabel = Registration{} +) func (r Registration) AssociatedGitHubLabel() string { return "service/advisor" @@ -39,3 +42,15 @@ func (r Registration) SupportedDataSources() map[string]*pluginsdk.Resource { func (r Registration) SupportedResources() map[string]*pluginsdk.Resource { return map[string]*pluginsdk.Resource{} } + +// DataSources returns a list of Data Sources supported by this Service +func (r Registration) DataSources() []sdk.DataSource { + return []sdk.DataSource{} +} + +// Resources returns a list of Resources supported by this Service +func (r Registration) Resources() []sdk.Resource { + return []sdk.Resource{ + AdvisorSuppressionResource{}, + } +} diff --git a/internal/services/advisor/validate/duration.go b/internal/services/advisor/validate/duration.go new file mode 100644 index 0000000000000..3c4af0dffbafa --- /dev/null +++ b/internal/services/advisor/validate/duration.go @@ -0,0 +1,19 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package validate + +import ( + "fmt" + "regexp" +) + +func Duration(v interface{}, k string) (warnings []string, errors []error) { + value := v.(string) + + if !regexp.MustCompile(`^(?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}:[0-9]{2}$`).Match([]byte(value)) { + errors = append(errors, fmt.Errorf("%q must be in format DD:HH:MM:SS. If DD is 00, it has to be omit", k)) + } + + return warnings, errors +} diff --git a/internal/services/apimanagement/api_management_logger_resource.go b/internal/services/apimanagement/api_management_logger_resource.go index fbe28eb08420d..f3219b0e4ad0e 100644 --- a/internal/services/apimanagement/api_management_logger_resource.go +++ b/internal/services/apimanagement/api_management_logger_resource.go @@ -114,11 +114,31 @@ func resourceApiManagementLogger() *pluginsdk.Resource { ConflictsWith: []string{"eventhub"}, Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ + "connection_string": { + Type: pluginsdk.TypeString, + Optional: true, + Sensitive: true, + ValidateFunc: validation.StringIsNotEmpty, + AtLeastOneOf: []string{ + "application_insights.0.connection_string", + "application_insights.0.instrumentation_key", + }, + ConflictsWith: []string{ + "application_insights.0.instrumentation_key", + }, + }, "instrumentation_key": { Type: pluginsdk.TypeString, - Required: true, + Optional: true, Sensitive: true, ValidateFunc: validation.StringIsNotEmpty, + AtLeastOneOf: []string{ + "application_insights.0.connection_string", + "application_insights.0.instrumentation_key", + }, + ConflictsWith: []string{ + "application_insights.0.connection_string", + }, }, }, }, @@ -313,7 +333,12 @@ func expandApiManagementLoggerEventHub(input []interface{}) *map[string]string { func expandApiManagementLoggerApplicationInsights(input []interface{}) *map[string]string { credentials := make(map[string]string) ai := input[0].(map[string]interface{}) - credentials["instrumentationKey"] = ai["instrumentation_key"].(string) + if ai["instrumentation_key"].(string) != "" { + credentials["instrumentationKey"] = ai["instrumentation_key"].(string) + } + if ai["connection_string"].(string) != "" { + credentials["connectionString"] = ai["connection_string"].(string) + } return &credentials } diff --git a/internal/services/apimanagement/api_management_logger_resource_test.go b/internal/services/apimanagement/api_management_logger_resource_test.go index f909428bf4c98..ea43cce7af336 100644 --- a/internal/services/apimanagement/api_management_logger_resource_test.go +++ b/internal/services/apimanagement/api_management_logger_resource_test.go @@ -119,7 +119,31 @@ func TestAccApiManagementLogger_basicApplicationInsights(t *testing.T) { ResourceName: data.ResourceName, ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"application_insights.#", "application_insights.0.instrumentation_key", "application_insights.0.%"}, + ImportStateVerifyIgnore: []string{"application_insights.#", "application_insights.0.connection_string", "application_insights.0.instrumentation_key", "application_insights.0.%"}, + }, + }) +} + +func TestAccApiManagementLogger_applicationInsightsConnectionString(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_api_management_logger", "test") + r := ApiManagementLoggerResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.applicationInsightsConnectionString(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("buffered").HasValue("true"), + check.That(data.ResourceName).Key("eventhub.#").HasValue("0"), + check.That(data.ResourceName).Key("application_insights.#").HasValue("1"), + check.That(data.ResourceName).Key("application_insights.0.connection_string").Exists(), + ), + }, + { + ResourceName: data.ResourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"application_insights.#", "application_insights.0.connection_string", "application_insights.0.instrumentation_key", "application_insights.0.%"}, }, }) } @@ -145,7 +169,7 @@ func TestAccApiManagementLogger_complete(t *testing.T) { ResourceName: data.ResourceName, ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"application_insights.#", "application_insights.0.instrumentation_key", "application_insights.0.%"}, + ImportStateVerifyIgnore: []string{"application_insights.#", "application_insights.0.connection_string", "application_insights.0.instrumentation_key", "application_insights.0.%"}, }, }) } @@ -472,6 +496,46 @@ resource "azurerm_api_management_logger" "test" { `, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger) } +func (ApiManagementLoggerResource) applicationInsightsConnectionString(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-%d" + location = "%s" +} + +resource "azurerm_application_insights" "test" { + name = "acctestappinsights-%d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + application_type = "other" +} + +resource "azurerm_api_management" "test" { + name = "acctestAM-%d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + publisher_name = "pub1" + publisher_email = "pub1@email.com" + + sku_name = "Consumption_0" +} + +resource "azurerm_api_management_logger" "test" { + name = "acctestapimnglogger-%d" + api_management_name = azurerm_api_management.test.name + resource_group_name = azurerm_resource_group.test.name + + application_insights { + connection_string = azurerm_application_insights.test.connection_string + } +} +`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger) +} + func (ApiManagementLoggerResource) complete(data acceptance.TestData, description, buffered string) string { return fmt.Sprintf(` provider "azurerm" { diff --git a/internal/services/appconfiguration/app_configuration_resource_test.go b/internal/services/appconfiguration/app_configuration_resource_test.go index 7605b102cad34..cd7c9ea2e3bcb 100644 --- a/internal/services/appconfiguration/app_configuration_resource_test.go +++ b/internal/services/appconfiguration/app_configuration_resource_test.go @@ -256,7 +256,7 @@ func TestAccAppConfiguration_replicaUpdate(t *testing.T) { }, data.ImportStep(), { - Config: r.complete(data), + Config: r.standard(data), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), ), diff --git a/internal/services/applicationinsights/application_insights_resource.go b/internal/services/applicationinsights/application_insights_resource.go index a253b146336b2..fc176338d8e9f 100644 --- a/internal/services/applicationinsights/application_insights_resource.go +++ b/internal/services/applicationinsights/application_insights_resource.go @@ -19,7 +19,6 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/workspaces" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/services/applicationinsights/migration" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" @@ -171,19 +170,6 @@ func resourceApplicationInsights() *pluginsdk.Resource { }, } - if !features.FourPointOhBeta() { - resource.Schema["daily_data_cap_in_gb"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeFloat, - Optional: true, - Computed: true, - ValidateFunc: validation.FloatAtLeast(0), - } - resource.Schema["daily_data_cap_notifications_disabled"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeBool, - Optional: true, - Computed: true, - } - } return resource } @@ -281,6 +267,11 @@ func resourceApplicationInsightsCreateUpdate(d *pluginsdk.ResourceData, meta int if billingRead.Model == nil { return fmt.Errorf("model is nil for billing features") } + + if billingRead.Model.DataVolumeCap == nil { + billingRead.Model.DataVolumeCap = &billing.ApplicationInsightsComponentDataVolumeCap{} + } + applicationInsightsComponentBillingFeatures := billing.ApplicationInsightsComponentBillingFeatures{ CurrentBillingFeatures: billingRead.Model.CurrentBillingFeatures, DataVolumeCap: billingRead.Model.DataVolumeCap, diff --git a/internal/services/appservice/client/client.go b/internal/services/appservice/client/client.go index 1063269f2138f..72f2d95652a9d 100644 --- a/internal/services/appservice/client/client.go +++ b/internal/services/appservice/client/client.go @@ -7,10 +7,10 @@ import ( "fmt" "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceenvironments" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans" "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/resourceproviders" "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/staticsites" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) diff --git a/internal/services/appservice/custompollers/app_service_active_slot_poller.go b/internal/services/appservice/custompollers/app_service_active_slot_poller.go index 5c2b5ff6fd022..e9af309b97b69 100644 --- a/internal/services/appservice/custompollers/app_service_active_slot_poller.go +++ b/internal/services/appservice/custompollers/app_service_active_slot_poller.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" ) diff --git a/internal/services/appservice/function_app_active_slot_resource.go b/internal/services/appservice/function_app_active_slot_resource.go index 7a408cacd0029..799c1f7ed3f99 100644 --- a/internal/services/appservice/function_app_active_slot_resource.go +++ b/internal/services/appservice/function_app_active_slot_resource.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" diff --git a/internal/services/appservice/function_app_active_slot_resource_test.go b/internal/services/appservice/function_app_active_slot_resource_test.go index 6e6e2bf1bad07..ff2c08525c95a 100644 --- a/internal/services/appservice/function_app_active_slot_resource_test.go +++ b/internal/services/appservice/function_app_active_slot_resource_test.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/appservice/function_app_function_resource.go b/internal/services/appservice/function_app_function_resource.go index 786dc54c8a914..2106080bb6e19 100644 --- a/internal/services/appservice/function_app_function_resource.go +++ b/internal/services/appservice/function_app_function_resource.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/validate" diff --git a/internal/services/appservice/function_app_function_resource_test.go b/internal/services/appservice/function_app_function_resource_test.go index 06bdaa3343b37..88a9058a52140 100644 --- a/internal/services/appservice/function_app_function_resource_test.go +++ b/internal/services/appservice/function_app_function_resource_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/appservice/function_app_hybrid_connection_resource.go b/internal/services/appservice/function_app_hybrid_connection_resource.go index 6ec8f19637ff0..450262b132cf7 100644 --- a/internal/services/appservice/function_app_hybrid_connection_resource.go +++ b/internal/services/appservice/function_app_hybrid_connection_resource.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/hybridconnections" "github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/namespaces" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" azValidate "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" diff --git a/internal/services/appservice/function_app_hybrid_connection_resource_test.go b/internal/services/appservice/function_app_hybrid_connection_resource_test.go index b4f2f113a78b9..cc77db97783c2 100644 --- a/internal/services/appservice/function_app_hybrid_connection_resource_test.go +++ b/internal/services/appservice/function_app_hybrid_connection_resource_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/appservice/helpers/auth_v2_schema.go b/internal/services/appservice/helpers/auth_v2_schema.go index 990adf27c3a1f..54c9d35e4d7e3 100644 --- a/internal/services/appservice/helpers/auth_v2_schema.go +++ b/internal/services/appservice/helpers/auth_v2_schema.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" diff --git a/internal/services/appservice/helpers/auto_heal.go b/internal/services/appservice/helpers/auto_heal.go index 65f01194be803..4f53a443b183c 100644 --- a/internal/services/appservice/helpers/auto_heal.go +++ b/internal/services/appservice/helpers/auto_heal.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -79,9 +79,6 @@ func autoHealSettingSchemaWindows() *pluginsdk.Schema { "action": autoHealActionSchemaWindows(), }, }, - RequiredWith: []string{ - "site_config.0.auto_heal_enabled", - }, } } @@ -218,7 +215,7 @@ func autoHealTriggerSchemaWindows() *pluginsdk.Schema { }, "status_code": { - Type: pluginsdk.TypeList, + Type: pluginsdk.TypeSet, Optional: true, Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ @@ -388,7 +385,7 @@ func autoHealTriggerSchemaWindowsComputed() *pluginsdk.Schema { }, "status_code": { - Type: pluginsdk.TypeList, + Type: pluginsdk.TypeSet, Computed: true, Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ diff --git a/internal/services/appservice/helpers/common_web_app_schema.go b/internal/services/appservice/helpers/common_web_app_schema.go index 8cecb3bc684ba..3af8a38f3a31b 100644 --- a/internal/services/appservice/helpers/common_web_app_schema.go +++ b/internal/services/appservice/helpers/common_web_app_schema.go @@ -8,7 +8,7 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" ) diff --git a/internal/services/appservice/helpers/credentials_reader.go b/internal/services/appservice/helpers/credentials_reader.go index 84e6cfed59abc..02561879f8559 100644 --- a/internal/services/appservice/helpers/credentials_reader.go +++ b/internal/services/appservice/helpers/credentials_reader.go @@ -10,7 +10,7 @@ import ( "io" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" ) func ListPublishingCredentials(ctx context.Context, client *webapps.WebAppsClient, id commonids.AppServiceId) (*webapps.User, error) { diff --git a/internal/services/appservice/helpers/function_app_schema.go b/internal/services/appservice/helpers/function_app_schema.go index b2517a4611cb9..ca7d021db9653 100644 --- a/internal/services/appservice/helpers/function_app_schema.go +++ b/internal/services/appservice/helpers/function_app_schema.go @@ -9,7 +9,7 @@ import ( "strings" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" diff --git a/internal/services/appservice/helpers/function_app_schema_test.go b/internal/services/appservice/helpers/function_app_schema_test.go index 15f100a20468f..5f08bf9f11888 100644 --- a/internal/services/appservice/helpers/function_app_schema_test.go +++ b/internal/services/appservice/helpers/function_app_schema_test.go @@ -8,7 +8,7 @@ import ( "sort" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/helpers" "github.com/hashicorp/terraform-provider-azurerm/utils" ) diff --git a/internal/services/appservice/helpers/function_app_slot_schema.go b/internal/services/appservice/helpers/function_app_slot_schema.go index ef4fd60f1fba4..6d921b4c07b7b 100644 --- a/internal/services/appservice/helpers/function_app_slot_schema.go +++ b/internal/services/appservice/helpers/function_app_slot_schema.go @@ -9,7 +9,7 @@ import ( "strings" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" apimValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/internal/services/appservice/helpers/linux_web_app_schema.go b/internal/services/appservice/helpers/linux_web_app_schema.go index 52c88ccfd8ef5..ca635f77bc5bf 100644 --- a/internal/services/appservice/helpers/linux_web_app_schema.go +++ b/internal/services/appservice/helpers/linux_web_app_schema.go @@ -9,7 +9,7 @@ import ( "strings" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/validate" @@ -23,7 +23,6 @@ type SiteConfigLinux struct { ApiManagementConfigId string `tfschema:"api_management_api_id"` ApiDefinition string `tfschema:"api_definition_url"` AppCommandLine string `tfschema:"app_command_line"` - AutoHeal bool `tfschema:"auto_heal_enabled"` AutoHealSettings []AutoHealSettingLinux `tfschema:"auto_heal_setting"` UseManagedIdentityACR bool `tfschema:"container_registry_use_managed_identity"` ContainerRegistryMSI string `tfschema:"container_registry_managed_identity_client_id"` @@ -88,14 +87,6 @@ func SiteConfigSchemaLinux() *pluginsdk.Schema { "application_stack": linuxApplicationStackSchema(), - "auto_heal_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - RequiredWith: []string{ - "site_config.0.auto_heal_setting", - }, - }, - "auto_heal_setting": autoHealSettingSchemaLinux(), "container_registry_use_managed_identity": { @@ -321,11 +312,6 @@ func SiteConfigSchemaLinuxComputed() *pluginsdk.Schema { "application_stack": linuxApplicationStackSchemaComputed(), - "auto_heal_enabled": { - Type: pluginsdk.TypeBool, - Computed: true, - }, - "auto_heal_setting": autoHealSettingSchemaLinuxComputed(), "container_registry_use_managed_identity": { @@ -490,9 +476,6 @@ func autoHealSettingSchemaLinux() *pluginsdk.Schema { "action": autoHealActionSchemaLinux(), }, }, - RequiredWith: []string{ - "site_config.0.auto_heal_enabled", - }, } } @@ -586,7 +569,7 @@ func autoHealTriggerSchemaLinux() *pluginsdk.Schema { }, "status_code": { - Type: pluginsdk.TypeList, + Type: pluginsdk.TypeSet, Optional: true, Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ @@ -753,7 +736,7 @@ func autoHealTriggerSchemaLinuxComputed() *pluginsdk.Schema { }, "status_code": { - Type: pluginsdk.TypeList, + Type: pluginsdk.TypeSet, Computed: true, Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ @@ -892,7 +875,7 @@ func (s *SiteConfigLinux) ExpandForCreate(appSettings map[string]string) (*webap expanded.FtpsState = pointer.To(webapps.FtpsState(s.FtpsState)) expanded.MinTlsVersion = pointer.To(webapps.SupportedTlsVersions(s.MinTlsVersion)) expanded.ScmMinTlsVersion = pointer.To(webapps.SupportedTlsVersions(s.ScmMinTlsVersion)) - expanded.AutoHealEnabled = pointer.To(s.AutoHeal) + expanded.AutoHealEnabled = pointer.To(false) expanded.VnetRouteAllEnabled = pointer.To(s.VnetRouteAllEnabled) expanded.IPSecurityRestrictionsDefaultAction = pointer.To(webapps.DefaultAction(s.IpRestrictionDefaultAction)) expanded.ScmIPSecurityRestrictionsDefaultAction = pointer.To(webapps.DefaultAction(s.ScmIpRestrictionDefaultAction)) @@ -1009,6 +992,7 @@ func (s *SiteConfigLinux) ExpandForCreate(appSettings map[string]string) (*webap } if len(s.AutoHealSettings) == 1 { + expanded.AutoHealEnabled = pointer.To(true) expanded.AutoHealRules = expandAutoHealSettingsLinux(s.AutoHealSettings) } @@ -1020,7 +1004,6 @@ func (s *SiteConfigLinux) ExpandForUpdate(metadata sdk.ResourceMetaData, existin expanded.AlwaysOn = pointer.To(s.AlwaysOn) expanded.AcrUseManagedIdentityCreds = pointer.To(s.UseManagedIdentityACR) - expanded.AutoHealEnabled = pointer.To(s.AutoHeal) expanded.HTTP20Enabled = pointer.To(s.Http2Enabled) expanded.LocalMySqlEnabled = pointer.To(s.LocalMysql) expanded.RemoteDebuggingEnabled = pointer.To(s.RemoteDebugging) @@ -1175,6 +1158,10 @@ func (s *SiteConfigLinux) ExpandForUpdate(metadata sdk.ResourceMetaData, existin } if metadata.ResourceData.HasChange("site_config.0.auto_heal_setting") { + expanded.AutoHealEnabled = pointer.To(false) + if len(s.AutoHealSettings) != 0 { + expanded.AutoHealEnabled = pointer.To(true) + } expanded.AutoHealRules = expandAutoHealSettingsLinux(s.AutoHealSettings) } @@ -1185,7 +1172,6 @@ func (s *SiteConfigLinux) Flatten(appSiteConfig *webapps.SiteConfig) { if appSiteConfig != nil { s.AlwaysOn = pointer.From(appSiteConfig.AlwaysOn) s.AppCommandLine = pointer.From(appSiteConfig.AppCommandLine) - s.AutoHeal = pointer.From(appSiteConfig.AutoHealEnabled) s.AutoHealSettings = flattenAutoHealSettingsLinux(appSiteConfig.AutoHealRules) s.ContainerRegistryMSI = pointer.From(appSiteConfig.AcrUserManagedIdentityID) s.DetailedErrorLogging = pointer.From(appSiteConfig.DetailedErrorLoggingEnabled) diff --git a/internal/services/appservice/helpers/publish_app.go b/internal/services/appservice/helpers/publish_app.go index ca7f1968b141f..ee9229657c849 100644 --- a/internal/services/appservice/helpers/publish_app.go +++ b/internal/services/appservice/helpers/publish_app.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" ) diff --git a/internal/services/appservice/helpers/service_plan.go b/internal/services/appservice/helpers/service_plan.go index 91286e9a426e5..d84a16121afe5 100644 --- a/internal/services/appservice/helpers/service_plan.go +++ b/internal/services/appservice/helpers/service_plan.go @@ -9,7 +9,7 @@ import ( "strings" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) diff --git a/internal/services/appservice/helpers/shared_schema.go b/internal/services/appservice/helpers/shared_schema.go index 1c70716f9e076..1cf34505e05b2 100644 --- a/internal/services/appservice/helpers/shared_schema.go +++ b/internal/services/appservice/helpers/shared_schema.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" diff --git a/internal/services/appservice/helpers/web_app_slot_schema.go b/internal/services/appservice/helpers/web_app_slot_schema.go index 6339fcf2205cb..cf7e28851a0e4 100644 --- a/internal/services/appservice/helpers/web_app_slot_schema.go +++ b/internal/services/appservice/helpers/web_app_slot_schema.go @@ -9,7 +9,7 @@ import ( "strings" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" apimValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/validate" @@ -22,7 +22,6 @@ type SiteConfigLinuxWebAppSlot struct { ApiManagementConfigId string `tfschema:"api_management_api_id"` ApiDefinition string `tfschema:"api_definition_url"` AppCommandLine string `tfschema:"app_command_line"` - AutoHeal bool `tfschema:"auto_heal_enabled"` AutoHealSettings []AutoHealSettingLinux `tfschema:"auto_heal_setting"` AutoSwapSlotName string `tfschema:"auto_swap_slot_name"` UseManagedIdentityACR bool `tfschema:"container_registry_use_managed_identity"` @@ -88,14 +87,6 @@ func SiteConfigSchemaLinuxWebAppSlot() *pluginsdk.Schema { "application_stack": linuxApplicationStackSchema(), - "auto_heal_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - RequiredWith: []string{ - "site_config.0.auto_heal_setting", - }, - }, - "auto_heal_setting": autoHealSettingSchemaLinux(), "container_registry_use_managed_identity": { @@ -292,7 +283,6 @@ type SiteConfigWindowsWebAppSlot struct { ApiDefinition string `tfschema:"api_definition_url"` ApplicationStack []ApplicationStackWindows `tfschema:"application_stack"` AppCommandLine string `tfschema:"app_command_line"` - AutoHeal bool `tfschema:"auto_heal_enabled"` AutoHealSettings []AutoHealSettingWindows `tfschema:"auto_heal_setting"` AutoSwapSlotName string `tfschema:"auto_swap_slot_name"` UseManagedIdentityACR bool `tfschema:"container_registry_use_managed_identity"` @@ -358,15 +348,6 @@ func SiteConfigSchemaWindowsWebAppSlot() *pluginsdk.Schema { Optional: true, }, - "auto_heal_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: false, - RequiredWith: []string{ - "site_config.0.auto_heal_setting", - }, - }, - "auto_heal_setting": autoHealSettingSchemaWindows(), "auto_swap_slot_name": { @@ -575,7 +556,7 @@ func (s *SiteConfigLinuxWebAppSlot) ExpandForCreate(appSettings map[string]strin expanded.FtpsState = pointer.To(webapps.FtpsState(s.FtpsState)) expanded.MinTlsVersion = pointer.To(webapps.SupportedTlsVersions(s.MinTlsVersion)) expanded.ScmMinTlsVersion = pointer.To(webapps.SupportedTlsVersions(s.ScmMinTlsVersion)) - expanded.AutoHealEnabled = pointer.To(s.AutoHeal) + expanded.AutoHealEnabled = pointer.To(false) expanded.VnetRouteAllEnabled = pointer.To(s.VnetRouteAllEnabled) expanded.IPSecurityRestrictionsDefaultAction = pointer.To(webapps.DefaultAction(s.IpRestrictionDefaultAction)) expanded.ScmIPSecurityRestrictionsDefaultAction = pointer.To(webapps.DefaultAction(s.ScmIpRestrictionDefaultAction)) @@ -698,6 +679,7 @@ func (s *SiteConfigLinuxWebAppSlot) ExpandForCreate(appSettings map[string]strin } if len(s.AutoHealSettings) == 1 { + expanded.AutoHealEnabled = pointer.To(true) expanded.AutoHealRules = expandAutoHealSettingsLinux(s.AutoHealSettings) } @@ -709,7 +691,6 @@ func (s *SiteConfigLinuxWebAppSlot) ExpandForUpdate(metadata sdk.ResourceMetaDat expanded.AlwaysOn = pointer.To(s.AlwaysOn) expanded.AcrUseManagedIdentityCreds = pointer.To(s.UseManagedIdentityACR) - expanded.AutoHealEnabled = pointer.To(s.AutoHeal) expanded.HTTP20Enabled = pointer.To(s.Http2Enabled) expanded.LocalMySqlEnabled = pointer.To(s.LocalMysql) expanded.RemoteDebuggingEnabled = pointer.To(s.RemoteDebugging) @@ -870,6 +851,10 @@ func (s *SiteConfigLinuxWebAppSlot) ExpandForUpdate(metadata sdk.ResourceMetaDat } if metadata.ResourceData.HasChange("site_config.0.auto_heal_setting") { + expanded.AutoHealEnabled = pointer.To(false) + if len(s.AutoHealSettings) != 0 { + expanded.AutoHealEnabled = pointer.To(true) + } expanded.AutoHealRules = expandAutoHealSettingsLinux(s.AutoHealSettings) } @@ -879,7 +864,6 @@ func (s *SiteConfigLinuxWebAppSlot) ExpandForUpdate(metadata sdk.ResourceMetaDat func (s *SiteConfigLinuxWebAppSlot) Flatten(appSiteSlotConfig *webapps.SiteConfig) { s.AlwaysOn = pointer.From(appSiteSlotConfig.AlwaysOn) s.AppCommandLine = pointer.From(appSiteSlotConfig.AppCommandLine) - s.AutoHeal = pointer.From(appSiteSlotConfig.AutoHealEnabled) s.AutoHealSettings = flattenAutoHealSettingsLinux(appSiteSlotConfig.AutoHealRules) s.AutoSwapSlotName = pointer.From(appSiteSlotConfig.AutoSwapSlotName) s.ContainerRegistryMSI = pointer.From(appSiteSlotConfig.AcrUserManagedIdentityID) @@ -1000,7 +984,7 @@ func (s *SiteConfigWindowsWebAppSlot) ExpandForCreate(appSettings map[string]str expanded.AlwaysOn = pointer.To(s.AlwaysOn) expanded.AcrUseManagedIdentityCreds = pointer.To(s.UseManagedIdentityACR) - expanded.AutoHealEnabled = pointer.To(s.AutoHeal) + expanded.AutoHealEnabled = pointer.To(false) expanded.FtpsState = pointer.To(webapps.FtpsState(s.FtpsState)) expanded.HTTP20Enabled = pointer.To(s.Http2Enabled) expanded.LoadBalancing = pointer.To(webapps.SiteLoadBalancing(s.LoadBalancing)) @@ -1145,6 +1129,7 @@ func (s *SiteConfigWindowsWebAppSlot) ExpandForCreate(appSettings map[string]str } if len(s.AutoHealSettings) != 0 { + expanded.AutoHealEnabled = pointer.To(true) expanded.AutoHealRules = expandAutoHealSettingsWindows(s.AutoHealSettings) } return expanded, nil @@ -1158,7 +1143,6 @@ func (s *SiteConfigWindowsWebAppSlot) ExpandForUpdate(metadata sdk.ResourceMetaD expanded.AlwaysOn = pointer.To(s.AlwaysOn) expanded.AcrUseManagedIdentityCreds = pointer.To(s.UseManagedIdentityACR) - expanded.AutoHealEnabled = pointer.To(s.AutoHeal) expanded.HTTP20Enabled = pointer.To(s.Http2Enabled) expanded.ScmIPSecurityRestrictionsUseMain = pointer.To(s.ScmUseMainIpRestriction) expanded.LocalMySqlEnabled = pointer.To(s.LocalMysql) @@ -1341,6 +1325,10 @@ func (s *SiteConfigWindowsWebAppSlot) ExpandForUpdate(metadata sdk.ResourceMetaD } if metadata.ResourceData.HasChange("site_config.0.auto_heal_setting") { + expanded.AutoHealEnabled = pointer.To(false) + if len(s.AutoHealSettings) != 0 { + expanded.AutoHealEnabled = pointer.To(true) + } expanded.AutoHealRules = expandAutoHealSettingsWindows(s.AutoHealSettings) } @@ -1358,7 +1346,6 @@ func (s *SiteConfigWindowsWebAppSlot) Flatten(appSiteSlotConfig *webapps.SiteCon s.AlwaysOn = pointer.From(appSiteSlotConfig.AlwaysOn) s.AppCommandLine = pointer.From(appSiteSlotConfig.AppCommandLine) - s.AutoHeal = pointer.From(appSiteSlotConfig.AutoHealEnabled) s.AutoHealSettings = flattenAutoHealSettingsWindows(appSiteSlotConfig.AutoHealRules) s.AutoSwapSlotName = pointer.From(appSiteSlotConfig.AutoSwapSlotName) s.ContainerRegistryUserMSI = pointer.From(appSiteSlotConfig.AcrUserManagedIdentityID) diff --git a/internal/services/appservice/helpers/windows_web_app_schema.go b/internal/services/appservice/helpers/windows_web_app_schema.go index 24ee3f5acf1fb..1481e907c70f0 100644 --- a/internal/services/appservice/helpers/windows_web_app_schema.go +++ b/internal/services/appservice/helpers/windows_web_app_schema.go @@ -9,7 +9,7 @@ import ( "strings" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/parse" @@ -23,7 +23,6 @@ type SiteConfigWindows struct { ApiManagementConfigId string `tfschema:"api_management_api_id"` ApiDefinition string `tfschema:"api_definition_url"` AppCommandLine string `tfschema:"app_command_line"` - AutoHeal bool `tfschema:"auto_heal_enabled"` AutoHealSettings []AutoHealSettingWindows `tfschema:"auto_heal_setting"` UseManagedIdentityACR bool `tfschema:"container_registry_use_managed_identity"` ContainerRegistryUserMSI string `tfschema:"container_registry_managed_identity_client_id"` @@ -92,15 +91,6 @@ func SiteConfigSchemaWindows() *pluginsdk.Schema { Optional: true, }, - "auto_heal_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: false, - RequiredWith: []string{ - "site_config.0.auto_heal_setting", - }, - }, - "auto_heal_setting": autoHealSettingSchemaWindows(), "container_registry_use_managed_identity": { @@ -335,11 +325,6 @@ func SiteConfigSchemaWindowsComputed() *pluginsdk.Schema { Computed: true, }, - "auto_heal_enabled": { - Type: pluginsdk.TypeBool, - Computed: true, - }, - "auto_heal_setting": autoHealSettingSchemaWindowsComputed(), "container_registry_use_managed_identity": { @@ -483,8 +468,8 @@ func (s *SiteConfigWindows) ExpandForCreate(appSettings map[string]string) (*web expanded := &webapps.SiteConfig{} expanded.AlwaysOn = pointer.To(s.AlwaysOn) + expanded.AutoHealEnabled = pointer.To(false) expanded.AcrUseManagedIdentityCreds = pointer.To(s.UseManagedIdentityACR) - expanded.AutoHealEnabled = pointer.To(s.AutoHeal) expanded.FtpsState = pointer.To(webapps.FtpsState(s.FtpsState)) expanded.HTTP20Enabled = pointer.To(s.Http2Enabled) expanded.LoadBalancing = pointer.To(webapps.SiteLoadBalancing(s.LoadBalancing)) @@ -627,6 +612,7 @@ func (s *SiteConfigWindows) ExpandForCreate(appSettings map[string]string) (*web } if len(s.AutoHealSettings) != 0 { + expanded.AutoHealEnabled = pointer.To(true) expanded.AutoHealRules = expandAutoHealSettingsWindows(s.AutoHealSettings) } @@ -641,7 +627,6 @@ func (s *SiteConfigWindows) ExpandForUpdate(metadata sdk.ResourceMetaData, exist expanded.AlwaysOn = pointer.To(s.AlwaysOn) expanded.AcrUseManagedIdentityCreds = pointer.To(s.UseManagedIdentityACR) - expanded.AutoHealEnabled = pointer.To(s.AutoHeal) expanded.HTTP20Enabled = pointer.To(s.Http2Enabled) expanded.ScmIPSecurityRestrictionsUseMain = pointer.To(s.ScmUseMainIpRestriction) expanded.LocalMySqlEnabled = pointer.To(s.LocalMysql) @@ -828,7 +813,12 @@ func (s *SiteConfigWindows) ExpandForUpdate(metadata sdk.ResourceMetaData, exist } expanded.Cors = cors } + if metadata.ResourceData.HasChange("site_config.0.auto_heal_setting") { + expanded.AutoHealEnabled = pointer.To(false) + if len(s.AutoHealSettings) != 0 { + expanded.AutoHealEnabled = pointer.To(true) + } expanded.AutoHealRules = expandAutoHealSettingsWindows(s.AutoHealSettings) } @@ -843,7 +833,6 @@ func (s *SiteConfigWindows) Flatten(appSiteConfig *webapps.SiteConfig, currentSt if appSiteConfig != nil { s.AlwaysOn = pointer.From(appSiteConfig.AlwaysOn) s.AppCommandLine = pointer.From(appSiteConfig.AppCommandLine) - s.AutoHeal = pointer.From(appSiteConfig.AutoHealEnabled) s.AutoHealSettings = flattenAutoHealSettingsWindows(appSiteConfig.AutoHealRules) s.ContainerRegistryUserMSI = pointer.From(appSiteConfig.AcrUserManagedIdentityID) s.Cors = FlattenCorsSettings(appSiteConfig.Cors) diff --git a/internal/services/appservice/linux_function_app_data_source.go b/internal/services/appservice/linux_function_app_data_source.go index f1c902b6b67d0..b7b5697df03c5 100644 --- a/internal/services/appservice/linux_function_app_data_source.go +++ b/internal/services/appservice/linux_function_app_data_source.go @@ -16,7 +16,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/helpers" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/validate" diff --git a/internal/services/appservice/linux_function_app_resource.go b/internal/services/appservice/linux_function_app_resource.go index a2aeee80cee37..73d127a397cfe 100644 --- a/internal/services/appservice/linux_function_app_resource.go +++ b/internal/services/appservice/linux_function_app_resource.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/resourceproviders" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/helpers" diff --git a/internal/services/appservice/linux_function_app_slot_resource.go b/internal/services/appservice/linux_function_app_slot_resource.go index 06a3a4e9622bd..b861db1efc810 100644 --- a/internal/services/appservice/linux_function_app_slot_resource.go +++ b/internal/services/appservice/linux_function_app_slot_resource.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/resourceproviders" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" diff --git a/internal/services/appservice/linux_function_app_slot_resource_test.go b/internal/services/appservice/linux_function_app_slot_resource_test.go index c51076eecce84..5cabd96c02109 100644 --- a/internal/services/appservice/linux_function_app_slot_resource_test.go +++ b/internal/services/appservice/linux_function_app_slot_resource_test.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/appservice/linux_web_app_data_source.go b/internal/services/appservice/linux_web_app_data_source.go index bee4c7017d41e..ebd55e6779adf 100644 --- a/internal/services/appservice/linux_web_app_data_source.go +++ b/internal/services/appservice/linux_web_app_data_source.go @@ -15,7 +15,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/helpers" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/validate" diff --git a/internal/services/appservice/linux_web_app_resource.go b/internal/services/appservice/linux_web_app_resource.go index 21efb24d92dfd..c3366e37f5cc6 100644 --- a/internal/services/appservice/linux_web_app_resource.go +++ b/internal/services/appservice/linux_web_app_resource.go @@ -17,7 +17,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/resourceproviders" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/helpers" @@ -781,6 +781,12 @@ func (r LinuxWebAppResource) Update() sdk.ResourceFunc { } } + webAppSiteConfig, err := client.GetConfiguration(ctx, *id) + if err != nil { + return fmt.Errorf("reading Site Config for Linux %s: %+v", id, err) + } + model.Properties.SiteConfig = webAppSiteConfig.Model.Properties + if metadata.ResourceData.HasChange("enabled") { model.Properties.Enabled = pointer.To(state.Enabled) } diff --git a/internal/services/appservice/linux_web_app_resource_authv2_test.go b/internal/services/appservice/linux_web_app_resource_authv2_test.go index 9047384e06158..c5e114b136542 100644 --- a/internal/services/appservice/linux_web_app_resource_authv2_test.go +++ b/internal/services/appservice/linux_web_app_resource_authv2_test.go @@ -888,8 +888,6 @@ resource "azurerm_linux_web_app" "test" { container_registry_use_managed_identity = true container_registry_managed_identity_client_id = azurerm_user_assigned_identity.test.client_id - auto_heal_enabled = true - auto_heal_setting { trigger { status_code { diff --git a/internal/services/appservice/linux_web_app_resource_test.go b/internal/services/appservice/linux_web_app_resource_test.go index fca48ff5b4f13..db03699a0105f 100644 --- a/internal/services/appservice/linux_web_app_resource_test.go +++ b/internal/services/appservice/linux_web_app_resource_test.go @@ -2008,7 +2008,6 @@ resource "azurerm_linux_web_app" "test" { container_registry_managed_identity_client_id = azurerm_user_assigned_identity.test.client_id // auto_swap_slot_name = // TODO - auto_heal_enabled = true auto_heal_setting { trigger { @@ -2178,8 +2177,6 @@ resource "azurerm_linux_web_app" "test" { container_registry_use_managed_identity = true - auto_heal_enabled = true - auto_heal_setting { trigger { status_code { @@ -3298,8 +3295,6 @@ resource "azurerm_linux_web_app" "test" { service_plan_id = azurerm_service_plan.test.id site_config { - auto_heal_enabled = true - auto_heal_setting { trigger { status_code { @@ -3334,8 +3329,6 @@ resource "azurerm_linux_web_app" "test" { service_plan_id = azurerm_service_plan.test.id site_config { - auto_heal_enabled = true - auto_heal_setting { trigger { status_code { @@ -3375,8 +3368,6 @@ resource "azurerm_linux_web_app" "test" { service_plan_id = azurerm_service_plan.test.id site_config { - auto_heal_enabled = true - auto_heal_setting { trigger { status_code { @@ -3411,8 +3402,6 @@ resource "azurerm_linux_web_app" "test" { service_plan_id = azurerm_service_plan.test.id site_config { - auto_heal_enabled = true - auto_heal_setting { trigger { slow_request { @@ -3444,7 +3433,6 @@ resource "azurerm_linux_web_app" "test" { resource_group_name = azurerm_resource_group.test.name service_plan_id = azurerm_service_plan.test.id site_config { - auto_heal_enabled = true auto_heal_setting { trigger { slow_request { diff --git a/internal/services/appservice/linux_web_app_slot_resource.go b/internal/services/appservice/linux_web_app_slot_resource.go index a50b95e5e9924..aaac8f9d25658 100644 --- a/internal/services/appservice/linux_web_app_slot_resource.go +++ b/internal/services/appservice/linux_web_app_slot_resource.go @@ -16,7 +16,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" diff --git a/internal/services/appservice/linux_web_app_slot_resource_test.go b/internal/services/appservice/linux_web_app_slot_resource_test.go index 14f646e659a06..66d167b8d3c76 100644 --- a/internal/services/appservice/linux_web_app_slot_resource_test.go +++ b/internal/services/appservice/linux_web_app_slot_resource_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -1628,8 +1628,6 @@ resource "azurerm_linux_web_app_slot" "test" { app_service_id = azurerm_linux_web_app.test.id site_config { - auto_heal_enabled = true - auto_heal_setting { trigger { status_code { @@ -1660,7 +1658,6 @@ resource "azurerm_linux_web_app_slot" "test" { app_service_id = azurerm_linux_web_app.test.id site_config { - auto_heal_enabled = true auto_heal_setting { trigger { slow_request { @@ -1704,8 +1701,6 @@ resource "azurerm_linux_web_app_slot" "test" { app_service_id = azurerm_linux_web_app.test.id site_config { - auto_heal_enabled = true - auto_heal_setting { trigger { status_code { @@ -1897,7 +1892,6 @@ resource "azurerm_linux_web_app_slot" "test" { container_registry_managed_identity_client_id = azurerm_user_assigned_identity.test.client_id auto_swap_slot_name = "Production" - auto_heal_enabled = true auto_heal_setting { trigger { diff --git a/internal/services/appservice/service_plan_resource.go b/internal/services/appservice/service_plan_resource.go index 1f1394b21416f..85e824352acfb 100644 --- a/internal/services/appservice/service_plan_resource.go +++ b/internal/services/appservice/service_plan_resource.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/helpers" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/migration" diff --git a/internal/services/appservice/source_control_resource.go b/internal/services/appservice/source_control_resource.go index 8a22ba27548f4..34d68ddc1c4f5 100644 --- a/internal/services/appservice/source_control_resource.go +++ b/internal/services/appservice/source_control_resource.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" diff --git a/internal/services/appservice/source_control_schema.go b/internal/services/appservice/source_control_schema.go index 26120e1f53f80..47c860d86f50e 100644 --- a/internal/services/appservice/source_control_schema.go +++ b/internal/services/appservice/source_control_schema.go @@ -5,7 +5,7 @@ package appservice import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" ) diff --git a/internal/services/appservice/source_control_slot_resource.go b/internal/services/appservice/source_control_slot_resource.go index 0a633da5e5267..5123ab36ea508 100644 --- a/internal/services/appservice/source_control_slot_resource.go +++ b/internal/services/appservice/source_control_slot_resource.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/internal/services/appservice/source_control_slot_resource_test.go b/internal/services/appservice/source_control_slot_resource_test.go index cc180e07ca259..5f21140259671 100644 --- a/internal/services/appservice/source_control_slot_resource_test.go +++ b/internal/services/appservice/source_control_slot_resource_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/appservice/static_web_app_data_source.go b/internal/services/appservice/static_web_app_data_source.go index 0029f5b026bbb..f545252e0cbf0 100644 --- a/internal/services/appservice/static_web_app_data_source.go +++ b/internal/services/appservice/static_web_app_data_source.go @@ -38,6 +38,7 @@ type StaticWebAppDataSourceModel struct { DefaultHostName string `tfschema:"default_host_name"` Identity []identity.ModelSystemAssignedUserAssigned `tfschema:"identity"` PreviewEnvironments bool `tfschema:"preview_environments_enabled"` + PublicNetworkAccess bool `tfschema:"public_network_access_enabled"` SkuTier string `tfschema:"sku_tier"` SkuSize string `tfschema:"sku_size"` Tags map[string]string `tfschema:"tags"` @@ -70,6 +71,11 @@ func (s StaticWebAppDataSource) Attributes() map[string]*pluginsdk.Schema { Computed: true, }, + "public_network_access_enabled": { + Type: pluginsdk.TypeBool, + Computed: true, + }, + "sku_tier": { Type: pluginsdk.TypeString, Computed: true, @@ -151,6 +157,7 @@ func (s StaticWebAppDataSource) Read() sdk.ResourceFunc { state.ConfigFileChanges = pointer.From(props.AllowConfigFileUpdates) state.DefaultHostName = pointer.From(props.DefaultHostname) state.PreviewEnvironments = pointer.From(props.StagingEnvironmentPolicy) == staticsites.StagingEnvironmentPolicyEnabled + state.PublicNetworkAccess = !strings.EqualFold(pointer.From(props.PublicNetworkAccess), helpers.PublicNetworkAccessDisabled) } if sku := model.Sku; sku != nil { diff --git a/internal/services/appservice/static_web_app_resource.go b/internal/services/appservice/static_web_app_resource.go index ea05a096c1e6a..e976fd22bc0ec 100644 --- a/internal/services/appservice/static_web_app_resource.go +++ b/internal/services/appservice/static_web_app_resource.go @@ -40,6 +40,7 @@ type StaticWebAppResourceModel struct { ConfigFileChanges bool `tfschema:"configuration_file_changes_enabled"` Identity []identity.ModelSystemAssignedUserAssigned `tfschema:"identity"` PreviewEnvironments bool `tfschema:"preview_environments_enabled"` + PublicNetworkAccess bool `tfschema:"public_network_access_enabled"` SkuTier string `tfschema:"sku_tier"` SkuSize string `tfschema:"sku_size"` Tags map[string]string `tfschema:"tags"` @@ -73,6 +74,12 @@ func (r StaticWebAppResource) Arguments() map[string]*pluginsdk.Schema { Default: true, }, + "public_network_access_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + }, + "sku_tier": { Type: pluginsdk.TypeString, Optional: true, @@ -182,12 +189,17 @@ func (r StaticWebAppResource) Create() sdk.ResourceFunc { props := &staticsites.StaticSite{ AllowConfigFileUpdates: pointer.To(model.ConfigFileChanges), StagingEnvironmentPolicy: pointer.To(staticsites.StagingEnvironmentPolicyEnabled), + PublicNetworkAccess: pointer.To(helpers.PublicNetworkAccessEnabled), } if !model.PreviewEnvironments { props.StagingEnvironmentPolicy = pointer.To(staticsites.StagingEnvironmentPolicyDisabled) } + if !model.PublicNetworkAccess { + props.PublicNetworkAccess = pointer.To(helpers.PublicNetworkAccessDisabled) + } + envelope.Properties = props if err := client.CreateOrUpdateStaticSiteThenPoll(ctx, id, envelope); err != nil { @@ -267,6 +279,7 @@ func (r StaticWebAppResource) Read() sdk.ResourceFunc { state.ConfigFileChanges = pointer.From(props.AllowConfigFileUpdates) state.DefaultHostName = pointer.From(props.DefaultHostname) state.PreviewEnvironments = pointer.From(props.StagingEnvironmentPolicy) == staticsites.StagingEnvironmentPolicyEnabled + state.PublicNetworkAccess = !strings.EqualFold(pointer.From(props.PublicNetworkAccess), helpers.PublicNetworkAccessDisabled) } if sku := model.Sku; sku != nil { @@ -395,6 +408,14 @@ func (r StaticWebAppResource) Update() sdk.ResourceFunc { } } + if metadata.ResourceData.HasChange("public_network_access_enabled") { + if !config.PublicNetworkAccess { + model.Properties.PublicNetworkAccess = pointer.To(helpers.PublicNetworkAccessDisabled) + } else { + model.Properties.PublicNetworkAccess = pointer.To(helpers.PublicNetworkAccessEnabled) + } + } + if metadata.ResourceData.HasChange("tags") { model.Tags = pointer.To(config.Tags) } diff --git a/internal/services/appservice/static_web_app_resource_test.go b/internal/services/appservice/static_web_app_resource_test.go index 479c4575ce513..85bec21c0ba51 100644 --- a/internal/services/appservice/static_web_app_resource_test.go +++ b/internal/services/appservice/static_web_app_resource_test.go @@ -298,6 +298,54 @@ func TestAccAzureStaticWebApp_basicWithConfigShouldFail(t *testing.T) { }) } +func TestAccAzureStaticWebApp_publicNetworkAccessDisabled(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_static_web_app", "test") + r := StaticWebAppResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.publicNetworkAccessDisabled(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("false"), + ), + }, + data.ImportStep(), + }) +} + +func TestAccAzureStaticWebApp_publicNetworkAccessUpdate(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_static_web_app", "test") + r := StaticWebAppResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + { + Config: r.publicNetworkAccessDisabled(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("false"), + ), + }, + data.ImportStep(), + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + }) +} + func (r StaticWebAppResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { id, err := staticsites.ParseStaticSiteID(state.ID) if err != nil { @@ -643,3 +691,26 @@ resource "azurerm_static_web_app" "test" { } `, data.RandomInteger, data.Locations.Primary) } + +func (r StaticWebAppResource) publicNetworkAccessDisabled(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-%d" + location = "%s" +} + +resource "azurerm_static_web_app" "test" { + name = "acctestSS-%d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + sku_size = "Free" + sku_tier = "Free" + + public_network_access_enabled = false +} +`, data.RandomInteger, data.Locations.Primary, data.RandomInteger) +} diff --git a/internal/services/appservice/web_app_active_slot_resource.go b/internal/services/appservice/web_app_active_slot_resource.go index 3cb779c313a2e..1e4289202d338 100644 --- a/internal/services/appservice/web_app_active_slot_resource.go +++ b/internal/services/appservice/web_app_active_slot_resource.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" diff --git a/internal/services/appservice/web_app_active_slot_resource_test.go b/internal/services/appservice/web_app_active_slot_resource_test.go index d7546bae46a7e..7b7adf0d63a3b 100644 --- a/internal/services/appservice/web_app_active_slot_resource_test.go +++ b/internal/services/appservice/web_app_active_slot_resource_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/appservice/web_app_hybrid_connection_resource.go b/internal/services/appservice/web_app_hybrid_connection_resource.go index cc32f508b3d75..36a7e6e6c3889 100644 --- a/internal/services/appservice/web_app_hybrid_connection_resource.go +++ b/internal/services/appservice/web_app_hybrid_connection_resource.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/hybridconnections" "github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/namespaces" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" azValidate "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" diff --git a/internal/services/appservice/web_app_hybrid_connection_resource_test.go b/internal/services/appservice/web_app_hybrid_connection_resource_test.go index b3e64b6be78be..25a544dcb1b34 100644 --- a/internal/services/appservice/web_app_hybrid_connection_resource_test.go +++ b/internal/services/appservice/web_app_hybrid_connection_resource_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/appservice/windows_function_app_data_source.go b/internal/services/appservice/windows_function_app_data_source.go index 1a6ee20f1e056..01c72707e1ff2 100644 --- a/internal/services/appservice/windows_function_app_data_source.go +++ b/internal/services/appservice/windows_function_app_data_source.go @@ -16,7 +16,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/helpers" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/validate" diff --git a/internal/services/appservice/windows_function_app_resource.go b/internal/services/appservice/windows_function_app_resource.go index 296fc142b2cc6..eafda597c2a39 100644 --- a/internal/services/appservice/windows_function_app_resource.go +++ b/internal/services/appservice/windows_function_app_resource.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/resourceproviders" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/helpers" diff --git a/internal/services/appservice/windows_function_app_slot_resource.go b/internal/services/appservice/windows_function_app_slot_resource.go index a2e3ab6f92378..c470279a8103c 100644 --- a/internal/services/appservice/windows_function_app_slot_resource.go +++ b/internal/services/appservice/windows_function_app_slot_resource.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/resourceproviders" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" diff --git a/internal/services/appservice/windows_function_app_slot_resource_test.go b/internal/services/appservice/windows_function_app_slot_resource_test.go index 3a72453e67890..39bcc8880b023 100644 --- a/internal/services/appservice/windows_function_app_slot_resource_test.go +++ b/internal/services/appservice/windows_function_app_slot_resource_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/appservice/windows_web_app_data_source.go b/internal/services/appservice/windows_web_app_data_source.go index ac0e77c7fb5a3..7b1bf589be5d2 100644 --- a/internal/services/appservice/windows_web_app_data_source.go +++ b/internal/services/appservice/windows_web_app_data_source.go @@ -15,7 +15,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/helpers" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/validate" diff --git a/internal/services/appservice/windows_web_app_resource.go b/internal/services/appservice/windows_web_app_resource.go index 6f502dff7a00e..efecb558a250a 100644 --- a/internal/services/appservice/windows_web_app_resource.go +++ b/internal/services/appservice/windows_web_app_resource.go @@ -17,7 +17,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/resourceproviders" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/helpers" diff --git a/internal/services/appservice/windows_web_app_resource_authv2_test.go b/internal/services/appservice/windows_web_app_resource_authv2_test.go index 595e57d17c26d..dfd9641fa4e34 100644 --- a/internal/services/appservice/windows_web_app_resource_authv2_test.go +++ b/internal/services/appservice/windows_web_app_resource_authv2_test.go @@ -804,8 +804,6 @@ resource "azurerm_windows_web_app" "test" { container_registry_use_managed_identity = true container_registry_managed_identity_client_id = azurerm_user_assigned_identity.test.client_id - auto_heal_enabled = true - virtual_application { virtual_path = "/" physical_path = "site\\wwwroot" diff --git a/internal/services/appservice/windows_web_app_resource_test.go b/internal/services/appservice/windows_web_app_resource_test.go index 78a83bf5068cd..64e9e7336a682 100644 --- a/internal/services/appservice/windows_web_app_resource_test.go +++ b/internal/services/appservice/windows_web_app_resource_test.go @@ -1456,6 +1456,35 @@ func TestAccWindowsWebApp_withAutoHealRulesSlowRequestWithPath(t *testing.T) { }) } +func TestAccWindowsWebApp_withAutoHealRulesSlowRequestWithPathUpdate(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_windows_web_app", "test") + r := WindowsWebAppResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + { + Config: r.autoHealRulesSlowRequestWithPath(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + func TestAccWindowsWebApp_stickySettings(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_windows_web_app", "test") r := WindowsWebAppResource{} @@ -2508,8 +2537,6 @@ resource "azurerm_windows_web_app" "test" { container_registry_managed_identity_client_id = azurerm_user_assigned_identity.test.client_id // auto_swap_slot_name = // TODO - auto_heal_enabled = true - virtual_application { virtual_path = "/" physical_path = "site\\wwwroot" @@ -2682,8 +2709,6 @@ resource "azurerm_windows_web_app" "test" { container_registry_use_managed_identity = true - auto_heal_enabled = true - auto_heal_setting { trigger { status_code { @@ -3144,7 +3169,6 @@ resource "azurerm_windows_web_app" "test" { service_plan_id = azurerm_service_plan.test.id site_config { - auto_heal_enabled = true auto_heal_setting { trigger { @@ -3180,8 +3204,6 @@ resource "azurerm_windows_web_app" "test" { service_plan_id = azurerm_service_plan.test.id site_config { - auto_heal_enabled = true - auto_heal_setting { trigger { status_code { @@ -3222,8 +3244,6 @@ resource "azurerm_windows_web_app" "test" { service_plan_id = azurerm_service_plan.test.id site_config { - auto_heal_enabled = true - auto_heal_setting { trigger { status_code { @@ -3266,8 +3286,6 @@ resource "azurerm_windows_web_app" "test" { service_plan_id = azurerm_service_plan.test.id site_config { - auto_heal_enabled = true - auto_heal_setting { trigger { status_code { @@ -3307,8 +3325,6 @@ resource "azurerm_windows_web_app" "test" { service_plan_id = azurerm_service_plan.test.id site_config { - auto_heal_enabled = true - auto_heal_setting { trigger { status_code { @@ -3343,8 +3359,6 @@ resource "azurerm_windows_web_app" "test" { service_plan_id = azurerm_service_plan.test.id site_config { - auto_heal_enabled = true - auto_heal_setting { trigger { slow_request { @@ -3376,7 +3390,6 @@ resource "azurerm_windows_web_app" "test" { resource_group_name = azurerm_resource_group.test.name service_plan_id = azurerm_service_plan.test.id site_config { - auto_heal_enabled = true auto_heal_setting { trigger { slow_request { diff --git a/internal/services/appservice/windows_web_app_slot_resource.go b/internal/services/appservice/windows_web_app_slot_resource.go index 7d5a8e5bece1e..13bbe909e4040 100644 --- a/internal/services/appservice/windows_web_app_slot_resource.go +++ b/internal/services/appservice/windows_web_app_slot_resource.go @@ -16,7 +16,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" diff --git a/internal/services/appservice/windows_web_app_slot_resource_test.go b/internal/services/appservice/windows_web_app_slot_resource_test.go index 5e978e4a5be26..7d1a9c001f9e5 100644 --- a/internal/services/appservice/windows_web_app_slot_resource_test.go +++ b/internal/services/appservice/windows_web_app_slot_resource_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -1364,8 +1364,6 @@ resource "azurerm_windows_web_app_slot" "test" { app_service_id = azurerm_windows_web_app.test.id site_config { - auto_heal_enabled = true - auto_heal_setting { trigger { status_code { @@ -1396,7 +1394,6 @@ resource "azurerm_windows_web_app_slot" "test" { app_service_id = azurerm_windows_web_app.test.id site_config { - auto_heal_enabled = true auto_heal_setting { trigger { slow_request { @@ -1440,8 +1437,6 @@ resource "azurerm_windows_web_app_slot" "test" { app_service_id = azurerm_windows_web_app.test.id site_config { - auto_heal_enabled = true - auto_heal_setting { trigger { status_code { @@ -1633,7 +1628,6 @@ resource "azurerm_windows_web_app_slot" "test" { container_registry_managed_identity_client_id = azurerm_user_assigned_identity.test.client_id auto_swap_slot_name = "Production" - auto_heal_enabled = true virtual_application { virtual_path = "/" diff --git a/internal/services/authorization/role_assignment_resource.go b/internal/services/authorization/role_assignment_resource.go index ea132f2a779e3..f80586267fe17 100644 --- a/internal/services/authorization/role_assignment_resource.go +++ b/internal/services/authorization/role_assignment_resource.go @@ -62,10 +62,12 @@ func resourceArmRoleAssignment() *pluginsdk.Resource { Required: true, ForceNew: true, ValidateFunc: validation.Any( - // Elevated access for a global admin is needed to assign roles in this scope: + // Elevated access (aka User Access Administrator role) is needed to assign roles in the following scopes: // https://docs.microsoft.com/en-us/azure/role-based-access-control/elevate-access-global-admin#azure-cli - // It seems only user account is allowed to be elevated access. + validation.StringMatch(regexp.MustCompile("/"), "Root scope (/) is invalid"), validation.StringMatch(regexp.MustCompile("/providers/Microsoft.Subscription.*"), "Subscription scope is invalid"), + validation.StringMatch(regexp.MustCompile("/providers/Microsoft.Capacity"), "Capacity scope is invalid"), + validation.StringMatch(regexp.MustCompile("/providers/Microsoft.BillingBenefits"), "BillingBenefits scope is invalid"), billingValidate.EnrollmentID, commonids.ValidateManagementGroupID, diff --git a/internal/services/authorization/role_management_policy_data_source.go b/internal/services/authorization/role_management_policy_data_source.go index 35f485cf69b92..c9a6adb48cc49 100644 --- a/internal/services/authorization/role_management_policy_data_source.go +++ b/internal/services/authorization/role_management_policy_data_source.go @@ -13,7 +13,9 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/rolemanagementpolicies" + "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" + billingValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/billing/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" ) @@ -109,9 +111,16 @@ func (r RoleManagementPolicyDataSource) Arguments() map[string]*pluginsdk.Schema Type: pluginsdk.TypeString, Required: true, ValidateFunc: validation.Any( + // Elevated access for a global admin is needed to assign roles in this scope: + // https://docs.microsoft.com/en-us/azure/role-based-access-control/elevate-access-global-admin#azure-cli + // It seems only user account is allowed to be elevated access. + validation.StringMatch(regexp.MustCompile("/providers/Microsoft.Subscription.*"), "Subscription scope is invalid"), + + billingValidate.EnrollmentID, commonids.ValidateManagementGroupID, - commonids.ValidateResourceGroupID, commonids.ValidateSubscriptionID, + commonids.ValidateResourceGroupID, + azure.ValidateResourceID, ), }, } diff --git a/internal/services/authorization/role_management_policy_data_source_test.go b/internal/services/authorization/role_management_policy_data_source_test.go index 804c2b42e919e..394780897d4bc 100644 --- a/internal/services/authorization/role_management_policy_data_source_test.go +++ b/internal/services/authorization/role_management_policy_data_source_test.go @@ -55,6 +55,20 @@ func TestAccRoleManagementPolicyDataSource_subscription(t *testing.T) { }) } +func TestAccRoleManagementPolicyDataSource_resource(t *testing.T) { + data := acceptance.BuildTestData(t, "data.azurerm_role_management_policy", "test") + r := RoleManagementPolicyDataSource{} + + data.DataSourceTest(t, []acceptance.TestStep{ + { + Config: r.resource(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).Key("name").Exists(), + ), + }, + }) +} + func (RoleManagementPolicyDataSource) managementGroup(data acceptance.TestData) string { return fmt.Sprintf(` provider "azurerm" {} @@ -116,3 +130,32 @@ data "azurerm_role_management_policy" "test" { } ` } + +func (RoleManagementPolicyDataSource) resource(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" {} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-%[1]s" + location = "%[2]s" +} + +resource "azurerm_storage_account" "test" { + name = "accteststg%[1]s" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + account_tier = "Standard" + account_replication_type = "LRS" +} + +data "azurerm_role_definition" "contributor" { + name = "Contributor" + scope = azurerm_resource_group.test.id +} + +data "azurerm_role_management_policy" "test" { + role_definition_id = data.azurerm_role_definition.contributor.id + scope = azurerm_storage_account.test.id +} +`, data.RandomString, data.Locations.Primary) +} diff --git a/internal/services/authorization/role_management_policy_resource.go b/internal/services/authorization/role_management_policy_resource.go index cac16bfc0e897..9a91194ec8426 100644 --- a/internal/services/authorization/role_management_policy_resource.go +++ b/internal/services/authorization/role_management_policy_resource.go @@ -6,14 +6,17 @@ package authorization import ( "context" "fmt" + "regexp" "time" "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/rolemanagementpolicies" + "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/authorization/parse" + billingValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/billing/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" ) @@ -111,9 +114,16 @@ func (r RoleManagementPolicyResource) Arguments() map[string]*pluginsdk.Schema { Required: true, ForceNew: true, ValidateFunc: validation.Any( + // Elevated access for a global admin is needed to assign roles in this scope: + // https://docs.microsoft.com/en-us/azure/role-based-access-control/elevate-access-global-admin#azure-cli + // It seems only user account is allowed to be elevated access. + validation.StringMatch(regexp.MustCompile("/providers/Microsoft.Subscription.*"), "Subscription scope is invalid"), + + billingValidate.EnrollmentID, commonids.ValidateManagementGroupID, - commonids.ValidateResourceGroupID, commonids.ValidateSubscriptionID, + commonids.ValidateResourceGroupID, + azure.ValidateResourceID, ), }, diff --git a/internal/services/authorization/role_management_policy_resource_test.go b/internal/services/authorization/role_management_policy_resource_test.go index e75bff77b82e6..e2b61de94acf9 100644 --- a/internal/services/authorization/role_management_policy_resource_test.go +++ b/internal/services/authorization/role_management_policy_resource_test.go @@ -125,6 +125,36 @@ func TestAccRoleManagementPolicy_subscription(t *testing.T) { }) } +func TestAccRoleManagementPolicy_resource(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_role_management_policy", "test") + r := RoleManagementPolicyResource{} + + // Ignore the dangling resource post-test as the policy remains while the resource exists, or is in a pending deletion state + data.ResourceTestSkipCheckDestroyed(t, []acceptance.TestStep{ + { + Config: r.resource(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("active_assignment_rules.0.expire_after").HasValue("P30D"), + check.That(data.ResourceName).Key("eligible_assignment_rules.0.expiration_required").HasValue("false"), + check.That(data.ResourceName).Key("notification_rules.0.eligible_assignments.0.approver_notifications.0.notification_level").HasValue("All"), + ), + }, + data.ImportStep(), + { + Config: r.resourceUpdate(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("active_assignment_rules.0.expire_after").HasValue("P15D"), + check.That(data.ResourceName).Key("eligible_assignment_rules.0.expiration_required").HasValue("true"), + check.That(data.ResourceName).Key("activation_rules.0.approval_stage.0.primary_approver.0.type").HasValue("Group"), + check.That(data.ResourceName).Key("notification_rules.0.eligible_assignments.0.approver_notifications.0.notification_level").HasValue("Critical"), + ), + }, + data.ImportStep(), + }) +} + func (RoleManagementPolicyResource) Exists(ctx context.Context, clients *clients.Client, state *terraform.InstanceState) (*bool, error) { client := clients.Authorization.RoleManagementPoliciesClient @@ -451,3 +481,111 @@ resource "azurerm_role_management_policy" "test" { } `, r.resourceGroupTemplate(data), data.RandomString, requireApproval) } + +func (RoleManagementPolicyResource) resourceTemplate(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" {} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-%[1]s" + location = "%[2]s" +} + +resource "azurerm_storage_account" "test" { + name = "accteststg%[1]s" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + account_tier = "Standard" + account_replication_type = "LRS" +} + +data "azurerm_role_definition" "contributor" { + name = "Contributor" + scope = azurerm_storage_account.test.id +} +`, data.RandomString, data.Locations.Primary) +} + +func (r RoleManagementPolicyResource) resource(data acceptance.TestData) string { + return fmt.Sprintf(` +%[1]s + +resource "azurerm_role_management_policy" "test" { + scope = azurerm_storage_account.test.id + role_definition_id = data.azurerm_role_definition.contributor.id + + active_assignment_rules { + expire_after = "P30D" + } + + eligible_assignment_rules { + expiration_required = false + } + + notification_rules { + eligible_assignments { + approver_notifications { + notification_level = "All" + default_recipients = false + additional_recipients = ["someone@example.com"] + } + } + } +} +`, r.resourceTemplate(data), data.RandomString) +} + +func (r RoleManagementPolicyResource) resourceUpdate(data acceptance.TestData) string { + return fmt.Sprintf(` +%[1]s + +provider "azuread" {} + +resource "azuread_group" "approver" { + display_name = "PIM Approver Test %[2]s" + mail_enabled = false + security_enabled = true +} + +resource "azurerm_role_management_policy" "test" { + scope = azurerm_storage_account.test.id + role_definition_id = data.azurerm_role_definition.contributor.id + + active_assignment_rules { + expire_after = "P15D" + } + + eligible_assignment_rules { + expiration_required = true + } + + activation_rules { + maximum_duration = "PT1H" + require_approval = true + approval_stage { + primary_approver { + object_id = azuread_group.approver.object_id + type = "Group" + } + } + } + + notification_rules { + eligible_assignments { + approver_notifications { + notification_level = "Critical" + default_recipients = false + additional_recipients = ["someone@example.com"] + } + } + eligible_activations { + assignee_notifications { + notification_level = "All" + default_recipients = true + additional_recipients = ["someone.else@example.com"] + } + } + } +} +`, r.resourceTemplate(data), data.RandomString) +} diff --git a/internal/services/automanage/arc_machine_automanage_configuration_assignment_resource.go b/internal/services/automanage/arc_machine_automanage_configuration_assignment_resource.go new file mode 100644 index 0000000000000..a01ad3e88df64 --- /dev/null +++ b/internal/services/automanage/arc_machine_automanage_configuration_assignment_resource.go @@ -0,0 +1,168 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package automanage + +import ( + "context" + "fmt" + "time" + + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofileassignments" + "github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments" + "github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofiles" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" +) + +type ArcMachineConfigurationAssignment struct { + ArcMachineId string `tfschema:"arc_machine_id"` + ConfigurationId string `tfschema:"configuration_id"` +} + +func (v ArcMachineConfigurationAssignment) Arguments() map[string]*schema.Schema { + return map[string]*schema.Schema{ + "arc_machine_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: configurationprofileassignments.ValidateMachineID, + }, + "configuration_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: configurationprofiles.ValidateConfigurationProfileID, + }, + } +} + +func (v ArcMachineConfigurationAssignment) Attributes() map[string]*schema.Schema { + return map[string]*pluginsdk.Schema{} +} + +func (v ArcMachineConfigurationAssignment) ModelObject() interface{} { + return &ArcMachineConfigurationAssignment{} +} + +func (v ArcMachineConfigurationAssignment) ResourceType() string { + return "azurerm_arc_machine_automanage_configuration_assignment" +} + +func (v ArcMachineConfigurationAssignment) Create() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 30 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.Automanage.ConfigurationProfileArcMachineAssignmentsClient + subscriptionId := metadata.Client.Account.SubscriptionId + + var model ArcMachineConfigurationAssignment + if err := metadata.Decode(&model); err != nil { + return fmt.Errorf("decoding: %+v", err) + } + + arcMachineId, err := configurationprofileassignments.ParseMachineID(model.ArcMachineId) + if err != nil { + return err + } + + configurationId, err := configurationprofiles.ParseConfigurationProfileID(model.ConfigurationId) + if err != nil { + return err + } + + // Currently, the configuration profile assignment name has to be hardcoded to "default" by API requirement. + id := configurationprofilehcrpassignments.NewProviders2ConfigurationProfileAssignmentID(subscriptionId, arcMachineId.ResourceGroupName, arcMachineId.MachineName, "default") + existing, err := client.Get(ctx, id) + if err != nil && !response.WasNotFound(existing.HttpResponse) { + return fmt.Errorf("checking for existing %s: %+v", id, err) + } + + if !response.WasNotFound(existing.HttpResponse) { + return metadata.ResourceRequiresImport(v.ResourceType(), id) + } + + properties := configurationprofilehcrpassignments.ConfigurationProfileAssignment{ + Properties: &configurationprofilehcrpassignments.ConfigurationProfileAssignmentProperties{ + ConfigurationProfile: pointer.FromString(configurationId.ID()), + }, + } + + if _, respErr := client.CreateOrUpdate(ctx, id, properties); respErr != nil { + return fmt.Errorf("creating %s: %+v", id.String(), respErr) + } + + metadata.SetID(id) + return nil + }, + } +} + +func (v ArcMachineConfigurationAssignment) Read() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 5 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.Automanage.ConfigurationProfileArcMachineAssignmentsClient + id, err := configurationprofilehcrpassignments.ParseProviders2ConfigurationProfileAssignmentID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + resp, err := client.Get(ctx, *id) + if err != nil { + if response.WasNotFound(resp.HttpResponse) { + return metadata.MarkAsGone(id) + } + + return fmt.Errorf("retrieving %s: %+v", *id, err) + } + + state := ArcMachineConfigurationAssignment{} + + if model := resp.Model; model != nil { + configurationId, err := configurationprofiles.ParseConfigurationProfileID(*model.Properties.ConfigurationProfile) + if err != nil { + return err + } + state.ConfigurationId = configurationId.ID() + + arcMachineId, err := configurationprofileassignments.ParseMachineID(*model.Properties.TargetId) + if err != nil { + return err + } + state.ArcMachineId = arcMachineId.ID() + } + + return metadata.Encode(&state) + }, + } +} + +func (v ArcMachineConfigurationAssignment) Delete() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 30 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.Automanage.ConfigurationProfileArcMachineAssignmentsClient + + id, err := configurationprofilehcrpassignments.ParseProviders2ConfigurationProfileAssignmentID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + if _, err := client.Delete(ctx, *id); err != nil { + return fmt.Errorf("deleting %s: %+v", id, err) + } + + return nil + }, + } +} + +func (v ArcMachineConfigurationAssignment) IDValidationFunc() pluginsdk.SchemaValidateFunc { + return configurationprofilehcrpassignments.ValidateProviders2ConfigurationProfileAssignmentID +} + +var _ sdk.Resource = &ArcMachineConfigurationAssignment{} diff --git a/internal/services/automanage/arc_machine_automanage_configuration_assignment_resource_test.go b/internal/services/automanage/arc_machine_automanage_configuration_assignment_resource_test.go new file mode 100644 index 0000000000000..7609652217310 --- /dev/null +++ b/internal/services/automanage/arc_machine_automanage_configuration_assignment_resource_test.go @@ -0,0 +1,86 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package automanage_test + +import ( + "context" + "fmt" + "testing" + + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" + "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/utils" +) + +type ArcMachineConfigurationAssignmentResource struct{} + +func TestAccArcMachineConfigurationAssignment_complete(t *testing.T) { + t.Skip("The deprecation check prevents the creation of a hybrid compute machine resource using os.Getenv(\"ARM_CLIENT_SECRET\")") + data := acceptance.BuildTestData(t, "azurerm_arc_machine_automanage_configuration_assignment", "test") + r := ArcMachineConfigurationAssignmentResource{} + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.complete(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + +func (r ArcMachineConfigurationAssignmentResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { + client := clients.Automanage.ConfigurationProfileArcMachineAssignmentsClient + + id, err := configurationprofilehcrpassignments.ParseProviders2ConfigurationProfileAssignmentID(state.ID) + if err != nil { + return nil, err + } + + resp, err := client.Get(ctx, *id) + if err != nil { + if response.WasNotFound(resp.HttpResponse) { + return utils.Bool(false), nil + } + return nil, fmt.Errorf("retrieving %s: %+v", id, err) + } + return pointer.To(resp.Model != nil), nil +} + +func (r ArcMachineConfigurationAssignmentResource) complete(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-%d" + location = "%s" +} + +data "azurerm_arc_machine" "test" { + name = "arc-test" + resource_group_name = azurerm_resource_group.test.name + depends_on = [ + azurerm_linux_virtual_machine.test + ] +} + +resource "azurerm_automanage_configuration" "test" { + name = "acctest-amcp-%d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location +} + +resource "azurerm_arc_machine_automanage_configuration_assignment" "test" { + arc_machine_id = data.azurerm_arc_machine.test.id + configuration_id = azurerm_automanage_configuration.test.id +} +`, data.RandomInteger, data.Locations.Primary, data.RandomInteger) +} diff --git a/internal/services/automanage/client/client.go b/internal/services/automanage/client/client.go index 91f4e0b2dcc63..3243462939191 100644 --- a/internal/services/automanage/client/client.go +++ b/internal/services/automanage/client/client.go @@ -8,14 +8,16 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofileassignments" "github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehciassignments" + "github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments" "github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofiles" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) type Client struct { - ConfigurationProfilesClient *configurationprofiles.ConfigurationProfilesClient - ConfigurationProfileHCIAssignmentsClient *configurationprofilehciassignments.ConfigurationProfileHCIAssignmentsClient - ConfigurationProfileVMAssignmentsClient *configurationprofileassignments.ConfigurationProfileAssignmentsClient + ConfigurationProfilesClient *configurationprofiles.ConfigurationProfilesClient + ConfigurationProfileArcMachineAssignmentsClient *configurationprofilehcrpassignments.ConfigurationProfileHCRPAssignmentsClient + ConfigurationProfileHCIAssignmentsClient *configurationprofilehciassignments.ConfigurationProfileHCIAssignmentsClient + ConfigurationProfileVMAssignmentsClient *configurationprofileassignments.ConfigurationProfileAssignmentsClient } func NewClient(o *common.ClientOptions) (*Client, error) { @@ -25,6 +27,12 @@ func NewClient(o *common.ClientOptions) (*Client, error) { } o.Configure(configurationProfilesClient.Client, o.Authorizers.ResourceManager) + configurationProfileArcMachineAssignmentsClient, err := configurationprofilehcrpassignments.NewConfigurationProfileHCRPAssignmentsClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building ConfigurationProfilesHCIAssignments client: %+v", err) + } + o.Configure(configurationProfileArcMachineAssignmentsClient.Client, o.Authorizers.ResourceManager) + configurationProfileHCIAssignmentsClient, err := configurationprofilehciassignments.NewConfigurationProfileHCIAssignmentsClientWithBaseURI(o.Environment.ResourceManager) if err != nil { return nil, fmt.Errorf("building ConfigurationProfilesHCIAssignments client: %+v", err) @@ -38,8 +46,9 @@ func NewClient(o *common.ClientOptions) (*Client, error) { o.Configure(configurationProfileVMAssignmentsClient.Client, o.Authorizers.ResourceManager) return &Client{ - ConfigurationProfilesClient: configurationProfilesClient, - ConfigurationProfileHCIAssignmentsClient: configurationProfileHCIAssignmentsClient, - ConfigurationProfileVMAssignmentsClient: configurationProfileVMAssignmentsClient, + ConfigurationProfilesClient: configurationProfilesClient, + ConfigurationProfileArcMachineAssignmentsClient: configurationProfileArcMachineAssignmentsClient, + ConfigurationProfileHCIAssignmentsClient: configurationProfileHCIAssignmentsClient, + ConfigurationProfileVMAssignmentsClient: configurationProfileVMAssignmentsClient, }, nil } diff --git a/internal/services/automanage/registration.go b/internal/services/automanage/registration.go index 61b3518af4d78..705e8cfd98133 100644 --- a/internal/services/automanage/registration.go +++ b/internal/services/automanage/registration.go @@ -51,5 +51,6 @@ func (r Registration) Resources() []sdk.Resource { return []sdk.Resource{ AutoManageConfigurationResource{}, VirtualMachineConfigurationAssignment{}, + ArcMachineConfigurationAssignment{}, } } diff --git a/internal/services/azurestackhci/registration.go b/internal/services/azurestackhci/registration.go index 49f65474ad481..188d28b0e618a 100644 --- a/internal/services/azurestackhci/registration.go +++ b/internal/services/azurestackhci/registration.go @@ -51,6 +51,8 @@ func (r Registration) DataSources() []sdk.DataSource { func (r Registration) Resources() []sdk.Resource { return []sdk.Resource{ + StackHCIDeploymentSettingResource{}, StackHCILogicalNetworkResource{}, + StackHCIStoragePathResource{}, } } diff --git a/internal/services/azurestackhci/stack_hci_deployment_setting_resource.go b/internal/services/azurestackhci/stack_hci_deployment_setting_resource.go new file mode 100644 index 0000000000000..41c0104c25c85 --- /dev/null +++ b/internal/services/azurestackhci/stack_hci_deployment_setting_resource.go @@ -0,0 +1,1371 @@ +package azurestackhci + +import ( + "context" + "fmt" + "log" + "regexp" + "strings" + "time" + + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers" + "github.com/hashicorp/go-azure-sdk/resource-manager/extendedlocation/2021-08-15/customlocations" + "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/machines" + "github.com/hashicorp/go-azure-sdk/resource-manager/resourceconnector/2022-10-27/appliances" + "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" + storageValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/validate" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" +) + +var _ sdk.Resource = StackHCIDeploymentSettingResource{} + +type StackHCIDeploymentSettingResource struct{} + +func (StackHCIDeploymentSettingResource) IDValidationFunc() pluginsdk.SchemaValidateFunc { + return deploymentsettings.ValidateDeploymentSettingID +} + +func (StackHCIDeploymentSettingResource) ResourceType() string { + return "azurerm_stack_hci_deployment_setting" +} + +type StackHCIDeploymentSettingModel struct { + StackHCIClusterId string `tfschema:"stack_hci_cluster_id"` + ArcResourceIds []string `tfschema:"arc_resource_ids"` + Version string `tfschema:"version"` + ScaleUnit []ScaleUnitModel `tfschema:"scale_unit"` +} + +type ScaleUnitModel struct { + ActiveDirectoryOrganizationalUnitPath string `tfschema:"active_directory_organizational_unit_path"` + Cluster []ClusterModel `tfschema:"cluster"` + DomainFqdn string `tfschema:"domain_fqdn"` + HostNetwork []HostNetworkModel `tfschema:"host_network"` + InfrastructureNetwork []InfrastructureNetworkModel `tfschema:"infrastructure_network"` + NamePrefix string `tfschema:"name_prefix"` + OptionalService []OptionalServiceModel `tfschema:"optional_service"` + PhysicalNode []PhysicalNodeModel `tfschema:"physical_node"` + SecretsLocation string `tfschema:"secrets_location"` + Storage []StorageModel `tfschema:"storage"` + + // flatten 'observability' block, for API always return them + StreamingDataClientEnabled bool `tfschema:"streaming_data_client_enabled"` + EuLocationEnabled bool `tfschema:"eu_location_enabled"` + EpisodicDataUploadEnabled bool `tfschema:"episodic_data_upload_enabled"` + + // flatten 'securitySetting' block, for API always return them + BitlockerBootVolumeEnabled bool `tfschema:"bitlocker_boot_volume_enabled"` + BitlockerDataVolumeEnabled bool `tfschema:"bitlocker_data_volume_enabled"` + CredentialGuardEnabled bool `tfschema:"credential_guard_enabled"` + DriftControlEnabled bool `tfschema:"drift_control_enabled"` + DrtmProtectionEnabled bool `tfschema:"drtm_protection_enabled"` + HvciProtectionEnabled bool `tfschema:"hvci_protection_enabled"` + SideChannelMitigationEnabled bool `tfschema:"side_channel_mitigation_enabled"` + SmbSigningEnabled bool `tfschema:"smb_signing_enabled"` + SmbClusterEncryptionEnabled bool `tfschema:"smb_cluster_encryption_enabled"` + WdacEnabled bool `tfschema:"wdac_enabled"` +} + +type ClusterModel struct { + AzureServiceEndpoint string `tfschema:"azure_service_endpoint"` + CloudAccountName string `tfschema:"cloud_account_name"` + Name string `tfschema:"name"` + WitnessType string `tfschema:"witness_type"` + WitnessPath string `tfschema:"witness_path"` +} + +type HostNetworkModel struct { + Intent []HostNetworkIntentModel `tfschema:"intent"` + StorageAutoIpEnabled bool `tfschema:"storage_auto_ip_enabled"` + StorageConnectivitySwitchlessEnabled bool `tfschema:"storage_connectivity_switchless_enabled"` + StorageNetwork []HostNetworkStorageNetworkModel `tfschema:"storage_network"` +} + +type HostNetworkIntentModel struct { + Adapter []string `tfschema:"adapter"` + AdapterPropertyOverride []HostNetworkIntentAdapterPropertyOverrideModel `tfschema:"adapter_property_override"` + AdapterPropertyOverrideEnabled bool `tfschema:"adapter_property_override_enabled"` + Name string `tfschema:"name"` + QosPolicyOverride []HostNetworkIntentQosPolicyOverrideModel `tfschema:"qos_policy_override"` + QosPolicyOverrideEnabled bool `tfschema:"qos_policy_override_enabled"` + TrafficType []string `tfschema:"traffic_type"` + VirtualSwitchConfigurationOverride []HostNetworkIntentVirtualSwitchConfigurationOverrideModel `tfschema:"virtual_switch_configuration_override"` + VirtualSwitchConfigurationOverrideEnabled bool `tfschema:"virtual_switch_configuration_override_enabled"` +} + +type HostNetworkIntentAdapterPropertyOverrideModel struct { + JumboPacket string `tfschema:"jumbo_packet"` + NetworkDirect string `tfschema:"network_direct"` + NetworkDirectTechnology string `tfschema:"network_direct_technology"` +} + +type HostNetworkIntentQosPolicyOverrideModel struct { + BandWidthPercentageSMB string `tfschema:"bandwidth_percentage_smb"` + PriorityValue8021ActionCluster string `tfschema:"priority_value8021_action_cluster"` + PriorityValue8021ActionSMB string `tfschema:"priority_value8021_action_smb"` +} + +type HostNetworkIntentVirtualSwitchConfigurationOverrideModel struct { + EnableIov string `tfschema:"enable_iov"` + LoadBalancingAlgorithm string `tfschema:"load_balancing_algorithm"` +} + +type HostNetworkStorageNetworkModel struct { + Name string `tfschema:"name"` + NetworkAdapterName string `tfschema:"network_adapter_name"` + VlanId string `tfschema:"vlan_id"` +} + +type InfrastructureNetworkModel struct { + DhcpEnabled bool `tfschema:"dhcp_enabled"` + SubnetMask string `tfschema:"subnet_mask"` + Gateway string `tfschema:"gateway"` + IpPool []IpPoolModel `tfschema:"ip_pool"` + DnsServer []string `tfschema:"dns_server"` +} + +type IpPoolModel struct { + StartingAddress string `tfschema:"starting_address"` + EndingAddress string `tfschema:"ending_address"` +} + +type OptionalServiceModel struct { + CustomLocation string `tfschema:"custom_location"` +} + +type PhysicalNodeModel struct { + Name string `tfschema:"name"` + Ipv4Address string `tfschema:"ipv4_address"` +} + +type StorageModel struct { + ConfigurationMode string `tfschema:"configuration_mode"` +} + +func (StackHCIDeploymentSettingResource) ModelObject() interface{} { + return &StackHCIDeploymentSettingModel{} +} + +func (StackHCIDeploymentSettingResource) Arguments() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{ + "stack_hci_cluster_id": commonschema.ResourceIDReferenceRequiredForceNew(&deploymentsettings.ClusterId{}), + + "arc_resource_ids": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + ValidateFunc: machines.ValidateMachineID, + }, + }, + + "version": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringMatch( + regexp.MustCompile(`^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$`), + "the version must be a set of numbers separated by dots: `10.0.0.1`", + ), + }, + + "scale_unit": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MinItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "active_directory_organizational_unit_path": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "cluster": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringMatch( + regexp.MustCompile("^[a-zA-Z0-9-]{3,15}$"), + "the cluster name must be 3-15 characters long and contain only letters, numbers and hyphens", + ), + }, + + "azure_service_endpoint": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringMatch( + regexp.MustCompile(`^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$`), + "`azure_service_endpoint` must be a valid domain name, for example, \"core.windows.net\"", + ), + }, + + "cloud_account_name": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: storageValidate.StorageAccountName, + }, + + "witness_type": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + "Cloud", + "FileShare", + }, false), + }, + + "witness_path": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + }, + }, + }, + + "domain_fqdn": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringMatch( + regexp.MustCompile(`^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$`), + "`domain_fqdn` must be a valid domain name, for example, \"jumpstart.local\"", + ), + }, + + "host_network": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "intent": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MinItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "adapter": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MinItems: 1, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + ValidateFunc: validation.StringIsNotEmpty, + }, + }, + + "traffic_type": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MinItems: 1, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + ValidateFunc: validation.StringInSlice([]string{ + "Compute", + "Storage", + "Management", + }, false), + }, + }, + + "adapter_property_override": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "jumbo_packet": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "network_direct": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "network_direct_technology": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + }, + }, + }, + + "adapter_property_override_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + ForceNew: true, + Default: false, + }, + + "qos_policy_override": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "bandwidth_percentage_smb": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "priority_value8021_action_cluster": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "priority_value8021_action_smb": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + }, + }, + }, + + "qos_policy_override_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + ForceNew: true, + Default: false, + }, + + "virtual_switch_configuration_override": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "enable_iov": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "load_balancing_algorithm": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + }, + }, + }, + + "virtual_switch_configuration_override_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + ForceNew: true, + Default: false, + }, + }, + }, + }, + + "storage_network": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MinItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "network_adapter_name": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "vlan_id": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + }, + }, + }, + + "storage_auto_ip_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + ForceNew: true, + Default: true, + }, + + "storage_connectivity_switchless_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + ForceNew: true, + Default: false, + }, + }, + }, + }, + + "infrastructure_network": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MinItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "dns_server": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MinItems: 1, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + ValidateFunc: validation.IsIPv4Address, + }, + }, + + "gateway": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.IsIPv4Address, + }, + + "ip_pool": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MinItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "starting_address": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.IsIPv4Address, + }, + + "ending_address": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.IsIPv4Address, + }, + }, + }, + }, + + "subnet_mask": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.IsIPv4Address, + }, + + "dhcp_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + ForceNew: true, + Default: false, + }, + }, + }, + }, + + "name_prefix": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringMatch( + regexp.MustCompile("^[a-zA-Z0-9-]{1,8}$"), + "the naming prefix must be 1-8 characters long and contain only letters, numbers and hyphens", + ), + }, + + "optional_service": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "custom_location": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + }, + }, + }, + + "physical_node": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MinItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "ipv4_address": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.IsIPv4Address, + }, + }, + }, + }, + + "secrets_location": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.IsURLWithHTTPS, + }, + + "storage": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "configuration_mode": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + "Express", + "InfraOnly", + "KeepStorage", + }, false), + }, + }, + }, + }, + + "streaming_data_client_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + ForceNew: true, + }, + + "eu_location_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: false, + ForceNew: true, + }, + + "episodic_data_upload_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + ForceNew: true, + }, + + "bitlocker_boot_volume_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + ForceNew: true, + }, + + "bitlocker_data_volume_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + ForceNew: true, + }, + + "credential_guard_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: false, + ForceNew: true, + }, + + "drift_control_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + ForceNew: true, + }, + + "drtm_protection_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + ForceNew: true, + }, + + "hvci_protection_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + ForceNew: true, + }, + + "side_channel_mitigation_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + ForceNew: true, + }, + + "smb_signing_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + ForceNew: true, + }, + + "smb_cluster_encryption_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: false, + ForceNew: true, + }, + + "wdac_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + ForceNew: true, + }, + }, + }, + }, + } +} + +func (StackHCIDeploymentSettingResource) Attributes() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{} +} + +func (r StackHCIDeploymentSettingResource) Create() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 6 * time.Hour, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.AzureStackHCI.DeploymentSettings + + var config StackHCIDeploymentSettingModel + if err := metadata.Decode(&config); err != nil { + return fmt.Errorf("decoding: %+v", err) + } + + stackHCIClusterId, err := deploymentsettings.ParseClusterID(config.StackHCIClusterId) + if err != nil { + return err + } + id := deploymentsettings.NewDeploymentSettingID(stackHCIClusterId.SubscriptionId, stackHCIClusterId.ResourceGroupName, stackHCIClusterId.ClusterName, "default") + + existing, err := client.Get(ctx, id) + if err != nil && !response.WasNotFound(existing.HttpResponse) { + return fmt.Errorf("checking for presence of existing %s: %+v", id, err) + } + if !response.WasNotFound(existing.HttpResponse) { + return metadata.ResourceRequiresImport(r.ResourceType(), id) + } + + payload := deploymentsettings.DeploymentSetting{ + Properties: &deploymentsettings.DeploymentSettingsProperties{ + ArcNodeResourceIds: config.ArcResourceIds, + DeploymentMode: deploymentsettings.DeploymentModeValidate, + DeploymentConfiguration: deploymentsettings.DeploymentConfiguration{ + Version: pointer.To(config.Version), + ScaleUnits: expandDeploymentSettingScaleUnits(config.ScaleUnit), + }, + }, + } + + // do validation + if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + return fmt.Errorf("validating %s: %+v", id, err) + } + + // do deployment + payload.Properties.DeploymentMode = deploymentsettings.DeploymentModeDeploy + if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + return fmt.Errorf("deploying %s: %+v", id, err) + } + + metadata.SetID(id) + + return nil + }, + } +} + +func (StackHCIDeploymentSettingResource) Read() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 5 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.AzureStackHCI.DeploymentSettings + + id, err := deploymentsettings.ParseDeploymentSettingID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + resp, err := client.Get(ctx, *id) + if err != nil { + if response.WasNotFound(resp.HttpResponse) { + return metadata.MarkAsGone(id) + } + + return fmt.Errorf("retrieving %s: %+v", id, err) + } + + schema := StackHCIDeploymentSettingModel{ + StackHCIClusterId: deploymentsettings.NewClusterID(id.SubscriptionId, id.ResourceGroupName, id.ClusterName).ID(), + } + + if model := resp.Model; model != nil { + if props := model.Properties; props != nil { + schema.ArcResourceIds = props.ArcNodeResourceIds + schema.Version = pointer.From(props.DeploymentConfiguration.Version) + schema.ScaleUnit = flattenDeploymentSettingScaleUnits(props.DeploymentConfiguration.ScaleUnits) + } + } + + return metadata.Encode(&schema) + }, + } +} + +func (StackHCIDeploymentSettingResource) Delete() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 1 * time.Hour, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.AzureStackHCI.DeploymentSettings + + id, err := deploymentsettings.ParseDeploymentSettingID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + resp, err := client.Get(ctx, *id) + if err != nil { + if response.WasNotFound(resp.HttpResponse) { + return metadata.MarkAsGone(id) + } + + return fmt.Errorf("retrieving %s: %+v", id, err) + } + + if err := client.DeleteThenPoll(ctx, *id); err != nil { + return fmt.Errorf("deleting %s: %+v", id, err) + } + + applianceName := fmt.Sprintf("%s-arcbridge", id.ClusterName) + applianceId := appliances.NewApplianceID(id.SubscriptionId, id.ResourceGroupName, applianceName) + + log.Printf("[DEBUG] Deleting Arc Resource Bridge Appliance generated during deployment: %s", applianceId.ID()) + + applianceClient := metadata.Client.ArcResourceBridge.AppliancesClient + if err := applianceClient.DeleteThenPoll(ctx, applianceId); err != nil { + return fmt.Errorf("deleting Arc Resource Bridge Appliance generated during deployment: deleting %s: %+v", applianceId, err) + } + + log.Printf("[DEBUG] Deleting Custom Location and Stack HCI Storage Paths generated during deployment") + + var customLocationName string + if resp.Model != nil && resp.Model.Properties != nil && + len(resp.Model.Properties.DeploymentConfiguration.ScaleUnits) > 0 && + resp.Model.Properties.DeploymentConfiguration.ScaleUnits[0].DeploymentData.OptionalServices != nil { + customLocationName = pointer.From(resp.Model.Properties.DeploymentConfiguration.ScaleUnits[0].DeploymentData.OptionalServices.CustomLocation) + } + + if customLocationName != "" { + customLocationId := customlocations.NewCustomLocationID(id.SubscriptionId, id.ResourceGroupName, customLocationName) + + // we need to delete the Storage Paths before the Custom Location, otherwise the Custom Location cannot be deleted if there is any Resource in it + log.Printf("[DEBUG] Deleting Stack HCI Storage Paths under Custom Location %s", customLocationId.ID()) + + storageContainerClient := metadata.Client.AzureStackHCI.StorageContainers + resourceGroupId := commonids.NewResourceGroupID(id.SubscriptionId, id.ResourceGroupName) + storageContainers, err := storageContainerClient.ListComplete(ctx, resourceGroupId) + if err != nil { + return fmt.Errorf("deleting Stack HCI Storage Paths generated during deployment: retrieving Storage Path under %s: %+v", resourceGroupId, err) + } + + // match Storage Paths under the Custom Location, the generated Storage Path name should match below pattern + storageContainerNamePattern := regexp.MustCompile(`UserStorage[0-9]+-[a-z0-9]{32}`) + for _, v := range storageContainers.Items { + if v.Id != nil && v.ExtendedLocation != nil && v.ExtendedLocation.Name != nil && strings.EqualFold(*v.ExtendedLocation.Name, customLocationId.ID()) && v.Name != nil && storageContainerNamePattern.Match([]byte(*v.Name)) { + storageContainerId, err := storagecontainers.ParseStorageContainerIDInsensitively(*v.Id) + if err != nil { + return fmt.Errorf("parsing the Stack HCI Storage Path ID generated during deployment: %+v", err) + } + + if err := storageContainerClient.DeleteThenPoll(ctx, *storageContainerId); err != nil { + return fmt.Errorf("deleting the Stack HCI Storage Path generated during deployment: deleting %s: %+v", storageContainerId, err) + } + } + } + + customLocationsClient := metadata.Client.ExtendedLocation.CustomLocationsClient + if err := customLocationsClient.DeleteThenPoll(ctx, customLocationId); err != nil { + return fmt.Errorf("deleting the Custom Location generated during deployment: deleting %s: %+v", customLocationId, err) + } + } + + return nil + }, + } +} + +func expandDeploymentSettingScaleUnits(input []ScaleUnitModel) []deploymentsettings.ScaleUnits { + if len(input) == 0 { + return nil + } + + results := make([]deploymentsettings.ScaleUnits, 0, len(input)) + for _, item := range input { + results = append(results, deploymentsettings.ScaleUnits{ + DeploymentData: deploymentsettings.DeploymentData{ + AdouPath: pointer.To(item.ActiveDirectoryOrganizationalUnitPath), + Cluster: expandDeploymentSettingCluster(item.Cluster), + DomainFqdn: pointer.To(item.DomainFqdn), + HostNetwork: expandDeploymentSettingHostNetwork(item.HostNetwork), + InfrastructureNetwork: expandDeploymentSettingInfrastructureNetwork(item.InfrastructureNetwork), + NamingPrefix: pointer.To(item.NamePrefix), + Observability: expandDeploymentSettingObservability(item), + OptionalServices: expandDeploymentSettingOptionalService(item.OptionalService), + PhysicalNodes: expandDeploymentSettingPhysicalNode(item.PhysicalNode), + SecretsLocation: pointer.To(item.SecretsLocation), + SecuritySettings: expandDeploymentSettingSecuritySetting(item), + Storage: expandDeploymentSettingStorage(item.Storage), + }, + }) + } + + return results +} + +func flattenDeploymentSettingScaleUnits(input []deploymentsettings.ScaleUnits) []ScaleUnitModel { + if len(input) == 0 { + return make([]ScaleUnitModel, 0) + } + + results := make([]ScaleUnitModel, 0, len(input)) + for _, item := range input { + result := ScaleUnitModel{ + ActiveDirectoryOrganizationalUnitPath: pointer.From(item.DeploymentData.AdouPath), + Cluster: flattenDeploymentSettingCluster(item.DeploymentData.Cluster), + DomainFqdn: pointer.From(item.DeploymentData.DomainFqdn), + HostNetwork: flattenDeploymentSettingHostNetwork(item.DeploymentData.HostNetwork), + InfrastructureNetwork: flattenDeploymentSettingInfrastructureNetwork(item.DeploymentData.InfrastructureNetwork), + NamePrefix: pointer.From(item.DeploymentData.NamingPrefix), + OptionalService: flattenDeploymentSettingOptionalService(item.DeploymentData.OptionalServices), + PhysicalNode: flattenDeploymentSettingPhysicalNode(item.DeploymentData.PhysicalNodes), + SecretsLocation: pointer.From(item.DeploymentData.SecretsLocation), + Storage: flattenDeploymentSettingStorage(item.DeploymentData.Storage), + } + + if observability := item.DeploymentData.Observability; observability != nil { + result.EpisodicDataUploadEnabled = pointer.From(observability.EpisodicDataUpload) + result.EuLocationEnabled = pointer.From(observability.EuLocation) + result.StreamingDataClientEnabled = pointer.From(observability.StreamingDataClient) + } + + if securitySettings := item.DeploymentData.SecuritySettings; securitySettings != nil { + result.BitlockerBootVolumeEnabled = pointer.From(securitySettings.BitlockerBootVolume) + result.BitlockerDataVolumeEnabled = pointer.From(securitySettings.BitlockerDataVolumes) + result.CredentialGuardEnabled = pointer.From(securitySettings.CredentialGuardEnforced) + result.DriftControlEnabled = pointer.From(securitySettings.DriftControlEnforced) + result.DrtmProtectionEnabled = pointer.From(securitySettings.DrtmProtection) + result.HvciProtectionEnabled = pointer.From(securitySettings.HvciProtection) + result.SideChannelMitigationEnabled = pointer.From(securitySettings.SideChannelMitigationEnforced) + result.SmbClusterEncryptionEnabled = pointer.From(securitySettings.SmbClusterEncryption) + result.SmbSigningEnabled = pointer.From(securitySettings.SmbSigningEnforced) + result.WdacEnabled = pointer.From(securitySettings.WdacEnforced) + } + + results = append(results, result) + } + + return results +} + +func expandDeploymentSettingCluster(input []ClusterModel) *deploymentsettings.DeploymentCluster { + if len(input) == 0 { + return nil + } + + v := input[0] + + return &deploymentsettings.DeploymentCluster{ + AzureServiceEndpoint: pointer.To(v.AzureServiceEndpoint), + CloudAccountName: pointer.To(v.CloudAccountName), + Name: pointer.To(v.Name), + WitnessType: pointer.To(v.WitnessType), + WitnessPath: pointer.To(v.WitnessPath), + } +} + +func flattenDeploymentSettingCluster(input *deploymentsettings.DeploymentCluster) []ClusterModel { + if input == nil { + return make([]ClusterModel, 0) + } + + return []ClusterModel{{ + AzureServiceEndpoint: pointer.From(input.AzureServiceEndpoint), + CloudAccountName: pointer.From(input.CloudAccountName), + Name: pointer.From(input.Name), + WitnessType: pointer.From(input.WitnessType), + WitnessPath: pointer.From(input.WitnessPath), + }} +} + +func expandDeploymentSettingHostNetwork(input []HostNetworkModel) *deploymentsettings.HostNetwork { + if len(input) == 0 { + return nil + } + + v := input[0] + + return &deploymentsettings.HostNetwork{ + Intents: expandDeploymentSettingHostNetworkIntent(v.Intent), + EnableStorageAutoIP: pointer.To(v.StorageAutoIpEnabled), + StorageConnectivitySwitchless: pointer.To(v.StorageConnectivitySwitchlessEnabled), + StorageNetworks: expandDeploymentSettingHostNetworkStorageNetwork(v.StorageNetwork), + } +} + +func flattenDeploymentSettingHostNetwork(input *deploymentsettings.HostNetwork) []HostNetworkModel { + if input == nil { + return make([]HostNetworkModel, 0) + } + + return []HostNetworkModel{{ + Intent: flattenDeploymentSettingHostNetworkIntent(input.Intents), + StorageAutoIpEnabled: pointer.From(input.EnableStorageAutoIP), + StorageConnectivitySwitchlessEnabled: pointer.From(input.StorageConnectivitySwitchless), + StorageNetwork: flattenDeploymentSettingHostNetworkStorageNetwork(input.StorageNetworks), + }} +} + +func expandDeploymentSettingHostNetworkIntent(input []HostNetworkIntentModel) *[]deploymentsettings.Intents { + if len(input) == 0 { + return nil + } + + results := make([]deploymentsettings.Intents, 0, len(input)) + for _, item := range input { + results = append(results, deploymentsettings.Intents{ + Adapter: pointer.To(item.Adapter), + AdapterPropertyOverrides: expandHostNetworkIntentAdapterPropertyOverride(item.AdapterPropertyOverride), + Name: pointer.To(item.Name), + OverrideAdapterProperty: pointer.To(item.AdapterPropertyOverrideEnabled), + OverrideQosPolicy: pointer.To(item.QosPolicyOverrideEnabled), + OverrideVirtualSwitchConfiguration: pointer.To(item.VirtualSwitchConfigurationOverrideEnabled), + QosPolicyOverrides: expandHostNetworkIntentQosPolicyOverride(item.QosPolicyOverride), + TrafficType: pointer.To(item.TrafficType), + VirtualSwitchConfigurationOverrides: expandHostNetworkIntentVirtualSwitchConfigurationOverride(item.VirtualSwitchConfigurationOverride), + }) + } + + return &results +} + +func flattenDeploymentSettingHostNetworkIntent(input *[]deploymentsettings.Intents) []HostNetworkIntentModel { + if input == nil { + return make([]HostNetworkIntentModel, 0) + } + + results := make([]HostNetworkIntentModel, 0, len(*input)) + for _, item := range *input { + results = append(results, HostNetworkIntentModel{ + Adapter: pointer.From(item.Adapter), + AdapterPropertyOverride: flattenHostNetworkIntentAdapterPropertyOverride(item.AdapterPropertyOverrides), + Name: pointer.From(item.Name), + AdapterPropertyOverrideEnabled: pointer.From(item.OverrideAdapterProperty), + QosPolicyOverrideEnabled: pointer.From(item.OverrideQosPolicy), + VirtualSwitchConfigurationOverrideEnabled: pointer.From(item.OverrideVirtualSwitchConfiguration), + QosPolicyOverride: flattenHostNetworkIntentQosPolicyOverride(item.QosPolicyOverrides), + TrafficType: pointer.From(item.TrafficType), + VirtualSwitchConfigurationOverride: flattenHostNetworkIntentVirtualSwitchConfigurationOverride(item.VirtualSwitchConfigurationOverrides), + }) + } + + return results +} + +func expandHostNetworkIntentAdapterPropertyOverride(input []HostNetworkIntentAdapterPropertyOverrideModel) *deploymentsettings.AdapterPropertyOverrides { + if len(input) == 0 { + return &deploymentsettings.AdapterPropertyOverrides{ + JumboPacket: pointer.To(""), + NetworkDirect: pointer.To(""), + NetworkDirectTechnology: pointer.To(""), + } + } + + v := input[0] + + return &deploymentsettings.AdapterPropertyOverrides{ + JumboPacket: pointer.To(v.JumboPacket), + NetworkDirect: pointer.To(v.NetworkDirect), + NetworkDirectTechnology: pointer.To(v.NetworkDirectTechnology), + } +} + +func flattenHostNetworkIntentAdapterPropertyOverride(input *deploymentsettings.AdapterPropertyOverrides) []HostNetworkIntentAdapterPropertyOverrideModel { + if input == nil { + return make([]HostNetworkIntentAdapterPropertyOverrideModel, 0) + } + + jumboPacket := pointer.From(input.JumboPacket) + networkDirect := pointer.From(input.NetworkDirect) + networkDirectTechnology := pointer.From(input.NetworkDirectTechnology) + + // server will return the block with empty string in all fields by default + if jumboPacket == "" && networkDirect == "" && networkDirectTechnology == "" { + return make([]HostNetworkIntentAdapterPropertyOverrideModel, 0) + } + + return []HostNetworkIntentAdapterPropertyOverrideModel{{ + JumboPacket: jumboPacket, + NetworkDirect: networkDirect, + NetworkDirectTechnology: networkDirectTechnology, + }} +} + +func expandHostNetworkIntentQosPolicyOverride(input []HostNetworkIntentQosPolicyOverrideModel) *deploymentsettings.QosPolicyOverrides { + if len(input) == 0 { + return &deploymentsettings.QosPolicyOverrides{ + BandwidthPercentageSMB: pointer.To(""), + PriorityValue8021ActionCluster: pointer.To(""), + PriorityValue8021ActionSMB: pointer.To(""), + } + } + + v := input[0] + + return &deploymentsettings.QosPolicyOverrides{ + BandwidthPercentageSMB: pointer.To(v.BandWidthPercentageSMB), + PriorityValue8021ActionCluster: pointer.To(v.PriorityValue8021ActionCluster), + PriorityValue8021ActionSMB: pointer.To(v.PriorityValue8021ActionSMB), + } +} + +func flattenHostNetworkIntentQosPolicyOverride(input *deploymentsettings.QosPolicyOverrides) []HostNetworkIntentQosPolicyOverrideModel { + if input == nil { + return make([]HostNetworkIntentQosPolicyOverrideModel, 0) + } + + bandwidthPercentageSMB := pointer.From(input.BandwidthPercentageSMB) + priorityValue8021ActionCluster := pointer.From(input.PriorityValue8021ActionCluster) + priorityValue8021ActionSMB := pointer.From(input.PriorityValue8021ActionSMB) + + // server will return the block with empty string in all fields by default + if bandwidthPercentageSMB == "" && priorityValue8021ActionCluster == "" && priorityValue8021ActionSMB == "" { + return make([]HostNetworkIntentQosPolicyOverrideModel, 0) + } + + return []HostNetworkIntentQosPolicyOverrideModel{{ + BandWidthPercentageSMB: bandwidthPercentageSMB, + PriorityValue8021ActionCluster: priorityValue8021ActionCluster, + PriorityValue8021ActionSMB: priorityValue8021ActionSMB, + }} +} + +func expandHostNetworkIntentVirtualSwitchConfigurationOverride(input []HostNetworkIntentVirtualSwitchConfigurationOverrideModel) *deploymentsettings.VirtualSwitchConfigurationOverrides { + if len(input) == 0 { + return &deploymentsettings.VirtualSwitchConfigurationOverrides{ + EnableIov: pointer.To(""), + LoadBalancingAlgorithm: pointer.To(""), + } + } + + v := input[0] + + return &deploymentsettings.VirtualSwitchConfigurationOverrides{ + EnableIov: pointer.To(v.EnableIov), + LoadBalancingAlgorithm: pointer.To(v.LoadBalancingAlgorithm), + } +} + +func flattenHostNetworkIntentVirtualSwitchConfigurationOverride(input *deploymentsettings.VirtualSwitchConfigurationOverrides) []HostNetworkIntentVirtualSwitchConfigurationOverrideModel { + if input == nil { + return make([]HostNetworkIntentVirtualSwitchConfigurationOverrideModel, 0) + } + + enableIov := pointer.From(input.EnableIov) + loadBalancingAlgorithm := pointer.From(input.LoadBalancingAlgorithm) + + // server will return the block with empty string in all fields by default + if enableIov == "" && loadBalancingAlgorithm == "" { + return make([]HostNetworkIntentVirtualSwitchConfigurationOverrideModel, 0) + } + + return []HostNetworkIntentVirtualSwitchConfigurationOverrideModel{{ + EnableIov: enableIov, + LoadBalancingAlgorithm: loadBalancingAlgorithm, + }} +} + +func expandDeploymentSettingHostNetworkStorageNetwork(input []HostNetworkStorageNetworkModel) *[]deploymentsettings.StorageNetworks { + if len(input) == 0 { + return nil + } + + results := make([]deploymentsettings.StorageNetworks, 0, len(input)) + for _, item := range input { + results = append(results, deploymentsettings.StorageNetworks{ + Name: pointer.To(item.Name), + NetworkAdapterName: pointer.To(item.NetworkAdapterName), + VlanId: pointer.To(item.VlanId), + }) + } + + return &results +} + +func flattenDeploymentSettingHostNetworkStorageNetwork(input *[]deploymentsettings.StorageNetworks) []HostNetworkStorageNetworkModel { + if input == nil { + return make([]HostNetworkStorageNetworkModel, 0) + } + + results := make([]HostNetworkStorageNetworkModel, 0, len(*input)) + for _, item := range *input { + results = append(results, HostNetworkStorageNetworkModel{ + Name: pointer.From(item.Name), + NetworkAdapterName: pointer.From(item.NetworkAdapterName), + VlanId: pointer.From(item.VlanId), + }) + } + + return results +} + +func expandDeploymentSettingInfrastructureNetwork(input []InfrastructureNetworkModel) *[]deploymentsettings.InfrastructureNetwork { + if len(input) == 0 { + return nil + } + + results := make([]deploymentsettings.InfrastructureNetwork, 0, len(input)) + for _, item := range input { + results = append(results, deploymentsettings.InfrastructureNetwork{ + DnsServers: pointer.To(item.DnsServer), + Gateway: pointer.To(item.Gateway), + IPPools: expandDeploymentSettingInfrastructureNetworkIpPool(item.IpPool), + SubnetMask: pointer.To(item.SubnetMask), + UseDhcp: pointer.To(item.DhcpEnabled), + }) + } + + return &results +} + +func flattenDeploymentSettingInfrastructureNetwork(input *[]deploymentsettings.InfrastructureNetwork) []InfrastructureNetworkModel { + if input == nil { + return make([]InfrastructureNetworkModel, 0) + } + + results := make([]InfrastructureNetworkModel, 0, len(*input)) + for _, item := range *input { + results = append(results, InfrastructureNetworkModel{ + DhcpEnabled: pointer.From(item.UseDhcp), + DnsServer: pointer.From(item.DnsServers), + Gateway: pointer.From(item.Gateway), + IpPool: flattenDeploymentSettingInfrastructureNetworkIpPool(item.IPPools), + SubnetMask: pointer.From(item.SubnetMask), + }) + } + + return results +} + +func expandDeploymentSettingInfrastructureNetworkIpPool(input []IpPoolModel) *[]deploymentsettings.IPPools { + if len(input) == 0 { + return nil + } + + results := make([]deploymentsettings.IPPools, 0, len(input)) + for _, item := range input { + results = append(results, deploymentsettings.IPPools{ + EndingAddress: pointer.To(item.EndingAddress), + StartingAddress: pointer.To(item.StartingAddress), + }) + } + + return &results +} + +func flattenDeploymentSettingInfrastructureNetworkIpPool(input *[]deploymentsettings.IPPools) []IpPoolModel { + if input == nil { + return make([]IpPoolModel, 0) + } + + results := make([]IpPoolModel, 0, len(*input)) + for _, item := range *input { + results = append(results, IpPoolModel{ + EndingAddress: pointer.From(item.EndingAddress), + StartingAddress: pointer.From(item.StartingAddress), + }) + } + + return results +} + +func expandDeploymentSettingObservability(input ScaleUnitModel) *deploymentsettings.Observability { + return &deploymentsettings.Observability{ + EpisodicDataUpload: pointer.To(input.EpisodicDataUploadEnabled), + EuLocation: pointer.To(input.EuLocationEnabled), + StreamingDataClient: pointer.To(input.StreamingDataClientEnabled), + } +} + +func expandDeploymentSettingOptionalService(input []OptionalServiceModel) *deploymentsettings.OptionalServices { + if len(input) == 0 { + return nil + } + + v := input[0] + + return &deploymentsettings.OptionalServices{ + CustomLocation: pointer.To(v.CustomLocation), + } +} + +func flattenDeploymentSettingOptionalService(input *deploymentsettings.OptionalServices) []OptionalServiceModel { + if input == nil { + return make([]OptionalServiceModel, 0) + } + + return []OptionalServiceModel{{ + CustomLocation: pointer.From(input.CustomLocation), + }} +} + +func expandDeploymentSettingPhysicalNode(input []PhysicalNodeModel) *[]deploymentsettings.PhysicalNodes { + if len(input) == 0 { + return nil + } + + results := make([]deploymentsettings.PhysicalNodes, 0, len(input)) + for _, item := range input { + results = append(results, deploymentsettings.PhysicalNodes{ + IPv4Address: pointer.To(item.Ipv4Address), + Name: pointer.To(item.Name), + }) + } + + return &results +} + +func flattenDeploymentSettingPhysicalNode(input *[]deploymentsettings.PhysicalNodes) []PhysicalNodeModel { + if input == nil { + return make([]PhysicalNodeModel, 0) + } + + results := make([]PhysicalNodeModel, 0, len(*input)) + for _, item := range *input { + results = append(results, PhysicalNodeModel{ + Ipv4Address: pointer.From(item.IPv4Address), + Name: pointer.From(item.Name), + }) + } + + return results +} + +func expandDeploymentSettingSecuritySetting(input ScaleUnitModel) *deploymentsettings.DeploymentSecuritySettings { + return &deploymentsettings.DeploymentSecuritySettings{ + BitlockerBootVolume: pointer.To(input.BitlockerBootVolumeEnabled), + BitlockerDataVolumes: pointer.To(input.BitlockerDataVolumeEnabled), + CredentialGuardEnforced: pointer.To(input.CredentialGuardEnabled), + DriftControlEnforced: pointer.To(input.DriftControlEnabled), + DrtmProtection: pointer.To(input.DrtmProtectionEnabled), + HvciProtection: pointer.To(input.HvciProtectionEnabled), + SideChannelMitigationEnforced: pointer.To(input.SideChannelMitigationEnabled), + SmbClusterEncryption: pointer.To(input.SmbClusterEncryptionEnabled), + SmbSigningEnforced: pointer.To(input.SmbSigningEnabled), + WdacEnforced: pointer.To(input.WdacEnabled), + } +} + +func expandDeploymentSettingStorage(input []StorageModel) *deploymentsettings.Storage { + if len(input) == 0 { + return nil + } + + v := input[0] + + return &deploymentsettings.Storage{ + ConfigurationMode: pointer.To(v.ConfigurationMode), + } +} + +func flattenDeploymentSettingStorage(input *deploymentsettings.Storage) []StorageModel { + if input == nil { + return make([]StorageModel, 0) + } + + return []StorageModel{{ + ConfigurationMode: pointer.From(input.ConfigurationMode), + }} +} diff --git a/internal/services/azurestackhci/stack_hci_deployment_setting_resource_test.go b/internal/services/azurestackhci/stack_hci_deployment_setting_resource_test.go new file mode 100644 index 0000000000000..50bb2615882fd --- /dev/null +++ b/internal/services/azurestackhci/stack_hci_deployment_setting_resource_test.go @@ -0,0 +1,852 @@ +package azurestackhci_test + +import ( + "context" + "fmt" + "os" + "testing" + + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" + "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" +) + +type StackHCIDeploymentSettingResource struct{} + +// The test must run in Windows environment with Administrator PowerShell, which will simulate HCI hardware by an Azure Windows VM based on a given image, and deploy HCI on it. +// based on https://github.com/Azure/Edge-infrastructure-quickstart-template +const ( + imageIdEnv = "ARM_TEST_HCI_IMAGE_ID" + localAdminUserEnv = "ARM_TEST_HCI_LOCAL_ADMIN_USER" + localAdminUserPasswordEnv = "ARM_TEST_HCI_LOCAL_ADMIN_USER_PASSWORD" + domainAdminUserEnv = "ARM_TEST_HCI_DOMAIN_ADMIN_USER" + domainAdminUserPasswordEnv = "ARM_TEST_HCI_DOMAIN_ADMIN_USER_PASSWORD" + deploymentUserEnv = "ARM_TEST_HCI_DEPLOYMENT_USER" + deploymentUserPasswordEnv = "ARM_TEST_HCI_DEPLOYMENT_USER_PASSWORD" +) + +func TestAccStackHCIDeploymentSetting_basic(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_stack_hci_deployment_setting", "test") + r := StackHCIDeploymentSettingResource{} + + if os.Getenv(imageIdEnv) == "" || os.Getenv(localAdminUserEnv) == "" || os.Getenv(domainAdminUserEnv) == "" || os.Getenv(domainAdminUserEnv) == "" || os.Getenv(domainAdminUserPasswordEnv) == "" || os.Getenv(deploymentUserEnv) == "" || os.Getenv(deploymentUserPasswordEnv) == "" { + t.Skipf("skip the test as one or more of below environment variables are not specified: %q, %q, %q, %q, %q, %q, %q", imageIdEnv, localAdminUserEnv, localAdminUserPasswordEnv, domainAdminUserEnv, domainAdminUserPasswordEnv, deploymentUserEnv, deploymentUserPasswordEnv) + } + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + +func TestAccStackHCIDeploymentSetting_requiresImport(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_stack_hci_deployment_setting", "test") + r := StackHCIDeploymentSettingResource{} + + if os.Getenv(imageIdEnv) == "" || os.Getenv(localAdminUserEnv) == "" || os.Getenv(domainAdminUserEnv) == "" || os.Getenv(domainAdminUserEnv) == "" || os.Getenv(domainAdminUserPasswordEnv) == "" || os.Getenv(deploymentUserEnv) == "" || os.Getenv(deploymentUserPasswordEnv) == "" { + t.Skipf("skip the test as one or more of below environment variables are not specified: %q, %q, %q, %q, %q, %q, %q", imageIdEnv, localAdminUserEnv, localAdminUserPasswordEnv, domainAdminUserEnv, domainAdminUserPasswordEnv, deploymentUserEnv, deploymentUserPasswordEnv) + } + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.RequiresImportErrorStep(r.requiresImport), + }) +} + +func TestAccStackHCIDeploymentSetting_complete(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_stack_hci_deployment_setting", "test") + r := StackHCIDeploymentSettingResource{} + + if os.Getenv(imageIdEnv) == "" || os.Getenv(localAdminUserEnv) == "" || os.Getenv(domainAdminUserEnv) == "" || os.Getenv(domainAdminUserEnv) == "" || os.Getenv(domainAdminUserPasswordEnv) == "" || os.Getenv(deploymentUserEnv) == "" || os.Getenv(deploymentUserPasswordEnv) == "" { + t.Skipf("skip the test as one or more of below environment variables are not specified: %q, %q, %q, %q, %q, %q, %q", imageIdEnv, localAdminUserEnv, localAdminUserPasswordEnv, domainAdminUserEnv, domainAdminUserPasswordEnv, deploymentUserEnv, deploymentUserPasswordEnv) + } + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.complete(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + +func (r StackHCIDeploymentSettingResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { + clusterClient := client.AzureStackHCI.DeploymentSettings + id, err := deploymentsettings.ParseDeploymentSettingID(state.ID) + if err != nil { + return nil, err + } + + resp, err := clusterClient.Get(ctx, *id) + if err != nil { + return nil, fmt.Errorf("retrieving %s: %+v", *id, err) + } + + return pointer.To(resp.Model != nil), nil +} + +func (r StackHCIDeploymentSettingResource) basic(data acceptance.TestData) string { + template := r.template(data) + return fmt.Sprintf(` +%s + +provider "azurerm" { + features { + resource_group { + // need to delete arc vm + prevent_deletion_if_contains_resources = false + } + } +} + +resource "azurerm_stack_hci_deployment_setting" "test" { + stack_hci_cluster_id = azurerm_stack_hci_cluster.test.id + arc_resource_ids = [for server in data.azurerm_arc_machine.server : server.id] + version = "10.0.0.0" + + scale_unit { + active_directory_organizational_unit_path = "OU=hci${var.random_string},DC=jumpstart,DC=local" + domain_fqdn = "jumpstart.local" + secrets_location = azurerm_key_vault.DeploymentKeyVault.vault_uri + name_prefix = "hci${var.random_string}" + streaming_data_client_enabled = true + eu_location_enabled = false + episodic_data_upload_enabled = true + + bitlocker_boot_volume_enabled = true + bitlocker_data_volume_enabled = true + credential_guard_enabled = true + drift_control_enabled = true + drtm_protection_enabled = true + hvci_protection_enabled = true + side_channel_mitigation_enabled = true + smb_cluster_encryption_enabled = false + smb_signing_enabled = true + wdac_enabled = true + + cluster { + azure_service_endpoint = "core.windows.net" + cloud_account_name = azurerm_storage_account.witness.name + name = azurerm_stack_hci_cluster.test.name + witness_type = "Cloud" + witness_path = "Cloud" + } + + host_network { + intent { + name = "ManagementCompute" + adapter_property_override_enabled = true + adapter_property_override { + network_direct = "Disabled" + } + adapter = [ + "FABRIC", + "FABRIC2", + ] + traffic_type = [ + "Management", + "Compute", + ] + } + + intent { + name = "Storage" + adapter_property_override_enabled = true + adapter_property_override { + network_direct = "Disabled" + } + adapter = [ + "StorageA", + "StorageB", + ] + traffic_type = [ + "Storage", + ] + } + + storage_network { + name = "Storage1Network" + network_adapter_name = "StorageA" + vlan_id = "711" + } + + storage_network { + name = "Storage2Network" + network_adapter_name = "StorageB" + vlan_id = "712" + } + } + + infrastructure_network { + gateway = "192.168.1.1" + subnet_mask = "255.255.255.0" + dns_server = [ + "192.168.1.254" + ] + ip_pool { + ending_address = "192.168.1.65" + starting_address = "192.168.1.55" + } + } + + optional_service { + custom_location = "customlocation${var.random_string}" + } + + physical_node { + ipv4_address = "192.168.1.12" + name = "AzSHOST1" + } + + physical_node { + ipv4_address = "192.168.1.13" + name = "AzSHOST2" + } + + storage { + configuration_mode = "Express" + } + } +} +`, template) +} + +func (r StackHCIDeploymentSettingResource) requiresImport(data acceptance.TestData) string { + config := r.basic(data) + + return fmt.Sprintf(` +%s + +resource "azurerm_stack_hci_deployment_setting" "import" { + stack_hci_cluster_id = azurerm_stack_hci_cluster.test.id + arc_resource_ids = azurerm_stack_hci_deployment_setting.test.arc_resource_ids + version = azurerm_stack_hci_deployment_setting.test.version + + scale_unit { + active_directory_organizational_unit_path = azurerm_stack_hci_deployment_setting.test.scale_unit.0.active_directory_organizational_unit_path + domain_fqdn = azurerm_stack_hci_deployment_setting.test.scale_unit.0.domain_fqdn + secrets_location = azurerm_stack_hci_deployment_setting.test.scale_unit.0.secrets_location + name_prefix = azurerm_stack_hci_deployment_setting.test.scale_unit.0.name_prefix + streaming_data_client_enabled = azurerm_stack_hci_deployment_setting.test.scale_unit.0.streaming_data_client_enabled + eu_location_enabled = azurerm_stack_hci_deployment_setting.test.scale_unit.0.eu_location_enabled + episodic_data_upload_enabled = azurerm_stack_hci_deployment_setting.test.scale_unit.0.episodic_data_upload_enabled + + bitlocker_boot_volume_enabled = azurerm_stack_hci_deployment_setting.test.scale_unit.0.bitlocker_boot_volume_enabled + bitlocker_data_volume_enabled = azurerm_stack_hci_deployment_setting.test.scale_unit.0.bitlocker_data_volume_enabled + credential_guard_enabled = azurerm_stack_hci_deployment_setting.test.scale_unit.0.credential_guard_enabled + drift_control_enabled = azurerm_stack_hci_deployment_setting.test.scale_unit.0.drift_control_enabled + drtm_protection_enabled = azurerm_stack_hci_deployment_setting.test.scale_unit.0.drtm_protection_enabled + hvci_protection_enabled = azurerm_stack_hci_deployment_setting.test.scale_unit.0.hvci_protection_enabled + side_channel_mitigation_enabled = azurerm_stack_hci_deployment_setting.test.scale_unit.0.side_channel_mitigation_enabled + smb_cluster_encryption_enabled = azurerm_stack_hci_deployment_setting.test.scale_unit.0.smb_cluster_encryption_enabled + smb_signing_enabled = azurerm_stack_hci_deployment_setting.test.scale_unit.0.smb_signing_enabled + wdac_enabled = azurerm_stack_hci_deployment_setting.test.scale_unit.0.wdac_enabled + + + cluster { + azure_service_endpoint = azurerm_stack_hci_deployment_setting.test.scale_unit.0.cluster.0.azure_service_endpoint + cloud_account_name = azurerm_stack_hci_deployment_setting.test.scale_unit.0.cluster.0.cloud_account_name + name = azurerm_stack_hci_deployment_setting.test.scale_unit.0.cluster.0.name + witness_type = azurerm_stack_hci_deployment_setting.test.scale_unit.0.cluster.0.witness_type + witness_path = azurerm_stack_hci_deployment_setting.test.scale_unit.0.cluster.0.witness_path + } + + host_network { + intent { + name = azurerm_stack_hci_deployment_setting.test.scale_unit.0.host_network.0.intent.0.name + adapter = azurerm_stack_hci_deployment_setting.test.scale_unit.0.host_network.0.intent.0.adapter + adapter_property_override_enabled = azurerm_stack_hci_deployment_setting.test.scale_unit.0.host_network.0.intent.0.adapter_property_override_enabled + traffic_type = azurerm_stack_hci_deployment_setting.test.scale_unit.0.host_network.0.intent.0.traffic_type + adapter_property_override { + network_direct = azurerm_stack_hci_deployment_setting.test.scale_unit.0.host_network.0.intent.0.adapter_property_override.0.network_direct + } + } + + intent { + name = azurerm_stack_hci_deployment_setting.test.scale_unit.0.host_network.0.intent.1.name + adapter = azurerm_stack_hci_deployment_setting.test.scale_unit.0.host_network.0.intent.1.adapter + adapter_property_override_enabled = azurerm_stack_hci_deployment_setting.test.scale_unit.0.host_network.0.intent.0.adapter_property_override_enabled + traffic_type = azurerm_stack_hci_deployment_setting.test.scale_unit.0.host_network.0.intent.1.traffic_type + adapter_property_override { + network_direct = azurerm_stack_hci_deployment_setting.test.scale_unit.0.host_network.0.intent.0.adapter_property_override.0.network_direct + } + } + + storage_network { + name = azurerm_stack_hci_deployment_setting.test.scale_unit.0.host_network.0.storage_network.0.name + network_adapter_name = azurerm_stack_hci_deployment_setting.test.scale_unit.0.host_network.0.storage_network.0.network_adapter_name + vlan_id = azurerm_stack_hci_deployment_setting.test.scale_unit.0.host_network.0.storage_network.0.vlan_id + } + + storage_network { + name = azurerm_stack_hci_deployment_setting.test.scale_unit.0.host_network.0.storage_network.1.name + network_adapter_name = azurerm_stack_hci_deployment_setting.test.scale_unit.0.host_network.0.storage_network.1.network_adapter_name + vlan_id = azurerm_stack_hci_deployment_setting.test.scale_unit.0.host_network.0.storage_network.1.vlan_id + } + } + + infrastructure_network { + gateway = azurerm_stack_hci_deployment_setting.test.scale_unit.0.infrastructure_network.0.gateway + subnet_mask = azurerm_stack_hci_deployment_setting.test.scale_unit.0.infrastructure_network.0.subnet_mask + dns_server = azurerm_stack_hci_deployment_setting.test.scale_unit.0.infrastructure_network.0.dns_server + ip_pool { + ending_address = azurerm_stack_hci_deployment_setting.test.scale_unit.0.infrastructure_network.0.ip_pool.0.ending_address + starting_address = azurerm_stack_hci_deployment_setting.test.scale_unit.0.infrastructure_network.0.ip_pool.0.starting_address + } + } + + optional_service { + custom_location = azurerm_stack_hci_deployment_setting.test.scale_unit.0.optional_service.0.custom_location + } + + physical_node { + ipv4_address = azurerm_stack_hci_deployment_setting.test.scale_unit.0.physical_node.0.ipv4_address + name = azurerm_stack_hci_deployment_setting.test.scale_unit.0.physical_node.0.name + } + + physical_node { + ipv4_address = azurerm_stack_hci_deployment_setting.test.scale_unit.0.physical_node.1.ipv4_address + name = azurerm_stack_hci_deployment_setting.test.scale_unit.0.physical_node.1.name + } + + storage { + configuration_mode = azurerm_stack_hci_deployment_setting.test.scale_unit.0.storage.0.configuration_mode + } + } +} +`, config) +} + +func (r StackHCIDeploymentSettingResource) complete(data acceptance.TestData) string { + template := r.template(data) + return fmt.Sprintf(` +%s + +provider "azurerm" { + features { + resource_group { + // need to delete arc vm + prevent_deletion_if_contains_resources = false + } + } +} + +resource "azurerm_stack_hci_deployment_setting" "test" { + stack_hci_cluster_id = azurerm_stack_hci_cluster.test.id + arc_resource_ids = [for server in data.azurerm_arc_machine.server : server.id] + version = "10.0.0.0" + + scale_unit { + active_directory_organizational_unit_path = "OU=hci${var.random_string},DC=jumpstart,DC=local" + domain_fqdn = "jumpstart.local" + secrets_location = azurerm_key_vault.DeploymentKeyVault.vault_uri + name_prefix = "hci${var.random_string}" + streaming_data_client_enabled = true + eu_location_enabled = false + episodic_data_upload_enabled = true + bitlocker_boot_volume_enabled = true + bitlocker_data_volume_enabled = true + credential_guard_enabled = true + drift_control_enabled = true + drtm_protection_enabled = true + hvci_protection_enabled = true + side_channel_mitigation_enabled = true + smb_cluster_encryption_enabled = false + smb_signing_enabled = true + wdac_enabled = true + + + cluster { + azure_service_endpoint = "core.windows.net" + cloud_account_name = azurerm_storage_account.witness.name + name = azurerm_stack_hci_cluster.test.name + witness_type = "Cloud" + witness_path = "Cloud" + } + + host_network { + storage_auto_ip_enabled = true + storage_connectivity_switchless_enabled = false + + intent { + name = "ManagementCompute" + adapter_property_override_enabled = true + qos_policy_override_enabled = false + virtual_switch_configuration_override_enabled = false + adapter = [ + "FABRIC", + "FABRIC2", + ] + traffic_type = [ + "Management", + "Compute", + ] + qos_policy_override { + priority_value8021_action_cluster = "7" + priority_value8021_action_smb = "3" + bandwidth_percentage_smb = "50" + } + adapter_property_override { + network_direct = "Disabled" + } + } + + intent { + name = "Storage" + adapter_property_override_enabled = true + qos_policy_override_enabled = false + virtual_switch_configuration_override_enabled = false + adapter = [ + "StorageA", + "StorageB", + ] + traffic_type = [ + "Storage", + ] + qos_policy_override { + priority_value8021_action_cluster = "7" + priority_value8021_action_smb = "3" + bandwidth_percentage_smb = "50" + } + adapter_property_override { + network_direct = "Disabled" + } + } + + storage_network { + name = "Storage1Network" + network_adapter_name = "StorageA" + vlan_id = "711" + } + + storage_network { + name = "Storage2Network" + network_adapter_name = "StorageB" + vlan_id = "712" + } + } + + infrastructure_network { + gateway = "192.168.1.1" + subnet_mask = "255.255.255.0" + dhcp_enabled = false + dns_server = [ + "192.168.1.254" + ] + ip_pool { + ending_address = "192.168.1.65" + starting_address = "192.168.1.55" + } + } + + optional_service { + custom_location = "customlocation${var.random_string}" + } + + physical_node { + ipv4_address = "192.168.1.12" + name = "AzSHOST1" + } + + physical_node { + ipv4_address = "192.168.1.13" + name = "AzSHOST2" + } + + storage { + configuration_mode = "Express" + } + } +} +`, template) +} + +func (r StackHCIDeploymentSettingResource) template(data acceptance.TestData) string { + return fmt.Sprintf(` +variable "primary_location" { + default = %q +} + +variable "random_string" { + default = %q +} + +variable "image_id" { + description = "The ID of the image to use for the HCI virtual host machine" + sensitive = true + type = string + default = %q +} + +variable "local_admin_user" { + description = "The username of the local administrator account." + sensitive = true + type = string + default = %q +} + +variable "local_admin_password" { + description = "The password of the local administrator account." + sensitive = true + type = string + default = %q +} + +variable "domain_admin_user" { + description = "The username of the domain account." + sensitive = true + type = string + default = %q +} + +variable "domain_admin_password" { + description = "The password of the domain account." + sensitive = true + type = string + default = %q +} + +variable "deployment_user" { + sensitive = true + type = string + description = "The username for deployment user." + default = %q +} + +variable "deployment_user_password" { + sensitive = true + type = string + description = "The password for deployment user." + default = %q +} + +provider "azuread" {} + +data "azurerm_subscription" "current" {} + +resource "azurerm_resource_group" "test" { + name = "acctest-hci-vm-${var.random_string}" + location = var.primary_location +} + +resource "azurerm_public_ip" "test" { + name = "ip-${var.random_string}" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + allocation_method = "Static" + sku = "Standard" +} + +resource "azurerm_virtual_network" "test" { + name = "vnet-${var.random_string}" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + address_space = ["172.17.0.0/16"] +} + +resource "azurerm_subnet" "test" { + name = "default" + resource_group_name = azurerm_resource_group.test.name + virtual_network_name = azurerm_virtual_network.test.name + address_prefixes = ["172.17.0.0/24"] +} + +resource "azurerm_network_interface" "test" { + name = "ni-${var.random_string}" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + ip_configuration { + name = "ipconfig1" + private_ip_address_allocation = "Dynamic" + public_ip_address_id = azurerm_public_ip.test.id + subnet_id = azurerm_subnet.test.id + } +} + +resource "azurerm_network_interface_security_group_association" "test" { + network_interface_id = azurerm_network_interface.test.id + network_security_group_id = azurerm_network_security_group.test.id + depends_on = [ + azurerm_network_interface.test, + azurerm_network_security_group.test, + ] +} + +resource "azurerm_network_security_group" "test" { + name = "nsg-${var.random_string}" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location +} + +resource "azurerm_network_security_rule" "test1" { + access = "Allow" + destination_address_prefix = "*" + destination_port_ranges = ["6985", "15985", "25985"] + direction = "Inbound" + name = "rule1-${var.random_string}" + network_security_group_name = azurerm_network_security_group.test.name + priority = 103 + protocol = "*" + resource_group_name = azurerm_resource_group.test.name + source_address_prefix = "*" + source_port_range = "*" +} + +resource "azurerm_virtual_machine" "test" { + name = "vm-${var.random_string}" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + network_interface_ids = [azurerm_network_interface.test.id] + vm_size = "Standard_E32s_v5" + delete_os_disk_on_termination = true + delete_data_disks_on_termination = true + storage_image_reference { + id = var.image_id + } + boot_diagnostics { + enabled = true + storage_uri = "" + } + + storage_os_disk { + create_option = "FromImage" + name = "vm-${var.random_string}_OsDisk" + } + + depends_on = [ + azurerm_network_interface_security_group_association.test, + ] +} + +locals { + servers = [ + { + name = "AzSHOST1" + ipv4_address = "192.168.1.12" + port = 15985 + }, + { + name = "AzSHOST2" + ipv4_address = "192.168.1.13" + port = 25985 + } + ] + connection_roles = [ + "Azure Connected Machine Onboarding", + "Azure Connected Machine Resource Administrator", + "Azure Resource Bridge Deployment Role" + ] + machine_roles = [ + "Key Vault Secrets User", + "Azure Connected Machine Resource Manager", + "Azure Stack HCI Device Management Role", + "Reader" + ] +} + +resource "azurerm_resource_group" "test2" { + name = "acctest-hci-${var.random_string}" + location = var.primary_location +} + +resource "azuread_application" "test" { + display_name = "acctest-hci-onboard-${var.random_string}" +} + +resource "azuread_service_principal" "test" { + client_id = azuread_application.test.client_id +} + +resource "azuread_service_principal_password" "test" { + service_principal_id = azuread_service_principal.test.object_id +} + +resource "azurerm_role_assignment" "connect" { + count = length(local.connection_roles) + scope = azurerm_resource_group.test2.id + role_definition_name = local.connection_roles[count.index] + principal_id = azuread_service_principal.test.object_id +} + +resource "azurerm_role_assignment" "connect2" { + scope = data.azurerm_subscription.current.id + role_definition_name = "Contributor" + principal_id = azuread_service_principal.test.object_id +} + +// this is following https://learn.microsoft.com/en-us/azure-stack/hci/deploy/deployment-tool-active-directory +resource "terraform_data" "ad_creation_provisioner" { + depends_on = [azurerm_virtual_machine.test] + + provisioner "local-exec" { + command = "powershell.exe -ExecutionPolicy Bypass -NoProfile -File ./testdata/ad.ps1 -userName ${var.domain_admin_user} -password \"${var.domain_admin_password}\" -authType Credssp -ip ${azurerm_public_ip.test.ip_address} -port 6985 -adouPath OU=hci${var.random_string},DC=jumpstart,DC=local -domainFqdn jumpstart.local -ifdeleteadou false -deploymentUserName ${var.deployment_user} -deploymentUserPassword \"${var.deployment_user_password}\"" + interpreter = ["PowerShell", "-Command"] + } + + lifecycle { + replace_triggered_by = [azurerm_resource_group.test2.name] + } +} + +resource "terraform_data" "provisioner" { + count = length(local.servers) + + depends_on = [ + terraform_data.ad_creation_provisioner, + azurerm_role_assignment.connect, + azurerm_role_assignment.connect2, + ] + + provisioner "local-exec" { + command = "echo Connect ${local.servers[count.index].name} to Azure Arc..." + } + + provisioner "local-exec" { + command = "powershell.exe -ExecutionPolicy Bypass -NoProfile -File ./testdata/connect.ps1 -userName ${var.local_admin_user} -password \"${var.local_admin_password}\" -authType Credssp -ip ${azurerm_public_ip.test.ip_address} -port ${local.servers[count.index].port} -subscriptionId ${data.azurerm_client_config.current.subscription_id} -resourceGroupName ${azurerm_resource_group.test2.name} -region ${azurerm_resource_group.test2.location} -tenant ${data.azurerm_client_config.current.tenant_id} -servicePrincipalId ${azuread_service_principal.test.client_id} -servicePrincipalSecret ${azuread_service_principal_password.test.value} -expandC true" + interpreter = ["PowerShell", "-Command"] + } + + provisioner "local-exec" { + command = "echo connected ${local.servers[count.index].name}" + } + + lifecycle { + replace_triggered_by = [azurerm_resource_group.test2.name] + } +} + +data "azurerm_arc_machine" "server" { + count = length(local.servers) + name = local.servers[count.index].name + resource_group_name = azurerm_resource_group.test2.name + depends_on = [terraform_data.provisioner] +} + +data "azurerm_client_config" "current" {} + +resource "azurerm_key_vault" "DeploymentKeyVault" { + name = "hci${var.random_string}-testkv" + location = azurerm_resource_group.test2.location + resource_group_name = azurerm_resource_group.test2.name + enabled_for_deployment = true + enabled_for_template_deployment = true + enabled_for_disk_encryption = true + tenant_id = data.azurerm_client_config.current.tenant_id + soft_delete_retention_days = 30 + enable_rbac_authorization = true + public_network_access_enabled = true + sku_name = "standard" +} + +resource "azurerm_role_assignment" "KeyVault" { + scope = azurerm_key_vault.DeploymentKeyVault.id + role_definition_name = "Key Vault Secrets Officer" + principal_id = data.azurerm_client_config.current.object_id +} + +resource "azurerm_key_vault_secret" "AzureStackLCMUserCredential" { + name = "AzureStackLCMUserCredential" + content_type = "Secret" + value = base64encode("${var.deployment_user}:${var.deployment_user_password}") + key_vault_id = azurerm_key_vault.DeploymentKeyVault.id + depends_on = [azurerm_role_assignment.KeyVault] +} + +resource "azurerm_key_vault_secret" "LocalAdminCredential" { + name = "LocalAdminCredential" + content_type = "Secret" + value = base64encode("${var.local_admin_user}:${var.local_admin_password}") + key_vault_id = azurerm_key_vault.DeploymentKeyVault.id + depends_on = [azurerm_role_assignment.KeyVault] +} + +resource "azurerm_key_vault_secret" "DefaultARBApplication" { + name = "DefaultARBApplication" + content_type = "Secret" + value = base64encode("${azuread_service_principal.test.client_id}:${azuread_service_principal_password.test.value}") + key_vault_id = azurerm_key_vault.DeploymentKeyVault.id + depends_on = [azurerm_role_assignment.KeyVault] +} + +resource "azurerm_key_vault_secret" "WitnessStorageKey" { + name = "WitnessStorageKey" + content_type = "Secret" + value = base64encode(azurerm_storage_account.witness.primary_access_key) + key_vault_id = azurerm_key_vault.DeploymentKeyVault.id + depends_on = [azurerm_role_assignment.KeyVault] +} + +resource "azurerm_storage_account" "witness" { + name = "hci${var.random_string}teststa" + location = azurerm_resource_group.test2.location + resource_group_name = azurerm_resource_group.test2.name + account_tier = "Standard" + account_replication_type = "LRS" +} + +// service principal of 'Microsoft.AzureStackHCI Resource Provider' +data "azuread_service_principal" "hciRp" { + client_id = "1412d89f-b8a8-4111-b4fd-e82905cbd85d" +} + +resource "azurerm_role_assignment" "MachineRoleAssign1" { + count = length(local.machine_roles) + scope = azurerm_resource_group.test2.id + role_definition_name = local.machine_roles[count.index] + principal_id = data.azurerm_arc_machine.server[0].identity[0].principal_id +} + +resource "azurerm_role_assignment" "MachineRoleAssign2" { + count = length(local.machine_roles) + scope = azurerm_resource_group.test2.id + role_definition_name = local.machine_roles[count.index] + principal_id = data.azurerm_arc_machine.server[1].identity[0].principal_id +} + +resource "azurerm_role_assignment" "ServicePrincipalRoleAssign" { + scope = azurerm_resource_group.test2.id + role_definition_name = "Azure Connected Machine Resource Manager" + principal_id = data.azuread_service_principal.hciRp.object_id +} + +resource "azurerm_stack_hci_cluster" "test" { + depends_on = [ + azurerm_key_vault_secret.DefaultARBApplication, + azurerm_key_vault_secret.AzureStackLCMUserCredential, + azurerm_key_vault_secret.LocalAdminCredential, + azurerm_key_vault_secret.WitnessStorageKey, + azurerm_role_assignment.ServicePrincipalRoleAssign, + azurerm_role_assignment.MachineRoleAssign1, + azurerm_role_assignment.MachineRoleAssign2, + ] + name = "hci${var.random_string}-cl" + resource_group_name = azurerm_resource_group.test2.name + location = azurerm_resource_group.test2.location + identity { + type = "SystemAssigned" + } + + // the client_id will be populated after deployment + lifecycle { + ignore_changes = [ + client_id + ] + } +} +`, data.Locations.Primary, data.RandomString, os.Getenv(imageIdEnv), os.Getenv(localAdminUserEnv), os.Getenv(localAdminUserPasswordEnv), os.Getenv(domainAdminUserEnv), os.Getenv(domainAdminUserPasswordEnv), os.Getenv(deploymentUserEnv), os.Getenv(deploymentUserPasswordEnv)) +} diff --git a/internal/services/azurestackhci/stack_hci_storage_path_resource.go b/internal/services/azurestackhci/stack_hci_storage_path_resource.go new file mode 100644 index 0000000000000..79da5c37ef6e8 --- /dev/null +++ b/internal/services/azurestackhci/stack_hci_storage_path_resource.go @@ -0,0 +1,237 @@ +package azurestackhci + +import ( + "context" + "fmt" + "regexp" + "time" + + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-helpers/resourcemanager/location" + "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers" + "github.com/hashicorp/go-azure-sdk/resource-manager/extendedlocation/2021-08-15/customlocations" + "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" +) + +var ( + _ sdk.Resource = StackHCIStoragePathResource{} + _ sdk.ResourceWithUpdate = StackHCIStoragePathResource{} +) + +type StackHCIStoragePathResource struct{} + +func (StackHCIStoragePathResource) IDValidationFunc() pluginsdk.SchemaValidateFunc { + return storagecontainers.ValidateStorageContainerID +} + +func (StackHCIStoragePathResource) ResourceType() string { + return "azurerm_stack_hci_storage_path" +} + +func (StackHCIStoragePathResource) ModelObject() interface{} { + return &StackHCIStoragePathResourceModel{} +} + +type StackHCIStoragePathResourceModel struct { + Name string `tfschema:"name"` + ResourceGroupName string `tfschema:"resource_group_name"` + Location string `tfschema:"location"` + CustomLocationId string `tfschema:"custom_location_id"` + Path string `tfschema:"path"` + Tags map[string]interface{} `tfschema:"tags"` +} + +func (StackHCIStoragePathResource) Arguments() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringMatch( + regexp.MustCompile(`^[a-zA-Z0-9][\-\.\_a-zA-Z0-9]{1,78}[a-zA-Z0-9]$`), + "name must be between 3 and 80 characters and can only contain alphanumberic characters, hyphen, dot and underline", + ), + }, + + "resource_group_name": commonschema.ResourceGroupName(), + + "location": commonschema.Location(), + + "custom_location_id": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: customlocations.ValidateCustomLocationID, + }, + + "path": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "tags": commonschema.Tags(), + } +} + +func (StackHCIStoragePathResource) Attributes() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{} +} + +func (r StackHCIStoragePathResource) Create() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 30 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.AzureStackHCI.StorageContainers + + var config StackHCIStoragePathResourceModel + if err := metadata.Decode(&config); err != nil { + return fmt.Errorf("decoding: %+v", err) + } + + subscriptionId := metadata.Client.Account.SubscriptionId + id := storagecontainers.NewStorageContainerID(subscriptionId, config.ResourceGroupName, config.Name) + + existing, err := client.Get(ctx, id) + if err != nil && !response.WasNotFound(existing.HttpResponse) { + return fmt.Errorf("checking for presence of existing %s: %+v", id, err) + } + if !response.WasNotFound(existing.HttpResponse) { + return metadata.ResourceRequiresImport(r.ResourceType(), id) + } + + payload := storagecontainers.StorageContainers{ + Name: pointer.To(config.Name), + Location: location.Normalize(config.Location), + Tags: tags.Expand(config.Tags), + ExtendedLocation: &storagecontainers.ExtendedLocation{ + Name: pointer.To(config.CustomLocationId), + Type: pointer.To(storagecontainers.ExtendedLocationTypesCustomLocation), + }, + Properties: &storagecontainers.StorageContainerProperties{ + Path: config.Path, + }, + } + + if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + return fmt.Errorf("creating %s: %+v", id, err) + } + + metadata.SetID(id) + + return nil + }, + } +} + +func (r StackHCIStoragePathResource) Read() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 5 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.AzureStackHCI.StorageContainers + + id, err := storagecontainers.ParseStorageContainerID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + resp, err := client.Get(ctx, *id) + if err != nil { + if response.WasNotFound(resp.HttpResponse) { + return metadata.MarkAsGone(id) + } + + return fmt.Errorf("retrieving %s: %+v", id, err) + } + + schema := StackHCIStoragePathResourceModel{ + Name: id.StorageContainerName, + ResourceGroupName: id.ResourceGroupName, + } + + if model := resp.Model; model != nil { + schema.Location = location.Normalize(model.Location) + schema.Tags = tags.Flatten(model.Tags) + + if model.ExtendedLocation != nil && model.ExtendedLocation.Name != nil { + customLocationId, err := customlocations.ParseCustomLocationIDInsensitively(*model.ExtendedLocation.Name) + if err != nil { + return err + } + + schema.CustomLocationId = customLocationId.ID() + } + + if props := model.Properties; props != nil { + schema.Path = props.Path + } + } + + return metadata.Encode(&schema) + }, + } +} + +func (r StackHCIStoragePathResource) Update() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 30 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.AzureStackHCI.StorageContainers + + id, err := storagecontainers.ParseStorageContainerID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + var model StackHCIStoragePathResourceModel + if err := metadata.Decode(&model); err != nil { + return fmt.Errorf("decoding: %+v", err) + } + + resp, err := client.Get(ctx, *id) + if err != nil { + return fmt.Errorf("retrieving %s: %+v", *id, err) + } + + parameters := resp.Model + if parameters == nil { + return fmt.Errorf("retrieving %s: `model` was nil", *id) + } + + if metadata.ResourceData.HasChange("tags") { + parameters.Tags = tags.Expand(model.Tags) + } + + if err := client.CreateOrUpdateThenPoll(ctx, *id, *parameters); err != nil { + return fmt.Errorf("updating %s: %+v", id, err) + } + return nil + }, + } +} + +func (r StackHCIStoragePathResource) Delete() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 30 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.AzureStackHCI.StorageContainers + + id, err := storagecontainers.ParseStorageContainerID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + if err := client.DeleteThenPoll(ctx, *id); err != nil { + return fmt.Errorf("deleting %s: %+v", id, err) + } + + return nil + }, + } +} diff --git a/internal/services/azurestackhci/stack_hci_storage_path_resource_test.go b/internal/services/azurestackhci/stack_hci_storage_path_resource_test.go new file mode 100644 index 0000000000000..73ad65d1563e3 --- /dev/null +++ b/internal/services/azurestackhci/stack_hci_storage_path_resource_test.go @@ -0,0 +1,224 @@ +package azurestackhci_test + +import ( + "context" + "fmt" + "os" + "testing" + + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" + "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" +) + +type StackHCIStoragePathResource struct{} + +func TestAccStackHCIStoragePath_basic(t *testing.T) { + if os.Getenv(customLocationIdEnv) == "" { + t.Skipf("skipping since %q has not been specified", customLocationIdEnv) + } + + data := acceptance.BuildTestData(t, "azurerm_stack_hci_storage_path", "test") + r := StackHCIStoragePathResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + +func TestAccStackHCIStoragePath_complete(t *testing.T) { + if os.Getenv(customLocationIdEnv) == "" { + t.Skipf("skipping since %q has not been specified", customLocationIdEnv) + } + + data := acceptance.BuildTestData(t, "azurerm_stack_hci_storage_path", "test") + r := StackHCIStoragePathResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.complete(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + +func TestAccStackHCIStoragePath_update(t *testing.T) { + if os.Getenv(customLocationIdEnv) == "" { + t.Skipf("skipping since %q has not been specified", customLocationIdEnv) + } + + data := acceptance.BuildTestData(t, "azurerm_stack_hci_storage_path", "test") + r := StackHCIStoragePathResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + { + Config: r.complete(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + { + Config: r.update(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + +func TestAccStackHCIStoragePath_requiresImport(t *testing.T) { + if os.Getenv(customLocationIdEnv) == "" { + t.Skipf("skipping since %q has not been specified", customLocationIdEnv) + } + + data := acceptance.BuildTestData(t, "azurerm_stack_hci_storage_path", "test") + r := StackHCIStoragePathResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.RequiresImportErrorStep(r.requiresImport), + }) +} + +func (r StackHCIStoragePathResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { + clusterClient := client.AzureStackHCI.StorageContainers + id, err := storagecontainers.ParseStorageContainerID(state.ID) + if err != nil { + return nil, err + } + + resp, err := clusterClient.Get(ctx, *id) + if err != nil { + return nil, fmt.Errorf("retrieving %s: %+v", *id, err) + } + + return pointer.To(resp.Model != nil), nil +} + +func (r StackHCIStoragePathResource) basic(data acceptance.TestData) string { + template := r.template(data) + return fmt.Sprintf(` +%s + +provider "azurerm" { + features {} +} + +resource "azurerm_stack_hci_storage_path" "test" { + name = "acctest-sp-${var.random_string}" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + custom_location_id = %q + path = "C:\\ClusterStorage\\UserStorage_2\\sp-${var.random_string}" +} +`, template, os.Getenv(customLocationIdEnv)) +} + +func (r StackHCIStoragePathResource) requiresImport(data acceptance.TestData) string { + config := r.basic(data) + + return fmt.Sprintf(` +%s + +resource "azurerm_stack_hci_storage_path" "import" { + name = azurerm_stack_hci_storage_path.test.name + resource_group_name = azurerm_stack_hci_storage_path.test.resource_group_name + location = azurerm_stack_hci_storage_path.test.location + custom_location_id = azurerm_stack_hci_storage_path.test.custom_location_id + path = azurerm_stack_hci_storage_path.test.path +} +`, config) +} + +func (r StackHCIStoragePathResource) update(data acceptance.TestData) string { + template := r.template(data) + return fmt.Sprintf(` +%s + +provider "azurerm" { + features {} +} + +resource "azurerm_stack_hci_storage_path" "test" { + name = "acctest-sp-${var.random_string}" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + custom_location_id = %q + path = "C:\\ClusterStorage\\UserStorage_2\\sp-${var.random_string}" + tags = { + foo = "bar" + } +} +`, template, os.Getenv(customLocationIdEnv)) +} + +func (r StackHCIStoragePathResource) complete(data acceptance.TestData) string { + template := r.template(data) + return fmt.Sprintf(` +%s + +provider "azurerm" { + features {} +} + +resource "azurerm_stack_hci_storage_path" "test" { + name = "acctest-sp-${var.random_string}" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + custom_location_id = %q + path = "C:\\ClusterStorage\\UserStorage_2\\sp-${var.random_string}" + tags = { + foo = "bar" + env = "test" + } +} +`, template, os.Getenv(customLocationIdEnv)) +} + +func (r StackHCIStoragePathResource) template(data acceptance.TestData) string { + return fmt.Sprintf(` +variable "primary_location" { + default = %q +} +variable "random_string" { + default = %q +} +resource "azurerm_resource_group" "test" { + name = "acctest-hci-sp-${var.random_string}" + location = var.primary_location +} +`, data.Locations.Primary, data.RandomString) +} diff --git a/internal/services/azurestackhci/testdata/ad.ps1 b/internal/services/azurestackhci/testdata/ad.ps1 new file mode 100644 index 0000000000000..6f36392699465 --- /dev/null +++ b/internal/services/azurestackhci/testdata/ad.ps1 @@ -0,0 +1,82 @@ +# Follows https://learn.microsoft.com/en-us/azure-stack/hci/deploy/deployment-prep-active-directory +# The script is from https://github.com/Azure/Edge-infrastructure-quickstart-template/blob/c42d671bd8464071c3b8dfc9d599bef1631b22a2/modules/hci-provisioners/ad.ps1 +param( + $userName, + $password, + $authType, + $adouPath, + $ip, $port, + $domainFqdn, + $ifdeleteadou, + $deploymentUserName, + $deploymentUserPassword +) + +$script:ErrorActionPreference = 'Stop' +$count = 0 + +for ($count = 0; $count -lt 6; $count++) { + try { + $secpasswd = ConvertTo-SecureString $password -AsPlainText -Force + $domainShort = $domainFqdn.Split(".")[0] + $cred = New-Object System.Management.Automation.PSCredential -ArgumentList "$domainShort\$username", $secpasswd + + if ($authType -eq "CredSSP") { + try { + Enable-WSManCredSSP -Role Client -DelegateComputer $ip -Force + } + catch { + echo "Enable-WSManCredSSP failed" + } + } + + $session = New-PSSession -ComputerName $ip -Port $port -Authentication $authType -Credential $cred + if ($ifdeleteadou) { + Invoke-Command -Session $session -ScriptBlock { + $OUPrefixList = @("OU=Computers,", "OU=Users,", "") + foreach ($prefix in $OUPrefixList) { + $ouname = "$prefix$Using:adouPath" + echo "try to get OU: $ouname" + Try { + $ou = Get-ADOrganizationalUnit -Identity $ouname + } + Catch [Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException] { + $ou = $null + } + if ($ou) { + Set-ADOrganizationalUnit -Identity $ouname -ProtectedFromAccidentalDeletion $false + $ou | Remove-ADOrganizationalUnit -Recursive -Confirm:$False + echo "Deleted adou: $ouname" + } + } + } + + } + $deploymentSecPasswd = ConvertTo-SecureString $deploymentUserPassword -AsPlainText -Force + $lcmCred = New-Object System.Management.Automation.PSCredential -ArgumentList $deploymentUserName, $deploymentSecPasswd + Invoke-Command -Session $session -ScriptBlock { + echo "Install Nuget Provider" + Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Confirm:$false + echo "Install AsHciADArtifactsPreCreationTool" + Install-Module AsHciADArtifactsPreCreationTool -Repository PSGallery -Force -Confirm:$false + echo "Add KdsRootKey" + Add-KdsRootKey -EffectiveTime ((Get-Date).addhours(-10)) + echo "New HciAdObjectsPreCreation" + New-HciAdObjectsPreCreation -AzureStackLCMUserCredential $Using:lcmCred -AsHciOUName $Using:adouPath + } + break + } + catch { + echo "Error in retry ${count}:`n$_" + sleep 600 + } + finally { + if ($session) { + Remove-PSSession -Session $session + } + } +} + +if ($count -ge 6) { + throw "Failed to provision AD after 6 retries." +} diff --git a/internal/services/azurestackhci/testdata/connect.ps1 b/internal/services/azurestackhci/testdata/connect.ps1 new file mode 100644 index 0000000000000..69255362b35cf --- /dev/null +++ b/internal/services/azurestackhci/testdata/connect.ps1 @@ -0,0 +1,131 @@ +# follows https://learn.microsoft.com/en-us/azure-stack/hci/deploy/deployment-arc-register-server-permissions?tabs=powershell +# the script is from https://github.com/Azure/Edge-infrastructure-quickstart-template/blob/c42d671bd8464071c3b8dfc9d599bef1631b22a2/modules/hci-provisioners/hci-server/connect.ps1 +param( + $userName, + $password, + $authType, + $ip, $port, + $subscriptionId, $resourceGroupName, $region, $tenant, $servicePrincipalId, $servicePrincipalSecret, $expandC +) + +$script:ErrorActionPreference = 'Stop' +echo "Start to connect Arc server!" +$count = 0 + +if ($authType -eq "CredSSP") { + try { + Enable-WSManCredSSP -Role Client -DelegateComputer $ip -Force + } + catch { + echo "Enable-WSManCredSSP failed" + } +} +for ($count = 0; $count -lt 6; $count++) { + try { + $secpasswd = ConvertTo-SecureString $password -AsPlainText -Force + $cred = New-Object System.Management.Automation.PSCredential -ArgumentList ".\$username", $secpasswd + $session = New-PSSession -ComputerName $ip -Port $port -Authentication $authType -Credential $cred + + Invoke-Command -Session $session -ScriptBlock { + Param ($subscriptionId, $resourceGroupName, $region, $tenant, $servicePrincipalId, $servicePrincipalSecret) + $script:ErrorActionPreference = 'Stop' + + function Install-ModuleIfMissing { + param( + [Parameter(Mandatory = $true)] + [string]$Name, + [string]$Repository = 'PSGallery', + [switch]$Force, + [switch]$AllowClobber + ) + $script:ErrorActionPreference = 'Stop' + $module = Get-Module -Name $Name -ListAvailable + if (!$module) { + Write-Host "Installing module $Name" + Install-Module -Name $Name -Repository $Repository -Force:$Force -AllowClobber:$AllowClobber + } + } + + if ($expandC) { + # Expand C volume as much as possible + $drive_letter = "C" + $size = (Get-PartitionSupportedSize -DriveLetter $drive_letter) + if ($size.SizeMax -gt (Get-Partition -DriveLetter $drive_letter).Size) { + echo "Resizing volume" + Resize-Partition -DriveLetter $drive_letter -Size $size.SizeMax + } + } + + echo "Validate BITS is working" + $job = Start-BitsTransfer -Source https://aka.ms -Destination $env:TEMP -TransferType Download -Asynchronous + $count = 0 + while ($job.JobState -ne "Transferred" -and $count -lt 30) { + if ($job.JobState -eq "TransientError") { + throw "BITS transfer failed" + } + sleep 6 + $count++ + } + if ($count -ge 30) { + throw "BITS transfer failed after 3 minutes. Job state: $job.JobState" + } + + $creds = [System.Management.Automation.PSCredential]::new($servicePrincipalId, (ConvertTo-SecureString $servicePrincipalSecret -AsPlainText -Force)) + + Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Confirm:$false + + Install-ModuleIfMissing -Name Az -Repository PSGallery -Force + + Connect-AzAccount -Subscription $subscriptionId -Tenant $tenant -Credential $creds -ServicePrincipal + echo "login to Azure" + + Install-Module AzSHCI.ARCInstaller -Force -AllowClobber + Install-Module Az.StackHCI -Force -AllowClobber -RequiredVersion 2.2.3 + Install-Module AzStackHci.EnvironmentChecker -Repository PSGallery -Force -AllowClobber + Install-ModuleIfMissing Az.Accounts -Force -AllowClobber + Install-ModuleIfMissing Az.ConnectedMachine -Force -AllowClobber + Install-ModuleIfMissing Az.Resources -Force -AllowClobber + echo "Installed modules" + $id = (Get-AzContext).Tenant.Id + $token = (Get-AzAccessToken).Token + $accountid = (Get-AzContext).Account.Id + Invoke-AzStackHciArcInitialization -SubscriptionID $subscriptionId -ResourceGroup $resourceGroupName -TenantID $id -Region $region -Cloud "AzureCloud" -ArmAccessToken $token -AccountID $accountid + $exitCode = $LASTEXITCODE + $script:ErrorActionPreference = 'Stop' + if ($exitCode -eq 0) { + echo "Arc server connected!" + } + else { + throw "Arc server connection failed" + } + + $ready = $false + while (!$ready) { + Connect-AzAccount -Subscription $subscriptionId -Tenant $tenant -Credential $creds -ServicePrincipal + $extension = Get-AzConnectedMachineExtension -Name "AzureEdgeLifecycleManager" -ResourceGroup $resourceGroupName -MachineName $env:COMPUTERNAME -SubscriptionId $subscriptionId + if ($extension.ProvisioningState -eq "Succeeded") { + $ready = $true + } + else { + echo "Waiting for LCM extension to be ready" + Start-Sleep -Seconds 30 + } + } + + } -ArgumentList $subscriptionId, $resourceGroupName, $region, $tenant, $servicePrincipalId, $servicePrincipalSecret + break + } + catch { + echo "Error in retry ${count}:`n$_" + sleep 600 + } + finally { + if ($session) { + Remove-PSSession -Session $session + } + } +} + +if ($count -ge 6) { + throw "Failed to connect Arc server after 6 retries." +} diff --git a/internal/services/bot/bot_service_azure_bot_resource_test.go b/internal/services/bot/bot_service_azure_bot_resource_test.go index a053934e31701..7189ebb729ec8 100644 --- a/internal/services/bot/bot_service_azure_bot_resource_test.go +++ b/internal/services/bot/bot_service_azure_bot_resource_test.go @@ -47,14 +47,14 @@ func TestAccBotServiceAzureBot_completeUpdate(t *testing.T) { check.That(data.ResourceName).ExistsInAzure(r), ), }, - data.ImportStep(), + data.ImportStep("developer_app_insights_api_key"), { Config: r.update(data), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), ), }, - data.ImportStep(), + data.ImportStep("developer_app_insights_api_key"), }) } diff --git a/internal/services/bot/bot_service_resource_base.go b/internal/services/bot/bot_service_resource_base.go index 68f6263d3aa9e..e808b274a0f8b 100644 --- a/internal/services/bot/bot_service_resource_base.go +++ b/internal/services/bot/bot_service_resource_base.go @@ -72,10 +72,6 @@ func (br botBaseResource) arguments(fields map[string]*pluginsdk.Schema) map[str Optional: true, Sensitive: true, ValidateFunc: validation.StringIsNotEmpty, - DiffSuppressFunc: func(k, old, new string, d *pluginsdk.ResourceData) bool { - // This field for the api key isn't returned at all from Azure - return (new == d.Get(k).(string)) && (old == "") - }, }, "developer_app_insights_application_id": { @@ -357,6 +353,11 @@ func (br botBaseResource) readFunc() sdk.ResourceFunc { metadata.ResourceData.Set("tags", tags.ToTypedObject(resp.Tags)) + // The API doesn't return this property, so we need to set the value from config into state + if apiKey, ok := metadata.ResourceData.GetOk("developer_app_insights_api_key"); ok && apiKey.(string) != "" { + metadata.ResourceData.Set("developer_app_insights_api_key", apiKey.(string)) + } + if props := resp.Properties; props != nil { msAppId := "" if v := props.MsaAppID; v != nil { @@ -382,12 +383,6 @@ func (br botBaseResource) readFunc() sdk.ResourceFunc { } metadata.ResourceData.Set("developer_app_insights_key", key) - apiKey := "" - if v := props.DeveloperAppInsightsAPIKey; v != nil { - apiKey = *v - } - metadata.ResourceData.Set("developer_app_insights_api_key", apiKey) - appInsightsId := "" if v := props.DeveloperAppInsightsApplicationID; v != nil { appInsightsId = *v diff --git a/internal/services/cognitive/cognitive_deployment_resource.go b/internal/services/cognitive/cognitive_deployment_resource.go index 5ec55c12b8860..b7c18eb745112 100644 --- a/internal/services/cognitive/cognitive_deployment_resource.go +++ b/internal/services/cognitive/cognitive_deployment_resource.go @@ -12,7 +12,6 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts" "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -21,12 +20,12 @@ import ( ) type cognitiveDeploymentModel struct { - Name string `tfschema:"name"` - CognitiveAccountId string `tfschema:"cognitive_account_id"` - Model []DeploymentModelModel `tfschema:"model"` - RaiPolicyName string `tfschema:"rai_policy_name"` - ScaleSettings []DeploymentScaleSettingsModel `tfschema:"scale"` - VersionUpgradeOption string `tfschema:"version_upgrade_option"` + Name string `tfschema:"name"` + CognitiveAccountId string `tfschema:"cognitive_account_id"` + Model []DeploymentModelModel `tfschema:"model"` + RaiPolicyName string `tfschema:"rai_policy_name"` + Sku []DeploymentSkuModel `tfschema:"sku"` + VersionUpgradeOption string `tfschema:"version_upgrade_option"` } type DeploymentModelModel struct { @@ -35,12 +34,12 @@ type DeploymentModelModel struct { Version string `tfschema:"version"` } -type DeploymentScaleSettingsModel struct { - ScaleType string `tfschema:"type"` - Tier string `tfschema:"tier"` - Size string `tfschema:"size"` - Family string `tfschema:"family"` - Capacity int64 `tfschema:"capacity"` +type DeploymentSkuModel struct { + Name string `tfschema:"name"` + Tier string `tfschema:"tier"` + Size string `tfschema:"size"` + Family string `tfschema:"family"` + Capacity int64 `tfschema:"capacity"` } type CognitiveDeploymentResource struct{} @@ -60,7 +59,7 @@ func (r CognitiveDeploymentResource) IDValidationFunc() pluginsdk.SchemaValidate } func (r CognitiveDeploymentResource) Arguments() map[string]*pluginsdk.Schema { - arguments := map[string]*pluginsdk.Schema{ + return map[string]*pluginsdk.Schema{ "name": { Type: pluginsdk.TypeString, Required: true, @@ -106,79 +105,24 @@ func (r CognitiveDeploymentResource) Arguments() map[string]*pluginsdk.Schema { }, }, - "rai_policy_name": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "version_upgrade_option": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(deployments.DeploymentModelVersionUpgradeOptionOnceNewDefaultVersionAvailable), - ValidateFunc: validation.StringInSlice([]string{ - string(deployments.DeploymentModelVersionUpgradeOptionOnceCurrentVersionExpired), - string(deployments.DeploymentModelVersionUpgradeOptionOnceNewDefaultVersionAvailable), - string(deployments.DeploymentModelVersionUpgradeOptionNoAutoUpgrade), - }, false), - }, - } - if !features.FourPointOh() { - arguments["scale"] = &pluginsdk.Schema{ + "sku": { Type: pluginsdk.TypeList, Required: true, MaxItems: 1, Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ - "type": { + "name": { Type: pluginsdk.TypeString, Required: true, ForceNew: true, - }, - "tier": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, ValidateFunc: validation.StringInSlice([]string{ - string(deployments.SkuTierFree), - string(deployments.SkuTierBasic), - string(deployments.SkuTierStandard), - string(deployments.SkuTierPremium), - string(deployments.SkuTierEnterprise), + "Standard", + "GlobalBatch", + "GlobalStandard", + "ProvisionedManaged", }, false), }, - "size": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - }, - "family": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - }, - "capacity": { - Type: pluginsdk.TypeInt, - Optional: true, - Default: 1, - ValidateFunc: validation.IntAtLeast(1), - }, - }, - }, - } - } else { - //TODO: 4.0 - add corresponding field in cognitiveDeploymentModel struct - arguments["sku"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeList, - Required: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, + "tier": { Type: pluginsdk.TypeString, Optional: true, @@ -191,16 +135,19 @@ func (r CognitiveDeploymentResource) Arguments() map[string]*pluginsdk.Schema { string(deployments.SkuTierEnterprise), }, false), }, + "size": { Type: pluginsdk.TypeString, Optional: true, ForceNew: true, }, + "family": { Type: pluginsdk.TypeString, Optional: true, ForceNew: true, }, + "capacity": { Type: pluginsdk.TypeInt, Optional: true, @@ -209,9 +156,25 @@ func (r CognitiveDeploymentResource) Arguments() map[string]*pluginsdk.Schema { }, }, }, - } + }, + + "rai_policy_name": { + Type: pluginsdk.TypeString, + Optional: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "version_upgrade_option": { + Type: pluginsdk.TypeString, + Optional: true, + Default: string(deployments.DeploymentModelVersionUpgradeOptionOnceNewDefaultVersionAvailable), + ValidateFunc: validation.StringInSlice([]string{ + string(deployments.DeploymentModelVersionUpgradeOptionOnceCurrentVersionExpired), + string(deployments.DeploymentModelVersionUpgradeOptionOnceNewDefaultVersionAvailable), + string(deployments.DeploymentModelVersionUpgradeOptionNoAutoUpgrade), + }, false), + }, } - return arguments } func (r CognitiveDeploymentResource) Attributes() map[string]*pluginsdk.Schema { @@ -261,7 +224,7 @@ func (r CognitiveDeploymentResource) Create() sdk.ResourceFunc { properties.Properties.VersionUpgradeOption = &option } - properties.Sku = expandDeploymentSkuModel(model.ScaleSettings) + properties.Sku = expandDeploymentSkuModel(model.Sku) if err := client.CreateOrUpdateThenPoll(ctx, id, *properties); err != nil { return fmt.Errorf("creating %s: %+v", id, err) @@ -302,8 +265,8 @@ func (r CognitiveDeploymentResource) Update() sdk.ResourceFunc { properties := resp.Model - if metadata.ResourceData.HasChange("scale.0.capacity") { - properties.Sku.Capacity = pointer.To(model.ScaleSettings[0].Capacity) + if metadata.ResourceData.HasChange("sku.0.capacity") { + properties.Sku.Capacity = pointer.To(model.Sku[0].Capacity) } if metadata.ResourceData.HasChange("rai_policy_name") { @@ -366,10 +329,9 @@ func (r CognitiveDeploymentResource) Read() sdk.ResourceFunc { if v := properties.VersionUpgradeOption; v != nil { state.VersionUpgradeOption = string(*v) } - state.ScaleSettings = flattenDeploymentScaleSettingsModel(properties.ScaleSettings) } - if scale := flattenDeploymentSkuModel(model.Sku); scale != nil { - state.ScaleSettings = scale + if sku := flattenDeploymentSkuModel(model.Sku); sku != nil { + state.Sku = sku } return metadata.Encode(&state) }, @@ -423,13 +385,13 @@ func expandDeploymentModelModel(inputList []DeploymentModelModel) *deployments.D return &output } -func expandDeploymentSkuModel(inputList []DeploymentScaleSettingsModel) *deployments.Sku { +func expandDeploymentSkuModel(inputList []DeploymentSkuModel) *deployments.Sku { if len(inputList) == 0 { return nil } input := inputList[0] s := &deployments.Sku{ - Name: input.ScaleType, + Name: input.Name, } if input.Capacity != 0 { s.Capacity = utils.Int64(input.Capacity) @@ -475,23 +437,12 @@ func flattenDeploymentModelModel(input *deployments.DeploymentModel) []Deploymen return append(outputList, output) } -func flattenDeploymentScaleSettingsModel(input *deployments.DeploymentScaleSettings) []DeploymentScaleSettingsModel { - if input == nil || input.ScaleType == nil { - return nil - } - - output := DeploymentScaleSettingsModel{ - ScaleType: string(*input.ScaleType), - } - return []DeploymentScaleSettingsModel{output} -} - -func flattenDeploymentSkuModel(input *deployments.Sku) []DeploymentScaleSettingsModel { +func flattenDeploymentSkuModel(input *deployments.Sku) []DeploymentSkuModel { if input == nil { return nil } - output := DeploymentScaleSettingsModel{ - ScaleType: input.Name, + output := DeploymentSkuModel{ + Name: input.Name, } if input.Capacity != nil { output.Capacity = *input.Capacity @@ -505,5 +456,5 @@ func flattenDeploymentSkuModel(input *deployments.Sku) []DeploymentScaleSettings if input.Family != nil { output.Family = *input.Family } - return []DeploymentScaleSettingsModel{output} + return []DeploymentSkuModel{output} } diff --git a/internal/services/cognitive/cognitive_deployment_resource_test.go b/internal/services/cognitive/cognitive_deployment_resource_test.go index 86336e92c14e9..589c7d2cae104 100644 --- a/internal/services/cognitive/cognitive_deployment_resource_test.go +++ b/internal/services/cognitive/cognitive_deployment_resource_test.go @@ -85,8 +85,6 @@ func TestAccCognitiveDeployment_update(t *testing.T) { Config: r.complete(data), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("scale.0.capacity").HasValue("1"), - check.That(data.ResourceName).Key("rai_policy_name").HasValue("RAI policy"), ), }, data.ImportStep(), @@ -94,8 +92,6 @@ func TestAccCognitiveDeployment_update(t *testing.T) { Config: r.update(data), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("scale.0.capacity").HasValue("2"), - check.That(data.ResourceName).Key("rai_policy_name").HasValue("Microsoft.Default"), ), }, data.ImportStep(), @@ -103,7 +99,6 @@ func TestAccCognitiveDeployment_update(t *testing.T) { Config: r.updateVersion(data), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("model.0.version").HasValue("1"), ), }, data.ImportStep(), @@ -111,7 +106,6 @@ func TestAccCognitiveDeployment_update(t *testing.T) { Config: r.versionUpgradeOption(data, "OnceNewDefaultVersionAvailable"), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("version_upgrade_option").HasValue("OnceNewDefaultVersionAvailable"), ), }, data.ImportStep(), @@ -119,7 +113,6 @@ func TestAccCognitiveDeployment_update(t *testing.T) { Config: r.versionUpgradeOption(data, "OnceCurrentVersionExpired"), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("version_upgrade_option").HasValue("OnceCurrentVersionExpired"), ), }, data.ImportStep(), @@ -127,7 +120,6 @@ func TestAccCognitiveDeployment_update(t *testing.T) { Config: r.updateVersion(data), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("version_upgrade_option").HasValue("OnceNewDefaultVersionAvailable"), ), }, data.ImportStep(), @@ -183,8 +175,8 @@ resource "azurerm_cognitive_deployment" "test" { format = "OpenAI" name = "text-embedding-ada-002" } - scale { - type = "Standard" + sku { + name = "Standard" } lifecycle { ignore_changes = [model.0.version] @@ -206,8 +198,8 @@ resource "azurerm_cognitive_deployment" "import" { name = "text-embedding-ada-002" version = "2" } - scale { - type = "Standard" + sku { + name = "Standard" } } `, config) @@ -227,8 +219,8 @@ resource "azurerm_cognitive_deployment" "test" { name = "text-embedding-ada-002" version = "2" } - scale { - type = "Standard" + sku { + name = "Standard" } rai_policy_name = "RAI policy" version_upgrade_option = "OnceNewDefaultVersionAvailable" @@ -250,8 +242,8 @@ resource "azurerm_cognitive_deployment" "test" { name = "text-embedding-ada-002" version = "2" } - scale { - type = "Standard" + sku { + name = "Standard" capacity = 2 } } @@ -272,8 +264,8 @@ resource "azurerm_cognitive_deployment" "test" { name = "text-embedding-ada-002" version = "1" } - scale { - type = "Standard" + sku { + name = "Standard" capacity = 2 } } @@ -295,8 +287,8 @@ resource "azurerm_cognitive_deployment" "test" { name = "text-embedding-ada-002" version = "1" } - scale { - type = "Standard" + sku { + name = "Standard" capacity = 2 } } diff --git a/internal/services/compute/client/client.go b/internal/services/compute/client/client.go index 8c3d9b51514fd..173d61f9f0805 100644 --- a/internal/services/compute/client/client.go +++ b/internal/services/compute/client/client.go @@ -37,8 +37,8 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachines" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesetrollingupgrades" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesetvms" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" "github.com/hashicorp/go-azure-sdk/resource-manager/marketplaceordering/2015-06-01/agreements" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) diff --git a/internal/services/compute/helpers.go b/internal/services/compute/helpers.go index 1746569e360d5..2b6ccd17a620b 100644 --- a/internal/services/compute/helpers.go +++ b/internal/services/compute/helpers.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/galleryimageversions" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" "github.com/hashicorp/go-version" ) diff --git a/internal/services/compute/image_resource.go b/internal/services/compute/image_resource.go index 849e1195423e0..dd65c7cac1716 100644 --- a/internal/services/compute/image_resource.go +++ b/internal/services/compute/image_resource.go @@ -198,6 +198,13 @@ func resourceImage() *pluginsdk.Resource { ValidateFunc: validation.NoZeroValues, }, + "disk_encryption_set_id": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validate.DiskEncryptionSetID, + }, + "storage_type": { Type: pluginsdk.TypeString, Description: "The type of storage disk", @@ -392,7 +399,7 @@ func expandImageOSDisk(input []interface{}) *images.ImageOSDisk { if id := config["disk_encryption_set_id"].(string); id != "" { out.DiskEncryptionSet = &images.SubResource{ - Id: utils.String(id), + Id: pointer.To(id), } } @@ -430,6 +437,12 @@ func expandImageDataDisks(disks []interface{}) *[]images.ImageDataDisk { item.ManagedDisk = managedDisk } + if id := config["disk_encryption_set_id"].(string); id != "" { + item.DiskEncryptionSet = &images.SubResource{ + Id: pointer.To(id), + } + } + if features.FourPointOhBeta() { item.StorageAccountType = pointer.To(images.StorageAccountTypes(config["storage_type"].(string))) } @@ -463,7 +476,8 @@ func flattenImageOSDisk(input *images.ImageStorageProfile) []interface{} { } diskEncryptionSetId := "" if set := v.DiskEncryptionSet; set != nil && set.Id != nil { - diskEncryptionSetId = *set.Id + encryptionId, _ := commonids.ParseDiskEncryptionSetIDInsensitively(*set.Id) + diskEncryptionSetId = encryptionId.ID() } properties := map[string]interface{}{ @@ -513,13 +527,19 @@ func flattenImageDataDisks(input *images.ImageStorageProfile) []interface{} { if disk.ManagedDisk != nil && disk.ManagedDisk.Id != nil { managedDiskId = *disk.ManagedDisk.Id } + diskEncryptionSetId := "" + if set := disk.DiskEncryptionSet; set != nil && set.Id != nil { + encryptionId, _ := commonids.ParseDiskEncryptionSetIDInsensitively(*set.Id) + diskEncryptionSetId = encryptionId.ID() + } properties := map[string]interface{}{ - "blob_uri": blobUri, - "caching": caching, - "lun": int(disk.Lun), - "managed_disk_id": managedDiskId, - "size_gb": diskSizeGb, + "blob_uri": blobUri, + "caching": caching, + "lun": int(disk.Lun), + "managed_disk_id": managedDiskId, + "size_gb": diskSizeGb, + "disk_encryption_set_id": diskEncryptionSetId, } if features.FourPointOhBeta() { diff --git a/internal/services/compute/image_resource_test.go b/internal/services/compute/image_resource_test.go index e51f917ca9115..277e0fcfb969b 100644 --- a/internal/services/compute/image_resource_test.go +++ b/internal/services/compute/image_resource_test.go @@ -15,7 +15,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/images" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachines" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/networkinterfaces" "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/publicipaddresses" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" @@ -859,6 +859,24 @@ func (r ImageResource) standaloneImageEncrypt(data acceptance.TestData) string { }` } + dataDisk := ` + data_disk { + blob_uri = "${azurerm_storage_account.test.primary_blob_endpoint}${azurerm_storage_container.test.name}/myosdisk1.vhd" + size_gb = 30 + caching = "None" + disk_encryption_set_id = azurerm_disk_encryption_set.test.id + storage_type = "StandardSSD_LRS" + }` + if !features.FourPointOhBeta() { + dataDisk = ` + data_disk { + blob_uri = "${azurerm_storage_account.test.primary_blob_endpoint}${azurerm_storage_container.test.name}/myosdisk1.vhd" + size_gb = 30 + caching = "None" + disk_encryption_set_id = azurerm_disk_encryption_set.test.id + }` + } + return fmt.Sprintf(` %[1]s @@ -872,7 +890,6 @@ resource "azurerm_key_vault" "test" { sku_name = "standard" purge_protection_enabled = true enabled_for_disk_encryption = true - } resource "azurerm_key_vault_access_policy" "service-principal" { @@ -952,12 +969,14 @@ resource "azurerm_image" "test" { %[4]s + %[5]s + tags = { environment = "Dev" cost-center = "Ops" } } -`, template, data.RandomInteger, data.RandomString, osDisk) +`, template, data.RandomInteger, data.RandomString, osDisk, dataDisk) } func (ImageResource) template(data acceptance.TestData) string { diff --git a/internal/services/compute/linux_virtual_machine_resource_auth_test.go b/internal/services/compute/linux_virtual_machine_resource_auth_test.go index edd792b728202..d0a3558d3f105 100644 --- a/internal/services/compute/linux_virtual_machine_resource_auth_test.go +++ b/internal/services/compute/linux_virtual_machine_resource_auth_test.go @@ -56,6 +56,21 @@ func TestAccLinuxVirtualMachine_authSSH(t *testing.T) { }) } +func TestAccLinuxVirtualMachine_authEd25519SSH(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_linux_virtual_machine", "test") + r := LinuxVirtualMachineResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.authEd25519SSH(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + func TestAccLinuxVirtualMachine_authSSHMultipleKeys(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_linux_virtual_machine", "test") r := LinuxVirtualMachineResource{} @@ -194,6 +209,40 @@ resource "azurerm_linux_virtual_machine" "test" { `, r.template(data), data.RandomInteger) } +func (r LinuxVirtualMachineResource) authEd25519SSH(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +resource "azurerm_linux_virtual_machine" "test" { + name = "acctestVM-%d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + size = "Standard_F2" + admin_username = "adminuser" + network_interface_ids = [ + azurerm_network_interface.test.id, + ] + + admin_ssh_key { + username = "adminuser" + public_key = local.ed25519_public_key + } + + os_disk { + caching = "ReadWrite" + storage_account_type = "Standard_LRS" + } + + source_image_reference { + publisher = "Canonical" + offer = "0001-com-ubuntu-server-jammy" + sku = "22_04-lts" + version = "latest" + } +} +`, r.template(data), data.RandomInteger) +} + func (r LinuxVirtualMachineResource) authSSHMultiple(data acceptance.TestData) string { return fmt.Sprintf(` %s diff --git a/internal/services/compute/linux_virtual_machine_resource_test.go b/internal/services/compute/linux_virtual_machine_resource_test.go index b1f5fd4e27253..02667a9f9e99f 100644 --- a/internal/services/compute/linux_virtual_machine_resource_test.go +++ b/internal/services/compute/linux_virtual_machine_resource_test.go @@ -34,8 +34,9 @@ func (LinuxVirtualMachineResource) templateBasePublicKey() string { return ` # note: whilst these aren't used in all tests, it saves us redefining these everywhere locals { - first_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+wWK73dCr+jgQOAxNsHAnNNNMEMWOHYEccp6wJm2gotpr9katuF/ZAdou5AaW1C61slRkHRkpRRX9FA9CYBiitZgvCCz+3nWNN7l/Up54Zps/pHWGZLHNJZRYyAB6j5yVLMVHIHriY49d/GZTZVNB8GoJv9Gakwc/fuEZYYl4YDFiGMBP///TzlI4jhiJzjKnEvqPFki5p2ZRJqcbCiF4pJrxUQR/RXqVFQdbRLZgYfJ8xGB878RENq3yQ39d8dVOkq4edbkzwcUmwwwkYVPIoDGsYLaRHnG+To7FvMeyO7xDVQkMKzopTQV8AuKpyvpqu0a9pWOMaiCyDytO7GGN you@me.com" - second_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0/NDMj2wG6bSa6jbn6E3LYlUsYiWMp1CQ2sGAijPALW6OrSu30lz7nKpoh8Qdw7/A4nAJgweI5Oiiw5/BOaGENM70Go+VM8LQMSxJ4S7/8MIJEZQp5HcJZ7XDTcEwruknrd8mllEfGyFzPvJOx6QAQocFhXBW6+AlhM3gn/dvV5vdrO8ihjET2GoDUqXPYC57ZuY+/Fz6W3KV8V97BvNUhpY5yQrP5VpnyvvXNFQtzDfClTvZFPuoHQi3/KYPi6O0FSD74vo8JOBZZY09boInPejkm9fvHQqfh0bnN7B6XJoUwC1Qprrx+XIy7ust5AEn5XL7d4lOvcR14MxDDKEp you@me.com" + first_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+wWK73dCr+jgQOAxNsHAnNNNMEMWOHYEccp6wJm2gotpr9katuF/ZAdou5AaW1C61slRkHRkpRRX9FA9CYBiitZgvCCz+3nWNN7l/Up54Zps/pHWGZLHNJZRYyAB6j5yVLMVHIHriY49d/GZTZVNB8GoJv9Gakwc/fuEZYYl4YDFiGMBP///TzlI4jhiJzjKnEvqPFki5p2ZRJqcbCiF4pJrxUQR/RXqVFQdbRLZgYfJ8xGB878RENq3yQ39d8dVOkq4edbkzwcUmwwwkYVPIoDGsYLaRHnG+To7FvMeyO7xDVQkMKzopTQV8AuKpyvpqu0a9pWOMaiCyDytO7GGN you@me.com" + second_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0/NDMj2wG6bSa6jbn6E3LYlUsYiWMp1CQ2sGAijPALW6OrSu30lz7nKpoh8Qdw7/A4nAJgweI5Oiiw5/BOaGENM70Go+VM8LQMSxJ4S7/8MIJEZQp5HcJZ7XDTcEwruknrd8mllEfGyFzPvJOx6QAQocFhXBW6+AlhM3gn/dvV5vdrO8ihjET2GoDUqXPYC57ZuY+/Fz6W3KV8V97BvNUhpY5yQrP5VpnyvvXNFQtzDfClTvZFPuoHQi3/KYPi6O0FSD74vo8JOBZZY09boInPejkm9fvHQqfh0bnN7B6XJoUwC1Qprrx+XIy7ust5AEn5XL7d4lOvcR14MxDDKEp you@me.com" + ed25519_public_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDqzSi9IHoYnbE3YQ+B2fQEVT8iGFemyPovpEtPziIVB you@me.com" } ` } diff --git a/internal/services/compute/linux_virtual_machine_scale_set_resource.go b/internal/services/compute/linux_virtual_machine_scale_set_resource.go index 52f6c35f731c6..9a66e6acd2e51 100644 --- a/internal/services/compute/linux_virtual_machine_scale_set_resource.go +++ b/internal/services/compute/linux_virtual_machine_scale_set_resource.go @@ -4,6 +4,7 @@ package compute import ( + "context" "fmt" "log" "time" @@ -19,7 +20,7 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/capacityreservationgroups" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/images" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/proximityplacementgroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" @@ -58,6 +59,30 @@ func resourceLinuxVirtualMachineScaleSet() *pluginsdk.Resource { // https://github.com/Azure/azure-rest-api-specs/pull/7246 Schema: resourceLinuxVirtualMachineScaleSetSchema(), + + CustomizeDiff: pluginsdk.CustomDiffWithAll( + // Removing existing zones is currently not supported for Virtual Machine Scale Sets + pluginsdk.ForceNewIfChange("zones", func(ctx context.Context, old, new, meta interface{}) bool { + oldZones := zones.ExpandUntyped(old.(*schema.Set).List()) + newZones := zones.ExpandUntyped(new.(*schema.Set).List()) + + for _, ov := range oldZones { + found := false + for _, nv := range newZones { + if ov == nv { + found = true + break + } + } + + if !found { + return true + } + } + + return false + }), + ), } } @@ -518,6 +543,10 @@ func resourceLinuxVirtualMachineScaleSetUpdate(d *pluginsdk.ResourceData, meta i } } + if d.HasChange("zones") { + update.Zones = pointer.To(zones.ExpandUntyped(d.Get("zones").(*schema.Set).List())) + } + if d.HasChange("automatic_os_upgrade_policy") || d.HasChange("rolling_upgrade_policy") { upgradePolicy := virtualmachinescalesets.UpgradePolicy{} if existing.Model.Properties.UpgradePolicy == nil { @@ -1441,7 +1470,7 @@ func resourceLinuxVirtualMachineScaleSetSchema() map[string]*pluginsdk.Schema { "termination_notification": VirtualMachineScaleSetTerminationNotificationSchema(), - "zones": commonschema.ZonesMultipleOptionalForceNew(), + "zones": commonschema.ZonesMultipleOptional(), // Computed "unique_id": { diff --git a/internal/services/compute/linux_virtual_machine_scale_set_resource_auth_test.go b/internal/services/compute/linux_virtual_machine_scale_set_resource_auth_test.go index 134e5eb9da902..a4e70ebc3a2f8 100644 --- a/internal/services/compute/linux_virtual_machine_scale_set_resource_auth_test.go +++ b/internal/services/compute/linux_virtual_machine_scale_set_resource_auth_test.go @@ -93,6 +93,35 @@ func TestAccLinuxVirtualMachineScaleSet_authUpdatingSSHKeys(t *testing.T) { }) } +func TestAccLinuxVirtualMachineScaleSet_authEd25519SSHKeys(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_linux_virtual_machine_scale_set", "test") + r := LinuxVirtualMachineScaleSetResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.authEd25519SSHKey(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + { + Config: r.authSSHKey(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + { + Config: r.authEd25519SSHKey(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + func TestAccLinuxVirtualMachineScaleSet_authDisablePasswordAuthUpdate(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_linux_virtual_machine_scale_set", "test") r := LinuxVirtualMachineScaleSetResource{} @@ -209,6 +238,49 @@ resource "azurerm_linux_virtual_machine_scale_set" "test" { `, r.template(data), data.RandomInteger) } +func (r LinuxVirtualMachineScaleSetResource) authEd25519SSHKey(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +resource "azurerm_linux_virtual_machine_scale_set" "test" { + name = "acctestvmss-%d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + sku = "Standard_F2" + instances = 1 + admin_username = "adminuser" + + admin_ssh_key { + username = "adminuser" + public_key = local.ed25519_public_key + } + + source_image_reference { + publisher = "Canonical" + offer = "0001-com-ubuntu-server-jammy" + sku = "22_04-lts" + version = "latest" + } + + os_disk { + storage_account_type = "Standard_LRS" + caching = "ReadWrite" + } + + network_interface { + name = "example" + primary = true + + ip_configuration { + name = "internal" + primary = true + subnet_id = azurerm_subnet.test.id + } + } +} +`, r.template(data), data.RandomInteger) +} + func (r LinuxVirtualMachineScaleSetResource) authSSHKeyUpdated(data acceptance.TestData) string { return fmt.Sprintf(` %s diff --git a/internal/services/compute/linux_virtual_machine_scale_set_resource_other_test.go b/internal/services/compute/linux_virtual_machine_scale_set_resource_other_test.go index 27cff331a5306..8f0d9b12c484b 100644 --- a/internal/services/compute/linux_virtual_machine_scale_set_resource_other_test.go +++ b/internal/services/compute/linux_virtual_machine_scale_set_resource_other_test.go @@ -11,7 +11,7 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" diff --git a/internal/services/compute/linux_virtual_machine_scale_set_resource_scaling_test.go b/internal/services/compute/linux_virtual_machine_scale_set_resource_scaling_test.go index 741a6f000a14f..bf804433f4411 100644 --- a/internal/services/compute/linux_virtual_machine_scale_set_resource_scaling_test.go +++ b/internal/services/compute/linux_virtual_machine_scale_set_resource_scaling_test.go @@ -250,6 +250,28 @@ func TestAccLinuxVirtualMachineScaleSet_scalingZonesMultiple(t *testing.T) { }) } +func TestAccLinuxVirtualMachineScaleSet_scalingZonesUpdate(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_linux_virtual_machine_scale_set", "test") + r := LinuxVirtualMachineScaleSetResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.scalingZonesSingle(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep("admin_password"), + { + Config: r.scalingZonesMultiple(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep("admin_password"), + }) +} + func TestAccLinuxVirtualMachineScaleSet_scalingZonesBalance(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_linux_virtual_machine_scale_set", "test") r := LinuxVirtualMachineScaleSetResource{} diff --git a/internal/services/compute/linux_virtual_machine_scale_set_resource_test.go b/internal/services/compute/linux_virtual_machine_scale_set_resource_test.go index 75e74b95015f0..8860ffc8d1022 100644 --- a/internal/services/compute/linux_virtual_machine_scale_set_resource_test.go +++ b/internal/services/compute/linux_virtual_machine_scale_set_resource_test.go @@ -8,7 +8,7 @@ import ( "fmt" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -34,8 +34,9 @@ func (LinuxVirtualMachineScaleSetResource) templatePublicKey() string { return ` # note: whilst these aren't used in all tests, it saves us redefining these everywhere locals { - first_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+wWK73dCr+jgQOAxNsHAnNNNMEMWOHYEccp6wJm2gotpr9katuF/ZAdou5AaW1C61slRkHRkpRRX9FA9CYBiitZgvCCz+3nWNN7l/Up54Zps/pHWGZLHNJZRYyAB6j5yVLMVHIHriY49d/GZTZVNB8GoJv9Gakwc/fuEZYYl4YDFiGMBP///TzlI4jhiJzjKnEvqPFki5p2ZRJqcbCiF4pJrxUQR/RXqVFQdbRLZgYfJ8xGB878RENq3yQ39d8dVOkq4edbkzwcUmwwwkYVPIoDGsYLaRHnG+To7FvMeyO7xDVQkMKzopTQV8AuKpyvpqu0a9pWOMaiCyDytO7GGN you@me.com" - second_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0/NDMj2wG6bSa6jbn6E3LYlUsYiWMp1CQ2sGAijPALW6OrSu30lz7nKpoh8Qdw7/A4nAJgweI5Oiiw5/BOaGENM70Go+VM8LQMSxJ4S7/8MIJEZQp5HcJZ7XDTcEwruknrd8mllEfGyFzPvJOx6QAQocFhXBW6+AlhM3gn/dvV5vdrO8ihjET2GoDUqXPYC57ZuY+/Fz6W3KV8V97BvNUhpY5yQrP5VpnyvvXNFQtzDfClTvZFPuoHQi3/KYPi6O0FSD74vo8JOBZZY09boInPejkm9fvHQqfh0bnN7B6XJoUwC1Qprrx+XIy7ust5AEn5XL7d4lOvcR14MxDDKEp you@me.com" + first_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+wWK73dCr+jgQOAxNsHAnNNNMEMWOHYEccp6wJm2gotpr9katuF/ZAdou5AaW1C61slRkHRkpRRX9FA9CYBiitZgvCCz+3nWNN7l/Up54Zps/pHWGZLHNJZRYyAB6j5yVLMVHIHriY49d/GZTZVNB8GoJv9Gakwc/fuEZYYl4YDFiGMBP///TzlI4jhiJzjKnEvqPFki5p2ZRJqcbCiF4pJrxUQR/RXqVFQdbRLZgYfJ8xGB878RENq3yQ39d8dVOkq4edbkzwcUmwwwkYVPIoDGsYLaRHnG+To7FvMeyO7xDVQkMKzopTQV8AuKpyvpqu0a9pWOMaiCyDytO7GGN you@me.com" + second_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0/NDMj2wG6bSa6jbn6E3LYlUsYiWMp1CQ2sGAijPALW6OrSu30lz7nKpoh8Qdw7/A4nAJgweI5Oiiw5/BOaGENM70Go+VM8LQMSxJ4S7/8MIJEZQp5HcJZ7XDTcEwruknrd8mllEfGyFzPvJOx6QAQocFhXBW6+AlhM3gn/dvV5vdrO8ihjET2GoDUqXPYC57ZuY+/Fz6W3KV8V97BvNUhpY5yQrP5VpnyvvXNFQtzDfClTvZFPuoHQi3/KYPi6O0FSD74vo8JOBZZY09boInPejkm9fvHQqfh0bnN7B6XJoUwC1Qprrx+XIy7ust5AEn5XL7d4lOvcR14MxDDKEp you@me.com" + ed25519_public_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDqzSi9IHoYnbE3YQ+B2fQEVT8iGFemyPovpEtPziIVB you@me.com" } ` } diff --git a/internal/services/compute/orchestrated_virtual_machine_scale_set.go b/internal/services/compute/orchestrated_virtual_machine_scale_set.go index 7b9a396aeb5bd..9bc56cda5a78d 100644 --- a/internal/services/compute/orchestrated_virtual_machine_scale_set.go +++ b/internal/services/compute/orchestrated_virtual_machine_scale_set.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/applicationsecuritygroups" "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/networksecuritygroups" "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/publicipprefixes" diff --git a/internal/services/compute/orchestrated_virtual_machine_scale_set_data_source.go b/internal/services/compute/orchestrated_virtual_machine_scale_set_data_source.go index 488d55bc20d35..da69a19e9d6cd 100644 --- a/internal/services/compute/orchestrated_virtual_machine_scale_set_data_source.go +++ b/internal/services/compute/orchestrated_virtual_machine_scale_set_data_source.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" computeValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go b/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go index e34f534403aba..eb25fc96fa5d3 100644 --- a/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go +++ b/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go @@ -4,6 +4,7 @@ package compute import ( + "context" "fmt" "log" "strconv" @@ -21,7 +22,7 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/capacityreservationgroups" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/images" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/proximityplacementgroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" @@ -250,7 +251,7 @@ func resourceOrchestratedVirtualMachineScaleSet() *pluginsdk.Resource { "termination_notification": OrchestratedVirtualMachineScaleSetTerminationNotificationSchema(), - "zones": commonschema.ZonesMultipleOptionalForceNew(), + "zones": commonschema.ZonesMultipleOptional(), "tags": commonschema.Tags(), @@ -269,6 +270,30 @@ func resourceOrchestratedVirtualMachineScaleSet() *pluginsdk.Resource { "priority_mix": OrchestratedVirtualMachineScaleSetPriorityMixPolicySchema(), }, + + CustomizeDiff: pluginsdk.CustomDiffWithAll( + // Removing existing zones is currently not supported for Virtual Machine Scale Sets + pluginsdk.ForceNewIfChange("zones", func(ctx context.Context, old, new, meta interface{}) bool { + oldZones := zones.ExpandUntyped(old.(*schema.Set).List()) + newZones := zones.ExpandUntyped(new.(*schema.Set).List()) + + for _, ov := range oldZones { + found := false + for _, nv := range newZones { + if ov == nv { + found = true + break + } + } + + if !found { + return true + } + } + + return false + }), + ), } } @@ -1072,6 +1097,10 @@ func resourceOrchestratedVirtualMachineScaleSetUpdate(d *pluginsdk.ResourceData, } } + if d.HasChange("zones") { + update.Zones = pointer.To(zones.ExpandUntyped(d.Get("zones").(*schema.Set).List())) + } + // Only two fields that can change in legacy mode if d.HasChange("proximity_placement_group_id") { if v, ok := d.GetOk("proximity_placement_group_id"); ok { diff --git a/internal/services/compute/orchestrated_virtual_machine_scale_set_resource_network_test.go b/internal/services/compute/orchestrated_virtual_machine_scale_set_resource_network_test.go index 4c391897f383a..f85a072d98966 100644 --- a/internal/services/compute/orchestrated_virtual_machine_scale_set_resource_network_test.go +++ b/internal/services/compute/orchestrated_virtual_machine_scale_set_resource_network_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/compute/orchestrated_virtual_machine_scale_set_resource_other_test.go b/internal/services/compute/orchestrated_virtual_machine_scale_set_resource_other_test.go index e813bcefe42bd..3e2bf4be613d6 100644 --- a/internal/services/compute/orchestrated_virtual_machine_scale_set_resource_other_test.go +++ b/internal/services/compute/orchestrated_virtual_machine_scale_set_resource_other_test.go @@ -28,6 +28,26 @@ func TestAccOrchestratedVirtualMachineScaleSet_priority(t *testing.T) { }) } +func TestAccOrchestratedVirtualMachineScaleSet_zoneUpdate(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_orchestrated_virtual_machine_scale_set", "test") + r := OrchestratedVirtualMachineScaleSetResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.singleZone(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + { + Config: r.multipleZone(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + }) +} + func TestAccOrchestratedVirtualMachineScaleSet_NonStandardCasing(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_orchestrated_virtual_machine_scale_set", "test") r := OrchestratedVirtualMachineScaleSetResource{} @@ -441,6 +461,60 @@ resource "azurerm_orchestrated_virtual_machine_scale_set" "test" { `, data.RandomInteger, data.Locations.Primary, r.natgateway_template(data)) } +func (OrchestratedVirtualMachineScaleSetResource) singleZone(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-OVMSS-%[1]d" + location = "%[2]s" +} + +resource "azurerm_orchestrated_virtual_machine_scale_set" "test" { + name = "acctestOVMSS-%[1]d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + + platform_fault_domain_count = 1 + + zones = ["1"] + + tags = { + ENV = "Test" + } +} +`, data.RandomInteger, data.Locations.Primary) +} + +func (OrchestratedVirtualMachineScaleSetResource) multipleZone(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-OVMSS-%[1]d" + location = "%[2]s" +} + +resource "azurerm_orchestrated_virtual_machine_scale_set" "test" { + name = "acctestOVMSS-%[1]d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + + platform_fault_domain_count = 1 + + zones = ["1", "2"] + + tags = { + ENV = "Test" + } +} +`, data.RandomInteger, data.Locations.Primary) +} + func (OrchestratedVirtualMachineScaleSetResource) windowsHotpatchingEnabled(data acceptance.TestData) string { r := OrchestratedVirtualMachineScaleSetResource{} return fmt.Sprintf(` diff --git a/internal/services/compute/orchestrated_virtual_machine_scale_set_resource_test.go b/internal/services/compute/orchestrated_virtual_machine_scale_set_resource_test.go index 98afcab582135..517772b020012 100644 --- a/internal/services/compute/orchestrated_virtual_machine_scale_set_resource_test.go +++ b/internal/services/compute/orchestrated_virtual_machine_scale_set_resource_test.go @@ -10,7 +10,7 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -140,6 +140,35 @@ func TestAccOrchestratedVirtualMachineScaleSet_verify_key_data_changed(t *testin }) } +func TestAccOrchestratedVirtualMachineScaleSet_linux_ed25119_ssh_key(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_orchestrated_virtual_machine_scale_set", "test") + r := OrchestratedVirtualMachineScaleSetResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.linuxEd25119SshKey(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep("os_profile.0.linux_configuration.0.admin_password", "os_profile.0.custom_data"), + { + Config: r.linux(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep("os_profile.0.linux_configuration.0.admin_password", "os_profile.0.custom_data"), + { + Config: r.linuxEd25119SshKey(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep("os_profile.0.linux_configuration.0.admin_password", "os_profile.0.custom_data"), + }) +} + func TestAccOrchestratedVirtualMachineScaleSet_basicApplicationSecurity(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_orchestrated_virtual_machine_scale_set", "test") r := OrchestratedVirtualMachineScaleSetResource{} @@ -1773,6 +1802,109 @@ resource "azurerm_orchestrated_virtual_machine_scale_set" "test" { `, data.RandomInteger, data.Locations.Primary, r.natgateway_template(data)) } +func (OrchestratedVirtualMachineScaleSetResource) linuxEd25119SshKey(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-OVMSS-%[1]d" + location = "%[2]s" +} + +resource "azurerm_virtual_network" "test" { + name = "acctestvn-%[1]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + address_space = ["10.0.0.0/8"] +} + +resource "azurerm_subnet" "test" { + name = "acctestsn-%[1]d" + resource_group_name = azurerm_resource_group.test.name + virtual_network_name = azurerm_virtual_network.test.name + address_prefixes = ["10.0.1.0/24"] +} + +resource "azurerm_public_ip" "test" { + name = "acctestpip-%[1]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + allocation_method = "Static" + sku = "Standard" +} + +resource "azurerm_lb" "test" { + name = "acctestlb-%[1]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + + sku = "Standard" + + frontend_ip_configuration { + name = "ip-address" + public_ip_address_id = azurerm_public_ip.test.id + } +} + +resource "azurerm_lb_backend_address_pool" "test" { + name = "acctestbap-%[1]d" + loadbalancer_id = azurerm_lb.test.id +} + +resource "azurerm_orchestrated_virtual_machine_scale_set" "test" { + name = "acctestOVMSS-%[1]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + + sku_name = "Standard_F2" + instances = 1 + + platform_fault_domain_count = 2 + + os_profile { + custom_data = "Y3VzdG9tIGRhdGEh" + + linux_configuration { + computer_name_prefix = "prefix" + admin_username = "ubuntu" + + admin_ssh_key { + username = "ubuntu" + public_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDqzSi9IHoYnbE3YQ+B2fQEVT8iGFemyPovpEtPziIVB hello@world.com" + } + } + } + + network_interface { + name = "TestNetworkProfile" + primary = true + + ip_configuration { + name = "TestIPConfiguration" + primary = true + subnet_id = azurerm_subnet.test.id + + load_balancer_backend_address_pool_ids = [azurerm_lb_backend_address_pool.test.id] + } + } + + os_disk { + storage_account_type = "Standard_LRS" + caching = "ReadWrite" + } + + source_image_reference { + publisher = "Canonical" + offer = "0001-com-ubuntu-server-jammy" + sku = "22_04-lts" + version = "latest" + } +} +`, data.RandomInteger, data.Locations.Primary) +} + func (OrchestratedVirtualMachineScaleSetResource) linuxKeyDataUpdated(data acceptance.TestData) string { return fmt.Sprintf(` provider "azurerm" { diff --git a/internal/services/compute/protected_settings_from_key_vault.go b/internal/services/compute/protected_settings_from_key_vault.go index d46cbef9758b6..463657aff841c 100644 --- a/internal/services/compute/protected_settings_from_key_vault.go +++ b/internal/services/compute/protected_settings_from_key_vault.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachineextensions" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" keyVaultValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/keyvault/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" ) diff --git a/internal/services/compute/shared_image_data_source.go b/internal/services/compute/shared_image_data_source.go index 6816ce7378e86..bfefcf48ba101 100644 --- a/internal/services/compute/shared_image_data_source.go +++ b/internal/services/compute/shared_image_data_source.go @@ -5,6 +5,7 @@ package compute import ( "fmt" + "strings" "time" "github.com/hashicorp/go-azure-helpers/lang/pointer" @@ -126,6 +127,36 @@ func dataSourceSharedImage() *pluginsdk.Resource { Computed: true, }, + "trusted_launch_supported": { + Type: pluginsdk.TypeBool, + Computed: true, + }, + + "trusted_launch_enabled": { + Type: pluginsdk.TypeBool, + Computed: true, + }, + + "confidential_vm_supported": { + Type: pluginsdk.TypeBool, + Computed: true, + }, + + "confidential_vm_enabled": { + Type: pluginsdk.TypeBool, + Computed: true, + }, + + "accelerated_network_support_enabled": { + Type: pluginsdk.TypeBool, + Computed: true, + }, + + "hibernation_enabled": { + Type: pluginsdk.TypeBool, + Computed: true, + }, + "tags": commonschema.TagsDataSource(), }, } @@ -174,6 +205,42 @@ func dataSourceSharedImageRead(d *pluginsdk.ResourceData, meta interface{}) erro if err := d.Set("purchase_plan", flattenGalleryImageDataSourcePurchasePlan(props.PurchasePlan)); err != nil { return fmt.Errorf("setting `purchase_plan`: %+v", err) } + + trustedLaunchSupported := false + trustedLaunchEnabled := false + cvmEnabled := false + cvmSupported := false + acceleratedNetworkSupportEnabled := false + hibernationEnabled := false + if model.Properties.Features != nil { + for _, feature := range *model.Properties.Features { + if feature.Name == nil || feature.Value == nil { + continue + } + + if strings.EqualFold(*feature.Name, "SecurityType") { + trustedLaunchSupported = strings.EqualFold(*feature.Value, "TrustedLaunchSupported") + trustedLaunchEnabled = strings.EqualFold(*feature.Value, "TrustedLaunch") + cvmSupported = strings.EqualFold(*feature.Value, "ConfidentialVmSupported") + cvmEnabled = strings.EqualFold(*feature.Value, "ConfidentialVm") + } + + if strings.EqualFold(*feature.Name, "IsAcceleratedNetworkSupported") { + acceleratedNetworkSupportEnabled = strings.EqualFold(*feature.Value, "true") + } + + if strings.EqualFold(*feature.Name, "IsHibernateSupported") { + hibernationEnabled = strings.EqualFold(*feature.Value, "true") + } + } + } + + d.Set("confidential_vm_supported", cvmSupported) + d.Set("confidential_vm_enabled", cvmEnabled) + d.Set("trusted_launch_supported", trustedLaunchSupported) + d.Set("trusted_launch_enabled", trustedLaunchEnabled) + d.Set("accelerated_network_support_enabled", acceleratedNetworkSupportEnabled) + d.Set("hibernation_enabled", hibernationEnabled) } return tags.FlattenAndSet(d, model.Tags) diff --git a/internal/services/compute/shared_image_data_source_test.go b/internal/services/compute/shared_image_data_source_test.go index 58e3018977dec..7b02813f355d1 100644 --- a/internal/services/compute/shared_image_data_source_test.go +++ b/internal/services/compute/shared_image_data_source_test.go @@ -21,6 +21,7 @@ func TestAccDataSourceSharedImage_basic(t *testing.T) { Config: r.basic(data, ""), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).Key("tags.%").HasValue("0"), + check.That(data.ResourceName).Key("hibernation_enabled").HasValue("false"), ), }, }) @@ -57,6 +58,90 @@ func TestAccDataSourceSharedImage_complete(t *testing.T) { }) } +func TestAccDataSourceSharedImage_hibernationEnabled(t *testing.T) { + data := acceptance.BuildTestData(t, "data.azurerm_shared_image", "test") + r := SharedImageDataSource{} + data.DataSourceTest(t, []acceptance.TestStep{ + { + Config: r.withHibernationEnabled(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).Key("tags.%").HasValue("0"), + check.That(data.ResourceName).Key("hibernation_enabled").HasValue("true"), + ), + }, + }) +} + +func TestAccDataSourceSharedImage_acceleratedNetworkSupportEnabled(t *testing.T) { + data := acceptance.BuildTestData(t, "data.azurerm_shared_image", "test") + r := SharedImageDataSource{} + data.DataSourceTest(t, []acceptance.TestStep{ + { + Config: r.withAcceleratedNetworkSupportEnabled(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).Key("tags.%").HasValue("0"), + check.That(data.ResourceName).Key("accelerated_network_support_enabled").HasValue("true"), + ), + }, + }) +} + +func TestAccDataSourceSharedImage_trustedLaunchEnabled(t *testing.T) { + data := acceptance.BuildTestData(t, "data.azurerm_shared_image", "test") + r := SharedImageDataSource{} + data.DataSourceTest(t, []acceptance.TestStep{ + { + Config: r.withTrustedLaunchEnabled(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).Key("tags.%").HasValue("0"), + check.That(data.ResourceName).Key("trusted_launch_enabled").HasValue("true"), + ), + }, + }) +} + +func TestAccDataSourceSharedImage_trustedLaunchSupported(t *testing.T) { + data := acceptance.BuildTestData(t, "data.azurerm_shared_image", "test") + r := SharedImageDataSource{} + data.DataSourceTest(t, []acceptance.TestStep{ + { + Config: r.withTrustedLaunchSupported(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).Key("tags.%").HasValue("0"), + check.That(data.ResourceName).Key("trusted_launch_supported").HasValue("true"), + ), + }, + }) +} + +func TestAccDataSourceSharedImage_confidentialVMEnabled(t *testing.T) { + data := acceptance.BuildTestData(t, "data.azurerm_shared_image", "test") + r := SharedImageDataSource{} + data.DataSourceTest(t, []acceptance.TestStep{ + { + Config: r.withConfidentialVM(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).Key("tags.%").HasValue("0"), + check.That(data.ResourceName).Key("confidential_vm_enabled").HasValue("true"), + ), + }, + }) +} + +func TestAccDataSourceSharedImage_confidentialVMSupported(t *testing.T) { + data := acceptance.BuildTestData(t, "data.azurerm_shared_image", "test") + r := SharedImageDataSource{} + data.DataSourceTest(t, []acceptance.TestStep{ + { + Config: r.withConfidentialVMSupported(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).Key("tags.%").HasValue("0"), + check.That(data.ResourceName).Key("confidential_vm_supported").HasValue("true"), + ), + }, + }) +} + func (SharedImageDataSource) basic(data acceptance.TestData, hyperVGen string) string { return fmt.Sprintf(` %s @@ -80,3 +165,75 @@ data "azurerm_shared_image" "test" { } `, SharedImageResource{}.completeWithHyperVGen(data, hyperVGen)) } + +func (SharedImageDataSource) withHibernationEnabled(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +data "azurerm_shared_image" "test" { + name = azurerm_shared_image.test.name + gallery_name = azurerm_shared_image.test.gallery_name + resource_group_name = azurerm_shared_image.test.resource_group_name +} +`, SharedImageResource{}.withHibernationEnabled(data)) +} + +func (SharedImageDataSource) withAcceleratedNetworkSupportEnabled(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +data "azurerm_shared_image" "test" { + name = azurerm_shared_image.test.name + gallery_name = azurerm_shared_image.test.gallery_name + resource_group_name = azurerm_shared_image.test.resource_group_name +} +`, SharedImageResource{}.withAcceleratedNetworkSupportEnabled(data)) +} + +func (SharedImageDataSource) withTrustedLaunchEnabled(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +data "azurerm_shared_image" "test" { + name = azurerm_shared_image.test.name + gallery_name = azurerm_shared_image.test.gallery_name + resource_group_name = azurerm_shared_image.test.resource_group_name +} +`, SharedImageResource{}.withTrustedLaunchEnabled(data)) +} + +func (SharedImageDataSource) withTrustedLaunchSupported(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +data "azurerm_shared_image" "test" { + name = azurerm_shared_image.test.name + gallery_name = azurerm_shared_image.test.gallery_name + resource_group_name = azurerm_shared_image.test.resource_group_name +} +`, SharedImageResource{}.withTrustedLaunchSupported(data)) +} + +func (SharedImageDataSource) withConfidentialVM(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +data "azurerm_shared_image" "test" { + name = azurerm_shared_image.test.name + gallery_name = azurerm_shared_image.test.gallery_name + resource_group_name = azurerm_shared_image.test.resource_group_name +} +`, SharedImageResource{}.withConfidentialVM(data)) +} + +func (SharedImageDataSource) withConfidentialVMSupported(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +data "azurerm_shared_image" "test" { + name = azurerm_shared_image.test.name + gallery_name = azurerm_shared_image.test.gallery_name + resource_group_name = azurerm_shared_image.test.resource_group_name +} +`, SharedImageResource{}.withConfidentialVmSupported(data)) +} diff --git a/internal/services/compute/shared_image_resource.go b/internal/services/compute/shared_image_resource.go index f13539c97b389..2f277179507c5 100644 --- a/internal/services/compute/shared_image_resource.go +++ b/internal/services/compute/shared_image_resource.go @@ -7,6 +7,7 @@ import ( "context" "fmt" "log" + "strconv" "strings" "time" @@ -258,6 +259,18 @@ func resourceSharedImage() *pluginsdk.Resource { ForceNew: true, }, + "hibernation_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + ForceNew: true, + }, + + "disk_controller_type_nvme_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + ForceNew: true, + }, + "tags": commonschema.Tags(), }, @@ -516,6 +529,8 @@ func resourceSharedImageRead(d *pluginsdk.ResourceData, meta interface{}) error cvmEnabled := false cvmSupported := false acceleratedNetworkSupportEnabled := false + hibernationEnabled := false + diskControllerTypeNVMEEnabled := false if features := props.Features; features != nil { for _, feature := range *features { if feature.Name == nil || feature.Value == nil { @@ -532,6 +547,14 @@ func resourceSharedImageRead(d *pluginsdk.ResourceData, meta interface{}) error if strings.EqualFold(*feature.Name, "IsAcceleratedNetworkSupported") { acceleratedNetworkSupportEnabled = strings.EqualFold(*feature.Value, "true") } + + if strings.EqualFold(*feature.Name, "IsHibernateSupported") { + hibernationEnabled = strings.EqualFold(*feature.Value, "true") + } + + if strings.EqualFold(*feature.Name, "DiskControllerTypes") { + diskControllerTypeNVMEEnabled = strings.Contains(*feature.Value, "NVMe") + } } } d.Set("confidential_vm_supported", cvmSupported) @@ -539,6 +562,8 @@ func resourceSharedImageRead(d *pluginsdk.ResourceData, meta interface{}) error d.Set("trusted_launch_supported", trustedLaunchSupported) d.Set("trusted_launch_enabled", trustedLaunchEnabled) d.Set("accelerated_network_support_enabled", acceleratedNetworkSupportEnabled) + d.Set("hibernation_enabled", hibernationEnabled) + d.Set("disk_controller_type_nvme_enabled", diskControllerTypeNVMEEnabled) } return tags.FlattenAndSet(d, model.Tags) @@ -731,6 +756,13 @@ func expandSharedImageFeatures(d *pluginsdk.ResourceData) *[]galleryimages.Galle }) } + if d.Get("disk_controller_type_nvme_enabled").(bool) { + features = append(features, galleryimages.GalleryImageFeature{ + Name: pointer.To("DiskControllerTypes"), + Value: pointer.To("SCSI, NVMe"), + }) + } + if tvmSupported := d.Get("trusted_launch_supported").(bool); tvmSupported { features = append(features, galleryimages.GalleryImageFeature{ Name: pointer.To("SecurityType"), @@ -759,5 +791,12 @@ func expandSharedImageFeatures(d *pluginsdk.ResourceData) *[]galleryimages.Galle }) } + if hibernationEnabled := d.Get("hibernation_enabled").(bool); hibernationEnabled { + features = append(features, galleryimages.GalleryImageFeature{ + Name: pointer.To("IsHibernateSupported"), + Value: pointer.To(strconv.FormatBool(hibernationEnabled)), + }) + } + return &features } diff --git a/internal/services/compute/shared_image_resource_test.go b/internal/services/compute/shared_image_resource_test.go index 5ab2b8eb1693a..0240a9da1e8cb 100644 --- a/internal/services/compute/shared_image_resource_test.go +++ b/internal/services/compute/shared_image_resource_test.go @@ -186,6 +186,34 @@ func TestAccSharedImage_withAcceleratedNetworkSupportEnabled(t *testing.T) { }) } +func TestAccSharedImage_withHibernationEnabled(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_shared_image", "test") + r := SharedImageResource{} + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.withHibernationEnabled(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + +func TestAccSharedImage_withDiskControllerTypeNVMeEnabled(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_shared_image", "test") + r := SharedImageResource{} + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.withDiskControllerTypeNVMeEnabled(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + func TestAccSharedImage_description(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_shared_image", "test") r := SharedImageResource{} @@ -721,6 +749,76 @@ resource "azurerm_shared_image" "test" { `, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger) } +func (SharedImageResource) withHibernationEnabled(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-%d" + location = "%s" +} + +resource "azurerm_shared_image_gallery" "test" { + name = "acctestsig%d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location +} + +resource "azurerm_shared_image" "test" { + name = "acctestimg%d" + gallery_name = azurerm_shared_image_gallery.test.name + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + os_type = "Linux" + + hibernation_enabled = true + + identifier { + publisher = "AccTesPublisher%d" + offer = "AccTesOffer%d" + sku = "AccTesSku%d" + } +} +`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger) +} + +func (SharedImageResource) withDiskControllerTypeNVMeEnabled(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-%d" + location = "%s" +} + +resource "azurerm_shared_image_gallery" "test" { + name = "acctestsig%d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location +} + +resource "azurerm_shared_image" "test" { + name = "acctestimg%d" + gallery_name = azurerm_shared_image_gallery.test.name + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + os_type = "Linux" + + disk_controller_type_nvme_enabled = true + + identifier { + publisher = "AccTesPublisher%d" + offer = "AccTesOffer%d" + sku = "AccTesSku%d" + } +} +`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger) +} + func (SharedImageResource) description(data acceptance.TestData) string { return fmt.Sprintf(` provider "azurerm" { diff --git a/internal/services/compute/shared_schema.go b/internal/services/compute/shared_schema.go index 9e709d55011f0..6a1d30338c213 100644 --- a/internal/services/compute/shared_schema.go +++ b/internal/services/compute/shared_schema.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachines" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/validate" keyVaultValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/keyvault/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/internal/services/compute/ssh_keys.go b/internal/services/compute/ssh_keys.go index 07f3b4577288b..7c5dfef4e221f 100644 --- a/internal/services/compute/ssh_keys.go +++ b/internal/services/compute/ssh_keys.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachines" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/suppress" diff --git a/internal/services/compute/validate/orchestrated_vmss_public_ip_sku.go b/internal/services/compute/validate/orchestrated_vmss_public_ip_sku.go index 15c0d90ed67d8..8072509052656 100644 --- a/internal/services/compute/validate/orchestrated_vmss_public_ip_sku.go +++ b/internal/services/compute/validate/orchestrated_vmss_public_ip_sku.go @@ -6,7 +6,7 @@ package validate import ( "fmt" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" ) func OrchestratedVirtualMachineScaleSetPublicIPSku(input interface{}, key string) (warnings []string, errors []error) { diff --git a/internal/services/compute/validate/ssh_key.go b/internal/services/compute/validate/ssh_key.go index b99482f2cd583..85388dc6dbf33 100644 --- a/internal/services/compute/validate/ssh_key.go +++ b/internal/services/compute/validate/ssh_key.go @@ -4,6 +4,7 @@ package validate import ( + "crypto/ed25519" "crypto/rsa" "encoding/base64" "fmt" @@ -35,9 +36,8 @@ func SSHKey(i interface{}, k string) (warnings []string, errors []error) { return nil, []error{fmt.Errorf("parsing %q as a public key object", k)} } - if pubKey.Type() != ssh.KeyAlgoRSA { - return nil, []error{fmt.Errorf("- the provided %s SSH key is not supported. Only RSA SSH keys are supported by Azure", pubKey.Type())} - } else { + switch pubKey.Type() { + case ssh.KeyAlgoRSA: rsaPubKey, ok := pubKey.(ssh.CryptoPublicKey).CryptoPublicKey().(*rsa.PublicKey) if !ok { return nil, []error{fmt.Errorf("- could not retrieve the RSA public key from the SSH public key")} @@ -46,6 +46,13 @@ func SSHKey(i interface{}, k string) (warnings []string, errors []error) { if rsaPubKeyBits < 2048 { return nil, []error{fmt.Errorf("- the provided RSA SSH key has %d bits. Only ssh-rsa keys with 2048 bits or higher are supported by Azure", rsaPubKeyBits)} } + case ssh.KeyAlgoED25519: + _, ok := pubKey.(ssh.CryptoPublicKey).CryptoPublicKey().(ed25519.PublicKey) + if !ok { + return nil, []error{fmt.Errorf("- could not retrieve the ED25519 public key from the SSH public key")} + } + default: + return nil, []error{fmt.Errorf("- the provided %s SSH key is not supported. Only RSA and ED25519 SSH keys are supported by Azure", pubKey.Type())} } } else { return nil, []error{fmt.Errorf("%q is not a complete SSH2 Public Key", k)} diff --git a/internal/services/compute/validate/ssh_key_test.go b/internal/services/compute/validate/ssh_key_test.go index 9aaf5ed9479af..a578ba6c70741 100644 --- a/internal/services/compute/validate/ssh_key_test.go +++ b/internal/services/compute/validate/ssh_key_test.go @@ -24,7 +24,7 @@ func TestSSHKey(t *testing.T) { }, { input: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOwlR9xtbM69hWLJbB5nHi0a65TuRvtaldgTJQ4ClL1W", - expected: false, + expected: true, }, { input: "ssh-rsa", diff --git a/internal/services/compute/virtual_machine_scale_set.go b/internal/services/compute/virtual_machine_scale_set.go index d597fa04162f8..704b581d8e0b2 100644 --- a/internal/services/compute/virtual_machine_scale_set.go +++ b/internal/services/compute/virtual_machine_scale_set.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/galleryapplicationversions" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/applicationsecuritygroups" "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/networksecuritygroups" "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/publicipprefixes" @@ -344,36 +344,6 @@ func flattenVirtualMachineScaleSetGalleryApplications(input *[]virtualmachinesca } func VirtualMachineScaleSetScaleInPolicySchema() *pluginsdk.Schema { - if !features.FourPointOhBeta() { - return &pluginsdk.Schema{ - Type: pluginsdk.TypeList, - Optional: true, - Computed: !features.FourPointOhBeta(), - MaxItems: 1, - ConflictsWith: []string{"scale_in_policy"}, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "rule": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(virtualmachinescalesets.VirtualMachineScaleSetScaleInRulesDefault), - ValidateFunc: validation.StringInSlice([]string{ - string(virtualmachinescalesets.VirtualMachineScaleSetScaleInRulesDefault), - string(virtualmachinescalesets.VirtualMachineScaleSetScaleInRulesNewestVM), - string(virtualmachinescalesets.VirtualMachineScaleSetScaleInRulesOldestVM), - }, false), - }, - - "force_deletion_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: false, - }, - }, - }, - } - } - return &pluginsdk.Schema{ Type: pluginsdk.TypeList, Optional: true, diff --git a/internal/services/compute/virtual_machine_scale_set_data_source.go b/internal/services/compute/virtual_machine_scale_set_data_source.go index 1502926815a8f..c9080afc189b0 100644 --- a/internal/services/compute/virtual_machine_scale_set_data_source.go +++ b/internal/services/compute/virtual_machine_scale_set_data_source.go @@ -16,8 +16,8 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachines" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesetvms" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/networkinterfaces" "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/vmsspublicipaddresses" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/compute/virtual_machine_scale_set_extension_resource.go b/internal/services/compute/virtual_machine_scale_set_extension_resource.go index 1456d35177a7e..801eb56319b6a 100644 --- a/internal/services/compute/virtual_machine_scale_set_extension_resource.go +++ b/internal/services/compute/virtual_machine_scale_set_extension_resource.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/internal/services/compute/virtual_machine_scale_set_import.go b/internal/services/compute/virtual_machine_scale_set_import.go index 22f58706b5c76..9aa390ed07139 100644 --- a/internal/services/compute/virtual_machine_scale_set_import.go +++ b/internal/services/compute/virtual_machine_scale_set_import.go @@ -8,7 +8,7 @@ import ( "fmt" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" ) diff --git a/internal/services/compute/virtual_machine_scale_set_update.go b/internal/services/compute/virtual_machine_scale_set_update.go index cabd850d48da6..b679a935e3267 100644 --- a/internal/services/compute/virtual_machine_scale_set_update.go +++ b/internal/services/compute/virtual_machine_scale_set_update.go @@ -11,8 +11,8 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesetrollingupgrades" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesetvms" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/client" ) diff --git a/internal/services/compute/windows_virtual_machine_scale_set_resource.go b/internal/services/compute/windows_virtual_machine_scale_set_resource.go index fbd151aeadbd9..ed16aa9679ffd 100644 --- a/internal/services/compute/windows_virtual_machine_scale_set_resource.go +++ b/internal/services/compute/windows_virtual_machine_scale_set_resource.go @@ -4,6 +4,7 @@ package compute import ( + "context" "fmt" "log" "time" @@ -19,7 +20,7 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/capacityreservationgroups" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/images" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/proximityplacementgroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" @@ -57,6 +58,30 @@ func resourceWindowsVirtualMachineScaleSet() *pluginsdk.Resource { // https://github.com/Azure/azure-rest-api-specs/pull/7246 Schema: resourceWindowsVirtualMachineScaleSetSchema(), + + CustomizeDiff: pluginsdk.CustomDiffWithAll( + // Removing existing zones is currently not supported for Virtual Machine Scale Sets + pluginsdk.ForceNewIfChange("zones", func(ctx context.Context, old, new, meta interface{}) bool { + oldZones := zones.ExpandUntyped(old.(*schema.Set).List()) + newZones := zones.ExpandUntyped(new.(*schema.Set).List()) + + for _, ov := range oldZones { + found := false + for _, nv := range newZones { + if ov == nv { + found = true + break + } + } + + if !found { + return true + } + } + + return false + }), + ), } } @@ -524,6 +549,11 @@ func resourceWindowsVirtualMachineScaleSetUpdate(d *pluginsdk.ResourceData, meta automaticOSUpgradeIsEnabled = *policy.AutomaticOSUpgradePolicy.EnableAutomaticOSUpgrade } } + + if d.HasChange("zones") { + update.Zones = pointer.To(zones.ExpandUntyped(d.Get("zones").(*schema.Set).List())) + } + if d.HasChange("automatic_os_upgrade_policy") || d.HasChange("rolling_upgrade_policy") { upgradePolicy := virtualmachinescalesets.UpgradePolicy{} if existing.Model.Properties.UpgradePolicy == nil { @@ -1498,7 +1528,7 @@ func resourceWindowsVirtualMachineScaleSetSchema() map[string]*pluginsdk.Schema "termination_notification": VirtualMachineScaleSetTerminationNotificationSchema(), - "zones": commonschema.ZonesMultipleOptionalForceNew(), + "zones": commonschema.ZonesMultipleOptional(), "unique_id": { Type: pluginsdk.TypeString, diff --git a/internal/services/compute/windows_virtual_machine_scale_set_resource_other_test.go b/internal/services/compute/windows_virtual_machine_scale_set_resource_other_test.go index 6560d311585e5..90df1695130b3 100644 --- a/internal/services/compute/windows_virtual_machine_scale_set_resource_other_test.go +++ b/internal/services/compute/windows_virtual_machine_scale_set_resource_other_test.go @@ -11,7 +11,7 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" diff --git a/internal/services/compute/windows_virtual_machine_scale_set_resource_scaling_test.go b/internal/services/compute/windows_virtual_machine_scale_set_resource_scaling_test.go index 9ef3a0414b8f6..3577f554d8012 100644 --- a/internal/services/compute/windows_virtual_machine_scale_set_resource_scaling_test.go +++ b/internal/services/compute/windows_virtual_machine_scale_set_resource_scaling_test.go @@ -264,6 +264,28 @@ func TestAccWindowsVirtualMachineScaleSet_scalingZonesMultiple(t *testing.T) { }) } +func TestAccWindowsVirtualMachineScaleSet_scalingZonesUpdate(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_windows_virtual_machine_scale_set", "test") + r := WindowsVirtualMachineScaleSetResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.scalingZonesSingle(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep("admin_password"), + { + Config: r.scalingZonesMultiple(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep("admin_password"), + }) +} + func TestAccWindowsVirtualMachineScaleSet_scalingZonesBalance(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_windows_virtual_machine_scale_set", "test") r := WindowsVirtualMachineScaleSetResource{} diff --git a/internal/services/compute/windows_virtual_machine_scale_set_resource_test.go b/internal/services/compute/windows_virtual_machine_scale_set_resource_test.go index 6ffc89c485933..f85bf7260b12f 100644 --- a/internal/services/compute/windows_virtual_machine_scale_set_resource_test.go +++ b/internal/services/compute/windows_virtual_machine_scale_set_resource_test.go @@ -8,7 +8,7 @@ import ( "fmt" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/internal/services/containerapps/client/client.go b/internal/services/containerapps/client/client.go index 6818cc353bee4..be9f2bf04aa25 100644 --- a/internal/services/containerapps/client/client.go +++ b/internal/services/containerapps/client/client.go @@ -10,8 +10,8 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerapps" "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerappsrevisions" "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/daprcomponents" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/jobs" "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs" "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-03-01/managedenvironments" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) diff --git a/internal/services/containerapps/container_app_custom_domain_resource.go b/internal/services/containerapps/container_app_custom_domain_resource.go index fc0f3930e351e..06b142c0266bb 100644 --- a/internal/services/containerapps/container_app_custom_domain_resource.go +++ b/internal/services/containerapps/container_app_custom_domain_resource.go @@ -28,10 +28,11 @@ type ContainerAppCustomDomainResource struct{} var _ sdk.Resource = ContainerAppCustomDomainResource{} type ContainerAppCustomDomainResourceModel struct { - Name string `tfschema:"name"` - ContainerAppId string `tfschema:"container_app_id"` - CertificateId string `tfschema:"container_app_environment_certificate_id"` - BindingType string `tfschema:"certificate_binding_type"` + Name string `tfschema:"name"` + ContainerAppId string `tfschema:"container_app_id"` + CertificateId string `tfschema:"container_app_environment_certificate_id"` + BindingType string `tfschema:"certificate_binding_type"` + ManagedCertificateId string `tfschema:"container_app_environment_managed_certificate_id"` } func (a ContainerAppCustomDomainResource) Arguments() map[string]*pluginsdk.Schema { @@ -70,7 +71,12 @@ func (a ContainerAppCustomDomainResource) Arguments() map[string]*pluginsdk.Sche } func (a ContainerAppCustomDomainResource) Attributes() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{} + return map[string]*pluginsdk.Schema{ + "container_app_environment_managed_certificate_id": { + Type: pluginsdk.TypeString, + Computed: true, + }, + } } func (a ContainerAppCustomDomainResource) ModelObject() interface{} { @@ -211,11 +217,20 @@ func (a ContainerAppCustomDomainResource) Read() sdk.ResourceFunc { state.Name = id.CustomDomainName state.ContainerAppId = containerAppId.ID() if pointer.From(v.CertificateId) != "" { - certId, err := managedenvironments.ParseCertificateIDInsensitively(pointer.From(v.CertificateId)) - if err != nil { - return err + // The `v.CertificateId` returned from API has two possible values. when using an Azure created Managed Certificate, + // its format is "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.App/managedEnvironments/%s/managedCertificates/%s", + // another format is "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.App/managedEnvironments/%s/certificates/%s", + // both cases are handled here to avoid parsing error. + certId, err1 := managedenvironments.ParseCertificateIDInsensitively(pointer.From(v.CertificateId)) + if err1 != nil { + managedCertId, err2 := managedenvironments.ParseManagedCertificateID(pointer.From(v.CertificateId)) + if err2 != nil { + return err1 + } + state.ManagedCertificateId = managedCertId.ID() + } else { + state.CertificateId = certId.ID() } - state.CertificateId = certId.ID() } state.BindingType = string(pointer.From(v.BindingType)) @@ -243,14 +258,6 @@ func (a ContainerAppCustomDomainResource) Delete() sdk.ResourceFunc { return err } - // attempt to lock the cert if we have the ID - if certIdRaw := metadata.ResourceData.Get("container_app_environment_certificate_id").(string); certIdRaw != "" { - if certId, err := managedenvironments.ParseCertificateID(certIdRaw); err == nil { - locks.ByID(certId.ID()) - defer locks.UnlockByID(certId.ID()) - } - } - containerAppId := containerapps.NewContainerAppID(id.SubscriptionId, id.ResourceGroupName, id.ContainerAppName) containerApp, err := client.Get(ctx, containerAppId) @@ -270,6 +277,13 @@ func (a ContainerAppCustomDomainResource) Delete() sdk.ResourceFunc { for _, v := range *customDomains { if !strings.EqualFold(v.Name, id.CustomDomainName) { updatedCustomDomains = append(updatedCustomDomains, v) + } else { + // attempt to lock the cert if we have the ID + certificateId := pointer.From(v.CertificateId) + if certificateId != "" { + locks.ByID(certificateId) + defer locks.UnlockByID(certificateId) + } } } } diff --git a/internal/services/containerapps/container_app_job_resource.go b/internal/services/containerapps/container_app_job_resource.go index 62a7017a9271c..7b4fa4ee12dab 100644 --- a/internal/services/containerapps/container_app_job_resource.go +++ b/internal/services/containerapps/container_app_job_resource.go @@ -16,8 +16,8 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/certificates" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/jobs" "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" diff --git a/internal/services/containerapps/container_app_job_resource_test.go b/internal/services/containerapps/container_app_job_resource_test.go index 396587e7f36c0..8c0be8b5e9df2 100644 --- a/internal/services/containerapps/container_app_job_resource_test.go +++ b/internal/services/containerapps/container_app_job_resource_test.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/jobs" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/containerapps/container_app_resource.go b/internal/services/containerapps/container_app_resource.go index 2bfc598948f3a..d83027d24eea6 100644 --- a/internal/services/containerapps/container_app_resource.go +++ b/internal/services/containerapps/container_app_resource.go @@ -440,36 +440,10 @@ func (r ContainerAppResource) CustomizeDiff() sdk.ResourceFunc { // Ingress traffic weight validations if len(app.Ingress) != 0 { ingress := app.Ingress[0] - if metadata.ResourceDiff.HasChange("name") { - // Validation for create time - // (Above is a trick to tell whether this is for a new create apply, as the "name" is a force new property) - if len(ingress.TrafficWeights) != 0 { - if len(ingress.TrafficWeights) > 1 { - return fmt.Errorf("at most one `ingress.0.traffic_weight` can be specified during creation") - } - tw := ingress.TrafficWeights[0] - if !tw.LatestRevision { - return fmt.Errorf("`ingress.0.traffic_weight.0.latest_revision` must be set to true during creation") - } - if tw.RevisionSuffix != "" { - return fmt.Errorf("`ingress.0.traffic_weight.0.revision_suffix` must not be set during creation") - } - } - } else { - // Validation for update time - var latestRevCount int - for i, tw := range ingress.TrafficWeights { - if tw.LatestRevision { - latestRevCount++ - if tw.RevisionSuffix != "" { - return fmt.Errorf("`ingress.0.traffic_weight.%[1]d.revision_suffix` conflicts with `ingress.0.traffic_weight.%[1]d.latest_revision`", i) - } - } else if tw.RevisionSuffix == "" { - return fmt.Errorf("`ingress.0.traffic_weight.%[1]d.revision_suffix` is not specified", i) - } - } - if latestRevCount > 1 { - return fmt.Errorf("more than one `ingress.0.traffic_weight` has `latest_revision` set to `true`") + + for i, tw := range ingress.TrafficWeights { + if !tw.LatestRevision && tw.RevisionSuffix == "" { + return fmt.Errorf("`either ingress.0.traffic_weight.%[1]d.revision_suffix` or `ingress.0.traffic_weight.%[1]d.latest_revision` should be specified", i) } } } diff --git a/internal/services/containerapps/container_app_resource_test.go b/internal/services/containerapps/container_app_resource_test.go index fbc03d5353147..b98919252059b 100644 --- a/internal/services/containerapps/container_app_resource_test.go +++ b/internal/services/containerapps/container_app_resource_test.go @@ -570,16 +570,8 @@ func TestAccContainerAppResource_ingressTrafficValidation(t *testing.T) { data.ResourceTest(t, r, []acceptance.TestStep{ { - Config: r.ingressTrafficValidation(data, r.trafficBlockMoreThanOne()), - ExpectError: regexp.MustCompile(fmt.Sprintf(`at most one %s can be specified during creation`, "`ingress.0.traffic_weight`")), - }, - { - Config: r.ingressTrafficValidation(data, r.trafficBlockLatestRevisionNotSet()), - ExpectError: regexp.MustCompile(fmt.Sprintf(`%s must be set to true during creation`, "`ingress.0.traffic_weight.0.latest_revision`")), - }, - { - Config: r.ingressTrafficValidation(data, r.trafficBlockRevisionSuffixSet()), - ExpectError: regexp.MustCompile(fmt.Sprintf(`%s must not be set during creation`, "`ingress.0.traffic_weight.0.revision_suffix`")), + Config: r.ingressTrafficValidation(data, r.latestRevisionFalseRevisionSuffixEmpty()), + ExpectError: regexp.MustCompile("`either ingress.0.traffic_weight.0.revision_suffix` or `ingress.0.traffic_weight.0.latest_revision` should be specified"), }, }) } @@ -2832,31 +2824,11 @@ resource "azurerm_container_app" "test" { `, r.template(data), data.RandomInteger) } -func (r ContainerAppResource) trafficBlockMoreThanOne() string { - return ` -traffic_weight { - percentage = 50 -} -traffic_weight { - percentage = 50 -} -` -} - -func (r ContainerAppResource) trafficBlockLatestRevisionNotSet() string { +func (r ContainerAppResource) latestRevisionFalseRevisionSuffixEmpty() string { return ` traffic_weight { + latest_revision = false percentage = 100 } ` } - -func (r ContainerAppResource) trafficBlockRevisionSuffixSet() string { - return ` -traffic_weight { - percentage = 100 - latest_revision = true - revision_suffix = "foo" -} -` -} diff --git a/internal/services/containerapps/helpers/container_app_job.go b/internal/services/containerapps/helpers/container_app_job.go index dda8bc8473942..dcd83c005e8f7 100644 --- a/internal/services/containerapps/helpers/container_app_job.go +++ b/internal/services/containerapps/helpers/container_app_job.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/jobs" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" ) diff --git a/internal/services/containers/client/client.go b/internal/services/containers/client/client.go index 2d228e9762913..db7db8b9c03d7 100644 --- a/internal/services/containers/client/client.go +++ b/internal/services/containers/client/client.go @@ -8,15 +8,15 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2023-05-01/containerinstance" containerregistry_v2019_06_01_preview "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview" - containerregistry_v2021_08_01_preview "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview" + containerregistry_v2023_06_01_preview "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview" "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-07-01/cacherules" "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2019-08-01/containerservices" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots" "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-04-01/fleetupdatestrategies" "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-04-01/updateruns" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots" "github.com/hashicorp/go-azure-sdk/resource-manager/kubernetesconfiguration/2022-11-01/extensions" "github.com/hashicorp/go-azure-sdk/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration" "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" @@ -28,7 +28,7 @@ type Client struct { AgentPoolsClient *agentpools.AgentPoolsClient ContainerInstanceClient *containerinstance.ContainerInstanceClient CacheRulesClient *cacherules.CacheRulesClient - ContainerRegistryClient_v2021_08_01_preview *containerregistry_v2021_08_01_preview.Client + ContainerRegistryClient_v2023_06_01_preview *containerregistry_v2023_06_01_preview.Client // v2019_06_01_preview is needed for container registry agent pools and tasks ContainerRegistryClient_v2019_06_01_preview *containerregistry_v2019_06_01_preview.Client FleetUpdateRunsClient *updateruns.UpdateRunsClient @@ -56,7 +56,7 @@ func NewContainersClient(o *common.ClientOptions) (*Client, error) { return nil, err } - containerRegistryClient_v2021_08_01_preview, err := containerregistry_v2021_08_01_preview.NewClientWithBaseURI(o.Environment.ResourceManager, func(c *resourcemanager.Client) { + containerRegistryClient_v2023_06_01_preview, err := containerregistry_v2023_06_01_preview.NewClientWithBaseURI(o.Environment.ResourceManager, func(c *resourcemanager.Client) { o.Configure(c, o.Authorizers.ResourceManager) }) if err != nil { @@ -128,7 +128,7 @@ func NewContainersClient(o *common.ClientOptions) (*Client, error) { AgentPoolsClient: agentPoolsClient, ContainerInstanceClient: containerInstanceClient, CacheRulesClient: cacheRulesClient, - ContainerRegistryClient_v2021_08_01_preview: containerRegistryClient_v2021_08_01_preview, + ContainerRegistryClient_v2023_06_01_preview: containerRegistryClient_v2023_06_01_preview, ContainerRegistryClient_v2019_06_01_preview: containerRegistryClient_v2019_06_01_preview, FleetUpdateRunsClient: fleetUpdateRunsClient, FleetUpdateStrategiesClient: fleetUpdateStrategiesClient, diff --git a/internal/services/containers/container_connected_registry_resource.go b/internal/services/containers/container_connected_registry_resource.go index 2db36b211d3ec..6ea10c85a2c85 100644 --- a/internal/services/containers/container_connected_registry_resource.go +++ b/internal/services/containers/container_connected_registry_resource.go @@ -10,9 +10,9 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens" tfvalidate "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/containers/parse" @@ -200,7 +200,7 @@ func (r ContainerConnectedRegistryResource) Create() sdk.ResourceFunc { return sdk.ResourceFunc{ Timeout: 30 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.Containers.ContainerRegistryClient_v2021_08_01_preview.ConnectedRegistries + client := metadata.Client.Containers.ContainerRegistryClient_v2023_06_01_preview.ConnectedRegistries var model ContainerConnectedRegistryModel if err := metadata.Decode(&model); err != nil { @@ -275,7 +275,7 @@ func (r ContainerConnectedRegistryResource) Read() sdk.ResourceFunc { Timeout: 5 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.Containers.ContainerRegistryClient_v2021_08_01_preview.ConnectedRegistries + client := metadata.Client.Containers.ContainerRegistryClient_v2023_06_01_preview.ConnectedRegistries id, err := connectedregistries.ParseConnectedRegistryID(metadata.ResourceData.Id()) if err != nil { return err @@ -374,7 +374,7 @@ func (r ContainerConnectedRegistryResource) Delete() sdk.ResourceFunc { return sdk.ResourceFunc{ Timeout: 30 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.Containers.ContainerRegistryClient_v2021_08_01_preview.ConnectedRegistries + client := metadata.Client.Containers.ContainerRegistryClient_v2023_06_01_preview.ConnectedRegistries id, err := connectedregistries.ParseConnectedRegistryID(metadata.ResourceData.Id()) if err != nil { @@ -404,7 +404,7 @@ func (r ContainerConnectedRegistryResource) Update() sdk.ResourceFunc { return err } - client := metadata.Client.Containers.ContainerRegistryClient_v2021_08_01_preview.ConnectedRegistries + client := metadata.Client.Containers.ContainerRegistryClient_v2023_06_01_preview.ConnectedRegistries existing, err := client.Get(ctx, *id) if err != nil { diff --git a/internal/services/containers/container_connected_registry_resource_test.go b/internal/services/containers/container_connected_registry_resource_test.go index f050623270672..fceeae7093200 100644 --- a/internal/services/containers/container_connected_registry_resource_test.go +++ b/internal/services/containers/container_connected_registry_resource_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -139,7 +139,7 @@ func TestAccContainerConnectedRegistry_requiresImport(t *testing.T) { } func (r ContainerConnectedRegistryResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - client := clients.Containers.ContainerRegistryClient_v2021_08_01_preview.ConnectedRegistries + client := clients.Containers.ContainerRegistryClient_v2023_06_01_preview.ConnectedRegistries id, err := connectedregistries.ParseConnectedRegistryID(state.ID) if err != nil { diff --git a/internal/services/containers/container_registry_cache_rule_data_source.go b/internal/services/containers/container_registry_cache_rule_data_source.go index 7fa13849691f3..b1073a84e80ee 100644 --- a/internal/services/containers/container_registry_cache_rule_data_source.go +++ b/internal/services/containers/container_registry_cache_rule_data_source.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries" "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-07-01/cacherules" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/containers/validate" diff --git a/internal/services/containers/container_registry_cache_rule_resource.go b/internal/services/containers/container_registry_cache_rule_resource.go index dea2029a1534d..5a46337ace664 100644 --- a/internal/services/containers/container_registry_cache_rule_resource.go +++ b/internal/services/containers/container_registry_cache_rule_resource.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries" "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-07-01/cacherules" "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-07-01/credentialsets" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" diff --git a/internal/services/containers/container_registry_data_source.go b/internal/services/containers/container_registry_data_source.go index e2ad3c0c2bb6f..56d1f25074f9c 100644 --- a/internal/services/containers/container_registry_data_source.go +++ b/internal/services/containers/container_registry_data_source.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/containers/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -31,7 +31,7 @@ func dataSourceContainerRegistry() *pluginsdk.Resource { } func dataSourceContainerRegistryRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2021_08_01_preview.Registries + client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2023_06_01_preview.Registries subscriptionId := meta.(*clients.Client).Account.SubscriptionId ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() diff --git a/internal/services/containers/container_registry_resource.go b/internal/services/containers/container_registry_resource.go index efc0233ed4e5b..1623d7f838a2c 100644 --- a/internal/services/containers/container_registry_resource.go +++ b/internal/services/containers/container_registry_resource.go @@ -18,9 +18,9 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/operation" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/operation" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" @@ -164,8 +164,8 @@ func resourceContainerRegistry() *pluginsdk.Resource { } func resourceContainerRegistryCreate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2021_08_01_preview.Registries - operationClient := meta.(*clients.Client).Containers.ContainerRegistryClient_v2021_08_01_preview.Operation + client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2023_06_01_preview.Registries + operationClient := meta.(*clients.Client).Containers.ContainerRegistryClient_v2023_06_01_preview.Operation subscriptionId := meta.(*clients.Client).Account.SubscriptionId ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d) defer cancel() @@ -297,7 +297,7 @@ func resourceContainerRegistryCreate(d *pluginsdk.ResourceData, meta interface{} } func resourceContainerRegistryUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2021_08_01_preview.Registries + client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2023_06_01_preview.Registries ctx, cancel := timeouts.ForUpdate(meta.(*clients.Client).StopContext, d) defer cancel() @@ -487,7 +487,7 @@ func resourceContainerRegistryUpdate(d *pluginsdk.ResourceData, meta interface{} } func applyContainerRegistrySku(d *pluginsdk.ResourceData, meta interface{}, sku string, id registries.RegistryId) error { - client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2021_08_01_preview.Registries + client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2023_06_01_preview.Registries ctx, cancel := timeouts.ForUpdate(meta.(*clients.Client).StopContext, d) defer cancel() @@ -506,7 +506,7 @@ func applyContainerRegistrySku(d *pluginsdk.ResourceData, meta interface{}, sku } func applyGeoReplicationLocations(ctx context.Context, meta interface{}, registryId registries.RegistryId, oldGeoReplications []replications.Replication, newGeoReplications []replications.Replication) error { - replicationClient := meta.(*clients.Client).Containers.ContainerRegistryClient_v2021_08_01_preview.Replications + replicationClient := meta.(*clients.Client).Containers.ContainerRegistryClient_v2023_06_01_preview.Replications log.Printf("[INFO] preparing to apply geo-replications for Container Registry.") oldReplications := map[string]replications.Replication{} @@ -635,8 +635,8 @@ func applyGeoReplicationLocations(ctx context.Context, meta interface{}, registr } func resourceContainerRegistryRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2021_08_01_preview.Registries - replicationClient := meta.(*clients.Client).Containers.ContainerRegistryClient_v2021_08_01_preview.Replications + client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2023_06_01_preview.Registries + replicationClient := meta.(*clients.Client).Containers.ContainerRegistryClient_v2023_06_01_preview.Replications ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() @@ -781,7 +781,7 @@ func resourceContainerRegistryRead(d *pluginsdk.ResourceData, meta interface{}) } func resourceContainerRegistryDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2021_08_01_preview.Registries + client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2023_06_01_preview.Registries ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() @@ -815,25 +815,6 @@ func expandNetworkRuleSet(profiles []interface{}) *registries.NetworkRuleSet { ipRules = append(ipRules, newIpRule) } - if !features.FourPointOhBeta() { - networkRuleConfigs := profile["virtual_network"].(*pluginsdk.Set).List() - virtualNetworkRules := make([]registries.VirtualNetworkRule, 0) - for _, networkRuleInterface := range networkRuleConfigs { - config := networkRuleInterface.(map[string]interface{}) - newVirtualNetworkRule := registries.VirtualNetworkRule{ - Action: pointer.To(registries.Action(config["action"].(string))), - Id: config["subnet_id"].(string), - } - virtualNetworkRules = append(virtualNetworkRules, newVirtualNetworkRule) - } - - return ®istries.NetworkRuleSet{ - DefaultAction: registries.DefaultAction(profile["default_action"].(string)), - IPRules: &ipRules, - VirtualNetworkRules: &virtualNetworkRules, - } - } - return ®istries.NetworkRuleSet{ DefaultAction: registries.DefaultAction(profile["default_action"].(string)), IPRules: &ipRules, @@ -1010,20 +991,6 @@ func flattenNetworkRuleSet(networkRuleSet *registries.NetworkRuleSet) []interfac values["ip_rule"] = ipRules - if !features.FourPointOhBeta() { - virtualNetworkRules := make([]interface{}, 0) - if networkRuleSet.VirtualNetworkRules != nil { - for _, virtualNetworkRule := range *networkRuleSet.VirtualNetworkRules { - value := make(map[string]interface{}) - value["action"] = string(*virtualNetworkRule.Action) - - value["subnet_id"] = virtualNetworkRule.Id - virtualNetworkRules = append(virtualNetworkRules, value) - } - } - values["virtual_network"] = virtualNetworkRules - } - return []interface{}{values} } @@ -1373,29 +1340,6 @@ func resourceContainerRegistrySchema() map[string]*pluginsdk.Schema { }, }, }, - - "virtual_network": { - Deprecated: "The property `virtual_network` is deprecated since this is used exclusively for service endpoints which are being deprecated. Users are expected to use Private Endpoints instead. This property will be removed in v4.0 of the AzureRM Provider.", - Type: pluginsdk.TypeSet, - Optional: true, - ConfigMode: pluginsdk.SchemaConfigModeAttr, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "action": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - string(registries.ActionAllow), - }, false), - }, - "subnet_id": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: commonids.ValidateSubnetID, - }, - }, - }, - }, }, }, } diff --git a/internal/services/containers/container_registry_resource_test.go b/internal/services/containers/container_registry_resource_test.go index f682bb25c223f..42feb028b291d 100644 --- a/internal/services/containers/container_registry_resource_test.go +++ b/internal/services/containers/container_registry_resource_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -244,6 +244,7 @@ func TestAccContainerRegistry_networkAccessProfileUpdate(t *testing.T) { check.That(data.ResourceName).ExistsInAzure(r), ), }, + data.ImportStep(), { Config: r.networkAccessProfileIp(data, "Premium"), Check: acceptance.ComposeTestCheckFunc( @@ -253,35 +254,6 @@ func TestAccContainerRegistry_networkAccessProfileUpdate(t *testing.T) { ), }, data.ImportStep(), - { - Config: r.networkAccessProfile_vnet(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.networkAccessProfile_both(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccContainerRegistry_networkAccessProfileVnet(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_container_registry", "test") - r := ContainerRegistryResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.networkAccessProfile_vnet(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), }) } @@ -470,7 +442,7 @@ func (t ContainerRegistryResource) Exists(ctx context.Context, clients *clients. return nil, err } - resp, err := clients.Containers.ContainerRegistryClient_v2021_08_01_preview.Registries.Get(ctx, *id) + resp, err := clients.Containers.ContainerRegistryClient_v2023_06_01_preview.Registries.Get(ctx, *id) if err != nil { return nil, fmt.Errorf("retrieving %s: %+v", id, err) } @@ -979,199 +951,6 @@ resource "azurerm_container_registry" "test" { `, data.RandomInteger, data.Locations.Primary, sku) } -func (ContainerRegistryResource) networkAccessProfile_vnet(data acceptance.TestData) string { - if !features.FourPointOhBeta() { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%[1]d" - location = "%[2]s" -} - -resource "azurerm_virtual_network" "test" { - name = "virtualNetwork1" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - address_space = ["10.0.0.0/16"] -} - -resource "azurerm_subnet" "test" { - name = "testsubnet" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.0.1.0/24"] - - service_endpoints = ["Microsoft.ContainerRegistry"] -} - -resource "azurerm_container_registry" "test" { - name = "testAccCr%[1]d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - sku = "Premium" - admin_enabled = false - - network_rule_set { - default_action = "Deny" - - ip_rule { - action = "Allow" - ip_range = "8.8.8.8/32" - } - - virtual_network { - action = "Allow" - subnet_id = azurerm_subnet.test.id - } - } -} -`, data.RandomInteger, data.Locations.Primary) - } - - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%[1]d" - location = "%[2]s" -} - -resource "azurerm_virtual_network" "test" { - name = "virtualNetwork1" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - address_space = ["10.0.0.0/16"] -} - -resource "azurerm_subnet" "test" { - name = "testsubnet" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.0.1.0/24"] - - service_endpoints = ["Microsoft.ContainerRegistry"] -} - -resource "azurerm_container_registry" "test" { - name = "testAccCr%[1]d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - sku = "Premium" - admin_enabled = false - - network_rule_set { - default_action = "Deny" - - ip_rule { - action = "Allow" - ip_range = "8.8.8.8/32" - } - } -} -`, data.RandomInteger, data.Locations.Primary) -} - -func (ContainerRegistryResource) networkAccessProfile_both(data acceptance.TestData) string { - if !features.FourPointOhBeta() { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%[1]d" - location = "%[2]s" -} - -resource "azurerm_virtual_network" "test" { - name = "virtualNetwork1" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - address_space = ["10.0.0.0/16"] -} - -resource "azurerm_subnet" "test" { - name = "testsubnet" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.0.1.0/24"] - - service_endpoints = ["Microsoft.ContainerRegistry"] -} - -resource "azurerm_container_registry" "test" { - name = "testAccCr%[1]d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - sku = "Premium" - admin_enabled = false - - network_rule_set { - default_action = "Deny" - - ip_rule { - action = "Allow" - ip_range = "8.8.8.8/32" - } - - virtual_network { - action = "Allow" - subnet_id = azurerm_subnet.test.id - } - } -} -`, data.RandomInteger, data.Locations.Primary) - } - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%[1]d" - location = "%[2]s" -} - -resource "azurerm_virtual_network" "test" { - name = "virtualNetwork1" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - address_space = ["10.0.0.0/16"] -} - -resource "azurerm_subnet" "test" { - name = "testsubnet" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.0.1.0/24"] - - service_endpoints = ["Microsoft.ContainerRegistry"] -} - -resource "azurerm_container_registry" "test" { - name = "testAccCr%[1]d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - sku = "Premium" - admin_enabled = false - - network_rule_set { - default_action = "Deny" - - ip_rule { - action = "Allow" - ip_range = "8.8.8.8/32" - } - } -} -`, data.RandomInteger, data.Locations.Primary) -} - func (ContainerRegistryResource) policies(data acceptance.TestData, days int) string { return fmt.Sprintf(` provider "azurerm" { diff --git a/internal/services/containers/container_registry_scope_map_data_source.go b/internal/services/containers/container_registry_scope_map_data_source.go index f25ee23e6724e..02d5d1e9762c4 100644 --- a/internal/services/containers/container_registry_scope_map_data_source.go +++ b/internal/services/containers/container_registry_scope_map_data_source.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/containers/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -52,7 +52,7 @@ func dataSourceContainerRegistryScopeMap() *pluginsdk.Resource { } func dataSourceContainerRegistryScopeMapRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2021_08_01_preview.ScopeMaps + client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2023_06_01_preview.ScopeMaps subscriptionId := meta.(*clients.Client).Account.SubscriptionId ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() diff --git a/internal/services/containers/container_registry_scope_map_resource.go b/internal/services/containers/container_registry_scope_map_resource.go index 7e7ce0ed58859..8358f94ff0e08 100644 --- a/internal/services/containers/container_registry_scope_map_resource.go +++ b/internal/services/containers/container_registry_scope_map_resource.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/containers/validate" @@ -77,7 +77,7 @@ func resourceContainerRegistryScopeMap() *pluginsdk.Resource { } func resourceContainerRegistryScopeMapCreate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2021_08_01_preview.ScopeMaps + client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2023_06_01_preview.ScopeMaps subscriptionId := meta.(*clients.Client).Account.SubscriptionId ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d) defer cancel() @@ -114,7 +114,7 @@ func resourceContainerRegistryScopeMapCreate(d *pluginsdk.ResourceData, meta int } func resourceContainerRegistryScopeMapUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2021_08_01_preview.ScopeMaps + client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2023_06_01_preview.ScopeMaps ctx, cancel := timeouts.ForUpdate(meta.(*clients.Client).StopContext, d) defer cancel() @@ -141,7 +141,7 @@ func resourceContainerRegistryScopeMapUpdate(d *pluginsdk.ResourceData, meta int } func resourceContainerRegistryScopeMapRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2021_08_01_preview.ScopeMaps + client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2023_06_01_preview.ScopeMaps ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() @@ -179,7 +179,7 @@ func resourceContainerRegistryScopeMapRead(d *pluginsdk.ResourceData, meta inter } func resourceContainerRegistryScopeMapDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2021_08_01_preview.ScopeMaps + client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2023_06_01_preview.ScopeMaps ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() diff --git a/internal/services/containers/container_registry_scope_map_resource_test.go b/internal/services/containers/container_registry_scope_map_resource_test.go index 3704d4e664aab..e4ec405e1819c 100644 --- a/internal/services/containers/container_registry_scope_map_resource_test.go +++ b/internal/services/containers/container_registry_scope_map_resource_test.go @@ -8,7 +8,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -103,7 +103,7 @@ func (ContainerRegistryScopeMapResource) Exists(ctx context.Context, clients *cl return nil, err } - resp, err := clients.Containers.ContainerRegistryClient_v2021_08_01_preview.ScopeMaps.Get(ctx, *id) + resp, err := clients.Containers.ContainerRegistryClient_v2023_06_01_preview.ScopeMaps.Get(ctx, *id) if err != nil { return nil, fmt.Errorf("retrieving %s: %+v", *id, err) } diff --git a/internal/services/containers/container_registry_task_resource.go b/internal/services/containers/container_registry_task_resource.go index 25120b5a21520..ce9f7a6e1e01d 100644 --- a/internal/services/containers/container_registry_task_resource.go +++ b/internal/services/containers/container_registry_task_resource.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/tasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/containers/validate" @@ -663,7 +663,7 @@ func (r ContainerRegistryTaskResource) Create() sdk.ResourceFunc { Timeout: 30 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { client := metadata.Client.Containers.ContainerRegistryClient_v2019_06_01_preview.Tasks - registryClient := metadata.Client.Containers.ContainerRegistryClient_v2021_08_01_preview.Registries + registryClient := metadata.Client.Containers.ContainerRegistryClient_v2023_06_01_preview.Registries var model ContainerRegistryTaskModel if err := metadata.Decode(&model); err != nil { diff --git a/internal/services/containers/container_registry_token_data_source.go b/internal/services/containers/container_registry_token_data_source.go index ff3ef1f2cae04..168ad745b9cf9 100644 --- a/internal/services/containers/container_registry_token_data_source.go +++ b/internal/services/containers/container_registry_token_data_source.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/containers/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -53,7 +53,7 @@ func dataSourceContainerRegistryToken() *pluginsdk.Resource { } func dataSourceContainerRegistryTokenRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2021_08_01_preview.Tokens + client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2023_06_01_preview.Tokens subscriptionId := meta.(*clients.Client).Account.SubscriptionId ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d) defer cancel() diff --git a/internal/services/containers/container_registry_token_password_resource.go b/internal/services/containers/container_registry_token_password_resource.go index 7d4ec3b4e99b4..d0469b9ef25f7 100644 --- a/internal/services/containers/container_registry_token_password_resource.go +++ b/internal/services/containers/container_registry_token_password_resource.go @@ -11,9 +11,9 @@ import ( "github.com/Azure/go-autorest/autorest/date" "github.com/hashicorp/go-azure-helpers/lang/pointer" - containterregistry_v2021_08_01_preview "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens" + containterregistry_v2021_08_01_preview "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/containers/client" @@ -119,7 +119,7 @@ func (r ContainerRegistryTokenPasswordResource) Create() sdk.ResourceFunc { return sdk.ResourceFunc{ Timeout: 30 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.Containers.ContainerRegistryClient_v2021_08_01_preview + client := metadata.Client.Containers.ContainerRegistryClient_v2023_06_01_preview var plan ContainerRegistryTokenPasswordModel if err := metadata.Decode(&plan); err != nil { return fmt.Errorf("decoding %+v", err) @@ -173,7 +173,7 @@ func (r ContainerRegistryTokenPasswordResource) Read() sdk.ResourceFunc { Timeout: 5 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.Containers.ContainerRegistryClient_v2021_08_01_preview + client := metadata.Client.Containers.ContainerRegistryClient_v2023_06_01_preview id, err := parse.ContainerRegistryTokenPasswordID(metadata.ResourceData.Id()) if err != nil { return err @@ -232,7 +232,7 @@ func (r ContainerRegistryTokenPasswordResource) Delete() sdk.ResourceFunc { return sdk.ResourceFunc{ Timeout: 30 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.Containers.ContainerRegistryClient_v2021_08_01_preview.Tokens + client := metadata.Client.Containers.ContainerRegistryClient_v2023_06_01_preview.Tokens id, err := parse.ContainerRegistryTokenPasswordID(metadata.ResourceData.Id()) if err != nil { @@ -397,7 +397,7 @@ func (r ContainerRegistryTokenPasswordResource) readPassword(ctx context.Context func (r ContainerRegistryTokenPasswordResource) generatePassword(ctx context.Context, clients client.Client, id tokens.TokenId, passwords []tokens.TokenPassword) ([]tokens.TokenPassword, error) { var genPasswords []tokens.TokenPassword - existingPasswords, err := r.readPassword(ctx, clients.ContainerRegistryClient_v2021_08_01_preview, id) + existingPasswords, err := r.readPassword(ctx, clients.ContainerRegistryClient_v2023_06_01_preview, id) if err != nil { return nil, fmt.Errorf("reading existing passwords: %+v", err) } @@ -414,7 +414,7 @@ func (r ContainerRegistryTokenPasswordResource) generatePassword(ctx context.Con }, }, } - if err := clients.ContainerRegistryClient_v2021_08_01_preview.Tokens.UpdateThenPoll(ctx, id, param); err != nil { + if err := clients.ContainerRegistryClient_v2023_06_01_preview.Tokens.UpdateThenPoll(ctx, id, param); err != nil { return nil, fmt.Errorf("deleting %s: %+v", id, err) } } @@ -454,7 +454,7 @@ PasswordGenLoop: registryId := registries.NewRegistryID(id.SubscriptionId, id.ResourceGroupName, id.RegistryName) - result, err := clients.ContainerRegistryClient_v2021_08_01_preview.Registries.GenerateCredentials(ctx, registryId, param) + result, err := clients.ContainerRegistryClient_v2023_06_01_preview.Registries.GenerateCredentials(ctx, registryId, param) if err != nil { return nil, fmt.Errorf("generating password credential %s: %v", string(*password.Name), err) } diff --git a/internal/services/containers/container_registry_token_password_resource_test.go b/internal/services/containers/container_registry_token_password_resource_test.go index de2e1e496cf5d..ada6356815b5b 100644 --- a/internal/services/containers/container_registry_token_password_resource_test.go +++ b/internal/services/containers/container_registry_token_password_resource_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -120,7 +120,7 @@ func TestAccContainerRegistryTokenPassword_requiresImport(t *testing.T) { } func (r ContainerRegistryTokenPasswordResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - client := clients.Containers.ContainerRegistryClient_v2021_08_01_preview.Tokens + client := clients.Containers.ContainerRegistryClient_v2023_06_01_preview.Tokens id, err := parse.ContainerRegistryTokenPasswordID(state.ID) if err != nil { diff --git a/internal/services/containers/container_registry_token_resource.go b/internal/services/containers/container_registry_token_resource.go index 688f9ab52470c..7eb5c02069df2 100644 --- a/internal/services/containers/container_registry_token_resource.go +++ b/internal/services/containers/container_registry_token_resource.go @@ -10,8 +10,8 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" @@ -73,7 +73,7 @@ func resourceContainerRegistryToken() *pluginsdk.Resource { } func resourceContainerRegistryTokenCreate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2021_08_01_preview.Tokens + client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2023_06_01_preview.Tokens subscriptionId := meta.(*clients.Client).Account.SubscriptionId ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d) defer cancel() @@ -121,7 +121,7 @@ func resourceContainerRegistryTokenCreate(d *pluginsdk.ResourceData, meta interf } func resourceContainerRegistryTokenUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2021_08_01_preview.Tokens + client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2023_06_01_preview.Tokens ctx, cancel := timeouts.ForUpdate(meta.(*clients.Client).StopContext, d) defer cancel() @@ -159,7 +159,7 @@ func resourceContainerRegistryTokenUpdate(d *pluginsdk.ResourceData, meta interf } func resourceContainerRegistryTokenRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2021_08_01_preview.Tokens + client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2023_06_01_preview.Tokens ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() @@ -203,7 +203,7 @@ func resourceContainerRegistryTokenRead(d *pluginsdk.ResourceData, meta interfac } func resourceContainerRegistryTokenDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2021_08_01_preview.Tokens + client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2023_06_01_preview.Tokens ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() diff --git a/internal/services/containers/container_registry_token_resource_test.go b/internal/services/containers/container_registry_token_resource_test.go index 966cc9b652de9..9e8cbd72ce142 100644 --- a/internal/services/containers/container_registry_token_resource_test.go +++ b/internal/services/containers/container_registry_token_resource_test.go @@ -8,7 +8,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -97,7 +97,7 @@ func (t ContainerRegistryTokenResource) Exists(ctx context.Context, clients *cli return nil, err } - resp, err := clients.Containers.ContainerRegistryClient_v2021_08_01_preview.Tokens.Get(ctx, *id) + resp, err := clients.Containers.ContainerRegistryClient_v2023_06_01_preview.Tokens.Get(ctx, *id) if err != nil { return nil, fmt.Errorf("retrieving %s: %+v", *id, err) } diff --git a/internal/services/containers/container_registry_webhook_resource.go b/internal/services/containers/container_registry_webhook_resource.go index 0bfbccfd4c153..769071f74ae9a 100644 --- a/internal/services/containers/container_registry_webhook_resource.go +++ b/internal/services/containers/container_registry_webhook_resource.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/containers/migration" @@ -118,7 +118,7 @@ func resourceContainerRegistryWebhook() *pluginsdk.Resource { } func resourceContainerRegistryWebhookCreate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2021_08_01_preview.WebHooks + client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2023_06_01_preview.WebHooks subscriptionId := meta.(*clients.Client).Account.SubscriptionId ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d) defer cancel() @@ -155,7 +155,7 @@ func resourceContainerRegistryWebhookCreate(d *pluginsdk.ResourceData, meta inte } func resourceContainerRegistryWebhookUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2021_08_01_preview.WebHooks + client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2023_06_01_preview.WebHooks ctx, cancel := timeouts.ForUpdate(meta.(*clients.Client).StopContext, d) defer cancel() @@ -179,7 +179,7 @@ func resourceContainerRegistryWebhookUpdate(d *pluginsdk.ResourceData, meta inte } func resourceContainerRegistryWebhookRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2021_08_01_preview.WebHooks + client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2023_06_01_preview.WebHooks ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() @@ -253,7 +253,7 @@ func resourceContainerRegistryWebhookRead(d *pluginsdk.ResourceData, meta interf } func resourceContainerRegistryWebhookDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2021_08_01_preview.WebHooks + client := meta.(*clients.Client).Containers.ContainerRegistryClient_v2023_06_01_preview.WebHooks ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() diff --git a/internal/services/containers/container_registry_webhook_resource_test.go b/internal/services/containers/container_registry_webhook_resource_test.go index a06de02b1986e..0dcfdd20959a2 100644 --- a/internal/services/containers/container_registry_webhook_resource_test.go +++ b/internal/services/containers/container_registry_webhook_resource_test.go @@ -8,7 +8,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -629,7 +629,7 @@ func (t ContainerRegistryWebhookResource) Exists(ctx context.Context, clients *c return nil, err } - resp, err := clients.Containers.ContainerRegistryClient_v2021_08_01_preview.WebHooks.Get(ctx, *id) + resp, err := clients.Containers.ContainerRegistryClient_v2023_06_01_preview.WebHooks.Get(ctx, *id) if err != nil { return nil, fmt.Errorf("retrieving %s: %+v", *id, err) } diff --git a/internal/services/containers/kubernetes_addons.go b/internal/services/containers/kubernetes_addons.go index 1c82df9cf75b9..3bd1c6bb3a9da 100644 --- a/internal/services/containers/kubernetes_addons.go +++ b/internal/services/containers/kubernetes_addons.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters" "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/applicationgateways" "github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/workspaces" "github.com/hashicorp/go-azure-sdk/sdk/environments" diff --git a/internal/services/containers/kubernetes_cluster_data_source.go b/internal/services/containers/kubernetes_cluster_data_source.go index f4aad1c4d2a77..3696cb2b83924 100644 --- a/internal/services/containers/kubernetes_cluster_data_source.go +++ b/internal/services/containers/kubernetes_cluster_data_source.go @@ -17,7 +17,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters" "github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/workspaces" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/features" @@ -868,13 +868,6 @@ func dataSourceKubernetesClusterRead(d *pluginsdk.ResourceData, meta interface{} return fmt.Errorf("setting `key_management_service`: %+v", err) } - if !features.FourPointOhBeta() { - customCaTrustCertList := flattenCustomCaTrustCerts(props.SecurityProfile) - if err := d.Set("custom_ca_trust_certificates_base64", customCaTrustCertList); err != nil { - return fmt.Errorf("setting `custom_ca_trust_certificates_base64`: %+v", err) - } - } - serviceMeshProfile := flattenKubernetesClusterAzureServiceMeshProfile(props.ServiceMeshProfile) if err := d.Set("service_mesh_profile", serviceMeshProfile); err != nil { return fmt.Errorf("setting `service_mesh_profile`: %+v", err) @@ -1033,26 +1026,12 @@ func flattenKubernetesClusterDataSourceStorageProfile(input *managedclusters.Man snapshotController = *input.SnapshotController.Enabled } - if !features.FourPointOhBeta() { - diskVersion := "" - if input.DiskCSIDriver != nil && input.DiskCSIDriver.Version != nil { - diskVersion = *input.DiskCSIDriver.Version - } - storageProfile = append(storageProfile, map[string]interface{}{ - "blob_driver_enabled": blobEnabled, - "disk_driver_enabled": diskEnabled, - "disk_driver_version": diskVersion, - "file_driver_enabled": fileEnabled, - "snapshot_controller_enabled": snapshotController, - }) - } else { - storageProfile = append(storageProfile, map[string]interface{}{ - "blob_driver_enabled": blobEnabled, - "disk_driver_enabled": diskEnabled, - "file_driver_enabled": fileEnabled, - "snapshot_controller_enabled": snapshotController, - }) - } + storageProfile = append(storageProfile, map[string]interface{}{ + "blob_driver_enabled": blobEnabled, + "disk_driver_enabled": diskEnabled, + "file_driver_enabled": fileEnabled, + "snapshot_controller_enabled": snapshotController, + }) } return storageProfile @@ -1582,17 +1561,3 @@ func flattenKubernetesClusterDataSourceUpgradeSettings(input *managedclusters.Ag return []interface{}{values} } - -func flattenCustomCaTrustCerts(input *managedclusters.ManagedClusterSecurityProfile) []interface{} { - if input == nil || input.CustomCATrustCertificates == nil { - return make([]interface{}, 0) - } - - customCaTrustCertInterface := make([]interface{}, len(*input.CustomCATrustCertificates)) - - for index, value := range *input.CustomCATrustCertificates { - customCaTrustCertInterface[index] = value - } - - return customCaTrustCertInterface -} diff --git a/internal/services/containers/kubernetes_cluster_network_resource_test.go b/internal/services/containers/kubernetes_cluster_network_resource_test.go index 2607ff697d100..92d4de0c88385 100644 --- a/internal/services/containers/kubernetes_cluster_network_resource_test.go +++ b/internal/services/containers/kubernetes_cluster_network_resource_test.go @@ -380,7 +380,7 @@ func TestAccKubernetesCluster_enableNodePublicIP(t *testing.T) { Config: r.enableNodePublicIPConfig(data), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("default_node_pool.0.enable_node_public_ip").HasValue("true"), + check.That(data.ResourceName).Key("default_node_pool.0.node_public_ip_enabled").HasValue("true"), ), }, data.ImportStep(), @@ -412,7 +412,7 @@ func TestAccKubernetesCluster_nodePublicIPPrefix(t *testing.T) { Config: r.nodePublicIPPrefixConfig(data), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("default_node_pool.0.enable_node_public_ip").HasValue("true"), + check.That(data.ResourceName).Key("default_node_pool.0.node_public_ip_enabled").HasValue("true"), check.That(data.ResourceName).Key("default_node_pool.0.node_public_ip_prefix_id").Exists(), ), }, @@ -1966,10 +1966,10 @@ resource "azurerm_kubernetes_cluster" "test" { dns_prefix = "acctestaks%d" default_node_pool { - name = "default" - node_count = 1 - vm_size = "Standard_DS2_v2" - enable_node_public_ip = true + name = "default" + node_count = 1 + vm_size = "Standard_DS2_v2" + node_public_ip_enabled = true upgrade_settings { max_surge = "10%%" } @@ -2067,7 +2067,7 @@ resource "azurerm_kubernetes_cluster" "test" { name = "default" node_count = 1 vm_size = "Standard_DS2_v2" - enable_node_public_ip = true + node_public_ip_enabled = true node_public_ip_prefix_id = azurerm_public_ip_prefix.test.id upgrade_settings { max_surge = "10%%" @@ -4384,10 +4384,10 @@ resource "azurerm_kubernetes_cluster" "test" { resource_group_name = azurerm_resource_group.test.name dns_prefix = "acctestaks%[2]d" default_node_pool { - name = "default" - node_count = 1 - vm_size = "Standard_DS2_v2" - enable_node_public_ip = true + name = "default" + node_count = 1 + vm_size = "Standard_DS2_v2" + node_public_ip_enabled = true node_network_profile { node_public_ip_tags = { RoutingPreference = "Internet" @@ -4427,10 +4427,10 @@ resource "azurerm_kubernetes_cluster" "test" { resource_group_name = azurerm_resource_group.test.name dns_prefix = "acctestaks%[2]d" default_node_pool { - name = "default" - node_count = 1 - vm_size = "Standard_DS2_v2" - enable_node_public_ip = true + name = "default" + node_count = 1 + vm_size = "Standard_DS2_v2" + node_public_ip_enabled = true node_network_profile { allowed_host_ports { port_start = 8001 diff --git a/internal/services/containers/kubernetes_cluster_node_pool_data_source.go b/internal/services/containers/kubernetes_cluster_node_pool_data_source.go index 8ab961cc19d4c..cb8708c568568 100644 --- a/internal/services/containers/kubernetes_cluster_node_pool_data_source.go +++ b/internal/services/containers/kubernetes_cluster_node_pool_data_source.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/services/containers/validate" diff --git a/internal/services/containers/kubernetes_cluster_node_pool_resource.go b/internal/services/containers/kubernetes_cluster_node_pool_resource.go index c37594fcef88e..2d7338158ea7d 100644 --- a/internal/services/containers/kubernetes_cluster_node_pool_resource.go +++ b/internal/services/containers/kubernetes_cluster_node_pool_resource.go @@ -5,7 +5,6 @@ package containers import ( "context" - "encoding/base64" "fmt" "log" "regexp" @@ -20,14 +19,13 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/capacityreservationgroups" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/proximityplacementgroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots" "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/subnets" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" computeValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/services/containers/migration" @@ -219,15 +217,10 @@ func resourceKubernetesClusterNodePoolSchema() map[string]*pluginsdk.Schema { }, "node_public_ip_prefix_id": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - RequiredWith: func() []string { - if !features.FourPointOh() { - return []string{"enable_node_public_ip"} - } - return []string{"node_public_ip_enabled"} - }(), + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + RequiredWith: []string{"node_public_ip_enabled"}, }, // Node Taints control the behaviour of the Node Pool, as such they should not be computed and @@ -401,63 +394,6 @@ func resourceKubernetesClusterNodePoolSchema() map[string]*pluginsdk.Schema { }, } - if !features.FourPointOhBeta() { - s["message_of_the_day"] = &pluginsdk.Schema{ - Deprecated: "This property is not available in the stable API and will be removed in v4.0 of the Azure Provider. Please see https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/4.0-upgrade-guide#aks-migration-to-stable-api for more details.", - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - } - - s["custom_ca_trust_enabled"] = &pluginsdk.Schema{ - Deprecated: "This property is not available in the stable API and will be removed in v4.0 of the Azure Provider. Please see https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/4.0-upgrade-guide#aks-migration-to-stable-api for more details.", - Type: pluginsdk.TypeBool, - Optional: true, - } - - s["os_sku"].ValidateFunc = validation.StringInSlice([]string{ - string(agentpools.OSSKUAzureLinux), - string(agentpools.OSSKUCBLMariner), - string(agentpools.OSSKUMariner), - string(agentpools.OSSKUUbuntu), - string(agentpools.OSSKUWindowsTwoZeroOneNine), - string(agentpools.OSSKUWindowsTwoZeroTwoTwo), - }, false) - - s["workload_runtime"].ValidateFunc = validation.StringInSlice([]string{ - string(agentpools.WorkloadRuntimeOCIContainer), - string(agentpools.WorkloadRuntimeWasmWasi), - string(agentpools.WorkloadRuntimeKataMshvVMIsolation), - }, false) - } - - if !features.FourPointOh() { - s["enable_auto_scaling"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeBool, - Optional: true, - Deprecated: features.DeprecatedInFourPointOh("The property `enable_auto_scaling` will be renamed to `auto_scaling_enabled` in v4.0 of the AzureRM Provider."), - } - - s["enable_node_public_ip"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeBool, - Optional: true, - ForceNew: true, - Deprecated: features.DeprecatedInFourPointOh("The property `enable_node_public_ip` will be renamed to `node_public_ip_enabled` in v4.0 of the AzureRM Provider."), - } - - s["enable_host_encryption"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeBool, - Optional: true, - ForceNew: true, - Deprecated: features.DeprecatedInFourPointOh("The property `enable_host_encryption` will be renamed to `host_encryption_enabled` in v4.0 of the AzureRM Provider."), - } - - delete(s, "auto_scaling_enabled") - delete(s, "node_public_ip_enabled") - delete(s, "host_encryption_enabled") - } - return s } @@ -531,18 +467,11 @@ func resourceKubernetesClusterNodePoolCreate(d *pluginsdk.ResourceData, meta int } count := d.Get("node_count").(int) - enableAutoScaling := d.Get("enable_auto_scaling").(bool) - if features.FourPointOh() { - enableAutoScaling = d.Get("auto_scaling_enabled").(bool) - } - hostEncryption := d.Get("enable_host_encryption").(bool) - if features.FourPointOh() { - hostEncryption = d.Get("host_encryption_enabled").(bool) - } - nodeIp := d.Get("enable_node_public_ip").(bool) - if features.FourPointOh() { - nodeIp = d.Get("node_public_ip_enabled").(bool) - } + + enableAutoScaling := d.Get("auto_scaling_enabled").(bool) + hostEncryption := d.Get("host_encryption_enabled").(bool) + nodeIp := d.Get("node_public_ip_enabled").(bool) + evictionPolicy := d.Get("eviction_policy").(string) mode := agentpools.AgentPoolMode(d.Get("mode").(string)) osType := d.Get("os_type").(string) @@ -570,10 +499,6 @@ func resourceKubernetesClusterNodePoolCreate(d *pluginsdk.ResourceData, meta int Count: utils.Int64(int64(count)), } - if !features.FourPointOhBeta() { - profile.EnableCustomCATrust = pointer.To(d.Get("custom_ca_trust_enabled").(bool)) - } - if gpuInstanceProfile := d.Get("gpu_instance").(string); gpuInstanceProfile != "" { profile.GpuInstanceProfile = pointer.To(agentpools.GPUInstanceProfile(gpuInstanceProfile)) } @@ -635,16 +560,6 @@ func resourceKubernetesClusterNodePoolCreate(d *pluginsdk.ResourceData, meta int profile.NodeTaints = nodeTaints } - if !features.FourPointOhBeta() { - if v := d.Get("message_of_the_day").(string); v != "" { - if profile.OsType != nil && *profile.OsType == agentpools.OSTypeWindows { - return fmt.Errorf("`message_of_the_day` cannot be specified for Windows nodes and must be a static string (i.e. will be printed raw and not executed as a script)") - } - messageOfTheDayEncoded := base64.StdEncoding.EncodeToString([]byte(v)) - profile.MessageOfTheDay = &messageOfTheDayEncoded - } - } - if osDiskSizeGB := d.Get("os_disk_size_gb").(int); osDiskSizeGB > 0 { profile.OsDiskSizeGB = utils.Int64(int64(osDiskSizeGB)) } @@ -686,20 +601,20 @@ func resourceKubernetesClusterNodePoolCreate(d *pluginsdk.ResourceData, meta int if maxCount >= 0 { profile.MaxCount = utils.Int64(int64(maxCount)) } else { - return fmt.Errorf("`max_count` must be configured when `enable_auto_scaling` is set to `true`") + return fmt.Errorf("`max_count` must be configured when `auto_scaling_enabled` is set to `true`") } if minCount >= 0 { profile.MinCount = utils.Int64(int64(minCount)) } else { - return fmt.Errorf("`min_count` must be configured when `enable_auto_scaling` is set to `true`") + return fmt.Errorf("`min_count` must be configured when `auto_scaling_enabled` is set to `true`") } if minCount > maxCount { return fmt.Errorf("`max_count` must be >= `min_count`") } } else if minCount > 0 || maxCount > 0 { - return fmt.Errorf("`max_count` and `min_count` must be set to `null` when enable_auto_scaling is set to `false`") + return fmt.Errorf("`max_count` and `min_count` must be set to `null` when auto_scaling_enabled is set to `false`") } if kubeletConfig := d.Get("kubelet_config").([]interface{}); len(kubeletConfig) > 0 { @@ -810,22 +725,9 @@ func resourceKubernetesClusterNodePoolUpdate(d *pluginsdk.ResourceData, meta int log.Printf("[DEBUG] Determining delta for existing %s..", *id) // delta patching - if features.FourPointOh() { - if d.HasChange("auto_scaling_enabled") { - enableAutoScaling = d.Get("auto_scaling_enabled").(bool) - props.EnableAutoScaling = utils.Bool(enableAutoScaling) - } - } else { - if d.HasChange("enable_auto_scaling") { - enableAutoScaling = d.Get("enable_auto_scaling").(bool) - props.EnableAutoScaling = utils.Bool(enableAutoScaling) - } - } - - if !features.FourPointOhBeta() { - if d.HasChange("custom_ca_trust_enabled") { - props.EnableCustomCATrust = utils.Bool(d.Get("custom_ca_trust_enabled").(bool)) - } + if d.HasChange("auto_scaling_enabled") { + enableAutoScaling = d.Get("auto_scaling_enabled").(bool) + props.EnableAutoScaling = utils.Bool(enableAutoScaling) } if d.HasChange("max_count") || enableAutoScaling { @@ -914,7 +816,7 @@ func resourceKubernetesClusterNodePoolUpdate(d *pluginsdk.ResourceData, meta int } if enableAutoScaling { if maxCount == 0 { - return fmt.Errorf("`max_count` must be configured when `enable_auto_scaling` is set to `true`") + return fmt.Errorf("`max_count` must be configured when `auto_scaling_enabled` is set to `true`") } if minCount > maxCount { @@ -922,7 +824,7 @@ func resourceKubernetesClusterNodePoolUpdate(d *pluginsdk.ResourceData, meta int } } else { if minCount > 0 || maxCount > 0 { - return fmt.Errorf("`max_count` and `min_count` must be set to `nil` when enable_auto_scaling is set to `false`") + return fmt.Errorf("`max_count` and `min_count` must be set to `nil` when `auto_scaling_enabled` is set to `false`") } // @tombuildsstuff: as of API version 2019-11-01 we need to explicitly nil these out @@ -984,21 +886,9 @@ func resourceKubernetesClusterNodePoolRead(d *pluginsdk.ResourceData, meta inter props := model.Properties d.Set("zones", zones.FlattenUntyped(props.AvailabilityZones)) - switch { - case features.FourPointOh(): - d.Set("auto_scaling_enabled", props.EnableAutoScaling) - d.Set("node_public_ip_enabled", props.EnableNodePublicIP) - d.Set("host_encryption_enabled", props.EnableEncryptionAtHost) - case features.FourPointOhBeta(): - d.Set("enable_auto_scaling", props.EnableAutoScaling) - d.Set("enable_node_public_ip", props.EnableNodePublicIP) - d.Set("enable_host_encryption", props.EnableEncryptionAtHost) - default: - d.Set("custom_ca_trust_enabled", props.EnableCustomCATrust) - d.Set("enable_auto_scaling", props.EnableAutoScaling) - d.Set("enable_node_public_ip", props.EnableNodePublicIP) - d.Set("enable_host_encryption", props.EnableEncryptionAtHost) - } + d.Set("auto_scaling_enabled", props.EnableAutoScaling) + d.Set("node_public_ip_enabled", props.EnableNodePublicIP) + d.Set("host_encryption_enabled", props.EnableEncryptionAtHost) d.Set("fips_enabled", props.EnableFIPS) d.Set("ultra_ssd_enabled", props.EnableUltraSSD) @@ -1048,18 +938,6 @@ func resourceKubernetesClusterNodePoolRead(d *pluginsdk.ResourceData, meta inter } d.Set("max_count", maxCount) - if !features.FourPointOhBeta() { - messageOfTheDay := "" - if props.MessageOfTheDay != nil { - messageOfTheDayDecoded, err := base64.StdEncoding.DecodeString(*props.MessageOfTheDay) - if err != nil { - return fmt.Errorf("setting `message_of_the_day`: %+v", err) - } - messageOfTheDay = string(messageOfTheDayDecoded) - } - d.Set("message_of_the_day", messageOfTheDay) - } - maxPods := 0 if props.MaxPods != nil { maxPods = int(*props.MaxPods) @@ -1167,7 +1045,7 @@ func resourceKubernetesClusterNodePoolDelete(d *pluginsdk.ResourceData, meta int return err } - err = client.DeleteThenPoll(ctx, *id, agentpools.DefaultDeleteOperationOptions()) + err = client.DeleteThenPoll(ctx, *id) if err != nil { return fmt.Errorf("deleting %s: %+v", *id, err) } diff --git a/internal/services/containers/kubernetes_cluster_node_pool_resource_test.go b/internal/services/containers/kubernetes_cluster_node_pool_resource_test.go index 278c2ee69ea1e..38cacc41258ac 100644 --- a/internal/services/containers/kubernetes_cluster_node_pool_resource_test.go +++ b/internal/services/containers/kubernetes_cluster_node_pool_resource_test.go @@ -13,8 +13,8 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" @@ -576,7 +576,7 @@ func TestAccKubernetesClusterNodePool_upgradeSettings(t *testing.T) { }, data.ImportStep(), { - Config: r.upgradeSettings(data, 1, 0), + Config: r.upgradeSettings(data, 5, 0), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), ), @@ -727,7 +727,7 @@ func TestAccKubernetesClusterNodePool_hostEncryption(t *testing.T) { Config: r.hostEncryption(data), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("enable_host_encryption").HasValue("true"), + check.That(data.ResourceName).Key("host_encryption_enabled").HasValue("true"), ), }, }) @@ -1242,7 +1242,7 @@ resource "azurerm_kubernetes_cluster_node_pool" "test" { name = "internal" kubernetes_cluster_id = azurerm_kubernetes_cluster.test.id vm_size = "Standard_DS2_v2" - enable_auto_scaling = true + auto_scaling_enabled = true min_count = 1 max_count = 3 } @@ -1261,7 +1261,7 @@ resource "azurerm_kubernetes_cluster_node_pool" "test" { name = "internal" kubernetes_cluster_id = azurerm_kubernetes_cluster.test.id vm_size = "Standard_DS2_v2" - enable_auto_scaling = true + auto_scaling_enabled = true min_count = %d max_count = %d } @@ -1793,7 +1793,7 @@ resource "azurerm_kubernetes_cluster_node_pool" "autoscale" { name = "autoscale" kubernetes_cluster_id = azurerm_kubernetes_cluster.test.id vm_size = "Standard_DS2_v2" - enable_auto_scaling = true + auto_scaling_enabled = true min_count = 1 max_count = 3 } @@ -1877,7 +1877,7 @@ resource "azurerm_kubernetes_cluster_node_pool" "test" { kubernetes_cluster_id = azurerm_kubernetes_cluster.test.id vm_size = "Standard_DS2_v2" node_count = 1 - enable_node_public_ip = true + node_public_ip_enabled = true node_public_ip_prefix_id = azurerm_public_ip_prefix.test.id } `, r.templateConfig(data), data.RandomInteger) @@ -2107,7 +2107,7 @@ resource "azurerm_kubernetes_cluster_node_pool" "test" { name = "internal" kubernetes_cluster_id = azurerm_kubernetes_cluster.test.id vm_size = "Standard_DS2_v2" - enable_auto_scaling = true + auto_scaling_enabled = true min_count = 1 max_count = 3 vnet_subnet_id = azurerm_subnet.test.id @@ -2374,7 +2374,7 @@ resource "azurerm_kubernetes_cluster_node_pool" "test" { name = "internal" kubernetes_cluster_id = azurerm_kubernetes_cluster.test.id vm_size = "Standard_DS2_v2" - enable_auto_scaling = true + auto_scaling_enabled = true min_count = 0 max_count = 3 node_count = 0 @@ -2391,11 +2391,11 @@ provider "azurerm" { %s resource "azurerm_kubernetes_cluster_node_pool" "test" { - name = "internal" - kubernetes_cluster_id = azurerm_kubernetes_cluster.test.id - vm_size = "Standard_DS2_v2" - enable_host_encryption = true - node_count = 1 + name = "internal" + kubernetes_cluster_id = azurerm_kubernetes_cluster.test.id + vm_size = "Standard_DS2_v2" + host_encryption_enabled = true + node_count = 1 } `, r.templateConfig(data)) } @@ -2412,7 +2412,7 @@ resource "azurerm_kubernetes_cluster_node_pool" "test" { name = "internal" kubernetes_cluster_id = azurerm_kubernetes_cluster.test.id vm_size = "Standard_DS2_v2" - enable_auto_scaling = true + auto_scaling_enabled = true min_count = 1 max_count = 399 node_count = 1 @@ -2432,7 +2432,7 @@ resource "azurerm_kubernetes_cluster_node_pool" "test" { name = "internal" kubernetes_cluster_id = azurerm_kubernetes_cluster.test.id vm_size = "Standard_DS2_v2" - enable_auto_scaling = true + auto_scaling_enabled = true min_count = 1 max_count = 1 node_count = 1 @@ -2636,7 +2636,7 @@ resource "azurerm_kubernetes_cluster_node_pool" "test" { name = "internal" kubernetes_cluster_id = azurerm_kubernetes_cluster.test.id vm_size = "Standard_DS2_v2" - enable_auto_scaling = %t + auto_scaling_enabled = %t min_count = %d max_count = %d } @@ -2830,10 +2830,10 @@ resource "azurerm_kubernetes_cluster" "test" { } resource "azurerm_kubernetes_cluster_node_pool" "test" { - name = "internal" - kubernetes_cluster_id = azurerm_kubernetes_cluster.test.id - vm_size = "Standard_D2s_v3" - enable_node_public_ip = true + name = "internal" + kubernetes_cluster_id = azurerm_kubernetes_cluster.test.id + vm_size = "Standard_D2s_v3" + node_public_ip_enabled = true node_network_profile { node_public_ip_tags = { RoutingPreference = "Internet" @@ -2879,10 +2879,10 @@ resource "azurerm_kubernetes_cluster" "test" { } resource "azurerm_kubernetes_cluster_node_pool" "test" { - name = "internal" - kubernetes_cluster_id = azurerm_kubernetes_cluster.test.id - vm_size = "Standard_D2s_v3" - enable_node_public_ip = true + name = "internal" + kubernetes_cluster_id = azurerm_kubernetes_cluster.test.id + vm_size = "Standard_D2s_v3" + node_public_ip_enabled = true node_network_profile { allowed_host_ports { port_start = 8001 diff --git a/internal/services/containers/kubernetes_cluster_other_resource_test.go b/internal/services/containers/kubernetes_cluster_other_resource_test.go index 1c0825a79c58b..b17a285b69d8b 100644 --- a/internal/services/containers/kubernetes_cluster_other_resource_test.go +++ b/internal/services/containers/kubernetes_cluster_other_resource_test.go @@ -11,8 +11,8 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" @@ -185,6 +185,9 @@ func TestAccKubernetesCluster_linuxProfile(t *testing.T) { } func TestAccKubernetesCluster_linuxProfileUpdateSshKey(t *testing.T) { + if features.FourPointOhBeta() { + t.Skip("Skipping this test in 4.0 beta as it is not supported after switching to stable API") + } data := acceptance.BuildTestData(t, "azurerm_kubernetes_cluster", "test") r := KubernetesClusterResource{} @@ -1346,12 +1349,12 @@ resource "azurerm_kubernetes_cluster" "test" { dns_prefix = "acctestaks%d" default_node_pool { - name = "default" - node_count = 1 - enable_auto_scaling = true - vm_size = "Standard_DS2_v2" - min_count = 1 - max_count = 1 + name = "default" + node_count = 1 + auto_scaling_enabled = true + vm_size = "Standard_DS2_v2" + min_count = 1 + max_count = 1 upgrade_settings { max_surge = "10%%" } @@ -1382,12 +1385,12 @@ resource "azurerm_kubernetes_cluster" "test" { dns_prefix = "acctestaks%d" default_node_pool { - name = "default" - node_count = 2 - vm_size = "Standard_DS2_v2" - enable_auto_scaling = true - max_count = 10 - min_count = 1 + name = "default" + node_count = 2 + vm_size = "Standard_DS2_v2" + auto_scaling_enabled = true + max_count = 10 + min_count = 1 upgrade_settings { max_surge = "10%%" } @@ -1418,12 +1421,12 @@ resource "azurerm_kubernetes_cluster" "test" { dns_prefix = "acctestaks%d" default_node_pool { - name = "default" - node_count = 1 - vm_size = "Standard_DS2_v2" - enable_auto_scaling = true - max_count = 10 - min_count = 1 + name = "default" + node_count = 1 + vm_size = "Standard_DS2_v2" + auto_scaling_enabled = true + max_count = 10 + min_count = 1 upgrade_settings { max_surge = "10%%" } @@ -1454,12 +1457,12 @@ resource "azurerm_kubernetes_cluster" "test" { dns_prefix = "acctestaks%d" default_node_pool { - name = "default" - node_count = 11 - vm_size = "Standard_DS2_v2" - enable_auto_scaling = true - max_count = 10 - min_count = 1 + name = "default" + node_count = 11 + vm_size = "Standard_DS2_v2" + auto_scaling_enabled = true + max_count = 10 + min_count = 1 upgrade_settings { max_surge = "10%%" } @@ -1490,12 +1493,12 @@ resource "azurerm_kubernetes_cluster" "test" { dns_prefix = "acctestAKS%d" default_node_pool { - name = "default" - vm_size = "Standard_DS2_v2" - enable_auto_scaling = true - min_count = 1 - max_count = 399 - node_count = 1 + name = "default" + vm_size = "Standard_DS2_v2" + auto_scaling_enabled = true + min_count = 1 + max_count = 399 + node_count = 1 upgrade_settings { max_surge = "10%%" } @@ -1526,12 +1529,12 @@ resource "azurerm_kubernetes_cluster" "test" { dns_prefix = "acctestaks%d" default_node_pool { - name = "default" - node_count = 1 - vm_size = "Standard_DS2_v2" - enable_auto_scaling = true - max_count = 10 - min_count = 2 + name = "default" + node_count = 1 + vm_size = "Standard_DS2_v2" + auto_scaling_enabled = true + max_count = 10 + min_count = 2 upgrade_settings { max_surge = "10%%" } diff --git a/internal/services/containers/kubernetes_cluster_resource.go b/internal/services/containers/kubernetes_cluster_resource.go index ddbf84a8b64c0..c2d75539f0596 100644 --- a/internal/services/containers/kubernetes_cluster_resource.go +++ b/internal/services/containers/kubernetes_cluster_resource.go @@ -20,9 +20,9 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters" dnsValidate "github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01/zones" "github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/workspaces" "github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/privatezones" @@ -617,6 +617,7 @@ func resourceKubernetesCluster() *pluginsdk.Resource { "key_data": { Type: pluginsdk.TypeString, Required: true, + ForceNew: true, ValidateFunc: validation.StringIsNotEmpty, }, }, @@ -1978,12 +1979,6 @@ func resourceKubernetesClusterCreate(d *pluginsdk.ResourceData, meta interface{} autoUpgradeProfile.NodeOSUpgradeChannel = pointer.To(managedclusters.NodeOSUpgradeChannel(nodeOsChannelUpgrade)) } - if !features.FourPointOhBeta() { - if customCaTrustCertListRaw := d.Get("custom_ca_trust_certificates_base64").([]interface{}); len(customCaTrustCertListRaw) > 0 { - securityProfile.CustomCATrustCertificates = convertCustomCaTrustCertsInput(customCaTrustCertListRaw) - } - } - parameters := managedclusters.ManagedCluster{ ExtendedLocation: expandEdgeZone(d.Get("edge_zone").(string)), Location: location, @@ -2535,12 +2530,6 @@ func resourceKubernetesClusterUpdate(d *pluginsdk.ResourceData, meta interface{} existing.Model.Properties.SecurityProfile.AzureKeyVaultKms = azureKeyVaultKms } - if !features.FourPointOhBeta() && d.HasChanges("custom_ca_trust_certificates_base64") { - updateCluster = true - customCaTrustCertListRaw := d.Get("custom_ca_trust_certificates_base64").([]interface{}) - existing.Model.Properties.SecurityProfile.CustomCATrustCertificates = convertCustomCaTrustCertsInput(customCaTrustCertListRaw) - } - if d.HasChanges("microsoft_defender") { updateCluster = true microsoftDefenderRaw := d.Get("microsoft_defender").([]interface{}) @@ -2743,10 +2732,9 @@ func resourceKubernetesClusterUpdate(d *pluginsdk.ResourceData, meta interface{} } } - deleteOpts := agentpools.DeleteOperationOptions{} // delete the old default node pool if it exists if defaultExisting.Model != nil { - if err := nodePoolsClient.DeleteThenPoll(ctx, defaultNodePoolId, deleteOpts); err != nil { + if err := nodePoolsClient.DeleteThenPoll(ctx, defaultNodePoolId); err != nil { return fmt.Errorf("deleting default %s: %+v", defaultNodePoolId, err) } } @@ -2759,7 +2747,7 @@ func resourceKubernetesClusterUpdate(d *pluginsdk.ResourceData, meta interface{} return fmt.Errorf("creating default %s: %+v", defaultNodePoolId, err) } - if err := nodePoolsClient.DeleteThenPoll(ctx, tempNodePoolId, deleteOpts); err != nil { + if err := nodePoolsClient.DeleteThenPoll(ctx, tempNodePoolId); err != nil { return fmt.Errorf("deleting temporary %s: %+v", tempNodePoolId, err) } @@ -2942,11 +2930,6 @@ func resourceKubernetesClusterRead(d *pluginsdk.ResourceData, meta interface{}) d.Set("node_os_upgrade_channel", nodeOSUpgradeChannel) } - if !features.FourPointOhBeta() { - customCaTrustCertList := flattenCustomCaTrustCerts(props.SecurityProfile) - d.Set("custom_ca_trust_certificates_base64", customCaTrustCertList) - } - enablePrivateCluster := false enablePrivateClusterPublicFQDN := false runCommandEnabled := true @@ -3205,10 +3188,7 @@ func resourceKubernetesClusterDelete(d *pluginsdk.ResourceData, meta interface{} } } - ignorePodDisruptionBudget := true - err = client.DeleteThenPoll(ctx, *id, managedclusters.DeleteOperationOptions{ - IgnorePodDisruptionBudget: &ignorePodDisruptionBudget, - }) + err = client.DeleteThenPoll(ctx, *id) if err != nil { return fmt.Errorf("deleting %s: %+v", *id, err) } @@ -3370,12 +3350,11 @@ func expandKubernetesClusterAPIAccessProfile(d *pluginsdk.ResourceData) *managed } apiServerAccessProfileRaw := d.Get("api_server_access_profile").([]interface{}) - if len(apiServerAccessProfileRaw) == 0 { + if len(apiServerAccessProfileRaw) == 0 || apiServerAccessProfileRaw[0] == nil { return apiAccessProfile } config := apiServerAccessProfileRaw[0].(map[string]interface{}) - if v := config["authorized_ip_ranges"]; v != nil { apiServerAuthorizedIPRangesRaw := v.(*pluginsdk.Set).List() if apiServerAuthorizedIPRanges := utils.ExpandStringSlice(apiServerAuthorizedIPRangesRaw); len(*apiServerAuthorizedIPRanges) > 0 { @@ -3383,58 +3362,16 @@ func expandKubernetesClusterAPIAccessProfile(d *pluginsdk.ResourceData) *managed } } - if !features.FourPointOhBeta() { - enableVnetIntegration := false - if v := config["vnet_integration_enabled"]; v != nil { - enableVnetIntegration = v.(bool) - } - apiAccessProfile.EnableVnetIntegration = utils.Bool(enableVnetIntegration) - - subnetId := "" - if v := config["subnet_id"]; v != nil { - subnetId = v.(string) - } - apiAccessProfile.SubnetId = utils.String(subnetId) - } - return apiAccessProfile } func flattenKubernetesClusterAPIAccessProfile(profile *managedclusters.ManagedClusterAPIServerAccessProfile) []interface{} { - // some properties in this block are exposed within the `api_server_access_profile` block and others are exposed as - // top level properties which causes strange diffs depending on what is being set, so this also needs to check - // whether the properties in the block are returned or nil - if !features.FourPointOhBeta() { - if profile == nil || (profile.AuthorizedIPRanges == nil && profile.SubnetId == nil && profile.EnableVnetIntegration == nil) { - return []interface{}{} - } - } else { - if profile == nil || profile.AuthorizedIPRanges == nil { - return []interface{}{} - } + if profile == nil || profile.AuthorizedIPRanges == nil { + return []interface{}{} } apiServerAuthorizedIPRanges := utils.FlattenStringSlice(profile.AuthorizedIPRanges) - if !features.FourPointOhBeta() { - enableVnetIntegration := false - if profile.EnableVnetIntegration != nil { - enableVnetIntegration = *profile.EnableVnetIntegration - } - subnetId := "" - if profile.SubnetId != nil && *profile.SubnetId != "" { - subnetId = *profile.SubnetId - } - - return []interface{}{ - map[string]interface{}{ - "authorized_ip_ranges": apiServerAuthorizedIPRanges, - "subnet_id": subnetId, - "vnet_integration_enabled": enableVnetIntegration, - }, - } - } - return []interface{}{ map[string]interface{}{ "authorized_ip_ranges": apiServerAuthorizedIPRanges, @@ -4795,10 +4732,6 @@ func expandStorageProfile(input []interface{}) *managedclusters.ManagedClusterSt }, } - if !features.FourPointOhBeta() { - profile.DiskCSIDriver.Version = utils.String(raw["disk_driver_version"].(string)) - } - return &profile } @@ -5119,18 +5052,3 @@ func retrySystemNodePoolCreation(ctx context.Context, client *agentpools.AgentPo return err } - -func convertCustomCaTrustCertsInput(input []interface{}) *[]string { - if len(input) == 0 { - return nil - } - - customCaTrustCertList := make([]string, 0) - - for _, value := range input { - customCaTrustCertList = append(customCaTrustCertList, value.(string)) - } - - return &customCaTrustCertList - -} diff --git a/internal/services/containers/kubernetes_cluster_resource_test.go b/internal/services/containers/kubernetes_cluster_resource_test.go index 294f0182522f8..123957b70143f 100644 --- a/internal/services/containers/kubernetes_cluster_resource_test.go +++ b/internal/services/containers/kubernetes_cluster_resource_test.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -38,7 +38,7 @@ func TestAccKubernetesCluster_hostEncryption(t *testing.T) { Config: r.hostEncryption(data, currentKubernetesVersion), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("default_node_pool.0.enable_host_encryption").HasValue("true"), + check.That(data.ResourceName).Key("default_node_pool.0.host_encryption_enabled").HasValue("true"), ), }, }) @@ -319,10 +319,10 @@ resource "azurerm_kubernetes_cluster" "test" { kubernetes_version = %q default_node_pool { - name = "default" - node_count = 1 - vm_size = "Standard_DS2_v2" - enable_host_encryption = true + name = "default" + node_count = 1 + vm_size = "Standard_DS2_v2" + host_encryption_enabled = true upgrade_settings { max_surge = "10%%" } @@ -438,10 +438,9 @@ resource "azurerm_subnet_nat_gateway_association" "node" { } resource "azurerm_route_table" "test" { - name = "test" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - disable_bgp_route_propagation = false + name = "test" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name route { name = "internal" address_prefix = tolist(azurerm_virtual_network.test.address_space)[0] diff --git a/internal/services/containers/kubernetes_cluster_resource_upgrade_test.go b/internal/services/containers/kubernetes_cluster_resource_upgrade_test.go index 413df6ad9f7e2..0c53d77abb9dc 100644 --- a/internal/services/containers/kubernetes_cluster_resource_upgrade_test.go +++ b/internal/services/containers/kubernetes_cluster_resource_upgrade_test.go @@ -286,7 +286,7 @@ func TestAccKubernetesCluster_upgradeSettings(t *testing.T) { }, data.ImportStep(), { - Config: r.upgradeSettings(data, 1, 0), + Config: r.upgradeSettings(data, 5, 0), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), ), @@ -455,11 +455,11 @@ resource "azurerm_kubernetes_cluster" "test" { kubernetes_version = %q default_node_pool { - name = "default" - vm_size = "Standard_DS2_v2" - enable_auto_scaling = true - min_count = %d - max_count = %d + name = "default" + vm_size = "Standard_DS2_v2" + auto_scaling_enabled = true + min_count = %d + max_count = %d upgrade_settings { max_surge = "10%%" } diff --git a/internal/services/containers/kubernetes_cluster_scaling_resource_test.go b/internal/services/containers/kubernetes_cluster_scaling_resource_test.go index 30431dfd70ce6..b71006154fd0f 100644 --- a/internal/services/containers/kubernetes_cluster_scaling_resource_test.go +++ b/internal/services/containers/kubernetes_cluster_scaling_resource_test.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" @@ -144,12 +144,7 @@ func TestAccKubernetesCluster_updateVmSizeAfterFailureWithTempWithoutDefault(t * return fmt.Errorf("creating %s: %+v", tempNodePoolId, err) } - ignorePodDisruptionBudget := true - deleteOpts := agentpools.DeleteOperationOptions{ - IgnorePodDisruptionBudget: &ignorePodDisruptionBudget, - } - - if err := client.DeleteThenPoll(ctx, defaultNodePoolId, deleteOpts); err != nil { + if err := client.DeleteThenPoll(ctx, defaultNodePoolId); err != nil { return fmt.Errorf("deleting default %s: %+v", defaultNodePoolId, err) } @@ -309,7 +304,7 @@ func TestAccKubernetesCluster_autoScalingError(t *testing.T) { Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), ), - ExpectError: regexp.MustCompile("cannot change `node_count` when `enable_auto_scaling` is set to `true`"), + ExpectError: regexp.MustCompile("cannot change `node_count` when `auto_scaling_enabled` is set to `true`"), }, }) } @@ -324,7 +319,7 @@ func TestAccKubernetesCluster_autoScalingErrorMax(t *testing.T) { Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), ), - ExpectError: regexp.MustCompile("`node_count`\\(11\\) must be equal to or less than `max_count`\\(10\\) when `enable_auto_scaling` is set to `true`"), + ExpectError: regexp.MustCompile("`node_count`\\(11\\) must be equal to or less than `max_count`\\(10\\) when `auto_scaling_enabled` is set to `true`"), }, }) } @@ -354,7 +349,7 @@ func TestAccKubernetesCluster_autoScalingErrorMin(t *testing.T) { Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), ), - ExpectError: regexp.MustCompile("`node_count`\\(1\\) must be equal to or greater than `min_count`\\(2\\) when `enable_auto_scaling` is set to `true`"), + ExpectError: regexp.MustCompile("`node_count`\\(1\\) must be equal to or greater than `min_count`\\(2\\) when `auto_scaling_enabled` is set to `true`"), }, }) } @@ -370,7 +365,7 @@ func TestAccKubernetesCluster_autoScalingNodeCountUnset(t *testing.T) { check.That(data.ResourceName).ExistsInAzure(r), check.That(data.ResourceName).Key("default_node_pool.0.min_count").HasValue("2"), check.That(data.ResourceName).Key("default_node_pool.0.max_count").HasValue("4"), - check.That(data.ResourceName).Key("default_node_pool.0.enable_auto_scaling").HasValue("true"), + check.That(data.ResourceName).Key("default_node_pool.0.auto_scaling_enabled").HasValue("true"), check.That(data.ResourceName).Key("auto_scaler_profile.0.max_graceful_termination_sec").HasValue("600"), check.That(data.ResourceName).Key("auto_scaler_profile.0.new_pod_scale_up_delay").HasValue("0s"), check.That(data.ResourceName).Key("auto_scaler_profile.0.scale_down_delay_after_add").HasValue("10m"), @@ -398,7 +393,7 @@ func TestAccKubernetesCluster_autoScalingNoAvailabilityZones(t *testing.T) { check.That(data.ResourceName).Key("default_node_pool.0.type").HasValue("VirtualMachineScaleSets"), check.That(data.ResourceName).Key("default_node_pool.0.min_count").HasValue("1"), check.That(data.ResourceName).Key("default_node_pool.0.max_count").HasValue("2"), - check.That(data.ResourceName).Key("default_node_pool.0.enable_auto_scaling").HasValue("true"), + check.That(data.ResourceName).Key("default_node_pool.0.auto_scaling_enabled").HasValue("true"), ), }, data.ImportStep(), @@ -429,7 +424,7 @@ func TestAccKubernetesCluster_autoScalingProfile(t *testing.T) { Config: r.autoScalingProfileConfigMinimal(data), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("default_node_pool.0.enable_auto_scaling").HasValue("true"), + check.That(data.ResourceName).Key("default_node_pool.0.auto_scaling_enabled").HasValue("true"), check.That(data.ResourceName).Key("auto_scaler_profile.0.expander").HasValue("random"), ), }, @@ -438,7 +433,7 @@ func TestAccKubernetesCluster_autoScalingProfile(t *testing.T) { Config: r.autoScalingProfileConfigComplete(data), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("default_node_pool.0.enable_auto_scaling").HasValue("true"), + check.That(data.ResourceName).Key("default_node_pool.0.auto_scaling_enabled").HasValue("true"), check.That(data.ResourceName).Key("auto_scaler_profile.0.expander").HasValue("least-waste"), check.That(data.ResourceName).Key("auto_scaler_profile.0.max_graceful_termination_sec").HasValue("15"), check.That(data.ResourceName).Key("auto_scaler_profile.0.max_node_provisioning_time").HasValue("10m"), @@ -517,10 +512,10 @@ resource "azurerm_kubernetes_cluster" "test" { dns_prefix = "acctestaks%d" default_node_pool { - name = "default" - node_count = 1 - vm_size = "Standard_DS2_v2" - enable_host_encryption = true + name = "default" + node_count = 1 + vm_size = "Standard_DS2_v2" + host_encryption_enabled = true upgrade_settings { max_surge = "10%%" } @@ -637,7 +632,7 @@ resource "azurerm_kubernetes_cluster" "test" { temporary_name_for_rotation = "temp" node_count = 1 vm_size = "%s" - enable_host_encryption = false + host_encryption_enabled = false upgrade_settings { max_surge = "10%%" } @@ -678,7 +673,7 @@ resource "azurerm_kubernetes_cluster" "test" { node_count = 1 vm_size = "%s" zones = %s - enable_node_public_ip = true + node_public_ip_enabled = true max_pods = 60 only_critical_addons_enabled = true @@ -730,7 +725,7 @@ resource "azurerm_kubernetes_cluster" "test" { temporary_name_for_rotation = "temp" node_count = 1 vm_size = "Standard_D2ads_v5" - enable_node_public_ip = true + node_public_ip_enabled = true max_pods = 60 only_critical_addons_enabled = true @@ -979,11 +974,11 @@ resource "azurerm_kubernetes_cluster" "test" { dns_prefix = "acctestaks%d" default_node_pool { - name = "default" - enable_auto_scaling = true - min_count = 2 - max_count = 4 - vm_size = "Standard_DS2_v2" + name = "default" + auto_scaling_enabled = true + min_count = 2 + max_count = 4 + vm_size = "Standard_DS2_v2" upgrade_settings { max_surge = "10%%" } @@ -1014,11 +1009,11 @@ resource "azurerm_kubernetes_cluster" "test" { dns_prefix = "acctestaks%d" default_node_pool { - name = "pool1" - min_count = 1 - max_count = 2 - enable_auto_scaling = true - vm_size = "Standard_DS2_v2" + name = "pool1" + min_count = 1 + max_count = 2 + auto_scaling_enabled = true + vm_size = "Standard_DS2_v2" upgrade_settings { max_surge = "10%%" } @@ -1050,12 +1045,12 @@ resource "azurerm_kubernetes_cluster" "test" { kubernetes_version = "%s" default_node_pool { - name = "pool1" - min_count = 1 - max_count = 2 - enable_auto_scaling = true - vm_size = "Standard_DS2_v2" - zones = ["1", "2"] + name = "pool1" + min_count = 1 + max_count = 2 + auto_scaling_enabled = true + vm_size = "Standard_DS2_v2" + zones = ["1", "2"] upgrade_settings { max_surge = "10%%" } @@ -1091,11 +1086,11 @@ resource "azurerm_kubernetes_cluster" "test" { kubernetes_version = "%s" default_node_pool { - name = "default" - enable_auto_scaling = true - min_count = 2 - max_count = 4 - vm_size = "Standard_DS2_v2" + name = "default" + auto_scaling_enabled = true + min_count = 2 + max_count = 4 + vm_size = "Standard_DS2_v2" upgrade_settings { max_surge = "10%%" } @@ -1131,11 +1126,11 @@ resource "azurerm_kubernetes_cluster" "test" { kubernetes_version = "%s" default_node_pool { - name = "default" - enable_auto_scaling = true - min_count = 2 - max_count = 4 - vm_size = "Standard_DS2_v2" + name = "default" + auto_scaling_enabled = true + min_count = 2 + max_count = 4 + vm_size = "Standard_DS2_v2" upgrade_settings { max_surge = "10%%" } diff --git a/internal/services/containers/kubernetes_cluster_validate.go b/internal/services/containers/kubernetes_cluster_validate.go index c89a6aa38224f..b65a5682bbe60 100644 --- a/internal/services/containers/kubernetes_cluster_validate.go +++ b/internal/services/containers/kubernetes_cluster_validate.go @@ -12,8 +12,8 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters" "github.com/hashicorp/terraform-provider-azurerm/internal/services/containers/client" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" ) diff --git a/internal/services/containers/kubernetes_node_pool_snapshot_data_source.go b/internal/services/containers/kubernetes_node_pool_snapshot_data_source.go index 5508043697f39..c84977df2dd8e 100644 --- a/internal/services/containers/kubernetes_node_pool_snapshot_data_source.go +++ b/internal/services/containers/kubernetes_node_pool_snapshot_data_source.go @@ -11,8 +11,8 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tags" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/internal/services/containers/kubernetes_node_pool_snapshot_data_source_test.go b/internal/services/containers/kubernetes_node_pool_snapshot_data_source_test.go index 11bd2277fe698..fc4c5577ce895 100644 --- a/internal/services/containers/kubernetes_node_pool_snapshot_data_source_test.go +++ b/internal/services/containers/kubernetes_node_pool_snapshot_data_source_test.go @@ -9,8 +9,8 @@ import ( "testing" "time" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" diff --git a/internal/services/containers/kubernetes_nodepool.go b/internal/services/containers/kubernetes_nodepool.go index 038374d35da7f..beee8363b9344 100644 --- a/internal/services/containers/kubernetes_nodepool.go +++ b/internal/services/containers/kubernetes_nodepool.go @@ -4,7 +4,6 @@ package containers import ( - "encoding/base64" "fmt" "regexp" "strconv" @@ -17,9 +16,9 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/capacityreservationgroups" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/proximityplacementgroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots" "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/applicationsecuritygroups" "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/publicipprefixes" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" @@ -38,7 +37,7 @@ func SchemaDefaultNodePool() *pluginsdk.Schema { MaxItems: 1, Elem: &pluginsdk.Resource{ Schema: func() map[string]*pluginsdk.Schema { - s := map[string]*pluginsdk.Schema{ + return map[string]*pluginsdk.Schema{ // Required and conditionally ForceNew: updating `name` back to name when it's been set to the value // of `temporary_name_for_rotation` during the resizing of the default node pool should be allowed and // not force cluster recreation @@ -153,12 +152,7 @@ func SchemaDefaultNodePool() *pluginsdk.Schema { Optional: true, ForceNew: true, ValidateFunc: publicipprefixes.ValidatePublicIPPrefixID, - RequiredWith: func() []string { - if !features.FourPointOh() { - return []string{"default_node_pool.0.enable_node_public_ip"} - } - return []string{"default_node_pool.0.node_public_ip_enabled"} - }(), + RequiredWith: []string{"default_node_pool.0.node_public_ip_enabled"}, }, "tags": commonschema.Tags(), @@ -276,83 +270,13 @@ func SchemaDefaultNodePool() *pluginsdk.Schema { Optional: true, }, } - - if !features.FourPointOhBeta() { - s["custom_ca_trust_enabled"] = &pluginsdk.Schema{ - Deprecated: "This property is not available in the stable API and will be removed in v4.0 of the Azure Provider. Please see https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/4.0-upgrade-guide#aks-migration-to-stable-api for more details.", - Type: pluginsdk.TypeBool, - Optional: true, - } - - s["message_of_the_day"] = &pluginsdk.Schema{ - Deprecated: "This property is not available in the stable API and will be removed in v4.0 of the Azure Provider. Please see https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/4.0-upgrade-guide#aks-migration-to-stable-api for more details.", - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - } - - s["type"].ValidateFunc = validation.StringInSlice([]string{ - string(managedclusters.AgentPoolTypeAvailabilitySet), - string(managedclusters.AgentPoolTypeVirtualMachineScaleSets), - }, false) - - s["os_sku"].ValidateFunc = validation.StringInSlice([]string{ - string(agentpools.OSSKUAzureLinux), - string(agentpools.OSSKUCBLMariner), - string(agentpools.OSSKUMariner), - string(agentpools.OSSKUUbuntu), - string(agentpools.OSSKUWindowsTwoZeroOneNine), - string(agentpools.OSSKUWindowsTwoZeroTwoTwo), - }, false) - - s["workload_runtime"].ValidateFunc = validation.StringInSlice([]string{ - string(managedclusters.WorkloadRuntimeOCIContainer), - string(managedclusters.WorkloadRuntimeKataMshvVMIsolation), - }, false) - - s["node_taints"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeList, - Optional: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - }, - Deprecated: "This field will be removed in v4.0 of the Azure Provider since the AKS API doesn't allow arbitrary node taints on the default node pool", - } - } - - if !features.FourPointOh() { - // These properties are not undergoing a soft deprecation but are being renamed, so they need to be put behind the FourPointOh flag - s["enable_auto_scaling"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeBool, - Optional: true, - Deprecated: features.DeprecatedInFourPointOh("The property `enable_auto_scaling` will be renamed to `auto_scaling_enabled` in v4.0 of the AzureRM Provider."), - } - - s["enable_node_public_ip"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeBool, - Optional: true, - Deprecated: features.DeprecatedInFourPointOh("The property `enable_node_public_ip` will be renamed to `node_public_ip_enabled` in v4.0 of the AzureRM Provider."), - } - - s["enable_host_encryption"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeBool, - Optional: true, - Deprecated: features.DeprecatedInFourPointOh("The property `enable_host_encryption` will be renamed to `host_encryption_enabled` in v4.0 of the AzureRM Provider."), - } - delete(s, "auto_scaling_enabled") - delete(s, "node_public_ip_enabled") - delete(s, "host_encryption_enabled") - } - - return s }(), }, } } func schemaNodePoolKubeletConfig() *pluginsdk.Schema { - schema := pluginsdk.Schema{ + return &pluginsdk.Schema{ Type: pluginsdk.TypeList, Optional: true, MaxItems: 1, @@ -414,7 +338,7 @@ func schemaNodePoolKubeletConfig() *pluginsdk.Schema { Optional: true, }, - // TODO 4.0: change this to `container_log_max_files` + // TODO 5.0: change this to `container_log_max_files` "container_log_max_line": { Type: pluginsdk.TypeInt, Optional: true, @@ -428,17 +352,10 @@ func schemaNodePoolKubeletConfig() *pluginsdk.Schema { }, }, } - - // TODO 4.0: change the default value to `true` in the document - if !features.FourPointOhBeta() { - schema.Elem.(*pluginsdk.Resource).Schema["cpu_cfs_quota_enabled"].Default = false - } - - return &schema } func schemaNodePoolKubeletConfigForceNew() *pluginsdk.Schema { - schema := pluginsdk.Schema{ + return &pluginsdk.Schema{ Type: pluginsdk.TypeList, Optional: true, ForceNew: true, @@ -509,7 +426,7 @@ func schemaNodePoolKubeletConfigForceNew() *pluginsdk.Schema { ForceNew: true, }, - // TODO 4.0: change this to `container_log_max_files` + // TODO 5.0: change this to `container_log_max_files` "container_log_max_line": { Type: pluginsdk.TypeInt, Optional: true, @@ -525,13 +442,6 @@ func schemaNodePoolKubeletConfigForceNew() *pluginsdk.Schema { }, }, } - - // TODO 4.0: change the default value to `true` in the document - if !features.FourPointOhBeta() { - schema.Elem.(*pluginsdk.Resource).Schema["cpu_cfs_quota_enabled"].Default = false - } - - return &schema } func schemaNodePoolLinuxOSConfig() *pluginsdk.Schema { @@ -1104,11 +1014,6 @@ func ConvertDefaultNodePoolToAgentPool(input *[]managedclusters.ManagedClusterAg }, } - if !features.FourPointOhBeta() { - agentpool.Properties.MessageOfTheDay = defaultCluster.MessageOfTheDay - agentpool.Properties.EnableCustomCATrust = defaultCluster.EnableCustomCATrust - } - if osDisktypeNodePool := defaultCluster.OsDiskType; osDisktypeNodePool != nil { osDisktype := agentpools.OSDiskType(string(*osDisktypeNodePool)) agentpool.Properties.OsDiskType = &osDisktype @@ -1225,12 +1130,8 @@ func ExpandDefaultNodePool(d *pluginsdk.ResourceData) (*[]managedclusters.Manage input := d.Get("default_node_pool").([]interface{}) raw := input[0].(map[string]interface{}) - var enableAutoScaling bool - if !features.FourPointOh() { - enableAutoScaling = raw["enable_auto_scaling"].(bool) - } else { - enableAutoScaling = raw["auto_scaling_enabled"].(bool) - } + + enableAutoScaling := raw["auto_scaling_enabled"].(bool) nodeLabelsRaw := raw["node_labels"].(map[string]interface{}) nodeLabels := expandNodeLabels(nodeLabelsRaw) @@ -1251,25 +1152,11 @@ func ExpandDefaultNodePool(d *pluginsdk.ResourceData) (*[]managedclusters.Manage t := raw["tags"].(map[string]interface{}) - var nodePublicIp bool - if !features.FourPointOh() { - nodePublicIp = raw["enable_node_public_ip"].(bool) - } else { - nodePublicIp = raw["node_public_ip_enabled"].(bool) - } - - var hostEncryption bool - if !features.FourPointOh() { - hostEncryption = raw["enable_host_encryption"].(bool) - } else { - nodePublicIp = raw["host_encryption_enabled"].(bool) - } - profile := managedclusters.ManagedClusterAgentPoolProfile{ EnableAutoScaling: utils.Bool(enableAutoScaling), EnableFIPS: utils.Bool(raw["fips_enabled"].(bool)), - EnableNodePublicIP: utils.Bool(nodePublicIp), - EnableEncryptionAtHost: utils.Bool(hostEncryption), + EnableNodePublicIP: utils.Bool(raw["node_public_ip_enabled"].(bool)), + EnableEncryptionAtHost: utils.Bool(raw["host_encryption_enabled"].(bool)), KubeletDiskType: pointer.To(managedclusters.KubeletDiskType(raw["kubelet_disk_type"].(string))), Name: raw["name"].(string), NodeLabels: nodeLabels, @@ -1304,15 +1191,6 @@ func ExpandDefaultNodePool(d *pluginsdk.ResourceData) (*[]managedclusters.Manage profile.MaxPods = utils.Int64(maxPods) } - if !features.FourPointOhBeta() { - if v := raw["message_of_the_day"].(string); v != "" { - messageOfTheDayEncoded := base64.StdEncoding.EncodeToString([]byte(v)) - profile.MessageOfTheDay = &messageOfTheDayEncoded - } - - profile.EnableCustomCATrust = utils.Bool(raw["custom_ca_trust_enabled"].(bool)) - } - if prefixID := raw["node_public_ip_prefix_id"].(string); prefixID != "" { profile.NodePublicIPPrefixID = utils.String(prefixID) } @@ -1396,34 +1274,34 @@ func ExpandDefaultNodePool(d *pluginsdk.ResourceData) (*[]managedclusters.Manage // Count must be set for the initial creation when using AutoScaling but cannot be updated if d.HasChange("default_node_pool.0.node_count") && !d.IsNewResource() { - return nil, fmt.Errorf("cannot change `node_count` when `enable_auto_scaling` is set to `true`") + return nil, fmt.Errorf("cannot change `node_count` when `auto_scaling_enabled` is set to `true`") } if maxCount > 0 { profile.MaxCount = utils.Int64(int64(maxCount)) if maxCount < count && d.IsNewResource() { - return nil, fmt.Errorf("`node_count`(%d) must be equal to or less than `max_count`(%d) when `enable_auto_scaling` is set to `true`", count, maxCount) + return nil, fmt.Errorf("`node_count`(%d) must be equal to or less than `max_count`(%d) when `auto_scaling_enabled` is set to `true`", count, maxCount) } } else { - return nil, fmt.Errorf("`max_count` must be configured when `enable_auto_scaling` is set to `true`") + return nil, fmt.Errorf("`max_count` must be configured when `auto_scaling_enabled` is set to `true`") } if minCount > 0 { profile.MinCount = utils.Int64(int64(minCount)) if minCount > count && d.IsNewResource() { - return nil, fmt.Errorf("`node_count`(%d) must be equal to or greater than `min_count`(%d) when `enable_auto_scaling` is set to `true`", count, minCount) + return nil, fmt.Errorf("`node_count`(%d) must be equal to or greater than `min_count`(%d) when `auto_scaling_enabled` is set to `true`", count, minCount) } } else { - return nil, fmt.Errorf("`min_count` must be configured when `enable_auto_scaling` is set to `true`") + return nil, fmt.Errorf("`min_count` must be configured when `auto_scaling_enabled` is set to `true`") } if minCount > maxCount { return nil, fmt.Errorf("`max_count` must be >= `min_count`") } } else if minCount > 0 || maxCount > 0 { - return nil, fmt.Errorf("`max_count`(%d) and `min_count`(%d) must be set to `null` when `enable_auto_scaling` is set to `false`", maxCount, minCount) + return nil, fmt.Errorf("`max_count`(%d) and `min_count`(%d) must be set to `null` when `auto_scaling_enabled` is set to `false`", maxCount, minCount) } if kubeletConfig := raw["kubelet_config"].([]interface{}); len(kubeletConfig) > 0 { @@ -1790,8 +1668,10 @@ func FlattenDefaultNodePool(input *[]managedclusters.ManagedClusterAgentPoolProf networkProfile := flattenClusterPoolNetworkProfile(agentPool.NetworkProfile) out := map[string]interface{}{ + "auto_scaling_enabled": enableAutoScaling, "fips_enabled": enableFIPS, "gpu_instance": gpuInstanceProfile, + "host_encryption_enabled": enableHostEncryption, "host_group_id": hostGroupID, "kubelet_disk_type": kubeletDiskType, "max_count": maxCount, @@ -1801,6 +1681,7 @@ func FlattenDefaultNodePool(input *[]managedclusters.ManagedClusterAgentPoolProf "node_count": count, "node_labels": nodeLabels, "node_network_profile": networkProfile, + "node_public_ip_enabled": enableNodePublicIP, "node_public_ip_prefix_id": nodePublicIPPrefixID, "os_disk_size_gb": osDiskSizeGB, "os_disk_type": string(osDiskType), @@ -1825,36 +1706,6 @@ func FlattenDefaultNodePool(input *[]managedclusters.ManagedClusterAgentPoolProf "capacity_reservation_group_id": capacityReservationGroupId, } - if !features.FourPointOhBeta() { - customCaTrustEnabled := false - if agentPool.EnableCustomCATrust != nil { - customCaTrustEnabled = *agentPool.EnableCustomCATrust - } - - messageOfTheDay := "" - if agentPool.MessageOfTheDay != nil { - messageOfTheDayDecoded, err := base64.StdEncoding.DecodeString(*agentPool.MessageOfTheDay) - if err != nil { - return nil, err - } - messageOfTheDay = string(messageOfTheDayDecoded) - } - - out["node_taints"] = []string{} - out["custom_ca_trust_enabled"] = customCaTrustEnabled - out["message_of_the_day"] = messageOfTheDay - } - - if features.FourPointOh() { - out["auto_scaling_enabled"] = enableAutoScaling - out["node_public_ip_enabled"] = enableNodePublicIP - out["host_encryption_enabled"] = enableHostEncryption - } else { - out["enable_auto_scaling"] = enableAutoScaling - out["enable_node_public_ip"] = enableNodePublicIP - out["enable_host_encryption"] = enableHostEncryption - } - return &[]interface{}{ out, }, nil diff --git a/internal/services/containers/migration/registry_webhook_migration_v0_to_v1.go b/internal/services/containers/migration/registry_webhook_migration_v0_to_v1.go index c5765ca22f995..bf4f86491a08d 100644 --- a/internal/services/containers/migration/registry_webhook_migration_v0_to_v1.go +++ b/internal/services/containers/migration/registry_webhook_migration_v0_to_v1.go @@ -8,7 +8,7 @@ import ( "log" "github.com/hashicorp/go-azure-helpers/resourcemanager/resourcegroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" ) diff --git a/internal/services/cosmos/common/ip_rules.go b/internal/services/cosmos/common/ip_rules.go index d66e66731cb9c..540e436c35418 100644 --- a/internal/services/cosmos/common/ip_rules.go +++ b/internal/services/cosmos/common/ip_rules.go @@ -10,8 +10,8 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/utils" ) -// CosmosDBIpRulesToIpRangeFilterThreePointOh todo Remove for 4.0 -func CosmosDBIpRulesToIpRangeFilterThreePointOh(ipRules *[]cosmosdb.IPAddressOrRange) string { +// CosmosDBIpRulesToIpRangeFilterDataSource todo Remove for 4.0 +func CosmosDBIpRulesToIpRangeFilterDataSource(ipRules *[]cosmosdb.IPAddressOrRange) string { ipRangeFilter := make([]string, 0) if ipRules != nil { for _, ipRule := range *ipRules { diff --git a/internal/services/cosmos/cosmosdb_account_data_source.go b/internal/services/cosmos/cosmosdb_account_data_source.go index 872d1c54fcf18..d6078ec64a103 100644 --- a/internal/services/cosmos/cosmosdb_account_data_source.go +++ b/internal/services/cosmos/cosmosdb_account_data_source.go @@ -16,7 +16,6 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" "github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-05-15/cosmosdb" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/services/cosmos/common" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" @@ -249,35 +248,6 @@ func dataSourceCosmosDbAccount() *pluginsdk.Resource { }, } - if !features.FourPointOhBeta() { - dataSource.Schema["connection_strings"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeList, - Computed: true, - Sensitive: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - Sensitive: true, - }, - Deprecated: "This property has been superseded by the primary and secondary connection strings for sql, mongodb and readonly and will be removed in v4.0 of the AzureRM provider", - } - dataSource.Schema["enable_free_tier"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeBool, - Computed: true, - Deprecated: "This property has been renamed to `free_tier_enabled` and will be removed in v4.0 of the AzureRM provider", - } - dataSource.Schema["enable_automatic_failover"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeBool, - Computed: true, - Deprecated: "This property has been renamed to `automatic_failover_enabled` and will be removed in v4.0 of the AzureRM provider", - } - dataSource.Schema["enable_multiple_write_locations"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeBool, - Computed: true, - Deprecated: "This property has been renamed to `multiple_write_locations_enabled` and will be removed in v4.0 of the AzureRM provider", - } - - } - return dataSource } @@ -309,15 +279,9 @@ func dataSourceCosmosDbAccountRead(d *pluginsdk.ResourceData, meta interface{}) if props := model.Properties; props != nil { d.Set("offer_type", string(pointer.From(props.DatabaseAccountOfferType))) - d.Set("ip_range_filter", common.CosmosDBIpRulesToIpRangeFilterThreePointOh(props.IPRules)) + d.Set("ip_range_filter", common.CosmosDBIpRulesToIpRangeFilterDataSource(props.IPRules)) d.Set("endpoint", props.DocumentEndpoint) d.Set("is_virtual_network_filter_enabled", props.IsVirtualNetworkFilterEnabled) - if !features.FourPointOhBeta() { - d.Set("enable_free_tier", props.EnableFreeTier) - d.Set("enable_automatic_failover", props.EnableAutomaticFailover) - d.Set("enable_multiple_write_locations", props.EnableMultipleWriteLocations) - } - d.Set("free_tier_enabled", props.EnableFreeTier) d.Set("automatic_failover_enabled", props.EnableAutomaticFailover) d.Set("multiple_write_locations_enabled", props.EnableMultipleWriteLocations) @@ -440,10 +404,6 @@ func dataSourceCosmosDbAccountRead(d *pluginsdk.ResourceData, meta interface{}) } } } - - if !features.FourPointOhBeta() { - d.Set("connection_strings", connStrings) - } } } return nil diff --git a/internal/services/cosmos/cosmosdb_account_resource.go b/internal/services/cosmos/cosmosdb_account_resource.go index 61deee1531076..718ee3fd644d5 100644 --- a/internal/services/cosmos/cosmosdb_account_resource.go +++ b/internal/services/cosmos/cosmosdb_account_resource.go @@ -25,8 +25,8 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/services/cosmos/common" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/cosmos/migration" "github.com/hashicorp/terraform-provider-azurerm/internal/services/cosmos/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/cosmos/validate" keyVaultParse "github.com/hashicorp/terraform-provider-azurerm/internal/services/keyvault/parse" @@ -68,6 +68,7 @@ const ( databaseAccountCapabilitiesEnableMongoRetryableWrites databaseAccountCapabilities = "EnableMongoRetryableWrites" databaseAccountCapabilitiesEnableMongoRoleBasedAccessControl databaseAccountCapabilities = "EnableMongoRoleBasedAccessControl" databaseAccountCapabilitiesEnableUniqueCompoundNestedDocs databaseAccountCapabilities = "EnableUniqueCompoundNestedDocs" + databaseAccountCapabilitiesEnableNoSqlVectorSearch databaseAccountCapabilities = "EnableNoSQLVectorSearch" databaseAccountCapabilitiesEnableTtlOnCustomPath databaseAccountCapabilities = "EnableTtlOnCustomPath" databaseAccountCapabilitiesEnablePartialUniqueIndex databaseAccountCapabilities = "EnablePartialUniqueIndex" ) @@ -99,6 +100,7 @@ var capabilitiesToKindMap = map[string]interface{}{ strings.ToLower(string(databaseAccountCapabilitiesEnableUniqueCompoundNestedDocs)): []string{strings.ToLower(string(cosmosdb.DatabaseAccountKindMongoDB))}, strings.ToLower(string(databaseAccountCapabilitiesEnableTtlOnCustomPath)): []string{strings.ToLower(string(cosmosdb.DatabaseAccountKindMongoDB))}, strings.ToLower(string(databaseAccountCapabilitiesEnablePartialUniqueIndex)): []string{strings.ToLower(string(cosmosdb.DatabaseAccountKindMongoDB))}, + strings.ToLower(string(databaseAccountCapabilitiesEnableNoSqlVectorSearch)): []string{strings.ToLower(string(cosmosdb.DatabaseAccountKindGlobalDocumentDB))}, strings.ToLower(string(databaseAccountCapabilitiesEnableCassandra)): []string{strings.ToLower(string(cosmosdb.DatabaseAccountKindGlobalDocumentDB)), strings.ToLower(string(cosmosdb.DatabaseAccountKindParse))}, strings.ToLower(string(databaseAccountCapabilitiesEnableGremlin)): []string{strings.ToLower(string(cosmosdb.DatabaseAccountKindGlobalDocumentDB)), strings.ToLower(string(cosmosdb.DatabaseAccountKindParse))}, strings.ToLower(string(databaseAccountCapabilitiesEnableTable)): []string{strings.ToLower(string(cosmosdb.DatabaseAccountKindGlobalDocumentDB)), strings.ToLower(string(cosmosdb.DatabaseAccountKindParse))}, @@ -124,7 +126,7 @@ func suppressConsistencyPolicyStalenessConfiguration(_, _, _ string, d *pluginsd } func resourceCosmosDbAccount() *pluginsdk.Resource { - resource := &pluginsdk.Resource{ + return &pluginsdk.Resource{ Create: resourceCosmosDbAccountCreate, Read: resourceCosmosDbAccountRead, Update: resourceCosmosDbAccountUpdate, @@ -183,6 +185,12 @@ func resourceCosmosDbAccount() *pluginsdk.Resource { Delete: pluginsdk.DefaultTimeout(180 * time.Minute), }, + SchemaVersion: 1, + + StateUpgraders: pluginsdk.StateUpgrades(map[int]pluginsdk.StateUpgrade{ + 0: migration.CosmosDBAccountV0toV1{}, + }), + Schema: map[string]*pluginsdk.Schema{ "name": { Type: pluginsdk.TypeString, @@ -244,15 +252,9 @@ func resourceCosmosDbAccount() *pluginsdk.Resource { // per Microsoft's documentation, as of April 1 2023 the default minimal TLS version for all new accounts is 1.2 "minimal_tls_version": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: !features.FourPointOhBeta(), - Default: func() interface{} { - if !features.FourPointOhBeta() { - return nil - } - return string(cosmosdb.MinimalTlsVersionTlsOneTwo) - }(), + Type: pluginsdk.TypeString, + Optional: true, + Default: string(cosmosdb.MinimalTlsVersionTlsOneTwo), ValidateFunc: validation.StringInSlice(cosmosdb.PossibleValuesForMinimalTlsVersion(), false), }, @@ -294,44 +296,20 @@ func resourceCosmosDbAccount() *pluginsdk.Resource { }, false), }, - "ip_range_filter": func() *schema.Schema { - if features.FourPointOhBeta() { - return &schema.Schema{ - Type: pluginsdk.TypeSet, - Optional: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - ValidateFunc: validation.IsCIDR, - }, - } - } - return &schema.Schema{ - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile(`^(\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/([1-2][0-9]|3[0-2]|[3-9]))?\b[,]?)*$`), - "Cosmos DB ip_range_filter must be a set of CIDR IP addresses separated by commas with no spaces: '10.0.0.1,10.0.0.2,10.20.0.0/16'", - ), - } - }(), + "ip_range_filter": { + Type: pluginsdk.TypeSet, + Optional: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + ValidateFunc: validation.Any(validation.IsCIDR, validation.IsIPv4Address), + }, + }, "free_tier_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: func() interface{} { - if !features.FourPointOhBeta() { - return nil - } - return false - }(), - ForceNew: features.FourPointOhBeta(), - Computed: !features.FourPointOhBeta(), - ConflictsWith: func() []string { - if !features.FourPointOhBeta() { - return []string{"enable_free_tier"} - } - return []string{} - }(), + Default: false, + ForceNew: true, }, "analytical_storage_enabled": { @@ -349,19 +327,7 @@ func resourceCosmosDbAccount() *pluginsdk.Resource { "automatic_failover_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: func() interface{} { - if !features.FourPointOhBeta() { - return nil - } - return false - }(), - Computed: !features.FourPointOhBeta(), - ConflictsWith: func() []string { - if !features.FourPointOhBeta() { - return []string{"enable_automatic_failover"} - } - return []string{} - }(), + Default: false, }, "key_vault_key_id": { @@ -463,6 +429,7 @@ func resourceCosmosDbAccount() *pluginsdk.Resource { string(databaseAccountCapabilitiesEnableMongoRetryableWrites), string(databaseAccountCapabilitiesEnableMongoRoleBasedAccessControl), string(databaseAccountCapabilitiesEnableUniqueCompoundNestedDocs), + string(databaseAccountCapabilitiesEnableNoSqlVectorSearch), string(databaseAccountCapabilitiesEnableTtlOnCustomPath), string(databaseAccountCapabilitiesEnablePartialUniqueIndex), }, false), @@ -525,19 +492,7 @@ func resourceCosmosDbAccount() *pluginsdk.Resource { "multiple_write_locations_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: func() interface{} { - if !features.FourPointOhBeta() { - return nil - } - return false - }(), - Computed: !features.FourPointOhBeta(), - ConflictsWith: func() []string { - if !features.FourPointOhBeta() { - return []string{"enable_multiple_write_locations"} - } - return []string{} - }(), + Default: false, }, "network_acl_bypass_for_azure_services": { @@ -804,57 +759,6 @@ func resourceCosmosDbAccount() *pluginsdk.Resource { "tags": commonschema.Tags(), }, } - - if !features.FourPointOhBeta() { - resource.Schema["connection_strings"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeList, - Computed: true, - Sensitive: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - Sensitive: true, - }, - Deprecated: "This property has been superseded by the primary and secondary connection strings for sql, mongodb and readonly and will be removed in v4.0 of the AzureRM provider", - } - resource.Schema["enable_multiple_write_locations"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeBool, - Optional: true, - Computed: true, - ConflictsWith: func() []string { - if !features.FourPointOhBeta() { - return []string{"multiple_write_locations_enabled"} - } - return []string{} - }(), - Deprecated: "This property has been superseded by `multiple_write_locations_enabled` and will be removed in v4.0 of the AzureRM Provider", - } - resource.Schema["enable_free_tier"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeBool, - Optional: true, - Computed: true, - ConflictsWith: func() []string { - if !features.FourPointOhBeta() { - return []string{"free_tier_enabled"} - } - return []string{} - }(), - Deprecated: "This property has been superseded by `free_tier_enabled` and will be removed in v4.0 of the AzureRM Provider", - } - resource.Schema["enable_automatic_failover"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeBool, - Optional: true, - Computed: true, - ConflictsWith: func() []string { - if !features.FourPointOhBeta() { - return []string{"automatic_failover_enabled"} - } - return []string{} - }(), - Deprecated: "This property has been superseded by `automatic_failover_enabled` and will be removed in v4.0 of the AzureRM Provider", - } - } - - return resource } func resourceCosmosDbAccountCreate(d *pluginsdk.ResourceData, meta interface{}) error { @@ -885,34 +789,13 @@ func resourceCosmosDbAccountCreate(d *pluginsdk.ResourceData, meta interface{}) kind := d.Get("kind").(string) offerType := d.Get("offer_type").(string) - var ipRangeFilter *[]cosmosdb.IPAddressOrRange - if features.FourPointOhBeta() { - ipRangeFilter = common.CosmosDBIpRangeFilterToIpRules(*utils.ExpandStringSlice(d.Get("ip_range_filter").(*pluginsdk.Set).List())) - } else { - ipRangeFilter = common.CosmosDBIpRangeFilterToIpRulesThreePointOh(d.Get("ip_range_filter").(string)) - } - + ipRangeFilter := common.CosmosDBIpRangeFilterToIpRules(*utils.ExpandStringSlice(d.Get("ip_range_filter").(*pluginsdk.Set).List())) isVirtualNetworkFilterEnabled := d.Get("is_virtual_network_filter_enabled").(bool) enableFreeTier := d.Get("free_tier_enabled").(bool) enableAutomaticFailover := d.Get("automatic_failover_enabled").(bool) enableMultipleWriteLocations := d.Get("multiple_write_locations_enabled").(bool) - if !features.FourPointOhBeta() { - // nolint : staticcheck - if v, ok := d.GetOkExists("enable_automatic_failover"); ok { - enableAutomaticFailover = v.(bool) - } - // nolint : staticcheck - if v, ok := d.GetOkExists("enable_multiple_write_locations"); ok { - enableMultipleWriteLocations = v.(bool) - } - // nolint : staticcheck - if v, ok := d.GetOkExists("enable_free_tier"); ok { - enableFreeTier = v.(bool) - } - } - partitionMergeEnabled := d.Get("partition_merge_enabled").(bool) burstCapacityEnabled := d.Get("burst_capacity_enabled").(bool) enableAnalyticalStorage := d.Get("analytical_storage_enabled").(bool) @@ -1146,24 +1029,13 @@ func resourceCosmosDbAccountUpdate(d *pluginsdk.ResourceData, meta interface{}) enableAnalyticalStorage := pointer.To(d.Get("analytical_storage_enabled").(bool)) disableLocalAuthentication := pointer.To(d.Get("local_authentication_disabled").(bool)) enableAutomaticFailover := pointer.To(d.Get("automatic_failover_enabled").(bool)) - if !features.FourPointOhBeta() { - // nolint : staticcheck - if v, ok := d.GetOkExists("enable_automatic_failover"); ok && v.(bool) { - enableAutomaticFailover = pointer.To(v.(bool)) - } - } networkByPass := cosmosdb.NetworkAclBypassNone if d.Get("network_acl_bypass_for_azure_services").(bool) { networkByPass = cosmosdb.NetworkAclBypassAzureServices } - var ipRangeFilter *[]cosmosdb.IPAddressOrRange - if features.FourPointOhBeta() { - ipRangeFilter = common.CosmosDBIpRangeFilterToIpRules(*utils.ExpandStringSlice(d.Get("ip_range_filter").(*pluginsdk.Set).List())) - } else { - ipRangeFilter = common.CosmosDBIpRangeFilterToIpRulesThreePointOh(d.Get("ip_range_filter").(string)) - } + ipRangeFilter := common.CosmosDBIpRangeFilterToIpRules(*utils.ExpandStringSlice(d.Get("ip_range_filter").(*pluginsdk.Set).List())) publicNetworkAccess := cosmosdb.PublicNetworkAccessEnabled if enabled := d.Get("public_network_access_enabled").(bool); !enabled { @@ -1294,24 +1166,6 @@ func resourceCosmosDbAccountUpdate(d *pluginsdk.ResourceData, meta interface{}) } // Update the following properties independently after the initial CreateOrUpdate... - if !features.FourPointOhBeta() { - if d.HasChange("enable_multiple_write_locations") { - log.Printf("[INFO] Updating AzureRM Cosmos DB Account: Updating 'EnableMultipleWriteLocations'") - - enableMultipleWriteLocations := pointer.To(d.Get("enable_multiple_write_locations").(bool)) - if props.EnableMultipleWriteLocations != enableMultipleWriteLocations { - account.Properties.EnableMultipleWriteLocations = enableMultipleWriteLocations - - // Update the database... - if err = resourceCosmosDbAccountApiCreateOrUpdate(client, ctx, *id, account, d); err != nil { - return fmt.Errorf("updating %q EnableMultipleWriteLocations: %+v", id, err) - } - } - } else { - log.Printf("[INFO] [SKIP] AzureRM Cosmos DB Account: Updating 'EnableMultipleWriteLocations' [NO CHANGE]") - } - } - if d.HasChange("multiple_write_locations_enabled") { log.Printf("[INFO] Updating AzureRM Cosmos DB Account: Updating 'EnableMultipleWriteLocations'") @@ -1519,24 +1373,10 @@ func resourceCosmosDbAccountRead(d *pluginsdk.ResourceData, meta interface{}) er if props := existing.Model.Properties; props != nil { d.Set("offer_type", pointer.From(props.DatabaseAccountOfferType)) - if features.FourPointOhBeta() { - d.Set("ip_range_filter", common.CosmosDBIpRulesToIpRangeFilter(props.IPRules)) - } else { - d.Set("ip_range_filter", common.CosmosDBIpRulesToIpRangeFilterThreePointOh(props.IPRules)) - } + d.Set("ip_range_filter", common.CosmosDBIpRulesToIpRangeFilter(props.IPRules)) d.Set("endpoint", props.DocumentEndpoint) - if !features.FourPointOhBeta() { - d.Set("enable_free_tier", props.EnableFreeTier) - if v := existing.Model.Properties.EnableMultipleWriteLocations; v != nil { - d.Set("enable_multiple_write_locations", props.EnableMultipleWriteLocations) - } - if v := existing.Model.Properties.EnableAutomaticFailover; v != nil { - d.Set("enable_automatic_failover", props.EnableAutomaticFailover) - } - } - d.Set("free_tier_enabled", props.EnableFreeTier) d.Set("analytical_storage_enabled", props.EnableAnalyticalStorage) d.Set("public_network_access_enabled", pointer.From(props.PublicNetworkAccess) == cosmosdb.PublicNetworkAccessEnabled) @@ -1695,10 +1535,6 @@ func resourceCosmosDbAccountRead(d *pluginsdk.ResourceData, meta interface{}) er } } - if !features.FourPointOhBeta() { - d.Set("connection_strings", connStrings) - } - return tags.FlattenAndSet(d, existing.Model.Tags) } diff --git a/internal/services/cosmos/cosmosdb_account_resource_test.go b/internal/services/cosmos/cosmosdb_account_resource_test.go index 64b6a0f87e3bc..34835ba66495e 100644 --- a/internal/services/cosmos/cosmosdb_account_resource_test.go +++ b/internal/services/cosmos/cosmosdb_account_resource_test.go @@ -702,6 +702,10 @@ func TestAccCosmosDBAccount_capabilities_EnableServerless(t *testing.T) { testAccCosmosDBAccount_capabilitiesWith(t, cosmosdb.DatabaseAccountKindGlobalDocumentDB, []string{"EnableServerless"}) } +func TestAccCosmosDBAccount_capabilities_EnableNoSQLVectorSearch(t *testing.T) { + testAccCosmosDBAccount_capabilitiesWith(t, cosmosdb.DatabaseAccountKindGlobalDocumentDB, []string{"EnableNoSQLVectorSearch"}) +} + func TestAccCosmosDBAccount_capabilities_EnableMongo(t *testing.T) { testAccCosmosDBAccount_capabilitiesWith(t, cosmosdb.DatabaseAccountKindMongoDB, []string{"EnableMongo"}) } @@ -4640,7 +4644,7 @@ resource "azurerm_cosmosdb_account" "test" { } is_virtual_network_filter_enabled = true - ip_range_filter = ["55.0.1.0/24", "55.0.2.0/24"] + ip_range_filter = ["55.0.1.0/24", "55.0.2.0/24", "0.0.0.0"] virtual_network_rule { id = azurerm_subnet.subnet1.id diff --git a/internal/services/cosmos/migration/cosmosdb_account.go b/internal/services/cosmos/migration/cosmosdb_account.go new file mode 100644 index 0000000000000..0630bc1fed810 --- /dev/null +++ b/internal/services/cosmos/migration/cosmosdb_account.go @@ -0,0 +1,573 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package migration + +import ( + "context" + "strings" + + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" +) + +var _ pluginsdk.StateUpgrade = CosmosDBAccountV0toV1{} + +type CosmosDBAccountV0toV1 struct{} + +func (c CosmosDBAccountV0toV1) Schema() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "location": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "resource_group_name": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "offer_type": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "analytical_storage": { + Type: pluginsdk.TypeList, + Optional: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "schema_type": { + Type: pluginsdk.TypeString, + Required: true, + }, + }, + }, + }, + + "capacity": { + Type: pluginsdk.TypeList, + Optional: true, + Computed: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "total_throughput_limit": { + Type: pluginsdk.TypeInt, + Required: true, + }, + }, + }, + }, + + "minimal_tls_version": { + Type: pluginsdk.TypeString, + Optional: true, + Computed: true, + }, + + "create_mode": { + Type: pluginsdk.TypeString, + Optional: true, + Computed: true, + }, + + "default_identity_type": { + Type: pluginsdk.TypeString, + Optional: true, + }, + + "kind": { + Type: pluginsdk.TypeString, + Optional: true, + }, + + "ip_range_filter": { + Type: pluginsdk.TypeString, + Optional: true, + }, + + "free_tier_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + }, + + "analytical_storage_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + }, + + "public_network_access_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + }, + + "automatic_failover_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Computed: true, + }, + + "key_vault_key_id": { + Type: pluginsdk.TypeString, + Optional: true, + }, + + "consistency_policy": { + Type: pluginsdk.TypeList, + Required: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "consistency_level": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "max_interval_in_seconds": { + Type: pluginsdk.TypeInt, + Optional: true, + }, + + "max_staleness_prefix": { + Type: pluginsdk.TypeInt, + Optional: true, + }, + }, + }, + }, + + "geo_location": { + Type: pluginsdk.TypeSet, + Required: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "id": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "location": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "failover_priority": { + Type: pluginsdk.TypeInt, + Required: true, + }, + + "zone_redundant": { + Type: pluginsdk.TypeBool, + Optional: true, + }, + }, + }, + }, + + "capabilities": { + Type: pluginsdk.TypeSet, + Optional: true, + Computed: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + }, + }, + }, + }, + + "is_virtual_network_filter_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + }, + + "virtual_network_rule": { + Type: pluginsdk.TypeSet, + Optional: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "id": { + Type: pluginsdk.TypeString, + Required: true, + }, + "ignore_missing_vnet_service_endpoint": { + Type: pluginsdk.TypeBool, + Optional: true, + }, + }, + }, + }, + + "access_key_metadata_writes_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + }, + + "local_authentication_disabled": { + Type: pluginsdk.TypeBool, + Optional: true, + }, + + "mongo_server_version": { + Type: pluginsdk.TypeString, + Optional: true, + Computed: true, + }, + + "multiple_write_locations_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Computed: true, + }, + + "network_acl_bypass_for_azure_services": { + Type: pluginsdk.TypeBool, + Optional: true, + }, + + "network_acl_bypass_ids": { + Type: pluginsdk.TypeList, + Optional: true, Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + }, + }, + + "partition_merge_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + }, + + "burst_capacity_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + }, + + "backup": { + Type: pluginsdk.TypeList, + Optional: true, + Computed: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "type": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "tier": { + Type: pluginsdk.TypeString, + Optional: true, + Computed: true, + }, + + "interval_in_minutes": { + Type: pluginsdk.TypeInt, + Optional: true, + Computed: true, + }, + + "retention_in_hours": { + Type: pluginsdk.TypeInt, + Optional: true, + Computed: true, + }, + + "storage_redundancy": { + Type: pluginsdk.TypeString, + Optional: true, + Computed: true, + }, + }, + }, + }, + + "identity": { + Type: pluginsdk.TypeList, + Optional: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "type": { + Type: pluginsdk.TypeString, + Required: true, + }, + "identity_ids": { + Type: pluginsdk.TypeSet, + Optional: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + }, + }, + "principal_id": { + Type: pluginsdk.TypeString, + Computed: true, + }, + "tenant_id": { + Type: pluginsdk.TypeString, + Computed: true, + }, + }, + }, + }, + + "cors_rule": { + Type: pluginsdk.TypeList, + Optional: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "allowed_origins": { + Type: pluginsdk.TypeList, + Required: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + }, + }, + + "exposed_headers": { + Type: pluginsdk.TypeList, + Required: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + }, + }, + + "allowed_headers": { + Type: pluginsdk.TypeList, + Required: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + }, + }, + + "allowed_methods": { + Type: pluginsdk.TypeList, + Required: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + }, + }, + + "max_age_in_seconds": { + Type: pluginsdk.TypeInt, + Optional: true, + }, + }, + }, + }, + + "connection_strings": { + Type: pluginsdk.TypeList, + Computed: true, + Sensitive: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + Sensitive: true, + }, + }, + + "enable_multiple_write_locations": { + Type: pluginsdk.TypeBool, + Optional: true, + Computed: true, + }, + + "enable_free_tier": { + Type: pluginsdk.TypeBool, + Optional: true, + Computed: true, + }, + + "enable_automatic_failover": { + Type: pluginsdk.TypeBool, + Optional: true, + Computed: true, + }, + + "restore": { + Type: pluginsdk.TypeList, + Optional: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "source_cosmosdb_account_id": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + }, + + "restore_timestamp_in_utc": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "database": { + Type: pluginsdk.TypeSet, + Optional: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "collection_names": { + Type: pluginsdk.TypeSet, + Optional: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + }, + }, + }, + }, + }, + + "gremlin_database": { + Type: pluginsdk.TypeList, + Optional: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "graph_names": { + Type: pluginsdk.TypeList, + Optional: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + }, + }, + }, + }, + }, + + "tables_to_restore": { + Type: pluginsdk.TypeList, + Optional: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + }, + }, + }, + }, + }, + + "endpoint": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "read_endpoints": { + Type: pluginsdk.TypeList, + Computed: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + }, + }, + + "write_endpoints": { + Type: pluginsdk.TypeList, + Computed: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + }, + }, + + "primary_key": { + Type: pluginsdk.TypeString, + Computed: true, + Sensitive: true, + }, + + "secondary_key": { + Type: pluginsdk.TypeString, + Computed: true, + Sensitive: true, + }, + + "primary_readonly_key": { + Type: pluginsdk.TypeString, + Computed: true, + Sensitive: true, + }, + + "secondary_readonly_key": { + Type: pluginsdk.TypeString, + Computed: true, + Sensitive: true, + }, + + "primary_sql_connection_string": { + Type: pluginsdk.TypeString, + Computed: true, + Sensitive: true, + }, + + "secondary_sql_connection_string": { + Type: pluginsdk.TypeString, + Computed: true, + Sensitive: true, + }, + + "primary_readonly_sql_connection_string": { + Type: pluginsdk.TypeString, + Computed: true, + Sensitive: true, + }, + + "secondary_readonly_sql_connection_string": { + Type: pluginsdk.TypeString, + Computed: true, + Sensitive: true, + }, + + "primary_mongodb_connection_string": { + Type: pluginsdk.TypeString, + Computed: true, + Sensitive: true, + }, + + "secondary_mongodb_connection_string": { + Type: pluginsdk.TypeString, + Computed: true, + Sensitive: true, + }, + + "primary_readonly_mongodb_connection_string": { + Type: pluginsdk.TypeString, + Computed: true, + Sensitive: true, + }, + + "secondary_readonly_mongodb_connection_string": { + Type: pluginsdk.TypeString, + Computed: true, + Sensitive: true, + }, + + "tags": { + Type: pluginsdk.TypeMap, + Optional: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + }, + }, + } +} + +func (c CosmosDBAccountV0toV1) UpgradeFunc() pluginsdk.StateUpgraderFunc { + return func(ctx context.Context, rawState map[string]interface{}, meta interface{}) (map[string]interface{}, error) { + if ipfString, ok := rawState["ip_range_filter"].(string); ok { + ipfSet := make([]string, 0) + if ipfString != "" { + ipfSet = strings.Split(ipfString, ",") + } + rawState["ip_range_filter"] = ipfSet + } + + return rawState, nil + } +} diff --git a/internal/services/dashboard/dashboard_grafana_resource.go b/internal/services/dashboard/dashboard_grafana_resource.go index 9155da6cf6307..cb037c07aa3f2 100644 --- a/internal/services/dashboard/dashboard_grafana_resource.go +++ b/internal/services/dashboard/dashboard_grafana_resource.go @@ -192,7 +192,7 @@ func (r DashboardGrafanaResource) Arguments() map[string]*pluginsdk.Schema { Required: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{ - "10", + "9", "10", }, false), }, diff --git a/internal/services/dataprotection/data_protection_backup_instance_kubernetes_cluster_resource_test.go b/internal/services/dataprotection/data_protection_backup_instance_kubernetes_cluster_resource_test.go index 6a32139eebbaa..5770d9cf1fa7a 100644 --- a/internal/services/dataprotection/data_protection_backup_instance_kubernetes_cluster_resource_test.go +++ b/internal/services/dataprotection/data_protection_backup_instance_kubernetes_cluster_resource_test.go @@ -113,10 +113,10 @@ resource "azurerm_kubernetes_cluster" "test" { dns_prefix = "acctestaks%[1]d" default_node_pool { - name = "default" - node_count = 1 - vm_size = "Standard_DS2_v2" - enable_host_encryption = true + name = "default" + node_count = 1 + vm_size = "Standard_DS2_v2" + host_encryption_enabled = true upgrade_settings { max_surge = "10%%" } diff --git a/internal/services/dataprotection/data_protection_backup_policy_mysql_flexible_server_resource.go b/internal/services/dataprotection/data_protection_backup_policy_mysql_flexible_server_resource.go new file mode 100644 index 0000000000000..c8b79ca2f8415 --- /dev/null +++ b/internal/services/dataprotection/data_protection_backup_policy_mysql_flexible_server_resource.go @@ -0,0 +1,697 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package dataprotection + +import ( + "context" + "fmt" + "strings" + "time" + + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-04-01/backuppolicies" + azValidate "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" + "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/dataprotection/validate" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" +) + +type BackupPolicyMySQLFlexibleServerModel struct { + Name string `tfschema:"name"` + VaultId string `tfschema:"vault_id"` + BackupRepeatingTimeIntervals []string `tfschema:"backup_repeating_time_intervals"` + DefaultRetentionRule []BackupPolicyMySQLFlexibleServerDefaultRetentionRule `tfschema:"default_retention_rule"` + RetentionRules []BackupPolicyMySQLFlexibleServerRetentionRule `tfschema:"retention_rule"` + TimeZone string `tfschema:"time_zone"` +} + +type BackupPolicyMySQLFlexibleServerDefaultRetentionRule struct { + LifeCycle []BackupPolicyMySQLFlexibleServerLifeCycle `tfschema:"life_cycle"` +} + +type BackupPolicyMySQLFlexibleServerLifeCycle struct { + DataStoreType string `tfschema:"data_store_type"` + Duration string `tfschema:"duration"` +} + +type BackupPolicyMySQLFlexibleServerRetentionRule struct { + Name string `tfschema:"name"` + Criteria []BackupPolicyMySQLFlexibleServerCriteria `tfschema:"criteria"` + LifeCycle []BackupPolicyMySQLFlexibleServerLifeCycle `tfschema:"life_cycle"` + Priority int64 `tfschema:"priority"` +} + +type BackupPolicyMySQLFlexibleServerCriteria struct { + AbsoluteCriteria string `tfschema:"absolute_criteria"` + DaysOfWeek []string `tfschema:"days_of_week"` + MonthsOfYear []string `tfschema:"months_of_year"` + ScheduledBackupTimes []string `tfschema:"scheduled_backup_times"` + WeeksOfMonth []string `tfschema:"weeks_of_month"` +} + +type DataProtectionBackupPolicyMySQLFlexibleServerResource struct{} + +var _ sdk.Resource = DataProtectionBackupPolicyMySQLFlexibleServerResource{} + +func (r DataProtectionBackupPolicyMySQLFlexibleServerResource) ResourceType() string { + return "azurerm_data_protection_backup_policy_mysql_flexible_server" +} + +func (r DataProtectionBackupPolicyMySQLFlexibleServerResource) ModelObject() interface{} { + return &BackupPolicyMySQLFlexibleServerModel{} +} + +func (r DataProtectionBackupPolicyMySQLFlexibleServerResource) IDValidationFunc() pluginsdk.SchemaValidateFunc { + return backuppolicies.ValidateBackupPolicyID +} + +func (r DataProtectionBackupPolicyMySQLFlexibleServerResource) Arguments() map[string]*pluginsdk.Schema { + arguments := map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validate.BackupPolicyMySQLFlexibleServerName, + }, + + "vault_id": commonschema.ResourceIDReferenceRequiredForceNew(pointer.To(backuppolicies.BackupVaultId{})), + + "backup_repeating_time_intervals": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MinItems: 1, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + ValidateFunc: azValidate.ISO8601RepeatingTime, + }, + }, + + "default_retention_rule": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "life_cycle": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "data_store_type": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + // Confirmed with the service team that current possible value only support `VaultStore`. + // However, considering that `ArchiveStore` will be supported in the future, it would be exposed for user specification. + string(backuppolicies.DataStoreTypesVaultStore), + }, false), + }, + + "duration": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: azValidate.ISO8601Duration, + }, + }, + }, + }, + }, + }, + }, + + "retention_rule": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "criteria": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "absolute_criteria": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice(backuppolicies.PossibleValuesForAbsoluteMarker(), false), + }, + + "days_of_week": { + Type: pluginsdk.TypeSet, + Optional: true, + ForceNew: true, + MinItems: 1, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + ValidateFunc: validation.StringInSlice(backuppolicies.PossibleValuesForDayOfWeek(), false), + }, + }, + + "months_of_year": { + Type: pluginsdk.TypeSet, + Optional: true, + ForceNew: true, + MinItems: 1, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + ValidateFunc: validation.StringInSlice(backuppolicies.PossibleValuesForMonth(), false), + }, + }, + + "scheduled_backup_times": { + Type: pluginsdk.TypeSet, + Optional: true, + ForceNew: true, + MinItems: 1, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + ValidateFunc: validation.IsRFC3339Time, + }, + }, + + "weeks_of_month": { + Type: pluginsdk.TypeSet, + Optional: true, + ForceNew: true, + MinItems: 1, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + ValidateFunc: validation.StringInSlice(backuppolicies.PossibleValuesForWeekNumber(), false), + }, + }, + }, + }, + }, + + "life_cycle": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "data_store_type": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + // Confirmed with the service team that currently only `VaultStore` is supported. + // However, considering that `ArchiveStore` will be supported in the future, it would be exposed for user specification. + string(backuppolicies.DataStoreTypesVaultStore), + }, false), + }, + + "duration": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: azValidate.ISO8601Duration, + }, + }, + }, + }, + + "priority": { + Type: pluginsdk.TypeInt, + Required: true, + ForceNew: true, + }, + }, + }, + }, + + "time_zone": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validate.BackupPolicyMySQLFlexibleServerTimeZone(), + }, + } + return arguments +} + +func (r DataProtectionBackupPolicyMySQLFlexibleServerResource) Attributes() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{} +} + +func (r DataProtectionBackupPolicyMySQLFlexibleServerResource) Create() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 30 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + var model BackupPolicyMySQLFlexibleServerModel + if err := metadata.Decode(&model); err != nil { + return fmt.Errorf("decoding: %+v", err) + } + + client := metadata.Client.DataProtection.BackupPolicyClient + subscriptionId := metadata.Client.Account.SubscriptionId + + vaultId, _ := backuppolicies.ParseBackupVaultID(model.VaultId) + id := backuppolicies.NewBackupPolicyID(subscriptionId, vaultId.ResourceGroupName, vaultId.BackupVaultName, model.Name) + + existing, err := client.Get(ctx, id) + if err != nil { + if !response.WasNotFound(existing.HttpResponse) { + return fmt.Errorf("checking for existing %s: %+v", id, err) + } + } + + if !response.WasNotFound(existing.HttpResponse) { + return metadata.ResourceRequiresImport(r.ResourceType(), id) + } + + policyRules := make([]backuppolicies.BasePolicyRule, 0) + policyRules = append(policyRules, expandBackupPolicyMySQLFlexibleServerAzureBackupRules(model.BackupRepeatingTimeIntervals, model.TimeZone, expandBackupPolicyMySQLFlexibleServerTaggingCriteria(model.RetentionRules))...) + policyRules = append(policyRules, expandBackupPolicyMySQLFlexibleServerDefaultAzureRetentionRule(model.DefaultRetentionRule)) + policyRules = append(policyRules, expandBackupPolicyMySQLFlexibleServerAzureRetentionRules(model.RetentionRules)...) + + parameters := backuppolicies.BaseBackupPolicyResource{ + Properties: backuppolicies.BackupPolicy{ + PolicyRules: policyRules, + DatasourceTypes: []string{"Microsoft.DBforMySQL/flexibleServers"}, + }, + } + + if _, err := client.CreateOrUpdate(ctx, id, parameters); err != nil { + return fmt.Errorf("creating %s: %+v", id, err) + } + + metadata.SetID(id) + + return nil + }, + } +} + +func (r DataProtectionBackupPolicyMySQLFlexibleServerResource) Read() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 5 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.DataProtection.BackupPolicyClient + + id, err := backuppolicies.ParseBackupPolicyID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + resp, err := client.Get(ctx, *id) + if err != nil { + if response.WasNotFound(resp.HttpResponse) { + return metadata.MarkAsGone(*id) + } + + return fmt.Errorf("retrieving %s: %+v", *id, err) + } + + vaultId := backuppolicies.NewBackupVaultID(id.SubscriptionId, id.ResourceGroupName, id.BackupVaultName) + state := BackupPolicyMySQLFlexibleServerModel{ + Name: id.BackupPolicyName, + VaultId: vaultId.ID(), + } + + if model := resp.Model; model != nil { + if properties, ok := model.Properties.(backuppolicies.BackupPolicy); ok { + state.DefaultRetentionRule = flattenBackupPolicyMySQLFlexibleServerDefaultRetentionRule(properties.PolicyRules) + state.RetentionRules = flattenBackupPolicyMySQLFlexibleServerRetentionRules(properties.PolicyRules) + state.BackupRepeatingTimeIntervals = flattenBackupPolicyMySQLFlexibleServerBackupRules(properties.PolicyRules) + state.TimeZone = flattenBackupPolicyMySQLFlexibleServerBackupTimeZone(properties.PolicyRules) + } + } + + return metadata.Encode(&state) + }, + } +} + +func (r DataProtectionBackupPolicyMySQLFlexibleServerResource) Delete() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 30 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.DataProtection.BackupPolicyClient + + id, err := backuppolicies.ParseBackupPolicyID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + if _, err := client.Delete(ctx, *id); err != nil { + return fmt.Errorf("deleting %s: %+v", *id, err) + } + + return nil + }, + } +} + +func expandBackupPolicyMySQLFlexibleServerAzureBackupRules(input []string, timeZone string, taggingCriteria []backuppolicies.TaggingCriteria) []backuppolicies.BasePolicyRule { + results := make([]backuppolicies.BasePolicyRule, 0) + + results = append(results, backuppolicies.AzureBackupRule{ + Name: "BackupIntervals", + DataStore: backuppolicies.DataStoreInfoBase{ + DataStoreType: backuppolicies.DataStoreTypesVaultStore, + ObjectType: "DataStoreInfoBase", + }, + BackupParameters: backuppolicies.AzureBackupParams{ + BackupType: "Full", + }, + Trigger: backuppolicies.ScheduleBasedTriggerContext{ + Schedule: backuppolicies.BackupSchedule{ + RepeatingTimeIntervals: input, + TimeZone: pointer.To(timeZone), + }, + TaggingCriteria: taggingCriteria, + }, + }) + + return results +} + +func expandBackupPolicyMySQLFlexibleServerAzureRetentionRules(input []BackupPolicyMySQLFlexibleServerRetentionRule) []backuppolicies.BasePolicyRule { + results := make([]backuppolicies.BasePolicyRule, 0) + + for _, item := range input { + results = append(results, backuppolicies.AzureRetentionRule{ + Name: item.Name, + IsDefault: pointer.To(false), + Lifecycles: expandBackupPolicyMySQLFlexibleServerLifeCycle(item.LifeCycle), + }) + } + + return results +} + +func expandBackupPolicyMySQLFlexibleServerDefaultAzureRetentionRule(input []BackupPolicyMySQLFlexibleServerDefaultRetentionRule) backuppolicies.BasePolicyRule { + result := backuppolicies.AzureRetentionRule{ + Name: "Default", + IsDefault: pointer.To(true), + } + + if len(input) > 0 { + result.Lifecycles = expandBackupPolicyMySQLFlexibleServerLifeCycle(input[0].LifeCycle) + } + + return result +} + +func expandBackupPolicyMySQLFlexibleServerLifeCycle(input []BackupPolicyMySQLFlexibleServerLifeCycle) []backuppolicies.SourceLifeCycle { + results := make([]backuppolicies.SourceLifeCycle, 0) + + for _, item := range input { + sourceLifeCycle := backuppolicies.SourceLifeCycle{ + DeleteAfter: backuppolicies.AbsoluteDeleteOption{ + Duration: item.Duration, + }, + SourceDataStore: backuppolicies.DataStoreInfoBase{ + DataStoreType: backuppolicies.DataStoreTypes(item.DataStoreType), + ObjectType: "DataStoreInfoBase", + }, + TargetDataStoreCopySettings: &[]backuppolicies.TargetCopySetting{}, + } + + results = append(results, sourceLifeCycle) + } + + return results +} + +func expandBackupPolicyMySQLFlexibleServerTaggingCriteria(input []BackupPolicyMySQLFlexibleServerRetentionRule) []backuppolicies.TaggingCriteria { + results := []backuppolicies.TaggingCriteria{ + { + Criteria: nil, + IsDefault: true, + TaggingPriority: 99, + TagInfo: backuppolicies.RetentionTag{ + Id: pointer.To("Default_"), + TagName: "Default", + }, + }, + } + + for _, item := range input { + result := backuppolicies.TaggingCriteria{ + IsDefault: false, + Criteria: expandBackupPolicyMySQLFlexibleServerCriteria(item.Criteria), + TaggingPriority: item.Priority, + TagInfo: backuppolicies.RetentionTag{ + Id: pointer.To(item.Name + "_"), + TagName: item.Name, + }, + } + + results = append(results, result) + } + + return results +} + +func expandBackupPolicyMySQLFlexibleServerCriteria(input []BackupPolicyMySQLFlexibleServerCriteria) *[]backuppolicies.BackupCriteria { + if len(input) == 0 { + return nil + } + + results := make([]backuppolicies.BackupCriteria, 0) + + for _, item := range input { + var absoluteCriteria []backuppolicies.AbsoluteMarker + if absoluteCriteriaRaw := item.AbsoluteCriteria; len(absoluteCriteriaRaw) > 0 { + absoluteCriteria = []backuppolicies.AbsoluteMarker{backuppolicies.AbsoluteMarker(absoluteCriteriaRaw)} + } + + var daysOfWeek []backuppolicies.DayOfWeek + if len(item.DaysOfWeek) > 0 { + daysOfWeek = make([]backuppolicies.DayOfWeek, 0) + for _, value := range item.DaysOfWeek { + daysOfWeek = append(daysOfWeek, backuppolicies.DayOfWeek(value)) + } + } + + var monthsOfYear []backuppolicies.Month + if len(item.MonthsOfYear) > 0 { + monthsOfYear = make([]backuppolicies.Month, 0) + for _, value := range item.MonthsOfYear { + monthsOfYear = append(monthsOfYear, backuppolicies.Month(value)) + } + } + + var weeksOfMonth []backuppolicies.WeekNumber + if len(item.WeeksOfMonth) > 0 { + weeksOfMonth = make([]backuppolicies.WeekNumber, 0) + for _, value := range item.WeeksOfMonth { + weeksOfMonth = append(weeksOfMonth, backuppolicies.WeekNumber(value)) + } + } + + var scheduleTimes []string + if len(item.ScheduledBackupTimes) > 0 { + scheduleTimes = item.ScheduledBackupTimes + } + + results = append(results, backuppolicies.ScheduleBasedBackupCriteria{ + AbsoluteCriteria: pointer.To(absoluteCriteria), + DaysOfMonth: nil, + DaysOfTheWeek: pointer.To(daysOfWeek), + MonthsOfYear: pointer.To(monthsOfYear), + ScheduleTimes: pointer.To(scheduleTimes), + WeeksOfTheMonth: pointer.To(weeksOfMonth), + }) + } + + return &results +} + +func flattenBackupPolicyMySQLFlexibleServerBackupRules(input []backuppolicies.BasePolicyRule) []string { + backupRules := make([]string, 0) + + for _, item := range input { + if v, ok := item.(backuppolicies.AzureBackupRule); ok { + if v.Trigger != nil { + if scheduleBasedTrigger, ok := v.Trigger.(backuppolicies.ScheduleBasedTriggerContext); ok { + backupRules = scheduleBasedTrigger.Schedule.RepeatingTimeIntervals + return backupRules + } + } + } + } + + return backupRules +} + +func flattenBackupPolicyMySQLFlexibleServerBackupTimeZone(input []backuppolicies.BasePolicyRule) string { + var timeZone string + + for _, item := range input { + if backupRule, ok := item.(backuppolicies.AzureBackupRule); ok { + if backupRule.Trigger != nil { + if scheduleBasedTrigger, ok := backupRule.Trigger.(backuppolicies.ScheduleBasedTriggerContext); ok { + timeZone = pointer.From(scheduleBasedTrigger.Schedule.TimeZone) + return timeZone + } + } + } + } + + return timeZone +} + +func flattenBackupPolicyMySQLFlexibleServerDefaultRetentionRule(input []backuppolicies.BasePolicyRule) []BackupPolicyMySQLFlexibleServerDefaultRetentionRule { + results := make([]BackupPolicyMySQLFlexibleServerDefaultRetentionRule, 0) + + for _, item := range input { + if retentionRule, ok := item.(backuppolicies.AzureRetentionRule); ok { + if pointer.From(retentionRule.IsDefault) { + var lifeCycle []BackupPolicyMySQLFlexibleServerLifeCycle + if v := retentionRule.Lifecycles; len(v) > 0 { + lifeCycle = flattenBackupPolicyMySQLFlexibleServerLifeCycles(v) + } + + results = append(results, BackupPolicyMySQLFlexibleServerDefaultRetentionRule{ + LifeCycle: lifeCycle, + }) + } + } + } + + return results +} + +func flattenBackupPolicyMySQLFlexibleServerRetentionRules(input []backuppolicies.BasePolicyRule) []BackupPolicyMySQLFlexibleServerRetentionRule { + results := make([]BackupPolicyMySQLFlexibleServerRetentionRule, 0) + var taggingCriterias []backuppolicies.TaggingCriteria + + for _, item := range input { + if backupRule, ok := item.(backuppolicies.AzureBackupRule); ok { + if trigger, ok := backupRule.Trigger.(backuppolicies.ScheduleBasedTriggerContext); ok { + if trigger.TaggingCriteria != nil { + taggingCriterias = trigger.TaggingCriteria + } + } + } + } + + for _, item := range input { + if retentionRule, ok := item.(backuppolicies.AzureRetentionRule); ok { + var name string + var taggingPriority int64 + var taggingCriteria []BackupPolicyMySQLFlexibleServerCriteria + + if !pointer.From(retentionRule.IsDefault) { + name = retentionRule.Name + + for _, criteria := range taggingCriterias { + if strings.EqualFold(criteria.TagInfo.TagName, name) { + taggingPriority = criteria.TaggingPriority + taggingCriteria = flattenBackupPolicyMySQLFlexibleServerBackupCriteria(criteria.Criteria) + break + } + } + + var lifeCycle []BackupPolicyMySQLFlexibleServerLifeCycle + if v := retentionRule.Lifecycles; len(v) > 0 { + lifeCycle = flattenBackupPolicyMySQLFlexibleServerLifeCycles(v) + } + + results = append(results, BackupPolicyMySQLFlexibleServerRetentionRule{ + Name: name, + Priority: taggingPriority, + Criteria: taggingCriteria, + LifeCycle: lifeCycle, + }) + } + } + } + + return results +} + +func flattenBackupPolicyMySQLFlexibleServerLifeCycles(input []backuppolicies.SourceLifeCycle) []BackupPolicyMySQLFlexibleServerLifeCycle { + results := make([]BackupPolicyMySQLFlexibleServerLifeCycle, 0) + + for _, item := range input { + var duration string + var dataStoreType string + + if deleteOption, ok := item.DeleteAfter.(backuppolicies.AbsoluteDeleteOption); ok { + duration = deleteOption.Duration + } + + dataStoreType = string(item.SourceDataStore.DataStoreType) + + results = append(results, BackupPolicyMySQLFlexibleServerLifeCycle{ + Duration: duration, + DataStoreType: dataStoreType, + }) + } + + return results +} + +func flattenBackupPolicyMySQLFlexibleServerBackupCriteria(input *[]backuppolicies.BackupCriteria) []BackupPolicyMySQLFlexibleServerCriteria { + results := make([]BackupPolicyMySQLFlexibleServerCriteria, 0) + if input == nil { + return results + } + + for _, item := range pointer.From(input) { + if criteria, ok := item.(backuppolicies.ScheduleBasedBackupCriteria); ok { + var absoluteCriteria string + if criteria.AbsoluteCriteria != nil && len(pointer.From(criteria.AbsoluteCriteria)) > 0 { + absoluteCriteria = string((pointer.From(criteria.AbsoluteCriteria))[0]) + } + + daysOfWeek := make([]string, 0) + if criteria.DaysOfTheWeek != nil { + for _, item := range pointer.From(criteria.DaysOfTheWeek) { + daysOfWeek = append(daysOfWeek, (string)(item)) + } + } + + monthsOfYear := make([]string, 0) + if criteria.MonthsOfYear != nil { + for _, item := range pointer.From(criteria.MonthsOfYear) { + monthsOfYear = append(monthsOfYear, (string)(item)) + } + } + + weeksOfMonth := make([]string, 0) + if criteria.WeeksOfTheMonth != nil { + for _, item := range pointer.From(criteria.WeeksOfTheMonth) { + weeksOfMonth = append(weeksOfMonth, (string)(item)) + } + } + + scheduleTimes := make([]string, 0) + if criteria.ScheduleTimes != nil { + scheduleTimes = append(scheduleTimes, pointer.From(criteria.ScheduleTimes)...) + } + + results = append(results, BackupPolicyMySQLFlexibleServerCriteria{ + AbsoluteCriteria: absoluteCriteria, + DaysOfWeek: daysOfWeek, + MonthsOfYear: monthsOfYear, + WeeksOfMonth: weeksOfMonth, + ScheduledBackupTimes: scheduleTimes, + }) + } + } + + return results +} diff --git a/internal/services/dataprotection/data_protection_backup_policy_mysql_flexible_server_resource_test.go b/internal/services/dataprotection/data_protection_backup_policy_mysql_flexible_server_resource_test.go new file mode 100644 index 0000000000000..a8a3be1f2c357 --- /dev/null +++ b/internal/services/dataprotection/data_protection_backup_policy_mysql_flexible_server_resource_test.go @@ -0,0 +1,201 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package dataprotection_test + +import ( + "context" + "fmt" + "testing" + + "github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-04-01/backuppolicies" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" + "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/utils" +) + +type DataProtectionBackupPolicyMySQLFlexibleServerResource struct{} + +func TestAccDataProtectionBackupPolicyMySQLFlexibleServer_basic(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_data_protection_backup_policy_mysql_flexible_server", "test") + r := DataProtectionBackupPolicyMySQLFlexibleServerResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + +func TestAccDataProtectionBackupPolicyMySQLFlexibleServer_requiresImport(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_data_protection_backup_policy_mysql_flexible_server", "test") + r := DataProtectionBackupPolicyMySQLFlexibleServerResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.RequiresImportErrorStep(r.requiresImport), + }) +} + +func TestAccDataProtectionBackupPolicyMySQLFlexibleServer_complete(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_data_protection_backup_policy_mysql_flexible_server", "test") + r := DataProtectionBackupPolicyMySQLFlexibleServerResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.complete(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + +func (r DataProtectionBackupPolicyMySQLFlexibleServerResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { + id, err := backuppolicies.ParseBackupPolicyID(state.ID) + if err != nil { + return nil, err + } + resp, err := client.DataProtection.BackupPolicyClient.Get(ctx, *id) + if err != nil { + return nil, fmt.Errorf("reading %s: %+v", *id, err) + } + return utils.Bool(resp.Model != nil), nil +} + +func (r DataProtectionBackupPolicyMySQLFlexibleServerResource) template(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "test" { + name = "acctest-dataprotection-%d" + location = "%s" +} + +resource "azurerm_data_protection_backup_vault" "test" { + name = "acctest-dbv-%d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + datastore_type = "VaultStore" + redundancy = "LocallyRedundant" +} +`, data.RandomInteger, data.Locations.Primary, data.RandomInteger) +} + +func (r DataProtectionBackupPolicyMySQLFlexibleServerResource) basic(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +resource "azurerm_data_protection_backup_policy_mysql_flexible_server" "test" { + name = "acctest-dbp-%d" + vault_id = azurerm_data_protection_backup_vault.test.id + backup_repeating_time_intervals = ["R/2021-05-23T02:30:00+00:00/P1W"] + + default_retention_rule { + life_cycle { + duration = "P4M" + data_store_type = "VaultStore" + } + } +} +`, r.template(data), data.RandomInteger) +} + +func (r DataProtectionBackupPolicyMySQLFlexibleServerResource) requiresImport(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +resource "azurerm_data_protection_backup_policy_mysql_flexible_server" "import" { + name = azurerm_data_protection_backup_policy_mysql_flexible_server.test.name + vault_id = azurerm_data_protection_backup_policy_mysql_flexible_server.test.vault_id + backup_repeating_time_intervals = ["R/2021-05-23T02:30:00+00:00/P1W"] + + default_retention_rule { + life_cycle { + duration = "P4M" + data_store_type = "VaultStore" + } + } +} +`, r.basic(data)) +} + +func (r DataProtectionBackupPolicyMySQLFlexibleServerResource) complete(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +resource "azurerm_data_protection_backup_policy_mysql_flexible_server" "test" { + name = "acctest-dbp-%d" + vault_id = azurerm_data_protection_backup_vault.test.id + backup_repeating_time_intervals = ["R/2021-05-23T02:30:00+00:00/P1W", "R/2021-05-24T03:40:00+00:00/P1W"] + time_zone = "India Standard Time" + + default_retention_rule { + life_cycle { + duration = "P4M" + data_store_type = "VaultStore" + } + } + + retention_rule { + name = "weekly" + priority = 20 + + life_cycle { + duration = "P6M" + data_store_type = "VaultStore" + } + + criteria { + absolute_criteria = "FirstOfWeek" + } + } + + retention_rule { + name = "thursday" + priority = 25 + + life_cycle { + duration = "P1W" + data_store_type = "VaultStore" + } + + criteria { + days_of_week = ["Thursday", "Friday"] + months_of_year = ["November", "December"] + scheduled_backup_times = ["2021-05-23T02:30:00Z"] + } + } + + retention_rule { + name = "monthly" + priority = 30 + + life_cycle { + duration = "P1D" + data_store_type = "VaultStore" + } + + criteria { + weeks_of_month = ["First", "Last"] + days_of_week = ["Tuesday"] + scheduled_backup_times = ["2021-05-23T02:30:00Z", "2021-05-24T03:40:00Z"] + } + } +} +`, r.template(data), data.RandomInteger) +} diff --git a/internal/services/dataprotection/data_protection_backup_vault_resource.go b/internal/services/dataprotection/data_protection_backup_vault_resource.go index a5e7be76fa48c..93259ed969d2b 100644 --- a/internal/services/dataprotection/data_protection_backup_vault_resource.go +++ b/internal/services/dataprotection/data_protection_backup_vault_resource.go @@ -71,6 +71,11 @@ func resourceDataProtectionBackupVault() *pluginsdk.Resource { }, false), }, + "cross_region_restore_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + }, + "identity": commonschema.SystemAssignedIdentityOptional(), "retention_duration_in_days": { @@ -94,6 +99,21 @@ func resourceDataProtectionBackupVault() *pluginsdk.Resource { pluginsdk.ForceNewIfChange("soft_delete", func(ctx context.Context, old, new, meta interface{}) bool { return old.(string) == string(backupvaults.SoftDeleteStateAlwaysOn) && new.(string) != string(backupvaults.SoftDeleteStateAlwaysOn) }), + + // Once `cross_region_restore_enabled` is enabled it cannot be disabled. + pluginsdk.ForceNewIfChange("cross_region_restore_enabled", func(ctx context.Context, old, new, meta interface{}) bool { + return old.(bool) && new.(bool) != old.(bool) + }), + + pluginsdk.CustomizeDiffShim(func(ctx context.Context, d *pluginsdk.ResourceDiff, v interface{}) error { + redundancy := d.Get("redundancy").(string) + crossRegionRestore := d.GetRawConfig().AsValueMap()["cross_region_restore_enabled"] + if !crossRegionRestore.IsNull() && redundancy != string(backupvaults.StorageSettingTypesGeoRedundant) { + // Cross region restore is only allowed on `GeoRedundant` vault. + return fmt.Errorf("`cross_region_restore_enabled` can only be specified when `redundancy` is specified for `GeoRedundant`.") + } + return nil + }), ), } @@ -175,6 +195,17 @@ func resourceDataProtectionBackupVaultCreateUpdate(d *pluginsdk.ResourceData, me Tags: expandTags(d.Get("tags").(map[string]interface{})), } + if !pluginsdk.IsExplicitlyNullInConfig(d, "cross_region_restore_enabled") { + parameters.Properties.FeatureSettings = &backupvaults.FeatureSettings{ + CrossRegionRestoreSettings: &backupvaults.CrossRegionRestoreSettings{}, + } + if d.Get("cross_region_restore_enabled").(bool) { + parameters.Properties.FeatureSettings.CrossRegionRestoreSettings.State = pointer.To(backupvaults.CrossRegionRestoreStateEnabled) + } else { + parameters.Properties.FeatureSettings.CrossRegionRestoreSettings.State = pointer.To(backupvaults.CrossRegionRestoreStateDisabled) + } + } + if v, ok := d.GetOk("retention_duration_in_days"); ok { parameters.Properties.SecuritySettings.SoftDeleteSettings.RetentionDurationInDays = pointer.To(v.(float64)) } @@ -223,6 +254,16 @@ func resourceDataProtectionBackupVaultRead(d *pluginsdk.ResourceData, meta inter d.Set("retention_duration_in_days", pointer.From(softDelete.RetentionDurationInDays)) } } + crossRegionStoreEnabled := false + if featureSetting := model.Properties.FeatureSettings; featureSetting != nil { + if featureSetting := model.Properties.FeatureSettings; featureSetting != nil { + if pointer.From(featureSetting.CrossRegionRestoreSettings.State) == backupvaults.CrossRegionRestoreStateEnabled { + crossRegionStoreEnabled = true + } + } + } + + d.Set("cross_region_restore_enabled", crossRegionStoreEnabled) if err = d.Set("identity", flattenBackupVaultDppIdentityDetails(model.Identity)); err != nil { return fmt.Errorf("setting `identity`: %+v", err) diff --git a/internal/services/dataprotection/data_protection_backup_vault_resource_test.go b/internal/services/dataprotection/data_protection_backup_vault_resource_test.go index acc75c8793e1c..31a7b0bd24693 100644 --- a/internal/services/dataprotection/data_protection_backup_vault_resource_test.go +++ b/internal/services/dataprotection/data_protection_backup_vault_resource_test.go @@ -33,6 +33,20 @@ func TestAccDataProtectionBackupVault_basic(t *testing.T) { }) } +func TestAccDataProtectionBackupVault_crossRegionRestore(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_data_protection_backup_vault", "test") + r := DataProtectionBackupVaultResource{} + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.crossRegionRestore(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + func TestAccDataProtectionBackupVault_zoneRedundant(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_data_protection_backup_vault", "test") r := DataProtectionBackupVaultResource{} @@ -178,6 +192,22 @@ resource "azurerm_data_protection_backup_vault" "test" { `, template, data.RandomInteger) } +func (r DataProtectionBackupVaultResource) crossRegionRestore(data acceptance.TestData) string { + template := r.template(data) + return fmt.Sprintf(` +%s + +resource "azurerm_data_protection_backup_vault" "test" { + name = "acctest-bv-%d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + datastore_type = "VaultStore" + redundancy = "GeoRedundant" + cross_region_restore_enabled = true +} +`, template, data.RandomInteger) +} + func (r DataProtectionBackupVaultResource) requiresImport(data acceptance.TestData) string { config := r.basic(data) return fmt.Sprintf(` diff --git a/internal/services/dataprotection/registration.go b/internal/services/dataprotection/registration.go index 1a34a885793d0..b2fbd92bb26d5 100644 --- a/internal/services/dataprotection/registration.go +++ b/internal/services/dataprotection/registration.go @@ -59,6 +59,7 @@ func (r Registration) DataSources() []sdk.DataSource { func (r Registration) Resources() []sdk.Resource { return []sdk.Resource{ DataProtectionBackupPolicyKubernatesClusterResource{}, + DataProtectionBackupPolicyMySQLFlexibleServerResource{}, DataProtectionBackupPolicyPostgreSQLFlexibleServerResource{}, DataProtectionBackupInstanceKubernatesClusterResource{}, DataProtectionBackupInstancePostgreSQLFlexibleServerResource{}, diff --git a/internal/services/dataprotection/validate/backup_policy_mysql_flexible_server_name.go b/internal/services/dataprotection/validate/backup_policy_mysql_flexible_server_name.go new file mode 100644 index 0000000000000..56f7a901e359d --- /dev/null +++ b/internal/services/dataprotection/validate/backup_policy_mysql_flexible_server_name.go @@ -0,0 +1,23 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package validate + +import ( + "fmt" + "regexp" +) + +func BackupPolicyMySQLFlexibleServerName(i interface{}, k string) (warnings []string, errors []error) { + v, ok := i.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected type of %q to be string", k)) + return + } + + if !regexp.MustCompile("^[-a-zA-Z0-9]{3,150}$").MatchString(v) { + errors = append(errors, fmt.Errorf("%q must be 3 - 150 characters long, contain only letters, numbers and hyphens", k)) + } + + return warnings, errors +} diff --git a/internal/services/dataprotection/validate/backup_policy_mysql_flexible_server_name_test.go b/internal/services/dataprotection/validate/backup_policy_mysql_flexible_server_name_test.go new file mode 100644 index 0000000000000..25c1a3fa8c5f4 --- /dev/null +++ b/internal/services/dataprotection/validate/backup_policy_mysql_flexible_server_name_test.go @@ -0,0 +1,61 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package validate + +import ( + "strings" + "testing" +) + +func TestBackupPolicyMySQLFlexibleServerName(t *testing.T) { + testCases := []struct { + Input string + Expected bool + }{ + { + Input: "", + Expected: false, + }, + { + Input: "aaaa", + Expected: true, + }, + { + Input: "a8a", + Expected: true, + }, + { + Input: "a-8.a", + Expected: false, + }, + { + Input: "a-a", + Expected: true, + }, + { + Input: "a.a", + Expected: false, + }, + { + Input: strings.Repeat("s", 149), + Expected: true, + }, + { + Input: strings.Repeat("s", 150), + Expected: true, + }, + { + Input: strings.Repeat("s", 151), + Expected: false, + }, + } + + for _, v := range testCases { + _, errors := BackupPolicyMySQLFlexibleServerName(v.Input, "name") + result := len(errors) == 0 + if result != v.Expected { + t.Fatalf("Expected the result to be %t but got %t (and %d errors)", v.Expected, result, len(errors)) + } + } +} diff --git a/internal/services/dataprotection/validate/backup_policy_mysql_flexible_server_time_zone.go b/internal/services/dataprotection/validate/backup_policy_mysql_flexible_server_time_zone.go new file mode 100644 index 0000000000000..700c5a57302d2 --- /dev/null +++ b/internal/services/dataprotection/validate/backup_policy_mysql_flexible_server_time_zone.go @@ -0,0 +1,157 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package validate + +import ( + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" +) + +func BackupPolicyMySQLFlexibleServerTimeZone() pluginsdk.SchemaValidateFunc { + // Output from [System.TimeZoneInfo]::GetSystemTimeZones() + candidates := []string{ + "Afghanistan Standard Time", + "Alaskan Standard Time", + "Aleutian Standard Time", + "Altai Standard Time", + "Arab Standard Time", + "Arabian Standard Time", + "Arabic Standard Time", + "Argentina Standard Time", + "Astrakhan Standard Time", + "Atlantic Standard Time", + "AUS Central Standard Time", + "Aus Central W. Standard Time", + "AUS Eastern Standard Time", + "Azerbaijan Standard Time", + "Azores Standard Time", + "Bahia Standard Time", + "Bangladesh Standard Time", + "Belarus Standard Time", + "Bougainville Standard Time", + "Canada Central Standard Time", + "Cape Verde Standard Time", + "Caucasus Standard Time", + "Cen. Australia Standard Time", + "Central America Standard Time", + "Central Asia Standard Time", + "Central Brazilian Standard Time", + "Central Europe Standard Time", + "Central European Standard Time", + "Central Pacific Standard Time", + "Central Standard Time", + "Central Standard Time (Mexico)", + "Chatham Islands Standard Time", + "China Standard Time", + "Cuba Standard Time", + "Dateline Standard Time", + "E. Africa Standard Time", + "E. Australia Standard Time", + "E. Europe Standard Time", + "E. South America Standard Time", + "Easter Island Standard Time", + "Eastern Standard Time", + "Eastern Standard Time (Mexico)", + "Egypt Standard Time", + "Ekaterinburg Standard Time", + "Fiji Standard Time", + "FLE Standard Time", + "Georgian Standard Time", + "GMT Standard Time", + "Greenland Standard Time", + "Greenwich Standard Time", + "GTB Standard Time", + "Haiti Standard Time", + "Hawaiian Standard Time", + "India Standard Time", + "Iran Standard Time", + "Israel Standard Time", + "Jordan Standard Time", + "Kaliningrad Standard Time", + "Kamchatka Standard Time", + "Korea Standard Time", + "Libya Standard Time", + "Line Islands Standard Time", + "Lord Howe Standard Time", + "Magadan Standard Time", + "Magallanes Standard Time", + "Marquesas Standard Time", + "Mauritius Standard Time", + "Mid-Atlantic Standard Time", + "Middle East Standard Time", + "Montevideo Standard Time", + "Morocco Standard Time", + "Mountain Standard Time", + "Mountain Standard Time (Mexico)", + "Myanmar Standard Time", + "N. Central Asia Standard Time", + "Namibia Standard Time", + "Nepal Standard Time", + "New Zealand Standard Time", + "Newfoundland Standard Time", + "Norfolk Standard Time", + "North Asia East Standard Time", + "North Asia Standard Time", + "North Korea Standard Time", + "Omsk Standard Time", + "Pacific SA Standard Time", + "Pacific Standard Time", + "Pacific Standard Time (Mexico)", + "Pakistan Standard Time", + "Paraguay Standard Time", + "Qyzylorda Standard Time", + "Romance Standard Time", + "Russia Time Zone 10", + "Russia Time Zone 11", + "Russia Time Zone 3", + "Russian Standard Time", + "SA Eastern Standard Time", + "SA Pacific Standard Time", + "SA Western Standard Time", + "Saint Pierre Standard Time", + "Sakhalin Standard Time", + "Samoa Standard Time", + "Sao Tome Standard Time", + "Saratov Standard Time", + "SE Asia Standard Time", + "Singapore Standard Time", + "South Africa Standard Time", + "South Sudan Standard Time", + "Sri Lanka Standard Time", + "Sudan Standard Time", + "Syria Standard Time", + "Taipei Standard Time", + "Tasmania Standard Time", + "Tocantins Standard Time", + "Tokyo Standard Time", + "Tomsk Standard Time", + "Tonga Standard Time", + "Transbaikal Standard Time", + "Turkey Standard Time", + "Turks And Caicos Standard Time", + "Ulaanbaatar Standard Time", + "US Eastern Standard Time", + "US Mountain Standard Time", + "UTC", + "UTC-02", + "UTC-08", + "UTC-09", + "UTC-11", + "UTC+12", + "UTC+13", + "Venezuela Standard Time", + "Vladivostok Standard Time", + "Volgograd Standard Time", + "W. Australia Standard Time", + "W. Central Africa Standard Time", + "W. Europe Standard Time", + "W. Mongolia Standard Time", + "West Asia Standard Time", + "West Bank Standard Time", + "West Pacific Standard Time", + "Yakutsk Standard Time", + "Yukon Standard Time", + } + return validation.StringInSlice(candidates, false) +} diff --git a/internal/services/devtestlabs/dev_test_lab_data_source_test.go b/internal/services/devtestlabs/dev_test_lab_data_source_test.go index 8f06c57b9253d..7ff41e6b19eec 100644 --- a/internal/services/devtestlabs/dev_test_lab_data_source_test.go +++ b/internal/services/devtestlabs/dev_test_lab_data_source_test.go @@ -36,7 +36,7 @@ func TestAccDevTestLabDataSource_complete(t *testing.T) { { Config: r.complete(data), Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).Key("storage_type").HasValue("Standard"), + check.That(data.ResourceName).Key("storage_type").HasValue("Premium"), check.That(data.ResourceName).Key("tags.%").HasValue("1"), check.That(data.ResourceName).Key("tags.Hello").HasValue("World"), ), diff --git a/internal/services/devtestlabs/dev_test_lab_resource.go b/internal/services/devtestlabs/dev_test_lab_resource.go index ce4b0f5b6517f..599215e36d57e 100644 --- a/internal/services/devtestlabs/dev_test_lab_resource.go +++ b/internal/services/devtestlabs/dev_test_lab_resource.go @@ -8,7 +8,6 @@ import ( "log" "time" - "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" @@ -16,12 +15,10 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/services/devtestlabs/migration" "github.com/hashicorp/terraform-provider-azurerm/internal/services/devtestlabs/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tags" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -97,19 +94,6 @@ func resourceDevTestLab() *pluginsdk.Resource { }, } - if !features.FourPointOhBeta() { - resource.Schema["storage_type"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - Optional: true, - Default: string(labs.StorageTypePremium), - ValidateFunc: validation.StringInSlice([]string{ - string(labs.StorageTypeStandard), - string(labs.StorageTypePremium), - }, false), - Deprecated: "`storage_type` is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0.", - } - } - return resource } @@ -143,13 +127,6 @@ func resourceDevTestLabCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) Tags: expandTags(d.Get("tags").(map[string]interface{})), } - if !features.FourPointOhBeta() { - storageType := labs.StorageType(d.Get("storage_type").(string)) - parameters.Properties = &labs.LabProperties{ - LabStorageType: &storageType, - } - } - err := client.CreateOrUpdateThenPoll(ctx, id, parameters) if err != nil { return fmt.Errorf("creating/updating %s: %+v", id, err) @@ -190,9 +167,6 @@ func resourceDevTestLabRead(d *pluginsdk.ResourceData, meta interface{}) error { } if props := model.Properties; props != nil { - if !features.FourPointOhBeta() { - d.Set("storage_type", string(pointer.From(props.LabStorageType))) - } // Computed fields d.Set("artifacts_storage_account_id", props.ArtifactsStorageAccount) d.Set("default_storage_account_id", props.DefaultStorageAccount) diff --git a/internal/services/disks/client/client.go b/internal/services/disks/client/client.go deleted file mode 100644 index 8678e1185321e..0000000000000 --- a/internal/services/disks/client/client.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package client - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets" - "github.com/hashicorp/terraform-provider-azurerm/internal/common" -) - -type Client struct { - DiskPoolsClient *diskpools.DiskPoolsClient - DisksPoolIscsiTargetClient *iscsitargets.IscsiTargetsClient -} - -func NewClient(o *common.ClientOptions) (*Client, error) { - diskPoolsClient, err := diskpools.NewDiskPoolsClientWithBaseURI(o.Environment.ResourceManager) - if err != nil { - return nil, fmt.Errorf("building Disk Pools Client: %+v", err) - } - o.Configure(diskPoolsClient.Client, o.Authorizers.ResourceManager) - - iscsiTargetClient, err := iscsitargets.NewIscsiTargetsClientWithBaseURI(o.Environment.ResourceManager) - if err != nil { - return nil, fmt.Errorf("building Iscsi Target Client: %+v", err) - } - o.Configure(iscsiTargetClient.Client, o.Authorizers.ResourceManager) - - return &Client{ - DiskPoolsClient: diskPoolsClient, - DisksPoolIscsiTargetClient: iscsiTargetClient, - }, nil -} diff --git a/internal/services/disks/disk_pool_iscsi_target_lun_resource.go b/internal/services/disks/disk_pool_iscsi_target_lun_resource.go deleted file mode 100644 index 02647e11e841f..0000000000000 --- a/internal/services/disks/disk_pool_iscsi_target_lun_resource.go +++ /dev/null @@ -1,288 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package disks - -import ( - "context" - "fmt" - "regexp" - "sort" - "strings" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-provider-azurerm/internal/locks" - "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/disks/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/disks/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" -) - -var _ sdk.Resource = DiskPoolIscsiTargetLunModel{} -var _ sdk.ResourceWithDeprecationAndNoReplacement = DiskPoolIscsiTargetLunModel{} - -type DiskPoolIscsiTargetLunModel struct { - IscsiTargetId string `tfschema:"iscsi_target_id"` - ManagedDiskAttachmentId string `tfschema:"disk_pool_managed_disk_attachment_id"` - Name string `tfschema:"name"` - Lun int64 `tfschema:"lun"` -} - -func (DiskPoolIscsiTargetLunModel) DeprecationMessage() string { - return "The `azurerm_disk_pool_iscsi_target_lun` resource is deprecated and will be removed in v4.0 of the AzureRM Provider." -} - -func (d DiskPoolIscsiTargetLunModel) Arguments() map[string]*schema.Schema { - return map[string]*schema.Schema{ - "iscsi_target_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: iscsitargets.ValidateIscsiTargetID, - }, - "disk_pool_managed_disk_attachment_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.DiskPoolManagedDiskAttachment, - }, - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.All( - validation.StringLenBetween(1, 90), - validation.StringMatch(regexp.MustCompile(`^[A-Za-z\d.\-_]*[A-Za-z\d]$`), "supported characters include [0-9A-Za-z-_.]; name should end with an alphanumeric character"), - ), - }, - } -} - -func (d DiskPoolIscsiTargetLunModel) Attributes() map[string]*schema.Schema { - return map[string]*schema.Schema{ - "lun": { - Type: pluginsdk.TypeInt, - Computed: true, - }, - } -} - -func (d DiskPoolIscsiTargetLunModel) ModelObject() interface{} { - return &DiskPoolIscsiTargetLunModel{} -} - -func (d DiskPoolIscsiTargetLunModel) ResourceType() string { - return "azurerm_disk_pool_iscsi_target_lun" -} - -func (d DiskPoolIscsiTargetLunModel) Create() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 60 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - m := DiskPoolIscsiTargetLunModel{} - err := metadata.Decode(&m) - if err != nil { - return err - } - iscsiTargetId, err := iscsitargets.ParseIscsiTargetID(m.IscsiTargetId) - if err != nil { - return err - } - attachmentId, err := parse.DiskPoolManagedDiskAttachmentID(m.ManagedDiskAttachmentId) - if err != nil { - return err - } - id := parse.NewDiskPoolIscsiTargetLunId(*iscsiTargetId, attachmentId.ManagedDiskId) - - locks.ByID(iscsiTargetId.ID()) - defer locks.UnlockByID(iscsiTargetId.ID()) - - client := metadata.Client.Disks.DisksPoolIscsiTargetClient - resp, err := client.Get(ctx, *iscsiTargetId) - if err != nil { - return fmt.Errorf("retrieving %q: %+v", iscsiTargetId, err) - } - if resp.Model == nil { - return fmt.Errorf("malformed Iscsi Target response %q : %+v", iscsiTargetId.ID(), resp) - } - var luns []iscsitargets.IscsiLun - if resp.Model.Properties.Luns != nil { - luns = *resp.Model.Properties.Luns - } - for _, lun := range luns { - if lun.ManagedDiskAzureResourceId == attachmentId.ManagedDiskId.ID() { - return metadata.ResourceRequiresImport(d.ResourceType(), id) - } - } - - luns = append(luns, iscsitargets.IscsiLun{ - ManagedDiskAzureResourceId: attachmentId.ManagedDiskId.ID(), - Name: m.Name, - }) - sort.Slice(luns, func(i, j int) bool { - return luns[i].ManagedDiskAzureResourceId < luns[j].ManagedDiskAzureResourceId - }) - patch := iscsitargets.IscsiTargetUpdate{ - Properties: iscsitargets.IscsiTargetUpdateProperties{ - Luns: &luns, - }, - } - - deadline, ok := ctx.Deadline() - if !ok { - return fmt.Errorf("could not retrieve context deadline for %s", id.ID()) - } - err = d.RetryError(time.Until(deadline), "waiting for creation DisksPool iscsi target", id.ID(), func() error { - return client.UpdateThenPoll(ctx, *iscsiTargetId, patch) - }) - if err != nil { - return err - } - metadata.SetID(id) - return nil - }, - } -} - -func (d DiskPoolIscsiTargetLunModel) Read() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 5 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - id, err := parse.IscsiTargetLunID(metadata.ResourceData.Id()) - if err != nil { - return err - } - iscsiTargetId := id.IscsiTargetId - - client := metadata.Client.Disks.DisksPoolIscsiTargetClient - resp, err := client.Get(ctx, iscsiTargetId) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return metadata.MarkAsGone(id) - } - return fmt.Errorf("retrieving %q: %+v", iscsiTargetId, err) - } - if resp.Model == nil { - return fmt.Errorf("malformed Iscsi Target response %q : %+v", iscsiTargetId.ID(), resp) - } - if resp.Model.Properties.Luns == nil { - return metadata.MarkAsGone(id) - } - - for _, lun := range *resp.Model.Properties.Luns { - if lun.ManagedDiskAzureResourceId == id.ManagedDiskId.ID() { - diskPoolId := diskpools.NewDiskPoolID(iscsiTargetId.SubscriptionId, iscsiTargetId.ResourceGroupName, iscsiTargetId.DiskPoolName) - diskId, err := commonids.ParseManagedDiskIDInsensitively(lun.ManagedDiskAzureResourceId) - if err != nil { - return fmt.Errorf("invalid managed disk id in iscsi target response %q : %q", iscsiTargetId.ID(), lun.ManagedDiskAzureResourceId) - } - attachmentId := parse.NewDiskPoolManagedDiskAttachmentId(diskPoolId, *diskId) - if lun.Lun == nil { - return fmt.Errorf("malformed Iscsi Target response %q : %+v", iscsiTargetId.ID(), resp) - } - m := DiskPoolIscsiTargetLunModel{ - IscsiTargetId: iscsiTargetId.ID(), - Lun: *lun.Lun, - ManagedDiskAttachmentId: attachmentId.ID(), - Name: lun.Name, - } - return metadata.Encode(&m) - } - } - - return metadata.MarkAsGone(id) - }, - } -} - -func (d DiskPoolIscsiTargetLunModel) Delete() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 60 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - m := DiskPoolIscsiTargetLunModel{} - err := metadata.Decode(&m) - if err != nil { - return err - } - iscsiTargetId, err := iscsitargets.ParseIscsiTargetID(m.IscsiTargetId) - if err != nil { - return err - } - attachmentId, err := parse.DiskPoolManagedDiskAttachmentID(m.ManagedDiskAttachmentId) - if err != nil { - return err - } - id := parse.NewDiskPoolIscsiTargetLunId(*iscsiTargetId, attachmentId.ManagedDiskId) - - locks.ByID(iscsiTargetId.ID()) - defer locks.UnlockByID(iscsiTargetId.ID()) - - client := metadata.Client.Disks.DisksPoolIscsiTargetClient - resp, err := client.Get(ctx, *iscsiTargetId) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return nil - } - return fmt.Errorf("retrieving %q: %+v", iscsiTargetId, err) - } - if resp.Model == nil { - return fmt.Errorf("malformed Iscsi Target response %q : %+v", iscsiTargetId.ID(), resp) - } - if resp.Model.Properties.Luns == nil { - return nil - } - luns := make([]iscsitargets.IscsiLun, 0) - for _, lun := range *resp.Model.Properties.Luns { - if lun.ManagedDiskAzureResourceId != id.ManagedDiskId.ID() { - luns = append(luns, lun) - } - } - sort.Slice(luns, func(i, j int) bool { - return luns[i].ManagedDiskAzureResourceId < luns[j].ManagedDiskAzureResourceId - }) - patch := iscsitargets.IscsiTargetUpdate{ - Properties: iscsitargets.IscsiTargetUpdateProperties{ - Luns: &luns, - }, - } - - deadline, ok := ctx.Deadline() - if !ok { - return fmt.Errorf("could not retrieve context deadline for %s", id.ID()) - } - return d.RetryError(time.Until(deadline), "waiting for delete DisksPool iscsi target lun", id.ID(), func() error { - return client.UpdateThenPoll(ctx, *iscsiTargetId, patch) - }) - }, - } -} - -func (d DiskPoolIscsiTargetLunModel) IDValidationFunc() pluginsdk.SchemaValidateFunc { - return validate.DiskPoolIscsiTargetLunId -} - -func (DiskPoolIscsiTargetLunModel) RetryError(timeout time.Duration, action string, id string, retryFunc func() error) error { - return pluginsdk.Retry(timeout, func() *pluginsdk.RetryError { - err := retryFunc() - if err == nil { - return nil - } - // according to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-pools-troubleshoot#common-failure-codes-when-enabling-iscsi-on-disk-pools the errors below are retryable. - retryableErrors := []string{ - "GoalStateApplicationTimeoutError", - "OngoingOperationInProgress", - } - for _, retryableError := range retryableErrors { - if strings.Contains(err.Error(), retryableError) { - return pluginsdk.RetryableError(fmt.Errorf("%s %s: %+v", action, id, err)) - } - } - return pluginsdk.NonRetryableError(fmt.Errorf("%s %s: %+v", action, id, err)) - }) -} diff --git a/internal/services/disks/disk_pool_iscsi_target_lun_resource_test.go b/internal/services/disks/disk_pool_iscsi_target_lun_resource_test.go deleted file mode 100644 index d5ebe23a4aba9..0000000000000 --- a/internal/services/disks/disk_pool_iscsi_target_lun_resource_test.go +++ /dev/null @@ -1,354 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package disks_test - -import ( - "context" - "fmt" - "sort" - "testing" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/locks" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/disks" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/disks/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type DisksPoolIscsiTargetLunResource struct{} - -func TestAccDiskPoolIscsiTargetLun_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_disk_pool_iscsi_target_lun", "test") - l := DisksPoolIscsiTargetLunResource{} - data.ResourceTest(t, l, []acceptance.TestStep{ - { - Config: l.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(l), - ), - }, - data.ImportStep(), - }) -} - -func TestAccDiskPoolIscsiTargetLun_multipleLuns(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_disk_pool_iscsi_target_lun", "test0") - l := DisksPoolIscsiTargetLunResource{} - data.ResourceTest(t, l, []acceptance.TestStep{ - { - Config: l.multipleLuns(data, 2), - Check: acceptance.ComposeTestCheckFunc( - check.That("azurerm_disk_pool_iscsi_target_lun.test0").ExistsInAzure(l), - check.That("azurerm_disk_pool_iscsi_target_lun.test1").ExistsInAzure(l), - ), - }, - data.ImportStep(), - { - Config: l.multipleLuns(data, 1), - Check: acceptance.ComposeTestCheckFunc( - check.That("azurerm_disk_pool_iscsi_target_lun.test0").ExistsInAzure(l), - ), - }, - data.ImportStep(), - }) -} - -func TestAccDiskPoolIscsiTargetLun_updateName(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_disk_pool_iscsi_target_lun", "test") - l := DisksPoolIscsiTargetLunResource{} - data.ResourceTest(t, l, []acceptance.TestStep{ - { - Config: l.basic(data), - }, - data.ImportStep(), - { - Config: l.updateName(data), - }, - data.ImportStep(), - }) -} - -func TestAccDiskPoolIscsiTargetLun_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_disk_pool_iscsi_target_lun", "test") - l := DisksPoolIscsiTargetLunResource{} - data.ResourceTest(t, l, []acceptance.TestStep{ - { - Config: l.basic(data), - }, - { - Config: l.requiresImport(data), - ExpectError: acceptance.RequiresImportError("azurerm_disk_pool_iscsi_target_lun"), - }, - }) -} - -func TestAccDiskPoolIscsiTargetLun_destroy(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_disk_pool_iscsi_target_lun", "test") - l := DisksPoolIscsiTargetLunResource{} - data.ResourceTest(t, l, []acceptance.TestStep{ - data.DisappearsStep(acceptance.DisappearsStepData{ - Config: l.basic, - TestResource: l, - }), - }) -} - -func (r DisksPoolIscsiTargetLunResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.IscsiTargetLunID(state.ID) - if err != nil { - return nil, err - } - - client := clients.Disks.DisksPoolIscsiTargetClient - resp, err := client.Get(ctx, id.IscsiTargetId) - - if err != nil { - return nil, fmt.Errorf("retrieving %q: %+v", id.IscsiTargetId, err) - } - if resp.Model == nil { - return nil, fmt.Errorf("malformed Iscsi Target response %q : %+v", id.IscsiTargetId, resp) - } - var luns []iscsitargets.IscsiLun - if resp.Model.Properties.Luns != nil { - luns = *resp.Model.Properties.Luns - } - for _, lun := range luns { - if lun.ManagedDiskAzureResourceId == id.ManagedDiskId.ID() { - return utils.Bool(true), nil - } - } - return utils.Bool(false), nil -} - -func (r DisksPoolIscsiTargetLunResource) Destroy(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - ctx, cancel := context.WithTimeout(ctx, 60*time.Minute) - defer cancel() - id, err := parse.IscsiTargetLunID(state.ID) - if err != nil { - return nil, err - } - - iscsiTargetId := id.IscsiTargetId - - locks.ByID(iscsiTargetId.ID()) - defer locks.UnlockByID(iscsiTargetId.ID()) - - client := clients.Disks.DisksPoolIscsiTargetClient - resp, err := client.Get(ctx, iscsiTargetId) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return utils.Bool(true), nil - } - return nil, fmt.Errorf("retrieving %q: %+v", iscsiTargetId, err) - } - if resp.Model == nil { - return nil, fmt.Errorf("malformed Iscsi Target response %q : %+v", iscsiTargetId.ID(), resp) - } - if resp.Model.Properties.Luns == nil { - return utils.Bool(true), nil - } - luns := make([]iscsitargets.IscsiLun, 0) - for _, lun := range *resp.Model.Properties.Luns { - if lun.ManagedDiskAzureResourceId != id.ManagedDiskId.ID() { - luns = append(luns, lun) - } - } - sort.Slice(luns, func(i, j int) bool { - return luns[i].ManagedDiskAzureResourceId < luns[j].ManagedDiskAzureResourceId - }) - patch := iscsitargets.IscsiTargetUpdate{ - Properties: iscsitargets.IscsiTargetUpdateProperties{ - Luns: &luns, - }, - } - - m := disks.DiskPoolIscsiTargetLunModel{} - - deadline, ok := ctx.Deadline() - if !ok { - return nil, fmt.Errorf("could not retrieve context deadline") - } - err = m.RetryError(time.Until(deadline), "waiting for delete DisksPool iscsi target", id.ID(), func() error { - return client.UpdateThenPoll(ctx, iscsiTargetId, patch) - }) - if err != nil { - return nil, err - } - return utils.Bool(true), nil -} - -func (r DisksPoolIscsiTargetLunResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_disk_pool_iscsi_target_lun" "test" { - iscsi_target_id = azurerm_disk_pool_iscsi_target.test.id - disk_pool_managed_disk_attachment_id = azurerm_disk_pool_managed_disk_attachment.test[0].id - name = "test-0" -} -`, r.template(data, 1)) -} - -func (r DisksPoolIscsiTargetLunResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_disk_pool_iscsi_target_lun" "import" { - iscsi_target_id = azurerm_disk_pool_iscsi_target.test.id - disk_pool_managed_disk_attachment_id = azurerm_disk_pool_managed_disk_attachment.test[0].id - name = "test-0" -} -`, r.basic(data)) -} - -func (r DisksPoolIscsiTargetLunResource) updateName(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_disk_pool_iscsi_target_lun" "test" { - iscsi_target_id = azurerm_disk_pool_iscsi_target.test.id - disk_pool_managed_disk_attachment_id = azurerm_disk_pool_managed_disk_attachment.test[0].id - name = "updated-test-0" -} -`, r.template(data, 1)) -} - -func (r DisksPoolIscsiTargetLunResource) multipleLuns(data acceptance.TestData, diskCount int) string { - tfCode := r.template(data, diskCount) - for i := 0; i < diskCount; i++ { - tfCode = fmt.Sprintf(` -%[1]s - -resource "azurerm_disk_pool_iscsi_target_lun" "test%[2]d" { - iscsi_target_id = azurerm_disk_pool_iscsi_target.test.id - disk_pool_managed_disk_attachment_id = azurerm_disk_pool_managed_disk_attachment.test[%[2]d].id - name = "test-%[2]d" -} -`, tfCode, i) - } - return tfCode -} - -func (r DisksPoolIscsiTargetLunResource) template(data acceptance.TestData, diskCount int) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} -provider "azuread" {} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-diskspool-%[2]d" - location = "%[1]s" -} - -resource "azurerm_virtual_network" "test" { - name = "acctest-vnet-%[2]d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - address_space = ["10.0.0.0/16"] -} - -resource "azurerm_subnet" "test" { - name = "acctest-subnet-%[2]d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.0.0.0/24"] - delegation { - name = "diskspool" - service_delegation { - actions = ["Microsoft.Network/virtualNetworks/read"] - name = "Microsoft.StoragePool/diskPools" - } - } -} - -locals { - disk_count = %[4]d -} - -resource "azurerm_managed_disk" "test" { - count = local.disk_count - name = "acctest-diskspool-%[2]d${count.index}" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - create_option = "Empty" - storage_account_type = "Premium_LRS" - disk_size_gb = 4 - max_shares = 2 - zone = "1" -} - -data "azuread_service_principal" "test" { - display_name = "StoragePool Resource Provider" -} -// DO NOT attempt to use mod operator to make two assignments into one because we must use "%%" to escape percent sign and that will break terrafmt -resource "azurerm_role_assignment" "disk_pool_operator" { - count = local.disk_count - principal_id = data.azuread_service_principal.test.id - role_definition_name = "Disk Pool Operator" - scope = azurerm_managed_disk.test[count.index].id -} - -resource "azurerm_role_assignment" "vm_contributor" { - count = local.disk_count - principal_id = data.azuread_service_principal.test.id - role_definition_name = "Virtual Machine Contributor" - scope = azurerm_managed_disk.test[count.index].id -} - -resource "azurerm_disk_pool" "test" { - name = "acctest-diskspool-%[3]s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - zones = ["1"] - sku_name = "Basic_B1" - subnet_id = azurerm_subnet.test.id - tags = { - "env" = "qa" - } -} - -resource "azurerm_disk_pool_managed_disk_attachment" "test" { - count = local.disk_count - depends_on = [azurerm_role_assignment.disk_pool_operator, azurerm_role_assignment.vm_contributor] - disk_pool_id = azurerm_disk_pool.test.id - managed_disk_id = azurerm_managed_disk.test[count.index].id -} - -resource "azurerm_disk_pool_iscsi_target" "test" { - depends_on = [azurerm_disk_pool_managed_disk_attachment.test] - name = "acctest-diskpool-%[3]s" - acl_mode = "Dynamic" - disks_pool_id = azurerm_disk_pool.test.id - target_iqn = "iqn.2021-11.com.microsoft:test" -} -`, data.Locations.Primary, data.RandomInteger, data.RandomString, diskCount) -} diff --git a/internal/services/disks/disk_pool_iscsi_target_resource.go b/internal/services/disks/disk_pool_iscsi_target_resource.go deleted file mode 100644 index 823e5e3785540..0000000000000 --- a/internal/services/disks/disk_pool_iscsi_target_resource.go +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package disks - -import ( - "context" - "fmt" - "regexp" - "strings" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-provider-azurerm/internal/locks" - "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/disks/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" -) - -type DisksPoolIscsiTargetResource struct{} - -var _ sdk.Resource = DisksPoolIscsiTargetResource{} -var _ sdk.ResourceWithDeprecationAndNoReplacement = DisksPoolIscsiTargetResource{} - -type DiskPoolIscsiTargetModel struct { - ACLMode string `tfschema:"acl_mode"` - DisksPoolId string `tfschema:"disks_pool_id"` - Endpoints []string `tfschema:"endpoints"` - Name string `tfschema:"name"` - Port int `tfschema:"port"` - TargetIqn string `tfschema:"target_iqn"` -} - -func (DisksPoolIscsiTargetResource) DeprecationMessage() string { - return "The `azurerm_disk_pool_iscsi_target` resource is deprecated and will be removed in v4.0 of the AzureRM Provider." -} - -func (d DisksPoolIscsiTargetResource) Arguments() map[string]*schema.Schema { - return map[string]*schema.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.All( - validation.StringLenBetween(5, 223), - validation.StringMatch( - regexp.MustCompile(`[a-z\d.\-]*[a-z\d]$`), - "The iSCSI target name can only contain lowercase letters, numbers, periods, or hyphens.", - ), - ), - }, - - "acl_mode": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice( - []string{string(iscsitargets.IscsiTargetAclModeDynamic)}, - false, - ), - }, - - "disks_pool_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: iscsitargets.ValidateDiskPoolID, - }, - - "target_iqn": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validate.IQN, - }, - } -} - -func (d DisksPoolIscsiTargetResource) Attributes() map[string]*schema.Schema { - return map[string]*schema.Schema{ - "endpoints": { - Type: pluginsdk.TypeList, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - }, - Computed: true, - }, - "port": { - Type: pluginsdk.TypeInt, - Computed: true, - }, - } -} - -func (d DisksPoolIscsiTargetResource) ModelObject() interface{} { - return &DisksPoolIscsiTargetResource{} -} - -func (d DisksPoolIscsiTargetResource) ResourceType() string { - return "azurerm_disk_pool_iscsi_target" -} - -func (d DisksPoolIscsiTargetResource) Create() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 60 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - m := DiskPoolIscsiTargetModel{} - err := metadata.Decode(&m) - if err != nil { - return err - } - - poolId, err := iscsitargets.ParseDiskPoolID(m.DisksPoolId) - if err != nil { - return err - } - if poolId.SubscriptionId != metadata.Client.Account.SubscriptionId { - return fmt.Errorf("Disk Pool subscription id %q is different from provider's subscription", poolId.SubscriptionId) - } - - id := iscsitargets.NewIscsiTargetID(poolId.SubscriptionId, poolId.ResourceGroupName, poolId.DiskPoolName, m.Name) - client := metadata.Client.Disks.DisksPoolIscsiTargetClient - locks.ByID(poolId.ID()) - defer locks.UnlockByID(poolId.ID()) - - existing, err := client.Get(ctx, id) - notExistingResp := response.WasNotFound(existing.HttpResponse) - if err != nil && !notExistingResp { - return fmt.Errorf("checking for presence of existing %q: %+v", id, err) - } - if !notExistingResp { - return metadata.ResourceRequiresImport(d.ResourceType(), id) - } - - future, err := client.CreateOrUpdate(ctx, id, iscsitargets.IscsiTargetCreate{ - Properties: iscsitargets.IscsiTargetCreateProperties{ - AclMode: iscsitargets.IscsiTargetAclMode(m.ACLMode), - TargetIqn: &m.TargetIqn, - }, - }) - if err != nil { - return fmt.Errorf("creating DisksPool iscsi target %q : %+v", id.ID(), err) - } - - deadline, ok := ctx.Deadline() - if !ok { - return fmt.Errorf("could not retrieve context deadline for %s", id.ID()) - } - //lintignore:R006 - return pluginsdk.Retry(time.Until(deadline), func() *pluginsdk.RetryError { - //lintignore:R006 - if err := d.retryError("waiting for creation DisksPool iscsi target", id.ID(), future.Poller.PollUntilDone(ctx)); err != nil { - return err - } - metadata.SetID(id) - return nil - }) - }, - } -} - -func (d DisksPoolIscsiTargetResource) Read() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 5 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - id, err := iscsitargets.ParseIscsiTargetID(metadata.ResourceData.Id()) - if err != nil { - return err - } - client := metadata.Client.Disks.DisksPoolIscsiTargetClient - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return metadata.MarkAsGone(id) - } - return fmt.Errorf("retrieving %s: %+v", id, err) - } - if resp.Model == nil { - return fmt.Errorf("malformed Disk Pool response %q : %+v", id.ID(), resp) - } - poolID := iscsitargets.NewDiskPoolID(id.SubscriptionId, id.ResourceGroupName, id.DiskPoolName) - m := DiskPoolIscsiTargetModel{ - ACLMode: string(resp.Model.Properties.AclMode), - DisksPoolId: poolID.ID(), - Name: id.IscsiTargetName, - } - if endpoints := resp.Model.Properties.Endpoints; endpoints != nil { - m.Endpoints = *endpoints - } - if port := resp.Model.Properties.Port; port != nil { - m.Port = int(*port) - } - m.TargetIqn = resp.Model.Properties.TargetIqn - return metadata.Encode(&m) - }, - } -} - -func (d DisksPoolIscsiTargetResource) Delete() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 60 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - id, err := iscsitargets.ParseIscsiTargetID(metadata.ResourceData.Id()) - if err != nil { - return err - } - locks.ByID(id.ID()) - defer locks.UnlockByID(id.ID()) - - client := metadata.Client.Disks.DisksPoolIscsiTargetClient - future, err := client.Delete(ctx, *id) - if err != nil { - return fmt.Errorf("deleting DisksPool iscsi target %q: %+v", id.ID(), err) - } - - deadline, ok := ctx.Deadline() - if !ok { - return fmt.Errorf("could not retrieve context deadline for %s", id) - } - //lintignore:R006 - return pluginsdk.Retry(time.Until(deadline), func() *pluginsdk.RetryError { - return d.retryError("waiting for deletion of DisksPool iscsi target", id.ID(), future.Poller.PollUntilDone(ctx)) - }) - }, - } -} - -func (d DisksPoolIscsiTargetResource) IDValidationFunc() pluginsdk.SchemaValidateFunc { - return iscsitargets.ValidateIscsiTargetID -} - -func (DisksPoolIscsiTargetResource) retryError(action string, id string, err error) *pluginsdk.RetryError { - if err == nil { - return nil - } - - // according to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-pools-troubleshoot#common-failure-codes-when-enabling-iscsi-on-disk-pools the errors below are retryable. - retryableErrors := []string{ - "GoalStateApplicationTimeoutError", - "OngoingOperationInProgress", - } - for _, retryableError := range retryableErrors { - if strings.Contains(err.Error(), retryableError) { - return pluginsdk.RetryableError(fmt.Errorf("%s %s: %+v", action, id, err)) - } - } - return pluginsdk.NonRetryableError(fmt.Errorf("%s %s: %+v", action, id, err)) -} diff --git a/internal/services/disks/disk_pool_iscsi_target_resource_test.go b/internal/services/disks/disk_pool_iscsi_target_resource_test.go deleted file mode 100644 index a56c867e6ecbf..0000000000000 --- a/internal/services/disks/disk_pool_iscsi_target_resource_test.go +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package disks_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type DisksPoolIscsiTargetResource struct{} - -func TestDiskPoolIscsiTarget_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_disk_pool_iscsi_target", "test") - i := DisksPoolIscsiTargetResource{} - - data.ResourceTest(t, i, []acceptance.TestStep{ - { - Config: i.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(i), - ), - }, - data.ImportStep(), - }) -} - -func TestDiskPoolIscsiTarget_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_disk_pool_iscsi_target", "test") - i := DisksPoolIscsiTargetResource{} - data.ResourceTest(t, i, []acceptance.TestStep{ - { - Config: i.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(i), - ), - }, - { - Config: i.requiresImport(data), - ExpectError: acceptance.RequiresImportError("azurerm_disk_pool_iscsi_target"), - }, - }) -} - -func (i DisksPoolIscsiTargetResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := iscsitargets.ParseIscsiTargetID(state.ID) - if err != nil { - return nil, err - } - client := clients.Disks.DisksPoolIscsiTargetClient - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return utils.Bool(false), nil - } - return nil, fmt.Errorf("retrieving %s: %+v", id, err) - } - return utils.Bool(true), nil -} - -func (i DisksPoolIscsiTargetResource) template(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} -provider "azuread" {} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-diskspool-%[2]d" - location = "%[1]s" -} - -resource "azurerm_virtual_network" "test" { - name = "acctest-vnet-%[2]d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - address_space = ["10.0.0.0/16"] -} - -resource "azurerm_subnet" "test" { - name = "acctest-subnet-%[2]d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.0.0.0/24"] - delegation { - name = "diskspool" - service_delegation { - actions = ["Microsoft.Network/virtualNetworks/read"] - name = "Microsoft.StoragePool/diskPools" - } - } -} - -resource "azurerm_managed_disk" "test" { - name = "acctest-diskspool-%[2]d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - create_option = "Empty" - storage_account_type = "Premium_LRS" - disk_size_gb = 4 - max_shares = 2 - zone = "1" -} - -data "azuread_service_principal" "test" { - display_name = "StoragePool Resource Provider" -} - -locals { - roles = ["Disk Pool Operator", "Virtual Machine Contributor"] -} - -resource "azurerm_role_assignment" "test" { - count = length(local.roles) - principal_id = data.azuread_service_principal.test.id - role_definition_name = local.roles[count.index] - scope = azurerm_managed_disk.test.id -} - -resource "azurerm_disk_pool" "test" { - name = "acctest-diskspool-%[3]s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - zones = ["1"] - sku_name = "Basic_B1" - subnet_id = azurerm_subnet.test.id - tags = { - "env" = "qa" - } -} - -resource "azurerm_disk_pool_managed_disk_attachment" "test" { - depends_on = [azurerm_role_assignment.test] - disk_pool_id = azurerm_disk_pool.test.id - managed_disk_id = azurerm_managed_disk.test.id -} -`, data.Locations.Primary, data.RandomInteger, data.RandomString) -} - -func (i DisksPoolIscsiTargetResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_disk_pool_iscsi_target" "test" { - depends_on = [azurerm_disk_pool_managed_disk_attachment.test] - name = "acctest-diskpool-%s" - acl_mode = "Dynamic" - disks_pool_id = azurerm_disk_pool.test.id - target_iqn = "iqn.2021-11.com.microsoft:test" -} -`, i.template(data), data.RandomString) -} - -func (i DisksPoolIscsiTargetResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_disk_pool_iscsi_target" "import" { - name = "acctest-diskpool-%s" - acl_mode = "Dynamic" - disks_pool_id = azurerm_disk_pool.test.id - target_iqn = "iqn.2021-11.com.microsoft:test" -} -`, i.basic(data), data.RandomString) -} diff --git a/internal/services/disks/disk_pool_managed_disk_attachment_resource.go b/internal/services/disks/disk_pool_managed_disk_attachment_resource.go deleted file mode 100644 index f7cd4933d3ef4..0000000000000 --- a/internal/services/disks/disk_pool_managed_disk_attachment_resource.go +++ /dev/null @@ -1,213 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package disks - -import ( - "context" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-provider-azurerm/internal/locks" - "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/disks/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/disks/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -type DiskPoolManagedDiskAttachmentResource struct{} - -var _ sdk.Resource = DiskPoolManagedDiskAttachmentResource{} -var _ sdk.ResourceWithDeprecationAndNoReplacement = DiskPoolManagedDiskAttachmentResource{} - -type DiskPoolManagedDiskAttachmentModel struct { - DiskPoolId string `tfschema:"disk_pool_id"` - DiskId string `tfschema:"managed_disk_id"` -} - -func (DiskPoolManagedDiskAttachmentResource) DeprecationMessage() string { - return "The `azurerm_disk_pool_managed_disk_attachment` resource is deprecated and will be removed in v4.0 of the AzureRM Provider." -} - -func (d DiskPoolManagedDiskAttachmentResource) Arguments() map[string]*schema.Schema { - return map[string]*schema.Schema{ - "disk_pool_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: diskpools.ValidateDiskPoolID, - }, - "managed_disk_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: commonids.ValidateManagedDiskID, - }, - } -} - -func (d DiskPoolManagedDiskAttachmentResource) Attributes() map[string]*schema.Schema { - return map[string]*schema.Schema{} -} - -func (d DiskPoolManagedDiskAttachmentResource) ModelObject() interface{} { - return &DiskPoolManagedDiskAttachmentModel{} -} - -func (d DiskPoolManagedDiskAttachmentResource) ResourceType() string { - return "azurerm_disk_pool_managed_disk_attachment" -} - -func (d DiskPoolManagedDiskAttachmentResource) Create() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 60 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - attachment := DiskPoolManagedDiskAttachmentModel{} - err := metadata.Decode(&attachment) - if err != nil { - return err - } - subscriptionId := metadata.Client.Account.SubscriptionId - poolId, err := diskpools.ParseDiskPoolID(attachment.DiskPoolId) - if err != nil { - return err - } - if poolId.SubscriptionId != subscriptionId { - return fmt.Errorf("Disk Pool subscription id %q is different from provider's subscription", poolId.SubscriptionId) - } - diskId, err := commonids.ParseManagedDiskID(attachment.DiskId) - if err != nil { - return err - } - locks.ByID(attachment.DiskPoolId) - defer locks.UnlockByID(attachment.DiskPoolId) - id := parse.NewDiskPoolManagedDiskAttachmentId(*poolId, *diskId) - - client := metadata.Client.Disks.DiskPoolsClient - poolResp, err := client.Get(ctx, *poolId) - if err != nil { - return fmt.Errorf("retrieving %q: %+v", *poolId, err) - } - - inputDisks := make([]diskpools.Disk, 0) - if poolResp.Model != nil && poolResp.Model.Properties.Disks != nil { - inputDisks = *poolResp.Model.Properties.Disks - } - for _, disk := range inputDisks { - existedDiskId, err := commonids.ParseManagedDiskID(disk.Id) - if err != nil { - return fmt.Errorf("error on parsing existing attached disk id %q %+v", disk.Id, err) - } - if *existedDiskId == *diskId { - return metadata.ResourceRequiresImport(d.ResourceType(), id) - } - } - - inputDisks = append(inputDisks, diskpools.Disk{ - Id: diskId.ID(), - }) - - err = client.UpdateThenPoll(ctx, *poolId, diskpools.DiskPoolUpdate{ - Properties: diskpools.DiskPoolUpdateProperties{ - Disks: &inputDisks, - }, - }) - if err != nil { - return fmt.Errorf("creation of %q: %+v", id, err) - } - - metadata.SetID(id) - return nil - }, - } -} - -func (d DiskPoolManagedDiskAttachmentResource) Read() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 5 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - id, err := parse.DiskPoolManagedDiskAttachmentID(metadata.ResourceData.Id()) - if err != nil { - return err - } - poolId := id.DiskPoolId - client := metadata.Client.Disks.DiskPoolsClient - - poolResp, err := client.Get(ctx, poolId) - if err != nil { - if response.WasNotFound(poolResp.HttpResponse) { - return metadata.MarkAsGone(id) - } - return fmt.Errorf("retrieving disk pool %q error: %+v", id.DiskPoolId, err) - } - if poolResp.Model == nil || poolResp.Model.Properties.Disks == nil { - return metadata.MarkAsGone(id) - } - - for _, disk := range *poolResp.Model.Properties.Disks { - if disk.Id == id.ManagedDiskId.ID() { - m := DiskPoolManagedDiskAttachmentModel{ - DiskPoolId: id.DiskPoolId.ID(), - DiskId: id.ManagedDiskId.ID(), - } - return metadata.Encode(&m) - } - } - - return metadata.MarkAsGone(id) - }, - } -} - -func (d DiskPoolManagedDiskAttachmentResource) Delete() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 60 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - diskToDetach := &DiskPoolManagedDiskAttachmentModel{} - err := metadata.Decode(diskToDetach) - if err != nil { - return err - } - poolId, err := diskpools.ParseDiskPoolID(diskToDetach.DiskPoolId) - if err != nil { - return err - } - locks.ByID(diskToDetach.DiskPoolId) - defer locks.UnlockByID(diskToDetach.DiskPoolId) - - client := metadata.Client.Disks.DiskPoolsClient - pool, err := client.Get(ctx, *poolId) - if err != nil { - return fmt.Errorf("retrieving disk pool %q error %v", diskToDetach.DiskPoolId, err) - } - if pool.Model == nil || pool.Model.Properties.Disks == nil { - return nil - } - attachedDisks := *pool.Model.Properties.Disks - remainingDisks := make([]diskpools.Disk, 0) - for _, attachedDisk := range attachedDisks { - if attachedDisk.Id != diskToDetach.DiskId { - remainingDisks = append(remainingDisks, attachedDisk) - } - } - - err = client.UpdateThenPoll(ctx, *poolId, diskpools.DiskPoolUpdate{ - Properties: diskpools.DiskPoolUpdateProperties{ - Disks: &remainingDisks, - }, - }) - if err != nil { - return fmt.Errorf("error on deletion of disk pool managed disk attachment %q: %+v", metadata.ResourceData.Id(), err) - } - return nil - }, - } -} - -func (d DiskPoolManagedDiskAttachmentResource) IDValidationFunc() pluginsdk.SchemaValidateFunc { - return validate.DiskPoolManagedDiskAttachment -} diff --git a/internal/services/disks/disk_pool_managed_disk_attachment_resource_test.go b/internal/services/disks/disk_pool_managed_disk_attachment_resource_test.go deleted file mode 100644 index 8045903ac5174..0000000000000 --- a/internal/services/disks/disk_pool_managed_disk_attachment_resource_test.go +++ /dev/null @@ -1,289 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package disks_test - -import ( - "context" - "fmt" - "testing" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/disks/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type DisksPoolManagedDiskAttachmentResource struct{} - -func TestAccDiskPoolDiskAttachment_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_disk_pool_managed_disk_attachment", "test") - a := DisksPoolManagedDiskAttachmentResource{} - data.ResourceTest(t, a, []acceptance.TestStep{ - { - Config: a.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(a), - ), - }, - data.ImportStep(), - }) -} - -func TestAccDiskPoolDiskAttachment_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_disk_pool_managed_disk_attachment", "test") - a := DisksPoolManagedDiskAttachmentResource{} - data.ResourceTest(t, a, []acceptance.TestStep{ - { - Config: a.basic(data), - Check: check.That(data.ResourceName).ExistsInAzure(a), - }, - { - Config: a.requiresImport(data), - ExpectError: acceptance.RequiresImportError("azurerm_disk_pool_managed_disk_attachment"), - }, - }) -} - -func TestAccDiskPoolDiskAttachment_multipleDisks(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_disk_pool_managed_disk_attachment", "test") - a := DisksPoolManagedDiskAttachmentResource{} - secondResourceName := "azurerm_disk_pool_managed_disk_attachment.second" - data.ResourceTest(t, a, []acceptance.TestStep{ - { - Config: a.multipleDisks(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(a), - check.That(secondResourceName).ExistsInAzure(a), - ), - }, - data.ImportStep(), - { - Config: a.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(a), - ), - }, - data.ImportStep(), - }) -} - -func TestAccDiskPoolDiskAttachment_destroy(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_disk_pool_managed_disk_attachment", "test") - a := DisksPoolManagedDiskAttachmentResource{} - data.ResourceTest(t, a, []acceptance.TestStep{ - data.DisappearsStep(acceptance.DisappearsStepData{ - Config: a.basic, - TestResource: a, - }), - }) -} - -func (a DisksPoolManagedDiskAttachmentResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.DiskPoolManagedDiskAttachmentID(state.ID) - if err != nil { - return nil, err - } - poolId := id.DiskPoolId - diskId := id.ManagedDiskId - client := clients.Disks.DiskPoolsClient - resp, err := client.Get(ctx, poolId) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return utils.Bool(false), nil - } - return nil, fmt.Errorf("retrieving %q: %+v", id, err) - } - targetDiskId := diskId.ID() - if resp.Model == nil || resp.Model.Properties.Disks == nil { - return utils.Bool(false), nil - } - for _, disk := range *resp.Model.Properties.Disks { - if disk.Id == targetDiskId { - return utils.Bool(true), nil - } - } - return utils.Bool(false), nil -} - -func (a DisksPoolManagedDiskAttachmentResource) Destroy(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - ctx, cancel := context.WithTimeout(ctx, 60*time.Minute) - defer cancel() - id, err := parse.DiskPoolManagedDiskAttachmentID(state.ID) - if err != nil { - return nil, err - } - - client := clients.Disks.DiskPoolsClient - pool, err := client.Get(ctx, id.DiskPoolId) - if err != nil { - return nil, err - } - if pool.Model == nil || pool.Model.Properties.Disks == nil { - return nil, err - } - attachedDisks := pool.Model.Properties.Disks - remainingDisks := make([]diskpools.Disk, 0) - for _, attachedDisk := range *attachedDisks { - if attachedDisk.Id != id.ManagedDiskId.ID() { - remainingDisks = append(remainingDisks, attachedDisk) - } - } - - err = client.UpdateThenPoll(ctx, id.DiskPoolId, diskpools.DiskPoolUpdate{ - Properties: diskpools.DiskPoolUpdateProperties{ - Disks: &remainingDisks, - }, - }) - if err != nil { - return nil, err - } - return utils.Bool(true), nil -} - -func (a DisksPoolManagedDiskAttachmentResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -%s -resource "azurerm_disk_pool_managed_disk_attachment" "test" { - depends_on = [azurerm_role_assignment.test] - disk_pool_id = azurerm_disk_pool.test.id - managed_disk_id = azurerm_managed_disk.test.id -} -`, a.template(data)) -} - -func (a DisksPoolManagedDiskAttachmentResource) template(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} -provider "azuread" {} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-diskpool-%[2]d" - location = "%[1]s" -} - -resource "azurerm_virtual_network" "test" { - name = "acctest-vnet-%[2]d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - address_space = ["10.0.0.0/16"] -} - -resource "azurerm_subnet" "test" { - name = "acctest-subnet-%[2]d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.0.0.0/24"] - delegation { - name = "diskspool" - service_delegation { - actions = ["Microsoft.Network/virtualNetworks/read"] - name = "Microsoft.StoragePool/diskPools" - } - } -} - -resource "azurerm_managed_disk" "test" { - name = "acctest-diskpool-%[2]d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - create_option = "Empty" - storage_account_type = "Premium_LRS" - disk_size_gb = 4 - max_shares = 2 - zone = "1" -} - -data "azuread_service_principal" "test" { - display_name = "StoragePool Resource Provider" -} - -locals { - roles = ["Disk Pool Operator", "Virtual Machine Contributor"] -} - -resource "azurerm_role_assignment" "test" { - count = length(local.roles) - principal_id = data.azuread_service_principal.test.id - role_definition_name = local.roles[count.index] - scope = azurerm_managed_disk.test.id -} - -resource "azurerm_disk_pool" "test" { - name = "acctest-diskpool-%[3]s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - zones = ["1"] - sku_name = "Basic_B1" - subnet_id = azurerm_subnet.test.id - tags = { - "env" = "qa" - } -} -`, data.Locations.Primary, data.RandomInteger, data.RandomString) -} - -func (a DisksPoolManagedDiskAttachmentResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_disk_pool_managed_disk_attachment" "import" { - disk_pool_id = azurerm_disk_pool.test.id - managed_disk_id = azurerm_managed_disk.test.id -} -`, a.basic(data)) -} - -func (a DisksPoolManagedDiskAttachmentResource) multipleDisks(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_managed_disk" "second" { - name = "acctest-diskspool-%d-2" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - create_option = "Empty" - storage_account_type = "Premium_LRS" - disk_size_gb = 4 - max_shares = 2 - zone = "1" -} - -resource "azurerm_role_assignment" "second" { - count = length(local.roles) - principal_id = data.azuread_service_principal.test.id - role_definition_name = local.roles[count.index] - scope = azurerm_managed_disk.second.id -} - -resource "azurerm_disk_pool_managed_disk_attachment" "second" { - depends_on = [azurerm_role_assignment.second] - disk_pool_id = azurerm_disk_pool.test.id - managed_disk_id = azurerm_managed_disk.second.id -} -`, a.basic(data), data.RandomInteger) -} diff --git a/internal/services/disks/disk_pool_resource.go b/internal/services/disks/disk_pool_resource.go deleted file mode 100644 index 63ed4d37d19b6..0000000000000 --- a/internal/services/disks/disk_pool_resource.go +++ /dev/null @@ -1,283 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package disks - -import ( - "context" - "fmt" - "strings" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-provider-azurerm/internal/locks" - "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" - disksValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/disks/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -var _ sdk.ResourceWithUpdate = DiskPoolResource{} -var _ sdk.ResourceWithDeprecationAndNoReplacement = DiskPoolResource{} - -type DiskPoolResource struct{} - -func (DiskPoolResource) DeprecationMessage() string { - return "The `azurerm_disk_pool` resource is deprecated and will be removed in v4.0 of the AzureRM Provider." -} - -type DiskPoolResourceModel struct { - Name string `tfschema:"name"` - ResourceGroupName string `tfschema:"resource_group_name"` - Location string `tfschema:"location"` - Sku string `tfschema:"sku_name"` - SubnetId string `tfschema:"subnet_id"` - Tags map[string]interface{} `tfschema:"tags"` - Zones zones.Schema `tfschema:"zones"` -} - -func (DiskPoolResource) Arguments() map[string]*schema.Schema { - return map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: disksValidate.DiskPoolName(), - }, - - "location": commonschema.Location(), - - "resource_group_name": commonschema.ResourceGroupName(), - - "sku_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: disksValidate.DiskPoolSku(), - }, - - "subnet_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: commonids.ValidateSubnetID, - }, - - "tags": commonschema.Tags(), - - "zones": commonschema.ZonesMultipleRequiredForceNew(), - } -} - -func (DiskPoolResource) Attributes() map[string]*schema.Schema { - return map[string]*schema.Schema{} -} - -func (DiskPoolResource) ModelObject() interface{} { - return &DiskPoolResourceModel{} -} - -func (DiskPoolResource) ResourceType() string { - return "azurerm_disk_pool" -} - -func (r DiskPoolResource) Create() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 30 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - subscriptionId := metadata.Client.Account.SubscriptionId - client := metadata.Client.Disks.DiskPoolsClient - - m := DiskPoolResourceModel{} - err := metadata.Decode(&m) - if err != nil { - return err - } - - id := diskpools.NewDiskPoolID(subscriptionId, m.ResourceGroupName, m.Name) - existing, err := client.Get(ctx, id) - if err != nil && !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for presence of existing %q: %+v", id, err) - } - if !response.WasNotFound(existing.HttpResponse) { - return metadata.ResourceRequiresImport(r.ResourceType(), id) - } - - createParameter := diskpools.DiskPoolCreate{ - Location: location.Normalize(m.Location), - Properties: diskpools.DiskPoolCreateProperties{ - AvailabilityZones: &m.Zones, - SubnetId: m.SubnetId, - }, - Sku: expandDisksPoolSku(m.Sku), - Tags: tags.Expand(m.Tags), - } - future, err := client.CreateOrUpdate(ctx, id, createParameter) - if err != nil { - return fmt.Errorf("creating %s: %+v", id, err) - } - deadline, ok := ctx.Deadline() - if !ok { - return fmt.Errorf("could not retrieve context deadline for %s", id.ID()) - } - - //lintignore:R006 - return pluginsdk.Retry(time.Until(deadline), func() *pluginsdk.RetryError { - if err := r.retryError("waiting for creation", id.ID(), future.Poller.PollUntilDone(ctx)); err != nil { - return err - } - metadata.SetID(id) - return nil - }) - }, - } -} - -func (DiskPoolResource) Read() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 5 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.Disks.DiskPoolsClient - id, err := diskpools.ParseDiskPoolID(metadata.ResourceData.Id()) - if err != nil { - return err - } - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return metadata.MarkAsGone(id) - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - m := DiskPoolResourceModel{ - Name: id.DiskPoolName, - ResourceGroupName: id.ResourceGroupName, - } - if model := resp.Model; model != nil { - if model.Sku != nil { - m.Sku = model.Sku.Name - } - m.Tags = tags.Flatten(model.Tags) - - m.Location = location.Normalize(model.Location) - m.SubnetId = model.Properties.SubnetId - m.Zones = model.Properties.AvailabilityZones - } - - return metadata.Encode(&m) - }, - } -} - -func (r DiskPoolResource) Delete() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 30 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.Disks.DiskPoolsClient - id, err := diskpools.ParseDiskPoolID(metadata.ResourceData.Id()) - if err != nil { - return err - } - - locks.ByID(id.ID()) - defer locks.UnlockByID(id.ID()) - - future, err := client.Delete(ctx, *id) - if err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - - deadline, ok := ctx.Deadline() - if !ok { - return fmt.Errorf("could not retrieve context deadline for %s", id) - } - - //lintignore:R006 - return pluginsdk.Retry(time.Until(deadline), func() *pluginsdk.RetryError { - return r.retryError("waiting for deletion", id.ID(), future.Poller.PollUntilDone(ctx)) - }) - }, - } -} - -func (DiskPoolResource) IDValidationFunc() pluginsdk.SchemaValidateFunc { - return diskpools.ValidateDiskPoolID -} - -func (r DiskPoolResource) Update() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 30 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.Disks.DiskPoolsClient - id, err := diskpools.ParseDiskPoolID(metadata.ResourceData.Id()) - if err != nil { - return err - } - - locks.ByID(metadata.ResourceData.Id()) - defer locks.UnlockByID(metadata.ResourceData.Id()) - - patch := diskpools.DiskPoolUpdate{} - var m DiskPoolResourceModel - if err = metadata.Decode(&m); err != nil { - return fmt.Errorf("decoding model: %+v", err) - } - - if metadata.ResourceData.HasChange("sku") { - sku := expandDisksPoolSku(m.Sku) - patch.Sku = &sku - } - if metadata.ResourceData.HasChange("tags") { - patch.Tags = tags.Expand(m.Tags) - } - - future, err := client.Update(ctx, *id, patch) - if err != nil { - return fmt.Errorf("updating %s: %+v", *id, err) - } - - deadline, ok := ctx.Deadline() - if !ok { - return fmt.Errorf("could not retrieve context deadline for %s", id.ID()) - } - - //lintignore:R006 - return pluginsdk.Retry(time.Until(deadline), func() *pluginsdk.RetryError { - return r.retryError("waiting for update", id.ID(), future.Poller.PollUntilDone(ctx)) - }) - }, - } -} - -func (DiskPoolResource) retryError(action string, id string, err error) *pluginsdk.RetryError { - if err == nil { - return nil - } - // according to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-pools-troubleshoot#common-failure-codes-when-deploying-a-disk-pool the errors below are retryable. - retryableErrors := []string{ - "DeploymentTimeout", - "GoalStateApplicationTimeoutError", - "OngoingOperationInProgress", - } - for _, retryableError := range retryableErrors { - if strings.Contains(err.Error(), retryableError) { - return pluginsdk.RetryableError(fmt.Errorf("%s %s: %+v", action, id, err)) - } - } - return pluginsdk.NonRetryableError(fmt.Errorf("%s %s: %+v", action, id, err)) -} - -func expandDisksPoolSku(sku string) diskpools.Sku { - parts := strings.Split(sku, "_") - return diskpools.Sku{ - Name: sku, - Tier: &parts[0], - } -} diff --git a/internal/services/disks/disk_pool_resource_test.go b/internal/services/disks/disk_pool_resource_test.go deleted file mode 100644 index 02456e6028f73..0000000000000 --- a/internal/services/disks/disk_pool_resource_test.go +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package disks_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type DiskPoolResourceTest struct{} - -func TestAccDiskPool_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_disk_pool", "test") - r := DiskPoolResourceTest{} - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccDiskPool_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_disk_pool", "test") - r := DiskPoolResourceTest{} - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func TestAccDiskPool_complete(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_disk_pool", "test") - r := DiskPoolResourceTest{} - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.complete(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func (DiskPoolResourceTest) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := diskpools.ParseDiskPoolID(state.ID) - if err != nil { - return nil, err - } - resp, err := clients.Disks.DiskPoolsClient.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return utils.Bool(false), nil - } - return nil, fmt.Errorf("retrieving %q: %+v", id, err) - } - return utils.Bool(resp.Model != nil), nil -} - -func (r DiskPoolResourceTest) basic(data acceptance.TestData) string { - template := r.template(data) - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -%s - -resource "azurerm_disk_pool" "test" { - name = "acctest-diskspool-%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - sku_name = "Basic_B1" - subnet_id = azurerm_subnet.test.id - zones = ["1"] -} -`, template, data.RandomString) -} - -func (r DiskPoolResourceTest) requiresImport(data acceptance.TestData) string { - template := r.basic(data) - return fmt.Sprintf(` -%s - -resource "azurerm_disk_pool" "import" { - name = azurerm_disk_pool.test.name - resource_group_name = azurerm_disk_pool.test.resource_group_name - location = azurerm_disk_pool.test.location - sku_name = azurerm_disk_pool.test.sku_name - subnet_id = azurerm_disk_pool.test.subnet_id - zones = azurerm_disk_pool.test.zones -} -`, template) -} - -func (r DiskPoolResourceTest) complete(data acceptance.TestData) string { - template := r.template(data) - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -%s - -resource "azurerm_disk_pool" "test" { - name = "acctest-diskspool-%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - sku_name = "Basic_B1" - subnet_id = azurerm_subnet.test.id - zones = ["1"] - tags = { - ENV = "Test" - } -} -`, template, data.RandomString) -} - -func (r DiskPoolResourceTest) template(data acceptance.TestData) string { - return fmt.Sprintf(` -resource "azurerm_resource_group" "test" { - name = "acctestRG-diskspool-%[2]d" - location = "%[1]s" -} - -resource "azurerm_virtual_network" "test" { - name = "acctest-vnet-%[2]d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - address_space = ["10.0.0.0/16"] -} - -resource "azurerm_subnet" "test" { - name = "acctest-subnet-%[2]d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.0.0.0/24"] - delegation { - name = "diskspool" - service_delegation { - actions = ["Microsoft.Network/virtualNetworks/read"] - name = "Microsoft.StoragePool/diskPools" - } - } -} -`, data.Locations.Primary, data.RandomInteger) -} diff --git a/internal/services/disks/parse/disk_pool_managed_disk_attachment.go b/internal/services/disks/parse/disk_pool_managed_disk_attachment.go deleted file mode 100644 index 7fb581ce4c112..0000000000000 --- a/internal/services/disks/parse/disk_pool_managed_disk_attachment.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package parse - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools" -) - -const storageDiskPoolManagedDiskAttachmentIdSeparator = "/managedDisks|" - -var _ resourceids.Id = DiskPoolManagedDiskAttachmentId{} - -type DiskPoolManagedDiskAttachmentId struct { - DiskPoolId diskpools.DiskPoolId - ManagedDiskId commonids.ManagedDiskId -} - -func NewDiskPoolManagedDiskAttachmentId(diskPoolId diskpools.DiskPoolId, managedDiskId commonids.ManagedDiskId) DiskPoolManagedDiskAttachmentId { - return DiskPoolManagedDiskAttachmentId{ - DiskPoolId: diskPoolId, - ManagedDiskId: managedDiskId, - } -} - -func (id DiskPoolManagedDiskAttachmentId) ID() string { - return fmt.Sprintf("%s%s%s", id.DiskPoolId.ID(), storageDiskPoolManagedDiskAttachmentIdSeparator, id.ManagedDiskId.ID()) -} - -func (id DiskPoolManagedDiskAttachmentId) String() string { - components := []string{ - fmt.Sprintf("Disk Pool %q", id.DiskPoolId.String()), - fmt.Sprintf("Managed Disk %q", id.ManagedDiskId.String()), - } - return fmt.Sprintf("Disk Pool Managed Disk Attachment: %s", strings.Join(components, " / ")) -} - -func DiskPoolManagedDiskAttachmentID(input string) (*DiskPoolManagedDiskAttachmentId, error) { - if !strings.Contains(input, storageDiskPoolManagedDiskAttachmentIdSeparator) { - return nil, fmt.Errorf("malformed disks pool managed disk attachment id:%q", input) - } - parts := strings.Split(input, storageDiskPoolManagedDiskAttachmentIdSeparator) - if len(parts) != 2 { - return nil, fmt.Errorf("malformed disks pool managed disk attachment id:%q", input) - } - - poolId, err := diskpools.ParseDiskPoolID(parts[0]) - if poolId == nil { - return nil, fmt.Errorf("malformed disks pool managed disk attachment id:%q", input) - } - if err != nil { - return nil, fmt.Errorf("malformed disks pool id: %q, %v", poolId.ID(), err) - } - diskId, err := commonids.ParseManagedDiskID(parts[1]) - if diskId == nil { - return nil, fmt.Errorf("malformed disks pool managed disk attachment id:%q", input) - } - if err != nil { - return nil, fmt.Errorf("malformed disk id: %q, %v", diskId.ID(), err) - } - id := NewDiskPoolManagedDiskAttachmentId(*poolId, *diskId) - return &id, nil -} diff --git a/internal/services/disks/parse/disk_pool_managed_disk_attachment_test.go b/internal/services/disks/parse/disk_pool_managed_disk_attachment_test.go deleted file mode 100644 index 24dffcdad3b48..0000000000000 --- a/internal/services/disks/parse/disk_pool_managed_disk_attachment_test.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package parse - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools" -) - -func TestDiskPoolManagedDiskAttachmentIDFormatter(t *testing.T) { - diskPoolId := diskpools.NewDiskPoolID("12345678-1234-9876-4563-123456789012", "resGroup1", "storagePool1") - managedDiskId := commonids.NewManagedDiskID("12345678-1234-9876-4563-123456789012", "resGroup1", "diks1") - actual := NewDiskPoolManagedDiskAttachmentId(diskPoolId, managedDiskId).ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.StoragePool/diskPools/storagePool1/managedDisks|/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/disks/diks1" - if actual != expected { - t.Fatalf("Expected %q but got %q", expected, actual) - } -} diff --git a/internal/services/disks/parse/iscsitarget_lun.go b/internal/services/disks/parse/iscsitarget_lun.go deleted file mode 100644 index bddceed35d0c7..0000000000000 --- a/internal/services/disks/parse/iscsitarget_lun.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package parse - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets" -) - -const iscsiTargetLunSeparator = "/lun|" - -var _ resourceids.Id = DiskPoolIscsiTargetLunId{} - -type DiskPoolIscsiTargetLunId struct { - IscsiTargetId iscsitargets.IscsiTargetId - ManagedDiskId commonids.ManagedDiskId -} - -func NewDiskPoolIscsiTargetLunId(iscsiTargetId iscsitargets.IscsiTargetId, managedDiskId commonids.ManagedDiskId) DiskPoolIscsiTargetLunId { - return DiskPoolIscsiTargetLunId{ - IscsiTargetId: iscsiTargetId, - ManagedDiskId: managedDiskId, - } -} - -func (id DiskPoolIscsiTargetLunId) ID() string { - return fmt.Sprintf("%s%s%s", id.IscsiTargetId.ID(), iscsiTargetLunSeparator, id.ManagedDiskId.ID()) -} - -func (id DiskPoolIscsiTargetLunId) String() string { - components := []string{ - fmt.Sprintf("Iscsi Target %q", id.IscsiTargetId.String()), - fmt.Sprintf("Managed Disk %q", id.ManagedDiskId.String()), - } - return fmt.Sprintf("Disk Pool Iscsi Target Lun: %s", strings.Join(components, " / ")) -} - -func IscsiTargetLunID(input string) (*DiskPoolIscsiTargetLunId, error) { - if !strings.Contains(input, iscsiTargetLunSeparator) { - return nil, fmt.Errorf("malformed iscsi target lun id:%q", input) - } - parts := strings.Split(input, iscsiTargetLunSeparator) - if len(parts) != 2 { - return nil, fmt.Errorf("malformed iscsi target lun id:%q", input) - } - - iscsiTargetId, err := iscsitargets.ParseIscsiTargetID(parts[0]) - if iscsiTargetId == nil { - return nil, fmt.Errorf("malformed iscsi target lun id:%q", input) - } - if err != nil { - return nil, fmt.Errorf("malformed iscsi target id: %q, %v", input, err) - } - managedDiskId, err := commonids.ParseManagedDiskID(parts[1]) - if managedDiskId == nil { - return nil, fmt.Errorf("malformed iscsi target id: %q", input) - } - if err != nil { - return nil, fmt.Errorf("malformed iscsi target id: %q, %v", input, err) - } - id := NewDiskPoolIscsiTargetLunId(*iscsiTargetId, *managedDiskId) - return &id, nil -} diff --git a/internal/services/disks/parse/iscsitarget_lun_test.go b/internal/services/disks/parse/iscsitarget_lun_test.go deleted file mode 100644 index b8c4492c57815..0000000000000 --- a/internal/services/disks/parse/iscsitarget_lun_test.go +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package parse - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets" -) - -func TestNewDiskPoolIscsiTargetLunId(t *testing.T) { - iscsiTargetId := iscsitargets.NewIscsiTargetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskPoolValue", "iscsiTargetValue") - managedDiskId := commonids.NewManagedDiskID("12345678-1234-9876-4563-123456789012", "resGroup1", "disk1") - id := NewDiskPoolIscsiTargetLunId(iscsiTargetId, managedDiskId) - - if id.IscsiTargetId != iscsiTargetId { - t.Fatalf("Expected iscsi taraget id:%s, actual is:%s", iscsiTargetId.ID(), id.IscsiTargetId.ID()) - } - - if id.ManagedDiskId != managedDiskId { - t.Fatalf("Expected lun is:%s, actual is %s", managedDiskId, id.ManagedDiskId) - } -} - -func TestFormatIscsiTargetLunId(t *testing.T) { - iscsiTargetId := iscsitargets.NewIscsiTargetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskPoolValue", "iscsiTargetValue") - managedDiskId := commonids.NewManagedDiskID("12345678-1234-9876-4563-123456789012", "resGroup1", "disk1") - id := NewDiskPoolIscsiTargetLunId(iscsiTargetId, managedDiskId) - - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.StoragePool/diskPools/diskPoolValue/iscsiTargets/iscsiTargetValue/lun|/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/disks/disk1" - - if expected != id.ID() { - t.Fatalf("Expected id: %s, actual is:%s", expected, id.ID()) - } -} - -func TestParseIscsiTargetLunID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *DiskPoolIscsiTargetLunId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.StoragePool", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.StoragePool/diskPools", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.StoragePool/diskPools/diskPoolValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.StoragePool/diskPools/diskPoolValue/iscsiTargets", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.StoragePool/diskPools/diskPoolValue/iscsiTargets/iscsiTargetValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.StoragePool/diskPools/diskPoolValue/iscsiTargets/iscsiTargetValue/lun|", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.StoragePool/diskPools/diskPoolValue/iscsiTargets/iscsiTargetValue/lun|/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/disks/disk1", - Expected: &DiskPoolIscsiTargetLunId{ - IscsiTargetId: iscsitargets.NewIscsiTargetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskPoolValue", "iscsiTargetValue"), - ManagedDiskId: commonids.NewManagedDiskID("12345678-1234-9876-4563-123456789012", "resGroup1", "disk1"), - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.StoragePool/diskPools/diskPoolValue/iscsiTargets/iscsiTargetValue/lun|/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/disks/disk1/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := IscsiTargetLunID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.IscsiTargetId != v.Expected.IscsiTargetId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.IscsiTargetId, actual.IscsiTargetId) - } - - if actual.ManagedDiskId != v.Expected.ManagedDiskId { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ManagedDiskId, actual.ManagedDiskId) - } - } -} diff --git a/internal/services/disks/registration.go b/internal/services/disks/registration.go deleted file mode 100644 index 184c4742350fd..0000000000000 --- a/internal/services/disks/registration.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package disks - -import ( - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" -) - -var _ sdk.TypedServiceRegistrationWithAGitHubLabel = Registration{} - -type Registration struct{} - -func (r Registration) AssociatedGitHubLabel() string { - return "service/disks" -} - -func (r Registration) Name() string { - return "Disks" -} - -func (r Registration) DataSources() []sdk.DataSource { - return []sdk.DataSource{} -} - -func (r Registration) Resources() []sdk.Resource { - resources := []sdk.Resource{ - DiskPoolResource{}, - DiskPoolManagedDiskAttachmentResource{}, - DisksPoolIscsiTargetResource{}, - DiskPoolIscsiTargetLunModel{}, - } - - if !features.FourPointOhBeta() { - return resources - } - - return []sdk.Resource{} -} - -func (r Registration) WebsiteCategories() []string { - return []string{ - "Disks", - "Storage", - } -} diff --git a/internal/services/disks/validate/disk_pool_managed_disk_attachment.go b/internal/services/disks/validate/disk_pool_managed_disk_attachment.go deleted file mode 100644 index d3c37d518a825..0000000000000 --- a/internal/services/disks/validate/disk_pool_managed_disk_attachment.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/disks/parse" -) - -func DiskPoolManagedDiskAttachment(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - if _, err := parse.DiskPoolManagedDiskAttachmentID(v); err != nil { - errors = append(errors, err) - } - return -} diff --git a/internal/services/disks/validate/disk_pool_managed_disk_attachment_test.go b/internal/services/disks/validate/disk_pool_managed_disk_attachment_test.go deleted file mode 100644 index 3a4aebdfdf04c..0000000000000 --- a/internal/services/disks/validate/disk_pool_managed_disk_attachment_test.go +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import "testing" - -func TestDiskPoolManagedDiskAttachmentID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing DiskPoolName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.StoragePool/", - Valid: false, - }, - - { - // missing value for DiskPoolName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.StoragePool/diskPools/", - Valid: false, - }, - - { - // missing valud for Managed Disk - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.StoragePool/diskPools/storagePool1", - Valid: false, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.STORAGEPOOL/DISKPOOLS/STORAGEPOOL1", - Valid: false, - }, - - { - // wrong separator - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.StoragePool/diskPools/storagePool1/disks|/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/disks/disk1", - Valid: false, - }, - - { - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.StoragePool/diskPools/storagePool1/managedDisks|", - Valid: false, - }, - - { - Input: "/managedDisks|/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/disks/disk1", - Valid: false, - }, - - { - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.StoragePool/diskPools/storagePool1/managedDisks|/subscriptions", - Valid: false, - }, - - { - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.StoragePool/diskPools/storagePool1/managedDisks|/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.StoragePool/diskPools/storagePool1/managedDisks|/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/disks/", - Valid: false, - }, - - { - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUP/RESGROUP1/PROVIDERS/MICROSOFT.STORAGEPOOL/DISKSPOOL/storagePool1/managedDisks|/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/providers/MICROSOFT.COMPUTE/DISKS/disk1", - Valid: false, - }, - - { - // missed pool part - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/disks/", - Valid: false, - }, - - { - // missed pool part - Input: "/managedDisks|/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/disks/", - Valid: false, - }, - - { - // wrong order - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/disks/disk1/managedDisks|/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.StoragePool/diskPools/storagePool1", - Valid: false, - }, - - { - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.StoragePool/diskPools/storagePool1/managedDisks|/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/disks/disk1", - Valid: true, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := DiskPoolManagedDiskAttachment(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Case %q, Expected %t but got %t", tc.Input, tc.Valid, valid) - } - } -} diff --git a/internal/services/disks/validate/disk_pool_name.go b/internal/services/disks/validate/disk_pool_name.go deleted file mode 100644 index f09e57fa284ee..0000000000000 --- a/internal/services/disks/validate/disk_pool_name.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "regexp" - - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" -) - -func DiskPoolName() pluginsdk.SchemaValidateFunc { - return validation.All( - validation.StringIsNotEmpty, - validation.StringLenBetween(7, 30), - validation.StringMatch( - regexp.MustCompile(`^[A-Za-z\d][A-Za-z\d.\-_]*[A-Za-z\d_]$`), - "The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens.", - ), - ) -} diff --git a/internal/services/disks/validate/disk_pool_sku.go b/internal/services/disks/validate/disk_pool_sku.go deleted file mode 100644 index 37df1d526aebd..0000000000000 --- a/internal/services/disks/validate/disk_pool_sku.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" -) - -func DiskPoolSku() pluginsdk.SchemaValidateFunc { - return validation.StringInSlice( - []string{ - "Basic_B1", - "Standard_S1", - "Premium_P1", - }, false, - ) -} diff --git a/internal/services/disks/validate/iscsi_qualified_name.go b/internal/services/disks/validate/iscsi_qualified_name.go deleted file mode 100644 index 245d96a6c5ae5..0000000000000 --- a/internal/services/disks/validate/iscsi_qualified_name.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "regexp" - - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" -) - -var IQN = validation.All( - validation.StringMatch( - regexp.MustCompile(`iqn\.(1|2)\d{3}-(0[1-9]|1[0-2])\.[:0-9a-z-.]+\.[:0-9a-z-.]+$`), - "IQN should follow the format `iqn.yyyy-mm..[:xyz]`; supported characters include [0-9a-z-.:]", - ), - validation.StringLenBetween(4, 223), -) diff --git a/internal/services/disks/validate/iscsi_qualified_name_test.go b/internal/services/disks/validate/iscsi_qualified_name_test.go deleted file mode 100644 index 2e9e255798421..0000000000000 --- a/internal/services/disks/validate/iscsi_qualified_name_test.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "testing" -) - -func TestStorageDisksPoolIscsiIqnName(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - { - Input: "iqn.2021-11.com.microsoft", - Valid: true, - }, - { - Input: "iqn.2021-11.com.microsoft:iscsi", - Valid: true, - }, - { - Input: "iqn.2021-11.com.microsoft:", - Valid: true, - }, - { - Input: "iqn.2021-11.com.microsoft:-", - Valid: true, - }, - { - Input: "iqn.2021-11.com..microsoft", - Valid: true, - }, - - { - Input: "iqn.2021-11.com.microsoft:_", - Valid: false, - }, - { - Input: "2021-11.com.microsoft", - Valid: false, - }, - { - Input: "iqn.2021-11", - Valid: false, - }, - { - Input: "iqn.a021-11.com.microsoft", - Valid: false, - }, - { - Input: "iqn.2021-l1.com.microsoft", - Valid: false, - }, - { - Input: "iqn.2021-11.com.microsoft:@", - Valid: false, - }, - } - for _, tc := range cases { - t.Run(tc.Input, func(t *testing.T) { - _, errors := IQN(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Case %s Expected %t but got %t", tc.Input, tc.Valid, valid) - } - }) - } -} diff --git a/internal/services/disks/validate/iscsi_target_lun.go b/internal/services/disks/validate/iscsi_target_lun.go deleted file mode 100644 index 981f50aae5dca..0000000000000 --- a/internal/services/disks/validate/iscsi_target_lun.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/disks/parse" -) - -func DiskPoolIscsiTargetLunId(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - if _, err := parse.IscsiTargetLunID(v); err != nil { - errors = append(errors, err) - } - return -} diff --git a/internal/services/extendedlocation/testdata/install_agent.py b/internal/services/extendedlocation/testdata/install_agent.py index a1640c942dc12..e529badd7ea60 100644 --- a/internal/services/extendedlocation/testdata/install_agent.py +++ b/internal/services/extendedlocation/testdata/install_agent.py @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # This python script is used to install a Helm client on the cluster. # This should be identical to the script used in the Azure Arc onboarding flow, plus setting custom location enabled. diff --git a/internal/services/extendedlocation/testdata/kind.yaml b/internal/services/extendedlocation/testdata/kind.yaml index 9f5717060033b..2de5b96fd039a 100644 --- a/internal/services/extendedlocation/testdata/kind.yaml +++ b/internal/services/extendedlocation/testdata/kind.yaml @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: diff --git a/internal/services/hdinsight/validate/node_definition_vm_size.go b/internal/services/hdinsight/validate/node_definition_vm_size.go index c6577032d8197..768154de621c3 100644 --- a/internal/services/hdinsight/validate/node_definition_vm_size.go +++ b/internal/services/hdinsight/validate/node_definition_vm_size.go @@ -89,6 +89,23 @@ var NodeDefinitionVMSize = []string{ "Standard_E48a_V4", "Standard_E64a_V4", "Standard_E96a_V4", + "Standard_D2ads_V5", + "Standard_D4ads_V5", + "Standard_D8ads_V5", + "Standard_D16ads_V5", + "Standard_D32ads_V5", + "Standard_D48ads_V5", + "Standard_D64ads_V5", + "Standard_D96ads_V5", + "Standard_E2ads_V5", + "Standard_E4ads_V5", + "Standard_E8ads_V5", + "Standard_E16ads_V5", + "Standard_E20ads_V5", + "Standard_E32ads_V5", + "Standard_E48ads_V5", + "Standard_E64ads_V5", + "Standard_E96ads_V5", "Standard_G1", "Standard_G2", "Standard_G3", diff --git a/internal/services/hybridcompute/arc_machine_resource.go b/internal/services/hybridcompute/arc_machine_resource.go new file mode 100644 index 0000000000000..aff4fc81ad8ae --- /dev/null +++ b/internal/services/hybridcompute/arc_machine_resource.go @@ -0,0 +1,158 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package hybridcompute + +import ( + "context" + "fmt" + "time" + + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-helpers/resourcemanager/location" + "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines" + "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" +) + +type ArcMachineResourceModel struct { + Name string `tfschema:"name"` + ResourceGroupName string `tfschema:"resource_group_name"` + Location string `tfschema:"location"` + Kind string `tfschema:"kind"` +} + +type ArcMachineResource struct{} + +func (r ArcMachineResource) ResourceType() string { + return "azurerm_arc_machine" +} + +func (r ArcMachineResource) ModelObject() interface{} { + return &ArcMachineResourceModel{} +} + +func (r ArcMachineResource) IDValidationFunc() pluginsdk.SchemaValidateFunc { + return machines.ValidateMachineID +} + +func (r ArcMachineResource) Arguments() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "resource_group_name": commonschema.ResourceGroupName(), + + "location": commonschema.Location(), + + "kind": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice(machines.PossibleValuesForArcKindEnum(), false), + }, + } +} + +func (r ArcMachineResource) Attributes() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{} +} + +func (r ArcMachineResource) Create() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 30 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + subscriptionId := metadata.Client.Account.SubscriptionId + client := metadata.Client.HybridCompute.HybridComputeClient_v2024_07_10.Machines + + var model ArcMachineResourceModel + if err := metadata.Decode(&model); err != nil { + return fmt.Errorf("decoding: %+v", err) + } + + id := machines.NewMachineID(subscriptionId, model.ResourceGroupName, model.Name) + + existing, err := client.Get(ctx, id, machines.DefaultGetOperationOptions()) + if err != nil { + if !response.WasNotFound(existing.HttpResponse) { + return fmt.Errorf("checking for the presence of an existing %s: %+v", id, err) + } + } + if !response.WasNotFound(existing.HttpResponse) { + return metadata.ResourceRequiresImport(r.ResourceType(), id) + } + + parameters := machines.Machine{ + Location: location.Normalize(model.Location), + Kind: pointer.To(machines.ArcKindEnum(model.Kind)), + } + + if _, err := client.CreateOrUpdate(ctx, id, parameters, machines.DefaultCreateOrUpdateOperationOptions()); err != nil { + return fmt.Errorf("creating %s: %+v", id, err) + } + + metadata.SetID(id) + return nil + }, + } +} + +func (r ArcMachineResource) Read() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 5 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.HybridCompute.HybridComputeClient_v2024_07_10.Machines + + id, err := machines.ParseMachineID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + resp, err := client.Get(ctx, *id, machines.DefaultGetOperationOptions()) + if err != nil { + if response.WasNotFound(resp.HttpResponse) { + return metadata.MarkAsGone(*id) + } + return fmt.Errorf("retrieving %s: %+v", *id, err) + } + + state := ArcMachineResourceModel{ + Name: id.MachineName, + ResourceGroupName: id.ResourceGroupName, + } + if model := resp.Model; model != nil { + state.Location = location.Normalize(model.Location) + state.Kind = string(pointer.From(model.Kind)) + } + + return metadata.Encode(&state) + }, + } +} + +func (r ArcMachineResource) Delete() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 30 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.HybridCompute.HybridComputeClient_v2024_07_10.Machines + + id, err := machines.ParseMachineID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + if _, err := client.Delete(ctx, *id); err != nil { + return fmt.Errorf("deleting %s: %+v", *id, err) + } + + return nil + }, + } +} diff --git a/internal/services/hybridcompute/arc_machine_resource_test.go b/internal/services/hybridcompute/arc_machine_resource_test.go new file mode 100644 index 0000000000000..59b77d7a1f686 --- /dev/null +++ b/internal/services/hybridcompute/arc_machine_resource_test.go @@ -0,0 +1,102 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package hybridcompute_test + +import ( + "context" + "fmt" + "testing" + + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" + "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" +) + +type ArcMachineResource struct{} + +func TestAccArcMachineResource_basic(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_arc_machine", "test") + r := ArcMachineResource{} + + data.ResourceSequentialTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + +func TestAccArcMachineResource_requiresImport(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_arc_machine", "test") + r := ArcMachineResource{} + + data.ResourceSequentialTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.RequiresImportErrorStep(r.requiresImport), + }) +} + +func (r ArcMachineResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { + id, err := machines.ParseMachineID(state.ID) + if err != nil { + return nil, err + } + + resp, err := clients.HybridCompute.HybridComputeClient_v2024_07_10.Machines.Get(ctx, *id, machines.DefaultGetOperationOptions()) + if err != nil { + return nil, fmt.Errorf("retrieving %s: %+v", *id, err) + } + + return pointer.To(resp.Model != nil), nil +} + +func (r ArcMachineResource) basic(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +provider "azurerm" { + features {} +} + +resource "azurerm_arc_machine" "test" { + name = "acctest-hcm-%d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + kind = "SCVMM" +} +`, r.template(data), data.RandomInteger) +} + +func (r ArcMachineResource) requiresImport(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +resource "azurerm_arc_machine" "import" { + name = azurerm_arc_machine.test.name + resource_group_name = azurerm_arc_machine.test.resource_group_name + location = azurerm_arc_machine.test.location + kind = azurerm_arc_machine.test.kind +} +`, r.basic(data)) +} + +func (r ArcMachineResource) template(data acceptance.TestData) string { + return fmt.Sprintf(` +resource "azurerm_resource_group" "test" { + name = "acctestrg-hcm-%d" + location = "%s" +} +`, data.RandomInteger, data.Locations.Primary) +} diff --git a/internal/services/hybridcompute/client/client.go b/internal/services/hybridcompute/client/client.go index 779569edbdc61..f42febbd8d216 100644 --- a/internal/services/hybridcompute/client/client.go +++ b/internal/services/hybridcompute/client/client.go @@ -10,10 +10,13 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/machines" "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privateendpointconnections" "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privatelinkscopes" + hybridcompute_v2024_07_10 "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) type Client struct { + HybridComputeClient_v2024_07_10 *hybridcompute_v2024_07_10.Client MachineExtensionsClient *machineextensions.MachineExtensionsClient MachinesClient *machines.MachinesClient PrivateEndpointConnectionsClient *privateendpointconnections.PrivateEndpointConnectionsClient @@ -21,6 +24,13 @@ type Client struct { } func NewClient(o *common.ClientOptions) (*Client, error) { + hybridComputeClient_v2024_07_10, err := hybridcompute_v2024_07_10.NewClientWithBaseURI(o.Environment.ResourceManager, func(c *resourcemanager.Client) { + o.Configure(c, o.Authorizers.ResourceManager) + }) + if err != nil { + return nil, fmt.Errorf("building Hybrid Compute client: %+v", err) + } + machineExtensionsClient, err := machineextensions.NewMachineExtensionsClientWithBaseURI(o.Environment.ResourceManager) if err != nil { return nil, fmt.Errorf("building MachineExtensions client: %+v", err) @@ -46,6 +56,7 @@ func NewClient(o *common.ClientOptions) (*Client, error) { o.Configure(privateLinkScopesClient.Client, o.Authorizers.ResourceManager) return &Client{ + HybridComputeClient_v2024_07_10: hybridComputeClient_v2024_07_10, MachineExtensionsClient: machineExtensionsClient, MachinesClient: machinesClient, PrivateEndpointConnectionsClient: privateEndpointConnectionsClient, diff --git a/internal/services/hybridcompute/hybrid_compute_machine_data_source.go b/internal/services/hybridcompute/hybrid_compute_machine_data_source.go deleted file mode 100644 index c462f30ff122f..0000000000000 --- a/internal/services/hybridcompute/hybrid_compute_machine_data_source.go +++ /dev/null @@ -1,972 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package hybridcompute - -import ( - "context" - "encoding/json" - "fmt" - "strconv" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" - "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/machines" - "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" -) - -// HybridComputeMachineModel is deprecated and will be removed after 4.0 version. -// Please add new features to azurerm_arc_machine instead. - -type HybridComputeMachineModel struct { - Name string `tfschema:"name"` - ResourceGroupName string `tfschema:"resource_group_name"` - AgentConfiguration []DeprecatedAgentConfigurationModel `tfschema:"agent_configuration"` - ClientPublicKey string `tfschema:"client_public_key"` - CloudMetadata []DeprecatedCloudMetadataModel `tfschema:"cloud_metadata"` - DetectedProperties map[string]string `tfschema:"detected_properties"` - Location string `tfschema:"location"` - LocationData []DeprecatedLocationDataModel `tfschema:"location_data"` - MssqlDiscovered bool `tfschema:"mssql_discovered"` - OsProfile []DeprecatedOSProfileModel `tfschema:"os_profile"` - OsType string `tfschema:"os_type"` - ParentClusterResourceId string `tfschema:"parent_cluster_resource_id"` - PrivateLinkScopeResourceId string `tfschema:"private_link_scope_resource_id"` - ServiceStatuses []DeprecatedServiceStatusesModel `tfschema:"service_status"` - Tags map[string]string `tfschema:"tags"` - VmId string `tfschema:"vm_id"` - AdFqdn string `tfschema:"ad_fqdn"` - AgentVersion string `tfschema:"agent_version"` - DisplayName string `tfschema:"display_name"` - DnsFqdn string `tfschema:"dns_fqdn"` - DomainName string `tfschema:"domain_name"` - ErrorDetails []DeprecatedErrorDetailModel `tfschema:"error_details"` - LastStatusChange string `tfschema:"last_status_change"` - MachineFqdn string `tfschema:"machine_fqdn"` - OsName string `tfschema:"os_name"` - OsSku string `tfschema:"os_sku"` - OsVersion string `tfschema:"os_version"` - Status machines.StatusTypes `tfschema:"status"` - VmUuid string `tfschema:"vm_uuid"` -} - -type DeprecatedAgentConfigurationModel struct { - ExtensionsAllowList []DeprecatedConfigurationExtensionModel `tfschema:"extensions_allow_list"` - ExtensionsBlockList []DeprecatedConfigurationExtensionModel `tfschema:"extensions_block_list"` - ExtensionsEnabled bool `tfschema:"extensions_enabled"` - GuestConfigurationEnabled bool `tfschema:"guest_configuration_enabled"` - IncomingConnectionsPorts []string `tfschema:"incoming_connections_ports"` - ProxyBypass []string `tfschema:"proxy_bypass"` - ProxyUrl string `tfschema:"proxy_url"` -} - -type DeprecatedConfigurationExtensionModel struct { - Publisher string `tfschema:"publisher"` - Type string `tfschema:"type"` -} - -type DeprecatedCloudMetadataModel struct { - Provider string `tfschema:"provider"` -} - -type DeprecatedLocationDataModel struct { - City string `tfschema:"city"` - CountryOrRegion string `tfschema:"country_or_region"` - District string `tfschema:"district"` - Name string `tfschema:"name"` -} - -type DeprecatedOSProfileModel struct { - ComputerName string `tfschema:"computer_name"` - LinuxConfiguration []DeprecatedOSProfileLinuxConfigurationModel `tfschema:"linux_configuration"` - WindowsConfiguration []DeprecatedOSProfileWindowsConfigurationModel `tfschema:"windows_configuration"` -} - -type DeprecatedOSProfileLinuxConfigurationModel struct { - PatchSettings []DeprecatedPatchSettingsModel `tfschema:"patch_settings"` -} - -type DeprecatedPatchSettingsModel struct { - AssessmentMode machines.AssessmentModeTypes `tfschema:"assessment_mode"` - PatchMode machines.PatchModeTypes `tfschema:"patch_mode"` -} - -type DeprecatedOSProfileWindowsConfigurationModel struct { - PatchSettings []DeprecatedPatchSettingsModel `tfschema:"patch_settings"` -} - -type DeprecatedServiceStatusesModel struct { - ExtensionService []DeprecatedServiceStatusModel `tfschema:"extension_service"` - GuestConfigurationService []DeprecatedServiceStatusModel `tfschema:"guest_configuration_service"` -} - -type DeprecatedServiceStatusModel struct { - StartupType string `tfschema:"startup_type"` - Status string `tfschema:"status"` -} - -type DeprecatedErrorDetailModel struct { - AdditionalInfo []DeprecatedErrorAdditionalInfoModel `tfschema:"additional_info"` - Code string `tfschema:"code"` - Message string `tfschema:"message"` - Target string `tfschema:"target"` -} - -type DeprecatedErrorAdditionalInfoModel struct { - Info string `tfschema:"info"` - Type string `tfschema:"type"` -} - -type HybridComputeMachineDataSource struct{} - -func (r HybridComputeMachineDataSource) DeprecatedInFavourOfDataSource() string { - return "azurerm_arc_machine" -} - -var _ sdk.DataSourceWithDeprecationReplacedBy = HybridComputeMachineDataSource{} - -func (r HybridComputeMachineDataSource) ResourceType() string { - return "azurerm_hybrid_compute_machine" -} - -func (r HybridComputeMachineDataSource) ModelObject() interface{} { - return &HybridComputeMachineModel{} -} - -func (r HybridComputeMachineDataSource) IDValidationFunc() pluginsdk.SchemaValidateFunc { - return machines.ValidateMachineID -} - -func (r HybridComputeMachineDataSource) Arguments() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "resource_group_name": commonschema.ResourceGroupNameForDataSource(), - } -} - -func (r HybridComputeMachineDataSource) Attributes() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{ - "agent_configuration": { - Type: pluginsdk.TypeList, - Computed: true, - - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "extensions_allow_list": { - Type: pluginsdk.TypeList, - Computed: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "publisher": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "type": { - Type: pluginsdk.TypeString, - Computed: true, - }, - }, - }, - }, - - "extensions_block_list": { - Type: pluginsdk.TypeList, - Computed: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "publisher": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "type": { - Type: pluginsdk.TypeString, - Computed: true, - }, - }, - }, - }, - - "extensions_enabled": { - Type: pluginsdk.TypeBool, - Computed: true, - }, - - "guest_configuration_enabled": { - Type: pluginsdk.TypeBool, - Computed: true, - }, - - "incoming_connections_ports": { - Type: pluginsdk.TypeList, - Computed: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - }, - }, - - "proxy_bypass": { - Type: pluginsdk.TypeList, - Computed: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - }, - }, - - "proxy_url": { - Type: pluginsdk.TypeString, - Computed: true, - }, - }, - }, - }, - - "ad_fqdn": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "agent_version": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "client_public_key": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "cloud_metadata": { - Type: pluginsdk.TypeList, - Computed: true, - - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "provider": { - Type: pluginsdk.TypeString, - Computed: true, - }, - }, - }, - }, - - "detected_properties": { - Type: pluginsdk.TypeMap, - Computed: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - }, - }, - - "display_name": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "dns_fqdn": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "domain_name": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "error_details": { - Type: pluginsdk.TypeList, - Computed: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "additional_info": { - Type: pluginsdk.TypeList, - Computed: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "info": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "type": { - Type: pluginsdk.TypeString, - Computed: true, - }, - }, - }, - }, - - "code": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "message": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "target": { - Type: pluginsdk.TypeString, - Computed: true, - }, - }, - }, - }, - - "identity": commonschema.SystemAssignedIdentityComputed(), - - "last_status_change": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "location": commonschema.LocationComputed(), - - "location_data": { - Type: pluginsdk.TypeList, - Computed: true, - - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "city": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "country_or_region": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "district": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "name": { - Type: pluginsdk.TypeString, - Computed: true, - }, - }, - }, - }, - - "machine_fqdn": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "mssql_discovered": { - Type: pluginsdk.TypeBool, - Computed: true, - }, - - "os_name": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "os_profile": { - Type: pluginsdk.TypeList, - Computed: true, - - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "computer_name": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "linux_configuration": { - Type: pluginsdk.TypeList, - Computed: true, - - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "patch_settings": { - Type: pluginsdk.TypeList, - Computed: true, - - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "assessment_mode": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "patch_mode": { - Type: pluginsdk.TypeString, - Computed: true, - }, - }, - }, - }, - }, - }, - }, - - "windows_configuration": { - Type: pluginsdk.TypeList, - Computed: true, - - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "patch_settings": { - Type: pluginsdk.TypeList, - Computed: true, - - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "assessment_mode": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "patch_mode": { - Type: pluginsdk.TypeString, - Computed: true, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - - "os_sku": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "os_type": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "os_version": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "parent_cluster_resource_id": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "private_link_scope_resource_id": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "service_status": { - Type: pluginsdk.TypeList, - Computed: true, - - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "extension_service": { - Type: pluginsdk.TypeList, - Computed: true, - - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "startup_type": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "status": { - Type: pluginsdk.TypeString, - Computed: true, - }, - }, - }, - }, - - "guest_configuration_service": { - Type: pluginsdk.TypeList, - Computed: true, - - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "startup_type": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "status": { - Type: pluginsdk.TypeString, - Computed: true, - }, - }, - }, - }, - }, - }, - }, - - "status": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "vm_id": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "vm_uuid": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "tags": commonschema.TagsDataSource(), - } -} - -func (r HybridComputeMachineDataSource) Read() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 5 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.HybridCompute.MachinesClient - subscriptionId := metadata.Client.Account.SubscriptionId - - var hybridComputeMachineModel HybridComputeMachineModel - if err := metadata.Decode(&hybridComputeMachineModel); err != nil { - return err - } - - id := machines.NewMachineID(subscriptionId, hybridComputeMachineModel.ResourceGroupName, hybridComputeMachineModel.Name) - - resp, err := client.Get(ctx, id, machines.GetOperationOptions{}) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return fmt.Errorf("%s was not found", id) - } - - return fmt.Errorf("retrieving %s: %+v", id, err) - } - - model := resp.Model - if model == nil { - return fmt.Errorf("retrieving %s: model was nil", id) - } - - state := HybridComputeMachineModel{ - Name: id.MachineName, - ResourceGroupName: id.ResourceGroupName, - Location: location.Normalize(model.Location), - } - - identityValue := identity.FlattenSystemAssigned(model.Identity) - - if err := metadata.ResourceData.Set("identity", identityValue); err != nil { - return fmt.Errorf("setting `identity`: %+v", err) - } - - if properties := model.Properties; properties != nil { - if properties.AdFqdn != nil { - state.AdFqdn = *properties.AdFqdn - } - - agentConfigurationValue, err := deprecatedFlattenAgentConfigurationModel(properties.AgentConfiguration) - if err != nil { - return err - } - - state.AgentConfiguration = agentConfigurationValue - - if properties.AgentVersion != nil { - state.AgentVersion = *properties.AgentVersion - } - - if properties.ClientPublicKey != nil { - state.ClientPublicKey = *properties.ClientPublicKey - } - - cloudMetadataValue := deprecatedFlattenCloudMetadataModel(properties.CloudMetadata) - - state.CloudMetadata = cloudMetadataValue - - if properties.DetectedProperties != nil { - state.DetectedProperties = *properties.DetectedProperties - } - - if properties.DisplayName != nil { - state.DisplayName = *properties.DisplayName - } - - if properties.DnsFqdn != nil { - state.DnsFqdn = *properties.DnsFqdn - } - - if properties.DomainName != nil { - state.DomainName = *properties.DomainName - } - - errorDetailsValue := deprecatedFlattenErrorDetailModel(properties.ErrorDetails) - - state.ErrorDetails = errorDetailsValue - - if properties.LastStatusChange != nil { - state.LastStatusChange = *properties.LastStatusChange - } - - locationDataValue := deprecatedFlattenLocationDataModel(properties.LocationData) - - state.LocationData = locationDataValue - - if properties.MachineFqdn != nil { - state.MachineFqdn = *properties.MachineFqdn - } - - if properties.MssqlDiscovered != nil { - state.MssqlDiscovered, err = strconv.ParseBool(*properties.MssqlDiscovered) - if err != nil { - return err - } - } - - if properties.OsName != nil { - state.OsName = *properties.OsName - } - - osProfileValue := deprecatedFlattenOSProfileModel(properties.OsProfile) - - state.OsProfile = osProfileValue - - if properties.OsSku != nil { - state.OsSku = *properties.OsSku - } - - if properties.OsType != nil { - state.OsType = *properties.OsType - } - - if properties.OsVersion != nil { - state.OsVersion = *properties.OsVersion - } - - if properties.ParentClusterResourceId != nil { - state.ParentClusterResourceId = *properties.ParentClusterResourceId - } - - if properties.PrivateLinkScopeResourceId != nil { - state.PrivateLinkScopeResourceId = *properties.PrivateLinkScopeResourceId - } - - serviceStatusesValue := deprecatedFlattenServiceStatusesModel(properties.ServiceStatuses) - - state.ServiceStatuses = serviceStatusesValue - - if properties.Status != nil { - state.Status = *properties.Status - } - - if properties.VMId != nil { - state.VmId = *properties.VMId - } - - if properties.VMUuid != nil { - state.VmUuid = *properties.VMUuid - } - } - if model.Tags != nil { - state.Tags = *model.Tags - } - - metadata.SetID(id) - return metadata.Encode(&state) - }, - } -} - -func deprecatedFlattenAgentConfigurationModel(input *machines.AgentConfiguration) ([]DeprecatedAgentConfigurationModel, error) { - var outputList []DeprecatedAgentConfigurationModel - if input == nil { - return outputList, nil - } - - output := DeprecatedAgentConfigurationModel{} - - extensionsAllowListValue := deprecatedFlattenConfigurationExtensionModel(input.ExtensionsAllowList) - - output.ExtensionsAllowList = extensionsAllowListValue - - extensionsBlockListValue := deprecatedFlattenConfigurationExtensionModel(input.ExtensionsBlockList) - - output.ExtensionsBlockList = extensionsBlockListValue - - if input.ExtensionsEnabled != nil { - parsedBool, err := strconv.ParseBool(*input.ExtensionsEnabled) - if err != nil { - return nil, err - } - output.ExtensionsEnabled = parsedBool - } - - if input.GuestConfigurationEnabled != nil { - parsedBool, err := strconv.ParseBool(*input.GuestConfigurationEnabled) - if err != nil { - return nil, err - } - output.GuestConfigurationEnabled = parsedBool - } - - if input.IncomingConnectionsPorts != nil { - output.IncomingConnectionsPorts = *input.IncomingConnectionsPorts - } - - if input.ProxyBypass != nil { - output.ProxyBypass = *input.ProxyBypass - } - - if input.ProxyUrl != nil { - output.ProxyUrl = *input.ProxyUrl - } - - return append(outputList, output), nil -} - -func deprecatedFlattenConfigurationExtensionModel(inputList *[]machines.ConfigurationExtension) []DeprecatedConfigurationExtensionModel { - var outputList []DeprecatedConfigurationExtensionModel - if inputList == nil { - return outputList - } - - for _, input := range *inputList { - output := DeprecatedConfigurationExtensionModel{} - - if input.Publisher != nil { - output.Publisher = *input.Publisher - } - - if input.Type != nil { - output.Type = *input.Type - } - - outputList = append(outputList, output) - } - - return outputList -} - -func deprecatedFlattenCloudMetadataModel(input *machines.CloudMetadata) []DeprecatedCloudMetadataModel { - var outputList []DeprecatedCloudMetadataModel - if input == nil { - return outputList - } - - output := DeprecatedCloudMetadataModel{} - - if input.Provider != nil { - output.Provider = *input.Provider - } - - return append(outputList, output) -} - -func deprecatedFlattenErrorDetailModel(inputList *[]machines.ErrorDetail) []DeprecatedErrorDetailModel { - var outputList []DeprecatedErrorDetailModel - if inputList == nil { - return outputList - } - - for _, input := range *inputList { - output := DeprecatedErrorDetailModel{} - - additionalInfoValue := deprecatedFlattenErrorAdditionalInfoModel(input.AdditionalInfo) - - output.AdditionalInfo = additionalInfoValue - - if input.Code != nil { - output.Code = *input.Code - } - - if input.Message != nil { - output.Message = *input.Message - } - - if input.Target != nil { - output.Target = *input.Target - } - - outputList = append(outputList, output) - } - - return outputList -} - -func deprecatedFlattenErrorAdditionalInfoModel(inputList *[]machines.ErrorAdditionalInfo) []DeprecatedErrorAdditionalInfoModel { - var outputList []DeprecatedErrorAdditionalInfoModel - if inputList == nil { - return outputList - } - - for _, input := range *inputList { - output := DeprecatedErrorAdditionalInfoModel{} - - if input.Info != nil && *input.Info != nil { - - infoValue, err := json.Marshal(*input.Info) - if err != nil { - return nil - } - - output.Info = string(infoValue) - } - - if input.Type != nil { - output.Type = *input.Type - } - - outputList = append(outputList, output) - } - - return outputList -} - -func deprecatedFlattenLocationDataModel(input *machines.LocationData) []DeprecatedLocationDataModel { - var outputList []DeprecatedLocationDataModel - if input == nil { - return outputList - } - - output := DeprecatedLocationDataModel{ - Name: input.Name, - } - - if input.City != nil { - output.City = *input.City - } - - if input.CountryOrRegion != nil { - output.CountryOrRegion = *input.CountryOrRegion - } - - if input.District != nil { - output.District = *input.District - } - - return append(outputList, output) -} - -func deprecatedFlattenOSProfileModel(input *machines.OSProfile) []DeprecatedOSProfileModel { - var outputList []DeprecatedOSProfileModel - if input == nil { - return outputList - } - - output := DeprecatedOSProfileModel{} - - if input.ComputerName != nil { - output.ComputerName = *input.ComputerName - } - - linuxConfigurationValue := deprecatedFlattenOSProfileLinuxConfigurationModel(input.LinuxConfiguration) - - output.LinuxConfiguration = linuxConfigurationValue - - windowsConfigurationValue := deprecatedFlattenOSProfileWindowsConfigurationModel(input.WindowsConfiguration) - output.WindowsConfiguration = windowsConfigurationValue - - return append(outputList, output) -} - -func deprecatedFlattenOSProfileLinuxConfigurationModel(input *machines.OSProfileLinuxConfiguration) []DeprecatedOSProfileLinuxConfigurationModel { - var outputList []DeprecatedOSProfileLinuxConfigurationModel - if input == nil { - return outputList - } - - output := DeprecatedOSProfileLinuxConfigurationModel{} - - patchSettingsValue := deprecatedFlattenPatchSettingsModel(input.PatchSettings) - - output.PatchSettings = patchSettingsValue - - return append(outputList, output) -} - -func deprecatedFlattenPatchSettingsModel(input *machines.PatchSettings) []DeprecatedPatchSettingsModel { - var outputList []DeprecatedPatchSettingsModel - if input == nil { - return outputList - } - - output := DeprecatedPatchSettingsModel{} - - if input.AssessmentMode != nil { - output.AssessmentMode = *input.AssessmentMode - } - - if input.PatchMode != nil { - output.PatchMode = *input.PatchMode - } - - return append(outputList, output) -} - -func deprecatedFlattenOSProfileWindowsConfigurationModel(input *machines.OSProfileWindowsConfiguration) []DeprecatedOSProfileWindowsConfigurationModel { - var outputList []DeprecatedOSProfileWindowsConfigurationModel - if input == nil { - return outputList - } - - output := DeprecatedOSProfileWindowsConfigurationModel{} - patchSettingsValue := deprecatedFlattenPatchSettingsModel(input.PatchSettings) - output.PatchSettings = patchSettingsValue - - return append(outputList, output) -} - -func deprecatedFlattenServiceStatusesModel(input *machines.ServiceStatuses) []DeprecatedServiceStatusesModel { - var outputList []DeprecatedServiceStatusesModel - if input == nil { - return outputList - } - - output := DeprecatedServiceStatusesModel{} - - extensionServiceValue := deprecatedFlattenServiceStatusModel(input.ExtensionService) - output.ExtensionService = extensionServiceValue - - guestConfigurationServiceValue := deprecatedFlattenServiceStatusModel(input.GuestConfigurationService) - output.GuestConfigurationService = guestConfigurationServiceValue - - return append(outputList, output) -} - -func deprecatedFlattenServiceStatusModel(input *machines.ServiceStatus) []DeprecatedServiceStatusModel { - var outputList []DeprecatedServiceStatusModel - if input == nil { - return outputList - } - - output := DeprecatedServiceStatusModel{} - - if input.StartupType != nil { - output.StartupType = *input.StartupType - } - - if input.Status != nil { - output.Status = *input.Status - } - - return append(outputList, output) -} diff --git a/internal/services/hybridcompute/hybrid_compute_machine_data_source_test.go b/internal/services/hybridcompute/hybrid_compute_machine_data_source_test.go deleted file mode 100644 index b8719421a676d..0000000000000 --- a/internal/services/hybridcompute/hybrid_compute_machine_data_source_test.go +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package hybridcompute_test - -import ( - "fmt" - "os" - "testing" - - "github.com/hashicorp/go-uuid" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" -) - -type HybridComputeMachineDataSource struct{} - -func TestAccHybridComputeMachine_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Data source has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "data.azurerm_hybrid_compute_machine", "test") - d := HybridComputeMachineDataSource{} - clientSecret := os.Getenv("ARM_CLIENT_SECRET") - randomUUID, _ := uuid.GenerateUUID() - password := generateRandomPassword(10) - data.DataSourceTest(t, []acceptance.TestStep{ - { - Config: d.basic(data, clientSecret, randomUUID, password), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).Key("agent_configuration.#").HasValue("1"), - check.That(data.ResourceName).Key("mssql_discovered").HasValue("false"), - check.That(data.ResourceName).Key("os_name").HasValue("linux"), - check.That(data.ResourceName).Key("os_profile.#").HasValue("1"), - ), - }, - }) -} - -func (r HybridComputeMachineDataSource) template(data acceptance.TestData, secret string, randomUUID string, password string) string { - return fmt.Sprintf(` -provider "azurerm" { - features { - resource_group { - prevent_deletion_if_contains_resources = false - } - } -} - -data "azurerm_client_config" "current" {} - -# note: real-life usage prefer random_uuid resource in registry.terraform.io/hashicorp/random -locals { - random_uuid = "%s" -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_virtual_network" "test" { - name = "acctestnw-%d" - address_space = ["10.0.0.0/16"] - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name -} - -resource "azurerm_subnet" "test" { - name = "internal" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.0.2.0/24"] -} - -resource "azurerm_network_interface" "test" { - name = "acctestnic-%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - ip_configuration { - name = "internal" - subnet_id = azurerm_subnet.test.id - private_ip_address_allocation = "Dynamic" - public_ip_address_id = azurerm_public_ip.test.id - } -} - -resource "azurerm_network_security_group" "my_terraform_nsg" { - name = "myNetworkSecurityGroup" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - security_rule { - name = "SSH" - priority = 1001 - direction = "Inbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_range = "22" - source_address_prefix = "*" - destination_address_prefix = "*" - } -} - -resource "azurerm_network_interface_security_group_association" "example" { - network_interface_id = azurerm_network_interface.test.id - network_security_group_id = azurerm_network_security_group.my_terraform_nsg.id -} - -resource "azurerm_public_ip" "test" { - name = "acctestpip-%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - allocation_method = "Static" -} - -resource "azurerm_linux_virtual_machine" "test" { - name = "acctestVM-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - size = "Standard_F2" - admin_username = "adminuser" - admin_password = "%s" - provision_vm_agent = false - allow_extension_operations = false - disable_password_authentication = false - network_interface_ids = [ - azurerm_network_interface.test.id, - ] - - os_disk { - caching = "ReadWrite" - storage_account_type = "Standard_LRS" - } - - source_image_reference { - publisher = "Canonical" - offer = "0001-com-ubuntu-server-jammy" - sku = "22_04-lts" - version = "latest" - } - - connection { - type = "ssh" - host = azurerm_public_ip.test.ip_address - user = "adminuser" - password = "%s" - } - - provisioner "file" { - content = templatefile("scripts/install_arc.sh.tftpl", { - resource_group_name = azurerm_resource_group.test.name - uuid = local.random_uuid - location = azurerm_resource_group.test.location - tenant_id = data.azurerm_client_config.current.tenant_id - client_id = data.azurerm_client_config.current.client_id - client_secret = "%s" - subscription_id = data.azurerm_client_config.current.subscription_id - }) - destination = "/home/adminuser/install_arc_agent.sh" - } - - provisioner "remote-exec" { - inline = [ - "sudo apt-get install -y python-ctypes", - "sudo sed -i 's/\r$//' /home/adminuser/install_arc_agent.sh", - "sudo chmod +x /home/adminuser/install_arc_agent.sh", - "bash /home/adminuser/install_arc_agent.sh", - ] - } -} -`, randomUUID, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, password, password, secret) -} - -func (r HybridComputeMachineDataSource) basic(data acceptance.TestData, secret string, randomUUID string, password string) string { - template := r.template(data, secret, randomUUID, password) - return fmt.Sprintf(` - %s - -data "azurerm_hybrid_compute_machine" "test" { - name = azurerm_linux_virtual_machine.test.name - resource_group_name = azurerm_resource_group.test.name - depends_on = [ - azurerm_linux_virtual_machine.test - ] -} -`, template) -} diff --git a/internal/services/hybridcompute/registration.go b/internal/services/hybridcompute/registration.go index a5824f175a873..085e9309ef1ad 100644 --- a/internal/services/hybridcompute/registration.go +++ b/internal/services/hybridcompute/registration.go @@ -4,7 +4,6 @@ package hybridcompute import ( - "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" ) @@ -44,20 +43,15 @@ func (r Registration) SupportedResources() map[string]*pluginsdk.Resource { // DataSources returns a list of Data Sources supported by this Service func (r Registration) DataSources() []sdk.DataSource { - dataSources := []sdk.DataSource{ + return []sdk.DataSource{ ArcMachineDataSource{}, } - - if !features.FourPointOhBeta() { - dataSources = append(dataSources, HybridComputeMachineDataSource{}) - } - - return dataSources } // Resources returns a list of Resources supported by this Service func (r Registration) Resources() []sdk.Resource { return []sdk.Resource{ + ArcMachineResource{}, ArcMachineExtensionResource{}, ArcPrivateLinkScopeResource{}, } diff --git a/internal/services/iottimeseriesinsights/client/client.go b/internal/services/iottimeseriesinsights/client/client.go deleted file mode 100644 index 57e883957e382..0000000000000 --- a/internal/services/iottimeseriesinsights/client/client.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package client - -import ( - "fmt" - - timeseriesinsights_v2020_05_15 "github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/terraform-provider-azurerm/internal/common" -) - -func NewClient(o *common.ClientOptions) (*timeseriesinsights_v2020_05_15.Client, error) { - client, err := timeseriesinsights_v2020_05_15.NewClientWithBaseURI(o.Environment.ResourceManager, func(c *resourcemanager.Client) { - o.Configure(c, o.Authorizers.ResourceManager) - }) - if err != nil { - return nil, fmt.Errorf("building client for timeseriesinsights v2020_05_15: %+v", err) - } - return client, nil -} diff --git a/internal/services/iottimeseriesinsights/iot_time_series_insights_access_policy_resource.go b/internal/services/iottimeseriesinsights/iot_time_series_insights_access_policy_resource.go deleted file mode 100644 index 8eb5ad1f5fe7a..0000000000000 --- a/internal/services/iottimeseriesinsights/iot_time_series_insights_access_policy_resource.go +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package iottimeseriesinsights - -import ( - "fmt" - "regexp" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/accesspolicies" - "github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/environments" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/iottimeseriesinsights/migration" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceIoTTimeSeriesInsightsAccessPolicy() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceIoTTimeSeriesInsightsAccessPolicyCreateUpdate, - Read: resourceIoTTimeSeriesInsightsAccessPolicyRead, - Update: resourceIoTTimeSeriesInsightsAccessPolicyCreateUpdate, - Delete: resourceIoTTimeSeriesInsightsAccessPolicyDelete, - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := accesspolicies.ParseAccessPolicyID(id) - return err - }), - - DeprecationMessage: "Azure Time Series Insight will be retired on 2025-03-31. As a result the `azurerm_iot_time_series_insights_access_policy` resource has been deprecated and will be removed in v4.0 of the AzureRM Provider.", - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - SchemaVersion: 1, - StateUpgraders: pluginsdk.StateUpgrades(map[int]pluginsdk.StateUpgrade{ - 0: migration.StandardEnvironmentAccessPolicyV0ToV1{}, - }), - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile(`^[-\w\._\(\)]+$`), - "IoT Time Series Insights Access Policy name must contain only word characters, periods, underscores, hyphens, and parentheses.", - ), - }, - - "time_series_insights_environment_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: environments.ValidateEnvironmentID, - }, - - "principal_object_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "description": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "roles": { - Type: pluginsdk.TypeSet, - Required: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - ValidateFunc: validation.StringInSlice([]string{ - string(accesspolicies.AccessPolicyRoleContributor), - string(accesspolicies.AccessPolicyRoleReader), - }, false), - }, - }, - }, - } -} - -func resourceIoTTimeSeriesInsightsAccessPolicyCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).IoTTimeSeriesInsights.AccessPolicies - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - environmentId, err := environments.ParseEnvironmentID(d.Get("time_series_insights_environment_id").(string)) - if err != nil { - return err - } - - id := accesspolicies.NewAccessPolicyID(subscriptionId, environmentId.ResourceGroupName, environmentId.EnvironmentName, d.Get("name").(string)) - if d.IsNewResource() { - existing, err := client.Get(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for presence of existing %s: %+v", id, err) - } - } - - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_iot_time_series_insights_access_policy", id.ID()) - } - } - - payload := accesspolicies.AccessPolicyCreateOrUpdateParameters{ - Properties: accesspolicies.AccessPolicyResourceProperties{ - Description: utils.String(d.Get("description").(string)), - PrincipalObjectId: utils.String(d.Get("principal_object_id").(string)), - Roles: expandIoTTimeSeriesInsightsAccessPolicyRoles(d.Get("roles").(*pluginsdk.Set).List()), - }, - } - - if _, err := client.CreateOrUpdate(ctx, id, payload); err != nil { - return fmt.Errorf("creating/updating %s: %+v", id, err) - } - - d.SetId(id.ID()) - return resourceIoTTimeSeriesInsightsAccessPolicyRead(d, meta) -} - -func resourceIoTTimeSeriesInsightsAccessPolicyRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).IoTTimeSeriesInsights.AccessPolicies - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := accesspolicies.ParseAccessPolicyID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.AccessPolicyName) - d.Set("time_series_insights_environment_id", environments.NewEnvironmentID(id.SubscriptionId, id.ResourceGroupName, id.EnvironmentName).ID()) - - if model := resp.Model; model != nil { - if props := model.Properties; props != nil { - d.Set("description", props.Description) - d.Set("principal_object_id", props.PrincipalObjectId) - if err := d.Set("roles", flattenIoTTimeSeriesInsightsAccessPolicyRoles(props.Roles)); err != nil { - return fmt.Errorf("setting `roles`: %+v", err) - } - } - } - - return nil -} - -func resourceIoTTimeSeriesInsightsAccessPolicyDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).IoTTimeSeriesInsights.AccessPolicies - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := accesspolicies.ParseAccessPolicyID(d.Id()) - if err != nil { - return err - } - - if _, err := client.Delete(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - - return nil -} - -func expandIoTTimeSeriesInsightsAccessPolicyRoles(input []interface{}) *[]accesspolicies.AccessPolicyRole { - roles := make([]accesspolicies.AccessPolicyRole, 0) - - for _, v := range input { - if v == nil { - continue - } - roles = append(roles, accesspolicies.AccessPolicyRole(v.(string))) - } - - return &roles -} - -func flattenIoTTimeSeriesInsightsAccessPolicyRoles(input *[]accesspolicies.AccessPolicyRole) []interface{} { - result := make([]interface{}, 0) - if input != nil { - for _, item := range *input { - result = append(result, string(item)) - } - } - return result -} diff --git a/internal/services/iottimeseriesinsights/iot_time_series_insights_access_policy_resource_test.go b/internal/services/iottimeseriesinsights/iot_time_series_insights_access_policy_resource_test.go deleted file mode 100644 index 9a1adc8ddae82..0000000000000 --- a/internal/services/iottimeseriesinsights/iot_time_series_insights_access_policy_resource_test.go +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package iottimeseriesinsights_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/accesspolicies" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -type IoTTimeSeriesInsightsAccessPolicyResource struct{} - -func TestAccIoTTimeSeriesInsightsAccessPolicy_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("skipping as removed in 4.0") - } - data := acceptance.BuildTestData(t, "azurerm_iot_time_series_insights_access_policy", "test") - r := IoTTimeSeriesInsightsAccessPolicyResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccIoTTimeSeriesInsightsAccessPolicy_update(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("skipping as removed in 4.0") - } - data := acceptance.BuildTestData(t, "azurerm_iot_time_series_insights_access_policy", "test") - r := IoTTimeSeriesInsightsAccessPolicyResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.update(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func (IoTTimeSeriesInsightsAccessPolicyResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := accesspolicies.ParseAccessPolicyID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.IoTTimeSeriesInsights.AccessPolicies.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return pointer.To(false), nil - } - return nil, fmt.Errorf("retrieving %s: %+v", *id, err) - } - - return pointer.To(resp.Model != nil), nil -} - -func (IoTTimeSeriesInsightsAccessPolicyResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} -resource "azurerm_resource_group" "test" { - name = "acctestRG-tsi-%d" - location = "%s" -} -resource "azurerm_iot_time_series_insights_standard_environment" "test" { - name = "accTEst_tsie%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku_name = "S1_1" - data_retention_time = "P30D" -} -resource "azurerm_iot_time_series_insights_access_policy" "test" { - name = "accTEst_tsiap%d" - time_series_insights_environment_id = azurerm_iot_time_series_insights_standard_environment.test.id - - principal_object_id = "aGUID" - roles = ["Reader"] -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger) -} - -func (IoTTimeSeriesInsightsAccessPolicyResource) update(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} -resource "azurerm_resource_group" "test" { - name = "acctestRG-tsi-%d" - location = "%s" -} -resource "azurerm_iot_time_series_insights_standard_environment" "test" { - name = "accTEst_tsie%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku_name = "S1_1" - data_retention_time = "P30D" -} -resource "azurerm_iot_time_series_insights_access_policy" "test" { - name = "accTEst_tsiap%d" - time_series_insights_environment_id = azurerm_iot_time_series_insights_standard_environment.test.id - - principal_object_id = "aGUID" - roles = ["Contributor"] - description = "Test Access Policy" -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger) -} diff --git a/internal/services/iottimeseriesinsights/iot_time_series_insights_event_source_eventhub.go b/internal/services/iottimeseriesinsights/iot_time_series_insights_event_source_eventhub.go deleted file mode 100644 index 2c2e3eca68056..0000000000000 --- a/internal/services/iottimeseriesinsights/iot_time_series_insights_event_source_eventhub.go +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package iottimeseriesinsights - -import ( - "fmt" - "regexp" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/environments" - "github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/eventsources" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - eventhubValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/eventhub/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceIoTTimeSeriesInsightsEventSourceEventhub() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceIoTTimeSeriesInsightsEventSourceEventhubCreateUpdate, - Read: resourceIoTTimeSeriesInsightsEventSourceEventhubRead, - Update: resourceIoTTimeSeriesInsightsEventSourceEventhubCreateUpdate, - Delete: resourceIoTTimeSeriesInsightsEventSourceEventhubDelete, - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := eventsources.ParseEventSourceID(id) - return err - }), - - DeprecationMessage: "Azure Time Series Insight will be retired on 2025-03-31. As a result the `azurerm_iot_time_series_insights_event_source_eventhub` resource has been deprecated and will be removed in v4.0 of the AzureRM Provider.", - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile(`^[-\w\._\(\)]+$`), - "IoT Time Series Insights Event Source name must contain only word characters, periods, underscores, and parentheses.", - ), - }, - - "location": commonschema.Location(), - - "environment_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: environments.ValidateEnvironmentID, - }, - - "eventhub_name": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: eventhubValidate.ValidateEventHubName(), - }, - - "namespace_name": { - Type: pluginsdk.TypeString, - Required: true, - }, - - "shared_access_key": { - Type: pluginsdk.TypeString, - Required: true, - Sensitive: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "consumer_group_name": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "shared_access_key_name": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "event_source_resource_id": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "timestamp_property_name": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "tags": commonschema.Tags(), - }, - } -} - -func resourceIoTTimeSeriesInsightsEventSourceEventhubCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).IoTTimeSeriesInsights.EventSources - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - environmentID, err := environments.ParseEnvironmentID(d.Get("environment_id").(string)) - if err != nil { - return fmt.Errorf("unable to parse `environment_id`: %+v", err) - } - - id := eventsources.NewEventSourceID(environmentID.SubscriptionId, environmentID.ResourceGroupName, environmentID.EnvironmentName, d.Get("name").(string)) - if d.IsNewResource() { - existing, err := client.Get(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for presence of existing IoT Time Series Insights Event Source %q: %s", id, err) - } - } - - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_iot_time_series_insights_event_source_eventhub", id.ID()) - } - } - - payload := eventsources.EventHubEventSourceCreateOrUpdateParameters{ - Location: location.Normalize(d.Get("location").(string)), - Tags: tags.Expand(d.Get("tags").(map[string]interface{})), - Properties: eventsources.EventHubEventSourceCreationProperties{ - EventHubName: d.Get("eventhub_name").(string), - ServiceBusNamespace: d.Get("namespace_name").(string), - SharedAccessKey: d.Get("shared_access_key").(string), - ConsumerGroupName: d.Get("consumer_group_name").(string), - KeyName: d.Get("shared_access_key_name").(string), - EventSourceResourceId: d.Get("event_source_resource_id").(string), - TimestampPropertyName: utils.String(d.Get("timestamp_property_name").(string)), - }, - } - - if _, err = client.CreateOrUpdate(ctx, id, payload); err != nil { - return fmt.Errorf("creating/updating %s: %+v", id, err) - } - - d.SetId(id.ID()) - return resourceIoTTimeSeriesInsightsEventSourceEventhubRead(d, meta) -} - -func resourceIoTTimeSeriesInsightsEventSourceEventhubRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).IoTTimeSeriesInsights.EventSources - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := eventsources.ParseEventSourceID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.EventSourceName) - d.Set("environment_id", environments.NewEnvironmentID(id.SubscriptionId, id.ResourceGroupName, id.EnvironmentName).ID()) - - if model := resp.Model; model != nil { - eventSource, ok := (*model).(eventsources.EventHubEventSourceResource) - if !ok { - return fmt.Errorf("retrieving %s: expected an EventHubEventSourceResource but got: %+v", *id, *model) - } - - d.Set("location", location.Normalize(eventSource.Location)) - - d.Set("consumer_group_name", eventSource.Properties.ConsumerGroupName) - d.Set("eventhub_name", eventSource.Properties.EventHubName) - d.Set("namespace_name", eventSource.Properties.ServiceBusNamespace) - d.Set("event_source_resource_id", eventSource.Properties.EventSourceResourceId) - d.Set("shared_access_key_name", eventSource.Properties.KeyName) - d.Set("timestamp_property_name", eventSource.Properties.TimestampPropertyName) - - if err := tags.FlattenAndSet(d, eventSource.Tags); err != nil { - return fmt.Errorf("setting `tags`: %+v", err) - } - } - - return nil -} - -func resourceIoTTimeSeriesInsightsEventSourceEventhubDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).IoTTimeSeriesInsights.EventSources - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := eventsources.ParseEventSourceID(d.Id()) - if err != nil { - return err - } - - if _, err := client.Delete(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - - return nil -} diff --git a/internal/services/iottimeseriesinsights/iot_time_series_insights_event_source_eventhub_test.go b/internal/services/iottimeseriesinsights/iot_time_series_insights_event_source_eventhub_test.go deleted file mode 100644 index 24e89521d3c15..0000000000000 --- a/internal/services/iottimeseriesinsights/iot_time_series_insights_event_source_eventhub_test.go +++ /dev/null @@ -1,350 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package iottimeseriesinsights_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/eventsources" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -type IoTTimeSeriesInsightsEventSourceEventhubResource struct{} - -func TestAccIoTTimeSeriesInsightsEventSourceEventhub_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("skipping as removed in 4.0") - } - data := acceptance.BuildTestData(t, "azurerm_iot_time_series_insights_event_source_eventhub", "test") - r := IoTTimeSeriesInsightsEventSourceEventhubResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("shared_access_key"), - }) -} - -func TestAccIoTTimeSeriesInsightsEventSourceEventhub_update(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("skipping as removed in 4.0") - } - data := acceptance.BuildTestData(t, "azurerm_iot_time_series_insights_event_source_eventhub", "test") - r := IoTTimeSeriesInsightsEventSourceEventhubResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("shared_access_key"), - { - Config: r.update(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("shared_access_key"), - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - }) -} - -func TestAccIoTTimeSeriesInsightsEventSourceEventhub_complete(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("skipping as removed in 4.0") - } - data := acceptance.BuildTestData(t, "azurerm_iot_time_series_insights_event_source_eventhub", "test") - r := IoTTimeSeriesInsightsEventSourceEventhubResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("shared_access_key"), - }) -} - -func (IoTTimeSeriesInsightsEventSourceEventhubResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := eventsources.ParseEventSourceID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.IoTTimeSeriesInsights.EventSources.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return pointer.To(false), nil - } - - return nil, fmt.Errorf("retrieving %s: %+v", *id, err) - } - - // @tombuildsstuff: the API returns a 404 but this doesn't get surfaced as an error with the Track1 base layer - // re-evaluate once using `hashicorp/go-azure-sdk`'s base layer, since this should be raised as an error/caught above - if response.WasNotFound(resp.HttpResponse) { - return pointer.To(false), nil - } - - return pointer.To(resp.Model != nil), nil -} - -func (IoTTimeSeriesInsightsEventSourceEventhubResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} -resource "azurerm_resource_group" "test" { - name = "acctestRG-tsi-%d" - location = "%s" -} - -resource "azurerm_eventhub_namespace" "test" { - name = "acctesteventhubnamespace-%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku = "Standard" -} - -resource "azurerm_eventhub" "test" { - name = "acctesteventhub-%d" - namespace_name = azurerm_eventhub_namespace.test.name - resource_group_name = azurerm_resource_group.test.name - partition_count = 2 - message_retention = 7 -} - -resource "azurerm_eventhub_consumer_group" "test" { - name = "acctesteventhubcg-%d" - namespace_name = azurerm_eventhub_namespace.test.name - eventhub_name = azurerm_eventhub.test.name - resource_group_name = azurerm_resource_group.test.name -} - -resource "azurerm_eventhub_authorization_rule" "test" { - name = "acctest-%d" - namespace_name = azurerm_eventhub_namespace.test.name - eventhub_name = azurerm_eventhub.test.name - resource_group_name = azurerm_resource_group.test.name - - listen = true - send = false - manage = false -} - -resource "azurerm_storage_account" "storage" { - name = "acctestsatsi%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - account_tier = "Standard" - account_replication_type = "LRS" -} - -resource "azurerm_iot_time_series_insights_gen2_environment" "test" { - name = "acctest_tsie%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku_name = "L1" - id_properties = ["id"] - - storage { - name = azurerm_storage_account.storage.name - key = azurerm_storage_account.storage.primary_access_key - } -} - -resource "azurerm_iot_time_series_insights_event_source_eventhub" "test" { - name = "acctest_tsiesi%d" - location = azurerm_resource_group.test.location - environment_id = azurerm_iot_time_series_insights_gen2_environment.test.id - eventhub_name = azurerm_eventhub.test.name - namespace_name = azurerm_eventhub_namespace.test.name - shared_access_key = azurerm_eventhub_authorization_rule.test.primary_key - shared_access_key_name = azurerm_eventhub_authorization_rule.test.name - consumer_group_name = azurerm_eventhub_consumer_group.test.name - event_source_resource_id = azurerm_eventhub.test.id -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomString, data.RandomInteger, data.RandomInteger) -} - -func (IoTTimeSeriesInsightsEventSourceEventhubResource) update(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} -resource "azurerm_resource_group" "test" { - name = "acctestRG-tsi-%d" - location = "%s" -} - -resource "azurerm_eventhub_namespace" "test" { - name = "acctesteventhubnamespace-%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku = "Standard" -} - -resource "azurerm_eventhub" "test" { - name = "acctesteventhub-%d" - namespace_name = azurerm_eventhub_namespace.test.name - resource_group_name = azurerm_resource_group.test.name - partition_count = 2 - message_retention = 7 -} - -resource "azurerm_eventhub_consumer_group" "test" { - name = "acctesteventhubcg-%d" - namespace_name = azurerm_eventhub_namespace.test.name - eventhub_name = azurerm_eventhub.test.name - resource_group_name = azurerm_resource_group.test.name -} - -resource "azurerm_eventhub_authorization_rule" "test" { - name = "acctest-%d" - namespace_name = azurerm_eventhub_namespace.test.name - eventhub_name = azurerm_eventhub.test.name - resource_group_name = azurerm_resource_group.test.name - - listen = true - send = false - manage = false -} - -resource "azurerm_storage_account" "storage" { - name = "acctestsatsi%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - account_tier = "Standard" - account_replication_type = "LRS" -} - -resource "azurerm_iot_time_series_insights_gen2_environment" "test" { - name = "acctest_tsie%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku_name = "L1" - id_properties = ["id"] - - storage { - name = azurerm_storage_account.storage.name - key = azurerm_storage_account.storage.primary_access_key - } -} - -resource "azurerm_iot_time_series_insights_event_source_eventhub" "test" { - name = "acctest_tsiesi%d" - location = azurerm_resource_group.test.location - environment_id = azurerm_iot_time_series_insights_gen2_environment.test.id - eventhub_name = azurerm_eventhub.test.name - namespace_name = azurerm_eventhub_namespace.test.name - shared_access_key = azurerm_eventhub_authorization_rule.test.primary_key - shared_access_key_name = azurerm_eventhub_authorization_rule.test.name - consumer_group_name = azurerm_eventhub_consumer_group.test.name - event_source_resource_id = azurerm_eventhub.test.id - timestamp_property_name = "test" -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomString, data.RandomInteger, data.RandomInteger) -} - -func (IoTTimeSeriesInsightsEventSourceEventhubResource) complete(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} -resource "azurerm_resource_group" "test" { - name = "acctestRG-tsi-%[1]d" - location = "%[2]s" -} - -resource "azurerm_eventhub_namespace" "test" { - name = "acctesteventhubnamespace-%[1]d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku = "Standard" -} - -resource "azurerm_eventhub" "test" { - name = "acctesteventhub-%[1]d" - namespace_name = azurerm_eventhub_namespace.test.name - resource_group_name = azurerm_resource_group.test.name - partition_count = 2 - message_retention = 7 -} - -resource "azurerm_eventhub_consumer_group" "test" { - name = "acctesteventhubcg-%[1]d" - namespace_name = azurerm_eventhub_namespace.test.name - eventhub_name = azurerm_eventhub.test.name - resource_group_name = azurerm_resource_group.test.name -} - -resource "azurerm_eventhub_authorization_rule" "test" { - name = "acctest-%[1]d" - namespace_name = azurerm_eventhub_namespace.test.name - eventhub_name = azurerm_eventhub.test.name - resource_group_name = azurerm_resource_group.test.name - - listen = true - send = false - manage = false -} - -resource "azurerm_storage_account" "storage" { - name = "acctestsatsi%[3]s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - account_tier = "Standard" - account_replication_type = "LRS" -} - -resource "azurerm_iot_time_series_insights_gen2_environment" "test" { - name = "acctest_tsie%[1]d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku_name = "L1" - id_properties = ["id"] - - storage { - name = azurerm_storage_account.storage.name - key = azurerm_storage_account.storage.primary_access_key - } -} - -resource "azurerm_iot_time_series_insights_event_source_eventhub" "test" { - name = "acctest_tsiesi%[1]d" - location = azurerm_resource_group.test.location - environment_id = azurerm_iot_time_series_insights_gen2_environment.test.id - eventhub_name = azurerm_eventhub.test.name - namespace_name = azurerm_eventhub_namespace.test.name - shared_access_key = azurerm_eventhub_authorization_rule.test.primary_key - shared_access_key_name = azurerm_eventhub_authorization_rule.test.name - consumer_group_name = azurerm_eventhub_consumer_group.test.name - event_source_resource_id = azurerm_eventhub.test.id - tags = { - ENV = "Test" - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomString) -} diff --git a/internal/services/iottimeseriesinsights/iot_time_series_insights_event_source_iothub.go b/internal/services/iottimeseriesinsights/iot_time_series_insights_event_source_iothub.go deleted file mode 100644 index e313856fc4a43..0000000000000 --- a/internal/services/iottimeseriesinsights/iot_time_series_insights_event_source_iothub.go +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package iottimeseriesinsights - -import ( - "fmt" - "regexp" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/environments" - "github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/eventsources" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - iothubValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/iothub/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceIoTTimeSeriesInsightsEventSourceIoTHub() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceIoTTimeSeriesInsightsEventSourceIoTHubCreateUpdate, - Read: resourceIoTTimeSeriesInsightsEventSourceIoTHubRead, - Update: resourceIoTTimeSeriesInsightsEventSourceIoTHubCreateUpdate, - Delete: resourceIoTTimeSeriesInsightsEventSourceIoTHubDelete, - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := eventsources.ParseEventSourceID(id) - return err - }), - - DeprecationMessage: "Azure Time Series Insight will be retired on 2025-03-31. As a result the `azurerm_iot_time_series_insights_event_source_iothub` resource has been deprecated and will be removed in v4.0 of the AzureRM Provider.", - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile(`^[-\w\._\(\)]+$`), - "IoT Time Series Insights Event Source name must contain only word characters, periods, underscores, and parentheses.", - ), - }, - - "location": commonschema.Location(), - - "environment_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: environments.ValidateEnvironmentID, - }, - - "iothub_name": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: iothubValidate.IoTHubName, - }, - - "shared_access_key": { - Type: pluginsdk.TypeString, - Required: true, - Sensitive: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "consumer_group_name": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "shared_access_key_name": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "event_source_resource_id": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "timestamp_property_name": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "tags": commonschema.Tags(), - }, - } -} - -func resourceIoTTimeSeriesInsightsEventSourceIoTHubCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).IoTTimeSeriesInsights.EventSources - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - environmentID, err := environments.ParseEnvironmentID(d.Get("environment_id").(string)) - if err != nil { - return fmt.Errorf("unable to parse `environment_id`: %+v", err) - } - - id := eventsources.NewEventSourceID(environmentID.SubscriptionId, environmentID.ResourceGroupName, environmentID.EnvironmentName, d.Get("name").(string)) - if d.IsNewResource() { - existing, err := client.Get(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for presence of existing IoT Time Series Insights Event Source %q: %s", id, err) - } - } - - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_iot_time_series_insights_event_source_iothub", id.ID()) - } - } - - eventSource := eventsources.IoTHubEventSourceCreateOrUpdateParameters{ - Location: location.Normalize(d.Get("location").(string)), - Tags: tags.Expand(d.Get("tags").(map[string]interface{})), - Properties: eventsources.IoTHubEventSourceCreationProperties{ - IotHubName: d.Get("iothub_name").(string), - SharedAccessKey: d.Get("shared_access_key").(string), - ConsumerGroupName: d.Get("consumer_group_name").(string), - KeyName: d.Get("shared_access_key_name").(string), - EventSourceResourceId: d.Get("event_source_resource_id").(string), - TimestampPropertyName: utils.String(d.Get("timestamp_property_name").(string)), - }, - } - - if _, err = client.CreateOrUpdate(ctx, id, eventSource); err != nil { - return fmt.Errorf("creating/updating %s: %+v", id, err) - } - - d.SetId(id.ID()) - - return resourceIoTTimeSeriesInsightsEventSourceIoTHubRead(d, meta) -} - -func resourceIoTTimeSeriesInsightsEventSourceIoTHubRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).IoTTimeSeriesInsights.EventSources - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := eventsources.ParseEventSourceID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.EventSourceName) - d.Set("environment_id", environments.NewEnvironmentID(id.SubscriptionId, id.ResourceGroupName, id.EnvironmentName).ID()) - if model := resp.Model; model != nil { - eventSource, ok := (*model).(eventsources.IoTHubEventSourceResource) - if !ok { - return fmt.Errorf("retrieving %s: expected an IoTHubEventSourceResource but got: %+v", *id, err) - } - - d.Set("location", location.Normalize(eventSource.Location)) - - d.Set("iothub_name", eventSource.Properties.IotHubName) - d.Set("consumer_group_name", eventSource.Properties.ConsumerGroupName) - d.Set("shared_access_key_name", eventSource.Properties.KeyName) - d.Set("event_source_resource_id", eventSource.Properties.EventSourceResourceId) - d.Set("timestamp_property_name", eventSource.Properties.TimestampPropertyName) - - if err := tags.FlattenAndSet(d, eventSource.Tags); err != nil { - return fmt.Errorf("setting `tags`: %+v", err) - } - } - - return nil -} - -func resourceIoTTimeSeriesInsightsEventSourceIoTHubDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).IoTTimeSeriesInsights.EventSources - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := eventsources.ParseEventSourceID(d.Id()) - if err != nil { - return err - } - - if _, err := client.Delete(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - - return nil -} diff --git a/internal/services/iottimeseriesinsights/iot_time_series_insights_event_source_iothub_test.go b/internal/services/iottimeseriesinsights/iot_time_series_insights_event_source_iothub_test.go deleted file mode 100644 index e2738fb14dc0c..0000000000000 --- a/internal/services/iottimeseriesinsights/iot_time_series_insights_event_source_iothub_test.go +++ /dev/null @@ -1,230 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package iottimeseriesinsights_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/eventsources" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -type IoTTimeSeriesInsightsEventSourceIoTHubResource struct{} - -func TestAccIoTTimeSeriesInsightsEventSourceIoTHub_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("skipping as removed in 4.0") - } - data := acceptance.BuildTestData(t, "azurerm_iot_time_series_insights_event_source_iothub", "test") - r := IoTTimeSeriesInsightsEventSourceIoTHubResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("shared_access_key"), - }) -} - -func TestAccIoTTimeSeriesInsightsEventSourceIoTHub_update(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("skipping as removed in 4.0") - } - data := acceptance.BuildTestData(t, "azurerm_iot_time_series_insights_event_source_iothub", "test") - r := IoTTimeSeriesInsightsEventSourceIoTHubResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("shared_access_key"), - { - Config: r.update(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("shared_access_key"), - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - }) -} - -func (IoTTimeSeriesInsightsEventSourceIoTHubResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := eventsources.ParseEventSourceID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.IoTTimeSeriesInsights.EventSources.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return pointer.To(false), nil - } - return nil, fmt.Errorf("retrieving %s: %+v", *id, err) - } - - // @tombuildsstuff: the API returns a 404 but this doesn't get surfaced as an error with the Track1 base layer - // re-evaluate once using `hashicorp/go-azure-sdk`'s base layer, since this should be raised as an error/caught above - if response.WasNotFound(resp.HttpResponse) { - return pointer.To(false), nil - } - - return pointer.To(resp.Model != nil), nil -} - -func (IoTTimeSeriesInsightsEventSourceIoTHubResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} -resource "azurerm_resource_group" "test" { - name = "acctestRG-tsi-%d" - location = "%s" -} - -resource "azurerm_iothub" "test" { - name = "acctestIoTHub-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - - sku { - name = "B1" - capacity = "1" - } - - tags = { - purpose = "testing" - } -} - -resource "azurerm_iothub_consumer_group" "test" { - name = "test" - iothub_name = azurerm_iothub.test.name - eventhub_endpoint_name = "events" - resource_group_name = azurerm_resource_group.test.name -} - -resource "azurerm_storage_account" "storage" { - name = "acctestsatsi%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - account_tier = "Standard" - account_replication_type = "LRS" -} - -resource "azurerm_iot_time_series_insights_gen2_environment" "test" { - name = "acctest_tsie%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku_name = "L1" - id_properties = ["id"] - - storage { - name = azurerm_storage_account.storage.name - key = azurerm_storage_account.storage.primary_access_key - } -} - -resource "azurerm_iot_time_series_insights_event_source_iothub" "test" { - name = "acctest_tsiesi%d" - location = azurerm_resource_group.test.location - environment_id = azurerm_iot_time_series_insights_gen2_environment.test.id - iothub_name = azurerm_iothub.test.name - shared_access_key = azurerm_iothub.test.shared_access_policy.0.primary_key - shared_access_key_name = azurerm_iothub.test.shared_access_policy.0.key_name - consumer_group_name = azurerm_iothub_consumer_group.test.name - event_source_resource_id = azurerm_iothub.test.id -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomString, data.RandomInteger, data.RandomInteger) -} - -func (IoTTimeSeriesInsightsEventSourceIoTHubResource) update(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} -resource "azurerm_resource_group" "test" { - name = "acctestRG-tsi-%d" - location = "%s" -} - -resource "azurerm_iothub" "test" { - name = "acctestIoTHub-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - - sku { - name = "B1" - capacity = "1" - } - - tags = { - purpose = "testing" - } -} - -resource "azurerm_iothub_consumer_group" "test" { - name = "test" - iothub_name = azurerm_iothub.test.name - eventhub_endpoint_name = "events" - resource_group_name = azurerm_resource_group.test.name -} - -resource "azurerm_storage_account" "storage" { - name = "acctestsatsi%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - account_tier = "Standard" - account_replication_type = "LRS" -} - -resource "azurerm_iot_time_series_insights_gen2_environment" "test" { - name = "acctest_tsie%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku_name = "L1" - id_properties = ["id"] - - storage { - name = azurerm_storage_account.storage.name - key = azurerm_storage_account.storage.primary_access_key - } -} - -resource "azurerm_iot_time_series_insights_event_source_iothub" "test" { - name = "acctest_tsiesi%d" - location = azurerm_resource_group.test.location - environment_id = azurerm_iot_time_series_insights_gen2_environment.test.id - iothub_name = azurerm_iothub.test.name - shared_access_key = azurerm_iothub.test.shared_access_policy.0.primary_key - shared_access_key_name = azurerm_iothub.test.shared_access_policy.0.key_name - consumer_group_name = azurerm_iothub_consumer_group.test.name - event_source_resource_id = azurerm_iothub.test.id - timestamp_property_name = "test" - - tags = { - purpose = "testing" - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomString, data.RandomInteger, data.RandomInteger) -} diff --git a/internal/services/iottimeseriesinsights/iot_time_series_insights_gen2_environment_resource.go b/internal/services/iottimeseriesinsights/iot_time_series_insights_gen2_environment_resource.go deleted file mode 100644 index d48e98da58abc..0000000000000 --- a/internal/services/iottimeseriesinsights/iot_time_series_insights_gen2_environment_resource.go +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package iottimeseriesinsights - -import ( - "fmt" - "regexp" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/environments" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - azValidate "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" -) - -func resourceIoTTimeSeriesInsightsGen2Environment() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceIoTTimeSeriesInsightsGen2EnvironmentCreateUpdate, - Read: resourceIoTTimeSeriesInsightsGen2EnvironmentRead, - Update: resourceIoTTimeSeriesInsightsGen2EnvironmentCreateUpdate, - Delete: resourceIoTTimeSeriesInsightsGen2EnvironmentDelete, - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := environments.ParseEnvironmentID(id) - return err - }), - - DeprecationMessage: "Azure Time Series Insight will be retired on 2025-03-31. As a result the `azurerm_iot_time_series_insights_gen2_environment` resource has been deprecated and will be removed in v4.0 of the AzureRM Provider.", - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile(`^[-\w\._\(\)]+$`), - "IoT Time Series Insights Gen2 Environment name must contain only word characters, periods, underscores, and parentheses.", - ), - }, - - "location": commonschema.Location(), - - "resource_group_name": commonschema.ResourceGroupName(), - - "sku_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - string(environments.SkuNameLOne), - }, false), - }, - - "warm_store_data_retention_time": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: azValidate.ISO8601Duration, - }, - "id_properties": { - Type: pluginsdk.TypeList, - Required: true, - ForceNew: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - "storage": { - Type: pluginsdk.TypeList, - MaxItems: 1, - Required: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "key": { - Type: pluginsdk.TypeString, - Required: true, - Sensitive: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - - "data_access_fqdn": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "tags": commonschema.Tags(), - }, - } -} - -func resourceIoTTimeSeriesInsightsGen2EnvironmentCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).IoTTimeSeriesInsights.Environments - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := environments.NewEnvironmentID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) - if d.IsNewResource() { - existing, err := client.Get(ctx, id, environments.DefaultGetOperationOptions()) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for presence of existing %s: %s", id, err) - } - } - - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_iot_time_series_insights_gen2_environment", id.ID()) - } - } - - sku := convertEnvironmentSkuName(d.Get("sku_name").(string)) - payload := environments.Gen2EnvironmentCreateOrUpdateParameters{ - Location: location.Normalize(d.Get("location").(string)), - Tags: tags.Expand(d.Get("tags").(map[string]interface{})), - Sku: sku, - Properties: environments.Gen2EnvironmentCreationProperties{ - TimeSeriesIdProperties: expandIdProperties(d.Get("id_properties").([]interface{})), - StorageConfiguration: expandStorage(d.Get("storage").([]interface{})), - }, - } - - if v, ok := d.GetOk("warm_store_data_retention_time"); ok { - payload.Properties.WarmStoreConfiguration = &environments.WarmStoreConfigurationProperties{ - DataRetention: v.(string), - } - } - - if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - return fmt.Errorf("creating/updating %s: %+v", id, err) - } - - d.SetId(id.ID()) - - return resourceIoTTimeSeriesInsightsGen2EnvironmentRead(d, meta) -} - -func resourceIoTTimeSeriesInsightsGen2EnvironmentRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).IoTTimeSeriesInsights.Environments - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := environments.ParseEnvironmentID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, *id, environments.DefaultGetOperationOptions()) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.EnvironmentName) - d.Set("resource_group_name", id.ResourceGroupName) - - if model := resp.Model; model != nil { - environment, ok := (*model).(environments.Gen2EnvironmentResource) - if !ok { - return fmt.Errorf("retrieving %s: expected a Gen2EnvironmentResource but got: %+v", *id, *model) - } - - d.Set("sku_name", string(environment.Sku.Name)) - d.Set("location", location.Normalize(environment.Location)) - d.Set("data_access_fqdn", environment.Properties.DataAccessFqdn) - if err := d.Set("id_properties", flattenIdProperties(environment.Properties.TimeSeriesIdProperties)); err != nil { - return fmt.Errorf("setting `id_properties`: %+v", err) - } - if props := environment.Properties.WarmStoreConfiguration; props != nil { - d.Set("warm_store_data_retention_time", props.DataRetention) - } - if err := d.Set("storage", flattenIoTTimeSeriesGen2EnvironmentStorage(environment.Properties.StorageConfiguration, d.Get("storage.0.key").(string))); err != nil { - return fmt.Errorf("setting `storage`: %+v", err) - } - - if err := tags.FlattenAndSet(d, environment.Tags); err != nil { - return fmt.Errorf("setting `tags`: %+v", err) - } - } - - return nil -} - -func resourceIoTTimeSeriesInsightsGen2EnvironmentDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).IoTTimeSeriesInsights.Environments - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := environments.ParseEnvironmentID(d.Id()) - if err != nil { - return err - } - - if _, err := client.Delete(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - - return nil -} - -func convertEnvironmentSkuName(skuName string) environments.Sku { - return environments.Sku{ - Name: environments.SkuName(skuName), - // Gen2 cannot set capacity manually but SDK requires capacity - Capacity: int64(1), - } -} - -func expandStorage(input []interface{}) environments.Gen2StorageConfigurationInput { - storageMap := input[0].(map[string]interface{}) - return environments.Gen2StorageConfigurationInput{ - AccountName: storageMap["name"].(string), - ManagementKey: storageMap["key"].(string), - } -} - -func expandIdProperties(input []interface{}) []environments.TimeSeriesIdProperty { - result := make([]environments.TimeSeriesIdProperty, 0) - for _, item := range input { - result = append(result, environments.TimeSeriesIdProperty{ - Name: pointer.To(item.(string)), - Type: pointer.To(environments.PropertyTypeString), - }) - } - return result -} - -func flattenIdProperties(input []environments.TimeSeriesIdProperty) []string { - output := make([]string, 0) - - for _, v := range input { - if v.Name != nil { - output = append(output, *v.Name) - } - } - - return output -} - -func flattenIoTTimeSeriesGen2EnvironmentStorage(input environments.Gen2StorageConfigurationOutput, key string) []interface{} { - return []interface{}{ - map[string]interface{}{ - "key": key, - "name": input.AccountName, - }, - } -} diff --git a/internal/services/iottimeseriesinsights/iot_time_series_insights_gen2_environment_resource_test.go b/internal/services/iottimeseriesinsights/iot_time_series_insights_gen2_environment_resource_test.go deleted file mode 100644 index 3d4e3369c6100..0000000000000 --- a/internal/services/iottimeseriesinsights/iot_time_series_insights_gen2_environment_resource_test.go +++ /dev/null @@ -1,261 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package iottimeseriesinsights_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/environments" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -type IoTTimeSeriesInsightsGen2EnvironmentResource struct{} - -func TestAccIoTTimeSeriesInsightsGen2Environment_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("skipping as removed in 4.0") - } - data := acceptance.BuildTestData(t, "azurerm_iot_time_series_insights_gen2_environment", "test") - r := IoTTimeSeriesInsightsGen2EnvironmentResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("storage.0.key"), - }) -} - -func TestAccIoTTimeSeriesInsightsGen2Environment_update(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("skipping as removed in 4.0") - } - data := acceptance.BuildTestData(t, "azurerm_iot_time_series_insights_gen2_environment", "test") - r := IoTTimeSeriesInsightsGen2EnvironmentResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("storage.0.key"), - { - Config: r.update(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("storage.0.key"), - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - }) -} - -func TestAccIoTTimeSeriesInsightsGen2Environment_complete(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("skipping as removed in 4.0") - } - data := acceptance.BuildTestData(t, "azurerm_iot_time_series_insights_gen2_environment", "test") - r := IoTTimeSeriesInsightsGen2EnvironmentResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("storage.0.key"), - }) -} - -func TestAccIoTTimeSeriesInsightsGen2Environment_multiple_property_ids(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("skipping as removed in 4.0") - } - data := acceptance.BuildTestData(t, "azurerm_iot_time_series_insights_gen2_environment", "test") - r := IoTTimeSeriesInsightsGen2EnvironmentResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.multiple_property_ids(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("storage.0.key"), - }) -} - -func (IoTTimeSeriesInsightsGen2EnvironmentResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := environments.ParseEnvironmentID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.IoTTimeSeriesInsights.Environments.Get(ctx, *id, environments.DefaultGetOperationOptions()) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return pointer.To(false), nil - } - return nil, fmt.Errorf("retrieving IoT Time Series Insights Gen2 Environment (%q): %+v", id.String(), err) - } - - // @tombuildsstuff: the API returns a 404 but this doesn't get surfaced as an error with the Track1 base layer - // re-evaluate once using `hashicorp/go-azure-sdk`'s base layer, since this should be raised as an error/caught above - if response.WasNotFound(resp.HttpResponse) { - return pointer.To(false), nil - } - return pointer.To(resp.Model != nil), nil -} - -func (IoTTimeSeriesInsightsGen2EnvironmentResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} -resource "azurerm_resource_group" "test" { - name = "acctestRG-tsi-%d" - location = "%s" -} -resource "azurerm_storage_account" "storage" { - name = "acctestsatsi%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - account_tier = "Standard" - account_replication_type = "LRS" -} - -resource "azurerm_iot_time_series_insights_gen2_environment" "test" { - name = "acctest_tsie%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku_name = "L1" - id_properties = ["id"] - - storage { - name = azurerm_storage_account.storage.name - key = azurerm_storage_account.storage.primary_access_key - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomString, data.RandomInteger) -} - -func (IoTTimeSeriesInsightsGen2EnvironmentResource) update(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} -resource "azurerm_resource_group" "test" { - name = "acctestRG-tsi-%d" - location = "%s" -} -resource "azurerm_storage_account" "storage" { - name = "acctestsatsi%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - account_tier = "Standard" - account_replication_type = "LRS" -} - -resource "azurerm_iot_time_series_insights_gen2_environment" "test" { - name = "acctest_tsie%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku_name = "L1" - id_properties = ["id"] - - warm_store_data_retention_time = "P30D" - - storage { - name = azurerm_storage_account.storage.name - key = azurerm_storage_account.storage.primary_access_key - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomString, data.RandomInteger) -} - -func (IoTTimeSeriesInsightsGen2EnvironmentResource) multiple_property_ids(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} -resource "azurerm_resource_group" "test" { - name = "acctestRG-tsi-%d" - location = "%s" -} -resource "azurerm_storage_account" "storage" { - name = "acctestsatsi%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - account_tier = "Standard" - account_replication_type = "LRS" -} - -resource "azurerm_iot_time_series_insights_gen2_environment" "test" { - name = "acctest_tsie%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku_name = "L1" - id_properties = ["id", "secondId"] - - storage { - name = azurerm_storage_account.storage.name - key = azurerm_storage_account.storage.primary_access_key - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomString, data.RandomInteger) -} - -func (IoTTimeSeriesInsightsGen2EnvironmentResource) complete(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} -resource "azurerm_resource_group" "test" { - name = "acctestRG-tsi-%[1]d" - location = "%[2]s" -} -resource "azurerm_storage_account" "storage" { - name = "acctestsatsi%[3]s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - account_tier = "Standard" - account_replication_type = "LRS" -} - -resource "azurerm_iot_time_series_insights_gen2_environment" "test" { - name = "acctest_tsie%[1]d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku_name = "L1" - id_properties = ["id"] - - storage { - name = azurerm_storage_account.storage.name - key = azurerm_storage_account.storage.primary_access_key - } - tags = { - ENV = "Test" - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomString) -} diff --git a/internal/services/iottimeseriesinsights/iot_time_series_insights_reference_data_set_resource.go b/internal/services/iottimeseriesinsights/iot_time_series_insights_reference_data_set_resource.go deleted file mode 100644 index 6bcb238990d3b..0000000000000 --- a/internal/services/iottimeseriesinsights/iot_time_series_insights_reference_data_set_resource.go +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package iottimeseriesinsights - -import ( - "fmt" - "regexp" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/environments" - "github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/referencedatasets" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceIoTTimeSeriesInsightsReferenceDataSet() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceIoTTimeSeriesInsightsReferenceDataSetCreateUpdate, - Read: resourceIoTTimeSeriesInsightsReferenceDataSetRead, - Update: resourceIoTTimeSeriesInsightsReferenceDataSetCreateUpdate, - Delete: resourceIoTTimeSeriesInsightsReferenceDataSetDelete, - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := referencedatasets.ParseReferenceDataSetID(id) - return err - }), - - DeprecationMessage: "Azure Time Series Insight will be retired on 2025-03-31. As a result the `azurerm_iot_time_series_insights_reference_data_set` resource has been deprecated and will be removed in v4.0 of the AzureRM Provider.", - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile(`^[A-Za-z0-9]{3,63}`), - "IoT Time Series Insights Reference Data Set name must contain only alphanumeric characters and be between 3 and 63 characters.", - ), - }, - - "time_series_insights_environment_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: environments.ValidateEnvironmentID, - }, - - "data_string_comparison_behavior": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - Default: string(referencedatasets.DataStringComparisonBehaviorOrdinal), - ValidateFunc: validation.StringInSlice([]string{ - string(referencedatasets.DataStringComparisonBehaviorOrdinal), - string(referencedatasets.DataStringComparisonBehaviorOrdinalIgnoreCase), - }, false), - }, - - "key_property": { - Type: pluginsdk.TypeSet, - Required: true, - ForceNew: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "type": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - string(referencedatasets.ReferenceDataKeyPropertyTypeBool), - string(referencedatasets.ReferenceDataKeyPropertyTypeDateTime), - string(referencedatasets.ReferenceDataKeyPropertyTypeDouble), - string(referencedatasets.ReferenceDataKeyPropertyTypeString), - }, false), - }, - }, - }, - }, - - "location": commonschema.Location(), - - "tags": commonschema.Tags(), - }, - } -} - -func resourceIoTTimeSeriesInsightsReferenceDataSetCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).IoTTimeSeriesInsights.ReferenceDataSets - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - environmentId, err := environments.ParseEnvironmentID(d.Get("time_series_insights_environment_id").(string)) - if err != nil { - return err - } - id := referencedatasets.NewReferenceDataSetID(environmentId.SubscriptionId, environmentId.ResourceGroupName, environmentId.EnvironmentName, d.Get("name").(string)) - if d.IsNewResource() { - existing, err := client.Get(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for presence of existing %s: %+v", id, err) - } - } - - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_iot_time_series_insights_reference_data_set", id.ID()) - } - } - - payload := referencedatasets.ReferenceDataSetCreateOrUpdateParameters{ - Location: location.Normalize(d.Get("location").(string)), - Tags: tags.Expand(d.Get("tags").(map[string]interface{})), - Properties: referencedatasets.ReferenceDataSetCreationProperties{ - DataStringComparisonBehavior: pointer.To(referencedatasets.DataStringComparisonBehavior(d.Get("data_string_comparison_behavior").(string))), - KeyProperties: expandIoTTimeSeriesInsightsReferenceDataSetKeyProperties(d.Get("key_property").(*pluginsdk.Set).List()), - }, - } - - if _, err := client.CreateOrUpdate(ctx, id, payload); err != nil { - return fmt.Errorf("creating/updating %s: %+v", id, err) - } - - d.SetId(id.ID()) - - return resourceIoTTimeSeriesInsightsReferenceDataSetRead(d, meta) -} - -func resourceIoTTimeSeriesInsightsReferenceDataSetRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).IoTTimeSeriesInsights.ReferenceDataSets - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := referencedatasets.ParseReferenceDataSetID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.ReferenceDataSetName) - d.Set("time_series_insights_environment_id", environments.NewEnvironmentID(id.SubscriptionId, id.ResourceGroupName, id.EnvironmentName).ID()) - - if model := resp.Model; model != nil { - d.Set("location", location.Normalize(model.Location)) - - if props := model.Properties; props != nil { - dataStringComparisonBehavior := "" - if props.DataStringComparisonBehavior != nil { - dataStringComparisonBehavior = string(*props.DataStringComparisonBehavior) - } - d.Set("data_string_comparison_behavior", dataStringComparisonBehavior) - - if err := d.Set("key_property", flattenIoTTimeSeriesInsightsReferenceDataSetKeyProperties(props.KeyProperties)); err != nil { - return fmt.Errorf("setting `key_property`: %+v", err) - } - } - - if err := tags.FlattenAndSet(d, model.Tags); err != nil { - return fmt.Errorf("setting `tags`: %+v", err) - } - } - - return nil -} - -func resourceIoTTimeSeriesInsightsReferenceDataSetDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).IoTTimeSeriesInsights.ReferenceDataSets - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := referencedatasets.ParseReferenceDataSetID(d.Id()) - if err != nil { - return err - } - - if _, err := client.Delete(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - - return nil -} - -func expandIoTTimeSeriesInsightsReferenceDataSetKeyProperties(input []interface{}) []referencedatasets.ReferenceDataSetKeyProperty { - properties := make([]referencedatasets.ReferenceDataSetKeyProperty, 0) - - for _, v := range input { - if v == nil { - continue - } - attr := v.(map[string]interface{}) - - properties = append(properties, referencedatasets.ReferenceDataSetKeyProperty{ - Type: pointer.To(referencedatasets.ReferenceDataKeyPropertyType(attr["type"].(string))), - Name: utils.String(attr["name"].(string)), - }) - } - - return properties -} - -func flattenIoTTimeSeriesInsightsReferenceDataSetKeyProperties(input []referencedatasets.ReferenceDataSetKeyProperty) []interface{} { - properties := make([]interface{}, 0) - for _, property := range input { - propertyName := "" - if property.Name != nil { - propertyName = *property.Name - } - - propertyType := "" - if property.Type != nil { - propertyType = string(*property.Type) - } - - properties = append(properties, map[string]interface{}{ - "name": propertyName, - "type": propertyType, - }) - } - - return properties -} diff --git a/internal/services/iottimeseriesinsights/iot_time_series_insights_reference_data_set_resource_test.go b/internal/services/iottimeseriesinsights/iot_time_series_insights_reference_data_set_resource_test.go deleted file mode 100644 index 58aa42ca6140e..0000000000000 --- a/internal/services/iottimeseriesinsights/iot_time_series_insights_reference_data_set_resource_test.go +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package iottimeseriesinsights_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/referencedatasets" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -type IoTTimeSeriesInsightsReferenceDataSetResource struct{} - -func TestAccIoTTimeSeriesInsightsReferenceDataSet_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("skipping as removed in 4.0") - } - data := acceptance.BuildTestData(t, "azurerm_iot_time_series_insights_reference_data_set", "test") - r := IoTTimeSeriesInsightsReferenceDataSetResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccIoTTimeSeriesInsightsReferenceDataSet_update(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("skipping as removed in 4.0") - } - data := acceptance.BuildTestData(t, "azurerm_iot_time_series_insights_reference_data_set", "test") - r := IoTTimeSeriesInsightsReferenceDataSetResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.update(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccIoTTimeSeriesInsightsReferenceDataSet_complete(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("skipping as removed in 4.0") - } - data := acceptance.BuildTestData(t, "azurerm_iot_time_series_insights_reference_data_set", "test") - r := IoTTimeSeriesInsightsReferenceDataSetResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func (IoTTimeSeriesInsightsReferenceDataSetResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := referencedatasets.ParseReferenceDataSetID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.IoTTimeSeriesInsights.ReferenceDataSets.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return pointer.To(false), nil - } - return nil, fmt.Errorf("retrieving %s: %+v", *id, err) - } - - return pointer.To(resp.Model != nil), nil -} - -func (IoTTimeSeriesInsightsReferenceDataSetResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} -resource "azurerm_resource_group" "test" { - name = "acctestRG-tsi-%d" - location = "%s" -} -resource "azurerm_iot_time_series_insights_standard_environment" "test" { - name = "accTEst_tsie%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku_name = "S1_1" - data_retention_time = "P30D" -} - -resource "azurerm_iot_time_series_insights_reference_data_set" "test" { - name = "accTEsttsd%d" - time_series_insights_environment_id = azurerm_iot_time_series_insights_standard_environment.test.id - location = azurerm_resource_group.test.location - - key_property { - name = "keyProperty1" - type = "String" - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger) -} - -func (IoTTimeSeriesInsightsReferenceDataSetResource) update(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} -resource "azurerm_resource_group" "test" { - name = "acctestRG-tsi-%d" - location = "%s" -} -resource "azurerm_iot_time_series_insights_standard_environment" "test" { - name = "accTEst_tsie%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku_name = "S1_1" - data_retention_time = "P30D" -} -resource "azurerm_iot_time_series_insights_reference_data_set" "test" { - name = "accTEsttsd%d" - time_series_insights_environment_id = azurerm_iot_time_series_insights_standard_environment.test.id - location = azurerm_resource_group.test.location - - key_property { - name = "keyProperty1" - type = "String" - } - - tags = { - Environment = "Production" - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger) -} - -func (IoTTimeSeriesInsightsReferenceDataSetResource) complete(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} -resource "azurerm_resource_group" "test" { - name = "acctestRG-tsi-%[1]d" - location = "%[2]s" -} -resource "azurerm_iot_time_series_insights_standard_environment" "test" { - name = "accTEst_tsie%[1]d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku_name = "S1_1" - data_retention_time = "P30D" -} - -resource "azurerm_iot_time_series_insights_reference_data_set" "test" { - name = "accTEsttsd%[1]d" - time_series_insights_environment_id = azurerm_iot_time_series_insights_standard_environment.test.id - location = azurerm_resource_group.test.location - data_string_comparison_behavior = "OrdinalIgnoreCase" - - key_property { - name = "keyProperty1" - type = "String" - } -} -`, data.RandomInteger, data.Locations.Primary) -} diff --git a/internal/services/iottimeseriesinsights/iot_time_series_insights_standard_environment_resource.go b/internal/services/iottimeseriesinsights/iot_time_series_insights_standard_environment_resource.go deleted file mode 100644 index 8b64af470b11f..0000000000000 --- a/internal/services/iottimeseriesinsights/iot_time_series_insights_standard_environment_resource.go +++ /dev/null @@ -1,278 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package iottimeseriesinsights - -import ( - "fmt" - "regexp" - "strconv" - "strings" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/environments" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceIoTTimeSeriesInsightsStandardEnvironment() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceIoTTimeSeriesInsightsStandardEnvironmentCreateUpdate, - Read: resourceIoTTimeSeriesInsightsStandardEnvironmentRead, - Update: resourceIoTTimeSeriesInsightsStandardEnvironmentCreateUpdate, - Delete: resourceIoTTimeSeriesInsightsStandardEnvironmentDelete, - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := environments.ParseEnvironmentID(id) - return err - }), - - DeprecationMessage: "Azure Time Series Insight will be retired on 2025-03-31. As a result the `azurerm_iot_time_series_insights_standard_environment` resource has been deprecated and will be removed in v4.0 of the AzureRM Provider.", - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile(`^[-\w\._\(\)]+$`), - "IoT Time Series Insights Standard Environment name must contain only word characters, periods, underscores, and parentheses.", - ), - }, - - "location": commonschema.Location(), - - "resource_group_name": commonschema.ResourceGroupName(), - - "sku_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - "S1_1", - "S1_2", - "S1_3", - "S1_4", - "S1_5", - "S1_6", - "S1_7", - "S1_8", - "S1_9", - "S1_10", - "S2_1", - "S2_2", - "S2_3", - "S2_4", - "S2_5", - "S2_6", - "S2_7", - "S2_8", - "S2_9", - "S2_10", - }, false), - }, - - "data_retention_time": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.ISO8601Duration, - }, - - "storage_limit_exceeded_behavior": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(environments.StorageLimitExceededBehaviorPurgeOldData), - ValidateFunc: validation.StringInSlice([]string{ - string(environments.StorageLimitExceededBehaviorPurgeOldData), - string(environments.StorageLimitExceededBehaviorPauseIngress), - }, false), - }, - - "partition_key": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - - "tags": commonschema.Tags(), - }, - } -} - -func resourceIoTTimeSeriesInsightsStandardEnvironmentCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).IoTTimeSeriesInsights.Environments - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := environments.NewEnvironmentID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) - if d.IsNewResource() { - existing, err := client.Get(ctx, id, environments.DefaultGetOperationOptions()) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for presence of existing %s: %+v", id, err) - } - } - - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_iot_time_series_insights_environment", id.ID()) - } - } - - sku, err := expandEnvironmentSkuName(d.Get("sku_name").(string)) - if err != nil { - return fmt.Errorf("expanding sku: %+v", err) - } - - environment := environments.Gen1EnvironmentCreateOrUpdateParameters{ - Location: location.Normalize(d.Get("location").(string)), - Tags: tags.Expand(d.Get("tags").(map[string]interface{})), - Sku: *sku, - Properties: environments.Gen1EnvironmentCreationProperties{ - StorageLimitExceededBehavior: pointer.To(environments.StorageLimitExceededBehavior(d.Get("storage_limit_exceeded_behavior").(string))), - DataRetentionTime: d.Get("data_retention_time").(string), - }, - } - - if v, ok := d.GetOk("partition_key"); ok { - environment.Properties.PartitionKeyProperties = &[]environments.TimeSeriesIdProperty{ - { - Name: utils.String(v.(string)), - Type: pointer.To(environments.PropertyTypeString), - }, - } - } - - if err := client.CreateOrUpdateThenPoll(ctx, id, environment); err != nil { - return fmt.Errorf("creating/updating %s: %+v", id, err) - } - - d.SetId(id.ID()) - - return resourceIoTTimeSeriesInsightsStandardEnvironmentRead(d, meta) -} - -func resourceIoTTimeSeriesInsightsStandardEnvironmentRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).IoTTimeSeriesInsights.Environments - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := environments.ParseEnvironmentID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, *id, environments.DefaultGetOperationOptions()) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.EnvironmentName) - d.Set("resource_group_name", id.ResourceGroupName) - - if model := resp.Model; model != nil { - environment, ok := (*model).(environments.Gen1EnvironmentResource) - if !ok { - return fmt.Errorf("retrieving %s: expected a Gen1EnvironmentResource but got: %+v", *id, *model) - } - - d.Set("location", location.Normalize(environment.Location)) - d.Set("sku_name", flattenEnvironmentSkuName(environment.Sku)) - - d.Set("data_retention_time", environment.Properties.DataRetentionTime) - storageLimitExceededBehavior := "" - if environment.Properties.StorageLimitExceededBehavior != nil { - storageLimitExceededBehavior = string(*environment.Properties.StorageLimitExceededBehavior) - } - d.Set("storage_limit_exceeded_behavior", storageLimitExceededBehavior) - - partitionKey := "" - if partition := environment.Properties.PartitionKeyProperties; partition != nil { - for _, v := range *partition { - if v.Name == nil { - continue - } - - partitionKey = *v.Name - } - } - d.Set("partition_key", partitionKey) - - if err := tags.FlattenAndSet(d, environment.Tags); err != nil { - return fmt.Errorf("setting `tags`: %+v", err) - } - } - - return nil -} - -func resourceIoTTimeSeriesInsightsStandardEnvironmentDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).IoTTimeSeriesInsights.Environments - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := environments.ParseEnvironmentID(d.Id()) - if err != nil { - return err - } - - if _, err := client.Delete(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - - return nil -} - -func expandEnvironmentSkuName(skuName string) (*environments.Sku, error) { - parts := strings.Split(skuName, "_") - if len(parts) != 2 { - return nil, fmt.Errorf("sku_name (%s) has the worng number of parts (%d) after splitting on _", skuName, len(parts)) - } - - var name environments.SkuName - switch parts[0] { - case "S1": - name = environments.SkuNameSOne - case "S2": - name = environments.SkuNameSTwo - default: - return nil, fmt.Errorf("sku_name %s has unknown sku tier %s", skuName, parts[0]) - } - - capacity, err := strconv.Atoi(parts[1]) - if err != nil { - return nil, fmt.Errorf("cannot convert skuname %s capacity %s to int", skuName, parts[2]) - } - - return &environments.Sku{ - Name: name, - Capacity: int64(capacity), - }, nil -} - -func flattenEnvironmentSkuName(input environments.Sku) string { - return fmt.Sprintf("%s_%d", string(input.Name), input.Capacity) -} diff --git a/internal/services/iottimeseriesinsights/iot_time_series_insights_standard_environment_resource_test.go b/internal/services/iottimeseriesinsights/iot_time_series_insights_standard_environment_resource_test.go deleted file mode 100644 index 967b55d04d834..0000000000000 --- a/internal/services/iottimeseriesinsights/iot_time_series_insights_standard_environment_resource_test.go +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package iottimeseriesinsights_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/environments" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -type IoTTimeSeriesInsightsStandardEnvironmentResource struct{} - -func TestAccIoTTimeSeriesInsightsStandardEnvironment_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("skipping as removed in 4.0") - } - data := acceptance.BuildTestData(t, "azurerm_iot_time_series_insights_standard_environment", "test") - r := IoTTimeSeriesInsightsStandardEnvironmentResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccIoTTimeSeriesInsightsStandardEnvironment_update(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("skipping as removed in 4.0") - } - data := acceptance.BuildTestData(t, "azurerm_iot_time_series_insights_standard_environment", "test") - r := IoTTimeSeriesInsightsStandardEnvironmentResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.update(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccIoTTimeSeriesInsightsStandardEnvironment_complete(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("skipping as removed in 4.0") - } - data := acceptance.BuildTestData(t, "azurerm_iot_time_series_insights_standard_environment", "test") - r := IoTTimeSeriesInsightsStandardEnvironmentResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func (IoTTimeSeriesInsightsStandardEnvironmentResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := environments.ParseEnvironmentID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.IoTTimeSeriesInsights.Environments.Get(ctx, *id, environments.DefaultGetOperationOptions()) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return pointer.To(false), nil - } - return nil, fmt.Errorf("retrieving IoT Time Series Insights Insights Standard Environment (%q): %+v", id.String(), err) - } - - // @tombuildsstuff: the API returns a 404 but this doesn't get surfaced as an error with the Track1 base layer - // re-evaluate once using `hashicorp/go-azure-sdk`'s base layer, since this should be raised as an error/caught above - if response.WasNotFound(resp.HttpResponse) { - return pointer.To(false), nil - } - return pointer.To(resp.Model != nil), nil -} - -func (IoTTimeSeriesInsightsStandardEnvironmentResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} -resource "azurerm_resource_group" "test" { - name = "acctestRG-tsi-%d" - location = "%s" -} -resource "azurerm_iot_time_series_insights_standard_environment" "test" { - name = "accTEst_tsie%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku_name = "S1_1" - data_retention_time = "P30D" -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger) -} - -func (IoTTimeSeriesInsightsStandardEnvironmentResource) update(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} -resource "azurerm_resource_group" "test" { - name = "acctestRG-tsi-%d" - location = "%s" -} -resource "azurerm_iot_time_series_insights_standard_environment" "test" { - name = "accTEst_tsie%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku_name = "S1_1" - data_retention_time = "P30D" - - storage_limit_exceeded_behavior = "PauseIngress" - - tags = { - Environment = "Production" - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger) -} - -func (IoTTimeSeriesInsightsStandardEnvironmentResource) complete(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} -resource "azurerm_resource_group" "test" { - name = "acctestRG-tsi-%d" - location = "%s" -} -resource "azurerm_iot_time_series_insights_standard_environment" "test" { - name = "accTEst_tsie%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku_name = "S1_1" - data_retention_time = "P30D" - - storage_limit_exceeded_behavior = "PauseIngress" - partition_key = "foo" - - tags = { - Environment = "Production" - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger) -} diff --git a/internal/services/iottimeseriesinsights/migration/standard_environment.go b/internal/services/iottimeseriesinsights/migration/standard_environment.go deleted file mode 100644 index 46b9243e5d2c7..0000000000000 --- a/internal/services/iottimeseriesinsights/migration/standard_environment.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package migration - -import ( - "context" - "log" - - "github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/accesspolicies" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -var _ pluginsdk.StateUpgrade = StandardEnvironmentAccessPolicyV0ToV1{} - -type StandardEnvironmentAccessPolicyV0ToV1 struct{} - -func (StandardEnvironmentAccessPolicyV0ToV1) Schema() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "time_series_insights_environment_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "principal_object_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "description": { - Type: pluginsdk.TypeString, - Optional: true, - }, - - "roles": { - Type: pluginsdk.TypeSet, - Required: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - }, - }, - } -} - -func (StandardEnvironmentAccessPolicyV0ToV1) UpgradeFunc() pluginsdk.StateUpgraderFunc { - return func(ctx context.Context, rawState map[string]interface{}, meta interface{}) (map[string]interface{}, error) { - log.Println("[DEBUG] Migrating ResourceType from v0 to v1 format") - oldId := rawState["id"].(string) - accessPolicyId, err := accesspolicies.ParseAccessPolicyIDInsensitively(oldId) - if err != nil { - return nil, err - } - newId := accessPolicyId.ID() - - log.Printf("[DEBUG] Updating ID from %q to %q", oldId, newId) - - rawState["id"] = newId - - return rawState, nil - } -} diff --git a/internal/services/iottimeseriesinsights/registration.go b/internal/services/iottimeseriesinsights/registration.go deleted file mode 100644 index e3c910c9b8320..0000000000000 --- a/internal/services/iottimeseriesinsights/registration.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package iottimeseriesinsights - -import ( - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -type Registration struct{} - -var _ sdk.UntypedServiceRegistrationWithAGitHubLabel = Registration{} - -func (r Registration) AssociatedGitHubLabel() string { - return "service/iot-time-series" -} - -// Name is the name of this Service -func (r Registration) Name() string { - return "Time Series Insights" -} - -// WebsiteCategories returns a list of categories which can be used for the sidebar -func (r Registration) WebsiteCategories() []string { - return []string{ - "Time Series Insights", - } -} - -// SupportedDataSources returns the supported Data Sources supported by this Service -func (r Registration) SupportedDataSources() map[string]*pluginsdk.Resource { - return map[string]*pluginsdk.Resource{} -} - -// SupportedResources returns the supported Resources supported by this Service -func (r Registration) SupportedResources() map[string]*pluginsdk.Resource { - if !features.FourPointOhBeta() { - return map[string]*pluginsdk.Resource{ - "azurerm_iot_time_series_insights_access_policy": resourceIoTTimeSeriesInsightsAccessPolicy(), - "azurerm_iot_time_series_insights_event_source_eventhub": resourceIoTTimeSeriesInsightsEventSourceEventhub(), - "azurerm_iot_time_series_insights_event_source_iothub": resourceIoTTimeSeriesInsightsEventSourceIoTHub(), - "azurerm_iot_time_series_insights_standard_environment": resourceIoTTimeSeriesInsightsStandardEnvironment(), - "azurerm_iot_time_series_insights_gen2_environment": resourceIoTTimeSeriesInsightsGen2Environment(), - "azurerm_iot_time_series_insights_reference_data_set": resourceIoTTimeSeriesInsightsReferenceDataSet(), - } - } - - return map[string]*pluginsdk.Resource{} -} diff --git a/internal/services/labservice/client/client.go b/internal/services/labservice/client/client.go deleted file mode 100644 index dd199175daa7d..0000000000000 --- a/internal/services/labservice/client/client.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package client - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab" - "github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan" - "github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule" - "github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user" - "github.com/hashicorp/terraform-provider-azurerm/internal/common" -) - -type Client struct { - LabClient *lab.LabClient - LabPlanClient *labplan.LabPlanClient - ScheduleClient *schedule.ScheduleClient - UserClient *user.UserClient -} - -func NewClient(o *common.ClientOptions) (*Client, error) { - labClient, err := lab.NewLabClientWithBaseURI(o.Environment.ResourceManager) - o.Configure(labClient.Client, o.Authorizers.ResourceManager) - if err != nil { - return nil, fmt.Errorf("building LabClient client: %+v", err) - } - - labPlanClient, err := labplan.NewLabPlanClientWithBaseURI(o.Environment.ResourceManager) - o.Configure(labPlanClient.Client, o.Authorizers.ResourceManager) - if err != nil { - return nil, fmt.Errorf("building LabPlanClient client: %+v", err) - } - - scheduleClient, err := schedule.NewScheduleClientWithBaseURI(o.Environment.ResourceManager) - o.Configure(scheduleClient.Client, o.Authorizers.ResourceManager) - if err != nil { - return nil, fmt.Errorf("building ScheduleClient client: %+v", err) - } - - userClient, err := user.NewUserClientWithBaseURI(o.Environment.ResourceManager) - o.Configure(userClient.Client, o.Authorizers.ResourceManager) - if err != nil { - return nil, fmt.Errorf("building UserClient client: %+v", err) - } - - return &Client{ - LabClient: labClient, - LabPlanClient: labPlanClient, - ScheduleClient: scheduleClient, - UserClient: userClient, - }, nil -} diff --git a/internal/services/labservice/lab_service_lab_resource.go b/internal/services/labservice/lab_service_lab_resource.go deleted file mode 100644 index b087ef5166e15..0000000000000 --- a/internal/services/labservice/lab_service_lab_resource.go +++ /dev/null @@ -1,1191 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package labservice - -import ( - "context" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab" - "github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan" - azValidate "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" - computeValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/labservice/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" -) - -type LabServiceLabModel struct { - Name string `tfschema:"name"` - ResourceGroupName string `tfschema:"resource_group_name"` - Location string `tfschema:"location"` - AutoShutdown []AutoShutdown `tfschema:"auto_shutdown"` - ConnectionSetting []ConnectionSetting `tfschema:"connection_setting"` - Security []Security `tfschema:"security"` - Title string `tfschema:"title"` - VirtualMachine []VirtualMachine `tfschema:"virtual_machine"` - Network []Network `tfschema:"network"` - Roster []Roster `tfschema:"roster"` - Description string `tfschema:"description"` - LabPlanId string `tfschema:"lab_plan_id"` - Tags map[string]string `tfschema:"tags"` -} - -type AutoShutdown struct { - DisconnectDelay string `tfschema:"disconnect_delay"` - IdleDelay string `tfschema:"idle_delay"` - NoConnectDelay string `tfschema:"no_connect_delay"` - ShutdownOnIdle lab.ShutdownOnIdleMode `tfschema:"shutdown_on_idle"` -} - -type ConnectionSetting struct { - ClientRdpAccess lab.ConnectionType `tfschema:"client_rdp_access"` - ClientSshAccess lab.ConnectionType `tfschema:"client_ssh_access"` -} - -type Security struct { - OpenAccessEnabled bool `tfschema:"open_access_enabled"` - RegistrationCode string `tfschema:"registration_code"` -} - -type VirtualMachine struct { - AdditionalCapabilityGpuDriversInstalled bool `tfschema:"additional_capability_gpu_drivers_installed"` - AdminUser []Credential `tfschema:"admin_user"` - CreateOption lab.CreateOption `tfschema:"create_option"` - ImageReference []ImageReference `tfschema:"image_reference"` - NonAdminUser []Credential `tfschema:"non_admin_user"` - Sku []Sku `tfschema:"sku"` - UsageQuota string `tfschema:"usage_quota"` - SharedPasswordEnabled bool `tfschema:"shared_password_enabled"` -} - -type Credential struct { - Password string `tfschema:"password"` - Username string `tfschema:"username"` -} - -type ImageReference struct { - Id string `tfschema:"id"` - Offer string `tfschema:"offer"` - Publisher string `tfschema:"publisher"` - Sku string `tfschema:"sku"` - Version string `tfschema:"version"` -} - -type Sku struct { - Capacity int64 `tfschema:"capacity"` - Name string `tfschema:"name"` -} - -type Network struct { - SubnetId string `tfschema:"subnet_id"` - LoadBalancerId string `tfschema:"load_balancer_id"` - PublicIPId string `tfschema:"public_ip_id"` -} - -type Roster struct { - ActiveDirectoryGroupId string `tfschema:"active_directory_group_id"` - LmsInstance string `tfschema:"lms_instance"` - LtiClientId string `tfschema:"lti_client_id"` - LtiContextId string `tfschema:"lti_context_id"` - LtiRosterEndpoint string `tfschema:"lti_roster_endpoint"` -} - -type LabServiceLabResource struct{} - -var _ sdk.ResourceWithUpdate = LabServiceLabResource{} - -func (r LabServiceLabResource) ResourceType() string { - return "azurerm_lab_service_lab" -} - -func (r LabServiceLabResource) DeprecationMessage() string { - return "The `azurerm_lab_service_lab` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. See more details from https://learn.microsoft.com/en-us/azure/lab-services/retirement-guide" -} - -func (r LabServiceLabResource) ModelObject() interface{} { - return &LabServiceLabModel{} -} - -func (r LabServiceLabResource) IDValidationFunc() pluginsdk.SchemaValidateFunc { - return lab.ValidateLabID -} - -func (r LabServiceLabResource) Arguments() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.LabName, - }, - - "resource_group_name": commonschema.ResourceGroupName(), - - "location": commonschema.Location(), - - "connection_setting": { - Type: pluginsdk.TypeList, - Required: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "client_rdp_access": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - string(lab.ConnectionTypePublic), - }, false), - AtLeastOneOf: []string{"connection_setting.0.client_rdp_access", "connection_setting.0.client_ssh_access"}, - }, - - "client_ssh_access": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - string(lab.ConnectionTypePublic), - }, false), - AtLeastOneOf: []string{"connection_setting.0.client_rdp_access", "connection_setting.0.client_ssh_access"}, - }, - }, - }, - }, - - "security": { - Type: pluginsdk.TypeList, - Required: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "open_access_enabled": { - Type: pluginsdk.TypeBool, - Required: true, - }, - - "registration_code": { - Type: pluginsdk.TypeString, - Computed: true, - }, - }, - }, - }, - - "title": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validate.LabTitle, - }, - - "virtual_machine": { - Type: pluginsdk.TypeList, - Required: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "admin_user": { - Type: pluginsdk.TypeList, - Required: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "username": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.LabUsername, - }, - - "password": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - Sensitive: true, - ValidateFunc: validate.LabPassword, - }, - }, - }, - }, - - "image_reference": { - Type: pluginsdk.TypeList, - Required: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "id": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: computeValidate.SharedImageID, - ConflictsWith: []string{ - "virtual_machine.0.image_reference.0.offer", - "virtual_machine.0.image_reference.0.publisher", - "virtual_machine.0.image_reference.0.sku", - "virtual_machine.0.image_reference.0.version", - }, - }, - - "offer": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - ConflictsWith: []string{"virtual_machine.0.image_reference.0.id"}, - }, - - "publisher": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - ConflictsWith: []string{"virtual_machine.0.image_reference.0.id"}, - }, - - "sku": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - ConflictsWith: []string{"virtual_machine.0.image_reference.0.id"}, - }, - - "version": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validate.LabImageVersion, - ConflictsWith: []string{"virtual_machine.0.image_reference.0.id"}, - }, - }, - }, - }, - - "sku": { - Type: pluginsdk.TypeList, - Required: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.LabSkuName, - }, - - // Once `active_directory_group_id` is enabled, `capacity` wouldn't take effect, and it would be automatically set to the number of members in AAD Group by service API. So it has to use `ignore_changes` to avoid the difference of tf plan. - // Service team confirmed they will fix this validation bug (https://github.com/Azure/azure-rest-api-specs/issues/22037) to allow `capacity` to be empty. Once the issue is fixed, `capacity` will be marked as `Optional`. - "capacity": { - Type: pluginsdk.TypeInt, - Required: true, - ValidateFunc: validation.IntBetween(0, 400), - }, - }, - }, - }, - - "usage_quota": { - Type: pluginsdk.TypeString, - Optional: true, - Default: "PT0S", - ValidateFunc: azValidate.ISO8601Duration, - }, - - "additional_capability_gpu_drivers_installed": { - Type: pluginsdk.TypeBool, - Optional: true, - ForceNew: true, - Default: false, - }, - - "create_option": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - Default: string(lab.CreateOptionImage), - ValidateFunc: validation.StringInSlice([]string{ - string(lab.CreateOptionImage), - string(lab.CreateOptionTemplateVM), - }, false), - }, - - "non_admin_user": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "username": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validate.LabUsername, - }, - - "password": { - Type: pluginsdk.TypeString, - Required: true, - Sensitive: true, - ValidateFunc: validate.LabPassword, - }, - }, - }, - }, - - "shared_password_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - ForceNew: true, - Default: false, - }, - }, - }, - }, - - "auto_shutdown": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "disconnect_delay": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: azValidate.ISO8601Duration, - }, - - "idle_delay": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: azValidate.ISO8601Duration, - }, - - "no_connect_delay": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: azValidate.ISO8601Duration, - }, - - "shutdown_on_idle": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - string(lab.ShutdownOnIdleModeLowUsage), - string(lab.ShutdownOnIdleModeUserAbsence), - }, false), - }, - }, - }, - }, - - "description": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validate.LabDescription, - }, - - "lab_plan_id": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: labplan.ValidateLabPlanID, - }, - - "network": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "subnet_id": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: commonids.ValidateSubnetID, - }, - - "load_balancer_id": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "public_ip_id": { - Type: pluginsdk.TypeString, - Computed: true, - }, - }, - }, - }, - - "roster": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "active_directory_group_id": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.IsUUID, - }, - - "lms_instance": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.IsURLWithHTTPorHTTPS, - }, - - "lti_client_id": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "lti_context_id": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.IsUUID, - }, - - "lti_roster_endpoint": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.IsURLWithHTTPorHTTPS, - }, - }, - }, - }, - - "tags": commonschema.Tags(), - } -} - -func (r LabServiceLabResource) Attributes() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{} -} - -func (r LabServiceLabResource) Create() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 90 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - var model LabServiceLabModel - if err := metadata.Decode(&model); err != nil { - return fmt.Errorf("decoding: %+v", err) - } - - client := metadata.Client.LabService.LabClient - subscriptionId := metadata.Client.Account.SubscriptionId - id := lab.NewLabID(subscriptionId, model.ResourceGroupName, model.Name) - - existing, err := client.Get(ctx, id) - if err != nil && !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for existing %s: %+v", id, err) - } - - if !response.WasNotFound(existing.HttpResponse) { - return metadata.ResourceRequiresImport(r.ResourceType(), id) - } - - autoShutdownProfile := expandAutoShutdownProfile(model.AutoShutdown) - connectionProfile := expandConnectionProfile(model.ConnectionSetting) - securityProfile := expandSecurityProfile(model.Security) - virtualMachineProfile := expandVirtualMachineProfile(model.VirtualMachine, false) - - props := &lab.Lab{ - Location: location.Normalize(model.Location), - Properties: lab.LabProperties{ - AutoShutdownProfile: pointer.To(autoShutdownProfile), - ConnectionProfile: pointer.To(connectionProfile), - NetworkProfile: expandNetworkProfile(model.Network, false, nil), - RosterProfile: expandRosterProfile(model.Roster), - SecurityProfile: pointer.To(securityProfile), - Title: &model.Title, - VirtualMachineProfile: pointer.To(virtualMachineProfile), - }, - Tags: &model.Tags, - } - - if model.Description != "" { - props.Properties.Description = &model.Description - } - - if model.LabPlanId != "" { - props.Properties.LabPlanId = &model.LabPlanId - } - - if err := client.CreateOrUpdateThenPoll(ctx, id, *props); err != nil { - return fmt.Errorf("creating %s: %+v", id, err) - } - - metadata.SetID(id) - return nil - }, - } -} - -func (r LabServiceLabResource) Update() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 90 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.LabService.LabClient - - id, err := lab.ParseLabID(metadata.ResourceData.Id()) - if err != nil { - return err - } - - var model LabServiceLabModel - if err := metadata.Decode(&model); err != nil { - return fmt.Errorf("decoding: %+v", err) - } - - resp, err := client.Get(ctx, *id) - if err != nil { - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - props := resp.Model - if props == nil { - return fmt.Errorf("retrieving %s: properties was nil", id) - } - - if metadata.ResourceData.HasChange("auto_shutdown") { - autoShutdownProfile := expandAutoShutdownProfile(model.AutoShutdown) - props.Properties.AutoShutdownProfile = pointer.To(autoShutdownProfile) - } - - if metadata.ResourceData.HasChange("connection_setting") { - connectionProfile := expandConnectionProfile(model.ConnectionSetting) - props.Properties.ConnectionProfile = pointer.To(connectionProfile) - } - - if metadata.ResourceData.HasChange("security") { - securityProfile := expandSecurityProfile(model.Security) - props.Properties.SecurityProfile = pointer.To(securityProfile) - } - - if metadata.ResourceData.HasChange("title") { - props.Properties.Title = &model.Title - } - - if metadata.ResourceData.HasChange("virtual_machine") { - virtualMachineProfile := expandVirtualMachineProfile(model.VirtualMachine, true) - props.Properties.VirtualMachineProfile = pointer.To(virtualMachineProfile) - } - - if metadata.ResourceData.HasChange("network") { - props.Properties.NetworkProfile = expandNetworkProfile(model.Network, true, props.Properties.NetworkProfile) - } - - if metadata.ResourceData.HasChange("roster") { - props.Properties.RosterProfile = expandRosterProfile(model.Roster) - } - - if metadata.ResourceData.HasChange("description") { - props.Properties.Description = &model.Description - } - - if metadata.ResourceData.HasChange("lab_plan_id") { - if model.LabPlanId != "" { - props.Properties.LabPlanId = &model.LabPlanId - } else { - props.Properties.LabPlanId = nil - } - } - - if metadata.ResourceData.HasChange("tags") { - props.Tags = &model.Tags - } - - if err := client.CreateOrUpdateThenPoll(ctx, *id, *props); err != nil { - return fmt.Errorf("updating %s: %+v", *id, err) - } - - return nil - }, - } -} - -func (r LabServiceLabResource) Read() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 5 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.LabService.LabClient - - id, err := lab.ParseLabID(metadata.ResourceData.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return metadata.MarkAsGone(id) - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - state := LabServiceLabModel{ - Name: id.LabName, - ResourceGroupName: id.ResourceGroupName, - } - if model := resp.Model; model != nil { - props := model.Properties - - state.Location = location.Normalize(model.Location) - state.AutoShutdown = flattenAutoShutdownProfile(props.AutoShutdownProfile) - state.ConnectionSetting = flattenConnectionProfile(props.ConnectionProfile) - state.Network = flattenNetworkProfile(props.NetworkProfile) - state.Roster = flattenRosterProfile(props.RosterProfile) - state.Security = flattenSecurityProfile(props.SecurityProfile) - state.VirtualMachine = flattenVirtualMachineProfile(props.VirtualMachineProfile, metadata.ResourceData.Get("virtual_machine.0.admin_user.0.password").(string)) - - if props.Description != nil { - state.Description = *props.Description - } - if props.LabPlanId != nil { - state.LabPlanId = *props.LabPlanId - } - if model.Tags != nil { - state.Tags = *model.Tags - } - if props.Title != nil { - state.Title = *props.Title - } - } - - return metadata.Encode(&state) - }, - } -} - -func (r LabServiceLabResource) Delete() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 90 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.LabService.LabClient - - id, err := lab.ParseLabID(metadata.ResourceData.Id()) - if err != nil { - return err - } - - if err := client.DeleteThenPoll(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", id, err) - } - - return nil - }, - } -} - -func (r LabServiceLabResource) CustomizeDiff() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 5 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - rd := metadata.ResourceDiff - - if oldVal, newVal := rd.GetChange("virtual_machine.0.non_admin_user"); oldVal != nil && newVal != nil && (len(oldVal.([]interface{})) == 0 && len(newVal.([]interface{})) == 1) { - if err := rd.ForceNew("virtual_machine.0.non_admin_user"); err != nil { - return err - } - } - - if oldVal, newVal := rd.GetChange("virtual_machine.0.non_admin_user"); oldVal != nil && newVal != nil && (len(oldVal.([]interface{})) == 1 && len(newVal.([]interface{})) == 1) { - if ok := rd.HasChange("virtual_machine.0.non_admin_user.0.username"); ok { - if err := rd.ForceNew("virtual_machine.0.non_admin_user.0.username"); err != nil { - return err - } - } - - if ok := rd.HasChange("virtual_machine.0.non_admin_user.0.password"); ok { - if err := rd.ForceNew("virtual_machine.0.non_admin_user.0.password"); err != nil { - return err - } - } - } - - if oldVal, newVal := rd.GetChange("network"); oldVal != nil && newVal != nil && (len(oldVal.([]interface{})) == 0 && len(newVal.([]interface{})) == 1) { - if err := rd.ForceNew("network"); err != nil { - return err - } - } - - if oldVal, newVal := rd.GetChange("network"); oldVal != nil && newVal != nil && (len(oldVal.([]interface{})) == 1 && len(newVal.([]interface{})) == 1) { - if ok := rd.HasChange("network.0.subnet_id"); ok { - if err := rd.ForceNew("network.0.subnet_id"); err != nil { - return err - } - } - } - - return nil - }, - } -} - -func expandAutoShutdownProfile(input []AutoShutdown) lab.AutoShutdownProfile { - shutdownOnDisconnectEnabled := lab.EnableStateDisabled - shutdownWhenNotConnectedEnabled := lab.EnableStateDisabled - shutdownOnIdle := lab.ShutdownOnIdleModeNone - - if len(input) == 0 { - return lab.AutoShutdownProfile{ - ShutdownOnDisconnect: &shutdownOnDisconnectEnabled, - ShutdownWhenNotConnected: &shutdownWhenNotConnectedEnabled, - ShutdownOnIdle: &shutdownOnIdle, - } - } - - autoShutdownProfile := input[0] - result := lab.AutoShutdownProfile{} - - if autoShutdownProfile.DisconnectDelay != "" { - shutdownOnDisconnectEnabled = lab.EnableStateEnabled - result.DisconnectDelay = &autoShutdownProfile.DisconnectDelay - } - result.ShutdownOnDisconnect = &shutdownOnDisconnectEnabled - - if autoShutdownProfile.IdleDelay != "" { - result.IdleDelay = &autoShutdownProfile.IdleDelay - } - - if autoShutdownProfile.NoConnectDelay != "" { - shutdownWhenNotConnectedEnabled = lab.EnableStateEnabled - result.NoConnectDelay = &autoShutdownProfile.NoConnectDelay - } - result.ShutdownWhenNotConnected = &shutdownWhenNotConnectedEnabled - - if autoShutdownProfile.ShutdownOnIdle != "" { - shutdownOnIdle = autoShutdownProfile.ShutdownOnIdle - } - result.ShutdownOnIdle = &shutdownOnIdle - - return result -} - -func flattenAutoShutdownProfile(input *lab.AutoShutdownProfile) []AutoShutdown { - if input == nil { - return []AutoShutdown{} - } - - // default values - shutdownOnDisconnectEnabled := input.ShutdownOnDisconnect != nil && *input.ShutdownOnDisconnect != lab.EnableStateDisabled - shutdownWhenNotConnectedEnabled := input.ShutdownWhenNotConnected != nil && *input.ShutdownWhenNotConnected != lab.EnableStateDisabled - shutdownOnIdleModeConfigured := input.ShutdownOnIdle != nil && *input.ShutdownOnIdle != lab.ShutdownOnIdleModeNone - idleDelayConfigured := input.IdleDelay != nil - if !shutdownOnDisconnectEnabled && !shutdownWhenNotConnectedEnabled && !shutdownOnIdleModeConfigured && !idleDelayConfigured { - return []AutoShutdown{} - } - - var autoShutdownProfiles []AutoShutdown - autoShutdownProfile := AutoShutdown{} - - if input.DisconnectDelay != nil { - autoShutdownProfile.DisconnectDelay = *input.DisconnectDelay - } - - if input.IdleDelay != nil { - autoShutdownProfile.IdleDelay = *input.IdleDelay - } - - if input.NoConnectDelay != nil { - autoShutdownProfile.NoConnectDelay = *input.NoConnectDelay - } - - if shutdownOnIdle := input.ShutdownOnIdle; shutdownOnIdle != nil && *shutdownOnIdle != lab.ShutdownOnIdleModeNone { - autoShutdownProfile.ShutdownOnIdle = *shutdownOnIdle - } - - return append(autoShutdownProfiles, autoShutdownProfile) -} - -func expandConnectionProfile(input []ConnectionSetting) lab.ConnectionProfile { - clientRdpAccess := lab.ConnectionTypeNone - clientSshAccess := lab.ConnectionTypeNone - webRdpAccess := lab.ConnectionTypeNone - webSshAccess := lab.ConnectionTypeNone - - if len(input) == 0 { - return lab.ConnectionProfile{ - ClientRdpAccess: &clientRdpAccess, - ClientSshAccess: &clientSshAccess, - WebRdpAccess: &webRdpAccess, - WebSshAccess: &webSshAccess, - } - } - - connectionProfile := input[0] - result := lab.ConnectionProfile{ - WebRdpAccess: &webRdpAccess, - WebSshAccess: &webSshAccess, - } - - if connectionProfile.ClientRdpAccess != "" { - clientRdpAccess = connectionProfile.ClientRdpAccess - } - result.ClientRdpAccess = &clientRdpAccess - - if connectionProfile.ClientSshAccess != "" { - clientSshAccess = connectionProfile.ClientSshAccess - } - result.ClientSshAccess = &clientSshAccess - - return result -} - -func flattenConnectionProfile(input *lab.ConnectionProfile) []ConnectionSetting { - if input == nil { - return []ConnectionSetting{} - } - if (input.ClientRdpAccess == nil || *input.ClientRdpAccess == lab.ConnectionTypeNone) && (input.ClientSshAccess == nil || *input.ClientSshAccess == lab.ConnectionTypeNone) { - return []ConnectionSetting{} - } - - connectionProfile := ConnectionSetting{} - - if clientRdpAccess := input.ClientRdpAccess; clientRdpAccess != nil && *clientRdpAccess != lab.ConnectionTypeNone { - connectionProfile.ClientRdpAccess = *clientRdpAccess - } - - if clientSshAccess := input.ClientSshAccess; clientSshAccess != nil && *clientSshAccess != lab.ConnectionTypeNone { - connectionProfile.ClientSshAccess = *clientSshAccess - } - - return []ConnectionSetting{ - connectionProfile, - } -} - -func expandSecurityProfile(input []Security) lab.SecurityProfile { - result := lab.SecurityProfile{} - - if len(input) == 0 { - return result - } - - securityProfile := input[0] - - openAccessEnabled := lab.EnableStateEnabled - if !securityProfile.OpenAccessEnabled { - openAccessEnabled = lab.EnableStateDisabled - } - result.OpenAccess = &openAccessEnabled - - return result -} - -func flattenSecurityProfile(input *lab.SecurityProfile) []Security { - if input == nil { - return []Security{} - } - - var securityProfiles []Security - securityProfile := Security{} - - if input.OpenAccess != nil { - securityProfile.OpenAccessEnabled = *input.OpenAccess == lab.EnableStateEnabled - } - - if input.RegistrationCode != nil { - securityProfile.RegistrationCode = *input.RegistrationCode - } - - return append(securityProfiles, securityProfile) -} - -func expandVirtualMachineProfile(input []VirtualMachine, isUpdate bool) lab.VirtualMachineProfile { - result := lab.VirtualMachineProfile{} - - if len(input) == 0 { - return result - } - - virtualMachineProfile := input[0] - result.AdminUser = *expandCredential(virtualMachineProfile.AdminUser, isUpdate) - result.CreateOption = virtualMachineProfile.CreateOption - result.UsageQuota = virtualMachineProfile.UsageQuota - result.Sku = expandSku(virtualMachineProfile.Sku) - result.NonAdminUser = expandCredential(virtualMachineProfile.NonAdminUser, isUpdate) - result.ImageReference = expandImageReference(virtualMachineProfile.ImageReference) - - sharedPasswordEnabled := lab.EnableStateDisabled - if virtualMachineProfile.SharedPasswordEnabled { - sharedPasswordEnabled = lab.EnableStateEnabled - } - result.UseSharedPassword = &sharedPasswordEnabled - - additionalCapabilityGpuDriversInstalled := lab.EnableStateDisabled - if virtualMachineProfile.AdditionalCapabilityGpuDriversInstalled { - additionalCapabilityGpuDriversInstalled = lab.EnableStateEnabled - } - result.AdditionalCapabilities = &lab.VirtualMachineAdditionalCapabilities{ - InstallGpuDrivers: &additionalCapabilityGpuDriversInstalled, - } - - return result -} - -func expandCredential(input []Credential, isUpdate bool) *lab.Credentials { - if len(input) == 0 { - return nil - } - - credential := input[0] - result := lab.Credentials{ - Username: credential.Username, - } - - if !isUpdate && credential.Password != "" { - result.Password = &credential.Password - } - - return &result -} - -func expandImageReference(input []ImageReference) lab.ImageReference { - result := lab.ImageReference{} - - if len(input) == 0 { - return result - } - - imageReference := input[0] - - if imageReference.Id != "" { - result.Id = &imageReference.Id - } - - if imageReference.Offer != "" { - result.Offer = &imageReference.Offer - } - - if imageReference.Publisher != "" { - result.Publisher = &imageReference.Publisher - } - - if imageReference.Sku != "" { - result.Sku = &imageReference.Sku - } - - if imageReference.Version != "" { - result.Version = &imageReference.Version - } - - return result -} - -func expandSku(input []Sku) lab.Sku { - result := lab.Sku{} - - if len(input) == 0 { - return result - } - - sku := input[0] - result.Name = sku.Name - result.Capacity = &sku.Capacity - - return result -} - -func flattenVirtualMachineProfile(input *lab.VirtualMachineProfile, password string) []VirtualMachine { - if input == nil { - return []VirtualMachine{} - } - - var virtualMachineProfiles []VirtualMachine - - virtualMachineProfile := VirtualMachine{ - AdminUser: flattenCredential(&input.AdminUser, password), - CreateOption: input.CreateOption, - ImageReference: flattenImageReference(&input.ImageReference), - Sku: flattenSku(&input.Sku), - UsageQuota: input.UsageQuota, - } - - if input.AdditionalCapabilities != nil && *input.AdditionalCapabilities.InstallGpuDrivers != "" { - virtualMachineProfile.AdditionalCapabilityGpuDriversInstalled = *input.AdditionalCapabilities.InstallGpuDrivers == lab.EnableStateEnabled - } - - if input.NonAdminUser != nil { - virtualMachineProfile.NonAdminUser = flattenCredential(input.NonAdminUser, password) - } - - if input.UseSharedPassword != nil { - virtualMachineProfile.SharedPasswordEnabled = *input.UseSharedPassword == lab.EnableStateEnabled - } - - return append(virtualMachineProfiles, virtualMachineProfile) -} - -func flattenCredential(input *lab.Credentials, originalPassword string) []Credential { - if input == nil { - return []Credential{} - } - - var credentials []Credential - - credential := Credential{ - Username: input.Username, - Password: originalPassword, - } - - return append(credentials, credential) -} - -func flattenImageReference(input *lab.ImageReference) []ImageReference { - if input == nil { - return []ImageReference{} - } - - var imageReferences []ImageReference - imageReference := ImageReference{} - - if input.Id != nil { - imageReference.Id = *input.Id - } - - if input.Offer != nil { - imageReference.Offer = *input.Offer - } - - if input.Publisher != nil { - imageReference.Publisher = *input.Publisher - } - - if input.Sku != nil { - imageReference.Sku = *input.Sku - } - - if input.Version != nil { - imageReference.Version = *input.Version - } - - return append(imageReferences, imageReference) -} - -func flattenSku(input *lab.Sku) []Sku { - if input == nil { - return []Sku{} - } - - var skus []Sku - sku := Sku{ - Name: input.Name, - Capacity: *input.Capacity, - } - - return append(skus, sku) -} - -func expandNetworkProfile(input []Network, isUpdate bool, existingNetwork *lab.LabNetworkProfile) *lab.LabNetworkProfile { - if len(input) == 0 { - return nil - } - - networkProfile := input[0] - result := lab.LabNetworkProfile{} - - if networkProfile.SubnetId != "" { - result.SubnetId = &networkProfile.SubnetId - - if isUpdate && existingNetwork != nil { - result.LoadBalancerId = existingNetwork.LoadBalancerId - result.PublicIPId = existingNetwork.PublicIPId - } - } - - return &result -} - -func flattenNetworkProfile(input *lab.LabNetworkProfile) []Network { - if input == nil { - return []Network{} - } - - var networkProfiles []Network - networkProfile := Network{} - - if input.SubnetId != nil { - networkProfile.SubnetId = *input.SubnetId - } - - if input.LoadBalancerId != nil { - networkProfile.LoadBalancerId = *input.LoadBalancerId - } - - if input.PublicIPId != nil { - networkProfile.PublicIPId = *input.PublicIPId - } - - return append(networkProfiles, networkProfile) -} - -func expandRosterProfile(input []Roster) *lab.RosterProfile { - if len(input) == 0 { - return nil - } - - rosterProfile := input[0] - result := lab.RosterProfile{} - - if rosterProfile.ActiveDirectoryGroupId != "" { - result.ActiveDirectoryGroupId = &rosterProfile.ActiveDirectoryGroupId - } - - if rosterProfile.LmsInstance != "" { - result.LmsInstance = &rosterProfile.LmsInstance - } - - if rosterProfile.LtiClientId != "" { - result.LtiClientId = &rosterProfile.LtiClientId - } - - if rosterProfile.LtiContextId != "" { - result.LtiContextId = &rosterProfile.LtiContextId - } - - if rosterProfile.LtiRosterEndpoint != "" { - result.LtiRosterEndpoint = &rosterProfile.LtiRosterEndpoint - } - - return &result -} - -func flattenRosterProfile(input *lab.RosterProfile) []Roster { - if input == nil { - return []Roster{} - } - - var rosterProfiles []Roster - rosterProfile := Roster{} - - if input.ActiveDirectoryGroupId != nil { - rosterProfile.ActiveDirectoryGroupId = *input.ActiveDirectoryGroupId - } - - if input.LmsInstance != nil { - rosterProfile.LmsInstance = *input.LmsInstance - } - - if input.LtiClientId != nil { - rosterProfile.LtiClientId = *input.LtiClientId - } - - if input.LtiContextId != nil { - rosterProfile.LtiContextId = *input.LtiContextId - } - - if input.LtiRosterEndpoint != nil { - rosterProfile.LtiRosterEndpoint = *input.LtiRosterEndpoint - } - - return append(rosterProfiles, rosterProfile) -} diff --git a/internal/services/labservice/lab_service_lab_resource_test.go b/internal/services/labservice/lab_service_lab_resource_test.go deleted file mode 100644 index 1cfecd241bc54..0000000000000 --- a/internal/services/labservice/lab_service_lab_resource_test.go +++ /dev/null @@ -1,584 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package labservice_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type LabServiceLabResource struct{} - -func TestAccLabServiceLab_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_lab_service_lab", "test") - r := LabServiceLabResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("virtual_machine.0.admin_user.0.password"), - }) -} - -func TestAccLabServiceLab_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_lab_service_lab", "test") - r := LabServiceLabResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func TestAccLabServiceLab_complete(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_lab_service_lab", "test") - r := LabServiceLabResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("virtual_machine.0.admin_user.0.password", "virtual_machine.0.non_admin_user.0.password"), - }) -} - -func TestAccLabServiceLab_update(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_lab_service_lab", "test") - r := LabServiceLabResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("virtual_machine.0.admin_user.0.password", "virtual_machine.0.non_admin_user.0.password"), - { - Config: r.update(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("virtual_machine.0.admin_user.0.password"), - }) -} - -func (r LabServiceLabResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := lab.ParseLabID(state.ID) - if err != nil { - return nil, err - } - - client := clients.LabService.LabClient - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return utils.Bool(false), nil - } - return nil, fmt.Errorf("retrieving %s: %+v", id, err) - } - return utils.Bool(resp.Model != nil), nil -} - -func (r LabServiceLabResource) template(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-lab-%d" - location = "%s" -} -`, data.RandomInteger, data.Locations.Primary) -} - -func (r LabServiceLabResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_lab_service_lab" "test" { - name = "acctest-lab-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - title = "Test Title" - - security { - open_access_enabled = false - } - - virtual_machine { - admin_user { - username = "testadmin" - password = "Password1234!" - } - - image_reference { - offer = "0001-com-ubuntu-server-focal" - publisher = "canonical" - sku = "20_04-lts" - version = "latest" - } - - sku { - name = "Classic_Fsv2_2_4GB_128_S_SSD" - capacity = 1 - } - } - - connection_setting { - client_ssh_access = "Public" - } -} -`, r.template(data), data.RandomInteger) -} - -func (r LabServiceLabResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_lab_service_lab" "import" { - name = azurerm_lab_service_lab.test.name - resource_group_name = azurerm_lab_service_lab.test.resource_group_name - location = azurerm_lab_service_lab.test.location - title = azurerm_lab_service_lab.test.title - - security { - open_access_enabled = false - } - - virtual_machine { - admin_user { - username = "testadmin" - password = "Password1234!" - } - - image_reference { - offer = "0001-com-ubuntu-server-focal" - publisher = "canonical" - sku = "20_04-lts" - version = "latest" - } - - sku { - name = "Classic_Fsv2_2_4GB_128_S_SSD" - capacity = 1 - } - } - - connection_setting { - client_ssh_access = "Public" - } -} -`, r.basic(data)) -} - -func (r LabServiceLabResource) complete(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_shared_image_gallery" "test" { - name = "acctestsig%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location -} - -resource "azurerm_shared_image" "test" { - name = "acctestimg%d" - gallery_name = azurerm_shared_image_gallery.test.name - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - os_type = "Linux" - specialized = true - - identifier { - publisher = "AccTesPublisher%d" - offer = "AccTesOffer%d" - sku = "AccTesSku%d" - } -} - -data "azuread_service_principal" "test" { - application_id = "c7bb12bf-0b39-4f7f-9171-f418ff39b76a" -} - -resource "azurerm_role_assignment" "test" { - scope = azurerm_shared_image_gallery.test.id - role_definition_name = "Contributor" - principal_id = data.azuread_service_principal.test.object_id -} - -locals { - first_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+wWK73dCr+jgQOAxNsHAnNNNMEMWOHYEccp6wJm2gotpr9katuF/ZAdou5AaW1C61slRkHRkpRRX9FA9CYBiitZgvCCz+3nWNN7l/Up54Zps/pHWGZLHNJZRYyAB6j5yVLMVHIHriY49d/GZTZVNB8GoJv9Gakwc/fuEZYYl4YDFiGMBP///TzlI4jhiJzjKnEvqPFki5p2ZRJqcbCiF4pJrxUQR/RXqVFQdbRLZgYfJ8xGB878RENq3yQ39d8dVOkq4edbkzwcUmwwwkYVPIoDGsYLaRHnG+To7FvMeyO7xDVQkMKzopTQV8AuKpyvpqu0a9pWOMaiCyDytO7GGN you@me.com" -} - -resource "azurerm_virtual_network" "test" { - name = "acctest-vnet-%d" - address_space = ["10.0.0.0/16"] - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name -} - -resource "azurerm_subnet" "test" { - name = "acctest-sn-%d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.0.2.0/24"] - - delegation { - name = "Microsoft.LabServices.labplans" - - service_delegation { - name = "Microsoft.LabServices/labplans" - - actions = [ - "Microsoft.Network/virtualNetworks/subnets/join/action", - ] - } - } -} - -resource "azurerm_network_interface" "test" { - name = "acctestnic-%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - ip_configuration { - name = "internal" - subnet_id = azurerm_subnet.test.id - private_ip_address_allocation = "Dynamic" - } -} - -resource "azurerm_linux_virtual_machine" "test" { - name = "acctestVM-linux-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - size = "Standard_F2" - admin_username = "adminuser" - - network_interface_ids = [ - azurerm_network_interface.test.id, - ] - - admin_ssh_key { - username = "adminuser" - public_key = local.first_public_key - } - - os_disk { - caching = "ReadWrite" - storage_account_type = "Standard_LRS" - disk_size_gb = 30 - } - - source_image_reference { - publisher = "Canonical" - offer = "0001-com-ubuntu-server-jammy" - sku = "22_04-lts" - version = "latest" - } -} - -resource "azurerm_shared_image_version" "test" { - name = "0.0.1" - gallery_name = azurerm_shared_image_gallery.test.name - image_name = azurerm_shared_image.test.name - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - managed_image_id = azurerm_linux_virtual_machine.test.id - - target_region { - name = azurerm_resource_group.test.location - regional_replica_count = 1 - } -} - -resource "azurerm_lab_service_plan" "test" { - name = "acctest-lslp-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - allowed_regions = [azurerm_resource_group.test.location] - shared_gallery_id = azurerm_shared_image_gallery.test.id - - depends_on = [azurerm_role_assignment.test, azurerm_shared_image_version.test] -} - -resource "azurerm_lab_service_lab" "test" { - name = "acctest-lab-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - title = "Test Title" - description = "Test Description" - lab_plan_id = azurerm_lab_service_plan.test.id - - security { - open_access_enabled = false - } - - virtual_machine { - usage_quota = "PT10H" - additional_capability_gpu_drivers_installed = false - create_option = "TemplateVM" - shared_password_enabled = true - - admin_user { - username = "testadmin" - password = "Password1234!" - } - - non_admin_user { - username = "testnonadmin" - password = "Password1234!" - } - - image_reference { - id = azurerm_shared_image.test.id - } - - sku { - name = "Classic_Fsv2_2_4GB_128_S_SSD" - capacity = 1 - } - } - - auto_shutdown { - disconnect_delay = "PT17M" - idle_delay = "PT17M" - no_connect_delay = "PT17M" - shutdown_on_idle = "UserAbsence" - } - - connection_setting { - client_rdp_access = "Public" - client_ssh_access = "Public" - } - - tags = { - Env = "Test" - } -} -`, r.template(data), data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger) -} - -func (r LabServiceLabResource) update(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_shared_image_gallery" "test" { - name = "acctestsig%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location -} - -resource "azurerm_shared_image" "test" { - name = "acctestimg%d" - gallery_name = azurerm_shared_image_gallery.test.name - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - os_type = "Linux" - specialized = true - - identifier { - publisher = "AccTesPublisher%d" - offer = "AccTesOffer%d" - sku = "AccTesSku%d" - } -} - -data "azuread_service_principal" "test" { - application_id = "c7bb12bf-0b39-4f7f-9171-f418ff39b76a" -} - -resource "azurerm_role_assignment" "test" { - scope = azurerm_shared_image_gallery.test.id - role_definition_name = "Contributor" - principal_id = data.azuread_service_principal.test.object_id -} - -locals { - first_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+wWK73dCr+jgQOAxNsHAnNNNMEMWOHYEccp6wJm2gotpr9katuF/ZAdou5AaW1C61slRkHRkpRRX9FA9CYBiitZgvCCz+3nWNN7l/Up54Zps/pHWGZLHNJZRYyAB6j5yVLMVHIHriY49d/GZTZVNB8GoJv9Gakwc/fuEZYYl4YDFiGMBP///TzlI4jhiJzjKnEvqPFki5p2ZRJqcbCiF4pJrxUQR/RXqVFQdbRLZgYfJ8xGB878RENq3yQ39d8dVOkq4edbkzwcUmwwwkYVPIoDGsYLaRHnG+To7FvMeyO7xDVQkMKzopTQV8AuKpyvpqu0a9pWOMaiCyDytO7GGN you@me.com" -} - -resource "azurerm_virtual_network" "test" { - name = "acctest-vnet-%d" - address_space = ["10.0.0.0/16"] - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name -} - -resource "azurerm_subnet" "test" { - name = "acctest-sn-%d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.0.2.0/24"] - - delegation { - name = "Microsoft.LabServices.labplans" - - service_delegation { - name = "Microsoft.LabServices/labplans" - - actions = [ - "Microsoft.Network/virtualNetworks/subnets/join/action", - ] - } - } -} - -resource "azurerm_network_interface" "test" { - name = "acctestnic-%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - ip_configuration { - name = "internal" - subnet_id = azurerm_subnet.test.id - private_ip_address_allocation = "Dynamic" - } -} - -resource "azurerm_linux_virtual_machine" "test" { - name = "acctestVM-linux-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - size = "Standard_F2" - admin_username = "adminuser" - - network_interface_ids = [ - azurerm_network_interface.test.id, - ] - - admin_ssh_key { - username = "adminuser" - public_key = local.first_public_key - } - - os_disk { - caching = "ReadWrite" - storage_account_type = "Standard_LRS" - disk_size_gb = 30 - } - - source_image_reference { - publisher = "Canonical" - offer = "0001-com-ubuntu-server-jammy" - sku = "22_04-lts" - version = "latest" - } -} - -resource "azurerm_shared_image_version" "test" { - name = "0.0.1" - gallery_name = azurerm_shared_image_gallery.test.name - image_name = azurerm_shared_image.test.name - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - managed_image_id = azurerm_linux_virtual_machine.test.id - - target_region { - name = azurerm_resource_group.test.location - regional_replica_count = 1 - } -} - -resource "azurerm_lab_service_plan" "test" { - name = "acctest-lslp-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - allowed_regions = [azurerm_resource_group.test.location] - shared_gallery_id = azurerm_shared_image_gallery.test.id - - depends_on = [azurerm_role_assignment.test, azurerm_shared_image_version.test] -} - -resource "azurerm_lab_service_lab" "test" { - name = "acctest-lab-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - title = "Test Title2" - description = "Test Description2" - lab_plan_id = azurerm_lab_service_plan.test.id - - security { - open_access_enabled = true - } - - virtual_machine { - usage_quota = "PT11H" - additional_capability_gpu_drivers_installed = false - create_option = "TemplateVM" - shared_password_enabled = true - - admin_user { - username = "testadmin" - password = "Password1234!" - } - - image_reference { - id = azurerm_shared_image.test.id - } - - sku { - name = "Classic_Fsv2_2_4GB_128_S_SSD" - capacity = 0 - } - } - - auto_shutdown { - disconnect_delay = "PT16M" - idle_delay = "PT16M" - no_connect_delay = "PT16M" - shutdown_on_idle = "LowUsage" - } - - connection_setting { - client_rdp_access = "Public" - } - - tags = { - Env = "Test2" - } -} -`, r.template(data), data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger) -} diff --git a/internal/services/labservice/lab_service_plan_resource.go b/internal/services/labservice/lab_service_plan_resource.go deleted file mode 100644 index 3e7d7f6870835..0000000000000 --- a/internal/services/labservice/lab_service_plan_resource.go +++ /dev/null @@ -1,639 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package labservice - -import ( - "context" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan" - azValidate "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/labservice/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type LabServicePlanModel struct { - Name string `tfschema:"name"` - ResourceGroupName string `tfschema:"resource_group_name"` - Location string `tfschema:"location"` - AllowedRegions []string `tfschema:"allowed_regions"` - DefaultAutoShutdown []DefaultAutoShutdown `tfschema:"default_auto_shutdown"` - DefaultConnection []DefaultConnection `tfschema:"default_connection"` - DefaultNetworkSubnetId string `tfschema:"default_network_subnet_id"` - SharedGalleryId string `tfschema:"shared_gallery_id"` - Support []Support `tfschema:"support"` - Tags map[string]string `tfschema:"tags"` -} - -type DefaultAutoShutdown struct { - DisconnectDelay string `tfschema:"disconnect_delay"` - IdleDelay string `tfschema:"idle_delay"` - NoConnectDelay string `tfschema:"no_connect_delay"` - ShutdownOnIdle labplan.ShutdownOnIdleMode `tfschema:"shutdown_on_idle"` -} - -type DefaultConnection struct { - ClientRdpAccess labplan.ConnectionType `tfschema:"client_rdp_access"` - ClientSshAccess labplan.ConnectionType `tfschema:"client_ssh_access"` - WebRdpAccess labplan.ConnectionType `tfschema:"web_rdp_access"` - WebSshAccess labplan.ConnectionType `tfschema:"web_ssh_access"` -} - -type Support struct { - Email string `tfschema:"email"` - Instructions string `tfschema:"instructions"` - Phone string `tfschema:"phone"` - Url string `tfschema:"url"` -} - -type LabServicePlanResource struct{} - -var _ sdk.ResourceWithUpdate = LabServicePlanResource{} - -func (r LabServicePlanResource) ResourceType() string { - return "azurerm_lab_service_plan" -} - -func (r LabServicePlanResource) DeprecationMessage() string { - return "The `azurerm_lab_service_plan` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. See more details from https://learn.microsoft.com/en-us/azure/lab-services/retirement-guide" -} - -func (r LabServicePlanResource) ModelObject() interface{} { - return &LabServicePlanModel{} -} - -func (r LabServicePlanResource) IDValidationFunc() pluginsdk.SchemaValidateFunc { - return labplan.ValidateLabPlanID -} - -func (r LabServicePlanResource) Arguments() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.LabPlanName, - }, - - "resource_group_name": commonschema.ResourceGroupName(), - - "location": commonschema.Location(), - - "allowed_regions": { - Type: pluginsdk.TypeList, - Required: true, - MinItems: 1, - MaxItems: 28, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - ValidateFunc: location.EnhancedValidate, - StateFunc: location.StateFunc, - DiffSuppressFunc: location.DiffSuppressFunc, - }, - }, - - "default_auto_shutdown": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "disconnect_delay": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: azValidate.ISO8601Duration, - }, - - "idle_delay": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: azValidate.ISO8601Duration, - }, - - "no_connect_delay": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: azValidate.ISO8601Duration, - }, - - "shutdown_on_idle": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - string(labplan.ShutdownOnIdleModeUserAbsence), - string(labplan.ShutdownOnIdleModeLowUsage), - }, false), - }, - }, - }, - }, - - "default_connection": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "client_rdp_access": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - string(labplan.ConnectionTypePrivate), - string(labplan.ConnectionTypePublic), - }, false), - }, - - "client_ssh_access": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - string(labplan.ConnectionTypePrivate), - string(labplan.ConnectionTypePublic), - }, false), - }, - - "web_rdp_access": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - string(labplan.ConnectionTypePrivate), - string(labplan.ConnectionTypePublic), - }, false), - }, - - "web_ssh_access": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - string(labplan.ConnectionTypePrivate), - string(labplan.ConnectionTypePublic), - }, false), - }, - }, - }, - }, - - "default_network_subnet_id": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: commonids.ValidateSubnetID, - }, - - "shared_gallery_id": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: commonids.ValidateSharedImageGalleryID, - }, - - "support": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "email": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validate.SupportInfoEmail, - }, - - "instructions": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "phone": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validate.SupportInfoPhone, - }, - - "url": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.IsURLWithHTTPorHTTPS, - }, - }, - }, - }, - - "tags": commonschema.Tags(), - } -} - -func (r LabServicePlanResource) Attributes() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{} -} - -func (r LabServicePlanResource) Create() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 30 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - var model LabServicePlanModel - if err := metadata.Decode(&model); err != nil { - return fmt.Errorf("decoding: %+v", err) - } - - client := metadata.Client.LabService.LabPlanClient - subscriptionId := metadata.Client.Account.SubscriptionId - id := labplan.NewLabPlanID(subscriptionId, model.ResourceGroupName, model.Name) - - existing, err := client.Get(ctx, id) - if err != nil && !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for existing %s: %+v", id, err) - } - - if !response.WasNotFound(existing.HttpResponse) { - return metadata.ResourceRequiresImport(r.ResourceType(), id) - } - - props := &labplan.LabPlan{ - Location: location.Normalize(model.Location), - Properties: labplan.LabPlanProperties{ - AllowedRegions: normalizeAllowedRegions(model.AllowedRegions), - DefaultAutoShutdownProfile: expandDefaultAutoShutdown(model.DefaultAutoShutdown), - DefaultConnectionProfile: expandDefaultConnection(model.DefaultConnection), - DefaultNetworkProfile: expandDefaultNetwork(model.DefaultNetworkSubnetId), - SupportInfo: expandSupportInfo(model.Support), - }, - Tags: &model.Tags, - } - - if model.SharedGalleryId != "" { - props.Properties.SharedGalleryId = &model.SharedGalleryId - } - - if err := client.CreateOrUpdateThenPoll(ctx, id, *props); err != nil { - return fmt.Errorf("creating %s: %+v", id, err) - } - - metadata.SetID(id) - return nil - }, - } -} - -func (r LabServicePlanResource) Update() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 30 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.LabService.LabPlanClient - - id, err := labplan.ParseLabPlanID(metadata.ResourceData.Id()) - if err != nil { - return err - } - - var model LabServicePlanModel - if err := metadata.Decode(&model); err != nil { - return fmt.Errorf("decoding: %+v", err) - } - - resp, err := client.Get(ctx, *id) - if err != nil { - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - properties := resp.Model - if properties == nil { - return fmt.Errorf("retrieving %s: properties was nil", id) - } - - if metadata.ResourceData.HasChange("allowed_regions") { - properties.Properties.AllowedRegions = normalizeAllowedRegions(model.AllowedRegions) - } - - if metadata.ResourceData.HasChange("default_auto_shutdown") { - properties.Properties.DefaultAutoShutdownProfile = expandDefaultAutoShutdown(model.DefaultAutoShutdown) - } - - if metadata.ResourceData.HasChange("default_connection") { - properties.Properties.DefaultConnectionProfile = expandDefaultConnection(model.DefaultConnection) - } - - if metadata.ResourceData.HasChange("default_network_subnet_id") { - properties.Properties.DefaultNetworkProfile = expandDefaultNetwork(model.DefaultNetworkSubnetId) - } - - if metadata.ResourceData.HasChange("support") { - properties.Properties.SupportInfo = expandSupportInfo(model.Support) - } - - if metadata.ResourceData.HasChange("shared_gallery_id") { - if model.SharedGalleryId != "" { - properties.Properties.SharedGalleryId = &model.SharedGalleryId - } else { - properties.Properties.SharedGalleryId = nil - } - } - - if metadata.ResourceData.HasChange("tags") { - properties.Tags = &model.Tags - } - - if err := client.CreateOrUpdateThenPoll(ctx, *id, *properties); err != nil { - return fmt.Errorf("updating %s: %+v", *id, err) - } - - return nil - }, - } -} - -func (r LabServicePlanResource) Read() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 5 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.LabService.LabPlanClient - - id, err := labplan.ParseLabPlanID(metadata.ResourceData.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return metadata.MarkAsGone(id) - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - model := resp.Model - if model == nil { - return fmt.Errorf("retrieving %s: model was nil", id) - } - - state := LabServicePlanModel{ - Name: id.LabPlanName, - ResourceGroupName: id.ResourceGroupName, - Location: location.Normalize(model.Location), - } - - properties := &model.Properties - state.DefaultNetworkSubnetId = flattenDefaultNetwork(properties.DefaultNetworkProfile) - state.DefaultAutoShutdown = flattenDefaultAutoShutdown(properties.DefaultAutoShutdownProfile) - state.DefaultConnection = flattenDefaultConnection(properties.DefaultConnectionProfile) - state.Support = flattenSupportInfo(properties.SupportInfo) - - if properties.AllowedRegions != nil { - state.AllowedRegions = *normalizeAllowedRegions(*properties.AllowedRegions) - } - - if galleryId := properties.SharedGalleryId; galleryId != nil { - state.SharedGalleryId = *galleryId - } - - if model.Tags != nil { - state.Tags = *model.Tags - } - - return metadata.Encode(&state) - }, - } -} - -func (r LabServicePlanResource) Delete() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 30 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.LabService.LabPlanClient - - id, err := labplan.ParseLabPlanID(metadata.ResourceData.Id()) - if err != nil { - return err - } - - if err := client.DeleteThenPoll(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", id, err) - } - - return nil - }, - } -} - -func expandDefaultAutoShutdown(input []DefaultAutoShutdown) *labplan.AutoShutdownProfile { - if len(input) == 0 { - return nil - } - - defaultAutoShutdownProfile := &input[0] - result := labplan.AutoShutdownProfile{} - - shutdownOnDisconnectEnabled := labplan.EnableStateDisabled - if defaultAutoShutdownProfile.DisconnectDelay != "" { - result.DisconnectDelay = &defaultAutoShutdownProfile.DisconnectDelay - shutdownOnDisconnectEnabled = labplan.EnableStateEnabled - } - result.ShutdownOnDisconnect = &shutdownOnDisconnectEnabled - - if defaultAutoShutdownProfile.IdleDelay != "" { - result.IdleDelay = &defaultAutoShutdownProfile.IdleDelay - } - - shutdownWhenNotConnectedEnabled := labplan.EnableStateDisabled - if defaultAutoShutdownProfile.NoConnectDelay != "" { - result.NoConnectDelay = &defaultAutoShutdownProfile.NoConnectDelay - shutdownWhenNotConnectedEnabled = labplan.EnableStateEnabled - } - result.ShutdownWhenNotConnected = &shutdownWhenNotConnectedEnabled - - shutdownOnIdle := labplan.ShutdownOnIdleModeNone - if defaultAutoShutdownProfile.ShutdownOnIdle != "" { - shutdownOnIdle = defaultAutoShutdownProfile.ShutdownOnIdle - } - result.ShutdownOnIdle = &shutdownOnIdle - - return &result -} - -func flattenDefaultAutoShutdown(input *labplan.AutoShutdownProfile) []DefaultAutoShutdown { - var defaultAutoShutdownProfiles []DefaultAutoShutdown - if input == nil { - return defaultAutoShutdownProfiles - } - - defaultAutoShutdownProfile := DefaultAutoShutdown{} - - if input.DisconnectDelay != nil { - defaultAutoShutdownProfile.DisconnectDelay = *input.DisconnectDelay - } - - if input.IdleDelay != nil { - defaultAutoShutdownProfile.IdleDelay = *input.IdleDelay - } - - if input.NoConnectDelay != nil { - defaultAutoShutdownProfile.NoConnectDelay = *input.NoConnectDelay - } - - if shutdownOnIdle := input.ShutdownOnIdle; shutdownOnIdle != nil && *shutdownOnIdle != labplan.ShutdownOnIdleModeNone { - defaultAutoShutdownProfile.ShutdownOnIdle = *shutdownOnIdle - } - - return append(defaultAutoShutdownProfiles, defaultAutoShutdownProfile) -} - -func expandDefaultConnection(input []DefaultConnection) *labplan.ConnectionProfile { - if len(input) == 0 { - return nil - } - - defaultConnectionProfile := &input[0] - result := labplan.ConnectionProfile{} - - clientRdpAccess := labplan.ConnectionTypeNone - if defaultConnectionProfile.ClientRdpAccess != "" { - clientRdpAccess = defaultConnectionProfile.ClientRdpAccess - } - result.ClientRdpAccess = &clientRdpAccess - - clientSshAccess := labplan.ConnectionTypeNone - if defaultConnectionProfile.ClientSshAccess != "" { - clientSshAccess = defaultConnectionProfile.ClientSshAccess - } - result.ClientSshAccess = &clientSshAccess - - webRdpAccess := labplan.ConnectionTypeNone - if defaultConnectionProfile.WebRdpAccess != "" { - webRdpAccess = defaultConnectionProfile.WebRdpAccess - } - result.WebRdpAccess = &webRdpAccess - - webSshAccess := labplan.ConnectionTypeNone - if defaultConnectionProfile.WebSshAccess != "" { - webSshAccess = defaultConnectionProfile.WebSshAccess - } - result.WebSshAccess = &webSshAccess - - return &result -} - -func flattenDefaultConnection(input *labplan.ConnectionProfile) []DefaultConnection { - var defaultConnectionProfiles []DefaultConnection - if input == nil { - return defaultConnectionProfiles - } - - defaultConnectionProfile := DefaultConnection{} - - if clientRdpAccess := input.ClientRdpAccess; clientRdpAccess != nil && *clientRdpAccess != labplan.ConnectionTypeNone { - defaultConnectionProfile.ClientRdpAccess = *clientRdpAccess - } - - if clientSshAccess := input.ClientSshAccess; clientSshAccess != nil && *clientSshAccess != labplan.ConnectionTypeNone { - defaultConnectionProfile.ClientSshAccess = *clientSshAccess - } - - if webRdpAccess := input.WebRdpAccess; webRdpAccess != nil && *webRdpAccess != labplan.ConnectionTypeNone { - defaultConnectionProfile.WebRdpAccess = *webRdpAccess - } - - if webSshAccess := input.WebSshAccess; webSshAccess != nil && *webSshAccess != labplan.ConnectionTypeNone { - defaultConnectionProfile.WebSshAccess = *webSshAccess - } - - return append(defaultConnectionProfiles, defaultConnectionProfile) -} - -func expandDefaultNetwork(input string) *labplan.LabPlanNetworkProfile { - if input == "" { - return nil - } - - result := labplan.LabPlanNetworkProfile{ - SubnetId: utils.String(input), - } - - return &result -} - -func flattenDefaultNetwork(input *labplan.LabPlanNetworkProfile) string { - var defaultNetworkSubnetId string - if input == nil { - return defaultNetworkSubnetId - } - - if input.SubnetId != nil { - defaultNetworkSubnetId = *input.SubnetId - } - - return defaultNetworkSubnetId -} - -func expandSupportInfo(input []Support) *labplan.SupportInfo { - if len(input) == 0 { - return nil - } - - supportInfo := &input[0] - result := labplan.SupportInfo{} - - if supportInfo.Email != "" { - result.Email = &supportInfo.Email - } - - if supportInfo.Instructions != "" { - result.Instructions = &supportInfo.Instructions - } - - if supportInfo.Phone != "" { - result.Phone = &supportInfo.Phone - } - - if supportInfo.Url != "" { - result.Url = &supportInfo.Url - } - - return &result -} - -func flattenSupportInfo(input *labplan.SupportInfo) []Support { - var supportInfos []Support - if input == nil { - return supportInfos - } - - supportInfo := Support{} - - if input.Email != nil { - supportInfo.Email = *input.Email - } - - if input.Instructions != nil { - supportInfo.Instructions = *input.Instructions - } - - if input.Phone != nil { - supportInfo.Phone = *input.Phone - } - - if input.Url != nil { - supportInfo.Url = *input.Url - } - - return append(supportInfos, supportInfo) -} - -func normalizeAllowedRegions(input []string) *[]string { - regions := make([]string, 0) - - for _, v := range input { - region := location.Normalize(v) - regions = append(regions, region) - } - - return ®ions -} diff --git a/internal/services/labservice/lab_service_plan_resource_test.go b/internal/services/labservice/lab_service_plan_resource_test.go deleted file mode 100644 index 935524fe1cb10..0000000000000 --- a/internal/services/labservice/lab_service_plan_resource_test.go +++ /dev/null @@ -1,324 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package labservice_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type LabServicePlanResource struct{} - -func TestAccLabServicePlan_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_lab_service_plan", "test") - r := LabServicePlanResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccLabServicePlan_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_lab_service_plan", "test") - r := LabServicePlanResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func TestAccLabServicePlan_complete(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_lab_service_plan", "test") - r := LabServicePlanResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccLabServicePlan_update(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_lab_service_plan", "test") - r := LabServicePlanResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.update(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func (r LabServicePlanResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := labplan.ParseLabPlanID(state.ID) - if err != nil { - return nil, err - } - - client := clients.LabService.LabPlanClient - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return utils.Bool(false), nil - } - return nil, fmt.Errorf("retrieving %s: %+v", id, err) - } - return utils.Bool(resp.Model != nil), nil -} - -func (r LabServicePlanResource) template(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-lslp-%d" - location = "%s" -} -`, data.RandomInteger, data.Locations.Primary) -} - -func (r LabServicePlanResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_lab_service_plan" "test" { - name = "acctest-lslp-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - allowed_regions = [azurerm_resource_group.test.location] -} -`, r.template(data), data.RandomInteger) -} - -func (r LabServicePlanResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_lab_service_plan" "import" { - name = azurerm_lab_service_plan.test.name - resource_group_name = azurerm_lab_service_plan.test.resource_group_name - location = azurerm_lab_service_plan.test.location - allowed_regions = azurerm_lab_service_plan.test.allowed_regions -} -`, r.basic(data)) -} - -func (r LabServicePlanResource) complete(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_shared_image_gallery" "test" { - name = "acctestsig%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location -} - -data "azuread_service_principal" "test" { - application_id = "c7bb12bf-0b39-4f7f-9171-f418ff39b76a" -} - -resource "azurerm_role_assignment" "test" { - scope = azurerm_shared_image_gallery.test.id - role_definition_name = "Contributor" - principal_id = data.azuread_service_principal.test.object_id -} - -resource "azurerm_virtual_network" "test" { - name = "acctest-vnet-%d" - address_space = ["10.0.0.0/16"] - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name -} - -resource "azurerm_subnet" "test" { - name = "acctest-sn-%d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.0.2.0/24"] - - delegation { - name = "Microsoft.LabServices.labplans" - - service_delegation { - name = "Microsoft.LabServices/labplans" - - actions = [ - "Microsoft.Network/virtualNetworks/subnets/join/action", - ] - } - } -} - -resource "azurerm_lab_service_plan" "test" { - name = "acctest-lslp-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - allowed_regions = [azurerm_resource_group.test.location] - default_network_subnet_id = azurerm_subnet.test.id - shared_gallery_id = azurerm_shared_image_gallery.test.id - - default_auto_shutdown { - disconnect_delay = "PT15M" - idle_delay = "PT15M" - no_connect_delay = "PT15M" - shutdown_on_idle = "LowUsage" - } - - default_connection { - client_ssh_access = "Public" - web_ssh_access = "Public" - } - - support { - email = "company@terraform.io" - instructions = "Contact support for help" - phone = "+1-555-555-5555" - url = "https://www.terraform.io/" - } - - tags = { - Env = "Test" - } - - depends_on = [azurerm_role_assignment.test] -} -`, r.template(data), data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger) -} - -func (r LabServicePlanResource) update(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_virtual_network" "test" { - name = "acctest-vnet-%d" - address_space = ["10.0.0.0/16"] - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name -} - -resource "azurerm_subnet" "test" { - name = "acctest-sn-%d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.0.2.0/24"] - - delegation { - name = "Microsoft.LabServices.labplans" - - service_delegation { - name = "Microsoft.LabServices/labplans" - - actions = [ - "Microsoft.Network/virtualNetworks/subnets/join/action", - ] - } - } -} - -resource "azurerm_subnet" "test2" { - name = "acctest-sn2-%d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.0.3.0/24"] - - delegation { - name = "Microsoft.LabServices.labplans" - - service_delegation { - name = "Microsoft.LabServices/labplans" - - actions = [ - "Microsoft.Network/virtualNetworks/subnets/join/action", - ] - } - } -} - -resource "azurerm_lab_service_plan" "test" { - name = "acctest-lslp-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - allowed_regions = [azurerm_resource_group.test.location, "%s"] - default_network_subnet_id = azurerm_subnet.test2.id - - default_auto_shutdown { - disconnect_delay = "PT16M" - idle_delay = "PT16M" - no_connect_delay = "PT16M" - shutdown_on_idle = "UserAbsence" - } - - default_connection { - client_rdp_access = "Public" - web_rdp_access = "Public" - } - - support { - email = "company2@terraform.io" - instructions = "Contacting support for help" - phone = "+1-555-555-6666" - url = "https://www.terraform2.io/" - } - - tags = { - Env = "Test2" - } -} -`, r.template(data), data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.Locations.Secondary) -} diff --git a/internal/services/labservice/lab_service_schedule_resource.go b/internal/services/labservice/lab_service_schedule_resource.go deleted file mode 100644 index 61902a9a5ce0e..0000000000000 --- a/internal/services/labservice/lab_service_schedule_resource.go +++ /dev/null @@ -1,400 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package labservice - -import ( - "context" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab" - "github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule" - azValidate "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/labservice/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/suppress" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type LabServiceScheduleModel struct { - Name string `tfschema:"name"` - LabId string `tfschema:"lab_id"` - Notes string `tfschema:"notes"` - Recurrence []Recurrence `tfschema:"recurrence"` - StartTime string `tfschema:"start_time"` - StopTime string `tfschema:"stop_time"` - TimeZone string `tfschema:"time_zone"` -} - -type Recurrence struct { - ExpirationDate string `tfschema:"expiration_date"` - Frequency schedule.RecurrenceFrequency `tfschema:"frequency"` - Interval int64 `tfschema:"interval"` - WeekDays []string `tfschema:"week_days"` -} - -type LabServiceScheduleResource struct{} - -var _ sdk.ResourceWithUpdate = LabServiceScheduleResource{} - -func (r LabServiceScheduleResource) ResourceType() string { - return "azurerm_lab_service_schedule" -} - -func (r LabServiceScheduleResource) DeprecationMessage() string { - return "The `azurerm_lab_service_schedule` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. See more details from https://learn.microsoft.com/en-us/azure/lab-services/retirement-guide" -} - -func (r LabServiceScheduleResource) ModelObject() interface{} { - return &LabServiceScheduleModel{} -} - -func (r LabServiceScheduleResource) IDValidationFunc() pluginsdk.SchemaValidateFunc { - return schedule.ValidateScheduleID -} - -func (r LabServiceScheduleResource) Arguments() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "lab_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: lab.ValidateLabID, - }, - - "stop_time": { - Type: pluginsdk.TypeString, - Required: true, - DiffSuppressFunc: suppress.RFC3339MinuteTime, - ValidateFunc: validation.IsRFC3339Time, - }, - - "time_zone": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: azValidate.AzureTimeZoneString(), - }, - - "notes": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validate.ScheduleNotes, - }, - - "recurrence": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "expiration_date": { - Type: pluginsdk.TypeString, - Required: true, - DiffSuppressFunc: suppress.RFC3339MinuteTime, - ValidateFunc: validation.IsRFC3339Time, - }, - - "frequency": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - string(schedule.RecurrenceFrequencyDaily), - string(schedule.RecurrenceFrequencyWeekly), - }, false), - }, - - "interval": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntBetween(1, 365), - }, - - "week_days": { - Type: pluginsdk.TypeList, - Optional: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - ValidateFunc: validation.StringInSlice([]string{ - string(schedule.WeekDaySunday), - string(schedule.WeekDayMonday), - string(schedule.WeekDayTuesday), - string(schedule.WeekDayWednesday), - string(schedule.WeekDayThursday), - string(schedule.WeekDayFriday), - string(schedule.WeekDaySaturday), - }, false), - }, - }, - }, - }, - }, - - "start_time": { - Type: pluginsdk.TypeString, - Optional: true, - DiffSuppressFunc: suppress.RFC3339MinuteTime, - ValidateFunc: validation.IsRFC3339Time, - }, - } -} - -func (r LabServiceScheduleResource) Attributes() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{} -} - -func (r LabServiceScheduleResource) Create() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 30 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - var model LabServiceScheduleModel - if err := metadata.Decode(&model); err != nil { - return fmt.Errorf("decoding: %+v", err) - } - - client := metadata.Client.LabService.ScheduleClient - labId, err := lab.ParseLabID(model.LabId) - if err != nil { - return err - } - - id := schedule.NewScheduleID(labId.SubscriptionId, labId.ResourceGroupName, labId.LabName, model.Name) - existing, err := client.Get(ctx, id) - if err != nil && !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for existing %s: %+v", id, err) - } - - if !response.WasNotFound(existing.HttpResponse) { - return metadata.ResourceRequiresImport(r.ResourceType(), id) - } - - properties := &schedule.Schedule{ - Properties: schedule.ScheduleProperties{ - StopAt: pointer.To(model.StopTime), - TimeZoneId: pointer.To(model.TimeZone), - RecurrencePattern: expandRecurrencePattern(model.Recurrence), - }, - } - - if model.Notes != "" { - properties.Properties.Notes = &model.Notes - } - - if model.StartTime != "" { - properties.Properties.StartAt = &model.StartTime - } - - if _, err := client.CreateOrUpdate(ctx, id, *properties); err != nil { - return fmt.Errorf("creating %s: %+v", id, err) - } - - metadata.SetID(id) - return nil - }, - } -} - -func (r LabServiceScheduleResource) Update() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 30 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.LabService.ScheduleClient - - id, err := schedule.ParseScheduleID(metadata.ResourceData.Id()) - if err != nil { - return err - } - - var model LabServiceScheduleModel - if err := metadata.Decode(&model); err != nil { - return fmt.Errorf("decoding: %+v", err) - } - - resp, err := client.Get(ctx, *id) - if err != nil { - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - properties := resp.Model - if properties == nil { - return fmt.Errorf("retrieving %s: properties was nil", id) - } - - if metadata.ResourceData.HasChange("notes") { - if model.Notes != "" { - properties.Properties.Notes = &model.Notes - } else { - properties.Properties.Notes = nil - } - } - - if metadata.ResourceData.HasChange("recurrence") { - properties.Properties.RecurrencePattern = expandRecurrencePattern(model.Recurrence) - } - - if metadata.ResourceData.HasChange("start_time") { - properties.Properties.StartAt = &model.StartTime - } - - if metadata.ResourceData.HasChange("stop_time") { - properties.Properties.StopAt = pointer.To(model.StopTime) - } - - if metadata.ResourceData.HasChange("time_zone") { - properties.Properties.TimeZoneId = pointer.To(model.TimeZone) - } - - if _, err := client.CreateOrUpdate(ctx, *id, *properties); err != nil { - return fmt.Errorf("updating %s: %+v", *id, err) - } - - return nil - }, - } -} - -func (r LabServiceScheduleResource) Read() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 5 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.LabService.ScheduleClient - - id, err := schedule.ParseScheduleID(metadata.ResourceData.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return metadata.MarkAsGone(id) - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - model := resp.Model - if model == nil { - return fmt.Errorf("retrieving %s: model was nil", id) - } - - state := LabServiceScheduleModel{ - Name: id.ScheduleName, - LabId: lab.NewLabID(id.SubscriptionId, id.ResourceGroupName, id.LabName).ID(), - } - - properties := &model.Properties - - state.StopTime = pointer.From(properties.StopAt) - state.TimeZone = pointer.From(properties.TimeZoneId) - state.Recurrence = flattenRecurrencePattern(properties.RecurrencePattern) - - if properties.Notes != nil { - state.Notes = *properties.Notes - } - - if properties.StartAt != nil { - state.StartTime = *properties.StartAt - } - - return metadata.Encode(&state) - }, - } -} - -func (r LabServiceScheduleResource) Delete() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 30 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.LabService.ScheduleClient - - id, err := schedule.ParseScheduleID(metadata.ResourceData.Id()) - if err != nil { - return err - } - - if err := client.DeleteThenPoll(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", id, err) - } - - return nil - }, - } -} - -func expandRecurrencePattern(input []Recurrence) *schedule.RecurrencePattern { - if len(input) == 0 { - return nil - } - - recurrencePattern := input[0] - result := schedule.RecurrencePattern{ - ExpirationDate: recurrencePattern.ExpirationDate, - Frequency: recurrencePattern.Frequency, - WeekDays: expandWeekDays(recurrencePattern.WeekDays), - } - - if recurrencePattern.Interval != 0 { - result.Interval = utils.Int64(recurrencePattern.Interval) - } - - return &result -} - -func flattenRecurrencePattern(input *schedule.RecurrencePattern) []Recurrence { - var recurrencePatterns []Recurrence - if input == nil { - return recurrencePatterns - } - - recurrencePattern := Recurrence{ - ExpirationDate: input.ExpirationDate, - Frequency: input.Frequency, - WeekDays: flattenWeekDays(input.WeekDays), - } - - if input.Interval != nil { - recurrencePattern.Interval = *input.Interval - } - - return append(recurrencePatterns, recurrencePattern) -} - -func expandWeekDays(input []string) *[]schedule.WeekDay { - if len(input) == 0 { - return nil - } - - result := make([]schedule.WeekDay, 0) - - for _, item := range input { - result = append(result, schedule.WeekDay(item)) - } - - return &result -} - -func flattenWeekDays(input *[]schedule.WeekDay) []string { - if input == nil { - return nil - } - - result := make([]string, 0) - - for _, item := range *input { - result = append(result, string(item)) - } - - return result -} diff --git a/internal/services/labservice/lab_service_schedule_resource_test.go b/internal/services/labservice/lab_service_schedule_resource_test.go deleted file mode 100644 index f5e3ee7711f1e..0000000000000 --- a/internal/services/labservice/lab_service_schedule_resource_test.go +++ /dev/null @@ -1,255 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package labservice_test - -import ( - "context" - "fmt" - "testing" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type LabServiceScheduleResource struct{} - -func TestAccLabServiceSchedule_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_lab_service_schedule", "test") - r := LabServiceScheduleResource{} - stopTime := time.Now().Add(time.Hour * 1).Format(time.RFC3339) - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data, stopTime), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccLabServiceSchedule_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_lab_service_schedule", "test") - r := LabServiceScheduleResource{} - stopTime := time.Now().Add(time.Hour * 1).Format(time.RFC3339) - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data, stopTime), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - { - Config: r.requiresImport(data, stopTime), - ExpectError: acceptance.RequiresImportError(data.ResourceType), - }, - }) -} - -func TestAccLabServiceSchedule_complete(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_lab_service_schedule", "test") - r := LabServiceScheduleResource{} - - startTime := time.Now().Format(time.RFC3339) - stopTime := time.Now().Add(time.Hour * 1).Format(time.RFC3339) - expirationDate := time.Now().Add(time.Hour * 1).Format(time.RFC3339) - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data, startTime, stopTime, expirationDate), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccLabServiceSchedule_update(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_lab_service_schedule", "test") - r := LabServiceScheduleResource{} - - startTime := time.Now().Format(time.RFC3339) - stopTime := time.Now().Add(time.Hour * 1).Format(time.RFC3339) - expirationDate := time.Now().Add(time.Hour * 1).Format(time.RFC3339) - - updatedStartTime := time.Now().Add(time.Hour * 1).Format(time.RFC3339) - updatedStopTime := time.Now().Add(time.Hour * 2).Format(time.RFC3339) - updatedExpirationDate := time.Now().Add(time.Hour * 2).Format(time.RFC3339) - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data, startTime, stopTime, expirationDate), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.update(data, updatedStartTime, updatedStopTime, updatedExpirationDate), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func (r LabServiceScheduleResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := schedule.ParseScheduleID(state.ID) - if err != nil { - return nil, err - } - - client := clients.LabService.ScheduleClient - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return utils.Bool(false), nil - } - return nil, fmt.Errorf("retrieving %s: %+v", id, err) - } - return utils.Bool(resp.Model != nil), nil -} - -func (r LabServiceScheduleResource) template(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-labschedule-%d" - location = "%s" -} - -resource "azurerm_lab_service_lab" "test" { - name = "acctest-lab-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - title = "Test Title" - - security { - open_access_enabled = false - } - - virtual_machine { - admin_user { - username = "testadmin" - password = "Password1234!" - } - - image_reference { - offer = "0001-com-ubuntu-server-focal" - publisher = "canonical" - sku = "20_04-lts" - version = "latest" - } - - sku { - name = "Classic_Fsv2_2_4GB_128_S_SSD" - capacity = 1 - } - } - - connection_setting { - client_ssh_access = "Public" - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomIntOfLength(17)) -} - -func (r LabServiceScheduleResource) basic(data acceptance.TestData, stopTime string) string { - return fmt.Sprintf(` -%s - -resource "azurerm_lab_service_schedule" "test" { - name = "acctest-labschedule-%d" - lab_id = azurerm_lab_service_lab.test.id - stop_time = "%s" - time_zone = "America/Los_Angeles" -} -`, r.template(data), data.RandomInteger, stopTime) -} - -func (r LabServiceScheduleResource) requiresImport(data acceptance.TestData, stopTime string) string { - return fmt.Sprintf(` -%s - -resource "azurerm_lab_service_schedule" "import" { - name = azurerm_lab_service_schedule.test.name - lab_id = azurerm_lab_service_schedule.test.lab_id - stop_time = azurerm_lab_service_schedule.test.stop_time - time_zone = azurerm_lab_service_schedule.test.time_zone -} -`, r.basic(data, stopTime)) -} - -func (r LabServiceScheduleResource) complete(data acceptance.TestData, startTime, stopTime, expirationDate string) string { - return fmt.Sprintf(` -%s - -resource "azurerm_lab_service_schedule" "test" { - name = "acctest-labschedule-%d" - lab_id = azurerm_lab_service_lab.test.id - notes = "Testing" - start_time = "%s" - stop_time = "%s" - time_zone = "America/Los_Angeles" - - recurrence { - expiration_date = "%s" - frequency = "Weekly" - interval = 1 - week_days = ["Friday", "Thursday"] - } -} -`, r.template(data), data.RandomInteger, startTime, stopTime, expirationDate) -} - -func (r LabServiceScheduleResource) update(data acceptance.TestData, startTime, stopTime, expirationDate string) string { - return fmt.Sprintf(` -%s - -resource "azurerm_lab_service_schedule" "test" { - name = "acctest-labschedule-%d" - lab_id = azurerm_lab_service_lab.test.id - notes = "Testing2" - start_time = "%s" - stop_time = "%s" - time_zone = "America/Grenada" - - recurrence { - expiration_date = "%s" - frequency = "Daily" - interval = 2 - } -} -`, r.template(data), data.RandomInteger, startTime, stopTime, expirationDate) -} diff --git a/internal/services/labservice/lab_service_user_resource.go b/internal/services/labservice/lab_service_user_resource.go deleted file mode 100644 index 0ccfbdb9bd724..0000000000000 --- a/internal/services/labservice/lab_service_user_resource.go +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package labservice - -import ( - "context" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab" - "github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user" - azValidate "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/labservice/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type LabServiceUserModel struct { - Name string `tfschema:"name"` - LabId string `tfschema:"lab_id"` - Email string `tfschema:"email"` - AdditionalUsageQuota string `tfschema:"additional_usage_quota"` -} - -type LabServiceUserResource struct{} - -var _ sdk.ResourceWithUpdate = LabServiceUserResource{} - -func (r LabServiceUserResource) ResourceType() string { - return "azurerm_lab_service_user" -} - -func (r LabServiceUserResource) DeprecationMessage() string { - return "The `azurerm_lab_service_user` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. See more details from https://learn.microsoft.com/en-us/azure/lab-services/retirement-guide" -} - -func (r LabServiceUserResource) ModelObject() interface{} { - return &LabServiceUserModel{} -} - -func (r LabServiceUserResource) IDValidationFunc() pluginsdk.SchemaValidateFunc { - return user.ValidateUserID -} - -func (r LabServiceUserResource) Arguments() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "lab_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: lab.ValidateLabID, - }, - - "email": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.Email, - }, - - "additional_usage_quota": { - Type: pluginsdk.TypeString, - Optional: true, - Default: "PT0S", - ValidateFunc: azValidate.ISO8601Duration, - }, - } -} - -func (r LabServiceUserResource) Attributes() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{} -} - -func (r LabServiceUserResource) Create() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 30 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - var model LabServiceUserModel - if err := metadata.Decode(&model); err != nil { - return fmt.Errorf("decoding: %+v", err) - } - - client := metadata.Client.LabService.UserClient - labId, err := lab.ParseLabID(model.LabId) - if err != nil { - return err - } - - id := user.NewUserID(labId.SubscriptionId, labId.ResourceGroupName, labId.LabName, model.Name) - existing, err := client.Get(ctx, id) - if err != nil && !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for existing %s: %+v", id, err) - } - - if !response.WasNotFound(existing.HttpResponse) { - return metadata.ResourceRequiresImport(r.ResourceType(), id) - } - - properties := &user.User{ - Properties: user.UserProperties{ - Email: model.Email, - }, - } - - if model.AdditionalUsageQuota != "" { - properties.Properties.AdditionalUsageQuota = &model.AdditionalUsageQuota - } - - if err := client.CreateOrUpdateThenPoll(ctx, id, *properties); err != nil { - return fmt.Errorf("creating %s: %+v", id, err) - } - - metadata.SetID(id) - return nil - }, - } -} - -func (r LabServiceUserResource) Update() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 30 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.LabService.UserClient - - id, err := user.ParseUserID(metadata.ResourceData.Id()) - if err != nil { - return err - } - - var model LabServiceUserModel - if err := metadata.Decode(&model); err != nil { - return fmt.Errorf("decoding: %+v", err) - } - - resp, err := client.Get(ctx, *id) - if err != nil { - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - props := resp.Model - if props == nil { - return fmt.Errorf("retrieving %s: properties was nil", id) - } - - if metadata.ResourceData.HasChange("additional_usage_quota") { - props.Properties.AdditionalUsageQuota = utils.String(model.AdditionalUsageQuota) - } - - if metadata.ResourceData.HasChange("email") { - props.Properties.Email = model.Email - } - - if err := client.CreateOrUpdateThenPoll(ctx, *id, *props); err != nil { - return fmt.Errorf("updating %s: %+v", *id, err) - } - - return nil - }, - } -} - -func (r LabServiceUserResource) Read() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 5 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.LabService.UserClient - - id, err := user.ParseUserID(metadata.ResourceData.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return metadata.MarkAsGone(id) - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - model := resp.Model - if model == nil { - return fmt.Errorf("retrieving %s: model was nil", id) - } - - state := LabServiceUserModel{ - Name: id.UserName, - LabId: lab.NewLabID(id.SubscriptionId, id.ResourceGroupName, id.LabName).ID(), - } - - properties := &model.Properties - state.Email = properties.Email - - if properties.AdditionalUsageQuota != nil { - state.AdditionalUsageQuota = *properties.AdditionalUsageQuota - } - - return metadata.Encode(&state) - }, - } -} - -func (r LabServiceUserResource) Delete() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Timeout: 30 * time.Minute, - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.LabService.UserClient - - id, err := user.ParseUserID(metadata.ResourceData.Id()) - if err != nil { - return err - } - - if err := client.DeleteThenPoll(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", id, err) - } - - return nil - }, - } -} diff --git a/internal/services/labservice/lab_service_user_resource_test.go b/internal/services/labservice/lab_service_user_resource_test.go deleted file mode 100644 index 81368dee396b9..0000000000000 --- a/internal/services/labservice/lab_service_user_resource_test.go +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package labservice_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type LabServiceUserResource struct{} - -func TestAccLabServiceUser_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_lab_service_user", "test") - r := LabServiceUserResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccLabServiceUser_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_lab_service_user", "test") - r := LabServiceUserResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func TestAccLabServiceUser_complete(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_lab_service_user", "test") - r := LabServiceUserResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccLabServiceUser_update(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("Resource has been removed in 4.0") - } - - data := acceptance.BuildTestData(t, "azurerm_lab_service_user", "test") - r := LabServiceUserResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.update(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func (r LabServiceUserResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := user.ParseUserID(state.ID) - if err != nil { - return nil, err - } - - client := clients.LabService.UserClient - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return utils.Bool(false), nil - } - return nil, fmt.Errorf("retrieving %s: %+v", id, err) - } - return utils.Bool(resp.Model != nil), nil -} - -func (r LabServiceUserResource) template(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-labuser-%d" - location = "%s" -} - -resource "azurerm_lab_service_lab" "test" { - name = "acctest-lab-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - title = "Test Title" - - security { - open_access_enabled = false - } - - virtual_machine { - admin_user { - username = "testadmin" - password = "Password1234!" - } - - image_reference { - offer = "0001-com-ubuntu-server-focal" - publisher = "canonical" - sku = "20_04-lts" - version = "latest" - } - - sku { - name = "Classic_Fsv2_2_4GB_128_S_SSD" - capacity = 1 - } - } - - connection_setting { - client_ssh_access = "Public" - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomIntOfLength(17)) -} - -func (r LabServiceUserResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_lab_service_user" "test" { - name = "acctest-labuser-%d" - lab_id = azurerm_lab_service_lab.test.id - email = "terraform-acctest@hashicorp.com" -} -`, r.template(data), data.RandomInteger) -} - -func (r LabServiceUserResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_lab_service_user" "import" { - name = azurerm_lab_service_user.test.name - lab_id = azurerm_lab_service_user.test.lab_id - email = azurerm_lab_service_user.test.email -} -`, r.basic(data)) -} - -func (r LabServiceUserResource) complete(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_lab_service_user" "test" { - name = "acctest-lsu-%d" - lab_id = azurerm_lab_service_lab.test.id - email = "terraform-acctest@hashicorp.com" - additional_usage_quota = "PT10H" -} -`, r.template(data), data.RandomInteger) -} - -func (r LabServiceUserResource) update(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_lab_service_user" "test" { - name = "acctest-lsu-%d" - lab_id = azurerm_lab_service_lab.test.id - email = "terraform-acctest@hashicorp.com" - additional_usage_quota = "PT11H" -} -`, r.template(data), data.RandomInteger) -} diff --git a/internal/services/labservice/registration.go b/internal/services/labservice/registration.go deleted file mode 100644 index 593d07845dd69..0000000000000 --- a/internal/services/labservice/registration.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package labservice - -import ( - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -type Registration struct{} - -var ( - _ sdk.TypedServiceRegistration = Registration{} - _ sdk.UntypedServiceRegistrationWithAGitHubLabel = Registration{} -) - -func (r Registration) AssociatedGitHubLabel() string { - return "service/labservice" -} - -func (r Registration) DataSources() []sdk.DataSource { - return []sdk.DataSource{} -} - -func (r Registration) Resources() []sdk.Resource { - if !features.FourPointOhBeta() { - return []sdk.Resource{ - LabServiceLabResource{}, - LabServicePlanResource{}, - LabServiceScheduleResource{}, - LabServiceUserResource{}, - } - } - return []sdk.Resource{} -} - -// Name is the name of this Service -func (r Registration) Name() string { - return "Lab Service" -} - -// WebsiteCategories returns a list of categories which can be used for the sidebar -func (r Registration) WebsiteCategories() []string { - return []string{ - "Lab Service", - } -} - -// SupportedDataSources returns the supported Data Sources supported by this Service -func (r Registration) SupportedDataSources() map[string]*pluginsdk.Resource { - return map[string]*pluginsdk.Resource{} -} - -// SupportedResources returns the supported Resources supported by this Service -func (r Registration) SupportedResources() map[string]*pluginsdk.Resource { - return map[string]*pluginsdk.Resource{} -} diff --git a/internal/services/labservice/validate/email.go b/internal/services/labservice/validate/email.go deleted file mode 100644 index b59ae49cc98d1..0000000000000 --- a/internal/services/labservice/validate/email.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "fmt" - "regexp" -) - -func Email(v interface{}, k string) (warnings []string, errors []error) { - value := v.(string) - - if matched := regexp.MustCompile(`^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$`).Match([]byte(value)); !matched { - errors = append(errors, fmt.Errorf("test: %s, %q is not an valida email address", k, v)) - } - return warnings, errors -} diff --git a/internal/services/labservice/validate/email_test.go b/internal/services/labservice/validate/email_test.go deleted file mode 100644 index 0dd702a14b6b6..0000000000000 --- a/internal/services/labservice/validate/email_test.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import "testing" - -func TestEmail(t *testing.T) { - testData := []struct { - Value string - Error bool - }{ - { - Value: "a", - Error: true, - }, - { - Value: "abc", - Error: true, - }, - { - Value: "123", - Error: true, - }, - { - Value: "test.com", - Error: true, - }, - { - Value: "test@.com", - Error: true, - }, - { - Value: "test.com", - Error: true, - }, - { - Value: "testuser@contoso.com", - Error: false, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Value) - - _, err := Email(v.Value, "email") - if err != nil && !v.Error { - t.Fatalf("Expected pass but got an error: %s", err) - } - } -} diff --git a/internal/services/labservice/validate/lab_description.go b/internal/services/labservice/validate/lab_description.go deleted file mode 100644 index 3ec61158065ee..0000000000000 --- a/internal/services/labservice/validate/lab_description.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "fmt" - "regexp" -) - -func LabDescription(v interface{}, k string) (warnings []string, errors []error) { - value := v.(string) - if matched := regexp.MustCompile(`^.{1,500}$`).Match([]byte(value)); !matched { - errors = append(errors, fmt.Errorf("%q may only be up to 500 characters in length", k)) - } - - return warnings, errors -} diff --git a/internal/services/labservice/validate/lab_description_test.go b/internal/services/labservice/validate/lab_description_test.go deleted file mode 100644 index a61b8d8afa156..0000000000000 --- a/internal/services/labservice/validate/lab_description_test.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "strings" - "testing" -) - -func TestValidateLabDescription(t *testing.T) { - cases := []struct { - Input string - ExpectError bool - }{ - { - Input: "", - ExpectError: true, - }, - { - Input: "hello", - ExpectError: false, - }, - { - Input: strings.Repeat("s", 499), - ExpectError: false, - }, - { - Input: strings.Repeat("s", 500), - ExpectError: false, - }, - { - Input: strings.Repeat("s", 501), - ExpectError: true, - }, - } - - for _, tc := range cases { - _, errors := LabDescription(tc.Input, "description") - - hasError := len(errors) > 0 - if tc.ExpectError && !hasError { - t.Fatalf("Expected the Lab Description to trigger a validation error for '%s'", tc.Input) - } - } -} diff --git a/internal/services/labservice/validate/lab_image_version.go b/internal/services/labservice/validate/lab_image_version.go deleted file mode 100644 index 55fc815fe3ffb..0000000000000 --- a/internal/services/labservice/validate/lab_image_version.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "fmt" - "regexp" -) - -func LabImageVersion(v interface{}, k string) (warnings []string, errors []error) { - value := v.(string) - if matched := regexp.MustCompile(`^.{1,10}$`).Match([]byte(value)); !matched { - errors = append(errors, fmt.Errorf("%q may only be up to 10 characters in length", k)) - } - - return warnings, errors -} diff --git a/internal/services/labservice/validate/lab_image_version_test.go b/internal/services/labservice/validate/lab_image_version_test.go deleted file mode 100644 index 46644d74070cb..0000000000000 --- a/internal/services/labservice/validate/lab_image_version_test.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "strings" - "testing" -) - -func TestValidateLabImageVersion(t *testing.T) { - cases := []struct { - Input string - ExpectError bool - }{ - { - Input: "", - ExpectError: true, - }, - { - Input: "hello", - ExpectError: false, - }, - { - Input: strings.Repeat("s", 9), - ExpectError: false, - }, - { - Input: strings.Repeat("s", 10), - ExpectError: false, - }, - { - Input: strings.Repeat("s", 11), - ExpectError: true, - }, - } - - for _, tc := range cases { - _, errors := LabImageVersion(tc.Input, "version") - - hasError := len(errors) > 0 - if tc.ExpectError && !hasError { - t.Fatalf("Expected the Lab Image Version to trigger a validation error for '%s'", tc.Input) - } - } -} diff --git a/internal/services/labservice/validate/lab_name.go b/internal/services/labservice/validate/lab_name.go deleted file mode 100644 index 415ebe31f6f4e..0000000000000 --- a/internal/services/labservice/validate/lab_name.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "fmt" - "regexp" -) - -func LabName(v interface{}, k string) (warnings []string, errors []error) { - value := v.(string) - if matched := regexp.MustCompile(`^[0-9a-zA-Z-_.]{1,60}$`).Match([]byte(value)); !matched { - errors = append(errors, fmt.Errorf("%q may only contain alphanumeric characters, periods, underscores and hyphens", k)) - } - - return warnings, errors -} diff --git a/internal/services/labservice/validate/lab_name_test.go b/internal/services/labservice/validate/lab_name_test.go deleted file mode 100644 index c07fae4c4f0d0..0000000000000 --- a/internal/services/labservice/validate/lab_name_test.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "testing" -) - -func TestValidateLabName(t *testing.T) { - cases := []struct { - Input string - ExpectError bool - }{ - { - Input: "", - ExpectError: true, - }, - { - Input: "hello", - ExpectError: false, - }, - { - Input: "h.e-l_lo2", - ExpectError: false, - }, - { - Input: "h#e-l_lo2", - ExpectError: true, - }, - } - - for _, tc := range cases { - _, errors := LabName(tc.Input, "name") - - hasError := len(errors) > 0 - if tc.ExpectError && !hasError { - t.Fatalf("Expected the Lab Name to trigger a validation error for '%s'", tc.Input) - } - } -} diff --git a/internal/services/labservice/validate/lab_password.go b/internal/services/labservice/validate/lab_password.go deleted file mode 100644 index 56e200ecfe01a..0000000000000 --- a/internal/services/labservice/validate/lab_password.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "fmt" - "regexp" -) - -func LabPassword(v interface{}, k string) (warnings []string, errors []error) { - value := v.(string) - if matched := regexp.MustCompile(`^.{8,123}$`).Match([]byte(value)); !matched { - errors = append(errors, fmt.Errorf("%q may only be up to 123 characters in length", k)) - } - - return warnings, errors -} diff --git a/internal/services/labservice/validate/lab_password_test.go b/internal/services/labservice/validate/lab_password_test.go deleted file mode 100644 index 49bd41ecf834c..0000000000000 --- a/internal/services/labservice/validate/lab_password_test.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "strings" - "testing" -) - -func TestValidateLabPassword(t *testing.T) { - cases := []struct { - Input string - ExpectError bool - }{ - { - Input: "", - ExpectError: true, - }, - { - Input: "hello", - ExpectError: false, - }, - { - Input: strings.Repeat("s", 122), - ExpectError: false, - }, - { - Input: strings.Repeat("s", 123), - ExpectError: false, - }, - { - Input: strings.Repeat("s", 124), - ExpectError: true, - }, - } - - for _, tc := range cases { - _, errors := LabPassword(tc.Input, "password") - - hasError := len(errors) > 0 - if tc.ExpectError && !hasError { - t.Fatalf("Expected the Lab Password to trigger a validation error for '%s'", tc.Input) - } - } -} diff --git a/internal/services/labservice/validate/lab_plan_name.go b/internal/services/labservice/validate/lab_plan_name.go deleted file mode 100644 index 4dc9eafafa08f..0000000000000 --- a/internal/services/labservice/validate/lab_plan_name.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "fmt" - "regexp" -) - -func LabPlanName(v interface{}, k string) (warnings []string, errors []error) { - value := v.(string) - if matched := regexp.MustCompile(`^.{1,260}$`).Match([]byte(value)); !matched { - errors = append(errors, fmt.Errorf("%q may only be up to 260 characters in length", k)) - } - - return warnings, errors -} diff --git a/internal/services/labservice/validate/lab_plan_name_test.go b/internal/services/labservice/validate/lab_plan_name_test.go deleted file mode 100644 index 302f976b7bd38..0000000000000 --- a/internal/services/labservice/validate/lab_plan_name_test.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "strings" - "testing" -) - -func TestValidateLabPlanName(t *testing.T) { - cases := []struct { - Input string - ExpectError bool - }{ - { - Input: "", - ExpectError: true, - }, - { - Input: "hello", - ExpectError: false, - }, - { - Input: strings.Repeat("s", 259), - ExpectError: false, - }, - { - Input: strings.Repeat("s", 260), - ExpectError: false, - }, - { - Input: strings.Repeat("s", 261), - ExpectError: true, - }, - } - - for _, tc := range cases { - _, errors := LabPlanName(tc.Input, "name") - - hasError := len(errors) > 0 - if tc.ExpectError && !hasError { - t.Fatalf("Expected the Lab Plan Name to trigger a validation error for '%s'", tc.Input) - } - } -} diff --git a/internal/services/labservice/validate/lab_sku_name.go b/internal/services/labservice/validate/lab_sku_name.go deleted file mode 100644 index 29c1a0cd91d3e..0000000000000 --- a/internal/services/labservice/validate/lab_sku_name.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "fmt" - "regexp" -) - -func LabSkuName(v interface{}, k string) (warnings []string, errors []error) { - value := v.(string) - if matched := regexp.MustCompile(`^.{1,200}$`).Match([]byte(value)); !matched { - errors = append(errors, fmt.Errorf("%q may only be up to 200 characters in length", k)) - } - - return warnings, errors -} diff --git a/internal/services/labservice/validate/lab_sku_name_test.go b/internal/services/labservice/validate/lab_sku_name_test.go deleted file mode 100644 index 58f75b6284d15..0000000000000 --- a/internal/services/labservice/validate/lab_sku_name_test.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "strings" - "testing" -) - -func TestValidateLabSkuName(t *testing.T) { - cases := []struct { - Input string - ExpectError bool - }{ - { - Input: "", - ExpectError: true, - }, - { - Input: "hello", - ExpectError: false, - }, - { - Input: strings.Repeat("s", 199), - ExpectError: false, - }, - { - Input: strings.Repeat("s", 200), - ExpectError: false, - }, - { - Input: strings.Repeat("s", 201), - ExpectError: true, - }, - } - - for _, tc := range cases { - _, errors := LabSkuName(tc.Input, "name") - - hasError := len(errors) > 0 - if tc.ExpectError && !hasError { - t.Fatalf("Expected the Lab Sku Name to trigger a validation error for '%s'", tc.Input) - } - } -} diff --git a/internal/services/labservice/validate/lab_title.go b/internal/services/labservice/validate/lab_title.go deleted file mode 100644 index ea5e0e16beba4..0000000000000 --- a/internal/services/labservice/validate/lab_title.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "fmt" - "regexp" -) - -func LabTitle(v interface{}, k string) (warnings []string, errors []error) { - value := v.(string) - if matched := regexp.MustCompile(`^.{1,100}$`).Match([]byte(value)); !matched { - errors = append(errors, fmt.Errorf("%q may only be up to 100 characters in length", k)) - } - - return warnings, errors -} diff --git a/internal/services/labservice/validate/lab_title_test.go b/internal/services/labservice/validate/lab_title_test.go deleted file mode 100644 index 993315a4beccb..0000000000000 --- a/internal/services/labservice/validate/lab_title_test.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "strings" - "testing" -) - -func TestValidateLabTitle(t *testing.T) { - cases := []struct { - Input string - ExpectError bool - }{ - { - Input: "", - ExpectError: true, - }, - { - Input: "hello", - ExpectError: false, - }, - { - Input: strings.Repeat("s", 99), - ExpectError: false, - }, - { - Input: strings.Repeat("s", 100), - ExpectError: false, - }, - { - Input: strings.Repeat("s", 101), - ExpectError: true, - }, - } - - for _, tc := range cases { - _, errors := LabTitle(tc.Input, "title") - - hasError := len(errors) > 0 - if tc.ExpectError && !hasError { - t.Fatalf("Expected the Lab Title to trigger a validation error for '%s'", tc.Input) - } - } -} diff --git a/internal/services/labservice/validate/lab_username.go b/internal/services/labservice/validate/lab_username.go deleted file mode 100644 index 544b4eac73975..0000000000000 --- a/internal/services/labservice/validate/lab_username.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "fmt" - "regexp" -) - -func LabUsername(v interface{}, k string) (warnings []string, errors []error) { - value := v.(string) - if matched := regexp.MustCompile(`^.{1,20}$`).Match([]byte(value)); !matched { - errors = append(errors, fmt.Errorf("%q may only be up to 20 characters in length", k)) - } - - return warnings, errors -} diff --git a/internal/services/labservice/validate/lab_username_test.go b/internal/services/labservice/validate/lab_username_test.go deleted file mode 100644 index 5a189905f1678..0000000000000 --- a/internal/services/labservice/validate/lab_username_test.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "strings" - "testing" -) - -func TestValidateLabUsername(t *testing.T) { - cases := []struct { - Input string - ExpectError bool - }{ - { - Input: "", - ExpectError: true, - }, - { - Input: "hello", - ExpectError: false, - }, - { - Input: strings.Repeat("s", 19), - ExpectError: false, - }, - { - Input: strings.Repeat("s", 20), - ExpectError: false, - }, - { - Input: strings.Repeat("s", 21), - ExpectError: true, - }, - } - - for _, tc := range cases { - _, errors := LabUsername(tc.Input, "username") - - hasError := len(errors) > 0 - if tc.ExpectError && !hasError { - t.Fatalf("Expected the Lab Username to trigger a validation error for '%s'", tc.Input) - } - } -} diff --git a/internal/services/labservice/validate/schedule_notes.go b/internal/services/labservice/validate/schedule_notes.go deleted file mode 100644 index b76b8f478e53b..0000000000000 --- a/internal/services/labservice/validate/schedule_notes.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "fmt" - "regexp" -) - -func ScheduleNotes(v interface{}, k string) (warnings []string, errors []error) { - value := v.(string) - if matched := regexp.MustCompile(`^.{1,1000}$`).Match([]byte(value)); !matched { - errors = append(errors, fmt.Errorf("%q may only be up to 1000 characters in length", k)) - } - - return warnings, errors -} diff --git a/internal/services/labservice/validate/schedule_notes_test.go b/internal/services/labservice/validate/schedule_notes_test.go deleted file mode 100644 index 948465b5e8ce6..0000000000000 --- a/internal/services/labservice/validate/schedule_notes_test.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "strings" - "testing" -) - -func TestValidateScheduleNotes(t *testing.T) { - cases := []struct { - Input string - ExpectError bool - }{ - { - Input: "", - ExpectError: true, - }, - { - Input: "hello", - ExpectError: false, - }, - { - Input: strings.Repeat("s", 999), - ExpectError: false, - }, - { - Input: strings.Repeat("s", 1000), - ExpectError: false, - }, - { - Input: strings.Repeat("s", 1001), - ExpectError: true, - }, - } - - for _, tc := range cases { - _, errors := ScheduleNotes(tc.Input, "notes") - - hasError := len(errors) > 0 - if tc.ExpectError && !hasError { - t.Fatalf("Expected the Lab Plan Name to trigger a validation error for '%s'", tc.Input) - } - } -} diff --git a/internal/services/labservice/validate/support_info_email.go b/internal/services/labservice/validate/support_info_email.go deleted file mode 100644 index da21ac2f0ee79..0000000000000 --- a/internal/services/labservice/validate/support_info_email.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "fmt" - "regexp" -) - -func SupportInfoEmail(v interface{}, k string) (warnings []string, errors []error) { - value := v.(string) - - if matched := regexp.MustCompile(`^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$`).Match([]byte(value)); !matched { - errors = append(errors, fmt.Errorf("%q is not a valid email", k)) - } - return warnings, errors -} diff --git a/internal/services/labservice/validate/support_info_email_test.go b/internal/services/labservice/validate/support_info_email_test.go deleted file mode 100644 index 895382270d1d0..0000000000000 --- a/internal/services/labservice/validate/support_info_email_test.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "testing" -) - -func TestValidateSupportInfoEmail(t *testing.T) { - cases := []struct { - Input string - ExpectError bool - }{ - { - Input: "", - ExpectError: true, - }, - { - Input: "test.terraform.com", - ExpectError: true, - }, - { - Input: "test@terraform.com", - ExpectError: false, - }, - } - - for _, tc := range cases { - _, errors := SupportInfoEmail(tc.Input, "email") - - hasError := len(errors) > 0 - if tc.ExpectError && !hasError { - t.Fatalf("Expected the Support Info Email to trigger a validation error for '%s'", tc.Input) - } - } -} diff --git a/internal/services/labservice/validate/support_info_phone.go b/internal/services/labservice/validate/support_info_phone.go deleted file mode 100644 index c6e1f78e89ca1..0000000000000 --- a/internal/services/labservice/validate/support_info_phone.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "fmt" - "regexp" -) - -func SupportInfoPhone(v interface{}, k string) (warnings []string, errors []error) { - value := v.(string) - - if !regexp.MustCompile(`^([\+])?(\d{1,2})?[\s-]?\(?(\d{3})\)?[\s-]?(\d{3})[-](\d{4})$`).MatchString(value) { - errors = append(errors, fmt.Errorf("%q may contain parentheses, hyphens, plus sign or digits only, must be in a valid 10 digit phone number format with country code being optional(e.g. 123 555-6789)", k)) - } - - return warnings, errors -} diff --git a/internal/services/labservice/validate/support_info_phone_test.go b/internal/services/labservice/validate/support_info_phone_test.go deleted file mode 100644 index 5b2124ad13bc7..0000000000000 --- a/internal/services/labservice/validate/support_info_phone_test.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "testing" -) - -func TestValidateSupportInfoPhone(t *testing.T) { - cases := []struct { - Input string - ExpectError bool - }{ - { - Input: "", - ExpectError: true, - }, - { - Input: "+1-555-555-5555-5555", - ExpectError: true, - }, - { - Input: "+1-555-555-5555", - ExpectError: false, - }, - } - - for _, tc := range cases { - _, errors := SupportInfoEmail(tc.Input, "phone") - - hasError := len(errors) > 0 - if tc.ExpectError && !hasError { - t.Fatalf("Expected the Support Info Phone to trigger a validation error for '%s'", tc.Input) - } - } -} diff --git a/internal/services/legacy/migration/legacy_vmss_v0_to_v1.go b/internal/services/legacy/migration/legacy_vmss_v0_to_v1.go index b9c5725fc67dd..8af6fe12d3af5 100644 --- a/internal/services/legacy/migration/legacy_vmss_v0_to_v1.go +++ b/internal/services/legacy/migration/legacy_vmss_v0_to_v1.go @@ -10,7 +10,7 @@ import ( "encoding/hex" "fmt" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" diff --git a/internal/services/legacy/virtual_machine_scale_set_resource.go b/internal/services/legacy/virtual_machine_scale_set_resource.go index 799f142449a0f..e7808b677734b 100644 --- a/internal/services/legacy/virtual_machine_scale_set_resource.go +++ b/internal/services/legacy/virtual_machine_scale_set_resource.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" diff --git a/internal/services/legacy/virtual_machine_scale_set_resource_test.go b/internal/services/legacy/virtual_machine_scale_set_resource_test.go index 304ff792f59cf..0fbfea9fc42ea 100644 --- a/internal/services/legacy/virtual_machine_scale_set_resource_test.go +++ b/internal/services/legacy/virtual_machine_scale_set_resource_test.go @@ -11,7 +11,7 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/loganalytics/log_analytics_linked_storage_account_resource.go b/internal/services/loganalytics/log_analytics_linked_storage_account_resource.go index b75444b77ffd3..892db56033036 100644 --- a/internal/services/loganalytics/log_analytics_linked_storage_account_resource.go +++ b/internal/services/loganalytics/log_analytics_linked_storage_account_resource.go @@ -14,10 +14,8 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/services/loganalytics/migration" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/suppress" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" "github.com/hashicorp/terraform-provider-azurerm/utils" @@ -58,7 +56,7 @@ func resourceLogAnalyticsLinkedStorageAccount() *pluginsdk.Resource { string(linkedstorageaccounts.DataSourceTypeQuery), string(linkedstorageaccounts.DataSourceTypeAlerts), string(linkedstorageaccounts.DataSourceTypeIngestion), - }, !features.FourPointOhBeta()), + }, false), }, "resource_group_name": commonschema.ResourceGroupName(), @@ -83,10 +81,6 @@ func resourceLogAnalyticsLinkedStorageAccount() *pluginsdk.Resource { }, } - if !features.FourPointOh() { - resource.Schema["data_source_type"].DiffSuppressFunc = suppress.CaseDifference - } - return resource } diff --git a/internal/services/loganalytics/log_analytics_workspace_table_resource.go b/internal/services/loganalytics/log_analytics_workspace_table_resource.go index 87a2533ac7334..d12520135b820 100644 --- a/internal/services/loganalytics/log_analytics_workspace_table_resource.go +++ b/internal/services/loganalytics/log_analytics_workspace_table_resource.go @@ -19,11 +19,12 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/utils" ) -type LogAnalyticsWorkspaceTableResource struct { -} +type LogAnalyticsWorkspaceTableResource struct{} -var _ sdk.ResourceWithUpdate = LogAnalyticsWorkspaceTableResource{} -var _ sdk.ResourceWithCustomizeDiff = LogAnalyticsWorkspaceTableResource{} +var ( + _ sdk.ResourceWithUpdate = LogAnalyticsWorkspaceTableResource{} + _ sdk.ResourceWithCustomizeDiff = LogAnalyticsWorkspaceTableResource{} +) type LogAnalyticsWorkspaceTableResourceModel struct { Name string `tfschema:"name"` @@ -76,13 +77,13 @@ func (r LogAnalyticsWorkspaceTableResource) Arguments() map[string]*pluginsdk.Sc "retention_in_days": { Type: pluginsdk.TypeInt, Optional: true, - ValidateFunc: validation.Any(validation.IntBetween(30, 730), validation.IntInSlice([]int{7})), + ValidateFunc: validation.IntBetween(4, 730), }, "total_retention_in_days": { Type: pluginsdk.TypeInt, Optional: true, - ValidateFunc: validation.Any(validation.IntBetween(30, 4383), validation.IntInSlice([]int{7})), + ValidateFunc: validation.Any(validation.IntBetween(4, 730), validation.IntInSlice([]int{1095, 1460, 1826, 2191, 2556, 2922, 3288, 3653, 4018, 4383})), }, } } @@ -132,8 +133,12 @@ func (r LogAnalyticsWorkspaceTableResource) Create() sdk.ResourceFunc { if model.Plan == string(tables.TablePlanEnumAnalytics) { updateInput.Properties.RetentionInDays = pointer.To(model.RetentionInDays) + } + + if model.TotalRetentionInDays != 0 { updateInput.Properties.TotalRetentionInDays = pointer.To(model.TotalRetentionInDays) } + if err := client.CreateOrUpdateThenPoll(ctx, id, updateInput); err != nil { return fmt.Errorf("failed to update table %s in workspace %s in resource group %s: %s", tableName, workspaceId.WorkspaceName, workspaceId.ResourceGroupName, err) } @@ -182,10 +187,10 @@ func (r LogAnalyticsWorkspaceTableResource) Update() sdk.ResourceFunc { if metadata.ResourceData.HasChange("retention_in_days") { updateInput.Properties.RetentionInDays = pointer.To(state.RetentionInDays) } + } - if metadata.ResourceData.HasChange("total_retention_in_days") { - updateInput.Properties.TotalRetentionInDays = pointer.To(state.TotalRetentionInDays) - } + if metadata.ResourceData.HasChange("total_retention_in_days") { + updateInput.Properties.TotalRetentionInDays = pointer.To(state.TotalRetentionInDays) } if err := client.CreateOrUpdateThenPoll(ctx, *id, updateInput); err != nil { @@ -232,8 +237,8 @@ func (r LogAnalyticsWorkspaceTableResource) Read() sdk.ResourceFunc { if props := model.Properties; props != nil { if pointer.From(props.Plan) == tables.TablePlanEnumAnalytics { state.RetentionInDays = pointer.From(props.RetentionInDays) - state.TotalRetentionInDays = pointer.From(props.TotalRetentionInDays) } + state.TotalRetentionInDays = pointer.From(props.TotalRetentionInDays) state.Plan = string(pointer.From(props.Plan)) } } diff --git a/internal/services/loganalytics/log_analytics_workspace_table_resource_test.go b/internal/services/loganalytics/log_analytics_workspace_table_resource_test.go index 5db39e331c878..9e6adf3b2cf49 100644 --- a/internal/services/loganalytics/log_analytics_workspace_table_resource_test.go +++ b/internal/services/loganalytics/log_analytics_workspace_table_resource_test.go @@ -104,9 +104,10 @@ resource "azurerm_log_analytics_workspace" "test" { retention_in_days = 30 } resource "azurerm_log_analytics_workspace_table" "test" { - name = "AppTraces" - workspace_id = azurerm_log_analytics_workspace.test.id - plan = "Basic" + name = "AppTraces" + workspace_id = azurerm_log_analytics_workspace.test.id + plan = "Basic" + total_retention_in_days = 32 } `, data.RandomInteger, data.Locations.Primary, data.RandomInteger) } diff --git a/internal/services/logz/client/client.go b/internal/services/logz/client/client.go deleted file mode 100644 index 2915654addae2..0000000000000 --- a/internal/services/logz/client/client.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package client - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors" - "github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount" - "github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules" - "github.com/hashicorp/terraform-provider-azurerm/internal/common" -) - -type Client struct { - MonitorClient *monitors.MonitorsClient - TagRuleClient *tagrules.TagRulesClient - SubAccountClient *subaccount.SubAccountClient -} - -func NewClient(o *common.ClientOptions) (*Client, error) { - monitorClient, err := monitors.NewMonitorsClientWithBaseURI(o.Environment.ResourceManager) - o.Configure(monitorClient.Client, o.Authorizers.ResourceManager) - if err != nil { - return nil, fmt.Errorf("building TagRuleClient client: %+v", err) - } - - tagRuleClient, err := tagrules.NewTagRulesClientWithBaseURI(o.Environment.ResourceManager) - o.Configure(tagRuleClient.Client, o.Authorizers.ResourceManager) - if err != nil { - return nil, fmt.Errorf("building TagRuleClient client: %+v", err) - } - - subAccountClient, err := subaccount.NewSubAccountClientWithBaseURI(o.Environment.ResourceManager) - o.Configure(subAccountClient.Client, o.Authorizers.ResourceManager) - if err != nil { - return nil, fmt.Errorf("building SubAccountClient client: %+v", err) - } - - return &Client{ - MonitorClient: monitorClient, - TagRuleClient: tagRuleClient, - SubAccountClient: subAccountClient, - }, nil -} diff --git a/internal/services/logz/logz_common.go b/internal/services/logz/logz_common.go deleted file mode 100644 index 4cd709e398437..0000000000000 --- a/internal/services/logz/logz_common.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package logz - -import "fmt" - -const PlanId100gb14days = "100gb14days" -const PlanDetails100gb14days = "100gb14days@TIDgmz7xq9ge3py" - -func getPlanDetails(plan string) (string, error) { - if plan == PlanId100gb14days { - return PlanDetails100gb14days, nil - } - - return "", fmt.Errorf("cannot find plan details for id: %s", plan) -} - -func getPlanId(planDetails string) (string, error) { - if planDetails == PlanDetails100gb14days { - return PlanId100gb14days, nil - } - - return "", fmt.Errorf("cannot find plan id for details: %s", planDetails) -} diff --git a/internal/services/logz/logz_monitor_resource.go b/internal/services/logz/logz_monitor_resource.go deleted file mode 100644 index 4c3ad9df42a8a..0000000000000 --- a/internal/services/logz/logz_monitor_resource.go +++ /dev/null @@ -1,464 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package logz - -import ( - "fmt" - "log" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logz/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/suppress" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceLogzMonitor() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceLogzMonitorCreate, - Read: resourceLogzMonitorRead, - Update: resourceLogzMonitorUpdate, - Delete: resourceLogzMonitorDelete, - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := monitors.ParseMonitorID(id) - return err - }), - - DeprecationMessage: `Logz REST API is being deprecated and new resources cannot be created - as such the 'azurerm_logz_monitor' resource is deprecated and will be removed in v4.0 of the AzureRM Provider`, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.LogzMonitorName, - }, - - "resource_group_name": commonschema.ResourceGroupName(), - - "location": commonschema.Location(), - - "company_name": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "enterprise_app_id": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "single_sign_on_url": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "logz_organization_id": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "plan": { - Type: pluginsdk.TypeList, - Required: true, - ForceNew: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "billing_cycle": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - "MONTHLY", - "WEEKLY", - }, false), - }, - - "effective_date": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - DiffSuppressFunc: suppress.RFC3339Time, - ValidateFunc: validation.IsRFC3339Time, - }, - - "plan_id": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - PlanId100gb14days, - }, false), - Default: PlanId100gb14days, - }, - - "usage_type": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - "PAYG", - "COMMITTED", - }, false), - }, - }, - }, - }, - - "user": { - Type: pluginsdk.TypeList, - Required: true, - ForceNew: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "email": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "first_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(1, 50), - }, - - "last_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(1, 50), - }, - - "phone_number": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(1, 40), - }, - }, - }, - }, - - "enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: true, - }, - - "tags": commonschema.Tags(), - }, - } -} - -func resourceLogzMonitorCreate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Logz.MonitorClient - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := monitors.NewMonitorID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) - - existing, err := client.Get(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for existing %s: %+v", id, err) - } - } - - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_logz_monitor", id.ID()) - } - - monitoringStatus := monitors.MonitoringStatusDisabled - if d.Get("enabled").(bool) { - monitoringStatus = monitors.MonitoringStatusEnabled - } - - planData, err := expandMonitorPlanData(d.Get("plan").([]interface{})) - if err != nil { - return fmt.Errorf("expanding `plan` %s: %+v", id, err) - } - - payload := monitors.LogzMonitorResource{ - Location: location.Normalize(d.Get("location").(string)), - Properties: &monitors.MonitorProperties{ - LogzOrganizationProperties: expandMonitorOrganizationProperties(d), - PlanData: planData, - UserInfo: expandMonitorUserInfo(d.Get("user").([]interface{})), - MonitoringStatus: pointer.To(monitoringStatus), - }, - Tags: tags.Expand(d.Get("tags").(map[string]interface{})), - } - - if err := client.CreateThenPoll(ctx, id, payload); err != nil { - return fmt.Errorf("creating %s: %+v", id, err) - } - - d.SetId(id.ID()) - return resourceLogzMonitorRead(d, meta) -} - -func resourceLogzMonitorRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Logz.MonitorClient - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := monitors.ParseMonitorID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - log.Printf("[INFO] %s was not found - removing from state", *id) - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.MonitorName) - d.Set("resource_group_name", id.ResourceGroupName) - - if model := resp.Model; model != nil { - d.Set("location", location.Normalize(model.Location)) - - if props := model.Properties; props != nil { - if org := props.LogzOrganizationProperties; org != nil { - d.Set("company_name", org.CompanyName) - d.Set("enterprise_app_id", org.EnterpriseAppId) - d.Set("single_sign_on_url", org.SingleSignOnUrl) - d.Set("logz_organization_id", org.Id) - } - - d.Set("enabled", props.MonitoringStatus != nil && *props.MonitoringStatus == monitors.MonitoringStatusEnabled) - - planData, err := flattenMonitorPlanData(props.PlanData) - if err != nil { - return fmt.Errorf("flatten `plan`: %+v", err) - } - - if err := d.Set("plan", planData); err != nil { - return fmt.Errorf("setting `plan`: %+v", err) - } - - if err := d.Set("user", flattenMonitorUserInfo(props.UserInfo)); err != nil { - return fmt.Errorf("setting `user`: %+v", err) - } - } - - if err := tags.FlattenAndSet(d, model.Tags); err != nil { - return fmt.Errorf("setting `tags`: %+v", err) - } - } - - return nil -} - -func resourceLogzMonitorUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Logz.MonitorClient - ctx, cancel := timeouts.ForUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := monitors.ParseMonitorID(d.Id()) - if err != nil { - return err - } - - payload := monitors.LogzMonitorResourceUpdateParameters{ - Properties: &monitors.MonitorUpdateProperties{}, - } - - if d.HasChange("enabled") { - monitoringStatus := monitors.MonitoringStatusDisabled - if d.Get("enabled").(bool) { - monitoringStatus = monitors.MonitoringStatusEnabled - } - payload.Properties.MonitoringStatus = pointer.To(monitoringStatus) - } - - if d.HasChange("tags") { - payload.Tags = tags.Expand(d.Get("tags").(map[string]interface{})) - } - - if _, err := client.Update(ctx, *id, payload); err != nil { - return fmt.Errorf("updating %s: %+v", *id, err) - } - - return resourceLogzMonitorRead(d, meta) -} - -func resourceLogzMonitorDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Logz.MonitorClient - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := monitors.ParseMonitorID(d.Id()) - if err != nil { - return err - } - - if err := client.DeleteThenPoll(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", id, err) - } - - return nil -} - -func expandMonitorOrganizationProperties(d *pluginsdk.ResourceData) *monitors.LogzOrganizationProperties { - props := &monitors.LogzOrganizationProperties{} - companyName := d.Get("company_name").(string) - if companyName != "" { - props.CompanyName = utils.String(companyName) - } - - enterpriseAppID := d.Get("enterprise_app_id").(string) - if enterpriseAppID != "" { - props.EnterpriseAppId = utils.String(enterpriseAppID) - } - - return props -} - -func expandMonitorPlanData(input []interface{}) (*monitors.PlanData, error) { - if len(input) == 0 || input[0] == nil { - return nil, nil - } - - v := input[0].(map[string]interface{}) - effectiveDate, _ := time.Parse(time.RFC3339, v["effective_date"].(string)) - planDetails, err := getPlanDetails(v["plan_id"].(string)) - if err != nil { - return nil, err - } - - data := &monitors.PlanData{ - UsageType: utils.String(v["usage_type"].(string)), - BillingCycle: utils.String(v["billing_cycle"].(string)), - PlanDetails: &planDetails, - } - data.SetEffectiveDateAsTime(effectiveDate) - return data, nil -} - -func flattenMonitorPlanData(input *monitors.PlanData) ([]interface{}, error) { - if input == nil { - return make([]interface{}, 0), nil - } - - var billingCycle string - if input.BillingCycle != nil { - billingCycle = *input.BillingCycle - } - - var effectiveDate string - date, err := input.GetEffectiveDateAsTime() - if err != nil { - return nil, fmt.Errorf("parsing EffectiveDate: %+v", err) - } - if date != nil { - effectiveDate = date.Format(time.RFC3339) - } - - var planId string - if input.PlanDetails != nil { - var err error - planId, err = getPlanId(*input.PlanDetails) - if err != nil { - return nil, err - } - } - - var usageType string - if input.UsageType != nil { - usageType = *input.UsageType - } - - return []interface{}{ - map[string]interface{}{ - "billing_cycle": billingCycle, - "effective_date": effectiveDate, - "plan_id": planId, - "usage_type": usageType, - }, - }, nil -} - -func expandMonitorUserInfo(input []interface{}) *monitors.UserInfo { - if len(input) == 0 || input[0] == nil { - return nil - } - - v := input[0].(map[string]interface{}) - return &monitors.UserInfo{ - FirstName: utils.String(v["first_name"].(string)), - LastName: utils.String(v["last_name"].(string)), - EmailAddress: utils.String(v["email"].(string)), - PhoneNumber: utils.String(v["phone_number"].(string)), - } -} - -func flattenMonitorUserInfo(input *monitors.UserInfo) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - firstName := "" - if input.FirstName != nil { - firstName = *input.FirstName - } - - lastName := "" - if input.LastName != nil { - lastName = *input.LastName - } - - email := "" - if input.EmailAddress != nil { - email = *input.EmailAddress - } - - phoneNumber := "" - if input.PhoneNumber != nil { - phoneNumber = *input.PhoneNumber - } - - return []interface{}{ - map[string]interface{}{ - "first_name": firstName, - "last_name": lastName, - "email": email, - "phone_number": phoneNumber, - }, - } -} diff --git a/internal/services/logz/logz_monitor_resource_test.go b/internal/services/logz/logz_monitor_resource_test.go deleted file mode 100644 index cc439fd341163..0000000000000 --- a/internal/services/logz/logz_monitor_resource_test.go +++ /dev/null @@ -1,246 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package logz_test - -import ( - "context" - "fmt" - "testing" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -type LogzMonitorResource struct{} - -func TestAccLogzMonitor_basic(t *testing.T) { - t.Skipf("This resource is being deprecated by Azure and will be removed by end of 2025.") - - data := acceptance.BuildTestData(t, "azurerm_logz_monitor", "test") - r := LogzMonitorResource{} - effectiveDate := time.Now().Add(time.Hour * 7).Format(time.RFC3339) - email := "9d186100-1e0f-4b4a-bb10-753d2d52b750@example.com" - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data, effectiveDate, email), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccLogzMonitor_requiresImport(t *testing.T) { - t.Skipf("This resource is being deprecated by Azure and will be removed by end of 2025.") - - data := acceptance.BuildTestData(t, "azurerm_logz_monitor", "test") - r := LogzMonitorResource{} - effectiveDate := time.Now().Add(time.Hour * 7).Format(time.RFC3339) - email := "88841ffe-6376-487c-950c-1c3318f63dc5@example.com" - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data, effectiveDate, email), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - { - Config: r.requiresImport(data, effectiveDate, email), - ExpectError: acceptance.RequiresImportError(data.ResourceType), - }, - }) -} - -func TestAccLogzMonitor_complete(t *testing.T) { - t.Skipf("This resource is being deprecated by Azure and will be removed by end of 2025.") - - data := acceptance.BuildTestData(t, "azurerm_logz_monitor", "test") - r := LogzMonitorResource{} - effectiveDate := time.Now().Add(time.Hour * 7).Format(time.RFC3339) - email := "37d395aa-4b30-4566-b141-72ea4bf84e11@example.com" - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data, effectiveDate, email), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccLogzMonitor_update(t *testing.T) { - t.Skipf("This resource is being deprecated by Azure and will be removed by end of 2025.") - - data := acceptance.BuildTestData(t, "azurerm_logz_monitor", "test") - r := LogzMonitorResource{} - effectiveDate := time.Now().Add(time.Hour * 7).Format(time.RFC3339) - email := "d5d750ce-94fd-475d-816f-48110e1ca04a@example.com" - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data, effectiveDate, email), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.update(data, effectiveDate, email), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.basic(data, effectiveDate, email), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func (r LogzMonitorResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := monitors.ParseMonitorID(state.ID) - if err != nil { - return nil, err - } - resp, err := clients.Logz.MonitorClient.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return pointer.To(false), nil - } - return nil, fmt.Errorf("retrieving %s: %+v", id, err) - } - return pointer.To(resp.Model != nil), nil -} - -func (r LogzMonitorResource) template(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctest-logz-%d" - location = "%s" -} -`, data.RandomInteger, data.Locations.Primary) -} - -func (r LogzMonitorResource) basic(data acceptance.TestData, effectiveDate string, email string) string { - template := r.template(data) - return fmt.Sprintf(` -%s - -resource "azurerm_logz_monitor" "test" { - name = "acctest-lm-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - plan { - billing_cycle = "MONTHLY" - effective_date = "%s" - usage_type = "COMMITTED" - } - - user { - email = "%s" - first_name = "first" - last_name = "last" - phone_number = "123456" - } -} -`, template, data.RandomInteger, effectiveDate, email) -} - -func (r LogzMonitorResource) update(data acceptance.TestData, effectiveDate string, email string) string { - template := r.template(data) - return fmt.Sprintf(` -%s - -resource "azurerm_logz_monitor" "test" { - name = "acctest-lm-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - plan { - billing_cycle = "MONTHLY" - effective_date = "%s" - usage_type = "COMMITTED" - } - - user { - email = "%s" - first_name = "first" - last_name = "last" - phone_number = "123456" - } - enabled = false -} -`, template, data.RandomInteger, effectiveDate, email) -} - -func (r LogzMonitorResource) requiresImport(data acceptance.TestData, effectiveDate string, email string) string { - config := r.basic(data, effectiveDate, email) - return fmt.Sprintf(` -%s - -resource "azurerm_logz_monitor" "import" { - name = azurerm_logz_monitor.test.name - resource_group_name = azurerm_logz_monitor.test.resource_group_name - location = azurerm_logz_monitor.test.location - plan { - billing_cycle = "MONTHLY" - effective_date = "%s" - usage_type = "COMMITTED" - } - - user { - email = "%s" - first_name = "first" - last_name = "last" - phone_number = "123456" - } -} -`, config, effectiveDate, email) -} - -func (r LogzMonitorResource) complete(data acceptance.TestData, effectiveDate string, email string) string { - template := r.template(data) - return fmt.Sprintf(` -%s - -resource "azurerm_logz_monitor" "test" { - name = "acctest-lm-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - - company_name = "company-name-1" - enterprise_app_id = "e081a27c-bc01-4159-bc06-7f9f711e3b3a" - plan { - billing_cycle = "MONTHLY" - effective_date = "%s" - usage_type = "COMMITTED" - } - - user { - email = "%s" - first_name = "first" - last_name = "last" - phone_number = "123456" - } - enabled = true - tags = { - ENV = "Test" - } -} -`, template, data.RandomInteger, effectiveDate, email) -} diff --git a/internal/services/logz/logz_sub_account_resource.go b/internal/services/logz/logz_sub_account_resource.go deleted file mode 100644 index 999bbfd2c7457..0000000000000 --- a/internal/services/logz/logz_sub_account_resource.go +++ /dev/null @@ -1,354 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package logz - -import ( - "context" - "fmt" - "log" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors" - "github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logz/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceLogzSubAccount() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceLogzSubAccountCreate, - Read: resourceLogzSubAccountRead, - Update: resourceLogzSubAccountUpdate, - Delete: resourceLogzSubAccountDelete, - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := subaccount.ParseAccountID(id) - return err - }), - - DeprecationMessage: `Logz REST API is being deprecated and new resources cannot be created - as such the 'azurerm_logz_sub_account' resource is deprecated and will be removed in v4.0 of the AzureRM Provider`, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.LogzMonitorName, - }, - - "logz_monitor_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: monitors.ValidateMonitorID, - }, - - "user": { - Type: pluginsdk.TypeList, - Required: true, - ForceNew: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "email": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "first_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(1, 50), - }, - - "last_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(1, 50), - }, - - "phone_number": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(1, 40), - }, - }, - }, - }, - - "enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: true, - }, - - "tags": commonschema.Tags(), - }, - } -} -func resourceLogzSubAccountCreate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Logz.SubAccountClient - monitorClient := meta.(*clients.Client).Logz.MonitorClient - ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d) - defer cancel() - - monitorId, err := monitors.ParseMonitorID(d.Get("logz_monitor_id").(string)) - if err != nil { - return err - } - - id := subaccount.NewAccountID(monitorId.SubscriptionId, monitorId.ResourceGroupName, monitorId.MonitorName, d.Get("name").(string)) - existing, err := client.Get(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for existing %s: %+v", id, err) - } - } - - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_logz_sub_account", id.ID()) - } - - monitoringStatus := subaccount.MonitoringStatusDisabled - if d.Get("enabled").(bool) { - monitoringStatus = subaccount.MonitoringStatusEnabled - } - - parentMonitor, err := monitorClient.Get(ctx, *monitorId) - if err != nil { - return fmt.Errorf("retrieving parent %s: %+v", *monitorId, err) - } - if parentMonitor.Model == nil { - return fmt.Errorf("retrieving parent %s: model was nil", *monitorId) - } - - payload := subaccount.LogzMonitorResource{ - Location: location.Normalize(parentMonitor.Model.Location), - Properties: &subaccount.MonitorProperties{ - UserInfo: expandSubAccountUserInfo(d.Get("user").([]interface{})), - MonitoringStatus: pointer.To(monitoringStatus), - }, - Tags: tags.Expand(d.Get("tags").(map[string]interface{})), - } - - if props := parentMonitor.Model.Properties; props != nil { - payload.Properties.PlanData = mapMonitorPlanDataToSubAccountPlanData(props.PlanData) - } - - if err := client.CreateThenPoll(ctx, id, payload); err != nil { - return fmt.Errorf("creating %s: %+v", id, err) - } - - d.SetId(id.ID()) - return resourceLogzSubAccountRead(d, meta) -} - -func resourceLogzSubAccountRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Logz.SubAccountClient - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := subaccount.ParseAccountID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - log.Printf("[INFO] %s was not found - removing from state", *id) - d.SetId("") - return nil - } - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.AccountName) - d.Set("logz_monitor_id", monitors.NewMonitorID(id.SubscriptionId, id.ResourceGroupName, id.MonitorName).ID()) - - if model := resp.Model; model != nil { - if props := model.Properties; props != nil { - d.Set("enabled", props.MonitoringStatus != nil && *props.MonitoringStatus == subaccount.MonitoringStatusEnabled) - - if err := d.Set("user", flattenSubAccountUserInfo(props.UserInfo)); err != nil { - return fmt.Errorf("setting `user_info`: %+v", err) - } - } - - if err := tags.FlattenAndSet(d, model.Tags); err != nil { - return fmt.Errorf("setting `tags`: %+v", err) - } - } - - return nil -} - -func resourceLogzSubAccountUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Logz.SubAccountClient - ctx, cancel := timeouts.ForUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := subaccount.ParseAccountID(d.Id()) - if err != nil { - return err - } - - payload := subaccount.LogzMonitorResourceUpdateParameters{} - - if d.HasChange("enabled") { - monitoringStatus := subaccount.MonitoringStatusDisabled - if d.Get("enabled").(bool) { - monitoringStatus = subaccount.MonitoringStatusEnabled - } - payload.Properties = &subaccount.MonitorUpdateProperties{ - MonitoringStatus: pointer.To(monitoringStatus), - } - } - - if d.HasChange("tags") { - payload.Tags = tags.Expand(d.Get("tags").(map[string]interface{})) - } - - if _, err := client.Update(ctx, *id, payload); err != nil { - return fmt.Errorf("updating %s: %+v", id, err) - } - - return resourceLogzSubAccountRead(d, meta) -} - -func resourceLogzSubAccountDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Logz.SubAccountClient - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := subaccount.ParseAccountID(d.Id()) - if err != nil { - return err - } - - if err := client.DeleteThenPoll(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", id, err) - } - - // API has bug, which appears to be eventually consistent. Tracked by this issue: https://github.com/Azure/azure-rest-api-specs/issues/18572 - log.Printf("[DEBUG] Waiting for %s to be fully deleted..", *id) - deadline, ok := ctx.Deadline() - if !ok { - return fmt.Errorf("internal-error: context had no deadline") - } - - stateConf := &pluginsdk.StateChangeConf{ - Pending: []string{"Exists"}, - Target: []string{"NotFound"}, - Refresh: subAccountDeletedRefreshFunc(ctx, client, *id), - MinTimeout: 10 * time.Second, - ContinuousTargetOccurence: 20, - Timeout: time.Until(deadline), - } - - if _, err = stateConf.WaitForStateContext(ctx); err != nil { - return fmt.Errorf("waiting for %s to be fully deleted: %+v", *id, err) - } - - return nil -} - -func subAccountDeletedRefreshFunc(ctx context.Context, client *subaccount.SubAccountClient, id subaccount.AccountId) pluginsdk.StateRefreshFunc { - return func() (interface{}, string, error) { - res, err := client.Get(ctx, id) - if err != nil { - if response.WasNotFound(res.HttpResponse) { - return "NotFound", "NotFound", nil - } - - return nil, "", fmt.Errorf("checking if %s has been deleted: %+v", id, err) - } - - return res, "Exists", nil - } -} - -func expandSubAccountUserInfo(input []interface{}) *subaccount.UserInfo { - if len(input) == 0 || input[0] == nil { - return nil - } - - v := input[0].(map[string]interface{}) - return &subaccount.UserInfo{ - FirstName: utils.String(v["first_name"].(string)), - LastName: utils.String(v["last_name"].(string)), - EmailAddress: utils.String(v["email"].(string)), - PhoneNumber: utils.String(v["phone_number"].(string)), - } -} - -func flattenSubAccountUserInfo(input *subaccount.UserInfo) []interface{} { - if input == nil { - return []interface{}{} - } - - firstName := "" - if input.FirstName != nil { - firstName = *input.FirstName - } - - lastName := "" - if input.LastName != nil { - lastName = *input.LastName - } - - email := "" - if input.EmailAddress != nil { - email = *input.EmailAddress - } - - phoneNumber := "" - if input.PhoneNumber != nil { - phoneNumber = *input.PhoneNumber - } - - return []interface{}{ - map[string]interface{}{ - "first_name": firstName, - "last_name": lastName, - "email": email, - "phone_number": phoneNumber, - }, - } -} - -func mapMonitorPlanDataToSubAccountPlanData(input *monitors.PlanData) *subaccount.PlanData { - if input == nil { - return nil - } - - return &subaccount.PlanData{ - BillingCycle: input.BillingCycle, - EffectiveDate: input.EffectiveDate, - PlanDetails: input.PlanDetails, - UsageType: input.UsageType, - } -} diff --git a/internal/services/logz/logz_sub_account_resource_test.go b/internal/services/logz/logz_sub_account_resource_test.go deleted file mode 100644 index 98794efa40e6e..0000000000000 --- a/internal/services/logz/logz_sub_account_resource_test.go +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package logz_test - -import ( - "context" - "fmt" - "testing" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type LogzSubAccountResource struct{} - -func TestAccLogzSubAccount_basic(t *testing.T) { - t.Skipf("This resource is being deprecated by Azure and will be removed by end of 2025.") - - data := acceptance.BuildTestData(t, "azurerm_logz_sub_account", "test") - r := LogzSubAccountResource{} - effectiveDate := time.Now().Add(time.Hour * 7).Format(time.RFC3339) - email := "0bc0fe71-6e2f-4552-bc48-6ca0c22f4db0@example.com" - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data, effectiveDate, email), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccLogzSubAccount_requiresImport(t *testing.T) { - t.Skipf("This resource is being deprecated by Azure and will be removed by end of 2025.") - - data := acceptance.BuildTestData(t, "azurerm_logz_sub_account", "test") - r := LogzSubAccountResource{} - effectiveDate := time.Now().Add(time.Hour * 7).Format(time.RFC3339) - email := "429420d4-0abf-4cd8-b149-fe63fa141fc6@example.com" - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data, effectiveDate, email), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - { - Config: r.requiresImport(data, effectiveDate, email), - ExpectError: acceptance.RequiresImportError(data.ResourceType), - }, - }) -} - -func TestAccLogzSubAccount_complete(t *testing.T) { - t.Skipf("This resource is being deprecated by Azure and will be removed by end of 2025.") - - data := acceptance.BuildTestData(t, "azurerm_logz_sub_account", "test") - r := LogzSubAccountResource{} - effectiveDate := time.Now().Add(time.Hour * 7).Format(time.RFC3339) - email := "253e466c-3a78-4a79-9260-98854eef2b5c@example.com" - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data, effectiveDate, email), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccLogzSubAccount_update(t *testing.T) { - t.Skipf("This resource is being deprecated by Azure and will be removed by end of 2025.") - - data := acceptance.BuildTestData(t, "azurerm_logz_sub_account", "test") - r := LogzSubAccountResource{} - effectiveDate := time.Now().Add(time.Hour * 7).Format(time.RFC3339) - email := "5c3b9a35-06c5-4c75-928e-6505a10541a5@example.com" - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data, effectiveDate, email), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.update(data, effectiveDate, email), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.basic(data, effectiveDate, email), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func (r LogzSubAccountResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := subaccount.ParseAccountID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.Logz.SubAccountClient.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return utils.Bool(false), nil - } - return nil, fmt.Errorf("retrieving %s: %+v", id, err) - } - - return pointer.To(resp.Model != nil), nil -} - -func (r LogzSubAccountResource) template(data acceptance.TestData, effectiveDate string, email string) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctest-logz-%d" - location = "%s" -} - -resource "azurerm_logz_monitor" "test" { - name = "acctest-lm-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - plan { - billing_cycle = "MONTHLY" - effective_date = "%s" - usage_type = "COMMITTED" - } - - user { - email = "%s" - first_name = "first" - last_name = "last" - phone_number = "123456" - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, effectiveDate, email) -} - -func (r LogzSubAccountResource) basic(data acceptance.TestData, effectiveDate string, email string) string { - template := r.template(data, effectiveDate, email) - return fmt.Sprintf(` -%s - -resource "azurerm_logz_sub_account" "test" { - name = "acctest-lsa-%d" - logz_monitor_id = azurerm_logz_monitor.test.id - user { - email = azurerm_logz_monitor.test.user[0].email - first_name = azurerm_logz_monitor.test.user[0].first_name - last_name = azurerm_logz_monitor.test.user[0].last_name - phone_number = azurerm_logz_monitor.test.user[0].phone_number - } -} -`, template, data.RandomInteger) -} - -func (r LogzSubAccountResource) update(data acceptance.TestData, effectiveDate string, email string) string { - template := r.template(data, effectiveDate, email) - return fmt.Sprintf(` -%s - -resource "azurerm_logz_sub_account" "test" { - name = "acctest-lsa-%d" - logz_monitor_id = azurerm_logz_monitor.test.id - user { - email = azurerm_logz_monitor.test.user[0].email - first_name = azurerm_logz_monitor.test.user[0].first_name - last_name = azurerm_logz_monitor.test.user[0].last_name - phone_number = azurerm_logz_monitor.test.user[0].phone_number - } - enabled = false -} -`, template, data.RandomInteger) -} - -func (r LogzSubAccountResource) requiresImport(data acceptance.TestData, effectiveDate string, email string) string { - config := r.basic(data, effectiveDate, email) - return fmt.Sprintf(` -%s - -resource "azurerm_logz_sub_account" "import" { - name = azurerm_logz_sub_account.test.name - logz_monitor_id = azurerm_logz_sub_account.test.logz_monitor_id - user { - email = azurerm_logz_monitor.test.user[0].email - first_name = azurerm_logz_monitor.test.user[0].first_name - last_name = azurerm_logz_monitor.test.user[0].last_name - phone_number = azurerm_logz_monitor.test.user[0].phone_number - } -} -`, config) -} - -func (r LogzSubAccountResource) complete(data acceptance.TestData, effectiveDate string, email string) string { - template := r.template(data, effectiveDate, email) - return fmt.Sprintf(` -%s - -resource "azurerm_logz_sub_account" "test" { - name = "acctest-lsa-%d" - logz_monitor_id = azurerm_logz_monitor.test.id - user { - email = azurerm_logz_monitor.test.user[0].email - first_name = azurerm_logz_monitor.test.user[0].first_name - last_name = azurerm_logz_monitor.test.user[0].last_name - phone_number = azurerm_logz_monitor.test.user[0].phone_number - } - - tags = { - ENV = "Test" - } -} -`, template, data.RandomInteger) -} diff --git a/internal/services/logz/logz_sub_account_tag_rule_resource.go b/internal/services/logz/logz_sub_account_tag_rule_resource.go deleted file mode 100644 index e1d297bf52786..0000000000000 --- a/internal/services/logz/logz_sub_account_tag_rule_resource.go +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package logz - -import ( - "fmt" - "log" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount" - "github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" -) - -func resourceLogzSubAccountTagRule() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceLogzSubAccountTagRuleCreateUpdate, - Read: resourceLogzSubAccountTagRuleRead, - Update: resourceLogzSubAccountTagRuleCreateUpdate, - Delete: resourceLogzSubAccountTagRuleDelete, - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := tagrules.ParseAccountTagRuleID(id) - return err - }), - - DeprecationMessage: `Logz REST API is being deprecated and new resources cannot be created - as such the 'azurerm_logz_sub_account_tag_rule' resource is deprecated and will be removed in v4.0 of the AzureRM Provider`, - - Schema: map[string]*pluginsdk.Schema{ - "logz_sub_account_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: subaccount.ValidateAccountID, - }, - - "tag_filter": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 10, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "action": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - string(tagrules.TagActionInclude), - string(tagrules.TagActionExclude), - }, false), - }, - - "value": { - Type: pluginsdk.TypeString, - Optional: true, - }, - }, - }, - }, - - "send_aad_logs": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: false, - }, - - "send_activity_logs": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: false, - }, - - "send_subscription_logs": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: false, - }, - }, - } -} -func resourceLogzSubAccountTagRuleCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Logz.TagRuleClient - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - subAccountId, err := subaccount.ParseAccountID(d.Get("logz_sub_account_id").(string)) - if err != nil { - return err - } - - id := tagrules.NewAccountTagRuleID(subAccountId.SubscriptionId, subAccountId.ResourceGroupName, subAccountId.MonitorName, subAccountId.AccountName, "default") - if d.IsNewResource() { - existing, err := client.SubAccountTagRulesGet(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for existing %s: %+v", id, err) - } - } - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_logz_sub_account_tag_rule", id.ID()) - } - } - - payload := tagrules.MonitoringTagRules{ - Properties: &tagrules.MonitoringTagRulesProperties{ - LogRules: expandTagRuleLogRules(d), - }, - } - - if _, err := client.SubAccountTagRulesCreateOrUpdate(ctx, id, payload); err != nil { - return fmt.Errorf("creating/updating %s: %+v", id, err) - } - - d.SetId(id.ID()) - return resourceLogzSubAccountTagRuleRead(d, meta) -} - -func resourceLogzSubAccountTagRuleRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Logz.TagRuleClient - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := tagrules.ParseAccountTagRuleID(d.Id()) - if err != nil { - return err - } - - resp, err := client.SubAccountTagRulesGet(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - log.Printf("[INFO] %s was not found - removing from state", *id) - d.SetId("") - return nil - } - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("logz_sub_account_id", subaccount.NewAccountID(id.SubscriptionId, id.ResourceGroupName, id.MonitorName, id.AccountName).ID()) - - if model := resp.Model; model != nil { - if props := model.Properties; props != nil && props.LogRules != nil { - d.Set("send_aad_logs", props.LogRules.SendAadLogs) - d.Set("send_activity_logs", props.LogRules.SendActivityLogs) - d.Set("send_subscription_logs", props.LogRules.SendSubscriptionLogs) - - if err := d.Set("tag_filter", flattenTagRuleFilteringTagArray(props.LogRules.FilteringTags)); err != nil { - return fmt.Errorf("setting `tag_filter`: %+v", err) - } - } - } - - return nil -} - -func resourceLogzSubAccountTagRuleDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Logz.TagRuleClient - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := tagrules.ParseAccountTagRuleID(d.Id()) - if err != nil { - return err - } - - if _, err := client.SubAccountTagRulesDelete(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - - return nil -} diff --git a/internal/services/logz/logz_sub_account_tag_rule_resource_test.go b/internal/services/logz/logz_sub_account_tag_rule_resource_test.go deleted file mode 100644 index 5fb554acf2dcf..0000000000000 --- a/internal/services/logz/logz_sub_account_tag_rule_resource_test.go +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package logz_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type LogzSubAccountTagRuleResource struct{} - -func TestAccLogzSubAccountTagRule_basic(t *testing.T) { - t.Skipf("This resource is being deprecated by Azure and will be removed by end of 2025.") - - data := acceptance.BuildTestData(t, "azurerm_logz_sub_account_tag_rule", "test") - r := LogzSubAccountTagRuleResource{} - email := "72776074-85d8-47fc-a1c2-cd23693522da@example.com" - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data, email), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccLogzSubAccountTagRule_requiresImport(t *testing.T) { - t.Skipf("This resource is being deprecated by Azure and will be removed by end of 2025.") - - data := acceptance.BuildTestData(t, "azurerm_logz_sub_account_tag_rule", "test") - r := LogzSubAccountTagRuleResource{} - email := "59cb83fc-bb49-414b-8762-e5cd463f1463@example.com" - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data, email), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - { - Config: r.requiresImport(data, email), - ExpectError: acceptance.RequiresImportError(data.ResourceType), - }, - }) -} - -func TestAccLogzSubAccountTagRule_complete(t *testing.T) { - t.Skipf("This resource is being deprecated by Azure and will be removed by end of 2025.") - - data := acceptance.BuildTestData(t, "azurerm_logz_sub_account_tag_rule", "test") - r := LogzSubAccountTagRuleResource{} - email := "77e97659-200c-41f1-824d-f596c9566aee@example.com" - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data, email), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccLogzSubAccountTagRule_update(t *testing.T) { - t.Skipf("This resource is being deprecated by Azure and will be removed by end of 2025.") - - data := acceptance.BuildTestData(t, "azurerm_logz_sub_account_tag_rule", "test") - r := LogzSubAccountTagRuleResource{} - email := "a9c283cf-9045-40f0-aecf-d8738e5ed103@example.com" - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data, email), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.complete(data, email), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.basic(data, email), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func (r LogzSubAccountTagRuleResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := tagrules.ParseAccountTagRuleID(state.ID) - if err != nil { - return nil, err - } - resp, err := clients.Logz.TagRuleClient.SubAccountTagRulesGet(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return utils.Bool(false), nil - } - return nil, fmt.Errorf("retrieving %s: %+v", id, err) - } - return pointer.To(resp.Model != nil), nil -} - -func (r LogzSubAccountTagRuleResource) template(data acceptance.TestData, email string) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctest-logz-%d" - location = "%s" -} - -resource "azurerm_logz_monitor" "test" { - name = "acctest-lm-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - plan { - billing_cycle = "MONTHLY" - effective_date = "%s" - usage_type = "COMMITTED" - } - - user { - email = "%s" - first_name = "first" - last_name = "last" - phone_number = "123456" - } -} - -resource "azurerm_logz_sub_account" "test" { - name = "acctest-lsa-%d" - logz_monitor_id = azurerm_logz_monitor.test.id - user { - email = azurerm_logz_monitor.test.user[0].email - first_name = azurerm_logz_monitor.test.user[0].first_name - last_name = azurerm_logz_monitor.test.user[0].last_name - phone_number = azurerm_logz_monitor.test.user[0].phone_number - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, getEffectiveDate(), email, data.RandomInteger) -} - -func (r LogzSubAccountTagRuleResource) basic(data acceptance.TestData, email string) string { - template := r.template(data, email) - return fmt.Sprintf(` -%s - -resource "azurerm_logz_sub_account_tag_rule" "test" { - logz_sub_account_id = azurerm_logz_sub_account.test.id -} -`, template) -} - -func (r LogzSubAccountTagRuleResource) requiresImport(data acceptance.TestData, email string) string { - config := r.basic(data, email) - return fmt.Sprintf(` -%s - -resource "azurerm_logz_sub_account_tag_rule" "import" { - logz_sub_account_id = azurerm_logz_sub_account_tag_rule.test.logz_sub_account_id -} -`, config) -} - -func (r LogzSubAccountTagRuleResource) complete(data acceptance.TestData, email string) string { - template := r.template(data, email) - return fmt.Sprintf(` -%s - -resource "azurerm_logz_sub_account_tag_rule" "test" { - logz_sub_account_id = azurerm_logz_sub_account.test.id - tag_filter { - name = "ccc" - action = "Include" - value = "ccc" - } - - tag_filter { - name = "bbb" - action = "Exclude" - value = "" - } - - tag_filter { - name = "ccc" - action = "Include" - value = "ccc" - } - send_aad_logs = true - send_activity_logs = true - send_subscription_logs = true -} -`, template) -} diff --git a/internal/services/logz/logz_tag_rule_resource.go b/internal/services/logz/logz_tag_rule_resource.go deleted file mode 100644 index 171680b10c467..0000000000000 --- a/internal/services/logz/logz_tag_rule_resource.go +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package logz - -import ( - "fmt" - "log" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors" - "github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceLogzTagRule() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceLogzTagRuleCreateUpdate, - Read: resourceLogzTagRuleRead, - Update: resourceLogzTagRuleCreateUpdate, - Delete: resourceLogzTagRuleDelete, - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := tagrules.ParseTagRuleID(id) - return err - }), - - DeprecationMessage: `Logz REST API is being deprecated and new resources cannot be created - as such the 'azurerm_logz_tag_rule' resource is deprecated and will be removed in v4.0 of the AzureRM Provider`, - - Schema: map[string]*pluginsdk.Schema{ - "logz_monitor_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: monitors.ValidateMonitorID, - }, - - "tag_filter": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 10, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "action": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - string(tagrules.TagActionInclude), - string(tagrules.TagActionExclude), - }, false), - }, - - "value": { - Type: pluginsdk.TypeString, - Optional: true, - }, - }, - }, - }, - - "send_aad_logs": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: false, - }, - - "send_activity_logs": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: false, - }, - - "send_subscription_logs": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: false, - }, - }, - } -} - -func resourceLogzTagRuleCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Logz.TagRuleClient - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - monitorId, err := monitors.ParseMonitorID(d.Get("logz_monitor_id").(string)) - if err != nil { - return err - } - - id := tagrules.NewTagRuleID(monitorId.SubscriptionId, monitorId.ResourceGroupName, monitorId.MonitorName, "default") - if d.IsNewResource() { - existing, err := client.Get(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for existing %s: %+v", id, err) - } - } - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_logz_tag_rule", id.ID()) - } - } - - payload := tagrules.MonitoringTagRules{ - Properties: &tagrules.MonitoringTagRulesProperties{ - LogRules: expandTagRuleLogRules(d), - }, - } - - if _, err := client.CreateOrUpdate(ctx, id, payload); err != nil { - return fmt.Errorf("creating/updating %s: %+v", id, err) - } - - d.SetId(id.ID()) - return resourceLogzTagRuleRead(d, meta) -} - -func resourceLogzTagRuleRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Logz.TagRuleClient - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := tagrules.ParseTagRuleID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - log.Printf("[INFO] %s was not found - removing from state", *id) - d.SetId("") - return nil - } - return fmt.Errorf("retrieving %s: %+v", id, err) - } - - d.Set("logz_monitor_id", monitors.NewMonitorID(id.SubscriptionId, id.ResourceGroupName, id.MonitorName).ID()) - - if model := resp.Model; model != nil { - if props := model.Properties; props != nil { - if logRules := props.LogRules; logRules != nil { - d.Set("send_aad_logs", logRules.SendAadLogs) - d.Set("send_activity_logs", logRules.SendActivityLogs) - d.Set("send_subscription_logs", logRules.SendSubscriptionLogs) - if err := d.Set("tag_filter", flattenTagRuleFilteringTagArray(logRules.FilteringTags)); err != nil { - return fmt.Errorf("setting `tag_filter`: %+v", err) - } - } - } - } - - return nil -} - -func resourceLogzTagRuleDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Logz.TagRuleClient - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := tagrules.ParseTagRuleID(d.Id()) - if err != nil { - return err - } - - if _, err := client.Delete(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", id, err) - } - - return nil -} - -func expandTagRuleLogRules(d *pluginsdk.ResourceData) *tagrules.LogRules { - return &tagrules.LogRules{ - SendAadLogs: pointer.To(d.Get("send_aad_logs").(bool)), - SendSubscriptionLogs: pointer.To(d.Get("send_subscription_logs").(bool)), - SendActivityLogs: pointer.To(d.Get("send_activity_logs").(bool)), - FilteringTags: expandTagRuleFilteringTagArray(d.Get("tag_filter").([]interface{})), - } -} - -func expandTagRuleFilteringTagArray(input []interface{}) *[]tagrules.FilteringTag { - results := make([]tagrules.FilteringTag, 0) - for _, item := range input { - v := item.(map[string]interface{}) - results = append(results, tagrules.FilteringTag{ - Name: utils.String(v["name"].(string)), - Value: utils.String(v["value"].(string)), - Action: pointer.To(tagrules.TagAction(v["action"].(string))), - }) - } - - return &results -} - -func flattenTagRuleFilteringTagArray(input *[]tagrules.FilteringTag) []interface{} { - results := make([]interface{}, 0) - if input == nil { - return results - } - - for _, item := range *input { - var name string - if item.Name != nil { - name = *item.Name - } - action := "" - if item.Action != nil { - action = string(*item.Action) - } - var value string - if item.Value != nil { - value = *item.Value - } - results = append(results, map[string]interface{}{ - "name": name, - "action": action, - "value": value, - }) - } - - return results -} diff --git a/internal/services/logz/logz_tag_rule_resource_test.go b/internal/services/logz/logz_tag_rule_resource_test.go deleted file mode 100644 index 8c97d4199eaf1..0000000000000 --- a/internal/services/logz/logz_tag_rule_resource_test.go +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package logz_test - -import ( - "context" - "fmt" - "testing" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type LogzTagRuleResource struct{} - -func TestAccLogzTagRule_basic(t *testing.T) { - t.Skipf("This resource is being deprecated by Azure and will be removed by end of 2025.") - - data := acceptance.BuildTestData(t, "azurerm_logz_tag_rule", "test") - r := LogzTagRuleResource{} - email := "71212724-7a73-48c3-9399-de59313d4905@example.com" - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data, email), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccLogzTagRule_requiresImport(t *testing.T) { - t.Skipf("This resource is being deprecated by Azure and will be removed by end of 2025.") - - data := acceptance.BuildTestData(t, "azurerm_logz_tag_rule", "test") - r := LogzTagRuleResource{} - email := "b993f18e-9094-4a38-9e80-a0530ebbc6e2@example.com" - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data, email), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - { - Config: r.requiresImport(data, email), - ExpectError: acceptance.RequiresImportError(data.ResourceType), - }, - }) -} - -func TestAccLogzTagRule_complete(t *testing.T) { - t.Skipf("This resource is being deprecated by Azure and will be removed by end of 2025.") - - data := acceptance.BuildTestData(t, "azurerm_logz_tag_rule", "test") - r := LogzTagRuleResource{} - email := "9121e724-355c-4b74-9d73-ff118ce7241e@example.com" - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data, email), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccLogzTagRule_update(t *testing.T) { - t.Skipf("This resource is being deprecated by Azure and will be removed by end of 2025.") - - data := acceptance.BuildTestData(t, "azurerm_logz_tag_rule", "test") - r := LogzTagRuleResource{} - email := "41a35aed-12d8-46f3-a2a7-9f89404d7989@example.com" - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data, email), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.complete(data, email), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.basic(data, email), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func (r LogzTagRuleResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := tagrules.ParseTagRuleID(state.ID) - if err != nil { - return nil, err - } - resp, err := clients.Logz.TagRuleClient.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return utils.Bool(false), nil - } - return nil, fmt.Errorf("retrieving %s: %+v", id, err) - } - return utils.Bool(resp.Model != nil), nil -} - -func (r LogzTagRuleResource) template(data acceptance.TestData, email string) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctest-logz-%d" - location = "%s" -} - -resource "azurerm_logz_monitor" "test" { - name = "acctest-lm-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - plan { - billing_cycle = "MONTHLY" - effective_date = "%s" - usage_type = "COMMITTED" - } - - user { - email = "%s" - first_name = "first" - last_name = "last" - phone_number = "123456" - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, getEffectiveDate(), email) -} - -func (r LogzTagRuleResource) basic(data acceptance.TestData, email string) string { - template := r.template(data, email) - return fmt.Sprintf(` -%s - -resource "azurerm_logz_tag_rule" "test" { - logz_monitor_id = azurerm_logz_monitor.test.id -} -`, template) -} - -func (r LogzTagRuleResource) requiresImport(data acceptance.TestData, email string) string { - config := r.basic(data, email) - return fmt.Sprintf(` -%s - -resource "azurerm_logz_tag_rule" "import" { - logz_monitor_id = azurerm_logz_tag_rule.test.logz_monitor_id -} -`, config) -} - -func (r LogzTagRuleResource) complete(data acceptance.TestData, email string) string { - template := r.template(data, email) - return fmt.Sprintf(` -%s - -resource "azurerm_logz_tag_rule" "test" { - logz_monitor_id = azurerm_logz_monitor.test.id - tag_filter { - name = "ccc" - action = "Include" - value = "ccc" - } - - tag_filter { - name = "bbb" - action = "Exclude" - value = "" - } - - tag_filter { - name = "ccc" - action = "Include" - value = "ccc" - } - send_aad_logs = true - send_activity_logs = true - send_subscription_logs = true -} -`, template) -} - -func getEffectiveDate() string { - effectiveDate := time.Now().Add(time.Hour * 72) - year, month, day := effectiveDate.Date() - return time.Date(year, month, day, 0, 0, 0, 0, effectiveDate.Location()).Format(time.RFC3339) -} diff --git a/internal/services/logz/registration.go b/internal/services/logz/registration.go deleted file mode 100644 index 1a5dab84b781b..0000000000000 --- a/internal/services/logz/registration.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package logz - -import ( - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -type Registration struct{} - -var _ sdk.UntypedServiceRegistrationWithAGitHubLabel = Registration{} - -func (r Registration) AssociatedGitHubLabel() string { - return "service/logz" -} - -// Name is the name of this Service -func (r Registration) Name() string { - return "Logz" -} - -// WebsiteCategories returns a list of categories which can be used for the sidebar -func (r Registration) WebsiteCategories() []string { - return []string{ - "Logz", - } -} - -// SupportedDataSources returns the supported Data Sources supported by this Service -func (r Registration) SupportedDataSources() map[string]*pluginsdk.Resource { - return map[string]*pluginsdk.Resource{} -} - -// SupportedResources returns the supported Resources supported by this Service -func (r Registration) SupportedResources() map[string]*pluginsdk.Resource { - if !features.FourPointOhBeta() { - return map[string]*pluginsdk.Resource{ - "azurerm_logz_monitor": resourceLogzMonitor(), - "azurerm_logz_tag_rule": resourceLogzTagRule(), - "azurerm_logz_sub_account": resourceLogzSubAccount(), - "azurerm_logz_sub_account_tag_rule": resourceLogzSubAccountTagRule(), - } - } - - return map[string]*pluginsdk.Resource{} -} diff --git a/internal/services/logz/validate/logz_monitor_name.go b/internal/services/logz/validate/logz_monitor_name.go deleted file mode 100644 index 1e4130a508c86..0000000000000 --- a/internal/services/logz/validate/logz_monitor_name.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "regexp" - - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" -) - -func LogzMonitorName(v interface{}, k string) (warnings []string, errors []error) { - return validation.StringMatch( - regexp.MustCompile(`^[\w\-]{1,32}$`), - `name must be between 1 and 32 characters in length and may contain only letters, numbers, hyphens and underscores`, - )(v, k) -} diff --git a/internal/services/machinelearning/machine_learning_inference_cluster_resource.go b/internal/services/machinelearning/machine_learning_inference_cluster_resource.go index 7765586bee203..50f308b934045 100644 --- a/internal/services/machinelearning/machine_learning_inference_cluster_resource.go +++ b/internal/services/machinelearning/machine_learning_inference_cluster_resource.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters" "github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes" "github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/workspaces" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" diff --git a/internal/services/machinelearning/machine_learning_workspace_resource.go b/internal/services/machinelearning/machine_learning_workspace_resource.go index fda67f9ed1604..60343e5e16ca0 100644 --- a/internal/services/machinelearning/machine_learning_workspace_resource.go +++ b/internal/services/machinelearning/machine_learning_workspace_resource.go @@ -16,7 +16,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" components "github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-02-02/componentsapis" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries" "github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/workspaces" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/managedhsm/key_vault_managed_hardware_security_module_key_resource_test.go b/internal/services/managedhsm/key_vault_managed_hardware_security_module_key_resource_test.go index c51ea84afdc26..6a86e2cabcd71 100644 --- a/internal/services/managedhsm/key_vault_managed_hardware_security_module_key_resource_test.go +++ b/internal/services/managedhsm/key_vault_managed_hardware_security_module_key_resource_test.go @@ -329,7 +329,7 @@ resource "azurerm_key_vault_managed_hardware_security_module" "test" { } resource "azurerm_key_vault_managed_hardware_security_module_role_assignment" "test" { - vault_base_url = azurerm_key_vault_managed_hardware_security_module.test.hsm_uri + managed_hsm_id = azurerm_key_vault_managed_hardware_security_module.test.id name = "1e243909-064c-6ac3-84e9-1c8bf8d6ad22" scope = "/keys" role_definition_id = "/Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b" @@ -337,7 +337,7 @@ resource "azurerm_key_vault_managed_hardware_security_module_role_assignment" "t } resource "azurerm_key_vault_managed_hardware_security_module_role_assignment" "test1" { - vault_base_url = azurerm_key_vault_managed_hardware_security_module.test.hsm_uri + managed_hsm_id = azurerm_key_vault_managed_hardware_security_module.test.id name = "1e243909-064c-6ac3-84e9-1c8bf8d6ad23" scope = "/keys" role_definition_id = "/Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778" diff --git a/internal/services/managedhsm/key_vault_managed_hardware_security_module_key_rotation_policy_resource.go b/internal/services/managedhsm/key_vault_managed_hardware_security_module_key_rotation_policy_resource.go new file mode 100644 index 0000000000000..72a9cda5c14c5 --- /dev/null +++ b/internal/services/managedhsm/key_vault_managed_hardware_security_module_key_rotation_policy_resource.go @@ -0,0 +1,282 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package managedhsm + +import ( + "context" + "fmt" + "strings" + "time" + + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + validate2 "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" + "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/managedhsm/parse" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/managedhsm/validate" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/tombuildsstuff/kermit/sdk/keyvault/7.4/keyvault" +) + +type KeyVaultMHSMKeyRotationPolicyResource struct{} + +var _ sdk.ResourceWithUpdate = KeyVaultMHSMKeyRotationPolicyResource{} + +func (r KeyVaultMHSMKeyRotationPolicyResource) ModelObject() interface{} { + return &MHSMKeyRotationPolicyResourceSchema{} +} + +type MHSMKeyRotationPolicyResourceSchema struct { + ManagedHSMKeyID string `tfschema:"managed_hsm_key_id"` + ExpireAfter string `tfschema:"expire_after"` + TimeAfterCreation string `tfschema:"time_after_creation"` + TimeBeforeExpiry string `tfschema:"time_before_expiry"` +} + +func (r KeyVaultMHSMKeyRotationPolicyResource) IDValidationFunc() pluginsdk.SchemaValidateFunc { + return validate.ManagedHSMDataPlaneVersionlessKeyID +} + +func (r KeyVaultMHSMKeyRotationPolicyResource) ResourceType() string { + return "azurerm_key_vault_managed_hardware_security_module_key_rotation_policy" +} + +func (r KeyVaultMHSMKeyRotationPolicyResource) Arguments() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{ + "managed_hsm_key_id": { + ForceNew: true, + Required: true, + Type: pluginsdk.TypeString, + }, + + "expire_after": { + Type: pluginsdk.TypeString, + Required: true, + ValidateFunc: validate2.ISO8601DurationBetween("P28D", "P100Y"), + }, + + // notify not supported in HSM Key, only rotate is supported + "time_after_creation": { + Type: pluginsdk.TypeString, + Optional: true, + ValidateFunc: validate2.ISO8601DurationBetween("P28D", "P100Y"), + ExactlyOneOf: []string{ + "time_after_creation", + "time_before_expiry", + }, + }, + + "time_before_expiry": { + Type: pluginsdk.TypeString, + Optional: true, + ValidateFunc: validate2.ISO8601Duration, + ExactlyOneOf: []string{ + "time_after_creation", + "time_before_expiry", + }, + }, + } +} + +func (r KeyVaultMHSMKeyRotationPolicyResource) Attributes() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{} +} + +func (r KeyVaultMHSMKeyRotationPolicyResource) Create() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 30 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.ManagedHSMs.DataPlaneKeysClient + domainSuffix, ok := metadata.Client.Account.Environment.ManagedHSM.DomainSuffix() + if !ok { + return fmt.Errorf("could not determine Managed HSM domain suffix for environment %q", metadata.Client.Account.Environment.Name) + } + + var config MHSMKeyRotationPolicyResourceSchema + if err := metadata.Decode(&config); err != nil { + return fmt.Errorf("decoding: %+v", err) + } + + keyID, err := parse.ManagedHSMDataPlaneVersionlessKeyID(config.ManagedHSMKeyID, domainSuffix) + if err != nil { + return fmt.Errorf("parsing Managed HSM Key ID: %+v", err) + } + + if _, err = client.GetKey(ctx, keyID.BaseUri(), keyID.KeyName, ""); err != nil { + return fmt.Errorf("checking for the presence of an existing %s: %+v", keyID, err) + } + + // check key has rotation policy + respPolicy, err := client.GetKeyRotationPolicy(ctx, keyID.BaseUri(), keyID.KeyName) + if err != nil { + switch { + case response.WasForbidden(respPolicy.Response.Response): + // If client is not authorized to access the policy: + return fmt.Errorf("current client lacks permissions to read Key Rotation Policy for Key %q: %v", keyID, err) + + case response.WasNotFound(respPolicy.Response.Response): + break + default: + return err + } + } + + if respPolicy.Attributes != nil && respPolicy.Attributes.ExpiryTime != nil { + if respPolicy.LifetimeActions != nil && len(*respPolicy.LifetimeActions) > 0 { + return metadata.ResourceRequiresImport(r.ResourceType(), keyID) + } + } + + if _, err := client.UpdateKeyRotationPolicy(ctx, keyID.BaseUri(), keyID.KeyName, expandKeyRotationPolicy(config)); err != nil { + return fmt.Errorf("creating HSM Key Rotation Policy for Key %q: %v", keyID, err) + } + + metadata.SetID(keyID) + return nil + }, + } +} + +func (r KeyVaultMHSMKeyRotationPolicyResource) Read() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 5 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.ManagedHSMs.DataPlaneKeysClient + domainSuffix, ok := metadata.Client.Account.Environment.ManagedHSM.DomainSuffix() + if !ok { + return fmt.Errorf("could not determine Managed HSM domain suffix for environment %q", metadata.Client.Account.Environment.Name) + } + + id, err := parse.ManagedHSMDataPlaneVersionlessKeyID(metadata.ResourceData.Id(), domainSuffix) + if err != nil { + return err + } + + resp, err := client.GetKeyRotationPolicy(ctx, id.BaseUri(), id.KeyName) + if err != nil { + if response.WasNotFound(resp.Response.Response) { + return metadata.MarkAsGone(*id) + } + return fmt.Errorf("retrieving %s: %+v", *id, err) + } + schema := flattenKeyRotationPolicy(resp) + schema.ManagedHSMKeyID = id.ID() + + return metadata.Encode(&schema) + }, + } +} + +func (r KeyVaultMHSMKeyRotationPolicyResource) Update() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 30 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.ManagedHSMs.DataPlaneRoleAssignmentsClient + domainSuffix, ok := metadata.Client.Account.Environment.ManagedHSM.DomainSuffix() + if !ok { + return fmt.Errorf("could not determine Managed HSM domain suffix for environment %q", metadata.Client.Account.Environment.Name) + } + + var config MHSMKeyRotationPolicyResourceSchema + if err := metadata.Decode(&config); err != nil { + return fmt.Errorf("decoding: %+v", err) + } + + id, err := parse.ManagedHSMDataPlaneVersionlessKeyID(metadata.ResourceData.Id(), domainSuffix) + if err != nil { + return err + } + + if _, err := client.UpdateKeyRotationPolicy(ctx, id.BaseUri(), id.KeyName, expandKeyRotationPolicy(config)); err != nil { + return fmt.Errorf("updating HSM Key Rotation Policy for Key %q: %v", id, err) + } + + return nil + }, + } +} + +func (r KeyVaultMHSMKeyRotationPolicyResource) Delete() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 30 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.ManagedHSMs.DataPlaneKeysClient + + domainSuffix, ok := metadata.Client.Account.Environment.ManagedHSM.DomainSuffix() + if !ok { + return fmt.Errorf("could not determine Managed HSM domain suffix for environment %q", metadata.Client.Account.Environment.Name) + } + + id, err := parse.ManagedHSMDataPlaneVersionlessKeyID(metadata.ResourceData.Id(), domainSuffix) + if err != nil { + return err + } + + // setting a blank policy to delete the existing policy + if _, err := client.UpdateKeyRotationPolicy(ctx, id.BaseUri(), id.KeyName, keyvault.KeyRotationPolicy{ + LifetimeActions: pointer.To([]keyvault.LifetimeActions{}), + Attributes: &keyvault.KeyRotationPolicyAttributes{}, + }); err != nil { + return fmt.Errorf("deleting HSM Key Rotation Policy for Key %q: %v", id, err) + } + + return nil + }, + } +} + +func expandKeyRotationPolicy(policy MHSMKeyRotationPolicyResourceSchema) keyvault.KeyRotationPolicy { + + var expiryTime *string // = nil // needs to be set to nil if not set + if policy.ExpireAfter != "" { + expiryTime = pointer.To(policy.ExpireAfter) + } + + lifetimeActions := make([]keyvault.LifetimeActions, 0) + + lifetimeActionRotate := keyvault.LifetimeActions{ + Action: &keyvault.LifetimeActionsType{ + Type: keyvault.ActionTypeRotate, + }, + Trigger: &keyvault.LifetimeActionsTrigger{}, + } + + if policy.TimeAfterCreation != "" { + lifetimeActionRotate.Trigger.TimeAfterCreate = pointer.To(policy.TimeAfterCreation) + lifetimeActions = append(lifetimeActions, lifetimeActionRotate) + } else if policy.TimeBeforeExpiry != "" { + lifetimeActionRotate.Trigger.TimeBeforeExpiry = pointer.To(policy.TimeBeforeExpiry) + lifetimeActions = append(lifetimeActions, lifetimeActionRotate) + } + + return keyvault.KeyRotationPolicy{ + LifetimeActions: &lifetimeActions, + Attributes: &keyvault.KeyRotationPolicyAttributes{ + ExpiryTime: expiryTime, + }, + } +} + +func flattenKeyRotationPolicy(p keyvault.KeyRotationPolicy) MHSMKeyRotationPolicyResourceSchema { + var res MHSMKeyRotationPolicyResourceSchema + if p.Attributes != nil { + res.ExpireAfter = pointer.From(p.Attributes.ExpiryTime) + } + + if p.LifetimeActions != nil { + for _, ltAction := range *p.LifetimeActions { + action := ltAction.Action + trigger := ltAction.Trigger + + if action != nil && trigger != nil { + if strings.EqualFold(string(action.Type), string(keyvault.ActionTypeRotate)) { + res.TimeAfterCreation = pointer.From(trigger.TimeAfterCreate) + res.TimeBeforeExpiry = pointer.From(trigger.TimeBeforeExpiry) + } + } + } + } + + return res +} diff --git a/internal/services/managedhsm/key_vault_managed_hardware_security_module_key_rotation_policy_resource_test.go b/internal/services/managedhsm/key_vault_managed_hardware_security_module_key_rotation_policy_resource_test.go new file mode 100644 index 0000000000000..6d831eb4691f8 --- /dev/null +++ b/internal/services/managedhsm/key_vault_managed_hardware_security_module_key_rotation_policy_resource_test.go @@ -0,0 +1,234 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package managedhsm_test + +import ( + "context" + "fmt" + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" + "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/managedhsm/parse" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/utils" +) + +type MHSMKeyRotationPolicyTestResource struct{} + +func testAccMHSMKeyRotationPolicy_all(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_key_vault_managed_hardware_security_module_key_rotation_policy", "test") + r := MHSMKeyRotationPolicyTestResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + { + Config: r.update(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + +func (r MHSMKeyRotationPolicyTestResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { + domainSuffix, ok := clients.Account.Environment.ManagedHSM.DomainSuffix() + if !ok { + return nil, fmt.Errorf("could not determine Managed HSM domain suffix for environment %q", clients.Account.Environment.Name) + } + id, err := parse.ManagedHSMDataPlaneVersionlessKeyID(state.ID, domainSuffix) + if err != nil { + return nil, err + } + + subscriptionId := commonids.NewSubscriptionID(clients.Account.SubscriptionId) + resourceManagerId, err := clients.ManagedHSMs.ManagedHSMIDFromBaseUrl(ctx, subscriptionId, id.BaseUri(), domainSuffix) + if err != nil { + return nil, fmt.Errorf("determining Resource Manager ID for %q: %+v", id, err) + } + if resourceManagerId == nil { + return nil, fmt.Errorf("unable to determine the Resource Manager ID for %s", id) + } + + resp, err := clients.ManagedHSMs.DataPlaneKeysClient.GetKeyRotationPolicy(ctx, id.BaseUri(), id.KeyName) + if err != nil { + return nil, fmt.Errorf("reading %s: %+v", *id, err) + } + + return utils.Bool(resp.Attributes != nil), nil +} + +func (r MHSMKeyRotationPolicyTestResource) basic(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +%s + +resource "azurerm_key_vault_managed_hardware_security_module_key_rotation_policy" "test" { + managed_hsm_key_id = azurerm_key_vault_managed_hardware_security_module_key.test.id + time_before_expiry = "P30D" + expire_after = "P60D" +} +`, r.template(data)) +} + +func (r MHSMKeyRotationPolicyTestResource) update(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +%s + +resource "azurerm_key_vault_managed_hardware_security_module_key_rotation_policy" "test" { + managed_hsm_key_id = azurerm_key_vault_managed_hardware_security_module_key.test.id + expire_after = "P60D" + time_after_creation = "P28D" +} +`, r.template(data)) +} + +func (r MHSMKeyRotationPolicyTestResource) template(data acceptance.TestData) string { + return fmt.Sprintf(` +data "azurerm_client_config" "current" { +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-KV-%[1]s" + location = "%[2]s" +} + +resource "azurerm_key_vault" "test" { + name = "acc%[3]d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + tenant_id = data.azurerm_client_config.current.tenant_id + sku_name = "standard" + soft_delete_retention_days = 7 + access_policy { + tenant_id = data.azurerm_client_config.current.tenant_id + object_id = data.azurerm_client_config.current.object_id + key_permissions = [ + "Create", + "Delete", + "Get", + "Purge", + "Recover", + "Update", + "GetRotationPolicy", + ] + secret_permissions = [ + "Delete", + "Get", + "Set", + ] + certificate_permissions = [ + "Create", + "Delete", + "DeleteIssuers", + "Get", + "Purge", + "Update" + ] + } + tags = { + environment = "Production" + } +} + +resource "azurerm_key_vault_certificate" "cert" { + count = 3 + name = "acchsmcert${count.index}" + key_vault_id = azurerm_key_vault.test.id + certificate_policy { + issuer_parameters { + name = "Self" + } + key_properties { + exportable = true + key_size = 2048 + key_type = "RSA" + reuse_key = true + } + lifetime_action { + action { + action_type = "AutoRenew" + } + trigger { + days_before_expiry = 30 + } + } + secret_properties { + content_type = "application/x-pkcs12" + } + x509_certificate_properties { + extended_key_usage = [] + key_usage = [ + "cRLSign", + "dataEncipherment", + "digitalSignature", + "keyAgreement", + "keyCertSign", + "keyEncipherment", + ] + subject = "CN=hello-world" + validity_in_months = 12 + } + } +} + +resource "azurerm_key_vault_managed_hardware_security_module" "test" { + name = "kvHsm%[3]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + sku_name = "Standard_B1" + tenant_id = data.azurerm_client_config.current.tenant_id + admin_object_ids = [data.azurerm_client_config.current.object_id] + purge_protection_enabled = false + + security_domain_key_vault_certificate_ids = [for cert in azurerm_key_vault_certificate.cert : cert.id] + security_domain_quorum = 3 +} + +resource "azurerm_key_vault_managed_hardware_security_module_role_assignment" "test" { + managed_hsm_id = azurerm_key_vault_managed_hardware_security_module.test.id + name = "1e243909-064c-6ac3-84e9-1c8bf8d6ad22" + scope = "/keys" + role_definition_id = "/Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b" + principal_id = data.azurerm_client_config.current.object_id +} + +resource "azurerm_key_vault_managed_hardware_security_module_role_assignment" "test1" { + managed_hsm_id = azurerm_key_vault_managed_hardware_security_module.test.id + name = "1e243909-064c-6ac3-84e9-1c8bf8d6ad23" + scope = "/keys" + role_definition_id = "/Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778" + principal_id = data.azurerm_client_config.current.object_id +} + +resource "azurerm_key_vault_managed_hardware_security_module_key" "test" { + name = "acctestHSMK-%[1]s" + managed_hsm_id = azurerm_key_vault_managed_hardware_security_module.test.id + key_type = "EC-HSM" + curve = "P-521" + key_opts = ["sign"] + + depends_on = [ + azurerm_key_vault_managed_hardware_security_module_role_assignment.test, + azurerm_key_vault_managed_hardware_security_module_role_assignment.test1 + ] +} +`, data.RandomString, data.Locations.Primary, data.RandomInteger) +} diff --git a/internal/services/managedhsm/key_vault_managed_hardware_security_module_resource_test.go b/internal/services/managedhsm/key_vault_managed_hardware_security_module_resource_test.go index 4f6fb63853402..33551fc3b58b1 100644 --- a/internal/services/managedhsm/key_vault_managed_hardware_security_module_resource_test.go +++ b/internal/services/managedhsm/key_vault_managed_hardware_security_module_resource_test.go @@ -55,6 +55,7 @@ func TestAccKeyVaultManagedHardwareSecurityModule(t *testing.T) { "complete": testAccKeyVaultMHSMKey_complete, "purge": testAccKeyVaultHSMKey_purge, "softDeleteRecovery": testAccKeyVaultHSMKey_softDeleteRecovery, + "rotationPolicy": testAccMHSMKeyRotationPolicy_all, }, }) } diff --git a/internal/services/managedhsm/key_vault_managed_hardware_security_module_role_assignment_resource.go b/internal/services/managedhsm/key_vault_managed_hardware_security_module_role_assignment_resource.go index 6ac24b524a8cf..0c53b53744ba9 100644 --- a/internal/services/managedhsm/key_vault_managed_hardware_security_module_role_assignment_resource.go +++ b/internal/services/managedhsm/key_vault_managed_hardware_security_module_role_assignment_resource.go @@ -36,7 +36,7 @@ type KeyVaultManagedHSMRoleAssignmentModel struct { ResourceId string `tfschema:"resource_id"` // TODO: remove in v4.0 - VaultBaseUrl string `tfschema:"vault_base_url"` + VaultBaseUrl string `tfschema:"vault_base_url,removedInNextMajorVersion"` } var _ sdk.ResourceWithStateMigration = KeyVaultManagedHSMRoleAssignmentResource{} diff --git a/internal/services/managedhsm/key_vault_managed_hardware_security_module_role_assignment_resource_test.go b/internal/services/managedhsm/key_vault_managed_hardware_security_module_role_assignment_resource_test.go index 65f1a2fec541d..23283c8e36895 100644 --- a/internal/services/managedhsm/key_vault_managed_hardware_security_module_role_assignment_resource_test.go +++ b/internal/services/managedhsm/key_vault_managed_hardware_security_module_role_assignment_resource_test.go @@ -161,7 +161,7 @@ data "azurerm_key_vault_managed_hardware_security_module_role_definition" "offic } resource "azurerm_key_vault_managed_hardware_security_module_role_assignment" "test" { - vault_base_url = azurerm_key_vault_managed_hardware_security_module.test.hsm_uri + managed_hsm_id = azurerm_key_vault_managed_hardware_security_module.test.id name = local.assignmentOfficerName scope = "/keys" role_definition_id = data.azurerm_key_vault_managed_hardware_security_module_role_definition.officer.resource_manager_id @@ -179,7 +179,7 @@ locals { } resource "azurerm_key_vault_managed_hardware_security_module_role_assignment" "test" { - vault_base_url = azurerm_key_vault_managed_hardware_security_module.test.hsm_uri + managed_hsm_id = azurerm_key_vault_managed_hardware_security_module.test.id name = local.assignmentTestName scope = "/keys" role_definition_id = azurerm_key_vault_managed_hardware_security_module_role_definition.test.resource_manager_id diff --git a/internal/services/managedhsm/key_vault_managed_hardware_security_module_role_definition_data_source.go b/internal/services/managedhsm/key_vault_managed_hardware_security_module_role_definition_data_source.go index 75acbe62090ee..ab0c148c26d0a 100644 --- a/internal/services/managedhsm/key_vault_managed_hardware_security_module_role_definition_data_source.go +++ b/internal/services/managedhsm/key_vault_managed_hardware_security_module_role_definition_data_source.go @@ -32,7 +32,7 @@ type KeyVaultMHSMRoleDefinitionDataSourceModel struct { ResourceManagerId string `tfschema:"resource_manager_id"` // TODO: remove in v4.0 - VaultBaseUrl string `tfschema:"vault_base_url"` + VaultBaseUrl string `tfschema:"vault_base_url,removedInNextMajorVersion"` } type KeyvaultMHSMRoleDefinitionDataSource struct{} diff --git a/internal/services/managedhsm/key_vault_managed_hardware_security_module_role_definition_resource.go b/internal/services/managedhsm/key_vault_managed_hardware_security_module_role_definition_resource.go index d8bec6ed6a319..ac2081e7f5917 100644 --- a/internal/services/managedhsm/key_vault_managed_hardware_security_module_role_definition_resource.go +++ b/internal/services/managedhsm/key_vault_managed_hardware_security_module_role_definition_resource.go @@ -35,7 +35,7 @@ type KeyVaultMHSMRoleDefinitionModel struct { ResourceManagerId string `tfschema:"resource_manager_id"` // TODO: remove in 4.0 - VaultBaseUrl string `tfschema:"vault_base_url"` + VaultBaseUrl string `tfschema:"vault_base_url,removedInNextMajorVersion"` } type Permission struct { diff --git a/internal/services/managedhsm/registration.go b/internal/services/managedhsm/registration.go index 304f69bee06a6..bb7f2fb5e62b6 100644 --- a/internal/services/managedhsm/registration.go +++ b/internal/services/managedhsm/registration.go @@ -57,5 +57,6 @@ func (r Registration) Resources() []sdk.Resource { KeyVaultMHSMKeyResource{}, KeyVaultMHSMRoleDefinitionResource{}, KeyVaultManagedHSMRoleAssignmentResource{}, + KeyVaultMHSMKeyRotationPolicyResource{}, } } diff --git a/internal/services/managementgroup/client/client.go b/internal/services/managementgroup/client/client.go index bef6f82bfcf71..289f0930401e4 100644 --- a/internal/services/managementgroup/client/client.go +++ b/internal/services/managementgroup/client/client.go @@ -4,24 +4,24 @@ package client import ( - "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups" // nolint: staticcheck + "fmt" + + "github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) type Client struct { - GroupsClient *managementgroups.Client - SubscriptionClient *managementgroups.SubscriptionsClient + GroupsClient *managementgroups.ManagementGroupsClient } -func NewClient(o *common.ClientOptions) *Client { - GroupsClient := managementgroups.NewClientWithBaseURI(o.ResourceManagerEndpoint) - o.ConfigureClient(&GroupsClient.Client, o.ResourceManagerAuthorizer) - - SubscriptionClient := managementgroups.NewSubscriptionsClientWithBaseURI(o.ResourceManagerEndpoint) - o.ConfigureClient(&SubscriptionClient.Client, o.ResourceManagerAuthorizer) +func NewClient(o *common.ClientOptions) (*Client, error) { + groupsClient, err := managementgroups.NewManagementGroupsClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building managementgroups client: %+v", err) + } + o.Configure(groupsClient.Client, o.Authorizers.ResourceManager) return &Client{ - GroupsClient: &GroupsClient, - SubscriptionClient: &SubscriptionClient, - } + GroupsClient: groupsClient, + }, nil } diff --git a/internal/services/managementgroup/management_group_data_source.go b/internal/services/managementgroup/management_group_data_source.go index 164952b7715b7..9d0e1d867353e 100644 --- a/internal/services/managementgroup/management_group_data_source.go +++ b/internal/services/managementgroup/management_group_data_source.go @@ -8,13 +8,15 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/managementgroup/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/managementgroup/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) func dataSourceManagementGroup() *pluginsdk.Resource { @@ -100,9 +102,13 @@ func dataSourceManagementGroupRead(d *pluginsdk.ResourceData, meta interface{}) } } recurse := true - resp, err := client.Get(ctx, groupName, "children", &recurse, "", managementGroupCacheControl) + resp, err := client.Get(ctx, commonids.NewManagementGroupID(groupName), managementgroups.GetOperationOptions{ + CacheControl: &managementGroupCacheControl, + Expand: pointer.To(managementgroups.ExpandChildren), + Recurse: &recurse, + }) if err != nil { - if utils.ResponseWasForbidden(resp.Response) { + if response.WasForbidden(resp.HttpResponse) { return fmt.Errorf("Management Group %q was not found", groupName) } @@ -117,62 +123,65 @@ func dataSourceManagementGroupRead(d *pluginsdk.ResourceData, meta interface{}) tenantScopedID := parse.NewTenantScopedManagementGroupID(tenantID, id.Name) d.Set("tenant_scoped_id", tenantScopedID.TenantScopedID()) - if props := resp.Properties; props != nil { - d.Set("display_name", props.DisplayName) + if model := resp.Model; model != nil { + if props := model.Properties; props != nil { + d.Set("display_name", props.DisplayName) - subscriptionIds := []interface{}{} - mgmtgroupIds := []interface{}{} - if err := flattenManagementGroupDataSourceChildren(&subscriptionIds, &mgmtgroupIds, props.Children, false); err != nil { - return fmt.Errorf("flattening direct children resources: %+v", err) - } - if err := d.Set("subscription_ids", subscriptionIds); err != nil { - return fmt.Errorf("setting `subscription_ids`: %v", err) - } - if err := d.Set("management_group_ids", mgmtgroupIds); err != nil { - return fmt.Errorf("setting `management_group_ids`: %v", err) - } + subscriptionIds := []interface{}{} + mgmtgroupIds := []interface{}{} + if err := flattenManagementGroupDataSourceChildren(&subscriptionIds, &mgmtgroupIds, props.Children, false); err != nil { + return fmt.Errorf("flattening direct children resources: %+v", err) + } + if err := d.Set("subscription_ids", subscriptionIds); err != nil { + return fmt.Errorf("setting `subscription_ids`: %v", err) + } + if err := d.Set("management_group_ids", mgmtgroupIds); err != nil { + return fmt.Errorf("setting `management_group_ids`: %v", err) + } - subscriptionIds = []interface{}{} - mgmtgroupIds = []interface{}{} - if err := flattenManagementGroupDataSourceChildren(&subscriptionIds, &mgmtgroupIds, props.Children, true); err != nil { - return fmt.Errorf("flattening all children resources: %+v", err) - } - if err := d.Set("all_subscription_ids", subscriptionIds); err != nil { - return fmt.Errorf("setting `all_subscription_ids`: %v", err) - } - if err := d.Set("all_management_group_ids", mgmtgroupIds); err != nil { - return fmt.Errorf("setting `all_management_group_ids`: %v", err) - } + subscriptionIds = []interface{}{} + mgmtgroupIds = []interface{}{} + if err := flattenManagementGroupDataSourceChildren(&subscriptionIds, &mgmtgroupIds, props.Children, true); err != nil { + return fmt.Errorf("flattening all children resources: %+v", err) + } + if err := d.Set("all_subscription_ids", subscriptionIds); err != nil { + return fmt.Errorf("setting `all_subscription_ids`: %v", err) + } + if err := d.Set("all_management_group_ids", mgmtgroupIds); err != nil { + return fmt.Errorf("setting `all_management_group_ids`: %v", err) + } - parentId := "" - if details := props.Details; details != nil { - if parent := details.Parent; parent != nil { - if pid := parent.ID; pid != nil { - parentId = *pid + parentId := "" + if details := props.Details; details != nil { + if parent := details.Parent; parent != nil { + if pid := parent.Id; pid != nil { + parentId = *pid + } } } + d.Set("parent_management_group_id", parentId) } - d.Set("parent_management_group_id", parentId) } return nil } -func getManagementGroupNameByDisplayName(ctx context.Context, client *managementgroups.Client, displayName string) (string, error) { - iterator, err := client.ListComplete(ctx, managementGroupCacheControl, "") +func getManagementGroupNameByDisplayName(ctx context.Context, client *managementgroups.ManagementGroupsClient, displayName string) (string, error) { + iterator, err := client.ListComplete(ctx, managementgroups.ListOperationOptions{ + CacheControl: &managementGroupCacheControl, + }) if err != nil { return "", fmt.Errorf("listing Management Groups: %+v", err) } var results []string - for iterator.NotDone() { - group := iterator.Value() - if group.DisplayName != nil && *group.DisplayName == displayName && group.Name != nil && *group.Name != "" { - results = append(results, *group.Name) + for _, item := range iterator.Items { + if item.Properties == nil { + continue } - if err := iterator.NextWithContext(ctx); err != nil { - return "", fmt.Errorf("listing Management Groups: %+v", err) + if item.Properties.DisplayName != nil && *item.Properties.DisplayName == displayName && item.Name != nil && *item.Name != "" { + results = append(results, *item.Name) } } @@ -189,28 +198,28 @@ func getManagementGroupNameByDisplayName(ctx context.Context, client *management return results[0], nil } -func flattenManagementGroupDataSourceChildren(subscriptionIds, mgmtgroupIds *[]interface{}, input *[]managementgroups.ChildInfo, recursive bool) error { +func flattenManagementGroupDataSourceChildren(subscriptionIds, mgmtgroupIds *[]interface{}, input *[]managementgroups.ManagementGroupChildInfo, recursive bool) error { if input == nil { return nil } for _, child := range *input { - if child.ID == nil { + if child.Id == nil || child.Type == nil { continue } - switch child.Type { - case managementgroups.Type1MicrosoftManagementmanagementGroups: - id, err := parse.ManagementGroupID(*child.ID) + switch *child.Type { + case managementgroups.ManagementGroupChildTypeMicrosoftPointManagementManagementGroups: + id, err := commonids.ParseManagementGroupID(*child.Id) if err != nil { return fmt.Errorf("Unable to parse child Management Group ID %+v", err) } *mgmtgroupIds = append(*mgmtgroupIds, id.ID()) - case managementgroups.Type1Subscriptions: - id, err := parseManagementGroupSubscriptionID(*child.ID) + case managementgroups.ManagementGroupChildTypeSubscriptions: + id, err := commonids.ParseSubscriptionID(*child.Id) if err != nil { return fmt.Errorf("Unable to parse child Subscription ID %+v", err) } - *subscriptionIds = append(*subscriptionIds, id.subscriptionId) + *subscriptionIds = append(*subscriptionIds, id.SubscriptionId) default: continue } diff --git a/internal/services/managementgroup/management_group_data_source_test.go b/internal/services/managementgroup/management_group_data_source_test.go index ef417a5d7d820..2e54ede7c7d22 100644 --- a/internal/services/managementgroup/management_group_data_source_test.go +++ b/internal/services/managementgroup/management_group_data_source_test.go @@ -43,7 +43,7 @@ func TestAccManagementGroupDataSource_basicByDisplayName(t *testing.T) { }) } -func TestAccManagementGroupDataSource_nestedManagmentGroup(t *testing.T) { +func TestAccManagementGroupDataSource_nestedManagementGroup(t *testing.T) { data := acceptance.BuildTestData(t, "data.azurerm_management_group", "test") r := ManagementGroupDataSource{} diff --git a/internal/services/managementgroup/management_group_resource.go b/internal/services/managementgroup/management_group_resource.go index 7e2555140f451..717ffde44ec08 100644 --- a/internal/services/managementgroup/management_group_resource.go +++ b/internal/services/managementgroup/management_group_resource.go @@ -7,12 +7,13 @@ import ( "context" "fmt" "log" - "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups" // nolint: staticcheck "github.com/google/uuid" + "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/managementgroup/parse" @@ -68,7 +69,7 @@ func resourceManagementGroup() *pluginsdk.Resource { Type: pluginsdk.TypeString, Optional: true, Computed: true, - ValidateFunc: validate.ManagementGroupID, + ValidateFunc: commonids.ValidateManagementGroupID, }, "subscription_ids": { @@ -87,7 +88,6 @@ func resourceManagementGroup() *pluginsdk.Resource { func resourceManagementGroupCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { client := meta.(*clients.Client).ManagementGroups.GroupsClient - subscriptionsClient := meta.(*clients.Client).ManagementGroups.SubscriptionClient accountClient := meta.(*clients.Client) ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) defer cancel() @@ -102,10 +102,10 @@ func resourceManagementGroupCreateUpdate(d *pluginsdk.ResourceData, meta interfa groupName = uuid.New().String() } - id := parse.NewManagementGroupId(groupName) + id := commonids.NewManagementGroupID(groupName) tenantID := accountClient.Account.TenantId - tenantScopedID := parse.NewTenantScopedManagementGroupID(tenantID, id.Name) + tenantScopedID := parse.NewTenantScopedManagementGroupID(tenantID, id.GroupId) d.Set("tenant_scoped_id", tenantScopedID.TenantScopedID()) parentManagementGroupId := d.Get("parent_management_group_id").(string) @@ -115,14 +115,18 @@ func resourceManagementGroupCreateUpdate(d *pluginsdk.ResourceData, meta interfa recurse := false if d.IsNewResource() { - existing, err := client.Get(ctx, id.Name, "children", &recurse, "", managementGroupCacheControl) + existing, err := client.Get(ctx, id, managementgroups.GetOperationOptions{ + CacheControl: &managementGroupCacheControl, + Expand: pointer.To(managementgroups.ExpandChildren), + Recurse: &recurse, + }) if err != nil { // 403 is returned if group does not exist, bug tracked at: https://github.com/Azure/azure-rest-api-specs/issues/9549 - if !utils.ResponseWasNotFound(existing.Response) && !utils.ResponseWasForbidden(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) && !response.WasForbidden(existing.HttpResponse) { return fmt.Errorf("unable to check for presence of existing Management Group %q: %s", groupName, err) } } - if !utils.ResponseWasNotFound(existing.Response) && !utils.ResponseWasForbidden(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) && !response.WasForbidden(existing.HttpResponse) { return tf.ImportAsExistsError("azurerm_management_group", id.ID()) } } @@ -131,29 +135,27 @@ func resourceManagementGroupCreateUpdate(d *pluginsdk.ResourceData, meta interfa properties := managementgroups.CreateManagementGroupRequest{ Name: utils.String(groupName), - CreateManagementGroupProperties: &managementgroups.CreateManagementGroupProperties{ - TenantID: utils.String(armTenantID), + Properties: &managementgroups.CreateManagementGroupProperties{ + TenantId: utils.String(armTenantID), Details: &managementgroups.CreateManagementGroupDetails{ Parent: &managementgroups.CreateParentGroupInfo{ - ID: utils.String(parentManagementGroupId), + Id: utils.String(parentManagementGroupId), }, }, }, } if v := d.Get("display_name"); v != "" { - properties.CreateManagementGroupProperties.DisplayName = utils.String(v.(string)) + properties.Properties.DisplayName = utils.String(v.(string)) } - future, err := client.CreateOrUpdate(ctx, id.Name, properties, managementGroupCacheControl) + err := client.CreateOrUpdateThenPoll(ctx, id, properties, managementgroups.CreateOrUpdateOperationOptions{ + CacheControl: &managementGroupCacheControl, + }) if err != nil { return fmt.Errorf("unable to create Management Group %q: %+v", groupName, err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("failed when waiting for creation of Management Group %q: %+v", groupName, err) - } - // We have a potential race condition / consistency issue whereby the implicit role assignment for the SP may not be // completed before the read-back here or an eventually consistent read is creating a temporary 403 error. stateConf := &pluginsdk.StateChangeConf{ @@ -163,7 +165,7 @@ func resourceManagementGroupCreateUpdate(d *pluginsdk.ResourceData, meta interfa Target: []string{ "succeeded", }, - Refresh: managementgroupCreateStateRefreshFunc(ctx, client, groupName), + Refresh: managementGroupCreateStateRefreshFunc(ctx, client, id), Timeout: d.Timeout(pluginsdk.TimeoutCreate), ContinuousTargetOccurence: 5, } @@ -172,7 +174,12 @@ func resourceManagementGroupCreateUpdate(d *pluginsdk.ResourceData, meta interfa return fmt.Errorf("failed waiting for read on Managementgroup %q", groupName) } - resp, err := client.Get(ctx, id.Name, "children", &recurse, "", managementGroupCacheControl) + resp, err := client.Get(ctx, id, managementgroups.GetOperationOptions{ + CacheControl: &managementGroupCacheControl, + Expand: pointer.To(managementgroups.ExpandChildren), + Filter: pointer.To("children.childType eq Subscription"), + Recurse: &recurse, + }) if err != nil { return fmt.Errorf("unable to retrieve Management Group %q: %+v", groupName, err) } @@ -184,18 +191,22 @@ func resourceManagementGroupCreateUpdate(d *pluginsdk.ResourceData, meta interfa // first remove any which need to be removed if !d.IsNewResource() { log.Printf("[DEBUG] Determine which Subscriptions should be removed from Management Group %q", groupName) - if props := resp.Properties; props != nil { - subscriptionIdsToRemove, err2 := determineManagementGroupSubscriptionsIdsToRemove(props.Children, subscriptionIds) - if err2 != nil { - return fmt.Errorf("unable to determine which subscriptions should be removed from Management Group %q: %+v", groupName, err2) - } + if model := resp.Model; model != nil { + if props := model.Properties; props != nil { + subscriptionIdsToRemove, err := determineManagementGroupSubscriptionsIdsToRemove(props.Children, subscriptionIds) + if err != nil { + return fmt.Errorf("unable to determine which subscriptions should be removed from Management Group %q: %+v", groupName, err) + } - for _, subscriptionId := range *subscriptionIdsToRemove { - log.Printf("[DEBUG] De-associating Subscription ID %q from Management Group %q", subscriptionId, groupName) - deleteResp, err2 := subscriptionsClient.Delete(ctx, groupName, subscriptionId, managementGroupCacheControl) - if err2 != nil { - if !response.WasNotFound(deleteResp.Response) { - return fmt.Errorf("unable to de-associate Subscription %q from Management Group %q: %+v", subscriptionId, groupName, err2) + for _, subscriptionId := range *subscriptionIdsToRemove { + log.Printf("[DEBUG] De-associating Subscription ID %q from Management Group %q", subscriptionId, groupName) + deleteResp, err := client.SubscriptionsDelete(ctx, managementgroups.NewSubscriptionID(groupName, subscriptionId), managementgroups.SubscriptionsDeleteOperationOptions{ + CacheControl: &managementGroupCacheControl, + }) + if err != nil { + if !response.WasNotFound(deleteResp.HttpResponse) { + return fmt.Errorf("unable to de-associate Subscription %q from Management Group %q: %+v", subscriptionId, groupName, err) + } } } } @@ -206,7 +217,9 @@ func resourceManagementGroupCreateUpdate(d *pluginsdk.ResourceData, meta interfa log.Printf("[DEBUG] Preparing to assign Subscriptions to Management Group %q", groupName) for _, subscriptionId := range subscriptionIds { log.Printf("[DEBUG] Assigning Subscription ID %q to management group %q", subscriptionId, groupName) - if _, err := subscriptionsClient.Create(ctx, groupName, subscriptionId, managementGroupCacheControl); err != nil { + if _, err := client.SubscriptionsCreate(ctx, managementgroups.NewSubscriptionID(groupName, subscriptionId), managementgroups.SubscriptionsCreateOperationOptions{ + CacheControl: &managementGroupCacheControl, + }); err != nil { return fmt.Errorf("[DEBUG] Error assigning Subscription ID %q to Management Group %q: %+v", subscriptionId, groupName, err) } } @@ -220,19 +233,24 @@ func resourceManagementGroupRead(d *pluginsdk.ResourceData, meta interface{}) er ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.ManagementGroupID(d.Id()) + id, err := commonids.ParseManagementGroupID(d.Id()) if err != nil { return err } tenantID := accountClient.Account.TenantId - tenantScopedID := parse.NewTenantScopedManagementGroupID(tenantID, id.Name) + tenantScopedID := parse.NewTenantScopedManagementGroupID(tenantID, id.GroupId) d.Set("tenant_scoped_id", tenantScopedID.TenantScopedID()) - recurse := utils.Bool(true) - resp, err := client.Get(ctx, id.Name, "children", recurse, "", managementGroupCacheControl) + recurse := pointer.FromBool(true) + resp, err := client.Get(ctx, *id, managementgroups.GetOperationOptions{ + CacheControl: &managementGroupCacheControl, + Filter: pointer.To("children.childType eq Subscription"), + Expand: pointer.To(managementgroups.ExpandChildren), + Recurse: recurse, + }) if err != nil { - if utils.ResponseWasForbidden(resp.Response) || utils.ResponseWasNotFound(resp.Response) { + if response.WasForbidden(resp.HttpResponse) || response.WasNotFound(resp.HttpResponse) { log.Printf("[INFO] Management Group %q doesn't exist - removing from state", d.Id()) d.SetId("") return nil @@ -241,26 +259,28 @@ func resourceManagementGroupRead(d *pluginsdk.ResourceData, meta interface{}) er return fmt.Errorf("unable to read Management Group %q: %+v", d.Id(), err) } - d.Set("name", id.Name) + d.Set("name", id.GroupId) - if props := resp.Properties; props != nil { - d.Set("display_name", props.DisplayName) + if model := resp.Model; model != nil { + if props := model.Properties; props != nil { + d.Set("display_name", props.DisplayName) - subscriptionIds, err := flattenManagementGroupSubscriptionIds(props.Children) - if err != nil { - return fmt.Errorf("unable to flatten `subscription_ids`: %+v", err) - } - d.Set("subscription_ids", subscriptionIds) + subscriptionIds, err := flattenManagementGroupSubscriptionIds(props.Children) + if err != nil { + return fmt.Errorf("unable to flatten `subscription_ids`: %+v", err) + } + d.Set("subscription_ids", subscriptionIds) - parentId := "" - if details := props.Details; details != nil { - if parent := details.Parent; parent != nil { - if pid := parent.ID; pid != nil { - parentId = *pid + parentId := "" + if details := props.Details; details != nil { + if parent := details.Parent; parent != nil { + if pid := parent.Id; pid != nil { + parentId = *pid + } } } + d.Set("parent_management_group_id", parentId) } - d.Set("parent_management_group_id", parentId) } return nil @@ -268,61 +288,66 @@ func resourceManagementGroupRead(d *pluginsdk.ResourceData, meta interface{}) er func resourceManagementGroupDelete(d *pluginsdk.ResourceData, meta interface{}) error { client := meta.(*clients.Client).ManagementGroups.GroupsClient - subscriptionsClient := meta.(*clients.Client).ManagementGroups.SubscriptionClient ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.ManagementGroupID(d.Id()) + id, err := commonids.ParseManagementGroupID(d.Id()) if err != nil { return err } recurse := true - group, err := client.Get(ctx, id.Name, "children", &recurse, "", managementGroupCacheControl) + group, err := client.Get(ctx, *id, managementgroups.GetOperationOptions{ + CacheControl: &managementGroupCacheControl, + Filter: pointer.To("children.childType eq Subscription"), + Expand: pointer.To(managementgroups.ExpandChildren), + Recurse: &recurse, + }) if err != nil { - if utils.ResponseWasNotFound(group.Response) || utils.ResponseWasForbidden(group.Response) { - log.Printf("[DEBUG] Management Group %q doesn't exist in Azure - nothing to do!", id.Name) + if response.WasNotFound(group.HttpResponse) || response.WasForbidden(group.HttpResponse) { + log.Printf("[DEBUG] Management Group %q doesn't exist in Azure - nothing to do!", id.GroupId) return nil } - return fmt.Errorf("unable to retrieve Management Group %q: %+v", id.Name, err) + return fmt.Errorf("unable to retrieve Management Group %q: %+v", id.GroupId, err) } // before deleting a management group, return any subscriptions to the root management group - if props := group.Properties; props != nil { - if children := props.Children; children != nil { - for _, v := range *children { - if v.ID == nil { - continue - } + if model := group.Model; model != nil { + if props := model.Properties; props != nil { + if children := props.Children; children != nil { + for _, v := range *children { + if v.Id == nil { + continue + } - subscriptionId, err := parseManagementGroupSubscriptionID(*v.ID) - if err != nil { - return fmt.Errorf("unable to parse child Subscription ID %+v", err) - } - if subscriptionId == nil { - continue - } - log.Printf("[DEBUG] De-associating Subscription %q from Management Group %q..", subscriptionId, id.Name) - // NOTE: whilst this says `Delete` it's actually `Deassociate` - which is /really/ helpful - deleteResp, err2 := subscriptionsClient.Delete(ctx, id.Name, subscriptionId.subscriptionId, managementGroupCacheControl) - if err2 != nil { - if !response.WasNotFound(deleteResp.Response) { - return fmt.Errorf("unable to de-associate Subscription %q from Management Group %q: %+v", subscriptionId.subscriptionId, id.Name, err2) + subscriptionId, err := managementgroups.ParseSubscriptionID(*v.Id) + if err != nil { + return fmt.Errorf("unable to parse child Subscription ID %+v", err) + } + if subscriptionId == nil { + continue + } + log.Printf("[DEBUG] De-associating Subscription %q from Management Group %q..", subscriptionId, id.GroupId) + // NOTE: whilst this says `Delete` it's actually `Deassociate` - which is /really/ helpful + deleteResp, err := client.SubscriptionsDelete(ctx, *subscriptionId, managementgroups.SubscriptionsDeleteOperationOptions{ + CacheControl: &managementGroupCacheControl, + }) + if err != nil { + if !response.WasNotFound(deleteResp.HttpResponse) { + return fmt.Errorf("unable to de-associate Subscription %q from Management Group %q: %+v", subscriptionId.SubscriptionId, id.GroupId, err) + } } } } } } - resp, err := client.Delete(ctx, id.Name, managementGroupCacheControl) + err = client.DeleteThenPoll(ctx, *id, managementgroups.DeleteOperationOptions{ + CacheControl: &managementGroupCacheControl, + }) if err != nil { - return fmt.Errorf("unable to delete Management Group %q: %+v", id.Name, err) - } - - err = resp.WaitForCompletionRef(ctx, client.Client) - if err != nil { - return fmt.Errorf("failed when waiting for the deletion of Management Group %q: %+v", id.Name, err) + return fmt.Errorf("unable to delete Management Group %q: %+v", id.GroupId, err) } return nil @@ -340,73 +365,44 @@ func expandManagementGroupSubscriptionIds(input *pluginsdk.Set) []string { return output } -func flattenManagementGroupSubscriptionIds(input *[]managementgroups.ChildInfo) (*pluginsdk.Set, error) { +func flattenManagementGroupSubscriptionIds(input *[]managementgroups.ManagementGroupChildInfo) (*pluginsdk.Set, error) { subscriptionIds := &pluginsdk.Set{F: pluginsdk.HashString} if input == nil { return subscriptionIds, nil } for _, child := range *input { - if child.ID == nil { + if child.Type == nil || *child.Type != managementgroups.ManagementGroupChildTypeSubscriptions || child.Id == nil { continue } - id, err := parseManagementGroupSubscriptionID(*child.ID) + id, err := commonids.ParseSubscriptionID(*child.Id) if err != nil { return nil, fmt.Errorf("unable to parse child Subscription ID %+v", err) } if id != nil { - subscriptionIds.Add(id.subscriptionId) + subscriptionIds.Add(id.SubscriptionId) } } return subscriptionIds, nil } -type subscriptionId struct { - subscriptionId string -} - -func parseManagementGroupSubscriptionID(input string) (*subscriptionId, error) { - // this is either: - // /subscriptions/00000000-0000-0000-0000-000000000000 - - // we skip out the child managementGroup ID's - if strings.HasPrefix(input, "/providers/Microsoft.Management/managementGroups/") { - return nil, nil - } - - components := strings.Split(input, "/") - - if len(components) == 0 { - return nil, fmt.Errorf("subscription Id is empty or not formatted correctly: %s", input) - } - - if len(components) != 3 { - return nil, fmt.Errorf("subscription Id should have 2 segments, got %d: %q", len(components)-1, input) - } - - id := subscriptionId{ - subscriptionId: components[2], - } - return &id, nil -} - -func determineManagementGroupSubscriptionsIdsToRemove(existing *[]managementgroups.ChildInfo, updated []string) (*[]string, error) { +func determineManagementGroupSubscriptionsIdsToRemove(existing *[]managementgroups.ManagementGroupChildInfo, updated []string) (*[]string, error) { subscriptionIdsToRemove := make([]string, 0) if existing == nil { return &subscriptionIdsToRemove, nil } for _, v := range *existing { - if v.ID == nil { + if v.Type == nil || *v.Type != managementgroups.ManagementGroupChildTypeSubscriptions || v.Id == nil { continue } - id, err := parseManagementGroupSubscriptionID(*v.ID) + id, err := commonids.ParseSubscriptionID(*v.Id) if err != nil { - return nil, fmt.Errorf("unable to parse Subscription ID %q: %+v", *v.ID, err) + return nil, fmt.Errorf("unable to parse Subscription ID %q: %+v", *v.Id, err) } // not a Subscription - so let's skip it @@ -416,25 +412,29 @@ func determineManagementGroupSubscriptionsIdsToRemove(existing *[]managementgrou found := false for _, subId := range updated { - if id.subscriptionId == subId { + if id.SubscriptionId == subId { found = true break } } if !found { - subscriptionIdsToRemove = append(subscriptionIdsToRemove, id.subscriptionId) + subscriptionIdsToRemove = append(subscriptionIdsToRemove, id.SubscriptionId) } } return &subscriptionIdsToRemove, nil } -func managementgroupCreateStateRefreshFunc(ctx context.Context, client *managementgroups.Client, groupName string) pluginsdk.StateRefreshFunc { +func managementGroupCreateStateRefreshFunc(ctx context.Context, client *managementgroups.ManagementGroupsClient, id commonids.ManagementGroupId) pluginsdk.StateRefreshFunc { return func() (interface{}, string, error) { - resp, err := client.Get(ctx, groupName, "children", utils.Bool(true), "", managementGroupCacheControl) + resp, err := client.Get(ctx, id, managementgroups.GetOperationOptions{ + CacheControl: &managementGroupCacheControl, + Expand: pointer.To(managementgroups.ExpandChildren), + Recurse: pointer.FromBool(true), + }) if err != nil { - if utils.ResponseWasForbidden(resp.Response) { + if response.WasForbidden(resp.HttpResponse) { return resp, "pending", nil } return resp, "failed", err diff --git a/internal/services/managementgroup/management_group_resource_test.go b/internal/services/managementgroup/management_group_resource_test.go index ec6b51109425b..57a4ef2fd9123 100644 --- a/internal/services/managementgroup/management_group_resource_test.go +++ b/internal/services/managementgroup/management_group_resource_test.go @@ -9,10 +9,12 @@ import ( "os" "testing" + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/managementgroup/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -184,17 +186,20 @@ func TestAccManagementGroup_withSubscriptions(t *testing.T) { } func (ManagementGroupResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.ManagementGroupID(state.ID) + id, err := commonids.ParseManagementGroupID(state.ID) if err != nil { return nil, err } - - resp, err := clients.ManagementGroups.GroupsClient.Get(ctx, id.Name, "children", utils.Bool(true), "", "no-cache") + resp, err := clients.ManagementGroups.GroupsClient.Get(ctx, *id, managementgroups.GetOperationOptions{ + CacheControl: pointer.FromString("no-cache"), + Expand: pointer.To(managementgroups.ExpandChildren), + Recurse: pointer.FromBool(false), + }) if err != nil { - return nil, fmt.Errorf("retrieving Management Group %s: %v", id.Name, err) + return nil, fmt.Errorf("retrieving Management Group %s: %v", id.GroupId, err) } - return utils.Bool(resp.Properties != nil), nil + return utils.Bool(resp.Model.Properties != nil), nil } func (r ManagementGroupResource) basic() string { diff --git a/internal/services/managementgroup/parse/management_group_subscription_association.go b/internal/services/managementgroup/parse/management_group_subscription_association.go deleted file mode 100644 index 8c465b08aaff8..0000000000000 --- a/internal/services/managementgroup/parse/management_group_subscription_association.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package parse - -import ( - "fmt" - - "github.com/hashicorp/go-uuid" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" -) - -type ManagementGroupSubscriptionAssociationId struct { - ManagementGroup string - SubscriptionId string -} - -func NewManagementGroupSubscriptionAssociationID(managementGroupName string, subscriptionId string) ManagementGroupSubscriptionAssociationId { - return ManagementGroupSubscriptionAssociationId{ - ManagementGroup: managementGroupName, - SubscriptionId: subscriptionId, - } -} - -func (r ManagementGroupSubscriptionAssociationId) ID() string { - managementGroupSubscriptionAssociationFmt := "/managementGroup/%s/subscription/%s" - return fmt.Sprintf(managementGroupSubscriptionAssociationFmt, r.ManagementGroup, r.SubscriptionId) -} - -func ManagementGroupSubscriptionAssociationID(input string) (*ManagementGroupSubscriptionAssociationId, error) { - id, err := azure.ParseAzureResourceIDWithoutSubscription(input) - if err != nil { - return nil, err - } - - managementGroup, err := id.PopSegment("managementGroup") - if err != nil { - return nil, err - } - - subscriptionId, err := id.PopSegment("subscription") - if err != nil { - return nil, err - } - if _, err := uuid.ParseUUID(subscriptionId); err != nil { - return nil, fmt.Errorf("expected subscription ID to be UUID, got %q", subscriptionId) - } - - return &ManagementGroupSubscriptionAssociationId{ - ManagementGroup: managementGroup, - SubscriptionId: subscriptionId, - }, nil -} diff --git a/internal/services/managementgroup/parse/management_group_subscription_association_test.go b/internal/services/managementgroup/parse/management_group_subscription_association_test.go deleted file mode 100644 index 3d96b317ac45f..0000000000000 --- a/internal/services/managementgroup/parse/management_group_subscription_association_test.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package parse - -import "testing" - -func TestManagementGroupSubscriptionAssociationID(t *testing.T) { - testData := []struct { - Name string - Input string - Error bool - Expected *ManagementGroupSubscriptionAssociationId - }{ - { - Name: "Empty", - Input: "", - Error: true, - }, - { - Name: "Missing Subscription", - Input: "/managementGroup/MyManagementGroup", - Error: true, - }, - { - Name: "Missing Subscription Id", - Input: "/managementGroup/MyManagementGroup/subscription/", - Error: true, - }, - { - Name: "Missing Management Group", - Input: "/subscription/12345678-1234-1234-1234-123456789012", - Error: true, - }, - { - Name: "Missing Management Group Name", - Input: "/managementGroup/subscription/12345678-1234-1234-1234-123456789012", - Error: true, - }, - { - Name: "Wrong Case", - Input: "/MANAGEMENTGROUP/MyManagementGroup/SUBSCRIPTION/12345678-1234-1234-1234-123456789012", - Error: true, - }, - { - Name: "Valid", - Input: "/managementGroup/MyManagementGroup/subscription/12345678-1234-1234-1234-123456789012", - Expected: &ManagementGroupSubscriptionAssociationId{ - ManagementGroup: "MyManagementGroup", - SubscriptionId: "12345678-1234-1234-1234-123456789012", - }, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Name) - - actual, err := ManagementGroupSubscriptionAssociationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expected a value but got an error: %s", err) - } - - if actual.ManagementGroup != v.Expected.ManagementGroup { - t.Fatalf("Expected %q but got %q for Name", v.Expected.ManagementGroup, actual.ManagementGroup) - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for Name", v.Expected.SubscriptionId, actual.SubscriptionId) - } - } -} diff --git a/internal/services/managementgroup/subscription_association_resource.go b/internal/services/managementgroup/subscription_association_resource.go index 1a57a9cf405d0..c6cab7a165c31 100644 --- a/internal/services/managementgroup/subscription_association_resource.go +++ b/internal/services/managementgroup/subscription_association_resource.go @@ -10,15 +10,16 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/managementgroup/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/managementgroup/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) func resourceManagementGroupSubscriptionAssociation() *pluginsdk.Resource { @@ -34,7 +35,7 @@ func resourceManagementGroupSubscriptionAssociation() *pluginsdk.Resource { }, Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.ManagementGroupSubscriptionAssociationID(id) + _, err := managementgroups.ParseSubscriptionID(id) return err }), @@ -57,8 +58,7 @@ func resourceManagementGroupSubscriptionAssociation() *pluginsdk.Resource { } func resourceManagementGroupSubscriptionAssociationCreate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).ManagementGroups.SubscriptionClient - groupsClient := meta.(*clients.Client).ManagementGroups.GroupsClient + client := meta.(*clients.Client).ManagementGroups.GroupsClient ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d) defer cancel() @@ -72,29 +72,35 @@ func resourceManagementGroupSubscriptionAssociationCreate(d *pluginsdk.ResourceD return err } - id := parse.NewManagementGroupSubscriptionAssociationID(managementGroupId.Name, subscriptionId.SubscriptionId) + id := managementgroups.NewSubscriptionID(managementGroupId.Name, subscriptionId.SubscriptionId) - existing, err := groupsClient.Get(ctx, id.ManagementGroup, "children", utils.Bool(false), "", "") + existing, err := client.Get(ctx, commonids.NewManagementGroupID(id.GroupId), managementgroups.GetOperationOptions{ + CacheControl: &managementGroupCacheControl, + Expand: pointer.To(managementgroups.ExpandChildren), + Recurse: pointer.FromBool(false), + }) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { - return fmt.Errorf("failed checking Management Group %q: %+v", id.ManagementGroup, err) + if !response.WasNotFound(existing.HttpResponse) { + return fmt.Errorf("failed checking Management Group %q: %+v", id.GroupId, err) } } - props := existing.Properties - if props == nil { - return fmt.Errorf("could not read properties for Management Group %q to check if Subscription Association for %q already exists", id.ManagementGroup, id.SubscriptionId) - } + if model := existing.Model; model != nil { + props := model.Properties + if props == nil { + return fmt.Errorf("could not read properties for Management Group %q to check if Subscription Association for %q already exists", id.GroupId, id.SubscriptionId) + } - if props.Children != nil { - for _, v := range *props.Children { - if v.Type == managementgroups.Type1Subscriptions && v.Name != nil && strings.EqualFold(*v.Name, id.SubscriptionId) { - return tf.ImportAsExistsError("azurerm_management_group_subscription_association", id.ID()) + if props.Children != nil { + for _, v := range *props.Children { + if v.Type != nil && *v.Type == managementgroups.ManagementGroupChildTypeSubscriptions && v.Name != nil && strings.EqualFold(*v.Name, id.SubscriptionId) { + return tf.ImportAsExistsError("azurerm_management_group_subscription_association", id.ID()) + } } } } - if _, err := client.Create(ctx, id.ManagementGroup, id.SubscriptionId, ""); err != nil { + if _, err := client.SubscriptionsCreate(ctx, id, managementgroups.SubscriptionsCreateOperationOptions{}); err != nil { return fmt.Errorf("creating Management Group Subscription Association between %q and %q: %+v", managementGroupId.Name, subscriptionId, err) } @@ -109,54 +115,60 @@ func resourceManagementGroupSubscriptionAssociationRead(d *pluginsdk.ResourceDat ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.ManagementGroupSubscriptionAssociationID(d.Id()) + id, err := managementgroups.ParseSubscriptionID(d.Id()) if err != nil { return err } - managementGroup, err := client.Get(ctx, id.ManagementGroup, "children", utils.Bool(false), "", "") + managementGroup, err := client.Get(ctx, commonids.NewManagementGroupID(id.GroupId), managementgroups.GetOperationOptions{ + CacheControl: &managementGroupCacheControl, + Expand: pointer.To(managementgroups.ExpandChildren), + Recurse: pointer.FromBool(false), + }) if err != nil { - return fmt.Errorf("reading Management Group %q for Subscription Associations: %+v", id.ManagementGroup, err) + return fmt.Errorf("reading Management Group %q for Subscription Associations: %+v", id.GroupId, err) } found := false - if props := managementGroup.Properties; props != nil { - if props.Children != nil { - for _, v := range *props.Children { - if v.Type == managementgroups.Type1Subscriptions && v.Name != nil && strings.EqualFold(*v.Name, id.SubscriptionId) { - found = true + if model := managementGroup.Model; model != nil { + if props := model.Properties; props != nil { + if props.Children != nil { + for _, v := range *props.Children { + if v.Type != nil && *v.Type == managementgroups.ManagementGroupChildTypeSubscriptions && v.Name != nil && strings.EqualFold(*v.Name, id.SubscriptionId) { + found = true + } } } - } - if !found { - log.Printf("[INFO] Subscription %q not found in Management group %q, removing from state", id.SubscriptionId, id.ManagementGroup) - d.SetId("") - return nil - } + if !found { + log.Printf("[INFO] Subscription %q not found in Management group %q, removing from state", id.SubscriptionId, id.GroupId) + d.SetId("") + return nil + } - managementGroupId := parse.NewManagementGroupId(id.ManagementGroup) - d.Set("management_group_id", managementGroupId.ID()) - subscriptionId := commonids.NewSubscriptionID(id.SubscriptionId) - d.Set("subscription_id", subscriptionId.ID()) + managementGroupId := parse.NewManagementGroupId(id.GroupId) + d.Set("management_group_id", managementGroupId.ID()) + subscriptionId := commonids.NewSubscriptionID(id.SubscriptionId) + d.Set("subscription_id", subscriptionId.ID()) + } } return nil } func resourceManagementGroupSubscriptionAssociationDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).ManagementGroups.SubscriptionClient + client := meta.(*clients.Client).ManagementGroups.GroupsClient ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.ManagementGroupSubscriptionAssociationID(d.Id()) + id, err := managementgroups.ParseSubscriptionID(d.Id()) if err != nil { return err } - resp, err := client.Delete(ctx, id.ManagementGroup, id.SubscriptionId, "") + resp, err := client.SubscriptionsDelete(ctx, *id, managementgroups.SubscriptionsDeleteOperationOptions{}) if err != nil { - if !utils.ResponseWasNotFound(resp) { - return fmt.Errorf("deleting Management Group Subscription Association between Management Group %q and Subscription %q: %+v", id.ManagementGroup, id.SubscriptionId, err) + if !response.WasNotFound(resp.HttpResponse) { + return fmt.Errorf("deleting Management Group Subscription Association between Management Group %q and Subscription %q: %+v", id.GroupId, id.SubscriptionId, err) } } @@ -183,18 +195,24 @@ func resourceManagementGroupSubscriptionAssociationDelete(d *pluginsdk.ResourceD return nil } -func subscriptionAssociationRefreshFunc(ctx context.Context, client *managementgroups.Client, id parse.ManagementGroupSubscriptionAssociationId) pluginsdk.StateRefreshFunc { +func subscriptionAssociationRefreshFunc(ctx context.Context, client *managementgroups.ManagementGroupsClient, id managementgroups.SubscriptionId) pluginsdk.StateRefreshFunc { return func() (interface{}, string, error) { - managementGroup, err := client.Get(ctx, id.ManagementGroup, "children", utils.Bool(false), "", "") + managementGroup, err := client.Get(ctx, commonids.NewManagementGroupID(id.GroupId), managementgroups.GetOperationOptions{ + CacheControl: &managementGroupCacheControl, + Expand: pointer.To(managementgroups.ExpandChildren), + Recurse: pointer.FromBool(false), + }) if err != nil { - return nil, "", fmt.Errorf("reading Management Group %q for Subscription Associations: %+v", id.ManagementGroup, err) + return nil, "", fmt.Errorf("reading Management Group %q for Subscription Associations: %+v", id.GroupId, err) } - if props := managementGroup.Properties; props != nil && props.Children != nil { - for _, v := range *props.Children { - if v.Type == managementgroups.Type1Subscriptions { - if v.Name != nil && strings.EqualFold(*v.Name, id.SubscriptionId) { - return managementGroup, "Exists", nil + if model := managementGroup.Model; model != nil { + if props := model.Properties; props != nil && props.Children != nil { + for _, v := range *props.Children { + if v.Type != nil && *v.Type == managementgroups.ManagementGroupChildTypeSubscriptions { + if v.Name != nil && strings.EqualFold(*v.Name, id.SubscriptionId) { + return managementGroup, "Exists", nil + } } } } diff --git a/internal/services/managementgroup/subscription_association_resource_test.go b/internal/services/managementgroup/subscription_association_resource_test.go index 9172b325895b1..4f5b799ab927a 100644 --- a/internal/services/managementgroup/subscription_association_resource_test.go +++ b/internal/services/managementgroup/subscription_association_resource_test.go @@ -10,11 +10,12 @@ import ( "strings" "testing" - "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/managementgroup/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -109,23 +110,28 @@ resource "azurerm_management_group_subscription_association" "import" { } func (r ManagementGroupSubscriptionAssociation) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.ManagementGroupSubscriptionAssociationID(state.ID) + id, err := managementgroups.ParseSubscriptionID(state.ID) if err != nil { return nil, err } - resp, err := client.ManagementGroups.GroupsClient.Get(ctx, id.ManagementGroup, "children", utils.Bool(false), "", "no-cache") + resp, err := client.ManagementGroups.GroupsClient.Get(ctx, commonids.NewManagementGroupID(id.GroupId), managementgroups.GetOperationOptions{ + CacheControl: pointer.FromString("no-cache"), + Expand: pointer.To(managementgroups.ExpandChildren), + Recurse: pointer.FromBool(false), + }) + if err != nil { return nil, fmt.Errorf("retrieving Management Group to check for Subscription Association: %+v", err) } - if resp.Properties == nil || resp.Properties.Children == nil { + if resp.Model == nil || resp.Model.Properties == nil || resp.Model.Properties.Children == nil { return utils.Bool(false), nil } present := false - for _, v := range *resp.Children { - if v.Type == managementgroups.Type1Subscriptions && v.Name != nil && strings.EqualFold(*v.Name, id.SubscriptionId) { + for _, v := range *resp.Model.Properties.Children { + if v.Type != nil && *v.Type == managementgroups.ManagementGroupChildTypeSubscriptions && v.Name != nil && strings.EqualFold(*v.Name, id.SubscriptionId) { present = true } } diff --git a/internal/services/mariadb/client/client.go b/internal/services/mariadb/client/client.go deleted file mode 100644 index e0a199d264b9a..0000000000000 --- a/internal/services/mariadb/client/client.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package client - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations" - "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases" - "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules" - "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers" - "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules" - "github.com/hashicorp/terraform-provider-azurerm/internal/common" -) - -type Client struct { - ConfigurationsClient *configurations.ConfigurationsClient - DatabasesClient *databases.DatabasesClient - FirewallRulesClient *firewallrules.FirewallRulesClient - ServersClient *servers.ServersClient - VirtualNetworkRulesClient *virtualnetworkrules.VirtualNetworkRulesClient -} - -func NewClient(o *common.ClientOptions) (*Client, error) { - configurationsClient, err := configurations.NewConfigurationsClientWithBaseURI(o.Environment.ResourceManager) - if err != nil { - return nil, fmt.Errorf("building Configurations Client: %+v", err) - } - o.Configure(configurationsClient.Client, o.Authorizers.ResourceManager) - - databasesClient, err := databases.NewDatabasesClientWithBaseURI(o.Environment.ResourceManager) - if err != nil { - return nil, fmt.Errorf("building Databases Client: %+v", err) - } - o.Configure(databasesClient.Client, o.Authorizers.ResourceManager) - - firewallRulesClient, err := firewallrules.NewFirewallRulesClientWithBaseURI(o.Environment.ResourceManager) - if err != nil { - return nil, fmt.Errorf("building Firewall Rules Client: %+v", err) - } - o.Configure(firewallRulesClient.Client, o.Authorizers.ResourceManager) - - serversClient, err := servers.NewServersClientWithBaseURI(o.Environment.ResourceManager) - if err != nil { - return nil, fmt.Errorf("building Servers Client: %+v", err) - } - o.Configure(serversClient.Client, o.Authorizers.ResourceManager) - - virtualNetworkRulesClient, err := virtualnetworkrules.NewVirtualNetworkRulesClientWithBaseURI(o.Environment.ResourceManager) - if err != nil { - return nil, fmt.Errorf("building Virtual Network Rules Client: %+v", err) - } - o.Configure(virtualNetworkRulesClient.Client, o.Authorizers.ResourceManager) - - return &Client{ - ConfigurationsClient: configurationsClient, - DatabasesClient: databasesClient, - FirewallRulesClient: firewallRulesClient, - ServersClient: serversClient, - VirtualNetworkRulesClient: virtualNetworkRulesClient, - }, nil -} diff --git a/internal/services/mariadb/mariadb_configuration_resource.go b/internal/services/mariadb/mariadb_configuration_resource.go deleted file mode 100644 index 1228de9eb4b2f..0000000000000 --- a/internal/services/mariadb/mariadb_configuration_resource.go +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package mariadb - -import ( - "fmt" - "log" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceMariaDbConfiguration() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceMariaDbConfigurationCreate, - Read: resourceMariaDbConfigurationRead, - Delete: resourceMariaDbConfigurationDelete, - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := configurations.ParseConfigurationID(id) - return err - }), - - DeprecationMessage: "Azure Database for MariaDB and its sub resources are scheduled for retirement by 2024-09-19 and will migrate to using Azure Database for MySQL Flexible Server: https://learn.microsoft.com/en-us/azure/mariadb/whats-happening-to-mariadb. The `azurerm_mariadb_configuration` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `azurerm_mysql_flexible_server_configuration` resource instead.", - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - - "resource_group_name": commonschema.ResourceGroupName(), - - "server_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.ServerName, - }, - - "value": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceMariaDbConfigurationCreate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).MariaDB.ConfigurationsClient - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := configurations.NewConfigurationID(subscriptionId, d.Get("resource_group_name").(string), d.Get("server_name").(string), d.Get("name").(string)) - value := d.Get("value").(string) - - properties := configurations.Configuration{ - Properties: &configurations.ConfigurationProperties{ - Value: utils.String(value), - }, - } - - if err := client.CreateOrUpdateThenPoll(ctx, id, properties); err != nil { - return fmt.Errorf("creating/updating %s: %+v", id, err) - } - - d.SetId(id.ID()) - - return resourceMariaDbConfigurationRead(d, meta) -} - -func resourceMariaDbConfigurationRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).MariaDB.ConfigurationsClient - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := configurations.ParseConfigurationID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - log.Printf("[WARN] %s was not found", *id) - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.ConfigurationName) - d.Set("server_name", id.ServerName) - d.Set("resource_group_name", id.ResourceGroupName) - - if model := resp.Model; model != nil { - if props := model.Properties; props != nil { - value := "" - if v := props.Value; v != nil { - value = *v - } - d.Set("value", value) - } - } - - return nil -} - -func resourceMariaDbConfigurationDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).MariaDB.ConfigurationsClient - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := configurations.ParseConfigurationID(d.Id()) - if err != nil { - return err - } - - // "delete" = resetting this to the default value - resp, err := client.Get(ctx, *id) - if err != nil { - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - defaultValue := "" - - if model := resp.Model; model != nil { - if props := model.Properties; props != nil { - if v := props.DefaultValue; v != nil { - defaultValue = *v - } - } - } - - properties := configurations.Configuration{ - Properties: &configurations.ConfigurationProperties{ - // we can alternatively set `source: "system-default"` - Value: &defaultValue, - }, - } - - if err := client.CreateOrUpdateThenPoll(ctx, *id, properties); err != nil { - return fmt.Errorf("deleting %s: %+v", id, err) - } - - return nil -} diff --git a/internal/services/mariadb/mariadb_configuration_resource_test.go b/internal/services/mariadb/mariadb_configuration_resource_test.go deleted file mode 100644 index 983880b0f57f5..0000000000000 --- a/internal/services/mariadb/mariadb_configuration_resource_test.go +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package mariadb_test - -import ( - "context" - "fmt" - "testing" - "time" - - "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations" - "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type MariaDbConfigurationResource struct{} - -func TestAccMariaDbConfiguration_characterSetServer(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_mariadb_configuration` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - srv := acceptance.BuildTestData(t, "azurerm_mariadb_server", "test") - data := acceptance.BuildTestData(t, "azurerm_mariadb_configuration", "test") - r := MariaDbConfigurationResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.characterSetServer(data), - Check: acceptance.ComposeTestCheckFunc( - data.CheckWithClient(checkValueIs("hebrew")), - ), - }, - data.ImportStep(), - { - Config: r.empty(data), - Check: acceptance.ComposeTestCheckFunc( - // "delete" resets back to the default value - srv.CheckWithClient(checkValueIsReset("character_set_server")), - ), - }, - }) -} - -func TestAccMariaDbConfiguration_interactiveTimeout(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_mariadb_configuration` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - srv := acceptance.BuildTestData(t, "azurerm_mariadb_server", "test") - data := acceptance.BuildTestData(t, "azurerm_mariadb_configuration", "test") - r := MariaDbConfigurationResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.interactiveTimeout(data), - Check: acceptance.ComposeTestCheckFunc( - data.CheckWithClient(checkValueIs("30")), - ), - }, - data.ImportStep(), - { - Config: r.empty(data), - Check: acceptance.ComposeTestCheckFunc( - // "delete" resets back to the default value - srv.CheckWithClient(checkValueIsReset("interactive_timeout")), - ), - }, - }) -} - -func TestAccMariaDbConfiguration_logSlowAdminStatements(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_mariadb_configuration` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - srv := acceptance.BuildTestData(t, "azurerm_mariadb_server", "test") - data := acceptance.BuildTestData(t, "azurerm_mariadb_configuration", "test") - r := MariaDbConfigurationResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.logSlowAdminStatements(data), - Check: acceptance.ComposeTestCheckFunc( - data.CheckWithClient(checkValueIs("On")), - ), - }, - data.ImportStep(), - { - Config: r.empty(data), - Check: acceptance.ComposeTestCheckFunc( - // "delete" resets back to the default value - srv.CheckWithClient(checkValueIsReset("log_slow_admin_statements")), - ), - }, - }) -} - -func (MariaDbConfigurationResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := configurations.ParseConfigurationID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.MariaDB.ConfigurationsClient.Get(ctx, *id) - if err != nil { - return nil, fmt.Errorf("retrieving %s: %v", *id, err) - } - - return utils.Bool(resp.Model != nil), nil -} - -func checkValueIs(value string) acceptance.ClientCheckFunc { - return func(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) error { - id, err := configurations.ParseConfigurationID(state.ID) - if err != nil { - return err - } - - timeout, cancel := context.WithTimeout(ctx, 5*time.Minute) - defer cancel() - - resp, err := clients.MariaDB.ConfigurationsClient.Get(timeout, *id) - if err != nil { - return fmt.Errorf("retrieving %s: %v", *id, err) - } - - if model := resp.Model; model != nil { - if props := model.Properties; props != nil { - if v := props.Value; v != nil { - if value != *v { - return fmt.Errorf("%s Value (%s) != expected (%s)", *id, *v, value) - } - } else { - return fmt.Errorf("%s Value is nil", *id) - } - } - } - - return nil - } -} - -func checkValueIsReset(configurationName string) acceptance.ClientCheckFunc { - return func(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) error { - serverId, err := servers.ParseServerID(state.ID) - if err != nil { - return err - } - - id := configurations.NewConfigurationID(serverId.SubscriptionId, serverId.ResourceGroupName, serverId.ServerName, configurationName) - - timeout, cancel := context.WithTimeout(ctx, 5*time.Minute) - defer cancel() - - resp, err := clients.MariaDB.ConfigurationsClient.Get(timeout, id) - if err != nil { - return fmt.Errorf("retrieving %s: %v", id, err) - } - - actualValue := "" - defaultValue := "" - if model := resp.Model; model != nil { - if props := model.Properties; props != nil { - if v := props.Value; v != nil { - actualValue = *v - } - if v := props.DefaultValue; v != nil { - defaultValue = *v - } - } - } - - if actualValue == "" { - return fmt.Errorf("%s Value is nil", id) - } - - if defaultValue == "" { - return fmt.Errorf("%s Default Value is nil", id) - } - - if defaultValue != actualValue { - return fmt.Errorf("%s Value (%s) != Default (%s)", id, actualValue, defaultValue) - } - - return nil - } -} - -func (r MariaDbConfigurationResource) characterSetServer(data acceptance.TestData) string { - return r.template(data, "character_set_server", "hebrew") -} - -func (r MariaDbConfigurationResource) interactiveTimeout(data acceptance.TestData) string { - return r.template(data, "interactive_timeout", "30") -} - -func (r MariaDbConfigurationResource) logSlowAdminStatements(data acceptance.TestData) string { - return r.template(data, "log_slow_admin_statements", "On") -} - -func (r MariaDbConfigurationResource) template(data acceptance.TestData, name string, value string) string { - server := r.empty(data) - config := fmt.Sprintf(` -resource "azurerm_mariadb_configuration" "test" { - name = "%s" - resource_group_name = "${azurerm_resource_group.test.name}" - server_name = "${azurerm_mariadb_server.test.name}" - value = "%s" -} -`, name, value) - return server + config -} - -func (MariaDbConfigurationResource) empty(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_mariadb_server" "test" { - name = "acctestmariadbsvr-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - sku_name = "GP_Gen5_2" - version = "10.2" - - administrator_login = "acctestun" - administrator_login_password = "H@Sh1CoR3!" - backup_retention_days = 7 - geo_redundant_backup_enabled = false - ssl_enforcement_enabled = true - storage_mb = 51200 -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger) -} diff --git a/internal/services/mariadb/mariadb_database_resource.go b/internal/services/mariadb/mariadb_database_resource.go deleted file mode 100644 index d818aa8fbab17..0000000000000 --- a/internal/services/mariadb/mariadb_database_resource.go +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package mariadb - -import ( - "fmt" - "log" - "regexp" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceMariaDbDatabase() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceMariaDbDatabaseCreate, - Read: resourceMariaDbDatabaseRead, - Delete: resourceMariaDbDatabaseDelete, - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := databases.ParseDatabaseID(id) - return err - }), - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(60 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Delete: pluginsdk.DefaultTimeout(60 * time.Minute), - }, - - DeprecationMessage: "Azure Database for MariaDB and its sub resources are scheduled for retirement by 2024-09-19 and will migrate to using Azure Database for MySQL Flexible Server: https://learn.microsoft.com/en-us/azure/mariadb/whats-happening-to-mariadb. The `azurerm_mariadb_database` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `azurerm_mysql_flexible_database` resource instead.", - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile("^[_a-zA-Z0-9]{1,64}$"), - "name must be 1 - 64 characters long, and contain only letters, numbers and underscores", - ), - }, - - "resource_group_name": commonschema.ResourceGroupName(), - - "server_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.ServerName, - }, - - "charset": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile("^[a-z0-9]{3,8}$"), - "charset must be 3 - 8 characters long, and contain only lowercase letters and numbers", - ), - }, - - "collation": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile("^[A-Za-z0-9_. ]+$"), - "collation must contain only alphanumeric, underscore, space and dot characters", - ), - }, - }, - } -} - -func resourceMariaDbDatabaseCreate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).MariaDB.DatabasesClient - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - log.Printf("[INFO] preparing arguments for AzureRM MariaDB database creation") - - id := databases.NewDatabaseID(subscriptionId, d.Get("resource_group_name").(string), d.Get("server_name").(string), d.Get("name").(string)) - - if d.IsNewResource() { - existing, err := client.Get(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for presence of existing %s: %s", id, err) - } - } - - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_mariadb_database", id.ID()) - } - } - - charset := d.Get("charset").(string) - collation := d.Get("collation").(string) - - properties := databases.Database{ - Properties: &databases.DatabaseProperties{ - Charset: utils.String(charset), - Collation: utils.String(collation), - }, - } - - if err := client.CreateOrUpdateThenPoll(ctx, id, properties); err != nil { - return fmt.Errorf("creating %s: %+v", id, err) - } - - d.SetId(id.ID()) - - return resourceMariaDbDatabaseRead(d, meta) -} - -func resourceMariaDbDatabaseRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).MariaDB.DatabasesClient - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := databases.ParseDatabaseID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - log.Printf("[WARN] %s was not found", *id) - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.DatabaseName) - d.Set("resource_group_name", id.ResourceGroupName) - d.Set("server_name", id.ServerName) - - charset := "" - collation := "" - - if model := resp.Model; model != nil { - if props := model.Properties; props != nil { - if v := props.Charset; v != nil { - charset = *v - } - if v := props.Collation; v != nil { - collation = *v - } - } - } - - d.Set("charset", charset) - d.Set("collation", collation) - - return nil -} - -func resourceMariaDbDatabaseDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).MariaDB.DatabasesClient - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := databases.ParseDatabaseID(d.Id()) - if err != nil { - return err - } - - if err := client.DeleteThenPoll(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - - return nil -} diff --git a/internal/services/mariadb/mariadb_database_resource_test.go b/internal/services/mariadb/mariadb_database_resource_test.go deleted file mode 100644 index 96bb0fbcd82f4..0000000000000 --- a/internal/services/mariadb/mariadb_database_resource_test.go +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package mariadb_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type MariaDbDatabaseResource struct{} - -func TestAccMariaDbDatabase_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_mariadb_database` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_mariadb_database", "test") - r := MariaDbDatabaseResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("charset").HasValue("utf8"), - check.That(data.ResourceName).Key("collation").HasValue("utf8_general_ci"), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMariaDbDatabase_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_mariadb_database` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_mariadb_database", "test") - r := MariaDbDatabaseResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - { - Config: r.requiresImport(data), - ExpectError: acceptance.RequiresImportError("azurerm_mariadb_database"), - }, - }) -} - -func (MariaDbDatabaseResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := databases.ParseDatabaseID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.MariaDB.DatabasesClient.Get(ctx, *id) - if err != nil { - return nil, fmt.Errorf("retrieving %s: %v", *id, err) - } - - return utils.Bool(resp.Model != nil), nil -} - -func (MariaDbDatabaseResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = %q -} - -resource "azurerm_mariadb_server" "test" { - name = "acctestmariadbsvr-%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - sku_name = "B_Gen5_2" - - storage_mb = 51200 - geo_redundant_backup_enabled = false - backup_retention_days = 7 - - administrator_login = "acctestun" - administrator_login_password = "H@Sh1CoR3!" - version = "10.2" - ssl_enforcement_enabled = true -} - -resource "azurerm_mariadb_database" "test" { - name = "acctestmariadb_%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_mariadb_server.test.name - charset = "utf8" - collation = "utf8_general_ci" -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger) -} - -func (r MariaDbDatabaseResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_mariadb_database" "import" { - name = azurerm_mariadb_database.test.name - resource_group_name = azurerm_mariadb_database.test.resource_group_name - server_name = azurerm_mariadb_database.test.server_name - charset = azurerm_mariadb_database.test.charset - collation = azurerm_mariadb_database.test.collation -} -`, r.basic(data)) -} diff --git a/internal/services/mariadb/mariadb_firewall_rule_resource.go b/internal/services/mariadb/mariadb_firewall_rule_resource.go deleted file mode 100644 index 95353c32aca71..0000000000000 --- a/internal/services/mariadb/mariadb_firewall_rule_resource.go +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package mariadb - -import ( - "fmt" - "log" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - azValidate "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" -) - -func resourceArmMariaDBFirewallRule() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceArmMariaDBFirewallRuleCreateUpdate, - Read: resourceArmMariaDBFirewallRuleRead, - Update: resourceArmMariaDBFirewallRuleCreateUpdate, - Delete: resourceArmMariaDBFirewallRuleDelete, - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := firewallrules.ParseFirewallRuleID(id) - return err - }), - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - DeprecationMessage: "Azure Database for MariaDB and its sub resources are scheduled for retirement by 2024-09-19 and will migrate to using Azure Database for MySQL Flexible Server: https://learn.microsoft.com/en-us/azure/mariadb/whats-happening-to-mariadb. The `azurerm_mariadb_firewall_rule` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `azurerm_mysql_flexible_server_firewall_rule` resource instead.", - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.FirewallRuleName, - }, - - "resource_group_name": commonschema.ResourceGroupName(), - - "server_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.ServerName, - }, - - "start_ip_address": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: azValidate.IPv4Address, - }, - - "end_ip_address": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: azValidate.IPv4Address, - }, - }, - } -} - -func resourceArmMariaDBFirewallRuleCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).MariaDB.FirewallRulesClient - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - log.Printf("[INFO] preparing arguments for AzureRM MariaDB Firewall Rule creation.") - - id := firewallrules.NewFirewallRuleID(subscriptionId, d.Get("resource_group_name").(string), d.Get("server_name").(string), d.Get("name").(string)) - startIPAddress := d.Get("start_ip_address").(string) - endIPAddress := d.Get("end_ip_address").(string) - - if d.IsNewResource() { - existing, err := client.Get(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for presence of existing %s: %v", id, err) - } - } - - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_mariadb_firewall_rule", id.ID()) - } - } - - properties := firewallrules.FirewallRule{ - Properties: firewallrules.FirewallRuleProperties{ - StartIPAddress: startIPAddress, - EndIPAddress: endIPAddress, - }, - } - - if err := client.CreateOrUpdateThenPoll(ctx, id, properties); err != nil { - return fmt.Errorf("creating/updated %s: %v", id, err) - } - - d.SetId(id.ID()) - - return resourceArmMariaDBFirewallRuleRead(d, meta) -} - -func resourceArmMariaDBFirewallRuleRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).MariaDB.FirewallRulesClient - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := firewallrules.ParseFirewallRuleID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - d.SetId("") - return nil - } - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.FirewallRuleName) - d.Set("resource_group_name", id.ResourceGroupName) - d.Set("server_name", id.ServerName) - - if model := resp.Model; model != nil { - d.Set("start_ip_address", model.Properties.StartIPAddress) - d.Set("end_ip_address", model.Properties.EndIPAddress) - } - - return nil -} - -func resourceArmMariaDBFirewallRuleDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).MariaDB.FirewallRulesClient - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := firewallrules.ParseFirewallRuleID(d.Id()) - if err != nil { - return err - } - - if err := client.DeleteThenPoll(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - - return nil -} diff --git a/internal/services/mariadb/mariadb_firewall_rule_resource_test.go b/internal/services/mariadb/mariadb_firewall_rule_resource_test.go deleted file mode 100644 index 3abb28508a147..0000000000000 --- a/internal/services/mariadb/mariadb_firewall_rule_resource_test.go +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package mariadb_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type MariaDbFirewallRuleResource struct{} - -func TestAccMariaDbFirewallRule_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_mariadb_firewall_rule` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_mariadb_firewall_rule", "test") - r := MariaDbFirewallRuleResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMariaDbFirewallRule_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_mariadb_firewall_rule` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_mariadb_firewall_rule", "test") - r := MariaDbFirewallRuleResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - { - Config: r.requiresImport(data), - ExpectError: acceptance.RequiresImportError("azurerm_mariadb_firewall_rule"), - }, - }) -} - -func (MariaDbFirewallRuleResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := firewallrules.ParseFirewallRuleID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.MariaDB.FirewallRulesClient.Get(ctx, *id) - if err != nil { - return nil, fmt.Errorf("retrieving %s: %v", *id, err) - } - - return utils.Bool(resp.Model != nil), nil -} - -func (MariaDbFirewallRuleResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_mariadb_server" "test" { - name = "acctestmariadbsvr-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - - sku_name = "GP_Gen5_2" - - storage_mb = 51200 - geo_redundant_backup_enabled = false - backup_retention_days = 7 - - - administrator_login = "acctestun" - administrator_login_password = "H@Sh1CoR3!" - version = "10.2" - ssl_enforcement_enabled = true -} - -resource "azurerm_mariadb_firewall_rule" "test" { - name = "acctestFWRule_01-%d" - resource_group_name = "${azurerm_resource_group.test.name}" - server_name = "${azurerm_mariadb_server.test.name}" - start_ip_address = "0.0.0.0" - end_ip_address = "255.255.255.255" -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger) -} - -func (r MariaDbFirewallRuleResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_mariadb_firewall_rule" "import" { - name = azurerm_mariadb_firewall_rule.test.name - resource_group_name = azurerm_mariadb_firewall_rule.test.resource_group_name - server_name = azurerm_mariadb_firewall_rule.test.server_name - start_ip_address = azurerm_mariadb_firewall_rule.test.start_ip_address - end_ip_address = azurerm_mariadb_firewall_rule.test.end_ip_address -} -`, r.basic(data)) -} diff --git a/internal/services/mariadb/mariadb_server_data_source.go b/internal/services/mariadb/mariadb_server_data_source.go deleted file mode 100644 index 57899d5e3a75f..0000000000000 --- a/internal/services/mariadb/mariadb_server_data_source.go +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package mariadb - -import ( - "fmt" - "regexp" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" -) - -func dataSourceMariaDbServer() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Read: dataSourceMariaDbServerRead, - - Timeouts: &pluginsdk.ResourceTimeout{ - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - }, - - DeprecationMessage: "Azure Database for MariaDB and its sub resources are scheduled for retirement by 2024-09-19 and will migrate to using Azure Database for MySQL Flexible Server: https://learn.microsoft.com/en-us/azure/mariadb/whats-happening-to-mariadb. The `azurerm_mariadb_server` data source is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `azurerm_mysql_flexible_server` data source instead.", - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile("^[-a-zA-Z0-9]{3,50}$"), - "MariaDB server name must be 3 - 50 characters long, contain only letters, numbers and hyphens.", - ), - }, - - "location": commonschema.LocationComputed(), - - "resource_group_name": commonschema.ResourceGroupNameForDataSource(), - - "sku_name": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "administrator_login": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "version": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "storage_profile": { - Type: pluginsdk.TypeList, - Computed: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "storage_mb": { - Type: pluginsdk.TypeInt, - Computed: true, - }, - - "backup_retention_days": { - Type: pluginsdk.TypeInt, - Computed: true, - }, - - "geo_redundant_backup": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "auto_grow": { - Type: pluginsdk.TypeString, - Computed: true, - }, - }, - }, - }, - - "ssl_enforcement": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "fqdn": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "tags": commonschema.TagsDataSource(), - }, - } -} - -func dataSourceMariaDbServerRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).MariaDB.ServersClient - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := servers.NewServerID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) - resp, err := client.Get(ctx, id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return fmt.Errorf("%s was not found", id) - } - - return fmt.Errorf("retrieving %s: %+v", id, err) - } - - d.SetId(id.ID()) - d.Set("name", id.ServerName) - d.Set("resource_group_name", id.ResourceGroupName) - - if model := resp.Model; model != nil { - d.Set("location", location.Normalize(model.Location)) - - if sku := model.Sku; sku != nil { - d.Set("sku_name", sku.Name) - } - - if props := model.Properties; props != nil { - adminLogin := "" - if v := props.AdministratorLogin; v != nil { - adminLogin = *v - } - - fqdn := "" - if v := props.FullyQualifiedDomainName; v != nil { - fqdn = *v - } - - sslEnforcement := "" - if v := props.SslEnforcement; v != nil { - sslEnforcement = string(*v) - } - - version := "" - if v := props.Version; v != nil { - version = string(*v) - } - - d.Set("administrator_login", adminLogin) - d.Set("fqdn", fqdn) - d.Set("ssl_enforcement", sslEnforcement) - d.Set("version", version) - } - - return tags.FlattenAndSet(d, model.Tags) - } - - return nil -} diff --git a/internal/services/mariadb/mariadb_server_data_source_test.go b/internal/services/mariadb/mariadb_server_data_source_test.go deleted file mode 100644 index b185ffb6349c8..0000000000000 --- a/internal/services/mariadb/mariadb_server_data_source_test.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package mariadb_test - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" -) - -type MariaDbServerDataSource struct{} - -func TestAccMariaDbServerDataSource_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `data.azurerm_mariadb_server` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "data.azurerm_mariadb_server", "test") - r := MariaDbServerDataSource{} - - data.DataSourceTest(t, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).Key("administrator_login").HasValue("acctestun"), - check.That(data.ResourceName).Key("version").HasValue("10.2"), - check.That(data.ResourceName).Key("ssl_enforcement").HasValue("Enabled"), - ), - }, - }) -} - -func (MariaDbServerDataSource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-maria-%d" - location = "%s" -} - -resource "azurerm_mariadb_server" "test" { - name = "acctestmariadbsvr-%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - sku_name = "B_Gen5_2" - - storage_mb = 51200 - backup_retention_days = 7 - geo_redundant_backup_enabled = false - - administrator_login = "acctestun" - administrator_login_password = "H@Sh1CoR3!" - version = "10.2" - ssl_enforcement_enabled = true -} - -data "azurerm_mariadb_server" "test" { - name = azurerm_mariadb_server.test.name - resource_group_name = azurerm_resource_group.test.name -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger) -} diff --git a/internal/services/mariadb/mariadb_server_resource.go b/internal/services/mariadb/mariadb_server_resource.go deleted file mode 100644 index 1238696a1c2ef..0000000000000 --- a/internal/services/mariadb/mariadb_server_resource.go +++ /dev/null @@ -1,517 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package mariadb - -import ( - "context" - "fmt" - "log" - "strconv" - "strings" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceMariaDbServer() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceMariaDbServerCreate, - Read: resourceMariaDbServerRead, - Update: resourceMariaDbServerUpdate, - Delete: resourceMariaDbServerDelete, - - Importer: pluginsdk.ImporterValidatingResourceIdThen(func(id string) error { - _, err := servers.ParseServerID(id) - return err - }, func(ctx context.Context, d *pluginsdk.ResourceData, meta interface{}) ([]*pluginsdk.ResourceData, error) { - d.Set("create_mode", "Default") - if v, ok := d.GetOk("create_mode"); ok && v.(string) != "" { - d.Set("create_mode", v) - } - - return []*pluginsdk.ResourceData{d}, nil - }), - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(90 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(60 * time.Minute), - Delete: pluginsdk.DefaultTimeout(60 * time.Minute), - }, - - DeprecationMessage: "Azure Database for MariaDB and its sub resources are scheduled for retirement by 2024-09-19 and will migrate to using Azure Database for MySQL Flexible Server: https://learn.microsoft.com/en-us/azure/mariadb/whats-happening-to-mariadb. The `azurerm_mariadb_server` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `azurerm_mysql_flexible_server` resource instead.", - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.ServerName, - }, - - "administrator_login": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "administrator_login_password": { - Type: pluginsdk.TypeString, - Optional: true, - Sensitive: true, - }, - - "auto_grow_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: true, - }, - - "backup_retention_days": { - Type: pluginsdk.TypeInt, - Optional: true, - Computed: true, - ValidateFunc: validation.IntBetween(7, 35), - }, - - "create_mode": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(servers.CreateModeDefault), - ValidateFunc: validation.StringInSlice([]string{ - string(servers.CreateModeDefault), - string(servers.CreateModeGeoRestore), - string(servers.CreateModePointInTimeRestore), - string(servers.CreateModeReplica), - }, false), - }, - - "creation_source_server_id": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: servers.ValidateServerID, - }, - - "fqdn": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "geo_redundant_backup_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - Computed: true, - }, - - "location": commonschema.Location(), - - "public_network_access_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: true, - }, - - "resource_group_name": commonschema.ResourceGroupName(), - - "restore_point_in_time": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.IsRFC3339Time, - }, - - "sku_name": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - "B_Gen5_1", - "B_Gen5_2", - "GP_Gen5_2", - "GP_Gen5_4", - "GP_Gen5_8", - "GP_Gen5_16", - "GP_Gen5_32", - "MO_Gen5_2", - "MO_Gen5_4", - "MO_Gen5_8", - "MO_Gen5_16", - }, false), - }, - - "ssl_enforcement_enabled": { - Type: pluginsdk.TypeBool, - Required: true, - }, - - "storage_mb": { - Type: pluginsdk.TypeInt, - Optional: true, - Computed: true, - ValidateFunc: validation.All( - validation.IntBetween(5120, 4194304), - validation.IntDivisibleBy(1024), - ), - }, - "ssl_minimal_tls_version_enforced": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(servers.MinimalTlsVersionEnumTLSOneTwo), - ValidateFunc: validation.StringInSlice(servers.PossibleValuesForMinimalTlsVersionEnum(), false), - }, - "tags": commonschema.Tags(), - - "version": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - "10.2", - "10.3", - }, false), - }, - }, - } -} - -func resourceMariaDbServerCreate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).MariaDB.ServersClient - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := servers.NewServerID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) - if d.IsNewResource() { - existing, err := client.Get(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for presence of existing %s: %+v", id, err) - } - } - - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_mariadb_server", id.ID()) - } - } - - location := azure.NormalizeLocation(d.Get("location").(string)) - mode := servers.CreateMode(d.Get("create_mode").(string)) - source := d.Get("creation_source_server_id").(string) - version := servers.ServerVersion(d.Get("version").(string)) - - sku, err := expandServerSkuName(d.Get("sku_name").(string)) - if err != nil { - return fmt.Errorf("expanding `sku_name`: %+v", err) - } - - publicAccess := servers.PublicNetworkAccessEnumEnabled - if v := d.Get("public_network_access_enabled"); !v.(bool) { - publicAccess = servers.PublicNetworkAccessEnumDisabled - } - - ssl := servers.SslEnforcementEnumEnabled - if v := d.Get("ssl_enforcement_enabled").(bool); !v { - ssl = servers.SslEnforcementEnumDisabled - } - - tlsMin := servers.MinimalTlsVersionEnum(d.Get("ssl_minimal_tls_version_enforced").(string)) - if ssl == servers.SslEnforcementEnumDisabled && tlsMin != servers.MinimalTlsVersionEnumTLSEnforcementDisabled { - return fmt.Errorf("`ssl_minimal_tls_version_enforced` must be set to `TLSEnforcementDisabled` if `ssl_enforcement_enabled` is set to `false`") - } - - storage := expandMariaDbStorageProfile(d) - - var props servers.ServerPropertiesForCreate - switch mode { - case servers.CreateModeDefault: - admin := d.Get("administrator_login").(string) - pass := d.Get("administrator_login_password").(string) - - if admin == "" { - return fmt.Errorf("`administrator_login` must not be empty when `create_mode` is `default`") - } - if pass == "" { - return fmt.Errorf("`administrator_login_password` must not be empty when `create_mode` is `default`") - } - - if _, ok := d.GetOk("restore_point_in_time"); ok { - return fmt.Errorf("`restore_point_in_time` cannot be set when `create_mode` is `default`") - } - - props = servers.ServerPropertiesForDefaultCreate{ - AdministratorLogin: admin, - AdministratorLoginPassword: pass, - PublicNetworkAccess: &publicAccess, - MinimalTlsVersion: &tlsMin, - SslEnforcement: &ssl, - StorageProfile: storage, - Version: &version, - } - - case servers.CreateModePointInTimeRestore: - v, ok := d.GetOk("restore_point_in_time") - if !ok || v.(string) == "" { - return fmt.Errorf("restore_point_in_time must be set when create_mode is PointInTimeRestore") - } - - props = &servers.ServerPropertiesForRestore{ - SourceServerId: source, - RestorePointInTime: v.(string), - PublicNetworkAccess: &publicAccess, - SslEnforcement: &ssl, - StorageProfile: storage, - Version: &version, - } - case servers.CreateModeGeoRestore: - props = &servers.ServerPropertiesForGeoRestore{ - SourceServerId: source, - PublicNetworkAccess: &publicAccess, - SslEnforcement: &ssl, - StorageProfile: storage, - Version: &version, - } - case servers.CreateModeReplica: - props = &servers.ServerPropertiesForReplica{ - SourceServerId: source, - PublicNetworkAccess: &publicAccess, - SslEnforcement: &ssl, - Version: &version, - } - } - - server := servers.ServerForCreate{ - Location: location, - Properties: props, - Sku: sku, - Tags: tags.Expand(d.Get("tags").(map[string]interface{})), - } - - if err := client.CreateThenPoll(ctx, id, server); err != nil { - return fmt.Errorf("creating %s: %+v", id, err) - } - - d.SetId(id.ID()) - return resourceMariaDbServerRead(d, meta) -} - -func resourceMariaDbServerUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).MariaDB.ServersClient - ctx, cancel := timeouts.ForUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - log.Printf("[INFO] preparing arguments for AzureRM MariaDB Server update.") - - id, err := servers.ParseServerID(d.Id()) - if err != nil { - return err - } - - sku, err := expandServerSkuName(d.Get("sku_name").(string)) - if err != nil { - return fmt.Errorf("expanding `sku_name`: %+v", err) - } - - publicAccess := servers.PublicNetworkAccessEnumEnabled - if v := d.Get("public_network_access_enabled").(bool); !v { - publicAccess = servers.PublicNetworkAccessEnumDisabled - } - - ssl := servers.SslEnforcementEnumEnabled - if v := d.Get("ssl_enforcement_enabled").(bool); !v { - ssl = servers.SslEnforcementEnumDisabled - } - - tlsMin := servers.MinimalTlsVersionEnum(d.Get("ssl_minimal_tls_version_enforced").(string)) - - if ssl == servers.SslEnforcementEnumDisabled && tlsMin != servers.MinimalTlsVersionEnumTLSEnforcementDisabled { - return fmt.Errorf("`ssl_minimal_tls_version_enforced` must be set to `TLSEnforcementDisabled` if `ssl_enforcement_enabled` is set to `false`") - } - - storageProfile := expandMariaDbStorageProfile(d) - serverVersion := servers.ServerVersion(d.Get("version").(string)) - properties := servers.ServerUpdateParameters{ - Properties: &servers.ServerUpdateParametersProperties{ - AdministratorLoginPassword: utils.String(d.Get("administrator_login_password").(string)), - PublicNetworkAccess: &publicAccess, - MinimalTlsVersion: &tlsMin, - SslEnforcement: &ssl, - StorageProfile: storageProfile, - Version: &serverVersion, - }, - Sku: sku, - Tags: tags.Expand(d.Get("tags").(map[string]interface{})), - } - - if err := client.UpdateThenPoll(ctx, *id, properties); err != nil { - return fmt.Errorf("updating %s: %+v", *id, err) - } - - return resourceMariaDbServerRead(d, meta) -} - -func resourceMariaDbServerRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).MariaDB.ServersClient - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := servers.ParseServerID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - log.Printf("[WARN] %s was not found - removing from state", *id) - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.ServerName) - d.Set("resource_group_name", id.ResourceGroupName) - - if model := resp.Model; model != nil { - d.Set("location", azure.NormalizeLocation(model.Location)) - - if sku := model.Sku; sku != nil { - d.Set("sku_name", sku.Name) - } - - if props := model.Properties; props != nil { - d.Set("administrator_login", props.AdministratorLogin) - d.Set("ssl_minimal_tls_version_enforced", string(pointer.From(props.MinimalTlsVersion))) - - publicNetworkAccess := false - if props.PublicNetworkAccess != nil { - publicNetworkAccess = *props.PublicNetworkAccess == servers.PublicNetworkAccessEnumEnabled - } - d.Set("public_network_access_enabled", publicNetworkAccess) - - sslEnforcement := false - if props.SslEnforcement != nil { - sslEnforcement = *props.SslEnforcement == servers.SslEnforcementEnumEnabled - } - d.Set("ssl_enforcement_enabled", sslEnforcement) - - version := "" - if props.Version != nil { - version = string(*props.Version) - } - d.Set("version", version) - - if storage := props.StorageProfile; storage != nil { - autoGrow := false - if storage.StorageAutogrow != nil { - autoGrow = *storage.StorageAutogrow == servers.StorageAutogrowEnabled - } - d.Set("auto_grow_enabled", autoGrow) - - geoRedundant := false - if storage.GeoRedundantBackup != nil { - geoRedundant = *storage.GeoRedundantBackup == servers.GeoRedundantBackupEnabled - } - d.Set("geo_redundant_backup_enabled", geoRedundant) - d.Set("backup_retention_days", storage.BackupRetentionDays) - d.Set("storage_mb", storage.StorageMB) - } - - // Computed - d.Set("fqdn", props.FullyQualifiedDomainName) - } - return tags.FlattenAndSet(d, model.Tags) - } - return nil -} - -func resourceMariaDbServerDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).MariaDB.ServersClient - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := servers.ParseServerID(d.Id()) - if err != nil { - return err - } - - if err := client.DeleteThenPoll(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - - return nil -} - -func expandServerSkuName(skuName string) (*servers.Sku, error) { - parts := strings.Split(skuName, "_") - if len(parts) != 3 { - return nil, fmt.Errorf("sku_name (%s) has the wrong number of parts (%d) after splitting on _", skuName, len(parts)) - } - - var tier servers.SkuTier - switch parts[0] { - case "B": - tier = servers.SkuTierBasic - case "GP": - tier = servers.SkuTierGeneralPurpose - case "MO": - tier = servers.SkuTierMemoryOptimized - default: - return nil, fmt.Errorf("sku_name %s has unknown sku tier %s", skuName, parts[0]) - } - - capacity, err := strconv.Atoi(parts[2]) - if err != nil { - return nil, fmt.Errorf("cannot convert `sku_name` %q capacity %s to int", skuName, parts[2]) - } - - return &servers.Sku{ - Name: skuName, - Tier: &tier, - Capacity: utils.Int64(int64(capacity)), - Family: utils.String(parts[1]), - }, nil -} - -func expandMariaDbStorageProfile(d *pluginsdk.ResourceData) *servers.StorageProfile { - storage := servers.StorageProfile{} - // now override whatever we may have from the block with the top level properties - if v, ok := d.GetOk("auto_grow_enabled"); ok { - autogrowEnabled := servers.StorageAutogrowDisabled - if v.(bool) { - autogrowEnabled = servers.StorageAutogrowEnabled - } - storage.StorageAutogrow = &autogrowEnabled - } - - if v, ok := d.GetOk("backup_retention_days"); ok { - storage.BackupRetentionDays = utils.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("geo_redundant_backup_enabled"); ok { - geoRedundantBackup := servers.GeoRedundantBackupDisabled - if v.(bool) { - geoRedundantBackup = servers.GeoRedundantBackupEnabled - } - storage.GeoRedundantBackup = &geoRedundantBackup - } - - if v, ok := d.GetOk("storage_mb"); ok { - storage.StorageMB = utils.Int64(int64(v.(int))) - } - - return &storage -} diff --git a/internal/services/mariadb/mariadb_server_resource_test.go b/internal/services/mariadb/mariadb_server_resource_test.go deleted file mode 100644 index ec842d3857a8d..0000000000000 --- a/internal/services/mariadb/mariadb_server_resource_test.go +++ /dev/null @@ -1,420 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package mariadb_test - -import ( - "context" - "fmt" - "testing" - "time" - - "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type MariaDbServerResource struct{} - -func TestAccMariaDbServer_basicTenTwo(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_mariadb_server` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_mariadb_server", "test") - r := MariaDbServerResource{} - version := "10.2" - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data, version), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("version").HasValue(version), - ), - }, - data.ImportStep("administrator_login_password"), // not returned as sensitive - }) -} - -func TestAccMariaDbServer_basicTenThree(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_mariadb_server` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_mariadb_server", "test") - r := MariaDbServerResource{} - version := "10.3" - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data, version), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("version").HasValue(version), - ), - }, - data.ImportStep("administrator_login_password"), // not returned as sensitive - }) -} - -func TestAccMariaDbServer_autogrowOnly(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_mariadb_server` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_mariadb_server", "test") - r := MariaDbServerResource{} - version := "10.3" - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.autogrow(data, version), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password"), // not returned as sensitive - }) -} - -func TestAccMariaDbServer_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_mariadb_server` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_mariadb_server", "test") - r := MariaDbServerResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data, "10.3"), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func TestAccMariaDbServer_complete(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_mariadb_server` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_mariadb_server", "test") - r := MariaDbServerResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data, "10.3"), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password"), // not returned as sensitive - }) -} - -func TestAccMariaDbServer_update(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_mariadb_server` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_mariadb_server", "test") - r := MariaDbServerResource{} - version := "10.3" - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data, version), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password"), // not returned as sensitive - { - Config: r.complete(data, version), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password"), // not returned as sensitive - { - Config: r.basic(data, version), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password"), // not returned as sensitive - }) -} - -func TestAccMariaDbServer_updateSKU(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_mariadb_server` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_mariadb_server", "test") - r := MariaDbServerResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.sku(data, "GP_Gen5_32"), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password"), // not returned as sensitive - { - Config: r.sku(data, "MO_Gen5_16"), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password"), // not returned as sensitive - }) -} - -func TestAccMariaDbServer_createReplica(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_mariadb_server` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_mariadb_server", "test") - r := MariaDbServerResource{} - version := "10.3" - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data, version), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password"), // not returned as sensitive - { - Config: r.createReplica(data, version), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That("azurerm_mariadb_server.replica").ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password"), // not returned as sensitive - }) -} - -func TestAccMariaDbServer_createPointInTimeRestore(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_mariadb_server` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_mariadb_server", "test") - r := MariaDbServerResource{} - restoreTime := time.Now().Add(11 * time.Minute) - version := "10.3" - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data, version), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password"), // not returned as sensitive - { - PreConfig: func() { time.Sleep(restoreTime.Sub(time.Now().Add(-7 * time.Minute))) }, - Config: r.createPointInTimeRestore(data, version, restoreTime.Add(3*time.Minute).Format(time.RFC3339)), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That("azurerm_mariadb_server.restore").ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password"), // not returned as sensitive - }) -} - -func (MariaDbServerResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := servers.ParseServerID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.MariaDB.ServersClient.Get(ctx, *id) - if err != nil { - return nil, fmt.Errorf("retrieving %s: %v", *id, err) - } - - return utils.Bool(resp.Model != nil), nil -} - -func (MariaDbServerResource) basic(data acceptance.TestData, version string) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_mariadb_server" "test" { - name = "acctestmariadbsvr-%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku_name = "B_Gen5_2" - version = "%s" - - administrator_login = "acctestun" - administrator_login_password = "H@Sh1CoR3!" - ssl_enforcement_enabled = true - storage_mb = 51200 -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, version) -} - -func (MariaDbServerResource) complete(data acceptance.TestData, version string) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_mariadb_server" "test" { - name = "acctestmariadbsvr-%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku_name = "B_Gen5_2" - version = "%s" - - administrator_login = "acctestun" - administrator_login_password = "H@Sh1CoR3!" - auto_grow_enabled = true - backup_retention_days = 14 - create_mode = "Default" - geo_redundant_backup_enabled = false - ssl_enforcement_enabled = true - public_network_access_enabled = true - storage_mb = 51200 - tags = { - environment = "test" - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, version) -} - -func (MariaDbServerResource) autogrow(data acceptance.TestData, version string) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_mariadb_server" "test" { - name = "acctestmariadbsvr-%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku_name = "B_Gen5_2" - version = "%s" - - administrator_login = "acctestun" - administrator_login_password = "H@Sh1CoR3!" - auto_grow_enabled = true - backup_retention_days = 7 - geo_redundant_backup_enabled = false - ssl_enforcement_enabled = true - ssl_minimal_tls_version_enforced = "TLS1_2" - storage_mb = 51200 -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, version) -} - -func (r MariaDbServerResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_mariadb_server" "import" { - name = azurerm_mariadb_server.test.name - location = azurerm_mariadb_server.test.location - resource_group_name = azurerm_mariadb_server.test.resource_group_name - sku_name = "B_Gen5_2" - version = "10.3" - - administrator_login = "acctestun" - administrator_login_password = "H@Sh1CoR3!" - backup_retention_days = 7 - geo_redundant_backup_enabled = false - ssl_enforcement_enabled = true - storage_mb = 51200 -} -`, r.basic(data, "10.3")) -} - -func (MariaDbServerResource) sku(data acceptance.TestData, sku string) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_mariadb_server" "test" { - name = "acctestmariadbsvr-%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku_name = "%s" - version = "10.2" - - administrator_login = "acctestun" - administrator_login_password = "H@Sh1CoR3!" - backup_retention_days = 7 - geo_redundant_backup_enabled = false - ssl_enforcement_enabled = true - storage_mb = 640000 -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, sku) -} - -func (r MariaDbServerResource) createReplica(data acceptance.TestData, version string) string { - return fmt.Sprintf(` -%s - -resource "azurerm_mariadb_server" "replica" { - name = "acctestmariadbsvr-%d-replica" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku_name = "B_Gen5_2" - version = "%s" - create_mode = "Replica" - creation_source_server_id = azurerm_mariadb_server.test.id - ssl_enforcement_enabled = true - storage_mb = 51200 -} -`, r.basic(data, version), data.RandomInteger, version) -} - -func (r MariaDbServerResource) createPointInTimeRestore(data acceptance.TestData, version, restoreTime string) string { - return fmt.Sprintf(` -%s - -resource "azurerm_mariadb_server" "restore" { - name = "acctestmariadbsvr-%d-restore" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku_name = "B_Gen5_2" - version = "%s" - create_mode = "PointInTimeRestore" - creation_source_server_id = azurerm_mariadb_server.test.id - restore_point_in_time = "%s" - ssl_enforcement_enabled = true - storage_mb = 51200 -} -`, r.basic(data, version), data.RandomInteger, version, restoreTime) -} diff --git a/internal/services/mariadb/mariadb_virtual_network_rule_resource.go b/internal/services/mariadb/mariadb_virtual_network_rule_resource.go deleted file mode 100644 index 4284f58aefc19..0000000000000 --- a/internal/services/mariadb/mariadb_virtual_network_rule_resource.go +++ /dev/null @@ -1,203 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package mariadb - -import ( - "context" - "fmt" - "log" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/validate" - networkValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceMariaDbVirtualNetworkRule() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceMariaDbVirtualNetworkRuleCreateUpdate, - Read: resourceMariaDbVirtualNetworkRuleRead, - Update: resourceMariaDbVirtualNetworkRuleCreateUpdate, - Delete: resourceMariaDbVirtualNetworkRuleDelete, - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := virtualnetworkrules.ParseVirtualNetworkRuleID(id) - return err - }), - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - DeprecationMessage: "Azure Database for MariaDB and its sub resources are scheduled for retirement by 2024-09-19 and will migrate to using Azure Database for MySQL Flexible Server: https://learn.microsoft.com/en-us/azure/mariadb/whats-happening-to-mariadb. The `azurerm_mariadb_virtual_network_rule` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.", - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: networkValidate.VirtualNetworkRuleName, - }, - - "resource_group_name": commonschema.ResourceGroupName(), - - "server_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.ServerName, - }, - - "subnet_id": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: commonids.ValidateSubnetID, - }, - }, - } -} - -func resourceMariaDbVirtualNetworkRuleCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).MariaDB.VirtualNetworkRulesClient - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := virtualnetworkrules.NewVirtualNetworkRuleID(subscriptionId, d.Get("resource_group_name").(string), d.Get("server_name").(string), d.Get("name").(string)) - - subnetId := d.Get("subnet_id").(string) - - if d.IsNewResource() { - existing, err := client.Get(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for presence of existing %s: %+v", id, err) - } - } - - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_mariadb_virtual_network_rule", id.ID()) - } - } - - parameters := virtualnetworkrules.VirtualNetworkRule{ - Properties: &virtualnetworkrules.VirtualNetworkRuleProperties{ - VirtualNetworkSubnetId: subnetId, - IgnoreMissingVnetServiceEndpoint: utils.Bool(false), - }, - } - - if err := client.CreateOrUpdateThenPoll(ctx, id, parameters); err != nil { - return fmt.Errorf("creating %s: %+v", id, err) - } - - // Wait for the provisioning state to become ready - log.Printf("[DEBUG] Waiting for %s to become ready", id) - stateConf := &pluginsdk.StateChangeConf{ - Pending: []string{"Initializing", "InProgress", "Unknown", "ResponseNotFound"}, - Target: []string{"Ready"}, - Refresh: mariaDbVirtualNetworkStateStatusCodeRefreshFunc(ctx, client, id), - MinTimeout: 1 * time.Minute, - ContinuousTargetOccurence: 5, - } - if d.IsNewResource() { - stateConf.Timeout = d.Timeout(pluginsdk.TimeoutCreate) - } else { - stateConf.Timeout = d.Timeout(pluginsdk.TimeoutUpdate) - } - - if _, err := stateConf.WaitForStateContext(ctx); err != nil { - return fmt.Errorf("waiting for %s to be created or updated: %+v", id, err) - } - - d.SetId(id.ID()) - - return resourceMariaDbVirtualNetworkRuleRead(d, meta) -} - -func resourceMariaDbVirtualNetworkRuleRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).MariaDB.VirtualNetworkRulesClient - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := virtualnetworkrules.ParseVirtualNetworkRuleID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - log.Printf("[INFO] Error reading MariaDb Virtual Network Rule %q - removing from state", d.Id()) - d.SetId("") - return nil - } - - return fmt.Errorf("reading %s: %+v", *id, err) - } - - d.Set("name", id.VirtualNetworkRuleName) - d.Set("resource_group_name", id.ResourceGroupName) - d.Set("server_name", id.ServerName) - - if model := resp.Model; model != nil { - if props := model.Properties; props != nil { - d.Set("subnet_id", props.VirtualNetworkSubnetId) - } - } - - return nil -} - -func resourceMariaDbVirtualNetworkRuleDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).MariaDB.VirtualNetworkRulesClient - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := virtualnetworkrules.ParseVirtualNetworkRuleID(d.Id()) - if err != nil { - return err - } - - if err := client.DeleteThenPoll(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - - return nil -} - -func mariaDbVirtualNetworkStateStatusCodeRefreshFunc(ctx context.Context, client *virtualnetworkrules.VirtualNetworkRulesClient, id virtualnetworkrules.VirtualNetworkRuleId) pluginsdk.StateRefreshFunc { - return func() (interface{}, string, error) { - resp, err := client.Get(ctx, id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - log.Printf("[DEBUG] Retrieving %s returned 404.", id) - return nil, "ResponseNotFound", nil - } - - return nil, "", fmt.Errorf("polling for the state of %s: %+v", id, err) - } - - if model := resp.Model; model != nil { - if props := model.Properties; props != nil { - log.Printf("[DEBUG] Retrieving %s returned Status %s", id, *props.State) - return resp, string(*props.State), nil - } - } - - // Valid response was returned but VirtualNetworkRuleProperties was nil. Basically the rule exists, but with no properties for some reason. Assume Unknown instead of returning error. - log.Printf("[DEBUG] Retrieving %s returned empty VirtualNetworkRuleProperties", id) - return resp, "Unknown", nil - } -} diff --git a/internal/services/mariadb/mariadb_virtual_network_rule_resource_test.go b/internal/services/mariadb/mariadb_virtual_network_rule_resource_test.go deleted file mode 100644 index 25cc0cdba68cc..0000000000000 --- a/internal/services/mariadb/mariadb_virtual_network_rule_resource_test.go +++ /dev/null @@ -1,387 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package mariadb_test - -import ( - "context" - "fmt" - "regexp" - "testing" - - "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type MariaDbVirtualNetworkRuleResource struct{} - -func TestAccMariaDbVirtualNetworkRule_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_mariadb_virtual_network_rule` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_mariadb_virtual_network_rule", "test") - r := MariaDbVirtualNetworkRuleResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - }) -} - -func TestAccMariaDbVirtualNetworkRule_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_mariadb_virtual_network_rule` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_mariadb_virtual_network_rule", "test") - r := MariaDbVirtualNetworkRuleResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - { - Config: r.requiresImport(data), - ExpectError: acceptance.RequiresImportError("azurerm_mariadb_virtual_network_rule"), - }, - }) -} - -func TestAccMariaDbVirtualNetworkRule_switchSubnets(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_mariadb_virtual_network_rule` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_mariadb_virtual_network_rule", "test") - r := MariaDbVirtualNetworkRuleResource{} - - // Create regex strings that will ensure that one subnet name exists, but not the other - preConfigRegex := regexp.MustCompile(fmt.Sprintf("(subnet1%d)$|(subnet[^2]%d)$", data.RandomInteger, data.RandomInteger)) // subnet 1 but not 2 - postConfigRegex := regexp.MustCompile(fmt.Sprintf("(subnet2%d)$|(subnet[^1]%d)$", data.RandomInteger, data.RandomInteger)) // subnet 2 but not 1 - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.subnetSwitchPre(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - acceptance.TestMatchResourceAttr(data.ResourceName, "subnet_id", preConfigRegex), - ), - }, - { - Config: r.subnetSwitchPost(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - acceptance.TestMatchResourceAttr(data.ResourceName, "subnet_id", postConfigRegex), - ), - }, - }) -} - -func TestAccMariaDbVirtualNetworkRule_multipleSubnets(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_mariadb_virtual_network_rule` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_mariadb_virtual_network_rule", "rule1") - r := MariaDbVirtualNetworkRuleResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.multipleSubnets(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That("azurerm_mariadb_virtual_network_rule.rule2").ExistsInAzure(r), - check.That("azurerm_mariadb_virtual_network_rule.rule3").ExistsInAzure(r), - ), - }, - }) -} - -func (MariaDbVirtualNetworkRuleResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := virtualnetworkrules.ParseVirtualNetworkRuleID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.MariaDB.VirtualNetworkRulesClient.Get(ctx, *id) - if err != nil { - return nil, fmt.Errorf("retrieving %s: %v", *id, err) - } - - return utils.Bool(resp.Model != nil), nil -} - -func (MariaDbVirtualNetworkRuleResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_virtual_network" "test" { - name = "acctestvnet%d" - address_space = ["10.7.29.0/29"] - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name -} - -resource "azurerm_subnet" "test" { - name = "acctestsubnet%d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.7.29.0/29"] - service_endpoints = ["Microsoft.Sql"] -} - -resource "azurerm_mariadb_server" "test" { - name = "acctestmariadbsvr-%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - administrator_login = "acctestun" - administrator_login_password = "H@Sh1CoR3!" - version = "10.2" - ssl_enforcement_enabled = true - sku_name = "GP_Gen5_2" - - storage_mb = 51200 - geo_redundant_backup_enabled = false - backup_retention_days = 7 -} - -resource "azurerm_mariadb_virtual_network_rule" "test" { - name = "acctestmariadbvnetrule%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_mariadb_server.test.name - subnet_id = azurerm_subnet.test.id -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger) -} - -func (r MariaDbVirtualNetworkRuleResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_mariadb_virtual_network_rule" "import" { - name = azurerm_mariadb_virtual_network_rule.test.name - resource_group_name = azurerm_mariadb_virtual_network_rule.test.resource_group_name - server_name = azurerm_mariadb_virtual_network_rule.test.server_name - subnet_id = azurerm_mariadb_virtual_network_rule.test.subnet_id -} -`, r.basic(data)) -} - -func (MariaDbVirtualNetworkRuleResource) subnetSwitchPre(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_virtual_network" "test" { - name = "acctestvnet%d" - address_space = ["10.7.29.0/24"] - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name -} - -resource "azurerm_subnet" "test1" { - name = "subnet1%d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.7.29.0/25"] - service_endpoints = ["Microsoft.Sql"] -} - -resource "azurerm_subnet" "test2" { - name = "subnet2%d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.7.29.128/25"] - service_endpoints = ["Microsoft.Sql"] -} - -resource "azurerm_mariadb_server" "test" { - name = "acctestmariadbsvr-%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - administrator_login = "acctestun" - administrator_login_password = "H@Sh1CoR3!" - version = "10.2" - ssl_enforcement_enabled = true - sku_name = "GP_Gen5_2" - - storage_mb = 51200 - geo_redundant_backup_enabled = false - backup_retention_days = 7 -} - -resource "azurerm_mariadb_virtual_network_rule" "test" { - name = "acctestmariadbvnetrule%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_mariadb_server.test.name - subnet_id = azurerm_subnet.test1.id -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger) -} - -func (MariaDbVirtualNetworkRuleResource) subnetSwitchPost(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_virtual_network" "test" { - name = "acctestvnet%d" - address_space = ["10.7.29.0/24"] - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name -} - -resource "azurerm_subnet" "test1" { - name = "subnet1%d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.7.29.0/25"] - service_endpoints = ["Microsoft.Sql"] -} - -resource "azurerm_subnet" "test2" { - name = "subnet2%d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.7.29.128/25"] - service_endpoints = ["Microsoft.Sql"] -} - -resource "azurerm_mariadb_server" "test" { - name = "acctestmariadbsvr-%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - administrator_login = "acctestun" - administrator_login_password = "H@Sh1CoR3!" - version = "10.2" - ssl_enforcement_enabled = true - sku_name = "GP_Gen5_2" - - storage_mb = 51200 - geo_redundant_backup_enabled = false - backup_retention_days = 7 -} - -resource "azurerm_mariadb_virtual_network_rule" "test" { - name = "acctestmariadbvnetrule%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_mariadb_server.test.name - subnet_id = azurerm_subnet.test2.id -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger) -} - -func (MariaDbVirtualNetworkRuleResource) multipleSubnets(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_virtual_network" "vnet1" { - name = "acctestvnet1%d" - address_space = ["10.7.29.0/24"] - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name -} - -resource "azurerm_virtual_network" "vnet2" { - name = "acctestvnet2%d" - address_space = ["10.1.29.0/29"] - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name -} - -resource "azurerm_subnet" "vnet1_subnet1" { - name = "acctestsubnet1%d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.vnet1.name - address_prefixes = ["10.7.29.0/29"] - service_endpoints = ["Microsoft.Sql"] -} - -resource "azurerm_subnet" "vnet1_subnet2" { - name = "acctestsubnet2%d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.vnet1.name - address_prefixes = ["10.7.29.128/29"] - service_endpoints = ["Microsoft.Sql"] -} - -resource "azurerm_subnet" "vnet2_subnet1" { - name = "acctestsubnet3%d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.vnet2.name - address_prefixes = ["10.1.29.0/29"] - service_endpoints = ["Microsoft.Sql"] -} - -resource "azurerm_mariadb_server" "test" { - name = "acctestmariadbsvr-%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - administrator_login = "acctestun" - administrator_login_password = "H@Sh1CoR3!" - version = "10.2" - ssl_enforcement_enabled = true - sku_name = "GP_Gen5_2" - - storage_mb = 51200 - geo_redundant_backup_enabled = false - backup_retention_days = 7 -} - -resource "azurerm_mariadb_virtual_network_rule" "rule1" { - name = "acctestmariadbvnetrule1%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_mariadb_server.test.name - subnet_id = azurerm_subnet.vnet1_subnet1.id -} - -resource "azurerm_mariadb_virtual_network_rule" "rule2" { - name = "acctestmariadbvnetrule2%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_mariadb_server.test.name - subnet_id = azurerm_subnet.vnet1_subnet2.id -} - -resource "azurerm_mariadb_virtual_network_rule" "rule3" { - name = "acctestmariadbvnetrule3%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_mariadb_server.test.name - subnet_id = azurerm_subnet.vnet2_subnet1.id -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger) -} diff --git a/internal/services/mariadb/registration.go b/internal/services/mariadb/registration.go deleted file mode 100644 index 7184d1c1aebe0..0000000000000 --- a/internal/services/mariadb/registration.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package mariadb - -import ( - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -type Registration struct{} - -var _ sdk.UntypedServiceRegistrationWithAGitHubLabel = Registration{} - -func (r Registration) AssociatedGitHubLabel() string { - return "service/maria-db" -} - -// Name is the name of this Service -func (r Registration) Name() string { - return "MariaDB" -} - -// WebsiteCategories returns a list of categories which can be used for the sidebar -func (r Registration) WebsiteCategories() []string { - return []string{ - "Database", - } -} - -// SupportedDataSources returns the supported Data Sources supported by this Service -func (r Registration) SupportedDataSources() map[string]*pluginsdk.Resource { - if !features.FourPointOhBeta() { - return map[string]*pluginsdk.Resource{ - "azurerm_mariadb_server": dataSourceMariaDbServer(), - } - } - return map[string]*pluginsdk.Resource{} -} - -// SupportedResources returns the supported Resources supported by this Service -func (r Registration) SupportedResources() map[string]*pluginsdk.Resource { - if !features.FourPointOh() { - return map[string]*pluginsdk.Resource{ - "azurerm_mariadb_configuration": resourceMariaDbConfiguration(), - "azurerm_mariadb_database": resourceMariaDbDatabase(), - "azurerm_mariadb_firewall_rule": resourceArmMariaDBFirewallRule(), - "azurerm_mariadb_server": resourceMariaDbServer(), - "azurerm_mariadb_virtual_network_rule": resourceMariaDbVirtualNetworkRule(), - } - } - return map[string]*pluginsdk.Resource{} -} diff --git a/internal/services/mariadb/validate/firewall_rule_name.go b/internal/services/mariadb/validate/firewall_rule_name.go deleted file mode 100644 index d70ce317414f6..0000000000000 --- a/internal/services/mariadb/validate/firewall_rule_name.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "fmt" - "regexp" -) - -func FirewallRuleName(i interface{}, k string) (warnings []string, errors []error) { - v, ok := i.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected type of %s to be string", k)) - return - } - - // The name attribute rules are : - // 1. can contain only letters, numbers, underscore and hyphen. - // 2. The value must be between 1 and 128 characters long - - if !regexp.MustCompile(`^[a-zA-Z\d-_]{1,128}$`).MatchString(v) { - errors = append(errors, fmt.Errorf("%s can contain only letters, numbers, underscore and hyphen, and be between 1 and 128 characters long", k)) - return - } - - return warnings, errors -} diff --git a/internal/services/mariadb/validate/firewall_rule_name_test.go b/internal/services/mariadb/validate/firewall_rule_name_test.go deleted file mode 100644 index 8ac9d3d860f23..0000000000000 --- a/internal/services/mariadb/validate/firewall_rule_name_test.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "testing" -) - -func TestFirewallRuleName(t *testing.T) { - testData := []struct { - input string - expected bool - }{ - { - // empty - input: "", - expected: false, - }, - { - // basic example - input: "abc123", - expected: true, - }, - { - // can contain underscore - input: "aBc_123", - expected: true, - }, - { - // can contain hyphen - input: "ab-c", - expected: true, - }, - { - // can't contain `*` - input: "abcon*demand", - expected: false, - }, - { - // 128 chars - input: "abcdefghijklmnopqrstuvwxyzabcdefabcdefghijklmnopqrstuvwxyzabcdefabcdefghijklmnopqrstuvwxyzabcdefabcdefghijklmnopqrstuvwxyzabcdef", - expected: true, - }, - { - // 129 chars - input: "abcdefghijklmnopqrstuvwxyzabcdefabcdefghijklmnopqrstuvwxyzabcdefabcdefghijklmnopqrstuvwxyzabcdefabcdefghijklmnopqrstuvwxyzabcdefg", - expected: false, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q..", v.input) - - _, errors := FirewallRuleName(v.input, "name") - actual := len(errors) == 0 - if v.expected != actual { - t.Fatalf("Expected %t but got %t", v.expected, actual) - } - } -} diff --git a/internal/services/mariadb/validate/server_name.go b/internal/services/mariadb/validate/server_name.go deleted file mode 100644 index 1596b0b278838..0000000000000 --- a/internal/services/mariadb/validate/server_name.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" -) - -func ServerName(i interface{}, k string) (_ []string, errors []error) { - if m, regexErrs := validate.RegExHelper(i, k, `^[0-9a-z][-0-9a-z]{1,61}[0-9a-z]$`); !m { - return nil, append(regexErrs, fmt.Errorf("%q can contain only lowercase letters, numbers, and '-', but can't start or end with '-', and must be at least 3 characters and no more than 63 characters long.", k)) - } - - return nil, nil -} diff --git a/internal/services/mariadb/validate/server_name_test.go b/internal/services/mariadb/validate/server_name_test.go deleted file mode 100644 index 60b4d6c04ddb1..0000000000000 --- a/internal/services/mariadb/validate/server_name_test.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "testing" -) - -func TestValidateServerName(t *testing.T) { - testData := []struct { - input string - expected bool - }{ - { - // empty - input: "", - expected: false, - }, - { - // basic example - input: "ab-c", - expected: true, - }, - { - // can't contain upper case letter - input: "AbcD", - expected: false, - }, - { - // can't start with a hyphen - input: "-abc", - expected: false, - }, - { - // can't contain underscore - input: "ab_c", - expected: false, - }, - { - // can't end with hyphen - input: "abc-", - expected: false, - }, - { - // can not be shorter than 3 characters - input: "ab", - expected: false, - }, - { - // can not be shorter than 3 characters (catching bad regex) - input: "a", - expected: false, - }, - { - // 63 chars - input: "abcdefghijklmnopqrstuvwxyzabcdefabcdefghijklmnopqrstuvwxyzabcde", - expected: true, - }, - { - // 64 chars - input: "abcdefghijklmnopqrstuvwxyzabcdefabcdefghijklmnopqrstuvwxyzabcdef", - expected: false, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q..", v.input) - - _, errors := ServerName(v.input, "name") - actual := len(errors) == 0 - if v.expected != actual { - t.Fatalf("Expected %t but got %t", v.expected, actual) - } - } -} diff --git a/internal/services/media/client/client.go b/internal/services/media/client/client.go deleted file mode 100644 index 9224a3b84ad98..0000000000000 --- a/internal/services/media/client/client.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package client - -import ( - "fmt" - - mediaV20211101 "github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01" - mediaV20220701 "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01" - mediaV20220801 "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/terraform-provider-azurerm/internal/common" -) - -type Client struct { - V20211101Client *mediaV20211101.Client - V20220701Client *mediaV20220701.Client - V20220801Client *mediaV20220801.Client -} - -func NewClient(o *common.ClientOptions) (*Client, error) { - v20211101Client, err := mediaV20211101.NewClientWithBaseURI(o.Environment.ResourceManager, func(c *resourcemanager.Client) { - o.Configure(c, o.Authorizers.ResourceManager) - }) - if err != nil { - return nil, fmt.Errorf("building 2021-11-01 client: %+v", err) - } - - v20220701Client, err := mediaV20220701.NewClientWithBaseURI(o.Environment.ResourceManager, func(c *resourcemanager.Client) { - o.Configure(c, o.Authorizers.ResourceManager) - }) - if err != nil { - return nil, fmt.Errorf("building 2022-07-01 client: %+v", err) - } - - v20220801Client, err := mediaV20220801.NewClientWithBaseURI(o.Environment.ResourceManager, func(c *resourcemanager.Client) { - o.Configure(c, o.Authorizers.ResourceManager) - }) - if err != nil { - return nil, fmt.Errorf("building 2022-08-01 client: %+v", err) - } - - return &Client{ - V20211101Client: v20211101Client, - V20220701Client: v20220701Client, - V20220801Client: v20220801Client, - }, nil -} diff --git a/internal/services/media/media_asset_filter_resource.go b/internal/services/media/media_asset_filter_resource.go deleted file mode 100644 index 7248af8f051e2..0000000000000 --- a/internal/services/media/media_asset_filter_resource.go +++ /dev/null @@ -1,445 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media - -import ( - "fmt" - "log" - "regexp" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/media/migration" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceMediaAssetFilter() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceMediaAssetFilterCreateUpdate, - Read: resourceMediaAssetFilterRead, - Update: resourceMediaAssetFilterCreateUpdate, - Delete: resourceMediaAssetFilterDelete, - - DeprecationMessage: azureMediaRetirementMessage, - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := assetsandassetfilters.ParseAssetFilterID(id) - return err - }), - - StateUpgraders: pluginsdk.StateUpgrades(map[int]pluginsdk.StateUpgrade{ - 0: migration.AssetFilterV0ToV1{}, - }), - SchemaVersion: 1, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile("^[-a-zA-Z0-9(_)]{1,128}$"), - "Asset Filter name must be 1 - 128 characters long, can contain letters, numbers, underscores, and hyphens (but the first and last character must be a letter or number).", - ), - }, - - "asset_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: assetsandassetfilters.ValidateAssetID, - }, - - "first_quality_bitrate": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(1), - }, - - "presentation_time_range": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "end_in_units": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - AtLeastOneOf: []string{ - "presentation_time_range.0.end_in_units", "presentation_time_range.0.force_end", "presentation_time_range.0.live_backoff_in_units", - "presentation_time_range.0.presentation_window_in_units", "presentation_time_range.0.start_in_units", "presentation_time_range.0.unit_timescale_in_miliseconds", - }, - }, - - "force_end": { - Type: pluginsdk.TypeBool, - Optional: true, - AtLeastOneOf: []string{ - "presentation_time_range.0.end_in_units", "presentation_time_range.0.force_end", "presentation_time_range.0.live_backoff_in_units", - "presentation_time_range.0.presentation_window_in_units", "presentation_time_range.0.start_in_units", "presentation_time_range.0.unit_timescale_in_miliseconds", - }, - }, - - "live_backoff_in_units": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - AtLeastOneOf: []string{ - "presentation_time_range.0.end_in_units", "presentation_time_range.0.force_end", "presentation_time_range.0.live_backoff_in_units", - "presentation_time_range.0.presentation_window_in_units", "presentation_time_range.0.start_in_units", "presentation_time_range.0.unit_timescale_in_miliseconds", - }, - }, - - "presentation_window_in_units": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - AtLeastOneOf: []string{ - "presentation_time_range.0.end_in_units", "presentation_time_range.0.force_end", "presentation_time_range.0.live_backoff_in_units", - "presentation_time_range.0.presentation_window_in_units", "presentation_time_range.0.start_in_units", "presentation_time_range.0.unit_timescale_in_miliseconds", - }, - }, - - "start_in_units": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - AtLeastOneOf: []string{ - "presentation_time_range.0.end_in_units", "presentation_time_range.0.force_end", "presentation_time_range.0.live_backoff_in_units", - "presentation_time_range.0.presentation_window_in_units", "presentation_time_range.0.start_in_units", "presentation_time_range.0.unit_timescale_in_miliseconds", - }, - }, - - // TODO: fix the name in 4.0 - "unit_timescale_in_miliseconds": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(1), - AtLeastOneOf: []string{ - "presentation_time_range.0.end_in_units", "presentation_time_range.0.force_end", "presentation_time_range.0.live_backoff_in_units", - "presentation_time_range.0.presentation_window_in_units", "presentation_time_range.0.start_in_units", "presentation_time_range.0.unit_timescale_in_miliseconds", - }, - }, - }, - }, - }, - - "track_selection": { - Type: pluginsdk.TypeList, - Optional: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - // lintignore:XS003 - "condition": { - Type: pluginsdk.TypeList, - Required: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "operation": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - string(assetsandassetfilters.FilterTrackPropertyCompareOperationEqual), - string(assetsandassetfilters.FilterTrackPropertyCompareOperationNotEqual), - }, false), - }, - - "property": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - string(assetsandassetfilters.FilterTrackPropertyTypeBitrate), - string(assetsandassetfilters.FilterTrackPropertyTypeFourCC), - string(assetsandassetfilters.FilterTrackPropertyTypeLanguage), - string(assetsandassetfilters.FilterTrackPropertyTypeName), - string(assetsandassetfilters.FilterTrackPropertyTypeType), - }, false), - }, - - "value": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - }, - }, - }, - }, - } -} - -func resourceMediaAssetFilterCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220801Client.AssetsAndAssetFilters - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - assetId, err := assetsandassetfilters.ParseAssetID(d.Get("asset_id").(string)) - if err != nil { - return err - } - - id := assetsandassetfilters.NewAssetFilterID(assetId.SubscriptionId, assetId.ResourceGroupName, assetId.MediaServiceName, assetId.AssetName, d.Get("name").(string)) - if d.IsNewResource() { - existing, err := client.AssetFiltersGet(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for presence of %s: %+v", id, err) - } - } - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_media_asset_filter", id.ID()) - } - } - - payload := assetsandassetfilters.AssetFilter{ - Properties: &assetsandassetfilters.MediaFilterProperties{ - FirstQuality: &assetsandassetfilters.FirstQuality{}, - }, - } - - if firstQualityBitrate, ok := d.GetOk("first_quality_bitrate"); ok { - payload.Properties.FirstQuality.Bitrate = int64(firstQualityBitrate.(int)) - } - - if v, ok := d.GetOk("presentation_time_range"); ok { - payload.Properties.PresentationTimeRange = expandPresentationTimeRange(v.([]interface{})) - } - - if v, ok := d.GetOk("track_selection"); ok { - payload.Properties.Tracks = expandTracks(v.([]interface{})) - } - - if _, err = client.AssetFiltersCreateOrUpdate(ctx, id, payload); err != nil { - return fmt.Errorf("creating/updating %s: %+v", id, err) - } - - d.SetId(id.ID()) - - return resourceMediaAssetFilterRead(d, meta) -} - -func resourceMediaAssetFilterRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220801Client.AssetsAndAssetFilters - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := assetsandassetfilters.ParseAssetFilterID(d.Id()) - if err != nil { - return err - } - - resp, err := client.AssetFiltersGet(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - log.Printf("[INFO] %s was not found - removing from state", *id) - d.SetId("") - return nil - } - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.AssetFilterName) - d.Set("asset_id", assetsandassetfilters.NewAssetID(id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.AssetName).ID()) - - if model := resp.Model; model != nil { - if props := model.Properties; props != nil { - var firstQualityBitrate int64 - if props.FirstQuality != nil { - firstQualityBitrate = props.FirstQuality.Bitrate - } - d.Set("first_quality_bitrate", firstQualityBitrate) - - if err := d.Set("presentation_time_range", flattenPresentationTimeRange(props.PresentationTimeRange)); err != nil { - return fmt.Errorf("flattening `presentation_time_range`: %s", err) - } - - if err := d.Set("track_selection", flattenTracks(props.Tracks)); err != nil { - return fmt.Errorf("flattening `track`: %s", err) - } - } - } - - return nil -} - -func resourceMediaAssetFilterDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220801Client.AssetsAndAssetFilters - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := assetsandassetfilters.ParseAssetFilterID(d.Id()) - if err != nil { - return err - } - - if _, err = client.AssetFiltersDelete(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - - return nil -} - -func expandPresentationTimeRange(input []interface{}) *assetsandassetfilters.PresentationTimeRange { - if len(input) == 0 { - return nil - } - - timeRange := input[0].(map[string]interface{}) - presentationTimeRange := &assetsandassetfilters.PresentationTimeRange{} - - var baseUnit int64 - if v := timeRange["unit_timescale_in_miliseconds"]; v != nil { - timeScaleInMiliSeconds := int64(v.(int)) - presentationTimeRange.Timescale = utils.Int64((incrementsInASecond * nanoSecondsInAIncrement) / milliSecondsInASecond / timeScaleInMiliSeconds) - baseUnit = milliSecondsInASecond - } - - if v := timeRange["end_in_units"]; v != nil { - presentationTimeRange.EndTimestamp = utils.Int64(int64(v.(int)) * baseUnit) - } - - if v := timeRange["force_end"]; v != nil { - presentationTimeRange.ForceEndTimestamp = utils.Bool(v.(bool)) - } - - if v := timeRange["live_backoff_in_units"]; v != nil { - presentationTimeRange.LiveBackoffDuration = utils.Int64(int64(v.(int)) * baseUnit) - } - - if v := timeRange["presentation_window_in_units"]; v != nil { - presentationTimeRange.PresentationWindowDuration = utils.Int64(int64(v.(int)) * baseUnit) - } - - if v := timeRange["start_in_units"]; v != nil { - presentationTimeRange.StartTimestamp = utils.Int64(int64(v.(int)) * baseUnit) - } - - return presentationTimeRange -} - -func flattenPresentationTimeRange(input *assetsandassetfilters.PresentationTimeRange) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - var timeScale int64 - var baseUnit int64 - if input.Timescale != nil { - timeScale = (incrementsInASecond * nanoSecondsInAIncrement) / milliSecondsInASecond / *input.Timescale - baseUnit = milliSecondsInASecond - } - - var endTimestamp int64 - if input.EndTimestamp != nil { - endTimestamp = *input.EndTimestamp / baseUnit - } - - var forceEndTimestamp bool - if input.ForceEndTimestamp != nil { - forceEndTimestamp = *input.ForceEndTimestamp - } - - var liveBackoffDuration int64 - if input.LiveBackoffDuration != nil { - liveBackoffDuration = *input.LiveBackoffDuration / baseUnit - } - - var presentationWindowDuration int64 - if input.PresentationWindowDuration != nil { - presentationWindowDuration = *input.PresentationWindowDuration / baseUnit - } - - var startTimestamp int64 - if input.StartTimestamp != nil { - startTimestamp = *input.StartTimestamp / baseUnit - } - - return []interface{}{ - map[string]interface{}{ - "end_in_units": endTimestamp, - "force_end": forceEndTimestamp, - "live_backoff_in_units": liveBackoffDuration, - "presentation_window_in_units": presentationWindowDuration, - "start_in_units": startTimestamp, - "unit_timescale_in_miliseconds": timeScale, - }, - } -} - -func expandTracks(input []interface{}) *[]assetsandassetfilters.FilterTrackSelection { - results := make([]assetsandassetfilters.FilterTrackSelection, 0) - - for _, trackRaw := range input { - track := trackRaw.(map[string]interface{}) - - if rawSelection := track["condition"]; rawSelection != nil { - trackSelectionList := rawSelection.([]interface{}) - filterTrackSelections := make([]assetsandassetfilters.FilterTrackPropertyCondition, 0) - for _, trackSelection := range trackSelectionList { - if trackSelection == nil { - continue - } - filterTrackSelection := assetsandassetfilters.FilterTrackPropertyCondition{} - track := trackSelection.(map[string]interface{}) - - if v := track["operation"]; v != nil { - filterTrackSelection.Operation = assetsandassetfilters.FilterTrackPropertyCompareOperation(v.(string)) - } - - if v := track["property"]; v != nil { - filterTrackSelection.Property = assetsandassetfilters.FilterTrackPropertyType(v.(string)) - } - - if v := track["value"]; v != nil { - filterTrackSelection.Value = v.(string) - } - - filterTrackSelections = append(filterTrackSelections, filterTrackSelection) - } - - results = append(results, assetsandassetfilters.FilterTrackSelection{ - TrackSelections: filterTrackSelections, - }) - } - } - - return &results -} - -func flattenTracks(input *[]assetsandassetfilters.FilterTrackSelection) []interface{} { - tracks := make([]interface{}, 0) - - for _, v := range *input { - selections := make([]interface{}, 0) - for _, selection := range v.TrackSelections { - selections = append(selections, map[string]interface{}{ - "operation": string(selection.Operation), - "property": string(selection.Property), - "value": selection.Value, - }) - } - tracks = append(tracks, map[string]interface{}{ - "condition": selections, - }) - } - - return tracks -} diff --git a/internal/services/media/media_asset_filter_resource_test.go b/internal/services/media/media_asset_filter_resource_test.go deleted file mode 100644 index 61b69c9143505..0000000000000 --- a/internal/services/media/media_asset_filter_resource_test.go +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type AssetFilterResource struct{} - -func TestAccAssetFilter_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_asset_filter` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_asset_filter", "test") - r := AssetFilterResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Filter-1"), - ), - }, - data.ImportStep(), - }) -} - -func TestAccAssetFilter_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_asset_filter` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_asset_filter", "test") - r := AssetFilterResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Filter-1"), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func TestAccAssetFilter_complete(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_asset_filter` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_asset_filter", "test") - r := AssetFilterResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("first_quality_bitrate").HasValue("128000"), - ), - }, - data.ImportStep(), - }) -} - -func TestAccAssetFilter_update(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_asset_filter` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_asset_filter", "test") - r := AssetFilterResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Filter-1"), - ), - }, - data.ImportStep(), - { - Config: r.complete(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("first_quality_bitrate").HasValue("128000"), - ), - }, - data.ImportStep(), - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Filter-1"), - ), - }, - data.ImportStep(), - }) -} - -func (AssetFilterResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := assetsandassetfilters.ParseAssetFilterID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.Media.V20220801Client.AssetsAndAssetFilters.AssetFiltersGet(ctx, *id) - if err != nil { - return nil, fmt.Errorf("retrieving %s: %+v", *id, err) - } - - return utils.Bool(resp.Model != nil), nil -} - -func (r AssetFilterResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_asset_filter" "test" { - name = "Filter-1" - asset_id = azurerm_media_asset.test.id -} -`, r.template(data)) -} - -func (r AssetFilterResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_asset_filter" "import" { - name = azurerm_media_asset_filter.test.name - asset_id = azurerm_media_asset.test.id -} -`, r.basic(data)) -} - -func (r AssetFilterResource) complete(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_asset_filter" "test" { - name = "Filter-1" - asset_id = azurerm_media_asset.test.id - first_quality_bitrate = 128000 - - presentation_time_range { - start_in_units = 0 - end_in_units = 15 - presentation_window_in_units = 90 - live_backoff_in_units = 0 - unit_timescale_in_miliseconds = 1000 - force_end = false - } - - track_selection { - condition { - property = "Type" - operation = "Equal" - value = "Audio" - } - - condition { - property = "Language" - operation = "NotEqual" - value = "en" - } - - condition { - property = "FourCC" - operation = "NotEqual" - value = "EC-3" - } - } - - - track_selection { - condition { - property = "Type" - operation = "Equal" - value = "Video" - } - - condition { - property = "Bitrate" - operation = "Equal" - value = "3000000-5000000" - } - } -} -`, r.template(data)) -} - -func (AssetFilterResource) template(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-media-%d" - location = "%s" -} - -resource "azurerm_storage_account" "test" { - name = "acctestsa1%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "test" { - name = "acctestmsa%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - storage_account { - id = azurerm_storage_account.test.id - is_primary = true - } -} - -resource "azurerm_media_asset" "test" { - name = "test" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name -} -`, data.RandomInteger, data.Locations.Primary, data.RandomString, data.RandomString) -} diff --git a/internal/services/media/media_asset_resource.go b/internal/services/media/media_asset_resource.go deleted file mode 100644 index 71ec29c7f7d11..0000000000000 --- a/internal/services/media/media_asset_resource.go +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media - -import ( - "fmt" - "log" - "regexp" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/media/migration" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceMediaAsset() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceMediaAssetCreateUpdate, - Read: resourceMediaAssetRead, - Update: resourceMediaAssetCreateUpdate, - Delete: resourceMediaAssetDelete, - - DeprecationMessage: azureMediaRetirementMessage, - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := assetsandassetfilters.ParseAssetID(id) - return err - }), - - StateUpgraders: pluginsdk.StateUpgrades(map[int]pluginsdk.StateUpgrade{ - 0: migration.AssetV0ToV1{}, - }), - SchemaVersion: 1, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile("^[-a-zA-Z0-9]{1,128}$"), - "Asset name must be 1 - 128 characters long, contain only letters, hyphen and numbers.", - ), - }, - - "resource_group_name": commonschema.ResourceGroupName(), - - "media_services_account_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile("^[-a-z0-9]{3,24}$"), - "Media Services Account name must be 3 - 24 characters long, contain only lowercase letters and numbers.", - ), - }, - - "alternate_id": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "container": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - ValidateFunc: validate.StorageContainerName, - }, - - "description": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "storage_account_name": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile("^([a-z0-9]{3,24})$"), - "Storage Account Name can only consist of lowercase letters and numbers, and must be between 3 and 24 characters long.", - ), - }, - }, - } -} - -func resourceMediaAssetCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220801Client.AssetsAndAssetFilters - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := assetsandassetfilters.NewAssetID(subscriptionId, d.Get("resource_group_name").(string), d.Get("media_services_account_name").(string), d.Get("name").(string)) - if d.IsNewResource() { - existing, err := client.AssetsGet(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for existing %s: %+v", id, err) - } - } - - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_media_asset", id.ID()) - } - } - - payload := assetsandassetfilters.Asset{ - Properties: &assetsandassetfilters.AssetProperties{ - Description: utils.String(d.Get("description").(string)), - }, - } - - if v, ok := d.GetOk("container"); ok { - payload.Properties.Container = utils.String(v.(string)) - } - - if v, ok := d.GetOk("alternate_id"); ok { - payload.Properties.AlternateId = utils.String(v.(string)) - } - - if v, ok := d.GetOk("storage_account_name"); ok { - payload.Properties.StorageAccountName = utils.String(v.(string)) - } - - if _, err := client.AssetsCreateOrUpdate(ctx, id, payload); err != nil { - return fmt.Errorf("creating/updating %s: %+v", id, err) - } - - d.SetId(id.ID()) - return resourceMediaAssetRead(d, meta) -} - -func resourceMediaAssetRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220801Client.AssetsAndAssetFilters - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := assetsandassetfilters.ParseAssetID(d.Id()) - if err != nil { - return err - } - - resp, err := client.AssetsGet(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - log.Printf("[INFO] %s was not found - removing from state", *id) - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.AssetName) - d.Set("media_services_account_name", id.MediaServiceName) - d.Set("resource_group_name", id.ResourceGroupName) - - if model := resp.Model; model != nil { - if props := model.Properties; props != nil { - d.Set("description", props.Description) - d.Set("alternate_id", props.AlternateId) - d.Set("container", props.Container) - d.Set("storage_account_name", props.StorageAccountName) - } - } - - return nil -} - -func resourceMediaAssetDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220801Client.AssetsAndAssetFilters - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := assetsandassetfilters.ParseAssetID(d.Id()) - if err != nil { - return err - } - - if _, err := client.AssetsDelete(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", id, err) - } - - return nil -} diff --git a/internal/services/media/media_asset_resource_test.go b/internal/services/media/media_asset_resource_test.go deleted file mode 100644 index 856e87a8cd706..0000000000000 --- a/internal/services/media/media_asset_resource_test.go +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type MediaAssetResource struct{} - -func TestAccMediaAsset_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_asset` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_asset", "test") - r := MediaAssetResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Asset-Content1"), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMediaAsset_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_asset` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_asset", "test") - r := MediaAssetResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Asset-Content1"), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func TestAccMediaAsset_complete(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_asset` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_asset", "test") - r := MediaAssetResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("alternate_id").HasValue("Asset-alternateid"), - check.That(data.ResourceName).Key("storage_account_name").HasValue(fmt.Sprintf("acctestsa1%s", data.RandomString)), - check.That(data.ResourceName).Key("container").HasValue("asset-container"), - check.That(data.ResourceName).Key("description").HasValue("Asset description"), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMediaAsset_update(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_asset` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_asset", "test") - r := MediaAssetResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Asset-Content1"), - ), - }, - data.ImportStep(), - { - Config: r.complete(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("alternate_id").HasValue("Asset-alternateid"), - check.That(data.ResourceName).Key("storage_account_name").HasValue(fmt.Sprintf("acctestsa1%s", data.RandomString)), - check.That(data.ResourceName).Key("container").HasValue("asset-container"), - check.That(data.ResourceName).Key("description").HasValue("Asset description"), - ), - }, - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Asset-Content1"), - check.That(data.ResourceName).Key("description").HasValue(""), - check.That(data.ResourceName).Key("alternate_id").HasValue(""), - ), - }, - data.ImportStep(), - }) -} - -func (MediaAssetResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := assetsandassetfilters.ParseAssetID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.Media.V20220801Client.AssetsAndAssetFilters.AssetsGet(ctx, *id) - if err != nil { - return nil, fmt.Errorf("retrieving %s: %+v", *id, err) - } - - return utils.Bool(resp.Model != nil), nil -} - -func (r MediaAssetResource) basic(data acceptance.TestData) string { - template := r.template(data) - return fmt.Sprintf(` -%s - -resource "azurerm_media_asset" "test" { - name = "Asset-Content1" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name -} -`, template) -} - -func (r MediaAssetResource) requiresImport(data acceptance.TestData) string { - template := r.basic(data) - return fmt.Sprintf(` -%s - -resource "azurerm_media_asset" "import" { - name = azurerm_media_asset.test.name - resource_group_name = azurerm_media_asset.test.resource_group_name - media_services_account_name = azurerm_media_asset.test.media_services_account_name -} -`, template) -} - -func (MediaAssetResource) complete(data acceptance.TestData) string { - template := MediaAssetResource{}.template(data) - return fmt.Sprintf(` -%s - -resource "azurerm_media_asset" "test" { - name = "Asset-Content1" - description = "Asset description" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name - storage_account_name = azurerm_storage_account.test.name - alternate_id = "Asset-alternateid" - container = "asset-container" -} -`, template) -} - -func (MediaAssetResource) template(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-media-%d" - location = "%s" -} - -resource "azurerm_storage_account" "test" { - name = "acctestsa1%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "test" { - name = "acctestmsa%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - storage_account { - id = azurerm_storage_account.test.id - is_primary = true - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomString, data.RandomString) -} diff --git a/internal/services/media/media_content_key_policy_resource.go b/internal/services/media/media_content_key_policy_resource.go deleted file mode 100644 index 46a45d48641e8..0000000000000 --- a/internal/services/media/media_content_key_policy_resource.go +++ /dev/null @@ -1,1404 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media - -import ( - "encoding/base64" - "encoding/hex" - "fmt" - "log" - "regexp" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/media/migration" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/media/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceMediaContentKeyPolicy() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceMediaContentKeyPolicyCreateUpdate, - Read: resourceMediaContentKeyPolicyRead, - Update: resourceMediaContentKeyPolicyCreateUpdate, - Delete: resourceMediaContentKeyPolicyDelete, - - DeprecationMessage: azureMediaRetirementMessage, - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := contentkeypolicies.ParseContentKeyPolicyID(id) - return err - }), - - StateUpgraders: pluginsdk.StateUpgrades(map[int]pluginsdk.StateUpgrade{ - 0: migration.ContentKeyPolicyV0ToV1{}, - }), - SchemaVersion: 1, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile("^[-a-zA-Z0-9(_)]{1,128}$"), - "Content Key Policy name must be 1 - 128 characters long, can contain letters, numbers, underscores, and hyphens (but the first and last character must be a letter or number).", - ), - }, - - "resource_group_name": commonschema.ResourceGroupName(), - - "media_services_account_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.AccountName, - }, - - "description": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "policy_option": { - Type: pluginsdk.TypeSet, - Required: true, - MinItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "clear_key_configuration_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - }, - - "widevine_configuration_template": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - // lintignore:XS003 - "playready_configuration_license": { - Type: pluginsdk.TypeList, - Optional: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "allow_test_devices": { - Type: pluginsdk.TypeBool, - Optional: true, - }, - - "begin_date": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.IsRFC3339Time, - }, - - "content_key_location_from_header_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - }, - - "content_key_location_from_key_id": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.IsUUID, - }, - - "content_type": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - string(contentkeypolicies.ContentKeyPolicyPlayReadyContentTypeUltraVioletDownload), - string(contentkeypolicies.ContentKeyPolicyPlayReadyContentTypeUltraVioletStreaming), - string(contentkeypolicies.ContentKeyPolicyPlayReadyContentTypeUnspecified), - }, false), - }, - - "expiration_date": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.IsRFC3339Time, - }, - - "grace_period": { - Type: pluginsdk.TypeString, - Optional: true, - Sensitive: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "license_type": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - string(contentkeypolicies.ContentKeyPolicyPlayReadyLicenseTypeNonPersistent), - string(contentkeypolicies.ContentKeyPolicyPlayReadyLicenseTypePersistent), - }, false), - }, - - // lintignore:XS003 - "play_right": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "agc_and_color_stripe_restriction": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntBetween(0, 3), - }, - - "allow_passing_video_content_to_unknown_output": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - string(contentkeypolicies.ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowed), - string(contentkeypolicies.ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowedWithVideoConstriction), - string(contentkeypolicies.ContentKeyPolicyPlayReadyUnknownOutputPassingOptionNotAllowed), - }, false), - }, - - "analog_video_opl": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntInSlice([]int{100, 150, 200}), - }, - - "compressed_digital_audio_opl": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntInSlice([]int{100, 150, 200, 250, 300}), - }, - - "compressed_digital_video_opl": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntInSlice([]int{400, 500}), - }, - - "digital_video_only_content_restriction": { - Type: pluginsdk.TypeBool, - Optional: true, - }, - - "explicit_analog_television_output_restriction": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "best_effort_enforced": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: false, - }, - "control_bits": { - Type: pluginsdk.TypeInt, - Required: true, - ValidateFunc: validation.IntBetween(0, 3), - }, - }, - }, - }, - - "first_play_expiration": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "image_constraint_for_analog_component_video_restriction": { - Type: pluginsdk.TypeBool, - Optional: true, - }, - - "image_constraint_for_analog_computer_monitor_restriction": { - Type: pluginsdk.TypeBool, - Optional: true, - }, - - "scms_restriction": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntBetween(0, 3), - }, - - "uncompressed_digital_audio_opl": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntInSlice([]int{100, 150, 200, 250, 300}), - }, - - "uncompressed_digital_video_opl": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntInSlice([]int{100, 250, 270, 300}), - }, - }, - }, - }, - - "relative_begin_date": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.IsRFC3339Time, - }, - - "relative_expiration_date": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.IsRFC3339Time, - }, - - "security_level": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - string(contentkeypolicies.SecurityLevelSLOneFiveZero), - string(contentkeypolicies.SecurityLevelSLTwoThousand), - string(contentkeypolicies.SecurityLevelSLThreeThousand), - }, false), - }, - }, - }, - }, - - "playready_response_custom_data": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - // lintignore:XS003 - "fairplay_configuration": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "ask": { - Type: pluginsdk.TypeString, - Optional: true, - Sensitive: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "pfx": { - Type: pluginsdk.TypeString, - Optional: true, - Sensitive: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "pfx_password": { - Type: pluginsdk.TypeString, - Optional: true, - Sensitive: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - // lintignore:XS003 - "offline_rental_configuration": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "playback_duration_seconds": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(1), - }, - "storage_duration_seconds": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(1), - }, - }, - }, - }, - "rental_and_lease_key_type": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - string(contentkeypolicies.ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeDualExpiry), - string(contentkeypolicies.ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentLimited), - string(contentkeypolicies.ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentUnlimited), - string(contentkeypolicies.ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUndefined), - }, false), - }, - "rental_duration_seconds": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(1), - }, - }, - }, - }, - // lintignore:XS003 - "token_restriction": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - // lintignore:XS003 - "alternate_key": { - Type: pluginsdk.TypeList, - Optional: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "symmetric_token_key": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsBase64, - Sensitive: true, - }, - "rsa_token_key_exponent": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - Sensitive: true, - }, - "rsa_token_key_modulus": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - Sensitive: true, - }, - "x509_token_key_raw": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - Sensitive: true, - }, - }, - }, - }, - "audience": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "issuer": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "token_type": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - string(contentkeypolicies.ContentKeyPolicyRestrictionTokenTypeJwt), - string(contentkeypolicies.ContentKeyPolicyRestrictionTokenTypeSwt), - }, false), - }, - "primary_symmetric_token_key": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsBase64, - Sensitive: true, - }, - "primary_rsa_token_key_exponent": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - Sensitive: true, - }, - "primary_rsa_token_key_modulus": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - Sensitive: true, - }, - "primary_x509_token_key_raw": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - Sensitive: true, - }, - "open_id_connect_discovery_document": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - // lintignore:XS003 - "required_claim": { - Type: pluginsdk.TypeList, - Optional: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "type": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "value": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - }, - }, - }, - - "open_restriction_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - }, - }, - }, - }, - }, - } -} - -func resourceMediaContentKeyPolicyCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220801Client.ContentKeyPolicies - subscriptionID := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := contentkeypolicies.NewContentKeyPolicyID(subscriptionID, d.Get("resource_group_name").(string), d.Get("media_services_account_name").(string), d.Get("name").(string)) - if d.IsNewResource() { - existing, err := client.Get(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for presence of %s: %+v", id, err) - } - } - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_media_content_key_policy", id.ID()) - } - } - - payload := contentkeypolicies.ContentKeyPolicy{ - Properties: &contentkeypolicies.ContentKeyPolicyProperties{}, - } - - if description, ok := d.GetOk("description"); ok { - payload.Properties.Description = utils.String(description.(string)) - } - - if v, ok := d.GetOk("policy_option"); ok { - options, err := expandPolicyOptions(v.(*pluginsdk.Set).List()) - if err != nil { - return err - } - payload.Properties.Options = *options - } - - if _, err := client.CreateOrUpdate(ctx, id, payload); err != nil { - return fmt.Errorf("creating/updating %s: %+v", id, err) - } - - d.SetId(id.ID()) - - return resourceMediaContentKeyPolicyRead(d, meta) -} - -func resourceMediaContentKeyPolicyRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220801Client.ContentKeyPolicies - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := contentkeypolicies.ParseContentKeyPolicyID(d.Id()) - if err != nil { - return err - } - - resp, err := client.GetPolicyPropertiesWithSecrets(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - log.Printf("[INFO] %s was not found - removing from state", id) - d.SetId("") - return nil - } - return fmt.Errorf("retrieving %s: %+v", id, err) - } - - d.Set("name", id.ContentKeyPolicyName) - d.Set("media_services_account_name", id.MediaServiceName) - d.Set("resource_group_name", id.ResourceGroupName) - - if model := resp.Model; model != nil { - d.Set("description", model.Description) - - options, err := flattenPolicyOptions(model.Options) - if err != nil { - return fmt.Errorf("flattening `policy_option`: %+v", err) - } - if err := d.Set("policy_option", options); err != nil { - return fmt.Errorf("setting `policy_option`: %+v", err) - } - } - - return nil -} - -func resourceMediaContentKeyPolicyDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220801Client.ContentKeyPolicies - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := contentkeypolicies.ParseContentKeyPolicyID(d.Id()) - if err != nil { - return err - } - - if _, err = client.Delete(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", id, err) - } - - return nil -} - -func expandPolicyOptions(input []interface{}) (*[]contentkeypolicies.ContentKeyPolicyOption, error) { - results := make([]contentkeypolicies.ContentKeyPolicyOption, 0) - - for _, policyOptionRaw := range input { - policyOption := policyOptionRaw.(map[string]interface{}) - - restriction, err := expandRestriction(policyOption) - if err != nil { - return nil, err - } - - configuration, err := expandConfiguration(policyOption) - if err != nil { - return nil, err - } - - contentKeyPolicyOption := contentkeypolicies.ContentKeyPolicyOption{ - Restriction: restriction, - Configuration: configuration, - } - - if v := policyOption["name"]; v != nil { - contentKeyPolicyOption.Name = utils.String(v.(string)) - } - - results = append(results, contentKeyPolicyOption) - } - - return &results, nil -} - -func flattenPolicyOptions(input []contentkeypolicies.ContentKeyPolicyOption) ([]interface{}, error) { - results := make([]interface{}, 0) - for _, option := range input { - name := "" - if option.Name != nil { - name = *option.Name - } - - clearKeyConfigurationEnabled := false - playReadyLicense := make([]interface{}, 0) - playReadyResponseCustomData := "" - widevineTemplate := "" - fairplayConfiguration := make([]interface{}, 0) - - if _, ok := option.Configuration.(contentkeypolicies.ContentKeyPolicyClearKeyConfiguration); ok { - clearKeyConfigurationEnabled = true - } - - if v, ok := option.Configuration.(contentkeypolicies.ContentKeyPolicyFairPlayConfiguration); ok { - flattened, err := flattenFairplayConfiguration(v) - if err != nil { - return nil, fmt.Errorf("flattening fairplay configuration: %+v", err) - } - fairplayConfiguration = *flattened - } - - if v, ok := option.Configuration.(contentkeypolicies.ContentKeyPolicyPlayReadyConfiguration); ok { - playReadyLicense = flattenPlayReadyLicenses(v.Licenses) - if v.ResponseCustomData != nil { - playReadyResponseCustomData = *v.ResponseCustomData - } - } - - if v, ok := option.Configuration.(contentkeypolicies.ContentKeyPolicyWidevineConfiguration); ok { - widevineTemplate = v.WidevineTemplate - } - - openRestrictionEnabled := false - tokenRestriction := make([]interface{}, 0) - if _, ok := option.Restriction.(contentkeypolicies.ContentKeyPolicyOpenRestriction); ok { - openRestrictionEnabled = true - } - if v, ok := option.Restriction.(contentkeypolicies.ContentKeyPolicyTokenRestriction); ok { - tokenRestriction = flattenTokenRestriction(v) - } - - results = append(results, map[string]interface{}{ - "name": name, - "clear_key_configuration_enabled": clearKeyConfigurationEnabled, - "playready_configuration_license": playReadyLicense, - "widevine_configuration_template": widevineTemplate, - "fairplay_configuration": fairplayConfiguration, - "playready_response_custom_data": playReadyResponseCustomData, - "open_restriction_enabled": openRestrictionEnabled, - "token_restriction": tokenRestriction, - }) - } - - return results, nil -} - -func expandRestriction(option map[string]interface{}) (contentkeypolicies.ContentKeyPolicyRestriction, error) { - openRestrictionEnabled := option["open_restriction_enabled"].(bool) - tokenRestrictions := option["token_restriction"].([]interface{}) - - restrictionCount := 0 - if openRestrictionEnabled { - restrictionCount++ - } - if len(tokenRestrictions) > 0 { - restrictionCount++ - } - if restrictionCount == 0 { - return nil, fmt.Errorf("policy_option must contain at least one type of restriction: open_restriction_enabled or token_restriction.") - } - if restrictionCount > 1 { - return nil, fmt.Errorf("more than one type of restriction in the same policy_option is not allowed.") - } - - if openRestrictionEnabled { - openRestriction := &contentkeypolicies.ContentKeyPolicyOpenRestriction{} - return openRestriction, nil - } - - if len(tokenRestrictions) > 0 { - tokenRestriction := tokenRestrictions[0].(map[string]interface{}) - contentKeyPolicyTokenRestriction := &contentkeypolicies.ContentKeyPolicyTokenRestriction{} - if tokenRestriction["audience"] != nil && tokenRestriction["audience"].(string) != "" { - contentKeyPolicyTokenRestriction.Audience = tokenRestriction["audience"].(string) - } - if tokenRestriction["issuer"] != nil && tokenRestriction["issuer"].(string) != "" { - contentKeyPolicyTokenRestriction.Issuer = tokenRestriction["issuer"].(string) - } - if tokenRestriction["token_type"] != nil && tokenRestriction["token_type"].(string) != "" { - contentKeyPolicyTokenRestriction.RestrictionTokenType = contentkeypolicies.ContentKeyPolicyRestrictionTokenType(tokenRestriction["token_type"].(string)) - } - if tokenRestriction["open_id_connect_discovery_document"] != nil && tokenRestriction["open_id_connect_discovery_document"].(string) != "" { - contentKeyPolicyTokenRestriction.OpenIdConnectDiscoveryDocument = utils.String(tokenRestriction["open_id_connect_discovery_document"].(string)) - } - if v := tokenRestriction["required_claim"]; v != nil { - contentKeyPolicyTokenRestriction.RequiredClaims = expandRequiredClaims(v.([]interface{})) - } - primaryVerificationKey, err := expandVerificationKey(tokenRestriction) - if err != nil { - return nil, err - } - contentKeyPolicyTokenRestriction.PrimaryVerificationKey = primaryVerificationKey - - alternateVerificationKeys, err := expandAlternateVerificationKeys(tokenRestriction["alternate_key"].([]interface{})) - if err != nil { - return nil, err - } - contentKeyPolicyTokenRestriction.AlternateVerificationKeys = alternateVerificationKeys - return contentKeyPolicyTokenRestriction, nil - } - - return nil, fmt.Errorf("policy_option must contain at least one type of restriction: open_restriction_enabled or token_restriction.") -} - -func flattenTokenRestriction(input contentkeypolicies.ContentKeyPolicyTokenRestriction) []interface{} { - openIDConnectDiscoveryDocument := "" - if input.OpenIdConnectDiscoveryDocument != nil { - openIDConnectDiscoveryDocument = *input.OpenIdConnectDiscoveryDocument - } - - requiredClaims := make([]interface{}, 0) - if input.RequiredClaims != nil { - requiredClaims = flattenRequiredClaims(input.RequiredClaims) - } - - symmetricToken := "" - rsaTokenKeyExponent := "" - rsaTokenKeyModulus := "" - x509TokenBodyRaw := "" - if v := input.PrimaryVerificationKey; v != nil { - symmetricTokenKey, ok := v.(contentkeypolicies.ContentKeyPolicySymmetricTokenKey) - if ok { - symmetricToken = symmetricTokenKey.KeyValue - } - - rsaTokenKey, ok := v.(contentkeypolicies.ContentKeyPolicyRsaTokenKey) - if ok { - rsaTokenKeyExponent = rsaTokenKey.Exponent - rsaTokenKeyModulus = rsaTokenKey.Modulus - } - - x509CertificateTokenKey, ok := v.(contentkeypolicies.ContentKeyPolicyX509CertificateTokenKey) - if ok { - x509TokenBodyRaw = x509CertificateTokenKey.RawBody - } - } - - return []interface{}{ - map[string]interface{}{ - "alternate_key": flattenAlternateVerificationKeys(input.AlternateVerificationKeys), - "audience": input.Audience, - "issuer": input.Issuer, - "token_type": string(input.RestrictionTokenType), - "open_id_connect_discovery_document": openIDConnectDiscoveryDocument, - "required_claim": requiredClaims, - "primary_symmetric_token_key": symmetricToken, - "primary_x509_token_key_raw": x509TokenBodyRaw, - "primary_rsa_token_key_exponent": rsaTokenKeyExponent, - "primary_rsa_token_key_modulus": rsaTokenKeyModulus, - }, - } -} - -func expandConfiguration(input map[string]interface{}) (contentkeypolicies.ContentKeyPolicyConfiguration, error) { - clearKeyConfigurationEnabled := input["clear_key_configuration_enabled"].(bool) - fairPlayConfigurations := input["fairplay_configuration"].([]interface{}) - playReadyConfigurationLicences := input["playready_configuration_license"].([]interface{}) - widevineConfigurationTemplate := input["widevine_configuration_template"].(string) - playReadyResponseCustomData := input["playready_response_custom_data"].(string) - - configurationCount := 0 - if clearKeyConfigurationEnabled { - configurationCount++ - } - if len(fairPlayConfigurations) > 0 { - configurationCount++ - } - if len(playReadyConfigurationLicences) > 0 { - configurationCount++ - } - if widevineConfigurationTemplate != "" { - configurationCount++ - } - if configurationCount == 0 { - return nil, fmt.Errorf("policy_option must contain at least one type of configuration: clear_key_configuration_enabled , widevine_configuration_template, playready_configuration_license or fairplay_configuration.") - } - if configurationCount > 1 { - return nil, fmt.Errorf("more than one type of configuration in the same policy_option is not allowed.") - } - - if clearKeyConfigurationEnabled { - clearKeyConfiguration := &contentkeypolicies.ContentKeyPolicyClearKeyConfiguration{} - return clearKeyConfiguration, nil - } - if len(fairPlayConfigurations) > 0 { - fairplayConfiguration, err := expandFairplayConfiguration(input["fairplay_configuration"].([]interface{})) - if err != nil { - return nil, err - } - return fairplayConfiguration, nil - } - if len(playReadyConfigurationLicences) > 0 { - licenses, err := expandPlayReadyLicenses(input["playready_configuration_license"].([]interface{})) - if err != nil { - return nil, err - } - playReadyConfiguration := &contentkeypolicies.ContentKeyPolicyPlayReadyConfiguration{ - Licenses: *licenses, - } - if playReadyResponseCustomData != "" { - playReadyConfiguration.ResponseCustomData = utils.String(playReadyResponseCustomData) - } - return playReadyConfiguration, nil - } - if widevineConfigurationTemplate != "" { - wideVineConfiguration := &contentkeypolicies.ContentKeyPolicyWidevineConfiguration{ - WidevineTemplate: input["widevine_configuration_template"].(string), - } - return wideVineConfiguration, nil - } - - return nil, fmt.Errorf("policy_option must contain at least one type of configuration: clear_key_configuration_enabled , widevine_configuration_template, playready_configuration_license or fairplay_configuration.") -} - -func expandVerificationKey(input map[string]interface{}) (contentkeypolicies.ContentKeyPolicyRestrictionTokenKey, error) { - primaryRsaTokenKeyExponent := input["primary_rsa_token_key_exponent"].(string) - primaryRsaTokenKeyModulus := input["primary_rsa_token_key_modulus"].(string) - primarySymmetricTokenKey := input["primary_symmetric_token_key"].(string) - primaryX509TokenKeyRaw := input["primary_x509_token_key_raw"].(string) - - verificationKeyCount := 0 - if primaryRsaTokenKeyExponent != "" || primaryRsaTokenKeyModulus != "" { - verificationKeyCount++ - } - if primarySymmetricTokenKey != "" { - verificationKeyCount++ - } - if primaryX509TokenKeyRaw != "" { - verificationKeyCount++ - } - if verificationKeyCount > 1 { - return nil, fmt.Errorf("more than one type of token key in the same token_restriction is not allowed.") - } - - if primaryRsaTokenKeyExponent != "" || primaryRsaTokenKeyModulus != "" { - rsaTokenKey := &contentkeypolicies.ContentKeyPolicyRsaTokenKey{ - Exponent: primaryRsaTokenKeyExponent, - Modulus: primaryRsaTokenKeyModulus, - } - return rsaTokenKey, nil - } - if primarySymmetricTokenKey != "" { - symmetricTokenKey := &contentkeypolicies.ContentKeyPolicySymmetricTokenKey{ - KeyValue: primarySymmetricTokenKey, - } - return symmetricTokenKey, nil - } - if primaryX509TokenKeyRaw != "" { - x509CertificateTokenKey := &contentkeypolicies.ContentKeyPolicyX509CertificateTokenKey{ - RawBody: primaryX509TokenKeyRaw, - } - return x509CertificateTokenKey, nil - } - - return nil, nil -} - -func expandAlternateVerificationKeys(input []interface{}) (*[]contentkeypolicies.ContentKeyPolicyRestrictionTokenKey, error) { - if len(input) == 0 || input[0] == nil { - return nil, nil - } - - result := make([]contentkeypolicies.ContentKeyPolicyRestrictionTokenKey, 0) - for _, v := range input { - tokenKeyRaw := v.(map[string]interface{}) - symmetricTokenKey := tokenKeyRaw["symmetric_token_key"].(string) - rsaTokenKeyExponent := tokenKeyRaw["rsa_token_key_exponent"].(string) - rsaTokenKeyModulus := tokenKeyRaw["rsa_token_key_modulus"].(string) - x509TokenKeyRaw := tokenKeyRaw["x509_token_key_raw"].(string) - - verificationKeyCount := 0 - if rsaTokenKeyExponent != "" || rsaTokenKeyModulus != "" { - verificationKeyCount++ - } - if symmetricTokenKey != "" { - verificationKeyCount++ - } - if x509TokenKeyRaw != "" { - verificationKeyCount++ - } - if verificationKeyCount != 1 { - return nil, fmt.Errorf("exactlly one type of token key must be set in the alternate verificaton keys") - } - - if rsaTokenKeyExponent != "" || rsaTokenKeyModulus != "" { - result = append(result, &contentkeypolicies.ContentKeyPolicyRsaTokenKey{ - Exponent: rsaTokenKeyExponent, - Modulus: rsaTokenKeyModulus, - }) - } - if symmetricTokenKey != "" { - result = append(result, &contentkeypolicies.ContentKeyPolicySymmetricTokenKey{ - KeyValue: symmetricTokenKey, - }) - } - if x509TokenKeyRaw != "" { - result = append(result, &contentkeypolicies.ContentKeyPolicyX509CertificateTokenKey{ - RawBody: symmetricTokenKey, - }) - } - } - - return &result, nil -} - -func flattenAlternateVerificationKeys(input *[]contentkeypolicies.ContentKeyPolicyRestrictionTokenKey) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - result := make([]interface{}, 0) - for _, v := range *input { - symmetricToken := "" - rsaTokenKeyExponent := "" - rsaTokenKeyModulus := "" - x509TokenBodyRaw := "" - symmetricTokenKey, ok := v.(contentkeypolicies.ContentKeyPolicySymmetricTokenKey) - if ok { - symmetricToken = symmetricTokenKey.KeyValue - } - - rsaTokenKey, ok := v.(contentkeypolicies.ContentKeyPolicyRsaTokenKey) - if ok { - rsaTokenKeyExponent = rsaTokenKey.Exponent - rsaTokenKeyModulus = rsaTokenKey.Modulus - } - - x509CertificateTokenKey, ok := v.(contentkeypolicies.ContentKeyPolicyX509CertificateTokenKey) - if ok { - x509TokenBodyRaw = x509CertificateTokenKey.RawBody - } - result = append(result, map[string]interface{}{ - "symmetric_token_key": symmetricToken, - "x509_token_key_raw": x509TokenBodyRaw, - "rsa_token_key_exponent": rsaTokenKeyExponent, - "rsa_token_key_modulus": rsaTokenKeyModulus, - }) - } - return result -} - -func expandRequiredClaims(input []interface{}) *[]contentkeypolicies.ContentKeyPolicyTokenClaim { - results := make([]contentkeypolicies.ContentKeyPolicyTokenClaim, 0) - - for _, tokenClaimRaw := range input { - if tokenClaimRaw == nil { - continue - } - tokenClaim := tokenClaimRaw.(map[string]interface{}) - - claimType := "" - if v := tokenClaim["type"]; v != nil { - claimType = v.(string) - } - - claimValue := "" - if v := tokenClaim["value"]; v != nil { - claimValue = v.(string) - } - - contentPolicyTokenClaim := contentkeypolicies.ContentKeyPolicyTokenClaim{ - ClaimType: &claimType, - ClaimValue: &claimValue, - } - - results = append(results, contentPolicyTokenClaim) - } - - return &results -} - -func flattenRequiredClaims(input *[]contentkeypolicies.ContentKeyPolicyTokenClaim) []interface{} { - if input == nil { - return []interface{}{} - } - - results := make([]interface{}, 0) - for _, tokenClaim := range *input { - claimValue := "" - if tokenClaim.ClaimValue != nil { - claimValue = *tokenClaim.ClaimValue - } - - claimType := "" - if tokenClaim.ClaimType != nil { - claimType = *tokenClaim.ClaimType - } - - results = append(results, map[string]interface{}{ - "value": claimValue, - "type": claimType, - }) - } - - return results -} - -func expandRentalConfiguration(input []interface{}) *contentkeypolicies.ContentKeyPolicyFairPlayOfflineRentalConfiguration { - if len(input) == 0 || input[0] == nil { - return nil - } - - rentalConfiguration := input[0].(map[string]interface{}) - playbackDuration := int64(rentalConfiguration["playback_duration_seconds"].(int)) - storageDuration := int64(rentalConfiguration["storage_duration_seconds"].(int)) - return &contentkeypolicies.ContentKeyPolicyFairPlayOfflineRentalConfiguration{ - PlaybackDurationSeconds: playbackDuration, - StorageDurationSeconds: storageDuration, - } -} - -func flattenRentalConfiguration(input *contentkeypolicies.ContentKeyPolicyFairPlayOfflineRentalConfiguration) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - return []interface{}{map[string]interface{}{ - "playback_duration_seconds": input.PlaybackDurationSeconds, - "storage_duration_seconds": input.StorageDurationSeconds, - }} -} - -func expandFairplayConfiguration(input []interface{}) (*contentkeypolicies.ContentKeyPolicyFairPlayConfiguration, error) { - fairplayConfiguration := &contentkeypolicies.ContentKeyPolicyFairPlayConfiguration{} - - fairplay := input[0].(map[string]interface{}) - if fairplay["rental_duration_seconds"] != nil { - fairplayConfiguration.RentalDuration = int64(fairplay["rental_duration_seconds"].(int)) - } - - if fairplay["offline_rental_configuration"] != nil { - fairplayConfiguration.OfflineRentalConfiguration = expandRentalConfiguration(fairplay["offline_rental_configuration"].([]interface{})) - } - - if fairplay["rental_and_lease_key_type"] != nil { - fairplayConfiguration.RentalAndLeaseKeyType = contentkeypolicies.ContentKeyPolicyFairPlayRentalAndLeaseKeyType(fairplay["rental_and_lease_key_type"].(string)) - } - - if fairplay["ask"] != nil && fairplay["ask"].(string) != "" { - askBytes, err := hex.DecodeString(fairplay["ask"].(string)) - if err != nil { - return nil, err - } - fairplayConfiguration.Ask = base64.StdEncoding.EncodeToString(askBytes) - } - - if fairplay["pfx"] != nil && fairplay["pfx"].(string) != "" { - fairplayConfiguration.FairPlayPfx = fairplay["pfx"].(string) - } - - if fairplay["pfx_password"] != nil && fairplay["pfx_password"].(string) != "" { - fairplayConfiguration.FairPlayPfxPassword = fairplay["pfx_password"].(string) - } - - return fairplayConfiguration, nil -} - -func flattenFairplayConfiguration(input contentkeypolicies.ContentKeyPolicyFairPlayConfiguration) (*[]interface{}, error) { - offlineRentalConfiguration := make([]interface{}, 0) - if input.OfflineRentalConfiguration != nil { - offlineRentalConfiguration = flattenRentalConfiguration(input.OfflineRentalConfiguration) - } - - ask := "" - if input.Ask != "" { - decodedAsk, err := base64.StdEncoding.DecodeString(input.Ask) - if err != nil { - return nil, fmt.Errorf("base64-decoding %q: %+v", input.Ask, err) - } - ask = hex.EncodeToString(decodedAsk) - } - - return &[]interface{}{ - map[string]interface{}{ - "rental_duration_seconds": input.RentalDuration, - "offline_rental_configuration": offlineRentalConfiguration, - "rental_and_lease_key_type": string(input.RentalAndLeaseKeyType), - "pfx": input.FairPlayPfx, - "pfx_password": input.FairPlayPfxPassword, - "ask": ask, - }, - }, nil -} - -func expandPlayReadyLicenses(input []interface{}) (*[]contentkeypolicies.ContentKeyPolicyPlayReadyLicense, error) { - results := make([]contentkeypolicies.ContentKeyPolicyPlayReadyLicense, 0) - - for _, licenseRaw := range input { - if licenseRaw == nil { - continue - } - license := licenseRaw.(map[string]interface{}) - playReadyLicense := contentkeypolicies.ContentKeyPolicyPlayReadyLicense{} - - if v := license["allow_test_devices"]; v != nil { - playReadyLicense.AllowTestDevices = v.(bool) - } - - if v := license["begin_date"]; v != nil && v != "" { - beginDate, err := time.Parse(time.RFC3339, v.(string)) - if err != nil { - return nil, err - } - playReadyLicense.SetBeginDateAsTime(beginDate) - } - - locationFromHeader := false - if v := license["content_key_location_from_header_enabled"]; v != nil && v != "" { - playReadyLicense.ContentKeyLocation = contentkeypolicies.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader{} - locationFromHeader = true - } - - if v := license["content_key_location_from_key_id"]; v != nil && v != "" { - if locationFromHeader { - return nil, fmt.Errorf("playready_configuration_license only support one key location at time, you must to specify content_key_location_from_header_enabled or content_key_location_from_key_id but not both at the same time") - } - - playReadyLicense.ContentKeyLocation = contentkeypolicies.ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier{ - KeyId: v.(string), - } - } - - if v := license["content_type"]; v != nil && v != "" { - playReadyLicense.ContentType = contentkeypolicies.ContentKeyPolicyPlayReadyContentType(v.(string)) - } - - if v := license["expiration_date"]; v != nil && v != "" { - expirationDate, err := time.Parse(time.RFC3339, v.(string)) - if err != nil { - return nil, err - } - playReadyLicense.SetExpirationDateAsTime(expirationDate) - } - - if v := license["grace_period"]; v != nil && v != "" { - playReadyLicense.GracePeriod = utils.String(v.(string)) - } - - if v := license["license_type"]; v != nil && v != "" { - playReadyLicense.LicenseType = contentkeypolicies.ContentKeyPolicyPlayReadyLicenseType(v.(string)) - } - - if v := license["play_right"]; v != nil { - playReadyLicense.PlayRight = expandPlayRight(v.([]interface{})) - } - - if v := license["relative_begin_date"]; v != nil && v != "" { - playReadyLicense.RelativeBeginDate = utils.String(v.(string)) - } - - if v := license["relative_expiration_date"]; v != nil && v != "" { - playReadyLicense.RelativeExpirationDate = utils.String(v.(string)) - } - - if v := license["security_level"]; v != nil && v != "" { - securityLevel := contentkeypolicies.SecurityLevel(v.(string)) - playReadyLicense.SecurityLevel = &securityLevel - } - - results = append(results, playReadyLicense) - } - - return &results, nil -} - -func flattenPlayReadyLicenses(input []contentkeypolicies.ContentKeyPolicyPlayReadyLicense) []interface{} { - results := make([]interface{}, 0) - for _, v := range input { - beginDate := "" - if t, err := v.GetBeginDateAsTime(); t != nil && err == nil { - beginDate = t.Format(time.RFC3339) - } - - locationFromHeaderEnabled := false - locationFromKeyID := "" - if v.ContentKeyLocation != nil { - if _, ok := v.ContentKeyLocation.(contentkeypolicies.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader); ok { - locationFromHeaderEnabled = true - } - if val, ok := v.ContentKeyLocation.(*contentkeypolicies.ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier); ok { - locationFromKeyID = val.KeyId - } - } - - expirationDate := "" - if t, err := v.GetExpirationDateAsTime(); t != nil && err == nil { - expirationDate = t.Format(time.RFC3339) - } - - gracePeriod := "" - if v.GracePeriod != nil { - gracePeriod = *v.GracePeriod - } - - playRight := make([]interface{}, 0) - if v.PlayRight != nil { - playRight = flattenPlayRight(v.PlayRight) - } - - relativeBeginDate := "" - if v.RelativeBeginDate != nil { - relativeBeginDate = *v.RelativeBeginDate - } - - relativeExpirationDate := "" - if v.RelativeExpirationDate != nil { - relativeExpirationDate = *v.RelativeExpirationDate - } - - securityLevel := "" - if v.SecurityLevel != nil { - securityLevel = string(*v.SecurityLevel) - } - - results = append(results, map[string]interface{}{ - "allow_test_devices": v.AllowTestDevices, - "begin_date": beginDate, - "content_key_location_from_header_enabled": locationFromHeaderEnabled, - "content_key_location_from_key_id": locationFromKeyID, - "content_type": string(v.ContentType), - "expiration_date": expirationDate, - "grace_period": gracePeriod, - "license_type": string(v.LicenseType), - "relative_begin_date": relativeBeginDate, - "relative_expiration_date": relativeExpirationDate, - "play_right": playRight, - "security_level": securityLevel, - }) - } - - return results -} - -func expandPlayRight(input []interface{}) *contentkeypolicies.ContentKeyPolicyPlayReadyPlayRight { - if len(input) == 0 || input[0] == nil { - return nil - } - - playRightConfiguration := input[0].(map[string]interface{}) - playRight := &contentkeypolicies.ContentKeyPolicyPlayReadyPlayRight{ - ExplicitAnalogTelevisionOutputRestriction: expandExplicitAnalogTelevisionOutputRestriction(playRightConfiguration["explicit_analog_television_output_restriction"].([]interface{})), - } - - if v := playRightConfiguration["agc_and_color_stripe_restriction"]; v != nil { - playRight.AgcAndColorStripeRestriction = utils.Int64(int64(v.(int))) - } - - if v := playRightConfiguration["allow_passing_video_content_to_unknown_output"]; v != nil { - playRight.AllowPassingVideoContentToUnknownOutput = contentkeypolicies.ContentKeyPolicyPlayReadyUnknownOutputPassingOption(v.(string)) - } - - if v := playRightConfiguration["analog_video_opl"]; v != nil && v != 0 { - playRight.AnalogVideoOpl = utils.Int64(int64(v.(int))) - } - - if v := playRightConfiguration["compressed_digital_audio_opl"]; v != nil && v != 0 { - playRight.CompressedDigitalAudioOpl = utils.Int64(int64(v.(int))) - } - - if v := playRightConfiguration["compressed_digital_video_opl"]; v != nil && v != 0 { - playRight.CompressedDigitalVideoOpl = utils.Int64(int64(v.(int))) - } - - if v := playRightConfiguration["digital_video_only_content_restriction"]; v != nil { - playRight.DigitalVideoOnlyContentRestriction = v.(bool) - } - - if v := playRightConfiguration["first_play_expiration"]; v != nil && v != "" { - playRight.FirstPlayExpiration = utils.String(v.(string)) - } - - if v := playRightConfiguration["image_constraint_for_analog_component_video_restriction"]; v != nil { - playRight.ImageConstraintForAnalogComponentVideoRestriction = v.(bool) - } - - if v := playRightConfiguration["image_constraint_for_analog_computer_monitor_restriction"]; v != nil { - playRight.ImageConstraintForAnalogComputerMonitorRestriction = v.(bool) - } - - if v := playRightConfiguration["scms_restriction"]; v != nil { - playRight.ScmsRestriction = utils.Int64(int64(v.(int))) - } - if v := playRightConfiguration["uncompressed_digital_audio_opl"]; v != nil && v != 0 { - playRight.UncompressedDigitalAudioOpl = utils.Int64(int64(v.(int))) - } - - if v := playRightConfiguration["uncompressed_digital_video_opl"]; v != nil && v != 0 { - playRight.UncompressedDigitalVideoOpl = utils.Int64(int64(v.(int))) - } - - return playRight -} - -func flattenPlayRight(input *contentkeypolicies.ContentKeyPolicyPlayReadyPlayRight) []interface{} { - agcStripeRestriction := 0 - if input.AgcAndColorStripeRestriction != nil { - agcStripeRestriction = int(*input.AgcAndColorStripeRestriction) - } - - analogVideoOpl := 0 - if input.AnalogVideoOpl != nil { - analogVideoOpl = int(*input.AnalogVideoOpl) - } - - compressedDigitalAudioOpl := 0 - if input.CompressedDigitalAudioOpl != nil { - compressedDigitalAudioOpl = int(*input.CompressedDigitalAudioOpl) - } - - compressedDigitalVideoOpl := 0 - if input.CompressedDigitalVideoOpl != nil { - compressedDigitalVideoOpl = int(*input.CompressedDigitalVideoOpl) - } - - firstPlayExpiration := "" - if input.FirstPlayExpiration != nil { - firstPlayExpiration = *input.FirstPlayExpiration - } - - scmsRestriction := 0 - if input.ScmsRestriction != nil { - scmsRestriction = int(*input.ScmsRestriction) - } - - uncompressedDigitalAudioOpl := 0 - if input.UncompressedDigitalAudioOpl != nil { - uncompressedDigitalAudioOpl = int(*input.UncompressedDigitalAudioOpl) - } - - uncompressedDigitalVideoOpl := 0 - if input.UncompressedDigitalVideoOpl != nil { - uncompressedDigitalVideoOpl = int(*input.UncompressedDigitalVideoOpl) - } - - return []interface{}{ - map[string]interface{}{ - "agc_and_color_stripe_restriction": agcStripeRestriction, - "allow_passing_video_content_to_unknown_output": string(input.AllowPassingVideoContentToUnknownOutput), - "analog_video_opl": analogVideoOpl, - "compressed_digital_audio_opl": compressedDigitalAudioOpl, - "compressed_digital_video_opl": compressedDigitalVideoOpl, - "digital_video_only_content_restriction": input.DigitalVideoOnlyContentRestriction, - "explicit_analog_television_output_restriction": flattenExplicitAnalogTelevisionOutputRestriction(input.ExplicitAnalogTelevisionOutputRestriction), - "first_play_expiration": firstPlayExpiration, - "image_constraint_for_analog_component_video_restriction": input.ImageConstraintForAnalogComponentVideoRestriction, - "image_constraint_for_analog_computer_monitor_restriction": input.ImageConstraintForAnalogComputerMonitorRestriction, - "scms_restriction": scmsRestriction, - "uncompressed_digital_audio_opl": uncompressedDigitalAudioOpl, - "uncompressed_digital_video_opl": uncompressedDigitalVideoOpl, - }, - } -} - -func expandExplicitAnalogTelevisionOutputRestriction(input []interface{}) *contentkeypolicies.ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction { - if len(input) == 0 || input[0] == nil { - return nil - } - - restriction := input[0].(map[string]interface{}) - result := &contentkeypolicies.ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction{ - BestEffort: restriction["best_effort_enforced"].(bool), - ConfigurationData: int64(restriction["control_bits"].(int)), - } - - return result -} - -func flattenExplicitAnalogTelevisionOutputRestriction(input *contentkeypolicies.ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - return []interface{}{ - map[string]interface{}{ - "best_effort_enforced": input.BestEffort, - "control_bits": input.ConfigurationData, - }, - } -} diff --git a/internal/services/media/media_content_key_policy_resource_test.go b/internal/services/media/media_content_key_policy_resource_test.go deleted file mode 100644 index cdd29de81a0d5..0000000000000 --- a/internal/services/media/media_content_key_policy_resource_test.go +++ /dev/null @@ -1,292 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type MediaContentKeyPolicyResource struct{} - -func TestAccMediaContentKeyPolicy_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_content_key_policy` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_content_key_policy", "test") - r := MediaContentKeyPolicyResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Policy-1"), - check.That(data.ResourceName).Key("policy_option.#").HasValue("1"), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMediaContentKeyPolicy_update(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_content_key_policy` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_content_key_policy", "test") - r := MediaContentKeyPolicyResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.complete(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMediaContentKeyPolicy_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_content_key_policy` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_content_key_policy", "test") - r := MediaContentKeyPolicyResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Policy-1"), - check.That(data.ResourceName).Key("policy_option.#").HasValue("1"), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func TestAccMediaContentKeyPolicy_complete(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_content_key_policy` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_content_key_policy", "test") - r := MediaContentKeyPolicyResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Policy-1"), - check.That(data.ResourceName).Key("policy_option.#").HasValue("4"), - ), - }, - data.ImportStep(), - }) -} - -func (r MediaContentKeyPolicyResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := contentkeypolicies.ParseContentKeyPolicyID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.Media.V20220801Client.ContentKeyPolicies.Get(ctx, *id) - if err != nil { - return nil, fmt.Errorf("retrieving %s: %+v", *id, err) - } - - return utils.Bool(resp.Model != nil), nil -} - -func (r MediaContentKeyPolicyResource) basic(data acceptance.TestData) string { - template := r.template(data) - return fmt.Sprintf(` -%s - -resource "azurerm_media_content_key_policy" "test" { - name = "Policy-1" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name - description = "My Policy Description" - policy_option { - name = "ClearKeyOption" - clear_key_configuration_enabled = true - token_restriction { - issuer = "urn:issuer" - audience = "urn:audience" - token_type = "Swt" - primary_symmetric_token_key = "AAAAAAAAAAAAAAAAAAAAAA==" - } - } -} -`, template) -} - -func (r MediaContentKeyPolicyResource) requiresImport(data acceptance.TestData) string { - template := r.basic(data) - return fmt.Sprintf(` -%s - -resource "azurerm_media_content_key_policy" "import" { - name = azurerm_media_content_key_policy.test.name - resource_group_name = azurerm_media_content_key_policy.test.resource_group_name - media_services_account_name = azurerm_media_content_key_policy.test.media_services_account_name - description = "My Policy Description" - policy_option { - name = "ClearKeyOption" - clear_key_configuration_enabled = true - token_restriction { - issuer = "urn:issuer" - audience = "urn:audience" - token_type = "Swt" - primary_symmetric_token_key = "AAAAAAAAAAAAAAAAAAAAAA==" - } - } -} -`, template) -} - -func (r MediaContentKeyPolicyResource) complete(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_content_key_policy" "test" { - name = "Policy-1" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name - description = "My Policy Description" - policy_option { - name = "fairPlay" - fairplay_configuration { - ask = "bb566284cc124a21c435a92cd3c108c4" - pfx = "MIIG7gIBAzCCBqoGCSqGSIb3DQEHAaCCBpsEggaXMIIGkzCCA7wGCSqGSIb3DQEHAaCCA60EggOpMIIDpTCCA6EGCyqGSIb3DQEMCgECoIICtjCCArIwHAYKKoZIhvcNAQwBAzAOBAiV65vFfxLDVgICB9AEggKQx2dxWefICYodVhRLSQVMJRYy5QkM1VySPAXGP744JHrb+s0Y8i/6a+a5itZGlXw3kvxyflHtSsuuBCaYJ1WOCp9jspixJEliFHXTcel96AgZlT5tB7vC6pdZnz8rb+lyxFs99x2CW52EsadoDlRsYrmkmKdnB0cx2JHJbLeXuKV/fjuRJSqCFcDa6Nre8AlBX0zKGIYGLJ1Cfpora4kNTXxu0AwEowzGmoCxqrpKbO1QDi1hZ1qHrtZ1ienAKfiTXaGH4AMQzyut0AaymxalrRbXibJYuefLRvXqx0oLZKVLAX8fR1gnac6Mrr7GkdHaKCsk4eOi98acR7bjiyRRVYYS4B6Y0tCeRJNe6zeYVmLdtatuOlOEVDT6AKrJJMFMyITVS+2D771ge6m37FbJ36K3/eT/HRq1YDsxfD/BY+X7eMIwQrVnD5nK7avXfbIni57n5oWLkE9Vco8uBlMdrx4xHt9vpe42Pz2Yh2O4WtvxcgxrAknvPpV1ZsAJCfvm9TTcg8qZpjyePn3B9TvFVSXMJHn/rzu6OJAgFgVFAe1tPGLh1XBxAvwpB8EqcycIIUUFUBy4HgYCicjI2jp6s8Kk293Uc/TA2623LrWgP/Xm5hVB7lP1k6W9LDivOlAA96D0Cbk08Yv6arkCYj7ONFO8VZbO0zKAAOLHMw/ZQRIutGLrDlqgTDeRXRuReX7TNjDBxp2rzJBY0uU5g9BMFxQrbQwEx9HsnO4dVFG4KLbHmYWhlwS2V2uZtY6D6elOXY3SX50RwhC4+0trUMi/ODtOxAc+lMQk2FNDcNeKIX5wHwFRS+sFBu5Um4Jfj6Ua4w1izmu2KiPfDd3vJsm5Dgcci3fPfdSfpIq4uR6d3JQxgdcwEwYJKoZIhvcNAQkVMQYEBAEAAAAwWwYJKoZIhvcNAQkUMU4eTAB7ADcAMQAxADAANABBADgARgAtADQAQgBFADAALQA0AEEAMgA4AC0AOAAyADIANQAtAEYANwBBADcAMwBGAEMAQQAwAEMARABEAH0wYwYJKwYBBAGCNxEBMVYeVABNAGkAYwByAG8AcwBvAGYAdAAgAEIAYQBzAGUAIABDAHIAeQBwAHQAbwBnAHIAYQBwAGgAaQBjACAAUAByAG8AdgBpAGQAZQByACAAdgAxAC4AMDCCAs8GCSqGSIb3DQEHBqCCAsAwggK8AgEAMIICtQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQISS7mG/riQJkCAgfQgIICiPSGg5axP4JM+GmiVEqOHTVAPw2AM8OPnn1q0mIw54oC2WOJw3FFThYHmxTQzQ1feVmnkVCv++eFp+BYTcWTa+ehl/3/Nvr5uLTzDxmCShacKwoWXOKtSLh6mmgydvMqSf6xv1bPsloodtrRxhprI2lBNBW2uw8az9eLdvURYmhjGPf9klEy/6OCA5jDT5XZMunwiQT5mYNMF7wAQ5PCz2dJQqm1n72A6nUHPkHEusN7iH/+mv5d3iaKxn7/ShxLKHfjMd+r/gv27ylshVHiN4mVStAg+MiLrVvr5VH46p6oosImvS3ZO4D5wTmh/6wtus803qN4QB/Y9n4rqEJ4Dn619h+6O7FChzWkx7kvYIzIxvfnj1PCFTEjUwc7jbuF013W/z9zQi2YEq9AzxMcGro0zjdt2sf30zXSfaRNt0UHHRDkLo7yFUJG5Ka1uWU8paLuXUUiiMUf24Bsfdg2A2n+3Qa7g25OvAM1QTpMwmMWL9sY2hxVUGIKVrnj8c4EKuGJjVDXrze5g9O/LfZr5VSjGu5KsN0eYI3mcePF7XM0azMtTNQYVRmeWxYW+XvK5MaoLEkrFG8C5+JccIlN588jowVIPqP321S/EyFiAmrRdAWkqrc9KH+/eINCFqjut2YPkCaTM9mnJAAqWgggUWkrOKT/ByS6IAQwyEBNFbY0TWyxKt6vZL1EW/6HgZCsxeYycNhnPr2qJNZZMNzmdMRp2GRLcfBH8KFw1rAyua0VJoTLHb23ZAsEY74BrEEiK9e/oOjXkHzQjlmrfQ9rSN2eQpRrn0W8I229WmBO2suG+AQ3aY8kDtBMkjmJno7txUh1K5D6tJTO7MQp343A2AhyJkhYA7NPnDA7MB8wBwYFKw4DAhoEFPO82HDlCzlshWlnMoQPStm62TMEBBQsPmvwbZ5OlwC9+NDF1AC+t67WTgICB9A=" - pfx_password = "password" - rental_duration_seconds = 2249 - rental_and_lease_key_type = "PersistentUnlimited" - } - open_restriction_enabled = true - } - policy_option { - name = "playReady" - playready_response_custom_data = "test custom data" - playready_configuration_license { - allow_test_devices = true - begin_date = "2017-10-16T18:22:53Z" - security_level = "SL150" - play_right { - scms_restriction = 2 - digital_video_only_content_restriction = false - image_constraint_for_analog_component_video_restriction = false - image_constraint_for_analog_computer_monitor_restriction = false - allow_passing_video_content_to_unknown_output = "NotAllowed" - uncompressed_digital_video_opl = 100 - uncompressed_digital_audio_opl = 200 - analog_video_opl = 150 - compressed_digital_audio_opl = 250 - compressed_digital_video_opl = 400 - explicit_analog_television_output_restriction { - best_effort_enforced = true - control_bits = 3 - } - } - license_type = "Persistent" - content_type = "UltraVioletDownload" - content_key_location_from_header_enabled = true - } - open_restriction_enabled = true - } - policy_option { - name = "clearKey" - clear_key_configuration_enabled = true - token_restriction { - issuer = "urn:issuer" - audience = "urn:audience" - token_type = "Swt" - primary_symmetric_token_key = "AAAAAAAAAAAAAAAAAAAAAA==" - alternate_key { - rsa_token_key_exponent = "AQAB" - rsa_token_key_modulus = "AQAD" - } - alternate_key { - symmetric_token_key = "BBAAAAAAAAAAAAAAAAAAAA==" - } - } - } - policy_option { - name = "widevine" - widevine_configuration_template = jsonencode({ - "allowed_track_types" : "SD_HD", - "content_key_specs" : [{ - "track_type" : "SD", - "security_level" : 1, - "required_output_protection" : { - "hdcp" : "HDCP_V2" - }, - }], - "policy_overrides" : { - "can_play" : true, - "can_persist" : true, - "can_renew" : false, - }, - }) - open_restriction_enabled = true - } -} -`, r.template(data)) -} - -func (r MediaContentKeyPolicyResource) template(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-media-%d" - location = "%s" -} - -resource "azurerm_storage_account" "test" { - name = "acctestsa1%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "test" { - name = "acctestmsa%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - storage_account { - id = azurerm_storage_account.test.id - is_primary = true - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomString, data.RandomString) -} diff --git a/internal/services/media/media_filter.go b/internal/services/media/media_filter.go deleted file mode 100644 index 6c02ef5c731ea..0000000000000 --- a/internal/services/media/media_filter.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media - -// define constants based on docs https://docs.microsoft.com/en-us/azure/media-services/latest/filters-concept -const incrementsInASecond = 10000000 - -const ( - nanoSecondsInAIncrement = 100 - milliSecondsInASecond = 1000 -) diff --git a/internal/services/media/media_job_resource.go b/internal/services/media/media_job_resource.go deleted file mode 100644 index 50a8a400411fb..0000000000000 --- a/internal/services/media/media_job_resource.go +++ /dev/null @@ -1,395 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media - -import ( - "fmt" - "log" - "regexp" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/media/migration" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceMediaJob() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceMediaJobCreate, - Read: resourceMediaJobRead, - Update: resourceMediaJobUpdate, - Delete: resourceMediaJobDelete, - - DeprecationMessage: azureMediaRetirementMessage, - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := encodings.ParseJobID(id) - return err - }), - - StateUpgraders: pluginsdk.StateUpgrades(map[int]pluginsdk.StateUpgrade{ - 0: migration.JobV0ToV1{}, - }), - SchemaVersion: 1, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile("^[-a-zA-Z0-9(_)]{1,128}$"), - "Job name must be 1 - 128 characters long, can contain letters, numbers, underscores, and hyphens (but the first and last character must be a letter or number).", - ), - }, - - "resource_group_name": commonschema.ResourceGroupName(), - - "media_services_account_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile("^[-a-z0-9]{3,24}$"), - "Media Services Account name must be 3 - 24 characters long, contain only lowercase letters and numbers.", - ), - }, - - "transform_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile("^[-a-zA-Z0-9(_)]{1,128}$"), - "Transform name must be 1 - 128 characters long, can contain letters, numbers, underscores, and hyphens (but the first and last character must be a letter or number).", - ), - }, - - "input_asset": { - Type: pluginsdk.TypeList, - Required: true, - ForceNew: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile("^[-a-zA-Z0-9]{1,128}$"), - "Asset name must be 1 - 128 characters long, contain only letters, hyphen and numbers.", - ), - }, - "label": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - - "output_asset": { - Type: pluginsdk.TypeList, - Required: true, - ForceNew: true, - MinItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile("^[-a-zA-Z0-9]{1,128}$"), - "Asset name must be 1 - 128 characters long, contain only letters, hyphen and numbers.", - ), - }, - "label": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - - "priority": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - Default: string(encodings.PriorityNormal), - ValidateFunc: validation.StringInSlice([]string{ - string(encodings.PriorityHigh), - string(encodings.PriorityNormal), - string(encodings.PriorityLow), - }, false), - }, - - "description": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - } -} - -func resourceMediaJobCreate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220701Client.Encodings - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := encodings.NewJobID(subscriptionId, d.Get("resource_group_name").(string), d.Get("media_services_account_name").(string), d.Get("transform_name").(string), d.Get("name").(string)) - if d.IsNewResource() { - existing, err := client.JobsGet(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for presence of existing %s: %+v", id, err) - } - } - - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_media_job", id.ID()) - } - } - - payload := encodings.Job{ - Properties: &encodings.JobProperties{ - Description: utils.String(d.Get("description").(string)), - }, - } - - if v, ok := d.GetOk("priority"); ok { - payload.Properties.Priority = pointer.To(encodings.Priority(v.(string))) - } - - if v, ok := d.GetOk("input_asset"); ok { - payload.Properties.Input = expandInputAsset(v.([]interface{})) - } - - if v, ok := d.GetOk("output_asset"); ok { - outputAssets, err := expandOutputAssets(v.([]interface{})) - if err != nil { - return err - } - payload.Properties.Outputs = *outputAssets - } - - if _, err := client.JobsCreate(ctx, id, payload); err != nil { - return fmt.Errorf("creating %s: %+v", id, err) - } - - d.SetId(id.ID()) - - return resourceMediaJobRead(d, meta) -} - -func resourceMediaJobRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220701Client.Encodings - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := encodings.ParseJobID(d.Id()) - if err != nil { - return err - } - - resp, err := client.JobsGet(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - log.Printf("[INFO] %s was not found - removing from state", id) - d.SetId("") - return nil - } - return fmt.Errorf("retrieving %s: %+v", id, err) - } - - d.Set("name", id.JobName) - d.Set("transform_name", id.TransformName) - d.Set("media_services_account_name", id.MediaServiceName) - d.Set("resource_group_name", id.ResourceGroupName) - - if model := resp.Model; model != nil { - if props := model.Properties; props != nil { - d.Set("description", props.Description) - - priority := "" - if props.Priority != nil { - priority = string(*props.Priority) - } - d.Set("priority", priority) - - inputAsset, err := flattenInputAsset(props.Input) - if err != nil { - return err - } - if err = d.Set("input_asset", inputAsset); err != nil { - return fmt.Errorf("flattening `input_asset`: %s", err) - } - - outputAssets, err := flattenOutputAssets(props.Outputs) - if err != nil { - return fmt.Errorf("flattening `output_asset`: %s", err) - } - if err = d.Set("output_asset", outputAssets); err != nil { - return fmt.Errorf("setting `output_asset`: %s", err) - } - } - } - - return nil -} - -func resourceMediaJobUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220701Client.Encodings - ctx, cancel := timeouts.ForUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := encodings.ParseJobID(d.Id()) - if err != nil { - return err - } - - // TODO: refactor this to use - payload := encodings.Job{ - Properties: &encodings.JobProperties{ - Description: utils.String(d.Get("description").(string)), - }, - } - - if v, ok := d.GetOk("priority"); ok { - payload.Properties.Priority = pointer.To(encodings.Priority(v.(string))) - } - - if v, ok := d.GetOk("input_asset"); ok { - inputAsset := expandInputAsset(v.([]interface{})) - payload.Properties.Input = inputAsset - } - - if v, ok := d.GetOk("output_asset"); ok { - outputAssets, err := expandOutputAssets(v.([]interface{})) - if err != nil { - return err - } - payload.Properties.Outputs = *outputAssets - } - - if _, err := client.JobsUpdate(ctx, *id, payload); err != nil { - return fmt.Errorf("updating %s: %+v", id, err) - } - - return resourceMediaJobRead(d, meta) -} - -func resourceMediaJobDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220701Client.Encodings - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := encodings.ParseJobID(d.Id()) - if err != nil { - return err - } - - // Cancel the job before we attempt to delete it. - if _, err := client.JobsCancelJob(ctx, *id); err != nil { - return fmt.Errorf("cancelling %s: %+v", *id, err) - } - - if _, err := client.JobsDelete(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - - return nil -} - -func expandInputAsset(input []interface{}) encodings.JobInput { - inputAsset := input[0].(map[string]interface{}) - return &encodings.JobInputAsset{ - AssetName: inputAsset["name"].(string), - Label: utils.String(inputAsset["label"].(string)), - } -} - -func flattenInputAsset(input encodings.JobInput) ([]interface{}, error) { - if input == nil { - return make([]interface{}, 0), nil - } - - asset, ok := input.(encodings.JobInputAsset) - if !ok { - return nil, fmt.Errorf("Unexpected type for Input Asset. Currently only JobInputAsset is supported.") - } - - label := "" - if asset.Label != nil { - label = *asset.Label - } - - return []interface{}{ - map[string]interface{}{ - "name": asset.AssetName, - "label": label, - }, - }, nil -} - -func expandOutputAssets(input []interface{}) (*[]encodings.JobOutput, error) { - if len(input) == 0 { - return nil, fmt.Errorf("Job must contain at least one output_asset.") - } - - outputAssets := make([]encodings.JobOutput, 0) - for _, output := range input { - v := output.(map[string]interface{}) - - outputAssets = append(outputAssets, encodings.JobOutputAsset{ - AssetName: v["name"].(string), - Label: utils.String(v["label"].(string)), - }) - } - - return &outputAssets, nil -} - -func flattenOutputAssets(input []encodings.JobOutput) ([]interface{}, error) { - outputAssets := make([]interface{}, 0) - for _, output := range input { - outputAssetJob, ok := output.(encodings.JobOutputAsset) - if !ok { - return nil, fmt.Errorf("unexpected type for output_asset. Currently only JobOutputAsset is supported.") - } - - label := "" - if outputAssetJob.Label != nil { - label = *outputAssetJob.Label - } - - outputAssets = append(outputAssets, map[string]interface{}{ - "name": outputAssetJob.AssetName, - "label": label, - }) - } - return outputAssets, nil -} diff --git a/internal/services/media/media_job_resource_test.go b/internal/services/media/media_job_resource_test.go deleted file mode 100644 index 54c5e1023d37c..0000000000000 --- a/internal/services/media/media_job_resource_test.go +++ /dev/null @@ -1,254 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type MediaJobResource struct{} - -func TestAccMediaJob_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_job` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_job", "test") - r := MediaJobResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Job-1"), - check.That(data.ResourceName).Key("input_asset.0.name").HasValue("inputAsset"), - check.That(data.ResourceName).Key("output_asset.0.name").HasValue("outputAsset"), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMediaJob_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_job` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_job", "test") - r := MediaJobResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Job-1"), - check.That(data.ResourceName).Key("input_asset.0.name").HasValue("inputAsset"), - check.That(data.ResourceName).Key("output_asset.0.name").HasValue("outputAsset"), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func TestAccMediaJob_complete(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_job` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_job", "test") - r := MediaJobResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("description").HasValue("Job description"), - check.That(data.ResourceName).Key("priority").HasValue("Normal"), - check.That(data.ResourceName).Key("input_asset.0.label").HasValue("Input"), - check.That(data.ResourceName).Key("output_asset.0.label").HasValue("Output"), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMediaJob_update(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_job` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_job", "test") - r := MediaJobResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Job-1"), - check.That(data.ResourceName).Key("input_asset.0.name").HasValue("inputAsset"), - check.That(data.ResourceName).Key("output_asset.0.name").HasValue("outputAsset"), - ), - }, - data.ImportStep(), - { - Config: r.complete(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("description").HasValue("Job description"), - check.That(data.ResourceName).Key("priority").HasValue("Normal"), - check.That(data.ResourceName).Key("input_asset.0.label").HasValue("Input"), - check.That(data.ResourceName).Key("output_asset.0.label").HasValue("Output"), - ), - }, - data.ImportStep(), - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Job-1"), - check.That(data.ResourceName).Key("input_asset.0.name").HasValue("inputAsset"), - check.That(data.ResourceName).Key("output_asset.0.name").HasValue("outputAsset"), - ), - }, - data.ImportStep(), - }) -} - -func (MediaJobResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := encodings.ParseJobID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.Media.V20220701Client.Encodings.JobsGet(ctx, *id) - if err != nil { - return nil, fmt.Errorf("retrieving %s: %+v", *id, err) - } - - return utils.Bool(resp.Model != nil), nil -} - -func (r MediaJobResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_job" "test" { - name = "Job-1" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name - transform_name = azurerm_media_transform.test.name - input_asset { - name = azurerm_media_asset.input.name - } - output_asset { - name = azurerm_media_asset.output.name - } -} -`, r.template(data)) -} - -func (r MediaJobResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_job" "import" { - name = azurerm_media_job.test.name - resource_group_name = azurerm_media_job.test.resource_group_name - media_services_account_name = azurerm_media_job.test.media_services_account_name - transform_name = azurerm_media_job.test.transform_name - input_asset { - name = azurerm_media_job.test.input_asset[0].name - } - output_asset { - name = azurerm_media_job.test.output_asset[0].name - } -} -`, r.basic(data)) -} - -func (r MediaJobResource) complete(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_job" "test" { - name = "Job-1" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name - transform_name = azurerm_media_transform.test.name - description = "Job description" - priority = "Normal" - input_asset { - name = azurerm_media_asset.input.name - label = "Input" - } - output_asset { - name = azurerm_media_asset.output.name - label = "Output" - } -} -`, r.template(data)) -} - -func (MediaJobResource) template(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-media-%d" - location = "%s" -} - -resource "azurerm_storage_account" "test" { - name = "acctestsa1%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "test" { - name = "acctestmsa%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - storage_account { - id = azurerm_storage_account.test.id - is_primary = true - } -} - -resource "azurerm_media_transform" "test" { - name = "transform1" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name - output { - relative_priority = "Normal" - on_error_action = "ContinueJob" - builtin_preset { - preset_name = "AACGoodQualityAudio" - } - } -} - -resource "azurerm_media_asset" "input" { - name = "inputAsset" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name - description = "Input Asset description" -} - -resource "azurerm_media_asset" "output" { - name = "outputAsset" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name - description = "Output Asset description" -} -`, data.RandomInteger, data.Locations.Primary, data.RandomString, data.RandomString) -} diff --git a/internal/services/media/media_live_output_resource.go b/internal/services/media/media_live_output_resource.go deleted file mode 100644 index 1e60316d86db6..0000000000000 --- a/internal/services/media/media_live_output_resource.go +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media - -import ( - "fmt" - "log" - "regexp" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/media/migration" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceMediaLiveOutput() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceMediaLiveOutputCreate, - Read: resourceMediaLiveOutputRead, - Delete: resourceMediaLiveOutputDelete, - - DeprecationMessage: azureMediaRetirementMessage, - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := liveoutputs.ParseLiveOutputID(id) - return err - }), - - StateUpgraders: pluginsdk.StateUpgrades(map[int]pluginsdk.StateUpgrade{ - 0: migration.LiveOutputV0ToV1{}, - }), - SchemaVersion: 1, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "live_event_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: liveevents.ValidateLiveEventID, - }, - - "archive_window_duration": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.ISO8601DurationBetween("PT1M", "PT25H"), - }, - - "asset_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile("^[-a-zA-Z0-9]{1,128}$"), - "Asset name must be 1 - 128 characters long, contain only letters, hyphen and numbers.", - ), - }, - - "description": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "hls_fragments_per_ts_segment": { - Type: pluginsdk.TypeInt, - Optional: true, - ForceNew: true, - ValidateFunc: validation.IntAtLeast(0), - }, - - "manifest_name": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "output_snap_time_in_seconds": { - Type: pluginsdk.TypeInt, - Optional: true, - ForceNew: true, - ValidateFunc: validation.IntAtLeast(0), - }, - - "rewind_window_duration": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validate.ISO8601DurationBetween("PT1M", "PT25H"), - }, - }, - } -} - -func resourceMediaLiveOutputCreate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220801Client.LiveOutputs - ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d) - defer cancel() - - eventId, err := liveevents.ParseLiveEventID(d.Get("live_event_id").(string)) - if err != nil { - return err - } - id := liveoutputs.NewLiveOutputID(eventId.SubscriptionId, eventId.ResourceGroupName, eventId.MediaServiceName, eventId.LiveEventName, d.Get("name").(string)) - if d.IsNewResource() { - existing, err := client.Get(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for presence of existing %s: %+v", id, err) - } - } - - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_media_live_event_output", id.ID()) - } - } - - parameters := liveoutputs.LiveOutput{ - Properties: &liveoutputs.LiveOutputProperties{}, - } - - if archiveWindowLength, ok := d.GetOk("archive_window_duration"); ok { - parameters.Properties.ArchiveWindowLength = archiveWindowLength.(string) - } - - if assetName, ok := d.GetOk("asset_name"); ok { - parameters.Properties.AssetName = assetName.(string) - } - - if description, ok := d.GetOk("description"); ok { - parameters.Properties.Description = utils.String(description.(string)) - } - - if hlsFragmentsPerTsSegment, ok := d.GetOk("hls_fragments_per_ts_segment"); ok { - parameters.Properties.Hls = &liveoutputs.Hls{ - FragmentsPerTsSegment: pointer.To(int64(hlsFragmentsPerTsSegment.(int))), - } - } - - if manifestName, ok := d.GetOk("manifest_name"); ok { - parameters.Properties.ManifestName = utils.String(manifestName.(string)) - } - - if outputSnapTime, ok := d.GetOk("output_snap_time_in_seconds"); ok { - parameters.Properties.OutputSnapTime = utils.Int64(int64(outputSnapTime.(int))) - } - - if rewindWindowLength, ok := d.GetOk("rewind_window_duration"); ok { - parameters.Properties.RewindWindowLength = utils.String(rewindWindowLength.(string)) - } - - if err := client.CreateThenPoll(ctx, id, parameters); err != nil { - return fmt.Errorf("creating %s: %+v", id, err) - } - - d.SetId(id.ID()) - - return resourceMediaLiveOutputRead(d, meta) -} - -func resourceMediaLiveOutputRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220801Client.LiveOutputs - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := liveoutputs.ParseLiveOutputID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - log.Printf("[INFO] %s was not found - removing from state", id) - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving %s: %+v", id, err) - } - - d.Set("name", id.LiveOutputName) - d.Set("live_event_id", liveevents.NewLiveEventID(id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.LiveEventName).ID()) - - if model := resp.Model; model != nil { - if props := model.Properties; props != nil { - d.Set("archive_window_duration", props.ArchiveWindowLength) - d.Set("asset_name", props.AssetName) - d.Set("description", props.Description) - - var hlsFragmentsPerTsSegment int64 - if props.Hls != nil && props.Hls.FragmentsPerTsSegment != nil { - hlsFragmentsPerTsSegment = *props.Hls.FragmentsPerTsSegment - } - d.Set("hls_fragments_per_ts_segment", hlsFragmentsPerTsSegment) - d.Set("manifest_name", props.ManifestName) - - var outputSnapTime int64 - if props.OutputSnapTime != nil { - outputSnapTime = *props.OutputSnapTime - } - d.Set("output_snap_time_in_seconds", outputSnapTime) - d.Set("rewind_window_duration", props.RewindWindowLength) - } - } - - return nil -} - -func resourceMediaLiveOutputDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220801Client.LiveOutputs - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := liveoutputs.ParseLiveOutputID(d.Id()) - if err != nil { - return err - } - - if err := client.DeleteThenPoll(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", id, err) - } - - return nil -} diff --git a/internal/services/media/media_live_output_resource_test.go b/internal/services/media/media_live_output_resource_test.go deleted file mode 100644 index d4b6111b6514d..0000000000000 --- a/internal/services/media/media_live_output_resource_test.go +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type LiveOutputResource struct{} - -func TestAccLiveOutput_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_live_event_output` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_live_event_output", "test") - r := LiveOutputResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Output-1"), - ), - }, - data.ImportStep(), - }) -} - -func TestAccLiveOutput_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_live_event_output` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_live_event_output", "test") - r := LiveOutputResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Output-1"), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func TestAccLiveOutput_complete(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_live_event_output` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_live_event_output", "test") - r := LiveOutputResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("manifest_name").HasValue("testmanifest"), - check.That(data.ResourceName).Key("hls_fragments_per_ts_segment").HasValue("5"), - ), - }, - data.ImportStep(), - }) -} - -func TestAccLiveOutput_update(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_live_event_output` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_live_event_output", "test") - r := LiveOutputResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Output-1"), - ), - }, - data.ImportStep(), - { - Config: r.complete(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("manifest_name").HasValue("testmanifest"), - check.That(data.ResourceName).Key("hls_fragments_per_ts_segment").HasValue("5"), - ), - }, - data.ImportStep(), - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Output-1"), - ), - }, - data.ImportStep(), - }) -} - -func (LiveOutputResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := liveoutputs.ParseLiveOutputID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.Media.V20220801Client.LiveOutputs.Get(ctx, *id) - if err != nil { - return nil, fmt.Errorf("retrieving %s: %+v", *id, err) - } - - return utils.Bool(resp.Model != nil), nil -} - -func (r LiveOutputResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_live_event_output" "test" { - name = "Output-1" - live_event_id = azurerm_media_live_event.test.id - archive_window_duration = "PT5M" - asset_name = azurerm_media_asset.test.name -} -`, r.template(data)) -} - -func (r LiveOutputResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_live_event_output" "import" { - name = azurerm_media_live_event_output.test.name - live_event_id = azurerm_media_live_event.test.id - archive_window_duration = "PT5M" - asset_name = azurerm_media_asset.test.name -} -`, r.basic(data)) -} - -func (r LiveOutputResource) complete(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_live_event_output" "test" { - name = "Output-2" - live_event_id = azurerm_media_live_event.test.id - archive_window_duration = "PT5M" - asset_name = azurerm_media_asset.test.name - description = "Test live output 1" - manifest_name = "testmanifest" - output_snap_time_in_seconds = 0 - hls_fragments_per_ts_segment = 5 - rewind_window_duration = "PT5M" -} -`, r.template(data)) -} - -func (LiveOutputResource) template(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-media-%d" - location = "%s" -} - -resource "azurerm_storage_account" "test" { - name = "acctestsa1%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "test" { - name = "acctestmsa%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - storage_account { - id = azurerm_storage_account.test.id - is_primary = true - } -} - -resource "azurerm_media_asset" "test" { - name = "inputAsset" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name -} - -resource "azurerm_media_live_event" "test" { - name = "event" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name - location = azurerm_resource_group.test.location - - input { - streaming_protocol = "RTMP" - key_frame_interval_duration = "PT6S" - ip_access_control_allow { - name = "AllowAll" - address = "0.0.0.0" - subnet_prefix_length = 0 - } - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomString, data.RandomString) -} diff --git a/internal/services/media/media_service_account_filter_resource.go b/internal/services/media/media_service_account_filter_resource.go deleted file mode 100644 index b871fef1b386d..0000000000000 --- a/internal/services/media/media_service_account_filter_resource.go +++ /dev/null @@ -1,475 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media - -import ( - "context" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters" - "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -var _ sdk.ResourceWithUpdate = AccountFilterResource{} -var _ sdk.ResourceWithDeprecationAndNoReplacement = AccountFilterResource{} - -type AccountFilterModel struct { - Name string `tfschema:"name"` - ResourceGroupName string `tfschema:"resource_group_name"` - MediaServicesAccountName string `tfschema:"media_services_account_name"` - FirstQualityBitrate int64 `tfschema:"first_quality_bitrate"` - PresentationTimeRange []PresentationTimeRange `tfschema:"presentation_time_range"` - TrackSelection []TrackSelection `tfschema:"track_selection"` -} - -type PresentationTimeRange struct { - EndInUnits int64 `tfschema:"end_in_units"` - ForceEnd bool `tfschema:"force_end"` - LiveBackoffInUnits int64 `tfschema:"live_backoff_in_units"` - PresentationWindowInUnits int64 `tfschema:"presentation_window_in_units"` - StartInUnits int64 `tfschema:"start_in_units"` - UnitTimescaleInMillisceonds int64 `tfschema:"unit_timescale_in_milliseconds"` -} - -type TrackSelection struct { - Conditions []Condition `tfschema:"condition"` -} - -type Condition struct { - Operation string `tfschema:"operation"` - Property string `tfschema:"property"` - Value string `tfschema:"value"` -} - -type AccountFilterResource struct{} - -func (r AccountFilterResource) DeprecationMessage() string { - return azureMediaRetirementMessage -} - -func (r AccountFilterResource) Arguments() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "resource_group_name": commonschema.ResourceGroupName(), - - "media_services_account_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "first_quality_bitrate": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(1), - }, - - "presentation_time_range": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "end_in_units": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - AtLeastOneOf: []string{ - "presentation_time_range.0.end_in_units", "presentation_time_range.0.force_end", "presentation_time_range.0.live_backoff_in_units", - "presentation_time_range.0.presentation_window_in_units", "presentation_time_range.0.start_in_units", - }, - }, - - "force_end": { - Type: pluginsdk.TypeBool, - Optional: true, - AtLeastOneOf: []string{ - "presentation_time_range.0.end_in_units", "presentation_time_range.0.force_end", "presentation_time_range.0.live_backoff_in_units", - "presentation_time_range.0.presentation_window_in_units", "presentation_time_range.0.start_in_units", - }, - }, - - "live_backoff_in_units": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - AtLeastOneOf: []string{ - "presentation_time_range.0.end_in_units", "presentation_time_range.0.force_end", "presentation_time_range.0.live_backoff_in_units", - "presentation_time_range.0.presentation_window_in_units", "presentation_time_range.0.start_in_units", - }, - }, - - "presentation_window_in_units": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - AtLeastOneOf: []string{ - "presentation_time_range.0.end_in_units", "presentation_time_range.0.force_end", "presentation_time_range.0.live_backoff_in_units", - "presentation_time_range.0.presentation_window_in_units", "presentation_time_range.0.start_in_units", - }, - }, - - "start_in_units": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - AtLeastOneOf: []string{ - "presentation_time_range.0.end_in_units", "presentation_time_range.0.force_end", "presentation_time_range.0.live_backoff_in_units", - "presentation_time_range.0.presentation_window_in_units", "presentation_time_range.0.start_in_units", - }, - }, - - "unit_timescale_in_milliseconds": { - Type: pluginsdk.TypeInt, - Required: true, - ValidateFunc: validation.IntAtLeast(1), - }, - }, - }, - }, - - "track_selection": { - Type: pluginsdk.TypeList, - Optional: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "condition": { - Type: pluginsdk.TypeList, - Required: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "operation": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - string(accountfilters.FilterTrackPropertyCompareOperationEqual), - string(accountfilters.FilterTrackPropertyCompareOperationNotEqual), - }, false), - }, - - "property": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - string(accountfilters.FilterTrackPropertyTypeBitrate), - string(accountfilters.FilterTrackPropertyTypeFourCC), - string(accountfilters.FilterTrackPropertyTypeLanguage), - string(accountfilters.FilterTrackPropertyTypeName), - string(accountfilters.FilterTrackPropertyTypeType), - }, false), - }, - - "value": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - }, - }, - }, - } -} - -func (r AccountFilterResource) Attributes() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{} -} - -func (r AccountFilterResource) ResourceType() string { - return "azurerm_media_services_account_filter" -} - -func (r AccountFilterResource) IDValidationFunc() pluginsdk.SchemaValidateFunc { - return accountfilters.ValidateAccountFilterID -} - -func (r AccountFilterResource) ModelObject() interface{} { - return &AccountFilterModel{} -} - -func (r AccountFilterResource) Create() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - metadata.Logger.Info("Decoding state..") - var state AccountFilterModel - if err := metadata.Decode(&state); err != nil { - return err - } - - client := metadata.Client.Media.V20220801Client.AccountFilters - subscriptionId := metadata.Client.Account.SubscriptionId - - id := accountfilters.NewAccountFilterID(subscriptionId, state.ResourceGroupName, state.MediaServicesAccountName, state.Name) - metadata.Logger.Infof("creating %s", id) - - existing, err := client.Get(ctx, id) - if err != nil && !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for the presence of an existing %s: %+v", id, err) - } - if !response.WasNotFound(existing.HttpResponse) { - return metadata.ResourceRequiresImport(r.ResourceType(), id) - } - - input := accountfilters.AccountFilter{ - Name: utils.String(state.Name), - Properties: &accountfilters.MediaFilterProperties{ - PresentationTimeRange: expandAccountFilterPresentationTimeRange(state.PresentationTimeRange), - Tracks: expandAccountFilterTrackSelections(state.TrackSelection), - }, - } - if state.FirstQualityBitrate != 0 { - input.Properties.FirstQuality = &accountfilters.FirstQuality{ - Bitrate: state.FirstQualityBitrate, - } - } - - if _, err = client.CreateOrUpdate(ctx, id, input); err != nil { - return fmt.Errorf("creating %s: %+v", id, err) - } - - metadata.SetID(id) - return nil - }, - Timeout: 30 * time.Minute, - } -} - -func (r AccountFilterResource) Read() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.Media.V20220801Client.AccountFilters - id, err := accountfilters.ParseAccountFilterID(metadata.ResourceData.Id()) - if err != nil { - return err - } - - metadata.Logger.Infof("retrieving %s", *id) - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - metadata.Logger.Infof("%s was not found - removing from state!", *id) - return metadata.MarkAsGone(id) - } - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - if resp.Model == nil || resp.Model.Properties == nil { - return fmt.Errorf("retrieving %s: got empty Model", *id) - } - prop := resp.Model.Properties - var firstQualityBitrate int64 - if prop.FirstQuality != nil { - firstQualityBitrate = prop.FirstQuality.Bitrate - } - - return metadata.Encode(&AccountFilterModel{ - Name: id.AccountFilterName, - ResourceGroupName: id.ResourceGroupName, - MediaServicesAccountName: id.MediaServiceName, - FirstQualityBitrate: firstQualityBitrate, - PresentationTimeRange: flattenAccountFilterPresentationTimeRange(prop.PresentationTimeRange), - TrackSelection: flattenAccountFilterTracks(prop.Tracks), - }) - }, - Timeout: 5 * time.Minute, - } -} - -func (r AccountFilterResource) Update() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - id, err := accountfilters.ParseAccountFilterID(metadata.ResourceData.Id()) - if err != nil { - return err - } - - metadata.Logger.Infof("updating %s..", *id) - client := metadata.Client.Media.V20220801Client.AccountFilters - - var state AccountFilterModel - if err := metadata.Decode(&state); err != nil { - return err - } - - resp, err := client.Get(ctx, *id) - if err != nil { - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - if resp.Model == nil || resp.Model.Properties == nil { - return fmt.Errorf("retrieving %s: got empty Model", *id) - } - existing := resp.Model - - if metadata.ResourceData.HasChange("first_quality_bitrate") { - existing.Properties.FirstQuality = &accountfilters.FirstQuality{ - Bitrate: state.FirstQualityBitrate, - } - } - - if metadata.ResourceData.HasChange("presentation_time_range") { - existing.Properties.PresentationTimeRange = expandAccountFilterPresentationTimeRange(state.PresentationTimeRange) - } - - if metadata.ResourceData.HasChange("track_selection") { - existing.Properties.Tracks = expandAccountFilterTrackSelections(state.TrackSelection) - } - - if _, err := client.CreateOrUpdate(ctx, *id, *existing); err != nil { - return fmt.Errorf("updating %s: %+v", *id, err) - } - return nil - }, - Timeout: 30 * time.Minute, - } -} - -func (r AccountFilterResource) Delete() sdk.ResourceFunc { - return sdk.ResourceFunc{ - Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.Media.V20220801Client.AccountFilters - id, err := accountfilters.ParseAccountFilterID(metadata.ResourceData.Id()) - if err != nil { - return err - } - - metadata.Logger.Infof("deleting %s..", *id) - resp, err := client.Delete(ctx, *id) - if err != nil && !response.WasNotFound(resp.HttpResponse) { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - return nil - }, - Timeout: 30 * time.Minute, - } -} - -func expandAccountFilterPresentationTimeRange(input []PresentationTimeRange) *accountfilters.PresentationTimeRange { - if len(input) == 0 { - return nil - } - - timeRange := input[0] - presentationTimeRange := &accountfilters.PresentationTimeRange{ - ForceEndTimestamp: utils.Bool(timeRange.ForceEnd), - Timescale: utils.Int64((incrementsInASecond * nanoSecondsInAIncrement) / milliSecondsInASecond / timeRange.UnitTimescaleInMillisceonds), - } - - if timeRange.EndInUnits != 0 { - presentationTimeRange.EndTimestamp = utils.Int64(timeRange.EndInUnits * milliSecondsInASecond) - } - - if timeRange.LiveBackoffInUnits != 0 { - presentationTimeRange.LiveBackoffDuration = utils.Int64(timeRange.LiveBackoffInUnits * milliSecondsInASecond) - } - - if timeRange.PresentationWindowInUnits != 0 { - presentationTimeRange.PresentationWindowDuration = utils.Int64(timeRange.PresentationWindowInUnits * milliSecondsInASecond) - } - - if timeRange.StartInUnits != 0 { - presentationTimeRange.StartTimestamp = utils.Int64(timeRange.StartInUnits * milliSecondsInASecond) - } - - return presentationTimeRange -} - -func flattenAccountFilterPresentationTimeRange(input *accountfilters.PresentationTimeRange) []PresentationTimeRange { - if input == nil { - return make([]PresentationTimeRange, 0) - } - - var unitTimescaleInMillisceonds, endInUnits, startInUnits, liveBackoffInUnits, presentationWindowInUnits int64 - var forceEnd bool - if input.Timescale != nil { - unitTimescaleInMillisceonds = (incrementsInASecond * nanoSecondsInAIncrement) / milliSecondsInASecond / *input.Timescale - } - - if input.EndTimestamp != nil { - endInUnits = *input.EndTimestamp / milliSecondsInASecond - } - - if input.ForceEndTimestamp != nil { - forceEnd = *input.ForceEndTimestamp - } - - if input.LiveBackoffDuration != nil { - liveBackoffInUnits = *input.LiveBackoffDuration / milliSecondsInASecond - } - - if input.PresentationWindowDuration != nil { - presentationWindowInUnits = *input.PresentationWindowDuration / milliSecondsInASecond - } - - if input.StartTimestamp != nil { - startInUnits = *input.StartTimestamp / milliSecondsInASecond - } - return []PresentationTimeRange{ - { - EndInUnits: endInUnits, - ForceEnd: forceEnd, - LiveBackoffInUnits: liveBackoffInUnits, - PresentationWindowInUnits: presentationWindowInUnits, - StartInUnits: startInUnits, - UnitTimescaleInMillisceonds: unitTimescaleInMillisceonds, - }, - } -} - -func expandAccountFilterTrackSelections(input []TrackSelection) *[]accountfilters.FilterTrackSelection { - results := make([]accountfilters.FilterTrackSelection, 0) - - for _, track := range input { - conditions := make([]accountfilters.FilterTrackPropertyCondition, 0) - for _, condition := range track.Conditions { - conditions = append(conditions, accountfilters.FilterTrackPropertyCondition{ - Operation: accountfilters.FilterTrackPropertyCompareOperation(condition.Operation), - Property: accountfilters.FilterTrackPropertyType(condition.Property), - Value: condition.Value, - }) - } - results = append(results, accountfilters.FilterTrackSelection{ - TrackSelections: conditions, - }) - } - - return &results -} - -func flattenAccountFilterTracks(input *[]accountfilters.FilterTrackSelection) []TrackSelection { - if input == nil { - return make([]TrackSelection, 0) - } - - result := make([]TrackSelection, 0) - for _, track := range *input { - conditions := make([]Condition, 0) - for _, condition := range track.TrackSelections { - conditions = append(conditions, Condition{ - Operation: string(condition.Operation), - Property: string(condition.Property), - Value: condition.Value, - }) - } - result = append(result, TrackSelection{ - Conditions: conditions, - }) - } - - return result -} diff --git a/internal/services/media/media_service_account_filter_resource_test.go b/internal/services/media/media_service_account_filter_resource_test.go deleted file mode 100644 index 990b8b50083df..0000000000000 --- a/internal/services/media/media_service_account_filter_resource_test.go +++ /dev/null @@ -1,232 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type AccountFilterResource struct{} - -func TestAccMediaServicesAccountFilter_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_services_account_filter` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_services_account_filter", "test") - r := AccountFilterResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMediaServicesAccountFilter_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_services_account_filter` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_services_account_filter", "test") - r := AccountFilterResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func TestAccMediaServicesAccountFilter_complete(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_services_account_filter` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_services_account_filter", "test") - r := AccountFilterResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMediaServicesAccountFilter_update(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_services_account_filter` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_services_account_filter", "test") - r := AccountFilterResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.complete(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func (AccountFilterResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := accountfilters.ParseAccountFilterID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.Media.V20220801Client.AccountFilters.Get(ctx, *id) - if err != nil { - return nil, fmt.Errorf("retrieving %s: %+v", *id, err) - } - - return utils.Bool(resp.Model != nil), nil -} - -func (r AccountFilterResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_services_account_filter" "test" { - name = "Filter-1" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name -} -`, r.template(data)) -} - -func (r AccountFilterResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_services_account_filter" "import" { - name = azurerm_media_services_account_filter.test.name - resource_group_name = azurerm_media_services_account_filter.test.resource_group_name - media_services_account_name = azurerm_media_services_account_filter.test.media_services_account_name -} -`, r.basic(data)) -} - -func (r AccountFilterResource) complete(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_services_account_filter" "test" { - name = "Filter-1" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name - first_quality_bitrate = 128000 - - presentation_time_range { - start_in_units = 0 - end_in_units = 15 - presentation_window_in_units = 90 - live_backoff_in_units = 0 - unit_timescale_in_milliseconds = 1000 - force_end = false - } - - track_selection { - condition { - property = "Type" - operation = "Equal" - value = "Audio" - } - - condition { - property = "Language" - operation = "NotEqual" - value = "en" - } - - condition { - property = "FourCC" - operation = "NotEqual" - value = "EC-3" - } - } - - track_selection { - condition { - property = "Type" - operation = "Equal" - value = "Video" - } - - condition { - property = "Bitrate" - operation = "Equal" - value = "3000000-5000000" - } - } -} -`, r.template(data)) -} - -func (AccountFilterResource) template(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-media-%d" - location = "%s" -} - -resource "azurerm_storage_account" "test" { - name = "acctestsa1%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "test" { - name = "acctestmsa%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - storage_account { - id = azurerm_storage_account.test.id - is_primary = true - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomString, data.RandomString) -} diff --git a/internal/services/media/media_services_account_resource.go b/internal/services/media/media_services_account_resource.go deleted file mode 100644 index 520bf65dd813a..0000000000000 --- a/internal/services/media/media_services_account_resource.go +++ /dev/null @@ -1,604 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media - -import ( - "fmt" - "log" - "regexp" - "strings" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" - "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/media/migration" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceMediaServicesAccount() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceMediaServicesAccountCreateUpdate, - Read: resourceMediaServicesAccountRead, - Update: resourceMediaServicesAccountCreateUpdate, - Delete: resourceMediaServicesAccountDelete, - - DeprecationMessage: azureMediaRetirementMessage, - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := accounts.ParseMediaServiceID(id) - return err - }), - - StateUpgraders: pluginsdk.StateUpgrades(map[int]pluginsdk.StateUpgrade{ - 0: migration.ServiceV0ToV1{}, - }), - SchemaVersion: 1, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile("^[-a-z0-9]{3,24}$"), - "Media Services Account name must be 3 - 24 characters long, contain only lowercase letters and numbers.", - ), - }, - - "location": commonschema.Location(), - - "resource_group_name": commonschema.ResourceGroupName(), - - "storage_account": { - Type: pluginsdk.TypeSet, - Required: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "id": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: commonids.ValidateStorageAccountID, - }, - - "is_primary": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: false, - }, - - "managed_identity": mediaServicesAccountUseManagedIdentity(), - }, - }, - }, - - "encryption": { - Type: pluginsdk.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(accounts.AccountEncryptionKeyTypeSystemKey), - ValidateFunc: validation.StringInSlice(accounts.PossibleValuesForAccountEncryptionKeyType(), false), - }, - - "key_vault_key_identifier": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.IsURLWithHTTPorHTTPS, - }, - - "current_key_identifier": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "managed_identity": mediaServicesAccountUseManagedIdentity(), - }, - }, - }, - - "identity": commonschema.SystemAssignedUserAssignedIdentityOptional(), - - "public_network_access_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: true, - }, - - "storage_authentication_type": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringInSlice([]string{ - string(accounts.StorageAuthenticationSystem), - string(accounts.StorageAuthenticationManagedIdentity), - }, false), - }, - - "key_delivery_access_control": { - Type: pluginsdk.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "default_action": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - string(accounts.DefaultActionDeny), - string(accounts.DefaultActionAllow), - }, false), - }, - - "ip_allow_list": { - Type: pluginsdk.TypeSet, - Optional: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - }, - - "tags": commonschema.Tags(), - }, - } -} - -func resourceMediaServicesAccountCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20211101Client.Accounts - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := accounts.NewMediaServiceID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) - if d.IsNewResource() { - existing, err := client.MediaservicesGet(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for existing %s: %+v", id, err) - } - } - - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_media_services_account", id.ID()) - } - } - - t := d.Get("tags").(map[string]interface{}) - - storageAccountsRaw := d.Get("storage_account").(*pluginsdk.Set).List() - storageAccounts, err := expandMediaServicesAccountStorageAccounts(storageAccountsRaw) - if err != nil { - return err - } - - identity, err := expandMediaServicesAccountIdentity(d.Get("identity").([]interface{})) - if err != nil { - return fmt.Errorf("expanding `identity`: %+v", err) - } - - publicNetworkAccess := accounts.PublicNetworkAccessDisabled - if d.Get("public_network_access_enabled").(bool) { - publicNetworkAccess = accounts.PublicNetworkAccessEnabled - } - - payload := accounts.MediaService{ - Location: location.Normalize(d.Get("location").(string)), - Identity: identity, - Properties: &accounts.MediaServiceProperties{ - StorageAccounts: storageAccounts, - PublicNetworkAccess: &publicNetworkAccess, - }, - Tags: tags.Expand(t), - } - - if encryptionRaw, ok := d.GetOk("encryption"); ok { - encryption, err := expandMediaServicesAccountEncryption(encryptionRaw.([]interface{})) - if err != nil { - return err - } - payload.Properties.Encryption = encryption - } - - if keyDelivery, ok := d.GetOk("key_delivery_access_control"); ok { - payload.Properties.KeyDelivery = expandMediaServicesAccountKeyDelivery(keyDelivery.([]interface{})) - } - - if v, ok := d.GetOk("storage_authentication_type"); ok { - payload.Properties.StorageAuthentication = pointer.To(accounts.StorageAuthentication(v.(string))) - } - - if err := client.MediaservicesCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - return fmt.Errorf("creating/updating %s: %+v", id, err) - } - - d.SetId(id.ID()) - return resourceMediaServicesAccountRead(d, meta) -} - -func resourceMediaServicesAccountRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20211101Client.Accounts - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := accounts.ParseMediaServiceID(d.Id()) - if err != nil { - return err - } - - resp, err := client.MediaservicesGet(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - log.Printf("[INFO] %q was not found - removing from state", *id) - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.MediaServiceName) - d.Set("resource_group_name", id.ResourceGroupName) - - if model := resp.Model; model != nil { - d.Set("location", location.Normalize(model.Location)) - - accountIdentity, err := flattenMediaServicesAccountIdentity(model.Identity) - if err != nil { - return fmt.Errorf("flattening `identity`: %s", err) - } - if err := d.Set("identity", accountIdentity); err != nil { - return fmt.Errorf("setting `identity`: %s", err) - } - - if props := model.Properties; props != nil { - storageAccounts, err := flattenMediaServicesAccountStorageAccounts(props.StorageAccounts) - if err != nil { - return fmt.Errorf("flattening `storage_account`: %s", err) - } - if err := d.Set("storage_account", storageAccounts); err != nil { - return fmt.Errorf("setting `storage_account`: %s", err) - } - - if err := d.Set("encryption", flattenMediaServicesAccountEncryption(props.Encryption)); err != nil { - return fmt.Errorf("setting `encryption`: %s", err) - } - - publicNetworkAccess := false - if props.PublicNetworkAccess != nil && *props.PublicNetworkAccess == accounts.PublicNetworkAccessEnabled { - publicNetworkAccess = true - } - d.Set("public_network_access_enabled", publicNetworkAccess) - - storageAuthenticationType := "" - if props.StorageAuthentication != nil { - storageAuthenticationType = string(*props.StorageAuthentication) - } - d.Set("storage_authentication_type", storageAuthenticationType) - - if err := d.Set("key_delivery_access_control", flattenMediaServicesAccountKeyDelivery(props.KeyDelivery)); err != nil { - return fmt.Errorf("flattening `key_delivery_access_control`: %s", err) - } - } - - if err := tags.FlattenAndSet(d, model.Tags); err != nil { - return fmt.Errorf("setting `tags`: %+v", err) - } - } - - return nil -} - -func resourceMediaServicesAccountDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20211101Client.Accounts - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := accounts.ParseMediaServiceID(d.Id()) - if err != nil { - return err - } - - if _, err := client.MediaservicesDelete(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - - return nil -} - -func mediaServicesAccountUseManagedIdentity() *schema.Schema { - return &schema.Schema{ - Type: pluginsdk.TypeList, - MaxItems: 1, - Optional: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "user_assigned_identity_id": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: commonids.ValidateUserAssignedIdentityID, - }, - - "use_system_assigned_identity": { - Type: pluginsdk.TypeBool, - Optional: true, - }, - }, - }, - } -} - -func expandMediaServicesAccountStorageAccounts(input []interface{}) (*[]accounts.StorageAccount, error) { - results := make([]accounts.StorageAccount, 0) - - foundPrimary := false - for _, accountMapRaw := range input { - accountMap := accountMapRaw.(map[string]interface{}) - - id := accountMap["id"].(string) - - storageType := accounts.StorageAccountTypeSecondary - if accountMap["is_primary"].(bool) { - if foundPrimary { - return nil, fmt.Errorf("Only one Storage Account can be set as Primary") - } - - storageType = accounts.StorageAccountTypePrimary - foundPrimary = true - } - - resourceIdentity, err := expandMediaServicesAccountManagedIdentity(accountMap["managed_identity"].([]interface{})) - if err != nil { - return nil, err - } - results = append(results, accounts.StorageAccount{ - Id: utils.String(id), - Type: storageType, - Identity: resourceIdentity, - }) - } - - return &results, nil -} - -func flattenMediaServicesAccountStorageAccounts(input *[]accounts.StorageAccount) (*[]interface{}, error) { - if input == nil { - return &[]interface{}{}, nil - } - - results := make([]interface{}, 0) - for _, storageAccount := range *input { - storageAccountId := "" - if storageAccount.Id != nil { - id, err := commonids.ParseStorageAccountIDInsensitively(*storageAccount.Id) - if err != nil { - return nil, fmt.Errorf("parsing %q as a Storage Account ID: %+v", *storageAccount.Id, err) - } - storageAccountId = id.ID() - } - - results = append(results, map[string]interface{}{ - "id": storageAccountId, - "is_primary": storageAccount.Type == accounts.StorageAccountTypePrimary, - "managed_identity": flattenMediaServicesAccountManagedIdentity(storageAccount.Identity), - }) - } - - return &results, nil -} - -func expandMediaServicesAccountEncryption(input []interface{}) (*accounts.AccountEncryption, error) { - if len(input) == 0 || input[0] == nil { - return nil, nil - } - val := input[0].(map[string]interface{}) - - resourceIdentity, err := expandMediaServicesAccountManagedIdentity(val["managed_identity"].([]interface{})) - if err != nil { - return nil, err - } - - accountsEncryption := accounts.AccountEncryption{ - Type: accounts.AccountEncryptionKeyType(val["type"].(string)), - Identity: resourceIdentity, - } - - if keyIdentifier, ok := val["key_vault_key_identifier"].(string); ok && keyIdentifier != "" { - if accountsEncryption.Type != accounts.AccountEncryptionKeyTypeCustomerKey { - return nil, fmt.Errorf("key_vault_key_identifier can only be set when encryption type is 'CustomerKey'") - } - accountsEncryption.KeyVaultProperties = &accounts.KeyVaultProperties{ - KeyIdentifier: &keyIdentifier, - } - } - - return &accountsEncryption, nil -} - -func flattenMediaServicesAccountEncryption(input *accounts.AccountEncryption) *[]interface{} { - if input == nil { - return &[]interface{}{} - } - - var keyIdentifier, currentKeyIdentifier string - - if input.KeyVaultProperties != nil { - if input.KeyVaultProperties.KeyIdentifier != nil { - keyIdentifier = *input.KeyVaultProperties.KeyIdentifier - } - if input.KeyVaultProperties.CurrentKeyIdentifier != nil { - currentKeyIdentifier = *input.KeyVaultProperties.CurrentKeyIdentifier - } - } - - return &[]interface{}{ - map[string]interface{}{ - "type": string(input.Type), - "key_vault_key_identifier": keyIdentifier, - "current_key_identifier": currentKeyIdentifier, - "managed_identity": flattenMediaServicesAccountManagedIdentity(input.Identity), - }, - } -} - -func expandMediaServicesAccountIdentity(input []interface{}) (*accounts.MediaServiceIdentity, error) { - expanded, err := identity.ExpandSystemAndUserAssignedMap(input) - if err != nil { - return nil, err - } - - identityType := string(expanded.Type) - // https://github.com/Azure/azure-rest-api-specs/issues/21905 - if identityType == string(identity.TypeSystemAssignedUserAssigned) { - identityType = "SystemAssigned,UserAssigned" - } - out := accounts.MediaServiceIdentity{ - Type: identityType, - } - if expanded.Type == identity.TypeUserAssigned || expanded.Type == identity.TypeSystemAssignedUserAssigned { - userAssignedIdentities := make(map[string]accounts.UserAssignedManagedIdentity) - for k := range expanded.IdentityIds { - userAssignedIdentities[k] = accounts.UserAssignedManagedIdentity{ - // intentionally empty - } - } - out.UserAssignedIdentities = &userAssignedIdentities - } - return &out, nil -} - -func flattenMediaServicesAccountIdentity(input *accounts.MediaServiceIdentity) (*[]interface{}, error) { - var transform *identity.SystemAndUserAssignedMap - - if input != nil { - identityType := identity.Type(input.Type) - if strings.EqualFold(input.Type, "SystemAssigned,UserAssigned") { - identityType = identity.TypeSystemAssignedUserAssigned - } - transform = &identity.SystemAndUserAssignedMap{ - Type: identityType, - } - if input.PrincipalId != nil { - transform.PrincipalId = *input.PrincipalId - } - if input.TenantId != nil { - transform.TenantId = *input.TenantId - } - if input.UserAssignedIdentities != nil { - transform.IdentityIds = make(map[string]identity.UserAssignedIdentityDetails) - for k, v := range *input.UserAssignedIdentities { - transform.IdentityIds[k] = identity.UserAssignedIdentityDetails{ - ClientId: v.ClientId, - PrincipalId: v.PrincipalId, - } - } - } - } - - return identity.FlattenSystemAndUserAssignedMap(transform) -} - -func expandMediaServicesAccountKeyDelivery(input []interface{}) *accounts.KeyDelivery { - if len(input) == 0 || input[0] == nil { - return nil - } - - keyDelivery := input[0].(map[string]interface{}) - defaultAction := keyDelivery["default_action"].(string) - - var ipAllowList *[]string - if v := keyDelivery["ip_allow_list"]; v != nil { - ips := keyDelivery["ip_allow_list"].(*pluginsdk.Set).List() - ipAllowList = utils.ExpandStringSlice(ips) - } - - return &accounts.KeyDelivery{ - AccessControl: &accounts.AccessControl{ - DefaultAction: pointer.To(accounts.DefaultAction(defaultAction)), - IPAllowList: ipAllowList, - }, - } -} - -func flattenMediaServicesAccountKeyDelivery(input *accounts.KeyDelivery) []interface{} { - if input == nil || input.AccessControl == nil { - return make([]interface{}, 0) - } - - defaultAction := "" - if input.AccessControl.DefaultAction != nil { - defaultAction = string(*input.AccessControl.DefaultAction) - } - - return []interface{}{ - map[string]interface{}{ - "default_action": defaultAction, - "ip_allow_list": utils.FlattenStringSlice(input.AccessControl.IPAllowList), - }, - } -} - -func expandMediaServicesAccountManagedIdentity(input []interface{}) (*accounts.ResourceIdentity, error) { - if len(input) == 0 || input[0] == nil { - return nil, nil - } - - ManagedIdentity := input[0].(map[string]interface{}) - - result := &accounts.ResourceIdentity{ - UseSystemAssignedIdentity: ManagedIdentity["use_system_assigned_identity"].(bool), - } - if userAssignedIdentityId := ManagedIdentity["user_assigned_identity_id"].(string); userAssignedIdentityId != "" { - if result.UseSystemAssignedIdentity { - return nil, fmt.Errorf("use either of user assigned identity or system assigned identity for ecryption") - } - result.UserAssignedIdentity = &userAssignedIdentityId - } - return result, nil -} - -func flattenMediaServicesAccountManagedIdentity(input *accounts.ResourceIdentity) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - var userAssignedIdentity string - if input.UserAssignedIdentity != nil { - userAssignedIdentity = *input.UserAssignedIdentity - } - - return []interface{}{ - map[string]interface{}{ - "use_system_assigned_identity": input.UseSystemAssignedIdentity, - "user_assigned_identity_id": userAssignedIdentity, - }, - } -} diff --git a/internal/services/media/media_services_account_resource_test.go b/internal/services/media/media_services_account_resource_test.go deleted file mode 100644 index 93837b14eb464..0000000000000 --- a/internal/services/media/media_services_account_resource_test.go +++ /dev/null @@ -1,737 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media_test - -import ( - "context" - "fmt" - "regexp" - "testing" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type MediaServicesAccountResource struct{} - -func TestAccMediaServicesAccount_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_services_account` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_services_account", "test") - r := MediaServicesAccountResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("storage_account.#").HasValue("1"), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMediaServicesAccount_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_services_account` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_services_account", "test") - r := MediaServicesAccountResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("storage_account.#").HasValue("1"), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func TestAccMediaServicesAccount_multipleAccounts(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_services_account` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_services_account", "test") - r := MediaServicesAccountResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.multipleAccounts(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("storage_account.#").HasValue("2"), - ), - }, - data.ImportStep(), - { - Config: r.multipleAccountsUpdated(data), - PlanOnly: true, - }, - data.ImportStep(), - }) -} - -func TestAccMediaServicesAccount_storageAuthWithManagedIdentity(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_services_account` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_services_account", "test") - r := MediaServicesAccountResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.storageAuthWithManagedIdentity(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMediaServicesAccount_multiplePrimaries(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_services_account` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_services_account", "test") - r := MediaServicesAccountResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.multiplePrimaries(data), - ExpectError: regexp.MustCompile("Only one Storage Account can be set as Primary"), - }, - }) -} - -func TestAccMediaServicesAccount_publicNetwork(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_services_account` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_services_account", "test") - r := MediaServicesAccountResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.publicNetworkAccess(data, false), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.publicNetworkAccess(data, true), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.publicNetworkAccess(data, false), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMediaServicesAccount_identity(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_services_account` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_services_account", "test") - r := MediaServicesAccountResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.systemAssignedIdentity(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.userAssignedIdentity(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.systemAndUserAssignedIdentity(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMediaServicesAccount_encryptionCustomerKey(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_services_account` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_services_account", "test") - r := MediaServicesAccountResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.encryptionSystemKey(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMediaServicesAccount_encryptionUpdated(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_services_account` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_services_account", "test") - r := MediaServicesAccountResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.encryptionSystemKey(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.encryptionCustomerKey(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.encryptionSystemKey(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMediaServicesAccount_complete(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_services_account` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_services_account", "test") - r := MediaServicesAccountResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("identity.0.type").HasValue("SystemAssigned"), - ), - }, - data.ImportStep(), - }) -} - -func (MediaServicesAccountResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := accounts.ParseMediaServiceID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.Media.V20211101Client.Accounts.MediaservicesGet(ctx, *id) - if err != nil { - return nil, fmt.Errorf("retrieving %s: %+v", *id, err) - } - - return utils.Bool(resp.Model != nil), nil -} - -func (r MediaServicesAccountResource) basic(data acceptance.TestData) string { - template := r.template(data) - return fmt.Sprintf(` -%s - -resource "azurerm_media_services_account" "test" { - name = "acctestmsa%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - storage_account { - id = azurerm_storage_account.first.id - is_primary = true - } - - tags = { - environment = "staging" - } -} -`, template, data.RandomString) -} - -func (r MediaServicesAccountResource) publicNetworkAccess(data acceptance.TestData, enabled bool) string { - template := r.template(data) - return fmt.Sprintf(` -%s - -resource "azurerm_media_services_account" "test" { - name = "acctestmsa%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - public_network_access_enabled = %t - - storage_account { - id = azurerm_storage_account.first.id - is_primary = true - } - - tags = { - environment = "staging" - } -} -`, template, data.RandomString, enabled) -} - -func (r MediaServicesAccountResource) encryptionSystemKey(data acceptance.TestData) string { - template := r.template(data) - return fmt.Sprintf(` -%s - -resource "azurerm_user_assigned_identity" "test" { - name = "acctest-uai-%[2]s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location -} - -resource "azurerm_media_services_account" "test" { - name = "acctestmsa%[2]s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - storage_account { - id = azurerm_storage_account.first.id - is_primary = true - } - identity { - type = "SystemAssigned, UserAssigned" - identity_ids = [azurerm_user_assigned_identity.test.id] - } - encryption { - type = "SystemKey" - } - - tags = { - environment = "staging" - } -} -`, template, data.RandomString) -} - -func (r MediaServicesAccountResource) encryptionCustomerKey(data acceptance.TestData) string { - template := r.template(data) - return fmt.Sprintf(` -%s - -resource "azurerm_key_vault" "test" { - name = "mediakv-%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - tenant_id = data.azurerm_client_config.current.tenant_id - sku_name = "standard" - soft_delete_retention_days = 7 - purge_protection_enabled = true -} - -data "azurerm_client_config" "current" {} - -resource "azurerm_user_assigned_identity" "test" { - name = "acctest-uai-%[2]s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location -} - -resource "azurerm_key_vault_access_policy" "server" { - key_vault_id = azurerm_key_vault.test.id - tenant_id = data.azurerm_client_config.current.tenant_id - object_id = azurerm_user_assigned_identity.test.principal_id - key_permissions = ["Get", "UnwrapKey", "WrapKey", "List", "Encrypt"] - secret_permissions = ["Get"] -} - -resource "azurerm_key_vault_access_policy" "client" { - key_vault_id = azurerm_key_vault.test.id - tenant_id = data.azurerm_client_config.current.tenant_id - object_id = data.azurerm_client_config.current.object_id - key_permissions = ["Get", "Create", "Delete", "List", "Restore", "Recover", "UnwrapKey", "WrapKey", "Purge", "Encrypt", "Decrypt", "Sign", "Verify", "GetRotationPolicy"] - secret_permissions = ["Get"] -} - -resource "azurerm_key_vault_key" "test" { - name = "test-kvk-%[2]s" - key_vault_id = azurerm_key_vault.test.id - key_type = "RSA" - key_size = 2048 - - key_opts = [ - "decrypt", - "encrypt", - "sign", - "unwrapKey", - "verify", - "wrapKey", - ] - depends_on = [ - azurerm_key_vault_access_policy.client, - azurerm_key_vault_access_policy.server, - ] -} - -resource "azurerm_media_services_account" "test" { - name = "acctestmsa%[2]s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - identity { - type = "SystemAssigned, UserAssigned" - identity_ids = [azurerm_user_assigned_identity.test.id] - } - storage_account { - id = azurerm_storage_account.first.id - is_primary = true - } - encryption { - type = "CustomerKey" - key_vault_key_identifier = azurerm_key_vault_key.test.id - managed_identity { - user_assigned_identity_id = azurerm_user_assigned_identity.test.id - } - } - - tags = { - environment = "staging" - } -} -`, template, data.RandomString) -} - -func (r MediaServicesAccountResource) systemAssignedIdentity(data acceptance.TestData) string { - template := r.template(data) - return fmt.Sprintf(` -%s - -resource "azurerm_media_services_account" "test" { - name = "acctestmsa%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - storage_account { - id = azurerm_storage_account.first.id - is_primary = true - } - identity { - type = "SystemAssigned" - } - tags = { - environment = "staging" - } -} -`, template, data.RandomString) -} - -func (r MediaServicesAccountResource) userAssignedIdentity(data acceptance.TestData) string { - template := r.template(data) - return fmt.Sprintf(` -%s - -resource "azurerm_user_assigned_identity" "test" { - name = "acctest%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location -} - -resource "azurerm_media_services_account" "test" { - name = "acctestmsa%[2]s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - storage_account { - id = azurerm_storage_account.first.id - is_primary = true - } - identity { - type = "UserAssigned" - identity_ids = [azurerm_user_assigned_identity.test.id] - } - tags = { - environment = "staging" - } -} -`, template, data.RandomString) -} - -func (r MediaServicesAccountResource) systemAndUserAssignedIdentity(data acceptance.TestData) string { - template := r.template(data) - return fmt.Sprintf(` -%s - -resource "azurerm_user_assigned_identity" "test" { - name = "acctest%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location -} - -resource "azurerm_media_services_account" "test" { - name = "acctestmsa%[2]s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - storage_account { - id = azurerm_storage_account.first.id - is_primary = true - } - identity { - type = "SystemAssigned, UserAssigned" - identity_ids = [azurerm_user_assigned_identity.test.id] - } - tags = { - environment = "staging" - } -} -`, template, data.RandomString) -} - -func (r MediaServicesAccountResource) requiresImport(data acceptance.TestData) string { - template := r.basic(data) - return fmt.Sprintf(` -%s - -resource "azurerm_media_services_account" "import" { - name = azurerm_media_services_account.test.name - location = azurerm_media_services_account.test.location - resource_group_name = azurerm_media_services_account.test.resource_group_name - - storage_account { - id = azurerm_storage_account.first.id - is_primary = true - } - - tags = { - environment = "staging" - } -} -`, template) -} - -func (r MediaServicesAccountResource) storageAuthWithManagedIdentity(data acceptance.TestData) string { - template := r.template(data) - return fmt.Sprintf(` -%s - -resource "azurerm_user_assigned_identity" "test" { - name = "acctest%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location -} - -resource "azurerm_storage_account" "third" { - name = "acctestsa3%[2]s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_replication_type = "GRS" - identity { - type = "UserAssigned" - identity_ids = [azurerm_user_assigned_identity.test.id] - } -} - -resource "azurerm_role_assignment" "storageAccountRoleAssignment" { - scope = azurerm_storage_account.third.id - role_definition_name = "Storage Blob Data Contributor" - principal_id = azurerm_user_assigned_identity.test.principal_id -} - -resource "azurerm_media_services_account" "test" { - name = "acctestmsa%[2]s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - storage_authentication_type = "ManagedIdentity" - - storage_account { - id = azurerm_storage_account.third.id - is_primary = true - managed_identity { - user_assigned_identity_id = azurerm_user_assigned_identity.test.id - use_system_assigned_identity = false - } - } - - identity { - type = "UserAssigned" - identity_ids = [azurerm_user_assigned_identity.test.id] - } - - tags = { - environment = "staging" - } - - depends_on = [ - azurerm_role_assignment.storageAccountRoleAssignment - ] -} -`, template, data.RandomString) -} - -func (r MediaServicesAccountResource) multipleAccounts(data acceptance.TestData) string { - template := r.template(data) - return fmt.Sprintf(` -%s - -resource "azurerm_storage_account" "second" { - name = "acctestsa2%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "test" { - name = "acctestmsa%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - storage_account { - id = azurerm_storage_account.first.id - is_primary = true - } - - storage_account { - id = azurerm_storage_account.second.id - is_primary = false - } -} -`, template, data.RandomString, data.RandomString) -} - -func (r MediaServicesAccountResource) multipleAccountsUpdated(data acceptance.TestData) string { - template := r.template(data) - return fmt.Sprintf(` -%s - -resource "azurerm_storage_account" "second" { - name = "acctestsa2%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "test" { - name = "acctestmsa%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - storage_account { - id = azurerm_storage_account.second.id - is_primary = false - } - - storage_account { - id = azurerm_storage_account.first.id - is_primary = true - } -} -`, template, data.RandomString, data.RandomString) -} - -func (r MediaServicesAccountResource) multiplePrimaries(data acceptance.TestData) string { - template := r.template(data) - return fmt.Sprintf(` -%s - -resource "azurerm_storage_account" "second" { - name = "acctestsa2%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "test" { - name = "acctestmsa%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - storage_account { - id = azurerm_storage_account.first.id - is_primary = true - } - - storage_account { - id = azurerm_storage_account.second.id - is_primary = true - } -} -`, template, data.RandomString, data.RandomString) -} - -func (r MediaServicesAccountResource) complete(data acceptance.TestData) string { - template := r.template(data) - return fmt.Sprintf(` -%s - -resource "azurerm_media_services_account" "test" { - name = "acctestmsa%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - storage_account { - id = azurerm_storage_account.first.id - is_primary = true - } - - tags = { - environment = "staging" - } - - identity { - type = "SystemAssigned" - } - - key_delivery_access_control { - default_action = "Deny" - ip_allow_list = ["0.0.0.0/0"] - } -} -`, template, data.RandomString) -} - -func (MediaServicesAccountResource) template(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-media-%d" - location = "%s" -} - -resource "azurerm_storage_account" "first" { - name = "acctestsa1%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_replication_type = "GRS" -} -`, data.RandomInteger, data.Locations.Primary, data.RandomString) -} diff --git a/internal/services/media/media_streaming_endpoint_resource.go b/internal/services/media/media_streaming_endpoint_resource.go deleted file mode 100644 index d51db9c510146..0000000000000 --- a/internal/services/media/media_streaming_endpoint_resource.go +++ /dev/null @@ -1,688 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media - -import ( - "fmt" - "log" - "regexp" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/media/migration" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/media/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceMediaStreamingEndpoint() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceMediaStreamingEndpointCreate, - Read: resourceMediaStreamingEndpointRead, - Update: resourceMediaStreamingEndpointUpdate, - Delete: resourceMediaStreamingEndpointDelete, - - DeprecationMessage: azureMediaRetirementMessage, - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := streamingendpoints.ParseStreamingEndpointID(id) - return err - }), - - StateUpgraders: pluginsdk.StateUpgrades(map[int]pluginsdk.StateUpgrade{ - 0: migration.StreamingEndpointV0ToV1{}, - }), - SchemaVersion: 1, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.StreamingEndpointName, - }, - - "resource_group_name": commonschema.ResourceGroupName(), - - "media_services_account_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.AccountName, - }, - - "auto_start_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - Computed: true, - }, - - "location": commonschema.Location(), - - "scale_units": { - Type: pluginsdk.TypeInt, - Required: true, - ValidateFunc: validation.IntBetween(0, 50), - }, - - "access_control": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - // lintignore:XS003 - "akamai_signature_header_authentication_key": { - Type: pluginsdk.TypeList, - Optional: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "base64_key": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsBase64, - }, - "expiration": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.IsRFC3339Time, - }, - "identifier": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - AtLeastOneOf: []string{"access_control.0.akamai_signature_header_authentication_key", "access_control.0.ip_allow"}, - }, - // lintignore:XS003 - "ip_allow": { - Type: pluginsdk.TypeList, - Optional: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "address": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "name": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "subnet_prefix_length": { - Type: pluginsdk.TypeInt, - Optional: true, - }, - }, - }, - AtLeastOneOf: []string{"access_control.0.akamai_signature_header_authentication_key", "access_control.0.ip_allow"}, - }, - }, - }, - }, - - "sku": { - Type: pluginsdk.TypeList, - Computed: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Computed: true, - }, - "capacity": { - Type: pluginsdk.TypeInt, - Computed: true, - }, - }, - }, - }, - - "cdn_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - }, - - "cdn_profile": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile("^[-A-Za-z0-9]{1,120}$"), - "CDN profile must be 1 - 120 characters long, can contain only letters, numbers, and hyphens.", - ), - }, - - "cdn_provider": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringInSlice([]string{ - "StandardVerizon", "PremiumVerizon", "StandardAkamai", - }, false), - }, - - "cross_site_access_policy": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "client_access_policy": { - Type: pluginsdk.TypeString, - Computed: true, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - AtLeastOneOf: []string{"cross_site_access_policy.0.client_access_policy", "cross_site_access_policy.0.cross_domain_policy"}, - }, - - "cross_domain_policy": { - Type: pluginsdk.TypeString, - Computed: true, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - AtLeastOneOf: []string{"cross_site_access_policy.0.client_access_policy", "cross_site_access_policy.0.cross_domain_policy"}, - }, - }, - }, - }, - - "custom_host_names": { - Type: pluginsdk.TypeSet, - Optional: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - - "description": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "max_cache_age_seconds": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntBetween(1, 2147483647), - }, - - "host_name": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "tags": commonschema.Tags(), - }, - } -} - -func resourceMediaStreamingEndpointCreate(d *pluginsdk.ResourceData, meta interface{}) error { - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - client := meta.(*clients.Client).Media.V20220801Client.StreamingEndpoints - ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := streamingendpoints.NewStreamingEndpointID(subscriptionId, d.Get("resource_group_name").(string), d.Get("media_services_account_name").(string), d.Get("name").(string)) - existing, err := client.Get(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for presence of existing %s: %+v", id, err) - } - } - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_media_streaming_endpoint", id.ID()) - } - - payload := streamingendpoints.StreamingEndpoint{ - Properties: &streamingendpoints.StreamingEndpointProperties{ - ScaleUnits: int64(d.Get("scale_units").(int)), - }, - Location: location.Normalize(d.Get("location").(string)), - Tags: tags.Expand(d.Get("tags").(map[string]interface{})), - } - - autoStart := utils.Bool(false) - if _, ok := d.GetOk("auto_start_enabled"); ok { - autoStart = utils.Bool(d.Get("auto_start_enabled").(bool)) - } - if _, ok := d.GetOk("access_control"); ok { - accessControl, err := expandAccessControl(d) - if err != nil { - return err - } - payload.Properties.AccessControl = accessControl - } - if cdnEnabled, ok := d.GetOk("cdn_enabled"); ok { - payload.Properties.CdnEnabled = utils.Bool(cdnEnabled.(bool)) - } - - if cdnProfile, ok := d.GetOk("cdn_profile"); ok { - payload.Properties.CdnProfile = utils.String(cdnProfile.(string)) - } - - if cdnProvider, ok := d.GetOk("cdn_provider"); ok { - payload.Properties.CdnProvider = utils.String(cdnProvider.(string)) - } - - if crossSite, ok := d.GetOk("cross_site_access_policy"); ok { - payload.Properties.CrossSiteAccessPolicies = expandStreamingEndpointCrossSiteAccessPolicies(crossSite.([]interface{})) - } - - if _, ok := d.GetOk("custom_host_names"); ok { - customHostNames := d.Get("custom_host_names").([]interface{}) - payload.Properties.CustomHostNames = utils.ExpandStringSlice(customHostNames) - } - - if description, ok := d.GetOk("description"); ok { - payload.Properties.Description = utils.String(description.(string)) - } - - if maxCacheAge, ok := d.GetOk("max_cache_age_seconds"); ok { - payload.Properties.MaxCacheAge = utils.Int64(int64(maxCacheAge.(int))) - } - - options := streamingendpoints.CreateOperationOptions{ - AutoStart: autoStart, - } - if err := client.CreateThenPoll(ctx, id, payload, options); err != nil { - return fmt.Errorf("creating %s: %+v", id, err) - } - - d.SetId(id.ID()) - - return resourceMediaStreamingEndpointRead(d, meta) -} - -func resourceMediaStreamingEndpointUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220801Client.StreamingEndpoints - ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := streamingendpoints.ParseStreamingEndpointID(d.Id()) - if err != nil { - return err - } - scaleUnits := d.Get("scale_units").(int) - - if d.HasChange("scale_units") { - scaleParameters := streamingendpoints.StreamingEntityScaleUnit{ - ScaleUnit: pointer.To(int64(scaleUnits)), - } - if err := client.ScaleThenPoll(ctx, *id, scaleParameters); err != nil { - return fmt.Errorf("scaling units for %s: %+v", *id, err) - } - } - - resp, err := client.Get(ctx, *id) - if err != nil { - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - if resp.Model == nil || resp.Model.Properties == nil { - return fmt.Errorf("retrieving %s: model was nil", *id) - } - - existing := resp.Model - - if d.HasChange("access_control") { - accessControl, err := expandAccessControl(d) - if err != nil { - return err - } - existing.Properties.AccessControl = accessControl - } - - if d.HasChange("cdn_enabled") { - existing.Properties.CdnEnabled = utils.Bool(d.Get("cdn_enabled").(bool)) - } - - if d.HasChange("cdn_profile") { - existing.Properties.CdnProfile = utils.String(d.Get("cdn_profile").(string)) - } - - if d.HasChange("cdn_provider") { - existing.Properties.CdnProvider = utils.String(d.Get("cdn_provider").(string)) - } - - if d.HasChange("cross_site_access_policy") { - existing.Properties.CrossSiteAccessPolicies = expandStreamingEndpointCrossSiteAccessPolicies(d.Get("cross_site_access_policy").([]interface{})) - } - - if d.HasChange("custom_host_names") { - existing.Properties.CustomHostNames = utils.ExpandStringSlice(d.Get("custom_host_names").([]interface{})) - } - - if d.HasChange("description") { - existing.Properties.Description = utils.String(d.Get("description").(string)) - } - - if d.HasChange("max_cache_age_seconds") { - existing.Properties.MaxCacheAge = utils.Int64(int64(d.Get("max_cache_age_seconds").(int))) - } - - if d.HasChange("tags") { - existing.Tags = tags.Expand(d.Get("tags").(map[string]interface{})) - } - - if err := client.UpdateThenPoll(ctx, *id, *existing); err != nil { - return fmt.Errorf("updating %s: %+v", *id, err) - } - - return resourceMediaStreamingEndpointRead(d, meta) -} - -func resourceMediaStreamingEndpointRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220801Client.StreamingEndpoints - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := streamingendpoints.ParseStreamingEndpointID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - log.Printf("[INFO] %s was not found - removing from state", *id) - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.StreamingEndpointName) - d.Set("media_services_account_name", id.MediaServiceName) - d.Set("resource_group_name", id.ResourceGroupName) - - if model := resp.Model; model != nil { - d.Set("location", location.Normalize(model.Location)) - if props := model.Properties; props != nil { - d.Set("scale_units", props.ScaleUnits) - - accessControl, err := flattenAccessControl(props.AccessControl) - if err != nil { - return fmt.Errorf("flattening `access_control`: %+v", err) - } - if err := d.Set("access_control", accessControl); err != nil { - return fmt.Errorf("setting `access_control`: %+v", err) - } - - d.Set("cdn_enabled", props.CdnEnabled) - d.Set("cdn_profile", props.CdnProfile) - d.Set("cdn_provider", props.CdnProvider) - d.Set("host_name", props.HostName) - - crossSiteAccessPolicies := flattenStreamingEndpointCrossSiteAccessPolicies(props.CrossSiteAccessPolicies) - if err := d.Set("cross_site_access_policy", crossSiteAccessPolicies); err != nil { - return fmt.Errorf("flattening `cross_site_access_policy`: %s", err) - } - - d.Set("custom_host_names", props.CustomHostNames) - d.Set("description", props.Description) - - maxCacheAge := 0 - if props.MaxCacheAge != nil { - maxCacheAge = int(*props.MaxCacheAge) - } - d.Set("max_cache_age_seconds", maxCacheAge) - } - - d.Set("sku", flattenEndpointSku(model.Sku)) - - if err := tags.FlattenAndSet(d, model.Tags); err != nil { - return fmt.Errorf("setting `tags`: %+v", err) - } - } - - return nil -} - -func resourceMediaStreamingEndpointDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220801Client.StreamingEndpoints - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := streamingendpoints.ParseStreamingEndpointID(d.Id()) - if err != nil { - return err - } - - // Stop Streaming Endpoint before we attempt to delete it. - resp, err := client.Get(ctx, *id) - if err != nil { - return fmt.Errorf("reading %s: %+v", id, err) - } - if model := resp.Model; model != nil { - if props := model.Properties; props != nil { - if props.ResourceState != nil && *props.ResourceState == streamingendpoints.StreamingEndpointResourceStateRunning { - if err := client.StopThenPoll(ctx, *id); err != nil { - return fmt.Errorf("stopping %s: %+v", id, err) - } - } - } - } - - if err := client.DeleteThenPoll(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", id, err) - } - - return nil -} - -func expandAccessControl(d *pluginsdk.ResourceData) (*streamingendpoints.StreamingEndpointAccessControl, error) { - accessControls := d.Get("access_control").([]interface{}) - if len(accessControls) == 0 { - return nil, nil - } - accessControlResult := new(streamingendpoints.StreamingEndpointAccessControl) - accessControl := accessControls[0].(map[string]interface{}) - // Get IP information - if ipAllowsList := accessControl["ip_allow"].([]interface{}); len(ipAllowsList) > 0 { - ipRanges := make([]streamingendpoints.IPRange, 0) - for _, ipAllow := range ipAllowsList { - if ipAllow == nil { - continue - } - allow := ipAllow.(map[string]interface{}) - address := allow["address"].(string) - name := allow["name"].(string) - - ipRange := streamingendpoints.IPRange{ - Name: utils.String(name), - Address: utils.String(address), - } - subnetPrefixLengthRaw := allow["subnet_prefix_length"] - if subnetPrefixLengthRaw != "" { - ipRange.SubnetPrefixLength = utils.Int64(int64(subnetPrefixLengthRaw.(int))) - } - ipRanges = append(ipRanges, ipRange) - } - accessControlResult.IP = &streamingendpoints.IPAccessControl{ - Allow: &ipRanges, - } - } - // Get Akamai information - if akamaiSignatureKeyList := accessControl["akamai_signature_header_authentication_key"].([]interface{}); len(akamaiSignatureKeyList) > 0 { - akamaiSignatureHeaderAuthenticationKeyList := make([]streamingendpoints.AkamaiSignatureHeaderAuthenticationKey, 0) - for _, akamaiSignatureKey := range akamaiSignatureKeyList { - if akamaiSignatureKey == nil { - continue - } - akamaiKey := akamaiSignatureKey.(map[string]interface{}) - base64Key := akamaiKey["base64_key"].(string) - expirationRaw := akamaiKey["expiration"].(string) - identifier := akamaiKey["identifier"].(string) - - akamaiSignatureHeaderAuthenticationKey := streamingendpoints.AkamaiSignatureHeaderAuthenticationKey{ - Base64Key: utils.String(base64Key), - Identifier: utils.String(identifier), - } - if expirationRaw != "" { - expiration, err := time.Parse(time.RFC3339, expirationRaw) - if err != nil { - return nil, err - } - akamaiSignatureHeaderAuthenticationKey.SetExpirationAsTime(expiration) - } - akamaiSignatureHeaderAuthenticationKeyList = append(akamaiSignatureHeaderAuthenticationKeyList, akamaiSignatureHeaderAuthenticationKey) - } - accessControlResult.Akamai = &streamingendpoints.AkamaiAccessControl{ - AkamaiSignatureHeaderAuthenticationKeyList: &akamaiSignatureHeaderAuthenticationKeyList, - } - } - - return accessControlResult, nil -} - -func flattenEndpointSku(input *streamingendpoints.ArmStreamingEndpointCurrentSku) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - skuName := "" - if input.Name != nil { - skuName = *input.Name - } - - skuCapacity := 0 - if input.Capacity != nil { - skuCapacity = int(*input.Capacity) - } - - return []interface{}{ - map[string]interface{}{ - "name": skuName, - "capacity": skuCapacity, - }, - } - -} - -func flattenAccessControl(input *streamingendpoints.StreamingEndpointAccessControl) (*[]interface{}, error) { - if input == nil { - return &[]interface{}{}, nil - } - - ipAllowRules := make([]interface{}, 0) - if input.IP != nil && input.IP.Allow != nil { - for _, v := range *input.IP.Allow { - name := "" - if v.Name != nil { - name = *v.Name - } - - address := "" - if v.Address != nil { - address = *v.Address - } - - var subnetPrefixLength int64 - if v.SubnetPrefixLength != nil { - subnetPrefixLength = *v.SubnetPrefixLength - } - - ipAllowRules = append(ipAllowRules, map[string]interface{}{ - "name": name, - "address": address, - "subnet_prefix_length": subnetPrefixLength, - }) - } - } - - akamaiRules := make([]interface{}, 0) - if input.Akamai != nil && input.Akamai.AkamaiSignatureHeaderAuthenticationKeyList != nil { - for _, v := range *input.Akamai.AkamaiSignatureHeaderAuthenticationKeyList { - base64Key := "" - if v.Base64Key != nil { - base64Key = *v.Base64Key - } - - expiration := "" - if v.Expiration != nil { - t, err := v.GetExpirationAsTime() - if err != nil { - return nil, fmt.Errorf("parsing expiration: %+v", err) - } - expiration = t.Format(time.RFC3339) - } - - identifier := "" - if v.Identifier != nil { - identifier = *v.Identifier - } - - akamaiRules = append(akamaiRules, map[string]interface{}{ - "base64_key": base64Key, - "expiration": expiration, - "identifier": identifier, - }) - } - } - - return &[]interface{}{ - map[string]interface{}{ - "akamai_signature_header_authentication_key": akamaiRules, - "ip_allow": ipAllowRules, - }, - }, nil -} - -func expandStreamingEndpointCrossSiteAccessPolicies(input []interface{}) *streamingendpoints.CrossSiteAccessPolicies { - if len(input) == 0 { - return nil - } - - crossSiteAccessPolicy := input[0].(map[string]interface{}) - clientAccessPolicy := crossSiteAccessPolicy["client_access_policy"].(string) - crossDomainPolicy := crossSiteAccessPolicy["cross_domain_policy"].(string) - return &streamingendpoints.CrossSiteAccessPolicies{ - ClientAccessPolicy: &clientAccessPolicy, - CrossDomainPolicy: &crossDomainPolicy, - } -} - -func flattenStreamingEndpointCrossSiteAccessPolicies(input *streamingendpoints.CrossSiteAccessPolicies) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - clientAccessPolicy := "" - if input.ClientAccessPolicy != nil { - clientAccessPolicy = *input.ClientAccessPolicy - } - - crossDomainPolicy := "" - if input.CrossDomainPolicy != nil { - crossDomainPolicy = *input.CrossDomainPolicy - } - - return []interface{}{ - map[string]interface{}{ - "client_access_policy": clientAccessPolicy, - "cross_domain_policy": crossDomainPolicy, - }, - } -} diff --git a/internal/services/media/media_streaming_endpoint_resource_test.go b/internal/services/media/media_streaming_endpoint_resource_test.go deleted file mode 100644 index 7324d1d8588a4..0000000000000 --- a/internal/services/media/media_streaming_endpoint_resource_test.go +++ /dev/null @@ -1,322 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media_test - -import ( - "context" - "fmt" - "testing" - "time" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type MediaStreamingEndpointResource struct{} - -func TestAccMediaStreamingEndpoint_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_streaming_endpoint` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_streaming_endpoint", "test") - r := MediaStreamingEndpointResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("scale_units").HasValue("1"), - check.That(data.ResourceName).Key("host_name").Exists(), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMediaStreamingEndpoint_CDN(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_streaming_endpoint` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_streaming_endpoint", "test") - r := MediaStreamingEndpointResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.CDN(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("cdn_profile").HasValue("MyCDNProfile"), - check.That(data.ResourceName).Key("cdn_provider").HasValue("StandardVerizon"), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMediaStreamingEndpoint_MaxCacheAge(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_streaming_endpoint` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_streaming_endpoint", "test") - r := MediaStreamingEndpointResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.maxCacheAge(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("max_cache_age_seconds").HasValue("60"), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMediaStreamingEndpoint_shouldStopWhenStarted(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_streaming_endpoint` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_streaming_endpoint", "test") - r := MediaStreamingEndpointResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - data.CheckWithClient(r.Start), - check.That(data.ResourceName).Key("sku.0.name").HasValue("Premium"), - check.That(data.ResourceName).Key("sku.0.capacity").HasValue("1"), - check.That(data.ResourceName).Key("host_name").Exists(), - ), - }, - }) -} - -func TestAccMediaStreamingEndpoint_update(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_streaming_endpoint` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_streaming_endpoint", "test") - r := MediaStreamingEndpointResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.update(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMediaStreamingEndpoint_standard(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_streaming_endpoint` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_streaming_endpoint", "test") - r := MediaStreamingEndpointResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.standard(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("scale_units").HasValue("0"), - check.That(data.ResourceName).Key("sku.0.name").HasValue("Standard"), - check.That(data.ResourceName).Key("sku.0.capacity").HasValue("0"), - ), - }, - data.ImportStep(), - }) -} - -func (r MediaStreamingEndpointResource) Start(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) error { - id, err := streamingendpoints.ParseStreamingEndpointID(state.ID) - if err != nil { - return err - } - ctx, cancel := context.WithDeadline(ctx, time.Now().Add(15*time.Minute)) - defer cancel() - - if err := client.Media.V20220801Client.StreamingEndpoints.StartThenPoll(ctx, *id); err != nil { - return fmt.Errorf("starting %s: %+v", id, err) - } - - return nil -} - -func (MediaStreamingEndpointResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := streamingendpoints.ParseStreamingEndpointID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.Media.V20220801Client.StreamingEndpoints.Get(ctx, *id) - if err != nil { - return nil, fmt.Errorf("retrieving %s: %v", id.String(), err) - } - - return utils.Bool(resp.Model != nil), nil -} - -func (r MediaStreamingEndpointResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -%s -resource "azurerm_media_streaming_endpoint" "test" { - name = "endpoint1" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - media_services_account_name = azurerm_media_services_account.test.name - scale_units = 1 - tags = { - env = "test" - } -} -`, r.template(data)) -} - -func (r MediaStreamingEndpointResource) update(data acceptance.TestData) string { - return fmt.Sprintf(` -%s -resource "azurerm_media_streaming_endpoint" "test" { - name = "endpoint1" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - media_services_account_name = azurerm_media_services_account.test.name - scale_units = 1 - access_control { - ip_allow { - name = "AllowedIP" - address = "192.168.1.1" - } - - ip_allow { - name = "AnotherIp" - address = "192.168.1.2" - } - - akamai_signature_header_authentication_key { - identifier = "id1" - expiration = "2030-12-31T16:00:00Z" - base64_key = "dGVzdGlkMQ==" - } - - akamai_signature_header_authentication_key { - identifier = "id2" - expiration = "2032-01-28T16:00:00Z" - base64_key = "dGVzdGlkMQ==" - } - } - max_cache_age_seconds = 60 - tags = { - env = "ppe" - } -} -`, r.template(data)) -} - -func (r MediaStreamingEndpointResource) CDN(data acceptance.TestData) string { - return fmt.Sprintf(` -%s -resource "azurerm_media_streaming_endpoint" "test" { - name = "endpoint1" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - media_services_account_name = azurerm_media_services_account.test.name - scale_units = 1 - cdn_enabled = true - cdn_provider = "StandardVerizon" - cdn_profile = "MyCDNProfile" -} -`, r.template(data)) -} - -func (r MediaStreamingEndpointResource) maxCacheAge(data acceptance.TestData) string { - return fmt.Sprintf(` -%s -resource "azurerm_media_streaming_endpoint" "test" { - name = "endpoint1" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - media_services_account_name = azurerm_media_services_account.test.name - scale_units = 1 - access_control { - ip_allow { - name = "AllowedIP" - address = "192.168.1.1" - } - - ip_allow { - name = "AnotherIp" - address = "192.168.1.2" - } - - akamai_signature_header_authentication_key { - identifier = "id1" - expiration = "2030-12-31T16:00:00Z" - base64_key = "dGVzdGlkMQ==" - } - - akamai_signature_header_authentication_key { - identifier = "id2" - expiration = "2032-01-28T16:00:00Z" - base64_key = "dGVzdGlkMQ==" - } - } - max_cache_age_seconds = 60 - -} -`, r.template(data)) -} - -func (r MediaStreamingEndpointResource) standard(data acceptance.TestData) string { - return fmt.Sprintf(` -%s -resource "azurerm_media_streaming_endpoint" "test" { - name = "endpoint1" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - media_services_account_name = azurerm_media_services_account.test.name - scale_units = 0 -} -`, r.template(data)) -} - -func (MediaStreamingEndpointResource) template(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} -resource "azurerm_resource_group" "test" { - name = "acctestRG-media-%d" - location = "%s" -} -resource "azurerm_storage_account" "test" { - name = "acctestsa1%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_replication_type = "GRS" -} -resource "azurerm_media_services_account" "test" { - name = "acctestmsa%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - storage_account { - id = azurerm_storage_account.test.id - is_primary = true - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomString, data.RandomString) -} diff --git a/internal/services/media/media_streaming_live_event_resource.go b/internal/services/media/media_streaming_live_event_resource.go deleted file mode 100644 index d2455f2caf16c..0000000000000 --- a/internal/services/media/media_streaming_live_event_resource.go +++ /dev/null @@ -1,1002 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media - -import ( - "fmt" - "log" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/media/migration" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/media/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceMediaLiveEvent() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceMediaLiveEventCreate, - Read: resourceMediaLiveEventRead, - Update: resourceMediaLiveEventUpdate, - Delete: resourceMediaLiveEventDelete, - - DeprecationMessage: azureMediaRetirementMessage, - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := liveevents.ParseLiveEventID(id) - return err - }), - - StateUpgraders: pluginsdk.StateUpgrades(map[int]pluginsdk.StateUpgrade{ - 0: migration.LiveEventV0ToV1{}, - }), - SchemaVersion: 1, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.LiveEventName, - }, - - "resource_group_name": commonschema.ResourceGroupName(), - - "media_services_account_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.AccountName, - }, - - "auto_start_enabled": { - Type: pluginsdk.TypeBool, - ForceNew: true, - Optional: true, - }, - - "location": commonschema.Location(), - - "input": { - Type: pluginsdk.TypeList, - Required: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - // lintignore:XS003 - "ip_access_control_allow": { - Type: pluginsdk.TypeList, - Optional: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "address": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "name": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "subnet_prefix_length": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - }, - }, - }, - AtLeastOneOf: []string{ - "input.0.ip_access_control_allow", "input.0.access_token", - "input.0.key_frame_interval_duration", "input.0.streaming_protocol", - }, - }, - - "access_token": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - AtLeastOneOf: []string{ - "input.0.ip_access_control_allow", "input.0.access_token", - "input.0.key_frame_interval_duration", "input.0.streaming_protocol", - }, - }, - - "endpoint": { - Type: pluginsdk.TypeList, - Computed: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "protocol": { - Type: pluginsdk.TypeString, - Computed: true, - }, - "url": { - Type: pluginsdk.TypeString, - Computed: true, - }, - }, - }, - }, - - "key_frame_interval_duration": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - AtLeastOneOf: []string{ - "input.0.ip_access_control_allow", "input.0.access_token", - "input.0.key_frame_interval_duration", "input.0.streaming_protocol", - }, - }, - - "streaming_protocol": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - string(liveevents.LiveEventInputProtocolRTMP), - string(liveevents.LiveEventInputProtocolFragmentedMPFour), - }, false), - AtLeastOneOf: []string{ - "input.0.ip_access_control_allow", "input.0.access_token", - "input.0.key_frame_interval_duration", "input.0.streaming_protocol", - }, - }, - }, - }, - }, - - "cross_site_access_policy": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "client_access_policy": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - AtLeastOneOf: []string{"cross_site_access_policy.0.client_access_policy", "cross_site_access_policy.0.cross_domain_policy"}, - }, - - "cross_domain_policy": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - AtLeastOneOf: []string{"cross_site_access_policy.0.client_access_policy", "cross_site_access_policy.0.cross_domain_policy"}, - }, - }, - }, - }, - - "description": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "encoding": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "type": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - string(liveevents.LiveEventEncodingTypeNone), - string(liveevents.LiveEventEncodingTypePremiumOneZeroEightZerop), - string(liveevents.LiveEventEncodingTypePassthroughBasic), - string(liveevents.LiveEventEncodingTypePassthroughStandard), - string(liveevents.LiveEventEncodingTypeStandard), - }, false), - Default: string(liveevents.LiveEventEncodingTypeNone), - }, - - "key_frame_interval": { - Type: pluginsdk.TypeString, - Optional: true, - Default: "PT2S", - ValidateFunc: validation.StringIsNotEmpty, - }, - - "preset_name": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "stretch_mode": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - string(liveevents.StretchModeAutoFit), - string(liveevents.StretchModeAutoSize), - string(liveevents.StretchModeNone), - }, false), - Default: string(liveevents.StretchModeNone), - }, - }, - }, - }, - - "hostname_prefix": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "preview": { - Type: pluginsdk.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - // lintignore:XS003 - "ip_access_control_allow": { - Type: pluginsdk.TypeList, - Optional: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "address": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "name": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "subnet_prefix_length": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - }, - }, - }, - AtLeastOneOf: []string{ - "preview.0.ip_access_control_allow", "preview.0.alternative_media_id", - "preview.0.preview_locator", "preview.0.streaming_policy_name", - }, - }, - - "alternative_media_id": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.IsUUID, - AtLeastOneOf: []string{ - "preview.0.ip_access_control_allow", "preview.0.alternative_media_id", - "preview.0.preview_locator", "preview.0.streaming_policy_name", - }, - }, - - "endpoint": { - Type: pluginsdk.TypeList, - Computed: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "protocol": { - Type: pluginsdk.TypeString, - Computed: true, - }, - "url": { - Type: pluginsdk.TypeString, - Computed: true, - }, - }, - }, - }, - - "preview_locator": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - ValidateFunc: validation.StringIsNotEmpty, - AtLeastOneOf: []string{ - "preview.0.ip_access_control_allow", "preview.0.alternative_media_id", - "preview.0.preview_locator", "preview.0.streaming_policy_name", - }, - }, - - "streaming_policy_name": { - Type: pluginsdk.TypeString, - Computed: true, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - AtLeastOneOf: []string{ - "preview.0.ip_access_control_allow", "preview.0.alternative_media_id", - "preview.0.preview_locator", "preview.0.streaming_policy_name", - }, - }, - }, - }, - }, - - "stream_options": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - ValidateFunc: validation.StringInSlice(liveevents.PossibleValuesForStreamOptionsFlag(), false), - }, - }, - - "transcription_languages": { - Type: pluginsdk.TypeList, - Optional: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - - "use_static_hostname": { - Type: pluginsdk.TypeBool, - Optional: true, - ForceNew: true, - }, - - "tags": commonschema.Tags(), - }, - } -} - -func resourceMediaLiveEventCreate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220801Client.LiveEvents - subscriptionID := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := liveevents.NewLiveEventID(subscriptionID, d.Get("resource_group_name").(string), d.Get("media_services_account_name").(string), d.Get("name").(string)) - existing, err := client.Get(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for presence of existing %s: %+v", id, err) - } - } - - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_media_live_event", id.ID()) - } - - t := d.Get("tags").(map[string]interface{}) - - payload := liveevents.LiveEvent{ - Properties: &liveevents.LiveEventProperties{}, - Location: location.Normalize(d.Get("location").(string)), - Tags: tags.Expand(t), - } - - autoStart := utils.Bool(false) - if _, ok := d.GetOk("auto_start_enabled"); ok { - autoStart = utils.Bool(d.Get("auto_start_enabled").(bool)) - } - - if input, ok := d.GetOk("input"); ok { - payload.Properties.Input = expandLiveEventInput(input.([]interface{})) - } - - if crossSitePolicies, ok := d.GetOk("cross_site_access_policy"); ok { - payload.Properties.CrossSiteAccessPolicies = expandLiveEventCrossSiteAccessPolicies(crossSitePolicies.([]interface{})) - } - - if description, ok := d.GetOk("description"); ok { - payload.Properties.Description = utils.String(description.(string)) - } - - if encoding, ok := d.GetOk("encoding"); ok { - payload.Properties.Encoding = expandEncoding(encoding.([]interface{})) - } - - if hostNamePrefix, ok := d.GetOk("hostname_prefix"); ok { - payload.Properties.HostnamePrefix = utils.String(hostNamePrefix.(string)) - } - - if preview, ok := d.GetOk("preview"); ok { - payload.Properties.Preview = expandPreview(preview.([]interface{})) - } - - if streamOptions, ok := d.GetOk("stream_options"); ok { - payload.Properties.StreamOptions = expandStreamOptions(streamOptions.([]interface{})) - } - - if transcriptionLanguages, ok := d.GetOk("transcription_languages"); ok { - payload.Properties.Transcriptions = expandTranscriptions(transcriptionLanguages.([]interface{})) - } - - if useStaticHostName, ok := d.GetOk("use_static_hostname"); ok { - payload.Properties.UseStaticHostname = utils.Bool(useStaticHostName.(bool)) - } - - options := liveevents.CreateOperationOptions{ - AutoStart: autoStart, - } - if err := client.CreateThenPoll(ctx, id, payload, options); err != nil { - return fmt.Errorf("creating %s: %+v", id, err) - } - - d.SetId(id.ID()) - - return resourceMediaLiveEventRead(d, meta) -} - -func resourceMediaLiveEventUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220801Client.LiveEvents - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := liveevents.ParseLiveEventID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, *id) - if err != nil { - return fmt.Errorf("retrieving %s: %+v", id, err) - } - - if resp.Model == nil || resp.Model.Properties == nil { - return fmt.Errorf("unexpected null model of %s", id) - } - existing := resp.Model - - if d.HasChange("input") { - existing.Properties.Input = expandLiveEventInput(d.Get("input").([]interface{})) - } - - if d.HasChange("cross_site_access_policy") { - existing.Properties.CrossSiteAccessPolicies = expandLiveEventCrossSiteAccessPolicies(d.Get("cross_site_access_policy").([]interface{})) - } - - if d.HasChange("description") { - existing.Properties.Description = utils.String(d.Get("description").(string)) - } - - if d.HasChange("encoding") { - existing.Properties.Encoding = expandEncoding(d.Get("encoding").([]interface{})) - } - - if d.HasChange("hostname_prefix") { - existing.Properties.HostnamePrefix = utils.String(d.Get("hostname_prefix").(string)) - } - - if d.HasChange("preview") { - existing.Properties.Preview = expandPreview(d.Get("preview").([]interface{})) - } - - if d.HasChange("transcription_languages") { - existing.Properties.Transcriptions = expandTranscriptions(d.Get("transcription_languages").([]interface{})) - } - - if d.HasChange("tags") { - existing.Tags = tags.Expand(d.Get("tags").(map[string]interface{})) - } - - if err := client.UpdateThenPoll(ctx, *id, *existing); err != nil { - return fmt.Errorf("updating %s: %+v", id, err) - } - - return resourceMediaLiveEventRead(d, meta) -} - -func resourceMediaLiveEventRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220801Client.LiveEvents - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := liveevents.ParseLiveEventID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - log.Printf("[INFO] %s was not found - removing from state", id) - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving %s: %+v", id, err) - } - - d.Set("name", id.LiveEventName) - d.Set("media_services_account_name", id.MediaServiceName) - d.Set("resource_group_name", id.ResourceGroupName) - - if model := resp.Model; model != nil { - d.Set("location", location.Normalize(model.Location)) - - if props := model.Properties; props != nil { - input := flattenLiveEventInput(props.Input) - if err := d.Set("input", input); err != nil { - return fmt.Errorf("flattening `input`: %s", err) - } - - crossSiteAccessPolicies := flattenLiveEventCrossSiteAccessPolicies(props.CrossSiteAccessPolicies) - if err := d.Set("cross_site_access_policy", crossSiteAccessPolicies); err != nil { - return fmt.Errorf("flattening `cross_site_access_policy`: %s", err) - } - - encoding := flattenEncoding(props.Encoding) - if err := d.Set("encoding", encoding); err != nil { - return fmt.Errorf("flattening `encoding`: %s", err) - } - - d.Set("description", props.Description) - d.Set("hostname_prefix", props.HostnamePrefix) - - preview := flattenPreview(props.Preview) - if err := d.Set("preview", preview); err != nil { - return fmt.Errorf("flattening `preview`: %s", err) - } - - streamOptions := flattenStreamOptions(props.StreamOptions) - if err := d.Set("stream_options", streamOptions); err != nil { - return fmt.Errorf("flattening `stream_options`: %s", err) - } - - transcriptions := flattenTranscriptions(props.Transcriptions) - if err := d.Set("transcription_languages", transcriptions); err != nil { - return fmt.Errorf("flattening `transcription_languages`: %s", err) - } - - useStaticHostName := false - if props.UseStaticHostname != nil { - useStaticHostName = *props.UseStaticHostname - } - d.Set("use_static_hostname", useStaticHostName) - } - } - - return nil -} - -func resourceMediaLiveEventDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220801Client.LiveEvents - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := liveevents.ParseLiveEventID(d.Id()) - if err != nil { - return err - } - - // Stop Live Event before we attempt to delete it. - resp, err := client.Get(ctx, *id) - if err != nil { - return fmt.Errorf("retrieving %s: %+v", id, err) - } - if model := resp.Model; model != nil { - if props := model.Properties; props != nil { - if props.ResourceState != nil && *props.ResourceState == liveevents.LiveEventResourceStateRunning { - payload := liveevents.LiveEventActionInput{ - RemoveOutputsOnStop: utils.Bool(false), - } - if err := client.StopThenPoll(ctx, *id, payload); err != nil { - return fmt.Errorf("stopping %s: %+v", *id, err) - } - } - } - } - - if err := client.DeleteThenPoll(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - - return nil -} - -func expandLiveEventInput(input []interface{}) liveevents.LiveEventInput { - liveInput := input[0].(map[string]interface{}) - - var inputAccessControl *liveevents.LiveEventInputAccessControl - if v := liveInput["ip_access_control_allow"]; v != nil { - ipRanges := expandIPRanges(v.([]interface{})) - inputAccessControl = &liveevents.LiveEventInputAccessControl{ - IP: &liveevents.IPAccessControl{ - Allow: &ipRanges, - }, - } - } - - accessToken := "" - if v := liveInput["access_token"]; v != nil { - accessToken = v.(string) - } - - keyFrameInterval := "" - if v := liveInput["key_frame_interval_duration"]; v != nil { - keyFrameInterval = v.(string) - } - - streamingProtocol := "" - if v := liveInput["streaming_protocol"]; v != nil { - streamingProtocol = v.(string) - } - - return liveevents.LiveEventInput{ - AccessControl: inputAccessControl, - AccessToken: utils.String(accessToken), - KeyFrameIntervalDuration: utils.String(keyFrameInterval), - StreamingProtocol: liveevents.LiveEventInputProtocol(streamingProtocol), - } -} - -func expandIPRanges(input []interface{}) []liveevents.IPRange { - if len(input) == 0 { - return nil - } - - ipRanges := make([]liveevents.IPRange, 0) - for _, ipAllow := range input { - if ipAllow == nil { - continue - } - allow := ipAllow.(map[string]interface{}) - address := allow["address"].(string) - name := allow["name"].(string) - - ipRange := liveevents.IPRange{ - Name: utils.String(name), - Address: utils.String(address), - } - subnetPrefixLengthRaw := allow["subnet_prefix_length"] - if subnetPrefixLengthRaw != "" { - ipRange.SubnetPrefixLength = pointer.To(int64(subnetPrefixLengthRaw.(int))) - } - ipRanges = append(ipRanges, ipRange) - } - - return ipRanges -} - -func expandEncoding(input []interface{}) *liveevents.LiveEventEncoding { - if len(input) == 0 { - return nil - } - - liveEncoding := input[0].(map[string]interface{}) - - encodingType := "" - if v := liveEncoding["type"]; v != nil { - encodingType = v.(string) - } - - stretchMode := "" - if v := liveEncoding["stretch_mode"]; v != nil { - stretchMode = v.(string) - } - - liveEventEncoding := &liveevents.LiveEventEncoding{ - EncodingType: pointer.To(liveevents.LiveEventEncodingType(encodingType)), - StretchMode: pointer.To(liveevents.StretchMode(stretchMode)), - } - - if v := liveEncoding["key_frame_interval"]; v != nil && v.(string) != "" { - liveEventEncoding.KeyFrameInterval = utils.String(v.(string)) - } - - if v := liveEncoding["preset_name"]; v != nil { - liveEventEncoding.PresetName = utils.String(v.(string)) - } - - return liveEventEncoding -} - -func expandPreview(input []interface{}) *liveevents.LiveEventPreview { - if len(input) == 0 { - return nil - } - - livePreview := input[0].(map[string]interface{}) - var inputAccessControl *liveevents.LiveEventPreviewAccessControl - if v := livePreview["ip_access_control_allow"]; v != nil { - ipRanges := expandIPRanges(v.([]interface{})) - inputAccessControl = &liveevents.LiveEventPreviewAccessControl{ - IP: &liveevents.IPAccessControl{ - Allow: &ipRanges, - }, - } - } - - alternativeMediaID := "" - if v := livePreview["alternative_media_id"]; v != nil { - alternativeMediaID = v.(string) - } - - previewLocator := "" - if v := livePreview["preview_locator"]; v != nil { - previewLocator = v.(string) - } - - streamingPolicyName := "" - if v := livePreview["streaming_policy_name"]; v != nil { - streamingPolicyName = v.(string) - } - - return &liveevents.LiveEventPreview{ - AccessControl: inputAccessControl, - AlternativeMediaId: utils.String(alternativeMediaID), - PreviewLocator: utils.String(previewLocator), - StreamingPolicyName: utils.String(streamingPolicyName), - } -} - -func expandLiveEventCrossSiteAccessPolicies(input []interface{}) *liveevents.CrossSiteAccessPolicies { - if len(input) == 0 { - return nil - } - - crossSiteAccessPolicy := input[0].(map[string]interface{}) - clientAccessPolicy := crossSiteAccessPolicy["client_access_policy"].(string) - crossDomainPolicy := crossSiteAccessPolicy["cross_domain_policy"].(string) - return &liveevents.CrossSiteAccessPolicies{ - ClientAccessPolicy: &clientAccessPolicy, - CrossDomainPolicy: &crossDomainPolicy, - } -} - -func expandStreamOptions(input []interface{}) *[]liveevents.StreamOptionsFlag { - streamOptions := make([]liveevents.StreamOptionsFlag, 0) - for _, v := range input { - streamOptions = append(streamOptions, liveevents.StreamOptionsFlag(v.(string))) - } - return &streamOptions -} - -func expandTranscriptions(input []interface{}) *[]liveevents.LiveEventTranscription { - transcriptions := make([]liveevents.LiveEventTranscription, 0) - for _, v := range input { - transcriptions = append(transcriptions, liveevents.LiveEventTranscription{ - Language: utils.String(v.(string)), - }) - } - return &transcriptions -} - -func flattenLiveEventInput(input liveevents.LiveEventInput) []interface{} { - ipAccessControlAllow := flattenEventAccessControl(input.AccessControl) - - accessToken := "" - if input.AccessToken != nil { - accessToken = *input.AccessToken - } - - endpoints := flattenEndpoints(input.Endpoints) - - keyFrameInterval := "" - if input.KeyFrameIntervalDuration != nil { - keyFrameInterval = *input.KeyFrameIntervalDuration - } - - return []interface{}{ - map[string]interface{}{ - "ip_access_control_allow": ipAccessControlAllow, - "access_token": accessToken, - "endpoint": endpoints, - "key_frame_interval_duration": keyFrameInterval, - "streaming_protocol": string(input.StreamingProtocol), - }, - } -} - -func flattenEventAccessControl(input *liveevents.LiveEventInputAccessControl) []interface{} { - if input == nil || input.IP == nil || input.IP.Allow == nil { - return make([]interface{}, 0) - } - - return flattenIPAllow(input.IP.Allow) -} - -func flattenEndpoints(input *[]liveevents.LiveEventEndpoint) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - endpoints := make([]interface{}, 0) - for _, v := range *input { - protocol := "" - if v.Protocol != nil { - protocol = *v.Protocol - } - - url := "" - if v.Url != nil { - url = *v.Url - } - - endpoints = append(endpoints, map[string]interface{}{ - "protocol": protocol, - "url": url, - }) - } - - return endpoints -} - -func flattenEncoding(input *liveevents.LiveEventEncoding) []interface{} { - if input == nil || (input.KeyFrameInterval == nil && input.PresetName == nil && (input.EncodingType == nil || *input.EncodingType == liveevents.LiveEventEncodingTypeNone)) { - return make([]interface{}, 0) - } - - encodingType := "" - if input.EncodingType != nil { - encodingType = string(*input.EncodingType) - } - - keyFrameInterval := "" - if input.KeyFrameInterval != nil { - keyFrameInterval = *input.KeyFrameInterval - } - - presetName := "" - if input.PresetName != nil { - presetName = *input.PresetName - } - - stretchMode := "" - if input.StretchMode != nil { - stretchMode = string(*input.StretchMode) - } - - return []interface{}{ - map[string]interface{}{ - "type": encodingType, - "key_frame_interval": keyFrameInterval, - "preset_name": presetName, - "stretch_mode": stretchMode, - }, - } -} - -func flattenPreview(input *liveevents.LiveEventPreview) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - iPAccessControlAllow := flattenPreviewAccessControl(input.AccessControl) - - alternativeMediaID := "" - if input.AlternativeMediaId != nil { - alternativeMediaID = *input.AlternativeMediaId - } - - endpoints := flattenEndpoints(input.Endpoints) - - previewLocator := "" - if input.PreviewLocator != nil { - previewLocator = *input.PreviewLocator - } - - streamingPolicyName := "" - if input.StreamingPolicyName != nil { - streamingPolicyName = *input.StreamingPolicyName - } - - return []interface{}{ - map[string]interface{}{ - "ip_access_control_allow": iPAccessControlAllow, - "alternative_media_id": alternativeMediaID, - "endpoint": endpoints, - "preview_locator": previewLocator, - "streaming_policy_name": streamingPolicyName, - }, - } -} - -func flattenPreviewAccessControl(input *liveevents.LiveEventPreviewAccessControl) []interface{} { - if input == nil || input.IP == nil || input.IP.Allow == nil { - return make([]interface{}, 0) - } - - return flattenIPAllow(input.IP.Allow) -} - -func flattenIPAllow(input *[]liveevents.IPRange) []interface{} { - ipAllow := make([]interface{}, 0) - - for _, v := range *input { - name := "" - if v.Name != nil { - name = *v.Name - } - - address := "" - if v.Address != nil { - address = *v.Address - } - - var subnetPrefixLength int64 - if v.SubnetPrefixLength != nil { - subnetPrefixLength = *v.SubnetPrefixLength - } - - ipAllow = append(ipAllow, map[string]interface{}{ - "name": name, - "address": address, - "subnet_prefix_length": subnetPrefixLength, - }) - } - - return ipAllow -} - -func flattenLiveEventCrossSiteAccessPolicies(input *liveevents.CrossSiteAccessPolicies) []interface{} { - if input == nil || (input.ClientAccessPolicy == nil && input.CrossDomainPolicy == nil) { - return make([]interface{}, 0) - } - - clientAccessPolicy := "" - if input.ClientAccessPolicy != nil { - clientAccessPolicy = *input.ClientAccessPolicy - } - - crossDomainPolicy := "" - if input.CrossDomainPolicy != nil { - crossDomainPolicy = *input.CrossDomainPolicy - } - - return []interface{}{ - map[string]interface{}{ - "client_access_policy": clientAccessPolicy, - "cross_domain_policy": crossDomainPolicy, - }, - } -} - -func flattenStreamOptions(input *[]liveevents.StreamOptionsFlag) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - streamOptions := make([]interface{}, 0) - for _, v := range *input { - streamOptions = append(streamOptions, string(v)) - } - - return streamOptions -} - -func flattenTranscriptions(input *[]liveevents.LiveEventTranscription) []string { - if input == nil { - return make([]string, 0) - } - - transcriptionLanguages := make([]string, 0) - for _, v := range *input { - if v.Language != nil && *v.Language != "" { - transcriptionLanguages = append(transcriptionLanguages, *v.Language) - } - } - - return transcriptionLanguages -} diff --git a/internal/services/media/media_streaming_live_event_resource_test.go b/internal/services/media/media_streaming_live_event_resource_test.go deleted file mode 100644 index 5ebc63f2758d0..0000000000000 --- a/internal/services/media/media_streaming_live_event_resource_test.go +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type LiveEventResource struct{} - -func TestAccLiveEvent_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_live_event` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_live_event", "test") - r := LiveEventResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Event-1"), - ), - }, - data.ImportStep(), - }) -} - -func TestAccLiveEvent_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_live_event` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_live_event", "test") - r := LiveEventResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Event-1"), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func TestAccLiveEvent_update(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_live_event` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_live_event", "test") - r := LiveEventResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.update(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - }) -} - -func TestAccLiveEvent_complete(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_live_event` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_live_event", "test") - r := LiveEventResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("encoding.#").HasValue("1"), - check.That(data.ResourceName).Key("preview.#").HasValue("1"), - ), - }, - data.ImportStep(), - }) -} - -func (LiveEventResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := liveevents.ParseLiveEventID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.Media.V20220801Client.LiveEvents.Get(ctx, *id) - if err != nil { - return nil, fmt.Errorf("retrieving %s: %+v", id, err) - } - - return utils.Bool(resp.Model != nil), nil -} - -func (r LiveEventResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_live_event" "test" { - name = "Event-1" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name - location = azurerm_resource_group.test.location - - input { - streaming_protocol = "RTMP" - key_frame_interval_duration = "PT6S" - ip_access_control_allow { - name = "AllowAll" - address = "0.0.0.0" - subnet_prefix_length = 0 - } - } -} -`, r.template(data)) -} - -func (r LiveEventResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_live_event" "import" { - name = azurerm_media_live_event.test.name - resource_group_name = azurerm_media_live_event.test.resource_group_name - media_services_account_name = azurerm_media_live_event.test.media_services_account_name - location = azurerm_resource_group.test.location - - input { - streaming_protocol = "RTMP" - key_frame_interval_duration = "PT6S" - ip_access_control_allow { - name = "AllowAll" - address = "0.0.0.0" - subnet_prefix_length = 0 - } - } -} -`, r.basic(data)) -} - -func (r LiveEventResource) update(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_live_event" "test" { - name = "Event-1" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name - location = azurerm_resource_group.test.location - description = "Updated Description" - - input { - streaming_protocol = "RTMP" - ip_access_control_allow { - name = "Test" - address = "0.0.0.0" - subnet_prefix_length = 4 - } - } - - encoding { - type = "Standard" - preset_name = "Default720p" - stretch_mode = "AutoSize" - key_frame_interval = "PT2S" - } - - preview { - ip_access_control_allow { - name = "Allow" - address = "0.0.0.0" - subnet_prefix_length = 4 - } - } - - use_static_hostname = true - hostname_prefix = "special-event-update" - stream_options = ["LowLatency"] - transcription_languages = ["en-GB"] - - tags = { - env = "test" - } -} -`, r.template(data)) -} - -func (r LiveEventResource) complete(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_live_event" "test" { - name = "Event-1" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name - location = azurerm_resource_group.test.location - description = "My Event Description" - - input { - streaming_protocol = "RTMP" - ip_access_control_allow { - name = "AllowAll" - address = "0.0.0.0" - subnet_prefix_length = 0 - } - } - - encoding { - type = "Standard" - preset_name = "Default720p" - stretch_mode = "AutoFit" - key_frame_interval = "PT2S" - } - - preview { - ip_access_control_allow { - name = "AllowAll" - address = "0.0.0.0" - subnet_prefix_length = 0 - } - } - - use_static_hostname = true - hostname_prefix = "special-event" - stream_options = ["LowLatency"] - transcription_languages = ["en-US"] -} -`, r.template(data)) -} - -func (LiveEventResource) template(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-media-%d" - location = "%s" -} - -resource "azurerm_storage_account" "test" { - name = "acctestsa1%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "test" { - name = "acctestmsa%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - storage_account { - id = azurerm_storage_account.test.id - is_primary = true - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomString, data.RandomString) -} diff --git a/internal/services/media/media_streaming_locator_resource.go b/internal/services/media/media_streaming_locator_resource.go deleted file mode 100644 index 8100ef064dbff..0000000000000 --- a/internal/services/media/media_streaming_locator_resource.go +++ /dev/null @@ -1,418 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media - -import ( - "fmt" - "log" - "regexp" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/media/migration" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/media/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceMediaStreamingLocator() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceMediaStreamingLocatorCreate, - Read: resourceMediaStreamingLocatorRead, - Delete: resourceMediaStreamingLocatorDelete, - - DeprecationMessage: azureMediaRetirementMessage, - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := streamingpoliciesandstreaminglocators.ParseStreamingLocatorID(id) - return err - }), - - StateUpgraders: pluginsdk.StateUpgrades(map[int]pluginsdk.StateUpgrade{ - 0: migration.StreamingLocatorV0ToV1{}, - }), - SchemaVersion: 1, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile("^[-a-zA-Z0-9(_)]{1,128}$"), - "Streaming Locator name must be 1 - 128 characters long, can contain letters, numbers, underscores, and hyphens (but the first and last character must be a letter or number).", - ), - }, - - "resource_group_name": commonschema.ResourceGroupName(), - - "media_services_account_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.AccountName, - }, - - "asset_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile("^[-a-zA-Z0-9]{1,128}$"), - "Asset name must be 1 - 128 characters long, contain only letters, hyphen and numbers.", - ), - }, - - "streaming_policy_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "alternative_media_id": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - // lintignore:XS003 - "content_key": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "content_key_id": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.IsUUID, - }, - - "label_reference_in_streaming_policy": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "policy_name": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "type": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - string(streamingpoliciesandstreaminglocators.StreamingLocatorContentKeyTypeCommonEncryptionCbcs), - string(streamingpoliciesandstreaminglocators.StreamingLocatorContentKeyTypeCommonEncryptionCenc), - string(streamingpoliciesandstreaminglocators.StreamingLocatorContentKeyTypeEnvelopeEncryption), - }, false), - }, - - "value": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - - "default_content_key_policy_name": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "end_time": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validation.IsRFC3339Time, - }, - - "filter_names": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - - "start_time": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.IsRFC3339Time, - }, - - "streaming_locator_id": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validation.IsUUID, - }, - }, - } -} - -func resourceMediaStreamingLocatorCreate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220801Client.StreamingPoliciesAndStreamingLocators - subscriptionID := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := streamingpoliciesandstreaminglocators.NewStreamingLocatorID(subscriptionID, d.Get("resource_group_name").(string), d.Get("media_services_account_name").(string), d.Get("name").(string)) - if d.IsNewResource() { - existing, err := client.StreamingLocatorsGet(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for presence of existing %s: %+v", id, err) - } - } - - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_media_streaming_locator", id.ID()) - } - } - - payload := streamingpoliciesandstreaminglocators.StreamingLocator{ - Properties: &streamingpoliciesandstreaminglocators.StreamingLocatorProperties{ - AssetName: d.Get("asset_name").(string), - StreamingPolicyName: d.Get("streaming_policy_name").(string), - }, - } - - if alternativeMediaID, ok := d.GetOk("alternative_media_id"); ok { - payload.Properties.AlternativeMediaId = utils.String(alternativeMediaID.(string)) - } - - if contentKeys, ok := d.GetOk("content_key"); ok { - payload.Properties.ContentKeys = expandContentKeys(contentKeys.([]interface{})) - } - - if defaultContentKeyPolicyName, ok := d.GetOk("default_content_key_policy_name"); ok { - payload.Properties.DefaultContentKeyPolicyName = utils.String(defaultContentKeyPolicyName.(string)) - } - - if endTimeRaw, ok := d.GetOk("end_time"); ok { - if endTimeRaw.(string) != "" { - endTime, err := time.Parse(time.RFC3339, endTimeRaw.(string)) - if err != nil { - return err - } - payload.Properties.SetEndTimeAsTime(endTime) - } - } - - if filters, ok := d.GetOk("filter_names"); ok { - payload.Properties.Filters = utils.ExpandStringSlice(filters.([]interface{})) - } - - if startTimeRaw, ok := d.GetOk("start_time"); ok { - if startTimeRaw.(string) != "" { - startTime, err := time.Parse(time.RFC3339, startTimeRaw.(string)) - if err != nil { - return err - } - payload.Properties.SetStartTimeAsTime(startTime) - } - } - - if idRaw, ok := d.GetOk("streaming_locator_id"); ok { - payload.Properties.StreamingLocatorId = pointer.To(idRaw.(string)) - } - - if _, err := client.StreamingLocatorsCreate(ctx, id, payload); err != nil { - return fmt.Errorf("creating %s: %+v", id, err) - } - - d.SetId(id.ID()) - - return resourceMediaStreamingLocatorRead(d, meta) -} - -func resourceMediaStreamingLocatorRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220801Client.StreamingPoliciesAndStreamingLocators - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := streamingpoliciesandstreaminglocators.ParseStreamingLocatorID(d.Id()) - if err != nil { - return err - } - - resp, err := client.StreamingLocatorsGet(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - log.Printf("[INFO] %s was not found - removing from state", *id) - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.StreamingLocatorName) - d.Set("media_services_account_name", id.MediaServiceName) - d.Set("resource_group_name", id.ResourceGroupName) - - if model := resp.Model; model != nil { - if props := model.Properties; props != nil { - d.Set("asset_name", props.AssetName) - d.Set("streaming_policy_name", props.StreamingPolicyName) - d.Set("alternative_media_id", props.AlternativeMediaId) - d.Set("default_content_key_policy_name", props.DefaultContentKeyPolicyName) - - contentKeys := flattenContentKeys(props.ContentKeys) - if err := d.Set("content_key", contentKeys); err != nil { - return fmt.Errorf("flattening `content_key`: %s", err) - } - - endTime := "" - if props.EndTime != nil { - t, err := props.GetEndTimeAsTime() - if err != nil { - return fmt.Errorf("parsing EndTime: %+v", err) - } - endTime = t.Format(time.RFC3339) - } - d.Set("end_time", endTime) - d.Set("filter_names", utils.FlattenStringSlice(props.Filters)) - - startTime := "" - if props.StartTime != nil { - t, err := props.GetStartTimeAsTime() - if err != nil { - return fmt.Errorf("parsing StartTime: %+v", err) - } - startTime = t.Format(time.RFC3339) - } - d.Set("start_time", startTime) - - d.Set("streaming_locator_id", props.StreamingLocatorId) - } - } - - return nil -} - -func resourceMediaStreamingLocatorDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220801Client.StreamingPoliciesAndStreamingLocators - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := streamingpoliciesandstreaminglocators.ParseStreamingLocatorID(d.Id()) - if err != nil { - return err - } - - if _, err = client.StreamingLocatorsDelete(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - - return nil -} - -func expandContentKeys(input []interface{}) *[]streamingpoliciesandstreaminglocators.StreamingLocatorContentKey { - results := make([]streamingpoliciesandstreaminglocators.StreamingLocatorContentKey, 0) - - for _, contentKeyRaw := range input { - if contentKeyRaw == nil { - continue - } - contentKey := contentKeyRaw.(map[string]interface{}) - - streamingLocatorContentKey := streamingpoliciesandstreaminglocators.StreamingLocatorContentKey{} - - if contentKey["content_key_id"] != nil { - streamingLocatorContentKey.Id = contentKey["content_key_id"].(string) - } - - if contentKey["label_reference_in_streaming_policy"] != nil { - streamingLocatorContentKey.LabelReferenceInStreamingPolicy = utils.String(contentKey["label_reference_in_streaming_policy"].(string)) - } - - if contentKey["policy_name"] != nil { - streamingLocatorContentKey.PolicyName = utils.String(contentKey["policy_name"].(string)) - } - - if contentKey["type"] != nil { - streamingLocatorContentKey.Type = pointer.To(streamingpoliciesandstreaminglocators.StreamingLocatorContentKeyType(contentKey["type"].(string))) - } - - if contentKey["value"] != nil { - streamingLocatorContentKey.Value = utils.String(contentKey["value"].(string)) - } - - results = append(results, streamingLocatorContentKey) - } - - return &results -} - -func flattenContentKeys(input *[]streamingpoliciesandstreaminglocators.StreamingLocatorContentKey) []interface{} { - if input == nil { - return []interface{}{} - } - - results := make([]interface{}, 0) - for _, contentKey := range *input { - labelReferenceInStreamingPolicy := "" - if contentKey.LabelReferenceInStreamingPolicy != nil { - labelReferenceInStreamingPolicy = *contentKey.LabelReferenceInStreamingPolicy - } - - policyName := "" - if contentKey.PolicyName != nil { - policyName = *contentKey.PolicyName - } - - contentKeyType := "" - if contentKey.Type != nil { - contentKeyType = string(*contentKey.Type) - } - - value := "" - if contentKey.Value != nil { - value = *contentKey.Value - } - - results = append(results, map[string]interface{}{ - "content_key_id": contentKey.Id, - "label_reference_in_streaming_policy": labelReferenceInStreamingPolicy, - "policy_name": policyName, - "type": contentKeyType, - "value": value, - }) - } - - return results -} diff --git a/internal/services/media/media_streaming_locator_resource_test.go b/internal/services/media/media_streaming_locator_resource_test.go deleted file mode 100644 index d5c332cc23327..0000000000000 --- a/internal/services/media/media_streaming_locator_resource_test.go +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type StreamingLocatorResource struct{} - -func TestAccStreamingLocator_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_streaming_locator` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_streaming_locator", "test") - r := StreamingLocatorResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Locator-1"), - check.That(data.ResourceName).Key("asset_name").HasValue("test"), - ), - }, - data.ImportStep(), - }) -} - -func TestAccStreamingLocator_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_streaming_locator` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_streaming_locator", "test") - r := StreamingLocatorResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Locator-1"), - check.That(data.ResourceName).Key("asset_name").HasValue("test"), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func TestAccStreamingLocator_complete(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_streaming_locator` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_streaming_locator", "test") - r := StreamingLocatorResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("start_time").HasValue("2018-03-01T00:00:00Z"), - check.That(data.ResourceName).Key("end_time").HasValue("2028-12-31T23:59:59Z"), - ), - }, - data.ImportStep(), - }) -} - -func TestAccStreamingLocator_update(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_streaming_locator` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_streaming_locator", "test") - r := StreamingLocatorResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Locator-1"), - check.That(data.ResourceName).Key("asset_name").HasValue("test"), - ), - }, - data.ImportStep(), - { - Config: r.complete(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("start_time").HasValue("2018-03-01T00:00:00Z"), - check.That(data.ResourceName).Key("end_time").HasValue("2028-12-31T23:59:59Z"), - ), - }, - data.ImportStep(), - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Locator-1"), - check.That(data.ResourceName).Key("asset_name").HasValue("test"), - ), - }, - data.ImportStep(), - }) -} - -func (StreamingLocatorResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := streamingpoliciesandstreaminglocators.ParseStreamingLocatorID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.Media.V20220801Client.StreamingPoliciesAndStreamingLocators.StreamingLocatorsGet(ctx, *id) - if err != nil { - return nil, fmt.Errorf("retrieving %s: %+v", *id, err) - } - - return utils.Bool(resp.Model != nil), nil -} - -func (r StreamingLocatorResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_streaming_locator" "test" { - name = "Locator-1" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name - streaming_policy_name = "Predefined_ClearStreamingOnly" - asset_name = azurerm_media_asset.test.name -} -`, r.template(data)) -} - -func (r StreamingLocatorResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_streaming_locator" "import" { - name = azurerm_media_streaming_locator.test.name - resource_group_name = azurerm_media_streaming_locator.test.resource_group_name - media_services_account_name = azurerm_media_streaming_locator.test.media_services_account_name - streaming_policy_name = "Predefined_ClearStreamingOnly" - asset_name = azurerm_media_asset.test.name -} -`, r.basic(data)) -} - -func (r StreamingLocatorResource) complete(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_services_account_filter" "test" { - name = "Filter-1" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name -} - -resource "azurerm_media_streaming_locator" "test" { - name = "Job-1" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name - streaming_policy_name = "Predefined_DownloadOnly" - asset_name = azurerm_media_asset.test.name - start_time = "2018-03-01T00:00:00Z" - end_time = "2028-12-31T23:59:59Z" - streaming_locator_id = "90000000-0000-0000-0000-000000000000" - alternative_media_id = "my-Alternate-MediaID" - filter_names = [azurerm_media_services_account_filter.test.name] -} -`, r.template(data)) -} - -func (StreamingLocatorResource) template(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-media-%d" - location = "%s" -} - -resource "azurerm_storage_account" "test" { - name = "acctestsa1%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "test" { - name = "acctestmsa%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - storage_account { - id = azurerm_storage_account.test.id - is_primary = true - } -} - -resource "azurerm_media_asset" "test" { - name = "test" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name -} -`, data.RandomInteger, data.Locations.Primary, data.RandomString, data.RandomString) -} diff --git a/internal/services/media/media_streaming_policy_resource.go b/internal/services/media/media_streaming_policy_resource.go deleted file mode 100644 index 85abe1cb84eaa..0000000000000 --- a/internal/services/media/media_streaming_policy_resource.go +++ /dev/null @@ -1,1078 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media - -import ( - "fmt" - "log" - "regexp" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/media/migration" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/media/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceMediaStreamingPolicy() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceMediaStreamingPolicyCreate, - Read: resourceMediaStreamingPolicyRead, - Delete: resourceMediaStreamingPolicyDelete, - - DeprecationMessage: azureMediaRetirementMessage, - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := streamingpoliciesandstreaminglocators.ParseStreamingPolicyID(id) - return err - }), - - StateUpgraders: pluginsdk.StateUpgrades(map[int]pluginsdk.StateUpgrade{ - 0: migration.StreamingPolicyV0ToV1{}, - }), - SchemaVersion: 1, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile("^[-a-zA-Z0-9(_)]{1,128}$"), - "Streaming Policy name must be 1 - 128 characters long, can contain letters, numbers, underscores, and hyphens (but the first and last character must be a letter or number).", - ), - }, - - "resource_group_name": commonschema.ResourceGroupName(), - - "media_services_account_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.AccountName, - }, - - "no_encryption_enabled_protocols": enabledProtocolsSchema(), - - "common_encryption_cenc": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "clear_key_encryption": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - ConflictsWith: []string{ - "common_encryption_cenc.0.drm_widevine_custom_license_acquisition_url_template", - "common_encryption_cenc.0.drm_playready", - }, - AtLeastOneOf: []string{ - "common_encryption_cenc.0.drm_widevine_custom_license_acquisition_url_template", - "common_encryption_cenc.0.drm_playready", - "common_encryption_cenc.0.clear_key_encryption", - }, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "custom_keys_acquisition_url_template": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.IsURLWithHTTPS, - }, - }, - }, - }, - - "clear_track": { - Type: pluginsdk.TypeSet, - Optional: true, - ForceNew: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "condition": { - Type: pluginsdk.TypeSet, - Required: true, - ForceNew: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "operation": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - string(streamingpoliciesandstreaminglocators.TrackPropertyCompareOperationEqual), - }, false), - }, - - "property": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - string(streamingpoliciesandstreaminglocators.TrackPropertyTypeFourCC), - }, false), - }, - - "value": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - }, - }, - }, - - "enabled_protocols": enabledProtocolsSchema(), - - "drm_widevine_custom_license_acquisition_url_template": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.IsURLWithHTTPS, - ConflictsWith: []string{"common_encryption_cenc.0.clear_key_encryption"}, - }, - - "drm_playready": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - ConflictsWith: []string{"common_encryption_cenc.0.clear_key_encryption"}, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "custom_license_acquisition_url_template": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.IsURLWithHTTPS, - AtLeastOneOf: []string{"common_encryption_cenc.0.drm_playready.0.custom_license_acquisition_url_template", "common_encryption_cenc.0.drm_playready.0.custom_attributes"}, - }, - - "custom_attributes": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - AtLeastOneOf: []string{"common_encryption_cenc.0.drm_playready.0.custom_license_acquisition_url_template", "common_encryption_cenc.0.drm_playready.0.custom_attributes"}, - }, - }, - }, - }, - - "default_content_key": defaultContentKeySchema(), - - "content_key_to_track_mapping": { - Type: pluginsdk.TypeSet, - Optional: true, - ForceNew: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "label": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "policy_name": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "track": { - Type: pluginsdk.TypeSet, - Required: true, - ForceNew: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "condition": { - Type: pluginsdk.TypeSet, - Required: true, - ForceNew: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "operation": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - string(streamingpoliciesandstreaminglocators.TrackPropertyCompareOperationEqual), - }, false), - }, - - "property": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - string(streamingpoliciesandstreaminglocators.TrackPropertyTypeFourCC), - }, false), - }, - - "value": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - - "common_encryption_cbcs": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "clear_key_encryption": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - ExactlyOneOf: []string{"common_encryption_cbcs.0.drm_fairplay", "common_encryption_cbcs.0.clear_key_encryption"}, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "custom_keys_acquisition_url_template": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.IsURLWithHTTPS, - }, - }, - }, - }, - - "enabled_protocols": enabledProtocolsSchema(), - - "drm_fairplay": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - ExactlyOneOf: []string{"common_encryption_cbcs.0.drm_fairplay", "common_encryption_cbcs.0.clear_key_encryption"}, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "custom_license_acquisition_url_template": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.IsURLWithHTTPS, - AtLeastOneOf: []string{"common_encryption_cbcs.0.drm_fairplay.0.custom_license_acquisition_url_template", "common_encryption_cbcs.0.drm_fairplay.0.allow_persistent_license"}, - }, - - "allow_persistent_license": { - Type: pluginsdk.TypeBool, - Optional: true, - ForceNew: true, - AtLeastOneOf: []string{"common_encryption_cbcs.0.drm_fairplay.0.custom_license_acquisition_url_template", "common_encryption_cbcs.0.drm_fairplay.0.allow_persistent_license"}, - }, - }, - }, - }, - - "default_content_key": defaultContentKeySchema(), - }, - }, - }, - - "envelope_encryption": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "custom_keys_acquisition_url_template": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.IsURLWithHTTPS, - }, - - "default_content_key": defaultContentKeySchema(), - - "enabled_protocols": enabledProtocolsSchema(), - }, - }, - }, - - "default_content_key_policy_name": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - } -} - -func resourceMediaStreamingPolicyCreate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220801Client.StreamingPoliciesAndStreamingLocators - subscriptionID := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := streamingpoliciesandstreaminglocators.NewStreamingPolicyID(subscriptionID, d.Get("resource_group_name").(string), d.Get("media_services_account_name").(string), d.Get("name").(string)) - if d.IsNewResource() { - existing, err := client.StreamingPoliciesGet(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for presence of existing %s: %+v", id, err) - } - } - - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_media_streaming_policy", id.ID()) - } - } - - payload := streamingpoliciesandstreaminglocators.StreamingPolicy{ - Properties: &streamingpoliciesandstreaminglocators.StreamingPolicyProperties{}, - } - - if noEncryption, ok := d.GetOk("no_encryption_enabled_protocols"); ok { - payload.Properties.NoEncryption = &streamingpoliciesandstreaminglocators.NoEncryption{ - EnabledProtocols: expandEnabledProtocols(noEncryption.([]interface{})), - } - } - - if commonEncryptionCENC, ok := d.GetOk("common_encryption_cenc"); ok { - payload.Properties.CommonEncryptionCenc = expandCommonEncryptionCenc(commonEncryptionCENC.([]interface{})) - } - - if commonEncryptionCBCS, ok := d.GetOk("common_encryption_cbcs"); ok { - payload.Properties.CommonEncryptionCbcs = expandCommonEncryptionCbcs(commonEncryptionCBCS.([]interface{})) - } - - if contentKeyPolicyName, ok := d.GetOk("default_content_key_policy_name"); ok { - payload.Properties.DefaultContentKeyPolicyName = utils.String(contentKeyPolicyName.(string)) - } - - if envelopeEncryption, ok := d.GetOk("envelope_encryption"); ok { - payload.Properties.EnvelopeEncryption = expandEnvelopeEncryption(envelopeEncryption.([]interface{})) - } - - if _, err := client.StreamingPoliciesCreate(ctx, id, payload); err != nil { - return fmt.Errorf("creating %s: %+v", id, err) - } - - d.SetId(id.ID()) - - return resourceMediaStreamingPolicyRead(d, meta) -} - -func resourceMediaStreamingPolicyRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220801Client.StreamingPoliciesAndStreamingLocators - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := streamingpoliciesandstreaminglocators.ParseStreamingPolicyID(d.Id()) - if err != nil { - return err - } - - resp, err := client.StreamingPoliciesGet(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - log.Printf("[INFO] %s was not found - removing from state", *id) - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.StreamingPolicyName) - d.Set("media_services_account_name", id.MediaServiceName) - d.Set("resource_group_name", id.ResourceGroupName) - - if model := resp.Model; model != nil { - if props := model.Properties; props != nil { - noEncryption := flattenNoEncryption(props.NoEncryption) - if err := d.Set("no_encryption_enabled_protocols", noEncryption); err != nil { - return fmt.Errorf("flattening `no_encryption_enabled_protocols`: %s", err) - } - - commonEncryptionCENC := flattenCommonEncryptionCenc(props.CommonEncryptionCenc) - if err := d.Set("common_encryption_cenc", commonEncryptionCENC); err != nil { - return fmt.Errorf("flattening `common_encryption_cenc`: %s", err) - } - - commonEncryptionCBCS := flattenCommonEncryptionCbcs(props.CommonEncryptionCbcs) - if err := d.Set("common_encryption_cbcs", commonEncryptionCBCS); err != nil { - return fmt.Errorf("flattening `common_encryption_cbcs`: %s", err) - } - - envelopeEncryption := flattenEnvelopeEncryption(props.EnvelopeEncryption) - if err := d.Set("envelope_encryption", envelopeEncryption); err != nil { - return fmt.Errorf("flattening `envelope_encryption`: %s", err) - } - - d.Set("default_content_key_policy_name", props.DefaultContentKeyPolicyName) - } - } - - return nil -} - -func resourceMediaStreamingPolicyDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220801Client.StreamingPoliciesAndStreamingLocators - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := streamingpoliciesandstreaminglocators.ParseStreamingPolicyID(d.Id()) - if err != nil { - return err - } - - if _, err = client.StreamingPoliciesDelete(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - - return nil -} - -func enabledProtocolsSchema() *pluginsdk.Schema { - // lintignore:XS003 - return &pluginsdk.Schema{ - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "dash": { - Type: pluginsdk.TypeBool, - Optional: true, - ForceNew: true, - }, - - "download": { - Type: pluginsdk.TypeBool, - Optional: true, - ForceNew: true, - }, - - "hls": { - Type: pluginsdk.TypeBool, - Optional: true, - ForceNew: true, - }, - - "smooth_streaming": { - Type: pluginsdk.TypeBool, - Optional: true, - ForceNew: true, - }, - }, - }, - } -} - -func defaultContentKeySchema() *pluginsdk.Schema { - // lintignore:XS003 - return &pluginsdk.Schema{ - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "label": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "policy_name": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - } -} - -func expandEnabledProtocols(input []interface{}) *streamingpoliciesandstreaminglocators.EnabledProtocols { - if len(input) == 0 || input[0] == nil { - return nil - } - protocols := input[0].(map[string]interface{}) - - dash := false - if v := protocols["dash"]; v != nil { - dash = v.(bool) - } - - download := false - if v := protocols["download"]; v != nil { - download = v.(bool) - } - - hls := false - if v := protocols["hls"]; v != nil { - hls = v.(bool) - } - - smoothStreaming := false - if v := protocols["smooth_streaming"]; v != nil { - smoothStreaming = v.(bool) - } - - return &streamingpoliciesandstreaminglocators.EnabledProtocols{ - Dash: dash, - Download: download, - Hls: hls, - SmoothStreaming: smoothStreaming, - } -} - -func expandCommonEncryptionCenc(input []interface{}) *streamingpoliciesandstreaminglocators.CommonEncryptionCenc { - if len(input) == 0 || input[0] == nil { - return nil - } - - item := input[0].(map[string]interface{}) - - result := &streamingpoliciesandstreaminglocators.CommonEncryptionCenc{ - ClearKeyEncryptionConfiguration: expandClearKeyEncryptionConfiguration(item["clear_key_encryption"].([]interface{})), - ClearTracks: expandTrackSelections(item["clear_track"].(*pluginsdk.Set).List()), - EnabledProtocols: expandEnabledProtocols(item["enabled_protocols"].([]interface{})), - } - - if v := item["default_content_key"].([]interface{}); len(v) != 0 && v[0] != nil { - if result.ContentKeys == nil { - result.ContentKeys = &streamingpoliciesandstreaminglocators.StreamingPolicyContentKeys{} - } - result.ContentKeys.DefaultKey = expandDefaultKey(v) - } - - if v := item["content_key_to_track_mapping"].(*pluginsdk.Set).List(); len(v) != 0 && v[0] != nil { - if result.ContentKeys == nil { - result.ContentKeys = &streamingpoliciesandstreaminglocators.StreamingPolicyContentKeys{} - } - result.ContentKeys.KeyToTrackMappings = expandKeyToTrackMappings(v) - } - - if v := item["drm_widevine_custom_license_acquisition_url_template"].(string); v != "" { - if result.Drm == nil { - result.Drm = &streamingpoliciesandstreaminglocators.CencDrmConfiguration{} - } - result.Drm.Widevine = &streamingpoliciesandstreaminglocators.StreamingPolicyWidevineConfiguration{ - CustomLicenseAcquisitionUrlTemplate: utils.String(v), - } - } - - if v := item["drm_playready"].([]interface{}); len(v) != 0 && v[0] != nil { - if result.Drm == nil { - result.Drm = &streamingpoliciesandstreaminglocators.CencDrmConfiguration{} - } - result.Drm.PlayReady = expandPlayReady(v) - } - - return result -} - -func expandCommonEncryptionCbcs(input []interface{}) *streamingpoliciesandstreaminglocators.CommonEncryptionCbcs { - if len(input) == 0 || input[0] == nil { - return nil - } - - item := input[0].(map[string]interface{}) - - var enabledProtocols *streamingpoliciesandstreaminglocators.EnabledProtocols - if v := item["enabled_protocols"]; v != nil { - enabledProtocols = expandEnabledProtocols(v.([]interface{})) - } - - result := &streamingpoliciesandstreaminglocators.CommonEncryptionCbcs{ - ClearKeyEncryptionConfiguration: expandClearKeyEncryptionConfiguration(item["clear_key_encryption"].([]interface{})), - EnabledProtocols: enabledProtocols, - } - - if v := item["default_content_key"].([]interface{}); len(v) != 0 && v[0] != nil { - if result.ContentKeys == nil { - result.ContentKeys = &streamingpoliciesandstreaminglocators.StreamingPolicyContentKeys{} - } - result.ContentKeys.DefaultKey = expandDefaultKey(v) - } - - if v := item["drm_fairplay"].([]interface{}); len(v) != 0 && v[0] != nil { - if result.Drm == nil { - result.Drm = &streamingpoliciesandstreaminglocators.CbcsDrmConfiguration{} - } - result.Drm.FairPlay = expandFairPlay(v) - } - - return result -} - -func expandEnvelopeEncryption(input []interface{}) *streamingpoliciesandstreaminglocators.EnvelopeEncryption { - if len(input) == 0 || input[0] == nil { - return nil - } - - item := input[0].(map[string]interface{}) - result := &streamingpoliciesandstreaminglocators.EnvelopeEncryption{ - EnabledProtocols: expandEnabledProtocols(item["enabled_protocols"].([]interface{})), - } - - if v := item["default_content_key"].([]interface{}); len(v) != 0 && v[0] != nil { - if result.ContentKeys == nil { - result.ContentKeys = &streamingpoliciesandstreaminglocators.StreamingPolicyContentKeys{} - } - result.ContentKeys.DefaultKey = expandDefaultKey(v) - } - - if v := item["custom_keys_acquisition_url_template"].(string); v != "" { - result.CustomKeyAcquisitionUrlTemplate = utils.String(v) - } - - return result -} - -func expandPlayReady(input []interface{}) *streamingpoliciesandstreaminglocators.StreamingPolicyPlayReadyConfiguration { - if len(input) == 0 { - return nil - } - - playReady := input[0].(map[string]interface{}) - - result := &streamingpoliciesandstreaminglocators.StreamingPolicyPlayReadyConfiguration{} - - if v := playReady["custom_license_acquisition_url_template"].(string); v != "" { - result.CustomLicenseAcquisitionUrlTemplate = utils.String(v) - } - - if v := playReady["custom_attributes"].(string); v != "" { - result.PlayReadyCustomAttributes = utils.String(v) - } - - return result -} - -func expandDefaultKey(input []interface{}) *streamingpoliciesandstreaminglocators.DefaultKey { - if len(input) == 0 || input[0] == nil { - return nil - } - - defaultKey := input[0].(map[string]interface{}) - defaultKeyResult := &streamingpoliciesandstreaminglocators.DefaultKey{} - - if v := defaultKey["policy_name"].(string); v != "" { - defaultKeyResult.PolicyName = utils.String(v) - } - - if v := defaultKey["label"].(string); v != "" { - defaultKeyResult.Label = utils.String(v) - } - - return defaultKeyResult -} - -func expandClearKeyEncryptionConfiguration(input []interface{}) *streamingpoliciesandstreaminglocators.ClearKeyEncryptionConfiguration { - if len(input) == 0 || input[0] == nil { - return nil - } - - clearKeyEncryptionConfiguration := input[0].(map[string]interface{}) - result := streamingpoliciesandstreaminglocators.ClearKeyEncryptionConfiguration{} - - if v := clearKeyEncryptionConfiguration["custom_keys_acquisition_url_template"].(string); v != "" { - result.CustomKeysAcquisitionUrlTemplate = utils.String(v) - } - - return &result -} - -func expandTrackSelections(input []interface{}) *[]streamingpoliciesandstreaminglocators.TrackSelection { - if len(input) == 0 { - return nil - } - - result := make([]streamingpoliciesandstreaminglocators.TrackSelection, 0) - for _, v := range input { - selections := v.(map[string]interface{}) - conditions := expandTrackPropertyConditions(selections["condition"].(*pluginsdk.Set).List()) - - result = append(result, streamingpoliciesandstreaminglocators.TrackSelection{ - TrackSelections: conditions, - }) - } - - return &result -} - -func expandTrackPropertyConditions(input []interface{}) *[]streamingpoliciesandstreaminglocators.TrackPropertyCondition { - if len(input) == 0 { - return nil - } - - result := make([]streamingpoliciesandstreaminglocators.TrackPropertyCondition, 0) - for _, c := range input { - conditionRaw := c.(map[string]interface{}) - condition := streamingpoliciesandstreaminglocators.TrackPropertyCondition{ - Operation: streamingpoliciesandstreaminglocators.TrackPropertyCompareOperation(conditionRaw["operation"].(string)), - Property: streamingpoliciesandstreaminglocators.TrackPropertyType(conditionRaw["property"].(string)), - Value: utils.String(conditionRaw["value"].(string)), - } - - result = append(result, condition) - } - return &result -} - -func expandKeyToTrackMappings(input []interface{}) *[]streamingpoliciesandstreaminglocators.StreamingPolicyContentKey { - if len(input) == 0 { - return nil - } - - result := make([]streamingpoliciesandstreaminglocators.StreamingPolicyContentKey, 0) - for _, v := range input { - mappings := v.(map[string]interface{}) - contentKey := streamingpoliciesandstreaminglocators.StreamingPolicyContentKey{ - Tracks: expandTrackSelections(mappings["track"].(*pluginsdk.Set).List()), - } - - if label := mappings["label"].(string); label != "" { - contentKey.Label = utils.String(label) - } - - if policyName := mappings["policy_name"].(string); policyName != "" { - contentKey.PolicyName = utils.String(policyName) - } - - result = append(result, contentKey) - } - - return &result -} - -func expandFairPlay(input []interface{}) *streamingpoliciesandstreaminglocators.StreamingPolicyFairPlayConfiguration { - if len(input) == 0 { - return nil - } - - fairPlay := input[0].(map[string]interface{}) - - allowPersistentLicense := false - if v := fairPlay["allow_persistent_license"]; v != nil { - allowPersistentLicense = v.(bool) - } - - result := &streamingpoliciesandstreaminglocators.StreamingPolicyFairPlayConfiguration{ - AllowPersistentLicense: allowPersistentLicense, - } - - if v := fairPlay["custom_license_acquisition_url_template"].(string); v != "" { - result.CustomLicenseAcquisitionUrlTemplate = utils.String(v) - } - - return result -} - -func flattenNoEncryption(input *streamingpoliciesandstreaminglocators.NoEncryption) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - return flattenEnabledProtocols(input.EnabledProtocols) -} - -func flattenEnabledProtocols(input *streamingpoliciesandstreaminglocators.EnabledProtocols) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - return []interface{}{ - map[string]interface{}{ - "dash": input.Dash, - "download": input.Download, - "hls": input.Hls, - "smooth_streaming": input.SmoothStreaming, - }, - } -} - -func flattenCommonEncryptionCenc(input *streamingpoliciesandstreaminglocators.CommonEncryptionCenc) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - enabledProtocols := make([]interface{}, 0) - if input.EnabledProtocols != nil { - enabledProtocols = flattenEnabledProtocols(input.EnabledProtocols) - } - - widevineTemplate := "" - if input.Drm != nil && input.Drm.Widevine != nil && input.Drm.Widevine.CustomLicenseAcquisitionUrlTemplate != nil { - widevineTemplate = *input.Drm.Widevine.CustomLicenseAcquisitionUrlTemplate - } - - keyToTrackMappings := make([]interface{}, 0) - if input.ContentKeys != nil && input.ContentKeys.KeyToTrackMappings != nil { - keyToTrackMappings = flattenKeyToTrackMappings(input.ContentKeys.KeyToTrackMappings) - } - - drmPlayReady := make([]interface{}, 0) - if input.Drm != nil && input.Drm.PlayReady != nil { - drmPlayReady = flattenPlayReady(input.Drm.PlayReady) - } - - defaultContentKey := make([]interface{}, 0) - if input.ContentKeys != nil && input.ContentKeys.DefaultKey != nil { - defaultContentKey = flattenContentKey(input.ContentKeys.DefaultKey) - } - - return []interface{}{ - map[string]interface{}{ - "clear_key_encryption": flattenClearKeyEncryptionConfiguration(input.ClearKeyEncryptionConfiguration), - "clear_track": flattenTrackSelections(input.ClearTracks), - "content_key_to_track_mapping": keyToTrackMappings, - "enabled_protocols": enabledProtocols, - "drm_widevine_custom_license_acquisition_url_template": widevineTemplate, - "drm_playready": drmPlayReady, - "default_content_key": defaultContentKey, - }, - } -} - -func flattenCommonEncryptionCbcs(input *streamingpoliciesandstreaminglocators.CommonEncryptionCbcs) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - enabledProtocols := make([]interface{}, 0) - if input.EnabledProtocols != nil { - enabledProtocols = flattenEnabledProtocols(input.EnabledProtocols) - } - - defaultContentKey := make([]interface{}, 0) - if input.ContentKeys != nil && input.ContentKeys.DefaultKey != nil { - defaultContentKey = flattenContentKey(input.ContentKeys.DefaultKey) - } - - drmFairPlay := make([]interface{}, 0) - if input.Drm != nil && input.Drm.FairPlay != nil { - drmFairPlay = flattenFairPlay(input.Drm.FairPlay) - } - - return []interface{}{ - map[string]interface{}{ - "clear_key_encryption": flattenClearKeyEncryptionConfiguration(input.ClearKeyEncryptionConfiguration), - "enabled_protocols": enabledProtocols, - "default_content_key": defaultContentKey, - "drm_fairplay": drmFairPlay, - }, - } -} - -func flattenEnvelopeEncryption(input *streamingpoliciesandstreaminglocators.EnvelopeEncryption) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - customKeyAcquisitionUrlTemplate := "" - if input.CustomKeyAcquisitionUrlTemplate != nil { - customKeyAcquisitionUrlTemplate = *input.CustomKeyAcquisitionUrlTemplate - } - - defaultContentKey := make([]interface{}, 0) - if input.ContentKeys != nil && input.ContentKeys.DefaultKey != nil { - defaultContentKey = flattenContentKey(input.ContentKeys.DefaultKey) - } - - return []interface{}{ - map[string]interface{}{ - "custom_keys_acquisition_url_template": customKeyAcquisitionUrlTemplate, - "default_content_key": defaultContentKey, - "enabled_protocols": flattenEnabledProtocols(input.EnabledProtocols), - }, - } -} - -func flattenPlayReady(input *streamingpoliciesandstreaminglocators.StreamingPolicyPlayReadyConfiguration) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - customAttributes := "" - if input.PlayReadyCustomAttributes != nil { - customAttributes = *input.PlayReadyCustomAttributes - } - - customLicenseURLTemplate := "" - if input.CustomLicenseAcquisitionUrlTemplate != nil { - customLicenseURLTemplate = *input.CustomLicenseAcquisitionUrlTemplate - } - - return []interface{}{ - map[string]interface{}{ - "custom_attributes": customAttributes, - "custom_license_acquisition_url_template": customLicenseURLTemplate, - }, - } -} - -func flattenClearKeyEncryptionConfiguration(input *streamingpoliciesandstreaminglocators.ClearKeyEncryptionConfiguration) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - customKeysAcquisitionUrlTemplate := "" - if input.CustomKeysAcquisitionUrlTemplate != nil { - customKeysAcquisitionUrlTemplate = *input.CustomKeysAcquisitionUrlTemplate - } - - return []interface{}{ - map[string]interface{}{ - "custom_keys_acquisition_url_template": customKeysAcquisitionUrlTemplate, - }, - } -} - -func flattenTrackSelections(input *[]streamingpoliciesandstreaminglocators.TrackSelection) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - result := make([]interface{}, 0) - for _, v := range *input { - result = append(result, map[string]interface{}{ - "condition": flattenTrackPropertyConditions(v.TrackSelections), - }) - } - - return result -} - -func flattenTrackPropertyConditions(input *[]streamingpoliciesandstreaminglocators.TrackPropertyCondition) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - result := make([]interface{}, 0) - for _, v := range *input { - value := "" - if v.Value != nil { - value = *v.Value - } - result = append(result, map[string]interface{}{ - "operation": string(v.Operation), - "property": string(v.Property), - "value": value, - }) - } - - return result -} - -func flattenKeyToTrackMappings(input *[]streamingpoliciesandstreaminglocators.StreamingPolicyContentKey) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - result := make([]interface{}, 0) - for _, v := range *input { - label := "" - if v.Label != nil { - label = *v.Label - } - - policyName := "" - if v.PolicyName != nil { - policyName = *v.PolicyName - } - - result = append(result, map[string]interface{}{ - "label": label, - "policy_name": policyName, - "track": flattenTrackSelections(v.Tracks), - }) - } - - return result -} - -func flattenFairPlay(input *streamingpoliciesandstreaminglocators.StreamingPolicyFairPlayConfiguration) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - customLicenseURLTemplate := "" - if input.CustomLicenseAcquisitionUrlTemplate != nil { - customLicenseURLTemplate = *input.CustomLicenseAcquisitionUrlTemplate - } - - return []interface{}{ - map[string]interface{}{ - "allow_persistent_license": input.AllowPersistentLicense, - "custom_license_acquisition_url_template": customLicenseURLTemplate, - }, - } -} - -func flattenContentKey(input *streamingpoliciesandstreaminglocators.DefaultKey) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - policyName := "" - if input.PolicyName != nil { - policyName = *input.PolicyName - } - - label := "" - if input.Label != nil { - label = *input.Label - } - - if label == "" && policyName == "" { - return make([]interface{}, 0) - } - - return []interface{}{ - map[string]interface{}{ - "policy_name": policyName, - "label": label, - }, - } -} diff --git a/internal/services/media/media_streaming_policy_resource_test.go b/internal/services/media/media_streaming_policy_resource_test.go deleted file mode 100644 index c71d9726a7d0e..0000000000000 --- a/internal/services/media/media_streaming_policy_resource_test.go +++ /dev/null @@ -1,375 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type StreamingPolicyResource struct{} - -func TestAccStreamingPolicy_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_streaming_policy` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_streaming_policy", "test") - r := StreamingPolicyResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Policy-1"), - ), - }, - data.ImportStep(), - }) -} - -func TestAccStreamingPolicy_clearKeyEncryption(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_streaming_policy` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_streaming_policy", "test") - r := StreamingPolicyResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.clearKeyEncryption(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Policy-1"), - ), - }, - data.ImportStep(), - }) -} - -func TestAccStreamingPolicy_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_streaming_policy` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_streaming_policy", "test") - r := StreamingPolicyResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Policy-1"), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func TestAccStreamingPolicy_complete(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_streaming_policy` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_streaming_policy", "test") - r := StreamingPolicyResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("common_encryption_cenc.#").HasValue("1"), - check.That(data.ResourceName).Key("common_encryption_cbcs.#").HasValue("1"), - ), - }, - data.ImportStep(), - }) -} - -func TestAccStreamingPolicy_update(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_streaming_policy` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_streaming_policy", "test") - r := StreamingPolicyResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Policy-1"), - ), - }, - data.ImportStep(), - { - Config: r.complete(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("common_encryption_cenc.#").HasValue("1"), - check.That(data.ResourceName).Key("common_encryption_cbcs.#").HasValue("1"), - ), - }, - data.ImportStep(), - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Policy-1"), - ), - }, - data.ImportStep(), - }) -} - -func (StreamingPolicyResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := streamingpoliciesandstreaminglocators.ParseStreamingPolicyID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.Media.V20220801Client.StreamingPoliciesAndStreamingLocators.StreamingPoliciesGet(ctx, *id) - if err != nil { - return nil, fmt.Errorf("retrieving %s: %+v", *id, err) - } - - return utils.Bool(resp.Model != nil), nil -} - -func (r StreamingPolicyResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_streaming_policy" "test" { - name = "Policy-1" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name - no_encryption_enabled_protocols { - download = true - dash = true - hls = true - smooth_streaming = true - } -} -`, r.template(data)) -} - -func (r StreamingPolicyResource) clearKeyEncryption(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_content_key_policy" "test" { - name = "Policy-1" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name - description = "My Policy Description" - policy_option { - name = "ClearKeyOption" - clear_key_configuration_enabled = true - token_restriction { - issuer = "urn:issuer" - audience = "urn:audience" - token_type = "Swt" - primary_symmetric_token_key = "AAAAAAAAAAAAAAAAAAAAAA==" - } - } -} - -resource "azurerm_media_streaming_policy" "test" { - name = "Policy-1" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name - default_content_key_policy_name = azurerm_media_content_key_policy.test.name - common_encryption_cenc { - default_content_key { - label = "aesDefaultKey" - } - - clear_track { - condition { - property = "FourCC" - operation = "Equal" - value = "hev1" - } - } - - enabled_protocols { - download = false - dash = true - hls = false - smooth_streaming = true - } - - clear_key_encryption { - custom_keys_acquisition_url_template = "https://contoso.com/{AlternativeMediaId}/clearkey/" - } - } -} -`, r.template(data)) -} - -func (r StreamingPolicyResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_streaming_policy" "import" { - name = azurerm_media_streaming_policy.test.name - resource_group_name = azurerm_media_streaming_policy.test.resource_group_name - media_services_account_name = azurerm_media_streaming_policy.test.media_services_account_name - no_encryption_enabled_protocols { - download = true - dash = true - hls = true - smooth_streaming = true - } -} -`, r.basic(data)) -} - -func (r StreamingPolicyResource) complete(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_content_key_policy" "test" { - name = "Policy-1" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name - description = "My Policy Description" - policy_option { - name = "ClearKeyOption" - clear_key_configuration_enabled = true - token_restriction { - issuer = "urn:issuer" - audience = "urn:audience" - token_type = "Swt" - primary_symmetric_token_key = "AAAAAAAAAAAAAAAAAAAAAA==" - } - } -} - -resource "azurerm_media_streaming_policy" "test" { - name = "Policy-1" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name - common_encryption_cenc { - enabled_protocols { - download = false - dash = true - hls = false - smooth_streaming = false - } - - clear_track { - condition { - property = "FourCC" - operation = "Equal" - value = "hev2" - } - } - - clear_track { - condition { - property = "FourCC" - operation = "Equal" - value = "hev1" - } - } - - default_content_key { - label = "aesDefaultKey" - policy_name = azurerm_media_content_key_policy.test.name - } - - content_key_to_track_mapping { - label = "aesKey" - policy_name = azurerm_media_content_key_policy.test.name - track { - condition { - property = "FourCC" - operation = "Equal" - value = "hev1" - } - } - } - - drm_playready { - custom_license_acquisition_url_template = "https://contoso.com/{AssetAlternativeId}/playready/{ContentKeyId}" - custom_attributes = "PlayReady CustomAttributes" - } - drm_widevine_custom_license_acquisition_url_template = "https://contoso.com/{AssetAlternativeId}/widevine/{ContentKeyId}" - } - - common_encryption_cbcs { - default_content_key { - label = "aesDefaultKey" - policy_name = azurerm_media_content_key_policy.test.name - } - enabled_protocols { - download = false - dash = true - hls = false - smooth_streaming = false - } - drm_fairplay { - custom_license_acquisition_url_template = "https://contoso.com/{AssetAlternativeId}/fairplay/{ContentKeyId}" - allow_persistent_license = true - } - } - - envelope_encryption { - default_content_key { - label = "aesDefaultKey" - policy_name = azurerm_media_content_key_policy.test.name - } - custom_keys_acquisition_url_template = "https://contoso.com/{AssetAlternativeId}/envelope/{ContentKeyId}" - enabled_protocols { - dash = true - download = false - hls = true - smooth_streaming = true - } - } -} -`, r.template(data)) -} - -func (StreamingPolicyResource) template(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-media-%d" - location = "%s" -} - -resource "azurerm_storage_account" "test" { - name = "acctestsa1%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "test" { - name = "acctestmsa%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - storage_account { - id = azurerm_storage_account.test.id - is_primary = true - } -} - -resource "azurerm_media_asset" "test" { - name = "test" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name -} -`, data.RandomInteger, data.Locations.Primary, data.RandomString, data.RandomString) -} diff --git a/internal/services/media/media_transform_resource.go b/internal/services/media/media_transform_resource.go deleted file mode 100644 index 44ebcabc7c7ac..0000000000000 --- a/internal/services/media/media_transform_resource.go +++ /dev/null @@ -1,3582 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media - -import ( - "fmt" - "log" - "regexp" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/media/migration" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceMediaTransform() *pluginsdk.Resource { - resource := &pluginsdk.Resource{ - Create: resourceMediaTransformCreateUpdate, - Read: resourceMediaTransformRead, - Update: resourceMediaTransformCreateUpdate, - Delete: resourceMediaTransformDelete, - - DeprecationMessage: azureMediaRetirementMessage, - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := encodings.ParseTransformID(id) - return err - }), - - StateUpgraders: pluginsdk.StateUpgrades(map[int]pluginsdk.StateUpgrade{ - 0: migration.TransformV0ToV1{}, - }), - SchemaVersion: 1, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile("^[-a-zA-Z0-9(_)]{1,128}$"), - "Transform name must be 1 - 128 characters long, can contain letters, numbers, underscores, and hyphens (but the first and last character must be a letter or number).", - ), - }, - - "resource_group_name": commonschema.ResourceGroupName(), - - "media_services_account_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile("^[-a-z0-9]{3,24}$"), - "Media Services Account name must be 3 - 24 characters long, contain only lowercase letters and numbers.", - ), - }, - - "description": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - // lintignore:XS003 - "output": { - Type: pluginsdk.TypeList, - Optional: true, - MinItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "on_error_action": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(encodings.OnErrorTypeStopProcessingJob), - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForOnErrorType(), false), - }, - // lintignore:XS003 - "builtin_preset": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "preset_name": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForEncoderNamedPreset(), false), - }, - "preset_configuration": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "complexity": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForComplexity(), false), - }, - "interleave_output": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForInterleaveOutput(), false), - }, - "key_frame_interval_in_seconds": { - Type: pluginsdk.TypeFloat, - Optional: true, - ValidateFunc: validation.FloatAtLeast(0), - }, - "max_bitrate_bps": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - }, - "max_height": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - }, - "max_layers": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - }, - "min_bitrate_bps": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - }, - "min_height": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - }, - }, - }, - }, - }, - }, - }, - // lintignore:XS003 - "audio_analyzer_preset": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - // https://go.microsoft.com/fwlink/?linkid=2109463 - "audio_language": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "audio_analysis_mode": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(encodings.AudioAnalysisModeStandard), - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForAudioAnalysisMode(), false), - }, - "experimental_options": { - Type: pluginsdk.TypeMap, - Optional: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - }, - }, - }, - }, - }, - "custom_preset": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "codec": { - Type: pluginsdk.TypeList, - Required: true, - MinItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "aac_audio": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "bitrate": { - Type: pluginsdk.TypeInt, - Optional: true, - Default: 128000, - ValidateFunc: validation.IntAtLeast(1), - }, - "channels": { - Type: pluginsdk.TypeInt, - Optional: true, - Default: 2, - ValidateFunc: validation.IntBetween(1, 6), - }, - "label": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "profile": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(encodings.AacAudioProfileAacLc), - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForAacAudioProfile(), false), - }, - "sampling_rate": { - Type: pluginsdk.TypeInt, - Optional: true, - Default: 48000, - ValidateFunc: validation.IntBetween(11025, 96000), - }, - }, - }, - }, - "copy_audio": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "label": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - "copy_video": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "label": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - "dd_audio": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "bitrate": { - Type: pluginsdk.TypeInt, - Optional: true, - Default: 192000, - ValidateFunc: validation.IntAtLeast(1), - }, - "channels": { - Type: pluginsdk.TypeInt, - Default: 2, - Optional: true, - ValidateFunc: validation.IntBetween(1, 6), - }, - "label": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "sampling_rate": { - Type: pluginsdk.TypeInt, - Default: 48000, - Optional: true, - ValidateFunc: validation.IntBetween(32000, 48000), - }, - }, - }, - }, - "h264_video": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "complexity": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(encodings.H264ComplexityBalanced), - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForH264Complexity(), false), - }, - "key_frame_interval": { - Type: pluginsdk.TypeString, - Optional: true, - Default: "PT2S", - ValidateFunc: validate.ISO8601DurationBetween("PT0.5S", "PT20S"), - }, - "label": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "layer": { - Type: pluginsdk.TypeList, - Optional: true, - MinItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "bitrate": { - Type: pluginsdk.TypeInt, - Required: true, - ValidateFunc: validation.IntAtLeast(1), - }, - "adaptive_b_frame_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: true, - }, - "b_frames": { - Type: pluginsdk.TypeInt, - Optional: true, - Computed: true, - ValidateFunc: validation.IntAtLeast(0), - }, - "buffer_window": { - Type: pluginsdk.TypeString, - Optional: true, - Default: "PT5S", - ValidateFunc: validate.ISO8601DurationBetween("PT0.1S", "PT100S"), - }, - "crf": { - Type: pluginsdk.TypeFloat, - Optional: true, - Default: 23, - ValidateFunc: validation.FloatBetween(0, 51), - }, - "entropy_mode": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForEntropyMode(), false), - }, - "frame_rate": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "height": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "label": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "level": { - Type: pluginsdk.TypeString, - Optional: true, - Default: "auto", - ValidateFunc: validation.StringIsNotEmpty, - }, - "max_bitrate": { - Type: pluginsdk.TypeInt, - Optional: true, - Computed: true, - }, - "profile": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(encodings.H264VideoProfileAuto), - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForH264VideoProfile(), false), - }, - "reference_frames": { - Type: pluginsdk.TypeInt, - Optional: true, - Computed: true, - ValidateFunc: validation.IntAtLeast(0), - }, - "slices": { - Type: pluginsdk.TypeInt, - Optional: true, - Computed: true, - ValidateFunc: validation.IntAtLeast(0), - }, - "width": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - "rate_control_mode": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(encodings.H264RateControlModeABR), - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForH264RateControlMode(), false), - }, - "scene_change_detection_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: false, - }, - "stretch_mode": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(encodings.StretchModeAutoSize), - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForStretchMode(), false), - }, - "sync_mode": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(encodings.VideoSyncModeAuto), - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForVideoSyncMode(), false), - }, - }, - }, - }, - "h265_video": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "complexity": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(encodings.H265ComplexityBalanced), - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForH265Complexity(), false), - }, - "key_frame_interval": { - Type: pluginsdk.TypeString, - Optional: true, - Default: "PT2S", - ValidateFunc: validate.ISO8601DurationBetween("PT0.5S", "PT20S"), - }, - "label": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "layer": { - Type: pluginsdk.TypeList, - Optional: true, - MinItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "bitrate": { - Type: pluginsdk.TypeInt, - Required: true, - ValidateFunc: validation.IntAtLeast(1), - }, - "adaptive_b_frame_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: true, - }, - "b_frames": { - Type: pluginsdk.TypeInt, - Optional: true, - Computed: true, - ValidateFunc: validation.IntAtLeast(0), - }, - "buffer_window": { - Type: pluginsdk.TypeString, - Optional: true, - Default: "PT5S", - ValidateFunc: validate.ISO8601DurationBetween("PT0.1S", "PT100S"), - }, - "crf": { - Type: pluginsdk.TypeFloat, - Optional: true, - Default: 28, - ValidateFunc: validation.FloatBetween(0, 51), - }, - "frame_rate": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "height": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "label": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "level": { - Type: pluginsdk.TypeString, - Optional: true, - Default: "auto", - ValidateFunc: validation.StringIsNotEmpty, - }, - "max_bitrate": { - Type: pluginsdk.TypeInt, - Optional: true, - Computed: true, - }, - "profile": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(encodings.H265VideoProfileAuto), - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForH265VideoProfile(), false), - }, - "reference_frames": { - Type: pluginsdk.TypeInt, - Optional: true, - Computed: true, - ValidateFunc: validation.IntAtLeast(0), - }, - "slices": { - Type: pluginsdk.TypeInt, - Optional: true, - Computed: true, - ValidateFunc: validation.IntAtLeast(0), - }, - "width": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - "scene_change_detection_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: false, - }, - "stretch_mode": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(encodings.StretchModeAutoSize), - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForStretchMode(), false), - }, - "sync_mode": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(encodings.VideoSyncModeAuto), - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForVideoSyncMode(), false), - }, - }, - }, - }, - "jpg_image": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "start": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "key_frame_interval": { - Type: pluginsdk.TypeString, - Optional: true, - Default: "PT2S", - ValidateFunc: validate.ISO8601DurationBetween("PT0.5S", "PT20S"), - }, - "label": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "layer": { - Type: pluginsdk.TypeList, - Optional: true, - MinItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "height": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "label": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "quality": { - Type: pluginsdk.TypeInt, - Optional: true, - Default: 70, - ValidateFunc: validation.IntBetween(0, 100), - }, - "width": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - "range": { - Type: pluginsdk.TypeString, - Optional: true, - Default: "100%", - ValidateFunc: validation.StringIsNotEmpty, - }, - "sprite_column": { - Type: pluginsdk.TypeInt, - Optional: true, - Default: 0, - ValidateFunc: validation.IntAtLeast(0), - }, - "step": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "stretch_mode": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(encodings.StretchModeAutoSize), - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForStretchMode(), false), - }, - "sync_mode": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(encodings.VideoSyncModeAuto), - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForVideoSyncMode(), false), - }, - }, - }, - }, - "png_image": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "start": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "key_frame_interval": { - Type: pluginsdk.TypeString, - Optional: true, - Default: "PT2S", - ValidateFunc: validate.ISO8601Duration, - }, - "label": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "layer": { - Type: pluginsdk.TypeList, - Optional: true, - MinItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "height": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "label": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "width": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - "range": { - Type: pluginsdk.TypeString, - Optional: true, - Default: "100%", - ValidateFunc: validation.StringIsNotEmpty, - }, - "step": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "stretch_mode": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(encodings.StretchModeAutoSize), - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForStretchMode(), false), - }, - "sync_mode": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(encodings.VideoSyncModeAuto), - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForVideoSyncMode(), false), - }, - }, - }, - }, - }, - }, - }, - "format": { - Type: pluginsdk.TypeList, - Required: true, - MinItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "jpg": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "filename_pattern": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - "mp4": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "filename_pattern": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "output_file": { - Type: pluginsdk.TypeList, - Optional: true, - MinItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "labels": { - Type: pluginsdk.TypeList, - Required: true, - MinItems: 1, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - }, - }, - }, - }, - "png": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "filename_pattern": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - "transport_stream": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "filename_pattern": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "output_file": { - Type: pluginsdk.TypeList, - Optional: true, - MinItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "labels": { - Type: pluginsdk.TypeList, - Required: true, - MinItems: 1, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - "experimental_options": { - Type: pluginsdk.TypeMap, - Optional: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - }, - }, - "filter": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "crop_rectangle": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "height": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "left": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "top": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "width": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - "deinterlace": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "parity": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(encodings.DeinterlaceParityAuto), - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForDeinterlaceParity(), false), - }, - "mode": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(encodings.DeinterlaceModeAutoPixelAdaptive), - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForDeinterlaceMode(), false), - }, - }, - }, - }, - "fade_in": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "duration": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "fade_color": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "start": { - Type: pluginsdk.TypeString, - Optional: true, - Default: "0", - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - "fade_out": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "duration": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "fade_color": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "start": { - Type: pluginsdk.TypeString, - Optional: true, - Default: "0", - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - "overlay": { - Type: pluginsdk.TypeList, - Optional: true, - MinItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "audio": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "input_label": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "audio_gain_level": { - Type: pluginsdk.TypeFloat, - Optional: true, - Default: 1.0, - ValidateFunc: validation.FloatBetween(0, 1.0), - }, - "end": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validate.ISO8601Duration, - }, - "fade_in_duration": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validate.ISO8601Duration, - }, - "fade_out_duration": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validate.ISO8601Duration, - }, - "start": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validate.ISO8601Duration, - }, - }, - }, - }, - "video": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "input_label": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "audio_gain_level": { - Type: pluginsdk.TypeFloat, - Optional: true, - Default: 1.0, - ValidateFunc: validation.FloatBetween(0, 1.0), - }, - "crop_rectangle": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "height": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "left": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "top": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "width": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - "end": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validate.ISO8601Duration, - }, - "fade_in_duration": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validate.ISO8601Duration, - }, - "fade_out_duration": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validate.ISO8601Duration, - }, - "opacity": { - Type: pluginsdk.TypeFloat, - Optional: true, - Default: 1.0, - ValidateFunc: validation.FloatBetween(0, 1.0), - }, - "position": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*schema.Schema{ - "height": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "left": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "top": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "width": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - "start": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validate.ISO8601Duration, - }, - }, - }, - }, - }, - }, - }, - "rotation": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(encodings.RotationAuto), - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForRotation(), false), - }, - }, - }, - }, - }, - }, - }, - "relative_priority": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(encodings.PriorityNormal), - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForPriority(), false), - }, - }, - }, - }, - }, - } - - if !features.FourPointOh() { - // NOTE: `face_detector_preset` should be removed as the Media Services Face Detector has been retired and would not have a direct replacement. - // Refer to https://learn.microsoft.com/en-us/azure/media-services/latest/analyze-face-retirement-migration-overview for details. - // TODO Remove in 4.0 - resource.Schema["output"].Elem.(*pluginsdk.Resource).Schema["face_detector_preset"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "analysis_resolution": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(encodings.AnalysisResolutionSourceResolution), - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForAnalysisResolution(), false), - }, - "blur_type": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForBlurType(), false), - }, - "experimental_options": { - Type: pluginsdk.TypeMap, - Optional: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - }, - }, - "face_redactor_mode": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(encodings.FaceRedactorModeAnalyze), - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForFaceRedactorMode(), false), - }, - }, - }, - Deprecated: "`face_detector_preset` will be removed in version 4.0 of the AzureRM Provider as it has been retired.", - } - // NOTE: `video_analyzer_preset` should be removed as it has been retired. - // Refer to https://learn.microsoft.com/en-us/azure/media-services/latest/analyze-video-retirement-migration-overview for details. - // TODO Remove in 4.0 - resource.Schema["output"].Elem.(*pluginsdk.Resource).Schema["video_analyzer_preset"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - // https://go.microsoft.com/fwlink/?linkid=2109463 - "audio_language": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "audio_analysis_mode": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(encodings.AudioAnalysisModeStandard), - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForAudioAnalysisMode(), false), - }, - "insights_type": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(encodings.InsightsTypeAllInsights), - ValidateFunc: validation.StringInSlice(encodings.PossibleValuesForInsightsType(), false), - }, - "experimental_options": { - Type: pluginsdk.TypeMap, - Optional: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - }, - }, - }, - }, - Deprecated: "`video_analyzer_preset` will be removed in version 4.0 of the AzureRM Provider as it has been retired.", - } - } - - return resource -} - -func resourceMediaTransformCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220701Client.Encodings - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := encodings.NewTransformID(subscriptionId, d.Get("resource_group_name").(string), d.Get("media_services_account_name").(string), d.Get("name").(string)) - if d.IsNewResource() { - existing, err := client.TransformsGet(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for existing %s: %+v", id, err) - } - } - - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_media_transform", id.ID()) - } - } - - payload := encodings.Transform{ - Properties: &encodings.TransformProperties{ - Description: utils.String(d.Get("description").(string)), - }, - } - - if v, ok := d.GetOk("output"); ok { - transformOutput, err := expandTransformOutputs(v.([]interface{})) - if err != nil { - return err - } - payload.Properties.Outputs = *transformOutput - } - - if _, err := client.TransformsCreateOrUpdate(ctx, id, payload); err != nil { - return fmt.Errorf("creating/updating %s: %+v", id, err) - } - - d.SetId(id.ID()) - return resourceMediaTransformRead(d, meta) -} - -func resourceMediaTransformRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220701Client.Encodings - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := encodings.ParseTransformID(d.Id()) - if err != nil { - return err - } - - resp, err := client.TransformsGet(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - log.Printf("[INFO] %s was not found - removing from state", *id) - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.TransformName) - d.Set("media_services_account_name", id.MediaServiceName) - d.Set("resource_group_name", id.ResourceGroupName) - - if model := resp.Model; model != nil { - if props := model.Properties; props != nil { - d.Set("description", props.Description) - - outputs := flattenTransformOutputs(props.Outputs) - if err := d.Set("output", outputs); err != nil { - return fmt.Errorf("flattening `output`: %s", err) - } - } - } - - return nil -} - -func resourceMediaTransformDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20220701Client.Encodings - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := encodings.ParseTransformID(d.Id()) - if err != nil { - return err - } - - if _, err := client.TransformsDelete(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - - return nil -} - -func expandTransformOutputs(input []interface{}) (*[]encodings.TransformOutput, error) { - results := make([]encodings.TransformOutput, 0) - - for _, transformOutputRaw := range input { - if transformOutputRaw == nil { - continue - } - transform := transformOutputRaw.(map[string]interface{}) - - preset, err := expandPreset(transform) - if err != nil { - return nil, err - } - - transformOutput := encodings.TransformOutput{ - Preset: preset, - } - - if v := transform["on_error_action"].(string); v != "" { - transformOutput.OnError = pointer.To(encodings.OnErrorType(v)) - } - - if v := transform["relative_priority"].(string); v != "" { - transformOutput.RelativePriority = pointer.To(encodings.Priority(v)) - } - - results = append(results, transformOutput) - } - - return &results, nil -} - -func flattenTransformOutputs(input []encodings.TransformOutput) []interface{} { - results := make([]interface{}, 0) - for _, transformOutput := range input { - onErrorAction := "" - if transformOutput.OnError != nil { - onErrorAction = string(*transformOutput.OnError) - } - - relativePriority := "" - if transformOutput.RelativePriority != nil { - relativePriority = string(*transformOutput.RelativePriority) - } - - preset := flattenPreset(transformOutput.Preset) - if !features.FourPointOh() { - results = append(results, map[string]interface{}{ - "audio_analyzer_preset": preset.audioAnalyzerPresets, - "builtin_preset": preset.builtInPresets, - "custom_preset": preset.customPresets, - "face_detector_preset": preset.faceDetectorPresets, - "on_error_action": onErrorAction, - "relative_priority": relativePriority, - "video_analyzer_preset": preset.videoAnalyzerPresets, - }) - } else { - results = append(results, map[string]interface{}{ - "audio_analyzer_preset": preset.audioAnalyzerPresets, - "builtin_preset": preset.builtInPresets, - "custom_preset": preset.customPresets, - "on_error_action": onErrorAction, - "relative_priority": relativePriority, - }) - } - } - - return results -} - -func expandPreset(transform map[string]interface{}) (encodings.Preset, error) { - audioAnalyzerPresets := transform["audio_analyzer_preset"].([]interface{}) - builtInPresets := transform["builtin_preset"].([]interface{}) - customPresets := transform["custom_preset"].([]interface{}) - faceDetectorPresets := make([]interface{}, 0) - videoAnalyzerPresets := make([]interface{}, 0) - if !features.FourPointOh() { - faceDetectorPresets = transform["face_detector_preset"].([]interface{}) - videoAnalyzerPresets = transform["video_analyzer_preset"].([]interface{}) - } - - presetsCount := 0 - if len(audioAnalyzerPresets) > 0 { - presetsCount++ - } - if len(builtInPresets) > 0 { - presetsCount++ - } - if len(customPresets) > 0 { - presetsCount++ - } - if !features.FourPointOh() { - if len(faceDetectorPresets) > 0 { - presetsCount++ - } - if len(videoAnalyzerPresets) > 0 { - presetsCount++ - } - } - - if presetsCount == 0 { - if !features.FourPointOh() { - return nil, fmt.Errorf("output must contain at least one type of preset: builtin_preset, custom_preset, face_detector_preset, video_analyzer_preset or audio_analyzer_preset") - } else { - return nil, fmt.Errorf("output must contain at least one type of preset: builtin_preset, custom_preset or audio_analyzer_preset") - } - } - if presetsCount > 1 { - return nil, fmt.Errorf("more than one type of preset in the same output is not allowed") - } - - if len(audioAnalyzerPresets) > 0 { - preset := audioAnalyzerPresets[0].(map[string]interface{}) - - options, err := expandExperimentalOptions(preset["experimental_options"].(map[string]interface{})) - if err != nil { - return nil, err - } - - audioAnalyzerPreset := &encodings.AudioAnalyzerPreset{ - ExperimentalOptions: options, - } - - if v := preset["audio_language"].(string); v != "" { - audioAnalyzerPreset.AudioLanguage = utils.String(v) - } - if v := preset["audio_analysis_mode"].(string); v != "" { - audioAnalyzerPreset.Mode = pointer.To(encodings.AudioAnalysisMode(v)) - } - return audioAnalyzerPreset, nil - } - - if len(builtInPresets) > 0 { - preset := builtInPresets[0].(map[string]interface{}) - presetName := preset["preset_name"].(string) - builtInPreset := &encodings.BuiltInStandardEncoderPreset{ - PresetName: encodings.EncoderNamedPreset(presetName), - Configurations: expandBuiltInPresetConfiguration(preset["preset_configuration"].([]interface{})), - } - return builtInPreset, nil - } - - if len(customPresets) > 0 { - preset := customPresets[0].(map[string]interface{}) - - codecs, err := expandCustomPresetCodecs(preset["codec"].([]interface{})) - if err != nil { - return nil, err - } - - experimentalOptions, err := expandExperimentalOptions(preset["experimental_options"].(map[string]interface{})) - if err != nil { - return nil, err - } - - filters, err := expandCustomPresetFilters(preset["filter"].([]interface{})) - if err != nil { - return nil, err - } - - formats, err := expandCustomPresetFormats(preset["format"].([]interface{})) - if err != nil { - return nil, err - } - builtInPreset := &encodings.StandardEncoderPreset{ - Codecs: codecs, - ExperimentalOptions: experimentalOptions, - Filters: filters, - Formats: formats, - } - return builtInPreset, nil - } - - if !features.FourPointOh() { - if len(faceDetectorPresets) > 0 { - preset := faceDetectorPresets[0].(map[string]interface{}) - - options, err := expandExperimentalOptions(preset["experimental_options"].(map[string]interface{})) - if err != nil { - return nil, err - } - - faceDetectorPreset := &encodings.FaceDetectorPreset{ - ExperimentalOptions: options, - } - - if v := preset["analysis_resolution"].(string); v != "" { - faceDetectorPreset.Resolution = pointer.To(encodings.AnalysisResolution(v)) - } - - if v := preset["blur_type"].(string); v != "" { - faceDetectorPreset.BlurType = pointer.To(encodings.BlurType(v)) - } - - if v := preset["face_redactor_mode"].(string); v != "" { - faceDetectorPreset.Mode = pointer.To(encodings.FaceRedactorMode(v)) - } - - return faceDetectorPreset, nil - } - - if len(videoAnalyzerPresets) > 0 { - presets := transform["video_analyzer_preset"].([]interface{}) - preset := presets[0].(map[string]interface{}) - - options, err := expandExperimentalOptions(preset["experimental_options"].(map[string]interface{})) - if err != nil { - return nil, err - } - - videoAnalyzerPreset := &encodings.VideoAnalyzerPreset{ - ExperimentalOptions: options, - } - - if v := preset["audio_language"].(string); v != "" { - videoAnalyzerPreset.AudioLanguage = utils.String(v) - } - if v := preset["audio_analysis_mode"].(string); v != "" { - videoAnalyzerPreset.Mode = pointer.To(encodings.AudioAnalysisMode(v)) - } - if v := preset["insights_type"].(string); v != "" { - videoAnalyzerPreset.InsightsToExtract = pointer.To(encodings.InsightsType(v)) - } - return videoAnalyzerPreset, nil - } - } - - if !features.FourPointOh() { - return nil, fmt.Errorf("output must contain at least one type of preset: builtin_preset, custom_preset, face_detector_preset, video_analyzer_preset or audio_analyzer_preset") - } else { - return nil, fmt.Errorf("output must contain at least one type of preset: builtin_preset, custom_preset or audio_analyzer_preset") - } -} - -type flattenedPresets struct { - audioAnalyzerPresets []interface{} - builtInPresets []interface{} - customPresets []interface{} - faceDetectorPresets []interface{} - videoAnalyzerPresets []interface{} -} - -func flattenPreset(input encodings.Preset) flattenedPresets { - out := flattenedPresets{ - audioAnalyzerPresets: []interface{}{}, - builtInPresets: []interface{}{}, - customPresets: []interface{}{}, - faceDetectorPresets: []interface{}{}, - videoAnalyzerPresets: []interface{}{}, - } - if input == nil { - return out - } - - if v, ok := input.(encodings.AudioAnalyzerPreset); ok { - language := "" - if v.AudioLanguage != nil { - language = *v.AudioLanguage - } - mode := "" - if v.Mode != nil { - mode = string(*v.Mode) - } - out.audioAnalyzerPresets = append(out.audioAnalyzerPresets, map[string]interface{}{ - "audio_analysis_mode": mode, - "audio_language": language, - "experimental_options": flattenExperimentalOptions(v.ExperimentalOptions), - }) - } - - if v, ok := input.(encodings.StandardEncoderPreset); ok { - out.customPresets = append(out.customPresets, map[string]interface{}{ - "codec": flattenCustomPresetCodecs(v.Codecs), - "experimental_options": flattenExperimentalOptions(v.ExperimentalOptions), - "filter": flattenCustomPresetFilters(v.Filters), - "format": flattenCustomPresetFormats(v.Formats), - }) - } - - if v, ok := input.(encodings.BuiltInStandardEncoderPreset); ok { - out.builtInPresets = append(out.builtInPresets, map[string]interface{}{ - "preset_name": string(v.PresetName), - "preset_configuration": flattenBuiltInPresetConfiguration(v.Configurations), - }) - } - - if v, ok := input.(encodings.FaceDetectorPreset); ok { - resolution := "" - if v.Resolution != nil { - resolution = string(*v.Resolution) - } - - blurType := "" - if v.BlurType != nil { - blurType = string(*v.BlurType) - } - - mode := "" - if v.Mode != nil { - mode = string(*v.Mode) - } - - out.faceDetectorPresets = append(out.faceDetectorPresets, map[string]interface{}{ - "analysis_resolution": resolution, - "blur_type": blurType, - "experimental_options": flattenExperimentalOptions(v.ExperimentalOptions), - "face_redactor_mode": mode, - }) - } - - if v, ok := input.(encodings.VideoAnalyzerPreset); ok { - audioLanguage := "" - if v.AudioLanguage != nil { - audioLanguage = *v.AudioLanguage - } - insightsType := "" - if v.InsightsToExtract != nil { - insightsType = string(*v.InsightsToExtract) - } - mode := "" - if v.Mode != nil { - mode = string(*v.Mode) - } - out.videoAnalyzerPresets = append(out.videoAnalyzerPresets, map[string]interface{}{ - "audio_analysis_mode": mode, - "audio_language": audioLanguage, - "insights_type": insightsType, - "experimental_options": flattenExperimentalOptions(v.ExperimentalOptions), - }) - } - - return out -} - -func expandBuiltInPresetConfiguration(input []interface{}) *encodings.PresetConfigurations { - if len(input) == 0 || input[0] == nil { - return nil - } - - configuration := input[0].(map[string]interface{}) - result := encodings.PresetConfigurations{} - - if v := configuration["complexity"].(string); v != "" { - result.Complexity = pointer.To(encodings.Complexity(v)) - } - - if v := configuration["interleave_output"].(string); v != "" { - result.InterleaveOutput = pointer.To(encodings.InterleaveOutput(v)) - } - - if v := configuration["key_frame_interval_in_seconds"].(float64); v != 0 { - result.KeyFrameIntervalInSeconds = utils.Float(v) - } - - if v := configuration["max_bitrate_bps"].(int); v != 0 { - result.MaxBitrateBps = utils.Int64(int64(v)) - } - - if v := configuration["max_height"].(int); v != 0 { - result.MaxHeight = utils.Int64(int64(v)) - } - - if v := configuration["max_layers"].(int); v != 0 { - result.MaxLayers = utils.Int64(int64(v)) - } - - if v := configuration["min_bitrate_bps"].(int); v != 0 { - result.MinBitrateBps = utils.Int64(int64(v)) - } - - if v := configuration["min_height"].(int); v != 0 { - result.MinHeight = utils.Int64(int64(v)) - } - - return &result -} - -func flattenBuiltInPresetConfiguration(input *encodings.PresetConfigurations) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - complexity := "" - if input.Complexity != nil { - complexity = string(*input.Complexity) - } - - interleaveOutput := "" - if input.InterleaveOutput != nil { - interleaveOutput = string(*input.InterleaveOutput) - } - - keyFrameIntervalInSeconds := 0.0 - if input.KeyFrameIntervalInSeconds != nil { - keyFrameIntervalInSeconds = *input.KeyFrameIntervalInSeconds - } - - maxBitrateBps := 0 - if input.MaxBitrateBps != nil { - maxBitrateBps = int(*input.MaxBitrateBps) - } - - maxHeight := 0 - if input.MaxHeight != nil { - maxHeight = int(*input.MaxHeight) - } - - maxLayers := 0 - if input.MaxLayers != nil { - maxLayers = int(*input.MaxLayers) - } - - minBitrateBps := 0 - if input.MinBitrateBps != nil { - minBitrateBps = int(*input.MinBitrateBps) - } - - minHeight := 0 - if input.MinHeight != nil { - minHeight = int(*input.MinHeight) - } - - return []interface{}{ - map[string]interface{}{ - "complexity": complexity, - "interleave_output": interleaveOutput, - "key_frame_interval_in_seconds": keyFrameIntervalInSeconds, - "max_bitrate_bps": maxBitrateBps, - "max_height": maxHeight, - "max_layers": maxLayers, - "min_bitrate_bps": minBitrateBps, - "min_height": minHeight, - }, - } -} - -func expandExperimentalOptions(input map[string]interface{}) (*map[string]string, error) { - output := make(map[string]string, len(input)) - - for k, v := range input { - key := k - value, ok := v.(string) - if !ok { - return nil, fmt.Errorf("expect experimental options value %q to be a string", value) - } - output[key] = value - } - - return &output, nil -} - -func flattenExperimentalOptions(input *map[string]string) map[string]interface{} { - result := make(map[string]interface{}, 0) - if input == nil { - return result - } - for k, v := range *input { - key := k - value := v - result[key] = value - } - - return result -} - -func expandCustomPresetCodecs(input []interface{}) ([]encodings.Codec, error) { - if len(input) == 0 || input[0] == nil { - return make([]encodings.Codec, 0), nil - } - - results := make([]encodings.Codec, 0) - - for _, v := range input { - if v == nil { - continue - } - - codec := v.(map[string]interface{}) - aacAudio := codec["aac_audio"].([]interface{}) - copyAudio := codec["copy_audio"].([]interface{}) - copyVideo := codec["copy_video"].([]interface{}) - ddAudio := codec["dd_audio"].([]interface{}) - h264Video := codec["h264_video"].([]interface{}) - h265Video := codec["h265_video"].([]interface{}) - jpgImage := codec["jpg_image"].([]interface{}) - pngImage := codec["png_image"].([]interface{}) - - codecsCount := 0 - if len(aacAudio) > 0 { - codecsCount++ - } - if len(copyAudio) > 0 { - codecsCount++ - } - if len(copyVideo) > 0 { - codecsCount++ - } - if len(ddAudio) > 0 { - codecsCount++ - } - if len(h264Video) > 0 { - codecsCount++ - } - if len(h265Video) > 0 { - codecsCount++ - } - if len(jpgImage) > 0 { - codecsCount++ - } - if len(pngImage) > 0 { - codecsCount++ - } - if codecsCount == 0 { - return nil, fmt.Errorf("custom preset codec must contain at least one type of: aac_audio, copy_audio, copy_video, dd_audio, h264_video, h265_video, jpg_image or png_image") - } - if codecsCount > 1 { - return nil, fmt.Errorf("more than one type of codec in the same custom preset codec is not allowed") - } - - if len(aacAudio) > 0 { - results = append(results, expandCustomPresetCodecsAacAudio(aacAudio)) - } - if len(copyAudio) > 0 { - results = append(results, expandCustomPresetCodecsCopyAudio(copyAudio)) - } - if len(copyVideo) > 0 { - results = append(results, expandCustomPresetCodecsCopyVideo(copyVideo)) - } - if len(ddAudio) > 0 { - results = append(results, expandCustomPresetCodecsDdAudio(ddAudio)) - } - if len(h264Video) > 0 { - results = append(results, expandCustomPresetCodecsH264Video(h264Video)) - } - if len(h265Video) > 0 { - results = append(results, expandCustomPresetCodecsH265Video(h265Video)) - } - if len(jpgImage) > 0 { - results = append(results, expandCustomPresetCodecsJpgImage(jpgImage)) - } - if len(pngImage) > 0 { - results = append(results, expandCustomPresetCodecsPngImage(pngImage)) - } - } - - return results, nil -} - -type flattenedCustomPresetsCodec struct { - aacAudio []interface{} - copyAudio []interface{} - copyVideo []interface{} - ddAudio []interface{} - h264Video []interface{} - h265Video []interface{} - jpgImage []interface{} - pngImage []interface{} -} - -func flattenCustomPresetCodecs(input []encodings.Codec) []interface{} { - if len(input) == 0 { - return make([]interface{}, 0) - } - - results := make([]interface{}, 0) - - for _, v := range input { - result := flattenedCustomPresetsCodec{ - aacAudio: []interface{}{}, - copyAudio: []interface{}{}, - copyVideo: []interface{}{}, - ddAudio: []interface{}{}, - h264Video: []interface{}{}, - h265Video: []interface{}{}, - jpgImage: []interface{}{}, - pngImage: []interface{}{}, - } - - if codec, ok := v.(encodings.AacAudio); ok { - result.aacAudio = flattenCustomPresetCodecsAacAudio(codec) - } - - if codec, ok := v.(encodings.CopyAudio); ok { - result.copyAudio = flattenCustomPresetCodecsCopyAudio(codec) - } - - if codec, ok := v.(encodings.CopyVideo); ok { - result.copyVideo = flattenCustomPresetCodecsCopyVideo(codec) - } - - if codec, ok := v.(encodings.DDAudio); ok { - result.ddAudio = flattenCustomPresetCodecsDdAudio(codec) - } - - if codec, ok := v.(encodings.H264Video); ok { - result.h264Video = flattenCustomPresetCodecsH264Video(codec) - } - - if codec, ok := v.(encodings.H265Video); ok { - result.h265Video = flattenCustomPresetCodecsH265Video(codec) - } - - if codec, ok := v.(encodings.JpgImage); ok { - result.jpgImage = flattenCustomPresetCodecsJpgImage(codec) - } - - if codec, ok := v.(encodings.PngImage); ok { - result.pngImage = flattenCustomPresetCodecsPngImage(codec) - } - - results = append(results, map[string]interface{}{ - "aac_audio": result.aacAudio, - "copy_audio": result.copyAudio, - "copy_video": result.copyVideo, - "dd_audio": result.ddAudio, - "h264_video": result.h264Video, - "h265_video": result.h265Video, - "jpg_image": result.jpgImage, - "png_image": result.pngImage, - }) - } - - return results -} - -func expandCustomPresetCodecsAacAudio(input []interface{}) encodings.AacAudio { - if len(input) == 0 || input[0] == nil { - return encodings.AacAudio{} - } - - aacAudio := input[0].(map[string]interface{}) - result := encodings.AacAudio{} - - if v := aacAudio["bitrate"].(int); v != 0 { - result.Bitrate = utils.Int64(int64(v)) - } - - if v := aacAudio["channels"].(int); v != 0 { - result.Channels = utils.Int64(int64(v)) - } - - if v := aacAudio["label"].(string); v != "" { - result.Label = utils.String(v) - } - - if v := aacAudio["profile"].(string); v != "" { - result.Profile = pointer.To(encodings.AacAudioProfile(v)) - } - - if v := aacAudio["sampling_rate"].(int); v != 0 { - result.SamplingRate = utils.Int64(int64(v)) - } - - return result -} - -func flattenCustomPresetCodecsAacAudio(input encodings.AacAudio) []interface{} { - bitrate := 0 - if input.Bitrate != nil { - bitrate = int(*input.Bitrate) - } - - channels := 0 - if input.Channels != nil { - channels = int(*input.Channels) - } - - label := "" - if input.Label != nil { - label = *input.Label - } - - profile := "" - if input.Profile != nil { - profile = string(*input.Profile) - } - - samplingRate := 0 - if input.SamplingRate != nil { - samplingRate = int(*input.SamplingRate) - } - - return []interface{}{ - map[string]interface{}{ - "bitrate": bitrate, - "channels": channels, - "label": label, - "profile": profile, - "sampling_rate": samplingRate, - }, - } -} - -func expandCustomPresetCodecsCopyAudio(input []interface{}) encodings.CopyAudio { - if len(input) == 0 || input[0] == nil { - return encodings.CopyAudio{} - } - - copyAudio := input[0].(map[string]interface{}) - result := encodings.CopyAudio{} - - if v := copyAudio["label"].(string); v != "" { - result.Label = utils.String(v) - } - - return result -} - -func flattenCustomPresetCodecsCopyAudio(input encodings.CopyAudio) []interface{} { - label := "" - if input.Label != nil { - label = *input.Label - } - - return []interface{}{ - map[string]interface{}{ - "label": label, - }, - } -} - -func expandCustomPresetCodecsCopyVideo(input []interface{}) encodings.CopyVideo { - if len(input) == 0 || input[0] == nil { - return encodings.CopyVideo{} - } - - copyVideo := input[0].(map[string]interface{}) - result := encodings.CopyVideo{} - - if v := copyVideo["label"].(string); v != "" { - result.Label = utils.String(v) - } - - return result -} - -func flattenCustomPresetCodecsCopyVideo(input encodings.CopyVideo) []interface{} { - label := "" - if input.Label != nil { - label = *input.Label - } - - return []interface{}{ - map[string]interface{}{ - "label": label, - }, - } -} - -func expandCustomPresetCodecsDdAudio(input []interface{}) encodings.DDAudio { - if len(input) == 0 || input[0] == nil { - return encodings.DDAudio{} - } - - ddAudio := input[0].(map[string]interface{}) - result := encodings.DDAudio{} - - if v := ddAudio["bitrate"].(int); v != 0 { - result.Bitrate = utils.Int64(int64(v)) - } - - if v := ddAudio["channels"].(int); v != 0 { - result.Channels = utils.Int64(int64(v)) - } - - if v := ddAudio["label"].(string); v != "" { - result.Label = utils.String(v) - } - - if v := ddAudio["sampling_rate"].(int); v != 0 { - result.SamplingRate = utils.Int64(int64(v)) - } - - return result -} - -func flattenCustomPresetCodecsDdAudio(input encodings.DDAudio) []interface{} { - bitrate := 0 - if input.Bitrate != nil { - bitrate = int(*input.Bitrate) - } - - channels := 0 - if input.Channels != nil { - channels = int(*input.Channels) - } - - label := "" - if input.Label != nil { - label = *input.Label - } - - samplingRate := 0 - if input.SamplingRate != nil { - samplingRate = int(*input.SamplingRate) - } - - return []interface{}{ - map[string]interface{}{ - "bitrate": bitrate, - "channels": channels, - "label": label, - "sampling_rate": samplingRate, - }, - } -} - -func expandCustomPresetCodecsH264Video(input []interface{}) encodings.H264Video { - if len(input) == 0 || input[0] == nil { - return encodings.H264Video{} - } - - h264Video := input[0].(map[string]interface{}) - result := encodings.H264Video{ - Layers: expandCustomPresetCodecsH264VideoLayers(h264Video["layer"].([]interface{})), - SceneChangeDetection: utils.Bool(h264Video["scene_change_detection_enabled"].(bool)), - } - - if v := h264Video["complexity"].(string); v != "" { - result.Complexity = pointer.To(encodings.H264Complexity(v)) - } - - if v := h264Video["key_frame_interval"].(string); v != "" { - result.KeyFrameInterval = utils.String(v) - } - - if v := h264Video["label"].(string); v != "" { - result.Label = utils.String(v) - } - - if v := h264Video["rate_control_mode"].(string); v != "" { - result.RateControlMode = pointer.To(encodings.H264RateControlMode(v)) - } - - if v := h264Video["stretch_mode"].(string); v != "" { - result.StretchMode = pointer.To(encodings.StretchMode(v)) - } - - if v := h264Video["sync_mode"].(string); v != "" { - result.SyncMode = pointer.To(encodings.VideoSyncMode(v)) - } - - return result -} - -func flattenCustomPresetCodecsH264Video(input encodings.H264Video) []interface{} { - complexity := "" - if input.Complexity != nil { - complexity = string(*input.Complexity) - } - - keyFrameInterval := "" - if input.KeyFrameInterval != nil { - keyFrameInterval = *input.KeyFrameInterval - } - - label := "" - if input.Label != nil { - label = *input.Label - } - - rateControlMode := "" - if input.RateControlMode != nil { - rateControlMode = string(*input.RateControlMode) - } - - sceneChangeDetectionEnabled := false - if input.SceneChangeDetection != nil { - sceneChangeDetectionEnabled = *input.SceneChangeDetection - } - - stretchMode := "" - if input.StretchMode != nil { - stretchMode = string(*input.StretchMode) - } - - syncMode := "" - if input.SyncMode != nil { - syncMode = string(*input.SyncMode) - } - return []interface{}{ - map[string]interface{}{ - "complexity": complexity, - "key_frame_interval": keyFrameInterval, - "label": label, - "layer": flattenCustomPresetCodecsH264VideoLayers(input.Layers), - "rate_control_mode": rateControlMode, - "scene_change_detection_enabled": sceneChangeDetectionEnabled, - "stretch_mode": stretchMode, - "sync_mode": syncMode, - }, - } -} - -func expandCustomPresetCodecsH264VideoLayers(input []interface{}) *[]encodings.H264Layer { - if len(input) == 0 || input[0] == nil { - return nil - } - - results := make([]encodings.H264Layer, 0) - for _, layerRaw := range input { - layer := layerRaw.(map[string]interface{}) - result := encodings.H264Layer{ - Bitrate: int64(layer["bitrate"].(int)), - AdaptiveBFrame: utils.Bool(layer["adaptive_b_frame_enabled"].(bool)), - } - - if v := layer["b_frames"].(int); v != 0 { - result.BFrames = utils.Int64(int64(v)) - } - - if v := layer["buffer_window"].(string); v != "" { - result.BufferWindow = utils.String(v) - } - - if v := layer["crf"].(float64); v != 0 { - result.Crf = utils.Float(v) - } - - if v := layer["entropy_mode"].(string); v != "" { - result.EntropyMode = pointer.To(encodings.EntropyMode(v)) - } - - if v := layer["frame_rate"].(string); v != "" { - result.FrameRate = utils.String(v) - } - - if v := layer["height"].(string); v != "" { - result.Height = utils.String(v) - } - - if v := layer["label"].(string); v != "" { - result.Label = utils.String(v) - } - - if v := layer["level"].(string); v != "" { - result.Level = utils.String(v) - } - - if v := layer["max_bitrate"].(int); v != 0 { - result.MaxBitrate = utils.Int64(int64(v)) - } - - if v := layer["profile"].(string); v != "" { - result.Profile = pointer.To(encodings.H264VideoProfile(v)) - } - - if v := layer["reference_frames"].(int); v != 0 { - result.ReferenceFrames = utils.Int64(int64(v)) - } - - if v := layer["slices"].(int); v != 0 { - result.Slices = utils.Int64(int64(v)) - } - - if v := layer["width"].(string); v != "" { - result.Width = utils.String(v) - } - - results = append(results, result) - } - - return &results -} - -func flattenCustomPresetCodecsH264VideoLayers(input *[]encodings.H264Layer) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - results := make([]interface{}, 0) - - for _, v := range *input { - adaptiveBFrameEnabled := false - if v.AdaptiveBFrame != nil { - adaptiveBFrameEnabled = *v.AdaptiveBFrame - } - - bFrames := 0 - if v.BFrames != nil { - bFrames = int(*v.BFrames) - } - - bufferWindow := "" - if v.BufferWindow != nil { - bufferWindow = *v.BufferWindow - } - - crf := 0.0 - if v.Crf != nil { - crf = *v.Crf - } - - entropyMode := "" - if v.EntropyMode != nil { - entropyMode = string(*v.EntropyMode) - } - - frameRate := "" - if v.FrameRate != nil { - frameRate = *v.FrameRate - } - - height := "" - if v.Height != nil { - height = *v.Height - } - - label := "" - if v.Label != nil { - label = *v.Label - } - - level := "" - if v.Level != nil { - level = *v.Level - } - - maxBitrate := 0 - if v.MaxBitrate != nil { - maxBitrate = int(*v.MaxBitrate) - } - - profile := "" - if v.Profile != nil { - profile = string(*v.Profile) - } - - referenceFrames := 0 - if v.ReferenceFrames != nil { - referenceFrames = int(*v.ReferenceFrames) - } - - slices := 0 - if v.Slices != nil { - slices = int(*v.Slices) - } - - width := "" - if v.Width != nil { - width = *v.Width - } - - results = append(results, map[string]interface{}{ - "bitrate": v.Bitrate, - "adaptive_b_frame_enabled": adaptiveBFrameEnabled, - "b_frames": bFrames, - "buffer_window": bufferWindow, - "crf": crf, - "entropy_mode": entropyMode, - "frame_rate": frameRate, - "height": height, - "label": label, - "level": level, - "max_bitrate": maxBitrate, - "profile": profile, - "reference_frames": referenceFrames, - "slices": slices, - "width": width, - }) - } - - return results -} - -func expandCustomPresetCodecsH265Video(input []interface{}) encodings.H265Video { - if len(input) == 0 || input[0] == nil { - return encodings.H265Video{} - } - - h265Video := input[0].(map[string]interface{}) - result := encodings.H265Video{ - Layers: expandCustomPresetCodecsH265VideoLayers(h265Video["layer"].([]interface{})), - SceneChangeDetection: utils.Bool(h265Video["scene_change_detection_enabled"].(bool)), - } - - if v := h265Video["complexity"].(string); v != "" { - result.Complexity = pointer.To(encodings.H265Complexity(v)) - } - - if v := h265Video["key_frame_interval"].(string); v != "" { - result.KeyFrameInterval = utils.String(v) - } - - if v := h265Video["label"].(string); v != "" { - result.Label = utils.String(v) - } - - if v := h265Video["stretch_mode"].(string); v != "" { - result.StretchMode = pointer.To(encodings.StretchMode(v)) - } - - if v := h265Video["sync_mode"].(string); v != "" { - result.SyncMode = pointer.To(encodings.VideoSyncMode(v)) - } - - return result -} - -func flattenCustomPresetCodecsH265Video(input encodings.H265Video) []interface{} { - complexity := "" - if input.Complexity != nil { - complexity = string(*input.Complexity) - } - - keyFrameInterval := "" - if input.KeyFrameInterval != nil { - keyFrameInterval = *input.KeyFrameInterval - } - - label := "" - if input.Label != nil { - label = *input.Label - } - - sceneChangeDetectionEnabled := false - if input.SceneChangeDetection != nil { - sceneChangeDetectionEnabled = *input.SceneChangeDetection - } - - stretchMode := "" - if input.StretchMode != nil { - stretchMode = string(*input.StretchMode) - } - - syncMode := "" - if input.SyncMode != nil { - syncMode = string(*input.SyncMode) - } - return []interface{}{ - map[string]interface{}{ - "complexity": complexity, - "key_frame_interval": keyFrameInterval, - "label": label, - "layer": flattenCustomPresetCodecsH265VideoLayers(input.Layers), - "scene_change_detection_enabled": sceneChangeDetectionEnabled, - "stretch_mode": stretchMode, - "sync_mode": syncMode, - }, - } -} - -func expandCustomPresetCodecsH265VideoLayers(input []interface{}) *[]encodings.H265Layer { - if len(input) == 0 || input[0] == nil { - return nil - } - - results := make([]encodings.H265Layer, 0) - for _, layerRaw := range input { - layer := layerRaw.(map[string]interface{}) - result := encodings.H265Layer{ - Bitrate: int64(layer["bitrate"].(int)), - AdaptiveBFrame: utils.Bool(layer["adaptive_b_frame_enabled"].(bool)), - } - - if v := layer["b_frames"].(int); v != 0 { - result.BFrames = utils.Int64(int64(v)) - } - - if v := layer["buffer_window"].(string); v != "" { - result.BufferWindow = utils.String(v) - } - - if v := layer["crf"].(float64); v != 0 { - result.Crf = utils.Float(v) - } - - if v := layer["frame_rate"].(string); v != "" { - result.FrameRate = utils.String(v) - } - - if v := layer["height"].(string); v != "" { - result.Height = utils.String(v) - } - - if v := layer["label"].(string); v != "" { - result.Label = utils.String(v) - } - - if v := layer["level"].(string); v != "" { - result.Level = utils.String(v) - } - - if v := layer["max_bitrate"].(int); v != 0 { - result.MaxBitrate = utils.Int64(int64(v)) - } - - if v := layer["profile"].(string); v != "" { - result.Profile = pointer.To(encodings.H265VideoProfile(v)) - } - - if v := layer["reference_frames"].(int); v != 0 { - result.ReferenceFrames = utils.Int64(int64(v)) - } - - if v := layer["slices"].(int); v != 0 { - result.Slices = utils.Int64(int64(v)) - } - - if v := layer["width"].(string); v != "" { - result.Width = utils.String(v) - } - - results = append(results, result) - } - - return &results -} - -func flattenCustomPresetCodecsH265VideoLayers(input *[]encodings.H265Layer) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - results := make([]interface{}, 0) - - for _, v := range *input { - adaptiveBFrameEnabled := false - if v.AdaptiveBFrame != nil { - adaptiveBFrameEnabled = *v.AdaptiveBFrame - } - - bFrames := 0 - if v.BFrames != nil { - bFrames = int(*v.BFrames) - } - - bufferWindow := "" - if v.BufferWindow != nil { - bufferWindow = *v.BufferWindow - } - - crf := 0.0 - if v.Crf != nil { - crf = *v.Crf - } - - frameRate := "" - if v.FrameRate != nil { - frameRate = *v.FrameRate - } - - height := "" - if v.Height != nil { - height = *v.Height - } - - label := "" - if v.Label != nil { - label = *v.Label - } - - level := "" - if v.Level != nil { - level = *v.Level - } - - maxBitrate := 0 - if v.MaxBitrate != nil { - maxBitrate = int(*v.MaxBitrate) - } - - profile := "" - if v.Profile != nil { - profile = string(*v.Profile) - } - - referenceFrames := 0 - if v.ReferenceFrames != nil { - referenceFrames = int(*v.ReferenceFrames) - } - - slices := 0 - if v.Slices != nil { - slices = int(*v.Slices) - } - - width := "" - if v.Width != nil { - width = *v.Width - } - - results = append(results, map[string]interface{}{ - "bitrate": v.Bitrate, - "adaptive_b_frame_enabled": adaptiveBFrameEnabled, - "b_frames": bFrames, - "buffer_window": bufferWindow, - "crf": crf, - "frame_rate": frameRate, - "height": height, - "label": label, - "level": level, - "max_bitrate": maxBitrate, - "profile": profile, - "reference_frames": referenceFrames, - "slices": slices, - "width": width, - }) - } - - return results -} -func expandCustomPresetCodecsJpgImage(input []interface{}) encodings.JpgImage { - if len(input) == 0 || input[0] == nil { - return encodings.JpgImage{} - } - - jpgImage := input[0].(map[string]interface{}) - result := encodings.JpgImage{ - Start: jpgImage["start"].(string), - Layers: expandCustomPresetCodecsJpgImageLayer(jpgImage["layer"].([]interface{})), - } - - if v := jpgImage["key_frame_interval"].(string); v != "" { - result.KeyFrameInterval = utils.String(v) - } - - if v := jpgImage["label"].(string); v != "" { - result.Label = utils.String(v) - } - - if v := jpgImage["range"].(string); v != "" { - result.Range = utils.String(v) - } - - if v := jpgImage["sprite_column"].(int); v != 0 { - result.SpriteColumn = utils.Int64(int64(v)) - } - - if v := jpgImage["step"].(string); v != "" { - result.Step = utils.String(v) - } - - if v := jpgImage["stretch_mode"].(string); v != "" { - result.StretchMode = pointer.To(encodings.StretchMode(v)) - } - - if v := jpgImage["sync_mode"].(string); v != "" { - result.SyncMode = pointer.To(encodings.VideoSyncMode(v)) - } - - return result -} - -func flattenCustomPresetCodecsJpgImage(input encodings.JpgImage) []interface{} { - keyFrameInterval := "" - if input.KeyFrameInterval != nil { - keyFrameInterval = *input.KeyFrameInterval - } - - label := "" - if input.Label != nil { - label = *input.Label - } - - rang := "" - if input.Range != nil { - rang = *input.Range - } - - spriteColumn := 0 - if input.SpriteColumn != nil { - spriteColumn = int(*input.SpriteColumn) - } - - step := "" - if input.Step != nil { - step = *input.Step - } - - stretchMode := "" - if input.StretchMode != nil { - stretchMode = string(*input.StretchMode) - } - - syncMode := "" - if input.SyncMode != nil { - syncMode = string(*input.SyncMode) - } - - return []interface{}{ - map[string]interface{}{ - "key_frame_interval": keyFrameInterval, - "label": label, - "layer": flattenCustomPresetCodecsJpgImageLayer(input.Layers), - "range": rang, - "start": input.Start, - "step": step, - "sprite_column": spriteColumn, - "stretch_mode": stretchMode, - "sync_mode": syncMode, - }, - } -} - -func expandCustomPresetCodecsJpgImageLayer(input []interface{}) *[]encodings.JpgLayer { - if len(input) == 0 || input[0] == nil { - return nil - } - - results := make([]encodings.JpgLayer, 0) - for _, layerRaw := range input { - if layerRaw == nil { - continue - } - - layer := layerRaw.(map[string]interface{}) - result := encodings.JpgLayer{} - - if v := layer["height"].(string); v != "" { - result.Height = utils.String(v) - } - - if v := layer["label"].(string); v != "" { - result.Label = utils.String(v) - } - - if v := layer["quality"].(int); v != 0 { - result.Quality = utils.Int64(int64(v)) - } - - if v := layer["width"].(string); v != "" { - result.Width = utils.String(v) - } - - results = append(results, result) - } - - return &results -} - -func flattenCustomPresetCodecsJpgImageLayer(input *[]encodings.JpgLayer) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - results := make([]interface{}, 0) - - for _, v := range *input { - height := "" - if v.Height != nil { - height = *v.Height - } - - label := "" - if v.Label != nil { - label = *v.Label - } - - quality := 0 - if v.Quality != nil { - quality = int(*v.Quality) - } - - width := "" - if v.Width != nil { - width = *v.Width - } - - results = append(results, map[string]interface{}{ - "height": height, - "label": label, - "quality": quality, - "width": width, - }) - } - - return results -} - -func expandCustomPresetCodecsPngImage(input []interface{}) encodings.PngImage { - if len(input) == 0 || input[0] == nil { - return encodings.PngImage{} - } - - jpgImage := input[0].(map[string]interface{}) - result := encodings.PngImage{ - Start: jpgImage["start"].(string), - Layers: expandCustomPresetCodecsPngImageLayer(jpgImage["layer"].([]interface{})), - } - if v := jpgImage["key_frame_interval"].(string); v != "" { - result.KeyFrameInterval = utils.String(v) - } - - if v := jpgImage["label"].(string); v != "" { - result.Label = utils.String(v) - } - - if v := jpgImage["range"].(string); v != "" { - result.Range = utils.String(v) - } - - if v := jpgImage["step"].(string); v != "" { - result.Step = utils.String(v) - } - - if v := jpgImage["stretch_mode"].(string); v != "" { - result.StretchMode = pointer.To(encodings.StretchMode(v)) - } - - if v := jpgImage["sync_mode"].(string); v != "" { - result.SyncMode = pointer.To(encodings.VideoSyncMode(v)) - } - - return result -} - -func flattenCustomPresetCodecsPngImage(input encodings.PngImage) []interface{} { - keyFrameInterval := "" - if input.KeyFrameInterval != nil { - keyFrameInterval = *input.KeyFrameInterval - } - - label := "" - if input.Label != nil { - label = *input.Label - } - - rang := "" - if input.Range != nil { - rang = *input.Range - } - - step := "" - if input.Step != nil { - step = *input.Step - } - - stretchMode := "" - if input.StretchMode != nil { - stretchMode = string(*input.StretchMode) - } - - syncMode := "" - if input.SyncMode != nil { - syncMode = string(*input.SyncMode) - } - - return []interface{}{ - map[string]interface{}{ - "key_frame_interval": keyFrameInterval, - "label": label, - "layer": flattenCustomPresetCodecsPngImageLayer(input.Layers), - "range": rang, - "start": input.Start, - "step": step, - "stretch_mode": stretchMode, - "sync_mode": syncMode, - }, - } -} - -func expandCustomPresetCodecsPngImageLayer(input []interface{}) *[]encodings.Layer { - if len(input) == 0 || input[0] == nil { - return nil - } - - results := make([]encodings.Layer, 0) - for _, layerRaw := range input { - if layerRaw == nil { - continue - } - - layer := layerRaw.(map[string]interface{}) - result := encodings.Layer{} - - if v := layer["height"].(string); v != "" { - result.Height = utils.String(v) - } - - if v := layer["label"].(string); v != "" { - result.Label = utils.String(v) - } - - if v := layer["width"].(string); v != "" { - result.Width = utils.String(v) - } - - results = append(results, result) - } - - return &results -} - -func flattenCustomPresetCodecsPngImageLayer(input *[]encodings.Layer) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - results := make([]interface{}, 0) - - for _, v := range *input { - height := "" - if v.Height != nil { - height = *v.Height - } - - label := "" - if v.Label != nil { - label = *v.Label - } - - width := "" - if v.Width != nil { - width = *v.Width - } - - results = append(results, map[string]interface{}{ - "height": height, - "label": label, - "width": width, - }) - } - - return results -} - -func expandCustomPresetFilters(input []interface{}) (*encodings.Filters, error) { - if len(input) == 0 || input[0] == nil { - return nil, nil - } - - filters := input[0].(map[string]interface{}) - - result := encodings.Filters{} - - if overlayRaw, ok := filters["overlay"].([]interface{}); ok { - overlay, err := expandCustomPresetFiltersOverlays(overlayRaw) - if err != nil { - return nil, err - } - result.Overlays = overlay - } - - if cropRectangle, ok := filters["crop_rectangle"].([]interface{}); ok { - result.Crop = expandCustomPresetFiltersCropRectangle(cropRectangle) - } - - if deinterlace, ok := filters["deinterlace"].([]interface{}); ok { - result.Deinterlace = expandCustomPresetFiltersDeinterlace(deinterlace) - } - - if fadeIn, ok := filters["fade_in"].([]interface{}); ok { - result.FadeIn = expandCustomPresetFiltersFade(fadeIn) - } - - if fadeOut, ok := filters["fade_out"].([]interface{}); ok { - result.FadeOut = expandCustomPresetFiltersFade(fadeOut) - } - - if v := filters["rotation"].(string); v != "" { - result.Rotation = pointer.To(encodings.Rotation(v)) - } - - return &result, nil -} - -func flattenCustomPresetFilters(input *encodings.Filters) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - rotation := "" - if input.Rotation != nil { - rotation = string(*input.Rotation) - } - - return []interface{}{ - map[string]interface{}{ - "crop_rectangle": flattenCustomPresetFilterCropRectangle(input.Crop), - "deinterlace": flattenCustomPresetFilterDeinterlace(input.Deinterlace), - "fade_in": flattenCustomPresetFilterFade(input.FadeIn), - "fade_out": flattenCustomPresetFilterFade(input.FadeOut), - "overlay": flattenCustomPresetFilterOverlays(input.Overlays), - "rotation": rotation, - }, - } -} - -func expandCustomPresetFiltersCropRectangle(input []interface{}) *encodings.Rectangle { - if input == nil || input[0] == nil { - return nil - } - - cropRectangle := input[0].(map[string]interface{}) - result := encodings.Rectangle{} - - if v := cropRectangle["height"].(string); v != "" { - result.Height = utils.String(v) - } - - if v := cropRectangle["left"].(string); v != "" { - result.Left = utils.String(v) - } - - if v := cropRectangle["top"].(string); v != "" { - result.Top = utils.String(v) - } - - if v := cropRectangle["width"].(string); v != "" { - result.Width = utils.String(v) - } - - return &result -} - -func flattenCustomPresetFilterCropRectangle(input *encodings.Rectangle) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - height := "" - if input.Height != nil { - height = *input.Height - } - - left := "" - if input.Left != nil { - left = *input.Left - } - - top := "" - if input.Top != nil { - top = *input.Top - } - - width := "" - if input.Width != nil { - width = *input.Width - } - - return []interface{}{ - map[string]interface{}{ - "height": height, - "left": left, - "top": top, - "width": width, - }, - } -} - -func expandCustomPresetFiltersDeinterlace(input []interface{}) *encodings.Deinterlace { - if input == nil || input[0] == nil { - return nil - } - - crop := input[0].(map[string]interface{}) - result := encodings.Deinterlace{} - - if v := crop["parity"].(string); v != "" { - result.Parity = pointer.To(encodings.DeinterlaceParity(v)) - } - - if v := crop["mode"].(string); v != "" { - result.Mode = pointer.To(encodings.DeinterlaceMode(v)) - } - - return &result -} - -func flattenCustomPresetFilterDeinterlace(input *encodings.Deinterlace) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - parity := "" - if input.Parity != nil { - parity = string(*input.Parity) - } - - mode := "" - if input.Mode != nil { - mode = string(*input.Mode) - } - - return []interface{}{ - map[string]interface{}{ - "parity": parity, - "mode": mode, - }, - } -} - -func expandCustomPresetFiltersFade(input []interface{}) *encodings.Fade { - if len(input) == 0 || input[0] == nil { - return nil - } - - v := input[0].(map[string]interface{}) - result := encodings.Fade{ - Duration: v["duration"].(string), - FadeColor: v["fade_color"].(string), - } - - if start := v["start"].(string); start != "" { - result.Start = utils.String(start) - } - - return &result -} - -func flattenCustomPresetFilterFade(input *encodings.Fade) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - start := "" - if input.Start != nil { - start = *input.Start - } - - return []interface{}{ - map[string]interface{}{ - "duration": input.Duration, - "fade_color": input.FadeColor, - "start": start, - }, - } -} - -func expandCustomPresetFiltersOverlays(input []interface{}) (*[]encodings.Overlay, error) { - if len(input) == 0 || input[0] == nil { - return nil, nil - } - - results := make([]encodings.Overlay, 0) - - for _, v := range input { - if v == nil { - continue - } - overlay := v.(map[string]interface{}) - audio := overlay["audio"].([]interface{}) - video := overlay["video"].([]interface{}) - - overlaysCount := 0 - if len(audio) > 0 { - overlaysCount++ - } - if len(video) > 0 { - overlaysCount++ - } - if overlaysCount == 0 { - return nil, fmt.Errorf("custom preset filter overlay must contain at least one type of: audio or video") - } - if overlaysCount > 1 { - return nil, fmt.Errorf("more than one type of overlay in the same custom preset filter overlay is not allowed") - } - - if len(audio) > 0 { - results = append(results, expandCustomPresetFiltersOverlaysAudio(audio)) - } else if len(video) > 0 { - results = append(results, expandCustomPresetFiltersOverlaysVideo(video)) - } - } - - return &results, nil -} - -type flattenedCustomPresetFilterOverlay struct { - audio []interface{} - video []interface{} -} - -func flattenCustomPresetFilterOverlays(input *[]encodings.Overlay) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - results := make([]interface{}, 0) - - for _, v := range *input { - result := flattenedCustomPresetFilterOverlay{ - audio: []interface{}{}, - video: []interface{}{}, - } - - if overlay, ok := v.(encodings.AudioOverlay); ok { - result.audio = flattenCustomPresetFilterOverlayAudio(overlay) - } - - if overlay, ok := v.(encodings.VideoOverlay); ok { - result.video = flattenCustomPresetFilterOverlayVideo(overlay) - } - - results = append(results, map[string]interface{}{ - "audio": result.audio, - "video": result.video, - }) - } - - return results -} - -func expandCustomPresetFiltersOverlaysAudio(input []interface{}) encodings.AudioOverlay { - if len(input) == 0 || input[0] == nil { - return encodings.AudioOverlay{} - } - - audio := input[0].(map[string]interface{}) - result := encodings.AudioOverlay{ - InputLabel: audio["input_label"].(string), - } - - if v := audio["audio_gain_level"].(float64); v != 0 { - result.AudioGainLevel = utils.Float(v) - } - - if v := audio["end"].(string); v != "" { - result.End = utils.String(v) - } - - if v := audio["fade_in_duration"].(string); v != "" { - result.FadeInDuration = utils.String(v) - } - - if v := audio["fade_out_duration"].(string); v != "" { - result.FadeOutDuration = utils.String(v) - } - - if v := audio["start"].(string); v != "" { - result.Start = utils.String(v) - } - - return result -} - -func flattenCustomPresetFilterOverlayAudio(input encodings.AudioOverlay) []interface{} { - audioGainLevel := 0.0 - if input.AudioGainLevel != nil { - audioGainLevel = *input.AudioGainLevel - } - - end := "" - if input.End != nil { - end = *input.End - } - - fadeInDuration := "" - if input.FadeInDuration != nil { - fadeInDuration = *input.FadeInDuration - } - - fadeOutDuration := "" - if input.FadeOutDuration != nil { - fadeOutDuration = *input.FadeOutDuration - } - - start := "" - if input.Start != nil { - start = *input.Start - } - - return []interface{}{ - map[string]interface{}{ - "audio_gain_level": audioGainLevel, - "end": end, - "fade_in_duration": fadeInDuration, - "fade_out_duration": fadeOutDuration, - "input_label": input.InputLabel, - "start": start, - }, - } -} - -func expandCustomPresetFiltersOverlaysVideo(input []interface{}) encodings.VideoOverlay { - if len(input) == 0 || input[0] == nil { - return encodings.VideoOverlay{} - } - - video := input[0].(map[string]interface{}) - result := encodings.VideoOverlay{ - InputLabel: video["input_label"].(string), - Position: expandCustomPresetFiltersCropRectangle(video["position"].([]interface{})), - CropRectangle: expandCustomPresetFiltersCropRectangle(video["crop_rectangle"].([]interface{})), - } - - if v := video["audio_gain_level"].(float64); v != 0 { - result.AudioGainLevel = utils.Float(v) - } - - if v := video["end"].(string); v != "" { - result.End = utils.String(v) - } - - if v := video["fade_in_duration"].(string); v != "" { - result.FadeInDuration = utils.String(v) - } - - if v := video["fade_out_duration"].(string); v != "" { - result.FadeOutDuration = utils.String(v) - } - - if v := video["opacity"].(float64); v != 0 { - result.Opacity = utils.Float(v) - } - - if v := video["start"].(string); v != "" { - result.Start = utils.String(v) - } - - return result -} - -func flattenCustomPresetFilterOverlayVideo(input encodings.VideoOverlay) []interface{} { - audioGainLevel := 0.0 - if input.AudioGainLevel != nil { - audioGainLevel = *input.AudioGainLevel - } - - end := "" - if input.End != nil { - end = *input.End - } - - fadeInDuration := "" - if input.FadeInDuration != nil { - fadeInDuration = *input.FadeInDuration - } - - fadeOutDuration := "" - if input.FadeOutDuration != nil { - fadeOutDuration = *input.FadeOutDuration - } - - opacity := 0.0 - if input.Opacity != nil { - opacity = *input.Opacity - } - - start := "" - if input.Start != nil { - start = *input.Start - } - - return []interface{}{ - map[string]interface{}{ - "audio_gain_level": audioGainLevel, - "crop_rectangle": flattenCustomPresetFilterCropRectangle(input.CropRectangle), - "end": end, - "fade_in_duration": fadeInDuration, - "fade_out_duration": fadeOutDuration, - "input_label": input.InputLabel, - "opacity": opacity, - "position": flattenCustomPresetFilterCropRectangle(input.Position), - "start": start, - }, - } -} - -func expandCustomPresetFormats(input []interface{}) ([]encodings.Format, error) { - if len(input) == 0 || input[0] == nil { - return make([]encodings.Format, 0), nil - } - - results := make([]encodings.Format, 0) - for _, v := range input { - if v == nil { - continue - } - - format := v.(map[string]interface{}) - - jpg := format["jpg"].([]interface{}) - mp4 := format["mp4"].([]interface{}) - png := format["png"].([]interface{}) - transportStream := format["transport_stream"].([]interface{}) - - formatCount := 0 - - if len(jpg) > 0 { - formatCount++ - } - if len(mp4) > 0 { - formatCount++ - } - if len(png) > 0 { - formatCount++ - } - if len(transportStream) > 0 { - formatCount++ - } - - if formatCount == 0 { - return nil, fmt.Errorf("custom preset format must contain at least one type of: jpg, mp4, png or transport_stream") - } - if formatCount > 1 { - return nil, fmt.Errorf("more than one type of format in the same custom preset format is not allowed") - } - - if len(jpg) > 0 { - results = append(results, expandCustomPresetFormatsJpg(jpg)) - } - if len(mp4) > 0 { - results = append(results, expandCustomPresetFormatsMp4(mp4)) - } - if len(png) > 0 { - results = append(results, expandCustomPresetFormatsPng(png)) - } - if len(transportStream) > 0 { - results = append(results, expandCustomPresetFormatsTransportStream(transportStream)) - } - } - - return results, nil -} - -type flattenedCustomPresetFormat struct { - jpg []interface{} - mp4 []interface{} - png []interface{} - transportStream []interface{} -} - -func flattenCustomPresetFormats(input []encodings.Format) []interface{} { - results := make([]interface{}, 0) - - for _, v := range input { - result := flattenedCustomPresetFormat{ - jpg: []interface{}{}, - mp4: []interface{}{}, - png: []interface{}{}, - transportStream: []interface{}{}, - } - - if format, ok := v.(encodings.JpgFormat); ok { - result.jpg = flattenCustomPresetFormatsJpg(format) - } - if format, ok := v.(encodings.Mp4Format); ok { - result.mp4 = flattenCustomPresetFormatsMp4(format) - } - if format, ok := v.(encodings.PngFormat); ok { - result.png = flattenCustomPresetFormatsPng(format) - } - if format, ok := v.(encodings.TransportStreamFormat); ok { - result.transportStream = flattenCustomPresetFormatsTransportStream(format) - } - - results = append(results, map[string]interface{}{ - "jpg": result.jpg, - "mp4": result.mp4, - "png": result.png, - "transport_stream": result.transportStream, - }) - } - - return results -} - -func expandCustomPresetFormatsJpg(input []interface{}) encodings.JpgFormat { - if len(input) == 0 || input[0] == nil { - return encodings.JpgFormat{} - } - - jpg := input[0].(map[string]interface{}) - - result := encodings.JpgFormat{ - FilenamePattern: jpg["filename_pattern"].(string), - } - - return result -} - -func flattenCustomPresetFormatsJpg(input encodings.JpgFormat) []interface{} { - return []interface{}{ - map[string]interface{}{ - "filename_pattern": input.FilenamePattern, - }, - } -} - -func expandCustomPresetFormatsMp4(input []interface{}) encodings.Mp4Format { - if len(input) == 0 || input[0] == nil { - return encodings.Mp4Format{} - } - - mp4 := input[0].(map[string]interface{}) - result := encodings.Mp4Format{ - FilenamePattern: mp4["filename_pattern"].(string), - OutputFiles: expandCustomPresetFormatsOutputFiles(mp4["output_file"].([]interface{})), - } - - return result -} - -func flattenCustomPresetFormatsMp4(input encodings.Mp4Format) []interface{} { - return []interface{}{ - map[string]interface{}{ - "filename_pattern": input.FilenamePattern, - "output_file": flattenCustomPresetFormatOutputFiles(input.OutputFiles), - }, - } -} - -func expandCustomPresetFormatsPng(input []interface{}) encodings.PngFormat { - if len(input) == 0 || input[0] == nil { - return encodings.PngFormat{} - } - - jpg := input[0].(map[string]interface{}) - result := encodings.PngFormat{ - FilenamePattern: jpg["filename_pattern"].(string), - } - - return result -} - -func flattenCustomPresetFormatsPng(input encodings.PngFormat) []interface{} { - return []interface{}{ - map[string]interface{}{ - "filename_pattern": input.FilenamePattern, - }, - } -} - -func expandCustomPresetFormatsTransportStream(input []interface{}) encodings.TransportStreamFormat { - if len(input) == 0 || input[0] == nil { - return encodings.TransportStreamFormat{} - } - - transportStream := input[0].(map[string]interface{}) - result := encodings.TransportStreamFormat{ - FilenamePattern: transportStream["filename_pattern"].(string), - OutputFiles: expandCustomPresetFormatsOutputFiles(transportStream["output_file"].([]interface{})), - } - - return result -} - -func flattenCustomPresetFormatsTransportStream(input encodings.TransportStreamFormat) []interface{} { - return []interface{}{ - map[string]interface{}{ - "filename_pattern": input.FilenamePattern, - "output_file": flattenCustomPresetFormatOutputFiles(input.OutputFiles), - }, - } -} - -func expandCustomPresetFormatsOutputFiles(input []interface{}) *[]encodings.OutputFile { - if len(input) == 0 || input[0] == nil { - return nil - } - - results := make([]encodings.OutputFile, 0) - for _, v := range input { - if v == nil { - continue - } - - outputFile := v.(map[string]interface{}) - labels := make([]string, 0) - for _, label := range outputFile["labels"].([]interface{}) { - labels = append(labels, label.(string)) - } - - results = append(results, encodings.OutputFile{ - Labels: labels, - }) - } - - return &results -} - -func flattenCustomPresetFormatOutputFiles(input *[]encodings.OutputFile) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - results := make([]interface{}, 0) - for _, v := range *input { - labels := make([]interface{}, 0) - for _, label := range v.Labels { - labels = append(labels, label) - } - - results = append(results, map[string]interface{}{ - "labels": labels, - }) - } - - return results -} diff --git a/internal/services/media/media_transform_resource_test.go b/internal/services/media/media_transform_resource_test.go deleted file mode 100644 index bd9c127043aeb..0000000000000 --- a/internal/services/media/media_transform_resource_test.go +++ /dev/null @@ -1,569 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type MediaTransformResource struct{} - -func TestAccMediaTransform_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_transform` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_transform", "test") - r := MediaTransformResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Transform-1"), - check.That(data.ResourceName).Key("output.#").HasValue("1"), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMediaTransform_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_transform` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_transform", "test") - r := MediaTransformResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Transform-1"), - check.That(data.ResourceName).Key("output.#").HasValue("1"), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func TestAccMediaTransform_complete(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_transform` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_transform", "test") - r := MediaTransformResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("description").HasValue("Transform description"), - check.That(data.ResourceName).Key("output.#").HasValue("3"), - check.That(data.ResourceName).Key("name").HasValue("Transform-1"), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMediaTransform_update(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The `azurerm_media_transform` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.") - } - data := acceptance.BuildTestData(t, "azurerm_media_transform", "test") - r := MediaTransformResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Transform-1"), - check.That(data.ResourceName).Key("output.#").HasValue("1"), - ), - }, - data.ImportStep(), - { - Config: r.update(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("description").HasValue("Transform description"), - check.That(data.ResourceName).Key("output.#").HasValue("3"), - check.That(data.ResourceName).Key("name").HasValue("Transform-1"), - ), - }, - data.ImportStep(), - { - Config: r.complete(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("description").HasValue("Transform description"), - check.That(data.ResourceName).Key("output.#").HasValue("3"), - check.That(data.ResourceName).Key("name").HasValue("Transform-1"), - ), - }, - data.ImportStep(), - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("name").HasValue("Transform-1"), - check.That(data.ResourceName).Key("output.#").HasValue("1"), - check.That(data.ResourceName).Key("description").HasValue(""), - ), - }, - data.ImportStep(), - }) -} - -func (r MediaTransformResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := encodings.ParseTransformID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.Media.V20220701Client.Encodings.TransformsGet(ctx, *id) - if err != nil { - return nil, fmt.Errorf("retrieving %s: %+v", *id, err) - } - - return utils.Bool(resp.Model != nil), nil -} - -func (r MediaTransformResource) basic(data acceptance.TestData) string { - template := r.template(data) - return fmt.Sprintf(` -%s - -resource "azurerm_media_transform" "test" { - name = "Transform-1" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name - output { - relative_priority = "High" - on_error_action = "ContinueJob" - builtin_preset { - preset_name = "AACGoodQualityAudio" - } - } -} -`, template) -} - -func (r MediaTransformResource) requiresImport(data acceptance.TestData) string { - template := r.basic(data) - return fmt.Sprintf(` -%s - -resource "azurerm_media_transform" "import" { - name = azurerm_media_transform.test.name - resource_group_name = azurerm_media_transform.test.resource_group_name - media_services_account_name = azurerm_media_transform.test.media_services_account_name - - output { - relative_priority = "High" - on_error_action = "ContinueJob" - builtin_preset { - preset_name = "AACGoodQualityAudio" - } - } -} -`, template) -} - -func (r MediaTransformResource) update(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_transform" "test" { - name = "Transform-1" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name - description = "Transform description" - output { - builtin_preset { - preset_name = "AACGoodQualityAudio" - preset_configuration { - complexity = "Balanced" - } - } - } - - output { - audio_analyzer_preset { - audio_language = "ar-SA" - } - } - - output { - relative_priority = "Low" - on_error_action = "ContinueJob" - custom_preset { - codec { - aac_audio { - bitrate = 128000 - } - } - - codec { - h264_video { - layer { - bitrate = 1045000 - } - layer { - bitrate = 1000 - } - } - } - - codec { - h265_video { - complexity = "Speed" - layer { - bitrate = 1045000 - } - } - } - - format { - mp4 { - filename_pattern = "test{Bitrate}" - output_file { - labels = ["test", "ppe"] - } - } - } - - filter { - crop_rectangle { - height = "240" - } - deinterlace { - parity = "TopFieldFirst" - } - fade_in { - duration = "PT5S" - fade_color = "0xFF0000" - } - rotation = "Auto" - overlay { - audio { - input_label = "label.jpg" - } - } - overlay { - video { - input_label = "test.wav" - position { - width = "140" - } - crop_rectangle { - width = "70" - } - } - } - } - } - } -} -`, r.template(data)) -} - -func (r MediaTransformResource) complete(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_media_transform" "test" { - name = "Transform-1" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name - description = "Transform description" - output { - relative_priority = "High" - on_error_action = "ContinueJob" - builtin_preset { - preset_name = "AACGoodQualityAudio" - preset_configuration { - complexity = "Balanced" - interleave_output = "NonInterleavedOutput" - key_frame_interval_in_seconds = 123122.5 - max_bitrate_bps = 300000 - max_height = 480 - max_layers = 14 - min_bitrate_bps = 200000 - min_height = 360 - } - } - } - - output { - relative_priority = "High" - on_error_action = "StopProcessingJob" - audio_analyzer_preset { - audio_language = "ar-SA" - audio_analysis_mode = "Basic" - experimental_options = { - env = "test" - } - } - } - - output { - relative_priority = "Low" - on_error_action = "ContinueJob" - custom_preset { - codec { - aac_audio { - bitrate = 128000 - channels = 2 - sampling_rate = 48000 - profile = "AacLc" - } - } - - codec { - copy_audio { - label = "test" - } - } - - codec { - copy_video { - label = "test" - } - } - - codec { - h264_video { - key_frame_interval = "PT1S" - stretch_mode = "AutoSize" - sync_mode = "Auto" - scene_change_detection_enabled = false - rate_control_mode = "ABR" - complexity = "Quality" - layer { - width = "64" - height = "64" - bitrate = 1045000 - max_bitrate = 1045000 - b_frames = 3 - slices = 0 - adaptive_b_frame_enabled = true - profile = "Auto" - level = "auto" - buffer_window = "PT5S" - reference_frames = 4 - crf = 23 - entropy_mode = "Cabac" - } - layer { - width = "64" - height = "64" - bitrate = 1000 - max_bitrate = 1000 - b_frames = 3 - frame_rate = "32" - slices = 1 - adaptive_b_frame_enabled = true - profile = "High444" - level = "auto" - buffer_window = "PT5S" - reference_frames = 4 - crf = 23 - entropy_mode = "Cavlc" - } - } - } - - codec { - h265_video { - key_frame_interval = "PT2S" - stretch_mode = "AutoSize" - sync_mode = "Auto" - scene_change_detection_enabled = false - complexity = "Speed" - layer { - width = "64" - height = "64" - bitrate = 1045000 - max_bitrate = 1045000 - b_frames = 3 - slices = 5 - adaptive_b_frame_enabled = true - profile = "Auto" - label = "test" - level = "auto" - buffer_window = "PT5S" - frame_rate = "32" - reference_frames = 4 - crf = 23 - } - } - } - - codec { - jpg_image { - stretch_mode = "AutoSize" - sync_mode = "Auto" - start = "10" - range = "100%%" - sprite_column = 1 - step = "10" - layer { - quality = 70 - height = "180" - label = "test" - width = "120" - } - } - } - - codec { - png_image { - stretch_mode = "AutoSize" - sync_mode = "Auto" - start = "{Best}" - range = "80" - step = "10" - layer { - height = "180" - label = "test" - width = "120" - } - } - } - - format { - jpg { - filename_pattern = "test{Basename}" - } - } - - format { - mp4 { - filename_pattern = "test{Bitrate}" - output_file { - labels = ["test", "ppe"] - } - } - } - - format { - png { - filename_pattern = "test{Basename}" - } - } - - format { - transport_stream { - filename_pattern = "test{Bitrate}" - output_file { - labels = ["prod"] - } - } - } - - experimental_options = { - env = "prod" - } - - filter { - crop_rectangle { - height = "240" - left = "30" - top = "360" - width = "70" - } - deinterlace { - parity = "TopFieldFirst" - mode = "AutoPixelAdaptive" - } - fade_in { - duration = "PT5S" - fade_color = "0xFF0000" - start = "10" - } - fade_out { - duration = "90%%" - fade_color = "#FF0C7B" - start = "10%%" - } - rotation = "Auto" - overlay { - audio { - input_label = "label.jpg" - start = "PT5S" - end = "PT30S" - fade_in_duration = "PT1S" - fade_out_duration = "PT2S" - audio_gain_level = 1.0 - } - } - overlay { - video { - input_label = "label.jpg" - start = "PT5S" - end = "PT30S" - fade_in_duration = "PT1S" - fade_out_duration = "PT2S" - audio_gain_level = 1.0 - opacity = 1.0 - position { - height = "180" - left = "20" - top = "240" - width = "140" - } - crop_rectangle { - height = "240" - left = "30" - top = "360" - width = "70" - } - } - } - } - } - } -} -`, r.template(data)) -} - -func (r MediaTransformResource) template(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-media-%d" - location = "%s" -} - -resource "azurerm_storage_account" "test" { - name = "acctestsa1%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "test" { - name = "acctestmsa%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - storage_account { - id = azurerm_storage_account.test.id - is_primary = true - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomString, data.RandomString) -} diff --git a/internal/services/media/migration/asset_filter_v0_to_v1.go b/internal/services/media/migration/asset_filter_v0_to_v1.go deleted file mode 100644 index d3611c750347b..0000000000000 --- a/internal/services/media/migration/asset_filter_v0_to_v1.go +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package migration - -import ( - "context" - "log" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -var _ pluginsdk.StateUpgrade = AssetFilterV0ToV1{} - -type AssetFilterV0ToV1 struct { -} - -func (AssetFilterV0ToV1) Schema() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "asset_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "first_quality_bitrate": { - Type: pluginsdk.TypeInt, - Optional: true, - }, - - "presentation_time_range": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "end_in_units": { - Type: pluginsdk.TypeInt, - Optional: true, - AtLeastOneOf: []string{ - "presentation_time_range.0.end_in_units", "presentation_time_range.0.force_end", "presentation_time_range.0.live_backoff_in_units", - "presentation_time_range.0.presentation_window_in_units", "presentation_time_range.0.start_in_units", "presentation_time_range.0.unit_timescale_in_miliseconds", - }, - }, - - "force_end": { - Type: pluginsdk.TypeBool, - Optional: true, - AtLeastOneOf: []string{ - "presentation_time_range.0.end_in_units", "presentation_time_range.0.force_end", "presentation_time_range.0.live_backoff_in_units", - "presentation_time_range.0.presentation_window_in_units", "presentation_time_range.0.start_in_units", "presentation_time_range.0.unit_timescale_in_miliseconds", - }, - }, - - "live_backoff_in_units": { - Type: pluginsdk.TypeInt, - Optional: true, - AtLeastOneOf: []string{ - "presentation_time_range.0.end_in_units", "presentation_time_range.0.force_end", "presentation_time_range.0.live_backoff_in_units", - "presentation_time_range.0.presentation_window_in_units", "presentation_time_range.0.start_in_units", "presentation_time_range.0.unit_timescale_in_miliseconds", - }, - }, - - "presentation_window_in_units": { - Type: pluginsdk.TypeInt, - Optional: true, - AtLeastOneOf: []string{ - "presentation_time_range.0.end_in_units", "presentation_time_range.0.force_end", "presentation_time_range.0.live_backoff_in_units", - "presentation_time_range.0.presentation_window_in_units", "presentation_time_range.0.start_in_units", "presentation_time_range.0.unit_timescale_in_miliseconds", - }, - }, - - "start_in_units": { - Type: pluginsdk.TypeInt, - Optional: true, - AtLeastOneOf: []string{ - "presentation_time_range.0.end_in_units", "presentation_time_range.0.force_end", "presentation_time_range.0.live_backoff_in_units", - "presentation_time_range.0.presentation_window_in_units", "presentation_time_range.0.start_in_units", "presentation_time_range.0.unit_timescale_in_miliseconds", - }, - }, - - "unit_timescale_in_miliseconds": { - Type: pluginsdk.TypeInt, - Optional: true, - AtLeastOneOf: []string{ - "presentation_time_range.0.end_in_units", "presentation_time_range.0.force_end", "presentation_time_range.0.live_backoff_in_units", - "presentation_time_range.0.presentation_window_in_units", "presentation_time_range.0.start_in_units", "presentation_time_range.0.unit_timescale_in_miliseconds", - }, - }, - }, - }, - }, - - "track_selection": { - Type: pluginsdk.TypeList, - Optional: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - //lintignore:XS003 - "condition": { - Type: pluginsdk.TypeList, - Required: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "operation": { - Type: pluginsdk.TypeString, - Optional: true, - }, - - "property": { - Type: pluginsdk.TypeString, - Optional: true, - }, - - "value": { - Type: pluginsdk.TypeString, - Optional: true, - }, - }, - }, - }, - }, - }, - }, - } -} - -func (AssetFilterV0ToV1) UpgradeFunc() pluginsdk.StateUpgraderFunc { - return func(ctx context.Context, rawState map[string]interface{}, meta interface{}) (map[string]interface{}, error) { - oldIdRaw := rawState["id"].(string) - oldId, err := assetsandassetfilters.ParseAssetFilterIDInsensitively(oldIdRaw) - if err != nil { - return nil, err - } - - newId := oldId.ID() - log.Printf("[DEBUG] Updating ID from %q to %q..", oldIdRaw, newId) - rawState["id"] = newId - - return rawState, nil - } -} diff --git a/internal/services/media/migration/asset_v0_to_v1.go b/internal/services/media/migration/asset_v0_to_v1.go deleted file mode 100644 index fb0906c1ed007..0000000000000 --- a/internal/services/media/migration/asset_v0_to_v1.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package migration - -import ( - "context" - "log" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -var _ pluginsdk.StateUpgrade = AssetV0ToV1{} - -type AssetV0ToV1 struct { -} - -func (AssetV0ToV1) Schema() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "resource_group_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "media_services_account_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "alternate_id": { - Type: pluginsdk.TypeString, - Optional: true, - }, - - "container": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - }, - - "description": { - Type: pluginsdk.TypeString, - Optional: true, - }, - - "storage_account_name": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - }, - } -} - -func (AssetV0ToV1) UpgradeFunc() pluginsdk.StateUpgraderFunc { - return func(ctx context.Context, rawState map[string]interface{}, meta interface{}) (map[string]interface{}, error) { - oldIdRaw := rawState["id"].(string) - oldId, err := assetsandassetfilters.ParseAssetIDInsensitively(oldIdRaw) - if err != nil { - return nil, err - } - - newId := oldId.ID() - log.Printf("[DEBUG] Updating ID from %q to %q..", oldIdRaw, newId) - rawState["id"] = newId - - return rawState, nil - } -} diff --git a/internal/services/media/migration/content_key_policy_v0_to_v1.go b/internal/services/media/migration/content_key_policy_v0_to_v1.go deleted file mode 100644 index d52aa08a0e0f6..0000000000000 --- a/internal/services/media/migration/content_key_policy_v0_to_v1.go +++ /dev/null @@ -1,325 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package migration - -import ( - "context" - "log" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -var _ pluginsdk.StateUpgrade = ContentKeyPolicyV0ToV1{} - -type ContentKeyPolicyV0ToV1 struct{} - -func (ContentKeyPolicyV0ToV1) Schema() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "resource_group_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "media_services_account_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "description": { - Type: pluginsdk.TypeString, - Optional: true, - }, - - "policy_option": { - Type: pluginsdk.TypeSet, - Required: true, - MinItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - }, - - "clear_key_configuration_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - }, - - "widevine_configuration_template": { - Type: pluginsdk.TypeString, - Optional: true, - }, - - //lintignore:XS003 - "playready_configuration_license": { - Type: pluginsdk.TypeList, - Optional: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "allow_test_devices": { - Type: pluginsdk.TypeBool, - Optional: true, - }, - - "begin_date": { - Type: pluginsdk.TypeString, - Optional: true, - }, - - "content_key_location_from_header_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - }, - - "content_key_location_from_key_id": { - Type: pluginsdk.TypeString, - Optional: true, - }, - - "content_type": { - Type: pluginsdk.TypeString, - Optional: true, - }, - - "expiration_date": { - Type: pluginsdk.TypeString, - Optional: true, - }, - - "grace_period": { - Type: pluginsdk.TypeString, - Optional: true, - Sensitive: true, - }, - - "license_type": { - Type: pluginsdk.TypeString, - Optional: true, - }, - - //lintignore:XS003 - "play_right": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "agc_and_color_stripe_restriction": { - Type: pluginsdk.TypeInt, - Optional: true, - }, - - "allow_passing_video_content_to_unknown_output": { - Type: pluginsdk.TypeString, - Optional: true, - }, - - "analog_video_opl": { - Type: pluginsdk.TypeInt, - Optional: true, - }, - - "compressed_digital_audio_opl": { - Type: pluginsdk.TypeInt, - Optional: true, - }, - - "digital_video_only_content_restriction": { - Type: pluginsdk.TypeBool, - Optional: true, - }, - - "first_play_expiration": { - Type: pluginsdk.TypeString, - Optional: true, - }, - - "image_constraint_for_analog_component_video_restriction": { - Type: pluginsdk.TypeBool, - Optional: true, - }, - - "image_constraint_for_analog_computer_monitor_restriction": { - Type: pluginsdk.TypeBool, - Optional: true, - }, - - "scms_restriction": { - Type: pluginsdk.TypeInt, - Optional: true, - }, - - "uncompressed_digital_audio_opl": { - Type: pluginsdk.TypeInt, - Optional: true, - }, - - "uncompressed_digital_video_opl": { - Type: pluginsdk.TypeInt, - Optional: true, - }, - }, - }, - }, - "relative_begin_date": { - Type: pluginsdk.TypeString, - Optional: true, - }, - - "relative_expiration_date": { - Type: pluginsdk.TypeString, - Optional: true, - }, - }, - }, - }, - //lintignore:XS003 - "fairplay_configuration": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "ask": { - Type: pluginsdk.TypeString, - Optional: true, - Sensitive: true, - }, - "pfx": { - Type: pluginsdk.TypeString, - Optional: true, - Sensitive: true, - }, - "pfx_password": { - Type: pluginsdk.TypeString, - Optional: true, - Sensitive: true, - }, - //lintignore:XS003 - "offline_rental_configuration": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "playback_duration_seconds": { - Type: pluginsdk.TypeInt, - Optional: true, - }, - "storage_duration_seconds": { - Type: pluginsdk.TypeInt, - Optional: true, - }, - }, - }, - }, - "rental_and_lease_key_type": { - Type: pluginsdk.TypeString, - Optional: true, - }, - "rental_duration_seconds": { - Type: pluginsdk.TypeInt, - Optional: true, - }, - }, - }, - }, - //lintignore:XS003 - "token_restriction": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "audience": { - Type: pluginsdk.TypeString, - Optional: true, - }, - "issuer": { - Type: pluginsdk.TypeString, - Optional: true, - }, - "token_type": { - Type: pluginsdk.TypeString, - Optional: true, - }, - "primary_symmetric_token_key": { - Type: pluginsdk.TypeString, - Optional: true, - Sensitive: true, - }, - "primary_rsa_token_key_exponent": { - Type: pluginsdk.TypeString, - Optional: true, - Sensitive: true, - }, - "primary_rsa_token_key_modulus": { - Type: pluginsdk.TypeString, - Optional: true, - Sensitive: true, - }, - "primary_x509_token_key_raw": { - Type: pluginsdk.TypeString, - Optional: true, - Sensitive: true, - }, - "open_id_connect_discovery_document": { - Type: pluginsdk.TypeString, - Optional: true, - }, - //lintignore:XS003 - "required_claim": { - Type: pluginsdk.TypeList, - Optional: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "type": { - Type: pluginsdk.TypeString, - Optional: true, - }, - "value": { - Type: pluginsdk.TypeString, - Optional: true, - }, - }, - }, - }, - }, - }, - }, - "open_restriction_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - }, - }, - }, - }, - } -} - -func (ContentKeyPolicyV0ToV1) UpgradeFunc() pluginsdk.StateUpgraderFunc { - return func(ctx context.Context, rawState map[string]interface{}, meta interface{}) (map[string]interface{}, error) { - oldIdRaw := rawState["id"].(string) - oldId, err := contentkeypolicies.ParseContentKeyPolicyIDInsensitively(oldIdRaw) - if err != nil { - return nil, err - } - - newId := oldId.ID() - log.Printf("[DEBUG] Updating ID from %q to %q..", oldIdRaw, newId) - rawState["id"] = newId - - return rawState, nil - } -} diff --git a/internal/services/media/migration/job_v0_to_v1.go b/internal/services/media/migration/job_v0_to_v1.go deleted file mode 100644 index fe7f2c5437cc8..0000000000000 --- a/internal/services/media/migration/job_v0_to_v1.go +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package migration - -import ( - "context" - "log" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -var _ pluginsdk.StateUpgrade = JobV0ToV1{} - -type JobV0ToV1 struct { -} - -func (JobV0ToV1) Schema() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "transform_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "media_services_account_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "resource_group_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "input_asset": { - Type: pluginsdk.TypeList, - Required: true, - ForceNew: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - "label": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - }, - }, - }, - }, - - "output_asset": { - Type: pluginsdk.TypeList, - Required: true, - ForceNew: true, - MinItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - "label": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - }, - }, - }, - }, - - "priority": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - Default: "Normal", - }, - - "description": { - Type: pluginsdk.TypeString, - Optional: true, - }, - } -} - -func (JobV0ToV1) UpgradeFunc() pluginsdk.StateUpgraderFunc { - return func(ctx context.Context, rawState map[string]interface{}, meta interface{}) (map[string]interface{}, error) { - oldIdRaw := rawState["id"].(string) - oldId, err := encodings.ParseJobIDInsensitively(oldIdRaw) - if err != nil { - return nil, err - } - - newId := oldId.ID() - log.Printf("[DEBUG] Updating ID from %q to %q..", oldIdRaw, newId) - rawState["id"] = newId - - return rawState, nil - } -} diff --git a/internal/services/media/migration/live_event_v0_to_v1.go b/internal/services/media/migration/live_event_v0_to_v1.go deleted file mode 100644 index 299a936e05ceb..0000000000000 --- a/internal/services/media/migration/live_event_v0_to_v1.go +++ /dev/null @@ -1,315 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package migration - -import ( - "context" - "log" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents" - "github.com/hashicorp/terraform-provider-azurerm/internal/tags" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -var _ pluginsdk.StateUpgrade = LiveEventV0ToV1{} - -type LiveEventV0ToV1 struct { -} - -func (LiveEventV0ToV1) Schema() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "resource_group_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "media_services_account_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "auto_start_enabled": { - Type: pluginsdk.TypeBool, - ForceNew: true, - Optional: true, - }, - - "location": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "input": { - Type: pluginsdk.TypeList, - Required: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - //lintignore:XS003 - "ip_access_control_allow": { - Type: pluginsdk.TypeList, - Optional: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "address": { - Type: pluginsdk.TypeString, - Optional: true, - }, - "name": { - Type: pluginsdk.TypeString, - Optional: true, - }, - "subnet_prefix_length": { - Type: pluginsdk.TypeInt, - Optional: true, - }, - }, - }, - AtLeastOneOf: []string{ - "input.0.ip_access_control_allow", "input.0.access_token", - "input.0.key_frame_interval_duration", "input.0.streaming_protocol", - }, - }, - - "access_token": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - AtLeastOneOf: []string{ - "input.0.ip_access_control_allow", "input.0.access_token", - "input.0.key_frame_interval_duration", "input.0.streaming_protocol", - }, - }, - - "endpoint": { - Type: pluginsdk.TypeList, - Computed: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "protocol": { - Type: pluginsdk.TypeString, - Computed: true, - }, - "url": { - Type: pluginsdk.TypeString, - Computed: true, - }, - }, - }, - }, - - "key_frame_interval_duration": { - Type: pluginsdk.TypeString, - Optional: true, - AtLeastOneOf: []string{ - "input.0.ip_access_control_allow", "input.0.access_token", - "input.0.key_frame_interval_duration", "input.0.streaming_protocol", - }, - }, - - "streaming_protocol": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - AtLeastOneOf: []string{ - "input.0.ip_access_control_allow", "input.0.access_token", - "input.0.key_frame_interval_duration", "input.0.streaming_protocol", - }, - }, - }, - }, - }, - - "cross_site_access_policy": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "client_access_policy": { - Type: pluginsdk.TypeString, - Optional: true, - AtLeastOneOf: []string{"cross_site_access_policy.0.client_access_policy", "cross_site_access_policy.0.cross_domain_policy"}, - }, - - "cross_domain_policy": { - Type: pluginsdk.TypeString, - Optional: true, - AtLeastOneOf: []string{"cross_site_access_policy.0.client_access_policy", "cross_site_access_policy.0.cross_domain_policy"}, - }, - }, - }, - }, - - "description": { - Type: pluginsdk.TypeString, - Optional: true, - }, - - "encoding": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "type": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - Default: "None", - }, - - "key_frame_interval": { - Type: pluginsdk.TypeString, - Optional: true, - Default: "PT2S", - }, - - "preset_name": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - }, - - "stretch_mode": { - Type: pluginsdk.TypeString, - Optional: true, - Default: "None", - }, - }, - }, - }, - - "hostname_prefix": { - Type: pluginsdk.TypeString, - Optional: true, - }, - - "preview": { - Type: pluginsdk.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - //lintignore:XS003 - "ip_access_control_allow": { - Type: pluginsdk.TypeList, - Optional: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "address": { - Type: pluginsdk.TypeString, - Optional: true, - }, - "name": { - Type: pluginsdk.TypeString, - Optional: true, - }, - "subnet_prefix_length": { - Type: pluginsdk.TypeInt, - Optional: true, - }, - }, - }, - AtLeastOneOf: []string{ - "preview.0.ip_access_control_allow", "preview.0.alternative_media_id", - "preview.0.preview_locator", "preview.0.streaming_policy_name", - }, - }, - - "alternative_media_id": { - Type: pluginsdk.TypeString, - Optional: true, - AtLeastOneOf: []string{ - "preview.0.ip_access_control_allow", "preview.0.alternative_media_id", - "preview.0.preview_locator", "preview.0.streaming_policy_name", - }, - }, - - "endpoint": { - Type: pluginsdk.TypeList, - Computed: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "protocol": { - Type: pluginsdk.TypeString, - Computed: true, - }, - "url": { - Type: pluginsdk.TypeString, - Computed: true, - }, - }, - }, - }, - - "preview_locator": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - AtLeastOneOf: []string{ - "preview.0.ip_access_control_allow", "preview.0.alternative_media_id", - "preview.0.preview_locator", "preview.0.streaming_policy_name", - }, - }, - - "streaming_policy_name": { - Type: pluginsdk.TypeString, - Computed: true, - Optional: true, - ForceNew: true, - AtLeastOneOf: []string{ - "preview.0.ip_access_control_allow", "preview.0.alternative_media_id", - "preview.0.preview_locator", "preview.0.streaming_policy_name", - }, - }, - }, - }, - }, - - "transcription_languages": { - Type: pluginsdk.TypeList, - Optional: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - }, - }, - - "use_static_hostname": { - Type: pluginsdk.TypeBool, - Optional: true, - ForceNew: true, - }, - - "tags": tags.Schema(), - } -} - -func (LiveEventV0ToV1) UpgradeFunc() pluginsdk.StateUpgraderFunc { - return func(ctx context.Context, rawState map[string]interface{}, meta interface{}) (map[string]interface{}, error) { - oldIdRaw := rawState["id"].(string) - oldId, err := liveevents.ParseLiveEventIDInsensitively(oldIdRaw) - if err != nil { - return nil, err - } - - newId := oldId.ID() - log.Printf("[DEBUG] Updating ID from %q to %q..", oldIdRaw, newId) - rawState["id"] = newId - - return rawState, nil - } -} diff --git a/internal/services/media/migration/live_output_v0_to_v1.go b/internal/services/media/migration/live_output_v0_to_v1.go deleted file mode 100644 index 59cb53f6fee17..0000000000000 --- a/internal/services/media/migration/live_output_v0_to_v1.go +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package migration - -import ( - "context" - "log" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -var _ pluginsdk.StateUpgrade = LiveOutputV0ToV1{} - -type LiveOutputV0ToV1 struct { -} - -func (LiveOutputV0ToV1) Schema() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "live_event_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "archive_window_duration": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "asset_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "description": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - }, - - "hls_fragments_per_ts_segment": { - Type: pluginsdk.TypeInt, - Optional: true, - ForceNew: true, - }, - - "manifest_name": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "output_snap_time_in_seconds": { - Type: pluginsdk.TypeInt, - Optional: true, - ForceNew: true, - }, - } -} - -func (LiveOutputV0ToV1) UpgradeFunc() pluginsdk.StateUpgraderFunc { - return func(ctx context.Context, rawState map[string]interface{}, meta interface{}) (map[string]interface{}, error) { - oldIdRaw := rawState["id"].(string) - oldId, err := liveoutputs.ParseLiveOutputIDInsensitively(oldIdRaw) - if err != nil { - return nil, err - } - - newId := oldId.ID() - log.Printf("[DEBUG] Updating ID from %q to %q..", oldIdRaw, newId) - rawState["id"] = newId - - return rawState, nil - } -} diff --git a/internal/services/media/migration/service_v0_to_v1.go b/internal/services/media/migration/service_v0_to_v1.go deleted file mode 100644 index e1fc99b285abe..0000000000000 --- a/internal/services/media/migration/service_v0_to_v1.go +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package migration - -import ( - "context" - "log" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -var _ pluginsdk.StateUpgrade = ServiceV0ToV1{} - -type ServiceV0ToV1 struct { -} - -func (ServiceV0ToV1) Schema() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "location": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "resource_group_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "storage_account": { - Type: pluginsdk.TypeSet, - Required: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "id": { - Type: pluginsdk.TypeString, - Required: true, - }, - - "is_primary": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: false, - }, - }, - }, - }, - - "identity": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - }, - "principal_id": { - Type: schema.TypeString, - Computed: true, - }, - "tenant_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - - "storage_authentication_type": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - }, - - "key_delivery_access_control": { - Type: pluginsdk.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "default_action": { - Type: pluginsdk.TypeString, - Optional: true, - }, - - "ip_allow_list": { - Type: pluginsdk.TypeSet, - Optional: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - }, - }, - }, - }, - }, - - "tags": { - Type: pluginsdk.TypeMap, - Optional: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - }, - }, - } -} - -func (ServiceV0ToV1) UpgradeFunc() pluginsdk.StateUpgraderFunc { - return func(ctx context.Context, rawState map[string]interface{}, meta interface{}) (map[string]interface{}, error) { - oldIdRaw := rawState["id"].(string) - oldId, err := accounts.ParseMediaServiceIDInsensitively(oldIdRaw) - if err != nil { - return nil, err - } - - newId := oldId.ID() - log.Printf("[DEBUG] Updating ID from %q to %q..", oldIdRaw, newId) - rawState["id"] = newId - - return rawState, nil - } -} diff --git a/internal/services/media/migration/streaming_endpoint_v0_to_v1.go b/internal/services/media/migration/streaming_endpoint_v0_to_v1.go deleted file mode 100644 index c27da5b4eefae..0000000000000 --- a/internal/services/media/migration/streaming_endpoint_v0_to_v1.go +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package migration - -import ( - "context" - "log" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -var _ pluginsdk.StateUpgrade = StreamingEndpointV0ToV1{} - -type StreamingEndpointV0ToV1 struct { -} - -func (StreamingEndpointV0ToV1) Schema() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "resource_group_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "media_services_account_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "auto_start_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - Computed: true, - }, - - "location": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "scale_units": { - Type: pluginsdk.TypeInt, - Required: true, - }, - - "access_control": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - //lintignore:XS003 - "akamai_signature_header_authentication_key": { - Type: pluginsdk.TypeList, - Optional: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "base64_key": { - Type: pluginsdk.TypeString, - Optional: true, - }, - "expiration": { - Type: pluginsdk.TypeString, - Optional: true, - }, - "identifier": { - Type: pluginsdk.TypeString, - Optional: true, - }, - }, - }, - AtLeastOneOf: []string{"access_control.0.akamai_signature_header_authentication_key", "access_control.0.ip_allow"}, - }, - //lintignore:XS003 - "ip_allow": { - Type: pluginsdk.TypeList, - Optional: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "address": { - Type: pluginsdk.TypeString, - Optional: true, - }, - "name": { - Type: pluginsdk.TypeString, - Optional: true, - }, - "subnet_prefix_length": { - Type: pluginsdk.TypeInt, - Optional: true, - }, - }, - }, - AtLeastOneOf: []string{"access_control.0.akamai_signature_header_authentication_key", "access_control.0.ip_allow"}, - }, - }, - }, - }, - - "cdn_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - }, - - "cdn_profile": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - }, - - "cdn_provider": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - }, - - "cross_site_access_policy": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "client_access_policy": { - Type: pluginsdk.TypeString, - Computed: true, - Optional: true, - AtLeastOneOf: []string{"cross_site_access_policy.0.client_access_policy", "cross_site_access_policy.0.cross_domain_policy"}, - }, - - "cross_domain_policy": { - Type: pluginsdk.TypeString, - Computed: true, - Optional: true, - AtLeastOneOf: []string{"cross_site_access_policy.0.client_access_policy", "cross_site_access_policy.0.cross_domain_policy"}, - }, - }, - }, - }, - - "custom_host_names": { - Type: pluginsdk.TypeSet, - Optional: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - }, - }, - - "description": { - Type: pluginsdk.TypeString, - Optional: true, - }, - - "max_cache_age_seconds": { - Type: pluginsdk.TypeInt, - Optional: true, - }, - - "host_name": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "tags": { - Type: pluginsdk.TypeMap, - Optional: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - }, - }, - } -} - -func (StreamingEndpointV0ToV1) UpgradeFunc() pluginsdk.StateUpgraderFunc { - return func(ctx context.Context, rawState map[string]interface{}, meta interface{}) (map[string]interface{}, error) { - oldIdRaw := rawState["id"].(string) - oldId, err := streamingendpoints.ParseStreamingEndpointIDInsensitively(oldIdRaw) - if err != nil { - return nil, err - } - - newId := oldId.ID() - log.Printf("[DEBUG] Updating ID from %q to %q..", oldIdRaw, newId) - rawState["id"] = newId - - return rawState, nil - } -} diff --git a/internal/services/media/migration/streaming_locator_v0_to_v1.go b/internal/services/media/migration/streaming_locator_v0_to_v1.go deleted file mode 100644 index ec4ae9d770a61..0000000000000 --- a/internal/services/media/migration/streaming_locator_v0_to_v1.go +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package migration - -import ( - "context" - "log" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -var _ pluginsdk.StateUpgrade = StreamingLocatorV0ToV1{} - -type StreamingLocatorV0ToV1 struct { -} - -func (StreamingLocatorV0ToV1) Schema() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "resource_group_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "media_services_account_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "asset_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "streaming_policy_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "alternative_media_id": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - }, - - //lintignore:XS003 - "content_key": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "content_key_id": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - }, - - "label_reference_in_streaming_policy": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - }, - - "policy_name": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - }, - - "type": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - }, - - "value": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - }, - }, - }, - }, - - "default_content_key_policy_name": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - }, - - "end_time": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "start_time": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - }, - - "streaming_locator_id": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - } -} - -func (StreamingLocatorV0ToV1) UpgradeFunc() pluginsdk.StateUpgraderFunc { - return func(ctx context.Context, rawState map[string]interface{}, meta interface{}) (map[string]interface{}, error) { - oldIdRaw := rawState["id"].(string) - oldId, err := streamingpoliciesandstreaminglocators.ParseStreamingLocatorIDInsensitively(oldIdRaw) - if err != nil { - return nil, err - } - - newId := oldId.ID() - log.Printf("[DEBUG] Updating ID from %q to %q..", oldIdRaw, newId) - rawState["id"] = newId - - return rawState, nil - } -} diff --git a/internal/services/media/migration/streaming_policy_v0_to_v1.go b/internal/services/media/migration/streaming_policy_v0_to_v1.go deleted file mode 100644 index 4ea6e955badf3..0000000000000 --- a/internal/services/media/migration/streaming_policy_v0_to_v1.go +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package migration - -import ( - "context" - "log" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -var _ pluginsdk.StateUpgrade = StreamingPolicyV0ToV1{} - -type StreamingPolicyV0ToV1 struct { -} - -func (StreamingPolicyV0ToV1) Schema() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "resource_group_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "media_services_account_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "no_encryption_enabled_protocols": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "dash": { - Type: pluginsdk.TypeBool, - Optional: true, - ForceNew: true, - }, - - "download": { - Type: pluginsdk.TypeBool, - Optional: true, - ForceNew: true, - }, - - "hls": { - Type: pluginsdk.TypeBool, - Optional: true, - ForceNew: true, - }, - - "smooth_streaming": { - Type: pluginsdk.TypeBool, - Optional: true, - ForceNew: true, - }, - }, - }, - }, - - "common_encryption_cenc": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "enabled_protocols": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "dash": { - Type: pluginsdk.TypeBool, - Optional: true, - ForceNew: true, - }, - - "download": { - Type: pluginsdk.TypeBool, - Optional: true, - ForceNew: true, - }, - - "hls": { - Type: pluginsdk.TypeBool, - Optional: true, - ForceNew: true, - }, - - "smooth_streaming": { - Type: pluginsdk.TypeBool, - Optional: true, - ForceNew: true, - }, - }, - }, - }, - - "drm_widevine_custom_license_acquisition_url_template": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - }, - - "drm_playready": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "custom_license_acquisition_url_template": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - AtLeastOneOf: []string{"common_encryption_cenc.0.drm_playready.0.custom_license_acquisition_url_template", "common_encryption_cenc.0.drm_playready.0.custom_attributes"}, - }, - - "custom_attributes": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - AtLeastOneOf: []string{"common_encryption_cenc.0.drm_playready.0.custom_license_acquisition_url_template", "common_encryption_cenc.0.drm_playready.0.custom_attributes"}, - }, - }, - }, - }, - - "default_content_key": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "label": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - }, - - "policy_name": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - }, - }, - }, - }, - }, - }, - }, - - "common_encryption_cbcs": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "enabled_protocols": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "dash": { - Type: pluginsdk.TypeBool, - Optional: true, - ForceNew: true, - }, - - "download": { - Type: pluginsdk.TypeBool, - Optional: true, - ForceNew: true, - }, - - "hls": { - Type: pluginsdk.TypeBool, - Optional: true, - ForceNew: true, - }, - - "smooth_streaming": { - Type: pluginsdk.TypeBool, - Optional: true, - ForceNew: true, - }, - }, - }, - }, - - "drm_fairplay": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "custom_license_acquisition_url_template": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - AtLeastOneOf: []string{"common_encryption_cbcs.0.drm_fairplay.0.custom_license_acquisition_url_template", "common_encryption_cbcs.0.drm_fairplay.0.allow_persistent_license"}, - }, - - "allow_persistent_license": { - Type: pluginsdk.TypeBool, - Optional: true, - ForceNew: true, - AtLeastOneOf: []string{"common_encryption_cbcs.0.drm_fairplay.0.custom_license_acquisition_url_template", "common_encryption_cbcs.0.drm_fairplay.0.allow_persistent_license"}, - }, - }, - }, - }, - - "default_content_key": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "label": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - }, - - "policy_name": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - }, - }, - }, - }, - }, - }, - }, - - "default_content_key_policy_name": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - }, - } -} - -func (StreamingPolicyV0ToV1) UpgradeFunc() pluginsdk.StateUpgraderFunc { - return func(ctx context.Context, rawState map[string]interface{}, meta interface{}) (map[string]interface{}, error) { - oldIdRaw := rawState["id"].(string) - oldId, err := streamingpoliciesandstreaminglocators.ParseStreamingPolicyIDInsensitively(oldIdRaw) - if err != nil { - return nil, err - } - - newId := oldId.ID() - log.Printf("[DEBUG] Updating ID from %q to %q..", oldIdRaw, newId) - rawState["id"] = newId - - return rawState, nil - } -} diff --git a/internal/services/media/migration/transform_v0_to_v1.go b/internal/services/media/migration/transform_v0_to_v1.go deleted file mode 100644 index 507feab0a6c2f..0000000000000 --- a/internal/services/media/migration/transform_v0_to_v1.go +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package migration - -import ( - "context" - "log" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -var _ pluginsdk.StateUpgrade = TransformV0ToV1{} - -type TransformV0ToV1 struct{} - -func (TransformV0ToV1) Schema() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "resource_group_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "media_services_account_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "description": { - Type: pluginsdk.TypeString, - Optional: true, - }, - - //lintignore:XS003 - "output": { - Type: pluginsdk.TypeList, - Optional: true, - MinItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "on_error_action": { - Type: pluginsdk.TypeString, - Optional: true, - }, - //lintignore:XS003 - "builtin_preset": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "preset_name": { - Type: pluginsdk.TypeString, - Optional: true, - }, - }, - }, - }, - //lintignore:XS003 - "audio_analyzer_preset": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "audio_language": { - Type: pluginsdk.TypeString, - Optional: true, - }, - "audio_analysis_mode": { - Type: pluginsdk.TypeString, - Optional: true, - }, - }, - }, - }, - //lintignore:XS003 - "video_analyzer_preset": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "audio_language": { - Type: pluginsdk.TypeString, - Optional: true, - }, - "audio_analysis_mode": { - Type: pluginsdk.TypeString, - Optional: true, - }, - "insights_type": { - Type: pluginsdk.TypeString, - Optional: true, - }, - }, - }, - }, - //lintignore:XS003 - "face_detector_preset": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "analysis_resolution": { - Type: pluginsdk.TypeString, - Optional: true, - }, - }, - }, - }, - "relative_priority": { - Type: pluginsdk.TypeString, - Optional: true, - }, - }, - }, - }, - } -} - -func (TransformV0ToV1) UpgradeFunc() pluginsdk.StateUpgraderFunc { - return func(ctx context.Context, rawState map[string]interface{}, meta interface{}) (map[string]interface{}, error) { - oldIdRaw := rawState["id"].(string) - oldId, err := encodings.ParseTransformIDInsensitively(oldIdRaw) - if err != nil { - return nil, err - } - - newId := oldId.ID() - log.Printf("[DEBUG] Updating ID from %q to %q..", oldIdRaw, newId) - rawState["id"] = newId - - return rawState, nil - } -} diff --git a/internal/services/media/registration.go b/internal/services/media/registration.go deleted file mode 100644 index 21cc3e62a03d4..0000000000000 --- a/internal/services/media/registration.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package media - -import ( - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -type Registration struct{} - -var ( - _ sdk.TypedServiceRegistrationWithAGitHubLabel = Registration{} - _ sdk.UntypedServiceRegistrationWithAGitHubLabel = Registration{} -) - -const ( - azureMediaRetirementMessage = "Azure Media Services will be retired June 30th, 2024. Please see https://learn.microsoft.com/en-us/azure/media-services/latest/azure-media-services-retirement. This resource is deprecated and will be removed in v4.0 of the AzureRM Provider." -) - -func (r Registration) AssociatedGitHubLabel() string { - return "service/media" -} - -// Name is the name of this Service -func (r Registration) Name() string { - return "Media" -} - -// WebsiteCategories returns a list of categories which can be used for the sidebar -func (r Registration) WebsiteCategories() []string { - return []string{ - "Media", - } -} - -// SupportedDataSources returns the supported Data Sources supported by this Service -func (r Registration) SupportedDataSources() map[string]*pluginsdk.Resource { - return map[string]*pluginsdk.Resource{} -} - -// SupportedResources returns the supported Resources supported by this Service -func (r Registration) SupportedResources() map[string]*pluginsdk.Resource { - if !features.FourPointOhBeta() { - return map[string]*pluginsdk.Resource{ - "azurerm_media_services_account": resourceMediaServicesAccount(), - "azurerm_media_asset": resourceMediaAsset(), - "azurerm_media_job": resourceMediaJob(), - "azurerm_media_streaming_endpoint": resourceMediaStreamingEndpoint(), - "azurerm_media_transform": resourceMediaTransform(), - "azurerm_media_streaming_locator": resourceMediaStreamingLocator(), - "azurerm_media_content_key_policy": resourceMediaContentKeyPolicy(), - "azurerm_media_streaming_policy": resourceMediaStreamingPolicy(), - "azurerm_media_live_event": resourceMediaLiveEvent(), - "azurerm_media_live_event_output": resourceMediaLiveOutput(), - "azurerm_media_asset_filter": resourceMediaAssetFilter(), - } - } - - return map[string]*pluginsdk.Resource{} -} - -func (r Registration) DataSources() []sdk.DataSource { - return []sdk.DataSource{} -} - -func (r Registration) Resources() []sdk.Resource { - return []sdk.Resource{ - AccountFilterResource{}, - } -} diff --git a/internal/services/media/validate/account_name.go b/internal/services/media/validate/account_name.go deleted file mode 100644 index 6e6c7ed4c9593..0000000000000 --- a/internal/services/media/validate/account_name.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "fmt" - "regexp" - "strings" -) - -func AccountName(i interface{}, k string) (warnings []string, errors []error) { - v, ok := i.(string) - if !ok { - errors = append(errors, fmt.Errorf("Expected %q to be a string but it wasn't!", k)) - return - } - - // The value must not be empty. - if strings.TrimSpace(v) == "" { - errors = append(errors, fmt.Errorf("%q must not be empty", k)) - return - } - - if matched := regexp.MustCompile(`^[-a-z0-9]{3,24}$`).Match([]byte(v)); !matched { - errors = append(errors, fmt.Errorf("%q must be 3 - 24 characters long, contain only lowercase letters and numbers.", k)) - } - - return warnings, errors -} diff --git a/internal/services/media/validate/live_event_name.go b/internal/services/media/validate/live_event_name.go deleted file mode 100644 index 98b8b46cb6e7f..0000000000000 --- a/internal/services/media/validate/live_event_name.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "fmt" - "regexp" - "strings" -) - -func LiveEventName(i interface{}, k string) (warnings []string, errors []error) { - v, ok := i.(string) - if !ok { - errors = append(errors, fmt.Errorf("Expected %q to be a string but it wasn't!", k)) - return - } - - // The value must not be empty. - if strings.TrimSpace(v) == "" { - errors = append(errors, fmt.Errorf("%q must not be empty", k)) - return - } - - // Live Event name can be 1-32 characters in length - const maxLength = 32 - if len(v) > maxLength { - errors = append(errors, fmt.Errorf("%q cannot exceed 32 characters.", k)) - } - - if matched := regexp.MustCompile(`^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$`).Match([]byte(v)); !matched { - errors = append(errors, fmt.Errorf("%q can contain letters, numbers, and hyphens (but the first and last character must be a letter or number).", k)) - } - - return warnings, errors -} diff --git a/internal/services/media/validate/streaming_endpoint_name.go b/internal/services/media/validate/streaming_endpoint_name.go deleted file mode 100644 index bb6730c907781..0000000000000 --- a/internal/services/media/validate/streaming_endpoint_name.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "fmt" - "regexp" - "strings" -) - -func StreamingEndpointName(i interface{}, k string) (warnings []string, errors []error) { - v, ok := i.(string) - if !ok { - errors = append(errors, fmt.Errorf("Expected %q to be a string but it wasn't!", k)) - return - } - - // The value must not be empty. - if strings.TrimSpace(v) == "" { - errors = append(errors, fmt.Errorf("%q must not be empty", k)) - return - } - - const maxLength = 32 - // Streaming endpoint name can be 1-32 characters in length - if len(v) > maxLength { - errors = append(errors, fmt.Errorf("%q cannot exceed 32 characters.", k)) - } - - if matched := regexp.MustCompile(`^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$`).Match([]byte(v)); !matched { - errors = append(errors, fmt.Errorf("%q can only contain alphanumeric characters and hyphens. Must not begin or end with hyphen.", k)) - } - - return warnings, errors -} diff --git a/internal/services/monitor/action_rule.go b/internal/services/monitor/action_rule.go deleted file mode 100644 index 3d67e7227cbe5..0000000000000 --- a/internal/services/monitor/action_rule.go +++ /dev/null @@ -1,309 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package monitor - -import ( - "context" - "fmt" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules" - "github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -const ( - scheduleDateLayout = "01/02/2006" - scheduleTimeLayout = "15:04:05" - scheduleDateTimeLayout = scheduleDateLayout + " " + scheduleTimeLayout -) - -var weekDays = []string{ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday", -} - -var weekDayMap = map[string]int{ - "Sunday": 0, - "Monday": 1, - "Tuesday": 2, - "Wednesday": 3, - "Thursday": 4, - "Friday": 5, - "Saturday": 6, -} - -func schemaActionRuleConditions() *pluginsdk.Schema { - return &pluginsdk.Schema{ - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "alert_context": schemaActionRuleCondition( - []string{ - string(actionrules.OperatorEquals), - string(actionrules.OperatorNotEquals), - string(actionrules.OperatorContains), - string(actionrules.OperatorDoesNotContain), - }, - nil, - ), - - "alert_rule_id": schemaActionRuleCondition( - []string{ - string(actionrules.OperatorEquals), - string(actionrules.OperatorNotEquals), - string(actionrules.OperatorContains), - string(actionrules.OperatorDoesNotContain), - }, nil, - ), - - "description": schemaActionRuleCondition( - []string{ - string(actionrules.OperatorEquals), - string(actionrules.OperatorNotEquals), - string(actionrules.OperatorContains), - string(actionrules.OperatorDoesNotContain), - }, - nil, - ), - - "monitor": schemaActionRuleCondition( - []string{ - string(actionrules.OperatorEquals), - string(actionrules.OperatorNotEquals), - }, - []string{ - string(alertsmanagements.MonitorConditionFired), - string(alertsmanagements.MonitorConditionResolved), - }, - ), - - "monitor_service": schemaActionRuleCondition( - []string{ - string(actionrules.OperatorEquals), - string(actionrules.OperatorNotEquals), - }, - // the supported type list is not consistent with the swagger and sdk - // https://github.com/Azure/azure-rest-api-specs/issues/9076 - // directly use string constant - []string{ - "ActivityLog Administrative", - "ActivityLog Autoscale", - "ActivityLog Policy", - "ActivityLog Recommendation", - "ActivityLog Security", - "Application Insights", - "Azure Backup", - "Custom", - "Azure Stack Edge", - "Data Box Gateway", - "Log Analytics", - "Platform", - "Resource Health", - "Smart Detector", - "Log Alerts V2", - "VM Insights - Health", - "Azure Stack Hub", - "Health Platform", - }, - ), - - "severity": schemaActionRuleCondition( - []string{ - string(actionrules.OperatorEquals), - string(actionrules.OperatorNotEquals), - }, - []string{ - string(actionrules.SeveritySevZero), - string(actionrules.SeveritySevOne), - string(actionrules.SeveritySevTwo), - string(actionrules.SeveritySevThree), - string(actionrules.SeveritySevFour), - }, - ), - - "target_resource_type": schemaActionRuleCondition( - []string{ - string(actionrules.OperatorEquals), - string(actionrules.OperatorNotEquals), - }, - nil, - ), - }, - }, - } -} - -func schemaActionRuleCondition(operatorValidateItems, valuesValidateItems []string) *pluginsdk.Schema { - operatorValidateFunc := validation.StringIsNotEmpty - valuesValidateFunc := validation.StringIsNotEmpty - if len(operatorValidateItems) > 0 { - operatorValidateFunc = validation.StringInSlice(operatorValidateItems, false) - } - if len(valuesValidateItems) > 0 { - valuesValidateFunc = validation.StringInSlice(valuesValidateItems, false) - } - - return &pluginsdk.Schema{ - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "operator": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: operatorValidateFunc, - }, - - "values": { - Type: pluginsdk.TypeSet, - Required: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - ValidateFunc: valuesValidateFunc, - }, - }, - }, - }, - } -} - -func expandActionRuleCondition(input []interface{}) *actionrules.Condition { - if len(input) == 0 { - return nil - } - - v := input[0].(map[string]interface{}) - return &actionrules.Condition{ - Operator: pointer.To(actionrules.Operator(v["operator"].(string))), - Values: utils.ExpandStringSlice(v["values"].(*pluginsdk.Set).List()), - } -} - -func expandActionRuleScope(input []interface{}) *actionrules.Scope { - if len(input) == 0 { - return nil - } - - v := input[0].(map[string]interface{}) - return &actionrules.Scope{ - ScopeType: pointer.To(actionrules.ScopeType(v["type"].(string))), - Values: utils.ExpandStringSlice(v["resource_ids"].(*pluginsdk.Set).List()), - } -} - -func expandActionRuleConditions(input []interface{}) *actionrules.Conditions { - if len(input) == 0 { - return nil - } - v := input[0].(map[string]interface{}) - - return &actionrules.Conditions{ - AlertContext: expandActionRuleCondition(v["alert_context"].([]interface{})), - AlertRuleId: expandActionRuleCondition(v["alert_rule_id"].([]interface{})), - Description: expandActionRuleCondition(v["description"].([]interface{})), - MonitorCondition: expandActionRuleCondition(v["monitor"].([]interface{})), - MonitorService: expandActionRuleCondition(v["monitor_service"].([]interface{})), - Severity: expandActionRuleCondition(v["severity"].([]interface{})), - TargetResourceType: expandActionRuleCondition(v["target_resource_type"].([]interface{})), - } -} - -func flattenActionRuleCondition(input *actionrules.Condition) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - var operator string - if input.Operator != nil { - operator = string(*input.Operator) - } - return []interface{}{ - map[string]interface{}{ - "operator": operator, - "values": utils.FlattenStringSlice(input.Values), - }, - } -} - -func flattenActionRuleScope(input *actionrules.Scope) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - var scopeType actionrules.ScopeType - if input.ScopeType != nil { - scopeType = *input.ScopeType - } - return []interface{}{ - map[string]interface{}{ - "type": scopeType, - "resource_ids": utils.FlattenStringSlice(input.Values), - }, - } -} - -func flattenActionRuleConditions(input *actionrules.Conditions) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - return []interface{}{ - map[string]interface{}{ - "alert_context": flattenActionRuleCondition(input.AlertContext), - "alert_rule_id": flattenActionRuleCondition(input.AlertRuleId), - "description": flattenActionRuleCondition(input.Description), - "monitor": flattenActionRuleCondition(input.MonitorCondition), - "monitor_service": flattenActionRuleCondition(input.MonitorService), - "severity": flattenActionRuleCondition(input.Severity), - "target_resource_type": flattenActionRuleCondition(input.TargetResourceType), - }, - } -} - -func importMonitorActionRule(actionRuleType actionrules.ActionRuleType) pluginsdk.ImporterFunc { - return func(ctx context.Context, d *pluginsdk.ResourceData, meta interface{}) (data []*pluginsdk.ResourceData, err error) { - id, err := actionrules.ParseActionRuleID(d.Id()) - if err != nil { - return nil, err - } - - client := meta.(*clients.Client).Monitor.ActionRulesClient - - actionRule, err := client.GetByName(ctx, *id) - if err != nil { - return nil, fmt.Errorf("retrieving %s: %+v", id, err) - } - - if actionRule.Model == nil { - return nil, fmt.Errorf("retrieving %s: `properties` was nil", id) - } - - var t actionrules.ActionRuleType - switch actionRule.Model.Properties.(type) { - case actionrules.Suppression: - t = actionrules.ActionRuleTypeSuppression - case actionrules.ActionGroup: - t = actionrules.ActionRuleTypeActionGroup - case actionrules.Diagnostics: - t = actionrules.ActionRuleTypeDiagnostics - } - - if t != actionRuleType { - return nil, fmt.Errorf("%s has mismatched kind, expected: %q, got %q", id, actionRuleType, t) - } - - return []*pluginsdk.ResourceData{d}, nil - } -} diff --git a/internal/services/monitor/alert_processing_rule.go b/internal/services/monitor/alert_processing_rule.go index 0c958b9b71042..43f898d7f2f3b 100644 --- a/internal/services/monitor/alert_processing_rule.go +++ b/internal/services/monitor/alert_processing_rule.go @@ -71,7 +71,7 @@ func schemaAlertProcessingRule() map[string]*pluginsdk.Schema { Type: pluginsdk.TypeString, Required: true, ForceNew: true, - ValidateFunc: validate.ActionRuleName, + ValidateFunc: validate.AlertProcessingRuleName, }, "resource_group_name": commonschema.ResourceGroupName(), @@ -105,31 +105,39 @@ func schemaAlertProcessingRule() map[string]*pluginsdk.Schema { Schema: map[string]*pluginsdk.Schema{ "alert_context": schemaAlertProcessingRuleCondition( alertprocessingrules.PossibleValuesForOperator(), nil, - []string{"condition.0.alert_context", "condition.0.alert_rule_id", "condition.0.alert_rule_name", + []string{ + "condition.0.alert_context", "condition.0.alert_rule_id", "condition.0.alert_rule_name", "condition.0.description", "condition.0.monitor_condition", "condition.0.monitor_service", "condition.0.severity", "condition.0.signal_type", "condition.0.target_resource", - "condition.0.target_resource_group", "condition.0.target_resource_type"}, + "condition.0.target_resource_group", "condition.0.target_resource_type", + }, ), "alert_rule_id": schemaAlertProcessingRuleCondition( alertprocessingrules.PossibleValuesForOperator(), nil, - []string{"condition.0.alert_context", "condition.0.alert_rule_id", "condition.0.alert_rule_name", + []string{ + "condition.0.alert_context", "condition.0.alert_rule_id", "condition.0.alert_rule_name", "condition.0.description", "condition.0.monitor_condition", "condition.0.monitor_service", "condition.0.severity", "condition.0.signal_type", "condition.0.target_resource", - "condition.0.target_resource_group", "condition.0.target_resource_type"}, + "condition.0.target_resource_group", "condition.0.target_resource_type", + }, ), "alert_rule_name": schemaAlertProcessingRuleCondition( alertprocessingrules.PossibleValuesForOperator(), nil, - []string{"condition.0.alert_context", "condition.0.alert_rule_id", "condition.0.alert_rule_name", + []string{ + "condition.0.alert_context", "condition.0.alert_rule_id", "condition.0.alert_rule_name", "condition.0.description", "condition.0.monitor_condition", "condition.0.monitor_service", "condition.0.severity", "condition.0.signal_type", "condition.0.target_resource", - "condition.0.target_resource_group", "condition.0.target_resource_type"}, + "condition.0.target_resource_group", "condition.0.target_resource_type", + }, ), "description": schemaAlertProcessingRuleCondition( alertprocessingrules.PossibleValuesForOperator(), nil, - []string{"condition.0.alert_context", "condition.0.alert_rule_id", "condition.0.alert_rule_name", + []string{ + "condition.0.alert_context", "condition.0.alert_rule_id", "condition.0.alert_rule_name", "condition.0.description", "condition.0.monitor_condition", "condition.0.monitor_service", "condition.0.severity", "condition.0.signal_type", "condition.0.target_resource", - "condition.0.target_resource_group", "condition.0.target_resource_type"}, + "condition.0.target_resource_group", "condition.0.target_resource_type", + }, ), "monitor_condition": schemaAlertProcessingRuleCondition( []string{ @@ -140,10 +148,12 @@ func schemaAlertProcessingRule() map[string]*pluginsdk.Schema { "Fired", "Resolved", }, - []string{"condition.0.alert_context", "condition.0.alert_rule_id", "condition.0.alert_rule_name", + []string{ + "condition.0.alert_context", "condition.0.alert_rule_id", "condition.0.alert_rule_name", "condition.0.description", "condition.0.monitor_condition", "condition.0.monitor_service", "condition.0.severity", "condition.0.signal_type", "condition.0.target_resource", - "condition.0.target_resource_group", "condition.0.target_resource_type"}, + "condition.0.target_resource_group", "condition.0.target_resource_type", + }, ), "monitor_service": schemaAlertProcessingRuleCondition( []string{ @@ -174,10 +184,12 @@ func schemaAlertProcessingRule() map[string]*pluginsdk.Schema { "Smart Detector", "VM Insights - Health", }, - []string{"condition.0.alert_context", "condition.0.alert_rule_id", "condition.0.alert_rule_name", + []string{ + "condition.0.alert_context", "condition.0.alert_rule_id", "condition.0.alert_rule_name", "condition.0.description", "condition.0.monitor_condition", "condition.0.monitor_service", "condition.0.severity", "condition.0.signal_type", "condition.0.target_resource", - "condition.0.target_resource_group", "condition.0.target_resource_type"}, + "condition.0.target_resource_group", "condition.0.target_resource_type", + }, ), "severity": schemaAlertProcessingRuleCondition( []string{ @@ -191,10 +203,12 @@ func schemaAlertProcessingRule() map[string]*pluginsdk.Schema { "Sev3", "Sev4", }, - []string{"condition.0.alert_context", "condition.0.alert_rule_id", "condition.0.alert_rule_name", + []string{ + "condition.0.alert_context", "condition.0.alert_rule_id", "condition.0.alert_rule_name", "condition.0.description", "condition.0.monitor_condition", "condition.0.monitor_service", "condition.0.severity", "condition.0.signal_type", "condition.0.target_resource", - "condition.0.target_resource_group", "condition.0.target_resource_type"}, + "condition.0.target_resource_group", "condition.0.target_resource_type", + }, ), "signal_type": schemaAlertProcessingRuleCondition( []string{ @@ -207,24 +221,30 @@ func schemaAlertProcessingRule() map[string]*pluginsdk.Schema { "Unknown", "Health", }, - []string{"condition.0.alert_context", "condition.0.alert_rule_id", "condition.0.alert_rule_name", + []string{ + "condition.0.alert_context", "condition.0.alert_rule_id", "condition.0.alert_rule_name", "condition.0.description", "condition.0.monitor_condition", "condition.0.monitor_service", "condition.0.severity", "condition.0.signal_type", "condition.0.target_resource", - "condition.0.target_resource_group", "condition.0.target_resource_type"}, + "condition.0.target_resource_group", "condition.0.target_resource_type", + }, ), "target_resource": schemaAlertProcessingRuleCondition( alertprocessingrules.PossibleValuesForOperator(), nil, - []string{"condition.0.alert_context", "condition.0.alert_rule_id", "condition.0.alert_rule_name", + []string{ + "condition.0.alert_context", "condition.0.alert_rule_id", "condition.0.alert_rule_name", "condition.0.description", "condition.0.monitor_condition", "condition.0.monitor_service", "condition.0.severity", "condition.0.signal_type", "condition.0.target_resource", - "condition.0.target_resource_group", "condition.0.target_resource_type"}, + "condition.0.target_resource_group", "condition.0.target_resource_type", + }, ), "target_resource_group": schemaAlertProcessingRuleCondition( alertprocessingrules.PossibleValuesForOperator(), nil, - []string{"condition.0.alert_context", "condition.0.alert_rule_id", "condition.0.alert_rule_name", + []string{ + "condition.0.alert_context", "condition.0.alert_rule_id", "condition.0.alert_rule_name", "condition.0.description", "condition.0.monitor_condition", "condition.0.monitor_service", "condition.0.severity", "condition.0.signal_type", "condition.0.target_resource", - "condition.0.target_resource_group", "condition.0.target_resource_type"}, + "condition.0.target_resource_group", "condition.0.target_resource_type", + }, ), "target_resource_type": schemaAlertProcessingRuleCondition( []string{ @@ -232,10 +252,12 @@ func schemaAlertProcessingRule() map[string]*pluginsdk.Schema { string(alertprocessingrules.OperatorNotEquals), }, nil, - []string{"condition.0.alert_context", "condition.0.alert_rule_id", "condition.0.alert_rule_name", + []string{ + "condition.0.alert_context", "condition.0.alert_rule_id", "condition.0.alert_rule_name", "condition.0.description", "condition.0.monitor_condition", "condition.0.monitor_service", "condition.0.severity", "condition.0.signal_type", "condition.0.target_resource", - "condition.0.target_resource_group", "condition.0.target_resource_type"}, + "condition.0.target_resource_group", "condition.0.target_resource_type", + }, ), }, }, diff --git a/internal/services/monitor/client/client.go b/internal/services/monitor/client/client.go index f7d7e933dd7e1..010324f1c85cd 100644 --- a/internal/services/monitor/client/client.go +++ b/internal/services/monitor/client/client.go @@ -6,13 +6,11 @@ package client import ( "fmt" - "github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules" "github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules" "github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules" "github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups" "github.com/hashicorp/go-azure-sdk/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings" "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2015-04-01/activitylogs" - "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles" "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2018-03-01/metricalerts" scheduledqueryrules2018 "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2018-04-16/scheduledqueryrules" "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources" @@ -38,7 +36,6 @@ type Client struct { AutoscaleSettingsClient *autoscalesettings.AutoScaleSettingsClient // alerts management - ActionRulesClient *actionrules.ActionRulesClient AlertProcessingRulesClient *alertprocessingrules.AlertProcessingRulesClient SmartDetectorAlertRulesClient *smartdetectoralertrules.SmartDetectorAlertRulesClient @@ -52,7 +49,6 @@ type Client struct { DataCollectionRulesClient *datacollectionrules.DataCollectionRulesClient DiagnosticSettingsClient *diagnosticSettingClient.DiagnosticSettingsClient DiagnosticSettingsCategoryClient *diagnosticCategoryClient.DiagnosticSettingsCategoriesClient - LogProfilesClient *logprofiles.LogProfilesClient MetricAlertsClient *metricalerts.MetricAlertsClient PrivateLinkScopesClient *privatelinkscopesapis.PrivateLinkScopesAPIsClient PrivateLinkScopedResourcesClient *privatelinkscopedresources.PrivateLinkScopedResourcesClient @@ -74,12 +70,6 @@ func NewClient(o *common.ClientOptions) (*Client, error) { } o.Configure(AutoscaleSettingsClient.Client, o.Authorizers.ResourceManager) - ActionRulesClient, err := actionrules.NewActionRulesClientWithBaseURI(o.Environment.ResourceManager) - if err != nil { - return nil, fmt.Errorf("building Action Rules client: %+v", err) - } - o.Configure(ActionRulesClient.Client, o.Authorizers.ResourceManager) - alertProcessingRulesClient, err := alertprocessingrules.NewAlertProcessingRulesClientWithBaseURI(o.Environment.ResourceManager) if err != nil { return nil, fmt.Errorf("building AlertProcessingRules client: %+v", err) @@ -146,12 +136,6 @@ func NewClient(o *common.ClientOptions) (*Client, error) { } o.Configure(DiagnosticSettingsCategoryClient.Client, o.Authorizers.ResourceManager) - LogProfilesClient, err := logprofiles.NewLogProfilesClientWithBaseURI(o.Environment.ResourceManager) - if err != nil { - return nil, fmt.Errorf("building Log Profiles client: %+v", err) - } - o.Configure(LogProfilesClient.Client, o.Authorizers.ResourceManager) - MetricAlertsClient, err := metricalerts.NewMetricAlertsClientWithBaseURI(o.Environment.ResourceManager) if err != nil { return nil, fmt.Errorf("building Metric Alerts client: %+v", err) @@ -191,7 +175,6 @@ func NewClient(o *common.ClientOptions) (*Client, error) { return &Client{ AADDiagnosticSettingsClient: aadDiagnosticSettingsClient, AutoscaleSettingsClient: AutoscaleSettingsClient, - ActionRulesClient: ActionRulesClient, SmartDetectorAlertRulesClient: SmartDetectorAlertRulesClient, ActionGroupsClient: ActionGroupsClient, ActivityLogsClient: activityLogsClient, @@ -203,7 +186,6 @@ func NewClient(o *common.ClientOptions) (*Client, error) { DataCollectionRulesClient: DataCollectionRulesClient, DiagnosticSettingsClient: DiagnosticSettingsClient, DiagnosticSettingsCategoryClient: DiagnosticSettingsCategoryClient, - LogProfilesClient: LogProfilesClient, MetricAlertsClient: MetricAlertsClient, PrivateLinkScopesClient: PrivateLinkScopesClient, PrivateLinkScopedResourcesClient: PrivateLinkScopedResourcesClient, diff --git a/internal/services/monitor/migration/log_profile.go b/internal/services/monitor/migration/log_profile.go deleted file mode 100644 index 82859f42987ed..0000000000000 --- a/internal/services/monitor/migration/log_profile.go +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package migration - -import ( - "context" - "fmt" - "log" - "strings" - - "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -var _ pluginsdk.StateUpgrade = LogProfileUpgradeV0ToV1{} - -type LogProfileUpgradeV0ToV1 struct{} - -func (LogProfileUpgradeV0ToV1) Schema() map[string]*pluginsdk.Schema { - return logProfileSchemaForV0AndV1() -} - -func (LogProfileUpgradeV0ToV1) UpgradeFunc() pluginsdk.StateUpgraderFunc { - return func(ctx context.Context, rawState map[string]interface{}, meta interface{}) (map[string]interface{}, error) { - // old - // /subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/profile1 - // new: - // /subscriptions/{subscriptionId}/providers/Microsoft.Insights/logProfiles/profile1 - oldId := rawState["id"].(string) - oldIdComponents := strings.Split(oldId, "/") - - if len(oldIdComponents) == 0 { - return rawState, fmt.Errorf("old log profile id is empty or not formatted correctly: %s", oldId) - } - - if len(oldIdComponents) != 7 { - return rawState, fmt.Errorf("log profile id should have 6 segments, got %d: %s", len(oldIdComponents)-1, oldId) - } - - newId := logprofiles.NewLogProfileID(oldIdComponents[2], oldIdComponents[6]) - - log.Printf("[DEBUG] Updating ID from %q to %q", oldId, newId.ID()) - - rawState["id"] = newId.ID() - - return rawState, nil - } -} - -func logProfileSchemaForV0AndV1() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - }, - "storage_account_id": { - Type: pluginsdk.TypeString, - Optional: true, - }, - "servicebus_rule_id": { - Type: pluginsdk.TypeString, - Optional: true, - }, - "locations": { - Type: pluginsdk.TypeSet, - MinItems: 1, - Required: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - }, - Set: pluginsdk.HashString, - }, - "categories": { - Type: pluginsdk.TypeSet, - Required: true, - MinItems: 1, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - }, - Set: pluginsdk.HashString, - }, - "retention_policy": { - Type: pluginsdk.TypeList, - Required: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "enabled": { - Type: pluginsdk.TypeBool, - Required: true, - }, - "days": { - Type: pluginsdk.TypeInt, - Optional: true, - }, - }, - }, - }, - } -} diff --git a/internal/services/monitor/migration/log_profile_test.go b/internal/services/monitor/migration/log_profile_test.go deleted file mode 100644 index 35e0389d6dead..0000000000000 --- a/internal/services/monitor/migration/log_profile_test.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package migration - -import ( - "context" - "testing" - - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func TestLogProfileV0ToV1(t *testing.T) { - testData := []struct { - name string - input map[string]interface{} - expected *string - }{ - { - name: "old id", - input: map[string]interface{}{ - "id": "/subscriptions/12345678-1234-5678-1234-123456789012/providers/microsoft.insights/logprofiles/profile1", - }, - expected: utils.String("/subscriptions/12345678-1234-5678-1234-123456789012/providers/Microsoft.Insights/logProfiles/profile1"), - }, - { - name: "old id - mixed case", - input: map[string]interface{}{ - "id": "/subscriptions/12345678-1234-5678-1234-123456789012/providers/microsoft.insights/LogProfiles/profile1", - }, - expected: utils.String("/subscriptions/12345678-1234-5678-1234-123456789012/providers/Microsoft.Insights/logProfiles/profile1"), - }, - { - name: "new id", - input: map[string]interface{}{ - "id": "/subscriptions/12345678-1234-5678-1234-123456789012/providers/Microsoft.Insights/logProfiles/profile1", - }, - expected: utils.String("/subscriptions/12345678-1234-5678-1234-123456789012/providers/Microsoft.Insights/logProfiles/profile1"), - }, - } - for _, test := range testData { - t.Logf("Testing %q...", test.name) - result, err := LogProfileUpgradeV0ToV1{}.UpgradeFunc()(context.TODO(), test.input, nil) - if err != nil && test.expected == nil { - continue - } else { - if err == nil && test.expected == nil { - t.Fatalf("Expected an error but didn't get one") - } else if err != nil && test.expected != nil { - t.Fatalf("Expected no error but got: %+v", err) - } - } - - actualId := result["id"].(string) - if *test.expected != actualId { - t.Fatalf("expected %q but got %q!", *test.expected, actualId) - } - } -} diff --git a/internal/services/monitor/monitor_aad_diagnostic_setting_resource.go b/internal/services/monitor/monitor_aad_diagnostic_setting_resource.go index fcb0c4a668d23..5d6d9c781a734 100644 --- a/internal/services/monitor/monitor_aad_diagnostic_setting_resource.go +++ b/internal/services/monitor/monitor_aad_diagnostic_setting_resource.go @@ -20,7 +20,6 @@ import ( "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/services/monitor/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" @@ -90,7 +89,6 @@ func resourceMonitorAADDiagnosticSetting() *pluginsdk.Resource { "enabled_log": { Type: pluginsdk.TypeSet, Optional: true, - Computed: !features.FourPointOhBeta(), Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ "category": { @@ -125,53 +123,6 @@ func resourceMonitorAADDiagnosticSetting() *pluginsdk.Resource { }, } - if !features.FourPointOhBeta() { - resource.Schema["enabled_log"].ExactlyOneOf = []string{"enabled_log", "log"} - resource.Schema["log"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeSet, - Optional: true, - Computed: true, - Deprecated: "`log` has been superseded by `enabled_log` and will be removed in version 4.0 of the AzureRM Provider.", - ExactlyOneOf: []string{"enabled_log", "log"}, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "category": { - Type: pluginsdk.TypeString, - Required: true, - }, - - "enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: true, - }, - - "retention_policy": { - Type: pluginsdk.TypeList, - Required: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: false, - }, - - "days": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - Default: 0, - }, - }, - }, - }, - }, - }, - } - } - return resource } @@ -196,20 +147,6 @@ func resourceMonitorAADDiagnosticSettingCreate(d *pluginsdk.ResourceData, meta i // Therefore, ensure users has at least one enabled log entry. valid := false var logs []diagnosticsettings.LogSettings - - if !features.FourPointOhBeta() { - if logsRaw, ok := d.GetOk("log"); ok && len(logsRaw.(*pluginsdk.Set).List()) > 0 { - logs = expandMonitorAADDiagnosticsSettingsLogs(d.Get("log").(*pluginsdk.Set).List()) - - for _, v := range logs { - if v.Enabled { - valid = true - break - } - } - } - } - if enabledLogs, ok := d.GetOk("enabled_log"); ok && len(enabledLogs.(*pluginsdk.Set).List()) > 0 { logs = expandMonitorAADDiagnosticsSettingsEnabledLogs(enabledLogs.(*pluginsdk.Set).List()) valid = true @@ -273,19 +210,6 @@ func resourceMonitorAADDiagnosticSettingUpdate(d *pluginsdk.ResourceData, meta i logsChanged := false valid := false - if !features.FourPointOhBeta() { - if d.HasChange("log") { - logsChanged = true - logs = expandMonitorAADDiagnosticsSettingsLogs(d.Get("log").(*pluginsdk.Set).List()) - for _, v := range logs { - if v.Enabled { - valid = true - break - } - } - } - } - if d.HasChange("enabled_log") { logsChanged = true logs = append(logs, expandMonitorAADDiagnosticsSettingsEnabledLogs(d.Get("enabled_log").(*pluginsdk.Set).List())...) @@ -399,12 +323,6 @@ func resourceMonitorAADDiagnosticSettingRead(d *pluginsdk.ResourceData, meta int if err := d.Set("enabled_log", flattenMonitorAADDiagnosticEnabledLogs(props.Logs)); err != nil { return fmt.Errorf("setting `enabled_log`: %+v", err) } - - if !features.FourPointOhBeta() { - if err := d.Set("log", flattenMonitorAADDiagnosticLogs(props.Logs)); err != nil { - return fmt.Errorf("setting `log`: %+v", err) - } - } } } @@ -438,38 +356,6 @@ func resourceMonitorAADDiagnosticSettingDelete(d *pluginsdk.ResourceData, meta i return nil } -func expandMonitorAADDiagnosticsSettingsLogs(input []interface{}) []diagnosticsettings.LogSettings { - results := make([]diagnosticsettings.LogSettings, 0) - - for _, raw := range input { - if raw == nil { - continue - } - v := raw.(map[string]interface{}) - - category := v["category"].(string) - enabled := v["enabled"].(bool) - - policyRaw := v["retention_policy"].([]interface{})[0].(map[string]interface{}) - if len(v["retention_policy"].([]interface{})) == 0 || v["retention_policy"].([]interface{})[0] == nil { - continue - } - retentionDays := policyRaw["days"].(int) - retentionEnabled := policyRaw["enabled"].(bool) - - results = append(results, diagnosticsettings.LogSettings{ - Category: pointer.To(diagnosticsettings.Category(category)), - Enabled: enabled, - RetentionPolicy: &diagnosticsettings.RetentionPolicy{ - Days: int64(retentionDays), - Enabled: retentionEnabled, - }, - }) - } - - return results -} - func expandMonitorAADDiagnosticsSettingsEnabledLogs(input []interface{}) []diagnosticsettings.LogSettings { results := make([]diagnosticsettings.LogSettings, 0) @@ -500,35 +386,6 @@ func expandMonitorAADDiagnosticsSettingsEnabledLogs(input []interface{}) []diagn return results } -func flattenMonitorAADDiagnosticLogs(input *[]diagnosticsettings.LogSettings) []interface{} { - results := make([]interface{}, 0) - if input == nil { - return results - } - - for _, v := range *input { - policies := make([]interface{}, 0) - if inputPolicy := v.RetentionPolicy; inputPolicy != nil { - policies = append(policies, map[string]interface{}{ - "days": int(inputPolicy.Days), - "enabled": inputPolicy.Enabled, - }) - } - - category := "" - if v.Category != nil { - category = string(*v.Category) - } - results = append(results, map[string]interface{}{ - "category": category, - "enabled": v.Enabled, - "retention_policy": policies, - }) - } - - return results -} - func flattenMonitorAADDiagnosticEnabledLogs(input *[]diagnosticsettings.LogSettings) []interface{} { results := make([]interface{}, 0) if input == nil { diff --git a/internal/services/monitor/monitor_aad_diagnostic_setting_resource_test.go b/internal/services/monitor/monitor_aad_diagnostic_setting_resource_test.go index 76d8bdc961074..cdb2d1be9a215 100644 --- a/internal/services/monitor/monitor_aad_diagnostic_setting_resource_test.go +++ b/internal/services/monitor/monitor_aad_diagnostic_setting_resource_test.go @@ -6,14 +6,12 @@ package monitor_test import ( "context" "fmt" - "regexp" "testing" "github.com/hashicorp/go-azure-sdk/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -34,7 +32,6 @@ func TestAccMonitorAADDiagnosticSetting(t *testing.T) { "storageAccount": testAccMonitorAADDiagnosticSetting_storageAccount, "storageAccountUpdate": testAccMonitorAADDiagnosticSetting_updateToEnabledLog, "updateEnabledLog": testAccMonitorAADDiagnosticSetting_updateEnabledLog, - "updateToDisabled": testAccMonitorAADDiagnosticSetting_updateToDisabled, // remove this test in 4.0 version }, } @@ -192,28 +189,6 @@ func testAccMonitorAADDiagnosticSetting_updateEnabledLog(t *testing.T) { }) } -func testAccMonitorAADDiagnosticSetting_updateToDisabled(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_monitor_aad_diagnostic_setting", "test") - r := MonitorAADDiagnosticSettingResource{} - - if features.FourPointOhBeta() { - t.Skip("remove this test in 4.0 version") - } - data.ResourceSequentialTest(t, r, []acceptance.TestStep{ - { - Config: r.storageAccount(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.disabled(data), - ExpectError: regexp.MustCompile("at least one of the `log`"), - }, - }) -} - func (t MonitorAADDiagnosticSettingResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { id, err := diagnosticsettings.ParseDiagnosticSettingID(state.ID) if err != nil { @@ -495,129 +470,6 @@ resource "azurerm_monitor_aad_diagnostic_setting" "test" { } func (MonitorAADDiagnosticSettingResource) storageAccount(data acceptance.TestData) string { - if !features.FourPointOhBeta() { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%[1]d" - location = "%[2]s" -} - -resource "azurerm_storage_account" "test" { - name = "acctestsa%[3]s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_kind = "StorageV2" - account_replication_type = "LRS" -} - -resource "azurerm_monitor_aad_diagnostic_setting" "test" { - name = "acctest-DS-%[1]d" - storage_account_id = azurerm_storage_account.test.id - log { - category = "SignInLogs" - enabled = true - retention_policy { - enabled = true - days = 1 - } - } - log { - category = "AuditLogs" - enabled = true - retention_policy { - enabled = true - days = 1 - } - } - log { - category = "NonInteractiveUserSignInLogs" - enabled = true - retention_policy { - enabled = true - days = 1 - } - } - log { - category = "ServicePrincipalSignInLogs" - enabled = true - retention_policy { - enabled = true - days = 1 - } - } - log { - category = "ManagedIdentitySignInLogs" - enabled = false - retention_policy {} - } - log { - category = "ProvisioningLogs" - enabled = false - retention_policy {} - } - log { - category = "ADFSSignInLogs" - enabled = false - retention_policy {} - } - log { - category = "RiskyUsers" - enabled = true - retention_policy { - enabled = true - days = 1 - } - } - log { - category = "UserRiskEvents" - enabled = true - retention_policy { - enabled = true - days = 1 - } - } - log { - category = "NetworkAccessTrafficLogs" - enabled = false - retention_policy {} - } - log { - category = "RiskyServicePrincipals" - enabled = false - retention_policy {} - } - log { - category = "ServicePrincipalRiskEvents" - enabled = false - retention_policy {} - } - log { - category = "B2CRequestLogs" - enabled = true - retention_policy { - enabled = true - days = 1 - } - } - log { - category = "EnrichedOffice365AuditLogs" - enabled = false - retention_policy {} - } - log { - category = "MicrosoftGraphActivityLogs" - enabled = false - retention_policy {} - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomStringOfLength(5)) - } - return fmt.Sprintf(` provider "azurerm" { features {} @@ -816,40 +668,3 @@ resource "azurerm_monitor_aad_diagnostic_setting" "test" { } `, data.RandomInteger, data.Locations.Primary, data.RandomStringOfLength(5)) } - -// remove this in 4.0 version -func (MonitorAADDiagnosticSettingResource) disabled(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%[1]d" - location = "%[2]s" -} - -resource "azurerm_storage_account" "test" { - name = "acctestsa%[3]s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_kind = "StorageV2" - account_replication_type = "LRS" -} - -resource "azurerm_monitor_aad_diagnostic_setting" "test" { - name = "acctest-DS-%[1]d" - storage_account_id = azurerm_storage_account.test.id - log { - category = "SignInLogs" - enabled = false - retention_policy { - enabled = true - days = 1 - } - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomStringOfLength(5)) - -} diff --git a/internal/services/monitor/monitor_action_group_data_source.go b/internal/services/monitor/monitor_action_group_data_source.go index ccc5cda1bb614..daf10213d3114 100644 --- a/internal/services/monitor/monitor_action_group_data_source.go +++ b/internal/services/monitor/monitor_action_group_data_source.go @@ -9,10 +9,8 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs" "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2023-01-01/actiongroupsapis" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" @@ -287,6 +285,7 @@ func dataSourceMonitorActionGroup() *pluginsdk.Resource { }, }, }, + "arm_role_receiver": { Type: pluginsdk.TypeList, Computed: true, @@ -307,99 +306,49 @@ func dataSourceMonitorActionGroup() *pluginsdk.Resource { }, }, }, - }, - } - if !features.FourPointOhBeta() { - resource.Schema["event_hub_receiver"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeList, - Computed: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "event_hub_id": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: eventhubs.ValidateEventhubID, - Deprecated: "This property is deprecated and will be removed in version 4.0 of the provider, please use 'event_hub_name' and 'event_hub_namespace' instead.", - }, - "event_hub_name": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "event_hub_namespace": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "tenant_id": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.IsUUID, - }, - "use_common_alert_schema": { - Type: pluginsdk.TypeBool, - Optional: true, - }, - "subscription_id": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.IsUUID, - }, - }, - }, - } - } else { - resource.Schema["event_hub_receiver"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeList, - Computed: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "event_hub_name": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "event_hub_namespace": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "tenant_id": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.IsUUID, - }, - "use_common_alert_schema": { - Type: pluginsdk.TypeBool, - Optional: true, - }, - "subscription_id": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.IsUUID, + "event_hub_receiver": { + Type: pluginsdk.TypeList, + Computed: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + "event_hub_name": { + Type: pluginsdk.TypeString, + Required: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + "event_hub_namespace": { + Type: pluginsdk.TypeString, + Required: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + "tenant_id": { + Type: pluginsdk.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.IsUUID, + }, + "use_common_alert_schema": { + Type: pluginsdk.TypeBool, + Optional: true, + }, + "subscription_id": { + Type: pluginsdk.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.IsUUID, + }, }, }, }, - } + }, } + return resource } @@ -465,7 +414,7 @@ func dataSourceMonitorActionGroupRead(d *pluginsdk.ResourceData, meta interface{ if err = d.Set("arm_role_receiver", flattenMonitorActionGroupRoleReceiver(props.ArmRoleReceivers)); err != nil { return fmt.Errorf("setting `arm_role_receiver`: %+v", err) } - if err = d.Set("event_hub_receiver", flattenMonitorActionGroupEventHubReceiver(resourceGroup, props.EventHubReceivers)); err != nil { + if err = d.Set("event_hub_receiver", flattenMonitorActionGroupEventHubReceiver(props.EventHubReceivers)); err != nil { return fmt.Errorf("setting `event_hub_receiver`: %+v", err) } } diff --git a/internal/services/monitor/monitor_action_group_resource.go b/internal/services/monitor/monitor_action_group_resource.go index b3ab8b2ca3f52..aadf322188b42 100644 --- a/internal/services/monitor/monitor_action_group_resource.go +++ b/internal/services/monitor/monitor_action_group_resource.go @@ -13,13 +13,11 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/automationaccount" - "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs" "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2023-01-01/actiongroupsapis" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/services/monitor/migration" "github.com/hashicorp/terraform-provider-azurerm/internal/services/monitor/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tags" @@ -396,100 +394,50 @@ func resourceMonitorActionGroup() *pluginsdk.Resource { }, }, - "tags": tags.Schema(), - }, - } - - if !features.FourPointOhBeta() { - resource.Schema["event_hub_receiver"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeList, - Optional: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "event_hub_id": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: eventhubs.ValidateEventhubID, - Deprecated: "This property is deprecated and will be removed in version 4.0 of the provider, please use 'event_hub_name' and 'event_hub_namespace' instead.", - }, - "event_hub_name": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "event_hub_namespace": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "tenant_id": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.IsUUID, - }, - "use_common_alert_schema": { - Type: pluginsdk.TypeBool, - Optional: true, - }, - "subscription_id": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.IsUUID, - }, - }, - }, - } - } else { - resource.Schema["event_hub_receiver"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeList, - Optional: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "event_hub_name": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "event_hub_namespace": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "tenant_id": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.IsUUID, - }, - "use_common_alert_schema": { - Type: pluginsdk.TypeBool, - Optional: true, - }, - "subscription_id": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.IsUUID, + "event_hub_receiver": { + Type: pluginsdk.TypeList, + Optional: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + "event_hub_name": { + Type: pluginsdk.TypeString, + Required: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + "event_hub_namespace": { + Type: pluginsdk.TypeString, + Required: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + "tenant_id": { + Type: pluginsdk.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.IsUUID, + }, + "use_common_alert_schema": { + Type: pluginsdk.TypeBool, + Optional: true, + }, + "subscription_id": { + Type: pluginsdk.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.IsUUID, + }, }, }, }, - } + + "tags": tags.Schema(), + }, } + return resource } @@ -529,11 +477,7 @@ func resourceMonitorActionGroupCreateUpdate(d *pluginsdk.ResourceData, meta inte logicAppReceiversRaw := d.Get("logic_app_receiver").([]interface{}) azureFunctionReceiversRaw := d.Get("azure_function_receiver").([]interface{}) armRoleReceiversRaw := d.Get("arm_role_receiver").([]interface{}) - - expandedEventHubReceiver, err := expandMonitorActionGroupEventHubReceiver(tenantId, subscriptionId, d) - if err != nil { - return err - } + eventHubReceiversRaw := d.Get("event_hub_receiver").([]interface{}) expandedItsmReceiver, err := expandMonitorActionGroupItsmReceiver(itsmReceiversRaw) if err != nil { @@ -557,7 +501,7 @@ func resourceMonitorActionGroupCreateUpdate(d *pluginsdk.ResourceData, meta inte LogicAppReceivers: expandMonitorActionGroupLogicAppReceiver(logicAppReceiversRaw), AzureFunctionReceivers: expandMonitorActionGroupAzureFunctionReceiver(azureFunctionReceiversRaw), ArmRoleReceivers: expandMonitorActionGroupRoleReceiver(armRoleReceiversRaw), - EventHubReceivers: expandedEventHubReceiver, + EventHubReceivers: expandMonitorActionGroupEventHubReceiver(tenantId, subscriptionId, eventHubReceiversRaw), }, Tags: utils.ExpandPtrMapStringString(t), } @@ -639,7 +583,7 @@ func resourceMonitorActionGroupRead(d *pluginsdk.ResourceData, meta interface{}) if err = d.Set("arm_role_receiver", flattenMonitorActionGroupRoleReceiver(props.ArmRoleReceivers)); err != nil { return fmt.Errorf("setting `arm_role_receiver`: %+v", err) } - if err = d.Set("event_hub_receiver", flattenMonitorActionGroupEventHubReceiver(id.ResourceGroupName, props.EventHubReceivers)); err != nil { + if err = d.Set("event_hub_receiver", flattenMonitorActionGroupEventHubReceiver(props.EventHubReceivers)); err != nil { return fmt.Errorf("setting `event_hub_receiver`: %+v", err) } } @@ -844,44 +788,13 @@ func expandMonitorActionGroupRoleReceiver(v []interface{}) *[]actiongroupsapis.A return &receivers } -func expandMonitorActionGroupEventHubReceiver(tenantId string, subscriptionId string, d *pluginsdk.ResourceData) (*[]actiongroupsapis.EventHubReceiver, error) { +func expandMonitorActionGroupEventHubReceiver(tenantId string, subscriptionId string, v []interface{}) *[]actiongroupsapis.EventHubReceiver { receivers := make([]actiongroupsapis.EventHubReceiver, 0) - eventHubReceiver := d.Get("event_hub_receiver").([]interface{}) - for i, receiverValue := range eventHubReceiver { + for _, receiverValue := range v { val := receiverValue.(map[string]interface{}) eventHubNameSpace, eventHubName, subId := val["event_hub_namespace"].(string), val["event_hub_name"].(string), val["subscription_id"].(string) - if !features.FourPointOhBeta() { - eventHubReceiverRaw := d.GetRawConfig().AsValueMap()["event_hub_receiver"].AsValueSlice()[i].AsValueMap() - eventHubIdRaw := eventHubReceiverRaw["event_hub_id"] - - hasSetId := !eventHubIdRaw.IsNull() - hasSetName := !eventHubReceiverRaw["event_hub_name"].IsNull() - hasSetNamespace := !eventHubReceiverRaw["event_hub_namespace"].IsNull() - hasSetSubscriptionId := !eventHubReceiverRaw["subscription_id"].IsNull() - - if hasSetName != hasSetNamespace { - return nil, fmt.Errorf("in event_hub_receiver, event_hub_name and event_hub_namespace must be set together") - } - - if hasSetId == hasSetName { - return nil, fmt.Errorf("in event_hub_receiver, exactly one of event_hub_id or (event_hub_namespace, event_hub_name) must be set") - } - - if hasSetId && hasSetSubscriptionId { - return nil, fmt.Errorf("in event_hub_receiver, event_hub_id and subscription_id cannot be set together") - } - - if hasSetId { - eventHubId, err := eventhubs.ParseEventhubID(eventHubIdRaw.AsString()) - if err != nil { - return nil, err - } - eventHubNameSpace, eventHubName, subId = eventHubId.NamespaceName, eventHubId.EventhubName, eventHubId.SubscriptionId - } - } - receiver := actiongroupsapis.EventHubReceiver{ EventHubNameSpace: eventHubNameSpace, EventHubName: eventHubName, @@ -903,7 +816,7 @@ func expandMonitorActionGroupEventHubReceiver(tenantId string, subscriptionId st receivers = append(receivers, receiver) } - return &receivers, nil + return &receivers } func flattenMonitorActionGroupEmailReceiver(receivers *[]actiongroupsapis.EmailReceiver) []interface{} { @@ -1117,7 +1030,7 @@ func flattenMonitorActionGroupRoleReceiver(receivers *[]actiongroupsapis.ArmRole return result } -func flattenMonitorActionGroupEventHubReceiver(resourceGroup string, receivers *[]actiongroupsapis.EventHubReceiver) []interface{} { +func flattenMonitorActionGroupEventHubReceiver(receivers *[]actiongroupsapis.EventHubReceiver) []interface{} { result := make([]interface{}, 0) if receivers != nil { for _, receiver := range *receivers { @@ -1128,9 +1041,6 @@ func flattenMonitorActionGroupEventHubReceiver(resourceGroup string, receivers * eventHubNamespace := receiver.EventHubNameSpace eventHubName := receiver.EventHubName subscriptionId := receiver.SubscriptionId - if !features.FourPointOhBeta() { - val["event_hub_id"] = eventhubs.NewEventhubID(subscriptionId, resourceGroup, eventHubNamespace, eventHubName).ID() - } val["subscription_id"], val["event_hub_namespace"], val["event_hub_name"] = subscriptionId, eventHubNamespace, eventHubName if receiver.UseCommonAlertSchema != nil { diff --git a/internal/services/monitor/monitor_action_group_resource_test.go b/internal/services/monitor/monitor_action_group_resource_test.go index a4b36ed3304dd..3731c613a8e82 100644 --- a/internal/services/monitor/monitor_action_group_resource_test.go +++ b/internal/services/monitor/monitor_action_group_resource_test.go @@ -12,7 +12,6 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -247,7 +246,7 @@ func TestAccMonitorActionGroup_eventHubReceiver(t *testing.T) { data.ResourceTest(t, r, []acceptance.TestStep{ { - Config: r.eventHubReceiver(data, !features.FourPointOhBeta()), + Config: r.eventHubReceiver(data), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), ), @@ -394,18 +393,12 @@ func TestAccMonitorActionGroup_singleReceiverUpdate(t *testing.T) { }, data.ImportStep(), { - Config: r.eventHubReceiver(data, !features.FourPointOhBeta()), + Config: r.eventHubReceiver(data), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), ), }, data.ImportStep(), - { - Config: r.eventHubReceiver(data, false), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, }) } @@ -855,47 +848,7 @@ resource "azurerm_monitor_action_group" "test" { `, data.RandomInteger, data.Locations.Primary, data.RandomInteger) } -func (MonitorActionGroupResource) eventHubReceiver(data acceptance.TestData, notFourPointOhBeta bool) string { - if notFourPointOhBeta { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_eventhub_namespace" "test" { - name = "acceptanceTestEventHubNamespace-%d" - location = "%s" - resource_group_name = azurerm_resource_group.test.name - sku = "Standard" - capacity = 1 -} - -resource "azurerm_eventhub" "test" { - name = "acceptanceTestEventHub" - namespace_name = azurerm_eventhub_namespace.test.name - resource_group_name = azurerm_resource_group.test.name - partition_count = 1 - message_retention = 1 -} - -resource "azurerm_monitor_action_group" "test" { - name = "acctestActionGroup-%d" - resource_group_name = azurerm_resource_group.test.name - short_name = "acctestag" - - event_hub_receiver { - name = "eventhub-test-action" - event_hub_id = azurerm_eventhub.test.id - use_common_alert_schema = false - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.Locations.Primary, data.RandomInteger) - } +func (MonitorActionGroupResource) eventHubReceiver(data acceptance.TestData) string { return fmt.Sprintf(` provider "azurerm" { features {} diff --git a/internal/services/monitor/monitor_action_rule_action_group_resource.go b/internal/services/monitor/monitor_action_rule_action_group_resource.go deleted file mode 100644 index ce5cf5c13d33e..0000000000000 --- a/internal/services/monitor/monitor_action_rule_action_group_resource.go +++ /dev/null @@ -1,213 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package monitor - -import ( - "fmt" - "log" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/monitor/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceMonitorActionRuleActionGroup() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceMonitorActionRuleActionGroupCreateUpdate, - Read: resourceMonitorActionRuleActionGroupRead, - Update: resourceMonitorActionRuleActionGroupCreateUpdate, - Delete: resourceMonitorActionRuleActionGroupDelete, - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - DeprecationMessage: `This resource has been deprecated in favour of the 'azurerm_monitor_alert_processing_rule_action_group' resource and will be removed in v4.0 of the AzureRM Provider`, - - Importer: pluginsdk.ImporterValidatingResourceIdThen(func(id string) error { - _, err := actionrules.ParseActionRuleID(id) - return err - }, importMonitorActionRule(actionrules.ActionRuleTypeActionGroup)), - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.ActionRuleName, - }, - - "resource_group_name": commonschema.ResourceGroupName(), - - "action_group_id": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validate.ActionGroupID, - }, - - "description": { - Type: pluginsdk.TypeString, - Optional: true, - }, - - "enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: true, - }, - - "condition": schemaActionRuleConditions(), - - "scope": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "type": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - string(actionrules.ScopeTypeResourceGroup), - string(actionrules.ScopeTypeResource), - }, false), - }, - - "resource_ids": { - Type: pluginsdk.TypeSet, - Required: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - ValidateFunc: azure.ValidateResourceID, - }, - }, - }, - }, - }, - - "tags": commonschema.Tags(), - }, - } -} - -func resourceMonitorActionRuleActionGroupCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Monitor.ActionRulesClient - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := actionrules.NewActionRuleID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) - - if d.IsNewResource() { - existing, err := client.GetByName(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for presence of existing %s: %+v", id, err) - } - } - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_monitor_action_rule_action_group", id.ID()) - } - } - - actionRuleStatus := actionrules.ActionRuleStatusEnabled - if !d.Get("enabled").(bool) { - actionRuleStatus = actionrules.ActionRuleStatusDisabled - } - - actionRule := actionrules.ActionRule{ - // the location is always global from the portal - Location: location.Normalize("Global"), - Properties: &actionrules.ActionGroup{ - ActionGroupId: utils.String(d.Get("action_group_id").(string)), - Scope: expandActionRuleScope(d.Get("scope").([]interface{})), - Conditions: expandActionRuleConditions(d.Get("condition").([]interface{})), - Description: utils.String(d.Get("description").(string)), - Status: pointer.To(actionRuleStatus), - }, - Tags: tags.Expand(d.Get("tags").(map[string]interface{})), - } - - if _, err := client.CreateUpdate(ctx, id, actionRule); err != nil { - return fmt.Errorf("creating/updating Monitor %s: %+v", id, err) - } - - d.SetId(id.ID()) - return resourceMonitorActionRuleActionGroupRead(d, meta) -} - -func resourceMonitorActionRuleActionGroupRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Monitor.ActionRulesClient - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := actionrules.ParseActionRuleID(d.Id()) - if err != nil { - return err - } - - resp, err := client.GetByName(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - log.Printf("[DEBUG] %s does not exist - removing from state", id) - d.SetId("") - return nil - } - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.ActionRuleName) - d.Set("resource_group_name", id.ResourceGroupName) - - if model := resp.Model; model != nil { - props, ok := model.Properties.(actionrules.ActionGroup) - if !ok { - return fmt.Errorf("%s is not of type `ActionGroup`", id) - } - d.Set("description", props.Description) - d.Set("action_group_id", props.ActionGroupId) - if props.Status != nil { - d.Set("enabled", *props.Status == actionrules.ActionRuleStatusEnabled) - } - if err := d.Set("scope", flattenActionRuleScope(props.Scope)); err != nil { - return fmt.Errorf("setting scope: %+v", err) - } - if err := d.Set("condition", flattenActionRuleConditions(props.Conditions)); err != nil { - return fmt.Errorf("setting condition: %+v", err) - } - return tags.FlattenAndSet(d, model.Tags) - } - return nil -} - -func resourceMonitorActionRuleActionGroupDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Monitor.ActionRulesClient - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := actionrules.ParseActionRuleID(d.Id()) - if err != nil { - return err - } - - if _, err := client.Delete(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - return nil -} diff --git a/internal/services/monitor/monitor_action_rule_action_group_resource_test.go b/internal/services/monitor/monitor_action_rule_action_group_resource_test.go deleted file mode 100644 index d1d5004410bca..0000000000000 --- a/internal/services/monitor/monitor_action_rule_action_group_resource_test.go +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package monitor_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -type MonitorActionRuleActionGroupResource struct{} - -func TestAccMonitorActionRuleActionGroup_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip(`This resource has been deprecated in favour of the 'azurerm_monitor_alert_processing_rule_action_group' resource and will be removed in v4.0 of the AzureRM Provider`) - } - - data := acceptance.BuildTestData(t, "azurerm_monitor_action_rule_action_group", "test") - r := MonitorActionRuleActionGroupResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMonitorActionRuleActionGroup_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip(`This resource has been deprecated in favour of the 'azurerm_monitor_alert_processing_rule_action_group' resource and will be removed in v4.0 of the AzureRM Provider`) - } - - data := acceptance.BuildTestData(t, "azurerm_monitor_action_rule_action_group", "test") - r := MonitorActionRuleActionGroupResource{} - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func TestAccMonitorActionRuleActionGroup_complete(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip(`This resource has been deprecated in favour of the 'azurerm_monitor_alert_processing_rule_action_group' resource and will be removed in v4.0 of the AzureRM Provider`) - } - - data := acceptance.BuildTestData(t, "azurerm_monitor_action_rule_action_group", "test") - r := MonitorActionRuleActionGroupResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMonitorActionRuleActionGroup_update(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip(`This resource has been deprecated in favour of the 'azurerm_monitor_alert_processing_rule_action_group' resource and will be removed in v4.0 of the AzureRM Provider`) - } - - data := acceptance.BuildTestData(t, "azurerm_monitor_action_rule_action_group", "test") - r := MonitorActionRuleActionGroupResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.complete(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func (t MonitorActionRuleActionGroupResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := actionrules.ParseActionRuleID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.Monitor.ActionRulesClient.GetByName(ctx, *id) - if err != nil { - return nil, fmt.Errorf("retrieving %s: %+v", *id, err) - } - - return pointer.To(resp.Model != nil), nil -} - -func (r MonitorActionRuleActionGroupResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_monitor_action_rule_action_group" "test" { - name = "acctest-moniter-%d" - resource_group_name = azurerm_resource_group.test.name - action_group_id = azurerm_monitor_action_group.test.id -} -`, r.template(data), data.RandomInteger) -} - -func (r MonitorActionRuleActionGroupResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_monitor_action_rule_action_group" "import" { - name = azurerm_monitor_action_rule_action_group.test.name - resource_group_name = azurerm_monitor_action_rule_action_group.test.resource_group_name - action_group_id = azurerm_monitor_action_rule_action_group.test.action_group_id -} -`, r.basic(data)) -} - -func (r MonitorActionRuleActionGroupResource) complete(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_monitor_action_rule_action_group" "test" { - name = "acctest-moniter-%d" - resource_group_name = azurerm_resource_group.test.name - action_group_id = azurerm_monitor_action_group.test.id - enabled = false - description = "actionRule-test" - - scope { - type = "ResourceGroup" - resource_ids = [azurerm_resource_group.test.id] - } - - condition { - alert_context { - operator = "Contains" - values = ["context1", "context2"] - } - - alert_rule_id { - operator = "Contains" - values = ["ruleId1", "ruleId2"] - } - - description { - operator = "DoesNotContain" - values = ["description1", "description2"] - } - - monitor { - operator = "NotEquals" - values = ["Fired"] - } - - monitor_service { - operator = "Equals" - values = ["Data Box Gateway", "Resource Health"] - } - - severity { - operator = "Equals" - values = ["Sev0", "Sev1", "Sev2"] - } - - target_resource_type { - operator = "Equals" - values = ["Microsoft.Compute/VirtualMachines", "microsoft.batch/batchaccounts"] - } - } - - tags = { - ENV = "Test" - } -} -`, r.template(data), data.RandomInteger) -} - -func (MonitorActionRuleActionGroupResource) template(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-monitor-%d" - location = "%s" -} - -resource "azurerm_monitor_action_group" "test" { - name = "acctestActionGroup-%d" - resource_group_name = azurerm_resource_group.test.name - short_name = "acctestag" -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger) -} diff --git a/internal/services/monitor/monitor_action_rule_suppression_resource.go b/internal/services/monitor/monitor_action_rule_suppression_resource.go deleted file mode 100644 index d4e508b33b139..0000000000000 --- a/internal/services/monitor/monitor_action_rule_suppression_resource.go +++ /dev/null @@ -1,402 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package monitor - -import ( - "fmt" - "log" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/monitor/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceMonitorActionRuleSuppression() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceMonitorActionRuleSuppressionCreateUpdate, - Read: resourceMonitorActionRuleSuppressionRead, - Update: resourceMonitorActionRuleSuppressionCreateUpdate, - Delete: resourceMonitorActionRuleSuppressionDelete, - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - DeprecationMessage: `This resource has been deprecated in favour of the 'azurerm_monitor_alert_processing_rule_suppression' resource and will be removed in v4.0 of the AzureRM Provider`, - - Importer: pluginsdk.ImporterValidatingResourceIdThen(func(id string) error { - _, err := actionrules.ParseActionRuleID(id) - return err - }, importMonitorActionRule(actionrules.ActionRuleTypeSuppression)), - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.ActionRuleName, - }, - - "resource_group_name": commonschema.ResourceGroupName(), - - "suppression": { - Type: pluginsdk.TypeList, - Required: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "recurrence_type": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - string(actionrules.SuppressionTypeAlways), - string(actionrules.SuppressionTypeOnce), - string(actionrules.SuppressionTypeDaily), - string(actionrules.SuppressionTypeWeekly), - string(actionrules.SuppressionTypeMonthly), - }, false), - }, - - "schedule": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "start_date_utc": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.IsRFC3339Time, - }, - - "end_date_utc": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.IsRFC3339Time, - }, - - "recurrence_weekly": { - Type: pluginsdk.TypeSet, - Optional: true, - MinItems: 1, - ConflictsWith: []string{"suppression.0.schedule.0.recurrence_monthly"}, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - ValidateFunc: validation.IsDayOfTheWeek(false), - }, - }, - - "recurrence_monthly": { - Type: pluginsdk.TypeSet, - Optional: true, - MinItems: 1, - ConflictsWith: []string{"suppression.0.schedule.0.recurrence_weekly"}, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeInt, - ValidateFunc: validation.IntBetween(1, 31), - }, - }, - }, - }, - }, - }, - }, - }, - - "description": { - Type: pluginsdk.TypeString, - Optional: true, - }, - - "enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: true, - }, - - "condition": schemaActionRuleConditions(), - - "scope": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "type": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - string(actionrules.ScopeTypeResourceGroup), - string(actionrules.ScopeTypeResource), - }, false), - }, - - "resource_ids": { - Type: pluginsdk.TypeSet, - Required: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - ValidateFunc: azure.ValidateResourceID, - }, - }, - }, - }, - }, - - "tags": commonschema.Tags(), - }, - } -} - -func resourceMonitorActionRuleSuppressionCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Monitor.ActionRulesClient - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := actionrules.NewActionRuleID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) - - if d.IsNewResource() { - existing, err := client.GetByName(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for presence of existing %s: %+v", id, err) - } - } - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_monitor_action_rule_suppression", id.ID()) - } - } - - actionRuleStatus := actionrules.ActionRuleStatusEnabled - if !d.Get("enabled").(bool) { - actionRuleStatus = actionrules.ActionRuleStatusDisabled - } - - suppressionConfig, err := expandActionRuleSuppressionConfig(d.Get("suppression").([]interface{})) - if err != nil { - return err - } - - actionRule := actionrules.ActionRule{ - // the location is always global from the portal - Location: location.Normalize("Global"), - Properties: &actionrules.Suppression{ - SuppressionConfig: suppressionConfig, - Scope: expandActionRuleScope(d.Get("scope").([]interface{})), - Conditions: expandActionRuleConditions(d.Get("condition").([]interface{})), - Description: utils.String(d.Get("description").(string)), - Status: pointer.To(actionRuleStatus), - }, - Tags: tags.Expand(d.Get("tags").(map[string]interface{})), - } - - if _, err := client.CreateUpdate(ctx, id, actionRule); err != nil { - return fmt.Errorf("creating/updating Monitor %s: %+v", id, err) - } - - d.SetId(id.ID()) - return resourceMonitorActionRuleSuppressionRead(d, meta) -} - -func resourceMonitorActionRuleSuppressionRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Monitor.ActionRulesClient - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := actionrules.ParseActionRuleID(d.Id()) - if err != nil { - return err - } - - resp, err := client.GetByName(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - log.Printf("[DEBUG] %s does not exist - removing from state", id) - d.SetId("") - return nil - } - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.ActionRuleName) - d.Set("resource_group_name", id.ResourceGroupName) - - if model := resp.Model; model != nil { - props, ok := model.Properties.(actionrules.Suppression) - if !ok { - return fmt.Errorf("%s is not of type `Suppression`", id) - } - d.Set("description", props.Description) - if props.Status != nil { - d.Set("enabled", *props.Status == actionrules.ActionRuleStatusEnabled) - } - if err := d.Set("suppression", flattenActionRuleSuppression(props.SuppressionConfig)); err != nil { - return fmt.Errorf("setting suppression: %+v", err) - } - if err := d.Set("scope", flattenActionRuleScope(props.Scope)); err != nil { - return fmt.Errorf("setting scope: %+v", err) - } - if err := d.Set("condition", flattenActionRuleConditions(props.Conditions)); err != nil { - return fmt.Errorf("setting condition: %+v", err) - } - return tags.FlattenAndSet(d, model.Tags) - } - return nil -} - -func resourceMonitorActionRuleSuppressionDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Monitor.ActionRulesClient - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := actionrules.ParseActionRuleID(d.Id()) - if err != nil { - return err - } - - if _, err := client.Delete(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - return nil -} - -func expandActionRuleSuppressionConfig(input []interface{}) (*actionrules.SuppressionConfig, error) { - if len(input) == 0 { - return nil, nil - } - v := input[0].(map[string]interface{}) - recurrenceType := actionrules.SuppressionType(v["recurrence_type"].(string)) - schedule, err := expandActionRuleSuppressionSchedule(v["schedule"].([]interface{}), recurrenceType) - if err != nil { - return nil, err - } - if recurrenceType != actionrules.SuppressionTypeAlways && schedule == nil { - return nil, fmt.Errorf("`schedule` block must be set when `recurrence_type` is Once, Daily, Weekly or Monthly.") - } - return &actionrules.SuppressionConfig{ - RecurrenceType: recurrenceType, - Schedule: schedule, - }, nil -} - -func expandActionRuleSuppressionSchedule(input []interface{}, suppressionType actionrules.SuppressionType) (*actionrules.SuppressionSchedule, error) { - if len(input) == 0 { - return nil, nil - } - v := input[0].(map[string]interface{}) - - var recurrence []interface{} - switch suppressionType { - case actionrules.SuppressionTypeWeekly: - if recurrenceWeekly, ok := v["recurrence_weekly"]; ok { - recurrence = expandActionRuleSuppressionScheduleRecurrenceWeekly(recurrenceWeekly.(*pluginsdk.Set).List()) - } - if len(recurrence) == 0 { - return nil, fmt.Errorf("`recurrence_weekly` must be set and should have at least one element when `recurrence_type` is Weekly.") - } - case actionrules.SuppressionTypeMonthly: - if recurrenceMonthly, ok := v["recurrence_monthly"]; ok { - recurrence = recurrenceMonthly.(*pluginsdk.Set).List() - } - if len(recurrence) == 0 { - return nil, fmt.Errorf("`recurrence_monthly` must be set and should have at least one element when `recurrence_type` is Monthly.") - } - } - - startDateUTC, _ := time.Parse(time.RFC3339, v["start_date_utc"].(string)) - endDateUTC, _ := time.Parse(time.RFC3339, v["end_date_utc"].(string)) - return &actionrules.SuppressionSchedule{ - StartDate: utils.String(startDateUTC.Format(scheduleDateLayout)), - EndDate: utils.String(endDateUTC.Format(scheduleDateLayout)), - StartTime: utils.String(startDateUTC.Format(scheduleTimeLayout)), - EndTime: utils.String(endDateUTC.Format(scheduleTimeLayout)), - RecurrenceValues: utils.ExpandInt64Slice(recurrence), - }, nil -} - -func expandActionRuleSuppressionScheduleRecurrenceWeekly(input []interface{}) []interface{} { - result := make([]interface{}, 0, len(input)) - for _, v := range input { - result = append(result, weekDayMap[v.(string)]) - } - return result -} - -func flattenActionRuleSuppression(input *actionrules.SuppressionConfig) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - var recurrenceType actionrules.SuppressionType - if input.RecurrenceType != "" { - recurrenceType = input.RecurrenceType - } - return []interface{}{ - map[string]interface{}{ - "recurrence_type": string(recurrenceType), - "schedule": flattenActionRuleSuppressionSchedule(input.Schedule, recurrenceType), - }, - } -} - -func flattenActionRuleSuppressionSchedule(input *actionrules.SuppressionSchedule, recurrenceType actionrules.SuppressionType) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - startDateUTCStr := "" - endDateUTCStr := "" - recurrenceWeekly := []interface{}{} - recurrenceMonthly := []interface{}{} - - if input.StartDate != nil && input.StartTime != nil { - date, _ := time.ParseInLocation(scheduleDateTimeLayout, fmt.Sprintf("%s %s", *input.StartDate, *input.StartTime), time.UTC) - startDateUTCStr = date.Format(time.RFC3339) - } - if input.EndDate != nil && input.EndTime != nil { - date, _ := time.ParseInLocation(scheduleDateTimeLayout, fmt.Sprintf("%s %s", *input.EndDate, *input.EndTime), time.UTC) - endDateUTCStr = date.Format(time.RFC3339) - } - - if recurrenceType == actionrules.SuppressionTypeWeekly { - recurrenceWeekly = flattenActionRuleSuppressionScheduleRecurrenceWeekly(input.RecurrenceValues) - } - if recurrenceType == actionrules.SuppressionTypeMonthly { - recurrenceMonthly = utils.FlattenInt64Slice(input.RecurrenceValues) - } - return []interface{}{ - map[string]interface{}{ - "start_date_utc": startDateUTCStr, - "end_date_utc": endDateUTCStr, - "recurrence_weekly": recurrenceWeekly, - "recurrence_monthly": recurrenceMonthly, - }, - } -} - -func flattenActionRuleSuppressionScheduleRecurrenceWeekly(input *[]int64) []interface{} { - result := make([]interface{}, 0) - if input != nil { - for _, item := range *input { - result = append(result, weekDays[int(item)]) - } - } - return result -} diff --git a/internal/services/monitor/monitor_action_rule_suppression_resource_test.go b/internal/services/monitor/monitor_action_rule_suppression_resource_test.go deleted file mode 100644 index e4f526f116adf..0000000000000 --- a/internal/services/monitor/monitor_action_rule_suppression_resource_test.go +++ /dev/null @@ -1,301 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package monitor_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -type MonitorActionRuleSuppressionResource struct{} - -func TestAccMonitorActionRuleSuppression_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip(`This resource has been deprecated in favour of the 'azurerm_monitor_alert_processing_rule_suppression' resource and will be removed in v4.0 of the AzureRM Provider`) - } - - data := acceptance.BuildTestData(t, "azurerm_monitor_action_rule_suppression", "test") - r := MonitorActionRuleSuppressionResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMonitorActionRuleSuppression_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip(`This resource has been deprecated in favour of the 'azurerm_monitor_alert_processing_rule_suppression' resource and will be removed in v4.0 of the AzureRM Provider`) - } - - data := acceptance.BuildTestData(t, "azurerm_monitor_action_rule_suppression", "test") - r := MonitorActionRuleSuppressionResource{} - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func TestAccMonitorActionRuleSuppression_complete(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip(`This resource has been deprecated in favour of the 'azurerm_monitor_alert_processing_rule_suppression' resource and will be removed in v4.0 of the AzureRM Provider`) - } - - data := acceptance.BuildTestData(t, "azurerm_monitor_action_rule_suppression", "test") - r := MonitorActionRuleSuppressionResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccMonitorActionRuleSuppression_updateSuppressionConfig(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip(`This resource has been deprecated in favour of the 'azurerm_monitor_alert_processing_rule_suppression' resource and will be removed in v4.0 of the AzureRM Provider`) - } - - data := acceptance.BuildTestData(t, "azurerm_monitor_action_rule_suppression", "test") - r := MonitorActionRuleSuppressionResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.dailyRecurrence(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.monthlyRecurrence(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.complete(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func (t MonitorActionRuleSuppressionResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := actionrules.ParseActionRuleID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.Monitor.ActionRulesClient.GetByName(ctx, *id) - if err != nil { - return nil, fmt.Errorf("retrieving %s: %+v", *id, err) - } - - return pointer.To(resp.Model != nil), nil -} - -func (r MonitorActionRuleSuppressionResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_monitor_action_rule_suppression" "test" { - name = "acctest-moniter-%d" - resource_group_name = azurerm_resource_group.test.name - - suppression { - recurrence_type = "Always" - } -} -`, r.template(data), data.RandomInteger) -} - -func (r MonitorActionRuleSuppressionResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_monitor_action_rule_suppression" "import" { - name = azurerm_monitor_action_rule_suppression.test.name - resource_group_name = azurerm_monitor_action_rule_suppression.test.resource_group_name - - suppression { - recurrence_type = azurerm_monitor_action_rule_suppression.test.suppression.0.recurrence_type - } -} -`, r.basic(data)) -} - -func (r MonitorActionRuleSuppressionResource) complete(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_monitor_action_rule_suppression" "test" { - name = "acctest-moniter-%d" - resource_group_name = azurerm_resource_group.test.name - enabled = false - description = "actionRule-test" - - scope { - type = "ResourceGroup" - resource_ids = [azurerm_resource_group.test.id] - } - - suppression { - recurrence_type = "Weekly" - - schedule { - start_date_utc = "2019-01-01T01:02:03Z" - end_date_utc = "2019-01-03T15:02:07Z" - - recurrence_weekly = ["Sunday", "Monday", "Friday", "Saturday"] - } - } - - condition { - alert_context { - operator = "Contains" - values = ["context1", "context2"] - } - - alert_rule_id { - operator = "Contains" - values = ["ruleId1", "ruleId2"] - } - - description { - operator = "DoesNotContain" - values = ["description1", "description2"] - } - - monitor { - operator = "NotEquals" - values = ["Fired"] - } - - monitor_service { - operator = "Equals" - values = ["Data Box Gateway", "Resource Health"] - } - - severity { - operator = "Equals" - values = ["Sev0", "Sev1", "Sev2"] - } - - target_resource_type { - operator = "Equals" - values = ["Microsoft.Compute/VirtualMachines", "microsoft.batch/batchaccounts"] - } - } - - tags = { - ENV = "Test" - } -} -`, r.template(data), data.RandomInteger) -} - -func (r MonitorActionRuleSuppressionResource) dailyRecurrence(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_monitor_action_rule_suppression" "test" { - name = "acctest-moniter-%d" - resource_group_name = azurerm_resource_group.test.name - - scope { - type = "ResourceGroup" - resource_ids = [azurerm_resource_group.test.id] - } - - suppression { - recurrence_type = "Daily" - - schedule { - start_date_utc = "2019-01-01T01:02:03Z" - end_date_utc = "2019-01-03T15:02:07Z" - } - } -} -`, r.template(data), data.RandomInteger) -} - -func (r MonitorActionRuleSuppressionResource) monthlyRecurrence(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_monitor_action_rule_suppression" "test" { - name = "acctest-moniter-%d" - resource_group_name = azurerm_resource_group.test.name - - scope { - type = "ResourceGroup" - resource_ids = [azurerm_resource_group.test.id] - } - - suppression { - recurrence_type = "Monthly" - - schedule { - start_date_utc = "2019-01-01T01:02:03Z" - end_date_utc = "2019-01-03T15:02:07Z" - recurrence_monthly = [1, 2, 15, 30, 31] - } - } -} -`, r.template(data), data.RandomInteger) -} - -func (MonitorActionRuleSuppressionResource) template(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-monitor-%d" - location = "%s" -} -`, data.RandomInteger, data.Locations.Primary) -} diff --git a/internal/services/monitor/monitor_activity_log_alert_resource.go b/internal/services/monitor/monitor_activity_log_alert_resource.go index 4bef82fa1ae85..07f12fffe1783 100644 --- a/internal/services/monitor/monitor_activity_log_alert_resource.go +++ b/internal/services/monitor/monitor_activity_log_alert_resource.go @@ -14,11 +14,9 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2020-10-01/activitylogalertsapis" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/services/monitor/migration" "github.com/hashicorp/terraform-provider-azurerm/internal/tags" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -61,19 +59,7 @@ func resourceMonitorActivityLogAlert() *pluginsdk.Resource { "resource_group_name": commonschema.ResourceGroupName(), - "location": func() *pluginsdk.Schema { - if !features.FourPointOhBeta() { - return &pluginsdk.Schema{ - Type: schema.TypeString, - Optional: true, - Default: "global", - ForceNew: true, - StateFunc: location.StateFunc, - DiffSuppressFunc: location.DiffSuppressFunc, - } - } - return commonschema.Location() - }(), + "location": commonschema.Location(), "scopes": { Type: pluginsdk.TypeSet, diff --git a/internal/services/monitor/monitor_alert_prometheus_rule_group_resource_test.go b/internal/services/monitor/monitor_alert_prometheus_rule_group_resource_test.go index e634b6d1cdce5..2631f0d927a38 100644 --- a/internal/services/monitor/monitor_alert_prometheus_rule_group_resource_test.go +++ b/internal/services/monitor/monitor_alert_prometheus_rule_group_resource_test.go @@ -188,10 +188,10 @@ resource "azurerm_kubernetes_cluster" "test" { dns_prefix = "acctestaks%[2]d" default_node_pool { - name = "default" - node_count = 1 - vm_size = "Standard_DS2_v2" - enable_host_encryption = true + name = "default" + node_count = 1 + vm_size = "Standard_DS2_v2" + host_encryption_enabled = true upgrade_settings { max_surge = "10%%" } @@ -266,10 +266,10 @@ resource "azurerm_kubernetes_cluster" "test" { dns_prefix = "acctestaks%[2]d" default_node_pool { - name = "default" - node_count = 1 - vm_size = "Standard_DS2_v2" - enable_host_encryption = true + name = "default" + node_count = 1 + vm_size = "Standard_DS2_v2" + host_encryption_enabled = true upgrade_settings { max_surge = "10%%" } @@ -287,10 +287,10 @@ resource "azurerm_kubernetes_cluster" "test2" { dns_prefix = "acctestaks2%[2]d" default_node_pool { - name = "default" - node_count = 2 - vm_size = "Standard_DS2_v2" - enable_host_encryption = true + name = "default" + node_count = 2 + vm_size = "Standard_DS2_v2" + host_encryption_enabled = true upgrade_settings { max_surge = "10%%" } diff --git a/internal/services/monitor/monitor_data_collection_rule_resource.go b/internal/services/monitor/monitor_data_collection_rule_resource.go index 778c7deeadbd4..a8c7f79a9afe5 100644 --- a/internal/services/monitor/monitor_data_collection_rule_resource.go +++ b/internal/services/monitor/monitor_data_collection_rule_resource.go @@ -20,15 +20,16 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/workspaces" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/utils" ) -var _ sdk.ResourceWithUpdate = DataCollectionRuleResource{} -var _ sdk.ResourceWithCustomizeDiff = DataCollectionRuleResource{} +var ( + _ sdk.ResourceWithUpdate = DataCollectionRuleResource{} + _ sdk.ResourceWithCustomizeDiff = DataCollectionRuleResource{} +) type DataCollectionRule struct { DataCollectionEndpointId string `tfschema:"data_collection_endpoint_id"` @@ -781,9 +782,7 @@ func (r DataCollectionRuleResource) Arguments() map[string]*pluginsdk.Schema { // lintignore:S013 "streams": { Type: pluginsdk.TypeList, - Optional: !features.FourPointOhBeta(), - Computed: !features.FourPointOhBeta(), - Required: features.FourPointOhBeta(), + Required: true, MinItems: 1, Elem: &pluginsdk.Schema{ Type: pluginsdk.TypeString, @@ -1256,7 +1255,6 @@ func expandDataCollectionRuleDataSourceDataImports(input []DataImport) *datacoll } return result - } func expandDataCollectionRuleDataSourceExtensions(input []Extension) (*[]datacollectionrules.ExtensionDataSource, error) { @@ -1447,9 +1445,6 @@ func expandDataCollectionRuleDataSourceSyslog(input []Syslog) *[]datacollectionr func expandDataCollectionRuleDataSourceSyslogStreams(input []string) *[]datacollectionrules.KnownSyslogDataSourceStreams { if len(input) == 0 { - if !features.FourPointOhBeta() { - return &[]datacollectionrules.KnownSyslogDataSourceStreams{datacollectionrules.KnownSyslogDataSourceStreamsMicrosoftNegativeSyslog} - } return nil } @@ -1854,7 +1849,6 @@ func flattenDataCollectionRuleDataSourceLogFiles(input *[]datacollectionrules.Lo }) } return result - } func flattenDataCollectionRuleDataSourcePerfCounters(input *[]datacollectionrules.PerfCounterDataSource) []PerfCounter { diff --git a/internal/services/monitor/monitor_diagnostic_categories_data_source.go b/internal/services/monitor/monitor_diagnostic_categories_data_source.go index 98457c8c1b474..6d23e224f3b65 100644 --- a/internal/services/monitor/monitor_diagnostic_categories_data_source.go +++ b/internal/services/monitor/monitor_diagnostic_categories_data_source.go @@ -12,7 +12,6 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" ) @@ -55,16 +54,6 @@ func dataSourceMonitorDiagnosticCategories() *pluginsdk.Resource { }, } - if !features.FourPointOhBeta() { - resource.Schema["logs"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeSet, - Elem: &pluginsdk.Schema{Type: pluginsdk.TypeString}, - Set: pluginsdk.HashString, - Computed: true, - Deprecated: "`logs` will be removed in favour of the property `log_category_types` in version 4.0 of the AzureRM Provider.", - } - } - return resource } @@ -124,12 +113,6 @@ func dataSourceMonitorDiagnosticCategoriesRead(d *pluginsdk.ResourceData, meta i return fmt.Errorf("setting `log_category_types`: %+v", err) } - if !features.FourPointOhBeta() { - if err := d.Set("logs", logs); err != nil { - return fmt.Errorf("setting `log`: %+v", err) - } - } - if err := d.Set("metrics", metrics); err != nil { return fmt.Errorf("setting `metrics`: %+v", err) } diff --git a/internal/services/monitor/monitor_diagnostic_setting_resource.go b/internal/services/monitor/monitor_diagnostic_setting_resource.go index 75ce969144ebf..3b9213205f5c7 100644 --- a/internal/services/monitor/monitor_diagnostic_setting_resource.go +++ b/internal/services/monitor/monitor_diagnostic_setting_resource.go @@ -19,7 +19,6 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" eventhubValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/eventhub/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/services/monitor/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -110,7 +109,6 @@ func resourceMonitorDiagnosticSetting() *pluginsdk.Resource { "enabled_log": { Type: pluginsdk.TypeSet, Optional: true, - Computed: !features.FourPointOhBeta(), AtLeastOneOf: []string{"enabled_log", "metric"}, Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ @@ -195,62 +193,6 @@ func resourceMonitorDiagnosticSetting() *pluginsdk.Resource { }, }, } - if !features.FourPointOhBeta() { - resource.Schema["log"] = &pluginsdk.Schema{ - Type: pluginsdk.TypeSet, - Optional: true, - Computed: true, - AtLeastOneOf: []string{"enabled_log", "log", "metric"}, - Deprecated: "`log` has been superseded by `enabled_log` and will be removed in version 4.0 of the AzureRM Provider.", - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "category": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "category_group": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: true, - }, - - "retention_policy": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Deprecated: "`retention_policy` has been deprecated in favor of `azurerm_storage_management_policy` resource - to learn more https://aka.ms/diagnostic_settings_log_retention", - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "enabled": { - Type: pluginsdk.TypeBool, - Required: true, - }, - - "days": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - }, - }, - }, - }, - }, - }, - Set: resourceMonitorDiagnosticLogSettingHash, - } - - resource.Schema["metric"].AtLeastOneOf = []string{"enabled_log", "log", "metric"} - resource.Schema["enabled_log"].AtLeastOneOf = []string{"enabled_log", "log", "metric"} - resource.Schema["enabled_log"].ConflictsWith = []string{"log"} - } return resource } @@ -280,23 +222,6 @@ func resourceMonitorDiagnosticSettingCreate(d *pluginsdk.ResourceData, meta inte var logs []diagnosticsettings.LogSettings hasEnabledLogs := false - if !features.FourPointOhBeta() { - logsRaw, ok := d.GetOk("log") - if ok && len(logsRaw.(*pluginsdk.Set).List()) > 0 { - expendLogs, err := expandMonitorDiagnosticsSettingsLogs(logsRaw.(*pluginsdk.Set).List()) - if err != nil { - return fmt.Errorf("expanding log: %+v", err) - } - logs = *expendLogs - for _, v := range logs { - if v.Enabled { - hasEnabledLogs = true - break - } - } - } - } - if enabledLogs, ok := d.GetOk("enabled_log"); ok { enabledLogsList := enabledLogs.(*pluginsdk.Set).List() if len(enabledLogsList) > 0 { @@ -361,6 +286,26 @@ func resourceMonitorDiagnosticSettingCreate(d *pluginsdk.ResourceData, meta inte return fmt.Errorf("creating Monitor Diagnostics Setting %q for Resource %q: %+v", id.DiagnosticSettingName, id.ResourceUri, err) } + deadline, ok := ctx.Deadline() + if !ok { + return fmt.Errorf("internal error: could not retrieve context deadline for %s", id.ID()) + } + + // https://github.com/Azure/azure-rest-api-specs/issues/30249 + log.Printf("[DEBUG] Waiting for Monitor Diagnostic Setting %q for Resource %q to become ready", id.DiagnosticSettingName, id.ResourceUri) + stateConf := &pluginsdk.StateChangeConf{ + Pending: []string{"NotFound"}, + Target: []string{"Exists"}, + Refresh: monitorDiagnosticSettingRefreshFunc(ctx, client, id), + MinTimeout: 5 * time.Second, + ContinuousTargetOccurence: 3, + Timeout: time.Until(deadline), + } + + if _, err = stateConf.WaitForStateContext(ctx); err != nil { + return fmt.Errorf("waiting for Monitor Diagnostic Setting %q for Resource %q to become ready: %s", id.DiagnosticSettingName, id.ResourceUri, err) + } + d.SetId(resourceId) return resourceMonitorDiagnosticSettingRead(d, meta) @@ -391,23 +336,6 @@ func resourceMonitorDiagnosticSettingUpdate(d *pluginsdk.ResourceData, meta inte var logs []diagnosticsettings.LogSettings hasEnabledLogs := false logChanged := false - if !features.FourPointOhBeta() { - if d.HasChange("log") { - logChanged = true - logsRaw := d.Get("log").(*pluginsdk.Set).List() - expandLogs, err := expandMonitorDiagnosticsSettingsLogs(logsRaw) - if err != nil { - return fmt.Errorf("expanding log: %+v", err) - } - logs = *expandLogs - for _, v := range logs { - if v.Enabled { - hasEnabledLogs = true - break - } - } - } - } if d.HasChange("enabled_log") { enabledLogs := d.Get("enabled_log").(*pluginsdk.Set).List() @@ -563,12 +491,6 @@ func resourceMonitorDiagnosticSettingRead(d *pluginsdk.ResourceData, meta interf return fmt.Errorf("setting `enabled_log`: %+v", err) } - if !features.FourPointOhBeta() { - if err = d.Set("log", flattenMonitorDiagnosticLogs(resp.Model.Properties.Logs)); err != nil { - return fmt.Errorf("setting `log`: %+v", err) - } - } - if err := d.Set("metric", flattenMonitorDiagnosticMetrics(resp.Model.Properties.Metrics)); err != nil { return fmt.Errorf("setting `metric`: %+v", err) } @@ -595,78 +517,43 @@ func resourceMonitorDiagnosticSettingDelete(d *pluginsdk.ResourceData, meta inte } } + deadline, ok := ctx.Deadline() + if !ok { + return fmt.Errorf("internal error: could not retrieve context deadline for %s", id.ID()) + } + // API appears to be eventually consistent (identified during tainting this resource) log.Printf("[DEBUG] Waiting for Monitor Diagnostic Setting %q for Resource %q to disappear", id.DiagnosticSettingName, id.ResourceUri) stateConf := &pluginsdk.StateChangeConf{ Pending: []string{"Exists"}, Target: []string{"NotFound"}, - Refresh: monitorDiagnosticSettingDeletedRefreshFunc(ctx, client, *id), + Refresh: monitorDiagnosticSettingRefreshFunc(ctx, client, *id), MinTimeout: 15 * time.Second, ContinuousTargetOccurence: 5, - Timeout: d.Timeout(pluginsdk.TimeoutDelete), + Timeout: time.Until(deadline), } if _, err = stateConf.WaitForStateContext(ctx); err != nil { - return fmt.Errorf("waiting for Monitor Diagnostic Setting %q for Resource %q to become available: %s", id.DiagnosticSettingName, id.ResourceUri, err) + return fmt.Errorf("waiting for Monitor Diagnostic Setting %q for Resource %q to disappear: %s", id.DiagnosticSettingName, id.ResourceUri, err) } return nil } -func monitorDiagnosticSettingDeletedRefreshFunc(ctx context.Context, client *diagnosticsettings.DiagnosticSettingsClient, targetResourceId diagnosticsettings.ScopedDiagnosticSettingId) pluginsdk.StateRefreshFunc { +func monitorDiagnosticSettingRefreshFunc(ctx context.Context, client *diagnosticsettings.DiagnosticSettingsClient, targetResourceId diagnosticsettings.ScopedDiagnosticSettingId) pluginsdk.StateRefreshFunc { return func() (interface{}, string, error) { res, err := client.Get(ctx, targetResourceId) if err != nil { if response.WasNotFound(res.HttpResponse) { return "NotFound", "NotFound", nil } - return nil, "", fmt.Errorf("issuing read request in monitorDiagnosticSettingDeletedRefreshFunc: %s", err) + return nil, "", fmt.Errorf("issuing read request in monitorDiagnosticSettingRefreshFunc: %s", err) } return res, "Exists", nil } } -func expandMonitorDiagnosticsSettingsLogs(input []interface{}) (*[]diagnosticsettings.LogSettings, error) { - results := make([]diagnosticsettings.LogSettings, 0) - - for _, raw := range input { - v := raw.(map[string]interface{}) - - category := v["category"].(string) - categoryGroup := v["category_group"].(string) - enabled := v["enabled"].(bool) - policiesRaw := v["retention_policy"].([]interface{}) - var retentionPolicy *diagnosticsettings.RetentionPolicy - if len(policiesRaw) != 0 { - policyRaw := policiesRaw[0].(map[string]interface{}) - retentionDays := policyRaw["days"].(int) - retentionEnabled := policyRaw["enabled"].(bool) - retentionPolicy = &diagnosticsettings.RetentionPolicy{ - Days: int64(retentionDays), - Enabled: retentionEnabled, - } - } - - output := diagnosticsettings.LogSettings{ - Enabled: enabled, - RetentionPolicy: retentionPolicy, - } - switch { - case category != "": - output.Category = utils.String(category) - case categoryGroup != "": - output.CategoryGroup = utils.String(categoryGroup) - default: - return nil, fmt.Errorf("exactly one of `category` or `category_group` must be specified") - } - - results = append(results, output) - } - - return &results, nil -} - func expandMonitorDiagnosticsSettingsEnabledLogs(input []interface{}) (*[]diagnosticsettings.LogSettings, error) { results := make([]diagnosticsettings.LogSettings, 0) @@ -707,45 +594,6 @@ func expandMonitorDiagnosticsSettingsEnabledLogs(input []interface{}) (*[]diagno return &results, nil } -func flattenMonitorDiagnosticLogs(input *[]diagnosticsettings.LogSettings) []interface{} { - results := make([]interface{}, 0) - if input == nil { - return results - } - - for _, v := range *input { - output := make(map[string]interface{}) - - if v.Category != nil { - output["category"] = *v.Category - } - - if v.CategoryGroup != nil { - output["category_group"] = *v.CategoryGroup - } - - output["enabled"] = v.Enabled - - policies := make([]interface{}, 0) - - if inputPolicy := v.RetentionPolicy; inputPolicy != nil { - outputPolicy := make(map[string]interface{}) - - outputPolicy["days"] = int(inputPolicy.Days) - - outputPolicy["enabled"] = inputPolicy.Enabled - - policies = append(policies, outputPolicy) - } - - output["retention_policy"] = policies - - results = append(results, output) - } - - return results -} - func flattenMonitorDiagnosticEnabledLogs(input *[]diagnosticsettings.LogSettings) []interface{} { enabledLogs := make([]interface{}, 0) if input == nil { diff --git a/internal/services/monitor/monitor_log_profile_data_source.go b/internal/services/monitor/monitor_log_profile_data_source.go deleted file mode 100644 index fcc0a6f90fcd9..0000000000000 --- a/internal/services/monitor/monitor_log_profile_data_source.go +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package monitor - -import ( - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" -) - -func dataSourceMonitorLogProfile() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Read: dataSourceLogProfileRead, - - DeprecationMessage: "Azure Log Profiles will be retired on 30th September 2026 and will be removed in v4.0 of the AzureRM Provider. More information on the deprecation can be found at https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/activity-log?tabs=powershell#legacy-collection-methods", - - Timeouts: &pluginsdk.ResourceTimeout{ - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - }, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - }, - "storage_account_id": { - Type: pluginsdk.TypeString, - Computed: true, - }, - "servicebus_rule_id": { - Type: pluginsdk.TypeString, - Computed: true, - }, - "locations": { - Type: pluginsdk.TypeList, - Computed: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - }, - }, - "categories": { - Type: pluginsdk.TypeList, - Computed: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - }, - }, - "retention_policy": { - Type: pluginsdk.TypeList, - Computed: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "enabled": { - Type: pluginsdk.TypeBool, - Computed: true, - }, - "days": { - Type: pluginsdk.TypeInt, - Computed: true, - }, - }, - }, - }, - }, - } -} - -func dataSourceLogProfileRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Monitor.LogProfilesClient - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := logprofiles.NewLogProfileID(subscriptionId, d.Get("name").(string)) - - resp, err := client.Get(ctx, id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - return fmt.Errorf("%s was not found", id) - } - return fmt.Errorf("reading Log Profile: %+v", err) - } - - d.SetId(id.ID()) - - if model := resp.Model; model != nil { - props := model.Properties - - d.Set("storage_account_id", props.StorageAccountId) - d.Set("servicebus_rule_id", props.ServiceBusRuleId) - d.Set("categories", props.Categories) - - if err := d.Set("locations", flattenAzureRmLogProfileLocations(props.Locations)); err != nil { - return fmt.Errorf("setting `locations`: %+v", err) - } - - if err := d.Set("retention_policy", flattenAzureRmLogProfileRetentionPolicy(props.RetentionPolicy)); err != nil { - return fmt.Errorf("setting `retention_policy`: %+v", err) - } - } - - return nil -} diff --git a/internal/services/monitor/monitor_log_profile_data_source_test.go b/internal/services/monitor/monitor_log_profile_data_source_test.go deleted file mode 100644 index 7cbda6c047dbf..0000000000000 --- a/internal/services/monitor/monitor_log_profile_data_source_test.go +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package monitor_test - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" -) - -type MonitorLogProfileDataSource struct{} - -// These tests are actually run as part of the resoure ones due to -// Azure only being happy about provisioning one per subscription at once -// (which our test suite can't easily workaround) - -func testAccDataSourceMonitorLogProfile_storageaccount(t *testing.T) { - data := acceptance.BuildTestData(t, "data.azurerm_monitor_log_profile", "test") - r := MonitorLogProfileDataSource{} - - data.DataSourceTestInSequence(t, []acceptance.TestStep{ - { - Config: r.storageaccountConfig(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).Key("name").Exists(), - check.That(data.ResourceName).Key("categories.#").Exists(), - check.That(data.ResourceName).Key("locations.#").Exists(), - check.That(data.ResourceName).Key("storage_account_id").Exists(), - check.That(data.ResourceName).Key("servicebus_rule_id").HasValue(""), - check.That(data.ResourceName).Key("retention_policy.#").HasValue("1"), - check.That(data.ResourceName).Key("retention_policy.0.enabled").Exists(), - check.That(data.ResourceName).Key("retention_policy.0.days").Exists(), - ), - }, - }) -} - -func testAccDataSourceMonitorLogProfile_eventhub(t *testing.T) { - data := acceptance.BuildTestData(t, "data.azurerm_monitor_log_profile", "test") - r := MonitorLogProfileDataSource{} - - data.DataSourceTestInSequence(t, []acceptance.TestStep{ - { - Config: r.eventhubConfig(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).Key("name").Exists(), - check.That(data.ResourceName).Key("categories.#").Exists(), - check.That(data.ResourceName).Key("locations.#").Exists(), - check.That(data.ResourceName).Key("storage_account_id").HasValue(""), - check.That(data.ResourceName).Key("servicebus_rule_id").Exists(), - check.That(data.ResourceName).Key("retention_policy.#").HasValue("1"), - check.That(data.ResourceName).Key("retention_policy.0.enabled").Exists(), - check.That(data.ResourceName).Key("retention_policy.0.days").Exists(), - ), - }, - }) -} - -func (MonitorLogProfileDataSource) storageaccountConfig(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_storage_account" "test" { - name = "acctestsa%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_monitor_log_profile" "test" { - name = "acctestlp-%d" - - categories = [ - "Action", - ] - - locations = [ - "%s", - ] - - storage_account_id = azurerm_storage_account.test.id - - retention_policy { - enabled = true - days = 7 - } -} - -data "azurerm_monitor_log_profile" "test" { - name = azurerm_monitor_log_profile.test.name -} -`, data.RandomInteger, data.Locations.Primary, data.RandomString, data.RandomInteger, data.Locations.Primary) -} - -func (MonitorLogProfileDataSource) eventhubConfig(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_eventhub_namespace" "test" { - name = "acctestehns-%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku = "Standard" - capacity = 2 -} - -resource "azurerm_monitor_log_profile" "test" { - name = "acctestlp-%d" - - categories = [ - "Action", - ] - - locations = [ - "%s", - ] - - # RootManageSharedAccessKey is created by default with listen, send, manage permissions - servicebus_rule_id = "${azurerm_eventhub_namespace.test.id}/authorizationrules/RootManageSharedAccessKey" - - retention_policy { - enabled = true - days = 7 - } -} - -data "azurerm_monitor_log_profile" "test" { - name = azurerm_monitor_log_profile.test.name -} -`, data.RandomInteger, data.Locations.Primary, data.RandomString, data.RandomInteger, data.Locations.Primary) -} diff --git a/internal/services/monitor/monitor_log_profile_resource.go b/internal/services/monitor/monitor_log_profile_resource.go deleted file mode 100644 index cc02836d953c8..0000000000000 --- a/internal/services/monitor/monitor_log_profile_resource.go +++ /dev/null @@ -1,322 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package monitor - -import ( - "context" - "fmt" - "log" - "strings" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/monitor/migration" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/suppress" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceMonitorLogProfile() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceLogProfileCreateUpdate, - Read: resourceLogProfileRead, - Update: resourceLogProfileCreateUpdate, - Delete: resourceLogProfileDelete, - - DeprecationMessage: "Azure Log Profiles will be retired on 30th September 2026 and will be removed in v4.0 of the AzureRM Provider. More information on the deprecation can be found at https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/activity-log?tabs=powershell#legacy-collection-methods", - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := logprofiles.ParseLogProfileID(id) - return err - }), - - SchemaVersion: 1, - StateUpgraders: pluginsdk.StateUpgrades(map[int]pluginsdk.StateUpgrade{ - 0: migration.LogProfileUpgradeV0ToV1{}, - }), - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - "storage_account_id": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: commonids.ValidateStorageAccountID, - }, - "servicebus_rule_id": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: azure.ValidateResourceID, - }, - "locations": { - Type: pluginsdk.TypeSet, - MinItems: 1, - Required: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - StateFunc: location.StateFunc, - DiffSuppressFunc: location.DiffSuppressFunc, - }, - Set: pluginsdk.HashString, - }, - "categories": { - Type: pluginsdk.TypeSet, - Required: true, - MinItems: 1, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - DiffSuppressFunc: suppress.CaseDifference, - }, - Set: pluginsdk.HashString, - }, - "retention_policy": { - Type: pluginsdk.TypeList, - Required: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "enabled": { - Type: pluginsdk.TypeBool, - Required: true, - }, - "days": { - Type: pluginsdk.TypeInt, - Optional: true, - Default: 0, - }, - }, - }, - }, - }, - } -} - -func resourceLogProfileCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Monitor.LogProfilesClient - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := logprofiles.NewLogProfileID(subscriptionId, d.Get("name").(string)) - - if d.IsNewResource() { - existing, err := client.Get(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for presence of existing Monitor %s: %+v", id, err) - } - } - - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_monitor_log_profile", id.ID()) - } - } - - storageAccountID := d.Get("storage_account_id").(string) - serviceBusRuleID := d.Get("servicebus_rule_id").(string) - categories := expandLogProfileCategories(d) - locations := expandLogProfileLocations(d) - retentionPolicy := expandAzureRmLogProfileRetentionPolicy(d) - - logProfileProperties := logprofiles.LogProfileProperties{ - Categories: categories, - Locations: locations, - RetentionPolicy: retentionPolicy, - } - - if storageAccountID != "" { - logProfileProperties.StorageAccountId = utils.String(storageAccountID) - } - - if serviceBusRuleID != "" { - logProfileProperties.ServiceBusRuleId = utils.String(serviceBusRuleID) - } - - parameters := logprofiles.LogProfileResource{ - Name: utils.String(id.LogProfileName), - Properties: logProfileProperties, - } - - if _, err := client.CreateOrUpdate(ctx, id, parameters); err != nil { - return fmt.Errorf("creating/updating Monitor %s: %+v", id, err) - } - - log.Printf("[DEBUG] Waiting for %s to be provisioned", id) - stateConf := &pluginsdk.StateChangeConf{ - Pending: []string{"NotFound"}, - Target: []string{"Available"}, - Refresh: logProfilesCreateRefreshFunc(ctx, client, id), - MinTimeout: 15 * time.Second, - ContinuousTargetOccurence: 5, - } - if d.IsNewResource() { - stateConf.Timeout = d.Timeout(pluginsdk.TimeoutCreate) - } else { - stateConf.Timeout = d.Timeout(pluginsdk.TimeoutUpdate) - } - - if _, err := stateConf.WaitForStateContext(ctx); err != nil { - return fmt.Errorf("waiting for %s to become available: %+v", id, err) - } - - d.SetId(id.ID()) - - return resourceLogProfileRead(d, meta) -} - -func resourceLogProfileRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Monitor.LogProfilesClient - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := logprofiles.ParseLogProfileID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - log.Printf("[DEBUG] %s - removing from state!", *id) - d.SetId("") - return nil - } - return fmt.Errorf("making Read request on %s: %+v", *id, err) - } - - d.Set("name", id.LogProfileName) - - if model := resp.Model; model != nil { - props := model.Properties - d.Set("storage_account_id", props.StorageAccountId) - d.Set("servicebus_rule_id", props.ServiceBusRuleId) - d.Set("categories", props.Categories) - - if err := d.Set("locations", flattenAzureRmLogProfileLocations(props.Locations)); err != nil { - return fmt.Errorf("setting `locations`: %+v", err) - } - - if err := d.Set("retention_policy", flattenAzureRmLogProfileRetentionPolicy(props.RetentionPolicy)); err != nil { - return fmt.Errorf("setting `retention_policy`: %+v", err) - } - } - - return nil -} - -func resourceLogProfileDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Monitor.LogProfilesClient - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := logprofiles.ParseLogProfileID(d.Id()) - if err != nil { - return err - } - - if _, err = client.Delete(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - - return nil -} - -func expandLogProfileCategories(d *pluginsdk.ResourceData) []string { - logProfileCategories := d.Get("categories").(*pluginsdk.Set).List() - categories := make([]string, 0) - - for _, category := range logProfileCategories { - categories = append(categories, category.(string)) - } - - return categories -} - -func expandLogProfileLocations(d *pluginsdk.ResourceData) []string { - logProfileLocations := d.Get("locations").(*pluginsdk.Set).List() - locations := make([]string, 0) - - for _, location := range logProfileLocations { - locations = append(locations, azure.NormalizeLocation(location.(string))) - } - - return locations -} - -func expandAzureRmLogProfileRetentionPolicy(d *pluginsdk.ResourceData) logprofiles.RetentionPolicy { - vs := d.Get("retention_policy").([]interface{}) - v := vs[0].(map[string]interface{}) - - enabled := v["enabled"].(bool) - days := v["days"].(int) - logProfileRetentionPolicy := logprofiles.RetentionPolicy{ - Enabled: enabled, - Days: int64(days), - } - - return logProfileRetentionPolicy -} - -func flattenAzureRmLogProfileLocations(input []string) []string { - result := make([]string, 0) - for _, location := range input { - result = append(result, azure.NormalizeLocation(location)) - } - return result -} - -func flattenAzureRmLogProfileRetentionPolicy(input logprofiles.RetentionPolicy) []interface{} { - result := make(map[string]interface{}) - result["enabled"] = input.Enabled - - result["days"] = input.Days - - return []interface{}{result} -} - -func ParseLogProfileNameFromID(id string) (string, error) { - components := strings.Split(id, "/") - - if len(components) == 0 { - return "", fmt.Errorf("Azure Log Profile ID is empty or not formatted correctly: %s", id) - } - - if len(components) != 7 { - return "", fmt.Errorf("Azure Log Profile ID should have 6 segments, got %d: '%s'", len(components)-1, id) - } - - return components[6], nil -} - -func logProfilesCreateRefreshFunc(ctx context.Context, client *logprofiles.LogProfilesClient, id logprofiles.LogProfileId) pluginsdk.StateRefreshFunc { - return func() (interface{}, string, error) { - logProfile, err := client.Get(ctx, id) - if err != nil { - if response.WasNotFound(logProfile.HttpResponse) { - return nil, "NotFound", nil - } - return nil, "", fmt.Errorf("issuing read request in logProfilesCreateRefreshFunc for %s: %s", id, err) - } - return "Available", "Available", nil - } -} diff --git a/internal/services/monitor/monitor_log_profile_resource_test.go b/internal/services/monitor/monitor_log_profile_resource_test.go deleted file mode 100644 index 679eb60e69ee1..0000000000000 --- a/internal/services/monitor/monitor_log_profile_resource_test.go +++ /dev/null @@ -1,312 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package monitor_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type MonitorLogProfileResource struct{} - -// NOTE: this is a combined test rather than separate split out tests due to -// Azure only being happy about provisioning one per subscription at once -// (which our test suite can't easily workaround) - -// this occasionally fails due to the rapid provisioning and deprovisioning, -// running the exact same test afterwards always results in a pass. - -func TestAccMonitorLogProfile(t *testing.T) { - testCases := map[string]map[string]func(t *testing.T){ - "basic": { - "basic": testAccMonitorLogProfile_basic, - "requiresImport": testAccMonitorLogProfile_requiresImport, - "servicebus": testAccMonitorLogProfile_servicebus, - "complete": testAccMonitorLogProfile_complete, - "disappears": testAccMonitorLogProfile_disappears, - }, - "datasource": { - "eventhub": testAccDataSourceMonitorLogProfile_eventhub, - "storageaccount": testAccDataSourceMonitorLogProfile_storageaccount, - }, - } - - for group, m := range testCases { - m := m - t.Run(group, func(t *testing.T) { - for name, tc := range m { - tc := tc - t.Run(name, func(t *testing.T) { - tc(t) - }) - } - }) - } -} - -func testAccMonitorLogProfile_basic(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_monitor_log_profile", "test") - r := MonitorLogProfileResource{} - - data.ResourceSequentialTest(t, r, []acceptance.TestStep{ - { - Config: r.basicConfig(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func testAccMonitorLogProfile_requiresImport(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_monitor_log_profile", "test") - r := MonitorLogProfileResource{} - - data.ResourceSequentialTest(t, r, []acceptance.TestStep{ - { - Config: r.basicConfig(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - { - Config: r.requiresImportConfig(data), - ExpectError: acceptance.RequiresImportError("azurerm_monitor_log_profile"), - }, - }) -} - -func testAccMonitorLogProfile_servicebus(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_monitor_log_profile", "test") - r := MonitorLogProfileResource{} - - data.ResourceSequentialTest(t, r, []acceptance.TestStep{ - { - Config: r.servicebusConfig(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - }) -} - -func testAccMonitorLogProfile_complete(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_monitor_log_profile", "test") - r := MonitorLogProfileResource{} - - data.ResourceSequentialTest(t, r, []acceptance.TestStep{ - { - Config: r.completeConfig(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - }) -} - -func testAccMonitorLogProfile_disappears(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_monitor_log_profile", "test") - r := MonitorLogProfileResource{} - - data.ResourceSequentialTest(t, r, []acceptance.TestStep{ - data.DisappearsStep(acceptance.DisappearsStepData{ - Config: r.basicConfig, - TestResource: r, - }), - }) -} - -func (t MonitorLogProfileResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := logprofiles.ParseLogProfileID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.Monitor.LogProfilesClient.Get(ctx, *id) - if err != nil { - return nil, fmt.Errorf("reading %s: %+v", *id, err) - } - - return utils.Bool(resp.Model != nil), nil -} - -func (t MonitorLogProfileResource) Destroy(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := logprofiles.ParseLogProfileID(state.ID) - if err != nil { - return nil, err - } - - if _, err := clients.Monitor.LogProfilesClient.Delete(ctx, *id); err != nil { - return nil, fmt.Errorf("deleting %s: %+v", *id, err) - } - - return utils.Bool(true), nil -} - -func (MonitorLogProfileResource) basicConfig(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_storage_account" "test" { - name = "acctestsa%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_monitor_log_profile" "test" { - name = "acctestlp-%d" - - categories = [ - "Action", - ] - - locations = [ - "%s", - ] - - storage_account_id = azurerm_storage_account.test.id - - retention_policy { - enabled = true - days = 7 - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomString, data.RandomInteger, data.Locations.Primary) -} - -func (r MonitorLogProfileResource) requiresImportConfig(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_monitor_log_profile" "import" { - name = azurerm_monitor_log_profile.test.name - categories = azurerm_monitor_log_profile.test.categories - locations = azurerm_monitor_log_profile.test.locations - storage_account_id = azurerm_monitor_log_profile.test.storage_account_id - - retention_policy { - enabled = true - days = 7 - } -} -`, r.basicConfig(data)) -} - -func (MonitorLogProfileResource) servicebusConfig(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_servicebus_namespace" "test" { - name = "acctestsbns-%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku = "Standard" -} - -resource "azurerm_servicebus_namespace_authorization_rule" "test" { - name = "acctestsbrule-%s" - namespace_id = azurerm_servicebus_namespace.test.id - - listen = true - send = true - manage = true -} - -resource "azurerm_monitor_log_profile" "test" { - name = "acctestlp-%d" - - categories = [ - "Action", - ] - - locations = [ - "%s", - ] - - servicebus_rule_id = azurerm_servicebus_namespace_authorization_rule.test.id - - retention_policy { - enabled = false - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomString, data.RandomString, data.RandomInteger, data.Locations.Primary) -} - -func (MonitorLogProfileResource) completeConfig(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_storage_account" "test" { - name = "acctestsa%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_eventhub_namespace" "test" { - name = "acctestehns-%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - sku = "Standard" - capacity = 2 -} - -resource "azurerm_monitor_log_profile" "test" { - name = "acctestlp-%d" - - categories = [ - "Action", - "Delete", - "Write", - ] - - locations = [ - "%s", - "%s", - ] - - # RootManageSharedAccessKey is created by default with listen, send, manage permissions - servicebus_rule_id = "${azurerm_eventhub_namespace.test.id}/authorizationrules/RootManageSharedAccessKey" - storage_account_id = azurerm_storage_account.test.id - - retention_policy { - enabled = true - days = 7 - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomString, data.RandomString, data.RandomInteger, data.Locations.Primary, data.Locations.Secondary) -} diff --git a/internal/services/monitor/monitor_scheduled_query_rules_alert_v2_resource.go b/internal/services/monitor/monitor_scheduled_query_rules_alert_v2_resource.go index ad64ac7455415..dd565a2ce39fe 100644 --- a/internal/services/monitor/monitor_scheduled_query_rules_alert_v2_resource.go +++ b/internal/services/monitor/monitor_scheduled_query_rules_alert_v2_resource.go @@ -14,7 +14,6 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2023-03-15-preview/scheduledqueryrules" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" @@ -216,8 +215,7 @@ func (r ScheduledQueryRulesAlertV2Resource) Arguments() map[string]*pluginsdk.Sc "evaluation_frequency": { Type: pluginsdk.TypeString, // this field is required, missing this field will get an error from service - Optional: !features.FourPointOhBeta(), - Required: features.FourPointOhBeta(), + Required: true, ValidateFunc: validation.StringInSlice([]string{ "PT1M", "PT5M", diff --git a/internal/services/monitor/parse/log_profile.go b/internal/services/monitor/parse/log_profile.go deleted file mode 100644 index d9b3e27a00612..0000000000000 --- a/internal/services/monitor/parse/log_profile.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -type LogProfileId struct { - SubscriptionId string - Name string -} - -func NewLogProfileID(subscriptionId, name string) LogProfileId { - return LogProfileId{ - SubscriptionId: subscriptionId, - Name: name, - } -} - -func (id LogProfileId) String() string { - segments := []string{ - fmt.Sprintf("Name %q", id.Name), - } - segmentsStr := strings.Join(segments, " / ") - return fmt.Sprintf("%s: (%s)", "Log Profile", segmentsStr) -} - -func (id LogProfileId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Insights/logProfiles/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.Name) -} - -// LogProfileID parses a LogProfile ID into an LogProfileId struct -func LogProfileID(input string) (*LogProfileId, error) { - id, err := resourceids.ParseAzureResourceID(input) - if err != nil { - return nil, err - } - - resourceId := LogProfileId{ - SubscriptionId: id.SubscriptionID, - } - - if resourceId.SubscriptionId == "" { - return nil, fmt.Errorf("ID was missing the 'subscriptions' element") - } - - if resourceId.Name, err = id.PopSegment("logProfiles"); err != nil { - return nil, err - } - - if err := id.ValidateNoEmptySegments(input); err != nil { - return nil, err - } - - return &resourceId, nil -} diff --git a/internal/services/monitor/parse/log_profile_test.go b/internal/services/monitor/parse/log_profile_test.go deleted file mode 100644 index 4bb64c539f2d2..0000000000000 --- a/internal/services/monitor/parse/log_profile_test.go +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.Id = LogProfileId{} - -func TestLogProfileIDFormatter(t *testing.T) { - actual := NewLogProfileID("12345678-1234-9876-4563-123456789012", "profile1").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Insights/logProfiles/profile1" - if actual != expected { - t.Fatalf("Expected %q but got %q", expected, actual) - } -} - -func TestLogProfileID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LogProfileId - }{ - - { - // empty - Input: "", - Error: true, - }, - - { - // missing SubscriptionId - Input: "/", - Error: true, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Error: true, - }, - - { - // missing Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Insights/", - Error: true, - }, - - { - // missing value for Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Insights/logProfiles/", - Error: true, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Insights/logProfiles/profile1", - Expected: &LogProfileId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - Name: "profile1", - }, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/PROVIDERS/MICROSOFT.INSIGHTS/LOGPROFILES/PROFILE1", - Error: true, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := LogProfileID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %s", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - if actual.Name != v.Expected.Name { - t.Fatalf("Expected %q but got %q for Name", v.Expected.Name, actual.Name) - } - } -} diff --git a/internal/services/monitor/registration.go b/internal/services/monitor/registration.go index 269a7ee157c76..02b077b65a571 100644 --- a/internal/services/monitor/registration.go +++ b/internal/services/monitor/registration.go @@ -4,7 +4,6 @@ package monitor import ( - "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" ) @@ -62,10 +61,6 @@ func (r Registration) SupportedDataSources() map[string]*pluginsdk.Resource { "azurerm_monitor_scheduled_query_rules_log": dataSourceMonitorScheduledQueryRulesLog(), } - if !features.FourPointOhBeta() { - dataSources["azurerm_monitor_log_profile"] = dataSourceMonitorLogProfile() - } - return dataSources } @@ -77,7 +72,6 @@ func (r Registration) SupportedResources() map[string]*pluginsdk.Resource { "azurerm_monitor_action_group": resourceMonitorActionGroup(), "azurerm_monitor_activity_log_alert": resourceMonitorActivityLogAlert(), "azurerm_monitor_diagnostic_setting": resourceMonitorDiagnosticSetting(), - "azurerm_monitor_log_profile": resourceMonitorLogProfile(), "azurerm_monitor_metric_alert": resourceMonitorMetricAlert(), "azurerm_monitor_private_link_scope": resourceMonitorPrivateLinkScope(), "azurerm_monitor_private_link_scoped_service": resourceMonitorPrivateLinkScopedService(), @@ -86,10 +80,5 @@ func (r Registration) SupportedResources() map[string]*pluginsdk.Resource { "azurerm_monitor_smart_detector_alert_rule": resourceMonitorSmartDetectorAlertRule(), } - if !features.FourPointOhBeta() { - resources["azurerm_monitor_action_rule_action_group"] = resourceMonitorActionRuleActionGroup() - resources["azurerm_monitor_action_rule_suppression"] = resourceMonitorActionRuleSuppression() - } - return resources } diff --git a/internal/services/monitor/validate/action_rule_name.go b/internal/services/monitor/validate/action_rule_name.go deleted file mode 100644 index 1a1941219b376..0000000000000 --- a/internal/services/monitor/validate/action_rule_name.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "fmt" - "regexp" -) - -func ActionRuleName(i interface{}, k string) (warning []string, errors []error) { - v, ok := i.(string) - if !ok { - return nil, append(errors, fmt.Errorf("expected type of %s to be string", k)) - } - - if !regexp.MustCompile(`^([a-zA-Z\d])[a-zA-Z\d-_]*$`).MatchString(v) { - errors = append(errors, fmt.Errorf("%s should begin with a letter or number, contain only letters, numbers, underscores and hyphens.", k)) - } - - return -} diff --git a/internal/services/monitor/validate/action_rule_name_test.go b/internal/services/monitor/validate/action_rule_name_test.go deleted file mode 100644 index 585b3a865a15c..0000000000000 --- a/internal/services/monitor/validate/action_rule_name_test.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "testing" -) - -func TestActionRuleName(t *testing.T) { - testData := []struct { - input string - expected bool - }{ - { - // empty - input: "", - expected: false, - }, - { - // basic example, lead by lower case letter - input: "a", - expected: true, - }, - { - // basic example, lead by upper case letter - input: "A", - expected: true, - }, - { - // basic example, lead by number - input: "8", - expected: true, - }, - { - // basic example, contain underscore - input: "a_b", - expected: true, - }, - { - // basic example, end with underscore - input: "ab_", - expected: true, - }, - { - // basic example, end with hyphen - input: "ab-", - expected: true, - }, - { - // can not contain '+' - input: "a+", - expected: false, - }, - { - // can't lead by '-' - input: "-a", - expected: false, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q..", v.input) - - _, errors := ActionRuleName(v.input, "name") - actual := len(errors) == 0 - if v.expected != actual { - t.Fatalf("Expected %t but got %t", v.expected, actual) - } - } -} diff --git a/internal/services/monitor/validate/alert_processing_rule_name.go b/internal/services/monitor/validate/alert_processing_rule_name.go new file mode 100644 index 0000000000000..a84b2c9e72096 --- /dev/null +++ b/internal/services/monitor/validate/alert_processing_rule_name.go @@ -0,0 +1,22 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package validate + +import ( + "fmt" + "regexp" +) + +func AlertProcessingRuleName(i interface{}, k string) (warning []string, errors []error) { + v, ok := i.(string) + if !ok { + return nil, append(errors, fmt.Errorf("expected type of %s to be string", k)) + } + + if !regexp.MustCompile(`^([a-zA-Z\d])[a-zA-Z\d-_]*$`).MatchString(v) { + errors = append(errors, fmt.Errorf("%s should begin with a letter or number, contain only letters, numbers, underscores and hyphens.", k)) + } + + return +} diff --git a/internal/services/monitor/validate/alert_processing_rule_name_test.go b/internal/services/monitor/validate/alert_processing_rule_name_test.go new file mode 100644 index 0000000000000..f42d670a71988 --- /dev/null +++ b/internal/services/monitor/validate/alert_processing_rule_name_test.go @@ -0,0 +1,71 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package validate + +import ( + "testing" +) + +func TestAlertProcessingRuleName(t *testing.T) { + testData := []struct { + input string + expected bool + }{ + { + // empty + input: "", + expected: false, + }, + { + // basic example, lead by lower case letter + input: "a", + expected: true, + }, + { + // basic example, lead by upper case letter + input: "A", + expected: true, + }, + { + // basic example, lead by number + input: "8", + expected: true, + }, + { + // basic example, contain underscore + input: "a_b", + expected: true, + }, + { + // basic example, end with underscore + input: "ab_", + expected: true, + }, + { + // basic example, end with hyphen + input: "ab-", + expected: true, + }, + { + // can not contain '+' + input: "a+", + expected: false, + }, + { + // can't lead by '-' + input: "-a", + expected: false, + }, + } + + for _, v := range testData { + t.Logf("[DEBUG] Testing %q..", v.input) + + _, errors := AlertProcessingRuleName(v.input, "name") + actual := len(errors) == 0 + if v.expected != actual { + t.Fatalf("Expected %t but got %t", v.expected, actual) + } + } +} diff --git a/internal/services/mssql/client/client.go b/internal/services/mssql/client/client.go index a03efc5a44117..aacf1dd541173 100644 --- a/internal/services/mssql/client/client.go +++ b/internal/services/mssql/client/client.go @@ -7,20 +7,33 @@ import ( "fmt" "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules" "github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners" "github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinegroups" "github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines" @@ -29,38 +42,37 @@ import ( type Client struct { BackupShortTermRetentionPoliciesClient *backupshorttermretentionpolicies.BackupShortTermRetentionPoliciesClient - DatabaseExtendedBlobAuditingPoliciesClient *sql.ExtendedDatabaseBlobAuditingPoliciesClient + BlobAuditingPoliciesClient *blobauditing.BlobAuditingClient DatabaseSecurityAlertPoliciesClient *databasesecurityalertpolicies.DatabaseSecurityAlertPoliciesClient - DatabaseVulnerabilityAssessmentRuleBaselinesClient *sql.DatabaseVulnerabilityAssessmentRuleBaselinesClient + DatabaseVulnerabilityAssessmentRuleBaselinesClient *databasevulnerabilityassessmentrulebaselines.DatabaseVulnerabilityAssessmentRuleBaselinesClient DatabasesClient *databases.DatabasesClient ElasticPoolsClient *elasticpools.ElasticPoolsClient - EncryptionProtectorClient *sql.EncryptionProtectorsClient - FailoverGroupsClient *sql.FailoverGroupsClient - FirewallRulesClient *sql.FirewallRulesClient + EncryptionProtectorClient *encryptionprotectors.EncryptionProtectorsClient + FailoverGroupsClient *failovergroups.FailoverGroupsClient + FirewallRulesClient *firewallrules.FirewallRulesClient GeoBackupPoliciesClient *geobackuppolicies.GeoBackupPoliciesClient - JobAgentsClient *sql.JobAgentsClient - JobCredentialsClient *sql.JobCredentialsClient + JobAgentsClient *jobagents.JobAgentsClient + JobCredentialsClient *jobcredentials.JobCredentialsClient LongTermRetentionPoliciesClient *longtermretentionpolicies.LongTermRetentionPoliciesClient - OutboundFirewallRulesClient *sql.OutboundFirewallRulesClient + OutboundFirewallRulesClient *outboundfirewallrules.OutboundFirewallRulesClient ReplicationLinksClient *replicationlinks.ReplicationLinksClient LegacyReplicationLinksClient *sql.ReplicationLinksClient RestorableDroppedDatabasesClient *restorabledroppeddatabases.RestorableDroppedDatabasesClient ServerAzureADAdministratorsClient *serverazureadadministrators.ServerAzureADAdministratorsClient ServerAzureADOnlyAuthenticationsClient *serverazureadonlyauthentications.ServerAzureADOnlyAuthenticationsClient ServerConnectionPoliciesClient *serverconnectionpolicies.ServerConnectionPoliciesClient - ServerDNSAliasClient *sql.ServerDNSAliasesClient - ServerExtendedBlobAuditingPoliciesClient *sql.ExtendedServerBlobAuditingPoliciesClient - ServerDevOpsAuditSettingsClient *sql.ServerDevOpsAuditSettingsClient - ServerKeysClient *sql.ServerKeysClient + ServerDNSAliasClient *serverdnsaliases.ServerDnsAliasesClient + ServerDevOpsAuditSettingsClient *serverdevopsaudit.ServerDevOpsAuditClient + ServerKeysClient *serverkeys.ServerKeysClient ServerSecurityAlertPoliciesClient *serversecurityalertpolicies.ServerSecurityAlertPoliciesClient LegacyServerSecurityAlertPoliciesClient *sql.ServerSecurityAlertPoliciesClient - ServerVulnerabilityAssessmentsClient *sql.ServerVulnerabilityAssessmentsClient + ServerVulnerabilityAssessmentsClient *servervulnerabilityassessments.ServerVulnerabilityAssessmentsClient ServersClient *servers.ServersClient TransparentDataEncryptionsClient *transparentdataencryptions.TransparentDataEncryptionsClient VirtualMachinesAvailabilityGroupListenersClient *availabilitygrouplisteners.AvailabilityGroupListenersClient VirtualMachinesClient *sqlvirtualmachines.SqlVirtualMachinesClient VirtualMachineGroupsClient *sqlvirtualmachinegroups.SqlVirtualMachineGroupsClient - VirtualNetworkRulesClient *sql.VirtualNetworkRulesClient + VirtualNetworkRulesClient *virtualnetworkrules.VirtualNetworkRulesClient } func NewClient(o *common.ClientOptions) (*Client, error) { @@ -70,8 +82,11 @@ func NewClient(o *common.ClientOptions) (*Client, error) { } o.Configure(backupShortTermRetentionPoliciesClient.Client, o.Authorizers.ResourceManager) - databaseExtendedBlobAuditingPoliciesClient := sql.NewExtendedDatabaseBlobAuditingPoliciesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) - o.ConfigureClient(&databaseExtendedBlobAuditingPoliciesClient.Client, o.ResourceManagerAuthorizer) + databaseExtendedBlobAuditingPoliciesClient, err := blobauditing.NewBlobAuditingClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building Blob Auditing Policies Client: %+v", err) + } + o.Configure(databaseExtendedBlobAuditingPoliciesClient.Client, o.Authorizers.ResourceManager) databaseSecurityAlertPoliciesClient, err := databasesecurityalertpolicies.NewDatabaseSecurityAlertPoliciesClientWithBaseURI(o.Environment.ResourceManager) if err != nil { @@ -79,8 +94,11 @@ func NewClient(o *common.ClientOptions) (*Client, error) { } o.Configure(databaseSecurityAlertPoliciesClient.Client, o.Authorizers.ResourceManager) - databaseVulnerabilityAssessmentRuleBaselinesClient := sql.NewDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) - o.ConfigureClient(&databaseVulnerabilityAssessmentRuleBaselinesClient.Client, o.ResourceManagerAuthorizer) + databaseVulnerabilityAssessmentRuleBaselinesClient, err := databasevulnerabilityassessmentrulebaselines.NewDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building Database Vulnerability Assessment Rule Baselines Client: %+v", err) + } + o.Configure(databaseVulnerabilityAssessmentRuleBaselinesClient.Client, o.Authorizers.ResourceManager) databasesClient, err := databases.NewDatabasesClientWithBaseURI(o.Environment.ResourceManager) if err != nil { @@ -94,14 +112,23 @@ func NewClient(o *common.ClientOptions) (*Client, error) { } o.Configure(elasticPoolsClient.Client, o.Authorizers.ResourceManager) - encryptionProtectorClient := sql.NewEncryptionProtectorsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) - o.ConfigureClient(&encryptionProtectorClient.Client, o.ResourceManagerAuthorizer) + encryptionProtectorClient, err := encryptionprotectors.NewEncryptionProtectorsClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building Encryption Protectors Client: %+v", err) + } + o.Configure(encryptionProtectorClient.Client, o.Authorizers.ResourceManager) - failoverGroupsClient := sql.NewFailoverGroupsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) - o.ConfigureClient(&failoverGroupsClient.Client, o.ResourceManagerAuthorizer) + failoverGroupsClient, err := failovergroups.NewFailoverGroupsClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building Failover Groups Client: %+v", err) + } + o.Configure(failoverGroupsClient.Client, o.Authorizers.ResourceManager) - firewallRulesClient := sql.NewFirewallRulesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) - o.ConfigureClient(&firewallRulesClient.Client, o.ResourceManagerAuthorizer) + firewallRulesClient, err := firewallrules.NewFirewallRulesClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building Firewall Rules Client: %+v", err) + } + o.Configure(firewallRulesClient.Client, o.Authorizers.ResourceManager) geoBackupPoliciesClient, err := geobackuppolicies.NewGeoBackupPoliciesClientWithBaseURI(o.Environment.ResourceManager) if err != nil { @@ -109,11 +136,17 @@ func NewClient(o *common.ClientOptions) (*Client, error) { } o.Configure(geoBackupPoliciesClient.Client, o.Authorizers.ResourceManager) - jobAgentsClient := sql.NewJobAgentsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) - o.ConfigureClient(&jobAgentsClient.Client, o.ResourceManagerAuthorizer) + jobAgentsClient, err := jobagents.NewJobAgentsClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building Job Agents Client: %+v", err) + } + o.Configure(jobAgentsClient.Client, o.Authorizers.ResourceManager) - jobCredentialsClient := sql.NewJobCredentialsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) - o.ConfigureClient(&jobCredentialsClient.Client, o.ResourceManagerAuthorizer) + jobCredentialsClient, err := jobcredentials.NewJobCredentialsClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building Job Credentials Client: %+v", err) + } + o.Configure(jobCredentialsClient.Client, o.Authorizers.ResourceManager) longTermRetentionPoliciesClient, err := longtermretentionpolicies.NewLongTermRetentionPoliciesClientWithBaseURI(o.Environment.ResourceManager) if err != nil { @@ -121,8 +154,11 @@ func NewClient(o *common.ClientOptions) (*Client, error) { } o.Configure(longTermRetentionPoliciesClient.Client, o.Authorizers.ResourceManager) - outboundFirewallRulesClient := sql.NewOutboundFirewallRulesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) - o.ConfigureClient(&outboundFirewallRulesClient.Client, o.ResourceManagerAuthorizer) + outboundFirewallRulesClient, err := outboundfirewallrules.NewOutboundFirewallRulesClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building Outbound Firewall Rules Client: %+v", err) + } + o.Configure(outboundFirewallRulesClient.Client, o.Authorizers.ResourceManager) replicationLinksClient, err := replicationlinks.NewReplicationLinksClientWithBaseURI(o.Environment.ResourceManager) if err != nil { @@ -158,17 +194,23 @@ func NewClient(o *common.ClientOptions) (*Client, error) { } o.Configure(serverConnectionPoliciesClient.Client, o.Authorizers.ResourceManager) - serverDNSAliasClient := sql.NewServerDNSAliasesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) - o.ConfigureClient(&serverDNSAliasClient.Client, o.ResourceManagerAuthorizer) - - serverExtendedBlobAuditingPoliciesClient := sql.NewExtendedServerBlobAuditingPoliciesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) - o.ConfigureClient(&serverExtendedBlobAuditingPoliciesClient.Client, o.ResourceManagerAuthorizer) + serverDNSAliasClient, err := serverdnsaliases.NewServerDnsAliasesClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building server DNS Aliases Client: %+v", err) + } + o.Configure(serverDNSAliasClient.Client, o.Authorizers.ResourceManager) - serverDevOpsAuditSettingsClient := sql.NewServerDevOpsAuditSettingsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) - o.ConfigureClient(&serverDevOpsAuditSettingsClient.Client, o.ResourceManagerAuthorizer) + serverDevOpsAuditSettingsClient, err := serverdevopsaudit.NewServerDevOpsAuditClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building server DevOps Audit Settings Client: %+v", err) + } + o.Configure(serverDevOpsAuditSettingsClient.Client, o.Authorizers.ResourceManager) - serverKeysClient := sql.NewServerKeysClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) - o.ConfigureClient(&serverKeysClient.Client, o.ResourceManagerAuthorizer) + serverKeysClient, err := serverkeys.NewServerKeysClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building Server Keys Client: %+v", err) + } + o.Configure(serverKeysClient.Client, o.Authorizers.ResourceManager) legacyServerSecurityAlertPoliciesClient := sql.NewServerSecurityAlertPoliciesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) o.ConfigureClient(&legacyServerSecurityAlertPoliciesClient.Client, o.ResourceManagerAuthorizer) @@ -179,8 +221,11 @@ func NewClient(o *common.ClientOptions) (*Client, error) { } o.Configure(serverSecurityAlertPoliciesClient.Client, o.Authorizers.ResourceManager) - serverVulnerabilityAssessmentsClient := sql.NewServerVulnerabilityAssessmentsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) - o.ConfigureClient(&serverVulnerabilityAssessmentsClient.Client, o.ResourceManagerAuthorizer) + serverVulnerabilityAssessmentsClient, err := servervulnerabilityassessments.NewServerVulnerabilityAssessmentsClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building Server Vulnerability Assessments Client: %+v", err) + } + o.Configure(serverVulnerabilityAssessmentsClient.Client, o.Authorizers.ResourceManager) serversClient, err := servers.NewServersClientWithBaseURI(o.Environment.ResourceManager) if err != nil { @@ -212,34 +257,36 @@ func NewClient(o *common.ClientOptions) (*Client, error) { } o.Configure(virtualMachineGroupsClient.Client, o.Authorizers.ResourceManager) - virtualNetworkRulesClient := sql.NewVirtualNetworkRulesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) - o.ConfigureClient(&virtualNetworkRulesClient.Client, o.ResourceManagerAuthorizer) + virtualNetworkRulesClient, err := virtualnetworkrules.NewVirtualNetworkRulesClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building Virtual Network Rules Client: %+v", err) + } + o.Configure(virtualNetworkRulesClient.Client, o.Authorizers.ResourceManager) return &Client{ // Clients using the Track1 SDK which need to be gradually switched over to `hashicorp/go-azure-sdk` - DatabaseExtendedBlobAuditingPoliciesClient: &databaseExtendedBlobAuditingPoliciesClient, - DatabaseVulnerabilityAssessmentRuleBaselinesClient: &databaseVulnerabilityAssessmentRuleBaselinesClient, - EncryptionProtectorClient: &encryptionProtectorClient, - FailoverGroupsClient: &failoverGroupsClient, - FirewallRulesClient: &firewallRulesClient, - JobAgentsClient: &jobAgentsClient, - JobCredentialsClient: &jobCredentialsClient, - OutboundFirewallRulesClient: &outboundFirewallRulesClient, - ServerDNSAliasClient: &serverDNSAliasClient, - ServerDevOpsAuditSettingsClient: &serverDevOpsAuditSettingsClient, - ServerExtendedBlobAuditingPoliciesClient: &serverExtendedBlobAuditingPoliciesClient, - ServerKeysClient: &serverKeysClient, - ServerVulnerabilityAssessmentsClient: &serverVulnerabilityAssessmentsClient, + BlobAuditingPoliciesClient: databaseExtendedBlobAuditingPoliciesClient, + DatabaseVulnerabilityAssessmentRuleBaselinesClient: databaseVulnerabilityAssessmentRuleBaselinesClient, + EncryptionProtectorClient: encryptionProtectorClient, + FailoverGroupsClient: failoverGroupsClient, + FirewallRulesClient: firewallRulesClient, + JobAgentsClient: jobAgentsClient, + JobCredentialsClient: jobCredentialsClient, + OutboundFirewallRulesClient: outboundFirewallRulesClient, + ServerDNSAliasClient: serverDNSAliasClient, + ServerDevOpsAuditSettingsClient: serverDevOpsAuditSettingsClient, + ServerKeysClient: serverKeysClient, + ServerVulnerabilityAssessmentsClient: serverVulnerabilityAssessmentsClient, VirtualMachinesAvailabilityGroupListenersClient: virtualMachinesAvailabilityGroupListenersClient, VirtualMachinesClient: virtualMachinesClient, VirtualMachineGroupsClient: virtualMachineGroupsClient, - VirtualNetworkRulesClient: &virtualNetworkRulesClient, + VirtualNetworkRulesClient: virtualNetworkRulesClient, // Legacy Clients LegacyServerSecurityAlertPoliciesClient: &legacyServerSecurityAlertPoliciesClient, LegacyReplicationLinksClient: &legacyReplicationLinksClient, - // 2023-02-01-preview Clients + // 2023-08-01-preview Clients BackupShortTermRetentionPoliciesClient: backupShortTermRetentionPoliciesClient, DatabasesClient: databasesClient, DatabaseSecurityAlertPoliciesClient: databaseSecurityAlertPoliciesClient, diff --git a/internal/services/mssql/custompollers/mssql_deleteserverazureadonlyauthentication_poller.go b/internal/services/mssql/custompollers/mssql_deleteserverazureadonlyauthentication_poller.go index 16e359cd9e2d4..725a825319fcd 100644 --- a/internal/services/mssql/custompollers/mssql_deleteserverazureadonlyauthentication_poller.go +++ b/internal/services/mssql/custompollers/mssql_deleteserverazureadonlyauthentication_poller.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications" "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" ) diff --git a/internal/services/mssql/helper/database.go b/internal/services/mssql/helper/database.go index 9bbba8c6822b8..5b1811c65f832 100644 --- a/internal/services/mssql/helper/database.go +++ b/internal/services/mssql/helper/database.go @@ -12,7 +12,7 @@ import ( "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-06-01/resources" // nolint: staticcheck "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" "github.com/hashicorp/terraform-provider-azurerm/utils" ) diff --git a/internal/services/mssql/helper/sql_retention_policies.go b/internal/services/mssql/helper/sql_retention_policies.go index 7a2456f340f23..77400aa279365 100644 --- a/internal/services/mssql/helper/sql_retention_policies.go +++ b/internal/services/mssql/helper/sql_retention_policies.go @@ -8,8 +8,8 @@ import ( "strings" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies" "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" @@ -62,12 +62,6 @@ func LongTermRetentionPolicySchema() *pluginsdk.Schema { ValidateFunc: validation.IntBetween(0, 52), AtLeastOneOf: atLeastOneOf, }, - - "immutable_backups_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: false, - }, }, }, } @@ -108,19 +102,18 @@ func ShortTermRetentionPolicySchema() *pluginsdk.Schema { } } -func ExpandLongTermRetentionPolicy(input []interface{}) *longtermretentionpolicies.LongTermRetentionPolicyProperties { +func ExpandLongTermRetentionPolicy(input []interface{}) *longtermretentionpolicies.BaseLongTermRetentionPolicyProperties { if len(input) == 0 || input[0] == nil { return nil } policy := input[0].(map[string]interface{}) - output := longtermretentionpolicies.LongTermRetentionPolicyProperties{ - WeeklyRetention: pointer.To("PT0S"), - MonthlyRetention: pointer.To("PT0S"), - YearlyRetention: pointer.To("PT0S"), - WeekOfYear: pointer.To(int64(1)), - MakeBackupsImmutable: pointer.To(false), + output := longtermretentionpolicies.BaseLongTermRetentionPolicyProperties{ + WeeklyRetention: pointer.To("PT0S"), + MonthlyRetention: pointer.To("PT0S"), + YearlyRetention: pointer.To("PT0S"), + WeekOfYear: pointer.To(int64(1)), } if v, ok := policy["weekly_retention"].(string); ok && v != "" { @@ -138,11 +131,6 @@ func ExpandLongTermRetentionPolicy(input []interface{}) *longtermretentionpolici if v, ok := policy["week_of_year"].(int); ok && v != 0 { output.WeekOfYear = pointer.To(int64(v)) } - - if v, ok := policy["immutable_backups_enabled"].(bool); ok { - output.MakeBackupsImmutable = pointer.To(v) - } - return pointer.To(output) } @@ -171,18 +159,12 @@ func FlattenLongTermRetentionPolicy(input *longtermretentionpolicies.LongTermRet yearlyRetention = *input.Properties.YearlyRetention } - immutableBackupsEnabled := false - if input.Properties.MakeBackupsImmutable != nil { - immutableBackupsEnabled = *input.Properties.MakeBackupsImmutable - } - return []interface{}{ map[string]interface{}{ - "monthly_retention": monthlyRetention, - "weekly_retention": weeklyRetention, - "week_of_year": weekOfYear, - "yearly_retention": yearlyRetention, - "immutable_backups_enabled": immutableBackupsEnabled, + "monthly_retention": monthlyRetention, + "weekly_retention": weeklyRetention, + "week_of_year": weekOfYear, + "yearly_retention": yearlyRetention, }, } } diff --git a/internal/services/mssql/mssql_database_data_source.go b/internal/services/mssql/mssql_database_data_source.go index adfbcd84d60ab..5ea17868f27cd 100644 --- a/internal/services/mssql/mssql_database_data_source.go +++ b/internal/services/mssql/mssql_database_data_source.go @@ -13,8 +13,8 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/internal/services/mssql/mssql_database_extended_auditing_policy_resource.go b/internal/services/mssql/mssql_database_extended_auditing_policy_resource.go index 9c3126a6ce27a..f79e27e347aa7 100644 --- a/internal/services/mssql/mssql_database_extended_auditing_policy_resource.go +++ b/internal/services/mssql/mssql_database_extended_auditing_policy_resource.go @@ -8,9 +8,10 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" @@ -89,7 +90,7 @@ func resourceMsSqlDatabaseExtendedAuditingPolicy() *pluginsdk.Resource { } func resourceMsSqlDatabaseExtendedAuditingPolicyCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).MSSQL.DatabaseExtendedBlobAuditingPoliciesClient + client := meta.(*clients.Client).MSSQL.BlobAuditingPoliciesClient ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) defer cancel() @@ -101,53 +102,53 @@ func resourceMsSqlDatabaseExtendedAuditingPolicyCreateUpdate(d *pluginsdk.Resour } if d.IsNewResource() { - existing, err := client.Get(ctx, dbId.ResourceGroupName, dbId.ServerName, dbId.DatabaseName) + existing, err := client.ExtendedDatabaseBlobAuditingPoliciesGet(ctx, *dbId) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for the presence of existing %s: %+v", dbId, err) } } // if state is not disabled, we should import it. - if existing.ID != nil && *existing.ID != "" && existing.ExtendedDatabaseBlobAuditingPolicyProperties != nil && existing.ExtendedDatabaseBlobAuditingPolicyProperties.State != sql.BlobAuditingPolicyStateDisabled { - return tf.ImportAsExistsError("azurerm_mssql_database_extended_auditing_policy", *existing.ID) + if existing.Model != nil && existing.Model.Id != nil && *existing.Model.Id != "" && existing.Model.Properties != nil && existing.Model.Properties.State != blobauditing.BlobAuditingPolicyStateDisabled { + return tf.ImportAsExistsError("azurerm_mssql_database_extended_auditing_policy", *existing.Model.Id) } } - params := sql.ExtendedDatabaseBlobAuditingPolicy{ - ExtendedDatabaseBlobAuditingPolicyProperties: &sql.ExtendedDatabaseBlobAuditingPolicyProperties{ + params := blobauditing.ExtendedDatabaseBlobAuditingPolicy{ + Properties: &blobauditing.ExtendedDatabaseBlobAuditingPolicyProperties{ StorageEndpoint: utils.String(d.Get("storage_endpoint").(string)), IsStorageSecondaryKeyInUse: utils.Bool(d.Get("storage_account_access_key_is_secondary").(bool)), - RetentionDays: utils.Int32(int32(d.Get("retention_in_days").(int))), + RetentionDays: utils.Int64(int64(d.Get("retention_in_days").(int))), IsAzureMonitorTargetEnabled: utils.Bool(d.Get("log_monitoring_enabled").(bool)), }, } if d.Get("enabled").(bool) { - params.ExtendedDatabaseBlobAuditingPolicyProperties.State = sql.BlobAuditingPolicyStateEnabled + params.Properties.State = blobauditing.BlobAuditingPolicyStateEnabled } else { - params.ExtendedDatabaseBlobAuditingPolicyProperties.State = sql.BlobAuditingPolicyStateDisabled + params.Properties.State = blobauditing.BlobAuditingPolicyStateDisabled } if v, ok := d.GetOk("storage_account_access_key"); ok { - params.ExtendedDatabaseBlobAuditingPolicyProperties.StorageAccountAccessKey = utils.String(v.(string)) + params.Properties.StorageAccountAccessKey = utils.String(v.(string)) } - if _, err = client.CreateOrUpdate(ctx, dbId.ResourceGroupName, dbId.ServerName, dbId.DatabaseName, params); err != nil { + if _, err = client.ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdate(ctx, *dbId, params); err != nil { return fmt.Errorf("creating extended auditing policy for %s: %+v", dbId, err) } - read, err := client.Get(ctx, dbId.ResourceGroupName, dbId.ServerName, dbId.DatabaseName) + read, err := client.ExtendedDatabaseBlobAuditingPoliciesGet(ctx, *dbId) if err != nil { return fmt.Errorf("retrieving the extended auditing policy for %s: %+v", dbId, err) } - if read.ID == nil || pointer.From(read.ID) == "" { + if read.Model == nil || read.Model.Id == nil || pointer.From(read.Model.Id) == "" { return fmt.Errorf("the extended auditing policy ID for %s is 'nil' or 'empty'", dbId.String()) } // TODO: update this to use the Database ID - requiring a State Migration - readId, err := parse.DatabaseExtendedAuditingPolicyID(pointer.From(read.ID)) + readId, err := parse.DatabaseExtendedAuditingPolicyID(pointer.From(read.Model.Id)) if err != nil { return err } @@ -158,7 +159,7 @@ func resourceMsSqlDatabaseExtendedAuditingPolicyCreateUpdate(d *pluginsdk.Resour } func resourceMsSqlDatabaseExtendedAuditingPolicyRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).MSSQL.DatabaseExtendedBlobAuditingPoliciesClient + client := meta.(*clients.Client).MSSQL.BlobAuditingPoliciesClient ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() @@ -167,9 +168,11 @@ func resourceMsSqlDatabaseExtendedAuditingPolicyRead(d *pluginsdk.ResourceData, return err } - resp, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.DatabaseName) + dbId := commonids.NewSqlDatabaseID(id.SubscriptionId, id.ResourceGroup, id.ServerName, id.DatabaseName) + + resp, err := client.ExtendedDatabaseBlobAuditingPoliciesGet(ctx, dbId) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { d.SetId("") return nil } @@ -179,19 +182,21 @@ func resourceMsSqlDatabaseExtendedAuditingPolicyRead(d *pluginsdk.ResourceData, databaseId := commonids.NewSqlDatabaseID(id.SubscriptionId, id.ResourceGroup, id.ServerName, id.DatabaseName) d.Set("database_id", databaseId.ID()) - if props := resp.ExtendedDatabaseBlobAuditingPolicyProperties; props != nil { - d.Set("storage_endpoint", props.StorageEndpoint) - d.Set("storage_account_access_key_is_secondary", props.IsStorageSecondaryKeyInUse) - d.Set("retention_in_days", props.RetentionDays) - d.Set("log_monitoring_enabled", props.IsAzureMonitorTargetEnabled) - d.Set("enabled", props.State == sql.BlobAuditingPolicyStateEnabled) + if model := resp.Model; model != nil { + if props := model.Properties; props != nil { + d.Set("storage_endpoint", props.StorageEndpoint) + d.Set("storage_account_access_key_is_secondary", props.IsStorageSecondaryKeyInUse) + d.Set("retention_in_days", props.RetentionDays) + d.Set("log_monitoring_enabled", props.IsAzureMonitorTargetEnabled) + d.Set("enabled", props.State == blobauditing.BlobAuditingPolicyStateEnabled) + } } return nil } func resourceMsSqlDatabaseExtendedAuditingPolicyDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).MSSQL.DatabaseExtendedBlobAuditingPoliciesClient + client := meta.(*clients.Client).MSSQL.BlobAuditingPoliciesClient ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() @@ -200,14 +205,16 @@ func resourceMsSqlDatabaseExtendedAuditingPolicyDelete(d *pluginsdk.ResourceData return err } - params := sql.ExtendedDatabaseBlobAuditingPolicy{ - ExtendedDatabaseBlobAuditingPolicyProperties: &sql.ExtendedDatabaseBlobAuditingPolicyProperties{ - State: sql.BlobAuditingPolicyStateDisabled, + dbId := commonids.NewSqlDatabaseID(id.SubscriptionId, id.ResourceGroup, id.ServerName, id.DatabaseName) + + params := blobauditing.ExtendedDatabaseBlobAuditingPolicy{ + Properties: &blobauditing.ExtendedDatabaseBlobAuditingPolicyProperties{ + State: blobauditing.BlobAuditingPolicyStateDisabled, }, } - if _, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ServerName, id.DatabaseName, params); err != nil { - return fmt.Errorf("deleting MsSql Database %q Extended Auditing Policy( MsSql Server %q / Resource Group %q): %+v", id.DatabaseName, id.ServerName, id.ResourceGroup, err) + if _, err = client.ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdate(ctx, dbId, params); err != nil { + return fmt.Errorf("deleting %s: %+v", *id, err) } return nil diff --git a/internal/services/mssql/mssql_database_extended_auditing_policy_resource_test.go b/internal/services/mssql/mssql_database_extended_auditing_policy_resource_test.go index a0ff155c08a3c..cdc6341ab2c45 100644 --- a/internal/services/mssql/mssql_database_extended_auditing_policy_resource_test.go +++ b/internal/services/mssql/mssql_database_extended_auditing_policy_resource_test.go @@ -8,12 +8,14 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) type MsSqlDatabaseExtendedAuditingPolicyResource struct{} @@ -200,16 +202,18 @@ func (MsSqlDatabaseExtendedAuditingPolicyResource) Exists(ctx context.Context, c return nil, err } - resp, err := client.MSSQL.DatabaseExtendedBlobAuditingPoliciesClient.Get(ctx, id.ResourceGroup, id.ServerName, id.DatabaseName) + dbId := commonids.NewSqlDatabaseID(id.SubscriptionId, id.ResourceGroup, id.ServerName, id.DatabaseName) + + resp, err := client.MSSQL.BlobAuditingPoliciesClient.ExtendedDatabaseBlobAuditingPoliciesGet(ctx, dbId) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return nil, fmt.Errorf("SQL Virtual Machine %q (Server %q, Resource Group %q) does not exist", id.DatabaseName, id.ServerName, id.ResourceGroup) + if response.WasNotFound(resp.HttpResponse) { + return nil, fmt.Errorf("%s does not exist", *id) } - return nil, fmt.Errorf("reading SQL Database ExtendedAuditingPolicy %q (Server %q, Resource Group %q): %v", id.DatabaseName, id.ServerName, id.ResourceGroup, err) + return nil, fmt.Errorf("reading %s: %v", *id, err) } - return utils.Bool(resp.ID != nil), nil + return pointer.To(resp.Model != nil), nil } func (MsSqlDatabaseExtendedAuditingPolicyResource) template(data acceptance.TestData) string { diff --git a/internal/services/mssql/mssql_database_resource.go b/internal/services/mssql/mssql_database_resource.go index 0e851a3fafabe..1e48729907b10 100644 --- a/internal/services/mssql/mssql_database_resource.go +++ b/internal/services/mssql/mssql_database_resource.go @@ -18,15 +18,15 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/mssql/mssql_database_resource_test.go b/internal/services/mssql/mssql_database_resource_test.go index 9e1a318802a2b..77150fc08e34b 100644 --- a/internal/services/mssql/mssql_database_resource_test.go +++ b/internal/services/mssql/mssql_database_resource_test.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/mssql/mssql_database_vulnerability_assessment_rule_baseline_resource.go b/internal/services/mssql/mssql_database_vulnerability_assessment_rule_baseline_resource.go index 931e4cbdcc44c..d9eaa32c67dcd 100644 --- a/internal/services/mssql/mssql_database_vulnerability_assessment_rule_baseline_resource.go +++ b/internal/services/mssql/mssql_database_vulnerability_assessment_rule_baseline_resource.go @@ -8,14 +8,15 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) func resourceMsSqlDatabaseVulnerabilityAssessmentRuleBaseline() *pluginsdk.Resource { @@ -62,10 +63,10 @@ func resourceMsSqlDatabaseVulnerabilityAssessmentRuleBaseline() *pluginsdk.Resou Type: pluginsdk.TypeString, Optional: true, ForceNew: true, - Default: string(sql.VulnerabilityAssessmentPolicyBaselineNameDefault), + Default: string(databasevulnerabilityassessmentrulebaselines.VulnerabilityAssessmentPolicyBaselineNameDefault), ValidateFunc: validation.StringInSlice([]string{ - string(sql.VulnerabilityAssessmentPolicyBaselineNameDefault), - string(sql.VulnerabilityAssessmentPolicyBaselineNameMaster), + string(databasevulnerabilityassessmentrulebaselines.VulnerabilityAssessmentPolicyBaselineNameDefault), + string(databasevulnerabilityassessmentrulebaselines.VulnerabilityAssessmentPolicyBaselineNameMaster), }, false), }, @@ -101,11 +102,14 @@ func resourceMsSqlDatabaseVulnerabilityAssessmentRuleBaselineCreateUpdate(d *plu if err != nil { return err } - vulnerabilityAssessment, err := vulnerabilityClient.Get(ctx, vulnerabilityAssessmentId.ResourceGroup, vulnerabilityAssessmentId.ServerName) + + serverId := commonids.NewSqlServerID(vulnerabilityAssessmentId.SubscriptionId, vulnerabilityAssessmentId.ResourceGroup, vulnerabilityAssessmentId.ServerName) + + vulnerabilityAssessment, err := vulnerabilityClient.Get(ctx, serverId) if err != nil { return fmt.Errorf("retrieving Server Vulnerability Assessment Settings: %+v", err) } - if vulnerabilityAssessment.StorageContainerPath == nil { + if vulnerabilityAssessment.Model == nil || vulnerabilityAssessment.Model.Properties == nil || vulnerabilityAssessment.Model.Properties.StorageContainerPath == "" { return fmt.Errorf("storage container path not set in Server Vulnerability Assessment Settings") } @@ -121,7 +125,9 @@ func resourceMsSqlDatabaseVulnerabilityAssessmentRuleBaselineCreateUpdate(d *plu d.Get("rule_id").(string), d.Get("baseline_name").(string)) - if _, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ServerName, id.DatabaseName, id.RuleName, sql.VulnerabilityAssessmentPolicyBaselineName(id.BaselineName), *parameters); err != nil { + baselineId := databasevulnerabilityassessmentrulebaselines.NewBaselineID(id.SubscriptionId, id.ResourceGroup, id.ServerName, id.DatabaseName, id.RuleName, databasevulnerabilityassessmentrulebaselines.VulnerabilityAssessmentPolicyBaselineName(id.BaselineName)) + + if _, err := client.CreateOrUpdate(ctx, baselineId, *parameters); err != nil { return fmt.Errorf("updating database vulnerability assessment rule baseline: %s", err) } @@ -139,11 +145,11 @@ func resourceMsSqlDatabaseVulnerabilityAssessmentRuleBaselineRead(d *pluginsdk.R return err } - baselineName := sql.VulnerabilityAssessmentPolicyBaselineName(id.BaselineName) + baselineId := databasevulnerabilityassessmentrulebaselines.NewBaselineID(id.SubscriptionId, id.ResourceGroup, id.ServerName, id.DatabaseName, id.RuleName, databasevulnerabilityassessmentrulebaselines.VulnerabilityAssessmentPolicyBaselineName(id.BaselineName)) - result, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.DatabaseName, id.RuleName, baselineName) + result, err := client.Get(ctx, baselineId) if err != nil { - if utils.ResponseWasNotFound(result.Response) { + if response.WasNotFound(result.HttpResponse) { log.Printf("[WARN] %s was not found", *id) d.SetId("") return nil @@ -159,8 +165,10 @@ func resourceMsSqlDatabaseVulnerabilityAssessmentRuleBaselineRead(d *pluginsdk.R vulnerabilityAssessmentId := parse.NewServerVulnerabilityAssessmentID(id.SubscriptionId, id.ResourceGroup, id.ServerName, id.VulnerabilityAssessmentName) d.Set("server_vulnerability_assessment_id", vulnerabilityAssessmentId.ID()) - if baselineResults := result.BaselineResults; baselineResults != nil { - d.Set("baseline_result", flattenBaselineResult(baselineResults)) + if model := result.Model; model != nil { + if props := model.Properties; props != nil { + d.Set("baseline_result", flattenBaselineResult(props.BaselineResults)) + } } return nil @@ -176,19 +184,19 @@ func resourceMsSqlDatabaseVulnerabilityAssessmentRuleBaselineDelete(d *pluginsdk return err } - baselineName := sql.VulnerabilityAssessmentPolicyBaselineName(id.BaselineName) + baselineId := databasevulnerabilityassessmentrulebaselines.NewBaselineID(id.SubscriptionId, id.ResourceGroup, id.ServerName, id.DatabaseName, id.RuleName, databasevulnerabilityassessmentrulebaselines.VulnerabilityAssessmentPolicyBaselineName(id.BaselineName)) - if _, err := client.Delete(ctx, id.ResourceGroup, id.ServerName, id.DatabaseName, id.RuleName, baselineName); err != nil { + if _, err := client.Delete(ctx, baselineId); err != nil { return fmt.Errorf("deleting %s: %+v", *id, err) } return nil } -func expandBaselineResults(baselineResult *pluginsdk.Set) *sql.DatabaseVulnerabilityAssessmentRuleBaseline { +func expandBaselineResults(baselineResult *pluginsdk.Set) *databasevulnerabilityassessmentrulebaselines.DatabaseVulnerabilityAssessmentRuleBaseline { baselineResultList := baselineResult.List() - baselineResults := make([]sql.DatabaseVulnerabilityAssessmentRuleBaselineItem, len(baselineResultList)) + baselineResults := make([]databasevulnerabilityassessmentrulebaselines.DatabaseVulnerabilityAssessmentRuleBaselineItem, len(baselineResultList)) for i, baselineResult := range baselineResultList { result := make([]string, 0) @@ -198,31 +206,29 @@ func expandBaselineResults(baselineResult *pluginsdk.Set) *sql.DatabaseVulnerabi result = append(result, s.(string)) } - baselineResults[i] = sql.DatabaseVulnerabilityAssessmentRuleBaselineItem{ - Result: &result, + baselineResults[i] = databasevulnerabilityassessmentrulebaselines.DatabaseVulnerabilityAssessmentRuleBaselineItem{ + Result: result, } } - return &sql.DatabaseVulnerabilityAssessmentRuleBaseline{ - DatabaseVulnerabilityAssessmentRuleBaselineProperties: &sql.DatabaseVulnerabilityAssessmentRuleBaselineProperties{ - BaselineResults: &baselineResults, + return &databasevulnerabilityassessmentrulebaselines.DatabaseVulnerabilityAssessmentRuleBaseline{ + Properties: &databasevulnerabilityassessmentrulebaselines.DatabaseVulnerabilityAssessmentRuleBaselineProperties{ + BaselineResults: baselineResults, }, } } -func flattenBaselineResult(baselineResults *[]sql.DatabaseVulnerabilityAssessmentRuleBaselineItem) []map[string]interface{} { +func flattenBaselineResult(baselineResults []databasevulnerabilityassessmentrulebaselines.DatabaseVulnerabilityAssessmentRuleBaselineItem) []map[string]interface{} { resp := make([]map[string]interface{}, 0) - if baselineResults != nil { - for _, baselineResult := range *baselineResults { - output := map[string]interface{}{} - - if result := baselineResult.Result; result != nil { - output["result"] = *result - } + for _, baselineResult := range baselineResults { + output := map[string]interface{}{} - resp = append(resp, output) + if result := baselineResult.Result; result != nil { + output["result"] = result } + + resp = append(resp, output) } return resp diff --git a/internal/services/mssql/mssql_database_vulnerability_assessment_rule_baseline_resource_test.go b/internal/services/mssql/mssql_database_vulnerability_assessment_rule_baseline_resource_test.go index b44068b565234..e5b2a8465e514 100644 --- a/internal/services/mssql/mssql_database_vulnerability_assessment_rule_baseline_resource_test.go +++ b/internal/services/mssql/mssql_database_vulnerability_assessment_rule_baseline_resource_test.go @@ -8,13 +8,13 @@ import ( "fmt" "testing" - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) type MsSqlDatabaseVulnerabilityAssessmentRuleBaselineResource struct{} @@ -57,23 +57,20 @@ func TestAccMsSqlDatabaseVulnerabilityAssessmentRuleBaseline_primary(t *testing. } func (MsSqlDatabaseVulnerabilityAssessmentRuleBaselineResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.DatabaseVulnerabilityAssessmentRuleBaselineID(state.ID) + id, err := databasevulnerabilityassessmentrulebaselines.ParseBaselineID(state.ID) if err != nil { return nil, err } - baselineName := sql.VulnerabilityAssessmentPolicyBaselineName(id.BaselineName) - resp, err := client.MSSQL.DatabaseVulnerabilityAssessmentRuleBaselinesClient.Get(ctx, id.ResourceGroup, id.ServerName, id.DatabaseName, id.RuleName, baselineName) + resp, err := client.MSSQL.DatabaseVulnerabilityAssessmentRuleBaselinesClient.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return nil, fmt.Errorf("Baseline %q not found (Resource Group %q, Server %q, Database %q, Rule %q)", - id.BaselineName, id.ResourceGroup, id.ServerName, id.DatabaseName, id.RuleName) + if response.WasNotFound(resp.HttpResponse) { + return nil, fmt.Errorf(" %q not found", *id) } - return nil, fmt.Errorf("reading Baseline %q (Resource Group %q, Server %q, Database %q, Rule %q): %v", - id.BaselineName, id.ResourceGroup, id.ServerName, id.DatabaseName, id.RuleName, err) + return nil, fmt.Errorf("reading %q : %v", *id, err) } - return utils.Bool(resp.ID != nil), nil + return pointer.To(resp.Model != nil), nil } func (r MsSqlDatabaseVulnerabilityAssessmentRuleBaselineResource) basic(data acceptance.TestData) string { diff --git a/internal/services/mssql/mssql_elasticpool_data_source.go b/internal/services/mssql/mssql_elasticpool_data_source.go index 23514df29f636..4b6751f9b661e 100644 --- a/internal/services/mssql/mssql_elasticpool_data_source.go +++ b/internal/services/mssql/mssql_elasticpool_data_source.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" diff --git a/internal/services/mssql/mssql_elasticpool_resource.go b/internal/services/mssql/mssql_elasticpool_resource.go index 471d716371a73..15492686c0293 100644 --- a/internal/services/mssql/mssql_elasticpool_resource.go +++ b/internal/services/mssql/mssql_elasticpool_resource.go @@ -17,8 +17,8 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -91,6 +91,7 @@ func resourceMsSqlElasticPool() *pluginsdk.Resource { "BC_DC", "HS_Gen5", "HS_PRMS", + "HS_MOPRMS", }, false), }, @@ -121,6 +122,7 @@ func resourceMsSqlElasticPool() *pluginsdk.Resource { "Gen5", "Fsv2", "DC", + "MOPRMS", }, false), }, }, diff --git a/internal/services/mssql/mssql_failover_group_resource.go b/internal/services/mssql/mssql_failover_group_resource.go index a3fdfc3442c08..c1fbacd33a515 100644 --- a/internal/services/mssql/mssql_failover_group_resource.go +++ b/internal/services/mssql/mssql_failover_group_resource.go @@ -8,11 +8,13 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" @@ -127,8 +129,8 @@ func (r MsSqlFailoverGroupResource) Arguments() map[string]*pluginsdk.Schema { Type: pluginsdk.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{ - string(sql.ReadWriteEndpointFailoverPolicyAutomatic), - string(sql.ReadWriteEndpointFailoverPolicyManual), + string(failovergroups.ReadWriteEndpointFailoverPolicyAutomatic), + string(failovergroups.ReadWriteEndpointFailoverPolicyManual), }, false), }, "grace_minutes": { @@ -157,11 +159,11 @@ func (r MsSqlFailoverGroupResource) CustomizeDiff() sdk.ResourceFunc { } if rwPolicy := model.ReadWriteEndpointFailurePolicy; len(rwPolicy) > 0 { - if rwPolicy[0].Mode == string(sql.ReadWriteEndpointFailoverPolicyAutomatic) && rwPolicy[0].GraceMinutes < 60 { - return fmt.Errorf("`grace_minutes` should be %d or greater when `mode` is %q", 60, sql.ReadWriteEndpointFailoverPolicyAutomatic) + if rwPolicy[0].Mode == string(failovergroups.ReadWriteEndpointFailoverPolicyAutomatic) && rwPolicy[0].GraceMinutes < 60 { + return fmt.Errorf("`grace_minutes` should be %d or greater when `mode` is %q", 60, failovergroups.ReadWriteEndpointFailoverPolicyAutomatic) } - if rwPolicy[0].Mode == string(sql.ReadWriteEndpointFailoverPolicyManual) && rwPolicy[0].GraceMinutes > 0 { - return fmt.Errorf("`grace_minutes` should not be specified when `mode` is %q", sql.ReadWriteEndpointFailoverPolicyManual) + if rwPolicy[0].Mode == string(failovergroups.ReadWriteEndpointFailoverPolicyManual) && rwPolicy[0].GraceMinutes > 0 { + return fmt.Errorf("`grace_minutes` should not be specified when `mode` is %q", failovergroups.ReadWriteEndpointFailoverPolicyManual) } } @@ -192,52 +194,48 @@ func (r MsSqlFailoverGroupResource) Create() sdk.ResourceFunc { return fmt.Errorf("retrieving %s: %+v", serverId, err) } - id := parse.NewFailoverGroupID(subscriptionId, serverId.ResourceGroupName, serverId.ServerName, model.Name) + id := failovergroups.NewFailoverGroupID(subscriptionId, serverId.ResourceGroupName, serverId.ServerName, model.Name) - existing, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) + existing, err := client.Get(ctx, id) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for presence of existing %s: %+v", id, err) } } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return metadata.ResourceRequiresImport(r.ResourceType(), id) } - readOnlyFailoverPolicy := sql.ReadOnlyEndpointFailoverPolicyDisabled + readOnlyFailoverPolicy := failovergroups.ReadOnlyEndpointFailoverPolicyDisabled if model.ReadonlyEndpointFailurePolicyEnabled { - readOnlyFailoverPolicy = sql.ReadOnlyEndpointFailoverPolicyEnabled + readOnlyFailoverPolicy = failovergroups.ReadOnlyEndpointFailoverPolicyEnabled } - properties := sql.FailoverGroup{ - FailoverGroupProperties: &sql.FailoverGroupProperties{ + properties := failovergroups.FailoverGroup{ + Properties: &failovergroups.FailoverGroupProperties{ Databases: &model.Databases, - ReadOnlyEndpoint: &sql.FailoverGroupReadOnlyEndpoint{ - FailoverPolicy: readOnlyFailoverPolicy, + ReadOnlyEndpoint: &failovergroups.FailoverGroupReadOnlyEndpoint{ + FailoverPolicy: &readOnlyFailoverPolicy, }, - ReadWriteEndpoint: &sql.FailoverGroupReadWriteEndpoint{}, + ReadWriteEndpoint: failovergroups.FailoverGroupReadWriteEndpoint{}, PartnerServers: r.expandPartnerServers(model.PartnerServers), }, - Tags: tags.FromTypedObject(model.Tags), + Tags: pointer.To(model.Tags), } if rwPolicy := model.ReadWriteEndpointFailurePolicy; len(rwPolicy) > 0 { - properties.FailoverGroupProperties.ReadWriteEndpoint.FailoverPolicy = sql.ReadWriteEndpointFailoverPolicy(rwPolicy[0].Mode) - if rwPolicy[0].Mode == string(sql.ReadWriteEndpointFailoverPolicyAutomatic) { - properties.FailoverGroupProperties.ReadWriteEndpoint.FailoverWithDataLossGracePeriodMinutes = utils.Int32(int32(rwPolicy[0].GraceMinutes)) + properties.Properties.ReadWriteEndpoint.FailoverPolicy = failovergroups.ReadWriteEndpointFailoverPolicy(rwPolicy[0].Mode) + if rwPolicy[0].Mode == string(failovergroups.ReadWriteEndpointFailoverPolicyAutomatic) { + properties.Properties.ReadWriteEndpoint.FailoverWithDataLossGracePeriodMinutes = utils.Int64(rwPolicy[0].GraceMinutes) } } - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ServerName, id.Name, properties) + err = client.CreateOrUpdateThenPoll(ctx, id, properties) if err != nil { return fmt.Errorf("creating %s: %+v", id, err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for creation of %s: %+v", id, err) - } - metadata.SetID(id) return nil }, @@ -250,7 +248,7 @@ func (r MsSqlFailoverGroupResource) Update() sdk.ResourceFunc { Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { client := metadata.Client.MSSQL.FailoverGroupsClient - id, err := parse.FailoverGroupID(metadata.ResourceData.Id()) + id, err := failovergroups.ParseFailoverGroupID(metadata.ResourceData.Id()) if err != nil { return err } @@ -263,37 +261,33 @@ func (r MsSqlFailoverGroupResource) Update() sdk.ResourceFunc { metadata.Logger.Infof("updating %s", id) - readOnlyFailoverPolicy := sql.ReadOnlyEndpointFailoverPolicyDisabled + readOnlyFailoverPolicy := failovergroups.ReadOnlyEndpointFailoverPolicyDisabled if state.ReadonlyEndpointFailurePolicyEnabled { - readOnlyFailoverPolicy = sql.ReadOnlyEndpointFailoverPolicyEnabled + readOnlyFailoverPolicy = failovergroups.ReadOnlyEndpointFailoverPolicyEnabled } - properties := sql.FailoverGroup{ - FailoverGroupProperties: &sql.FailoverGroupProperties{ + properties := failovergroups.FailoverGroup{ + Properties: &failovergroups.FailoverGroupProperties{ Databases: &state.Databases, - ReadOnlyEndpoint: &sql.FailoverGroupReadOnlyEndpoint{ - FailoverPolicy: readOnlyFailoverPolicy, + ReadOnlyEndpoint: &failovergroups.FailoverGroupReadOnlyEndpoint{ + FailoverPolicy: &readOnlyFailoverPolicy, }, - ReadWriteEndpoint: &sql.FailoverGroupReadWriteEndpoint{ - FailoverPolicy: sql.ReadWriteEndpointFailoverPolicy(state.ReadWriteEndpointFailurePolicy[0].Mode), + ReadWriteEndpoint: failovergroups.FailoverGroupReadWriteEndpoint{ + FailoverPolicy: failovergroups.ReadWriteEndpointFailoverPolicy(state.ReadWriteEndpointFailurePolicy[0].Mode), }, PartnerServers: r.expandPartnerServers(state.PartnerServers), }, - Tags: tags.FromTypedObject(state.Tags), + Tags: pointer.To(state.Tags), } - if state.ReadWriteEndpointFailurePolicy[0].Mode == string(sql.ReadWriteEndpointFailoverPolicyAutomatic) { - properties.FailoverGroupProperties.ReadWriteEndpoint.FailoverWithDataLossGracePeriodMinutes = utils.Int32(int32(state.ReadWriteEndpointFailurePolicy[0].GraceMinutes)) + if state.ReadWriteEndpointFailurePolicy[0].Mode == string(failovergroups.ReadWriteEndpointFailoverPolicyAutomatic) { + properties.Properties.ReadWriteEndpoint.FailoverWithDataLossGracePeriodMinutes = pointer.To(state.ReadWriteEndpointFailurePolicy[0].GraceMinutes) } // client.Update doesn't support changing the PartnerServers - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ServerName, id.Name, properties) + err = client.CreateOrUpdateThenPoll(ctx, *id, properties) if err != nil { - return fmt.Errorf("updating %s: %+v", id, err) - } - - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for update of %s: %+v", id, err) + return fmt.Errorf("updating %s: %+v", *id, err) } return nil @@ -309,46 +303,47 @@ func (r MsSqlFailoverGroupResource) Read() sdk.ResourceFunc { subscriptionId := metadata.Client.Account.SubscriptionId client := metadata.Client.MSSQL.FailoverGroupsClient - id, err := parse.FailoverGroupID(metadata.ResourceData.Id()) + id, err := failovergroups.ParseFailoverGroupID(metadata.ResourceData.Id()) if err != nil { return err } - existing, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) + existing, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(existing.Response) { + if response.WasNotFound(existing.HttpResponse) { return metadata.MarkAsGone(id) } return fmt.Errorf("retrieving %s: %+v", id, err) } - serverId := parse.NewServerID(subscriptionId, id.ResourceGroup, id.ServerName) + serverId := parse.NewServerID(subscriptionId, id.ResourceGroupName, id.ServerName) model := MsSqlFailoverGroupModel{ - Name: id.Name, + Name: id.FailoverGroupName, ServerId: serverId.ID(), - Tags: tags.ToTypedObject(existing.Tags), } - if props := existing.FailoverGroupProperties; props != nil { - if props.Databases != nil { - model.Databases = *props.Databases - } + if existing.Model != nil { - model.PartnerServers = r.flattenPartnerServers(props.PartnerServers) + model.Tags = pointer.From(existing.Model.Tags) - if props.ReadOnlyEndpoint != nil && props.ReadOnlyEndpoint.FailoverPolicy == sql.ReadOnlyEndpointFailoverPolicyEnabled { - model.ReadonlyEndpointFailurePolicyEnabled = true - } + if props := existing.Model.Properties; props != nil { + if props.Databases != nil { + model.Databases = *props.Databases + } + + model.PartnerServers = r.flattenPartnerServers(props.PartnerServers) + + if props.ReadOnlyEndpoint != nil && pointer.From(props.ReadOnlyEndpoint.FailoverPolicy) == failovergroups.ReadOnlyEndpointFailoverPolicyEnabled { + model.ReadonlyEndpointFailurePolicyEnabled = true + } - if endpoint := props.ReadWriteEndpoint; endpoint != nil { model.ReadWriteEndpointFailurePolicy = []ReadWriteEndpointFailurePolicyModel{{ - Mode: string(endpoint.FailoverPolicy), + Mode: string(props.ReadWriteEndpoint.FailoverPolicy), }} - if endpoint.FailoverWithDataLossGracePeriodMinutes != nil { - model.ReadWriteEndpointFailurePolicy[0].GraceMinutes = int64(*endpoint.FailoverWithDataLossGracePeriodMinutes) - } + model.ReadWriteEndpointFailurePolicy[0].GraceMinutes = pointer.From(props.ReadWriteEndpoint.FailoverWithDataLossGracePeriodMinutes) + } } @@ -363,25 +358,21 @@ func (r MsSqlFailoverGroupResource) Delete() sdk.ResourceFunc { Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { client := metadata.Client.MSSQL.FailoverGroupsClient - id, err := parse.FailoverGroupID(metadata.ResourceData.Id()) + id, err := failovergroups.ParseFailoverGroupID(metadata.ResourceData.Id()) if err != nil { return err } - if existing, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.Name); err != nil { - if utils.ResponseWasNotFound(existing.Response) { + if existing, err := client.Get(ctx, *id); err != nil { + if response.WasNotFound(existing.HttpResponse) { return metadata.MarkAsGone(id) } - return fmt.Errorf("retrieving %s: %+v", id, err) + return fmt.Errorf("retrieving %s: %+v", *id, err) } - future, err := client.Delete(ctx, id.ResourceGroup, id.ServerName, id.Name) + err = client.DeleteThenPoll(ctx, *id) if err != nil { - return fmt.Errorf("deleting %s: %+v", id, err) - } - - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for deletion of %s: %+v", id, err) + return fmt.Errorf("deleting %s: %+v", *id, err) } return nil @@ -389,37 +380,36 @@ func (r MsSqlFailoverGroupResource) Delete() sdk.ResourceFunc { } } -func (r MsSqlFailoverGroupResource) flattenPartnerServers(input *[]sql.PartnerInfo) []PartnerServerModel { +func (r MsSqlFailoverGroupResource) flattenPartnerServers(input []failovergroups.PartnerInfo) []PartnerServerModel { output := make([]PartnerServerModel, 0) if input == nil { return output } - for _, partner := range *input { + for _, partner := range input { model := PartnerServerModel{ Location: location.NormalizeNilable(partner.Location), - Role: string(partner.ReplicationRole), - } - if partner.ID != nil { - model.ID = *partner.ID + Role: string(pointer.From(partner.ReplicationRole)), + ID: partner.Id, } + output = append(output, model) } return output } -func (r MsSqlFailoverGroupResource) expandPartnerServers(input []PartnerServerModel) *[]sql.PartnerInfo { - var partnerServers []sql.PartnerInfo +func (r MsSqlFailoverGroupResource) expandPartnerServers(input []PartnerServerModel) []failovergroups.PartnerInfo { + var partnerServers []failovergroups.PartnerInfo if input == nil { - return &partnerServers + return partnerServers } for _, v := range input { - partnerServers = append(partnerServers, sql.PartnerInfo{ - ID: utils.String(v.ID), + partnerServers = append(partnerServers, failovergroups.PartnerInfo{ + Id: v.ID, }) } - return &partnerServers + return partnerServers } diff --git a/internal/services/mssql/mssql_failover_group_resource_test.go b/internal/services/mssql/mssql_failover_group_resource_test.go index da27372a944ec..de133a75f9fe0 100644 --- a/internal/services/mssql/mssql_failover_group_resource_test.go +++ b/internal/services/mssql/mssql_failover_group_resource_test.go @@ -8,12 +8,13 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) type MsSqlFailoverGroupResource struct{} @@ -123,20 +124,20 @@ func TestAccMsSqlFailoverGroup_requiresImport(t *testing.T) { } func (r MsSqlFailoverGroupResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.FailoverGroupID(state.ID) + id, err := failovergroups.ParseFailoverGroupID(state.ID) if err != nil { return nil, err } - resp, err := client.Sql.FailoverGroupsClient.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) + resp, err := client.MSSQL.FailoverGroupsClient.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return utils.Bool(false), nil + if response.WasNotFound(resp.HttpResponse) { + return pointer.To(false), nil } - return nil, fmt.Errorf("retrieving MsSql %s: %+v", id, err) + return nil, fmt.Errorf("retrieving %s: %+v", *id, err) } - return utils.Bool(true), nil + return pointer.To(true), nil } func (r MsSqlFailoverGroupResource) template(data acceptance.TestData) string { diff --git a/internal/services/mssql/mssql_firewall_rule_resource.go b/internal/services/mssql/mssql_firewall_rule_resource.go index 8cda822929966..c714477c48282 100644 --- a/internal/services/mssql/mssql_firewall_rule_resource.go +++ b/internal/services/mssql/mssql_firewall_rule_resource.go @@ -8,11 +8,12 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" @@ -27,7 +28,7 @@ func resourceMsSqlFirewallRule() *pluginsdk.Resource { Delete: resourceMsSqlFirewallRuleDelete, Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.FirewallRuleID(id) + _, err := firewallrules.ParseFirewallRuleID(id) return err }), @@ -83,30 +84,30 @@ func resourceMsSqlFirewallRuleCreateUpdate(d *pluginsdk.ResourceData, meta inter return fmt.Errorf("parsing server ID %q: %+v", d.Get("server_id"), err) } - id := parse.NewFirewallRuleID(serverId.SubscriptionId, serverId.ResourceGroup, serverId.Name, d.Get("name").(string)) + id := firewallrules.NewFirewallRuleID(serverId.SubscriptionId, serverId.ResourceGroup, serverId.Name, d.Get("name").(string)) if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) + existing, err := client.Get(ctx, id) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for presence of existing MSSQL %s: %+v", id.String(), err) } } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return tf.ImportAsExistsError("azurerm_mssql_firewall_rule", id.ID()) } } - parameters := sql.FirewallRule{ - ServerFirewallRuleProperties: &sql.ServerFirewallRuleProperties{ + parameters := firewallrules.FirewallRule{ + Properties: &firewallrules.ServerFirewallRuleProperties{ StartIPAddress: utils.String(d.Get("start_ip_address").(string)), EndIPAddress: utils.String(d.Get("end_ip_address").(string)), }, } - if _, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ServerName, id.Name, parameters); err != nil { - return fmt.Errorf("creating MSSQL %s: %+v", id.String(), err) + if _, err := client.CreateOrUpdate(ctx, id, parameters); err != nil { + return fmt.Errorf("creating %s: %+v", id, err) } d.SetId(id.ID()) @@ -119,28 +120,32 @@ func resourceMsSqlFirewallRuleRead(d *pluginsdk.ResourceData, meta interface{}) ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.FirewallRuleID(d.Id()) + id, err := firewallrules.ParseFirewallRuleID(d.Id()) if err != nil { return fmt.Errorf("parsing ID %q: %+v", d.Id(), err) } - resp, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) + resp, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { log.Printf("[INFO] MSSQL %s was not found - removing from state", id.String()) d.SetId("") return nil } - return fmt.Errorf("retrieving MSSQL %s: %+v", id.String(), err) + return fmt.Errorf("retrieving %s: %+v", *id, err) } - d.Set("name", id.Name) + d.Set("name", id.FirewallRuleName) - d.Set("start_ip_address", resp.StartIPAddress) - d.Set("end_ip_address", resp.EndIPAddress) + if resp.Model != nil { + if resp.Model.Properties != nil { + d.Set("start_ip_address", resp.Model.Properties.StartIPAddress) + d.Set("end_ip_address", resp.Model.Properties.EndIPAddress) + } + } - serverId := parse.NewServerID(id.SubscriptionId, id.ResourceGroup, id.ServerName) + serverId := parse.NewServerID(id.SubscriptionId, id.ResourceGroupName, id.ServerName) d.Set("server_id", serverId.ID()) return nil @@ -151,15 +156,15 @@ func resourceMsSqlFirewallRuleDelete(d *pluginsdk.ResourceData, meta interface{} ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.FirewallRuleID(d.Id()) + id, err := firewallrules.ParseFirewallRuleID(d.Id()) if err != nil { return fmt.Errorf("parsing ID %q: %+v", d.Id(), err) } - resp, err := client.Delete(ctx, id.ResourceGroup, id.ServerName, id.Name) + resp, err := client.Delete(ctx, *id) if err != nil { - if !utils.ResponseWasNotFound(resp) { - return fmt.Errorf("deleting MSSQL %s: %+v", id.String(), err) + if !response.WasNotFound(resp.HttpResponse) { + return fmt.Errorf("deleting %s: %+v", *id, err) } } diff --git a/internal/services/mssql/mssql_firewall_rule_resource_test.go b/internal/services/mssql/mssql_firewall_rule_resource_test.go index 52acb4d2d1372..c893f10aa2f84 100644 --- a/internal/services/mssql/mssql_firewall_rule_resource_test.go +++ b/internal/services/mssql/mssql_firewall_rule_resource_test.go @@ -8,12 +8,13 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) type MsSqlFirewallRuleResource struct{} @@ -71,20 +72,20 @@ func TestAccMsSqlFirewallRule_requiresImport(t *testing.T) { } func (r MsSqlFirewallRuleResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.FirewallRuleID(state.ID) + id, err := firewallrules.ParseFirewallRuleID(state.ID) if err != nil { return nil, err } - resp, err := client.MSSQL.FirewallRulesClient.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) + resp, err := client.MSSQL.FirewallRulesClient.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return utils.Bool(false), nil + if response.WasNotFound(resp.HttpResponse) { + return pointer.To(false), nil } - return nil, fmt.Errorf("retrieving MSSQL %s: %+v", id.String(), err) + return nil, fmt.Errorf("retrieving %s: %+v", *id, err) } - return utils.Bool(true), nil + return pointer.To(true), nil } func (MsSqlFirewallRuleResource) template(data acceptance.TestData) string { diff --git a/internal/services/mssql/mssql_job_agent_resource.go b/internal/services/mssql/mssql_job_agent_resource.go index faec0efed217e..7602ff9c538ef 100644 --- a/internal/services/mssql/mssql_job_agent_resource.go +++ b/internal/services/mssql/mssql_job_agent_resource.go @@ -8,18 +8,19 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-helpers/resourcemanager/location" + "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tags" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) func resourceMsSqlJobAgent() *pluginsdk.Resource { @@ -58,7 +59,7 @@ func resourceMsSqlJobAgent() *pluginsdk.Resource { "location": commonschema.Location(), - "tags": tags.Schema(), + "tags": commonschema.Tags(), }, } } @@ -76,39 +77,35 @@ func resourceMsSqlJobAgentCreateUpdate(d *pluginsdk.ResourceData, meta interface if err != nil { return err } - id := parse.NewJobAgentID(dbId.SubscriptionId, dbId.ResourceGroupName, dbId.ServerName, d.Get("name").(string)) + id := jobagents.NewJobAgentID(dbId.SubscriptionId, dbId.ResourceGroupName, dbId.ServerName, d.Get("name").(string)) if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) + existing, err := client.Get(ctx, id) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("failed to check for presence of existing %s: %s", id, err) } } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return tf.ImportAsExistsError("azurerm_mssql_job_agent", id.ID()) } } - params := sql.JobAgent{ - Name: &id.Name, - Location: utils.String(location), - JobAgentProperties: &sql.JobAgentProperties{ - DatabaseID: &databaseId, + params := jobagents.JobAgent{ + Name: &id.JobAgentName, + Location: location, + Properties: &jobagents.JobAgentProperties{ + DatabaseId: databaseId, }, Tags: tags.Expand(d.Get("tags").(map[string]interface{})), } - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ServerName, id.Name, params) + err = client.CreateOrUpdateThenPoll(ctx, id, params) if err != nil { return fmt.Errorf("creating %s: %+v", id, err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for creation of %s: %+v", id, err) - } - d.SetId(id.ID()) return resourceMsSqlJobAgentRead(d, meta) @@ -119,28 +116,31 @@ func resourceMsSqlJobAgentRead(d *pluginsdk.ResourceData, meta interface{}) erro ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.JobAgentID(d.Id()) + id, err := jobagents.ParseJobAgentID(d.Id()) if err != nil { return err } - resp, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) + resp, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { d.SetId("") return nil } - return fmt.Errorf("reading MsSql Job Agent %s (MsSql Server Name %q / Resource Group %q): %s", id.Name, id.ServerName, id.ResourceGroup, err) + return fmt.Errorf("reading %s: %s", *id, err) } - d.Set("name", resp.Name) - if location := resp.Location; location != nil { - d.Set("location", azure.NormalizeLocation(*location)) - } + d.Set("name", id.JobAgentName) - d.Set("database_id", resp.DatabaseID) + if model := resp.Model; model != nil { + d.Set("location", location.Normalize(model.Location)) - return tags.FlattenAndSet(d, resp.Tags) + if props := resp.Model.Properties; props != nil { + d.Set("database_id", props.DatabaseId) + } + return tags.FlattenAndSet(d, model.Tags) + } + return nil } func resourceMsSqlJobAgentDelete(d *pluginsdk.ResourceData, meta interface{}) error { @@ -148,15 +148,15 @@ func resourceMsSqlJobAgentDelete(d *pluginsdk.ResourceData, meta interface{}) er ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.JobAgentID(d.Id()) + id, err := jobagents.ParseJobAgentID(d.Id()) if err != nil { return err } - future, err := client.Delete(ctx, id.ResourceGroup, id.ServerName, id.Name) + err = client.DeleteThenPoll(ctx, *id) if err != nil { - return fmt.Errorf("deleting Job Agent %s: %+v", id.Name, err) + return fmt.Errorf("deleting %s: %+v", *id, err) } - return future.WaitForCompletionRef(ctx, client.Client) + return nil } diff --git a/internal/services/mssql/mssql_job_agent_resource_test.go b/internal/services/mssql/mssql_job_agent_resource_test.go index d3894e875ab7a..0f88c117bdb58 100644 --- a/internal/services/mssql/mssql_job_agent_resource_test.go +++ b/internal/services/mssql/mssql_job_agent_resource_test.go @@ -8,12 +8,13 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) type MsSqlJobAgentResource struct{} @@ -71,20 +72,20 @@ func TestAccMsSqlJobAgent_update(t *testing.T) { } func (MsSqlJobAgentResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.JobAgentID(state.ID) + id, err := jobagents.ParseJobAgentID(state.ID) if err != nil { return nil, err } - resp, err := client.MSSQL.JobAgentsClient.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) + resp, err := client.MSSQL.JobAgentsClient.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return nil, fmt.Errorf("Job Agent %q (Resource Group %q) does not exist", id.Name, id.ResourceGroup) + if response.WasNotFound(resp.HttpResponse) { + return nil, fmt.Errorf("%s does not exist", *id) } - return nil, fmt.Errorf("reading Job Agent %q (Resource Group %q): %v", id.Name, id.ResourceGroup, err) + return nil, fmt.Errorf("reading %s: %v", *id, err) } - return utils.Bool(resp.ID != nil), nil + return pointer.To(resp.Model != nil), nil } func (MsSqlJobAgentResource) basic(data acceptance.TestData) string { diff --git a/internal/services/mssql/mssql_job_credential_resource.go b/internal/services/mssql/mssql_job_credential_resource.go index 47a5da41c78ad..1ff330fa55474 100644 --- a/internal/services/mssql/mssql_job_credential_resource.go +++ b/internal/services/mssql/mssql_job_credential_resource.go @@ -8,7 +8,8 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" @@ -72,37 +73,37 @@ func resourceMsSqlJobCredentialCreateUpdate(d *pluginsdk.ResourceData, meta inte log.Printf("[INFO] preparing arguments for Job Credential creation.") - jaId, err := parse.JobAgentID(d.Get("job_agent_id").(string)) + jaId, err := jobcredentials.ParseJobAgentID(d.Get("job_agent_id").(string)) if err != nil { return err } - jobCredentialId := parse.NewJobCredentialID(jaId.SubscriptionId, jaId.ResourceGroup, jaId.ServerName, jaId.Name, d.Get("name").(string)) + jobCredentialId := jobcredentials.NewCredentialID(jaId.SubscriptionId, jaId.ResourceGroupName, jaId.ServerName, jaId.JobAgentName, d.Get("name").(string)) username := d.Get("username").(string) password := d.Get("password").(string) if d.IsNewResource() { - existing, err := client.Get(ctx, jobCredentialId.ResourceGroup, jobCredentialId.ServerName, jobCredentialId.JobAgentName, jobCredentialId.CredentialName) + existing, err := client.Get(ctx, jobCredentialId) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for presence of existing MsSql %s: %+v", jobCredentialId, err) } } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return tf.ImportAsExistsError("azurerm_mssql_job_credential", jobCredentialId.ID()) } } - jobCredential := sql.JobCredential{ + jobCredential := jobcredentials.JobCredential{ Name: utils.String(jobCredentialId.CredentialName), - JobCredentialProperties: &sql.JobCredentialProperties{ - Username: utils.String(username), - Password: utils.String(password), + Properties: &jobcredentials.JobCredentialProperties{ + Username: username, + Password: password, }, } - if _, err := client.CreateOrUpdate(ctx, jobCredentialId.ResourceGroup, jobCredentialId.ServerName, jobCredentialId.JobAgentName, jobCredentialId.CredentialName, jobCredential); err != nil { + if _, err := client.CreateOrUpdate(ctx, jobCredentialId, jobCredential); err != nil { return fmt.Errorf("creating MsSql %s: %+v", jobCredentialId, err) } @@ -116,26 +117,29 @@ func resourceMsSqlJobCredentialRead(d *pluginsdk.ResourceData, meta interface{}) ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.JobCredentialID(d.Id()) + id, err := jobcredentials.ParseCredentialID(d.Id()) if err != nil { return err } - resp, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.JobAgentName, id.CredentialName) + resp, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { d.SetId("") return nil } - return fmt.Errorf("reading MsSql Job Credential %s (Job Agent %q / MsSql Server %q / Resource Group %q): %s", id.CredentialName, id.JobAgentName, id.ServerName, id.ResourceGroup, err) + return fmt.Errorf("reading %s: %s", *id, err) } - d.Set("name", resp.Name) - d.Set("username", resp.Username) - - jobAgentId := parse.NewJobAgentID(id.SubscriptionId, id.ResourceGroup, id.ServerName, id.JobAgentName) + d.Set("name", id.CredentialName) + jobAgentId := jobcredentials.NewJobAgentID(id.SubscriptionId, id.ResourceGroupName, id.ServerName, id.JobAgentName) d.Set("job_agent_id", jobAgentId.ID()) + if model := resp.Model; model != nil { + if props := model.Properties; props != nil { + d.Set("username", props.Username) + } + } return nil } @@ -144,14 +148,14 @@ func resourceMsSqlJobCredentialDelete(d *pluginsdk.ResourceData, meta interface{ ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.JobCredentialID(d.Id()) + id, err := jobcredentials.ParseCredentialID(d.Id()) if err != nil { return err } - _, err = client.Delete(ctx, id.ResourceGroup, id.ServerName, id.JobAgentName, id.CredentialName) + _, err = client.Delete(ctx, *id) if err != nil { - return fmt.Errorf("deleting Job Credential %s: %+v", id.CredentialName, err) + return fmt.Errorf("deleting %s: %+v", id, err) } return nil diff --git a/internal/services/mssql/mssql_job_credential_resource_test.go b/internal/services/mssql/mssql_job_credential_resource_test.go index 5949d415ae147..98851a332ef24 100644 --- a/internal/services/mssql/mssql_job_credential_resource_test.go +++ b/internal/services/mssql/mssql_job_credential_resource_test.go @@ -8,12 +8,13 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) type MsSqlJobCredentialResource struct{} @@ -71,20 +72,20 @@ func TestAccMsSqlJobCredential_update(t *testing.T) { } func (MsSqlJobCredentialResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.JobCredentialID(state.ID) + id, err := jobcredentials.ParseCredentialID(state.ID) if err != nil { return nil, err } - resp, err := client.MSSQL.JobCredentialsClient.Get(ctx, id.ResourceGroup, id.ServerName, id.JobAgentName, id.CredentialName) + resp, err := client.MSSQL.JobCredentialsClient.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return nil, fmt.Errorf("Job Credential %q (Job Agent %q / Server Name %q / Resource Group %q) does not exist", id.CredentialName, id.JobAgentName, id.ServerName, id.ResourceGroup) + if response.WasNotFound(resp.HttpResponse) { + return nil, fmt.Errorf("%s does not exist", *id) } - return nil, fmt.Errorf("reading Job Credential %q (Job Agent %q / Server Name %q / Resource Group %q): %v", id.CredentialName, id.JobAgentName, id.ServerName, id.ResourceGroup, err) + return nil, fmt.Errorf("reading %s: %v", id, err) } - return utils.Bool(resp.ID != nil), nil + return pointer.To(resp.Model != nil), nil } func (MsSqlJobCredentialResource) basic(data acceptance.TestData) string { diff --git a/internal/services/mssql/mssql_outbound_firewall_rule_resource.go b/internal/services/mssql/mssql_outbound_firewall_rule_resource.go index e65e951a1d6a4..3154bf62d7a2e 100644 --- a/internal/services/mssql/mssql_outbound_firewall_rule_resource.go +++ b/internal/services/mssql/mssql_outbound_firewall_rule_resource.go @@ -8,14 +8,14 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) func resourceMsSqlOutboundFirewallRule() *pluginsdk.Resource { @@ -62,32 +62,25 @@ func resourceMsSqlOutboundFirewallRuleCreate(d *pluginsdk.ResourceData, meta int return fmt.Errorf("parsing server ID %q: %+v", d.Get("server_id"), err) } - id := parse.NewOutboundFirewallRuleID(serverId.SubscriptionId, serverId.ResourceGroup, serverId.Name, d.Get("name").(string)) + id := outboundfirewallrules.NewOutboundFirewallRuleID(serverId.SubscriptionId, serverId.ResourceGroup, serverId.Name, d.Get("name").(string)) if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) + existing, err := client.Get(ctx, id) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { - return fmt.Errorf("checking for presence of existing MSSQL %s: %+v", id.String(), err) + if !response.WasNotFound(existing.HttpResponse) { + return fmt.Errorf("checking for presence of existing %s: %+v", id, err) } } - if existing.ID != nil && *existing.ID != "" { + if existing.Model != nil && existing.Model.Id != nil && *existing.Model.Id != "" { return tf.ImportAsExistsError("azurerm_mssql_outbound_firewall_rule", id.ID()) } } - parameters := sql.OutboundFirewallRule{ - OutboundFirewallRuleProperties: &sql.OutboundFirewallRuleProperties{}, - } - - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ServerName, id.Name, parameters) + err = client.CreateOrUpdateThenPoll(ctx, id) if err != nil { return fmt.Errorf("creating MSSQL %s: %+v", id.String(), err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for creation/update of %s: %+v", id.String(), err) - } d.SetId(id.ID()) @@ -99,14 +92,14 @@ func resourceMsSqlOutboundFirewallRuleRead(d *pluginsdk.ResourceData, meta inter ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.OutboundFirewallRuleID(d.Id()) + id, err := outboundfirewallrules.ParseOutboundFirewallRuleID(d.Id()) if err != nil { - return fmt.Errorf("parsing ID %q: %+v", d.Id(), err) + return err } - resp, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) + resp, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { log.Printf("[INFO] MSSQL %s was not found - removing from state", id.String()) d.SetId("") return nil @@ -115,9 +108,9 @@ func resourceMsSqlOutboundFirewallRuleRead(d *pluginsdk.ResourceData, meta inter return fmt.Errorf("retrieving MSSQL %s: %+v", id.String(), err) } - d.Set("name", id.Name) + d.Set("name", id.OutboundFirewallRuleName) - serverId := parse.NewServerID(id.SubscriptionId, id.ResourceGroup, id.ServerName) + serverId := parse.NewServerID(id.SubscriptionId, id.ResourceGroupName, id.ServerName) d.Set("server_id", serverId.ID()) return nil @@ -128,19 +121,15 @@ func resourceMsSqlOutboundFirewallRuleDelete(d *pluginsdk.ResourceData, meta int ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.OutboundFirewallRuleID(d.Id()) + id, err := outboundfirewallrules.ParseOutboundFirewallRuleID(d.Id()) if err != nil { return fmt.Errorf("parsing ID %q: %+v", d.Id(), err) } - future, err := client.Delete(ctx, id.ResourceGroup, id.ServerName, id.Name) + err = client.DeleteThenPoll(ctx, *id) if err != nil { return fmt.Errorf("deleting MSSQL %s: %+v", id.String(), err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for delete of %s: %+v", id.String(), err) - } - return nil } diff --git a/internal/services/mssql/mssql_outbound_firewall_rule_resource_test.go b/internal/services/mssql/mssql_outbound_firewall_rule_resource_test.go index 7f59b2f6a330d..378a5927ee983 100644 --- a/internal/services/mssql/mssql_outbound_firewall_rule_resource_test.go +++ b/internal/services/mssql/mssql_outbound_firewall_rule_resource_test.go @@ -8,12 +8,13 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) type MsSqlOutboundFirewallRuleResource struct{} @@ -71,20 +72,20 @@ func TestAccMsSqlOutboundFirewallRule_requiresImport(t *testing.T) { } func (r MsSqlOutboundFirewallRuleResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.OutboundFirewallRuleID(state.ID) + id, err := outboundfirewallrules.ParseOutboundFirewallRuleID(state.ID) if err != nil { return nil, err } - resp, err := client.MSSQL.OutboundFirewallRulesClient.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) + resp, err := client.MSSQL.OutboundFirewallRulesClient.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return utils.Bool(false), nil + if response.WasNotFound(resp.HttpResponse) { + return pointer.To(false), nil } - return nil, fmt.Errorf("retrieving MSSQL %s: %+v", id.String(), err) + return nil, fmt.Errorf("retrieving %s: %+v", *id, err) } - return utils.Bool(true), nil + return pointer.To(true), nil } func (MsSqlOutboundFirewallRuleResource) template(data acceptance.TestData) string { diff --git a/internal/services/mssql/mssql_server_data_source.go b/internal/services/mssql/mssql_server_data_source.go index 109ba98b64bd3..01b8034aba387 100644 --- a/internal/services/mssql/mssql_server_data_source.go +++ b/internal/services/mssql/mssql_server_data_source.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" diff --git a/internal/services/mssql/mssql_server_dns_alias_resource.go b/internal/services/mssql/mssql_server_dns_alias_resource.go index 5b782164d1791..37f403103177a 100644 --- a/internal/services/mssql/mssql_server_dns_alias_resource.go +++ b/internal/services/mssql/mssql_server_dns_alias_resource.go @@ -8,6 +8,8 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/validate" @@ -76,22 +78,19 @@ func (m ServerDNSAliasResource) Create() sdk.ResourceFunc { return err } - id := parse.NewServerDNSAliasID(serverID.SubscriptionId, serverID.ResourceGroup, serverID.Name, alias.Name) - existing, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.DnsAliaseName) - if !utils.ResponseWasNotFound(existing.Response) { + id := serverdnsaliases.NewDnsAliasID(serverID.SubscriptionId, serverID.ResourceGroup, serverID.Name, alias.Name) + existing, err := client.Get(ctx, id) + if !response.WasNotFound(existing.HttpResponse) { if err != nil { return fmt.Errorf("retreiving %s: %v", id, err) } return metadata.ResourceRequiresImport(m.ResourceType(), id) } - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ServerName, id.DnsAliaseName) + err = client.CreateOrUpdateThenPoll(ctx, id) if err != nil { return fmt.Errorf("creating %s: %v", id, err) } - if err := future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for creation of %s: %v", id, err) - } metadata.SetID(id) return nil @@ -103,24 +102,26 @@ func (m ServerDNSAliasResource) Read() sdk.ResourceFunc { return sdk.ResourceFunc{ Timeout: 5 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - id, err := parse.ServerDNSAliasID(metadata.ResourceData.Id()) + id, err := serverdnsaliases.ParseDnsAliasID(metadata.ResourceData.Id()) if err != nil { return err } client := metadata.Client.MSSQL.ServerDNSAliasClient - alias, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.DnsAliaseName) + alias, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(alias.Response) { + if response.WasNotFound(alias.HttpResponse) { return metadata.MarkAsGone(id) } return err } state := ServerDNSAliasModel{ - Name: id.DnsAliaseName, - MsSQLServerId: parse.NewServerID(id.SubscriptionId, id.ResourceGroup, id.ServerName).ID(), + Name: id.DnsAliasName, + MsSQLServerId: parse.NewServerID(id.SubscriptionId, id.ResourceGroupName, id.ServerName).ID(), } - if prop := alias.ServerDNSAliasProperties; prop != nil { - state.DNSRecord = utils.NormalizeNilableString(prop.AzureDNSRecord) + if alias.Model != nil { + if prop := alias.Model.Properties; prop != nil { + state.DNSRecord = utils.NormalizeNilableString(prop.AzureDnsRecord) + } } return metadata.Encode(&state) }, @@ -131,20 +132,16 @@ func (m ServerDNSAliasResource) Delete() sdk.ResourceFunc { return sdk.ResourceFunc{ Timeout: 10 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - id, err := parse.ServerDNSAliasID(metadata.ResourceData.Id()) + id, err := serverdnsaliases.ParseDnsAliasID(metadata.ResourceData.Id()) if err != nil { return err } metadata.Logger.Infof("deleting %s", id) client := metadata.Client.MSSQL.ServerDNSAliasClient - future, err := client.Delete(ctx, id.ResourceGroup, id.ServerName, id.DnsAliaseName) + err = client.DeleteThenPoll(ctx, *id) if err != nil { return fmt.Errorf("deleting %s: %v", id, err) } - if err := future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for deletion of %q: %+v", id, err) - } - return nil }, } diff --git a/internal/services/mssql/mssql_server_dns_alias_resource_test.go b/internal/services/mssql/mssql_server_dns_alias_resource_test.go index 7315041fdad39..5ba3ed957977d 100644 --- a/internal/services/mssql/mssql_server_dns_alias_resource_test.go +++ b/internal/services/mssql/mssql_server_dns_alias_resource_test.go @@ -8,10 +8,12 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -49,20 +51,20 @@ func TestAccServerDNSAlias_requiresImport(t *testing.T) { } func (r ServerDNSAliasResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.ServerDNSAliasID(state.ID) + id, err := serverdnsaliases.ParseDnsAliasID(state.ID) if err != nil { return nil, err } - resp, err := client.MSSQL.ServerDNSAliasClient.Get(ctx, id.ResourceGroup, id.ServerName, id.DnsAliaseName) + resp, err := client.MSSQL.ServerDNSAliasClient.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return utils.Bool(false), nil + if response.WasNotFound(resp.HttpResponse) { + return pointer.To(false), nil } return nil, fmt.Errorf("retreiving %s: %v", id, err) } - if utils.ResponseWasNotFound(resp.Response) { - return utils.Bool(false), nil + if response.WasNotFound(resp.HttpResponse) { + return pointer.To(false), nil } return utils.Bool(true), nil } diff --git a/internal/services/mssql/mssql_server_extended_auditing_policy_resource.go b/internal/services/mssql/mssql_server_extended_auditing_policy_resource.go index 75254536a427f..48df400f50741 100644 --- a/internal/services/mssql/mssql_server_extended_auditing_policy_resource.go +++ b/internal/services/mssql/mssql_server_extended_auditing_policy_resource.go @@ -8,10 +8,10 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck - "github.com/gofrs/uuid" "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" @@ -116,7 +116,7 @@ func resourceMsSqlServerExtendedAuditingPolicy() *pluginsdk.Resource { } func resourceMsSqlServerExtendedAuditingPolicyCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).MSSQL.ServerExtendedBlobAuditingPoliciesClient + client := meta.(*clients.Client).MSSQL.BlobAuditingPoliciesClient subscriptionId := meta.(*clients.Client).Account.SubscriptionId ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) defer cancel() @@ -129,63 +129,55 @@ func resourceMsSqlServerExtendedAuditingPolicyCreateUpdate(d *pluginsdk.Resource } if d.IsNewResource() { - existing, err := client.Get(ctx, serverId.ResourceGroupName, serverId.ServerName) + existing, err := client.ExtendedServerBlobAuditingPoliciesGet(ctx, *serverId) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("retrieving MsSql Server Extended Auditing Policy %s: %+v", serverId, err) } } // if state is not disabled, we should import it. - if existing.ID != nil && *existing.ID != "" && existing.ExtendedServerBlobAuditingPolicyProperties != nil && existing.ExtendedServerBlobAuditingPolicyProperties.State != sql.BlobAuditingPolicyStateDisabled { - return tf.ImportAsExistsError("azurerm_mssql_server_extended_auditing_policy", *existing.ID) + if existing.Model != nil && existing.Model.Id != nil && *existing.Model.Id != "" && existing.Model.Properties != nil && existing.Model.Properties.State != blobauditing.BlobAuditingPolicyStateDisabled { + return tf.ImportAsExistsError("azurerm_mssql_server_extended_auditing_policy", *existing.Model.Id) } } - params := sql.ExtendedServerBlobAuditingPolicy{ - ExtendedServerBlobAuditingPolicyProperties: &sql.ExtendedServerBlobAuditingPolicyProperties{ + params := blobauditing.ExtendedServerBlobAuditingPolicy{ + Properties: &blobauditing.ExtendedServerBlobAuditingPolicyProperties{ StorageEndpoint: utils.String(d.Get("storage_endpoint").(string)), IsStorageSecondaryKeyInUse: utils.Bool(d.Get("storage_account_access_key_is_secondary").(bool)), - RetentionDays: utils.Int32(int32(d.Get("retention_in_days").(int))), + RetentionDays: utils.Int64(int64(d.Get("retention_in_days").(int))), IsAzureMonitorTargetEnabled: utils.Bool(d.Get("log_monitoring_enabled").(bool)), }, } if d.Get("enabled").(bool) { - params.ExtendedServerBlobAuditingPolicyProperties.State = sql.BlobAuditingPolicyStateEnabled + params.Properties.State = blobauditing.BlobAuditingPolicyStateEnabled } else { - params.ExtendedServerBlobAuditingPolicyProperties.State = sql.BlobAuditingPolicyStateDisabled + params.Properties.State = blobauditing.BlobAuditingPolicyStateDisabled } if v, ok := d.GetOk("storage_account_subscription_id"); ok { - u, err := uuid.FromString(v.(string)) - if err != nil { - return fmt.Errorf("while parsing storage_account_subscrption_id value %q as UUID: %+v", v.(string), err) - } - params.ExtendedServerBlobAuditingPolicyProperties.StorageAccountSubscriptionID = &u + params.Properties.StorageAccountSubscriptionId = pointer.To(v.(string)) } if v, ok := d.GetOk("storage_account_access_key"); ok { - params.ExtendedServerBlobAuditingPolicyProperties.StorageAccountAccessKey = utils.String(v.(string)) + params.Properties.StorageAccountAccessKey = utils.String(v.(string)) } if v, ok := d.GetOk("predicate_expression"); ok { - params.ExtendedServerBlobAuditingPolicyProperties.PredicateExpression = pointer.To(v.(string)) + params.Properties.PredicateExpression = pointer.To(v.(string)) } if v, ok := d.GetOk("audit_actions_and_groups"); ok && len(v.([]interface{})) > 0 { - params.ExtendedServerBlobAuditingPolicyProperties.AuditActionsAndGroups = utils.ExpandStringSlice(v.([]interface{})) + params.Properties.AuditActionsAndGroups = utils.ExpandStringSlice(v.([]interface{})) } - future, err := client.CreateOrUpdate(ctx, serverId.ResourceGroupName, serverId.ServerName, params) + err = client.ExtendedServerBlobAuditingPoliciesCreateOrUpdateThenPoll(ctx, *serverId, params) if err != nil { return fmt.Errorf("creating MsSql Server Extended Auditing Policy %s: %+v", serverId, err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for creation of MsSql Server Extended Auditing Policy %s: %+v", serverId, err) - } - id := parse.NewServerExtendedAuditingPolicyID(subscriptionId, serverId.ResourceGroupName, serverId.ServerName, "default") d.SetId(id.ID()) @@ -194,7 +186,7 @@ func resourceMsSqlServerExtendedAuditingPolicyCreateUpdate(d *pluginsdk.Resource } func resourceMsSqlServerExtendedAuditingPolicyRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).MSSQL.ServerExtendedBlobAuditingPoliciesClient + client := meta.(*clients.Client).MSSQL.BlobAuditingPoliciesClient ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() @@ -203,29 +195,32 @@ func resourceMsSqlServerExtendedAuditingPolicyRead(d *pluginsdk.ResourceData, me return err } - resp, err := client.Get(ctx, id.ResourceGroup, id.ServerName) + serverId := commonids.NewSqlServerID(id.SubscriptionId, id.ResourceGroup, id.ServerName) + + resp, err := client.ExtendedServerBlobAuditingPoliciesGet(ctx, serverId) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { d.SetId("") return nil } return fmt.Errorf("reading MsSql Server Extended Auditing Policy %s: %+v", id, err) } - serverId := commonids.NewSqlServerID(id.SubscriptionId, id.ResourceGroup, id.ServerName) d.Set("server_id", serverId.ID()) - if props := resp.ExtendedServerBlobAuditingPolicyProperties; props != nil { - d.Set("storage_endpoint", props.StorageEndpoint) - d.Set("storage_account_access_key_is_secondary", props.IsStorageSecondaryKeyInUse) - d.Set("retention_in_days", props.RetentionDays) - d.Set("log_monitoring_enabled", props.IsAzureMonitorTargetEnabled) - d.Set("enabled", props.State == sql.BlobAuditingPolicyStateEnabled) - d.Set("predicate_expression", props.PredicateExpression) - d.Set("audit_actions_and_groups", utils.FlattenStringSlice(props.AuditActionsAndGroups)) - - if props.StorageAccountSubscriptionID.String() != "00000000-0000-0000-0000-000000000000" { - d.Set("storage_account_subscription_id", props.StorageAccountSubscriptionID.String()) + if model := resp.Model; model != nil { + if props := model.Properties; props != nil { + d.Set("storage_endpoint", props.StorageEndpoint) + d.Set("storage_account_access_key_is_secondary", props.IsStorageSecondaryKeyInUse) + d.Set("retention_in_days", props.RetentionDays) + d.Set("log_monitoring_enabled", props.IsAzureMonitorTargetEnabled) + d.Set("enabled", props.State == blobauditing.BlobAuditingPolicyStateEnabled) + d.Set("predicate_expression", props.PredicateExpression) + d.Set("audit_actions_and_groups", utils.FlattenStringSlice(props.AuditActionsAndGroups)) + + if pointer.From(props.StorageAccountSubscriptionId) != "00000000-0000-0000-0000-000000000000" { + d.Set("storage_account_subscription_id", props.StorageAccountSubscriptionId) + } } } @@ -233,7 +228,7 @@ func resourceMsSqlServerExtendedAuditingPolicyRead(d *pluginsdk.ResourceData, me } func resourceMsSqlServerExtendedAuditingPolicyDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).MSSQL.ServerExtendedBlobAuditingPoliciesClient + client := meta.(*clients.Client).MSSQL.BlobAuditingPoliciesClient ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() @@ -242,20 +237,17 @@ func resourceMsSqlServerExtendedAuditingPolicyDelete(d *pluginsdk.ResourceData, return err } - params := sql.ExtendedServerBlobAuditingPolicy{ - ExtendedServerBlobAuditingPolicyProperties: &sql.ExtendedServerBlobAuditingPolicyProperties{ - State: sql.BlobAuditingPolicyStateDisabled, + serverId := commonids.NewSqlServerID(id.SubscriptionId, id.ResourceGroup, id.ServerName) + + params := blobauditing.ExtendedServerBlobAuditingPolicy{ + Properties: &blobauditing.ExtendedServerBlobAuditingPolicyProperties{ + State: blobauditing.BlobAuditingPolicyStateDisabled, }, } - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ServerName, params) + err = client.ExtendedServerBlobAuditingPoliciesCreateOrUpdateThenPoll(ctx, serverId, params) if err != nil { - return fmt.Errorf("deleting MsSql Server %q Extended Auditing Policy(Resource Group %q): %+v", id.ServerName, id.ResourceGroup, err) + return fmt.Errorf("deleting %s: %+v", serverId, err) } - - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for deletion of MsSql Server %q Extended Auditing Policy (Resource Group %q): %+v", id.ServerName, id.ResourceGroup, err) - } - return nil } diff --git a/internal/services/mssql/mssql_server_extended_auditing_policy_resource_test.go b/internal/services/mssql/mssql_server_extended_auditing_policy_resource_test.go index eceeb5ece3cc9..2a9b539ab559f 100644 --- a/internal/services/mssql/mssql_server_extended_auditing_policy_resource_test.go +++ b/internal/services/mssql/mssql_server_extended_auditing_policy_resource_test.go @@ -8,12 +8,14 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) type MsSqlServerExtendedAuditingPolicyResource struct{} @@ -178,16 +180,18 @@ func (MsSqlServerExtendedAuditingPolicyResource) Exists(ctx context.Context, cli return nil, err } - resp, err := client.MSSQL.ServerExtendedBlobAuditingPoliciesClient.Get(ctx, id.ResourceGroup, id.ServerName) + serverid := commonids.NewSqlServerID(id.SubscriptionId, id.ResourceGroup, id.ServerName) + + resp, err := client.MSSQL.BlobAuditingPoliciesClient.ExtendedServerBlobAuditingPoliciesGet(ctx, serverid) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return nil, fmt.Errorf("SQL Server Extended Auditing Policy for server %q (Resource Group %q) does not exist", id.ServerName, id.ResourceGroup) + if response.WasNotFound(resp.HttpResponse) { + return nil, fmt.Errorf("%s does not exist", *id) } - return nil, fmt.Errorf("reading SQL Server Extended Auditing Policy for server %q (Resource Group %q): %v", id.ServerName, id.ResourceGroup, err) + return nil, fmt.Errorf("reading %s: %v", *id, err) } - return utils.Bool(resp.ID != nil), nil + return pointer.To(resp.Model != nil), nil } func (MsSqlServerExtendedAuditingPolicyResource) template(data acceptance.TestData) string { diff --git a/internal/services/mssql/mssql_server_microsoft_support_auditing_policy_resource.go b/internal/services/mssql/mssql_server_microsoft_support_auditing_policy_resource.go index 0be381bdd8678..ab044ab13fc90 100644 --- a/internal/services/mssql/mssql_server_microsoft_support_auditing_policy_resource.go +++ b/internal/services/mssql/mssql_server_microsoft_support_auditing_policy_resource.go @@ -8,9 +8,10 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck - "github.com/gofrs/uuid" + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" @@ -97,56 +98,48 @@ func resourceMsSqlServerMicrosoftSupportAuditingPolicyCreateUpdate(d *pluginsdk. } if d.IsNewResource() { - existing, err := client.Get(ctx, serverId.ResourceGroupName, serverId.ServerName, "default") + existing, err := client.SettingsGet(ctx, *serverId) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("retrieving MsSql Server Microsoft Support Auditing Policy %s: %+v", serverId, err) } } // if state is not disabled, we should import it. - if existing.ID != nil && *existing.ID != "" && existing.ServerDevOpsAuditSettingsProperties != nil && existing.ServerDevOpsAuditSettingsProperties.State != sql.BlobAuditingPolicyStateDisabled { - return tf.ImportAsExistsError("azurerm_mssql_server_microsoft_support_auditing_policy", *existing.ID) + if existing.Model != nil && existing.Model.Id != nil && *existing.Model.Id != "" && existing.Model.Properties != nil && existing.Model.Properties.State != serverdevopsaudit.BlobAuditingPolicyStateDisabled { + return tf.ImportAsExistsError("azurerm_mssql_server_microsoft_support_auditing_policy", *existing.Model.Id) } } - params := sql.ServerDevOpsAuditingSettings{ - ServerDevOpsAuditSettingsProperties: &sql.ServerDevOpsAuditSettingsProperties{ + params := serverdevopsaudit.ServerDevOpsAuditingSettings{ + Properties: &serverdevopsaudit.ServerDevOpsAuditSettingsProperties{ IsAzureMonitorTargetEnabled: utils.Bool(d.Get("log_monitoring_enabled").(bool)), }, } if v := d.Get("blob_storage_endpoint").(string); v != "" { - params.ServerDevOpsAuditSettingsProperties.StorageEndpoint = utils.String(v) + params.Properties.StorageEndpoint = utils.String(v) } if d.Get("enabled").(bool) { - params.ServerDevOpsAuditSettingsProperties.State = sql.BlobAuditingPolicyStateEnabled + params.Properties.State = serverdevopsaudit.BlobAuditingPolicyStateEnabled } else { - params.ServerDevOpsAuditSettingsProperties.State = sql.BlobAuditingPolicyStateDisabled + params.Properties.State = serverdevopsaudit.BlobAuditingPolicyStateDisabled } if v, ok := d.GetOk("storage_account_subscription_id"); ok { - u, err := uuid.FromString(v.(string)) - if err != nil { - return fmt.Errorf("while parsing storage_account_subscrption_id value %q as UUID: %+v", v.(string), err) - } - params.ServerDevOpsAuditSettingsProperties.StorageAccountSubscriptionID = &u + params.Properties.StorageAccountSubscriptionId = pointer.To(v.(string)) } if v, ok := d.GetOk("storage_account_access_key"); ok { - params.ServerDevOpsAuditSettingsProperties.StorageAccountAccessKey = utils.String(v.(string)) + params.Properties.StorageAccountAccessKey = utils.String(v.(string)) } - future, err := client.CreateOrUpdate(ctx, serverId.ResourceGroupName, serverId.ServerName, "default", params) + err = client.SettingsCreateOrUpdateThenPoll(ctx, *serverId, params) if err != nil { return fmt.Errorf("creating MsSql Server Microsoft Support Auditing Policy %s: %+v", serverId, err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for the creation of the MsSql Server Microsoft Support Auditing Policy %s: %+v", serverId, err) - } - id := parse.NewServerMicrosoftSupportAuditingPolicyID(subscriptionId, serverId.ResourceGroupName, serverId.ServerName, "default") d.SetId(id.ID()) @@ -164,26 +157,28 @@ func resourceMsSqlServerMicrosoftSupportAuditingPolicyRead(d *pluginsdk.Resource return err } - resp, err := client.Get(ctx, id.ResourceGroup, id.ServerName, "default") + serverId := commonids.NewSqlServerID(id.SubscriptionId, id.ResourceGroup, id.ServerName) + + resp, err := client.SettingsGet(ctx, serverId) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { d.SetId("") return nil } - return fmt.Errorf("reading MsSql Server %s Microsoft Support Auditing Policy (Resource Group %q): %s", id.ServerName, id.ResourceGroup, err) + return fmt.Errorf("reading %s: %s", *id, err) } - serverId := commonids.NewSqlServerID(id.SubscriptionId, id.ResourceGroup, id.ServerName) - d.Set("server_id", serverId.ID()) - if props := resp.ServerDevOpsAuditSettingsProperties; props != nil { - d.Set("blob_storage_endpoint", props.StorageEndpoint) - d.Set("log_monitoring_enabled", props.IsAzureMonitorTargetEnabled) - d.Set("enabled", props.State == sql.BlobAuditingPolicyStateEnabled) + if model := resp.Model; model != nil { + if props := model.Properties; props != nil { + d.Set("blob_storage_endpoint", props.StorageEndpoint) + d.Set("log_monitoring_enabled", props.IsAzureMonitorTargetEnabled) + d.Set("enabled", props.State == serverdevopsaudit.BlobAuditingPolicyStateEnabled) - if props.StorageAccountSubscriptionID.String() != "00000000-0000-0000-0000-000000000000" { - d.Set("storage_account_subscription_id", props.StorageAccountSubscriptionID.String()) + if pointer.From(props.StorageAccountSubscriptionId) != "00000000-0000-0000-0000-000000000000" { + d.Set("storage_account_subscription_id", pointer.From(props.StorageAccountSubscriptionId)) + } } } @@ -200,19 +195,17 @@ func resourceMsSqlServerMicrosoftSupportAuditingPolicyDelete(d *pluginsdk.Resour return err } - params := sql.ServerDevOpsAuditingSettings{ - ServerDevOpsAuditSettingsProperties: &sql.ServerDevOpsAuditSettingsProperties{ - State: sql.BlobAuditingPolicyStateDisabled, + serverId := commonids.NewSqlServerID(id.SubscriptionId, id.ResourceGroup, id.ServerName) + + params := serverdevopsaudit.ServerDevOpsAuditingSettings{ + Properties: &serverdevopsaudit.ServerDevOpsAuditSettingsProperties{ + State: serverdevopsaudit.BlobAuditingPolicyStateDisabled, }, } - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ServerName, "default", params) + err = client.SettingsCreateOrUpdateThenPoll(ctx, serverId, params) if err != nil { - return fmt.Errorf("deleting MsSql Server %q Microsoft Support Auditing Policy(Resource Group %q): %+v", id.ServerName, id.ResourceGroup, err) - } - - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for deletion of MsSql Server %q Microsoft Support Auditing Policy (Resource Group %q): %+v", id.ServerName, id.ResourceGroup, err) + return fmt.Errorf("deleting %s: %+v", id, err) } return nil diff --git a/internal/services/mssql/mssql_server_microsoft_support_auditing_policy_resource_test.go b/internal/services/mssql/mssql_server_microsoft_support_auditing_policy_resource_test.go index c554ef09b8992..9d8f7778aeeea 100644 --- a/internal/services/mssql/mssql_server_microsoft_support_auditing_policy_resource_test.go +++ b/internal/services/mssql/mssql_server_microsoft_support_auditing_policy_resource_test.go @@ -8,12 +8,14 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) type MsSqlServerMicrosoftSupportAuditingPolicyResource struct{} @@ -120,16 +122,18 @@ func (MsSqlServerMicrosoftSupportAuditingPolicyResource) Exists(ctx context.Cont return nil, err } - resp, err := client.MSSQL.ServerDevOpsAuditSettingsClient.Get(ctx, id.ResourceGroup, id.ServerName, id.DevOpsAuditingSettingName) + serverId := commonids.NewSqlServerID(id.SubscriptionId, id.ResourceGroup, id.ServerName) + + resp, err := client.MSSQL.ServerDevOpsAuditSettingsClient.SettingsGet(ctx, serverId) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return nil, fmt.Errorf("SQL Server Microsoft Support Auditing Policy for server %q (Resource Group %q) does not exist", id.ServerName, id.ResourceGroup) + if response.WasNotFound(resp.HttpResponse) { + return nil, fmt.Errorf("%s does not exist", *id) } - return nil, fmt.Errorf("reading SQL Server Microsoft Support Auditing Policy for server %q (Resource Group %q): %v", id.ServerName, id.ResourceGroup, err) + return nil, fmt.Errorf("reading %s: %v", *id, err) } - return utils.Bool(resp.ID != nil), nil + return pointer.To(resp.Model != nil), nil } func (MsSqlServerMicrosoftSupportAuditingPolicyResource) template(data acceptance.TestData) string { diff --git a/internal/services/mssql/mssql_server_resource.go b/internal/services/mssql/mssql_server_resource.go index 78531e759e092..278aeb7eae8da 100644 --- a/internal/services/mssql/mssql_server_resource.go +++ b/internal/services/mssql/mssql_server_resource.go @@ -16,11 +16,11 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers" "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" @@ -288,7 +288,7 @@ func resourceMsSqlServerCreate(d *pluginsdk.ResourceData, meta interface{}) erro // TODO 4.0: Switch this field to use None pattern... if v := d.Get("minimum_tls_version"); v.(string) != "Disabled" { - props.Properties.MinimalTlsVersion = pointer.To(v.(string)) + props.Properties.MinimalTlsVersion = pointer.To(servers.MinimalTlsVersion(v.(string))) } err = client.CreateOrUpdateThenPoll(ctx, id, props) @@ -378,7 +378,7 @@ func resourceMsSqlServerUpdate(d *pluginsdk.ResourceData, meta interface{}) erro } if d.HasChange("minimum_tls_version") { - payload.Properties.MinimalTlsVersion = pointer.To(d.Get("minimum_tls_version").(string)) + payload.Properties.MinimalTlsVersion = pointer.To(servers.MinimalTlsVersion(d.Get("minimum_tls_version").(string))) } err := client.CreateOrUpdateThenPoll(ctx, *id, *payload) @@ -518,7 +518,7 @@ func resourceMsSqlServerRead(d *pluginsdk.ResourceData, meta interface{}) error if v := props.MinimalTlsVersion; v == nil || *v == "None" { d.Set("minimum_tls_version", "Disabled") } else { - d.Set("minimum_tls_version", props.MinimalTlsVersion) + d.Set("minimum_tls_version", string(pointer.From(props.MinimalTlsVersion))) } d.Set("public_network_access_enabled", pointer.From(props.PublicNetworkAccess) == servers.ServerPublicNetworkAccessFlagEnabled) diff --git a/internal/services/mssql/mssql_server_resource_test.go b/internal/services/mssql/mssql_server_resource_test.go index d7f10e4ddef75..01f5e1cddeeea 100644 --- a/internal/services/mssql/mssql_server_resource_test.go +++ b/internal/services/mssql/mssql_server_resource_test.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/mssql/mssql_server_transparent_data_encryption_resource.go b/internal/services/mssql/mssql_server_transparent_data_encryption_resource.go index eb458f6125011..72a3e8710987f 100644 --- a/internal/services/mssql/mssql_server_transparent_data_encryption_resource.go +++ b/internal/services/mssql/mssql_server_transparent_data_encryption_resource.go @@ -10,7 +10,10 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" keyVaultParser "github.com/hashicorp/terraform-provider-azurerm/internal/services/keyvault/parse" keyVaultValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/keyvault/validate" @@ -87,7 +90,7 @@ func resourceMsSqlTransparentDataEncryptionCreateUpdate(d *pluginsdk.ResourceDat ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) defer cancel() - serverId, err := parse.ServerID(d.Get("server_id").(string)) + serverId, err := commonids.ParseSqlServerID(d.Get("server_id").(string)) if err != nil { return err } @@ -99,24 +102,24 @@ func resourceMsSqlTransparentDataEncryptionCreateUpdate(d *pluginsdk.ResourceDat // because after the SQL server is created, we need to grant it permissions to AKV, so encryption protector can use those // keys are part of setting up TDE - var serverKey sql.ServerKey + var serverKey serverkeys.ServerKey // Default values for Service Managed keys. Will update to AKV values if key_vault_key_id references a key. serverKeyName := "" - serverKeyType := sql.ServerKeyTypeServiceManaged + serverKeyType := serverkeys.ServerKeyTypeServiceManaged if v, ok := d.GetOk("key_vault_key_id"); ok { keyVaultKeyId := strings.TrimSpace(v.(string)) // Update the server key type to AKV - serverKeyType = sql.ServerKeyTypeAzureKeyVault + serverKeyType = serverkeys.ServerKeyTypeAzureKeyVault // Set the SQL Server Key properties - serverKeyProperties := sql.ServerKeyProperties{ + serverKeyProperties := serverkeys.ServerKeyProperties{ ServerKeyType: serverKeyType, - URI: &keyVaultKeyId, + Uri: &keyVaultKeyId, AutoRotationEnabled: utils.Bool(d.Get("auto_rotation_enabled").(bool)), } - serverKey.ServerKeyProperties = &serverKeyProperties + serverKey.Properties = &serverKeyProperties // Set the encryption protector properties keyId, err := keyVaultParser.ParseNestedItemID(keyVaultKeyId) @@ -148,15 +151,15 @@ func resourceMsSqlTransparentDataEncryptionCreateUpdate(d *pluginsdk.ResourceDat if v, ok := d.GetOk("managed_hsm_key_id"); ok { mhsmKeyId := strings.TrimSpace(v.(string)) // Update the server key type to AKV - serverKeyType = sql.ServerKeyTypeAzureKeyVault + serverKeyType = serverkeys.ServerKeyTypeAzureKeyVault // Set the SQL Server Key properties z - serverKeyProperties := sql.ServerKeyProperties{ + serverKeyProperties := serverkeys.ServerKeyProperties{ ServerKeyType: serverKeyType, - URI: &mhsmKeyId, + Uri: &mhsmKeyId, AutoRotationEnabled: utils.Bool(d.Get("auto_rotation_enabled").(bool)), } - serverKey.ServerKeyProperties = &serverKeyProperties + serverKey.Properties = &serverKeyProperties // Make sure it's a key, if not, throw an error keyId, err := mhsmParser.ManagedHSMDataPlaneVersionedKeyID(mhsmKeyId, nil) @@ -177,42 +180,41 @@ func resourceMsSqlTransparentDataEncryptionCreateUpdate(d *pluginsdk.ResourceDat serverKeyName = fmt.Sprintf("%s_%s_%s", vaultName, keyId.KeyName, keyId.KeyVersion) } + keyType := encryptionprotectors.ServerKeyTypeServiceManaged + if serverKeyType == serverkeys.ServerKeyTypeAzureKeyVault { + keyType = encryptionprotectors.ServerKeyTypeAzureKeyVault + } + // Service managed doesn't require a key name - encryptionProtectorProperties := sql.EncryptionProtectorProperties{ - ServerKeyType: serverKeyType, + encryptionProtectorProperties := encryptionprotectors.EncryptionProtectorProperties{ + ServerKeyType: keyType, ServerKeyName: &serverKeyName, AutoRotationEnabled: utils.Bool(d.Get("auto_rotation_enabled").(bool)), } + keyId := serverkeys.NewKeyID(serverId.SubscriptionId, serverId.ResourceGroupName, serverId.ServerName, serverKeyName) + // Only create a server key if the properties have been set - if serverKey.ServerKeyProperties != nil { + if serverKey.Properties != nil { // Create a key on the server - futureServers, err := serverKeysClient.CreateOrUpdate(ctx, serverId.ResourceGroup, serverId.Name, serverKeyName, serverKey) + err = serverKeysClient.CreateOrUpdateThenPoll(ctx, keyId, serverKey) if err != nil { return fmt.Errorf("creating/updating server key for %s: %+v", serverId, err) } - - if err = futureServers.WaitForCompletionRef(ctx, serverKeysClient.Client); err != nil { - return fmt.Errorf("waiting on update of %s: %+v", serverId, err) - } } - encryptionProtectorObject := sql.EncryptionProtector{ - EncryptionProtectorProperties: &encryptionProtectorProperties, + encryptionProtectorObject := encryptionprotectors.EncryptionProtector{ + Properties: &encryptionProtectorProperties, } // Encryption protector always uses "current" for the name - id := parse.NewEncryptionProtectorID(serverId.SubscriptionId, serverId.ResourceGroup, serverId.Name, "current") + id := parse.NewEncryptionProtectorID(serverId.SubscriptionId, serverId.ResourceGroupName, serverId.ServerName, "current") - futureEncryptionProtector, err := encryptionProtectorClient.CreateOrUpdate(ctx, id.ResourceGroup, id.ServerName, encryptionProtectorObject) + err = encryptionProtectorClient.CreateOrUpdateThenPoll(ctx, *serverId, encryptionProtectorObject) if err != nil { return fmt.Errorf("creating/updating %s: %+v", id, err) } - if err = futureEncryptionProtector.WaitForCompletionRef(ctx, encryptionProtectorClient.Client); err != nil { - return fmt.Errorf("waiting on create/update future for %s: %+v", id, err) - } - d.SetId(id.ID()) return resourceMsSqlTransparentDataEncryptionRead(d, meta) @@ -229,32 +231,32 @@ func resourceMsSqlTransparentDataEncryptionRead(d *pluginsdk.ResourceData, meta if err != nil { return err } + serverId := commonids.NewSqlServerID(id.SubscriptionId, id.ResourceGroup, id.ServerName) - resp, err := encryptionProtectorClient.Get(ctx, id.ResourceGroup, id.ServerName) + resp, err := encryptionProtectorClient.Get(ctx, serverId) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { d.SetId("") return nil } return fmt.Errorf("making Read request for %s: %v", id, err) } - serverId := parse.NewServerID(id.SubscriptionId, id.ResourceGroup, id.ServerName) d.Set("server_id", serverId.ID()) - log.Printf("[INFO] Encryption protector key type is %s", resp.EncryptionProtectorProperties.ServerKeyType) + log.Printf("[INFO] Encryption protector key type is %s", resp.Model.Properties.ServerKeyType) keyId := "" autoRotationEnabled := false // Only set the key type if it's an AKV key. For service managed, we can omit the setting the key_vault_key_id - if resp.EncryptionProtectorProperties != nil && resp.EncryptionProtectorProperties.ServerKeyType == sql.ServerKeyTypeAzureKeyVault { - log.Printf("[INFO] Setting Key Vault URI to %s", *resp.EncryptionProtectorProperties.URI) + if resp.Model != nil && resp.Model.Properties != nil && resp.Model.Properties.ServerKeyType == encryptionprotectors.ServerKeyTypeAzureKeyVault { + log.Printf("[INFO] Setting Key Vault URI to %s", *resp.Model.Properties.Uri) - keyId = *resp.EncryptionProtectorProperties.URI + keyId = *resp.Model.Properties.Uri // autoRotation is only for AKV keys - if resp.EncryptionProtectorProperties.AutoRotationEnabled != nil { - autoRotationEnabled = *resp.EncryptionProtectorProperties.AutoRotationEnabled + if resp.Model.Properties.AutoRotationEnabled != nil { + autoRotationEnabled = *resp.Model.Properties.AutoRotationEnabled } } @@ -303,24 +305,22 @@ func resourceMsSqlTransparentDataEncryptionDelete(d *pluginsdk.ResourceData, met return err } + serverId := commonids.NewSqlServerID(id.SubscriptionId, id.ResourceGroup, id.ServerName) + serverKeyName := "" // Service managed doesn't require a key name - encryptionProtector := sql.EncryptionProtector{ - EncryptionProtectorProperties: &sql.EncryptionProtectorProperties{ - ServerKeyType: sql.ServerKeyTypeServiceManaged, + encryptionProtector := encryptionprotectors.EncryptionProtector{ + Properties: &encryptionprotectors.EncryptionProtectorProperties{ + ServerKeyType: encryptionprotectors.ServerKeyTypeServiceManaged, ServerKeyName: &serverKeyName, }, } - futureEncryptionProtector, err := encryptionProtectorClient.CreateOrUpdate(ctx, id.ResourceGroup, id.ServerName, encryptionProtector) + err = encryptionProtectorClient.CreateOrUpdateThenPoll(ctx, serverId, encryptionProtector) if err != nil { return fmt.Errorf("creating/updating %s: %+v", id, err) } - if err = futureEncryptionProtector.WaitForCompletionRef(ctx, encryptionProtectorClient.Client); err != nil { - return fmt.Errorf("waiting on create/update future for %s: %+v", id, err) - } - return nil } diff --git a/internal/services/mssql/mssql_server_transparent_data_encryption_resource_test.go b/internal/services/mssql/mssql_server_transparent_data_encryption_resource_test.go index f74220518b3c7..29ee67a3bc660 100644 --- a/internal/services/mssql/mssql_server_transparent_data_encryption_resource_test.go +++ b/internal/services/mssql/mssql_server_transparent_data_encryption_resource_test.go @@ -8,12 +8,14 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) type MsSqlServerTransparentDataEncryptionResource struct{} @@ -116,16 +118,18 @@ func (MsSqlServerTransparentDataEncryptionResource) Exists(ctx context.Context, return nil, err } - resp, err := client.MSSQL.EncryptionProtectorClient.Get(ctx, id.ResourceGroup, id.ServerName) + serverId := commonids.NewSqlServerID(id.SubscriptionId, id.ResourceGroup, id.ServerName) + + resp, err := client.MSSQL.EncryptionProtectorClient.Get(ctx, serverId) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return nil, fmt.Errorf("Encryption protector for server %q (Resource Group %q) does not exist", id.ServerName, id.ResourceGroup) + if response.WasNotFound(resp.HttpResponse) { + return nil, fmt.Errorf("%s does not exist", *id) } - return nil, fmt.Errorf("reading Encryption Protector for server %q (Resource Group %q): %v", id.ServerName, id.ResourceGroup, err) + return nil, fmt.Errorf("reading %s: %v", *id, err) } - return utils.Bool(resp.ID != nil), nil + return pointer.To(resp.Model != nil), nil } func (r MsSqlServerTransparentDataEncryptionResource) baseKeyVault(data acceptance.TestData) string { diff --git a/internal/services/mssql/mssql_server_vulnerability_assessment_resource.go b/internal/services/mssql/mssql_server_vulnerability_assessment_resource.go index 89a93ddb0b184..8299a3bdf8879 100644 --- a/internal/services/mssql/mssql_server_vulnerability_assessment_resource.go +++ b/internal/services/mssql/mssql_server_vulnerability_assessment_resource.go @@ -9,6 +9,9 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" @@ -125,13 +128,13 @@ func resourceMsSqlServerVulnerabilityAssessmentCreateUpdate(d *pluginsdk.Resourc storageContainerPath := d.Get("storage_container_path").(string) - vulnerabilityAssessment := sql.ServerVulnerabilityAssessment{ - ServerVulnerabilityAssessmentProperties: &sql.ServerVulnerabilityAssessmentProperties{ - StorageContainerPath: &storageContainerPath, + vulnerabilityAssessment := servervulnerabilityassessments.ServerVulnerabilityAssessment{ + Properties: &servervulnerabilityassessments.ServerVulnerabilityAssessmentProperties{ + StorageContainerPath: storageContainerPath, }, } - props := vulnerabilityAssessment.ServerVulnerabilityAssessmentProperties + props := vulnerabilityAssessment.Properties if v, ok := d.GetOk("storage_account_access_key"); ok { props.StorageAccountAccessKey = utils.String(v.(string)) @@ -145,13 +148,15 @@ func resourceMsSqlServerVulnerabilityAssessmentCreateUpdate(d *pluginsdk.Resourc props.RecurringScans = expandRecurringScans(d) } - result, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ServerName, vulnerabilityAssessment) + serverId := commonids.NewSqlServerID(id.SubscriptionId, id.ResourceGroup, id.ServerName) + + result, err := client.CreateOrUpdate(ctx, serverId, vulnerabilityAssessment) if err != nil { - return fmt.Errorf("updating mssql server vulnerability assessment: %v", err) + return fmt.Errorf("updating %s : %v", id, err) } - if result.ID == nil { - return fmt.Errorf("reading mssql server vulnerability assessment id (server %q, resource group %q)", policyId.ServerName, policyId.ResourceGroup) + if result.Model == nil || result.Model.Id == nil { + return fmt.Errorf("reading %s", id) } d.SetId(id.ID()) @@ -171,15 +176,17 @@ func resourceMsSqlServerVulnerabilityAssessmentRead(d *pluginsdk.ResourceData, m return err } - result, err := client.Get(ctx, id.ResourceGroup, id.ServerName) + serverId := commonids.NewSqlServerID(id.SubscriptionId, id.ResourceGroup, id.ServerName) + + result, err := client.Get(ctx, serverId) if err != nil { - if utils.ResponseWasNotFound(result.Response) { + if response.WasNotFound(result.HttpResponse) { log.Printf("[WARN] mssql server vulnerability assessment %v not found", id) d.SetId("") return nil } - return fmt.Errorf("making read request to mssql server vulnerability assessment: %+v", err) + return fmt.Errorf("retrieving %s: %+v", *id, err) } policyClient := meta.(*clients.Client).MSSQL.LegacyServerSecurityAlertPoliciesClient @@ -189,19 +196,21 @@ func resourceMsSqlServerVulnerabilityAssessmentRead(d *pluginsdk.ResourceData, m } d.Set("server_security_alert_policy_id", policy.ID) - if props := result.ServerVulnerabilityAssessmentProperties; props != nil { - d.Set("storage_container_path", props.StorageContainerPath) + if model := result.Model; model != nil { + if props := model.Properties; props != nil { + d.Set("storage_container_path", props.StorageContainerPath) - if v, ok := d.GetOk("storage_account_access_key"); ok { - d.Set("storage_account_access_key", v) - } + if v, ok := d.GetOk("storage_account_access_key"); ok { + d.Set("storage_account_access_key", v) + } - if v, ok := d.GetOk("storage_container_sas_key"); ok { - d.Set("storage_container_sas_key", v) - } + if v, ok := d.GetOk("storage_container_sas_key"); ok { + d.Set("storage_container_sas_key", v) + } - if props.RecurringScans != nil { - d.Set("recurring_scans", flattenRecurringScans(props.RecurringScans)) + if props.RecurringScans != nil { + d.Set("recurring_scans", flattenRecurringScans(props.RecurringScans)) + } } } return nil @@ -219,15 +228,17 @@ func resourceMsSqlServerVulnerabilityAssessmentDelete(d *pluginsdk.ResourceData, return err } - if _, err = client.Delete(ctx, id.ResourceGroup, id.ServerName); err != nil { - return fmt.Errorf("deleting mssql server vulnerability assessment: %v", err) + serverId := commonids.NewSqlServerID(id.SubscriptionId, id.ResourceGroup, id.ServerName) + + if _, err = client.Delete(ctx, serverId); err != nil { + return fmt.Errorf("deleting %s: %v", *id, err) } return nil } -func expandRecurringScans(d *pluginsdk.ResourceData) *sql.VulnerabilityAssessmentRecurringScansProperties { - props := sql.VulnerabilityAssessmentRecurringScansProperties{} +func expandRecurringScans(d *pluginsdk.ResourceData) *servervulnerabilityassessments.VulnerabilityAssessmentRecurringScansProperties { + props := servervulnerabilityassessments.VulnerabilityAssessmentRecurringScansProperties{} vs := d.Get("recurring_scans").([]interface{}) if len(vs) == 0 { @@ -255,7 +266,7 @@ func expandRecurringScans(d *pluginsdk.ResourceData) *sql.VulnerabilityAssessmen return &props } -func flattenRecurringScans(props *sql.VulnerabilityAssessmentRecurringScansProperties) []interface{} { +func flattenRecurringScans(props *servervulnerabilityassessments.VulnerabilityAssessmentRecurringScansProperties) []interface{} { result := make(map[string]interface{}) if enabled := props.IsEnabled; enabled != nil { diff --git a/internal/services/mssql/mssql_server_vulnerability_assessment_resource_test.go b/internal/services/mssql/mssql_server_vulnerability_assessment_resource_test.go index a95cbda10727c..e0d72bc0ffbad 100644 --- a/internal/services/mssql/mssql_server_vulnerability_assessment_resource_test.go +++ b/internal/services/mssql/mssql_server_vulnerability_assessment_resource_test.go @@ -8,12 +8,14 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) type MsSqlServerVulnerabilityAssessmentResource struct{} @@ -61,16 +63,18 @@ func (MsSqlServerVulnerabilityAssessmentResource) Exists(ctx context.Context, cl return nil, err } - resp, err := client.MSSQL.ServerVulnerabilityAssessmentsClient.Get(ctx, id.ResourceGroup, id.ServerName) + serverId := commonids.NewSqlServerID(id.SubscriptionId, id.ResourceGroup, id.ServerName) + + resp, err := client.MSSQL.ServerVulnerabilityAssessmentsClient.Get(ctx, serverId) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return nil, fmt.Errorf("SQL Vulnerability Assessment for server %q (Resource Group %q) does not exist", id.ServerName, id.ResourceGroup) + if response.WasNotFound(resp.HttpResponse) { + return nil, fmt.Errorf("%s does not exist", id) } - return nil, fmt.Errorf("reading SQL Vulnerability Assessment for server %q (Resource Group %q): %v", id.ServerName, id.ResourceGroup, err) + return nil, fmt.Errorf("reading %s: %v", id, err) } - return utils.Bool(resp.ID != nil), nil + return pointer.To(resp.Model != nil), nil } func (r MsSqlServerVulnerabilityAssessmentResource) basic(data acceptance.TestData) string { diff --git a/internal/services/mssql/mssql_virtual_network_rule_resource.go b/internal/services/mssql/mssql_virtual_network_rule_resource.go index 93b1f4aaa7724..5b997a68da02b 100644 --- a/internal/services/mssql/mssql_virtual_network_rule_resource.go +++ b/internal/services/mssql/mssql_virtual_network_rule_resource.go @@ -8,8 +8,9 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" @@ -78,7 +79,7 @@ func resourceMsSqlVirtualNetworkRuleCreateUpdate(d *pluginsdk.ResourceData, meta return fmt.Errorf("parsing server ID %q: %+v", d.Get("server_id"), err) } - id := parse.NewVirtualNetworkRuleID(serverId.SubscriptionId, serverId.ResourceGroup, serverId.Name, d.Get("name").(string)) + id := virtualnetworkrules.NewVirtualNetworkRuleID(serverId.SubscriptionId, serverId.ResourceGroup, serverId.Name, d.Get("name").(string)) subnetId, err := commonids.ParseSubnetID(d.Get("subnet_id").(string)) if err != nil { @@ -86,34 +87,30 @@ func resourceMsSqlVirtualNetworkRuleCreateUpdate(d *pluginsdk.ResourceData, meta } if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) + existing, err := client.Get(ctx, id) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for presence of existing MSSQL %s: %+v", id.String(), err) } } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return tf.ImportAsExistsError("azurerm_mssql_virtual_network_rule", id.ID()) } } - parameters := sql.VirtualNetworkRule{ - VirtualNetworkRuleProperties: &sql.VirtualNetworkRuleProperties{ - VirtualNetworkSubnetID: utils.String(subnetId.ID()), + parameters := virtualnetworkrules.VirtualNetworkRule{ + Properties: &virtualnetworkrules.VirtualNetworkRuleProperties{ + VirtualNetworkSubnetId: subnetId.ID(), IgnoreMissingVnetServiceEndpoint: utils.Bool(d.Get("ignore_missing_vnet_service_endpoint").(bool)), }, } - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ServerName, id.Name, parameters) + err = client.CreateOrUpdateThenPoll(ctx, id, parameters) if err != nil { return fmt.Errorf("creating MSSQL %s: %+v", id.String(), err) } - if err := future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for creation/update of %q: %+v", id, err) - } - // Wait for the provisioning state to become ready log.Printf("[DEBUG] Waiting for MSSQL %s to become ready", id.String()) @@ -127,14 +124,14 @@ func resourceMsSqlVirtualNetworkRuleRead(d *pluginsdk.ResourceData, meta interfa ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.VirtualNetworkRuleID(d.Id()) + id, err := virtualnetworkrules.ParseVirtualNetworkRuleID(d.Id()) if err != nil { return fmt.Errorf("parsing ID %q: %+v", d.Id(), err) } - resp, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) + resp, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { log.Printf("[INFO] MSSQL %s was not found - removing from state", id.String()) d.SetId("") return nil @@ -143,23 +140,22 @@ func resourceMsSqlVirtualNetworkRuleRead(d *pluginsdk.ResourceData, meta interfa return fmt.Errorf("retrieving MSSQL %s: %+v", id.String(), err) } - d.Set("name", id.Name) + d.Set("name", id.VirtualNetworkRuleName) - serverId := parse.NewServerID(id.SubscriptionId, id.ResourceGroup, id.ServerName) + serverId := parse.NewServerID(id.SubscriptionId, id.ResourceGroupName, id.ServerName) d.Set("server_id", serverId.ID()) - if props := resp.VirtualNetworkRuleProperties; props != nil { - d.Set("ignore_missing_vnet_service_endpoint", props.IgnoreMissingVnetServiceEndpoint) + if model := resp.Model; model != nil { + if props := model.Properties; props != nil { + d.Set("ignore_missing_vnet_service_endpoint", props.IgnoreMissingVnetServiceEndpoint) - subnetId := "" - if sid := props.VirtualNetworkSubnetID; sid != nil { - id, err := commonids.ParseSubnetIDInsensitively(*props.VirtualNetworkSubnetID) + subnetId, err := commonids.ParseSubnetIDInsensitively(props.VirtualNetworkSubnetId) if err != nil { - return fmt.Errorf("parsing subnet ID returned by API %q: %+v", *sid, err) + return fmt.Errorf("parsing subnet ID returned by API %q: %+v", props.VirtualNetworkSubnetId, err) } - subnetId = id.ID() + + d.Set("subnet_id", subnetId.ID()) } - d.Set("subnet_id", subnetId) } return nil @@ -170,19 +166,15 @@ func resourceMsSqlVirtualNetworkRuleDelete(d *pluginsdk.ResourceData, meta inter ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.VirtualNetworkRuleID(d.Id()) + id, err := virtualnetworkrules.ParseVirtualNetworkRuleID(d.Id()) if err != nil { return fmt.Errorf("parsing ID %q: %+v", d.Id(), err) } - future, err := client.Delete(ctx, id.ResourceGroup, id.ServerName, id.Name) + err = client.DeleteThenPoll(ctx, *id) if err != nil { return fmt.Errorf("deleting MSSQL %s: %+v", id.String(), err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for deletion of MSSQL %s: %+v", id.String(), err) - } - return nil } diff --git a/internal/services/mssql/mssql_virtual_network_rule_resource_test.go b/internal/services/mssql/mssql_virtual_network_rule_resource_test.go index 102364c93edd1..ed9c699153280 100644 --- a/internal/services/mssql/mssql_virtual_network_rule_resource_test.go +++ b/internal/services/mssql/mssql_virtual_network_rule_resource_test.go @@ -8,12 +8,13 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) type MsSqlVirtualNetworkRuleResource struct{} @@ -85,20 +86,20 @@ func TestAccMsSqlVirtualNetworkRule_requiresImport(t *testing.T) { } func (r MsSqlVirtualNetworkRuleResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.VirtualNetworkRuleID(state.ID) + id, err := virtualnetworkrules.ParseVirtualNetworkRuleID(state.ID) if err != nil { return nil, err } - resp, err := client.MSSQL.VirtualNetworkRulesClient.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) + resp, err := client.MSSQL.VirtualNetworkRulesClient.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return utils.Bool(false), nil + if response.WasNotFound(resp.HttpResponse) { + return pointer.To(false), nil } - return nil, fmt.Errorf("retrieving MSSQL %s: %+v", id.String(), err) + return nil, fmt.Errorf("retrieving %s: %+v", *id, err) } - return utils.Bool(true), nil + return pointer.To(true), nil } func (MsSqlVirtualNetworkRuleResource) template(data acceptance.TestData) string { diff --git a/internal/services/mssqlmanagedinstance/client/client.go b/internal/services/mssqlmanagedinstance/client/client.go index f6bb53ff3db46..fd10a31ac330a 100644 --- a/internal/services/mssqlmanagedinstance/client/client.go +++ b/internal/services/mssqlmanagedinstance/client/client.go @@ -4,76 +4,122 @@ package client import ( + "fmt" + "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) type Client struct { - ManagedDatabasesClient *sql.ManagedDatabasesClient - ManagedInstancesClient *sql.ManagedInstancesClient - ManagedInstancesLongTermRetentionPoliciesClient *sql.ManagedInstanceLongTermRetentionPoliciesClient - ManagedInstancesShortTermRetentionPoliciesClient *sql.ManagedBackupShortTermRetentionPoliciesClient - ManagedInstanceVulnerabilityAssessmentsClient *sql.ManagedInstanceVulnerabilityAssessmentsClient - ManagedInstanceServerSecurityAlertPoliciesClient *sql.ManagedServerSecurityAlertPoliciesClient - ManagedInstanceAdministratorsClient *sql.ManagedInstanceAdministratorsClient - ManagedInstanceAzureADOnlyAuthenticationsClient *sql.ManagedInstanceAzureADOnlyAuthenticationsClient - ManagedInstanceEncryptionProtectorClient *sql.ManagedInstanceEncryptionProtectorsClient - ManagedInstanceFailoverGroupsClient *sql.InstanceFailoverGroupsClient - ManagedInstanceKeysClient *sql.ManagedInstanceKeysClient + ManagedDatabasesClient *manageddatabases.ManagedDatabasesClient + ManagedInstancesClient *managedinstances.ManagedInstancesClient + ManagedInstancesLongTermRetentionPoliciesClient *managedinstancelongtermretentionpolicies.ManagedInstanceLongTermRetentionPoliciesClient + ManagedInstancesShortTermRetentionPoliciesClient *managedbackupshorttermretentionpolicies.ManagedBackupShortTermRetentionPoliciesClient + ManagedInstanceVulnerabilityAssessmentsClient *managedinstancevulnerabilityassessments.ManagedInstanceVulnerabilityAssessmentsClient + ManagedInstanceServerSecurityAlertPoliciesClient *managedserversecurityalertpolicies.ManagedServerSecurityAlertPoliciesClient + ManagedInstanceAdministratorsClient *managedinstanceadministrators.ManagedInstanceAdministratorsClient + ManagedInstanceAzureADOnlyAuthenticationsClient *managedinstanceazureadonlyauthentications.ManagedInstanceAzureADOnlyAuthenticationsClient + ManagedInstanceEncryptionProtectorClient *managedinstanceencryptionprotectors.ManagedInstanceEncryptionProtectorsClient + ManagedInstanceFailoverGroupsClient *instancefailovergroups.InstanceFailoverGroupsClient + ManagedInstanceKeysClient *managedinstancekeys.ManagedInstanceKeysClient options *common.ClientOptions } -func NewClient(o *common.ClientOptions) *Client { +func NewClient(o *common.ClientOptions) (*Client, error) { - managedDatabasesClient := sql.NewManagedDatabasesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) - o.ConfigureClient(&managedDatabasesClient.Client, o.ResourceManagerAuthorizer) + managedDatabasesClient, err := manageddatabases.NewManagedDatabasesClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building Managed Databases Client: %+v", err) + } + o.Configure(managedDatabasesClient.Client, o.Authorizers.ResourceManager) - managedInstancesClient := sql.NewManagedInstancesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) - o.ConfigureClient(&managedInstancesClient.Client, o.ResourceManagerAuthorizer) + managedInstancesClient, err := managedinstances.NewManagedInstancesClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building Managed Instance Client: %+v", err) + } + o.Configure(managedInstancesClient.Client, o.Authorizers.ResourceManager) - managedInstancesLongTermRetentionPoliciesClient := sql.NewManagedInstanceLongTermRetentionPoliciesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) - o.ConfigureClient(&managedInstancesLongTermRetentionPoliciesClient.Client, o.ResourceManagerAuthorizer) + managedInstancesLongTermRetentionPoliciesClient, err := managedinstancelongtermretentionpolicies.NewManagedInstanceLongTermRetentionPoliciesClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building Managed Instance Long Term Retention Policies Client: %+v", err) + } + o.Configure(managedInstancesLongTermRetentionPoliciesClient.Client, o.Authorizers.ResourceManager) - managedInstancesShortTermRetentionPoliciesClient := sql.NewManagedBackupShortTermRetentionPoliciesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) - o.ConfigureClient(&managedInstancesShortTermRetentionPoliciesClient.Client, o.ResourceManagerAuthorizer) + managedInstancesShortTermRetentionPoliciesClient, err := managedbackupshorttermretentionpolicies.NewManagedBackupShortTermRetentionPoliciesClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building Managed Instance Short Term Retention Policies Client: %+v", err) + } + o.Configure(managedInstancesShortTermRetentionPoliciesClient.Client, o.Authorizers.ResourceManager) - managedInstancesAdministratorsClient := sql.NewManagedInstanceAdministratorsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) - o.ConfigureClient(&managedInstancesAdministratorsClient.Client, o.ResourceManagerAuthorizer) + managedInstancesAdministratorsClient, err := managedinstanceadministrators.NewManagedInstanceAdministratorsClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building Managed Instance Administrators Client: %+v", err) + } + o.Configure(managedInstancesAdministratorsClient.Client, o.Authorizers.ResourceManager) - managedInstanceAzureADOnlyAuthenticationsClient := sql.NewManagedInstanceAzureADOnlyAuthenticationsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) - o.ConfigureClient(&managedInstanceAzureADOnlyAuthenticationsClient.Client, o.ResourceManagerAuthorizer) + managedInstanceAzureADOnlyAuthenticationsClient, err := managedinstanceazureadonlyauthentications.NewManagedInstanceAzureADOnlyAuthenticationsClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building Azure ADOnly Authentications Client: %+v", err) + } + o.Configure(managedInstanceAzureADOnlyAuthenticationsClient.Client, o.Authorizers.ResourceManager) - managedInstanceEncryptionProtectorsClient := sql.NewManagedInstanceEncryptionProtectorsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) - o.ConfigureClient(&managedInstanceEncryptionProtectorsClient.Client, o.ResourceManagerAuthorizer) + managedInstanceEncryptionProtectorsClient, err := managedinstanceencryptionprotectors.NewManagedInstanceEncryptionProtectorsClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building Managed Instance Encryption Protectors Client: %+v", err) + } + o.Configure(managedInstanceEncryptionProtectorsClient.Client, o.Authorizers.ResourceManager) - managedInstanceFailoverGroupsClient := sql.NewInstanceFailoverGroupsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) - o.ConfigureClient(&managedInstanceFailoverGroupsClient.Client, o.ResourceManagerAuthorizer) + managedInstanceFailoverGroupsClient, err := instancefailovergroups.NewInstanceFailoverGroupsClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building Managed Instance Failover Groups Client: %+v", err) + } + o.Configure(managedInstanceFailoverGroupsClient.Client, o.Authorizers.ResourceManager) - managedInstanceKeysClient := sql.NewManagedInstanceKeysClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) - o.ConfigureClient(&managedInstanceKeysClient.Client, o.ResourceManagerAuthorizer) + managedInstanceKeysClient, err := managedinstancekeys.NewManagedInstanceKeysClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building Managed Instance Keys Client: %+v", err) + } + o.Configure(managedInstanceKeysClient.Client, o.Authorizers.ResourceManager) - managedInstanceVulnerabilityAssessmentsClient := sql.NewManagedInstanceVulnerabilityAssessmentsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) - o.ConfigureClient(&managedInstanceVulnerabilityAssessmentsClient.Client, o.ResourceManagerAuthorizer) + managedInstanceVulnerabilityAssessmentsClient, err := managedinstancevulnerabilityassessments.NewManagedInstanceVulnerabilityAssessmentsClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building Managed Instance Vulnerability Assessments Client: %+v", err) + } + o.Configure(managedInstanceVulnerabilityAssessmentsClient.Client, o.Authorizers.ResourceManager) - managedInstanceServerSecurityAlertPoliciesClient := sql.NewManagedServerSecurityAlertPoliciesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) - o.ConfigureClient(&managedInstanceServerSecurityAlertPoliciesClient.Client, o.ResourceManagerAuthorizer) + managedInstanceServerSecurityAlertPoliciesClient, err := managedserversecurityalertpolicies.NewManagedServerSecurityAlertPoliciesClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building Managed Instance Server Security Alert Policies Client: %+v", err) + } + o.Configure(managedInstanceServerSecurityAlertPoliciesClient.Client, o.Authorizers.ResourceManager) return &Client{ - ManagedDatabasesClient: &managedDatabasesClient, - ManagedInstanceAdministratorsClient: &managedInstancesAdministratorsClient, - ManagedInstanceAzureADOnlyAuthenticationsClient: &managedInstanceAzureADOnlyAuthenticationsClient, - ManagedInstanceEncryptionProtectorClient: &managedInstanceEncryptionProtectorsClient, - ManagedInstanceFailoverGroupsClient: &managedInstanceFailoverGroupsClient, - ManagedInstanceKeysClient: &managedInstanceKeysClient, - ManagedInstancesLongTermRetentionPoliciesClient: &managedInstancesLongTermRetentionPoliciesClient, - ManagedInstanceServerSecurityAlertPoliciesClient: &managedInstanceServerSecurityAlertPoliciesClient, - ManagedInstancesShortTermRetentionPoliciesClient: &managedInstancesShortTermRetentionPoliciesClient, - ManagedInstanceVulnerabilityAssessmentsClient: &managedInstanceVulnerabilityAssessmentsClient, - ManagedInstancesClient: &managedInstancesClient, + ManagedDatabasesClient: managedDatabasesClient, + ManagedInstanceAdministratorsClient: managedInstancesAdministratorsClient, + ManagedInstanceAzureADOnlyAuthenticationsClient: managedInstanceAzureADOnlyAuthenticationsClient, + ManagedInstanceEncryptionProtectorClient: managedInstanceEncryptionProtectorsClient, + ManagedInstanceFailoverGroupsClient: managedInstanceFailoverGroupsClient, + ManagedInstanceKeysClient: managedInstanceKeysClient, + ManagedInstancesLongTermRetentionPoliciesClient: managedInstancesLongTermRetentionPoliciesClient, + ManagedInstanceServerSecurityAlertPoliciesClient: managedInstanceServerSecurityAlertPoliciesClient, + ManagedInstancesShortTermRetentionPoliciesClient: managedInstancesShortTermRetentionPoliciesClient, + ManagedInstanceVulnerabilityAssessmentsClient: managedInstanceVulnerabilityAssessmentsClient, + ManagedInstancesClient: managedInstancesClient, options: o, - } + }, nil } func (c Client) ManagedInstancesClientForSubscription(subscriptionID string) *sql.ManagedInstancesClient { diff --git a/internal/services/mssqlmanagedinstance/mssql_managed_database_resource.go b/internal/services/mssqlmanagedinstance/mssql_managed_database_resource.go index d7024945e638e..6803b6fdc4b8c 100644 --- a/internal/services/mssqlmanagedinstance/mssql_managed_database_resource.go +++ b/internal/services/mssqlmanagedinstance/mssql_managed_database_resource.go @@ -8,19 +8,21 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck - "github.com/Azure/go-autorest/autorest/date" "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/helper" miParse "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssqlmanagedinstance/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssqlmanagedinstance/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/suppress" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) type MsSqlManagedDatabaseModel struct { @@ -129,86 +131,75 @@ func (r MsSqlManagedDatabaseResource) Create() sdk.ResourceFunc { return fmt.Errorf("decoding: %+v", err) } - managedInstanceId, err := parse.ManagedInstanceID(model.ManagedInstanceId) + managedInstanceId, err := commonids.ParseSqlManagedInstanceID(model.ManagedInstanceId) if err != nil { - return fmt.Errorf("parsing `managed_instance_id`: %v", err) + return err } - id := parse.NewManagedDatabaseID(managedInstanceId.SubscriptionId, - managedInstanceId.ResourceGroup, managedInstanceId.Name, model.Name) + id := commonids.NewSqlManagedInstanceDatabaseID(managedInstanceId.SubscriptionId, + managedInstanceId.ResourceGroupName, managedInstanceId.ManagedInstanceName, model.Name) - managedInstance, err := instancesClient.Get(ctx, managedInstanceId.ResourceGroup, managedInstanceId.Name, "") - if err != nil || managedInstance.Location == nil || *managedInstance.Location == "" { + managedInstance, err := instancesClient.Get(ctx, *managedInstanceId, managedinstances.GetOperationOptions{}) + if err != nil || managedInstance.Model == nil || managedInstance.Model.Location == "" { return fmt.Errorf("checking for existence and region of Managed Instance for %s: %+v", id, err) } metadata.Logger.Infof("Import check for %s", id) - existing, err := client.Get(ctx, id.ResourceGroup, id.ManagedInstanceName, id.DatabaseName) - if err != nil && !utils.ResponseWasNotFound(existing.Response) { + existing, err := client.Get(ctx, id) + if err != nil && !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for presence of existing %s: %+v", id, err) } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return metadata.ResourceRequiresImport(r.ResourceType(), id) } - parameters := sql.ManagedDatabase{ - Location: managedInstance.Location, - ManagedDatabaseProperties: &sql.ManagedDatabaseProperties{}, + parameters := manageddatabases.ManagedDatabase{ + Location: managedInstance.Model.Location, + Properties: &manageddatabases.ManagedDatabaseProperties{}, } if len(model.PointInTimeRestore) > 0 { restorePointInTime := model.PointInTimeRestore[0] - parameters.CreateMode = sql.ManagedDatabaseCreateModePointInTimeRestore - t, _ := time.Parse(time.RFC3339, restorePointInTime.RestorePointInTime) - parameters.RestorePointInTime = &date.Time{ - Time: t, - } + parameters.Properties.CreateMode = pointer.To(manageddatabases.ManagedDatabaseCreateModePointInTimeRestore) + parameters.Properties.RestorePointInTime = &restorePointInTime.RestorePointInTime _, err := miParse.RestorableDroppedDatabaseID(restorePointInTime.SourceDatabaseId) if err == nil { - parameters.RestorableDroppedDatabaseID = pointer.To(restorePointInTime.SourceDatabaseId) + parameters.Properties.RestorableDroppedDatabaseId = pointer.To(restorePointInTime.SourceDatabaseId) } else { - parameters.SourceDatabaseID = pointer.To(restorePointInTime.SourceDatabaseId) + parameters.Properties.SourceDatabaseId = pointer.To(restorePointInTime.SourceDatabaseId) } } metadata.Logger.Infof("Creating %s", id) - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ManagedInstanceName, id.DatabaseName, parameters) + err = client.CreateOrUpdateThenPoll(ctx, id, parameters) if err != nil { return fmt.Errorf("creating %s: %+v", id, err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for creation of %s: %+v", id, err) - } - if len(model.LongTermRetentionPolicy) > 0 { longTermRetentionProps := expandLongTermRetentionPolicy(model.LongTermRetentionPolicy) - longTermRetentionPolicy := sql.ManagedInstanceLongTermRetentionPolicy{ - BaseLongTermRetentionPolicyProperties: &longTermRetentionProps, + longTermRetentionPolicy := managedinstancelongtermretentionpolicies.ManagedInstanceLongTermRetentionPolicy{ + Properties: &longTermRetentionProps, } - longTermRetentionFuture, err := longTermRetentionClient.CreateOrUpdate(ctx, id.ResourceGroup, id.ManagedInstanceName, id.DatabaseName, longTermRetentionPolicy) + err := longTermRetentionClient.CreateOrUpdateThenPoll(ctx, id, longTermRetentionPolicy) if err != nil { return fmt.Errorf("setting Long Term Retention Policies for %s: %+v", id, err) } - - if err = longTermRetentionFuture.WaitForCompletionRef(ctx, longTermRetentionClient.Client); err != nil { - return fmt.Errorf("waiting for update of Long Term Retention Policies for %s: %+v", id, err) - } } if model.ShortTermRetentionDays > 0 { - shortTermRetentionPolicy := sql.ManagedBackupShortTermRetentionPolicy{ - ManagedBackupShortTermRetentionPolicyProperties: &sql.ManagedBackupShortTermRetentionPolicyProperties{ - RetentionDays: pointer.To(int32(model.ShortTermRetentionDays)), + shortTermRetentionPolicy := managedbackupshorttermretentionpolicies.ManagedBackupShortTermRetentionPolicy{ + Properties: &managedbackupshorttermretentionpolicies.ManagedBackupShortTermRetentionPolicyProperties{ + RetentionDays: pointer.To(model.ShortTermRetentionDays), }, } - if _, err := shortTermRetentionClient.CreateOrUpdate(ctx, id.ResourceGroup, id.ManagedInstanceName, id.DatabaseName, shortTermRetentionPolicy); err != nil { + if err = shortTermRetentionClient.CreateOrUpdateThenPoll(ctx, id, shortTermRetentionPolicy); err != nil { return fmt.Errorf("setting Short Term Retention Policy for %s: %+v", id, err) } } @@ -232,41 +223,37 @@ func (r MsSqlManagedDatabaseResource) Update() sdk.ResourceFunc { return fmt.Errorf("decoding: %+v", err) } - managedInstanceId, err := parse.ManagedInstanceID(model.ManagedInstanceId) + managedInstanceId, err := commonids.ParseSqlManagedInstanceID(model.ManagedInstanceId) if err != nil { - return fmt.Errorf("parsing `managed_instance_id`: %v", err) + return err } - id := parse.NewManagedDatabaseID(managedInstanceId.SubscriptionId, - managedInstanceId.ResourceGroup, managedInstanceId.Name, model.Name) + id := commonids.NewSqlManagedInstanceDatabaseID(managedInstanceId.SubscriptionId, + managedInstanceId.ResourceGroupName, managedInstanceId.ManagedInstanceName, model.Name) d := metadata.ResourceData if d.HasChange("long_term_retention_policy") { longTermRetentionProps := expandLongTermRetentionPolicy(model.LongTermRetentionPolicy) - longTermRetentionPolicy := sql.ManagedInstanceLongTermRetentionPolicy{ - BaseLongTermRetentionPolicyProperties: &longTermRetentionProps, + longTermRetentionPolicy := managedinstancelongtermretentionpolicies.ManagedInstanceLongTermRetentionPolicy{ + Properties: &longTermRetentionProps, } - longTermRetentionFuture, err := longTermRetentionClient.CreateOrUpdate(ctx, id.ResourceGroup, id.ManagedInstanceName, id.DatabaseName, longTermRetentionPolicy) + err := longTermRetentionClient.CreateOrUpdateThenPoll(ctx, id, longTermRetentionPolicy) if err != nil { return fmt.Errorf("updating Long Term Retention Policies for %s: %+v", id, err) } - - if err = longTermRetentionFuture.WaitForCompletionRef(ctx, longTermRetentionClient.Client); err != nil { - return fmt.Errorf("waiting for update of Long Term Retention Policies for %s: %+v", id, err) - } } if d.HasChange("short_term_retention_days") { - shortTermRetentionPolicy := sql.ManagedBackupShortTermRetentionPolicy{ - ManagedBackupShortTermRetentionPolicyProperties: &sql.ManagedBackupShortTermRetentionPolicyProperties{ - RetentionDays: pointer.To(int32(model.ShortTermRetentionDays)), + shortTermRetentionPolicy := managedbackupshorttermretentionpolicies.ManagedBackupShortTermRetentionPolicy{ + Properties: &managedbackupshorttermretentionpolicies.ManagedBackupShortTermRetentionPolicyProperties{ + RetentionDays: pointer.To(model.ShortTermRetentionDays), }, } - if _, err := shortTermRetentionClient.CreateOrUpdate(ctx, id.ResourceGroup, id.ManagedInstanceName, id.DatabaseName, shortTermRetentionPolicy); err != nil { + if err = shortTermRetentionClient.CreateOrUpdateThenPoll(ctx, id, shortTermRetentionPolicy); err != nil { return fmt.Errorf("updating Short Term Retention Policy for %s: %+v", id, err) } } @@ -283,7 +270,7 @@ func (r MsSqlManagedDatabaseResource) Read() sdk.ResourceFunc { longTermRetentionClient := metadata.Client.MSSQLManagedInstance.ManagedInstancesLongTermRetentionPoliciesClient shortTermRetentionClient := metadata.Client.MSSQLManagedInstance.ManagedInstancesShortTermRetentionPoliciesClient - id, err := parse.ManagedDatabaseID(metadata.ResourceData.Id()) + id, err := commonids.ParseManagedInstanceDatabaseID(metadata.ResourceData.Id()) if err != nil { return err } @@ -294,35 +281,37 @@ func (r MsSqlManagedDatabaseResource) Read() sdk.ResourceFunc { return err } - result, err := client.Get(ctx, id.ResourceGroup, id.ManagedInstanceName, id.DatabaseName) + result, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(result.Response) { + if response.WasNotFound(result.HttpResponse) { return metadata.MarkAsGone(id) } return fmt.Errorf("retrieving %s: %v", *id, err) } - managedInstanceId := parse.NewManagedInstanceID(id.SubscriptionId, id.ResourceGroup, id.ManagedInstanceName) + managedInstanceId := commonids.NewSqlManagedInstanceID(id.SubscriptionId, id.ResourceGroupName, id.ManagedInstanceName) model := MsSqlManagedDatabaseModel{ Name: id.DatabaseName, ManagedInstanceId: managedInstanceId.ID(), } - ltrResp, err := longTermRetentionClient.Get(ctx, id.ResourceGroup, id.ManagedInstanceName, id.DatabaseName) + ltrResp, err := longTermRetentionClient.Get(ctx, *id) if err != nil { return fmt.Errorf("retrieving Long Term Retention Policy for %s: %v", *id, err) } - model.LongTermRetentionPolicy = flattenLongTermRetentionPolicy(ltrResp) + if ltrResp.Model != nil && ltrResp.Model.Properties != nil { + model.LongTermRetentionPolicy = flattenLongTermRetentionPolicy(*ltrResp.Model.Properties) + } - shortTermRetentionResp, err := shortTermRetentionClient.Get(ctx, id.ResourceGroup, id.ManagedInstanceName, id.DatabaseName) + shortTermRetentionResp, err := shortTermRetentionClient.Get(ctx, *id) if err != nil { return fmt.Errorf("retrieving Short Term Retention Policy for %s: %v", *id, err) } - if shortTermRetentionResp.RetentionDays != nil { - model.ShortTermRetentionDays = int64(*shortTermRetentionResp.RetentionDays) + if shortTermRetentionResp.Model != nil && shortTermRetentionResp.Model.Properties != nil { + model.ShortTermRetentionDays = pointer.From(shortTermRetentionResp.Model.Properties.RetentionDays) } d := metadata.ResourceData @@ -341,18 +330,14 @@ func (r MsSqlManagedDatabaseResource) Delete() sdk.ResourceFunc { Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { client := metadata.Client.MSSQLManagedInstance.ManagedDatabasesClient - id, err := parse.ManagedDatabaseID(metadata.ResourceData.Id()) + id, err := commonids.ParseManagedInstanceDatabaseID(metadata.ResourceData.Id()) if err != nil { return err } - future, err := client.Delete(ctx, id.ResourceGroup, id.ManagedInstanceName, id.DatabaseName) + err = client.DeleteThenPoll(ctx, *id) if err != nil { - return fmt.Errorf("deleting %s: %+v", id, err) - } - - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for deletion of %s: %+v", id, err) + return fmt.Errorf("deleting %s: %+v", *id, err) } return nil @@ -360,42 +345,26 @@ func (r MsSqlManagedDatabaseResource) Delete() sdk.ResourceFunc { } } -func expandLongTermRetentionPolicy(ltrPolicy []LongTermRetentionPolicy) sql.BaseLongTermRetentionPolicyProperties { - return sql.BaseLongTermRetentionPolicyProperties{ +func expandLongTermRetentionPolicy(ltrPolicy []LongTermRetentionPolicy) managedinstancelongtermretentionpolicies.ManagedInstanceLongTermRetentionPolicyProperties { + if len(ltrPolicy) == 0 { + return managedinstancelongtermretentionpolicies.ManagedInstanceLongTermRetentionPolicyProperties{} + } + + return managedinstancelongtermretentionpolicies.ManagedInstanceLongTermRetentionPolicyProperties{ WeeklyRetention: <rPolicy[0].WeeklyRetention, MonthlyRetention: <rPolicy[0].MonthlyRetention, YearlyRetention: <rPolicy[0].YearlyRetention, - WeekOfYear: pointer.To(int32(ltrPolicy[0].WeekOfYear)), + WeekOfYear: pointer.To(ltrPolicy[0].WeekOfYear), } } -func flattenLongTermRetentionPolicy(ltrPolicy sql.ManagedInstanceLongTermRetentionPolicy) []LongTermRetentionPolicy { - - ltrModel := LongTermRetentionPolicy{} - - weeklyRetention := "" - if ltrPolicy.WeeklyRetention != nil { - weeklyRetention = *ltrPolicy.WeeklyRetention - } - - monthlyRetention := "" - if ltrPolicy.MonthlyRetention != nil { - monthlyRetention = *ltrPolicy.MonthlyRetention - } - - yearlyRetention := "" - if ltrPolicy.YearlyRetention != nil { - yearlyRetention = *ltrPolicy.YearlyRetention - } - - ltrModel = LongTermRetentionPolicy{ - WeeklyRetention: weeklyRetention, - MonthlyRetention: monthlyRetention, - YearlyRetention: yearlyRetention, - } +func flattenLongTermRetentionPolicy(ltrPolicy managedinstancelongtermretentionpolicies.ManagedInstanceLongTermRetentionPolicyProperties) []LongTermRetentionPolicy { - if ltrPolicy.WeekOfYear != nil { - ltrModel.WeekOfYear = int64(*ltrPolicy.WeekOfYear) + ltrModel := LongTermRetentionPolicy{ + WeeklyRetention: pointer.From(ltrPolicy.WeeklyRetention), + MonthlyRetention: pointer.From(ltrPolicy.MonthlyRetention), + YearlyRetention: pointer.From(ltrPolicy.YearlyRetention), + WeekOfYear: pointer.From(ltrPolicy.WeekOfYear), } return []LongTermRetentionPolicy{ltrModel} diff --git a/internal/services/mssqlmanagedinstance/mssql_managed_database_resource_test.go b/internal/services/mssqlmanagedinstance/mssql_managed_database_resource_test.go index 371dd9ac2c82c..f2b0739ac6010 100644 --- a/internal/services/mssqlmanagedinstance/mssql_managed_database_resource_test.go +++ b/internal/services/mssqlmanagedinstance/mssql_managed_database_resource_test.go @@ -9,11 +9,12 @@ import ( "testing" "time" + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssqlmanagedinstance/parse" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) type MsSqlManagedDatabase struct{} @@ -60,14 +61,12 @@ func TestAccMsSqlManagedDatabase_pointInTimeRestore(t *testing.T) { data.ResourceTest(t, r, []acceptance.TestStep{ { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), + Config: r.basic(data), // Sets up for pitr }, { PreConfig: func() { time.Sleep(11 * time.Minute) }, - Config: r.pointInTimeRestore(data, time.Now().UTC().Format(time.RFC3339)), + // Valid point in time range from 7 days early to now and not before source server creation time + Config: r.pointInTimeRestore(data, time.Now().Add(-15*time.Minute).UTC().Format(time.RFC3339)), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), ), @@ -77,20 +76,20 @@ func TestAccMsSqlManagedDatabase_pointInTimeRestore(t *testing.T) { } func (r MsSqlManagedDatabase) Exists(ctx context.Context, client *clients.Client, state *acceptance.InstanceState) (*bool, error) { - id, err := parse.ManagedDatabaseID(state.ID) + id, err := commonids.ParseManagedInstanceDatabaseID(state.ID) if err != nil { return nil, err } - resp, err := client.MSSQLManagedInstance.ManagedDatabasesClient.Get(ctx, id.ResourceGroup, id.ManagedInstanceName, id.DatabaseName) + resp, err := client.MSSQLManagedInstance.ManagedDatabasesClient.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return utils.Bool(false), nil + if response.WasNotFound(resp.HttpResponse) { + return pointer.To(false), nil } return nil, fmt.Errorf("retrieving SQL Managed Database %q: %+v", id.ID(), err) } - return utils.Bool(true), nil + return pointer.To(true), nil } func (r MsSqlManagedDatabase) basic(data acceptance.TestData) string { diff --git a/internal/services/mssqlmanagedinstance/mssql_managed_instance_active_directory_administrator_resource.go b/internal/services/mssqlmanagedinstance/mssql_managed_instance_active_directory_administrator_resource.go index 749ab807e089d..edad0b292045b 100644 --- a/internal/services/mssqlmanagedinstance/mssql_managed_instance_active_directory_administrator_resource.go +++ b/internal/services/mssqlmanagedinstance/mssql_managed_instance_active_directory_administrator_resource.go @@ -8,15 +8,17 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck - "github.com/gofrs/uuid" + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssqlmanagedinstance/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssqlmanagedinstance/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) type MsSqlManagedInstanceActiveDirectoryAdministratorModel struct { @@ -94,71 +96,53 @@ func (r MsSqlManagedInstanceActiveDirectoryAdministratorResource) Create() sdk.R return fmt.Errorf("decoding: %+v", err) } - managedInstanceId, err := parse.ManagedInstanceID(model.ManagedInstanceId) + managedInstanceId, err := commonids.ParseSqlManagedInstanceID(model.ManagedInstanceId) if err != nil { - return fmt.Errorf("parsing `managed_instance_id`: %v", err) + return err } id := parse.NewManagedInstanceAzureActiveDirectoryAdministratorID(managedInstanceId.SubscriptionId, - managedInstanceId.ResourceGroup, managedInstanceId.Name, string(sql.AdministratorTypeActiveDirectory)) + managedInstanceId.ResourceGroupName, managedInstanceId.ManagedInstanceName, string(managedinstanceadministrators.ManagedInstanceAdministratorTypeActiveDirectory)) metadata.Logger.Infof("Import check for %s", id) - existing, err := client.Get(ctx, id.ResourceGroup, id.ManagedInstanceName) - if err != nil && !utils.ResponseWasNotFound(existing.Response) { + existing, err := client.Get(ctx, *managedInstanceId) + if err != nil && !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for presence of existing %s: %+v", id, err) } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return metadata.ResourceRequiresImport(r.ResourceType(), id) } - sid, err := uuid.FromString(model.ObjectId) - if err != nil { - return fmt.Errorf("parsing `object_id` for %s", id) - } - - tid, err := uuid.FromString(model.TenantId) - if err != nil { - return fmt.Errorf("parsing `tenant_id` for %s", id) - } - - parameters := sql.ManagedInstanceAdministrator{ - ManagedInstanceAdministratorProperties: &sql.ManagedInstanceAdministratorProperties{ - AdministratorType: utils.String(string(sql.AdministratorTypeActiveDirectory)), - Login: &model.LoginUsername, - Sid: &sid, - TenantID: &tid, + parameters := managedinstanceadministrators.ManagedInstanceAdministrator{ + Properties: &managedinstanceadministrators.ManagedInstanceAdministratorProperties{ + AdministratorType: managedinstanceadministrators.ManagedInstanceAdministratorTypeActiveDirectory, + Login: model.LoginUsername, + Sid: model.ObjectId, + TenantId: &model.TenantId, }, } metadata.Logger.Infof("Creating %s", id) - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ManagedInstanceName, parameters) + err = client.CreateOrUpdateThenPoll(ctx, *managedInstanceId, parameters) if err != nil { return fmt.Errorf("creating %s: %+v", id, err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for creation of %s: %+v", id, err) - } - metadata.SetID(id) - aadAuthOnlyParams := sql.ManagedInstanceAzureADOnlyAuthentication{ - ManagedInstanceAzureADOnlyAuthProperties: &sql.ManagedInstanceAzureADOnlyAuthProperties{ - AzureADOnlyAuthentication: &model.AzureADAuthenticationOnly, + aadAuthOnlyParams := managedinstanceazureadonlyauthentications.ManagedInstanceAzureADOnlyAuthentication{ + Properties: &managedinstanceazureadonlyauthentications.ManagedInstanceAzureADOnlyAuthProperties{ + AzureADOnlyAuthentication: model.AzureADAuthenticationOnly, }, } - aadAuthOnlyFuture, err := aadAuthOnlyClient.CreateOrUpdate(ctx, id.ResourceGroup, id.ManagedInstanceName, aadAuthOnlyParams) + err = aadAuthOnlyClient.CreateOrUpdateThenPoll(ctx, *managedInstanceId, aadAuthOnlyParams) if err != nil { return fmt.Errorf("setting `azuread_authentication_only` for %s: %+v", id, err) } - if err = aadAuthOnlyFuture.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting to set `azuread_authentication_only` for %s: %+v", id, err) - } - return nil }, } @@ -182,51 +166,38 @@ func (r MsSqlManagedInstanceActiveDirectoryAdministratorResource) Update() sdk.R return err } - sid, err := uuid.FromString(state.ObjectId) + managedInstanceId, err := commonids.ParseSqlManagedInstanceID(state.ManagedInstanceId) if err != nil { - return fmt.Errorf("parsing `object_id` for %s", id) - } - - tid, err := uuid.FromString(state.TenantId) - if err != nil { - return fmt.Errorf("parsing `tenant_id` for %s", id) + return err } - properties := sql.ManagedInstanceAdministrator{ - ManagedInstanceAdministratorProperties: &sql.ManagedInstanceAdministratorProperties{ - AdministratorType: utils.String(string(sql.AdministratorTypeActiveDirectory)), - Login: &state.LoginUsername, - Sid: &sid, - TenantID: &tid, + parameters := managedinstanceadministrators.ManagedInstanceAdministrator{ + Properties: &managedinstanceadministrators.ManagedInstanceAdministratorProperties{ + AdministratorType: managedinstanceadministrators.ManagedInstanceAdministratorTypeActiveDirectory, + Login: state.LoginUsername, + Sid: state.ObjectId, + TenantId: &state.TenantId, }, } metadata.Logger.Infof("Updating %s", id) - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ManagedInstanceName, properties) + err = client.CreateOrUpdateThenPoll(ctx, *managedInstanceId, parameters) if err != nil { return fmt.Errorf("updating %s: %+v", id, err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for update of %s: %+v", id, err) - } - - aadAuthOnlyProperties := sql.ManagedInstanceAzureADOnlyAuthentication{ - ManagedInstanceAzureADOnlyAuthProperties: &sql.ManagedInstanceAzureADOnlyAuthProperties{ - AzureADOnlyAuthentication: &state.AzureADAuthenticationOnly, + aadAuthOnlyProperties := managedinstanceazureadonlyauthentications.ManagedInstanceAzureADOnlyAuthentication{ + Properties: &managedinstanceazureadonlyauthentications.ManagedInstanceAzureADOnlyAuthProperties{ + AzureADOnlyAuthentication: state.AzureADAuthenticationOnly, }, } - aadAuthOnlyFuture, err := aadAuthOnlyClient.CreateOrUpdate(ctx, id.ResourceGroup, id.ManagedInstanceName, aadAuthOnlyProperties) + err = aadAuthOnlyClient.CreateOrUpdateThenPoll(ctx, *managedInstanceId, aadAuthOnlyProperties) if err != nil { return fmt.Errorf("setting `azuread_authentication_only` for %s: %+v", id, err) } - if err = aadAuthOnlyFuture.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting to set `azuread_authentication_only` for %s: %+v", id, err) - } - return nil }, } @@ -250,40 +221,40 @@ func (r MsSqlManagedInstanceActiveDirectoryAdministratorResource) Read() sdk.Res return err } - result, err := client.Get(ctx, id.ResourceGroup, id.ManagedInstanceName) + managedInstanceId := commonids.NewSqlManagedInstanceID(id.SubscriptionId, id.ResourceGroup, id.ManagedInstanceName) + + result, err := client.Get(ctx, managedInstanceId) if err != nil { - if utils.ResponseWasNotFound(result.Response) { + if response.WasNotFound(result.HttpResponse) { return metadata.MarkAsGone(id) } return fmt.Errorf("retrieving %s: %v", id, err) } - instanceId := parse.NewManagedInstanceID(id.SubscriptionId, id.ResourceGroup, id.ManagedInstanceName) - model := MsSqlManagedInstanceActiveDirectoryAdministratorModel{ - ManagedInstanceId: instanceId.ID(), + ManagedInstanceId: managedInstanceId.ID(), AzureADAuthenticationOnly: false, } - if props := result.ManagedInstanceAdministratorProperties; props != nil { - if props.Login != nil { - model.LoginUsername = *props.Login - } - if props.Sid != nil { - model.ObjectId = props.Sid.String() - } - if props.TenantID != nil { - model.TenantId = props.TenantID.String() + if result.Model != nil { + + if props := result.Model.Properties; props != nil { + model.LoginUsername = props.Login + model.ObjectId = props.Sid + model.TenantId = pointer.From(props.TenantId) + } } - aadAuthOnlyResult, err := aadAuthOnlyClient.Get(ctx, id.ResourceGroup, id.ManagedInstanceName) - if err != nil && !utils.ResponseWasNotFound(result.Response) { + aadAuthOnlyResult, err := aadAuthOnlyClient.Get(ctx, managedInstanceId) + if err != nil && !response.WasNotFound(result.HttpResponse) { return fmt.Errorf("retrieving `azuread_authentication_only` for %s: %v", id, err) } - if props := aadAuthOnlyResult.ManagedInstanceAzureADOnlyAuthProperties; props != nil && props.AzureADOnlyAuthentication != nil { - model.AzureADAuthenticationOnly = *props.AzureADOnlyAuthentication + if aadAuthOnlyModel := aadAuthOnlyResult.Model; aadAuthOnlyModel != nil { + if props := aadAuthOnlyModel.Properties; props != nil { + model.AzureADAuthenticationOnly = props.AzureADOnlyAuthentication + } } return metadata.Encode(&model) @@ -293,22 +264,26 @@ func (r MsSqlManagedInstanceActiveDirectoryAdministratorResource) Read() sdk.Res func (r MsSqlManagedInstanceActiveDirectoryAdministratorResource) Delete() sdk.ResourceFunc { return sdk.ResourceFunc{ - Timeout: 30 * time.Minute, + Timeout: 180 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { client := metadata.Client.MSSQLManagedInstance.ManagedInstanceAdministratorsClient + aadAuthOnlyClient := metadata.Client.MSSQLManagedInstance.ManagedInstanceAzureADOnlyAuthenticationsClient id, err := parse.ManagedInstanceAzureActiveDirectoryAdministratorID(metadata.ResourceData.Id()) if err != nil { return err } - future, err := client.Delete(ctx, id.ResourceGroup, id.ManagedInstanceName) + managedInstanceId := commonids.NewSqlManagedInstanceID(id.SubscriptionId, id.ResourceGroup, id.ManagedInstanceName) + + err = aadAuthOnlyClient.DeleteThenPoll(ctx, managedInstanceId) if err != nil { - return fmt.Errorf("deleting %s: %+v", id, err) + return fmt.Errorf("removing `azuread_authentication_only` for %s: %+v", managedInstanceId, err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for deletion of %s: %+v", id, err) + err = client.DeleteThenPoll(ctx, managedInstanceId) + if err != nil { + return fmt.Errorf("deleting %s: %+v", *id, err) } return nil diff --git a/internal/services/mssqlmanagedinstance/mssql_managed_instance_active_directory_administrator_resource_test.go b/internal/services/mssqlmanagedinstance/mssql_managed_instance_active_directory_administrator_resource_test.go index a627070713dbe..276521cc3ec10 100644 --- a/internal/services/mssqlmanagedinstance/mssql_managed_instance_active_directory_administrator_resource_test.go +++ b/internal/services/mssqlmanagedinstance/mssql_managed_instance_active_directory_administrator_resource_test.go @@ -8,6 +8,8 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -49,9 +51,11 @@ func (r MsSqlManagedInstanceActiveDirectoryAdministratorResource) Exists(ctx con return nil, err } - resp, err := client.MSSQLManagedInstance.ManagedInstanceAdministratorsClient.Get(ctx, id.ResourceGroup, id.ManagedInstanceName) + instanceId := commonids.NewSqlManagedInstanceID(id.SubscriptionId, id.ResourceGroup, id.ManagedInstanceName) + + resp, err := client.MSSQLManagedInstance.ManagedInstanceAdministratorsClient.Get(ctx, instanceId) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { return utils.Bool(false), nil } return nil, fmt.Errorf("retrieving %s: %+v", id, err) diff --git a/internal/services/mssqlmanagedinstance/mssql_managed_instance_data_source.go b/internal/services/mssqlmanagedinstance/mssql_managed_instance_data_source.go index 7e5f553386868..23e6de1799f99 100644 --- a/internal/services/mssqlmanagedinstance/mssql_managed_instance_data_source.go +++ b/internal/services/mssqlmanagedinstance/mssql_managed_instance_data_source.go @@ -8,18 +8,17 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" - "github.com/hashicorp/go-azure-helpers/resourcemanager/location" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tags" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) type MsSqlManagedInstanceDataSourceModel struct { @@ -172,65 +171,51 @@ func (d MsSqlManagedInstanceDataSource) Read() sdk.ResourceFunc { return fmt.Errorf("decoding: %+v", err) } - id := parse.NewManagedInstanceID(subscriptionId, state.ResourceGroupName, state.Name) - resp, err := client.Get(ctx, id.ResourceGroup, id.Name, "") + id := commonids.NewSqlManagedInstanceID(subscriptionId, state.ResourceGroupName, state.Name) + resp, err := client.Get(ctx, id, managedinstances.GetOperationOptions{}) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { return fmt.Errorf("%s was not found", id) } return fmt.Errorf("retrieving %s: %v", id, err) } + if resp.Model == nil { + return fmt.Errorf("retrieving %s model was nil", id) + } + + if resp.Model.Properties == nil { + return fmt.Errorf("retrieving %s properties was nil", id) + } + model := MsSqlManagedInstanceDataSourceModel{ - Name: id.Name, - Location: location.NormalizeNilable(resp.Location), - ResourceGroupName: id.ResourceGroup, - Identity: d.flattenIdentity(resp.Identity), - Tags: tags.ToTypedObject(resp.Tags), + Name: id.ManagedInstanceName, + Location: resp.Model.Location, + ResourceGroupName: id.ResourceGroupName, + Identity: d.flattenIdentity(resp.Model.Identity), + Tags: pointer.From(resp.Model.Tags), } - if sku := resp.Sku; sku != nil && sku.Name != nil { - model.SkuName = *sku.Name + if sku := resp.Model.Sku; sku != nil { + model.SkuName = sku.Name } - if props := resp.ManagedInstanceProperties; props != nil { - model.LicenseType = string(props.LicenseType) - model.ProxyOverride = string(props.ProxyOverride) - model.StorageAccountType = string(props.StorageAccountType) + if props := resp.Model.Properties; props != nil { + model.LicenseType = string(pointer.From(props.LicenseType)) + model.ProxyOverride = string(pointer.From(props.ProxyOverride)) + model.StorageAccountType = backupStorageRedundancyToStorageAccType(pointer.From(props.RequestedBackupStorageRedundancy)) + model.AdministratorLogin = pointer.From(props.AdministratorLogin) + model.Collation = pointer.From(props.Collation) + model.DnsZone = pointer.From(props.DnsZone) + model.CustomerManagedKeyId = pointer.From(props.KeyId) + model.Fqdn = pointer.From(props.FullyQualifiedDomainName) + model.MinimumTlsVersion = pointer.From(props.MinimalTlsVersion) + model.PublicDataEndpointEnabled = pointer.From(props.PublicDataEndpointEnabled) + model.StorageSizeInGb = pointer.From(props.StorageSizeInGB) + model.SubnetId = pointer.From(props.SubnetId) + model.TimezoneId = pointer.From(props.TimezoneId) + model.VCores = pointer.From(props.VCores) - if props.AdministratorLogin != nil { - model.AdministratorLogin = *props.AdministratorLogin - } - if props.Collation != nil { - model.Collation = *props.Collation - } - if props.DNSZone != nil { - model.DnsZone = *props.DNSZone - } - if props.KeyID != nil { - model.CustomerManagedKeyId = *props.KeyID - } - if props.FullyQualifiedDomainName != nil { - model.Fqdn = *props.FullyQualifiedDomainName - } - if props.MinimalTLSVersion != nil { - model.MinimumTlsVersion = *props.MinimalTLSVersion - } - if props.PublicDataEndpointEnabled != nil { - model.PublicDataEndpointEnabled = *props.PublicDataEndpointEnabled - } - if props.StorageSizeInGB != nil { - model.StorageSizeInGb = int64(*props.StorageSizeInGB) - } - if props.SubnetID != nil { - model.SubnetId = *props.SubnetID - } - if props.TimezoneID != nil { - model.TimezoneId = *props.TimezoneID - } - if props.VCores != nil { - model.VCores = int64(*props.VCores) - } } metadata.SetID(id) @@ -239,23 +224,13 @@ func (d MsSqlManagedInstanceDataSource) Read() sdk.ResourceFunc { } } -func (d MsSqlManagedInstanceDataSource) flattenIdentity(input *sql.ResourceIdentity) []identity.SystemOrUserAssignedList { +func (d MsSqlManagedInstanceDataSource) flattenIdentity(input *identity.LegacySystemAndUserAssignedMap) []identity.SystemOrUserAssignedList { if input == nil { return nil } - principalId := "" - if input.PrincipalID != nil { - principalId = input.PrincipalID.String() - } - - tenantId := "" - if input.TenantID != nil { - tenantId = input.TenantID.String() - } - var identityIds = make([]string, 0) - for k := range input.UserAssignedIdentities { + for k := range input.IdentityIds { parsedId, err := commonids.ParseUserAssignedIdentityIDInsensitively(k) if err != nil { continue @@ -264,9 +239,9 @@ func (d MsSqlManagedInstanceDataSource) flattenIdentity(input *sql.ResourceIdent } return []identity.SystemOrUserAssignedList{{ - Type: identity.Type(input.Type), - PrincipalId: principalId, - TenantId: tenantId, + Type: input.Type, + PrincipalId: input.PrincipalId, + TenantId: input.TenantId, IdentityIds: identityIds, }} } diff --git a/internal/services/mssqlmanagedinstance/mssql_managed_instance_failover_group_resource.go b/internal/services/mssqlmanagedinstance/mssql_managed_instance_failover_group_resource.go index 61e05ae2d4a4d..8c0054e9731ea 100644 --- a/internal/services/mssqlmanagedinstance/mssql_managed_instance_failover_group_resource.go +++ b/internal/services/mssqlmanagedinstance/mssql_managed_instance_failover_group_resource.go @@ -8,12 +8,15 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssqlmanagedinstance/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssqlmanagedinstance/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/utils" @@ -100,8 +103,8 @@ func (r MsSqlManagedInstanceFailoverGroupResource) Arguments() map[string]*plugi Type: pluginsdk.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{ - string(sql.ReadWriteEndpointFailoverPolicyAutomatic), - string(sql.ReadWriteEndpointFailoverPolicyManual), + string(instancefailovergroups.ReadWriteEndpointFailoverPolicyAutomatic), + string(instancefailovergroups.ReadWriteEndpointFailoverPolicyManual), }, false), }, @@ -151,13 +154,13 @@ func (r MsSqlManagedInstanceFailoverGroupResource) Create() sdk.ResourceFunc { return fmt.Errorf("decoding: %+v", err) } - managedInstanceId, err := parse.ManagedInstanceID(model.ManagedInstanceId) + managedInstanceId, err := commonids.ParseSqlManagedInstanceID(model.ManagedInstanceId) if err != nil { - return fmt.Errorf("parsing `managed_instance_id`: %v", err) + return err } - id := parse.NewInstanceFailoverGroupID(managedInstanceId.SubscriptionId, - managedInstanceId.ResourceGroup, model.Location, model.Name) + id := instancefailovergroups.NewInstanceFailoverGroupID(managedInstanceId.SubscriptionId, + managedInstanceId.ResourceGroupName, model.Location, model.Name) partnerId, err := parse.ManagedInstanceID(model.PartnerManagedInstanceId) if err != nil { @@ -171,58 +174,54 @@ func (r MsSqlManagedInstanceFailoverGroupResource) Create() sdk.ResourceFunc { } metadata.Logger.Infof("Import check for %s", id) - existing, err := client.Get(ctx, id.ResourceGroup, id.LocationName, id.Name) - if err != nil && !utils.ResponseWasNotFound(existing.Response) { + existing, err := client.Get(ctx, id) + if err != nil && !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for presence of existing %s: %+v", id, err) } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return metadata.ResourceRequiresImport(r.ResourceType(), id) } - readOnlyFailoverPolicy := sql.ReadOnlyEndpointFailoverPolicyDisabled + readOnlyFailoverPolicy := instancefailovergroups.ReadOnlyEndpointFailoverPolicyDisabled if model.ReadOnlyEndpointFailoverPolicyEnabled { - readOnlyFailoverPolicy = sql.ReadOnlyEndpointFailoverPolicyEnabled + readOnlyFailoverPolicy = instancefailovergroups.ReadOnlyEndpointFailoverPolicyEnabled } - parameters := sql.InstanceFailoverGroup{ - InstanceFailoverGroupProperties: &sql.InstanceFailoverGroupProperties{ - ReadOnlyEndpoint: &sql.InstanceFailoverGroupReadOnlyEndpoint{ - FailoverPolicy: readOnlyFailoverPolicy, + parameters := instancefailovergroups.InstanceFailoverGroup{ + Properties: &instancefailovergroups.InstanceFailoverGroupProperties{ + ReadOnlyEndpoint: &instancefailovergroups.InstanceFailoverGroupReadOnlyEndpoint{ + FailoverPolicy: &readOnlyFailoverPolicy, }, - ReadWriteEndpoint: &sql.InstanceFailoverGroupReadWriteEndpoint{}, - PartnerRegions: &[]sql.PartnerRegionInfo{ + ReadWriteEndpoint: instancefailovergroups.InstanceFailoverGroupReadWriteEndpoint{}, + PartnerRegions: []instancefailovergroups.PartnerRegionInfo{ { Location: partner.Location, }, }, - ManagedInstancePairs: &[]sql.ManagedInstancePairInfo{ + ManagedInstancePairs: []instancefailovergroups.ManagedInstancePairInfo{ { - PrimaryManagedInstanceID: utils.String(managedInstanceId.ID()), - PartnerManagedInstanceID: utils.String(partnerId.ID()), + PrimaryManagedInstanceId: utils.String(managedInstanceId.ID()), + PartnerManagedInstanceId: utils.String(partnerId.ID()), }, }, }, } if rwPolicy := model.ReadWriteEndpointFailurePolicy; len(rwPolicy) > 0 { - parameters.InstanceFailoverGroupProperties.ReadWriteEndpoint.FailoverPolicy = sql.ReadWriteEndpointFailoverPolicy(rwPolicy[0].Mode) - if rwPolicy[0].Mode == string(sql.ReadWriteEndpointFailoverPolicyAutomatic) { - parameters.InstanceFailoverGroupProperties.ReadWriteEndpoint.FailoverWithDataLossGracePeriodMinutes = utils.Int32(int32(rwPolicy[0].GraceMinutes)) + parameters.Properties.ReadWriteEndpoint.FailoverPolicy = instancefailovergroups.ReadWriteEndpointFailoverPolicy(rwPolicy[0].Mode) + if rwPolicy[0].Mode == string(instancefailovergroups.ReadWriteEndpointFailoverPolicyAutomatic) { + parameters.Properties.ReadWriteEndpoint.FailoverWithDataLossGracePeriodMinutes = &rwPolicy[0].GraceMinutes } } metadata.Logger.Infof("Creating %s", id) - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.LocationName, id.Name, parameters) + err = client.CreateOrUpdateThenPoll(ctx, id, parameters) if err != nil { return fmt.Errorf("creating %s: %+v", id, err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for creation of %s: %+v", id, err) - } - metadata.SetID(id) return nil @@ -236,7 +235,7 @@ func (r MsSqlManagedInstanceFailoverGroupResource) Update() sdk.ResourceFunc { Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { client := metadata.Client.MSSQLManagedInstance.ManagedInstanceFailoverGroupsClient - id, err := parse.InstanceFailoverGroupID(metadata.ResourceData.Id()) + id, err := instancefailovergroups.ParseInstanceFailoverGroupID(metadata.ResourceData.Id()) if err != nil { return err } @@ -247,9 +246,9 @@ func (r MsSqlManagedInstanceFailoverGroupResource) Update() sdk.ResourceFunc { return err } - managedInstanceId, err := parse.ManagedInstanceID(state.ManagedInstanceId) + managedInstanceId, err := commonids.ParseSqlManagedInstanceID(state.ManagedInstanceId) if err != nil { - return fmt.Errorf("parsing `managed_instance_id`: %v", err) + return err } partnerId, err := parse.ManagedInstanceID(state.PartnerManagedInstanceId) @@ -263,49 +262,45 @@ func (r MsSqlManagedInstanceFailoverGroupResource) Update() sdk.ResourceFunc { return fmt.Errorf("checking for existence and region of Partner of %q: %+v", id, err) } - readOnlyFailoverPolicy := sql.ReadOnlyEndpointFailoverPolicyDisabled + readOnlyFailoverPolicy := instancefailovergroups.ReadOnlyEndpointFailoverPolicyDisabled if state.ReadOnlyEndpointFailoverPolicyEnabled { - readOnlyFailoverPolicy = sql.ReadOnlyEndpointFailoverPolicyEnabled + readOnlyFailoverPolicy = instancefailovergroups.ReadOnlyEndpointFailoverPolicyEnabled } - parameters := sql.InstanceFailoverGroup{ - InstanceFailoverGroupProperties: &sql.InstanceFailoverGroupProperties{ - ReadOnlyEndpoint: &sql.InstanceFailoverGroupReadOnlyEndpoint{ - FailoverPolicy: readOnlyFailoverPolicy, + parameters := instancefailovergroups.InstanceFailoverGroup{ + Properties: &instancefailovergroups.InstanceFailoverGroupProperties{ + ReadOnlyEndpoint: &instancefailovergroups.InstanceFailoverGroupReadOnlyEndpoint{ + FailoverPolicy: &readOnlyFailoverPolicy, }, - ReadWriteEndpoint: &sql.InstanceFailoverGroupReadWriteEndpoint{}, - PartnerRegions: &[]sql.PartnerRegionInfo{ + ReadWriteEndpoint: instancefailovergroups.InstanceFailoverGroupReadWriteEndpoint{}, + PartnerRegions: []instancefailovergroups.PartnerRegionInfo{ { Location: partner.Location, }, }, - ManagedInstancePairs: &[]sql.ManagedInstancePairInfo{ + ManagedInstancePairs: []instancefailovergroups.ManagedInstancePairInfo{ { - PrimaryManagedInstanceID: utils.String(managedInstanceId.ID()), - PartnerManagedInstanceID: utils.String(partnerId.ID()), + PrimaryManagedInstanceId: utils.String(managedInstanceId.ID()), + PartnerManagedInstanceId: utils.String(partnerId.ID()), }, }, }, } if rwPolicy := state.ReadWriteEndpointFailurePolicy; len(rwPolicy) > 0 { - parameters.InstanceFailoverGroupProperties.ReadWriteEndpoint.FailoverPolicy = sql.ReadWriteEndpointFailoverPolicy(rwPolicy[0].Mode) - if rwPolicy[0].Mode == string(sql.ReadWriteEndpointFailoverPolicyAutomatic) { - parameters.InstanceFailoverGroupProperties.ReadWriteEndpoint.FailoverWithDataLossGracePeriodMinutes = utils.Int32(int32(rwPolicy[0].GraceMinutes)) + parameters.Properties.ReadWriteEndpoint.FailoverPolicy = instancefailovergroups.ReadWriteEndpointFailoverPolicy(rwPolicy[0].Mode) + if rwPolicy[0].Mode == string(instancefailovergroups.ReadWriteEndpointFailoverPolicyAutomatic) { + parameters.Properties.ReadWriteEndpoint.FailoverWithDataLossGracePeriodMinutes = &rwPolicy[0].GraceMinutes } } metadata.Logger.Infof("Updating %s", id) - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.LocationName, id.Name, parameters) + err = client.CreateOrUpdateThenPoll(ctx, *id, parameters) if err != nil { return fmt.Errorf("updating %s: %+v", id, err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for update of %s: %+v", id, err) - } - return nil }, } @@ -317,7 +312,7 @@ func (r MsSqlManagedInstanceFailoverGroupResource) Read() sdk.ResourceFunc { Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { client := metadata.Client.MSSQLManagedInstance.ManagedInstanceFailoverGroupsClient - id, err := parse.InstanceFailoverGroupID(metadata.ResourceData.Id()) + id, err := instancefailovergroups.ParseInstanceFailoverGroupID(metadata.ResourceData.Id()) if err != nil { return err } @@ -328,44 +323,44 @@ func (r MsSqlManagedInstanceFailoverGroupResource) Read() sdk.ResourceFunc { return err } - result, err := client.Get(ctx, id.ResourceGroup, id.LocationName, id.Name) + result, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(result.Response) { + if response.WasNotFound(result.HttpResponse) { return metadata.MarkAsGone(id) } return fmt.Errorf("retrieving %s: %v", id, err) } model := MsSqlManagedInstanceFailoverGroupModel{ - Name: id.Name, + Name: id.InstanceFailoverGroupName, Location: id.LocationName, } - if props := result.InstanceFailoverGroupProperties; props != nil { - model.Role = string(props.ReplicationRole) + if result.Model != nil { + if props := result.Model.Properties; props != nil { + model.Role = string(pointer.From(props.ReplicationRole)) + + if instancePairs := props.ManagedInstancePairs; len(instancePairs) == 1 { + if primaryId := instancePairs[0].PrimaryManagedInstanceId; primaryId != nil { + id, err := parse.ManagedInstanceIDInsensitively(*primaryId) + if err != nil { + return fmt.Errorf("parsing `PrimaryManagedInstanceID` from response: %v", err) + } - if instancePairs := props.ManagedInstancePairs; instancePairs != nil && len(*instancePairs) == 1 { - if primaryId := (*instancePairs)[0].PrimaryManagedInstanceID; primaryId != nil { - id, err := parse.ManagedInstanceIDInsensitively(*primaryId) - if err != nil { - return fmt.Errorf("parsing `PrimaryManagedInstanceID` from response: %v", err) + model.ManagedInstanceId = id.ID() } - model.ManagedInstanceId = id.ID() - } + if partnerId := instancePairs[0].PartnerManagedInstanceId; partnerId != nil { + id, err := parse.ManagedInstanceIDInsensitively(*partnerId) + if err != nil { + return fmt.Errorf("parsing `PrimaryManagedInstanceID` from response: %v", err) + } - if partnerId := (*instancePairs)[0].PartnerManagedInstanceID; partnerId != nil { - id, err := parse.ManagedInstanceIDInsensitively(*partnerId) - if err != nil { - return fmt.Errorf("parsing `PrimaryManagedInstanceID` from response: %v", err) + model.PartnerManagedInstanceId = id.ID() } - - model.PartnerManagedInstanceId = id.ID() } - } - if partnerRegions := props.PartnerRegions; partnerRegions != nil { - for _, partnerRegion := range *partnerRegions { + for _, partnerRegion := range props.PartnerRegions { var location string if partnerRegion.Location != nil { location = *partnerRegion.Location @@ -373,27 +368,20 @@ func (r MsSqlManagedInstanceFailoverGroupResource) Read() sdk.ResourceFunc { model.PartnerRegion = append(model.PartnerRegion, MsSqlManagedInstancePartnerRegionModel{ Location: location, - Role: string(partnerRegion.ReplicationRole), + Role: string(pointer.From(partnerRegion.ReplicationRole)), }) } - } - - if readOnlyEndpoint := props.ReadOnlyEndpoint; readOnlyEndpoint != nil { - if readOnlyEndpoint.FailoverPolicy == sql.ReadOnlyEndpointFailoverPolicyEnabled { - model.ReadOnlyEndpointFailoverPolicyEnabled = true - } - } - if readWriteEndpoint := props.ReadWriteEndpoint; readWriteEndpoint != nil { - var graceMinutes int64 - if readWriteEndpoint.FailoverWithDataLossGracePeriodMinutes != nil { - graceMinutes = int64(*readWriteEndpoint.FailoverWithDataLossGracePeriodMinutes) + if readOnlyEndpoint := props.ReadOnlyEndpoint; readOnlyEndpoint != nil { + if *readOnlyEndpoint.FailoverPolicy == instancefailovergroups.ReadOnlyEndpointFailoverPolicyEnabled { + model.ReadOnlyEndpointFailoverPolicyEnabled = true + } } model.ReadWriteEndpointFailurePolicy = []MsSqlManagedInstanceReadWriteEndpointFailurePolicyModel{ { - Mode: string(readWriteEndpoint.FailoverPolicy), - GraceMinutes: graceMinutes, + Mode: string(props.ReadWriteEndpoint.FailoverPolicy), + GraceMinutes: pointer.From(props.ReadWriteEndpoint.FailoverWithDataLossGracePeriodMinutes), }, } } @@ -410,18 +398,14 @@ func (r MsSqlManagedInstanceFailoverGroupResource) Delete() sdk.ResourceFunc { Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { client := metadata.Client.MSSQLManagedInstance.ManagedInstanceFailoverGroupsClient - id, err := parse.InstanceFailoverGroupID(metadata.ResourceData.Id()) + id, err := instancefailovergroups.ParseInstanceFailoverGroupID(metadata.ResourceData.Id()) if err != nil { return err } - future, err := client.Delete(ctx, id.ResourceGroup, id.LocationName, id.Name) + err = client.DeleteThenPoll(ctx, *id) if err != nil { - return fmt.Errorf("deleting %s: %+v", id, err) - } - - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for deletion of %s: %+v", id, err) + return fmt.Errorf("deleting %s: %+v", *id, err) } return nil diff --git a/internal/services/mssqlmanagedinstance/mssql_managed_instance_failover_group_resource_test.go b/internal/services/mssqlmanagedinstance/mssql_managed_instance_failover_group_resource_test.go index d0bf36b5727ff..271d16afc1392 100644 --- a/internal/services/mssqlmanagedinstance/mssql_managed_instance_failover_group_resource_test.go +++ b/internal/services/mssqlmanagedinstance/mssql_managed_instance_failover_group_resource_test.go @@ -8,10 +8,11 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssqlmanagedinstance/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -52,14 +53,14 @@ func TestAccMsSqlManagedInstanceFailoverGroup_update(t *testing.T) { } func (r MsSqlManagedInstanceFailoverGroupResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.ManagedInstanceFailoverGroupID(state.ID) + id, err := instancefailovergroups.ParseInstanceFailoverGroupID(state.ID) if err != nil { return nil, err } - resp, err := client.MSSQLManagedInstance.ManagedInstanceFailoverGroupsClient.Get(ctx, id.ResourceGroup, id.LocationName, id.InstanceFailoverGroupName) + resp, err := client.MSSQLManagedInstance.ManagedInstanceFailoverGroupsClient.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { return utils.Bool(false), nil } return nil, fmt.Errorf("retrieving %s: %+v", id, err) diff --git a/internal/services/mssqlmanagedinstance/mssql_managed_instance_resource.go b/internal/services/mssqlmanagedinstance/mssql_managed_instance_resource.go index 9243bf7e19854..258f43832dcaf 100644 --- a/internal/services/mssqlmanagedinstance/mssql_managed_instance_resource.go +++ b/internal/services/mssqlmanagedinstance/mssql_managed_instance_resource.go @@ -10,7 +10,6 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" @@ -18,14 +17,20 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssqlmanagedinstance/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tags" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/utils" +) + +const ( + StorageAccountTypeGRS = "GRS" + StorageAccountTypeLRS = "LRS" + StorageAccountTypeZRS = "ZRS" + StorageAccountTypeGZRS = "GZRS" ) type MsSqlManagedInstanceModel struct { @@ -44,6 +49,7 @@ type MsSqlManagedInstanceModel struct { ProxyOverride string `tfschema:"proxy_override"` PublicDataEndpointEnabled bool `tfschema:"public_data_endpoint_enabled"` ResourceGroupName string `tfschema:"resource_group_name"` + ServicePrincipalType string `tfschema:"service_principal_type"` SkuName string `tfschema:"sku_name"` StorageAccountType string `tfschema:"storage_account_type"` StorageSizeInGb int64 `tfschema:"storage_size_in_gb"` @@ -201,11 +207,11 @@ func (r MsSqlManagedInstanceResource) Arguments() map[string]*pluginsdk.Schema { "proxy_override": { Type: schema.TypeString, Optional: true, - Default: string(sql.ManagedInstanceProxyOverrideDefault), + Default: string(managedinstances.ManagedInstanceProxyOverrideDefault), ValidateFunc: validation.StringInSlice([]string{ - string(sql.ManagedInstanceProxyOverrideDefault), - string(sql.ManagedInstanceProxyOverrideRedirect), - string(sql.ManagedInstanceProxyOverrideProxy), + string(managedinstances.ManagedInstanceProxyOverrideDefault), + string(managedinstances.ManagedInstanceProxyOverrideRedirect), + string(managedinstances.ManagedInstanceProxyOverrideProxy), }, false), }, @@ -215,16 +221,24 @@ func (r MsSqlManagedInstanceResource) Arguments() map[string]*pluginsdk.Schema { Default: false, }, + "service_principal_type": { + Type: pluginsdk.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{ + string(managedinstances.ServicePrincipalTypeSystemAssigned), + }, false), + }, + "storage_account_type": { Type: pluginsdk.TypeString, Optional: true, ForceNew: true, - Default: string(sql.StorageAccountTypeGRS), + Default: StorageAccountTypeGRS, ValidateFunc: validation.StringInSlice([]string{ - string(sql.StorageAccountTypeGRS), - string(sql.StorageAccountTypeLRS), - string(sql.StorageAccountTypeZRS), - "GZRS", // manually adding until resource is ported to go-azure-sdk and we can upgrade to a newer API version + StorageAccountTypeGRS, + StorageAccountTypeLRS, + StorageAccountTypeZRS, + StorageAccountTypeGZRS, }, false), }, @@ -296,15 +310,15 @@ func (r MsSqlManagedInstanceResource) Create() sdk.ResourceFunc { return fmt.Errorf("decoding: %+v", err) } - id := parse.NewManagedInstanceID(subscriptionId, model.ResourceGroupName, model.Name) + id := commonids.NewSqlManagedInstanceID(subscriptionId, model.ResourceGroupName, model.Name) metadata.Logger.Infof("Import check for %s", id) - existing, err := client.Get(ctx, id.ResourceGroup, id.Name, "") - if err != nil && !utils.ResponseWasNotFound(existing.Response) { + existing, err := client.Get(ctx, id, managedinstances.GetOperationOptions{}) + if err != nil && !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for presence of existing %s: %+v", id, err) } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return metadata.ResourceRequiresImport(r.ResourceType(), id) } @@ -315,52 +329,50 @@ func (r MsSqlManagedInstanceResource) Create() sdk.ResourceFunc { maintenanceConfigId := publicmaintenanceconfigurations.NewPublicMaintenanceConfigurationID(subscriptionId, model.MaintenanceConfigurationName) - parameters := sql.ManagedInstance{ + parameters := managedinstances.ManagedInstance{ Sku: sku, Identity: r.expandIdentity(model.Identity), - Location: pointer.To(location.Normalize(model.Location)), - ManagedInstanceProperties: &sql.ManagedInstanceProperties{ - AdministratorLogin: pointer.To(model.AdministratorLogin), - AdministratorLoginPassword: pointer.To(model.AdministratorLoginPassword), - Collation: pointer.To(model.Collation), - DNSZonePartner: pointer.To(model.DnsZonePartnerId), - LicenseType: sql.ManagedInstanceLicenseType(model.LicenseType), - MaintenanceConfigurationID: pointer.To(maintenanceConfigId.ID()), - MinimalTLSVersion: pointer.To(model.MinimumTlsVersion), - ProxyOverride: sql.ManagedInstanceProxyOverride(model.ProxyOverride), - PublicDataEndpointEnabled: pointer.To(model.PublicDataEndpointEnabled), - StorageAccountType: sql.StorageAccountType(model.StorageAccountType), - StorageSizeInGB: pointer.To(int32(model.StorageSizeInGb)), - SubnetID: pointer.To(model.SubnetId), - TimezoneID: pointer.To(model.TimezoneId), - VCores: pointer.To(int32(model.VCores)), - ZoneRedundant: pointer.To(model.ZoneRedundantEnabled), + Location: location.Normalize(model.Location), + Properties: &managedinstances.ManagedInstanceProperties{ + AdministratorLogin: pointer.To(model.AdministratorLogin), + AdministratorLoginPassword: pointer.To(model.AdministratorLoginPassword), + Collation: pointer.To(model.Collation), + DnsZonePartner: pointer.To(model.DnsZonePartnerId), + LicenseType: pointer.To(managedinstances.ManagedInstanceLicenseType(model.LicenseType)), + MaintenanceConfigurationId: pointer.To(maintenanceConfigId.ID()), + MinimalTlsVersion: pointer.To(model.MinimumTlsVersion), + ProxyOverride: pointer.To(managedinstances.ManagedInstanceProxyOverride(model.ProxyOverride)), + PublicDataEndpointEnabled: pointer.To(model.PublicDataEndpointEnabled), + RequestedBackupStorageRedundancy: pointer.To(storageAccTypeToBackupStorageRedundancy(model.StorageAccountType)), + StorageSizeInGB: pointer.To(model.StorageSizeInGb), + SubnetId: pointer.To(model.SubnetId), + TimezoneId: pointer.To(model.TimezoneId), + VCores: pointer.To(model.VCores), + ZoneRedundant: pointer.To(model.ZoneRedundantEnabled), }, - Tags: tags.FromTypedObject(model.Tags), + Tags: pointer.To(model.Tags), } - if parameters.Identity != nil && len(parameters.Identity.UserAssignedIdentities) > 0 { - for k := range parameters.Identity.UserAssignedIdentities { - parameters.ManagedInstanceProperties.PrimaryUserAssignedIdentityID = pointer.To(k) + if parameters.Identity != nil && len(parameters.Identity.IdentityIds) > 0 { + for k := range parameters.Identity.IdentityIds { + parameters.Properties.PrimaryUserAssignedIdentityId = pointer.To(k) break } } + if model.ServicePrincipalType != "" { + parameters.Properties.ServicePrincipal = &managedinstances.ServicePrincipal{ + Type: pointer.To(managedinstances.ServicePrincipalType(model.ServicePrincipalType)), + } + } + metadata.Logger.Infof("Creating %s", id) - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.Name, parameters) + err = client.CreateOrUpdateThenPoll(ctx, id, parameters) if err != nil { return fmt.Errorf("creating %s: %+v", id, err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - if response.WasConflict(future.Response()) { - return fmt.Errorf("sql managed instance names need to be globally unique and %q is already in use", id.Name) - } - - return fmt.Errorf("waiting for creation of %s: %+v", id, err) - } - metadata.SetID(id) return nil }, @@ -373,7 +385,7 @@ func (r MsSqlManagedInstanceResource) Update() sdk.ResourceFunc { Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { client := metadata.Client.MSSQLManagedInstance.ManagedInstancesClient - id, err := parse.ManagedInstanceID(metadata.ResourceData.Id()) + id, err := commonids.ParseSqlManagedInstanceID(metadata.ResourceData.Id()) if err != nil { return err } @@ -391,50 +403,55 @@ func (r MsSqlManagedInstanceResource) Update() sdk.ResourceFunc { return fmt.Errorf("expanding `sku_name` for SQL Managed Instance Server %q: %v", id.ID(), err) } - properties := sql.ManagedInstance{ + properties := managedinstances.ManagedInstance{ Sku: sku, Identity: r.expandIdentity(state.Identity), - Location: pointer.To(location.Normalize(state.Location)), - ManagedInstanceProperties: &sql.ManagedInstanceProperties{ - DNSZonePartner: pointer.To(state.DnsZonePartnerId), - LicenseType: sql.ManagedInstanceLicenseType(state.LicenseType), - MinimalTLSVersion: pointer.To(state.MinimumTlsVersion), - ProxyOverride: sql.ManagedInstanceProxyOverride(state.ProxyOverride), + Location: location.Normalize(state.Location), + Properties: &managedinstances.ManagedInstanceProperties{ + DnsZonePartner: pointer.To(state.DnsZonePartnerId), + LicenseType: pointer.To(managedinstances.ManagedInstanceLicenseType(state.LicenseType)), + MinimalTlsVersion: pointer.To(state.MinimumTlsVersion), + ProxyOverride: pointer.To(managedinstances.ManagedInstanceProxyOverride(state.ProxyOverride)), PublicDataEndpointEnabled: pointer.To(state.PublicDataEndpointEnabled), - StorageSizeInGB: pointer.To(int32(state.StorageSizeInGb)), - VCores: pointer.To(int32(state.VCores)), + StorageSizeInGB: pointer.To(state.StorageSizeInGb), + VCores: pointer.To(state.VCores), ZoneRedundant: pointer.To(state.ZoneRedundantEnabled), }, - Tags: tags.FromTypedObject(state.Tags), + Tags: pointer.To(state.Tags), } - if properties.Identity != nil && len(properties.Identity.UserAssignedIdentities) > 0 { - for k := range properties.Identity.UserAssignedIdentities { - properties.ManagedInstanceProperties.PrimaryUserAssignedIdentityID = pointer.To(k) + if properties.Identity != nil && len(properties.Identity.IdentityIds) > 0 { + for k := range properties.Identity.IdentityIds { + properties.Properties.PrimaryUserAssignedIdentityId = pointer.To(k) break } } if metadata.ResourceData.HasChange("maintenance_configuration_name") { maintenanceConfigId := publicmaintenanceconfigurations.NewPublicMaintenanceConfigurationID(id.SubscriptionId, state.MaintenanceConfigurationName) - properties.MaintenanceConfigurationID = pointer.To(maintenanceConfigId.ID()) + properties.Properties.MaintenanceConfigurationId = pointer.To(maintenanceConfigId.ID()) } if metadata.ResourceData.HasChange("administrator_login_password") { - properties.AdministratorLoginPassword = pointer.To(state.AdministratorLoginPassword) + properties.Properties.AdministratorLoginPassword = pointer.To(state.AdministratorLoginPassword) + } + + if metadata.ResourceData.HasChange("service_principal_type") { + properties.Properties.ServicePrincipal = &managedinstances.ServicePrincipal{} + if state.ServicePrincipalType == "" { + properties.Properties.ServicePrincipal.Type = pointer.To(managedinstances.ServicePrincipalTypeNone) + } else { + properties.Properties.ServicePrincipal.Type = pointer.To(managedinstances.ServicePrincipalType(state.ServicePrincipalType)) + } } metadata.Logger.Infof("Updating %s", id) - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.Name, properties) + err = client.CreateOrUpdateThenPoll(ctx, *id, properties) if err != nil { return fmt.Errorf("updating %s: %+v", id, err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for update of %s: %+v", id, err) - } - return nil }, } @@ -446,7 +463,7 @@ func (r MsSqlManagedInstanceResource) Read() sdk.ResourceFunc { Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { client := metadata.Client.MSSQLManagedInstance.ManagedInstancesClient - id, err := parse.ManagedInstanceID(metadata.ResourceData.Id()) + id, err := commonids.ParseSqlManagedInstanceID(metadata.ResourceData.Id()) if err != nil { return err } @@ -457,79 +474,66 @@ func (r MsSqlManagedInstanceResource) Read() sdk.ResourceFunc { return err } - existing, err := client.Get(ctx, id.ResourceGroup, id.Name, "") + existing, err := client.Get(ctx, *id, managedinstances.GetOperationOptions{}) if err != nil { - if utils.ResponseWasNotFound(existing.Response) { + if response.WasNotFound(existing.HttpResponse) { return metadata.MarkAsGone(id) } return fmt.Errorf("retrieving %s: %v", id, err) } + model := MsSqlManagedInstanceModel{} - model := MsSqlManagedInstanceModel{ - Name: id.Name, - Location: location.NormalizeNilable(existing.Location), - ResourceGroupName: id.ResourceGroup, - Identity: r.flattenIdentity(existing.Identity), - Tags: tags.ToTypedObject(existing.Tags), - - // This value is not returned, so we'll just set whatever is in the state/config - AdministratorLoginPassword: state.AdministratorLoginPassword, - // This value is not returned, so we'll just set whatever is in the state/config - DnsZonePartnerId: state.DnsZonePartnerId, - } - - if sku := existing.Sku; sku != nil && sku.Name != nil { - model.SkuName = r.normalizeSku(*sku.Name) - } + if existing.Model != nil { - if props := existing.ManagedInstanceProperties; props != nil { - model.LicenseType = string(props.LicenseType) - model.ProxyOverride = string(props.ProxyOverride) - model.StorageAccountType = string(props.StorageAccountType) + model = MsSqlManagedInstanceModel{ + Name: id.ManagedInstanceName, + Location: location.NormalizeNilable(&existing.Model.Location), + ResourceGroupName: id.ResourceGroupName, + Identity: r.flattenIdentity(existing.Model.Identity), + Tags: pointer.From(existing.Model.Tags), - if props.AdministratorLogin != nil { - model.AdministratorLogin = *props.AdministratorLogin - } - if props.Collation != nil { - model.Collation = *props.Collation - } - if props.DNSZone != nil { - model.DnsZone = *props.DNSZone + // This value is not returned, so we'll just set whatever is in the state/config + AdministratorLoginPassword: state.AdministratorLoginPassword, + // This value is not returned, so we'll just set whatever is in the state/config + DnsZonePartnerId: state.DnsZonePartnerId, } - if props.FullyQualifiedDomainName != nil { - model.Fqdn = *props.FullyQualifiedDomainName + + if sku := existing.Model.Sku; sku != nil { + model.SkuName = r.normalizeSku(sku.Name) } - if props.MaintenanceConfigurationID != nil { - maintenanceConfigId, err := publicmaintenanceconfigurations.ParsePublicMaintenanceConfigurationIDInsensitively(*props.MaintenanceConfigurationID) - if err != nil { - return err + + if props := existing.Model.Properties; props != nil { + model.LicenseType = string(pointer.From(props.LicenseType)) + model.ProxyOverride = string(pointer.From(props.ProxyOverride)) + model.StorageAccountType = backupStorageRedundancyToStorageAccType(pointer.From(props.RequestedBackupStorageRedundancy)) + + model.AdministratorLogin = pointer.From(props.AdministratorLogin) + model.Collation = pointer.From(props.Collation) + model.DnsZone = pointer.From(props.DnsZone) + model.Fqdn = pointer.From(props.FullyQualifiedDomainName) + + if props.MaintenanceConfigurationId != nil { + maintenanceConfigId, err := publicmaintenanceconfigurations.ParsePublicMaintenanceConfigurationIDInsensitively(*props.MaintenanceConfigurationId) + if err != nil { + return err + } + model.MaintenanceConfigurationName = maintenanceConfigId.PublicMaintenanceConfigurationName } - model.MaintenanceConfigurationName = maintenanceConfigId.PublicMaintenanceConfigurationName - } - if props.MinimalTLSVersion != nil { - model.MinimumTlsVersion = *props.MinimalTLSVersion - } - if props.PublicDataEndpointEnabled != nil { - model.PublicDataEndpointEnabled = *props.PublicDataEndpointEnabled - } - if props.StorageSizeInGB != nil { - model.StorageSizeInGb = int64(*props.StorageSizeInGB) - } - if props.SubnetID != nil { - model.SubnetId = *props.SubnetID - } - if props.TimezoneID != nil { - model.TimezoneId = *props.TimezoneID - } - if props.VCores != nil { - model.VCores = int64(*props.VCores) - } - if props.ZoneRedundant != nil { - model.ZoneRedundantEnabled = *props.ZoneRedundant + model.MinimumTlsVersion = pointer.From(props.MinimalTlsVersion) + model.PublicDataEndpointEnabled = pointer.From(props.PublicDataEndpointEnabled) + model.StorageSizeInGb = pointer.From(props.StorageSizeInGB) + model.SubnetId = pointer.From(props.SubnetId) + model.TimezoneId = pointer.From(props.TimezoneId) + model.VCores = pointer.From(props.VCores) + model.ZoneRedundantEnabled = pointer.From(props.ZoneRedundant) + + model.ServicePrincipalType = "" + if props.ServicePrincipal != nil { + model.ServicePrincipalType = string(pointer.From(props.ServicePrincipal.Type)) + } } } - return metadata.Encode(&model) }, } @@ -541,18 +545,14 @@ func (r MsSqlManagedInstanceResource) Delete() sdk.ResourceFunc { Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { client := metadata.Client.MSSQLManagedInstance.ManagedInstancesClient - id, err := parse.ManagedInstanceID(metadata.ResourceData.Id()) + id, err := commonids.ParseSqlManagedInstanceID(metadata.ResourceData.Id()) if err != nil { return err } - future, err := client.Delete(ctx, id.ResourceGroup, id.Name) + err = client.DeleteThenPoll(ctx, *id) if err != nil { - return fmt.Errorf("deleting %s: %+v", id, err) - } - - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for deletion of %s: %+v", id, err) + return fmt.Errorf("deleting %s: %+v", *id, err) } return nil @@ -560,7 +560,7 @@ func (r MsSqlManagedInstanceResource) Delete() sdk.ResourceFunc { } } -func (r MsSqlManagedInstanceResource) expandIdentity(input []identity.SystemOrUserAssignedList) *sql.ResourceIdentity { +func (r MsSqlManagedInstanceResource) expandIdentity(input []identity.SystemOrUserAssignedList) *identity.LegacySystemAndUserAssignedMap { if len(input) == 0 { return nil } @@ -570,37 +570,27 @@ func (r MsSqlManagedInstanceResource) expandIdentity(input []identity.SystemOrUs return nil } - var identityIds map[string]*sql.UserIdentity + var identityIds map[string]identity.UserAssignedIdentityDetails if len(input[0].IdentityIds) != 0 { - identityIds = map[string]*sql.UserIdentity{} + identityIds = map[string]identity.UserAssignedIdentityDetails{} for _, id := range input[0].IdentityIds { - identityIds[id] = &sql.UserIdentity{} + identityIds[id] = identity.UserAssignedIdentityDetails{} } } - return &sql.ResourceIdentity{ - Type: sql.IdentityType(input[0].Type), - UserAssignedIdentities: identityIds, + return &identity.LegacySystemAndUserAssignedMap{ + Type: input[0].Type, + IdentityIds: identityIds, } } -func (r MsSqlManagedInstanceResource) flattenIdentity(input *sql.ResourceIdentity) []identity.SystemOrUserAssignedList { +func (r MsSqlManagedInstanceResource) flattenIdentity(input *identity.LegacySystemAndUserAssignedMap) []identity.SystemOrUserAssignedList { if input == nil { return nil } - principalId := "" - if input.PrincipalID != nil { - principalId = input.PrincipalID.String() - } - - tenantId := "" - if input.TenantID != nil { - tenantId = input.TenantID.String() - } - var identityIds = make([]string, 0) - for k := range input.UserAssignedIdentities { + for k := range input.IdentityIds { parsedId, err := commonids.ParseUserAssignedIdentityIDInsensitively(k) if err != nil { continue @@ -609,14 +599,14 @@ func (r MsSqlManagedInstanceResource) flattenIdentity(input *sql.ResourceIdentit } return []identity.SystemOrUserAssignedList{{ - Type: identity.Type(input.Type), - PrincipalId: principalId, - TenantId: tenantId, + Type: input.Type, + PrincipalId: input.PrincipalId, + TenantId: input.TenantId, IdentityIds: identityIds, }} } -func (r MsSqlManagedInstanceResource) expandSkuName(skuName string) (*sql.Sku, error) { +func (r MsSqlManagedInstanceResource) expandSkuName(skuName string) (*managedinstances.Sku, error) { parts := strings.Split(skuName, "_") if len(parts) != 2 { return nil, fmt.Errorf("sku_name (%s) has the wrong number of parts (%d) after splitting on _", skuName, len(parts)) @@ -632,8 +622,8 @@ func (r MsSqlManagedInstanceResource) expandSkuName(skuName string) (*sql.Sku, e return nil, fmt.Errorf("sku_name %s has unknown sku tier %s", skuName, parts[0]) } - return &sql.Sku{ - Name: pointer.To(skuName), + return &managedinstances.Sku{ + Name: skuName, Tier: pointer.To(tier), Family: pointer.To(parts[1]), }, nil @@ -653,3 +643,32 @@ func (r MsSqlManagedInstanceResource) normalizeSku(sku string) string { return sku } + +// the StorageAccountType property has changed to RequestedBackupStorageRedundancy with 1-1 mapping of the following values: +// GRS -> Geo +// ZRS -> Zone +// LRS -> Local +// GZRS -> GeoZone +func storageAccTypeToBackupStorageRedundancy(storageAccountType string) managedinstances.BackupStorageRedundancy { + switch storageAccountType { + case StorageAccountTypeZRS: + return managedinstances.BackupStorageRedundancyZone + case StorageAccountTypeLRS: + return managedinstances.BackupStorageRedundancyLocal + case StorageAccountTypeGZRS: + return managedinstances.BackupStorageRedundancyGeoZone + } + return managedinstances.BackupStorageRedundancyGeo +} + +func backupStorageRedundancyToStorageAccType(backupStorageRedundancy managedinstances.BackupStorageRedundancy) string { + switch backupStorageRedundancy { + case managedinstances.BackupStorageRedundancyZone: + return StorageAccountTypeZRS + case managedinstances.BackupStorageRedundancyLocal: + return StorageAccountTypeLRS + case managedinstances.BackupStorageRedundancyGeoZone: + return StorageAccountTypeGZRS + } + return StorageAccountTypeGRS +} diff --git a/internal/services/mssqlmanagedinstance/mssql_managed_instance_resource_test.go b/internal/services/mssqlmanagedinstance/mssql_managed_instance_resource_test.go index a09ee4bea6e2c..2d420042cd9d0 100644 --- a/internal/services/mssqlmanagedinstance/mssql_managed_instance_resource_test.go +++ b/internal/services/mssqlmanagedinstance/mssql_managed_instance_resource_test.go @@ -8,1001 +8,18 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssqlmanagedinstance/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) type MsSqlManagedInstanceResource struct{} -const managedInstanceStaticRoutes = ` - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-OneDsCollector" - address_prefix = "OneDsCollector" - next_hop_type = "Internet" - } - route { - name = "mi-13-64-11-nexthop-internet" - address_prefix = "13.64.0.0/11" - next_hop_type = "Internet" - } - route { - name = "mi-13-104-14-nexthop-internet" - address_prefix = "13.104.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-20-34-15-nexthop-internet" - address_prefix = "20.34.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-20-36-14-nexthop-internet" - address_prefix = "20.36.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-20-40-13-nexthop-internet" - address_prefix = "20.40.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-20-128-16-nexthop-internet" - address_prefix = "20.128.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-20-140-15-nexthop-internet" - address_prefix = "20.140.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-20-144-14-nexthop-internet" - address_prefix = "20.144.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-20-150-15-nexthop-internet" - address_prefix = "20.150.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-20-160-12-nexthop-internet" - address_prefix = "20.160.0.0/12" - next_hop_type = "Internet" - } - route { - name = "mi-20-176-14-nexthop-internet" - address_prefix = "20.176.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-20-180-14-nexthop-internet" - address_prefix = "20.180.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-20-184-13-nexthop-internet" - address_prefix = "20.184.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-40-64-10-nexthop-internet" - address_prefix = "40.64.0.0/10" - next_hop_type = "Internet" - } - route { - name = "mi-51-4-15-nexthop-internet" - address_prefix = "51.4.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-51-8-16-nexthop-internet" - address_prefix = "51.8.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-10-15-nexthop-internet" - address_prefix = "51.10.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-51-12-15-nexthop-internet" - address_prefix = "51.12.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-51-18-16-nexthop-internet" - address_prefix = "51.18.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-51-16-nexthop-internet" - address_prefix = "51.51.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-53-16-nexthop-internet" - address_prefix = "51.53.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-103-16-nexthop-internet" - address_prefix = "51.103.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-104-15-nexthop-internet" - address_prefix = "51.104.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-51-107-16-nexthop-internet" - address_prefix = "51.107.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-116-16-nexthop-internet" - address_prefix = "51.116.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-120-16-nexthop-internet" - address_prefix = "51.120.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-124-16-nexthop-internet" - address_prefix = "51.124.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-132-16-nexthop-internet" - address_prefix = "51.132.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-136-15-nexthop-internet" - address_prefix = "51.136.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-51-138-16-nexthop-internet" - address_prefix = "51.138.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-140-14-nexthop-internet" - address_prefix = "51.140.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-51-144-15-nexthop-internet" - address_prefix = "51.144.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-52-96-12-nexthop-internet" - address_prefix = "52.96.0.0/12" - next_hop_type = "Internet" - } - route { - name = "mi-52-112-14-nexthop-internet" - address_prefix = "52.112.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-52-125-16-nexthop-internet" - address_prefix = "52.125.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-52-126-15-nexthop-internet" - address_prefix = "52.126.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-52-130-15-nexthop-internet" - address_prefix = "52.130.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-52-132-14-nexthop-internet" - address_prefix = "52.132.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-52-136-13-nexthop-internet" - address_prefix = "52.136.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-52-145-16-nexthop-internet" - address_prefix = "52.145.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-52-146-15-nexthop-internet" - address_prefix = "52.146.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-52-148-14-nexthop-internet" - address_prefix = "52.148.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-52-152-13-nexthop-internet" - address_prefix = "52.152.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-52-160-11-nexthop-internet" - address_prefix = "52.160.0.0/11" - next_hop_type = "Internet" - } - route { - name = "mi-52-224-11-nexthop-internet" - address_prefix = "52.224.0.0/11" - next_hop_type = "Internet" - } - route { - name = "mi-64-4-18-nexthop-internet" - address_prefix = "64.4.0.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-65-52-14-nexthop-internet" - address_prefix = "65.52.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-66-119-144-20-nexthop-internet" - address_prefix = "66.119.144.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-70-37-17-nexthop-internet" - address_prefix = "70.37.0.0/17" - next_hop_type = "Internet" - } - route { - name = "mi-70-37-128-18-nexthop-internet" - address_prefix = "70.37.128.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-91-190-216-21-nexthop-internet" - address_prefix = "91.190.216.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-94-245-64-18-nexthop-internet" - address_prefix = "94.245.64.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-103-9-8-22-nexthop-internet" - address_prefix = "103.9.8.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-103-25-156-24-nexthop-internet" - address_prefix = "103.25.156.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-103-25-157-24-nexthop-internet" - address_prefix = "103.25.157.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-103-25-158-23-nexthop-internet" - address_prefix = "103.25.158.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-103-36-96-22-nexthop-internet" - address_prefix = "103.36.96.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-103-255-140-22-nexthop-internet" - address_prefix = "103.255.140.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-104-40-13-nexthop-internet" - address_prefix = "104.40.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-104-146-15-nexthop-internet" - address_prefix = "104.146.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-104-208-13-nexthop-internet" - address_prefix = "104.208.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-111-221-16-20-nexthop-internet" - address_prefix = "111.221.16.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-111-221-64-18-nexthop-internet" - address_prefix = "111.221.64.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-129-75-16-nexthop-internet" - address_prefix = "129.75.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-1-24-nexthop-internet" - address_prefix = "131.253.1.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-3-24-nexthop-internet" - address_prefix = "131.253.3.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-5-24-nexthop-internet" - address_prefix = "131.253.5.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-6-24-nexthop-internet" - address_prefix = "131.253.6.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-8-24-nexthop-internet" - address_prefix = "131.253.8.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-12-22-nexthop-internet" - address_prefix = "131.253.12.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-16-23-nexthop-internet" - address_prefix = "131.253.16.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-18-24-nexthop-internet" - address_prefix = "131.253.18.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-21-24-nexthop-internet" - address_prefix = "131.253.21.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-22-23-nexthop-internet" - address_prefix = "131.253.22.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-24-21-nexthop-internet" - address_prefix = "131.253.24.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-32-20-nexthop-internet" - address_prefix = "131.253.32.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-61-24-nexthop-internet" - address_prefix = "131.253.61.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-62-23-nexthop-internet" - address_prefix = "131.253.62.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-64-18-nexthop-internet" - address_prefix = "131.253.64.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-128-17-nexthop-internet" - address_prefix = "131.253.128.0/17" - next_hop_type = "Internet" - } - route { - name = "mi-132-245-16-nexthop-internet" - address_prefix = "132.245.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-134-170-16-nexthop-internet" - address_prefix = "134.170.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-134-177-16-nexthop-internet" - address_prefix = "134.177.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-137-116-15-nexthop-internet" - address_prefix = "137.116.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-137-135-16-nexthop-internet" - address_prefix = "137.135.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-138-91-16-nexthop-internet" - address_prefix = "138.91.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-138-196-16-nexthop-internet" - address_prefix = "138.196.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-139-217-16-nexthop-internet" - address_prefix = "139.217.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-139-219-16-nexthop-internet" - address_prefix = "139.219.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-141-251-16-nexthop-internet" - address_prefix = "141.251.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-146-147-16-nexthop-internet" - address_prefix = "146.147.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-147-243-16-nexthop-internet" - address_prefix = "147.243.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-150-171-16-nexthop-internet" - address_prefix = "150.171.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-150-242-48-22-nexthop-internet" - address_prefix = "150.242.48.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-157-54-15-nexthop-internet" - address_prefix = "157.54.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-157-56-14-nexthop-internet" - address_prefix = "157.56.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-157-60-16-nexthop-internet" - address_prefix = "157.60.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-167-220-16-nexthop-internet" - address_prefix = "167.220.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-168-61-16-nexthop-internet" - address_prefix = "168.61.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-168-62-15-nexthop-internet" - address_prefix = "168.62.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-191-232-13-nexthop-internet" - address_prefix = "191.232.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-192-32-16-nexthop-internet" - address_prefix = "192.32.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-192-48-225-24-nexthop-internet" - address_prefix = "192.48.225.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-192-84-159-24-nexthop-internet" - address_prefix = "192.84.159.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-192-84-160-23-nexthop-internet" - address_prefix = "192.84.160.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-192-100-102-24-nexthop-internet" - address_prefix = "192.100.102.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-192-100-103-24-nexthop-internet" - address_prefix = "192.100.103.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-192-197-157-24-nexthop-internet" - address_prefix = "192.197.157.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-193-149-64-19-nexthop-internet" - address_prefix = "193.149.64.0/19" - next_hop_type = "Internet" - } - route { - name = "mi-193-221-113-24-nexthop-internet" - address_prefix = "193.221.113.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-194-69-96-19-nexthop-internet" - address_prefix = "194.69.96.0/19" - next_hop_type = "Internet" - } - route { - name = "mi-194-110-197-24-nexthop-internet" - address_prefix = "194.110.197.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-198-105-232-22-nexthop-internet" - address_prefix = "198.105.232.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-198-200-130-24-nexthop-internet" - address_prefix = "198.200.130.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-198-206-164-24-nexthop-internet" - address_prefix = "198.206.164.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-199-60-28-24-nexthop-internet" - address_prefix = "199.60.28.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-199-74-210-24-nexthop-internet" - address_prefix = "199.74.210.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-199-103-90-23-nexthop-internet" - address_prefix = "199.103.90.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-199-103-122-24-nexthop-internet" - address_prefix = "199.103.122.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-199-242-32-20-nexthop-internet" - address_prefix = "199.242.32.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-199-242-48-21-nexthop-internet" - address_prefix = "199.242.48.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-202-89-224-20-nexthop-internet" - address_prefix = "202.89.224.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-204-13-120-21-nexthop-internet" - address_prefix = "204.13.120.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-204-14-180-22-nexthop-internet" - address_prefix = "204.14.180.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-135-24-nexthop-internet" - address_prefix = "204.79.135.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-179-24-nexthop-internet" - address_prefix = "204.79.179.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-181-24-nexthop-internet" - address_prefix = "204.79.181.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-188-24-nexthop-internet" - address_prefix = "204.79.188.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-195-24-nexthop-internet" - address_prefix = "204.79.195.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-196-23-nexthop-internet" - address_prefix = "204.79.196.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-252-24-nexthop-internet" - address_prefix = "204.79.252.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-152-18-23-nexthop-internet" - address_prefix = "204.152.18.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-204-152-140-23-nexthop-internet" - address_prefix = "204.152.140.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-192-24-nexthop-internet" - address_prefix = "204.231.192.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-194-23-nexthop-internet" - address_prefix = "204.231.194.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-197-24-nexthop-internet" - address_prefix = "204.231.197.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-198-23-nexthop-internet" - address_prefix = "204.231.198.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-200-21-nexthop-internet" - address_prefix = "204.231.200.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-208-20-nexthop-internet" - address_prefix = "204.231.208.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-236-24-nexthop-internet" - address_prefix = "204.231.236.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-205-174-224-20-nexthop-internet" - address_prefix = "205.174.224.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-206-138-168-21-nexthop-internet" - address_prefix = "206.138.168.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-206-191-224-19-nexthop-internet" - address_prefix = "206.191.224.0/19" - next_hop_type = "Internet" - } - route { - name = "mi-207-46-16-nexthop-internet" - address_prefix = "207.46.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-207-68-128-18-nexthop-internet" - address_prefix = "207.68.128.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-208-68-136-21-nexthop-internet" - address_prefix = "208.68.136.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-208-76-44-22-nexthop-internet" - address_prefix = "208.76.44.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-208-84-21-nexthop-internet" - address_prefix = "208.84.0.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-209-240-192-19-nexthop-internet" - address_prefix = "209.240.192.0/19" - next_hop_type = "Internet" - } - route { - name = "mi-213-199-128-18-nexthop-internet" - address_prefix = "213.199.128.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-216-32-180-22-nexthop-internet" - address_prefix = "216.32.180.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-216-220-208-20-nexthop-internet" - address_prefix = "216.220.208.0/20" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-33-16-nexthop-internet" - address_prefix = "20.33.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-48-12-nexthop-internet" - address_prefix = "20.48.0.0/12" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-64-10-nexthop-internet" - address_prefix = "20.64.0.0/10" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-135-16-nexthop-internet" - address_prefix = "20.135.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-136-16-nexthop-internet" - address_prefix = "20.136.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-143-16-nexthop-internet" - address_prefix = "20.143.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-192-10-nexthop-internet" - address_prefix = "20.192.0.0/10" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-167-105-16-nexthop-internet" - address_prefix = "131.107.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-131-107-16-nexthop-internet" - address_prefix = "167.105.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-23-96-13-nexthop-internet" - address_prefix = "23.96.0.0/13" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-42-159-16-nexthop-internet" - address_prefix = "42.159.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-51-13-17-nexthop-internet" - address_prefix = "51.13.0.0/17" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-51-120-128-17-nexthop-internet" - address_prefix = "51.120.128.0/17" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-102-37-18-nexthop-internet" - address_prefix = "102.37.0.0/18" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-102-133-16-nexthop-internet" - address_prefix = "102.133.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-199-30-16-20-nexthop-internet" - address_prefix = "199.30.16.0/20" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-204-79-180-24-nexthop-internet" - address_prefix = "204.79.180.0/24" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Storage" - address_prefix = "Storage" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-SqlManagement" - address_prefix = "SqlManagement" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-AzureMonitor" - address_prefix = "AzureMonitor" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-CorpNetSaw" - address_prefix = "CorpNetSaw" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-CorpNetPublic" - address_prefix = "CorpNetPublic" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-AzureActiveDirectory" - address_prefix = "AzureActiveDirectory" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-AzureCloud.westeurope" - address_prefix = "AzureCloud.westeurope" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-AzureCloud.northeurope" - address_prefix = "AzureCloud.northeurope" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Storage.westeurope" - address_prefix = "Storage.westeurope" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Storage.northeurope" - address_prefix = "Storage.northeurope" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Storage.francecentral" - address_prefix = "Storage.francecentral" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Storage.francesouth" - address_prefix = "Storage.francesouth" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-EventHub.westeurope" - address_prefix = "EventHub.westeurope" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-EventHub.northeurope" - address_prefix = "EventHub.northeurope" - next_hop_type = "Internet" - } - - route { - address_prefix = "AzureCloud.westcentralus" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-AzureCloud.westcentralus" - next_hop_type = "Internet" - } - - route { - address_prefix = "AzureCloud.westus2" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-AzureCloud.westus2" - next_hop_type = "Internet" - } - - route { - address_prefix = "Storage.westcentralus" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Storage.westcentralus" - next_hop_type = "Internet" - } - - route { - address_prefix = "Storage.westus2" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Storage.westus2" - next_hop_type = "Internet" - } - - route { - address_prefix = "EventHub.westcentralus" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-EventHub.westcentralus" - next_hop_type = "Internet" - } - - route { - address_prefix = "EventHub.westus2" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-EventHub.westus2" - next_hop_type = "Internet" - } - - route { - address_prefix = "Sql.westcentralus" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Sql.westcentralus" - next_hop_type = "Internet" - } - - route { - address_prefix = "Sql.westus2" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Sql.westus2" - next_hop_type = "Internet" - } -` - func TestAccMsSqlManagedInstance_basic(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_mssql_managed_instance", "test") r := MsSqlManagedInstanceResource{} @@ -1024,7 +41,7 @@ func TestAccMsSqlManagedInstance_update(t *testing.T) { data.ResourceTest(t, r, []acceptance.TestStep{ { - Config: r.basic(data), + Config: r.basicZRS(data), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), ), @@ -1038,7 +55,7 @@ func TestAccMsSqlManagedInstance_update(t *testing.T) { }, data.ImportStep("administrator_login_password"), { - Config: r.basic(data), + Config: r.basicZRS(data), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), ), @@ -1077,6 +94,21 @@ func TestAccMsSqlManagedInstance_backupRedundancyLRS(t *testing.T) { }) } +func TestAccMsSqlManagedInstance_backupRedundancyGZRS(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_mssql_managed_instance", "test") + r := MsSqlManagedInstanceResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.storageType(data, "GZRS"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep("administrator_login_password"), + }) +} + func TestAccMsSqlManagedInstance_identity(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_mssql_managed_instance", "test") r := MsSqlManagedInstanceResource{} @@ -1218,15 +250,37 @@ func TestAccMsSqlManagedInstance_withMaintenanceConfig(t *testing.T) { }) } +func TestAccMsSqlManagedInstance_withServicePrincipal(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_mssql_managed_instance", "test") + r := MsSqlManagedInstanceResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.withServicePrincipal(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep("administrator_login_password"), + { + Config: r.withServicePrincipalUpdated(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep("administrator_login_password"), + }) +} + func (r MsSqlManagedInstanceResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.ManagedInstanceID(state.ID) + id, err := commonids.ParseSqlManagedInstanceID(state.ID) if err != nil { return nil, err } - resp, err := client.MSSQLManagedInstance.ManagedInstancesClient.Get(ctx, id.ResourceGroup, id.Name, "") + resp, err := client.MSSQLManagedInstance.ManagedInstancesClient.Get(ctx, *id, managedinstances.GetOperationOptions{}) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { return utils.Bool(false), nil } return nil, fmt.Errorf("retrieving %s: %+v", id, err) @@ -1277,6 +331,50 @@ resource "azurerm_mssql_managed_instance" "test" { `, r.template(data, data.Locations.Primary), data.RandomInteger) } +func (r MsSqlManagedInstanceResource) basicZRS(data acceptance.TestData) string { + return fmt.Sprintf(` +%[1]s + +provider "azurerm" { + features { + resource_group { + /* Due to the creation of unmanaged Microsoft.Network/networkIntentPolicies in this service, + prevent_deletion_if_contains_resources has been added here to allow the test resources to be + deleted until this can be properly investigated + */ + prevent_deletion_if_contains_resources = false + } + } +} + +resource "azurerm_mssql_managed_instance" "test" { + name = "acctestsqlserver%[2]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + + license_type = "BasePrice" + sku_name = "GP_Gen5" + storage_account_type = "ZRS" + storage_size_in_gb = 32 + subnet_id = azurerm_subnet.test.id + vcores = 4 + + administrator_login = "missadministrator" + administrator_login_password = "NCC-1701-D" + + depends_on = [ + azurerm_subnet_network_security_group_association.test, + azurerm_subnet_route_table_association.test, + ] + + tags = { + environment = "staging" + database = "test" + } +} +`, r.template(data, data.Locations.Primary), data.RandomInteger) +} + func (r MsSqlManagedInstanceResource) premium(data acceptance.TestData) string { return fmt.Sprintf(` %[1]s @@ -1437,6 +535,7 @@ resource "azurerm_mssql_managed_instance" "test" { proxy_override = "Proxy" public_data_endpoint_enabled = true sku_name = "GP_Gen5" + storage_account_type = "ZRS" storage_size_in_gb = 64 subnet_id = azurerm_subnet.test.id timezone_id = "Pacific Standard Time" @@ -1939,11 +1038,13 @@ resource "azurerm_route_table" "test" { next_hop_type = "VnetLocal" } - %[3]s - depends_on = [ azurerm_subnet.test, ] + + lifecycle { + ignore_changes = ["route"] + } } resource "azurerm_subnet_network_security_group_association" "test" { @@ -1955,7 +1056,7 @@ resource "azurerm_subnet_route_table_association" "test" { subnet_id = azurerm_subnet.test.id route_table_id = azurerm_route_table.test.id } - `, data.RandomInteger, location, managedInstanceStaticRoutes) + `, data.RandomInteger, location) } func (r MsSqlManagedInstanceResource) templateSecondary(data acceptance.TestData) string { @@ -2173,11 +1274,13 @@ resource "azurerm_route_table" "secondary" { next_hop_type = "VnetLocal" } - %[3]s - depends_on = [ azurerm_subnet.secondary, ] + + lifecycle { + ignore_changes = ["route"] + } } resource "azurerm_subnet_network_security_group_association" "secondary" { @@ -2189,7 +1292,7 @@ resource "azurerm_subnet_route_table_association" "secondary" { subnet_id = azurerm_subnet.secondary.id route_table_id = azurerm_route_table.secondary.id } - `, data.RandomInteger, data.Locations.Secondary, managedInstanceStaticRoutes) + `, data.RandomInteger, data.Locations.Secondary) } func (r MsSqlManagedInstanceResource) templateExtraSecondary(data acceptance.TestData) string { @@ -2407,11 +1510,13 @@ resource "azurerm_route_table" "secondary_2" { next_hop_type = "VnetLocal" } - %[3]s - depends_on = [ azurerm_subnet.secondary_2, ] + + lifecycle { + ignore_changes = ["route"] + } } resource "azurerm_subnet_network_security_group_association" "secondary_2" { @@ -2423,7 +1528,7 @@ resource "azurerm_subnet_route_table_association" "secondary_2" { subnet_id = azurerm_subnet.secondary_2.id route_table_id = azurerm_route_table.secondary_2.id } -`, data.RandomInteger, data.Locations.Secondary, managedInstanceStaticRoutes) +`, data.RandomInteger, data.Locations.Secondary) } func (r MsSqlManagedInstanceResource) withMaintenanceConfig(data acceptance.TestData) string { @@ -2471,3 +1576,90 @@ resource "azurerm_mssql_managed_instance" "test" { } `, r.template(data, data.Locations.Primary), data.RandomInteger) } + +func (r MsSqlManagedInstanceResource) withServicePrincipal(data acceptance.TestData) string { + return fmt.Sprintf(` +%[1]s + +provider "azurerm" { + features { + resource_group { + /* Due to the creation of unmanaged Microsoft.Network/networkIntentPolicies in this service, + prevent_deletion_if_contains_resources has been added here to allow the test resources to be + deleted until this can be properly investigated + */ + prevent_deletion_if_contains_resources = false + } + } +} + +resource "azurerm_mssql_managed_instance" "test" { + name = "acctestsqlserver%[2]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + + license_type = "BasePrice" + service_principal_type = "SystemAssigned" + sku_name = "GP_Gen5" + storage_size_in_gb = 32 + subnet_id = azurerm_subnet.test.id + vcores = 4 + + administrator_login = "missadministrator" + administrator_login_password = "NCC-1701-D" + + depends_on = [ + azurerm_subnet_network_security_group_association.test, + azurerm_subnet_route_table_association.test, + ] + + tags = { + environment = "staging" + database = "test" + } +} +`, r.template(data, data.Locations.Primary), data.RandomInteger) +} + +func (r MsSqlManagedInstanceResource) withServicePrincipalUpdated(data acceptance.TestData) string { + return fmt.Sprintf(` +%[1]s + +provider "azurerm" { + features { + resource_group { + /* Due to the creation of unmanaged Microsoft.Network/networkIntentPolicies in this service, + prevent_deletion_if_contains_resources has been added here to allow the test resources to be + deleted until this can be properly investigated + */ + prevent_deletion_if_contains_resources = false + } + } +} + +resource "azurerm_mssql_managed_instance" "test" { + name = "acctestsqlserver%[2]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + + license_type = "BasePrice" + sku_name = "GP_Gen5" + storage_size_in_gb = 32 + subnet_id = azurerm_subnet.test.id + vcores = 4 + + administrator_login = "missadministrator" + administrator_login_password = "NCC-1701-D" + + depends_on = [ + azurerm_subnet_network_security_group_association.test, + azurerm_subnet_route_table_association.test, + ] + + tags = { + environment = "staging" + database = "test" + } +} +`, r.template(data, data.Locations.Primary), data.RandomInteger) +} diff --git a/internal/services/mssqlmanagedinstance/mssql_managed_instance_security_alert_policy_resource.go b/internal/services/mssqlmanagedinstance/mssql_managed_instance_security_alert_policy_resource.go index 83f48035c1cb1..0b16c60d4073d 100644 --- a/internal/services/mssqlmanagedinstance/mssql_managed_instance_security_alert_policy_resource.go +++ b/internal/services/mssqlmanagedinstance/mssql_managed_instance_security_alert_policy_resource.go @@ -8,8 +8,11 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssqlmanagedinstance/parse" @@ -116,30 +119,25 @@ func resourceMsSqlManagedInstanceSecurityAlertPolicyCreate(d *pluginsdk.Resource log.Printf("[INFO] preparing arguments for managed instance security alert policy creation.") - resourceGroupName := d.Get("resource_group_name").(string) - managedInstanceName := d.Get("managed_instance_name").(string) - alertPolicy := expandManagedServerSecurityAlertPolicy(d) - future, err := client.CreateOrUpdate(ctx, resourceGroupName, managedInstanceName, *alertPolicy) + managedInstanceId := commonids.NewSqlManagedInstanceID(subscriptionId, d.Get("resource_group_name").(string), d.Get("managed_instance_name").(string)) + + err := client.CreateOrUpdateThenPoll(ctx, managedInstanceId, *alertPolicy) if err != nil { return fmt.Errorf("updating managed instance security alert policy: %v", err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for creating of managed instance security alert policy (server %q, resource group %q): %+v", managedInstanceName, resourceGroupName, err) - } - - result, err := client.Get(ctx, resourceGroupName, managedInstanceName) + result, err := client.Get(ctx, managedInstanceId) if err != nil { - return fmt.Errorf("retrieving mssql manged instance security alert policy (managed instance %q, resource group %q): %+v", managedInstanceName, resourceGroupName, err) + return fmt.Errorf("retrieving %s: %+v", managedInstanceId, err) } - if result.Name == nil { - return fmt.Errorf("reading mssql manged instance security alert policy name (managed instance %q, resource group %q)", managedInstanceName, resourceGroupName) + if result.Model == nil || result.Model.Name == nil { + return fmt.Errorf("reading %s", managedInstanceId) } - id := parse.NewManagedInstancesSecurityAlertPolicyID(subscriptionId, resourceGroupName, managedInstanceName, *result.Name) + id := parse.NewManagedInstancesSecurityAlertPolicyID(subscriptionId, managedInstanceId.ResourceGroupName, managedInstanceId.ManagedInstanceName, *result.Model.Name) d.SetId(id.ID()) @@ -151,43 +149,47 @@ func resourceMsSqlManagedInstanceSecurityAlertPolicyUpdate(d *pluginsdk.Resource ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) defer cancel() - resourceGroupName := d.Get("resource_group_name").(string) - instanceName := d.Get("managed_instance_name").(string) - id, err := parse.ManagedInstancesSecurityAlertPolicyID(d.Id()) if err != nil { return err } - existing, err := client.Get(ctx, resourceGroupName, instanceName) + managedInstanceId := commonids.NewSqlManagedInstanceID(id.SubscriptionId, id.ResourceGroup, id.ManagedInstanceName) + + existing, err := client.Get(ctx, managedInstanceId) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for presence of existing %s: %+v", id, err) } } - props := existing.SecurityAlertsPolicyProperties - if props == nil { + if existing.Model == nil { + return fmt.Errorf("retrieving %s: `model` was nil", *id) + } + + if existing.Model.Properties == nil { return fmt.Errorf("retrieving %s: `properties` was nil", *id) } + payload := existing.Model + if d.HasChange("disabled_alerts") { if v, ok := d.GetOk("disabled_alerts"); ok { disabledAlerts := make([]string, 0) for _, v := range v.(*pluginsdk.Set).List() { disabledAlerts = append(disabledAlerts, v.(string)) } - props.DisabledAlerts = &disabledAlerts + payload.Properties.DisabledAlerts = &disabledAlerts } else { - props.DisabledAlerts = nil + payload.Properties.DisabledAlerts = nil } } if d.HasChange("email_account_admins_enabled") { - props.EmailAccountAdmins = utils.Bool(d.Get("email_account_admins_enabled").(bool)) + payload.Properties.EmailAccountAdmins = utils.Bool(d.Get("email_account_admins_enabled").(bool)) } if d.HasChange("retention_days") { - props.RetentionDays = utils.Int32(int32(d.Get("retention_days").(int))) + payload.Properties.RetentionDays = pointer.To(int64(d.Get("retention_days").(int))) } if d.HasChange("email_addresses") { @@ -196,47 +198,43 @@ func resourceMsSqlManagedInstanceSecurityAlertPolicyUpdate(d *pluginsdk.Resource for _, v := range v.(*pluginsdk.Set).List() { emailAddresses = append(emailAddresses, v.(string)) } - props.EmailAddresses = &emailAddresses + payload.Properties.EmailAddresses = &emailAddresses } else { - props.EmailAddresses = nil + payload.Properties.EmailAddresses = nil } } if d.HasChange("enabled") { if d.Get("enabled").(bool) { - props.State = sql.SecurityAlertsPolicyStateEnabled + payload.Properties.State = managedserversecurityalertpolicies.SecurityAlertsPolicyStateEnabled } else { - props.State = sql.SecurityAlertsPolicyStateDisabled + payload.Properties.State = managedserversecurityalertpolicies.SecurityAlertsPolicyStateDisabled } } if d.HasChange("storage_account_access_key") { - props.StorageAccountAccessKey = utils.String(d.Get("storage_account_access_key").(string)) + payload.Properties.StorageAccountAccessKey = utils.String(d.Get("storage_account_access_key").(string)) } // StorageAccountAccessKey cannot be passed in if it is empty. The api returns this as empty so we need to nil it before sending it back to the api - if props.StorageAccountAccessKey != nil && *props.StorageAccountAccessKey == "" { - props.StorageAccountAccessKey = nil + if payload.Properties.StorageAccountAccessKey != nil && *payload.Properties.StorageAccountAccessKey == "" { + payload.Properties.StorageAccountAccessKey = nil } if d.HasChange("storage_endpoint") { - props.StorageEndpoint = utils.String(d.Get("storage_endpoint").(string)) + payload.Properties.StorageEndpoint = utils.String(d.Get("storage_endpoint").(string)) } // StorageEndpoint cannot be passed in if it is empty. The api returns this as empty so we need to nil it before sending it back to the api - if props.StorageEndpoint != nil && *props.StorageEndpoint == "" { - props.StorageEndpoint = nil + if payload.Properties.StorageEndpoint != nil && *payload.Properties.StorageEndpoint == "" { + payload.Properties.StorageEndpoint = nil } - future, err := client.CreateOrUpdate(ctx, resourceGroupName, instanceName, existing) + err = client.CreateOrUpdateThenPoll(ctx, managedInstanceId, *payload) if err != nil { return fmt.Errorf("updating managed instance security alert policy: %v", err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for updating of managed instance security alert policy (server %q, resource group %q): %+v", instanceName, resourceGroupName, err) - } - d.SetId(id.ID()) return resourceMsSqlManagedInstanceSecurityAlertPolicyRead(d, meta) @@ -254,9 +252,11 @@ func resourceMsSqlManagedInstanceSecurityAlertPolicyRead(d *pluginsdk.ResourceDa return err } - result, err := client.Get(ctx, id.ResourceGroup, id.ManagedInstanceName) + managedInstanceId := commonids.NewSqlManagedInstanceID(id.SubscriptionId, id.ResourceGroup, id.ManagedInstanceName) + + result, err := client.Get(ctx, managedInstanceId) if err != nil { - if utils.ResponseWasNotFound(result.Response) { + if response.WasNotFound(result.HttpResponse) { log.Printf("[WARN] managed instance security alert policy %v not found", id) d.SetId("") return nil @@ -268,45 +268,48 @@ func resourceMsSqlManagedInstanceSecurityAlertPolicyRead(d *pluginsdk.ResourceDa d.Set("resource_group_name", id.ResourceGroup) d.Set("managed_instance_name", id.ManagedInstanceName) - if props := result.SecurityAlertsPolicyProperties; props != nil { - d.Set("enabled", props.State == sql.SecurityAlertsPolicyStateEnabled) + if result.Model != nil { - if props.DisabledAlerts != nil { - disabledAlerts := pluginsdk.NewSet(pluginsdk.HashString, []interface{}{}) - for _, v := range *props.DisabledAlerts { - if v != "" { - disabledAlerts.Add(v) + if props := result.Model.Properties; props != nil { + d.Set("enabled", props.State == managedserversecurityalertpolicies.SecurityAlertsPolicyStateEnabled) + + if props.DisabledAlerts != nil { + disabledAlerts := pluginsdk.NewSet(pluginsdk.HashString, []interface{}{}) + for _, v := range *props.DisabledAlerts { + if v != "" { + disabledAlerts.Add(v) + } } - } - d.Set("disabled_alerts", disabledAlerts) - } + d.Set("disabled_alerts", disabledAlerts) + } - if props.EmailAccountAdmins != nil { - d.Set("email_account_admins_enabled", props.EmailAccountAdmins) - } + if props.EmailAccountAdmins != nil { + d.Set("email_account_admins_enabled", props.EmailAccountAdmins) + } - if props.EmailAddresses != nil { - emailAddresses := pluginsdk.NewSet(pluginsdk.HashString, []interface{}{}) - for _, v := range *props.EmailAddresses { - if v != "" { - emailAddresses.Add(v) + if props.EmailAddresses != nil { + emailAddresses := pluginsdk.NewSet(pluginsdk.HashString, []interface{}{}) + for _, v := range *props.EmailAddresses { + if v != "" { + emailAddresses.Add(v) + } } - } - d.Set("email_addresses", emailAddresses) - } + d.Set("email_addresses", emailAddresses) + } - if props.RetentionDays != nil { - d.Set("retention_days", int(*props.RetentionDays)) - } + if props.RetentionDays != nil { + d.Set("retention_days", int(*props.RetentionDays)) + } - if v, ok := d.GetOk("storage_account_access_key"); ok { - d.Set("storage_account_access_key", v) - } + if v, ok := d.GetOk("storage_account_access_key"); ok { + d.Set("storage_account_access_key", v) + } - if props.StorageEndpoint != nil { - d.Set("storage_endpoint", props.StorageEndpoint) + if props.StorageEndpoint != nil { + d.Set("storage_endpoint", props.StorageEndpoint) + } } } @@ -323,42 +326,40 @@ func resourceMsSqlManagedInstanceSecurityAlertPolicyDelete(d *pluginsdk.Resource return err } - disabledPolicy := sql.ManagedServerSecurityAlertPolicy{ - SecurityAlertsPolicyProperties: &sql.SecurityAlertsPolicyProperties{ - State: sql.SecurityAlertsPolicyStateDisabled, + managedInstanceId := commonids.NewSqlManagedInstanceID(id.SubscriptionId, id.ResourceGroup, id.ManagedInstanceName) + + disabledPolicy := managedserversecurityalertpolicies.ManagedServerSecurityAlertPolicy{ + Properties: &managedserversecurityalertpolicies.SecurityAlertsPolicyProperties{ + State: managedserversecurityalertpolicies.SecurityAlertsPolicyStateDisabled, }, } - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ManagedInstanceName, disabledPolicy) + err = client.CreateOrUpdateThenPoll(ctx, managedInstanceId, disabledPolicy) if err != nil { return fmt.Errorf("updating managed instance security alert policy: %v", err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for creation/update of managed instance security alert policy (server %q, resource group %q): %+v", id.ManagedInstanceName, id.ResourceGroup, err) - } - - if _, err = client.Get(ctx, id.ResourceGroup, id.ManagedInstanceName); err != nil { + if _, err = client.Get(ctx, managedInstanceId); err != nil { return fmt.Errorf("deleting managed instance security alert policy: %v", err) } return nil } -func expandManagedServerSecurityAlertPolicy(d *pluginsdk.ResourceData) *sql.ManagedServerSecurityAlertPolicy { - state := sql.SecurityAlertsPolicyStateDisabled +func expandManagedServerSecurityAlertPolicy(d *pluginsdk.ResourceData) *managedserversecurityalertpolicies.ManagedServerSecurityAlertPolicy { + state := managedserversecurityalertpolicies.SecurityAlertsPolicyStateDisabled if d.Get("enabled").(bool) { - state = sql.SecurityAlertsPolicyStateEnabled + state = managedserversecurityalertpolicies.SecurityAlertsPolicyStateEnabled } - policy := sql.ManagedServerSecurityAlertPolicy{ - SecurityAlertsPolicyProperties: &sql.SecurityAlertsPolicyProperties{ + policy := managedserversecurityalertpolicies.ManagedServerSecurityAlertPolicy{ + Properties: &managedserversecurityalertpolicies.SecurityAlertsPolicyProperties{ State: state, }, } - props := policy.SecurityAlertsPolicyProperties + props := policy.Properties if v, ok := d.GetOk("disabled_alerts"); ok { disabledAlerts := make([]string, 0) @@ -381,7 +382,7 @@ func expandManagedServerSecurityAlertPolicy(d *pluginsdk.ResourceData) *sql.Mana } if v, ok := d.GetOk("retention_days"); ok { - props.RetentionDays = utils.Int32(int32(v.(int))) + props.RetentionDays = utils.Int64(int64(v.(int))) } if v, ok := d.GetOk("storage_account_access_key"); ok { diff --git a/internal/services/mssqlmanagedinstance/mssql_managed_instance_security_alert_policy_resource_test.go b/internal/services/mssqlmanagedinstance/mssql_managed_instance_security_alert_policy_resource_test.go index b52b39de3052d..9fb54141b0cd8 100644 --- a/internal/services/mssqlmanagedinstance/mssql_managed_instance_security_alert_policy_resource_test.go +++ b/internal/services/mssqlmanagedinstance/mssql_managed_instance_security_alert_policy_resource_test.go @@ -8,6 +8,8 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -61,15 +63,17 @@ func (MsSqlManagedInstanceSecurityAlertPolicyResource) Exists(ctx context.Contex return nil, err } - resp, err := client.MSSQLManagedInstance.ManagedInstanceServerSecurityAlertPoliciesClient.Get(ctx, id.ResourceGroup, id.ManagedInstanceName) + instanceId := commonids.NewSqlManagedInstanceID(id.SubscriptionId, id.ResourceGroup, id.ManagedInstanceName) + + resp, err := client.MSSQLManagedInstance.ManagedInstanceServerSecurityAlertPoliciesClient.Get(ctx, instanceId) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { return nil, fmt.Errorf("SQL Managed Instance Security Alert Policy for server %q (Resource Group %q) does not exist", id.ManagedInstanceName, id.ResourceGroup) } return nil, fmt.Errorf("reading SQL Managed Instance Security Alert Policy for server %q (Resource Group %q): %v", id.ManagedInstanceName, id.ResourceGroup, err) } - return utils.Bool(resp.ID != nil), nil + return utils.Bool(resp.Model != nil), nil } func (r MsSqlManagedInstanceSecurityAlertPolicyResource) basic(data acceptance.TestData) string { diff --git a/internal/services/mssqlmanagedinstance/mssql_managed_instance_transparent_data_encryption_resource.go b/internal/services/mssqlmanagedinstance/mssql_managed_instance_transparent_data_encryption_resource.go index a763472420a72..5ba21d6b501d6 100644 --- a/internal/services/mssqlmanagedinstance/mssql_managed_instance_transparent_data_encryption_resource.go +++ b/internal/services/mssqlmanagedinstance/mssql_managed_instance_transparent_data_encryption_resource.go @@ -10,7 +10,10 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" keyVaultParser "github.com/hashicorp/terraform-provider-azurerm/internal/services/keyvault/parse" keyVaultValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/keyvault/validate" @@ -68,7 +71,7 @@ func resourceMsSqlManagedInstanceTransparentDataEncryptionCreateUpdate(d *plugin ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) defer cancel() - managedInstanceId, err := parse.ManagedInstanceID(d.Get("managed_instance_id").(string)) + managedInstanceId, err := commonids.ParseSqlManagedInstanceID(d.Get("managed_instance_id").(string)) if err != nil { return err } @@ -80,31 +83,31 @@ func resourceMsSqlManagedInstanceTransparentDataEncryptionCreateUpdate(d *plugin // because after the SQL server is created, we need to grant it permissions to AKV, so encryption protector can use those // keys are part of setting up TDE - var managedInstanceKey sql.ManagedInstanceKey + var managedInstanceKey managedinstancekeys.ManagedInstanceKey // Default values for Service Managed keys. Will update to AKV values if key_vault_key_id references a key. managedInstanceKeyName := "" - managedInstanceKeyType := sql.ServerKeyTypeServiceManaged + managedInstanceKeyType := managedinstancekeys.ServerKeyTypeServiceManaged keyVaultKeyId := strings.TrimSpace(d.Get("key_vault_key_id").(string)) // If it has content, then we assume it's a key vault key id if keyVaultKeyId != "" { // Update the server key type to AKV - managedInstanceKeyType = sql.ServerKeyTypeAzureKeyVault + managedInstanceKeyType = managedinstancekeys.ServerKeyTypeAzureKeyVault // Set the SQL Managed Instance Key properties - managedInstanceKeyProperties := sql.ManagedInstanceKeyProperties{ + managedInstanceKeyProperties := managedinstancekeys.ManagedInstanceKeyProperties{ ServerKeyType: managedInstanceKeyType, - URI: &keyVaultKeyId, + Uri: &keyVaultKeyId, AutoRotationEnabled: utils.Bool(d.Get("auto_rotation_enabled").(bool)), } - managedInstanceKey.ManagedInstanceKeyProperties = &managedInstanceKeyProperties + managedInstanceKey.Properties = &managedInstanceKeyProperties // Set the encryption protector properties keyId, err := keyVaultParser.ParseNestedItemID(keyVaultKeyId) if err != nil { - return fmt.Errorf("Unable to parse key: %q: %+v", keyVaultKeyId, err) + return fmt.Errorf("unable to parse key: %q: %+v", keyVaultKeyId, err) } // Make sure it's a key, if not, throw an error @@ -115,7 +118,7 @@ func resourceMsSqlManagedInstanceTransparentDataEncryptionCreateUpdate(d *plugin // Extract the vault name from the keyvault base url idURL, err := url.ParseRequestURI(keyId.KeyVaultBaseUrl) if err != nil { - return fmt.Errorf("Unable to parse key vault hostname: %s", keyId.KeyVaultBaseUrl) + return fmt.Errorf("unable to parse key vault hostname: %s", keyId.KeyVaultBaseUrl) } hostParts := strings.Split(idURL.Host, ".") @@ -124,46 +127,44 @@ func resourceMsSqlManagedInstanceTransparentDataEncryptionCreateUpdate(d *plugin // Create the key path for the Encryption Protector. Format is: {vaultname}_{key}_{key_version} managedInstanceKeyName = fmt.Sprintf("%s_%s_%s", vaultName, keyName, keyVersion) } else { - return fmt.Errorf("Key vault key id must be a reference to a key, but got: %s", keyId.NestedItemType) + return fmt.Errorf("key vault key id must be a reference to a key, but got: %s", keyId.NestedItemType) } } + keyType := managedinstanceencryptionprotectors.ServerKeyTypeServiceManaged + if managedInstanceKeyType == managedinstancekeys.ServerKeyTypeAzureKeyVault { + keyType = managedinstanceencryptionprotectors.ServerKeyTypeAzureKeyVault + } // Service managed doesn't require a key name - encryptionProtectorProperties := sql.ManagedInstanceEncryptionProtectorProperties{ - ServerKeyType: managedInstanceKeyType, + encryptionProtectorProperties := managedinstanceencryptionprotectors.ManagedInstanceEncryptionProtectorProperties{ + ServerKeyType: keyType, ServerKeyName: &managedInstanceKeyName, AutoRotationEnabled: utils.Bool(d.Get("auto_rotation_enabled").(bool)), } + managedInstanceKeyId := managedinstancekeys.NewManagedInstanceKeyID(managedInstanceId.SubscriptionId, managedInstanceId.ResourceGroupName, managedInstanceId.ManagedInstanceName, managedInstanceKeyName) // Only create a managed instance key if the properties have been set - if managedInstanceKey.ManagedInstanceKeyProperties != nil { + if managedInstanceKey.Properties != nil { // Create a key on the managed instance - futureServers, err := managedInstanceKeysClient.CreateOrUpdate(ctx, managedInstanceId.ResourceGroup, managedInstanceId.Name, managedInstanceKeyName, managedInstanceKey) + err = managedInstanceKeysClient.CreateOrUpdateThenPoll(ctx, managedInstanceKeyId, managedInstanceKey) if err != nil { return fmt.Errorf("creating/updating managed instance key for %s: %+v", managedInstanceId, err) } - if err = futureServers.WaitForCompletionRef(ctx, managedInstanceKeysClient.Client); err != nil { - return fmt.Errorf("waiting on update of %s: %+v", managedInstanceId, err) - } } - encryptionProtectorObject := sql.ManagedInstanceEncryptionProtector{ - ManagedInstanceEncryptionProtectorProperties: &encryptionProtectorProperties, + encryptionProtectorObject := managedinstanceencryptionprotectors.ManagedInstanceEncryptionProtector{ + Properties: &encryptionProtectorProperties, } // Encryption protector always uses "current" for the name - id := parse.NewManagedInstanceEncryptionProtectorID(managedInstanceId.SubscriptionId, managedInstanceId.ResourceGroup, managedInstanceId.Name, "current") + id := parse.NewManagedInstanceEncryptionProtectorID(managedInstanceId.SubscriptionId, managedInstanceId.ResourceGroupName, managedInstanceId.ManagedInstanceName, "current") - futureEncryptionProtector, err := encryptionProtectorClient.CreateOrUpdate(ctx, id.ResourceGroup, id.ManagedInstanceName, encryptionProtectorObject) + err = encryptionProtectorClient.CreateOrUpdateThenPoll(ctx, *managedInstanceId, encryptionProtectorObject) if err != nil { return fmt.Errorf("creating/updating %s: %+v", id, err) } - if err = futureEncryptionProtector.WaitForCompletionRef(ctx, encryptionProtectorClient.Client); err != nil { - return fmt.Errorf("waiting on create/update future for %s: %+v", id, err) - } - d.SetId(id.ID()) return resourceMsSqlManagedInstanceTransparentDataEncryptionRead(d, meta) @@ -180,43 +181,47 @@ func resourceMsSqlManagedInstanceTransparentDataEncryptionRead(d *pluginsdk.Reso return err } - resp, err := encryptionProtectorClient.Get(ctx, id.ResourceGroup, id.ManagedInstanceName) + managedInstanceId := commonids.NewSqlManagedInstanceID(id.SubscriptionId, id.ResourceGroup, id.ManagedInstanceName) + + resp, err := encryptionProtectorClient.Get(ctx, managedInstanceId) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { d.SetId("") return nil } return fmt.Errorf("making Read request for %s: %v", id, err) } - managedInstanceId := parse.NewManagedInstanceID(id.SubscriptionId, id.ResourceGroup, id.ManagedInstanceName) d.Set("managed_instance_id", managedInstanceId.ID()) - log.Printf("[INFO] Encryption protector key type is %s", resp.ManagedInstanceEncryptionProtectorProperties.ServerKeyType) + if resp.Model != nil && resp.Model.Properties != nil { - keyVaultKeyId := "" - autoRotationEnabled := false + log.Printf("[INFO] Encryption protector key type is %s", resp.Model.Properties.ServerKeyType) - // Only set the key type if it's an AKV key. For service managed, we can omit the setting the key_vault_key_id - if resp.ManagedInstanceEncryptionProtectorProperties != nil && resp.ManagedInstanceEncryptionProtectorProperties.ServerKeyType == sql.ServerKeyTypeAzureKeyVault { - log.Printf("[INFO] Setting Key Vault URI to %s", *resp.ManagedInstanceEncryptionProtectorProperties.URI) + keyVaultKeyId := "" + autoRotationEnabled := false - keyVaultKeyId = *resp.ManagedInstanceEncryptionProtectorProperties.URI + // Only set the key type if it's an AKV key. For service managed, we can omit the setting the key_vault_key_id + if resp.Model.Properties.ServerKeyType == managedinstanceencryptionprotectors.ServerKeyTypeAzureKeyVault { + if resp.Model.Properties.Uri != nil { + log.Printf("[INFO] Setting Key Vault URI to %s", *resp.Model.Properties.Uri) + keyVaultKeyId = *resp.Model.Properties.Uri + } - // autoRotation is only for AKV keys - if resp.ManagedInstanceEncryptionProtectorProperties.AutoRotationEnabled != nil { - autoRotationEnabled = *resp.ManagedInstanceEncryptionProtectorProperties.AutoRotationEnabled + // autoRotation is only for AKV keys + if resp.Model.Properties.AutoRotationEnabled != nil { + autoRotationEnabled = *resp.Model.Properties.AutoRotationEnabled + } } - } - if err := d.Set("key_vault_key_id", keyVaultKeyId); err != nil { - return fmt.Errorf("setting `key_vault_key_id`: %+v", err) - } + if err := d.Set("key_vault_key_id", keyVaultKeyId); err != nil { + return fmt.Errorf("setting `key_vault_key_id`: %+v", err) + } - if err := d.Set("auto_rotation_enabled", autoRotationEnabled); err != nil { - return fmt.Errorf("setting `auto_rotation_enabled`: %+v", err) + if err := d.Set("auto_rotation_enabled", autoRotationEnabled); err != nil { + return fmt.Errorf("setting `auto_rotation_enabled`: %+v", err) + } } - return nil } @@ -234,24 +239,23 @@ func resourceMsSqlManagedInstanceTransparentDataEncryptionDelete(d *pluginsdk.Re return err } + managedInstanceId := commonids.NewSqlManagedInstanceID(id.SubscriptionId, id.ResourceGroup, id.ManagedInstanceName) + managedInstanceKeyName := "" // Service managed doesn't require a key name - encryptionProtector := sql.ManagedInstanceEncryptionProtector{ - ManagedInstanceEncryptionProtectorProperties: &sql.ManagedInstanceEncryptionProtectorProperties{ - ServerKeyType: sql.ServerKeyTypeServiceManaged, + encryptionProtector := managedinstanceencryptionprotectors.ManagedInstanceEncryptionProtector{ + + Properties: &managedinstanceencryptionprotectors.ManagedInstanceEncryptionProtectorProperties{ + ServerKeyType: managedinstanceencryptionprotectors.ServerKeyTypeServiceManaged, ServerKeyName: &managedInstanceKeyName, }, } - futureEncryptionProtector, err := encryptionProtectorClient.CreateOrUpdate(ctx, id.ResourceGroup, id.ManagedInstanceName, encryptionProtector) + err = encryptionProtectorClient.CreateOrUpdateThenPoll(ctx, managedInstanceId, encryptionProtector) if err != nil { return fmt.Errorf("creating/updating %s: %+v", id, err) } - if err = futureEncryptionProtector.WaitForCompletionRef(ctx, encryptionProtectorClient.Client); err != nil { - return fmt.Errorf("waiting on create/update future for %s: %+v", id, err) - } - return nil } diff --git a/internal/services/mssqlmanagedinstance/mssql_managed_instance_transparent_data_encryption_resource_test.go b/internal/services/mssqlmanagedinstance/mssql_managed_instance_transparent_data_encryption_resource_test.go index 8bbef5aa55642..f06acf2475336 100644 --- a/internal/services/mssqlmanagedinstance/mssql_managed_instance_transparent_data_encryption_resource_test.go +++ b/internal/services/mssqlmanagedinstance/mssql_managed_instance_transparent_data_encryption_resource_test.go @@ -8,6 +8,8 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -109,16 +111,17 @@ func (MsSqlManagedInstanceTransparentDataEncryptionResource) Exists(ctx context. return nil, err } - resp, err := client.MSSQLManagedInstance.ManagedInstanceEncryptionProtectorClient.Get(ctx, id.ResourceGroup, id.ManagedInstanceName) + instanceId := commonids.NewSqlManagedInstanceID(id.SubscriptionId, id.ResourceGroup, id.ManagedInstanceName) + resp, err := client.MSSQLManagedInstance.ManagedInstanceEncryptionProtectorClient.Get(ctx, instanceId) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return nil, fmt.Errorf("Encryption protector for managed instance %q (Resource Group %q) does not exist", id.ManagedInstanceName, id.ResourceGroup) + if response.WasNotFound(resp.HttpResponse) { + return nil, fmt.Errorf("encryption protector for managed instance %q (Resource Group %q) does not exist", id.ManagedInstanceName, id.ResourceGroup) } return nil, fmt.Errorf("reading Encryption Protector for managed instance %q (Resource Group %q): %v", id.ManagedInstanceName, id.ResourceGroup, err) } - return utils.Bool(resp.ID != nil), nil + return utils.Bool(resp.Model != nil), nil } func (r MsSqlManagedInstanceTransparentDataEncryptionResource) keyVaultSystemAssignedIdentity(data acceptance.TestData) string { diff --git a/internal/services/mssqlmanagedinstance/mssql_managed_instance_vulnerability_assessment_resource.go b/internal/services/mssqlmanagedinstance/mssql_managed_instance_vulnerability_assessment_resource.go index eb7d0d5076db3..e06db353b92b6 100644 --- a/internal/services/mssqlmanagedinstance/mssql_managed_instance_vulnerability_assessment_resource.go +++ b/internal/services/mssqlmanagedinstance/mssql_managed_instance_vulnerability_assessment_resource.go @@ -8,7 +8,9 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssqlmanagedinstance/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssqlmanagedinstance/validate" @@ -104,23 +106,23 @@ func resourceMsSqlManagedInstanceVulnerabilityAssessmentCreate(d *pluginsdk.Reso ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d) defer cancel() - instanceId, err := parse.ManagedInstanceID(d.Get("managed_instance_id").(string)) + instanceId, err := commonids.ParseSqlManagedInstanceID(d.Get("managed_instance_id").(string)) if err != nil { return err } - id := parse.NewManagedInstanceVulnerabilityAssessmentID(instanceId.SubscriptionId, instanceId.ResourceGroup, instanceId.Name, "default") + id := parse.NewManagedInstanceVulnerabilityAssessmentID(instanceId.SubscriptionId, instanceId.ResourceGroupName, instanceId.ManagedInstanceName, "default") - vulnerabilityAssessment := sql.ManagedInstanceVulnerabilityAssessment{ - ManagedInstanceVulnerabilityAssessmentProperties: &sql.ManagedInstanceVulnerabilityAssessmentProperties{ - StorageContainerPath: utils.String(d.Get("storage_container_path").(string)), + vulnerabilityAssessment := managedinstancevulnerabilityassessments.ManagedInstanceVulnerabilityAssessment{ + Properties: &managedinstancevulnerabilityassessments.ManagedInstanceVulnerabilityAssessmentProperties{ + StorageContainerPath: d.Get("storage_container_path").(string), StorageAccountAccessKey: utils.String(d.Get("storage_account_access_key").(string)), StorageContainerSasKey: utils.String(d.Get("storage_container_sas_key").(string)), RecurringScans: expandRecurringScans(d), }, } - if _, err = client.CreateOrUpdate(ctx, id.ResourceGroup, id.ManagedInstanceName, vulnerabilityAssessment); err != nil { + if _, err = client.CreateOrUpdate(ctx, *instanceId, vulnerabilityAssessment); err != nil { return fmt.Errorf("updating %s: %v", id.ID(), err) } @@ -139,16 +141,18 @@ func resourceMsSqlManagedInstanceVulnerabilityAssessmentUpdate(d *pluginsdk.Reso return err } - vulnerabilityAssessment := sql.ManagedInstanceVulnerabilityAssessment{ - ManagedInstanceVulnerabilityAssessmentProperties: &sql.ManagedInstanceVulnerabilityAssessmentProperties{ - StorageContainerPath: utils.String(d.Get("storage_container_path").(string)), + instanceId := commonids.NewSqlManagedInstanceID(id.SubscriptionId, id.ResourceGroup, id.ManagedInstanceName) + + vulnerabilityAssessment := managedinstancevulnerabilityassessments.ManagedInstanceVulnerabilityAssessment{ + Properties: &managedinstancevulnerabilityassessments.ManagedInstanceVulnerabilityAssessmentProperties{ + StorageContainerPath: d.Get("storage_container_path").(string), StorageAccountAccessKey: utils.String(d.Get("storage_account_access_key").(string)), StorageContainerSasKey: utils.String(d.Get("storage_container_sas_key").(string)), RecurringScans: expandRecurringScans(d), }, } - if _, err = client.CreateOrUpdate(ctx, id.ResourceGroup, id.ManagedInstanceName, vulnerabilityAssessment); err != nil { + if _, err = client.CreateOrUpdate(ctx, instanceId, vulnerabilityAssessment); err != nil { return fmt.Errorf("updating %s: %v", id.ID(), err) } @@ -167,9 +171,12 @@ func resourceMsSqlManagedInstanceVulnerabilityAssessmentRead(d *pluginsdk.Resour return err } - result, err := client.Get(ctx, id.ResourceGroup, id.ManagedInstanceName) + instanceId := commonids.NewSqlManagedInstanceID(id.SubscriptionId, id.ResourceGroup, id.ManagedInstanceName) + d.Set("managed_instance_id", instanceId.ID()) + + result, err := client.Get(ctx, instanceId) if err != nil { - if utils.ResponseWasNotFound(result.Response) { + if response.WasNotFound(result.HttpResponse) { log.Printf("[WARN] %s not found", id.ID()) d.SetId("") return nil @@ -178,18 +185,17 @@ func resourceMsSqlManagedInstanceVulnerabilityAssessmentRead(d *pluginsdk.Resour return fmt.Errorf("making read request: %+v", err) } - if props := result.ManagedInstanceVulnerabilityAssessmentProperties; props != nil { - d.Set("storage_container_path", props.StorageContainerPath) + if result.Model != nil { + if props := result.Model.Properties; props != nil { + d.Set("storage_container_path", props.StorageContainerPath) - if props.RecurringScans != nil { - if err := d.Set("recurring_scans", flattenRecurringScans(props.RecurringScans)); err != nil { - return fmt.Errorf("setting `recurring_scans`: %+v", err) + if props.RecurringScans != nil { + if err := d.Set("recurring_scans", flattenRecurringScans(props.RecurringScans)); err != nil { + return fmt.Errorf("setting `recurring_scans`: %+v", err) + } } } } - - d.Set("managed_instance_id", parse.NewManagedInstanceID(id.SubscriptionId, id.ResourceGroup, id.ManagedInstanceName).ID()) - return nil } @@ -203,7 +209,9 @@ func resourceMsSqlManagedInstanceVulnerabilityAssessmentDelete(d *pluginsdk.Reso return err } - _, err = client.Delete(ctx, id.ResourceGroup, id.ManagedInstanceName) + instanceId := commonids.NewSqlManagedInstanceID(id.SubscriptionId, id.ResourceGroup, id.ManagedInstanceName) + + _, err = client.Delete(ctx, instanceId) if err != nil { return fmt.Errorf("deleting Managed Instance Vulnerability Assessment %s: %+v", id.ID(), err) } @@ -211,8 +219,8 @@ func resourceMsSqlManagedInstanceVulnerabilityAssessmentDelete(d *pluginsdk.Reso return nil } -func expandRecurringScans(d *pluginsdk.ResourceData) *sql.VulnerabilityAssessmentRecurringScansProperties { - props := sql.VulnerabilityAssessmentRecurringScansProperties{} +func expandRecurringScans(d *pluginsdk.ResourceData) *managedinstancevulnerabilityassessments.VulnerabilityAssessmentRecurringScansProperties { + props := managedinstancevulnerabilityassessments.VulnerabilityAssessmentRecurringScansProperties{} vs := d.Get("recurring_scans").([]interface{}) if len(vs) == 0 { @@ -240,7 +248,7 @@ func expandRecurringScans(d *pluginsdk.ResourceData) *sql.VulnerabilityAssessmen return &props } -func flattenRecurringScans(props *sql.VulnerabilityAssessmentRecurringScansProperties) []interface{} { +func flattenRecurringScans(props *managedinstancevulnerabilityassessments.VulnerabilityAssessmentRecurringScansProperties) []interface{} { result := make(map[string]interface{}) if enabled := props.IsEnabled; enabled != nil { diff --git a/internal/services/mssqlmanagedinstance/mssql_managed_instance_vulnerability_assessment_resource_test.go b/internal/services/mssqlmanagedinstance/mssql_managed_instance_vulnerability_assessment_resource_test.go index fc05a49584cb6..736da149d0793 100644 --- a/internal/services/mssqlmanagedinstance/mssql_managed_instance_vulnerability_assessment_resource_test.go +++ b/internal/services/mssqlmanagedinstance/mssql_managed_instance_vulnerability_assessment_resource_test.go @@ -8,6 +8,8 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -61,16 +63,18 @@ func (MsSqlManagedInstanceVulnerabilityAssessmentResource) Exists(ctx context.Co return nil, err } - resp, err := client.MSSQLManagedInstance.ManagedInstanceVulnerabilityAssessmentsClient.Get(ctx, id.ResourceGroup, id.ManagedInstanceName) + instanceId := commonids.NewSqlManagedInstanceID(id.SubscriptionId, id.ResourceGroup, id.ManagedInstanceName) + + resp, err := client.MSSQLManagedInstance.ManagedInstanceVulnerabilityAssessmentsClient.Get(ctx, instanceId) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { return nil, fmt.Errorf("%s does not exist", id.ID()) } return nil, fmt.Errorf("reading %s: %v", id.ID(), err) } - return utils.Bool(resp.ID != nil), nil + return utils.Bool(resp.Model != nil), nil } func (r MsSqlManagedInstanceVulnerabilityAssessmentResource) basic(data acceptance.TestData) string { diff --git a/internal/services/mssqlmanagedinstance/parse/managed_instance.go b/internal/services/mssqlmanagedinstance/parse/managed_instance.go index 278531ea2702a..a6d53194d13b5 100644 --- a/internal/services/mssqlmanagedinstance/parse/managed_instance.go +++ b/internal/services/mssqlmanagedinstance/parse/managed_instance.go @@ -70,3 +70,47 @@ func ManagedInstanceID(input string) (*ManagedInstanceId, error) { return &resourceId, nil } + +// ManagedInstanceIDInsensitively parses an ManagedInstance ID into an ManagedInstanceId struct, insensitively +// This should only be used to parse an ID for rewriting, the ManagedInstanceID +// method should be used instead for validation etc. +// +// Whilst this may seem strange, this enables Terraform have consistent casing +// which works around issues in Core, whilst handling broken API responses. +func ManagedInstanceIDInsensitively(input string) (*ManagedInstanceId, error) { + id, err := resourceids.ParseAzureResourceID(input) + if err != nil { + return nil, err + } + + resourceId := ManagedInstanceId{ + SubscriptionId: id.SubscriptionID, + ResourceGroup: id.ResourceGroup, + } + + if resourceId.SubscriptionId == "" { + return nil, fmt.Errorf("ID was missing the 'subscriptions' element") + } + + if resourceId.ResourceGroup == "" { + return nil, fmt.Errorf("ID was missing the 'resourceGroups' element") + } + + // find the correct casing for the 'managedInstances' segment + managedInstancesKey := "managedInstances" + for key := range id.Path { + if strings.EqualFold(key, managedInstancesKey) { + managedInstancesKey = key + break + } + } + if resourceId.Name, err = id.PopSegment(managedInstancesKey); err != nil { + return nil, err + } + + if err := id.ValidateNoEmptySegments(input); err != nil { + return nil, err + } + + return &resourceId, nil +} diff --git a/internal/services/mssqlmanagedinstance/parse/managed_instance_test.go b/internal/services/mssqlmanagedinstance/parse/managed_instance_test.go index cb66cfae72e71..ff0f442fdd578 100644 --- a/internal/services/mssqlmanagedinstance/parse/managed_instance_test.go +++ b/internal/services/mssqlmanagedinstance/parse/managed_instance_test.go @@ -113,3 +113,120 @@ func TestManagedInstanceID(t *testing.T) { } } } + +func TestManagedInstanceIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *ManagedInstanceId + }{ + + { + // empty + Input: "", + Error: true, + }, + + { + // missing SubscriptionId + Input: "/", + Error: true, + }, + + { + // missing value for SubscriptionId + Input: "/subscriptions/", + Error: true, + }, + + { + // missing ResourceGroup + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", + Error: true, + }, + + { + // missing value for ResourceGroup + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", + Error: true, + }, + + { + // missing Name + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/", + Error: true, + }, + + { + // missing value for Name + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/managedInstances/", + Error: true, + }, + + { + // valid + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/managedInstances/instance1", + Expected: &ManagedInstanceId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroup: "resGroup1", + Name: "instance1", + }, + }, + + { + // lower-cased segment names + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/managedinstances/instance1", + Expected: &ManagedInstanceId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroup: "resGroup1", + Name: "instance1", + }, + }, + + { + // upper-cased segment names + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/MANAGEDINSTANCES/instance1", + Expected: &ManagedInstanceId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroup: "resGroup1", + Name: "instance1", + }, + }, + + { + // mixed-cased segment names + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/MaNaGeDiNsTaNcEs/instance1", + Expected: &ManagedInstanceId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroup: "resGroup1", + Name: "instance1", + }, + }, + } + + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ManagedInstanceIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %s", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + if actual.ResourceGroup != v.Expected.ResourceGroup { + t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.ResourceGroup, actual.ResourceGroup) + } + if actual.Name != v.Expected.Name { + t.Fatalf("Expected %q but got %q for Name", v.Expected.Name, actual.Name) + } + } +} diff --git a/internal/services/mssqlmanagedinstance/resourceids.go b/internal/services/mssqlmanagedinstance/resourceids.go index 65cf4ba7582cf..65465eb92b910 100644 --- a/internal/services/mssqlmanagedinstance/resourceids.go +++ b/internal/services/mssqlmanagedinstance/resourceids.go @@ -4,7 +4,7 @@ package mssqlmanagedinstance //go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=ManagedDatabase -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/managedInstances/instance1/databases/database1 -//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=ManagedInstance -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/managedInstances/instance1 +//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=ManagedInstance -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/managedInstances/instance1 -rewrite=true //go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=ManagedInstanceAzureActiveDirectoryAdministrator -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/managedInstances/instance1/administrators/activeDirectory //go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=ManagedInstanceEncryptionProtector -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/instance1/encryptionProtector/current //go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=ManagedInstanceFailoverGroup -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/locations/Location/instanceFailoverGroups/failoverGroup1 diff --git a/internal/services/mysql/mysql_flexible_server_resource.go b/internal/services/mysql/mysql_flexible_server_resource.go index 33b2f2aadaa6d..9c54edc7ad02a 100644 --- a/internal/services/mysql/mysql_flexible_server_resource.go +++ b/internal/services/mysql/mysql_flexible_server_resource.go @@ -508,6 +508,7 @@ func resourceMysqlFlexibleServerRead(d *pluginsdk.ResourceData, meta interface{} d.Set("zone", props.AvailabilityZone) d.Set("version", string(pointer.From(props.Version))) d.Set("fqdn", props.FullyQualifiedDomainName) + d.Set("source_server_id", d.Get("source_server_id").(string)) if network := props.Network; network != nil { d.Set("public_network_access_enabled", *network.PublicNetworkAccess == servers.EnableStatusEnumEnabled) diff --git a/internal/services/netapp/netapp_pool_resource.go b/internal/services/netapp/netapp_pool_resource.go index fb661d2fd0d8a..ffff1d73292c0 100644 --- a/internal/services/netapp/netapp_pool_resource.go +++ b/internal/services/netapp/netapp_pool_resource.go @@ -77,7 +77,7 @@ func resourceNetAppPool() *pluginsdk.Resource { "size_in_tb": { Type: pluginsdk.TypeInt, Required: true, - ValidateFunc: validation.IntBetween(2, 2048), + ValidateFunc: validation.IntBetween(1, 2048), }, "qos_type": { diff --git a/internal/services/netapp/netapp_volume_resource.go b/internal/services/netapp/netapp_volume_resource.go index 4d3dad53e7e98..d77fceefae422 100644 --- a/internal/services/netapp/netapp_volume_resource.go +++ b/internal/services/netapp/netapp_volume_resource.go @@ -149,6 +149,13 @@ func resourceNetAppVolume() *pluginsdk.Resource { ForceNew: true, }, + "smb3_protocol_encryption_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Description: "SMB3 encryption option should be used only for SMB/DualProtocol volumes. Using it for any other workloads is not supported.", + ForceNew: true, + }, + "security_style": { Type: pluginsdk.TypeString, Optional: true, @@ -405,6 +412,7 @@ func resourceNetAppVolumeCreate(d *pluginsdk.ResourceData, meta interface{}) err subnetID := d.Get("subnet_id").(string) kerberosEnabled := d.Get("kerberos_enabled").(bool) smbContiuouslyAvailable := d.Get("smb_continuous_availability_enabled").(bool) + smbEncryption := d.Get("smb3_protocol_encryption_enabled").(bool) networkFeatures := volumes.NetworkFeatures(d.Get("network_features").(string)) smbNonBrowsable := volumes.SmbNonBrowsableDisabled @@ -533,6 +541,7 @@ func resourceNetAppVolumeCreate(d *pluginsdk.ResourceData, meta interface{}) err SubnetId: subnetID, KerberosEnabled: &kerberosEnabled, SmbContinuouslyAvailable: &smbContiuouslyAvailable, + SmbEncryption: &smbEncryption, NetworkFeatures: &networkFeatures, SmbNonBrowsable: &smbNonBrowsable, SmbAccessBasedEnumeration: &smbAccessBasedEnumeration, @@ -741,6 +750,7 @@ func resourceNetAppVolumeRead(d *pluginsdk.ResourceData, meta interface{}) error d.Set("subnet_id", props.SubnetId) d.Set("kerberos_enabled", props.KerberosEnabled) d.Set("smb_continuous_availability_enabled", props.SmbContinuouslyAvailable) + d.Set("smb3_protocol_encryption_enabled", props.SmbEncryption) d.Set("network_features", string(pointer.From(props.NetworkFeatures))) d.Set("protocols", props.ProtocolTypes) d.Set("security_style", string(pointer.From(props.SecurityStyle))) diff --git a/internal/services/netapp/netapp_volume_resource_test.go b/internal/services/netapp/netapp_volume_resource_test.go index 195da0a711cb8..67741b47f5122 100644 --- a/internal/services/netapp/netapp_volume_resource_test.go +++ b/internal/services/netapp/netapp_volume_resource_test.go @@ -35,6 +35,22 @@ func TestAccNetAppVolume_basic(t *testing.T) { }) } +func TestAccNetAppVolume_smbEncryption(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_netapp_volume", "test") + r := NetAppVolumeResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.smbEncryption(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("smb3_protocol_encryption_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + }) +} + func TestAccNetAppVolume_availabilityZone(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_netapp_volume", "test") r := NetAppVolumeResource{} @@ -507,6 +523,33 @@ resource "azurerm_netapp_volume" "test" { `, template, data.RandomInteger, data.RandomInteger) } +func (NetAppVolumeResource) smbEncryption(data acceptance.TestData) string { + template := NetAppVolumeResource{}.templateSmbEncryption(data) + return fmt.Sprintf(` +%s + +resource "azurerm_netapp_volume" "test" { + name = "acctest-NetAppVolume-smbencryption-%d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + account_name = azurerm_netapp_account.test.name + pool_name = azurerm_netapp_pool.test.name + volume_path = "my-unique-file-path-%d" + service_level = "Standard" + subnet_id = azurerm_subnet.test.id + storage_quota_in_gb = 100 + throughput_in_mibps = 1.562 + protocols = ["CIFS"] + smb3_protocol_encryption_enabled = true + + tags = { + "CreatedOnDate" = "2022-07-08T23:50:21Z", + "SkipASMAzSecPack" = "true" + } +} +`, template, data.RandomInteger, data.RandomInteger) +} + func (NetAppVolumeResource) availabilityZone(data acceptance.TestData) string { template := NetAppVolumeResource{}.template(data) return fmt.Sprintf(` @@ -1160,6 +1203,101 @@ resource "azurerm_netapp_pool" "test_secondary" { `, r.template(data), data.RandomInteger, "eastus2") } +func (NetAppVolumeResource) templateSmbEncryption(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + alias = "all1" + features { + resource_group { + prevent_deletion_if_contains_resources = false + } + } +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-netapp-%d" + location = "%s" + + tags = { + "CreatedOnDate" = "2022-07-08T23:50:21Z", + "SkipASMAzSecPack" = "true", + "SkipNRMSNSG" = "true" + } +} + +resource "azurerm_virtual_network" "test" { + name = "acctest-VirtualNetwork-%d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + address_space = ["10.6.0.0/16"] + + tags = { + "CreatedOnDate" = "2022-07-08T23:50:21Z", + "SkipASMAzSecPack" = "true" + } +} + +resource "azurerm_subnet" "test" { + name = "acctest-Subnet-%d" + resource_group_name = azurerm_resource_group.test.name + virtual_network_name = azurerm_virtual_network.test.name + address_prefixes = ["10.6.2.0/24"] + + delegation { + name = "testdelegation" + + service_delegation { + name = "Microsoft.Netapp/volumes" + actions = ["Microsoft.Network/networkinterfaces/*", "Microsoft.Network/virtualNetworks/subnets/join/action"] + } + } +} + +resource "azurerm_netapp_account" "test" { + name = "acctest-NetAppAccount-%d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + + active_directory { + username = "aduser" + password = "aduserpwd" + smb_server_name = "SMB-SERVER" + dns_servers = ["1.2.3.4", "1.2.3.5"] + domain = "westcentralus.com" + organizational_unit = "OU=FirstLevel" + site_name = "My-Site-Name" + kerberos_ad_name = "My-AD-Server" + kerberos_kdc_ip = "192.168.1.1" + aes_encryption_enabled = true + local_nfs_users_with_ldap_allowed = true + ldap_over_tls_enabled = true + server_root_ca_certificate = "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNZekNDQWN5Z0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRVUZBREF1TVFzd0NRWURWUVFHRXdKVlV6RU0gCk1Bb0dBMVVFQ2hNRFNVSk5NUkV3RHdZRFZRUUxFd2hNYjJOaGJDQkRRVEFlRncwNU9URXlNakl3TlRBd01EQmEgCkZ3MHdNREV5TWpNd05EVTVOVGxhTUM0eEN6QUpCZ05WQkFZVEFsVlRNUXd3Q2dZRFZRUUtFd05KUWsweEVUQVAgCkJnTlZCQXNUQ0V4dlkyRnNJRU5CTUlHZk1BMEdDU3FHU0liM0RRRUJBUVVBQTRHTkFEQ0JpUUtCZ1FEMmJaRW8gCjd4R2FYMi8wR0hrck5GWnZseEJvdTl2MUptdC9QRGlUTVB2ZThyOUZlSkFRMFFkdkZTVC8wSlBRWUQyMHJIMGIgCmltZERMZ05kTnlubXlSb1MyUy9JSW5mcG1mNjlpeWMyRzBUUHlSdm1ISWlPWmJkQ2QrWUJIUWkxYWRrajE3TkQgCmNXajZTMTR0VnVyRlg3M3p4MHNOb01TNzlxM3R1WEtyRHN4ZXV3SURBUUFCbzRHUU1JR05NRXNHQ1ZVZER3R0cgCitFSUJEUVErRXp4SFpXNWxjbUYwWldRZ1lua2dkR2hsSUZObFkzVnlaVmRoZVNCVFpXTjFjbWwwZVNCVFpYSjIgClpYSWdabTl5SUU5VEx6TTVNQ0FvVWtGRFJpa3dEZ1lEVlIwUEFRSC9CQVFEQWdBR01BOEdBMVVkRXdFQi93UUYgCk1BTUJBZjh3SFFZRFZSME9CQllFRkozK29jUnlDVEp3MDY3ZExTd3IvbmFseDZZTU1BMEdDU3FHU0liM0RRRUIgCkJRVUFBNEdCQU1hUXp0K3phajFHVTc3eXpscjhpaU1CWGdkUXJ3c1paV0pvNWV4bkF1Y0pBRVlRWm1PZnlMaU0gCkQ2b1lxK1puZnZNMG44Ry9ZNzlxOG5od3Z1eHBZT25SU0FYRnA2eFNrcklPZVp0Sk1ZMWgwMExLcC9KWDNOZzEgCnN2WjJhZ0UxMjZKSHNRMGJoek41VEtzWWZid2ZUd2ZqZFdBR3k2VmYxbllpL3JPK3J5TU8KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLSA=" + ldap_signing_enabled = true + } + + tags = { + "CreatedOnDate" = "2022-07-08T23:50:21Z", + "SkipASMAzSecPack" = "true" + } +} + +resource "azurerm_netapp_pool" "test" { + name = "acctest-NetAppPool-%d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + account_name = azurerm_netapp_account.test.name + service_level = "Standard" + size_in_tb = 4 + qos_type = "Manual" + + tags = { + "CreatedOnDate" = "2022-07-08T23:50:21Z", + "SkipASMAzSecPack" = "true" + } +} +`, data.RandomInteger, "westeurope", data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger) +} + func (NetAppVolumeResource) template(data acceptance.TestData) string { return fmt.Sprintf(` provider "azurerm" { diff --git a/internal/services/network/application_gateway_data_source.go b/internal/services/network/application_gateway_data_source.go index c95ad84ddd451..b61c61908dc76 100644 --- a/internal/services/network/application_gateway_data_source.go +++ b/internal/services/network/application_gateway_data_source.go @@ -14,8 +14,8 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/webapplicationfirewallpolicies" + "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/applicationgateways" + "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/webapplicationfirewallpolicies" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -1319,7 +1319,7 @@ func dataSourceApplicationGateway() *pluginsdk.Resource { } func dataSourceApplicationGatewayRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Network.ApplicationGatewaysClient + client := meta.(*clients.Client).Network.ApplicationGateways subscriptionId := meta.(*clients.Client).Account.SubscriptionId ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() diff --git a/internal/services/network/application_gateway_resource.go b/internal/services/network/application_gateway_resource.go index 293e89acd0773..2f31b168469a4 100644 --- a/internal/services/network/application_gateway_resource.go +++ b/internal/services/network/application_gateway_resource.go @@ -19,8 +19,8 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/webapplicationfirewallpolicies" + "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/applicationgateways" + "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/webapplicationfirewallpolicies" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" @@ -1546,7 +1546,7 @@ func resourceApplicationGateway() *pluginsdk.Resource { } func resourceApplicationGatewayCreate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Network.ApplicationGatewaysClient + client := meta.(*clients.Client).Network.ApplicationGateways subscriptionId := meta.(*clients.Client).Account.SubscriptionId ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d) defer cancel() @@ -1723,7 +1723,7 @@ func resourceApplicationGatewayCreate(d *pluginsdk.ResourceData, meta interface{ } func resourceApplicationGatewayUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Network.ApplicationGatewaysClient + client := meta.(*clients.Client).Network.ApplicationGateways ctx, cancel := timeouts.ForUpdate(meta.(*clients.Client).StopContext, d) defer cancel() @@ -1982,7 +1982,7 @@ func resourceApplicationGatewayUpdate(d *pluginsdk.ResourceData, meta interface{ } func resourceApplicationGatewayRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Network.ApplicationGatewaysClient + client := meta.(*clients.Client).Network.ApplicationGateways ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() @@ -2163,7 +2163,7 @@ func resourceApplicationGatewayRead(d *pluginsdk.ResourceData, meta interface{}) } func resourceApplicationGatewayDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Network.ApplicationGatewaysClient + client := meta.(*clients.Client).Network.ApplicationGateways ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() diff --git a/internal/services/network/application_gateway_resource_test.go b/internal/services/network/application_gateway_resource_test.go index d27ddd265eb11..0ee0de00fb249 100644 --- a/internal/services/network/application_gateway_resource_test.go +++ b/internal/services/network/application_gateway_resource_test.go @@ -14,7 +14,7 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways" + "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/applicationgateways" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -878,7 +878,7 @@ func TestAccApplicationGateway_sslPolicy_policyType_predefined(t *testing.T) { Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), check.That(data.ResourceName).Key("ssl_policy.0.policy_type").HasValue("Predefined"), - check.That(data.ResourceName).Key("ssl_policy.0.policy_name").HasValue("AppGwSslPolicy20170401S"), + check.That(data.ResourceName).Key("ssl_policy.0.policy_name").HasValue("AppGwSslPolicy20220101S"), ), }, }) @@ -1058,7 +1058,7 @@ func TestAccApplicationGateway_sslProfile(t *testing.T) { check.That(data.ResourceName).Key("ssl_profile.0.trusted_client_certificate_names.0").DoesNotExist(), check.That(data.ResourceName).Key("http_listener.0.ssl_profile_name").Exists(), check.That(data.ResourceName).Key("ssl_profile.0.ssl_policy.0.policy_type").HasValue("Predefined"), - check.That(data.ResourceName).Key("ssl_profile.0.ssl_policy.0.policy_name").HasValue("AppGwSslPolicy20150501"), + check.That(data.ResourceName).Key("ssl_profile.0.ssl_policy.0.policy_name").HasValue("AppGwSslPolicy20220101"), ), }, // since these are read from the existing state @@ -1074,7 +1074,7 @@ func TestAccApplicationGateway_sslProfile(t *testing.T) { check.That(data.ResourceName).Key("ssl_profile.0.trusted_client_certificate_names.0").DoesNotExist(), check.That(data.ResourceName).Key("http_listener.0.ssl_profile_name").Exists(), check.That(data.ResourceName).Key("ssl_profile.0.ssl_policy.0.policy_type").HasValue("Predefined"), - check.That(data.ResourceName).Key("ssl_profile.0.ssl_policy.0.policy_name").HasValue("AppGwSslPolicy20170401"), + check.That(data.ResourceName).Key("ssl_profile.0.ssl_policy.0.policy_name").HasValue("AppGwSslPolicy20220101S"), ), }, // since these are read from the existing state @@ -1098,7 +1098,7 @@ func TestAccApplicationGateway_sslProfileWithClientCertificateVerification(t *te check.That(data.ResourceName).Key("ssl_profile.0.trusted_client_certificate_names.0").Exists(), check.That(data.ResourceName).Key("http_listener.0.ssl_profile_name").Exists(), check.That(data.ResourceName).Key("ssl_profile.0.ssl_policy.0.policy_type").HasValue("Custom"), - check.That(data.ResourceName).Key("ssl_profile.0.ssl_policy.0.min_protocol_version").HasValue("TLSv1_1"), + check.That(data.ResourceName).Key("ssl_profile.0.ssl_policy.0.min_protocol_version").HasValue("TLSv1_2"), check.That(data.ResourceName).Key("ssl_profile.0.ssl_policy.0.cipher_suites.0").HasValue("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"), check.That(data.ResourceName).Key("ssl_profile.0.ssl_policy.0.cipher_suites.1").HasValue("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"), check.That(data.ResourceName).Key("ssl_profile.0.ssl_policy.0.cipher_suites.2").HasValue("TLS_RSA_WITH_AES_128_GCM_SHA256"), @@ -1326,7 +1326,7 @@ func (t ApplicationGatewayResource) Exists(ctx context.Context, clients *clients return nil, err } - resp, err := clients.Network.ApplicationGatewaysClient.Get(ctx, *id) + resp, err := clients.Network.ApplicationGateways.Get(ctx, *id) if err != nil { return nil, fmt.Errorf("retrieving %s: %+v", id, err) } @@ -5098,7 +5098,7 @@ func (ApplicationGatewayResource) changeCert(certificateName string) acceptance. return err } - agw, err := clients.Network.ApplicationGatewaysClient.Get(ctx, *id) + agw, err := clients.Network.ApplicationGateways.Get(ctx, *id) if err != nil { return fmt.Errorf("retrieving %s: %+v", id, err) } @@ -5129,7 +5129,7 @@ func (ApplicationGatewayResource) changeCert(certificateName string) acceptance. agw.Model.Properties.SslCertificates = &newSslCertificates - if err := clients.Network.ApplicationGatewaysClient.CreateOrUpdateThenPoll(ctx, *id, *agw.Model); err != nil { + if err := clients.Network.ApplicationGateways.CreateOrUpdateThenPoll(ctx, *id, *agw.Model); err != nil { return fmt.Errorf("updating %s: %+v", id, err) } @@ -5905,7 +5905,7 @@ resource "azurerm_application_gateway" "test" { } ssl_policy { - policy_name = "AppGwSslPolicy20170401S" + policy_name = "AppGwSslPolicy20220101S" policy_type = "Predefined" } @@ -7465,7 +7465,7 @@ resource "azurerm_application_gateway" "test" { name = local.ssl_profile_name ssl_policy { policy_type = "Predefined" - policy_name = "AppGwSslPolicy20150501" + policy_name = "AppGwSslPolicy20220101" } } @@ -7564,7 +7564,7 @@ resource "azurerm_application_gateway" "test" { verify_client_certificate_revocation = "OCSP" ssl_policy { policy_type = "Predefined" - policy_name = "AppGwSslPolicy20170401" + policy_name = "AppGwSslPolicy20220101S" } } @@ -7658,12 +7658,18 @@ resource "azurerm_application_gateway" "test" { priority = 10 } + ssl_policy { + policy_type = "Custom" + min_protocol_version = "TLSv1_2" + cipher_suites = ["TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "TLS_RSA_WITH_AES_128_GCM_SHA256"] + } + ssl_profile { name = local.ssl_profile_name trusted_client_certificate_names = [local.trusted_client_cert_name] ssl_policy { policy_type = "Custom" - min_protocol_version = "TLSv1_1" + min_protocol_version = "TLSv1_2" cipher_suites = ["TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "TLS_RSA_WITH_AES_128_GCM_SHA256"] } } @@ -7763,6 +7769,10 @@ resource "azurerm_application_gateway" "test" { priority = 10 } + ssl_policy { + disabled_protocols = ["TLSv1_0", "TLSv1_1"] + } + ssl_profile { name = local.ssl_profile_name trusted_client_certificate_names = [local.trusted_client_cert_name] diff --git a/internal/services/network/bastion_host_data_source.go b/internal/services/network/bastion_host_data_source.go index f2674329990f5..8ac92c934c56e 100644 --- a/internal/services/network/bastion_host_data_source.go +++ b/internal/services/network/bastion_host_data_source.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/bastionhosts" + "github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/validate" @@ -104,7 +104,7 @@ func dataSourceBastionHost() *pluginsdk.Resource { } func dataSourceBastionHostRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Network.BastionHosts + client := meta.(*clients.Client).Network.BastionHostsClient subscriptionId := meta.(*clients.Client).Account.SubscriptionId ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() diff --git a/internal/services/network/bastion_host_resource.go b/internal/services/network/bastion_host_resource.go index 1196e59c85ed1..aeb1158bde88e 100644 --- a/internal/services/network/bastion_host_resource.go +++ b/internal/services/network/bastion_host_resource.go @@ -15,7 +15,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/bastionhosts" + "github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/validate" @@ -168,7 +168,7 @@ func resourceBastionHost() *pluginsdk.Resource { } func resourceBastionHostCreate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Network.BastionHosts + client := meta.(*clients.Client).Network.BastionHostsClient subscriptionId := meta.(*clients.Client).Account.SubscriptionId ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d) defer cancel() @@ -278,7 +278,7 @@ func resourceBastionHostCreate(d *pluginsdk.ResourceData, meta interface{}) erro } func resourceBastionHostUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Network.BastionHosts + client := meta.(*clients.Client).Network.BastionHostsClient ctx, cancel := timeouts.ForUpdate(meta.(*clients.Client).StopContext, d) defer cancel() @@ -368,7 +368,7 @@ func resourceBastionHostUpdate(d *pluginsdk.ResourceData, meta interface{}) erro } func resourceBastionHostRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Network.BastionHosts + client := meta.(*clients.Client).Network.BastionHostsClient ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() @@ -436,7 +436,7 @@ func resourceBastionHostRead(d *pluginsdk.ResourceData, meta interface{}) error } func resourceBastionHostDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Network.BastionHosts + client := meta.(*clients.Client).Network.BastionHostsClient ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() diff --git a/internal/services/network/bastion_host_resource_test.go b/internal/services/network/bastion_host_resource_test.go index e5633634f3da8..d28cd3eccedfc 100644 --- a/internal/services/network/bastion_host_resource_test.go +++ b/internal/services/network/bastion_host_resource_test.go @@ -8,7 +8,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/bastionhosts" + "github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -144,7 +144,7 @@ func (BastionHostResource) Exists(ctx context.Context, clients *clients.Client, return nil, err } - resp, err := clients.Network.BastionHosts.Get(ctx, *id) + resp, err := clients.Network.BastionHostsClient.Get(ctx, *id) if err != nil { return nil, fmt.Errorf("reading Bastion Host (%s): %+v", *id, err) } diff --git a/internal/services/network/client/client.go b/internal/services/network/client/client.go index bc9b142853373..7544c886d824a 100644 --- a/internal/services/network/client/client.go +++ b/internal/services/network/client/client.go @@ -6,10 +6,10 @@ package client import ( "fmt" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways" "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/networkinterfaces" "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/vmsspublicipaddresses" network_2023_11_01 "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01" + "github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts" "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) @@ -17,19 +17,18 @@ import ( type Client struct { *network_2023_11_01.Client - // TODO 4.0 application gateways should be updated to use 2023-09-01 just prior to releasing 4.0 - ApplicationGatewaysClient *applicationgateways.ApplicationGatewaysClient + BastionHostsClient *bastionhosts.BastionHostsClient // VMSS Data Source requires the Network Interfaces and VMSSPublicIpAddresses client from `2023-09-01` for the `ListVirtualMachineScaleSetVMNetworkInterfacesComplete` method NetworkInterfacesClient *networkinterfaces.NetworkInterfacesClient VMSSPublicIPAddressesClient *vmsspublicipaddresses.VMSSPublicIPAddressesClient } func NewClient(o *common.ClientOptions) (*Client, error) { - ApplicationGatewaysClient, err := applicationgateways.NewApplicationGatewaysClientWithBaseURI(o.Environment.ResourceManager) + BastionHostsClient, err := bastionhosts.NewBastionHostsClientWithBaseURI(o.Environment.ResourceManager) if err != nil { - return nil, fmt.Errorf("building Application Gateways Client: %+v", err) + return nil, fmt.Errorf("building Bastion Client: %+v", err) } - o.Configure(ApplicationGatewaysClient.Client, o.Authorizers.ResourceManager) + o.Configure(BastionHostsClient.Client, o.Authorizers.ResourceManager) NetworkInterfacesClient, err := networkinterfaces.NewNetworkInterfacesClientWithBaseURI(o.Environment.ResourceManager) if err != nil { @@ -51,7 +50,7 @@ func NewClient(o *common.ClientOptions) (*Client, error) { } return &Client{ - ApplicationGatewaysClient: ApplicationGatewaysClient, + BastionHostsClient: BastionHostsClient, NetworkInterfacesClient: NetworkInterfacesClient, VMSSPublicIPAddressesClient: VMSSPublicIPAddressesClient, Client: client, diff --git a/internal/services/network/express_route_circuit_peering_resource_test.go b/internal/services/network/express_route_circuit_peering_resource_test.go index 535a1acce08e0..457933207f487 100644 --- a/internal/services/network/express_route_circuit_peering_resource_test.go +++ b/internal/services/network/express_route_circuit_peering_resource_test.go @@ -462,6 +462,7 @@ resource "azurerm_express_route_circuit_peering" "test" { microsoft_peering_config { advertised_public_prefixes = ["123.3.0.0/24"] + advertised_communities = ["12076:52005", "12076:52006"] } ipv6 { @@ -473,6 +474,7 @@ resource "azurerm_express_route_circuit_peering" "test" { advertised_public_prefixes = ["2002:db01::/126"] customer_asn = 64511 routing_registry_name = "ARIN" + advertised_communities = ["12076:52005", "12076:52006"] } } } @@ -626,6 +628,7 @@ resource "azurerm_express_route_circuit_peering" "test" { microsoft_peering_config { advertised_public_prefixes = ["123.1.0.0/24"] + advertised_communities = ["12076:52005", "12076:52006"] } } `, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger) diff --git a/internal/services/network/ip_group_cidr_resource.go b/internal/services/network/ip_group_cidr_resource.go index f24c187194ade..c7ef55af3b8d9 100644 --- a/internal/services/network/ip_group_cidr_resource.go +++ b/internal/services/network/ip_group_cidr_resource.go @@ -8,6 +8,7 @@ import ( "strings" "time" + "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/ipgroups" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" @@ -136,10 +137,11 @@ func resourceIpGroupCidrRead(d *pluginsdk.ResourceData, meta interface{}) error if resp.Model.Properties == nil { return fmt.Errorf("retrieving %s: `properties` was nil", ipGroupId) } - if !utils.SliceContainsValue(*resp.Model.Properties.IPAddresses, cidr) { - d.SetId("") - return nil - } + } + + if !utils.SliceContainsValue(pointer.From(resp.Model.Properties.IPAddresses), cidr) { + d.SetId("") + return nil } d.Set("ip_group_id", ipGroupId.ID()) diff --git a/internal/services/network/network_connection_monitor_resource_test.go b/internal/services/network/network_connection_monitor_resource_test.go index 5813de1cf1fa8..ef04a5de8591b 100644 --- a/internal/services/network/network_connection_monitor_resource_test.go +++ b/internal/services/network/network_connection_monitor_resource_test.go @@ -92,7 +92,8 @@ func testAccNetworkConnectionMonitor_addressUpdate(t *testing.T) { check.That(data.ResourceName).ExistsInAzure(r), ), }, - data.ImportStep(), + // todo investigate with framework + // data.ImportStep(), }) } @@ -143,7 +144,8 @@ func testAccNetworkConnectionMonitor_vmUpdate(t *testing.T) { check.That(data.ResourceName).ExistsInAzure(r), ), }, - data.ImportStep(), + // todo investigate with framework + // data.ImportStep(), }) } @@ -170,7 +172,8 @@ func testAccNetworkConnectionMonitor_destinationUpdate(t *testing.T) { check.That(data.ResourceName).ExistsInAzure(r), ), }, - data.ImportStep(), + // todo investigate with framework + // data.ImportStep(), }) } @@ -261,7 +264,8 @@ func testAccNetworkConnectionMonitor_updateEndpointIPAddressAndCoverageLevel(t * check.That(data.ResourceName).ExistsInAzure(r), ), }, - data.ImportStep(), + // todo investigate with framework + // data.ImportStep(), }) } diff --git a/internal/services/network/network_watcher_flow_log_resource_test.go b/internal/services/network/network_watcher_flow_log_resource_test.go index d43b44199444c..9c888ed32101a 100644 --- a/internal/services/network/network_watcher_flow_log_resource_test.go +++ b/internal/services/network/network_watcher_flow_log_resource_test.go @@ -276,10 +276,10 @@ resource "azurerm_storage_account" "test" { resource_group_name = azurerm_resource_group.test.name location = azurerm_resource_group.test.location - account_tier = "Standard" - account_kind = "StorageV2" - account_replication_type = "LRS" - enable_https_traffic_only = true + account_tier = "Standard" + account_kind = "StorageV2" + account_replication_type = "LRS" + https_traffic_only_enabled = true } `, data.RandomIntOfLength(10), data.Locations.Primary, data.RandomIntOfLength(10), data.RandomInteger, data.RandomInteger%1000000) } @@ -356,10 +356,10 @@ resource "azurerm_storage_account" "testb" { resource_group_name = azurerm_resource_group.test.name location = azurerm_resource_group.test.location - account_tier = "Standard" - account_kind = "StorageV2" - account_replication_type = "LRS" - enable_https_traffic_only = true + account_tier = "Standard" + account_kind = "StorageV2" + account_replication_type = "LRS" + https_traffic_only_enabled = true } resource "azurerm_network_watcher_flow_log" "test" { diff --git a/internal/services/network/registration.go b/internal/services/network/registration.go index 02205df6e24f1..e3b217bfb4e11 100644 --- a/internal/services/network/registration.go +++ b/internal/services/network/registration.go @@ -36,6 +36,7 @@ func (r Registration) DataSources() []sdk.DataSource { ManagerDataSource{}, ManagerNetworkGroupDataSource{}, ManagerConnectivityConfigurationDataSource{}, + VPNServerConfigurationDataSource{}, } } diff --git a/internal/services/network/subnet_resource.go b/internal/services/network/subnet_resource.go index c05b205ae6a45..2a0bc4698e815 100644 --- a/internal/services/network/subnet_resource.go +++ b/internal/services/network/subnet_resource.go @@ -59,6 +59,7 @@ var subnetDelegationServiceNames = []string{ "Microsoft.DBforPostgreSQL/singleServers", "Microsoft.DelegatedNetwork/controller", "Microsoft.DevCenter/networkConnection", + "Microsoft.DevOpsInfrastructure/pools", "Microsoft.DocumentDB/cassandraClusters", "Microsoft.Fidalgo/networkSettings", "Microsoft.HardwareSecurityModules/dedicatedHSMs", diff --git a/internal/services/network/virtual_machine_scale_set_packet_capture_resource.go b/internal/services/network/virtual_machine_scale_set_packet_capture_resource.go index 29b2d79e8d547..93624c815accc 100644 --- a/internal/services/network/virtual_machine_scale_set_packet_capture_resource.go +++ b/internal/services/network/virtual_machine_scale_set_packet_capture_resource.go @@ -157,9 +157,10 @@ func resourceVirtualMachineScaleSetPacketCapture() *pluginsdk.Resource { Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ "exclude_instance_ids": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"machine_scope.0.include_instance_ids"}, Elem: &pluginsdk.Schema{ Type: pluginsdk.TypeString, ValidateFunc: validation.StringIsNotEmpty, @@ -167,9 +168,10 @@ func resourceVirtualMachineScaleSetPacketCapture() *pluginsdk.Resource { }, "include_instance_ids": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"machine_scope.0.exclude_instance_ids"}, Elem: &pluginsdk.Schema{ Type: pluginsdk.TypeString, ValidateFunc: validation.StringIsNotEmpty, diff --git a/internal/services/network/virtual_machine_scale_set_packet_capture_resource_test.go b/internal/services/network/virtual_machine_scale_set_packet_capture_resource_test.go index ba6928048703e..5d484a1e9adb1 100644 --- a/internal/services/network/virtual_machine_scale_set_packet_capture_resource_test.go +++ b/internal/services/network/virtual_machine_scale_set_packet_capture_resource_test.go @@ -336,7 +336,6 @@ resource "azurerm_virtual_machine_scale_set_packet_capture" "test" { machine_scope { include_instance_ids = ["0", "1"] - exclude_instance_ids = ["2", "3"] } depends_on = [azurerm_virtual_machine_scale_set_extension.test] diff --git a/internal/services/network/virtual_network_dns_servers_resource.go b/internal/services/network/virtual_network_dns_servers_resource.go index 6bad0b3d8f2e0..ce64aa28e9363 100644 --- a/internal/services/network/virtual_network_dns_servers_resource.go +++ b/internal/services/network/virtual_network_dns_servers_resource.go @@ -72,6 +72,9 @@ func resourceVirtualNetworkDnsServersCreate(d *pluginsdk.ResourceData, meta inte // This is a virtual resource so the last segment is hardcoded id := parse.NewVirtualNetworkDnsServersID(vnetId.SubscriptionId, vnetId.ResourceGroupName, vnetId.VirtualNetworkName, "default") + locks.ByName(id.VirtualNetworkName, VirtualNetworkResourceName) + defer locks.UnlockByName(id.VirtualNetworkName, VirtualNetworkResourceName) + vnet, err := client.Get(ctx, *vnetId, virtualnetworks.DefaultGetOperationOptions()) if err != nil { if response.WasNotFound(vnet.HttpResponse) { @@ -80,9 +83,6 @@ func resourceVirtualNetworkDnsServersCreate(d *pluginsdk.ResourceData, meta inte return fmt.Errorf("retrieving %s: %+v", vnetId, err) } - locks.ByName(id.VirtualNetworkName, VirtualNetworkResourceName) - defer locks.UnlockByName(id.VirtualNetworkName, VirtualNetworkResourceName) - if vnet.Model == nil { return fmt.Errorf("retrieving %s: `model` was nil", vnetId) } @@ -164,6 +164,9 @@ func resourceVirtualNetworkDnsServersUpdate(d *pluginsdk.ResourceData, meta inte // This is a virtual resource so the last segment is hardcoded id := parse.NewVirtualNetworkDnsServersID(vnetId.SubscriptionId, vnetId.ResourceGroupName, vnetId.VirtualNetworkName, "default") + locks.ByName(id.VirtualNetworkName, VirtualNetworkResourceName) + defer locks.UnlockByName(id.VirtualNetworkName, VirtualNetworkResourceName) + vnet, err := client.Get(ctx, *vnetId, virtualnetworks.DefaultGetOperationOptions()) if err != nil { if response.WasNotFound(vnet.HttpResponse) { @@ -172,9 +175,6 @@ func resourceVirtualNetworkDnsServersUpdate(d *pluginsdk.ResourceData, meta inte return fmt.Errorf("retrieving %s: %+v", vnetId, err) } - locks.ByName(id.VirtualNetworkName, VirtualNetworkResourceName) - defer locks.UnlockByName(id.VirtualNetworkName, VirtualNetworkResourceName) - if vnet.Model == nil { return fmt.Errorf("retrieving %s: `model` was nil", vnetId) } @@ -221,6 +221,9 @@ func resourceVirtualNetworkDnsServersDelete(d *pluginsdk.ResourceData, meta inte return err } + locks.ByName(id.VirtualNetworkName, VirtualNetworkResourceName) + defer locks.UnlockByName(id.VirtualNetworkName, VirtualNetworkResourceName) + vnetId := commonids.NewVirtualNetworkID(id.SubscriptionId, id.ResourceGroup, id.VirtualNetworkName) vnet, err := client.Get(ctx, vnetId, virtualnetworks.DefaultGetOperationOptions()) @@ -232,9 +235,6 @@ func resourceVirtualNetworkDnsServersDelete(d *pluginsdk.ResourceData, meta inte return fmt.Errorf("retrieving %s: %+v", vnetId, err) } - locks.ByName(id.VirtualNetworkName, VirtualNetworkResourceName) - defer locks.UnlockByName(id.VirtualNetworkName, VirtualNetworkResourceName) - if vnet.Model == nil { return fmt.Errorf("retrieving %s: `model` was nil", vnetId) } diff --git a/internal/services/network/virtual_network_gateway_connection_resource.go b/internal/services/network/virtual_network_gateway_connection_resource.go index 803d967899e23..e9a9ceba86da0 100644 --- a/internal/services/network/virtual_network_gateway_connection_resource.go +++ b/internal/services/network/virtual_network_gateway_connection_resource.go @@ -334,7 +334,7 @@ func resourceVirtualNetworkGatewayConnection() *pluginsdk.Resource { Type: pluginsdk.TypeInt, Optional: true, Computed: true, - ValidateFunc: validation.IntAtLeast(1024), + ValidateFunc: validation.IntBetween(0, 2147483647), }, "sa_lifetime": { diff --git a/internal/services/network/virtual_network_gateway_connection_resource_test.go b/internal/services/network/virtual_network_gateway_connection_resource_test.go index 743782183e70d..a0def56c76af7 100644 --- a/internal/services/network/virtual_network_gateway_connection_resource_test.go +++ b/internal/services/network/virtual_network_gateway_connection_resource_test.go @@ -923,7 +923,6 @@ resource "azurerm_virtual_network_gateway_connection" "test" { ipsec_encryption = "AES256" ipsec_integrity = "SHA256" pfs_group = "PFS14" - sa_datasize = 102400000 sa_lifetime = 27000 } @@ -1009,7 +1008,7 @@ resource "azurerm_virtual_network_gateway_connection" "test" { ipsec_encryption = "AES256" ipsec_integrity = "SHA256" pfs_group = "PFS2048" - sa_datasize = 102400000 + sa_datasize = 0 sa_lifetime = 27000 } @@ -1182,7 +1181,7 @@ resource "azurerm_virtual_network_gateway_connection" "test" { ipsec_encryption = "AES256" ipsec_integrity = "SHA256" pfs_group = "PFS2048" - sa_datasize = 102400000 + sa_datasize = 0 sa_lifetime = 27000 } @@ -1275,7 +1274,7 @@ resource "azurerm_virtual_network_gateway_connection" "test" { ipsec_encryption = "AES256" ipsec_integrity = "SHA256" pfs_group = "PFS2048" - sa_datasize = 102400000 + sa_datasize = 0 sa_lifetime = 27000 } diff --git a/internal/services/network/vpn_server_configuration_data_source_resource.go b/internal/services/network/vpn_server_configuration_data_source_resource.go new file mode 100644 index 0000000000000..01eb177be82ed --- /dev/null +++ b/internal/services/network/vpn_server_configuration_data_source_resource.go @@ -0,0 +1,502 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package network + +import ( + "context" + "fmt" + "time" + + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/virtualwans" + "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" +) + +type VPNServerConfigurationDataSource struct{} + +var _ sdk.DataSource = VPNServerConfigurationDataSource{} + +type VPNServerConfigurationDataSourceModel struct { + Name string `tfschema:"name"` + ResourceGroup string `tfschema:"resource_group_name"` + Location string `tfschema:"location"` + VpnAuthenticationTypes []string `tfschema:"vpn_authentication_types"` + AzureActiveDirectoryAuthentication []AzureActiveDirectoryAuthenticationModel `tfschema:"azure_active_directory_authentication"` + ClientRevokedCertificate []ClientRevokedCertificateModel `tfschema:"client_revoked_certificate"` + ClientRootCertificate []ClientRootCertificateModel `tfschema:"client_root_certificate"` + IpsecPolicy []IpsecPolicyModel `tfschema:"ipsec_policy"` + Radius []RadiusModel `tfschema:"radius"` + VpnProtocols []string `tfschema:"vpn_protocols"` + Tags map[string]string `tfschema:"tags"` +} + +type AzureActiveDirectoryAuthenticationModel struct { + Audience string `tfschema:"audience"` + Issuer string `tfschema:"issuer"` + Tenant string `tfschema:"tenant"` +} + +type ClientRevokedCertificateModel struct { + Name string `tfschema:"name"` + Thumbprint string `tfschema:"thumbprint"` +} + +type ClientRootCertificateModel struct { + Name string `tfschema:"name"` + PublicCertData string `tfschema:"public_cert_data"` +} + +type IpsecPolicyModel struct { + DhGroup string `tfschema:"dh_group"` + IkeEncryption string `tfschema:"ike_encryption"` + IkeIntegrity string `tfschema:"ike_integrity"` + IpsecEncryption string `tfschema:"ipsec_encryption"` + IpsecIntegrity string `tfschema:"ipsec_integrity"` + PfsGroup string `tfschema:"pfs_group"` + SaLifetimeSeconds int64 `tfschema:"sa_lifetime_seconds"` + SaDataSizeKilobytes int64 `tfschema:"sa_data_size_kilobytes"` +} + +type RadiusModel struct { + Server []ServerModel `tfschema:"server"` + ClientRootCertificate []RadiusClientRootCertificateModel `tfschema:"client_root_certificate"` + ServerRootCertificate []ClientRootCertificateModel `tfschema:"server_root_certificate"` +} + +type ServerModel struct { + Address string `tfschema:"address"` + Secret string `tfschema:"secret"` + Score int64 `tfschema:"score"` +} + +type RadiusClientRootCertificateModel struct { + Name string `tfschema:"name"` + Thumbprint string `tfschema:"thumbprint"` +} + +func (d VPNServerConfigurationDataSource) Arguments() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), + } +} + +func (d VPNServerConfigurationDataSource) ModelObject() interface{} { + return &VPNServerConfigurationDataSource{} +} + +func (d VPNServerConfigurationDataSource) ResourceType() string { + return "azurerm_vpn_server_configuration" +} + +func (d VPNServerConfigurationDataSource) Attributes() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{ + "location": commonschema.LocationComputed(), + + "vpn_authentication_types": { + Type: pluginsdk.TypeList, + Computed: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + }, + }, + + "azure_active_directory_authentication": { + Type: pluginsdk.TypeList, + Computed: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "audience": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "issuer": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "tenant": { + Type: pluginsdk.TypeString, + Computed: true, + }, + }, + }, + }, + + "client_revoked_certificate": { + Type: pluginsdk.TypeSet, + Computed: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "thumbprint": { + Type: pluginsdk.TypeString, + Computed: true, + }, + }, + }, + }, + + "client_root_certificate": { + Type: pluginsdk.TypeSet, + Computed: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "public_cert_data": { + Type: pluginsdk.TypeString, + Computed: true, + }, + }, + }, + }, + + "ipsec_policy": { + Type: pluginsdk.TypeList, + Computed: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "dh_group": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "ike_encryption": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "ike_integrity": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "ipsec_encryption": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "ipsec_integrity": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "pfs_group": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "sa_lifetime_seconds": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + + "sa_data_size_kilobytes": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + }, + }, + }, + + "radius": { + Type: pluginsdk.TypeList, + Computed: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "server": { + Type: pluginsdk.TypeList, + Computed: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "address": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "secret": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "score": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + }, + }, + }, + + "client_root_certificate": { + Type: pluginsdk.TypeSet, + Computed: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "thumbprint": { + Type: pluginsdk.TypeString, + Computed: true, + }, + }, + }, + }, + + "server_root_certificate": { + Type: pluginsdk.TypeSet, + Computed: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "public_cert_data": { + Type: pluginsdk.TypeString, + Computed: true, + }, + }, + }, + }, + }, + }, + }, + + "vpn_protocols": { + Type: pluginsdk.TypeSet, + Computed: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + }, + }, + + "tags": commonschema.TagsDataSource(), + } +} + +func (d VPNServerConfigurationDataSource) Read() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 5 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.Network.VirtualWANs + subscriptionId := metadata.Client.Account.SubscriptionId + + var model VPNServerConfigurationDataSourceModel + if err := metadata.Decode(&model); err != nil { + return err + } + + id := virtualwans.NewVpnServerConfigurationID(subscriptionId, model.ResourceGroup, model.Name) + + resp, err := client.VpnServerConfigurationsGet(ctx, id) + if err != nil { + if response.WasNotFound(resp.HttpResponse) { + return fmt.Errorf("%s was not found", id) + } + + return fmt.Errorf("retrieving %s: %+v", id, err) + } + + m := VPNServerConfigurationDataSourceModel{ + Name: id.VpnServerConfigurationName, + ResourceGroup: id.ResourceGroupName, + } + + if model := resp.Model; model != nil { + m.Location = pointer.ToString(model.Location) + if tags := model.Tags; tags != nil { + m.Tags = pointer.ToMapOfStringStrings(tags) + } + + if props := resp.Model.Properties; props != nil { + m.AzureActiveDirectoryAuthentication = dataSourceFlattenVpnServerConfigurationAADAuthentication(props.AadAuthenticationParameters) + m.ClientRootCertificate = dataSourceFlattenVpnServerConfigurationClientRootCertificates(props.VpnClientRootCertificates) + m.ClientRevokedCertificate = dataSourceFlattenVpnServerConfigurationClientRevokedCertificates(props.VpnClientRevokedCertificates) + m.IpsecPolicy = dataSourceFlattenVpnServerConfigurationIPSecPolicies(props.VpnClientIPsecPolicies) + m.Radius = dataSourceFlattenVpnServerConfigurationRadius(props) + m.VpnAuthenticationTypes = dataSourceFlattenVpnServerConfigurationVpnAuthenticationTypes(props.VpnAuthenticationTypes) + m.VpnProtocols = dataSourceFlattenVpnServerConfigurationVPNProtocols(props.VpnProtocols) + } + } + + metadata.SetID(id) + + return metadata.Encode(&m) + }, + } +} + +func dataSourceFlattenVpnServerConfigurationAADAuthentication(input *virtualwans.AadAuthenticationParameters) []AzureActiveDirectoryAuthenticationModel { + if input == nil { + return []AzureActiveDirectoryAuthenticationModel{} + } + + return []AzureActiveDirectoryAuthenticationModel{ + { + Audience: pointer.ToString(input.AadAudience), + Issuer: pointer.ToString(input.AadIssuer), + Tenant: pointer.ToString(input.AadTenant), + }, + } +} + +func dataSourceFlattenVpnServerConfigurationClientRootCertificates(input *[]virtualwans.VpnServerConfigVpnClientRootCertificate) []ClientRootCertificateModel { + if input == nil { + return []ClientRootCertificateModel{} + } + + output := make([]ClientRootCertificateModel, 0) + + for _, v := range *input { + if v.Name == nil { + continue + } + output = append(output, ClientRootCertificateModel{ + Name: pointer.ToString(v.Name), + PublicCertData: pointer.ToString(v.PublicCertData), + }) + } + + return output +} + +func dataSourceFlattenVpnServerConfigurationClientRevokedCertificates(input *[]virtualwans.VpnServerConfigVpnClientRevokedCertificate) []ClientRevokedCertificateModel { + if input == nil { + return []ClientRevokedCertificateModel{} + } + + output := make([]ClientRevokedCertificateModel, 0) + for _, v := range *input { + if v.Name == nil { + continue + } + + output = append(output, ClientRevokedCertificateModel{ + Name: pointer.ToString(v.Name), + Thumbprint: pointer.ToString(v.Thumbprint), + }) + } + return output +} + +func dataSourceFlattenVpnServerConfigurationIPSecPolicies(input *[]virtualwans.IPsecPolicy) []IpsecPolicyModel { + if input == nil { + return []IpsecPolicyModel{} + } + + output := make([]IpsecPolicyModel, 0) + for _, v := range *input { + output = append(output, IpsecPolicyModel{ + DhGroup: string(v.DhGroup), + IkeEncryption: string(v.IPsecEncryption), + IkeIntegrity: string(v.IPsecIntegrity), + IpsecEncryption: string(v.IkeEncryption), + IpsecIntegrity: string(v.IkeIntegrity), + PfsGroup: string(v.PfsGroup), + SaLifetimeSeconds: v.SaDataSizeKilobytes, + SaDataSizeKilobytes: v.SaLifeTimeSeconds, + }) + } + return output +} + +func dataSourceFlattenVpnServerConfigurationRadius(input *virtualwans.VpnServerConfigurationProperties) []RadiusModel { + if input == nil || (input.RadiusServerAddress == nil && (input.RadiusServers == nil || len(*input.RadiusServers) == 0)) { + return []RadiusModel{} + } + + clientRootCertificates := make([]RadiusClientRootCertificateModel, 0) + if input.RadiusClientRootCertificates != nil { + for _, v := range *input.RadiusClientRootCertificates { + if v.Name == nil { + continue + } + clientRootCertificates = append(clientRootCertificates, RadiusClientRootCertificateModel{ + Name: pointer.ToString(v.Name), + Thumbprint: pointer.ToString(v.Thumbprint), + }) + } + } + + serverRootCertificates := make([]ClientRootCertificateModel, 0) + if input.RadiusServerRootCertificates != nil { + for _, v := range *input.RadiusServerRootCertificates { + if v.Name == nil { + continue + } + + serverRootCertificates = append(serverRootCertificates, ClientRootCertificateModel{ + Name: pointer.ToString(v.Name), + PublicCertData: pointer.ToString(v.PublicCertData), + }) + } + } + + servers := make([]ServerModel, 0) + if input.RadiusServers != nil && len(*input.RadiusServers) > 0 { + for _, v := range *input.RadiusServers { + servers = append(servers, ServerModel{ + Address: v.RadiusServerAddress, + Secret: pointer.ToString(v.RadiusServerSecret), + Score: pointer.ToInt64(v.RadiusServerScore), + }) + } + } + + return []RadiusModel{ + { + Server: servers, + ClientRootCertificate: clientRootCertificates, + ServerRootCertificate: serverRootCertificates, + }, + } +} + +func dataSourceFlattenVpnServerConfigurationVpnAuthenticationTypes(input *[]virtualwans.VpnAuthenticationType) []string { + if input == nil { + return []string{} + } + + output := make([]string, 0) + + for _, v := range *input { + output = append(output, string(v)) + } + + return output +} + +func dataSourceFlattenVpnServerConfigurationVPNProtocols(input *[]virtualwans.VpnGatewayTunnelingProtocol) []string { + if input == nil { + return []string{} + } + + output := make([]string, 0) + + for _, v := range *input { + output = append(output, string(v)) + } + + return output +} diff --git a/internal/services/network/vpn_server_configuration_data_source_resource_test.go b/internal/services/network/vpn_server_configuration_data_source_resource_test.go new file mode 100644 index 0000000000000..0204bb371d1bf --- /dev/null +++ b/internal/services/network/vpn_server_configuration_data_source_resource_test.go @@ -0,0 +1,280 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package network_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" +) + +type VPNServerConfigurationDataSource struct{} + +func TestAccVPNServerConfigurationDataSource_azureAD(t *testing.T) { + data := acceptance.BuildTestData(t, "data.azurerm_vpn_server_configuration", "test") + r := VPNServerConfigurationDataSource{} + + data.DataSourceTest(t, []acceptance.TestStep{ + { + Config: r.azureAD(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).Key("azure_active_directory_authentication.0.audience").HasValue("00000000-abcd-abcd-abcd-999999999999"), + check.That(data.ResourceName).Key("vpn_authentication_types.0").HasValue("AAD"), + check.That(data.ResourceName).Key("azure_active_directory_authentication.0.issuer").Exists(), + check.That(data.ResourceName).Key("azure_active_directory_authentication.0.tenant").Exists(), + ), + }, + }) +} + +func TestAccVPNServerConfigurationDataSource_certificate(t *testing.T) { + data := acceptance.BuildTestData(t, "data.azurerm_vpn_server_configuration", "test") + r := VPNServerConfigurationDataSource{} + + data.DataSourceTest(t, []acceptance.TestStep{ + { + Config: r.certificate(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).Key("client_root_certificate.0.name").HasValue("DigiCert-Federated-ID-Root-CA"), + check.That(data.ResourceName).Key("vpn_authentication_types.0").HasValue("Certificate"), + check.That(data.ResourceName).Key("client_root_certificate.0.public_cert_data").HasValue("MIIDuzCCAqOgAwIBAgIQCHTZWCM+IlfFIRXIvyKSrjANBgkqhkiG9w0BAQsFADBn\nMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\nd3cuZGlnaWNlcnQuY29tMSYwJAYDVQQDEx1EaWdpQ2VydCBGZWRlcmF0ZWQgSUQg\nUm9vdCBDQTAeFw0xMzAxMTUxMjAwMDBaFw0zMzAxMTUxMjAwMDBaMGcxCzAJBgNV\nBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdp\nY2VydC5jb20xJjAkBgNVBAMTHURpZ2lDZXJ0IEZlZGVyYXRlZCBJRCBSb290IENB\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvAEB4pcCqnNNOWE6Ur5j\nQPUH+1y1F9KdHTRSza6k5iDlXq1kGS1qAkuKtw9JsiNRrjltmFnzMZRBbX8Tlfl8\nzAhBmb6dDduDGED01kBsTkgywYPxXVTKec0WxYEEF0oMn4wSYNl0lt2eJAKHXjNf\nGTwiibdP8CUR2ghSM2sUTI8Nt1Omfc4SMHhGhYD64uJMbX98THQ/4LMGuYegou+d\nGTiahfHtjn7AboSEknwAMJHCh5RlYZZ6B1O4QbKJ+34Q0eKgnI3X6Vc9u0zf6DH8\nDk+4zQDYRRTqTnVO3VT8jzqDlCRuNtq6YvryOWN74/dq8LQhUnXHvFyrsdMaE1X2\nDwIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNV\nHQ4EFgQUGRdkFnbGt1EWjKwbUne+5OaZvRYwHwYDVR0jBBgwFoAUGRdkFnbGt1EW\njKwbUne+5OaZvRYwDQYJKoZIhvcNAQELBQADggEBAHcqsHkrjpESqfuVTRiptJfP\n9JbdtWqRTmOf6uJi2c8YVqI6XlKXsD8C1dUUaaHKLUJzvKiazibVuBwMIT84AyqR\nQELn3e0BtgEymEygMU569b01ZPxoFSnNXc7qDZBDef8WfqAV/sxkTi8L9BkmFYfL\nuGLOhRJOFprPdoDIUBB+tmCl3oDcBy3vnUeOEioz8zAkprcb3GHwHAK+vHmmfgcn\nWsfMLH4JCLa/tRYL+Rw/N3ybCkDp00s0WUZ+AoDywSl0Q/ZEnNY0MsFiw6LyIdbq\nM/s/1JRtO3bDSzD9TazRVzn2oBqzSa8VgIo5C1nOnoAKJTlsClJKvIhnRlaLQqk=\n"), + ), + }, + }) +} + +func TestAccVPNServerConfigurationDataSource_radius(t *testing.T) { + data := acceptance.BuildTestData(t, "data.azurerm_vpn_server_configuration", "test") + r := VPNServerConfigurationDataSource{} + + data.DataSourceTest(t, []acceptance.TestStep{ + { + Config: r.singleRadius(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).Key("vpn_authentication_types.0").HasValue("Radius"), + check.That(data.ResourceName).Key("radius.0.server.0.address").HasValue("10.105.1.1"), + check.That(data.ResourceName).Key("radius.0.server.0.secret").HasValue("vindicators-the-return-of-worldender"), + check.That(data.ResourceName).Key("radius.0.server.0.score").HasValue("15"), + check.That(data.ResourceName).Key("radius.0.server_root_certificate.0.name").HasValue("DigiCert-Federated-ID-Root-CA"), + check.That(data.ResourceName).Key("radius.0.server_root_certificate.0.public_cert_data").HasValue("MIIDuzCCAqOgAwIBAgIQCHTZWCM+IlfFIRXIvyKSrjANBgkqhkiG9w0BAQsFADBn\nMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\nd3cuZGlnaWNlcnQuY29tMSYwJAYDVQQDEx1EaWdpQ2VydCBGZWRlcmF0ZWQgSUQg\nUm9vdCBDQTAeFw0xMzAxMTUxMjAwMDBaFw0zMzAxMTUxMjAwMDBaMGcxCzAJBgNV\nBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdp\nY2VydC5jb20xJjAkBgNVBAMTHURpZ2lDZXJ0IEZlZGVyYXRlZCBJRCBSb290IENB\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvAEB4pcCqnNNOWE6Ur5j\nQPUH+1y1F9KdHTRSza6k5iDlXq1kGS1qAkuKtw9JsiNRrjltmFnzMZRBbX8Tlfl8\nzAhBmb6dDduDGED01kBsTkgywYPxXVTKec0WxYEEF0oMn4wSYNl0lt2eJAKHXjNf\nGTwiibdP8CUR2ghSM2sUTI8Nt1Omfc4SMHhGhYD64uJMbX98THQ/4LMGuYegou+d\nGTiahfHtjn7AboSEknwAMJHCh5RlYZZ6B1O4QbKJ+34Q0eKgnI3X6Vc9u0zf6DH8\nDk+4zQDYRRTqTnVO3VT8jzqDlCRuNtq6YvryOWN74/dq8LQhUnXHvFyrsdMaE1X2\nDwIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNV\nHQ4EFgQUGRdkFnbGt1EWjKwbUne+5OaZvRYwHwYDVR0jBBgwFoAUGRdkFnbGt1EW\njKwbUne+5OaZvRYwDQYJKoZIhvcNAQELBQADggEBAHcqsHkrjpESqfuVTRiptJfP\n9JbdtWqRTmOf6uJi2c8YVqI6XlKXsD8C1dUUaaHKLUJzvKiazibVuBwMIT84AyqR\nQELn3e0BtgEymEygMU569b01ZPxoFSnNXc7qDZBDef8WfqAV/sxkTi8L9BkmFYfL\nuGLOhRJOFprPdoDIUBB+tmCl3oDcBy3vnUeOEioz8zAkprcb3GHwHAK+vHmmfgcn\nWsfMLH4JCLa/tRYL+Rw/N3ybCkDp00s0WUZ+AoDywSl0Q/ZEnNY0MsFiw6LyIdbq\nM/s/1JRtO3bDSzD9TazRVzn2oBqzSa8VgIo5C1nOnoAKJTlsClJKvIhnRlaLQqk=\n"), + ), + }, + }) +} + +func TestAccVPNServerConfigurationDataSource_tags(t *testing.T) { + data := acceptance.BuildTestData(t, "data.azurerm_vpn_server_configuration", "test") + r := VPNServerConfigurationDataSource{} + + data.DataSourceTest(t, []acceptance.TestStep{ + { + Config: r.tags(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).Key("client_root_certificate.0.name").HasValue("DigiCert-Federated-ID-Root-CA"), + check.That(data.ResourceName).Key("vpn_authentication_types.0").HasValue("Certificate"), + check.That(data.ResourceName).Key("client_root_certificate.0.public_cert_data").HasValue("MIIDuzCCAqOgAwIBAgIQCHTZWCM+IlfFIRXIvyKSrjANBgkqhkiG9w0BAQsFADBn\nMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\nd3cuZGlnaWNlcnQuY29tMSYwJAYDVQQDEx1EaWdpQ2VydCBGZWRlcmF0ZWQgSUQg\nUm9vdCBDQTAeFw0xMzAxMTUxMjAwMDBaFw0zMzAxMTUxMjAwMDBaMGcxCzAJBgNV\nBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdp\nY2VydC5jb20xJjAkBgNVBAMTHURpZ2lDZXJ0IEZlZGVyYXRlZCBJRCBSb290IENB\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvAEB4pcCqnNNOWE6Ur5j\nQPUH+1y1F9KdHTRSza6k5iDlXq1kGS1qAkuKtw9JsiNRrjltmFnzMZRBbX8Tlfl8\nzAhBmb6dDduDGED01kBsTkgywYPxXVTKec0WxYEEF0oMn4wSYNl0lt2eJAKHXjNf\nGTwiibdP8CUR2ghSM2sUTI8Nt1Omfc4SMHhGhYD64uJMbX98THQ/4LMGuYegou+d\nGTiahfHtjn7AboSEknwAMJHCh5RlYZZ6B1O4QbKJ+34Q0eKgnI3X6Vc9u0zf6DH8\nDk+4zQDYRRTqTnVO3VT8jzqDlCRuNtq6YvryOWN74/dq8LQhUnXHvFyrsdMaE1X2\nDwIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNV\nHQ4EFgQUGRdkFnbGt1EWjKwbUne+5OaZvRYwHwYDVR0jBBgwFoAUGRdkFnbGt1EW\njKwbUne+5OaZvRYwDQYJKoZIhvcNAQELBQADggEBAHcqsHkrjpESqfuVTRiptJfP\n9JbdtWqRTmOf6uJi2c8YVqI6XlKXsD8C1dUUaaHKLUJzvKiazibVuBwMIT84AyqR\nQELn3e0BtgEymEygMU569b01ZPxoFSnNXc7qDZBDef8WfqAV/sxkTi8L9BkmFYfL\nuGLOhRJOFprPdoDIUBB+tmCl3oDcBy3vnUeOEioz8zAkprcb3GHwHAK+vHmmfgcn\nWsfMLH4JCLa/tRYL+Rw/N3ybCkDp00s0WUZ+AoDywSl0Q/ZEnNY0MsFiw6LyIdbq\nM/s/1JRtO3bDSzD9TazRVzn2oBqzSa8VgIo5C1nOnoAKJTlsClJKvIhnRlaLQqk=\n"), + check.That(data.ResourceName).Key("tags.%").HasValue("1"), + check.That(data.ResourceName).Key("tags.Hello").HasValue("World"), + ), + }, + }) +} + +func (r VPNServerConfigurationDataSource) azureAD(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +data "azurerm_subscription" "current" {} + +resource "azurerm_vpn_server_configuration" "test" { + name = "acctestVPNSC-%d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + vpn_authentication_types = ["AAD"] + + azure_active_directory_authentication { + audience = "00000000-abcd-abcd-abcd-999999999999" + issuer = "https://sts.windows.net/${data.azurerm_subscription.current.tenant_id}/" + tenant = "https://login.microsoftonline.com/${data.azurerm_subscription.current.tenant_id}" + } +} + +data "azurerm_vpn_server_configuration" "test" { + name = azurerm_vpn_server_configuration.test.name + resource_group_name = azurerm_resource_group.test.name +} +`, r.template(data), data.RandomInteger) +} + +func (r VPNServerConfigurationDataSource) certificate(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +resource "azurerm_vpn_server_configuration" "test" { + name = "acctestVPNSC-%d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + vpn_authentication_types = ["Certificate"] + + client_root_certificate { + name = "DigiCert-Federated-ID-Root-CA" + public_cert_data = < 0 { - for key, output := range outsVal { - log.Printf("[DEBUG] Processing deployment output %s", key) - outputMap := output.(map[string]interface{}) - outputValue, ok := outputMap["value"] - if !ok { - log.Printf("[DEBUG] No value - skipping") - continue - } - outputType, ok := outputMap["type"] - if !ok { - log.Printf("[DEBUG] No type - skipping") - continue - } - - var outputValueString string - switch strings.ToLower(outputType.(string)) { - case "bool": - outputValueString = strconv.FormatBool(outputValue.(bool)) - - case "string": - outputValueString = outputValue.(string) - - case "int": - outputValueString = fmt.Sprint(outputValue) - - default: - log.Printf("[WARN] Ignoring output %s: Outputs of type %s are not currently supported in azurerm_template_deployment.", - key, outputType) - continue - } - outputs[key] = outputValueString - } - } - } - d.Set("outputs", outputs) - } - - return nil -} - -func resourceTemplateDeploymentDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Resource.DeploymentsClient - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := parse.ResourceGroupTemplateDeploymentID(d.Id()) - if err != nil { - return err - } - future, err := client.Delete(ctx, id.ResourceGroup, id.DeploymentName) - if err != nil { - return fmt.Errorf("deleting %s: %+v", id, err) - } - if err := future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for deletion of %q: %+v", id, err) - } - - if err := waitForTemplateDeploymentToBeDeleted(ctx, client, *id); err != nil { - return fmt.Errorf("waiting for deletion of %s: %+v", id, err) - } - - return nil -} - -// TODO: move this out into the new `helpers` structure -func expandParametersBody(body string) (map[string]interface{}, error) { - var parametersBody map[string]interface{} - if err := json.Unmarshal([]byte(body), ¶metersBody); err != nil { - return nil, fmt.Errorf("Expanding the parameters_body for Azure RM Template Deployment") - } - return parametersBody, nil -} - -func expandTemplateBody(template string) (map[string]interface{}, error) { - var templateBody map[string]interface{} - if err := json.Unmarshal([]byte(template), &templateBody); err != nil { - return nil, fmt.Errorf("Expanding the template_body for Azure RM Template Deployment") - } - return templateBody, nil -} - -func waitForTemplateDeploymentToBeDeleted(ctx context.Context, client *resources.DeploymentsClient, id parse.ResourceGroupTemplateDeploymentId) error { - // we can't use the Waiter here since the API returns a 200 once it's deleted which is considered a polling status code.. - deadline, ok := ctx.Deadline() - if !ok { - return fmt.Errorf("internal-error: context had no deadline") - } - - log.Printf("[DEBUG] Waiting for %s to be deleted", id) - stateConf := &pluginsdk.StateChangeConf{ - Pending: []string{"200"}, - Target: []string{"404"}, - Refresh: templateDeploymentStateStatusCodeRefreshFunc(ctx, client, id), - Timeout: time.Until(deadline), - } - if _, err := stateConf.WaitForStateContext(ctx); err != nil { - return fmt.Errorf("waiting for %s to be deleted: %+v", id, err) - } - - return nil -} - -func templateDeploymentStateStatusCodeRefreshFunc(ctx context.Context, client *resources.DeploymentsClient, id parse.ResourceGroupTemplateDeploymentId) pluginsdk.StateRefreshFunc { - return func() (interface{}, string, error) { - res, err := client.Get(ctx, id.ResourceGroup, id.DeploymentName) - - log.Printf("Retrieving %s returned Status %d", id, res.StatusCode) - - if err != nil { - if utils.ResponseWasNotFound(res.Response) { - return res, strconv.Itoa(res.StatusCode), nil - } - return nil, "", fmt.Errorf("polling for the status of %s: %+v", id, err) - } - - return res, strconv.Itoa(res.StatusCode), nil - } -} diff --git a/internal/services/resource/template_deployment_resource_test.go b/internal/services/resource/template_deployment_resource_test.go deleted file mode 100644 index 15f7ad0a39673..0000000000000 --- a/internal/services/resource/template_deployment_resource_test.go +++ /dev/null @@ -1,922 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package resource_test - -import ( - "context" - "fmt" - "log" - "regexp" - "strconv" - "testing" - "time" - - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type TemplateDeploymentResource struct{} - -func TestAccTemplateDeployment_basic(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The resource 'azurerm_template_deployment' has been superseded by the 'azurerm_resource_group_template_deployment' resource and will be removed in v4.0 of the AzureRM Provider.") - } - - data := acceptance.BuildTestData(t, "azurerm_template_deployment", "test") - r := TemplateDeploymentResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basicMultiple(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - }) -} - -func TestAccTemplateDeployment_requiresImport(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The resource 'azurerm_template_deployment' has been superseded by the 'azurerm_resource_group_template_deployment' resource and will be removed in v4.0 of the AzureRM Provider.") - } - - data := acceptance.BuildTestData(t, "azurerm_template_deployment", "test") - r := TemplateDeploymentResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basicMultiple(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func TestAccTemplateDeployment_disappears(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The resource 'azurerm_template_deployment' has been superseded by the 'azurerm_resource_group_template_deployment' resource and will be removed in v4.0 of the AzureRM Provider.") - } - - data := acceptance.BuildTestData(t, "azurerm_template_deployment", "test") - r := TemplateDeploymentResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - data.DisappearsStep(acceptance.DisappearsStepData{ - Config: r.basicSingle, - TestResource: r, - }), - }) -} - -func TestAccTemplateDeployment_nestedTemplate(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The resource 'azurerm_template_deployment' has been superseded by the 'azurerm_resource_group_template_deployment' resource and will be removed in v4.0 of the AzureRM Provider.") - } - - data := acceptance.BuildTestData(t, "azurerm_template_deployment", "test") - r := TemplateDeploymentResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.nestedTemplate(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - }) -} - -func TestAccTemplateDeployment_withParams(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The resource 'azurerm_template_deployment' has been superseded by the 'azurerm_resource_group_template_deployment' resource and will be removed in v4.0 of the AzureRM Provider.") - } - - data := acceptance.BuildTestData(t, "azurerm_template_deployment", "test") - r := TemplateDeploymentResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.withParams(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - acceptance.TestCheckResourceAttr("azurerm_template_deployment.test", "outputs.testOutput", "Output Value"), - ), - }, - }) -} - -func TestAccTemplateDeployment_withParamsBody(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The resource 'azurerm_template_deployment' has been superseded by the 'azurerm_resource_group_template_deployment' resource and will be removed in v4.0 of the AzureRM Provider.") - } - - data := acceptance.BuildTestData(t, "azurerm_template_deployment", "test") - r := TemplateDeploymentResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.withParamsBody(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - acceptance.TestCheckResourceAttr("azurerm_template_deployment.test", "outputs.testOutput", "Output Value"), - ), - }, - }) -} - -func TestAccTemplateDeployment_withOutputs(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The resource 'azurerm_template_deployment' has been superseded by the 'azurerm_resource_group_template_deployment' resource and will be removed in v4.0 of the AzureRM Provider.") - } - - data := acceptance.BuildTestData(t, "azurerm_template_deployment", "test") - r := TemplateDeploymentResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.withOutputs(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - acceptance.TestCheckOutput("tfIntOutput", "-123"), - acceptance.TestCheckOutput("tfStringOutput", "Standard_GRS"), - - // these values *should* be 'true' and 'false' but, - // due to a bug in the way terraform represents bools at various times these are for now 0 and 1 - // see https://github.com/hashicorp/terraform/issues/13512#issuecomment-295389523 - // at a later date these may return the expected 'true' / 'false' and should be changed back - acceptance.TestCheckOutput("tfFalseOutput", "false"), - acceptance.TestCheckOutput("tfTrueOutput", "true"), - check.That(data.ResourceName).Key("outputs.stringOutput").HasValue("Standard_GRS"), - ), - }, - }) -} - -func TestAccTemplateDeployment_withError(t *testing.T) { - if features.FourPointOhBeta() { - t.Skip("The resource 'azurerm_template_deployment' has been superseded by the 'azurerm_resource_group_template_deployment' resource and will be removed in v4.0 of the AzureRM Provider.") - } - - data := acceptance.BuildTestData(t, "azurerm_template_deployment", "test") - r := TemplateDeploymentResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.withError(data), - ExpectError: regexp.MustCompile("Error: waiting for creation/update of Resource Group Template Deployment"), - }, - }) -} - -func (t TemplateDeploymentResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := azure.ParseAzureResourceID(state.ID) - if err != nil { - return nil, err - } - - name := id.Path["deployments"] - if name == "" { - name = id.Path["Deployments"] - } - - resp, err := clients.Resource.DeploymentsClient.Get(ctx, id.ResourceGroup, name) - if err != nil { - return nil, fmt.Errorf("reading Template Deployment (%s): %+v", id, err) - } - - return utils.Bool(resp.ID != nil), nil -} - -func (r TemplateDeploymentResource) Destroy(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - client := clients.Resource.DeploymentsClient - - id, err := azure.ParseAzureResourceID(state.ID) - if err != nil { - return nil, err - } - - name := id.Path["deployments"] - if name == "" { - name = id.Path["Deployments"] - } - - if _, err = client.Delete(ctx, id.ResourceGroup, name); err != nil { - return nil, fmt.Errorf("deleting template deployment %q: %+v", id, err) - } - - // we can't use the Waiter here since the API returns a 200 once it's deleted which is considered a polling status code.. - log.Printf("[DEBUG] Waiting for Template Deployment (%q in Resource Group %q) to be deleted", name, id.ResourceGroup) - stateConf := &acceptance.StateChangeConf{ - Pending: []string{"200"}, - Target: []string{"404"}, - Timeout: 40 * time.Minute, - Refresh: func() (interface{}, string, error) { - res, err := client.Get(ctx, id.ResourceGroup, name) - - log.Printf("retrieving Template Deployment %q: %d", id, res.StatusCode) - - if err != nil { - if utils.ResponseWasNotFound(res.Response) { - return res, strconv.Itoa(res.StatusCode), nil - } - return nil, "", fmt.Errorf("polling for the status of the Template Deployment %q: %+v", id, err) - } - - return res, strconv.Itoa(res.StatusCode), nil - }, - } - - if _, err := stateConf.WaitForStateContext(ctx); err != nil { - return nil, fmt.Errorf("waiting for Template Deployment %q to be deleted: %+v", id, err) - } - - return utils.Bool(true), nil -} - -func (TemplateDeploymentResource) basicSingle(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features { - resource_group { - prevent_deletion_if_contains_resources = false - } - } -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_template_deployment" "test" { - name = "acctesttemplate-%d" - resource_group_name = azurerm_resource_group.test.name - - template_body = < 0 { - t := tl[0].(map[string]interface{}) - - state := strings.ToLower(t["state"].(string)) - _, hasStorageEndpoint := t["storage_endpoint"] - _, hasStorageAccountAccessKey := t["storage_account_access_key"] - if state == "enabled" && !hasStorageEndpoint && !hasStorageAccountAccessKey { - return fmt.Errorf("`storage_endpoint` and `storage_account_access_key` are required when `state` is `Enabled`") - } - } - } - - return nil - }), - } -} - -func resourceSqlDatabaseCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.DatabasesClient - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - threatClient := meta.(*clients.Client).Sql.DatabaseThreatDetectionPoliciesClient - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := parse.NewDatabaseID(subscriptionId, d.Get("resource_group_name").(string), d.Get("server_name").(string), d.Get("name").(string)) - if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.Name, "") - if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { - return fmt.Errorf("checking for presence of existing %s: %+v", id, err) - } - } - - if !utils.ResponseWasNotFound(existing.Response) { - return tf.ImportAsExistsError("azurerm_sql_database", id.ID()) - } - } - - createMode := sql.CreateMode(d.Get("create_mode").(string)) - - location := azure.NormalizeLocation(d.Get("location").(string)) - t := d.Get("tags").(map[string]interface{}) - - properties := sql.Database{ - Location: utils.String(location), - DatabaseProperties: &sql.DatabaseProperties{ - CreateMode: createMode, - ZoneRedundant: utils.Bool(d.Get("zone_redundant").(bool)), - }, - Tags: tags.Expand(t), - } - - if v, ok := d.GetOk("source_database_id"); ok { - sourceDatabaseID := v.(string) - properties.DatabaseProperties.SourceDatabaseID = utils.String(sourceDatabaseID) - } - - if v, ok := d.GetOk("edition"); ok { - edition := v.(string) - properties.DatabaseProperties.Edition = sql.DatabaseEdition(edition) - } - - if v, ok := d.GetOk("collation"); ok { - collation := v.(string) - properties.DatabaseProperties.Collation = utils.String(collation) - } - - if v, ok := d.GetOk("max_size_bytes"); ok { - maxSizeBytes := v.(string) - properties.DatabaseProperties.MaxSizeBytes = utils.String(maxSizeBytes) - } - - if v, ok := d.GetOk("source_database_deletion_date"); ok { - sourceDatabaseDeletionString := v.(string) - sourceDatabaseDeletionDate, err2 := date.ParseTime(time.RFC3339, sourceDatabaseDeletionString) - if err2 != nil { - return fmt.Errorf("`source_database_deletion_date` wasn't a valid RFC3339 date %q: %+v", sourceDatabaseDeletionString, err2) - } - - properties.DatabaseProperties.SourceDatabaseDeletionDate = &date.Time{ - Time: sourceDatabaseDeletionDate, - } - } - - if v, ok := d.GetOk("requested_service_objective_id"); ok { - requestedServiceObjectiveID := v.(string) - id, err2 := uuid.FromString(requestedServiceObjectiveID) - if err2 != nil { - return fmt.Errorf("`requested_service_objective_id` wasn't a valid UUID %q: %+v", requestedServiceObjectiveID, err2) - } - properties.DatabaseProperties.RequestedServiceObjectiveID = &id - } - - if v, ok := d.GetOk("elastic_pool_name"); ok { - elasticPoolName := v.(string) - properties.DatabaseProperties.ElasticPoolName = utils.String(elasticPoolName) - } - - if v, ok := d.GetOk("requested_service_objective_name"); ok { - requestedServiceObjectiveName := v.(string) - properties.DatabaseProperties.RequestedServiceObjectiveName = sql.ServiceObjectiveName(requestedServiceObjectiveName) - } - - if v, ok := d.GetOk("restore_point_in_time"); ok { - restorePointInTime := v.(string) - restorePointInTimeDate, err2 := date.ParseTime(time.RFC3339, restorePointInTime) - if err2 != nil { - return fmt.Errorf("`restore_point_in_time` wasn't a valid RFC3339 date %q: %+v", restorePointInTime, err2) - } - - properties.DatabaseProperties.RestorePointInTime = &date.Time{ - Time: restorePointInTimeDate, - } - } - - readScale := d.Get("read_scale").(bool) - if readScale { - properties.DatabaseProperties.ReadScale = sql.ReadScaleEnabled - } else { - properties.DatabaseProperties.ReadScale = sql.ReadScaleDisabled - } - - // The requested Service Objective Name does not match the requested Service Objective Id. - if d.HasChange("requested_service_objective_name") && !d.HasChange("requested_service_objective_id") { - properties.DatabaseProperties.RequestedServiceObjectiveID = nil - } - - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ServerName, id.Name, properties) - if err != nil { - return fmt.Errorf("creating/updating %s: %+v", id, err) - } - - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for create/update of %s: %+v", id, err) - } - - if _, ok := d.GetOk("import"); ok { - if createMode != sql.CreateModeDefault { - return fmt.Errorf("import can only be used when create_mode is Default") - } - importParameters := expandAzureRmSqlDatabaseImport(d) - importFuture, err := client.CreateImportOperation(ctx, id.ResourceGroup, id.ServerName, id.Name, importParameters) - if err != nil { - return err - } - - if err = importFuture.WaitForCompletionRef(ctx, client.Client); err != nil { - return err - } - } - - d.SetId(id.ID()) - if _, err = threatClient.CreateOrUpdate(ctx, id.ResourceGroup, id.ServerName, id.Name, *expandArmSqlServerThreatDetectionPolicy(d, location)); err != nil { - return fmt.Errorf("setting database threat detection policy: %+v", err) - } - - return resourceSqlDatabaseRead(d, meta) -} - -func resourceSqlDatabaseRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.DatabasesClient - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := parse.DatabaseID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.Name, "") - if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - log.Printf("[INFO] %s was not found - removing from state", *id) - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - threatClient := meta.(*clients.Client).Sql.DatabaseThreatDetectionPoliciesClient - threat, err := threatClient.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) - if err == nil { - if err := d.Set("threat_detection_policy", flattenArmSqlServerThreatDetectionPolicy(d, threat)); err != nil { - return fmt.Errorf("setting `threat_detection_policy`: %+v", err) - } - } - - d.Set("name", id.Name) - d.Set("resource_group_name", id.ResourceGroup) - if location := resp.Location; location != nil { - d.Set("location", azure.NormalizeLocation(*location)) - } - - d.Set("server_name", id.ServerName) - - if props := resp.DatabaseProperties; props != nil { - // TODO: set `create_mode` & `source_database_id` once this issue is fixed: - // https://github.com/Azure/azure-rest-api-specs/issues/1604 - - d.Set("collation", props.Collation) - d.Set("default_secondary_location", props.DefaultSecondaryLocation) - d.Set("edition", string(props.Edition)) - d.Set("elastic_pool_name", props.ElasticPoolName) - d.Set("max_size_bytes", props.MaxSizeBytes) - d.Set("requested_service_objective_name", string(props.RequestedServiceObjectiveName)) - - if cd := props.CreationDate; cd != nil { - d.Set("creation_date", cd.String()) - } - - if rsoid := props.RequestedServiceObjectiveID; rsoid != nil { - d.Set("requested_service_objective_id", rsoid.String()) - } - - if rpit := props.RestorePointInTime; rpit != nil { - d.Set("restore_point_in_time", rpit.String()) - } - - if sddd := props.SourceDatabaseDeletionDate; sddd != nil { - d.Set("source_database_deletion_date", sddd.String()) - } - - d.Set("encryption", flattenEncryptionStatus(props.TransparentDataEncryption)) - d.Set("read_scale", props.ReadScale == sql.ReadScaleEnabled) - d.Set("zone_redundant", props.ZoneRedundant) - } - - return tags.FlattenAndSet(d, resp.Tags) -} - -func resourceSqlDatabaseDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.DatabasesClient - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := parse.DatabaseID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Delete(ctx, id.ResourceGroup, id.ServerName, id.Name) - if err != nil { - if utils.ResponseWasNotFound(resp) { - return nil - } - - return fmt.Errorf("deleting SQL Database: %+v", err) - } - - return nil -} - -func flattenEncryptionStatus(encryption *[]sql.TransparentDataEncryption) string { - if encryption != nil { - encrypted := *encryption - if len(encrypted) > 0 { - if props := encrypted[0].TransparentDataEncryptionProperties; props != nil { - return string(props.Status) - } - } - } - - return "" -} - -func flattenArmSqlServerThreatDetectionPolicy(d *pluginsdk.ResourceData, policy sql.DatabaseSecurityAlertPolicy) []interface{} { - // The SQL database threat detection API always returns the default value even if never set. - // If the values are on their default one, threat it as not set. - properties := policy.DatabaseSecurityAlertPolicyProperties - if properties == nil { - return []interface{}{} - } - - threatDetectionPolicy := make(map[string]interface{}) - - threatDetectionPolicy["state"] = string(properties.State) - threatDetectionPolicy["email_account_admins"] = string(properties.EmailAccountAdmins) - - if disabledAlerts := properties.DisabledAlerts; disabledAlerts != nil { - flattenedAlerts := pluginsdk.NewSet(pluginsdk.HashString, []interface{}{}) - if v := *disabledAlerts; v != "" { - parsedAlerts := strings.Split(v, ";") - for _, a := range parsedAlerts { - flattenedAlerts.Add(a) - } - } - threatDetectionPolicy["disabled_alerts"] = flattenedAlerts - } - if emailAddresses := properties.EmailAddresses; emailAddresses != nil { - flattenedEmails := pluginsdk.NewSet(pluginsdk.HashString, []interface{}{}) - if v := *emailAddresses; v != "" { - parsedEmails := strings.Split(*emailAddresses, ";") - for _, e := range parsedEmails { - flattenedEmails.Add(e) - } - } - threatDetectionPolicy["email_addresses"] = flattenedEmails - } - if properties.StorageEndpoint != nil { - threatDetectionPolicy["storage_endpoint"] = *properties.StorageEndpoint - } - if properties.RetentionDays != nil { - threatDetectionPolicy["retention_days"] = int(*properties.RetentionDays) - } - - // If storage account access key is in state read it to the new state, as the API does not return it for security reasons - if v, ok := d.GetOk("threat_detection_policy.0.storage_account_access_key"); ok { - threatDetectionPolicy["storage_account_access_key"] = v.(string) - } - - return []interface{}{threatDetectionPolicy} -} - -func expandAzureRmSqlDatabaseImport(d *pluginsdk.ResourceData) sql.ImportExtensionRequest { - v := d.Get("import") - dbimportRefs := v.([]interface{}) - dbimportRef := dbimportRefs[0].(map[string]interface{}) - return sql.ImportExtensionRequest{ - Name: utils.String("terraform"), - ImportExtensionProperties: &sql.ImportExtensionProperties{ - StorageKeyType: sql.StorageKeyType(dbimportRef["storage_key_type"].(string)), - StorageKey: utils.String(dbimportRef["storage_key"].(string)), - StorageURI: utils.String(dbimportRef["storage_uri"].(string)), - AdministratorLogin: utils.String(dbimportRef["administrator_login"].(string)), - AdministratorLoginPassword: utils.String(dbimportRef["administrator_login_password"].(string)), - AuthenticationType: sql.AuthenticationType(dbimportRef["authentication_type"].(string)), - OperationMode: utils.String(dbimportRef["operation_mode"].(string)), - }, - } -} - -func expandArmSqlServerThreatDetectionPolicy(d *pluginsdk.ResourceData, location string) *sql.DatabaseSecurityAlertPolicy { - policy := sql.DatabaseSecurityAlertPolicy{ - Location: utils.String(location), - DatabaseSecurityAlertPolicyProperties: &sql.DatabaseSecurityAlertPolicyProperties{ - State: sql.SecurityAlertPolicyStateDisabled, - }, - } - properties := policy.DatabaseSecurityAlertPolicyProperties - - td, ok := d.GetOk("threat_detection_policy") - if !ok { - return &policy - } - - if tdl := td.([]interface{}); len(tdl) > 0 { - threatDetection := tdl[0].(map[string]interface{}) - - properties.State = sql.SecurityAlertPolicyState(threatDetection["state"].(string)) - properties.EmailAccountAdmins = sql.SecurityAlertPolicyEmailAccountAdmins(threatDetection["email_account_admins"].(string)) - - if v, ok := threatDetection["disabled_alerts"]; ok { - alerts := v.(*pluginsdk.Set).List() - expandedAlerts := make([]string, len(alerts)) - for i, a := range alerts { - expandedAlerts[i] = a.(string) - } - properties.DisabledAlerts = utils.String(strings.Join(expandedAlerts, ";")) - } - if v, ok := threatDetection["email_addresses"]; ok { - emails := v.(*pluginsdk.Set).List() - expandedEmails := make([]string, len(emails)) - for i, e := range emails { - expandedEmails[i] = e.(string) - } - properties.EmailAddresses = utils.String(strings.Join(expandedEmails, ";")) - } - if v, ok := threatDetection["retention_days"]; ok { - properties.RetentionDays = utils.Int32(int32(v.(int))) - } - if v, ok := threatDetection["storage_account_access_key"]; ok { - properties.StorageAccountAccessKey = utils.String(v.(string)) - } - if v, ok := threatDetection["storage_endpoint"]; ok { - properties.StorageEndpoint = utils.String(v.(string)) - } - - return &policy - } - - return &policy -} - -func resourceSqlDatabaseSchema() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.ValidateMsSqlDatabaseName, - }, - - "location": commonschema.Location(), - - "resource_group_name": commonschema.ResourceGroupName(), - - "server_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.ValidateMsSqlServerName, - }, - - "create_mode": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(sql.Default), - ValidateFunc: validation.StringInSlice([]string{ - string(sql.CreateModeCopy), - string(sql.CreateModeDefault), - string(sql.CreateModeNonReadableSecondary), - string(sql.CreateModeOnlineSecondary), - string(sql.CreateModePointInTimeRestore), - string(sql.CreateModeRecovery), - string(sql.CreateModeRestore), - string(sql.CreateModeRestoreLongTermRetentionBackup), - }, false), - }, - - "import": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "storage_uri": { - Type: pluginsdk.TypeString, - Required: true, - }, - "storage_key": { - Type: pluginsdk.TypeString, - Required: true, - Sensitive: true, - }, - "storage_key_type": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - "StorageAccessKey", - "SharedAccessKey", - }, false), - }, - "administrator_login": { - Type: pluginsdk.TypeString, - Required: true, - }, - "administrator_login_password": { - Type: pluginsdk.TypeString, - Required: true, - Sensitive: true, - }, - "authentication_type": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - "ADPassword", - "SQL", - }, false), - }, - "operation_mode": { - Type: pluginsdk.TypeString, - Optional: true, - Default: "Import", - ValidateFunc: validation.StringInSlice([]string{ - "Import", - }, false), - }, - }, - }, - }, - - "source_database_id": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - }, - - "restore_point_in_time": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.IsRFC3339Time, - }, - - "edition": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringInSlice([]string{ - string(sql.Basic), - string(sql.Business), - string(sql.BusinessCritical), - string(sql.DataWarehouse), - string(sql.Free), - string(sql.GeneralPurpose), - string(sql.Hyperscale), - string(sql.Premium), - string(sql.PremiumRS), - string(sql.Standard), - string(sql.Stretch), - string(sql.System), - string(sql.System2), - string(sql.Web), - }, false), - }, - - "collation": { - Type: pluginsdk.TypeString, - DiffSuppressFunc: suppress.CaseDifference, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "max_size_bytes": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - }, - - "max_size_gb": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - }, - - "requested_service_objective_id": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.IsUUID, - }, - - "requested_service_objective_name": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - DiffSuppressFunc: suppress.CaseDifference, - ValidateFunc: validation.StringIsNotEmpty, - // TODO: add validation once the Enum's complete - // https://github.com/Azure/azure-rest-api-specs/issues/1609 - }, - - "source_database_deletion_date": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.IsRFC3339Time, - }, - - "elastic_pool_name": { - Type: pluginsdk.TypeString, - Optional: true, - Computed: true, - }, - - "encryption": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "creation_date": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "default_secondary_location": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "threat_detection_policy": { - Type: pluginsdk.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "disabled_alerts": { - Type: pluginsdk.TypeSet, - Optional: true, - Set: pluginsdk.HashString, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - ValidateFunc: validation.StringInSlice([]string{ - "Sql_Injection", - "Sql_Injection_Vulnerability", - "Access_Anomaly", - }, false), - }, - }, - - "email_account_admins": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(sql.SecurityAlertPolicyEmailAccountAdminsDisabled), - ValidateFunc: validation.StringInSlice([]string{ - string(sql.SecurityAlertPolicyEmailAccountAdminsDisabled), - string(sql.SecurityAlertPolicyEmailAccountAdminsEnabled), - }, false), - }, - - "email_addresses": { - Type: pluginsdk.TypeSet, - Optional: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - }, - Set: pluginsdk.HashString, - }, - - "retention_days": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - }, - - "state": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(sql.SecurityAlertPolicyStateDisabled), - ValidateFunc: validation.StringInSlice([]string{ - string(sql.SecurityAlertPolicyStateDisabled), - string(sql.SecurityAlertPolicyStateEnabled), - string(sql.SecurityAlertPolicyStateNew), - }, false), - }, - - "storage_account_access_key": { - Type: pluginsdk.TypeString, - Optional: true, - Sensitive: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "storage_endpoint": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - - "read_scale": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: false, - }, - - "zone_redundant": { - Type: pluginsdk.TypeBool, - Optional: true, - }, - - "tags": tags.Schema(), - } -} diff --git a/internal/services/sql/sql_database_resource_test.go b/internal/services/sql/sql_database_resource_test.go deleted file mode 100644 index 9111e4087402b..0000000000000 --- a/internal/services/sql/sql_database_resource_test.go +++ /dev/null @@ -1,865 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package sql_test - -import ( - "context" - "fmt" - "testing" - "time" - - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type SqlDatabaseResource struct{} - -func TestAccSqlDatabase_basic(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_database", "test") - r := SqlDatabaseResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("create_mode"), - }) -} - -func TestAccSqlDatabase_requiresImport(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_database", "test") - r := SqlDatabaseResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func TestAccSqlDatabase_disappears(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_database", "test") - r := SqlDatabaseResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - data.DisappearsStep(acceptance.DisappearsStepData{ - Config: r.basic, - TestResource: r, - }), - }) -} - -func TestAccSqlDatabase_elasticPool(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_database", "test") - r := SqlDatabaseResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.elasticPool(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("elastic_pool_name").HasValue(fmt.Sprintf("acctestep%d", data.RandomInteger)), - ), - }, - data.ImportStep("create_mode"), - }) -} - -func TestAccSqlDatabase_withTags(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_database", "test") - r := SqlDatabaseResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.withTags(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("tags.%").HasValue("2"), - ), - }, - { - Config: r.withTagsUpdate(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("tags.%").HasValue("1"), - ), - }, - }) -} - -func TestAccSqlDatabase_dataWarehouse(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_database", "test") - r := SqlDatabaseResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.dataWarehouse(data), - Check: acceptance.ComposeTestCheckFunc( - check.That("azurerm_sql_database.test").ExistsInAzure(r), - ), - }, - data.ImportStep("create_mode"), - }) -} - -func TestAccSqlDatabase_restorePointInTime(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_database", "test") - restorePointInTime := time.Now().Add(15 * time.Minute) - r := SqlDatabaseResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - PreventPostDestroyRefresh: true, - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - { - // we need to make sure we wait long enough to prevent this: - // The source database, 'acctestdb201215000744760737', has not existed long enough to support restores. - PreConfig: func() { time.Sleep(restorePointInTime.Sub(time.Now().Add(45 * time.Minute))) }, - Config: r.restorePointInTime(data, restorePointInTime), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That("azurerm_sql_database.test_restore").ExistsInAzure(r), - ), - }, - }) -} - -func TestAccSqlDatabase_collation(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_database", "test") - r := SqlDatabaseResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("collation").HasValue("SQL_Latin1_General_CP1_CI_AS"), - ), - }, - { - Config: r.collationUpdate(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("collation").HasValue("Japanese_Bushu_Kakusu_100_CS_AS_KS_WS"), - ), - }, - }) -} - -func TestAccSqlDatabase_requestedServiceObjectiveName(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_database", "test") - r := SqlDatabaseResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.requestedServiceObjectiveName(data, "S0"), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("requested_service_objective_name").HasValue("S0"), - ), - }, - { - Config: r.requestedServiceObjectiveName(data, "S1"), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("requested_service_objective_name").HasValue("S1"), - ), - }, - }) -} - -func TestAccSqlDatabase_threatDetectionPolicy(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_database", "test") - r := SqlDatabaseResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.threatDetectionPolicy(data, "Enabled"), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("threat_detection_policy.#").HasValue("1"), - check.That(data.ResourceName).Key("threat_detection_policy.0.state").HasValue("Enabled"), - check.That(data.ResourceName).Key("threat_detection_policy.0.retention_days").HasValue("15"), - check.That(data.ResourceName).Key("threat_detection_policy.0.disabled_alerts.#").HasValue("1"), - check.That(data.ResourceName).Key("threat_detection_policy.0.email_account_admins").HasValue("Enabled"), - ), - }, - data.ImportStep("create_mode", "threat_detection_policy.0.storage_account_access_key"), - { - Config: r.threatDetectionPolicy(data, "Disabled"), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("threat_detection_policy.#").HasValue("1"), - check.That(data.ResourceName).Key("threat_detection_policy.0.state").HasValue("Disabled"), - ), - }, - }) -} - -func TestAccSqlDatabase_readScale(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_database", "test") - r := SqlDatabaseResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.readScale(data, true), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("read_scale").HasValue("true"), - ), - }, - { - Config: r.readScale(data, false), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("read_scale").HasValue("false"), - ), - }, - }) -} - -func TestAccSqlDatabase_zoneRedundant(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_database", "test") - r := SqlDatabaseResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.zoneRedundant(data, true), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("zone_redundant").HasValue("true"), - ), - }, - { - Config: r.zoneRedundant(data, false), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("zone_redundant").HasValue("false"), - ), - }, - }) -} - -func TestAccSqlDatabase_bacpac(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_database", "test") - r := SqlDatabaseResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.bacpac(data), - Check: acceptance.ComposeTestCheckFunc( - check.That("azurerm_sql_database.test").ExistsInAzure(r), - ), - }, - }) -} - -func TestAccSqlDatabase_onlineSecondaryMode(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_database", "test") - r := SqlDatabaseResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.onlineSecondaryMode(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password", "create_mode"), - }) -} - -func (r SqlDatabaseResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.DatabaseID(state.ID) - if err != nil { - return nil, err - } - resp, err := client.Sql.DatabasesClient.Get(ctx, id.ResourceGroup, id.ServerName, id.Name, "") - if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return utils.Bool(false), nil - } - return nil, fmt.Errorf("retrieving SQL Database %q (Server %q / Resource Group %q): %+v", id.Name, id.ServerName, id.ResourceGroup, err) - } - return utils.Bool(true), nil -} - -func (r SqlDatabaseResource) Destroy(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.DatabaseID(state.ID) - if err != nil { - return nil, err - } - if _, err := client.Sql.DatabasesClient.Delete(ctx, id.ResourceGroup, id.ServerName, id.Name); err != nil { - return nil, fmt.Errorf("deleting SQL Database %q (Server %q / Resource Group %q): %+v", id.Name, id.ServerName, id.ResourceGroup, err) - } - return utils.Bool(true), nil -} - -func (r SqlDatabaseResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" -} - -resource "azurerm_sql_database" "test" { - name = "acctestdb%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - location = azurerm_resource_group.test.location - edition = "Standard" - collation = "SQL_Latin1_General_CP1_CI_AS" - max_size_bytes = "1073741824" - requested_service_objective_name = "S0" -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger) -} - -func (r SqlDatabaseResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_sql_database" "import" { - name = azurerm_sql_database.test.name - resource_group_name = azurerm_sql_database.test.resource_group_name - server_name = azurerm_sql_database.test.server_name - location = azurerm_sql_database.test.location - edition = azurerm_sql_database.test.edition - collation = azurerm_sql_database.test.collation - max_size_bytes = azurerm_sql_database.test.max_size_bytes - requested_service_objective_name = azurerm_sql_database.test.requested_service_objective_name -} -`, r.basic(data)) -} - -func (r SqlDatabaseResource) withTags(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" -} - -resource "azurerm_sql_database" "test" { - name = "acctestdb%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - location = azurerm_resource_group.test.location - edition = "Standard" - collation = "SQL_Latin1_General_CP1_CI_AS" - max_size_bytes = "1073741824" - requested_service_objective_name = "S0" - - tags = { - environment = "staging" - database = "test" - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger) -} - -func (r SqlDatabaseResource) withTagsUpdate(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" -} - -resource "azurerm_sql_database" "test" { - name = "acctestdb%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - location = azurerm_resource_group.test.location - edition = "Standard" - collation = "SQL_Latin1_General_CP1_CI_AS" - max_size_bytes = "1073741824" - requested_service_objective_name = "S0" - - tags = { - environment = "production" - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger) -} - -func (r SqlDatabaseResource) dataWarehouse(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctest_rg_%d" - location = "%s" -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" -} - -resource "azurerm_sql_database" "test" { - name = "acctestdb%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - location = azurerm_resource_group.test.location - edition = "DataWarehouse" - collation = "SQL_Latin1_General_CP1_CI_AS" - requested_service_objective_name = "DW400c" -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger) -} - -func (r SqlDatabaseResource) restorePointInTime(data acceptance.TestData, restorePointInTime time.Time) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" -} - -resource "azurerm_sql_database" "test" { - name = "acctestdb%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - location = azurerm_resource_group.test.location - edition = "Standard" - collation = "SQL_Latin1_General_CP1_CI_AS" - max_size_bytes = "1073741824" - requested_service_objective_name = "S0" -} - -resource "azurerm_sql_database" "test_restore" { - name = "acctestdb_restore%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - location = azurerm_resource_group.test.location - create_mode = "PointInTimeRestore" - source_database_id = azurerm_sql_database.test.id - restore_point_in_time = "%s" -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger, restorePointInTime.UTC().Format(time.RFC3339)) -} - -func (r SqlDatabaseResource) elasticPool(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" -} - -resource "azurerm_sql_elasticpool" "test" { - name = "acctestep%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - server_name = azurerm_sql_server.test.name - edition = "Basic" - dtu = 50 - pool_size = 5000 -} - -resource "azurerm_sql_database" "test" { - name = "acctestdb%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - location = azurerm_resource_group.test.location - edition = azurerm_sql_elasticpool.test.edition - collation = "SQL_Latin1_General_CP1_CI_AS" - max_size_bytes = "1073741824" - elastic_pool_name = azurerm_sql_elasticpool.test.name - requested_service_objective_name = "ElasticPool" -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger) -} - -func (r SqlDatabaseResource) collationUpdate(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" -} - -resource "azurerm_sql_database" "test" { - name = "acctestdb%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - location = azurerm_resource_group.test.location - edition = "Standard" - collation = "Japanese_Bushu_Kakusu_100_CS_AS_KS_WS" - max_size_bytes = "1073741824" - requested_service_objective_name = "S0" -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger) -} - -func (r SqlDatabaseResource) bacpac(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG_%d" - location = "%s" -} - -resource "azurerm_storage_account" "test" { - name = "accsa%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_replication_type = "LRS" -} - -resource "azurerm_storage_container" "test" { - name = "bacpac" - storage_account_name = azurerm_storage_account.test.name - container_access_type = "private" -} - -resource "azurerm_storage_blob" "test" { - name = "test.bacpac" - storage_account_name = azurerm_storage_account.test.name - storage_container_name = azurerm_storage_container.test.name - type = "Block" - source = "testdata/sql_import.bacpac" -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" -} - -resource "azurerm_sql_firewall_rule" "test" { - name = "allowazure" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - start_ip_address = "0.0.0.0" - end_ip_address = "0.0.0.0" -} - -resource "azurerm_sql_database" "test" { - name = "acctestdb%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - location = azurerm_resource_group.test.location - edition = "Standard" - collation = "SQL_Latin1_General_CP1_CI_AS" - max_size_bytes = "1073741824" - requested_service_objective_name = "S0" - - import { - storage_uri = azurerm_storage_blob.test.url - storage_key = azurerm_storage_account.test.primary_access_key - storage_key_type = "StorageAccessKey" - administrator_login = azurerm_sql_server.test.administrator_login - administrator_login_password = azurerm_sql_server.test.administrator_login_password - authentication_type = "SQL" - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger) -} - -func (r SqlDatabaseResource) requestedServiceObjectiveName(data acceptance.TestData, requestedServiceObjectiveName string) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" -} - -resource "azurerm_sql_database" "test" { - name = "acctestdb%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - location = azurerm_resource_group.test.location - edition = "Standard" - collation = "SQL_Latin1_General_CP1_CI_AS" - max_size_bytes = "1073741824" - requested_service_objective_name = %q -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, requestedServiceObjectiveName) -} - -func (r SqlDatabaseResource) threatDetectionPolicy(data acceptance.TestData, state string) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_storage_account" "test" { - name = "test%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" -} - -resource "azurerm_sql_database" "test" { - name = "acctestdb%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - location = azurerm_resource_group.test.location - edition = "Standard" - collation = "SQL_Latin1_General_CP1_CI_AS" - max_size_bytes = "1073741824" - - threat_detection_policy { - retention_days = 15 - state = "%s" - disabled_alerts = ["Sql_Injection"] - email_account_admins = "Enabled" - storage_account_access_key = azurerm_storage_account.test.primary_access_key - storage_endpoint = azurerm_storage_account.test.primary_blob_endpoint - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger, state) -} - -func (r SqlDatabaseResource) readScale(data acceptance.TestData, readScale bool) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "readscaletestRG-%d" - location = "%s" -} - -resource "azurerm_sql_server" "test" { - name = "readscaletestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" -} - -resource "azurerm_sql_database" "test" { - name = "readscaletestdb%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - location = azurerm_resource_group.test.location - edition = "Premium" - collation = "SQL_Latin1_General_CP1_CI_AS" - max_size_bytes = "1073741824" - read_scale = %t -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, readScale) -} - -func (r SqlDatabaseResource) zoneRedundant(data acceptance.TestData, zoneRedundant bool) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" -} - -resource "azurerm_sql_database" "test" { - name = "acctestdb%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - location = azurerm_resource_group.test.location - edition = "Premium" - collation = "SQL_Latin1_General_CP1_CI_AS" - max_size_bytes = "1073741824" - zone_redundant = %t -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, zoneRedundant) -} - -func (r SqlDatabaseResource) onlineSecondaryMode(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-sql-%[1]d-p" - location = "%[2]s" -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver%[1]d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" -} - -resource "azurerm_sql_database" "test" { - name = "acctestdb%[1]d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - location = azurerm_resource_group.test.location - edition = "Standard" - collation = "SQL_Latin1_General_CP1_CI_AS" - max_size_bytes = "1073741824" - requested_service_objective_name = "S0" -} - -resource "azurerm_resource_group" "test2" { - name = "acctestRG-sql-%[1]d-s" - location = "%[3]s" -} - -resource "azurerm_sql_server" "test2" { - name = "acctestsqlserver2%[1]d" - resource_group_name = azurerm_resource_group.test2.name - location = azurerm_resource_group.test2.location - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" -} - -resource "azurerm_sql_database" "test2" { - name = "acctestdb2%[1]d" - resource_group_name = azurerm_resource_group.test2.name - server_name = azurerm_sql_server.test2.name - location = azurerm_resource_group.test2.location - create_mode = "OnlineSecondary" - source_database_id = azurerm_sql_database.test.id -} -`, data.RandomInteger, data.Locations.Primary, data.Locations.Secondary) -} diff --git a/internal/services/sql/sql_elasticpool_resource.go b/internal/services/sql/sql_elasticpool_resource.go deleted file mode 100644 index da7ab08b4e53d..0000000000000 --- a/internal/services/sql/sql_elasticpool_resource.go +++ /dev/null @@ -1,256 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package sql - -import ( - "fmt" - "time" - - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql" // nolint: staticcheck - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/tags" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceSqlElasticPool() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceSqlElasticPoolCreateUpdate, - Read: resourceSqlElasticPoolRead, - Update: resourceSqlElasticPoolCreateUpdate, - Delete: resourceSqlElasticPoolDelete, - - DeprecationMessage: "The `azurerm_sql_elasticpool_resource` resource is deprecated and will be removed in version 4.0 of the AzureRM provider. Please use the `azurerm_mssql_elasticpool` resource instead.", - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.ElasticPoolID(id) - return err - }), - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "location": commonschema.Location(), - - "resource_group_name": commonschema.ResourceGroupName(), - - "server_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.ValidateMsSqlServerName, - }, - - "edition": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - string(sql.ElasticPoolEditionBasic), - string(sql.ElasticPoolEditionStandard), - string(sql.ElasticPoolEditionPremium), - }, false), - }, - - "dtu": { - Type: pluginsdk.TypeInt, - Required: true, - }, - - "db_dtu_min": { - Type: pluginsdk.TypeInt, - Optional: true, - Computed: true, - }, - - "db_dtu_max": { - Type: pluginsdk.TypeInt, - Optional: true, - Computed: true, - }, - - "pool_size": { - Type: pluginsdk.TypeInt, - Optional: true, - Computed: true, - }, - - "creation_date": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "tags": tags.Schema(), - }, - } -} - -func resourceSqlElasticPoolCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.ElasticPoolsClient - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := parse.NewElasticPoolID(subscriptionId, d.Get("resource_group_name").(string), d.Get("server_name").(string), d.Get("name").(string)) - if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) - if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { - return fmt.Errorf("checking for presence of existing %s: %+v", id, err) - } - } - - if !utils.ResponseWasNotFound(existing.Response) { - return tf.ImportAsExistsError("azurerm_sql_elasticpool", id.ID()) - } - } - - location := azure.NormalizeLocation(d.Get("location").(string)) - t := d.Get("tags").(map[string]interface{}) - elasticPool := sql.ElasticPool{ - Name: utils.String(id.Name), - Location: &location, - ElasticPoolProperties: getArmSqlElasticPoolProperties(d), - Tags: tags.Expand(t), - } - - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ServerName, id.Name, elasticPool) - if err != nil { - return fmt.Errorf("creating/updating %s: %+v", id, err) - } - - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for create/update of %s: %+v", id, err) - } - - d.SetId(id.ID()) - return resourceSqlElasticPoolRead(d, meta) -} - -func resourceSqlElasticPoolRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.ElasticPoolsClient - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := parse.ElasticPoolID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) - if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving ElasticPool %q (Server %q / Resource Group %q): %+v", id.Name, id.ServerName, id.ResourceGroup, err) - } - - d.Set("name", id.Name) - d.Set("server_name", id.ServerName) - d.Set("resource_group_name", id.ResourceGroup) - - if location := resp.Location; location != nil { - d.Set("location", azure.NormalizeLocation(*location)) - } - - if props := resp.ElasticPoolProperties; props != nil { - creationDate := "" - if props.CreationDate != nil { - creationDate = props.CreationDate.Format(time.RFC3339) - } - d.Set("creation_date", creationDate) - - dtu := 0 - if props.Dtu != nil { - dtu = int(*props.Dtu) - } - d.Set("dtu", dtu) - - databaseDtuMin := 0 - if props.DatabaseDtuMin != nil { - databaseDtuMin = int(*props.DatabaseDtuMin) - } - d.Set("db_dtu_min", databaseDtuMin) - - databaseDtuMax := 0 - if props.DatabaseDtuMax != nil { - databaseDtuMax = int(*props.DatabaseDtuMax) - } - d.Set("db_dtu_max", databaseDtuMax) - - d.Set("edition", string(props.Edition)) - - storageMb := 0 - if props.StorageMB != nil { - storageMb = int(*props.StorageMB) - } - d.Set("pool_size", storageMb) - } - - return tags.FlattenAndSet(d, resp.Tags) -} - -func resourceSqlElasticPoolDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.ElasticPoolsClient - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := parse.ElasticPoolID(d.Id()) - if err != nil { - return err - } - - if _, err = client.Delete(ctx, id.ResourceGroup, id.ServerName, id.Name); err != nil { - return fmt.Errorf("deleting ElasticPool %q (Server %q / Resource Group %q): %+v", id.Name, id.ServerName, id.ResourceGroup, err) - } - - return nil -} - -func getArmSqlElasticPoolProperties(d *pluginsdk.ResourceData) *sql.ElasticPoolProperties { - edition := sql.ElasticPoolEdition(d.Get("edition").(string)) - dtu := int32(d.Get("dtu").(int)) - - props := &sql.ElasticPoolProperties{ - Edition: edition, - Dtu: &dtu, - } - - if databaseDtuMin, ok := d.GetOk("db_dtu_min"); ok { - databaseDtuMin := int32(databaseDtuMin.(int)) - props.DatabaseDtuMin = &databaseDtuMin - } - - if databaseDtuMax, ok := d.GetOk("db_dtu_max"); ok { - databaseDtuMax := int32(databaseDtuMax.(int)) - props.DatabaseDtuMax = &databaseDtuMax - } - - if poolSize, ok := d.GetOk("pool_size"); ok { - poolSize := int32(poolSize.(int)) - props.StorageMB = &poolSize - } - - return props -} diff --git a/internal/services/sql/sql_elasticpool_resource_test.go b/internal/services/sql/sql_elasticpool_resource_test.go deleted file mode 100644 index d40ba50ec52b0..0000000000000 --- a/internal/services/sql/sql_elasticpool_resource_test.go +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package sql_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type SqlElasticPoolResource struct{} - -func TestAccSqlElasticPool_basic(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_elasticpool", "test") - r := SqlElasticPoolResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccSqlElasticPool_requiresImport(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_elasticpool", "test") - r := SqlElasticPoolResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func TestAccSqlElasticPool_disappears(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_elasticpool", "test") - r := SqlElasticPoolResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - data.DisappearsStep(acceptance.DisappearsStepData{ - Config: r.basic, - TestResource: r, - }), - }) -} - -func TestAccSqlElasticPool_resizeDtu(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_elasticpool", "test") - r := SqlElasticPoolResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("dtu").HasValue("50"), - check.That(data.ResourceName).Key("pool_size").HasValue("5000"), - ), - }, - { - Config: r.resizedDtu(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("dtu").HasValue("100"), - check.That(data.ResourceName).Key("pool_size").HasValue("10000"), - ), - }, - }) -} - -func (r SqlElasticPoolResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.ElasticPoolID(state.ID) - if err != nil { - return nil, err - } - resp, err := client.Sql.ElasticPoolsClient.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) - if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return utils.Bool(false), nil - } - return nil, fmt.Errorf("retrieving Sql Elastic Pool %q (Server %q / Resource Group %q): %+v", id.Name, id.ServerName, id.ResourceGroup, err) - } - return utils.Bool(true), nil -} - -func (r SqlElasticPoolResource) Destroy(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.ElasticPoolID(state.ID) - if err != nil { - return nil, err - } - if _, err := client.Sql.ElasticPoolsClient.Delete(ctx, id.ResourceGroup, id.ServerName, id.Name); err != nil { - return nil, fmt.Errorf("deleting Sql Elastic Pool %q (Server %q / Resource Group %q): %+v", id.Name, id.ServerName, id.ResourceGroup, err) - } - return utils.Bool(true), nil -} - -func (r SqlElasticPoolResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%[1]d" - location = "%s" -} - -resource "azurerm_sql_server" "test" { - name = "acctest%[1]d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "4dm1n157r470r" - administrator_login_password = "4-v3ry-53cr37-p455w0rd" -} - -resource "azurerm_sql_elasticpool" "test" { - name = "acctest-pool-%[1]d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - server_name = azurerm_sql_server.test.name - edition = "Basic" - dtu = 50 - pool_size = 5000 -} -`, data.RandomInteger, data.Locations.Primary) -} - -func (r SqlElasticPoolResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_sql_elasticpool" "import" { - name = azurerm_sql_elasticpool.test.name - resource_group_name = azurerm_sql_elasticpool.test.resource_group_name - location = azurerm_sql_elasticpool.test.location - server_name = azurerm_sql_elasticpool.test.server_name - edition = azurerm_sql_elasticpool.test.edition - dtu = azurerm_sql_elasticpool.test.dtu - pool_size = azurerm_sql_elasticpool.test.pool_size -} -`, r.basic(data)) -} - -func (r SqlElasticPoolResource) resizedDtu(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%[1]d" - location = "%s" -} - -resource "azurerm_sql_server" "test" { - name = "acctest%[1]d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "4dm1n157r470r" - administrator_login_password = "4-v3ry-53cr37-p455w0rd" -} - -resource "azurerm_sql_elasticpool" "test" { - name = "acctest-pool-%[1]d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - server_name = azurerm_sql_server.test.name - edition = "Basic" - dtu = 100 - pool_size = 10000 -} -`, data.RandomInteger, data.Locations.Primary) -} diff --git a/internal/services/sql/sql_failover_group_resource.go b/internal/services/sql/sql_failover_group_resource.go deleted file mode 100644 index 7f41400f57521..0000000000000 --- a/internal/services/sql/sql_failover_group_resource.go +++ /dev/null @@ -1,361 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package sql - -import ( - "fmt" - "time" - - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql" // nolint: staticcheck - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/tags" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/set" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceSqlFailoverGroup() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceSqlFailoverGroupCreateUpdate, - Read: resourceSqlFailoverGroupRead, - Update: resourceSqlFailoverGroupCreateUpdate, - Delete: resourceSqlFailoverGroupDelete, - - DeprecationMessage: "The `azurerm_sql_failover_group` resource is deprecated and will be removed in version 4.0 of the AzureRM provider. Please use the `azurerm_mssql_failover_group` resource instead.", - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.FailoverGroupID(id) - return err - }), - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.ValidateMsSqlFailoverGroupName, - }, - - "resource_group_name": commonschema.ResourceGroupName(), - - "location": commonschema.LocationComputed(), - - "server_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.ValidateMsSqlServerName, - }, - - "databases": { - Type: pluginsdk.TypeSet, - Optional: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - }, - Set: pluginsdk.HashString, - }, - - "partner_servers": { - Type: pluginsdk.TypeList, - Required: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "id": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: azure.ValidateResourceID, - }, - - "location": commonschema.LocationComputed(), - - "role": { - Type: pluginsdk.TypeString, - Computed: true, - }, - }, - }, - }, - - "readonly_endpoint_failover_policy": { - Type: pluginsdk.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "mode": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - string(sql.ReadOnlyEndpointFailoverPolicyDisabled), - string(sql.ReadOnlyEndpointFailoverPolicyEnabled), - }, false), - }, - }, - }, - }, - - "read_write_endpoint_failover_policy": { - Type: pluginsdk.TypeList, - Required: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "mode": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - string(sql.Automatic), - string(sql.Manual), - }, false), - }, - "grace_minutes": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - }, - }, - }, - }, - - "role": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "tags": tags.Schema(), - }, - } -} - -func resourceSqlFailoverGroupCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.FailoverGroupsClient - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := parse.NewFailoverGroupID(subscriptionId, d.Get("resource_group_name").(string), d.Get("server_name").(string), d.Get("name").(string)) - if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) - if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { - return fmt.Errorf("checking for presence of existing %s: %+v", id, err) - } - } - - if !utils.ResponseWasNotFound(existing.Response) { - return tf.ImportAsExistsError("azurerm_sql_failover_group", id.ID()) - } - } - - t := d.Get("tags").(map[string]interface{}) - properties := sql.FailoverGroup{ - FailoverGroupProperties: &sql.FailoverGroupProperties{ - ReadOnlyEndpoint: expandSqlFailoverGroupReadOnlyPolicy(d), - ReadWriteEndpoint: expandSqlFailoverGroupReadWritePolicy(d), - PartnerServers: expandSqlFailoverGroupPartnerServers(d), - }, - Tags: tags.Expand(t), - } - - if r, ok := d.Get("databases").(*pluginsdk.Set); ok && r.Len() > 0 { - var databases []string - for _, v := range r.List() { - s := v.(string) - databases = append(databases, s) - } - - properties.Databases = &databases - } - - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ServerName, id.Name, properties) - if err != nil { - return fmt.Errorf("creating/updating %s: %+v", id, err) - } - - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting on create/update of %s: %+v", id, err) - } - - d.SetId(id.ID()) - return resourceSqlFailoverGroupRead(d, meta) -} - -func resourceSqlFailoverGroupRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.FailoverGroupsClient - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := parse.FailoverGroupID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) - if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - d.SetId("") - return nil - } - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.Name) - d.Set("server_name", id.ServerName) - d.Set("resource_group_name", id.ResourceGroup) - - d.Set("location", location.NormalizeNilable(resp.Location)) - - if props := resp.FailoverGroupProperties; props != nil { - if err := d.Set("read_write_endpoint_failover_policy", flattenSqlFailoverGroupReadWritePolicy(props.ReadWriteEndpoint)); err != nil { - return fmt.Errorf("setting `read_write_endpoint_failover_policy`: %+v", err) - } - - if err := d.Set("readonly_endpoint_failover_policy", flattenSqlFailoverGroupReadOnlyPolicy(props.ReadOnlyEndpoint)); err != nil { - return fmt.Errorf("setting `read_only_endpoint_failover_policy`: %+v", err) - } - - if props.Databases != nil { - d.Set("databases", set.FromStringSlice(*props.Databases)) - } - d.Set("role", string(props.ReplicationRole)) - - if err := d.Set("partner_servers", flattenSqlFailoverGroupPartnerServers(props.PartnerServers)); err != nil { - return fmt.Errorf("setting `partner_servers`: %+v", err) - } - } - - return tags.FlattenAndSet(d, resp.Tags) -} - -func resourceSqlFailoverGroupDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.FailoverGroupsClient - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := parse.FailoverGroupID(d.Id()) - if err != nil { - return err - } - - future, err := client.Delete(ctx, id.ResourceGroup, id.ServerName, id.Name) - if err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for deletion of %s: %+v", *id, err) - } - - return err -} - -func expandSqlFailoverGroupReadWritePolicy(d *pluginsdk.ResourceData) *sql.FailoverGroupReadWriteEndpoint { - vs := d.Get("read_write_endpoint_failover_policy").([]interface{}) - v := vs[0].(map[string]interface{}) - - mode := sql.ReadWriteEndpointFailoverPolicy(v["mode"].(string)) - graceMins := int32(v["grace_minutes"].(int)) - - policy := &sql.FailoverGroupReadWriteEndpoint{ - FailoverPolicy: mode, - } - - if mode != sql.Manual { - policy.FailoverWithDataLossGracePeriodMinutes = utils.Int32(graceMins) - } - - return policy -} - -func flattenSqlFailoverGroupReadWritePolicy(input *sql.FailoverGroupReadWriteEndpoint) []interface{} { - if input == nil { - return []interface{}{} - } - - policy := make(map[string]interface{}) - - policy["mode"] = string(input.FailoverPolicy) - - if input.FailoverWithDataLossGracePeriodMinutes != nil { - policy["grace_minutes"] = *input.FailoverWithDataLossGracePeriodMinutes - } - return []interface{}{policy} -} - -func expandSqlFailoverGroupReadOnlyPolicy(d *pluginsdk.ResourceData) *sql.FailoverGroupReadOnlyEndpoint { - vs := d.Get("readonly_endpoint_failover_policy").([]interface{}) - if len(vs) == 0 { - return nil - } - - v := vs[0].(map[string]interface{}) - mode := sql.ReadOnlyEndpointFailoverPolicy(v["mode"].(string)) - - return &sql.FailoverGroupReadOnlyEndpoint{ - FailoverPolicy: mode, - } -} - -func flattenSqlFailoverGroupReadOnlyPolicy(input *sql.FailoverGroupReadOnlyEndpoint) []interface{} { - if input == nil { - return []interface{}{} - } - - policy := make(map[string]interface{}) - policy["mode"] = string(input.FailoverPolicy) - - return []interface{}{policy} -} - -func expandSqlFailoverGroupPartnerServers(d *pluginsdk.ResourceData) *[]sql.PartnerInfo { - servers := d.Get("partner_servers").([]interface{}) - partners := make([]sql.PartnerInfo, 0) - - for _, server := range servers { - info := server.(map[string]interface{}) - - id := info["id"].(string) - partners = append(partners, sql.PartnerInfo{ - ID: &id, - }) - } - - return &partners -} - -func flattenSqlFailoverGroupPartnerServers(input *[]sql.PartnerInfo) []map[string]interface{} { - result := make([]map[string]interface{}, 0) - - if input != nil { - for _, server := range *input { - id := "" - if v := server.ID; v != nil { - id = *v - } - result = append(result, map[string]interface{}{ - "id": id, - "location": location.NormalizeNilable(server.Location), - "role": string(server.ReplicationRole), - }) - } - } - return result -} diff --git a/internal/services/sql/sql_failover_group_resource_test.go b/internal/services/sql/sql_failover_group_resource_test.go deleted file mode 100644 index f20c32a862e6a..0000000000000 --- a/internal/services/sql/sql_failover_group_resource_test.go +++ /dev/null @@ -1,310 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package sql_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type SqlFailoverGroupResource struct{} - -func TestAccSqlFailoverGroup_basic(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_failover_group", "test") - r := SqlFailoverGroupResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccSqlFailoverGroup_requiresImport(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_failover_group", "test") - r := SqlFailoverGroupResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func TestAccSqlFailoverGroup_disappears(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_failover_group", "test") - r := SqlFailoverGroupResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - data.DisappearsStep(acceptance.DisappearsStepData{ - Config: r.basic, - TestResource: r, - }), - }) -} - -func TestAccSqlFailoverGroup_withTags(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_failover_group", "test") - r := SqlFailoverGroupResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.withTags(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("tags.%").HasValue("2"), - ), - }, - { - Config: r.withTagsUpdate(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("tags.%").HasValue("1"), - ), - }, - }) -} - -func (r SqlFailoverGroupResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.FailoverGroupID(state.ID) - if err != nil { - return nil, err - } - resp, err := client.Sql.FailoverGroupsClient.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) - if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return utils.Bool(false), nil - } - return nil, fmt.Errorf("retrieving Sql Failover Group %q (Server %q / Resource Group %q): %+v", id.Name, id.ServerName, id.ResourceGroup, err) - } - return utils.Bool(true), nil -} - -func (r SqlFailoverGroupResource) Destroy(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.FailoverGroupID(state.ID) - if err != nil { - return nil, err - } - if _, err := client.Sql.FailoverGroupsClient.Delete(ctx, id.ResourceGroup, id.ServerName, id.Name); err != nil { - return nil, fmt.Errorf("deleting Sql Failover Group %q (Server %q / Resource Group %q): %+v", id.Name, id.ServerName, id.ResourceGroup, err) - } - return utils.Bool(true), nil -} - -func (r SqlFailoverGroupResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%[1]d" - location = "%[2]s" -} - -resource "azurerm_sql_server" "test_primary" { - name = "acctestmssql%[1]d-primary" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" -} - -resource "azurerm_sql_server" "test_secondary" { - name = "acctestmssql%[1]d-secondary" - resource_group_name = azurerm_resource_group.test.name - location = "%[3]s" - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" -} - -resource "azurerm_sql_database" "test" { - name = "acctestdb%[1]d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test_primary.name - location = azurerm_resource_group.test.location - edition = "Standard" - collation = "SQL_Latin1_General_CP1_CI_AS" - max_size_bytes = "1073741824" - requested_service_objective_name = "S0" -} - -resource "azurerm_sql_failover_group" "test" { - name = "acctestsfg%[1]d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test_primary.name - databases = [azurerm_sql_database.test.id] - - partner_servers { - id = azurerm_sql_server.test_secondary.id - } - - read_write_endpoint_failover_policy { - mode = "Automatic" - grace_minutes = 60 - } -} -`, data.RandomInteger, data.Locations.Primary, data.Locations.Secondary) -} - -func (r SqlFailoverGroupResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_sql_failover_group" "import" { - name = azurerm_sql_failover_group.test.name - resource_group_name = azurerm_sql_failover_group.test.resource_group_name - server_name = azurerm_sql_failover_group.test.server_name - databases = azurerm_sql_failover_group.test.databases - - partner_servers { - id = azurerm_sql_failover_group.test.partner_servers[0].id - } - - read_write_endpoint_failover_policy { - mode = azurerm_sql_failover_group.test.read_write_endpoint_failover_policy[0].mode - grace_minutes = azurerm_sql_failover_group.test.read_write_endpoint_failover_policy[0].grace_minutes - } -} -`, r.basic(data)) -} - -func (r SqlFailoverGroupResource) withTags(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%[1]d" - location = "%[2]s" -} - -resource "azurerm_sql_server" "test_primary" { - name = "acctestmssql%[1]d-primary" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" -} - -resource "azurerm_sql_server" "test_secondary" { - name = "acctestmssql%[1]d-secondary" - resource_group_name = azurerm_resource_group.test.name - location = "%[3]s" - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" -} - -resource "azurerm_sql_database" "test" { - name = "acctestdb%[1]d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test_primary.name - location = azurerm_resource_group.test.location - edition = "Standard" - collation = "SQL_Latin1_General_CP1_CI_AS" - max_size_bytes = "1073741824" - requested_service_objective_name = "S0" -} - -resource "azurerm_sql_failover_group" "test" { - name = "acctestsfg%[1]d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test_primary.name - databases = [azurerm_sql_database.test.id] - - partner_servers { - id = azurerm_sql_server.test_secondary.id - } - read_write_endpoint_failover_policy { - mode = "Automatic" - grace_minutes = 60 - } - tags = { - environment = "staging" - database = "test" - } -} -`, data.RandomInteger, data.Locations.Primary, data.Locations.Secondary) -} - -func (r SqlFailoverGroupResource) withTagsUpdate(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%[1]d" - location = "%[2]s" -} - -resource "azurerm_sql_server" "test_primary" { - name = "acctestmssql%[1]d-primary" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" -} - -resource "azurerm_sql_server" "test_secondary" { - name = "acctestmssql%[1]d-secondary" - resource_group_name = azurerm_resource_group.test.name - location = "%[3]s" - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" -} - -resource "azurerm_sql_database" "test" { - name = "acctestdb%[1]d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test_primary.name - location = azurerm_resource_group.test.location - edition = "Standard" - collation = "SQL_Latin1_General_CP1_CI_AS" - max_size_bytes = "1073741824" - requested_service_objective_name = "S0" -} - -resource "azurerm_sql_failover_group" "test" { - name = "acctestsfg%[1]d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test_primary.name - databases = [azurerm_sql_database.test.id] - - partner_servers { - id = azurerm_sql_server.test_secondary.id - } - read_write_endpoint_failover_policy { - mode = "Automatic" - grace_minutes = 60 - } - tags = { - environment = "production" - } -} -`, data.RandomInteger, data.Locations.Primary, data.Locations.Secondary) -} diff --git a/internal/services/sql/sql_firewall_rule_resource.go b/internal/services/sql/sql_firewall_rule_resource.go deleted file mode 100644 index 5979bcf9ea9ea..0000000000000 --- a/internal/services/sql/sql_firewall_rule_resource.go +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package sql - -import ( - "fmt" - "log" - "time" - - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql" // nolint: staticcheck - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceSqlFirewallRule() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceSqlFirewallRuleCreateUpdate, - Read: resourceSqlFirewallRuleRead, - Update: resourceSqlFirewallRuleCreateUpdate, - Delete: resourceSqlFirewallRuleDelete, - - DeprecationMessage: "The `azurerm_sql_firewall_rule` resource is deprecated and will be removed in version 4.0 of the AzureRM provider. Please use the `azurerm_mssql_firewall_rule` resource instead.", - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.FirewallRuleID(id) - return err - }), - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "resource_group_name": commonschema.ResourceGroupName(), - - "server_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.ValidateMsSqlServerName, - }, - - "start_ip_address": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.All( - validation.IsIPAddress, - validation.StringIsNotEmpty, - ), - }, - - "end_ip_address": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.All( - validation.IsIPAddress, - validation.StringIsNotEmpty, - ), - }, - }, - } -} - -func resourceSqlFirewallRuleCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.FirewallRulesClient - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := parse.NewFirewallRuleID(subscriptionId, d.Get("resource_group_name").(string), d.Get("server_name").(string), d.Get("name").(string)) - if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) - if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { - return fmt.Errorf("checking for presence of existing %s: %+v", id, err) - } - } - - if !utils.ResponseWasNotFound(existing.Response) { - return tf.ImportAsExistsError("azurerm_sql_firewall_rule", id.ID()) - } - } - - parameters := sql.FirewallRule{ - FirewallRuleProperties: &sql.FirewallRuleProperties{ - StartIPAddress: utils.String(d.Get("start_ip_address").(string)), - EndIPAddress: utils.String(d.Get("end_ip_address").(string)), - }, - } - - if _, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ServerName, id.Name, parameters); err != nil { - return fmt.Errorf("creating %s: %+v", id, err) - } - - d.SetId(id.ID()) - return resourceSqlFirewallRuleRead(d, meta) -} - -func resourceSqlFirewallRuleRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.FirewallRulesClient - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := parse.FirewallRuleID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) - if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - log.Printf("[INFO] %s was not found - removing from state", *id) - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.Name) - d.Set("server_name", id.ServerName) - d.Set("resource_group_name", id.ResourceGroup) - - if props := resp.FirewallRuleProperties; props != nil { - d.Set("start_ip_address", props.StartIPAddress) - d.Set("end_ip_address", props.EndIPAddress) - } - - return nil -} - -func resourceSqlFirewallRuleDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.FirewallRulesClient - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := parse.FirewallRuleID(d.Id()) - if err != nil { - return err - } - - if _, err := client.Delete(ctx, id.ResourceGroup, id.ServerName, id.Name); err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - - return nil -} diff --git a/internal/services/sql/sql_firewall_rule_resource_test.go b/internal/services/sql/sql_firewall_rule_resource_test.go deleted file mode 100644 index 305aa104751f3..0000000000000 --- a/internal/services/sql/sql_firewall_rule_resource_test.go +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package sql_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type SqlFirewallRuleResource struct{} - -func TestAccSqlFirewallRule_basic(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_firewall_rule", "test") - r := SqlFirewallRuleResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("start_ip_address").HasValue("0.0.0.0"), - check.That(data.ResourceName).Key("end_ip_address").HasValue("255.255.255.255"), - ), - }, - data.ImportStep(), - { - Config: r.withUpdates(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("start_ip_address").HasValue("10.0.17.62"), - check.That(data.ResourceName).Key("end_ip_address").HasValue("10.0.17.62"), - ), - }, - data.ImportStep(), - }) -} - -func TestAccSqlFirewallRule_requiresImport(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_firewall_rule", "test") - r := SqlFirewallRuleResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("start_ip_address").HasValue("0.0.0.0"), - check.That(data.ResourceName).Key("end_ip_address").HasValue("255.255.255.255"), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func TestAccSqlFirewallRule_disappears(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_firewall_rule", "test") - r := SqlFirewallRuleResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - data.DisappearsStep(acceptance.DisappearsStepData{ - Config: r.basic, - TestResource: r, - }), - }) -} - -func (r SqlFirewallRuleResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.FirewallRuleID(state.ID) - if err != nil { - return nil, err - } - resp, err := client.Sql.FirewallRulesClient.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) - if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return utils.Bool(false), nil - } - return nil, fmt.Errorf("retrieving Sql Firewall Rule %q (Server %q / Resource Group %q): %+v", id.Name, id.ServerName, id.ResourceGroup, err) - } - return utils.Bool(true), nil -} - -func (r SqlFirewallRuleResource) Destroy(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.FirewallRuleID(state.ID) - if err != nil { - return nil, err - } - if _, err := client.Sql.FirewallRulesClient.Delete(ctx, id.ResourceGroup, id.ServerName, id.Name); err != nil { - return nil, fmt.Errorf("deleting Sql Firewall Rule %q (Server %q / Resource Group %q): %+v", id.Name, id.ServerName, id.ResourceGroup, err) - } - return utils.Bool(true), nil -} - -func (r SqlFirewallRuleResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" -} - -resource "azurerm_sql_firewall_rule" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - start_ip_address = "0.0.0.0" - end_ip_address = "255.255.255.255" -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger) -} - -func (r SqlFirewallRuleResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_sql_firewall_rule" "import" { - name = azurerm_sql_firewall_rule.test.name - resource_group_name = azurerm_sql_firewall_rule.test.resource_group_name - server_name = azurerm_sql_firewall_rule.test.server_name - start_ip_address = azurerm_sql_firewall_rule.test.start_ip_address - end_ip_address = azurerm_sql_firewall_rule.test.end_ip_address -} -`, r.basic(data)) -} - -func (r SqlFirewallRuleResource) withUpdates(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" -} - -resource "azurerm_sql_firewall_rule" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - start_ip_address = "10.0.17.62" - end_ip_address = "10.0.17.62" -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger) -} diff --git a/internal/services/sql/sql_managed_database_resource.go b/internal/services/sql/sql_managed_database_resource.go deleted file mode 100644 index de8b97c4e16b2..0000000000000 --- a/internal/services/sql/sql_managed_database_resource.go +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package sql - -import ( - "fmt" - "log" - "time" - - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql" // nolint: staticcheck - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceArmSqlManagedDatabase() *schema.Resource { - return &schema.Resource{ - Create: resourceArmSqlManagedDatabaseCreate, - Read: resourceArmSqlManagedDatabaseRead, - Delete: resourceArmSqlManagedDatabaseDelete, - - DeprecationMessage: "The `azurerm_sql_managed_database` resource is deprecated and will be removed in version 4.0 of the AzureRM provider. Please use the `azurerm_mssql_managed_database` resource instead.", - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.ManagedDatabaseID(id) - return err - }), - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(24 * time.Hour), - Read: schema.DefaultTimeout(5 * time.Minute), - Delete: schema.DefaultTimeout(24 * time.Hour), - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "location": commonschema.Location(), - - "sql_managed_instance_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.ManagedInstanceID, - }, - }, - } -} - -func resourceArmSqlManagedDatabaseCreate(d *schema.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.ManagedDatabasesClient - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - name := d.Get("name").(string) - managedInstanceID, err := parse.ManagedInstanceID(d.Get("sql_managed_instance_id").(string)) - if err != nil { - return err - } - id := parse.NewManagedDatabaseID(managedInstanceID.SubscriptionId, managedInstanceID.ResourceGroup, managedInstanceID.Name, name) - - if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.ManagedInstanceName, id.DatabaseName) - if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { - return fmt.Errorf("checking for presence of existing Managed Database %q: %s", id.ID(), err) - } - } - - if !utils.ResponseWasNotFound(existing.Response) { - return tf.ImportAsExistsError("azurerm_sql_managed_database", id.ID()) - } - } - - database := sql.ManagedDatabase{ - Location: utils.String(azure.NormalizeLocation(d.Get("location").(string))), - } - - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ManagedInstanceName, id.DatabaseName, database) - if err != nil { - return fmt.Errorf("creating/updating SQL Managed Database %q: %+v", id.ID(), err) - } - - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for creating/updating to complete for SQL Managed Database %q: %+v", id.ID(), err) - } - - d.SetId(id.ID()) - - return resourceArmSqlManagedDatabaseRead(d, meta) -} - -func resourceArmSqlManagedDatabaseRead(d *schema.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.ManagedDatabasesClient - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := parse.ManagedDatabaseID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, id.ResourceGroup, id.ManagedInstanceName, id.DatabaseName) - if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - log.Printf("[INFO] Error reading SQL Managed Database %q - removing from state", d.Id()) - d.SetId("") - return nil - } - - return fmt.Errorf("reading SQL Managed Database %q: %v", id.ID(), err) - } - - d.Set("sql_managed_instance_id", parse.NewManagedInstanceID(id.SubscriptionId, id.ResourceGroup, id.ManagedInstanceName).ID()) - d.Set("name", resp.Name) - - if location := resp.Location; location != nil { - d.Set("location", azure.NormalizeLocation(*location)) - } - - return nil -} - -func resourceArmSqlManagedDatabaseDelete(d *schema.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.ManagedDatabasesClient - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := parse.ManagedDatabaseID(d.Id()) - if err != nil { - return err - } - - future, err := client.Delete(ctx, id.ResourceGroup, id.ManagedInstanceName, id.DatabaseName) - if err != nil { - return fmt.Errorf("deleting SQL Managed Database %q: %+v", id.ID(), err) - } - - return future.WaitForCompletionRef(ctx, client.Client) -} diff --git a/internal/services/sql/sql_managed_database_resource_test.go b/internal/services/sql/sql_managed_database_resource_test.go deleted file mode 100644 index ca45050a13c1e..0000000000000 --- a/internal/services/sql/sql_managed_database_resource_test.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package sql_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type SqlManagedDatabase struct{} - -func TestAccAzureRMSqlManagedDatabase_basic(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_managed_database", "test") - r := SqlManagedDatabase{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(""), - }) -} - -func (r SqlManagedDatabase) Exists(ctx context.Context, client *clients.Client, state *acceptance.InstanceState) (*bool, error) { - id, err := parse.ManagedDatabaseID(state.ID) - if err != nil { - return nil, err - } - - resp, err := client.Sql.ManagedDatabasesClient.Get(ctx, id.ResourceGroup, id.ManagedInstanceName, id.DatabaseName) - if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return utils.Bool(false), nil - } - return nil, fmt.Errorf("retrieving SQL Managed Database %q: %+v", id.ID(), err) - } - return utils.Bool(true), nil -} - -func (r SqlManagedDatabase) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -%s -resource "azurerm_sql_managed_database" "test" { - sql_managed_instance_id = azurerm_sql_managed_instance.test.id - name = "acctest-%d" - location = azurerm_resource_group.test.location -} -`, SqlManagedInstanceResource{}.basic(data), data.RandomInteger) -} diff --git a/internal/services/sql/sql_managed_instance_administrator_resource.go b/internal/services/sql/sql_managed_instance_administrator_resource.go deleted file mode 100644 index 437c94eec1f90..0000000000000 --- a/internal/services/sql/sql_managed_instance_administrator_resource.go +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package sql - -import ( - "fmt" - "log" - "net/http" - "time" - - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck - "github.com/gofrs/uuid" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceSqlManagedInstanceAdministrator() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceSqlManagedInstanceActiveDirectoryAdministratorCreateUpdate, - Read: resourceSqlManagedInstanceActiveDirectoryAdministratorRead, - Update: resourceSqlManagedInstanceActiveDirectoryAdministratorCreateUpdate, - Delete: resourceSqlManagedInstanceActiveDirectoryAdministratorDelete, - - DeprecationMessage: "The `azurerm_sql_managed_instance_active_directory_administrator` resource is deprecated and will be removed in version 4.0 of the AzureRM provider. Please use the `azurerm_mssql_managed_instance_active_directory_administrator` resource instead.", - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.ManagedInstanceAzureActiveDirectoryAdministratorID(id) - return err - }), - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Schema: map[string]*pluginsdk.Schema{ - "managed_instance_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "resource_group_name": commonschema.ResourceGroupName(), - - "login": { - Type: pluginsdk.TypeString, - Required: true, - }, - - "object_id": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.IsUUID, - }, - - "tenant_id": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.IsUUID, - }, - - "azuread_authentication_only": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: false, - }, - }, - } -} - -func resourceSqlManagedInstanceActiveDirectoryAdministratorCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.ManagedInstanceAdministratorsClient - aadOnlyAuthenticationsClient := meta.(*clients.Client).Sql.ManagedInstanceAzureADOnlyAuthenticationsClient - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := parse.NewManagedInstanceAzureActiveDirectoryAdministratorID(subscriptionId, d.Get("resource_group_name").(string), d.Get("managed_instance_name").(string), "activeDirectory") - login := d.Get("login").(string) - objectId := uuid.FromStringOrNil(d.Get("object_id").(string)) - tenantId := uuid.FromStringOrNil(d.Get("tenant_id").(string)) - - if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.ManagedInstanceName) - if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { - return fmt.Errorf("checking for presence of existing %q: %+v", id, err) - } - } - - if !utils.ResponseWasNotFound(existing.Response) { - return tf.ImportAsExistsError("azurerm_sql_managed_instance_active_directory_administrator", id.ID()) - } - } - - if !d.IsNewResource() { - aadOnlyDeleteFuture, err := aadOnlyAuthenticationsClient.Delete(ctx, id.ResourceGroup, id.ManagedInstanceName) - if err != nil { - if aadOnlyDeleteFuture.Response() == nil || aadOnlyDeleteFuture.Response().StatusCode != http.StatusBadRequest { - return fmt.Errorf("deleting AD Only Authentications %s: %+v", id.String(), err) - } - log.Printf("[INFO] AD Only Authentication is not removed as AD Admin is not set for %s: %+v", id.String(), err) - } else if err = aadOnlyDeleteFuture.WaitForCompletionRef(ctx, aadOnlyAuthenticationsClient.Client); err != nil { - return fmt.Errorf("waiting for deletion of AD Only Authentications %s: %+v", id.String(), err) - } - } - - parameters := sql.ManagedInstanceAdministrator{ - ManagedInstanceAdministratorProperties: &sql.ManagedInstanceAdministratorProperties{ - AdministratorType: utils.String("ActiveDirectory"), - Login: utils.String(login), - Sid: &objectId, - TenantID: &tenantId, - }, - } - - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ManagedInstanceName, parameters) - if err != nil { - return fmt.Errorf("creating/updating %q: %+v", id, err) - } - - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for creation/update of %q: %+v", id, err) - } - - aadOnlyAuthentictionsParams := sql.ManagedInstanceAzureADOnlyAuthentication{ - ManagedInstanceAzureADOnlyAuthProperties: &sql.ManagedInstanceAzureADOnlyAuthProperties{ - AzureADOnlyAuthentication: utils.Bool(d.Get("azuread_authentication_only").(bool)), - }, - } - aadOnlyEnabledFuture, err := aadOnlyAuthenticationsClient.CreateOrUpdate(ctx, id.ResourceGroup, id.ManagedInstanceName, aadOnlyAuthentictionsParams) - if err != nil { - return fmt.Errorf("setting AAD only authentication for %s: %+v", id.String(), err) - } - - if err = aadOnlyEnabledFuture.WaitForCompletionRef(ctx, aadOnlyAuthenticationsClient.Client); err != nil { - return fmt.Errorf("waiting for setting of AAD only authentication for %s: %+v", id.String(), err) - } - - d.SetId(id.ID()) - - return nil -} - -func resourceSqlManagedInstanceActiveDirectoryAdministratorRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.ManagedInstanceAdministratorsClient - aadOnlyAuthenticationsClient := meta.(*clients.Client).Sql.ManagedInstanceAzureADOnlyAuthenticationsClient - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := parse.ManagedInstanceAzureActiveDirectoryAdministratorID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, id.ResourceGroup, id.ManagedInstanceName) - if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - log.Printf("[INFO] %q was not found - removing from state", id) - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving %q: %+v", id, err) - } - - d.Set("managed_instance_name", id.ManagedInstanceName) - d.Set("resource_group_name", id.ResourceGroup) - d.Set("login", resp.Login) - d.Set("object_id", resp.Sid.String()) - d.Set("tenant_id", resp.TenantID.String()) - - respAadOnly, err := aadOnlyAuthenticationsClient.Get(ctx, id.ResourceGroup, id.ManagedInstanceName) - if err != nil { - return fmt.Errorf("reading AAD only authentication for %s: %+v", id.String(), err) - } - aadOnly := false - if authProps := respAadOnly.ManagedInstanceAzureADOnlyAuthProperties; authProps != nil && authProps.AzureADOnlyAuthentication != nil { - aadOnly = *authProps.AzureADOnlyAuthentication - } - d.Set("azuread_authentication_only", aadOnly) - - return nil -} - -func resourceSqlManagedInstanceActiveDirectoryAdministratorDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.ManagedInstanceAdministratorsClient - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := parse.ManagedInstanceAzureActiveDirectoryAdministratorID(d.Id()) - if err != nil { - return err - } - - future, err := client.Delete(ctx, id.ResourceGroup, id.ManagedInstanceName) - if err != nil { - return fmt.Errorf("deleting %q: %+v", id, err) - } - if err := future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for deletion of %q: %+v", id, err) - } - - return nil -} diff --git a/internal/services/sql/sql_managed_instance_administrator_resource_test.go b/internal/services/sql/sql_managed_instance_administrator_resource_test.go deleted file mode 100644 index 8dfea146a9d0b..0000000000000 --- a/internal/services/sql/sql_managed_instance_administrator_resource_test.go +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package sql_test - -import ( - "context" - "fmt" - "testing" - "time" - - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type SqlMiAdministratorResource struct{} - -func TestAccSqlMiAdministrator_basic(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_managed_instance_active_directory_administrator", "test") - r := SqlMiAdministratorResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.template(data), - }, - { - PreConfig: func() { time.Sleep(5 * time.Minute) }, - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.basicWithAadAuthOnlyEqualTo(data, true), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.basicWithAadAuthOnlyEqualTo(data, false), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - -func TestAccSqlMiAdministrator_requiresImport(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_managed_instance_active_directory_administrator", "test") - r := SqlMiAdministratorResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.template(data), - }, - { - PreConfig: func() { time.Sleep(5 * time.Minute) }, - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func (r SqlMiAdministratorResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.ManagedInstanceAzureActiveDirectoryAdministratorID(state.ID) - if err != nil { - return nil, err - } - - resp, err := client.Sql.ManagedInstanceAdministratorsClient.Get(ctx, id.ResourceGroup, id.ManagedInstanceName) - if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return utils.Bool(false), nil - } - return nil, fmt.Errorf("retrieving %q: %+v", id, err) - } - return utils.Bool(true), nil -} - -func (r SqlMiAdministratorResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_sql_managed_instance_active_directory_administrator" "test" { - managed_instance_name = azurerm_sql_managed_instance.test.name - resource_group_name = azurerm_resource_group.test.name - login = data.azuread_service_principal.test.display_name - tenant_id = data.azurerm_client_config.current.tenant_id - object_id = data.azurerm_client_config.current.client_id - - depends_on = [azuread_directory_role_member.test] -} -`, r.template(data)) -} - -func (r SqlMiAdministratorResource) basicWithAadAuthOnlyEqualTo(data acceptance.TestData, aadAuthOnly bool) string { - return fmt.Sprintf(` -%s - -resource "azurerm_sql_managed_instance_active_directory_administrator" "test" { - managed_instance_name = azurerm_sql_managed_instance.test.name - resource_group_name = azurerm_resource_group.test.name - login = data.azuread_service_principal.test.display_name - tenant_id = data.azurerm_client_config.current.tenant_id - object_id = data.azurerm_client_config.current.client_id - azuread_authentication_only = %t -} -`, r.template(data), aadAuthOnly) -} - -func (r SqlMiAdministratorResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_sql_managed_instance_active_directory_administrator" "import" { - managed_instance_name = azurerm_sql_managed_instance_active_directory_administrator.test.managed_instance_name - resource_group_name = azurerm_sql_managed_instance_active_directory_administrator.test.resource_group_name - login = azurerm_sql_managed_instance_active_directory_administrator.test.login - tenant_id = azurerm_sql_managed_instance_active_directory_administrator.test.tenant_id - object_id = azurerm_sql_managed_instance_active_directory_administrator.test.object_id -} -`, r.basic(data)) -} - -func (r SqlMiAdministratorResource) template(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azuread_directory_role" "reader" { - display_name = "Directory Readers" -} - -data "azurerm_client_config" "current" {} - -data "azuread_service_principal" "test" { - object_id = data.azurerm_client_config.current.object_id -} - -resource "azuread_directory_role_member" "test" { - role_object_id = azuread_directory_role.reader.object_id - member_object_id = azurerm_sql_managed_instance.test.identity.0.principal_id -} -`, SqlManagedInstanceResource{}.identity(data)) -} diff --git a/internal/services/sql/sql_managed_instance_data_source.go b/internal/services/sql/sql_managed_instance_data_source.go deleted file mode 100644 index bc2f2ff08dcdf..0000000000000 --- a/internal/services/sql/sql_managed_instance_data_source.go +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package sql - -import ( - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/tags" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func dataSourceArmSqlMiServer() *schema.Resource { - return &schema.Resource{ - Read: dataSourceArmSqlMiServerRead, - - DeprecationMessage: "The `azurerm_sql_managed_instance` data source is deprecated and will be removed in version 4.0 of the AzureRM provider. Please use the `azurerm_mssql_managed_instance` data source instead.", - - Timeouts: &schema.ResourceTimeout{ - Read: schema.DefaultTimeout(5 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validate.ValidateMsSqlServerName, - }, - - "resource_group_name": commonschema.ResourceGroupNameForDataSource(), - - "location": commonschema.LocationComputed(), - - "sku_name": { - Type: schema.TypeString, - Computed: true, - }, - - "administrator_login": { - Type: schema.TypeString, - Computed: true, - }, - - "vcores": { - Type: schema.TypeInt, - Computed: true, - }, - - "storage_size_in_gb": { - Type: schema.TypeInt, - Computed: true, - }, - - "license_type": { - Type: schema.TypeString, - Computed: true, - }, - - "subnet_id": { - Type: schema.TypeString, - Computed: true, - }, - - "collation": { - Type: schema.TypeString, - Computed: true, - }, - - "public_data_endpoint_enabled": { - Type: schema.TypeBool, - Computed: true, - }, - - "minimum_tls_version": { - Type: schema.TypeString, - Computed: true, - }, - - "proxy_override": { - Type: schema.TypeString, - Computed: true, - }, - - "timezone_id": { - Type: schema.TypeString, - Computed: true, - }, - - "fqdn": { - Type: schema.TypeString, - Computed: true, - }, - - "dns_zone_partner_id": { - Type: schema.TypeString, - Computed: true, - }, - - "identity": commonschema.SystemAssignedIdentityComputed(), - - "storage_account_type": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "tags": tags.Schema(), - }, - } -} - -func dataSourceArmSqlMiServerRead(d *schema.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.ManagedInstancesClient - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := parse.NewManagedInstanceID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) - - resp, err := client.Get(ctx, id.ResourceGroup, id.Name, "") - if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return fmt.Errorf("%s was not found", id) - } - - return fmt.Errorf("reading SQL Managed Instance %q: %v", id.ID(), err) - } - - d.SetId(id.ID()) - - d.Set("name", id.Name) - d.Set("resource_group_name", id.ResourceGroup) - - d.Set("location", location.NormalizeNilable(resp.Location)) - - if sku := resp.Sku; sku != nil { - d.Set("sku_name", sku.Name) - } - - if err := d.Set("identity", flattenManagedInstanceIdentity(resp.Identity)); err != nil { - return fmt.Errorf("setting `identity`: %+v", err) - } - - if props := resp.ManagedInstanceProperties; props != nil { - d.Set("license_type", string(props.LicenseType)) - d.Set("administrator_login", props.AdministratorLogin) - d.Set("subnet_id", props.SubnetID) - d.Set("storage_size_in_gb", props.StorageSizeInGB) - d.Set("vcores", props.VCores) - d.Set("fqdn", props.FullyQualifiedDomainName) - d.Set("collation", props.Collation) - d.Set("public_data_endpoint_enabled", props.PublicDataEndpointEnabled) - d.Set("minimum_tls_version", props.MinimalTLSVersion) - d.Set("proxy_override", props.ProxyOverride) - d.Set("timezone_id", props.TimezoneID) - d.Set("storage_account_type", props.StorageAccountType) - } - - return tags.FlattenAndSet(d, resp.Tags) -} diff --git a/internal/services/sql/sql_managed_instance_data_source_test.go b/internal/services/sql/sql_managed_instance_data_source_test.go deleted file mode 100644 index 33fb57efccf06..0000000000000 --- a/internal/services/sql/sql_managed_instance_data_source_test.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package sql_test - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" -) - -type SqlManagedInstanceDataSource struct{} - -func TestAccDataSourceSqlManagedInstance_basic(t *testing.T) { - data := acceptance.BuildTestData(t, "data.azurerm_sql_managed_instance", "test") - - data.DataSourceTest(t, []acceptance.TestStep{ - { - Config: SqlManagedInstanceDataSource{}.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).Key("location").Exists(), - check.That(data.ResourceName).Key("name").Exists(), - check.That(data.ResourceName).Key("resource_group_name").Exists(), - check.That(data.ResourceName).Key("tags.%").HasValue("2"), - ), - }, - }) -} - -func (d SqlManagedInstanceDataSource) basic(data acceptance.TestData) string { - template := SqlManagedInstanceResource{}.basic(data) - return fmt.Sprintf(` -%s - -data "azurerm_sql_managed_instance" "test" { - name = azurerm_sql_managed_instance.test.name - resource_group_name = azurerm_resource_group.test.name -} -`, template) -} diff --git a/internal/services/sql/sql_managed_instance_failover_group_resource.go b/internal/services/sql/sql_managed_instance_failover_group_resource.go deleted file mode 100644 index 65fb7a0d8f1f1..0000000000000 --- a/internal/services/sql/sql_managed_instance_failover_group_resource.go +++ /dev/null @@ -1,359 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package sql - -import ( - "fmt" - "time" - - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceSqlInstanceFailoverGroup() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceSqlInstanceFailoverGroupCreateUpdate, - Read: resourceSqlInstanceFailoverGroupRead, - Update: resourceSqlInstanceFailoverGroupCreateUpdate, - Delete: resourceSqlInstanceFailoverGroupDelete, - - DeprecationMessage: "The `azurerm_sql_managed_instance_failover_group` resource is deprecated and will be removed in version 4.0 of the AzureRM provider. Please use the `azurerm_mssql_managed_instance_failover_group` resource instead.", - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.InstanceFailoverGroupID(id) - return err - }), - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.ValidateMsSqlFailoverGroupName, - }, - - "location": commonschema.Location(), - - "resource_group_name": commonschema.ResourceGroupName(), - - "managed_instance_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.ValidateMsSqlServerName, - }, - - "partner_managed_instance_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: azure.ValidateResourceID, - }, - - "partner_region": { - Type: pluginsdk.TypeList, - Computed: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "location": commonschema.LocationComputed(), - - "role": { - Type: pluginsdk.TypeString, - Computed: true, - }, - }, - }, - }, - - "readonly_endpoint_failover_policy_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: true, - }, - - "read_write_endpoint_failover_policy": { - Type: pluginsdk.TypeList, - Required: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "mode": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - string(sql.ReadWriteEndpointFailoverPolicyAutomatic), - string(sql.ReadWriteEndpointFailoverPolicyManual), - }, false), - }, - "grace_minutes": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(60), - }, - }, - }, - }, - - "role": { - Type: pluginsdk.TypeString, - Computed: true, - }, - }, - } -} - -func resourceSqlInstanceFailoverGroupCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.InstanceFailoverGroupsClient - instanceClient := meta.(*clients.Client).Sql.ManagedInstancesClient - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := parse.NewInstanceFailoverGroupID(subscriptionId, d.Get("resource_group_name").(string), d.Get("location").(string), d.Get("name").(string)) - - if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.LocationName, id.Name) - if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { - return fmt.Errorf("checking for presence of existing %q: %+v", id, err) - } - } - - if !utils.ResponseWasNotFound(existing.Response) { - return tf.ImportAsExistsError("azurerm_sql_failover_group", id.ID()) - } - } - - partnerRegions := make([]sql.PartnerRegionInfo, 0) - partnerId, err := parse.ManagedInstanceID(d.Get("partner_managed_instance_id").(string)) - if err != nil { - return err - } - resp, err := instanceClient.Get(ctx, partnerId.ResourceGroup, partnerId.Name, "") - if err != nil || resp.Location == nil || *resp.Location == "" { - return fmt.Errorf("checking for existence and region of Partner of %q: %+v", id, err) - } - - regionInfo := sql.PartnerRegionInfo{ - Location: utils.String(*resp.Location), - } - partnerRegions = append(partnerRegions, regionInfo) - - primaryInstanceId := parse.NewManagedInstanceID(subscriptionId, id.ResourceGroup, d.Get("managed_instance_name").(string)) - properties := sql.InstanceFailoverGroup{ - InstanceFailoverGroupProperties: &sql.InstanceFailoverGroupProperties{ - ReadOnlyEndpoint: expandSqlInstanceFailoverGroupReadOnlyPolicy(d), - ReadWriteEndpoint: expandSqlInstanceFailoverGroupReadWritePolicy(d), - ManagedInstancePairs: expandSqlInstanceFailoverGroupManagedInstanceId(d, primaryInstanceId), - PartnerRegions: &partnerRegions, - }, - } - - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.LocationName, id.Name, properties) - if err != nil { - return fmt.Errorf("issuing create/update request for %q: %+v", id, err) - } - - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting on create/update future for %q: %+v", id, err) - } - - d.SetId(id.ID()) - - return resourceSqlInstanceFailoverGroupRead(d, meta) -} - -func resourceSqlInstanceFailoverGroupRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.InstanceFailoverGroupsClient - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := parse.InstanceFailoverGroupID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, id.ResourceGroup, id.LocationName, id.Name) - if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - d.SetId("") - return nil - } - return fmt.Errorf("retrieving Failover Group %q (Location %q / Resource Group %q): %+v", id.Name, id.LocationName, id.ResourceGroup, err) - } - - d.Set("name", id.Name) - d.Set("location", azure.NormalizeLocation(id.LocationName)) - d.Set("resource_group_name", id.ResourceGroup) - - if props := resp.InstanceFailoverGroupProperties; props != nil { - name, err := flattenSqlInstanceFailoverGroupPrimaryInstance(props.ManagedInstancePairs, props.ReplicationRole) - if err != nil { - return fmt.Errorf("flatten `managed_instance_name`: %+v", err) - } - - if err := d.Set("managed_instance_name", name); err != nil { - return fmt.Errorf("setting `managed_instance_name`: %+v", err) - } - - if err := d.Set("read_write_endpoint_failover_policy", flattenSqlInstanceFailoverGroupReadWritePolicy(props.ReadWriteEndpoint)); err != nil { - return fmt.Errorf("setting `read_write_endpoint_failover_policy`: %+v", err) - } - - if err := d.Set("readonly_endpoint_failover_policy_enabled", props.ReadOnlyEndpoint.FailoverPolicy == sql.ReadOnlyEndpointFailoverPolicyEnabled); err != nil { - return fmt.Errorf("setting `readonly_endpoint_failover_policy_enabled`: %+v", err) - } - - d.Set("role", string(props.ReplicationRole)) - - partnerManagedInstanceId, err := flattenSqlInstanceFailoverGroupManagedInstance(props.ManagedInstancePairs) - if err != nil { - return fmt.Errorf("flatten `partner_managed_instance_id`: %+v", err) - } - if err := d.Set("partner_managed_instance_id", partnerManagedInstanceId); err != nil { - return fmt.Errorf("setting `partner_managed_instance_id`: %+v", err) - } - - if err := d.Set("partner_region", flattenSqlInstanceFailoverGroupPartnerRegions(props.PartnerRegions)); err != nil { - return fmt.Errorf("setting `partner_region`: %+v", err) - } - } - - return nil -} - -func resourceSqlInstanceFailoverGroupDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.InstanceFailoverGroupsClient - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := parse.InstanceFailoverGroupID(d.Id()) - if err != nil { - return err - } - - future, err := client.Delete(ctx, id.ResourceGroup, id.LocationName, id.Name) - if err != nil { - return fmt.Errorf("deleting %q: %+v", id, err) - } - - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for deletion of %q: %+v", id, err) - } - - return err -} - -func expandSqlInstanceFailoverGroupReadWritePolicy(d *pluginsdk.ResourceData) *sql.InstanceFailoverGroupReadWriteEndpoint { - vs := d.Get("read_write_endpoint_failover_policy").([]interface{}) - v := vs[0].(map[string]interface{}) - - mode := sql.ReadWriteEndpointFailoverPolicy(v["mode"].(string)) - graceMins := int32(v["grace_minutes"].(int)) - - policy := &sql.InstanceFailoverGroupReadWriteEndpoint{ - FailoverPolicy: mode, - } - - if mode != sql.ReadWriteEndpointFailoverPolicyManual { - policy.FailoverWithDataLossGracePeriodMinutes = utils.Int32(graceMins) - } - - return policy -} - -func flattenSqlInstanceFailoverGroupReadWritePolicy(input *sql.InstanceFailoverGroupReadWriteEndpoint) []interface{} { - if input == nil { - return []interface{}{} - } - - policy := make(map[string]interface{}) - - policy["mode"] = string(input.FailoverPolicy) - - if input.FailoverWithDataLossGracePeriodMinutes != nil { - policy["grace_minutes"] = *input.FailoverWithDataLossGracePeriodMinutes - } - return []interface{}{policy} -} - -func expandSqlInstanceFailoverGroupReadOnlyPolicy(d *pluginsdk.ResourceData) *sql.InstanceFailoverGroupReadOnlyEndpoint { - mode := sql.ReadOnlyEndpointFailoverPolicyDisabled - if d.Get("readonly_endpoint_failover_policy_enabled").(bool) { - mode = sql.ReadOnlyEndpointFailoverPolicyEnabled - } - return &sql.InstanceFailoverGroupReadOnlyEndpoint{ - FailoverPolicy: mode, - } -} - -func expandSqlInstanceFailoverGroupManagedInstanceId(d *pluginsdk.ResourceData, primaryID parse.ManagedInstanceId) *[]sql.ManagedInstancePairInfo { - instanceId := d.Get("partner_managed_instance_id").(string) - partners := make([]sql.ManagedInstancePairInfo, 0) - - partners = append(partners, sql.ManagedInstancePairInfo{ - PrimaryManagedInstanceID: utils.String(primaryID.ID()), - PartnerManagedInstanceID: &instanceId, - }) - - return &partners -} - -func flattenSqlInstanceFailoverGroupPrimaryInstance(input *[]sql.ManagedInstancePairInfo, role sql.InstanceFailoverGroupReplicationRole) (string, error) { - id := "" - if input != nil && len(*input) >= 1 { - if managedInstancePairs := *input; managedInstancePairs[0].PrimaryManagedInstanceID != nil && role == sql.InstanceFailoverGroupReplicationRolePrimary { - id = *managedInstancePairs[0].PrimaryManagedInstanceID - } - if managedInstancePairs := *input; managedInstancePairs[0].PartnerManagedInstanceID != nil && role == sql.InstanceFailoverGroupReplicationRoleSecondary { - id = *managedInstancePairs[0].PartnerManagedInstanceID - } - } - - managedInstanceId, err := parse.ManagedInstanceIDInsensitively(id) - if err != nil { - return "", err - } - - return managedInstanceId.Name, nil -} - -func flattenSqlInstanceFailoverGroupManagedInstance(input *[]sql.ManagedInstancePairInfo) (string, error) { - if input == nil || len(*input) != 1 || (*input)[0].PartnerManagedInstanceID == nil { - return "", fmt.Errorf("invalid number of `partner_managed_instance_id` instances found") - } - - return *(*input)[0].PartnerManagedInstanceID, nil -} - -func flattenSqlInstanceFailoverGroupPartnerRegions(input *[]sql.PartnerRegionInfo) []map[string]interface{} { - result := make([]map[string]interface{}, 0) - - if input != nil { - for _, region := range *input { - result = append(result, map[string]interface{}{ - "location": location.NormalizeNilable(region.Location), - "role": string(region.ReplicationRole), - }) - } - } - return result -} diff --git a/internal/services/sql/sql_managed_instance_failover_group_resource_test.go b/internal/services/sql/sql_managed_instance_failover_group_resource_test.go deleted file mode 100644 index e3c2fd56ecaa6..0000000000000 --- a/internal/services/sql/sql_managed_instance_failover_group_resource_test.go +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package sql_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type SqlInstanceFailoverGroupResource struct{} - -func TestAccAzureRMSqlInstanceFailoverGroup_basic(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_managed_instance_failover_group", "test") - r := SqlInstanceFailoverGroupResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: SqlManagedInstanceResource{}.dnsZonePartner(data), - }, - { - // It speeds up deletion to remove the explicit dependency between the instances - Config: SqlManagedInstanceResource{}.emptyDnsZonePartner(data), - }, - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - Config: r.update(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - { - // disconnect - Config: SqlManagedInstanceResource{}.emptyDnsZonePartner(data), - }, - }) -} - -func (r SqlInstanceFailoverGroupResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.InstanceFailoverGroupID(state.ID) - if err != nil { - return nil, err - } - - resp, err := client.Sql.InstanceFailoverGroupsClient.Get(ctx, id.ResourceGroup, id.LocationName, id.Name) - if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return utils.Bool(false), nil - } - return nil, fmt.Errorf("retrieving SQL Instance Failover Group %q: %+v", id.ID(), err) - } - return utils.Bool(true), nil -} - -func (r SqlInstanceFailoverGroupResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -%s - -resource "azurerm_sql_managed_instance_failover_group" "test" { - name = "acctest-fog-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_sql_managed_instance.test.location - managed_instance_name = azurerm_sql_managed_instance.test.name - partner_managed_instance_id = azurerm_sql_managed_instance.secondary.id - - read_write_endpoint_failover_policy { - mode = "Manual" - } - - depends_on = [ - azurerm_virtual_network_gateway_connection.test, - azurerm_virtual_network_gateway_connection.secondary, - ] -} -`, SqlManagedInstanceResource{}.emptyDnsZonePartner(data), r.vnetToVnetGateway(data), data.RandomInteger) -} - -func (r SqlInstanceFailoverGroupResource) update(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -%s - -resource "azurerm_sql_managed_instance_failover_group" "test" { - name = "acctest-fog-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_sql_managed_instance.test.location - managed_instance_name = azurerm_sql_managed_instance.test.name - partner_managed_instance_id = azurerm_sql_managed_instance.secondary.id - - readonly_endpoint_failover_policy_enabled = true - - read_write_endpoint_failover_policy { - mode = "Automatic" - grace_minutes = 60 - } - - depends_on = [ - azurerm_virtual_network_gateway_connection.test, - azurerm_virtual_network_gateway_connection.secondary, - ] -} -`, SqlManagedInstanceResource{}.emptyDnsZonePartner(data), r.vnetToVnetGateway(data), data.RandomInteger) -} - -func (r SqlInstanceFailoverGroupResource) vnetToVnetGateway(data acceptance.TestData) string { - return fmt.Sprintf(` -variable "shared_key" { - default = "s3cr37" -} - -resource "azurerm_subnet" "gateway_snet_test" { - name = "GatewaySubnet" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.0.1.0/24"] -} - -resource "azurerm_public_ip" "test" { - name = "acctest-pip-%[1]d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - allocation_method = "Dynamic" -} - -resource "azurerm_virtual_network_gateway" "test" { - name = "acctest-vnetgway-%[1]d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - type = "Vpn" - vpn_type = "RouteBased" - sku = "Basic" - - ip_configuration { - name = "vnetGatewayConfig" - public_ip_address_id = azurerm_public_ip.test.id - private_ip_address_allocation = "Dynamic" - subnet_id = azurerm_subnet.gateway_snet_test.id - } -} - -resource "azurerm_virtual_network_gateway_connection" "test" { - name = "acctest-gwc-%[1]d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - type = "Vnet2Vnet" - virtual_network_gateway_id = azurerm_virtual_network_gateway.test.id - peer_virtual_network_gateway_id = azurerm_virtual_network_gateway.secondary.id - - shared_key = var.shared_key -} - -resource "azurerm_subnet" "gateway_snet_secondary" { - name = "GatewaySubnet" - resource_group_name = azurerm_resource_group.secondary.name - virtual_network_name = azurerm_virtual_network.secondary.name - address_prefixes = ["10.1.1.0/24"] -} - -resource "azurerm_public_ip" "secondary" { - name = "acctest-pip2-%[1]d" - location = azurerm_resource_group.secondary.location - resource_group_name = azurerm_resource_group.secondary.name - allocation_method = "Dynamic" -} - -resource "azurerm_virtual_network_gateway" "secondary" { - name = "acctest-vnetgway2-%[1]d" - location = azurerm_resource_group.secondary.location - resource_group_name = azurerm_resource_group.secondary.name - - type = "Vpn" - vpn_type = "RouteBased" - sku = "Basic" - - ip_configuration { - name = "vnetGatewayConfig" - public_ip_address_id = azurerm_public_ip.secondary.id - private_ip_address_allocation = "Dynamic" - subnet_id = azurerm_subnet.gateway_snet_secondary.id - } -} - -resource "azurerm_virtual_network_gateway_connection" "secondary" { - name = "acctest-gwc2-%[1]d" - location = azurerm_resource_group.secondary.location - resource_group_name = azurerm_resource_group.secondary.name - - type = "Vnet2Vnet" - virtual_network_gateway_id = azurerm_virtual_network_gateway.secondary.id - peer_virtual_network_gateway_id = azurerm_virtual_network_gateway.test.id - - shared_key = var.shared_key -} -`, data.RandomInteger) -} diff --git a/internal/services/sql/sql_managed_instance_resource.go b/internal/services/sql/sql_managed_instance_resource.go deleted file mode 100644 index aee7ee35892ed..0000000000000 --- a/internal/services/sql/sql_managed_instance_resource.go +++ /dev/null @@ -1,416 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package sql - -import ( - "context" - "fmt" - "log" - "strings" - "time" - - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/tags" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceArmSqlMiServer() *schema.Resource { - return &schema.Resource{ - Create: resourceArmSqlMiServerCreateUpdate, - Read: resourceArmSqlMiServerRead, - Update: resourceArmSqlMiServerCreateUpdate, - Delete: resourceArmSqlMiServerDelete, - - DeprecationMessage: "The `azurerm_sql_managed_instance` resource is deprecated and will be removed in version 4.0 of the AzureRM provider. Please use the `azurerm_mssql_managed_instance` resource instead.", - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.ManagedInstanceID(id) - return err - }), - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(24 * time.Hour), - Read: schema.DefaultTimeout(5 * time.Minute), - Update: schema.DefaultTimeout(24 * time.Hour), - Delete: schema.DefaultTimeout(24 * time.Hour), - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.ValidateMsSqlServerName, - }, - - "location": commonschema.Location(), - - "resource_group_name": commonschema.ResourceGroupName(), - - "sku_name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - "GP_Gen4", - "GP_Gen5", - "BC_Gen4", - "BC_Gen5", - }, false), - }, - - "administrator_login": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "administrator_login_password": { - Type: schema.TypeString, - Required: true, - Sensitive: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "vcores": { - Type: schema.TypeInt, - Required: true, - ValidateFunc: validation.IntInSlice([]int{ - 4, - 8, - 16, - 24, - 32, - 40, - 64, - 80, - }), - }, - - "storage_size_in_gb": { - Type: schema.TypeInt, - Required: true, - ValidateFunc: validation.IntBetween(32, 16384), - }, - - "license_type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - "LicenseIncluded", - "BasePrice", - }, false), - }, - - "subnet_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: commonids.ValidateSubnetID, - }, - - "collation": { - Type: schema.TypeString, - Optional: true, - Default: "SQL_Latin1_General_CP1_CI_AS", - ValidateFunc: validation.StringIsNotEmpty, - ForceNew: true, - }, - - "public_data_endpoint_enabled": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "minimum_tls_version": { - Type: schema.TypeString, - Optional: true, - Default: "1.2", - ValidateFunc: validation.StringInSlice([]string{ - "1.0", - "1.1", - "1.2", - }, false), - }, - - "proxy_override": { - Type: schema.TypeString, - Optional: true, - Default: string(sql.ManagedInstanceProxyOverrideDefault), - ValidateFunc: validation.StringInSlice([]string{ - string(sql.ManagedInstanceProxyOverrideDefault), - string(sql.ManagedInstanceProxyOverrideRedirect), - string(sql.ManagedInstanceProxyOverrideProxy), - }, false), - }, - - "timezone_id": { - Type: schema.TypeString, - Optional: true, - Default: "UTC", - ValidateFunc: validation.StringIsNotEmpty, - ForceNew: true, - }, - - "fqdn": { - Type: schema.TypeString, - Computed: true, - }, - - "dns_zone_partner_id": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: azure.ValidateResourceID, - }, - - // TODO: support User Assigned https://github.com/hashicorp/terraform-provider-azurerm/issues/15277 - "identity": commonschema.SystemAssignedIdentityOptional(), - - "storage_account_type": { - Type: pluginsdk.TypeString, - Optional: true, - ForceNew: true, - Default: string(sql.StorageAccountTypeGRS), - ValidateFunc: validation.StringInSlice([]string{ - string(sql.StorageAccountTypeGRS), - string(sql.StorageAccountTypeLRS), - string(sql.StorageAccountTypeZRS), - }, false), - }, - - "tags": tags.Schema(), - }, - - CustomizeDiff: pluginsdk.CustomDiffWithAll( - // dns_zone_partner_id can only be set on init - pluginsdk.ForceNewIfChange("dns_zone_partner_id", func(ctx context.Context, old, new, _ interface{}) bool { - return old.(string) == "" && new.(string) != "" - }), - ), - } -} - -func resourceArmSqlMiServerCreateUpdate(d *schema.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.ManagedInstancesClient - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - name := d.Get("name").(string) - resGroup := d.Get("resource_group_name").(string) - id := parse.NewManagedInstanceID(subscriptionId, resGroup, name) - - if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.Name, "") - if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { - return fmt.Errorf("checking for presence of existing Managed Instance %q: %s", id.ID(), err) - } - } - - if !utils.ResponseWasNotFound(existing.Response) { - return tf.ImportAsExistsError("azurerm_sql_managed_instance", id.ID()) - } - } - - sku, err := expandManagedInstanceSkuName(d.Get("sku_name").(string)) - if err != nil { - return fmt.Errorf("error expanding `sku_name` for SQL Managed Instance Server %q: %v", id.ID(), err) - } - - parameters := sql.ManagedInstance{ - Sku: sku, - Location: utils.String(azure.NormalizeLocation(d.Get("location").(string))), - Tags: tags.Expand(d.Get("tags").(map[string]interface{})), - ManagedInstanceProperties: &sql.ManagedInstanceProperties{ - LicenseType: sql.ManagedInstanceLicenseType(d.Get("license_type").(string)), - AdministratorLogin: utils.String(d.Get("administrator_login").(string)), - AdministratorLoginPassword: utils.String(d.Get("administrator_login_password").(string)), - SubnetID: utils.String(d.Get("subnet_id").(string)), - StorageSizeInGB: utils.Int32(int32(d.Get("storage_size_in_gb").(int))), - VCores: utils.Int32(int32(d.Get("vcores").(int))), - Collation: utils.String(d.Get("collation").(string)), - PublicDataEndpointEnabled: utils.Bool(d.Get("public_data_endpoint_enabled").(bool)), - MinimalTLSVersion: utils.String(d.Get("minimum_tls_version").(string)), - ProxyOverride: sql.ManagedInstanceProxyOverride(d.Get("proxy_override").(string)), - TimezoneID: utils.String(d.Get("timezone_id").(string)), - DNSZonePartner: utils.String(d.Get("dns_zone_partner_id").(string)), - StorageAccountType: sql.StorageAccountType(d.Get("storage_account_type").(string)), - }, - } - - identity, err := expandManagedInstanceIdentity(d.Get("identity").([]interface{}), d.IsNewResource()) - if err != nil { - return fmt.Errorf(`expanding "identity": %v`, err) - } - parameters.Identity = identity - - future, err := client.CreateOrUpdate(ctx, resGroup, name, parameters) - if err != nil { - return err - } - - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - if response.WasConflict(future.Response()) { - return fmt.Errorf("sql managed instance names need to be globally unique and %q is already in use", name) - } - - return err - } - - d.SetId(id.ID()) - - return resourceArmSqlMiServerRead(d, meta) -} - -func resourceArmSqlMiServerRead(d *schema.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.ManagedInstancesClient - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := parse.ManagedInstanceID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, id.ResourceGroup, id.Name, "") - if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - log.Printf("[INFO] Error reading SQL Managed Instance %q - removing from state", d.Id()) - d.SetId("") - return nil - } - - return fmt.Errorf("reading SQL Managed Instance %q: %v", id.ID(), err) - } - - d.Set("name", id.Name) - d.Set("resource_group_name", id.ResourceGroup) - - if location := resp.Location; location != nil { - d.Set("location", azure.NormalizeLocation(*location)) - } - - if sku := resp.Sku; sku != nil { - d.Set("sku_name", sku.Name) - } - - if err := d.Set("identity", flattenManagedInstanceIdentity(resp.Identity)); err != nil { - return fmt.Errorf("setting `identity`: %+v", err) - } - - if props := resp.ManagedInstanceProperties; props != nil { - d.Set("license_type", props.LicenseType) - d.Set("administrator_login", props.AdministratorLogin) - d.Set("subnet_id", props.SubnetID) - d.Set("storage_size_in_gb", props.StorageSizeInGB) - d.Set("vcores", props.VCores) - d.Set("fqdn", props.FullyQualifiedDomainName) - d.Set("collation", props.Collation) - d.Set("public_data_endpoint_enabled", props.PublicDataEndpointEnabled) - d.Set("minimum_tls_version", props.MinimalTLSVersion) - d.Set("proxy_override", props.ProxyOverride) - d.Set("timezone_id", props.TimezoneID) - d.Set("storage_account_type", props.StorageAccountType) - // This value is not returned from the api so we'll just set whatever is in the config - d.Set("administrator_login_password", d.Get("administrator_login_password").(string)) - } - - return tags.FlattenAndSet(d, resp.Tags) -} - -func resourceArmSqlMiServerDelete(d *schema.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.ManagedInstancesClient - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := parse.ManagedInstanceID(d.Id()) - if err != nil { - return err - } - - future, err := client.Delete(ctx, id.ResourceGroup, id.Name) - if err != nil { - return fmt.Errorf("deleting SQL Managed Instance %q: %+v", id.ID(), err) - } - - return future.WaitForCompletionRef(ctx, client.Client) -} - -func expandManagedInstanceSkuName(skuName string) (*sql.Sku, error) { - parts := strings.Split(skuName, "_") - if len(parts) != 2 { - return nil, fmt.Errorf("sku_name (%s) has the wrong number of parts (%d) after splitting on _", skuName, len(parts)) - } - - var tier string - switch parts[0] { - case "GP": - tier = "GeneralPurpose" - case "BC": - tier = "BusinessCritical" - default: - return nil, fmt.Errorf("sku_name %s has unknown sku tier %s", skuName, parts[0]) - } - - return &sql.Sku{ - Name: utils.String(skuName), - Tier: utils.String(tier), - Family: utils.String(parts[1]), - }, nil -} - -func expandManagedInstanceIdentity(input []interface{}, isNewResource bool) (*sql.ResourceIdentity, error) { - config, err := identity.ExpandSystemAssigned(input) - if err != nil { - return nil, err - } - - // Workaround for issue https://github.com/Azure/azure-rest-api-specs/issues/16838 - if config.Type == identity.Type("None") && isNewResource { - return nil, nil - } - - return &sql.ResourceIdentity{ - Type: sql.IdentityType(config.Type), - }, nil -} - -func flattenManagedInstanceIdentity(input *sql.ResourceIdentity) []interface{} { - var config *identity.SystemAssigned - - if input != nil { - principalId := "" - if input.PrincipalID != nil { - principalId = input.PrincipalID.String() - } - - tenantId := "" - if input.TenantID != nil { - tenantId = input.TenantID.String() - } - - config = &identity.SystemAssigned{ - Type: identity.Type(string(input.Type)), - PrincipalId: principalId, - TenantId: tenantId, - } - } - - return identity.FlattenSystemAssigned(config) -} diff --git a/internal/services/sql/sql_managed_instance_resource_test.go b/internal/services/sql/sql_managed_instance_resource_test.go deleted file mode 100644 index de1e0bf6fece9..0000000000000 --- a/internal/services/sql/sql_managed_instance_resource_test.go +++ /dev/null @@ -1,4181 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package sql_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type SqlManagedInstanceResource struct{} - -func TestAccAzureRMSqlMiServer_basic(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_managed_instance", "test") - r := SqlManagedInstanceResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password"), - }) -} - -func TestAccAzureRMSqlMiServer_backupRedundancyLRS(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_managed_instance", "test") - r := SqlManagedInstanceResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.storageType(data, "LRS"), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password"), - }) -} - -func TestAccAzureRMSqlMiServer_identity(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_managed_instance", "test") - r := SqlManagedInstanceResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("identity.#").HasValue("0"), - ), - }, - data.ImportStep("administrator_login_password"), - { - Config: r.identity(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("identity.#").HasValue("1"), - check.That(data.ResourceName).Key("identity.0.type").HasValue("SystemAssigned"), - ), - }, - data.ImportStep("administrator_login_password"), - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("identity.#").HasValue("0"), - ), - }, - data.ImportStep("administrator_login_password"), - }) -} - -func TestAccAzureRMSqlMiServer_update(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_managed_instance", "test") - r := SqlManagedInstanceResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password"), - { - Config: r.update(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password"), - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password"), - }) -} - -func TestAccAzureRMSqlMiServer_multiple(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_managed_instance", "test") - r := SqlManagedInstanceResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password"), - { - Config: r.multiple(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password"), - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password"), - }) -} - -func TestAccAzureRMSqlMiServer_dnsZonePartner(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_managed_instance", "test") - r := SqlManagedInstanceResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.dnsZonePartnerPrep(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password"), - { - Config: r.dnsZonePartner(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password", "dns_zone_partner_id"), - { - // DNS Zone Partner empty makes delete faster as MI can be destroyed simultaneously - Config: r.emptyDnsZonePartner(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password"), - }) -} - -func TestAccAzureRMSqlMiServer_multipleDnsZonePartners(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_managed_instance", "test") - r := SqlManagedInstanceResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.dnsZonePartnersPrep(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password"), - { - Config: r.dnsZonePartners(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password", "dns_zone_partner_id"), - { - // DNS Zone Partner empty makes delete faster as MI can be destroyed simultaneously - Config: r.emptyDnsZonePartners(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password"), - }) -} - -func (r SqlManagedInstanceResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.ManagedInstanceID(state.ID) - if err != nil { - return nil, err - } - - resp, err := client.Sql.ManagedInstancesClient.Get(ctx, id.ResourceGroup, id.Name, "") - if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return utils.Bool(false), nil - } - return nil, fmt.Errorf("retrieving SQL Managed Instance %q: %+v", id.ID(), err) - } - return utils.Bool(true), nil -} - -func (r SqlManagedInstanceResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_sql_managed_instance" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" - license_type = "BasePrice" - subnet_id = azurerm_subnet.test.id - sku_name = "GP_Gen5" - vcores = 4 - storage_size_in_gb = 32 - - depends_on = [ - azurerm_subnet_network_security_group_association.test, - azurerm_subnet_route_table_association.test, - ] - - tags = { - environment = "staging" - database = "test" - } -} -`, r.template(data), data.RandomInteger) -} - -func (r SqlManagedInstanceResource) storageType(data acceptance.TestData, storageAccountType string) string { - return fmt.Sprintf(` -%s - -resource "azurerm_sql_managed_instance" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" - license_type = "BasePrice" - subnet_id = azurerm_subnet.test.id - sku_name = "GP_Gen5" - vcores = 4 - storage_size_in_gb = 32 - storage_account_type = "%s" - - depends_on = [ - azurerm_subnet_network_security_group_association.test, - azurerm_subnet_route_table_association.test, - ] - - tags = { - environment = "staging" - database = "test" - } -} -`, r.template(data), data.RandomInteger, storageAccountType) -} - -func (r SqlManagedInstanceResource) identity(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_sql_managed_instance" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" - license_type = "BasePrice" - subnet_id = azurerm_subnet.test.id - sku_name = "GP_Gen5" - vcores = 4 - storage_size_in_gb = 32 - - depends_on = [ - azurerm_subnet_network_security_group_association.test, - azurerm_subnet_route_table_association.test, - ] - - identity { - type = "SystemAssigned" - } - - tags = { - environment = "staging" - database = "test" - } -} -`, r.template(data), data.RandomInteger) -} - -func (r SqlManagedInstanceResource) update(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_sql_managed_instance" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" - license_type = "BasePrice" - subnet_id = azurerm_subnet.test.id - sku_name = "GP_Gen5" - vcores = 8 - storage_size_in_gb = 64 - public_data_endpoint_enabled = true - proxy_override = "Proxy" - timezone_id = "Pacific Standard Time" - minimum_tls_version = "1.0" - - depends_on = [ - azurerm_subnet_network_security_group_association.test, - azurerm_subnet_route_table_association.test, - ] - - tags = { - environment = "production" - } -} -`, r.template(data), data.RandomInteger) -} - -func (r SqlManagedInstanceResource) multiple(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_sql_managed_instance" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" - license_type = "BasePrice" - subnet_id = azurerm_subnet.test.id - sku_name = "GP_Gen5" - vcores = 4 - storage_size_in_gb = 32 - - depends_on = [ - azurerm_subnet_network_security_group_association.test, - azurerm_subnet_route_table_association.test, - ] - - tags = { - environment = "staging" - database = "test" - } -} - -resource "azurerm_sql_managed_instance" "secondary" { - name = "acctestsqlserver2%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" - license_type = "BasePrice" - subnet_id = azurerm_subnet.test.id - sku_name = "GP_Gen5" - vcores = 4 - storage_size_in_gb = 32 - - depends_on = [ - azurerm_subnet_network_security_group_association.test, - azurerm_subnet_route_table_association.test, - ] - - tags = { - environment = "prod" - database = "test" - } -} -`, r.template(data), data.RandomInteger, data.RandomInteger) -} - -func (r SqlManagedInstanceResource) dnsZonePartnerPrep(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -%s -`, r.basic(data), r.templateSecondary(data)) -} - -func (r SqlManagedInstanceResource) dnsZonePartner(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -%s - -resource "azurerm_sql_managed_instance" "secondary" { - name = "acctestsqlserver2%d" - resource_group_name = azurerm_resource_group.secondary.name - location = azurerm_resource_group.secondary.location - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" - license_type = "BasePrice" - subnet_id = azurerm_subnet.secondary.id - sku_name = "GP_Gen5" - vcores = 4 - storage_size_in_gb = 32 - dns_zone_partner_id = azurerm_sql_managed_instance.test.id - - depends_on = [ - azurerm_subnet_network_security_group_association.secondary, - azurerm_subnet_route_table_association.secondary, - ] - - tags = { - environment = "prod" - database = "test" - } -} -`, r.basic(data), r.templateSecondary(data), data.RandomInteger) -} - -func (r SqlManagedInstanceResource) emptyDnsZonePartner(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -%s - -resource "azurerm_sql_managed_instance" "secondary" { - name = "acctestsqlserver2%d" - resource_group_name = azurerm_resource_group.secondary.name - location = azurerm_resource_group.secondary.location - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" - license_type = "BasePrice" - subnet_id = azurerm_subnet.secondary.id - sku_name = "GP_Gen5" - vcores = 4 - storage_size_in_gb = 32 - - depends_on = [ - azurerm_subnet_network_security_group_association.secondary, - azurerm_subnet_route_table_association.secondary, - ] - - tags = { - environment = "prod" - database = "test" - } -} -`, r.basic(data), r.templateSecondary(data), data.RandomInteger) -} - -func (r SqlManagedInstanceResource) dnsZonePartnersPrep(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -%s - -%s -`, r.basic(data), r.templateSecondary(data), r.templateExtraSecondary(data)) -} - -func (r SqlManagedInstanceResource) dnsZonePartners(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -%s - -resource "azurerm_sql_managed_instance" "secondary" { - name = "acctestsqlserver2%d" - resource_group_name = azurerm_resource_group.secondary.name - location = azurerm_resource_group.secondary.location - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" - license_type = "BasePrice" - subnet_id = azurerm_subnet.secondary.id - sku_name = "GP_Gen5" - vcores = 4 - storage_size_in_gb = 32 - dns_zone_partner_id = azurerm_sql_managed_instance.test.id - - depends_on = [ - azurerm_subnet_network_security_group_association.secondary, - azurerm_subnet_route_table_association.secondary, - ] - - tags = { - environment = "prod" - database = "test" - } -} - -%s - -resource "azurerm_sql_managed_instance" "secondary_2" { - name = "acctestsqlserver3%d" - resource_group_name = azurerm_resource_group.secondary_2.name - location = azurerm_resource_group.secondary_2.location - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" - license_type = "BasePrice" - subnet_id = azurerm_subnet.secondary_2.id - sku_name = "GP_Gen5" - vcores = 4 - storage_size_in_gb = 32 - dns_zone_partner_id = azurerm_sql_managed_instance.test.id - - depends_on = [ - azurerm_subnet_network_security_group_association.secondary_2, - azurerm_subnet_route_table_association.secondary_2, - ] - - tags = { - environment = "prod" - database = "test" - } -} -`, r.basic(data), r.templateSecondary(data), data.RandomInteger, r.templateExtraSecondary(data), data.RandomInteger) -} - -func (r SqlManagedInstanceResource) emptyDnsZonePartners(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -%s - -resource "azurerm_sql_managed_instance" "secondary" { - name = "acctestsqlserver2%d" - resource_group_name = azurerm_resource_group.secondary.name - location = azurerm_resource_group.secondary.location - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" - license_type = "BasePrice" - subnet_id = azurerm_subnet.secondary.id - sku_name = "GP_Gen5" - vcores = 4 - storage_size_in_gb = 32 - - depends_on = [ - azurerm_subnet_network_security_group_association.secondary, - azurerm_subnet_route_table_association.secondary, - ] - - tags = { - environment = "prod" - database = "test" - } -} - -%s - -resource "azurerm_sql_managed_instance" "secondary_2" { - name = "acctestsqlserver3%d" - resource_group_name = azurerm_resource_group.secondary_2.name - location = azurerm_resource_group.secondary_2.location - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" - license_type = "BasePrice" - subnet_id = azurerm_subnet.secondary_2.id - sku_name = "GP_Gen5" - vcores = 4 - storage_size_in_gb = 32 - - depends_on = [ - azurerm_subnet_network_security_group_association.secondary_2, - azurerm_subnet_route_table_association.secondary_2, - ] - - tags = { - environment = "prod" - database = "test" - } -} -`, r.basic(data), r.templateSecondary(data), data.RandomInteger, r.templateExtraSecondary(data), data.RandomInteger) -} - -func (r SqlManagedInstanceResource) template(data acceptance.TestData) string { - return fmt.Sprintf(` -resource "azurerm_resource_group" "test" { - name = "acctestRG1-sql-%[1]d" - location = "%[2]s" -} - -resource "azurerm_virtual_network" "test" { - name = "acctest-vnet1-%[1]d" - resource_group_name = azurerm_resource_group.test.name - address_space = ["10.0.0.0/16"] - location = azurerm_resource_group.test.location -} - -resource "azurerm_subnet" "test" { - name = "subnet1-%[1]d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.0.0.0/24"] - - delegation { - name = "managedinstancedelegation" - - service_delegation { - name = "Microsoft.Sql/managedInstances" - actions = ["Microsoft.Network/virtualNetworks/subnets/join/action", "Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action", "Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action"] - } - } -} - -resource "azurerm_network_security_group" "test" { - name = "mi-security-group1-%[1]d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name -} - -resource "azurerm_network_security_rule" "allow_management_inbound_1" { - name = "allow_management_inbound" - priority = 106 - direction = "Inbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_ranges = ["9000", "9003", "1438", "1440", "1452"] - source_address_prefix = "*" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.test.name - network_security_group_name = azurerm_network_security_group.test.name -} - -resource "azurerm_network_security_rule" "allow_misubnet_inbound_1" { - name = "allow_misubnet_inbound" - priority = 200 - direction = "Inbound" - access = "Allow" - protocol = "*" - source_port_range = "*" - destination_port_range = "*" - source_address_prefix = "10.0.0.0/24" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.test.name - network_security_group_name = azurerm_network_security_group.test.name -} - -resource "azurerm_network_security_rule" "allow_health_probe_inbound_1" { - name = "allow_health_probe_inbound" - priority = 300 - direction = "Inbound" - access = "Allow" - protocol = "*" - source_port_range = "*" - destination_port_range = "*" - source_address_prefix = "AzureLoadBalancer" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.test.name - network_security_group_name = azurerm_network_security_group.test.name -} - -resource "azurerm_network_security_rule" "allow_tds_inbound_1" { - name = "allow_tds_inbound" - priority = 1000 - direction = "Inbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_range = "1433" - source_address_prefix = "VirtualNetwork" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.test.name - network_security_group_name = azurerm_network_security_group.test.name -} - -resource "azurerm_network_security_rule" "allow_redirect_inbound_1" { - name = "allow_redirect_inbound" - priority = 1100 - direction = "Inbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_range = "11000-11999" - source_address_prefix = "VirtualNetwork" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.test.name - network_security_group_name = azurerm_network_security_group.test.name -} - -resource "azurerm_network_security_rule" "allow_geodr_inbound_1" { - name = "allow_geodr_inbound" - priority = 1200 - direction = "Inbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_range = "5022" - source_address_prefix = "VirtualNetwork" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.test.name - network_security_group_name = azurerm_network_security_group.test.name -} - -resource "azurerm_network_security_rule" "deny_all_inbound_1" { - name = "deny_all_inbound" - priority = 4096 - direction = "Inbound" - access = "Deny" - protocol = "*" - source_port_range = "*" - destination_port_range = "*" - source_address_prefix = "*" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.test.name - network_security_group_name = azurerm_network_security_group.test.name -} - -resource "azurerm_network_security_rule" "allow_management_outbound_1" { - name = "allow_management_outbound" - priority = 102 - direction = "Outbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_ranges = ["80", "443", "12000"] - source_address_prefix = "*" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.test.name - network_security_group_name = azurerm_network_security_group.test.name -} - -resource "azurerm_network_security_rule" "allow_misubnet_outbound_1" { - name = "allow_misubnet_outbound" - priority = 200 - direction = "Outbound" - access = "Allow" - protocol = "*" - source_port_range = "*" - destination_port_range = "*" - source_address_prefix = "*" - destination_address_prefix = "10.0.0.0/24" - resource_group_name = azurerm_resource_group.test.name - network_security_group_name = azurerm_network_security_group.test.name -} - -resource "azurerm_network_security_rule" "allow_redirect_outbound_1" { - name = "allow_redirect_outbound" - priority = 1100 - direction = "Outbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_range = "11000-11999" - source_address_prefix = "VirtualNetwork" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.test.name - network_security_group_name = azurerm_network_security_group.test.name -} - -resource "azurerm_network_security_rule" "allow_geodr_outbound_1" { - name = "allow_geodr_outbound" - priority = 1200 - direction = "Outbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_range = "5022" - source_address_prefix = "VirtualNetwork" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.test.name - network_security_group_name = azurerm_network_security_group.test.name -} - -resource "azurerm_network_security_rule" "deny_all_outbound_1" { - name = "deny_all_outbound" - priority = 4096 - direction = "Outbound" - access = "Deny" - protocol = "*" - source_port_range = "*" - destination_port_range = "*" - source_address_prefix = "*" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.test.name - network_security_group_name = azurerm_network_security_group.test.name -} - -resource "azurerm_route_table" "test" { - name = "routetable1-%[1]d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - disable_bgp_route_propagation = false - - route { - name = "subnet-to-vnetlocal" - address_prefix = "10.0.0.0/24" - next_hop_type = "VnetLocal" - } - route { - name = "mi-13-64-11-nexthop-internet" - address_prefix = "13.64.0.0/11" - next_hop_type = "Internet" - } - route { - name = "mi-13-104-14-nexthop-internet" - address_prefix = "13.104.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-20-34-15-nexthop-internet" - address_prefix = "20.34.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-20-36-14-nexthop-internet" - address_prefix = "20.36.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-20-40-13-nexthop-internet" - address_prefix = "20.40.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-20-128-16-nexthop-internet" - address_prefix = "20.128.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-20-140-15-nexthop-internet" - address_prefix = "20.140.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-20-144-14-nexthop-internet" - address_prefix = "20.144.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-20-150-15-nexthop-internet" - address_prefix = "20.150.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-20-160-12-nexthop-internet" - address_prefix = "20.160.0.0/12" - next_hop_type = "Internet" - } - route { - name = "mi-20-176-14-nexthop-internet" - address_prefix = "20.176.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-20-180-14-nexthop-internet" - address_prefix = "20.180.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-20-184-13-nexthop-internet" - address_prefix = "20.184.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-40-64-10-nexthop-internet" - address_prefix = "40.64.0.0/10" - next_hop_type = "Internet" - } - route { - name = "mi-51-4-15-nexthop-internet" - address_prefix = "51.4.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-51-8-16-nexthop-internet" - address_prefix = "51.8.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-10-15-nexthop-internet" - address_prefix = "51.10.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-51-12-15-nexthop-internet" - address_prefix = "51.12.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-51-18-16-nexthop-internet" - address_prefix = "51.18.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-51-16-nexthop-internet" - address_prefix = "51.51.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-53-16-nexthop-internet" - address_prefix = "51.53.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-103-16-nexthop-internet" - address_prefix = "51.103.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-104-15-nexthop-internet" - address_prefix = "51.104.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-51-107-16-nexthop-internet" - address_prefix = "51.107.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-116-16-nexthop-internet" - address_prefix = "51.116.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-120-16-nexthop-internet" - address_prefix = "51.120.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-124-16-nexthop-internet" - address_prefix = "51.124.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-132-16-nexthop-internet" - address_prefix = "51.132.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-136-15-nexthop-internet" - address_prefix = "51.136.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-51-138-16-nexthop-internet" - address_prefix = "51.138.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-140-14-nexthop-internet" - address_prefix = "51.140.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-51-144-15-nexthop-internet" - address_prefix = "51.144.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-52-96-12-nexthop-internet" - address_prefix = "52.96.0.0/12" - next_hop_type = "Internet" - } - route { - name = "mi-52-112-14-nexthop-internet" - address_prefix = "52.112.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-52-125-16-nexthop-internet" - address_prefix = "52.125.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-52-126-15-nexthop-internet" - address_prefix = "52.126.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-52-130-15-nexthop-internet" - address_prefix = "52.130.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-52-132-14-nexthop-internet" - address_prefix = "52.132.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-52-136-13-nexthop-internet" - address_prefix = "52.136.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-52-145-16-nexthop-internet" - address_prefix = "52.145.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-52-146-15-nexthop-internet" - address_prefix = "52.146.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-52-148-14-nexthop-internet" - address_prefix = "52.148.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-52-152-13-nexthop-internet" - address_prefix = "52.152.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-52-160-11-nexthop-internet" - address_prefix = "52.160.0.0/11" - next_hop_type = "Internet" - } - route { - name = "mi-52-224-11-nexthop-internet" - address_prefix = "52.224.0.0/11" - next_hop_type = "Internet" - } - route { - name = "mi-64-4-18-nexthop-internet" - address_prefix = "64.4.0.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-65-52-14-nexthop-internet" - address_prefix = "65.52.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-66-119-144-20-nexthop-internet" - address_prefix = "66.119.144.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-70-37-17-nexthop-internet" - address_prefix = "70.37.0.0/17" - next_hop_type = "Internet" - } - route { - name = "mi-70-37-128-18-nexthop-internet" - address_prefix = "70.37.128.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-91-190-216-21-nexthop-internet" - address_prefix = "91.190.216.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-94-245-64-18-nexthop-internet" - address_prefix = "94.245.64.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-103-9-8-22-nexthop-internet" - address_prefix = "103.9.8.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-103-25-156-24-nexthop-internet" - address_prefix = "103.25.156.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-103-25-157-24-nexthop-internet" - address_prefix = "103.25.157.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-103-25-158-23-nexthop-internet" - address_prefix = "103.25.158.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-103-36-96-22-nexthop-internet" - address_prefix = "103.36.96.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-103-255-140-22-nexthop-internet" - address_prefix = "103.255.140.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-104-40-13-nexthop-internet" - address_prefix = "104.40.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-104-146-15-nexthop-internet" - address_prefix = "104.146.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-104-208-13-nexthop-internet" - address_prefix = "104.208.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-111-221-16-20-nexthop-internet" - address_prefix = "111.221.16.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-111-221-64-18-nexthop-internet" - address_prefix = "111.221.64.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-129-75-16-nexthop-internet" - address_prefix = "129.75.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-1-24-nexthop-internet" - address_prefix = "131.253.1.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-3-24-nexthop-internet" - address_prefix = "131.253.3.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-5-24-nexthop-internet" - address_prefix = "131.253.5.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-6-24-nexthop-internet" - address_prefix = "131.253.6.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-8-24-nexthop-internet" - address_prefix = "131.253.8.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-12-22-nexthop-internet" - address_prefix = "131.253.12.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-16-23-nexthop-internet" - address_prefix = "131.253.16.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-18-24-nexthop-internet" - address_prefix = "131.253.18.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-21-24-nexthop-internet" - address_prefix = "131.253.21.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-22-23-nexthop-internet" - address_prefix = "131.253.22.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-24-21-nexthop-internet" - address_prefix = "131.253.24.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-32-20-nexthop-internet" - address_prefix = "131.253.32.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-61-24-nexthop-internet" - address_prefix = "131.253.61.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-62-23-nexthop-internet" - address_prefix = "131.253.62.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-64-18-nexthop-internet" - address_prefix = "131.253.64.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-128-17-nexthop-internet" - address_prefix = "131.253.128.0/17" - next_hop_type = "Internet" - } - route { - name = "mi-132-245-16-nexthop-internet" - address_prefix = "132.245.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-134-170-16-nexthop-internet" - address_prefix = "134.170.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-134-177-16-nexthop-internet" - address_prefix = "134.177.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-137-116-15-nexthop-internet" - address_prefix = "137.116.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-137-135-16-nexthop-internet" - address_prefix = "137.135.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-138-91-16-nexthop-internet" - address_prefix = "138.91.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-138-196-16-nexthop-internet" - address_prefix = "138.196.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-139-217-16-nexthop-internet" - address_prefix = "139.217.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-139-219-16-nexthop-internet" - address_prefix = "139.219.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-141-251-16-nexthop-internet" - address_prefix = "141.251.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-146-147-16-nexthop-internet" - address_prefix = "146.147.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-147-243-16-nexthop-internet" - address_prefix = "147.243.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-150-171-16-nexthop-internet" - address_prefix = "150.171.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-150-242-48-22-nexthop-internet" - address_prefix = "150.242.48.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-157-54-15-nexthop-internet" - address_prefix = "157.54.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-157-56-14-nexthop-internet" - address_prefix = "157.56.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-157-60-16-nexthop-internet" - address_prefix = "157.60.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-167-220-16-nexthop-internet" - address_prefix = "167.220.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-168-61-16-nexthop-internet" - address_prefix = "168.61.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-168-62-15-nexthop-internet" - address_prefix = "168.62.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-191-232-13-nexthop-internet" - address_prefix = "191.232.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-192-32-16-nexthop-internet" - address_prefix = "192.32.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-192-48-225-24-nexthop-internet" - address_prefix = "192.48.225.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-192-84-159-24-nexthop-internet" - address_prefix = "192.84.159.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-192-84-160-23-nexthop-internet" - address_prefix = "192.84.160.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-192-100-102-24-nexthop-internet" - address_prefix = "192.100.102.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-192-100-103-24-nexthop-internet" - address_prefix = "192.100.103.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-192-197-157-24-nexthop-internet" - address_prefix = "192.197.157.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-193-149-64-19-nexthop-internet" - address_prefix = "193.149.64.0/19" - next_hop_type = "Internet" - } - route { - name = "mi-193-221-113-24-nexthop-internet" - address_prefix = "193.221.113.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-194-69-96-19-nexthop-internet" - address_prefix = "194.69.96.0/19" - next_hop_type = "Internet" - } - route { - name = "mi-194-110-197-24-nexthop-internet" - address_prefix = "194.110.197.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-198-105-232-22-nexthop-internet" - address_prefix = "198.105.232.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-198-200-130-24-nexthop-internet" - address_prefix = "198.200.130.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-198-206-164-24-nexthop-internet" - address_prefix = "198.206.164.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-199-60-28-24-nexthop-internet" - address_prefix = "199.60.28.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-199-74-210-24-nexthop-internet" - address_prefix = "199.74.210.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-199-103-90-23-nexthop-internet" - address_prefix = "199.103.90.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-199-103-122-24-nexthop-internet" - address_prefix = "199.103.122.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-199-242-32-20-nexthop-internet" - address_prefix = "199.242.32.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-199-242-48-21-nexthop-internet" - address_prefix = "199.242.48.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-202-89-224-20-nexthop-internet" - address_prefix = "202.89.224.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-204-13-120-21-nexthop-internet" - address_prefix = "204.13.120.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-204-14-180-22-nexthop-internet" - address_prefix = "204.14.180.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-135-24-nexthop-internet" - address_prefix = "204.79.135.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-179-24-nexthop-internet" - address_prefix = "204.79.179.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-181-24-nexthop-internet" - address_prefix = "204.79.181.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-188-24-nexthop-internet" - address_prefix = "204.79.188.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-195-24-nexthop-internet" - address_prefix = "204.79.195.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-196-23-nexthop-internet" - address_prefix = "204.79.196.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-252-24-nexthop-internet" - address_prefix = "204.79.252.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-152-18-23-nexthop-internet" - address_prefix = "204.152.18.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-204-152-140-23-nexthop-internet" - address_prefix = "204.152.140.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-192-24-nexthop-internet" - address_prefix = "204.231.192.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-194-23-nexthop-internet" - address_prefix = "204.231.194.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-197-24-nexthop-internet" - address_prefix = "204.231.197.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-198-23-nexthop-internet" - address_prefix = "204.231.198.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-200-21-nexthop-internet" - address_prefix = "204.231.200.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-208-20-nexthop-internet" - address_prefix = "204.231.208.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-236-24-nexthop-internet" - address_prefix = "204.231.236.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-205-174-224-20-nexthop-internet" - address_prefix = "205.174.224.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-206-138-168-21-nexthop-internet" - address_prefix = "206.138.168.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-206-191-224-19-nexthop-internet" - address_prefix = "206.191.224.0/19" - next_hop_type = "Internet" - } - route { - name = "mi-207-46-16-nexthop-internet" - address_prefix = "207.46.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-207-68-128-18-nexthop-internet" - address_prefix = "207.68.128.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-208-68-136-21-nexthop-internet" - address_prefix = "208.68.136.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-208-76-44-22-nexthop-internet" - address_prefix = "208.76.44.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-208-84-21-nexthop-internet" - address_prefix = "208.84.0.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-209-240-192-19-nexthop-internet" - address_prefix = "209.240.192.0/19" - next_hop_type = "Internet" - } - route { - name = "mi-213-199-128-18-nexthop-internet" - address_prefix = "213.199.128.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-216-32-180-22-nexthop-internet" - address_prefix = "216.32.180.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-216-220-208-20-nexthop-internet" - address_prefix = "216.220.208.0/20" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-33-16-nexthop-internet" - address_prefix = "20.33.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-48-12-nexthop-internet" - address_prefix = "20.48.0.0/12" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-64-10-nexthop-internet" - address_prefix = "20.64.0.0/10" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-135-16-nexthop-internet" - address_prefix = "20.135.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-136-16-nexthop-internet" - address_prefix = "20.136.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-143-16-nexthop-internet" - address_prefix = "20.143.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-192-10-nexthop-internet" - address_prefix = "20.192.0.0/10" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-167-105-16-nexthop-internet" - address_prefix = "131.107.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-131-107-16-nexthop-internet" - address_prefix = "167.105.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-23-96-13-nexthop-internet" - address_prefix = "23.96.0.0/13" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-42-159-16-nexthop-internet" - address_prefix = "42.159.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-51-13-17-nexthop-internet" - address_prefix = "51.13.0.0/17" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-51-120-128-17-nexthop-internet" - address_prefix = "51.120.128.0/17" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-102-37-18-nexthop-internet" - address_prefix = "102.37.0.0/18" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-102-133-16-nexthop-internet" - address_prefix = "102.133.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-199-30-16-20-nexthop-internet" - address_prefix = "199.30.16.0/20" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-204-79-180-24-nexthop-internet" - address_prefix = "204.79.180.0/24" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Storage" - address_prefix = "Storage" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-SqlManagement" - address_prefix = "SqlManagement" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-AzureMonitor" - address_prefix = "AzureMonitor" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-CorpNetSaw" - address_prefix = "CorpNetSaw" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-CorpNetPublic" - address_prefix = "CorpNetPublic" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-AzureActiveDirectory" - address_prefix = "AzureActiveDirectory" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-AzureCloud.westeurope" - address_prefix = "AzureCloud.westeurope" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-AzureCloud.northeurope" - address_prefix = "AzureCloud.northeurope" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Storage.westeurope" - address_prefix = "Storage.westeurope" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Storage.northeurope" - address_prefix = "Storage.northeurope" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-EventHub.westeurope" - address_prefix = "EventHub.westeurope" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-EventHub.northeurope" - address_prefix = "EventHub.northeurope" - next_hop_type = "Internet" - } - - route { - address_prefix = "AzureCloud.westcentralus" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-AzureCloud.westcentralus" - next_hop_type = "Internet" - } - - route { - address_prefix = "AzureCloud.westus2" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-AzureCloud.westus2" - next_hop_type = "Internet" - } - - route { - address_prefix = "Storage.westcentralus" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Storage.westcentralus" - next_hop_type = "Internet" - } - - route { - address_prefix = "Storage.westus2" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Storage.westus2" - next_hop_type = "Internet" - } - - route { - address_prefix = "EventHub.westcentralus" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-EventHub.westcentralus" - next_hop_type = "Internet" - } - - route { - address_prefix = "EventHub.westus2" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-EventHub.westus2" - next_hop_type = "Internet" - } - - route { - address_prefix = "Sql.westcentralus" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Sql.westcentralus" - next_hop_type = "Internet" - } - - route { - address_prefix = "Sql.westus2" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Sql.westus2" - next_hop_type = "Internet" - } - - depends_on = [ - azurerm_subnet.test, - ] -} - -resource "azurerm_subnet_network_security_group_association" "test" { - subnet_id = azurerm_subnet.test.id - network_security_group_id = azurerm_network_security_group.test.id -} - -resource "azurerm_subnet_route_table_association" "test" { - subnet_id = azurerm_subnet.test.id - route_table_id = azurerm_route_table.test.id -} - `, data.RandomInteger, data.Locations.Primary) -} - -func (r SqlManagedInstanceResource) templateSecondary(data acceptance.TestData) string { - return fmt.Sprintf(` -resource "azurerm_resource_group" "secondary" { - name = "acctestRG2-sql-%[1]d" - location = "%[2]s" -} - -resource "azurerm_virtual_network" "secondary" { - name = "acctest-vnet2-%[1]d" - resource_group_name = azurerm_resource_group.secondary.name - address_space = ["10.1.0.0/16"] - location = azurerm_resource_group.secondary.location -} - -resource "azurerm_subnet" "secondary" { - name = "subnet2-%[1]d" - resource_group_name = azurerm_resource_group.secondary.name - virtual_network_name = azurerm_virtual_network.secondary.name - address_prefixes = ["10.1.0.0/24"] - - delegation { - name = "managedinstancedelegation" - - service_delegation { - name = "Microsoft.Sql/managedInstances" - actions = ["Microsoft.Network/virtualNetworks/subnets/join/action", "Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action", "Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action"] - } - } -} - -resource "azurerm_network_security_group" "secondary" { - name = "mi-security-group2-%[1]d" - location = azurerm_resource_group.secondary.location - resource_group_name = azurerm_resource_group.secondary.name -} - -resource "azurerm_network_security_rule" "allow_management_inbound_2" { - name = "allow_management_inbound" - priority = 106 - direction = "Inbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_ranges = ["9000", "9003", "1438", "1440", "1452"] - source_address_prefix = "*" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.secondary.name - network_security_group_name = azurerm_network_security_group.secondary.name -} - -resource "azurerm_network_security_rule" "allow_misubnet_inbound_2" { - name = "allow_misubnet_inbound" - priority = 200 - direction = "Inbound" - access = "Allow" - protocol = "*" - source_port_range = "*" - destination_port_range = "*" - source_address_prefix = "10.1.0.0/24" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.secondary.name - network_security_group_name = azurerm_network_security_group.secondary.name -} - -resource "azurerm_network_security_rule" "allow_health_probe_inbound_2" { - name = "allow_health_probe_inbound" - priority = 300 - direction = "Inbound" - access = "Allow" - protocol = "*" - source_port_range = "*" - destination_port_range = "*" - source_address_prefix = "AzureLoadBalancer" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.secondary.name - network_security_group_name = azurerm_network_security_group.secondary.name -} - -resource "azurerm_network_security_rule" "allow_tds_inbound_2" { - name = "allow_tds_inbound" - priority = 1000 - direction = "Inbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_range = "1433" - source_address_prefix = "VirtualNetwork" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.secondary.name - network_security_group_name = azurerm_network_security_group.secondary.name -} - -resource "azurerm_network_security_rule" "allow_redirect_inbound_2" { - name = "allow_redirect_inbound" - priority = 1100 - direction = "Inbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_range = "11000-11999" - source_address_prefix = "VirtualNetwork" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.secondary.name - network_security_group_name = azurerm_network_security_group.secondary.name -} - -resource "azurerm_network_security_rule" "allow_geodr_inbound_2" { - name = "allow_geodr_inbound" - priority = 1200 - direction = "Inbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_range = "5022" - source_address_prefix = "VirtualNetwork" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.secondary.name - network_security_group_name = azurerm_network_security_group.secondary.name -} - -resource "azurerm_network_security_rule" "deny_all_inbound_2" { - name = "deny_all_inbound" - priority = 4096 - direction = "Inbound" - access = "Deny" - protocol = "*" - source_port_range = "*" - destination_port_range = "*" - source_address_prefix = "*" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.secondary.name - network_security_group_name = azurerm_network_security_group.secondary.name -} - -resource "azurerm_network_security_rule" "allow_management_outbound_2" { - name = "allow_management_outbound" - priority = 102 - direction = "Outbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_ranges = ["80", "443", "12000"] - source_address_prefix = "*" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.secondary.name - network_security_group_name = azurerm_network_security_group.secondary.name -} - -resource "azurerm_network_security_rule" "allow_misubnet_outbound_2" { - name = "allow_misubnet_outbound" - priority = 200 - direction = "Outbound" - access = "Allow" - protocol = "*" - source_port_range = "*" - destination_port_range = "*" - source_address_prefix = "*" - destination_address_prefix = "10.1.0.0/24" - resource_group_name = azurerm_resource_group.secondary.name - network_security_group_name = azurerm_network_security_group.secondary.name -} - -resource "azurerm_network_security_rule" "allow_redirect_outbound_2" { - name = "allow_redirect_outbound" - priority = 1100 - direction = "Outbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_range = "11000-11999" - source_address_prefix = "VirtualNetwork" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.secondary.name - network_security_group_name = azurerm_network_security_group.secondary.name -} - -resource "azurerm_network_security_rule" "allow_geodr_outbound_2" { - name = "allow_geodr_outbound" - priority = 1200 - direction = "Outbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_range = "5022" - source_address_prefix = "VirtualNetwork" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.secondary.name - network_security_group_name = azurerm_network_security_group.secondary.name -} - -resource "azurerm_network_security_rule" "deny_all_outbound_2" { - name = "deny_all_outbound" - priority = 4096 - direction = "Outbound" - access = "Deny" - protocol = "*" - source_port_range = "*" - destination_port_range = "*" - source_address_prefix = "*" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.secondary.name - network_security_group_name = azurerm_network_security_group.secondary.name -} - -resource "azurerm_route_table" "secondary" { - name = "routetable2-%[1]d" - location = azurerm_resource_group.secondary.location - resource_group_name = azurerm_resource_group.secondary.name - disable_bgp_route_propagation = false - - route { - name = "subnet-to-vnetlocal" - address_prefix = "10.1.0.0/24" - next_hop_type = "VnetLocal" - } - route { - name = "mi-13-64-11-nexthop-internet" - address_prefix = "13.64.0.0/11" - next_hop_type = "Internet" - } - route { - name = "mi-13-104-14-nexthop-internet" - address_prefix = "13.104.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-20-34-15-nexthop-internet" - address_prefix = "20.34.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-20-36-14-nexthop-internet" - address_prefix = "20.36.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-20-40-13-nexthop-internet" - address_prefix = "20.40.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-20-128-16-nexthop-internet" - address_prefix = "20.128.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-20-140-15-nexthop-internet" - address_prefix = "20.140.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-20-144-14-nexthop-internet" - address_prefix = "20.144.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-20-150-15-nexthop-internet" - address_prefix = "20.150.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-20-160-12-nexthop-internet" - address_prefix = "20.160.0.0/12" - next_hop_type = "Internet" - } - route { - name = "mi-20-176-14-nexthop-internet" - address_prefix = "20.176.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-20-180-14-nexthop-internet" - address_prefix = "20.180.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-20-184-13-nexthop-internet" - address_prefix = "20.184.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-40-64-10-nexthop-internet" - address_prefix = "40.64.0.0/10" - next_hop_type = "Internet" - } - route { - name = "mi-51-4-15-nexthop-internet" - address_prefix = "51.4.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-51-8-16-nexthop-internet" - address_prefix = "51.8.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-10-15-nexthop-internet" - address_prefix = "51.10.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-51-12-15-nexthop-internet" - address_prefix = "51.12.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-51-18-16-nexthop-internet" - address_prefix = "51.18.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-51-16-nexthop-internet" - address_prefix = "51.51.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-53-16-nexthop-internet" - address_prefix = "51.53.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-103-16-nexthop-internet" - address_prefix = "51.103.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-104-15-nexthop-internet" - address_prefix = "51.104.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-51-107-16-nexthop-internet" - address_prefix = "51.107.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-116-16-nexthop-internet" - address_prefix = "51.116.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-120-16-nexthop-internet" - address_prefix = "51.120.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-124-16-nexthop-internet" - address_prefix = "51.124.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-132-16-nexthop-internet" - address_prefix = "51.132.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-136-15-nexthop-internet" - address_prefix = "51.136.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-51-138-16-nexthop-internet" - address_prefix = "51.138.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-140-14-nexthop-internet" - address_prefix = "51.140.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-51-144-15-nexthop-internet" - address_prefix = "51.144.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-52-96-12-nexthop-internet" - address_prefix = "52.96.0.0/12" - next_hop_type = "Internet" - } - route { - name = "mi-52-112-14-nexthop-internet" - address_prefix = "52.112.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-52-125-16-nexthop-internet" - address_prefix = "52.125.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-52-126-15-nexthop-internet" - address_prefix = "52.126.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-52-130-15-nexthop-internet" - address_prefix = "52.130.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-52-132-14-nexthop-internet" - address_prefix = "52.132.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-52-136-13-nexthop-internet" - address_prefix = "52.136.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-52-145-16-nexthop-internet" - address_prefix = "52.145.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-52-146-15-nexthop-internet" - address_prefix = "52.146.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-52-148-14-nexthop-internet" - address_prefix = "52.148.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-52-152-13-nexthop-internet" - address_prefix = "52.152.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-52-160-11-nexthop-internet" - address_prefix = "52.160.0.0/11" - next_hop_type = "Internet" - } - route { - name = "mi-52-224-11-nexthop-internet" - address_prefix = "52.224.0.0/11" - next_hop_type = "Internet" - } - route { - name = "mi-64-4-18-nexthop-internet" - address_prefix = "64.4.0.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-65-52-14-nexthop-internet" - address_prefix = "65.52.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-66-119-144-20-nexthop-internet" - address_prefix = "66.119.144.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-70-37-17-nexthop-internet" - address_prefix = "70.37.0.0/17" - next_hop_type = "Internet" - } - route { - name = "mi-70-37-128-18-nexthop-internet" - address_prefix = "70.37.128.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-91-190-216-21-nexthop-internet" - address_prefix = "91.190.216.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-94-245-64-18-nexthop-internet" - address_prefix = "94.245.64.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-103-9-8-22-nexthop-internet" - address_prefix = "103.9.8.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-103-25-156-24-nexthop-internet" - address_prefix = "103.25.156.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-103-25-157-24-nexthop-internet" - address_prefix = "103.25.157.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-103-25-158-23-nexthop-internet" - address_prefix = "103.25.158.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-103-36-96-22-nexthop-internet" - address_prefix = "103.36.96.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-103-255-140-22-nexthop-internet" - address_prefix = "103.255.140.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-104-40-13-nexthop-internet" - address_prefix = "104.40.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-104-146-15-nexthop-internet" - address_prefix = "104.146.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-104-208-13-nexthop-internet" - address_prefix = "104.208.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-111-221-16-20-nexthop-internet" - address_prefix = "111.221.16.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-111-221-64-18-nexthop-internet" - address_prefix = "111.221.64.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-129-75-16-nexthop-internet" - address_prefix = "129.75.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-1-24-nexthop-internet" - address_prefix = "131.253.1.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-3-24-nexthop-internet" - address_prefix = "131.253.3.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-5-24-nexthop-internet" - address_prefix = "131.253.5.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-6-24-nexthop-internet" - address_prefix = "131.253.6.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-8-24-nexthop-internet" - address_prefix = "131.253.8.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-12-22-nexthop-internet" - address_prefix = "131.253.12.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-16-23-nexthop-internet" - address_prefix = "131.253.16.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-18-24-nexthop-internet" - address_prefix = "131.253.18.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-21-24-nexthop-internet" - address_prefix = "131.253.21.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-22-23-nexthop-internet" - address_prefix = "131.253.22.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-24-21-nexthop-internet" - address_prefix = "131.253.24.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-32-20-nexthop-internet" - address_prefix = "131.253.32.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-61-24-nexthop-internet" - address_prefix = "131.253.61.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-62-23-nexthop-internet" - address_prefix = "131.253.62.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-64-18-nexthop-internet" - address_prefix = "131.253.64.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-128-17-nexthop-internet" - address_prefix = "131.253.128.0/17" - next_hop_type = "Internet" - } - route { - name = "mi-132-245-16-nexthop-internet" - address_prefix = "132.245.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-134-170-16-nexthop-internet" - address_prefix = "134.170.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-134-177-16-nexthop-internet" - address_prefix = "134.177.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-137-116-15-nexthop-internet" - address_prefix = "137.116.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-137-135-16-nexthop-internet" - address_prefix = "137.135.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-138-91-16-nexthop-internet" - address_prefix = "138.91.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-138-196-16-nexthop-internet" - address_prefix = "138.196.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-139-217-16-nexthop-internet" - address_prefix = "139.217.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-139-219-16-nexthop-internet" - address_prefix = "139.219.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-141-251-16-nexthop-internet" - address_prefix = "141.251.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-146-147-16-nexthop-internet" - address_prefix = "146.147.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-147-243-16-nexthop-internet" - address_prefix = "147.243.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-150-171-16-nexthop-internet" - address_prefix = "150.171.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-150-242-48-22-nexthop-internet" - address_prefix = "150.242.48.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-157-54-15-nexthop-internet" - address_prefix = "157.54.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-157-56-14-nexthop-internet" - address_prefix = "157.56.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-157-60-16-nexthop-internet" - address_prefix = "157.60.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-167-220-16-nexthop-internet" - address_prefix = "167.220.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-168-61-16-nexthop-internet" - address_prefix = "168.61.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-168-62-15-nexthop-internet" - address_prefix = "168.62.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-191-232-13-nexthop-internet" - address_prefix = "191.232.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-192-32-16-nexthop-internet" - address_prefix = "192.32.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-192-48-225-24-nexthop-internet" - address_prefix = "192.48.225.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-192-84-159-24-nexthop-internet" - address_prefix = "192.84.159.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-192-84-160-23-nexthop-internet" - address_prefix = "192.84.160.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-192-100-102-24-nexthop-internet" - address_prefix = "192.100.102.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-192-100-103-24-nexthop-internet" - address_prefix = "192.100.103.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-192-197-157-24-nexthop-internet" - address_prefix = "192.197.157.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-193-149-64-19-nexthop-internet" - address_prefix = "193.149.64.0/19" - next_hop_type = "Internet" - } - route { - name = "mi-193-221-113-24-nexthop-internet" - address_prefix = "193.221.113.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-194-69-96-19-nexthop-internet" - address_prefix = "194.69.96.0/19" - next_hop_type = "Internet" - } - route { - name = "mi-194-110-197-24-nexthop-internet" - address_prefix = "194.110.197.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-198-105-232-22-nexthop-internet" - address_prefix = "198.105.232.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-198-200-130-24-nexthop-internet" - address_prefix = "198.200.130.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-198-206-164-24-nexthop-internet" - address_prefix = "198.206.164.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-199-60-28-24-nexthop-internet" - address_prefix = "199.60.28.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-199-74-210-24-nexthop-internet" - address_prefix = "199.74.210.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-199-103-90-23-nexthop-internet" - address_prefix = "199.103.90.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-199-103-122-24-nexthop-internet" - address_prefix = "199.103.122.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-199-242-32-20-nexthop-internet" - address_prefix = "199.242.32.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-199-242-48-21-nexthop-internet" - address_prefix = "199.242.48.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-202-89-224-20-nexthop-internet" - address_prefix = "202.89.224.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-204-13-120-21-nexthop-internet" - address_prefix = "204.13.120.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-204-14-180-22-nexthop-internet" - address_prefix = "204.14.180.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-135-24-nexthop-internet" - address_prefix = "204.79.135.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-179-24-nexthop-internet" - address_prefix = "204.79.179.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-181-24-nexthop-internet" - address_prefix = "204.79.181.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-188-24-nexthop-internet" - address_prefix = "204.79.188.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-195-24-nexthop-internet" - address_prefix = "204.79.195.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-196-23-nexthop-internet" - address_prefix = "204.79.196.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-252-24-nexthop-internet" - address_prefix = "204.79.252.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-152-18-23-nexthop-internet" - address_prefix = "204.152.18.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-204-152-140-23-nexthop-internet" - address_prefix = "204.152.140.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-192-24-nexthop-internet" - address_prefix = "204.231.192.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-194-23-nexthop-internet" - address_prefix = "204.231.194.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-197-24-nexthop-internet" - address_prefix = "204.231.197.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-198-23-nexthop-internet" - address_prefix = "204.231.198.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-200-21-nexthop-internet" - address_prefix = "204.231.200.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-208-20-nexthop-internet" - address_prefix = "204.231.208.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-236-24-nexthop-internet" - address_prefix = "204.231.236.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-205-174-224-20-nexthop-internet" - address_prefix = "205.174.224.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-206-138-168-21-nexthop-internet" - address_prefix = "206.138.168.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-206-191-224-19-nexthop-internet" - address_prefix = "206.191.224.0/19" - next_hop_type = "Internet" - } - route { - name = "mi-207-46-16-nexthop-internet" - address_prefix = "207.46.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-207-68-128-18-nexthop-internet" - address_prefix = "207.68.128.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-208-68-136-21-nexthop-internet" - address_prefix = "208.68.136.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-208-76-44-22-nexthop-internet" - address_prefix = "208.76.44.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-208-84-21-nexthop-internet" - address_prefix = "208.84.0.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-209-240-192-19-nexthop-internet" - address_prefix = "209.240.192.0/19" - next_hop_type = "Internet" - } - route { - name = "mi-213-199-128-18-nexthop-internet" - address_prefix = "213.199.128.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-216-32-180-22-nexthop-internet" - address_prefix = "216.32.180.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-216-220-208-20-nexthop-internet" - address_prefix = "216.220.208.0/20" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-33-16-nexthop-internet" - address_prefix = "20.33.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-48-12-nexthop-internet" - address_prefix = "20.48.0.0/12" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-64-10-nexthop-internet" - address_prefix = "20.64.0.0/10" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-135-16-nexthop-internet" - address_prefix = "20.135.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-136-16-nexthop-internet" - address_prefix = "20.136.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-143-16-nexthop-internet" - address_prefix = "20.143.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-192-10-nexthop-internet" - address_prefix = "20.192.0.0/10" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-167-105-16-nexthop-internet" - address_prefix = "131.107.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-131-107-16-nexthop-internet" - address_prefix = "167.105.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-23-96-13-nexthop-internet" - address_prefix = "23.96.0.0/13" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-42-159-16-nexthop-internet" - address_prefix = "42.159.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-51-13-17-nexthop-internet" - address_prefix = "51.13.0.0/17" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-51-120-128-17-nexthop-internet" - address_prefix = "51.120.128.0/17" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-102-37-18-nexthop-internet" - address_prefix = "102.37.0.0/18" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-102-133-16-nexthop-internet" - address_prefix = "102.133.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-199-30-16-20-nexthop-internet" - address_prefix = "199.30.16.0/20" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-204-79-180-24-nexthop-internet" - address_prefix = "204.79.180.0/24" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Storage" - address_prefix = "Storage" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-SqlManagement" - address_prefix = "SqlManagement" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-AzureMonitor" - address_prefix = "AzureMonitor" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-CorpNetSaw" - address_prefix = "CorpNetSaw" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-CorpNetPublic" - address_prefix = "CorpNetPublic" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-AzureActiveDirectory" - address_prefix = "AzureActiveDirectory" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-AzureCloud.westeurope" - address_prefix = "AzureCloud.westeurope" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-AzureCloud.northeurope" - address_prefix = "AzureCloud.northeurope" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Storage.westeurope" - address_prefix = "Storage.westeurope" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Storage.northeurope" - address_prefix = "Storage.northeurope" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-EventHub.westeurope" - address_prefix = "EventHub.westeurope" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-EventHub.northeurope" - address_prefix = "EventHub.northeurope" - next_hop_type = "Internet" - } - - route { - address_prefix = "AzureCloud.westcentralus" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-AzureCloud.westcentralus" - next_hop_type = "Internet" - } - - route { - address_prefix = "AzureCloud.westus2" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-AzureCloud.westus2" - next_hop_type = "Internet" - } - - route { - address_prefix = "Storage.westcentralus" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Storage.westcentralus" - next_hop_type = "Internet" - } - - route { - address_prefix = "Storage.westus2" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Storage.westus2" - next_hop_type = "Internet" - } - - route { - address_prefix = "EventHub.westcentralus" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-EventHub.westcentralus" - next_hop_type = "Internet" - } - - route { - address_prefix = "EventHub.westus2" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-EventHub.westus2" - next_hop_type = "Internet" - } - - route { - address_prefix = "Sql.westcentralus" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Sql.westcentralus" - next_hop_type = "Internet" - } - - route { - address_prefix = "Sql.westus2" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Sql.westus2" - next_hop_type = "Internet" - } - - depends_on = [ - azurerm_subnet.secondary, - ] -} - -resource "azurerm_subnet_network_security_group_association" "secondary" { - subnet_id = azurerm_subnet.secondary.id - network_security_group_id = azurerm_network_security_group.secondary.id -} - -resource "azurerm_subnet_route_table_association" "secondary" { - subnet_id = azurerm_subnet.secondary.id - route_table_id = azurerm_route_table.secondary.id -} - `, data.RandomInteger, data.Locations.Secondary) -} - -func (r SqlManagedInstanceResource) templateExtraSecondary(data acceptance.TestData) string { - return fmt.Sprintf(` -resource "azurerm_resource_group" "secondary_2" { - name = "acctestRG3-sql-%[1]d" - location = "%[2]s" -} - -resource "azurerm_virtual_network" "secondary_2" { - name = "acctest-vnet3-%[1]d" - resource_group_name = azurerm_resource_group.secondary_2.name - address_space = ["10.2.0.0/16"] - location = azurerm_resource_group.secondary_2.location -} - -resource "azurerm_subnet" "secondary_2" { - name = "subnet3-%[1]d" - resource_group_name = azurerm_resource_group.secondary_2.name - virtual_network_name = azurerm_virtual_network.secondary_2.name - address_prefixes = ["10.2.0.0/24"] - - delegation { - name = "managedinstancedelegation" - - service_delegation { - name = "Microsoft.Sql/managedInstances" - actions = ["Microsoft.Network/virtualNetworks/subnets/join/action", "Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action", "Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action"] - } - } -} - -resource "azurerm_network_security_group" "secondary_2" { - name = "mi-security-group3-%[1]d" - location = azurerm_resource_group.secondary_2.location - resource_group_name = azurerm_resource_group.secondary_2.name -} - -resource "azurerm_network_security_rule" "allow_management_inbound_3" { - name = "allow_management_inbound" - priority = 106 - direction = "Inbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_ranges = ["9000", "9003", "1438", "1440", "1452"] - source_address_prefix = "*" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.secondary_2.name - network_security_group_name = azurerm_network_security_group.secondary_2.name -} - -resource "azurerm_network_security_rule" "allow_misubnet_inbound_3" { - name = "allow_misubnet_inbound" - priority = 200 - direction = "Inbound" - access = "Allow" - protocol = "*" - source_port_range = "*" - destination_port_range = "*" - source_address_prefix = "10.2.0.0/24" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.secondary_2.name - network_security_group_name = azurerm_network_security_group.secondary_2.name -} - -resource "azurerm_network_security_rule" "allow_health_probe_inbound_3" { - name = "allow_health_probe_inbound" - priority = 300 - direction = "Inbound" - access = "Allow" - protocol = "*" - source_port_range = "*" - destination_port_range = "*" - source_address_prefix = "AzureLoadBalancer" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.secondary_2.name - network_security_group_name = azurerm_network_security_group.secondary_2.name -} - -resource "azurerm_network_security_rule" "allow_tds_inbound_3" { - name = "allow_tds_inbound" - priority = 1000 - direction = "Inbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_range = "1433" - source_address_prefix = "VirtualNetwork" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.secondary_2.name - network_security_group_name = azurerm_network_security_group.secondary_2.name -} - -resource "azurerm_network_security_rule" "allow_redirect_inbound_3" { - name = "allow_redirect_inbound" - priority = 1100 - direction = "Inbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_range = "11000-11999" - source_address_prefix = "VirtualNetwork" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.secondary_2.name - network_security_group_name = azurerm_network_security_group.secondary_2.name -} - -resource "azurerm_network_security_rule" "allow_geodr_inbound_3" { - name = "allow_geodr_inbound" - priority = 1200 - direction = "Inbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_range = "5022" - source_address_prefix = "VirtualNetwork" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.secondary_2.name - network_security_group_name = azurerm_network_security_group.secondary_2.name -} - -resource "azurerm_network_security_rule" "deny_all_inbound_3" { - name = "deny_all_inbound" - priority = 4096 - direction = "Inbound" - access = "Deny" - protocol = "*" - source_port_range = "*" - destination_port_range = "*" - source_address_prefix = "*" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.secondary_2.name - network_security_group_name = azurerm_network_security_group.secondary_2.name -} - -resource "azurerm_network_security_rule" "allow_management_outbound_3" { - name = "allow_management_outbound" - priority = 102 - direction = "Outbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_ranges = ["80", "443", "12000"] - source_address_prefix = "*" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.secondary_2.name - network_security_group_name = azurerm_network_security_group.secondary_2.name -} - -resource "azurerm_network_security_rule" "allow_misubnet_outbound_3" { - name = "allow_misubnet_outbound" - priority = 200 - direction = "Outbound" - access = "Allow" - protocol = "*" - source_port_range = "*" - destination_port_range = "*" - source_address_prefix = "*" - destination_address_prefix = "10.2.0.0/24" - resource_group_name = azurerm_resource_group.secondary_2.name - network_security_group_name = azurerm_network_security_group.secondary_2.name -} - -resource "azurerm_network_security_rule" "allow_redirect_outbound_3" { - name = "allow_redirect_outbound" - priority = 1100 - direction = "Outbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_range = "11000-11999" - source_address_prefix = "VirtualNetwork" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.secondary_2.name - network_security_group_name = azurerm_network_security_group.secondary_2.name -} - -resource "azurerm_network_security_rule" "allow_geodr_outbound_3" { - name = "allow_geodr_outbound" - priority = 1200 - direction = "Outbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_range = "5022" - source_address_prefix = "VirtualNetwork" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.secondary_2.name - network_security_group_name = azurerm_network_security_group.secondary_2.name -} - -resource "azurerm_network_security_rule" "deny_all_outbound_3" { - name = "deny_all_outbound" - priority = 4096 - direction = "Outbound" - access = "Deny" - protocol = "*" - source_port_range = "*" - destination_port_range = "*" - source_address_prefix = "*" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.secondary_2.name - network_security_group_name = azurerm_network_security_group.secondary_2.name -} - -resource "azurerm_route_table" "secondary_2" { - name = "routetable3-%[1]d" - location = azurerm_resource_group.secondary_2.location - resource_group_name = azurerm_resource_group.secondary_2.name - disable_bgp_route_propagation = false - - route { - name = "subnet-to-vnetlocal" - address_prefix = "10.2.0.0/24" - next_hop_type = "VnetLocal" - } - route { - name = "mi-13-64-11-nexthop-internet" - address_prefix = "13.64.0.0/11" - next_hop_type = "Internet" - } - route { - name = "mi-13-104-14-nexthop-internet" - address_prefix = "13.104.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-20-34-15-nexthop-internet" - address_prefix = "20.34.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-20-36-14-nexthop-internet" - address_prefix = "20.36.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-20-40-13-nexthop-internet" - address_prefix = "20.40.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-20-128-16-nexthop-internet" - address_prefix = "20.128.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-20-140-15-nexthop-internet" - address_prefix = "20.140.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-20-144-14-nexthop-internet" - address_prefix = "20.144.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-20-150-15-nexthop-internet" - address_prefix = "20.150.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-20-160-12-nexthop-internet" - address_prefix = "20.160.0.0/12" - next_hop_type = "Internet" - } - route { - name = "mi-20-176-14-nexthop-internet" - address_prefix = "20.176.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-20-180-14-nexthop-internet" - address_prefix = "20.180.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-20-184-13-nexthop-internet" - address_prefix = "20.184.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-40-64-10-nexthop-internet" - address_prefix = "40.64.0.0/10" - next_hop_type = "Internet" - } - route { - name = "mi-51-4-15-nexthop-internet" - address_prefix = "51.4.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-51-8-16-nexthop-internet" - address_prefix = "51.8.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-10-15-nexthop-internet" - address_prefix = "51.10.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-51-12-15-nexthop-internet" - address_prefix = "51.12.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-51-18-16-nexthop-internet" - address_prefix = "51.18.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-51-16-nexthop-internet" - address_prefix = "51.51.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-53-16-nexthop-internet" - address_prefix = "51.53.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-103-16-nexthop-internet" - address_prefix = "51.103.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-104-15-nexthop-internet" - address_prefix = "51.104.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-51-107-16-nexthop-internet" - address_prefix = "51.107.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-116-16-nexthop-internet" - address_prefix = "51.116.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-120-16-nexthop-internet" - address_prefix = "51.120.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-124-16-nexthop-internet" - address_prefix = "51.124.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-132-16-nexthop-internet" - address_prefix = "51.132.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-136-15-nexthop-internet" - address_prefix = "51.136.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-51-138-16-nexthop-internet" - address_prefix = "51.138.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-51-140-14-nexthop-internet" - address_prefix = "51.140.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-51-144-15-nexthop-internet" - address_prefix = "51.144.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-52-96-12-nexthop-internet" - address_prefix = "52.96.0.0/12" - next_hop_type = "Internet" - } - route { - name = "mi-52-112-14-nexthop-internet" - address_prefix = "52.112.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-52-125-16-nexthop-internet" - address_prefix = "52.125.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-52-126-15-nexthop-internet" - address_prefix = "52.126.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-52-130-15-nexthop-internet" - address_prefix = "52.130.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-52-132-14-nexthop-internet" - address_prefix = "52.132.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-52-136-13-nexthop-internet" - address_prefix = "52.136.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-52-145-16-nexthop-internet" - address_prefix = "52.145.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-52-146-15-nexthop-internet" - address_prefix = "52.146.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-52-148-14-nexthop-internet" - address_prefix = "52.148.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-52-152-13-nexthop-internet" - address_prefix = "52.152.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-52-160-11-nexthop-internet" - address_prefix = "52.160.0.0/11" - next_hop_type = "Internet" - } - route { - name = "mi-52-224-11-nexthop-internet" - address_prefix = "52.224.0.0/11" - next_hop_type = "Internet" - } - route { - name = "mi-64-4-18-nexthop-internet" - address_prefix = "64.4.0.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-65-52-14-nexthop-internet" - address_prefix = "65.52.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-66-119-144-20-nexthop-internet" - address_prefix = "66.119.144.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-70-37-17-nexthop-internet" - address_prefix = "70.37.0.0/17" - next_hop_type = "Internet" - } - route { - name = "mi-70-37-128-18-nexthop-internet" - address_prefix = "70.37.128.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-91-190-216-21-nexthop-internet" - address_prefix = "91.190.216.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-94-245-64-18-nexthop-internet" - address_prefix = "94.245.64.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-103-9-8-22-nexthop-internet" - address_prefix = "103.9.8.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-103-25-156-24-nexthop-internet" - address_prefix = "103.25.156.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-103-25-157-24-nexthop-internet" - address_prefix = "103.25.157.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-103-25-158-23-nexthop-internet" - address_prefix = "103.25.158.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-103-36-96-22-nexthop-internet" - address_prefix = "103.36.96.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-103-255-140-22-nexthop-internet" - address_prefix = "103.255.140.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-104-40-13-nexthop-internet" - address_prefix = "104.40.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-104-146-15-nexthop-internet" - address_prefix = "104.146.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-104-208-13-nexthop-internet" - address_prefix = "104.208.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-111-221-16-20-nexthop-internet" - address_prefix = "111.221.16.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-111-221-64-18-nexthop-internet" - address_prefix = "111.221.64.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-129-75-16-nexthop-internet" - address_prefix = "129.75.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-1-24-nexthop-internet" - address_prefix = "131.253.1.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-3-24-nexthop-internet" - address_prefix = "131.253.3.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-5-24-nexthop-internet" - address_prefix = "131.253.5.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-6-24-nexthop-internet" - address_prefix = "131.253.6.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-8-24-nexthop-internet" - address_prefix = "131.253.8.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-12-22-nexthop-internet" - address_prefix = "131.253.12.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-16-23-nexthop-internet" - address_prefix = "131.253.16.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-18-24-nexthop-internet" - address_prefix = "131.253.18.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-21-24-nexthop-internet" - address_prefix = "131.253.21.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-22-23-nexthop-internet" - address_prefix = "131.253.22.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-24-21-nexthop-internet" - address_prefix = "131.253.24.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-32-20-nexthop-internet" - address_prefix = "131.253.32.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-61-24-nexthop-internet" - address_prefix = "131.253.61.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-62-23-nexthop-internet" - address_prefix = "131.253.62.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-64-18-nexthop-internet" - address_prefix = "131.253.64.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-131-253-128-17-nexthop-internet" - address_prefix = "131.253.128.0/17" - next_hop_type = "Internet" - } - route { - name = "mi-132-245-16-nexthop-internet" - address_prefix = "132.245.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-134-170-16-nexthop-internet" - address_prefix = "134.170.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-134-177-16-nexthop-internet" - address_prefix = "134.177.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-137-116-15-nexthop-internet" - address_prefix = "137.116.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-137-135-16-nexthop-internet" - address_prefix = "137.135.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-138-91-16-nexthop-internet" - address_prefix = "138.91.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-138-196-16-nexthop-internet" - address_prefix = "138.196.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-139-217-16-nexthop-internet" - address_prefix = "139.217.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-139-219-16-nexthop-internet" - address_prefix = "139.219.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-141-251-16-nexthop-internet" - address_prefix = "141.251.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-146-147-16-nexthop-internet" - address_prefix = "146.147.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-147-243-16-nexthop-internet" - address_prefix = "147.243.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-150-171-16-nexthop-internet" - address_prefix = "150.171.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-150-242-48-22-nexthop-internet" - address_prefix = "150.242.48.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-157-54-15-nexthop-internet" - address_prefix = "157.54.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-157-56-14-nexthop-internet" - address_prefix = "157.56.0.0/14" - next_hop_type = "Internet" - } - route { - name = "mi-157-60-16-nexthop-internet" - address_prefix = "157.60.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-167-220-16-nexthop-internet" - address_prefix = "167.220.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-168-61-16-nexthop-internet" - address_prefix = "168.61.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-168-62-15-nexthop-internet" - address_prefix = "168.62.0.0/15" - next_hop_type = "Internet" - } - route { - name = "mi-191-232-13-nexthop-internet" - address_prefix = "191.232.0.0/13" - next_hop_type = "Internet" - } - route { - name = "mi-192-32-16-nexthop-internet" - address_prefix = "192.32.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-192-48-225-24-nexthop-internet" - address_prefix = "192.48.225.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-192-84-159-24-nexthop-internet" - address_prefix = "192.84.159.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-192-84-160-23-nexthop-internet" - address_prefix = "192.84.160.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-192-100-102-24-nexthop-internet" - address_prefix = "192.100.102.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-192-100-103-24-nexthop-internet" - address_prefix = "192.100.103.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-192-197-157-24-nexthop-internet" - address_prefix = "192.197.157.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-193-149-64-19-nexthop-internet" - address_prefix = "193.149.64.0/19" - next_hop_type = "Internet" - } - route { - name = "mi-193-221-113-24-nexthop-internet" - address_prefix = "193.221.113.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-194-69-96-19-nexthop-internet" - address_prefix = "194.69.96.0/19" - next_hop_type = "Internet" - } - route { - name = "mi-194-110-197-24-nexthop-internet" - address_prefix = "194.110.197.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-198-105-232-22-nexthop-internet" - address_prefix = "198.105.232.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-198-200-130-24-nexthop-internet" - address_prefix = "198.200.130.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-198-206-164-24-nexthop-internet" - address_prefix = "198.206.164.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-199-60-28-24-nexthop-internet" - address_prefix = "199.60.28.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-199-74-210-24-nexthop-internet" - address_prefix = "199.74.210.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-199-103-90-23-nexthop-internet" - address_prefix = "199.103.90.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-199-103-122-24-nexthop-internet" - address_prefix = "199.103.122.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-199-242-32-20-nexthop-internet" - address_prefix = "199.242.32.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-199-242-48-21-nexthop-internet" - address_prefix = "199.242.48.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-202-89-224-20-nexthop-internet" - address_prefix = "202.89.224.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-204-13-120-21-nexthop-internet" - address_prefix = "204.13.120.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-204-14-180-22-nexthop-internet" - address_prefix = "204.14.180.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-135-24-nexthop-internet" - address_prefix = "204.79.135.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-179-24-nexthop-internet" - address_prefix = "204.79.179.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-181-24-nexthop-internet" - address_prefix = "204.79.181.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-188-24-nexthop-internet" - address_prefix = "204.79.188.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-195-24-nexthop-internet" - address_prefix = "204.79.195.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-196-23-nexthop-internet" - address_prefix = "204.79.196.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-204-79-252-24-nexthop-internet" - address_prefix = "204.79.252.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-152-18-23-nexthop-internet" - address_prefix = "204.152.18.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-204-152-140-23-nexthop-internet" - address_prefix = "204.152.140.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-192-24-nexthop-internet" - address_prefix = "204.231.192.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-194-23-nexthop-internet" - address_prefix = "204.231.194.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-197-24-nexthop-internet" - address_prefix = "204.231.197.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-198-23-nexthop-internet" - address_prefix = "204.231.198.0/23" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-200-21-nexthop-internet" - address_prefix = "204.231.200.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-208-20-nexthop-internet" - address_prefix = "204.231.208.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-204-231-236-24-nexthop-internet" - address_prefix = "204.231.236.0/24" - next_hop_type = "Internet" - } - route { - name = "mi-205-174-224-20-nexthop-internet" - address_prefix = "205.174.224.0/20" - next_hop_type = "Internet" - } - route { - name = "mi-206-138-168-21-nexthop-internet" - address_prefix = "206.138.168.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-206-191-224-19-nexthop-internet" - address_prefix = "206.191.224.0/19" - next_hop_type = "Internet" - } - route { - name = "mi-207-46-16-nexthop-internet" - address_prefix = "207.46.0.0/16" - next_hop_type = "Internet" - } - route { - name = "mi-207-68-128-18-nexthop-internet" - address_prefix = "207.68.128.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-208-68-136-21-nexthop-internet" - address_prefix = "208.68.136.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-208-76-44-22-nexthop-internet" - address_prefix = "208.76.44.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-208-84-21-nexthop-internet" - address_prefix = "208.84.0.0/21" - next_hop_type = "Internet" - } - route { - name = "mi-209-240-192-19-nexthop-internet" - address_prefix = "209.240.192.0/19" - next_hop_type = "Internet" - } - route { - name = "mi-213-199-128-18-nexthop-internet" - address_prefix = "213.199.128.0/18" - next_hop_type = "Internet" - } - route { - name = "mi-216-32-180-22-nexthop-internet" - address_prefix = "216.32.180.0/22" - next_hop_type = "Internet" - } - route { - name = "mi-216-220-208-20-nexthop-internet" - address_prefix = "216.220.208.0/20" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-33-16-nexthop-internet" - address_prefix = "20.33.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-48-12-nexthop-internet" - address_prefix = "20.48.0.0/12" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-64-10-nexthop-internet" - address_prefix = "20.64.0.0/10" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-135-16-nexthop-internet" - address_prefix = "20.135.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-136-16-nexthop-internet" - address_prefix = "20.136.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-143-16-nexthop-internet" - address_prefix = "20.143.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-20-192-10-nexthop-internet" - address_prefix = "20.192.0.0/10" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-167-105-16-nexthop-internet" - address_prefix = "131.107.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-131-107-16-nexthop-internet" - address_prefix = "167.105.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-23-96-13-nexthop-internet" - address_prefix = "23.96.0.0/13" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-42-159-16-nexthop-internet" - address_prefix = "42.159.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-51-13-17-nexthop-internet" - address_prefix = "51.13.0.0/17" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-51-120-128-17-nexthop-internet" - address_prefix = "51.120.128.0/17" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-102-37-18-nexthop-internet" - address_prefix = "102.37.0.0/18" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-102-133-16-nexthop-internet" - address_prefix = "102.133.0.0/16" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-199-30-16-20-nexthop-internet" - address_prefix = "199.30.16.0/20" - next_hop_type = "Internet" - } - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-204-79-180-24-nexthop-internet" - address_prefix = "204.79.180.0/24" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Storage" - address_prefix = "Storage" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-SqlManagement" - address_prefix = "SqlManagement" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-AzureMonitor" - address_prefix = "AzureMonitor" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-CorpNetSaw" - address_prefix = "CorpNetSaw" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-CorpNetPublic" - address_prefix = "CorpNetPublic" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-AzureActiveDirectory" - address_prefix = "AzureActiveDirectory" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-AzureCloud.westeurope" - address_prefix = "AzureCloud.westeurope" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-AzureCloud.northeurope" - address_prefix = "AzureCloud.northeurope" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Storage.westeurope" - address_prefix = "Storage.westeurope" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Storage.northeurope" - address_prefix = "Storage.northeurope" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-EventHub.westeurope" - address_prefix = "EventHub.westeurope" - next_hop_type = "Internet" - } - - route { - name = "Microsoft.Sql-managedInstances_UseOnly_mi-EventHub.northeurope" - address_prefix = "EventHub.northeurope" - next_hop_type = "Internet" - } - - route { - address_prefix = "AzureCloud.westcentralus" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-AzureCloud.westcentralus" - next_hop_type = "Internet" - } - - route { - address_prefix = "AzureCloud.westus2" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-AzureCloud.westus2" - next_hop_type = "Internet" - } - - route { - address_prefix = "Storage.westcentralus" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Storage.westcentralus" - next_hop_type = "Internet" - } - - route { - address_prefix = "Storage.westus2" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Storage.westus2" - next_hop_type = "Internet" - } - - route { - address_prefix = "EventHub.westcentralus" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-EventHub.westcentralus" - next_hop_type = "Internet" - } - - route { - address_prefix = "EventHub.westus2" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-EventHub.westus2" - next_hop_type = "Internet" - } - - route { - address_prefix = "Sql.westcentralus" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Sql.westcentralus" - next_hop_type = "Internet" - } - - route { - address_prefix = "Sql.westus2" - name = "Microsoft.Sql-managedInstances_UseOnly_mi-Sql.westus2" - next_hop_type = "Internet" - } - - depends_on = [ - azurerm_subnet.secondary_2, - ] -} - -resource "azurerm_subnet_network_security_group_association" "secondary_2" { - subnet_id = azurerm_subnet.secondary_2.id - network_security_group_id = azurerm_network_security_group.secondary_2.id -} - -resource "azurerm_subnet_route_table_association" "secondary_2" { - subnet_id = azurerm_subnet.secondary_2.id - route_table_id = azurerm_route_table.secondary_2.id -} -`, data.RandomInteger, data.Locations.Secondary) -} diff --git a/internal/services/sql/sql_server_data_source.go b/internal/services/sql/sql_server_data_source.go deleted file mode 100644 index b5c928d811ead..0000000000000 --- a/internal/services/sql/sql_server_data_source.go +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package sql - -import ( - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/tags" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func dataSourceSqlServer() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Read: dataSourceArmSqlServerRead, - - DeprecationMessage: "The `azurerm_sql_server` data source is deprecated and will be removed in version 4.0 of the AzureRM provider. Please use the `azurerm_mssql_server` data source instead.", - - Timeouts: &pluginsdk.ResourceTimeout{ - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - }, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - }, - - "resource_group_name": commonschema.ResourceGroupNameForDataSource(), - - "location": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "fqdn": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "version": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "administrator_login": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "identity": commonschema.SystemAssignedIdentityComputed(), - - "tags": tags.SchemaDataSource(), - }, - } -} - -func dataSourceArmSqlServerRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.ServersClient - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := parse.NewServerID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) - resp, err := client.Get(ctx, id.ResourceGroup, id.Name) - if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return fmt.Errorf("%s was not found", id) - } - - return fmt.Errorf("retrieving %s: %+v", id, err) - } - - d.SetId(id.ID()) - - d.Set("location", location.NormalizeNilable(resp.Location)) - if props := resp.ServerProperties; props != nil { - d.Set("administrator_login", props.AdministratorLogin) - d.Set("fqdn", props.FullyQualifiedDomainName) - d.Set("version", props.Version) - } - - if err := d.Set("identity", flattenAzureRmSqlServerIdentity(resp.Identity)); err != nil { - return fmt.Errorf("setting `identity`: %+v", err) - } - - return tags.FlattenAndSet(d, resp.Tags) -} diff --git a/internal/services/sql/sql_server_data_source_test.go b/internal/services/sql/sql_server_data_source_test.go deleted file mode 100644 index f761522220013..0000000000000 --- a/internal/services/sql/sql_server_data_source_test.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package sql_test - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" -) - -type SqlServerDataSource struct{} - -func TestAccDataSourceSqlServer_basic(t *testing.T) { - data := acceptance.BuildTestData(t, "data.azurerm_sql_server", "test") - - data.DataSourceTest(t, []acceptance.TestStep{ - { - Config: SqlServerDataSource{}.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).Key("location").Exists(), - check.That(data.ResourceName).Key("fqdn").Exists(), - check.That(data.ResourceName).Key("version").Exists(), - check.That(data.ResourceName).Key("administrator_login").Exists(), - check.That(data.ResourceName).Key("tags.%").HasValue("0"), - ), - }, - }) -} - -func (d SqlServerDataSource) basic(data acceptance.TestData) string { - template := SqlServerResource{}.basic(data) - return fmt.Sprintf(` -%s - -data "azurerm_sql_server" "test" { - name = azurerm_sql_server.test.name - resource_group_name = azurerm_resource_group.test.name -} -`, template) -} diff --git a/internal/services/sql/sql_server_resource.go b/internal/services/sql/sql_server_resource.go deleted file mode 100644 index 16797800a29a6..0000000000000 --- a/internal/services/sql/sql_server_resource.go +++ /dev/null @@ -1,489 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package sql - -import ( - "context" - "fmt" - "log" - "strings" - "time" - - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql" // nolint: staticcheck - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/tags" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceSqlServer() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceSqlServerCreateUpdate, - Read: resourceSqlServerRead, - Update: resourceSqlServerCreateUpdate, - Delete: resourceSqlServerDelete, - - DeprecationMessage: "The `azurerm_sql_server` resource is deprecated and will be removed in version 4.0 of the AzureRM provider. Please use the `azurerm_mssql_server` resource instead.", - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.ServerID(id) - return err - }), - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(60 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(60 * time.Minute), - Delete: pluginsdk.DefaultTimeout(60 * time.Minute), - }, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.ValidateMsSqlServerName, - }, - - "location": commonschema.Location(), - - "resource_group_name": commonschema.ResourceGroupName(), - - "version": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - "2.0", - "12.0", - }, false), - }, - - "administrator_login": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - }, - - "administrator_login_password": { - Type: pluginsdk.TypeString, - Required: true, - Sensitive: true, - }, - - "connection_policy": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(sql.ServerConnectionTypeDefault), - ValidateFunc: validation.StringInSlice([]string{ - string(sql.ServerConnectionTypeDefault), - string(sql.ServerConnectionTypeProxy), - string(sql.ServerConnectionTypeRedirect), - }, false), - }, - - "identity": commonschema.SystemAssignedIdentityOptional(), - - "fully_qualified_domain_name": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "threat_detection_policy": { - Type: pluginsdk.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "disabled_alerts": { - Type: pluginsdk.TypeSet, - Optional: true, - Set: pluginsdk.HashString, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - ValidateFunc: validation.StringInSlice([]string{ - "Sql_Injection", - "Sql_Injection_Vulnerability", - "Access_Anomaly", - "Data_Exfiltration", - "Unsafe_Action", - }, false), - }, - }, - - "email_account_admins": { - Type: pluginsdk.TypeBool, - Optional: true, - Computed: true, - }, - - "email_addresses": { - Type: pluginsdk.TypeSet, - Optional: true, - Computed: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - }, - Set: pluginsdk.HashString, - }, - - "retention_days": { - Type: pluginsdk.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - }, - - "state": { - Type: pluginsdk.TypeString, - Optional: true, - Default: string(sql.SecurityAlertPolicyStateDisabled), - ValidateFunc: validation.StringInSlice([]string{ - string(sql.SecurityAlertPolicyStateDisabled), - string(sql.SecurityAlertPolicyStateEnabled), - string(sql.SecurityAlertPolicyStateNew), // Only kept for backward compatibility - TODO investigate if we can remove this in 4.0 - }, false), - }, - - "storage_account_access_key": { - Type: pluginsdk.TypeString, - Optional: true, - Sensitive: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - - "storage_endpoint": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, - }, - }, - }, - }, - - "tags": tags.Schema(), - }, - - CustomizeDiff: pluginsdk.CustomizeDiffShim(func(ctx context.Context, diff *pluginsdk.ResourceDiff, v interface{}) error { - threatDetection, hasThreatDetection := diff.GetOk("threat_detection_policy") - if hasThreatDetection { - if tl := threatDetection.([]interface{}); len(tl) > 0 { - t := tl[0].(map[string]interface{}) - - state := strings.ToLower(t["state"].(string)) - _, hasStorageEndpoint := t["storage_endpoint"] - _, hasStorageAccountAccessKey := t["storage_account_access_key"] - if state == "enabled" && !hasStorageEndpoint && !hasStorageAccountAccessKey { - return fmt.Errorf("`storage_endpoint` and `storage_account_access_key` are required when `state` is `Enabled`") - } - } - } - - return nil - }), - } -} - -func resourceSqlServerCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.ServersClient - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - connectionClient := meta.(*clients.Client).Sql.ServerConnectionPoliciesClient - secPolicyClient := meta.(*clients.Client).Sql.ServerSecurityAlertPoliciesClient - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := parse.NewServerID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) - if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.Name) - if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { - return fmt.Errorf("checking for presence of existing %s: %+v", id, err) - } - } - - if !utils.ResponseWasNotFound(existing.Response) { - return tf.ImportAsExistsError("azurerm_sql_server", id.ID()) - } - } - - adminUsername := d.Get("administrator_login").(string) - location := azure.NormalizeLocation(d.Get("location").(string)) - tags := tags.Expand(d.Get("tags").(map[string]interface{})) - version := d.Get("version").(string) - - parameters := sql.Server{ - Location: utils.String(location), - Tags: tags, - ServerProperties: &sql.ServerProperties{ - Version: utils.String(version), - AdministratorLogin: utils.String(adminUsername), - }, - } - - if _, ok := d.GetOk("identity"); ok { - sqlServerIdentity, err := expandAzureRmSqlServerIdentity(d.Get("identity").([]interface{})) - if err != nil { - return fmt.Errorf("expanding `identity`: %+v", err) - } - - parameters.Identity = sqlServerIdentity - } - - if d.HasChange("administrator_login_password") { - adminPassword := d.Get("administrator_login_password").(string) - parameters.ServerProperties.AdministratorLoginPassword = utils.String(adminPassword) - } - - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.Name, parameters) - if err != nil { - return fmt.Errorf("creating/updating %s: %+v", id, err) - } - - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - if response.WasConflict(future.Response()) { - return fmt.Errorf("SQL Server names need to be globally unique and %q is already in use.", id.Name) - } - - return fmt.Errorf("waiting for creation/update of %s: %+v", id, err) - } - - d.SetId(id.ID()) - - connection := sql.ServerConnectionPolicy{ - ServerConnectionPolicyProperties: &sql.ServerConnectionPolicyProperties{ - ConnectionType: sql.ServerConnectionType(d.Get("connection_policy").(string)), - }, - } - if _, err = connectionClient.CreateOrUpdate(ctx, id.ResourceGroup, id.Name, connection); err != nil { - return fmt.Errorf("creating/updating Connection Policy for %s: %+v", id, err) - } - - policyInput := expandSqlServerThreatDetectionPolicy(d) - policyFuture, err := secPolicyClient.CreateOrUpdate(ctx, id.ResourceGroup, id.Name, policyInput) - if err != nil { - return fmt.Errorf("updating database threat detection policy for %s: %+v", id, err) - } - if err := policyFuture.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for update of database threat detection policy for %s: %+v", id, err) - } - - return resourceSqlServerRead(d, meta) -} - -func resourceSqlServerRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.ServersClient - connectionClient := meta.(*clients.Client).Sql.ServerConnectionPoliciesClient - secPolicyClient := meta.(*clients.Client).Sql.ServerSecurityAlertPoliciesClient - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := parse.ServerID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, id.ResourceGroup, id.Name) - if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - log.Printf("[INFO] %s was not found - removing from state", *id) - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - connection, err := connectionClient.Get(ctx, id.ResourceGroup, id.Name) - if err != nil { - return fmt.Errorf("retrieving Blob Connection Policy for %s: %+v", *id, err) - } - - secPolicy, err := secPolicyClient.Get(ctx, id.ResourceGroup, id.Name) - if err == nil { - if err := d.Set("threat_detection_policy", flattenSqlServerThreatDetectionPolicy(d, secPolicy)); err != nil { - return fmt.Errorf("setting `threat_detection_policy`: %+v", err) - } - } - - d.Set("name", id.Name) - d.Set("resource_group_name", id.ResourceGroup) - if location := resp.Location; location != nil { - d.Set("location", azure.NormalizeLocation(*location)) - } - - if err := d.Set("identity", flattenAzureRmSqlServerIdentity(resp.Identity)); err != nil { - return fmt.Errorf("setting `identity`: %+v", err) - } - - if props := resp.ServerProperties; props != nil { - d.Set("administrator_login", props.AdministratorLogin) - d.Set("fully_qualified_domain_name", props.FullyQualifiedDomainName) - d.Set("version", props.Version) - } - - if props := connection.ServerConnectionPolicyProperties; props != nil { - d.Set("connection_policy", string(props.ConnectionType)) - } - - return tags.FlattenAndSet(d, resp.Tags) -} - -func resourceSqlServerDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.ServersClient - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := parse.ServerID(d.Id()) - if err != nil { - return err - } - - future, err := client.Delete(ctx, id.ResourceGroup, id.Name) - if err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - - if err := future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for deletion of %s: %+v", *id, err) - } - - return nil -} - -func expandAzureRmSqlServerIdentity(input []interface{}) (*sql.ResourceIdentity, error) { - expanded, err := identity.ExpandSystemAssigned(input) - if err != nil { - return nil, err - } - - if expanded.Type == identity.TypeNone { - return &sql.ResourceIdentity{}, nil - } - - return &sql.ResourceIdentity{ - Type: sql.IdentityType(string(expanded.Type)), - }, nil -} - -func flattenAzureRmSqlServerIdentity(input *sql.ResourceIdentity) []interface{} { - var transform *identity.SystemAssigned - - if input != nil { - transform = &identity.SystemAssigned{ - Type: identity.Type(string(input.Type)), - } - - if input.PrincipalID != nil { - transform.PrincipalId = input.PrincipalID.String() - } - if input.TenantID != nil { - transform.TenantId = input.TenantID.String() - } - } - - return identity.FlattenSystemAssigned(transform) -} - -func flattenSqlServerThreatDetectionPolicy(d *pluginsdk.ResourceData, policy sql.ServerSecurityAlertPolicy) []interface{} { - properties := policy.SecurityAlertPolicyProperties - - securityAlertPolicy := make(map[string]interface{}) - - securityAlertPolicy["state"] = string(properties.State) - emailAccountAdmins := false - if properties.EmailAccountAdmins != nil { - emailAccountAdmins = *properties.EmailAccountAdmins - } - securityAlertPolicy["email_account_admins"] = emailAccountAdmins - - if disabledAlerts := properties.DisabledAlerts; disabledAlerts != nil { - flattenedAlerts := pluginsdk.NewSet(pluginsdk.HashString, []interface{}{}) - if v := *disabledAlerts; v != nil { - for _, a := range v { - flattenedAlerts.Add(a) - } - } - securityAlertPolicy["disabled_alerts"] = flattenedAlerts - } - if emailAddresses := properties.EmailAddresses; emailAddresses != nil { - flattenedEmails := pluginsdk.NewSet(pluginsdk.HashString, []interface{}{}) - if v := *emailAddresses; v != nil { - for _, a := range v { - flattenedEmails.Add(a) - } - } - securityAlertPolicy["email_addresses"] = flattenedEmails - } - if properties.StorageEndpoint != nil { - securityAlertPolicy["storage_endpoint"] = *properties.StorageEndpoint - } - if properties.RetentionDays != nil { - securityAlertPolicy["retention_days"] = int(*properties.RetentionDays) - } - - // If storage account access key is in state read it to the new state, as the API does not return it for security reasons - if v, ok := d.GetOk("threat_detection_policy.0.storage_account_access_key"); ok { - securityAlertPolicy["storage_account_access_key"] = v.(string) - } - - return []interface{}{securityAlertPolicy} -} - -func expandSqlServerThreatDetectionPolicy(d *pluginsdk.ResourceData) sql.ServerSecurityAlertPolicy { - policy := sql.ServerSecurityAlertPolicy{ - SecurityAlertPolicyProperties: &sql.SecurityAlertPolicyProperties{ - State: sql.SecurityAlertPolicyStateDisabled, - }, - } - properties := policy.SecurityAlertPolicyProperties - - td, ok := d.GetOk("threat_detection_policy") - if !ok { - return policy - } - - if tdl := td.([]interface{}); len(tdl) > 0 { - securityAlert := tdl[0].(map[string]interface{}) - - properties.State = sql.SecurityAlertPolicyState(securityAlert["state"].(string)) - properties.EmailAccountAdmins = utils.Bool(securityAlert["email_account_admins"].(bool)) - - if v, ok := securityAlert["disabled_alerts"]; ok { - alerts := v.(*pluginsdk.Set).List() - expandedAlerts := make([]string, len(alerts)) - for i, a := range alerts { - expandedAlerts[i] = a.(string) - } - properties.DisabledAlerts = &expandedAlerts - } - if v, ok := securityAlert["email_addresses"]; ok { - emails := v.(*pluginsdk.Set).List() - expandedEmails := make([]string, len(emails)) - for i, e := range emails { - expandedEmails[i] = e.(string) - } - properties.EmailAddresses = &expandedEmails - } - if v, ok := securityAlert["retention_days"]; ok { - properties.RetentionDays = utils.Int32(int32(v.(int))) - } - if v, ok := securityAlert["storage_account_access_key"]; ok { - properties.StorageAccountAccessKey = utils.String(v.(string)) - } - if v, ok := securityAlert["storage_endpoint"]; ok { - properties.StorageEndpoint = utils.String(v.(string)) - } - } - - return policy -} diff --git a/internal/services/sql/sql_server_resource_test.go b/internal/services/sql/sql_server_resource_test.go deleted file mode 100644 index de5d2c623a0de..0000000000000 --- a/internal/services/sql/sql_server_resource_test.go +++ /dev/null @@ -1,340 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package sql_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type SqlServerResource struct{} - -func TestAccSqlServer_basic(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_server", "test") - r := SqlServerResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("administrator_login_password"), - }) -} - -func TestAccSqlServer_requiresImport(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_server", "test") - r := SqlServerResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func TestAccSqlServer_disappears(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_server", "test") - r := SqlServerResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - data.DisappearsStep(acceptance.DisappearsStepData{ - Config: r.basic, - TestResource: r, - }), - }) -} - -func TestAccSqlServer_withTags(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_server", "test") - r := SqlServerResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.withTags(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("tags.%").HasValue("2"), - ), - }, - { - Config: r.withTagsUpdated(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("tags.%").HasValue("1"), - ), - }, - data.ImportStep("administrator_login_password"), - }) -} - -func TestAccSqlServer_withIdentity(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_server", "test") - r := SqlServerResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.withIdentity(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("identity.0.type").HasValue("SystemAssigned"), - check.That(data.ResourceName).Key("identity.0.principal_id").IsUUID(), - check.That(data.ResourceName).Key("identity.0.tenant_id").IsUUID(), - ), - }, - data.ImportStep("administrator_login_password"), - }) -} - -func TestAccSqlServer_updateWithIdentityAdded(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_server", "test") - r := SqlServerResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - { - Config: r.withIdentity(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("identity.0.type").HasValue("SystemAssigned"), - check.That(data.ResourceName).Key("identity.0.principal_id").IsUUID(), - check.That(data.ResourceName).Key("identity.0.tenant_id").IsUUID(), - ), - }, - data.ImportStep("administrator_login_password"), - }) -} - -func TestAccSqlServer_threatDetectionPolicy(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_server", "test") - r := SqlServerResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.threatDetectionPolicy(data, "Enabled"), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("threat_detection_policy.#").HasValue("1"), - check.That(data.ResourceName).Key("threat_detection_policy.0.state").HasValue("Enabled"), - check.That(data.ResourceName).Key("threat_detection_policy.0.retention_days").HasValue("15"), - check.That(data.ResourceName).Key("threat_detection_policy.0.disabled_alerts.#").HasValue("1"), - check.That(data.ResourceName).Key("threat_detection_policy.0.email_account_admins").HasValue("true"), - ), - }, - data.ImportStep("administrator_login_password", "threat_detection_policy.0.storage_account_access_key"), - { - Config: r.threatDetectionPolicy(data, "Disabled"), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("threat_detection_policy.#").HasValue("1"), - check.That(data.ResourceName).Key("threat_detection_policy.0.state").HasValue("Disabled"), - ), - }, - }) -} - -func (r SqlServerResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.ServerID(state.ID) - if err != nil { - return nil, err - } - resp, err := client.Sql.ServersClient.Get(ctx, id.ResourceGroup, id.Name) - if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return utils.Bool(false), nil - } - return nil, fmt.Errorf("retrieving Sql Server %q (Resource Group %q): %+v", id.Name, id.ResourceGroup, err) - } - return utils.Bool(true), nil -} - -func (r SqlServerResource) Destroy(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.ServerID(state.ID) - if err != nil { - return nil, err - } - serversClient := client.Sql.ServersClient - future, err := serversClient.Delete(ctx, id.ResourceGroup, id.Name) - if err != nil { - return nil, fmt.Errorf("deleting Sql Server %q (Resource Group %q): %+v", id.Name, id.ResourceGroup, err) - } - if err := future.WaitForCompletionRef(ctx, serversClient.Client); err != nil { - return nil, fmt.Errorf("waiting for deletion of Sql Server %q (Resource Group %q): %+v", id.Name, id.ResourceGroup, err) - } - return utils.Bool(true), nil -} - -func (r SqlServerResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger) -} - -func (r SqlServerResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_sql_server" "import" { - name = azurerm_sql_server.test.name - resource_group_name = azurerm_sql_server.test.resource_group_name - location = azurerm_sql_server.test.location - version = azurerm_sql_server.test.version - administrator_login = azurerm_sql_server.test.administrator_login - administrator_login_password = azurerm_sql_server.test.administrator_login_password -} -`, r.basic(data)) -} - -func (r SqlServerResource) withTags(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" - - tags = { - environment = "staging" - database = "test" - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger) -} - -func (r SqlServerResource) withTagsUpdated(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" - - tags = { - environment = "production" - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger) -} - -func (r SqlServerResource) withIdentity(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" - - identity { - type = "SystemAssigned" - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger) -} - -func (r SqlServerResource) threatDetectionPolicy(data acceptance.TestData, state string) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_storage_account" "test" { - name = "test%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" - - threat_detection_policy { - retention_days = 15 - state = "%s" - disabled_alerts = ["Sql_Injection"] - email_account_admins = true - storage_account_access_key = azurerm_storage_account.test.primary_access_key - storage_endpoint = azurerm_storage_account.test.primary_blob_endpoint - } -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, state) -} diff --git a/internal/services/sql/sql_virtual_network_rule_resource.go b/internal/services/sql/sql_virtual_network_rule_resource.go deleted file mode 100644 index 1aa31dfbfb2c3..0000000000000 --- a/internal/services/sql/sql_virtual_network_rule_resource.go +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package sql - -import ( - "fmt" - "log" - "time" - - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql" // nolint: staticcheck - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceSqlVirtualNetworkRule() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceSqlVirtualNetworkRuleCreateUpdate, - Read: resourceSqlVirtualNetworkRuleRead, - Update: resourceSqlVirtualNetworkRuleCreateUpdate, - Delete: resourceSqlVirtualNetworkRuleDelete, - - DeprecationMessage: "The `azurerm_sql_virtual_network_rule` resource is deprecated and will be removed in version 4.0 of the AzureRM provider. Please use the `azurerm_mssql_virtual_network_rule` resource instead.", - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.VirtualNetworkRuleID(id) - return err - }), - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.VirtualNetworkRuleName, - }, - - "resource_group_name": commonschema.ResourceGroupName(), - - "server_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.ValidateMsSqlServerName, - }, - - "subnet_id": { - Type: pluginsdk.TypeString, - Required: true, - }, - - "ignore_missing_vnet_service_endpoint": { - Type: pluginsdk.TypeBool, - Optional: true, - Default: false, // When not provided, Azure defaults to false - }, - }, - } -} - -func resourceSqlVirtualNetworkRuleCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.VirtualNetworkRulesClient - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := parse.NewVirtualNetworkRuleID(subscriptionId, d.Get("resource_group_name").(string), d.Get("server_name").(string), d.Get("name").(string)) - if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) - if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { - return fmt.Errorf("checking for presence of existing %s: %+v", id, err) - } - } - - if !utils.ResponseWasNotFound(existing.Response) { - return tf.ImportAsExistsError("azurerm_sql_virtual_network_rule", id.ID()) - } - } - - parameters := sql.VirtualNetworkRule{ - VirtualNetworkRuleProperties: &sql.VirtualNetworkRuleProperties{ - VirtualNetworkSubnetID: utils.String(d.Get("subnet_id").(string)), - IgnoreMissingVnetServiceEndpoint: utils.Bool(d.Get("ignore_missing_vnet_service_endpoint").(bool)), - }, - } - - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ServerName, id.Name, parameters) - if err != nil { - return fmt.Errorf("creating/updating %s: %+v", id, err) - } - if err := future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for creation/update of %q: %+v", id, err) - } - - d.SetId(id.ID()) - return resourceSqlVirtualNetworkRuleRead(d, meta) -} - -func resourceSqlVirtualNetworkRuleRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.VirtualNetworkRulesClient - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := parse.VirtualNetworkRuleID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) - if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - log.Printf("[INFO] %s was not found - removing from state", *id) - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.Name) - d.Set("server_name", id.ServerName) - d.Set("resource_group_name", id.ResourceGroup) - - if props := resp.VirtualNetworkRuleProperties; props != nil { - d.Set("ignore_missing_vnet_service_endpoint", props.IgnoreMissingVnetServiceEndpoint) - d.Set("subnet_id", props.VirtualNetworkSubnetID) - } - - return nil -} - -func resourceSqlVirtualNetworkRuleDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Sql.VirtualNetworkRulesClient - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := parse.VirtualNetworkRuleID(d.Id()) - if err != nil { - return err - } - - future, err := client.Delete(ctx, id.ResourceGroup, id.ServerName, id.Name) - if err != nil { - return fmt.Errorf("deleting %s: %+v", id, err) - } - - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for deletion of %s: %+v", id, err) - } - - return nil -} diff --git a/internal/services/sql/sql_virtual_network_rule_resource_test.go b/internal/services/sql/sql_virtual_network_rule_resource_test.go deleted file mode 100644 index 569a87da0645d..0000000000000 --- a/internal/services/sql/sql_virtual_network_rule_resource_test.go +++ /dev/null @@ -1,620 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package sql_test - -import ( - "context" - "fmt" - "regexp" - "testing" - - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type SqlVirtualNetworkRuleResource struct{} - -/* ----Testing for Success--- -Test a basic SQL virtual network rule configuration setup and update scenario, and -validate that new property is set correctly. -*/ -func TestAccSqlVirtualNetworkRule_basic(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_virtual_network_rule", "test") - r := SqlVirtualNetworkRuleResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("ignore_missing_vnet_service_endpoint").HasValue("false"), - ), - }, - data.ImportStep(), - { - Config: r.withUpdates(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("ignore_missing_vnet_service_endpoint").HasValue("true"), - ), - }, - data.ImportStep(), - }) -} - -func TestAccSqlVirtualNetworkRule_requiresImport(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_virtual_network_rule", "test") - r := SqlVirtualNetworkRuleResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("ignore_missing_vnet_service_endpoint").HasValue("false"), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -/* ----Testing for Success--- -Test an update to the SQL Virtual Network Rule to connect to a different subnet, and -validate that new subnet is set correctly. -*/ -func TestAccSqlVirtualNetworkRule_switchSubnets(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_virtual_network_rule", "test") - r := SqlVirtualNetworkRuleResource{} - - // Create regex strings that will ensure that one subnet name exists, but not the other - preConfigRegex := regexp.MustCompile(fmt.Sprintf("(subnet1%d)$|(subnet[^2]%d)$", data.RandomInteger, data.RandomInteger)) // subnet 1 but not 2 - postConfigRegex := regexp.MustCompile(fmt.Sprintf("(subnet2%d)$|(subnet[^1]%d)$", data.RandomInteger, data.RandomInteger)) // subnet 2 but not 1 - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.subnetSwitchPre(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("subnet_id").MatchesRegex(preConfigRegex), - ), - }, - { - Config: r.subnetSwitchPost(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("subnet_id").MatchesRegex(postConfigRegex), - ), - }, - }) -} - -/* ----Testing for Success--- -*/ -func TestAccSqlVirtualNetworkRule_disappears(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_virtual_network_rule", "test") - r := SqlVirtualNetworkRuleResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - data.DisappearsStep(acceptance.DisappearsStepData{ - Config: r.basic, - TestResource: r, - }), - }) -} - -/* ---Testing for Success-- -Test if we are able to create a vnet without the SQL endpoint, but SQL rule -is still applied since the endpoint validation will be set to false. -*/ -func TestAccSqlVirtualNetworkRule_ignoreEndpointValid(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_virtual_network_rule", "test") - r := SqlVirtualNetworkRuleResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.ignoreEndpointValid(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - }) -} - -/* ---Testing for Failure-- -Test if we are able to create a vnet with out the SQL endpoint, but SQL rule -is still applied since the endpoint validation will be set to false. -*/ -func TestAccSqlVirtualNetworkRule_IgnoreEndpointInvalid(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_virtual_network_rule", "test") - r := SqlVirtualNetworkRuleResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.ignoreEndpointInvalid(data), - ExpectError: regexp.MustCompile("Code=\"VirtualNetworkRuleBadRequest\""), - }, - }) -} - -/* ---Testing for Success-- -Test if we are able to create multiple subnets and connect multiple subnets to the -SQL server. -*/ -func TestAccSqlVirtualNetworkRule_multipleSubnets(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_sql_virtual_network_rule", "test") - resourceName2 := "azurerm_sql_virtual_network_rule.rule2" - resourceName3 := "azurerm_sql_virtual_network_rule.rule3" - r := SqlVirtualNetworkRuleResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.multipleSubnets(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(resourceName2).ExistsInAzure(r), - check.That(resourceName3).ExistsInAzure(r), - ), - }, - }) -} - -func (r SqlVirtualNetworkRuleResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.VirtualNetworkRuleID(state.ID) - if err != nil { - return nil, err - } - resp, err := client.Sql.VirtualNetworkRulesClient.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) - if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - return utils.Bool(false), nil - } - return nil, fmt.Errorf("retrieving Sql Virtual Network Rule %q (Server %q / Resource Group %q): %+v", id.Name, id.ServerName, id.ResourceGroup, err) - } - return utils.Bool(true), nil -} - -func (r SqlVirtualNetworkRuleResource) Destroy(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.VirtualNetworkRuleID(state.ID) - if err != nil { - return nil, err - } - rulesClient := client.Sql.VirtualNetworkRulesClient - future, err := rulesClient.Delete(ctx, id.ResourceGroup, id.ServerName, id.Name) - if err != nil { - return nil, fmt.Errorf("deleting Sql Virtual Network Rule %q (Server %q / Resource Group %q): %+v", id.Name, id.ServerName, id.ResourceGroup, err) - } - if err := future.WaitForCompletionRef(ctx, rulesClient.Client); err != nil { - return nil, fmt.Errorf("waiting for deletion for Sql Virtual Network Rule %q (Server %q / Resource Group %q): %+v", id.Name, id.ServerName, id.ResourceGroup, err) - } - return utils.Bool(true), nil -} - -/* -(This test configuration is intended to succeed.) -Basic Provisioning Configuration -*/ -func (r SqlVirtualNetworkRuleResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_virtual_network" "test" { - name = "acctestvnet%d" - address_space = ["10.7.29.0/29"] - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name -} - -resource "azurerm_subnet" "test" { - name = "acctestsubnet%d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.7.29.0/29"] - service_endpoints = ["Microsoft.Sql"] -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "missadmin" - administrator_login_password = "${md5(%d)}!" -} - -resource "azurerm_sql_virtual_network_rule" "test" { - name = "acctestsqlvnetrule%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - subnet_id = azurerm_subnet.test.id - ignore_missing_vnet_service_endpoint = false -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger) -} - -func (r SqlVirtualNetworkRuleResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_sql_virtual_network_rule" "import" { - name = azurerm_sql_virtual_network_rule.test.name - resource_group_name = azurerm_sql_virtual_network_rule.test.resource_group_name - server_name = azurerm_sql_virtual_network_rule.test.server_name - subnet_id = azurerm_sql_virtual_network_rule.test.subnet_id - ignore_missing_vnet_service_endpoint = azurerm_sql_virtual_network_rule.test.ignore_missing_vnet_service_endpoint -} -`, r.basic(data)) -} - -/* -(This test configuration is intended to succeed.) -Basic Provisioning Update Configuration (all other properties would recreate the rule) -ignore_missing_vnet_service_endpoint (false ==> true) -*/ -func (r SqlVirtualNetworkRuleResource) withUpdates(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_virtual_network" "test" { - name = "acctestvnet%d" - address_space = ["10.7.29.0/29"] - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name -} - -resource "azurerm_subnet" "test" { - name = "acctestsubnet%d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.7.29.0/29"] - service_endpoints = ["Microsoft.Sql"] -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "missadmin" - administrator_login_password = "${md5(%d)}!" -} - -resource "azurerm_sql_virtual_network_rule" "test" { - name = "acctestsqlvnetrule%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - subnet_id = azurerm_subnet.test.id - ignore_missing_vnet_service_endpoint = true -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger) -} - -/* -(This test configuration is intended to succeed.) -This test is designed to set up a scenario where a user would want to update the subnet -on a given SQL virtual network rule. This configuration sets up the resources initially. -*/ -func (r SqlVirtualNetworkRuleResource) subnetSwitchPre(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_virtual_network" "test" { - name = "acctestvnet%d" - address_space = ["10.7.29.0/24"] - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name -} - -resource "azurerm_subnet" "test1" { - name = "subnet1%d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.7.29.0/25"] - service_endpoints = ["Microsoft.Sql"] -} - -resource "azurerm_subnet" "test2" { - name = "subnet2%d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.7.29.128/25"] - service_endpoints = ["Microsoft.Sql"] -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "missadmin" - administrator_login_password = "${md5(%d)}!" -} - -resource "azurerm_sql_virtual_network_rule" "test" { - name = "acctestsqlvnetrule%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - subnet_id = azurerm_subnet.test1.id -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger) -} - -/* -(This test configuration is intended to succeed.) -This test is designed to set up a scenario where a user would want to update the subnet -on a given SQL virtual network rule. This configuration contains the update from -azurerm_subnet.test1 to azurerm_subnet.test2. -*/ -func (r SqlVirtualNetworkRuleResource) subnetSwitchPost(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_virtual_network" "test" { - name = "acctestvnet%d" - address_space = ["10.7.29.0/24"] - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name -} - -resource "azurerm_subnet" "test1" { - name = "subnet1%d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.7.29.0/25"] - service_endpoints = ["Microsoft.Sql"] -} - -resource "azurerm_subnet" "test2" { - name = "subnet2%d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.7.29.128/25"] - service_endpoints = ["Microsoft.Sql"] -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "missadmin" - administrator_login_password = "${md5(%d)}!" -} - -resource "azurerm_sql_virtual_network_rule" "test" { - name = "acctestsqlvnetrule%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - subnet_id = azurerm_subnet.test2.id -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger) -} - -/* - (This test configuration is intended to succeed.) - Succeeds because subnet's service_endpoints does not include 'Microsoft.Sql' and the SQL - virtual network rule is set to *not* validate that the service_endpoint includes that value. - The endpoint is purposefully set to Microsoft.Storage. -*/ -func (r SqlVirtualNetworkRuleResource) ignoreEndpointValid(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_virtual_network" "test" { - name = "acctestvnet%d" - address_space = ["10.7.29.0/29"] - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name -} - -resource "azurerm_subnet" "test" { - name = "acctestsubnet%d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.7.29.0/29"] - service_endpoints = ["Microsoft.Storage"] -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "missadmin" - administrator_login_password = "${md5(%d)}!" -} - -resource "azurerm_sql_virtual_network_rule" "test" { - name = "acctestsqlvnetrule%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - subnet_id = azurerm_subnet.test.id - ignore_missing_vnet_service_endpoint = true -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger) -} - -/* - (This test configuration is intended to fail.) - Fails because subnet's service_endpoints does not include 'Microsoft.Sql' and the SQL - virtual network rule is set to validate that the service_endpoint includes that value. - The endpoint is purposefully set to Microsoft.Storage. -*/ -func (r SqlVirtualNetworkRuleResource) ignoreEndpointInvalid(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_virtual_network" "test" { - name = "acctestvnet%d" - address_space = ["10.7.29.0/29"] - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name -} - -resource "azurerm_subnet" "test" { - name = "acctestsubnet%d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.test.name - address_prefixes = ["10.7.29.0/29"] - service_endpoints = ["Microsoft.Storage"] -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "missadmin" - administrator_login_password = "${md5(%d)}!" -} - -resource "azurerm_sql_virtual_network_rule" "test" { - name = "acctestsqlvnetrule%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - subnet_id = azurerm_subnet.test.id - ignore_missing_vnet_service_endpoint = false -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger) -} - -/* -(This test configuration is intended to succeed.) -This configuration sets up 3 subnets in 2 different virtual networks, and adds -SQL virtual network rules for all 3 subnets to the SQL server. -*/ -func (r SqlVirtualNetworkRuleResource) multipleSubnets(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" -} - -resource "azurerm_virtual_network" "vnet1" { - name = "acctestvnet1%d" - address_space = ["10.7.29.0/24"] - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name -} - -resource "azurerm_virtual_network" "vnet2" { - name = "acctestvnet2%d" - address_space = ["10.1.29.0/29"] - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name -} - -resource "azurerm_subnet" "vnet1_subnet1" { - name = "acctestsubnet1%d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.vnet1.name - address_prefixes = ["10.7.29.0/29"] - service_endpoints = ["Microsoft.Sql"] -} - -resource "azurerm_subnet" "vnet1_subnet2" { - name = "acctestsubnet2%d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.vnet1.name - address_prefixes = ["10.7.29.128/29"] - service_endpoints = ["Microsoft.Sql"] -} - -resource "azurerm_subnet" "vnet2_subnet1" { - name = "acctestsubnet3%d" - resource_group_name = azurerm_resource_group.test.name - virtual_network_name = azurerm_virtual_network.vnet2.name - address_prefixes = ["10.1.29.0/29"] - service_endpoints = ["Microsoft.Sql"] -} - -resource "azurerm_sql_server" "test" { - name = "acctestsqlserver1%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - version = "12.0" - administrator_login = "missadmin" - administrator_login_password = "${md5(%d)}!" -} - -resource "azurerm_sql_virtual_network_rule" "test" { - name = "acctestsqlvnetrule1%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - subnet_id = azurerm_subnet.vnet1_subnet1.id - ignore_missing_vnet_service_endpoint = false -} - -resource "azurerm_sql_virtual_network_rule" "rule2" { - name = "acctestsqlvnetrule2%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - subnet_id = azurerm_subnet.vnet1_subnet2.id - ignore_missing_vnet_service_endpoint = false -} - -resource "azurerm_sql_virtual_network_rule" "rule3" { - name = "acctestsqlvnetrule3%d" - resource_group_name = azurerm_resource_group.test.name - server_name = azurerm_sql_server.test.name - subnet_id = azurerm_subnet.vnet2_subnet1.id - ignore_missing_vnet_service_endpoint = false -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger) -} diff --git a/internal/services/sql/testdata/sql_import.bacpac b/internal/services/sql/testdata/sql_import.bacpac deleted file mode 100644 index 98825ab441bb5..0000000000000 Binary files a/internal/services/sql/testdata/sql_import.bacpac and /dev/null differ diff --git a/internal/services/sql/validate/azure_active_directory_administrator_id.go b/internal/services/sql/validate/azure_active_directory_administrator_id.go deleted file mode 100644 index 91ab83a4a095e..0000000000000 --- a/internal/services/sql/validate/azure_active_directory_administrator_id.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" -) - -func AzureActiveDirectoryAdministratorID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := parse.AzureActiveDirectoryAdministratorID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/sql/validate/azure_active_directory_administrator_id_test.go b/internal/services/sql/validate/azure_active_directory_administrator_id_test.go deleted file mode 100644 index 76bf42716c2d4..0000000000000 --- a/internal/services/sql/validate/azure_active_directory_administrator_id_test.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestAzureActiveDirectoryAdministratorID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/", - Valid: false, - }, - - { - // missing value for ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/", - Valid: false, - }, - - { - // missing AdministratorName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/server1/", - Valid: false, - }, - - { - // missing value for AdministratorName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/server1/administrators/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/server1/administrators/activeDirectory", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.SQL/SERVERS/SERVER1/ADMINISTRATORS/ACTIVEDIRECTORY", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := AzureActiveDirectoryAdministratorID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/sql/validate/database_id.go b/internal/services/sql/validate/database_id.go deleted file mode 100644 index ff41eb131a346..0000000000000 --- a/internal/services/sql/validate/database_id.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" -) - -func DatabaseID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := parse.DatabaseID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/sql/validate/database_id_test.go b/internal/services/sql/validate/database_id_test.go deleted file mode 100644 index 2c270bfa48b4b..0000000000000 --- a/internal/services/sql/validate/database_id_test.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestDatabaseID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/", - Valid: false, - }, - - { - // missing value for ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/", - Valid: false, - }, - - { - // missing Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/server1/", - Valid: false, - }, - - { - // missing value for Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/server1/databases/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/server1/databases/database1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.SQL/SERVERS/SERVER1/DATABASES/DATABASE1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := DatabaseID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/sql/validate/elastic_pool_id.go b/internal/services/sql/validate/elastic_pool_id.go deleted file mode 100644 index 956943a79e630..0000000000000 --- a/internal/services/sql/validate/elastic_pool_id.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" -) - -func ElasticPoolID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := parse.ElasticPoolID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/sql/validate/elastic_pool_id_test.go b/internal/services/sql/validate/elastic_pool_id_test.go deleted file mode 100644 index 6f39dcb957c82..0000000000000 --- a/internal/services/sql/validate/elastic_pool_id_test.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestElasticPoolID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/", - Valid: false, - }, - - { - // missing value for ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/", - Valid: false, - }, - - { - // missing Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/server1/", - Valid: false, - }, - - { - // missing value for Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/server1/elasticPools/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/server1/elasticPools/elasticPool1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.SQL/SERVERS/SERVER1/ELASTICPOOLS/ELASTICPOOL1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := ElasticPoolID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/sql/validate/failover_group_id.go b/internal/services/sql/validate/failover_group_id.go deleted file mode 100644 index 0813d7be9517f..0000000000000 --- a/internal/services/sql/validate/failover_group_id.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" -) - -func FailoverGroupID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := parse.FailoverGroupID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/sql/validate/failover_group_id_test.go b/internal/services/sql/validate/failover_group_id_test.go deleted file mode 100644 index 467b12ca3f8ab..0000000000000 --- a/internal/services/sql/validate/failover_group_id_test.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestFailoverGroupID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/", - Valid: false, - }, - - { - // missing value for ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/", - Valid: false, - }, - - { - // missing Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/server1/", - Valid: false, - }, - - { - // missing value for Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/server1/failoverGroups/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/server1/failoverGroups/failoverGroup1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.SQL/SERVERS/SERVER1/FAILOVERGROUPS/FAILOVERGROUP1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := FailoverGroupID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/sql/validate/firewall_rule_id.go b/internal/services/sql/validate/firewall_rule_id.go deleted file mode 100644 index b3d2cf3c42029..0000000000000 --- a/internal/services/sql/validate/firewall_rule_id.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" -) - -func FirewallRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := parse.FirewallRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/sql/validate/firewall_rule_id_test.go b/internal/services/sql/validate/firewall_rule_id_test.go deleted file mode 100644 index e5f316bb7e151..0000000000000 --- a/internal/services/sql/validate/firewall_rule_id_test.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestFirewallRuleID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/", - Valid: false, - }, - - { - // missing value for ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/", - Valid: false, - }, - - { - // missing Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/server1/", - Valid: false, - }, - - { - // missing value for Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/server1/firewallRules/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/server1/firewallRules/rule1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.SQL/SERVERS/SERVER1/FIREWALLRULES/RULE1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := FirewallRuleID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/sql/validate/instance_failover_group_id.go b/internal/services/sql/validate/instance_failover_group_id.go deleted file mode 100644 index 19c55de80eb8c..0000000000000 --- a/internal/services/sql/validate/instance_failover_group_id.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" -) - -func InstanceFailoverGroupID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := parse.InstanceFailoverGroupID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/sql/validate/instance_failover_group_id_test.go b/internal/services/sql/validate/instance_failover_group_id_test.go deleted file mode 100644 index 1ec206547ce15..0000000000000 --- a/internal/services/sql/validate/instance_failover_group_id_test.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestInstanceFailoverGroupID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing LocationName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/", - Valid: false, - }, - - { - // missing value for LocationName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/locations/", - Valid: false, - }, - - { - // missing Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/locations/Location/", - Valid: false, - }, - - { - // missing value for Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/locations/Location/instanceFailoverGroups/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/locations/Location/instanceFailoverGroups/failoverGroup1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.SQL/LOCATIONS/LOCATION/INSTANCEFAILOVERGROUPS/FAILOVERGROUP1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := InstanceFailoverGroupID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/sql/validate/managed_database_id.go b/internal/services/sql/validate/managed_database_id.go deleted file mode 100644 index ce81e78073910..0000000000000 --- a/internal/services/sql/validate/managed_database_id.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" -) - -func ManagedDatabaseID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := parse.ManagedDatabaseID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/sql/validate/managed_database_id_test.go b/internal/services/sql/validate/managed_database_id_test.go deleted file mode 100644 index e97ff084fd5e7..0000000000000 --- a/internal/services/sql/validate/managed_database_id_test.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestManagedDatabaseID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing ManagedInstanceName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/", - Valid: false, - }, - - { - // missing value for ManagedInstanceName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/managedInstances/", - Valid: false, - }, - - { - // missing DatabaseName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/managedInstances/instance1/", - Valid: false, - }, - - { - // missing value for DatabaseName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/managedInstances/instance1/databases/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/managedInstances/instance1/databases/database1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.SQL/MANAGEDINSTANCES/INSTANCE1/DATABASES/DATABASE1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := ManagedDatabaseID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/sql/validate/managed_instance_azure_active_directory_administrator_id.go b/internal/services/sql/validate/managed_instance_azure_active_directory_administrator_id.go deleted file mode 100644 index 3ac484b75723b..0000000000000 --- a/internal/services/sql/validate/managed_instance_azure_active_directory_administrator_id.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" -) - -func ManagedInstanceAzureActiveDirectoryAdministratorID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := parse.ManagedInstanceAzureActiveDirectoryAdministratorID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/sql/validate/managed_instance_azure_active_directory_administrator_id_test.go b/internal/services/sql/validate/managed_instance_azure_active_directory_administrator_id_test.go deleted file mode 100644 index 1282bfd199091..0000000000000 --- a/internal/services/sql/validate/managed_instance_azure_active_directory_administrator_id_test.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestManagedInstanceAzureActiveDirectoryAdministratorID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing ManagedInstanceName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/", - Valid: false, - }, - - { - // missing value for ManagedInstanceName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/managedInstances/", - Valid: false, - }, - - { - // missing AdministratorName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/managedInstances/instance1/", - Valid: false, - }, - - { - // missing value for AdministratorName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/managedInstances/instance1/administrators/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/managedInstances/instance1/administrators/activeDirectory", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.SQL/MANAGEDINSTANCES/INSTANCE1/ADMINISTRATORS/ACTIVEDIRECTORY", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := ManagedInstanceAzureActiveDirectoryAdministratorID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/sql/validate/managed_instance_id.go b/internal/services/sql/validate/managed_instance_id.go deleted file mode 100644 index 65a3d399a085a..0000000000000 --- a/internal/services/sql/validate/managed_instance_id.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" -) - -func ManagedInstanceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := parse.ManagedInstanceID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/sql/validate/managed_instance_id_test.go b/internal/services/sql/validate/managed_instance_id_test.go deleted file mode 100644 index 164095872ec9c..0000000000000 --- a/internal/services/sql/validate/managed_instance_id_test.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestManagedInstanceID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/", - Valid: false, - }, - - { - // missing value for Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/managedInstances/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/managedInstances/instance1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.SQL/MANAGEDINSTANCES/INSTANCE1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := ManagedInstanceID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/sql/validate/server_id.go b/internal/services/sql/validate/server_id.go deleted file mode 100644 index 5eb9dc4264c7b..0000000000000 --- a/internal/services/sql/validate/server_id.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" -) - -func ServerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := parse.ServerID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/sql/validate/server_id_test.go b/internal/services/sql/validate/server_id_test.go deleted file mode 100644 index fd68401481484..0000000000000 --- a/internal/services/sql/validate/server_id_test.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestServerID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/", - Valid: false, - }, - - { - // missing value for Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/server1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.SQL/SERVERS/SERVER1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := ServerID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/sql/validate/virtual_network_rule_id.go b/internal/services/sql/validate/virtual_network_rule_id.go deleted file mode 100644 index 53d952c57340c..0000000000000 --- a/internal/services/sql/validate/virtual_network_rule_id.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse" -) - -func VirtualNetworkRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := parse.VirtualNetworkRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/sql/validate/virtual_network_rule_id_test.go b/internal/services/sql/validate/virtual_network_rule_id_test.go deleted file mode 100644 index 3ba31ab911a77..0000000000000 --- a/internal/services/sql/validate/virtual_network_rule_id_test.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestVirtualNetworkRuleID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/", - Valid: false, - }, - - { - // missing value for ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/", - Valid: false, - }, - - { - // missing Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/server1/", - Valid: false, - }, - - { - // missing value for Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/server1/virtualNetworkRules/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/server1/virtualNetworkRules/virtualNetworkRule1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.SQL/SERVERS/SERVER1/VIRTUALNETWORKRULES/VIRTUALNETWORKRULE1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := VirtualNetworkRuleID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/sql/validate/virtual_network_rule_name.go b/internal/services/sql/validate/virtual_network_rule_name.go deleted file mode 100644 index f5381452bbabb..0000000000000 --- a/internal/services/sql/validate/virtual_network_rule_name.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "fmt" - "regexp" -) - -func VirtualNetworkRuleName(v interface{}, k string) (warnings []string, errors []error) { - value := v.(string) - - // Cannot be empty - if len(value) == 0 { - errors = append(errors, fmt.Errorf( - "%q cannot be an empty string: %q", k, value)) - } - - // Cannot be shorter than 2 characters - if len(value) == 1 { - errors = append(errors, fmt.Errorf( - "%q cannot be shorter than 2 characters: %q", k, value)) - } - - // Cannot be more than 64 characters - if len(value) > 64 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 64 characters: %q", k, value)) - } - - // Must only contain alphanumeric characters, underscores, periods or hyphens - if !regexp.MustCompile(`^[A-Za-z0-9-\._]*$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q can only contain alphanumeric characters, underscores, periods and hyphens: %q", - k, value)) - } - - // Cannot end in a hyphen - if regexp.MustCompile(`-$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot end with a hyphen: %q", k, value)) - } - - // Cannot end in a period - if regexp.MustCompile(`\.$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot end with a period: %q", k, value)) - } - - // Cannot start with a period, underscore or hyphen - if regexp.MustCompile(`^[\._-]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot start with a period, underscore or hyphen: %q", k, value)) - } - - // There are multiple returns in the case that there is more than one invalid - // case applied to the name. - return warnings, errors -} diff --git a/internal/services/sql/validate/virtual_network_rule_name_test.go b/internal/services/sql/validate/virtual_network_rule_name_test.go deleted file mode 100644 index 2555b9a5b1636..0000000000000 --- a/internal/services/sql/validate/virtual_network_rule_name_test.go +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate_test - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/validate" -) - -/* ---Testing for Failure-- -Validation Function Tests - Invalid Name Validations -*/ -func TestVirtualNetworkRuleInvalidNameValidation(t *testing.T) { - cases := []struct { - Value string - ErrCount int - }{ - // Must only contain alphanumeric characters, periods, underscores or hyphens (4 cases) - { - Value: "test!Rule", - ErrCount: 1, - }, - { - Value: "test&Rule", - ErrCount: 1, - }, - { - Value: "test:Rule", - ErrCount: 1, - }, - { - Value: "test'Rule", - ErrCount: 1, - }, - // Cannot be more than 64 characters (1 case - ensure starts with a letter) - { - Value: fmt.Sprintf("v%s", acceptance.RandString(64)), - ErrCount: 1, - }, - // Cannot be empty (1 case) - { - Value: "", - ErrCount: 1, - }, - // Cannot be single character (1 case) - { - Value: "a", - ErrCount: 1, - }, - // Cannot end in a hyphen (1 case) - { - Value: "testRule-", - ErrCount: 1, - }, - // Cannot end in a period (1 case) - { - Value: "testRule.", - ErrCount: 1, - }, - // Cannot start with a period, underscore or hyphen (3 cases) - { - Value: ".testRule", - ErrCount: 1, - }, - { - Value: "_testRule", - ErrCount: 1, - }, - { - Value: "-testRule", - ErrCount: 1, - }, - } - - for _, tc := range cases { - _, errors := validate.VirtualNetworkRuleName(tc.Value, "azurerm_sql_virtual_network_rule") - - if len(errors) != tc.ErrCount { - t.Fatalf("Bad: Expected the Azure RM SQL Virtual Network Rule Name to trigger a validation error.") - } - } -} - -/* ---Testing for Success-- -Validation Function Tests - (Barely) Valid Name Validations -*/ -func TestVirtualNetworkRuleValidNameValidation(t *testing.T) { - cases := []struct { - Value string - ErrCount int - }{ - // Test all lowercase - { - Value: "thisisarule", - ErrCount: 0, - }, - // Test all uppercase - { - Value: "THISISARULE", - ErrCount: 0, - }, - // Test alternating cases - { - Value: "tHiSiSaRuLe", - ErrCount: 0, - }, - // Test hyphens - { - Value: "this-is-a-rule", - ErrCount: 0, - }, - // Test multiple hyphens in a row - { - Value: "this----1s----a----ru1e", - ErrCount: 0, - }, - // Test underscores - { - Value: "this_is_a_rule", - ErrCount: 0, - }, - // Test ending with underscore - { - Value: "this_is_a_rule_", - ErrCount: 0, - }, - // Test multiple underscoress in a row - { - Value: "this____1s____a____ru1e", - ErrCount: 0, - }, - // Test periods - { - Value: "this.is.a.rule", - ErrCount: 0, - }, - // Test multiple periods in a row - { - Value: "this....1s....a....ru1e", - ErrCount: 0, - }, - // Test numbers - { - Value: "1108501298509850810258091285091820-5", - ErrCount: 0, - }, - // Test a lot of hyphens and numbers - { - Value: "x-5-4-1-2-5-2-6-1-5-2-5-1-2-5-6-2-2", - ErrCount: 0, - }, - // Test a lot of underscores and numbers - { - Value: "x_5_4_1_2_5_2_6_1_5_2_5_1_2_5_6_2_2", - ErrCount: 0, - }, - // Test a lot of periods and numbers - { - Value: "x.5.4.1.2.5.2.6.1.5.2.5.1.2.5.6.2.2", - ErrCount: 0, - }, - // Test exactly 64 characters - { - Value: fmt.Sprintf("v%s", acceptance.RandString(63)), - ErrCount: 0, - }, - } - - for _, tc := range cases { - _, errors := validate.VirtualNetworkRuleName(tc.Value, "azurerm_sql_virtual_network_rule") - - if len(errors) != tc.ErrCount { - t.Fatalf("Bad: Expected the Azure RM SQL Virtual Network Rule Name pass name validation successfully but triggered a validation error.") - } - } -} diff --git a/internal/services/storage/storage_account_local_user_resource_test.go b/internal/services/storage/storage_account_local_user_resource_test.go index 5783b89ea5134..714d8753f8589 100644 --- a/internal/services/storage/storage_account_local_user_resource_test.go +++ b/internal/services/storage/storage_account_local_user_resource_test.go @@ -63,6 +63,21 @@ func TestAccLocalUser_sshKeyOnly(t *testing.T) { }) } +func TestAccLocalUser_sshKeyED25519(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_storage_account_local_user", "test") + r := LocalUserResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.sshKeyED25519(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep("ssh_authorized_key"), + }) +} + func TestAccLocalUser_passwordAndSSHKey(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_storage_account_local_user", "test") r := LocalUserResource{} @@ -216,6 +231,23 @@ resource "azurerm_storage_account_local_user" "test" { `, template) } +func (r LocalUserResource) sshKeyED25519(data acceptance.TestData) string { + template := r.template(data) + return fmt.Sprintf(` +%s + +resource "azurerm_storage_account_local_user" "test" { + name = "user" + storage_account_id = azurerm_storage_account.test.id + ssh_key_enabled = true + ssh_authorized_key { + description = "key1" + key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINreJb2zmSALgQUjzq/vKsf05fp5kM0ZGl8YDsP1FdWc" + } +} +`, template) +} + func (r LocalUserResource) sshKeyOnlyUpdate(data acceptance.TestData) string { template := r.template(data) return fmt.Sprintf(` diff --git a/internal/services/storage/storage_account_resource.go b/internal/services/storage/storage_account_resource.go index 38babe74c41d2..2826809c67279 100644 --- a/internal/services/storage/storage_account_resource.go +++ b/internal/services/storage/storage_account_resource.go @@ -1906,6 +1906,14 @@ func resourceStorageAccountUpdate(d *pluginsdk.ResourceData, meta interface{}) e if err != nil { return fmt.Errorf("expanding `customer_managed_key`: %+v", err) } + + // When updating CMK the existing value for `RequireInfrastructureEncryption` gets overwritten which results in + // an error from the API so we set this back into encryption after it's been overwritten by this update + existingEnc := existing.Model.Properties.Encryption + if existingEnc != nil && existingEnc.RequireInfrastructureEncryption != nil { + encryption.RequireInfrastructureEncryption = existingEnc.RequireInfrastructureEncryption + } + props.Encryption = encryption } if d.HasChange("shared_access_key_enabled") { @@ -2516,6 +2524,9 @@ func resourceStorageAccountDelete(d *pluginsdk.ResourceData, meta interface{}) e existing, err := client.GetProperties(ctx, *id, storageaccounts.DefaultGetPropertiesOperationOptions()) if err != nil { + if response.WasNotFound(existing.HttpResponse) { + return nil + } return fmt.Errorf("retrieving %s: %+v", *id, err) } @@ -2581,12 +2592,12 @@ func flattenAccountCustomDomain(input *storageaccounts.CustomDomain) []interface } func expandAccountCustomerManagedKey(ctx context.Context, keyVaultClient *keyVaultClient.Client, subscriptionId string, input []interface{}, accountTier storageaccounts.SkuTier, accountKind storageaccounts.Kind, expandedIdentity identity.LegacySystemAndUserAssignedMap, queueEncryptionKeyType, tableEncryptionKeyType storageaccounts.KeyType) (*storageaccounts.Encryption, error) { - if accountKind != storageaccounts.KindStorageVTwo { + if accountKind == storageaccounts.KindStorage { if queueEncryptionKeyType == storageaccounts.KeyTypeAccount { - return nil, fmt.Errorf("`queue_encryption_key_type = %q` can only be used with account kind `%q`", string(storageaccounts.KeyTypeAccount), string(storageaccounts.KindStorageVTwo)) + return nil, fmt.Errorf("`queue_encryption_key_type = %q` cannot be used with account kind `%q`", string(storageaccounts.KeyTypeAccount), string(storageaccounts.KindStorage)) } if tableEncryptionKeyType == storageaccounts.KeyTypeAccount { - return nil, fmt.Errorf("`table_encryption_key_type = %q` can only be used with account kind `%q`", string(storageaccounts.KeyTypeAccount), string(storageaccounts.KindStorageVTwo)) + return nil, fmt.Errorf("`table_encryption_key_type = %q` cannot be used with account kind `%q`", string(storageaccounts.KeyTypeAccount), string(storageaccounts.KindStorage)) } } if len(input) == 0 { diff --git a/internal/services/storage/storage_account_resource_test.go b/internal/services/storage/storage_account_resource_test.go index 8c5831cb41b10..7eabd1f38f465 100644 --- a/internal/services/storage/storage_account_resource_test.go +++ b/internal/services/storage/storage_account_resource_test.go @@ -5339,7 +5339,7 @@ resource "azurerm_user_assigned_identity" "test" { } resource "azurerm_key_vault_managed_hardware_security_module_role_assignment" "test" { - vault_base_url = azurerm_key_vault_managed_hardware_security_module.test.hsm_uri + managed_hsm_id = azurerm_key_vault_managed_hardware_security_module.test.id name = "1e243909-064c-6ac3-84e9-1c8bf8d6ad22" scope = "/keys" role_definition_id = "/Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b" @@ -5347,7 +5347,7 @@ resource "azurerm_key_vault_managed_hardware_security_module_role_assignment" "t } resource "azurerm_key_vault_managed_hardware_security_module_role_assignment" "test1" { - vault_base_url = azurerm_key_vault_managed_hardware_security_module.test.hsm_uri + managed_hsm_id = azurerm_key_vault_managed_hardware_security_module.test.id name = "1e243909-064c-6ac3-84e9-1c8bf8d6ad23" scope = "/keys" role_definition_id = "/Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778" @@ -5355,7 +5355,7 @@ resource "azurerm_key_vault_managed_hardware_security_module_role_assignment" "t } resource "azurerm_key_vault_managed_hardware_security_module_role_assignment" "user" { - vault_base_url = azurerm_key_vault_managed_hardware_security_module.test.hsm_uri + managed_hsm_id = azurerm_key_vault_managed_hardware_security_module.test.id name = "1e243909-064c-6ac3-84e9-1c8bf8d6ad20" scope = "/keys" role_definition_id = "/Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b" diff --git a/internal/services/storage/storage_blob_inventory_policy_resource.go b/internal/services/storage/storage_blob_inventory_policy_resource.go index 4a51e20d24a03..0d65e47b2f064 100644 --- a/internal/services/storage/storage_blob_inventory_policy_resource.go +++ b/internal/services/storage/storage_blob_inventory_policy_resource.go @@ -4,7 +4,6 @@ package storage import ( - "context" "fmt" "log" "time" @@ -166,18 +165,6 @@ func resourceStorageBlobInventoryPolicy() *pluginsdk.Resource { }, }, }, - - CustomizeDiff: pluginsdk.CustomizeDiffShim(func(ctx context.Context, diff *pluginsdk.ResourceDiff, v interface{}) error { - rules := diff.Get("rules").(*pluginsdk.Set).List() - for _, rule := range rules { - v := rule.(map[string]interface{}) - if v["scope"] != string(blobinventorypolicies.ObjectTypeBlob) && len(v["filter"].([]interface{})) != 0 { - return fmt.Errorf("the `filter` can only be set when the `scope` is `%s`", blobinventorypolicies.ObjectTypeBlob) - } - } - - return nil - }), } } @@ -207,12 +194,17 @@ func resourceStorageBlobInventoryPolicyCreateUpdate(d *pluginsdk.ResourceData, m } } + rules, err := expandBlobInventoryPolicyRules(d.Get("rules").(*pluginsdk.Set).List()) + if err != nil { + return err + } + payload := blobinventorypolicies.BlobInventoryPolicy{ Properties: &blobinventorypolicies.BlobInventoryPolicyProperties{ Policy: blobinventorypolicies.BlobInventoryPolicySchema{ Enabled: true, Type: blobinventorypolicies.InventoryRuleTypeInventory, - Rules: expandBlobInventoryPolicyRules(d.Get("rules").(*pluginsdk.Set).List()), + Rules: rules, }, }, } @@ -276,10 +268,16 @@ func resourceStorageBlobInventoryPolicyDelete(d *pluginsdk.ResourceData, meta in return nil } -func expandBlobInventoryPolicyRules(input []interface{}) []blobinventorypolicies.BlobInventoryPolicyRule { +func expandBlobInventoryPolicyRules(input []interface{}) ([]blobinventorypolicies.BlobInventoryPolicyRule, error) { results := make([]blobinventorypolicies.BlobInventoryPolicyRule, 0) for _, item := range input { v := item.(map[string]interface{}) + + filters, err := expandBlobInventoryPolicyFilter(v["filter"].([]interface{}), v["scope"].(string)) + if err != nil { + return nil, fmt.Errorf("%s rule is invalid: %+v", v["name"].(string), err) + } + results = append(results, blobinventorypolicies.BlobInventoryPolicyRule{ Enabled: true, Name: v["name"].(string), @@ -289,19 +287,19 @@ func expandBlobInventoryPolicyRules(input []interface{}) []blobinventorypolicies Schedule: blobinventorypolicies.Schedule(v["schedule"].(string)), ObjectType: blobinventorypolicies.ObjectType(v["scope"].(string)), SchemaFields: *utils.ExpandStringSlice(v["schema_fields"].([]interface{})), - Filters: expandBlobInventoryPolicyFilter(v["filter"].([]interface{})), + Filters: filters, }, }) } - return results + return results, nil } -func expandBlobInventoryPolicyFilter(input []interface{}) *blobinventorypolicies.BlobInventoryPolicyFilter { +func expandBlobInventoryPolicyFilter(input []interface{}, objectType string) (*blobinventorypolicies.BlobInventoryPolicyFilter, error) { if len(input) == 0 { - return nil + return nil, nil } v := input[0].(map[string]interface{}) - return &blobinventorypolicies.BlobInventoryPolicyFilter{ + policyFilter := &blobinventorypolicies.BlobInventoryPolicyFilter{ PrefixMatch: utils.ExpandStringSlice(v["prefix_match"].(*pluginsdk.Set).List()), ExcludePrefix: utils.ExpandStringSlice(v["exclude_prefixes"].(*pluginsdk.Set).List()), BlobTypes: utils.ExpandStringSlice(v["blob_types"].(*pluginsdk.Set).List()), @@ -309,6 +307,18 @@ func expandBlobInventoryPolicyFilter(input []interface{}) *blobinventorypolicies IncludeDeleted: utils.Bool(v["include_deleted"].(bool)), IncludeSnapshots: utils.Bool(v["include_snapshots"].(bool)), } + + // If the objectType is Container, the following values must be nil when passed to the API + if objectType == string(blobinventorypolicies.ObjectTypeContainer) { + if len(*policyFilter.BlobTypes) > 0 || *policyFilter.IncludeBlobVersions || *policyFilter.IncludeSnapshots { + return nil, fmt.Errorf("`blobTypes`, `includeBlobVersions`, `includeSnapshots` cannot be used with objectType `Container`") + } + policyFilter.BlobTypes = nil + policyFilter.IncludeBlobVersions = nil + policyFilter.IncludeSnapshots = nil + } + + return policyFilter, nil } func flattenBlobInventoryPolicyRules(input []blobinventorypolicies.BlobInventoryPolicyRule) []interface{} { diff --git a/internal/services/storage/storage_blob_inventory_policy_resource_test.go b/internal/services/storage/storage_blob_inventory_policy_resource_test.go index 72290cd7badcb..4103aeeba6935 100644 --- a/internal/services/storage/storage_blob_inventory_policy_resource_test.go +++ b/internal/services/storage/storage_blob_inventory_policy_resource_test.go @@ -96,6 +96,20 @@ func TestAccStorageBlobInventoryPolicy_update(t *testing.T) { }) } +func TestAccStorageBlobInventoryPolicy_containerFilter(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_storage_blob_inventory_policy", "test") + r := StorageBlobInventoryPolicyResource{} + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.containerFilter(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + func (r StorageBlobInventoryPolicyResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { id, err := commonids.ParseStorageAccountID(state.ID) if err != nil { @@ -280,3 +294,33 @@ resource "azurerm_storage_blob_inventory_policy" "test" { } `, template) } + +func (r StorageBlobInventoryPolicyResource) containerFilter(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +resource "azurerm_storage_blob_inventory_policy" "test" { + storage_account_id = azurerm_storage_account.test.id + rules { + name = "rule1" + storage_container_name = azurerm_storage_container.test.name + format = "Csv" + schedule = "Daily" + scope = "Container" + filter { + blob_types = [] + include_deleted = true + } + schema_fields = [ + "Name", + "Last-Modified", + "Deleted", + "HasImmutabilityPolicy", + "Version", + "DeletedTime", + "RemainingRetentionDays" + ] + } +} +`, r.template(data)) +} diff --git a/internal/services/storage/storage_blob_resource.go b/internal/services/storage/storage_blob_resource.go index 56db509abe3ca..6962694d563d8 100644 --- a/internal/services/storage/storage_blob_resource.go +++ b/internal/services/storage/storage_blob_resource.go @@ -128,7 +128,6 @@ func resourceStorageBlob() *pluginsdk.Resource { "source_content": { Type: pluginsdk.TypeString, Optional: true, - ForceNew: true, ConflictsWith: []string{"source", "source_uri"}, }, @@ -451,7 +450,10 @@ func resourceStorageBlobDelete(d *pluginsdk.ResourceData, meta interface{}) erro input := blobs.DeleteInput{ DeleteSnapshots: true, } - if _, err = blobsClient.Delete(ctx, id.ContainerName, id.BlobName, input); err != nil { + if resp, err := blobsClient.Delete(ctx, id.ContainerName, id.BlobName, input); err != nil { + if response.WasNotFound(resp.HttpResponse) { + return nil + } return fmt.Errorf("deleting %s: %v", id, err) } diff --git a/internal/services/storage/storage_object_replication_resource.go b/internal/services/storage/storage_object_replication_resource.go index f17a0a14f2036..e1eb3898b61d0 100644 --- a/internal/services/storage/storage_object_replication_resource.go +++ b/internal/services/storage/storage_object_replication_resource.go @@ -66,14 +66,12 @@ func resourceStorageObjectReplication() *pluginsdk.Resource { "source_container_name": { Type: pluginsdk.TypeString, Required: true, - ForceNew: true, ValidateFunc: validate.StorageContainerName, }, "destination_container_name": { Type: pluginsdk.TypeString, Required: true, - ForceNew: true, ValidateFunc: validate.StorageContainerName, }, diff --git a/internal/services/storage/storage_object_replication_resource_test.go b/internal/services/storage/storage_object_replication_resource_test.go index bef16e4cb3d04..e723c0ebb5172 100644 --- a/internal/services/storage/storage_object_replication_resource_test.go +++ b/internal/services/storage/storage_object_replication_resource_test.go @@ -319,7 +319,7 @@ resource "azurerm_storage_object_replication" "test" { rules { source_container_name = azurerm_storage_container.src.name destination_container_name = azurerm_storage_container.dst.name - copy_blobs_created_after = "%s" + copy_blobs_created_after = "%[2]s" filter_out_blobs_with_prefix = ["blobA", "blobB", "blobC"] } rules { diff --git a/internal/services/storage/storage_share_file_resource.go b/internal/services/storage/storage_share_file_resource.go index 4ea6732b3a376..15790f2daa6af 100644 --- a/internal/services/storage/storage_share_file_resource.go +++ b/internal/services/storage/storage_share_file_resource.go @@ -300,7 +300,17 @@ func resourceStorageShareFileRead(d *pluginsdk.ResourceData, meta interface{}) e } d.Set("content_type", props.ContentType) d.Set("content_encoding", props.ContentEncoding) - d.Set("content_md5", props.ContentMD5) + + // Set the ContentMD5 value to md5 hash in hex + contentMD5 := "" + if props.ContentMD5 != "" { + contentMD5, err = convertBase64ToHexEncoding(props.ContentMD5) + if err != nil { + return fmt.Errorf("converting hex to base64 encoding for content_md5: %v", err) + } + } + d.Set("content_md5", contentMD5) + d.Set("content_disposition", props.ContentDisposition) if props.ContentLength == nil { diff --git a/internal/services/storage/storage_share_file_resource_test.go b/internal/services/storage/storage_share_file_resource_test.go index 9e588ae37e419..86087d3ff4980 100644 --- a/internal/services/storage/storage_share_file_resource_test.go +++ b/internal/services/storage/storage_share_file_resource_test.go @@ -325,14 +325,13 @@ func (r StorageShareFileResource) complete(data acceptance.TestData) string { %s resource "azurerm_storage_share_file" "test" { - name = "test" + name = "file" storage_share_id = azurerm_storage_share.test.id content_type = "test_content_type" content_encoding = "test_encoding" content_disposition = "test_content_disposition" - content_md5 = "1234567890abcdef1234567890abcdef" metadata = { hello = "world" @@ -349,7 +348,8 @@ resource "azurerm_storage_share_file" "test" { name = "test" storage_share_id = azurerm_storage_share.test.id - source = "%s" + source = "%[2]s" + content_md5 = filemd5(%[2]q) metadata = { hello = "world" diff --git a/internal/services/storage/storage_share_resource.go b/internal/services/storage/storage_share_resource.go index 08c714fe5b8bd..76106cf93a3c8 100644 --- a/internal/services/storage/storage_share_resource.go +++ b/internal/services/storage/storage_share_resource.go @@ -6,6 +6,7 @@ package storage import ( "fmt" "log" + "strings" "time" "github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/storageaccounts" @@ -359,8 +360,19 @@ func resourceStorageShareUpdate(d *pluginsdk.ResourceData, meta interface{}) err log.Printf("[DEBUG] Updating Access Tier for %s", id) tier := shares.AccessTier(d.Get("access_tier").(string)) - if err = client.UpdateTier(ctx, id.ShareName, tier); err != nil { - return fmt.Errorf("updating Access Tier for %s: %v", id, err) + err = pluginsdk.Retry(d.Timeout(pluginsdk.TimeoutUpdate), func() *pluginsdk.RetryError { + err = client.UpdateTier(ctx, id.ShareName, tier) + if err != nil { + if strings.Contains(err.Error(), "Cannot change access tier at this moment") { + return pluginsdk.RetryableError(err) + } + return pluginsdk.NonRetryableError(err) + } + time.Sleep(30 * time.Second) + return nil + }) + if err != nil { + return fmt.Errorf("updating access tier %s: %+v", id, err) } log.Printf("[DEBUG] Updated Access Tier for %s", id) @@ -395,6 +407,9 @@ func resourceStorageShareDelete(d *pluginsdk.ResourceData, meta interface{}) err } if err = client.Delete(ctx, id.ShareName); err != nil { + if strings.Contains(err.Error(), "The specified share does not exist") { + return nil + } return fmt.Errorf("deleting %s: %v", id, err) } diff --git a/internal/services/storage/storage_share_resource_test.go b/internal/services/storage/storage_share_resource_test.go index c30a3258616ac..e85955af50419 100644 --- a/internal/services/storage/storage_share_resource_test.go +++ b/internal/services/storage/storage_share_resource_test.go @@ -207,13 +207,6 @@ func TestAccStorageShare_accessTierStandard(t *testing.T) { ), }, data.ImportStep(), - { - Config: r.accessTierStandard(data, "TransactionOptimized"), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), }) } @@ -252,7 +245,7 @@ func TestAccStorageShare_protocolUpdate(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_storage_share", "test") r := StorageShareResource{} - data.ResourceTest(t, r, []acceptance.TestStep{ + data.ResourceTestIgnoreRecreate(t, r, []acceptance.TestStep{ { Config: r.protocol(data, "NFS"), Check: acceptance.ComposeTestCheckFunc( diff --git a/internal/services/storage/storage_sync_resource_test.go b/internal/services/storage/storage_sync_resource_test.go index 1fdab29a3634d..630a8aca6b3da 100644 --- a/internal/services/storage/storage_sync_resource_test.go +++ b/internal/services/storage/storage_sync_resource_test.go @@ -139,7 +139,7 @@ resource "azurerm_storage_sync" "import" { func (r StorageSyncResource) complete(data acceptance.TestData) string { return fmt.Sprintf(` resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" + name = "acctestRG-ss-%d" location = "%s" } diff --git a/internal/services/storage/storage_table_resource.go b/internal/services/storage/storage_table_resource.go index 1278bd6f3d24d..b2c75c8703b02 100644 --- a/internal/services/storage/storage_table_resource.go +++ b/internal/services/storage/storage_table_resource.go @@ -6,6 +6,7 @@ package storage import ( "fmt" "log" + "strings" "time" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" @@ -248,6 +249,9 @@ func resourceStorageTableDelete(d *pluginsdk.ResourceData, meta interface{}) err } if err = client.Delete(ctx, id.TableName); err != nil { + if strings.Contains(err.Error(), "unexpected status 404") { + return nil + } return fmt.Errorf("deleting %s: %v", id, err) } diff --git a/internal/services/storagecache/managed_lustre_file_system_resource_test.go b/internal/services/storagecache/managed_lustre_file_system_resource_test.go index 00c5d312e9c53..1f9cf72cb415b 100644 --- a/internal/services/storagecache/managed_lustre_file_system_resource_test.go +++ b/internal/services/storagecache/managed_lustre_file_system_resource_test.go @@ -147,7 +147,7 @@ resource "azurerm_managed_lustre_file_system" "test" { sku_name = "AMLFS-Durable-Premium-250" subnet_id = azurerm_subnet.test.id storage_capacity_in_tb = 8 - zones = ["2"] + zones = ["1"] maintenance_window { day_of_week = "Friday" @@ -278,7 +278,7 @@ resource "azurerm_managed_lustre_file_system" "test" { sku_name = "AMLFS-Durable-Premium-250" subnet_id = azurerm_subnet.test.id storage_capacity_in_tb = 8 - zones = ["2"] + zones = ["1"] maintenance_window { day_of_week = "Friday" @@ -362,7 +362,7 @@ resource "azurerm_managed_lustre_file_system" "test" { sku_name = "AMLFS-Durable-Premium-250" subnet_id = azurerm_subnet.test.id storage_capacity_in_tb = 8 - zones = ["2"] + zones = ["1"] maintenance_window { day_of_week = "Thursday" diff --git a/internal/services/storagemover/storage_mover_job_definition_resource_test.go b/internal/services/storagemover/storage_mover_job_definition_resource_test.go index 1dc820b686ce9..0743f37a391f6 100644 --- a/internal/services/storagemover/storage_mover_job_definition_resource_test.go +++ b/internal/services/storagemover/storage_mover_job_definition_resource_test.go @@ -230,18 +230,11 @@ provider "azurerm" { %s -resource "azurerm_storage_mover_agent" "test2" { - name = "acctest-sa2-%[2]d" - storage_mover_id = azurerm_storage_mover.test.id - arc_virtual_machine_id = data.azurerm_arc_machine.test.id - arc_virtual_machine_uuid = data.azurerm_arc_machine.test.vm_uuid -} - resource "azurerm_storage_mover_job_definition" "test" { name = "acctest-sjd-%[2]d" storage_mover_project_id = azurerm_storage_mover_project.test.id - agent_name = azurerm_storage_mover_agent.test2.name - copy_mode = "Mirror" + agent_name = azurerm_storage_mover_agent.test.name + copy_mode = "Additive" source_name = azurerm_storage_mover_source_endpoint.test.name source_sub_path = "/" target_name = azurerm_storage_mover_target_endpoint.test.name diff --git a/internal/services/streamanalytics/stream_analytics_output_mssql_resource_test.go b/internal/services/streamanalytics/stream_analytics_output_mssql_resource_test.go index 1773729bc2035..fc02f3c8bd50a 100644 --- a/internal/services/streamanalytics/stream_analytics_output_mssql_resource_test.go +++ b/internal/services/streamanalytics/stream_analytics_output_mssql_resource_test.go @@ -162,7 +162,7 @@ func (r StreamAnalyticsOutputSqlResource) updated(data acceptance.TestData) stri %s resource "azurerm_stream_analytics_output_mssql" "test" { - name = "acctestoutput-updated-%d" + name = "acctestoutput-%d" stream_analytics_job_name = azurerm_stream_analytics_job.test.name resource_group_name = azurerm_stream_analytics_job.test.resource_group_name @@ -171,6 +171,8 @@ resource "azurerm_stream_analytics_output_mssql" "test" { password = azurerm_mssql_server.test.administrator_login_password database = azurerm_mssql_database.test.name table = "AccTestTable" + + max_batch_count = 1000 } `, template, data.RandomInteger) } diff --git a/internal/services/streamanalytics/stream_analytics_output_synapse_resource_test.go b/internal/services/streamanalytics/stream_analytics_output_synapse_resource_test.go index 07e6368b244ed..ce7458aff8755 100644 --- a/internal/services/streamanalytics/stream_analytics_output_synapse_resource_test.go +++ b/internal/services/streamanalytics/stream_analytics_output_synapse_resource_test.go @@ -153,13 +153,13 @@ func (r StreamAnalyticsOutputSynapseResource) updated(data acceptance.TestData) %[1]s resource "azurerm_stream_analytics_output_synapse" "test" { - name = "acctestoutput-updated-%[2]d" + name = "acctestoutput-%[2]d" stream_analytics_job_name = azurerm_stream_analytics_job.test.name resource_group_name = azurerm_stream_analytics_job.test.resource_group_name server = azurerm_synapse_workspace.test.connectivity_endpoints["sqlOnDemand"] user = azurerm_synapse_workspace.test.sql_administrator_login - password = azurerm_synapse_workspace.test.sql_administrator_login_password + password = "updatedPassword" database = "master" table = "AccTestTable" } diff --git a/internal/services/streamanalytics/stream_analytics_stream_input_iothub_resource_test.go b/internal/services/streamanalytics/stream_analytics_stream_input_iothub_resource_test.go index bbb36da35e8f1..bbb66805e61e4 100644 --- a/internal/services/streamanalytics/stream_analytics_stream_input_iothub_resource_test.go +++ b/internal/services/streamanalytics/stream_analytics_stream_input_iothub_resource_test.go @@ -190,32 +190,21 @@ func (r StreamAnalyticsStreamInputIoTHubResource) updated(data acceptance.TestDa return fmt.Sprintf(` %s -resource "azurerm_iothub" "updated" { - name = "acctestiot2-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - - sku { - name = "S1" - capacity = "1" - } -} - resource "azurerm_stream_analytics_stream_input_iothub" "test" { name = "acctestinput-%d" stream_analytics_job_name = azurerm_stream_analytics_job.test.name resource_group_name = azurerm_stream_analytics_job.test.resource_group_name endpoint = "messages/events" eventhub_consumer_group_name = "$Default" - iothub_namespace = azurerm_iothub.updated.name - shared_access_policy_key = azurerm_iothub.updated.shared_access_policy[0].primary_key + iothub_namespace = azurerm_iothub.test.name + shared_access_policy_key = azurerm_iothub.test.shared_access_policy[0].primary_key shared_access_policy_name = "iothubowner" serialization { type = "Avro" } } -`, template, data.RandomInteger, data.RandomInteger) +`, template, data.RandomInteger) } func (r StreamAnalyticsStreamInputIoTHubResource) requiresImport(data acceptance.TestData) string { diff --git a/internal/services/subscription/extended_locations_data_source_test.go b/internal/services/subscription/extended_locations_data_source_test.go index 56573dfd65aa3..6550cd109f544 100644 --- a/internal/services/subscription/extended_locations_data_source_test.go +++ b/internal/services/subscription/extended_locations_data_source_test.go @@ -33,7 +33,7 @@ func TestAccDataSourceExtendedLocations_westUS(t *testing.T) { Config: ExtendedLocationsDataSource{}.basic("westus"), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).Key("extended_locations.#").HasValue("1"), - check.That(data.ResourceName).Key("extended_locations.0").HasValue("microsoftlosangeles1"), + check.That(data.ResourceName).Key("extended_locations.0").HasValue("losangeles"), ), }, }) diff --git a/internal/services/subscription/location_data_source_test.go b/internal/services/subscription/location_data_source_test.go index 78b43d225dd41..392fb8bc1100d 100644 --- a/internal/services/subscription/location_data_source_test.go +++ b/internal/services/subscription/location_data_source_test.go @@ -25,14 +25,14 @@ func TestAccLocationDataSource_NonExistingRegion(t *testing.T) { }) } -func TestAccLocationDataSource_westUS(t *testing.T) { +func TestAccLocationDataSource_eastUS(t *testing.T) { data := acceptance.BuildTestData(t, "data.azurerm_location", "test") data.DataSourceTest(t, []acceptance.TestStep{ { - Config: LocationsDataSource{}.basic("westus"), + Config: LocationsDataSource{}.basic("eastus"), Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).Key("display_name").HasValue("West US"), + check.That(data.ResourceName).Key("display_name").HasValue("East US"), check.That(data.ResourceName).Key("zone_mappings.0.logical_zone").HasValue("1"), check.That(data.ResourceName).Key("zone_mappings.1.logical_zone").HasValue("2"), check.That(data.ResourceName).Key("zone_mappings.2.logical_zone").HasValue("3"), diff --git a/internal/services/videoanalyzer/client/client.go b/internal/services/videoanalyzer/client/client.go deleted file mode 100644 index 82305231ded7f..0000000000000 --- a/internal/services/videoanalyzer/client/client.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package client - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules" - "github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers" - "github.com/hashicorp/terraform-provider-azurerm/internal/common" -) - -type Client struct { - EdgeModuleClient *edgemodules.EdgeModulesClient - VideoAnalyzersClient *videoanalyzers.VideoAnalyzersClient -} - -func NewClient(o *common.ClientOptions) (*Client, error) { - edgeModulesClient, err := edgemodules.NewEdgeModulesClientWithBaseURI(o.Environment.ResourceManager) - if err != nil { - return nil, fmt.Errorf("building Edge Modules Client: %+v", err) - } - o.Configure(edgeModulesClient.Client, o.Authorizers.ResourceManager) - - videoAnalyzersClient, err := videoanalyzers.NewVideoAnalyzersClientWithBaseURI(o.Environment.ResourceManager) - if err != nil { - return nil, fmt.Errorf("building Video Analyzers Client: %+v", err) - } - o.Configure(videoAnalyzersClient.Client, o.Authorizers.ResourceManager) - - return &Client{ - EdgeModuleClient: edgeModulesClient, - VideoAnalyzersClient: videoAnalyzersClient, - }, nil -} diff --git a/internal/services/videoanalyzer/registration.go b/internal/services/videoanalyzer/registration.go deleted file mode 100644 index e78520f11c668..0000000000000 --- a/internal/services/videoanalyzer/registration.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package videoanalyzer - -import ( - "github.com/hashicorp/terraform-provider-azurerm/internal/features" - "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" -) - -type Registration struct{} - -var _ sdk.UntypedServiceRegistrationWithAGitHubLabel = Registration{} - -func (r Registration) AssociatedGitHubLabel() string { - return "service/video-analyzer" -} - -// Name is the name of this Service -func (r Registration) Name() string { - return "Video Analyzer" -} - -// WebsiteCategories returns a list of categories which can be used for the sidebar -func (r Registration) WebsiteCategories() []string { - return []string{ - "Video Analyzer", - } -} - -// SupportedDataSources returns the supported Data Sources supported by this Service -func (r Registration) SupportedDataSources() map[string]*pluginsdk.Resource { - return map[string]*pluginsdk.Resource{} -} - -// SupportedResources returns the supported Resources supported by this Service -func (r Registration) SupportedResources() map[string]*pluginsdk.Resource { - if !features.FourPointOhBeta() { - return map[string]*pluginsdk.Resource{ - "azurerm_video_analyzer": resourceVideoAnalyzer(), - "azurerm_video_analyzer_edge_module": resourceVideoAnalyzerEdgeModule(), - } - } - - return map[string]*pluginsdk.Resource{} -} diff --git a/internal/services/videoanalyzer/validate/video_analyzer_name.go b/internal/services/videoanalyzer/validate/video_analyzer_name.go deleted file mode 100644 index bd648dab8d79c..0000000000000 --- a/internal/services/videoanalyzer/validate/video_analyzer_name.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "regexp" - - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" -) - -func VideoAnalyzerName() func(interface{}, string) ([]string, []error) { - return validation.StringMatch( - regexp.MustCompile("^[-a-z0-9]{3,24}$"), - "Video Analyzer name must be 3 - 24 characters long, contain only lowercase letters and numbers.", - ) -} diff --git a/internal/services/videoanalyzer/video_analyzer_edge_module_resource.go b/internal/services/videoanalyzer/video_analyzer_edge_module_resource.go deleted file mode 100644 index 19e520fa12d25..0000000000000 --- a/internal/services/videoanalyzer/video_analyzer_edge_module_resource.go +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package videoanalyzer - -import ( - "fmt" - "log" - "regexp" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/videoanalyzer/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" -) - -func resourceVideoAnalyzerEdgeModule() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceVideoAnalyzerEdgeModuleCreateUpdate, - Read: resourceVideoAnalyzerEdgeModuleRead, - Delete: resourceVideoAnalyzerEdgeModuleDelete, - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := edgemodules.ParseEdgeModuleID(id) - return err - }), - - DeprecationMessage: `Video Analyzer (Preview) is now Deprecated and will be Retired on 2022-11-30 - as such the 'azurerm_video_analyzer_edge_module' resource is deprecated and will be removed in v4.0 of the AzureRM Provider`, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch( - regexp.MustCompile(`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,30}[a-zA-Z0-9])$`), - "Video Analyzer Edge Module name must be 1 - 32 characters long, begin and end with a letter or number and may contain only letters, numbers or underscore.", - ), - }, - - "resource_group_name": commonschema.ResourceGroupName(), - - "video_analyzer_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.VideoAnalyzerName(), - }, - }, - } -} - -func resourceVideoAnalyzerEdgeModuleCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).VideoAnalyzer.EdgeModuleClient - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - id := edgemodules.NewEdgeModuleID(subscriptionId, d.Get("resource_group_name").(string), d.Get("video_analyzer_name").(string), d.Get("name").(string)) - if d.IsNewResource() { - existing, err := client.Get(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for existing %s: %+v", id, err) - } - } - - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_video_analyzer_edge_module", id.ID()) - } - } - - if _, err := client.CreateOrUpdate(ctx, id, edgemodules.EdgeModuleEntity{}); err != nil { - return fmt.Errorf("creating %s: %+v", id, err) - } - - d.SetId(id.ID()) - return resourceVideoAnalyzerEdgeModuleRead(d, meta) -} - -func resourceVideoAnalyzerEdgeModuleRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).VideoAnalyzer.EdgeModuleClient - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := edgemodules.ParseEdgeModuleID(d.Id()) - if err != nil { - return err - } - - resp, err := client.Get(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - log.Printf("[INFO] %s was not found - removing from state", *id) - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.EdgeModuleName) - d.Set("resource_group_name", id.ResourceGroupName) - d.Set("video_analyzer_name", id.VideoAnalyzerName) - - return nil -} - -func resourceVideoAnalyzerEdgeModuleDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).VideoAnalyzer.EdgeModuleClient - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := edgemodules.ParseEdgeModuleID(d.Id()) - if err != nil { - return err - } - - if _, err = client.Delete(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - - return nil -} diff --git a/internal/services/videoanalyzer/video_analyzer_edge_module_resource_test.go b/internal/services/videoanalyzer/video_analyzer_edge_module_resource_test.go deleted file mode 100644 index 209981713166d..0000000000000 --- a/internal/services/videoanalyzer/video_analyzer_edge_module_resource_test.go +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package videoanalyzer_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type VideoAnalyzerEdgeModuleResource struct{} - -func TestAccVideoAnalyzerEdgeModule_basic(t *testing.T) { - t.Skip("Skipping as video analyzer is deprecated") - data := acceptance.BuildTestData(t, "azurerm_video_analyzer_edge_module", "test") - r := VideoAnalyzerEdgeModuleResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).Key("video_analyzer_name").HasValue("acctestva" + data.RandomString), - ), - }, - data.ImportStep(), - }) -} - -func TestAccVideoAnalyzerEdgeModule_requiresImport(t *testing.T) { - t.Skip("Skipping as video analyzer is deprecated") - data := acceptance.BuildTestData(t, "azurerm_video_analyzer_edge_module", "test") - r := VideoAnalyzerEdgeModuleResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func (VideoAnalyzerEdgeModuleResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := edgemodules.ParseEdgeModuleID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.VideoAnalyzer.EdgeModuleClient.Get(ctx, *id) - if err != nil { - return nil, fmt.Errorf("retrieving %s: %v", *id, err) - } - - return utils.Bool(resp.Model != nil), nil -} - -// nolint: unused -func (r VideoAnalyzerEdgeModuleResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_video_analyzer_edge_module" "test" { - name = "acctestVAEM%s" - resource_group_name = azurerm_resource_group.test.name - video_analyzer_name = azurerm_video_analyzer.test.name -} -`, r.template(data), data.RandomString) -} - -// nolint: unused -func (r VideoAnalyzerEdgeModuleResource) requiresImport(data acceptance.TestData) string { - template := r.basic(data) - return fmt.Sprintf(` -%s - -resource "azurerm_video_analyzer_edge_module" "import" { - name = azurerm_video_analyzer_edge_module.test.name - resource_group_name = azurerm_video_analyzer_edge_module.test.resource_group_name - video_analyzer_name = azurerm_video_analyzer_edge_module.test.video_analyzer_name -} -`, template) -} - -// nolint: unused -func (VideoAnalyzerEdgeModuleResource) template(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-video-analyzer-%d" - location = "%s" -} - -resource "azurerm_user_assigned_identity" "test" { - name = "acctestUAI-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location -} - -resource "azurerm_role_assignment" "contributor" { - scope = azurerm_storage_account.first.id - role_definition_name = "Storage Blob Data Contributor" - principal_id = azurerm_user_assigned_identity.test.principal_id -} - -resource "azurerm_role_assignment" "reader" { - scope = azurerm_storage_account.first.id - role_definition_name = "Reader" - principal_id = azurerm_user_assigned_identity.test.principal_id -} - -resource "azurerm_storage_account" "first" { - name = "acctestsa1%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_video_analyzer" "test" { - name = "acctestva%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - storage_account { - id = azurerm_storage_account.first.id - user_assigned_identity_id = azurerm_user_assigned_identity.test.id - } - - identity { - type = "UserAssigned" - identity_ids = [ - azurerm_user_assigned_identity.test.id - ] - } - - depends_on = [ - azurerm_user_assigned_identity.test, - azurerm_role_assignment.contributor, - azurerm_role_assignment.reader, - ] -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomString, data.RandomString) -} diff --git a/internal/services/videoanalyzer/video_analyzer_resource.go b/internal/services/videoanalyzer/video_analyzer_resource.go deleted file mode 100644 index 3915771cca351..0000000000000 --- a/internal/services/videoanalyzer/video_analyzer_resource.go +++ /dev/null @@ -1,286 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package videoanalyzer - -import ( - "fmt" - "log" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" - "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/videoanalyzer/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -func resourceVideoAnalyzer() *pluginsdk.Resource { - return &pluginsdk.Resource{ - Create: resourceVideoAnalyzerCreateUpdate, - Read: resourceVideoAnalyzerRead, - Update: resourceVideoAnalyzerCreateUpdate, - Delete: resourceVideoAnalyzerDelete, - - Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(30 * time.Minute), - Read: pluginsdk.DefaultTimeout(5 * time.Minute), - Update: pluginsdk.DefaultTimeout(30 * time.Minute), - Delete: pluginsdk.DefaultTimeout(30 * time.Minute), - }, - - Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := videoanalyzers.ParseVideoAnalyzerID(id) - return err - }), - - DeprecationMessage: `Video Analyzer (Preview) is now Deprecated and will be Retired on 2022-11-30 - as such the 'azurerm_video_analyzer' resource is deprecated and will be removed in v4.0 of the AzureRM Provider`, - - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.VideoAnalyzerName(), - }, - - "location": commonschema.Location(), - - "resource_group_name": commonschema.ResourceGroupName(), - - "storage_account": { - Type: pluginsdk.TypeList, - Required: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "id": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: commonids.ValidateStorageAccountID, - }, - - "user_assigned_identity_id": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: commonids.ValidateUserAssignedIdentityID, - }, - }, - }, - }, - - "identity": commonschema.UserAssignedIdentityRequired(), - - "tags": commonschema.Tags(), - }, - } -} - -func resourceVideoAnalyzerCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).VideoAnalyzer.VideoAnalyzersClient - subscriptionId := meta.(*clients.Client).Account.SubscriptionId - ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) - defer cancel() - - id := videoanalyzers.NewVideoAnalyzerID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) - if d.IsNewResource() { - existing, err := client.VideoAnalyzersGet(ctx, id) - if err != nil { - if !response.WasNotFound(existing.HttpResponse) { - return fmt.Errorf("checking for existing %s: %+v", id, err) - } - } - - if !response.WasNotFound(existing.HttpResponse) { - return tf.ImportAsExistsError("azurerm_video_analyzer", id.ID()) - } - } - - identity, err := expandAzureRmVideoAnalyzerIdentity(d) - if err != nil { - return err - } - parameters := videoanalyzers.VideoAnalyzer{ - Properties: &videoanalyzers.VideoAnalyzerPropertiesUpdate{ - StorageAccounts: expandVideoAnalyzerStorageAccounts(d), - }, - Location: azure.NormalizeLocation(d.Get("location").(string)), - Identity: identity, - Tags: tags.Expand(d.Get("tags").(map[string]interface{})), - } - - if _, err := client.VideoAnalyzersCreateOrUpdate(ctx, id, parameters); err != nil { - return fmt.Errorf("creating %s: %+v", id, err) - } - - d.SetId(id.ID()) - return resourceVideoAnalyzerRead(d, meta) -} - -func resourceVideoAnalyzerRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).VideoAnalyzer.VideoAnalyzersClient - ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := videoanalyzers.ParseVideoAnalyzerID(d.Id()) - if err != nil { - return err - } - - resp, err := client.VideoAnalyzersGet(ctx, *id) - if err != nil { - if response.WasNotFound(resp.HttpResponse) { - log.Printf("[INFO] %s was not found - removing from state", *id) - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving %s: %+v", *id, err) - } - - d.Set("name", id.VideoAnalyzerName) - d.Set("resource_group_name", id.ResourceGroupName) - - if model := resp.Model; model != nil { - d.Set("location", azure.NormalizeLocation(model.Location)) - - if props := model.Properties; props != nil { - accounts := flattenVideoAnalyzerStorageAccounts(props.StorageAccounts) - if err := d.Set("storage_account", accounts); err != nil { - return fmt.Errorf("flattening `storage_account`: %s", err) - } - } - - flattenedIdentity, err := flattenAzureRmVideoServiceIdentity(model.Identity) - if err != nil { - return fmt.Errorf("flattening `identity`: %s", err) - } - - if err := d.Set("identity", flattenedIdentity); err != nil { - return fmt.Errorf("setting `identity`: %s", err) - } - - return tags.FlattenAndSet(d, model.Tags) - } - return nil -} - -func resourceVideoAnalyzerDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).VideoAnalyzer.VideoAnalyzersClient - ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) - defer cancel() - - id, err := videoanalyzers.ParseVideoAnalyzerID(d.Id()) - if err != nil { - return err - } - - if _, err = client.VideoAnalyzersDelete(ctx, *id); err != nil { - return fmt.Errorf("deleting %s: %+v", *id, err) - } - - return nil -} - -func expandVideoAnalyzerStorageAccounts(d *pluginsdk.ResourceData) *[]videoanalyzers.StorageAccount { - storageAccountRaw := d.Get("storage_account").([]interface{})[0].(map[string]interface{}) - - results := []videoanalyzers.StorageAccount{ - { - Id: utils.String(storageAccountRaw["id"].(string)), - Identity: &videoanalyzers.ResourceIdentity{ - UserAssignedIdentity: storageAccountRaw["user_assigned_identity_id"].(string), - }, - }, - } - - return &results -} - -func flattenVideoAnalyzerStorageAccounts(input *[]videoanalyzers.StorageAccount) []interface{} { - if input == nil { - return []interface{}{} - } - - results := make([]interface{}, 0) - for _, storageAccount := range *input { - storageAccountId := "" - if storageAccount.Id != nil { - storageAccountId = *storageAccount.Id - } - - userAssignedIdentityId := "" - if storageAccount.Identity != nil { - userAssignedIdentityId = storageAccount.Identity.UserAssignedIdentity - } - - results = append(results, map[string]interface{}{ - "id": storageAccountId, - "user_assigned_identity_id": userAssignedIdentityId, - }) - } - - return results -} - -func expandAzureRmVideoAnalyzerIdentity(d *pluginsdk.ResourceData) (*videoanalyzers.VideoAnalyzerIdentity, error) { - identityRaw := d.Get("identity").([]interface{}) - if identityRaw[0] == nil { - return nil, fmt.Errorf("an `identity` block is required") - } - identity := identityRaw[0].(map[string]interface{}) - result := &videoanalyzers.VideoAnalyzerIdentity{ - Type: identity["type"].(string), - } - var identityIdSet []interface{} - if identityIds, exists := identity["identity_ids"]; exists { - identityIdSet = identityIds.(*pluginsdk.Set).List() - } - - userAssignedIdentities := make(map[string]videoanalyzers.UserAssignedManagedIdentity) - for _, id := range identityIdSet { - userAssignedIdentities[id.(string)] = videoanalyzers.UserAssignedManagedIdentity{} - } - result.UserAssignedIdentities = &userAssignedIdentities - - return result, nil -} - -func flattenAzureRmVideoServiceIdentity(identity *videoanalyzers.VideoAnalyzerIdentity) ([]interface{}, error) { - if identity == nil { - return make([]interface{}, 0), nil - } - - identityIds := make([]interface{}, 0) - if identity.UserAssignedIdentities != nil { - /* - "userAssignedIdentities": { - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": { - "principalId": "00000000-0000-0000-0000-000000000000", - "clientId": "00000000-0000-0000-0000-000000000000" - }, - } - */ - for key := range *identity.UserAssignedIdentities { - parsedId, err := commonids.ParseUserAssignedIdentityIDInsensitively(key) - if err != nil { - return nil, err - } - identityIds = append(identityIds, parsedId.ID()) - } - } - - return []interface{}{ - map[string]interface{}{ - "type": identity.Type, - "identity_ids": identityIds, - }, - }, nil -} diff --git a/internal/services/videoanalyzer/video_analyzer_resource_test.go b/internal/services/videoanalyzer/video_analyzer_resource_test.go deleted file mode 100644 index aa5ef45f6a8c2..0000000000000 --- a/internal/services/videoanalyzer/video_analyzer_resource_test.go +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package videoanalyzer_test - -import ( - "context" - "fmt" - "testing" - - "github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" - "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" - "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" -) - -type VideoAnalyzerResource struct{} - -func TestAccVideoAnalyzer_basic(t *testing.T) { - t.Skip("Skipping as video analyzer is deprecated") - data := acceptance.BuildTestData(t, "azurerm_video_analyzer", "test") - r := VideoAnalyzerResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("storage_account.#").HasValue("1"), - check.That(data.ResourceName).Key("identity.0.type").HasValue("UserAssigned"), - ), - }, - data.ImportStep(), - }) -} - -func TestAccVideoAnalyzer_requiresImport(t *testing.T) { - t.Skip("Skipping as video analyzer is deprecated") - data := acceptance.BuildTestData(t, "azurerm_video_analyzer", "test") - r := VideoAnalyzerResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.basic(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("storage_account.#").HasValue("1"), - ), - }, - data.RequiresImportErrorStep(r.requiresImport), - }) -} - -func TestAccVideoAnalyzer_complete(t *testing.T) { - t.Skip("Skipping as video analyzer is deprecated") - data := acceptance.BuildTestData(t, "azurerm_video_analyzer", "test") - r := VideoAnalyzerResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.complete(data), - Check: acceptance.ComposeAggregateTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("identity.0.type").HasValue("UserAssigned"), - check.That(data.ResourceName).Key("tags.%").HasValue("1"), - check.That(data.ResourceName).Key("tags.label").HasValue("test"), - ), - }, - data.ImportStep(), - }) -} - -func (VideoAnalyzerResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := videoanalyzers.ParseVideoAnalyzerID(state.ID) - if err != nil { - return nil, err - } - - resp, err := clients.VideoAnalyzer.VideoAnalyzersClient.VideoAnalyzersGet(ctx, *id) - if err != nil { - return nil, fmt.Errorf("retrieving %s: %v", *id, err) - } - - return utils.Bool(resp.Model != nil), nil -} - -//nolint:unused -func (r VideoAnalyzerResource) basic(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_video_analyzer" "test" { - name = "acctestva%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - storage_account { - id = azurerm_storage_account.first.id - user_assigned_identity_id = azurerm_user_assigned_identity.test.id - } - - identity { - type = "UserAssigned" - identity_ids = [ - azurerm_user_assigned_identity.test.id - ] - } - - depends_on = [ - azurerm_role_assignment.contributor, - azurerm_role_assignment.reader, - ] -} -`, r.template(data), data.RandomString) -} - -//nolint:unused -func (r VideoAnalyzerResource) requiresImport(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_video_analyzer" "import" { - name = azurerm_video_analyzer.test.name - location = azurerm_video_analyzer.test.location - resource_group_name = azurerm_video_analyzer.test.resource_group_name - - storage_account { - id = azurerm_storage_account.first.id - user_assigned_identity_id = azurerm_user_assigned_identity.test.id - } - - identity { - type = "UserAssigned" - identity_ids = [ - azurerm_user_assigned_identity.test.id - ] - } -} -`, r.template(data)) -} - -//nolint:unused -func (r VideoAnalyzerResource) complete(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -resource "azurerm_video_analyzer" "test" { - name = "acctestva%s" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - - storage_account { - id = azurerm_storage_account.first.id - user_assigned_identity_id = azurerm_user_assigned_identity.test.id - } - - identity { - type = "UserAssigned" - identity_ids = [ - azurerm_user_assigned_identity.test.id - ] - } - - depends_on = [ - azurerm_role_assignment.contributor, - azurerm_role_assignment.reader, - ] - - tags = { - label = "test" - } -} -`, r.template(data), data.RandomString) -} - -//nolint:unused -func (VideoAnalyzerResource) template(data acceptance.TestData) string { - return fmt.Sprintf(` -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "test" { - name = "acctestRG-video-analyzer-%d" - location = "%s" -} - -resource "azurerm_user_assigned_identity" "test" { - name = "acctestUAI-%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location -} - -resource "azurerm_role_assignment" "contributor" { - scope = azurerm_storage_account.first.id - role_definition_name = "Storage Blob Data Contributor" - principal_id = azurerm_user_assigned_identity.test.principal_id -} - -resource "azurerm_role_assignment" "reader" { - scope = azurerm_storage_account.first.id - role_definition_name = "Reader" - principal_id = azurerm_user_assigned_identity.test.principal_id -} - -resource "azurerm_storage_account" "first" { - name = "acctestsa1%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_tier = "Standard" - account_replication_type = "GRS" -} -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomString) -} diff --git a/internal/services/web/app_service_public_certificate_resource.go b/internal/services/web/app_service_public_certificate_resource.go index 7c080967b52c3..f4a1db93758d3 100644 --- a/internal/services/web/app_service_public_certificate_resource.go +++ b/internal/services/web/app_service_public_certificate_resource.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/internal/services/web/app_service_public_certificate_resource_test.go b/internal/services/web/app_service_public_certificate_resource_test.go index 26756b36de09b..2b4690ae5f5e0 100644 --- a/internal/services/web/app_service_public_certificate_resource_test.go +++ b/internal/services/web/app_service_public_certificate_resource_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" + "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/web/static_site_resource_test.go b/internal/services/web/static_site_resource_test.go index 19b92aa4571f1..57e17f8850966 100644 --- a/internal/services/web/static_site_resource_test.go +++ b/internal/services/web/static_site_resource_test.go @@ -169,7 +169,7 @@ func TestAccAzureStaticSite_requiresImport(t *testing.T) { }) } -func TestAccStaticSite_appSettings(t *testing.T) { +func TestAccAzureStaticSite_appSettings(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_static_site", "test") r := StaticSiteResource{} @@ -218,6 +218,8 @@ func (r StaticSiteResource) Exists(ctx context.Context, clients *clients.Client, } func (r StaticSiteResource) basic(data acceptance.TestData) string { + // Limited regional availability for Static Sties + data.Locations.Primary = "westeurope" return fmt.Sprintf(` provider "azurerm" { features {} @@ -237,10 +239,12 @@ resource "azurerm_static_site" "test" { environment = "acceptance" } } -`, data.RandomInteger, data.Locations.Secondary) // TODO - Put back to primary when support ticket is resolved +`, data.RandomInteger, data.Locations.Primary) } func (r StaticSiteResource) withSystemAssignedIdentity(data acceptance.TestData) string { + // Limited regional availability for Static Sties + data.Locations.Primary = "westeurope" return fmt.Sprintf(` provider "azurerm" { features {} @@ -262,10 +266,12 @@ resource "azurerm_static_site" "test" { type = "SystemAssigned" } } -`, data.RandomInteger, data.Locations.Secondary) // TODO - Put back to primary when support ticket is resolved +`, data.RandomInteger, data.Locations.Primary) } func (r StaticSiteResource) withSystemAssignedUserAssignedIdentity(data acceptance.TestData) string { + // Limited regional availability for Static Sties + data.Locations.Primary = "westeurope" return fmt.Sprintf(` provider "azurerm" { features {} @@ -295,10 +301,12 @@ resource "azurerm_static_site" "test" { identity_ids = [azurerm_user_assigned_identity.test.id] } } -`, data.RandomInteger, data.Locations.Secondary) // TODO - Put back to primary when support ticket is resolved +`, data.RandomInteger, data.Locations.Primary) } func (r StaticSiteResource) withUserAssignedIdentity(data acceptance.TestData) string { + // Limited regional availability for Static Sties + data.Locations.Primary = "westeurope" return fmt.Sprintf(` provider "azurerm" { features {} @@ -328,10 +336,12 @@ resource "azurerm_static_site" "test" { identity_ids = [azurerm_user_assigned_identity.test.id] } } -`, data.RandomInteger, data.Locations.Secondary) // TODO - Put back to primary when support ticket is resolved +`, data.RandomInteger, data.Locations.Primary) } func (r StaticSiteResource) basicUpdate(data acceptance.TestData) string { + // Limited regional availability for Static Sties + data.Locations.Primary = "westeurope" return fmt.Sprintf(` provider "azurerm" { features {} @@ -354,7 +364,7 @@ resource "azurerm_static_site" "test" { updated = "true" } } -`, data.RandomInteger, data.Locations.Secondary) // TODO - Put back to primary when support ticket is resolved +`, data.RandomInteger, data.Locations.Primary) } func (r StaticSiteResource) requiresImport(data acceptance.TestData) string { @@ -371,6 +381,8 @@ resource "azurerm_static_site" "import" { } func (r StaticSiteResource) appSettings(data acceptance.TestData) string { + // Limited regional availability for Static Sties + data.Locations.Primary = "westeurope" return fmt.Sprintf(` provider "azurerm" { features {} @@ -390,10 +402,12 @@ resource "azurerm_static_site" "test" { "foo" = "bar" } } -`, data.RandomInteger, data.Locations.Secondary, data.RandomInteger) +`, data.RandomInteger, data.Locations.Primary, data.RandomInteger) } func (r StaticSiteResource) appSettingsUpdate(data acceptance.TestData) string { + // Limited regional availability for Static Sties + data.Locations.Primary = "westeurope" return fmt.Sprintf(` provider "azurerm" { features {} @@ -414,5 +428,5 @@ resource "azurerm_static_site" "test" { "baz" = "foo" } } -`, data.RandomInteger, data.Locations.Secondary, data.RandomInteger) +`, data.RandomInteger, data.Locations.Primary, data.RandomInteger) } diff --git a/internal/tools/generator-services/main.go b/internal/tools/generator-services/main.go index aa686e67d232e..005d9e462fc12 100644 --- a/internal/tools/generator-services/main.go +++ b/internal/tools/generator-services/main.go @@ -266,6 +266,8 @@ v/2.x (legacy): - '### AzureRM Provider Version\s+(|azurerm |AzureRM )(|v|V)2\.\d+' v/3.x: - '### AzureRM Provider Version\s+(|azurerm |AzureRM )(|v|V)3\.\d+' +v/4.x: + - '### AzureRM Provider Version\s+(|azurerm |AzureRM )(|v|V)4\.\d+' ` const azurerm = "azurerm_" @@ -392,16 +394,16 @@ func (githubIssueLabelsGenerator) run(outputFileName string, _ map[string]struct } } - if len(prefixes) > 1 { - out = append(out, fmt.Sprintf(" - '### (|New or )Affected Resource\\(s\\)\\/Data Source\\(s\\)((.|\\n)*)azurerm_(%s)((.|\\n)*)###'", strings.Join(prefixes, "|"))) - } - if len(prefixes) == 1 { - out = append(out, fmt.Sprintf(" - '### (|New or )Affected Resource\\(s\\)\\/Data Source\\(s\\)((.|\\n)*)azurerm_%s((.|\\n)*)###'", prefixes[0])) + if len(prefixes) > 0 { + if len(prefixes) > 1 { + out = append(out, fmt.Sprintf(" - '### (|New or )Affected Resource\\(s\\)\\/Data Source\\(s\\)((.|\\n)*)azurerm_(%s)((.|\\n)*)###'", strings.Join(prefixes, "|"))) + } + if len(prefixes) == 1 { + out = append(out, fmt.Sprintf(" - '### (|New or )Affected Resource\\(s\\)\\/Data Source\\(s\\)((.|\\n)*)azurerm_%s((.|\\n)*)###'", prefixes[0])) + } + out = append(out, "") + output += fmt.Sprintf("\n%s", strings.Join(out, "\n")) } - // NOTE: it's possible for a Service to contain 0 Data Sources/Resources (during initial generation) - - out = append(out, "") - output += fmt.Sprintf("\n%s", strings.Join(out, "\n")) } return writeToFile(outputFileName, output) diff --git a/utils/bool.go b/utils/bool.go index f0e366e7f07c9..ab2eec6efbdb3 100644 --- a/utils/bool.go +++ b/utils/bool.go @@ -5,6 +5,7 @@ package utils // NormaliseNilableBool takes a pointer to a bool and returns a zero value or // the real value if present +// Deprecated: please use the `From` function in the `pointer` package func NormaliseNilableBool(input *bool) bool { if input == nil { return false diff --git a/utils/float.go b/utils/float.go index 60c8332148c0c..e37ff7015e2ba 100644 --- a/utils/float.go +++ b/utils/float.go @@ -4,6 +4,7 @@ package utils // NormalizeNilableFloat normalizes a nilable float64 into a float64 value +// Deprecated: please use the `From` function in the `pointer` package func NormalizeNilableFloat(input *float64) float64 { if input == nil { return 0 @@ -13,6 +14,7 @@ func NormalizeNilableFloat(input *float64) float64 { } // NormalizeNilableFloat32 normalizes a nilable float32 into a float32 value +// Deprecated: please use the `From` function in the `pointer` package func NormalizeNilableFloat32(input *float32) float32 { if input == nil { return 0 diff --git a/utils/int.go b/utils/int.go index e4cfb9d559190..6e656f1002ecc 100644 --- a/utils/int.go +++ b/utils/int.go @@ -5,6 +5,7 @@ package utils // NormaliseNilableInt takes a pointer to an int and returns a zero value or // the real value if present +// Deprecated: please use the `From` function in the `pointer` package func NormaliseNilableInt(input *int) int { if input == nil { return 0 @@ -15,6 +16,7 @@ func NormaliseNilableInt(input *int) int { // NormaliseNilableInt32 takes a pointer to an int32 and returns a zero value or // the real value if present +// Deprecated: please use the `From` function in the `pointer` package func NormaliseNilableInt32(input *int32) int32 { if input == nil { return 0 @@ -25,6 +27,7 @@ func NormaliseNilableInt32(input *int32) int32 { // NormaliseNilableInt64 takes a pointer to an int64 and returns a zero value or // the real value if present +// Deprecated: please use the `From` function in the `pointer` package func NormaliseNilableInt64(input *int64) int64 { if input == nil { return 0 diff --git a/utils/pointer.go b/utils/pointer.go index 7c4cc8fdf8800..2097732dee5cd 100644 --- a/utils/pointer.go +++ b/utils/pointer.go @@ -3,26 +3,38 @@ package utils +// Bool +// Deprecated: please use the `To` function in the `pointer` package func Bool(input bool) *bool { return &input } +// Int32 +// Deprecated: please use the `To` function in the `pointer` package func Int32(input int32) *int32 { return &input } +// Int64 +// Deprecated: please use the `To` function in the `pointer` package func Int64(input int64) *int64 { return &input } +// Float +// Deprecated: please use the `To` function in the `pointer` package func Float(input float64) *float64 { return &input } +// String +// Deprecated: please use the`To` function in the `pointer` package func String(input string) *string { return &input } +// StringSlice +// Deprecated: please use the `To` function in the `pointer` package func StringSlice(input []string) *[]string { if input == nil { return nil diff --git a/utils/string.go b/utils/string.go index ae2cb8b97b8e7..2e40b0fa07b5f 100644 --- a/utils/string.go +++ b/utils/string.go @@ -5,6 +5,7 @@ package utils // NormalizeNilableString normalizes a nilable string into a string // that is, if it's nil returns an empty string else the value +// Deprecated: please use the `From` function in the `pointer` package func NormalizeNilableString(input *string) string { if input == nil { return "" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/CHANGELOG.md deleted file mode 100644 index 52911e4cc5e4c..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Change History - diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/_meta.json b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/_meta.json deleted file mode 100644 index 355088c31f380..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/_meta.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", - "readme": "/_/azure-rest-api-specs/specification/sql/resource-manager/readme.md", - "tag": "package-2017-03-preview", - "use": "@microsoft.azure/autorest.go@2.1.187", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2017-03-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/sql/resource-manager/readme.md", - "additional_properties": { - "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION" - } -} \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/capabilities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/capabilities.go deleted file mode 100644 index c6b4ab770e089..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/capabilities.go +++ /dev/null @@ -1,107 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// CapabilitiesClient is the the Azure SQL Database management API provides a RESTful set of web services that interact -// with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and -// delete databases. -type CapabilitiesClient struct { - BaseClient -} - -// NewCapabilitiesClient creates an instance of the CapabilitiesClient client. -func NewCapabilitiesClient(subscriptionID string) CapabilitiesClient { - return NewCapabilitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewCapabilitiesClientWithBaseURI creates an instance of the CapabilitiesClient client using a custom endpoint. Use -// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewCapabilitiesClientWithBaseURI(baseURI string, subscriptionID string) CapabilitiesClient { - return CapabilitiesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// ListByLocation gets the capabilities available for the specified location. -// Parameters: -// locationID - the location id whose capabilities are retrieved. -func (client CapabilitiesClient) ListByLocation(ctx context.Context, locationID string) (result LocationCapabilities, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/CapabilitiesClient.ListByLocation") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListByLocationPreparer(ctx, locationID) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.CapabilitiesClient", "ListByLocation", nil, "Failure preparing request") - return - } - - resp, err := client.ListByLocationSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.CapabilitiesClient", "ListByLocation", resp, "Failure sending request") - return - } - - result, err = client.ListByLocationResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.CapabilitiesClient", "ListByLocation", resp, "Failure responding to request") - return - } - - return -} - -// ListByLocationPreparer prepares the ListByLocation request. -func (client CapabilitiesClient) ListByLocationPreparer(ctx context.Context, locationID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "locationId": autorest.Encode("path", locationID), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationId}/capabilities", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByLocationSender sends the ListByLocation request. The method will close the -// http.Response Body if it receives an error. -func (client CapabilitiesClient) ListByLocationSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByLocationResponder handles the response to the ListByLocation request. The method always -// closes the http.Response Body. -func (client CapabilitiesClient) ListByLocationResponder(resp *http.Response) (result LocationCapabilities, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/client.go deleted file mode 100644 index a5b79d3178c7c..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/client.go +++ /dev/null @@ -1,44 +0,0 @@ -// Deprecated: Please note, this package has been deprecated. A replacement package is available [github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql). We strongly encourage you to upgrade to continue receiving updates. See [Migration Guide](https://aka.ms/azsdk/golang/t2/migration) for guidance on upgrading. Refer to our [deprecation policy](https://azure.github.io/azure-sdk/policies_support.html) for more details. -// -// Package sql implements the Azure ARM Sql service API version . -// -// The Azure SQL Database management API provides a RESTful set of web services that interact with Azure SQL Database -// services to manage your databases. The API enables you to create, retrieve, update, and delete databases. -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "github.com/Azure/go-autorest/autorest" -) - -const ( - // DefaultBaseURI is the default URI used for the service Sql - DefaultBaseURI = "https://management.azure.com" -) - -// BaseClient is the base client for Sql. -type BaseClient struct { - autorest.Client - BaseURI string - SubscriptionID string -} - -// New creates an instance of the BaseClient client. -func New(subscriptionID string) BaseClient { - return NewWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with -// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { - return BaseClient{ - Client: autorest.NewClientWithUserAgent(UserAgent()), - BaseURI: baseURI, - SubscriptionID: subscriptionID, - } -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseautomatictuning.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseautomatictuning.go deleted file mode 100644 index b75b6e41f640f..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseautomatictuning.go +++ /dev/null @@ -1,195 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// DatabaseAutomaticTuningClient is the the Azure SQL Database management API provides a RESTful set of web services -// that interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, -// update, and delete databases. -type DatabaseAutomaticTuningClient struct { - BaseClient -} - -// NewDatabaseAutomaticTuningClient creates an instance of the DatabaseAutomaticTuningClient client. -func NewDatabaseAutomaticTuningClient(subscriptionID string) DatabaseAutomaticTuningClient { - return NewDatabaseAutomaticTuningClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewDatabaseAutomaticTuningClientWithBaseURI creates an instance of the DatabaseAutomaticTuningClient client using a -// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, -// Azure stack). -func NewDatabaseAutomaticTuningClientWithBaseURI(baseURI string, subscriptionID string) DatabaseAutomaticTuningClient { - return DatabaseAutomaticTuningClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets a database's automatic tuning. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -func (client DatabaseAutomaticTuningClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabaseAutomaticTuning, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAutomaticTuningClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseAutomaticTuningClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabaseAutomaticTuningClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseAutomaticTuningClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client DatabaseAutomaticTuningClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/automaticTuning/current", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client DatabaseAutomaticTuningClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client DatabaseAutomaticTuningClient) GetResponder(resp *http.Response) (result DatabaseAutomaticTuning, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Update update automatic tuning properties for target database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -// parameters - the requested automatic tuning resource state. -func (client DatabaseAutomaticTuningClient) Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseAutomaticTuning) (result DatabaseAutomaticTuning, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAutomaticTuningClient.Update") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseAutomaticTuningClient", "Update", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabaseAutomaticTuningClient", "Update", resp, "Failure sending request") - return - } - - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseAutomaticTuningClient", "Update", resp, "Failure responding to request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client DatabaseAutomaticTuningClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseAutomaticTuning) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/automaticTuning/current", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client DatabaseAutomaticTuningClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client DatabaseAutomaticTuningClient) UpdateResponder(resp *http.Response) (result DatabaseAutomaticTuning, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseblobauditingpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseblobauditingpolicies.go deleted file mode 100644 index aa58f533fcd23..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseblobauditingpolicies.go +++ /dev/null @@ -1,319 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// DatabaseBlobAuditingPoliciesClient is the the Azure SQL Database management API provides a RESTful set of web -// services that interact with Azure SQL Database services to manage your databases. The API enables you to create, -// retrieve, update, and delete databases. -type DatabaseBlobAuditingPoliciesClient struct { - BaseClient -} - -// NewDatabaseBlobAuditingPoliciesClient creates an instance of the DatabaseBlobAuditingPoliciesClient client. -func NewDatabaseBlobAuditingPoliciesClient(subscriptionID string) DatabaseBlobAuditingPoliciesClient { - return NewDatabaseBlobAuditingPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewDatabaseBlobAuditingPoliciesClientWithBaseURI creates an instance of the DatabaseBlobAuditingPoliciesClient -// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI -// (sovereign clouds, Azure stack). -func NewDatabaseBlobAuditingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) DatabaseBlobAuditingPoliciesClient { - return DatabaseBlobAuditingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a database's blob auditing policy. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -// parameters - the database blob auditing policy. -func (client DatabaseBlobAuditingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseBlobAuditingPolicy) (result DatabaseBlobAuditingPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseBlobAuditingPoliciesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseBlobAuditingPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabaseBlobAuditingPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseBlobAuditingPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DatabaseBlobAuditingPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseBlobAuditingPolicy) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "blobAuditingPolicyName": autorest.Encode("path", "default"), - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Kind = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client DatabaseBlobAuditingPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client DatabaseBlobAuditingPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result DatabaseBlobAuditingPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets a database's blob auditing policy. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -func (client DatabaseBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabaseBlobAuditingPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseBlobAuditingPoliciesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseBlobAuditingPoliciesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabaseBlobAuditingPoliciesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseBlobAuditingPoliciesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client DatabaseBlobAuditingPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "blobAuditingPolicyName": autorest.Encode("path", "default"), - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client DatabaseBlobAuditingPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client DatabaseBlobAuditingPoliciesClient) GetResponder(resp *http.Response) (result DatabaseBlobAuditingPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByDatabase lists auditing settings of a database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -func (client DatabaseBlobAuditingPoliciesClient) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabaseBlobAuditingPolicyListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseBlobAuditingPoliciesClient.ListByDatabase") - defer func() { - sc := -1 - if result.dbaplr.Response.Response != nil { - sc = result.dbaplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByDatabaseNextResults - req, err := client.ListByDatabasePreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseBlobAuditingPoliciesClient", "ListByDatabase", nil, "Failure preparing request") - return - } - - resp, err := client.ListByDatabaseSender(req) - if err != nil { - result.dbaplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabaseBlobAuditingPoliciesClient", "ListByDatabase", resp, "Failure sending request") - return - } - - result.dbaplr, err = client.ListByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseBlobAuditingPoliciesClient", "ListByDatabase", resp, "Failure responding to request") - return - } - if result.dbaplr.hasNextLink() && result.dbaplr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByDatabasePreparer prepares the ListByDatabase request. -func (client DatabaseBlobAuditingPoliciesClient) ListByDatabasePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByDatabaseSender sends the ListByDatabase request. The method will close the -// http.Response Body if it receives an error. -func (client DatabaseBlobAuditingPoliciesClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always -// closes the http.Response Body. -func (client DatabaseBlobAuditingPoliciesClient) ListByDatabaseResponder(resp *http.Response) (result DatabaseBlobAuditingPolicyListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByDatabaseNextResults retrieves the next set of results, if any. -func (client DatabaseBlobAuditingPoliciesClient) listByDatabaseNextResults(ctx context.Context, lastResults DatabaseBlobAuditingPolicyListResult) (result DatabaseBlobAuditingPolicyListResult, err error) { - req, err := lastResults.databaseBlobAuditingPolicyListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.DatabaseBlobAuditingPoliciesClient", "listByDatabaseNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByDatabaseSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.DatabaseBlobAuditingPoliciesClient", "listByDatabaseNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseBlobAuditingPoliciesClient", "listByDatabaseNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByDatabaseComplete enumerates all values, automatically crossing page boundaries as required. -func (client DatabaseBlobAuditingPoliciesClient) ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabaseBlobAuditingPolicyListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseBlobAuditingPoliciesClient.ListByDatabase") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByDatabase(ctx, resourceGroupName, serverName, databaseName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseoperations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseoperations.go deleted file mode 100644 index 9a3b08aca9a5c..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseoperations.go +++ /dev/null @@ -1,236 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "github.com/gofrs/uuid" - "net/http" -) - -// DatabaseOperationsClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type DatabaseOperationsClient struct { - BaseClient -} - -// NewDatabaseOperationsClient creates an instance of the DatabaseOperationsClient client. -func NewDatabaseOperationsClient(subscriptionID string) DatabaseOperationsClient { - return NewDatabaseOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewDatabaseOperationsClientWithBaseURI creates an instance of the DatabaseOperationsClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewDatabaseOperationsClientWithBaseURI(baseURI string, subscriptionID string) DatabaseOperationsClient { - return DatabaseOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Cancel cancels the asynchronous operation on the database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -// operationID - the operation identifier. -func (client DatabaseOperationsClient) Cancel(ctx context.Context, resourceGroupName string, serverName string, databaseName string, operationID uuid.UUID) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseOperationsClient.Cancel") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CancelPreparer(ctx, resourceGroupName, serverName, databaseName, operationID) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseOperationsClient", "Cancel", nil, "Failure preparing request") - return - } - - resp, err := client.CancelSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.DatabaseOperationsClient", "Cancel", resp, "Failure sending request") - return - } - - result, err = client.CancelResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseOperationsClient", "Cancel", resp, "Failure responding to request") - return - } - - return -} - -// CancelPreparer prepares the Cancel request. -func (client DatabaseOperationsClient) CancelPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, operationID uuid.UUID) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "operationId": autorest.Encode("path", operationID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations/{operationId}/cancel", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CancelSender sends the Cancel request. The method will close the -// http.Response Body if it receives an error. -func (client DatabaseOperationsClient) CancelSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CancelResponder handles the response to the Cancel request. The method always -// closes the http.Response Body. -func (client DatabaseOperationsClient) CancelResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// ListByDatabase gets a list of operations performed on the database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -func (client DatabaseOperationsClient) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabaseOperationListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseOperationsClient.ListByDatabase") - defer func() { - sc := -1 - if result.dolr.Response.Response != nil { - sc = result.dolr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByDatabaseNextResults - req, err := client.ListByDatabasePreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseOperationsClient", "ListByDatabase", nil, "Failure preparing request") - return - } - - resp, err := client.ListByDatabaseSender(req) - if err != nil { - result.dolr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabaseOperationsClient", "ListByDatabase", resp, "Failure sending request") - return - } - - result.dolr, err = client.ListByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseOperationsClient", "ListByDatabase", resp, "Failure responding to request") - return - } - if result.dolr.hasNextLink() && result.dolr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByDatabasePreparer prepares the ListByDatabase request. -func (client DatabaseOperationsClient) ListByDatabasePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByDatabaseSender sends the ListByDatabase request. The method will close the -// http.Response Body if it receives an error. -func (client DatabaseOperationsClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always -// closes the http.Response Body. -func (client DatabaseOperationsClient) ListByDatabaseResponder(resp *http.Response) (result DatabaseOperationListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByDatabaseNextResults retrieves the next set of results, if any. -func (client DatabaseOperationsClient) listByDatabaseNextResults(ctx context.Context, lastResults DatabaseOperationListResult) (result DatabaseOperationListResult, err error) { - req, err := lastResults.databaseOperationListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.DatabaseOperationsClient", "listByDatabaseNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByDatabaseSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.DatabaseOperationsClient", "listByDatabaseNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseOperationsClient", "listByDatabaseNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByDatabaseComplete enumerates all values, automatically crossing page boundaries as required. -func (client DatabaseOperationsClient) ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabaseOperationListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseOperationsClient.ListByDatabase") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByDatabase(ctx, resourceGroupName, serverName, databaseName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databases.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databases.go deleted file mode 100644 index 7a5c72c714da5..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databases.go +++ /dev/null @@ -1,1460 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// DatabasesClient is the the Azure SQL Database management API provides a RESTful set of web services that interact -// with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and -// delete databases. -type DatabasesClient struct { - BaseClient -} - -// NewDatabasesClient creates an instance of the DatabasesClient client. -func NewDatabasesClient(subscriptionID string) DatabasesClient { - return NewDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) DatabasesClient { - return DatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateImportOperation creates an import operation that imports a bacpac into an existing database. The existing -// database must be empty. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database to import into -// parameters - the required parameters for importing a Bacpac into a database. -func (client DatabasesClient) CreateImportOperation(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ImportExtensionRequest) (result DatabasesCreateImportOperationFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.CreateImportOperation") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ImportExtensionProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ImportExtensionProperties.OperationMode", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("sql.DatabasesClient", "CreateImportOperation", err.Error()) - } - - req, err := client.CreateImportOperationPreparer(ctx, resourceGroupName, serverName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "CreateImportOperation", nil, "Failure preparing request") - return - } - - result, err = client.CreateImportOperationSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "CreateImportOperation", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateImportOperationPreparer prepares the CreateImportOperation request. -func (client DatabasesClient) CreateImportOperationPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ImportExtensionRequest) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "extensionName": autorest.Encode("path", "import"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions/{extensionName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateImportOperationSender sends the CreateImportOperation request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) CreateImportOperationSender(req *http.Request) (future DatabasesCreateImportOperationFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateImportOperationResponder handles the response to the CreateImportOperation request. The method always -// closes the http.Response Body. -func (client DatabasesClient) CreateImportOperationResponder(resp *http.Response) (result ImportExportResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// CreateOrUpdate creates a new database or updates an existing database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database to be operated on (updated or created). -// parameters - the required parameters for creating or updating a database. -func (client DatabasesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters Database) (result DatabasesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DatabasesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters Database) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Kind = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) CreateOrUpdateSender(req *http.Request) (future DatabasesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client DatabasesClient) CreateOrUpdateResponder(resp *http.Response) (result Database, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database to be deleted. -func (client DatabasesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client DatabasesClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client DatabasesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Export exports a database to a bacpac. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database to be exported. -// parameters - the required parameters for exporting a database. -func (client DatabasesClient) Export(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ExportRequest) (result DatabasesExportFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Export") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.StorageKey", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.StorageURI", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.AdministratorLogin", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.AdministratorLoginPassword", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("sql.DatabasesClient", "Export", err.Error()) - } - - req, err := client.ExportPreparer(ctx, resourceGroupName, serverName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Export", nil, "Failure preparing request") - return - } - - result, err = client.ExportSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Export", result.Response(), "Failure sending request") - return - } - - return -} - -// ExportPreparer prepares the Export request. -func (client DatabasesClient) ExportPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ExportRequest) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/export", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ExportSender sends the Export request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) ExportSender(req *http.Request) (future DatabasesExportFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ExportResponder handles the response to the Export request. The method always -// closes the http.Response Body. -func (client DatabasesClient) ExportResponder(resp *http.Response) (result ImportExportResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets a database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database to be retrieved. -// expand - a comma separated list of child objects to expand in the response. Possible properties: -// serviceTierAdvisors, transparentDataEncryption. -func (client DatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, expand string) (result Database, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client DatabasesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(expand) > 0 { - queryParameters["$expand"] = autorest.Encode("query", expand) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client DatabasesClient) GetResponder(resp *http.Response) (result Database, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetByElasticPool gets a database inside of an elastic pool. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// elasticPoolName - the name of the elastic pool to be retrieved. -// databaseName - the name of the database to be retrieved. -func (client DatabasesClient) GetByElasticPool(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, databaseName string) (result Database, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.GetByElasticPool") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetByElasticPoolPreparer(ctx, resourceGroupName, serverName, elasticPoolName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetByElasticPool", nil, "Failure preparing request") - return - } - - resp, err := client.GetByElasticPoolSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetByElasticPool", resp, "Failure sending request") - return - } - - result, err = client.GetByElasticPoolResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetByElasticPool", resp, "Failure responding to request") - return - } - - return -} - -// GetByElasticPoolPreparer prepares the GetByElasticPool request. -func (client DatabasesClient) GetByElasticPoolPreparer(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "elasticPoolName": autorest.Encode("path", elasticPoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases/{databaseName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetByElasticPoolSender sends the GetByElasticPool request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) GetByElasticPoolSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetByElasticPoolResponder handles the response to the GetByElasticPool request. The method always -// closes the http.Response Body. -func (client DatabasesClient) GetByElasticPoolResponder(resp *http.Response) (result Database, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetByRecommendedElasticPool gets a database inside of a recommended elastic pool. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// recommendedElasticPoolName - the name of the elastic pool to be retrieved. -// databaseName - the name of the database to be retrieved. -func (client DatabasesClient) GetByRecommendedElasticPool(ctx context.Context, resourceGroupName string, serverName string, recommendedElasticPoolName string, databaseName string) (result Database, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.GetByRecommendedElasticPool") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetByRecommendedElasticPoolPreparer(ctx, resourceGroupName, serverName, recommendedElasticPoolName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetByRecommendedElasticPool", nil, "Failure preparing request") - return - } - - resp, err := client.GetByRecommendedElasticPoolSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetByRecommendedElasticPool", resp, "Failure sending request") - return - } - - result, err = client.GetByRecommendedElasticPoolResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetByRecommendedElasticPool", resp, "Failure responding to request") - return - } - - return -} - -// GetByRecommendedElasticPoolPreparer prepares the GetByRecommendedElasticPool request. -func (client DatabasesClient) GetByRecommendedElasticPoolPreparer(ctx context.Context, resourceGroupName string, serverName string, recommendedElasticPoolName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "recommendedElasticPoolName": autorest.Encode("path", recommendedElasticPoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/databases/{databaseName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetByRecommendedElasticPoolSender sends the GetByRecommendedElasticPool request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) GetByRecommendedElasticPoolSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetByRecommendedElasticPoolResponder handles the response to the GetByRecommendedElasticPool request. The method always -// closes the http.Response Body. -func (client DatabasesClient) GetByRecommendedElasticPoolResponder(resp *http.Response) (result Database, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Import imports a bacpac into a new database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// parameters - the required parameters for importing a Bacpac into a database. -func (client DatabasesClient) Import(ctx context.Context, resourceGroupName string, serverName string, parameters ImportRequest) (result DatabasesImportFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Import") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.DatabaseName", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.MaxSizeBytes", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("sql.DatabasesClient", "Import", err.Error()) - } - - req, err := client.ImportPreparer(ctx, resourceGroupName, serverName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Import", nil, "Failure preparing request") - return - } - - result, err = client.ImportSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Import", result.Response(), "Failure sending request") - return - } - - return -} - -// ImportPreparer prepares the Import request. -func (client DatabasesClient) ImportPreparer(ctx context.Context, resourceGroupName string, serverName string, parameters ImportRequest) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/import", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ImportSender sends the Import request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) ImportSender(req *http.Request) (future DatabasesImportFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ImportResponder handles the response to the Import request. The method always -// closes the http.Response Body. -func (client DatabasesClient) ImportResponder(resp *http.Response) (result ImportExportResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByElasticPool returns a list of databases in an elastic pool. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// elasticPoolName - the name of the elastic pool to be retrieved. -func (client DatabasesClient) ListByElasticPool(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result DatabaseListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.ListByElasticPool") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListByElasticPoolPreparer(ctx, resourceGroupName, serverName, elasticPoolName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListByElasticPool", nil, "Failure preparing request") - return - } - - resp, err := client.ListByElasticPoolSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListByElasticPool", resp, "Failure sending request") - return - } - - result, err = client.ListByElasticPoolResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListByElasticPool", resp, "Failure responding to request") - return - } - - return -} - -// ListByElasticPoolPreparer prepares the ListByElasticPool request. -func (client DatabasesClient) ListByElasticPoolPreparer(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "elasticPoolName": autorest.Encode("path", elasticPoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByElasticPoolSender sends the ListByElasticPool request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) ListByElasticPoolSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByElasticPoolResponder handles the response to the ListByElasticPool request. The method always -// closes the http.Response Body. -func (client DatabasesClient) ListByElasticPoolResponder(resp *http.Response) (result DatabaseListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByRecommendedElasticPool returns a list of databases inside a recommended elastic pool. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// recommendedElasticPoolName - the name of the recommended elastic pool to be retrieved. -func (client DatabasesClient) ListByRecommendedElasticPool(ctx context.Context, resourceGroupName string, serverName string, recommendedElasticPoolName string) (result DatabaseListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.ListByRecommendedElasticPool") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListByRecommendedElasticPoolPreparer(ctx, resourceGroupName, serverName, recommendedElasticPoolName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListByRecommendedElasticPool", nil, "Failure preparing request") - return - } - - resp, err := client.ListByRecommendedElasticPoolSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListByRecommendedElasticPool", resp, "Failure sending request") - return - } - - result, err = client.ListByRecommendedElasticPoolResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListByRecommendedElasticPool", resp, "Failure responding to request") - return - } - - return -} - -// ListByRecommendedElasticPoolPreparer prepares the ListByRecommendedElasticPool request. -func (client DatabasesClient) ListByRecommendedElasticPoolPreparer(ctx context.Context, resourceGroupName string, serverName string, recommendedElasticPoolName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "recommendedElasticPoolName": autorest.Encode("path", recommendedElasticPoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/databases", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByRecommendedElasticPoolSender sends the ListByRecommendedElasticPool request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) ListByRecommendedElasticPoolSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByRecommendedElasticPoolResponder handles the response to the ListByRecommendedElasticPool request. The method always -// closes the http.Response Body. -func (client DatabasesClient) ListByRecommendedElasticPoolResponder(resp *http.Response) (result DatabaseListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer returns a list of databases in a server. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// expand - a comma separated list of child objects to expand in the response. Possible properties: -// serviceTierAdvisors, transparentDataEncryption. -// filter - an OData filter expression that describes a subset of databases to return. -func (client DatabasesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string, expand string, filter string) (result DatabaseListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.ListByServer") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName, expand, filter) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListByServer", resp, "Failure sending request") - return - } - - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListByServer", resp, "Failure responding to request") - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client DatabasesClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string, expand string, filter string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(expand) > 0 { - queryParameters["$expand"] = autorest.Encode("query", expand) - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client DatabasesClient) ListByServerResponder(resp *http.Response) (result DatabaseListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListMetricDefinitions returns database metric definitions. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -func (client DatabasesClient) ListMetricDefinitions(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result MetricDefinitionListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.ListMetricDefinitions") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListMetricDefinitionsPreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListMetricDefinitions", nil, "Failure preparing request") - return - } - - resp, err := client.ListMetricDefinitionsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListMetricDefinitions", resp, "Failure sending request") - return - } - - result, err = client.ListMetricDefinitionsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListMetricDefinitions", resp, "Failure responding to request") - return - } - - return -} - -// ListMetricDefinitionsPreparer prepares the ListMetricDefinitions request. -func (client DatabasesClient) ListMetricDefinitionsPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metricDefinitions", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListMetricDefinitionsSender sends the ListMetricDefinitions request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) ListMetricDefinitionsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListMetricDefinitionsResponder handles the response to the ListMetricDefinitions request. The method always -// closes the http.Response Body. -func (client DatabasesClient) ListMetricDefinitionsResponder(resp *http.Response) (result MetricDefinitionListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListMetrics returns database metrics. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -// filter - an OData filter expression that describes a subset of metrics to return. -func (client DatabasesClient) ListMetrics(ctx context.Context, resourceGroupName string, serverName string, databaseName string, filter string) (result MetricListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.ListMetrics") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListMetricsPreparer(ctx, resourceGroupName, serverName, databaseName, filter) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListMetrics", nil, "Failure preparing request") - return - } - - resp, err := client.ListMetricsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListMetrics", resp, "Failure sending request") - return - } - - result, err = client.ListMetricsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListMetrics", resp, "Failure responding to request") - return - } - - return -} - -// ListMetricsPreparer prepares the ListMetrics request. -func (client DatabasesClient) ListMetricsPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, filter string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "$filter": autorest.Encode("query", filter), - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metrics", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListMetricsSender sends the ListMetrics request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) ListMetricsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListMetricsResponder handles the response to the ListMetrics request. The method always -// closes the http.Response Body. -func (client DatabasesClient) ListMetricsResponder(resp *http.Response) (result MetricListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Pause pauses a data warehouse. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the data warehouse to pause. -func (client DatabasesClient) Pause(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabasesPauseFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Pause") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.PausePreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Pause", nil, "Failure preparing request") - return - } - - result, err = client.PauseSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Pause", result.Response(), "Failure sending request") - return - } - - return -} - -// PausePreparer prepares the Pause request. -func (client DatabasesClient) PausePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/pause", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// PauseSender sends the Pause request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) PauseSender(req *http.Request) (future DatabasesPauseFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// PauseResponder handles the response to the Pause request. The method always -// closes the http.Response Body. -func (client DatabasesClient) PauseResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Rename renames a database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database to rename. -// parameters - the resource move definition for renaming this database. -func (client DatabasesClient) Rename(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ResourceMoveDefinition) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Rename") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("sql.DatabasesClient", "Rename", err.Error()) - } - - req, err := client.RenamePreparer(ctx, resourceGroupName, serverName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Rename", nil, "Failure preparing request") - return - } - - resp, err := client.RenameSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Rename", resp, "Failure sending request") - return - } - - result, err = client.RenameResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Rename", resp, "Failure responding to request") - return - } - - return -} - -// RenamePreparer prepares the Rename request. -func (client DatabasesClient) RenamePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ResourceMoveDefinition) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/move", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// RenameSender sends the Rename request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) RenameSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// RenameResponder handles the response to the Rename request. The method always -// closes the http.Response Body. -func (client DatabasesClient) RenameResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// Resume resumes a data warehouse. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the data warehouse to resume. -func (client DatabasesClient) Resume(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabasesResumeFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Resume") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ResumePreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Resume", nil, "Failure preparing request") - return - } - - result, err = client.ResumeSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Resume", result.Response(), "Failure sending request") - return - } - - return -} - -// ResumePreparer prepares the Resume request. -func (client DatabasesClient) ResumePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/resume", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ResumeSender sends the Resume request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) ResumeSender(req *http.Request) (future DatabasesResumeFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ResumeResponder handles the response to the Resume request. The method always -// closes the http.Response Body. -func (client DatabasesClient) ResumeResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Update updates an existing database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database to be updated. -// parameters - the required parameters for updating a database. -func (client DatabasesClient) Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseUpdate) (result DatabasesUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client DatabasesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) UpdateSender(req *http.Request) (future DatabasesUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client DatabasesClient) UpdateResponder(resp *http.Response) (result Database, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databasethreatdetectionpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databasethreatdetectionpolicies.go deleted file mode 100644 index 5034e53cfadbc..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databasethreatdetectionpolicies.go +++ /dev/null @@ -1,198 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// DatabaseThreatDetectionPoliciesClient is the the Azure SQL Database management API provides a RESTful set of web -// services that interact with Azure SQL Database services to manage your databases. The API enables you to create, -// retrieve, update, and delete databases. -type DatabaseThreatDetectionPoliciesClient struct { - BaseClient -} - -// NewDatabaseThreatDetectionPoliciesClient creates an instance of the DatabaseThreatDetectionPoliciesClient client. -func NewDatabaseThreatDetectionPoliciesClient(subscriptionID string) DatabaseThreatDetectionPoliciesClient { - return NewDatabaseThreatDetectionPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewDatabaseThreatDetectionPoliciesClientWithBaseURI creates an instance of the DatabaseThreatDetectionPoliciesClient -// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI -// (sovereign clouds, Azure stack). -func NewDatabaseThreatDetectionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) DatabaseThreatDetectionPoliciesClient { - return DatabaseThreatDetectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a database's threat detection policy. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database for which database Threat Detection policy is defined. -// parameters - the database Threat Detection policy. -func (client DatabaseThreatDetectionPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseSecurityAlertPolicy) (result DatabaseSecurityAlertPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseThreatDetectionPoliciesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseThreatDetectionPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabaseThreatDetectionPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseThreatDetectionPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DatabaseThreatDetectionPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseSecurityAlertPolicy) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "securityAlertPolicyName": autorest.Encode("path", "default"), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Kind = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client DatabaseThreatDetectionPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client DatabaseThreatDetectionPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result DatabaseSecurityAlertPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets a database's threat detection policy. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database for which database Threat Detection policy is defined. -func (client DatabaseThreatDetectionPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabaseSecurityAlertPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseThreatDetectionPoliciesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseThreatDetectionPoliciesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabaseThreatDetectionPoliciesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseThreatDetectionPoliciesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client DatabaseThreatDetectionPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "securityAlertPolicyName": autorest.Encode("path", "default"), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client DatabaseThreatDetectionPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client DatabaseThreatDetectionPoliciesClient) GetResponder(resp *http.Response) (result DatabaseSecurityAlertPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseusages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseusages.go deleted file mode 100644 index 157fddb468b60..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseusages.go +++ /dev/null @@ -1,112 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// DatabaseUsagesClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type DatabaseUsagesClient struct { - BaseClient -} - -// NewDatabaseUsagesClient creates an instance of the DatabaseUsagesClient client. -func NewDatabaseUsagesClient(subscriptionID string) DatabaseUsagesClient { - return NewDatabaseUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewDatabaseUsagesClientWithBaseURI creates an instance of the DatabaseUsagesClient client using a custom endpoint. -// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewDatabaseUsagesClientWithBaseURI(baseURI string, subscriptionID string) DatabaseUsagesClient { - return DatabaseUsagesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// ListByDatabase returns database usages. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -func (client DatabaseUsagesClient) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabaseUsageListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseUsagesClient.ListByDatabase") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListByDatabasePreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseUsagesClient", "ListByDatabase", nil, "Failure preparing request") - return - } - - resp, err := client.ListByDatabaseSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabaseUsagesClient", "ListByDatabase", resp, "Failure sending request") - return - } - - result, err = client.ListByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseUsagesClient", "ListByDatabase", resp, "Failure responding to request") - return - } - - return -} - -// ListByDatabasePreparer prepares the ListByDatabase request. -func (client DatabaseUsagesClient) ListByDatabasePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/usages", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByDatabaseSender sends the ListByDatabase request. The method will close the -// http.Response Body if it receives an error. -func (client DatabaseUsagesClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always -// closes the http.Response Body. -func (client DatabaseUsagesClient) ListByDatabaseResponder(resp *http.Response) (result DatabaseUsageListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databasevulnerabilityassessmentrulebaselines.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databasevulnerabilityassessmentrulebaselines.go deleted file mode 100644 index 39a429dfabff2..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databasevulnerabilityassessmentrulebaselines.go +++ /dev/null @@ -1,300 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// DatabaseVulnerabilityAssessmentRuleBaselinesClient is the the Azure SQL Database management API provides a RESTful -// set of web services that interact with Azure SQL Database services to manage your databases. The API enables you to -// create, retrieve, update, and delete databases. -type DatabaseVulnerabilityAssessmentRuleBaselinesClient struct { - BaseClient -} - -// NewDatabaseVulnerabilityAssessmentRuleBaselinesClient creates an instance of the -// DatabaseVulnerabilityAssessmentRuleBaselinesClient client. -func NewDatabaseVulnerabilityAssessmentRuleBaselinesClient(subscriptionID string) DatabaseVulnerabilityAssessmentRuleBaselinesClient { - return NewDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI creates an instance of the -// DatabaseVulnerabilityAssessmentRuleBaselinesClient client using a custom endpoint. Use this when interacting with -// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI(baseURI string, subscriptionID string) DatabaseVulnerabilityAssessmentRuleBaselinesClient { - return DatabaseVulnerabilityAssessmentRuleBaselinesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a database's vulnerability assessment rule baseline. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database for which the vulnerability assessment rule baseline is defined. -// ruleID - the vulnerability assessment rule ID. -// baselineName - the name of the vulnerability assessment rule baseline (default implies a baseline on a -// database level rule and master for server level rule). -// parameters - the requested rule baseline resource. -func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, parameters DatabaseVulnerabilityAssessmentRuleBaseline) (result DatabaseVulnerabilityAssessmentRuleBaseline, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.DatabaseVulnerabilityAssessmentRuleBaselineProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.DatabaseVulnerabilityAssessmentRuleBaselineProperties.BaselineResults", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("sql.DatabaseVulnerabilityAssessmentRuleBaselinesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, ruleID, baselineName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentRuleBaselinesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentRuleBaselinesClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentRuleBaselinesClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, parameters DatabaseVulnerabilityAssessmentRuleBaseline) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "baselineName": autorest.Encode("path", baselineName), - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "ruleId": autorest.Encode("path", ruleID), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vulnerabilityAssessmentName": autorest.Encode("path", "default"), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdateResponder(resp *http.Response) (result DatabaseVulnerabilityAssessmentRuleBaseline, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete removes the database's vulnerability assessment rule baseline. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database for which the vulnerability assessment rule baseline is defined. -// ruleID - the vulnerability assessment rule ID. -// baselineName - the name of the vulnerability assessment rule baseline (default implies a baseline on a -// database level rule and master for server level rule). -func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, databaseName, ruleID, baselineName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentRuleBaselinesClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentRuleBaselinesClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentRuleBaselinesClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "baselineName": autorest.Encode("path", baselineName), - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "ruleId": autorest.Encode("path", ruleID), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vulnerabilityAssessmentName": autorest.Encode("path", "default"), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a database's vulnerability assessment rule baseline. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database for which the vulnerability assessment rule baseline is defined. -// ruleID - the vulnerability assessment rule ID. -// baselineName - the name of the vulnerability assessment rule baseline (default implies a baseline on a -// database level rule and master for server level rule). -func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName) (result DatabaseVulnerabilityAssessmentRuleBaseline, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseVulnerabilityAssessmentRuleBaselinesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName, ruleID, baselineName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentRuleBaselinesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentRuleBaselinesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentRuleBaselinesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "baselineName": autorest.Encode("path", baselineName), - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "ruleId": autorest.Encode("path", ruleID), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vulnerabilityAssessmentName": autorest.Encode("path", "default"), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) GetResponder(resp *http.Response) (result DatabaseVulnerabilityAssessmentRuleBaseline, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databasevulnerabilityassessments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databasevulnerabilityassessments.go deleted file mode 100644 index 7e8a7e55ce2ca..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databasevulnerabilityassessments.go +++ /dev/null @@ -1,397 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// DatabaseVulnerabilityAssessmentsClient is the the Azure SQL Database management API provides a RESTful set of web -// services that interact with Azure SQL Database services to manage your databases. The API enables you to create, -// retrieve, update, and delete databases. -type DatabaseVulnerabilityAssessmentsClient struct { - BaseClient -} - -// NewDatabaseVulnerabilityAssessmentsClient creates an instance of the DatabaseVulnerabilityAssessmentsClient client. -func NewDatabaseVulnerabilityAssessmentsClient(subscriptionID string) DatabaseVulnerabilityAssessmentsClient { - return NewDatabaseVulnerabilityAssessmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewDatabaseVulnerabilityAssessmentsClientWithBaseURI creates an instance of the -// DatabaseVulnerabilityAssessmentsClient client using a custom endpoint. Use this when interacting with an Azure -// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewDatabaseVulnerabilityAssessmentsClientWithBaseURI(baseURI string, subscriptionID string) DatabaseVulnerabilityAssessmentsClient { - return DatabaseVulnerabilityAssessmentsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates the database's vulnerability assessment. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database for which the vulnerability assessment is defined. -// parameters - the requested resource. -func (client DatabaseVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseVulnerabilityAssessment) (result DatabaseVulnerabilityAssessment, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseVulnerabilityAssessmentsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DatabaseVulnerabilityAssessmentsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseVulnerabilityAssessment) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vulnerabilityAssessmentName": autorest.Encode("path", "default"), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client DatabaseVulnerabilityAssessmentsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client DatabaseVulnerabilityAssessmentsClient) CreateOrUpdateResponder(resp *http.Response) (result DatabaseVulnerabilityAssessment, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete removes the database's vulnerability assessment. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database for which the vulnerability assessment is defined. -func (client DatabaseVulnerabilityAssessmentsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseVulnerabilityAssessmentsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client DatabaseVulnerabilityAssessmentsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vulnerabilityAssessmentName": autorest.Encode("path", "default"), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client DatabaseVulnerabilityAssessmentsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client DatabaseVulnerabilityAssessmentsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets the database's vulnerability assessment. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database for which the vulnerability assessment is defined. -func (client DatabaseVulnerabilityAssessmentsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabaseVulnerabilityAssessment, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseVulnerabilityAssessmentsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client DatabaseVulnerabilityAssessmentsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vulnerabilityAssessmentName": autorest.Encode("path", "default"), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client DatabaseVulnerabilityAssessmentsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client DatabaseVulnerabilityAssessmentsClient) GetResponder(resp *http.Response) (result DatabaseVulnerabilityAssessment, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByDatabase lists the vulnerability assessment policies associated with a database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database for which the vulnerability assessment policies are defined. -func (client DatabaseVulnerabilityAssessmentsClient) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabaseVulnerabilityAssessmentListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseVulnerabilityAssessmentsClient.ListByDatabase") - defer func() { - sc := -1 - if result.dvalr.Response.Response != nil { - sc = result.dvalr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByDatabaseNextResults - req, err := client.ListByDatabasePreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentsClient", "ListByDatabase", nil, "Failure preparing request") - return - } - - resp, err := client.ListByDatabaseSender(req) - if err != nil { - result.dvalr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentsClient", "ListByDatabase", resp, "Failure sending request") - return - } - - result.dvalr, err = client.ListByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentsClient", "ListByDatabase", resp, "Failure responding to request") - return - } - if result.dvalr.hasNextLink() && result.dvalr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByDatabasePreparer prepares the ListByDatabase request. -func (client DatabaseVulnerabilityAssessmentsClient) ListByDatabasePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByDatabaseSender sends the ListByDatabase request. The method will close the -// http.Response Body if it receives an error. -func (client DatabaseVulnerabilityAssessmentsClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always -// closes the http.Response Body. -func (client DatabaseVulnerabilityAssessmentsClient) ListByDatabaseResponder(resp *http.Response) (result DatabaseVulnerabilityAssessmentListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByDatabaseNextResults retrieves the next set of results, if any. -func (client DatabaseVulnerabilityAssessmentsClient) listByDatabaseNextResults(ctx context.Context, lastResults DatabaseVulnerabilityAssessmentListResult) (result DatabaseVulnerabilityAssessmentListResult, err error) { - req, err := lastResults.databaseVulnerabilityAssessmentListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentsClient", "listByDatabaseNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByDatabaseSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentsClient", "listByDatabaseNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentsClient", "listByDatabaseNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByDatabaseComplete enumerates all values, automatically crossing page boundaries as required. -func (client DatabaseVulnerabilityAssessmentsClient) ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabaseVulnerabilityAssessmentListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseVulnerabilityAssessmentsClient.ListByDatabase") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByDatabase(ctx, resourceGroupName, serverName, databaseName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/datamaskingpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/datamaskingpolicies.go deleted file mode 100644 index bd6726530f7e6..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/datamaskingpolicies.go +++ /dev/null @@ -1,199 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// DataMaskingPoliciesClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type DataMaskingPoliciesClient struct { - BaseClient -} - -// NewDataMaskingPoliciesClient creates an instance of the DataMaskingPoliciesClient client. -func NewDataMaskingPoliciesClient(subscriptionID string) DataMaskingPoliciesClient { - return NewDataMaskingPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewDataMaskingPoliciesClientWithBaseURI creates an instance of the DataMaskingPoliciesClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewDataMaskingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) DataMaskingPoliciesClient { - return DataMaskingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a database data masking policy -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -// parameters - parameters for creating or updating a data masking policy. -func (client DataMaskingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DataMaskingPolicy) (result DataMaskingPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DataMaskingPoliciesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DataMaskingPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DataMaskingPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DataMaskingPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DataMaskingPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DataMaskingPolicy) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "dataMaskingPolicyName": autorest.Encode("path", "Default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Location = nil - parameters.Kind = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client DataMaskingPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client DataMaskingPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result DataMaskingPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets a database data masking policy. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -func (client DataMaskingPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DataMaskingPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DataMaskingPoliciesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DataMaskingPoliciesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DataMaskingPoliciesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DataMaskingPoliciesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client DataMaskingPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "dataMaskingPolicyName": autorest.Encode("path", "Default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client DataMaskingPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client DataMaskingPoliciesClient) GetResponder(resp *http.Response) (result DataMaskingPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/datamaskingrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/datamaskingrules.go deleted file mode 100644 index eae0c8e07f667..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/datamaskingrules.go +++ /dev/null @@ -1,212 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// DataMaskingRulesClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type DataMaskingRulesClient struct { - BaseClient -} - -// NewDataMaskingRulesClient creates an instance of the DataMaskingRulesClient client. -func NewDataMaskingRulesClient(subscriptionID string) DataMaskingRulesClient { - return NewDataMaskingRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewDataMaskingRulesClientWithBaseURI creates an instance of the DataMaskingRulesClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewDataMaskingRulesClientWithBaseURI(baseURI string, subscriptionID string) DataMaskingRulesClient { - return DataMaskingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a database data masking rule. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -// dataMaskingRuleName - the name of the data masking rule. -// parameters - the required parameters for creating or updating a data masking rule. -func (client DataMaskingRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, dataMaskingRuleName string, parameters DataMaskingRule) (result DataMaskingRule, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DataMaskingRulesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.DataMaskingRuleProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.DataMaskingRuleProperties.SchemaName", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.DataMaskingRuleProperties.TableName", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.DataMaskingRuleProperties.ColumnName", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("sql.DataMaskingRulesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, dataMaskingRuleName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DataMaskingRulesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DataMaskingRulesClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DataMaskingRulesClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DataMaskingRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, dataMaskingRuleName string, parameters DataMaskingRule) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "dataMaskingPolicyName": autorest.Encode("path", "Default"), - "dataMaskingRuleName": autorest.Encode("path", dataMaskingRuleName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Location = nil - parameters.Kind = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules/{dataMaskingRuleName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client DataMaskingRulesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client DataMaskingRulesClient) CreateOrUpdateResponder(resp *http.Response) (result DataMaskingRule, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByDatabase gets a list of database data masking rules. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -func (client DataMaskingRulesClient) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DataMaskingRuleListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DataMaskingRulesClient.ListByDatabase") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListByDatabasePreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DataMaskingRulesClient", "ListByDatabase", nil, "Failure preparing request") - return - } - - resp, err := client.ListByDatabaseSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DataMaskingRulesClient", "ListByDatabase", resp, "Failure sending request") - return - } - - result, err = client.ListByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DataMaskingRulesClient", "ListByDatabase", resp, "Failure responding to request") - return - } - - return -} - -// ListByDatabasePreparer prepares the ListByDatabase request. -func (client DataMaskingRulesClient) ListByDatabasePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "dataMaskingPolicyName": autorest.Encode("path", "Default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByDatabaseSender sends the ListByDatabase request. The method will close the -// http.Response Body if it receives an error. -func (client DataMaskingRulesClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always -// closes the http.Response Body. -func (client DataMaskingRulesClient) ListByDatabaseResponder(resp *http.Response) (result DataMaskingRuleListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/datawarehouseuseractivities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/datawarehouseuseractivities.go deleted file mode 100644 index 823486f64dfb9..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/datawarehouseuseractivities.go +++ /dev/null @@ -1,114 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// DataWarehouseUserActivitiesClient is the the Azure SQL Database management API provides a RESTful set of web -// services that interact with Azure SQL Database services to manage your databases. The API enables you to create, -// retrieve, update, and delete databases. -type DataWarehouseUserActivitiesClient struct { - BaseClient -} - -// NewDataWarehouseUserActivitiesClient creates an instance of the DataWarehouseUserActivitiesClient client. -func NewDataWarehouseUserActivitiesClient(subscriptionID string) DataWarehouseUserActivitiesClient { - return NewDataWarehouseUserActivitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewDataWarehouseUserActivitiesClientWithBaseURI creates an instance of the DataWarehouseUserActivitiesClient client -// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign -// clouds, Azure stack). -func NewDataWarehouseUserActivitiesClientWithBaseURI(baseURI string, subscriptionID string) DataWarehouseUserActivitiesClient { - return DataWarehouseUserActivitiesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets the user activities of a data warehouse which includes running and suspended queries -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -func (client DataWarehouseUserActivitiesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DataWarehouseUserActivities, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DataWarehouseUserActivitiesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DataWarehouseUserActivitiesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DataWarehouseUserActivitiesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DataWarehouseUserActivitiesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client DataWarehouseUserActivitiesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "dataWarehouseUserActivityName": autorest.Encode("path", "current"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataWarehouseUserActivities/{dataWarehouseUserActivityName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client DataWarehouseUserActivitiesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client DataWarehouseUserActivitiesClient) GetResponder(resp *http.Response) (result DataWarehouseUserActivities, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/elasticpoolactivities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/elasticpoolactivities.go deleted file mode 100644 index 441f57b95c415..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/elasticpoolactivities.go +++ /dev/null @@ -1,113 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ElasticPoolActivitiesClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type ElasticPoolActivitiesClient struct { - BaseClient -} - -// NewElasticPoolActivitiesClient creates an instance of the ElasticPoolActivitiesClient client. -func NewElasticPoolActivitiesClient(subscriptionID string) ElasticPoolActivitiesClient { - return NewElasticPoolActivitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewElasticPoolActivitiesClientWithBaseURI creates an instance of the ElasticPoolActivitiesClient client using a -// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, -// Azure stack). -func NewElasticPoolActivitiesClientWithBaseURI(baseURI string, subscriptionID string) ElasticPoolActivitiesClient { - return ElasticPoolActivitiesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// ListByElasticPool returns elastic pool activities. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// elasticPoolName - the name of the elastic pool for which to get the current activity. -func (client ElasticPoolActivitiesClient) ListByElasticPool(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result ElasticPoolActivityListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ElasticPoolActivitiesClient.ListByElasticPool") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListByElasticPoolPreparer(ctx, resourceGroupName, serverName, elasticPoolName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolActivitiesClient", "ListByElasticPool", nil, "Failure preparing request") - return - } - - resp, err := client.ListByElasticPoolSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ElasticPoolActivitiesClient", "ListByElasticPool", resp, "Failure sending request") - return - } - - result, err = client.ListByElasticPoolResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolActivitiesClient", "ListByElasticPool", resp, "Failure responding to request") - return - } - - return -} - -// ListByElasticPoolPreparer prepares the ListByElasticPool request. -func (client ElasticPoolActivitiesClient) ListByElasticPoolPreparer(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "elasticPoolName": autorest.Encode("path", elasticPoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolActivity", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByElasticPoolSender sends the ListByElasticPool request. The method will close the -// http.Response Body if it receives an error. -func (client ElasticPoolActivitiesClient) ListByElasticPoolSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByElasticPoolResponder handles the response to the ListByElasticPool request. The method always -// closes the http.Response Body. -func (client ElasticPoolActivitiesClient) ListByElasticPoolResponder(resp *http.Response) (result ElasticPoolActivityListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/elasticpooldatabaseactivities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/elasticpooldatabaseactivities.go deleted file mode 100644 index ea65995b62c92..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/elasticpooldatabaseactivities.go +++ /dev/null @@ -1,113 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ElasticPoolDatabaseActivitiesClient is the the Azure SQL Database management API provides a RESTful set of web -// services that interact with Azure SQL Database services to manage your databases. The API enables you to create, -// retrieve, update, and delete databases. -type ElasticPoolDatabaseActivitiesClient struct { - BaseClient -} - -// NewElasticPoolDatabaseActivitiesClient creates an instance of the ElasticPoolDatabaseActivitiesClient client. -func NewElasticPoolDatabaseActivitiesClient(subscriptionID string) ElasticPoolDatabaseActivitiesClient { - return NewElasticPoolDatabaseActivitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewElasticPoolDatabaseActivitiesClientWithBaseURI creates an instance of the ElasticPoolDatabaseActivitiesClient -// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI -// (sovereign clouds, Azure stack). -func NewElasticPoolDatabaseActivitiesClientWithBaseURI(baseURI string, subscriptionID string) ElasticPoolDatabaseActivitiesClient { - return ElasticPoolDatabaseActivitiesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// ListByElasticPool returns activity on databases inside of an elastic pool. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// elasticPoolName - the name of the elastic pool. -func (client ElasticPoolDatabaseActivitiesClient) ListByElasticPool(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result ElasticPoolDatabaseActivityListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ElasticPoolDatabaseActivitiesClient.ListByElasticPool") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListByElasticPoolPreparer(ctx, resourceGroupName, serverName, elasticPoolName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolDatabaseActivitiesClient", "ListByElasticPool", nil, "Failure preparing request") - return - } - - resp, err := client.ListByElasticPoolSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ElasticPoolDatabaseActivitiesClient", "ListByElasticPool", resp, "Failure sending request") - return - } - - result, err = client.ListByElasticPoolResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolDatabaseActivitiesClient", "ListByElasticPool", resp, "Failure responding to request") - return - } - - return -} - -// ListByElasticPoolPreparer prepares the ListByElasticPool request. -func (client ElasticPoolDatabaseActivitiesClient) ListByElasticPoolPreparer(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "elasticPoolName": autorest.Encode("path", elasticPoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolDatabaseActivity", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByElasticPoolSender sends the ListByElasticPool request. The method will close the -// http.Response Body if it receives an error. -func (client ElasticPoolDatabaseActivitiesClient) ListByElasticPoolSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByElasticPoolResponder handles the response to the ListByElasticPool request. The method always -// closes the http.Response Body. -func (client ElasticPoolDatabaseActivitiesClient) ListByElasticPoolResponder(resp *http.Response) (result ElasticPoolDatabaseActivityListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/elasticpools.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/elasticpools.go deleted file mode 100644 index 56d4227bd5138..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/elasticpools.go +++ /dev/null @@ -1,598 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ElasticPoolsClient is the the Azure SQL Database management API provides a RESTful set of web services that interact -// with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and -// delete databases. -type ElasticPoolsClient struct { - BaseClient -} - -// NewElasticPoolsClient creates an instance of the ElasticPoolsClient client. -func NewElasticPoolsClient(subscriptionID string) ElasticPoolsClient { - return NewElasticPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewElasticPoolsClientWithBaseURI creates an instance of the ElasticPoolsClient client using a custom endpoint. Use -// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewElasticPoolsClientWithBaseURI(baseURI string, subscriptionID string) ElasticPoolsClient { - return ElasticPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates a new elastic pool or updates an existing elastic pool. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// elasticPoolName - the name of the elastic pool to be operated on (updated or created). -// parameters - the required parameters for creating or updating an elastic pool. -func (client ElasticPoolsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, parameters ElasticPool) (result ElasticPoolsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ElasticPoolsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, elasticPoolName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ElasticPoolsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, parameters ElasticPool) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "elasticPoolName": autorest.Encode("path", elasticPoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Kind = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ElasticPoolsClient) CreateOrUpdateSender(req *http.Request) (future ElasticPoolsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ElasticPoolsClient) CreateOrUpdateResponder(resp *http.Response) (result ElasticPool, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes the elastic pool. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// elasticPoolName - the name of the elastic pool to be deleted. -func (client ElasticPoolsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ElasticPoolsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, elasticPoolName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ElasticPoolsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "elasticPoolName": autorest.Encode("path", elasticPoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client ElasticPoolsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ElasticPoolsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets an elastic pool. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// elasticPoolName - the name of the elastic pool to be retrieved. -func (client ElasticPoolsClient) Get(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result ElasticPool, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ElasticPoolsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, elasticPoolName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ElasticPoolsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "elasticPoolName": autorest.Encode("path", elasticPoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ElasticPoolsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ElasticPoolsClient) GetResponder(resp *http.Response) (result ElasticPool, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer returns a list of elastic pools in a server. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client ElasticPoolsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result ElasticPoolListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ElasticPoolsClient.ListByServer") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListByServer", resp, "Failure sending request") - return - } - - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListByServer", resp, "Failure responding to request") - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client ElasticPoolsClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client ElasticPoolsClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client ElasticPoolsClient) ListByServerResponder(resp *http.Response) (result ElasticPoolListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListMetricDefinitions returns elastic pool metric definitions. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// elasticPoolName - the name of the elastic pool. -func (client ElasticPoolsClient) ListMetricDefinitions(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result MetricDefinitionListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ElasticPoolsClient.ListMetricDefinitions") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListMetricDefinitionsPreparer(ctx, resourceGroupName, serverName, elasticPoolName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListMetricDefinitions", nil, "Failure preparing request") - return - } - - resp, err := client.ListMetricDefinitionsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListMetricDefinitions", resp, "Failure sending request") - return - } - - result, err = client.ListMetricDefinitionsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListMetricDefinitions", resp, "Failure responding to request") - return - } - - return -} - -// ListMetricDefinitionsPreparer prepares the ListMetricDefinitions request. -func (client ElasticPoolsClient) ListMetricDefinitionsPreparer(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "elasticPoolName": autorest.Encode("path", elasticPoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metricDefinitions", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListMetricDefinitionsSender sends the ListMetricDefinitions request. The method will close the -// http.Response Body if it receives an error. -func (client ElasticPoolsClient) ListMetricDefinitionsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListMetricDefinitionsResponder handles the response to the ListMetricDefinitions request. The method always -// closes the http.Response Body. -func (client ElasticPoolsClient) ListMetricDefinitionsResponder(resp *http.Response) (result MetricDefinitionListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListMetrics returns elastic pool metrics. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// elasticPoolName - the name of the elastic pool. -// filter - an OData filter expression that describes a subset of metrics to return. -func (client ElasticPoolsClient) ListMetrics(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, filter string) (result MetricListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ElasticPoolsClient.ListMetrics") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListMetricsPreparer(ctx, resourceGroupName, serverName, elasticPoolName, filter) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListMetrics", nil, "Failure preparing request") - return - } - - resp, err := client.ListMetricsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListMetrics", resp, "Failure sending request") - return - } - - result, err = client.ListMetricsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListMetrics", resp, "Failure responding to request") - return - } - - return -} - -// ListMetricsPreparer prepares the ListMetrics request. -func (client ElasticPoolsClient) ListMetricsPreparer(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, filter string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "elasticPoolName": autorest.Encode("path", elasticPoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "$filter": autorest.Encode("query", filter), - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metrics", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListMetricsSender sends the ListMetrics request. The method will close the -// http.Response Body if it receives an error. -func (client ElasticPoolsClient) ListMetricsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListMetricsResponder handles the response to the ListMetrics request. The method always -// closes the http.Response Body. -func (client ElasticPoolsClient) ListMetricsResponder(resp *http.Response) (result MetricListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Update updates an existing elastic pool. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// elasticPoolName - the name of the elastic pool to be updated. -// parameters - the required parameters for updating an elastic pool. -func (client ElasticPoolsClient) Update(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, parameters ElasticPoolUpdate) (result ElasticPoolsUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ElasticPoolsClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, serverName, elasticPoolName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client ElasticPoolsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, parameters ElasticPoolUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "elasticPoolName": autorest.Encode("path", elasticPoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client ElasticPoolsClient) UpdateSender(req *http.Request) (future ElasticPoolsUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client ElasticPoolsClient) UpdateResponder(resp *http.Response) (result ElasticPool, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/encryptionprotectors.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/encryptionprotectors.go deleted file mode 100644 index 14c45a85d0a3b..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/encryptionprotectors.go +++ /dev/null @@ -1,397 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// EncryptionProtectorsClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type EncryptionProtectorsClient struct { - BaseClient -} - -// NewEncryptionProtectorsClient creates an instance of the EncryptionProtectorsClient client. -func NewEncryptionProtectorsClient(subscriptionID string) EncryptionProtectorsClient { - return NewEncryptionProtectorsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewEncryptionProtectorsClientWithBaseURI creates an instance of the EncryptionProtectorsClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewEncryptionProtectorsClientWithBaseURI(baseURI string, subscriptionID string) EncryptionProtectorsClient { - return EncryptionProtectorsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate updates an existing encryption protector. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// parameters - the requested encryption protector resource state. -func (client EncryptionProtectorsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters EncryptionProtector) (result EncryptionProtectorsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionProtectorsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client EncryptionProtectorsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, parameters EncryptionProtector) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "encryptionProtectorName": autorest.Encode("path", "current"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Kind = nil - parameters.Location = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client EncryptionProtectorsClient) CreateOrUpdateSender(req *http.Request) (future EncryptionProtectorsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client EncryptionProtectorsClient) CreateOrUpdateResponder(resp *http.Response) (result EncryptionProtector, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets a server encryption protector. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client EncryptionProtectorsClient) Get(ctx context.Context, resourceGroupName string, serverName string) (result EncryptionProtector, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionProtectorsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client EncryptionProtectorsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "encryptionProtectorName": autorest.Encode("path", "current"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client EncryptionProtectorsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client EncryptionProtectorsClient) GetResponder(resp *http.Response) (result EncryptionProtector, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer gets a list of server encryption protectors -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client EncryptionProtectorsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result EncryptionProtectorListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionProtectorsClient.ListByServer") - defer func() { - sc := -1 - if result.eplr.Response.Response != nil { - sc = result.eplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByServerNextResults - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.eplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "ListByServer", resp, "Failure sending request") - return - } - - result.eplr, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "ListByServer", resp, "Failure responding to request") - return - } - if result.eplr.hasNextLink() && result.eplr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client EncryptionProtectorsClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client EncryptionProtectorsClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client EncryptionProtectorsClient) ListByServerResponder(resp *http.Response) (result EncryptionProtectorListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByServerNextResults retrieves the next set of results, if any. -func (client EncryptionProtectorsClient) listByServerNextResults(ctx context.Context, lastResults EncryptionProtectorListResult) (result EncryptionProtectorListResult, err error) { - req, err := lastResults.encryptionProtectorListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "listByServerNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "listByServerNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "listByServerNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. -func (client EncryptionProtectorsClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result EncryptionProtectorListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionProtectorsClient.ListByServer") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByServer(ctx, resourceGroupName, serverName) - return -} - -// Revalidate revalidates an existing encryption protector. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client EncryptionProtectorsClient) Revalidate(ctx context.Context, resourceGroupName string, serverName string) (result EncryptionProtectorsRevalidateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionProtectorsClient.Revalidate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.RevalidatePreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "Revalidate", nil, "Failure preparing request") - return - } - - result, err = client.RevalidateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "Revalidate", result.Response(), "Failure sending request") - return - } - - return -} - -// RevalidatePreparer prepares the Revalidate request. -func (client EncryptionProtectorsClient) RevalidatePreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "encryptionProtectorName": autorest.Encode("path", "current"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}/revalidate", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// RevalidateSender sends the Revalidate request. The method will close the -// http.Response Body if it receives an error. -func (client EncryptionProtectorsClient) RevalidateSender(req *http.Request) (future EncryptionProtectorsRevalidateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// RevalidateResponder handles the response to the Revalidate request. The method always -// closes the http.Response Body. -func (client EncryptionProtectorsClient) RevalidateResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/enums.go deleted file mode 100644 index 1336aa4ac58ff..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/enums.go +++ /dev/null @@ -1,1463 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// AuthenticationType enumerates the values for authentication type. -type AuthenticationType string - -const ( - // ADPassword ... - ADPassword AuthenticationType = "ADPassword" - // SQL ... - SQL AuthenticationType = "SQL" -) - -// PossibleAuthenticationTypeValues returns an array of possible values for the AuthenticationType const type. -func PossibleAuthenticationTypeValues() []AuthenticationType { - return []AuthenticationType{ADPassword, SQL} -} - -// AutomaticTuningDisabledReason enumerates the values for automatic tuning disabled reason. -type AutomaticTuningDisabledReason string - -const ( - // AutoConfigured ... - AutoConfigured AutomaticTuningDisabledReason = "AutoConfigured" - // Default ... - Default AutomaticTuningDisabledReason = "Default" - // Disabled ... - Disabled AutomaticTuningDisabledReason = "Disabled" - // InheritedFromServer ... - InheritedFromServer AutomaticTuningDisabledReason = "InheritedFromServer" - // NotSupported ... - NotSupported AutomaticTuningDisabledReason = "NotSupported" - // QueryStoreOff ... - QueryStoreOff AutomaticTuningDisabledReason = "QueryStoreOff" - // QueryStoreReadOnly ... - QueryStoreReadOnly AutomaticTuningDisabledReason = "QueryStoreReadOnly" -) - -// PossibleAutomaticTuningDisabledReasonValues returns an array of possible values for the AutomaticTuningDisabledReason const type. -func PossibleAutomaticTuningDisabledReasonValues() []AutomaticTuningDisabledReason { - return []AutomaticTuningDisabledReason{AutoConfigured, Default, Disabled, InheritedFromServer, NotSupported, QueryStoreOff, QueryStoreReadOnly} -} - -// AutomaticTuningMode enumerates the values for automatic tuning mode. -type AutomaticTuningMode string - -const ( - // Auto ... - Auto AutomaticTuningMode = "Auto" - // Custom ... - Custom AutomaticTuningMode = "Custom" - // Inherit ... - Inherit AutomaticTuningMode = "Inherit" - // Unspecified ... - Unspecified AutomaticTuningMode = "Unspecified" -) - -// PossibleAutomaticTuningModeValues returns an array of possible values for the AutomaticTuningMode const type. -func PossibleAutomaticTuningModeValues() []AutomaticTuningMode { - return []AutomaticTuningMode{Auto, Custom, Inherit, Unspecified} -} - -// AutomaticTuningOptionModeActual enumerates the values for automatic tuning option mode actual. -type AutomaticTuningOptionModeActual string - -const ( - // Off ... - Off AutomaticTuningOptionModeActual = "Off" - // On ... - On AutomaticTuningOptionModeActual = "On" -) - -// PossibleAutomaticTuningOptionModeActualValues returns an array of possible values for the AutomaticTuningOptionModeActual const type. -func PossibleAutomaticTuningOptionModeActualValues() []AutomaticTuningOptionModeActual { - return []AutomaticTuningOptionModeActual{Off, On} -} - -// AutomaticTuningOptionModeDesired enumerates the values for automatic tuning option mode desired. -type AutomaticTuningOptionModeDesired string - -const ( - // AutomaticTuningOptionModeDesiredDefault ... - AutomaticTuningOptionModeDesiredDefault AutomaticTuningOptionModeDesired = "Default" - // AutomaticTuningOptionModeDesiredOff ... - AutomaticTuningOptionModeDesiredOff AutomaticTuningOptionModeDesired = "Off" - // AutomaticTuningOptionModeDesiredOn ... - AutomaticTuningOptionModeDesiredOn AutomaticTuningOptionModeDesired = "On" -) - -// PossibleAutomaticTuningOptionModeDesiredValues returns an array of possible values for the AutomaticTuningOptionModeDesired const type. -func PossibleAutomaticTuningOptionModeDesiredValues() []AutomaticTuningOptionModeDesired { - return []AutomaticTuningOptionModeDesired{AutomaticTuningOptionModeDesiredDefault, AutomaticTuningOptionModeDesiredOff, AutomaticTuningOptionModeDesiredOn} -} - -// AutomaticTuningServerMode enumerates the values for automatic tuning server mode. -type AutomaticTuningServerMode string - -const ( - // AutomaticTuningServerModeAuto ... - AutomaticTuningServerModeAuto AutomaticTuningServerMode = "Auto" - // AutomaticTuningServerModeCustom ... - AutomaticTuningServerModeCustom AutomaticTuningServerMode = "Custom" - // AutomaticTuningServerModeUnspecified ... - AutomaticTuningServerModeUnspecified AutomaticTuningServerMode = "Unspecified" -) - -// PossibleAutomaticTuningServerModeValues returns an array of possible values for the AutomaticTuningServerMode const type. -func PossibleAutomaticTuningServerModeValues() []AutomaticTuningServerMode { - return []AutomaticTuningServerMode{AutomaticTuningServerModeAuto, AutomaticTuningServerModeCustom, AutomaticTuningServerModeUnspecified} -} - -// AutomaticTuningServerReason enumerates the values for automatic tuning server reason. -type AutomaticTuningServerReason string - -const ( - // AutomaticTuningServerReasonAutoConfigured ... - AutomaticTuningServerReasonAutoConfigured AutomaticTuningServerReason = "AutoConfigured" - // AutomaticTuningServerReasonDefault ... - AutomaticTuningServerReasonDefault AutomaticTuningServerReason = "Default" - // AutomaticTuningServerReasonDisabled ... - AutomaticTuningServerReasonDisabled AutomaticTuningServerReason = "Disabled" -) - -// PossibleAutomaticTuningServerReasonValues returns an array of possible values for the AutomaticTuningServerReason const type. -func PossibleAutomaticTuningServerReasonValues() []AutomaticTuningServerReason { - return []AutomaticTuningServerReason{AutomaticTuningServerReasonAutoConfigured, AutomaticTuningServerReasonDefault, AutomaticTuningServerReasonDisabled} -} - -// BlobAuditingPolicyState enumerates the values for blob auditing policy state. -type BlobAuditingPolicyState string - -const ( - // BlobAuditingPolicyStateDisabled ... - BlobAuditingPolicyStateDisabled BlobAuditingPolicyState = "Disabled" - // BlobAuditingPolicyStateEnabled ... - BlobAuditingPolicyStateEnabled BlobAuditingPolicyState = "Enabled" -) - -// PossibleBlobAuditingPolicyStateValues returns an array of possible values for the BlobAuditingPolicyState const type. -func PossibleBlobAuditingPolicyStateValues() []BlobAuditingPolicyState { - return []BlobAuditingPolicyState{BlobAuditingPolicyStateDisabled, BlobAuditingPolicyStateEnabled} -} - -// CapabilityStatus enumerates the values for capability status. -type CapabilityStatus string - -const ( - // CapabilityStatusAvailable ... - CapabilityStatusAvailable CapabilityStatus = "Available" - // CapabilityStatusDefault ... - CapabilityStatusDefault CapabilityStatus = "Default" - // CapabilityStatusDisabled ... - CapabilityStatusDisabled CapabilityStatus = "Disabled" - // CapabilityStatusVisible ... - CapabilityStatusVisible CapabilityStatus = "Visible" -) - -// PossibleCapabilityStatusValues returns an array of possible values for the CapabilityStatus const type. -func PossibleCapabilityStatusValues() []CapabilityStatus { - return []CapabilityStatus{CapabilityStatusAvailable, CapabilityStatusDefault, CapabilityStatusDisabled, CapabilityStatusVisible} -} - -// CatalogCollationType enumerates the values for catalog collation type. -type CatalogCollationType string - -const ( - // DATABASEDEFAULT ... - DATABASEDEFAULT CatalogCollationType = "DATABASE_DEFAULT" - // SQLLatin1GeneralCP1CIAS ... - SQLLatin1GeneralCP1CIAS CatalogCollationType = "SQL_Latin1_General_CP1_CI_AS" -) - -// PossibleCatalogCollationTypeValues returns an array of possible values for the CatalogCollationType const type. -func PossibleCatalogCollationTypeValues() []CatalogCollationType { - return []CatalogCollationType{DATABASEDEFAULT, SQLLatin1GeneralCP1CIAS} -} - -// CheckNameAvailabilityReason enumerates the values for check name availability reason. -type CheckNameAvailabilityReason string - -const ( - // AlreadyExists ... - AlreadyExists CheckNameAvailabilityReason = "AlreadyExists" - // Invalid ... - Invalid CheckNameAvailabilityReason = "Invalid" -) - -// PossibleCheckNameAvailabilityReasonValues returns an array of possible values for the CheckNameAvailabilityReason const type. -func PossibleCheckNameAvailabilityReasonValues() []CheckNameAvailabilityReason { - return []CheckNameAvailabilityReason{AlreadyExists, Invalid} -} - -// CreateMode enumerates the values for create mode. -type CreateMode string - -const ( - // CreateModeCopy ... - CreateModeCopy CreateMode = "Copy" - // CreateModeDefault ... - CreateModeDefault CreateMode = "Default" - // CreateModeNonReadableSecondary ... - CreateModeNonReadableSecondary CreateMode = "NonReadableSecondary" - // CreateModeOnlineSecondary ... - CreateModeOnlineSecondary CreateMode = "OnlineSecondary" - // CreateModePointInTimeRestore ... - CreateModePointInTimeRestore CreateMode = "PointInTimeRestore" - // CreateModeRecovery ... - CreateModeRecovery CreateMode = "Recovery" - // CreateModeRestore ... - CreateModeRestore CreateMode = "Restore" - // CreateModeRestoreLongTermRetentionBackup ... - CreateModeRestoreLongTermRetentionBackup CreateMode = "RestoreLongTermRetentionBackup" -) - -// PossibleCreateModeValues returns an array of possible values for the CreateMode const type. -func PossibleCreateModeValues() []CreateMode { - return []CreateMode{CreateModeCopy, CreateModeDefault, CreateModeNonReadableSecondary, CreateModeOnlineSecondary, CreateModePointInTimeRestore, CreateModeRecovery, CreateModeRestore, CreateModeRestoreLongTermRetentionBackup} -} - -// DatabaseEdition enumerates the values for database edition. -type DatabaseEdition string - -const ( - // Basic ... - Basic DatabaseEdition = "Basic" - // Business ... - Business DatabaseEdition = "Business" - // BusinessCritical ... - BusinessCritical DatabaseEdition = "BusinessCritical" - // DataWarehouse ... - DataWarehouse DatabaseEdition = "DataWarehouse" - // Free ... - Free DatabaseEdition = "Free" - // GeneralPurpose ... - GeneralPurpose DatabaseEdition = "GeneralPurpose" - // Hyperscale ... - Hyperscale DatabaseEdition = "Hyperscale" - // Premium ... - Premium DatabaseEdition = "Premium" - // PremiumRS ... - PremiumRS DatabaseEdition = "PremiumRS" - // Standard ... - Standard DatabaseEdition = "Standard" - // Stretch ... - Stretch DatabaseEdition = "Stretch" - // System ... - System DatabaseEdition = "System" - // System2 ... - System2 DatabaseEdition = "System2" - // Web ... - Web DatabaseEdition = "Web" -) - -// PossibleDatabaseEditionValues returns an array of possible values for the DatabaseEdition const type. -func PossibleDatabaseEditionValues() []DatabaseEdition { - return []DatabaseEdition{Basic, Business, BusinessCritical, DataWarehouse, Free, GeneralPurpose, Hyperscale, Premium, PremiumRS, Standard, Stretch, System, System2, Web} -} - -// DataMaskingFunction enumerates the values for data masking function. -type DataMaskingFunction string - -const ( - // DataMaskingFunctionCCN ... - DataMaskingFunctionCCN DataMaskingFunction = "CCN" - // DataMaskingFunctionDefault ... - DataMaskingFunctionDefault DataMaskingFunction = "Default" - // DataMaskingFunctionEmail ... - DataMaskingFunctionEmail DataMaskingFunction = "Email" - // DataMaskingFunctionNumber ... - DataMaskingFunctionNumber DataMaskingFunction = "Number" - // DataMaskingFunctionSSN ... - DataMaskingFunctionSSN DataMaskingFunction = "SSN" - // DataMaskingFunctionText ... - DataMaskingFunctionText DataMaskingFunction = "Text" -) - -// PossibleDataMaskingFunctionValues returns an array of possible values for the DataMaskingFunction const type. -func PossibleDataMaskingFunctionValues() []DataMaskingFunction { - return []DataMaskingFunction{DataMaskingFunctionCCN, DataMaskingFunctionDefault, DataMaskingFunctionEmail, DataMaskingFunctionNumber, DataMaskingFunctionSSN, DataMaskingFunctionText} -} - -// DataMaskingRuleState enumerates the values for data masking rule state. -type DataMaskingRuleState string - -const ( - // DataMaskingRuleStateDisabled ... - DataMaskingRuleStateDisabled DataMaskingRuleState = "Disabled" - // DataMaskingRuleStateEnabled ... - DataMaskingRuleStateEnabled DataMaskingRuleState = "Enabled" -) - -// PossibleDataMaskingRuleStateValues returns an array of possible values for the DataMaskingRuleState const type. -func PossibleDataMaskingRuleStateValues() []DataMaskingRuleState { - return []DataMaskingRuleState{DataMaskingRuleStateDisabled, DataMaskingRuleStateEnabled} -} - -// DataMaskingState enumerates the values for data masking state. -type DataMaskingState string - -const ( - // DataMaskingStateDisabled ... - DataMaskingStateDisabled DataMaskingState = "Disabled" - // DataMaskingStateEnabled ... - DataMaskingStateEnabled DataMaskingState = "Enabled" -) - -// PossibleDataMaskingStateValues returns an array of possible values for the DataMaskingState const type. -func PossibleDataMaskingStateValues() []DataMaskingState { - return []DataMaskingState{DataMaskingStateDisabled, DataMaskingStateEnabled} -} - -// ElasticPoolEdition enumerates the values for elastic pool edition. -type ElasticPoolEdition string - -const ( - // ElasticPoolEditionBasic ... - ElasticPoolEditionBasic ElasticPoolEdition = "Basic" - // ElasticPoolEditionBusinessCritical ... - ElasticPoolEditionBusinessCritical ElasticPoolEdition = "BusinessCritical" - // ElasticPoolEditionGeneralPurpose ... - ElasticPoolEditionGeneralPurpose ElasticPoolEdition = "GeneralPurpose" - // ElasticPoolEditionPremium ... - ElasticPoolEditionPremium ElasticPoolEdition = "Premium" - // ElasticPoolEditionStandard ... - ElasticPoolEditionStandard ElasticPoolEdition = "Standard" -) - -// PossibleElasticPoolEditionValues returns an array of possible values for the ElasticPoolEdition const type. -func PossibleElasticPoolEditionValues() []ElasticPoolEdition { - return []ElasticPoolEdition{ElasticPoolEditionBasic, ElasticPoolEditionBusinessCritical, ElasticPoolEditionGeneralPurpose, ElasticPoolEditionPremium, ElasticPoolEditionStandard} -} - -// ElasticPoolState enumerates the values for elastic pool state. -type ElasticPoolState string - -const ( - // ElasticPoolStateCreating ... - ElasticPoolStateCreating ElasticPoolState = "Creating" - // ElasticPoolStateDisabled ... - ElasticPoolStateDisabled ElasticPoolState = "Disabled" - // ElasticPoolStateReady ... - ElasticPoolStateReady ElasticPoolState = "Ready" -) - -// PossibleElasticPoolStateValues returns an array of possible values for the ElasticPoolState const type. -func PossibleElasticPoolStateValues() []ElasticPoolState { - return []ElasticPoolState{ElasticPoolStateCreating, ElasticPoolStateDisabled, ElasticPoolStateReady} -} - -// FailoverGroupReplicationRole enumerates the values for failover group replication role. -type FailoverGroupReplicationRole string - -const ( - // Primary ... - Primary FailoverGroupReplicationRole = "Primary" - // Secondary ... - Secondary FailoverGroupReplicationRole = "Secondary" -) - -// PossibleFailoverGroupReplicationRoleValues returns an array of possible values for the FailoverGroupReplicationRole const type. -func PossibleFailoverGroupReplicationRoleValues() []FailoverGroupReplicationRole { - return []FailoverGroupReplicationRole{Primary, Secondary} -} - -// GeoBackupPolicyState enumerates the values for geo backup policy state. -type GeoBackupPolicyState string - -const ( - // GeoBackupPolicyStateDisabled ... - GeoBackupPolicyStateDisabled GeoBackupPolicyState = "Disabled" - // GeoBackupPolicyStateEnabled ... - GeoBackupPolicyStateEnabled GeoBackupPolicyState = "Enabled" -) - -// PossibleGeoBackupPolicyStateValues returns an array of possible values for the GeoBackupPolicyState const type. -func PossibleGeoBackupPolicyStateValues() []GeoBackupPolicyState { - return []GeoBackupPolicyState{GeoBackupPolicyStateDisabled, GeoBackupPolicyStateEnabled} -} - -// IdentityType enumerates the values for identity type. -type IdentityType string - -const ( - // SystemAssigned ... - SystemAssigned IdentityType = "SystemAssigned" -) - -// PossibleIdentityTypeValues returns an array of possible values for the IdentityType const type. -func PossibleIdentityTypeValues() []IdentityType { - return []IdentityType{SystemAssigned} -} - -// JobAgentState enumerates the values for job agent state. -type JobAgentState string - -const ( - // JobAgentStateCreating ... - JobAgentStateCreating JobAgentState = "Creating" - // JobAgentStateDeleting ... - JobAgentStateDeleting JobAgentState = "Deleting" - // JobAgentStateDisabled ... - JobAgentStateDisabled JobAgentState = "Disabled" - // JobAgentStateReady ... - JobAgentStateReady JobAgentState = "Ready" - // JobAgentStateUpdating ... - JobAgentStateUpdating JobAgentState = "Updating" -) - -// PossibleJobAgentStateValues returns an array of possible values for the JobAgentState const type. -func PossibleJobAgentStateValues() []JobAgentState { - return []JobAgentState{JobAgentStateCreating, JobAgentStateDeleting, JobAgentStateDisabled, JobAgentStateReady, JobAgentStateUpdating} -} - -// JobExecutionLifecycle enumerates the values for job execution lifecycle. -type JobExecutionLifecycle string - -const ( - // Canceled ... - Canceled JobExecutionLifecycle = "Canceled" - // Created ... - Created JobExecutionLifecycle = "Created" - // Failed ... - Failed JobExecutionLifecycle = "Failed" - // InProgress ... - InProgress JobExecutionLifecycle = "InProgress" - // Skipped ... - Skipped JobExecutionLifecycle = "Skipped" - // Succeeded ... - Succeeded JobExecutionLifecycle = "Succeeded" - // SucceededWithSkipped ... - SucceededWithSkipped JobExecutionLifecycle = "SucceededWithSkipped" - // TimedOut ... - TimedOut JobExecutionLifecycle = "TimedOut" - // WaitingForChildJobExecutions ... - WaitingForChildJobExecutions JobExecutionLifecycle = "WaitingForChildJobExecutions" - // WaitingForRetry ... - WaitingForRetry JobExecutionLifecycle = "WaitingForRetry" -) - -// PossibleJobExecutionLifecycleValues returns an array of possible values for the JobExecutionLifecycle const type. -func PossibleJobExecutionLifecycleValues() []JobExecutionLifecycle { - return []JobExecutionLifecycle{Canceled, Created, Failed, InProgress, Skipped, Succeeded, SucceededWithSkipped, TimedOut, WaitingForChildJobExecutions, WaitingForRetry} -} - -// JobScheduleType enumerates the values for job schedule type. -type JobScheduleType string - -const ( - // Once ... - Once JobScheduleType = "Once" - // Recurring ... - Recurring JobScheduleType = "Recurring" -) - -// PossibleJobScheduleTypeValues returns an array of possible values for the JobScheduleType const type. -func PossibleJobScheduleTypeValues() []JobScheduleType { - return []JobScheduleType{Once, Recurring} -} - -// JobStepActionSource enumerates the values for job step action source. -type JobStepActionSource string - -const ( - // Inline ... - Inline JobStepActionSource = "Inline" -) - -// PossibleJobStepActionSourceValues returns an array of possible values for the JobStepActionSource const type. -func PossibleJobStepActionSourceValues() []JobStepActionSource { - return []JobStepActionSource{Inline} -} - -// JobStepActionType enumerates the values for job step action type. -type JobStepActionType string - -const ( - // TSQL ... - TSQL JobStepActionType = "TSql" -) - -// PossibleJobStepActionTypeValues returns an array of possible values for the JobStepActionType const type. -func PossibleJobStepActionTypeValues() []JobStepActionType { - return []JobStepActionType{TSQL} -} - -// JobStepOutputType enumerates the values for job step output type. -type JobStepOutputType string - -const ( - // SQLDatabase ... - SQLDatabase JobStepOutputType = "SqlDatabase" -) - -// PossibleJobStepOutputTypeValues returns an array of possible values for the JobStepOutputType const type. -func PossibleJobStepOutputTypeValues() []JobStepOutputType { - return []JobStepOutputType{SQLDatabase} -} - -// JobTargetGroupMembershipType enumerates the values for job target group membership type. -type JobTargetGroupMembershipType string - -const ( - // Exclude ... - Exclude JobTargetGroupMembershipType = "Exclude" - // Include ... - Include JobTargetGroupMembershipType = "Include" -) - -// PossibleJobTargetGroupMembershipTypeValues returns an array of possible values for the JobTargetGroupMembershipType const type. -func PossibleJobTargetGroupMembershipTypeValues() []JobTargetGroupMembershipType { - return []JobTargetGroupMembershipType{Exclude, Include} -} - -// JobTargetType enumerates the values for job target type. -type JobTargetType string - -const ( - // JobTargetTypeSQLDatabase ... - JobTargetTypeSQLDatabase JobTargetType = "SqlDatabase" - // JobTargetTypeSQLElasticPool ... - JobTargetTypeSQLElasticPool JobTargetType = "SqlElasticPool" - // JobTargetTypeSQLServer ... - JobTargetTypeSQLServer JobTargetType = "SqlServer" - // JobTargetTypeSQLShardMap ... - JobTargetTypeSQLShardMap JobTargetType = "SqlShardMap" - // JobTargetTypeTargetGroup ... - JobTargetTypeTargetGroup JobTargetType = "TargetGroup" -) - -// PossibleJobTargetTypeValues returns an array of possible values for the JobTargetType const type. -func PossibleJobTargetTypeValues() []JobTargetType { - return []JobTargetType{JobTargetTypeSQLDatabase, JobTargetTypeSQLElasticPool, JobTargetTypeSQLServer, JobTargetTypeSQLShardMap, JobTargetTypeTargetGroup} -} - -// ManagedDatabaseCreateMode enumerates the values for managed database create mode. -type ManagedDatabaseCreateMode string - -const ( - // ManagedDatabaseCreateModeDefault ... - ManagedDatabaseCreateModeDefault ManagedDatabaseCreateMode = "Default" - // ManagedDatabaseCreateModePointInTimeRestore ... - ManagedDatabaseCreateModePointInTimeRestore ManagedDatabaseCreateMode = "PointInTimeRestore" - // ManagedDatabaseCreateModeRecovery ... - ManagedDatabaseCreateModeRecovery ManagedDatabaseCreateMode = "Recovery" - // ManagedDatabaseCreateModeRestoreExternalBackup ... - ManagedDatabaseCreateModeRestoreExternalBackup ManagedDatabaseCreateMode = "RestoreExternalBackup" - // ManagedDatabaseCreateModeRestoreLongTermRetentionBackup ... - ManagedDatabaseCreateModeRestoreLongTermRetentionBackup ManagedDatabaseCreateMode = "RestoreLongTermRetentionBackup" -) - -// PossibleManagedDatabaseCreateModeValues returns an array of possible values for the ManagedDatabaseCreateMode const type. -func PossibleManagedDatabaseCreateModeValues() []ManagedDatabaseCreateMode { - return []ManagedDatabaseCreateMode{ManagedDatabaseCreateModeDefault, ManagedDatabaseCreateModePointInTimeRestore, ManagedDatabaseCreateModeRecovery, ManagedDatabaseCreateModeRestoreExternalBackup, ManagedDatabaseCreateModeRestoreLongTermRetentionBackup} -} - -// ManagedDatabaseStatus enumerates the values for managed database status. -type ManagedDatabaseStatus string - -const ( - // Creating ... - Creating ManagedDatabaseStatus = "Creating" - // Inaccessible ... - Inaccessible ManagedDatabaseStatus = "Inaccessible" - // Offline ... - Offline ManagedDatabaseStatus = "Offline" - // Online ... - Online ManagedDatabaseStatus = "Online" - // Restoring ... - Restoring ManagedDatabaseStatus = "Restoring" - // Shutdown ... - Shutdown ManagedDatabaseStatus = "Shutdown" - // Updating ... - Updating ManagedDatabaseStatus = "Updating" -) - -// PossibleManagedDatabaseStatusValues returns an array of possible values for the ManagedDatabaseStatus const type. -func PossibleManagedDatabaseStatusValues() []ManagedDatabaseStatus { - return []ManagedDatabaseStatus{Creating, Inaccessible, Offline, Online, Restoring, Shutdown, Updating} -} - -// ManagedInstanceLicenseType enumerates the values for managed instance license type. -type ManagedInstanceLicenseType string - -const ( - // BasePrice ... - BasePrice ManagedInstanceLicenseType = "BasePrice" - // LicenseIncluded ... - LicenseIncluded ManagedInstanceLicenseType = "LicenseIncluded" -) - -// PossibleManagedInstanceLicenseTypeValues returns an array of possible values for the ManagedInstanceLicenseType const type. -func PossibleManagedInstanceLicenseTypeValues() []ManagedInstanceLicenseType { - return []ManagedInstanceLicenseType{BasePrice, LicenseIncluded} -} - -// ManagedInstanceProxyOverride enumerates the values for managed instance proxy override. -type ManagedInstanceProxyOverride string - -const ( - // ManagedInstanceProxyOverrideDefault ... - ManagedInstanceProxyOverrideDefault ManagedInstanceProxyOverride = "Default" - // ManagedInstanceProxyOverrideProxy ... - ManagedInstanceProxyOverrideProxy ManagedInstanceProxyOverride = "Proxy" - // ManagedInstanceProxyOverrideRedirect ... - ManagedInstanceProxyOverrideRedirect ManagedInstanceProxyOverride = "Redirect" -) - -// PossibleManagedInstanceProxyOverrideValues returns an array of possible values for the ManagedInstanceProxyOverride const type. -func PossibleManagedInstanceProxyOverrideValues() []ManagedInstanceProxyOverride { - return []ManagedInstanceProxyOverride{ManagedInstanceProxyOverrideDefault, ManagedInstanceProxyOverrideProxy, ManagedInstanceProxyOverrideRedirect} -} - -// ManagedServerCreateMode enumerates the values for managed server create mode. -type ManagedServerCreateMode string - -const ( - // ManagedServerCreateModeDefault ... - ManagedServerCreateModeDefault ManagedServerCreateMode = "Default" - // ManagedServerCreateModePointInTimeRestore ... - ManagedServerCreateModePointInTimeRestore ManagedServerCreateMode = "PointInTimeRestore" -) - -// PossibleManagedServerCreateModeValues returns an array of possible values for the ManagedServerCreateMode const type. -func PossibleManagedServerCreateModeValues() []ManagedServerCreateMode { - return []ManagedServerCreateMode{ManagedServerCreateModeDefault, ManagedServerCreateModePointInTimeRestore} -} - -// ManagementOperationState enumerates the values for management operation state. -type ManagementOperationState string - -const ( - // ManagementOperationStateCancelInProgress ... - ManagementOperationStateCancelInProgress ManagementOperationState = "CancelInProgress" - // ManagementOperationStateCancelled ... - ManagementOperationStateCancelled ManagementOperationState = "Cancelled" - // ManagementOperationStateFailed ... - ManagementOperationStateFailed ManagementOperationState = "Failed" - // ManagementOperationStateInProgress ... - ManagementOperationStateInProgress ManagementOperationState = "InProgress" - // ManagementOperationStatePending ... - ManagementOperationStatePending ManagementOperationState = "Pending" - // ManagementOperationStateSucceeded ... - ManagementOperationStateSucceeded ManagementOperationState = "Succeeded" -) - -// PossibleManagementOperationStateValues returns an array of possible values for the ManagementOperationState const type. -func PossibleManagementOperationStateValues() []ManagementOperationState { - return []ManagementOperationState{ManagementOperationStateCancelInProgress, ManagementOperationStateCancelled, ManagementOperationStateFailed, ManagementOperationStateInProgress, ManagementOperationStatePending, ManagementOperationStateSucceeded} -} - -// MaxSizeUnits enumerates the values for max size units. -type MaxSizeUnits string - -const ( - // Gigabytes ... - Gigabytes MaxSizeUnits = "Gigabytes" - // Megabytes ... - Megabytes MaxSizeUnits = "Megabytes" - // Petabytes ... - Petabytes MaxSizeUnits = "Petabytes" - // Terabytes ... - Terabytes MaxSizeUnits = "Terabytes" -) - -// PossibleMaxSizeUnitsValues returns an array of possible values for the MaxSizeUnits const type. -func PossibleMaxSizeUnitsValues() []MaxSizeUnits { - return []MaxSizeUnits{Gigabytes, Megabytes, Petabytes, Terabytes} -} - -// OperationOrigin enumerates the values for operation origin. -type OperationOrigin string - -const ( - // OperationOriginSystem ... - OperationOriginSystem OperationOrigin = "system" - // OperationOriginUser ... - OperationOriginUser OperationOrigin = "user" -) - -// PossibleOperationOriginValues returns an array of possible values for the OperationOrigin const type. -func PossibleOperationOriginValues() []OperationOrigin { - return []OperationOrigin{OperationOriginSystem, OperationOriginUser} -} - -// PerformanceLevelUnit enumerates the values for performance level unit. -type PerformanceLevelUnit string - -const ( - // DTU ... - DTU PerformanceLevelUnit = "DTU" -) - -// PossiblePerformanceLevelUnitValues returns an array of possible values for the PerformanceLevelUnit const type. -func PossiblePerformanceLevelUnitValues() []PerformanceLevelUnit { - return []PerformanceLevelUnit{DTU} -} - -// PrimaryAggregationType enumerates the values for primary aggregation type. -type PrimaryAggregationType string - -const ( - // Average ... - Average PrimaryAggregationType = "Average" - // Count ... - Count PrimaryAggregationType = "Count" - // Maximum ... - Maximum PrimaryAggregationType = "Maximum" - // Minimum ... - Minimum PrimaryAggregationType = "Minimum" - // None ... - None PrimaryAggregationType = "None" - // Total ... - Total PrimaryAggregationType = "Total" -) - -// PossiblePrimaryAggregationTypeValues returns an array of possible values for the PrimaryAggregationType const type. -func PossiblePrimaryAggregationTypeValues() []PrimaryAggregationType { - return []PrimaryAggregationType{Average, Count, Maximum, Minimum, None, Total} -} - -// ProvisioningState enumerates the values for provisioning state. -type ProvisioningState string - -const ( - // ProvisioningStateCanceled ... - ProvisioningStateCanceled ProvisioningState = "Canceled" - // ProvisioningStateCreated ... - ProvisioningStateCreated ProvisioningState = "Created" - // ProvisioningStateFailed ... - ProvisioningStateFailed ProvisioningState = "Failed" - // ProvisioningStateInProgress ... - ProvisioningStateInProgress ProvisioningState = "InProgress" - // ProvisioningStateSucceeded ... - ProvisioningStateSucceeded ProvisioningState = "Succeeded" -) - -// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. -func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{ProvisioningStateCanceled, ProvisioningStateCreated, ProvisioningStateFailed, ProvisioningStateInProgress, ProvisioningStateSucceeded} -} - -// ReadOnlyEndpointFailoverPolicy enumerates the values for read only endpoint failover policy. -type ReadOnlyEndpointFailoverPolicy string - -const ( - // ReadOnlyEndpointFailoverPolicyDisabled ... - ReadOnlyEndpointFailoverPolicyDisabled ReadOnlyEndpointFailoverPolicy = "Disabled" - // ReadOnlyEndpointFailoverPolicyEnabled ... - ReadOnlyEndpointFailoverPolicyEnabled ReadOnlyEndpointFailoverPolicy = "Enabled" -) - -// PossibleReadOnlyEndpointFailoverPolicyValues returns an array of possible values for the ReadOnlyEndpointFailoverPolicy const type. -func PossibleReadOnlyEndpointFailoverPolicyValues() []ReadOnlyEndpointFailoverPolicy { - return []ReadOnlyEndpointFailoverPolicy{ReadOnlyEndpointFailoverPolicyDisabled, ReadOnlyEndpointFailoverPolicyEnabled} -} - -// ReadScale enumerates the values for read scale. -type ReadScale string - -const ( - // ReadScaleDisabled ... - ReadScaleDisabled ReadScale = "Disabled" - // ReadScaleEnabled ... - ReadScaleEnabled ReadScale = "Enabled" -) - -// PossibleReadScaleValues returns an array of possible values for the ReadScale const type. -func PossibleReadScaleValues() []ReadScale { - return []ReadScale{ReadScaleDisabled, ReadScaleEnabled} -} - -// ReadWriteEndpointFailoverPolicy enumerates the values for read write endpoint failover policy. -type ReadWriteEndpointFailoverPolicy string - -const ( - // Automatic ... - Automatic ReadWriteEndpointFailoverPolicy = "Automatic" - // Manual ... - Manual ReadWriteEndpointFailoverPolicy = "Manual" -) - -// PossibleReadWriteEndpointFailoverPolicyValues returns an array of possible values for the ReadWriteEndpointFailoverPolicy const type. -func PossibleReadWriteEndpointFailoverPolicyValues() []ReadWriteEndpointFailoverPolicy { - return []ReadWriteEndpointFailoverPolicy{Automatic, Manual} -} - -// RecommendedIndexAction enumerates the values for recommended index action. -type RecommendedIndexAction string - -const ( - // Create ... - Create RecommendedIndexAction = "Create" - // Drop ... - Drop RecommendedIndexAction = "Drop" - // Rebuild ... - Rebuild RecommendedIndexAction = "Rebuild" -) - -// PossibleRecommendedIndexActionValues returns an array of possible values for the RecommendedIndexAction const type. -func PossibleRecommendedIndexActionValues() []RecommendedIndexAction { - return []RecommendedIndexAction{Create, Drop, Rebuild} -} - -// RecommendedIndexState enumerates the values for recommended index state. -type RecommendedIndexState string - -const ( - // Active ... - Active RecommendedIndexState = "Active" - // Blocked ... - Blocked RecommendedIndexState = "Blocked" - // Executing ... - Executing RecommendedIndexState = "Executing" - // Expired ... - Expired RecommendedIndexState = "Expired" - // Ignored ... - Ignored RecommendedIndexState = "Ignored" - // Pending ... - Pending RecommendedIndexState = "Pending" - // PendingRevert ... - PendingRevert RecommendedIndexState = "Pending Revert" - // Reverted ... - Reverted RecommendedIndexState = "Reverted" - // Reverting ... - Reverting RecommendedIndexState = "Reverting" - // Success ... - Success RecommendedIndexState = "Success" - // Verifying ... - Verifying RecommendedIndexState = "Verifying" -) - -// PossibleRecommendedIndexStateValues returns an array of possible values for the RecommendedIndexState const type. -func PossibleRecommendedIndexStateValues() []RecommendedIndexState { - return []RecommendedIndexState{Active, Blocked, Executing, Expired, Ignored, Pending, PendingRevert, Reverted, Reverting, Success, Verifying} -} - -// RecommendedIndexType enumerates the values for recommended index type. -type RecommendedIndexType string - -const ( - // CLUSTERED ... - CLUSTERED RecommendedIndexType = "CLUSTERED" - // CLUSTEREDCOLUMNSTORE ... - CLUSTEREDCOLUMNSTORE RecommendedIndexType = "CLUSTERED COLUMNSTORE" - // COLUMNSTORE ... - COLUMNSTORE RecommendedIndexType = "COLUMNSTORE" - // NONCLUSTERED ... - NONCLUSTERED RecommendedIndexType = "NONCLUSTERED" -) - -// PossibleRecommendedIndexTypeValues returns an array of possible values for the RecommendedIndexType const type. -func PossibleRecommendedIndexTypeValues() []RecommendedIndexType { - return []RecommendedIndexType{CLUSTERED, CLUSTEREDCOLUMNSTORE, COLUMNSTORE, NONCLUSTERED} -} - -// ReplicationRole enumerates the values for replication role. -type ReplicationRole string - -const ( - // ReplicationRoleCopy ... - ReplicationRoleCopy ReplicationRole = "Copy" - // ReplicationRoleNonReadableSecondary ... - ReplicationRoleNonReadableSecondary ReplicationRole = "NonReadableSecondary" - // ReplicationRolePrimary ... - ReplicationRolePrimary ReplicationRole = "Primary" - // ReplicationRoleSecondary ... - ReplicationRoleSecondary ReplicationRole = "Secondary" - // ReplicationRoleSource ... - ReplicationRoleSource ReplicationRole = "Source" -) - -// PossibleReplicationRoleValues returns an array of possible values for the ReplicationRole const type. -func PossibleReplicationRoleValues() []ReplicationRole { - return []ReplicationRole{ReplicationRoleCopy, ReplicationRoleNonReadableSecondary, ReplicationRolePrimary, ReplicationRoleSecondary, ReplicationRoleSource} -} - -// ReplicationState enumerates the values for replication state. -type ReplicationState string - -const ( - // CATCHUP ... - CATCHUP ReplicationState = "CATCH_UP" - // PENDING ... - PENDING ReplicationState = "PENDING" - // SEEDING ... - SEEDING ReplicationState = "SEEDING" - // SUSPENDED ... - SUSPENDED ReplicationState = "SUSPENDED" -) - -// PossibleReplicationStateValues returns an array of possible values for the ReplicationState const type. -func PossibleReplicationStateValues() []ReplicationState { - return []ReplicationState{CATCHUP, PENDING, SEEDING, SUSPENDED} -} - -// RestorePointType enumerates the values for restore point type. -type RestorePointType string - -const ( - // CONTINUOUS ... - CONTINUOUS RestorePointType = "CONTINUOUS" - // DISCRETE ... - DISCRETE RestorePointType = "DISCRETE" -) - -// PossibleRestorePointTypeValues returns an array of possible values for the RestorePointType const type. -func PossibleRestorePointTypeValues() []RestorePointType { - return []RestorePointType{CONTINUOUS, DISCRETE} -} - -// SampleName enumerates the values for sample name. -type SampleName string - -const ( - // AdventureWorksLT ... - AdventureWorksLT SampleName = "AdventureWorksLT" -) - -// PossibleSampleNameValues returns an array of possible values for the SampleName const type. -func PossibleSampleNameValues() []SampleName { - return []SampleName{AdventureWorksLT} -} - -// SecurityAlertPolicyEmailAccountAdmins enumerates the values for security alert policy email account admins. -type SecurityAlertPolicyEmailAccountAdmins string - -const ( - // SecurityAlertPolicyEmailAccountAdminsDisabled ... - SecurityAlertPolicyEmailAccountAdminsDisabled SecurityAlertPolicyEmailAccountAdmins = "Disabled" - // SecurityAlertPolicyEmailAccountAdminsEnabled ... - SecurityAlertPolicyEmailAccountAdminsEnabled SecurityAlertPolicyEmailAccountAdmins = "Enabled" -) - -// PossibleSecurityAlertPolicyEmailAccountAdminsValues returns an array of possible values for the SecurityAlertPolicyEmailAccountAdmins const type. -func PossibleSecurityAlertPolicyEmailAccountAdminsValues() []SecurityAlertPolicyEmailAccountAdmins { - return []SecurityAlertPolicyEmailAccountAdmins{SecurityAlertPolicyEmailAccountAdminsDisabled, SecurityAlertPolicyEmailAccountAdminsEnabled} -} - -// SecurityAlertPolicyState enumerates the values for security alert policy state. -type SecurityAlertPolicyState string - -const ( - // SecurityAlertPolicyStateDisabled ... - SecurityAlertPolicyStateDisabled SecurityAlertPolicyState = "Disabled" - // SecurityAlertPolicyStateEnabled ... - SecurityAlertPolicyStateEnabled SecurityAlertPolicyState = "Enabled" - // SecurityAlertPolicyStateNew ... - SecurityAlertPolicyStateNew SecurityAlertPolicyState = "New" -) - -// PossibleSecurityAlertPolicyStateValues returns an array of possible values for the SecurityAlertPolicyState const type. -func PossibleSecurityAlertPolicyStateValues() []SecurityAlertPolicyState { - return []SecurityAlertPolicyState{SecurityAlertPolicyStateDisabled, SecurityAlertPolicyStateEnabled, SecurityAlertPolicyStateNew} -} - -// SecurityAlertPolicyUseServerDefault enumerates the values for security alert policy use server default. -type SecurityAlertPolicyUseServerDefault string - -const ( - // SecurityAlertPolicyUseServerDefaultDisabled ... - SecurityAlertPolicyUseServerDefaultDisabled SecurityAlertPolicyUseServerDefault = "Disabled" - // SecurityAlertPolicyUseServerDefaultEnabled ... - SecurityAlertPolicyUseServerDefaultEnabled SecurityAlertPolicyUseServerDefault = "Enabled" -) - -// PossibleSecurityAlertPolicyUseServerDefaultValues returns an array of possible values for the SecurityAlertPolicyUseServerDefault const type. -func PossibleSecurityAlertPolicyUseServerDefaultValues() []SecurityAlertPolicyUseServerDefault { - return []SecurityAlertPolicyUseServerDefault{SecurityAlertPolicyUseServerDefaultDisabled, SecurityAlertPolicyUseServerDefaultEnabled} -} - -// SensitivityLabelRank enumerates the values for sensitivity label rank. -type SensitivityLabelRank string - -const ( - // SensitivityLabelRankCritical ... - SensitivityLabelRankCritical SensitivityLabelRank = "Critical" - // SensitivityLabelRankHigh ... - SensitivityLabelRankHigh SensitivityLabelRank = "High" - // SensitivityLabelRankLow ... - SensitivityLabelRankLow SensitivityLabelRank = "Low" - // SensitivityLabelRankMedium ... - SensitivityLabelRankMedium SensitivityLabelRank = "Medium" - // SensitivityLabelRankNone ... - SensitivityLabelRankNone SensitivityLabelRank = "None" -) - -// PossibleSensitivityLabelRankValues returns an array of possible values for the SensitivityLabelRank const type. -func PossibleSensitivityLabelRankValues() []SensitivityLabelRank { - return []SensitivityLabelRank{SensitivityLabelRankCritical, SensitivityLabelRankHigh, SensitivityLabelRankLow, SensitivityLabelRankMedium, SensitivityLabelRankNone} -} - -// SensitivityLabelSource enumerates the values for sensitivity label source. -type SensitivityLabelSource string - -const ( - // Current ... - Current SensitivityLabelSource = "current" - // Recommended ... - Recommended SensitivityLabelSource = "recommended" -) - -// PossibleSensitivityLabelSourceValues returns an array of possible values for the SensitivityLabelSource const type. -func PossibleSensitivityLabelSourceValues() []SensitivityLabelSource { - return []SensitivityLabelSource{Current, Recommended} -} - -// ServerConnectionType enumerates the values for server connection type. -type ServerConnectionType string - -const ( - // ServerConnectionTypeDefault ... - ServerConnectionTypeDefault ServerConnectionType = "Default" - // ServerConnectionTypeProxy ... - ServerConnectionTypeProxy ServerConnectionType = "Proxy" - // ServerConnectionTypeRedirect ... - ServerConnectionTypeRedirect ServerConnectionType = "Redirect" -) - -// PossibleServerConnectionTypeValues returns an array of possible values for the ServerConnectionType const type. -func PossibleServerConnectionTypeValues() []ServerConnectionType { - return []ServerConnectionType{ServerConnectionTypeDefault, ServerConnectionTypeProxy, ServerConnectionTypeRedirect} -} - -// ServerKeyType enumerates the values for server key type. -type ServerKeyType string - -const ( - // AzureKeyVault ... - AzureKeyVault ServerKeyType = "AzureKeyVault" - // ServiceManaged ... - ServiceManaged ServerKeyType = "ServiceManaged" -) - -// PossibleServerKeyTypeValues returns an array of possible values for the ServerKeyType const type. -func PossibleServerKeyTypeValues() []ServerKeyType { - return []ServerKeyType{AzureKeyVault, ServiceManaged} -} - -// ServiceObjectiveName enumerates the values for service objective name. -type ServiceObjectiveName string - -const ( - // ServiceObjectiveNameBasic ... - ServiceObjectiveNameBasic ServiceObjectiveName = "Basic" - // ServiceObjectiveNameDS100 ... - ServiceObjectiveNameDS100 ServiceObjectiveName = "DS100" - // ServiceObjectiveNameDS1000 ... - ServiceObjectiveNameDS1000 ServiceObjectiveName = "DS1000" - // ServiceObjectiveNameDS1200 ... - ServiceObjectiveNameDS1200 ServiceObjectiveName = "DS1200" - // ServiceObjectiveNameDS1500 ... - ServiceObjectiveNameDS1500 ServiceObjectiveName = "DS1500" - // ServiceObjectiveNameDS200 ... - ServiceObjectiveNameDS200 ServiceObjectiveName = "DS200" - // ServiceObjectiveNameDS2000 ... - ServiceObjectiveNameDS2000 ServiceObjectiveName = "DS2000" - // ServiceObjectiveNameDS300 ... - ServiceObjectiveNameDS300 ServiceObjectiveName = "DS300" - // ServiceObjectiveNameDS400 ... - ServiceObjectiveNameDS400 ServiceObjectiveName = "DS400" - // ServiceObjectiveNameDS500 ... - ServiceObjectiveNameDS500 ServiceObjectiveName = "DS500" - // ServiceObjectiveNameDS600 ... - ServiceObjectiveNameDS600 ServiceObjectiveName = "DS600" - // ServiceObjectiveNameDW100 ... - ServiceObjectiveNameDW100 ServiceObjectiveName = "DW100" - // ServiceObjectiveNameDW1000 ... - ServiceObjectiveNameDW1000 ServiceObjectiveName = "DW1000" - // ServiceObjectiveNameDW10000c ... - ServiceObjectiveNameDW10000c ServiceObjectiveName = "DW10000c" - // ServiceObjectiveNameDW1000c ... - ServiceObjectiveNameDW1000c ServiceObjectiveName = "DW1000c" - // ServiceObjectiveNameDW1200 ... - ServiceObjectiveNameDW1200 ServiceObjectiveName = "DW1200" - // ServiceObjectiveNameDW1500 ... - ServiceObjectiveNameDW1500 ServiceObjectiveName = "DW1500" - // ServiceObjectiveNameDW15000c ... - ServiceObjectiveNameDW15000c ServiceObjectiveName = "DW15000c" - // ServiceObjectiveNameDW1500c ... - ServiceObjectiveNameDW1500c ServiceObjectiveName = "DW1500c" - // ServiceObjectiveNameDW200 ... - ServiceObjectiveNameDW200 ServiceObjectiveName = "DW200" - // ServiceObjectiveNameDW2000 ... - ServiceObjectiveNameDW2000 ServiceObjectiveName = "DW2000" - // ServiceObjectiveNameDW2000c ... - ServiceObjectiveNameDW2000c ServiceObjectiveName = "DW2000c" - // ServiceObjectiveNameDW2500c ... - ServiceObjectiveNameDW2500c ServiceObjectiveName = "DW2500c" - // ServiceObjectiveNameDW300 ... - ServiceObjectiveNameDW300 ServiceObjectiveName = "DW300" - // ServiceObjectiveNameDW3000 ... - ServiceObjectiveNameDW3000 ServiceObjectiveName = "DW3000" - // ServiceObjectiveNameDW30000c ... - ServiceObjectiveNameDW30000c ServiceObjectiveName = "DW30000c" - // ServiceObjectiveNameDW3000c ... - ServiceObjectiveNameDW3000c ServiceObjectiveName = "DW3000c" - // ServiceObjectiveNameDW400 ... - ServiceObjectiveNameDW400 ServiceObjectiveName = "DW400" - // ServiceObjectiveNameDW500 ... - ServiceObjectiveNameDW500 ServiceObjectiveName = "DW500" - // ServiceObjectiveNameDW5000c ... - ServiceObjectiveNameDW5000c ServiceObjectiveName = "DW5000c" - // ServiceObjectiveNameDW600 ... - ServiceObjectiveNameDW600 ServiceObjectiveName = "DW600" - // ServiceObjectiveNameDW6000 ... - ServiceObjectiveNameDW6000 ServiceObjectiveName = "DW6000" - // ServiceObjectiveNameDW6000c ... - ServiceObjectiveNameDW6000c ServiceObjectiveName = "DW6000c" - // ServiceObjectiveNameDW7500c ... - ServiceObjectiveNameDW7500c ServiceObjectiveName = "DW7500c" - // ServiceObjectiveNameElasticPool ... - ServiceObjectiveNameElasticPool ServiceObjectiveName = "ElasticPool" - // ServiceObjectiveNameFree ... - ServiceObjectiveNameFree ServiceObjectiveName = "Free" - // ServiceObjectiveNameP1 ... - ServiceObjectiveNameP1 ServiceObjectiveName = "P1" - // ServiceObjectiveNameP11 ... - ServiceObjectiveNameP11 ServiceObjectiveName = "P11" - // ServiceObjectiveNameP15 ... - ServiceObjectiveNameP15 ServiceObjectiveName = "P15" - // ServiceObjectiveNameP2 ... - ServiceObjectiveNameP2 ServiceObjectiveName = "P2" - // ServiceObjectiveNameP3 ... - ServiceObjectiveNameP3 ServiceObjectiveName = "P3" - // ServiceObjectiveNameP4 ... - ServiceObjectiveNameP4 ServiceObjectiveName = "P4" - // ServiceObjectiveNameP6 ... - ServiceObjectiveNameP6 ServiceObjectiveName = "P6" - // ServiceObjectiveNamePRS1 ... - ServiceObjectiveNamePRS1 ServiceObjectiveName = "PRS1" - // ServiceObjectiveNamePRS2 ... - ServiceObjectiveNamePRS2 ServiceObjectiveName = "PRS2" - // ServiceObjectiveNamePRS4 ... - ServiceObjectiveNamePRS4 ServiceObjectiveName = "PRS4" - // ServiceObjectiveNamePRS6 ... - ServiceObjectiveNamePRS6 ServiceObjectiveName = "PRS6" - // ServiceObjectiveNameS0 ... - ServiceObjectiveNameS0 ServiceObjectiveName = "S0" - // ServiceObjectiveNameS1 ... - ServiceObjectiveNameS1 ServiceObjectiveName = "S1" - // ServiceObjectiveNameS12 ... - ServiceObjectiveNameS12 ServiceObjectiveName = "S12" - // ServiceObjectiveNameS2 ... - ServiceObjectiveNameS2 ServiceObjectiveName = "S2" - // ServiceObjectiveNameS3 ... - ServiceObjectiveNameS3 ServiceObjectiveName = "S3" - // ServiceObjectiveNameS4 ... - ServiceObjectiveNameS4 ServiceObjectiveName = "S4" - // ServiceObjectiveNameS6 ... - ServiceObjectiveNameS6 ServiceObjectiveName = "S6" - // ServiceObjectiveNameS7 ... - ServiceObjectiveNameS7 ServiceObjectiveName = "S7" - // ServiceObjectiveNameS9 ... - ServiceObjectiveNameS9 ServiceObjectiveName = "S9" - // ServiceObjectiveNameSystem ... - ServiceObjectiveNameSystem ServiceObjectiveName = "System" - // ServiceObjectiveNameSystem0 ... - ServiceObjectiveNameSystem0 ServiceObjectiveName = "System0" - // ServiceObjectiveNameSystem1 ... - ServiceObjectiveNameSystem1 ServiceObjectiveName = "System1" - // ServiceObjectiveNameSystem2 ... - ServiceObjectiveNameSystem2 ServiceObjectiveName = "System2" - // ServiceObjectiveNameSystem2L ... - ServiceObjectiveNameSystem2L ServiceObjectiveName = "System2L" - // ServiceObjectiveNameSystem3 ... - ServiceObjectiveNameSystem3 ServiceObjectiveName = "System3" - // ServiceObjectiveNameSystem3L ... - ServiceObjectiveNameSystem3L ServiceObjectiveName = "System3L" - // ServiceObjectiveNameSystem4 ... - ServiceObjectiveNameSystem4 ServiceObjectiveName = "System4" - // ServiceObjectiveNameSystem4L ... - ServiceObjectiveNameSystem4L ServiceObjectiveName = "System4L" -) - -// PossibleServiceObjectiveNameValues returns an array of possible values for the ServiceObjectiveName const type. -func PossibleServiceObjectiveNameValues() []ServiceObjectiveName { - return []ServiceObjectiveName{ServiceObjectiveNameBasic, ServiceObjectiveNameDS100, ServiceObjectiveNameDS1000, ServiceObjectiveNameDS1200, ServiceObjectiveNameDS1500, ServiceObjectiveNameDS200, ServiceObjectiveNameDS2000, ServiceObjectiveNameDS300, ServiceObjectiveNameDS400, ServiceObjectiveNameDS500, ServiceObjectiveNameDS600, ServiceObjectiveNameDW100, ServiceObjectiveNameDW1000, ServiceObjectiveNameDW10000c, ServiceObjectiveNameDW1000c, ServiceObjectiveNameDW1200, ServiceObjectiveNameDW1500, ServiceObjectiveNameDW15000c, ServiceObjectiveNameDW1500c, ServiceObjectiveNameDW200, ServiceObjectiveNameDW2000, ServiceObjectiveNameDW2000c, ServiceObjectiveNameDW2500c, ServiceObjectiveNameDW300, ServiceObjectiveNameDW3000, ServiceObjectiveNameDW30000c, ServiceObjectiveNameDW3000c, ServiceObjectiveNameDW400, ServiceObjectiveNameDW500, ServiceObjectiveNameDW5000c, ServiceObjectiveNameDW600, ServiceObjectiveNameDW6000, ServiceObjectiveNameDW6000c, ServiceObjectiveNameDW7500c, ServiceObjectiveNameElasticPool, ServiceObjectiveNameFree, ServiceObjectiveNameP1, ServiceObjectiveNameP11, ServiceObjectiveNameP15, ServiceObjectiveNameP2, ServiceObjectiveNameP3, ServiceObjectiveNameP4, ServiceObjectiveNameP6, ServiceObjectiveNamePRS1, ServiceObjectiveNamePRS2, ServiceObjectiveNamePRS4, ServiceObjectiveNamePRS6, ServiceObjectiveNameS0, ServiceObjectiveNameS1, ServiceObjectiveNameS12, ServiceObjectiveNameS2, ServiceObjectiveNameS3, ServiceObjectiveNameS4, ServiceObjectiveNameS6, ServiceObjectiveNameS7, ServiceObjectiveNameS9, ServiceObjectiveNameSystem, ServiceObjectiveNameSystem0, ServiceObjectiveNameSystem1, ServiceObjectiveNameSystem2, ServiceObjectiveNameSystem2L, ServiceObjectiveNameSystem3, ServiceObjectiveNameSystem3L, ServiceObjectiveNameSystem4, ServiceObjectiveNameSystem4L} -} - -// StorageKeyType enumerates the values for storage key type. -type StorageKeyType string - -const ( - // SharedAccessKey ... - SharedAccessKey StorageKeyType = "SharedAccessKey" - // StorageAccessKey ... - StorageAccessKey StorageKeyType = "StorageAccessKey" -) - -// PossibleStorageKeyTypeValues returns an array of possible values for the StorageKeyType const type. -func PossibleStorageKeyTypeValues() []StorageKeyType { - return []StorageKeyType{SharedAccessKey, StorageAccessKey} -} - -// SyncAgentState enumerates the values for sync agent state. -type SyncAgentState string - -const ( - // SyncAgentStateNeverConnected ... - SyncAgentStateNeverConnected SyncAgentState = "NeverConnected" - // SyncAgentStateOffline ... - SyncAgentStateOffline SyncAgentState = "Offline" - // SyncAgentStateOnline ... - SyncAgentStateOnline SyncAgentState = "Online" -) - -// PossibleSyncAgentStateValues returns an array of possible values for the SyncAgentState const type. -func PossibleSyncAgentStateValues() []SyncAgentState { - return []SyncAgentState{SyncAgentStateNeverConnected, SyncAgentStateOffline, SyncAgentStateOnline} -} - -// SyncConflictResolutionPolicy enumerates the values for sync conflict resolution policy. -type SyncConflictResolutionPolicy string - -const ( - // HubWin ... - HubWin SyncConflictResolutionPolicy = "HubWin" - // MemberWin ... - MemberWin SyncConflictResolutionPolicy = "MemberWin" -) - -// PossibleSyncConflictResolutionPolicyValues returns an array of possible values for the SyncConflictResolutionPolicy const type. -func PossibleSyncConflictResolutionPolicyValues() []SyncConflictResolutionPolicy { - return []SyncConflictResolutionPolicy{HubWin, MemberWin} -} - -// SyncDirection enumerates the values for sync direction. -type SyncDirection string - -const ( - // Bidirectional ... - Bidirectional SyncDirection = "Bidirectional" - // OneWayHubToMember ... - OneWayHubToMember SyncDirection = "OneWayHubToMember" - // OneWayMemberToHub ... - OneWayMemberToHub SyncDirection = "OneWayMemberToHub" -) - -// PossibleSyncDirectionValues returns an array of possible values for the SyncDirection const type. -func PossibleSyncDirectionValues() []SyncDirection { - return []SyncDirection{Bidirectional, OneWayHubToMember, OneWayMemberToHub} -} - -// SyncGroupLogType enumerates the values for sync group log type. -type SyncGroupLogType string - -const ( - // SyncGroupLogTypeAll ... - SyncGroupLogTypeAll SyncGroupLogType = "All" - // SyncGroupLogTypeError ... - SyncGroupLogTypeError SyncGroupLogType = "Error" - // SyncGroupLogTypeSuccess ... - SyncGroupLogTypeSuccess SyncGroupLogType = "Success" - // SyncGroupLogTypeWarning ... - SyncGroupLogTypeWarning SyncGroupLogType = "Warning" -) - -// PossibleSyncGroupLogTypeValues returns an array of possible values for the SyncGroupLogType const type. -func PossibleSyncGroupLogTypeValues() []SyncGroupLogType { - return []SyncGroupLogType{SyncGroupLogTypeAll, SyncGroupLogTypeError, SyncGroupLogTypeSuccess, SyncGroupLogTypeWarning} -} - -// SyncGroupState enumerates the values for sync group state. -type SyncGroupState string - -const ( - // Error ... - Error SyncGroupState = "Error" - // Good ... - Good SyncGroupState = "Good" - // NotReady ... - NotReady SyncGroupState = "NotReady" - // Progressing ... - Progressing SyncGroupState = "Progressing" - // Warning ... - Warning SyncGroupState = "Warning" -) - -// PossibleSyncGroupStateValues returns an array of possible values for the SyncGroupState const type. -func PossibleSyncGroupStateValues() []SyncGroupState { - return []SyncGroupState{Error, Good, NotReady, Progressing, Warning} -} - -// SyncMemberDbType enumerates the values for sync member db type. -type SyncMemberDbType string - -const ( - // AzureSQLDatabase ... - AzureSQLDatabase SyncMemberDbType = "AzureSqlDatabase" - // SQLServerDatabase ... - SQLServerDatabase SyncMemberDbType = "SqlServerDatabase" -) - -// PossibleSyncMemberDbTypeValues returns an array of possible values for the SyncMemberDbType const type. -func PossibleSyncMemberDbTypeValues() []SyncMemberDbType { - return []SyncMemberDbType{AzureSQLDatabase, SQLServerDatabase} -} - -// SyncMemberState enumerates the values for sync member state. -type SyncMemberState string - -const ( - // DeProvisioned ... - DeProvisioned SyncMemberState = "DeProvisioned" - // DeProvisionFailed ... - DeProvisionFailed SyncMemberState = "DeProvisionFailed" - // DeProvisioning ... - DeProvisioning SyncMemberState = "DeProvisioning" - // DisabledBackupRestore ... - DisabledBackupRestore SyncMemberState = "DisabledBackupRestore" - // DisabledTombstoneCleanup ... - DisabledTombstoneCleanup SyncMemberState = "DisabledTombstoneCleanup" - // Provisioned ... - Provisioned SyncMemberState = "Provisioned" - // ProvisionFailed ... - ProvisionFailed SyncMemberState = "ProvisionFailed" - // Provisioning ... - Provisioning SyncMemberState = "Provisioning" - // ReprovisionFailed ... - ReprovisionFailed SyncMemberState = "ReprovisionFailed" - // Reprovisioning ... - Reprovisioning SyncMemberState = "Reprovisioning" - // SyncCancelled ... - SyncCancelled SyncMemberState = "SyncCancelled" - // SyncCancelling ... - SyncCancelling SyncMemberState = "SyncCancelling" - // SyncFailed ... - SyncFailed SyncMemberState = "SyncFailed" - // SyncInProgress ... - SyncInProgress SyncMemberState = "SyncInProgress" - // SyncSucceeded ... - SyncSucceeded SyncMemberState = "SyncSucceeded" - // SyncSucceededWithWarnings ... - SyncSucceededWithWarnings SyncMemberState = "SyncSucceededWithWarnings" - // UnProvisioned ... - UnProvisioned SyncMemberState = "UnProvisioned" - // UnReprovisioned ... - UnReprovisioned SyncMemberState = "UnReprovisioned" -) - -// PossibleSyncMemberStateValues returns an array of possible values for the SyncMemberState const type. -func PossibleSyncMemberStateValues() []SyncMemberState { - return []SyncMemberState{DeProvisioned, DeProvisionFailed, DeProvisioning, DisabledBackupRestore, DisabledTombstoneCleanup, Provisioned, ProvisionFailed, Provisioning, ReprovisionFailed, Reprovisioning, SyncCancelled, SyncCancelling, SyncFailed, SyncInProgress, SyncSucceeded, SyncSucceededWithWarnings, UnProvisioned, UnReprovisioned} -} - -// TransparentDataEncryptionActivityStatus enumerates the values for transparent data encryption activity -// status. -type TransparentDataEncryptionActivityStatus string - -const ( - // Decrypting ... - Decrypting TransparentDataEncryptionActivityStatus = "Decrypting" - // Encrypting ... - Encrypting TransparentDataEncryptionActivityStatus = "Encrypting" -) - -// PossibleTransparentDataEncryptionActivityStatusValues returns an array of possible values for the TransparentDataEncryptionActivityStatus const type. -func PossibleTransparentDataEncryptionActivityStatusValues() []TransparentDataEncryptionActivityStatus { - return []TransparentDataEncryptionActivityStatus{Decrypting, Encrypting} -} - -// TransparentDataEncryptionStatus enumerates the values for transparent data encryption status. -type TransparentDataEncryptionStatus string - -const ( - // TransparentDataEncryptionStatusDisabled ... - TransparentDataEncryptionStatusDisabled TransparentDataEncryptionStatus = "Disabled" - // TransparentDataEncryptionStatusEnabled ... - TransparentDataEncryptionStatusEnabled TransparentDataEncryptionStatus = "Enabled" -) - -// PossibleTransparentDataEncryptionStatusValues returns an array of possible values for the TransparentDataEncryptionStatus const type. -func PossibleTransparentDataEncryptionStatusValues() []TransparentDataEncryptionStatus { - return []TransparentDataEncryptionStatus{TransparentDataEncryptionStatusDisabled, TransparentDataEncryptionStatusEnabled} -} - -// UnitDefinitionType enumerates the values for unit definition type. -type UnitDefinitionType string - -const ( - // UnitDefinitionTypeBytes ... - UnitDefinitionTypeBytes UnitDefinitionType = "Bytes" - // UnitDefinitionTypeBytesPerSecond ... - UnitDefinitionTypeBytesPerSecond UnitDefinitionType = "BytesPerSecond" - // UnitDefinitionTypeCount ... - UnitDefinitionTypeCount UnitDefinitionType = "Count" - // UnitDefinitionTypeCountPerSecond ... - UnitDefinitionTypeCountPerSecond UnitDefinitionType = "CountPerSecond" - // UnitDefinitionTypePercent ... - UnitDefinitionTypePercent UnitDefinitionType = "Percent" - // UnitDefinitionTypeSeconds ... - UnitDefinitionTypeSeconds UnitDefinitionType = "Seconds" -) - -// PossibleUnitDefinitionTypeValues returns an array of possible values for the UnitDefinitionType const type. -func PossibleUnitDefinitionTypeValues() []UnitDefinitionType { - return []UnitDefinitionType{UnitDefinitionTypeBytes, UnitDefinitionTypeBytesPerSecond, UnitDefinitionTypeCount, UnitDefinitionTypeCountPerSecond, UnitDefinitionTypePercent, UnitDefinitionTypeSeconds} -} - -// UnitType enumerates the values for unit type. -type UnitType string - -const ( - // UnitTypeBytes ... - UnitTypeBytes UnitType = "bytes" - // UnitTypeBytesPerSecond ... - UnitTypeBytesPerSecond UnitType = "bytesPerSecond" - // UnitTypeCount ... - UnitTypeCount UnitType = "count" - // UnitTypeCountPerSecond ... - UnitTypeCountPerSecond UnitType = "countPerSecond" - // UnitTypePercent ... - UnitTypePercent UnitType = "percent" - // UnitTypeSeconds ... - UnitTypeSeconds UnitType = "seconds" -) - -// PossibleUnitTypeValues returns an array of possible values for the UnitType const type. -func PossibleUnitTypeValues() []UnitType { - return []UnitType{UnitTypeBytes, UnitTypeBytesPerSecond, UnitTypeCount, UnitTypeCountPerSecond, UnitTypePercent, UnitTypeSeconds} -} - -// VirtualNetworkRuleState enumerates the values for virtual network rule state. -type VirtualNetworkRuleState string - -const ( - // VirtualNetworkRuleStateDeleting ... - VirtualNetworkRuleStateDeleting VirtualNetworkRuleState = "Deleting" - // VirtualNetworkRuleStateInitializing ... - VirtualNetworkRuleStateInitializing VirtualNetworkRuleState = "Initializing" - // VirtualNetworkRuleStateInProgress ... - VirtualNetworkRuleStateInProgress VirtualNetworkRuleState = "InProgress" - // VirtualNetworkRuleStateReady ... - VirtualNetworkRuleStateReady VirtualNetworkRuleState = "Ready" - // VirtualNetworkRuleStateUnknown ... - VirtualNetworkRuleStateUnknown VirtualNetworkRuleState = "Unknown" -) - -// PossibleVirtualNetworkRuleStateValues returns an array of possible values for the VirtualNetworkRuleState const type. -func PossibleVirtualNetworkRuleStateValues() []VirtualNetworkRuleState { - return []VirtualNetworkRuleState{VirtualNetworkRuleStateDeleting, VirtualNetworkRuleStateInitializing, VirtualNetworkRuleStateInProgress, VirtualNetworkRuleStateReady, VirtualNetworkRuleStateUnknown} -} - -// VulnerabilityAssessmentPolicyBaselineName enumerates the values for vulnerability assessment policy baseline -// name. -type VulnerabilityAssessmentPolicyBaselineName string - -const ( - // VulnerabilityAssessmentPolicyBaselineNameDefault ... - VulnerabilityAssessmentPolicyBaselineNameDefault VulnerabilityAssessmentPolicyBaselineName = "default" - // VulnerabilityAssessmentPolicyBaselineNameMaster ... - VulnerabilityAssessmentPolicyBaselineNameMaster VulnerabilityAssessmentPolicyBaselineName = "master" -) - -// PossibleVulnerabilityAssessmentPolicyBaselineNameValues returns an array of possible values for the VulnerabilityAssessmentPolicyBaselineName const type. -func PossibleVulnerabilityAssessmentPolicyBaselineNameValues() []VulnerabilityAssessmentPolicyBaselineName { - return []VulnerabilityAssessmentPolicyBaselineName{VulnerabilityAssessmentPolicyBaselineNameDefault, VulnerabilityAssessmentPolicyBaselineNameMaster} -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/extendeddatabaseblobauditingpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/extendeddatabaseblobauditingpolicies.go deleted file mode 100644 index 690f3cf08d06e..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/extendeddatabaseblobauditingpolicies.go +++ /dev/null @@ -1,319 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ExtendedDatabaseBlobAuditingPoliciesClient is the the Azure SQL Database management API provides a RESTful set of -// web services that interact with Azure SQL Database services to manage your databases. The API enables you to create, -// retrieve, update, and delete databases. -type ExtendedDatabaseBlobAuditingPoliciesClient struct { - BaseClient -} - -// NewExtendedDatabaseBlobAuditingPoliciesClient creates an instance of the ExtendedDatabaseBlobAuditingPoliciesClient -// client. -func NewExtendedDatabaseBlobAuditingPoliciesClient(subscriptionID string) ExtendedDatabaseBlobAuditingPoliciesClient { - return NewExtendedDatabaseBlobAuditingPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewExtendedDatabaseBlobAuditingPoliciesClientWithBaseURI creates an instance of the -// ExtendedDatabaseBlobAuditingPoliciesClient client using a custom endpoint. Use this when interacting with an Azure -// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewExtendedDatabaseBlobAuditingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ExtendedDatabaseBlobAuditingPoliciesClient { - return ExtendedDatabaseBlobAuditingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates an extended database's blob auditing policy. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -// parameters - the extended database blob auditing policy. -func (client ExtendedDatabaseBlobAuditingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ExtendedDatabaseBlobAuditingPolicy) (result ExtendedDatabaseBlobAuditingPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedDatabaseBlobAuditingPoliciesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ExtendedDatabaseBlobAuditingPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ExtendedDatabaseBlobAuditingPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ExtendedDatabaseBlobAuditingPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ExtendedDatabaseBlobAuditingPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ExtendedDatabaseBlobAuditingPolicy) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "blobAuditingPolicyName": autorest.Encode("path", "default"), - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ExtendedDatabaseBlobAuditingPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ExtendedDatabaseBlobAuditingPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ExtendedDatabaseBlobAuditingPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets an extended database's blob auditing policy. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -func (client ExtendedDatabaseBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result ExtendedDatabaseBlobAuditingPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedDatabaseBlobAuditingPoliciesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ExtendedDatabaseBlobAuditingPoliciesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ExtendedDatabaseBlobAuditingPoliciesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ExtendedDatabaseBlobAuditingPoliciesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ExtendedDatabaseBlobAuditingPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "blobAuditingPolicyName": autorest.Encode("path", "default"), - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ExtendedDatabaseBlobAuditingPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ExtendedDatabaseBlobAuditingPoliciesClient) GetResponder(resp *http.Response) (result ExtendedDatabaseBlobAuditingPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByDatabase lists extended auditing settings of a database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -func (client ExtendedDatabaseBlobAuditingPoliciesClient) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result ExtendedDatabaseBlobAuditingPolicyListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedDatabaseBlobAuditingPoliciesClient.ListByDatabase") - defer func() { - sc := -1 - if result.edbaplr.Response.Response != nil { - sc = result.edbaplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByDatabaseNextResults - req, err := client.ListByDatabasePreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ExtendedDatabaseBlobAuditingPoliciesClient", "ListByDatabase", nil, "Failure preparing request") - return - } - - resp, err := client.ListByDatabaseSender(req) - if err != nil { - result.edbaplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ExtendedDatabaseBlobAuditingPoliciesClient", "ListByDatabase", resp, "Failure sending request") - return - } - - result.edbaplr, err = client.ListByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ExtendedDatabaseBlobAuditingPoliciesClient", "ListByDatabase", resp, "Failure responding to request") - return - } - if result.edbaplr.hasNextLink() && result.edbaplr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByDatabasePreparer prepares the ListByDatabase request. -func (client ExtendedDatabaseBlobAuditingPoliciesClient) ListByDatabasePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByDatabaseSender sends the ListByDatabase request. The method will close the -// http.Response Body if it receives an error. -func (client ExtendedDatabaseBlobAuditingPoliciesClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always -// closes the http.Response Body. -func (client ExtendedDatabaseBlobAuditingPoliciesClient) ListByDatabaseResponder(resp *http.Response) (result ExtendedDatabaseBlobAuditingPolicyListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByDatabaseNextResults retrieves the next set of results, if any. -func (client ExtendedDatabaseBlobAuditingPoliciesClient) listByDatabaseNextResults(ctx context.Context, lastResults ExtendedDatabaseBlobAuditingPolicyListResult) (result ExtendedDatabaseBlobAuditingPolicyListResult, err error) { - req, err := lastResults.extendedDatabaseBlobAuditingPolicyListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.ExtendedDatabaseBlobAuditingPoliciesClient", "listByDatabaseNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByDatabaseSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.ExtendedDatabaseBlobAuditingPoliciesClient", "listByDatabaseNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ExtendedDatabaseBlobAuditingPoliciesClient", "listByDatabaseNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByDatabaseComplete enumerates all values, automatically crossing page boundaries as required. -func (client ExtendedDatabaseBlobAuditingPoliciesClient) ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result ExtendedDatabaseBlobAuditingPolicyListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedDatabaseBlobAuditingPoliciesClient.ListByDatabase") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByDatabase(ctx, resourceGroupName, serverName, databaseName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/extendedserverblobauditingpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/extendedserverblobauditingpolicies.go deleted file mode 100644 index a906dae47a882..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/extendedserverblobauditingpolicies.go +++ /dev/null @@ -1,316 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ExtendedServerBlobAuditingPoliciesClient is the the Azure SQL Database management API provides a RESTful set of web -// services that interact with Azure SQL Database services to manage your databases. The API enables you to create, -// retrieve, update, and delete databases. -type ExtendedServerBlobAuditingPoliciesClient struct { - BaseClient -} - -// NewExtendedServerBlobAuditingPoliciesClient creates an instance of the ExtendedServerBlobAuditingPoliciesClient -// client. -func NewExtendedServerBlobAuditingPoliciesClient(subscriptionID string) ExtendedServerBlobAuditingPoliciesClient { - return NewExtendedServerBlobAuditingPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewExtendedServerBlobAuditingPoliciesClientWithBaseURI creates an instance of the -// ExtendedServerBlobAuditingPoliciesClient client using a custom endpoint. Use this when interacting with an Azure -// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewExtendedServerBlobAuditingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ExtendedServerBlobAuditingPoliciesClient { - return ExtendedServerBlobAuditingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates an extended server's blob auditing policy. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// parameters - properties of extended blob auditing policy -func (client ExtendedServerBlobAuditingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ExtendedServerBlobAuditingPolicy) (result ExtendedServerBlobAuditingPoliciesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedServerBlobAuditingPoliciesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ExtendedServerBlobAuditingPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ExtendedServerBlobAuditingPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ExtendedServerBlobAuditingPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, parameters ExtendedServerBlobAuditingPolicy) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "blobAuditingPolicyName": autorest.Encode("path", "default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ExtendedServerBlobAuditingPoliciesClient) CreateOrUpdateSender(req *http.Request) (future ExtendedServerBlobAuditingPoliciesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ExtendedServerBlobAuditingPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ExtendedServerBlobAuditingPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets an extended server's blob auditing policy. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client ExtendedServerBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string) (result ExtendedServerBlobAuditingPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedServerBlobAuditingPoliciesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ExtendedServerBlobAuditingPoliciesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ExtendedServerBlobAuditingPoliciesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ExtendedServerBlobAuditingPoliciesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ExtendedServerBlobAuditingPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "blobAuditingPolicyName": autorest.Encode("path", "default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ExtendedServerBlobAuditingPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ExtendedServerBlobAuditingPoliciesClient) GetResponder(resp *http.Response) (result ExtendedServerBlobAuditingPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer lists extended auditing settings of a server. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client ExtendedServerBlobAuditingPoliciesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result ExtendedServerBlobAuditingPolicyListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedServerBlobAuditingPoliciesClient.ListByServer") - defer func() { - sc := -1 - if result.esbaplr.Response.Response != nil { - sc = result.esbaplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByServerNextResults - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ExtendedServerBlobAuditingPoliciesClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.esbaplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ExtendedServerBlobAuditingPoliciesClient", "ListByServer", resp, "Failure sending request") - return - } - - result.esbaplr, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ExtendedServerBlobAuditingPoliciesClient", "ListByServer", resp, "Failure responding to request") - return - } - if result.esbaplr.hasNextLink() && result.esbaplr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client ExtendedServerBlobAuditingPoliciesClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client ExtendedServerBlobAuditingPoliciesClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client ExtendedServerBlobAuditingPoliciesClient) ListByServerResponder(resp *http.Response) (result ExtendedServerBlobAuditingPolicyListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByServerNextResults retrieves the next set of results, if any. -func (client ExtendedServerBlobAuditingPoliciesClient) listByServerNextResults(ctx context.Context, lastResults ExtendedServerBlobAuditingPolicyListResult) (result ExtendedServerBlobAuditingPolicyListResult, err error) { - req, err := lastResults.extendedServerBlobAuditingPolicyListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.ExtendedServerBlobAuditingPoliciesClient", "listByServerNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.ExtendedServerBlobAuditingPoliciesClient", "listByServerNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ExtendedServerBlobAuditingPoliciesClient", "listByServerNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. -func (client ExtendedServerBlobAuditingPoliciesClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result ExtendedServerBlobAuditingPolicyListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedServerBlobAuditingPoliciesClient.ListByServer") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByServer(ctx, resourceGroupName, serverName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/failovergroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/failovergroups.go deleted file mode 100644 index bab986e12e9ef..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/failovergroups.go +++ /dev/null @@ -1,658 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// FailoverGroupsClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type FailoverGroupsClient struct { - BaseClient -} - -// NewFailoverGroupsClient creates an instance of the FailoverGroupsClient client. -func NewFailoverGroupsClient(subscriptionID string) FailoverGroupsClient { - return NewFailoverGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewFailoverGroupsClientWithBaseURI creates an instance of the FailoverGroupsClient client using a custom endpoint. -// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewFailoverGroupsClientWithBaseURI(baseURI string, subscriptionID string) FailoverGroupsClient { - return FailoverGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a failover group. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server containing the failover group. -// failoverGroupName - the name of the failover group. -// parameters - the failover group parameters. -func (client FailoverGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, parameters FailoverGroup) (result FailoverGroupsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FailoverGroupsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.FailoverGroupProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.FailoverGroupProperties.ReadWriteEndpoint", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.FailoverGroupProperties.PartnerServers", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("sql.FailoverGroupsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, failoverGroupName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client FailoverGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, parameters FailoverGroup) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "failoverGroupName": autorest.Encode("path", failoverGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Location = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client FailoverGroupsClient) CreateOrUpdateSender(req *http.Request) (future FailoverGroupsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client FailoverGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result FailoverGroup, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a failover group. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server containing the failover group. -// failoverGroupName - the name of the failover group. -func (client FailoverGroupsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string) (result FailoverGroupsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FailoverGroupsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, failoverGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client FailoverGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "failoverGroupName": autorest.Encode("path", failoverGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client FailoverGroupsClient) DeleteSender(req *http.Request) (future FailoverGroupsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client FailoverGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Failover fails over from the current primary server to this server. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server containing the failover group. -// failoverGroupName - the name of the failover group. -func (client FailoverGroupsClient) Failover(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string) (result FailoverGroupsFailoverFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FailoverGroupsClient.Failover") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.FailoverPreparer(ctx, resourceGroupName, serverName, failoverGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "Failover", nil, "Failure preparing request") - return - } - - result, err = client.FailoverSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "Failover", result.Response(), "Failure sending request") - return - } - - return -} - -// FailoverPreparer prepares the Failover request. -func (client FailoverGroupsClient) FailoverPreparer(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "failoverGroupName": autorest.Encode("path", failoverGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/failover", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// FailoverSender sends the Failover request. The method will close the -// http.Response Body if it receives an error. -func (client FailoverGroupsClient) FailoverSender(req *http.Request) (future FailoverGroupsFailoverFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// FailoverResponder handles the response to the Failover request. The method always -// closes the http.Response Body. -func (client FailoverGroupsClient) FailoverResponder(resp *http.Response) (result FailoverGroup, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ForceFailoverAllowDataLoss fails over from the current primary server to this server. This operation might result in -// data loss. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server containing the failover group. -// failoverGroupName - the name of the failover group. -func (client FailoverGroupsClient) ForceFailoverAllowDataLoss(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string) (result FailoverGroupsForceFailoverAllowDataLossFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FailoverGroupsClient.ForceFailoverAllowDataLoss") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ForceFailoverAllowDataLossPreparer(ctx, resourceGroupName, serverName, failoverGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "ForceFailoverAllowDataLoss", nil, "Failure preparing request") - return - } - - result, err = client.ForceFailoverAllowDataLossSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "ForceFailoverAllowDataLoss", result.Response(), "Failure sending request") - return - } - - return -} - -// ForceFailoverAllowDataLossPreparer prepares the ForceFailoverAllowDataLoss request. -func (client FailoverGroupsClient) ForceFailoverAllowDataLossPreparer(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "failoverGroupName": autorest.Encode("path", failoverGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/forceFailoverAllowDataLoss", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ForceFailoverAllowDataLossSender sends the ForceFailoverAllowDataLoss request. The method will close the -// http.Response Body if it receives an error. -func (client FailoverGroupsClient) ForceFailoverAllowDataLossSender(req *http.Request) (future FailoverGroupsForceFailoverAllowDataLossFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ForceFailoverAllowDataLossResponder handles the response to the ForceFailoverAllowDataLoss request. The method always -// closes the http.Response Body. -func (client FailoverGroupsClient) ForceFailoverAllowDataLossResponder(resp *http.Response) (result FailoverGroup, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets a failover group. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server containing the failover group. -// failoverGroupName - the name of the failover group. -func (client FailoverGroupsClient) Get(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string) (result FailoverGroup, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FailoverGroupsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, failoverGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client FailoverGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "failoverGroupName": autorest.Encode("path", failoverGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client FailoverGroupsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client FailoverGroupsClient) GetResponder(resp *http.Response) (result FailoverGroup, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer lists the failover groups in a server. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server containing the failover group. -func (client FailoverGroupsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result FailoverGroupListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FailoverGroupsClient.ListByServer") - defer func() { - sc := -1 - if result.fglr.Response.Response != nil { - sc = result.fglr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByServerNextResults - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.fglr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "ListByServer", resp, "Failure sending request") - return - } - - result.fglr, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "ListByServer", resp, "Failure responding to request") - return - } - if result.fglr.hasNextLink() && result.fglr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client FailoverGroupsClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client FailoverGroupsClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client FailoverGroupsClient) ListByServerResponder(resp *http.Response) (result FailoverGroupListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByServerNextResults retrieves the next set of results, if any. -func (client FailoverGroupsClient) listByServerNextResults(ctx context.Context, lastResults FailoverGroupListResult) (result FailoverGroupListResult, err error) { - req, err := lastResults.failoverGroupListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "listByServerNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "listByServerNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "listByServerNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. -func (client FailoverGroupsClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result FailoverGroupListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FailoverGroupsClient.ListByServer") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByServer(ctx, resourceGroupName, serverName) - return -} - -// Update updates a failover group. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server containing the failover group. -// failoverGroupName - the name of the failover group. -// parameters - the failover group parameters. -func (client FailoverGroupsClient) Update(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, parameters FailoverGroupUpdate) (result FailoverGroupsUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FailoverGroupsClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, serverName, failoverGroupName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client FailoverGroupsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, parameters FailoverGroupUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "failoverGroupName": autorest.Encode("path", failoverGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client FailoverGroupsClient) UpdateSender(req *http.Request) (future FailoverGroupsUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client FailoverGroupsClient) UpdateResponder(resp *http.Response) (result FailoverGroup, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/firewallrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/firewallrules.go deleted file mode 100644 index 3e79a6b3933ce..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/firewallrules.go +++ /dev/null @@ -1,361 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// FirewallRulesClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type FirewallRulesClient struct { - BaseClient -} - -// NewFirewallRulesClient creates an instance of the FirewallRulesClient client. -func NewFirewallRulesClient(subscriptionID string) FirewallRulesClient { - return NewFirewallRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client using a custom endpoint. -// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) FirewallRulesClient { - return FirewallRulesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a firewall rule. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// firewallRuleName - the name of the firewall rule. -// parameters - the required parameters for creating or updating a firewall rule. -func (client FirewallRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, parameters FirewallRule) (result FirewallRule, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.FirewallRuleProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.FirewallRuleProperties.StartIPAddress", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.FirewallRuleProperties.EndIPAddress", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("sql.FirewallRulesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, firewallRuleName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FirewallRulesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.FirewallRulesClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FirewallRulesClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client FirewallRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, parameters FirewallRule) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "firewallRuleName": autorest.Encode("path", firewallRuleName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Kind = nil - parameters.Location = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client FirewallRulesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client FirewallRulesClient) CreateOrUpdateResponder(resp *http.Response) (result FirewallRule, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a firewall rule. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// firewallRuleName - the name of the firewall rule. -func (client FirewallRulesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, firewallRuleName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FirewallRulesClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.FirewallRulesClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FirewallRulesClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client FirewallRulesClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "firewallRuleName": autorest.Encode("path", firewallRuleName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client FirewallRulesClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client FirewallRulesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a firewall rule. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// firewallRuleName - the name of the firewall rule. -func (client FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string) (result FirewallRule, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, firewallRuleName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FirewallRulesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.FirewallRulesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FirewallRulesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client FirewallRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "firewallRuleName": autorest.Encode("path", firewallRuleName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client FirewallRulesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client FirewallRulesClient) GetResponder(resp *http.Response) (result FirewallRule, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer returns a list of firewall rules. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client FirewallRulesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result FirewallRuleListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.ListByServer") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FirewallRulesClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.FirewallRulesClient", "ListByServer", resp, "Failure sending request") - return - } - - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FirewallRulesClient", "ListByServer", resp, "Failure responding to request") - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client FirewallRulesClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client FirewallRulesClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client FirewallRulesClient) ListByServerResponder(resp *http.Response) (result FirewallRuleListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/geobackuppolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/geobackuppolicies.go deleted file mode 100644 index 605603cc5f041..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/geobackuppolicies.go +++ /dev/null @@ -1,285 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// GeoBackupPoliciesClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type GeoBackupPoliciesClient struct { - BaseClient -} - -// NewGeoBackupPoliciesClient creates an instance of the GeoBackupPoliciesClient client. -func NewGeoBackupPoliciesClient(subscriptionID string) GeoBackupPoliciesClient { - return NewGeoBackupPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewGeoBackupPoliciesClientWithBaseURI creates an instance of the GeoBackupPoliciesClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewGeoBackupPoliciesClientWithBaseURI(baseURI string, subscriptionID string) GeoBackupPoliciesClient { - return GeoBackupPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate updates a database geo backup policy. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -// parameters - the required parameters for creating or updating the geo backup policy. -func (client GeoBackupPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters GeoBackupPolicy) (result GeoBackupPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GeoBackupPoliciesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.GeoBackupPolicyProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("sql.GeoBackupPoliciesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.GeoBackupPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.GeoBackupPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.GeoBackupPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client GeoBackupPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters GeoBackupPolicy) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "geoBackupPolicyName": autorest.Encode("path", "Default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Kind = nil - parameters.Location = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies/{geoBackupPolicyName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client GeoBackupPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client GeoBackupPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result GeoBackupPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets a geo backup policy. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -func (client GeoBackupPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result GeoBackupPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GeoBackupPoliciesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.GeoBackupPoliciesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.GeoBackupPoliciesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.GeoBackupPoliciesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client GeoBackupPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "geoBackupPolicyName": autorest.Encode("path", "Default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies/{geoBackupPolicyName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client GeoBackupPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client GeoBackupPoliciesClient) GetResponder(resp *http.Response) (result GeoBackupPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByDatabase returns a list of geo backup policies. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -func (client GeoBackupPoliciesClient) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result GeoBackupPolicyListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GeoBackupPoliciesClient.ListByDatabase") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListByDatabasePreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.GeoBackupPoliciesClient", "ListByDatabase", nil, "Failure preparing request") - return - } - - resp, err := client.ListByDatabaseSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.GeoBackupPoliciesClient", "ListByDatabase", resp, "Failure sending request") - return - } - - result, err = client.ListByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.GeoBackupPoliciesClient", "ListByDatabase", resp, "Failure responding to request") - return - } - - return -} - -// ListByDatabasePreparer prepares the ListByDatabase request. -func (client GeoBackupPoliciesClient) ListByDatabasePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByDatabaseSender sends the ListByDatabase request. The method will close the -// http.Response Body if it receives an error. -func (client GeoBackupPoliciesClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always -// closes the http.Response Body. -func (client GeoBackupPoliciesClient) ListByDatabaseResponder(resp *http.Response) (result GeoBackupPolicyListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobagents.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobagents.go deleted file mode 100644 index ac60892a93879..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobagents.go +++ /dev/null @@ -1,492 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// JobAgentsClient is the the Azure SQL Database management API provides a RESTful set of web services that interact -// with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and -// delete databases. -type JobAgentsClient struct { - BaseClient -} - -// NewJobAgentsClient creates an instance of the JobAgentsClient client. -func NewJobAgentsClient(subscriptionID string) JobAgentsClient { - return NewJobAgentsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewJobAgentsClientWithBaseURI creates an instance of the JobAgentsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewJobAgentsClientWithBaseURI(baseURI string, subscriptionID string) JobAgentsClient { - return JobAgentsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a job agent. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent to be created or updated. -// parameters - the requested job agent resource state. -func (client JobAgentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, parameters JobAgent) (result JobAgentsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobAgentsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Sku.Name", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.JobAgentProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.JobAgentProperties.DatabaseID", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("sql.JobAgentsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, jobAgentName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobAgentsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobAgentsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client JobAgentsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, parameters JobAgent) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client JobAgentsClient) CreateOrUpdateSender(req *http.Request) (future JobAgentsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client JobAgentsClient) CreateOrUpdateResponder(resp *http.Response) (result JobAgent, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a job agent. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent to be deleted. -func (client JobAgentsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result JobAgentsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobAgentsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, jobAgentName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobAgentsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobAgentsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client JobAgentsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client JobAgentsClient) DeleteSender(req *http.Request) (future JobAgentsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client JobAgentsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a job agent. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent to be retrieved. -func (client JobAgentsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result JobAgent, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobAgentsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, jobAgentName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobAgentsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobAgentsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobAgentsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client JobAgentsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client JobAgentsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client JobAgentsClient) GetResponder(resp *http.Response) (result JobAgent, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer gets a list of job agents in a server. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client JobAgentsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result JobAgentListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobAgentsClient.ListByServer") - defer func() { - sc := -1 - if result.jalr.Response.Response != nil { - sc = result.jalr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByServerNextResults - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobAgentsClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.jalr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobAgentsClient", "ListByServer", resp, "Failure sending request") - return - } - - result.jalr, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobAgentsClient", "ListByServer", resp, "Failure responding to request") - return - } - if result.jalr.hasNextLink() && result.jalr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client JobAgentsClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client JobAgentsClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client JobAgentsClient) ListByServerResponder(resp *http.Response) (result JobAgentListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByServerNextResults retrieves the next set of results, if any. -func (client JobAgentsClient) listByServerNextResults(ctx context.Context, lastResults JobAgentListResult) (result JobAgentListResult, err error) { - req, err := lastResults.jobAgentListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.JobAgentsClient", "listByServerNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.JobAgentsClient", "listByServerNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobAgentsClient", "listByServerNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. -func (client JobAgentsClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result JobAgentListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobAgentsClient.ListByServer") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByServer(ctx, resourceGroupName, serverName) - return -} - -// Update updates a job agent. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent to be updated. -// parameters - the update to the job agent. -func (client JobAgentsClient) Update(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, parameters JobAgentUpdate) (result JobAgentsUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobAgentsClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, serverName, jobAgentName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobAgentsClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobAgentsClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client JobAgentsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, parameters JobAgentUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client JobAgentsClient) UpdateSender(req *http.Request) (future JobAgentsUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client JobAgentsClient) UpdateResponder(resp *http.Response) (result JobAgent, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobcredentials.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobcredentials.go deleted file mode 100644 index 883242aa68450..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobcredentials.go +++ /dev/null @@ -1,409 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// JobCredentialsClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type JobCredentialsClient struct { - BaseClient -} - -// NewJobCredentialsClient creates an instance of the JobCredentialsClient client. -func NewJobCredentialsClient(subscriptionID string) JobCredentialsClient { - return NewJobCredentialsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewJobCredentialsClientWithBaseURI creates an instance of the JobCredentialsClient client using a custom endpoint. -// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewJobCredentialsClientWithBaseURI(baseURI string, subscriptionID string) JobCredentialsClient { - return JobCredentialsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a job credential. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// credentialName - the name of the credential. -// parameters - the requested job credential state. -func (client JobCredentialsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, credentialName string, parameters JobCredential) (result JobCredential, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobCredentialsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.JobCredentialProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.JobCredentialProperties.Username", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.JobCredentialProperties.Password", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("sql.JobCredentialsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, jobAgentName, credentialName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client JobCredentialsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, credentialName string, parameters JobCredential) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "credentialName": autorest.Encode("path", credentialName), - "jobAgentName": autorest.Encode("path", jobAgentName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client JobCredentialsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client JobCredentialsClient) CreateOrUpdateResponder(resp *http.Response) (result JobCredential, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a job credential. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// credentialName - the name of the credential. -func (client JobCredentialsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, credentialName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobCredentialsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, jobAgentName, credentialName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client JobCredentialsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, credentialName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "credentialName": autorest.Encode("path", credentialName), - "jobAgentName": autorest.Encode("path", jobAgentName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client JobCredentialsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client JobCredentialsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a jobs credential. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// credentialName - the name of the credential. -func (client JobCredentialsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, credentialName string) (result JobCredential, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobCredentialsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, jobAgentName, credentialName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client JobCredentialsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, credentialName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "credentialName": autorest.Encode("path", credentialName), - "jobAgentName": autorest.Encode("path", jobAgentName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client JobCredentialsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client JobCredentialsClient) GetResponder(resp *http.Response) (result JobCredential, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByAgent gets a list of jobs credentials. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -func (client JobCredentialsClient) ListByAgent(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result JobCredentialListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobCredentialsClient.ListByAgent") - defer func() { - sc := -1 - if result.jclr.Response.Response != nil { - sc = result.jclr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByAgentNextResults - req, err := client.ListByAgentPreparer(ctx, resourceGroupName, serverName, jobAgentName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "ListByAgent", nil, "Failure preparing request") - return - } - - resp, err := client.ListByAgentSender(req) - if err != nil { - result.jclr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "ListByAgent", resp, "Failure sending request") - return - } - - result.jclr, err = client.ListByAgentResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "ListByAgent", resp, "Failure responding to request") - return - } - if result.jclr.hasNextLink() && result.jclr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByAgentPreparer prepares the ListByAgent request. -func (client JobCredentialsClient) ListByAgentPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByAgentSender sends the ListByAgent request. The method will close the -// http.Response Body if it receives an error. -func (client JobCredentialsClient) ListByAgentSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByAgentResponder handles the response to the ListByAgent request. The method always -// closes the http.Response Body. -func (client JobCredentialsClient) ListByAgentResponder(resp *http.Response) (result JobCredentialListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByAgentNextResults retrieves the next set of results, if any. -func (client JobCredentialsClient) listByAgentNextResults(ctx context.Context, lastResults JobCredentialListResult) (result JobCredentialListResult, err error) { - req, err := lastResults.jobCredentialListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "listByAgentNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByAgentSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "listByAgentNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByAgentResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "listByAgentNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByAgentComplete enumerates all values, automatically crossing page boundaries as required. -func (client JobCredentialsClient) ListByAgentComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result JobCredentialListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobCredentialsClient.ListByAgent") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByAgent(ctx, resourceGroupName, serverName, jobAgentName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobexecutions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobexecutions.go deleted file mode 100644 index c4bb7d6af6c9b..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobexecutions.go +++ /dev/null @@ -1,670 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/date" - "github.com/Azure/go-autorest/tracing" - "github.com/gofrs/uuid" - "net/http" -) - -// JobExecutionsClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type JobExecutionsClient struct { - BaseClient -} - -// NewJobExecutionsClient creates an instance of the JobExecutionsClient client. -func NewJobExecutionsClient(subscriptionID string) JobExecutionsClient { - return NewJobExecutionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewJobExecutionsClientWithBaseURI creates an instance of the JobExecutionsClient client using a custom endpoint. -// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewJobExecutionsClientWithBaseURI(baseURI string, subscriptionID string) JobExecutionsClient { - return JobExecutionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Cancel requests cancellation of a job execution. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// jobName - the name of the job. -// jobExecutionID - the id of the job execution to cancel. -func (client JobExecutionsClient) Cancel(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobExecutionsClient.Cancel") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CancelPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "Cancel", nil, "Failure preparing request") - return - } - - resp, err := client.CancelSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "Cancel", resp, "Failure sending request") - return - } - - result, err = client.CancelResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "Cancel", resp, "Failure responding to request") - return - } - - return -} - -// CancelPreparer prepares the Cancel request. -func (client JobExecutionsClient) CancelPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "jobExecutionId": autorest.Encode("path", jobExecutionID), - "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/cancel", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CancelSender sends the Cancel request. The method will close the -// http.Response Body if it receives an error. -func (client JobExecutionsClient) CancelSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CancelResponder handles the response to the Cancel request. The method always -// closes the http.Response Body. -func (client JobExecutionsClient) CancelResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// Create starts an elastic job execution. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// jobName - the name of the job to get. -func (client JobExecutionsClient) Create(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result JobExecutionsCreateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobExecutionsClient.Create") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreatePreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "Create", nil, "Failure preparing request") - return - } - - result, err = client.CreateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "Create", result.Response(), "Failure sending request") - return - } - - return -} - -// CreatePreparer prepares the Create request. -func (client JobExecutionsClient) CreatePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/start", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateSender sends the Create request. The method will close the -// http.Response Body if it receives an error. -func (client JobExecutionsClient) CreateSender(req *http.Request) (future JobExecutionsCreateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateResponder handles the response to the Create request. The method always -// closes the http.Response Body. -func (client JobExecutionsClient) CreateResponder(resp *http.Response) (result JobExecution, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// CreateOrUpdate creates or updates a job execution. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// jobName - the name of the job to get. -// jobExecutionID - the job execution id to create the job execution under. -func (client JobExecutionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID) (result JobExecutionsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobExecutionsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client JobExecutionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "jobExecutionId": autorest.Encode("path", jobExecutionID), - "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client JobExecutionsClient) CreateOrUpdateSender(req *http.Request) (future JobExecutionsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client JobExecutionsClient) CreateOrUpdateResponder(resp *http.Response) (result JobExecution, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets a job execution. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// jobName - the name of the job. -// jobExecutionID - the id of the job execution -func (client JobExecutionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID) (result JobExecution, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobExecutionsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client JobExecutionsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "jobExecutionId": autorest.Encode("path", jobExecutionID), - "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client JobExecutionsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client JobExecutionsClient) GetResponder(resp *http.Response) (result JobExecution, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByAgent lists all executions in a job agent. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// createTimeMin - if specified, only job executions created at or after the specified time are included. -// createTimeMax - if specified, only job executions created before the specified time are included. -// endTimeMin - if specified, only job executions completed at or after the specified time are included. -// endTimeMax - if specified, only job executions completed before the specified time are included. -// isActive - if specified, only active or only completed job executions are included. -// skip - the number of elements in the collection to skip. -// top - the number of elements to return from the collection. -func (client JobExecutionsClient) ListByAgent(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result JobExecutionListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobExecutionsClient.ListByAgent") - defer func() { - sc := -1 - if result.jelr.Response.Response != nil { - sc = result.jelr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByAgentNextResults - req, err := client.ListByAgentPreparer(ctx, resourceGroupName, serverName, jobAgentName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "ListByAgent", nil, "Failure preparing request") - return - } - - resp, err := client.ListByAgentSender(req) - if err != nil { - result.jelr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "ListByAgent", resp, "Failure sending request") - return - } - - result.jelr, err = client.ListByAgentResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "ListByAgent", resp, "Failure responding to request") - return - } - if result.jelr.hasNextLink() && result.jelr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByAgentPreparer prepares the ListByAgent request. -func (client JobExecutionsClient) ListByAgentPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if createTimeMin != nil { - queryParameters["createTimeMin"] = autorest.Encode("query", *createTimeMin) - } - if createTimeMax != nil { - queryParameters["createTimeMax"] = autorest.Encode("query", *createTimeMax) - } - if endTimeMin != nil { - queryParameters["endTimeMin"] = autorest.Encode("query", *endTimeMin) - } - if endTimeMax != nil { - queryParameters["endTimeMax"] = autorest.Encode("query", *endTimeMax) - } - if isActive != nil { - queryParameters["isActive"] = autorest.Encode("query", *isActive) - } - if skip != nil { - queryParameters["$skip"] = autorest.Encode("query", *skip) - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/executions", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByAgentSender sends the ListByAgent request. The method will close the -// http.Response Body if it receives an error. -func (client JobExecutionsClient) ListByAgentSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByAgentResponder handles the response to the ListByAgent request. The method always -// closes the http.Response Body. -func (client JobExecutionsClient) ListByAgentResponder(resp *http.Response) (result JobExecutionListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByAgentNextResults retrieves the next set of results, if any. -func (client JobExecutionsClient) listByAgentNextResults(ctx context.Context, lastResults JobExecutionListResult) (result JobExecutionListResult, err error) { - req, err := lastResults.jobExecutionListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "listByAgentNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByAgentSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "listByAgentNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByAgentResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "listByAgentNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByAgentComplete enumerates all values, automatically crossing page boundaries as required. -func (client JobExecutionsClient) ListByAgentComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result JobExecutionListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobExecutionsClient.ListByAgent") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByAgent(ctx, resourceGroupName, serverName, jobAgentName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top) - return -} - -// ListByJob lists a job's executions. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// jobName - the name of the job to get. -// createTimeMin - if specified, only job executions created at or after the specified time are included. -// createTimeMax - if specified, only job executions created before the specified time are included. -// endTimeMin - if specified, only job executions completed at or after the specified time are included. -// endTimeMax - if specified, only job executions completed before the specified time are included. -// isActive - if specified, only active or only completed job executions are included. -// skip - the number of elements in the collection to skip. -// top - the number of elements to return from the collection. -func (client JobExecutionsClient) ListByJob(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result JobExecutionListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobExecutionsClient.ListByJob") - defer func() { - sc := -1 - if result.jelr.Response.Response != nil { - sc = result.jelr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByJobNextResults - req, err := client.ListByJobPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "ListByJob", nil, "Failure preparing request") - return - } - - resp, err := client.ListByJobSender(req) - if err != nil { - result.jelr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "ListByJob", resp, "Failure sending request") - return - } - - result.jelr, err = client.ListByJobResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "ListByJob", resp, "Failure responding to request") - return - } - if result.jelr.hasNextLink() && result.jelr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByJobPreparer prepares the ListByJob request. -func (client JobExecutionsClient) ListByJobPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if createTimeMin != nil { - queryParameters["createTimeMin"] = autorest.Encode("query", *createTimeMin) - } - if createTimeMax != nil { - queryParameters["createTimeMax"] = autorest.Encode("query", *createTimeMax) - } - if endTimeMin != nil { - queryParameters["endTimeMin"] = autorest.Encode("query", *endTimeMin) - } - if endTimeMax != nil { - queryParameters["endTimeMax"] = autorest.Encode("query", *endTimeMax) - } - if isActive != nil { - queryParameters["isActive"] = autorest.Encode("query", *isActive) - } - if skip != nil { - queryParameters["$skip"] = autorest.Encode("query", *skip) - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByJobSender sends the ListByJob request. The method will close the -// http.Response Body if it receives an error. -func (client JobExecutionsClient) ListByJobSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByJobResponder handles the response to the ListByJob request. The method always -// closes the http.Response Body. -func (client JobExecutionsClient) ListByJobResponder(resp *http.Response) (result JobExecutionListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByJobNextResults retrieves the next set of results, if any. -func (client JobExecutionsClient) listByJobNextResults(ctx context.Context, lastResults JobExecutionListResult) (result JobExecutionListResult, err error) { - req, err := lastResults.jobExecutionListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "listByJobNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByJobSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "listByJobNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByJobResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "listByJobNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByJobComplete enumerates all values, automatically crossing page boundaries as required. -func (client JobExecutionsClient) ListByJobComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result JobExecutionListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobExecutionsClient.ListByJob") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByJob(ctx, resourceGroupName, serverName, jobAgentName, jobName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobs.go deleted file mode 100644 index 457236877e18f..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobs.go +++ /dev/null @@ -1,399 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// JobsClient is the the Azure SQL Database management API provides a RESTful set of web services that interact with -// Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and delete -// databases. -type JobsClient struct { - BaseClient -} - -// NewJobsClient creates an instance of the JobsClient client. -func NewJobsClient(subscriptionID string) JobsClient { - return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewJobsClientWithBaseURI creates an instance of the JobsClient client using a custom endpoint. Use this when -// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewJobsClientWithBaseURI(baseURI string, subscriptionID string) JobsClient { - return JobsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a job. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// jobName - the name of the job to get. -// parameters - the requested job state. -func (client JobsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, parameters Job) (result Job, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client JobsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, parameters Job) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client JobsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client JobsClient) CreateOrUpdateResponder(resp *http.Response) (result Job, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a job. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// jobName - the name of the job to delete. -func (client JobsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.JobsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client JobsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client JobsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client JobsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a job. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// jobName - the name of the job to get. -func (client JobsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result Job, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client JobsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client JobsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client JobsClient) GetResponder(resp *http.Response) (result Job, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByAgent gets a list of jobs. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -func (client JobsClient) ListByAgent(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result JobListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobsClient.ListByAgent") - defer func() { - sc := -1 - if result.jlr.Response.Response != nil { - sc = result.jlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByAgentNextResults - req, err := client.ListByAgentPreparer(ctx, resourceGroupName, serverName, jobAgentName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobsClient", "ListByAgent", nil, "Failure preparing request") - return - } - - resp, err := client.ListByAgentSender(req) - if err != nil { - result.jlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobsClient", "ListByAgent", resp, "Failure sending request") - return - } - - result.jlr, err = client.ListByAgentResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobsClient", "ListByAgent", resp, "Failure responding to request") - return - } - if result.jlr.hasNextLink() && result.jlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByAgentPreparer prepares the ListByAgent request. -func (client JobsClient) ListByAgentPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByAgentSender sends the ListByAgent request. The method will close the -// http.Response Body if it receives an error. -func (client JobsClient) ListByAgentSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByAgentResponder handles the response to the ListByAgent request. The method always -// closes the http.Response Body. -func (client JobsClient) ListByAgentResponder(resp *http.Response) (result JobListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByAgentNextResults retrieves the next set of results, if any. -func (client JobsClient) listByAgentNextResults(ctx context.Context, lastResults JobListResult) (result JobListResult, err error) { - req, err := lastResults.jobListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.JobsClient", "listByAgentNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByAgentSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.JobsClient", "listByAgentNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByAgentResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobsClient", "listByAgentNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByAgentComplete enumerates all values, automatically crossing page boundaries as required. -func (client JobsClient) ListByAgentComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result JobListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobsClient.ListByAgent") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByAgent(ctx, resourceGroupName, serverName, jobAgentName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobstepexecutions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobstepexecutions.go deleted file mode 100644 index d01dc77a65eeb..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobstepexecutions.go +++ /dev/null @@ -1,274 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/date" - "github.com/Azure/go-autorest/tracing" - "github.com/gofrs/uuid" - "net/http" -) - -// JobStepExecutionsClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type JobStepExecutionsClient struct { - BaseClient -} - -// NewJobStepExecutionsClient creates an instance of the JobStepExecutionsClient client. -func NewJobStepExecutionsClient(subscriptionID string) JobStepExecutionsClient { - return NewJobStepExecutionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewJobStepExecutionsClientWithBaseURI creates an instance of the JobStepExecutionsClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewJobStepExecutionsClientWithBaseURI(baseURI string, subscriptionID string) JobStepExecutionsClient { - return JobStepExecutionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets a step execution of a job execution. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// jobName - the name of the job to get. -// jobExecutionID - the unique id of the job execution -// stepName - the name of the step. -func (client JobStepExecutionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, stepName string) (result JobExecution, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobStepExecutionsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID, stepName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobStepExecutionsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobStepExecutionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobStepExecutionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client JobStepExecutionsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, stepName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "jobExecutionId": autorest.Encode("path", jobExecutionID), - "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "stepName": autorest.Encode("path", stepName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client JobStepExecutionsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client JobStepExecutionsClient) GetResponder(resp *http.Response) (result JobExecution, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByJobExecution lists the step executions of a job execution. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// jobName - the name of the job to get. -// jobExecutionID - the id of the job execution -// createTimeMin - if specified, only job executions created at or after the specified time are included. -// createTimeMax - if specified, only job executions created before the specified time are included. -// endTimeMin - if specified, only job executions completed at or after the specified time are included. -// endTimeMax - if specified, only job executions completed before the specified time are included. -// isActive - if specified, only active or only completed job executions are included. -// skip - the number of elements in the collection to skip. -// top - the number of elements to return from the collection. -func (client JobStepExecutionsClient) ListByJobExecution(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result JobExecutionListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobStepExecutionsClient.ListByJobExecution") - defer func() { - sc := -1 - if result.jelr.Response.Response != nil { - sc = result.jelr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByJobExecutionNextResults - req, err := client.ListByJobExecutionPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobStepExecutionsClient", "ListByJobExecution", nil, "Failure preparing request") - return - } - - resp, err := client.ListByJobExecutionSender(req) - if err != nil { - result.jelr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobStepExecutionsClient", "ListByJobExecution", resp, "Failure sending request") - return - } - - result.jelr, err = client.ListByJobExecutionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobStepExecutionsClient", "ListByJobExecution", resp, "Failure responding to request") - return - } - if result.jelr.hasNextLink() && result.jelr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByJobExecutionPreparer prepares the ListByJobExecution request. -func (client JobStepExecutionsClient) ListByJobExecutionPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "jobExecutionId": autorest.Encode("path", jobExecutionID), - "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if createTimeMin != nil { - queryParameters["createTimeMin"] = autorest.Encode("query", *createTimeMin) - } - if createTimeMax != nil { - queryParameters["createTimeMax"] = autorest.Encode("query", *createTimeMax) - } - if endTimeMin != nil { - queryParameters["endTimeMin"] = autorest.Encode("query", *endTimeMin) - } - if endTimeMax != nil { - queryParameters["endTimeMax"] = autorest.Encode("query", *endTimeMax) - } - if isActive != nil { - queryParameters["isActive"] = autorest.Encode("query", *isActive) - } - if skip != nil { - queryParameters["$skip"] = autorest.Encode("query", *skip) - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByJobExecutionSender sends the ListByJobExecution request. The method will close the -// http.Response Body if it receives an error. -func (client JobStepExecutionsClient) ListByJobExecutionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByJobExecutionResponder handles the response to the ListByJobExecution request. The method always -// closes the http.Response Body. -func (client JobStepExecutionsClient) ListByJobExecutionResponder(resp *http.Response) (result JobExecutionListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByJobExecutionNextResults retrieves the next set of results, if any. -func (client JobStepExecutionsClient) listByJobExecutionNextResults(ctx context.Context, lastResults JobExecutionListResult) (result JobExecutionListResult, err error) { - req, err := lastResults.jobExecutionListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.JobStepExecutionsClient", "listByJobExecutionNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByJobExecutionSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.JobStepExecutionsClient", "listByJobExecutionNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByJobExecutionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobStepExecutionsClient", "listByJobExecutionNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByJobExecutionComplete enumerates all values, automatically crossing page boundaries as required. -func (client JobStepExecutionsClient) ListByJobExecutionComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result JobExecutionListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobStepExecutionsClient.ListByJobExecution") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByJobExecution(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobsteps.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobsteps.go deleted file mode 100644 index 3011a7a25d02e..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobsteps.go +++ /dev/null @@ -1,635 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// JobStepsClient is the the Azure SQL Database management API provides a RESTful set of web services that interact -// with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and -// delete databases. -type JobStepsClient struct { - BaseClient -} - -// NewJobStepsClient creates an instance of the JobStepsClient client. -func NewJobStepsClient(subscriptionID string) JobStepsClient { - return NewJobStepsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewJobStepsClientWithBaseURI creates an instance of the JobStepsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewJobStepsClientWithBaseURI(baseURI string, subscriptionID string) JobStepsClient { - return JobStepsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a job step. This will implicitly create a new job version. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// jobName - the name of the job. -// stepName - the name of the job step. -// parameters - the requested state of the job step. -func (client JobStepsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, stepName string, parameters JobStep) (result JobStep, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobStepsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.JobStepProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.JobStepProperties.TargetGroup", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.JobStepProperties.Credential", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.JobStepProperties.Action", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.JobStepProperties.Action.Value", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.JobStepProperties.Output", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.JobStepProperties.Output.ServerName", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.JobStepProperties.Output.DatabaseName", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.JobStepProperties.Output.TableName", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.JobStepProperties.Output.Credential", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}}}}); err != nil { - return result, validation.NewError("sql.JobStepsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, stepName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client JobStepsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, stepName string, parameters JobStep) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "stepName": autorest.Encode("path", stepName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client JobStepsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client JobStepsClient) CreateOrUpdateResponder(resp *http.Response) (result JobStep, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a job step. This will implicitly create a new job version. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// jobName - the name of the job. -// stepName - the name of the job step to delete. -func (client JobStepsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, stepName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobStepsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, stepName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client JobStepsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, stepName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "stepName": autorest.Encode("path", stepName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client JobStepsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client JobStepsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a job step in a job's current version. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// jobName - the name of the job. -// stepName - the name of the job step. -func (client JobStepsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, stepName string) (result JobStep, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobStepsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, stepName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client JobStepsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, stepName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "stepName": autorest.Encode("path", stepName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client JobStepsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client JobStepsClient) GetResponder(resp *http.Response) (result JobStep, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetByVersion gets the specified version of a job step. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// jobName - the name of the job. -// jobVersion - the version of the job to get. -// stepName - the name of the job step. -func (client JobStepsClient) GetByVersion(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32, stepName string) (result JobStep, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobStepsClient.GetByVersion") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetByVersionPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobVersion, stepName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "GetByVersion", nil, "Failure preparing request") - return - } - - resp, err := client.GetByVersionSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "GetByVersion", resp, "Failure sending request") - return - } - - result, err = client.GetByVersionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "GetByVersion", resp, "Failure responding to request") - return - } - - return -} - -// GetByVersionPreparer prepares the GetByVersion request. -func (client JobStepsClient) GetByVersionPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32, stepName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "jobName": autorest.Encode("path", jobName), - "jobVersion": autorest.Encode("path", jobVersion), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "stepName": autorest.Encode("path", stepName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps/{stepName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetByVersionSender sends the GetByVersion request. The method will close the -// http.Response Body if it receives an error. -func (client JobStepsClient) GetByVersionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetByVersionResponder handles the response to the GetByVersion request. The method always -// closes the http.Response Body. -func (client JobStepsClient) GetByVersionResponder(resp *http.Response) (result JobStep, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByJob gets all job steps for a job's current version. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// jobName - the name of the job to get. -func (client JobStepsClient) ListByJob(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result JobStepListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobStepsClient.ListByJob") - defer func() { - sc := -1 - if result.jslr.Response.Response != nil { - sc = result.jslr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByJobNextResults - req, err := client.ListByJobPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "ListByJob", nil, "Failure preparing request") - return - } - - resp, err := client.ListByJobSender(req) - if err != nil { - result.jslr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "ListByJob", resp, "Failure sending request") - return - } - - result.jslr, err = client.ListByJobResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "ListByJob", resp, "Failure responding to request") - return - } - if result.jslr.hasNextLink() && result.jslr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByJobPreparer prepares the ListByJob request. -func (client JobStepsClient) ListByJobPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByJobSender sends the ListByJob request. The method will close the -// http.Response Body if it receives an error. -func (client JobStepsClient) ListByJobSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByJobResponder handles the response to the ListByJob request. The method always -// closes the http.Response Body. -func (client JobStepsClient) ListByJobResponder(resp *http.Response) (result JobStepListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByJobNextResults retrieves the next set of results, if any. -func (client JobStepsClient) listByJobNextResults(ctx context.Context, lastResults JobStepListResult) (result JobStepListResult, err error) { - req, err := lastResults.jobStepListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.JobStepsClient", "listByJobNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByJobSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.JobStepsClient", "listByJobNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByJobResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "listByJobNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByJobComplete enumerates all values, automatically crossing page boundaries as required. -func (client JobStepsClient) ListByJobComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result JobStepListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobStepsClient.ListByJob") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByJob(ctx, resourceGroupName, serverName, jobAgentName, jobName) - return -} - -// ListByVersion gets all job steps in the specified job version. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// jobName - the name of the job to get. -// jobVersion - the version of the job to get. -func (client JobStepsClient) ListByVersion(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32) (result JobStepListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobStepsClient.ListByVersion") - defer func() { - sc := -1 - if result.jslr.Response.Response != nil { - sc = result.jslr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByVersionNextResults - req, err := client.ListByVersionPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobVersion) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "ListByVersion", nil, "Failure preparing request") - return - } - - resp, err := client.ListByVersionSender(req) - if err != nil { - result.jslr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "ListByVersion", resp, "Failure sending request") - return - } - - result.jslr, err = client.ListByVersionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "ListByVersion", resp, "Failure responding to request") - return - } - if result.jslr.hasNextLink() && result.jslr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByVersionPreparer prepares the ListByVersion request. -func (client JobStepsClient) ListByVersionPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "jobName": autorest.Encode("path", jobName), - "jobVersion": autorest.Encode("path", jobVersion), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByVersionSender sends the ListByVersion request. The method will close the -// http.Response Body if it receives an error. -func (client JobStepsClient) ListByVersionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByVersionResponder handles the response to the ListByVersion request. The method always -// closes the http.Response Body. -func (client JobStepsClient) ListByVersionResponder(resp *http.Response) (result JobStepListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByVersionNextResults retrieves the next set of results, if any. -func (client JobStepsClient) listByVersionNextResults(ctx context.Context, lastResults JobStepListResult) (result JobStepListResult, err error) { - req, err := lastResults.jobStepListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.JobStepsClient", "listByVersionNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByVersionSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.JobStepsClient", "listByVersionNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByVersionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "listByVersionNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByVersionComplete enumerates all values, automatically crossing page boundaries as required. -func (client JobStepsClient) ListByVersionComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32) (result JobStepListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobStepsClient.ListByVersion") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByVersion(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobVersion) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobtargetexecutions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobtargetexecutions.go deleted file mode 100644 index 2e72ab31c1b7c..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobtargetexecutions.go +++ /dev/null @@ -1,431 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/date" - "github.com/Azure/go-autorest/tracing" - "github.com/gofrs/uuid" - "net/http" -) - -// JobTargetExecutionsClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type JobTargetExecutionsClient struct { - BaseClient -} - -// NewJobTargetExecutionsClient creates an instance of the JobTargetExecutionsClient client. -func NewJobTargetExecutionsClient(subscriptionID string) JobTargetExecutionsClient { - return NewJobTargetExecutionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewJobTargetExecutionsClientWithBaseURI creates an instance of the JobTargetExecutionsClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewJobTargetExecutionsClientWithBaseURI(baseURI string, subscriptionID string) JobTargetExecutionsClient { - return JobTargetExecutionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets a target execution. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// jobName - the name of the job to get. -// jobExecutionID - the unique id of the job execution -// stepName - the name of the step. -// targetID - the target id. -func (client JobTargetExecutionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, stepName string, targetID uuid.UUID) (result JobExecution, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobTargetExecutionsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID, stepName, targetID) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client JobTargetExecutionsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, stepName string, targetID uuid.UUID) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "jobExecutionId": autorest.Encode("path", jobExecutionID), - "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "stepName": autorest.Encode("path", stepName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "targetId": autorest.Encode("path", targetID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets/{targetId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client JobTargetExecutionsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client JobTargetExecutionsClient) GetResponder(resp *http.Response) (result JobExecution, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByJobExecution lists target executions for all steps of a job execution. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// jobName - the name of the job to get. -// jobExecutionID - the id of the job execution -// createTimeMin - if specified, only job executions created at or after the specified time are included. -// createTimeMax - if specified, only job executions created before the specified time are included. -// endTimeMin - if specified, only job executions completed at or after the specified time are included. -// endTimeMax - if specified, only job executions completed before the specified time are included. -// isActive - if specified, only active or only completed job executions are included. -// skip - the number of elements in the collection to skip. -// top - the number of elements to return from the collection. -func (client JobTargetExecutionsClient) ListByJobExecution(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result JobExecutionListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobTargetExecutionsClient.ListByJobExecution") - defer func() { - sc := -1 - if result.jelr.Response.Response != nil { - sc = result.jelr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByJobExecutionNextResults - req, err := client.ListByJobExecutionPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "ListByJobExecution", nil, "Failure preparing request") - return - } - - resp, err := client.ListByJobExecutionSender(req) - if err != nil { - result.jelr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "ListByJobExecution", resp, "Failure sending request") - return - } - - result.jelr, err = client.ListByJobExecutionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "ListByJobExecution", resp, "Failure responding to request") - return - } - if result.jelr.hasNextLink() && result.jelr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByJobExecutionPreparer prepares the ListByJobExecution request. -func (client JobTargetExecutionsClient) ListByJobExecutionPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "jobExecutionId": autorest.Encode("path", jobExecutionID), - "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if createTimeMin != nil { - queryParameters["createTimeMin"] = autorest.Encode("query", *createTimeMin) - } - if createTimeMax != nil { - queryParameters["createTimeMax"] = autorest.Encode("query", *createTimeMax) - } - if endTimeMin != nil { - queryParameters["endTimeMin"] = autorest.Encode("query", *endTimeMin) - } - if endTimeMax != nil { - queryParameters["endTimeMax"] = autorest.Encode("query", *endTimeMax) - } - if isActive != nil { - queryParameters["isActive"] = autorest.Encode("query", *isActive) - } - if skip != nil { - queryParameters["$skip"] = autorest.Encode("query", *skip) - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/targets", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByJobExecutionSender sends the ListByJobExecution request. The method will close the -// http.Response Body if it receives an error. -func (client JobTargetExecutionsClient) ListByJobExecutionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByJobExecutionResponder handles the response to the ListByJobExecution request. The method always -// closes the http.Response Body. -func (client JobTargetExecutionsClient) ListByJobExecutionResponder(resp *http.Response) (result JobExecutionListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByJobExecutionNextResults retrieves the next set of results, if any. -func (client JobTargetExecutionsClient) listByJobExecutionNextResults(ctx context.Context, lastResults JobExecutionListResult) (result JobExecutionListResult, err error) { - req, err := lastResults.jobExecutionListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "listByJobExecutionNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByJobExecutionSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "listByJobExecutionNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByJobExecutionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "listByJobExecutionNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByJobExecutionComplete enumerates all values, automatically crossing page boundaries as required. -func (client JobTargetExecutionsClient) ListByJobExecutionComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result JobExecutionListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobTargetExecutionsClient.ListByJobExecution") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByJobExecution(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top) - return -} - -// ListByStep lists the target executions of a job step execution. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// jobName - the name of the job to get. -// jobExecutionID - the id of the job execution -// stepName - the name of the step. -// createTimeMin - if specified, only job executions created at or after the specified time are included. -// createTimeMax - if specified, only job executions created before the specified time are included. -// endTimeMin - if specified, only job executions completed at or after the specified time are included. -// endTimeMax - if specified, only job executions completed before the specified time are included. -// isActive - if specified, only active or only completed job executions are included. -// skip - the number of elements in the collection to skip. -// top - the number of elements to return from the collection. -func (client JobTargetExecutionsClient) ListByStep(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, stepName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result JobExecutionListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobTargetExecutionsClient.ListByStep") - defer func() { - sc := -1 - if result.jelr.Response.Response != nil { - sc = result.jelr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByStepNextResults - req, err := client.ListByStepPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID, stepName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "ListByStep", nil, "Failure preparing request") - return - } - - resp, err := client.ListByStepSender(req) - if err != nil { - result.jelr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "ListByStep", resp, "Failure sending request") - return - } - - result.jelr, err = client.ListByStepResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "ListByStep", resp, "Failure responding to request") - return - } - if result.jelr.hasNextLink() && result.jelr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByStepPreparer prepares the ListByStep request. -func (client JobTargetExecutionsClient) ListByStepPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, stepName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "jobExecutionId": autorest.Encode("path", jobExecutionID), - "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "stepName": autorest.Encode("path", stepName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if createTimeMin != nil { - queryParameters["createTimeMin"] = autorest.Encode("query", *createTimeMin) - } - if createTimeMax != nil { - queryParameters["createTimeMax"] = autorest.Encode("query", *createTimeMax) - } - if endTimeMin != nil { - queryParameters["endTimeMin"] = autorest.Encode("query", *endTimeMin) - } - if endTimeMax != nil { - queryParameters["endTimeMax"] = autorest.Encode("query", *endTimeMax) - } - if isActive != nil { - queryParameters["isActive"] = autorest.Encode("query", *isActive) - } - if skip != nil { - queryParameters["$skip"] = autorest.Encode("query", *skip) - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByStepSender sends the ListByStep request. The method will close the -// http.Response Body if it receives an error. -func (client JobTargetExecutionsClient) ListByStepSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByStepResponder handles the response to the ListByStep request. The method always -// closes the http.Response Body. -func (client JobTargetExecutionsClient) ListByStepResponder(resp *http.Response) (result JobExecutionListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByStepNextResults retrieves the next set of results, if any. -func (client JobTargetExecutionsClient) listByStepNextResults(ctx context.Context, lastResults JobExecutionListResult) (result JobExecutionListResult, err error) { - req, err := lastResults.jobExecutionListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "listByStepNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByStepSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "listByStepNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByStepResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "listByStepNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByStepComplete enumerates all values, automatically crossing page boundaries as required. -func (client JobTargetExecutionsClient) ListByStepComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, stepName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result JobExecutionListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobTargetExecutionsClient.ListByStep") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByStep(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID, stepName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobtargetgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobtargetgroups.go deleted file mode 100644 index 74b54d3e1226e..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobtargetgroups.go +++ /dev/null @@ -1,407 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// JobTargetGroupsClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type JobTargetGroupsClient struct { - BaseClient -} - -// NewJobTargetGroupsClient creates an instance of the JobTargetGroupsClient client. -func NewJobTargetGroupsClient(subscriptionID string) JobTargetGroupsClient { - return NewJobTargetGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewJobTargetGroupsClientWithBaseURI creates an instance of the JobTargetGroupsClient client using a custom endpoint. -// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewJobTargetGroupsClientWithBaseURI(baseURI string, subscriptionID string) JobTargetGroupsClient { - return JobTargetGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a target group. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// targetGroupName - the name of the target group. -// parameters - the requested state of the target group. -func (client JobTargetGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string, parameters JobTargetGroup) (result JobTargetGroup, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobTargetGroupsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.JobTargetGroupProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.JobTargetGroupProperties.Members", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("sql.JobTargetGroupsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, jobAgentName, targetGroupName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client JobTargetGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string, parameters JobTargetGroup) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "targetGroupName": autorest.Encode("path", targetGroupName), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client JobTargetGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client JobTargetGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result JobTargetGroup, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a target group. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// targetGroupName - the name of the target group. -func (client JobTargetGroupsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobTargetGroupsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, jobAgentName, targetGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client JobTargetGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "targetGroupName": autorest.Encode("path", targetGroupName), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client JobTargetGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client JobTargetGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a target group. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// targetGroupName - the name of the target group. -func (client JobTargetGroupsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string) (result JobTargetGroup, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobTargetGroupsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, jobAgentName, targetGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client JobTargetGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "targetGroupName": autorest.Encode("path", targetGroupName), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client JobTargetGroupsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client JobTargetGroupsClient) GetResponder(resp *http.Response) (result JobTargetGroup, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByAgent gets all target groups in an agent. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -func (client JobTargetGroupsClient) ListByAgent(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result JobTargetGroupListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobTargetGroupsClient.ListByAgent") - defer func() { - sc := -1 - if result.jtglr.Response.Response != nil { - sc = result.jtglr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByAgentNextResults - req, err := client.ListByAgentPreparer(ctx, resourceGroupName, serverName, jobAgentName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "ListByAgent", nil, "Failure preparing request") - return - } - - resp, err := client.ListByAgentSender(req) - if err != nil { - result.jtglr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "ListByAgent", resp, "Failure sending request") - return - } - - result.jtglr, err = client.ListByAgentResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "ListByAgent", resp, "Failure responding to request") - return - } - if result.jtglr.hasNextLink() && result.jtglr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByAgentPreparer prepares the ListByAgent request. -func (client JobTargetGroupsClient) ListByAgentPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByAgentSender sends the ListByAgent request. The method will close the -// http.Response Body if it receives an error. -func (client JobTargetGroupsClient) ListByAgentSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByAgentResponder handles the response to the ListByAgent request. The method always -// closes the http.Response Body. -func (client JobTargetGroupsClient) ListByAgentResponder(resp *http.Response) (result JobTargetGroupListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByAgentNextResults retrieves the next set of results, if any. -func (client JobTargetGroupsClient) listByAgentNextResults(ctx context.Context, lastResults JobTargetGroupListResult) (result JobTargetGroupListResult, err error) { - req, err := lastResults.jobTargetGroupListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "listByAgentNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByAgentSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "listByAgentNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByAgentResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "listByAgentNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByAgentComplete enumerates all values, automatically crossing page boundaries as required. -func (client JobTargetGroupsClient) ListByAgentComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result JobTargetGroupListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobTargetGroupsClient.ListByAgent") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByAgent(ctx, resourceGroupName, serverName, jobAgentName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobversions.go deleted file mode 100644 index 8911c3fa38ca7..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobversions.go +++ /dev/null @@ -1,239 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// JobVersionsClient is the the Azure SQL Database management API provides a RESTful set of web services that interact -// with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and -// delete databases. -type JobVersionsClient struct { - BaseClient -} - -// NewJobVersionsClient creates an instance of the JobVersionsClient client. -func NewJobVersionsClient(subscriptionID string) JobVersionsClient { - return NewJobVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewJobVersionsClientWithBaseURI creates an instance of the JobVersionsClient client using a custom endpoint. Use -// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewJobVersionsClientWithBaseURI(baseURI string, subscriptionID string) JobVersionsClient { - return JobVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets a job version. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// jobName - the name of the job. -// jobVersion - the version of the job to get. -func (client JobVersionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32) (result JobVersion, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobVersionsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobVersion) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobVersionsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobVersionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobVersionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client JobVersionsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "jobName": autorest.Encode("path", jobName), - "jobVersion": autorest.Encode("path", jobVersion), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client JobVersionsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client JobVersionsClient) GetResponder(resp *http.Response) (result JobVersion, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByJob gets all versions of a job. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// jobAgentName - the name of the job agent. -// jobName - the name of the job to get. -func (client JobVersionsClient) ListByJob(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result JobVersionListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobVersionsClient.ListByJob") - defer func() { - sc := -1 - if result.jvlr.Response.Response != nil { - sc = result.jvlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByJobNextResults - req, err := client.ListByJobPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobVersionsClient", "ListByJob", nil, "Failure preparing request") - return - } - - resp, err := client.ListByJobSender(req) - if err != nil { - result.jvlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.JobVersionsClient", "ListByJob", resp, "Failure sending request") - return - } - - result.jvlr, err = client.ListByJobResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobVersionsClient", "ListByJob", resp, "Failure responding to request") - return - } - if result.jvlr.hasNextLink() && result.jvlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByJobPreparer prepares the ListByJob request. -func (client JobVersionsClient) ListByJobPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "jobAgentName": autorest.Encode("path", jobAgentName), - "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByJobSender sends the ListByJob request. The method will close the -// http.Response Body if it receives an error. -func (client JobVersionsClient) ListByJobSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByJobResponder handles the response to the ListByJob request. The method always -// closes the http.Response Body. -func (client JobVersionsClient) ListByJobResponder(resp *http.Response) (result JobVersionListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByJobNextResults retrieves the next set of results, if any. -func (client JobVersionsClient) listByJobNextResults(ctx context.Context, lastResults JobVersionListResult) (result JobVersionListResult, err error) { - req, err := lastResults.jobVersionListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.JobVersionsClient", "listByJobNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByJobSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.JobVersionsClient", "listByJobNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByJobResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobVersionsClient", "listByJobNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByJobComplete enumerates all values, automatically crossing page boundaries as required. -func (client JobVersionsClient) ListByJobComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result JobVersionListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobVersionsClient.ListByJob") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByJob(ctx, resourceGroupName, serverName, jobAgentName, jobName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/managedbackupshorttermretentionpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/managedbackupshorttermretentionpolicies.go deleted file mode 100644 index 91e75e1aa6c10..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/managedbackupshorttermretentionpolicies.go +++ /dev/null @@ -1,408 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ManagedBackupShortTermRetentionPoliciesClient is the the Azure SQL Database management API provides a RESTful set of -// web services that interact with Azure SQL Database services to manage your databases. The API enables you to create, -// retrieve, update, and delete databases. -type ManagedBackupShortTermRetentionPoliciesClient struct { - BaseClient -} - -// NewManagedBackupShortTermRetentionPoliciesClient creates an instance of the -// ManagedBackupShortTermRetentionPoliciesClient client. -func NewManagedBackupShortTermRetentionPoliciesClient(subscriptionID string) ManagedBackupShortTermRetentionPoliciesClient { - return NewManagedBackupShortTermRetentionPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewManagedBackupShortTermRetentionPoliciesClientWithBaseURI creates an instance of the -// ManagedBackupShortTermRetentionPoliciesClient client using a custom endpoint. Use this when interacting with an -// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewManagedBackupShortTermRetentionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ManagedBackupShortTermRetentionPoliciesClient { - return ManagedBackupShortTermRetentionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate updates a managed database's short term retention policy. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the database. -// parameters - the short term retention policy info. -func (client ManagedBackupShortTermRetentionPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedBackupShortTermRetentionPolicy) (result ManagedBackupShortTermRetentionPoliciesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedBackupShortTermRetentionPoliciesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, managedInstanceName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedBackupShortTermRetentionPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedBackupShortTermRetentionPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ManagedBackupShortTermRetentionPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedBackupShortTermRetentionPolicy) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "policyName": autorest.Encode("path", "default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedBackupShortTermRetentionPoliciesClient) CreateOrUpdateSender(req *http.Request) (future ManagedBackupShortTermRetentionPoliciesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ManagedBackupShortTermRetentionPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedBackupShortTermRetentionPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets a managed database's short term retention policy. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the database. -func (client ManagedBackupShortTermRetentionPoliciesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result ManagedBackupShortTermRetentionPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedBackupShortTermRetentionPoliciesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, managedInstanceName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedBackupShortTermRetentionPoliciesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedBackupShortTermRetentionPoliciesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedBackupShortTermRetentionPoliciesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ManagedBackupShortTermRetentionPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "policyName": autorest.Encode("path", "default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedBackupShortTermRetentionPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ManagedBackupShortTermRetentionPoliciesClient) GetResponder(resp *http.Response) (result ManagedBackupShortTermRetentionPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByDatabase gets a managed database's short term retention policy list. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the database. -func (client ManagedBackupShortTermRetentionPoliciesClient) ListByDatabase(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result ManagedBackupShortTermRetentionPolicyListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedBackupShortTermRetentionPoliciesClient.ListByDatabase") - defer func() { - sc := -1 - if result.mbstrplr.Response.Response != nil { - sc = result.mbstrplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByDatabaseNextResults - req, err := client.ListByDatabasePreparer(ctx, resourceGroupName, managedInstanceName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedBackupShortTermRetentionPoliciesClient", "ListByDatabase", nil, "Failure preparing request") - return - } - - resp, err := client.ListByDatabaseSender(req) - if err != nil { - result.mbstrplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedBackupShortTermRetentionPoliciesClient", "ListByDatabase", resp, "Failure sending request") - return - } - - result.mbstrplr, err = client.ListByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedBackupShortTermRetentionPoliciesClient", "ListByDatabase", resp, "Failure responding to request") - return - } - if result.mbstrplr.hasNextLink() && result.mbstrplr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByDatabasePreparer prepares the ListByDatabase request. -func (client ManagedBackupShortTermRetentionPoliciesClient) ListByDatabasePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByDatabaseSender sends the ListByDatabase request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedBackupShortTermRetentionPoliciesClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always -// closes the http.Response Body. -func (client ManagedBackupShortTermRetentionPoliciesClient) ListByDatabaseResponder(resp *http.Response) (result ManagedBackupShortTermRetentionPolicyListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByDatabaseNextResults retrieves the next set of results, if any. -func (client ManagedBackupShortTermRetentionPoliciesClient) listByDatabaseNextResults(ctx context.Context, lastResults ManagedBackupShortTermRetentionPolicyListResult) (result ManagedBackupShortTermRetentionPolicyListResult, err error) { - req, err := lastResults.managedBackupShortTermRetentionPolicyListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.ManagedBackupShortTermRetentionPoliciesClient", "listByDatabaseNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByDatabaseSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.ManagedBackupShortTermRetentionPoliciesClient", "listByDatabaseNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedBackupShortTermRetentionPoliciesClient", "listByDatabaseNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByDatabaseComplete enumerates all values, automatically crossing page boundaries as required. -func (client ManagedBackupShortTermRetentionPoliciesClient) ListByDatabaseComplete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result ManagedBackupShortTermRetentionPolicyListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedBackupShortTermRetentionPoliciesClient.ListByDatabase") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByDatabase(ctx, resourceGroupName, managedInstanceName, databaseName) - return -} - -// Update updates a managed database's short term retention policy. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the database. -// parameters - the short term retention policy info. -func (client ManagedBackupShortTermRetentionPoliciesClient) Update(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedBackupShortTermRetentionPolicy) (result ManagedBackupShortTermRetentionPoliciesUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedBackupShortTermRetentionPoliciesClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, managedInstanceName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedBackupShortTermRetentionPoliciesClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedBackupShortTermRetentionPoliciesClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client ManagedBackupShortTermRetentionPoliciesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedBackupShortTermRetentionPolicy) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "policyName": autorest.Encode("path", "default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedBackupShortTermRetentionPoliciesClient) UpdateSender(req *http.Request) (future ManagedBackupShortTermRetentionPoliciesUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client ManagedBackupShortTermRetentionPoliciesClient) UpdateResponder(resp *http.Response) (result ManagedBackupShortTermRetentionPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/manageddatabases.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/manageddatabases.go deleted file mode 100644 index a40a406a57470..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/manageddatabases.go +++ /dev/null @@ -1,572 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "github.com/gofrs/uuid" - "net/http" -) - -// ManagedDatabasesClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type ManagedDatabasesClient struct { - BaseClient -} - -// NewManagedDatabasesClient creates an instance of the ManagedDatabasesClient client. -func NewManagedDatabasesClient(subscriptionID string) ManagedDatabasesClient { - return NewManagedDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewManagedDatabasesClientWithBaseURI creates an instance of the ManagedDatabasesClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewManagedDatabasesClientWithBaseURI(baseURI string, subscriptionID string) ManagedDatabasesClient { - return ManagedDatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CompleteRestore completes the restore operation on a managed database. -// Parameters: -// locationName - the name of the region where the resource is located. -// operationID - management operation id that this request tries to complete. -// parameters - the definition for completing the restore of this managed database. -func (client ManagedDatabasesClient) CompleteRestore(ctx context.Context, locationName string, operationID uuid.UUID, parameters CompleteDatabaseRestoreDefinition) (result ManagedDatabasesCompleteRestoreFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabasesClient.CompleteRestore") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.LastBackupName", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("sql.ManagedDatabasesClient", "CompleteRestore", err.Error()) - } - - req, err := client.CompleteRestorePreparer(ctx, locationName, operationID, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "CompleteRestore", nil, "Failure preparing request") - return - } - - result, err = client.CompleteRestoreSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "CompleteRestore", result.Response(), "Failure sending request") - return - } - - return -} - -// CompleteRestorePreparer prepares the CompleteRestore request. -func (client ManagedDatabasesClient) CompleteRestorePreparer(ctx context.Context, locationName string, operationID uuid.UUID, parameters CompleteDatabaseRestoreDefinition) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "locationName": autorest.Encode("path", locationName), - "operationId": autorest.Encode("path", operationID), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/managedDatabaseRestoreAzureAsyncOperation/{operationId}/completeRestore", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CompleteRestoreSender sends the CompleteRestore request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedDatabasesClient) CompleteRestoreSender(req *http.Request) (future ManagedDatabasesCompleteRestoreFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CompleteRestoreResponder handles the response to the CompleteRestore request. The method always -// closes the http.Response Body. -func (client ManagedDatabasesClient) CompleteRestoreResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// CreateOrUpdate creates a new database or updates an existing database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the database. -// parameters - the requested database resource state. -func (client ManagedDatabasesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedDatabase) (result ManagedDatabasesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabasesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, managedInstanceName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ManagedDatabasesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedDatabase) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedDatabasesClient) CreateOrUpdateSender(req *http.Request) (future ManagedDatabasesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ManagedDatabasesClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedDatabase, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a managed database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the database. -func (client ManagedDatabasesClient) Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result ManagedDatabasesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabasesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, managedInstanceName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ManagedDatabasesClient) DeletePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedDatabasesClient) DeleteSender(req *http.Request) (future ManagedDatabasesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ManagedDatabasesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a managed database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the database. -func (client ManagedDatabasesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result ManagedDatabase, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabasesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, managedInstanceName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ManagedDatabasesClient) GetPreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedDatabasesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ManagedDatabasesClient) GetResponder(resp *http.Response) (result ManagedDatabase, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByInstance gets a list of managed databases. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -func (client ManagedDatabasesClient) ListByInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result ManagedDatabaseListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabasesClient.ListByInstance") - defer func() { - sc := -1 - if result.mdlr.Response.Response != nil { - sc = result.mdlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByInstanceNextResults - req, err := client.ListByInstancePreparer(ctx, resourceGroupName, managedInstanceName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "ListByInstance", nil, "Failure preparing request") - return - } - - resp, err := client.ListByInstanceSender(req) - if err != nil { - result.mdlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "ListByInstance", resp, "Failure sending request") - return - } - - result.mdlr, err = client.ListByInstanceResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "ListByInstance", resp, "Failure responding to request") - return - } - if result.mdlr.hasNextLink() && result.mdlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByInstancePreparer prepares the ListByInstance request. -func (client ManagedDatabasesClient) ListByInstancePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByInstanceSender sends the ListByInstance request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedDatabasesClient) ListByInstanceSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByInstanceResponder handles the response to the ListByInstance request. The method always -// closes the http.Response Body. -func (client ManagedDatabasesClient) ListByInstanceResponder(resp *http.Response) (result ManagedDatabaseListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByInstanceNextResults retrieves the next set of results, if any. -func (client ManagedDatabasesClient) listByInstanceNextResults(ctx context.Context, lastResults ManagedDatabaseListResult) (result ManagedDatabaseListResult, err error) { - req, err := lastResults.managedDatabaseListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "listByInstanceNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByInstanceSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "listByInstanceNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByInstanceResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "listByInstanceNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByInstanceComplete enumerates all values, automatically crossing page boundaries as required. -func (client ManagedDatabasesClient) ListByInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result ManagedDatabaseListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabasesClient.ListByInstance") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByInstance(ctx, resourceGroupName, managedInstanceName) - return -} - -// Update updates an existing database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the database. -// parameters - the requested database resource state. -func (client ManagedDatabasesClient) Update(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedDatabaseUpdate) (result ManagedDatabasesUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabasesClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, managedInstanceName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client ManagedDatabasesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedDatabaseUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedDatabasesClient) UpdateSender(req *http.Request) (future ManagedDatabasesUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client ManagedDatabasesClient) UpdateResponder(resp *http.Response) (result ManagedDatabase, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/managedinstanceadministrators.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/managedinstanceadministrators.go deleted file mode 100644 index e4e9e04bda5ec..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/managedinstanceadministrators.go +++ /dev/null @@ -1,406 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ManagedInstanceAdministratorsClient is the the Azure SQL Database management API provides a RESTful set of web -// services that interact with Azure SQL Database services to manage your databases. The API enables you to create, -// retrieve, update, and delete databases. -type ManagedInstanceAdministratorsClient struct { - BaseClient -} - -// NewManagedInstanceAdministratorsClient creates an instance of the ManagedInstanceAdministratorsClient client. -func NewManagedInstanceAdministratorsClient(subscriptionID string) ManagedInstanceAdministratorsClient { - return NewManagedInstanceAdministratorsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewManagedInstanceAdministratorsClientWithBaseURI creates an instance of the ManagedInstanceAdministratorsClient -// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI -// (sovereign clouds, Azure stack). -func NewManagedInstanceAdministratorsClientWithBaseURI(baseURI string, subscriptionID string) ManagedInstanceAdministratorsClient { - return ManagedInstanceAdministratorsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a managed instance administrator. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// parameters - the requested administrator parameters. -func (client ManagedInstanceAdministratorsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstanceAdministrator) (result ManagedInstanceAdministratorsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceAdministratorsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ManagedInstanceAdministratorProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedInstanceAdministratorProperties.AdministratorType", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ManagedInstanceAdministratorProperties.Login", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ManagedInstanceAdministratorProperties.Sid", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("sql.ManagedInstanceAdministratorsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, managedInstanceName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceAdministratorsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceAdministratorsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ManagedInstanceAdministratorsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstanceAdministrator) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "administratorName": autorest.Encode("path", "ActiveDirectory"), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators/{administratorName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstanceAdministratorsClient) CreateOrUpdateSender(req *http.Request) (future ManagedInstanceAdministratorsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ManagedInstanceAdministratorsClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedInstanceAdministrator, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a managed instance administrator. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -func (client ManagedInstanceAdministratorsClient) Delete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result ManagedInstanceAdministratorsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceAdministratorsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, managedInstanceName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceAdministratorsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceAdministratorsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ManagedInstanceAdministratorsClient) DeletePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "administratorName": autorest.Encode("path", "ActiveDirectory"), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators/{administratorName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstanceAdministratorsClient) DeleteSender(req *http.Request) (future ManagedInstanceAdministratorsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ManagedInstanceAdministratorsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a managed instance administrator. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -func (client ManagedInstanceAdministratorsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string) (result ManagedInstanceAdministrator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceAdministratorsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, managedInstanceName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceAdministratorsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceAdministratorsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceAdministratorsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ManagedInstanceAdministratorsClient) GetPreparer(ctx context.Context, resourceGroupName string, managedInstanceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "administratorName": autorest.Encode("path", "ActiveDirectory"), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators/{administratorName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstanceAdministratorsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ManagedInstanceAdministratorsClient) GetResponder(resp *http.Response) (result ManagedInstanceAdministrator, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByInstance gets a list of managed instance administrators. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -func (client ManagedInstanceAdministratorsClient) ListByInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result ManagedInstanceAdministratorListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceAdministratorsClient.ListByInstance") - defer func() { - sc := -1 - if result.mialr.Response.Response != nil { - sc = result.mialr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByInstanceNextResults - req, err := client.ListByInstancePreparer(ctx, resourceGroupName, managedInstanceName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceAdministratorsClient", "ListByInstance", nil, "Failure preparing request") - return - } - - resp, err := client.ListByInstanceSender(req) - if err != nil { - result.mialr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceAdministratorsClient", "ListByInstance", resp, "Failure sending request") - return - } - - result.mialr, err = client.ListByInstanceResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceAdministratorsClient", "ListByInstance", resp, "Failure responding to request") - return - } - if result.mialr.hasNextLink() && result.mialr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByInstancePreparer prepares the ListByInstance request. -func (client ManagedInstanceAdministratorsClient) ListByInstancePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByInstanceSender sends the ListByInstance request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstanceAdministratorsClient) ListByInstanceSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByInstanceResponder handles the response to the ListByInstance request. The method always -// closes the http.Response Body. -func (client ManagedInstanceAdministratorsClient) ListByInstanceResponder(resp *http.Response) (result ManagedInstanceAdministratorListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByInstanceNextResults retrieves the next set of results, if any. -func (client ManagedInstanceAdministratorsClient) listByInstanceNextResults(ctx context.Context, lastResults ManagedInstanceAdministratorListResult) (result ManagedInstanceAdministratorListResult, err error) { - req, err := lastResults.managedInstanceAdministratorListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.ManagedInstanceAdministratorsClient", "listByInstanceNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByInstanceSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.ManagedInstanceAdministratorsClient", "listByInstanceNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByInstanceResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceAdministratorsClient", "listByInstanceNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByInstanceComplete enumerates all values, automatically crossing page boundaries as required. -func (client ManagedInstanceAdministratorsClient) ListByInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result ManagedInstanceAdministratorListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceAdministratorsClient.ListByInstance") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByInstance(ctx, resourceGroupName, managedInstanceName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/managedinstances.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/managedinstances.go deleted file mode 100644 index 58b525bf1774e..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/managedinstances.go +++ /dev/null @@ -1,594 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ManagedInstancesClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type ManagedInstancesClient struct { - BaseClient -} - -// NewManagedInstancesClient creates an instance of the ManagedInstancesClient client. -func NewManagedInstancesClient(subscriptionID string) ManagedInstancesClient { - return NewManagedInstancesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewManagedInstancesClientWithBaseURI creates an instance of the ManagedInstancesClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewManagedInstancesClientWithBaseURI(baseURI string, subscriptionID string) ManagedInstancesClient { - return ManagedInstancesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a managed instance. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// parameters - the requested managed instance resource state. -func (client ManagedInstancesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstance) (result ManagedInstancesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Sku.Name", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("sql.ManagedInstancesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, managedInstanceName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ManagedInstancesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstance) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstancesClient) CreateOrUpdateSender(req *http.Request) (future ManagedInstancesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ManagedInstancesClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedInstance, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a managed instance. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -func (client ManagedInstancesClient) Delete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result ManagedInstancesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, managedInstanceName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ManagedInstancesClient) DeletePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstancesClient) DeleteSender(req *http.Request) (future ManagedInstancesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ManagedInstancesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a managed instance. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -func (client ManagedInstancesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string) (result ManagedInstance, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, managedInstanceName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ManagedInstancesClient) GetPreparer(ctx context.Context, resourceGroupName string, managedInstanceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstancesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ManagedInstancesClient) GetResponder(resp *http.Response) (result ManagedInstance, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of all managed instances in the subscription. -func (client ManagedInstancesClient) List(ctx context.Context) (result ManagedInstanceListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.List") - defer func() { - sc := -1 - if result.milr.Response.Response != nil { - sc = result.milr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.milr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "List", resp, "Failure sending request") - return - } - - result.milr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "List", resp, "Failure responding to request") - return - } - if result.milr.hasNextLink() && result.milr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client ManagedInstancesClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstancesClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client ManagedInstancesClient) ListResponder(resp *http.Response) (result ManagedInstanceListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client ManagedInstancesClient) listNextResults(ctx context.Context, lastResults ManagedInstanceListResult) (result ManagedInstanceListResult, err error) { - req, err := lastResults.managedInstanceListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ManagedInstancesClient) ListComplete(ctx context.Context) (result ManagedInstanceListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx) - return -} - -// ListByResourceGroup gets a list of managed instances in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -func (client ManagedInstancesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ManagedInstanceListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.milr.Response.Response != nil { - sc = result.milr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.milr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - result.milr, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "ListByResourceGroup", resp, "Failure responding to request") - return - } - if result.milr.hasNextLink() && result.milr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client ManagedInstancesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstancesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client ManagedInstancesClient) ListByResourceGroupResponder(resp *http.Response) (result ManagedInstanceListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client ManagedInstancesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ManagedInstanceListResult) (result ManagedInstanceListResult, err error) { - req, err := lastResults.managedInstanceListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client ManagedInstancesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ManagedInstanceListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// Update updates a managed instance. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// parameters - the requested managed instance resource state. -func (client ManagedInstancesClient) Update(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstanceUpdate) (result ManagedInstancesUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, managedInstanceName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client ManagedInstancesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstanceUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstancesClient) UpdateSender(req *http.Request) (future ManagedInstancesUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client ManagedInstancesClient) UpdateResponder(resp *http.Response) (result ManagedInstance, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/models.go deleted file mode 100644 index 4ff6cc74ad759..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/models.go +++ /dev/null @@ -1,17005 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "encoding/json" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/date" - "github.com/Azure/go-autorest/autorest/to" - "github.com/Azure/go-autorest/tracing" - "github.com/gofrs/uuid" - "net/http" -) - -// The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql" - -// AutomaticTuningOptions automatic tuning properties for individual advisors. -type AutomaticTuningOptions struct { - // DesiredState - Automatic tuning option desired state. Possible values include: 'AutomaticTuningOptionModeDesiredOff', 'AutomaticTuningOptionModeDesiredOn', 'AutomaticTuningOptionModeDesiredDefault' - DesiredState AutomaticTuningOptionModeDesired `json:"desiredState,omitempty"` - // ActualState - READ-ONLY; Automatic tuning option actual state. Possible values include: 'Off', 'On' - ActualState AutomaticTuningOptionModeActual `json:"actualState,omitempty"` - // ReasonCode - READ-ONLY; Reason code if desired and actual state are different. - ReasonCode *int32 `json:"reasonCode,omitempty"` - // ReasonDesc - READ-ONLY; Reason description if desired and actual state are different. Possible values include: 'Default', 'Disabled', 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', 'QueryStoreReadOnly', 'NotSupported' - ReasonDesc AutomaticTuningDisabledReason `json:"reasonDesc,omitempty"` -} - -// MarshalJSON is the custom marshaler for AutomaticTuningOptions. -func (ato AutomaticTuningOptions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ato.DesiredState != "" { - objectMap["desiredState"] = ato.DesiredState - } - return json.Marshal(objectMap) -} - -// AutomaticTuningServerOptions automatic tuning properties for individual advisors. -type AutomaticTuningServerOptions struct { - // DesiredState - Automatic tuning option desired state. Possible values include: 'AutomaticTuningOptionModeDesiredOff', 'AutomaticTuningOptionModeDesiredOn', 'AutomaticTuningOptionModeDesiredDefault' - DesiredState AutomaticTuningOptionModeDesired `json:"desiredState,omitempty"` - // ActualState - READ-ONLY; Automatic tuning option actual state. Possible values include: 'Off', 'On' - ActualState AutomaticTuningOptionModeActual `json:"actualState,omitempty"` - // ReasonCode - READ-ONLY; Reason code if desired and actual state are different. - ReasonCode *int32 `json:"reasonCode,omitempty"` - // ReasonDesc - READ-ONLY; Reason description if desired and actual state are different. Possible values include: 'AutomaticTuningServerReasonDefault', 'AutomaticTuningServerReasonDisabled', 'AutomaticTuningServerReasonAutoConfigured' - ReasonDesc AutomaticTuningServerReason `json:"reasonDesc,omitempty"` -} - -// MarshalJSON is the custom marshaler for AutomaticTuningServerOptions. -func (atso AutomaticTuningServerOptions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if atso.DesiredState != "" { - objectMap["desiredState"] = atso.DesiredState - } - return json.Marshal(objectMap) -} - -// AutomaticTuningServerProperties server-level Automatic Tuning properties. -type AutomaticTuningServerProperties struct { - // DesiredState - Automatic tuning desired state. Possible values include: 'AutomaticTuningServerModeCustom', 'AutomaticTuningServerModeAuto', 'AutomaticTuningServerModeUnspecified' - DesiredState AutomaticTuningServerMode `json:"desiredState,omitempty"` - // ActualState - READ-ONLY; Automatic tuning actual state. Possible values include: 'AutomaticTuningServerModeCustom', 'AutomaticTuningServerModeAuto', 'AutomaticTuningServerModeUnspecified' - ActualState AutomaticTuningServerMode `json:"actualState,omitempty"` - // Options - Automatic tuning options definition. - Options map[string]*AutomaticTuningServerOptions `json:"options"` -} - -// MarshalJSON is the custom marshaler for AutomaticTuningServerProperties. -func (atsp AutomaticTuningServerProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if atsp.DesiredState != "" { - objectMap["desiredState"] = atsp.DesiredState - } - if atsp.Options != nil { - objectMap["options"] = atsp.Options - } - return json.Marshal(objectMap) -} - -// CheckNameAvailabilityRequest a request to check whether the specified name for a resource is available. -type CheckNameAvailabilityRequest struct { - // Name - The name whose availability is to be checked. - Name *string `json:"name,omitempty"` - // Type - The type of resource that is used as the scope of the availability check. - Type *string `json:"type,omitempty"` -} - -// CheckNameAvailabilityResponse a response indicating whether the specified name for a resource is -// available. -type CheckNameAvailabilityResponse struct { - autorest.Response `json:"-"` - // Available - READ-ONLY; True if the name is available, otherwise false. - Available *bool `json:"available,omitempty"` - // Message - READ-ONLY; A message explaining why the name is unavailable. Will be null if the name is available. - Message *string `json:"message,omitempty"` - // Name - READ-ONLY; The name whose availability was checked. - Name *string `json:"name,omitempty"` - // Reason - READ-ONLY; The reason code explaining why the name is unavailable. Will be null if the name is available. Possible values include: 'Invalid', 'AlreadyExists' - Reason CheckNameAvailabilityReason `json:"reason,omitempty"` -} - -// MarshalJSON is the custom marshaler for CheckNameAvailabilityResponse. -func (cnar CheckNameAvailabilityResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// CompleteDatabaseRestoreDefinition contains the information necessary to perform a complete database -// restore operation. -type CompleteDatabaseRestoreDefinition struct { - // LastBackupName - The last backup name to apply - LastBackupName *string `json:"lastBackupName,omitempty"` -} - -// CreateDatabaseRestorePointDefinition contains the information necessary to perform a create database -// restore point operation. -type CreateDatabaseRestorePointDefinition struct { - // RestorePointLabel - The restore point label to apply - RestorePointLabel *string `json:"restorePointLabel,omitempty"` -} - -// Database represents a database. -type Database struct { - autorest.Response `json:"-"` - // Kind - READ-ONLY; Kind of database. This is metadata used for the Azure portal experience. - Kind *string `json:"kind,omitempty"` - // DatabaseProperties - The properties representing the resource. - *DatabaseProperties `json:"properties,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for Database. -func (d Database) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if d.DatabaseProperties != nil { - objectMap["properties"] = d.DatabaseProperties - } - if d.Location != nil { - objectMap["location"] = d.Location - } - if d.Tags != nil { - objectMap["tags"] = d.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Database struct. -func (d *Database) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - d.Kind = &kind - } - case "properties": - if v != nil { - var databaseProperties DatabaseProperties - err = json.Unmarshal(*v, &databaseProperties) - if err != nil { - return err - } - d.DatabaseProperties = &databaseProperties - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - d.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - d.Tags = tags - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - d.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - d.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - d.Type = &typeVar - } - } - } - - return nil -} - -// DatabaseAutomaticTuning database-level Automatic Tuning. -type DatabaseAutomaticTuning struct { - autorest.Response `json:"-"` - // DatabaseAutomaticTuningProperties - Resource properties. - *DatabaseAutomaticTuningProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for DatabaseAutomaticTuning. -func (dat DatabaseAutomaticTuning) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dat.DatabaseAutomaticTuningProperties != nil { - objectMap["properties"] = dat.DatabaseAutomaticTuningProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for DatabaseAutomaticTuning struct. -func (dat *DatabaseAutomaticTuning) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var databaseAutomaticTuningProperties DatabaseAutomaticTuningProperties - err = json.Unmarshal(*v, &databaseAutomaticTuningProperties) - if err != nil { - return err - } - dat.DatabaseAutomaticTuningProperties = &databaseAutomaticTuningProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - dat.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - dat.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - dat.Type = &typeVar - } - } - } - - return nil -} - -// DatabaseAutomaticTuningProperties database-level Automatic Tuning properties. -type DatabaseAutomaticTuningProperties struct { - // DesiredState - Automatic tuning desired state. Possible values include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - DesiredState AutomaticTuningMode `json:"desiredState,omitempty"` - // ActualState - READ-ONLY; Automatic tuning actual state. Possible values include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - ActualState AutomaticTuningMode `json:"actualState,omitempty"` - // Options - Automatic tuning options definition. - Options map[string]*AutomaticTuningOptions `json:"options"` -} - -// MarshalJSON is the custom marshaler for DatabaseAutomaticTuningProperties. -func (datp DatabaseAutomaticTuningProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if datp.DesiredState != "" { - objectMap["desiredState"] = datp.DesiredState - } - if datp.Options != nil { - objectMap["options"] = datp.Options - } - return json.Marshal(objectMap) -} - -// DatabaseBlobAuditingPolicy a database blob auditing policy. -type DatabaseBlobAuditingPolicy struct { - autorest.Response `json:"-"` - // Kind - READ-ONLY; Resource kind. - Kind *string `json:"kind,omitempty"` - // DatabaseBlobAuditingPolicyProperties - Resource properties. - *DatabaseBlobAuditingPolicyProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for DatabaseBlobAuditingPolicy. -func (dbap DatabaseBlobAuditingPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dbap.DatabaseBlobAuditingPolicyProperties != nil { - objectMap["properties"] = dbap.DatabaseBlobAuditingPolicyProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for DatabaseBlobAuditingPolicy struct. -func (dbap *DatabaseBlobAuditingPolicy) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - dbap.Kind = &kind - } - case "properties": - if v != nil { - var databaseBlobAuditingPolicyProperties DatabaseBlobAuditingPolicyProperties - err = json.Unmarshal(*v, &databaseBlobAuditingPolicyProperties) - if err != nil { - return err - } - dbap.DatabaseBlobAuditingPolicyProperties = &databaseBlobAuditingPolicyProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - dbap.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - dbap.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - dbap.Type = &typeVar - } - } - } - - return nil -} - -// DatabaseBlobAuditingPolicyListResult a list of database auditing settings. -type DatabaseBlobAuditingPolicyListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]DatabaseBlobAuditingPolicy `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for DatabaseBlobAuditingPolicyListResult. -func (dbaplr DatabaseBlobAuditingPolicyListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// DatabaseBlobAuditingPolicyListResultIterator provides access to a complete listing of -// DatabaseBlobAuditingPolicy values. -type DatabaseBlobAuditingPolicyListResultIterator struct { - i int - page DatabaseBlobAuditingPolicyListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *DatabaseBlobAuditingPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseBlobAuditingPolicyListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *DatabaseBlobAuditingPolicyListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter DatabaseBlobAuditingPolicyListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter DatabaseBlobAuditingPolicyListResultIterator) Response() DatabaseBlobAuditingPolicyListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter DatabaseBlobAuditingPolicyListResultIterator) Value() DatabaseBlobAuditingPolicy { - if !iter.page.NotDone() { - return DatabaseBlobAuditingPolicy{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the DatabaseBlobAuditingPolicyListResultIterator type. -func NewDatabaseBlobAuditingPolicyListResultIterator(page DatabaseBlobAuditingPolicyListResultPage) DatabaseBlobAuditingPolicyListResultIterator { - return DatabaseBlobAuditingPolicyListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (dbaplr DatabaseBlobAuditingPolicyListResult) IsEmpty() bool { - return dbaplr.Value == nil || len(*dbaplr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (dbaplr DatabaseBlobAuditingPolicyListResult) hasNextLink() bool { - return dbaplr.NextLink != nil && len(*dbaplr.NextLink) != 0 -} - -// databaseBlobAuditingPolicyListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (dbaplr DatabaseBlobAuditingPolicyListResult) databaseBlobAuditingPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { - if !dbaplr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(dbaplr.NextLink))) -} - -// DatabaseBlobAuditingPolicyListResultPage contains a page of DatabaseBlobAuditingPolicy values. -type DatabaseBlobAuditingPolicyListResultPage struct { - fn func(context.Context, DatabaseBlobAuditingPolicyListResult) (DatabaseBlobAuditingPolicyListResult, error) - dbaplr DatabaseBlobAuditingPolicyListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *DatabaseBlobAuditingPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseBlobAuditingPolicyListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.dbaplr) - if err != nil { - return err - } - page.dbaplr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *DatabaseBlobAuditingPolicyListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page DatabaseBlobAuditingPolicyListResultPage) NotDone() bool { - return !page.dbaplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page DatabaseBlobAuditingPolicyListResultPage) Response() DatabaseBlobAuditingPolicyListResult { - return page.dbaplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page DatabaseBlobAuditingPolicyListResultPage) Values() []DatabaseBlobAuditingPolicy { - if page.dbaplr.IsEmpty() { - return nil - } - return *page.dbaplr.Value -} - -// Creates a new instance of the DatabaseBlobAuditingPolicyListResultPage type. -func NewDatabaseBlobAuditingPolicyListResultPage(cur DatabaseBlobAuditingPolicyListResult, getNextPage func(context.Context, DatabaseBlobAuditingPolicyListResult) (DatabaseBlobAuditingPolicyListResult, error)) DatabaseBlobAuditingPolicyListResultPage { - return DatabaseBlobAuditingPolicyListResultPage{ - fn: getNextPage, - dbaplr: cur, - } -} - -// DatabaseBlobAuditingPolicyProperties properties of a database blob auditing policy. -type DatabaseBlobAuditingPolicyProperties struct { - // State - Specifies the state of the policy. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Possible values include: 'BlobAuditingPolicyStateEnabled', 'BlobAuditingPolicyStateDisabled' - State BlobAuditingPolicyState `json:"state,omitempty"` - // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required. - StorageEndpoint *string `json:"storageEndpoint,omitempty"` - // StorageAccountAccessKey - Specifies the identifier key of the auditing storage account. - // If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. - // Prerequisites for using managed identity authentication: - // 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). - // 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. - // For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355) - StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` - // RetentionDays - Specifies the number of days to keep in the audit logs in the storage account. - RetentionDays *int32 `json:"retentionDays,omitempty"` - // AuditActionsAndGroups - Specifies the Actions-Groups and Actions to audit. - // - // The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins: - // - // BATCH_COMPLETED_GROUP, - // SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - // FAILED_DATABASE_AUTHENTICATION_GROUP. - // - // This above combination is also the set that is configured by default when enabling auditing from the Azure portal. - // - // The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records): - // - // APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - // BACKUP_RESTORE_GROUP - // DATABASE_LOGOUT_GROUP - // DATABASE_OBJECT_CHANGE_GROUP - // DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - // DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - // DATABASE_OPERATION_GROUP - // DATABASE_PERMISSION_CHANGE_GROUP - // DATABASE_PRINCIPAL_CHANGE_GROUP - // DATABASE_PRINCIPAL_IMPERSONATION_GROUP - // DATABASE_ROLE_MEMBER_CHANGE_GROUP - // FAILED_DATABASE_AUTHENTICATION_GROUP - // SCHEMA_OBJECT_ACCESS_GROUP - // SCHEMA_OBJECT_CHANGE_GROUP - // SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - // SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - // SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - // USER_CHANGE_PASSWORD_GROUP - // BATCH_STARTED_GROUP - // BATCH_COMPLETED_GROUP - // - // These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs. - // - // For more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - // - // For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: - // SELECT - // UPDATE - // INSERT - // DELETE - // EXECUTE - // RECEIVE - // REFERENCES - // - // The general form for defining an action to be audited is: - // {action} ON {object} BY {principal} - // - // Note that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively. - // - // For example: - // SELECT on dbo.myTable by public - // SELECT on DATABASE::myDatabase by public - // SELECT on SCHEMA::mySchema by public - // - // For more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - AuditActionsAndGroups *[]string `json:"auditActionsAndGroups,omitempty"` - // StorageAccountSubscriptionID - Specifies the blob storage subscription Id. - StorageAccountSubscriptionID *uuid.UUID `json:"storageAccountSubscriptionId,omitempty"` - // IsStorageSecondaryKeyInUse - Specifies whether storageAccountAccessKey value is the storage's secondary key. - IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"` - // IsAzureMonitorTargetEnabled - Specifies whether audit events are sent to Azure Monitor. - // In order to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true. - // - // When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created. - // Note that for server level audit you should use the 'master' database as {databaseName}. - // - // Diagnostic Settings URI format: - // PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - // - // For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) - // or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - IsAzureMonitorTargetEnabled *bool `json:"isAzureMonitorTargetEnabled,omitempty"` - // QueueDelayMs - Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. - // The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - QueueDelayMs *int32 `json:"queueDelayMs,omitempty"` -} - -// DatabaseListResult represents the response to a list database request. -type DatabaseListResult struct { - autorest.Response `json:"-"` - // Value - The list of databases housed in the server. - Value *[]Database `json:"value,omitempty"` -} - -// DatabaseOperation a database operation. -type DatabaseOperation struct { - // DatabaseOperationProperties - Resource properties. - *DatabaseOperationProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for DatabaseOperation. -func (do DatabaseOperation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if do.DatabaseOperationProperties != nil { - objectMap["properties"] = do.DatabaseOperationProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for DatabaseOperation struct. -func (do *DatabaseOperation) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var databaseOperationProperties DatabaseOperationProperties - err = json.Unmarshal(*v, &databaseOperationProperties) - if err != nil { - return err - } - do.DatabaseOperationProperties = &databaseOperationProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - do.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - do.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - do.Type = &typeVar - } - } - } - - return nil -} - -// DatabaseOperationListResult the response to a list database operations request -type DatabaseOperationListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]DatabaseOperation `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for DatabaseOperationListResult. -func (dolr DatabaseOperationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// DatabaseOperationListResultIterator provides access to a complete listing of DatabaseOperation values. -type DatabaseOperationListResultIterator struct { - i int - page DatabaseOperationListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *DatabaseOperationListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseOperationListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *DatabaseOperationListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter DatabaseOperationListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter DatabaseOperationListResultIterator) Response() DatabaseOperationListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter DatabaseOperationListResultIterator) Value() DatabaseOperation { - if !iter.page.NotDone() { - return DatabaseOperation{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the DatabaseOperationListResultIterator type. -func NewDatabaseOperationListResultIterator(page DatabaseOperationListResultPage) DatabaseOperationListResultIterator { - return DatabaseOperationListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (dolr DatabaseOperationListResult) IsEmpty() bool { - return dolr.Value == nil || len(*dolr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (dolr DatabaseOperationListResult) hasNextLink() bool { - return dolr.NextLink != nil && len(*dolr.NextLink) != 0 -} - -// databaseOperationListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (dolr DatabaseOperationListResult) databaseOperationListResultPreparer(ctx context.Context) (*http.Request, error) { - if !dolr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(dolr.NextLink))) -} - -// DatabaseOperationListResultPage contains a page of DatabaseOperation values. -type DatabaseOperationListResultPage struct { - fn func(context.Context, DatabaseOperationListResult) (DatabaseOperationListResult, error) - dolr DatabaseOperationListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *DatabaseOperationListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseOperationListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.dolr) - if err != nil { - return err - } - page.dolr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *DatabaseOperationListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page DatabaseOperationListResultPage) NotDone() bool { - return !page.dolr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page DatabaseOperationListResultPage) Response() DatabaseOperationListResult { - return page.dolr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page DatabaseOperationListResultPage) Values() []DatabaseOperation { - if page.dolr.IsEmpty() { - return nil - } - return *page.dolr.Value -} - -// Creates a new instance of the DatabaseOperationListResultPage type. -func NewDatabaseOperationListResultPage(cur DatabaseOperationListResult, getNextPage func(context.Context, DatabaseOperationListResult) (DatabaseOperationListResult, error)) DatabaseOperationListResultPage { - return DatabaseOperationListResultPage{ - fn: getNextPage, - dolr: cur, - } -} - -// DatabaseOperationProperties the properties of a database operation. -type DatabaseOperationProperties struct { - // DatabaseName - READ-ONLY; The name of the database the operation is being performed on. - DatabaseName *string `json:"databaseName,omitempty"` - // Operation - READ-ONLY; The name of operation. - Operation *string `json:"operation,omitempty"` - // OperationFriendlyName - READ-ONLY; The friendly name of operation. - OperationFriendlyName *string `json:"operationFriendlyName,omitempty"` - // PercentComplete - READ-ONLY; The percentage of the operation completed. - PercentComplete *int32 `json:"percentComplete,omitempty"` - // ServerName - READ-ONLY; The name of the server. - ServerName *string `json:"serverName,omitempty"` - // StartTime - READ-ONLY; The operation start time. - StartTime *date.Time `json:"startTime,omitempty"` - // State - READ-ONLY; The operation state. Possible values include: 'ManagementOperationStatePending', 'ManagementOperationStateInProgress', 'ManagementOperationStateSucceeded', 'ManagementOperationStateFailed', 'ManagementOperationStateCancelInProgress', 'ManagementOperationStateCancelled' - State ManagementOperationState `json:"state,omitempty"` - // ErrorCode - READ-ONLY; The operation error code. - ErrorCode *int32 `json:"errorCode,omitempty"` - // ErrorDescription - READ-ONLY; The operation error description. - ErrorDescription *string `json:"errorDescription,omitempty"` - // ErrorSeverity - READ-ONLY; The operation error severity. - ErrorSeverity *int32 `json:"errorSeverity,omitempty"` - // IsUserError - READ-ONLY; Whether or not the error is a user error. - IsUserError *bool `json:"isUserError,omitempty"` - // EstimatedCompletionTime - READ-ONLY; The estimated completion time of the operation. - EstimatedCompletionTime *date.Time `json:"estimatedCompletionTime,omitempty"` - // Description - READ-ONLY; The operation description. - Description *string `json:"description,omitempty"` - // IsCancellable - READ-ONLY; Whether the operation can be cancelled. - IsCancellable *bool `json:"isCancellable,omitempty"` -} - -// MarshalJSON is the custom marshaler for DatabaseOperationProperties. -func (dop DatabaseOperationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// DatabaseProperties represents the properties of a database. -type DatabaseProperties struct { - // Collation - The collation of the database. If createMode is not Default, this value is ignored. - Collation *string `json:"collation,omitempty"` - // CreationDate - READ-ONLY; The creation date of the database (ISO8601 format). - CreationDate *date.Time `json:"creationDate,omitempty"` - // ContainmentState - READ-ONLY; The containment state of the database. - ContainmentState *int64 `json:"containmentState,omitempty"` - // CurrentServiceObjectiveID - READ-ONLY; The current service level objective ID of the database. This is the ID of the service level objective that is currently active. - CurrentServiceObjectiveID *uuid.UUID `json:"currentServiceObjectiveId,omitempty"` - // DatabaseID - READ-ONLY; The ID of the database. - DatabaseID *uuid.UUID `json:"databaseId,omitempty"` - // EarliestRestoreDate - READ-ONLY; This records the earliest start date and time that restore is available for this database (ISO8601 format). - EarliestRestoreDate *date.Time `json:"earliestRestoreDate,omitempty"` - // CreateMode - Specifies the mode of database creation. - // Default: regular database creation. - // Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the source database. - // OnlineSecondary/NonReadableSecondary: creates a database as a (readable or nonreadable) secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database. - // PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be specified. - // Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable database resource ID to restore. - // Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may also be specified to restore from an earlier point in time. - // RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID. - // Copy, NonReadableSecondary, OnlineSecondary and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. Possible values include: 'CreateModeCopy', 'CreateModeDefault', 'CreateModeNonReadableSecondary', 'CreateModeOnlineSecondary', 'CreateModePointInTimeRestore', 'CreateModeRecovery', 'CreateModeRestore', 'CreateModeRestoreLongTermRetentionBackup' - CreateMode CreateMode `json:"createMode,omitempty"` - // SourceDatabaseID - Conditional. If createMode is Copy, NonReadableSecondary, OnlineSecondary, PointInTimeRestore, Recovery, or Restore, then this value is required. Specifies the resource ID of the source database. If createMode is NonReadableSecondary or OnlineSecondary, the name of the source database must be the same as the new database being created. - SourceDatabaseID *string `json:"sourceDatabaseId,omitempty"` - // SourceDatabaseDeletionDate - Conditional. If createMode is Restore and sourceDatabaseId is the deleted database's original resource id when it existed (as opposed to its current restorable dropped database id), then this value is required. Specifies the time that the database was deleted. - SourceDatabaseDeletionDate *date.Time `json:"sourceDatabaseDeletionDate,omitempty"` - // RestorePointInTime - Conditional. If createMode is PointInTimeRestore, this value is required. If createMode is Restore, this value is optional. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. Must be greater than or equal to the source database's earliestRestoreDate value. - RestorePointInTime *date.Time `json:"restorePointInTime,omitempty"` - // RecoveryServicesRecoveryPointResourceID - Conditional. If createMode is RestoreLongTermRetentionBackup, then this value is required. Specifies the resource ID of the recovery point to restore from. - RecoveryServicesRecoveryPointResourceID *string `json:"recoveryServicesRecoveryPointResourceId,omitempty"` - // Edition - The edition of the database. The DatabaseEditions enumeration contains all the valid editions. If createMode is NonReadableSecondary or OnlineSecondary, this value is ignored. - // - // The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands: - // - // ```azurecli - // az sql db list-editions -l -o table - // ```` - // - // ```powershell - // Get-AzSqlServerServiceObjective -Location - // ```` - // . Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale' - Edition DatabaseEdition `json:"edition,omitempty"` - // MaxSizeBytes - The max size of the database expressed in bytes. If createMode is not Default, this value is ignored. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." - MaxSizeBytes *string `json:"maxSizeBytes,omitempty"` - // RequestedServiceObjectiveID - The configured service level objective ID of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of currentServiceObjectiveId property. If requestedServiceObjectiveId and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveId overrides the value of requestedServiceObjectiveName. - // - // The list of SKUs may vary by region and support offer. To determine the service objective ids that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API. - RequestedServiceObjectiveID *uuid.UUID `json:"requestedServiceObjectiveId,omitempty"` - // RequestedServiceObjectiveName - The name of the configured service level objective of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of serviceLevelObjective property. - // - // The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands: - // - // ```azurecli - // az sql db list-editions -l -o table - // ```` - // - // ```powershell - // Get-AzSqlServerServiceObjective -Location - // ```` - // . Possible values include: 'ServiceObjectiveNameSystem', 'ServiceObjectiveNameSystem0', 'ServiceObjectiveNameSystem1', 'ServiceObjectiveNameSystem2', 'ServiceObjectiveNameSystem3', 'ServiceObjectiveNameSystem4', 'ServiceObjectiveNameSystem2L', 'ServiceObjectiveNameSystem3L', 'ServiceObjectiveNameSystem4L', 'ServiceObjectiveNameFree', 'ServiceObjectiveNameBasic', 'ServiceObjectiveNameS0', 'ServiceObjectiveNameS1', 'ServiceObjectiveNameS2', 'ServiceObjectiveNameS3', 'ServiceObjectiveNameS4', 'ServiceObjectiveNameS6', 'ServiceObjectiveNameS7', 'ServiceObjectiveNameS9', 'ServiceObjectiveNameS12', 'ServiceObjectiveNameP1', 'ServiceObjectiveNameP2', 'ServiceObjectiveNameP3', 'ServiceObjectiveNameP4', 'ServiceObjectiveNameP6', 'ServiceObjectiveNameP11', 'ServiceObjectiveNameP15', 'ServiceObjectiveNamePRS1', 'ServiceObjectiveNamePRS2', 'ServiceObjectiveNamePRS4', 'ServiceObjectiveNamePRS6', 'ServiceObjectiveNameDW100', 'ServiceObjectiveNameDW200', 'ServiceObjectiveNameDW300', 'ServiceObjectiveNameDW400', 'ServiceObjectiveNameDW500', 'ServiceObjectiveNameDW600', 'ServiceObjectiveNameDW1000', 'ServiceObjectiveNameDW1200', 'ServiceObjectiveNameDW1000c', 'ServiceObjectiveNameDW1500', 'ServiceObjectiveNameDW1500c', 'ServiceObjectiveNameDW2000', 'ServiceObjectiveNameDW2000c', 'ServiceObjectiveNameDW3000', 'ServiceObjectiveNameDW2500c', 'ServiceObjectiveNameDW3000c', 'ServiceObjectiveNameDW6000', 'ServiceObjectiveNameDW5000c', 'ServiceObjectiveNameDW6000c', 'ServiceObjectiveNameDW7500c', 'ServiceObjectiveNameDW10000c', 'ServiceObjectiveNameDW15000c', 'ServiceObjectiveNameDW30000c', 'ServiceObjectiveNameDS100', 'ServiceObjectiveNameDS200', 'ServiceObjectiveNameDS300', 'ServiceObjectiveNameDS400', 'ServiceObjectiveNameDS500', 'ServiceObjectiveNameDS600', 'ServiceObjectiveNameDS1000', 'ServiceObjectiveNameDS1200', 'ServiceObjectiveNameDS1500', 'ServiceObjectiveNameDS2000', 'ServiceObjectiveNameElasticPool' - RequestedServiceObjectiveName ServiceObjectiveName `json:"requestedServiceObjectiveName,omitempty"` - // ServiceLevelObjective - READ-ONLY; The current service level objective of the database. Possible values include: 'ServiceObjectiveNameSystem', 'ServiceObjectiveNameSystem0', 'ServiceObjectiveNameSystem1', 'ServiceObjectiveNameSystem2', 'ServiceObjectiveNameSystem3', 'ServiceObjectiveNameSystem4', 'ServiceObjectiveNameSystem2L', 'ServiceObjectiveNameSystem3L', 'ServiceObjectiveNameSystem4L', 'ServiceObjectiveNameFree', 'ServiceObjectiveNameBasic', 'ServiceObjectiveNameS0', 'ServiceObjectiveNameS1', 'ServiceObjectiveNameS2', 'ServiceObjectiveNameS3', 'ServiceObjectiveNameS4', 'ServiceObjectiveNameS6', 'ServiceObjectiveNameS7', 'ServiceObjectiveNameS9', 'ServiceObjectiveNameS12', 'ServiceObjectiveNameP1', 'ServiceObjectiveNameP2', 'ServiceObjectiveNameP3', 'ServiceObjectiveNameP4', 'ServiceObjectiveNameP6', 'ServiceObjectiveNameP11', 'ServiceObjectiveNameP15', 'ServiceObjectiveNamePRS1', 'ServiceObjectiveNamePRS2', 'ServiceObjectiveNamePRS4', 'ServiceObjectiveNamePRS6', 'ServiceObjectiveNameDW100', 'ServiceObjectiveNameDW200', 'ServiceObjectiveNameDW300', 'ServiceObjectiveNameDW400', 'ServiceObjectiveNameDW500', 'ServiceObjectiveNameDW600', 'ServiceObjectiveNameDW1000', 'ServiceObjectiveNameDW1200', 'ServiceObjectiveNameDW1000c', 'ServiceObjectiveNameDW1500', 'ServiceObjectiveNameDW1500c', 'ServiceObjectiveNameDW2000', 'ServiceObjectiveNameDW2000c', 'ServiceObjectiveNameDW3000', 'ServiceObjectiveNameDW2500c', 'ServiceObjectiveNameDW3000c', 'ServiceObjectiveNameDW6000', 'ServiceObjectiveNameDW5000c', 'ServiceObjectiveNameDW6000c', 'ServiceObjectiveNameDW7500c', 'ServiceObjectiveNameDW10000c', 'ServiceObjectiveNameDW15000c', 'ServiceObjectiveNameDW30000c', 'ServiceObjectiveNameDS100', 'ServiceObjectiveNameDS200', 'ServiceObjectiveNameDS300', 'ServiceObjectiveNameDS400', 'ServiceObjectiveNameDS500', 'ServiceObjectiveNameDS600', 'ServiceObjectiveNameDS1000', 'ServiceObjectiveNameDS1200', 'ServiceObjectiveNameDS1500', 'ServiceObjectiveNameDS2000', 'ServiceObjectiveNameElasticPool' - ServiceLevelObjective ServiceObjectiveName `json:"serviceLevelObjective,omitempty"` - // Status - READ-ONLY; The status of the database. - Status *string `json:"status,omitempty"` - // ElasticPoolName - The name of the elastic pool the database is in. If elasticPoolName and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveName is ignored. Not supported for DataWarehouse edition. - ElasticPoolName *string `json:"elasticPoolName,omitempty"` - // DefaultSecondaryLocation - READ-ONLY; The default secondary region for this database. - DefaultSecondaryLocation *string `json:"defaultSecondaryLocation,omitempty"` - // ServiceTierAdvisors - READ-ONLY; The list of service tier advisors for this database. Expanded property - ServiceTierAdvisors *[]ServiceTierAdvisor `json:"serviceTierAdvisors,omitempty"` - // TransparentDataEncryption - READ-ONLY; The transparent data encryption info for this database. - TransparentDataEncryption *[]TransparentDataEncryption `json:"transparentDataEncryption,omitempty"` - // RecommendedIndex - READ-ONLY; The recommended indices for this database. - RecommendedIndex *[]RecommendedIndex `json:"recommendedIndex,omitempty"` - // FailoverGroupID - READ-ONLY; The resource identifier of the failover group containing this database. - FailoverGroupID *string `json:"failoverGroupId,omitempty"` - // ReadScale - Conditional. If the database is a geo-secondary, readScale indicates whether read-only connections are allowed to this database or not. Not supported for DataWarehouse edition. Possible values include: 'ReadScaleEnabled', 'ReadScaleDisabled' - ReadScale ReadScale `json:"readScale,omitempty"` - // SampleName - Indicates the name of the sample schema to apply when creating this database. If createMode is not Default, this value is ignored. Not supported for DataWarehouse edition. Possible values include: 'AdventureWorksLT' - SampleName SampleName `json:"sampleName,omitempty"` - // ZoneRedundant - Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. - ZoneRedundant *bool `json:"zoneRedundant,omitempty"` -} - -// MarshalJSON is the custom marshaler for DatabaseProperties. -func (dp DatabaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dp.Collation != nil { - objectMap["collation"] = dp.Collation - } - if dp.CreateMode != "" { - objectMap["createMode"] = dp.CreateMode - } - if dp.SourceDatabaseID != nil { - objectMap["sourceDatabaseId"] = dp.SourceDatabaseID - } - if dp.SourceDatabaseDeletionDate != nil { - objectMap["sourceDatabaseDeletionDate"] = dp.SourceDatabaseDeletionDate - } - if dp.RestorePointInTime != nil { - objectMap["restorePointInTime"] = dp.RestorePointInTime - } - if dp.RecoveryServicesRecoveryPointResourceID != nil { - objectMap["recoveryServicesRecoveryPointResourceId"] = dp.RecoveryServicesRecoveryPointResourceID - } - if dp.Edition != "" { - objectMap["edition"] = dp.Edition - } - if dp.MaxSizeBytes != nil { - objectMap["maxSizeBytes"] = dp.MaxSizeBytes - } - if dp.RequestedServiceObjectiveID != nil { - objectMap["requestedServiceObjectiveId"] = dp.RequestedServiceObjectiveID - } - if dp.RequestedServiceObjectiveName != "" { - objectMap["requestedServiceObjectiveName"] = dp.RequestedServiceObjectiveName - } - if dp.ElasticPoolName != nil { - objectMap["elasticPoolName"] = dp.ElasticPoolName - } - if dp.ReadScale != "" { - objectMap["readScale"] = dp.ReadScale - } - if dp.SampleName != "" { - objectMap["sampleName"] = dp.SampleName - } - if dp.ZoneRedundant != nil { - objectMap["zoneRedundant"] = dp.ZoneRedundant - } - return json.Marshal(objectMap) -} - -// DatabasesCreateImportOperationFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type DatabasesCreateImportOperationFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DatabasesClient) (ImportExportResponse, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DatabasesCreateImportOperationFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DatabasesCreateImportOperationFuture.Result. -func (future *DatabasesCreateImportOperationFuture) result(client DatabasesClient) (ier ImportExportResponse, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesCreateImportOperationFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ier.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.DatabasesCreateImportOperationFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ier.Response.Response, err = future.GetResult(sender); err == nil && ier.Response.Response.StatusCode != http.StatusNoContent { - ier, err = client.CreateImportOperationResponder(ier.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesCreateImportOperationFuture", "Result", ier.Response.Response, "Failure responding to request") - } - } - return -} - -// DatabasesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type DatabasesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DatabasesClient) (Database, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DatabasesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DatabasesCreateOrUpdateFuture.Result. -func (future *DatabasesCreateOrUpdateFuture) result(client DatabasesClient) (d Database, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - d.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.DatabasesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent { - d, err = client.CreateOrUpdateResponder(d.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request") - } - } - return -} - -// DatabaseSecurityAlertPolicy contains information about a database Threat Detection policy. -type DatabaseSecurityAlertPolicy struct { - autorest.Response `json:"-"` - // Location - The geo-location where the resource lives - Location *string `json:"location,omitempty"` - // Kind - READ-ONLY; Resource kind. - Kind *string `json:"kind,omitempty"` - // DatabaseSecurityAlertPolicyProperties - Properties of the security alert policy. - *DatabaseSecurityAlertPolicyProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for DatabaseSecurityAlertPolicy. -func (dsap DatabaseSecurityAlertPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dsap.Location != nil { - objectMap["location"] = dsap.Location - } - if dsap.DatabaseSecurityAlertPolicyProperties != nil { - objectMap["properties"] = dsap.DatabaseSecurityAlertPolicyProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for DatabaseSecurityAlertPolicy struct. -func (dsap *DatabaseSecurityAlertPolicy) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - dsap.Location = &location - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - dsap.Kind = &kind - } - case "properties": - if v != nil { - var databaseSecurityAlertPolicyProperties DatabaseSecurityAlertPolicyProperties - err = json.Unmarshal(*v, &databaseSecurityAlertPolicyProperties) - if err != nil { - return err - } - dsap.DatabaseSecurityAlertPolicyProperties = &databaseSecurityAlertPolicyProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - dsap.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - dsap.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - dsap.Type = &typeVar - } - } - } - - return nil -} - -// DatabaseSecurityAlertPolicyProperties properties for a database Threat Detection policy. -type DatabaseSecurityAlertPolicyProperties struct { - // State - Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required. Possible values include: 'SecurityAlertPolicyStateNew', 'SecurityAlertPolicyStateEnabled', 'SecurityAlertPolicyStateDisabled' - State SecurityAlertPolicyState `json:"state,omitempty"` - // DisabledAlerts - Specifies the semicolon-separated list of alerts that are disabled, or empty string to disable no alerts. Possible values: Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; Data_Exfiltration; Unsafe_Action. - DisabledAlerts *string `json:"disabledAlerts,omitempty"` - // EmailAddresses - Specifies the semicolon-separated list of e-mail addresses to which the alert is sent. - EmailAddresses *string `json:"emailAddresses,omitempty"` - // EmailAccountAdmins - Specifies that the alert is sent to the account administrators. Possible values include: 'SecurityAlertPolicyEmailAccountAdminsEnabled', 'SecurityAlertPolicyEmailAccountAdminsDisabled' - EmailAccountAdmins SecurityAlertPolicyEmailAccountAdmins `json:"emailAccountAdmins,omitempty"` - // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. If state is Enabled, storageEndpoint is required. - StorageEndpoint *string `json:"storageEndpoint,omitempty"` - // StorageAccountAccessKey - Specifies the identifier key of the Threat Detection audit storage account. If state is Enabled, storageAccountAccessKey is required. - StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` - // RetentionDays - Specifies the number of days to keep in the Threat Detection audit logs. - RetentionDays *int32 `json:"retentionDays,omitempty"` - // UseServerDefault - Specifies whether to use the default server policy. Possible values include: 'SecurityAlertPolicyUseServerDefaultEnabled', 'SecurityAlertPolicyUseServerDefaultDisabled' - UseServerDefault SecurityAlertPolicyUseServerDefault `json:"useServerDefault,omitempty"` -} - -// DatabasesExportFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type DatabasesExportFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DatabasesClient) (ImportExportResponse, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DatabasesExportFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DatabasesExportFuture.Result. -func (future *DatabasesExportFuture) result(client DatabasesClient) (ier ImportExportResponse, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesExportFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ier.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.DatabasesExportFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ier.Response.Response, err = future.GetResult(sender); err == nil && ier.Response.Response.StatusCode != http.StatusNoContent { - ier, err = client.ExportResponder(ier.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesExportFuture", "Result", ier.Response.Response, "Failure responding to request") - } - } - return -} - -// DatabasesImportFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type DatabasesImportFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DatabasesClient) (ImportExportResponse, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DatabasesImportFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DatabasesImportFuture.Result. -func (future *DatabasesImportFuture) result(client DatabasesClient) (ier ImportExportResponse, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesImportFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ier.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.DatabasesImportFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ier.Response.Response, err = future.GetResult(sender); err == nil && ier.Response.Response.StatusCode != http.StatusNoContent { - ier, err = client.ImportResponder(ier.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesImportFuture", "Result", ier.Response.Response, "Failure responding to request") - } - } - return -} - -// DatabasesPauseFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type DatabasesPauseFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DatabasesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DatabasesPauseFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DatabasesPauseFuture.Result. -func (future *DatabasesPauseFuture) result(client DatabasesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesPauseFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.DatabasesPauseFuture") - return - } - ar.Response = future.Response() - return -} - -// DatabasesResumeFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type DatabasesResumeFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DatabasesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DatabasesResumeFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DatabasesResumeFuture.Result. -func (future *DatabasesResumeFuture) result(client DatabasesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesResumeFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.DatabasesResumeFuture") - return - } - ar.Response = future.Response() - return -} - -// DatabasesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type DatabasesUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DatabasesClient) (Database, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DatabasesUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DatabasesUpdateFuture.Result. -func (future *DatabasesUpdateFuture) result(client DatabasesClient) (d Database, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - d.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.DatabasesUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent { - d, err = client.UpdateResponder(d.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesUpdateFuture", "Result", d.Response.Response, "Failure responding to request") - } - } - return -} - -// DatabaseUpdate represents a database update. -type DatabaseUpdate struct { - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // DatabaseProperties - The properties representing the resource. - *DatabaseProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for DatabaseUpdate. -func (du DatabaseUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if du.Tags != nil { - objectMap["tags"] = du.Tags - } - if du.DatabaseProperties != nil { - objectMap["properties"] = du.DatabaseProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for DatabaseUpdate struct. -func (du *DatabaseUpdate) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - du.Tags = tags - } - case "properties": - if v != nil { - var databaseProperties DatabaseProperties - err = json.Unmarshal(*v, &databaseProperties) - if err != nil { - return err - } - du.DatabaseProperties = &databaseProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - du.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - du.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - du.Type = &typeVar - } - } - } - - return nil -} - -// DatabaseUsage the database usages. -type DatabaseUsage struct { - // Name - READ-ONLY; The name of the usage metric. - Name *string `json:"name,omitempty"` - // ResourceName - READ-ONLY; The name of the resource. - ResourceName *string `json:"resourceName,omitempty"` - // DisplayName - READ-ONLY; The usage metric display name. - DisplayName *string `json:"displayName,omitempty"` - // CurrentValue - READ-ONLY; The current value of the usage metric. - CurrentValue *float64 `json:"currentValue,omitempty"` - // Limit - READ-ONLY; The current limit of the usage metric. - Limit *float64 `json:"limit,omitempty"` - // Unit - READ-ONLY; The units of the usage metric. - Unit *string `json:"unit,omitempty"` - // NextResetTime - READ-ONLY; The next reset time for the usage metric (ISO8601 format). - NextResetTime *date.Time `json:"nextResetTime,omitempty"` -} - -// MarshalJSON is the custom marshaler for DatabaseUsage. -func (du DatabaseUsage) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// DatabaseUsageListResult the response to a list database metrics request. -type DatabaseUsageListResult struct { - autorest.Response `json:"-"` - // Value - The list of database usages for the database. - Value *[]DatabaseUsage `json:"value,omitempty"` -} - -// DatabaseVulnerabilityAssessment a database vulnerability assessment. -type DatabaseVulnerabilityAssessment struct { - autorest.Response `json:"-"` - // DatabaseVulnerabilityAssessmentProperties - Resource properties. - *DatabaseVulnerabilityAssessmentProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for DatabaseVulnerabilityAssessment. -func (dva DatabaseVulnerabilityAssessment) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dva.DatabaseVulnerabilityAssessmentProperties != nil { - objectMap["properties"] = dva.DatabaseVulnerabilityAssessmentProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for DatabaseVulnerabilityAssessment struct. -func (dva *DatabaseVulnerabilityAssessment) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var databaseVulnerabilityAssessmentProperties DatabaseVulnerabilityAssessmentProperties - err = json.Unmarshal(*v, &databaseVulnerabilityAssessmentProperties) - if err != nil { - return err - } - dva.DatabaseVulnerabilityAssessmentProperties = &databaseVulnerabilityAssessmentProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - dva.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - dva.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - dva.Type = &typeVar - } - } - } - - return nil -} - -// DatabaseVulnerabilityAssessmentListResult a list of the database's vulnerability assessments. -type DatabaseVulnerabilityAssessmentListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]DatabaseVulnerabilityAssessment `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for DatabaseVulnerabilityAssessmentListResult. -func (dvalr DatabaseVulnerabilityAssessmentListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// DatabaseVulnerabilityAssessmentListResultIterator provides access to a complete listing of -// DatabaseVulnerabilityAssessment values. -type DatabaseVulnerabilityAssessmentListResultIterator struct { - i int - page DatabaseVulnerabilityAssessmentListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *DatabaseVulnerabilityAssessmentListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseVulnerabilityAssessmentListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *DatabaseVulnerabilityAssessmentListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter DatabaseVulnerabilityAssessmentListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter DatabaseVulnerabilityAssessmentListResultIterator) Response() DatabaseVulnerabilityAssessmentListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter DatabaseVulnerabilityAssessmentListResultIterator) Value() DatabaseVulnerabilityAssessment { - if !iter.page.NotDone() { - return DatabaseVulnerabilityAssessment{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the DatabaseVulnerabilityAssessmentListResultIterator type. -func NewDatabaseVulnerabilityAssessmentListResultIterator(page DatabaseVulnerabilityAssessmentListResultPage) DatabaseVulnerabilityAssessmentListResultIterator { - return DatabaseVulnerabilityAssessmentListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (dvalr DatabaseVulnerabilityAssessmentListResult) IsEmpty() bool { - return dvalr.Value == nil || len(*dvalr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (dvalr DatabaseVulnerabilityAssessmentListResult) hasNextLink() bool { - return dvalr.NextLink != nil && len(*dvalr.NextLink) != 0 -} - -// databaseVulnerabilityAssessmentListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (dvalr DatabaseVulnerabilityAssessmentListResult) databaseVulnerabilityAssessmentListResultPreparer(ctx context.Context) (*http.Request, error) { - if !dvalr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(dvalr.NextLink))) -} - -// DatabaseVulnerabilityAssessmentListResultPage contains a page of DatabaseVulnerabilityAssessment values. -type DatabaseVulnerabilityAssessmentListResultPage struct { - fn func(context.Context, DatabaseVulnerabilityAssessmentListResult) (DatabaseVulnerabilityAssessmentListResult, error) - dvalr DatabaseVulnerabilityAssessmentListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *DatabaseVulnerabilityAssessmentListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseVulnerabilityAssessmentListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.dvalr) - if err != nil { - return err - } - page.dvalr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *DatabaseVulnerabilityAssessmentListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page DatabaseVulnerabilityAssessmentListResultPage) NotDone() bool { - return !page.dvalr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page DatabaseVulnerabilityAssessmentListResultPage) Response() DatabaseVulnerabilityAssessmentListResult { - return page.dvalr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page DatabaseVulnerabilityAssessmentListResultPage) Values() []DatabaseVulnerabilityAssessment { - if page.dvalr.IsEmpty() { - return nil - } - return *page.dvalr.Value -} - -// Creates a new instance of the DatabaseVulnerabilityAssessmentListResultPage type. -func NewDatabaseVulnerabilityAssessmentListResultPage(cur DatabaseVulnerabilityAssessmentListResult, getNextPage func(context.Context, DatabaseVulnerabilityAssessmentListResult) (DatabaseVulnerabilityAssessmentListResult, error)) DatabaseVulnerabilityAssessmentListResultPage { - return DatabaseVulnerabilityAssessmentListResultPage{ - fn: getNextPage, - dvalr: cur, - } -} - -// DatabaseVulnerabilityAssessmentProperties properties of a database Vulnerability Assessment. -type DatabaseVulnerabilityAssessmentProperties struct { - // StorageContainerPath - A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It is required if server level vulnerability assessment policy doesn't set - StorageContainerPath *string `json:"storageContainerPath,omitempty"` - // StorageContainerSasKey - A shared access signature (SAS Key) that has read and write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required. - StorageContainerSasKey *string `json:"storageContainerSasKey,omitempty"` - // StorageAccountAccessKey - Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. - StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` - // RecurringScans - The recurring scans settings - RecurringScans *VulnerabilityAssessmentRecurringScansProperties `json:"recurringScans,omitempty"` -} - -// DatabaseVulnerabilityAssessmentRuleBaseline a database vulnerability assessment rule baseline. -type DatabaseVulnerabilityAssessmentRuleBaseline struct { - autorest.Response `json:"-"` - // DatabaseVulnerabilityAssessmentRuleBaselineProperties - Resource properties. - *DatabaseVulnerabilityAssessmentRuleBaselineProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for DatabaseVulnerabilityAssessmentRuleBaseline. -func (dvarb DatabaseVulnerabilityAssessmentRuleBaseline) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dvarb.DatabaseVulnerabilityAssessmentRuleBaselineProperties != nil { - objectMap["properties"] = dvarb.DatabaseVulnerabilityAssessmentRuleBaselineProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for DatabaseVulnerabilityAssessmentRuleBaseline struct. -func (dvarb *DatabaseVulnerabilityAssessmentRuleBaseline) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var databaseVulnerabilityAssessmentRuleBaselineProperties DatabaseVulnerabilityAssessmentRuleBaselineProperties - err = json.Unmarshal(*v, &databaseVulnerabilityAssessmentRuleBaselineProperties) - if err != nil { - return err - } - dvarb.DatabaseVulnerabilityAssessmentRuleBaselineProperties = &databaseVulnerabilityAssessmentRuleBaselineProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - dvarb.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - dvarb.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - dvarb.Type = &typeVar - } - } - } - - return nil -} - -// DatabaseVulnerabilityAssessmentRuleBaselineItem properties for an Azure SQL Database Vulnerability -// Assessment rule baseline's result. -type DatabaseVulnerabilityAssessmentRuleBaselineItem struct { - // Result - The rule baseline result - Result *[]string `json:"result,omitempty"` -} - -// DatabaseVulnerabilityAssessmentRuleBaselineProperties properties of a database Vulnerability Assessment -// rule baseline. -type DatabaseVulnerabilityAssessmentRuleBaselineProperties struct { - // BaselineResults - The rule baseline result - BaselineResults *[]DatabaseVulnerabilityAssessmentRuleBaselineItem `json:"baselineResults,omitempty"` -} - -// DataMaskingPolicy represents a database data masking policy. -type DataMaskingPolicy struct { - autorest.Response `json:"-"` - // DataMaskingPolicyProperties - The properties of the data masking policy. - *DataMaskingPolicyProperties `json:"properties,omitempty"` - // Location - READ-ONLY; The location of the data masking policy. - Location *string `json:"location,omitempty"` - // Kind - READ-ONLY; The kind of data masking policy. Metadata, used for Azure portal. - Kind *string `json:"kind,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for DataMaskingPolicy. -func (dmp DataMaskingPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dmp.DataMaskingPolicyProperties != nil { - objectMap["properties"] = dmp.DataMaskingPolicyProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for DataMaskingPolicy struct. -func (dmp *DataMaskingPolicy) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var dataMaskingPolicyProperties DataMaskingPolicyProperties - err = json.Unmarshal(*v, &dataMaskingPolicyProperties) - if err != nil { - return err - } - dmp.DataMaskingPolicyProperties = &dataMaskingPolicyProperties - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - dmp.Location = &location - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - dmp.Kind = &kind - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - dmp.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - dmp.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - dmp.Type = &typeVar - } - } - } - - return nil -} - -// DataMaskingPolicyProperties the properties of a database data masking policy. -type DataMaskingPolicyProperties struct { - // DataMaskingState - The state of the data masking policy. Possible values include: 'DataMaskingStateDisabled', 'DataMaskingStateEnabled' - DataMaskingState DataMaskingState `json:"dataMaskingState,omitempty"` - // ExemptPrincipals - The list of the exempt principals. Specifies the semicolon-separated list of database users for which the data masking policy does not apply. The specified users receive data results without masking for all of the database queries. - ExemptPrincipals *string `json:"exemptPrincipals,omitempty"` - // ApplicationPrincipals - READ-ONLY; The list of the application principals. This is a legacy parameter and is no longer used. - ApplicationPrincipals *string `json:"applicationPrincipals,omitempty"` - // MaskingLevel - READ-ONLY; The masking level. This is a legacy parameter and is no longer used. - MaskingLevel *string `json:"maskingLevel,omitempty"` -} - -// MarshalJSON is the custom marshaler for DataMaskingPolicyProperties. -func (dmpp DataMaskingPolicyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dmpp.DataMaskingState != "" { - objectMap["dataMaskingState"] = dmpp.DataMaskingState - } - if dmpp.ExemptPrincipals != nil { - objectMap["exemptPrincipals"] = dmpp.ExemptPrincipals - } - return json.Marshal(objectMap) -} - -// DataMaskingRule represents a database data masking rule. -type DataMaskingRule struct { - autorest.Response `json:"-"` - // DataMaskingRuleProperties - The properties of the resource. - *DataMaskingRuleProperties `json:"properties,omitempty"` - // Location - READ-ONLY; The location of the data masking rule. - Location *string `json:"location,omitempty"` - // Kind - READ-ONLY; The kind of Data Masking Rule. Metadata, used for Azure portal. - Kind *string `json:"kind,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for DataMaskingRule. -func (dmr DataMaskingRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dmr.DataMaskingRuleProperties != nil { - objectMap["properties"] = dmr.DataMaskingRuleProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for DataMaskingRule struct. -func (dmr *DataMaskingRule) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var dataMaskingRuleProperties DataMaskingRuleProperties - err = json.Unmarshal(*v, &dataMaskingRuleProperties) - if err != nil { - return err - } - dmr.DataMaskingRuleProperties = &dataMaskingRuleProperties - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - dmr.Location = &location - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - dmr.Kind = &kind - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - dmr.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - dmr.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - dmr.Type = &typeVar - } - } - } - - return nil -} - -// DataMaskingRuleListResult the response to a list data masking rules request. -type DataMaskingRuleListResult struct { - autorest.Response `json:"-"` - // Value - The list of database data masking rules. - Value *[]DataMaskingRule `json:"value,omitempty"` -} - -// DataMaskingRuleProperties the properties of a database data masking rule. -type DataMaskingRuleProperties struct { - // ID - READ-ONLY; The rule Id. - ID *string `json:"id,omitempty"` - // AliasName - The alias name. This is a legacy parameter and is no longer used. - AliasName *string `json:"aliasName,omitempty"` - // RuleState - The rule state. Used to delete a rule. To delete an existing rule, specify the schemaName, tableName, columnName, maskingFunction, and specify ruleState as disabled. However, if the rule doesn't already exist, the rule will be created with ruleState set to enabled, regardless of the provided value of ruleState. Possible values include: 'DataMaskingRuleStateDisabled', 'DataMaskingRuleStateEnabled' - RuleState DataMaskingRuleState `json:"ruleState,omitempty"` - // SchemaName - The schema name on which the data masking rule is applied. - SchemaName *string `json:"schemaName,omitempty"` - // TableName - The table name on which the data masking rule is applied. - TableName *string `json:"tableName,omitempty"` - // ColumnName - The column name on which the data masking rule is applied. - ColumnName *string `json:"columnName,omitempty"` - // MaskingFunction - The masking function that is used for the data masking rule. Possible values include: 'DataMaskingFunctionDefault', 'DataMaskingFunctionCCN', 'DataMaskingFunctionEmail', 'DataMaskingFunctionNumber', 'DataMaskingFunctionSSN', 'DataMaskingFunctionText' - MaskingFunction DataMaskingFunction `json:"maskingFunction,omitempty"` - // NumberFrom - The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. - NumberFrom *string `json:"numberFrom,omitempty"` - // NumberTo - The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. - NumberTo *string `json:"numberTo,omitempty"` - // PrefixSize - If maskingFunction is set to Text, the number of characters to show unmasked in the beginning of the string. Otherwise, this parameter will be ignored. - PrefixSize *string `json:"prefixSize,omitempty"` - // SuffixSize - If maskingFunction is set to Text, the number of characters to show unmasked at the end of the string. Otherwise, this parameter will be ignored. - SuffixSize *string `json:"suffixSize,omitempty"` - // ReplacementString - If maskingFunction is set to Text, the character to use for masking the unexposed part of the string. Otherwise, this parameter will be ignored. - ReplacementString *string `json:"replacementString,omitempty"` -} - -// MarshalJSON is the custom marshaler for DataMaskingRuleProperties. -func (dmrp DataMaskingRuleProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dmrp.AliasName != nil { - objectMap["aliasName"] = dmrp.AliasName - } - if dmrp.RuleState != "" { - objectMap["ruleState"] = dmrp.RuleState - } - if dmrp.SchemaName != nil { - objectMap["schemaName"] = dmrp.SchemaName - } - if dmrp.TableName != nil { - objectMap["tableName"] = dmrp.TableName - } - if dmrp.ColumnName != nil { - objectMap["columnName"] = dmrp.ColumnName - } - if dmrp.MaskingFunction != "" { - objectMap["maskingFunction"] = dmrp.MaskingFunction - } - if dmrp.NumberFrom != nil { - objectMap["numberFrom"] = dmrp.NumberFrom - } - if dmrp.NumberTo != nil { - objectMap["numberTo"] = dmrp.NumberTo - } - if dmrp.PrefixSize != nil { - objectMap["prefixSize"] = dmrp.PrefixSize - } - if dmrp.SuffixSize != nil { - objectMap["suffixSize"] = dmrp.SuffixSize - } - if dmrp.ReplacementString != nil { - objectMap["replacementString"] = dmrp.ReplacementString - } - return json.Marshal(objectMap) -} - -// DataWarehouseUserActivities user activities of a data warehouse -type DataWarehouseUserActivities struct { - autorest.Response `json:"-"` - // DataWarehouseUserActivitiesProperties - Resource properties. - *DataWarehouseUserActivitiesProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for DataWarehouseUserActivities. -func (dwua DataWarehouseUserActivities) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dwua.DataWarehouseUserActivitiesProperties != nil { - objectMap["properties"] = dwua.DataWarehouseUserActivitiesProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for DataWarehouseUserActivities struct. -func (dwua *DataWarehouseUserActivities) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var dataWarehouseUserActivitiesProperties DataWarehouseUserActivitiesProperties - err = json.Unmarshal(*v, &dataWarehouseUserActivitiesProperties) - if err != nil { - return err - } - dwua.DataWarehouseUserActivitiesProperties = &dataWarehouseUserActivitiesProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - dwua.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - dwua.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - dwua.Type = &typeVar - } - } - } - - return nil -} - -// DataWarehouseUserActivitiesProperties user activities of a data warehouse. This currently includes the -// count of running or suspended queries. For more information, please view the sys.dm_pdw_exec_requests -// dynamic management view (DMV). -type DataWarehouseUserActivitiesProperties struct { - // ActiveQueriesCount - READ-ONLY; Count of running and suspended queries. - ActiveQueriesCount *int32 `json:"activeQueriesCount,omitempty"` -} - -// MarshalJSON is the custom marshaler for DataWarehouseUserActivitiesProperties. -func (dwuap DataWarehouseUserActivitiesProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// EditionCapability the database edition capabilities. -type EditionCapability struct { - // Name - READ-ONLY; The edition name. - Name *string `json:"name,omitempty"` - // Status - READ-ONLY; The status of the edition. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled' - Status CapabilityStatus `json:"status,omitempty"` - // SupportedServiceLevelObjectives - READ-ONLY; The list of supported service objectives for the edition. - SupportedServiceLevelObjectives *[]ServiceObjectiveCapability `json:"supportedServiceLevelObjectives,omitempty"` - // ZoneRedundant - READ-ONLY; Whether or not zone redundancy is supported for the edition. - ZoneRedundant *bool `json:"zoneRedundant,omitempty"` -} - -// MarshalJSON is the custom marshaler for EditionCapability. -func (ec EditionCapability) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ElasticPool represents a database elastic pool. -type ElasticPool struct { - autorest.Response `json:"-"` - // ElasticPoolProperties - The properties representing the resource. - *ElasticPoolProperties `json:"properties,omitempty"` - // Kind - READ-ONLY; Kind of elastic pool. This is metadata used for the Azure portal experience. - Kind *string `json:"kind,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ElasticPool. -func (ep ElasticPool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ep.ElasticPoolProperties != nil { - objectMap["properties"] = ep.ElasticPoolProperties - } - if ep.Location != nil { - objectMap["location"] = ep.Location - } - if ep.Tags != nil { - objectMap["tags"] = ep.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ElasticPool struct. -func (ep *ElasticPool) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var elasticPoolProperties ElasticPoolProperties - err = json.Unmarshal(*v, &elasticPoolProperties) - if err != nil { - return err - } - ep.ElasticPoolProperties = &elasticPoolProperties - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - ep.Kind = &kind - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - ep.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - ep.Tags = tags - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ep.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ep.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ep.Type = &typeVar - } - } - } - - return nil -} - -// ElasticPoolActivity represents the activity on an elastic pool. -type ElasticPoolActivity struct { - // Location - The geo-location where the resource lives - Location *string `json:"location,omitempty"` - // ElasticPoolActivityProperties - The properties representing the resource. - *ElasticPoolActivityProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ElasticPoolActivity. -func (epa ElasticPoolActivity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if epa.Location != nil { - objectMap["location"] = epa.Location - } - if epa.ElasticPoolActivityProperties != nil { - objectMap["properties"] = epa.ElasticPoolActivityProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ElasticPoolActivity struct. -func (epa *ElasticPoolActivity) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - epa.Location = &location - } - case "properties": - if v != nil { - var elasticPoolActivityProperties ElasticPoolActivityProperties - err = json.Unmarshal(*v, &elasticPoolActivityProperties) - if err != nil { - return err - } - epa.ElasticPoolActivityProperties = &elasticPoolActivityProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - epa.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - epa.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - epa.Type = &typeVar - } - } - } - - return nil -} - -// ElasticPoolActivityListResult represents the response to a list elastic pool activity request. -type ElasticPoolActivityListResult struct { - autorest.Response `json:"-"` - // Value - The list of elastic pool activities. - Value *[]ElasticPoolActivity `json:"value,omitempty"` -} - -// ElasticPoolActivityProperties represents the properties of an elastic pool. -type ElasticPoolActivityProperties struct { - // EndTime - READ-ONLY; The time the operation finished (ISO8601 format). - EndTime *date.Time `json:"endTime,omitempty"` - // ErrorCode - READ-ONLY; The error code if available. - ErrorCode *int32 `json:"errorCode,omitempty"` - // ErrorMessage - READ-ONLY; The error message if available. - ErrorMessage *string `json:"errorMessage,omitempty"` - // ErrorSeverity - READ-ONLY; The error severity if available. - ErrorSeverity *int32 `json:"errorSeverity,omitempty"` - // Operation - READ-ONLY; The operation name. - Operation *string `json:"operation,omitempty"` - // OperationID - READ-ONLY; The unique operation ID. - OperationID *uuid.UUID `json:"operationId,omitempty"` - // PercentComplete - READ-ONLY; The percentage complete if available. - PercentComplete *int32 `json:"percentComplete,omitempty"` - // RequestedDatabaseDtuMax - READ-ONLY; The requested max DTU per database if available. - RequestedDatabaseDtuMax *int32 `json:"requestedDatabaseDtuMax,omitempty"` - // RequestedDatabaseDtuMin - READ-ONLY; The requested min DTU per database if available. - RequestedDatabaseDtuMin *int32 `json:"requestedDatabaseDtuMin,omitempty"` - // RequestedDtu - READ-ONLY; The requested DTU for the pool if available. - RequestedDtu *int32 `json:"requestedDtu,omitempty"` - // RequestedElasticPoolName - READ-ONLY; The requested name for the elastic pool if available. - RequestedElasticPoolName *string `json:"requestedElasticPoolName,omitempty"` - // RequestedStorageLimitInGB - READ-ONLY; The requested storage limit for the pool in GB if available. - RequestedStorageLimitInGB *int64 `json:"requestedStorageLimitInGB,omitempty"` - // ElasticPoolName - READ-ONLY; The name of the elastic pool. - ElasticPoolName *string `json:"elasticPoolName,omitempty"` - // ServerName - READ-ONLY; The name of the server the elastic pool is in. - ServerName *string `json:"serverName,omitempty"` - // StartTime - READ-ONLY; The time the operation started (ISO8601 format). - StartTime *date.Time `json:"startTime,omitempty"` - // State - READ-ONLY; The current state of the operation. - State *string `json:"state,omitempty"` - // RequestedStorageLimitInMB - READ-ONLY; The requested storage limit in MB. - RequestedStorageLimitInMB *int32 `json:"requestedStorageLimitInMB,omitempty"` - // RequestedDatabaseDtuGuarantee - READ-ONLY; The requested per database DTU guarantee. - RequestedDatabaseDtuGuarantee *int32 `json:"requestedDatabaseDtuGuarantee,omitempty"` - // RequestedDatabaseDtuCap - READ-ONLY; The requested per database DTU cap. - RequestedDatabaseDtuCap *int32 `json:"requestedDatabaseDtuCap,omitempty"` - // RequestedDtuGuarantee - READ-ONLY; The requested DTU guarantee. - RequestedDtuGuarantee *int32 `json:"requestedDtuGuarantee,omitempty"` -} - -// MarshalJSON is the custom marshaler for ElasticPoolActivityProperties. -func (epap ElasticPoolActivityProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ElasticPoolDatabaseActivity represents the activity on an elastic pool. -type ElasticPoolDatabaseActivity struct { - // Location - The geo-location where the resource lives - Location *string `json:"location,omitempty"` - // ElasticPoolDatabaseActivityProperties - The properties representing the resource. - *ElasticPoolDatabaseActivityProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ElasticPoolDatabaseActivity. -func (epda ElasticPoolDatabaseActivity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if epda.Location != nil { - objectMap["location"] = epda.Location - } - if epda.ElasticPoolDatabaseActivityProperties != nil { - objectMap["properties"] = epda.ElasticPoolDatabaseActivityProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ElasticPoolDatabaseActivity struct. -func (epda *ElasticPoolDatabaseActivity) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - epda.Location = &location - } - case "properties": - if v != nil { - var elasticPoolDatabaseActivityProperties ElasticPoolDatabaseActivityProperties - err = json.Unmarshal(*v, &elasticPoolDatabaseActivityProperties) - if err != nil { - return err - } - epda.ElasticPoolDatabaseActivityProperties = &elasticPoolDatabaseActivityProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - epda.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - epda.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - epda.Type = &typeVar - } - } - } - - return nil -} - -// ElasticPoolDatabaseActivityListResult represents the response to a list elastic pool database activity -// request. -type ElasticPoolDatabaseActivityListResult struct { - autorest.Response `json:"-"` - // Value - The list of elastic pool database activities. - Value *[]ElasticPoolDatabaseActivity `json:"value,omitempty"` -} - -// ElasticPoolDatabaseActivityProperties represents the properties of an elastic pool database activity. -type ElasticPoolDatabaseActivityProperties struct { - // DatabaseName - READ-ONLY; The database name. - DatabaseName *string `json:"databaseName,omitempty"` - // EndTime - READ-ONLY; The time the operation finished (ISO8601 format). - EndTime *date.Time `json:"endTime,omitempty"` - // ErrorCode - READ-ONLY; The error code if available. - ErrorCode *int32 `json:"errorCode,omitempty"` - // ErrorMessage - READ-ONLY; The error message if available. - ErrorMessage *string `json:"errorMessage,omitempty"` - // ErrorSeverity - READ-ONLY; The error severity if available. - ErrorSeverity *int32 `json:"errorSeverity,omitempty"` - // Operation - READ-ONLY; The operation name. - Operation *string `json:"operation,omitempty"` - // OperationID - READ-ONLY; The unique operation ID. - OperationID *uuid.UUID `json:"operationId,omitempty"` - // PercentComplete - READ-ONLY; The percentage complete if available. - PercentComplete *int32 `json:"percentComplete,omitempty"` - // RequestedElasticPoolName - READ-ONLY; The name for the elastic pool the database is moving into if available. - RequestedElasticPoolName *string `json:"requestedElasticPoolName,omitempty"` - // CurrentElasticPoolName - READ-ONLY; The name of the current elastic pool the database is in if available. - CurrentElasticPoolName *string `json:"currentElasticPoolName,omitempty"` - // CurrentServiceObjective - READ-ONLY; The name of the current service objective if available. - CurrentServiceObjective *string `json:"currentServiceObjective,omitempty"` - // RequestedServiceObjective - READ-ONLY; The name of the requested service objective if available. - RequestedServiceObjective *string `json:"requestedServiceObjective,omitempty"` - // ServerName - READ-ONLY; The name of the server the elastic pool is in. - ServerName *string `json:"serverName,omitempty"` - // StartTime - READ-ONLY; The time the operation started (ISO8601 format). - StartTime *date.Time `json:"startTime,omitempty"` - // State - READ-ONLY; The current state of the operation. - State *string `json:"state,omitempty"` -} - -// MarshalJSON is the custom marshaler for ElasticPoolDatabaseActivityProperties. -func (epdap ElasticPoolDatabaseActivityProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ElasticPoolDtuCapability the Elastic Pool DTU capability. -type ElasticPoolDtuCapability struct { - // Limit - READ-ONLY; The maximum size of the database (see 'unit' for the units). - Limit *int64 `json:"limit,omitempty"` - // MaxDatabaseCount - READ-ONLY; The maximum number of databases supported. - MaxDatabaseCount *int64 `json:"maxDatabaseCount,omitempty"` - // Status - READ-ONLY; The status of the capability. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled' - Status CapabilityStatus `json:"status,omitempty"` - // SupportedMaxSizes - READ-ONLY; The list of supported max sizes. - SupportedMaxSizes *[]MaxSizeCapability `json:"supportedMaxSizes,omitempty"` - // IncludedMaxSize - READ-ONLY; The included (free) max size for this service level objective. - IncludedMaxSize *MaxSizeCapability `json:"includedMaxSize,omitempty"` - // SupportedPerDatabaseMaxSizes - READ-ONLY; The list of supported max database sizes. - SupportedPerDatabaseMaxSizes *[]MaxSizeCapability `json:"supportedPerDatabaseMaxSizes,omitempty"` - // SupportedPerDatabaseMaxDtus - READ-ONLY; The list of supported max database DTUs. - SupportedPerDatabaseMaxDtus *[]ElasticPoolPerDatabaseMaxDtuCapability `json:"supportedPerDatabaseMaxDtus,omitempty"` -} - -// MarshalJSON is the custom marshaler for ElasticPoolDtuCapability. -func (epdc ElasticPoolDtuCapability) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ElasticPoolEditionCapability the elastic pool edition capabilities. -type ElasticPoolEditionCapability struct { - // Name - READ-ONLY; The elastic pool edition name. - Name *string `json:"name,omitempty"` - // Status - READ-ONLY; The status of the elastic pool edition. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled' - Status CapabilityStatus `json:"status,omitempty"` - // SupportedElasticPoolDtus - READ-ONLY; The list of supported elastic pool DTU levels for the edition. - SupportedElasticPoolDtus *[]ElasticPoolDtuCapability `json:"supportedElasticPoolDtus,omitempty"` - // ZoneRedundant - READ-ONLY; Whether or not zone redundancy is supported for the edition. - ZoneRedundant *bool `json:"zoneRedundant,omitempty"` -} - -// MarshalJSON is the custom marshaler for ElasticPoolEditionCapability. -func (epec ElasticPoolEditionCapability) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ElasticPoolListResult represents the response to a list elastic pool request. -type ElasticPoolListResult struct { - autorest.Response `json:"-"` - // Value - The list of elastic pools hosted in the server. - Value *[]ElasticPool `json:"value,omitempty"` -} - -// ElasticPoolPerDatabaseMaxDtuCapability the max per-database DTU capability. -type ElasticPoolPerDatabaseMaxDtuCapability struct { - // Limit - READ-ONLY; The maximum DTUs per database. - Limit *int64 `json:"limit,omitempty"` - // Status - READ-ONLY; The status of the capability. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled' - Status CapabilityStatus `json:"status,omitempty"` - // SupportedPerDatabaseMinDtus - READ-ONLY; The list of supported min database DTUs. - SupportedPerDatabaseMinDtus *[]ElasticPoolPerDatabaseMinDtuCapability `json:"supportedPerDatabaseMinDtus,omitempty"` -} - -// MarshalJSON is the custom marshaler for ElasticPoolPerDatabaseMaxDtuCapability. -func (eppdmdc ElasticPoolPerDatabaseMaxDtuCapability) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ElasticPoolPerDatabaseMinDtuCapability the minimum per-database DTU capability. -type ElasticPoolPerDatabaseMinDtuCapability struct { - // Limit - READ-ONLY; The maximum DTUs per database. - Limit *int64 `json:"limit,omitempty"` - // Status - READ-ONLY; The status of the capability. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled' - Status CapabilityStatus `json:"status,omitempty"` -} - -// MarshalJSON is the custom marshaler for ElasticPoolPerDatabaseMinDtuCapability. -func (eppdmdc ElasticPoolPerDatabaseMinDtuCapability) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ElasticPoolProperties represents the properties of an elastic pool. -type ElasticPoolProperties struct { - // CreationDate - READ-ONLY; The creation date of the elastic pool (ISO8601 format). - CreationDate *date.Time `json:"creationDate,omitempty"` - // State - READ-ONLY; The state of the elastic pool. Possible values include: 'ElasticPoolStateCreating', 'ElasticPoolStateReady', 'ElasticPoolStateDisabled' - State ElasticPoolState `json:"state,omitempty"` - // Edition - The edition of the elastic pool. Possible values include: 'ElasticPoolEditionBasic', 'ElasticPoolEditionStandard', 'ElasticPoolEditionPremium', 'ElasticPoolEditionGeneralPurpose', 'ElasticPoolEditionBusinessCritical' - Edition ElasticPoolEdition `json:"edition,omitempty"` - // Dtu - The total shared DTU for the database elastic pool. - Dtu *int32 `json:"dtu,omitempty"` - // DatabaseDtuMax - The maximum DTU any one database can consume. - DatabaseDtuMax *int32 `json:"databaseDtuMax,omitempty"` - // DatabaseDtuMin - The minimum DTU all databases are guaranteed. - DatabaseDtuMin *int32 `json:"databaseDtuMin,omitempty"` - // StorageMB - Gets storage limit for the database elastic pool in MB. - StorageMB *int32 `json:"storageMB,omitempty"` - // ZoneRedundant - Whether or not this database elastic pool is zone redundant, which means the replicas of this database will be spread across multiple availability zones. - ZoneRedundant *bool `json:"zoneRedundant,omitempty"` -} - -// MarshalJSON is the custom marshaler for ElasticPoolProperties. -func (epp ElasticPoolProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if epp.Edition != "" { - objectMap["edition"] = epp.Edition - } - if epp.Dtu != nil { - objectMap["dtu"] = epp.Dtu - } - if epp.DatabaseDtuMax != nil { - objectMap["databaseDtuMax"] = epp.DatabaseDtuMax - } - if epp.DatabaseDtuMin != nil { - objectMap["databaseDtuMin"] = epp.DatabaseDtuMin - } - if epp.StorageMB != nil { - objectMap["storageMB"] = epp.StorageMB - } - if epp.ZoneRedundant != nil { - objectMap["zoneRedundant"] = epp.ZoneRedundant - } - return json.Marshal(objectMap) -} - -// ElasticPoolsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ElasticPoolsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ElasticPoolsClient) (ElasticPool, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ElasticPoolsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ElasticPoolsCreateOrUpdateFuture.Result. -func (future *ElasticPoolsCreateOrUpdateFuture) result(client ElasticPoolsClient) (ep ElasticPool, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ep.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ElasticPoolsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ep.Response.Response, err = future.GetResult(sender); err == nil && ep.Response.Response.StatusCode != http.StatusNoContent { - ep, err = client.CreateOrUpdateResponder(ep.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsCreateOrUpdateFuture", "Result", ep.Response.Response, "Failure responding to request") - } - } - return -} - -// ElasticPoolsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ElasticPoolsUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ElasticPoolsClient) (ElasticPool, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ElasticPoolsUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ElasticPoolsUpdateFuture.Result. -func (future *ElasticPoolsUpdateFuture) result(client ElasticPoolsClient) (ep ElasticPool, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ep.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ElasticPoolsUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ep.Response.Response, err = future.GetResult(sender); err == nil && ep.Response.Response.StatusCode != http.StatusNoContent { - ep, err = client.UpdateResponder(ep.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsUpdateFuture", "Result", ep.Response.Response, "Failure responding to request") - } - } - return -} - -// ElasticPoolUpdate represents an elastic pool update. -type ElasticPoolUpdate struct { - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // ElasticPoolProperties - The properties representing the resource. - *ElasticPoolProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ElasticPoolUpdate. -func (epu ElasticPoolUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if epu.Tags != nil { - objectMap["tags"] = epu.Tags - } - if epu.ElasticPoolProperties != nil { - objectMap["properties"] = epu.ElasticPoolProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ElasticPoolUpdate struct. -func (epu *ElasticPoolUpdate) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - epu.Tags = tags - } - case "properties": - if v != nil { - var elasticPoolProperties ElasticPoolProperties - err = json.Unmarshal(*v, &elasticPoolProperties) - if err != nil { - return err - } - epu.ElasticPoolProperties = &elasticPoolProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - epu.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - epu.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - epu.Type = &typeVar - } - } - } - - return nil -} - -// EncryptionProtector the server encryption protector. -type EncryptionProtector struct { - autorest.Response `json:"-"` - // Kind - READ-ONLY; Kind of encryption protector. This is metadata used for the Azure portal experience. - Kind *string `json:"kind,omitempty"` - // Location - READ-ONLY; Resource location. - Location *string `json:"location,omitempty"` - // EncryptionProtectorProperties - Resource properties. - *EncryptionProtectorProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for EncryptionProtector. -func (ep EncryptionProtector) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ep.EncryptionProtectorProperties != nil { - objectMap["properties"] = ep.EncryptionProtectorProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for EncryptionProtector struct. -func (ep *EncryptionProtector) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - ep.Kind = &kind - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - ep.Location = &location - } - case "properties": - if v != nil { - var encryptionProtectorProperties EncryptionProtectorProperties - err = json.Unmarshal(*v, &encryptionProtectorProperties) - if err != nil { - return err - } - ep.EncryptionProtectorProperties = &encryptionProtectorProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ep.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ep.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ep.Type = &typeVar - } - } - } - - return nil -} - -// EncryptionProtectorListResult a list of server encryption protectors. -type EncryptionProtectorListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]EncryptionProtector `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for EncryptionProtectorListResult. -func (eplr EncryptionProtectorListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// EncryptionProtectorListResultIterator provides access to a complete listing of EncryptionProtector -// values. -type EncryptionProtectorListResultIterator struct { - i int - page EncryptionProtectorListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *EncryptionProtectorListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionProtectorListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *EncryptionProtectorListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter EncryptionProtectorListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter EncryptionProtectorListResultIterator) Response() EncryptionProtectorListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter EncryptionProtectorListResultIterator) Value() EncryptionProtector { - if !iter.page.NotDone() { - return EncryptionProtector{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the EncryptionProtectorListResultIterator type. -func NewEncryptionProtectorListResultIterator(page EncryptionProtectorListResultPage) EncryptionProtectorListResultIterator { - return EncryptionProtectorListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (eplr EncryptionProtectorListResult) IsEmpty() bool { - return eplr.Value == nil || len(*eplr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (eplr EncryptionProtectorListResult) hasNextLink() bool { - return eplr.NextLink != nil && len(*eplr.NextLink) != 0 -} - -// encryptionProtectorListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (eplr EncryptionProtectorListResult) encryptionProtectorListResultPreparer(ctx context.Context) (*http.Request, error) { - if !eplr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(eplr.NextLink))) -} - -// EncryptionProtectorListResultPage contains a page of EncryptionProtector values. -type EncryptionProtectorListResultPage struct { - fn func(context.Context, EncryptionProtectorListResult) (EncryptionProtectorListResult, error) - eplr EncryptionProtectorListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *EncryptionProtectorListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionProtectorListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.eplr) - if err != nil { - return err - } - page.eplr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *EncryptionProtectorListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page EncryptionProtectorListResultPage) NotDone() bool { - return !page.eplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page EncryptionProtectorListResultPage) Response() EncryptionProtectorListResult { - return page.eplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page EncryptionProtectorListResultPage) Values() []EncryptionProtector { - if page.eplr.IsEmpty() { - return nil - } - return *page.eplr.Value -} - -// Creates a new instance of the EncryptionProtectorListResultPage type. -func NewEncryptionProtectorListResultPage(cur EncryptionProtectorListResult, getNextPage func(context.Context, EncryptionProtectorListResult) (EncryptionProtectorListResult, error)) EncryptionProtectorListResultPage { - return EncryptionProtectorListResultPage{ - fn: getNextPage, - eplr: cur, - } -} - -// EncryptionProtectorProperties properties for an encryption protector execution. -type EncryptionProtectorProperties struct { - // Subregion - READ-ONLY; Subregion of the encryption protector. - Subregion *string `json:"subregion,omitempty"` - // ServerKeyName - The name of the server key. - ServerKeyName *string `json:"serverKeyName,omitempty"` - // ServerKeyType - The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. Possible values include: 'ServiceManaged', 'AzureKeyVault' - ServerKeyType ServerKeyType `json:"serverKeyType,omitempty"` - // URI - READ-ONLY; The URI of the server key. - URI *string `json:"uri,omitempty"` - // Thumbprint - READ-ONLY; Thumbprint of the server key. - Thumbprint *string `json:"thumbprint,omitempty"` -} - -// MarshalJSON is the custom marshaler for EncryptionProtectorProperties. -func (epp EncryptionProtectorProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if epp.ServerKeyName != nil { - objectMap["serverKeyName"] = epp.ServerKeyName - } - if epp.ServerKeyType != "" { - objectMap["serverKeyType"] = epp.ServerKeyType - } - return json.Marshal(objectMap) -} - -// EncryptionProtectorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type EncryptionProtectorsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(EncryptionProtectorsClient) (EncryptionProtector, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *EncryptionProtectorsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for EncryptionProtectorsCreateOrUpdateFuture.Result. -func (future *EncryptionProtectorsCreateOrUpdateFuture) result(client EncryptionProtectorsClient) (ep EncryptionProtector, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ep.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.EncryptionProtectorsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ep.Response.Response, err = future.GetResult(sender); err == nil && ep.Response.Response.StatusCode != http.StatusNoContent { - ep, err = client.CreateOrUpdateResponder(ep.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsCreateOrUpdateFuture", "Result", ep.Response.Response, "Failure responding to request") - } - } - return -} - -// EncryptionProtectorsRevalidateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type EncryptionProtectorsRevalidateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(EncryptionProtectorsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *EncryptionProtectorsRevalidateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for EncryptionProtectorsRevalidateFuture.Result. -func (future *EncryptionProtectorsRevalidateFuture) result(client EncryptionProtectorsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsRevalidateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.EncryptionProtectorsRevalidateFuture") - return - } - ar.Response = future.Response() - return -} - -// ExportRequest export database parameters. -type ExportRequest struct { - // StorageKeyType - The type of the storage key to use. Possible values include: 'StorageAccessKey', 'SharedAccessKey' - StorageKeyType StorageKeyType `json:"storageKeyType,omitempty"` - // StorageKey - The storage key to use. If storage key type is SharedAccessKey, it must be preceded with a "?." - StorageKey *string `json:"storageKey,omitempty"` - // StorageURI - The storage uri to use. - StorageURI *string `json:"storageUri,omitempty"` - // AdministratorLogin - The name of the SQL administrator. - AdministratorLogin *string `json:"administratorLogin,omitempty"` - // AdministratorLoginPassword - The password of the SQL administrator. - AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` - // AuthenticationType - The authentication type. Possible values include: 'SQL', 'ADPassword' - AuthenticationType AuthenticationType `json:"authenticationType,omitempty"` -} - -// ExtendedDatabaseBlobAuditingPolicy an extended database blob auditing policy. -type ExtendedDatabaseBlobAuditingPolicy struct { - autorest.Response `json:"-"` - // ExtendedDatabaseBlobAuditingPolicyProperties - Resource properties. - *ExtendedDatabaseBlobAuditingPolicyProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ExtendedDatabaseBlobAuditingPolicy. -func (edbap ExtendedDatabaseBlobAuditingPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if edbap.ExtendedDatabaseBlobAuditingPolicyProperties != nil { - objectMap["properties"] = edbap.ExtendedDatabaseBlobAuditingPolicyProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ExtendedDatabaseBlobAuditingPolicy struct. -func (edbap *ExtendedDatabaseBlobAuditingPolicy) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var extendedDatabaseBlobAuditingPolicyProperties ExtendedDatabaseBlobAuditingPolicyProperties - err = json.Unmarshal(*v, &extendedDatabaseBlobAuditingPolicyProperties) - if err != nil { - return err - } - edbap.ExtendedDatabaseBlobAuditingPolicyProperties = &extendedDatabaseBlobAuditingPolicyProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - edbap.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - edbap.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - edbap.Type = &typeVar - } - } - } - - return nil -} - -// ExtendedDatabaseBlobAuditingPolicyListResult a list of database extended auditing settings. -type ExtendedDatabaseBlobAuditingPolicyListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]ExtendedDatabaseBlobAuditingPolicy `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for ExtendedDatabaseBlobAuditingPolicyListResult. -func (edbaplr ExtendedDatabaseBlobAuditingPolicyListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ExtendedDatabaseBlobAuditingPolicyListResultIterator provides access to a complete listing of -// ExtendedDatabaseBlobAuditingPolicy values. -type ExtendedDatabaseBlobAuditingPolicyListResultIterator struct { - i int - page ExtendedDatabaseBlobAuditingPolicyListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ExtendedDatabaseBlobAuditingPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedDatabaseBlobAuditingPolicyListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ExtendedDatabaseBlobAuditingPolicyListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ExtendedDatabaseBlobAuditingPolicyListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter ExtendedDatabaseBlobAuditingPolicyListResultIterator) Response() ExtendedDatabaseBlobAuditingPolicyListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ExtendedDatabaseBlobAuditingPolicyListResultIterator) Value() ExtendedDatabaseBlobAuditingPolicy { - if !iter.page.NotDone() { - return ExtendedDatabaseBlobAuditingPolicy{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ExtendedDatabaseBlobAuditingPolicyListResultIterator type. -func NewExtendedDatabaseBlobAuditingPolicyListResultIterator(page ExtendedDatabaseBlobAuditingPolicyListResultPage) ExtendedDatabaseBlobAuditingPolicyListResultIterator { - return ExtendedDatabaseBlobAuditingPolicyListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (edbaplr ExtendedDatabaseBlobAuditingPolicyListResult) IsEmpty() bool { - return edbaplr.Value == nil || len(*edbaplr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (edbaplr ExtendedDatabaseBlobAuditingPolicyListResult) hasNextLink() bool { - return edbaplr.NextLink != nil && len(*edbaplr.NextLink) != 0 -} - -// extendedDatabaseBlobAuditingPolicyListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (edbaplr ExtendedDatabaseBlobAuditingPolicyListResult) extendedDatabaseBlobAuditingPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { - if !edbaplr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(edbaplr.NextLink))) -} - -// ExtendedDatabaseBlobAuditingPolicyListResultPage contains a page of ExtendedDatabaseBlobAuditingPolicy -// values. -type ExtendedDatabaseBlobAuditingPolicyListResultPage struct { - fn func(context.Context, ExtendedDatabaseBlobAuditingPolicyListResult) (ExtendedDatabaseBlobAuditingPolicyListResult, error) - edbaplr ExtendedDatabaseBlobAuditingPolicyListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ExtendedDatabaseBlobAuditingPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedDatabaseBlobAuditingPolicyListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.edbaplr) - if err != nil { - return err - } - page.edbaplr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ExtendedDatabaseBlobAuditingPolicyListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ExtendedDatabaseBlobAuditingPolicyListResultPage) NotDone() bool { - return !page.edbaplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ExtendedDatabaseBlobAuditingPolicyListResultPage) Response() ExtendedDatabaseBlobAuditingPolicyListResult { - return page.edbaplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ExtendedDatabaseBlobAuditingPolicyListResultPage) Values() []ExtendedDatabaseBlobAuditingPolicy { - if page.edbaplr.IsEmpty() { - return nil - } - return *page.edbaplr.Value -} - -// Creates a new instance of the ExtendedDatabaseBlobAuditingPolicyListResultPage type. -func NewExtendedDatabaseBlobAuditingPolicyListResultPage(cur ExtendedDatabaseBlobAuditingPolicyListResult, getNextPage func(context.Context, ExtendedDatabaseBlobAuditingPolicyListResult) (ExtendedDatabaseBlobAuditingPolicyListResult, error)) ExtendedDatabaseBlobAuditingPolicyListResultPage { - return ExtendedDatabaseBlobAuditingPolicyListResultPage{ - fn: getNextPage, - edbaplr: cur, - } -} - -// ExtendedDatabaseBlobAuditingPolicyProperties properties of an extended database blob auditing policy. -type ExtendedDatabaseBlobAuditingPolicyProperties struct { - // PredicateExpression - Specifies condition of where clause when creating an audit. - PredicateExpression *string `json:"predicateExpression,omitempty"` - // State - Specifies the state of the policy. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Possible values include: 'BlobAuditingPolicyStateEnabled', 'BlobAuditingPolicyStateDisabled' - State BlobAuditingPolicyState `json:"state,omitempty"` - // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required. - StorageEndpoint *string `json:"storageEndpoint,omitempty"` - // StorageAccountAccessKey - Specifies the identifier key of the auditing storage account. - // If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. - // Prerequisites for using managed identity authentication: - // 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). - // 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. - // For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355) - StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` - // RetentionDays - Specifies the number of days to keep in the audit logs in the storage account. - RetentionDays *int32 `json:"retentionDays,omitempty"` - // AuditActionsAndGroups - Specifies the Actions-Groups and Actions to audit. - // - // The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins: - // - // BATCH_COMPLETED_GROUP, - // SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - // FAILED_DATABASE_AUTHENTICATION_GROUP. - // - // This above combination is also the set that is configured by default when enabling auditing from the Azure portal. - // - // The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records): - // - // APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - // BACKUP_RESTORE_GROUP - // DATABASE_LOGOUT_GROUP - // DATABASE_OBJECT_CHANGE_GROUP - // DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - // DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - // DATABASE_OPERATION_GROUP - // DATABASE_PERMISSION_CHANGE_GROUP - // DATABASE_PRINCIPAL_CHANGE_GROUP - // DATABASE_PRINCIPAL_IMPERSONATION_GROUP - // DATABASE_ROLE_MEMBER_CHANGE_GROUP - // FAILED_DATABASE_AUTHENTICATION_GROUP - // SCHEMA_OBJECT_ACCESS_GROUP - // SCHEMA_OBJECT_CHANGE_GROUP - // SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - // SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - // SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - // USER_CHANGE_PASSWORD_GROUP - // BATCH_STARTED_GROUP - // BATCH_COMPLETED_GROUP - // - // These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs. - // - // For more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - // - // For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: - // SELECT - // UPDATE - // INSERT - // DELETE - // EXECUTE - // RECEIVE - // REFERENCES - // - // The general form for defining an action to be audited is: - // {action} ON {object} BY {principal} - // - // Note that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively. - // - // For example: - // SELECT on dbo.myTable by public - // SELECT on DATABASE::myDatabase by public - // SELECT on SCHEMA::mySchema by public - // - // For more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - AuditActionsAndGroups *[]string `json:"auditActionsAndGroups,omitempty"` - // StorageAccountSubscriptionID - Specifies the blob storage subscription Id. - StorageAccountSubscriptionID *uuid.UUID `json:"storageAccountSubscriptionId,omitempty"` - // IsStorageSecondaryKeyInUse - Specifies whether storageAccountAccessKey value is the storage's secondary key. - IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"` - // IsAzureMonitorTargetEnabled - Specifies whether audit events are sent to Azure Monitor. - // In order to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true. - // - // When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created. - // Note that for server level audit you should use the 'master' database as {databaseName}. - // - // Diagnostic Settings URI format: - // PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - // - // For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) - // or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - IsAzureMonitorTargetEnabled *bool `json:"isAzureMonitorTargetEnabled,omitempty"` - // QueueDelayMs - Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. - // The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - QueueDelayMs *int32 `json:"queueDelayMs,omitempty"` -} - -// ExtendedServerBlobAuditingPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type ExtendedServerBlobAuditingPoliciesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExtendedServerBlobAuditingPoliciesClient) (ExtendedServerBlobAuditingPolicy, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExtendedServerBlobAuditingPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExtendedServerBlobAuditingPoliciesCreateOrUpdateFuture.Result. -func (future *ExtendedServerBlobAuditingPoliciesCreateOrUpdateFuture) result(client ExtendedServerBlobAuditingPoliciesClient) (esbap ExtendedServerBlobAuditingPolicy, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ExtendedServerBlobAuditingPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - esbap.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ExtendedServerBlobAuditingPoliciesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if esbap.Response.Response, err = future.GetResult(sender); err == nil && esbap.Response.Response.StatusCode != http.StatusNoContent { - esbap, err = client.CreateOrUpdateResponder(esbap.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ExtendedServerBlobAuditingPoliciesCreateOrUpdateFuture", "Result", esbap.Response.Response, "Failure responding to request") - } - } - return -} - -// ExtendedServerBlobAuditingPolicy an extended server blob auditing policy. -type ExtendedServerBlobAuditingPolicy struct { - autorest.Response `json:"-"` - // ExtendedServerBlobAuditingPolicyProperties - Resource properties. - *ExtendedServerBlobAuditingPolicyProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ExtendedServerBlobAuditingPolicy. -func (esbap ExtendedServerBlobAuditingPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if esbap.ExtendedServerBlobAuditingPolicyProperties != nil { - objectMap["properties"] = esbap.ExtendedServerBlobAuditingPolicyProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ExtendedServerBlobAuditingPolicy struct. -func (esbap *ExtendedServerBlobAuditingPolicy) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var extendedServerBlobAuditingPolicyProperties ExtendedServerBlobAuditingPolicyProperties - err = json.Unmarshal(*v, &extendedServerBlobAuditingPolicyProperties) - if err != nil { - return err - } - esbap.ExtendedServerBlobAuditingPolicyProperties = &extendedServerBlobAuditingPolicyProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - esbap.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - esbap.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - esbap.Type = &typeVar - } - } - } - - return nil -} - -// ExtendedServerBlobAuditingPolicyListResult a list of server extended auditing settings. -type ExtendedServerBlobAuditingPolicyListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]ExtendedServerBlobAuditingPolicy `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for ExtendedServerBlobAuditingPolicyListResult. -func (esbaplr ExtendedServerBlobAuditingPolicyListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ExtendedServerBlobAuditingPolicyListResultIterator provides access to a complete listing of -// ExtendedServerBlobAuditingPolicy values. -type ExtendedServerBlobAuditingPolicyListResultIterator struct { - i int - page ExtendedServerBlobAuditingPolicyListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ExtendedServerBlobAuditingPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedServerBlobAuditingPolicyListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ExtendedServerBlobAuditingPolicyListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ExtendedServerBlobAuditingPolicyListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter ExtendedServerBlobAuditingPolicyListResultIterator) Response() ExtendedServerBlobAuditingPolicyListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ExtendedServerBlobAuditingPolicyListResultIterator) Value() ExtendedServerBlobAuditingPolicy { - if !iter.page.NotDone() { - return ExtendedServerBlobAuditingPolicy{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ExtendedServerBlobAuditingPolicyListResultIterator type. -func NewExtendedServerBlobAuditingPolicyListResultIterator(page ExtendedServerBlobAuditingPolicyListResultPage) ExtendedServerBlobAuditingPolicyListResultIterator { - return ExtendedServerBlobAuditingPolicyListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (esbaplr ExtendedServerBlobAuditingPolicyListResult) IsEmpty() bool { - return esbaplr.Value == nil || len(*esbaplr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (esbaplr ExtendedServerBlobAuditingPolicyListResult) hasNextLink() bool { - return esbaplr.NextLink != nil && len(*esbaplr.NextLink) != 0 -} - -// extendedServerBlobAuditingPolicyListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (esbaplr ExtendedServerBlobAuditingPolicyListResult) extendedServerBlobAuditingPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { - if !esbaplr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(esbaplr.NextLink))) -} - -// ExtendedServerBlobAuditingPolicyListResultPage contains a page of ExtendedServerBlobAuditingPolicy -// values. -type ExtendedServerBlobAuditingPolicyListResultPage struct { - fn func(context.Context, ExtendedServerBlobAuditingPolicyListResult) (ExtendedServerBlobAuditingPolicyListResult, error) - esbaplr ExtendedServerBlobAuditingPolicyListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ExtendedServerBlobAuditingPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedServerBlobAuditingPolicyListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.esbaplr) - if err != nil { - return err - } - page.esbaplr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ExtendedServerBlobAuditingPolicyListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ExtendedServerBlobAuditingPolicyListResultPage) NotDone() bool { - return !page.esbaplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ExtendedServerBlobAuditingPolicyListResultPage) Response() ExtendedServerBlobAuditingPolicyListResult { - return page.esbaplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ExtendedServerBlobAuditingPolicyListResultPage) Values() []ExtendedServerBlobAuditingPolicy { - if page.esbaplr.IsEmpty() { - return nil - } - return *page.esbaplr.Value -} - -// Creates a new instance of the ExtendedServerBlobAuditingPolicyListResultPage type. -func NewExtendedServerBlobAuditingPolicyListResultPage(cur ExtendedServerBlobAuditingPolicyListResult, getNextPage func(context.Context, ExtendedServerBlobAuditingPolicyListResult) (ExtendedServerBlobAuditingPolicyListResult, error)) ExtendedServerBlobAuditingPolicyListResultPage { - return ExtendedServerBlobAuditingPolicyListResultPage{ - fn: getNextPage, - esbaplr: cur, - } -} - -// ExtendedServerBlobAuditingPolicyProperties properties of an extended server blob auditing policy. -type ExtendedServerBlobAuditingPolicyProperties struct { - // PredicateExpression - Specifies condition of where clause when creating an audit. - PredicateExpression *string `json:"predicateExpression,omitempty"` - // State - Specifies the state of the policy. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Possible values include: 'BlobAuditingPolicyStateEnabled', 'BlobAuditingPolicyStateDisabled' - State BlobAuditingPolicyState `json:"state,omitempty"` - // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required. - StorageEndpoint *string `json:"storageEndpoint,omitempty"` - // StorageAccountAccessKey - Specifies the identifier key of the auditing storage account. - // If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. - // Prerequisites for using managed identity authentication: - // 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). - // 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. - // For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355) - StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` - // RetentionDays - Specifies the number of days to keep in the audit logs in the storage account. - RetentionDays *int32 `json:"retentionDays,omitempty"` - // AuditActionsAndGroups - Specifies the Actions-Groups and Actions to audit. - // - // The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins: - // - // BATCH_COMPLETED_GROUP, - // SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - // FAILED_DATABASE_AUTHENTICATION_GROUP. - // - // This above combination is also the set that is configured by default when enabling auditing from the Azure portal. - // - // The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records): - // - // APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - // BACKUP_RESTORE_GROUP - // DATABASE_LOGOUT_GROUP - // DATABASE_OBJECT_CHANGE_GROUP - // DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - // DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - // DATABASE_OPERATION_GROUP - // DATABASE_PERMISSION_CHANGE_GROUP - // DATABASE_PRINCIPAL_CHANGE_GROUP - // DATABASE_PRINCIPAL_IMPERSONATION_GROUP - // DATABASE_ROLE_MEMBER_CHANGE_GROUP - // FAILED_DATABASE_AUTHENTICATION_GROUP - // SCHEMA_OBJECT_ACCESS_GROUP - // SCHEMA_OBJECT_CHANGE_GROUP - // SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - // SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - // SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - // USER_CHANGE_PASSWORD_GROUP - // BATCH_STARTED_GROUP - // BATCH_COMPLETED_GROUP - // - // These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs. - // - // For more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - // - // For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: - // SELECT - // UPDATE - // INSERT - // DELETE - // EXECUTE - // RECEIVE - // REFERENCES - // - // The general form for defining an action to be audited is: - // {action} ON {object} BY {principal} - // - // Note that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively. - // - // For example: - // SELECT on dbo.myTable by public - // SELECT on DATABASE::myDatabase by public - // SELECT on SCHEMA::mySchema by public - // - // For more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - AuditActionsAndGroups *[]string `json:"auditActionsAndGroups,omitempty"` - // StorageAccountSubscriptionID - Specifies the blob storage subscription Id. - StorageAccountSubscriptionID *uuid.UUID `json:"storageAccountSubscriptionId,omitempty"` - // IsStorageSecondaryKeyInUse - Specifies whether storageAccountAccessKey value is the storage's secondary key. - IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"` - // IsAzureMonitorTargetEnabled - Specifies whether audit events are sent to Azure Monitor. - // In order to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true. - // - // When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created. - // Note that for server level audit you should use the 'master' database as {databaseName}. - // - // Diagnostic Settings URI format: - // PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - // - // For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) - // or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - IsAzureMonitorTargetEnabled *bool `json:"isAzureMonitorTargetEnabled,omitempty"` - // QueueDelayMs - Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. - // The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - QueueDelayMs *int32 `json:"queueDelayMs,omitempty"` -} - -// FailoverGroup a failover group. -type FailoverGroup struct { - autorest.Response `json:"-"` - // Location - READ-ONLY; Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // FailoverGroupProperties - Resource properties. - *FailoverGroupProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for FailoverGroup. -func (fg FailoverGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if fg.Tags != nil { - objectMap["tags"] = fg.Tags - } - if fg.FailoverGroupProperties != nil { - objectMap["properties"] = fg.FailoverGroupProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for FailoverGroup struct. -func (fg *FailoverGroup) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - fg.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - fg.Tags = tags - } - case "properties": - if v != nil { - var failoverGroupProperties FailoverGroupProperties - err = json.Unmarshal(*v, &failoverGroupProperties) - if err != nil { - return err - } - fg.FailoverGroupProperties = &failoverGroupProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - fg.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - fg.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - fg.Type = &typeVar - } - } - } - - return nil -} - -// FailoverGroupListResult a list of failover groups. -type FailoverGroupListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]FailoverGroup `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for FailoverGroupListResult. -func (fglr FailoverGroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// FailoverGroupListResultIterator provides access to a complete listing of FailoverGroup values. -type FailoverGroupListResultIterator struct { - i int - page FailoverGroupListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *FailoverGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FailoverGroupListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *FailoverGroupListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter FailoverGroupListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter FailoverGroupListResultIterator) Response() FailoverGroupListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter FailoverGroupListResultIterator) Value() FailoverGroup { - if !iter.page.NotDone() { - return FailoverGroup{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the FailoverGroupListResultIterator type. -func NewFailoverGroupListResultIterator(page FailoverGroupListResultPage) FailoverGroupListResultIterator { - return FailoverGroupListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (fglr FailoverGroupListResult) IsEmpty() bool { - return fglr.Value == nil || len(*fglr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (fglr FailoverGroupListResult) hasNextLink() bool { - return fglr.NextLink != nil && len(*fglr.NextLink) != 0 -} - -// failoverGroupListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (fglr FailoverGroupListResult) failoverGroupListResultPreparer(ctx context.Context) (*http.Request, error) { - if !fglr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(fglr.NextLink))) -} - -// FailoverGroupListResultPage contains a page of FailoverGroup values. -type FailoverGroupListResultPage struct { - fn func(context.Context, FailoverGroupListResult) (FailoverGroupListResult, error) - fglr FailoverGroupListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *FailoverGroupListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FailoverGroupListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.fglr) - if err != nil { - return err - } - page.fglr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *FailoverGroupListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page FailoverGroupListResultPage) NotDone() bool { - return !page.fglr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page FailoverGroupListResultPage) Response() FailoverGroupListResult { - return page.fglr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page FailoverGroupListResultPage) Values() []FailoverGroup { - if page.fglr.IsEmpty() { - return nil - } - return *page.fglr.Value -} - -// Creates a new instance of the FailoverGroupListResultPage type. -func NewFailoverGroupListResultPage(cur FailoverGroupListResult, getNextPage func(context.Context, FailoverGroupListResult) (FailoverGroupListResult, error)) FailoverGroupListResultPage { - return FailoverGroupListResultPage{ - fn: getNextPage, - fglr: cur, - } -} - -// FailoverGroupProperties properties of a failover group. -type FailoverGroupProperties struct { - // ReadWriteEndpoint - Read-write endpoint of the failover group instance. - ReadWriteEndpoint *FailoverGroupReadWriteEndpoint `json:"readWriteEndpoint,omitempty"` - // ReadOnlyEndpoint - Read-only endpoint of the failover group instance. - ReadOnlyEndpoint *FailoverGroupReadOnlyEndpoint `json:"readOnlyEndpoint,omitempty"` - // ReplicationRole - READ-ONLY; Local replication role of the failover group instance. Possible values include: 'Primary', 'Secondary' - ReplicationRole FailoverGroupReplicationRole `json:"replicationRole,omitempty"` - // ReplicationState - READ-ONLY; Replication state of the failover group instance. - ReplicationState *string `json:"replicationState,omitempty"` - // PartnerServers - List of partner server information for the failover group. - PartnerServers *[]PartnerInfo `json:"partnerServers,omitempty"` - // Databases - List of databases in the failover group. - Databases *[]string `json:"databases,omitempty"` -} - -// MarshalJSON is the custom marshaler for FailoverGroupProperties. -func (fgp FailoverGroupProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if fgp.ReadWriteEndpoint != nil { - objectMap["readWriteEndpoint"] = fgp.ReadWriteEndpoint - } - if fgp.ReadOnlyEndpoint != nil { - objectMap["readOnlyEndpoint"] = fgp.ReadOnlyEndpoint - } - if fgp.PartnerServers != nil { - objectMap["partnerServers"] = fgp.PartnerServers - } - if fgp.Databases != nil { - objectMap["databases"] = fgp.Databases - } - return json.Marshal(objectMap) -} - -// FailoverGroupReadOnlyEndpoint read-only endpoint of the failover group instance. -type FailoverGroupReadOnlyEndpoint struct { - // FailoverPolicy - Failover policy of the read-only endpoint for the failover group. Possible values include: 'ReadOnlyEndpointFailoverPolicyDisabled', 'ReadOnlyEndpointFailoverPolicyEnabled' - FailoverPolicy ReadOnlyEndpointFailoverPolicy `json:"failoverPolicy,omitempty"` -} - -// FailoverGroupReadWriteEndpoint read-write endpoint of the failover group instance. -type FailoverGroupReadWriteEndpoint struct { - // FailoverPolicy - Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. Possible values include: 'Manual', 'Automatic' - FailoverPolicy ReadWriteEndpointFailoverPolicy `json:"failoverPolicy,omitempty"` - // FailoverWithDataLossGracePeriodMinutes - Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. - FailoverWithDataLossGracePeriodMinutes *int32 `json:"failoverWithDataLossGracePeriodMinutes,omitempty"` -} - -// FailoverGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type FailoverGroupsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(FailoverGroupsClient) (FailoverGroup, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *FailoverGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for FailoverGroupsCreateOrUpdateFuture.Result. -func (future *FailoverGroupsCreateOrUpdateFuture) result(client FailoverGroupsClient) (fg FailoverGroup, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - fg.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.FailoverGroupsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if fg.Response.Response, err = future.GetResult(sender); err == nil && fg.Response.Response.StatusCode != http.StatusNoContent { - fg, err = client.CreateOrUpdateResponder(fg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsCreateOrUpdateFuture", "Result", fg.Response.Response, "Failure responding to request") - } - } - return -} - -// FailoverGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type FailoverGroupsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(FailoverGroupsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *FailoverGroupsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for FailoverGroupsDeleteFuture.Result. -func (future *FailoverGroupsDeleteFuture) result(client FailoverGroupsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.FailoverGroupsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// FailoverGroupsFailoverFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type FailoverGroupsFailoverFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(FailoverGroupsClient) (FailoverGroup, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *FailoverGroupsFailoverFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for FailoverGroupsFailoverFuture.Result. -func (future *FailoverGroupsFailoverFuture) result(client FailoverGroupsClient) (fg FailoverGroup, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsFailoverFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - fg.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.FailoverGroupsFailoverFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if fg.Response.Response, err = future.GetResult(sender); err == nil && fg.Response.Response.StatusCode != http.StatusNoContent { - fg, err = client.FailoverResponder(fg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsFailoverFuture", "Result", fg.Response.Response, "Failure responding to request") - } - } - return -} - -// FailoverGroupsForceFailoverAllowDataLossFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type FailoverGroupsForceFailoverAllowDataLossFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(FailoverGroupsClient) (FailoverGroup, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *FailoverGroupsForceFailoverAllowDataLossFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for FailoverGroupsForceFailoverAllowDataLossFuture.Result. -func (future *FailoverGroupsForceFailoverAllowDataLossFuture) result(client FailoverGroupsClient) (fg FailoverGroup, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsForceFailoverAllowDataLossFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - fg.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.FailoverGroupsForceFailoverAllowDataLossFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if fg.Response.Response, err = future.GetResult(sender); err == nil && fg.Response.Response.StatusCode != http.StatusNoContent { - fg, err = client.ForceFailoverAllowDataLossResponder(fg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsForceFailoverAllowDataLossFuture", "Result", fg.Response.Response, "Failure responding to request") - } - } - return -} - -// FailoverGroupsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type FailoverGroupsUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(FailoverGroupsClient) (FailoverGroup, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *FailoverGroupsUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for FailoverGroupsUpdateFuture.Result. -func (future *FailoverGroupsUpdateFuture) result(client FailoverGroupsClient) (fg FailoverGroup, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - fg.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.FailoverGroupsUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if fg.Response.Response, err = future.GetResult(sender); err == nil && fg.Response.Response.StatusCode != http.StatusNoContent { - fg, err = client.UpdateResponder(fg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.FailoverGroupsUpdateFuture", "Result", fg.Response.Response, "Failure responding to request") - } - } - return -} - -// FailoverGroupUpdate a failover group update request. -type FailoverGroupUpdate struct { - // FailoverGroupUpdateProperties - Resource properties. - *FailoverGroupUpdateProperties `json:"properties,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for FailoverGroupUpdate. -func (fgu FailoverGroupUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if fgu.FailoverGroupUpdateProperties != nil { - objectMap["properties"] = fgu.FailoverGroupUpdateProperties - } - if fgu.Tags != nil { - objectMap["tags"] = fgu.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for FailoverGroupUpdate struct. -func (fgu *FailoverGroupUpdate) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var failoverGroupUpdateProperties FailoverGroupUpdateProperties - err = json.Unmarshal(*v, &failoverGroupUpdateProperties) - if err != nil { - return err - } - fgu.FailoverGroupUpdateProperties = &failoverGroupUpdateProperties - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - fgu.Tags = tags - } - } - } - - return nil -} - -// FailoverGroupUpdateProperties properties of a failover group update. -type FailoverGroupUpdateProperties struct { - // ReadWriteEndpoint - Read-write endpoint of the failover group instance. - ReadWriteEndpoint *FailoverGroupReadWriteEndpoint `json:"readWriteEndpoint,omitempty"` - // ReadOnlyEndpoint - Read-only endpoint of the failover group instance. - ReadOnlyEndpoint *FailoverGroupReadOnlyEndpoint `json:"readOnlyEndpoint,omitempty"` - // Databases - List of databases in the failover group. - Databases *[]string `json:"databases,omitempty"` -} - -// FirewallRule represents a server firewall rule. -type FirewallRule struct { - autorest.Response `json:"-"` - // Kind - READ-ONLY; Kind of server that contains this firewall rule. - Kind *string `json:"kind,omitempty"` - // Location - READ-ONLY; Location of the server that contains this firewall rule. - Location *string `json:"location,omitempty"` - // FirewallRuleProperties - The properties representing the resource. - *FirewallRuleProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for FirewallRule. -func (fr FirewallRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if fr.FirewallRuleProperties != nil { - objectMap["properties"] = fr.FirewallRuleProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for FirewallRule struct. -func (fr *FirewallRule) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - fr.Kind = &kind - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - fr.Location = &location - } - case "properties": - if v != nil { - var firewallRuleProperties FirewallRuleProperties - err = json.Unmarshal(*v, &firewallRuleProperties) - if err != nil { - return err - } - fr.FirewallRuleProperties = &firewallRuleProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - fr.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - fr.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - fr.Type = &typeVar - } - } - } - - return nil -} - -// FirewallRuleListResult represents the response to a List Firewall Rules request. -type FirewallRuleListResult struct { - autorest.Response `json:"-"` - // Value - The list of server firewall rules. - Value *[]FirewallRule `json:"value,omitempty"` -} - -// FirewallRuleProperties represents the properties of a server firewall rule. -type FirewallRuleProperties struct { - // StartIPAddress - The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' to represent all Azure-internal IP addresses. - StartIPAddress *string `json:"startIpAddress,omitempty"` - // EndIPAddress - The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. Use value '0.0.0.0' to represent all Azure-internal IP addresses. - EndIPAddress *string `json:"endIpAddress,omitempty"` -} - -// GeoBackupPolicy a database geo backup policy. -type GeoBackupPolicy struct { - autorest.Response `json:"-"` - // GeoBackupPolicyProperties - The properties of the geo backup policy. - *GeoBackupPolicyProperties `json:"properties,omitempty"` - // Kind - READ-ONLY; Kind of geo backup policy. This is metadata used for the Azure portal experience. - Kind *string `json:"kind,omitempty"` - // Location - READ-ONLY; Backup policy location. - Location *string `json:"location,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for GeoBackupPolicy. -func (gbp GeoBackupPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if gbp.GeoBackupPolicyProperties != nil { - objectMap["properties"] = gbp.GeoBackupPolicyProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for GeoBackupPolicy struct. -func (gbp *GeoBackupPolicy) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var geoBackupPolicyProperties GeoBackupPolicyProperties - err = json.Unmarshal(*v, &geoBackupPolicyProperties) - if err != nil { - return err - } - gbp.GeoBackupPolicyProperties = &geoBackupPolicyProperties - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - gbp.Kind = &kind - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - gbp.Location = &location - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - gbp.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - gbp.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - gbp.Type = &typeVar - } - } - } - - return nil -} - -// GeoBackupPolicyListResult the response to a list geo backup policies request. -type GeoBackupPolicyListResult struct { - autorest.Response `json:"-"` - // Value - The list of geo backup policies. - Value *[]GeoBackupPolicy `json:"value,omitempty"` -} - -// GeoBackupPolicyProperties the properties of the geo backup policy. -type GeoBackupPolicyProperties struct { - // State - The state of the geo backup policy. Possible values include: 'GeoBackupPolicyStateDisabled', 'GeoBackupPolicyStateEnabled' - State GeoBackupPolicyState `json:"state,omitempty"` - // StorageType - READ-ONLY; The storage type of the geo backup policy. - StorageType *string `json:"storageType,omitempty"` -} - -// MarshalJSON is the custom marshaler for GeoBackupPolicyProperties. -func (gbpp GeoBackupPolicyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if gbpp.State != "" { - objectMap["state"] = gbpp.State - } - return json.Marshal(objectMap) -} - -// ImportExportResponse response for Import/Export Get operation. -type ImportExportResponse struct { - autorest.Response `json:"-"` - // ImportExportResponseProperties - The import/export operation properties. - *ImportExportResponseProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ImportExportResponse. -func (ier ImportExportResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ier.ImportExportResponseProperties != nil { - objectMap["properties"] = ier.ImportExportResponseProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ImportExportResponse struct. -func (ier *ImportExportResponse) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var importExportResponseProperties ImportExportResponseProperties - err = json.Unmarshal(*v, &importExportResponseProperties) - if err != nil { - return err - } - ier.ImportExportResponseProperties = &importExportResponseProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ier.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ier.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ier.Type = &typeVar - } - } - } - - return nil -} - -// ImportExportResponseProperties response for Import/Export Status operation. -type ImportExportResponseProperties struct { - // RequestType - READ-ONLY; The request type of the operation. - RequestType *string `json:"requestType,omitempty"` - // RequestID - READ-ONLY; The request type of the operation. - RequestID *uuid.UUID `json:"requestId,omitempty"` - // ServerName - READ-ONLY; The name of the server. - ServerName *string `json:"serverName,omitempty"` - // DatabaseName - READ-ONLY; The name of the database. - DatabaseName *string `json:"databaseName,omitempty"` - // Status - READ-ONLY; The status message returned from the server. - Status *string `json:"status,omitempty"` - // LastModifiedTime - READ-ONLY; The operation status last modified time. - LastModifiedTime *string `json:"lastModifiedTime,omitempty"` - // QueuedTime - READ-ONLY; The operation queued time. - QueuedTime *string `json:"queuedTime,omitempty"` - // BlobURI - READ-ONLY; The blob uri. - BlobURI *string `json:"blobUri,omitempty"` - // ErrorMessage - READ-ONLY; The error message returned from the server. - ErrorMessage *string `json:"errorMessage,omitempty"` -} - -// MarshalJSON is the custom marshaler for ImportExportResponseProperties. -func (ierp ImportExportResponseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ImportExtensionProperties represents the properties for an import operation -type ImportExtensionProperties struct { - // OperationMode - The type of import operation being performed. This is always Import. - OperationMode *string `json:"operationMode,omitempty"` - // StorageKeyType - The type of the storage key to use. Possible values include: 'StorageAccessKey', 'SharedAccessKey' - StorageKeyType StorageKeyType `json:"storageKeyType,omitempty"` - // StorageKey - The storage key to use. If storage key type is SharedAccessKey, it must be preceded with a "?." - StorageKey *string `json:"storageKey,omitempty"` - // StorageURI - The storage uri to use. - StorageURI *string `json:"storageUri,omitempty"` - // AdministratorLogin - The name of the SQL administrator. - AdministratorLogin *string `json:"administratorLogin,omitempty"` - // AdministratorLoginPassword - The password of the SQL administrator. - AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` - // AuthenticationType - The authentication type. Possible values include: 'SQL', 'ADPassword' - AuthenticationType AuthenticationType `json:"authenticationType,omitempty"` -} - -// ImportExtensionRequest import database parameters. -type ImportExtensionRequest struct { - // Name - The name of the extension. - Name *string `json:"name,omitempty"` - // Type - The type of the extension. - Type *string `json:"type,omitempty"` - // ImportExtensionProperties - Represents the properties of the resource. - *ImportExtensionProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for ImportExtensionRequest. -func (ier ImportExtensionRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ier.Name != nil { - objectMap["name"] = ier.Name - } - if ier.Type != nil { - objectMap["type"] = ier.Type - } - if ier.ImportExtensionProperties != nil { - objectMap["properties"] = ier.ImportExtensionProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ImportExtensionRequest struct. -func (ier *ImportExtensionRequest) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ier.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ier.Type = &typeVar - } - case "properties": - if v != nil { - var importExtensionProperties ImportExtensionProperties - err = json.Unmarshal(*v, &importExtensionProperties) - if err != nil { - return err - } - ier.ImportExtensionProperties = &importExtensionProperties - } - } - } - - return nil -} - -// ImportRequest import database parameters. -type ImportRequest struct { - // DatabaseName - The name of the database to import. - DatabaseName *string `json:"databaseName,omitempty"` - // Edition - The edition for the database being created. - // - // The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands: - // - // ```azurecli - // az sql db list-editions -l -o table - // ```` - // - // ```powershell - // Get-AzSqlServerServiceObjective -Location - // ```` - // . Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale' - Edition DatabaseEdition `json:"edition,omitempty"` - // ServiceObjectiveName - The name of the service objective to assign to the database. Possible values include: 'ServiceObjectiveNameSystem', 'ServiceObjectiveNameSystem0', 'ServiceObjectiveNameSystem1', 'ServiceObjectiveNameSystem2', 'ServiceObjectiveNameSystem3', 'ServiceObjectiveNameSystem4', 'ServiceObjectiveNameSystem2L', 'ServiceObjectiveNameSystem3L', 'ServiceObjectiveNameSystem4L', 'ServiceObjectiveNameFree', 'ServiceObjectiveNameBasic', 'ServiceObjectiveNameS0', 'ServiceObjectiveNameS1', 'ServiceObjectiveNameS2', 'ServiceObjectiveNameS3', 'ServiceObjectiveNameS4', 'ServiceObjectiveNameS6', 'ServiceObjectiveNameS7', 'ServiceObjectiveNameS9', 'ServiceObjectiveNameS12', 'ServiceObjectiveNameP1', 'ServiceObjectiveNameP2', 'ServiceObjectiveNameP3', 'ServiceObjectiveNameP4', 'ServiceObjectiveNameP6', 'ServiceObjectiveNameP11', 'ServiceObjectiveNameP15', 'ServiceObjectiveNamePRS1', 'ServiceObjectiveNamePRS2', 'ServiceObjectiveNamePRS4', 'ServiceObjectiveNamePRS6', 'ServiceObjectiveNameDW100', 'ServiceObjectiveNameDW200', 'ServiceObjectiveNameDW300', 'ServiceObjectiveNameDW400', 'ServiceObjectiveNameDW500', 'ServiceObjectiveNameDW600', 'ServiceObjectiveNameDW1000', 'ServiceObjectiveNameDW1200', 'ServiceObjectiveNameDW1000c', 'ServiceObjectiveNameDW1500', 'ServiceObjectiveNameDW1500c', 'ServiceObjectiveNameDW2000', 'ServiceObjectiveNameDW2000c', 'ServiceObjectiveNameDW3000', 'ServiceObjectiveNameDW2500c', 'ServiceObjectiveNameDW3000c', 'ServiceObjectiveNameDW6000', 'ServiceObjectiveNameDW5000c', 'ServiceObjectiveNameDW6000c', 'ServiceObjectiveNameDW7500c', 'ServiceObjectiveNameDW10000c', 'ServiceObjectiveNameDW15000c', 'ServiceObjectiveNameDW30000c', 'ServiceObjectiveNameDS100', 'ServiceObjectiveNameDS200', 'ServiceObjectiveNameDS300', 'ServiceObjectiveNameDS400', 'ServiceObjectiveNameDS500', 'ServiceObjectiveNameDS600', 'ServiceObjectiveNameDS1000', 'ServiceObjectiveNameDS1200', 'ServiceObjectiveNameDS1500', 'ServiceObjectiveNameDS2000', 'ServiceObjectiveNameElasticPool' - ServiceObjectiveName ServiceObjectiveName `json:"serviceObjectiveName,omitempty"` - // MaxSizeBytes - The maximum size for the newly imported database. - MaxSizeBytes *string `json:"maxSizeBytes,omitempty"` - // StorageKeyType - The type of the storage key to use. Possible values include: 'StorageAccessKey', 'SharedAccessKey' - StorageKeyType StorageKeyType `json:"storageKeyType,omitempty"` - // StorageKey - The storage key to use. If storage key type is SharedAccessKey, it must be preceded with a "?." - StorageKey *string `json:"storageKey,omitempty"` - // StorageURI - The storage uri to use. - StorageURI *string `json:"storageUri,omitempty"` - // AdministratorLogin - The name of the SQL administrator. - AdministratorLogin *string `json:"administratorLogin,omitempty"` - // AdministratorLoginPassword - The password of the SQL administrator. - AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` - // AuthenticationType - The authentication type. Possible values include: 'SQL', 'ADPassword' - AuthenticationType AuthenticationType `json:"authenticationType,omitempty"` -} - -// Job a job. -type Job struct { - autorest.Response `json:"-"` - // JobProperties - Resource properties. - *JobProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for Job. -func (j Job) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if j.JobProperties != nil { - objectMap["properties"] = j.JobProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Job struct. -func (j *Job) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var jobProperties JobProperties - err = json.Unmarshal(*v, &jobProperties) - if err != nil { - return err - } - j.JobProperties = &jobProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - j.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - j.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - j.Type = &typeVar - } - } - } - - return nil -} - -// JobAgent an Azure SQL job agent. -type JobAgent struct { - autorest.Response `json:"-"` - // Sku - The name and tier of the SKU. - Sku *Sku `json:"sku,omitempty"` - // JobAgentProperties - Resource properties. - *JobAgentProperties `json:"properties,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for JobAgent. -func (ja JobAgent) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ja.Sku != nil { - objectMap["sku"] = ja.Sku - } - if ja.JobAgentProperties != nil { - objectMap["properties"] = ja.JobAgentProperties - } - if ja.Location != nil { - objectMap["location"] = ja.Location - } - if ja.Tags != nil { - objectMap["tags"] = ja.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for JobAgent struct. -func (ja *JobAgent) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "sku": - if v != nil { - var sku Sku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - ja.Sku = &sku - } - case "properties": - if v != nil { - var jobAgentProperties JobAgentProperties - err = json.Unmarshal(*v, &jobAgentProperties) - if err != nil { - return err - } - ja.JobAgentProperties = &jobAgentProperties - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - ja.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - ja.Tags = tags - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ja.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ja.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ja.Type = &typeVar - } - } - } - - return nil -} - -// JobAgentListResult a list of Azure SQL job agents. -type JobAgentListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]JobAgent `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for JobAgentListResult. -func (jalr JobAgentListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// JobAgentListResultIterator provides access to a complete listing of JobAgent values. -type JobAgentListResultIterator struct { - i int - page JobAgentListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *JobAgentListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobAgentListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *JobAgentListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter JobAgentListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter JobAgentListResultIterator) Response() JobAgentListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter JobAgentListResultIterator) Value() JobAgent { - if !iter.page.NotDone() { - return JobAgent{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the JobAgentListResultIterator type. -func NewJobAgentListResultIterator(page JobAgentListResultPage) JobAgentListResultIterator { - return JobAgentListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (jalr JobAgentListResult) IsEmpty() bool { - return jalr.Value == nil || len(*jalr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (jalr JobAgentListResult) hasNextLink() bool { - return jalr.NextLink != nil && len(*jalr.NextLink) != 0 -} - -// jobAgentListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (jalr JobAgentListResult) jobAgentListResultPreparer(ctx context.Context) (*http.Request, error) { - if !jalr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(jalr.NextLink))) -} - -// JobAgentListResultPage contains a page of JobAgent values. -type JobAgentListResultPage struct { - fn func(context.Context, JobAgentListResult) (JobAgentListResult, error) - jalr JobAgentListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *JobAgentListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobAgentListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.jalr) - if err != nil { - return err - } - page.jalr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *JobAgentListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page JobAgentListResultPage) NotDone() bool { - return !page.jalr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page JobAgentListResultPage) Response() JobAgentListResult { - return page.jalr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page JobAgentListResultPage) Values() []JobAgent { - if page.jalr.IsEmpty() { - return nil - } - return *page.jalr.Value -} - -// Creates a new instance of the JobAgentListResultPage type. -func NewJobAgentListResultPage(cur JobAgentListResult, getNextPage func(context.Context, JobAgentListResult) (JobAgentListResult, error)) JobAgentListResultPage { - return JobAgentListResultPage{ - fn: getNextPage, - jalr: cur, - } -} - -// JobAgentProperties properties of a job agent. -type JobAgentProperties struct { - // DatabaseID - Resource ID of the database to store job metadata in. - DatabaseID *string `json:"databaseId,omitempty"` - // State - READ-ONLY; The state of the job agent. Possible values include: 'JobAgentStateCreating', 'JobAgentStateReady', 'JobAgentStateUpdating', 'JobAgentStateDeleting', 'JobAgentStateDisabled' - State JobAgentState `json:"state,omitempty"` -} - -// MarshalJSON is the custom marshaler for JobAgentProperties. -func (jap JobAgentProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if jap.DatabaseID != nil { - objectMap["databaseId"] = jap.DatabaseID - } - return json.Marshal(objectMap) -} - -// JobAgentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type JobAgentsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(JobAgentsClient) (JobAgent, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *JobAgentsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for JobAgentsCreateOrUpdateFuture.Result. -func (future *JobAgentsCreateOrUpdateFuture) result(client JobAgentsClient) (ja JobAgent, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobAgentsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ja.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.JobAgentsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ja.Response.Response, err = future.GetResult(sender); err == nil && ja.Response.Response.StatusCode != http.StatusNoContent { - ja, err = client.CreateOrUpdateResponder(ja.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobAgentsCreateOrUpdateFuture", "Result", ja.Response.Response, "Failure responding to request") - } - } - return -} - -// JobAgentsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type JobAgentsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(JobAgentsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *JobAgentsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for JobAgentsDeleteFuture.Result. -func (future *JobAgentsDeleteFuture) result(client JobAgentsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobAgentsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.JobAgentsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// JobAgentsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type JobAgentsUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(JobAgentsClient) (JobAgent, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *JobAgentsUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for JobAgentsUpdateFuture.Result. -func (future *JobAgentsUpdateFuture) result(client JobAgentsClient) (ja JobAgent, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobAgentsUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ja.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.JobAgentsUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ja.Response.Response, err = future.GetResult(sender); err == nil && ja.Response.Response.StatusCode != http.StatusNoContent { - ja, err = client.UpdateResponder(ja.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobAgentsUpdateFuture", "Result", ja.Response.Response, "Failure responding to request") - } - } - return -} - -// JobAgentUpdate an update to an Azure SQL job agent. -type JobAgentUpdate struct { - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for JobAgentUpdate. -func (jau JobAgentUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if jau.Tags != nil { - objectMap["tags"] = jau.Tags - } - return json.Marshal(objectMap) -} - -// JobCredential a stored credential that can be used by a job to connect to target databases. -type JobCredential struct { - autorest.Response `json:"-"` - // JobCredentialProperties - Resource properties. - *JobCredentialProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for JobCredential. -func (jc JobCredential) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if jc.JobCredentialProperties != nil { - objectMap["properties"] = jc.JobCredentialProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for JobCredential struct. -func (jc *JobCredential) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var jobCredentialProperties JobCredentialProperties - err = json.Unmarshal(*v, &jobCredentialProperties) - if err != nil { - return err - } - jc.JobCredentialProperties = &jobCredentialProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - jc.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - jc.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - jc.Type = &typeVar - } - } - } - - return nil -} - -// JobCredentialListResult a list of job credentials. -type JobCredentialListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]JobCredential `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for JobCredentialListResult. -func (jclr JobCredentialListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// JobCredentialListResultIterator provides access to a complete listing of JobCredential values. -type JobCredentialListResultIterator struct { - i int - page JobCredentialListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *JobCredentialListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobCredentialListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *JobCredentialListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter JobCredentialListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter JobCredentialListResultIterator) Response() JobCredentialListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter JobCredentialListResultIterator) Value() JobCredential { - if !iter.page.NotDone() { - return JobCredential{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the JobCredentialListResultIterator type. -func NewJobCredentialListResultIterator(page JobCredentialListResultPage) JobCredentialListResultIterator { - return JobCredentialListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (jclr JobCredentialListResult) IsEmpty() bool { - return jclr.Value == nil || len(*jclr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (jclr JobCredentialListResult) hasNextLink() bool { - return jclr.NextLink != nil && len(*jclr.NextLink) != 0 -} - -// jobCredentialListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (jclr JobCredentialListResult) jobCredentialListResultPreparer(ctx context.Context) (*http.Request, error) { - if !jclr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(jclr.NextLink))) -} - -// JobCredentialListResultPage contains a page of JobCredential values. -type JobCredentialListResultPage struct { - fn func(context.Context, JobCredentialListResult) (JobCredentialListResult, error) - jclr JobCredentialListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *JobCredentialListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobCredentialListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.jclr) - if err != nil { - return err - } - page.jclr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *JobCredentialListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page JobCredentialListResultPage) NotDone() bool { - return !page.jclr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page JobCredentialListResultPage) Response() JobCredentialListResult { - return page.jclr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page JobCredentialListResultPage) Values() []JobCredential { - if page.jclr.IsEmpty() { - return nil - } - return *page.jclr.Value -} - -// Creates a new instance of the JobCredentialListResultPage type. -func NewJobCredentialListResultPage(cur JobCredentialListResult, getNextPage func(context.Context, JobCredentialListResult) (JobCredentialListResult, error)) JobCredentialListResultPage { - return JobCredentialListResultPage{ - fn: getNextPage, - jclr: cur, - } -} - -// JobCredentialProperties properties of a job credential. -type JobCredentialProperties struct { - // Username - The credential user name. - Username *string `json:"username,omitempty"` - // Password - The credential password. - Password *string `json:"password,omitempty"` -} - -// JobExecution an execution of a job -type JobExecution struct { - autorest.Response `json:"-"` - // JobExecutionProperties - Resource properties. - *JobExecutionProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for JobExecution. -func (je JobExecution) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if je.JobExecutionProperties != nil { - objectMap["properties"] = je.JobExecutionProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for JobExecution struct. -func (je *JobExecution) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var jobExecutionProperties JobExecutionProperties - err = json.Unmarshal(*v, &jobExecutionProperties) - if err != nil { - return err - } - je.JobExecutionProperties = &jobExecutionProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - je.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - je.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - je.Type = &typeVar - } - } - } - - return nil -} - -// JobExecutionListResult a list of job executions. -type JobExecutionListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]JobExecution `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for JobExecutionListResult. -func (jelr JobExecutionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// JobExecutionListResultIterator provides access to a complete listing of JobExecution values. -type JobExecutionListResultIterator struct { - i int - page JobExecutionListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *JobExecutionListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobExecutionListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *JobExecutionListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter JobExecutionListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter JobExecutionListResultIterator) Response() JobExecutionListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter JobExecutionListResultIterator) Value() JobExecution { - if !iter.page.NotDone() { - return JobExecution{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the JobExecutionListResultIterator type. -func NewJobExecutionListResultIterator(page JobExecutionListResultPage) JobExecutionListResultIterator { - return JobExecutionListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (jelr JobExecutionListResult) IsEmpty() bool { - return jelr.Value == nil || len(*jelr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (jelr JobExecutionListResult) hasNextLink() bool { - return jelr.NextLink != nil && len(*jelr.NextLink) != 0 -} - -// jobExecutionListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (jelr JobExecutionListResult) jobExecutionListResultPreparer(ctx context.Context) (*http.Request, error) { - if !jelr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(jelr.NextLink))) -} - -// JobExecutionListResultPage contains a page of JobExecution values. -type JobExecutionListResultPage struct { - fn func(context.Context, JobExecutionListResult) (JobExecutionListResult, error) - jelr JobExecutionListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *JobExecutionListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobExecutionListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.jelr) - if err != nil { - return err - } - page.jelr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *JobExecutionListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page JobExecutionListResultPage) NotDone() bool { - return !page.jelr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page JobExecutionListResultPage) Response() JobExecutionListResult { - return page.jelr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page JobExecutionListResultPage) Values() []JobExecution { - if page.jelr.IsEmpty() { - return nil - } - return *page.jelr.Value -} - -// Creates a new instance of the JobExecutionListResultPage type. -func NewJobExecutionListResultPage(cur JobExecutionListResult, getNextPage func(context.Context, JobExecutionListResult) (JobExecutionListResult, error)) JobExecutionListResultPage { - return JobExecutionListResultPage{ - fn: getNextPage, - jelr: cur, - } -} - -// JobExecutionProperties properties for an Azure SQL Database Elastic job execution. -type JobExecutionProperties struct { - // JobVersion - READ-ONLY; The job version number. - JobVersion *int32 `json:"jobVersion,omitempty"` - // StepName - READ-ONLY; The job step name. - StepName *string `json:"stepName,omitempty"` - // StepID - READ-ONLY; The job step id. - StepID *int32 `json:"stepId,omitempty"` - // JobExecutionID - READ-ONLY; The unique identifier of the job execution. - JobExecutionID *uuid.UUID `json:"jobExecutionId,omitempty"` - // Lifecycle - READ-ONLY; The detailed state of the job execution. Possible values include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', 'TimedOut', 'Canceled', 'Skipped' - Lifecycle JobExecutionLifecycle `json:"lifecycle,omitempty"` - // ProvisioningState - READ-ONLY; The ARM provisioning state of the job execution. Possible values include: 'ProvisioningStateCreated', 'ProvisioningStateInProgress', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // CreateTime - READ-ONLY; The time that the job execution was created. - CreateTime *date.Time `json:"createTime,omitempty"` - // StartTime - READ-ONLY; The time that the job execution started. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - READ-ONLY; The time that the job execution completed. - EndTime *date.Time `json:"endTime,omitempty"` - // CurrentAttempts - Number of times the job execution has been attempted. - CurrentAttempts *int32 `json:"currentAttempts,omitempty"` - // CurrentAttemptStartTime - READ-ONLY; Start time of the current attempt. - CurrentAttemptStartTime *date.Time `json:"currentAttemptStartTime,omitempty"` - // LastMessage - READ-ONLY; The last status or error message. - LastMessage *string `json:"lastMessage,omitempty"` - // Target - READ-ONLY; The target that this execution is executed on. - Target *JobExecutionTarget `json:"target,omitempty"` -} - -// MarshalJSON is the custom marshaler for JobExecutionProperties. -func (jep JobExecutionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if jep.CurrentAttempts != nil { - objectMap["currentAttempts"] = jep.CurrentAttempts - } - return json.Marshal(objectMap) -} - -// JobExecutionsCreateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type JobExecutionsCreateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(JobExecutionsClient) (JobExecution, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *JobExecutionsCreateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for JobExecutionsCreateFuture.Result. -func (future *JobExecutionsCreateFuture) result(client JobExecutionsClient) (je JobExecution, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobExecutionsCreateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - je.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.JobExecutionsCreateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if je.Response.Response, err = future.GetResult(sender); err == nil && je.Response.Response.StatusCode != http.StatusNoContent { - je, err = client.CreateResponder(je.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobExecutionsCreateFuture", "Result", je.Response.Response, "Failure responding to request") - } - } - return -} - -// JobExecutionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type JobExecutionsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(JobExecutionsClient) (JobExecution, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *JobExecutionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for JobExecutionsCreateOrUpdateFuture.Result. -func (future *JobExecutionsCreateOrUpdateFuture) result(client JobExecutionsClient) (je JobExecution, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobExecutionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - je.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.JobExecutionsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if je.Response.Response, err = future.GetResult(sender); err == nil && je.Response.Response.StatusCode != http.StatusNoContent { - je, err = client.CreateOrUpdateResponder(je.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.JobExecutionsCreateOrUpdateFuture", "Result", je.Response.Response, "Failure responding to request") - } - } - return -} - -// JobExecutionTarget the target that a job execution is executed on. -type JobExecutionTarget struct { - // Type - READ-ONLY; The type of the target. Possible values include: 'JobTargetTypeTargetGroup', 'JobTargetTypeSQLDatabase', 'JobTargetTypeSQLElasticPool', 'JobTargetTypeSQLShardMap', 'JobTargetTypeSQLServer' - Type JobTargetType `json:"type,omitempty"` - // ServerName - READ-ONLY; The server name. - ServerName *string `json:"serverName,omitempty"` - // DatabaseName - READ-ONLY; The database name. - DatabaseName *string `json:"databaseName,omitempty"` -} - -// MarshalJSON is the custom marshaler for JobExecutionTarget. -func (jet JobExecutionTarget) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// JobListResult a list of jobs. -type JobListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]Job `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for JobListResult. -func (jlr JobListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// JobListResultIterator provides access to a complete listing of Job values. -type JobListResultIterator struct { - i int - page JobListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *JobListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *JobListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter JobListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter JobListResultIterator) Response() JobListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter JobListResultIterator) Value() Job { - if !iter.page.NotDone() { - return Job{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the JobListResultIterator type. -func NewJobListResultIterator(page JobListResultPage) JobListResultIterator { - return JobListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (jlr JobListResult) IsEmpty() bool { - return jlr.Value == nil || len(*jlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (jlr JobListResult) hasNextLink() bool { - return jlr.NextLink != nil && len(*jlr.NextLink) != 0 -} - -// jobListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (jlr JobListResult) jobListResultPreparer(ctx context.Context) (*http.Request, error) { - if !jlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(jlr.NextLink))) -} - -// JobListResultPage contains a page of Job values. -type JobListResultPage struct { - fn func(context.Context, JobListResult) (JobListResult, error) - jlr JobListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *JobListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.jlr) - if err != nil { - return err - } - page.jlr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *JobListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page JobListResultPage) NotDone() bool { - return !page.jlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page JobListResultPage) Response() JobListResult { - return page.jlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page JobListResultPage) Values() []Job { - if page.jlr.IsEmpty() { - return nil - } - return *page.jlr.Value -} - -// Creates a new instance of the JobListResultPage type. -func NewJobListResultPage(cur JobListResult, getNextPage func(context.Context, JobListResult) (JobListResult, error)) JobListResultPage { - return JobListResultPage{ - fn: getNextPage, - jlr: cur, - } -} - -// JobProperties properties of a job. -type JobProperties struct { - // Description - User-defined description of the job. - Description *string `json:"description,omitempty"` - // Version - READ-ONLY; The job version number. - Version *int32 `json:"version,omitempty"` - // Schedule - Schedule properties of the job. - Schedule *JobSchedule `json:"schedule,omitempty"` -} - -// MarshalJSON is the custom marshaler for JobProperties. -func (jp JobProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if jp.Description != nil { - objectMap["description"] = jp.Description - } - if jp.Schedule != nil { - objectMap["schedule"] = jp.Schedule - } - return json.Marshal(objectMap) -} - -// JobSchedule scheduling properties of a job. -type JobSchedule struct { - // StartTime - Schedule start time. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - Schedule end time. - EndTime *date.Time `json:"endTime,omitempty"` - // Type - Schedule interval type. Possible values include: 'Once', 'Recurring' - Type JobScheduleType `json:"type,omitempty"` - // Enabled - Whether or not the schedule is enabled. - Enabled *bool `json:"enabled,omitempty"` - // Interval - Value of the schedule's recurring interval, if the schedule type is recurring. ISO8601 duration format. - Interval *string `json:"interval,omitempty"` -} - -// JobStep a job step. -type JobStep struct { - autorest.Response `json:"-"` - // JobStepProperties - Resource properties. - *JobStepProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for JobStep. -func (js JobStep) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if js.JobStepProperties != nil { - objectMap["properties"] = js.JobStepProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for JobStep struct. -func (js *JobStep) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var jobStepProperties JobStepProperties - err = json.Unmarshal(*v, &jobStepProperties) - if err != nil { - return err - } - js.JobStepProperties = &jobStepProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - js.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - js.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - js.Type = &typeVar - } - } - } - - return nil -} - -// JobStepAction the action to be executed by a job step. -type JobStepAction struct { - // Type - Type of action being executed by the job step. Possible values include: 'TSQL' - Type JobStepActionType `json:"type,omitempty"` - // Source - The source of the action to execute. Possible values include: 'Inline' - Source JobStepActionSource `json:"source,omitempty"` - // Value - The action value, for example the text of the T-SQL script to execute. - Value *string `json:"value,omitempty"` -} - -// JobStepExecutionOptions the execution options of a job step. -type JobStepExecutionOptions struct { - // TimeoutSeconds - Execution timeout for the job step. - TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` - // RetryAttempts - Maximum number of times the job step will be reattempted if the first attempt fails. - RetryAttempts *int32 `json:"retryAttempts,omitempty"` - // InitialRetryIntervalSeconds - Initial delay between retries for job step execution. - InitialRetryIntervalSeconds *int32 `json:"initialRetryIntervalSeconds,omitempty"` - // MaximumRetryIntervalSeconds - The maximum amount of time to wait between retries for job step execution. - MaximumRetryIntervalSeconds *int32 `json:"maximumRetryIntervalSeconds,omitempty"` - // RetryIntervalBackoffMultiplier - The backoff multiplier for the time between retries. - RetryIntervalBackoffMultiplier *float64 `json:"retryIntervalBackoffMultiplier,omitempty"` -} - -// JobStepListResult a list of job steps. -type JobStepListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]JobStep `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for JobStepListResult. -func (jslr JobStepListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// JobStepListResultIterator provides access to a complete listing of JobStep values. -type JobStepListResultIterator struct { - i int - page JobStepListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *JobStepListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobStepListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *JobStepListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter JobStepListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter JobStepListResultIterator) Response() JobStepListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter JobStepListResultIterator) Value() JobStep { - if !iter.page.NotDone() { - return JobStep{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the JobStepListResultIterator type. -func NewJobStepListResultIterator(page JobStepListResultPage) JobStepListResultIterator { - return JobStepListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (jslr JobStepListResult) IsEmpty() bool { - return jslr.Value == nil || len(*jslr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (jslr JobStepListResult) hasNextLink() bool { - return jslr.NextLink != nil && len(*jslr.NextLink) != 0 -} - -// jobStepListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (jslr JobStepListResult) jobStepListResultPreparer(ctx context.Context) (*http.Request, error) { - if !jslr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(jslr.NextLink))) -} - -// JobStepListResultPage contains a page of JobStep values. -type JobStepListResultPage struct { - fn func(context.Context, JobStepListResult) (JobStepListResult, error) - jslr JobStepListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *JobStepListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobStepListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.jslr) - if err != nil { - return err - } - page.jslr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *JobStepListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page JobStepListResultPage) NotDone() bool { - return !page.jslr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page JobStepListResultPage) Response() JobStepListResult { - return page.jslr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page JobStepListResultPage) Values() []JobStep { - if page.jslr.IsEmpty() { - return nil - } - return *page.jslr.Value -} - -// Creates a new instance of the JobStepListResultPage type. -func NewJobStepListResultPage(cur JobStepListResult, getNextPage func(context.Context, JobStepListResult) (JobStepListResult, error)) JobStepListResultPage { - return JobStepListResultPage{ - fn: getNextPage, - jslr: cur, - } -} - -// JobStepOutput the output configuration of a job step. -type JobStepOutput struct { - // Type - The output destination type. Possible values include: 'SQLDatabase' - Type JobStepOutputType `json:"type,omitempty"` - // SubscriptionID - The output destination subscription id. - SubscriptionID *uuid.UUID `json:"subscriptionId,omitempty"` - // ResourceGroupName - The output destination resource group. - ResourceGroupName *string `json:"resourceGroupName,omitempty"` - // ServerName - The output destination server name. - ServerName *string `json:"serverName,omitempty"` - // DatabaseName - The output destination database. - DatabaseName *string `json:"databaseName,omitempty"` - // SchemaName - The output destination schema. - SchemaName *string `json:"schemaName,omitempty"` - // TableName - The output destination table. - TableName *string `json:"tableName,omitempty"` - // Credential - The resource ID of the credential to use to connect to the output destination. - Credential *string `json:"credential,omitempty"` -} - -// JobStepProperties properties of a job step. -type JobStepProperties struct { - // StepID - The job step's index within the job. If not specified when creating the job step, it will be created as the last step. If not specified when updating the job step, the step id is not modified. - StepID *int32 `json:"stepId,omitempty"` - // TargetGroup - The resource ID of the target group that the job step will be executed on. - TargetGroup *string `json:"targetGroup,omitempty"` - // Credential - The resource ID of the job credential that will be used to connect to the targets. - Credential *string `json:"credential,omitempty"` - // Action - The action payload of the job step. - Action *JobStepAction `json:"action,omitempty"` - // Output - Output destination properties of the job step. - Output *JobStepOutput `json:"output,omitempty"` - // ExecutionOptions - Execution options for the job step. - ExecutionOptions *JobStepExecutionOptions `json:"executionOptions,omitempty"` -} - -// JobTarget a job target, for example a specific database or a container of databases that is evaluated -// during job execution. -type JobTarget struct { - // MembershipType - Whether the target is included or excluded from the group. Possible values include: 'Include', 'Exclude' - MembershipType JobTargetGroupMembershipType `json:"membershipType,omitempty"` - // Type - The target type. Possible values include: 'JobTargetTypeTargetGroup', 'JobTargetTypeSQLDatabase', 'JobTargetTypeSQLElasticPool', 'JobTargetTypeSQLShardMap', 'JobTargetTypeSQLServer' - Type JobTargetType `json:"type,omitempty"` - // ServerName - The target server name. - ServerName *string `json:"serverName,omitempty"` - // DatabaseName - The target database name. - DatabaseName *string `json:"databaseName,omitempty"` - // ElasticPoolName - The target elastic pool name. - ElasticPoolName *string `json:"elasticPoolName,omitempty"` - // ShardMapName - The target shard map. - ShardMapName *string `json:"shardMapName,omitempty"` - // RefreshCredential - The resource ID of the credential that is used during job execution to connect to the target and determine the list of databases inside the target. - RefreshCredential *string `json:"refreshCredential,omitempty"` -} - -// JobTargetGroup a group of job targets. -type JobTargetGroup struct { - autorest.Response `json:"-"` - // JobTargetGroupProperties - Resource properties. - *JobTargetGroupProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for JobTargetGroup. -func (jtg JobTargetGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if jtg.JobTargetGroupProperties != nil { - objectMap["properties"] = jtg.JobTargetGroupProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for JobTargetGroup struct. -func (jtg *JobTargetGroup) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var jobTargetGroupProperties JobTargetGroupProperties - err = json.Unmarshal(*v, &jobTargetGroupProperties) - if err != nil { - return err - } - jtg.JobTargetGroupProperties = &jobTargetGroupProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - jtg.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - jtg.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - jtg.Type = &typeVar - } - } - } - - return nil -} - -// JobTargetGroupListResult a list of target groups. -type JobTargetGroupListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]JobTargetGroup `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for JobTargetGroupListResult. -func (jtglr JobTargetGroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// JobTargetGroupListResultIterator provides access to a complete listing of JobTargetGroup values. -type JobTargetGroupListResultIterator struct { - i int - page JobTargetGroupListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *JobTargetGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobTargetGroupListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *JobTargetGroupListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter JobTargetGroupListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter JobTargetGroupListResultIterator) Response() JobTargetGroupListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter JobTargetGroupListResultIterator) Value() JobTargetGroup { - if !iter.page.NotDone() { - return JobTargetGroup{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the JobTargetGroupListResultIterator type. -func NewJobTargetGroupListResultIterator(page JobTargetGroupListResultPage) JobTargetGroupListResultIterator { - return JobTargetGroupListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (jtglr JobTargetGroupListResult) IsEmpty() bool { - return jtglr.Value == nil || len(*jtglr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (jtglr JobTargetGroupListResult) hasNextLink() bool { - return jtglr.NextLink != nil && len(*jtglr.NextLink) != 0 -} - -// jobTargetGroupListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (jtglr JobTargetGroupListResult) jobTargetGroupListResultPreparer(ctx context.Context) (*http.Request, error) { - if !jtglr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(jtglr.NextLink))) -} - -// JobTargetGroupListResultPage contains a page of JobTargetGroup values. -type JobTargetGroupListResultPage struct { - fn func(context.Context, JobTargetGroupListResult) (JobTargetGroupListResult, error) - jtglr JobTargetGroupListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *JobTargetGroupListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobTargetGroupListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.jtglr) - if err != nil { - return err - } - page.jtglr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *JobTargetGroupListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page JobTargetGroupListResultPage) NotDone() bool { - return !page.jtglr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page JobTargetGroupListResultPage) Response() JobTargetGroupListResult { - return page.jtglr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page JobTargetGroupListResultPage) Values() []JobTargetGroup { - if page.jtglr.IsEmpty() { - return nil - } - return *page.jtglr.Value -} - -// Creates a new instance of the JobTargetGroupListResultPage type. -func NewJobTargetGroupListResultPage(cur JobTargetGroupListResult, getNextPage func(context.Context, JobTargetGroupListResult) (JobTargetGroupListResult, error)) JobTargetGroupListResultPage { - return JobTargetGroupListResultPage{ - fn: getNextPage, - jtglr: cur, - } -} - -// JobTargetGroupProperties properties of job target group. -type JobTargetGroupProperties struct { - // Members - Members of the target group. - Members *[]JobTarget `json:"members,omitempty"` -} - -// JobVersion a job version. -type JobVersion struct { - autorest.Response `json:"-"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for JobVersion. -func (jv JobVersion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// JobVersionListResult a list of job versions. -type JobVersionListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]JobVersion `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for JobVersionListResult. -func (jvlr JobVersionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// JobVersionListResultIterator provides access to a complete listing of JobVersion values. -type JobVersionListResultIterator struct { - i int - page JobVersionListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *JobVersionListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobVersionListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *JobVersionListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter JobVersionListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter JobVersionListResultIterator) Response() JobVersionListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter JobVersionListResultIterator) Value() JobVersion { - if !iter.page.NotDone() { - return JobVersion{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the JobVersionListResultIterator type. -func NewJobVersionListResultIterator(page JobVersionListResultPage) JobVersionListResultIterator { - return JobVersionListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (jvlr JobVersionListResult) IsEmpty() bool { - return jvlr.Value == nil || len(*jvlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (jvlr JobVersionListResult) hasNextLink() bool { - return jvlr.NextLink != nil && len(*jvlr.NextLink) != 0 -} - -// jobVersionListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (jvlr JobVersionListResult) jobVersionListResultPreparer(ctx context.Context) (*http.Request, error) { - if !jvlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(jvlr.NextLink))) -} - -// JobVersionListResultPage contains a page of JobVersion values. -type JobVersionListResultPage struct { - fn func(context.Context, JobVersionListResult) (JobVersionListResult, error) - jvlr JobVersionListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *JobVersionListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobVersionListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.jvlr) - if err != nil { - return err - } - page.jvlr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *JobVersionListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page JobVersionListResultPage) NotDone() bool { - return !page.jvlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page JobVersionListResultPage) Response() JobVersionListResult { - return page.jvlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page JobVersionListResultPage) Values() []JobVersion { - if page.jvlr.IsEmpty() { - return nil - } - return *page.jvlr.Value -} - -// Creates a new instance of the JobVersionListResultPage type. -func NewJobVersionListResultPage(cur JobVersionListResult, getNextPage func(context.Context, JobVersionListResult) (JobVersionListResult, error)) JobVersionListResultPage { - return JobVersionListResultPage{ - fn: getNextPage, - jvlr: cur, - } -} - -// LocationCapabilities the capabilities for a location. -type LocationCapabilities struct { - autorest.Response `json:"-"` - // Name - READ-ONLY; The location name. - Name *string `json:"name,omitempty"` - // Status - READ-ONLY; Azure SQL Database's status for the location. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled' - Status CapabilityStatus `json:"status,omitempty"` - // SupportedServerVersions - READ-ONLY; The list of supported server versions. - SupportedServerVersions *[]ServerVersionCapability `json:"supportedServerVersions,omitempty"` -} - -// MarshalJSON is the custom marshaler for LocationCapabilities. -func (lc LocationCapabilities) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// LogicalServerSecurityAlertPolicyListResult a list of the server's security alert policies. -type LogicalServerSecurityAlertPolicyListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]ServerSecurityAlertPolicy `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for LogicalServerSecurityAlertPolicyListResult. -func (lssaplr LogicalServerSecurityAlertPolicyListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// LogicalServerSecurityAlertPolicyListResultIterator provides access to a complete listing of -// ServerSecurityAlertPolicy values. -type LogicalServerSecurityAlertPolicyListResultIterator struct { - i int - page LogicalServerSecurityAlertPolicyListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *LogicalServerSecurityAlertPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LogicalServerSecurityAlertPolicyListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *LogicalServerSecurityAlertPolicyListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter LogicalServerSecurityAlertPolicyListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter LogicalServerSecurityAlertPolicyListResultIterator) Response() LogicalServerSecurityAlertPolicyListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter LogicalServerSecurityAlertPolicyListResultIterator) Value() ServerSecurityAlertPolicy { - if !iter.page.NotDone() { - return ServerSecurityAlertPolicy{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the LogicalServerSecurityAlertPolicyListResultIterator type. -func NewLogicalServerSecurityAlertPolicyListResultIterator(page LogicalServerSecurityAlertPolicyListResultPage) LogicalServerSecurityAlertPolicyListResultIterator { - return LogicalServerSecurityAlertPolicyListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (lssaplr LogicalServerSecurityAlertPolicyListResult) IsEmpty() bool { - return lssaplr.Value == nil || len(*lssaplr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (lssaplr LogicalServerSecurityAlertPolicyListResult) hasNextLink() bool { - return lssaplr.NextLink != nil && len(*lssaplr.NextLink) != 0 -} - -// logicalServerSecurityAlertPolicyListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (lssaplr LogicalServerSecurityAlertPolicyListResult) logicalServerSecurityAlertPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { - if !lssaplr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lssaplr.NextLink))) -} - -// LogicalServerSecurityAlertPolicyListResultPage contains a page of ServerSecurityAlertPolicy values. -type LogicalServerSecurityAlertPolicyListResultPage struct { - fn func(context.Context, LogicalServerSecurityAlertPolicyListResult) (LogicalServerSecurityAlertPolicyListResult, error) - lssaplr LogicalServerSecurityAlertPolicyListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *LogicalServerSecurityAlertPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LogicalServerSecurityAlertPolicyListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.lssaplr) - if err != nil { - return err - } - page.lssaplr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *LogicalServerSecurityAlertPolicyListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page LogicalServerSecurityAlertPolicyListResultPage) NotDone() bool { - return !page.lssaplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page LogicalServerSecurityAlertPolicyListResultPage) Response() LogicalServerSecurityAlertPolicyListResult { - return page.lssaplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page LogicalServerSecurityAlertPolicyListResultPage) Values() []ServerSecurityAlertPolicy { - if page.lssaplr.IsEmpty() { - return nil - } - return *page.lssaplr.Value -} - -// Creates a new instance of the LogicalServerSecurityAlertPolicyListResultPage type. -func NewLogicalServerSecurityAlertPolicyListResultPage(cur LogicalServerSecurityAlertPolicyListResult, getNextPage func(context.Context, LogicalServerSecurityAlertPolicyListResult) (LogicalServerSecurityAlertPolicyListResult, error)) LogicalServerSecurityAlertPolicyListResultPage { - return LogicalServerSecurityAlertPolicyListResultPage{ - fn: getNextPage, - lssaplr: cur, - } -} - -// ManagedBackupShortTermRetentionPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving -// the results of a long-running operation. -type ManagedBackupShortTermRetentionPoliciesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ManagedBackupShortTermRetentionPoliciesClient) (ManagedBackupShortTermRetentionPolicy, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ManagedBackupShortTermRetentionPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ManagedBackupShortTermRetentionPoliciesCreateOrUpdateFuture.Result. -func (future *ManagedBackupShortTermRetentionPoliciesCreateOrUpdateFuture) result(client ManagedBackupShortTermRetentionPoliciesClient) (mbstrp ManagedBackupShortTermRetentionPolicy, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedBackupShortTermRetentionPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - mbstrp.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ManagedBackupShortTermRetentionPoliciesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if mbstrp.Response.Response, err = future.GetResult(sender); err == nil && mbstrp.Response.Response.StatusCode != http.StatusNoContent { - mbstrp, err = client.CreateOrUpdateResponder(mbstrp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedBackupShortTermRetentionPoliciesCreateOrUpdateFuture", "Result", mbstrp.Response.Response, "Failure responding to request") - } - } - return -} - -// ManagedBackupShortTermRetentionPoliciesUpdateFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type ManagedBackupShortTermRetentionPoliciesUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ManagedBackupShortTermRetentionPoliciesClient) (ManagedBackupShortTermRetentionPolicy, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ManagedBackupShortTermRetentionPoliciesUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ManagedBackupShortTermRetentionPoliciesUpdateFuture.Result. -func (future *ManagedBackupShortTermRetentionPoliciesUpdateFuture) result(client ManagedBackupShortTermRetentionPoliciesClient) (mbstrp ManagedBackupShortTermRetentionPolicy, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedBackupShortTermRetentionPoliciesUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - mbstrp.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ManagedBackupShortTermRetentionPoliciesUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if mbstrp.Response.Response, err = future.GetResult(sender); err == nil && mbstrp.Response.Response.StatusCode != http.StatusNoContent { - mbstrp, err = client.UpdateResponder(mbstrp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedBackupShortTermRetentionPoliciesUpdateFuture", "Result", mbstrp.Response.Response, "Failure responding to request") - } - } - return -} - -// ManagedBackupShortTermRetentionPolicy a short term retention policy. -type ManagedBackupShortTermRetentionPolicy struct { - autorest.Response `json:"-"` - // ManagedBackupShortTermRetentionPolicyProperties - Resource properties. - *ManagedBackupShortTermRetentionPolicyProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedBackupShortTermRetentionPolicy. -func (mbstrp ManagedBackupShortTermRetentionPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mbstrp.ManagedBackupShortTermRetentionPolicyProperties != nil { - objectMap["properties"] = mbstrp.ManagedBackupShortTermRetentionPolicyProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ManagedBackupShortTermRetentionPolicy struct. -func (mbstrp *ManagedBackupShortTermRetentionPolicy) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var managedBackupShortTermRetentionPolicyProperties ManagedBackupShortTermRetentionPolicyProperties - err = json.Unmarshal(*v, &managedBackupShortTermRetentionPolicyProperties) - if err != nil { - return err - } - mbstrp.ManagedBackupShortTermRetentionPolicyProperties = &managedBackupShortTermRetentionPolicyProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - mbstrp.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - mbstrp.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - mbstrp.Type = &typeVar - } - } - } - - return nil -} - -// ManagedBackupShortTermRetentionPolicyListResult a list of short term retention policies. -type ManagedBackupShortTermRetentionPolicyListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]ManagedBackupShortTermRetentionPolicy `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedBackupShortTermRetentionPolicyListResult. -func (mbstrplr ManagedBackupShortTermRetentionPolicyListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ManagedBackupShortTermRetentionPolicyListResultIterator provides access to a complete listing of -// ManagedBackupShortTermRetentionPolicy values. -type ManagedBackupShortTermRetentionPolicyListResultIterator struct { - i int - page ManagedBackupShortTermRetentionPolicyListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ManagedBackupShortTermRetentionPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedBackupShortTermRetentionPolicyListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ManagedBackupShortTermRetentionPolicyListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ManagedBackupShortTermRetentionPolicyListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter ManagedBackupShortTermRetentionPolicyListResultIterator) Response() ManagedBackupShortTermRetentionPolicyListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ManagedBackupShortTermRetentionPolicyListResultIterator) Value() ManagedBackupShortTermRetentionPolicy { - if !iter.page.NotDone() { - return ManagedBackupShortTermRetentionPolicy{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ManagedBackupShortTermRetentionPolicyListResultIterator type. -func NewManagedBackupShortTermRetentionPolicyListResultIterator(page ManagedBackupShortTermRetentionPolicyListResultPage) ManagedBackupShortTermRetentionPolicyListResultIterator { - return ManagedBackupShortTermRetentionPolicyListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (mbstrplr ManagedBackupShortTermRetentionPolicyListResult) IsEmpty() bool { - return mbstrplr.Value == nil || len(*mbstrplr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (mbstrplr ManagedBackupShortTermRetentionPolicyListResult) hasNextLink() bool { - return mbstrplr.NextLink != nil && len(*mbstrplr.NextLink) != 0 -} - -// managedBackupShortTermRetentionPolicyListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (mbstrplr ManagedBackupShortTermRetentionPolicyListResult) managedBackupShortTermRetentionPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { - if !mbstrplr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(mbstrplr.NextLink))) -} - -// ManagedBackupShortTermRetentionPolicyListResultPage contains a page of -// ManagedBackupShortTermRetentionPolicy values. -type ManagedBackupShortTermRetentionPolicyListResultPage struct { - fn func(context.Context, ManagedBackupShortTermRetentionPolicyListResult) (ManagedBackupShortTermRetentionPolicyListResult, error) - mbstrplr ManagedBackupShortTermRetentionPolicyListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ManagedBackupShortTermRetentionPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedBackupShortTermRetentionPolicyListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.mbstrplr) - if err != nil { - return err - } - page.mbstrplr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ManagedBackupShortTermRetentionPolicyListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ManagedBackupShortTermRetentionPolicyListResultPage) NotDone() bool { - return !page.mbstrplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ManagedBackupShortTermRetentionPolicyListResultPage) Response() ManagedBackupShortTermRetentionPolicyListResult { - return page.mbstrplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ManagedBackupShortTermRetentionPolicyListResultPage) Values() []ManagedBackupShortTermRetentionPolicy { - if page.mbstrplr.IsEmpty() { - return nil - } - return *page.mbstrplr.Value -} - -// Creates a new instance of the ManagedBackupShortTermRetentionPolicyListResultPage type. -func NewManagedBackupShortTermRetentionPolicyListResultPage(cur ManagedBackupShortTermRetentionPolicyListResult, getNextPage func(context.Context, ManagedBackupShortTermRetentionPolicyListResult) (ManagedBackupShortTermRetentionPolicyListResult, error)) ManagedBackupShortTermRetentionPolicyListResultPage { - return ManagedBackupShortTermRetentionPolicyListResultPage{ - fn: getNextPage, - mbstrplr: cur, - } -} - -// ManagedBackupShortTermRetentionPolicyProperties properties of a short term retention policy -type ManagedBackupShortTermRetentionPolicyProperties struct { - // RetentionDays - The backup retention period in days. This is how many days Point-in-Time Restore will be supported. - RetentionDays *int32 `json:"retentionDays,omitempty"` -} - -// ManagedDatabase a managed database resource. -type ManagedDatabase struct { - autorest.Response `json:"-"` - // ManagedDatabaseProperties - Resource properties. - *ManagedDatabaseProperties `json:"properties,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedDatabase. -func (md ManagedDatabase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if md.ManagedDatabaseProperties != nil { - objectMap["properties"] = md.ManagedDatabaseProperties - } - if md.Location != nil { - objectMap["location"] = md.Location - } - if md.Tags != nil { - objectMap["tags"] = md.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ManagedDatabase struct. -func (md *ManagedDatabase) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var managedDatabaseProperties ManagedDatabaseProperties - err = json.Unmarshal(*v, &managedDatabaseProperties) - if err != nil { - return err - } - md.ManagedDatabaseProperties = &managedDatabaseProperties - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - md.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - md.Tags = tags - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - md.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - md.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - md.Type = &typeVar - } - } - } - - return nil -} - -// ManagedDatabaseListResult a list of managed databases. -type ManagedDatabaseListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]ManagedDatabase `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedDatabaseListResult. -func (mdlr ManagedDatabaseListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ManagedDatabaseListResultIterator provides access to a complete listing of ManagedDatabase values. -type ManagedDatabaseListResultIterator struct { - i int - page ManagedDatabaseListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ManagedDatabaseListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabaseListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ManagedDatabaseListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ManagedDatabaseListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter ManagedDatabaseListResultIterator) Response() ManagedDatabaseListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ManagedDatabaseListResultIterator) Value() ManagedDatabase { - if !iter.page.NotDone() { - return ManagedDatabase{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ManagedDatabaseListResultIterator type. -func NewManagedDatabaseListResultIterator(page ManagedDatabaseListResultPage) ManagedDatabaseListResultIterator { - return ManagedDatabaseListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (mdlr ManagedDatabaseListResult) IsEmpty() bool { - return mdlr.Value == nil || len(*mdlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (mdlr ManagedDatabaseListResult) hasNextLink() bool { - return mdlr.NextLink != nil && len(*mdlr.NextLink) != 0 -} - -// managedDatabaseListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (mdlr ManagedDatabaseListResult) managedDatabaseListResultPreparer(ctx context.Context) (*http.Request, error) { - if !mdlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(mdlr.NextLink))) -} - -// ManagedDatabaseListResultPage contains a page of ManagedDatabase values. -type ManagedDatabaseListResultPage struct { - fn func(context.Context, ManagedDatabaseListResult) (ManagedDatabaseListResult, error) - mdlr ManagedDatabaseListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ManagedDatabaseListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabaseListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.mdlr) - if err != nil { - return err - } - page.mdlr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ManagedDatabaseListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ManagedDatabaseListResultPage) NotDone() bool { - return !page.mdlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ManagedDatabaseListResultPage) Response() ManagedDatabaseListResult { - return page.mdlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ManagedDatabaseListResultPage) Values() []ManagedDatabase { - if page.mdlr.IsEmpty() { - return nil - } - return *page.mdlr.Value -} - -// Creates a new instance of the ManagedDatabaseListResultPage type. -func NewManagedDatabaseListResultPage(cur ManagedDatabaseListResult, getNextPage func(context.Context, ManagedDatabaseListResult) (ManagedDatabaseListResult, error)) ManagedDatabaseListResultPage { - return ManagedDatabaseListResultPage{ - fn: getNextPage, - mdlr: cur, - } -} - -// ManagedDatabaseProperties the managed database's properties. -type ManagedDatabaseProperties struct { - // Collation - Collation of the managed database. - Collation *string `json:"collation,omitempty"` - // Status - READ-ONLY; Status of the database. Possible values include: 'Online', 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Restoring', 'Updating' - Status ManagedDatabaseStatus `json:"status,omitempty"` - // CreationDate - READ-ONLY; Creation date of the database. - CreationDate *date.Time `json:"creationDate,omitempty"` - // EarliestRestorePoint - READ-ONLY; Earliest restore point in time for point in time restore. - EarliestRestorePoint *date.Time `json:"earliestRestorePoint,omitempty"` - // RestorePointInTime - Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. - RestorePointInTime *date.Time `json:"restorePointInTime,omitempty"` - // DefaultSecondaryLocation - READ-ONLY; Geo paired region. - DefaultSecondaryLocation *string `json:"defaultSecondaryLocation,omitempty"` - // CatalogCollation - Collation of the metadata catalog. Possible values include: 'DATABASEDEFAULT', 'SQLLatin1GeneralCP1CIAS' - CatalogCollation CatalogCollationType `json:"catalogCollation,omitempty"` - // CreateMode - Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. Possible values include: 'ManagedDatabaseCreateModeDefault', 'ManagedDatabaseCreateModeRestoreExternalBackup', 'ManagedDatabaseCreateModePointInTimeRestore', 'ManagedDatabaseCreateModeRecovery', 'ManagedDatabaseCreateModeRestoreLongTermRetentionBackup' - CreateMode ManagedDatabaseCreateMode `json:"createMode,omitempty"` - // StorageContainerURI - Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored. - StorageContainerURI *string `json:"storageContainerUri,omitempty"` - // SourceDatabaseID - The resource identifier of the source database associated with create operation of this database. - SourceDatabaseID *string `json:"sourceDatabaseId,omitempty"` - // RestorableDroppedDatabaseID - The restorable dropped database resource id to restore when creating this database. - RestorableDroppedDatabaseID *string `json:"restorableDroppedDatabaseId,omitempty"` - // StorageContainerSasToken - Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token. - StorageContainerSasToken *string `json:"storageContainerSasToken,omitempty"` - // FailoverGroupID - READ-ONLY; Instance Failover Group resource identifier that this managed database belongs to. - FailoverGroupID *string `json:"failoverGroupId,omitempty"` - // RecoverableDatabaseID - The resource identifier of the recoverable database associated with create operation of this database. - RecoverableDatabaseID *string `json:"recoverableDatabaseId,omitempty"` - // LongTermRetentionBackupResourceID - The name of the Long Term Retention backup to be used for restore of this managed database. - LongTermRetentionBackupResourceID *string `json:"longTermRetentionBackupResourceId,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedDatabaseProperties. -func (mdp ManagedDatabaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mdp.Collation != nil { - objectMap["collation"] = mdp.Collation - } - if mdp.RestorePointInTime != nil { - objectMap["restorePointInTime"] = mdp.RestorePointInTime - } - if mdp.CatalogCollation != "" { - objectMap["catalogCollation"] = mdp.CatalogCollation - } - if mdp.CreateMode != "" { - objectMap["createMode"] = mdp.CreateMode - } - if mdp.StorageContainerURI != nil { - objectMap["storageContainerUri"] = mdp.StorageContainerURI - } - if mdp.SourceDatabaseID != nil { - objectMap["sourceDatabaseId"] = mdp.SourceDatabaseID - } - if mdp.RestorableDroppedDatabaseID != nil { - objectMap["restorableDroppedDatabaseId"] = mdp.RestorableDroppedDatabaseID - } - if mdp.StorageContainerSasToken != nil { - objectMap["storageContainerSasToken"] = mdp.StorageContainerSasToken - } - if mdp.RecoverableDatabaseID != nil { - objectMap["recoverableDatabaseId"] = mdp.RecoverableDatabaseID - } - if mdp.LongTermRetentionBackupResourceID != nil { - objectMap["longTermRetentionBackupResourceId"] = mdp.LongTermRetentionBackupResourceID - } - return json.Marshal(objectMap) -} - -// ManagedDatabasesCompleteRestoreFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ManagedDatabasesCompleteRestoreFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ManagedDatabasesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ManagedDatabasesCompleteRestoreFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ManagedDatabasesCompleteRestoreFuture.Result. -func (future *ManagedDatabasesCompleteRestoreFuture) result(client ManagedDatabasesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesCompleteRestoreFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ManagedDatabasesCompleteRestoreFuture") - return - } - ar.Response = future.Response() - return -} - -// ManagedDatabasesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ManagedDatabasesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ManagedDatabasesClient) (ManagedDatabase, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ManagedDatabasesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ManagedDatabasesCreateOrUpdateFuture.Result. -func (future *ManagedDatabasesCreateOrUpdateFuture) result(client ManagedDatabasesClient) (md ManagedDatabase, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - md.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ManagedDatabasesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if md.Response.Response, err = future.GetResult(sender); err == nil && md.Response.Response.StatusCode != http.StatusNoContent { - md, err = client.CreateOrUpdateResponder(md.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesCreateOrUpdateFuture", "Result", md.Response.Response, "Failure responding to request") - } - } - return -} - -// ManagedDatabasesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ManagedDatabasesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ManagedDatabasesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ManagedDatabasesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ManagedDatabasesDeleteFuture.Result. -func (future *ManagedDatabasesDeleteFuture) result(client ManagedDatabasesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ManagedDatabasesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ManagedDatabasesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ManagedDatabasesUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ManagedDatabasesClient) (ManagedDatabase, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ManagedDatabasesUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ManagedDatabasesUpdateFuture.Result. -func (future *ManagedDatabasesUpdateFuture) result(client ManagedDatabasesClient) (md ManagedDatabase, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - md.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ManagedDatabasesUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if md.Response.Response, err = future.GetResult(sender); err == nil && md.Response.Response.StatusCode != http.StatusNoContent { - md, err = client.UpdateResponder(md.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesUpdateFuture", "Result", md.Response.Response, "Failure responding to request") - } - } - return -} - -// ManagedDatabaseUpdate an managed database update. -type ManagedDatabaseUpdate struct { - // ManagedDatabaseProperties - Resource properties. - *ManagedDatabaseProperties `json:"properties,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for ManagedDatabaseUpdate. -func (mdu ManagedDatabaseUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mdu.ManagedDatabaseProperties != nil { - objectMap["properties"] = mdu.ManagedDatabaseProperties - } - if mdu.Tags != nil { - objectMap["tags"] = mdu.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ManagedDatabaseUpdate struct. -func (mdu *ManagedDatabaseUpdate) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var managedDatabaseProperties ManagedDatabaseProperties - err = json.Unmarshal(*v, &managedDatabaseProperties) - if err != nil { - return err - } - mdu.ManagedDatabaseProperties = &managedDatabaseProperties - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - mdu.Tags = tags - } - } - } - - return nil -} - -// ManagedInstance an Azure SQL managed instance. -type ManagedInstance struct { - autorest.Response `json:"-"` - // Identity - The Azure Active Directory identity of the managed instance. - Identity *ResourceIdentity `json:"identity,omitempty"` - // Sku - Managed instance SKU. Allowed values for sku.name: GP_Gen4, GP_Gen5, BC_Gen4, BC_Gen5 - Sku *Sku `json:"sku,omitempty"` - // ManagedInstanceProperties - Resource properties. - *ManagedInstanceProperties `json:"properties,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedInstance. -func (mi ManagedInstance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mi.Identity != nil { - objectMap["identity"] = mi.Identity - } - if mi.Sku != nil { - objectMap["sku"] = mi.Sku - } - if mi.ManagedInstanceProperties != nil { - objectMap["properties"] = mi.ManagedInstanceProperties - } - if mi.Location != nil { - objectMap["location"] = mi.Location - } - if mi.Tags != nil { - objectMap["tags"] = mi.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ManagedInstance struct. -func (mi *ManagedInstance) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "identity": - if v != nil { - var identity ResourceIdentity - err = json.Unmarshal(*v, &identity) - if err != nil { - return err - } - mi.Identity = &identity - } - case "sku": - if v != nil { - var sku Sku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - mi.Sku = &sku - } - case "properties": - if v != nil { - var managedInstanceProperties ManagedInstanceProperties - err = json.Unmarshal(*v, &managedInstanceProperties) - if err != nil { - return err - } - mi.ManagedInstanceProperties = &managedInstanceProperties - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - mi.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - mi.Tags = tags - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - mi.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - mi.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - mi.Type = &typeVar - } - } - } - - return nil -} - -// ManagedInstanceAdministrator an Azure SQL managed instance administrator. -type ManagedInstanceAdministrator struct { - autorest.Response `json:"-"` - // ManagedInstanceAdministratorProperties - Resource properties. - *ManagedInstanceAdministratorProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedInstanceAdministrator. -func (mia ManagedInstanceAdministrator) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mia.ManagedInstanceAdministratorProperties != nil { - objectMap["properties"] = mia.ManagedInstanceAdministratorProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ManagedInstanceAdministrator struct. -func (mia *ManagedInstanceAdministrator) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var managedInstanceAdministratorProperties ManagedInstanceAdministratorProperties - err = json.Unmarshal(*v, &managedInstanceAdministratorProperties) - if err != nil { - return err - } - mia.ManagedInstanceAdministratorProperties = &managedInstanceAdministratorProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - mia.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - mia.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - mia.Type = &typeVar - } - } - } - - return nil -} - -// ManagedInstanceAdministratorListResult a list of managed instance administrators. -type ManagedInstanceAdministratorListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]ManagedInstanceAdministrator `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedInstanceAdministratorListResult. -func (mialr ManagedInstanceAdministratorListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ManagedInstanceAdministratorListResultIterator provides access to a complete listing of -// ManagedInstanceAdministrator values. -type ManagedInstanceAdministratorListResultIterator struct { - i int - page ManagedInstanceAdministratorListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ManagedInstanceAdministratorListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceAdministratorListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ManagedInstanceAdministratorListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ManagedInstanceAdministratorListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter ManagedInstanceAdministratorListResultIterator) Response() ManagedInstanceAdministratorListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ManagedInstanceAdministratorListResultIterator) Value() ManagedInstanceAdministrator { - if !iter.page.NotDone() { - return ManagedInstanceAdministrator{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ManagedInstanceAdministratorListResultIterator type. -func NewManagedInstanceAdministratorListResultIterator(page ManagedInstanceAdministratorListResultPage) ManagedInstanceAdministratorListResultIterator { - return ManagedInstanceAdministratorListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (mialr ManagedInstanceAdministratorListResult) IsEmpty() bool { - return mialr.Value == nil || len(*mialr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (mialr ManagedInstanceAdministratorListResult) hasNextLink() bool { - return mialr.NextLink != nil && len(*mialr.NextLink) != 0 -} - -// managedInstanceAdministratorListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (mialr ManagedInstanceAdministratorListResult) managedInstanceAdministratorListResultPreparer(ctx context.Context) (*http.Request, error) { - if !mialr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(mialr.NextLink))) -} - -// ManagedInstanceAdministratorListResultPage contains a page of ManagedInstanceAdministrator values. -type ManagedInstanceAdministratorListResultPage struct { - fn func(context.Context, ManagedInstanceAdministratorListResult) (ManagedInstanceAdministratorListResult, error) - mialr ManagedInstanceAdministratorListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ManagedInstanceAdministratorListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceAdministratorListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.mialr) - if err != nil { - return err - } - page.mialr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ManagedInstanceAdministratorListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ManagedInstanceAdministratorListResultPage) NotDone() bool { - return !page.mialr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ManagedInstanceAdministratorListResultPage) Response() ManagedInstanceAdministratorListResult { - return page.mialr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ManagedInstanceAdministratorListResultPage) Values() []ManagedInstanceAdministrator { - if page.mialr.IsEmpty() { - return nil - } - return *page.mialr.Value -} - -// Creates a new instance of the ManagedInstanceAdministratorListResultPage type. -func NewManagedInstanceAdministratorListResultPage(cur ManagedInstanceAdministratorListResult, getNextPage func(context.Context, ManagedInstanceAdministratorListResult) (ManagedInstanceAdministratorListResult, error)) ManagedInstanceAdministratorListResultPage { - return ManagedInstanceAdministratorListResultPage{ - fn: getNextPage, - mialr: cur, - } -} - -// ManagedInstanceAdministratorProperties the properties of a managed instance administrator. -type ManagedInstanceAdministratorProperties struct { - // AdministratorType - Type of the managed instance administrator. - AdministratorType *string `json:"administratorType,omitempty"` - // Login - Login name of the managed instance administrator. - Login *string `json:"login,omitempty"` - // Sid - SID (object ID) of the managed instance administrator. - Sid *uuid.UUID `json:"sid,omitempty"` - // TenantID - Tenant ID of the managed instance administrator. - TenantID *uuid.UUID `json:"tenantId,omitempty"` -} - -// ManagedInstanceAdministratorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type ManagedInstanceAdministratorsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ManagedInstanceAdministratorsClient) (ManagedInstanceAdministrator, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ManagedInstanceAdministratorsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ManagedInstanceAdministratorsCreateOrUpdateFuture.Result. -func (future *ManagedInstanceAdministratorsCreateOrUpdateFuture) result(client ManagedInstanceAdministratorsClient) (mia ManagedInstanceAdministrator, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceAdministratorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - mia.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ManagedInstanceAdministratorsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if mia.Response.Response, err = future.GetResult(sender); err == nil && mia.Response.Response.StatusCode != http.StatusNoContent { - mia, err = client.CreateOrUpdateResponder(mia.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceAdministratorsCreateOrUpdateFuture", "Result", mia.Response.Response, "Failure responding to request") - } - } - return -} - -// ManagedInstanceAdministratorsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ManagedInstanceAdministratorsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ManagedInstanceAdministratorsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ManagedInstanceAdministratorsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ManagedInstanceAdministratorsDeleteFuture.Result. -func (future *ManagedInstanceAdministratorsDeleteFuture) result(client ManagedInstanceAdministratorsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceAdministratorsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ManagedInstanceAdministratorsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ManagedInstanceListResult a list of managed instances. -type ManagedInstanceListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]ManagedInstance `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedInstanceListResult. -func (milr ManagedInstanceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ManagedInstanceListResultIterator provides access to a complete listing of ManagedInstance values. -type ManagedInstanceListResultIterator struct { - i int - page ManagedInstanceListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ManagedInstanceListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ManagedInstanceListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ManagedInstanceListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter ManagedInstanceListResultIterator) Response() ManagedInstanceListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ManagedInstanceListResultIterator) Value() ManagedInstance { - if !iter.page.NotDone() { - return ManagedInstance{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ManagedInstanceListResultIterator type. -func NewManagedInstanceListResultIterator(page ManagedInstanceListResultPage) ManagedInstanceListResultIterator { - return ManagedInstanceListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (milr ManagedInstanceListResult) IsEmpty() bool { - return milr.Value == nil || len(*milr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (milr ManagedInstanceListResult) hasNextLink() bool { - return milr.NextLink != nil && len(*milr.NextLink) != 0 -} - -// managedInstanceListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (milr ManagedInstanceListResult) managedInstanceListResultPreparer(ctx context.Context) (*http.Request, error) { - if !milr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(milr.NextLink))) -} - -// ManagedInstanceListResultPage contains a page of ManagedInstance values. -type ManagedInstanceListResultPage struct { - fn func(context.Context, ManagedInstanceListResult) (ManagedInstanceListResult, error) - milr ManagedInstanceListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ManagedInstanceListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.milr) - if err != nil { - return err - } - page.milr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ManagedInstanceListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ManagedInstanceListResultPage) NotDone() bool { - return !page.milr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ManagedInstanceListResultPage) Response() ManagedInstanceListResult { - return page.milr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ManagedInstanceListResultPage) Values() []ManagedInstance { - if page.milr.IsEmpty() { - return nil - } - return *page.milr.Value -} - -// Creates a new instance of the ManagedInstanceListResultPage type. -func NewManagedInstanceListResultPage(cur ManagedInstanceListResult, getNextPage func(context.Context, ManagedInstanceListResult) (ManagedInstanceListResult, error)) ManagedInstanceListResultPage { - return ManagedInstanceListResultPage{ - fn: getNextPage, - milr: cur, - } -} - -// ManagedInstanceProperties the properties of a managed instance. -type ManagedInstanceProperties struct { - // ManagedInstanceCreateMode - Specifies the mode of database creation. - // - // Default: Regular instance creation. - // - // Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified. Possible values include: 'ManagedServerCreateModeDefault', 'ManagedServerCreateModePointInTimeRestore' - ManagedInstanceCreateMode ManagedServerCreateMode `json:"managedInstanceCreateMode,omitempty"` - // FullyQualifiedDomainName - READ-ONLY; The fully qualified domain name of the managed instance. - FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty"` - // AdministratorLogin - Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation). - AdministratorLogin *string `json:"administratorLogin,omitempty"` - // AdministratorLoginPassword - The administrator login password (required for managed instance creation). - AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` - // SubnetID - Subnet resource ID for the managed instance. - SubnetID *string `json:"subnetId,omitempty"` - // State - READ-ONLY; The state of the managed instance. - State *string `json:"state,omitempty"` - // LicenseType - The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). Possible values include: 'LicenseIncluded', 'BasePrice' - LicenseType ManagedInstanceLicenseType `json:"licenseType,omitempty"` - // VCores - The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. - VCores *int32 `json:"vCores,omitempty"` - // StorageSizeInGB - Storage size in GB. Minimum value: 32. Maximum value: 8192. Increments of 32 GB allowed only. - StorageSizeInGB *int32 `json:"storageSizeInGB,omitempty"` - // Collation - Collation of the managed instance. - Collation *string `json:"collation,omitempty"` - // DNSZone - READ-ONLY; The Dns Zone that the managed instance is in. - DNSZone *string `json:"dnsZone,omitempty"` - // DNSZonePartner - The resource id of another managed instance whose DNS zone this managed instance will share after creation. - DNSZonePartner *string `json:"dnsZonePartner,omitempty"` - // PublicDataEndpointEnabled - Whether or not the public data endpoint is enabled. - PublicDataEndpointEnabled *bool `json:"publicDataEndpointEnabled,omitempty"` - // SourceManagedInstanceID - The resource identifier of the source managed instance associated with create operation of this instance. - SourceManagedInstanceID *string `json:"sourceManagedInstanceId,omitempty"` - // RestorePointInTime - Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. - RestorePointInTime *date.Time `json:"restorePointInTime,omitempty"` - // ProxyOverride - Connection type used for connecting to the instance. Possible values include: 'ManagedInstanceProxyOverrideProxy', 'ManagedInstanceProxyOverrideRedirect', 'ManagedInstanceProxyOverrideDefault' - ProxyOverride ManagedInstanceProxyOverride `json:"proxyOverride,omitempty"` - // TimezoneID - Id of the timezone. Allowed values are timezones supported by Windows. - // Windows keeps details on supported timezones, including the id, in registry under - // KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. - // You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info. - // List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. - // An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time". - TimezoneID *string `json:"timezoneId,omitempty"` - // InstancePoolID - The Id of the instance pool this managed server belongs to. - InstancePoolID *string `json:"instancePoolId,omitempty"` - // MaintenanceConfigurationID - Specifies maintenance configuration id to apply to this managed instance. - MaintenanceConfigurationID *string `json:"maintenanceConfigurationId,omitempty"` - // MinimalTLSVersion - Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2' - MinimalTLSVersion *string `json:"minimalTlsVersion,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedInstanceProperties. -func (mip ManagedInstanceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mip.ManagedInstanceCreateMode != "" { - objectMap["managedInstanceCreateMode"] = mip.ManagedInstanceCreateMode - } - if mip.AdministratorLogin != nil { - objectMap["administratorLogin"] = mip.AdministratorLogin - } - if mip.AdministratorLoginPassword != nil { - objectMap["administratorLoginPassword"] = mip.AdministratorLoginPassword - } - if mip.SubnetID != nil { - objectMap["subnetId"] = mip.SubnetID - } - if mip.LicenseType != "" { - objectMap["licenseType"] = mip.LicenseType - } - if mip.VCores != nil { - objectMap["vCores"] = mip.VCores - } - if mip.StorageSizeInGB != nil { - objectMap["storageSizeInGB"] = mip.StorageSizeInGB - } - if mip.Collation != nil { - objectMap["collation"] = mip.Collation - } - if mip.DNSZonePartner != nil { - objectMap["dnsZonePartner"] = mip.DNSZonePartner - } - if mip.PublicDataEndpointEnabled != nil { - objectMap["publicDataEndpointEnabled"] = mip.PublicDataEndpointEnabled - } - if mip.SourceManagedInstanceID != nil { - objectMap["sourceManagedInstanceId"] = mip.SourceManagedInstanceID - } - if mip.RestorePointInTime != nil { - objectMap["restorePointInTime"] = mip.RestorePointInTime - } - if mip.ProxyOverride != "" { - objectMap["proxyOverride"] = mip.ProxyOverride - } - if mip.TimezoneID != nil { - objectMap["timezoneId"] = mip.TimezoneID - } - if mip.InstancePoolID != nil { - objectMap["instancePoolId"] = mip.InstancePoolID - } - if mip.MaintenanceConfigurationID != nil { - objectMap["maintenanceConfigurationId"] = mip.MaintenanceConfigurationID - } - if mip.MinimalTLSVersion != nil { - objectMap["minimalTlsVersion"] = mip.MinimalTLSVersion - } - return json.Marshal(objectMap) -} - -// ManagedInstancesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ManagedInstancesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ManagedInstancesClient) (ManagedInstance, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ManagedInstancesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ManagedInstancesCreateOrUpdateFuture.Result. -func (future *ManagedInstancesCreateOrUpdateFuture) result(client ManagedInstancesClient) (mi ManagedInstance, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - mi.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ManagedInstancesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent { - mi, err = client.CreateOrUpdateResponder(mi.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesCreateOrUpdateFuture", "Result", mi.Response.Response, "Failure responding to request") - } - } - return -} - -// ManagedInstancesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ManagedInstancesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ManagedInstancesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ManagedInstancesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ManagedInstancesDeleteFuture.Result. -func (future *ManagedInstancesDeleteFuture) result(client ManagedInstancesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ManagedInstancesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ManagedInstancesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ManagedInstancesUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ManagedInstancesClient) (ManagedInstance, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ManagedInstancesUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ManagedInstancesUpdateFuture.Result. -func (future *ManagedInstancesUpdateFuture) result(client ManagedInstancesClient) (mi ManagedInstance, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - mi.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ManagedInstancesUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent { - mi, err = client.UpdateResponder(mi.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesUpdateFuture", "Result", mi.Response.Response, "Failure responding to request") - } - } - return -} - -// ManagedInstanceUpdate an update request for an Azure SQL Database managed instance. -type ManagedInstanceUpdate struct { - // Sku - Managed instance sku - Sku *Sku `json:"sku,omitempty"` - // ManagedInstanceProperties - Resource properties. - *ManagedInstanceProperties `json:"properties,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for ManagedInstanceUpdate. -func (miu ManagedInstanceUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if miu.Sku != nil { - objectMap["sku"] = miu.Sku - } - if miu.ManagedInstanceProperties != nil { - objectMap["properties"] = miu.ManagedInstanceProperties - } - if miu.Tags != nil { - objectMap["tags"] = miu.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ManagedInstanceUpdate struct. -func (miu *ManagedInstanceUpdate) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "sku": - if v != nil { - var sku Sku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - miu.Sku = &sku - } - case "properties": - if v != nil { - var managedInstanceProperties ManagedInstanceProperties - err = json.Unmarshal(*v, &managedInstanceProperties) - if err != nil { - return err - } - miu.ManagedInstanceProperties = &managedInstanceProperties - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - miu.Tags = tags - } - } - } - - return nil -} - -// MaxSizeCapability the maximum size limits for a database. -type MaxSizeCapability struct { - // Limit - READ-ONLY; The maximum size of the database (see 'unit' for the units). - Limit *int64 `json:"limit,omitempty"` - // Unit - READ-ONLY; The units that the limit is expressed in. Possible values include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' - Unit MaxSizeUnits `json:"unit,omitempty"` - // Status - READ-ONLY; The status of the maximum size capability. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled' - Status CapabilityStatus `json:"status,omitempty"` -} - -// MarshalJSON is the custom marshaler for MaxSizeCapability. -func (msc MaxSizeCapability) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// Metric database metrics. -type Metric struct { - // StartTime - READ-ONLY; The start time for the metric (ISO-8601 format). - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - READ-ONLY; The end time for the metric (ISO-8601 format). - EndTime *date.Time `json:"endTime,omitempty"` - // TimeGrain - READ-ONLY; The time step to be used to summarize the metric values. - TimeGrain *string `json:"timeGrain,omitempty"` - // Unit - READ-ONLY; The unit of the metric. Possible values include: 'UnitTypeCount', 'UnitTypeBytes', 'UnitTypeSeconds', 'UnitTypePercent', 'UnitTypeCountPerSecond', 'UnitTypeBytesPerSecond' - Unit UnitType `json:"unit,omitempty"` - // Name - READ-ONLY; The name information for the metric. - Name *MetricName `json:"name,omitempty"` - // MetricValues - READ-ONLY; The metric values for the specified time window and timestep. - MetricValues *[]MetricValue `json:"metricValues,omitempty"` -} - -// MarshalJSON is the custom marshaler for Metric. -func (mVar Metric) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// MetricAvailability a metric availability value. -type MetricAvailability struct { - // Retention - READ-ONLY; The length of retention for the database metric. - Retention *string `json:"retention,omitempty"` - // TimeGrain - READ-ONLY; The granularity of the database metric. - TimeGrain *string `json:"timeGrain,omitempty"` -} - -// MarshalJSON is the custom marshaler for MetricAvailability. -func (ma MetricAvailability) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// MetricDefinition a database metric definition. -type MetricDefinition struct { - // Name - READ-ONLY; The name information for the metric. - Name *MetricName `json:"name,omitempty"` - // PrimaryAggregationType - READ-ONLY; The primary aggregation type defining how metric values are displayed. Possible values include: 'None', 'Average', 'Count', 'Minimum', 'Maximum', 'Total' - PrimaryAggregationType PrimaryAggregationType `json:"primaryAggregationType,omitempty"` - // ResourceURI - READ-ONLY; The resource uri of the database. - ResourceURI *string `json:"resourceUri,omitempty"` - // Unit - READ-ONLY; The unit of the metric. Possible values include: 'UnitDefinitionTypeCount', 'UnitDefinitionTypeBytes', 'UnitDefinitionTypeSeconds', 'UnitDefinitionTypePercent', 'UnitDefinitionTypeCountPerSecond', 'UnitDefinitionTypeBytesPerSecond' - Unit UnitDefinitionType `json:"unit,omitempty"` - // MetricAvailabilities - READ-ONLY; The list of database metric availabilities for the metric. - MetricAvailabilities *[]MetricAvailability `json:"metricAvailabilities,omitempty"` -} - -// MarshalJSON is the custom marshaler for MetricDefinition. -func (md MetricDefinition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// MetricDefinitionListResult the response to a list database metric definitions request. -type MetricDefinitionListResult struct { - autorest.Response `json:"-"` - // Value - The list of metric definitions for the database. - Value *[]MetricDefinition `json:"value,omitempty"` -} - -// MetricListResult the response to a list database metrics request. -type MetricListResult struct { - autorest.Response `json:"-"` - // Value - The list of metrics for the database. - Value *[]Metric `json:"value,omitempty"` -} - -// MetricName a database metric name. -type MetricName struct { - // Value - READ-ONLY; The name of the database metric. - Value *string `json:"value,omitempty"` - // LocalizedValue - READ-ONLY; The friendly name of the database metric. - LocalizedValue *string `json:"localizedValue,omitempty"` -} - -// MarshalJSON is the custom marshaler for MetricName. -func (mn MetricName) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// MetricValue represents database metrics. -type MetricValue struct { - // Count - READ-ONLY; The number of values for the metric. - Count *float64 `json:"count,omitempty"` - // Average - READ-ONLY; The average value of the metric. - Average *float64 `json:"average,omitempty"` - // Maximum - READ-ONLY; The max value of the metric. - Maximum *float64 `json:"maximum,omitempty"` - // Minimum - READ-ONLY; The min value of the metric. - Minimum *float64 `json:"minimum,omitempty"` - // Timestamp - READ-ONLY; The metric timestamp (ISO-8601 format). - Timestamp *date.Time `json:"timestamp,omitempty"` - // Total - READ-ONLY; The total value of the metric. - Total *float64 `json:"total,omitempty"` -} - -// MarshalJSON is the custom marshaler for MetricValue. -func (mv MetricValue) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// Operation SQL REST API operation definition. -type Operation struct { - // Name - READ-ONLY; The name of the operation being performed on this particular object. - Name *string `json:"name,omitempty"` - // Display - READ-ONLY; The localized display information for this particular operation / action. - Display *OperationDisplay `json:"display,omitempty"` - // Origin - READ-ONLY; The intended executor of the operation. Possible values include: 'OperationOriginUser', 'OperationOriginSystem' - Origin OperationOrigin `json:"origin,omitempty"` - // Properties - READ-ONLY; Additional descriptions for the operation. - Properties map[string]interface{} `json:"properties"` -} - -// MarshalJSON is the custom marshaler for Operation. -func (o Operation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// OperationDisplay display metadata associated with the operation. -type OperationDisplay struct { - // Provider - READ-ONLY; The localized friendly form of the resource provider name. - Provider *string `json:"provider,omitempty"` - // Resource - READ-ONLY; The localized friendly form of the resource type related to this action/operation. - Resource *string `json:"resource,omitempty"` - // Operation - READ-ONLY; The localized friendly name for the operation. - Operation *string `json:"operation,omitempty"` - // Description - READ-ONLY; The localized friendly description for the operation. - Description *string `json:"description,omitempty"` -} - -// MarshalJSON is the custom marshaler for OperationDisplay. -func (od OperationDisplay) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// OperationImpact the impact of an operation, both in absolute and relative terms. -type OperationImpact struct { - // Name - READ-ONLY; The name of the impact dimension. - Name *string `json:"name,omitempty"` - // Unit - READ-ONLY; The unit in which estimated impact to dimension is measured. - Unit *string `json:"unit,omitempty"` - // ChangeValueAbsolute - READ-ONLY; The absolute impact to dimension. - ChangeValueAbsolute *float64 `json:"changeValueAbsolute,omitempty"` - // ChangeValueRelative - READ-ONLY; The relative impact to dimension (null if not applicable) - ChangeValueRelative *float64 `json:"changeValueRelative,omitempty"` -} - -// MarshalJSON is the custom marshaler for OperationImpact. -func (oi OperationImpact) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// OperationListResult result of the request to list SQL operations. -type OperationListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]Operation `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for OperationListResult. -func (olr OperationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// OperationListResultIterator provides access to a complete listing of Operation values. -type OperationListResultIterator struct { - i int - page OperationListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *OperationListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter OperationListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter OperationListResultIterator) Response() OperationListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter OperationListResultIterator) Value() Operation { - if !iter.page.NotDone() { - return Operation{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the OperationListResultIterator type. -func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator { - return OperationListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (olr OperationListResult) IsEmpty() bool { - return olr.Value == nil || len(*olr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (olr OperationListResult) hasNextLink() bool { - return olr.NextLink != nil && len(*olr.NextLink) != 0 -} - -// operationListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) { - if !olr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(olr.NextLink))) -} - -// OperationListResultPage contains a page of Operation values. -type OperationListResultPage struct { - fn func(context.Context, OperationListResult) (OperationListResult, error) - olr OperationListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.olr) - if err != nil { - return err - } - page.olr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *OperationListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page OperationListResultPage) NotDone() bool { - return !page.olr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page OperationListResultPage) Response() OperationListResult { - return page.olr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page OperationListResultPage) Values() []Operation { - if page.olr.IsEmpty() { - return nil - } - return *page.olr.Value -} - -// Creates a new instance of the OperationListResultPage type. -func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { - return OperationListResultPage{ - fn: getNextPage, - olr: cur, - } -} - -// PartnerInfo partner server information for the failover group. -type PartnerInfo struct { - // ID - Resource identifier of the partner server. - ID *string `json:"id,omitempty"` - // Location - READ-ONLY; Geo location of the partner server. - Location *string `json:"location,omitempty"` - // ReplicationRole - READ-ONLY; Replication role of the partner server. Possible values include: 'Primary', 'Secondary' - ReplicationRole FailoverGroupReplicationRole `json:"replicationRole,omitempty"` -} - -// MarshalJSON is the custom marshaler for PartnerInfo. -func (pi PartnerInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pi.ID != nil { - objectMap["id"] = pi.ID - } - return json.Marshal(objectMap) -} - -// PerformanceLevel a possible performance level of a service objective capability. -type PerformanceLevel struct { - // Unit - READ-ONLY; Unit type used to measure service objective performance level. Possible values include: 'DTU' - Unit PerformanceLevelUnit `json:"unit,omitempty"` - // Value - READ-ONLY; Performance level value. - Value *int32 `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for PerformanceLevel. -func (pl PerformanceLevel) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ProxyResource ARM proxy resource. -type ProxyResource struct { - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ProxyResource. -func (pr ProxyResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// RecommendedIndex represents a database recommended index. -type RecommendedIndex struct { - // RecommendedIndexProperties - READ-ONLY; The properties representing the resource. - *RecommendedIndexProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for RecommendedIndex. -func (ri RecommendedIndex) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for RecommendedIndex struct. -func (ri *RecommendedIndex) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var recommendedIndexProperties RecommendedIndexProperties - err = json.Unmarshal(*v, &recommendedIndexProperties) - if err != nil { - return err - } - ri.RecommendedIndexProperties = &recommendedIndexProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ri.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ri.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ri.Type = &typeVar - } - } - } - - return nil -} - -// RecommendedIndexProperties represents the properties of a database recommended index. -type RecommendedIndexProperties struct { - // Action - READ-ONLY; The proposed index action. You can create a missing index, drop an unused index, or rebuild an existing index to improve its performance. Possible values include: 'Create', 'Drop', 'Rebuild' - Action RecommendedIndexAction `json:"action,omitempty"` - // State - READ-ONLY; The current recommendation state. Possible values include: 'Active', 'Pending', 'Executing', 'Verifying', 'PendingRevert', 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' - State RecommendedIndexState `json:"state,omitempty"` - // Created - READ-ONLY; The UTC datetime showing when this resource was created (ISO8601 format). - Created *date.Time `json:"created,omitempty"` - // LastModified - READ-ONLY; The UTC datetime of when was this resource last changed (ISO8601 format). - LastModified *date.Time `json:"lastModified,omitempty"` - // IndexType - READ-ONLY; The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTEREDCOLUMNSTORE' - IndexType RecommendedIndexType `json:"indexType,omitempty"` - // Schema - READ-ONLY; The schema where table to build index over resides - Schema *string `json:"schema,omitempty"` - // Table - READ-ONLY; The table on which to build index. - Table *string `json:"table,omitempty"` - // Columns - READ-ONLY; Columns over which to build index - Columns *[]string `json:"columns,omitempty"` - // IncludedColumns - READ-ONLY; The list of column names to be included in the index - IncludedColumns *[]string `json:"includedColumns,omitempty"` - // IndexScript - READ-ONLY; The full build index script - IndexScript *string `json:"indexScript,omitempty"` - // EstimatedImpact - READ-ONLY; The estimated impact of doing recommended index action. - EstimatedImpact *[]OperationImpact `json:"estimatedImpact,omitempty"` - // ReportedImpact - READ-ONLY; The values reported after index action is complete. - ReportedImpact *[]OperationImpact `json:"reportedImpact,omitempty"` -} - -// MarshalJSON is the custom marshaler for RecommendedIndexProperties. -func (rip RecommendedIndexProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// RecoverableDatabase a recoverable database -type RecoverableDatabase struct { - autorest.Response `json:"-"` - // RecoverableDatabaseProperties - The properties of a recoverable database - *RecoverableDatabaseProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for RecoverableDatabase. -func (rd RecoverableDatabase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rd.RecoverableDatabaseProperties != nil { - objectMap["properties"] = rd.RecoverableDatabaseProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for RecoverableDatabase struct. -func (rd *RecoverableDatabase) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var recoverableDatabaseProperties RecoverableDatabaseProperties - err = json.Unmarshal(*v, &recoverableDatabaseProperties) - if err != nil { - return err - } - rd.RecoverableDatabaseProperties = &recoverableDatabaseProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - rd.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - rd.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - rd.Type = &typeVar - } - } - } - - return nil -} - -// RecoverableDatabaseListResult the response to a list recoverable databases request -type RecoverableDatabaseListResult struct { - autorest.Response `json:"-"` - // Value - A list of recoverable databases - Value *[]RecoverableDatabase `json:"value,omitempty"` -} - -// RecoverableDatabaseProperties the properties of a recoverable database -type RecoverableDatabaseProperties struct { - // Edition - READ-ONLY; The edition of the database - Edition *string `json:"edition,omitempty"` - // ServiceLevelObjective - READ-ONLY; The service level objective name of the database - ServiceLevelObjective *string `json:"serviceLevelObjective,omitempty"` - // ElasticPoolName - READ-ONLY; The elastic pool name of the database - ElasticPoolName *string `json:"elasticPoolName,omitempty"` - // LastAvailableBackupDate - READ-ONLY; The last available backup date of the database (ISO8601 format) - LastAvailableBackupDate *date.Time `json:"lastAvailableBackupDate,omitempty"` -} - -// MarshalJSON is the custom marshaler for RecoverableDatabaseProperties. -func (rdp RecoverableDatabaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ReplicationLink represents a database replication link. -type ReplicationLink struct { - autorest.Response `json:"-"` - // Location - READ-ONLY; Location of the server that contains this firewall rule. - Location *string `json:"location,omitempty"` - // ReplicationLinkProperties - The properties representing the resource. - *ReplicationLinkProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ReplicationLink. -func (rl ReplicationLink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rl.ReplicationLinkProperties != nil { - objectMap["properties"] = rl.ReplicationLinkProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ReplicationLink struct. -func (rl *ReplicationLink) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - rl.Location = &location - } - case "properties": - if v != nil { - var replicationLinkProperties ReplicationLinkProperties - err = json.Unmarshal(*v, &replicationLinkProperties) - if err != nil { - return err - } - rl.ReplicationLinkProperties = &replicationLinkProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - rl.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - rl.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - rl.Type = &typeVar - } - } - } - - return nil -} - -// ReplicationLinkListResult represents the response to a List database replication link request. -type ReplicationLinkListResult struct { - autorest.Response `json:"-"` - // Value - The list of database replication links housed in the database. - Value *[]ReplicationLink `json:"value,omitempty"` -} - -// ReplicationLinkProperties represents the properties of a database replication link. -type ReplicationLinkProperties struct { - // IsTerminationAllowed - READ-ONLY; Legacy value indicating whether termination is allowed. Currently always returns true. - IsTerminationAllowed *bool `json:"isTerminationAllowed,omitempty"` - // ReplicationMode - READ-ONLY; Replication mode of this replication link. - ReplicationMode *string `json:"replicationMode,omitempty"` - // PartnerServer - READ-ONLY; The name of the server hosting the partner database. - PartnerServer *string `json:"partnerServer,omitempty"` - // PartnerDatabase - READ-ONLY; The name of the partner database. - PartnerDatabase *string `json:"partnerDatabase,omitempty"` - // PartnerLocation - READ-ONLY; The Azure Region of the partner database. - PartnerLocation *string `json:"partnerLocation,omitempty"` - // Role - READ-ONLY; The role of the database in the replication link. Possible values include: 'ReplicationRolePrimary', 'ReplicationRoleSecondary', 'ReplicationRoleNonReadableSecondary', 'ReplicationRoleSource', 'ReplicationRoleCopy' - Role ReplicationRole `json:"role,omitempty"` - // PartnerRole - READ-ONLY; The role of the partner database in the replication link. Possible values include: 'ReplicationRolePrimary', 'ReplicationRoleSecondary', 'ReplicationRoleNonReadableSecondary', 'ReplicationRoleSource', 'ReplicationRoleCopy' - PartnerRole ReplicationRole `json:"partnerRole,omitempty"` - // StartTime - READ-ONLY; The start time for the replication link. - StartTime *date.Time `json:"startTime,omitempty"` - // PercentComplete - READ-ONLY; The percentage of seeding complete for the replication link. - PercentComplete *int32 `json:"percentComplete,omitempty"` - // ReplicationState - READ-ONLY; The replication state for the replication link. Possible values include: 'PENDING', 'SEEDING', 'CATCHUP', 'SUSPENDED' - ReplicationState ReplicationState `json:"replicationState,omitempty"` -} - -// MarshalJSON is the custom marshaler for ReplicationLinkProperties. -func (rlp ReplicationLinkProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ReplicationLinksFailoverAllowDataLossFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. -type ReplicationLinksFailoverAllowDataLossFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ReplicationLinksClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ReplicationLinksFailoverAllowDataLossFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ReplicationLinksFailoverAllowDataLossFuture.Result. -func (future *ReplicationLinksFailoverAllowDataLossFuture) result(client ReplicationLinksClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ReplicationLinksFailoverAllowDataLossFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ReplicationLinksFailoverAllowDataLossFuture") - return - } - ar.Response = future.Response() - return -} - -// ReplicationLinksFailoverFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ReplicationLinksFailoverFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ReplicationLinksClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ReplicationLinksFailoverFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ReplicationLinksFailoverFuture.Result. -func (future *ReplicationLinksFailoverFuture) result(client ReplicationLinksClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ReplicationLinksFailoverFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ReplicationLinksFailoverFuture") - return - } - ar.Response = future.Response() - return -} - -// ReplicationLinksUnlinkFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ReplicationLinksUnlinkFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ReplicationLinksClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ReplicationLinksUnlinkFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ReplicationLinksUnlinkFuture.Result. -func (future *ReplicationLinksUnlinkFuture) result(client ReplicationLinksClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ReplicationLinksUnlinkFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ReplicationLinksUnlinkFuture") - return - } - ar.Response = future.Response() - return -} - -// Resource ARM resource. -type Resource struct { - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ResourceIdentity azure Active Directory identity configuration for a resource. -type ResourceIdentity struct { - // PrincipalID - READ-ONLY; The Azure Active Directory principal id. - PrincipalID *uuid.UUID `json:"principalId,omitempty"` - // Type - The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource. Possible values include: 'SystemAssigned' - Type IdentityType `json:"type,omitempty"` - // TenantID - READ-ONLY; The Azure Active Directory tenant id. - TenantID *uuid.UUID `json:"tenantId,omitempty"` -} - -// MarshalJSON is the custom marshaler for ResourceIdentity. -func (ri ResourceIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ri.Type != "" { - objectMap["type"] = ri.Type - } - return json.Marshal(objectMap) -} - -// ResourceMoveDefinition contains the information necessary to perform a resource move (rename). -type ResourceMoveDefinition struct { - // ID - The target ID for the resource - ID *string `json:"id,omitempty"` -} - -// RestorableDroppedDatabase a restorable dropped database -type RestorableDroppedDatabase struct { - autorest.Response `json:"-"` - // Location - READ-ONLY; The geo-location where the resource lives - Location *string `json:"location,omitempty"` - // RestorableDroppedDatabaseProperties - The properties of a restorable dropped database - *RestorableDroppedDatabaseProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for RestorableDroppedDatabase. -func (rdd RestorableDroppedDatabase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rdd.RestorableDroppedDatabaseProperties != nil { - objectMap["properties"] = rdd.RestorableDroppedDatabaseProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for RestorableDroppedDatabase struct. -func (rdd *RestorableDroppedDatabase) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - rdd.Location = &location - } - case "properties": - if v != nil { - var restorableDroppedDatabaseProperties RestorableDroppedDatabaseProperties - err = json.Unmarshal(*v, &restorableDroppedDatabaseProperties) - if err != nil { - return err - } - rdd.RestorableDroppedDatabaseProperties = &restorableDroppedDatabaseProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - rdd.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - rdd.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - rdd.Type = &typeVar - } - } - } - - return nil -} - -// RestorableDroppedDatabaseListResult the response to a list restorable dropped databases request -type RestorableDroppedDatabaseListResult struct { - autorest.Response `json:"-"` - // Value - A list of restorable dropped databases - Value *[]RestorableDroppedDatabase `json:"value,omitempty"` -} - -// RestorableDroppedDatabaseProperties the properties of a restorable dropped database -type RestorableDroppedDatabaseProperties struct { - // DatabaseName - READ-ONLY; The name of the database - DatabaseName *string `json:"databaseName,omitempty"` - // Edition - READ-ONLY; The edition of the database - Edition *string `json:"edition,omitempty"` - // MaxSizeBytes - READ-ONLY; The max size in bytes of the database - MaxSizeBytes *string `json:"maxSizeBytes,omitempty"` - // ServiceLevelObjective - READ-ONLY; The service level objective name of the database - ServiceLevelObjective *string `json:"serviceLevelObjective,omitempty"` - // ElasticPoolName - READ-ONLY; The elastic pool name of the database - ElasticPoolName *string `json:"elasticPoolName,omitempty"` - // CreationDate - READ-ONLY; The creation date of the database (ISO8601 format) - CreationDate *date.Time `json:"creationDate,omitempty"` - // DeletionDate - READ-ONLY; The deletion date of the database (ISO8601 format) - DeletionDate *date.Time `json:"deletionDate,omitempty"` - // EarliestRestoreDate - READ-ONLY; The earliest restore date of the database (ISO8601 format) - EarliestRestoreDate *date.Time `json:"earliestRestoreDate,omitempty"` -} - -// MarshalJSON is the custom marshaler for RestorableDroppedDatabaseProperties. -func (rddp RestorableDroppedDatabaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// RestorableDroppedManagedDatabase a restorable dropped managed database resource. -type RestorableDroppedManagedDatabase struct { - autorest.Response `json:"-"` - // RestorableDroppedManagedDatabaseProperties - Resource properties. - *RestorableDroppedManagedDatabaseProperties `json:"properties,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for RestorableDroppedManagedDatabase. -func (rdmd RestorableDroppedManagedDatabase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rdmd.RestorableDroppedManagedDatabaseProperties != nil { - objectMap["properties"] = rdmd.RestorableDroppedManagedDatabaseProperties - } - if rdmd.Location != nil { - objectMap["location"] = rdmd.Location - } - if rdmd.Tags != nil { - objectMap["tags"] = rdmd.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for RestorableDroppedManagedDatabase struct. -func (rdmd *RestorableDroppedManagedDatabase) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var restorableDroppedManagedDatabaseProperties RestorableDroppedManagedDatabaseProperties - err = json.Unmarshal(*v, &restorableDroppedManagedDatabaseProperties) - if err != nil { - return err - } - rdmd.RestorableDroppedManagedDatabaseProperties = &restorableDroppedManagedDatabaseProperties - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - rdmd.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - rdmd.Tags = tags - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - rdmd.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - rdmd.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - rdmd.Type = &typeVar - } - } - } - - return nil -} - -// RestorableDroppedManagedDatabaseListResult a list of restorable dropped managed databases. -type RestorableDroppedManagedDatabaseListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]RestorableDroppedManagedDatabase `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for RestorableDroppedManagedDatabaseListResult. -func (rdmdlr RestorableDroppedManagedDatabaseListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// RestorableDroppedManagedDatabaseListResultIterator provides access to a complete listing of -// RestorableDroppedManagedDatabase values. -type RestorableDroppedManagedDatabaseListResultIterator struct { - i int - page RestorableDroppedManagedDatabaseListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *RestorableDroppedManagedDatabaseListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RestorableDroppedManagedDatabaseListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *RestorableDroppedManagedDatabaseListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter RestorableDroppedManagedDatabaseListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter RestorableDroppedManagedDatabaseListResultIterator) Response() RestorableDroppedManagedDatabaseListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter RestorableDroppedManagedDatabaseListResultIterator) Value() RestorableDroppedManagedDatabase { - if !iter.page.NotDone() { - return RestorableDroppedManagedDatabase{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the RestorableDroppedManagedDatabaseListResultIterator type. -func NewRestorableDroppedManagedDatabaseListResultIterator(page RestorableDroppedManagedDatabaseListResultPage) RestorableDroppedManagedDatabaseListResultIterator { - return RestorableDroppedManagedDatabaseListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (rdmdlr RestorableDroppedManagedDatabaseListResult) IsEmpty() bool { - return rdmdlr.Value == nil || len(*rdmdlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (rdmdlr RestorableDroppedManagedDatabaseListResult) hasNextLink() bool { - return rdmdlr.NextLink != nil && len(*rdmdlr.NextLink) != 0 -} - -// restorableDroppedManagedDatabaseListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (rdmdlr RestorableDroppedManagedDatabaseListResult) restorableDroppedManagedDatabaseListResultPreparer(ctx context.Context) (*http.Request, error) { - if !rdmdlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(rdmdlr.NextLink))) -} - -// RestorableDroppedManagedDatabaseListResultPage contains a page of RestorableDroppedManagedDatabase -// values. -type RestorableDroppedManagedDatabaseListResultPage struct { - fn func(context.Context, RestorableDroppedManagedDatabaseListResult) (RestorableDroppedManagedDatabaseListResult, error) - rdmdlr RestorableDroppedManagedDatabaseListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *RestorableDroppedManagedDatabaseListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RestorableDroppedManagedDatabaseListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.rdmdlr) - if err != nil { - return err - } - page.rdmdlr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *RestorableDroppedManagedDatabaseListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page RestorableDroppedManagedDatabaseListResultPage) NotDone() bool { - return !page.rdmdlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page RestorableDroppedManagedDatabaseListResultPage) Response() RestorableDroppedManagedDatabaseListResult { - return page.rdmdlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page RestorableDroppedManagedDatabaseListResultPage) Values() []RestorableDroppedManagedDatabase { - if page.rdmdlr.IsEmpty() { - return nil - } - return *page.rdmdlr.Value -} - -// Creates a new instance of the RestorableDroppedManagedDatabaseListResultPage type. -func NewRestorableDroppedManagedDatabaseListResultPage(cur RestorableDroppedManagedDatabaseListResult, getNextPage func(context.Context, RestorableDroppedManagedDatabaseListResult) (RestorableDroppedManagedDatabaseListResult, error)) RestorableDroppedManagedDatabaseListResultPage { - return RestorableDroppedManagedDatabaseListResultPage{ - fn: getNextPage, - rdmdlr: cur, - } -} - -// RestorableDroppedManagedDatabaseProperties the restorable dropped managed database's properties. -type RestorableDroppedManagedDatabaseProperties struct { - // DatabaseName - READ-ONLY; The name of the database. - DatabaseName *string `json:"databaseName,omitempty"` - // CreationDate - READ-ONLY; The creation date of the database (ISO8601 format). - CreationDate *date.Time `json:"creationDate,omitempty"` - // DeletionDate - READ-ONLY; The deletion date of the database (ISO8601 format). - DeletionDate *date.Time `json:"deletionDate,omitempty"` - // EarliestRestoreDate - READ-ONLY; The earliest restore date of the database (ISO8601 format). - EarliestRestoreDate *date.Time `json:"earliestRestoreDate,omitempty"` -} - -// MarshalJSON is the custom marshaler for RestorableDroppedManagedDatabaseProperties. -func (rdmdp RestorableDroppedManagedDatabaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// RestorePoint database restore points. -type RestorePoint struct { - autorest.Response `json:"-"` - // Location - READ-ONLY; Resource location. - Location *string `json:"location,omitempty"` - // RestorePointProperties - Resource properties. - *RestorePointProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for RestorePoint. -func (rp RestorePoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rp.RestorePointProperties != nil { - objectMap["properties"] = rp.RestorePointProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for RestorePoint struct. -func (rp *RestorePoint) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - rp.Location = &location - } - case "properties": - if v != nil { - var restorePointProperties RestorePointProperties - err = json.Unmarshal(*v, &restorePointProperties) - if err != nil { - return err - } - rp.RestorePointProperties = &restorePointProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - rp.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - rp.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - rp.Type = &typeVar - } - } - } - - return nil -} - -// RestorePointListResult a list of long term retention backups. -type RestorePointListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]RestorePoint `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for RestorePointListResult. -func (rplr RestorePointListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// RestorePointProperties properties of a database restore point -type RestorePointProperties struct { - // RestorePointType - READ-ONLY; The type of restore point. Possible values include: 'CONTINUOUS', 'DISCRETE' - RestorePointType RestorePointType `json:"restorePointType,omitempty"` - // EarliestRestoreDate - READ-ONLY; The earliest time to which this database can be restored - EarliestRestoreDate *date.Time `json:"earliestRestoreDate,omitempty"` - // RestorePointCreationDate - READ-ONLY; The time the backup was taken - RestorePointCreationDate *date.Time `json:"restorePointCreationDate,omitempty"` - // RestorePointLabel - READ-ONLY; The label of restore point for backup request by user - RestorePointLabel *string `json:"restorePointLabel,omitempty"` -} - -// MarshalJSON is the custom marshaler for RestorePointProperties. -func (rpp RestorePointProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// RestorePointsCreateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type RestorePointsCreateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(RestorePointsClient) (RestorePoint, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *RestorePointsCreateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for RestorePointsCreateFuture.Result. -func (future *RestorePointsCreateFuture) result(client RestorePointsClient) (rp RestorePoint, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RestorePointsCreateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - rp.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.RestorePointsCreateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { - rp, err = client.CreateResponder(rp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RestorePointsCreateFuture", "Result", rp.Response.Response, "Failure responding to request") - } - } - return -} - -// SecurityAlertPolicyProperties properties of a security alert policy. -type SecurityAlertPolicyProperties struct { - // State - Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database. Possible values include: 'SecurityAlertPolicyStateNew', 'SecurityAlertPolicyStateEnabled', 'SecurityAlertPolicyStateDisabled' - State SecurityAlertPolicyState `json:"state,omitempty"` - // DisabledAlerts - Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action - DisabledAlerts *[]string `json:"disabledAlerts,omitempty"` - // EmailAddresses - Specifies an array of e-mail addresses to which the alert is sent. - EmailAddresses *[]string `json:"emailAddresses,omitempty"` - // EmailAccountAdmins - Specifies that the alert is sent to the account administrators. - EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty"` - // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - StorageEndpoint *string `json:"storageEndpoint,omitempty"` - // StorageAccountAccessKey - Specifies the identifier key of the Threat Detection audit storage account. - StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` - // RetentionDays - Specifies the number of days to keep in the Threat Detection audit logs. - RetentionDays *int32 `json:"retentionDays,omitempty"` - // CreationTime - READ-ONLY; Specifies the UTC creation time of the policy. - CreationTime *date.Time `json:"creationTime,omitempty"` -} - -// MarshalJSON is the custom marshaler for SecurityAlertPolicyProperties. -func (sapp SecurityAlertPolicyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sapp.State != "" { - objectMap["state"] = sapp.State - } - if sapp.DisabledAlerts != nil { - objectMap["disabledAlerts"] = sapp.DisabledAlerts - } - if sapp.EmailAddresses != nil { - objectMap["emailAddresses"] = sapp.EmailAddresses - } - if sapp.EmailAccountAdmins != nil { - objectMap["emailAccountAdmins"] = sapp.EmailAccountAdmins - } - if sapp.StorageEndpoint != nil { - objectMap["storageEndpoint"] = sapp.StorageEndpoint - } - if sapp.StorageAccountAccessKey != nil { - objectMap["storageAccountAccessKey"] = sapp.StorageAccountAccessKey - } - if sapp.RetentionDays != nil { - objectMap["retentionDays"] = sapp.RetentionDays - } - return json.Marshal(objectMap) -} - -// SensitivityLabel a sensitivity label. -type SensitivityLabel struct { - autorest.Response `json:"-"` - // SensitivityLabelProperties - Resource properties. - *SensitivityLabelProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for SensitivityLabel. -func (sl SensitivityLabel) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sl.SensitivityLabelProperties != nil { - objectMap["properties"] = sl.SensitivityLabelProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for SensitivityLabel struct. -func (sl *SensitivityLabel) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var sensitivityLabelProperties SensitivityLabelProperties - err = json.Unmarshal(*v, &sensitivityLabelProperties) - if err != nil { - return err - } - sl.SensitivityLabelProperties = &sensitivityLabelProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - sl.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - sl.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - sl.Type = &typeVar - } - } - } - - return nil -} - -// SensitivityLabelListResult a list of sensitivity labels. -type SensitivityLabelListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]SensitivityLabel `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for SensitivityLabelListResult. -func (sllr SensitivityLabelListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SensitivityLabelListResultIterator provides access to a complete listing of SensitivityLabel values. -type SensitivityLabelListResultIterator struct { - i int - page SensitivityLabelListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *SensitivityLabelListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SensitivityLabelListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *SensitivityLabelListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter SensitivityLabelListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter SensitivityLabelListResultIterator) Response() SensitivityLabelListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter SensitivityLabelListResultIterator) Value() SensitivityLabel { - if !iter.page.NotDone() { - return SensitivityLabel{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the SensitivityLabelListResultIterator type. -func NewSensitivityLabelListResultIterator(page SensitivityLabelListResultPage) SensitivityLabelListResultIterator { - return SensitivityLabelListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (sllr SensitivityLabelListResult) IsEmpty() bool { - return sllr.Value == nil || len(*sllr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (sllr SensitivityLabelListResult) hasNextLink() bool { - return sllr.NextLink != nil && len(*sllr.NextLink) != 0 -} - -// sensitivityLabelListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (sllr SensitivityLabelListResult) sensitivityLabelListResultPreparer(ctx context.Context) (*http.Request, error) { - if !sllr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(sllr.NextLink))) -} - -// SensitivityLabelListResultPage contains a page of SensitivityLabel values. -type SensitivityLabelListResultPage struct { - fn func(context.Context, SensitivityLabelListResult) (SensitivityLabelListResult, error) - sllr SensitivityLabelListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *SensitivityLabelListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SensitivityLabelListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.sllr) - if err != nil { - return err - } - page.sllr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *SensitivityLabelListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page SensitivityLabelListResultPage) NotDone() bool { - return !page.sllr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page SensitivityLabelListResultPage) Response() SensitivityLabelListResult { - return page.sllr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page SensitivityLabelListResultPage) Values() []SensitivityLabel { - if page.sllr.IsEmpty() { - return nil - } - return *page.sllr.Value -} - -// Creates a new instance of the SensitivityLabelListResultPage type. -func NewSensitivityLabelListResultPage(cur SensitivityLabelListResult, getNextPage func(context.Context, SensitivityLabelListResult) (SensitivityLabelListResult, error)) SensitivityLabelListResultPage { - return SensitivityLabelListResultPage{ - fn: getNextPage, - sllr: cur, - } -} - -// SensitivityLabelProperties properties of a sensitivity label. -type SensitivityLabelProperties struct { - // LabelName - The label name. - LabelName *string `json:"labelName,omitempty"` - // LabelID - The label ID. - LabelID *string `json:"labelId,omitempty"` - // InformationType - The information type. - InformationType *string `json:"informationType,omitempty"` - // InformationTypeID - The information type ID. - InformationTypeID *string `json:"informationTypeId,omitempty"` - // IsDisabled - READ-ONLY; Is sensitivity recommendation disabled. Applicable for recommended sensitivity label only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not. - IsDisabled *bool `json:"isDisabled,omitempty"` - // Rank - Possible values include: 'SensitivityLabelRankNone', 'SensitivityLabelRankLow', 'SensitivityLabelRankMedium', 'SensitivityLabelRankHigh', 'SensitivityLabelRankCritical' - Rank SensitivityLabelRank `json:"rank,omitempty"` -} - -// MarshalJSON is the custom marshaler for SensitivityLabelProperties. -func (slp SensitivityLabelProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if slp.LabelName != nil { - objectMap["labelName"] = slp.LabelName - } - if slp.LabelID != nil { - objectMap["labelId"] = slp.LabelID - } - if slp.InformationType != nil { - objectMap["informationType"] = slp.InformationType - } - if slp.InformationTypeID != nil { - objectMap["informationTypeId"] = slp.InformationTypeID - } - if slp.Rank != "" { - objectMap["rank"] = slp.Rank - } - return json.Marshal(objectMap) -} - -// Server an Azure SQL Database server. -type Server struct { - autorest.Response `json:"-"` - // Identity - The Azure Active Directory identity of the server. - Identity *ResourceIdentity `json:"identity,omitempty"` - // Kind - READ-ONLY; Kind of sql server. This is metadata used for the Azure portal experience. - Kind *string `json:"kind,omitempty"` - // ServerProperties - Resource properties. - *ServerProperties `json:"properties,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for Server. -func (s Server) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if s.Identity != nil { - objectMap["identity"] = s.Identity - } - if s.ServerProperties != nil { - objectMap["properties"] = s.ServerProperties - } - if s.Location != nil { - objectMap["location"] = s.Location - } - if s.Tags != nil { - objectMap["tags"] = s.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Server struct. -func (s *Server) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "identity": - if v != nil { - var identity ResourceIdentity - err = json.Unmarshal(*v, &identity) - if err != nil { - return err - } - s.Identity = &identity - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - s.Kind = &kind - } - case "properties": - if v != nil { - var serverProperties ServerProperties - err = json.Unmarshal(*v, &serverProperties) - if err != nil { - return err - } - s.ServerProperties = &serverProperties - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - s.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - s.Tags = tags - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - s.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - s.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - s.Type = &typeVar - } - } - } - - return nil -} - -// ServerAdministratorListResult the response to a list Active Directory Administrators request. -type ServerAdministratorListResult struct { - autorest.Response `json:"-"` - // Value - The list of server Active Directory Administrators for the server. - Value *[]ServerAzureADAdministrator `json:"value,omitempty"` -} - -// ServerAdministratorProperties the properties of an server Administrator. -type ServerAdministratorProperties struct { - // AdministratorType - The type of administrator. - AdministratorType *string `json:"administratorType,omitempty"` - // Login - The server administrator login value. - Login *string `json:"login,omitempty"` - // Sid - The server administrator Sid (Secure ID). - Sid *uuid.UUID `json:"sid,omitempty"` - // TenantID - The server Active Directory Administrator tenant id. - TenantID *uuid.UUID `json:"tenantId,omitempty"` -} - -// ServerAutomaticTuning server-level Automatic Tuning. -type ServerAutomaticTuning struct { - autorest.Response `json:"-"` - // AutomaticTuningServerProperties - Resource properties. - *AutomaticTuningServerProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerAutomaticTuning. -func (sat ServerAutomaticTuning) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sat.AutomaticTuningServerProperties != nil { - objectMap["properties"] = sat.AutomaticTuningServerProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ServerAutomaticTuning struct. -func (sat *ServerAutomaticTuning) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var automaticTuningServerProperties AutomaticTuningServerProperties - err = json.Unmarshal(*v, &automaticTuningServerProperties) - if err != nil { - return err - } - sat.AutomaticTuningServerProperties = &automaticTuningServerProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - sat.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - sat.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - sat.Type = &typeVar - } - } - } - - return nil -} - -// ServerAzureADAdministrator an server Active Directory Administrator. -type ServerAzureADAdministrator struct { - autorest.Response `json:"-"` - // ServerAdministratorProperties - The properties of the resource. - *ServerAdministratorProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerAzureADAdministrator. -func (saaa ServerAzureADAdministrator) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if saaa.ServerAdministratorProperties != nil { - objectMap["properties"] = saaa.ServerAdministratorProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ServerAzureADAdministrator struct. -func (saaa *ServerAzureADAdministrator) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var serverAdministratorProperties ServerAdministratorProperties - err = json.Unmarshal(*v, &serverAdministratorProperties) - if err != nil { - return err - } - saaa.ServerAdministratorProperties = &serverAdministratorProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - saaa.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - saaa.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - saaa.Type = &typeVar - } - } - } - - return nil -} - -// ServerAzureADAdministratorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type ServerAzureADAdministratorsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ServerAzureADAdministratorsClient) (ServerAzureADAdministrator, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ServerAzureADAdministratorsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ServerAzureADAdministratorsCreateOrUpdateFuture.Result. -func (future *ServerAzureADAdministratorsCreateOrUpdateFuture) result(client ServerAzureADAdministratorsClient) (saaa ServerAzureADAdministrator, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - saaa.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ServerAzureADAdministratorsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if saaa.Response.Response, err = future.GetResult(sender); err == nil && saaa.Response.Response.StatusCode != http.StatusNoContent { - saaa, err = client.CreateOrUpdateResponder(saaa.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsCreateOrUpdateFuture", "Result", saaa.Response.Response, "Failure responding to request") - } - } - return -} - -// ServerAzureADAdministratorsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ServerAzureADAdministratorsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ServerAzureADAdministratorsClient) (ServerAzureADAdministrator, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ServerAzureADAdministratorsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ServerAzureADAdministratorsDeleteFuture.Result. -func (future *ServerAzureADAdministratorsDeleteFuture) result(client ServerAzureADAdministratorsClient) (saaa ServerAzureADAdministrator, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - saaa.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ServerAzureADAdministratorsDeleteFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if saaa.Response.Response, err = future.GetResult(sender); err == nil && saaa.Response.Response.StatusCode != http.StatusNoContent { - saaa, err = client.DeleteResponder(saaa.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsDeleteFuture", "Result", saaa.Response.Response, "Failure responding to request") - } - } - return -} - -// ServerBlobAuditingPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type ServerBlobAuditingPoliciesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ServerBlobAuditingPoliciesClient) (ServerBlobAuditingPolicy, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ServerBlobAuditingPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ServerBlobAuditingPoliciesCreateOrUpdateFuture.Result. -func (future *ServerBlobAuditingPoliciesCreateOrUpdateFuture) result(client ServerBlobAuditingPoliciesClient) (sbap ServerBlobAuditingPolicy, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerBlobAuditingPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - sbap.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ServerBlobAuditingPoliciesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if sbap.Response.Response, err = future.GetResult(sender); err == nil && sbap.Response.Response.StatusCode != http.StatusNoContent { - sbap, err = client.CreateOrUpdateResponder(sbap.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerBlobAuditingPoliciesCreateOrUpdateFuture", "Result", sbap.Response.Response, "Failure responding to request") - } - } - return -} - -// ServerBlobAuditingPolicy a server blob auditing policy. -type ServerBlobAuditingPolicy struct { - autorest.Response `json:"-"` - // ServerBlobAuditingPolicyProperties - Resource properties. - *ServerBlobAuditingPolicyProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerBlobAuditingPolicy. -func (sbap ServerBlobAuditingPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sbap.ServerBlobAuditingPolicyProperties != nil { - objectMap["properties"] = sbap.ServerBlobAuditingPolicyProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ServerBlobAuditingPolicy struct. -func (sbap *ServerBlobAuditingPolicy) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var serverBlobAuditingPolicyProperties ServerBlobAuditingPolicyProperties - err = json.Unmarshal(*v, &serverBlobAuditingPolicyProperties) - if err != nil { - return err - } - sbap.ServerBlobAuditingPolicyProperties = &serverBlobAuditingPolicyProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - sbap.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - sbap.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - sbap.Type = &typeVar - } - } - } - - return nil -} - -// ServerBlobAuditingPolicyListResult a list of server auditing settings. -type ServerBlobAuditingPolicyListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]ServerBlobAuditingPolicy `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerBlobAuditingPolicyListResult. -func (sbaplr ServerBlobAuditingPolicyListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ServerBlobAuditingPolicyListResultIterator provides access to a complete listing of -// ServerBlobAuditingPolicy values. -type ServerBlobAuditingPolicyListResultIterator struct { - i int - page ServerBlobAuditingPolicyListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ServerBlobAuditingPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerBlobAuditingPolicyListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ServerBlobAuditingPolicyListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ServerBlobAuditingPolicyListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter ServerBlobAuditingPolicyListResultIterator) Response() ServerBlobAuditingPolicyListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ServerBlobAuditingPolicyListResultIterator) Value() ServerBlobAuditingPolicy { - if !iter.page.NotDone() { - return ServerBlobAuditingPolicy{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ServerBlobAuditingPolicyListResultIterator type. -func NewServerBlobAuditingPolicyListResultIterator(page ServerBlobAuditingPolicyListResultPage) ServerBlobAuditingPolicyListResultIterator { - return ServerBlobAuditingPolicyListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (sbaplr ServerBlobAuditingPolicyListResult) IsEmpty() bool { - return sbaplr.Value == nil || len(*sbaplr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (sbaplr ServerBlobAuditingPolicyListResult) hasNextLink() bool { - return sbaplr.NextLink != nil && len(*sbaplr.NextLink) != 0 -} - -// serverBlobAuditingPolicyListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (sbaplr ServerBlobAuditingPolicyListResult) serverBlobAuditingPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { - if !sbaplr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(sbaplr.NextLink))) -} - -// ServerBlobAuditingPolicyListResultPage contains a page of ServerBlobAuditingPolicy values. -type ServerBlobAuditingPolicyListResultPage struct { - fn func(context.Context, ServerBlobAuditingPolicyListResult) (ServerBlobAuditingPolicyListResult, error) - sbaplr ServerBlobAuditingPolicyListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ServerBlobAuditingPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerBlobAuditingPolicyListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.sbaplr) - if err != nil { - return err - } - page.sbaplr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ServerBlobAuditingPolicyListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ServerBlobAuditingPolicyListResultPage) NotDone() bool { - return !page.sbaplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ServerBlobAuditingPolicyListResultPage) Response() ServerBlobAuditingPolicyListResult { - return page.sbaplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ServerBlobAuditingPolicyListResultPage) Values() []ServerBlobAuditingPolicy { - if page.sbaplr.IsEmpty() { - return nil - } - return *page.sbaplr.Value -} - -// Creates a new instance of the ServerBlobAuditingPolicyListResultPage type. -func NewServerBlobAuditingPolicyListResultPage(cur ServerBlobAuditingPolicyListResult, getNextPage func(context.Context, ServerBlobAuditingPolicyListResult) (ServerBlobAuditingPolicyListResult, error)) ServerBlobAuditingPolicyListResultPage { - return ServerBlobAuditingPolicyListResultPage{ - fn: getNextPage, - sbaplr: cur, - } -} - -// ServerBlobAuditingPolicyProperties properties of a server blob auditing policy. -type ServerBlobAuditingPolicyProperties struct { - // State - Specifies the state of the policy. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Possible values include: 'BlobAuditingPolicyStateEnabled', 'BlobAuditingPolicyStateDisabled' - State BlobAuditingPolicyState `json:"state,omitempty"` - // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required. - StorageEndpoint *string `json:"storageEndpoint,omitempty"` - // StorageAccountAccessKey - Specifies the identifier key of the auditing storage account. - // If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. - // Prerequisites for using managed identity authentication: - // 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). - // 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. - // For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355) - StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` - // RetentionDays - Specifies the number of days to keep in the audit logs in the storage account. - RetentionDays *int32 `json:"retentionDays,omitempty"` - // AuditActionsAndGroups - Specifies the Actions-Groups and Actions to audit. - // - // The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins: - // - // BATCH_COMPLETED_GROUP, - // SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - // FAILED_DATABASE_AUTHENTICATION_GROUP. - // - // This above combination is also the set that is configured by default when enabling auditing from the Azure portal. - // - // The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records): - // - // APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - // BACKUP_RESTORE_GROUP - // DATABASE_LOGOUT_GROUP - // DATABASE_OBJECT_CHANGE_GROUP - // DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - // DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - // DATABASE_OPERATION_GROUP - // DATABASE_PERMISSION_CHANGE_GROUP - // DATABASE_PRINCIPAL_CHANGE_GROUP - // DATABASE_PRINCIPAL_IMPERSONATION_GROUP - // DATABASE_ROLE_MEMBER_CHANGE_GROUP - // FAILED_DATABASE_AUTHENTICATION_GROUP - // SCHEMA_OBJECT_ACCESS_GROUP - // SCHEMA_OBJECT_CHANGE_GROUP - // SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - // SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - // SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - // USER_CHANGE_PASSWORD_GROUP - // BATCH_STARTED_GROUP - // BATCH_COMPLETED_GROUP - // - // These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs. - // - // For more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - // - // For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: - // SELECT - // UPDATE - // INSERT - // DELETE - // EXECUTE - // RECEIVE - // REFERENCES - // - // The general form for defining an action to be audited is: - // {action} ON {object} BY {principal} - // - // Note that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively. - // - // For example: - // SELECT on dbo.myTable by public - // SELECT on DATABASE::myDatabase by public - // SELECT on SCHEMA::mySchema by public - // - // For more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - AuditActionsAndGroups *[]string `json:"auditActionsAndGroups,omitempty"` - // StorageAccountSubscriptionID - Specifies the blob storage subscription Id. - StorageAccountSubscriptionID *uuid.UUID `json:"storageAccountSubscriptionId,omitempty"` - // IsStorageSecondaryKeyInUse - Specifies whether storageAccountAccessKey value is the storage's secondary key. - IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"` - // IsAzureMonitorTargetEnabled - Specifies whether audit events are sent to Azure Monitor. - // In order to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true. - // - // When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created. - // Note that for server level audit you should use the 'master' database as {databaseName}. - // - // Diagnostic Settings URI format: - // PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - // - // For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) - // or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - IsAzureMonitorTargetEnabled *bool `json:"isAzureMonitorTargetEnabled,omitempty"` - // QueueDelayMs - Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. - // The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - QueueDelayMs *int32 `json:"queueDelayMs,omitempty"` -} - -// ServerCommunicationLink server communication link. -type ServerCommunicationLink struct { - autorest.Response `json:"-"` - // ServerCommunicationLinkProperties - The properties of resource. - *ServerCommunicationLinkProperties `json:"properties,omitempty"` - // Location - READ-ONLY; Communication link location. - Location *string `json:"location,omitempty"` - // Kind - READ-ONLY; Communication link kind. This property is used for Azure Portal metadata. - Kind *string `json:"kind,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerCommunicationLink. -func (scl ServerCommunicationLink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if scl.ServerCommunicationLinkProperties != nil { - objectMap["properties"] = scl.ServerCommunicationLinkProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ServerCommunicationLink struct. -func (scl *ServerCommunicationLink) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var serverCommunicationLinkProperties ServerCommunicationLinkProperties - err = json.Unmarshal(*v, &serverCommunicationLinkProperties) - if err != nil { - return err - } - scl.ServerCommunicationLinkProperties = &serverCommunicationLinkProperties - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - scl.Location = &location - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - scl.Kind = &kind - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - scl.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - scl.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - scl.Type = &typeVar - } - } - } - - return nil -} - -// ServerCommunicationLinkListResult a list of server communication links. -type ServerCommunicationLinkListResult struct { - autorest.Response `json:"-"` - // Value - The list of server communication links. - Value *[]ServerCommunicationLink `json:"value,omitempty"` -} - -// ServerCommunicationLinkProperties the properties of a server communication link. -type ServerCommunicationLinkProperties struct { - // State - READ-ONLY; The state. - State *string `json:"state,omitempty"` - // PartnerServer - The name of the partner server. - PartnerServer *string `json:"partnerServer,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerCommunicationLinkProperties. -func (sclp ServerCommunicationLinkProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sclp.PartnerServer != nil { - objectMap["partnerServer"] = sclp.PartnerServer - } - return json.Marshal(objectMap) -} - -// ServerCommunicationLinksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. -type ServerCommunicationLinksCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ServerCommunicationLinksClient) (ServerCommunicationLink, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ServerCommunicationLinksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ServerCommunicationLinksCreateOrUpdateFuture.Result. -func (future *ServerCommunicationLinksCreateOrUpdateFuture) result(client ServerCommunicationLinksClient) (scl ServerCommunicationLink, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - scl.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ServerCommunicationLinksCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if scl.Response.Response, err = future.GetResult(sender); err == nil && scl.Response.Response.StatusCode != http.StatusNoContent { - scl, err = client.CreateOrUpdateResponder(scl.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksCreateOrUpdateFuture", "Result", scl.Response.Response, "Failure responding to request") - } - } - return -} - -// ServerConnectionPolicy a server secure connection policy. -type ServerConnectionPolicy struct { - autorest.Response `json:"-"` - // Kind - READ-ONLY; Metadata used for the Azure portal experience. - Kind *string `json:"kind,omitempty"` - // Location - READ-ONLY; Resource location. - Location *string `json:"location,omitempty"` - // ServerConnectionPolicyProperties - The properties of the server secure connection policy. - *ServerConnectionPolicyProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerConnectionPolicy. -func (scp ServerConnectionPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if scp.ServerConnectionPolicyProperties != nil { - objectMap["properties"] = scp.ServerConnectionPolicyProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ServerConnectionPolicy struct. -func (scp *ServerConnectionPolicy) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - scp.Kind = &kind - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - scp.Location = &location - } - case "properties": - if v != nil { - var serverConnectionPolicyProperties ServerConnectionPolicyProperties - err = json.Unmarshal(*v, &serverConnectionPolicyProperties) - if err != nil { - return err - } - scp.ServerConnectionPolicyProperties = &serverConnectionPolicyProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - scp.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - scp.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - scp.Type = &typeVar - } - } - } - - return nil -} - -// ServerConnectionPolicyProperties the properties of a server secure connection policy. -type ServerConnectionPolicyProperties struct { - // ConnectionType - The server connection type. Possible values include: 'ServerConnectionTypeDefault', 'ServerConnectionTypeProxy', 'ServerConnectionTypeRedirect' - ConnectionType ServerConnectionType `json:"connectionType,omitempty"` -} - -// ServerDNSAlias a server DNS alias. -type ServerDNSAlias struct { - autorest.Response `json:"-"` - // ServerDNSAliasProperties - Resource properties. - *ServerDNSAliasProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerDNSAlias. -func (sda ServerDNSAlias) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sda.ServerDNSAliasProperties != nil { - objectMap["properties"] = sda.ServerDNSAliasProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ServerDNSAlias struct. -func (sda *ServerDNSAlias) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var serverDNSAliasProperties ServerDNSAliasProperties - err = json.Unmarshal(*v, &serverDNSAliasProperties) - if err != nil { - return err - } - sda.ServerDNSAliasProperties = &serverDNSAliasProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - sda.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - sda.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - sda.Type = &typeVar - } - } - } - - return nil -} - -// ServerDNSAliasAcquisition a server DNS alias acquisition request. -type ServerDNSAliasAcquisition struct { - // OldServerDNSAliasID - The id of the server alias that will be acquired to point to this server instead. - OldServerDNSAliasID *string `json:"oldServerDnsAliasId,omitempty"` -} - -// ServerDNSAliasesAcquireFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ServerDNSAliasesAcquireFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ServerDNSAliasesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ServerDNSAliasesAcquireFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ServerDNSAliasesAcquireFuture.Result. -func (future *ServerDNSAliasesAcquireFuture) result(client ServerDNSAliasesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesAcquireFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ServerDNSAliasesAcquireFuture") - return - } - ar.Response = future.Response() - return -} - -// ServerDNSAliasesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ServerDNSAliasesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ServerDNSAliasesClient) (ServerDNSAlias, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ServerDNSAliasesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ServerDNSAliasesCreateOrUpdateFuture.Result. -func (future *ServerDNSAliasesCreateOrUpdateFuture) result(client ServerDNSAliasesClient) (sda ServerDNSAlias, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - sda.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ServerDNSAliasesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if sda.Response.Response, err = future.GetResult(sender); err == nil && sda.Response.Response.StatusCode != http.StatusNoContent { - sda, err = client.CreateOrUpdateResponder(sda.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesCreateOrUpdateFuture", "Result", sda.Response.Response, "Failure responding to request") - } - } - return -} - -// ServerDNSAliasesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ServerDNSAliasesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ServerDNSAliasesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ServerDNSAliasesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ServerDNSAliasesDeleteFuture.Result. -func (future *ServerDNSAliasesDeleteFuture) result(client ServerDNSAliasesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ServerDNSAliasesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ServerDNSAliasListResult a list of server DNS aliases. -type ServerDNSAliasListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]ServerDNSAlias `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerDNSAliasListResult. -func (sdalr ServerDNSAliasListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ServerDNSAliasListResultIterator provides access to a complete listing of ServerDNSAlias values. -type ServerDNSAliasListResultIterator struct { - i int - page ServerDNSAliasListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ServerDNSAliasListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerDNSAliasListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ServerDNSAliasListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ServerDNSAliasListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter ServerDNSAliasListResultIterator) Response() ServerDNSAliasListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ServerDNSAliasListResultIterator) Value() ServerDNSAlias { - if !iter.page.NotDone() { - return ServerDNSAlias{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ServerDNSAliasListResultIterator type. -func NewServerDNSAliasListResultIterator(page ServerDNSAliasListResultPage) ServerDNSAliasListResultIterator { - return ServerDNSAliasListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (sdalr ServerDNSAliasListResult) IsEmpty() bool { - return sdalr.Value == nil || len(*sdalr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (sdalr ServerDNSAliasListResult) hasNextLink() bool { - return sdalr.NextLink != nil && len(*sdalr.NextLink) != 0 -} - -// serverDNSAliasListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (sdalr ServerDNSAliasListResult) serverDNSAliasListResultPreparer(ctx context.Context) (*http.Request, error) { - if !sdalr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(sdalr.NextLink))) -} - -// ServerDNSAliasListResultPage contains a page of ServerDNSAlias values. -type ServerDNSAliasListResultPage struct { - fn func(context.Context, ServerDNSAliasListResult) (ServerDNSAliasListResult, error) - sdalr ServerDNSAliasListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ServerDNSAliasListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerDNSAliasListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.sdalr) - if err != nil { - return err - } - page.sdalr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ServerDNSAliasListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ServerDNSAliasListResultPage) NotDone() bool { - return !page.sdalr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ServerDNSAliasListResultPage) Response() ServerDNSAliasListResult { - return page.sdalr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ServerDNSAliasListResultPage) Values() []ServerDNSAlias { - if page.sdalr.IsEmpty() { - return nil - } - return *page.sdalr.Value -} - -// Creates a new instance of the ServerDNSAliasListResultPage type. -func NewServerDNSAliasListResultPage(cur ServerDNSAliasListResult, getNextPage func(context.Context, ServerDNSAliasListResult) (ServerDNSAliasListResult, error)) ServerDNSAliasListResultPage { - return ServerDNSAliasListResultPage{ - fn: getNextPage, - sdalr: cur, - } -} - -// ServerDNSAliasProperties properties of a server DNS alias. -type ServerDNSAliasProperties struct { - // AzureDNSRecord - READ-ONLY; The fully qualified DNS record for alias - AzureDNSRecord *string `json:"azureDnsRecord,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerDNSAliasProperties. -func (sdap ServerDNSAliasProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ServerKey a server key. -type ServerKey struct { - autorest.Response `json:"-"` - // Kind - Kind of encryption protector. This is metadata used for the Azure portal experience. - Kind *string `json:"kind,omitempty"` - // Location - READ-ONLY; Resource location. - Location *string `json:"location,omitempty"` - // ServerKeyProperties - Resource properties. - *ServerKeyProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerKey. -func (sk ServerKey) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sk.Kind != nil { - objectMap["kind"] = sk.Kind - } - if sk.ServerKeyProperties != nil { - objectMap["properties"] = sk.ServerKeyProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ServerKey struct. -func (sk *ServerKey) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - sk.Kind = &kind - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - sk.Location = &location - } - case "properties": - if v != nil { - var serverKeyProperties ServerKeyProperties - err = json.Unmarshal(*v, &serverKeyProperties) - if err != nil { - return err - } - sk.ServerKeyProperties = &serverKeyProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - sk.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - sk.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - sk.Type = &typeVar - } - } - } - - return nil -} - -// ServerKeyListResult a list of server keys. -type ServerKeyListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]ServerKey `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerKeyListResult. -func (sklr ServerKeyListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ServerKeyListResultIterator provides access to a complete listing of ServerKey values. -type ServerKeyListResultIterator struct { - i int - page ServerKeyListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ServerKeyListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerKeyListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ServerKeyListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ServerKeyListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter ServerKeyListResultIterator) Response() ServerKeyListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ServerKeyListResultIterator) Value() ServerKey { - if !iter.page.NotDone() { - return ServerKey{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ServerKeyListResultIterator type. -func NewServerKeyListResultIterator(page ServerKeyListResultPage) ServerKeyListResultIterator { - return ServerKeyListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (sklr ServerKeyListResult) IsEmpty() bool { - return sklr.Value == nil || len(*sklr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (sklr ServerKeyListResult) hasNextLink() bool { - return sklr.NextLink != nil && len(*sklr.NextLink) != 0 -} - -// serverKeyListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (sklr ServerKeyListResult) serverKeyListResultPreparer(ctx context.Context) (*http.Request, error) { - if !sklr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(sklr.NextLink))) -} - -// ServerKeyListResultPage contains a page of ServerKey values. -type ServerKeyListResultPage struct { - fn func(context.Context, ServerKeyListResult) (ServerKeyListResult, error) - sklr ServerKeyListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ServerKeyListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerKeyListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.sklr) - if err != nil { - return err - } - page.sklr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ServerKeyListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ServerKeyListResultPage) NotDone() bool { - return !page.sklr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ServerKeyListResultPage) Response() ServerKeyListResult { - return page.sklr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ServerKeyListResultPage) Values() []ServerKey { - if page.sklr.IsEmpty() { - return nil - } - return *page.sklr.Value -} - -// Creates a new instance of the ServerKeyListResultPage type. -func NewServerKeyListResultPage(cur ServerKeyListResult, getNextPage func(context.Context, ServerKeyListResult) (ServerKeyListResult, error)) ServerKeyListResultPage { - return ServerKeyListResultPage{ - fn: getNextPage, - sklr: cur, - } -} - -// ServerKeyProperties properties for a server key execution. -type ServerKeyProperties struct { - // Subregion - READ-ONLY; Subregion of the server key. - Subregion *string `json:"subregion,omitempty"` - // ServerKeyType - The server key type like 'ServiceManaged', 'AzureKeyVault'. Possible values include: 'ServiceManaged', 'AzureKeyVault' - ServerKeyType ServerKeyType `json:"serverKeyType,omitempty"` - // URI - The URI of the server key. - URI *string `json:"uri,omitempty"` - // Thumbprint - Thumbprint of the server key. - Thumbprint *string `json:"thumbprint,omitempty"` - // CreationDate - The server key creation date. - CreationDate *date.Time `json:"creationDate,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerKeyProperties. -func (skp ServerKeyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if skp.ServerKeyType != "" { - objectMap["serverKeyType"] = skp.ServerKeyType - } - if skp.URI != nil { - objectMap["uri"] = skp.URI - } - if skp.Thumbprint != nil { - objectMap["thumbprint"] = skp.Thumbprint - } - if skp.CreationDate != nil { - objectMap["creationDate"] = skp.CreationDate - } - return json.Marshal(objectMap) -} - -// ServerKeysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ServerKeysCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ServerKeysClient) (ServerKey, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ServerKeysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ServerKeysCreateOrUpdateFuture.Result. -func (future *ServerKeysCreateOrUpdateFuture) result(client ServerKeysClient) (sk ServerKey, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerKeysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - sk.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ServerKeysCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if sk.Response.Response, err = future.GetResult(sender); err == nil && sk.Response.Response.StatusCode != http.StatusNoContent { - sk, err = client.CreateOrUpdateResponder(sk.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerKeysCreateOrUpdateFuture", "Result", sk.Response.Response, "Failure responding to request") - } - } - return -} - -// ServerKeysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ServerKeysDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ServerKeysClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ServerKeysDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ServerKeysDeleteFuture.Result. -func (future *ServerKeysDeleteFuture) result(client ServerKeysClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerKeysDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ServerKeysDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ServerListResult a list of servers. -type ServerListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]Server `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerListResult. -func (slr ServerListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ServerListResultIterator provides access to a complete listing of Server values. -type ServerListResultIterator struct { - i int - page ServerListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ServerListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ServerListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ServerListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter ServerListResultIterator) Response() ServerListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ServerListResultIterator) Value() Server { - if !iter.page.NotDone() { - return Server{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ServerListResultIterator type. -func NewServerListResultIterator(page ServerListResultPage) ServerListResultIterator { - return ServerListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (slr ServerListResult) IsEmpty() bool { - return slr.Value == nil || len(*slr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (slr ServerListResult) hasNextLink() bool { - return slr.NextLink != nil && len(*slr.NextLink) != 0 -} - -// serverListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (slr ServerListResult) serverListResultPreparer(ctx context.Context) (*http.Request, error) { - if !slr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(slr.NextLink))) -} - -// ServerListResultPage contains a page of Server values. -type ServerListResultPage struct { - fn func(context.Context, ServerListResult) (ServerListResult, error) - slr ServerListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ServerListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.slr) - if err != nil { - return err - } - page.slr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ServerListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ServerListResultPage) NotDone() bool { - return !page.slr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ServerListResultPage) Response() ServerListResult { - return page.slr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ServerListResultPage) Values() []Server { - if page.slr.IsEmpty() { - return nil - } - return *page.slr.Value -} - -// Creates a new instance of the ServerListResultPage type. -func NewServerListResultPage(cur ServerListResult, getNextPage func(context.Context, ServerListResult) (ServerListResult, error)) ServerListResultPage { - return ServerListResultPage{ - fn: getNextPage, - slr: cur, - } -} - -// ServerProperties the properties of a server. -type ServerProperties struct { - // AdministratorLogin - Administrator username for the server. Once created it cannot be changed. - AdministratorLogin *string `json:"administratorLogin,omitempty"` - // AdministratorLoginPassword - The administrator login password (required for server creation). - AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` - // Version - The version of the server. - Version *string `json:"version,omitempty"` - // State - READ-ONLY; The state of the server. - State *string `json:"state,omitempty"` - // FullyQualifiedDomainName - READ-ONLY; The fully qualified domain name of the server. - FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerProperties. -func (sp ServerProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sp.AdministratorLogin != nil { - objectMap["administratorLogin"] = sp.AdministratorLogin - } - if sp.AdministratorLoginPassword != nil { - objectMap["administratorLoginPassword"] = sp.AdministratorLoginPassword - } - if sp.Version != nil { - objectMap["version"] = sp.Version - } - return json.Marshal(objectMap) -} - -// ServersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ServersCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ServersClient) (Server, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ServersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ServersCreateOrUpdateFuture.Result. -func (future *ServersCreateOrUpdateFuture) result(client ServersClient) (s Server, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - s.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ServersCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { - s, err = client.CreateOrUpdateResponder(s.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request") - } - } - return -} - -// ServersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ServersDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ServersClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ServersDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ServersDeleteFuture.Result. -func (future *ServersDeleteFuture) result(client ServersClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ServersDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ServerSecurityAlertPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type ServerSecurityAlertPoliciesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ServerSecurityAlertPoliciesClient) (ServerSecurityAlertPolicy, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ServerSecurityAlertPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ServerSecurityAlertPoliciesCreateOrUpdateFuture.Result. -func (future *ServerSecurityAlertPoliciesCreateOrUpdateFuture) result(client ServerSecurityAlertPoliciesClient) (ssap ServerSecurityAlertPolicy, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerSecurityAlertPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ssap.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ServerSecurityAlertPoliciesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ssap.Response.Response, err = future.GetResult(sender); err == nil && ssap.Response.Response.StatusCode != http.StatusNoContent { - ssap, err = client.CreateOrUpdateResponder(ssap.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerSecurityAlertPoliciesCreateOrUpdateFuture", "Result", ssap.Response.Response, "Failure responding to request") - } - } - return -} - -// ServerSecurityAlertPolicy a server security alert policy. -type ServerSecurityAlertPolicy struct { - autorest.Response `json:"-"` - // SecurityAlertPolicyProperties - Resource properties. - *SecurityAlertPolicyProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerSecurityAlertPolicy. -func (ssap ServerSecurityAlertPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ssap.SecurityAlertPolicyProperties != nil { - objectMap["properties"] = ssap.SecurityAlertPolicyProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ServerSecurityAlertPolicy struct. -func (ssap *ServerSecurityAlertPolicy) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var securityAlertPolicyProperties SecurityAlertPolicyProperties - err = json.Unmarshal(*v, &securityAlertPolicyProperties) - if err != nil { - return err - } - ssap.SecurityAlertPolicyProperties = &securityAlertPolicyProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ssap.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ssap.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ssap.Type = &typeVar - } - } - } - - return nil -} - -// ServersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ServersUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ServersClient) (Server, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ServersUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ServersUpdateFuture.Result. -func (future *ServersUpdateFuture) result(client ServersClient) (s Server, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - s.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ServersUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { - s, err = client.UpdateResponder(s.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersUpdateFuture", "Result", s.Response.Response, "Failure responding to request") - } - } - return -} - -// ServerUpdate an update request for an Azure SQL Database server. -type ServerUpdate struct { - // ServerProperties - Resource properties. - *ServerProperties `json:"properties,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for ServerUpdate. -func (su ServerUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if su.ServerProperties != nil { - objectMap["properties"] = su.ServerProperties - } - if su.Tags != nil { - objectMap["tags"] = su.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ServerUpdate struct. -func (su *ServerUpdate) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var serverProperties ServerProperties - err = json.Unmarshal(*v, &serverProperties) - if err != nil { - return err - } - su.ServerProperties = &serverProperties - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - su.Tags = tags - } - } - } - - return nil -} - -// ServerUsage represents server metrics. -type ServerUsage struct { - // Name - READ-ONLY; Name of the server usage metric. - Name *string `json:"name,omitempty"` - // ResourceName - READ-ONLY; The name of the resource. - ResourceName *string `json:"resourceName,omitempty"` - // DisplayName - READ-ONLY; The metric display name. - DisplayName *string `json:"displayName,omitempty"` - // CurrentValue - READ-ONLY; The current value of the metric. - CurrentValue *float64 `json:"currentValue,omitempty"` - // Limit - READ-ONLY; The current limit of the metric. - Limit *float64 `json:"limit,omitempty"` - // Unit - READ-ONLY; The units of the metric. - Unit *string `json:"unit,omitempty"` - // NextResetTime - READ-ONLY; The next reset time for the metric (ISO8601 format). - NextResetTime *date.Time `json:"nextResetTime,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerUsage. -func (su ServerUsage) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ServerUsageListResult represents the response to a list server metrics request. -type ServerUsageListResult struct { - autorest.Response `json:"-"` - // Value - The list of server metrics for the server. - Value *[]ServerUsage `json:"value,omitempty"` -} - -// ServerVersionCapability the server capabilities. -type ServerVersionCapability struct { - // Name - READ-ONLY; The server version name. - Name *string `json:"name,omitempty"` - // Status - READ-ONLY; The status of the server version. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled' - Status CapabilityStatus `json:"status,omitempty"` - // SupportedEditions - READ-ONLY; The list of supported database editions. - SupportedEditions *[]EditionCapability `json:"supportedEditions,omitempty"` - // SupportedElasticPoolEditions - READ-ONLY; The list of supported elastic pool editions. - SupportedElasticPoolEditions *[]ElasticPoolEditionCapability `json:"supportedElasticPoolEditions,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerVersionCapability. -func (svc ServerVersionCapability) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ServiceObjective represents a database service objective. -type ServiceObjective struct { - autorest.Response `json:"-"` - // ServiceObjectiveProperties - Represents the properties of the resource. - *ServiceObjectiveProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServiceObjective. -func (so ServiceObjective) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if so.ServiceObjectiveProperties != nil { - objectMap["properties"] = so.ServiceObjectiveProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ServiceObjective struct. -func (so *ServiceObjective) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var serviceObjectiveProperties ServiceObjectiveProperties - err = json.Unmarshal(*v, &serviceObjectiveProperties) - if err != nil { - return err - } - so.ServiceObjectiveProperties = &serviceObjectiveProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - so.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - so.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - so.Type = &typeVar - } - } - } - - return nil -} - -// ServiceObjectiveCapability the service objectives capability. -type ServiceObjectiveCapability struct { - // Name - READ-ONLY; The service objective name. - Name *string `json:"name,omitempty"` - // Status - READ-ONLY; The status of the service objective. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled' - Status CapabilityStatus `json:"status,omitempty"` - // PerformanceLevel - READ-ONLY; The performance level of the service objective capability. - *PerformanceLevel `json:"performanceLevel,omitempty"` - // ID - READ-ONLY; The unique ID of the service objective. - ID *uuid.UUID `json:"id,omitempty"` - // SupportedMaxSizes - READ-ONLY; The list of supported maximum database sizes for this service objective. - SupportedMaxSizes *[]MaxSizeCapability `json:"supportedMaxSizes,omitempty"` - // IncludedMaxSize - READ-ONLY; The included (free) max size for this service level objective. - IncludedMaxSize *MaxSizeCapability `json:"includedMaxSize,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServiceObjectiveCapability. -func (soc ServiceObjectiveCapability) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ServiceObjectiveCapability struct. -func (soc *ServiceObjectiveCapability) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - soc.Name = &name - } - case "status": - if v != nil { - var status CapabilityStatus - err = json.Unmarshal(*v, &status) - if err != nil { - return err - } - soc.Status = status - } - case "performanceLevel": - if v != nil { - var performanceLevel PerformanceLevel - err = json.Unmarshal(*v, &performanceLevel) - if err != nil { - return err - } - soc.PerformanceLevel = &performanceLevel - } - case "id": - if v != nil { - var ID uuid.UUID - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - soc.ID = &ID - } - case "supportedMaxSizes": - if v != nil { - var supportedMaxSizes []MaxSizeCapability - err = json.Unmarshal(*v, &supportedMaxSizes) - if err != nil { - return err - } - soc.SupportedMaxSizes = &supportedMaxSizes - } - case "includedMaxSize": - if v != nil { - var includedMaxSize MaxSizeCapability - err = json.Unmarshal(*v, &includedMaxSize) - if err != nil { - return err - } - soc.IncludedMaxSize = &includedMaxSize - } - } - } - - return nil -} - -// ServiceObjectiveListResult represents the response to a get database service objectives request. -type ServiceObjectiveListResult struct { - autorest.Response `json:"-"` - // Value - The list of database service objectives. - Value *[]ServiceObjective `json:"value,omitempty"` -} - -// ServiceObjectiveProperties represents the properties of a database service objective. -type ServiceObjectiveProperties struct { - // ServiceObjectiveName - READ-ONLY; The name for the service objective. - ServiceObjectiveName *string `json:"serviceObjectiveName,omitempty"` - // IsDefault - READ-ONLY; Gets whether the service level objective is the default service objective. - IsDefault *bool `json:"isDefault,omitempty"` - // IsSystem - READ-ONLY; Gets whether the service level objective is a system service objective. - IsSystem *bool `json:"isSystem,omitempty"` - // Description - READ-ONLY; The description for the service level objective. - Description *string `json:"description,omitempty"` - // Enabled - READ-ONLY; Gets whether the service level objective is enabled. - Enabled *bool `json:"enabled,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServiceObjectiveProperties. -func (sop ServiceObjectiveProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ServiceTierAdvisor represents a Service Tier Advisor. -type ServiceTierAdvisor struct { - autorest.Response `json:"-"` - // ServiceTierAdvisorProperties - READ-ONLY; The properties representing the resource. - *ServiceTierAdvisorProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServiceTierAdvisor. -func (sta ServiceTierAdvisor) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ServiceTierAdvisor struct. -func (sta *ServiceTierAdvisor) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var serviceTierAdvisorProperties ServiceTierAdvisorProperties - err = json.Unmarshal(*v, &serviceTierAdvisorProperties) - if err != nil { - return err - } - sta.ServiceTierAdvisorProperties = &serviceTierAdvisorProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - sta.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - sta.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - sta.Type = &typeVar - } - } - } - - return nil -} - -// ServiceTierAdvisorListResult represents the response to a list service tier advisor request. -type ServiceTierAdvisorListResult struct { - autorest.Response `json:"-"` - // Value - The list of service tier advisors for specified database. - Value *[]ServiceTierAdvisor `json:"value,omitempty"` -} - -// ServiceTierAdvisorProperties represents the properties of a Service Tier Advisor. -type ServiceTierAdvisorProperties struct { - // ObservationPeriodStart - READ-ONLY; The observation period start (ISO8601 format). - ObservationPeriodStart *date.Time `json:"observationPeriodStart,omitempty"` - // ObservationPeriodEnd - READ-ONLY; The observation period start (ISO8601 format). - ObservationPeriodEnd *date.Time `json:"observationPeriodEnd,omitempty"` - // ActiveTimeRatio - READ-ONLY; The activeTimeRatio for service tier advisor. - ActiveTimeRatio *float64 `json:"activeTimeRatio,omitempty"` - // MinDtu - READ-ONLY; Gets or sets minDtu for service tier advisor. - MinDtu *float64 `json:"minDtu,omitempty"` - // AvgDtu - READ-ONLY; Gets or sets avgDtu for service tier advisor. - AvgDtu *float64 `json:"avgDtu,omitempty"` - // MaxDtu - READ-ONLY; Gets or sets maxDtu for service tier advisor. - MaxDtu *float64 `json:"maxDtu,omitempty"` - // MaxSizeInGB - READ-ONLY; Gets or sets maxSizeInGB for service tier advisor. - MaxSizeInGB *float64 `json:"maxSizeInGB,omitempty"` - // ServiceLevelObjectiveUsageMetrics - READ-ONLY; Gets or sets serviceLevelObjectiveUsageMetrics for the service tier advisor. - ServiceLevelObjectiveUsageMetrics *[]SloUsageMetric `json:"serviceLevelObjectiveUsageMetrics,omitempty"` - // CurrentServiceLevelObjective - READ-ONLY; Gets or sets currentServiceLevelObjective for service tier advisor. - CurrentServiceLevelObjective *string `json:"currentServiceLevelObjective,omitempty"` - // CurrentServiceLevelObjectiveID - READ-ONLY; Gets or sets currentServiceLevelObjectiveId for service tier advisor. - CurrentServiceLevelObjectiveID *uuid.UUID `json:"currentServiceLevelObjectiveId,omitempty"` - // UsageBasedRecommendationServiceLevelObjective - READ-ONLY; Gets or sets usageBasedRecommendationServiceLevelObjective for service tier advisor. - UsageBasedRecommendationServiceLevelObjective *string `json:"usageBasedRecommendationServiceLevelObjective,omitempty"` - // UsageBasedRecommendationServiceLevelObjectiveID - READ-ONLY; Gets or sets usageBasedRecommendationServiceLevelObjectiveId for service tier advisor. - UsageBasedRecommendationServiceLevelObjectiveID *uuid.UUID `json:"usageBasedRecommendationServiceLevelObjectiveId,omitempty"` - // DatabaseSizeBasedRecommendationServiceLevelObjective - READ-ONLY; Gets or sets databaseSizeBasedRecommendationServiceLevelObjective for service tier advisor. - DatabaseSizeBasedRecommendationServiceLevelObjective *string `json:"databaseSizeBasedRecommendationServiceLevelObjective,omitempty"` - // DatabaseSizeBasedRecommendationServiceLevelObjectiveID - READ-ONLY; Gets or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service tier advisor. - DatabaseSizeBasedRecommendationServiceLevelObjectiveID *uuid.UUID `json:"databaseSizeBasedRecommendationServiceLevelObjectiveId,omitempty"` - // DisasterPlanBasedRecommendationServiceLevelObjective - READ-ONLY; Gets or sets disasterPlanBasedRecommendationServiceLevelObjective for service tier advisor. - DisasterPlanBasedRecommendationServiceLevelObjective *string `json:"disasterPlanBasedRecommendationServiceLevelObjective,omitempty"` - // DisasterPlanBasedRecommendationServiceLevelObjectiveID - READ-ONLY; Gets or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service tier advisor. - DisasterPlanBasedRecommendationServiceLevelObjectiveID *uuid.UUID `json:"disasterPlanBasedRecommendationServiceLevelObjectiveId,omitempty"` - // OverallRecommendationServiceLevelObjective - READ-ONLY; Gets or sets overallRecommendationServiceLevelObjective for service tier advisor. - OverallRecommendationServiceLevelObjective *string `json:"overallRecommendationServiceLevelObjective,omitempty"` - // OverallRecommendationServiceLevelObjectiveID - READ-ONLY; Gets or sets overallRecommendationServiceLevelObjectiveId for service tier advisor. - OverallRecommendationServiceLevelObjectiveID *uuid.UUID `json:"overallRecommendationServiceLevelObjectiveId,omitempty"` - // Confidence - READ-ONLY; Gets or sets confidence for service tier advisor. - Confidence *float64 `json:"confidence,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServiceTierAdvisorProperties. -func (stap ServiceTierAdvisorProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// Sku an ARM Resource SKU. -type Sku struct { - // Name - The name of the SKU, typically, a letter + Number code, e.g. P3. - Name *string `json:"name,omitempty"` - // Tier - The tier or edition of the particular SKU, e.g. Basic, Premium. - Tier *string `json:"tier,omitempty"` - // Size - Size of the particular SKU - Size *string `json:"size,omitempty"` - // Family - If the service has different generations of hardware, for the same SKU, then that can be captured here. - Family *string `json:"family,omitempty"` - // Capacity - Capacity of the particular SKU. - Capacity *int32 `json:"capacity,omitempty"` -} - -// SloUsageMetric a Slo Usage Metric. -type SloUsageMetric struct { - // ServiceLevelObjective - READ-ONLY; The serviceLevelObjective for SLO usage metric. Possible values include: 'ServiceObjectiveNameSystem', 'ServiceObjectiveNameSystem0', 'ServiceObjectiveNameSystem1', 'ServiceObjectiveNameSystem2', 'ServiceObjectiveNameSystem3', 'ServiceObjectiveNameSystem4', 'ServiceObjectiveNameSystem2L', 'ServiceObjectiveNameSystem3L', 'ServiceObjectiveNameSystem4L', 'ServiceObjectiveNameFree', 'ServiceObjectiveNameBasic', 'ServiceObjectiveNameS0', 'ServiceObjectiveNameS1', 'ServiceObjectiveNameS2', 'ServiceObjectiveNameS3', 'ServiceObjectiveNameS4', 'ServiceObjectiveNameS6', 'ServiceObjectiveNameS7', 'ServiceObjectiveNameS9', 'ServiceObjectiveNameS12', 'ServiceObjectiveNameP1', 'ServiceObjectiveNameP2', 'ServiceObjectiveNameP3', 'ServiceObjectiveNameP4', 'ServiceObjectiveNameP6', 'ServiceObjectiveNameP11', 'ServiceObjectiveNameP15', 'ServiceObjectiveNamePRS1', 'ServiceObjectiveNamePRS2', 'ServiceObjectiveNamePRS4', 'ServiceObjectiveNamePRS6', 'ServiceObjectiveNameDW100', 'ServiceObjectiveNameDW200', 'ServiceObjectiveNameDW300', 'ServiceObjectiveNameDW400', 'ServiceObjectiveNameDW500', 'ServiceObjectiveNameDW600', 'ServiceObjectiveNameDW1000', 'ServiceObjectiveNameDW1200', 'ServiceObjectiveNameDW1000c', 'ServiceObjectiveNameDW1500', 'ServiceObjectiveNameDW1500c', 'ServiceObjectiveNameDW2000', 'ServiceObjectiveNameDW2000c', 'ServiceObjectiveNameDW3000', 'ServiceObjectiveNameDW2500c', 'ServiceObjectiveNameDW3000c', 'ServiceObjectiveNameDW6000', 'ServiceObjectiveNameDW5000c', 'ServiceObjectiveNameDW6000c', 'ServiceObjectiveNameDW7500c', 'ServiceObjectiveNameDW10000c', 'ServiceObjectiveNameDW15000c', 'ServiceObjectiveNameDW30000c', 'ServiceObjectiveNameDS100', 'ServiceObjectiveNameDS200', 'ServiceObjectiveNameDS300', 'ServiceObjectiveNameDS400', 'ServiceObjectiveNameDS500', 'ServiceObjectiveNameDS600', 'ServiceObjectiveNameDS1000', 'ServiceObjectiveNameDS1200', 'ServiceObjectiveNameDS1500', 'ServiceObjectiveNameDS2000', 'ServiceObjectiveNameElasticPool' - ServiceLevelObjective ServiceObjectiveName `json:"serviceLevelObjective,omitempty"` - // ServiceLevelObjectiveID - READ-ONLY; The serviceLevelObjectiveId for SLO usage metric. - ServiceLevelObjectiveID *uuid.UUID `json:"serviceLevelObjectiveId,omitempty"` - // InRangeTimeRatio - READ-ONLY; Gets or sets inRangeTimeRatio for SLO usage metric. - InRangeTimeRatio *float64 `json:"inRangeTimeRatio,omitempty"` -} - -// MarshalJSON is the custom marshaler for SloUsageMetric. -func (sum SloUsageMetric) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SubscriptionUsage usage Metric of a Subscription in a Location. -type SubscriptionUsage struct { - autorest.Response `json:"-"` - // SubscriptionUsageProperties - Resource properties. - *SubscriptionUsageProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for SubscriptionUsage. -func (su SubscriptionUsage) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if su.SubscriptionUsageProperties != nil { - objectMap["properties"] = su.SubscriptionUsageProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for SubscriptionUsage struct. -func (su *SubscriptionUsage) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var subscriptionUsageProperties SubscriptionUsageProperties - err = json.Unmarshal(*v, &subscriptionUsageProperties) - if err != nil { - return err - } - su.SubscriptionUsageProperties = &subscriptionUsageProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - su.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - su.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - su.Type = &typeVar - } - } - } - - return nil -} - -// SubscriptionUsageListResult a list of subscription usage metrics in a location. -type SubscriptionUsageListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]SubscriptionUsage `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for SubscriptionUsageListResult. -func (sulr SubscriptionUsageListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SubscriptionUsageListResultIterator provides access to a complete listing of SubscriptionUsage values. -type SubscriptionUsageListResultIterator struct { - i int - page SubscriptionUsageListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *SubscriptionUsageListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionUsageListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *SubscriptionUsageListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter SubscriptionUsageListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter SubscriptionUsageListResultIterator) Response() SubscriptionUsageListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter SubscriptionUsageListResultIterator) Value() SubscriptionUsage { - if !iter.page.NotDone() { - return SubscriptionUsage{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the SubscriptionUsageListResultIterator type. -func NewSubscriptionUsageListResultIterator(page SubscriptionUsageListResultPage) SubscriptionUsageListResultIterator { - return SubscriptionUsageListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (sulr SubscriptionUsageListResult) IsEmpty() bool { - return sulr.Value == nil || len(*sulr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (sulr SubscriptionUsageListResult) hasNextLink() bool { - return sulr.NextLink != nil && len(*sulr.NextLink) != 0 -} - -// subscriptionUsageListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (sulr SubscriptionUsageListResult) subscriptionUsageListResultPreparer(ctx context.Context) (*http.Request, error) { - if !sulr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(sulr.NextLink))) -} - -// SubscriptionUsageListResultPage contains a page of SubscriptionUsage values. -type SubscriptionUsageListResultPage struct { - fn func(context.Context, SubscriptionUsageListResult) (SubscriptionUsageListResult, error) - sulr SubscriptionUsageListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *SubscriptionUsageListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionUsageListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.sulr) - if err != nil { - return err - } - page.sulr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *SubscriptionUsageListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page SubscriptionUsageListResultPage) NotDone() bool { - return !page.sulr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page SubscriptionUsageListResultPage) Response() SubscriptionUsageListResult { - return page.sulr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page SubscriptionUsageListResultPage) Values() []SubscriptionUsage { - if page.sulr.IsEmpty() { - return nil - } - return *page.sulr.Value -} - -// Creates a new instance of the SubscriptionUsageListResultPage type. -func NewSubscriptionUsageListResultPage(cur SubscriptionUsageListResult, getNextPage func(context.Context, SubscriptionUsageListResult) (SubscriptionUsageListResult, error)) SubscriptionUsageListResultPage { - return SubscriptionUsageListResultPage{ - fn: getNextPage, - sulr: cur, - } -} - -// SubscriptionUsageProperties properties of a subscription usage. -type SubscriptionUsageProperties struct { - // DisplayName - READ-ONLY; User-readable name of the metric. - DisplayName *string `json:"displayName,omitempty"` - // CurrentValue - READ-ONLY; Current value of the metric. - CurrentValue *float64 `json:"currentValue,omitempty"` - // Limit - READ-ONLY; Boundary value of the metric. - Limit *float64 `json:"limit,omitempty"` - // Unit - READ-ONLY; Unit of the metric. - Unit *string `json:"unit,omitempty"` -} - -// MarshalJSON is the custom marshaler for SubscriptionUsageProperties. -func (sup SubscriptionUsageProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SyncAgent an Azure SQL Database sync agent. -type SyncAgent struct { - autorest.Response `json:"-"` - // SyncAgentProperties - Resource properties. - *SyncAgentProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for SyncAgent. -func (sa SyncAgent) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sa.SyncAgentProperties != nil { - objectMap["properties"] = sa.SyncAgentProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for SyncAgent struct. -func (sa *SyncAgent) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var syncAgentProperties SyncAgentProperties - err = json.Unmarshal(*v, &syncAgentProperties) - if err != nil { - return err - } - sa.SyncAgentProperties = &syncAgentProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - sa.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - sa.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - sa.Type = &typeVar - } - } - } - - return nil -} - -// SyncAgentKeyProperties properties of an Azure SQL Database sync agent key. -type SyncAgentKeyProperties struct { - autorest.Response `json:"-"` - // SyncAgentKey - READ-ONLY; Key of sync agent. - SyncAgentKey *string `json:"syncAgentKey,omitempty"` -} - -// MarshalJSON is the custom marshaler for SyncAgentKeyProperties. -func (sakp SyncAgentKeyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SyncAgentLinkedDatabase an Azure SQL Database sync agent linked database. -type SyncAgentLinkedDatabase struct { - // SyncAgentLinkedDatabaseProperties - Resource properties. - *SyncAgentLinkedDatabaseProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for SyncAgentLinkedDatabase. -func (sald SyncAgentLinkedDatabase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sald.SyncAgentLinkedDatabaseProperties != nil { - objectMap["properties"] = sald.SyncAgentLinkedDatabaseProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for SyncAgentLinkedDatabase struct. -func (sald *SyncAgentLinkedDatabase) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var syncAgentLinkedDatabaseProperties SyncAgentLinkedDatabaseProperties - err = json.Unmarshal(*v, &syncAgentLinkedDatabaseProperties) - if err != nil { - return err - } - sald.SyncAgentLinkedDatabaseProperties = &syncAgentLinkedDatabaseProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - sald.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - sald.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - sald.Type = &typeVar - } - } - } - - return nil -} - -// SyncAgentLinkedDatabaseListResult a list of sync agent linked databases. -type SyncAgentLinkedDatabaseListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]SyncAgentLinkedDatabase `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for SyncAgentLinkedDatabaseListResult. -func (saldlr SyncAgentLinkedDatabaseListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SyncAgentLinkedDatabaseListResultIterator provides access to a complete listing of -// SyncAgentLinkedDatabase values. -type SyncAgentLinkedDatabaseListResultIterator struct { - i int - page SyncAgentLinkedDatabaseListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *SyncAgentLinkedDatabaseListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncAgentLinkedDatabaseListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *SyncAgentLinkedDatabaseListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter SyncAgentLinkedDatabaseListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter SyncAgentLinkedDatabaseListResultIterator) Response() SyncAgentLinkedDatabaseListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter SyncAgentLinkedDatabaseListResultIterator) Value() SyncAgentLinkedDatabase { - if !iter.page.NotDone() { - return SyncAgentLinkedDatabase{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the SyncAgentLinkedDatabaseListResultIterator type. -func NewSyncAgentLinkedDatabaseListResultIterator(page SyncAgentLinkedDatabaseListResultPage) SyncAgentLinkedDatabaseListResultIterator { - return SyncAgentLinkedDatabaseListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (saldlr SyncAgentLinkedDatabaseListResult) IsEmpty() bool { - return saldlr.Value == nil || len(*saldlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (saldlr SyncAgentLinkedDatabaseListResult) hasNextLink() bool { - return saldlr.NextLink != nil && len(*saldlr.NextLink) != 0 -} - -// syncAgentLinkedDatabaseListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (saldlr SyncAgentLinkedDatabaseListResult) syncAgentLinkedDatabaseListResultPreparer(ctx context.Context) (*http.Request, error) { - if !saldlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(saldlr.NextLink))) -} - -// SyncAgentLinkedDatabaseListResultPage contains a page of SyncAgentLinkedDatabase values. -type SyncAgentLinkedDatabaseListResultPage struct { - fn func(context.Context, SyncAgentLinkedDatabaseListResult) (SyncAgentLinkedDatabaseListResult, error) - saldlr SyncAgentLinkedDatabaseListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *SyncAgentLinkedDatabaseListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncAgentLinkedDatabaseListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.saldlr) - if err != nil { - return err - } - page.saldlr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *SyncAgentLinkedDatabaseListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page SyncAgentLinkedDatabaseListResultPage) NotDone() bool { - return !page.saldlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page SyncAgentLinkedDatabaseListResultPage) Response() SyncAgentLinkedDatabaseListResult { - return page.saldlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page SyncAgentLinkedDatabaseListResultPage) Values() []SyncAgentLinkedDatabase { - if page.saldlr.IsEmpty() { - return nil - } - return *page.saldlr.Value -} - -// Creates a new instance of the SyncAgentLinkedDatabaseListResultPage type. -func NewSyncAgentLinkedDatabaseListResultPage(cur SyncAgentLinkedDatabaseListResult, getNextPage func(context.Context, SyncAgentLinkedDatabaseListResult) (SyncAgentLinkedDatabaseListResult, error)) SyncAgentLinkedDatabaseListResultPage { - return SyncAgentLinkedDatabaseListResultPage{ - fn: getNextPage, - saldlr: cur, - } -} - -// SyncAgentLinkedDatabaseProperties properties of an Azure SQL Database sync agent linked database. -type SyncAgentLinkedDatabaseProperties struct { - // DatabaseType - READ-ONLY; Type of the sync agent linked database. Possible values include: 'AzureSQLDatabase', 'SQLServerDatabase' - DatabaseType SyncMemberDbType `json:"databaseType,omitempty"` - // DatabaseID - READ-ONLY; Id of the sync agent linked database. - DatabaseID *string `json:"databaseId,omitempty"` - // Description - READ-ONLY; Description of the sync agent linked database. - Description *string `json:"description,omitempty"` - // ServerName - READ-ONLY; Server name of the sync agent linked database. - ServerName *string `json:"serverName,omitempty"` - // DatabaseName - READ-ONLY; Database name of the sync agent linked database. - DatabaseName *string `json:"databaseName,omitempty"` - // UserName - READ-ONLY; User name of the sync agent linked database. - UserName *string `json:"userName,omitempty"` -} - -// MarshalJSON is the custom marshaler for SyncAgentLinkedDatabaseProperties. -func (saldp SyncAgentLinkedDatabaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SyncAgentListResult a list of sync agents. -type SyncAgentListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]SyncAgent `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for SyncAgentListResult. -func (salr SyncAgentListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SyncAgentListResultIterator provides access to a complete listing of SyncAgent values. -type SyncAgentListResultIterator struct { - i int - page SyncAgentListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *SyncAgentListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncAgentListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *SyncAgentListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter SyncAgentListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter SyncAgentListResultIterator) Response() SyncAgentListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter SyncAgentListResultIterator) Value() SyncAgent { - if !iter.page.NotDone() { - return SyncAgent{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the SyncAgentListResultIterator type. -func NewSyncAgentListResultIterator(page SyncAgentListResultPage) SyncAgentListResultIterator { - return SyncAgentListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (salr SyncAgentListResult) IsEmpty() bool { - return salr.Value == nil || len(*salr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (salr SyncAgentListResult) hasNextLink() bool { - return salr.NextLink != nil && len(*salr.NextLink) != 0 -} - -// syncAgentListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (salr SyncAgentListResult) syncAgentListResultPreparer(ctx context.Context) (*http.Request, error) { - if !salr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(salr.NextLink))) -} - -// SyncAgentListResultPage contains a page of SyncAgent values. -type SyncAgentListResultPage struct { - fn func(context.Context, SyncAgentListResult) (SyncAgentListResult, error) - salr SyncAgentListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *SyncAgentListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncAgentListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.salr) - if err != nil { - return err - } - page.salr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *SyncAgentListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page SyncAgentListResultPage) NotDone() bool { - return !page.salr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page SyncAgentListResultPage) Response() SyncAgentListResult { - return page.salr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page SyncAgentListResultPage) Values() []SyncAgent { - if page.salr.IsEmpty() { - return nil - } - return *page.salr.Value -} - -// Creates a new instance of the SyncAgentListResultPage type. -func NewSyncAgentListResultPage(cur SyncAgentListResult, getNextPage func(context.Context, SyncAgentListResult) (SyncAgentListResult, error)) SyncAgentListResultPage { - return SyncAgentListResultPage{ - fn: getNextPage, - salr: cur, - } -} - -// SyncAgentProperties properties of an Azure SQL Database sync agent. -type SyncAgentProperties struct { - // Name - READ-ONLY; Name of the sync agent. - Name *string `json:"name,omitempty"` - // SyncDatabaseID - ARM resource id of the sync database in the sync agent. - SyncDatabaseID *string `json:"syncDatabaseId,omitempty"` - // LastAliveTime - READ-ONLY; Last alive time of the sync agent. - LastAliveTime *date.Time `json:"lastAliveTime,omitempty"` - // State - READ-ONLY; State of the sync agent. Possible values include: 'SyncAgentStateOnline', 'SyncAgentStateOffline', 'SyncAgentStateNeverConnected' - State SyncAgentState `json:"state,omitempty"` - // IsUpToDate - READ-ONLY; If the sync agent version is up to date. - IsUpToDate *bool `json:"isUpToDate,omitempty"` - // ExpiryTime - READ-ONLY; Expiration time of the sync agent version. - ExpiryTime *date.Time `json:"expiryTime,omitempty"` - // Version - READ-ONLY; Version of the sync agent. - Version *string `json:"version,omitempty"` -} - -// MarshalJSON is the custom marshaler for SyncAgentProperties. -func (sap SyncAgentProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sap.SyncDatabaseID != nil { - objectMap["syncDatabaseId"] = sap.SyncDatabaseID - } - return json.Marshal(objectMap) -} - -// SyncAgentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type SyncAgentsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(SyncAgentsClient) (SyncAgent, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *SyncAgentsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for SyncAgentsCreateOrUpdateFuture.Result. -func (future *SyncAgentsCreateOrUpdateFuture) result(client SyncAgentsClient) (sa SyncAgent, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncAgentsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - sa.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.SyncAgentsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if sa.Response.Response, err = future.GetResult(sender); err == nil && sa.Response.Response.StatusCode != http.StatusNoContent { - sa, err = client.CreateOrUpdateResponder(sa.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncAgentsCreateOrUpdateFuture", "Result", sa.Response.Response, "Failure responding to request") - } - } - return -} - -// SyncAgentsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type SyncAgentsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(SyncAgentsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *SyncAgentsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for SyncAgentsDeleteFuture.Result. -func (future *SyncAgentsDeleteFuture) result(client SyncAgentsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncAgentsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.SyncAgentsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// SyncDatabaseIDListResult a list of sync database ID properties. -type SyncDatabaseIDListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]SyncDatabaseIDProperties `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for SyncDatabaseIDListResult. -func (sdilr SyncDatabaseIDListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SyncDatabaseIDListResultIterator provides access to a complete listing of SyncDatabaseIDProperties -// values. -type SyncDatabaseIDListResultIterator struct { - i int - page SyncDatabaseIDListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *SyncDatabaseIDListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncDatabaseIDListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *SyncDatabaseIDListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter SyncDatabaseIDListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter SyncDatabaseIDListResultIterator) Response() SyncDatabaseIDListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter SyncDatabaseIDListResultIterator) Value() SyncDatabaseIDProperties { - if !iter.page.NotDone() { - return SyncDatabaseIDProperties{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the SyncDatabaseIDListResultIterator type. -func NewSyncDatabaseIDListResultIterator(page SyncDatabaseIDListResultPage) SyncDatabaseIDListResultIterator { - return SyncDatabaseIDListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (sdilr SyncDatabaseIDListResult) IsEmpty() bool { - return sdilr.Value == nil || len(*sdilr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (sdilr SyncDatabaseIDListResult) hasNextLink() bool { - return sdilr.NextLink != nil && len(*sdilr.NextLink) != 0 -} - -// syncDatabaseIDListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (sdilr SyncDatabaseIDListResult) syncDatabaseIDListResultPreparer(ctx context.Context) (*http.Request, error) { - if !sdilr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(sdilr.NextLink))) -} - -// SyncDatabaseIDListResultPage contains a page of SyncDatabaseIDProperties values. -type SyncDatabaseIDListResultPage struct { - fn func(context.Context, SyncDatabaseIDListResult) (SyncDatabaseIDListResult, error) - sdilr SyncDatabaseIDListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *SyncDatabaseIDListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncDatabaseIDListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.sdilr) - if err != nil { - return err - } - page.sdilr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *SyncDatabaseIDListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page SyncDatabaseIDListResultPage) NotDone() bool { - return !page.sdilr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page SyncDatabaseIDListResultPage) Response() SyncDatabaseIDListResult { - return page.sdilr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page SyncDatabaseIDListResultPage) Values() []SyncDatabaseIDProperties { - if page.sdilr.IsEmpty() { - return nil - } - return *page.sdilr.Value -} - -// Creates a new instance of the SyncDatabaseIDListResultPage type. -func NewSyncDatabaseIDListResultPage(cur SyncDatabaseIDListResult, getNextPage func(context.Context, SyncDatabaseIDListResult) (SyncDatabaseIDListResult, error)) SyncDatabaseIDListResultPage { - return SyncDatabaseIDListResultPage{ - fn: getNextPage, - sdilr: cur, - } -} - -// SyncDatabaseIDProperties properties of the sync database id. -type SyncDatabaseIDProperties struct { - // ID - READ-ONLY; ARM resource id of sync database. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for SyncDatabaseIDProperties. -func (sdip SyncDatabaseIDProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SyncFullSchemaProperties properties of the database full schema. -type SyncFullSchemaProperties struct { - // Tables - READ-ONLY; List of tables in the database full schema. - Tables *[]SyncFullSchemaTable `json:"tables,omitempty"` - // LastUpdateTime - READ-ONLY; Last update time of the database schema. - LastUpdateTime *date.Time `json:"lastUpdateTime,omitempty"` -} - -// MarshalJSON is the custom marshaler for SyncFullSchemaProperties. -func (sfsp SyncFullSchemaProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SyncFullSchemaPropertiesListResult a list of sync schema properties. -type SyncFullSchemaPropertiesListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]SyncFullSchemaProperties `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for SyncFullSchemaPropertiesListResult. -func (sfsplr SyncFullSchemaPropertiesListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SyncFullSchemaPropertiesListResultIterator provides access to a complete listing of -// SyncFullSchemaProperties values. -type SyncFullSchemaPropertiesListResultIterator struct { - i int - page SyncFullSchemaPropertiesListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *SyncFullSchemaPropertiesListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncFullSchemaPropertiesListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *SyncFullSchemaPropertiesListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter SyncFullSchemaPropertiesListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter SyncFullSchemaPropertiesListResultIterator) Response() SyncFullSchemaPropertiesListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter SyncFullSchemaPropertiesListResultIterator) Value() SyncFullSchemaProperties { - if !iter.page.NotDone() { - return SyncFullSchemaProperties{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the SyncFullSchemaPropertiesListResultIterator type. -func NewSyncFullSchemaPropertiesListResultIterator(page SyncFullSchemaPropertiesListResultPage) SyncFullSchemaPropertiesListResultIterator { - return SyncFullSchemaPropertiesListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (sfsplr SyncFullSchemaPropertiesListResult) IsEmpty() bool { - return sfsplr.Value == nil || len(*sfsplr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (sfsplr SyncFullSchemaPropertiesListResult) hasNextLink() bool { - return sfsplr.NextLink != nil && len(*sfsplr.NextLink) != 0 -} - -// syncFullSchemaPropertiesListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (sfsplr SyncFullSchemaPropertiesListResult) syncFullSchemaPropertiesListResultPreparer(ctx context.Context) (*http.Request, error) { - if !sfsplr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(sfsplr.NextLink))) -} - -// SyncFullSchemaPropertiesListResultPage contains a page of SyncFullSchemaProperties values. -type SyncFullSchemaPropertiesListResultPage struct { - fn func(context.Context, SyncFullSchemaPropertiesListResult) (SyncFullSchemaPropertiesListResult, error) - sfsplr SyncFullSchemaPropertiesListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *SyncFullSchemaPropertiesListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncFullSchemaPropertiesListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.sfsplr) - if err != nil { - return err - } - page.sfsplr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *SyncFullSchemaPropertiesListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page SyncFullSchemaPropertiesListResultPage) NotDone() bool { - return !page.sfsplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page SyncFullSchemaPropertiesListResultPage) Response() SyncFullSchemaPropertiesListResult { - return page.sfsplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page SyncFullSchemaPropertiesListResultPage) Values() []SyncFullSchemaProperties { - if page.sfsplr.IsEmpty() { - return nil - } - return *page.sfsplr.Value -} - -// Creates a new instance of the SyncFullSchemaPropertiesListResultPage type. -func NewSyncFullSchemaPropertiesListResultPage(cur SyncFullSchemaPropertiesListResult, getNextPage func(context.Context, SyncFullSchemaPropertiesListResult) (SyncFullSchemaPropertiesListResult, error)) SyncFullSchemaPropertiesListResultPage { - return SyncFullSchemaPropertiesListResultPage{ - fn: getNextPage, - sfsplr: cur, - } -} - -// SyncFullSchemaTable properties of the table in the database full schema. -type SyncFullSchemaTable struct { - // Columns - READ-ONLY; List of columns in the table of database full schema. - Columns *[]SyncFullSchemaTableColumn `json:"columns,omitempty"` - // ErrorID - READ-ONLY; Error id of the table. - ErrorID *string `json:"errorId,omitempty"` - // HasError - READ-ONLY; If there is error in the table. - HasError *bool `json:"hasError,omitempty"` - // Name - READ-ONLY; Name of the table. - Name *string `json:"name,omitempty"` - // QuotedName - READ-ONLY; Quoted name of the table. - QuotedName *string `json:"quotedName,omitempty"` -} - -// MarshalJSON is the custom marshaler for SyncFullSchemaTable. -func (sfst SyncFullSchemaTable) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SyncFullSchemaTableColumn properties of the column in the table of database full schema. -type SyncFullSchemaTableColumn struct { - // DataSize - READ-ONLY; Data size of the column. - DataSize *string `json:"dataSize,omitempty"` - // DataType - READ-ONLY; Data type of the column. - DataType *string `json:"dataType,omitempty"` - // ErrorID - READ-ONLY; Error id of the column. - ErrorID *string `json:"errorId,omitempty"` - // HasError - READ-ONLY; If there is error in the table. - HasError *bool `json:"hasError,omitempty"` - // IsPrimaryKey - READ-ONLY; If it is the primary key of the table. - IsPrimaryKey *bool `json:"isPrimaryKey,omitempty"` - // Name - READ-ONLY; Name of the column. - Name *string `json:"name,omitempty"` - // QuotedName - READ-ONLY; Quoted name of the column. - QuotedName *string `json:"quotedName,omitempty"` -} - -// MarshalJSON is the custom marshaler for SyncFullSchemaTableColumn. -func (sfstc SyncFullSchemaTableColumn) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SyncGroup an Azure SQL Database sync group. -type SyncGroup struct { - autorest.Response `json:"-"` - // SyncGroupProperties - Resource properties. - *SyncGroupProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for SyncGroup. -func (sg SyncGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sg.SyncGroupProperties != nil { - objectMap["properties"] = sg.SyncGroupProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for SyncGroup struct. -func (sg *SyncGroup) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var syncGroupProperties SyncGroupProperties - err = json.Unmarshal(*v, &syncGroupProperties) - if err != nil { - return err - } - sg.SyncGroupProperties = &syncGroupProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - sg.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - sg.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - sg.Type = &typeVar - } - } - } - - return nil -} - -// SyncGroupListResult a list of sync groups. -type SyncGroupListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]SyncGroup `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for SyncGroupListResult. -func (sglr SyncGroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SyncGroupListResultIterator provides access to a complete listing of SyncGroup values. -type SyncGroupListResultIterator struct { - i int - page SyncGroupListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *SyncGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncGroupListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *SyncGroupListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter SyncGroupListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter SyncGroupListResultIterator) Response() SyncGroupListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter SyncGroupListResultIterator) Value() SyncGroup { - if !iter.page.NotDone() { - return SyncGroup{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the SyncGroupListResultIterator type. -func NewSyncGroupListResultIterator(page SyncGroupListResultPage) SyncGroupListResultIterator { - return SyncGroupListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (sglr SyncGroupListResult) IsEmpty() bool { - return sglr.Value == nil || len(*sglr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (sglr SyncGroupListResult) hasNextLink() bool { - return sglr.NextLink != nil && len(*sglr.NextLink) != 0 -} - -// syncGroupListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (sglr SyncGroupListResult) syncGroupListResultPreparer(ctx context.Context) (*http.Request, error) { - if !sglr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(sglr.NextLink))) -} - -// SyncGroupListResultPage contains a page of SyncGroup values. -type SyncGroupListResultPage struct { - fn func(context.Context, SyncGroupListResult) (SyncGroupListResult, error) - sglr SyncGroupListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *SyncGroupListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncGroupListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.sglr) - if err != nil { - return err - } - page.sglr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *SyncGroupListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page SyncGroupListResultPage) NotDone() bool { - return !page.sglr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page SyncGroupListResultPage) Response() SyncGroupListResult { - return page.sglr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page SyncGroupListResultPage) Values() []SyncGroup { - if page.sglr.IsEmpty() { - return nil - } - return *page.sglr.Value -} - -// Creates a new instance of the SyncGroupListResultPage type. -func NewSyncGroupListResultPage(cur SyncGroupListResult, getNextPage func(context.Context, SyncGroupListResult) (SyncGroupListResult, error)) SyncGroupListResultPage { - return SyncGroupListResultPage{ - fn: getNextPage, - sglr: cur, - } -} - -// SyncGroupLogListResult a list of sync group log properties. -type SyncGroupLogListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]SyncGroupLogProperties `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for SyncGroupLogListResult. -func (sgllr SyncGroupLogListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SyncGroupLogListResultIterator provides access to a complete listing of SyncGroupLogProperties values. -type SyncGroupLogListResultIterator struct { - i int - page SyncGroupLogListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *SyncGroupLogListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncGroupLogListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *SyncGroupLogListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter SyncGroupLogListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter SyncGroupLogListResultIterator) Response() SyncGroupLogListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter SyncGroupLogListResultIterator) Value() SyncGroupLogProperties { - if !iter.page.NotDone() { - return SyncGroupLogProperties{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the SyncGroupLogListResultIterator type. -func NewSyncGroupLogListResultIterator(page SyncGroupLogListResultPage) SyncGroupLogListResultIterator { - return SyncGroupLogListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (sgllr SyncGroupLogListResult) IsEmpty() bool { - return sgllr.Value == nil || len(*sgllr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (sgllr SyncGroupLogListResult) hasNextLink() bool { - return sgllr.NextLink != nil && len(*sgllr.NextLink) != 0 -} - -// syncGroupLogListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (sgllr SyncGroupLogListResult) syncGroupLogListResultPreparer(ctx context.Context) (*http.Request, error) { - if !sgllr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(sgllr.NextLink))) -} - -// SyncGroupLogListResultPage contains a page of SyncGroupLogProperties values. -type SyncGroupLogListResultPage struct { - fn func(context.Context, SyncGroupLogListResult) (SyncGroupLogListResult, error) - sgllr SyncGroupLogListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *SyncGroupLogListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncGroupLogListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.sgllr) - if err != nil { - return err - } - page.sgllr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *SyncGroupLogListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page SyncGroupLogListResultPage) NotDone() bool { - return !page.sgllr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page SyncGroupLogListResultPage) Response() SyncGroupLogListResult { - return page.sgllr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page SyncGroupLogListResultPage) Values() []SyncGroupLogProperties { - if page.sgllr.IsEmpty() { - return nil - } - return *page.sgllr.Value -} - -// Creates a new instance of the SyncGroupLogListResultPage type. -func NewSyncGroupLogListResultPage(cur SyncGroupLogListResult, getNextPage func(context.Context, SyncGroupLogListResult) (SyncGroupLogListResult, error)) SyncGroupLogListResultPage { - return SyncGroupLogListResultPage{ - fn: getNextPage, - sgllr: cur, - } -} - -// SyncGroupLogProperties properties of an Azure SQL Database sync group log. -type SyncGroupLogProperties struct { - // Timestamp - READ-ONLY; Timestamp of the sync group log. - Timestamp *date.Time `json:"timestamp,omitempty"` - // Type - READ-ONLY; Type of the sync group log. Possible values include: 'SyncGroupLogTypeAll', 'SyncGroupLogTypeError', 'SyncGroupLogTypeWarning', 'SyncGroupLogTypeSuccess' - Type SyncGroupLogType `json:"type,omitempty"` - // Source - READ-ONLY; Source of the sync group log. - Source *string `json:"source,omitempty"` - // Details - READ-ONLY; Details of the sync group log. - Details *string `json:"details,omitempty"` - // TracingID - READ-ONLY; TracingId of the sync group log. - TracingID *uuid.UUID `json:"tracingId,omitempty"` - // OperationStatus - READ-ONLY; OperationStatus of the sync group log. - OperationStatus *string `json:"operationStatus,omitempty"` -} - -// MarshalJSON is the custom marshaler for SyncGroupLogProperties. -func (sglp SyncGroupLogProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SyncGroupProperties properties of a sync group. -type SyncGroupProperties struct { - // Interval - Sync interval of the sync group. - Interval *int32 `json:"interval,omitempty"` - // LastSyncTime - READ-ONLY; Last sync time of the sync group. - LastSyncTime *date.Time `json:"lastSyncTime,omitempty"` - // ConflictResolutionPolicy - Conflict resolution policy of the sync group. Possible values include: 'HubWin', 'MemberWin' - ConflictResolutionPolicy SyncConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"` - // SyncDatabaseID - ARM resource id of the sync database in the sync group. - SyncDatabaseID *string `json:"syncDatabaseId,omitempty"` - // HubDatabaseUserName - User name for the sync group hub database credential. - HubDatabaseUserName *string `json:"hubDatabaseUserName,omitempty"` - // HubDatabasePassword - Password for the sync group hub database credential. - HubDatabasePassword *string `json:"hubDatabasePassword,omitempty"` - // SyncState - READ-ONLY; Sync state of the sync group. Possible values include: 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' - SyncState SyncGroupState `json:"syncState,omitempty"` - // Schema - Sync schema of the sync group. - Schema *SyncGroupSchema `json:"schema,omitempty"` -} - -// MarshalJSON is the custom marshaler for SyncGroupProperties. -func (sgp SyncGroupProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sgp.Interval != nil { - objectMap["interval"] = sgp.Interval - } - if sgp.ConflictResolutionPolicy != "" { - objectMap["conflictResolutionPolicy"] = sgp.ConflictResolutionPolicy - } - if sgp.SyncDatabaseID != nil { - objectMap["syncDatabaseId"] = sgp.SyncDatabaseID - } - if sgp.HubDatabaseUserName != nil { - objectMap["hubDatabaseUserName"] = sgp.HubDatabaseUserName - } - if sgp.HubDatabasePassword != nil { - objectMap["hubDatabasePassword"] = sgp.HubDatabasePassword - } - if sgp.Schema != nil { - objectMap["schema"] = sgp.Schema - } - return json.Marshal(objectMap) -} - -// SyncGroupSchema properties of sync group schema. -type SyncGroupSchema struct { - // Tables - List of tables in sync group schema. - Tables *[]SyncGroupSchemaTable `json:"tables,omitempty"` - // MasterSyncMemberName - Name of master sync member where the schema is from. - MasterSyncMemberName *string `json:"masterSyncMemberName,omitempty"` -} - -// SyncGroupSchemaTable properties of table in sync group schema. -type SyncGroupSchemaTable struct { - // Columns - List of columns in sync group schema. - Columns *[]SyncGroupSchemaTableColumn `json:"columns,omitempty"` - // QuotedName - Quoted name of sync group schema table. - QuotedName *string `json:"quotedName,omitempty"` -} - -// SyncGroupSchemaTableColumn properties of column in sync group table. -type SyncGroupSchemaTableColumn struct { - // QuotedName - Quoted name of sync group table column. - QuotedName *string `json:"quotedName,omitempty"` - // DataSize - Data size of the column. - DataSize *string `json:"dataSize,omitempty"` - // DataType - Data type of the column. - DataType *string `json:"dataType,omitempty"` -} - -// SyncGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type SyncGroupsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(SyncGroupsClient) (SyncGroup, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *SyncGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for SyncGroupsCreateOrUpdateFuture.Result. -func (future *SyncGroupsCreateOrUpdateFuture) result(client SyncGroupsClient) (sg SyncGroup, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - sg.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.SyncGroupsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent { - sg, err = client.CreateOrUpdateResponder(sg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request") - } - } - return -} - -// SyncGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type SyncGroupsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(SyncGroupsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *SyncGroupsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for SyncGroupsDeleteFuture.Result. -func (future *SyncGroupsDeleteFuture) result(client SyncGroupsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.SyncGroupsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// SyncGroupsRefreshHubSchemaFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type SyncGroupsRefreshHubSchemaFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(SyncGroupsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *SyncGroupsRefreshHubSchemaFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for SyncGroupsRefreshHubSchemaFuture.Result. -func (future *SyncGroupsRefreshHubSchemaFuture) result(client SyncGroupsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsRefreshHubSchemaFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.SyncGroupsRefreshHubSchemaFuture") - return - } - ar.Response = future.Response() - return -} - -// SyncGroupsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type SyncGroupsUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(SyncGroupsClient) (SyncGroup, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *SyncGroupsUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for SyncGroupsUpdateFuture.Result. -func (future *SyncGroupsUpdateFuture) result(client SyncGroupsClient) (sg SyncGroup, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - sg.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.SyncGroupsUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent { - sg, err = client.UpdateResponder(sg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsUpdateFuture", "Result", sg.Response.Response, "Failure responding to request") - } - } - return -} - -// SyncMember an Azure SQL Database sync member. -type SyncMember struct { - autorest.Response `json:"-"` - // SyncMemberProperties - Resource properties. - *SyncMemberProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for SyncMember. -func (sm SyncMember) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sm.SyncMemberProperties != nil { - objectMap["properties"] = sm.SyncMemberProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for SyncMember struct. -func (sm *SyncMember) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var syncMemberProperties SyncMemberProperties - err = json.Unmarshal(*v, &syncMemberProperties) - if err != nil { - return err - } - sm.SyncMemberProperties = &syncMemberProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - sm.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - sm.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - sm.Type = &typeVar - } - } - } - - return nil -} - -// SyncMemberListResult a list of Azure SQL Database sync members. -type SyncMemberListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]SyncMember `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for SyncMemberListResult. -func (smlr SyncMemberListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SyncMemberListResultIterator provides access to a complete listing of SyncMember values. -type SyncMemberListResultIterator struct { - i int - page SyncMemberListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *SyncMemberListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncMemberListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *SyncMemberListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter SyncMemberListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter SyncMemberListResultIterator) Response() SyncMemberListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter SyncMemberListResultIterator) Value() SyncMember { - if !iter.page.NotDone() { - return SyncMember{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the SyncMemberListResultIterator type. -func NewSyncMemberListResultIterator(page SyncMemberListResultPage) SyncMemberListResultIterator { - return SyncMemberListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (smlr SyncMemberListResult) IsEmpty() bool { - return smlr.Value == nil || len(*smlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (smlr SyncMemberListResult) hasNextLink() bool { - return smlr.NextLink != nil && len(*smlr.NextLink) != 0 -} - -// syncMemberListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (smlr SyncMemberListResult) syncMemberListResultPreparer(ctx context.Context) (*http.Request, error) { - if !smlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(smlr.NextLink))) -} - -// SyncMemberListResultPage contains a page of SyncMember values. -type SyncMemberListResultPage struct { - fn func(context.Context, SyncMemberListResult) (SyncMemberListResult, error) - smlr SyncMemberListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *SyncMemberListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncMemberListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.smlr) - if err != nil { - return err - } - page.smlr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *SyncMemberListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page SyncMemberListResultPage) NotDone() bool { - return !page.smlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page SyncMemberListResultPage) Response() SyncMemberListResult { - return page.smlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page SyncMemberListResultPage) Values() []SyncMember { - if page.smlr.IsEmpty() { - return nil - } - return *page.smlr.Value -} - -// Creates a new instance of the SyncMemberListResultPage type. -func NewSyncMemberListResultPage(cur SyncMemberListResult, getNextPage func(context.Context, SyncMemberListResult) (SyncMemberListResult, error)) SyncMemberListResultPage { - return SyncMemberListResultPage{ - fn: getNextPage, - smlr: cur, - } -} - -// SyncMemberProperties properties of a sync member. -type SyncMemberProperties struct { - // DatabaseType - Database type of the sync member. Possible values include: 'AzureSQLDatabase', 'SQLServerDatabase' - DatabaseType SyncMemberDbType `json:"databaseType,omitempty"` - // SyncAgentID - ARM resource id of the sync agent in the sync member. - SyncAgentID *string `json:"syncAgentId,omitempty"` - // SQLServerDatabaseID - SQL Server database id of the sync member. - SQLServerDatabaseID *uuid.UUID `json:"sqlServerDatabaseId,omitempty"` - // ServerName - Server name of the member database in the sync member - ServerName *string `json:"serverName,omitempty"` - // DatabaseName - Database name of the member database in the sync member. - DatabaseName *string `json:"databaseName,omitempty"` - // UserName - User name of the member database in the sync member. - UserName *string `json:"userName,omitempty"` - // Password - Password of the member database in the sync member. - Password *string `json:"password,omitempty"` - // SyncDirection - Sync direction of the sync member. Possible values include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' - SyncDirection SyncDirection `json:"syncDirection,omitempty"` - // SyncState - READ-ONLY; Sync state of the sync member. Possible values include: 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', 'DisabledTombstoneCleanup', 'DisabledBackupRestore', 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', 'ReprovisionFailed', 'UnReprovisioned' - SyncState SyncMemberState `json:"syncState,omitempty"` -} - -// MarshalJSON is the custom marshaler for SyncMemberProperties. -func (smp SyncMemberProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if smp.DatabaseType != "" { - objectMap["databaseType"] = smp.DatabaseType - } - if smp.SyncAgentID != nil { - objectMap["syncAgentId"] = smp.SyncAgentID - } - if smp.SQLServerDatabaseID != nil { - objectMap["sqlServerDatabaseId"] = smp.SQLServerDatabaseID - } - if smp.ServerName != nil { - objectMap["serverName"] = smp.ServerName - } - if smp.DatabaseName != nil { - objectMap["databaseName"] = smp.DatabaseName - } - if smp.UserName != nil { - objectMap["userName"] = smp.UserName - } - if smp.Password != nil { - objectMap["password"] = smp.Password - } - if smp.SyncDirection != "" { - objectMap["syncDirection"] = smp.SyncDirection - } - return json.Marshal(objectMap) -} - -// SyncMembersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type SyncMembersCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(SyncMembersClient) (SyncMember, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *SyncMembersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for SyncMembersCreateOrUpdateFuture.Result. -func (future *SyncMembersCreateOrUpdateFuture) result(client SyncMembersClient) (sm SyncMember, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncMembersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - sm.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.SyncMembersCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if sm.Response.Response, err = future.GetResult(sender); err == nil && sm.Response.Response.StatusCode != http.StatusNoContent { - sm, err = client.CreateOrUpdateResponder(sm.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncMembersCreateOrUpdateFuture", "Result", sm.Response.Response, "Failure responding to request") - } - } - return -} - -// SyncMembersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type SyncMembersDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(SyncMembersClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *SyncMembersDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for SyncMembersDeleteFuture.Result. -func (future *SyncMembersDeleteFuture) result(client SyncMembersClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncMembersDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.SyncMembersDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// SyncMembersRefreshMemberSchemaFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type SyncMembersRefreshMemberSchemaFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(SyncMembersClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *SyncMembersRefreshMemberSchemaFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for SyncMembersRefreshMemberSchemaFuture.Result. -func (future *SyncMembersRefreshMemberSchemaFuture) result(client SyncMembersClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncMembersRefreshMemberSchemaFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.SyncMembersRefreshMemberSchemaFuture") - return - } - ar.Response = future.Response() - return -} - -// SyncMembersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type SyncMembersUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(SyncMembersClient) (SyncMember, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *SyncMembersUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for SyncMembersUpdateFuture.Result. -func (future *SyncMembersUpdateFuture) result(client SyncMembersClient) (sm SyncMember, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncMembersUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - sm.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.SyncMembersUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if sm.Response.Response, err = future.GetResult(sender); err == nil && sm.Response.Response.StatusCode != http.StatusNoContent { - sm, err = client.UpdateResponder(sm.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncMembersUpdateFuture", "Result", sm.Response.Response, "Failure responding to request") - } - } - return -} - -// TrackedResource ARM tracked top level resource. -type TrackedResource struct { - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for TrackedResource. -func (tr TrackedResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if tr.Location != nil { - objectMap["location"] = tr.Location - } - if tr.Tags != nil { - objectMap["tags"] = tr.Tags - } - return json.Marshal(objectMap) -} - -// TransparentDataEncryption represents a database transparent data encryption configuration. -type TransparentDataEncryption struct { - autorest.Response `json:"-"` - // Location - READ-ONLY; Resource location. - Location *string `json:"location,omitempty"` - // TransparentDataEncryptionProperties - Represents the properties of the resource. - *TransparentDataEncryptionProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for TransparentDataEncryption. -func (tde TransparentDataEncryption) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if tde.TransparentDataEncryptionProperties != nil { - objectMap["properties"] = tde.TransparentDataEncryptionProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for TransparentDataEncryption struct. -func (tde *TransparentDataEncryption) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - tde.Location = &location - } - case "properties": - if v != nil { - var transparentDataEncryptionProperties TransparentDataEncryptionProperties - err = json.Unmarshal(*v, &transparentDataEncryptionProperties) - if err != nil { - return err - } - tde.TransparentDataEncryptionProperties = &transparentDataEncryptionProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - tde.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - tde.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - tde.Type = &typeVar - } - } - } - - return nil -} - -// TransparentDataEncryptionActivity represents a database transparent data encryption Scan. -type TransparentDataEncryptionActivity struct { - // Location - READ-ONLY; Resource location. - Location *string `json:"location,omitempty"` - // TransparentDataEncryptionActivityProperties - Represents the properties of the resource. - *TransparentDataEncryptionActivityProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for TransparentDataEncryptionActivity. -func (tdea TransparentDataEncryptionActivity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if tdea.TransparentDataEncryptionActivityProperties != nil { - objectMap["properties"] = tdea.TransparentDataEncryptionActivityProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for TransparentDataEncryptionActivity struct. -func (tdea *TransparentDataEncryptionActivity) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - tdea.Location = &location - } - case "properties": - if v != nil { - var transparentDataEncryptionActivityProperties TransparentDataEncryptionActivityProperties - err = json.Unmarshal(*v, &transparentDataEncryptionActivityProperties) - if err != nil { - return err - } - tdea.TransparentDataEncryptionActivityProperties = &transparentDataEncryptionActivityProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - tdea.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - tdea.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - tdea.Type = &typeVar - } - } - } - - return nil -} - -// TransparentDataEncryptionActivityListResult represents the response to a list database transparent data -// encryption activity request. -type TransparentDataEncryptionActivityListResult struct { - autorest.Response `json:"-"` - // Value - The list of database transparent data encryption activities. - Value *[]TransparentDataEncryptionActivity `json:"value,omitempty"` -} - -// TransparentDataEncryptionActivityProperties represents the properties of a database transparent data -// encryption Scan. -type TransparentDataEncryptionActivityProperties struct { - // Status - READ-ONLY; The status of the database. Possible values include: 'Encrypting', 'Decrypting' - Status TransparentDataEncryptionActivityStatus `json:"status,omitempty"` - // PercentComplete - READ-ONLY; The percent complete of the transparent data encryption scan for a database. - PercentComplete *float64 `json:"percentComplete,omitempty"` -} - -// MarshalJSON is the custom marshaler for TransparentDataEncryptionActivityProperties. -func (tdeap TransparentDataEncryptionActivityProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// TransparentDataEncryptionProperties represents the properties of a database transparent data encryption. -type TransparentDataEncryptionProperties struct { - // Status - The status of the database transparent data encryption. Possible values include: 'TransparentDataEncryptionStatusEnabled', 'TransparentDataEncryptionStatusDisabled' - Status TransparentDataEncryptionStatus `json:"status,omitempty"` -} - -// UnlinkParameters represents the parameters for Unlink Replication Link request. -type UnlinkParameters struct { - // ForcedTermination - Determines whether link will be terminated in a forced or a friendly way. - ForcedTermination *bool `json:"forcedTermination,omitempty"` -} - -// VirtualCluster an Azure SQL virtual cluster. -type VirtualCluster struct { - autorest.Response `json:"-"` - // VirtualClusterProperties - Resource properties. - *VirtualClusterProperties `json:"properties,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualCluster. -func (vc VirtualCluster) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vc.VirtualClusterProperties != nil { - objectMap["properties"] = vc.VirtualClusterProperties - } - if vc.Location != nil { - objectMap["location"] = vc.Location - } - if vc.Tags != nil { - objectMap["tags"] = vc.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualCluster struct. -func (vc *VirtualCluster) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var virtualClusterProperties VirtualClusterProperties - err = json.Unmarshal(*v, &virtualClusterProperties) - if err != nil { - return err - } - vc.VirtualClusterProperties = &virtualClusterProperties - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - vc.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - vc.Tags = tags - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vc.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vc.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vc.Type = &typeVar - } - } - } - - return nil -} - -// VirtualClusterListResult a list of virtual clusters. -type VirtualClusterListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]VirtualCluster `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualClusterListResult. -func (vclr VirtualClusterListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// VirtualClusterListResultIterator provides access to a complete listing of VirtualCluster values. -type VirtualClusterListResultIterator struct { - i int - page VirtualClusterListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *VirtualClusterListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualClusterListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *VirtualClusterListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter VirtualClusterListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter VirtualClusterListResultIterator) Response() VirtualClusterListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter VirtualClusterListResultIterator) Value() VirtualCluster { - if !iter.page.NotDone() { - return VirtualCluster{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the VirtualClusterListResultIterator type. -func NewVirtualClusterListResultIterator(page VirtualClusterListResultPage) VirtualClusterListResultIterator { - return VirtualClusterListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (vclr VirtualClusterListResult) IsEmpty() bool { - return vclr.Value == nil || len(*vclr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (vclr VirtualClusterListResult) hasNextLink() bool { - return vclr.NextLink != nil && len(*vclr.NextLink) != 0 -} - -// virtualClusterListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (vclr VirtualClusterListResult) virtualClusterListResultPreparer(ctx context.Context) (*http.Request, error) { - if !vclr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(vclr.NextLink))) -} - -// VirtualClusterListResultPage contains a page of VirtualCluster values. -type VirtualClusterListResultPage struct { - fn func(context.Context, VirtualClusterListResult) (VirtualClusterListResult, error) - vclr VirtualClusterListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *VirtualClusterListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualClusterListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.vclr) - if err != nil { - return err - } - page.vclr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *VirtualClusterListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page VirtualClusterListResultPage) NotDone() bool { - return !page.vclr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page VirtualClusterListResultPage) Response() VirtualClusterListResult { - return page.vclr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page VirtualClusterListResultPage) Values() []VirtualCluster { - if page.vclr.IsEmpty() { - return nil - } - return *page.vclr.Value -} - -// Creates a new instance of the VirtualClusterListResultPage type. -func NewVirtualClusterListResultPage(cur VirtualClusterListResult, getNextPage func(context.Context, VirtualClusterListResult) (VirtualClusterListResult, error)) VirtualClusterListResultPage { - return VirtualClusterListResultPage{ - fn: getNextPage, - vclr: cur, - } -} - -// VirtualClusterProperties the properties of a virtual cluster. -type VirtualClusterProperties struct { - // SubnetID - READ-ONLY; Subnet resource ID for the virtual cluster. - SubnetID *string `json:"subnetId,omitempty"` - // Family - If the service has different generations of hardware, for the same SKU, then that can be captured here. - Family *string `json:"family,omitempty"` - // ChildResources - READ-ONLY; List of resources in this virtual cluster. - ChildResources *[]string `json:"childResources,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualClusterProperties. -func (vcp VirtualClusterProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vcp.Family != nil { - objectMap["family"] = vcp.Family - } - return json.Marshal(objectMap) -} - -// VirtualClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VirtualClustersDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualClustersClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualClustersDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualClustersDeleteFuture.Result. -func (future *VirtualClustersDeleteFuture) result(client VirtualClustersClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualClustersDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.VirtualClustersDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualClustersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VirtualClustersUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualClustersClient) (VirtualCluster, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualClustersUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualClustersUpdateFuture.Result. -func (future *VirtualClustersUpdateFuture) result(client VirtualClustersClient) (vc VirtualCluster, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualClustersUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vc.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.VirtualClustersUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent { - vc, err = client.UpdateResponder(vc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualClustersUpdateFuture", "Result", vc.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualClusterUpdate an update request for an Azure SQL Database virtual cluster. -type VirtualClusterUpdate struct { - // VirtualClusterProperties - Resource properties. - *VirtualClusterProperties `json:"properties,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for VirtualClusterUpdate. -func (vcu VirtualClusterUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vcu.VirtualClusterProperties != nil { - objectMap["properties"] = vcu.VirtualClusterProperties - } - if vcu.Tags != nil { - objectMap["tags"] = vcu.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualClusterUpdate struct. -func (vcu *VirtualClusterUpdate) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var virtualClusterProperties VirtualClusterProperties - err = json.Unmarshal(*v, &virtualClusterProperties) - if err != nil { - return err - } - vcu.VirtualClusterProperties = &virtualClusterProperties - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - vcu.Tags = tags - } - } - } - - return nil -} - -// VirtualNetworkRule a virtual network rule. -type VirtualNetworkRule struct { - autorest.Response `json:"-"` - // VirtualNetworkRuleProperties - Resource properties. - *VirtualNetworkRuleProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualNetworkRule. -func (vnr VirtualNetworkRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vnr.VirtualNetworkRuleProperties != nil { - objectMap["properties"] = vnr.VirtualNetworkRuleProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualNetworkRule struct. -func (vnr *VirtualNetworkRule) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var virtualNetworkRuleProperties VirtualNetworkRuleProperties - err = json.Unmarshal(*v, &virtualNetworkRuleProperties) - if err != nil { - return err - } - vnr.VirtualNetworkRuleProperties = &virtualNetworkRuleProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vnr.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vnr.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vnr.Type = &typeVar - } - } - } - - return nil -} - -// VirtualNetworkRuleListResult a list of virtual network rules. -type VirtualNetworkRuleListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]VirtualNetworkRule `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualNetworkRuleListResult. -func (vnrlr VirtualNetworkRuleListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// VirtualNetworkRuleListResultIterator provides access to a complete listing of VirtualNetworkRule values. -type VirtualNetworkRuleListResultIterator struct { - i int - page VirtualNetworkRuleListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *VirtualNetworkRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRuleListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *VirtualNetworkRuleListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter VirtualNetworkRuleListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter VirtualNetworkRuleListResultIterator) Response() VirtualNetworkRuleListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter VirtualNetworkRuleListResultIterator) Value() VirtualNetworkRule { - if !iter.page.NotDone() { - return VirtualNetworkRule{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the VirtualNetworkRuleListResultIterator type. -func NewVirtualNetworkRuleListResultIterator(page VirtualNetworkRuleListResultPage) VirtualNetworkRuleListResultIterator { - return VirtualNetworkRuleListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (vnrlr VirtualNetworkRuleListResult) IsEmpty() bool { - return vnrlr.Value == nil || len(*vnrlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (vnrlr VirtualNetworkRuleListResult) hasNextLink() bool { - return vnrlr.NextLink != nil && len(*vnrlr.NextLink) != 0 -} - -// virtualNetworkRuleListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (vnrlr VirtualNetworkRuleListResult) virtualNetworkRuleListResultPreparer(ctx context.Context) (*http.Request, error) { - if !vnrlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(vnrlr.NextLink))) -} - -// VirtualNetworkRuleListResultPage contains a page of VirtualNetworkRule values. -type VirtualNetworkRuleListResultPage struct { - fn func(context.Context, VirtualNetworkRuleListResult) (VirtualNetworkRuleListResult, error) - vnrlr VirtualNetworkRuleListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *VirtualNetworkRuleListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRuleListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.vnrlr) - if err != nil { - return err - } - page.vnrlr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *VirtualNetworkRuleListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page VirtualNetworkRuleListResultPage) NotDone() bool { - return !page.vnrlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page VirtualNetworkRuleListResultPage) Response() VirtualNetworkRuleListResult { - return page.vnrlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page VirtualNetworkRuleListResultPage) Values() []VirtualNetworkRule { - if page.vnrlr.IsEmpty() { - return nil - } - return *page.vnrlr.Value -} - -// Creates a new instance of the VirtualNetworkRuleListResultPage type. -func NewVirtualNetworkRuleListResultPage(cur VirtualNetworkRuleListResult, getNextPage func(context.Context, VirtualNetworkRuleListResult) (VirtualNetworkRuleListResult, error)) VirtualNetworkRuleListResultPage { - return VirtualNetworkRuleListResultPage{ - fn: getNextPage, - vnrlr: cur, - } -} - -// VirtualNetworkRuleProperties properties of a virtual network rule. -type VirtualNetworkRuleProperties struct { - // VirtualNetworkSubnetID - The ARM resource id of the virtual network subnet. - VirtualNetworkSubnetID *string `json:"virtualNetworkSubnetId,omitempty"` - // IgnoreMissingVnetServiceEndpoint - Create firewall rule before the virtual network has vnet service endpoint enabled. - IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty"` - // State - READ-ONLY; Virtual Network Rule State. Possible values include: 'VirtualNetworkRuleStateInitializing', 'VirtualNetworkRuleStateInProgress', 'VirtualNetworkRuleStateReady', 'VirtualNetworkRuleStateDeleting', 'VirtualNetworkRuleStateUnknown' - State VirtualNetworkRuleState `json:"state,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualNetworkRuleProperties. -func (vnrp VirtualNetworkRuleProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vnrp.VirtualNetworkSubnetID != nil { - objectMap["virtualNetworkSubnetId"] = vnrp.VirtualNetworkSubnetID - } - if vnrp.IgnoreMissingVnetServiceEndpoint != nil { - objectMap["ignoreMissingVnetServiceEndpoint"] = vnrp.IgnoreMissingVnetServiceEndpoint - } - return json.Marshal(objectMap) -} - -// VirtualNetworkRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworkRulesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkRulesClient) (VirtualNetworkRule, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkRulesCreateOrUpdateFuture.Result. -func (future *VirtualNetworkRulesCreateOrUpdateFuture) result(client VirtualNetworkRulesClient) (vnr VirtualNetworkRule, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vnr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.VirtualNetworkRulesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vnr.Response.Response, err = future.GetResult(sender); err == nil && vnr.Response.Response.StatusCode != http.StatusNoContent { - vnr, err = client.CreateOrUpdateResponder(vnr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesCreateOrUpdateFuture", "Result", vnr.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetworkRulesDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworkRulesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkRulesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkRulesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkRulesDeleteFuture.Result. -func (future *VirtualNetworkRulesDeleteFuture) result(client VirtualNetworkRulesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.VirtualNetworkRulesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// VulnerabilityAssessmentRecurringScansProperties properties of a Vulnerability Assessment recurring -// scans. -type VulnerabilityAssessmentRecurringScansProperties struct { - // IsEnabled - Recurring scans state. - IsEnabled *bool `json:"isEnabled,omitempty"` - // EmailSubscriptionAdmins - Specifies that the schedule scan notification will be is sent to the subscription administrators. - EmailSubscriptionAdmins *bool `json:"emailSubscriptionAdmins,omitempty"` - // Emails - Specifies an array of e-mail addresses to which the scan notification is sent. - Emails *[]string `json:"emails,omitempty"` -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/operations.go deleted file mode 100644 index 8d4ac613b1ce1..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/operations.go +++ /dev/null @@ -1,142 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// OperationsClient is the the Azure SQL Database management API provides a RESTful set of web services that interact -// with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and -// delete databases. -type OperationsClient struct { - BaseClient -} - -// NewOperationsClient creates an instance of the OperationsClient client. -func NewOperationsClient(subscriptionID string) OperationsClient { - return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { - return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List lists all of the available SQL Rest API operations. -func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") - defer func() { - sc := -1 - if result.olr.Response.Response != nil { - sc = result.olr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.OperationsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.olr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.OperationsClient", "List", resp, "Failure sending request") - return - } - - result.olr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.OperationsClient", "List", resp, "Failure responding to request") - return - } - if result.olr.hasNextLink() && result.olr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPath("/providers/Microsoft.Sql/operations"), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) { - req, err := lastResults.operationListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.OperationsClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.OperationsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.OperationsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/recoverabledatabases.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/recoverabledatabases.go deleted file mode 100644 index ef56a498903fb..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/recoverabledatabases.go +++ /dev/null @@ -1,190 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// RecoverableDatabasesClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type RecoverableDatabasesClient struct { - BaseClient -} - -// NewRecoverableDatabasesClient creates an instance of the RecoverableDatabasesClient client. -func NewRecoverableDatabasesClient(subscriptionID string) RecoverableDatabasesClient { - return NewRecoverableDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewRecoverableDatabasesClientWithBaseURI creates an instance of the RecoverableDatabasesClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewRecoverableDatabasesClientWithBaseURI(baseURI string, subscriptionID string) RecoverableDatabasesClient { - return RecoverableDatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets a recoverable database, which is a resource representing a database's geo backup -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database -func (client RecoverableDatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result RecoverableDatabase, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecoverableDatabasesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RecoverableDatabasesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.RecoverableDatabasesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RecoverableDatabasesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client RecoverableDatabasesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client RecoverableDatabasesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client RecoverableDatabasesClient) GetResponder(resp *http.Response) (result RecoverableDatabase, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer gets a list of recoverable databases -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client RecoverableDatabasesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result RecoverableDatabaseListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecoverableDatabasesClient.ListByServer") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RecoverableDatabasesClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.RecoverableDatabasesClient", "ListByServer", resp, "Failure sending request") - return - } - - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RecoverableDatabasesClient", "ListByServer", resp, "Failure responding to request") - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client RecoverableDatabasesClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client RecoverableDatabasesClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client RecoverableDatabasesClient) ListByServerResponder(resp *http.Response) (result RecoverableDatabaseListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/replicationlinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/replicationlinks.go deleted file mode 100644 index 861e0db434279..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/replicationlinks.go +++ /dev/null @@ -1,527 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ReplicationLinksClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type ReplicationLinksClient struct { - BaseClient -} - -// NewReplicationLinksClient creates an instance of the ReplicationLinksClient client. -func NewReplicationLinksClient(subscriptionID string) ReplicationLinksClient { - return NewReplicationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewReplicationLinksClientWithBaseURI creates an instance of the ReplicationLinksClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewReplicationLinksClientWithBaseURI(baseURI string, subscriptionID string) ReplicationLinksClient { - return ReplicationLinksClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Delete deletes a database replication link. Cannot be done during failover. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database that has the replication link to be dropped. -// linkID - the ID of the replication link to be deleted. -func (client ReplicationLinksClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationLinksClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, databaseName, linkID) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ReplicationLinksClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "linkId": autorest.Encode("path", linkID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client ReplicationLinksClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ReplicationLinksClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Failover sets which replica database is primary by failing over from the current primary replica database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database that has the replication link to be failed over. -// linkID - the ID of the replication link to be failed over. -func (client ReplicationLinksClient) Failover(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string) (result ReplicationLinksFailoverFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationLinksClient.Failover") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.FailoverPreparer(ctx, resourceGroupName, serverName, databaseName, linkID) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "Failover", nil, "Failure preparing request") - return - } - - result, err = client.FailoverSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "Failover", result.Response(), "Failure sending request") - return - } - - return -} - -// FailoverPreparer prepares the Failover request. -func (client ReplicationLinksClient) FailoverPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "linkId": autorest.Encode("path", linkID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/failover", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// FailoverSender sends the Failover request. The method will close the -// http.Response Body if it receives an error. -func (client ReplicationLinksClient) FailoverSender(req *http.Request) (future ReplicationLinksFailoverFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// FailoverResponder handles the response to the Failover request. The method always -// closes the http.Response Body. -func (client ReplicationLinksClient) FailoverResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// FailoverAllowDataLoss sets which replica database is primary by failing over from the current primary replica -// database. This operation might result in data loss. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database that has the replication link to be failed over. -// linkID - the ID of the replication link to be failed over. -func (client ReplicationLinksClient) FailoverAllowDataLoss(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string) (result ReplicationLinksFailoverAllowDataLossFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationLinksClient.FailoverAllowDataLoss") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.FailoverAllowDataLossPreparer(ctx, resourceGroupName, serverName, databaseName, linkID) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "FailoverAllowDataLoss", nil, "Failure preparing request") - return - } - - result, err = client.FailoverAllowDataLossSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "FailoverAllowDataLoss", result.Response(), "Failure sending request") - return - } - - return -} - -// FailoverAllowDataLossPreparer prepares the FailoverAllowDataLoss request. -func (client ReplicationLinksClient) FailoverAllowDataLossPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "linkId": autorest.Encode("path", linkID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// FailoverAllowDataLossSender sends the FailoverAllowDataLoss request. The method will close the -// http.Response Body if it receives an error. -func (client ReplicationLinksClient) FailoverAllowDataLossSender(req *http.Request) (future ReplicationLinksFailoverAllowDataLossFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// FailoverAllowDataLossResponder handles the response to the FailoverAllowDataLoss request. The method always -// closes the http.Response Body. -func (client ReplicationLinksClient) FailoverAllowDataLossResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a database replication link. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database to get the link for. -// linkID - the replication link ID to be retrieved. -func (client ReplicationLinksClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string) (result ReplicationLink, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationLinksClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName, linkID) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ReplicationLinksClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "linkId": autorest.Encode("path", linkID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ReplicationLinksClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ReplicationLinksClient) GetResponder(resp *http.Response) (result ReplicationLink, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByDatabase lists a database's replication links. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database to retrieve links for. -func (client ReplicationLinksClient) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result ReplicationLinkListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationLinksClient.ListByDatabase") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListByDatabasePreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "ListByDatabase", nil, "Failure preparing request") - return - } - - resp, err := client.ListByDatabaseSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "ListByDatabase", resp, "Failure sending request") - return - } - - result, err = client.ListByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "ListByDatabase", resp, "Failure responding to request") - return - } - - return -} - -// ListByDatabasePreparer prepares the ListByDatabase request. -func (client ReplicationLinksClient) ListByDatabasePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByDatabaseSender sends the ListByDatabase request. The method will close the -// http.Response Body if it receives an error. -func (client ReplicationLinksClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always -// closes the http.Response Body. -func (client ReplicationLinksClient) ListByDatabaseResponder(resp *http.Response) (result ReplicationLinkListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Unlink deletes a database replication link in forced or friendly way. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database that has the replication link to be failed over. -// linkID - the ID of the replication link to be failed over. -// parameters - the required parameters for unlinking replication link. -func (client ReplicationLinksClient) Unlink(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string, parameters UnlinkParameters) (result ReplicationLinksUnlinkFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationLinksClient.Unlink") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UnlinkPreparer(ctx, resourceGroupName, serverName, databaseName, linkID, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "Unlink", nil, "Failure preparing request") - return - } - - result, err = client.UnlinkSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "Unlink", result.Response(), "Failure sending request") - return - } - - return -} - -// UnlinkPreparer prepares the Unlink request. -func (client ReplicationLinksClient) UnlinkPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string, parameters UnlinkParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "linkId": autorest.Encode("path", linkID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/unlink", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UnlinkSender sends the Unlink request. The method will close the -// http.Response Body if it receives an error. -func (client ReplicationLinksClient) UnlinkSender(req *http.Request) (future ReplicationLinksUnlinkFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UnlinkResponder handles the response to the Unlink request. The method always -// closes the http.Response Body. -func (client ReplicationLinksClient) UnlinkResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/restorabledroppeddatabases.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/restorabledroppeddatabases.go deleted file mode 100644 index 7298ef0b736f2..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/restorabledroppeddatabases.go +++ /dev/null @@ -1,191 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// RestorableDroppedDatabasesClient is the the Azure SQL Database management API provides a RESTful set of web services -// that interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, -// update, and delete databases. -type RestorableDroppedDatabasesClient struct { - BaseClient -} - -// NewRestorableDroppedDatabasesClient creates an instance of the RestorableDroppedDatabasesClient client. -func NewRestorableDroppedDatabasesClient(subscriptionID string) RestorableDroppedDatabasesClient { - return NewRestorableDroppedDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewRestorableDroppedDatabasesClientWithBaseURI creates an instance of the RestorableDroppedDatabasesClient client -// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign -// clouds, Azure stack). -func NewRestorableDroppedDatabasesClientWithBaseURI(baseURI string, subscriptionID string) RestorableDroppedDatabasesClient { - return RestorableDroppedDatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets a deleted database that can be restored -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// restorableDroppededDatabaseID - the id of the deleted database in the form of -// databaseName,deletionTimeInFileTimeFormat -func (client RestorableDroppedDatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, restorableDroppededDatabaseID string) (result RestorableDroppedDatabase, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RestorableDroppedDatabasesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, restorableDroppededDatabaseID) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RestorableDroppedDatabasesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.RestorableDroppedDatabasesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RestorableDroppedDatabasesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client RestorableDroppedDatabasesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, restorableDroppededDatabaseID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "restorableDroppededDatabaseId": autorest.Encode("path", restorableDroppededDatabaseID), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases/{restorableDroppededDatabaseId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client RestorableDroppedDatabasesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client RestorableDroppedDatabasesClient) GetResponder(resp *http.Response) (result RestorableDroppedDatabase, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer gets a list of deleted databases that can be restored -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client RestorableDroppedDatabasesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result RestorableDroppedDatabaseListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RestorableDroppedDatabasesClient.ListByServer") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RestorableDroppedDatabasesClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.RestorableDroppedDatabasesClient", "ListByServer", resp, "Failure sending request") - return - } - - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RestorableDroppedDatabasesClient", "ListByServer", resp, "Failure responding to request") - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client RestorableDroppedDatabasesClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client RestorableDroppedDatabasesClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client RestorableDroppedDatabasesClient) ListByServerResponder(resp *http.Response) (result RestorableDroppedDatabaseListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/restorabledroppedmanageddatabases.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/restorabledroppedmanageddatabases.go deleted file mode 100644 index 38d174e46d1e3..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/restorabledroppedmanageddatabases.go +++ /dev/null @@ -1,232 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// RestorableDroppedManagedDatabasesClient is the the Azure SQL Database management API provides a RESTful set of web -// services that interact with Azure SQL Database services to manage your databases. The API enables you to create, -// retrieve, update, and delete databases. -type RestorableDroppedManagedDatabasesClient struct { - BaseClient -} - -// NewRestorableDroppedManagedDatabasesClient creates an instance of the RestorableDroppedManagedDatabasesClient -// client. -func NewRestorableDroppedManagedDatabasesClient(subscriptionID string) RestorableDroppedManagedDatabasesClient { - return NewRestorableDroppedManagedDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewRestorableDroppedManagedDatabasesClientWithBaseURI creates an instance of the -// RestorableDroppedManagedDatabasesClient client using a custom endpoint. Use this when interacting with an Azure -// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewRestorableDroppedManagedDatabasesClientWithBaseURI(baseURI string, subscriptionID string) RestorableDroppedManagedDatabasesClient { - return RestorableDroppedManagedDatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets a restorable dropped managed database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -func (client RestorableDroppedManagedDatabasesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string) (result RestorableDroppedManagedDatabase, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RestorableDroppedManagedDatabasesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, managedInstanceName, restorableDroppedDatabaseID) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RestorableDroppedManagedDatabasesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.RestorableDroppedManagedDatabasesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RestorableDroppedManagedDatabasesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client RestorableDroppedManagedDatabasesClient) GetPreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "restorableDroppedDatabaseId": autorest.Encode("path", restorableDroppedDatabaseID), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client RestorableDroppedManagedDatabasesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client RestorableDroppedManagedDatabasesClient) GetResponder(resp *http.Response) (result RestorableDroppedManagedDatabase, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByInstance gets a list of restorable dropped managed databases. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -func (client RestorableDroppedManagedDatabasesClient) ListByInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result RestorableDroppedManagedDatabaseListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RestorableDroppedManagedDatabasesClient.ListByInstance") - defer func() { - sc := -1 - if result.rdmdlr.Response.Response != nil { - sc = result.rdmdlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByInstanceNextResults - req, err := client.ListByInstancePreparer(ctx, resourceGroupName, managedInstanceName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RestorableDroppedManagedDatabasesClient", "ListByInstance", nil, "Failure preparing request") - return - } - - resp, err := client.ListByInstanceSender(req) - if err != nil { - result.rdmdlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.RestorableDroppedManagedDatabasesClient", "ListByInstance", resp, "Failure sending request") - return - } - - result.rdmdlr, err = client.ListByInstanceResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RestorableDroppedManagedDatabasesClient", "ListByInstance", resp, "Failure responding to request") - return - } - if result.rdmdlr.hasNextLink() && result.rdmdlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByInstancePreparer prepares the ListByInstance request. -func (client RestorableDroppedManagedDatabasesClient) ListByInstancePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByInstanceSender sends the ListByInstance request. The method will close the -// http.Response Body if it receives an error. -func (client RestorableDroppedManagedDatabasesClient) ListByInstanceSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByInstanceResponder handles the response to the ListByInstance request. The method always -// closes the http.Response Body. -func (client RestorableDroppedManagedDatabasesClient) ListByInstanceResponder(resp *http.Response) (result RestorableDroppedManagedDatabaseListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByInstanceNextResults retrieves the next set of results, if any. -func (client RestorableDroppedManagedDatabasesClient) listByInstanceNextResults(ctx context.Context, lastResults RestorableDroppedManagedDatabaseListResult) (result RestorableDroppedManagedDatabaseListResult, err error) { - req, err := lastResults.restorableDroppedManagedDatabaseListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.RestorableDroppedManagedDatabasesClient", "listByInstanceNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByInstanceSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.RestorableDroppedManagedDatabasesClient", "listByInstanceNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByInstanceResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RestorableDroppedManagedDatabasesClient", "listByInstanceNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByInstanceComplete enumerates all values, automatically crossing page boundaries as required. -func (client RestorableDroppedManagedDatabasesClient) ListByInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result RestorableDroppedManagedDatabaseListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RestorableDroppedManagedDatabasesClient.ListByInstance") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByInstance(ctx, resourceGroupName, managedInstanceName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/restorepoints.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/restorepoints.go deleted file mode 100644 index 6637ed2cccfb1..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/restorepoints.go +++ /dev/null @@ -1,365 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// RestorePointsClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type RestorePointsClient struct { - BaseClient -} - -// NewRestorePointsClient creates an instance of the RestorePointsClient client. -func NewRestorePointsClient(subscriptionID string) RestorePointsClient { - return NewRestorePointsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewRestorePointsClientWithBaseURI creates an instance of the RestorePointsClient client using a custom endpoint. -// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewRestorePointsClientWithBaseURI(baseURI string, subscriptionID string) RestorePointsClient { - return RestorePointsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Create creates a restore point for a data warehouse. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -// parameters - the definition for creating the restore point of this database. -func (client RestorePointsClient) Create(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters CreateDatabaseRestorePointDefinition) (result RestorePointsCreateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointsClient.Create") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.RestorePointLabel", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("sql.RestorePointsClient", "Create", err.Error()) - } - - req, err := client.CreatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RestorePointsClient", "Create", nil, "Failure preparing request") - return - } - - result, err = client.CreateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RestorePointsClient", "Create", result.Response(), "Failure sending request") - return - } - - return -} - -// CreatePreparer prepares the Create request. -func (client RestorePointsClient) CreatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters CreateDatabaseRestorePointDefinition) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateSender sends the Create request. The method will close the -// http.Response Body if it receives an error. -func (client RestorePointsClient) CreateSender(req *http.Request) (future RestorePointsCreateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateResponder handles the response to the Create request. The method always -// closes the http.Response Body. -func (client RestorePointsClient) CreateResponder(resp *http.Response) (result RestorePoint, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a restore point. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -// restorePointName - the name of the restore point. -func (client RestorePointsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, restorePointName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, databaseName, restorePointName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RestorePointsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.RestorePointsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RestorePointsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client RestorePointsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, restorePointName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "restorePointName": autorest.Encode("path", restorePointName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints/{restorePointName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client RestorePointsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client RestorePointsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a restore point. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -// restorePointName - the name of the restore point. -func (client RestorePointsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, restorePointName string) (result RestorePoint, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName, restorePointName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RestorePointsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.RestorePointsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RestorePointsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client RestorePointsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, restorePointName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "restorePointName": autorest.Encode("path", restorePointName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints/{restorePointName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client RestorePointsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client RestorePointsClient) GetResponder(resp *http.Response) (result RestorePoint, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByDatabase gets a list of database restore points. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -func (client RestorePointsClient) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result RestorePointListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointsClient.ListByDatabase") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListByDatabasePreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RestorePointsClient", "ListByDatabase", nil, "Failure preparing request") - return - } - - resp, err := client.ListByDatabaseSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.RestorePointsClient", "ListByDatabase", resp, "Failure sending request") - return - } - - result, err = client.ListByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RestorePointsClient", "ListByDatabase", resp, "Failure responding to request") - return - } - - return -} - -// ListByDatabasePreparer prepares the ListByDatabase request. -func (client RestorePointsClient) ListByDatabasePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByDatabaseSender sends the ListByDatabase request. The method will close the -// http.Response Body if it receives an error. -func (client RestorePointsClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always -// closes the http.Response Body. -func (client RestorePointsClient) ListByDatabaseResponder(resp *http.Response) (result RestorePointListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/sensitivitylabels.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/sensitivitylabels.go deleted file mode 100644 index 71a896aaaa880..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/sensitivitylabels.go +++ /dev/null @@ -1,723 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// SensitivityLabelsClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type SensitivityLabelsClient struct { - BaseClient -} - -// NewSensitivityLabelsClient creates an instance of the SensitivityLabelsClient client. -func NewSensitivityLabelsClient(subscriptionID string) SensitivityLabelsClient { - return NewSensitivityLabelsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewSensitivityLabelsClientWithBaseURI creates an instance of the SensitivityLabelsClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewSensitivityLabelsClientWithBaseURI(baseURI string, subscriptionID string) SensitivityLabelsClient { - return SensitivityLabelsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates the sensitivity label of a given column -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -// schemaName - the name of the schema. -// tableName - the name of the table. -// columnName - the name of the column. -// parameters - the column sensitivity label resource. -func (client SensitivityLabelsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string, parameters SensitivityLabel) (result SensitivityLabel, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SensitivityLabelsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client SensitivityLabelsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string, parameters SensitivityLabel) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "columnName": autorest.Encode("path", columnName), - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "schemaName": autorest.Encode("path", schemaName), - "sensitivityLabelSource": autorest.Encode("path", "current"), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "tableName": autorest.Encode("path", tableName), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client SensitivityLabelsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client SensitivityLabelsClient) CreateOrUpdateResponder(resp *http.Response) (result SensitivityLabel, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes the sensitivity label of a given column -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -// schemaName - the name of the schema. -// tableName - the name of the table. -// columnName - the name of the column. -func (client SensitivityLabelsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SensitivityLabelsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, databaseName, schemaName, tableName, columnName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client SensitivityLabelsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "columnName": autorest.Encode("path", columnName), - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "schemaName": autorest.Encode("path", schemaName), - "sensitivityLabelSource": autorest.Encode("path", "current"), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "tableName": autorest.Encode("path", tableName), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client SensitivityLabelsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client SensitivityLabelsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// DisableRecommendation disables sensitivity recommendations on a given column -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -// schemaName - the name of the schema. -// tableName - the name of the table. -// columnName - the name of the column. -func (client SensitivityLabelsClient) DisableRecommendation(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SensitivityLabelsClient.DisableRecommendation") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DisableRecommendationPreparer(ctx, resourceGroupName, serverName, databaseName, schemaName, tableName, columnName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "DisableRecommendation", nil, "Failure preparing request") - return - } - - resp, err := client.DisableRecommendationSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "DisableRecommendation", resp, "Failure sending request") - return - } - - result, err = client.DisableRecommendationResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "DisableRecommendation", resp, "Failure responding to request") - return - } - - return -} - -// DisableRecommendationPreparer prepares the DisableRecommendation request. -func (client SensitivityLabelsClient) DisableRecommendationPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "columnName": autorest.Encode("path", columnName), - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "schemaName": autorest.Encode("path", schemaName), - "sensitivityLabelSource": autorest.Encode("path", "recommended"), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "tableName": autorest.Encode("path", tableName), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DisableRecommendationSender sends the DisableRecommendation request. The method will close the -// http.Response Body if it receives an error. -func (client SensitivityLabelsClient) DisableRecommendationSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DisableRecommendationResponder handles the response to the DisableRecommendation request. The method always -// closes the http.Response Body. -func (client SensitivityLabelsClient) DisableRecommendationResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// EnableRecommendation enables sensitivity recommendations on a given column (recommendations are enabled by default -// on all columns) -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -// schemaName - the name of the schema. -// tableName - the name of the table. -// columnName - the name of the column. -func (client SensitivityLabelsClient) EnableRecommendation(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SensitivityLabelsClient.EnableRecommendation") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.EnableRecommendationPreparer(ctx, resourceGroupName, serverName, databaseName, schemaName, tableName, columnName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "EnableRecommendation", nil, "Failure preparing request") - return - } - - resp, err := client.EnableRecommendationSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "EnableRecommendation", resp, "Failure sending request") - return - } - - result, err = client.EnableRecommendationResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "EnableRecommendation", resp, "Failure responding to request") - return - } - - return -} - -// EnableRecommendationPreparer prepares the EnableRecommendation request. -func (client SensitivityLabelsClient) EnableRecommendationPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "columnName": autorest.Encode("path", columnName), - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "schemaName": autorest.Encode("path", schemaName), - "sensitivityLabelSource": autorest.Encode("path", "recommended"), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "tableName": autorest.Encode("path", tableName), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// EnableRecommendationSender sends the EnableRecommendation request. The method will close the -// http.Response Body if it receives an error. -func (client SensitivityLabelsClient) EnableRecommendationSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// EnableRecommendationResponder handles the response to the EnableRecommendation request. The method always -// closes the http.Response Body. -func (client SensitivityLabelsClient) EnableRecommendationResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets the sensitivity label of a given column -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -// schemaName - the name of the schema. -// tableName - the name of the table. -// columnName - the name of the column. -// sensitivityLabelSource - the source of the sensitivity label. -func (client SensitivityLabelsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string, sensitivityLabelSource SensitivityLabelSource) (result SensitivityLabel, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SensitivityLabelsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client SensitivityLabelsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string, sensitivityLabelSource SensitivityLabelSource) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "columnName": autorest.Encode("path", columnName), - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "schemaName": autorest.Encode("path", schemaName), - "sensitivityLabelSource": autorest.Encode("path", sensitivityLabelSource), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "tableName": autorest.Encode("path", tableName), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client SensitivityLabelsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client SensitivityLabelsClient) GetResponder(resp *http.Response) (result SensitivityLabel, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListCurrentByDatabase gets the sensitivity labels of a given database -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -// filter - an OData filter expression that filters elements in the collection. -func (client SensitivityLabelsClient) ListCurrentByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string, filter string) (result SensitivityLabelListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SensitivityLabelsClient.ListCurrentByDatabase") - defer func() { - sc := -1 - if result.sllr.Response.Response != nil { - sc = result.sllr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listCurrentByDatabaseNextResults - req, err := client.ListCurrentByDatabasePreparer(ctx, resourceGroupName, serverName, databaseName, filter) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "ListCurrentByDatabase", nil, "Failure preparing request") - return - } - - resp, err := client.ListCurrentByDatabaseSender(req) - if err != nil { - result.sllr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "ListCurrentByDatabase", resp, "Failure sending request") - return - } - - result.sllr, err = client.ListCurrentByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "ListCurrentByDatabase", resp, "Failure responding to request") - return - } - if result.sllr.hasNextLink() && result.sllr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListCurrentByDatabasePreparer prepares the ListCurrentByDatabase request. -func (client SensitivityLabelsClient) ListCurrentByDatabasePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, filter string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/currentSensitivityLabels", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListCurrentByDatabaseSender sends the ListCurrentByDatabase request. The method will close the -// http.Response Body if it receives an error. -func (client SensitivityLabelsClient) ListCurrentByDatabaseSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListCurrentByDatabaseResponder handles the response to the ListCurrentByDatabase request. The method always -// closes the http.Response Body. -func (client SensitivityLabelsClient) ListCurrentByDatabaseResponder(resp *http.Response) (result SensitivityLabelListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listCurrentByDatabaseNextResults retrieves the next set of results, if any. -func (client SensitivityLabelsClient) listCurrentByDatabaseNextResults(ctx context.Context, lastResults SensitivityLabelListResult) (result SensitivityLabelListResult, err error) { - req, err := lastResults.sensitivityLabelListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "listCurrentByDatabaseNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListCurrentByDatabaseSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "listCurrentByDatabaseNextResults", resp, "Failure sending next results request") - } - result, err = client.ListCurrentByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "listCurrentByDatabaseNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListCurrentByDatabaseComplete enumerates all values, automatically crossing page boundaries as required. -func (client SensitivityLabelsClient) ListCurrentByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, filter string) (result SensitivityLabelListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SensitivityLabelsClient.ListCurrentByDatabase") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListCurrentByDatabase(ctx, resourceGroupName, serverName, databaseName, filter) - return -} - -// ListRecommendedByDatabase gets the sensitivity labels of a given database -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database. -// includeDisabledRecommendations - specifies whether to include disabled recommendations or not. -// filter - an OData filter expression that filters elements in the collection. -func (client SensitivityLabelsClient) ListRecommendedByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string, includeDisabledRecommendations *bool, skipToken string, filter string) (result SensitivityLabelListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SensitivityLabelsClient.ListRecommendedByDatabase") - defer func() { - sc := -1 - if result.sllr.Response.Response != nil { - sc = result.sllr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listRecommendedByDatabaseNextResults - req, err := client.ListRecommendedByDatabasePreparer(ctx, resourceGroupName, serverName, databaseName, includeDisabledRecommendations, skipToken, filter) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "ListRecommendedByDatabase", nil, "Failure preparing request") - return - } - - resp, err := client.ListRecommendedByDatabaseSender(req) - if err != nil { - result.sllr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "ListRecommendedByDatabase", resp, "Failure sending request") - return - } - - result.sllr, err = client.ListRecommendedByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "ListRecommendedByDatabase", resp, "Failure responding to request") - return - } - if result.sllr.hasNextLink() && result.sllr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListRecommendedByDatabasePreparer prepares the ListRecommendedByDatabase request. -func (client SensitivityLabelsClient) ListRecommendedByDatabasePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, includeDisabledRecommendations *bool, skipToken string, filter string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if includeDisabledRecommendations != nil { - queryParameters["includeDisabledRecommendations"] = autorest.Encode("query", *includeDisabledRecommendations) - } - if len(skipToken) > 0 { - queryParameters["$skipToken"] = autorest.Encode("query", skipToken) - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/recommendedSensitivityLabels", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListRecommendedByDatabaseSender sends the ListRecommendedByDatabase request. The method will close the -// http.Response Body if it receives an error. -func (client SensitivityLabelsClient) ListRecommendedByDatabaseSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListRecommendedByDatabaseResponder handles the response to the ListRecommendedByDatabase request. The method always -// closes the http.Response Body. -func (client SensitivityLabelsClient) ListRecommendedByDatabaseResponder(resp *http.Response) (result SensitivityLabelListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listRecommendedByDatabaseNextResults retrieves the next set of results, if any. -func (client SensitivityLabelsClient) listRecommendedByDatabaseNextResults(ctx context.Context, lastResults SensitivityLabelListResult) (result SensitivityLabelListResult, err error) { - req, err := lastResults.sensitivityLabelListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "listRecommendedByDatabaseNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListRecommendedByDatabaseSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "listRecommendedByDatabaseNextResults", resp, "Failure sending next results request") - } - result, err = client.ListRecommendedByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SensitivityLabelsClient", "listRecommendedByDatabaseNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListRecommendedByDatabaseComplete enumerates all values, automatically crossing page boundaries as required. -func (client SensitivityLabelsClient) ListRecommendedByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, includeDisabledRecommendations *bool, skipToken string, filter string) (result SensitivityLabelListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SensitivityLabelsClient.ListRecommendedByDatabase") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListRecommendedByDatabase(ctx, resourceGroupName, serverName, databaseName, includeDisabledRecommendations, skipToken, filter) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverautomatictuning.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverautomatictuning.go deleted file mode 100644 index 6d0fd7679702f..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverautomatictuning.go +++ /dev/null @@ -1,191 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ServerAutomaticTuningClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type ServerAutomaticTuningClient struct { - BaseClient -} - -// NewServerAutomaticTuningClient creates an instance of the ServerAutomaticTuningClient client. -func NewServerAutomaticTuningClient(subscriptionID string) ServerAutomaticTuningClient { - return NewServerAutomaticTuningClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewServerAutomaticTuningClientWithBaseURI creates an instance of the ServerAutomaticTuningClient client using a -// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, -// Azure stack). -func NewServerAutomaticTuningClientWithBaseURI(baseURI string, subscriptionID string) ServerAutomaticTuningClient { - return ServerAutomaticTuningClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get retrieves server automatic tuning options. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client ServerAutomaticTuningClient) Get(ctx context.Context, resourceGroupName string, serverName string) (result ServerAutomaticTuning, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerAutomaticTuningClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAutomaticTuningClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServerAutomaticTuningClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAutomaticTuningClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ServerAutomaticTuningClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/automaticTuning/current", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ServerAutomaticTuningClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ServerAutomaticTuningClient) GetResponder(resp *http.Response) (result ServerAutomaticTuning, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Update update automatic tuning options on server. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// parameters - the requested automatic tuning resource state. -func (client ServerAutomaticTuningClient) Update(ctx context.Context, resourceGroupName string, serverName string, parameters ServerAutomaticTuning) (result ServerAutomaticTuning, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerAutomaticTuningClient.Update") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, serverName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAutomaticTuningClient", "Update", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServerAutomaticTuningClient", "Update", resp, "Failure sending request") - return - } - - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAutomaticTuningClient", "Update", resp, "Failure responding to request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client ServerAutomaticTuningClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, parameters ServerAutomaticTuning) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/automaticTuning/current", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client ServerAutomaticTuningClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client ServerAutomaticTuningClient) UpdateResponder(resp *http.Response) (result ServerAutomaticTuning, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverazureadadministrators.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverazureadadministrators.go deleted file mode 100644 index 0be847c6534e2..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverazureadadministrators.go +++ /dev/null @@ -1,367 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ServerAzureADAdministratorsClient is the the Azure SQL Database management API provides a RESTful set of web -// services that interact with Azure SQL Database services to manage your databases. The API enables you to create, -// retrieve, update, and delete databases. -type ServerAzureADAdministratorsClient struct { - BaseClient -} - -// NewServerAzureADAdministratorsClient creates an instance of the ServerAzureADAdministratorsClient client. -func NewServerAzureADAdministratorsClient(subscriptionID string) ServerAzureADAdministratorsClient { - return NewServerAzureADAdministratorsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewServerAzureADAdministratorsClientWithBaseURI creates an instance of the ServerAzureADAdministratorsClient client -// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign -// clouds, Azure stack). -func NewServerAzureADAdministratorsClientWithBaseURI(baseURI string, subscriptionID string) ServerAzureADAdministratorsClient { - return ServerAzureADAdministratorsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates a new Server Active Directory Administrator or updates an existing server Active Directory -// Administrator. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// properties - the required parameters for creating or updating an Active Directory Administrator. -func (client ServerAzureADAdministratorsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, properties ServerAzureADAdministrator) (result ServerAzureADAdministratorsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerAzureADAdministratorsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: properties, - Constraints: []validation.Constraint{{Target: "properties.ServerAdministratorProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "properties.ServerAdministratorProperties.AdministratorType", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "properties.ServerAdministratorProperties.Login", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "properties.ServerAdministratorProperties.Sid", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "properties.ServerAdministratorProperties.TenantID", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("sql.ServerAzureADAdministratorsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, properties) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ServerAzureADAdministratorsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, properties ServerAzureADAdministrator) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "administratorName": autorest.Encode("path", "activeDirectory"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}", pathParameters), - autorest.WithJSON(properties), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ServerAzureADAdministratorsClient) CreateOrUpdateSender(req *http.Request) (future ServerAzureADAdministratorsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ServerAzureADAdministratorsClient) CreateOrUpdateResponder(resp *http.Response) (result ServerAzureADAdministrator, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes an existing server Active Directory Administrator. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client ServerAzureADAdministratorsClient) Delete(ctx context.Context, resourceGroupName string, serverName string) (result ServerAzureADAdministratorsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerAzureADAdministratorsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ServerAzureADAdministratorsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "administratorName": autorest.Encode("path", "activeDirectory"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client ServerAzureADAdministratorsClient) DeleteSender(req *http.Request) (future ServerAzureADAdministratorsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ServerAzureADAdministratorsClient) DeleteResponder(resp *http.Response) (result ServerAzureADAdministrator, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get returns an server Administrator. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client ServerAzureADAdministratorsClient) Get(ctx context.Context, resourceGroupName string, serverName string) (result ServerAzureADAdministrator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerAzureADAdministratorsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ServerAzureADAdministratorsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "administratorName": autorest.Encode("path", "activeDirectory"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ServerAzureADAdministratorsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ServerAzureADAdministratorsClient) GetResponder(resp *http.Response) (result ServerAzureADAdministrator, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer returns a list of server Administrators. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client ServerAzureADAdministratorsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result ServerAdministratorListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerAzureADAdministratorsClient.ListByServer") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "ListByServer", resp, "Failure sending request") - return - } - - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "ListByServer", resp, "Failure responding to request") - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client ServerAzureADAdministratorsClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client ServerAzureADAdministratorsClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client ServerAzureADAdministratorsClient) ListByServerResponder(resp *http.Response) (result ServerAdministratorListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverblobauditingpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverblobauditingpolicies.go deleted file mode 100644 index 3983f9e6a879e..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverblobauditingpolicies.go +++ /dev/null @@ -1,315 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ServerBlobAuditingPoliciesClient is the the Azure SQL Database management API provides a RESTful set of web services -// that interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, -// update, and delete databases. -type ServerBlobAuditingPoliciesClient struct { - BaseClient -} - -// NewServerBlobAuditingPoliciesClient creates an instance of the ServerBlobAuditingPoliciesClient client. -func NewServerBlobAuditingPoliciesClient(subscriptionID string) ServerBlobAuditingPoliciesClient { - return NewServerBlobAuditingPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewServerBlobAuditingPoliciesClientWithBaseURI creates an instance of the ServerBlobAuditingPoliciesClient client -// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign -// clouds, Azure stack). -func NewServerBlobAuditingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServerBlobAuditingPoliciesClient { - return ServerBlobAuditingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a server's blob auditing policy. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// parameters - properties of blob auditing policy -func (client ServerBlobAuditingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerBlobAuditingPolicy) (result ServerBlobAuditingPoliciesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerBlobAuditingPoliciesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerBlobAuditingPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerBlobAuditingPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ServerBlobAuditingPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, parameters ServerBlobAuditingPolicy) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "blobAuditingPolicyName": autorest.Encode("path", "default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings/{blobAuditingPolicyName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ServerBlobAuditingPoliciesClient) CreateOrUpdateSender(req *http.Request) (future ServerBlobAuditingPoliciesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ServerBlobAuditingPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ServerBlobAuditingPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets a server's blob auditing policy. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client ServerBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string) (result ServerBlobAuditingPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerBlobAuditingPoliciesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerBlobAuditingPoliciesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServerBlobAuditingPoliciesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerBlobAuditingPoliciesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ServerBlobAuditingPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "blobAuditingPolicyName": autorest.Encode("path", "default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings/{blobAuditingPolicyName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ServerBlobAuditingPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ServerBlobAuditingPoliciesClient) GetResponder(resp *http.Response) (result ServerBlobAuditingPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer lists auditing settings of a server. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client ServerBlobAuditingPoliciesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result ServerBlobAuditingPolicyListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerBlobAuditingPoliciesClient.ListByServer") - defer func() { - sc := -1 - if result.sbaplr.Response.Response != nil { - sc = result.sbaplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByServerNextResults - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerBlobAuditingPoliciesClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.sbaplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServerBlobAuditingPoliciesClient", "ListByServer", resp, "Failure sending request") - return - } - - result.sbaplr, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerBlobAuditingPoliciesClient", "ListByServer", resp, "Failure responding to request") - return - } - if result.sbaplr.hasNextLink() && result.sbaplr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client ServerBlobAuditingPoliciesClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client ServerBlobAuditingPoliciesClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client ServerBlobAuditingPoliciesClient) ListByServerResponder(resp *http.Response) (result ServerBlobAuditingPolicyListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByServerNextResults retrieves the next set of results, if any. -func (client ServerBlobAuditingPoliciesClient) listByServerNextResults(ctx context.Context, lastResults ServerBlobAuditingPolicyListResult) (result ServerBlobAuditingPolicyListResult, err error) { - req, err := lastResults.serverBlobAuditingPolicyListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.ServerBlobAuditingPoliciesClient", "listByServerNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.ServerBlobAuditingPoliciesClient", "listByServerNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerBlobAuditingPoliciesClient", "listByServerNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. -func (client ServerBlobAuditingPoliciesClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result ServerBlobAuditingPolicyListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerBlobAuditingPoliciesClient.ListByServer") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByServer(ctx, resourceGroupName, serverName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/servercommunicationlinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/servercommunicationlinks.go deleted file mode 100644 index cb24bd7204fcc..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/servercommunicationlinks.go +++ /dev/null @@ -1,363 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ServerCommunicationLinksClient is the the Azure SQL Database management API provides a RESTful set of web services -// that interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, -// update, and delete databases. -type ServerCommunicationLinksClient struct { - BaseClient -} - -// NewServerCommunicationLinksClient creates an instance of the ServerCommunicationLinksClient client. -func NewServerCommunicationLinksClient(subscriptionID string) ServerCommunicationLinksClient { - return NewServerCommunicationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewServerCommunicationLinksClientWithBaseURI creates an instance of the ServerCommunicationLinksClient client using -// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign -// clouds, Azure stack). -func NewServerCommunicationLinksClientWithBaseURI(baseURI string, subscriptionID string) ServerCommunicationLinksClient { - return ServerCommunicationLinksClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates a server communication link. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// communicationLinkName - the name of the server communication link. -// parameters - the required parameters for creating a server communication link. -func (client ServerCommunicationLinksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, communicationLinkName string, parameters ServerCommunicationLink) (result ServerCommunicationLinksCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerCommunicationLinksClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ServerCommunicationLinkProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ServerCommunicationLinkProperties.PartnerServer", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("sql.ServerCommunicationLinksClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, communicationLinkName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ServerCommunicationLinksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, communicationLinkName string, parameters ServerCommunicationLink) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "communicationLinkName": autorest.Encode("path", communicationLinkName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Location = nil - parameters.Kind = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks/{communicationLinkName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ServerCommunicationLinksClient) CreateOrUpdateSender(req *http.Request) (future ServerCommunicationLinksCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ServerCommunicationLinksClient) CreateOrUpdateResponder(resp *http.Response) (result ServerCommunicationLink, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a server communication link. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// communicationLinkName - the name of the server communication link. -func (client ServerCommunicationLinksClient) Delete(ctx context.Context, resourceGroupName string, serverName string, communicationLinkName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerCommunicationLinksClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, communicationLinkName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ServerCommunicationLinksClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, communicationLinkName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "communicationLinkName": autorest.Encode("path", communicationLinkName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks/{communicationLinkName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client ServerCommunicationLinksClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ServerCommunicationLinksClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get returns a server communication link. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// communicationLinkName - the name of the server communication link. -func (client ServerCommunicationLinksClient) Get(ctx context.Context, resourceGroupName string, serverName string, communicationLinkName string) (result ServerCommunicationLink, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerCommunicationLinksClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, communicationLinkName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ServerCommunicationLinksClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, communicationLinkName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "communicationLinkName": autorest.Encode("path", communicationLinkName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks/{communicationLinkName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ServerCommunicationLinksClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ServerCommunicationLinksClient) GetResponder(resp *http.Response) (result ServerCommunicationLink, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer gets a list of server communication links. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client ServerCommunicationLinksClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result ServerCommunicationLinkListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerCommunicationLinksClient.ListByServer") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksClient", "ListByServer", resp, "Failure sending request") - return - } - - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksClient", "ListByServer", resp, "Failure responding to request") - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client ServerCommunicationLinksClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client ServerCommunicationLinksClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client ServerCommunicationLinksClient) ListByServerResponder(resp *http.Response) (result ServerCommunicationLinkListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverconnectionpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverconnectionpolicies.go deleted file mode 100644 index fd714db39b750..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverconnectionpolicies.go +++ /dev/null @@ -1,195 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ServerConnectionPoliciesClient is the the Azure SQL Database management API provides a RESTful set of web services -// that interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, -// update, and delete databases. -type ServerConnectionPoliciesClient struct { - BaseClient -} - -// NewServerConnectionPoliciesClient creates an instance of the ServerConnectionPoliciesClient client. -func NewServerConnectionPoliciesClient(subscriptionID string) ServerConnectionPoliciesClient { - return NewServerConnectionPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewServerConnectionPoliciesClientWithBaseURI creates an instance of the ServerConnectionPoliciesClient client using -// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign -// clouds, Azure stack). -func NewServerConnectionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServerConnectionPoliciesClient { - return ServerConnectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates the server's connection policy. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// parameters - the required parameters for updating a secure connection policy. -func (client ServerConnectionPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerConnectionPolicy) (result ServerConnectionPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerConnectionPoliciesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerConnectionPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServerConnectionPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerConnectionPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ServerConnectionPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, parameters ServerConnectionPolicy) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "connectionPolicyName": autorest.Encode("path", "default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Kind = nil - parameters.Location = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies/{connectionPolicyName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ServerConnectionPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ServerConnectionPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ServerConnectionPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets the server's secure connection policy. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client ServerConnectionPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string) (result ServerConnectionPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerConnectionPoliciesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerConnectionPoliciesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServerConnectionPoliciesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerConnectionPoliciesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ServerConnectionPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "connectionPolicyName": autorest.Encode("path", "default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies/{connectionPolicyName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ServerConnectionPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ServerConnectionPoliciesClient) GetResponder(resp *http.Response) (result ServerConnectionPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverdnsaliases.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverdnsaliases.go deleted file mode 100644 index 8304dd7bfbbe8..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverdnsaliases.go +++ /dev/null @@ -1,478 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ServerDNSAliasesClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type ServerDNSAliasesClient struct { - BaseClient -} - -// NewServerDNSAliasesClient creates an instance of the ServerDNSAliasesClient client. -func NewServerDNSAliasesClient(subscriptionID string) ServerDNSAliasesClient { - return NewServerDNSAliasesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewServerDNSAliasesClientWithBaseURI creates an instance of the ServerDNSAliasesClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewServerDNSAliasesClientWithBaseURI(baseURI string, subscriptionID string) ServerDNSAliasesClient { - return ServerDNSAliasesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Acquire acquires server DNS alias from another server. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server that the alias is pointing to. -// DNSAliasName - the name of the server dns alias. -func (client ServerDNSAliasesClient) Acquire(ctx context.Context, resourceGroupName string, serverName string, DNSAliasName string, parameters ServerDNSAliasAcquisition) (result ServerDNSAliasesAcquireFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerDNSAliasesClient.Acquire") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.AcquirePreparer(ctx, resourceGroupName, serverName, DNSAliasName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesClient", "Acquire", nil, "Failure preparing request") - return - } - - result, err = client.AcquireSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesClient", "Acquire", result.Response(), "Failure sending request") - return - } - - return -} - -// AcquirePreparer prepares the Acquire request. -func (client ServerDNSAliasesClient) AcquirePreparer(ctx context.Context, resourceGroupName string, serverName string, DNSAliasName string, parameters ServerDNSAliasAcquisition) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "dnsAliasName": autorest.Encode("path", DNSAliasName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}/acquire", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// AcquireSender sends the Acquire request. The method will close the -// http.Response Body if it receives an error. -func (client ServerDNSAliasesClient) AcquireSender(req *http.Request) (future ServerDNSAliasesAcquireFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// AcquireResponder handles the response to the Acquire request. The method always -// closes the http.Response Body. -func (client ServerDNSAliasesClient) AcquireResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// CreateOrUpdate creates a server dns alias. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server that the alias is pointing to. -// DNSAliasName - the name of the server DNS alias. -func (client ServerDNSAliasesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, DNSAliasName string) (result ServerDNSAliasesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerDNSAliasesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, DNSAliasName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ServerDNSAliasesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, DNSAliasName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "dnsAliasName": autorest.Encode("path", DNSAliasName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ServerDNSAliasesClient) CreateOrUpdateSender(req *http.Request) (future ServerDNSAliasesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ServerDNSAliasesClient) CreateOrUpdateResponder(resp *http.Response) (result ServerDNSAlias, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes the server DNS alias with the given name. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server that the alias is pointing to. -// DNSAliasName - the name of the server DNS alias. -func (client ServerDNSAliasesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, DNSAliasName string) (result ServerDNSAliasesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerDNSAliasesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, DNSAliasName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ServerDNSAliasesClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, DNSAliasName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "dnsAliasName": autorest.Encode("path", DNSAliasName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client ServerDNSAliasesClient) DeleteSender(req *http.Request) (future ServerDNSAliasesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ServerDNSAliasesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a server DNS alias. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server that the alias is pointing to. -// DNSAliasName - the name of the server DNS alias. -func (client ServerDNSAliasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, DNSAliasName string) (result ServerDNSAlias, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerDNSAliasesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, DNSAliasName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ServerDNSAliasesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, DNSAliasName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "dnsAliasName": autorest.Encode("path", DNSAliasName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ServerDNSAliasesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ServerDNSAliasesClient) GetResponder(resp *http.Response) (result ServerDNSAlias, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer gets a list of server DNS aliases for a server. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server that the alias is pointing to. -func (client ServerDNSAliasesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result ServerDNSAliasListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerDNSAliasesClient.ListByServer") - defer func() { - sc := -1 - if result.sdalr.Response.Response != nil { - sc = result.sdalr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByServerNextResults - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.sdalr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesClient", "ListByServer", resp, "Failure sending request") - return - } - - result.sdalr, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesClient", "ListByServer", resp, "Failure responding to request") - return - } - if result.sdalr.hasNextLink() && result.sdalr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client ServerDNSAliasesClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client ServerDNSAliasesClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client ServerDNSAliasesClient) ListByServerResponder(resp *http.Response) (result ServerDNSAliasListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByServerNextResults retrieves the next set of results, if any. -func (client ServerDNSAliasesClient) listByServerNextResults(ctx context.Context, lastResults ServerDNSAliasListResult) (result ServerDNSAliasListResult, err error) { - req, err := lastResults.serverDNSAliasListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.ServerDNSAliasesClient", "listByServerNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.ServerDNSAliasesClient", "listByServerNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesClient", "listByServerNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. -func (client ServerDNSAliasesClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result ServerDNSAliasListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerDNSAliasesClient.ListByServer") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByServer(ctx, resourceGroupName, serverName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverkeys.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverkeys.go deleted file mode 100644 index 54c560060bb9d..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverkeys.go +++ /dev/null @@ -1,401 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ServerKeysClient is the the Azure SQL Database management API provides a RESTful set of web services that interact -// with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and -// delete databases. -type ServerKeysClient struct { - BaseClient -} - -// NewServerKeysClient creates an instance of the ServerKeysClient client. -func NewServerKeysClient(subscriptionID string) ServerKeysClient { - return NewServerKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewServerKeysClientWithBaseURI creates an instance of the ServerKeysClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewServerKeysClientWithBaseURI(baseURI string, subscriptionID string) ServerKeysClient { - return ServerKeysClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a server key. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// keyName - the name of the server key to be operated on (updated or created). The key name is required to be -// in the format of 'vault_key_version'. For example, if the keyId is -// https://YourVaultName.vault.azure.net/keys/YourKeyName/01234567890123456789012345678901, then the server key -// name should be formatted as: YourVaultName_YourKeyName_01234567890123456789012345678901 -// parameters - the requested server key resource state. -func (client ServerKeysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, keyName string, parameters ServerKey) (result ServerKeysCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerKeysClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, keyName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerKeysClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerKeysClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ServerKeysClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, keyName string, parameters ServerKey) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "keyName": autorest.Encode("path", keyName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Location = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys/{keyName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ServerKeysClient) CreateOrUpdateSender(req *http.Request) (future ServerKeysCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ServerKeysClient) CreateOrUpdateResponder(resp *http.Response) (result ServerKey, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes the server key with the given name. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// keyName - the name of the server key to be deleted. -func (client ServerKeysClient) Delete(ctx context.Context, resourceGroupName string, serverName string, keyName string) (result ServerKeysDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerKeysClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, keyName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerKeysClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerKeysClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ServerKeysClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, keyName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "keyName": autorest.Encode("path", keyName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys/{keyName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client ServerKeysClient) DeleteSender(req *http.Request) (future ServerKeysDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ServerKeysClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a server key. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// keyName - the name of the server key to be retrieved. -func (client ServerKeysClient) Get(ctx context.Context, resourceGroupName string, serverName string, keyName string) (result ServerKey, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerKeysClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, keyName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerKeysClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServerKeysClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerKeysClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ServerKeysClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, keyName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "keyName": autorest.Encode("path", keyName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys/{keyName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ServerKeysClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ServerKeysClient) GetResponder(resp *http.Response) (result ServerKey, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer gets a list of server keys. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client ServerKeysClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result ServerKeyListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerKeysClient.ListByServer") - defer func() { - sc := -1 - if result.sklr.Response.Response != nil { - sc = result.sklr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByServerNextResults - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerKeysClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.sklr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServerKeysClient", "ListByServer", resp, "Failure sending request") - return - } - - result.sklr, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerKeysClient", "ListByServer", resp, "Failure responding to request") - return - } - if result.sklr.hasNextLink() && result.sklr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client ServerKeysClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client ServerKeysClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client ServerKeysClient) ListByServerResponder(resp *http.Response) (result ServerKeyListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByServerNextResults retrieves the next set of results, if any. -func (client ServerKeysClient) listByServerNextResults(ctx context.Context, lastResults ServerKeyListResult) (result ServerKeyListResult, err error) { - req, err := lastResults.serverKeyListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.ServerKeysClient", "listByServerNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.ServerKeysClient", "listByServerNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerKeysClient", "listByServerNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. -func (client ServerKeysClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result ServerKeyListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerKeysClient.ListByServer") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByServer(ctx, resourceGroupName, serverName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/servers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/servers.go deleted file mode 100644 index 84bd7821606a2..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/servers.go +++ /dev/null @@ -1,669 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ServersClient is the the Azure SQL Database management API provides a RESTful set of web services that interact with -// Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and delete -// databases. -type ServersClient struct { - BaseClient -} - -// NewServersClient creates an instance of the ServersClient client. -func NewServersClient(subscriptionID string) ServersClient { - return NewServersClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewServersClientWithBaseURI creates an instance of the ServersClient client using a custom endpoint. Use this when -// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersClient { - return ServersClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CheckNameAvailability determines whether a resource can be created with the specified name. -// Parameters: -// parameters - the parameters to request for name availability. -func (client ServersClient) CheckNameAvailability(ctx context.Context, parameters CheckNameAvailabilityRequest) (result CheckNameAvailabilityResponse, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.CheckNameAvailability") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Type", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("sql.ServersClient", "CheckNameAvailability", err.Error()) - } - - req, err := client.CheckNameAvailabilityPreparer(ctx, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "CheckNameAvailability", nil, "Failure preparing request") - return - } - - resp, err := client.CheckNameAvailabilitySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServersClient", "CheckNameAvailability", resp, "Failure sending request") - return - } - - result, err = client.CheckNameAvailabilityResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "CheckNameAvailability", resp, "Failure responding to request") - return - } - - return -} - -// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. -func (client ServersClient) CheckNameAvailabilityPreparer(ctx context.Context, parameters CheckNameAvailabilityRequest) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the -// http.Response Body if it receives an error. -func (client ServersClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always -// closes the http.Response Body. -func (client ServersClient) CheckNameAvailabilityResponder(resp *http.Response) (result CheckNameAvailabilityResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// CreateOrUpdate creates or updates a server. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// parameters - the requested server resource state. -func (client ServersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters Server) (result ServersCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ServersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, parameters Server) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Kind = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ServersClient) CreateOrUpdateSender(req *http.Request) (future ServersCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ServersClient) CreateOrUpdateResponder(resp *http.Response) (result Server, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a server. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client ServersClient) Delete(ctx context.Context, resourceGroupName string, serverName string) (result ServersDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ServersClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client ServersClient) DeleteSender(req *http.Request) (future ServersDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ServersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a server. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client ServersClient) Get(ctx context.Context, resourceGroupName string, serverName string) (result Server, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServersClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ServersClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ServersClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ServersClient) GetResponder(resp *http.Response) (result Server, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of all servers in the subscription. -func (client ServersClient) List(ctx context.Context) (result ServerListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.List") - defer func() { - sc := -1 - if result.slr.Response.Response != nil { - sc = result.slr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.slr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServersClient", "List", resp, "Failure sending request") - return - } - - result.slr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "List", resp, "Failure responding to request") - return - } - if result.slr.hasNextLink() && result.slr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client ServersClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client ServersClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client ServersClient) ListResponder(resp *http.Response) (result ServerListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client ServersClient) listNextResults(ctx context.Context, lastResults ServerListResult) (result ServerListResult, err error) { - req, err := lastResults.serverListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.ServersClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.ServersClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ServersClient) ListComplete(ctx context.Context) (result ServerListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx) - return -} - -// ListByResourceGroup gets a list of servers in a resource groups. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -func (client ServersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ServerListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.slr.Response.Response != nil { - sc = result.slr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.slr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServersClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - result.slr, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "ListByResourceGroup", resp, "Failure responding to request") - return - } - if result.slr.hasNextLink() && result.slr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client ServersClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client ServersClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client ServersClient) ListByResourceGroupResponder(resp *http.Response) (result ServerListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client ServersClient) listByResourceGroupNextResults(ctx context.Context, lastResults ServerListResult) (result ServerListResult, err error) { - req, err := lastResults.serverListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.ServersClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.ServersClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client ServersClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ServerListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// Update updates a server. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// parameters - the requested server resource state. -func (client ServersClient) Update(ctx context.Context, resourceGroupName string, serverName string, parameters ServerUpdate) (result ServersUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, serverName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client ServersClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, parameters ServerUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client ServersClient) UpdateSender(req *http.Request) (future ServersUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client ServersClient) UpdateResponder(resp *http.Response) (result Server, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serversecurityalertpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serversecurityalertpolicies.go deleted file mode 100644 index e024cf49175a0..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serversecurityalertpolicies.go +++ /dev/null @@ -1,315 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ServerSecurityAlertPoliciesClient is the the Azure SQL Database management API provides a RESTful set of web -// services that interact with Azure SQL Database services to manage your databases. The API enables you to create, -// retrieve, update, and delete databases. -type ServerSecurityAlertPoliciesClient struct { - BaseClient -} - -// NewServerSecurityAlertPoliciesClient creates an instance of the ServerSecurityAlertPoliciesClient client. -func NewServerSecurityAlertPoliciesClient(subscriptionID string) ServerSecurityAlertPoliciesClient { - return NewServerSecurityAlertPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewServerSecurityAlertPoliciesClientWithBaseURI creates an instance of the ServerSecurityAlertPoliciesClient client -// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign -// clouds, Azure stack). -func NewServerSecurityAlertPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServerSecurityAlertPoliciesClient { - return ServerSecurityAlertPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a threat detection policy. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// parameters - the server security alert policy. -func (client ServerSecurityAlertPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerSecurityAlertPolicy) (result ServerSecurityAlertPoliciesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerSecurityAlertPoliciesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerSecurityAlertPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerSecurityAlertPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ServerSecurityAlertPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, parameters ServerSecurityAlertPolicy) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "securityAlertPolicyName": autorest.Encode("path", "Default"), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ServerSecurityAlertPoliciesClient) CreateOrUpdateSender(req *http.Request) (future ServerSecurityAlertPoliciesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ServerSecurityAlertPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ServerSecurityAlertPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get get a server's security alert policy. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client ServerSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string) (result ServerSecurityAlertPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerSecurityAlertPoliciesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerSecurityAlertPoliciesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServerSecurityAlertPoliciesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerSecurityAlertPoliciesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ServerSecurityAlertPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "securityAlertPolicyName": autorest.Encode("path", "Default"), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ServerSecurityAlertPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ServerSecurityAlertPoliciesClient) GetResponder(resp *http.Response) (result ServerSecurityAlertPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer get the server's threat detection policies. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client ServerSecurityAlertPoliciesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result LogicalServerSecurityAlertPolicyListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerSecurityAlertPoliciesClient.ListByServer") - defer func() { - sc := -1 - if result.lssaplr.Response.Response != nil { - sc = result.lssaplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByServerNextResults - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerSecurityAlertPoliciesClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.lssaplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServerSecurityAlertPoliciesClient", "ListByServer", resp, "Failure sending request") - return - } - - result.lssaplr, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerSecurityAlertPoliciesClient", "ListByServer", resp, "Failure responding to request") - return - } - if result.lssaplr.hasNextLink() && result.lssaplr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client ServerSecurityAlertPoliciesClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-03-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client ServerSecurityAlertPoliciesClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client ServerSecurityAlertPoliciesClient) ListByServerResponder(resp *http.Response) (result LogicalServerSecurityAlertPolicyListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByServerNextResults retrieves the next set of results, if any. -func (client ServerSecurityAlertPoliciesClient) listByServerNextResults(ctx context.Context, lastResults LogicalServerSecurityAlertPolicyListResult) (result LogicalServerSecurityAlertPolicyListResult, err error) { - req, err := lastResults.logicalServerSecurityAlertPolicyListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.ServerSecurityAlertPoliciesClient", "listByServerNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.ServerSecurityAlertPoliciesClient", "listByServerNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerSecurityAlertPoliciesClient", "listByServerNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. -func (client ServerSecurityAlertPoliciesClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result LogicalServerSecurityAlertPolicyListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerSecurityAlertPoliciesClient.ListByServer") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByServer(ctx, resourceGroupName, serverName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverusages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverusages.go deleted file mode 100644 index 662861e4c6cff..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverusages.go +++ /dev/null @@ -1,110 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ServerUsagesClient is the the Azure SQL Database management API provides a RESTful set of web services that interact -// with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and -// delete databases. -type ServerUsagesClient struct { - BaseClient -} - -// NewServerUsagesClient creates an instance of the ServerUsagesClient client. -func NewServerUsagesClient(subscriptionID string) ServerUsagesClient { - return NewServerUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewServerUsagesClientWithBaseURI creates an instance of the ServerUsagesClient client using a custom endpoint. Use -// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewServerUsagesClientWithBaseURI(baseURI string, subscriptionID string) ServerUsagesClient { - return ServerUsagesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// ListByServer returns server usages. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client ServerUsagesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result ServerUsageListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerUsagesClient.ListByServer") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerUsagesClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServerUsagesClient", "ListByServer", resp, "Failure sending request") - return - } - - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerUsagesClient", "ListByServer", resp, "Failure responding to request") - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client ServerUsagesClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/usages", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client ServerUsagesClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client ServerUsagesClient) ListByServerResponder(resp *http.Response) (result ServerUsageListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serviceobjectives.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serviceobjectives.go deleted file mode 100644 index 0b21dd5344f94..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serviceobjectives.go +++ /dev/null @@ -1,190 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ServiceObjectivesClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type ServiceObjectivesClient struct { - BaseClient -} - -// NewServiceObjectivesClient creates an instance of the ServiceObjectivesClient client. -func NewServiceObjectivesClient(subscriptionID string) ServiceObjectivesClient { - return NewServiceObjectivesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewServiceObjectivesClientWithBaseURI creates an instance of the ServiceObjectivesClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewServiceObjectivesClientWithBaseURI(baseURI string, subscriptionID string) ServiceObjectivesClient { - return ServiceObjectivesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets a database service objective. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// serviceObjectiveName - the name of the service objective to retrieve. -func (client ServiceObjectivesClient) Get(ctx context.Context, resourceGroupName string, serverName string, serviceObjectiveName string) (result ServiceObjective, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceObjectivesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, serviceObjectiveName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServiceObjectivesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServiceObjectivesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServiceObjectivesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ServiceObjectivesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, serviceObjectiveName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "serviceObjectiveName": autorest.Encode("path", serviceObjectiveName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/serviceObjectives/{serviceObjectiveName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ServiceObjectivesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ServiceObjectivesClient) GetResponder(resp *http.Response) (result ServiceObjective, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer returns database service objectives. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client ServiceObjectivesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result ServiceObjectiveListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceObjectivesClient.ListByServer") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServiceObjectivesClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServiceObjectivesClient", "ListByServer", resp, "Failure sending request") - return - } - - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServiceObjectivesClient", "ListByServer", resp, "Failure responding to request") - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client ServiceObjectivesClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/serviceObjectives", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client ServiceObjectivesClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client ServiceObjectivesClient) ListByServerResponder(resp *http.Response) (result ServiceObjectiveListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/servicetieradvisors.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/servicetieradvisors.go deleted file mode 100644 index 7886aa5859956..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/servicetieradvisors.go +++ /dev/null @@ -1,194 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ServiceTierAdvisorsClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type ServiceTierAdvisorsClient struct { - BaseClient -} - -// NewServiceTierAdvisorsClient creates an instance of the ServiceTierAdvisorsClient client. -func NewServiceTierAdvisorsClient(subscriptionID string) ServiceTierAdvisorsClient { - return NewServiceTierAdvisorsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewServiceTierAdvisorsClientWithBaseURI creates an instance of the ServiceTierAdvisorsClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewServiceTierAdvisorsClientWithBaseURI(baseURI string, subscriptionID string) ServiceTierAdvisorsClient { - return ServiceTierAdvisorsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets a service tier advisor. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of database. -// serviceTierAdvisorName - the name of service tier advisor. -func (client ServiceTierAdvisorsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, serviceTierAdvisorName string) (result ServiceTierAdvisor, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceTierAdvisorsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName, serviceTierAdvisorName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServiceTierAdvisorsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServiceTierAdvisorsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServiceTierAdvisorsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ServiceTierAdvisorsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, serviceTierAdvisorName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "serviceTierAdvisorName": autorest.Encode("path", serviceTierAdvisorName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/serviceTierAdvisors/{serviceTierAdvisorName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ServiceTierAdvisorsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ServiceTierAdvisorsClient) GetResponder(resp *http.Response) (result ServiceTierAdvisor, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByDatabase returns service tier advisors for specified database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of database. -func (client ServiceTierAdvisorsClient) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result ServiceTierAdvisorListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceTierAdvisorsClient.ListByDatabase") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListByDatabasePreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServiceTierAdvisorsClient", "ListByDatabase", nil, "Failure preparing request") - return - } - - resp, err := client.ListByDatabaseSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServiceTierAdvisorsClient", "ListByDatabase", resp, "Failure sending request") - return - } - - result, err = client.ListByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServiceTierAdvisorsClient", "ListByDatabase", resp, "Failure responding to request") - return - } - - return -} - -// ListByDatabasePreparer prepares the ListByDatabase request. -func (client ServiceTierAdvisorsClient) ListByDatabasePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/serviceTierAdvisors", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByDatabaseSender sends the ListByDatabase request. The method will close the -// http.Response Body if it receives an error. -func (client ServiceTierAdvisorsClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always -// closes the http.Response Body. -func (client ServiceTierAdvisorsClient) ListByDatabaseResponder(resp *http.Response) (result ServiceTierAdvisorListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/subscriptionusages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/subscriptionusages.go deleted file mode 100644 index 2362a090b5724..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/subscriptionusages.go +++ /dev/null @@ -1,226 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// SubscriptionUsagesClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type SubscriptionUsagesClient struct { - BaseClient -} - -// NewSubscriptionUsagesClient creates an instance of the SubscriptionUsagesClient client. -func NewSubscriptionUsagesClient(subscriptionID string) SubscriptionUsagesClient { - return NewSubscriptionUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewSubscriptionUsagesClientWithBaseURI creates an instance of the SubscriptionUsagesClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewSubscriptionUsagesClientWithBaseURI(baseURI string, subscriptionID string) SubscriptionUsagesClient { - return SubscriptionUsagesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets a subscription usage metric. -// Parameters: -// locationName - the name of the region where the resource is located. -// usageName - name of usage metric to return. -func (client SubscriptionUsagesClient) Get(ctx context.Context, locationName string, usageName string) (result SubscriptionUsage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionUsagesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, locationName, usageName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SubscriptionUsagesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.SubscriptionUsagesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SubscriptionUsagesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client SubscriptionUsagesClient) GetPreparer(ctx context.Context, locationName string, usageName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "locationName": autorest.Encode("path", locationName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "usageName": autorest.Encode("path", usageName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages/{usageName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client SubscriptionUsagesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client SubscriptionUsagesClient) GetResponder(resp *http.Response) (result SubscriptionUsage, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByLocation gets all subscription usage metrics in a given location. -// Parameters: -// locationName - the name of the region where the resource is located. -func (client SubscriptionUsagesClient) ListByLocation(ctx context.Context, locationName string) (result SubscriptionUsageListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionUsagesClient.ListByLocation") - defer func() { - sc := -1 - if result.sulr.Response.Response != nil { - sc = result.sulr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByLocationNextResults - req, err := client.ListByLocationPreparer(ctx, locationName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SubscriptionUsagesClient", "ListByLocation", nil, "Failure preparing request") - return - } - - resp, err := client.ListByLocationSender(req) - if err != nil { - result.sulr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.SubscriptionUsagesClient", "ListByLocation", resp, "Failure sending request") - return - } - - result.sulr, err = client.ListByLocationResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SubscriptionUsagesClient", "ListByLocation", resp, "Failure responding to request") - return - } - if result.sulr.hasNextLink() && result.sulr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByLocationPreparer prepares the ListByLocation request. -func (client SubscriptionUsagesClient) ListByLocationPreparer(ctx context.Context, locationName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "locationName": autorest.Encode("path", locationName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByLocationSender sends the ListByLocation request. The method will close the -// http.Response Body if it receives an error. -func (client SubscriptionUsagesClient) ListByLocationSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByLocationResponder handles the response to the ListByLocation request. The method always -// closes the http.Response Body. -func (client SubscriptionUsagesClient) ListByLocationResponder(resp *http.Response) (result SubscriptionUsageListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByLocationNextResults retrieves the next set of results, if any. -func (client SubscriptionUsagesClient) listByLocationNextResults(ctx context.Context, lastResults SubscriptionUsageListResult) (result SubscriptionUsageListResult, err error) { - req, err := lastResults.subscriptionUsageListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.SubscriptionUsagesClient", "listByLocationNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByLocationSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.SubscriptionUsagesClient", "listByLocationNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByLocationResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SubscriptionUsagesClient", "listByLocationNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByLocationComplete enumerates all values, automatically crossing page boundaries as required. -func (client SubscriptionUsagesClient) ListByLocationComplete(ctx context.Context, locationName string) (result SubscriptionUsageListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionUsagesClient.ListByLocation") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByLocation(ctx, locationName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/syncagents.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/syncagents.go deleted file mode 100644 index 9ad3b1b33350f..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/syncagents.go +++ /dev/null @@ -1,597 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// SyncAgentsClient is the the Azure SQL Database management API provides a RESTful set of web services that interact -// with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and -// delete databases. -type SyncAgentsClient struct { - BaseClient -} - -// NewSyncAgentsClient creates an instance of the SyncAgentsClient client. -func NewSyncAgentsClient(subscriptionID string) SyncAgentsClient { - return NewSyncAgentsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewSyncAgentsClientWithBaseURI creates an instance of the SyncAgentsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewSyncAgentsClientWithBaseURI(baseURI string, subscriptionID string) SyncAgentsClient { - return SyncAgentsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a sync agent. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server on which the sync agent is hosted. -// syncAgentName - the name of the sync agent. -// parameters - the requested sync agent resource state. -func (client SyncAgentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string, parameters SyncAgent) (result SyncAgentsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncAgentsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, syncAgentName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client SyncAgentsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string, parameters SyncAgent) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "syncAgentName": autorest.Encode("path", syncAgentName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client SyncAgentsClient) CreateOrUpdateSender(req *http.Request) (future SyncAgentsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client SyncAgentsClient) CreateOrUpdateResponder(resp *http.Response) (result SyncAgent, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a sync agent. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server on which the sync agent is hosted. -// syncAgentName - the name of the sync agent. -func (client SyncAgentsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string) (result SyncAgentsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncAgentsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, syncAgentName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client SyncAgentsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "syncAgentName": autorest.Encode("path", syncAgentName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client SyncAgentsClient) DeleteSender(req *http.Request) (future SyncAgentsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client SyncAgentsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// GenerateKey generates a sync agent key. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server on which the sync agent is hosted. -// syncAgentName - the name of the sync agent. -func (client SyncAgentsClient) GenerateKey(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string) (result SyncAgentKeyProperties, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncAgentsClient.GenerateKey") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GenerateKeyPreparer(ctx, resourceGroupName, serverName, syncAgentName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "GenerateKey", nil, "Failure preparing request") - return - } - - resp, err := client.GenerateKeySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "GenerateKey", resp, "Failure sending request") - return - } - - result, err = client.GenerateKeyResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "GenerateKey", resp, "Failure responding to request") - return - } - - return -} - -// GenerateKeyPreparer prepares the GenerateKey request. -func (client SyncAgentsClient) GenerateKeyPreparer(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "syncAgentName": autorest.Encode("path", syncAgentName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/generateKey", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GenerateKeySender sends the GenerateKey request. The method will close the -// http.Response Body if it receives an error. -func (client SyncAgentsClient) GenerateKeySender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GenerateKeyResponder handles the response to the GenerateKey request. The method always -// closes the http.Response Body. -func (client SyncAgentsClient) GenerateKeyResponder(resp *http.Response) (result SyncAgentKeyProperties, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets a sync agent. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server on which the sync agent is hosted. -// syncAgentName - the name of the sync agent. -func (client SyncAgentsClient) Get(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string) (result SyncAgent, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncAgentsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, syncAgentName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client SyncAgentsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "syncAgentName": autorest.Encode("path", syncAgentName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client SyncAgentsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client SyncAgentsClient) GetResponder(resp *http.Response) (result SyncAgent, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer lists sync agents in a server. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server on which the sync agent is hosted. -func (client SyncAgentsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result SyncAgentListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncAgentsClient.ListByServer") - defer func() { - sc := -1 - if result.salr.Response.Response != nil { - sc = result.salr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByServerNextResults - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.salr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "ListByServer", resp, "Failure sending request") - return - } - - result.salr, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "ListByServer", resp, "Failure responding to request") - return - } - if result.salr.hasNextLink() && result.salr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client SyncAgentsClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client SyncAgentsClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client SyncAgentsClient) ListByServerResponder(resp *http.Response) (result SyncAgentListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByServerNextResults retrieves the next set of results, if any. -func (client SyncAgentsClient) listByServerNextResults(ctx context.Context, lastResults SyncAgentListResult) (result SyncAgentListResult, err error) { - req, err := lastResults.syncAgentListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "listByServerNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "listByServerNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "listByServerNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. -func (client SyncAgentsClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result SyncAgentListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncAgentsClient.ListByServer") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByServer(ctx, resourceGroupName, serverName) - return -} - -// ListLinkedDatabases lists databases linked to a sync agent. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server on which the sync agent is hosted. -// syncAgentName - the name of the sync agent. -func (client SyncAgentsClient) ListLinkedDatabases(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string) (result SyncAgentLinkedDatabaseListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncAgentsClient.ListLinkedDatabases") - defer func() { - sc := -1 - if result.saldlr.Response.Response != nil { - sc = result.saldlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listLinkedDatabasesNextResults - req, err := client.ListLinkedDatabasesPreparer(ctx, resourceGroupName, serverName, syncAgentName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "ListLinkedDatabases", nil, "Failure preparing request") - return - } - - resp, err := client.ListLinkedDatabasesSender(req) - if err != nil { - result.saldlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "ListLinkedDatabases", resp, "Failure sending request") - return - } - - result.saldlr, err = client.ListLinkedDatabasesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "ListLinkedDatabases", resp, "Failure responding to request") - return - } - if result.saldlr.hasNextLink() && result.saldlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListLinkedDatabasesPreparer prepares the ListLinkedDatabases request. -func (client SyncAgentsClient) ListLinkedDatabasesPreparer(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "syncAgentName": autorest.Encode("path", syncAgentName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/linkedDatabases", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListLinkedDatabasesSender sends the ListLinkedDatabases request. The method will close the -// http.Response Body if it receives an error. -func (client SyncAgentsClient) ListLinkedDatabasesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListLinkedDatabasesResponder handles the response to the ListLinkedDatabases request. The method always -// closes the http.Response Body. -func (client SyncAgentsClient) ListLinkedDatabasesResponder(resp *http.Response) (result SyncAgentLinkedDatabaseListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listLinkedDatabasesNextResults retrieves the next set of results, if any. -func (client SyncAgentsClient) listLinkedDatabasesNextResults(ctx context.Context, lastResults SyncAgentLinkedDatabaseListResult) (result SyncAgentLinkedDatabaseListResult, err error) { - req, err := lastResults.syncAgentLinkedDatabaseListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "listLinkedDatabasesNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListLinkedDatabasesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "listLinkedDatabasesNextResults", resp, "Failure sending next results request") - } - result, err = client.ListLinkedDatabasesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "listLinkedDatabasesNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListLinkedDatabasesComplete enumerates all values, automatically crossing page boundaries as required. -func (client SyncAgentsClient) ListLinkedDatabasesComplete(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string) (result SyncAgentLinkedDatabaseListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncAgentsClient.ListLinkedDatabases") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListLinkedDatabases(ctx, resourceGroupName, serverName, syncAgentName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/syncgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/syncgroups.go deleted file mode 100644 index 6d7db3c8d547e..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/syncgroups.go +++ /dev/null @@ -1,1107 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// SyncGroupsClient is the the Azure SQL Database management API provides a RESTful set of web services that interact -// with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and -// delete databases. -type SyncGroupsClient struct { - BaseClient -} - -// NewSyncGroupsClient creates an instance of the SyncGroupsClient client. -func NewSyncGroupsClient(subscriptionID string) SyncGroupsClient { - return NewSyncGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewSyncGroupsClientWithBaseURI creates an instance of the SyncGroupsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewSyncGroupsClientWithBaseURI(baseURI string, subscriptionID string) SyncGroupsClient { - return SyncGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CancelSync cancels a sync group synchronization. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database on which the sync group is hosted. -// syncGroupName - the name of the sync group. -func (client SyncGroupsClient) CancelSync(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncGroupsClient.CancelSync") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CancelSyncPreparer(ctx, resourceGroupName, serverName, databaseName, syncGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "CancelSync", nil, "Failure preparing request") - return - } - - resp, err := client.CancelSyncSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "CancelSync", resp, "Failure sending request") - return - } - - result, err = client.CancelSyncResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "CancelSync", resp, "Failure responding to request") - return - } - - return -} - -// CancelSyncPreparer prepares the CancelSync request. -func (client SyncGroupsClient) CancelSyncPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "syncGroupName": autorest.Encode("path", syncGroupName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/cancelSync", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CancelSyncSender sends the CancelSync request. The method will close the -// http.Response Body if it receives an error. -func (client SyncGroupsClient) CancelSyncSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CancelSyncResponder handles the response to the CancelSync request. The method always -// closes the http.Response Body. -func (client SyncGroupsClient) CancelSyncResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// CreateOrUpdate creates or updates a sync group. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database on which the sync group is hosted. -// syncGroupName - the name of the sync group. -// parameters - the requested sync group resource state. -func (client SyncGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, parameters SyncGroup) (result SyncGroupsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncGroupsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, syncGroupName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client SyncGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, parameters SyncGroup) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "syncGroupName": autorest.Encode("path", syncGroupName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client SyncGroupsClient) CreateOrUpdateSender(req *http.Request) (future SyncGroupsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client SyncGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result SyncGroup, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a sync group. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database on which the sync group is hosted. -// syncGroupName - the name of the sync group. -func (client SyncGroupsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result SyncGroupsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncGroupsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, databaseName, syncGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client SyncGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "syncGroupName": autorest.Encode("path", syncGroupName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client SyncGroupsClient) DeleteSender(req *http.Request) (future SyncGroupsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client SyncGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a sync group. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database on which the sync group is hosted. -// syncGroupName - the name of the sync group. -func (client SyncGroupsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result SyncGroup, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncGroupsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName, syncGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client SyncGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "syncGroupName": autorest.Encode("path", syncGroupName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client SyncGroupsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client SyncGroupsClient) GetResponder(resp *http.Response) (result SyncGroup, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByDatabase lists sync groups under a hub database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database on which the sync group is hosted. -func (client SyncGroupsClient) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result SyncGroupListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncGroupsClient.ListByDatabase") - defer func() { - sc := -1 - if result.sglr.Response.Response != nil { - sc = result.sglr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByDatabaseNextResults - req, err := client.ListByDatabasePreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListByDatabase", nil, "Failure preparing request") - return - } - - resp, err := client.ListByDatabaseSender(req) - if err != nil { - result.sglr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListByDatabase", resp, "Failure sending request") - return - } - - result.sglr, err = client.ListByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListByDatabase", resp, "Failure responding to request") - return - } - if result.sglr.hasNextLink() && result.sglr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByDatabasePreparer prepares the ListByDatabase request. -func (client SyncGroupsClient) ListByDatabasePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByDatabaseSender sends the ListByDatabase request. The method will close the -// http.Response Body if it receives an error. -func (client SyncGroupsClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always -// closes the http.Response Body. -func (client SyncGroupsClient) ListByDatabaseResponder(resp *http.Response) (result SyncGroupListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByDatabaseNextResults retrieves the next set of results, if any. -func (client SyncGroupsClient) listByDatabaseNextResults(ctx context.Context, lastResults SyncGroupListResult) (result SyncGroupListResult, err error) { - req, err := lastResults.syncGroupListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "listByDatabaseNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByDatabaseSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "listByDatabaseNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "listByDatabaseNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByDatabaseComplete enumerates all values, automatically crossing page boundaries as required. -func (client SyncGroupsClient) ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result SyncGroupListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncGroupsClient.ListByDatabase") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByDatabase(ctx, resourceGroupName, serverName, databaseName) - return -} - -// ListHubSchemas gets a collection of hub database schemas. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database on which the sync group is hosted. -// syncGroupName - the name of the sync group. -func (client SyncGroupsClient) ListHubSchemas(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result SyncFullSchemaPropertiesListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncGroupsClient.ListHubSchemas") - defer func() { - sc := -1 - if result.sfsplr.Response.Response != nil { - sc = result.sfsplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listHubSchemasNextResults - req, err := client.ListHubSchemasPreparer(ctx, resourceGroupName, serverName, databaseName, syncGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListHubSchemas", nil, "Failure preparing request") - return - } - - resp, err := client.ListHubSchemasSender(req) - if err != nil { - result.sfsplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListHubSchemas", resp, "Failure sending request") - return - } - - result.sfsplr, err = client.ListHubSchemasResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListHubSchemas", resp, "Failure responding to request") - return - } - if result.sfsplr.hasNextLink() && result.sfsplr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListHubSchemasPreparer prepares the ListHubSchemas request. -func (client SyncGroupsClient) ListHubSchemasPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "syncGroupName": autorest.Encode("path", syncGroupName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/hubSchemas", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListHubSchemasSender sends the ListHubSchemas request. The method will close the -// http.Response Body if it receives an error. -func (client SyncGroupsClient) ListHubSchemasSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListHubSchemasResponder handles the response to the ListHubSchemas request. The method always -// closes the http.Response Body. -func (client SyncGroupsClient) ListHubSchemasResponder(resp *http.Response) (result SyncFullSchemaPropertiesListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listHubSchemasNextResults retrieves the next set of results, if any. -func (client SyncGroupsClient) listHubSchemasNextResults(ctx context.Context, lastResults SyncFullSchemaPropertiesListResult) (result SyncFullSchemaPropertiesListResult, err error) { - req, err := lastResults.syncFullSchemaPropertiesListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "listHubSchemasNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListHubSchemasSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "listHubSchemasNextResults", resp, "Failure sending next results request") - } - result, err = client.ListHubSchemasResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "listHubSchemasNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListHubSchemasComplete enumerates all values, automatically crossing page boundaries as required. -func (client SyncGroupsClient) ListHubSchemasComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result SyncFullSchemaPropertiesListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncGroupsClient.ListHubSchemas") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListHubSchemas(ctx, resourceGroupName, serverName, databaseName, syncGroupName) - return -} - -// ListLogs gets a collection of sync group logs. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database on which the sync group is hosted. -// syncGroupName - the name of the sync group. -// startTime - get logs generated after this time. -// endTime - get logs generated before this time. -// typeParameter - the types of logs to retrieve. -// continuationToken - the continuation token for this operation. -func (client SyncGroupsClient) ListLogs(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, startTime string, endTime string, typeParameter string, continuationToken string) (result SyncGroupLogListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncGroupsClient.ListLogs") - defer func() { - sc := -1 - if result.sgllr.Response.Response != nil { - sc = result.sgllr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listLogsNextResults - req, err := client.ListLogsPreparer(ctx, resourceGroupName, serverName, databaseName, syncGroupName, startTime, endTime, typeParameter, continuationToken) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListLogs", nil, "Failure preparing request") - return - } - - resp, err := client.ListLogsSender(req) - if err != nil { - result.sgllr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListLogs", resp, "Failure sending request") - return - } - - result.sgllr, err = client.ListLogsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListLogs", resp, "Failure responding to request") - return - } - if result.sgllr.hasNextLink() && result.sgllr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListLogsPreparer prepares the ListLogs request. -func (client SyncGroupsClient) ListLogsPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, startTime string, endTime string, typeParameter string, continuationToken string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "syncGroupName": autorest.Encode("path", syncGroupName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - "endTime": autorest.Encode("query", endTime), - "startTime": autorest.Encode("query", startTime), - "type": autorest.Encode("query", typeParameter), - } - if len(continuationToken) > 0 { - queryParameters["continuationToken"] = autorest.Encode("query", continuationToken) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListLogsSender sends the ListLogs request. The method will close the -// http.Response Body if it receives an error. -func (client SyncGroupsClient) ListLogsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListLogsResponder handles the response to the ListLogs request. The method always -// closes the http.Response Body. -func (client SyncGroupsClient) ListLogsResponder(resp *http.Response) (result SyncGroupLogListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listLogsNextResults retrieves the next set of results, if any. -func (client SyncGroupsClient) listLogsNextResults(ctx context.Context, lastResults SyncGroupLogListResult) (result SyncGroupLogListResult, err error) { - req, err := lastResults.syncGroupLogListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "listLogsNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListLogsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "listLogsNextResults", resp, "Failure sending next results request") - } - result, err = client.ListLogsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "listLogsNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListLogsComplete enumerates all values, automatically crossing page boundaries as required. -func (client SyncGroupsClient) ListLogsComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, startTime string, endTime string, typeParameter string, continuationToken string) (result SyncGroupLogListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncGroupsClient.ListLogs") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListLogs(ctx, resourceGroupName, serverName, databaseName, syncGroupName, startTime, endTime, typeParameter, continuationToken) - return -} - -// ListSyncDatabaseIds gets a collection of sync database ids. -// Parameters: -// locationName - the name of the region where the resource is located. -func (client SyncGroupsClient) ListSyncDatabaseIds(ctx context.Context, locationName string) (result SyncDatabaseIDListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncGroupsClient.ListSyncDatabaseIds") - defer func() { - sc := -1 - if result.sdilr.Response.Response != nil { - sc = result.sdilr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listSyncDatabaseIdsNextResults - req, err := client.ListSyncDatabaseIdsPreparer(ctx, locationName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListSyncDatabaseIds", nil, "Failure preparing request") - return - } - - resp, err := client.ListSyncDatabaseIdsSender(req) - if err != nil { - result.sdilr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListSyncDatabaseIds", resp, "Failure sending request") - return - } - - result.sdilr, err = client.ListSyncDatabaseIdsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListSyncDatabaseIds", resp, "Failure responding to request") - return - } - if result.sdilr.hasNextLink() && result.sdilr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListSyncDatabaseIdsPreparer prepares the ListSyncDatabaseIds request. -func (client SyncGroupsClient) ListSyncDatabaseIdsPreparer(ctx context.Context, locationName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "locationName": autorest.Encode("path", locationName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSyncDatabaseIdsSender sends the ListSyncDatabaseIds request. The method will close the -// http.Response Body if it receives an error. -func (client SyncGroupsClient) ListSyncDatabaseIdsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListSyncDatabaseIdsResponder handles the response to the ListSyncDatabaseIds request. The method always -// closes the http.Response Body. -func (client SyncGroupsClient) ListSyncDatabaseIdsResponder(resp *http.Response) (result SyncDatabaseIDListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listSyncDatabaseIdsNextResults retrieves the next set of results, if any. -func (client SyncGroupsClient) listSyncDatabaseIdsNextResults(ctx context.Context, lastResults SyncDatabaseIDListResult) (result SyncDatabaseIDListResult, err error) { - req, err := lastResults.syncDatabaseIDListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "listSyncDatabaseIdsNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSyncDatabaseIdsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "listSyncDatabaseIdsNextResults", resp, "Failure sending next results request") - } - result, err = client.ListSyncDatabaseIdsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "listSyncDatabaseIdsNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListSyncDatabaseIdsComplete enumerates all values, automatically crossing page boundaries as required. -func (client SyncGroupsClient) ListSyncDatabaseIdsComplete(ctx context.Context, locationName string) (result SyncDatabaseIDListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncGroupsClient.ListSyncDatabaseIds") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListSyncDatabaseIds(ctx, locationName) - return -} - -// RefreshHubSchema refreshes a hub database schema. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database on which the sync group is hosted. -// syncGroupName - the name of the sync group. -func (client SyncGroupsClient) RefreshHubSchema(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result SyncGroupsRefreshHubSchemaFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncGroupsClient.RefreshHubSchema") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.RefreshHubSchemaPreparer(ctx, resourceGroupName, serverName, databaseName, syncGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "RefreshHubSchema", nil, "Failure preparing request") - return - } - - result, err = client.RefreshHubSchemaSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "RefreshHubSchema", result.Response(), "Failure sending request") - return - } - - return -} - -// RefreshHubSchemaPreparer prepares the RefreshHubSchema request. -func (client SyncGroupsClient) RefreshHubSchemaPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "syncGroupName": autorest.Encode("path", syncGroupName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/refreshHubSchema", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// RefreshHubSchemaSender sends the RefreshHubSchema request. The method will close the -// http.Response Body if it receives an error. -func (client SyncGroupsClient) RefreshHubSchemaSender(req *http.Request) (future SyncGroupsRefreshHubSchemaFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// RefreshHubSchemaResponder handles the response to the RefreshHubSchema request. The method always -// closes the http.Response Body. -func (client SyncGroupsClient) RefreshHubSchemaResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// TriggerSync triggers a sync group synchronization. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database on which the sync group is hosted. -// syncGroupName - the name of the sync group. -func (client SyncGroupsClient) TriggerSync(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncGroupsClient.TriggerSync") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.TriggerSyncPreparer(ctx, resourceGroupName, serverName, databaseName, syncGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "TriggerSync", nil, "Failure preparing request") - return - } - - resp, err := client.TriggerSyncSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "TriggerSync", resp, "Failure sending request") - return - } - - result, err = client.TriggerSyncResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "TriggerSync", resp, "Failure responding to request") - return - } - - return -} - -// TriggerSyncPreparer prepares the TriggerSync request. -func (client SyncGroupsClient) TriggerSyncPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "syncGroupName": autorest.Encode("path", syncGroupName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/triggerSync", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// TriggerSyncSender sends the TriggerSync request. The method will close the -// http.Response Body if it receives an error. -func (client SyncGroupsClient) TriggerSyncSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// TriggerSyncResponder handles the response to the TriggerSync request. The method always -// closes the http.Response Body. -func (client SyncGroupsClient) TriggerSyncResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// Update updates a sync group. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database on which the sync group is hosted. -// syncGroupName - the name of the sync group. -// parameters - the requested sync group resource state. -func (client SyncGroupsClient) Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, parameters SyncGroup) (result SyncGroupsUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncGroupsClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, serverName, databaseName, syncGroupName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client SyncGroupsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, parameters SyncGroup) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "syncGroupName": autorest.Encode("path", syncGroupName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client SyncGroupsClient) UpdateSender(req *http.Request) (future SyncGroupsUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client SyncGroupsClient) UpdateResponder(resp *http.Response) (result SyncGroup, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/syncmembers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/syncmembers.go deleted file mode 100644 index 65bbe6fa921de..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/syncmembers.go +++ /dev/null @@ -1,712 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// SyncMembersClient is the the Azure SQL Database management API provides a RESTful set of web services that interact -// with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and -// delete databases. -type SyncMembersClient struct { - BaseClient -} - -// NewSyncMembersClient creates an instance of the SyncMembersClient client. -func NewSyncMembersClient(subscriptionID string) SyncMembersClient { - return NewSyncMembersClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewSyncMembersClientWithBaseURI creates an instance of the SyncMembersClient client using a custom endpoint. Use -// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewSyncMembersClientWithBaseURI(baseURI string, subscriptionID string) SyncMembersClient { - return SyncMembersClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a sync member. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database on which the sync group is hosted. -// syncGroupName - the name of the sync group on which the sync member is hosted. -// syncMemberName - the name of the sync member. -// parameters - the requested sync member resource state. -func (client SyncMembersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, parameters SyncMember) (result SyncMembersCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncMembersClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client SyncMembersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, parameters SyncMember) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "syncGroupName": autorest.Encode("path", syncGroupName), - "syncMemberName": autorest.Encode("path", syncMemberName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client SyncMembersClient) CreateOrUpdateSender(req *http.Request) (future SyncMembersCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client SyncMembersClient) CreateOrUpdateResponder(resp *http.Response) (result SyncMember, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a sync member. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database on which the sync group is hosted. -// syncGroupName - the name of the sync group on which the sync member is hosted. -// syncMemberName - the name of the sync member. -func (client SyncMembersClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result SyncMembersDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncMembersClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client SyncMembersClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "syncGroupName": autorest.Encode("path", syncGroupName), - "syncMemberName": autorest.Encode("path", syncMemberName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client SyncMembersClient) DeleteSender(req *http.Request) (future SyncMembersDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client SyncMembersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a sync member. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database on which the sync group is hosted. -// syncGroupName - the name of the sync group on which the sync member is hosted. -// syncMemberName - the name of the sync member. -func (client SyncMembersClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result SyncMember, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncMembersClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client SyncMembersClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "syncGroupName": autorest.Encode("path", syncGroupName), - "syncMemberName": autorest.Encode("path", syncMemberName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client SyncMembersClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client SyncMembersClient) GetResponder(resp *http.Response) (result SyncMember, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListBySyncGroup lists sync members in the given sync group. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database on which the sync group is hosted. -// syncGroupName - the name of the sync group. -func (client SyncMembersClient) ListBySyncGroup(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result SyncMemberListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncMembersClient.ListBySyncGroup") - defer func() { - sc := -1 - if result.smlr.Response.Response != nil { - sc = result.smlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listBySyncGroupNextResults - req, err := client.ListBySyncGroupPreparer(ctx, resourceGroupName, serverName, databaseName, syncGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "ListBySyncGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListBySyncGroupSender(req) - if err != nil { - result.smlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "ListBySyncGroup", resp, "Failure sending request") - return - } - - result.smlr, err = client.ListBySyncGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "ListBySyncGroup", resp, "Failure responding to request") - return - } - if result.smlr.hasNextLink() && result.smlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListBySyncGroupPreparer prepares the ListBySyncGroup request. -func (client SyncMembersClient) ListBySyncGroupPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "syncGroupName": autorest.Encode("path", syncGroupName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListBySyncGroupSender sends the ListBySyncGroup request. The method will close the -// http.Response Body if it receives an error. -func (client SyncMembersClient) ListBySyncGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListBySyncGroupResponder handles the response to the ListBySyncGroup request. The method always -// closes the http.Response Body. -func (client SyncMembersClient) ListBySyncGroupResponder(resp *http.Response) (result SyncMemberListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listBySyncGroupNextResults retrieves the next set of results, if any. -func (client SyncMembersClient) listBySyncGroupNextResults(ctx context.Context, lastResults SyncMemberListResult) (result SyncMemberListResult, err error) { - req, err := lastResults.syncMemberListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.SyncMembersClient", "listBySyncGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListBySyncGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.SyncMembersClient", "listBySyncGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListBySyncGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "listBySyncGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListBySyncGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client SyncMembersClient) ListBySyncGroupComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result SyncMemberListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncMembersClient.ListBySyncGroup") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListBySyncGroup(ctx, resourceGroupName, serverName, databaseName, syncGroupName) - return -} - -// ListMemberSchemas gets a sync member database schema. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database on which the sync group is hosted. -// syncGroupName - the name of the sync group on which the sync member is hosted. -// syncMemberName - the name of the sync member. -func (client SyncMembersClient) ListMemberSchemas(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result SyncFullSchemaPropertiesListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncMembersClient.ListMemberSchemas") - defer func() { - sc := -1 - if result.sfsplr.Response.Response != nil { - sc = result.sfsplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listMemberSchemasNextResults - req, err := client.ListMemberSchemasPreparer(ctx, resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "ListMemberSchemas", nil, "Failure preparing request") - return - } - - resp, err := client.ListMemberSchemasSender(req) - if err != nil { - result.sfsplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "ListMemberSchemas", resp, "Failure sending request") - return - } - - result.sfsplr, err = client.ListMemberSchemasResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "ListMemberSchemas", resp, "Failure responding to request") - return - } - if result.sfsplr.hasNextLink() && result.sfsplr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListMemberSchemasPreparer prepares the ListMemberSchemas request. -func (client SyncMembersClient) ListMemberSchemasPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "syncGroupName": autorest.Encode("path", syncGroupName), - "syncMemberName": autorest.Encode("path", syncMemberName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/schemas", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListMemberSchemasSender sends the ListMemberSchemas request. The method will close the -// http.Response Body if it receives an error. -func (client SyncMembersClient) ListMemberSchemasSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListMemberSchemasResponder handles the response to the ListMemberSchemas request. The method always -// closes the http.Response Body. -func (client SyncMembersClient) ListMemberSchemasResponder(resp *http.Response) (result SyncFullSchemaPropertiesListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listMemberSchemasNextResults retrieves the next set of results, if any. -func (client SyncMembersClient) listMemberSchemasNextResults(ctx context.Context, lastResults SyncFullSchemaPropertiesListResult) (result SyncFullSchemaPropertiesListResult, err error) { - req, err := lastResults.syncFullSchemaPropertiesListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.SyncMembersClient", "listMemberSchemasNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListMemberSchemasSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.SyncMembersClient", "listMemberSchemasNextResults", resp, "Failure sending next results request") - } - result, err = client.ListMemberSchemasResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "listMemberSchemasNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListMemberSchemasComplete enumerates all values, automatically crossing page boundaries as required. -func (client SyncMembersClient) ListMemberSchemasComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result SyncFullSchemaPropertiesListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncMembersClient.ListMemberSchemas") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListMemberSchemas(ctx, resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName) - return -} - -// RefreshMemberSchema refreshes a sync member database schema. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database on which the sync group is hosted. -// syncGroupName - the name of the sync group on which the sync member is hosted. -// syncMemberName - the name of the sync member. -func (client SyncMembersClient) RefreshMemberSchema(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result SyncMembersRefreshMemberSchemaFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncMembersClient.RefreshMemberSchema") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.RefreshMemberSchemaPreparer(ctx, resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "RefreshMemberSchema", nil, "Failure preparing request") - return - } - - result, err = client.RefreshMemberSchemaSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "RefreshMemberSchema", result.Response(), "Failure sending request") - return - } - - return -} - -// RefreshMemberSchemaPreparer prepares the RefreshMemberSchema request. -func (client SyncMembersClient) RefreshMemberSchemaPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "syncGroupName": autorest.Encode("path", syncGroupName), - "syncMemberName": autorest.Encode("path", syncMemberName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/refreshSchema", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// RefreshMemberSchemaSender sends the RefreshMemberSchema request. The method will close the -// http.Response Body if it receives an error. -func (client SyncMembersClient) RefreshMemberSchemaSender(req *http.Request) (future SyncMembersRefreshMemberSchemaFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// RefreshMemberSchemaResponder handles the response to the RefreshMemberSchema request. The method always -// closes the http.Response Body. -func (client SyncMembersClient) RefreshMemberSchemaResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Update updates an existing sync member. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database on which the sync group is hosted. -// syncGroupName - the name of the sync group on which the sync member is hosted. -// syncMemberName - the name of the sync member. -// parameters - the requested sync member resource state. -func (client SyncMembersClient) Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, parameters SyncMember) (result SyncMembersUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SyncMembersClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client SyncMembersClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, parameters SyncMember) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "syncGroupName": autorest.Encode("path", syncGroupName), - "syncMemberName": autorest.Encode("path", syncMemberName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client SyncMembersClient) UpdateSender(req *http.Request) (future SyncMembersUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client SyncMembersClient) UpdateResponder(resp *http.Response) (result SyncMember, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/transparentdataencryptionactivities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/transparentdataencryptionactivities.go deleted file mode 100644 index 309e0d47eb0dc..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/transparentdataencryptionactivities.go +++ /dev/null @@ -1,115 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// TransparentDataEncryptionActivitiesClient is the the Azure SQL Database management API provides a RESTful set of web -// services that interact with Azure SQL Database services to manage your databases. The API enables you to create, -// retrieve, update, and delete databases. -type TransparentDataEncryptionActivitiesClient struct { - BaseClient -} - -// NewTransparentDataEncryptionActivitiesClient creates an instance of the TransparentDataEncryptionActivitiesClient -// client. -func NewTransparentDataEncryptionActivitiesClient(subscriptionID string) TransparentDataEncryptionActivitiesClient { - return NewTransparentDataEncryptionActivitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewTransparentDataEncryptionActivitiesClientWithBaseURI creates an instance of the -// TransparentDataEncryptionActivitiesClient client using a custom endpoint. Use this when interacting with an Azure -// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewTransparentDataEncryptionActivitiesClientWithBaseURI(baseURI string, subscriptionID string) TransparentDataEncryptionActivitiesClient { - return TransparentDataEncryptionActivitiesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// ListByConfiguration returns a database's transparent data encryption operation result. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database for which the transparent data encryption applies. -func (client TransparentDataEncryptionActivitiesClient) ListByConfiguration(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result TransparentDataEncryptionActivityListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TransparentDataEncryptionActivitiesClient.ListByConfiguration") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListByConfigurationPreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.TransparentDataEncryptionActivitiesClient", "ListByConfiguration", nil, "Failure preparing request") - return - } - - resp, err := client.ListByConfigurationSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.TransparentDataEncryptionActivitiesClient", "ListByConfiguration", resp, "Failure sending request") - return - } - - result, err = client.ListByConfigurationResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.TransparentDataEncryptionActivitiesClient", "ListByConfiguration", resp, "Failure responding to request") - return - } - - return -} - -// ListByConfigurationPreparer prepares the ListByConfiguration request. -func (client TransparentDataEncryptionActivitiesClient) ListByConfigurationPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "transparentDataEncryptionName": autorest.Encode("path", "current"), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{transparentDataEncryptionName}/operationResults", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByConfigurationSender sends the ListByConfiguration request. The method will close the -// http.Response Body if it receives an error. -func (client TransparentDataEncryptionActivitiesClient) ListByConfigurationSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByConfigurationResponder handles the response to the ListByConfiguration request. The method always -// closes the http.Response Body. -func (client TransparentDataEncryptionActivitiesClient) ListByConfigurationResponder(resp *http.Response) (result TransparentDataEncryptionActivityListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/transparentdataencryptions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/transparentdataencryptions.go deleted file mode 100644 index 691b41cd14646..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/transparentdataencryptions.go +++ /dev/null @@ -1,198 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// TransparentDataEncryptionsClient is the the Azure SQL Database management API provides a RESTful set of web services -// that interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, -// update, and delete databases. -type TransparentDataEncryptionsClient struct { - BaseClient -} - -// NewTransparentDataEncryptionsClient creates an instance of the TransparentDataEncryptionsClient client. -func NewTransparentDataEncryptionsClient(subscriptionID string) TransparentDataEncryptionsClient { - return NewTransparentDataEncryptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewTransparentDataEncryptionsClientWithBaseURI creates an instance of the TransparentDataEncryptionsClient client -// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign -// clouds, Azure stack). -func NewTransparentDataEncryptionsClientWithBaseURI(baseURI string, subscriptionID string) TransparentDataEncryptionsClient { - return TransparentDataEncryptionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a database's transparent data encryption configuration. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database for which setting the transparent data encryption applies. -// parameters - the required parameters for creating or updating transparent data encryption. -func (client TransparentDataEncryptionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters TransparentDataEncryption) (result TransparentDataEncryption, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TransparentDataEncryptionsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.TransparentDataEncryptionsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.TransparentDataEncryptionsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.TransparentDataEncryptionsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client TransparentDataEncryptionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters TransparentDataEncryption) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "transparentDataEncryptionName": autorest.Encode("path", "current"), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Location = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{transparentDataEncryptionName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client TransparentDataEncryptionsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client TransparentDataEncryptionsClient) CreateOrUpdateResponder(resp *http.Response) (result TransparentDataEncryption, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets a database's transparent data encryption configuration. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database for which the transparent data encryption applies. -func (client TransparentDataEncryptionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result TransparentDataEncryption, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TransparentDataEncryptionsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.TransparentDataEncryptionsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.TransparentDataEncryptionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.TransparentDataEncryptionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client TransparentDataEncryptionsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "transparentDataEncryptionName": autorest.Encode("path", "current"), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{transparentDataEncryptionName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client TransparentDataEncryptionsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client TransparentDataEncryptionsClient) GetResponder(resp *http.Response) (result TransparentDataEncryption, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/version.go deleted file mode 100644 index acae3d5260d2f..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/version.go +++ /dev/null @@ -1,19 +0,0 @@ -package sql - -import "github.com/Azure/azure-sdk-for-go/version" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// UserAgent returns the UserAgent string to use when sending http.Requests. -func UserAgent() string { - return "Azure-SDK-For-Go/" + Version() + " sql/2017-03-01-preview" -} - -// Version returns the semantic version (see http://semver.org) of the client. -func Version() string { - return version.Number -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/virtualclusters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/virtualclusters.go deleted file mode 100644 index a5f661baaf7b2..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/virtualclusters.go +++ /dev/null @@ -1,502 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// VirtualClustersClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type VirtualClustersClient struct { - BaseClient -} - -// NewVirtualClustersClient creates an instance of the VirtualClustersClient client. -func NewVirtualClustersClient(subscriptionID string) VirtualClustersClient { - return NewVirtualClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVirtualClustersClientWithBaseURI creates an instance of the VirtualClustersClient client using a custom endpoint. -// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewVirtualClustersClientWithBaseURI(baseURI string, subscriptionID string) VirtualClustersClient { - return VirtualClustersClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Delete deletes a virtual cluster. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// virtualClusterName - the name of the virtual cluster. -func (client VirtualClustersClient) Delete(ctx context.Context, resourceGroupName string, virtualClusterName string) (result VirtualClustersDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualClustersClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, virtualClusterName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualClustersClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualClustersClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client VirtualClustersClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualClusterName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualClusterName": autorest.Encode("path", virtualClusterName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualClustersClient) DeleteSender(req *http.Request) (future VirtualClustersDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client VirtualClustersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a virtual cluster. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// virtualClusterName - the name of the virtual cluster. -func (client VirtualClustersClient) Get(ctx context.Context, resourceGroupName string, virtualClusterName string) (result VirtualCluster, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualClustersClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, virtualClusterName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualClustersClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.VirtualClustersClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualClustersClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client VirtualClustersClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualClusterName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualClusterName": autorest.Encode("path", virtualClusterName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualClustersClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client VirtualClustersClient) GetResponder(resp *http.Response) (result VirtualCluster, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of all virtualClusters in the subscription. -func (client VirtualClustersClient) List(ctx context.Context) (result VirtualClusterListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualClustersClient.List") - defer func() { - sc := -1 - if result.vclr.Response.Response != nil { - sc = result.vclr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualClustersClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.vclr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.VirtualClustersClient", "List", resp, "Failure sending request") - return - } - - result.vclr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualClustersClient", "List", resp, "Failure responding to request") - return - } - if result.vclr.hasNextLink() && result.vclr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client VirtualClustersClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualClustersClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client VirtualClustersClient) ListResponder(resp *http.Response) (result VirtualClusterListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client VirtualClustersClient) listNextResults(ctx context.Context, lastResults VirtualClusterListResult) (result VirtualClusterListResult, err error) { - req, err := lastResults.virtualClusterListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.VirtualClustersClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.VirtualClustersClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualClustersClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualClustersClient) ListComplete(ctx context.Context) (result VirtualClusterListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualClustersClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx) - return -} - -// ListByResourceGroup gets a list of virtual clusters in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -func (client VirtualClustersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result VirtualClusterListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualClustersClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.vclr.Response.Response != nil { - sc = result.vclr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualClustersClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.vclr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.VirtualClustersClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - result.vclr, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualClustersClient", "ListByResourceGroup", resp, "Failure responding to request") - return - } - if result.vclr.hasNextLink() && result.vclr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client VirtualClustersClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualClustersClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client VirtualClustersClient) ListByResourceGroupResponder(resp *http.Response) (result VirtualClusterListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client VirtualClustersClient) listByResourceGroupNextResults(ctx context.Context, lastResults VirtualClusterListResult) (result VirtualClusterListResult, err error) { - req, err := lastResults.virtualClusterListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.VirtualClustersClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.VirtualClustersClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualClustersClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualClustersClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result VirtualClusterListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualClustersClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// Update updates a virtual cluster. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// virtualClusterName - the name of the virtual cluster. -// parameters - the requested managed instance resource state. -func (client VirtualClustersClient) Update(ctx context.Context, resourceGroupName string, virtualClusterName string, parameters VirtualClusterUpdate) (result VirtualClustersUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualClustersClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, virtualClusterName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualClustersClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualClustersClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client VirtualClustersClient) UpdatePreparer(ctx context.Context, resourceGroupName string, virtualClusterName string, parameters VirtualClusterUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualClusterName": autorest.Encode("path", virtualClusterName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualClustersClient) UpdateSender(req *http.Request) (future VirtualClustersUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client VirtualClustersClient) UpdateResponder(resp *http.Response) (result VirtualCluster, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/virtualnetworkrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/virtualnetworkrules.go deleted file mode 100644 index 91880b34fb829..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/virtualnetworkrules.go +++ /dev/null @@ -1,406 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// VirtualNetworkRulesClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type VirtualNetworkRulesClient struct { - BaseClient -} - -// NewVirtualNetworkRulesClient creates an instance of the VirtualNetworkRulesClient client. -func NewVirtualNetworkRulesClient(subscriptionID string) VirtualNetworkRulesClient { - return NewVirtualNetworkRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVirtualNetworkRulesClientWithBaseURI creates an instance of the VirtualNetworkRulesClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewVirtualNetworkRulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkRulesClient { - return VirtualNetworkRulesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates an existing virtual network rule. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// virtualNetworkRuleName - the name of the virtual network rule. -// parameters - the requested virtual Network Rule Resource state. -func (client VirtualNetworkRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, parameters VirtualNetworkRule) (result VirtualNetworkRulesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkRuleProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkRuleProperties.VirtualNetworkSubnetID", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("sql.VirtualNetworkRulesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, virtualNetworkRuleName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client VirtualNetworkRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, parameters VirtualNetworkRule) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkRuleName": autorest.Encode("path", virtualNetworkRuleName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkRulesClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkRulesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client VirtualNetworkRulesClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetworkRule, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes the virtual network rule with the given name. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// virtualNetworkRuleName - the name of the virtual network rule. -func (client VirtualNetworkRulesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result VirtualNetworkRulesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, virtualNetworkRuleName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client VirtualNetworkRulesClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkRuleName": autorest.Encode("path", virtualNetworkRuleName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkRulesClient) DeleteSender(req *http.Request) (future VirtualNetworkRulesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client VirtualNetworkRulesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a virtual network rule. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// virtualNetworkRuleName - the name of the virtual network rule. -func (client VirtualNetworkRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result VirtualNetworkRule, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, virtualNetworkRuleName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client VirtualNetworkRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkRuleName": autorest.Encode("path", virtualNetworkRuleName), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkRulesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client VirtualNetworkRulesClient) GetResponder(resp *http.Response) (result VirtualNetworkRule, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer gets a list of virtual network rules in a server. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client VirtualNetworkRulesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result VirtualNetworkRuleListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.ListByServer") - defer func() { - sc := -1 - if result.vnrlr.Response.Response != nil { - sc = result.vnrlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByServerNextResults - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.vnrlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "ListByServer", resp, "Failure sending request") - return - } - - result.vnrlr, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "ListByServer", resp, "Failure responding to request") - return - } - if result.vnrlr.hasNextLink() && result.vnrlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client VirtualNetworkRulesClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkRulesClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client VirtualNetworkRulesClient) ListByServerResponder(resp *http.Response) (result VirtualNetworkRuleListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByServerNextResults retrieves the next set of results, if any. -func (client VirtualNetworkRulesClient) listByServerNextResults(ctx context.Context, lastResults VirtualNetworkRuleListResult) (result VirtualNetworkRuleListResult, err error) { - req, err := lastResults.virtualNetworkRuleListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "listByServerNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "listByServerNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "listByServerNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualNetworkRulesClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result VirtualNetworkRuleListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.ListByServer") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByServer(ctx, resourceGroupName, serverName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/CHANGELOG.md deleted file mode 100644 index 52911e4cc5e4c..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Change History - diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/_meta.json b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/_meta.json deleted file mode 100644 index 66cbec1fe4873..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/_meta.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", - "readme": "/_/azure-rest-api-specs/specification/sql/resource-manager/readme.md", - "tag": "package-pure-2018-06-preview", - "use": "@microsoft.azure/autorest.go@2.1.187", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-pure-2018-06-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/sql/resource-manager/readme.md", - "additional_properties": { - "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION" - } -} \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/client.go deleted file mode 100644 index e9cb10ec93598..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/client.go +++ /dev/null @@ -1,44 +0,0 @@ -// Deprecated: Please note, this package has been deprecated. A replacement package is available [github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql). We strongly encourage you to upgrade to continue receiving updates. See [Migration Guide](https://aka.ms/azsdk/golang/t2/migration) for guidance on upgrading. Refer to our [deprecation policy](https://azure.github.io/azure-sdk/policies_support.html) for more details. -// -// Package sql implements the Azure ARM Sql service API version 2018-06-01-preview. -// -// The Azure SQL Database management API provides a RESTful set of web services that interact with Azure SQL Database -// services to manage your databases. The API enables you to create, retrieve, update, and delete databases. -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "github.com/Azure/go-autorest/autorest" -) - -const ( - // DefaultBaseURI is the default URI used for the service Sql - DefaultBaseURI = "https://management.azure.com" -) - -// BaseClient is the base client for Sql. -type BaseClient struct { - autorest.Client - BaseURI string - SubscriptionID string -} - -// New creates an instance of the BaseClient client. -func New(subscriptionID string) BaseClient { - return NewWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with -// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { - return BaseClient{ - Client: autorest.NewClientWithUserAgent(UserAgent()), - BaseURI: baseURI, - SubscriptionID: subscriptionID, - } -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/databases.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/databases.go deleted file mode 100644 index 4c3ae071cab3e..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/databases.go +++ /dev/null @@ -1,118 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// DatabasesClient is the the Azure SQL Database management API provides a RESTful set of web services that interact -// with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and -// delete databases. -type DatabasesClient struct { - BaseClient -} - -// NewDatabasesClient creates an instance of the DatabasesClient client. -func NewDatabasesClient(subscriptionID string) DatabasesClient { - return NewDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) DatabasesClient { - return DatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Failover failovers a database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database to failover. -// replicaType - the type of replica to be failed over. -func (client DatabasesClient) Failover(ctx context.Context, resourceGroupName string, serverName string, databaseName string, replicaType ReplicaType) (result DatabasesFailoverFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Failover") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.FailoverPreparer(ctx, resourceGroupName, serverName, databaseName, replicaType) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Failover", nil, "Failure preparing request") - return - } - - result, err = client.FailoverSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Failover", result.Response(), "Failure sending request") - return - } - - return -} - -// FailoverPreparer prepares the Failover request. -func (client DatabasesClient) FailoverPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, replicaType ReplicaType) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(string(replicaType)) > 0 { - queryParameters["replicaType"] = autorest.Encode("query", replicaType) - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/failover", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// FailoverSender sends the Failover request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) FailoverSender(req *http.Request) (future DatabasesFailoverFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// FailoverResponder handles the response to the Failover request. The method always -// closes the http.Response Body. -func (client DatabasesClient) FailoverResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/databasesecurityalertpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/databasesecurityalertpolicies.go deleted file mode 100644 index ff3bbd507f77c..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/databasesecurityalertpolicies.go +++ /dev/null @@ -1,318 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// DatabaseSecurityAlertPoliciesClient is the the Azure SQL Database management API provides a RESTful set of web -// services that interact with Azure SQL Database services to manage your databases. The API enables you to create, -// retrieve, update, and delete databases. -type DatabaseSecurityAlertPoliciesClient struct { - BaseClient -} - -// NewDatabaseSecurityAlertPoliciesClient creates an instance of the DatabaseSecurityAlertPoliciesClient client. -func NewDatabaseSecurityAlertPoliciesClient(subscriptionID string) DatabaseSecurityAlertPoliciesClient { - return NewDatabaseSecurityAlertPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewDatabaseSecurityAlertPoliciesClientWithBaseURI creates an instance of the DatabaseSecurityAlertPoliciesClient -// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI -// (sovereign clouds, Azure stack). -func NewDatabaseSecurityAlertPoliciesClientWithBaseURI(baseURI string, subscriptionID string) DatabaseSecurityAlertPoliciesClient { - return DatabaseSecurityAlertPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a database's security alert policy. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database for which the security alert policy is defined. -// parameters - the database security alert policy. -func (client DatabaseSecurityAlertPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseSecurityAlertPolicy) (result DatabaseSecurityAlertPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseSecurityAlertPoliciesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseSecurityAlertPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabaseSecurityAlertPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseSecurityAlertPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DatabaseSecurityAlertPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseSecurityAlertPolicy) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "securityAlertPolicyName": autorest.Encode("path", "default"), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client DatabaseSecurityAlertPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client DatabaseSecurityAlertPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result DatabaseSecurityAlertPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets a database's security alert policy. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database for which the security alert policy is defined. -func (client DatabaseSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabaseSecurityAlertPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseSecurityAlertPoliciesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseSecurityAlertPoliciesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabaseSecurityAlertPoliciesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseSecurityAlertPoliciesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client DatabaseSecurityAlertPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "securityAlertPolicyName": autorest.Encode("path", "default"), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client DatabaseSecurityAlertPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client DatabaseSecurityAlertPoliciesClient) GetResponder(resp *http.Response) (result DatabaseSecurityAlertPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByDatabase gets a list of database's security alert policies. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// databaseName - the name of the database for which the security alert policy is defined. -func (client DatabaseSecurityAlertPoliciesClient) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabaseSecurityAlertListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseSecurityAlertPoliciesClient.ListByDatabase") - defer func() { - sc := -1 - if result.dsalr.Response.Response != nil { - sc = result.dsalr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByDatabaseNextResults - req, err := client.ListByDatabasePreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseSecurityAlertPoliciesClient", "ListByDatabase", nil, "Failure preparing request") - return - } - - resp, err := client.ListByDatabaseSender(req) - if err != nil { - result.dsalr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabaseSecurityAlertPoliciesClient", "ListByDatabase", resp, "Failure sending request") - return - } - - result.dsalr, err = client.ListByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseSecurityAlertPoliciesClient", "ListByDatabase", resp, "Failure responding to request") - return - } - if result.dsalr.hasNextLink() && result.dsalr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByDatabasePreparer prepares the ListByDatabase request. -func (client DatabaseSecurityAlertPoliciesClient) ListByDatabasePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByDatabaseSender sends the ListByDatabase request. The method will close the -// http.Response Body if it receives an error. -func (client DatabaseSecurityAlertPoliciesClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always -// closes the http.Response Body. -func (client DatabaseSecurityAlertPoliciesClient) ListByDatabaseResponder(resp *http.Response) (result DatabaseSecurityAlertListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByDatabaseNextResults retrieves the next set of results, if any. -func (client DatabaseSecurityAlertPoliciesClient) listByDatabaseNextResults(ctx context.Context, lastResults DatabaseSecurityAlertListResult) (result DatabaseSecurityAlertListResult, err error) { - req, err := lastResults.databaseSecurityAlertListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.DatabaseSecurityAlertPoliciesClient", "listByDatabaseNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByDatabaseSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.DatabaseSecurityAlertPoliciesClient", "listByDatabaseNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabaseSecurityAlertPoliciesClient", "listByDatabaseNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByDatabaseComplete enumerates all values, automatically crossing page boundaries as required. -func (client DatabaseSecurityAlertPoliciesClient) ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabaseSecurityAlertListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseSecurityAlertPoliciesClient.ListByDatabase") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByDatabase(ctx, resourceGroupName, serverName, databaseName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/elasticpools.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/elasticpools.go deleted file mode 100644 index d8f66e154403f..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/elasticpools.go +++ /dev/null @@ -1,114 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ElasticPoolsClient is the the Azure SQL Database management API provides a RESTful set of web services that interact -// with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and -// delete databases. -type ElasticPoolsClient struct { - BaseClient -} - -// NewElasticPoolsClient creates an instance of the ElasticPoolsClient client. -func NewElasticPoolsClient(subscriptionID string) ElasticPoolsClient { - return NewElasticPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewElasticPoolsClientWithBaseURI creates an instance of the ElasticPoolsClient client using a custom endpoint. Use -// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewElasticPoolsClientWithBaseURI(baseURI string, subscriptionID string) ElasticPoolsClient { - return ElasticPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Failover failovers an elastic pool. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// elasticPoolName - the name of the elastic pool to failover. -func (client ElasticPoolsClient) Failover(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result ElasticPoolsFailoverFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ElasticPoolsClient.Failover") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.FailoverPreparer(ctx, resourceGroupName, serverName, elasticPoolName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "Failover", nil, "Failure preparing request") - return - } - - result, err = client.FailoverSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "Failover", result.Response(), "Failure sending request") - return - } - - return -} - -// FailoverPreparer prepares the Failover request. -func (client ElasticPoolsClient) FailoverPreparer(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "elasticPoolName": autorest.Encode("path", elasticPoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/failover", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// FailoverSender sends the Failover request. The method will close the -// http.Response Body if it receives an error. -func (client ElasticPoolsClient) FailoverSender(req *http.Request) (future ElasticPoolsFailoverFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// FailoverResponder handles the response to the Failover request. The method always -// closes the http.Response Body. -func (client ElasticPoolsClient) FailoverResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/enums.go deleted file mode 100644 index 1202e51a3fa16..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/enums.go +++ /dev/null @@ -1,274 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// CatalogCollationType enumerates the values for catalog collation type. -type CatalogCollationType string - -const ( - // DATABASEDEFAULT ... - DATABASEDEFAULT CatalogCollationType = "DATABASE_DEFAULT" - // SQLLatin1GeneralCP1CIAS ... - SQLLatin1GeneralCP1CIAS CatalogCollationType = "SQL_Latin1_General_CP1_CI_AS" -) - -// PossibleCatalogCollationTypeValues returns an array of possible values for the CatalogCollationType const type. -func PossibleCatalogCollationTypeValues() []CatalogCollationType { - return []CatalogCollationType{DATABASEDEFAULT, SQLLatin1GeneralCP1CIAS} -} - -// DatabaseState enumerates the values for database state. -type DatabaseState string - -const ( - // All ... - All DatabaseState = "All" - // Deleted ... - Deleted DatabaseState = "Deleted" - // Live ... - Live DatabaseState = "Live" -) - -// PossibleDatabaseStateValues returns an array of possible values for the DatabaseState const type. -func PossibleDatabaseStateValues() []DatabaseState { - return []DatabaseState{All, Deleted, Live} -} - -// IdentityType enumerates the values for identity type. -type IdentityType string - -const ( - // SystemAssigned ... - SystemAssigned IdentityType = "SystemAssigned" -) - -// PossibleIdentityTypeValues returns an array of possible values for the IdentityType const type. -func PossibleIdentityTypeValues() []IdentityType { - return []IdentityType{SystemAssigned} -} - -// InstancePoolLicenseType enumerates the values for instance pool license type. -type InstancePoolLicenseType string - -const ( - // BasePrice ... - BasePrice InstancePoolLicenseType = "BasePrice" - // LicenseIncluded ... - LicenseIncluded InstancePoolLicenseType = "LicenseIncluded" -) - -// PossibleInstancePoolLicenseTypeValues returns an array of possible values for the InstancePoolLicenseType const type. -func PossibleInstancePoolLicenseTypeValues() []InstancePoolLicenseType { - return []InstancePoolLicenseType{BasePrice, LicenseIncluded} -} - -// ManagedDatabaseCreateMode enumerates the values for managed database create mode. -type ManagedDatabaseCreateMode string - -const ( - // Default ... - Default ManagedDatabaseCreateMode = "Default" - // PointInTimeRestore ... - PointInTimeRestore ManagedDatabaseCreateMode = "PointInTimeRestore" - // Recovery ... - Recovery ManagedDatabaseCreateMode = "Recovery" - // RestoreExternalBackup ... - RestoreExternalBackup ManagedDatabaseCreateMode = "RestoreExternalBackup" - // RestoreLongTermRetentionBackup ... - RestoreLongTermRetentionBackup ManagedDatabaseCreateMode = "RestoreLongTermRetentionBackup" -) - -// PossibleManagedDatabaseCreateModeValues returns an array of possible values for the ManagedDatabaseCreateMode const type. -func PossibleManagedDatabaseCreateModeValues() []ManagedDatabaseCreateMode { - return []ManagedDatabaseCreateMode{Default, PointInTimeRestore, Recovery, RestoreExternalBackup, RestoreLongTermRetentionBackup} -} - -// ManagedDatabaseStatus enumerates the values for managed database status. -type ManagedDatabaseStatus string - -const ( - // Creating ... - Creating ManagedDatabaseStatus = "Creating" - // Inaccessible ... - Inaccessible ManagedDatabaseStatus = "Inaccessible" - // Offline ... - Offline ManagedDatabaseStatus = "Offline" - // Online ... - Online ManagedDatabaseStatus = "Online" - // Restoring ... - Restoring ManagedDatabaseStatus = "Restoring" - // Shutdown ... - Shutdown ManagedDatabaseStatus = "Shutdown" - // Updating ... - Updating ManagedDatabaseStatus = "Updating" -) - -// PossibleManagedDatabaseStatusValues returns an array of possible values for the ManagedDatabaseStatus const type. -func PossibleManagedDatabaseStatusValues() []ManagedDatabaseStatus { - return []ManagedDatabaseStatus{Creating, Inaccessible, Offline, Online, Restoring, Shutdown, Updating} -} - -// ManagedInstanceLicenseType enumerates the values for managed instance license type. -type ManagedInstanceLicenseType string - -const ( - // ManagedInstanceLicenseTypeBasePrice ... - ManagedInstanceLicenseTypeBasePrice ManagedInstanceLicenseType = "BasePrice" - // ManagedInstanceLicenseTypeLicenseIncluded ... - ManagedInstanceLicenseTypeLicenseIncluded ManagedInstanceLicenseType = "LicenseIncluded" -) - -// PossibleManagedInstanceLicenseTypeValues returns an array of possible values for the ManagedInstanceLicenseType const type. -func PossibleManagedInstanceLicenseTypeValues() []ManagedInstanceLicenseType { - return []ManagedInstanceLicenseType{ManagedInstanceLicenseTypeBasePrice, ManagedInstanceLicenseTypeLicenseIncluded} -} - -// ManagedInstanceProxyOverride enumerates the values for managed instance proxy override. -type ManagedInstanceProxyOverride string - -const ( - // ManagedInstanceProxyOverrideDefault ... - ManagedInstanceProxyOverrideDefault ManagedInstanceProxyOverride = "Default" - // ManagedInstanceProxyOverrideProxy ... - ManagedInstanceProxyOverrideProxy ManagedInstanceProxyOverride = "Proxy" - // ManagedInstanceProxyOverrideRedirect ... - ManagedInstanceProxyOverrideRedirect ManagedInstanceProxyOverride = "Redirect" -) - -// PossibleManagedInstanceProxyOverrideValues returns an array of possible values for the ManagedInstanceProxyOverride const type. -func PossibleManagedInstanceProxyOverrideValues() []ManagedInstanceProxyOverride { - return []ManagedInstanceProxyOverride{ManagedInstanceProxyOverrideDefault, ManagedInstanceProxyOverrideProxy, ManagedInstanceProxyOverrideRedirect} -} - -// ManagedServerCreateMode enumerates the values for managed server create mode. -type ManagedServerCreateMode string - -const ( - // ManagedServerCreateModeDefault ... - ManagedServerCreateModeDefault ManagedServerCreateMode = "Default" - // ManagedServerCreateModePointInTimeRestore ... - ManagedServerCreateModePointInTimeRestore ManagedServerCreateMode = "PointInTimeRestore" -) - -// PossibleManagedServerCreateModeValues returns an array of possible values for the ManagedServerCreateMode const type. -func PossibleManagedServerCreateModeValues() []ManagedServerCreateMode { - return []ManagedServerCreateMode{ManagedServerCreateModeDefault, ManagedServerCreateModePointInTimeRestore} -} - -// ManagementOperationState enumerates the values for management operation state. -type ManagementOperationState string - -const ( - // CancelInProgress ... - CancelInProgress ManagementOperationState = "CancelInProgress" - // Cancelled ... - Cancelled ManagementOperationState = "Cancelled" - // Failed ... - Failed ManagementOperationState = "Failed" - // InProgress ... - InProgress ManagementOperationState = "InProgress" - // Pending ... - Pending ManagementOperationState = "Pending" - // Succeeded ... - Succeeded ManagementOperationState = "Succeeded" -) - -// PossibleManagementOperationStateValues returns an array of possible values for the ManagementOperationState const type. -func PossibleManagementOperationStateValues() []ManagementOperationState { - return []ManagementOperationState{CancelInProgress, Cancelled, Failed, InProgress, Pending, Succeeded} -} - -// ReplicaType enumerates the values for replica type. -type ReplicaType string - -const ( - // Primary ... - Primary ReplicaType = "Primary" - // ReadableSecondary ... - ReadableSecondary ReplicaType = "ReadableSecondary" -) - -// PossibleReplicaTypeValues returns an array of possible values for the ReplicaType const type. -func PossibleReplicaTypeValues() []ReplicaType { - return []ReplicaType{Primary, ReadableSecondary} -} - -// SecurityAlertPolicyState enumerates the values for security alert policy state. -type SecurityAlertPolicyState string - -const ( - // SecurityAlertPolicyStateDisabled ... - SecurityAlertPolicyStateDisabled SecurityAlertPolicyState = "Disabled" - // SecurityAlertPolicyStateEnabled ... - SecurityAlertPolicyStateEnabled SecurityAlertPolicyState = "Enabled" - // SecurityAlertPolicyStateNew ... - SecurityAlertPolicyStateNew SecurityAlertPolicyState = "New" -) - -// PossibleSecurityAlertPolicyStateValues returns an array of possible values for the SecurityAlertPolicyState const type. -func PossibleSecurityAlertPolicyStateValues() []SecurityAlertPolicyState { - return []SecurityAlertPolicyState{SecurityAlertPolicyStateDisabled, SecurityAlertPolicyStateEnabled, SecurityAlertPolicyStateNew} -} - -// SensitivityLabelRank enumerates the values for sensitivity label rank. -type SensitivityLabelRank string - -const ( - // Critical ... - Critical SensitivityLabelRank = "Critical" - // High ... - High SensitivityLabelRank = "High" - // Low ... - Low SensitivityLabelRank = "Low" - // Medium ... - Medium SensitivityLabelRank = "Medium" - // None ... - None SensitivityLabelRank = "None" -) - -// PossibleSensitivityLabelRankValues returns an array of possible values for the SensitivityLabelRank const type. -func PossibleSensitivityLabelRankValues() []SensitivityLabelRank { - return []SensitivityLabelRank{Critical, High, Low, Medium, None} -} - -// SensitivityLabelSource enumerates the values for sensitivity label source. -type SensitivityLabelSource string - -const ( - // Current ... - Current SensitivityLabelSource = "current" - // Recommended ... - Recommended SensitivityLabelSource = "recommended" -) - -// PossibleSensitivityLabelSourceValues returns an array of possible values for the SensitivityLabelSource const type. -func PossibleSensitivityLabelSourceValues() []SensitivityLabelSource { - return []SensitivityLabelSource{Current, Recommended} -} - -// Status enumerates the values for status. -type Status string - -const ( - // StatusCanceled ... - StatusCanceled Status = "Canceled" - // StatusCompleted ... - StatusCompleted Status = "Completed" - // StatusFailed ... - StatusFailed Status = "Failed" - // StatusInProgress ... - StatusInProgress Status = "InProgress" - // StatusNotStarted ... - StatusNotStarted Status = "NotStarted" - // StatusSlowedDown ... - StatusSlowedDown Status = "SlowedDown" -) - -// PossibleStatusValues returns an array of possible values for the Status const type. -func PossibleStatusValues() []Status { - return []Status{StatusCanceled, StatusCompleted, StatusFailed, StatusInProgress, StatusNotStarted, StatusSlowedDown} -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/instancepools.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/instancepools.go deleted file mode 100644 index 6fe338f25f407..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/instancepools.go +++ /dev/null @@ -1,597 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// InstancePoolsClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type InstancePoolsClient struct { - BaseClient -} - -// NewInstancePoolsClient creates an instance of the InstancePoolsClient client. -func NewInstancePoolsClient(subscriptionID string) InstancePoolsClient { - return NewInstancePoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewInstancePoolsClientWithBaseURI creates an instance of the InstancePoolsClient client using a custom endpoint. -// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewInstancePoolsClientWithBaseURI(baseURI string, subscriptionID string) InstancePoolsClient { - return InstancePoolsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates an instance pool. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// instancePoolName - the name of the instance pool to be created or updated. -// parameters - the requested instance pool resource state. -func (client InstancePoolsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, instancePoolName string, parameters InstancePool) (result InstancePoolsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InstancePoolsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Sku.Name", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.InstancePoolProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.InstancePoolProperties.SubnetID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.InstancePoolProperties.VCores", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("sql.InstancePoolsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, instancePoolName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.InstancePoolsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.InstancePoolsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client InstancePoolsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, instancePoolName string, parameters InstancePool) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "instancePoolName": autorest.Encode("path", instancePoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client InstancePoolsClient) CreateOrUpdateSender(req *http.Request) (future InstancePoolsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client InstancePoolsClient) CreateOrUpdateResponder(resp *http.Response) (result InstancePool, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes an instance pool -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// instancePoolName - the name of the instance pool to be deleted -func (client InstancePoolsClient) Delete(ctx context.Context, resourceGroupName string, instancePoolName string) (result InstancePoolsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InstancePoolsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, instancePoolName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.InstancePoolsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.InstancePoolsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client InstancePoolsClient) DeletePreparer(ctx context.Context, resourceGroupName string, instancePoolName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "instancePoolName": autorest.Encode("path", instancePoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client InstancePoolsClient) DeleteSender(req *http.Request) (future InstancePoolsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client InstancePoolsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets an instance pool. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// instancePoolName - the name of the instance pool to be retrieved. -func (client InstancePoolsClient) Get(ctx context.Context, resourceGroupName string, instancePoolName string) (result InstancePool, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InstancePoolsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, instancePoolName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.InstancePoolsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.InstancePoolsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.InstancePoolsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client InstancePoolsClient) GetPreparer(ctx context.Context, resourceGroupName string, instancePoolName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "instancePoolName": autorest.Encode("path", instancePoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client InstancePoolsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client InstancePoolsClient) GetResponder(resp *http.Response) (result InstancePool, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of all instance pools in the subscription. -func (client InstancePoolsClient) List(ctx context.Context) (result InstancePoolListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InstancePoolsClient.List") - defer func() { - sc := -1 - if result.iplr.Response.Response != nil { - sc = result.iplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.InstancePoolsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.iplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.InstancePoolsClient", "List", resp, "Failure sending request") - return - } - - result.iplr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.InstancePoolsClient", "List", resp, "Failure responding to request") - return - } - if result.iplr.hasNextLink() && result.iplr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client InstancePoolsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/instancePools", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client InstancePoolsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client InstancePoolsClient) ListResponder(resp *http.Response) (result InstancePoolListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client InstancePoolsClient) listNextResults(ctx context.Context, lastResults InstancePoolListResult) (result InstancePoolListResult, err error) { - req, err := lastResults.instancePoolListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.InstancePoolsClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.InstancePoolsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.InstancePoolsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client InstancePoolsClient) ListComplete(ctx context.Context) (result InstancePoolListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InstancePoolsClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx) - return -} - -// ListByResourceGroup gets a list of instance pools in the resource group -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -func (client InstancePoolsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result InstancePoolListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InstancePoolsClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.iplr.Response.Response != nil { - sc = result.iplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.InstancePoolsClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.iplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.InstancePoolsClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - result.iplr, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.InstancePoolsClient", "ListByResourceGroup", resp, "Failure responding to request") - return - } - if result.iplr.hasNextLink() && result.iplr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client InstancePoolsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client InstancePoolsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client InstancePoolsClient) ListByResourceGroupResponder(resp *http.Response) (result InstancePoolListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client InstancePoolsClient) listByResourceGroupNextResults(ctx context.Context, lastResults InstancePoolListResult) (result InstancePoolListResult, err error) { - req, err := lastResults.instancePoolListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.InstancePoolsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.InstancePoolsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.InstancePoolsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client InstancePoolsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result InstancePoolListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InstancePoolsClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// Update updates an instance pool. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// instancePoolName - the name of the instance pool to be updated. -// parameters - the requested instance pool resource state. -func (client InstancePoolsClient) Update(ctx context.Context, resourceGroupName string, instancePoolName string, parameters InstancePoolUpdate) (result InstancePoolsUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InstancePoolsClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, instancePoolName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.InstancePoolsClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.InstancePoolsClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client InstancePoolsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, instancePoolName string, parameters InstancePoolUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "instancePoolName": autorest.Encode("path", instancePoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client InstancePoolsClient) UpdateSender(req *http.Request) (future InstancePoolsUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client InstancePoolsClient) UpdateResponder(resp *http.Response) (result InstancePool, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/longtermretentionmanagedinstancebackups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/longtermretentionmanagedinstancebackups.go deleted file mode 100644 index dcca4055b809c..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/longtermretentionmanagedinstancebackups.go +++ /dev/null @@ -1,1130 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// LongTermRetentionManagedInstanceBackupsClient is the the Azure SQL Database management API provides a RESTful set of -// web services that interact with Azure SQL Database services to manage your databases. The API enables you to create, -// retrieve, update, and delete databases. -type LongTermRetentionManagedInstanceBackupsClient struct { - BaseClient -} - -// NewLongTermRetentionManagedInstanceBackupsClient creates an instance of the -// LongTermRetentionManagedInstanceBackupsClient client. -func NewLongTermRetentionManagedInstanceBackupsClient(subscriptionID string) LongTermRetentionManagedInstanceBackupsClient { - return NewLongTermRetentionManagedInstanceBackupsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewLongTermRetentionManagedInstanceBackupsClientWithBaseURI creates an instance of the -// LongTermRetentionManagedInstanceBackupsClient client using a custom endpoint. Use this when interacting with an -// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewLongTermRetentionManagedInstanceBackupsClientWithBaseURI(baseURI string, subscriptionID string) LongTermRetentionManagedInstanceBackupsClient { - return LongTermRetentionManagedInstanceBackupsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Delete deletes a long term retention backup. -// Parameters: -// locationName - the location of the database. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the managed database. -// backupName - the backup name. -func (client LongTermRetentionManagedInstanceBackupsClient) Delete(ctx context.Context, locationName string, managedInstanceName string, databaseName string, backupName string) (result LongTermRetentionManagedInstanceBackupsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LongTermRetentionManagedInstanceBackupsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, locationName, managedInstanceName, databaseName, backupName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client LongTermRetentionManagedInstanceBackupsClient) DeletePreparer(ctx context.Context, locationName string, managedInstanceName string, databaseName string, backupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "backupName": autorest.Encode("path", backupName), - "databaseName": autorest.Encode("path", databaseName), - "locationName": autorest.Encode("path", locationName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client LongTermRetentionManagedInstanceBackupsClient) DeleteSender(req *http.Request) (future LongTermRetentionManagedInstanceBackupsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client LongTermRetentionManagedInstanceBackupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// DeleteByResourceGroup deletes a long term retention backup. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// locationName - the location of the database -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the managed database. -// backupName - the backup name. -func (client LongTermRetentionManagedInstanceBackupsClient) DeleteByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, managedInstanceName string, databaseName string, backupName string) (result LongTermRetentionManagedInstanceBackupsDeleteByResourceGroupFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LongTermRetentionManagedInstanceBackupsClient.DeleteByResourceGroup") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeleteByResourceGroupPreparer(ctx, resourceGroupName, locationName, managedInstanceName, databaseName, backupName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "DeleteByResourceGroup", nil, "Failure preparing request") - return - } - - result, err = client.DeleteByResourceGroupSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "DeleteByResourceGroup", result.Response(), "Failure sending request") - return - } - - return -} - -// DeleteByResourceGroupPreparer prepares the DeleteByResourceGroup request. -func (client LongTermRetentionManagedInstanceBackupsClient) DeleteByResourceGroupPreparer(ctx context.Context, resourceGroupName string, locationName string, managedInstanceName string, databaseName string, backupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "backupName": autorest.Encode("path", backupName), - "databaseName": autorest.Encode("path", databaseName), - "locationName": autorest.Encode("path", locationName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteByResourceGroupSender sends the DeleteByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client LongTermRetentionManagedInstanceBackupsClient) DeleteByResourceGroupSender(req *http.Request) (future LongTermRetentionManagedInstanceBackupsDeleteByResourceGroupFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteByResourceGroupResponder handles the response to the DeleteByResourceGroup request. The method always -// closes the http.Response Body. -func (client LongTermRetentionManagedInstanceBackupsClient) DeleteByResourceGroupResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a long term retention backup for a managed database. -// Parameters: -// locationName - the location of the database. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the managed database. -// backupName - the backup name. -func (client LongTermRetentionManagedInstanceBackupsClient) Get(ctx context.Context, locationName string, managedInstanceName string, databaseName string, backupName string) (result ManagedInstanceLongTermRetentionBackup, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LongTermRetentionManagedInstanceBackupsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, locationName, managedInstanceName, databaseName, backupName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client LongTermRetentionManagedInstanceBackupsClient) GetPreparer(ctx context.Context, locationName string, managedInstanceName string, databaseName string, backupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "backupName": autorest.Encode("path", backupName), - "databaseName": autorest.Encode("path", databaseName), - "locationName": autorest.Encode("path", locationName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client LongTermRetentionManagedInstanceBackupsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client LongTermRetentionManagedInstanceBackupsClient) GetResponder(resp *http.Response) (result ManagedInstanceLongTermRetentionBackup, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetByResourceGroup gets a long term retention backup for a managed database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// locationName - the location of the database. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the managed database. -// backupName - the backup name. -func (client LongTermRetentionManagedInstanceBackupsClient) GetByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, managedInstanceName string, databaseName string, backupName string) (result ManagedInstanceLongTermRetentionBackup, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LongTermRetentionManagedInstanceBackupsClient.GetByResourceGroup") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetByResourceGroupPreparer(ctx, resourceGroupName, locationName, managedInstanceName, databaseName, backupName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "GetByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.GetByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "GetByResourceGroup", resp, "Failure sending request") - return - } - - result, err = client.GetByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "GetByResourceGroup", resp, "Failure responding to request") - return - } - - return -} - -// GetByResourceGroupPreparer prepares the GetByResourceGroup request. -func (client LongTermRetentionManagedInstanceBackupsClient) GetByResourceGroupPreparer(ctx context.Context, resourceGroupName string, locationName string, managedInstanceName string, databaseName string, backupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "backupName": autorest.Encode("path", backupName), - "databaseName": autorest.Encode("path", databaseName), - "locationName": autorest.Encode("path", locationName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetByResourceGroupSender sends the GetByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client LongTermRetentionManagedInstanceBackupsClient) GetByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetByResourceGroupResponder handles the response to the GetByResourceGroup request. The method always -// closes the http.Response Body. -func (client LongTermRetentionManagedInstanceBackupsClient) GetByResourceGroupResponder(resp *http.Response) (result ManagedInstanceLongTermRetentionBackup, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByDatabase lists all long term retention backups for a managed database. -// Parameters: -// locationName - the location of the database. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the managed database. -// onlyLatestPerDatabase - whether or not to only get the latest backup for each database. -// databaseState - whether to query against just live databases, just deleted databases, or all databases. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByDatabase(ctx context.Context, locationName string, managedInstanceName string, databaseName string, onlyLatestPerDatabase *bool, databaseState DatabaseState) (result ManagedInstanceLongTermRetentionBackupListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LongTermRetentionManagedInstanceBackupsClient.ListByDatabase") - defer func() { - sc := -1 - if result.miltrblr.Response.Response != nil { - sc = result.miltrblr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByDatabaseNextResults - req, err := client.ListByDatabasePreparer(ctx, locationName, managedInstanceName, databaseName, onlyLatestPerDatabase, databaseState) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "ListByDatabase", nil, "Failure preparing request") - return - } - - resp, err := client.ListByDatabaseSender(req) - if err != nil { - result.miltrblr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "ListByDatabase", resp, "Failure sending request") - return - } - - result.miltrblr, err = client.ListByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "ListByDatabase", resp, "Failure responding to request") - return - } - if result.miltrblr.hasNextLink() && result.miltrblr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByDatabasePreparer prepares the ListByDatabase request. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByDatabasePreparer(ctx context.Context, locationName string, managedInstanceName string, databaseName string, onlyLatestPerDatabase *bool, databaseState DatabaseState) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "locationName": autorest.Encode("path", locationName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if onlyLatestPerDatabase != nil { - queryParameters["onlyLatestPerDatabase"] = autorest.Encode("query", *onlyLatestPerDatabase) - } - if len(string(databaseState)) > 0 { - queryParameters["databaseState"] = autorest.Encode("query", databaseState) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByDatabaseSender sends the ListByDatabase request. The method will close the -// http.Response Body if it receives an error. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always -// closes the http.Response Body. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByDatabaseResponder(resp *http.Response) (result ManagedInstanceLongTermRetentionBackupListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByDatabaseNextResults retrieves the next set of results, if any. -func (client LongTermRetentionManagedInstanceBackupsClient) listByDatabaseNextResults(ctx context.Context, lastResults ManagedInstanceLongTermRetentionBackupListResult) (result ManagedInstanceLongTermRetentionBackupListResult, err error) { - req, err := lastResults.managedInstanceLongTermRetentionBackupListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "listByDatabaseNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByDatabaseSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "listByDatabaseNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "listByDatabaseNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByDatabaseComplete enumerates all values, automatically crossing page boundaries as required. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByDatabaseComplete(ctx context.Context, locationName string, managedInstanceName string, databaseName string, onlyLatestPerDatabase *bool, databaseState DatabaseState) (result ManagedInstanceLongTermRetentionBackupListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LongTermRetentionManagedInstanceBackupsClient.ListByDatabase") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByDatabase(ctx, locationName, managedInstanceName, databaseName, onlyLatestPerDatabase, databaseState) - return -} - -// ListByInstance lists the long term retention backups for a given managed instance. -// Parameters: -// locationName - the location of the database -// managedInstanceName - the name of the managed instance. -// onlyLatestPerDatabase - whether or not to only get the latest backup for each database. -// databaseState - whether to query against just live databases, just deleted databases, or all databases. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByInstance(ctx context.Context, locationName string, managedInstanceName string, onlyLatestPerDatabase *bool, databaseState DatabaseState) (result ManagedInstanceLongTermRetentionBackupListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LongTermRetentionManagedInstanceBackupsClient.ListByInstance") - defer func() { - sc := -1 - if result.miltrblr.Response.Response != nil { - sc = result.miltrblr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByInstanceNextResults - req, err := client.ListByInstancePreparer(ctx, locationName, managedInstanceName, onlyLatestPerDatabase, databaseState) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "ListByInstance", nil, "Failure preparing request") - return - } - - resp, err := client.ListByInstanceSender(req) - if err != nil { - result.miltrblr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "ListByInstance", resp, "Failure sending request") - return - } - - result.miltrblr, err = client.ListByInstanceResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "ListByInstance", resp, "Failure responding to request") - return - } - if result.miltrblr.hasNextLink() && result.miltrblr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByInstancePreparer prepares the ListByInstance request. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByInstancePreparer(ctx context.Context, locationName string, managedInstanceName string, onlyLatestPerDatabase *bool, databaseState DatabaseState) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "locationName": autorest.Encode("path", locationName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if onlyLatestPerDatabase != nil { - queryParameters["onlyLatestPerDatabase"] = autorest.Encode("query", *onlyLatestPerDatabase) - } - if len(string(databaseState)) > 0 { - queryParameters["databaseState"] = autorest.Encode("query", databaseState) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionManagedInstanceBackups", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByInstanceSender sends the ListByInstance request. The method will close the -// http.Response Body if it receives an error. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByInstanceSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByInstanceResponder handles the response to the ListByInstance request. The method always -// closes the http.Response Body. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByInstanceResponder(resp *http.Response) (result ManagedInstanceLongTermRetentionBackupListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByInstanceNextResults retrieves the next set of results, if any. -func (client LongTermRetentionManagedInstanceBackupsClient) listByInstanceNextResults(ctx context.Context, lastResults ManagedInstanceLongTermRetentionBackupListResult) (result ManagedInstanceLongTermRetentionBackupListResult, err error) { - req, err := lastResults.managedInstanceLongTermRetentionBackupListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "listByInstanceNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByInstanceSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "listByInstanceNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByInstanceResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "listByInstanceNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByInstanceComplete enumerates all values, automatically crossing page boundaries as required. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByInstanceComplete(ctx context.Context, locationName string, managedInstanceName string, onlyLatestPerDatabase *bool, databaseState DatabaseState) (result ManagedInstanceLongTermRetentionBackupListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LongTermRetentionManagedInstanceBackupsClient.ListByInstance") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByInstance(ctx, locationName, managedInstanceName, onlyLatestPerDatabase, databaseState) - return -} - -// ListByLocation lists the long term retention backups for managed databases in a given location. -// Parameters: -// locationName - the location of the database. -// onlyLatestPerDatabase - whether or not to only get the latest backup for each database. -// databaseState - whether to query against just live databases, just deleted databases, or all databases. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByLocation(ctx context.Context, locationName string, onlyLatestPerDatabase *bool, databaseState DatabaseState) (result ManagedInstanceLongTermRetentionBackupListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LongTermRetentionManagedInstanceBackupsClient.ListByLocation") - defer func() { - sc := -1 - if result.miltrblr.Response.Response != nil { - sc = result.miltrblr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByLocationNextResults - req, err := client.ListByLocationPreparer(ctx, locationName, onlyLatestPerDatabase, databaseState) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "ListByLocation", nil, "Failure preparing request") - return - } - - resp, err := client.ListByLocationSender(req) - if err != nil { - result.miltrblr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "ListByLocation", resp, "Failure sending request") - return - } - - result.miltrblr, err = client.ListByLocationResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "ListByLocation", resp, "Failure responding to request") - return - } - if result.miltrblr.hasNextLink() && result.miltrblr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByLocationPreparer prepares the ListByLocation request. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByLocationPreparer(ctx context.Context, locationName string, onlyLatestPerDatabase *bool, databaseState DatabaseState) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "locationName": autorest.Encode("path", locationName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if onlyLatestPerDatabase != nil { - queryParameters["onlyLatestPerDatabase"] = autorest.Encode("query", *onlyLatestPerDatabase) - } - if len(string(databaseState)) > 0 { - queryParameters["databaseState"] = autorest.Encode("query", databaseState) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByLocationSender sends the ListByLocation request. The method will close the -// http.Response Body if it receives an error. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByLocationSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByLocationResponder handles the response to the ListByLocation request. The method always -// closes the http.Response Body. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByLocationResponder(resp *http.Response) (result ManagedInstanceLongTermRetentionBackupListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByLocationNextResults retrieves the next set of results, if any. -func (client LongTermRetentionManagedInstanceBackupsClient) listByLocationNextResults(ctx context.Context, lastResults ManagedInstanceLongTermRetentionBackupListResult) (result ManagedInstanceLongTermRetentionBackupListResult, err error) { - req, err := lastResults.managedInstanceLongTermRetentionBackupListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "listByLocationNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByLocationSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "listByLocationNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByLocationResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "listByLocationNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByLocationComplete enumerates all values, automatically crossing page boundaries as required. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByLocationComplete(ctx context.Context, locationName string, onlyLatestPerDatabase *bool, databaseState DatabaseState) (result ManagedInstanceLongTermRetentionBackupListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LongTermRetentionManagedInstanceBackupsClient.ListByLocation") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByLocation(ctx, locationName, onlyLatestPerDatabase, databaseState) - return -} - -// ListByResourceGroupDatabase lists all long term retention backups for a managed database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// locationName - the location of the database -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the managed database. -// onlyLatestPerDatabase - whether or not to only get the latest backup for each database. -// databaseState - whether to query against just live databases, just deleted databases, or all databases. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupDatabase(ctx context.Context, resourceGroupName string, locationName string, managedInstanceName string, databaseName string, onlyLatestPerDatabase *bool, databaseState DatabaseState) (result ManagedInstanceLongTermRetentionBackupListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LongTermRetentionManagedInstanceBackupsClient.ListByResourceGroupDatabase") - defer func() { - sc := -1 - if result.miltrblr.Response.Response != nil { - sc = result.miltrblr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupDatabaseNextResults - req, err := client.ListByResourceGroupDatabasePreparer(ctx, resourceGroupName, locationName, managedInstanceName, databaseName, onlyLatestPerDatabase, databaseState) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "ListByResourceGroupDatabase", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupDatabaseSender(req) - if err != nil { - result.miltrblr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "ListByResourceGroupDatabase", resp, "Failure sending request") - return - } - - result.miltrblr, err = client.ListByResourceGroupDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "ListByResourceGroupDatabase", resp, "Failure responding to request") - return - } - if result.miltrblr.hasNextLink() && result.miltrblr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByResourceGroupDatabasePreparer prepares the ListByResourceGroupDatabase request. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupDatabasePreparer(ctx context.Context, resourceGroupName string, locationName string, managedInstanceName string, databaseName string, onlyLatestPerDatabase *bool, databaseState DatabaseState) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "locationName": autorest.Encode("path", locationName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if onlyLatestPerDatabase != nil { - queryParameters["onlyLatestPerDatabase"] = autorest.Encode("query", *onlyLatestPerDatabase) - } - if len(string(databaseState)) > 0 { - queryParameters["databaseState"] = autorest.Encode("query", databaseState) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupDatabaseSender sends the ListByResourceGroupDatabase request. The method will close the -// http.Response Body if it receives an error. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupDatabaseSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupDatabaseResponder handles the response to the ListByResourceGroupDatabase request. The method always -// closes the http.Response Body. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupDatabaseResponder(resp *http.Response) (result ManagedInstanceLongTermRetentionBackupListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupDatabaseNextResults retrieves the next set of results, if any. -func (client LongTermRetentionManagedInstanceBackupsClient) listByResourceGroupDatabaseNextResults(ctx context.Context, lastResults ManagedInstanceLongTermRetentionBackupListResult) (result ManagedInstanceLongTermRetentionBackupListResult, err error) { - req, err := lastResults.managedInstanceLongTermRetentionBackupListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "listByResourceGroupDatabaseNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupDatabaseSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "listByResourceGroupDatabaseNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "listByResourceGroupDatabaseNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupDatabaseComplete enumerates all values, automatically crossing page boundaries as required. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupDatabaseComplete(ctx context.Context, resourceGroupName string, locationName string, managedInstanceName string, databaseName string, onlyLatestPerDatabase *bool, databaseState DatabaseState) (result ManagedInstanceLongTermRetentionBackupListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LongTermRetentionManagedInstanceBackupsClient.ListByResourceGroupDatabase") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByResourceGroupDatabase(ctx, resourceGroupName, locationName, managedInstanceName, databaseName, onlyLatestPerDatabase, databaseState) - return -} - -// ListByResourceGroupInstance lists the long term retention backups for a given managed instance. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// locationName - the location of the database. -// managedInstanceName - the name of the managed instance. -// onlyLatestPerDatabase - whether or not to only get the latest backup for each database. -// databaseState - whether to query against just live databases, just deleted databases, or all databases. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupInstance(ctx context.Context, resourceGroupName string, locationName string, managedInstanceName string, onlyLatestPerDatabase *bool, databaseState DatabaseState) (result ManagedInstanceLongTermRetentionBackupListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LongTermRetentionManagedInstanceBackupsClient.ListByResourceGroupInstance") - defer func() { - sc := -1 - if result.miltrblr.Response.Response != nil { - sc = result.miltrblr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupInstanceNextResults - req, err := client.ListByResourceGroupInstancePreparer(ctx, resourceGroupName, locationName, managedInstanceName, onlyLatestPerDatabase, databaseState) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "ListByResourceGroupInstance", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupInstanceSender(req) - if err != nil { - result.miltrblr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "ListByResourceGroupInstance", resp, "Failure sending request") - return - } - - result.miltrblr, err = client.ListByResourceGroupInstanceResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "ListByResourceGroupInstance", resp, "Failure responding to request") - return - } - if result.miltrblr.hasNextLink() && result.miltrblr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByResourceGroupInstancePreparer prepares the ListByResourceGroupInstance request. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupInstancePreparer(ctx context.Context, resourceGroupName string, locationName string, managedInstanceName string, onlyLatestPerDatabase *bool, databaseState DatabaseState) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "locationName": autorest.Encode("path", locationName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if onlyLatestPerDatabase != nil { - queryParameters["onlyLatestPerDatabase"] = autorest.Encode("query", *onlyLatestPerDatabase) - } - if len(string(databaseState)) > 0 { - queryParameters["databaseState"] = autorest.Encode("query", databaseState) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionManagedInstanceBackups", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupInstanceSender sends the ListByResourceGroupInstance request. The method will close the -// http.Response Body if it receives an error. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupInstanceSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupInstanceResponder handles the response to the ListByResourceGroupInstance request. The method always -// closes the http.Response Body. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupInstanceResponder(resp *http.Response) (result ManagedInstanceLongTermRetentionBackupListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupInstanceNextResults retrieves the next set of results, if any. -func (client LongTermRetentionManagedInstanceBackupsClient) listByResourceGroupInstanceNextResults(ctx context.Context, lastResults ManagedInstanceLongTermRetentionBackupListResult) (result ManagedInstanceLongTermRetentionBackupListResult, err error) { - req, err := lastResults.managedInstanceLongTermRetentionBackupListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "listByResourceGroupInstanceNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupInstanceSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "listByResourceGroupInstanceNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupInstanceResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "listByResourceGroupInstanceNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupInstanceComplete enumerates all values, automatically crossing page boundaries as required. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupInstanceComplete(ctx context.Context, resourceGroupName string, locationName string, managedInstanceName string, onlyLatestPerDatabase *bool, databaseState DatabaseState) (result ManagedInstanceLongTermRetentionBackupListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LongTermRetentionManagedInstanceBackupsClient.ListByResourceGroupInstance") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByResourceGroupInstance(ctx, resourceGroupName, locationName, managedInstanceName, onlyLatestPerDatabase, databaseState) - return -} - -// ListByResourceGroupLocation lists the long term retention backups for managed databases in a given location. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// locationName - the location of the database. -// onlyLatestPerDatabase - whether or not to only get the latest backup for each database. -// databaseState - whether to query against just live databases, just deleted databases, or all databases. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupLocation(ctx context.Context, resourceGroupName string, locationName string, onlyLatestPerDatabase *bool, databaseState DatabaseState) (result ManagedInstanceLongTermRetentionBackupListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LongTermRetentionManagedInstanceBackupsClient.ListByResourceGroupLocation") - defer func() { - sc := -1 - if result.miltrblr.Response.Response != nil { - sc = result.miltrblr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupLocationNextResults - req, err := client.ListByResourceGroupLocationPreparer(ctx, resourceGroupName, locationName, onlyLatestPerDatabase, databaseState) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "ListByResourceGroupLocation", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupLocationSender(req) - if err != nil { - result.miltrblr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "ListByResourceGroupLocation", resp, "Failure sending request") - return - } - - result.miltrblr, err = client.ListByResourceGroupLocationResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "ListByResourceGroupLocation", resp, "Failure responding to request") - return - } - if result.miltrblr.hasNextLink() && result.miltrblr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByResourceGroupLocationPreparer prepares the ListByResourceGroupLocation request. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupLocationPreparer(ctx context.Context, resourceGroupName string, locationName string, onlyLatestPerDatabase *bool, databaseState DatabaseState) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "locationName": autorest.Encode("path", locationName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if onlyLatestPerDatabase != nil { - queryParameters["onlyLatestPerDatabase"] = autorest.Encode("query", *onlyLatestPerDatabase) - } - if len(string(databaseState)) > 0 { - queryParameters["databaseState"] = autorest.Encode("query", databaseState) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupLocationSender sends the ListByResourceGroupLocation request. The method will close the -// http.Response Body if it receives an error. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupLocationSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupLocationResponder handles the response to the ListByResourceGroupLocation request. The method always -// closes the http.Response Body. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupLocationResponder(resp *http.Response) (result ManagedInstanceLongTermRetentionBackupListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupLocationNextResults retrieves the next set of results, if any. -func (client LongTermRetentionManagedInstanceBackupsClient) listByResourceGroupLocationNextResults(ctx context.Context, lastResults ManagedInstanceLongTermRetentionBackupListResult) (result ManagedInstanceLongTermRetentionBackupListResult, err error) { - req, err := lastResults.managedInstanceLongTermRetentionBackupListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "listByResourceGroupLocationNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupLocationSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "listByResourceGroupLocationNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupLocationResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsClient", "listByResourceGroupLocationNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupLocationComplete enumerates all values, automatically crossing page boundaries as required. -func (client LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupLocationComplete(ctx context.Context, resourceGroupName string, locationName string, onlyLatestPerDatabase *bool, databaseState DatabaseState) (result ManagedInstanceLongTermRetentionBackupListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LongTermRetentionManagedInstanceBackupsClient.ListByResourceGroupLocation") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByResourceGroupLocation(ctx, resourceGroupName, locationName, onlyLatestPerDatabase, databaseState) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/manageddatabaserestoredetails.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/manageddatabaserestoredetails.go deleted file mode 100644 index 1a3e3929affd1..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/manageddatabaserestoredetails.go +++ /dev/null @@ -1,114 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ManagedDatabaseRestoreDetailsClient is the the Azure SQL Database management API provides a RESTful set of web -// services that interact with Azure SQL Database services to manage your databases. The API enables you to create, -// retrieve, update, and delete databases. -type ManagedDatabaseRestoreDetailsClient struct { - BaseClient -} - -// NewManagedDatabaseRestoreDetailsClient creates an instance of the ManagedDatabaseRestoreDetailsClient client. -func NewManagedDatabaseRestoreDetailsClient(subscriptionID string) ManagedDatabaseRestoreDetailsClient { - return NewManagedDatabaseRestoreDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewManagedDatabaseRestoreDetailsClientWithBaseURI creates an instance of the ManagedDatabaseRestoreDetailsClient -// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI -// (sovereign clouds, Azure stack). -func NewManagedDatabaseRestoreDetailsClientWithBaseURI(baseURI string, subscriptionID string) ManagedDatabaseRestoreDetailsClient { - return ManagedDatabaseRestoreDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets managed database restore details. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the database. -func (client ManagedDatabaseRestoreDetailsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result ManagedDatabaseRestoreDetailsResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabaseRestoreDetailsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, managedInstanceName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseRestoreDetailsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseRestoreDetailsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseRestoreDetailsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ManagedDatabaseRestoreDetailsClient) GetPreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "restoreDetailsName": autorest.Encode("path", "Default"), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/restoreDetails/{restoreDetailsName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedDatabaseRestoreDetailsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ManagedDatabaseRestoreDetailsClient) GetResponder(resp *http.Response) (result ManagedDatabaseRestoreDetailsResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/manageddatabases.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/manageddatabases.go deleted file mode 100644 index a14336858820b..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/manageddatabases.go +++ /dev/null @@ -1,574 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ManagedDatabasesClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type ManagedDatabasesClient struct { - BaseClient -} - -// NewManagedDatabasesClient creates an instance of the ManagedDatabasesClient client. -func NewManagedDatabasesClient(subscriptionID string) ManagedDatabasesClient { - return NewManagedDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewManagedDatabasesClientWithBaseURI creates an instance of the ManagedDatabasesClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewManagedDatabasesClientWithBaseURI(baseURI string, subscriptionID string) ManagedDatabasesClient { - return ManagedDatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CompleteRestore completes the restore operation on a managed database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the database. -// parameters - the definition for completing the restore of this managed database. -func (client ManagedDatabasesClient) CompleteRestore(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters CompleteDatabaseRestoreDefinition) (result ManagedDatabasesCompleteRestoreFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabasesClient.CompleteRestore") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.LastBackupName", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("sql.ManagedDatabasesClient", "CompleteRestore", err.Error()) - } - - req, err := client.CompleteRestorePreparer(ctx, resourceGroupName, managedInstanceName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "CompleteRestore", nil, "Failure preparing request") - return - } - - result, err = client.CompleteRestoreSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "CompleteRestore", result.Response(), "Failure sending request") - return - } - - return -} - -// CompleteRestorePreparer prepares the CompleteRestore request. -func (client ManagedDatabasesClient) CompleteRestorePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters CompleteDatabaseRestoreDefinition) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/completeRestore", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CompleteRestoreSender sends the CompleteRestore request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedDatabasesClient) CompleteRestoreSender(req *http.Request) (future ManagedDatabasesCompleteRestoreFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CompleteRestoreResponder handles the response to the CompleteRestore request. The method always -// closes the http.Response Body. -func (client ManagedDatabasesClient) CompleteRestoreResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// CreateOrUpdate creates a new database or updates an existing database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the database. -// parameters - the requested database resource state. -func (client ManagedDatabasesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedDatabase) (result ManagedDatabasesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabasesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, managedInstanceName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ManagedDatabasesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedDatabase) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedDatabasesClient) CreateOrUpdateSender(req *http.Request) (future ManagedDatabasesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ManagedDatabasesClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedDatabase, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a managed database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the database. -func (client ManagedDatabasesClient) Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result ManagedDatabasesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabasesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, managedInstanceName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ManagedDatabasesClient) DeletePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedDatabasesClient) DeleteSender(req *http.Request) (future ManagedDatabasesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ManagedDatabasesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a managed database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the database. -func (client ManagedDatabasesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result ManagedDatabase, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabasesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, managedInstanceName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ManagedDatabasesClient) GetPreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedDatabasesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ManagedDatabasesClient) GetResponder(resp *http.Response) (result ManagedDatabase, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByInstance gets a list of managed databases. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -func (client ManagedDatabasesClient) ListByInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result ManagedDatabaseListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabasesClient.ListByInstance") - defer func() { - sc := -1 - if result.mdlr.Response.Response != nil { - sc = result.mdlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByInstanceNextResults - req, err := client.ListByInstancePreparer(ctx, resourceGroupName, managedInstanceName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "ListByInstance", nil, "Failure preparing request") - return - } - - resp, err := client.ListByInstanceSender(req) - if err != nil { - result.mdlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "ListByInstance", resp, "Failure sending request") - return - } - - result.mdlr, err = client.ListByInstanceResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "ListByInstance", resp, "Failure responding to request") - return - } - if result.mdlr.hasNextLink() && result.mdlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByInstancePreparer prepares the ListByInstance request. -func (client ManagedDatabasesClient) ListByInstancePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByInstanceSender sends the ListByInstance request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedDatabasesClient) ListByInstanceSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByInstanceResponder handles the response to the ListByInstance request. The method always -// closes the http.Response Body. -func (client ManagedDatabasesClient) ListByInstanceResponder(resp *http.Response) (result ManagedDatabaseListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByInstanceNextResults retrieves the next set of results, if any. -func (client ManagedDatabasesClient) listByInstanceNextResults(ctx context.Context, lastResults ManagedDatabaseListResult) (result ManagedDatabaseListResult, err error) { - req, err := lastResults.managedDatabaseListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "listByInstanceNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByInstanceSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "listByInstanceNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByInstanceResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "listByInstanceNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByInstanceComplete enumerates all values, automatically crossing page boundaries as required. -func (client ManagedDatabasesClient) ListByInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result ManagedDatabaseListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabasesClient.ListByInstance") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByInstance(ctx, resourceGroupName, managedInstanceName) - return -} - -// Update updates an existing database. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the database. -// parameters - the requested database resource state. -func (client ManagedDatabasesClient) Update(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedDatabaseUpdate) (result ManagedDatabasesUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabasesClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, managedInstanceName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client ManagedDatabasesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedDatabaseUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedDatabasesClient) UpdateSender(req *http.Request) (future ManagedDatabasesUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client ManagedDatabasesClient) UpdateResponder(resp *http.Response) (result ManagedDatabase, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/manageddatabasesensitivitylabels.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/manageddatabasesensitivitylabels.go deleted file mode 100644 index 2a4000e00e5e8..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/manageddatabasesensitivitylabels.go +++ /dev/null @@ -1,723 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ManagedDatabaseSensitivityLabelsClient is the the Azure SQL Database management API provides a RESTful set of web -// services that interact with Azure SQL Database services to manage your databases. The API enables you to create, -// retrieve, update, and delete databases. -type ManagedDatabaseSensitivityLabelsClient struct { - BaseClient -} - -// NewManagedDatabaseSensitivityLabelsClient creates an instance of the ManagedDatabaseSensitivityLabelsClient client. -func NewManagedDatabaseSensitivityLabelsClient(subscriptionID string) ManagedDatabaseSensitivityLabelsClient { - return NewManagedDatabaseSensitivityLabelsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewManagedDatabaseSensitivityLabelsClientWithBaseURI creates an instance of the -// ManagedDatabaseSensitivityLabelsClient client using a custom endpoint. Use this when interacting with an Azure -// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewManagedDatabaseSensitivityLabelsClientWithBaseURI(baseURI string, subscriptionID string) ManagedDatabaseSensitivityLabelsClient { - return ManagedDatabaseSensitivityLabelsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates the sensitivity label of a given column -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the database. -// schemaName - the name of the schema. -// tableName - the name of the table. -// columnName - the name of the column. -// parameters - the column sensitivity label resource. -func (client ManagedDatabaseSensitivityLabelsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, parameters SensitivityLabel) (result SensitivityLabel, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabaseSensitivityLabelsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ManagedDatabaseSensitivityLabelsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, parameters SensitivityLabel) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "columnName": autorest.Encode("path", columnName), - "databaseName": autorest.Encode("path", databaseName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "schemaName": autorest.Encode("path", schemaName), - "sensitivityLabelSource": autorest.Encode("path", "current"), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "tableName": autorest.Encode("path", tableName), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedDatabaseSensitivityLabelsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ManagedDatabaseSensitivityLabelsClient) CreateOrUpdateResponder(resp *http.Response) (result SensitivityLabel, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes the sensitivity label of a given column -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the database. -// schemaName - the name of the schema. -// tableName - the name of the table. -// columnName - the name of the column. -func (client ManagedDatabaseSensitivityLabelsClient) Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabaseSensitivityLabelsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ManagedDatabaseSensitivityLabelsClient) DeletePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "columnName": autorest.Encode("path", columnName), - "databaseName": autorest.Encode("path", databaseName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "schemaName": autorest.Encode("path", schemaName), - "sensitivityLabelSource": autorest.Encode("path", "current"), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "tableName": autorest.Encode("path", tableName), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedDatabaseSensitivityLabelsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ManagedDatabaseSensitivityLabelsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// DisableRecommendation disables sensitivity recommendations on a given column -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the database. -// schemaName - the name of the schema. -// tableName - the name of the table. -// columnName - the name of the column. -func (client ManagedDatabaseSensitivityLabelsClient) DisableRecommendation(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabaseSensitivityLabelsClient.DisableRecommendation") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DisableRecommendationPreparer(ctx, resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "DisableRecommendation", nil, "Failure preparing request") - return - } - - resp, err := client.DisableRecommendationSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "DisableRecommendation", resp, "Failure sending request") - return - } - - result, err = client.DisableRecommendationResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "DisableRecommendation", resp, "Failure responding to request") - return - } - - return -} - -// DisableRecommendationPreparer prepares the DisableRecommendation request. -func (client ManagedDatabaseSensitivityLabelsClient) DisableRecommendationPreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "columnName": autorest.Encode("path", columnName), - "databaseName": autorest.Encode("path", databaseName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "schemaName": autorest.Encode("path", schemaName), - "sensitivityLabelSource": autorest.Encode("path", "recommended"), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "tableName": autorest.Encode("path", tableName), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DisableRecommendationSender sends the DisableRecommendation request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedDatabaseSensitivityLabelsClient) DisableRecommendationSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DisableRecommendationResponder handles the response to the DisableRecommendation request. The method always -// closes the http.Response Body. -func (client ManagedDatabaseSensitivityLabelsClient) DisableRecommendationResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// EnableRecommendation enables sensitivity recommendations on a given column (recommendations are enabled by default -// on all columns) -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the database. -// schemaName - the name of the schema. -// tableName - the name of the table. -// columnName - the name of the column. -func (client ManagedDatabaseSensitivityLabelsClient) EnableRecommendation(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabaseSensitivityLabelsClient.EnableRecommendation") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.EnableRecommendationPreparer(ctx, resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "EnableRecommendation", nil, "Failure preparing request") - return - } - - resp, err := client.EnableRecommendationSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "EnableRecommendation", resp, "Failure sending request") - return - } - - result, err = client.EnableRecommendationResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "EnableRecommendation", resp, "Failure responding to request") - return - } - - return -} - -// EnableRecommendationPreparer prepares the EnableRecommendation request. -func (client ManagedDatabaseSensitivityLabelsClient) EnableRecommendationPreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "columnName": autorest.Encode("path", columnName), - "databaseName": autorest.Encode("path", databaseName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "schemaName": autorest.Encode("path", schemaName), - "sensitivityLabelSource": autorest.Encode("path", "recommended"), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "tableName": autorest.Encode("path", tableName), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// EnableRecommendationSender sends the EnableRecommendation request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedDatabaseSensitivityLabelsClient) EnableRecommendationSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// EnableRecommendationResponder handles the response to the EnableRecommendation request. The method always -// closes the http.Response Body. -func (client ManagedDatabaseSensitivityLabelsClient) EnableRecommendationResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets the sensitivity label of a given column -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the database. -// schemaName - the name of the schema. -// tableName - the name of the table. -// columnName - the name of the column. -// sensitivityLabelSource - the source of the sensitivity label. -func (client ManagedDatabaseSensitivityLabelsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, sensitivityLabelSource SensitivityLabelSource) (result SensitivityLabel, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabaseSensitivityLabelsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ManagedDatabaseSensitivityLabelsClient) GetPreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, sensitivityLabelSource SensitivityLabelSource) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "columnName": autorest.Encode("path", columnName), - "databaseName": autorest.Encode("path", databaseName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "schemaName": autorest.Encode("path", schemaName), - "sensitivityLabelSource": autorest.Encode("path", sensitivityLabelSource), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "tableName": autorest.Encode("path", tableName), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedDatabaseSensitivityLabelsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ManagedDatabaseSensitivityLabelsClient) GetResponder(resp *http.Response) (result SensitivityLabel, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListCurrentByDatabase gets the sensitivity labels of a given database -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the database. -// filter - an OData filter expression that filters elements in the collection. -func (client ManagedDatabaseSensitivityLabelsClient) ListCurrentByDatabase(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, filter string) (result SensitivityLabelListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabaseSensitivityLabelsClient.ListCurrentByDatabase") - defer func() { - sc := -1 - if result.sllr.Response.Response != nil { - sc = result.sllr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listCurrentByDatabaseNextResults - req, err := client.ListCurrentByDatabasePreparer(ctx, resourceGroupName, managedInstanceName, databaseName, filter) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "ListCurrentByDatabase", nil, "Failure preparing request") - return - } - - resp, err := client.ListCurrentByDatabaseSender(req) - if err != nil { - result.sllr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "ListCurrentByDatabase", resp, "Failure sending request") - return - } - - result.sllr, err = client.ListCurrentByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "ListCurrentByDatabase", resp, "Failure responding to request") - return - } - if result.sllr.hasNextLink() && result.sllr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListCurrentByDatabasePreparer prepares the ListCurrentByDatabase request. -func (client ManagedDatabaseSensitivityLabelsClient) ListCurrentByDatabasePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, filter string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListCurrentByDatabaseSender sends the ListCurrentByDatabase request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedDatabaseSensitivityLabelsClient) ListCurrentByDatabaseSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListCurrentByDatabaseResponder handles the response to the ListCurrentByDatabase request. The method always -// closes the http.Response Body. -func (client ManagedDatabaseSensitivityLabelsClient) ListCurrentByDatabaseResponder(resp *http.Response) (result SensitivityLabelListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listCurrentByDatabaseNextResults retrieves the next set of results, if any. -func (client ManagedDatabaseSensitivityLabelsClient) listCurrentByDatabaseNextResults(ctx context.Context, lastResults SensitivityLabelListResult) (result SensitivityLabelListResult, err error) { - req, err := lastResults.sensitivityLabelListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "listCurrentByDatabaseNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListCurrentByDatabaseSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "listCurrentByDatabaseNextResults", resp, "Failure sending next results request") - } - result, err = client.ListCurrentByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "listCurrentByDatabaseNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListCurrentByDatabaseComplete enumerates all values, automatically crossing page boundaries as required. -func (client ManagedDatabaseSensitivityLabelsClient) ListCurrentByDatabaseComplete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, filter string) (result SensitivityLabelListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabaseSensitivityLabelsClient.ListCurrentByDatabase") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListCurrentByDatabase(ctx, resourceGroupName, managedInstanceName, databaseName, filter) - return -} - -// ListRecommendedByDatabase gets the sensitivity labels of a given database -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the database. -// includeDisabledRecommendations - specifies whether to include disabled recommendations or not. -// filter - an OData filter expression that filters elements in the collection. -func (client ManagedDatabaseSensitivityLabelsClient) ListRecommendedByDatabase(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, includeDisabledRecommendations *bool, skipToken string, filter string) (result SensitivityLabelListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabaseSensitivityLabelsClient.ListRecommendedByDatabase") - defer func() { - sc := -1 - if result.sllr.Response.Response != nil { - sc = result.sllr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listRecommendedByDatabaseNextResults - req, err := client.ListRecommendedByDatabasePreparer(ctx, resourceGroupName, managedInstanceName, databaseName, includeDisabledRecommendations, skipToken, filter) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "ListRecommendedByDatabase", nil, "Failure preparing request") - return - } - - resp, err := client.ListRecommendedByDatabaseSender(req) - if err != nil { - result.sllr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "ListRecommendedByDatabase", resp, "Failure sending request") - return - } - - result.sllr, err = client.ListRecommendedByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "ListRecommendedByDatabase", resp, "Failure responding to request") - return - } - if result.sllr.hasNextLink() && result.sllr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListRecommendedByDatabasePreparer prepares the ListRecommendedByDatabase request. -func (client ManagedDatabaseSensitivityLabelsClient) ListRecommendedByDatabasePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, includeDisabledRecommendations *bool, skipToken string, filter string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if includeDisabledRecommendations != nil { - queryParameters["includeDisabledRecommendations"] = autorest.Encode("query", *includeDisabledRecommendations) - } - if len(skipToken) > 0 { - queryParameters["$skipToken"] = autorest.Encode("query", skipToken) - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/recommendedSensitivityLabels", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListRecommendedByDatabaseSender sends the ListRecommendedByDatabase request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedDatabaseSensitivityLabelsClient) ListRecommendedByDatabaseSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListRecommendedByDatabaseResponder handles the response to the ListRecommendedByDatabase request. The method always -// closes the http.Response Body. -func (client ManagedDatabaseSensitivityLabelsClient) ListRecommendedByDatabaseResponder(resp *http.Response) (result SensitivityLabelListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listRecommendedByDatabaseNextResults retrieves the next set of results, if any. -func (client ManagedDatabaseSensitivityLabelsClient) listRecommendedByDatabaseNextResults(ctx context.Context, lastResults SensitivityLabelListResult) (result SensitivityLabelListResult, err error) { - req, err := lastResults.sensitivityLabelListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "listRecommendedByDatabaseNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListRecommendedByDatabaseSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "listRecommendedByDatabaseNextResults", resp, "Failure sending next results request") - } - result, err = client.ListRecommendedByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseSensitivityLabelsClient", "listRecommendedByDatabaseNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListRecommendedByDatabaseComplete enumerates all values, automatically crossing page boundaries as required. -func (client ManagedDatabaseSensitivityLabelsClient) ListRecommendedByDatabaseComplete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, includeDisabledRecommendations *bool, skipToken string, filter string) (result SensitivityLabelListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabaseSensitivityLabelsClient.ListRecommendedByDatabase") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListRecommendedByDatabase(ctx, resourceGroupName, managedInstanceName, databaseName, includeDisabledRecommendations, skipToken, filter) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstancelongtermretentionpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstancelongtermretentionpolicies.go deleted file mode 100644 index d0e380b54953c..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstancelongtermretentionpolicies.go +++ /dev/null @@ -1,322 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ManagedInstanceLongTermRetentionPoliciesClient is the the Azure SQL Database management API provides a RESTful set -// of web services that interact with Azure SQL Database services to manage your databases. The API enables you to -// create, retrieve, update, and delete databases. -type ManagedInstanceLongTermRetentionPoliciesClient struct { - BaseClient -} - -// NewManagedInstanceLongTermRetentionPoliciesClient creates an instance of the -// ManagedInstanceLongTermRetentionPoliciesClient client. -func NewManagedInstanceLongTermRetentionPoliciesClient(subscriptionID string) ManagedInstanceLongTermRetentionPoliciesClient { - return NewManagedInstanceLongTermRetentionPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewManagedInstanceLongTermRetentionPoliciesClientWithBaseURI creates an instance of the -// ManagedInstanceLongTermRetentionPoliciesClient client using a custom endpoint. Use this when interacting with an -// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewManagedInstanceLongTermRetentionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ManagedInstanceLongTermRetentionPoliciesClient { - return ManagedInstanceLongTermRetentionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate sets a managed database's long term retention policy. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the database. -// parameters - the long term retention policy info. -func (client ManagedInstanceLongTermRetentionPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedInstanceLongTermRetentionPolicy) (result ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceLongTermRetentionPoliciesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, managedInstanceName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceLongTermRetentionPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceLongTermRetentionPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ManagedInstanceLongTermRetentionPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedInstanceLongTermRetentionPolicy) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "policyName": autorest.Encode("path", "default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstanceLongTermRetentionPoliciesClient) CreateOrUpdateSender(req *http.Request) (future ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ManagedInstanceLongTermRetentionPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedInstanceLongTermRetentionPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets a managed database's long term retention policy. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the database. -func (client ManagedInstanceLongTermRetentionPoliciesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result ManagedInstanceLongTermRetentionPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceLongTermRetentionPoliciesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, managedInstanceName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceLongTermRetentionPoliciesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceLongTermRetentionPoliciesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceLongTermRetentionPoliciesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ManagedInstanceLongTermRetentionPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "policyName": autorest.Encode("path", "default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstanceLongTermRetentionPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ManagedInstanceLongTermRetentionPoliciesClient) GetResponder(resp *http.Response) (result ManagedInstanceLongTermRetentionPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByDatabase gets a database's long term retention policy. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// databaseName - the name of the database. -func (client ManagedInstanceLongTermRetentionPoliciesClient) ListByDatabase(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result ManagedInstanceLongTermRetentionPolicyListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceLongTermRetentionPoliciesClient.ListByDatabase") - defer func() { - sc := -1 - if result.miltrplr.Response.Response != nil { - sc = result.miltrplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByDatabaseNextResults - req, err := client.ListByDatabasePreparer(ctx, resourceGroupName, managedInstanceName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceLongTermRetentionPoliciesClient", "ListByDatabase", nil, "Failure preparing request") - return - } - - resp, err := client.ListByDatabaseSender(req) - if err != nil { - result.miltrplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceLongTermRetentionPoliciesClient", "ListByDatabase", resp, "Failure sending request") - return - } - - result.miltrplr, err = client.ListByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceLongTermRetentionPoliciesClient", "ListByDatabase", resp, "Failure responding to request") - return - } - if result.miltrplr.hasNextLink() && result.miltrplr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByDatabasePreparer prepares the ListByDatabase request. -func (client ManagedInstanceLongTermRetentionPoliciesClient) ListByDatabasePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByDatabaseSender sends the ListByDatabase request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstanceLongTermRetentionPoliciesClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always -// closes the http.Response Body. -func (client ManagedInstanceLongTermRetentionPoliciesClient) ListByDatabaseResponder(resp *http.Response) (result ManagedInstanceLongTermRetentionPolicyListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByDatabaseNextResults retrieves the next set of results, if any. -func (client ManagedInstanceLongTermRetentionPoliciesClient) listByDatabaseNextResults(ctx context.Context, lastResults ManagedInstanceLongTermRetentionPolicyListResult) (result ManagedInstanceLongTermRetentionPolicyListResult, err error) { - req, err := lastResults.managedInstanceLongTermRetentionPolicyListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.ManagedInstanceLongTermRetentionPoliciesClient", "listByDatabaseNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByDatabaseSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.ManagedInstanceLongTermRetentionPoliciesClient", "listByDatabaseNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceLongTermRetentionPoliciesClient", "listByDatabaseNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByDatabaseComplete enumerates all values, automatically crossing page boundaries as required. -func (client ManagedInstanceLongTermRetentionPoliciesClient) ListByDatabaseComplete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result ManagedInstanceLongTermRetentionPolicyListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceLongTermRetentionPoliciesClient.ListByDatabase") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByDatabase(ctx, resourceGroupName, managedInstanceName, databaseName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstanceoperations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstanceoperations.go deleted file mode 100644 index efb51919896bd..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstanceoperations.go +++ /dev/null @@ -1,232 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "github.com/gofrs/uuid" - "net/http" -) - -// ManagedInstanceOperationsClient is the the Azure SQL Database management API provides a RESTful set of web services -// that interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, -// update, and delete databases. -type ManagedInstanceOperationsClient struct { - BaseClient -} - -// NewManagedInstanceOperationsClient creates an instance of the ManagedInstanceOperationsClient client. -func NewManagedInstanceOperationsClient(subscriptionID string) ManagedInstanceOperationsClient { - return NewManagedInstanceOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewManagedInstanceOperationsClientWithBaseURI creates an instance of the ManagedInstanceOperationsClient client -// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign -// clouds, Azure stack). -func NewManagedInstanceOperationsClientWithBaseURI(baseURI string, subscriptionID string) ManagedInstanceOperationsClient { - return ManagedInstanceOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets a management operation on a managed instance. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -func (client ManagedInstanceOperationsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, operationID uuid.UUID) (result ManagedInstanceOperation, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceOperationsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, managedInstanceName, operationID) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ManagedInstanceOperationsClient) GetPreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, operationID uuid.UUID) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "operationId": autorest.Encode("path", operationID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations/{operationId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstanceOperationsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ManagedInstanceOperationsClient) GetResponder(resp *http.Response) (result ManagedInstanceOperation, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByManagedInstance gets a list of operations performed on the managed instance. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -func (client ManagedInstanceOperationsClient) ListByManagedInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result ManagedInstanceOperationListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceOperationsClient.ListByManagedInstance") - defer func() { - sc := -1 - if result.miolr.Response.Response != nil { - sc = result.miolr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByManagedInstanceNextResults - req, err := client.ListByManagedInstancePreparer(ctx, resourceGroupName, managedInstanceName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "ListByManagedInstance", nil, "Failure preparing request") - return - } - - resp, err := client.ListByManagedInstanceSender(req) - if err != nil { - result.miolr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "ListByManagedInstance", resp, "Failure sending request") - return - } - - result.miolr, err = client.ListByManagedInstanceResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "ListByManagedInstance", resp, "Failure responding to request") - return - } - if result.miolr.hasNextLink() && result.miolr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByManagedInstancePreparer prepares the ListByManagedInstance request. -func (client ManagedInstanceOperationsClient) ListByManagedInstancePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByManagedInstanceSender sends the ListByManagedInstance request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstanceOperationsClient) ListByManagedInstanceSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByManagedInstanceResponder handles the response to the ListByManagedInstance request. The method always -// closes the http.Response Body. -func (client ManagedInstanceOperationsClient) ListByManagedInstanceResponder(resp *http.Response) (result ManagedInstanceOperationListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByManagedInstanceNextResults retrieves the next set of results, if any. -func (client ManagedInstanceOperationsClient) listByManagedInstanceNextResults(ctx context.Context, lastResults ManagedInstanceOperationListResult) (result ManagedInstanceOperationListResult, err error) { - req, err := lastResults.managedInstanceOperationListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "listByManagedInstanceNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByManagedInstanceSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "listByManagedInstanceNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByManagedInstanceResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "listByManagedInstanceNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByManagedInstanceComplete enumerates all values, automatically crossing page boundaries as required. -func (client ManagedInstanceOperationsClient) ListByManagedInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result ManagedInstanceOperationListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceOperationsClient.ListByManagedInstance") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByManagedInstance(ctx, resourceGroupName, managedInstanceName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstances.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstances.go deleted file mode 100644 index d983a99d94a22..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstances.go +++ /dev/null @@ -1,713 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ManagedInstancesClient is the the Azure SQL Database management API provides a RESTful set of web services that -// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. -type ManagedInstancesClient struct { - BaseClient -} - -// NewManagedInstancesClient creates an instance of the ManagedInstancesClient client. -func NewManagedInstancesClient(subscriptionID string) ManagedInstancesClient { - return NewManagedInstancesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewManagedInstancesClientWithBaseURI creates an instance of the ManagedInstancesClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewManagedInstancesClientWithBaseURI(baseURI string, subscriptionID string) ManagedInstancesClient { - return ManagedInstancesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a managed instance. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// parameters - the requested managed instance resource state. -func (client ManagedInstancesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstance) (result ManagedInstancesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Sku.Name", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("sql.ManagedInstancesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, managedInstanceName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ManagedInstancesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstance) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstancesClient) CreateOrUpdateSender(req *http.Request) (future ManagedInstancesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ManagedInstancesClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedInstance, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a managed instance. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -func (client ManagedInstancesClient) Delete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result ManagedInstancesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, managedInstanceName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ManagedInstancesClient) DeletePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstancesClient) DeleteSender(req *http.Request) (future ManagedInstancesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ManagedInstancesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a managed instance. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -func (client ManagedInstancesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string) (result ManagedInstance, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, managedInstanceName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ManagedInstancesClient) GetPreparer(ctx context.Context, resourceGroupName string, managedInstanceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstancesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ManagedInstancesClient) GetResponder(resp *http.Response) (result ManagedInstance, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of all managed instances in the subscription. -func (client ManagedInstancesClient) List(ctx context.Context) (result ManagedInstanceListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.List") - defer func() { - sc := -1 - if result.milr.Response.Response != nil { - sc = result.milr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.milr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "List", resp, "Failure sending request") - return - } - - result.milr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "List", resp, "Failure responding to request") - return - } - if result.milr.hasNextLink() && result.milr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client ManagedInstancesClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstancesClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client ManagedInstancesClient) ListResponder(resp *http.Response) (result ManagedInstanceListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client ManagedInstancesClient) listNextResults(ctx context.Context, lastResults ManagedInstanceListResult) (result ManagedInstanceListResult, err error) { - req, err := lastResults.managedInstanceListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ManagedInstancesClient) ListComplete(ctx context.Context) (result ManagedInstanceListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx) - return -} - -// ListByInstancePool gets a list of all managed instances in an instance pool. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// instancePoolName - the instance pool name. -func (client ManagedInstancesClient) ListByInstancePool(ctx context.Context, resourceGroupName string, instancePoolName string) (result ManagedInstanceListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.ListByInstancePool") - defer func() { - sc := -1 - if result.milr.Response.Response != nil { - sc = result.milr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByInstancePoolNextResults - req, err := client.ListByInstancePoolPreparer(ctx, resourceGroupName, instancePoolName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "ListByInstancePool", nil, "Failure preparing request") - return - } - - resp, err := client.ListByInstancePoolSender(req) - if err != nil { - result.milr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "ListByInstancePool", resp, "Failure sending request") - return - } - - result.milr, err = client.ListByInstancePoolResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "ListByInstancePool", resp, "Failure responding to request") - return - } - if result.milr.hasNextLink() && result.milr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByInstancePoolPreparer prepares the ListByInstancePool request. -func (client ManagedInstancesClient) ListByInstancePoolPreparer(ctx context.Context, resourceGroupName string, instancePoolName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "instancePoolName": autorest.Encode("path", instancePoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByInstancePoolSender sends the ListByInstancePool request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstancesClient) ListByInstancePoolSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByInstancePoolResponder handles the response to the ListByInstancePool request. The method always -// closes the http.Response Body. -func (client ManagedInstancesClient) ListByInstancePoolResponder(resp *http.Response) (result ManagedInstanceListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByInstancePoolNextResults retrieves the next set of results, if any. -func (client ManagedInstancesClient) listByInstancePoolNextResults(ctx context.Context, lastResults ManagedInstanceListResult) (result ManagedInstanceListResult, err error) { - req, err := lastResults.managedInstanceListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "listByInstancePoolNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByInstancePoolSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "listByInstancePoolNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByInstancePoolResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "listByInstancePoolNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByInstancePoolComplete enumerates all values, automatically crossing page boundaries as required. -func (client ManagedInstancesClient) ListByInstancePoolComplete(ctx context.Context, resourceGroupName string, instancePoolName string) (result ManagedInstanceListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.ListByInstancePool") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByInstancePool(ctx, resourceGroupName, instancePoolName) - return -} - -// ListByResourceGroup gets a list of managed instances in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -func (client ManagedInstancesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ManagedInstanceListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.milr.Response.Response != nil { - sc = result.milr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.milr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - result.milr, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "ListByResourceGroup", resp, "Failure responding to request") - return - } - if result.milr.hasNextLink() && result.milr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client ManagedInstancesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstancesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client ManagedInstancesClient) ListByResourceGroupResponder(resp *http.Response) (result ManagedInstanceListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client ManagedInstancesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ManagedInstanceListResult) (result ManagedInstanceListResult, err error) { - req, err := lastResults.managedInstanceListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client ManagedInstancesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ManagedInstanceListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// Update updates a managed instance. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance. -// parameters - the requested managed instance resource state. -func (client ManagedInstancesClient) Update(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstanceUpdate) (result ManagedInstancesUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, managedInstanceName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client ManagedInstancesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstanceUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstancesClient) UpdateSender(req *http.Request) (future ManagedInstancesUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client ManagedInstancesClient) UpdateResponder(resp *http.Response) (result ManagedInstance, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstancevulnerabilityassessments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstancevulnerabilityassessments.go deleted file mode 100644 index f253dcc02c871..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstancevulnerabilityassessments.go +++ /dev/null @@ -1,398 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ManagedInstanceVulnerabilityAssessmentsClient is the the Azure SQL Database management API provides a RESTful set of -// web services that interact with Azure SQL Database services to manage your databases. The API enables you to create, -// retrieve, update, and delete databases. -type ManagedInstanceVulnerabilityAssessmentsClient struct { - BaseClient -} - -// NewManagedInstanceVulnerabilityAssessmentsClient creates an instance of the -// ManagedInstanceVulnerabilityAssessmentsClient client. -func NewManagedInstanceVulnerabilityAssessmentsClient(subscriptionID string) ManagedInstanceVulnerabilityAssessmentsClient { - return NewManagedInstanceVulnerabilityAssessmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewManagedInstanceVulnerabilityAssessmentsClientWithBaseURI creates an instance of the -// ManagedInstanceVulnerabilityAssessmentsClient client using a custom endpoint. Use this when interacting with an -// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewManagedInstanceVulnerabilityAssessmentsClientWithBaseURI(baseURI string, subscriptionID string) ManagedInstanceVulnerabilityAssessmentsClient { - return ManagedInstanceVulnerabilityAssessmentsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates the managed instance's vulnerability assessment. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance for which the vulnerability assessment is defined. -// parameters - the requested resource. -func (client ManagedInstanceVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstanceVulnerabilityAssessment) (result ManagedInstanceVulnerabilityAssessment, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceVulnerabilityAssessmentsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ManagedInstanceVulnerabilityAssessmentProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedInstanceVulnerabilityAssessmentProperties.StorageContainerPath", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("sql.ManagedInstanceVulnerabilityAssessmentsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, managedInstanceName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceVulnerabilityAssessmentsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceVulnerabilityAssessmentsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceVulnerabilityAssessmentsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ManagedInstanceVulnerabilityAssessmentsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstanceVulnerabilityAssessment) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vulnerabilityAssessmentName": autorest.Encode("path", "default"), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstanceVulnerabilityAssessmentsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ManagedInstanceVulnerabilityAssessmentsClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedInstanceVulnerabilityAssessment, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete removes the managed instance's vulnerability assessment. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance for which the vulnerability assessment is defined. -func (client ManagedInstanceVulnerabilityAssessmentsClient) Delete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceVulnerabilityAssessmentsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, managedInstanceName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceVulnerabilityAssessmentsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceVulnerabilityAssessmentsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceVulnerabilityAssessmentsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ManagedInstanceVulnerabilityAssessmentsClient) DeletePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vulnerabilityAssessmentName": autorest.Encode("path", "default"), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstanceVulnerabilityAssessmentsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ManagedInstanceVulnerabilityAssessmentsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets the managed instance's vulnerability assessment. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance for which the vulnerability assessment is defined. -func (client ManagedInstanceVulnerabilityAssessmentsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string) (result ManagedInstanceVulnerabilityAssessment, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceVulnerabilityAssessmentsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, managedInstanceName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceVulnerabilityAssessmentsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceVulnerabilityAssessmentsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceVulnerabilityAssessmentsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ManagedInstanceVulnerabilityAssessmentsClient) GetPreparer(ctx context.Context, resourceGroupName string, managedInstanceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vulnerabilityAssessmentName": autorest.Encode("path", "default"), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstanceVulnerabilityAssessmentsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ManagedInstanceVulnerabilityAssessmentsClient) GetResponder(resp *http.Response) (result ManagedInstanceVulnerabilityAssessment, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByInstance gets the managed instance's vulnerability assessment policies. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// managedInstanceName - the name of the managed instance for which the vulnerability assessments is defined. -func (client ManagedInstanceVulnerabilityAssessmentsClient) ListByInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result ManagedInstanceVulnerabilityAssessmentListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceVulnerabilityAssessmentsClient.ListByInstance") - defer func() { - sc := -1 - if result.mivalr.Response.Response != nil { - sc = result.mivalr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByInstanceNextResults - req, err := client.ListByInstancePreparer(ctx, resourceGroupName, managedInstanceName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceVulnerabilityAssessmentsClient", "ListByInstance", nil, "Failure preparing request") - return - } - - resp, err := client.ListByInstanceSender(req) - if err != nil { - result.mivalr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceVulnerabilityAssessmentsClient", "ListByInstance", resp, "Failure sending request") - return - } - - result.mivalr, err = client.ListByInstanceResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceVulnerabilityAssessmentsClient", "ListByInstance", resp, "Failure responding to request") - return - } - if result.mivalr.hasNextLink() && result.mivalr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByInstancePreparer prepares the ListByInstance request. -func (client ManagedInstanceVulnerabilityAssessmentsClient) ListByInstancePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "managedInstanceName": autorest.Encode("path", managedInstanceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByInstanceSender sends the ListByInstance request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedInstanceVulnerabilityAssessmentsClient) ListByInstanceSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByInstanceResponder handles the response to the ListByInstance request. The method always -// closes the http.Response Body. -func (client ManagedInstanceVulnerabilityAssessmentsClient) ListByInstanceResponder(resp *http.Response) (result ManagedInstanceVulnerabilityAssessmentListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByInstanceNextResults retrieves the next set of results, if any. -func (client ManagedInstanceVulnerabilityAssessmentsClient) listByInstanceNextResults(ctx context.Context, lastResults ManagedInstanceVulnerabilityAssessmentListResult) (result ManagedInstanceVulnerabilityAssessmentListResult, err error) { - req, err := lastResults.managedInstanceVulnerabilityAssessmentListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.ManagedInstanceVulnerabilityAssessmentsClient", "listByInstanceNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByInstanceSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.ManagedInstanceVulnerabilityAssessmentsClient", "listByInstanceNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByInstanceResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceVulnerabilityAssessmentsClient", "listByInstanceNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByInstanceComplete enumerates all values, automatically crossing page boundaries as required. -func (client ManagedInstanceVulnerabilityAssessmentsClient) ListByInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result ManagedInstanceVulnerabilityAssessmentListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceVulnerabilityAssessmentsClient.ListByInstance") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByInstance(ctx, resourceGroupName, managedInstanceName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/models.go deleted file mode 100644 index 78b6b544489e2..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/models.go +++ /dev/null @@ -1,4799 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "encoding/json" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/date" - "github.com/Azure/go-autorest/autorest/to" - "github.com/Azure/go-autorest/tracing" - "github.com/gofrs/uuid" - "net/http" -) - -// The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql" - -// AdministratorListResult a list of active directory administrators. -type AdministratorListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]ServerAzureADAdministrator `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for AdministratorListResult. -func (alr AdministratorListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// AdministratorListResultIterator provides access to a complete listing of ServerAzureADAdministrator -// values. -type AdministratorListResultIterator struct { - i int - page AdministratorListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *AdministratorListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AdministratorListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *AdministratorListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter AdministratorListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter AdministratorListResultIterator) Response() AdministratorListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter AdministratorListResultIterator) Value() ServerAzureADAdministrator { - if !iter.page.NotDone() { - return ServerAzureADAdministrator{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the AdministratorListResultIterator type. -func NewAdministratorListResultIterator(page AdministratorListResultPage) AdministratorListResultIterator { - return AdministratorListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (alr AdministratorListResult) IsEmpty() bool { - return alr.Value == nil || len(*alr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (alr AdministratorListResult) hasNextLink() bool { - return alr.NextLink != nil && len(*alr.NextLink) != 0 -} - -// administratorListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (alr AdministratorListResult) administratorListResultPreparer(ctx context.Context) (*http.Request, error) { - if !alr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(alr.NextLink))) -} - -// AdministratorListResultPage contains a page of ServerAzureADAdministrator values. -type AdministratorListResultPage struct { - fn func(context.Context, AdministratorListResult) (AdministratorListResult, error) - alr AdministratorListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *AdministratorListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AdministratorListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.alr) - if err != nil { - return err - } - page.alr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *AdministratorListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page AdministratorListResultPage) NotDone() bool { - return !page.alr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page AdministratorListResultPage) Response() AdministratorListResult { - return page.alr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page AdministratorListResultPage) Values() []ServerAzureADAdministrator { - if page.alr.IsEmpty() { - return nil - } - return *page.alr.Value -} - -// Creates a new instance of the AdministratorListResultPage type. -func NewAdministratorListResultPage(cur AdministratorListResult, getNextPage func(context.Context, AdministratorListResult) (AdministratorListResult, error)) AdministratorListResultPage { - return AdministratorListResultPage{ - fn: getNextPage, - alr: cur, - } -} - -// AdministratorProperties properties of a active directory administrator. -type AdministratorProperties struct { - // AdministratorType - Type of the sever administrator. - AdministratorType *string `json:"administratorType,omitempty"` - // Login - Login name of the server administrator. - Login *string `json:"login,omitempty"` - // Sid - SID (object ID) of the server administrator. - Sid *uuid.UUID `json:"sid,omitempty"` - // TenantID - Tenant ID of the administrator. - TenantID *uuid.UUID `json:"tenantId,omitempty"` -} - -// BaseLongTermRetentionPolicyProperties properties of a long term retention policy -type BaseLongTermRetentionPolicyProperties struct { - // WeeklyRetention - The weekly retention policy for an LTR backup in an ISO 8601 format. - WeeklyRetention *string `json:"weeklyRetention,omitempty"` - // MonthlyRetention - The monthly retention policy for an LTR backup in an ISO 8601 format. - MonthlyRetention *string `json:"monthlyRetention,omitempty"` - // YearlyRetention - The yearly retention policy for an LTR backup in an ISO 8601 format. - YearlyRetention *string `json:"yearlyRetention,omitempty"` - // WeekOfYear - The week of year to take the yearly backup in an ISO 8601 format. - WeekOfYear *int32 `json:"weekOfYear,omitempty"` -} - -// CompleteDatabaseRestoreDefinition contains the information necessary to perform a complete database -// restore operation. -type CompleteDatabaseRestoreDefinition struct { - // LastBackupName - The last backup name to apply - LastBackupName *string `json:"lastBackupName,omitempty"` -} - -// DatabaseSecurityAlertListResult a list of the database's security alert policies. -type DatabaseSecurityAlertListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]DatabaseSecurityAlertPolicy `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for DatabaseSecurityAlertListResult. -func (dsalr DatabaseSecurityAlertListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// DatabaseSecurityAlertListResultIterator provides access to a complete listing of -// DatabaseSecurityAlertPolicy values. -type DatabaseSecurityAlertListResultIterator struct { - i int - page DatabaseSecurityAlertListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *DatabaseSecurityAlertListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseSecurityAlertListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *DatabaseSecurityAlertListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter DatabaseSecurityAlertListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter DatabaseSecurityAlertListResultIterator) Response() DatabaseSecurityAlertListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter DatabaseSecurityAlertListResultIterator) Value() DatabaseSecurityAlertPolicy { - if !iter.page.NotDone() { - return DatabaseSecurityAlertPolicy{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the DatabaseSecurityAlertListResultIterator type. -func NewDatabaseSecurityAlertListResultIterator(page DatabaseSecurityAlertListResultPage) DatabaseSecurityAlertListResultIterator { - return DatabaseSecurityAlertListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (dsalr DatabaseSecurityAlertListResult) IsEmpty() bool { - return dsalr.Value == nil || len(*dsalr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (dsalr DatabaseSecurityAlertListResult) hasNextLink() bool { - return dsalr.NextLink != nil && len(*dsalr.NextLink) != 0 -} - -// databaseSecurityAlertListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (dsalr DatabaseSecurityAlertListResult) databaseSecurityAlertListResultPreparer(ctx context.Context) (*http.Request, error) { - if !dsalr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(dsalr.NextLink))) -} - -// DatabaseSecurityAlertListResultPage contains a page of DatabaseSecurityAlertPolicy values. -type DatabaseSecurityAlertListResultPage struct { - fn func(context.Context, DatabaseSecurityAlertListResult) (DatabaseSecurityAlertListResult, error) - dsalr DatabaseSecurityAlertListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *DatabaseSecurityAlertListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseSecurityAlertListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.dsalr) - if err != nil { - return err - } - page.dsalr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *DatabaseSecurityAlertListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page DatabaseSecurityAlertListResultPage) NotDone() bool { - return !page.dsalr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page DatabaseSecurityAlertListResultPage) Response() DatabaseSecurityAlertListResult { - return page.dsalr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page DatabaseSecurityAlertListResultPage) Values() []DatabaseSecurityAlertPolicy { - if page.dsalr.IsEmpty() { - return nil - } - return *page.dsalr.Value -} - -// Creates a new instance of the DatabaseSecurityAlertListResultPage type. -func NewDatabaseSecurityAlertListResultPage(cur DatabaseSecurityAlertListResult, getNextPage func(context.Context, DatabaseSecurityAlertListResult) (DatabaseSecurityAlertListResult, error)) DatabaseSecurityAlertListResultPage { - return DatabaseSecurityAlertListResultPage{ - fn: getNextPage, - dsalr: cur, - } -} - -// DatabaseSecurityAlertPolicy a database security alert policy. -type DatabaseSecurityAlertPolicy struct { - autorest.Response `json:"-"` - // SecurityAlertPolicyProperties - Resource properties. - *SecurityAlertPolicyProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for DatabaseSecurityAlertPolicy. -func (dsap DatabaseSecurityAlertPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dsap.SecurityAlertPolicyProperties != nil { - objectMap["properties"] = dsap.SecurityAlertPolicyProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for DatabaseSecurityAlertPolicy struct. -func (dsap *DatabaseSecurityAlertPolicy) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var securityAlertPolicyProperties SecurityAlertPolicyProperties - err = json.Unmarshal(*v, &securityAlertPolicyProperties) - if err != nil { - return err - } - dsap.SecurityAlertPolicyProperties = &securityAlertPolicyProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - dsap.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - dsap.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - dsap.Type = &typeVar - } - } - } - - return nil -} - -// DatabasesFailoverFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type DatabasesFailoverFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DatabasesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DatabasesFailoverFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DatabasesFailoverFuture.Result. -func (future *DatabasesFailoverFuture) result(client DatabasesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesFailoverFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.DatabasesFailoverFuture") - return - } - ar.Response = future.Response() - return -} - -// ElasticPoolsFailoverFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ElasticPoolsFailoverFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ElasticPoolsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ElasticPoolsFailoverFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ElasticPoolsFailoverFuture.Result. -func (future *ElasticPoolsFailoverFuture) result(client ElasticPoolsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsFailoverFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ElasticPoolsFailoverFuture") - return - } - ar.Response = future.Response() - return -} - -// InstancePool an Azure SQL instance pool. -type InstancePool struct { - autorest.Response `json:"-"` - // Sku - The name and tier of the SKU. - Sku *Sku `json:"sku,omitempty"` - // InstancePoolProperties - Resource properties. - *InstancePoolProperties `json:"properties,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for InstancePool. -func (IP InstancePool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if IP.Sku != nil { - objectMap["sku"] = IP.Sku - } - if IP.InstancePoolProperties != nil { - objectMap["properties"] = IP.InstancePoolProperties - } - if IP.Location != nil { - objectMap["location"] = IP.Location - } - if IP.Tags != nil { - objectMap["tags"] = IP.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for InstancePool struct. -func (IP *InstancePool) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "sku": - if v != nil { - var sku Sku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - IP.Sku = &sku - } - case "properties": - if v != nil { - var instancePoolProperties InstancePoolProperties - err = json.Unmarshal(*v, &instancePoolProperties) - if err != nil { - return err - } - IP.InstancePoolProperties = &instancePoolProperties - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - IP.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - IP.Tags = tags - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - IP.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - IP.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - IP.Type = &typeVar - } - } - } - - return nil -} - -// InstancePoolListResult a list of Azure SQL instance pools. -type InstancePoolListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]InstancePool `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for InstancePoolListResult. -func (iplr InstancePoolListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// InstancePoolListResultIterator provides access to a complete listing of InstancePool values. -type InstancePoolListResultIterator struct { - i int - page InstancePoolListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *InstancePoolListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InstancePoolListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *InstancePoolListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter InstancePoolListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter InstancePoolListResultIterator) Response() InstancePoolListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter InstancePoolListResultIterator) Value() InstancePool { - if !iter.page.NotDone() { - return InstancePool{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the InstancePoolListResultIterator type. -func NewInstancePoolListResultIterator(page InstancePoolListResultPage) InstancePoolListResultIterator { - return InstancePoolListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (iplr InstancePoolListResult) IsEmpty() bool { - return iplr.Value == nil || len(*iplr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (iplr InstancePoolListResult) hasNextLink() bool { - return iplr.NextLink != nil && len(*iplr.NextLink) != 0 -} - -// instancePoolListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (iplr InstancePoolListResult) instancePoolListResultPreparer(ctx context.Context) (*http.Request, error) { - if !iplr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(iplr.NextLink))) -} - -// InstancePoolListResultPage contains a page of InstancePool values. -type InstancePoolListResultPage struct { - fn func(context.Context, InstancePoolListResult) (InstancePoolListResult, error) - iplr InstancePoolListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *InstancePoolListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InstancePoolListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.iplr) - if err != nil { - return err - } - page.iplr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *InstancePoolListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page InstancePoolListResultPage) NotDone() bool { - return !page.iplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page InstancePoolListResultPage) Response() InstancePoolListResult { - return page.iplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page InstancePoolListResultPage) Values() []InstancePool { - if page.iplr.IsEmpty() { - return nil - } - return *page.iplr.Value -} - -// Creates a new instance of the InstancePoolListResultPage type. -func NewInstancePoolListResultPage(cur InstancePoolListResult, getNextPage func(context.Context, InstancePoolListResult) (InstancePoolListResult, error)) InstancePoolListResultPage { - return InstancePoolListResultPage{ - fn: getNextPage, - iplr: cur, - } -} - -// InstancePoolProperties properties of an instance pool. -type InstancePoolProperties struct { - // SubnetID - Resource ID of the subnet to place this instance pool in. - SubnetID *string `json:"subnetId,omitempty"` - // VCores - Count of vCores belonging to this instance pool. - VCores *int32 `json:"vCores,omitempty"` - // LicenseType - The license type. Possible values are 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' (without SQL license price). Possible values include: 'LicenseIncluded', 'BasePrice' - LicenseType InstancePoolLicenseType `json:"licenseType,omitempty"` -} - -// InstancePoolsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type InstancePoolsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(InstancePoolsClient) (InstancePool, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *InstancePoolsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for InstancePoolsCreateOrUpdateFuture.Result. -func (future *InstancePoolsCreateOrUpdateFuture) result(client InstancePoolsClient) (IP InstancePool, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.InstancePoolsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - IP.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.InstancePoolsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if IP.Response.Response, err = future.GetResult(sender); err == nil && IP.Response.Response.StatusCode != http.StatusNoContent { - IP, err = client.CreateOrUpdateResponder(IP.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.InstancePoolsCreateOrUpdateFuture", "Result", IP.Response.Response, "Failure responding to request") - } - } - return -} - -// InstancePoolsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type InstancePoolsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(InstancePoolsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *InstancePoolsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for InstancePoolsDeleteFuture.Result. -func (future *InstancePoolsDeleteFuture) result(client InstancePoolsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.InstancePoolsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.InstancePoolsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// InstancePoolsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type InstancePoolsUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(InstancePoolsClient) (InstancePool, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *InstancePoolsUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for InstancePoolsUpdateFuture.Result. -func (future *InstancePoolsUpdateFuture) result(client InstancePoolsClient) (IP InstancePool, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.InstancePoolsUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - IP.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.InstancePoolsUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if IP.Response.Response, err = future.GetResult(sender); err == nil && IP.Response.Response.StatusCode != http.StatusNoContent { - IP, err = client.UpdateResponder(IP.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.InstancePoolsUpdateFuture", "Result", IP.Response.Response, "Failure responding to request") - } - } - return -} - -// InstancePoolUpdate an update to an Instance pool. -type InstancePoolUpdate struct { - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for InstancePoolUpdate. -func (ipu InstancePoolUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ipu.Tags != nil { - objectMap["tags"] = ipu.Tags - } - return json.Marshal(objectMap) -} - -// LongTermRetentionManagedInstanceBackupsDeleteByResourceGroupFuture an abstraction for monitoring and -// retrieving the results of a long-running operation. -type LongTermRetentionManagedInstanceBackupsDeleteByResourceGroupFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(LongTermRetentionManagedInstanceBackupsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *LongTermRetentionManagedInstanceBackupsDeleteByResourceGroupFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for LongTermRetentionManagedInstanceBackupsDeleteByResourceGroupFuture.Result. -func (future *LongTermRetentionManagedInstanceBackupsDeleteByResourceGroupFuture) result(client LongTermRetentionManagedInstanceBackupsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsDeleteByResourceGroupFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.LongTermRetentionManagedInstanceBackupsDeleteByResourceGroupFuture") - return - } - ar.Response = future.Response() - return -} - -// LongTermRetentionManagedInstanceBackupsDeleteFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type LongTermRetentionManagedInstanceBackupsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(LongTermRetentionManagedInstanceBackupsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *LongTermRetentionManagedInstanceBackupsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for LongTermRetentionManagedInstanceBackupsDeleteFuture.Result. -func (future *LongTermRetentionManagedInstanceBackupsDeleteFuture) result(client LongTermRetentionManagedInstanceBackupsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.LongTermRetentionManagedInstanceBackupsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.LongTermRetentionManagedInstanceBackupsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ManagedDatabase a managed database resource. -type ManagedDatabase struct { - autorest.Response `json:"-"` - // ManagedDatabaseProperties - Resource properties. - *ManagedDatabaseProperties `json:"properties,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedDatabase. -func (md ManagedDatabase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if md.ManagedDatabaseProperties != nil { - objectMap["properties"] = md.ManagedDatabaseProperties - } - if md.Location != nil { - objectMap["location"] = md.Location - } - if md.Tags != nil { - objectMap["tags"] = md.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ManagedDatabase struct. -func (md *ManagedDatabase) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var managedDatabaseProperties ManagedDatabaseProperties - err = json.Unmarshal(*v, &managedDatabaseProperties) - if err != nil { - return err - } - md.ManagedDatabaseProperties = &managedDatabaseProperties - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - md.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - md.Tags = tags - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - md.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - md.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - md.Type = &typeVar - } - } - } - - return nil -} - -// ManagedDatabaseListResult a list of managed databases. -type ManagedDatabaseListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]ManagedDatabase `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedDatabaseListResult. -func (mdlr ManagedDatabaseListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ManagedDatabaseListResultIterator provides access to a complete listing of ManagedDatabase values. -type ManagedDatabaseListResultIterator struct { - i int - page ManagedDatabaseListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ManagedDatabaseListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabaseListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ManagedDatabaseListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ManagedDatabaseListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter ManagedDatabaseListResultIterator) Response() ManagedDatabaseListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ManagedDatabaseListResultIterator) Value() ManagedDatabase { - if !iter.page.NotDone() { - return ManagedDatabase{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ManagedDatabaseListResultIterator type. -func NewManagedDatabaseListResultIterator(page ManagedDatabaseListResultPage) ManagedDatabaseListResultIterator { - return ManagedDatabaseListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (mdlr ManagedDatabaseListResult) IsEmpty() bool { - return mdlr.Value == nil || len(*mdlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (mdlr ManagedDatabaseListResult) hasNextLink() bool { - return mdlr.NextLink != nil && len(*mdlr.NextLink) != 0 -} - -// managedDatabaseListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (mdlr ManagedDatabaseListResult) managedDatabaseListResultPreparer(ctx context.Context) (*http.Request, error) { - if !mdlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(mdlr.NextLink))) -} - -// ManagedDatabaseListResultPage contains a page of ManagedDatabase values. -type ManagedDatabaseListResultPage struct { - fn func(context.Context, ManagedDatabaseListResult) (ManagedDatabaseListResult, error) - mdlr ManagedDatabaseListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ManagedDatabaseListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabaseListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.mdlr) - if err != nil { - return err - } - page.mdlr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ManagedDatabaseListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ManagedDatabaseListResultPage) NotDone() bool { - return !page.mdlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ManagedDatabaseListResultPage) Response() ManagedDatabaseListResult { - return page.mdlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ManagedDatabaseListResultPage) Values() []ManagedDatabase { - if page.mdlr.IsEmpty() { - return nil - } - return *page.mdlr.Value -} - -// Creates a new instance of the ManagedDatabaseListResultPage type. -func NewManagedDatabaseListResultPage(cur ManagedDatabaseListResult, getNextPage func(context.Context, ManagedDatabaseListResult) (ManagedDatabaseListResult, error)) ManagedDatabaseListResultPage { - return ManagedDatabaseListResultPage{ - fn: getNextPage, - mdlr: cur, - } -} - -// ManagedDatabaseProperties the managed database's properties. -type ManagedDatabaseProperties struct { - // Collation - Collation of the managed database. - Collation *string `json:"collation,omitempty"` - // Status - READ-ONLY; Status of the database. Possible values include: 'Online', 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Restoring', 'Updating' - Status ManagedDatabaseStatus `json:"status,omitempty"` - // CreationDate - READ-ONLY; Creation date of the database. - CreationDate *date.Time `json:"creationDate,omitempty"` - // EarliestRestorePoint - READ-ONLY; Earliest restore point in time for point in time restore. - EarliestRestorePoint *date.Time `json:"earliestRestorePoint,omitempty"` - // RestorePointInTime - Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. - RestorePointInTime *date.Time `json:"restorePointInTime,omitempty"` - // DefaultSecondaryLocation - READ-ONLY; Geo paired region. - DefaultSecondaryLocation *string `json:"defaultSecondaryLocation,omitempty"` - // CatalogCollation - Collation of the metadata catalog. Possible values include: 'DATABASEDEFAULT', 'SQLLatin1GeneralCP1CIAS' - CatalogCollation CatalogCollationType `json:"catalogCollation,omitempty"` - // CreateMode - Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. Possible values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery', 'RestoreLongTermRetentionBackup' - CreateMode ManagedDatabaseCreateMode `json:"createMode,omitempty"` - // StorageContainerURI - Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored. - StorageContainerURI *string `json:"storageContainerUri,omitempty"` - // SourceDatabaseID - The resource identifier of the source database associated with create operation of this database. - SourceDatabaseID *string `json:"sourceDatabaseId,omitempty"` - // RestorableDroppedDatabaseID - The restorable dropped database resource id to restore when creating this database. - RestorableDroppedDatabaseID *string `json:"restorableDroppedDatabaseId,omitempty"` - // StorageContainerSasToken - Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token. - StorageContainerSasToken *string `json:"storageContainerSasToken,omitempty"` - // FailoverGroupID - READ-ONLY; Instance Failover Group resource identifier that this managed database belongs to. - FailoverGroupID *string `json:"failoverGroupId,omitempty"` - // RecoverableDatabaseID - The resource identifier of the recoverable database associated with create operation of this database. - RecoverableDatabaseID *string `json:"recoverableDatabaseId,omitempty"` - // LongTermRetentionBackupResourceID - The name of the Long Term Retention backup to be used for restore of this managed database. - LongTermRetentionBackupResourceID *string `json:"longTermRetentionBackupResourceId,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedDatabaseProperties. -func (mdp ManagedDatabaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mdp.Collation != nil { - objectMap["collation"] = mdp.Collation - } - if mdp.RestorePointInTime != nil { - objectMap["restorePointInTime"] = mdp.RestorePointInTime - } - if mdp.CatalogCollation != "" { - objectMap["catalogCollation"] = mdp.CatalogCollation - } - if mdp.CreateMode != "" { - objectMap["createMode"] = mdp.CreateMode - } - if mdp.StorageContainerURI != nil { - objectMap["storageContainerUri"] = mdp.StorageContainerURI - } - if mdp.SourceDatabaseID != nil { - objectMap["sourceDatabaseId"] = mdp.SourceDatabaseID - } - if mdp.RestorableDroppedDatabaseID != nil { - objectMap["restorableDroppedDatabaseId"] = mdp.RestorableDroppedDatabaseID - } - if mdp.StorageContainerSasToken != nil { - objectMap["storageContainerSasToken"] = mdp.StorageContainerSasToken - } - if mdp.RecoverableDatabaseID != nil { - objectMap["recoverableDatabaseId"] = mdp.RecoverableDatabaseID - } - if mdp.LongTermRetentionBackupResourceID != nil { - objectMap["longTermRetentionBackupResourceId"] = mdp.LongTermRetentionBackupResourceID - } - return json.Marshal(objectMap) -} - -// ManagedDatabaseRestoreDetailsProperties the managed database's restore details properties. -type ManagedDatabaseRestoreDetailsProperties struct { - // Status - READ-ONLY; Restore status. - Status *string `json:"status,omitempty"` - // CurrentRestoringFileName - READ-ONLY; Current restoring file name. - CurrentRestoringFileName *string `json:"currentRestoringFileName,omitempty"` - // LastRestoredFileName - READ-ONLY; Last restored file name. - LastRestoredFileName *string `json:"lastRestoredFileName,omitempty"` - // LastRestoredFileTime - READ-ONLY; Last restored file time. - LastRestoredFileTime *date.Time `json:"lastRestoredFileTime,omitempty"` - // PercentCompleted - READ-ONLY; Percent completed. - PercentCompleted *float64 `json:"percentCompleted,omitempty"` - // UnrestorableFiles - READ-ONLY; List of unrestorable files. - UnrestorableFiles *[]string `json:"unrestorableFiles,omitempty"` - // NumberOfFilesDetected - READ-ONLY; Number of files detected. - NumberOfFilesDetected *int64 `json:"numberOfFilesDetected,omitempty"` - // LastUploadedFileName - READ-ONLY; Last uploaded file name. - LastUploadedFileName *string `json:"lastUploadedFileName,omitempty"` - // LastUploadedFileTime - READ-ONLY; Last uploaded file time. - LastUploadedFileTime *date.Time `json:"lastUploadedFileTime,omitempty"` - // BlockReason - READ-ONLY; The reason why restore is in Blocked state. - BlockReason *string `json:"blockReason,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedDatabaseRestoreDetailsProperties. -func (mdrdp ManagedDatabaseRestoreDetailsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ManagedDatabaseRestoreDetailsResult a managed database restore details. -type ManagedDatabaseRestoreDetailsResult struct { - autorest.Response `json:"-"` - // ManagedDatabaseRestoreDetailsProperties - Resource properties. - *ManagedDatabaseRestoreDetailsProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedDatabaseRestoreDetailsResult. -func (mdrdr ManagedDatabaseRestoreDetailsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mdrdr.ManagedDatabaseRestoreDetailsProperties != nil { - objectMap["properties"] = mdrdr.ManagedDatabaseRestoreDetailsProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ManagedDatabaseRestoreDetailsResult struct. -func (mdrdr *ManagedDatabaseRestoreDetailsResult) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var managedDatabaseRestoreDetailsProperties ManagedDatabaseRestoreDetailsProperties - err = json.Unmarshal(*v, &managedDatabaseRestoreDetailsProperties) - if err != nil { - return err - } - mdrdr.ManagedDatabaseRestoreDetailsProperties = &managedDatabaseRestoreDetailsProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - mdrdr.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - mdrdr.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - mdrdr.Type = &typeVar - } - } - } - - return nil -} - -// ManagedDatabasesCompleteRestoreFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ManagedDatabasesCompleteRestoreFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ManagedDatabasesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ManagedDatabasesCompleteRestoreFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ManagedDatabasesCompleteRestoreFuture.Result. -func (future *ManagedDatabasesCompleteRestoreFuture) result(client ManagedDatabasesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesCompleteRestoreFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ManagedDatabasesCompleteRestoreFuture") - return - } - ar.Response = future.Response() - return -} - -// ManagedDatabasesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ManagedDatabasesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ManagedDatabasesClient) (ManagedDatabase, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ManagedDatabasesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ManagedDatabasesCreateOrUpdateFuture.Result. -func (future *ManagedDatabasesCreateOrUpdateFuture) result(client ManagedDatabasesClient) (md ManagedDatabase, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - md.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ManagedDatabasesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if md.Response.Response, err = future.GetResult(sender); err == nil && md.Response.Response.StatusCode != http.StatusNoContent { - md, err = client.CreateOrUpdateResponder(md.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesCreateOrUpdateFuture", "Result", md.Response.Response, "Failure responding to request") - } - } - return -} - -// ManagedDatabasesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ManagedDatabasesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ManagedDatabasesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ManagedDatabasesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ManagedDatabasesDeleteFuture.Result. -func (future *ManagedDatabasesDeleteFuture) result(client ManagedDatabasesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ManagedDatabasesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ManagedDatabasesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ManagedDatabasesUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ManagedDatabasesClient) (ManagedDatabase, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ManagedDatabasesUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ManagedDatabasesUpdateFuture.Result. -func (future *ManagedDatabasesUpdateFuture) result(client ManagedDatabasesClient) (md ManagedDatabase, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - md.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ManagedDatabasesUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if md.Response.Response, err = future.GetResult(sender); err == nil && md.Response.Response.StatusCode != http.StatusNoContent { - md, err = client.UpdateResponder(md.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesUpdateFuture", "Result", md.Response.Response, "Failure responding to request") - } - } - return -} - -// ManagedDatabaseUpdate an managed database update. -type ManagedDatabaseUpdate struct { - // ManagedDatabaseProperties - Resource properties. - *ManagedDatabaseProperties `json:"properties,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for ManagedDatabaseUpdate. -func (mdu ManagedDatabaseUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mdu.ManagedDatabaseProperties != nil { - objectMap["properties"] = mdu.ManagedDatabaseProperties - } - if mdu.Tags != nil { - objectMap["tags"] = mdu.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ManagedDatabaseUpdate struct. -func (mdu *ManagedDatabaseUpdate) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var managedDatabaseProperties ManagedDatabaseProperties - err = json.Unmarshal(*v, &managedDatabaseProperties) - if err != nil { - return err - } - mdu.ManagedDatabaseProperties = &managedDatabaseProperties - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - mdu.Tags = tags - } - } - } - - return nil -} - -// ManagedInstance an Azure SQL managed instance. -type ManagedInstance struct { - autorest.Response `json:"-"` - // Identity - The Azure Active Directory identity of the managed instance. - Identity *ResourceIdentity `json:"identity,omitempty"` - // Sku - Managed instance SKU. Allowed values for sku.name: GP_Gen4, GP_Gen5, BC_Gen4, BC_Gen5 - Sku *Sku `json:"sku,omitempty"` - // ManagedInstanceProperties - Resource properties. - *ManagedInstanceProperties `json:"properties,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedInstance. -func (mi ManagedInstance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mi.Identity != nil { - objectMap["identity"] = mi.Identity - } - if mi.Sku != nil { - objectMap["sku"] = mi.Sku - } - if mi.ManagedInstanceProperties != nil { - objectMap["properties"] = mi.ManagedInstanceProperties - } - if mi.Location != nil { - objectMap["location"] = mi.Location - } - if mi.Tags != nil { - objectMap["tags"] = mi.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ManagedInstance struct. -func (mi *ManagedInstance) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "identity": - if v != nil { - var identity ResourceIdentity - err = json.Unmarshal(*v, &identity) - if err != nil { - return err - } - mi.Identity = &identity - } - case "sku": - if v != nil { - var sku Sku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - mi.Sku = &sku - } - case "properties": - if v != nil { - var managedInstanceProperties ManagedInstanceProperties - err = json.Unmarshal(*v, &managedInstanceProperties) - if err != nil { - return err - } - mi.ManagedInstanceProperties = &managedInstanceProperties - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - mi.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - mi.Tags = tags - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - mi.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - mi.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - mi.Type = &typeVar - } - } - } - - return nil -} - -// ManagedInstanceListResult a list of managed instances. -type ManagedInstanceListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]ManagedInstance `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedInstanceListResult. -func (milr ManagedInstanceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ManagedInstanceListResultIterator provides access to a complete listing of ManagedInstance values. -type ManagedInstanceListResultIterator struct { - i int - page ManagedInstanceListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ManagedInstanceListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ManagedInstanceListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ManagedInstanceListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter ManagedInstanceListResultIterator) Response() ManagedInstanceListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ManagedInstanceListResultIterator) Value() ManagedInstance { - if !iter.page.NotDone() { - return ManagedInstance{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ManagedInstanceListResultIterator type. -func NewManagedInstanceListResultIterator(page ManagedInstanceListResultPage) ManagedInstanceListResultIterator { - return ManagedInstanceListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (milr ManagedInstanceListResult) IsEmpty() bool { - return milr.Value == nil || len(*milr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (milr ManagedInstanceListResult) hasNextLink() bool { - return milr.NextLink != nil && len(*milr.NextLink) != 0 -} - -// managedInstanceListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (milr ManagedInstanceListResult) managedInstanceListResultPreparer(ctx context.Context) (*http.Request, error) { - if !milr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(milr.NextLink))) -} - -// ManagedInstanceListResultPage contains a page of ManagedInstance values. -type ManagedInstanceListResultPage struct { - fn func(context.Context, ManagedInstanceListResult) (ManagedInstanceListResult, error) - milr ManagedInstanceListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ManagedInstanceListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.milr) - if err != nil { - return err - } - page.milr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ManagedInstanceListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ManagedInstanceListResultPage) NotDone() bool { - return !page.milr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ManagedInstanceListResultPage) Response() ManagedInstanceListResult { - return page.milr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ManagedInstanceListResultPage) Values() []ManagedInstance { - if page.milr.IsEmpty() { - return nil - } - return *page.milr.Value -} - -// Creates a new instance of the ManagedInstanceListResultPage type. -func NewManagedInstanceListResultPage(cur ManagedInstanceListResult, getNextPage func(context.Context, ManagedInstanceListResult) (ManagedInstanceListResult, error)) ManagedInstanceListResultPage { - return ManagedInstanceListResultPage{ - fn: getNextPage, - milr: cur, - } -} - -// ManagedInstanceLongTermRetentionBackup a long term retention backup for a managed database. -type ManagedInstanceLongTermRetentionBackup struct { - autorest.Response `json:"-"` - // ManagedInstanceLongTermRetentionBackupProperties - Resource properties. - *ManagedInstanceLongTermRetentionBackupProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedInstanceLongTermRetentionBackup. -func (miltrb ManagedInstanceLongTermRetentionBackup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if miltrb.ManagedInstanceLongTermRetentionBackupProperties != nil { - objectMap["properties"] = miltrb.ManagedInstanceLongTermRetentionBackupProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ManagedInstanceLongTermRetentionBackup struct. -func (miltrb *ManagedInstanceLongTermRetentionBackup) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var managedInstanceLongTermRetentionBackupProperties ManagedInstanceLongTermRetentionBackupProperties - err = json.Unmarshal(*v, &managedInstanceLongTermRetentionBackupProperties) - if err != nil { - return err - } - miltrb.ManagedInstanceLongTermRetentionBackupProperties = &managedInstanceLongTermRetentionBackupProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - miltrb.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - miltrb.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - miltrb.Type = &typeVar - } - } - } - - return nil -} - -// ManagedInstanceLongTermRetentionBackupListResult a list of long term retention backups for managed -// database(s). -type ManagedInstanceLongTermRetentionBackupListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]ManagedInstanceLongTermRetentionBackup `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedInstanceLongTermRetentionBackupListResult. -func (miltrblr ManagedInstanceLongTermRetentionBackupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ManagedInstanceLongTermRetentionBackupListResultIterator provides access to a complete listing of -// ManagedInstanceLongTermRetentionBackup values. -type ManagedInstanceLongTermRetentionBackupListResultIterator struct { - i int - page ManagedInstanceLongTermRetentionBackupListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ManagedInstanceLongTermRetentionBackupListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceLongTermRetentionBackupListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ManagedInstanceLongTermRetentionBackupListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ManagedInstanceLongTermRetentionBackupListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter ManagedInstanceLongTermRetentionBackupListResultIterator) Response() ManagedInstanceLongTermRetentionBackupListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ManagedInstanceLongTermRetentionBackupListResultIterator) Value() ManagedInstanceLongTermRetentionBackup { - if !iter.page.NotDone() { - return ManagedInstanceLongTermRetentionBackup{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ManagedInstanceLongTermRetentionBackupListResultIterator type. -func NewManagedInstanceLongTermRetentionBackupListResultIterator(page ManagedInstanceLongTermRetentionBackupListResultPage) ManagedInstanceLongTermRetentionBackupListResultIterator { - return ManagedInstanceLongTermRetentionBackupListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (miltrblr ManagedInstanceLongTermRetentionBackupListResult) IsEmpty() bool { - return miltrblr.Value == nil || len(*miltrblr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (miltrblr ManagedInstanceLongTermRetentionBackupListResult) hasNextLink() bool { - return miltrblr.NextLink != nil && len(*miltrblr.NextLink) != 0 -} - -// managedInstanceLongTermRetentionBackupListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (miltrblr ManagedInstanceLongTermRetentionBackupListResult) managedInstanceLongTermRetentionBackupListResultPreparer(ctx context.Context) (*http.Request, error) { - if !miltrblr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(miltrblr.NextLink))) -} - -// ManagedInstanceLongTermRetentionBackupListResultPage contains a page of -// ManagedInstanceLongTermRetentionBackup values. -type ManagedInstanceLongTermRetentionBackupListResultPage struct { - fn func(context.Context, ManagedInstanceLongTermRetentionBackupListResult) (ManagedInstanceLongTermRetentionBackupListResult, error) - miltrblr ManagedInstanceLongTermRetentionBackupListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ManagedInstanceLongTermRetentionBackupListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceLongTermRetentionBackupListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.miltrblr) - if err != nil { - return err - } - page.miltrblr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ManagedInstanceLongTermRetentionBackupListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ManagedInstanceLongTermRetentionBackupListResultPage) NotDone() bool { - return !page.miltrblr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ManagedInstanceLongTermRetentionBackupListResultPage) Response() ManagedInstanceLongTermRetentionBackupListResult { - return page.miltrblr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ManagedInstanceLongTermRetentionBackupListResultPage) Values() []ManagedInstanceLongTermRetentionBackup { - if page.miltrblr.IsEmpty() { - return nil - } - return *page.miltrblr.Value -} - -// Creates a new instance of the ManagedInstanceLongTermRetentionBackupListResultPage type. -func NewManagedInstanceLongTermRetentionBackupListResultPage(cur ManagedInstanceLongTermRetentionBackupListResult, getNextPage func(context.Context, ManagedInstanceLongTermRetentionBackupListResult) (ManagedInstanceLongTermRetentionBackupListResult, error)) ManagedInstanceLongTermRetentionBackupListResultPage { - return ManagedInstanceLongTermRetentionBackupListResultPage{ - fn: getNextPage, - miltrblr: cur, - } -} - -// ManagedInstanceLongTermRetentionBackupProperties properties of a long term retention backup -type ManagedInstanceLongTermRetentionBackupProperties struct { - // ManagedInstanceName - READ-ONLY; The managed instance that the backup database belongs to. - ManagedInstanceName *string `json:"managedInstanceName,omitempty"` - // ManagedInstanceCreateTime - READ-ONLY; The create time of the instance. - ManagedInstanceCreateTime *date.Time `json:"managedInstanceCreateTime,omitempty"` - // DatabaseName - READ-ONLY; The name of the database the backup belong to - DatabaseName *string `json:"databaseName,omitempty"` - // DatabaseDeletionTime - READ-ONLY; The delete time of the database - DatabaseDeletionTime *date.Time `json:"databaseDeletionTime,omitempty"` - // BackupTime - READ-ONLY; The time the backup was taken - BackupTime *date.Time `json:"backupTime,omitempty"` - // BackupExpirationTime - READ-ONLY; The time the long term retention backup will expire. - BackupExpirationTime *date.Time `json:"backupExpirationTime,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedInstanceLongTermRetentionBackupProperties. -func (miltrbp ManagedInstanceLongTermRetentionBackupProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateFuture an abstraction for monitoring and -// retrieving the results of a long-running operation. -type ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ManagedInstanceLongTermRetentionPoliciesClient) (ManagedInstanceLongTermRetentionPolicy, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateFuture.Result. -func (future *ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateFuture) result(client ManagedInstanceLongTermRetentionPoliciesClient) (miltrp ManagedInstanceLongTermRetentionPolicy, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - miltrp.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if miltrp.Response.Response, err = future.GetResult(sender); err == nil && miltrp.Response.Response.StatusCode != http.StatusNoContent { - miltrp, err = client.CreateOrUpdateResponder(miltrp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateFuture", "Result", miltrp.Response.Response, "Failure responding to request") - } - } - return -} - -// ManagedInstanceLongTermRetentionPolicy a long term retention policy. -type ManagedInstanceLongTermRetentionPolicy struct { - autorest.Response `json:"-"` - // BaseLongTermRetentionPolicyProperties - Resource properties. - *BaseLongTermRetentionPolicyProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedInstanceLongTermRetentionPolicy. -func (miltrp ManagedInstanceLongTermRetentionPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if miltrp.BaseLongTermRetentionPolicyProperties != nil { - objectMap["properties"] = miltrp.BaseLongTermRetentionPolicyProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ManagedInstanceLongTermRetentionPolicy struct. -func (miltrp *ManagedInstanceLongTermRetentionPolicy) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var baseLongTermRetentionPolicyProperties BaseLongTermRetentionPolicyProperties - err = json.Unmarshal(*v, &baseLongTermRetentionPolicyProperties) - if err != nil { - return err - } - miltrp.BaseLongTermRetentionPolicyProperties = &baseLongTermRetentionPolicyProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - miltrp.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - miltrp.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - miltrp.Type = &typeVar - } - } - } - - return nil -} - -// ManagedInstanceLongTermRetentionPolicyListResult a list of long term retention policies. -type ManagedInstanceLongTermRetentionPolicyListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]ManagedInstanceLongTermRetentionPolicy `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedInstanceLongTermRetentionPolicyListResult. -func (miltrplr ManagedInstanceLongTermRetentionPolicyListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ManagedInstanceLongTermRetentionPolicyListResultIterator provides access to a complete listing of -// ManagedInstanceLongTermRetentionPolicy values. -type ManagedInstanceLongTermRetentionPolicyListResultIterator struct { - i int - page ManagedInstanceLongTermRetentionPolicyListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ManagedInstanceLongTermRetentionPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceLongTermRetentionPolicyListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ManagedInstanceLongTermRetentionPolicyListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ManagedInstanceLongTermRetentionPolicyListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter ManagedInstanceLongTermRetentionPolicyListResultIterator) Response() ManagedInstanceLongTermRetentionPolicyListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ManagedInstanceLongTermRetentionPolicyListResultIterator) Value() ManagedInstanceLongTermRetentionPolicy { - if !iter.page.NotDone() { - return ManagedInstanceLongTermRetentionPolicy{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ManagedInstanceLongTermRetentionPolicyListResultIterator type. -func NewManagedInstanceLongTermRetentionPolicyListResultIterator(page ManagedInstanceLongTermRetentionPolicyListResultPage) ManagedInstanceLongTermRetentionPolicyListResultIterator { - return ManagedInstanceLongTermRetentionPolicyListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (miltrplr ManagedInstanceLongTermRetentionPolicyListResult) IsEmpty() bool { - return miltrplr.Value == nil || len(*miltrplr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (miltrplr ManagedInstanceLongTermRetentionPolicyListResult) hasNextLink() bool { - return miltrplr.NextLink != nil && len(*miltrplr.NextLink) != 0 -} - -// managedInstanceLongTermRetentionPolicyListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (miltrplr ManagedInstanceLongTermRetentionPolicyListResult) managedInstanceLongTermRetentionPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { - if !miltrplr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(miltrplr.NextLink))) -} - -// ManagedInstanceLongTermRetentionPolicyListResultPage contains a page of -// ManagedInstanceLongTermRetentionPolicy values. -type ManagedInstanceLongTermRetentionPolicyListResultPage struct { - fn func(context.Context, ManagedInstanceLongTermRetentionPolicyListResult) (ManagedInstanceLongTermRetentionPolicyListResult, error) - miltrplr ManagedInstanceLongTermRetentionPolicyListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ManagedInstanceLongTermRetentionPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceLongTermRetentionPolicyListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.miltrplr) - if err != nil { - return err - } - page.miltrplr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ManagedInstanceLongTermRetentionPolicyListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ManagedInstanceLongTermRetentionPolicyListResultPage) NotDone() bool { - return !page.miltrplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ManagedInstanceLongTermRetentionPolicyListResultPage) Response() ManagedInstanceLongTermRetentionPolicyListResult { - return page.miltrplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ManagedInstanceLongTermRetentionPolicyListResultPage) Values() []ManagedInstanceLongTermRetentionPolicy { - if page.miltrplr.IsEmpty() { - return nil - } - return *page.miltrplr.Value -} - -// Creates a new instance of the ManagedInstanceLongTermRetentionPolicyListResultPage type. -func NewManagedInstanceLongTermRetentionPolicyListResultPage(cur ManagedInstanceLongTermRetentionPolicyListResult, getNextPage func(context.Context, ManagedInstanceLongTermRetentionPolicyListResult) (ManagedInstanceLongTermRetentionPolicyListResult, error)) ManagedInstanceLongTermRetentionPolicyListResultPage { - return ManagedInstanceLongTermRetentionPolicyListResultPage{ - fn: getNextPage, - miltrplr: cur, - } -} - -// ManagedInstanceOperation a managed instance operation. -type ManagedInstanceOperation struct { - autorest.Response `json:"-"` - // ManagedInstanceOperationProperties - Resource properties. - *ManagedInstanceOperationProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedInstanceOperation. -func (mio ManagedInstanceOperation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mio.ManagedInstanceOperationProperties != nil { - objectMap["properties"] = mio.ManagedInstanceOperationProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ManagedInstanceOperation struct. -func (mio *ManagedInstanceOperation) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var managedInstanceOperationProperties ManagedInstanceOperationProperties - err = json.Unmarshal(*v, &managedInstanceOperationProperties) - if err != nil { - return err - } - mio.ManagedInstanceOperationProperties = &managedInstanceOperationProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - mio.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - mio.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - mio.Type = &typeVar - } - } - } - - return nil -} - -// ManagedInstanceOperationListResult the response to a list managed instance operations request -type ManagedInstanceOperationListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]ManagedInstanceOperation `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedInstanceOperationListResult. -func (miolr ManagedInstanceOperationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ManagedInstanceOperationListResultIterator provides access to a complete listing of -// ManagedInstanceOperation values. -type ManagedInstanceOperationListResultIterator struct { - i int - page ManagedInstanceOperationListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ManagedInstanceOperationListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceOperationListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ManagedInstanceOperationListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ManagedInstanceOperationListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter ManagedInstanceOperationListResultIterator) Response() ManagedInstanceOperationListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ManagedInstanceOperationListResultIterator) Value() ManagedInstanceOperation { - if !iter.page.NotDone() { - return ManagedInstanceOperation{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ManagedInstanceOperationListResultIterator type. -func NewManagedInstanceOperationListResultIterator(page ManagedInstanceOperationListResultPage) ManagedInstanceOperationListResultIterator { - return ManagedInstanceOperationListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (miolr ManagedInstanceOperationListResult) IsEmpty() bool { - return miolr.Value == nil || len(*miolr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (miolr ManagedInstanceOperationListResult) hasNextLink() bool { - return miolr.NextLink != nil && len(*miolr.NextLink) != 0 -} - -// managedInstanceOperationListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (miolr ManagedInstanceOperationListResult) managedInstanceOperationListResultPreparer(ctx context.Context) (*http.Request, error) { - if !miolr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(miolr.NextLink))) -} - -// ManagedInstanceOperationListResultPage contains a page of ManagedInstanceOperation values. -type ManagedInstanceOperationListResultPage struct { - fn func(context.Context, ManagedInstanceOperationListResult) (ManagedInstanceOperationListResult, error) - miolr ManagedInstanceOperationListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ManagedInstanceOperationListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceOperationListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.miolr) - if err != nil { - return err - } - page.miolr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ManagedInstanceOperationListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ManagedInstanceOperationListResultPage) NotDone() bool { - return !page.miolr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ManagedInstanceOperationListResultPage) Response() ManagedInstanceOperationListResult { - return page.miolr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ManagedInstanceOperationListResultPage) Values() []ManagedInstanceOperation { - if page.miolr.IsEmpty() { - return nil - } - return *page.miolr.Value -} - -// Creates a new instance of the ManagedInstanceOperationListResultPage type. -func NewManagedInstanceOperationListResultPage(cur ManagedInstanceOperationListResult, getNextPage func(context.Context, ManagedInstanceOperationListResult) (ManagedInstanceOperationListResult, error)) ManagedInstanceOperationListResultPage { - return ManagedInstanceOperationListResultPage{ - fn: getNextPage, - miolr: cur, - } -} - -// ManagedInstanceOperationParametersPair the parameters of a managed instance operation. -type ManagedInstanceOperationParametersPair struct { - // CurrentParameters - READ-ONLY; The current parameters. - CurrentParameters *UpsertManagedServerOperationParameters `json:"currentParameters,omitempty"` - // RequestedParameters - READ-ONLY; The requested parameters. - RequestedParameters *UpsertManagedServerOperationParameters `json:"requestedParameters,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedInstanceOperationParametersPair. -func (miopp ManagedInstanceOperationParametersPair) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ManagedInstanceOperationProperties the properties of a managed instance operation. -type ManagedInstanceOperationProperties struct { - // ManagedInstanceName - READ-ONLY; The name of the managed instance the operation is being performed on. - ManagedInstanceName *string `json:"managedInstanceName,omitempty"` - // Operation - READ-ONLY; The name of operation. - Operation *string `json:"operation,omitempty"` - // OperationFriendlyName - READ-ONLY; The friendly name of operation. - OperationFriendlyName *string `json:"operationFriendlyName,omitempty"` - // PercentComplete - READ-ONLY; The percentage of the operation completed. - PercentComplete *int32 `json:"percentComplete,omitempty"` - // StartTime - READ-ONLY; The operation start time. - StartTime *date.Time `json:"startTime,omitempty"` - // State - READ-ONLY; The operation state. Possible values include: 'Pending', 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled' - State ManagementOperationState `json:"state,omitempty"` - // ErrorCode - READ-ONLY; The operation error code. - ErrorCode *int32 `json:"errorCode,omitempty"` - // ErrorDescription - READ-ONLY; The operation error description. - ErrorDescription *string `json:"errorDescription,omitempty"` - // ErrorSeverity - READ-ONLY; The operation error severity. - ErrorSeverity *int32 `json:"errorSeverity,omitempty"` - // IsUserError - READ-ONLY; Whether or not the error is a user error. - IsUserError *bool `json:"isUserError,omitempty"` - // EstimatedCompletionTime - READ-ONLY; The estimated completion time of the operation. - EstimatedCompletionTime *date.Time `json:"estimatedCompletionTime,omitempty"` - // Description - READ-ONLY; The operation description. - Description *string `json:"description,omitempty"` - // IsCancellable - READ-ONLY; Whether the operation can be cancelled. - IsCancellable *bool `json:"isCancellable,omitempty"` - // OperationParameters - READ-ONLY; The operation parameters. - OperationParameters *ManagedInstanceOperationParametersPair `json:"operationParameters,omitempty"` - // OperationSteps - READ-ONLY; The operation steps. - OperationSteps *ManagedInstanceOperationSteps `json:"operationSteps,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedInstanceOperationProperties. -func (miop ManagedInstanceOperationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ManagedInstanceOperationSteps the steps of a managed instance operation. -type ManagedInstanceOperationSteps struct { - // TotalSteps - READ-ONLY; The total number of operation steps. - TotalSteps *string `json:"totalSteps,omitempty"` - // CurrentStep - READ-ONLY; The number of current operation steps. - CurrentStep *int32 `json:"currentStep,omitempty"` - // StepsList - READ-ONLY; The operation steps list. - StepsList *[]UpsertManagedServerOperationStep `json:"stepsList,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedInstanceOperationSteps. -func (mios ManagedInstanceOperationSteps) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ManagedInstanceProperties the properties of a managed instance. -type ManagedInstanceProperties struct { - // ManagedInstanceCreateMode - Specifies the mode of database creation. - // - // Default: Regular instance creation. - // - // Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified. Possible values include: 'ManagedServerCreateModeDefault', 'ManagedServerCreateModePointInTimeRestore' - ManagedInstanceCreateMode ManagedServerCreateMode `json:"managedInstanceCreateMode,omitempty"` - // FullyQualifiedDomainName - READ-ONLY; The fully qualified domain name of the managed instance. - FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty"` - // AdministratorLogin - Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation). - AdministratorLogin *string `json:"administratorLogin,omitempty"` - // AdministratorLoginPassword - The administrator login password (required for managed instance creation). - AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` - // SubnetID - Subnet resource ID for the managed instance. - SubnetID *string `json:"subnetId,omitempty"` - // State - READ-ONLY; The state of the managed instance. - State *string `json:"state,omitempty"` - // LicenseType - The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). Possible values include: 'ManagedInstanceLicenseTypeLicenseIncluded', 'ManagedInstanceLicenseTypeBasePrice' - LicenseType ManagedInstanceLicenseType `json:"licenseType,omitempty"` - // VCores - The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. - VCores *int32 `json:"vCores,omitempty"` - // StorageSizeInGB - Storage size in GB. Minimum value: 32. Maximum value: 8192. Increments of 32 GB allowed only. - StorageSizeInGB *int32 `json:"storageSizeInGB,omitempty"` - // Collation - Collation of the managed instance. - Collation *string `json:"collation,omitempty"` - // DNSZone - READ-ONLY; The Dns Zone that the managed instance is in. - DNSZone *string `json:"dnsZone,omitempty"` - // DNSZonePartner - The resource id of another managed instance whose DNS zone this managed instance will share after creation. - DNSZonePartner *string `json:"dnsZonePartner,omitempty"` - // PublicDataEndpointEnabled - Whether or not the public data endpoint is enabled. - PublicDataEndpointEnabled *bool `json:"publicDataEndpointEnabled,omitempty"` - // SourceManagedInstanceID - The resource identifier of the source managed instance associated with create operation of this instance. - SourceManagedInstanceID *string `json:"sourceManagedInstanceId,omitempty"` - // RestorePointInTime - Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. - RestorePointInTime *date.Time `json:"restorePointInTime,omitempty"` - // ProxyOverride - Connection type used for connecting to the instance. Possible values include: 'ManagedInstanceProxyOverrideProxy', 'ManagedInstanceProxyOverrideRedirect', 'ManagedInstanceProxyOverrideDefault' - ProxyOverride ManagedInstanceProxyOverride `json:"proxyOverride,omitempty"` - // TimezoneID - Id of the timezone. Allowed values are timezones supported by Windows. - // Windows keeps details on supported timezones, including the id, in registry under - // KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. - // You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info. - // List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. - // An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time". - TimezoneID *string `json:"timezoneId,omitempty"` - // InstancePoolID - The Id of the instance pool this managed server belongs to. - InstancePoolID *string `json:"instancePoolId,omitempty"` - // MaintenanceConfigurationID - Specifies maintenance configuration id to apply to this managed instance. - MaintenanceConfigurationID *string `json:"maintenanceConfigurationId,omitempty"` - // MinimalTLSVersion - Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2' - MinimalTLSVersion *string `json:"minimalTlsVersion,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedInstanceProperties. -func (mip ManagedInstanceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mip.ManagedInstanceCreateMode != "" { - objectMap["managedInstanceCreateMode"] = mip.ManagedInstanceCreateMode - } - if mip.AdministratorLogin != nil { - objectMap["administratorLogin"] = mip.AdministratorLogin - } - if mip.AdministratorLoginPassword != nil { - objectMap["administratorLoginPassword"] = mip.AdministratorLoginPassword - } - if mip.SubnetID != nil { - objectMap["subnetId"] = mip.SubnetID - } - if mip.LicenseType != "" { - objectMap["licenseType"] = mip.LicenseType - } - if mip.VCores != nil { - objectMap["vCores"] = mip.VCores - } - if mip.StorageSizeInGB != nil { - objectMap["storageSizeInGB"] = mip.StorageSizeInGB - } - if mip.Collation != nil { - objectMap["collation"] = mip.Collation - } - if mip.DNSZonePartner != nil { - objectMap["dnsZonePartner"] = mip.DNSZonePartner - } - if mip.PublicDataEndpointEnabled != nil { - objectMap["publicDataEndpointEnabled"] = mip.PublicDataEndpointEnabled - } - if mip.SourceManagedInstanceID != nil { - objectMap["sourceManagedInstanceId"] = mip.SourceManagedInstanceID - } - if mip.RestorePointInTime != nil { - objectMap["restorePointInTime"] = mip.RestorePointInTime - } - if mip.ProxyOverride != "" { - objectMap["proxyOverride"] = mip.ProxyOverride - } - if mip.TimezoneID != nil { - objectMap["timezoneId"] = mip.TimezoneID - } - if mip.InstancePoolID != nil { - objectMap["instancePoolId"] = mip.InstancePoolID - } - if mip.MaintenanceConfigurationID != nil { - objectMap["maintenanceConfigurationId"] = mip.MaintenanceConfigurationID - } - if mip.MinimalTLSVersion != nil { - objectMap["minimalTlsVersion"] = mip.MinimalTLSVersion - } - return json.Marshal(objectMap) -} - -// ManagedInstancesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ManagedInstancesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ManagedInstancesClient) (ManagedInstance, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ManagedInstancesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ManagedInstancesCreateOrUpdateFuture.Result. -func (future *ManagedInstancesCreateOrUpdateFuture) result(client ManagedInstancesClient) (mi ManagedInstance, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - mi.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ManagedInstancesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent { - mi, err = client.CreateOrUpdateResponder(mi.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesCreateOrUpdateFuture", "Result", mi.Response.Response, "Failure responding to request") - } - } - return -} - -// ManagedInstancesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ManagedInstancesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ManagedInstancesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ManagedInstancesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ManagedInstancesDeleteFuture.Result. -func (future *ManagedInstancesDeleteFuture) result(client ManagedInstancesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ManagedInstancesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ManagedInstancesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ManagedInstancesUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ManagedInstancesClient) (ManagedInstance, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ManagedInstancesUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ManagedInstancesUpdateFuture.Result. -func (future *ManagedInstancesUpdateFuture) result(client ManagedInstancesClient) (mi ManagedInstance, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - mi.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ManagedInstancesUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent { - mi, err = client.UpdateResponder(mi.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ManagedInstancesUpdateFuture", "Result", mi.Response.Response, "Failure responding to request") - } - } - return -} - -// ManagedInstanceUpdate an update request for an Azure SQL Database managed instance. -type ManagedInstanceUpdate struct { - // Sku - Managed instance sku - Sku *Sku `json:"sku,omitempty"` - // ManagedInstanceProperties - Resource properties. - *ManagedInstanceProperties `json:"properties,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for ManagedInstanceUpdate. -func (miu ManagedInstanceUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if miu.Sku != nil { - objectMap["sku"] = miu.Sku - } - if miu.ManagedInstanceProperties != nil { - objectMap["properties"] = miu.ManagedInstanceProperties - } - if miu.Tags != nil { - objectMap["tags"] = miu.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ManagedInstanceUpdate struct. -func (miu *ManagedInstanceUpdate) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "sku": - if v != nil { - var sku Sku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - miu.Sku = &sku - } - case "properties": - if v != nil { - var managedInstanceProperties ManagedInstanceProperties - err = json.Unmarshal(*v, &managedInstanceProperties) - if err != nil { - return err - } - miu.ManagedInstanceProperties = &managedInstanceProperties - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - miu.Tags = tags - } - } - } - - return nil -} - -// ManagedInstanceVulnerabilityAssessment a managed instance vulnerability assessment. -type ManagedInstanceVulnerabilityAssessment struct { - autorest.Response `json:"-"` - // ManagedInstanceVulnerabilityAssessmentProperties - Resource properties. - *ManagedInstanceVulnerabilityAssessmentProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedInstanceVulnerabilityAssessment. -func (miva ManagedInstanceVulnerabilityAssessment) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if miva.ManagedInstanceVulnerabilityAssessmentProperties != nil { - objectMap["properties"] = miva.ManagedInstanceVulnerabilityAssessmentProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ManagedInstanceVulnerabilityAssessment struct. -func (miva *ManagedInstanceVulnerabilityAssessment) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var managedInstanceVulnerabilityAssessmentProperties ManagedInstanceVulnerabilityAssessmentProperties - err = json.Unmarshal(*v, &managedInstanceVulnerabilityAssessmentProperties) - if err != nil { - return err - } - miva.ManagedInstanceVulnerabilityAssessmentProperties = &managedInstanceVulnerabilityAssessmentProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - miva.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - miva.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - miva.Type = &typeVar - } - } - } - - return nil -} - -// ManagedInstanceVulnerabilityAssessmentListResult a list of the ManagedInstance's vulnerability -// assessments. -type ManagedInstanceVulnerabilityAssessmentListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]ManagedInstanceVulnerabilityAssessment `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedInstanceVulnerabilityAssessmentListResult. -func (mivalr ManagedInstanceVulnerabilityAssessmentListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ManagedInstanceVulnerabilityAssessmentListResultIterator provides access to a complete listing of -// ManagedInstanceVulnerabilityAssessment values. -type ManagedInstanceVulnerabilityAssessmentListResultIterator struct { - i int - page ManagedInstanceVulnerabilityAssessmentListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ManagedInstanceVulnerabilityAssessmentListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceVulnerabilityAssessmentListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ManagedInstanceVulnerabilityAssessmentListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ManagedInstanceVulnerabilityAssessmentListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter ManagedInstanceVulnerabilityAssessmentListResultIterator) Response() ManagedInstanceVulnerabilityAssessmentListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ManagedInstanceVulnerabilityAssessmentListResultIterator) Value() ManagedInstanceVulnerabilityAssessment { - if !iter.page.NotDone() { - return ManagedInstanceVulnerabilityAssessment{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ManagedInstanceVulnerabilityAssessmentListResultIterator type. -func NewManagedInstanceVulnerabilityAssessmentListResultIterator(page ManagedInstanceVulnerabilityAssessmentListResultPage) ManagedInstanceVulnerabilityAssessmentListResultIterator { - return ManagedInstanceVulnerabilityAssessmentListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (mivalr ManagedInstanceVulnerabilityAssessmentListResult) IsEmpty() bool { - return mivalr.Value == nil || len(*mivalr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (mivalr ManagedInstanceVulnerabilityAssessmentListResult) hasNextLink() bool { - return mivalr.NextLink != nil && len(*mivalr.NextLink) != 0 -} - -// managedInstanceVulnerabilityAssessmentListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (mivalr ManagedInstanceVulnerabilityAssessmentListResult) managedInstanceVulnerabilityAssessmentListResultPreparer(ctx context.Context) (*http.Request, error) { - if !mivalr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(mivalr.NextLink))) -} - -// ManagedInstanceVulnerabilityAssessmentListResultPage contains a page of -// ManagedInstanceVulnerabilityAssessment values. -type ManagedInstanceVulnerabilityAssessmentListResultPage struct { - fn func(context.Context, ManagedInstanceVulnerabilityAssessmentListResult) (ManagedInstanceVulnerabilityAssessmentListResult, error) - mivalr ManagedInstanceVulnerabilityAssessmentListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ManagedInstanceVulnerabilityAssessmentListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceVulnerabilityAssessmentListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.mivalr) - if err != nil { - return err - } - page.mivalr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ManagedInstanceVulnerabilityAssessmentListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ManagedInstanceVulnerabilityAssessmentListResultPage) NotDone() bool { - return !page.mivalr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ManagedInstanceVulnerabilityAssessmentListResultPage) Response() ManagedInstanceVulnerabilityAssessmentListResult { - return page.mivalr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ManagedInstanceVulnerabilityAssessmentListResultPage) Values() []ManagedInstanceVulnerabilityAssessment { - if page.mivalr.IsEmpty() { - return nil - } - return *page.mivalr.Value -} - -// Creates a new instance of the ManagedInstanceVulnerabilityAssessmentListResultPage type. -func NewManagedInstanceVulnerabilityAssessmentListResultPage(cur ManagedInstanceVulnerabilityAssessmentListResult, getNextPage func(context.Context, ManagedInstanceVulnerabilityAssessmentListResult) (ManagedInstanceVulnerabilityAssessmentListResult, error)) ManagedInstanceVulnerabilityAssessmentListResultPage { - return ManagedInstanceVulnerabilityAssessmentListResultPage{ - fn: getNextPage, - mivalr: cur, - } -} - -// ManagedInstanceVulnerabilityAssessmentProperties properties of a managed instance vulnerability -// assessment. -type ManagedInstanceVulnerabilityAssessmentProperties struct { - // StorageContainerPath - A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). - StorageContainerPath *string `json:"storageContainerPath,omitempty"` - // StorageContainerSasKey - A shared access signature (SAS Key) that has read and write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required. - StorageContainerSasKey *string `json:"storageContainerSasKey,omitempty"` - // StorageAccountAccessKey - Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. - StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` - // RecurringScans - The recurring scans settings - RecurringScans *VulnerabilityAssessmentRecurringScansProperties `json:"recurringScans,omitempty"` -} - -// Name ARM Usage Name -type Name struct { - // Value - Usage name value - Value *string `json:"value,omitempty"` - // LocalizedValue - Usage name localized value. - LocalizedValue *string `json:"localizedValue,omitempty"` -} - -// PrivateEndpointConnection a private endpoint connection -type PrivateEndpointConnection struct { - autorest.Response `json:"-"` - // PrivateEndpointConnectionProperties - Resource properties. - *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for PrivateEndpointConnection. -func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pec.PrivateEndpointConnectionProperties != nil { - objectMap["properties"] = pec.PrivateEndpointConnectionProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct. -func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var privateEndpointConnectionProperties PrivateEndpointConnectionProperties - err = json.Unmarshal(*v, &privateEndpointConnectionProperties) - if err != nil { - return err - } - pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - pec.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - pec.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - pec.Type = &typeVar - } - } - } - - return nil -} - -// PrivateEndpointConnectionListResult a list of private endpoint connections. -type PrivateEndpointConnectionListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]PrivateEndpointConnection `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for PrivateEndpointConnectionListResult. -func (peclr PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// PrivateEndpointConnectionListResultIterator provides access to a complete listing of -// PrivateEndpointConnection values. -type PrivateEndpointConnectionListResultIterator struct { - i int - page PrivateEndpointConnectionListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *PrivateEndpointConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *PrivateEndpointConnectionListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter PrivateEndpointConnectionListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter PrivateEndpointConnectionListResultIterator) Response() PrivateEndpointConnectionListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter PrivateEndpointConnectionListResultIterator) Value() PrivateEndpointConnection { - if !iter.page.NotDone() { - return PrivateEndpointConnection{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the PrivateEndpointConnectionListResultIterator type. -func NewPrivateEndpointConnectionListResultIterator(page PrivateEndpointConnectionListResultPage) PrivateEndpointConnectionListResultIterator { - return PrivateEndpointConnectionListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (peclr PrivateEndpointConnectionListResult) IsEmpty() bool { - return peclr.Value == nil || len(*peclr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (peclr PrivateEndpointConnectionListResult) hasNextLink() bool { - return peclr.NextLink != nil && len(*peclr.NextLink) != 0 -} - -// privateEndpointConnectionListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (peclr PrivateEndpointConnectionListResult) privateEndpointConnectionListResultPreparer(ctx context.Context) (*http.Request, error) { - if !peclr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(peclr.NextLink))) -} - -// PrivateEndpointConnectionListResultPage contains a page of PrivateEndpointConnection values. -type PrivateEndpointConnectionListResultPage struct { - fn func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error) - peclr PrivateEndpointConnectionListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *PrivateEndpointConnectionListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.peclr) - if err != nil { - return err - } - page.peclr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *PrivateEndpointConnectionListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page PrivateEndpointConnectionListResultPage) NotDone() bool { - return !page.peclr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page PrivateEndpointConnectionListResultPage) Response() PrivateEndpointConnectionListResult { - return page.peclr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page PrivateEndpointConnectionListResultPage) Values() []PrivateEndpointConnection { - if page.peclr.IsEmpty() { - return nil - } - return *page.peclr.Value -} - -// Creates a new instance of the PrivateEndpointConnectionListResultPage type. -func NewPrivateEndpointConnectionListResultPage(cur PrivateEndpointConnectionListResult, getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage { - return PrivateEndpointConnectionListResultPage{ - fn: getNextPage, - peclr: cur, - } -} - -// PrivateEndpointConnectionProperties properties of a private endpoint connection. -type PrivateEndpointConnectionProperties struct { - // PrivateEndpoint - Private endpoint which the connection belongs to. - PrivateEndpoint *PrivateEndpointProperty `json:"privateEndpoint,omitempty"` - // PrivateLinkServiceConnectionState - Connection state of the private endpoint connection. - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionStateProperty `json:"privateLinkServiceConnectionState,omitempty"` - // ProvisioningState - READ-ONLY; State of the private endpoint connection. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// MarshalJSON is the custom marshaler for PrivateEndpointConnectionProperties. -func (pecp PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pecp.PrivateEndpoint != nil { - objectMap["privateEndpoint"] = pecp.PrivateEndpoint - } - if pecp.PrivateLinkServiceConnectionState != nil { - objectMap["privateLinkServiceConnectionState"] = pecp.PrivateLinkServiceConnectionState - } - return json.Marshal(objectMap) -} - -// PrivateEndpointConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type PrivateEndpointConnectionsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(PrivateEndpointConnectionsClient) (PrivateEndpointConnection, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *PrivateEndpointConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for PrivateEndpointConnectionsCreateOrUpdateFuture.Result. -func (future *PrivateEndpointConnectionsCreateOrUpdateFuture) result(client PrivateEndpointConnectionsClient) (pec PrivateEndpointConnection, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.PrivateEndpointConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - pec.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.PrivateEndpointConnectionsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pec.Response.Response, err = future.GetResult(sender); err == nil && pec.Response.Response.StatusCode != http.StatusNoContent { - pec, err = client.CreateOrUpdateResponder(pec.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.PrivateEndpointConnectionsCreateOrUpdateFuture", "Result", pec.Response.Response, "Failure responding to request") - } - } - return -} - -// PrivateEndpointConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type PrivateEndpointConnectionsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(PrivateEndpointConnectionsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *PrivateEndpointConnectionsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for PrivateEndpointConnectionsDeleteFuture.Result. -func (future *PrivateEndpointConnectionsDeleteFuture) result(client PrivateEndpointConnectionsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.PrivateEndpointConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.PrivateEndpointConnectionsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// PrivateEndpointProperty ... -type PrivateEndpointProperty struct { - // ID - Resource id of the private endpoint. - ID *string `json:"id,omitempty"` -} - -// PrivateLinkServiceConnectionStateProperty ... -type PrivateLinkServiceConnectionStateProperty struct { - // Status - The private link service connection status. - Status *string `json:"status,omitempty"` - // Description - The private link service connection description. - Description *string `json:"description,omitempty"` - // ActionsRequired - READ-ONLY; The actions required for private link service connection. - ActionsRequired *string `json:"actionsRequired,omitempty"` -} - -// MarshalJSON is the custom marshaler for PrivateLinkServiceConnectionStateProperty. -func (plscsp PrivateLinkServiceConnectionStateProperty) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if plscsp.Status != nil { - objectMap["status"] = plscsp.Status - } - if plscsp.Description != nil { - objectMap["description"] = plscsp.Description - } - return json.Marshal(objectMap) -} - -// ProxyResource ARM proxy resource. -type ProxyResource struct { - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ProxyResource. -func (pr ProxyResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// Resource ARM resource. -type Resource struct { - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ResourceIdentity azure Active Directory identity configuration for a resource. -type ResourceIdentity struct { - // PrincipalID - READ-ONLY; The Azure Active Directory principal id. - PrincipalID *uuid.UUID `json:"principalId,omitempty"` - // Type - The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource. Possible values include: 'SystemAssigned' - Type IdentityType `json:"type,omitempty"` - // TenantID - READ-ONLY; The Azure Active Directory tenant id. - TenantID *uuid.UUID `json:"tenantId,omitempty"` -} - -// MarshalJSON is the custom marshaler for ResourceIdentity. -func (ri ResourceIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ri.Type != "" { - objectMap["type"] = ri.Type - } - return json.Marshal(objectMap) -} - -// SecurityAlertPolicyProperties properties of a security alert policy. -type SecurityAlertPolicyProperties struct { - // State - Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database. Possible values include: 'SecurityAlertPolicyStateNew', 'SecurityAlertPolicyStateEnabled', 'SecurityAlertPolicyStateDisabled' - State SecurityAlertPolicyState `json:"state,omitempty"` - // DisabledAlerts - Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action - DisabledAlerts *[]string `json:"disabledAlerts,omitempty"` - // EmailAddresses - Specifies an array of e-mail addresses to which the alert is sent. - EmailAddresses *[]string `json:"emailAddresses,omitempty"` - // EmailAccountAdmins - Specifies that the alert is sent to the account administrators. - EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty"` - // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - StorageEndpoint *string `json:"storageEndpoint,omitempty"` - // StorageAccountAccessKey - Specifies the identifier key of the Threat Detection audit storage account. - StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` - // RetentionDays - Specifies the number of days to keep in the Threat Detection audit logs. - RetentionDays *int32 `json:"retentionDays,omitempty"` - // CreationTime - READ-ONLY; Specifies the UTC creation time of the policy. - CreationTime *date.Time `json:"creationTime,omitempty"` -} - -// MarshalJSON is the custom marshaler for SecurityAlertPolicyProperties. -func (sapp SecurityAlertPolicyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sapp.State != "" { - objectMap["state"] = sapp.State - } - if sapp.DisabledAlerts != nil { - objectMap["disabledAlerts"] = sapp.DisabledAlerts - } - if sapp.EmailAddresses != nil { - objectMap["emailAddresses"] = sapp.EmailAddresses - } - if sapp.EmailAccountAdmins != nil { - objectMap["emailAccountAdmins"] = sapp.EmailAccountAdmins - } - if sapp.StorageEndpoint != nil { - objectMap["storageEndpoint"] = sapp.StorageEndpoint - } - if sapp.StorageAccountAccessKey != nil { - objectMap["storageAccountAccessKey"] = sapp.StorageAccountAccessKey - } - if sapp.RetentionDays != nil { - objectMap["retentionDays"] = sapp.RetentionDays - } - return json.Marshal(objectMap) -} - -// SensitivityLabel a sensitivity label. -type SensitivityLabel struct { - autorest.Response `json:"-"` - // SensitivityLabelProperties - Resource properties. - *SensitivityLabelProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for SensitivityLabel. -func (sl SensitivityLabel) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sl.SensitivityLabelProperties != nil { - objectMap["properties"] = sl.SensitivityLabelProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for SensitivityLabel struct. -func (sl *SensitivityLabel) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var sensitivityLabelProperties SensitivityLabelProperties - err = json.Unmarshal(*v, &sensitivityLabelProperties) - if err != nil { - return err - } - sl.SensitivityLabelProperties = &sensitivityLabelProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - sl.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - sl.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - sl.Type = &typeVar - } - } - } - - return nil -} - -// SensitivityLabelListResult a list of sensitivity labels. -type SensitivityLabelListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]SensitivityLabel `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for SensitivityLabelListResult. -func (sllr SensitivityLabelListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SensitivityLabelListResultIterator provides access to a complete listing of SensitivityLabel values. -type SensitivityLabelListResultIterator struct { - i int - page SensitivityLabelListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *SensitivityLabelListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SensitivityLabelListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *SensitivityLabelListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter SensitivityLabelListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter SensitivityLabelListResultIterator) Response() SensitivityLabelListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter SensitivityLabelListResultIterator) Value() SensitivityLabel { - if !iter.page.NotDone() { - return SensitivityLabel{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the SensitivityLabelListResultIterator type. -func NewSensitivityLabelListResultIterator(page SensitivityLabelListResultPage) SensitivityLabelListResultIterator { - return SensitivityLabelListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (sllr SensitivityLabelListResult) IsEmpty() bool { - return sllr.Value == nil || len(*sllr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (sllr SensitivityLabelListResult) hasNextLink() bool { - return sllr.NextLink != nil && len(*sllr.NextLink) != 0 -} - -// sensitivityLabelListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (sllr SensitivityLabelListResult) sensitivityLabelListResultPreparer(ctx context.Context) (*http.Request, error) { - if !sllr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(sllr.NextLink))) -} - -// SensitivityLabelListResultPage contains a page of SensitivityLabel values. -type SensitivityLabelListResultPage struct { - fn func(context.Context, SensitivityLabelListResult) (SensitivityLabelListResult, error) - sllr SensitivityLabelListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *SensitivityLabelListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SensitivityLabelListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.sllr) - if err != nil { - return err - } - page.sllr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *SensitivityLabelListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page SensitivityLabelListResultPage) NotDone() bool { - return !page.sllr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page SensitivityLabelListResultPage) Response() SensitivityLabelListResult { - return page.sllr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page SensitivityLabelListResultPage) Values() []SensitivityLabel { - if page.sllr.IsEmpty() { - return nil - } - return *page.sllr.Value -} - -// Creates a new instance of the SensitivityLabelListResultPage type. -func NewSensitivityLabelListResultPage(cur SensitivityLabelListResult, getNextPage func(context.Context, SensitivityLabelListResult) (SensitivityLabelListResult, error)) SensitivityLabelListResultPage { - return SensitivityLabelListResultPage{ - fn: getNextPage, - sllr: cur, - } -} - -// SensitivityLabelProperties properties of a sensitivity label. -type SensitivityLabelProperties struct { - // LabelName - The label name. - LabelName *string `json:"labelName,omitempty"` - // LabelID - The label ID. - LabelID *string `json:"labelId,omitempty"` - // InformationType - The information type. - InformationType *string `json:"informationType,omitempty"` - // InformationTypeID - The information type ID. - InformationTypeID *string `json:"informationTypeId,omitempty"` - // IsDisabled - READ-ONLY; Is sensitivity recommendation disabled. Applicable for recommended sensitivity label only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not. - IsDisabled *bool `json:"isDisabled,omitempty"` - // Rank - Possible values include: 'None', 'Low', 'Medium', 'High', 'Critical' - Rank SensitivityLabelRank `json:"rank,omitempty"` -} - -// MarshalJSON is the custom marshaler for SensitivityLabelProperties. -func (slp SensitivityLabelProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if slp.LabelName != nil { - objectMap["labelName"] = slp.LabelName - } - if slp.LabelID != nil { - objectMap["labelId"] = slp.LabelID - } - if slp.InformationType != nil { - objectMap["informationType"] = slp.InformationType - } - if slp.InformationTypeID != nil { - objectMap["informationTypeId"] = slp.InformationTypeID - } - if slp.Rank != "" { - objectMap["rank"] = slp.Rank - } - return json.Marshal(objectMap) -} - -// ServerAzureADAdministrator azure Active Directory administrator. -type ServerAzureADAdministrator struct { - autorest.Response `json:"-"` - // AdministratorProperties - Resource properties. - *AdministratorProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerAzureADAdministrator. -func (saaa ServerAzureADAdministrator) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if saaa.AdministratorProperties != nil { - objectMap["properties"] = saaa.AdministratorProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ServerAzureADAdministrator struct. -func (saaa *ServerAzureADAdministrator) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var administratorProperties AdministratorProperties - err = json.Unmarshal(*v, &administratorProperties) - if err != nil { - return err - } - saaa.AdministratorProperties = &administratorProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - saaa.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - saaa.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - saaa.Type = &typeVar - } - } - } - - return nil -} - -// ServerAzureADAdministratorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type ServerAzureADAdministratorsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ServerAzureADAdministratorsClient) (ServerAzureADAdministrator, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ServerAzureADAdministratorsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ServerAzureADAdministratorsCreateOrUpdateFuture.Result. -func (future *ServerAzureADAdministratorsCreateOrUpdateFuture) result(client ServerAzureADAdministratorsClient) (saaa ServerAzureADAdministrator, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - saaa.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ServerAzureADAdministratorsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if saaa.Response.Response, err = future.GetResult(sender); err == nil && saaa.Response.Response.StatusCode != http.StatusNoContent { - saaa, err = client.CreateOrUpdateResponder(saaa.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsCreateOrUpdateFuture", "Result", saaa.Response.Response, "Failure responding to request") - } - } - return -} - -// ServerAzureADAdministratorsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ServerAzureADAdministratorsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ServerAzureADAdministratorsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ServerAzureADAdministratorsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ServerAzureADAdministratorsDeleteFuture.Result. -func (future *ServerAzureADAdministratorsDeleteFuture) result(client ServerAzureADAdministratorsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("sql.ServerAzureADAdministratorsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ServerVulnerabilityAssessment a server vulnerability assessment. -type ServerVulnerabilityAssessment struct { - autorest.Response `json:"-"` - // ServerVulnerabilityAssessmentProperties - Resource properties. - *ServerVulnerabilityAssessmentProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerVulnerabilityAssessment. -func (sva ServerVulnerabilityAssessment) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sva.ServerVulnerabilityAssessmentProperties != nil { - objectMap["properties"] = sva.ServerVulnerabilityAssessmentProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ServerVulnerabilityAssessment struct. -func (sva *ServerVulnerabilityAssessment) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var serverVulnerabilityAssessmentProperties ServerVulnerabilityAssessmentProperties - err = json.Unmarshal(*v, &serverVulnerabilityAssessmentProperties) - if err != nil { - return err - } - sva.ServerVulnerabilityAssessmentProperties = &serverVulnerabilityAssessmentProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - sva.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - sva.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - sva.Type = &typeVar - } - } - } - - return nil -} - -// ServerVulnerabilityAssessmentListResult a list of the server's vulnerability assessments. -type ServerVulnerabilityAssessmentListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]ServerVulnerabilityAssessment `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerVulnerabilityAssessmentListResult. -func (svalr ServerVulnerabilityAssessmentListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ServerVulnerabilityAssessmentListResultIterator provides access to a complete listing of -// ServerVulnerabilityAssessment values. -type ServerVulnerabilityAssessmentListResultIterator struct { - i int - page ServerVulnerabilityAssessmentListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ServerVulnerabilityAssessmentListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerVulnerabilityAssessmentListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ServerVulnerabilityAssessmentListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ServerVulnerabilityAssessmentListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter ServerVulnerabilityAssessmentListResultIterator) Response() ServerVulnerabilityAssessmentListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ServerVulnerabilityAssessmentListResultIterator) Value() ServerVulnerabilityAssessment { - if !iter.page.NotDone() { - return ServerVulnerabilityAssessment{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ServerVulnerabilityAssessmentListResultIterator type. -func NewServerVulnerabilityAssessmentListResultIterator(page ServerVulnerabilityAssessmentListResultPage) ServerVulnerabilityAssessmentListResultIterator { - return ServerVulnerabilityAssessmentListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (svalr ServerVulnerabilityAssessmentListResult) IsEmpty() bool { - return svalr.Value == nil || len(*svalr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (svalr ServerVulnerabilityAssessmentListResult) hasNextLink() bool { - return svalr.NextLink != nil && len(*svalr.NextLink) != 0 -} - -// serverVulnerabilityAssessmentListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (svalr ServerVulnerabilityAssessmentListResult) serverVulnerabilityAssessmentListResultPreparer(ctx context.Context) (*http.Request, error) { - if !svalr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(svalr.NextLink))) -} - -// ServerVulnerabilityAssessmentListResultPage contains a page of ServerVulnerabilityAssessment values. -type ServerVulnerabilityAssessmentListResultPage struct { - fn func(context.Context, ServerVulnerabilityAssessmentListResult) (ServerVulnerabilityAssessmentListResult, error) - svalr ServerVulnerabilityAssessmentListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ServerVulnerabilityAssessmentListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerVulnerabilityAssessmentListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.svalr) - if err != nil { - return err - } - page.svalr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ServerVulnerabilityAssessmentListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ServerVulnerabilityAssessmentListResultPage) NotDone() bool { - return !page.svalr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ServerVulnerabilityAssessmentListResultPage) Response() ServerVulnerabilityAssessmentListResult { - return page.svalr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ServerVulnerabilityAssessmentListResultPage) Values() []ServerVulnerabilityAssessment { - if page.svalr.IsEmpty() { - return nil - } - return *page.svalr.Value -} - -// Creates a new instance of the ServerVulnerabilityAssessmentListResultPage type. -func NewServerVulnerabilityAssessmentListResultPage(cur ServerVulnerabilityAssessmentListResult, getNextPage func(context.Context, ServerVulnerabilityAssessmentListResult) (ServerVulnerabilityAssessmentListResult, error)) ServerVulnerabilityAssessmentListResultPage { - return ServerVulnerabilityAssessmentListResultPage{ - fn: getNextPage, - svalr: cur, - } -} - -// ServerVulnerabilityAssessmentProperties properties of a server Vulnerability Assessment. -type ServerVulnerabilityAssessmentProperties struct { - // StorageContainerPath - A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). - StorageContainerPath *string `json:"storageContainerPath,omitempty"` - // StorageContainerSasKey - A shared access signature (SAS Key) that has read and write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required. - StorageContainerSasKey *string `json:"storageContainerSasKey,omitempty"` - // StorageAccountAccessKey - Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. - StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` - // RecurringScans - The recurring scans settings - RecurringScans *VulnerabilityAssessmentRecurringScansProperties `json:"recurringScans,omitempty"` -} - -// Sku an ARM Resource SKU. -type Sku struct { - // Name - The name of the SKU, typically, a letter + Number code, e.g. P3. - Name *string `json:"name,omitempty"` - // Tier - The tier or edition of the particular SKU, e.g. Basic, Premium. - Tier *string `json:"tier,omitempty"` - // Size - Size of the particular SKU - Size *string `json:"size,omitempty"` - // Family - If the service has different generations of hardware, for the same SKU, then that can be captured here. - Family *string `json:"family,omitempty"` - // Capacity - Capacity of the particular SKU. - Capacity *int32 `json:"capacity,omitempty"` -} - -// TrackedResource ARM tracked top level resource. -type TrackedResource struct { - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for TrackedResource. -func (tr TrackedResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if tr.Location != nil { - objectMap["location"] = tr.Location - } - if tr.Tags != nil { - objectMap["tags"] = tr.Tags - } - return json.Marshal(objectMap) -} - -// UpsertManagedServerOperationParameters ... -type UpsertManagedServerOperationParameters struct { - Family *string `json:"family,omitempty"` - Tier *string `json:"tier,omitempty"` - VCores *int32 `json:"vCores,omitempty"` - StorageSizeInGB *int32 `json:"storageSizeInGB,omitempty"` -} - -// UpsertManagedServerOperationStep ... -type UpsertManagedServerOperationStep struct { - Order *int32 `json:"order,omitempty"` - Name *string `json:"name,omitempty"` - // Status - Possible values include: 'StatusNotStarted', 'StatusInProgress', 'StatusSlowedDown', 'StatusCompleted', 'StatusFailed', 'StatusCanceled' - Status Status `json:"status,omitempty"` -} - -// Usage ARM usage. -type Usage struct { - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *Name `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` - // Unit - READ-ONLY; Usage unit. - Unit *string `json:"unit,omitempty"` - // CurrentValue - READ-ONLY; Usage current value. - CurrentValue *int32 `json:"currentValue,omitempty"` - // Limit - READ-ONLY; Usage limit. - Limit *int32 `json:"limit,omitempty"` - // RequestedLimit - READ-ONLY; Usage requested limit. - RequestedLimit *int32 `json:"requestedLimit,omitempty"` -} - -// MarshalJSON is the custom marshaler for Usage. -func (u Usage) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// UsageListResult a list of usages. -type UsageListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]Usage `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for UsageListResult. -func (ulr UsageListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// UsageListResultIterator provides access to a complete listing of Usage values. -type UsageListResultIterator struct { - i int - page UsageListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *UsageListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/UsageListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *UsageListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter UsageListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter UsageListResultIterator) Response() UsageListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter UsageListResultIterator) Value() Usage { - if !iter.page.NotDone() { - return Usage{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the UsageListResultIterator type. -func NewUsageListResultIterator(page UsageListResultPage) UsageListResultIterator { - return UsageListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (ulr UsageListResult) IsEmpty() bool { - return ulr.Value == nil || len(*ulr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (ulr UsageListResult) hasNextLink() bool { - return ulr.NextLink != nil && len(*ulr.NextLink) != 0 -} - -// usageListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (ulr UsageListResult) usageListResultPreparer(ctx context.Context) (*http.Request, error) { - if !ulr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(ulr.NextLink))) -} - -// UsageListResultPage contains a page of Usage values. -type UsageListResultPage struct { - fn func(context.Context, UsageListResult) (UsageListResult, error) - ulr UsageListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *UsageListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/UsageListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.ulr) - if err != nil { - return err - } - page.ulr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *UsageListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page UsageListResultPage) NotDone() bool { - return !page.ulr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page UsageListResultPage) Response() UsageListResult { - return page.ulr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page UsageListResultPage) Values() []Usage { - if page.ulr.IsEmpty() { - return nil - } - return *page.ulr.Value -} - -// Creates a new instance of the UsageListResultPage type. -func NewUsageListResultPage(cur UsageListResult, getNextPage func(context.Context, UsageListResult) (UsageListResult, error)) UsageListResultPage { - return UsageListResultPage{ - fn: getNextPage, - ulr: cur, - } -} - -// VulnerabilityAssessmentRecurringScansProperties properties of a Vulnerability Assessment recurring -// scans. -type VulnerabilityAssessmentRecurringScansProperties struct { - // IsEnabled - Recurring scans state. - IsEnabled *bool `json:"isEnabled,omitempty"` - // EmailSubscriptionAdmins - Specifies that the schedule scan notification will be is sent to the subscription administrators. - EmailSubscriptionAdmins *bool `json:"emailSubscriptionAdmins,omitempty"` - // Emails - Specifies an array of e-mail addresses to which the scan notification is sent. - Emails *[]string `json:"emails,omitempty"` -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/privateendpointconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/privateendpointconnections.go deleted file mode 100644 index 49bb65a569be7..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/privateendpointconnections.go +++ /dev/null @@ -1,407 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// PrivateEndpointConnectionsClient is the the Azure SQL Database management API provides a RESTful set of web services -// that interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, -// update, and delete databases. -type PrivateEndpointConnectionsClient struct { - BaseClient -} - -// NewPrivateEndpointConnectionsClient creates an instance of the PrivateEndpointConnectionsClient client. -func NewPrivateEndpointConnectionsClient(subscriptionID string) PrivateEndpointConnectionsClient { - return NewPrivateEndpointConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewPrivateEndpointConnectionsClientWithBaseURI creates an instance of the PrivateEndpointConnectionsClient client -// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign -// clouds, Azure stack). -func NewPrivateEndpointConnectionsClientWithBaseURI(baseURI string, subscriptionID string) PrivateEndpointConnectionsClient { - return PrivateEndpointConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate approve or reject a private endpoint connection with a given name. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client PrivateEndpointConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection) (result PrivateEndpointConnectionsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.PrivateEndpointConnectionProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.PrivateEndpointConnectionProperties.PrivateLinkServiceConnectionState", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.PrivateEndpointConnectionProperties.PrivateLinkServiceConnectionState.Status", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.PrivateEndpointConnectionProperties.PrivateLinkServiceConnectionState.Description", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}}}}); err != nil { - return result, validation.NewError("sql.PrivateEndpointConnectionsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, privateEndpointConnectionName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.PrivateEndpointConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.PrivateEndpointConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client PrivateEndpointConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateEndpointConnectionsClient) CreateOrUpdateSender(req *http.Request) (future PrivateEndpointConnectionsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client PrivateEndpointConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a private endpoint connection with a given name. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client PrivateEndpointConnectionsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string) (result PrivateEndpointConnectionsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, privateEndpointConnectionName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.PrivateEndpointConnectionsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.PrivateEndpointConnectionsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client PrivateEndpointConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateEndpointConnectionsClient) DeleteSender(req *http.Request) (future PrivateEndpointConnectionsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client PrivateEndpointConnectionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a private endpoint connection. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// privateEndpointConnectionName - the name of the private endpoint connection. -func (client PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string) (result PrivateEndpointConnection, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, privateEndpointConnectionName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.PrivateEndpointConnectionsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.PrivateEndpointConnectionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.PrivateEndpointConnectionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client PrivateEndpointConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateEndpointConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client PrivateEndpointConnectionsClient) GetResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer gets all private endpoint connections on a server. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client PrivateEndpointConnectionsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result PrivateEndpointConnectionListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.ListByServer") - defer func() { - sc := -1 - if result.peclr.Response.Response != nil { - sc = result.peclr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByServerNextResults - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.PrivateEndpointConnectionsClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.peclr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.PrivateEndpointConnectionsClient", "ListByServer", resp, "Failure sending request") - return - } - - result.peclr, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.PrivateEndpointConnectionsClient", "ListByServer", resp, "Failure responding to request") - return - } - if result.peclr.hasNextLink() && result.peclr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client PrivateEndpointConnectionsClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateEndpointConnections", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateEndpointConnectionsClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client PrivateEndpointConnectionsClient) ListByServerResponder(resp *http.Response) (result PrivateEndpointConnectionListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByServerNextResults retrieves the next set of results, if any. -func (client PrivateEndpointConnectionsClient) listByServerNextResults(ctx context.Context, lastResults PrivateEndpointConnectionListResult) (result PrivateEndpointConnectionListResult, err error) { - req, err := lastResults.privateEndpointConnectionListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.PrivateEndpointConnectionsClient", "listByServerNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.PrivateEndpointConnectionsClient", "listByServerNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.PrivateEndpointConnectionsClient", "listByServerNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. -func (client PrivateEndpointConnectionsClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result PrivateEndpointConnectionListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.ListByServer") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByServer(ctx, resourceGroupName, serverName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/serverazureadadministrators.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/serverazureadadministrators.go deleted file mode 100644 index 30205229cbc64..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/serverazureadadministrators.go +++ /dev/null @@ -1,407 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ServerAzureADAdministratorsClient is the the Azure SQL Database management API provides a RESTful set of web -// services that interact with Azure SQL Database services to manage your databases. The API enables you to create, -// retrieve, update, and delete databases. -type ServerAzureADAdministratorsClient struct { - BaseClient -} - -// NewServerAzureADAdministratorsClient creates an instance of the ServerAzureADAdministratorsClient client. -func NewServerAzureADAdministratorsClient(subscriptionID string) ServerAzureADAdministratorsClient { - return NewServerAzureADAdministratorsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewServerAzureADAdministratorsClientWithBaseURI creates an instance of the ServerAzureADAdministratorsClient client -// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign -// clouds, Azure stack). -func NewServerAzureADAdministratorsClientWithBaseURI(baseURI string, subscriptionID string) ServerAzureADAdministratorsClient { - return ServerAzureADAdministratorsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates a new Server Active Directory Administrator or updates an existing server Active Directory -// Administrator. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -// parameters - the required parameters for creating or updating an Active Directory Administrator. -func (client ServerAzureADAdministratorsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerAzureADAdministrator) (result ServerAzureADAdministratorsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerAzureADAdministratorsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.AdministratorProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.AdministratorProperties.AdministratorType", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.AdministratorProperties.Login", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.AdministratorProperties.Sid", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("sql.ServerAzureADAdministratorsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ServerAzureADAdministratorsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, parameters ServerAzureADAdministrator) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "administratorName": autorest.Encode("path", "ActiveDirectory"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ServerAzureADAdministratorsClient) CreateOrUpdateSender(req *http.Request) (future ServerAzureADAdministratorsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ServerAzureADAdministratorsClient) CreateOrUpdateResponder(resp *http.Response) (result ServerAzureADAdministrator, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes an existing server Active Directory Administrator. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client ServerAzureADAdministratorsClient) Delete(ctx context.Context, resourceGroupName string, serverName string) (result ServerAzureADAdministratorsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerAzureADAdministratorsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ServerAzureADAdministratorsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "administratorName": autorest.Encode("path", "ActiveDirectory"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client ServerAzureADAdministratorsClient) DeleteSender(req *http.Request) (future ServerAzureADAdministratorsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ServerAzureADAdministratorsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a server Administrator. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client ServerAzureADAdministratorsClient) Get(ctx context.Context, resourceGroupName string, serverName string) (result ServerAzureADAdministrator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerAzureADAdministratorsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ServerAzureADAdministratorsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "administratorName": autorest.Encode("path", "ActiveDirectory"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ServerAzureADAdministratorsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ServerAzureADAdministratorsClient) GetResponder(resp *http.Response) (result ServerAzureADAdministrator, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer gets a list of server Administrators. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client ServerAzureADAdministratorsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result AdministratorListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerAzureADAdministratorsClient.ListByServer") - defer func() { - sc := -1 - if result.alr.Response.Response != nil { - sc = result.alr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByServerNextResults - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.alr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "ListByServer", resp, "Failure sending request") - return - } - - result.alr, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "ListByServer", resp, "Failure responding to request") - return - } - if result.alr.hasNextLink() && result.alr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client ServerAzureADAdministratorsClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client ServerAzureADAdministratorsClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client ServerAzureADAdministratorsClient) ListByServerResponder(resp *http.Response) (result AdministratorListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByServerNextResults retrieves the next set of results, if any. -func (client ServerAzureADAdministratorsClient) listByServerNextResults(ctx context.Context, lastResults AdministratorListResult) (result AdministratorListResult, err error) { - req, err := lastResults.administratorListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "listByServerNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "listByServerNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "listByServerNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. -func (client ServerAzureADAdministratorsClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result AdministratorListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerAzureADAdministratorsClient.ListByServer") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByServer(ctx, resourceGroupName, serverName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/servervulnerabilityassessments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/servervulnerabilityassessments.go deleted file mode 100644 index 485a788ebf2e1..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/servervulnerabilityassessments.go +++ /dev/null @@ -1,397 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ServerVulnerabilityAssessmentsClient is the the Azure SQL Database management API provides a RESTful set of web -// services that interact with Azure SQL Database services to manage your databases. The API enables you to create, -// retrieve, update, and delete databases. -type ServerVulnerabilityAssessmentsClient struct { - BaseClient -} - -// NewServerVulnerabilityAssessmentsClient creates an instance of the ServerVulnerabilityAssessmentsClient client. -func NewServerVulnerabilityAssessmentsClient(subscriptionID string) ServerVulnerabilityAssessmentsClient { - return NewServerVulnerabilityAssessmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewServerVulnerabilityAssessmentsClientWithBaseURI creates an instance of the ServerVulnerabilityAssessmentsClient -// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI -// (sovereign clouds, Azure stack). -func NewServerVulnerabilityAssessmentsClientWithBaseURI(baseURI string, subscriptionID string) ServerVulnerabilityAssessmentsClient { - return ServerVulnerabilityAssessmentsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates the server's vulnerability assessment. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server for which the vulnerability assessment is defined. -// parameters - the requested resource. -func (client ServerVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerVulnerabilityAssessment) (result ServerVulnerabilityAssessment, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerVulnerabilityAssessmentsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ServerVulnerabilityAssessmentProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ServerVulnerabilityAssessmentProperties.StorageContainerPath", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("sql.ServerVulnerabilityAssessmentsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerVulnerabilityAssessmentsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServerVulnerabilityAssessmentsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerVulnerabilityAssessmentsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ServerVulnerabilityAssessmentsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, parameters ServerVulnerabilityAssessment) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vulnerabilityAssessmentName": autorest.Encode("path", "default"), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ServerVulnerabilityAssessmentsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ServerVulnerabilityAssessmentsClient) CreateOrUpdateResponder(resp *http.Response) (result ServerVulnerabilityAssessment, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete removes the server's vulnerability assessment. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server for which the vulnerability assessment is defined. -func (client ServerVulnerabilityAssessmentsClient) Delete(ctx context.Context, resourceGroupName string, serverName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerVulnerabilityAssessmentsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerVulnerabilityAssessmentsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.ServerVulnerabilityAssessmentsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerVulnerabilityAssessmentsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ServerVulnerabilityAssessmentsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vulnerabilityAssessmentName": autorest.Encode("path", "default"), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client ServerVulnerabilityAssessmentsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ServerVulnerabilityAssessmentsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets the server's vulnerability assessment. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server for which the vulnerability assessment is defined. -func (client ServerVulnerabilityAssessmentsClient) Get(ctx context.Context, resourceGroupName string, serverName string) (result ServerVulnerabilityAssessment, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerVulnerabilityAssessmentsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerVulnerabilityAssessmentsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServerVulnerabilityAssessmentsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerVulnerabilityAssessmentsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ServerVulnerabilityAssessmentsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vulnerabilityAssessmentName": autorest.Encode("path", "default"), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ServerVulnerabilityAssessmentsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ServerVulnerabilityAssessmentsClient) GetResponder(resp *http.Response) (result ServerVulnerabilityAssessment, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer lists the vulnerability assessment policies associated with a server. -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// serverName - the name of the server. -func (client ServerVulnerabilityAssessmentsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result ServerVulnerabilityAssessmentListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerVulnerabilityAssessmentsClient.ListByServer") - defer func() { - sc := -1 - if result.svalr.Response.Response != nil { - sc = result.svalr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByServerNextResults - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerVulnerabilityAssessmentsClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.svalr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServerVulnerabilityAssessmentsClient", "ListByServer", resp, "Failure sending request") - return - } - - result.svalr, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerVulnerabilityAssessmentsClient", "ListByServer", resp, "Failure responding to request") - return - } - if result.svalr.hasNextLink() && result.svalr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client ServerVulnerabilityAssessmentsClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client ServerVulnerabilityAssessmentsClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client ServerVulnerabilityAssessmentsClient) ListByServerResponder(resp *http.Response) (result ServerVulnerabilityAssessmentListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByServerNextResults retrieves the next set of results, if any. -func (client ServerVulnerabilityAssessmentsClient) listByServerNextResults(ctx context.Context, lastResults ServerVulnerabilityAssessmentListResult) (result ServerVulnerabilityAssessmentListResult, err error) { - req, err := lastResults.serverVulnerabilityAssessmentListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.ServerVulnerabilityAssessmentsClient", "listByServerNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.ServerVulnerabilityAssessmentsClient", "listByServerNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerVulnerabilityAssessmentsClient", "listByServerNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. -func (client ServerVulnerabilityAssessmentsClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result ServerVulnerabilityAssessmentListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerVulnerabilityAssessmentsClient.ListByServer") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByServer(ctx, resourceGroupName, serverName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/usages.go deleted file mode 100644 index 5afa6c8dc1897..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/usages.go +++ /dev/null @@ -1,156 +0,0 @@ -package sql - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// UsagesClient is the the Azure SQL Database management API provides a RESTful set of web services that interact with -// Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and delete -// databases. -type UsagesClient struct { - BaseClient -} - -// NewUsagesClient creates an instance of the UsagesClient client. -func NewUsagesClient(subscriptionID string) UsagesClient { - return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client using a custom endpoint. Use this when -// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesClient { - return UsagesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// ListByInstancePool gets all instance pool usage metrics -// Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. -// instancePoolName - the name of the instance pool to be retrieved. -// expandChildren - optional request parameter to include managed instance usages within the instance pool. -func (client UsagesClient) ListByInstancePool(ctx context.Context, resourceGroupName string, instancePoolName string, expandChildren *bool) (result UsageListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/UsagesClient.ListByInstancePool") - defer func() { - sc := -1 - if result.ulr.Response.Response != nil { - sc = result.ulr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByInstancePoolNextResults - req, err := client.ListByInstancePoolPreparer(ctx, resourceGroupName, instancePoolName, expandChildren) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.UsagesClient", "ListByInstancePool", nil, "Failure preparing request") - return - } - - resp, err := client.ListByInstancePoolSender(req) - if err != nil { - result.ulr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.UsagesClient", "ListByInstancePool", resp, "Failure sending request") - return - } - - result.ulr, err = client.ListByInstancePoolResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.UsagesClient", "ListByInstancePool", resp, "Failure responding to request") - return - } - if result.ulr.hasNextLink() && result.ulr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByInstancePoolPreparer prepares the ListByInstancePool request. -func (client UsagesClient) ListByInstancePoolPreparer(ctx context.Context, resourceGroupName string, instancePoolName string, expandChildren *bool) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "instancePoolName": autorest.Encode("path", instancePoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if expandChildren != nil { - queryParameters["expandChildren"] = autorest.Encode("query", *expandChildren) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/usages", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByInstancePoolSender sends the ListByInstancePool request. The method will close the -// http.Response Body if it receives an error. -func (client UsagesClient) ListByInstancePoolSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByInstancePoolResponder handles the response to the ListByInstancePool request. The method always -// closes the http.Response Body. -func (client UsagesClient) ListByInstancePoolResponder(resp *http.Response) (result UsageListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByInstancePoolNextResults retrieves the next set of results, if any. -func (client UsagesClient) listByInstancePoolNextResults(ctx context.Context, lastResults UsageListResult) (result UsageListResult, err error) { - req, err := lastResults.usageListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "sql.UsagesClient", "listByInstancePoolNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByInstancePoolSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "sql.UsagesClient", "listByInstancePoolNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByInstancePoolResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.UsagesClient", "listByInstancePoolNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByInstancePoolComplete enumerates all values, automatically crossing page boundaries as required. -func (client UsagesClient) ListByInstancePoolComplete(ctx context.Context, resourceGroupName string, instancePoolName string, expandChildren *bool) (result UsageListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/UsagesClient.ListByInstancePool") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByInstancePool(ctx, resourceGroupName, instancePoolName, expandChildren) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/version.go deleted file mode 100644 index dc700d3cca1f7..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql/version.go +++ /dev/null @@ -1,19 +0,0 @@ -package sql - -import "github.com/Azure/azure-sdk-for-go/version" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// UserAgent returns the UserAgent string to use when sending http.Requests. -func UserAgent() string { - return "Azure-SDK-For-Go/" + Version() + " sql/2018-06-01-preview" -} - -// Version returns the semantic version (see http://semver.org) of the client. -func Version() string { - return version.Number -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/CHANGELOG.md deleted file mode 100644 index 52911e4cc5e4c..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Change History - diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/_meta.json b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/_meta.json deleted file mode 100644 index 05f40085dd2eb..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/_meta.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commit": "92ab22b49bd085116af0c61fada2c6c360702e9e", - "readme": "/_/azure-rest-api-specs/specification/managementgroups/resource-manager/readme.md", - "tag": "package-2020-05", - "use": "@microsoft.azure/autorest.go@2.1.187", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2020-05 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/managementgroups/resource-manager/readme.md", - "additional_properties": { - "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION" - } -} \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/client.go deleted file mode 100644 index d856a1204a172..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/client.go +++ /dev/null @@ -1,253 +0,0 @@ -// Deprecated: Please note, this package has been deprecated. A replacement package is available [github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups). We strongly encourage you to upgrade to continue receiving updates. See [Migration Guide](https://aka.ms/azsdk/golang/t2/migration) for guidance on upgrading. Refer to our [deprecation policy](https://azure.github.io/azure-sdk/policies_support.html) for more details. -// -// Package managementgroups implements the Azure ARM Managementgroups service API version 2020-05-01. -// -// The Azure Management Groups API enables consolidation of multiple -// subscriptions/resources into an organizational hierarchy and centrally -// manage access control, policies, alerting and reporting for those resources. -// -package managementgroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -const ( - // DefaultBaseURI is the default URI used for the service Managementgroups - DefaultBaseURI = "https://management.azure.com" -) - -// BaseClient is the base client for Managementgroups. -type BaseClient struct { - autorest.Client - BaseURI string -} - -// New creates an instance of the BaseClient client. -func New() BaseClient { - return NewWithBaseURI(DefaultBaseURI) -} - -// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with -// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewWithBaseURI(baseURI string) BaseClient { - return BaseClient{ - Client: autorest.NewClientWithUserAgent(UserAgent()), - BaseURI: baseURI, - } -} - -// CheckNameAvailability checks if the specified management group name is valid and unique -// Parameters: -// checkNameAvailabilityRequest - management group name availability check parameters. -func (client BaseClient) CheckNameAvailability(ctx context.Context, checkNameAvailabilityRequest CheckNameAvailabilityRequest) (result CheckNameAvailabilityResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CheckNameAvailability") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CheckNameAvailabilityPreparer(ctx, checkNameAvailabilityRequest) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "CheckNameAvailability", nil, "Failure preparing request") - return - } - - resp, err := client.CheckNameAvailabilitySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "CheckNameAvailability", resp, "Failure sending request") - return - } - - result, err = client.CheckNameAvailabilityResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "CheckNameAvailability", resp, "Failure responding to request") - return - } - - return -} - -// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. -func (client BaseClient) CheckNameAvailabilityPreparer(ctx context.Context, checkNameAvailabilityRequest CheckNameAvailabilityRequest) (*http.Request, error) { - const APIVersion = "2020-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPath("/providers/Microsoft.Management/checkNameAvailability"), - autorest.WithJSON(checkNameAvailabilityRequest), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the -// http.Response Body if it receives an error. -func (client BaseClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always -// closes the http.Response Body. -func (client BaseClient) CheckNameAvailabilityResponder(resp *http.Response) (result CheckNameAvailabilityResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// StartTenantBackfill starts backfilling subscriptions for the Tenant. -func (client BaseClient) StartTenantBackfill(ctx context.Context) (result TenantBackfillStatusResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.StartTenantBackfill") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.StartTenantBackfillPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "StartTenantBackfill", nil, "Failure preparing request") - return - } - - resp, err := client.StartTenantBackfillSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "StartTenantBackfill", resp, "Failure sending request") - return - } - - result, err = client.StartTenantBackfillResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "StartTenantBackfill", resp, "Failure responding to request") - return - } - - return -} - -// StartTenantBackfillPreparer prepares the StartTenantBackfill request. -func (client BaseClient) StartTenantBackfillPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2020-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPath("/providers/Microsoft.Management/startTenantBackfill"), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// StartTenantBackfillSender sends the StartTenantBackfill request. The method will close the -// http.Response Body if it receives an error. -func (client BaseClient) StartTenantBackfillSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// StartTenantBackfillResponder handles the response to the StartTenantBackfill request. The method always -// closes the http.Response Body. -func (client BaseClient) StartTenantBackfillResponder(resp *http.Response) (result TenantBackfillStatusResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// TenantBackfillStatus gets tenant backfill status -func (client BaseClient) TenantBackfillStatus(ctx context.Context) (result TenantBackfillStatusResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.TenantBackfillStatus") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.TenantBackfillStatusPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "TenantBackfillStatus", nil, "Failure preparing request") - return - } - - resp, err := client.TenantBackfillStatusSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "TenantBackfillStatus", resp, "Failure sending request") - return - } - - result, err = client.TenantBackfillStatusResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "TenantBackfillStatus", resp, "Failure responding to request") - return - } - - return -} - -// TenantBackfillStatusPreparer prepares the TenantBackfillStatus request. -func (client BaseClient) TenantBackfillStatusPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2020-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPath("/providers/Microsoft.Management/tenantBackfillStatus"), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// TenantBackfillStatusSender sends the TenantBackfillStatus request. The method will close the -// http.Response Body if it receives an error. -func (client BaseClient) TenantBackfillStatusSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// TenantBackfillStatusResponder handles the response to the TenantBackfillStatus request. The method always -// closes the http.Response Body. -func (client BaseClient) TenantBackfillStatusResponder(resp *http.Response) (result TenantBackfillStatusResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/entities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/entities.go deleted file mode 100644 index 33eb485462571..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/entities.go +++ /dev/null @@ -1,206 +0,0 @@ -package managementgroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// EntitiesClient is the the Azure Management Groups API enables consolidation of multiple -// subscriptions/resources into an organizational hierarchy and centrally -// manage access control, policies, alerting and reporting for those resources. -type EntitiesClient struct { - BaseClient -} - -// NewEntitiesClient creates an instance of the EntitiesClient client. -func NewEntitiesClient() EntitiesClient { - return NewEntitiesClientWithBaseURI(DefaultBaseURI) -} - -// NewEntitiesClientWithBaseURI creates an instance of the EntitiesClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewEntitiesClientWithBaseURI(baseURI string) EntitiesClient { - return EntitiesClient{NewWithBaseURI(baseURI)} -} - -// List list all entities (Management Groups, Subscriptions, etc.) for the authenticated user. -// Parameters: -// skiptoken - page continuation token is only used if a previous operation returned a partial result. -// If a previous response contains a nextLink element, the value of the nextLink element will include a token -// parameter that specifies a starting point to use for subsequent calls. -// skip - number of entities to skip over when retrieving results. Passing this in will override $skipToken. -// top - number of elements to return when retrieving results. Passing this in will override $skipToken. -// selectParameter - this parameter specifies the fields to include in the response. Can include any -// combination of Name,DisplayName,Type,ParentDisplayNameChain,ParentChain, e.g. -// '$select=Name,DisplayName,Type,ParentDisplayNameChain,ParentNameChain'. When specified the $select parameter -// can override select in $skipToken. -// search - the $search parameter is used in conjunction with the $filter parameter to return three different -// outputs depending on the parameter passed in. -// With $search=AllowedParents the API will return the entity info of all groups that the requested entity will -// be able to reparent to as determined by the user's permissions. -// With $search=AllowedChildren the API will return the entity info of all entities that can be added as -// children of the requested entity. -// With $search=ParentAndFirstLevelChildren the API will return the parent and first level of children that -// the user has either direct access to or indirect access via one of their descendants. -// With $search=ParentOnly the API will return only the group if the user has access to at least one of the -// descendants of the group. -// With $search=ChildrenOnly the API will return only the first level of children of the group entity info -// specified in $filter. The user must have direct access to the children entities or one of it's descendants -// for it to show up in the results. -// filter - the filter parameter allows you to filter on the the name or display name fields. You can check for -// equality on the name field (e.g. name eq '{entityName}') and you can check for substrings on either the -// name or display name fields(e.g. contains(name, '{substringToSearch}'), contains(displayName, -// '{substringToSearch')). Note that the '{entityName}' and '{substringToSearch}' fields are checked case -// insensitively. -// view - the view parameter allows clients to filter the type of data that is returned by the getEntities -// call. -// groupName - a filter which allows the get entities call to focus on a particular group (i.e. "$filter=name -// eq 'groupName'") -// cacheControl - indicates that the request shouldn't utilize any caches. -func (client EntitiesClient) List(ctx context.Context, skiptoken string, skip *int32, top *int32, selectParameter string, search string, filter string, view string, groupName string, cacheControl string) (result EntityListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EntitiesClient.List") - defer func() { - sc := -1 - if result.elr.Response.Response != nil { - sc = result.elr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, skiptoken, skip, top, selectParameter, search, filter, view, groupName, cacheControl) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.EntitiesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.elr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "managementgroups.EntitiesClient", "List", resp, "Failure sending request") - return - } - - result.elr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.EntitiesClient", "List", resp, "Failure responding to request") - return - } - if result.elr.hasNextLink() && result.elr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client EntitiesClient) ListPreparer(ctx context.Context, skiptoken string, skip *int32, top *int32, selectParameter string, search string, filter string, view string, groupName string, cacheControl string) (*http.Request, error) { - const APIVersion = "2020-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(skiptoken) > 0 { - queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken) - } - if skip != nil { - queryParameters["$skip"] = autorest.Encode("query", *skip) - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - if len(selectParameter) > 0 { - queryParameters["$select"] = autorest.Encode("query", selectParameter) - } - if len(string(search)) > 0 { - queryParameters["$search"] = autorest.Encode("query", search) - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - if len(string(view)) > 0 { - queryParameters["$view"] = autorest.Encode("query", view) - } - if len(groupName) > 0 { - queryParameters["groupName"] = autorest.Encode("query", groupName) - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPath("/providers/Microsoft.Management/getEntities"), - autorest.WithQueryParameters(queryParameters)) - if len(cacheControl) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("Cache-Control", autorest.String(cacheControl))) - } else { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("Cache-Control", autorest.String("no-cache"))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client EntitiesClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client EntitiesClient) ListResponder(resp *http.Response) (result EntityListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client EntitiesClient) listNextResults(ctx context.Context, lastResults EntityListResult) (result EntityListResult, err error) { - req, err := lastResults.entityListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "managementgroups.EntitiesClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "managementgroups.EntitiesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.EntitiesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client EntitiesClient) ListComplete(ctx context.Context, skiptoken string, skip *int32, top *int32, selectParameter string, search string, filter string, view string, groupName string, cacheControl string) (result EntityListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EntitiesClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, skiptoken, skip, top, selectParameter, search, filter, view, groupName, cacheControl) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/enums.go deleted file mode 100644 index f50d78f626093..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/enums.go +++ /dev/null @@ -1,145 +0,0 @@ -package managementgroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// InheritedPermissions enumerates the values for inherited permissions. -type InheritedPermissions string - -const ( - // Delete ... - Delete InheritedPermissions = "delete" - // Edit ... - Edit InheritedPermissions = "edit" - // Noaccess ... - Noaccess InheritedPermissions = "noaccess" - // View ... - View InheritedPermissions = "view" -) - -// PossibleInheritedPermissionsValues returns an array of possible values for the InheritedPermissions const type. -func PossibleInheritedPermissionsValues() []InheritedPermissions { - return []InheritedPermissions{Delete, Edit, Noaccess, View} -} - -// Permissions enumerates the values for permissions. -type Permissions string - -const ( - // PermissionsDelete ... - PermissionsDelete Permissions = "delete" - // PermissionsEdit ... - PermissionsEdit Permissions = "edit" - // PermissionsNoaccess ... - PermissionsNoaccess Permissions = "noaccess" - // PermissionsView ... - PermissionsView Permissions = "view" -) - -// PossiblePermissionsValues returns an array of possible values for the Permissions const type. -func PossiblePermissionsValues() []Permissions { - return []Permissions{PermissionsDelete, PermissionsEdit, PermissionsNoaccess, PermissionsView} -} - -// Permissions1 enumerates the values for permissions 1. -type Permissions1 string - -const ( - // Permissions1Delete ... - Permissions1Delete Permissions1 = "delete" - // Permissions1Edit ... - Permissions1Edit Permissions1 = "edit" - // Permissions1Noaccess ... - Permissions1Noaccess Permissions1 = "noaccess" - // Permissions1View ... - Permissions1View Permissions1 = "view" -) - -// PossiblePermissions1Values returns an array of possible values for the Permissions1 const type. -func PossiblePermissions1Values() []Permissions1 { - return []Permissions1{Permissions1Delete, Permissions1Edit, Permissions1Noaccess, Permissions1View} -} - -// Reason enumerates the values for reason. -type Reason string - -const ( - // AlreadyExists ... - AlreadyExists Reason = "AlreadyExists" - // Invalid ... - Invalid Reason = "Invalid" -) - -// PossibleReasonValues returns an array of possible values for the Reason const type. -func PossibleReasonValues() []Reason { - return []Reason{AlreadyExists, Invalid} -} - -// Status enumerates the values for status. -type Status string - -const ( - // Cancelled ... - Cancelled Status = "Cancelled" - // Completed ... - Completed Status = "Completed" - // Failed ... - Failed Status = "Failed" - // NotStarted ... - NotStarted Status = "NotStarted" - // NotStartedButGroupsExist ... - NotStartedButGroupsExist Status = "NotStartedButGroupsExist" - // Started ... - Started Status = "Started" -) - -// PossibleStatusValues returns an array of possible values for the Status const type. -func PossibleStatusValues() []Status { - return []Status{Cancelled, Completed, Failed, NotStarted, NotStartedButGroupsExist, Started} -} - -// Type enumerates the values for type. -type Type string - -const ( - // MicrosoftManagementmanagementGroups ... - MicrosoftManagementmanagementGroups Type = "Microsoft.Management/managementGroups" -) - -// PossibleTypeValues returns an array of possible values for the Type const type. -func PossibleTypeValues() []Type { - return []Type{MicrosoftManagementmanagementGroups} -} - -// Type1 enumerates the values for type 1. -type Type1 string - -const ( - // Type1MicrosoftManagementmanagementGroups ... - Type1MicrosoftManagementmanagementGroups Type1 = "Microsoft.Management/managementGroups" - // Type1Subscriptions ... - Type1Subscriptions Type1 = "/subscriptions" -) - -// PossibleType1Values returns an array of possible values for the Type1 const type. -func PossibleType1Values() []Type1 { - return []Type1{Type1MicrosoftManagementmanagementGroups, Type1Subscriptions} -} - -// Type2 enumerates the values for type 2. -type Type2 string - -const ( - // Type2MicrosoftManagementmanagementGroups ... - Type2MicrosoftManagementmanagementGroups Type2 = "Microsoft.Management/managementGroups" - // Type2Subscriptions ... - Type2Subscriptions Type2 = "/subscriptions" -) - -// PossibleType2Values returns an array of possible values for the Type2 const type. -func PossibleType2Values() []Type2 { - return []Type2{Type2MicrosoftManagementmanagementGroups, Type2Subscriptions} -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/hierarchysettings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/hierarchysettings.go deleted file mode 100644 index 50c7a2917922b..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/hierarchysettings.go +++ /dev/null @@ -1,406 +0,0 @@ -package managementgroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// HierarchySettingsClient is the the Azure Management Groups API enables consolidation of multiple -// subscriptions/resources into an organizational hierarchy and centrally -// manage access control, policies, alerting and reporting for those resources. -type HierarchySettingsClient struct { - BaseClient -} - -// NewHierarchySettingsClient creates an instance of the HierarchySettingsClient client. -func NewHierarchySettingsClient() HierarchySettingsClient { - return NewHierarchySettingsClientWithBaseURI(DefaultBaseURI) -} - -// NewHierarchySettingsClientWithBaseURI creates an instance of the HierarchySettingsClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewHierarchySettingsClientWithBaseURI(baseURI string) HierarchySettingsClient { - return HierarchySettingsClient{NewWithBaseURI(baseURI)} -} - -// CreateOrUpdate creates or updates the hierarchy settings defined at the Management Group level. -// Parameters: -// groupID - management Group ID. -// createTenantSettingsRequest - tenant level settings request parameter. -func (client HierarchySettingsClient) CreateOrUpdate(ctx context.Context, groupID string, createTenantSettingsRequest CreateOrUpdateSettingsRequest) (result HierarchySettings, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/HierarchySettingsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, groupID, createTenantSettingsRequest) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.HierarchySettingsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "managementgroups.HierarchySettingsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.HierarchySettingsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client HierarchySettingsClient) CreateOrUpdatePreparer(ctx context.Context, groupID string, createTenantSettingsRequest CreateOrUpdateSettingsRequest) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "groupId": autorest.Encode("path", groupID), - } - - const APIVersion = "2020-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}/settings/default", pathParameters), - autorest.WithJSON(createTenantSettingsRequest), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client HierarchySettingsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client HierarchySettingsClient) CreateOrUpdateResponder(resp *http.Response) (result HierarchySettings, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes the hierarchy settings defined at the Management Group level. -// Parameters: -// groupID - management Group ID. -func (client HierarchySettingsClient) Delete(ctx context.Context, groupID string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/HierarchySettingsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, groupID) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.HierarchySettingsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "managementgroups.HierarchySettingsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.HierarchySettingsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client HierarchySettingsClient) DeletePreparer(ctx context.Context, groupID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "groupId": autorest.Encode("path", groupID), - } - - const APIVersion = "2020-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}/settings/default", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client HierarchySettingsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client HierarchySettingsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets the hierarchy settings defined at the Management Group level. Settings can only be set on the root -// Management Group of the hierarchy. -// Parameters: -// groupID - management Group ID. -func (client HierarchySettingsClient) Get(ctx context.Context, groupID string) (result HierarchySettings, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/HierarchySettingsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, groupID) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.HierarchySettingsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "managementgroups.HierarchySettingsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.HierarchySettingsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client HierarchySettingsClient) GetPreparer(ctx context.Context, groupID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "groupId": autorest.Encode("path", groupID), - } - - const APIVersion = "2020-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}/settings/default", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client HierarchySettingsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client HierarchySettingsClient) GetResponder(resp *http.Response) (result HierarchySettings, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets all the hierarchy settings defined at the Management Group level. Settings can only be set on the root -// Management Group of the hierarchy. -// Parameters: -// groupID - management Group ID. -func (client HierarchySettingsClient) List(ctx context.Context, groupID string) (result HierarchySettingsList, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/HierarchySettingsClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListPreparer(ctx, groupID) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.HierarchySettingsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "managementgroups.HierarchySettingsClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.HierarchySettingsClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client HierarchySettingsClient) ListPreparer(ctx context.Context, groupID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "groupId": autorest.Encode("path", groupID), - } - - const APIVersion = "2020-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}/settings", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client HierarchySettingsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client HierarchySettingsClient) ListResponder(resp *http.Response) (result HierarchySettingsList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Update updates the hierarchy settings defined at the Management Group level. -// Parameters: -// groupID - management Group ID. -// createTenantSettingsRequest - tenant level settings request parameter. -func (client HierarchySettingsClient) Update(ctx context.Context, groupID string, createTenantSettingsRequest CreateOrUpdateSettingsRequest) (result HierarchySettings, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/HierarchySettingsClient.Update") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, groupID, createTenantSettingsRequest) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.HierarchySettingsClient", "Update", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "managementgroups.HierarchySettingsClient", "Update", resp, "Failure sending request") - return - } - - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.HierarchySettingsClient", "Update", resp, "Failure responding to request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client HierarchySettingsClient) UpdatePreparer(ctx context.Context, groupID string, createTenantSettingsRequest CreateOrUpdateSettingsRequest) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "groupId": autorest.Encode("path", groupID), - } - - const APIVersion = "2020-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}/settings/default", pathParameters), - autorest.WithJSON(createTenantSettingsRequest), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client HierarchySettingsClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client HierarchySettingsClient) UpdateResponder(resp *http.Response) (result HierarchySettings, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/managementgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/managementgroups.go deleted file mode 100644 index 182af71618f22..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/managementgroups.go +++ /dev/null @@ -1,638 +0,0 @@ -package managementgroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// Client is the the Azure Management Groups API enables consolidation of multiple -// subscriptions/resources into an organizational hierarchy and centrally -// manage access control, policies, alerting and reporting for those resources. -type Client struct { - BaseClient -} - -// NewClient creates an instance of the Client client. -func NewClient() Client { - return NewClientWithBaseURI(DefaultBaseURI) -} - -// NewClientWithBaseURI creates an instance of the Client client using a custom endpoint. Use this when interacting -// with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewClientWithBaseURI(baseURI string) Client { - return Client{NewWithBaseURI(baseURI)} -} - -// CreateOrUpdate create or update a management group. -// If a management group is already created and a subsequent create request is issued with different properties, the -// management group properties will be updated. -// Parameters: -// groupID - management Group ID. -// createManagementGroupRequest - management group creation parameters. -// cacheControl - indicates that the request shouldn't utilize any caches. -func (client Client) CreateOrUpdate(ctx context.Context, groupID string, createManagementGroupRequest CreateManagementGroupRequest, cacheControl string) (result CreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/Client.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, groupID, createManagementGroupRequest, cacheControl) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.Client", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.Client", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client Client) CreateOrUpdatePreparer(ctx context.Context, groupID string, createManagementGroupRequest CreateManagementGroupRequest, cacheControl string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "groupId": autorest.Encode("path", groupID), - } - - const APIVersion = "2020-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - createManagementGroupRequest.ID = nil - createManagementGroupRequest.Type = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}", pathParameters), - autorest.WithJSON(createManagementGroupRequest), - autorest.WithQueryParameters(queryParameters)) - if len(cacheControl) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("Cache-Control", autorest.String(cacheControl))) - } else { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("Cache-Control", autorest.String("no-cache"))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client Client) CreateOrUpdateSender(req *http.Request) (future CreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client Client) CreateOrUpdateResponder(resp *http.Response) (result SetObject, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result.Value), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete delete management group. -// If a management group contains child resources, the request will fail. -// Parameters: -// groupID - management Group ID. -// cacheControl - indicates that the request shouldn't utilize any caches. -func (client Client) Delete(ctx context.Context, groupID string, cacheControl string) (result DeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/Client.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, groupID, cacheControl) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.Client", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.Client", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client Client) DeletePreparer(ctx context.Context, groupID string, cacheControl string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "groupId": autorest.Encode("path", groupID), - } - - const APIVersion = "2020-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if len(cacheControl) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("Cache-Control", autorest.String(cacheControl))) - } else { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("Cache-Control", autorest.String("no-cache"))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client Client) DeleteResponder(resp *http.Response) (result AzureAsyncOperationResults, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get get the details of the management group. -// Parameters: -// groupID - management Group ID. -// expand - the $expand=children query string parameter allows clients to request inclusion of children in the -// response payload. $expand=path includes the path from the root group to the current group. -// recurse - the $recurse=true query string parameter allows clients to request inclusion of entire hierarchy -// in the response payload. Note that $expand=children must be passed up if $recurse is set to true. -// filter - a filter which allows the exclusion of subscriptions from results (i.e. '$filter=children.childType -// ne Subscription') -// cacheControl - indicates that the request shouldn't utilize any caches. -func (client Client) Get(ctx context.Context, groupID string, expand string, recurse *bool, filter string, cacheControl string) (result ManagementGroup, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/Client.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, groupID, expand, recurse, filter, cacheControl) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.Client", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "managementgroups.Client", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.Client", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client Client) GetPreparer(ctx context.Context, groupID string, expand string, recurse *bool, filter string, cacheControl string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "groupId": autorest.Encode("path", groupID), - } - - const APIVersion = "2020-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(string(expand)) > 0 { - queryParameters["$expand"] = autorest.Encode("query", expand) - } - if recurse != nil { - queryParameters["$recurse"] = autorest.Encode("query", *recurse) - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if len(cacheControl) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("Cache-Control", autorest.String(cacheControl))) - } else { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("Cache-Control", autorest.String("no-cache"))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client Client) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client Client) GetResponder(resp *http.Response) (result ManagementGroup, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetDescendants list all entities that descend from a management group. -// Parameters: -// groupID - management Group ID. -// skiptoken - page continuation token is only used if a previous operation returned a partial result. -// If a previous response contains a nextLink element, the value of the nextLink element will include a token -// parameter that specifies a starting point to use for subsequent calls. -// top - number of elements to return when retrieving results. Passing this in will override $skipToken. -func (client Client) GetDescendants(ctx context.Context, groupID string, skiptoken string, top *int32) (result DescendantListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/Client.GetDescendants") - defer func() { - sc := -1 - if result.dlr.Response.Response != nil { - sc = result.dlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.getDescendantsNextResults - req, err := client.GetDescendantsPreparer(ctx, groupID, skiptoken, top) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.Client", "GetDescendants", nil, "Failure preparing request") - return - } - - resp, err := client.GetDescendantsSender(req) - if err != nil { - result.dlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "managementgroups.Client", "GetDescendants", resp, "Failure sending request") - return - } - - result.dlr, err = client.GetDescendantsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.Client", "GetDescendants", resp, "Failure responding to request") - return - } - if result.dlr.hasNextLink() && result.dlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// GetDescendantsPreparer prepares the GetDescendants request. -func (client Client) GetDescendantsPreparer(ctx context.Context, groupID string, skiptoken string, top *int32) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "groupId": autorest.Encode("path", groupID), - } - - const APIVersion = "2020-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(skiptoken) > 0 { - queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken) - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}/descendants", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetDescendantsSender sends the GetDescendants request. The method will close the -// http.Response Body if it receives an error. -func (client Client) GetDescendantsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// GetDescendantsResponder handles the response to the GetDescendants request. The method always -// closes the http.Response Body. -func (client Client) GetDescendantsResponder(resp *http.Response) (result DescendantListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// getDescendantsNextResults retrieves the next set of results, if any. -func (client Client) getDescendantsNextResults(ctx context.Context, lastResults DescendantListResult) (result DescendantListResult, err error) { - req, err := lastResults.descendantListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "managementgroups.Client", "getDescendantsNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.GetDescendantsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "managementgroups.Client", "getDescendantsNextResults", resp, "Failure sending next results request") - } - result, err = client.GetDescendantsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.Client", "getDescendantsNextResults", resp, "Failure responding to next results request") - } - return -} - -// GetDescendantsComplete enumerates all values, automatically crossing page boundaries as required. -func (client Client) GetDescendantsComplete(ctx context.Context, groupID string, skiptoken string, top *int32) (result DescendantListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/Client.GetDescendants") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.GetDescendants(ctx, groupID, skiptoken, top) - return -} - -// List list management groups for the authenticated user. -// Parameters: -// cacheControl - indicates that the request shouldn't utilize any caches. -// skiptoken - page continuation token is only used if a previous operation returned a partial result. -// If a previous response contains a nextLink element, the value of the nextLink element will include a token -// parameter that specifies a starting point to use for subsequent calls. -func (client Client) List(ctx context.Context, cacheControl string, skiptoken string) (result ListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/Client.List") - defer func() { - sc := -1 - if result.lr.Response.Response != nil { - sc = result.lr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, cacheControl, skiptoken) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.Client", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.lr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "managementgroups.Client", "List", resp, "Failure sending request") - return - } - - result.lr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.Client", "List", resp, "Failure responding to request") - return - } - if result.lr.hasNextLink() && result.lr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client Client) ListPreparer(ctx context.Context, cacheControl string, skiptoken string) (*http.Request, error) { - const APIVersion = "2020-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(skiptoken) > 0 { - queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPath("/providers/Microsoft.Management/managementGroups"), - autorest.WithQueryParameters(queryParameters)) - if len(cacheControl) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("Cache-Control", autorest.String(cacheControl))) - } else { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("Cache-Control", autorest.String("no-cache"))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client Client) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client Client) ListResponder(resp *http.Response) (result ListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client Client) listNextResults(ctx context.Context, lastResults ListResult) (result ListResult, err error) { - req, err := lastResults.listResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "managementgroups.Client", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "managementgroups.Client", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.Client", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client Client) ListComplete(ctx context.Context, cacheControl string, skiptoken string) (result ListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/Client.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, cacheControl, skiptoken) - return -} - -// Update update a management group. -// Parameters: -// groupID - management Group ID. -// patchGroupRequest - management group patch parameters. -// cacheControl - indicates that the request shouldn't utilize any caches. -func (client Client) Update(ctx context.Context, groupID string, patchGroupRequest PatchManagementGroupRequest, cacheControl string) (result ManagementGroup, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/Client.Update") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, groupID, patchGroupRequest, cacheControl) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.Client", "Update", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "managementgroups.Client", "Update", resp, "Failure sending request") - return - } - - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.Client", "Update", resp, "Failure responding to request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client Client) UpdatePreparer(ctx context.Context, groupID string, patchGroupRequest PatchManagementGroupRequest, cacheControl string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "groupId": autorest.Encode("path", groupID), - } - - const APIVersion = "2020-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}", pathParameters), - autorest.WithJSON(patchGroupRequest), - autorest.WithQueryParameters(queryParameters)) - if len(cacheControl) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("Cache-Control", autorest.String(cacheControl))) - } else { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("Cache-Control", autorest.String("no-cache"))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client Client) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client Client) UpdateResponder(resp *http.Response) (result ManagementGroup, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/models.go deleted file mode 100644 index c3c8ae1a97d88..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/models.go +++ /dev/null @@ -1,2133 +0,0 @@ -package managementgroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "encoding/json" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/date" - "github.com/Azure/go-autorest/autorest/to" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups" - -// AzureAsyncOperationResults the results of Azure-AsyncOperation. -type AzureAsyncOperationResults struct { - autorest.Response `json:"-"` - // ID - READ-ONLY; The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - ID *string `json:"id,omitempty"` - // Type - READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups - Type *string `json:"type,omitempty"` - // Name - READ-ONLY; The name of the management group. For example, 00000000-0000-0000-0000-000000000000 - Name *string `json:"name,omitempty"` - // Status - READ-ONLY; The current status of the asynchronous operation performed . For example, Running, Succeeded, Failed - Status *string `json:"status,omitempty"` - *InfoProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureAsyncOperationResults. -func (aaor AzureAsyncOperationResults) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if aaor.InfoProperties != nil { - objectMap["properties"] = aaor.InfoProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for AzureAsyncOperationResults struct. -func (aaor *AzureAsyncOperationResults) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - aaor.ID = &ID - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - aaor.Type = &typeVar - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - aaor.Name = &name - } - case "status": - if v != nil { - var status string - err = json.Unmarshal(*v, &status) - if err != nil { - return err - } - aaor.Status = &status - } - case "properties": - if v != nil { - var infoProperties InfoProperties - err = json.Unmarshal(*v, &infoProperties) - if err != nil { - return err - } - aaor.InfoProperties = &infoProperties - } - } - } - - return nil -} - -// CheckNameAvailabilityRequest management group name availability check parameters. -type CheckNameAvailabilityRequest struct { - // Name - the name to check for availability - Name *string `json:"name,omitempty"` - // Type - fully qualified resource type which includes provider namespace. Possible values include: 'MicrosoftManagementmanagementGroups' - Type Type `json:"type,omitempty"` -} - -// CheckNameAvailabilityResult describes the result of the request to check management group name -// availability. -type CheckNameAvailabilityResult struct { - autorest.Response `json:"-"` - // NameAvailable - READ-ONLY; Required. True indicates name is valid and available. False indicates the name is invalid, unavailable, or both. - NameAvailable *bool `json:"nameAvailable,omitempty"` - // Reason - READ-ONLY; Required if nameAvailable == false. Invalid indicates the name provided does not match the resource provider's naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable. Possible values include: 'Invalid', 'AlreadyExists' - Reason Reason `json:"reason,omitempty"` - // Message - READ-ONLY; Required if nameAvailable == false. Localized. If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that is already in use, and direct them to select a different name. - Message *string `json:"message,omitempty"` -} - -// MarshalJSON is the custom marshaler for CheckNameAvailabilityResult. -func (cnar CheckNameAvailabilityResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ChildInfo the child information of a management group. -type ChildInfo struct { - // Type - The fully qualified resource type which includes provider namespace (e.g. Microsoft.Management/managementGroups). Possible values include: 'Type1MicrosoftManagementmanagementGroups', 'Type1Subscriptions' - Type Type1 `json:"type,omitempty"` - // ID - The fully qualified ID for the child resource (management group or subscription). For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - ID *string `json:"id,omitempty"` - // Name - The name of the child entity. - Name *string `json:"name,omitempty"` - // DisplayName - The friendly name of the child resource. - DisplayName *string `json:"displayName,omitempty"` - // Children - The list of children. - Children *[]ChildInfo `json:"children,omitempty"` -} - -// CreateManagementGroupChildInfo the child information of a management group used during creation. -type CreateManagementGroupChildInfo struct { - // Type - READ-ONLY; The fully qualified resource type which includes provider namespace (e.g. Microsoft.Management/managementGroups). Possible values include: 'Type2MicrosoftManagementmanagementGroups', 'Type2Subscriptions' - Type Type2 `json:"type,omitempty"` - // ID - READ-ONLY; The fully qualified ID for the child resource (management group or subscription). For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the child entity. - Name *string `json:"name,omitempty"` - // DisplayName - READ-ONLY; The friendly name of the child resource. - DisplayName *string `json:"displayName,omitempty"` - // Children - READ-ONLY; The list of children. - Children *[]CreateManagementGroupChildInfo `json:"children,omitempty"` -} - -// MarshalJSON is the custom marshaler for CreateManagementGroupChildInfo. -func (cmgci CreateManagementGroupChildInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// CreateManagementGroupDetails the details of a management group used during creation. -type CreateManagementGroupDetails struct { - // Version - READ-ONLY; The version number of the object. - Version *float64 `json:"version,omitempty"` - // UpdatedTime - READ-ONLY; The date and time when this object was last updated. - UpdatedTime *date.Time `json:"updatedTime,omitempty"` - // UpdatedBy - READ-ONLY; The identity of the principal or process that updated the object. - UpdatedBy *string `json:"updatedBy,omitempty"` - Parent *CreateParentGroupInfo `json:"parent,omitempty"` -} - -// MarshalJSON is the custom marshaler for CreateManagementGroupDetails. -func (cmgd CreateManagementGroupDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if cmgd.Parent != nil { - objectMap["parent"] = cmgd.Parent - } - return json.Marshal(objectMap) -} - -// CreateManagementGroupProperties the generic properties of a management group used during creation. -type CreateManagementGroupProperties struct { - // TenantID - READ-ONLY; The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000 - TenantID *string `json:"tenantId,omitempty"` - // DisplayName - The friendly name of the management group. If no value is passed then this field will be set to the groupId. - DisplayName *string `json:"displayName,omitempty"` - Details *CreateManagementGroupDetails `json:"details,omitempty"` - // Children - READ-ONLY; The list of children. - Children *[]CreateManagementGroupChildInfo `json:"children,omitempty"` -} - -// MarshalJSON is the custom marshaler for CreateManagementGroupProperties. -func (cmgp CreateManagementGroupProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if cmgp.DisplayName != nil { - objectMap["displayName"] = cmgp.DisplayName - } - if cmgp.Details != nil { - objectMap["details"] = cmgp.Details - } - return json.Marshal(objectMap) -} - -// CreateManagementGroupRequest management group creation parameters. -type CreateManagementGroupRequest struct { - // ID - READ-ONLY; The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - ID *string `json:"id,omitempty"` - // Type - READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups - Type *string `json:"type,omitempty"` - // Name - The name of the management group. For example, 00000000-0000-0000-0000-000000000000 - Name *string `json:"name,omitempty"` - *CreateManagementGroupProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for CreateManagementGroupRequest. -func (cmgr CreateManagementGroupRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if cmgr.Name != nil { - objectMap["name"] = cmgr.Name - } - if cmgr.CreateManagementGroupProperties != nil { - objectMap["properties"] = cmgr.CreateManagementGroupProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for CreateManagementGroupRequest struct. -func (cmgr *CreateManagementGroupRequest) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - cmgr.ID = &ID - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - cmgr.Type = &typeVar - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - cmgr.Name = &name - } - case "properties": - if v != nil { - var createManagementGroupProperties CreateManagementGroupProperties - err = json.Unmarshal(*v, &createManagementGroupProperties) - if err != nil { - return err - } - cmgr.CreateManagementGroupProperties = &createManagementGroupProperties - } - } - } - - return nil -} - -// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type CreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(Client) (SetObject, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *CreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for CreateOrUpdateFuture.Result. -func (future *CreateOrUpdateFuture) result(client Client) (so SetObject, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.CreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - so.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("managementgroups.CreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { - so, err = client.CreateOrUpdateResponder(so.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.CreateOrUpdateFuture", "Result", so.Response.Response, "Failure responding to request") - } - } - return -} - -// CreateOrUpdateSettingsProperties the properties of the request to create or update Management Group -// settings -type CreateOrUpdateSettingsProperties struct { - // RequireAuthorizationForGroupCreation - Indicates whether RBAC access is required upon group creation under the root Management Group. If set to true, user will require Microsoft.Management/managementGroups/write action on the root Management Group scope in order to create new Groups directly under the root. This will prevent new users from creating new Management Groups, unless they are given access. - RequireAuthorizationForGroupCreation *bool `json:"requireAuthorizationForGroupCreation,omitempty"` - // DefaultManagementGroup - Settings that sets the default Management Group under which new subscriptions get added in this tenant. For example, /providers/Microsoft.Management/managementGroups/defaultGroup - DefaultManagementGroup *string `json:"defaultManagementGroup,omitempty"` -} - -// CreateOrUpdateSettingsRequest parameters for creating or updating Management Group settings -type CreateOrUpdateSettingsRequest struct { - *CreateOrUpdateSettingsProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for CreateOrUpdateSettingsRequest. -func (cousr CreateOrUpdateSettingsRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if cousr.CreateOrUpdateSettingsProperties != nil { - objectMap["properties"] = cousr.CreateOrUpdateSettingsProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for CreateOrUpdateSettingsRequest struct. -func (cousr *CreateOrUpdateSettingsRequest) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var createOrUpdateSettingsProperties CreateOrUpdateSettingsProperties - err = json.Unmarshal(*v, &createOrUpdateSettingsProperties) - if err != nil { - return err - } - cousr.CreateOrUpdateSettingsProperties = &createOrUpdateSettingsProperties - } - } - } - - return nil -} - -// CreateParentGroupInfo (Optional) The ID of the parent management group used during creation. -type CreateParentGroupInfo struct { - // ID - The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the parent management group - Name *string `json:"name,omitempty"` - // DisplayName - READ-ONLY; The friendly name of the parent management group. - DisplayName *string `json:"displayName,omitempty"` -} - -// MarshalJSON is the custom marshaler for CreateParentGroupInfo. -func (cpgi CreateParentGroupInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if cpgi.ID != nil { - objectMap["id"] = cpgi.ID - } - return json.Marshal(objectMap) -} - -// DeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type DeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(Client) (AzureAsyncOperationResults, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DeleteFuture.Result. -func (future *DeleteFuture) result(client Client) (aaor AzureAsyncOperationResults, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.DeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - aaor.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("managementgroups.DeleteFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if aaor.Response.Response, err = future.GetResult(sender); err == nil && aaor.Response.Response.StatusCode != http.StatusNoContent { - aaor, err = client.DeleteResponder(aaor.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.DeleteFuture", "Result", aaor.Response.Response, "Failure responding to request") - } - } - return -} - -// DescendantInfo the descendant. -type DescendantInfo struct { - // ID - READ-ONLY; The fully qualified ID for the descendant. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 or /subscriptions/0000000-0000-0000-0000-000000000000 - ID *string `json:"id,omitempty"` - // Type - READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups or /subscriptions - Type *string `json:"type,omitempty"` - // Name - READ-ONLY; The name of the descendant. For example, 00000000-0000-0000-0000-000000000000 - Name *string `json:"name,omitempty"` - *DescendantInfoProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for DescendantInfo. -func (di DescendantInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if di.DescendantInfoProperties != nil { - objectMap["properties"] = di.DescendantInfoProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for DescendantInfo struct. -func (di *DescendantInfo) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - di.ID = &ID - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - di.Type = &typeVar - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - di.Name = &name - } - case "properties": - if v != nil { - var descendantInfoProperties DescendantInfoProperties - err = json.Unmarshal(*v, &descendantInfoProperties) - if err != nil { - return err - } - di.DescendantInfoProperties = &descendantInfoProperties - } - } - } - - return nil -} - -// DescendantInfoProperties the generic properties of an descendant. -type DescendantInfoProperties struct { - // DisplayName - The friendly name of the management group. - DisplayName *string `json:"displayName,omitempty"` - Parent *DescendantParentGroupInfo `json:"parent,omitempty"` -} - -// DescendantListResult describes the result of the request to view descendants. -type DescendantListResult struct { - autorest.Response `json:"-"` - // Value - The list of descendants. - Value *[]DescendantInfo `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to use for getting the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for DescendantListResult. -func (dlr DescendantListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dlr.Value != nil { - objectMap["value"] = dlr.Value - } - return json.Marshal(objectMap) -} - -// DescendantListResultIterator provides access to a complete listing of DescendantInfo values. -type DescendantListResultIterator struct { - i int - page DescendantListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *DescendantListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DescendantListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *DescendantListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter DescendantListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter DescendantListResultIterator) Response() DescendantListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter DescendantListResultIterator) Value() DescendantInfo { - if !iter.page.NotDone() { - return DescendantInfo{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the DescendantListResultIterator type. -func NewDescendantListResultIterator(page DescendantListResultPage) DescendantListResultIterator { - return DescendantListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (dlr DescendantListResult) IsEmpty() bool { - return dlr.Value == nil || len(*dlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (dlr DescendantListResult) hasNextLink() bool { - return dlr.NextLink != nil && len(*dlr.NextLink) != 0 -} - -// descendantListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (dlr DescendantListResult) descendantListResultPreparer(ctx context.Context) (*http.Request, error) { - if !dlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(dlr.NextLink))) -} - -// DescendantListResultPage contains a page of DescendantInfo values. -type DescendantListResultPage struct { - fn func(context.Context, DescendantListResult) (DescendantListResult, error) - dlr DescendantListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *DescendantListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DescendantListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.dlr) - if err != nil { - return err - } - page.dlr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *DescendantListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page DescendantListResultPage) NotDone() bool { - return !page.dlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page DescendantListResultPage) Response() DescendantListResult { - return page.dlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page DescendantListResultPage) Values() []DescendantInfo { - if page.dlr.IsEmpty() { - return nil - } - return *page.dlr.Value -} - -// Creates a new instance of the DescendantListResultPage type. -func NewDescendantListResultPage(cur DescendantListResult, getNextPage func(context.Context, DescendantListResult) (DescendantListResult, error)) DescendantListResultPage { - return DescendantListResultPage{ - fn: getNextPage, - dlr: cur, - } -} - -// DescendantParentGroupInfo the ID of the parent management group. -type DescendantParentGroupInfo struct { - // ID - The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - ID *string `json:"id,omitempty"` -} - -// Details the details of a management group. -type Details struct { - // Version - The version number of the object. - Version *float64 `json:"version,omitempty"` - // UpdatedTime - The date and time when this object was last updated. - UpdatedTime *date.Time `json:"updatedTime,omitempty"` - // UpdatedBy - The identity of the principal or process that updated the object. - UpdatedBy *string `json:"updatedBy,omitempty"` - Parent *ParentGroupInfo `json:"parent,omitempty"` -} - -// EntityHierarchyItem the management group details for the hierarchy view. -type EntityHierarchyItem struct { - // ID - READ-ONLY; The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - ID *string `json:"id,omitempty"` - // Type - READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups - Type *string `json:"type,omitempty"` - // Name - READ-ONLY; The name of the management group. For example, 00000000-0000-0000-0000-000000000000 - Name *string `json:"name,omitempty"` - *EntityHierarchyItemProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for EntityHierarchyItem. -func (ehi EntityHierarchyItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ehi.EntityHierarchyItemProperties != nil { - objectMap["properties"] = ehi.EntityHierarchyItemProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for EntityHierarchyItem struct. -func (ehi *EntityHierarchyItem) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ehi.ID = &ID - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ehi.Type = &typeVar - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ehi.Name = &name - } - case "properties": - if v != nil { - var entityHierarchyItemProperties EntityHierarchyItemProperties - err = json.Unmarshal(*v, &entityHierarchyItemProperties) - if err != nil { - return err - } - ehi.EntityHierarchyItemProperties = &entityHierarchyItemProperties - } - } - } - - return nil -} - -// EntityHierarchyItemProperties the generic properties of a management group. -type EntityHierarchyItemProperties struct { - // DisplayName - The friendly name of the management group. - DisplayName *string `json:"displayName,omitempty"` - // Permissions - Possible values include: 'Permissions1Noaccess', 'Permissions1View', 'Permissions1Edit', 'Permissions1Delete' - Permissions Permissions1 `json:"permissions,omitempty"` - // Children - The list of children. - Children *[]EntityHierarchyItem `json:"children,omitempty"` -} - -// EntityInfo the entity. -type EntityInfo struct { - // ID - READ-ONLY; The fully qualified ID for the entity. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - ID *string `json:"id,omitempty"` - // Type - READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups - Type *string `json:"type,omitempty"` - // Name - READ-ONLY; The name of the entity. For example, 00000000-0000-0000-0000-000000000000 - Name *string `json:"name,omitempty"` - *EntityInfoProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for EntityInfo. -func (ei EntityInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ei.EntityInfoProperties != nil { - objectMap["properties"] = ei.EntityInfoProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for EntityInfo struct. -func (ei *EntityInfo) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ei.ID = &ID - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ei.Type = &typeVar - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ei.Name = &name - } - case "properties": - if v != nil { - var entityInfoProperties EntityInfoProperties - err = json.Unmarshal(*v, &entityInfoProperties) - if err != nil { - return err - } - ei.EntityInfoProperties = &entityInfoProperties - } - } - } - - return nil -} - -// EntityInfoProperties the generic properties of an entity. -type EntityInfoProperties struct { - // TenantID - The AAD Tenant ID associated with the entity. For example, 00000000-0000-0000-0000-000000000000 - TenantID *string `json:"tenantId,omitempty"` - // DisplayName - The friendly name of the management group. - DisplayName *string `json:"displayName,omitempty"` - Parent *EntityParentGroupInfo `json:"parent,omitempty"` - // Permissions - Possible values include: 'PermissionsNoaccess', 'PermissionsView', 'PermissionsEdit', 'PermissionsDelete' - Permissions Permissions `json:"permissions,omitempty"` - // InheritedPermissions - Possible values include: 'Noaccess', 'View', 'Edit', 'Delete' - InheritedPermissions InheritedPermissions `json:"inheritedPermissions,omitempty"` - NumberOfDescendants *int32 `json:"numberOfDescendants,omitempty"` - // NumberOfChildren - Number of children is the number of Groups and Subscriptions that are exactly one level underneath the current Group. - NumberOfChildren *int32 `json:"numberOfChildren,omitempty"` - // NumberOfChildGroups - Number of children is the number of Groups that are exactly one level underneath the current Group. - NumberOfChildGroups *int32 `json:"numberOfChildGroups,omitempty"` - // ParentDisplayNameChain - The parent display name chain from the root group to the immediate parent - ParentDisplayNameChain *[]string `json:"parentDisplayNameChain,omitempty"` - // ParentNameChain - The parent name chain from the root group to the immediate parent - ParentNameChain *[]string `json:"parentNameChain,omitempty"` -} - -// EntityListResult describes the result of the request to view entities. -type EntityListResult struct { - autorest.Response `json:"-"` - // Value - The list of entities. - Value *[]EntityInfo `json:"value,omitempty"` - // Count - READ-ONLY; Total count of records that match the filter - Count *int32 `json:"count,omitempty"` - // NextLink - READ-ONLY; The URL to use for getting the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for EntityListResult. -func (elr EntityListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if elr.Value != nil { - objectMap["value"] = elr.Value - } - return json.Marshal(objectMap) -} - -// EntityListResultIterator provides access to a complete listing of EntityInfo values. -type EntityListResultIterator struct { - i int - page EntityListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *EntityListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EntityListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *EntityListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter EntityListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter EntityListResultIterator) Response() EntityListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter EntityListResultIterator) Value() EntityInfo { - if !iter.page.NotDone() { - return EntityInfo{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the EntityListResultIterator type. -func NewEntityListResultIterator(page EntityListResultPage) EntityListResultIterator { - return EntityListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (elr EntityListResult) IsEmpty() bool { - return elr.Value == nil || len(*elr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (elr EntityListResult) hasNextLink() bool { - return elr.NextLink != nil && len(*elr.NextLink) != 0 -} - -// entityListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (elr EntityListResult) entityListResultPreparer(ctx context.Context) (*http.Request, error) { - if !elr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(elr.NextLink))) -} - -// EntityListResultPage contains a page of EntityInfo values. -type EntityListResultPage struct { - fn func(context.Context, EntityListResult) (EntityListResult, error) - elr EntityListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *EntityListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EntityListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.elr) - if err != nil { - return err - } - page.elr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *EntityListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page EntityListResultPage) NotDone() bool { - return !page.elr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page EntityListResultPage) Response() EntityListResult { - return page.elr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page EntityListResultPage) Values() []EntityInfo { - if page.elr.IsEmpty() { - return nil - } - return *page.elr.Value -} - -// Creates a new instance of the EntityListResultPage type. -func NewEntityListResultPage(cur EntityListResult, getNextPage func(context.Context, EntityListResult) (EntityListResult, error)) EntityListResultPage { - return EntityListResultPage{ - fn: getNextPage, - elr: cur, - } -} - -// EntityParentGroupInfo (Optional) The ID of the parent management group. -type EntityParentGroupInfo struct { - // ID - The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - ID *string `json:"id,omitempty"` -} - -// ErrorDetails the details of the error. -type ErrorDetails struct { - // Code - One of a server-defined set of error codes. - Code *string `json:"code,omitempty"` - // Message - A human-readable representation of the error. - Message *string `json:"message,omitempty"` - // Details - A human-readable representation of the error's details. - Details *string `json:"details,omitempty"` -} - -// ErrorResponse the error object. -type ErrorResponse struct { - Error *ErrorDetails `json:"error,omitempty"` -} - -// HierarchySettings settings defined at the Management Group scope. -type HierarchySettings struct { - autorest.Response `json:"-"` - // ID - READ-ONLY; The fully qualified ID for the settings object. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000/settings/default. - ID *string `json:"id,omitempty"` - // Type - READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups/settings. - Type *string `json:"type,omitempty"` - // Name - READ-ONLY; The name of the object. In this case, default. - Name *string `json:"name,omitempty"` - *HierarchySettingsProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for HierarchySettings. -func (hs HierarchySettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if hs.HierarchySettingsProperties != nil { - objectMap["properties"] = hs.HierarchySettingsProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for HierarchySettings struct. -func (hs *HierarchySettings) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - hs.ID = &ID - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - hs.Type = &typeVar - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - hs.Name = &name - } - case "properties": - if v != nil { - var hierarchySettingsProperties HierarchySettingsProperties - err = json.Unmarshal(*v, &hierarchySettingsProperties) - if err != nil { - return err - } - hs.HierarchySettingsProperties = &hierarchySettingsProperties - } - } - } - - return nil -} - -// HierarchySettingsInfo the hierarchy settings resource. -type HierarchySettingsInfo struct { - // ID - READ-ONLY; The fully qualified ID for the settings object. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000/settings/default. - ID *string `json:"id,omitempty"` - // Type - READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups/settings. - Type *string `json:"type,omitempty"` - // Name - READ-ONLY; The name of the object. In this case, default. - Name *string `json:"name,omitempty"` - *HierarchySettingsProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for HierarchySettingsInfo. -func (hsi HierarchySettingsInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if hsi.HierarchySettingsProperties != nil { - objectMap["properties"] = hsi.HierarchySettingsProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for HierarchySettingsInfo struct. -func (hsi *HierarchySettingsInfo) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - hsi.ID = &ID - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - hsi.Type = &typeVar - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - hsi.Name = &name - } - case "properties": - if v != nil { - var hierarchySettingsProperties HierarchySettingsProperties - err = json.Unmarshal(*v, &hierarchySettingsProperties) - if err != nil { - return err - } - hsi.HierarchySettingsProperties = &hierarchySettingsProperties - } - } - } - - return nil -} - -// HierarchySettingsList lists all hierarchy settings. -type HierarchySettingsList struct { - autorest.Response `json:"-"` - // Value - The list of hierarchy settings. - Value *[]HierarchySettingsInfo `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to use for getting the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for HierarchySettingsList. -func (hsl HierarchySettingsList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if hsl.Value != nil { - objectMap["value"] = hsl.Value - } - return json.Marshal(objectMap) -} - -// HierarchySettingsProperties the generic properties of hierarchy settings. -type HierarchySettingsProperties struct { - // TenantID - The AAD Tenant ID associated with the hierarchy settings. For example, 00000000-0000-0000-0000-000000000000 - TenantID *string `json:"tenantId,omitempty"` - // RequireAuthorizationForGroupCreation - Indicates whether RBAC access is required upon group creation under the root Management Group. If set to true, user will require Microsoft.Management/managementGroups/write action on the root Management Group scope in order to create new Groups directly under the root. This will prevent new users from creating new Management Groups, unless they are given access. - RequireAuthorizationForGroupCreation *bool `json:"requireAuthorizationForGroupCreation,omitempty"` - // DefaultManagementGroup - Settings that sets the default Management Group under which new subscriptions get added in this tenant. For example, /providers/Microsoft.Management/managementGroups/defaultGroup - DefaultManagementGroup *string `json:"defaultManagementGroup,omitempty"` -} - -// Info the management group resource. -type Info struct { - // ID - READ-ONLY; The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - ID *string `json:"id,omitempty"` - // Type - READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups - Type *string `json:"type,omitempty"` - // Name - READ-ONLY; The name of the management group. For example, 00000000-0000-0000-0000-000000000000 - Name *string `json:"name,omitempty"` - *InfoProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for Info. -func (i Info) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if i.InfoProperties != nil { - objectMap["properties"] = i.InfoProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Info struct. -func (i *Info) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - i.ID = &ID - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - i.Type = &typeVar - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - i.Name = &name - } - case "properties": - if v != nil { - var infoProperties InfoProperties - err = json.Unmarshal(*v, &infoProperties) - if err != nil { - return err - } - i.InfoProperties = &infoProperties - } - } - } - - return nil -} - -// InfoProperties the generic properties of a management group. -type InfoProperties struct { - // TenantID - The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000 - TenantID *string `json:"tenantId,omitempty"` - // DisplayName - The friendly name of the management group. - DisplayName *string `json:"displayName,omitempty"` -} - -// ListResult describes the result of the request to list management groups. -type ListResult struct { - autorest.Response `json:"-"` - // Value - The list of management groups. - Value *[]Info `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to use for getting the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for ListResult. -func (lr ListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if lr.Value != nil { - objectMap["value"] = lr.Value - } - return json.Marshal(objectMap) -} - -// ListResultIterator provides access to a complete listing of Info values. -type ListResultIterator struct { - i int - page ListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter ListResultIterator) Response() ListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ListResultIterator) Value() Info { - if !iter.page.NotDone() { - return Info{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ListResultIterator type. -func NewListResultIterator(page ListResultPage) ListResultIterator { - return ListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (lr ListResult) IsEmpty() bool { - return lr.Value == nil || len(*lr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (lr ListResult) hasNextLink() bool { - return lr.NextLink != nil && len(*lr.NextLink) != 0 -} - -// listResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (lr ListResult) listResultPreparer(ctx context.Context) (*http.Request, error) { - if !lr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lr.NextLink))) -} - -// ListResultPage contains a page of Info values. -type ListResultPage struct { - fn func(context.Context, ListResult) (ListResult, error) - lr ListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.lr) - if err != nil { - return err - } - page.lr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListResultPage) NotDone() bool { - return !page.lr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ListResultPage) Response() ListResult { - return page.lr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ListResultPage) Values() []Info { - if page.lr.IsEmpty() { - return nil - } - return *page.lr.Value -} - -// Creates a new instance of the ListResultPage type. -func NewListResultPage(cur ListResult, getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage { - return ListResultPage{ - fn: getNextPage, - lr: cur, - } -} - -// ListSubscriptionUnderManagementGroup the details of all subscriptions under management group. -type ListSubscriptionUnderManagementGroup struct { - autorest.Response `json:"-"` - // Value - The list of subscriptions. - Value *[]SubscriptionUnderManagementGroup `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to use for getting the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for ListSubscriptionUnderManagementGroup. -func (lsumg ListSubscriptionUnderManagementGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if lsumg.Value != nil { - objectMap["value"] = lsumg.Value - } - return json.Marshal(objectMap) -} - -// ListSubscriptionUnderManagementGroupIterator provides access to a complete listing of -// SubscriptionUnderManagementGroup values. -type ListSubscriptionUnderManagementGroupIterator struct { - i int - page ListSubscriptionUnderManagementGroupPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ListSubscriptionUnderManagementGroupIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListSubscriptionUnderManagementGroupIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ListSubscriptionUnderManagementGroupIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListSubscriptionUnderManagementGroupIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter ListSubscriptionUnderManagementGroupIterator) Response() ListSubscriptionUnderManagementGroup { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ListSubscriptionUnderManagementGroupIterator) Value() SubscriptionUnderManagementGroup { - if !iter.page.NotDone() { - return SubscriptionUnderManagementGroup{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ListSubscriptionUnderManagementGroupIterator type. -func NewListSubscriptionUnderManagementGroupIterator(page ListSubscriptionUnderManagementGroupPage) ListSubscriptionUnderManagementGroupIterator { - return ListSubscriptionUnderManagementGroupIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (lsumg ListSubscriptionUnderManagementGroup) IsEmpty() bool { - return lsumg.Value == nil || len(*lsumg.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (lsumg ListSubscriptionUnderManagementGroup) hasNextLink() bool { - return lsumg.NextLink != nil && len(*lsumg.NextLink) != 0 -} - -// listSubscriptionUnderManagementGroupPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (lsumg ListSubscriptionUnderManagementGroup) listSubscriptionUnderManagementGroupPreparer(ctx context.Context) (*http.Request, error) { - if !lsumg.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lsumg.NextLink))) -} - -// ListSubscriptionUnderManagementGroupPage contains a page of SubscriptionUnderManagementGroup values. -type ListSubscriptionUnderManagementGroupPage struct { - fn func(context.Context, ListSubscriptionUnderManagementGroup) (ListSubscriptionUnderManagementGroup, error) - lsumg ListSubscriptionUnderManagementGroup -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ListSubscriptionUnderManagementGroupPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListSubscriptionUnderManagementGroupPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.lsumg) - if err != nil { - return err - } - page.lsumg = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ListSubscriptionUnderManagementGroupPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListSubscriptionUnderManagementGroupPage) NotDone() bool { - return !page.lsumg.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ListSubscriptionUnderManagementGroupPage) Response() ListSubscriptionUnderManagementGroup { - return page.lsumg -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ListSubscriptionUnderManagementGroupPage) Values() []SubscriptionUnderManagementGroup { - if page.lsumg.IsEmpty() { - return nil - } - return *page.lsumg.Value -} - -// Creates a new instance of the ListSubscriptionUnderManagementGroupPage type. -func NewListSubscriptionUnderManagementGroupPage(cur ListSubscriptionUnderManagementGroup, getNextPage func(context.Context, ListSubscriptionUnderManagementGroup) (ListSubscriptionUnderManagementGroup, error)) ListSubscriptionUnderManagementGroupPage { - return ListSubscriptionUnderManagementGroupPage{ - fn: getNextPage, - lsumg: cur, - } -} - -// ManagementGroup the management group details. -type ManagementGroup struct { - autorest.Response `json:"-"` - // ID - READ-ONLY; The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - ID *string `json:"id,omitempty"` - // Type - READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups - Type *string `json:"type,omitempty"` - // Name - READ-ONLY; The name of the management group. For example, 00000000-0000-0000-0000-000000000000 - Name *string `json:"name,omitempty"` - *Properties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagementGroup. -func (mg ManagementGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mg.Properties != nil { - objectMap["properties"] = mg.Properties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ManagementGroup struct. -func (mg *ManagementGroup) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - mg.ID = &ID - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - mg.Type = &typeVar - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - mg.Name = &name - } - case "properties": - if v != nil { - var properties Properties - err = json.Unmarshal(*v, &properties) - if err != nil { - return err - } - mg.Properties = &properties - } - } - } - - return nil -} - -// Operation operation supported by the Microsoft.Management resource provider. -type Operation struct { - // Name - READ-ONLY; Operation name: {provider}/{resource}/{operation}. - Name *string `json:"name,omitempty"` - Display *OperationDisplayProperties `json:"display,omitempty"` -} - -// MarshalJSON is the custom marshaler for Operation. -func (o Operation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if o.Display != nil { - objectMap["display"] = o.Display - } - return json.Marshal(objectMap) -} - -// OperationDisplayProperties the object that represents the operation. -type OperationDisplayProperties struct { - // Provider - READ-ONLY; The name of the provider. - Provider *string `json:"provider,omitempty"` - // Resource - READ-ONLY; The resource on which the operation is performed. - Resource *string `json:"resource,omitempty"` - // Operation - READ-ONLY; The operation that can be performed. - Operation *string `json:"operation,omitempty"` - // Description - READ-ONLY; Operation description. - Description *string `json:"description,omitempty"` -} - -// MarshalJSON is the custom marshaler for OperationDisplayProperties. -func (odp OperationDisplayProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// OperationListResult describes the result of the request to list Microsoft.Management operations. -type OperationListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; List of operations supported by the Microsoft.Management resource provider. - Value *[]Operation `json:"value,omitempty"` - // NextLink - READ-ONLY; URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for OperationListResult. -func (olr OperationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// OperationListResultIterator provides access to a complete listing of Operation values. -type OperationListResultIterator struct { - i int - page OperationListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *OperationListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter OperationListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter OperationListResultIterator) Response() OperationListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter OperationListResultIterator) Value() Operation { - if !iter.page.NotDone() { - return Operation{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the OperationListResultIterator type. -func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator { - return OperationListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (olr OperationListResult) IsEmpty() bool { - return olr.Value == nil || len(*olr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (olr OperationListResult) hasNextLink() bool { - return olr.NextLink != nil && len(*olr.NextLink) != 0 -} - -// operationListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) { - if !olr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(olr.NextLink))) -} - -// OperationListResultPage contains a page of Operation values. -type OperationListResultPage struct { - fn func(context.Context, OperationListResult) (OperationListResult, error) - olr OperationListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.olr) - if err != nil { - return err - } - page.olr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *OperationListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page OperationListResultPage) NotDone() bool { - return !page.olr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page OperationListResultPage) Response() OperationListResult { - return page.olr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page OperationListResultPage) Values() []Operation { - if page.olr.IsEmpty() { - return nil - } - return *page.olr.Value -} - -// Creates a new instance of the OperationListResultPage type. -func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { - return OperationListResultPage{ - fn: getNextPage, - olr: cur, - } -} - -// OperationResults the results of an asynchronous operation. -type OperationResults struct { - // ID - READ-ONLY; The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - ID *string `json:"id,omitempty"` - // Type - READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups - Type *string `json:"type,omitempty"` - // Name - READ-ONLY; The name of the management group. For example, 00000000-0000-0000-0000-000000000000 - Name *string `json:"name,omitempty"` - *InfoProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for OperationResults. -func (or OperationResults) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if or.InfoProperties != nil { - objectMap["properties"] = or.InfoProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for OperationResults struct. -func (or *OperationResults) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - or.ID = &ID - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - or.Type = &typeVar - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - or.Name = &name - } - case "properties": - if v != nil { - var infoProperties InfoProperties - err = json.Unmarshal(*v, &infoProperties) - if err != nil { - return err - } - or.InfoProperties = &infoProperties - } - } - } - - return nil -} - -// ParentGroupInfo (Optional) The ID of the parent management group. -type ParentGroupInfo struct { - // ID - The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - ID *string `json:"id,omitempty"` - // Name - The name of the parent management group - Name *string `json:"name,omitempty"` - // DisplayName - The friendly name of the parent management group. - DisplayName *string `json:"displayName,omitempty"` -} - -// PatchManagementGroupRequest management group patch parameters. -type PatchManagementGroupRequest struct { - // DisplayName - The friendly name of the management group. - DisplayName *string `json:"displayName,omitempty"` - // ParentGroupID - (Optional) The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - ParentGroupID *string `json:"parentGroupId,omitempty"` -} - -// PathElement a path element of a management group ancestors. -type PathElement struct { - // Name - The name of the group. - Name *string `json:"name,omitempty"` - // DisplayName - The friendly name of the group. - DisplayName *string `json:"displayName,omitempty"` -} - -// Properties the generic properties of a management group. -type Properties struct { - // TenantID - The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000 - TenantID *string `json:"tenantId,omitempty"` - // DisplayName - The friendly name of the management group. - DisplayName *string `json:"displayName,omitempty"` - Details *Details `json:"details,omitempty"` - // Children - The list of children. - Children *[]ChildInfo `json:"children,omitempty"` - // Path - The path from the root to the current group. - Path *[]PathElement `json:"path,omitempty"` -} - -// SetObject ... -type SetObject struct { - autorest.Response `json:"-"` - Value interface{} `json:"value,omitempty"` -} - -// SubscriptionUnderManagementGroup the details of subscription under management group. -type SubscriptionUnderManagementGroup struct { - autorest.Response `json:"-"` - // ID - READ-ONLY; The fully qualified ID for the subscription. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000/subscriptions/0000000-0000-0000-0000-000000000001 - ID *string `json:"id,omitempty"` - // Type - READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups/subscriptions - Type *string `json:"type,omitempty"` - // Name - READ-ONLY; The stringified id of the subscription. For example, 00000000-0000-0000-0000-000000000000 - Name *string `json:"name,omitempty"` - *SubscriptionUnderManagementGroupProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for SubscriptionUnderManagementGroup. -func (sumg SubscriptionUnderManagementGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sumg.SubscriptionUnderManagementGroupProperties != nil { - objectMap["properties"] = sumg.SubscriptionUnderManagementGroupProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for SubscriptionUnderManagementGroup struct. -func (sumg *SubscriptionUnderManagementGroup) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - sumg.ID = &ID - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - sumg.Type = &typeVar - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - sumg.Name = &name - } - case "properties": - if v != nil { - var subscriptionUnderManagementGroupProperties SubscriptionUnderManagementGroupProperties - err = json.Unmarshal(*v, &subscriptionUnderManagementGroupProperties) - if err != nil { - return err - } - sumg.SubscriptionUnderManagementGroupProperties = &subscriptionUnderManagementGroupProperties - } - } - } - - return nil -} - -// SubscriptionUnderManagementGroupProperties the generic properties of subscription under a management -// group. -type SubscriptionUnderManagementGroupProperties struct { - // Tenant - The AAD Tenant ID associated with the subscription. For example, 00000000-0000-0000-0000-000000000000 - Tenant *string `json:"tenant,omitempty"` - // DisplayName - The friendly name of the subscription. - DisplayName *string `json:"displayName,omitempty"` - Parent *DescendantParentGroupInfo `json:"parent,omitempty"` - // State - The state of the subscription. - State *string `json:"state,omitempty"` -} - -// TenantBackfillStatusResult the tenant backfill status -type TenantBackfillStatusResult struct { - autorest.Response `json:"-"` - // TenantID - READ-ONLY; The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000 - TenantID *string `json:"tenantId,omitempty"` - // Status - READ-ONLY; The status of the Tenant Backfill. Possible values include: 'NotStarted', 'NotStartedButGroupsExist', 'Started', 'Failed', 'Cancelled', 'Completed' - Status Status `json:"status,omitempty"` -} - -// MarshalJSON is the custom marshaler for TenantBackfillStatusResult. -func (tbsr TenantBackfillStatusResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/operations.go deleted file mode 100644 index f22f614a6f585..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/operations.go +++ /dev/null @@ -1,142 +0,0 @@ -package managementgroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// OperationsClient is the the Azure Management Groups API enables consolidation of multiple -// subscriptions/resources into an organizational hierarchy and centrally -// manage access control, policies, alerting and reporting for those resources. -type OperationsClient struct { - BaseClient -} - -// NewOperationsClient creates an instance of the OperationsClient client. -func NewOperationsClient() OperationsClient { - return NewOperationsClientWithBaseURI(DefaultBaseURI) -} - -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewOperationsClientWithBaseURI(baseURI string) OperationsClient { - return OperationsClient{NewWithBaseURI(baseURI)} -} - -// List lists all of the available Management REST API operations. -func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") - defer func() { - sc := -1 - if result.olr.Response.Response != nil { - sc = result.olr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.OperationsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.olr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "managementgroups.OperationsClient", "List", resp, "Failure sending request") - return - } - - result.olr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.OperationsClient", "List", resp, "Failure responding to request") - return - } - if result.olr.hasNextLink() && result.olr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2020-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPath("/providers/Microsoft.Management/operations"), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) { - req, err := lastResults.operationListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "managementgroups.OperationsClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "managementgroups.OperationsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.OperationsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/subscriptions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/subscriptions.go deleted file mode 100644 index b42be93c3b5e2..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/subscriptions.go +++ /dev/null @@ -1,403 +0,0 @@ -package managementgroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// SubscriptionsClient is the the Azure Management Groups API enables consolidation of multiple -// subscriptions/resources into an organizational hierarchy and centrally -// manage access control, policies, alerting and reporting for those resources. -type SubscriptionsClient struct { - BaseClient -} - -// NewSubscriptionsClient creates an instance of the SubscriptionsClient client. -func NewSubscriptionsClient() SubscriptionsClient { - return NewSubscriptionsClientWithBaseURI(DefaultBaseURI) -} - -// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client using a custom endpoint. -// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewSubscriptionsClientWithBaseURI(baseURI string) SubscriptionsClient { - return SubscriptionsClient{NewWithBaseURI(baseURI)} -} - -// Create associates existing subscription with the management group. -// Parameters: -// groupID - management Group ID. -// subscriptionID - subscription ID. -// cacheControl - indicates that the request shouldn't utilize any caches. -func (client SubscriptionsClient) Create(ctx context.Context, groupID string, subscriptionID string, cacheControl string) (result SubscriptionUnderManagementGroup, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionsClient.Create") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreatePreparer(ctx, groupID, subscriptionID, cacheControl) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "Create", nil, "Failure preparing request") - return - } - - resp, err := client.CreateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "Create", resp, "Failure sending request") - return - } - - result, err = client.CreateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "Create", resp, "Failure responding to request") - return - } - - return -} - -// CreatePreparer prepares the Create request. -func (client SubscriptionsClient) CreatePreparer(ctx context.Context, groupID string, subscriptionID string, cacheControl string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "groupId": autorest.Encode("path", groupID), - "subscriptionId": autorest.Encode("path", subscriptionID), - } - - const APIVersion = "2020-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if len(cacheControl) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("Cache-Control", autorest.String(cacheControl))) - } else { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("Cache-Control", autorest.String("no-cache"))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateSender sends the Create request. The method will close the -// http.Response Body if it receives an error. -func (client SubscriptionsClient) CreateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateResponder handles the response to the Create request. The method always -// closes the http.Response Body. -func (client SubscriptionsClient) CreateResponder(resp *http.Response) (result SubscriptionUnderManagementGroup, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete de-associates subscription from the management group. -// Parameters: -// groupID - management Group ID. -// subscriptionID - subscription ID. -// cacheControl - indicates that the request shouldn't utilize any caches. -func (client SubscriptionsClient) Delete(ctx context.Context, groupID string, subscriptionID string, cacheControl string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, groupID, subscriptionID, cacheControl) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client SubscriptionsClient) DeletePreparer(ctx context.Context, groupID string, subscriptionID string, cacheControl string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "groupId": autorest.Encode("path", groupID), - "subscriptionId": autorest.Encode("path", subscriptionID), - } - - const APIVersion = "2020-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if len(cacheControl) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("Cache-Control", autorest.String(cacheControl))) - } else { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("Cache-Control", autorest.String("no-cache"))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client SubscriptionsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client SubscriptionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// GetSubscription retrieves details about given subscription which is associated with the management group. -// Parameters: -// groupID - management Group ID. -// subscriptionID - subscription ID. -// cacheControl - indicates that the request shouldn't utilize any caches. -func (client SubscriptionsClient) GetSubscription(ctx context.Context, groupID string, subscriptionID string, cacheControl string) (result SubscriptionUnderManagementGroup, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionsClient.GetSubscription") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetSubscriptionPreparer(ctx, groupID, subscriptionID, cacheControl) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "GetSubscription", nil, "Failure preparing request") - return - } - - resp, err := client.GetSubscriptionSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "GetSubscription", resp, "Failure sending request") - return - } - - result, err = client.GetSubscriptionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "GetSubscription", resp, "Failure responding to request") - return - } - - return -} - -// GetSubscriptionPreparer prepares the GetSubscription request. -func (client SubscriptionsClient) GetSubscriptionPreparer(ctx context.Context, groupID string, subscriptionID string, cacheControl string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "groupId": autorest.Encode("path", groupID), - "subscriptionId": autorest.Encode("path", subscriptionID), - } - - const APIVersion = "2020-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if len(cacheControl) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("Cache-Control", autorest.String(cacheControl))) - } else { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("Cache-Control", autorest.String("no-cache"))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSubscriptionSender sends the GetSubscription request. The method will close the -// http.Response Body if it receives an error. -func (client SubscriptionsClient) GetSubscriptionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetSubscriptionResponder handles the response to the GetSubscription request. The method always -// closes the http.Response Body. -func (client SubscriptionsClient) GetSubscriptionResponder(resp *http.Response) (result SubscriptionUnderManagementGroup, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetSubscriptionsUnderManagementGroup retrieves details about all subscriptions which are associated with the -// management group. -// Parameters: -// groupID - management Group ID. -// skiptoken - page continuation token is only used if a previous operation returned a partial result. -// If a previous response contains a nextLink element, the value of the nextLink element will include a token -// parameter that specifies a starting point to use for subsequent calls. -func (client SubscriptionsClient) GetSubscriptionsUnderManagementGroup(ctx context.Context, groupID string, skiptoken string) (result ListSubscriptionUnderManagementGroupPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionsClient.GetSubscriptionsUnderManagementGroup") - defer func() { - sc := -1 - if result.lsumg.Response.Response != nil { - sc = result.lsumg.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.getSubscriptionsUnderManagementGroupNextResults - req, err := client.GetSubscriptionsUnderManagementGroupPreparer(ctx, groupID, skiptoken) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "GetSubscriptionsUnderManagementGroup", nil, "Failure preparing request") - return - } - - resp, err := client.GetSubscriptionsUnderManagementGroupSender(req) - if err != nil { - result.lsumg.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "GetSubscriptionsUnderManagementGroup", resp, "Failure sending request") - return - } - - result.lsumg, err = client.GetSubscriptionsUnderManagementGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "GetSubscriptionsUnderManagementGroup", resp, "Failure responding to request") - return - } - if result.lsumg.hasNextLink() && result.lsumg.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// GetSubscriptionsUnderManagementGroupPreparer prepares the GetSubscriptionsUnderManagementGroup request. -func (client SubscriptionsClient) GetSubscriptionsUnderManagementGroupPreparer(ctx context.Context, groupID string, skiptoken string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "groupId": autorest.Encode("path", groupID), - } - - const APIVersion = "2020-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(skiptoken) > 0 { - queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSubscriptionsUnderManagementGroupSender sends the GetSubscriptionsUnderManagementGroup request. The method will close the -// http.Response Body if it receives an error. -func (client SubscriptionsClient) GetSubscriptionsUnderManagementGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetSubscriptionsUnderManagementGroupResponder handles the response to the GetSubscriptionsUnderManagementGroup request. The method always -// closes the http.Response Body. -func (client SubscriptionsClient) GetSubscriptionsUnderManagementGroupResponder(resp *http.Response) (result ListSubscriptionUnderManagementGroup, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// getSubscriptionsUnderManagementGroupNextResults retrieves the next set of results, if any. -func (client SubscriptionsClient) getSubscriptionsUnderManagementGroupNextResults(ctx context.Context, lastResults ListSubscriptionUnderManagementGroup) (result ListSubscriptionUnderManagementGroup, err error) { - req, err := lastResults.listSubscriptionUnderManagementGroupPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "getSubscriptionsUnderManagementGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.GetSubscriptionsUnderManagementGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "getSubscriptionsUnderManagementGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.GetSubscriptionsUnderManagementGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "getSubscriptionsUnderManagementGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// GetSubscriptionsUnderManagementGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client SubscriptionsClient) GetSubscriptionsUnderManagementGroupComplete(ctx context.Context, groupID string, skiptoken string) (result ListSubscriptionUnderManagementGroupIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionsClient.GetSubscriptionsUnderManagementGroup") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.GetSubscriptionsUnderManagementGroup(ctx, groupID, skiptoken) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/version.go deleted file mode 100644 index 568ae67b03c93..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups/version.go +++ /dev/null @@ -1,19 +0,0 @@ -package managementgroups - -import "github.com/Azure/azure-sdk-for-go/version" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// UserAgent returns the UserAgent string to use when sending http.Requests. -func UserAgent() string { - return "Azure-SDK-For-Go/" + Version() + " managementgroups/2020-05-01" -} - -// Version returns the semantic version (see http://semver.org) of the client. -func Version() string { - return version.Number -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/README.md new file mode 100644 index 0000000000000..e2fad2494c156 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/README.md @@ -0,0 +1,91 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions` Documentation + +The `suppressions` SDK allows for interaction with the Azure Resource Manager Service `advisor` (API Version `2023-01-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions" +``` + + +### Client Initialization + +```go +client := suppressions.NewSuppressionsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `SuppressionsClient.Create` + +```go +ctx := context.TODO() +id := suppressions.NewScopedSuppressionID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "recommendationIdValue", "suppressionValue") + +payload := suppressions.SuppressionContract{ + // ... +} + + +read, err := client.Create(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `SuppressionsClient.Delete` + +```go +ctx := context.TODO() +id := suppressions.NewScopedSuppressionID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "recommendationIdValue", "suppressionValue") + +read, err := client.Delete(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `SuppressionsClient.Get` + +```go +ctx := context.TODO() +id := suppressions.NewScopedSuppressionID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "recommendationIdValue", "suppressionValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `SuppressionsClient.List` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.List(ctx, id, suppressions.DefaultListOperationOptions())` can be used to do batched pagination +items, err := client.ListComplete(ctx, id, suppressions.DefaultListOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/client.go new file mode 100644 index 0000000000000..61c5460e23c98 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/client.go @@ -0,0 +1,26 @@ +package suppressions + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SuppressionsClient struct { + Client *resourcemanager.Client +} + +func NewSuppressionsClientWithBaseURI(sdkApi sdkEnv.Api) (*SuppressionsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "suppressions", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating SuppressionsClient: %+v", err) + } + + return &SuppressionsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/id_scopedsuppression.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/id_scopedsuppression.go new file mode 100644 index 0000000000000..5c91856b85f0c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/id_scopedsuppression.go @@ -0,0 +1,129 @@ +package suppressions + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&ScopedSuppressionId{}) +} + +var _ resourceids.ResourceId = &ScopedSuppressionId{} + +// ScopedSuppressionId is a struct representing the Resource ID for a Scoped Suppression +type ScopedSuppressionId struct { + ResourceUri string + RecommendationId string + SuppressionName string +} + +// NewScopedSuppressionID returns a new ScopedSuppressionId struct +func NewScopedSuppressionID(resourceUri string, recommendationId string, suppressionName string) ScopedSuppressionId { + return ScopedSuppressionId{ + ResourceUri: resourceUri, + RecommendationId: recommendationId, + SuppressionName: suppressionName, + } +} + +// ParseScopedSuppressionID parses 'input' into a ScopedSuppressionId +func ParseScopedSuppressionID(input string) (*ScopedSuppressionId, error) { + parser := resourceids.NewParserFromResourceIdType(&ScopedSuppressionId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ScopedSuppressionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseScopedSuppressionIDInsensitively parses 'input' case-insensitively into a ScopedSuppressionId +// note: this method should only be used for API response data and not user input +func ParseScopedSuppressionIDInsensitively(input string) (*ScopedSuppressionId, error) { + parser := resourceids.NewParserFromResourceIdType(&ScopedSuppressionId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ScopedSuppressionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ScopedSuppressionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.ResourceUri, ok = input.Parsed["resourceUri"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceUri", input) + } + + if id.RecommendationId, ok = input.Parsed["recommendationId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "recommendationId", input) + } + + if id.SuppressionName, ok = input.Parsed["suppressionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "suppressionName", input) + } + + return nil +} + +// ValidateScopedSuppressionID checks that 'input' can be parsed as a Scoped Suppression ID +func ValidateScopedSuppressionID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseScopedSuppressionID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Scoped Suppression ID +func (id ScopedSuppressionId) ID() string { + fmtString := "/%s/providers/Microsoft.Advisor/recommendations/%s/suppressions/%s" + return fmt.Sprintf(fmtString, strings.TrimPrefix(id.ResourceUri, "/"), id.RecommendationId, id.SuppressionName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Scoped Suppression ID +func (id ScopedSuppressionId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.ScopeSegment("resourceUri", "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftAdvisor", "Microsoft.Advisor", "Microsoft.Advisor"), + resourceids.StaticSegment("staticRecommendations", "recommendations", "recommendations"), + resourceids.UserSpecifiedSegment("recommendationId", "recommendationIdValue"), + resourceids.StaticSegment("staticSuppressions", "suppressions", "suppressions"), + resourceids.UserSpecifiedSegment("suppressionName", "suppressionValue"), + } +} + +// String returns a human-readable description of this Scoped Suppression ID +func (id ScopedSuppressionId) String() string { + components := []string{ + fmt.Sprintf("Resource Uri: %q", id.ResourceUri), + fmt.Sprintf("Recommendation: %q", id.RecommendationId), + fmt.Sprintf("Suppression Name: %q", id.SuppressionName), + } + return fmt.Sprintf("Scoped Suppression (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/method_create.go new file mode 100644 index 0000000000000..29c5ccab0a34f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/method_create.go @@ -0,0 +1,58 @@ +package suppressions + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *SuppressionContract +} + +// Create ... +func (c SuppressionsClient) Create(ctx context.Context, id ScopedSuppressionId, input SuppressionContract) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model SuppressionContract + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/method_delete.go new file mode 100644 index 0000000000000..2b8f8994350c8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/method_delete.go @@ -0,0 +1,46 @@ +package suppressions + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c SuppressionsClient) Delete(ctx context.Context, id ScopedSuppressionId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusNoContent, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/method_get.go new file mode 100644 index 0000000000000..183b07ea15a4c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/method_get.go @@ -0,0 +1,54 @@ +package suppressions + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *SuppressionContract +} + +// Get ... +func (c SuppressionsClient) Get(ctx context.Context, id ScopedSuppressionId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model SuppressionContract + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/method_list.go new file mode 100644 index 0000000000000..91e057e4ba86b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/method_list.go @@ -0,0 +1,134 @@ +package suppressions + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]SuppressionContract +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []SuppressionContract +} + +type ListOperationOptions struct { + Top *int64 +} + +func DefaultListOperationOptions() ListOperationOptions { + return ListOperationOptions{} +} + +func (o ListOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o ListOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o ListOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.Top != nil { + out.Append("$top", fmt.Sprintf("%v", *o.Top)) + } + return &out +} + +type ListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// List ... +func (c SuppressionsClient) List(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Pager: &ListCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.Advisor/suppressions", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]SuppressionContract `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c SuppressionsClient) ListComplete(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, options, SuppressionContractOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c SuppressionsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions, predicate SuppressionContractOperationPredicate) (result ListCompleteResult, err error) { + items := make([]SuppressionContract, 0) + + resp, err := c.List(ctx, id, options) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/model_suppressioncontract.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/model_suppressioncontract.go new file mode 100644 index 0000000000000..3941e882d355d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/model_suppressioncontract.go @@ -0,0 +1,16 @@ +package suppressions + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SuppressionContract struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *SuppressionProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/model_suppressionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/model_suppressionproperties.go new file mode 100644 index 0000000000000..f7bebedb50450 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/model_suppressionproperties.go @@ -0,0 +1,28 @@ +package suppressions + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SuppressionProperties struct { + ExpirationTimeStamp *string `json:"expirationTimeStamp,omitempty"` + SuppressionId *string `json:"suppressionId,omitempty"` + Ttl *string `json:"ttl,omitempty"` +} + +func (o *SuppressionProperties) GetExpirationTimeStampAsTime() (*time.Time, error) { + if o.ExpirationTimeStamp == nil { + return nil, nil + } + return dates.ParseAsFormat(o.ExpirationTimeStamp, "2006-01-02T15:04:05Z07:00") +} + +func (o *SuppressionProperties) SetExpirationTimeStampAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.ExpirationTimeStamp = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/predicates.go new file mode 100644 index 0000000000000..4e0826acb8d22 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/predicates.go @@ -0,0 +1,27 @@ +package suppressions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SuppressionContractOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p SuppressionContractOperationPredicate) Matches(input SuppressionContract) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/version.go new file mode 100644 index 0000000000000..9a185f5807ad8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions/version.go @@ -0,0 +1,12 @@ +package suppressions + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-01-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/suppressions/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/README.md deleted file mode 100644 index 4bee17bec4648..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/README.md +++ /dev/null @@ -1,129 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules` Documentation - -The `actionrules` SDK allows for interaction with the Azure Resource Manager Service `alertsmanagement` (API Version `2019-05-05-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules" -``` - - -### Client Initialization - -```go -client := actionrules.NewActionRulesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ActionRulesClient.CreateUpdate` - -```go -ctx := context.TODO() -id := actionrules.NewActionRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "actionRuleValue") - -payload := actionrules.ActionRule{ - // ... -} - - -read, err := client.CreateUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ActionRulesClient.Delete` - -```go -ctx := context.TODO() -id := actionrules.NewActionRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "actionRuleValue") - -read, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ActionRulesClient.GetByName` - -```go -ctx := context.TODO() -id := actionrules.NewActionRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "actionRuleValue") - -read, err := client.GetByName(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ActionRulesClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id, actionrules.DefaultListByResourceGroupOperationOptions())` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id, actionrules.DefaultListByResourceGroupOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ActionRulesClient.ListBySubscription` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListBySubscription(ctx, id, actionrules.DefaultListBySubscriptionOperationOptions())` can be used to do batched pagination -items, err := client.ListBySubscriptionComplete(ctx, id, actionrules.DefaultListBySubscriptionOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ActionRulesClient.Update` - -```go -ctx := context.TODO() -id := actionrules.NewActionRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "actionRuleValue") - -payload := actionrules.PatchObject{ - // ... -} - - -read, err := client.Update(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/client.go deleted file mode 100644 index 38b4086951c79..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package actionrules - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ActionRulesClient struct { - Client *resourcemanager.Client -} - -func NewActionRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*ActionRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "actionrules", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ActionRulesClient: %+v", err) - } - - return &ActionRulesClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/constants.go deleted file mode 100644 index c8197aa3b0f4f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/constants.go +++ /dev/null @@ -1,363 +0,0 @@ -package actionrules - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ActionRuleStatus string - -const ( - ActionRuleStatusDisabled ActionRuleStatus = "Disabled" - ActionRuleStatusEnabled ActionRuleStatus = "Enabled" -) - -func PossibleValuesForActionRuleStatus() []string { - return []string{ - string(ActionRuleStatusDisabled), - string(ActionRuleStatusEnabled), - } -} - -func (s *ActionRuleStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseActionRuleStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseActionRuleStatus(input string) (*ActionRuleStatus, error) { - vals := map[string]ActionRuleStatus{ - "disabled": ActionRuleStatusDisabled, - "enabled": ActionRuleStatusEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ActionRuleStatus(input) - return &out, nil -} - -type ActionRuleType string - -const ( - ActionRuleTypeActionGroup ActionRuleType = "ActionGroup" - ActionRuleTypeDiagnostics ActionRuleType = "Diagnostics" - ActionRuleTypeSuppression ActionRuleType = "Suppression" -) - -func PossibleValuesForActionRuleType() []string { - return []string{ - string(ActionRuleTypeActionGroup), - string(ActionRuleTypeDiagnostics), - string(ActionRuleTypeSuppression), - } -} - -func (s *ActionRuleType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseActionRuleType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseActionRuleType(input string) (*ActionRuleType, error) { - vals := map[string]ActionRuleType{ - "actiongroup": ActionRuleTypeActionGroup, - "diagnostics": ActionRuleTypeDiagnostics, - "suppression": ActionRuleTypeSuppression, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ActionRuleType(input) - return &out, nil -} - -type MonitorService string - -const ( - MonitorServiceActivityLogAdministrative MonitorService = "ActivityLog Administrative" - MonitorServiceActivityLogAutoscale MonitorService = "ActivityLog Autoscale" - MonitorServiceActivityLogPolicy MonitorService = "ActivityLog Policy" - MonitorServiceActivityLogRecommendation MonitorService = "ActivityLog Recommendation" - MonitorServiceActivityLogSecurity MonitorService = "ActivityLog Security" - MonitorServiceApplicationInsights MonitorService = "Application Insights" - MonitorServiceLogAnalytics MonitorService = "Log Analytics" - MonitorServiceNagios MonitorService = "Nagios" - MonitorServicePlatform MonitorService = "Platform" - MonitorServiceSCOM MonitorService = "SCOM" - MonitorServiceServiceHealth MonitorService = "ServiceHealth" - MonitorServiceSmartDetector MonitorService = "SmartDetector" - MonitorServiceVMInsights MonitorService = "VM Insights" - MonitorServiceZabbix MonitorService = "Zabbix" -) - -func PossibleValuesForMonitorService() []string { - return []string{ - string(MonitorServiceActivityLogAdministrative), - string(MonitorServiceActivityLogAutoscale), - string(MonitorServiceActivityLogPolicy), - string(MonitorServiceActivityLogRecommendation), - string(MonitorServiceActivityLogSecurity), - string(MonitorServiceApplicationInsights), - string(MonitorServiceLogAnalytics), - string(MonitorServiceNagios), - string(MonitorServicePlatform), - string(MonitorServiceSCOM), - string(MonitorServiceServiceHealth), - string(MonitorServiceSmartDetector), - string(MonitorServiceVMInsights), - string(MonitorServiceZabbix), - } -} - -func (s *MonitorService) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMonitorService(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMonitorService(input string) (*MonitorService, error) { - vals := map[string]MonitorService{ - "activitylog administrative": MonitorServiceActivityLogAdministrative, - "activitylog autoscale": MonitorServiceActivityLogAutoscale, - "activitylog policy": MonitorServiceActivityLogPolicy, - "activitylog recommendation": MonitorServiceActivityLogRecommendation, - "activitylog security": MonitorServiceActivityLogSecurity, - "application insights": MonitorServiceApplicationInsights, - "log analytics": MonitorServiceLogAnalytics, - "nagios": MonitorServiceNagios, - "platform": MonitorServicePlatform, - "scom": MonitorServiceSCOM, - "servicehealth": MonitorServiceServiceHealth, - "smartdetector": MonitorServiceSmartDetector, - "vm insights": MonitorServiceVMInsights, - "zabbix": MonitorServiceZabbix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MonitorService(input) - return &out, nil -} - -type Operator string - -const ( - OperatorContains Operator = "Contains" - OperatorDoesNotContain Operator = "DoesNotContain" - OperatorEquals Operator = "Equals" - OperatorNotEquals Operator = "NotEquals" -) - -func PossibleValuesForOperator() []string { - return []string{ - string(OperatorContains), - string(OperatorDoesNotContain), - string(OperatorEquals), - string(OperatorNotEquals), - } -} - -func (s *Operator) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOperator(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOperator(input string) (*Operator, error) { - vals := map[string]Operator{ - "contains": OperatorContains, - "doesnotcontain": OperatorDoesNotContain, - "equals": OperatorEquals, - "notequals": OperatorNotEquals, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Operator(input) - return &out, nil -} - -type ScopeType string - -const ( - ScopeTypeResource ScopeType = "Resource" - ScopeTypeResourceGroup ScopeType = "ResourceGroup" - ScopeTypeSubscription ScopeType = "Subscription" -) - -func PossibleValuesForScopeType() []string { - return []string{ - string(ScopeTypeResource), - string(ScopeTypeResourceGroup), - string(ScopeTypeSubscription), - } -} - -func (s *ScopeType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseScopeType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseScopeType(input string) (*ScopeType, error) { - vals := map[string]ScopeType{ - "resource": ScopeTypeResource, - "resourcegroup": ScopeTypeResourceGroup, - "subscription": ScopeTypeSubscription, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ScopeType(input) - return &out, nil -} - -type Severity string - -const ( - SeveritySevFour Severity = "Sev4" - SeveritySevOne Severity = "Sev1" - SeveritySevThree Severity = "Sev3" - SeveritySevTwo Severity = "Sev2" - SeveritySevZero Severity = "Sev0" -) - -func PossibleValuesForSeverity() []string { - return []string{ - string(SeveritySevFour), - string(SeveritySevOne), - string(SeveritySevThree), - string(SeveritySevTwo), - string(SeveritySevZero), - } -} - -func (s *Severity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSeverity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSeverity(input string) (*Severity, error) { - vals := map[string]Severity{ - "sev4": SeveritySevFour, - "sev1": SeveritySevOne, - "sev3": SeveritySevThree, - "sev2": SeveritySevTwo, - "sev0": SeveritySevZero, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Severity(input) - return &out, nil -} - -type SuppressionType string - -const ( - SuppressionTypeAlways SuppressionType = "Always" - SuppressionTypeDaily SuppressionType = "Daily" - SuppressionTypeMonthly SuppressionType = "Monthly" - SuppressionTypeOnce SuppressionType = "Once" - SuppressionTypeWeekly SuppressionType = "Weekly" -) - -func PossibleValuesForSuppressionType() []string { - return []string{ - string(SuppressionTypeAlways), - string(SuppressionTypeDaily), - string(SuppressionTypeMonthly), - string(SuppressionTypeOnce), - string(SuppressionTypeWeekly), - } -} - -func (s *SuppressionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSuppressionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSuppressionType(input string) (*SuppressionType, error) { - vals := map[string]SuppressionType{ - "always": SuppressionTypeAlways, - "daily": SuppressionTypeDaily, - "monthly": SuppressionTypeMonthly, - "once": SuppressionTypeOnce, - "weekly": SuppressionTypeWeekly, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SuppressionType(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/id_actionrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/id_actionrule.go deleted file mode 100644 index f44516772e7a4..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/id_actionrule.go +++ /dev/null @@ -1,130 +0,0 @@ -package actionrules - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&ActionRuleId{}) -} - -var _ resourceids.ResourceId = &ActionRuleId{} - -// ActionRuleId is a struct representing the Resource ID for a Action Rule -type ActionRuleId struct { - SubscriptionId string - ResourceGroupName string - ActionRuleName string -} - -// NewActionRuleID returns a new ActionRuleId struct -func NewActionRuleID(subscriptionId string, resourceGroupName string, actionRuleName string) ActionRuleId { - return ActionRuleId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ActionRuleName: actionRuleName, - } -} - -// ParseActionRuleID parses 'input' into a ActionRuleId -func ParseActionRuleID(input string) (*ActionRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(&ActionRuleId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ActionRuleId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseActionRuleIDInsensitively parses 'input' case-insensitively into a ActionRuleId -// note: this method should only be used for API response data and not user input -func ParseActionRuleIDInsensitively(input string) (*ActionRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(&ActionRuleId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ActionRuleId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *ActionRuleId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.ActionRuleName, ok = input.Parsed["actionRuleName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "actionRuleName", input) - } - - return nil -} - -// ValidateActionRuleID checks that 'input' can be parsed as a Action Rule ID -func ValidateActionRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseActionRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Action Rule ID -func (id ActionRuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.AlertsManagement/actionRules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ActionRuleName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Action Rule ID -func (id ActionRuleId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftAlertsManagement", "Microsoft.AlertsManagement", "Microsoft.AlertsManagement"), - resourceids.StaticSegment("staticActionRules", "actionRules", "actionRules"), - resourceids.UserSpecifiedSegment("actionRuleName", "actionRuleValue"), - } -} - -// String returns a human-readable description of this Action Rule ID -func (id ActionRuleId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Action Rule Name: %q", id.ActionRuleName), - } - return fmt.Sprintf("Action Rule (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_createupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_createupdate.go deleted file mode 100644 index 3acee22728100..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_createupdate.go +++ /dev/null @@ -1,58 +0,0 @@ -package actionrules - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ActionRule -} - -// CreateUpdate ... -func (c ActionRulesClient) CreateUpdate(ctx context.Context, id ActionRuleId, input ActionRule) (result CreateUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ActionRule - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_delete.go deleted file mode 100644 index 0eeb37bc39538..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_delete.go +++ /dev/null @@ -1,54 +0,0 @@ -package actionrules - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *bool -} - -// Delete ... -func (c ActionRulesClient) Delete(ctx context.Context, id ActionRuleId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model bool - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_getbyname.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_getbyname.go deleted file mode 100644 index 815cafe084a76..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_getbyname.go +++ /dev/null @@ -1,54 +0,0 @@ -package actionrules - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetByNameOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ActionRule -} - -// GetByName ... -func (c ActionRulesClient) GetByName(ctx context.Context, id ActionRuleId) (result GetByNameOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ActionRule - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_listbyresourcegroup.go deleted file mode 100644 index b37cd3247f15a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_listbyresourcegroup.go +++ /dev/null @@ -1,170 +0,0 @@ -package actionrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ActionRule -} - -type ListByResourceGroupCompleteResult struct { - LatestHttpResponse *http.Response - Items []ActionRule -} - -type ListByResourceGroupOperationOptions struct { - ActionGroup *string - AlertRuleId *string - Description *string - ImpactedScope *string - MonitorService *MonitorService - Name *string - Severity *Severity - TargetResource *string - TargetResourceGroup *string - TargetResourceType *string -} - -func DefaultListByResourceGroupOperationOptions() ListByResourceGroupOperationOptions { - return ListByResourceGroupOperationOptions{} -} - -func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ListByResourceGroupOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.ActionGroup != nil { - out.Append("actionGroup", fmt.Sprintf("%v", *o.ActionGroup)) - } - if o.AlertRuleId != nil { - out.Append("alertRuleId", fmt.Sprintf("%v", *o.AlertRuleId)) - } - if o.Description != nil { - out.Append("description", fmt.Sprintf("%v", *o.Description)) - } - if o.ImpactedScope != nil { - out.Append("impactedScope", fmt.Sprintf("%v", *o.ImpactedScope)) - } - if o.MonitorService != nil { - out.Append("monitorService", fmt.Sprintf("%v", *o.MonitorService)) - } - if o.Name != nil { - out.Append("name", fmt.Sprintf("%v", *o.Name)) - } - if o.Severity != nil { - out.Append("severity", fmt.Sprintf("%v", *o.Severity)) - } - if o.TargetResource != nil { - out.Append("targetResource", fmt.Sprintf("%v", *o.TargetResource)) - } - if o.TargetResourceGroup != nil { - out.Append("targetResourceGroup", fmt.Sprintf("%v", *o.TargetResourceGroup)) - } - if o.TargetResourceType != nil { - out.Append("targetResourceType", fmt.Sprintf("%v", *o.TargetResourceType)) - } - return &out -} - -type ListByResourceGroupCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListByResourceGroup ... -func (c ActionRulesClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - OptionsObject: options, - Pager: &ListByResourceGroupCustomPager{}, - Path: fmt.Sprintf("%s/providers/Microsoft.AlertsManagement/actionRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ActionRule `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c ActionRulesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, options, ActionRuleOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ActionRulesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions, predicate ActionRuleOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]ActionRule, 0) - - resp, err := c.ListByResourceGroup(ctx, id, options) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_listbysubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_listbysubscription.go deleted file mode 100644 index b8a90fa480768..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_listbysubscription.go +++ /dev/null @@ -1,170 +0,0 @@ -package actionrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListBySubscriptionOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ActionRule -} - -type ListBySubscriptionCompleteResult struct { - LatestHttpResponse *http.Response - Items []ActionRule -} - -type ListBySubscriptionOperationOptions struct { - ActionGroup *string - AlertRuleId *string - Description *string - ImpactedScope *string - MonitorService *MonitorService - Name *string - Severity *Severity - TargetResource *string - TargetResourceGroup *string - TargetResourceType *string -} - -func DefaultListBySubscriptionOperationOptions() ListBySubscriptionOperationOptions { - return ListBySubscriptionOperationOptions{} -} - -func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ListBySubscriptionOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.ActionGroup != nil { - out.Append("actionGroup", fmt.Sprintf("%v", *o.ActionGroup)) - } - if o.AlertRuleId != nil { - out.Append("alertRuleId", fmt.Sprintf("%v", *o.AlertRuleId)) - } - if o.Description != nil { - out.Append("description", fmt.Sprintf("%v", *o.Description)) - } - if o.ImpactedScope != nil { - out.Append("impactedScope", fmt.Sprintf("%v", *o.ImpactedScope)) - } - if o.MonitorService != nil { - out.Append("monitorService", fmt.Sprintf("%v", *o.MonitorService)) - } - if o.Name != nil { - out.Append("name", fmt.Sprintf("%v", *o.Name)) - } - if o.Severity != nil { - out.Append("severity", fmt.Sprintf("%v", *o.Severity)) - } - if o.TargetResource != nil { - out.Append("targetResource", fmt.Sprintf("%v", *o.TargetResource)) - } - if o.TargetResourceGroup != nil { - out.Append("targetResourceGroup", fmt.Sprintf("%v", *o.TargetResourceGroup)) - } - if o.TargetResourceType != nil { - out.Append("targetResourceType", fmt.Sprintf("%v", *o.TargetResourceType)) - } - return &out -} - -type ListBySubscriptionCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListBySubscriptionCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListBySubscription ... -func (c ActionRulesClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions) (result ListBySubscriptionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - OptionsObject: options, - Pager: &ListBySubscriptionCustomPager{}, - Path: fmt.Sprintf("%s/providers/Microsoft.AlertsManagement/actionRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ActionRule `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListBySubscriptionComplete retrieves all the results into a single object -func (c ActionRulesClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, options, ActionRuleOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ActionRulesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions, predicate ActionRuleOperationPredicate) (result ListBySubscriptionCompleteResult, err error) { - items := make([]ActionRule, 0) - - resp, err := c.ListBySubscription(ctx, id, options) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListBySubscriptionCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_update.go deleted file mode 100644 index cc6ff4e091347..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_update.go +++ /dev/null @@ -1,58 +0,0 @@ -package actionrules - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ActionRule -} - -// Update ... -func (c ActionRulesClient) Update(ctx context.Context, id ActionRuleId, input PatchObject) (result UpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ActionRule - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_actiongroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_actiongroup.go deleted file mode 100644 index 319cb3fd7ddc7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_actiongroup.go +++ /dev/null @@ -1,76 +0,0 @@ -package actionrules - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ActionRuleProperties = ActionGroup{} - -type ActionGroup struct { - ActionGroupId *string `json:"actionGroupId,omitempty"` - - // Fields inherited from ActionRuleProperties - Conditions *Conditions `json:"conditions,omitempty"` - CreatedAt *string `json:"createdAt,omitempty"` - CreatedBy *string `json:"createdBy,omitempty"` - Description *string `json:"description,omitempty"` - LastModifiedAt *string `json:"lastModifiedAt,omitempty"` - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - Scope *Scope `json:"scope,omitempty"` - Status *ActionRuleStatus `json:"status,omitempty"` -} - -func (o *ActionGroup) GetCreatedAtAsTime() (*time.Time, error) { - if o.CreatedAt == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CreatedAt, "2006-01-02T15:04:05Z07:00") -} - -func (o *ActionGroup) SetCreatedAtAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CreatedAt = &formatted -} - -func (o *ActionGroup) GetLastModifiedAtAsTime() (*time.Time, error) { - if o.LastModifiedAt == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModifiedAt, "2006-01-02T15:04:05Z07:00") -} - -func (o *ActionGroup) SetLastModifiedAtAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModifiedAt = &formatted -} - -var _ json.Marshaler = ActionGroup{} - -func (s ActionGroup) MarshalJSON() ([]byte, error) { - type wrapper ActionGroup - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ActionGroup: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ActionGroup: %+v", err) - } - decoded["type"] = "ActionGroup" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ActionGroup: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_actionrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_actionrule.go deleted file mode 100644 index 387fa73508959..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_actionrule.go +++ /dev/null @@ -1,48 +0,0 @@ -package actionrules - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ActionRule struct { - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties ActionRuleProperties `json:"properties"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Unmarshaler = &ActionRule{} - -func (s *ActionRule) UnmarshalJSON(bytes []byte) error { - type alias ActionRule - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into ActionRule: %+v", err) - } - - s.Id = decoded.Id - s.Location = decoded.Location - s.Name = decoded.Name - s.Tags = decoded.Tags - s.Type = decoded.Type - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ActionRule into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["properties"]; ok { - impl, err := unmarshalActionRulePropertiesImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Properties' for 'ActionRule': %+v", err) - } - s.Properties = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_actionruleproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_actionruleproperties.go deleted file mode 100644 index 63753b506ac62..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_actionruleproperties.go +++ /dev/null @@ -1,69 +0,0 @@ -package actionrules - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ActionRuleProperties interface { -} - -// RawActionRulePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawActionRulePropertiesImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalActionRulePropertiesImplementation(input []byte) (ActionRuleProperties, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ActionRuleProperties into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "ActionGroup") { - var out ActionGroup - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ActionGroup: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Diagnostics") { - var out Diagnostics - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into Diagnostics: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Suppression") { - var out Suppression - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into Suppression: %+v", err) - } - return out, nil - } - - out := RawActionRulePropertiesImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_condition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_condition.go deleted file mode 100644 index 756d3911d7dfb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_condition.go +++ /dev/null @@ -1,9 +0,0 @@ -package actionrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Condition struct { - Operator *Operator `json:"operator,omitempty"` - Values *[]string `json:"values,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_conditions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_conditions.go deleted file mode 100644 index 93a31dd0ad228..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_conditions.go +++ /dev/null @@ -1,15 +0,0 @@ -package actionrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Conditions struct { - AlertContext *Condition `json:"alertContext,omitempty"` - AlertRuleId *Condition `json:"alertRuleId,omitempty"` - AlertRuleName *Condition `json:"alertRuleName,omitempty"` - Description *Condition `json:"description,omitempty"` - MonitorCondition *Condition `json:"monitorCondition,omitempty"` - MonitorService *Condition `json:"monitorService,omitempty"` - Severity *Condition `json:"severity,omitempty"` - TargetResourceType *Condition `json:"targetResourceType,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_diagnostics.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_diagnostics.go deleted file mode 100644 index 79ea18204b7df..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_diagnostics.go +++ /dev/null @@ -1,75 +0,0 @@ -package actionrules - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ActionRuleProperties = Diagnostics{} - -type Diagnostics struct { - - // Fields inherited from ActionRuleProperties - Conditions *Conditions `json:"conditions,omitempty"` - CreatedAt *string `json:"createdAt,omitempty"` - CreatedBy *string `json:"createdBy,omitempty"` - Description *string `json:"description,omitempty"` - LastModifiedAt *string `json:"lastModifiedAt,omitempty"` - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - Scope *Scope `json:"scope,omitempty"` - Status *ActionRuleStatus `json:"status,omitempty"` -} - -func (o *Diagnostics) GetCreatedAtAsTime() (*time.Time, error) { - if o.CreatedAt == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CreatedAt, "2006-01-02T15:04:05Z07:00") -} - -func (o *Diagnostics) SetCreatedAtAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CreatedAt = &formatted -} - -func (o *Diagnostics) GetLastModifiedAtAsTime() (*time.Time, error) { - if o.LastModifiedAt == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModifiedAt, "2006-01-02T15:04:05Z07:00") -} - -func (o *Diagnostics) SetLastModifiedAtAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModifiedAt = &formatted -} - -var _ json.Marshaler = Diagnostics{} - -func (s Diagnostics) MarshalJSON() ([]byte, error) { - type wrapper Diagnostics - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling Diagnostics: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling Diagnostics: %+v", err) - } - decoded["type"] = "Diagnostics" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling Diagnostics: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_patchobject.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_patchobject.go deleted file mode 100644 index ecf69ae3ad1ee..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_patchobject.go +++ /dev/null @@ -1,9 +0,0 @@ -package actionrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PatchObject struct { - Properties *PatchProperties `json:"properties,omitempty"` - Tags *interface{} `json:"tags,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_patchproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_patchproperties.go deleted file mode 100644 index 82ef4649d2cab..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_patchproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package actionrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PatchProperties struct { - Status *ActionRuleStatus `json:"status,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_scope.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_scope.go deleted file mode 100644 index 1a2a8b842b1e6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_scope.go +++ /dev/null @@ -1,9 +0,0 @@ -package actionrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Scope struct { - ScopeType *ScopeType `json:"scopeType,omitempty"` - Values *[]string `json:"values,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_suppression.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_suppression.go deleted file mode 100644 index 927b6e42c5420..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_suppression.go +++ /dev/null @@ -1,76 +0,0 @@ -package actionrules - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ActionRuleProperties = Suppression{} - -type Suppression struct { - SuppressionConfig *SuppressionConfig `json:"suppressionConfig,omitempty"` - - // Fields inherited from ActionRuleProperties - Conditions *Conditions `json:"conditions,omitempty"` - CreatedAt *string `json:"createdAt,omitempty"` - CreatedBy *string `json:"createdBy,omitempty"` - Description *string `json:"description,omitempty"` - LastModifiedAt *string `json:"lastModifiedAt,omitempty"` - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - Scope *Scope `json:"scope,omitempty"` - Status *ActionRuleStatus `json:"status,omitempty"` -} - -func (o *Suppression) GetCreatedAtAsTime() (*time.Time, error) { - if o.CreatedAt == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CreatedAt, "2006-01-02T15:04:05Z07:00") -} - -func (o *Suppression) SetCreatedAtAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CreatedAt = &formatted -} - -func (o *Suppression) GetLastModifiedAtAsTime() (*time.Time, error) { - if o.LastModifiedAt == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModifiedAt, "2006-01-02T15:04:05Z07:00") -} - -func (o *Suppression) SetLastModifiedAtAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModifiedAt = &formatted -} - -var _ json.Marshaler = Suppression{} - -func (s Suppression) MarshalJSON() ([]byte, error) { - type wrapper Suppression - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling Suppression: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling Suppression: %+v", err) - } - decoded["type"] = "Suppression" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling Suppression: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_suppressionconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_suppressionconfig.go deleted file mode 100644 index 2a654d34d1850..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_suppressionconfig.go +++ /dev/null @@ -1,9 +0,0 @@ -package actionrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SuppressionConfig struct { - RecurrenceType SuppressionType `json:"recurrenceType"` - Schedule *SuppressionSchedule `json:"schedule,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_suppressionschedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_suppressionschedule.go deleted file mode 100644 index 36a89f64f0474..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_suppressionschedule.go +++ /dev/null @@ -1,12 +0,0 @@ -package actionrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SuppressionSchedule struct { - EndDate *string `json:"endDate,omitempty"` - EndTime *string `json:"endTime,omitempty"` - RecurrenceValues *[]int64 `json:"recurrenceValues,omitempty"` - StartDate *string `json:"startDate,omitempty"` - StartTime *string `json:"startTime,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/predicates.go deleted file mode 100644 index 142bd3cd29580..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package actionrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ActionRuleOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p ActionRuleOperationPredicate) Matches(input ActionRule) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/version.go deleted file mode 100644 index c2fa5779a25a4..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package actionrules - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2019-05-05-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/actionrules/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/README.md deleted file mode 100644 index 2ae83551ccd36..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/README.md +++ /dev/null @@ -1,123 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements` Documentation - -The `alertsmanagements` SDK allows for interaction with the Azure Resource Manager Service `alertsmanagement` (API Version `2019-05-05-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements" -``` - - -### Client Initialization - -```go -client := alertsmanagements.NewAlertsManagementsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `AlertsManagementsClient.AlertsChangeState` - -```go -ctx := context.TODO() -id := alertsmanagements.NewAlertID("12345678-1234-9876-4563-123456789012", "alertIdValue") - -payload := alertsmanagements.Comments{ - // ... -} - - -read, err := client.AlertsChangeState(ctx, id, payload, alertsmanagements.DefaultAlertsChangeStateOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AlertsManagementsClient.AlertsGetAll` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.AlertsGetAll(ctx, id, alertsmanagements.DefaultAlertsGetAllOperationOptions())` can be used to do batched pagination -items, err := client.AlertsGetAllComplete(ctx, id, alertsmanagements.DefaultAlertsGetAllOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AlertsManagementsClient.AlertsGetById` - -```go -ctx := context.TODO() -id := alertsmanagements.NewAlertID("12345678-1234-9876-4563-123456789012", "alertIdValue") - -read, err := client.AlertsGetById(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AlertsManagementsClient.AlertsGetHistory` - -```go -ctx := context.TODO() -id := alertsmanagements.NewAlertID("12345678-1234-9876-4563-123456789012", "alertIdValue") - -read, err := client.AlertsGetHistory(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AlertsManagementsClient.AlertsGetSummary` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -read, err := client.AlertsGetSummary(ctx, id, alertsmanagements.DefaultAlertsGetSummaryOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AlertsManagementsClient.AlertsMetaData` - -```go -ctx := context.TODO() - - -read, err := client.AlertsMetaData(ctx, alertsmanagements.DefaultAlertsMetaDataOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/client.go deleted file mode 100644 index cfbb889e434a1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package alertsmanagements - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AlertsManagementsClient struct { - Client *resourcemanager.Client -} - -func NewAlertsManagementsClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertsManagementsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alertsmanagements", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating AlertsManagementsClient: %+v", err) - } - - return &AlertsManagementsClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/constants.go deleted file mode 100644 index 3dde7f68a42d4..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/constants.go +++ /dev/null @@ -1,610 +0,0 @@ -package alertsmanagements - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AlertModificationEvent string - -const ( - AlertModificationEventActionRuleSuppressed AlertModificationEvent = "ActionRuleSuppressed" - AlertModificationEventActionRuleTriggered AlertModificationEvent = "ActionRuleTriggered" - AlertModificationEventActionsFailed AlertModificationEvent = "ActionsFailed" - AlertModificationEventActionsSuppressed AlertModificationEvent = "ActionsSuppressed" - AlertModificationEventActionsTriggered AlertModificationEvent = "ActionsTriggered" - AlertModificationEventAlertCreated AlertModificationEvent = "AlertCreated" - AlertModificationEventMonitorConditionChange AlertModificationEvent = "MonitorConditionChange" - AlertModificationEventSeverityChange AlertModificationEvent = "SeverityChange" - AlertModificationEventStateChange AlertModificationEvent = "StateChange" -) - -func PossibleValuesForAlertModificationEvent() []string { - return []string{ - string(AlertModificationEventActionRuleSuppressed), - string(AlertModificationEventActionRuleTriggered), - string(AlertModificationEventActionsFailed), - string(AlertModificationEventActionsSuppressed), - string(AlertModificationEventActionsTriggered), - string(AlertModificationEventAlertCreated), - string(AlertModificationEventMonitorConditionChange), - string(AlertModificationEventSeverityChange), - string(AlertModificationEventStateChange), - } -} - -func (s *AlertModificationEvent) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAlertModificationEvent(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAlertModificationEvent(input string) (*AlertModificationEvent, error) { - vals := map[string]AlertModificationEvent{ - "actionrulesuppressed": AlertModificationEventActionRuleSuppressed, - "actionruletriggered": AlertModificationEventActionRuleTriggered, - "actionsfailed": AlertModificationEventActionsFailed, - "actionssuppressed": AlertModificationEventActionsSuppressed, - "actionstriggered": AlertModificationEventActionsTriggered, - "alertcreated": AlertModificationEventAlertCreated, - "monitorconditionchange": AlertModificationEventMonitorConditionChange, - "severitychange": AlertModificationEventSeverityChange, - "statechange": AlertModificationEventStateChange, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AlertModificationEvent(input) - return &out, nil -} - -type AlertState string - -const ( - AlertStateAcknowledged AlertState = "Acknowledged" - AlertStateClosed AlertState = "Closed" - AlertStateNew AlertState = "New" -) - -func PossibleValuesForAlertState() []string { - return []string{ - string(AlertStateAcknowledged), - string(AlertStateClosed), - string(AlertStateNew), - } -} - -func (s *AlertState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAlertState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAlertState(input string) (*AlertState, error) { - vals := map[string]AlertState{ - "acknowledged": AlertStateAcknowledged, - "closed": AlertStateClosed, - "new": AlertStateNew, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AlertState(input) - return &out, nil -} - -type AlertsSortByFields string - -const ( - AlertsSortByFieldsAlertState AlertsSortByFields = "alertState" - AlertsSortByFieldsLastModifiedDateTime AlertsSortByFields = "lastModifiedDateTime" - AlertsSortByFieldsMonitorCondition AlertsSortByFields = "monitorCondition" - AlertsSortByFieldsName AlertsSortByFields = "name" - AlertsSortByFieldsSeverity AlertsSortByFields = "severity" - AlertsSortByFieldsStartDateTime AlertsSortByFields = "startDateTime" - AlertsSortByFieldsTargetResource AlertsSortByFields = "targetResource" - AlertsSortByFieldsTargetResourceGroup AlertsSortByFields = "targetResourceGroup" - AlertsSortByFieldsTargetResourceName AlertsSortByFields = "targetResourceName" - AlertsSortByFieldsTargetResourceType AlertsSortByFields = "targetResourceType" -) - -func PossibleValuesForAlertsSortByFields() []string { - return []string{ - string(AlertsSortByFieldsAlertState), - string(AlertsSortByFieldsLastModifiedDateTime), - string(AlertsSortByFieldsMonitorCondition), - string(AlertsSortByFieldsName), - string(AlertsSortByFieldsSeverity), - string(AlertsSortByFieldsStartDateTime), - string(AlertsSortByFieldsTargetResource), - string(AlertsSortByFieldsTargetResourceGroup), - string(AlertsSortByFieldsTargetResourceName), - string(AlertsSortByFieldsTargetResourceType), - } -} - -func (s *AlertsSortByFields) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAlertsSortByFields(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAlertsSortByFields(input string) (*AlertsSortByFields, error) { - vals := map[string]AlertsSortByFields{ - "alertstate": AlertsSortByFieldsAlertState, - "lastmodifieddatetime": AlertsSortByFieldsLastModifiedDateTime, - "monitorcondition": AlertsSortByFieldsMonitorCondition, - "name": AlertsSortByFieldsName, - "severity": AlertsSortByFieldsSeverity, - "startdatetime": AlertsSortByFieldsStartDateTime, - "targetresource": AlertsSortByFieldsTargetResource, - "targetresourcegroup": AlertsSortByFieldsTargetResourceGroup, - "targetresourcename": AlertsSortByFieldsTargetResourceName, - "targetresourcetype": AlertsSortByFieldsTargetResourceType, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AlertsSortByFields(input) - return &out, nil -} - -type AlertsSummaryGroupByFields string - -const ( - AlertsSummaryGroupByFieldsAlertRule AlertsSummaryGroupByFields = "alertRule" - AlertsSummaryGroupByFieldsAlertState AlertsSummaryGroupByFields = "alertState" - AlertsSummaryGroupByFieldsMonitorCondition AlertsSummaryGroupByFields = "monitorCondition" - AlertsSummaryGroupByFieldsMonitorService AlertsSummaryGroupByFields = "monitorService" - AlertsSummaryGroupByFieldsSeverity AlertsSummaryGroupByFields = "severity" - AlertsSummaryGroupByFieldsSignalType AlertsSummaryGroupByFields = "signalType" -) - -func PossibleValuesForAlertsSummaryGroupByFields() []string { - return []string{ - string(AlertsSummaryGroupByFieldsAlertRule), - string(AlertsSummaryGroupByFieldsAlertState), - string(AlertsSummaryGroupByFieldsMonitorCondition), - string(AlertsSummaryGroupByFieldsMonitorService), - string(AlertsSummaryGroupByFieldsSeverity), - string(AlertsSummaryGroupByFieldsSignalType), - } -} - -func (s *AlertsSummaryGroupByFields) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAlertsSummaryGroupByFields(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAlertsSummaryGroupByFields(input string) (*AlertsSummaryGroupByFields, error) { - vals := map[string]AlertsSummaryGroupByFields{ - "alertrule": AlertsSummaryGroupByFieldsAlertRule, - "alertstate": AlertsSummaryGroupByFieldsAlertState, - "monitorcondition": AlertsSummaryGroupByFieldsMonitorCondition, - "monitorservice": AlertsSummaryGroupByFieldsMonitorService, - "severity": AlertsSummaryGroupByFieldsSeverity, - "signaltype": AlertsSummaryGroupByFieldsSignalType, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AlertsSummaryGroupByFields(input) - return &out, nil -} - -type Identifier string - -const ( - IdentifierMonitorServiceList Identifier = "MonitorServiceList" -) - -func PossibleValuesForIdentifier() []string { - return []string{ - string(IdentifierMonitorServiceList), - } -} - -func (s *Identifier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIdentifier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIdentifier(input string) (*Identifier, error) { - vals := map[string]Identifier{ - "monitorservicelist": IdentifierMonitorServiceList, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Identifier(input) - return &out, nil -} - -type MetadataIdentifier string - -const ( - MetadataIdentifierMonitorServiceList MetadataIdentifier = "MonitorServiceList" -) - -func PossibleValuesForMetadataIdentifier() []string { - return []string{ - string(MetadataIdentifierMonitorServiceList), - } -} - -func (s *MetadataIdentifier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMetadataIdentifier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMetadataIdentifier(input string) (*MetadataIdentifier, error) { - vals := map[string]MetadataIdentifier{ - "monitorservicelist": MetadataIdentifierMonitorServiceList, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MetadataIdentifier(input) - return &out, nil -} - -type MonitorCondition string - -const ( - MonitorConditionFired MonitorCondition = "Fired" - MonitorConditionResolved MonitorCondition = "Resolved" -) - -func PossibleValuesForMonitorCondition() []string { - return []string{ - string(MonitorConditionFired), - string(MonitorConditionResolved), - } -} - -func (s *MonitorCondition) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMonitorCondition(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMonitorCondition(input string) (*MonitorCondition, error) { - vals := map[string]MonitorCondition{ - "fired": MonitorConditionFired, - "resolved": MonitorConditionResolved, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MonitorCondition(input) - return &out, nil -} - -type MonitorService string - -const ( - MonitorServiceActivityLogAdministrative MonitorService = "ActivityLog Administrative" - MonitorServiceActivityLogAutoscale MonitorService = "ActivityLog Autoscale" - MonitorServiceActivityLogPolicy MonitorService = "ActivityLog Policy" - MonitorServiceActivityLogRecommendation MonitorService = "ActivityLog Recommendation" - MonitorServiceActivityLogSecurity MonitorService = "ActivityLog Security" - MonitorServiceApplicationInsights MonitorService = "Application Insights" - MonitorServiceLogAnalytics MonitorService = "Log Analytics" - MonitorServiceNagios MonitorService = "Nagios" - MonitorServicePlatform MonitorService = "Platform" - MonitorServiceSCOM MonitorService = "SCOM" - MonitorServiceServiceHealth MonitorService = "ServiceHealth" - MonitorServiceSmartDetector MonitorService = "SmartDetector" - MonitorServiceVMInsights MonitorService = "VM Insights" - MonitorServiceZabbix MonitorService = "Zabbix" -) - -func PossibleValuesForMonitorService() []string { - return []string{ - string(MonitorServiceActivityLogAdministrative), - string(MonitorServiceActivityLogAutoscale), - string(MonitorServiceActivityLogPolicy), - string(MonitorServiceActivityLogRecommendation), - string(MonitorServiceActivityLogSecurity), - string(MonitorServiceApplicationInsights), - string(MonitorServiceLogAnalytics), - string(MonitorServiceNagios), - string(MonitorServicePlatform), - string(MonitorServiceSCOM), - string(MonitorServiceServiceHealth), - string(MonitorServiceSmartDetector), - string(MonitorServiceVMInsights), - string(MonitorServiceZabbix), - } -} - -func (s *MonitorService) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMonitorService(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMonitorService(input string) (*MonitorService, error) { - vals := map[string]MonitorService{ - "activitylog administrative": MonitorServiceActivityLogAdministrative, - "activitylog autoscale": MonitorServiceActivityLogAutoscale, - "activitylog policy": MonitorServiceActivityLogPolicy, - "activitylog recommendation": MonitorServiceActivityLogRecommendation, - "activitylog security": MonitorServiceActivityLogSecurity, - "application insights": MonitorServiceApplicationInsights, - "log analytics": MonitorServiceLogAnalytics, - "nagios": MonitorServiceNagios, - "platform": MonitorServicePlatform, - "scom": MonitorServiceSCOM, - "servicehealth": MonitorServiceServiceHealth, - "smartdetector": MonitorServiceSmartDetector, - "vm insights": MonitorServiceVMInsights, - "zabbix": MonitorServiceZabbix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MonitorService(input) - return &out, nil -} - -type Severity string - -const ( - SeveritySevFour Severity = "Sev4" - SeveritySevOne Severity = "Sev1" - SeveritySevThree Severity = "Sev3" - SeveritySevTwo Severity = "Sev2" - SeveritySevZero Severity = "Sev0" -) - -func PossibleValuesForSeverity() []string { - return []string{ - string(SeveritySevFour), - string(SeveritySevOne), - string(SeveritySevThree), - string(SeveritySevTwo), - string(SeveritySevZero), - } -} - -func (s *Severity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSeverity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSeverity(input string) (*Severity, error) { - vals := map[string]Severity{ - "sev4": SeveritySevFour, - "sev1": SeveritySevOne, - "sev3": SeveritySevThree, - "sev2": SeveritySevTwo, - "sev0": SeveritySevZero, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Severity(input) - return &out, nil -} - -type SignalType string - -const ( - SignalTypeLog SignalType = "Log" - SignalTypeMetric SignalType = "Metric" - SignalTypeUnknown SignalType = "Unknown" -) - -func PossibleValuesForSignalType() []string { - return []string{ - string(SignalTypeLog), - string(SignalTypeMetric), - string(SignalTypeUnknown), - } -} - -func (s *SignalType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSignalType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSignalType(input string) (*SignalType, error) { - vals := map[string]SignalType{ - "log": SignalTypeLog, - "metric": SignalTypeMetric, - "unknown": SignalTypeUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SignalType(input) - return &out, nil -} - -type SortOrder string - -const ( - SortOrderAsc SortOrder = "asc" - SortOrderDesc SortOrder = "desc" -) - -func PossibleValuesForSortOrder() []string { - return []string{ - string(SortOrderAsc), - string(SortOrderDesc), - } -} - -func (s *SortOrder) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSortOrder(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSortOrder(input string) (*SortOrder, error) { - vals := map[string]SortOrder{ - "asc": SortOrderAsc, - "desc": SortOrderDesc, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SortOrder(input) - return &out, nil -} - -type TimeRange string - -const ( - TimeRangeOned TimeRange = "1d" - TimeRangeOneh TimeRange = "1h" - TimeRangeSevend TimeRange = "7d" - TimeRangeThreeZerod TimeRange = "30d" -) - -func PossibleValuesForTimeRange() []string { - return []string{ - string(TimeRangeOned), - string(TimeRangeOneh), - string(TimeRangeSevend), - string(TimeRangeThreeZerod), - } -} - -func (s *TimeRange) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTimeRange(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTimeRange(input string) (*TimeRange, error) { - vals := map[string]TimeRange{ - "1d": TimeRangeOned, - "1h": TimeRangeOneh, - "7d": TimeRangeSevend, - "30d": TimeRangeThreeZerod, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TimeRange(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/id_alert.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/id_alert.go deleted file mode 100644 index c83bb9e83b339..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/id_alert.go +++ /dev/null @@ -1,121 +0,0 @@ -package alertsmanagements - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&AlertId{}) -} - -var _ resourceids.ResourceId = &AlertId{} - -// AlertId is a struct representing the Resource ID for a Alert -type AlertId struct { - SubscriptionId string - AlertId string -} - -// NewAlertID returns a new AlertId struct -func NewAlertID(subscriptionId string, alertId string) AlertId { - return AlertId{ - SubscriptionId: subscriptionId, - AlertId: alertId, - } -} - -// ParseAlertID parses 'input' into a AlertId -func ParseAlertID(input string) (*AlertId, error) { - parser := resourceids.NewParserFromResourceIdType(&AlertId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := AlertId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseAlertIDInsensitively parses 'input' case-insensitively into a AlertId -// note: this method should only be used for API response data and not user input -func ParseAlertIDInsensitively(input string) (*AlertId, error) { - parser := resourceids.NewParserFromResourceIdType(&AlertId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := AlertId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *AlertId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.AlertId, ok = input.Parsed["alertId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "alertId", input) - } - - return nil -} - -// ValidateAlertID checks that 'input' can be parsed as a Alert ID -func ValidateAlertID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseAlertID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Alert ID -func (id AlertId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.AlertsManagement/alerts/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.AlertId) -} - -// Segments returns a slice of Resource ID Segments which comprise this Alert ID -func (id AlertId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftAlertsManagement", "Microsoft.AlertsManagement", "Microsoft.AlertsManagement"), - resourceids.StaticSegment("staticAlerts", "alerts", "alerts"), - resourceids.UserSpecifiedSegment("alertId", "alertIdValue"), - } -} - -// String returns a human-readable description of this Alert ID -func (id AlertId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Alert: %q", id.AlertId), - } - return fmt.Sprintf("Alert (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertschangestate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertschangestate.go deleted file mode 100644 index 408fb21eba0b2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertschangestate.go +++ /dev/null @@ -1,87 +0,0 @@ -package alertsmanagements - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AlertsChangeStateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Alert -} - -type AlertsChangeStateOperationOptions struct { - NewState *AlertState -} - -func DefaultAlertsChangeStateOperationOptions() AlertsChangeStateOperationOptions { - return AlertsChangeStateOperationOptions{} -} - -func (o AlertsChangeStateOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o AlertsChangeStateOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o AlertsChangeStateOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.NewState != nil { - out.Append("newState", fmt.Sprintf("%v", *o.NewState)) - } - return &out -} - -// AlertsChangeState ... -func (c AlertsManagementsClient) AlertsChangeState(ctx context.Context, id AlertId, input Comments, options AlertsChangeStateOperationOptions) (result AlertsChangeStateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - OptionsObject: options, - Path: fmt.Sprintf("%s/changestate", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Alert - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgetall.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgetall.go deleted file mode 100644 index 69af7a04b402b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgetall.go +++ /dev/null @@ -1,198 +0,0 @@ -package alertsmanagements - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AlertsGetAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]Alert -} - -type AlertsGetAllCompleteResult struct { - LatestHttpResponse *http.Response - Items []Alert -} - -type AlertsGetAllOperationOptions struct { - AlertRule *string - AlertState *AlertState - CustomTimeRange *string - IncludeContext *bool - IncludeEgressConfig *bool - MonitorCondition *MonitorCondition - MonitorService *MonitorService - PageCount *int64 - Select *string - Severity *Severity - SmartGroupId *string - SortBy *AlertsSortByFields - SortOrder *SortOrder - TargetResource *string - TargetResourceGroup *string - TargetResourceType *string - TimeRange *TimeRange -} - -func DefaultAlertsGetAllOperationOptions() AlertsGetAllOperationOptions { - return AlertsGetAllOperationOptions{} -} - -func (o AlertsGetAllOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o AlertsGetAllOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o AlertsGetAllOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.AlertRule != nil { - out.Append("alertRule", fmt.Sprintf("%v", *o.AlertRule)) - } - if o.AlertState != nil { - out.Append("alertState", fmt.Sprintf("%v", *o.AlertState)) - } - if o.CustomTimeRange != nil { - out.Append("customTimeRange", fmt.Sprintf("%v", *o.CustomTimeRange)) - } - if o.IncludeContext != nil { - out.Append("includeContext", fmt.Sprintf("%v", *o.IncludeContext)) - } - if o.IncludeEgressConfig != nil { - out.Append("includeEgressConfig", fmt.Sprintf("%v", *o.IncludeEgressConfig)) - } - if o.MonitorCondition != nil { - out.Append("monitorCondition", fmt.Sprintf("%v", *o.MonitorCondition)) - } - if o.MonitorService != nil { - out.Append("monitorService", fmt.Sprintf("%v", *o.MonitorService)) - } - if o.PageCount != nil { - out.Append("pageCount", fmt.Sprintf("%v", *o.PageCount)) - } - if o.Select != nil { - out.Append("select", fmt.Sprintf("%v", *o.Select)) - } - if o.Severity != nil { - out.Append("severity", fmt.Sprintf("%v", *o.Severity)) - } - if o.SmartGroupId != nil { - out.Append("smartGroupId", fmt.Sprintf("%v", *o.SmartGroupId)) - } - if o.SortBy != nil { - out.Append("sortBy", fmt.Sprintf("%v", *o.SortBy)) - } - if o.SortOrder != nil { - out.Append("sortOrder", fmt.Sprintf("%v", *o.SortOrder)) - } - if o.TargetResource != nil { - out.Append("targetResource", fmt.Sprintf("%v", *o.TargetResource)) - } - if o.TargetResourceGroup != nil { - out.Append("targetResourceGroup", fmt.Sprintf("%v", *o.TargetResourceGroup)) - } - if o.TargetResourceType != nil { - out.Append("targetResourceType", fmt.Sprintf("%v", *o.TargetResourceType)) - } - if o.TimeRange != nil { - out.Append("timeRange", fmt.Sprintf("%v", *o.TimeRange)) - } - return &out -} - -type AlertsGetAllCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *AlertsGetAllCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// AlertsGetAll ... -func (c AlertsManagementsClient) AlertsGetAll(ctx context.Context, id commonids.SubscriptionId, options AlertsGetAllOperationOptions) (result AlertsGetAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - OptionsObject: options, - Pager: &AlertsGetAllCustomPager{}, - Path: fmt.Sprintf("%s/providers/Microsoft.AlertsManagement/alerts", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]Alert `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// AlertsGetAllComplete retrieves all the results into a single object -func (c AlertsManagementsClient) AlertsGetAllComplete(ctx context.Context, id commonids.SubscriptionId, options AlertsGetAllOperationOptions) (AlertsGetAllCompleteResult, error) { - return c.AlertsGetAllCompleteMatchingPredicate(ctx, id, options, AlertOperationPredicate{}) -} - -// AlertsGetAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AlertsManagementsClient) AlertsGetAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options AlertsGetAllOperationOptions, predicate AlertOperationPredicate) (result AlertsGetAllCompleteResult, err error) { - items := make([]Alert, 0) - - resp, err := c.AlertsGetAll(ctx, id, options) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = AlertsGetAllCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgetbyid.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgetbyid.go deleted file mode 100644 index f3454dc11e8a9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgetbyid.go +++ /dev/null @@ -1,54 +0,0 @@ -package alertsmanagements - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AlertsGetByIdOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Alert -} - -// AlertsGetById ... -func (c AlertsManagementsClient) AlertsGetById(ctx context.Context, id AlertId) (result AlertsGetByIdOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Alert - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgethistory.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgethistory.go deleted file mode 100644 index 420acdcb6bac7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgethistory.go +++ /dev/null @@ -1,55 +0,0 @@ -package alertsmanagements - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AlertsGetHistoryOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AlertModification -} - -// AlertsGetHistory ... -func (c AlertsManagementsClient) AlertsGetHistory(ctx context.Context, id AlertId) (result AlertsGetHistoryOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/history", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model AlertModification - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgetsummary.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgetsummary.go deleted file mode 100644 index e142ea30b131a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgetsummary.go +++ /dev/null @@ -1,128 +0,0 @@ -package alertsmanagements - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AlertsGetSummaryOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AlertsSummary -} - -type AlertsGetSummaryOperationOptions struct { - AlertRule *string - AlertState *AlertState - CustomTimeRange *string - Groupby *AlertsSummaryGroupByFields - IncludeSmartGroupsCount *bool - MonitorCondition *MonitorCondition - MonitorService *MonitorService - Severity *Severity - TargetResource *string - TargetResourceGroup *string - TargetResourceType *string - TimeRange *TimeRange -} - -func DefaultAlertsGetSummaryOperationOptions() AlertsGetSummaryOperationOptions { - return AlertsGetSummaryOperationOptions{} -} - -func (o AlertsGetSummaryOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o AlertsGetSummaryOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o AlertsGetSummaryOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.AlertRule != nil { - out.Append("alertRule", fmt.Sprintf("%v", *o.AlertRule)) - } - if o.AlertState != nil { - out.Append("alertState", fmt.Sprintf("%v", *o.AlertState)) - } - if o.CustomTimeRange != nil { - out.Append("customTimeRange", fmt.Sprintf("%v", *o.CustomTimeRange)) - } - if o.Groupby != nil { - out.Append("groupby", fmt.Sprintf("%v", *o.Groupby)) - } - if o.IncludeSmartGroupsCount != nil { - out.Append("includeSmartGroupsCount", fmt.Sprintf("%v", *o.IncludeSmartGroupsCount)) - } - if o.MonitorCondition != nil { - out.Append("monitorCondition", fmt.Sprintf("%v", *o.MonitorCondition)) - } - if o.MonitorService != nil { - out.Append("monitorService", fmt.Sprintf("%v", *o.MonitorService)) - } - if o.Severity != nil { - out.Append("severity", fmt.Sprintf("%v", *o.Severity)) - } - if o.TargetResource != nil { - out.Append("targetResource", fmt.Sprintf("%v", *o.TargetResource)) - } - if o.TargetResourceGroup != nil { - out.Append("targetResourceGroup", fmt.Sprintf("%v", *o.TargetResourceGroup)) - } - if o.TargetResourceType != nil { - out.Append("targetResourceType", fmt.Sprintf("%v", *o.TargetResourceType)) - } - if o.TimeRange != nil { - out.Append("timeRange", fmt.Sprintf("%v", *o.TimeRange)) - } - return &out -} - -// AlertsGetSummary ... -func (c AlertsManagementsClient) AlertsGetSummary(ctx context.Context, id commonids.SubscriptionId, options AlertsGetSummaryOperationOptions) (result AlertsGetSummaryOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - OptionsObject: options, - Path: fmt.Sprintf("%s/providers/Microsoft.AlertsManagement/alertsSummary", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model AlertsSummary - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsmetadata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsmetadata.go deleted file mode 100644 index 9d84a06232b64..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsmetadata.go +++ /dev/null @@ -1,83 +0,0 @@ -package alertsmanagements - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AlertsMetaDataOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AlertsMetaData -} - -type AlertsMetaDataOperationOptions struct { - Identifier *Identifier -} - -func DefaultAlertsMetaDataOperationOptions() AlertsMetaDataOperationOptions { - return AlertsMetaDataOperationOptions{} -} - -func (o AlertsMetaDataOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o AlertsMetaDataOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o AlertsMetaDataOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Identifier != nil { - out.Append("identifier", fmt.Sprintf("%v", *o.Identifier)) - } - return &out -} - -// AlertsMetaData ... -func (c AlertsManagementsClient) AlertsMetaData(ctx context.Context, options AlertsMetaDataOperationOptions) (result AlertsMetaDataOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - OptionsObject: options, - Path: "/providers/Microsoft.AlertsManagement/alertsMetaData", - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model AlertsMetaData - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_actionstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_actionstatus.go deleted file mode 100644 index 031d004aa8cda..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_actionstatus.go +++ /dev/null @@ -1,8 +0,0 @@ -package alertsmanagements - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ActionStatus struct { - IsSuppressed *bool `json:"isSuppressed,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alert.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alert.go deleted file mode 100644 index 1228dc6880dd7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alert.go +++ /dev/null @@ -1,11 +0,0 @@ -package alertsmanagements - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Alert struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AlertProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertmodification.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertmodification.go deleted file mode 100644 index 17ab73781d915..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertmodification.go +++ /dev/null @@ -1,11 +0,0 @@ -package alertsmanagements - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AlertModification struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AlertModificationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertmodificationitem.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertmodificationitem.go deleted file mode 100644 index d728331f89f60..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertmodificationitem.go +++ /dev/null @@ -1,14 +0,0 @@ -package alertsmanagements - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AlertModificationItem struct { - Comments *string `json:"comments,omitempty"` - Description *string `json:"description,omitempty"` - ModificationEvent *AlertModificationEvent `json:"modificationEvent,omitempty"` - ModifiedAt *string `json:"modifiedAt,omitempty"` - ModifiedBy *string `json:"modifiedBy,omitempty"` - NewValue *string `json:"newValue,omitempty"` - OldValue *string `json:"oldValue,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertmodificationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertmodificationproperties.go deleted file mode 100644 index f09c25ea6778e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertmodificationproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package alertsmanagements - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AlertModificationProperties struct { - AlertId *string `json:"alertId,omitempty"` - Modifications *[]AlertModificationItem `json:"modifications,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertproperties.go deleted file mode 100644 index a385ee43d547f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package alertsmanagements - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AlertProperties struct { - Context *interface{} `json:"context,omitempty"` - EgressConfig *interface{} `json:"egressConfig,omitempty"` - Essentials *Essentials `json:"essentials,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertsmetadata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertsmetadata.go deleted file mode 100644 index 75a25b3435a92..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertsmetadata.go +++ /dev/null @@ -1,32 +0,0 @@ -package alertsmanagements - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AlertsMetaData struct { - Properties AlertsMetaDataProperties `json:"properties"` -} - -var _ json.Unmarshaler = &AlertsMetaData{} - -func (s *AlertsMetaData) UnmarshalJSON(bytes []byte) error { - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling AlertsMetaData into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["properties"]; ok { - impl, err := unmarshalAlertsMetaDataPropertiesImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Properties' for 'AlertsMetaData': %+v", err) - } - s.Properties = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertsmetadataproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertsmetadataproperties.go deleted file mode 100644 index 3c6dea34fe226..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertsmetadataproperties.go +++ /dev/null @@ -1,44 +0,0 @@ -package alertsmanagements - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AlertsMetaDataProperties interface { -} - -// RawAlertsMetaDataPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawAlertsMetaDataPropertiesImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalAlertsMetaDataPropertiesImplementation(input []byte) (AlertsMetaDataProperties, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling AlertsMetaDataProperties into map[string]interface: %+v", err) - } - - value, ok := temp["metadataIdentifier"].(string) - if !ok { - return nil, nil - } - - out := RawAlertsMetaDataPropertiesImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertssummary.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertssummary.go deleted file mode 100644 index a0e5981d76f29..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertssummary.go +++ /dev/null @@ -1,11 +0,0 @@ -package alertsmanagements - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AlertsSummary struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AlertsSummaryGroup `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertssummarygroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertssummarygroup.go deleted file mode 100644 index eb09424193e76..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertssummarygroup.go +++ /dev/null @@ -1,11 +0,0 @@ -package alertsmanagements - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AlertsSummaryGroup struct { - Groupedby *string `json:"groupedby,omitempty"` - SmartGroupsCount *int64 `json:"smartGroupsCount,omitempty"` - Total *int64 `json:"total,omitempty"` - Values *[]AlertsSummaryGroupItem `json:"values,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertssummarygroupitem.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertssummarygroupitem.go deleted file mode 100644 index edd81df166c72..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertssummarygroupitem.go +++ /dev/null @@ -1,11 +0,0 @@ -package alertsmanagements - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AlertsSummaryGroupItem struct { - Count *int64 `json:"count,omitempty"` - Groupedby *string `json:"groupedby,omitempty"` - Name *string `json:"name,omitempty"` - Values *[]AlertsSummaryGroupItem `json:"values,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_comments.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_comments.go deleted file mode 100644 index 089caf889b560..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_comments.go +++ /dev/null @@ -1,8 +0,0 @@ -package alertsmanagements - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Comments struct { - Comments *string `json:"comments,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_essentials.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_essentials.go deleted file mode 100644 index c58acbb5a25b2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_essentials.go +++ /dev/null @@ -1,68 +0,0 @@ -package alertsmanagements - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Essentials struct { - ActionStatus *ActionStatus `json:"actionStatus,omitempty"` - AlertRule *string `json:"alertRule,omitempty"` - AlertState *AlertState `json:"alertState,omitempty"` - Description *string `json:"description,omitempty"` - LastModifiedDateTime *string `json:"lastModifiedDateTime,omitempty"` - LastModifiedUserName *string `json:"lastModifiedUserName,omitempty"` - MonitorCondition *MonitorCondition `json:"monitorCondition,omitempty"` - MonitorConditionResolvedDateTime *string `json:"monitorConditionResolvedDateTime,omitempty"` - MonitorService *MonitorService `json:"monitorService,omitempty"` - Severity *Severity `json:"severity,omitempty"` - SignalType *SignalType `json:"signalType,omitempty"` - SmartGroupId *string `json:"smartGroupId,omitempty"` - SmartGroupingReason *string `json:"smartGroupingReason,omitempty"` - SourceCreatedId *string `json:"sourceCreatedId,omitempty"` - StartDateTime *string `json:"startDateTime,omitempty"` - TargetResource *string `json:"targetResource,omitempty"` - TargetResourceGroup *string `json:"targetResourceGroup,omitempty"` - TargetResourceName *string `json:"targetResourceName,omitempty"` - TargetResourceType *string `json:"targetResourceType,omitempty"` -} - -func (o *Essentials) GetLastModifiedDateTimeAsTime() (*time.Time, error) { - if o.LastModifiedDateTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModifiedDateTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *Essentials) SetLastModifiedDateTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModifiedDateTime = &formatted -} - -func (o *Essentials) GetMonitorConditionResolvedDateTimeAsTime() (*time.Time, error) { - if o.MonitorConditionResolvedDateTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.MonitorConditionResolvedDateTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *Essentials) SetMonitorConditionResolvedDateTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.MonitorConditionResolvedDateTime = &formatted -} - -func (o *Essentials) GetStartDateTimeAsTime() (*time.Time, error) { - if o.StartDateTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartDateTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *Essentials) SetStartDateTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartDateTime = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/predicates.go deleted file mode 100644 index b05be04f1ced9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package alertsmanagements - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AlertOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p AlertOperationPredicate) Matches(input Alert) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/version.go deleted file mode 100644 index 7d5fcd2277a01..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package alertsmanagements - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2019-05-05-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alertsmanagements/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/README.md new file mode 100644 index 0000000000000..a49e03121a3c5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/README.md @@ -0,0 +1,73 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments` Documentation + +The `configurationprofilehcrpassignments` SDK allows for interaction with the Azure Resource Manager Service `automanage` (API Version `2022-05-04`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments" +``` + + +### Client Initialization + +```go +client := configurationprofilehcrpassignments.NewConfigurationProfileHCRPAssignmentsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ConfigurationProfileHCRPAssignmentsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := configurationprofilehcrpassignments.NewProviders2ConfigurationProfileAssignmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue", "configurationProfileAssignmentValue") + +payload := configurationprofilehcrpassignments.ConfigurationProfileAssignment{ + // ... +} + + +read, err := client.CreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ConfigurationProfileHCRPAssignmentsClient.Delete` + +```go +ctx := context.TODO() +id := configurationprofilehcrpassignments.NewProviders2ConfigurationProfileAssignmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue", "configurationProfileAssignmentValue") + +read, err := client.Delete(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ConfigurationProfileHCRPAssignmentsClient.Get` + +```go +ctx := context.TODO() +id := configurationprofilehcrpassignments.NewProviders2ConfigurationProfileAssignmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue", "configurationProfileAssignmentValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/client.go new file mode 100644 index 0000000000000..0a5d40e481f56 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/client.go @@ -0,0 +1,26 @@ +package configurationprofilehcrpassignments + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ConfigurationProfileHCRPAssignmentsClient struct { + Client *resourcemanager.Client +} + +func NewConfigurationProfileHCRPAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationProfileHCRPAssignmentsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurationprofilehcrpassignments", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ConfigurationProfileHCRPAssignmentsClient: %+v", err) + } + + return &ConfigurationProfileHCRPAssignmentsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/id_providers2configurationprofileassignment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/id_providers2configurationprofileassignment.go new file mode 100644 index 0000000000000..967f2fd7f0c0c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/id_providers2configurationprofileassignment.go @@ -0,0 +1,141 @@ +package configurationprofilehcrpassignments + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&Providers2ConfigurationProfileAssignmentId{}) +} + +var _ resourceids.ResourceId = &Providers2ConfigurationProfileAssignmentId{} + +// Providers2ConfigurationProfileAssignmentId is a struct representing the Resource ID for a Providers 2 Configuration Profile Assignment +type Providers2ConfigurationProfileAssignmentId struct { + SubscriptionId string + ResourceGroupName string + MachineName string + ConfigurationProfileAssignmentName string +} + +// NewProviders2ConfigurationProfileAssignmentID returns a new Providers2ConfigurationProfileAssignmentId struct +func NewProviders2ConfigurationProfileAssignmentID(subscriptionId string, resourceGroupName string, machineName string, configurationProfileAssignmentName string) Providers2ConfigurationProfileAssignmentId { + return Providers2ConfigurationProfileAssignmentId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + MachineName: machineName, + ConfigurationProfileAssignmentName: configurationProfileAssignmentName, + } +} + +// ParseProviders2ConfigurationProfileAssignmentID parses 'input' into a Providers2ConfigurationProfileAssignmentId +func ParseProviders2ConfigurationProfileAssignmentID(input string) (*Providers2ConfigurationProfileAssignmentId, error) { + parser := resourceids.NewParserFromResourceIdType(&Providers2ConfigurationProfileAssignmentId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := Providers2ConfigurationProfileAssignmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseProviders2ConfigurationProfileAssignmentIDInsensitively parses 'input' case-insensitively into a Providers2ConfigurationProfileAssignmentId +// note: this method should only be used for API response data and not user input +func ParseProviders2ConfigurationProfileAssignmentIDInsensitively(input string) (*Providers2ConfigurationProfileAssignmentId, error) { + parser := resourceids.NewParserFromResourceIdType(&Providers2ConfigurationProfileAssignmentId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := Providers2ConfigurationProfileAssignmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *Providers2ConfigurationProfileAssignmentId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.MachineName, ok = input.Parsed["machineName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "machineName", input) + } + + if id.ConfigurationProfileAssignmentName, ok = input.Parsed["configurationProfileAssignmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "configurationProfileAssignmentName", input) + } + + return nil +} + +// ValidateProviders2ConfigurationProfileAssignmentID checks that 'input' can be parsed as a Providers 2 Configuration Profile Assignment ID +func ValidateProviders2ConfigurationProfileAssignmentID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseProviders2ConfigurationProfileAssignmentID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Providers 2 Configuration Profile Assignment ID +func (id Providers2ConfigurationProfileAssignmentId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.HybridCompute/machines/%s/providers/Microsoft.AutoManage/configurationProfileAssignments/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MachineName, id.ConfigurationProfileAssignmentName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Providers 2 Configuration Profile Assignment ID +func (id Providers2ConfigurationProfileAssignmentId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftHybridCompute", "Microsoft.HybridCompute", "Microsoft.HybridCompute"), + resourceids.StaticSegment("staticMachines", "machines", "machines"), + resourceids.UserSpecifiedSegment("machineName", "machineValue"), + resourceids.StaticSegment("staticProviders2", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftAutoManage", "Microsoft.AutoManage", "Microsoft.AutoManage"), + resourceids.StaticSegment("staticConfigurationProfileAssignments", "configurationProfileAssignments", "configurationProfileAssignments"), + resourceids.UserSpecifiedSegment("configurationProfileAssignmentName", "configurationProfileAssignmentValue"), + } +} + +// String returns a human-readable description of this Providers 2 Configuration Profile Assignment ID +func (id Providers2ConfigurationProfileAssignmentId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Machine Name: %q", id.MachineName), + fmt.Sprintf("Configuration Profile Assignment Name: %q", id.ConfigurationProfileAssignmentName), + } + return fmt.Sprintf("Providers 2 Configuration Profile Assignment (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/method_createorupdate.go new file mode 100644 index 0000000000000..0fe8c07735ca8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/method_createorupdate.go @@ -0,0 +1,59 @@ +package configurationprofilehcrpassignments + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ConfigurationProfileAssignment +} + +// CreateOrUpdate ... +func (c ConfigurationProfileHCRPAssignmentsClient) CreateOrUpdate(ctx context.Context, id Providers2ConfigurationProfileAssignmentId, input ConfigurationProfileAssignment) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ConfigurationProfileAssignment + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/method_delete.go new file mode 100644 index 0000000000000..61095d5c8d161 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/method_delete.go @@ -0,0 +1,47 @@ +package configurationprofilehcrpassignments + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c ConfigurationProfileHCRPAssignmentsClient) Delete(ctx context.Context, id Providers2ConfigurationProfileAssignmentId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/method_get.go new file mode 100644 index 0000000000000..3a1ed77463147 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/method_get.go @@ -0,0 +1,54 @@ +package configurationprofilehcrpassignments + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ConfigurationProfileAssignment +} + +// Get ... +func (c ConfigurationProfileHCRPAssignmentsClient) Get(ctx context.Context, id Providers2ConfigurationProfileAssignmentId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ConfigurationProfileAssignment + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/model_configurationprofileassignment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/model_configurationprofileassignment.go new file mode 100644 index 0000000000000..66f6dd5a32c86 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/model_configurationprofileassignment.go @@ -0,0 +1,17 @@ +package configurationprofilehcrpassignments + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ConfigurationProfileAssignment struct { + Id *string `json:"id,omitempty"` + ManagedBy *string `json:"managedBy,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ConfigurationProfileAssignmentProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/model_configurationprofileassignmentproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/model_configurationprofileassignmentproperties.go new file mode 100644 index 0000000000000..0b15165a0a7b4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/model_configurationprofileassignmentproperties.go @@ -0,0 +1,10 @@ +package configurationprofilehcrpassignments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ConfigurationProfileAssignmentProperties struct { + ConfigurationProfile *string `json:"configurationProfile,omitempty"` + Status *string `json:"status,omitempty"` + TargetId *string `json:"targetId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/version.go new file mode 100644 index 0000000000000..3a70074ba4cd4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/version.go @@ -0,0 +1,12 @@ +package configurationprofilehcrpassignments + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2022-05-04" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/configurationprofilehcrpassignments/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/README.md deleted file mode 100644 index 37d2b0079fe28..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/README.md +++ /dev/null @@ -1,437 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets` Documentation - -The `virtualmachinescalesets` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets" -``` - - -### Client Initialization - -```go -client := virtualmachinescalesets.NewVirtualMachineScaleSetsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VirtualMachineScaleSetsClient.ApproveRollingUpgrade` - -```go -ctx := context.TODO() -id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -payload := virtualmachinescalesets.VirtualMachineScaleSetVMInstanceIDs{ - // ... -} - - -if err := client.ApproveRollingUpgradeThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualMachineScaleSetsClient.ConvertToSinglePlacementGroup` - -```go -ctx := context.TODO() -id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -payload := virtualmachinescalesets.VMScaleSetConvertToSinglePlacementGroupInput{ - // ... -} - - -read, err := client.ConvertToSinglePlacementGroup(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualMachineScaleSetsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -payload := virtualmachinescalesets.VirtualMachineScaleSet{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload, virtualmachinescalesets.DefaultCreateOrUpdateOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualMachineScaleSetsClient.Deallocate` - -```go -ctx := context.TODO() -id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -payload := virtualmachinescalesets.VirtualMachineScaleSetVMInstanceIDs{ - // ... -} - - -if err := client.DeallocateThenPoll(ctx, id, payload, virtualmachinescalesets.DefaultDeallocateOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualMachineScaleSetsClient.Delete` - -```go -ctx := context.TODO() -id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -if err := client.DeleteThenPoll(ctx, id, virtualmachinescalesets.DefaultDeleteOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualMachineScaleSetsClient.DeleteInstances` - -```go -ctx := context.TODO() -id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -payload := virtualmachinescalesets.VirtualMachineScaleSetVMInstanceRequiredIDs{ - // ... -} - - -if err := client.DeleteInstancesThenPoll(ctx, id, payload, virtualmachinescalesets.DefaultDeleteInstancesOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualMachineScaleSetsClient.ForceRecoveryServiceFabricPlatformUpdateDomainWalk` - -```go -ctx := context.TODO() -id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -read, err := client.ForceRecoveryServiceFabricPlatformUpdateDomainWalk(ctx, id, virtualmachinescalesets.DefaultForceRecoveryServiceFabricPlatformUpdateDomainWalkOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualMachineScaleSetsClient.Get` - -```go -ctx := context.TODO() -id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -read, err := client.Get(ctx, id, virtualmachinescalesets.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualMachineScaleSetsClient.GetInstanceView` - -```go -ctx := context.TODO() -id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -read, err := client.GetInstanceView(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualMachineScaleSetsClient.GetOSUpgradeHistory` - -```go -ctx := context.TODO() -id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -// alternatively `client.GetOSUpgradeHistory(ctx, id)` can be used to do batched pagination -items, err := client.GetOSUpgradeHistoryComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualMachineScaleSetsClient.List` - -```go -ctx := context.TODO() -id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualMachineScaleSetsClient.ListAll` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualMachineScaleSetsClient.ListByLocation` - -```go -ctx := context.TODO() -id := virtualmachinescalesets.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -// alternatively `client.ListByLocation(ctx, id)` can be used to do batched pagination -items, err := client.ListByLocationComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualMachineScaleSetsClient.ListSkus` - -```go -ctx := context.TODO() -id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -// alternatively `client.ListSkus(ctx, id)` can be used to do batched pagination -items, err := client.ListSkusComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualMachineScaleSetsClient.PerformMaintenance` - -```go -ctx := context.TODO() -id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -payload := virtualmachinescalesets.VirtualMachineScaleSetVMInstanceIDs{ - // ... -} - - -if err := client.PerformMaintenanceThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualMachineScaleSetsClient.PowerOff` - -```go -ctx := context.TODO() -id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -payload := virtualmachinescalesets.VirtualMachineScaleSetVMInstanceIDs{ - // ... -} - - -if err := client.PowerOffThenPoll(ctx, id, payload, virtualmachinescalesets.DefaultPowerOffOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualMachineScaleSetsClient.Reapply` - -```go -ctx := context.TODO() -id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -if err := client.ReapplyThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualMachineScaleSetsClient.Redeploy` - -```go -ctx := context.TODO() -id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -payload := virtualmachinescalesets.VirtualMachineScaleSetVMInstanceIDs{ - // ... -} - - -if err := client.RedeployThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualMachineScaleSetsClient.Reimage` - -```go -ctx := context.TODO() -id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -payload := virtualmachinescalesets.VirtualMachineScaleSetReimageParameters{ - // ... -} - - -if err := client.ReimageThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualMachineScaleSetsClient.ReimageAll` - -```go -ctx := context.TODO() -id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -payload := virtualmachinescalesets.VirtualMachineScaleSetVMInstanceIDs{ - // ... -} - - -if err := client.ReimageAllThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualMachineScaleSetsClient.Restart` - -```go -ctx := context.TODO() -id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -payload := virtualmachinescalesets.VirtualMachineScaleSetVMInstanceIDs{ - // ... -} - - -if err := client.RestartThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualMachineScaleSetsClient.SetOrchestrationServiceState` - -```go -ctx := context.TODO() -id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -payload := virtualmachinescalesets.OrchestrationServiceStateInput{ - // ... -} - - -if err := client.SetOrchestrationServiceStateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualMachineScaleSetsClient.Start` - -```go -ctx := context.TODO() -id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -payload := virtualmachinescalesets.VirtualMachineScaleSetVMInstanceIDs{ - // ... -} - - -if err := client.StartThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualMachineScaleSetsClient.Update` - -```go -ctx := context.TODO() -id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -payload := virtualmachinescalesets.VirtualMachineScaleSetUpdate{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload, virtualmachinescalesets.DefaultUpdateOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualMachineScaleSetsClient.UpdateInstances` - -```go -ctx := context.TODO() -id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -payload := virtualmachinescalesets.VirtualMachineScaleSetVMInstanceRequiredIDs{ - // ... -} - - -if err := client.UpdateInstancesThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/constants.go deleted file mode 100644 index 4dcf9ec638561..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/constants.go +++ /dev/null @@ -1,1807 +0,0 @@ -package virtualmachinescalesets - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CachingTypes string - -const ( - CachingTypesNone CachingTypes = "None" - CachingTypesReadOnly CachingTypes = "ReadOnly" - CachingTypesReadWrite CachingTypes = "ReadWrite" -) - -func PossibleValuesForCachingTypes() []string { - return []string{ - string(CachingTypesNone), - string(CachingTypesReadOnly), - string(CachingTypesReadWrite), - } -} - -func (s *CachingTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCachingTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCachingTypes(input string) (*CachingTypes, error) { - vals := map[string]CachingTypes{ - "none": CachingTypesNone, - "readonly": CachingTypesReadOnly, - "readwrite": CachingTypesReadWrite, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CachingTypes(input) - return &out, nil -} - -type ComponentNames string - -const ( - ComponentNamesMicrosoftNegativeWindowsNegativeShellNegativeSetup ComponentNames = "Microsoft-Windows-Shell-Setup" -) - -func PossibleValuesForComponentNames() []string { - return []string{ - string(ComponentNamesMicrosoftNegativeWindowsNegativeShellNegativeSetup), - } -} - -func (s *ComponentNames) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseComponentNames(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseComponentNames(input string) (*ComponentNames, error) { - vals := map[string]ComponentNames{ - "microsoft-windows-shell-setup": ComponentNamesMicrosoftNegativeWindowsNegativeShellNegativeSetup, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ComponentNames(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type DiffDiskOptions string - -const ( - DiffDiskOptionsLocal DiffDiskOptions = "Local" -) - -func PossibleValuesForDiffDiskOptions() []string { - return []string{ - string(DiffDiskOptionsLocal), - } -} - -func (s *DiffDiskOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDiffDiskOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDiffDiskOptions(input string) (*DiffDiskOptions, error) { - vals := map[string]DiffDiskOptions{ - "local": DiffDiskOptionsLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DiffDiskOptions(input) - return &out, nil -} - -type DiffDiskPlacement string - -const ( - DiffDiskPlacementCacheDisk DiffDiskPlacement = "CacheDisk" - DiffDiskPlacementNVMeDisk DiffDiskPlacement = "NvmeDisk" - DiffDiskPlacementResourceDisk DiffDiskPlacement = "ResourceDisk" -) - -func PossibleValuesForDiffDiskPlacement() []string { - return []string{ - string(DiffDiskPlacementCacheDisk), - string(DiffDiskPlacementNVMeDisk), - string(DiffDiskPlacementResourceDisk), - } -} - -func (s *DiffDiskPlacement) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDiffDiskPlacement(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDiffDiskPlacement(input string) (*DiffDiskPlacement, error) { - vals := map[string]DiffDiskPlacement{ - "cachedisk": DiffDiskPlacementCacheDisk, - "nvmedisk": DiffDiskPlacementNVMeDisk, - "resourcedisk": DiffDiskPlacementResourceDisk, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DiffDiskPlacement(input) - return &out, nil -} - -type DiskCreateOptionTypes string - -const ( - DiskCreateOptionTypesAttach DiskCreateOptionTypes = "Attach" - DiskCreateOptionTypesCopy DiskCreateOptionTypes = "Copy" - DiskCreateOptionTypesEmpty DiskCreateOptionTypes = "Empty" - DiskCreateOptionTypesFromImage DiskCreateOptionTypes = "FromImage" - DiskCreateOptionTypesRestore DiskCreateOptionTypes = "Restore" -) - -func PossibleValuesForDiskCreateOptionTypes() []string { - return []string{ - string(DiskCreateOptionTypesAttach), - string(DiskCreateOptionTypesCopy), - string(DiskCreateOptionTypesEmpty), - string(DiskCreateOptionTypesFromImage), - string(DiskCreateOptionTypesRestore), - } -} - -func (s *DiskCreateOptionTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDiskCreateOptionTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDiskCreateOptionTypes(input string) (*DiskCreateOptionTypes, error) { - vals := map[string]DiskCreateOptionTypes{ - "attach": DiskCreateOptionTypesAttach, - "copy": DiskCreateOptionTypesCopy, - "empty": DiskCreateOptionTypesEmpty, - "fromimage": DiskCreateOptionTypesFromImage, - "restore": DiskCreateOptionTypesRestore, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DiskCreateOptionTypes(input) - return &out, nil -} - -type DiskDeleteOptionTypes string - -const ( - DiskDeleteOptionTypesDelete DiskDeleteOptionTypes = "Delete" - DiskDeleteOptionTypesDetach DiskDeleteOptionTypes = "Detach" -) - -func PossibleValuesForDiskDeleteOptionTypes() []string { - return []string{ - string(DiskDeleteOptionTypesDelete), - string(DiskDeleteOptionTypesDetach), - } -} - -func (s *DiskDeleteOptionTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDiskDeleteOptionTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDiskDeleteOptionTypes(input string) (*DiskDeleteOptionTypes, error) { - vals := map[string]DiskDeleteOptionTypes{ - "delete": DiskDeleteOptionTypesDelete, - "detach": DiskDeleteOptionTypesDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DiskDeleteOptionTypes(input) - return &out, nil -} - -type DomainNameLabelScopeTypes string - -const ( - DomainNameLabelScopeTypesNoReuse DomainNameLabelScopeTypes = "NoReuse" - DomainNameLabelScopeTypesResourceGroupReuse DomainNameLabelScopeTypes = "ResourceGroupReuse" - DomainNameLabelScopeTypesSubscriptionReuse DomainNameLabelScopeTypes = "SubscriptionReuse" - DomainNameLabelScopeTypesTenantReuse DomainNameLabelScopeTypes = "TenantReuse" -) - -func PossibleValuesForDomainNameLabelScopeTypes() []string { - return []string{ - string(DomainNameLabelScopeTypesNoReuse), - string(DomainNameLabelScopeTypesResourceGroupReuse), - string(DomainNameLabelScopeTypesSubscriptionReuse), - string(DomainNameLabelScopeTypesTenantReuse), - } -} - -func (s *DomainNameLabelScopeTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDomainNameLabelScopeTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDomainNameLabelScopeTypes(input string) (*DomainNameLabelScopeTypes, error) { - vals := map[string]DomainNameLabelScopeTypes{ - "noreuse": DomainNameLabelScopeTypesNoReuse, - "resourcegroupreuse": DomainNameLabelScopeTypesResourceGroupReuse, - "subscriptionreuse": DomainNameLabelScopeTypesSubscriptionReuse, - "tenantreuse": DomainNameLabelScopeTypesTenantReuse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DomainNameLabelScopeTypes(input) - return &out, nil -} - -type ExpandTypesForGetVMScaleSets string - -const ( - ExpandTypesForGetVMScaleSetsUserData ExpandTypesForGetVMScaleSets = "userData" -) - -func PossibleValuesForExpandTypesForGetVMScaleSets() []string { - return []string{ - string(ExpandTypesForGetVMScaleSetsUserData), - } -} - -func (s *ExpandTypesForGetVMScaleSets) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpandTypesForGetVMScaleSets(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpandTypesForGetVMScaleSets(input string) (*ExpandTypesForGetVMScaleSets, error) { - vals := map[string]ExpandTypesForGetVMScaleSets{ - "userdata": ExpandTypesForGetVMScaleSetsUserData, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpandTypesForGetVMScaleSets(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LinuxPatchAssessmentMode string - -const ( - LinuxPatchAssessmentModeAutomaticByPlatform LinuxPatchAssessmentMode = "AutomaticByPlatform" - LinuxPatchAssessmentModeImageDefault LinuxPatchAssessmentMode = "ImageDefault" -) - -func PossibleValuesForLinuxPatchAssessmentMode() []string { - return []string{ - string(LinuxPatchAssessmentModeAutomaticByPlatform), - string(LinuxPatchAssessmentModeImageDefault), - } -} - -func (s *LinuxPatchAssessmentMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLinuxPatchAssessmentMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLinuxPatchAssessmentMode(input string) (*LinuxPatchAssessmentMode, error) { - vals := map[string]LinuxPatchAssessmentMode{ - "automaticbyplatform": LinuxPatchAssessmentModeAutomaticByPlatform, - "imagedefault": LinuxPatchAssessmentModeImageDefault, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LinuxPatchAssessmentMode(input) - return &out, nil -} - -type LinuxVMGuestPatchAutomaticByPlatformRebootSetting string - -const ( - LinuxVMGuestPatchAutomaticByPlatformRebootSettingAlways LinuxVMGuestPatchAutomaticByPlatformRebootSetting = "Always" - LinuxVMGuestPatchAutomaticByPlatformRebootSettingIfRequired LinuxVMGuestPatchAutomaticByPlatformRebootSetting = "IfRequired" - LinuxVMGuestPatchAutomaticByPlatformRebootSettingNever LinuxVMGuestPatchAutomaticByPlatformRebootSetting = "Never" - LinuxVMGuestPatchAutomaticByPlatformRebootSettingUnknown LinuxVMGuestPatchAutomaticByPlatformRebootSetting = "Unknown" -) - -func PossibleValuesForLinuxVMGuestPatchAutomaticByPlatformRebootSetting() []string { - return []string{ - string(LinuxVMGuestPatchAutomaticByPlatformRebootSettingAlways), - string(LinuxVMGuestPatchAutomaticByPlatformRebootSettingIfRequired), - string(LinuxVMGuestPatchAutomaticByPlatformRebootSettingNever), - string(LinuxVMGuestPatchAutomaticByPlatformRebootSettingUnknown), - } -} - -func (s *LinuxVMGuestPatchAutomaticByPlatformRebootSetting) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLinuxVMGuestPatchAutomaticByPlatformRebootSetting(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLinuxVMGuestPatchAutomaticByPlatformRebootSetting(input string) (*LinuxVMGuestPatchAutomaticByPlatformRebootSetting, error) { - vals := map[string]LinuxVMGuestPatchAutomaticByPlatformRebootSetting{ - "always": LinuxVMGuestPatchAutomaticByPlatformRebootSettingAlways, - "ifrequired": LinuxVMGuestPatchAutomaticByPlatformRebootSettingIfRequired, - "never": LinuxVMGuestPatchAutomaticByPlatformRebootSettingNever, - "unknown": LinuxVMGuestPatchAutomaticByPlatformRebootSettingUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LinuxVMGuestPatchAutomaticByPlatformRebootSetting(input) - return &out, nil -} - -type LinuxVMGuestPatchMode string - -const ( - LinuxVMGuestPatchModeAutomaticByPlatform LinuxVMGuestPatchMode = "AutomaticByPlatform" - LinuxVMGuestPatchModeImageDefault LinuxVMGuestPatchMode = "ImageDefault" -) - -func PossibleValuesForLinuxVMGuestPatchMode() []string { - return []string{ - string(LinuxVMGuestPatchModeAutomaticByPlatform), - string(LinuxVMGuestPatchModeImageDefault), - } -} - -func (s *LinuxVMGuestPatchMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLinuxVMGuestPatchMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLinuxVMGuestPatchMode(input string) (*LinuxVMGuestPatchMode, error) { - vals := map[string]LinuxVMGuestPatchMode{ - "automaticbyplatform": LinuxVMGuestPatchModeAutomaticByPlatform, - "imagedefault": LinuxVMGuestPatchModeImageDefault, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LinuxVMGuestPatchMode(input) - return &out, nil -} - -type Mode string - -const ( - ModeAudit Mode = "Audit" - ModeEnforce Mode = "Enforce" -) - -func PossibleValuesForMode() []string { - return []string{ - string(ModeAudit), - string(ModeEnforce), - } -} - -func (s *Mode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMode(input string) (*Mode, error) { - vals := map[string]Mode{ - "audit": ModeAudit, - "enforce": ModeEnforce, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Mode(input) - return &out, nil -} - -type NetworkApiVersion string - -const ( - NetworkApiVersionTwoZeroTwoZeroNegativeOneOneNegativeZeroOne NetworkApiVersion = "2020-11-01" -) - -func PossibleValuesForNetworkApiVersion() []string { - return []string{ - string(NetworkApiVersionTwoZeroTwoZeroNegativeOneOneNegativeZeroOne), - } -} - -func (s *NetworkApiVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkApiVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkApiVersion(input string) (*NetworkApiVersion, error) { - vals := map[string]NetworkApiVersion{ - "2020-11-01": NetworkApiVersionTwoZeroTwoZeroNegativeOneOneNegativeZeroOne, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkApiVersion(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, - "floating": NetworkInterfaceAuxiliaryModeFloating, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceAuxiliarySku string - -const ( - NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" - NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" - NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" - NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" - NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { - return []string{ - string(NetworkInterfaceAuxiliarySkuAEight), - string(NetworkInterfaceAuxiliarySkuAFour), - string(NetworkInterfaceAuxiliarySkuAOne), - string(NetworkInterfaceAuxiliarySkuATwo), - string(NetworkInterfaceAuxiliarySkuNone), - } -} - -func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliarySku(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { - vals := map[string]NetworkInterfaceAuxiliarySku{ - "a8": NetworkInterfaceAuxiliarySkuAEight, - "a4": NetworkInterfaceAuxiliarySkuAFour, - "a1": NetworkInterfaceAuxiliarySkuAOne, - "a2": NetworkInterfaceAuxiliarySkuATwo, - "none": NetworkInterfaceAuxiliarySkuNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliarySku(input) - return &out, nil -} - -type OperatingSystemTypes string - -const ( - OperatingSystemTypesLinux OperatingSystemTypes = "Linux" - OperatingSystemTypesWindows OperatingSystemTypes = "Windows" -) - -func PossibleValuesForOperatingSystemTypes() []string { - return []string{ - string(OperatingSystemTypesLinux), - string(OperatingSystemTypesWindows), - } -} - -func (s *OperatingSystemTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOperatingSystemTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOperatingSystemTypes(input string) (*OperatingSystemTypes, error) { - vals := map[string]OperatingSystemTypes{ - "linux": OperatingSystemTypesLinux, - "windows": OperatingSystemTypesWindows, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OperatingSystemTypes(input) - return &out, nil -} - -type OrchestrationMode string - -const ( - OrchestrationModeFlexible OrchestrationMode = "Flexible" - OrchestrationModeUniform OrchestrationMode = "Uniform" -) - -func PossibleValuesForOrchestrationMode() []string { - return []string{ - string(OrchestrationModeFlexible), - string(OrchestrationModeUniform), - } -} - -func (s *OrchestrationMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOrchestrationMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOrchestrationMode(input string) (*OrchestrationMode, error) { - vals := map[string]OrchestrationMode{ - "flexible": OrchestrationModeFlexible, - "uniform": OrchestrationModeUniform, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OrchestrationMode(input) - return &out, nil -} - -type OrchestrationServiceNames string - -const ( - OrchestrationServiceNamesAutomaticRepairs OrchestrationServiceNames = "AutomaticRepairs" -) - -func PossibleValuesForOrchestrationServiceNames() []string { - return []string{ - string(OrchestrationServiceNamesAutomaticRepairs), - } -} - -func (s *OrchestrationServiceNames) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOrchestrationServiceNames(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOrchestrationServiceNames(input string) (*OrchestrationServiceNames, error) { - vals := map[string]OrchestrationServiceNames{ - "automaticrepairs": OrchestrationServiceNamesAutomaticRepairs, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OrchestrationServiceNames(input) - return &out, nil -} - -type OrchestrationServiceState string - -const ( - OrchestrationServiceStateNotRunning OrchestrationServiceState = "NotRunning" - OrchestrationServiceStateRunning OrchestrationServiceState = "Running" - OrchestrationServiceStateSuspended OrchestrationServiceState = "Suspended" -) - -func PossibleValuesForOrchestrationServiceState() []string { - return []string{ - string(OrchestrationServiceStateNotRunning), - string(OrchestrationServiceStateRunning), - string(OrchestrationServiceStateSuspended), - } -} - -func (s *OrchestrationServiceState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOrchestrationServiceState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOrchestrationServiceState(input string) (*OrchestrationServiceState, error) { - vals := map[string]OrchestrationServiceState{ - "notrunning": OrchestrationServiceStateNotRunning, - "running": OrchestrationServiceStateRunning, - "suspended": OrchestrationServiceStateSuspended, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OrchestrationServiceState(input) - return &out, nil -} - -type OrchestrationServiceStateAction string - -const ( - OrchestrationServiceStateActionResume OrchestrationServiceStateAction = "Resume" - OrchestrationServiceStateActionSuspend OrchestrationServiceStateAction = "Suspend" -) - -func PossibleValuesForOrchestrationServiceStateAction() []string { - return []string{ - string(OrchestrationServiceStateActionResume), - string(OrchestrationServiceStateActionSuspend), - } -} - -func (s *OrchestrationServiceStateAction) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOrchestrationServiceStateAction(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOrchestrationServiceStateAction(input string) (*OrchestrationServiceStateAction, error) { - vals := map[string]OrchestrationServiceStateAction{ - "resume": OrchestrationServiceStateActionResume, - "suspend": OrchestrationServiceStateActionSuspend, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OrchestrationServiceStateAction(input) - return &out, nil -} - -type PassNames string - -const ( - PassNamesOobeSystem PassNames = "OobeSystem" -) - -func PossibleValuesForPassNames() []string { - return []string{ - string(PassNamesOobeSystem), - } -} - -func (s *PassNames) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePassNames(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePassNames(input string) (*PassNames, error) { - vals := map[string]PassNames{ - "oobesystem": PassNamesOobeSystem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PassNames(input) - return &out, nil -} - -type ProtocolTypes string - -const ( - ProtocolTypesHTTP ProtocolTypes = "Http" - ProtocolTypesHTTPS ProtocolTypes = "Https" -) - -func PossibleValuesForProtocolTypes() []string { - return []string{ - string(ProtocolTypesHTTP), - string(ProtocolTypesHTTPS), - } -} - -func (s *ProtocolTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProtocolTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProtocolTypes(input string) (*ProtocolTypes, error) { - vals := map[string]ProtocolTypes{ - "http": ProtocolTypesHTTP, - "https": ProtocolTypesHTTPS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProtocolTypes(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RepairAction string - -const ( - RepairActionReimage RepairAction = "Reimage" - RepairActionReplace RepairAction = "Replace" - RepairActionRestart RepairAction = "Restart" -) - -func PossibleValuesForRepairAction() []string { - return []string{ - string(RepairActionReimage), - string(RepairActionReplace), - string(RepairActionRestart), - } -} - -func (s *RepairAction) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRepairAction(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRepairAction(input string) (*RepairAction, error) { - vals := map[string]RepairAction{ - "reimage": RepairActionReimage, - "replace": RepairActionReplace, - "restart": RepairActionRestart, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RepairAction(input) - return &out, nil -} - -type SecurityEncryptionTypes string - -const ( - SecurityEncryptionTypesDiskWithVMGuestState SecurityEncryptionTypes = "DiskWithVMGuestState" - SecurityEncryptionTypesNonPersistedTPM SecurityEncryptionTypes = "NonPersistedTPM" - SecurityEncryptionTypesVMGuestStateOnly SecurityEncryptionTypes = "VMGuestStateOnly" -) - -func PossibleValuesForSecurityEncryptionTypes() []string { - return []string{ - string(SecurityEncryptionTypesDiskWithVMGuestState), - string(SecurityEncryptionTypesNonPersistedTPM), - string(SecurityEncryptionTypesVMGuestStateOnly), - } -} - -func (s *SecurityEncryptionTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityEncryptionTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityEncryptionTypes(input string) (*SecurityEncryptionTypes, error) { - vals := map[string]SecurityEncryptionTypes{ - "diskwithvmgueststate": SecurityEncryptionTypesDiskWithVMGuestState, - "nonpersistedtpm": SecurityEncryptionTypesNonPersistedTPM, - "vmgueststateonly": SecurityEncryptionTypesVMGuestStateOnly, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityEncryptionTypes(input) - return &out, nil -} - -type SecurityTypes string - -const ( - SecurityTypesConfidentialVM SecurityTypes = "ConfidentialVM" - SecurityTypesTrustedLaunch SecurityTypes = "TrustedLaunch" -) - -func PossibleValuesForSecurityTypes() []string { - return []string{ - string(SecurityTypesConfidentialVM), - string(SecurityTypesTrustedLaunch), - } -} - -func (s *SecurityTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityTypes(input string) (*SecurityTypes, error) { - vals := map[string]SecurityTypes{ - "confidentialvm": SecurityTypesConfidentialVM, - "trustedlaunch": SecurityTypesTrustedLaunch, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityTypes(input) - return &out, nil -} - -type SettingNames string - -const ( - SettingNamesAutoLogon SettingNames = "AutoLogon" - SettingNamesFirstLogonCommands SettingNames = "FirstLogonCommands" -) - -func PossibleValuesForSettingNames() []string { - return []string{ - string(SettingNamesAutoLogon), - string(SettingNamesFirstLogonCommands), - } -} - -func (s *SettingNames) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSettingNames(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSettingNames(input string) (*SettingNames, error) { - vals := map[string]SettingNames{ - "autologon": SettingNamesAutoLogon, - "firstlogoncommands": SettingNamesFirstLogonCommands, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SettingNames(input) - return &out, nil -} - -type StatusLevelTypes string - -const ( - StatusLevelTypesError StatusLevelTypes = "Error" - StatusLevelTypesInfo StatusLevelTypes = "Info" - StatusLevelTypesWarning StatusLevelTypes = "Warning" -) - -func PossibleValuesForStatusLevelTypes() []string { - return []string{ - string(StatusLevelTypesError), - string(StatusLevelTypesInfo), - string(StatusLevelTypesWarning), - } -} - -func (s *StatusLevelTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseStatusLevelTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseStatusLevelTypes(input string) (*StatusLevelTypes, error) { - vals := map[string]StatusLevelTypes{ - "error": StatusLevelTypesError, - "info": StatusLevelTypesInfo, - "warning": StatusLevelTypesWarning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StatusLevelTypes(input) - return &out, nil -} - -type StorageAccountTypes string - -const ( - StorageAccountTypesPremiumLRS StorageAccountTypes = "Premium_LRS" - StorageAccountTypesPremiumVTwoLRS StorageAccountTypes = "PremiumV2_LRS" - StorageAccountTypesPremiumZRS StorageAccountTypes = "Premium_ZRS" - StorageAccountTypesStandardLRS StorageAccountTypes = "Standard_LRS" - StorageAccountTypesStandardSSDLRS StorageAccountTypes = "StandardSSD_LRS" - StorageAccountTypesStandardSSDZRS StorageAccountTypes = "StandardSSD_ZRS" - StorageAccountTypesUltraSSDLRS StorageAccountTypes = "UltraSSD_LRS" -) - -func PossibleValuesForStorageAccountTypes() []string { - return []string{ - string(StorageAccountTypesPremiumLRS), - string(StorageAccountTypesPremiumVTwoLRS), - string(StorageAccountTypesPremiumZRS), - string(StorageAccountTypesStandardLRS), - string(StorageAccountTypesStandardSSDLRS), - string(StorageAccountTypesStandardSSDZRS), - string(StorageAccountTypesUltraSSDLRS), - } -} - -func (s *StorageAccountTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseStorageAccountTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseStorageAccountTypes(input string) (*StorageAccountTypes, error) { - vals := map[string]StorageAccountTypes{ - "premium_lrs": StorageAccountTypesPremiumLRS, - "premiumv2_lrs": StorageAccountTypesPremiumVTwoLRS, - "premium_zrs": StorageAccountTypesPremiumZRS, - "standard_lrs": StorageAccountTypesStandardLRS, - "standardssd_lrs": StorageAccountTypesStandardSSDLRS, - "standardssd_zrs": StorageAccountTypesStandardSSDZRS, - "ultrassd_lrs": StorageAccountTypesUltraSSDLRS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StorageAccountTypes(input) - return &out, nil -} - -type UpgradeMode string - -const ( - UpgradeModeAutomatic UpgradeMode = "Automatic" - UpgradeModeManual UpgradeMode = "Manual" - UpgradeModeRolling UpgradeMode = "Rolling" -) - -func PossibleValuesForUpgradeMode() []string { - return []string{ - string(UpgradeModeAutomatic), - string(UpgradeModeManual), - string(UpgradeModeRolling), - } -} - -func (s *UpgradeMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseUpgradeMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseUpgradeMode(input string) (*UpgradeMode, error) { - vals := map[string]UpgradeMode{ - "automatic": UpgradeModeAutomatic, - "manual": UpgradeModeManual, - "rolling": UpgradeModeRolling, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := UpgradeMode(input) - return &out, nil -} - -type UpgradeOperationInvoker string - -const ( - UpgradeOperationInvokerPlatform UpgradeOperationInvoker = "Platform" - UpgradeOperationInvokerUnknown UpgradeOperationInvoker = "Unknown" - UpgradeOperationInvokerUser UpgradeOperationInvoker = "User" -) - -func PossibleValuesForUpgradeOperationInvoker() []string { - return []string{ - string(UpgradeOperationInvokerPlatform), - string(UpgradeOperationInvokerUnknown), - string(UpgradeOperationInvokerUser), - } -} - -func (s *UpgradeOperationInvoker) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseUpgradeOperationInvoker(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseUpgradeOperationInvoker(input string) (*UpgradeOperationInvoker, error) { - vals := map[string]UpgradeOperationInvoker{ - "platform": UpgradeOperationInvokerPlatform, - "unknown": UpgradeOperationInvokerUnknown, - "user": UpgradeOperationInvokerUser, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := UpgradeOperationInvoker(input) - return &out, nil -} - -type UpgradeState string - -const ( - UpgradeStateCancelled UpgradeState = "Cancelled" - UpgradeStateCompleted UpgradeState = "Completed" - UpgradeStateFaulted UpgradeState = "Faulted" - UpgradeStateRollingForward UpgradeState = "RollingForward" -) - -func PossibleValuesForUpgradeState() []string { - return []string{ - string(UpgradeStateCancelled), - string(UpgradeStateCompleted), - string(UpgradeStateFaulted), - string(UpgradeStateRollingForward), - } -} - -func (s *UpgradeState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseUpgradeState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseUpgradeState(input string) (*UpgradeState, error) { - vals := map[string]UpgradeState{ - "cancelled": UpgradeStateCancelled, - "completed": UpgradeStateCompleted, - "faulted": UpgradeStateFaulted, - "rollingforward": UpgradeStateRollingForward, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := UpgradeState(input) - return &out, nil -} - -type VirtualMachineEvictionPolicyTypes string - -const ( - VirtualMachineEvictionPolicyTypesDeallocate VirtualMachineEvictionPolicyTypes = "Deallocate" - VirtualMachineEvictionPolicyTypesDelete VirtualMachineEvictionPolicyTypes = "Delete" -) - -func PossibleValuesForVirtualMachineEvictionPolicyTypes() []string { - return []string{ - string(VirtualMachineEvictionPolicyTypesDeallocate), - string(VirtualMachineEvictionPolicyTypesDelete), - } -} - -func (s *VirtualMachineEvictionPolicyTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualMachineEvictionPolicyTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualMachineEvictionPolicyTypes(input string) (*VirtualMachineEvictionPolicyTypes, error) { - vals := map[string]VirtualMachineEvictionPolicyTypes{ - "deallocate": VirtualMachineEvictionPolicyTypesDeallocate, - "delete": VirtualMachineEvictionPolicyTypesDelete, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualMachineEvictionPolicyTypes(input) - return &out, nil -} - -type VirtualMachinePriorityTypes string - -const ( - VirtualMachinePriorityTypesLow VirtualMachinePriorityTypes = "Low" - VirtualMachinePriorityTypesRegular VirtualMachinePriorityTypes = "Regular" - VirtualMachinePriorityTypesSpot VirtualMachinePriorityTypes = "Spot" -) - -func PossibleValuesForVirtualMachinePriorityTypes() []string { - return []string{ - string(VirtualMachinePriorityTypesLow), - string(VirtualMachinePriorityTypesRegular), - string(VirtualMachinePriorityTypesSpot), - } -} - -func (s *VirtualMachinePriorityTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualMachinePriorityTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualMachinePriorityTypes(input string) (*VirtualMachinePriorityTypes, error) { - vals := map[string]VirtualMachinePriorityTypes{ - "low": VirtualMachinePriorityTypesLow, - "regular": VirtualMachinePriorityTypesRegular, - "spot": VirtualMachinePriorityTypesSpot, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualMachinePriorityTypes(input) - return &out, nil -} - -type VirtualMachineScaleSetScaleInRules string - -const ( - VirtualMachineScaleSetScaleInRulesDefault VirtualMachineScaleSetScaleInRules = "Default" - VirtualMachineScaleSetScaleInRulesNewestVM VirtualMachineScaleSetScaleInRules = "NewestVM" - VirtualMachineScaleSetScaleInRulesOldestVM VirtualMachineScaleSetScaleInRules = "OldestVM" -) - -func PossibleValuesForVirtualMachineScaleSetScaleInRules() []string { - return []string{ - string(VirtualMachineScaleSetScaleInRulesDefault), - string(VirtualMachineScaleSetScaleInRulesNewestVM), - string(VirtualMachineScaleSetScaleInRulesOldestVM), - } -} - -func (s *VirtualMachineScaleSetScaleInRules) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualMachineScaleSetScaleInRules(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualMachineScaleSetScaleInRules(input string) (*VirtualMachineScaleSetScaleInRules, error) { - vals := map[string]VirtualMachineScaleSetScaleInRules{ - "default": VirtualMachineScaleSetScaleInRulesDefault, - "newestvm": VirtualMachineScaleSetScaleInRulesNewestVM, - "oldestvm": VirtualMachineScaleSetScaleInRulesOldestVM, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualMachineScaleSetScaleInRules(input) - return &out, nil -} - -type VirtualMachineScaleSetSkuScaleType string - -const ( - VirtualMachineScaleSetSkuScaleTypeAutomatic VirtualMachineScaleSetSkuScaleType = "Automatic" - VirtualMachineScaleSetSkuScaleTypeNone VirtualMachineScaleSetSkuScaleType = "None" -) - -func PossibleValuesForVirtualMachineScaleSetSkuScaleType() []string { - return []string{ - string(VirtualMachineScaleSetSkuScaleTypeAutomatic), - string(VirtualMachineScaleSetSkuScaleTypeNone), - } -} - -func (s *VirtualMachineScaleSetSkuScaleType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualMachineScaleSetSkuScaleType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualMachineScaleSetSkuScaleType(input string) (*VirtualMachineScaleSetSkuScaleType, error) { - vals := map[string]VirtualMachineScaleSetSkuScaleType{ - "automatic": VirtualMachineScaleSetSkuScaleTypeAutomatic, - "none": VirtualMachineScaleSetSkuScaleTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualMachineScaleSetSkuScaleType(input) - return &out, nil -} - -type WindowsPatchAssessmentMode string - -const ( - WindowsPatchAssessmentModeAutomaticByPlatform WindowsPatchAssessmentMode = "AutomaticByPlatform" - WindowsPatchAssessmentModeImageDefault WindowsPatchAssessmentMode = "ImageDefault" -) - -func PossibleValuesForWindowsPatchAssessmentMode() []string { - return []string{ - string(WindowsPatchAssessmentModeAutomaticByPlatform), - string(WindowsPatchAssessmentModeImageDefault), - } -} - -func (s *WindowsPatchAssessmentMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWindowsPatchAssessmentMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWindowsPatchAssessmentMode(input string) (*WindowsPatchAssessmentMode, error) { - vals := map[string]WindowsPatchAssessmentMode{ - "automaticbyplatform": WindowsPatchAssessmentModeAutomaticByPlatform, - "imagedefault": WindowsPatchAssessmentModeImageDefault, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WindowsPatchAssessmentMode(input) - return &out, nil -} - -type WindowsVMGuestPatchAutomaticByPlatformRebootSetting string - -const ( - WindowsVMGuestPatchAutomaticByPlatformRebootSettingAlways WindowsVMGuestPatchAutomaticByPlatformRebootSetting = "Always" - WindowsVMGuestPatchAutomaticByPlatformRebootSettingIfRequired WindowsVMGuestPatchAutomaticByPlatformRebootSetting = "IfRequired" - WindowsVMGuestPatchAutomaticByPlatformRebootSettingNever WindowsVMGuestPatchAutomaticByPlatformRebootSetting = "Never" - WindowsVMGuestPatchAutomaticByPlatformRebootSettingUnknown WindowsVMGuestPatchAutomaticByPlatformRebootSetting = "Unknown" -) - -func PossibleValuesForWindowsVMGuestPatchAutomaticByPlatformRebootSetting() []string { - return []string{ - string(WindowsVMGuestPatchAutomaticByPlatformRebootSettingAlways), - string(WindowsVMGuestPatchAutomaticByPlatformRebootSettingIfRequired), - string(WindowsVMGuestPatchAutomaticByPlatformRebootSettingNever), - string(WindowsVMGuestPatchAutomaticByPlatformRebootSettingUnknown), - } -} - -func (s *WindowsVMGuestPatchAutomaticByPlatformRebootSetting) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWindowsVMGuestPatchAutomaticByPlatformRebootSetting(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWindowsVMGuestPatchAutomaticByPlatformRebootSetting(input string) (*WindowsVMGuestPatchAutomaticByPlatformRebootSetting, error) { - vals := map[string]WindowsVMGuestPatchAutomaticByPlatformRebootSetting{ - "always": WindowsVMGuestPatchAutomaticByPlatformRebootSettingAlways, - "ifrequired": WindowsVMGuestPatchAutomaticByPlatformRebootSettingIfRequired, - "never": WindowsVMGuestPatchAutomaticByPlatformRebootSettingNever, - "unknown": WindowsVMGuestPatchAutomaticByPlatformRebootSettingUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WindowsVMGuestPatchAutomaticByPlatformRebootSetting(input) - return &out, nil -} - -type WindowsVMGuestPatchMode string - -const ( - WindowsVMGuestPatchModeAutomaticByOS WindowsVMGuestPatchMode = "AutomaticByOS" - WindowsVMGuestPatchModeAutomaticByPlatform WindowsVMGuestPatchMode = "AutomaticByPlatform" - WindowsVMGuestPatchModeManual WindowsVMGuestPatchMode = "Manual" -) - -func PossibleValuesForWindowsVMGuestPatchMode() []string { - return []string{ - string(WindowsVMGuestPatchModeAutomaticByOS), - string(WindowsVMGuestPatchModeAutomaticByPlatform), - string(WindowsVMGuestPatchModeManual), - } -} - -func (s *WindowsVMGuestPatchMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWindowsVMGuestPatchMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWindowsVMGuestPatchMode(input string) (*WindowsVMGuestPatchMode, error) { - vals := map[string]WindowsVMGuestPatchMode{ - "automaticbyos": WindowsVMGuestPatchModeAutomaticByOS, - "automaticbyplatform": WindowsVMGuestPatchModeAutomaticByPlatform, - "manual": WindowsVMGuestPatchModeManual, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WindowsVMGuestPatchMode(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetproperties.go deleted file mode 100644 index 6069308576696..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package virtualmachinescalesets - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualMachineScaleSetProperties struct { - AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"` - AutomaticRepairsPolicy *AutomaticRepairsPolicy `json:"automaticRepairsPolicy,omitempty"` - ConstrainedMaximumCapacity *bool `json:"constrainedMaximumCapacity,omitempty"` - DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"` - HostGroup *SubResource `json:"hostGroup,omitempty"` - OrchestrationMode *OrchestrationMode `json:"orchestrationMode,omitempty"` - Overprovision *bool `json:"overprovision,omitempty"` - PlatformFaultDomainCount *int64 `json:"platformFaultDomainCount,omitempty"` - PriorityMixPolicy *PriorityMixPolicy `json:"priorityMixPolicy,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` - ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"` - ResiliencyPolicy *ResiliencyPolicy `json:"resiliencyPolicy,omitempty"` - ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"` - ScheduledEventsPolicy *ScheduledEventsPolicy `json:"scheduledEventsPolicy,omitempty"` - SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"` - SpotRestorePolicy *SpotRestorePolicy `json:"spotRestorePolicy,omitempty"` - TimeCreated *string `json:"timeCreated,omitempty"` - UniqueId *string `json:"uniqueId,omitempty"` - UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"` - VirtualMachineProfile *VirtualMachineScaleSetVMProfile `json:"virtualMachineProfile,omitempty"` - ZoneBalance *bool `json:"zoneBalance,omitempty"` -} - -func (o *VirtualMachineScaleSetProperties) GetTimeCreatedAsTime() (*time.Time, error) { - if o.TimeCreated == nil { - return nil, nil - } - return dates.ParseAsFormat(o.TimeCreated, "2006-01-02T15:04:05Z07:00") -} - -func (o *VirtualMachineScaleSetProperties) SetTimeCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.TimeCreated = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/version.go deleted file mode 100644 index 752c8b744cb80..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualmachinescalesets - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2024-03-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesets/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/README.md new file mode 100644 index 0000000000000..d801bd3293b32 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/README.md @@ -0,0 +1,437 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets` Documentation + +The `virtualmachinescalesets` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets" +``` + + +### Client Initialization + +```go +client := virtualmachinescalesets.NewVirtualMachineScaleSetsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `VirtualMachineScaleSetsClient.ApproveRollingUpgrade` + +```go +ctx := context.TODO() +id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") + +payload := virtualmachinescalesets.VirtualMachineScaleSetVMInstanceIDs{ + // ... +} + + +if err := client.ApproveRollingUpgradeThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualMachineScaleSetsClient.ConvertToSinglePlacementGroup` + +```go +ctx := context.TODO() +id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") + +payload := virtualmachinescalesets.VMScaleSetConvertToSinglePlacementGroupInput{ + // ... +} + + +read, err := client.ConvertToSinglePlacementGroup(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `VirtualMachineScaleSetsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") + +payload := virtualmachinescalesets.VirtualMachineScaleSet{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload, virtualmachinescalesets.DefaultCreateOrUpdateOperationOptions()); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualMachineScaleSetsClient.Deallocate` + +```go +ctx := context.TODO() +id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") + +payload := virtualmachinescalesets.VirtualMachineScaleSetVMInstanceIDs{ + // ... +} + + +if err := client.DeallocateThenPoll(ctx, id, payload, virtualmachinescalesets.DefaultDeallocateOperationOptions()); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualMachineScaleSetsClient.Delete` + +```go +ctx := context.TODO() +id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") + +if err := client.DeleteThenPoll(ctx, id, virtualmachinescalesets.DefaultDeleteOperationOptions()); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualMachineScaleSetsClient.DeleteInstances` + +```go +ctx := context.TODO() +id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") + +payload := virtualmachinescalesets.VirtualMachineScaleSetVMInstanceRequiredIDs{ + // ... +} + + +if err := client.DeleteInstancesThenPoll(ctx, id, payload, virtualmachinescalesets.DefaultDeleteInstancesOperationOptions()); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualMachineScaleSetsClient.ForceRecoveryServiceFabricPlatformUpdateDomainWalk` + +```go +ctx := context.TODO() +id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") + +read, err := client.ForceRecoveryServiceFabricPlatformUpdateDomainWalk(ctx, id, virtualmachinescalesets.DefaultForceRecoveryServiceFabricPlatformUpdateDomainWalkOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `VirtualMachineScaleSetsClient.Get` + +```go +ctx := context.TODO() +id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") + +read, err := client.Get(ctx, id, virtualmachinescalesets.DefaultGetOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `VirtualMachineScaleSetsClient.GetInstanceView` + +```go +ctx := context.TODO() +id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") + +read, err := client.GetInstanceView(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `VirtualMachineScaleSetsClient.GetOSUpgradeHistory` + +```go +ctx := context.TODO() +id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") + +// alternatively `client.GetOSUpgradeHistory(ctx, id)` can be used to do batched pagination +items, err := client.GetOSUpgradeHistoryComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `VirtualMachineScaleSetsClient.List` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `VirtualMachineScaleSetsClient.ListAll` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination +items, err := client.ListAllComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `VirtualMachineScaleSetsClient.ListByLocation` + +```go +ctx := context.TODO() +id := virtualmachinescalesets.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") + +// alternatively `client.ListByLocation(ctx, id)` can be used to do batched pagination +items, err := client.ListByLocationComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `VirtualMachineScaleSetsClient.ListSkus` + +```go +ctx := context.TODO() +id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") + +// alternatively `client.ListSkus(ctx, id)` can be used to do batched pagination +items, err := client.ListSkusComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `VirtualMachineScaleSetsClient.PerformMaintenance` + +```go +ctx := context.TODO() +id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") + +payload := virtualmachinescalesets.VirtualMachineScaleSetVMInstanceIDs{ + // ... +} + + +if err := client.PerformMaintenanceThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualMachineScaleSetsClient.PowerOff` + +```go +ctx := context.TODO() +id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") + +payload := virtualmachinescalesets.VirtualMachineScaleSetVMInstanceIDs{ + // ... +} + + +if err := client.PowerOffThenPoll(ctx, id, payload, virtualmachinescalesets.DefaultPowerOffOperationOptions()); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualMachineScaleSetsClient.Reapply` + +```go +ctx := context.TODO() +id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") + +if err := client.ReapplyThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualMachineScaleSetsClient.Redeploy` + +```go +ctx := context.TODO() +id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") + +payload := virtualmachinescalesets.VirtualMachineScaleSetVMInstanceIDs{ + // ... +} + + +if err := client.RedeployThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualMachineScaleSetsClient.Reimage` + +```go +ctx := context.TODO() +id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") + +payload := virtualmachinescalesets.VirtualMachineScaleSetReimageParameters{ + // ... +} + + +if err := client.ReimageThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualMachineScaleSetsClient.ReimageAll` + +```go +ctx := context.TODO() +id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") + +payload := virtualmachinescalesets.VirtualMachineScaleSetVMInstanceIDs{ + // ... +} + + +if err := client.ReimageAllThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualMachineScaleSetsClient.Restart` + +```go +ctx := context.TODO() +id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") + +payload := virtualmachinescalesets.VirtualMachineScaleSetVMInstanceIDs{ + // ... +} + + +if err := client.RestartThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualMachineScaleSetsClient.SetOrchestrationServiceState` + +```go +ctx := context.TODO() +id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") + +payload := virtualmachinescalesets.OrchestrationServiceStateInput{ + // ... +} + + +if err := client.SetOrchestrationServiceStateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualMachineScaleSetsClient.Start` + +```go +ctx := context.TODO() +id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") + +payload := virtualmachinescalesets.VirtualMachineScaleSetVMInstanceIDs{ + // ... +} + + +if err := client.StartThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualMachineScaleSetsClient.Update` + +```go +ctx := context.TODO() +id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") + +payload := virtualmachinescalesets.VirtualMachineScaleSetUpdate{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload, virtualmachinescalesets.DefaultUpdateOperationOptions()); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualMachineScaleSetsClient.UpdateInstances` + +```go +ctx := context.TODO() +id := virtualmachinescalesets.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") + +payload := virtualmachinescalesets.VirtualMachineScaleSetVMInstanceRequiredIDs{ + // ... +} + + +if err := client.UpdateInstancesThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/constants.go new file mode 100644 index 0000000000000..6b39fc09a7c4a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/constants.go @@ -0,0 +1,1889 @@ +package virtualmachinescalesets + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AllocationStrategy string + +const ( + AllocationStrategyCapacityOptimized AllocationStrategy = "CapacityOptimized" + AllocationStrategyLowestPrice AllocationStrategy = "LowestPrice" +) + +func PossibleValuesForAllocationStrategy() []string { + return []string{ + string(AllocationStrategyCapacityOptimized), + string(AllocationStrategyLowestPrice), + } +} + +func (s *AllocationStrategy) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAllocationStrategy(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAllocationStrategy(input string) (*AllocationStrategy, error) { + vals := map[string]AllocationStrategy{ + "capacityoptimized": AllocationStrategyCapacityOptimized, + "lowestprice": AllocationStrategyLowestPrice, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AllocationStrategy(input) + return &out, nil +} + +type CachingTypes string + +const ( + CachingTypesNone CachingTypes = "None" + CachingTypesReadOnly CachingTypes = "ReadOnly" + CachingTypesReadWrite CachingTypes = "ReadWrite" +) + +func PossibleValuesForCachingTypes() []string { + return []string{ + string(CachingTypesNone), + string(CachingTypesReadOnly), + string(CachingTypesReadWrite), + } +} + +func (s *CachingTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCachingTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCachingTypes(input string) (*CachingTypes, error) { + vals := map[string]CachingTypes{ + "none": CachingTypesNone, + "readonly": CachingTypesReadOnly, + "readwrite": CachingTypesReadWrite, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CachingTypes(input) + return &out, nil +} + +type ComponentNames string + +const ( + ComponentNamesMicrosoftNegativeWindowsNegativeShellNegativeSetup ComponentNames = "Microsoft-Windows-Shell-Setup" +) + +func PossibleValuesForComponentNames() []string { + return []string{ + string(ComponentNamesMicrosoftNegativeWindowsNegativeShellNegativeSetup), + } +} + +func (s *ComponentNames) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseComponentNames(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseComponentNames(input string) (*ComponentNames, error) { + vals := map[string]ComponentNames{ + "microsoft-windows-shell-setup": ComponentNamesMicrosoftNegativeWindowsNegativeShellNegativeSetup, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ComponentNames(input) + return &out, nil +} + +type DeleteOptions string + +const ( + DeleteOptionsDelete DeleteOptions = "Delete" + DeleteOptionsDetach DeleteOptions = "Detach" +) + +func PossibleValuesForDeleteOptions() []string { + return []string{ + string(DeleteOptionsDelete), + string(DeleteOptionsDetach), + } +} + +func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDeleteOptions(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDeleteOptions(input string) (*DeleteOptions, error) { + vals := map[string]DeleteOptions{ + "delete": DeleteOptionsDelete, + "detach": DeleteOptionsDetach, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DeleteOptions(input) + return &out, nil +} + +type DiffDiskOptions string + +const ( + DiffDiskOptionsLocal DiffDiskOptions = "Local" +) + +func PossibleValuesForDiffDiskOptions() []string { + return []string{ + string(DiffDiskOptionsLocal), + } +} + +func (s *DiffDiskOptions) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDiffDiskOptions(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDiffDiskOptions(input string) (*DiffDiskOptions, error) { + vals := map[string]DiffDiskOptions{ + "local": DiffDiskOptionsLocal, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DiffDiskOptions(input) + return &out, nil +} + +type DiffDiskPlacement string + +const ( + DiffDiskPlacementCacheDisk DiffDiskPlacement = "CacheDisk" + DiffDiskPlacementNVMeDisk DiffDiskPlacement = "NvmeDisk" + DiffDiskPlacementResourceDisk DiffDiskPlacement = "ResourceDisk" +) + +func PossibleValuesForDiffDiskPlacement() []string { + return []string{ + string(DiffDiskPlacementCacheDisk), + string(DiffDiskPlacementNVMeDisk), + string(DiffDiskPlacementResourceDisk), + } +} + +func (s *DiffDiskPlacement) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDiffDiskPlacement(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDiffDiskPlacement(input string) (*DiffDiskPlacement, error) { + vals := map[string]DiffDiskPlacement{ + "cachedisk": DiffDiskPlacementCacheDisk, + "nvmedisk": DiffDiskPlacementNVMeDisk, + "resourcedisk": DiffDiskPlacementResourceDisk, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DiffDiskPlacement(input) + return &out, nil +} + +type DiskCreateOptionTypes string + +const ( + DiskCreateOptionTypesAttach DiskCreateOptionTypes = "Attach" + DiskCreateOptionTypesCopy DiskCreateOptionTypes = "Copy" + DiskCreateOptionTypesEmpty DiskCreateOptionTypes = "Empty" + DiskCreateOptionTypesFromImage DiskCreateOptionTypes = "FromImage" + DiskCreateOptionTypesRestore DiskCreateOptionTypes = "Restore" +) + +func PossibleValuesForDiskCreateOptionTypes() []string { + return []string{ + string(DiskCreateOptionTypesAttach), + string(DiskCreateOptionTypesCopy), + string(DiskCreateOptionTypesEmpty), + string(DiskCreateOptionTypesFromImage), + string(DiskCreateOptionTypesRestore), + } +} + +func (s *DiskCreateOptionTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDiskCreateOptionTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDiskCreateOptionTypes(input string) (*DiskCreateOptionTypes, error) { + vals := map[string]DiskCreateOptionTypes{ + "attach": DiskCreateOptionTypesAttach, + "copy": DiskCreateOptionTypesCopy, + "empty": DiskCreateOptionTypesEmpty, + "fromimage": DiskCreateOptionTypesFromImage, + "restore": DiskCreateOptionTypesRestore, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DiskCreateOptionTypes(input) + return &out, nil +} + +type DiskDeleteOptionTypes string + +const ( + DiskDeleteOptionTypesDelete DiskDeleteOptionTypes = "Delete" + DiskDeleteOptionTypesDetach DiskDeleteOptionTypes = "Detach" +) + +func PossibleValuesForDiskDeleteOptionTypes() []string { + return []string{ + string(DiskDeleteOptionTypesDelete), + string(DiskDeleteOptionTypesDetach), + } +} + +func (s *DiskDeleteOptionTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDiskDeleteOptionTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDiskDeleteOptionTypes(input string) (*DiskDeleteOptionTypes, error) { + vals := map[string]DiskDeleteOptionTypes{ + "delete": DiskDeleteOptionTypesDelete, + "detach": DiskDeleteOptionTypesDetach, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DiskDeleteOptionTypes(input) + return &out, nil +} + +type DomainNameLabelScopeTypes string + +const ( + DomainNameLabelScopeTypesNoReuse DomainNameLabelScopeTypes = "NoReuse" + DomainNameLabelScopeTypesResourceGroupReuse DomainNameLabelScopeTypes = "ResourceGroupReuse" + DomainNameLabelScopeTypesSubscriptionReuse DomainNameLabelScopeTypes = "SubscriptionReuse" + DomainNameLabelScopeTypesTenantReuse DomainNameLabelScopeTypes = "TenantReuse" +) + +func PossibleValuesForDomainNameLabelScopeTypes() []string { + return []string{ + string(DomainNameLabelScopeTypesNoReuse), + string(DomainNameLabelScopeTypesResourceGroupReuse), + string(DomainNameLabelScopeTypesSubscriptionReuse), + string(DomainNameLabelScopeTypesTenantReuse), + } +} + +func (s *DomainNameLabelScopeTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDomainNameLabelScopeTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDomainNameLabelScopeTypes(input string) (*DomainNameLabelScopeTypes, error) { + vals := map[string]DomainNameLabelScopeTypes{ + "noreuse": DomainNameLabelScopeTypesNoReuse, + "resourcegroupreuse": DomainNameLabelScopeTypesResourceGroupReuse, + "subscriptionreuse": DomainNameLabelScopeTypesSubscriptionReuse, + "tenantreuse": DomainNameLabelScopeTypesTenantReuse, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DomainNameLabelScopeTypes(input) + return &out, nil +} + +type ExpandTypesForGetVMScaleSets string + +const ( + ExpandTypesForGetVMScaleSetsUserData ExpandTypesForGetVMScaleSets = "userData" +) + +func PossibleValuesForExpandTypesForGetVMScaleSets() []string { + return []string{ + string(ExpandTypesForGetVMScaleSetsUserData), + } +} + +func (s *ExpandTypesForGetVMScaleSets) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseExpandTypesForGetVMScaleSets(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseExpandTypesForGetVMScaleSets(input string) (*ExpandTypesForGetVMScaleSets, error) { + vals := map[string]ExpandTypesForGetVMScaleSets{ + "userdata": ExpandTypesForGetVMScaleSetsUserData, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ExpandTypesForGetVMScaleSets(input) + return &out, nil +} + +type IPVersion string + +const ( + IPVersionIPvFour IPVersion = "IPv4" + IPVersionIPvSix IPVersion = "IPv6" +) + +func PossibleValuesForIPVersion() []string { + return []string{ + string(IPVersionIPvFour), + string(IPVersionIPvSix), + } +} + +func (s *IPVersion) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIPVersion(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIPVersion(input string) (*IPVersion, error) { + vals := map[string]IPVersion{ + "ipv4": IPVersionIPvFour, + "ipv6": IPVersionIPvSix, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IPVersion(input) + return &out, nil +} + +type LinuxPatchAssessmentMode string + +const ( + LinuxPatchAssessmentModeAutomaticByPlatform LinuxPatchAssessmentMode = "AutomaticByPlatform" + LinuxPatchAssessmentModeImageDefault LinuxPatchAssessmentMode = "ImageDefault" +) + +func PossibleValuesForLinuxPatchAssessmentMode() []string { + return []string{ + string(LinuxPatchAssessmentModeAutomaticByPlatform), + string(LinuxPatchAssessmentModeImageDefault), + } +} + +func (s *LinuxPatchAssessmentMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLinuxPatchAssessmentMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLinuxPatchAssessmentMode(input string) (*LinuxPatchAssessmentMode, error) { + vals := map[string]LinuxPatchAssessmentMode{ + "automaticbyplatform": LinuxPatchAssessmentModeAutomaticByPlatform, + "imagedefault": LinuxPatchAssessmentModeImageDefault, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LinuxPatchAssessmentMode(input) + return &out, nil +} + +type LinuxVMGuestPatchAutomaticByPlatformRebootSetting string + +const ( + LinuxVMGuestPatchAutomaticByPlatformRebootSettingAlways LinuxVMGuestPatchAutomaticByPlatformRebootSetting = "Always" + LinuxVMGuestPatchAutomaticByPlatformRebootSettingIfRequired LinuxVMGuestPatchAutomaticByPlatformRebootSetting = "IfRequired" + LinuxVMGuestPatchAutomaticByPlatformRebootSettingNever LinuxVMGuestPatchAutomaticByPlatformRebootSetting = "Never" + LinuxVMGuestPatchAutomaticByPlatformRebootSettingUnknown LinuxVMGuestPatchAutomaticByPlatformRebootSetting = "Unknown" +) + +func PossibleValuesForLinuxVMGuestPatchAutomaticByPlatformRebootSetting() []string { + return []string{ + string(LinuxVMGuestPatchAutomaticByPlatformRebootSettingAlways), + string(LinuxVMGuestPatchAutomaticByPlatformRebootSettingIfRequired), + string(LinuxVMGuestPatchAutomaticByPlatformRebootSettingNever), + string(LinuxVMGuestPatchAutomaticByPlatformRebootSettingUnknown), + } +} + +func (s *LinuxVMGuestPatchAutomaticByPlatformRebootSetting) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLinuxVMGuestPatchAutomaticByPlatformRebootSetting(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLinuxVMGuestPatchAutomaticByPlatformRebootSetting(input string) (*LinuxVMGuestPatchAutomaticByPlatformRebootSetting, error) { + vals := map[string]LinuxVMGuestPatchAutomaticByPlatformRebootSetting{ + "always": LinuxVMGuestPatchAutomaticByPlatformRebootSettingAlways, + "ifrequired": LinuxVMGuestPatchAutomaticByPlatformRebootSettingIfRequired, + "never": LinuxVMGuestPatchAutomaticByPlatformRebootSettingNever, + "unknown": LinuxVMGuestPatchAutomaticByPlatformRebootSettingUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LinuxVMGuestPatchAutomaticByPlatformRebootSetting(input) + return &out, nil +} + +type LinuxVMGuestPatchMode string + +const ( + LinuxVMGuestPatchModeAutomaticByPlatform LinuxVMGuestPatchMode = "AutomaticByPlatform" + LinuxVMGuestPatchModeImageDefault LinuxVMGuestPatchMode = "ImageDefault" +) + +func PossibleValuesForLinuxVMGuestPatchMode() []string { + return []string{ + string(LinuxVMGuestPatchModeAutomaticByPlatform), + string(LinuxVMGuestPatchModeImageDefault), + } +} + +func (s *LinuxVMGuestPatchMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLinuxVMGuestPatchMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLinuxVMGuestPatchMode(input string) (*LinuxVMGuestPatchMode, error) { + vals := map[string]LinuxVMGuestPatchMode{ + "automaticbyplatform": LinuxVMGuestPatchModeAutomaticByPlatform, + "imagedefault": LinuxVMGuestPatchModeImageDefault, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LinuxVMGuestPatchMode(input) + return &out, nil +} + +type Mode string + +const ( + ModeAudit Mode = "Audit" + ModeEnforce Mode = "Enforce" +) + +func PossibleValuesForMode() []string { + return []string{ + string(ModeAudit), + string(ModeEnforce), + } +} + +func (s *Mode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMode(input string) (*Mode, error) { + vals := map[string]Mode{ + "audit": ModeAudit, + "enforce": ModeEnforce, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Mode(input) + return &out, nil +} + +type NetworkApiVersion string + +const ( + NetworkApiVersionTwoZeroTwoZeroNegativeOneOneNegativeZeroOne NetworkApiVersion = "2020-11-01" +) + +func PossibleValuesForNetworkApiVersion() []string { + return []string{ + string(NetworkApiVersionTwoZeroTwoZeroNegativeOneOneNegativeZeroOne), + } +} + +func (s *NetworkApiVersion) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseNetworkApiVersion(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseNetworkApiVersion(input string) (*NetworkApiVersion, error) { + vals := map[string]NetworkApiVersion{ + "2020-11-01": NetworkApiVersionTwoZeroTwoZeroNegativeOneOneNegativeZeroOne, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := NetworkApiVersion(input) + return &out, nil +} + +type NetworkInterfaceAuxiliaryMode string + +const ( + NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" + NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" + NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" +) + +func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { + return []string{ + string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), + string(NetworkInterfaceAuxiliaryModeFloating), + string(NetworkInterfaceAuxiliaryModeNone), + } +} + +func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseNetworkInterfaceAuxiliaryMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { + vals := map[string]NetworkInterfaceAuxiliaryMode{ + "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, + "floating": NetworkInterfaceAuxiliaryModeFloating, + "none": NetworkInterfaceAuxiliaryModeNone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := NetworkInterfaceAuxiliaryMode(input) + return &out, nil +} + +type NetworkInterfaceAuxiliarySku string + +const ( + NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" + NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" + NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" + NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" + NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" +) + +func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { + return []string{ + string(NetworkInterfaceAuxiliarySkuAEight), + string(NetworkInterfaceAuxiliarySkuAFour), + string(NetworkInterfaceAuxiliarySkuAOne), + string(NetworkInterfaceAuxiliarySkuATwo), + string(NetworkInterfaceAuxiliarySkuNone), + } +} + +func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseNetworkInterfaceAuxiliarySku(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { + vals := map[string]NetworkInterfaceAuxiliarySku{ + "a8": NetworkInterfaceAuxiliarySkuAEight, + "a4": NetworkInterfaceAuxiliarySkuAFour, + "a1": NetworkInterfaceAuxiliarySkuAOne, + "a2": NetworkInterfaceAuxiliarySkuATwo, + "none": NetworkInterfaceAuxiliarySkuNone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := NetworkInterfaceAuxiliarySku(input) + return &out, nil +} + +type OperatingSystemTypes string + +const ( + OperatingSystemTypesLinux OperatingSystemTypes = "Linux" + OperatingSystemTypesWindows OperatingSystemTypes = "Windows" +) + +func PossibleValuesForOperatingSystemTypes() []string { + return []string{ + string(OperatingSystemTypesLinux), + string(OperatingSystemTypesWindows), + } +} + +func (s *OperatingSystemTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOperatingSystemTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOperatingSystemTypes(input string) (*OperatingSystemTypes, error) { + vals := map[string]OperatingSystemTypes{ + "linux": OperatingSystemTypesLinux, + "windows": OperatingSystemTypesWindows, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OperatingSystemTypes(input) + return &out, nil +} + +type OrchestrationMode string + +const ( + OrchestrationModeFlexible OrchestrationMode = "Flexible" + OrchestrationModeUniform OrchestrationMode = "Uniform" +) + +func PossibleValuesForOrchestrationMode() []string { + return []string{ + string(OrchestrationModeFlexible), + string(OrchestrationModeUniform), + } +} + +func (s *OrchestrationMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOrchestrationMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOrchestrationMode(input string) (*OrchestrationMode, error) { + vals := map[string]OrchestrationMode{ + "flexible": OrchestrationModeFlexible, + "uniform": OrchestrationModeUniform, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OrchestrationMode(input) + return &out, nil +} + +type OrchestrationServiceNames string + +const ( + OrchestrationServiceNamesAutomaticRepairs OrchestrationServiceNames = "AutomaticRepairs" +) + +func PossibleValuesForOrchestrationServiceNames() []string { + return []string{ + string(OrchestrationServiceNamesAutomaticRepairs), + } +} + +func (s *OrchestrationServiceNames) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOrchestrationServiceNames(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOrchestrationServiceNames(input string) (*OrchestrationServiceNames, error) { + vals := map[string]OrchestrationServiceNames{ + "automaticrepairs": OrchestrationServiceNamesAutomaticRepairs, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OrchestrationServiceNames(input) + return &out, nil +} + +type OrchestrationServiceState string + +const ( + OrchestrationServiceStateNotRunning OrchestrationServiceState = "NotRunning" + OrchestrationServiceStateRunning OrchestrationServiceState = "Running" + OrchestrationServiceStateSuspended OrchestrationServiceState = "Suspended" +) + +func PossibleValuesForOrchestrationServiceState() []string { + return []string{ + string(OrchestrationServiceStateNotRunning), + string(OrchestrationServiceStateRunning), + string(OrchestrationServiceStateSuspended), + } +} + +func (s *OrchestrationServiceState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOrchestrationServiceState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOrchestrationServiceState(input string) (*OrchestrationServiceState, error) { + vals := map[string]OrchestrationServiceState{ + "notrunning": OrchestrationServiceStateNotRunning, + "running": OrchestrationServiceStateRunning, + "suspended": OrchestrationServiceStateSuspended, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OrchestrationServiceState(input) + return &out, nil +} + +type OrchestrationServiceStateAction string + +const ( + OrchestrationServiceStateActionResume OrchestrationServiceStateAction = "Resume" + OrchestrationServiceStateActionSuspend OrchestrationServiceStateAction = "Suspend" +) + +func PossibleValuesForOrchestrationServiceStateAction() []string { + return []string{ + string(OrchestrationServiceStateActionResume), + string(OrchestrationServiceStateActionSuspend), + } +} + +func (s *OrchestrationServiceStateAction) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOrchestrationServiceStateAction(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOrchestrationServiceStateAction(input string) (*OrchestrationServiceStateAction, error) { + vals := map[string]OrchestrationServiceStateAction{ + "resume": OrchestrationServiceStateActionResume, + "suspend": OrchestrationServiceStateActionSuspend, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OrchestrationServiceStateAction(input) + return &out, nil +} + +type PassNames string + +const ( + PassNamesOobeSystem PassNames = "OobeSystem" +) + +func PossibleValuesForPassNames() []string { + return []string{ + string(PassNamesOobeSystem), + } +} + +func (s *PassNames) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePassNames(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePassNames(input string) (*PassNames, error) { + vals := map[string]PassNames{ + "oobesystem": PassNamesOobeSystem, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PassNames(input) + return &out, nil +} + +type ProtocolTypes string + +const ( + ProtocolTypesHTTP ProtocolTypes = "Http" + ProtocolTypesHTTPS ProtocolTypes = "Https" +) + +func PossibleValuesForProtocolTypes() []string { + return []string{ + string(ProtocolTypesHTTP), + string(ProtocolTypesHTTPS), + } +} + +func (s *ProtocolTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProtocolTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProtocolTypes(input string) (*ProtocolTypes, error) { + vals := map[string]ProtocolTypes{ + "http": ProtocolTypesHTTP, + "https": ProtocolTypesHTTPS, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProtocolTypes(input) + return &out, nil +} + +type PublicIPAddressSkuName string + +const ( + PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" + PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" +) + +func PossibleValuesForPublicIPAddressSkuName() []string { + return []string{ + string(PublicIPAddressSkuNameBasic), + string(PublicIPAddressSkuNameStandard), + } +} + +func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePublicIPAddressSkuName(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { + vals := map[string]PublicIPAddressSkuName{ + "basic": PublicIPAddressSkuNameBasic, + "standard": PublicIPAddressSkuNameStandard, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PublicIPAddressSkuName(input) + return &out, nil +} + +type PublicIPAddressSkuTier string + +const ( + PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" + PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" +) + +func PossibleValuesForPublicIPAddressSkuTier() []string { + return []string{ + string(PublicIPAddressSkuTierGlobal), + string(PublicIPAddressSkuTierRegional), + } +} + +func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePublicIPAddressSkuTier(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { + vals := map[string]PublicIPAddressSkuTier{ + "global": PublicIPAddressSkuTierGlobal, + "regional": PublicIPAddressSkuTierRegional, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PublicIPAddressSkuTier(input) + return &out, nil +} + +type RepairAction string + +const ( + RepairActionReimage RepairAction = "Reimage" + RepairActionReplace RepairAction = "Replace" + RepairActionRestart RepairAction = "Restart" +) + +func PossibleValuesForRepairAction() []string { + return []string{ + string(RepairActionReimage), + string(RepairActionReplace), + string(RepairActionRestart), + } +} + +func (s *RepairAction) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRepairAction(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRepairAction(input string) (*RepairAction, error) { + vals := map[string]RepairAction{ + "reimage": RepairActionReimage, + "replace": RepairActionReplace, + "restart": RepairActionRestart, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RepairAction(input) + return &out, nil +} + +type SecurityEncryptionTypes string + +const ( + SecurityEncryptionTypesDiskWithVMGuestState SecurityEncryptionTypes = "DiskWithVMGuestState" + SecurityEncryptionTypesNonPersistedTPM SecurityEncryptionTypes = "NonPersistedTPM" + SecurityEncryptionTypesVMGuestStateOnly SecurityEncryptionTypes = "VMGuestStateOnly" +) + +func PossibleValuesForSecurityEncryptionTypes() []string { + return []string{ + string(SecurityEncryptionTypesDiskWithVMGuestState), + string(SecurityEncryptionTypesNonPersistedTPM), + string(SecurityEncryptionTypesVMGuestStateOnly), + } +} + +func (s *SecurityEncryptionTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSecurityEncryptionTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSecurityEncryptionTypes(input string) (*SecurityEncryptionTypes, error) { + vals := map[string]SecurityEncryptionTypes{ + "diskwithvmgueststate": SecurityEncryptionTypesDiskWithVMGuestState, + "nonpersistedtpm": SecurityEncryptionTypesNonPersistedTPM, + "vmgueststateonly": SecurityEncryptionTypesVMGuestStateOnly, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SecurityEncryptionTypes(input) + return &out, nil +} + +type SecurityTypes string + +const ( + SecurityTypesConfidentialVM SecurityTypes = "ConfidentialVM" + SecurityTypesTrustedLaunch SecurityTypes = "TrustedLaunch" +) + +func PossibleValuesForSecurityTypes() []string { + return []string{ + string(SecurityTypesConfidentialVM), + string(SecurityTypesTrustedLaunch), + } +} + +func (s *SecurityTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSecurityTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSecurityTypes(input string) (*SecurityTypes, error) { + vals := map[string]SecurityTypes{ + "confidentialvm": SecurityTypesConfidentialVM, + "trustedlaunch": SecurityTypesTrustedLaunch, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SecurityTypes(input) + return &out, nil +} + +type SettingNames string + +const ( + SettingNamesAutoLogon SettingNames = "AutoLogon" + SettingNamesFirstLogonCommands SettingNames = "FirstLogonCommands" +) + +func PossibleValuesForSettingNames() []string { + return []string{ + string(SettingNamesAutoLogon), + string(SettingNamesFirstLogonCommands), + } +} + +func (s *SettingNames) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSettingNames(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSettingNames(input string) (*SettingNames, error) { + vals := map[string]SettingNames{ + "autologon": SettingNamesAutoLogon, + "firstlogoncommands": SettingNamesFirstLogonCommands, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SettingNames(input) + return &out, nil +} + +type StatusLevelTypes string + +const ( + StatusLevelTypesError StatusLevelTypes = "Error" + StatusLevelTypesInfo StatusLevelTypes = "Info" + StatusLevelTypesWarning StatusLevelTypes = "Warning" +) + +func PossibleValuesForStatusLevelTypes() []string { + return []string{ + string(StatusLevelTypesError), + string(StatusLevelTypesInfo), + string(StatusLevelTypesWarning), + } +} + +func (s *StatusLevelTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseStatusLevelTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseStatusLevelTypes(input string) (*StatusLevelTypes, error) { + vals := map[string]StatusLevelTypes{ + "error": StatusLevelTypesError, + "info": StatusLevelTypesInfo, + "warning": StatusLevelTypesWarning, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := StatusLevelTypes(input) + return &out, nil +} + +type StorageAccountTypes string + +const ( + StorageAccountTypesPremiumLRS StorageAccountTypes = "Premium_LRS" + StorageAccountTypesPremiumVTwoLRS StorageAccountTypes = "PremiumV2_LRS" + StorageAccountTypesPremiumZRS StorageAccountTypes = "Premium_ZRS" + StorageAccountTypesStandardLRS StorageAccountTypes = "Standard_LRS" + StorageAccountTypesStandardSSDLRS StorageAccountTypes = "StandardSSD_LRS" + StorageAccountTypesStandardSSDZRS StorageAccountTypes = "StandardSSD_ZRS" + StorageAccountTypesUltraSSDLRS StorageAccountTypes = "UltraSSD_LRS" +) + +func PossibleValuesForStorageAccountTypes() []string { + return []string{ + string(StorageAccountTypesPremiumLRS), + string(StorageAccountTypesPremiumVTwoLRS), + string(StorageAccountTypesPremiumZRS), + string(StorageAccountTypesStandardLRS), + string(StorageAccountTypesStandardSSDLRS), + string(StorageAccountTypesStandardSSDZRS), + string(StorageAccountTypesUltraSSDLRS), + } +} + +func (s *StorageAccountTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseStorageAccountTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseStorageAccountTypes(input string) (*StorageAccountTypes, error) { + vals := map[string]StorageAccountTypes{ + "premium_lrs": StorageAccountTypesPremiumLRS, + "premiumv2_lrs": StorageAccountTypesPremiumVTwoLRS, + "premium_zrs": StorageAccountTypesPremiumZRS, + "standard_lrs": StorageAccountTypesStandardLRS, + "standardssd_lrs": StorageAccountTypesStandardSSDLRS, + "standardssd_zrs": StorageAccountTypesStandardSSDZRS, + "ultrassd_lrs": StorageAccountTypesUltraSSDLRS, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := StorageAccountTypes(input) + return &out, nil +} + +type UpgradeMode string + +const ( + UpgradeModeAutomatic UpgradeMode = "Automatic" + UpgradeModeManual UpgradeMode = "Manual" + UpgradeModeRolling UpgradeMode = "Rolling" +) + +func PossibleValuesForUpgradeMode() []string { + return []string{ + string(UpgradeModeAutomatic), + string(UpgradeModeManual), + string(UpgradeModeRolling), + } +} + +func (s *UpgradeMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseUpgradeMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseUpgradeMode(input string) (*UpgradeMode, error) { + vals := map[string]UpgradeMode{ + "automatic": UpgradeModeAutomatic, + "manual": UpgradeModeManual, + "rolling": UpgradeModeRolling, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := UpgradeMode(input) + return &out, nil +} + +type UpgradeOperationInvoker string + +const ( + UpgradeOperationInvokerPlatform UpgradeOperationInvoker = "Platform" + UpgradeOperationInvokerUnknown UpgradeOperationInvoker = "Unknown" + UpgradeOperationInvokerUser UpgradeOperationInvoker = "User" +) + +func PossibleValuesForUpgradeOperationInvoker() []string { + return []string{ + string(UpgradeOperationInvokerPlatform), + string(UpgradeOperationInvokerUnknown), + string(UpgradeOperationInvokerUser), + } +} + +func (s *UpgradeOperationInvoker) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseUpgradeOperationInvoker(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseUpgradeOperationInvoker(input string) (*UpgradeOperationInvoker, error) { + vals := map[string]UpgradeOperationInvoker{ + "platform": UpgradeOperationInvokerPlatform, + "unknown": UpgradeOperationInvokerUnknown, + "user": UpgradeOperationInvokerUser, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := UpgradeOperationInvoker(input) + return &out, nil +} + +type UpgradeState string + +const ( + UpgradeStateCancelled UpgradeState = "Cancelled" + UpgradeStateCompleted UpgradeState = "Completed" + UpgradeStateFaulted UpgradeState = "Faulted" + UpgradeStateRollingForward UpgradeState = "RollingForward" +) + +func PossibleValuesForUpgradeState() []string { + return []string{ + string(UpgradeStateCancelled), + string(UpgradeStateCompleted), + string(UpgradeStateFaulted), + string(UpgradeStateRollingForward), + } +} + +func (s *UpgradeState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseUpgradeState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseUpgradeState(input string) (*UpgradeState, error) { + vals := map[string]UpgradeState{ + "cancelled": UpgradeStateCancelled, + "completed": UpgradeStateCompleted, + "faulted": UpgradeStateFaulted, + "rollingforward": UpgradeStateRollingForward, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := UpgradeState(input) + return &out, nil +} + +type VirtualMachineEvictionPolicyTypes string + +const ( + VirtualMachineEvictionPolicyTypesDeallocate VirtualMachineEvictionPolicyTypes = "Deallocate" + VirtualMachineEvictionPolicyTypesDelete VirtualMachineEvictionPolicyTypes = "Delete" +) + +func PossibleValuesForVirtualMachineEvictionPolicyTypes() []string { + return []string{ + string(VirtualMachineEvictionPolicyTypesDeallocate), + string(VirtualMachineEvictionPolicyTypesDelete), + } +} + +func (s *VirtualMachineEvictionPolicyTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseVirtualMachineEvictionPolicyTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseVirtualMachineEvictionPolicyTypes(input string) (*VirtualMachineEvictionPolicyTypes, error) { + vals := map[string]VirtualMachineEvictionPolicyTypes{ + "deallocate": VirtualMachineEvictionPolicyTypesDeallocate, + "delete": VirtualMachineEvictionPolicyTypesDelete, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := VirtualMachineEvictionPolicyTypes(input) + return &out, nil +} + +type VirtualMachinePriorityTypes string + +const ( + VirtualMachinePriorityTypesLow VirtualMachinePriorityTypes = "Low" + VirtualMachinePriorityTypesRegular VirtualMachinePriorityTypes = "Regular" + VirtualMachinePriorityTypesSpot VirtualMachinePriorityTypes = "Spot" +) + +func PossibleValuesForVirtualMachinePriorityTypes() []string { + return []string{ + string(VirtualMachinePriorityTypesLow), + string(VirtualMachinePriorityTypesRegular), + string(VirtualMachinePriorityTypesSpot), + } +} + +func (s *VirtualMachinePriorityTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseVirtualMachinePriorityTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseVirtualMachinePriorityTypes(input string) (*VirtualMachinePriorityTypes, error) { + vals := map[string]VirtualMachinePriorityTypes{ + "low": VirtualMachinePriorityTypesLow, + "regular": VirtualMachinePriorityTypesRegular, + "spot": VirtualMachinePriorityTypesSpot, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := VirtualMachinePriorityTypes(input) + return &out, nil +} + +type VirtualMachineScaleSetScaleInRules string + +const ( + VirtualMachineScaleSetScaleInRulesDefault VirtualMachineScaleSetScaleInRules = "Default" + VirtualMachineScaleSetScaleInRulesNewestVM VirtualMachineScaleSetScaleInRules = "NewestVM" + VirtualMachineScaleSetScaleInRulesOldestVM VirtualMachineScaleSetScaleInRules = "OldestVM" +) + +func PossibleValuesForVirtualMachineScaleSetScaleInRules() []string { + return []string{ + string(VirtualMachineScaleSetScaleInRulesDefault), + string(VirtualMachineScaleSetScaleInRulesNewestVM), + string(VirtualMachineScaleSetScaleInRulesOldestVM), + } +} + +func (s *VirtualMachineScaleSetScaleInRules) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseVirtualMachineScaleSetScaleInRules(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseVirtualMachineScaleSetScaleInRules(input string) (*VirtualMachineScaleSetScaleInRules, error) { + vals := map[string]VirtualMachineScaleSetScaleInRules{ + "default": VirtualMachineScaleSetScaleInRulesDefault, + "newestvm": VirtualMachineScaleSetScaleInRulesNewestVM, + "oldestvm": VirtualMachineScaleSetScaleInRulesOldestVM, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := VirtualMachineScaleSetScaleInRules(input) + return &out, nil +} + +type VirtualMachineScaleSetSkuScaleType string + +const ( + VirtualMachineScaleSetSkuScaleTypeAutomatic VirtualMachineScaleSetSkuScaleType = "Automatic" + VirtualMachineScaleSetSkuScaleTypeNone VirtualMachineScaleSetSkuScaleType = "None" +) + +func PossibleValuesForVirtualMachineScaleSetSkuScaleType() []string { + return []string{ + string(VirtualMachineScaleSetSkuScaleTypeAutomatic), + string(VirtualMachineScaleSetSkuScaleTypeNone), + } +} + +func (s *VirtualMachineScaleSetSkuScaleType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseVirtualMachineScaleSetSkuScaleType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseVirtualMachineScaleSetSkuScaleType(input string) (*VirtualMachineScaleSetSkuScaleType, error) { + vals := map[string]VirtualMachineScaleSetSkuScaleType{ + "automatic": VirtualMachineScaleSetSkuScaleTypeAutomatic, + "none": VirtualMachineScaleSetSkuScaleTypeNone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := VirtualMachineScaleSetSkuScaleType(input) + return &out, nil +} + +type WindowsPatchAssessmentMode string + +const ( + WindowsPatchAssessmentModeAutomaticByPlatform WindowsPatchAssessmentMode = "AutomaticByPlatform" + WindowsPatchAssessmentModeImageDefault WindowsPatchAssessmentMode = "ImageDefault" +) + +func PossibleValuesForWindowsPatchAssessmentMode() []string { + return []string{ + string(WindowsPatchAssessmentModeAutomaticByPlatform), + string(WindowsPatchAssessmentModeImageDefault), + } +} + +func (s *WindowsPatchAssessmentMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseWindowsPatchAssessmentMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseWindowsPatchAssessmentMode(input string) (*WindowsPatchAssessmentMode, error) { + vals := map[string]WindowsPatchAssessmentMode{ + "automaticbyplatform": WindowsPatchAssessmentModeAutomaticByPlatform, + "imagedefault": WindowsPatchAssessmentModeImageDefault, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WindowsPatchAssessmentMode(input) + return &out, nil +} + +type WindowsVMGuestPatchAutomaticByPlatformRebootSetting string + +const ( + WindowsVMGuestPatchAutomaticByPlatformRebootSettingAlways WindowsVMGuestPatchAutomaticByPlatformRebootSetting = "Always" + WindowsVMGuestPatchAutomaticByPlatformRebootSettingIfRequired WindowsVMGuestPatchAutomaticByPlatformRebootSetting = "IfRequired" + WindowsVMGuestPatchAutomaticByPlatformRebootSettingNever WindowsVMGuestPatchAutomaticByPlatformRebootSetting = "Never" + WindowsVMGuestPatchAutomaticByPlatformRebootSettingUnknown WindowsVMGuestPatchAutomaticByPlatformRebootSetting = "Unknown" +) + +func PossibleValuesForWindowsVMGuestPatchAutomaticByPlatformRebootSetting() []string { + return []string{ + string(WindowsVMGuestPatchAutomaticByPlatformRebootSettingAlways), + string(WindowsVMGuestPatchAutomaticByPlatformRebootSettingIfRequired), + string(WindowsVMGuestPatchAutomaticByPlatformRebootSettingNever), + string(WindowsVMGuestPatchAutomaticByPlatformRebootSettingUnknown), + } +} + +func (s *WindowsVMGuestPatchAutomaticByPlatformRebootSetting) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseWindowsVMGuestPatchAutomaticByPlatformRebootSetting(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseWindowsVMGuestPatchAutomaticByPlatformRebootSetting(input string) (*WindowsVMGuestPatchAutomaticByPlatformRebootSetting, error) { + vals := map[string]WindowsVMGuestPatchAutomaticByPlatformRebootSetting{ + "always": WindowsVMGuestPatchAutomaticByPlatformRebootSettingAlways, + "ifrequired": WindowsVMGuestPatchAutomaticByPlatformRebootSettingIfRequired, + "never": WindowsVMGuestPatchAutomaticByPlatformRebootSettingNever, + "unknown": WindowsVMGuestPatchAutomaticByPlatformRebootSettingUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WindowsVMGuestPatchAutomaticByPlatformRebootSetting(input) + return &out, nil +} + +type WindowsVMGuestPatchMode string + +const ( + WindowsVMGuestPatchModeAutomaticByOS WindowsVMGuestPatchMode = "AutomaticByOS" + WindowsVMGuestPatchModeAutomaticByPlatform WindowsVMGuestPatchMode = "AutomaticByPlatform" + WindowsVMGuestPatchModeManual WindowsVMGuestPatchMode = "Manual" +) + +func PossibleValuesForWindowsVMGuestPatchMode() []string { + return []string{ + string(WindowsVMGuestPatchModeAutomaticByOS), + string(WindowsVMGuestPatchModeAutomaticByPlatform), + string(WindowsVMGuestPatchModeManual), + } +} + +func (s *WindowsVMGuestPatchMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseWindowsVMGuestPatchMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseWindowsVMGuestPatchMode(input string) (*WindowsVMGuestPatchMode, error) { + vals := map[string]WindowsVMGuestPatchMode{ + "automaticbyos": WindowsVMGuestPatchModeAutomaticByOS, + "automaticbyplatform": WindowsVMGuestPatchModeAutomaticByPlatform, + "manual": WindowsVMGuestPatchModeManual, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WindowsVMGuestPatchMode(input) + return &out, nil +} + +type ZonalPlatformFaultDomainAlignMode string + +const ( + ZonalPlatformFaultDomainAlignModeAligned ZonalPlatformFaultDomainAlignMode = "Aligned" + ZonalPlatformFaultDomainAlignModeUnaligned ZonalPlatformFaultDomainAlignMode = "Unaligned" +) + +func PossibleValuesForZonalPlatformFaultDomainAlignMode() []string { + return []string{ + string(ZonalPlatformFaultDomainAlignModeAligned), + string(ZonalPlatformFaultDomainAlignModeUnaligned), + } +} + +func (s *ZonalPlatformFaultDomainAlignMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseZonalPlatformFaultDomainAlignMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseZonalPlatformFaultDomainAlignMode(input string) (*ZonalPlatformFaultDomainAlignMode, error) { + vals := map[string]ZonalPlatformFaultDomainAlignMode{ + "aligned": ZonalPlatformFaultDomainAlignModeAligned, + "unaligned": ZonalPlatformFaultDomainAlignModeUnaligned, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ZonalPlatformFaultDomainAlignMode(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/id_location.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/id_location.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/id_location.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/id_virtualmachinescaleset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/id_virtualmachinescaleset.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/id_virtualmachinescaleset.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/id_virtualmachinescaleset.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_approverollingupgrade.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_approverollingupgrade.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_approverollingupgrade.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_approverollingupgrade.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_converttosingleplacementgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_converttosingleplacementgroup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_converttosingleplacementgroup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_converttosingleplacementgroup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_deallocate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_deallocate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_deallocate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_deallocate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_deleteinstances.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_deleteinstances.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_deleteinstances.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_deleteinstances.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_forcerecoveryservicefabricplatformupdatedomainwalk.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_forcerecoveryservicefabricplatformupdatedomainwalk.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_forcerecoveryservicefabricplatformupdatedomainwalk.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_forcerecoveryservicefabricplatformupdatedomainwalk.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_getinstanceview.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_getinstanceview.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_getinstanceview.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_getinstanceview.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_getosupgradehistory.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_getosupgradehistory.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_getosupgradehistory.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_getosupgradehistory.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_listall.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_listall.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_listall.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_listall.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_listbylocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_listbylocation.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_listbylocation.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_listbylocation.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_listskus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_listskus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_listskus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_listskus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_performmaintenance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_performmaintenance.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_performmaintenance.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_performmaintenance.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_poweroff.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_poweroff.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_poweroff.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_poweroff.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_reapply.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_reapply.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_reapply.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_reapply.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_redeploy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_redeploy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_redeploy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_redeploy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_reimage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_reimage.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_reimage.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_reimage.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_reimageall.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_reimageall.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_reimageall.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_reimageall.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_restart.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_restart.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_restart.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_restart.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_setorchestrationservicestate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_setorchestrationservicestate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_setorchestrationservicestate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_setorchestrationservicestate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_start.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_start.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_start.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_start.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_updateinstances.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_updateinstances.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_updateinstances.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_updateinstances.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_additionalcapabilities.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_additionalcapabilities.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_additionalcapabilities.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_additionalcapabilities.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_additionalunattendcontent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_additionalunattendcontent.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_additionalunattendcontent.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_additionalunattendcontent.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_apientityreference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_apientityreference.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_apientityreference.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_apientityreference.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_apierror.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_apierror.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_apierror.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_apierror.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_apierrorbase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_apierrorbase.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_apierrorbase.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_apierrorbase.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_applicationprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_applicationprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_applicationprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_applicationprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_automaticosupgradepolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_automaticosupgradepolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_automaticosupgradepolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_automaticosupgradepolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_automaticrepairspolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_automaticrepairspolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_automaticrepairspolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_automaticrepairspolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_billingprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_billingprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_billingprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_billingprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_bootdiagnostics.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_bootdiagnostics.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_bootdiagnostics.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_bootdiagnostics.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_capacityreservationprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_capacityreservationprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_capacityreservationprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_capacityreservationprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_diagnosticsprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_diagnosticsprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_diagnosticsprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_diagnosticsprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_diffdisksettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_diffdisksettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_diffdisksettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_diffdisksettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_encryptionidentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_encryptionidentity.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_encryptionidentity.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_encryptionidentity.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_eventgridandresourcegraph.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_eventgridandresourcegraph.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_eventgridandresourcegraph.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_eventgridandresourcegraph.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_imagereference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_imagereference.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_imagereference.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_imagereference.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_innererror.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_innererror.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_innererror.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_innererror.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_instanceviewstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_instanceviewstatus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_instanceviewstatus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_instanceviewstatus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_keyvaultsecretreference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_keyvaultsecretreference.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_keyvaultsecretreference.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_keyvaultsecretreference.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_linuxconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_linuxconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_linuxconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_linuxconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_linuxpatchsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_linuxpatchsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_linuxpatchsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_linuxpatchsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_linuxvmguestpatchautomaticbyplatformsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_linuxvmguestpatchautomaticbyplatformsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_linuxvmguestpatchautomaticbyplatformsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_linuxvmguestpatchautomaticbyplatformsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_orchestrationservicestateinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_orchestrationservicestateinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_orchestrationservicestateinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_orchestrationservicestateinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_orchestrationservicesummary.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_orchestrationservicesummary.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_orchestrationservicesummary.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_orchestrationservicesummary.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_osimagenotificationprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_osimagenotificationprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_osimagenotificationprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_osimagenotificationprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_osprofileprovisioningdata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_osprofileprovisioningdata.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_osprofileprovisioningdata.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_osprofileprovisioningdata.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_patchsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_patchsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_patchsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_patchsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_plan.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_plan.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_plan.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_plan.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_prioritymixpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_prioritymixpolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_prioritymixpolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_prioritymixpolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_proxyagentsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_proxyagentsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_proxyagentsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_proxyagentsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_publicipaddresssku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_publicipaddresssku.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_publicipaddresssku.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_publicipaddresssku.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_recoverywalkresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_recoverywalkresponse.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_recoverywalkresponse.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_recoverywalkresponse.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_resiliencypolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_resiliencypolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_resiliencypolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_resiliencypolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_resilientvmcreationpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_resilientvmcreationpolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_resilientvmcreationpolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_resilientvmcreationpolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_resilientvmdeletionpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_resilientvmdeletionpolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_resilientvmdeletionpolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_resilientvmdeletionpolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_rollbackstatusinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_rollbackstatusinfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_rollbackstatusinfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_rollbackstatusinfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_rollingupgradepolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_rollingupgradepolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_rollingupgradepolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_rollingupgradepolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_rollingupgradeprogressinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_rollingupgradeprogressinfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_rollingupgradeprogressinfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_rollingupgradeprogressinfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_scaleinpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_scaleinpolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_scaleinpolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_scaleinpolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_scheduledeventsadditionalpublishingtargets.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_scheduledeventsadditionalpublishingtargets.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_scheduledeventsadditionalpublishingtargets.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_scheduledeventsadditionalpublishingtargets.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_scheduledeventspolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_scheduledeventspolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_scheduledeventspolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_scheduledeventspolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_scheduledeventsprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_scheduledeventsprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_scheduledeventsprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_scheduledeventsprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_securityposturereference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_securityposturereference.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_securityposturereference.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_securityposturereference.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_securityposturereferenceupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_securityposturereferenceupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_securityposturereferenceupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_securityposturereferenceupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_securityprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_securityprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_securityprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_securityprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_serviceartifactreference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_serviceartifactreference.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_serviceartifactreference.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_serviceartifactreference.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_sku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_sku.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_sku.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_sku.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_skuprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_skuprofile.go new file mode 100644 index 0000000000000..4036ce3128aea --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_skuprofile.go @@ -0,0 +1,9 @@ +package virtualmachinescalesets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SkuProfile struct { + AllocationStrategy *AllocationStrategy `json:"allocationStrategy,omitempty"` + VMSizes *[]SkuProfileVMSize `json:"vmSizes,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_skuprofilevmsize.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_skuprofilevmsize.go new file mode 100644 index 0000000000000..9a2054771f6d9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_skuprofilevmsize.go @@ -0,0 +1,8 @@ +package virtualmachinescalesets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SkuProfileVMSize struct { + Name *string `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_spotrestorepolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_spotrestorepolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_spotrestorepolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_spotrestorepolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_sshconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_sshconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_sshconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_sshconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_sshpublickey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_sshpublickey.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_sshpublickey.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_sshpublickey.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_subresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_subresource.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_subresource.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_subresource.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_terminatenotificationprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_terminatenotificationprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_terminatenotificationprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_terminatenotificationprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_uefisettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_uefisettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_uefisettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_uefisettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_upgradeoperationhistoricalstatusinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_upgradeoperationhistoricalstatusinfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_upgradeoperationhistoricalstatusinfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_upgradeoperationhistoricalstatusinfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_upgradeoperationhistoricalstatusinfoproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_upgradeoperationhistoricalstatusinfoproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_upgradeoperationhistoricalstatusinfoproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_upgradeoperationhistoricalstatusinfoproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_upgradeoperationhistorystatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_upgradeoperationhistorystatus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_upgradeoperationhistorystatus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_upgradeoperationhistorystatus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_upgradepolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_upgradepolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_upgradepolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_upgradepolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_userinitiatedreboot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_userinitiatedreboot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_userinitiatedreboot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_userinitiatedreboot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_userinitiatedredeploy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_userinitiatedredeploy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_userinitiatedredeploy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_userinitiatedredeploy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_vaultcertificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_vaultcertificate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_vaultcertificate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_vaultcertificate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_vaultsecretgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_vaultsecretgroup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_vaultsecretgroup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_vaultsecretgroup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualharddisk.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualharddisk.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualharddisk.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualharddisk.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescaleset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescaleset.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescaleset.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescaleset.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetdatadisk.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetdatadisk.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetdatadisk.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetdatadisk.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetextension.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetextension.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetextension.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetextension.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetextensionprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetextensionprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetextensionprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetextensionprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetextensionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetextensionproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetextensionproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetextensionproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesethardwareprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesethardwareprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesethardwareprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesethardwareprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetinstanceview.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetinstanceview.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetinstanceview.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetinstanceview.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetinstanceviewstatusessummary.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetinstanceviewstatusessummary.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetinstanceviewstatusessummary.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetinstanceviewstatusessummary.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetipconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetipconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetipconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetipconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetipconfigurationproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetipconfigurationproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetipconfigurationproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetiptag.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetiptag.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetiptag.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetiptag.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetmanageddiskparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetmanageddiskparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetmanageddiskparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetmanageddiskparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetnetworkconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetnetworkconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetnetworkconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetnetworkconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetnetworkconfigurationdnssettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetnetworkconfigurationdnssettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetnetworkconfigurationdnssettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetnetworkconfigurationdnssettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetnetworkconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetnetworkconfigurationproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetnetworkconfigurationproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetnetworkconfigurationproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetnetworkprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetnetworkprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetnetworkprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetnetworkprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetosdisk.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetosdisk.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetosdisk.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetosdisk.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetosprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetosprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetosprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetosprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetproperties.go new file mode 100644 index 0000000000000..9bf648bbc83a5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetproperties.go @@ -0,0 +1,48 @@ +package virtualmachinescalesets + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualMachineScaleSetProperties struct { + AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"` + AutomaticRepairsPolicy *AutomaticRepairsPolicy `json:"automaticRepairsPolicy,omitempty"` + ConstrainedMaximumCapacity *bool `json:"constrainedMaximumCapacity,omitempty"` + DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"` + HostGroup *SubResource `json:"hostGroup,omitempty"` + OrchestrationMode *OrchestrationMode `json:"orchestrationMode,omitempty"` + Overprovision *bool `json:"overprovision,omitempty"` + PlatformFaultDomainCount *int64 `json:"platformFaultDomainCount,omitempty"` + PriorityMixPolicy *PriorityMixPolicy `json:"priorityMixPolicy,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"` + ResiliencyPolicy *ResiliencyPolicy `json:"resiliencyPolicy,omitempty"` + ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"` + ScheduledEventsPolicy *ScheduledEventsPolicy `json:"scheduledEventsPolicy,omitempty"` + SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"` + SkuProfile *SkuProfile `json:"skuProfile,omitempty"` + SpotRestorePolicy *SpotRestorePolicy `json:"spotRestorePolicy,omitempty"` + TimeCreated *string `json:"timeCreated,omitempty"` + UniqueId *string `json:"uniqueId,omitempty"` + UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"` + VirtualMachineProfile *VirtualMachineScaleSetVMProfile `json:"virtualMachineProfile,omitempty"` + ZonalPlatformFaultDomainAlignMode *ZonalPlatformFaultDomainAlignMode `json:"zonalPlatformFaultDomainAlignMode,omitempty"` + ZoneBalance *bool `json:"zoneBalance,omitempty"` +} + +func (o *VirtualMachineScaleSetProperties) GetTimeCreatedAsTime() (*time.Time, error) { + if o.TimeCreated == nil { + return nil, nil + } + return dates.ParseAsFormat(o.TimeCreated, "2006-01-02T15:04:05Z07:00") +} + +func (o *VirtualMachineScaleSetProperties) SetTimeCreatedAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.TimeCreated = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetpublicipaddressconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetpublicipaddressconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetpublicipaddressconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetpublicipaddressconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetpublicipaddressconfigurationdnssettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetpublicipaddressconfigurationdnssettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetpublicipaddressconfigurationdnssettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetpublicipaddressconfigurationdnssettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetpublicipaddressconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetpublicipaddressconfigurationproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetpublicipaddressconfigurationproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetpublicipaddressconfigurationproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetreimageparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetreimageparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetreimageparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetreimageparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetsku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetsku.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetsku.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetsku.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetskucapacity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetskucapacity.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetskucapacity.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetskucapacity.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetstorageprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetstorageprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetstorageprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetstorageprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdate.go similarity index 83% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdate.go index 02881317d15ae..9be4349f80177 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdate.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdate.go @@ -2,6 +2,7 @@ package virtualmachinescalesets import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" + "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,4 +14,5 @@ type VirtualMachineScaleSetUpdate struct { Properties *VirtualMachineScaleSetUpdateProperties `json:"properties,omitempty"` Sku *Sku `json:"sku,omitempty"` Tags *map[string]string `json:"tags,omitempty"` + Zones *zones.Schema `json:"zones,omitempty"` } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdateipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdateipconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdateipconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdateipconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdateipconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdateipconfigurationproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdateipconfigurationproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdateipconfigurationproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdatenetworkconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdatenetworkconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdatenetworkconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdatenetworkconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdatenetworkconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdatenetworkconfigurationproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdatenetworkconfigurationproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdatenetworkconfigurationproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdatenetworkprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdatenetworkprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdatenetworkprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdatenetworkprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdateosdisk.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdateosdisk.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdateosdisk.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdateosdisk.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdateosprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdateosprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdateosprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdateosprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdateproperties.go similarity index 87% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdateproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdateproperties.go index e537dfe3e2bec..192a5d7b54fc9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdateproperties.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdateproperties.go @@ -13,7 +13,9 @@ type VirtualMachineScaleSetUpdateProperties struct { ResiliencyPolicy *ResiliencyPolicy `json:"resiliencyPolicy,omitempty"` ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"` SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"` + SkuProfile *SkuProfile `json:"skuProfile,omitempty"` SpotRestorePolicy *SpotRestorePolicy `json:"spotRestorePolicy,omitempty"` UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"` VirtualMachineProfile *VirtualMachineScaleSetUpdateVMProfile `json:"virtualMachineProfile,omitempty"` + ZonalPlatformFaultDomainAlignMode *ZonalPlatformFaultDomainAlignMode `json:"zonalPlatformFaultDomainAlignMode,omitempty"` } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdatepublicipaddressconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdatepublicipaddressconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdatepublicipaddressconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdatepublicipaddressconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdatepublicipaddressconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdatepublicipaddressconfigurationproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdatepublicipaddressconfigurationproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdatepublicipaddressconfigurationproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdatestorageprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdatestorageprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdatestorageprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdatestorageprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdatevmprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdatevmprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetupdatevmprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetupdatevmprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetvmextensionssummary.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetvmextensionssummary.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetvmextensionssummary.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetvmextensionssummary.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetvminstanceids.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetvminstanceids.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetvminstanceids.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetvminstanceids.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetvminstancerequiredids.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetvminstancerequiredids.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetvminstancerequiredids.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetvminstancerequiredids.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetvmprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetvmprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinescalesetvmprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinescalesetvmprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinestatuscodecount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinestatuscodecount.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_virtualmachinestatuscodecount.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_virtualmachinestatuscodecount.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_vmdisksecurityprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_vmdisksecurityprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_vmdisksecurityprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_vmdisksecurityprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_vmgalleryapplication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_vmgalleryapplication.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_vmgalleryapplication.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_vmgalleryapplication.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_vmscalesetconverttosingleplacementgroupinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_vmscalesetconverttosingleplacementgroupinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_vmscalesetconverttosingleplacementgroupinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_vmscalesetconverttosingleplacementgroupinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_vmsizeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_vmsizeproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_vmsizeproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_vmsizeproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_windowsconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_windowsconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_windowsconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_windowsconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_windowsvmguestpatchautomaticbyplatformsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_windowsvmguestpatchautomaticbyplatformsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_windowsvmguestpatchautomaticbyplatformsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_windowsvmguestpatchautomaticbyplatformsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_winrmconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_winrmconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_winrmconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_winrmconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_winrmlistener.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_winrmlistener.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/model_winrmlistener.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/model_winrmlistener.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/version.go new file mode 100644 index 0000000000000..1cd085583d294 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets/version.go @@ -0,0 +1,12 @@ +package virtualmachinescalesets + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-07-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesets/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/README.md new file mode 100644 index 0000000000000..e379a74954c35 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/README.md @@ -0,0 +1,261 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs` Documentation + +The `jobs` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs" +``` + + +### Client Initialization + +```go +client := jobs.NewJobsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `JobsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := jobs.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue") + +payload := jobs.Job{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `JobsClient.Delete` + +```go +ctx := context.TODO() +id := jobs.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `JobsClient.ExecutionsList` + +```go +ctx := context.TODO() +id := jobs.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue") + +// alternatively `client.ExecutionsList(ctx, id, jobs.DefaultExecutionsListOperationOptions())` can be used to do batched pagination +items, err := client.ExecutionsListComplete(ctx, id, jobs.DefaultExecutionsListOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `JobsClient.Get` + +```go +ctx := context.TODO() +id := jobs.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `JobsClient.GetDetector` + +```go +ctx := context.TODO() +id := jobs.NewDetectorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue", "detectorValue") + +read, err := client.GetDetector(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `JobsClient.JobExecution` + +```go +ctx := context.TODO() +id := jobs.NewExecutionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue", "executionValue") + +read, err := client.JobExecution(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `JobsClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `JobsClient.ListBySubscription` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination +items, err := client.ListBySubscriptionComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `JobsClient.ListDetectors` + +```go +ctx := context.TODO() +id := jobs.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue") + +// alternatively `client.ListDetectors(ctx, id)` can be used to do batched pagination +items, err := client.ListDetectorsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `JobsClient.ListSecrets` + +```go +ctx := context.TODO() +id := jobs.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue") + +read, err := client.ListSecrets(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `JobsClient.ProxyGet` + +```go +ctx := context.TODO() +id := jobs.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue") + +read, err := client.ProxyGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `JobsClient.Start` + +```go +ctx := context.TODO() +id := jobs.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue") + +payload := jobs.JobExecutionTemplate{ + // ... +} + + +if err := client.StartThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `JobsClient.StopExecution` + +```go +ctx := context.TODO() +id := jobs.NewExecutionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue", "executionValue") + +if err := client.StopExecutionThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `JobsClient.StopMultipleExecutions` + +```go +ctx := context.TODO() +id := jobs.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue") + +// alternatively `client.StopMultipleExecutions(ctx, id)` can be used to do batched pagination +items, err := client.StopMultipleExecutionsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `JobsClient.Update` + +```go +ctx := context.TODO() +id := jobs.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue") + +payload := jobs.JobPatchProperties{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/client.go new file mode 100644 index 0000000000000..f89b0c72db7b9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/client.go @@ -0,0 +1,26 @@ +package jobs + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobsClient struct { + Client *resourcemanager.Client +} + +func NewJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobs", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating JobsClient: %+v", err) + } + + return &JobsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/constants.go new file mode 100644 index 0000000000000..c3726796349f7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/constants.go @@ -0,0 +1,421 @@ +package jobs + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtendedLocationTypes string + +const ( + ExtendedLocationTypesCustomLocation ExtendedLocationTypes = "CustomLocation" +) + +func PossibleValuesForExtendedLocationTypes() []string { + return []string{ + string(ExtendedLocationTypesCustomLocation), + } +} + +func (s *ExtendedLocationTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseExtendedLocationTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseExtendedLocationTypes(input string) (*ExtendedLocationTypes, error) { + vals := map[string]ExtendedLocationTypes{ + "customlocation": ExtendedLocationTypesCustomLocation, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ExtendedLocationTypes(input) + return &out, nil +} + +type IdentitySettingsLifeCycle string + +const ( + IdentitySettingsLifeCycleAll IdentitySettingsLifeCycle = "All" + IdentitySettingsLifeCycleInit IdentitySettingsLifeCycle = "Init" + IdentitySettingsLifeCycleMain IdentitySettingsLifeCycle = "Main" + IdentitySettingsLifeCycleNone IdentitySettingsLifeCycle = "None" +) + +func PossibleValuesForIdentitySettingsLifeCycle() []string { + return []string{ + string(IdentitySettingsLifeCycleAll), + string(IdentitySettingsLifeCycleInit), + string(IdentitySettingsLifeCycleMain), + string(IdentitySettingsLifeCycleNone), + } +} + +func (s *IdentitySettingsLifeCycle) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIdentitySettingsLifeCycle(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIdentitySettingsLifeCycle(input string) (*IdentitySettingsLifeCycle, error) { + vals := map[string]IdentitySettingsLifeCycle{ + "all": IdentitySettingsLifeCycleAll, + "init": IdentitySettingsLifeCycleInit, + "main": IdentitySettingsLifeCycleMain, + "none": IdentitySettingsLifeCycleNone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IdentitySettingsLifeCycle(input) + return &out, nil +} + +type ImageType string + +const ( + ImageTypeCloudBuild ImageType = "CloudBuild" + ImageTypeContainerImage ImageType = "ContainerImage" +) + +func PossibleValuesForImageType() []string { + return []string{ + string(ImageTypeCloudBuild), + string(ImageTypeContainerImage), + } +} + +func (s *ImageType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseImageType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseImageType(input string) (*ImageType, error) { + vals := map[string]ImageType{ + "cloudbuild": ImageTypeCloudBuild, + "containerimage": ImageTypeContainerImage, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ImageType(input) + return &out, nil +} + +type JobExecutionRunningState string + +const ( + JobExecutionRunningStateDegraded JobExecutionRunningState = "Degraded" + JobExecutionRunningStateFailed JobExecutionRunningState = "Failed" + JobExecutionRunningStateProcessing JobExecutionRunningState = "Processing" + JobExecutionRunningStateRunning JobExecutionRunningState = "Running" + JobExecutionRunningStateStopped JobExecutionRunningState = "Stopped" + JobExecutionRunningStateSucceeded JobExecutionRunningState = "Succeeded" + JobExecutionRunningStateUnknown JobExecutionRunningState = "Unknown" +) + +func PossibleValuesForJobExecutionRunningState() []string { + return []string{ + string(JobExecutionRunningStateDegraded), + string(JobExecutionRunningStateFailed), + string(JobExecutionRunningStateProcessing), + string(JobExecutionRunningStateRunning), + string(JobExecutionRunningStateStopped), + string(JobExecutionRunningStateSucceeded), + string(JobExecutionRunningStateUnknown), + } +} + +func (s *JobExecutionRunningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseJobExecutionRunningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseJobExecutionRunningState(input string) (*JobExecutionRunningState, error) { + vals := map[string]JobExecutionRunningState{ + "degraded": JobExecutionRunningStateDegraded, + "failed": JobExecutionRunningStateFailed, + "processing": JobExecutionRunningStateProcessing, + "running": JobExecutionRunningStateRunning, + "stopped": JobExecutionRunningStateStopped, + "succeeded": JobExecutionRunningStateSucceeded, + "unknown": JobExecutionRunningStateUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := JobExecutionRunningState(input) + return &out, nil +} + +type JobProvisioningState string + +const ( + JobProvisioningStateCanceled JobProvisioningState = "Canceled" + JobProvisioningStateDeleting JobProvisioningState = "Deleting" + JobProvisioningStateFailed JobProvisioningState = "Failed" + JobProvisioningStateInProgress JobProvisioningState = "InProgress" + JobProvisioningStateSucceeded JobProvisioningState = "Succeeded" +) + +func PossibleValuesForJobProvisioningState() []string { + return []string{ + string(JobProvisioningStateCanceled), + string(JobProvisioningStateDeleting), + string(JobProvisioningStateFailed), + string(JobProvisioningStateInProgress), + string(JobProvisioningStateSucceeded), + } +} + +func (s *JobProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseJobProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseJobProvisioningState(input string) (*JobProvisioningState, error) { + vals := map[string]JobProvisioningState{ + "canceled": JobProvisioningStateCanceled, + "deleting": JobProvisioningStateDeleting, + "failed": JobProvisioningStateFailed, + "inprogress": JobProvisioningStateInProgress, + "succeeded": JobProvisioningStateSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := JobProvisioningState(input) + return &out, nil +} + +type Scheme string + +const ( + SchemeHTTP Scheme = "HTTP" + SchemeHTTPS Scheme = "HTTPS" +) + +func PossibleValuesForScheme() []string { + return []string{ + string(SchemeHTTP), + string(SchemeHTTPS), + } +} + +func (s *Scheme) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseScheme(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseScheme(input string) (*Scheme, error) { + vals := map[string]Scheme{ + "http": SchemeHTTP, + "https": SchemeHTTPS, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Scheme(input) + return &out, nil +} + +type StorageType string + +const ( + StorageTypeAzureFile StorageType = "AzureFile" + StorageTypeEmptyDir StorageType = "EmptyDir" + StorageTypeNfsAzureFile StorageType = "NfsAzureFile" + StorageTypeSecret StorageType = "Secret" + StorageTypeSmb StorageType = "Smb" +) + +func PossibleValuesForStorageType() []string { + return []string{ + string(StorageTypeAzureFile), + string(StorageTypeEmptyDir), + string(StorageTypeNfsAzureFile), + string(StorageTypeSecret), + string(StorageTypeSmb), + } +} + +func (s *StorageType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseStorageType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseStorageType(input string) (*StorageType, error) { + vals := map[string]StorageType{ + "azurefile": StorageTypeAzureFile, + "emptydir": StorageTypeEmptyDir, + "nfsazurefile": StorageTypeNfsAzureFile, + "secret": StorageTypeSecret, + "smb": StorageTypeSmb, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := StorageType(input) + return &out, nil +} + +type TriggerType string + +const ( + TriggerTypeEvent TriggerType = "Event" + TriggerTypeManual TriggerType = "Manual" + TriggerTypeSchedule TriggerType = "Schedule" +) + +func PossibleValuesForTriggerType() []string { + return []string{ + string(TriggerTypeEvent), + string(TriggerTypeManual), + string(TriggerTypeSchedule), + } +} + +func (s *TriggerType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseTriggerType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseTriggerType(input string) (*TriggerType, error) { + vals := map[string]TriggerType{ + "event": TriggerTypeEvent, + "manual": TriggerTypeManual, + "schedule": TriggerTypeSchedule, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := TriggerType(input) + return &out, nil +} + +type Type string + +const ( + TypeLiveness Type = "Liveness" + TypeReadiness Type = "Readiness" + TypeStartup Type = "Startup" +) + +func PossibleValuesForType() []string { + return []string{ + string(TypeLiveness), + string(TypeReadiness), + string(TypeStartup), + } +} + +func (s *Type) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseType(input string) (*Type, error) { + vals := map[string]Type{ + "liveness": TypeLiveness, + "readiness": TypeReadiness, + "startup": TypeStartup, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Type(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/id_detector.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/id_detector.go new file mode 100644 index 0000000000000..778152219f6c6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/id_detector.go @@ -0,0 +1,139 @@ +package jobs + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&DetectorId{}) +} + +var _ resourceids.ResourceId = &DetectorId{} + +// DetectorId is a struct representing the Resource ID for a Detector +type DetectorId struct { + SubscriptionId string + ResourceGroupName string + JobName string + DetectorName string +} + +// NewDetectorID returns a new DetectorId struct +func NewDetectorID(subscriptionId string, resourceGroupName string, jobName string, detectorName string) DetectorId { + return DetectorId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + JobName: jobName, + DetectorName: detectorName, + } +} + +// ParseDetectorID parses 'input' into a DetectorId +func ParseDetectorID(input string) (*DetectorId, error) { + parser := resourceids.NewParserFromResourceIdType(&DetectorId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := DetectorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseDetectorIDInsensitively parses 'input' case-insensitively into a DetectorId +// note: this method should only be used for API response data and not user input +func ParseDetectorIDInsensitively(input string) (*DetectorId, error) { + parser := resourceids.NewParserFromResourceIdType(&DetectorId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := DetectorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DetectorId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.JobName, ok = input.Parsed["jobName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "jobName", input) + } + + if id.DetectorName, ok = input.Parsed["detectorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "detectorName", input) + } + + return nil +} + +// ValidateDetectorID checks that 'input' can be parsed as a Detector ID +func ValidateDetectorID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseDetectorID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Detector ID +func (id DetectorId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.App/jobs/%s/detectors/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.JobName, id.DetectorName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Detector ID +func (id DetectorId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftApp", "Microsoft.App", "Microsoft.App"), + resourceids.StaticSegment("staticJobs", "jobs", "jobs"), + resourceids.UserSpecifiedSegment("jobName", "jobValue"), + resourceids.StaticSegment("staticDetectors", "detectors", "detectors"), + resourceids.UserSpecifiedSegment("detectorName", "detectorValue"), + } +} + +// String returns a human-readable description of this Detector ID +func (id DetectorId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Job Name: %q", id.JobName), + fmt.Sprintf("Detector Name: %q", id.DetectorName), + } + return fmt.Sprintf("Detector (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/id_execution.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/id_execution.go new file mode 100644 index 0000000000000..252582285a746 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/id_execution.go @@ -0,0 +1,139 @@ +package jobs + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&ExecutionId{}) +} + +var _ resourceids.ResourceId = &ExecutionId{} + +// ExecutionId is a struct representing the Resource ID for a Execution +type ExecutionId struct { + SubscriptionId string + ResourceGroupName string + JobName string + ExecutionName string +} + +// NewExecutionID returns a new ExecutionId struct +func NewExecutionID(subscriptionId string, resourceGroupName string, jobName string, executionName string) ExecutionId { + return ExecutionId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + JobName: jobName, + ExecutionName: executionName, + } +} + +// ParseExecutionID parses 'input' into a ExecutionId +func ParseExecutionID(input string) (*ExecutionId, error) { + parser := resourceids.NewParserFromResourceIdType(&ExecutionId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ExecutionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseExecutionIDInsensitively parses 'input' case-insensitively into a ExecutionId +// note: this method should only be used for API response data and not user input +func ParseExecutionIDInsensitively(input string) (*ExecutionId, error) { + parser := resourceids.NewParserFromResourceIdType(&ExecutionId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ExecutionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ExecutionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.JobName, ok = input.Parsed["jobName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "jobName", input) + } + + if id.ExecutionName, ok = input.Parsed["executionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "executionName", input) + } + + return nil +} + +// ValidateExecutionID checks that 'input' can be parsed as a Execution ID +func ValidateExecutionID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseExecutionID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Execution ID +func (id ExecutionId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.App/jobs/%s/executions/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.JobName, id.ExecutionName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Execution ID +func (id ExecutionId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftApp", "Microsoft.App", "Microsoft.App"), + resourceids.StaticSegment("staticJobs", "jobs", "jobs"), + resourceids.UserSpecifiedSegment("jobName", "jobValue"), + resourceids.StaticSegment("staticExecutions", "executions", "executions"), + resourceids.UserSpecifiedSegment("executionName", "executionValue"), + } +} + +// String returns a human-readable description of this Execution ID +func (id ExecutionId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Job Name: %q", id.JobName), + fmt.Sprintf("Execution Name: %q", id.ExecutionName), + } + return fmt.Sprintf("Execution (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/id_job.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/id_job.go new file mode 100644 index 0000000000000..818f9f6aa8280 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/id_job.go @@ -0,0 +1,130 @@ +package jobs + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&JobId{}) +} + +var _ resourceids.ResourceId = &JobId{} + +// JobId is a struct representing the Resource ID for a Job +type JobId struct { + SubscriptionId string + ResourceGroupName string + JobName string +} + +// NewJobID returns a new JobId struct +func NewJobID(subscriptionId string, resourceGroupName string, jobName string) JobId { + return JobId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + JobName: jobName, + } +} + +// ParseJobID parses 'input' into a JobId +func ParseJobID(input string) (*JobId, error) { + parser := resourceids.NewParserFromResourceIdType(&JobId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := JobId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseJobIDInsensitively parses 'input' case-insensitively into a JobId +// note: this method should only be used for API response data and not user input +func ParseJobIDInsensitively(input string) (*JobId, error) { + parser := resourceids.NewParserFromResourceIdType(&JobId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := JobId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *JobId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.JobName, ok = input.Parsed["jobName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "jobName", input) + } + + return nil +} + +// ValidateJobID checks that 'input' can be parsed as a Job ID +func ValidateJobID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseJobID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Job ID +func (id JobId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.App/jobs/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.JobName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Job ID +func (id JobId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftApp", "Microsoft.App", "Microsoft.App"), + resourceids.StaticSegment("staticJobs", "jobs", "jobs"), + resourceids.UserSpecifiedSegment("jobName", "jobValue"), + } +} + +// String returns a human-readable description of this Job ID +func (id JobId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Job Name: %q", id.JobName), + } + return fmt.Sprintf("Job (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_createorupdate.go new file mode 100644 index 0000000000000..ef6e9f361f533 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_createorupdate.go @@ -0,0 +1,75 @@ +package jobs + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Job +} + +// CreateOrUpdate ... +func (c JobsClient) CreateOrUpdate(ctx context.Context, id JobId, input Job) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c JobsClient) CreateOrUpdateThenPoll(ctx context.Context, id JobId, input Job) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_delete.go new file mode 100644 index 0000000000000..8523d87d6af9c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_delete.go @@ -0,0 +1,71 @@ +package jobs + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c JobsClient) Delete(ctx context.Context, id JobId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c JobsClient) DeleteThenPoll(ctx context.Context, id JobId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_executionslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_executionslist.go new file mode 100644 index 0000000000000..8032ccc4ee222 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_executionslist.go @@ -0,0 +1,133 @@ +package jobs + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExecutionsListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]JobExecution +} + +type ExecutionsListCompleteResult struct { + LatestHttpResponse *http.Response + Items []JobExecution +} + +type ExecutionsListOperationOptions struct { + Filter *string +} + +func DefaultExecutionsListOperationOptions() ExecutionsListOperationOptions { + return ExecutionsListOperationOptions{} +} + +func (o ExecutionsListOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o ExecutionsListOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o ExecutionsListOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.Filter != nil { + out.Append("$filter", fmt.Sprintf("%v", *o.Filter)) + } + return &out +} + +type ExecutionsListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ExecutionsListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ExecutionsList ... +func (c JobsClient) ExecutionsList(ctx context.Context, id JobId, options ExecutionsListOperationOptions) (result ExecutionsListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Pager: &ExecutionsListCustomPager{}, + Path: fmt.Sprintf("%s/executions", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]JobExecution `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ExecutionsListComplete retrieves all the results into a single object +func (c JobsClient) ExecutionsListComplete(ctx context.Context, id JobId, options ExecutionsListOperationOptions) (ExecutionsListCompleteResult, error) { + return c.ExecutionsListCompleteMatchingPredicate(ctx, id, options, JobExecutionOperationPredicate{}) +} + +// ExecutionsListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c JobsClient) ExecutionsListCompleteMatchingPredicate(ctx context.Context, id JobId, options ExecutionsListOperationOptions, predicate JobExecutionOperationPredicate) (result ExecutionsListCompleteResult, err error) { + items := make([]JobExecution, 0) + + resp, err := c.ExecutionsList(ctx, id, options) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ExecutionsListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_get.go new file mode 100644 index 0000000000000..3e21435af3384 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_get.go @@ -0,0 +1,54 @@ +package jobs + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *Job +} + +// Get ... +func (c JobsClient) Get(ctx context.Context, id JobId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model Job + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_getdetector.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_getdetector.go new file mode 100644 index 0000000000000..548f39c536999 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_getdetector.go @@ -0,0 +1,54 @@ +package jobs + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetDetectorOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *Diagnostics +} + +// GetDetector ... +func (c JobsClient) GetDetector(ctx context.Context, id DetectorId) (result GetDetectorOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model Diagnostics + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_jobexecution.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_jobexecution.go new file mode 100644 index 0000000000000..910aedeff62c8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_jobexecution.go @@ -0,0 +1,54 @@ +package jobs + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobExecutionOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *JobExecution +} + +// JobExecution ... +func (c JobsClient) JobExecution(ctx context.Context, id ExecutionId) (result JobExecutionOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model JobExecution + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_listbyresourcegroup.go new file mode 100644 index 0000000000000..0596f8a764b50 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_listbyresourcegroup.go @@ -0,0 +1,106 @@ +package jobs + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Job +} + +type ListByResourceGroupCompleteResult struct { + LatestHttpResponse *http.Response + Items []Job +} + +type ListByResourceGroupCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByResourceGroup ... +func (c JobsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByResourceGroupCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.App/jobs", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Job `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByResourceGroupComplete retrieves all the results into a single object +func (c JobsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, JobOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c JobsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate JobOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { + items := make([]Job, 0) + + resp, err := c.ListByResourceGroup(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByResourceGroupCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_listbysubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_listbysubscription.go new file mode 100644 index 0000000000000..682abb825f0ad --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_listbysubscription.go @@ -0,0 +1,106 @@ +package jobs + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListBySubscriptionOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Job +} + +type ListBySubscriptionCompleteResult struct { + LatestHttpResponse *http.Response + Items []Job +} + +type ListBySubscriptionCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListBySubscriptionCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListBySubscription ... +func (c JobsClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListBySubscriptionCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.App/jobs", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Job `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListBySubscriptionComplete retrieves all the results into a single object +func (c JobsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, JobOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c JobsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate JobOperationPredicate) (result ListBySubscriptionCompleteResult, err error) { + items := make([]Job, 0) + + resp, err := c.ListBySubscription(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListBySubscriptionCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_listdetectors.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_listdetectors.go new file mode 100644 index 0000000000000..ce52fa3e8b656 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_listdetectors.go @@ -0,0 +1,105 @@ +package jobs + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListDetectorsOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Diagnostics +} + +type ListDetectorsCompleteResult struct { + LatestHttpResponse *http.Response + Items []Diagnostics +} + +type ListDetectorsCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListDetectorsCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListDetectors ... +func (c JobsClient) ListDetectors(ctx context.Context, id JobId) (result ListDetectorsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListDetectorsCustomPager{}, + Path: fmt.Sprintf("%s/detectors", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Diagnostics `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListDetectorsComplete retrieves all the results into a single object +func (c JobsClient) ListDetectorsComplete(ctx context.Context, id JobId) (ListDetectorsCompleteResult, error) { + return c.ListDetectorsCompleteMatchingPredicate(ctx, id, DiagnosticsOperationPredicate{}) +} + +// ListDetectorsCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c JobsClient) ListDetectorsCompleteMatchingPredicate(ctx context.Context, id JobId, predicate DiagnosticsOperationPredicate) (result ListDetectorsCompleteResult, err error) { + items := make([]Diagnostics, 0) + + resp, err := c.ListDetectors(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListDetectorsCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_listsecrets.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_listsecrets.go new file mode 100644 index 0000000000000..33fe668d3c9e1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_listsecrets.go @@ -0,0 +1,55 @@ +package jobs + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListSecretsOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *JobSecretsCollection +} + +// ListSecrets ... +func (c JobsClient) ListSecrets(ctx context.Context, id JobId) (result ListSecretsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/listSecrets", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model JobSecretsCollection + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_proxyget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_proxyget.go new file mode 100644 index 0000000000000..278f2840fda2e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_proxyget.go @@ -0,0 +1,55 @@ +package jobs + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProxyGetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *Job +} + +// ProxyGet ... +func (c JobsClient) ProxyGet(ctx context.Context, id JobId) (result ProxyGetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/detectorProperties/rootApi", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model Job + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_start.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_start.go new file mode 100644 index 0000000000000..9be83c5ebf078 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_start.go @@ -0,0 +1,75 @@ +package jobs + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StartOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *JobExecutionBase +} + +// Start ... +func (c JobsClient) Start(ctx context.Context, id JobId, input JobExecutionTemplate) (result StartOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/start", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// StartThenPoll performs Start then polls until it's completed +func (c JobsClient) StartThenPoll(ctx context.Context, id JobId, input JobExecutionTemplate) error { + result, err := c.Start(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Start: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Start: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_stopexecution.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_stopexecution.go new file mode 100644 index 0000000000000..47c37cf69a74c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_stopexecution.go @@ -0,0 +1,70 @@ +package jobs + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StopExecutionOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// StopExecution ... +func (c JobsClient) StopExecution(ctx context.Context, id ExecutionId) (result StopExecutionOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/stop", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// StopExecutionThenPoll performs StopExecution then polls until it's completed +func (c JobsClient) StopExecutionThenPoll(ctx context.Context, id ExecutionId) error { + result, err := c.StopExecution(ctx, id) + if err != nil { + return fmt.Errorf("performing StopExecution: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after StopExecution: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_stopmultipleexecutions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_stopmultipleexecutions.go new file mode 100644 index 0000000000000..415f7ddca742a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_stopmultipleexecutions.go @@ -0,0 +1,89 @@ +package jobs + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StopMultipleExecutionsOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *[]JobExecution +} + +type StopMultipleExecutionsCompleteResult struct { + LatestHttpResponse *http.Response + Items []JobExecution +} + +type StopMultipleExecutionsCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *StopMultipleExecutionsCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// StopMultipleExecutions ... +func (c JobsClient) StopMultipleExecutions(ctx context.Context, id JobId) (result StopMultipleExecutionsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Pager: &StopMultipleExecutionsCustomPager{}, + Path: fmt.Sprintf("%s/stop", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// StopMultipleExecutionsThenPoll performs StopMultipleExecutions then polls until it's completed +func (c JobsClient) StopMultipleExecutionsThenPoll(ctx context.Context, id JobId) error { + result, err := c.StopMultipleExecutions(ctx, id) + if err != nil { + return fmt.Errorf("performing StopMultipleExecutions: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after StopMultipleExecutions: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_update.go new file mode 100644 index 0000000000000..b88a194a95e0b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_update.go @@ -0,0 +1,75 @@ +package jobs + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Job +} + +// Update ... +func (c JobsClient) Update(ctx context.Context, id JobId, input JobPatchProperties) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c JobsClient) UpdateThenPoll(ctx context.Context, id JobId, input JobPatchProperties) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_basecontainer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_basecontainer.go new file mode 100644 index 0000000000000..23c8738457a69 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_basecontainer.go @@ -0,0 +1,15 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BaseContainer struct { + Args *[]string `json:"args,omitempty"` + Command *[]string `json:"command,omitempty"` + Env *[]EnvironmentVar `json:"env,omitempty"` + Image *string `json:"image,omitempty"` + ImageType *ImageType `json:"imageType,omitempty"` + Name *string `json:"name,omitempty"` + Resources *ContainerResources `json:"resources,omitempty"` + VolumeMounts *[]VolumeMount `json:"volumeMounts,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_container.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_container.go new file mode 100644 index 0000000000000..c6450177a71f3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_container.go @@ -0,0 +1,16 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Container struct { + Args *[]string `json:"args,omitempty"` + Command *[]string `json:"command,omitempty"` + Env *[]EnvironmentVar `json:"env,omitempty"` + Image *string `json:"image,omitempty"` + ImageType *ImageType `json:"imageType,omitempty"` + Name *string `json:"name,omitempty"` + Probes *[]ContainerAppProbe `json:"probes,omitempty"` + Resources *ContainerResources `json:"resources,omitempty"` + VolumeMounts *[]VolumeMount `json:"volumeMounts,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerappprobe.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerappprobe.go new file mode 100644 index 0000000000000..e89f40cc8974b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerappprobe.go @@ -0,0 +1,16 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ContainerAppProbe struct { + FailureThreshold *int64 `json:"failureThreshold,omitempty"` + HTTPGet *ContainerAppProbeHTTPGet `json:"httpGet,omitempty"` + InitialDelaySeconds *int64 `json:"initialDelaySeconds,omitempty"` + PeriodSeconds *int64 `json:"periodSeconds,omitempty"` + SuccessThreshold *int64 `json:"successThreshold,omitempty"` + TcpSocket *ContainerAppProbeTcpSocket `json:"tcpSocket,omitempty"` + TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` + TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty"` + Type *Type `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerappprobehttpget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerappprobehttpget.go new file mode 100644 index 0000000000000..1ab675e459311 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerappprobehttpget.go @@ -0,0 +1,12 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ContainerAppProbeHTTPGet struct { + HTTPHeaders *[]ContainerAppProbeHTTPGetHTTPHeadersInlined `json:"httpHeaders,omitempty"` + Host *string `json:"host,omitempty"` + Path *string `json:"path,omitempty"` + Port int64 `json:"port"` + Scheme *Scheme `json:"scheme,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerappprobehttpgethttpheadersinlined.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerappprobehttpgethttpheadersinlined.go new file mode 100644 index 0000000000000..becc34945ce1b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerappprobehttpgethttpheadersinlined.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ContainerAppProbeHTTPGetHTTPHeadersInlined struct { + Name string `json:"name"` + Value string `json:"value"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerappprobetcpsocket.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerappprobetcpsocket.go new file mode 100644 index 0000000000000..e9e583e39825f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerappprobetcpsocket.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ContainerAppProbeTcpSocket struct { + Host *string `json:"host,omitempty"` + Port int64 `json:"port"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerexecutionstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerexecutionstatus.go new file mode 100644 index 0000000000000..cbd0c355a4db5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerexecutionstatus.go @@ -0,0 +1,11 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ContainerExecutionStatus struct { + AdditionalInformation *string `json:"additionalInformation,omitempty"` + Code *int64 `json:"code,omitempty"` + Name *string `json:"name,omitempty"` + Status *string `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerresources.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerresources.go new file mode 100644 index 0000000000000..f48b9f767864c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerresources.go @@ -0,0 +1,10 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ContainerResources struct { + Cpu *float64 `json:"cpu,omitempty"` + EphemeralStorage *string `json:"ephemeralStorage,omitempty"` + Memory *string `json:"memory,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticdataprovidermetadata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticdataprovidermetadata.go new file mode 100644 index 0000000000000..06c119bbae199 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticdataprovidermetadata.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiagnosticDataProviderMetadata struct { + PropertyBag *[]DiagnosticDataProviderMetadataPropertyBagInlined `json:"propertyBag,omitempty"` + ProviderName *string `json:"providerName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticdataprovidermetadatapropertybaginlined.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticdataprovidermetadatapropertybaginlined.go new file mode 100644 index 0000000000000..04a6fbcd52e88 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticdataprovidermetadatapropertybaginlined.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiagnosticDataProviderMetadataPropertyBagInlined struct { + Name *string `json:"name,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticdatatableresponsecolumn.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticdatatableresponsecolumn.go new file mode 100644 index 0000000000000..a26027ca61355 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticdatatableresponsecolumn.go @@ -0,0 +1,10 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiagnosticDataTableResponseColumn struct { + ColumnName *string `json:"columnName,omitempty"` + ColumnType *string `json:"columnType,omitempty"` + DataType *string `json:"dataType,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticdatatableresponseobject.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticdatatableresponseobject.go new file mode 100644 index 0000000000000..b69b892b9ed54 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticdatatableresponseobject.go @@ -0,0 +1,10 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiagnosticDataTableResponseObject struct { + Columns *[]DiagnosticDataTableResponseColumn `json:"columns,omitempty"` + Rows *[]interface{} `json:"rows,omitempty"` + TableName *string `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticrendering.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticrendering.go new file mode 100644 index 0000000000000..157c4b308353d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticrendering.go @@ -0,0 +1,11 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiagnosticRendering struct { + Description *string `json:"description,omitempty"` + IsVisible *bool `json:"isVisible,omitempty"` + Title *string `json:"title,omitempty"` + Type *int64 `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnostics.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnostics.go new file mode 100644 index 0000000000000..7ae29be0ad6c1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnostics.go @@ -0,0 +1,16 @@ +package jobs + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Diagnostics struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *DiagnosticsProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsdataapiresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsdataapiresponse.go new file mode 100644 index 0000000000000..57329a4aea36a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsdataapiresponse.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiagnosticsDataApiResponse struct { + RenderingProperties *DiagnosticRendering `json:"renderingProperties,omitempty"` + Table *DiagnosticDataTableResponseObject `json:"table,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsdefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsdefinition.go new file mode 100644 index 0000000000000..9ffb303aaae9f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsdefinition.go @@ -0,0 +1,16 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiagnosticsDefinition struct { + AnalysisTypes *[]string `json:"analysisTypes,omitempty"` + Author *string `json:"author,omitempty"` + Category *string `json:"category,omitempty"` + Description *string `json:"description,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Score *float64 `json:"score,omitempty"` + SupportTopicList *[]DiagnosticSupportTopic `json:"supportTopicList,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsproperties.go new file mode 100644 index 0000000000000..a6012a1a0dd30 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsproperties.go @@ -0,0 +1,11 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiagnosticsProperties struct { + DataProviderMetadata *DiagnosticDataProviderMetadata `json:"dataProviderMetadata,omitempty"` + Dataset *[]DiagnosticsDataApiResponse `json:"dataset,omitempty"` + Metadata *DiagnosticsDefinition `json:"metadata,omitempty"` + Status *DiagnosticsStatus `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsstatus.go new file mode 100644 index 0000000000000..0ff1fe8b90c6d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsstatus.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiagnosticsStatus struct { + Message *string `json:"message,omitempty"` + StatusId *int64 `json:"statusId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsupporttopic.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsupporttopic.go new file mode 100644 index 0000000000000..a68cb40cb631a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsupporttopic.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiagnosticSupportTopic struct { + Id *string `json:"id,omitempty"` + PesId *string `json:"pesId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_environmentvar.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_environmentvar.go new file mode 100644 index 0000000000000..ca2a887d4a461 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_environmentvar.go @@ -0,0 +1,10 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EnvironmentVar struct { + Name *string `json:"name,omitempty"` + SecretRef *string `json:"secretRef,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_executionstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_executionstatus.go new file mode 100644 index 0000000000000..f4aec8ead086c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_executionstatus.go @@ -0,0 +1,8 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExecutionStatus struct { + Replicas *[]ReplicaExecutionStatus `json:"replicas,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_extendedlocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_extendedlocation.go new file mode 100644 index 0000000000000..590cc4c7cfcb1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_extendedlocation.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtendedLocation struct { + Name *string `json:"name,omitempty"` + Type *ExtendedLocationTypes `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_identitysettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_identitysettings.go new file mode 100644 index 0000000000000..8ab254c0e993c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_identitysettings.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IdentitySettings struct { + Identity string `json:"identity"` + Lifecycle *IdentitySettingsLifeCycle `json:"lifecycle,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_job.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_job.go new file mode 100644 index 0000000000000..5401e27127475 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_job.go @@ -0,0 +1,21 @@ +package jobs + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Job struct { + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + Id *string `json:"id,omitempty"` + Identity *identity.LegacySystemAndUserAssignedMap `json:"identity,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *JobProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobconfiguration.go new file mode 100644 index 0000000000000..a440282f06949 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobconfiguration.go @@ -0,0 +1,16 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobConfiguration struct { + EventTriggerConfig *JobConfigurationEventTriggerConfig `json:"eventTriggerConfig,omitempty"` + IdentitySettings *[]IdentitySettings `json:"identitySettings,omitempty"` + ManualTriggerConfig *JobConfigurationManualTriggerConfig `json:"manualTriggerConfig,omitempty"` + Registries *[]RegistryCredentials `json:"registries,omitempty"` + ReplicaRetryLimit *int64 `json:"replicaRetryLimit,omitempty"` + ReplicaTimeout int64 `json:"replicaTimeout"` + ScheduleTriggerConfig *JobConfigurationScheduleTriggerConfig `json:"scheduleTriggerConfig,omitempty"` + Secrets *[]Secret `json:"secrets,omitempty"` + TriggerType TriggerType `json:"triggerType"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobconfigurationeventtriggerconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobconfigurationeventtriggerconfig.go new file mode 100644 index 0000000000000..a50616ad9c4b5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobconfigurationeventtriggerconfig.go @@ -0,0 +1,10 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobConfigurationEventTriggerConfig struct { + Parallelism *int64 `json:"parallelism,omitempty"` + ReplicaCompletionCount *int64 `json:"replicaCompletionCount,omitempty"` + Scale *JobScale `json:"scale,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobconfigurationmanualtriggerconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobconfigurationmanualtriggerconfig.go new file mode 100644 index 0000000000000..bb4bd29d5ace7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobconfigurationmanualtriggerconfig.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobConfigurationManualTriggerConfig struct { + Parallelism *int64 `json:"parallelism,omitempty"` + ReplicaCompletionCount *int64 `json:"replicaCompletionCount,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobconfigurationscheduletriggerconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobconfigurationscheduletriggerconfig.go new file mode 100644 index 0000000000000..6e82bdb662193 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobconfigurationscheduletriggerconfig.go @@ -0,0 +1,10 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobConfigurationScheduleTriggerConfig struct { + CronExpression string `json:"cronExpression"` + Parallelism *int64 `json:"parallelism,omitempty"` + ReplicaCompletionCount *int64 `json:"replicaCompletionCount,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecution.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecution.go new file mode 100644 index 0000000000000..04a28d5b095db --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecution.go @@ -0,0 +1,11 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobExecution struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *JobExecutionProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecutionbase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecutionbase.go new file mode 100644 index 0000000000000..b6bf9e5b55b09 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecutionbase.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobExecutionBase struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecutioncontainer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecutioncontainer.go new file mode 100644 index 0000000000000..709af1fd8363d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecutioncontainer.go @@ -0,0 +1,13 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobExecutionContainer struct { + Args *[]string `json:"args,omitempty"` + Command *[]string `json:"command,omitempty"` + Env *[]EnvironmentVar `json:"env,omitempty"` + Image *string `json:"image,omitempty"` + Name *string `json:"name,omitempty"` + Resources *ContainerResources `json:"resources,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecutionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecutionproperties.go new file mode 100644 index 0000000000000..b0001531f0bfd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecutionproperties.go @@ -0,0 +1,42 @@ +package jobs + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobExecutionProperties struct { + DetailedStatus *ExecutionStatus `json:"detailedStatus,omitempty"` + EndTime *string `json:"endTime,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status *JobExecutionRunningState `json:"status,omitempty"` + Template *JobExecutionTemplate `json:"template,omitempty"` +} + +func (o *JobExecutionProperties) GetEndTimeAsTime() (*time.Time, error) { + if o.EndTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *JobExecutionProperties) SetEndTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EndTime = &formatted +} + +func (o *JobExecutionProperties) GetStartTimeAsTime() (*time.Time, error) { + if o.StartTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *JobExecutionProperties) SetStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.StartTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecutiontemplate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecutiontemplate.go new file mode 100644 index 0000000000000..b7f77c7769311 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecutiontemplate.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobExecutionTemplate struct { + Containers *[]JobExecutionContainer `json:"containers,omitempty"` + InitContainers *[]JobExecutionContainer `json:"initContainers,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobpatchproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobpatchproperties.go new file mode 100644 index 0000000000000..e767f594586f6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobpatchproperties.go @@ -0,0 +1,15 @@ +package jobs + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobPatchProperties struct { + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + Identity *identity.LegacySystemAndUserAssignedMap `json:"identity,omitempty"` + Properties *JobPatchPropertiesProperties `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobpatchpropertiesproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobpatchpropertiesproperties.go new file mode 100644 index 0000000000000..c1d2ed337c2b1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobpatchpropertiesproperties.go @@ -0,0 +1,12 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobPatchPropertiesProperties struct { + Configuration *JobConfiguration `json:"configuration,omitempty"` + EnvironmentId *string `json:"environmentId,omitempty"` + EventStreamEndpoint *string `json:"eventStreamEndpoint,omitempty"` + OutboundIPAddresses *[]string `json:"outboundIpAddresses,omitempty"` + Template *JobTemplate `json:"template,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobproperties.go new file mode 100644 index 0000000000000..9865a06d79f0e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobproperties.go @@ -0,0 +1,14 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobProperties struct { + Configuration *JobConfiguration `json:"configuration,omitempty"` + EnvironmentId *string `json:"environmentId,omitempty"` + EventStreamEndpoint *string `json:"eventStreamEndpoint,omitempty"` + OutboundIPAddresses *[]string `json:"outboundIpAddresses,omitempty"` + ProvisioningState *JobProvisioningState `json:"provisioningState,omitempty"` + Template *JobTemplate `json:"template,omitempty"` + WorkloadProfileName *string `json:"workloadProfileName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobscale.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobscale.go new file mode 100644 index 0000000000000..c13b18eea1b60 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobscale.go @@ -0,0 +1,11 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobScale struct { + MaxExecutions *int64 `json:"maxExecutions,omitempty"` + MinExecutions *int64 `json:"minExecutions,omitempty"` + PollingInterval *int64 `json:"pollingInterval,omitempty"` + Rules *[]JobScaleRule `json:"rules,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobscalerule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobscalerule.go new file mode 100644 index 0000000000000..5ee06f9d1faa3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobscalerule.go @@ -0,0 +1,12 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobScaleRule struct { + Auth *[]ScaleRuleAuth `json:"auth,omitempty"` + Identity *string `json:"identity,omitempty"` + Metadata *interface{} `json:"metadata,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobsecretscollection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobsecretscollection.go new file mode 100644 index 0000000000000..9844058eda61d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobsecretscollection.go @@ -0,0 +1,8 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobSecretsCollection struct { + Value []Secret `json:"value"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobtemplate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobtemplate.go new file mode 100644 index 0000000000000..6e9bce871a972 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobtemplate.go @@ -0,0 +1,10 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobTemplate struct { + Containers *[]Container `json:"containers,omitempty"` + InitContainers *[]BaseContainer `json:"initContainers,omitempty"` + Volumes *[]Volume `json:"volumes,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_registrycredentials.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_registrycredentials.go new file mode 100644 index 0000000000000..c82f4c1245693 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_registrycredentials.go @@ -0,0 +1,11 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RegistryCredentials struct { + Identity *string `json:"identity,omitempty"` + PasswordSecretRef *string `json:"passwordSecretRef,omitempty"` + Server *string `json:"server,omitempty"` + Username *string `json:"username,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_replicaexecutionstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_replicaexecutionstatus.go new file mode 100644 index 0000000000000..5ef5278b6e7d1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_replicaexecutionstatus.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ReplicaExecutionStatus struct { + Containers *[]ContainerExecutionStatus `json:"containers,omitempty"` + Name *string `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_scaleruleauth.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_scaleruleauth.go new file mode 100644 index 0000000000000..92b41db202a03 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_scaleruleauth.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ScaleRuleAuth struct { + SecretRef *string `json:"secretRef,omitempty"` + TriggerParameter *string `json:"triggerParameter,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_secret.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_secret.go new file mode 100644 index 0000000000000..8aee0a491c3fa --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_secret.go @@ -0,0 +1,11 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Secret struct { + Identity *string `json:"identity,omitempty"` + KeyVaultUrl *string `json:"keyVaultUrl,omitempty"` + Name *string `json:"name,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_secretvolumeitem.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_secretvolumeitem.go new file mode 100644 index 0000000000000..bfa219692a9e0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_secretvolumeitem.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecretVolumeItem struct { + Path *string `json:"path,omitempty"` + SecretRef *string `json:"secretRef,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_volume.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_volume.go new file mode 100644 index 0000000000000..4414f8230a119 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_volume.go @@ -0,0 +1,12 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Volume struct { + MountOptions *string `json:"mountOptions,omitempty"` + Name *string `json:"name,omitempty"` + Secrets *[]SecretVolumeItem `json:"secrets,omitempty"` + StorageName *string `json:"storageName,omitempty"` + StorageType *StorageType `json:"storageType,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_volumemount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_volumemount.go new file mode 100644 index 0000000000000..2274bfc6b0863 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_volumemount.go @@ -0,0 +1,10 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VolumeMount struct { + MountPath *string `json:"mountPath,omitempty"` + SubPath *string `json:"subPath,omitempty"` + VolumeName *string `json:"volumeName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/predicates.go new file mode 100644 index 0000000000000..d558cc7f436f7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/predicates.go @@ -0,0 +1,78 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiagnosticsOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p DiagnosticsOperationPredicate) Matches(input Diagnostics) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type JobOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p JobOperationPredicate) Matches(input Job) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type JobExecutionOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p JobExecutionOperationPredicate) Matches(input JobExecution) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/version.go new file mode 100644 index 0000000000000..66a99b1c30a02 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/version.go @@ -0,0 +1,12 @@ +package jobs + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-02-02-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/jobs/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/client.go deleted file mode 100644 index 1115634892ef6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/client.go +++ /dev/null @@ -1,118 +0,0 @@ -package v2021_08_01_preview - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/operation" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -type Client struct { - ConnectedRegistries *connectedregistries.ConnectedRegistriesClient - ExportPipelines *exportpipelines.ExportPipelinesClient - ImportPipelines *importpipelines.ImportPipelinesClient - Operation *operation.OperationClient - PipelineRuns *pipelineruns.PipelineRunsClient - PrivateEndpointConnections *privateendpointconnections.PrivateEndpointConnectionsClient - Registries *registries.RegistriesClient - Replications *replications.ReplicationsClient - ScopeMaps *scopemaps.ScopeMapsClient - Tokens *tokens.TokensClient - WebHooks *webhooks.WebHooksClient -} - -func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { - connectedRegistriesClient, err := connectedregistries.NewConnectedRegistriesClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ConnectedRegistries client: %+v", err) - } - configureFunc(connectedRegistriesClient.Client) - - exportPipelinesClient, err := exportpipelines.NewExportPipelinesClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ExportPipelines client: %+v", err) - } - configureFunc(exportPipelinesClient.Client) - - importPipelinesClient, err := importpipelines.NewImportPipelinesClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ImportPipelines client: %+v", err) - } - configureFunc(importPipelinesClient.Client) - - operationClient, err := operation.NewOperationClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Operation client: %+v", err) - } - configureFunc(operationClient.Client) - - pipelineRunsClient, err := pipelineruns.NewPipelineRunsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building PipelineRuns client: %+v", err) - } - configureFunc(pipelineRunsClient.Client) - - privateEndpointConnectionsClient, err := privateendpointconnections.NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building PrivateEndpointConnections client: %+v", err) - } - configureFunc(privateEndpointConnectionsClient.Client) - - registriesClient, err := registries.NewRegistriesClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Registries client: %+v", err) - } - configureFunc(registriesClient.Client) - - replicationsClient, err := replications.NewReplicationsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Replications client: %+v", err) - } - configureFunc(replicationsClient.Client) - - scopeMapsClient, err := scopemaps.NewScopeMapsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ScopeMaps client: %+v", err) - } - configureFunc(scopeMapsClient.Client) - - tokensClient, err := tokens.NewTokensClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Tokens client: %+v", err) - } - configureFunc(tokensClient.Client) - - webHooksClient, err := webhooks.NewWebHooksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building WebHooks client: %+v", err) - } - configureFunc(webHooksClient.Client) - - return &Client{ - ConnectedRegistries: connectedRegistriesClient, - ExportPipelines: exportPipelinesClient, - ImportPipelines: importPipelinesClient, - Operation: operationClient, - PipelineRuns: pipelineRunsClient, - PrivateEndpointConnections: privateEndpointConnectionsClient, - Registries: registriesClient, - Replications: replicationsClient, - ScopeMaps: scopeMapsClient, - Tokens: tokensClient, - WebHooks: webHooksClient, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/README.md deleted file mode 100644 index 8302ad05eeba2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/README.md +++ /dev/null @@ -1,111 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries` Documentation - -The `connectedregistries` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2021-08-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries" -``` - - -### Client Initialization - -```go -client := connectedregistries.NewConnectedRegistriesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ConnectedRegistriesClient.Create` - -```go -ctx := context.TODO() -id := connectedregistries.NewConnectedRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "connectedRegistryValue") - -payload := connectedregistries.ConnectedRegistry{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ConnectedRegistriesClient.Deactivate` - -```go -ctx := context.TODO() -id := connectedregistries.NewConnectedRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "connectedRegistryValue") - -if err := client.DeactivateThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ConnectedRegistriesClient.Delete` - -```go -ctx := context.TODO() -id := connectedregistries.NewConnectedRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "connectedRegistryValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ConnectedRegistriesClient.Get` - -```go -ctx := context.TODO() -id := connectedregistries.NewConnectedRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "connectedRegistryValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ConnectedRegistriesClient.List` - -```go -ctx := context.TODO() -id := connectedregistries.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") - -// alternatively `client.List(ctx, id, connectedregistries.DefaultListOperationOptions())` can be used to do batched pagination -items, err := client.ListComplete(ctx, id, connectedregistries.DefaultListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ConnectedRegistriesClient.Update` - -```go -ctx := context.TODO() -id := connectedregistries.NewConnectedRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "connectedRegistryValue") - -payload := connectedregistries.ConnectedRegistryUpdateParameters{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/version.go deleted file mode 100644 index cc9f341d808b7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package connectedregistries - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-08-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectedregistries/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/README.md deleted file mode 100644 index 5d20ae95075db..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines` Documentation - -The `exportpipelines` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2021-08-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines" -``` - - -### Client Initialization - -```go -client := exportpipelines.NewExportPipelinesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExportPipelinesClient.Create` - -```go -ctx := context.TODO() -id := exportpipelines.NewExportPipelineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "exportPipelineValue") - -payload := exportpipelines.ExportPipeline{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExportPipelinesClient.Delete` - -```go -ctx := context.TODO() -id := exportpipelines.NewExportPipelineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "exportPipelineValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExportPipelinesClient.Get` - -```go -ctx := context.TODO() -id := exportpipelines.NewExportPipelineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "exportPipelineValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExportPipelinesClient.List` - -```go -ctx := context.TODO() -id := exportpipelines.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/version.go deleted file mode 100644 index 69d1fa978d652..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package exportpipelines - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-08-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/exportpipelines/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/README.md deleted file mode 100644 index 5388528c570a7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines` Documentation - -The `importpipelines` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2021-08-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines" -``` - - -### Client Initialization - -```go -client := importpipelines.NewImportPipelinesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ImportPipelinesClient.Create` - -```go -ctx := context.TODO() -id := importpipelines.NewImportPipelineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "importPipelineValue") - -payload := importpipelines.ImportPipeline{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ImportPipelinesClient.Delete` - -```go -ctx := context.TODO() -id := importpipelines.NewImportPipelineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "importPipelineValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ImportPipelinesClient.Get` - -```go -ctx := context.TODO() -id := importpipelines.NewImportPipelineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "importPipelineValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ImportPipelinesClient.List` - -```go -ctx := context.TODO() -id := importpipelines.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/version.go deleted file mode 100644 index c79963ede2eaf..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package importpipelines - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-08-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/importpipelines/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/operation/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/operation/README.md deleted file mode 100644 index 42ee0689f45c7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/operation/README.md +++ /dev/null @@ -1,42 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/operation` Documentation - -The `operation` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2021-08-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/operation" -``` - - -### Client Initialization - -```go -client := operation.NewOperationClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `OperationClient.RegistriesCheckNameAvailability` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -payload := operation.RegistryNameCheckRequest{ - // ... -} - - -read, err := client.RegistriesCheckNameAvailability(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/operation/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/operation/version.go deleted file mode 100644 index 5b681b7a482ce..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/operation/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package operation - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-08-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operation/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/README.md deleted file mode 100644 index 803a3e8461600..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns` Documentation - -The `pipelineruns` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2021-08-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns" -``` - - -### Client Initialization - -```go -client := pipelineruns.NewPipelineRunsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `PipelineRunsClient.Create` - -```go -ctx := context.TODO() -id := pipelineruns.NewPipelineRunID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "pipelineRunValue") - -payload := pipelineruns.PipelineRun{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `PipelineRunsClient.Delete` - -```go -ctx := context.TODO() -id := pipelineruns.NewPipelineRunID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "pipelineRunValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `PipelineRunsClient.Get` - -```go -ctx := context.TODO() -id := pipelineruns.NewPipelineRunID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "pipelineRunValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PipelineRunsClient.List` - -```go -ctx := context.TODO() -id := pipelineruns.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/version.go deleted file mode 100644 index ab774a9aec214..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package pipelineruns - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-08-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pipelineruns/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/README.md deleted file mode 100644 index 64e9856d3f671..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections` Documentation - -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2021-08-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections" -``` - - -### Client Initialization - -```go -client := privateendpointconnections.NewPrivateEndpointConnectionsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `PrivateEndpointConnectionsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := privateendpointconnections.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "privateEndpointConnectionValue") - -payload := privateendpointconnections.PrivateEndpointConnection{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `PrivateEndpointConnectionsClient.Delete` - -```go -ctx := context.TODO() -id := privateendpointconnections.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "privateEndpointConnectionValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `PrivateEndpointConnectionsClient.Get` - -```go -ctx := context.TODO() -id := privateendpointconnections.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "privateEndpointConnectionValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PrivateEndpointConnectionsClient.List` - -```go -ctx := context.TODO() -id := privateendpointconnections.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/version.go deleted file mode 100644 index 5e5c6a92f9ccb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpointconnections - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-08-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/README.md deleted file mode 100644 index 0096cff1c9434..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/README.md +++ /dev/null @@ -1,221 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries` Documentation - -The `registries` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2021-08-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries" -``` - - -### Client Initialization - -```go -client := registries.NewRegistriesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `RegistriesClient.Create` - -```go -ctx := context.TODO() -id := registries.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") - -payload := registries.Registry{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `RegistriesClient.Delete` - -```go -ctx := context.TODO() -id := registries.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `RegistriesClient.GenerateCredentials` - -```go -ctx := context.TODO() -id := registries.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") - -payload := registries.GenerateCredentialsParameters{ - // ... -} - - -if err := client.GenerateCredentialsThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `RegistriesClient.Get` - -```go -ctx := context.TODO() -id := registries.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `RegistriesClient.ImportImage` - -```go -ctx := context.TODO() -id := registries.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") - -payload := registries.ImportImageParameters{ - // ... -} - - -if err := client.ImportImageThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `RegistriesClient.List` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `RegistriesClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `RegistriesClient.ListCredentials` - -```go -ctx := context.TODO() -id := registries.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") - -read, err := client.ListCredentials(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `RegistriesClient.ListPrivateLinkResources` - -```go -ctx := context.TODO() -id := registries.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") - -// alternatively `client.ListPrivateLinkResources(ctx, id)` can be used to do batched pagination -items, err := client.ListPrivateLinkResourcesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `RegistriesClient.ListUsages` - -```go -ctx := context.TODO() -id := registries.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") - -read, err := client.ListUsages(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `RegistriesClient.RegenerateCredential` - -```go -ctx := context.TODO() -id := registries.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") - -payload := registries.RegenerateCredentialParameters{ - // ... -} - - -read, err := client.RegenerateCredential(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `RegistriesClient.Update` - -```go -ctx := context.TODO() -id := registries.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") - -payload := registries.RegistryUpdateParameters{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/constants.go deleted file mode 100644 index 2f605a8d6bcf4..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/constants.go +++ /dev/null @@ -1,772 +0,0 @@ -package registries - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Action string - -const ( - ActionAllow Action = "Allow" -) - -func PossibleValuesForAction() []string { - return []string{ - string(ActionAllow), - } -} - -func (s *Action) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAction(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAction(input string) (*Action, error) { - vals := map[string]Action{ - "allow": ActionAllow, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Action(input) - return &out, nil -} - -type ActionsRequired string - -const ( - ActionsRequiredNone ActionsRequired = "None" - ActionsRequiredRecreate ActionsRequired = "Recreate" -) - -func PossibleValuesForActionsRequired() []string { - return []string{ - string(ActionsRequiredNone), - string(ActionsRequiredRecreate), - } -} - -func (s *ActionsRequired) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseActionsRequired(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseActionsRequired(input string) (*ActionsRequired, error) { - vals := map[string]ActionsRequired{ - "none": ActionsRequiredNone, - "recreate": ActionsRequiredRecreate, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ActionsRequired(input) - return &out, nil -} - -type ConnectionStatus string - -const ( - ConnectionStatusApproved ConnectionStatus = "Approved" - ConnectionStatusDisconnected ConnectionStatus = "Disconnected" - ConnectionStatusPending ConnectionStatus = "Pending" - ConnectionStatusRejected ConnectionStatus = "Rejected" -) - -func PossibleValuesForConnectionStatus() []string { - return []string{ - string(ConnectionStatusApproved), - string(ConnectionStatusDisconnected), - string(ConnectionStatusPending), - string(ConnectionStatusRejected), - } -} - -func (s *ConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConnectionStatus(input string) (*ConnectionStatus, error) { - vals := map[string]ConnectionStatus{ - "approved": ConnectionStatusApproved, - "disconnected": ConnectionStatusDisconnected, - "pending": ConnectionStatusPending, - "rejected": ConnectionStatusRejected, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConnectionStatus(input) - return &out, nil -} - -type DefaultAction string - -const ( - DefaultActionAllow DefaultAction = "Allow" - DefaultActionDeny DefaultAction = "Deny" -) - -func PossibleValuesForDefaultAction() []string { - return []string{ - string(DefaultActionAllow), - string(DefaultActionDeny), - } -} - -func (s *DefaultAction) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDefaultAction(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDefaultAction(input string) (*DefaultAction, error) { - vals := map[string]DefaultAction{ - "allow": DefaultActionAllow, - "deny": DefaultActionDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DefaultAction(input) - return &out, nil -} - -type EncryptionStatus string - -const ( - EncryptionStatusDisabled EncryptionStatus = "disabled" - EncryptionStatusEnabled EncryptionStatus = "enabled" -) - -func PossibleValuesForEncryptionStatus() []string { - return []string{ - string(EncryptionStatusDisabled), - string(EncryptionStatusEnabled), - } -} - -func (s *EncryptionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEncryptionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEncryptionStatus(input string) (*EncryptionStatus, error) { - vals := map[string]EncryptionStatus{ - "disabled": EncryptionStatusDisabled, - "enabled": EncryptionStatusEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EncryptionStatus(input) - return &out, nil -} - -type ExportPolicyStatus string - -const ( - ExportPolicyStatusDisabled ExportPolicyStatus = "disabled" - ExportPolicyStatusEnabled ExportPolicyStatus = "enabled" -) - -func PossibleValuesForExportPolicyStatus() []string { - return []string{ - string(ExportPolicyStatusDisabled), - string(ExportPolicyStatusEnabled), - } -} - -func (s *ExportPolicyStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExportPolicyStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExportPolicyStatus(input string) (*ExportPolicyStatus, error) { - vals := map[string]ExportPolicyStatus{ - "disabled": ExportPolicyStatusDisabled, - "enabled": ExportPolicyStatusEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExportPolicyStatus(input) - return &out, nil -} - -type ImportMode string - -const ( - ImportModeForce ImportMode = "Force" - ImportModeNoForce ImportMode = "NoForce" -) - -func PossibleValuesForImportMode() []string { - return []string{ - string(ImportModeForce), - string(ImportModeNoForce), - } -} - -func (s *ImportMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseImportMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseImportMode(input string) (*ImportMode, error) { - vals := map[string]ImportMode{ - "force": ImportModeForce, - "noforce": ImportModeNoForce, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ImportMode(input) - return &out, nil -} - -type NetworkRuleBypassOptions string - -const ( - NetworkRuleBypassOptionsAzureServices NetworkRuleBypassOptions = "AzureServices" - NetworkRuleBypassOptionsNone NetworkRuleBypassOptions = "None" -) - -func PossibleValuesForNetworkRuleBypassOptions() []string { - return []string{ - string(NetworkRuleBypassOptionsAzureServices), - string(NetworkRuleBypassOptionsNone), - } -} - -func (s *NetworkRuleBypassOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkRuleBypassOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkRuleBypassOptions(input string) (*NetworkRuleBypassOptions, error) { - vals := map[string]NetworkRuleBypassOptions{ - "azureservices": NetworkRuleBypassOptionsAzureServices, - "none": NetworkRuleBypassOptionsNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkRuleBypassOptions(input) - return &out, nil -} - -type PasswordName string - -const ( - PasswordNamePassword PasswordName = "password" - PasswordNamePasswordTwo PasswordName = "password2" -) - -func PossibleValuesForPasswordName() []string { - return []string{ - string(PasswordNamePassword), - string(PasswordNamePasswordTwo), - } -} - -func (s *PasswordName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePasswordName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePasswordName(input string) (*PasswordName, error) { - vals := map[string]PasswordName{ - "password": PasswordNamePassword, - "password2": PasswordNamePasswordTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PasswordName(input) - return &out, nil -} - -type PolicyStatus string - -const ( - PolicyStatusDisabled PolicyStatus = "disabled" - PolicyStatusEnabled PolicyStatus = "enabled" -) - -func PossibleValuesForPolicyStatus() []string { - return []string{ - string(PolicyStatusDisabled), - string(PolicyStatusEnabled), - } -} - -func (s *PolicyStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePolicyStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePolicyStatus(input string) (*PolicyStatus, error) { - vals := map[string]PolicyStatus{ - "disabled": PolicyStatusDisabled, - "enabled": PolicyStatusEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PolicyStatus(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateCanceled ProvisioningState = "Canceled" - ProvisioningStateCreating ProvisioningState = "Creating" - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateCanceled), - string(ProvisioningStateCreating), - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "canceled": ProvisioningStateCanceled, - "creating": ProvisioningStateCreating, - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicNetworkAccess string - -const ( - PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" - PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" -) - -func PossibleValuesForPublicNetworkAccess() []string { - return []string{ - string(PublicNetworkAccessDisabled), - string(PublicNetworkAccessEnabled), - } -} - -func (s *PublicNetworkAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicNetworkAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicNetworkAccess(input string) (*PublicNetworkAccess, error) { - vals := map[string]PublicNetworkAccess{ - "disabled": PublicNetworkAccessDisabled, - "enabled": PublicNetworkAccessEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicNetworkAccess(input) - return &out, nil -} - -type RegistryUsageUnit string - -const ( - RegistryUsageUnitBytes RegistryUsageUnit = "Bytes" - RegistryUsageUnitCount RegistryUsageUnit = "Count" -) - -func PossibleValuesForRegistryUsageUnit() []string { - return []string{ - string(RegistryUsageUnitBytes), - string(RegistryUsageUnitCount), - } -} - -func (s *RegistryUsageUnit) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRegistryUsageUnit(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRegistryUsageUnit(input string) (*RegistryUsageUnit, error) { - vals := map[string]RegistryUsageUnit{ - "bytes": RegistryUsageUnitBytes, - "count": RegistryUsageUnitCount, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RegistryUsageUnit(input) - return &out, nil -} - -type SkuName string - -const ( - SkuNameBasic SkuName = "Basic" - SkuNameClassic SkuName = "Classic" - SkuNamePremium SkuName = "Premium" - SkuNameStandard SkuName = "Standard" -) - -func PossibleValuesForSkuName() []string { - return []string{ - string(SkuNameBasic), - string(SkuNameClassic), - string(SkuNamePremium), - string(SkuNameStandard), - } -} - -func (s *SkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSkuName(input string) (*SkuName, error) { - vals := map[string]SkuName{ - "basic": SkuNameBasic, - "classic": SkuNameClassic, - "premium": SkuNamePremium, - "standard": SkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SkuName(input) - return &out, nil -} - -type SkuTier string - -const ( - SkuTierBasic SkuTier = "Basic" - SkuTierClassic SkuTier = "Classic" - SkuTierPremium SkuTier = "Premium" - SkuTierStandard SkuTier = "Standard" -) - -func PossibleValuesForSkuTier() []string { - return []string{ - string(SkuTierBasic), - string(SkuTierClassic), - string(SkuTierPremium), - string(SkuTierStandard), - } -} - -func (s *SkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSkuTier(input string) (*SkuTier, error) { - vals := map[string]SkuTier{ - "basic": SkuTierBasic, - "classic": SkuTierClassic, - "premium": SkuTierPremium, - "standard": SkuTierStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SkuTier(input) - return &out, nil -} - -type TokenPasswordName string - -const ( - TokenPasswordNamePasswordOne TokenPasswordName = "password1" - TokenPasswordNamePasswordTwo TokenPasswordName = "password2" -) - -func PossibleValuesForTokenPasswordName() []string { - return []string{ - string(TokenPasswordNamePasswordOne), - string(TokenPasswordNamePasswordTwo), - } -} - -func (s *TokenPasswordName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTokenPasswordName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTokenPasswordName(input string) (*TokenPasswordName, error) { - vals := map[string]TokenPasswordName{ - "password1": TokenPasswordNamePasswordOne, - "password2": TokenPasswordNamePasswordTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TokenPasswordName(input) - return &out, nil -} - -type TrustPolicyType string - -const ( - TrustPolicyTypeNotary TrustPolicyType = "Notary" -) - -func PossibleValuesForTrustPolicyType() []string { - return []string{ - string(TrustPolicyTypeNotary), - } -} - -func (s *TrustPolicyType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTrustPolicyType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTrustPolicyType(input string) (*TrustPolicyType, error) { - vals := map[string]TrustPolicyType{ - "notary": TrustPolicyTypeNotary, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TrustPolicyType(input) - return &out, nil -} - -type ZoneRedundancy string - -const ( - ZoneRedundancyDisabled ZoneRedundancy = "Disabled" - ZoneRedundancyEnabled ZoneRedundancy = "Enabled" -) - -func PossibleValuesForZoneRedundancy() []string { - return []string{ - string(ZoneRedundancyDisabled), - string(ZoneRedundancyEnabled), - } -} - -func (s *ZoneRedundancy) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseZoneRedundancy(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseZoneRedundancy(input string) (*ZoneRedundancy, error) { - vals := map[string]ZoneRedundancy{ - "disabled": ZoneRedundancyDisabled, - "enabled": ZoneRedundancyEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ZoneRedundancy(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_networkruleset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_networkruleset.go deleted file mode 100644 index 666fd7178df85..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_networkruleset.go +++ /dev/null @@ -1,10 +0,0 @@ -package registries - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkRuleSet struct { - DefaultAction DefaultAction `json:"defaultAction"` - IPRules *[]IPRule `json:"ipRules,omitempty"` - VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_policies.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_policies.go deleted file mode 100644 index 87ff2bbd4ba51..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_policies.go +++ /dev/null @@ -1,11 +0,0 @@ -package registries - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Policies struct { - ExportPolicy *ExportPolicy `json:"exportPolicy,omitempty"` - QuarantinePolicy *QuarantinePolicy `json:"quarantinePolicy,omitempty"` - RetentionPolicy *RetentionPolicy `json:"retentionPolicy,omitempty"` - TrustPolicy *TrustPolicy `json:"trustPolicy,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_virtualnetworkrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_virtualnetworkrule.go deleted file mode 100644 index a20d3faf432a7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_virtualnetworkrule.go +++ /dev/null @@ -1,9 +0,0 @@ -package registries - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkRule struct { - Action *Action `json:"action,omitempty"` - Id string `json:"id"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/version.go deleted file mode 100644 index 6ed8387338d24..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package registries - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-08-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/registries/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/README.md deleted file mode 100644 index 86303f981a27b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/README.md +++ /dev/null @@ -1,99 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications` Documentation - -The `replications` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2021-08-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications" -``` - - -### Client Initialization - -```go -client := replications.NewReplicationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ReplicationsClient.Create` - -```go -ctx := context.TODO() -id := replications.NewReplicationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "replicationValue") - -payload := replications.Replication{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationsClient.Delete` - -```go -ctx := context.TODO() -id := replications.NewReplicationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "replicationValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationsClient.Get` - -```go -ctx := context.TODO() -id := replications.NewReplicationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "replicationValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ReplicationsClient.List` - -```go -ctx := context.TODO() -id := replications.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ReplicationsClient.Update` - -```go -ctx := context.TODO() -id := replications.NewReplicationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "replicationValue") - -payload := replications.ReplicationUpdateParameters{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/version.go deleted file mode 100644 index 0e61e8237be95..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package replications - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-08-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replications/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/README.md deleted file mode 100644 index cc4ef8bd91d87..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/README.md +++ /dev/null @@ -1,99 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps` Documentation - -The `scopemaps` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2021-08-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps" -``` - - -### Client Initialization - -```go -client := scopemaps.NewScopeMapsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ScopeMapsClient.Create` - -```go -ctx := context.TODO() -id := scopemaps.NewScopeMapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "scopeMapValue") - -payload := scopemaps.ScopeMap{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ScopeMapsClient.Delete` - -```go -ctx := context.TODO() -id := scopemaps.NewScopeMapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "scopeMapValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ScopeMapsClient.Get` - -```go -ctx := context.TODO() -id := scopemaps.NewScopeMapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "scopeMapValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ScopeMapsClient.List` - -```go -ctx := context.TODO() -id := scopemaps.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ScopeMapsClient.Update` - -```go -ctx := context.TODO() -id := scopemaps.NewScopeMapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "scopeMapValue") - -payload := scopemaps.ScopeMapUpdateParameters{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/version.go deleted file mode 100644 index 448fb16a7060b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package scopemaps - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-08-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scopemaps/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/README.md deleted file mode 100644 index f94bda6b5c7ac..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/README.md +++ /dev/null @@ -1,99 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens` Documentation - -The `tokens` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2021-08-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens" -``` - - -### Client Initialization - -```go -client := tokens.NewTokensClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `TokensClient.Create` - -```go -ctx := context.TODO() -id := tokens.NewTokenID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "tokenValue") - -payload := tokens.Token{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `TokensClient.Delete` - -```go -ctx := context.TODO() -id := tokens.NewTokenID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "tokenValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `TokensClient.Get` - -```go -ctx := context.TODO() -id := tokens.NewTokenID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "tokenValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `TokensClient.List` - -```go -ctx := context.TODO() -id := tokens.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `TokensClient.Update` - -```go -ctx := context.TODO() -id := tokens.NewTokenID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "tokenValue") - -payload := tokens.TokenUpdateParameters{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/version.go deleted file mode 100644 index 11d47f6f1787a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package tokens - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-08-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tokens/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/README.md deleted file mode 100644 index 27d454909411b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/README.md +++ /dev/null @@ -1,148 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks` Documentation - -The `webhooks` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2021-08-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks" -``` - - -### Client Initialization - -```go -client := webhooks.NewWebHooksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `WebHooksClient.Create` - -```go -ctx := context.TODO() -id := webhooks.NewWebHookID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "webHookValue") - -payload := webhooks.WebhookCreateParameters{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebHooksClient.Delete` - -```go -ctx := context.TODO() -id := webhooks.NewWebHookID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "webHookValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebHooksClient.Get` - -```go -ctx := context.TODO() -id := webhooks.NewWebHookID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "webHookValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebHooksClient.GetCallbackConfig` - -```go -ctx := context.TODO() -id := webhooks.NewWebHookID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "webHookValue") - -read, err := client.GetCallbackConfig(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebHooksClient.List` - -```go -ctx := context.TODO() -id := webhooks.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebHooksClient.ListEvents` - -```go -ctx := context.TODO() -id := webhooks.NewWebHookID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "webHookValue") - -// alternatively `client.ListEvents(ctx, id)` can be used to do batched pagination -items, err := client.ListEventsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebHooksClient.Ping` - -```go -ctx := context.TODO() -id := webhooks.NewWebHookID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "webHookValue") - -read, err := client.Ping(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebHooksClient.Update` - -```go -ctx := context.TODO() -id := webhooks.NewWebHookID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "webHookValue") - -payload := webhooks.WebhookUpdateParameters{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/version.go deleted file mode 100644 index 062a8a5a6b438..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package webhooks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-08-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webhooks/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/README.md new file mode 100644 index 0000000000000..21288c1293b0c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/README.md @@ -0,0 +1,103 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives` Documentation + +The `archives` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives" +``` + + +### Client Initialization + +```go +client := archives.NewArchivesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ArchivesClient.Create` + +```go +ctx := context.TODO() +id := archives.NewArchiveID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "packageValue", "archiveValue") + +payload := archives.Archive{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ArchivesClient.Delete` + +```go +ctx := context.TODO() +id := archives.NewArchiveID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "packageValue", "archiveValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ArchivesClient.Get` + +```go +ctx := context.TODO() +id := archives.NewArchiveID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "packageValue", "archiveValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ArchivesClient.List` + +```go +ctx := context.TODO() +id := archives.NewPackageID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "packageValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ArchivesClient.Update` + +```go +ctx := context.TODO() +id := archives.NewArchiveID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "packageValue", "archiveValue") + +payload := archives.ArchiveUpdateParameters{ + // ... +} + + +read, err := client.Update(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/client.go new file mode 100644 index 0000000000000..b7c449dd3d1bd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/client.go @@ -0,0 +1,26 @@ +package archives + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ArchivesClient struct { + Client *resourcemanager.Client +} + +func NewArchivesClientWithBaseURI(sdkApi sdkEnv.Api) (*ArchivesClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "archives", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ArchivesClient: %+v", err) + } + + return &ArchivesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/constants.go new file mode 100644 index 0000000000000..07712b1dbd89b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/constants.go @@ -0,0 +1,101 @@ +package archives + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PackageSourceType string + +const ( + PackageSourceTypeRemote PackageSourceType = "remote" +) + +func PossibleValuesForPackageSourceType() []string { + return []string{ + string(PackageSourceTypeRemote), + } +} + +func (s *PackageSourceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePackageSourceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePackageSourceType(input string) (*PackageSourceType, error) { + vals := map[string]PackageSourceType{ + "remote": PackageSourceTypeRemote, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PackageSourceType(input) + return &out, nil +} + +type ProvisioningState string + +const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateCanceled), + string(ProvisioningStateCreating), + string(ProvisioningStateDeleting), + string(ProvisioningStateFailed), + string(ProvisioningStateSucceeded), + string(ProvisioningStateUpdating), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "canceled": ProvisioningStateCanceled, + "creating": ProvisioningStateCreating, + "deleting": ProvisioningStateDeleting, + "failed": ProvisioningStateFailed, + "succeeded": ProvisioningStateSucceeded, + "updating": ProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/id_archive.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/id_archive.go new file mode 100644 index 0000000000000..6f95c8d0cbc93 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/id_archive.go @@ -0,0 +1,148 @@ +package archives + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&ArchiveId{}) +} + +var _ resourceids.ResourceId = &ArchiveId{} + +// ArchiveId is a struct representing the Resource ID for a Archive +type ArchiveId struct { + SubscriptionId string + ResourceGroupName string + RegistryName string + PackageName string + ArchiveName string +} + +// NewArchiveID returns a new ArchiveId struct +func NewArchiveID(subscriptionId string, resourceGroupName string, registryName string, packageName string, archiveName string) ArchiveId { + return ArchiveId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + RegistryName: registryName, + PackageName: packageName, + ArchiveName: archiveName, + } +} + +// ParseArchiveID parses 'input' into a ArchiveId +func ParseArchiveID(input string) (*ArchiveId, error) { + parser := resourceids.NewParserFromResourceIdType(&ArchiveId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ArchiveId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseArchiveIDInsensitively parses 'input' case-insensitively into a ArchiveId +// note: this method should only be used for API response data and not user input +func ParseArchiveIDInsensitively(input string) (*ArchiveId, error) { + parser := resourceids.NewParserFromResourceIdType(&ArchiveId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ArchiveId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ArchiveId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) + } + + if id.PackageName, ok = input.Parsed["packageName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "packageName", input) + } + + if id.ArchiveName, ok = input.Parsed["archiveName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "archiveName", input) + } + + return nil +} + +// ValidateArchiveID checks that 'input' can be parsed as a Archive ID +func ValidateArchiveID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseArchiveID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Archive ID +func (id ArchiveId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.ContainerRegistry/registries/%s/packages/%s/archives/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RegistryName, id.PackageName, id.ArchiveName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Archive ID +func (id ArchiveId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftContainerRegistry", "Microsoft.ContainerRegistry", "Microsoft.ContainerRegistry"), + resourceids.StaticSegment("staticRegistries", "registries", "registries"), + resourceids.UserSpecifiedSegment("registryName", "registryValue"), + resourceids.StaticSegment("staticPackages", "packages", "packages"), + resourceids.UserSpecifiedSegment("packageName", "packageValue"), + resourceids.StaticSegment("staticArchives", "archives", "archives"), + resourceids.UserSpecifiedSegment("archiveName", "archiveValue"), + } +} + +// String returns a human-readable description of this Archive ID +func (id ArchiveId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Registry Name: %q", id.RegistryName), + fmt.Sprintf("Package Name: %q", id.PackageName), + fmt.Sprintf("Archive Name: %q", id.ArchiveName), + } + return fmt.Sprintf("Archive (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/id_package.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/id_package.go new file mode 100644 index 0000000000000..20b128bda7634 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/id_package.go @@ -0,0 +1,139 @@ +package archives + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&PackageId{}) +} + +var _ resourceids.ResourceId = &PackageId{} + +// PackageId is a struct representing the Resource ID for a Package +type PackageId struct { + SubscriptionId string + ResourceGroupName string + RegistryName string + PackageName string +} + +// NewPackageID returns a new PackageId struct +func NewPackageID(subscriptionId string, resourceGroupName string, registryName string, packageName string) PackageId { + return PackageId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + RegistryName: registryName, + PackageName: packageName, + } +} + +// ParsePackageID parses 'input' into a PackageId +func ParsePackageID(input string) (*PackageId, error) { + parser := resourceids.NewParserFromResourceIdType(&PackageId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := PackageId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParsePackageIDInsensitively parses 'input' case-insensitively into a PackageId +// note: this method should only be used for API response data and not user input +func ParsePackageIDInsensitively(input string) (*PackageId, error) { + parser := resourceids.NewParserFromResourceIdType(&PackageId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := PackageId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PackageId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) + } + + if id.PackageName, ok = input.Parsed["packageName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "packageName", input) + } + + return nil +} + +// ValidatePackageID checks that 'input' can be parsed as a Package ID +func ValidatePackageID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParsePackageID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Package ID +func (id PackageId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.ContainerRegistry/registries/%s/packages/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RegistryName, id.PackageName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Package ID +func (id PackageId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftContainerRegistry", "Microsoft.ContainerRegistry", "Microsoft.ContainerRegistry"), + resourceids.StaticSegment("staticRegistries", "registries", "registries"), + resourceids.UserSpecifiedSegment("registryName", "registryValue"), + resourceids.StaticSegment("staticPackages", "packages", "packages"), + resourceids.UserSpecifiedSegment("packageName", "packageValue"), + } +} + +// String returns a human-readable description of this Package ID +func (id PackageId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Registry Name: %q", id.RegistryName), + fmt.Sprintf("Package Name: %q", id.PackageName), + } + return fmt.Sprintf("Package (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/method_create.go new file mode 100644 index 0000000000000..2b7749748f256 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/method_create.go @@ -0,0 +1,75 @@ +package archives + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Archive +} + +// Create ... +func (c ArchivesClient) Create(ctx context.Context, id ArchiveId, input Archive) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c ArchivesClient) CreateThenPoll(ctx context.Context, id ArchiveId, input Archive) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/method_delete.go new file mode 100644 index 0000000000000..878c300f2f916 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/method_delete.go @@ -0,0 +1,70 @@ +package archives + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c ArchivesClient) Delete(ctx context.Context, id ArchiveId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c ArchivesClient) DeleteThenPoll(ctx context.Context, id ArchiveId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/method_get.go new file mode 100644 index 0000000000000..70ccf688a3f25 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/method_get.go @@ -0,0 +1,54 @@ +package archives + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *Archive +} + +// Get ... +func (c ArchivesClient) Get(ctx context.Context, id ArchiveId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model Archive + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/method_list.go new file mode 100644 index 0000000000000..81b5f43645f51 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/method_list.go @@ -0,0 +1,105 @@ +package archives + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Archive +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []Archive +} + +type ListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// List ... +func (c ArchivesClient) List(ctx context.Context, id PackageId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListCustomPager{}, + Path: fmt.Sprintf("%s/archives", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Archive `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c ArchivesClient) ListComplete(ctx context.Context, id PackageId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, ArchiveOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ArchivesClient) ListCompleteMatchingPredicate(ctx context.Context, id PackageId, predicate ArchiveOperationPredicate) (result ListCompleteResult, err error) { + items := make([]Archive, 0) + + resp, err := c.List(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/method_update.go new file mode 100644 index 0000000000000..7bcb8caaa98cf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/method_update.go @@ -0,0 +1,58 @@ +package archives + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *Archive +} + +// Update ... +func (c ArchivesClient) Update(ctx context.Context, id ArchiveId, input ArchiveUpdateParameters) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model Archive + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/model_archive.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/model_archive.go new file mode 100644 index 0000000000000..f58f170319ec3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/model_archive.go @@ -0,0 +1,16 @@ +package archives + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Archive struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ArchiveProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/model_archivepackagesourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/model_archivepackagesourceproperties.go new file mode 100644 index 0000000000000..575d28f4af5f1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/model_archivepackagesourceproperties.go @@ -0,0 +1,9 @@ +package archives + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ArchivePackageSourceProperties struct { + Type *PackageSourceType `json:"type,omitempty"` + Url *string `json:"url,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/model_archiveproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/model_archiveproperties.go new file mode 100644 index 0000000000000..d6574aa3ba7f8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/model_archiveproperties.go @@ -0,0 +1,12 @@ +package archives + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ArchiveProperties struct { + PackageSource *ArchivePackageSourceProperties `json:"packageSource,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + PublishedVersion *string `json:"publishedVersion,omitempty"` + RepositoryEndpoint *string `json:"repositoryEndpoint,omitempty"` + RepositoryEndpointPrefix *string `json:"repositoryEndpointPrefix,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/model_archiveupdateparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/model_archiveupdateparameters.go new file mode 100644 index 0000000000000..15a0e0ecc20b5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/model_archiveupdateparameters.go @@ -0,0 +1,8 @@ +package archives + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ArchiveUpdateParameters struct { + Properties *ArchiveUpdateProperties `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/model_archiveupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/model_archiveupdateproperties.go new file mode 100644 index 0000000000000..00a08e372cdb0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/model_archiveupdateproperties.go @@ -0,0 +1,8 @@ +package archives + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ArchiveUpdateProperties struct { + PublishedVersion *string `json:"publishedVersion,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/predicates.go new file mode 100644 index 0000000000000..8d09711e9c6bd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/predicates.go @@ -0,0 +1,27 @@ +package archives + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ArchiveOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p ArchiveOperationPredicate) Matches(input Archive) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/version.go new file mode 100644 index 0000000000000..5cbf342658583 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives/version.go @@ -0,0 +1,12 @@ +package archives + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-06-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/archives/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/README.md new file mode 100644 index 0000000000000..f836e5abeec09 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/README.md @@ -0,0 +1,77 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions` Documentation + +The `archiveversions` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions" +``` + + +### Client Initialization + +```go +client := archiveversions.NewArchiveVersionsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ArchiveVersionsClient.Create` + +```go +ctx := context.TODO() +id := archiveversions.NewVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "packageValue", "archiveValue", "versionValue") + +if err := client.CreateThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ArchiveVersionsClient.Delete` + +```go +ctx := context.TODO() +id := archiveversions.NewVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "packageValue", "archiveValue", "versionValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ArchiveVersionsClient.Get` + +```go +ctx := context.TODO() +id := archiveversions.NewVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "packageValue", "archiveValue", "versionValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ArchiveVersionsClient.List` + +```go +ctx := context.TODO() +id := archiveversions.NewArchiveID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "packageValue", "archiveValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/client.go new file mode 100644 index 0000000000000..2ac7d871ed355 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/client.go @@ -0,0 +1,26 @@ +package archiveversions + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ArchiveVersionsClient struct { + Client *resourcemanager.Client +} + +func NewArchiveVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ArchiveVersionsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "archiveversions", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ArchiveVersionsClient: %+v", err) + } + + return &ArchiveVersionsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/constants.go new file mode 100644 index 0000000000000..e1421e4746855 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/constants.go @@ -0,0 +1,63 @@ +package archiveversions + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProvisioningState string + +const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateCanceled), + string(ProvisioningStateCreating), + string(ProvisioningStateDeleting), + string(ProvisioningStateFailed), + string(ProvisioningStateSucceeded), + string(ProvisioningStateUpdating), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "canceled": ProvisioningStateCanceled, + "creating": ProvisioningStateCreating, + "deleting": ProvisioningStateDeleting, + "failed": ProvisioningStateFailed, + "succeeded": ProvisioningStateSucceeded, + "updating": ProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/id_archive.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/id_archive.go new file mode 100644 index 0000000000000..aec038aac95db --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/id_archive.go @@ -0,0 +1,148 @@ +package archiveversions + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&ArchiveId{}) +} + +var _ resourceids.ResourceId = &ArchiveId{} + +// ArchiveId is a struct representing the Resource ID for a Archive +type ArchiveId struct { + SubscriptionId string + ResourceGroupName string + RegistryName string + PackageName string + ArchiveName string +} + +// NewArchiveID returns a new ArchiveId struct +func NewArchiveID(subscriptionId string, resourceGroupName string, registryName string, packageName string, archiveName string) ArchiveId { + return ArchiveId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + RegistryName: registryName, + PackageName: packageName, + ArchiveName: archiveName, + } +} + +// ParseArchiveID parses 'input' into a ArchiveId +func ParseArchiveID(input string) (*ArchiveId, error) { + parser := resourceids.NewParserFromResourceIdType(&ArchiveId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ArchiveId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseArchiveIDInsensitively parses 'input' case-insensitively into a ArchiveId +// note: this method should only be used for API response data and not user input +func ParseArchiveIDInsensitively(input string) (*ArchiveId, error) { + parser := resourceids.NewParserFromResourceIdType(&ArchiveId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ArchiveId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ArchiveId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) + } + + if id.PackageName, ok = input.Parsed["packageName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "packageName", input) + } + + if id.ArchiveName, ok = input.Parsed["archiveName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "archiveName", input) + } + + return nil +} + +// ValidateArchiveID checks that 'input' can be parsed as a Archive ID +func ValidateArchiveID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseArchiveID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Archive ID +func (id ArchiveId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.ContainerRegistry/registries/%s/packages/%s/archives/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RegistryName, id.PackageName, id.ArchiveName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Archive ID +func (id ArchiveId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftContainerRegistry", "Microsoft.ContainerRegistry", "Microsoft.ContainerRegistry"), + resourceids.StaticSegment("staticRegistries", "registries", "registries"), + resourceids.UserSpecifiedSegment("registryName", "registryValue"), + resourceids.StaticSegment("staticPackages", "packages", "packages"), + resourceids.UserSpecifiedSegment("packageName", "packageValue"), + resourceids.StaticSegment("staticArchives", "archives", "archives"), + resourceids.UserSpecifiedSegment("archiveName", "archiveValue"), + } +} + +// String returns a human-readable description of this Archive ID +func (id ArchiveId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Registry Name: %q", id.RegistryName), + fmt.Sprintf("Package Name: %q", id.PackageName), + fmt.Sprintf("Archive Name: %q", id.ArchiveName), + } + return fmt.Sprintf("Archive (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/id_version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/id_version.go new file mode 100644 index 0000000000000..25c4b7da7ed72 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/id_version.go @@ -0,0 +1,157 @@ +package archiveversions + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&VersionId{}) +} + +var _ resourceids.ResourceId = &VersionId{} + +// VersionId is a struct representing the Resource ID for a Version +type VersionId struct { + SubscriptionId string + ResourceGroupName string + RegistryName string + PackageName string + ArchiveName string + VersionName string +} + +// NewVersionID returns a new VersionId struct +func NewVersionID(subscriptionId string, resourceGroupName string, registryName string, packageName string, archiveName string, versionName string) VersionId { + return VersionId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + RegistryName: registryName, + PackageName: packageName, + ArchiveName: archiveName, + VersionName: versionName, + } +} + +// ParseVersionID parses 'input' into a VersionId +func ParseVersionID(input string) (*VersionId, error) { + parser := resourceids.NewParserFromResourceIdType(&VersionId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := VersionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseVersionIDInsensitively parses 'input' case-insensitively into a VersionId +// note: this method should only be used for API response data and not user input +func ParseVersionIDInsensitively(input string) (*VersionId, error) { + parser := resourceids.NewParserFromResourceIdType(&VersionId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := VersionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *VersionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) + } + + if id.PackageName, ok = input.Parsed["packageName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "packageName", input) + } + + if id.ArchiveName, ok = input.Parsed["archiveName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "archiveName", input) + } + + if id.VersionName, ok = input.Parsed["versionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "versionName", input) + } + + return nil +} + +// ValidateVersionID checks that 'input' can be parsed as a Version ID +func ValidateVersionID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseVersionID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Version ID +func (id VersionId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.ContainerRegistry/registries/%s/packages/%s/archives/%s/versions/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RegistryName, id.PackageName, id.ArchiveName, id.VersionName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Version ID +func (id VersionId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftContainerRegistry", "Microsoft.ContainerRegistry", "Microsoft.ContainerRegistry"), + resourceids.StaticSegment("staticRegistries", "registries", "registries"), + resourceids.UserSpecifiedSegment("registryName", "registryValue"), + resourceids.StaticSegment("staticPackages", "packages", "packages"), + resourceids.UserSpecifiedSegment("packageName", "packageValue"), + resourceids.StaticSegment("staticArchives", "archives", "archives"), + resourceids.UserSpecifiedSegment("archiveName", "archiveValue"), + resourceids.StaticSegment("staticVersions", "versions", "versions"), + resourceids.UserSpecifiedSegment("versionName", "versionValue"), + } +} + +// String returns a human-readable description of this Version ID +func (id VersionId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Registry Name: %q", id.RegistryName), + fmt.Sprintf("Package Name: %q", id.PackageName), + fmt.Sprintf("Archive Name: %q", id.ArchiveName), + fmt.Sprintf("Version Name: %q", id.VersionName), + } + return fmt.Sprintf("Version (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/method_create.go new file mode 100644 index 0000000000000..3859b7cf60e5b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/method_create.go @@ -0,0 +1,71 @@ +package archiveversions + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ArchiveVersion +} + +// Create ... +func (c ArchiveVersionsClient) Create(ctx context.Context, id VersionId) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c ArchiveVersionsClient) CreateThenPoll(ctx context.Context, id VersionId) error { + result, err := c.Create(ctx, id) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/method_delete.go new file mode 100644 index 0000000000000..1cde8cae11f5a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/method_delete.go @@ -0,0 +1,70 @@ +package archiveversions + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c ArchiveVersionsClient) Delete(ctx context.Context, id VersionId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c ArchiveVersionsClient) DeleteThenPoll(ctx context.Context, id VersionId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/method_get.go new file mode 100644 index 0000000000000..0e5cef42a8a6e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/method_get.go @@ -0,0 +1,54 @@ +package archiveversions + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ArchiveVersion +} + +// Get ... +func (c ArchiveVersionsClient) Get(ctx context.Context, id VersionId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ArchiveVersion + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/method_list.go new file mode 100644 index 0000000000000..69dbd3cc14448 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/method_list.go @@ -0,0 +1,105 @@ +package archiveversions + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ArchiveVersion +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []ArchiveVersion +} + +type ListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// List ... +func (c ArchiveVersionsClient) List(ctx context.Context, id ArchiveId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListCustomPager{}, + Path: fmt.Sprintf("%s/versions", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ArchiveVersion `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c ArchiveVersionsClient) ListComplete(ctx context.Context, id ArchiveId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, ArchiveVersionOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ArchiveVersionsClient) ListCompleteMatchingPredicate(ctx context.Context, id ArchiveId, predicate ArchiveVersionOperationPredicate) (result ListCompleteResult, err error) { + items := make([]ArchiveVersion, 0) + + resp, err := c.List(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/model_archiveversion.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/model_archiveversion.go new file mode 100644 index 0000000000000..547b31667cb57 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/model_archiveversion.go @@ -0,0 +1,16 @@ +package archiveversions + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ArchiveVersion struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ArchiveVersionProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/model_archiveversionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/model_archiveversionproperties.go new file mode 100644 index 0000000000000..db7abbc881a97 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/model_archiveversionproperties.go @@ -0,0 +1,9 @@ +package archiveversions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ArchiveVersionProperties struct { + ArchiveVersionErrorMessage *string `json:"archiveVersionErrorMessage,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/predicates.go new file mode 100644 index 0000000000000..49105828aef07 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/predicates.go @@ -0,0 +1,27 @@ +package archiveversions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ArchiveVersionOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p ArchiveVersionOperationPredicate) Matches(input ArchiveVersion) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/version.go new file mode 100644 index 0000000000000..ca8afaf533808 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions/version.go @@ -0,0 +1,12 @@ +package archiveversions + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-06-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/archiveversions/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/README.md new file mode 100644 index 0000000000000..84d0f73b142cf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/README.md @@ -0,0 +1,99 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules` Documentation + +The `cacherules` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules" +``` + + +### Client Initialization + +```go +client := cacherules.NewCacheRulesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `CacheRulesClient.Create` + +```go +ctx := context.TODO() +id := cacherules.NewCacheRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "cacheRuleValue") + +payload := cacherules.CacheRule{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `CacheRulesClient.Delete` + +```go +ctx := context.TODO() +id := cacherules.NewCacheRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "cacheRuleValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `CacheRulesClient.Get` + +```go +ctx := context.TODO() +id := cacherules.NewCacheRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "cacheRuleValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `CacheRulesClient.List` + +```go +ctx := context.TODO() +id := cacherules.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `CacheRulesClient.Update` + +```go +ctx := context.TODO() +id := cacherules.NewCacheRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "cacheRuleValue") + +payload := cacherules.CacheRuleUpdateParameters{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/client.go new file mode 100644 index 0000000000000..8a3c87e0787bf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/client.go @@ -0,0 +1,26 @@ +package cacherules + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CacheRulesClient struct { + Client *resourcemanager.Client +} + +func NewCacheRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*CacheRulesClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cacherules", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating CacheRulesClient: %+v", err) + } + + return &CacheRulesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/constants.go new file mode 100644 index 0000000000000..bfd55c0bb7362 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/constants.go @@ -0,0 +1,63 @@ +package cacherules + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProvisioningState string + +const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateCanceled), + string(ProvisioningStateCreating), + string(ProvisioningStateDeleting), + string(ProvisioningStateFailed), + string(ProvisioningStateSucceeded), + string(ProvisioningStateUpdating), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "canceled": ProvisioningStateCanceled, + "creating": ProvisioningStateCreating, + "deleting": ProvisioningStateDeleting, + "failed": ProvisioningStateFailed, + "succeeded": ProvisioningStateSucceeded, + "updating": ProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/id_cacherule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/id_cacherule.go new file mode 100644 index 0000000000000..47244dd517b19 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/id_cacherule.go @@ -0,0 +1,139 @@ +package cacherules + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&CacheRuleId{}) +} + +var _ resourceids.ResourceId = &CacheRuleId{} + +// CacheRuleId is a struct representing the Resource ID for a Cache Rule +type CacheRuleId struct { + SubscriptionId string + ResourceGroupName string + RegistryName string + CacheRuleName string +} + +// NewCacheRuleID returns a new CacheRuleId struct +func NewCacheRuleID(subscriptionId string, resourceGroupName string, registryName string, cacheRuleName string) CacheRuleId { + return CacheRuleId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + RegistryName: registryName, + CacheRuleName: cacheRuleName, + } +} + +// ParseCacheRuleID parses 'input' into a CacheRuleId +func ParseCacheRuleID(input string) (*CacheRuleId, error) { + parser := resourceids.NewParserFromResourceIdType(&CacheRuleId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := CacheRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseCacheRuleIDInsensitively parses 'input' case-insensitively into a CacheRuleId +// note: this method should only be used for API response data and not user input +func ParseCacheRuleIDInsensitively(input string) (*CacheRuleId, error) { + parser := resourceids.NewParserFromResourceIdType(&CacheRuleId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := CacheRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CacheRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) + } + + if id.CacheRuleName, ok = input.Parsed["cacheRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "cacheRuleName", input) + } + + return nil +} + +// ValidateCacheRuleID checks that 'input' can be parsed as a Cache Rule ID +func ValidateCacheRuleID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseCacheRuleID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Cache Rule ID +func (id CacheRuleId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.ContainerRegistry/registries/%s/cacheRules/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RegistryName, id.CacheRuleName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Cache Rule ID +func (id CacheRuleId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftContainerRegistry", "Microsoft.ContainerRegistry", "Microsoft.ContainerRegistry"), + resourceids.StaticSegment("staticRegistries", "registries", "registries"), + resourceids.UserSpecifiedSegment("registryName", "registryValue"), + resourceids.StaticSegment("staticCacheRules", "cacheRules", "cacheRules"), + resourceids.UserSpecifiedSegment("cacheRuleName", "cacheRuleValue"), + } +} + +// String returns a human-readable description of this Cache Rule ID +func (id CacheRuleId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Registry Name: %q", id.RegistryName), + fmt.Sprintf("Cache Rule Name: %q", id.CacheRuleName), + } + return fmt.Sprintf("Cache Rule (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/id_registry.go new file mode 100644 index 0000000000000..e60010c55ea60 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/id_registry.go @@ -0,0 +1,130 @@ +package cacherules + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&RegistryId{}) +} + +var _ resourceids.ResourceId = &RegistryId{} + +// RegistryId is a struct representing the Resource ID for a Registry +type RegistryId struct { + SubscriptionId string + ResourceGroupName string + RegistryName string +} + +// NewRegistryID returns a new RegistryId struct +func NewRegistryID(subscriptionId string, resourceGroupName string, registryName string) RegistryId { + return RegistryId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + RegistryName: registryName, + } +} + +// ParseRegistryID parses 'input' into a RegistryId +func ParseRegistryID(input string) (*RegistryId, error) { + parser := resourceids.NewParserFromResourceIdType(&RegistryId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RegistryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseRegistryIDInsensitively parses 'input' case-insensitively into a RegistryId +// note: this method should only be used for API response data and not user input +func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { + parser := resourceids.NewParserFromResourceIdType(&RegistryId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RegistryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RegistryId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) + } + + return nil +} + +// ValidateRegistryID checks that 'input' can be parsed as a Registry ID +func ValidateRegistryID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseRegistryID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Registry ID +func (id RegistryId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.ContainerRegistry/registries/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RegistryName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Registry ID +func (id RegistryId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftContainerRegistry", "Microsoft.ContainerRegistry", "Microsoft.ContainerRegistry"), + resourceids.StaticSegment("staticRegistries", "registries", "registries"), + resourceids.UserSpecifiedSegment("registryName", "registryValue"), + } +} + +// String returns a human-readable description of this Registry ID +func (id RegistryId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Registry Name: %q", id.RegistryName), + } + return fmt.Sprintf("Registry (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/method_create.go new file mode 100644 index 0000000000000..e5af51fd17921 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/method_create.go @@ -0,0 +1,75 @@ +package cacherules + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *CacheRule +} + +// Create ... +func (c CacheRulesClient) Create(ctx context.Context, id CacheRuleId, input CacheRule) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c CacheRulesClient) CreateThenPoll(ctx context.Context, id CacheRuleId, input CacheRule) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/method_delete.go new file mode 100644 index 0000000000000..ec9a263670035 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/method_delete.go @@ -0,0 +1,71 @@ +package cacherules + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c CacheRulesClient) Delete(ctx context.Context, id CacheRuleId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c CacheRulesClient) DeleteThenPoll(ctx context.Context, id CacheRuleId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/method_get.go new file mode 100644 index 0000000000000..8514302dbc33b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/method_get.go @@ -0,0 +1,54 @@ +package cacherules + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *CacheRule +} + +// Get ... +func (c CacheRulesClient) Get(ctx context.Context, id CacheRuleId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model CacheRule + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/method_list.go new file mode 100644 index 0000000000000..9b1c49d2f2087 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/method_list.go @@ -0,0 +1,105 @@ +package cacherules + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]CacheRule +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []CacheRule +} + +type ListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// List ... +func (c CacheRulesClient) List(ctx context.Context, id RegistryId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListCustomPager{}, + Path: fmt.Sprintf("%s/cacheRules", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]CacheRule `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c CacheRulesClient) ListComplete(ctx context.Context, id RegistryId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, CacheRuleOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c CacheRulesClient) ListCompleteMatchingPredicate(ctx context.Context, id RegistryId, predicate CacheRuleOperationPredicate) (result ListCompleteResult, err error) { + items := make([]CacheRule, 0) + + resp, err := c.List(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/method_update.go new file mode 100644 index 0000000000000..52c930db6d41d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/method_update.go @@ -0,0 +1,75 @@ +package cacherules + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *CacheRule +} + +// Update ... +func (c CacheRulesClient) Update(ctx context.Context, id CacheRuleId, input CacheRuleUpdateParameters) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c CacheRulesClient) UpdateThenPoll(ctx context.Context, id CacheRuleId, input CacheRuleUpdateParameters) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/model_cacherule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/model_cacherule.go new file mode 100644 index 0000000000000..b7301bd697093 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/model_cacherule.go @@ -0,0 +1,16 @@ +package cacherules + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CacheRule struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *CacheRuleProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/model_cacheruleproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/model_cacheruleproperties.go new file mode 100644 index 0000000000000..1da551d094c80 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/model_cacheruleproperties.go @@ -0,0 +1,30 @@ +package cacherules + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CacheRuleProperties struct { + CreationDate *string `json:"creationDate,omitempty"` + CredentialSetResourceId *string `json:"credentialSetResourceId,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + SourceRepository *string `json:"sourceRepository,omitempty"` + TargetRepository *string `json:"targetRepository,omitempty"` +} + +func (o *CacheRuleProperties) GetCreationDateAsTime() (*time.Time, error) { + if o.CreationDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreationDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *CacheRuleProperties) SetCreationDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreationDate = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/model_cacheruleupdateparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/model_cacheruleupdateparameters.go new file mode 100644 index 0000000000000..6186726ad3432 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/model_cacheruleupdateparameters.go @@ -0,0 +1,8 @@ +package cacherules + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CacheRuleUpdateParameters struct { + Properties *CacheRuleUpdateProperties `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/model_cacheruleupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/model_cacheruleupdateproperties.go new file mode 100644 index 0000000000000..4625c71916456 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/model_cacheruleupdateproperties.go @@ -0,0 +1,8 @@ +package cacherules + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CacheRuleUpdateProperties struct { + CredentialSetResourceId *string `json:"credentialSetResourceId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/predicates.go new file mode 100644 index 0000000000000..f629c22e24489 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/predicates.go @@ -0,0 +1,27 @@ +package cacherules + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CacheRuleOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p CacheRuleOperationPredicate) Matches(input CacheRule) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/version.go new file mode 100644 index 0000000000000..f6a78e9ea3ffd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules/version.go @@ -0,0 +1,12 @@ +package cacherules + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-06-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/cacherules/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/client.go new file mode 100644 index 0000000000000..98582811bb93f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/client.go @@ -0,0 +1,154 @@ +package v2023_06_01_preview + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/operation" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +type Client struct { + ArchiveVersions *archiveversions.ArchiveVersionsClient + Archives *archives.ArchivesClient + CacheRules *cacherules.CacheRulesClient + ConnectedRegistries *connectedregistries.ConnectedRegistriesClient + CredentialSets *credentialsets.CredentialSetsClient + ExportPipelines *exportpipelines.ExportPipelinesClient + ImportPipelines *importpipelines.ImportPipelinesClient + Operation *operation.OperationClient + PipelineRuns *pipelineruns.PipelineRunsClient + PrivateEndpointConnections *privateendpointconnections.PrivateEndpointConnectionsClient + Registries *registries.RegistriesClient + Replications *replications.ReplicationsClient + ScopeMaps *scopemaps.ScopeMapsClient + Tokens *tokens.TokensClient + WebHooks *webhooks.WebHooksClient +} + +func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { + archiveVersionsClient, err := archiveversions.NewArchiveVersionsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building ArchiveVersions client: %+v", err) + } + configureFunc(archiveVersionsClient.Client) + + archivesClient, err := archives.NewArchivesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Archives client: %+v", err) + } + configureFunc(archivesClient.Client) + + cacheRulesClient, err := cacherules.NewCacheRulesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building CacheRules client: %+v", err) + } + configureFunc(cacheRulesClient.Client) + + connectedRegistriesClient, err := connectedregistries.NewConnectedRegistriesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building ConnectedRegistries client: %+v", err) + } + configureFunc(connectedRegistriesClient.Client) + + credentialSetsClient, err := credentialsets.NewCredentialSetsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building CredentialSets client: %+v", err) + } + configureFunc(credentialSetsClient.Client) + + exportPipelinesClient, err := exportpipelines.NewExportPipelinesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building ExportPipelines client: %+v", err) + } + configureFunc(exportPipelinesClient.Client) + + importPipelinesClient, err := importpipelines.NewImportPipelinesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building ImportPipelines client: %+v", err) + } + configureFunc(importPipelinesClient.Client) + + operationClient, err := operation.NewOperationClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Operation client: %+v", err) + } + configureFunc(operationClient.Client) + + pipelineRunsClient, err := pipelineruns.NewPipelineRunsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building PipelineRuns client: %+v", err) + } + configureFunc(pipelineRunsClient.Client) + + privateEndpointConnectionsClient, err := privateendpointconnections.NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building PrivateEndpointConnections client: %+v", err) + } + configureFunc(privateEndpointConnectionsClient.Client) + + registriesClient, err := registries.NewRegistriesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Registries client: %+v", err) + } + configureFunc(registriesClient.Client) + + replicationsClient, err := replications.NewReplicationsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Replications client: %+v", err) + } + configureFunc(replicationsClient.Client) + + scopeMapsClient, err := scopemaps.NewScopeMapsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building ScopeMaps client: %+v", err) + } + configureFunc(scopeMapsClient.Client) + + tokensClient, err := tokens.NewTokensClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Tokens client: %+v", err) + } + configureFunc(tokensClient.Client) + + webHooksClient, err := webhooks.NewWebHooksClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building WebHooks client: %+v", err) + } + configureFunc(webHooksClient.Client) + + return &Client{ + ArchiveVersions: archiveVersionsClient, + Archives: archivesClient, + CacheRules: cacheRulesClient, + ConnectedRegistries: connectedRegistriesClient, + CredentialSets: credentialSetsClient, + ExportPipelines: exportPipelinesClient, + ImportPipelines: importPipelinesClient, + Operation: operationClient, + PipelineRuns: pipelineRunsClient, + PrivateEndpointConnections: privateEndpointConnectionsClient, + Registries: registriesClient, + Replications: replicationsClient, + ScopeMaps: scopeMapsClient, + Tokens: tokensClient, + WebHooks: webHooksClient, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/README.md new file mode 100644 index 0000000000000..6e446264d729b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/README.md @@ -0,0 +1,111 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries` Documentation + +The `connectedregistries` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries" +``` + + +### Client Initialization + +```go +client := connectedregistries.NewConnectedRegistriesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ConnectedRegistriesClient.Create` + +```go +ctx := context.TODO() +id := connectedregistries.NewConnectedRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "connectedRegistryValue") + +payload := connectedregistries.ConnectedRegistry{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ConnectedRegistriesClient.Deactivate` + +```go +ctx := context.TODO() +id := connectedregistries.NewConnectedRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "connectedRegistryValue") + +if err := client.DeactivateThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ConnectedRegistriesClient.Delete` + +```go +ctx := context.TODO() +id := connectedregistries.NewConnectedRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "connectedRegistryValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ConnectedRegistriesClient.Get` + +```go +ctx := context.TODO() +id := connectedregistries.NewConnectedRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "connectedRegistryValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ConnectedRegistriesClient.List` + +```go +ctx := context.TODO() +id := connectedregistries.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") + +// alternatively `client.List(ctx, id, connectedregistries.DefaultListOperationOptions())` can be used to do batched pagination +items, err := client.ListComplete(ctx, id, connectedregistries.DefaultListOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ConnectedRegistriesClient.Update` + +```go +ctx := context.TODO() +id := connectedregistries.NewConnectedRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "connectedRegistryValue") + +payload := connectedregistries.ConnectedRegistryUpdateParameters{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/id_connectedregistry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/id_connectedregistry.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/id_connectedregistry.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/id_connectedregistry.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/id_registry.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/id_registry.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/id_registry.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/method_deactivate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/method_deactivate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/method_deactivate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/method_deactivate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_activationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_activationproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_activationproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_activationproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_connectedregistry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_connectedregistry.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_connectedregistry.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_connectedregistry.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_connectedregistryproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_connectedregistryproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_connectedregistryproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_connectedregistryproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_connectedregistryupdateparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_connectedregistryupdateparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_connectedregistryupdateparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_connectedregistryupdateparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_connectedregistryupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_connectedregistryupdateproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_connectedregistryupdateproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_connectedregistryupdateproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_loggingproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_loggingproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_loggingproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_loggingproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_loginserverproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_loginserverproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_loginserverproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_loginserverproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_parentproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_parentproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_parentproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_parentproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_statusdetailproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_statusdetailproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_statusdetailproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_statusdetailproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_syncproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_syncproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_syncproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_syncproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_syncupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_syncupdateproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_syncupdateproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_syncupdateproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_tlscertificateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_tlscertificateproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_tlscertificateproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_tlscertificateproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_tlsproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_tlsproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/model_tlsproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/model_tlsproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/version.go new file mode 100644 index 0000000000000..f5fc55a547c50 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/version.go @@ -0,0 +1,12 @@ +package connectedregistries + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-06-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/connectedregistries/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/README.md new file mode 100644 index 0000000000000..a1c57db152646 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/README.md @@ -0,0 +1,99 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets` Documentation + +The `credentialsets` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets" +``` + + +### Client Initialization + +```go +client := credentialsets.NewCredentialSetsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `CredentialSetsClient.Create` + +```go +ctx := context.TODO() +id := credentialsets.NewCredentialSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "credentialSetValue") + +payload := credentialsets.CredentialSet{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `CredentialSetsClient.Delete` + +```go +ctx := context.TODO() +id := credentialsets.NewCredentialSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "credentialSetValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `CredentialSetsClient.Get` + +```go +ctx := context.TODO() +id := credentialsets.NewCredentialSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "credentialSetValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `CredentialSetsClient.List` + +```go +ctx := context.TODO() +id := credentialsets.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `CredentialSetsClient.Update` + +```go +ctx := context.TODO() +id := credentialsets.NewCredentialSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "credentialSetValue") + +payload := credentialsets.CredentialSetUpdateParameters{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/client.go new file mode 100644 index 0000000000000..cb20ca224462f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/client.go @@ -0,0 +1,26 @@ +package credentialsets + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CredentialSetsClient struct { + Client *resourcemanager.Client +} + +func NewCredentialSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*CredentialSetsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "credentialsets", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating CredentialSetsClient: %+v", err) + } + + return &CredentialSetsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/constants.go new file mode 100644 index 0000000000000..ff71d8ceaa073 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/constants.go @@ -0,0 +1,142 @@ +package credentialsets + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CredentialHealthStatus string + +const ( + CredentialHealthStatusHealthy CredentialHealthStatus = "Healthy" + CredentialHealthStatusUnhealthy CredentialHealthStatus = "Unhealthy" +) + +func PossibleValuesForCredentialHealthStatus() []string { + return []string{ + string(CredentialHealthStatusHealthy), + string(CredentialHealthStatusUnhealthy), + } +} + +func (s *CredentialHealthStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCredentialHealthStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCredentialHealthStatus(input string) (*CredentialHealthStatus, error) { + vals := map[string]CredentialHealthStatus{ + "healthy": CredentialHealthStatusHealthy, + "unhealthy": CredentialHealthStatusUnhealthy, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CredentialHealthStatus(input) + return &out, nil +} + +type CredentialName string + +const ( + CredentialNameCredentialOne CredentialName = "Credential1" +) + +func PossibleValuesForCredentialName() []string { + return []string{ + string(CredentialNameCredentialOne), + } +} + +func (s *CredentialName) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCredentialName(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCredentialName(input string) (*CredentialName, error) { + vals := map[string]CredentialName{ + "credential1": CredentialNameCredentialOne, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CredentialName(input) + return &out, nil +} + +type ProvisioningState string + +const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateCanceled), + string(ProvisioningStateCreating), + string(ProvisioningStateDeleting), + string(ProvisioningStateFailed), + string(ProvisioningStateSucceeded), + string(ProvisioningStateUpdating), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "canceled": ProvisioningStateCanceled, + "creating": ProvisioningStateCreating, + "deleting": ProvisioningStateDeleting, + "failed": ProvisioningStateFailed, + "succeeded": ProvisioningStateSucceeded, + "updating": ProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/id_credentialset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/id_credentialset.go new file mode 100644 index 0000000000000..2538c5cf3110b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/id_credentialset.go @@ -0,0 +1,139 @@ +package credentialsets + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&CredentialSetId{}) +} + +var _ resourceids.ResourceId = &CredentialSetId{} + +// CredentialSetId is a struct representing the Resource ID for a Credential Set +type CredentialSetId struct { + SubscriptionId string + ResourceGroupName string + RegistryName string + CredentialSetName string +} + +// NewCredentialSetID returns a new CredentialSetId struct +func NewCredentialSetID(subscriptionId string, resourceGroupName string, registryName string, credentialSetName string) CredentialSetId { + return CredentialSetId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + RegistryName: registryName, + CredentialSetName: credentialSetName, + } +} + +// ParseCredentialSetID parses 'input' into a CredentialSetId +func ParseCredentialSetID(input string) (*CredentialSetId, error) { + parser := resourceids.NewParserFromResourceIdType(&CredentialSetId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := CredentialSetId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseCredentialSetIDInsensitively parses 'input' case-insensitively into a CredentialSetId +// note: this method should only be used for API response data and not user input +func ParseCredentialSetIDInsensitively(input string) (*CredentialSetId, error) { + parser := resourceids.NewParserFromResourceIdType(&CredentialSetId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := CredentialSetId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CredentialSetId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) + } + + if id.CredentialSetName, ok = input.Parsed["credentialSetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "credentialSetName", input) + } + + return nil +} + +// ValidateCredentialSetID checks that 'input' can be parsed as a Credential Set ID +func ValidateCredentialSetID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseCredentialSetID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Credential Set ID +func (id CredentialSetId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.ContainerRegistry/registries/%s/credentialSets/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RegistryName, id.CredentialSetName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Credential Set ID +func (id CredentialSetId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftContainerRegistry", "Microsoft.ContainerRegistry", "Microsoft.ContainerRegistry"), + resourceids.StaticSegment("staticRegistries", "registries", "registries"), + resourceids.UserSpecifiedSegment("registryName", "registryValue"), + resourceids.StaticSegment("staticCredentialSets", "credentialSets", "credentialSets"), + resourceids.UserSpecifiedSegment("credentialSetName", "credentialSetValue"), + } +} + +// String returns a human-readable description of this Credential Set ID +func (id CredentialSetId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Registry Name: %q", id.RegistryName), + fmt.Sprintf("Credential Set Name: %q", id.CredentialSetName), + } + return fmt.Sprintf("Credential Set (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/id_registry.go new file mode 100644 index 0000000000000..e688b3adba099 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/id_registry.go @@ -0,0 +1,130 @@ +package credentialsets + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&RegistryId{}) +} + +var _ resourceids.ResourceId = &RegistryId{} + +// RegistryId is a struct representing the Resource ID for a Registry +type RegistryId struct { + SubscriptionId string + ResourceGroupName string + RegistryName string +} + +// NewRegistryID returns a new RegistryId struct +func NewRegistryID(subscriptionId string, resourceGroupName string, registryName string) RegistryId { + return RegistryId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + RegistryName: registryName, + } +} + +// ParseRegistryID parses 'input' into a RegistryId +func ParseRegistryID(input string) (*RegistryId, error) { + parser := resourceids.NewParserFromResourceIdType(&RegistryId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RegistryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseRegistryIDInsensitively parses 'input' case-insensitively into a RegistryId +// note: this method should only be used for API response data and not user input +func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { + parser := resourceids.NewParserFromResourceIdType(&RegistryId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RegistryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RegistryId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) + } + + return nil +} + +// ValidateRegistryID checks that 'input' can be parsed as a Registry ID +func ValidateRegistryID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseRegistryID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Registry ID +func (id RegistryId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.ContainerRegistry/registries/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RegistryName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Registry ID +func (id RegistryId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftContainerRegistry", "Microsoft.ContainerRegistry", "Microsoft.ContainerRegistry"), + resourceids.StaticSegment("staticRegistries", "registries", "registries"), + resourceids.UserSpecifiedSegment("registryName", "registryValue"), + } +} + +// String returns a human-readable description of this Registry ID +func (id RegistryId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Registry Name: %q", id.RegistryName), + } + return fmt.Sprintf("Registry (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/method_create.go new file mode 100644 index 0000000000000..63256806132e4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/method_create.go @@ -0,0 +1,75 @@ +package credentialsets + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *CredentialSet +} + +// Create ... +func (c CredentialSetsClient) Create(ctx context.Context, id CredentialSetId, input CredentialSet) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c CredentialSetsClient) CreateThenPoll(ctx context.Context, id CredentialSetId, input CredentialSet) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/method_delete.go new file mode 100644 index 0000000000000..f504242c2966e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/method_delete.go @@ -0,0 +1,71 @@ +package credentialsets + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c CredentialSetsClient) Delete(ctx context.Context, id CredentialSetId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c CredentialSetsClient) DeleteThenPoll(ctx context.Context, id CredentialSetId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/method_get.go new file mode 100644 index 0000000000000..83eef1b0ac5ef --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/method_get.go @@ -0,0 +1,54 @@ +package credentialsets + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *CredentialSet +} + +// Get ... +func (c CredentialSetsClient) Get(ctx context.Context, id CredentialSetId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model CredentialSet + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/method_list.go new file mode 100644 index 0000000000000..56fadc1e6180d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/method_list.go @@ -0,0 +1,105 @@ +package credentialsets + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]CredentialSet +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []CredentialSet +} + +type ListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// List ... +func (c CredentialSetsClient) List(ctx context.Context, id RegistryId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListCustomPager{}, + Path: fmt.Sprintf("%s/credentialSets", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]CredentialSet `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c CredentialSetsClient) ListComplete(ctx context.Context, id RegistryId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, CredentialSetOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c CredentialSetsClient) ListCompleteMatchingPredicate(ctx context.Context, id RegistryId, predicate CredentialSetOperationPredicate) (result ListCompleteResult, err error) { + items := make([]CredentialSet, 0) + + resp, err := c.List(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/method_update.go new file mode 100644 index 0000000000000..5451fc9ae4a86 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/method_update.go @@ -0,0 +1,75 @@ +package credentialsets + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *CredentialSet +} + +// Update ... +func (c CredentialSetsClient) Update(ctx context.Context, id CredentialSetId, input CredentialSetUpdateParameters) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c CredentialSetsClient) UpdateThenPoll(ctx context.Context, id CredentialSetId, input CredentialSetUpdateParameters) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/model_authcredential.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/model_authcredential.go new file mode 100644 index 0000000000000..913c42662acb2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/model_authcredential.go @@ -0,0 +1,11 @@ +package credentialsets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AuthCredential struct { + CredentialHealth *CredentialHealth `json:"credentialHealth,omitempty"` + Name *CredentialName `json:"name,omitempty"` + PasswordSecretIdentifier *string `json:"passwordSecretIdentifier,omitempty"` + UsernameSecretIdentifier *string `json:"usernameSecretIdentifier,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/model_credentialhealth.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/model_credentialhealth.go new file mode 100644 index 0000000000000..ca30e48d6f25e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/model_credentialhealth.go @@ -0,0 +1,10 @@ +package credentialsets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CredentialHealth struct { + ErrorCode *string `json:"errorCode,omitempty"` + ErrorMessage *string `json:"errorMessage,omitempty"` + Status *CredentialHealthStatus `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/model_credentialset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/model_credentialset.go new file mode 100644 index 0000000000000..26779ccad5c00 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/model_credentialset.go @@ -0,0 +1,18 @@ +package credentialsets + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CredentialSet struct { + Id *string `json:"id,omitempty"` + Identity *identity.SystemAndUserAssignedMap `json:"identity,omitempty"` + Name *string `json:"name,omitempty"` + Properties *CredentialSetProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/model_credentialsetproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/model_credentialsetproperties.go new file mode 100644 index 0000000000000..12298beeb1432 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/model_credentialsetproperties.go @@ -0,0 +1,29 @@ +package credentialsets + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CredentialSetProperties struct { + AuthCredentials *[]AuthCredential `json:"authCredentials,omitempty"` + CreationDate *string `json:"creationDate,omitempty"` + LoginServer *string `json:"loginServer,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` +} + +func (o *CredentialSetProperties) GetCreationDateAsTime() (*time.Time, error) { + if o.CreationDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreationDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *CredentialSetProperties) SetCreationDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreationDate = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/model_credentialsetupdateparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/model_credentialsetupdateparameters.go new file mode 100644 index 0000000000000..b43c63ad176e5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/model_credentialsetupdateparameters.go @@ -0,0 +1,13 @@ +package credentialsets + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CredentialSetUpdateParameters struct { + Identity *identity.SystemAndUserAssignedMap `json:"identity,omitempty"` + Properties *CredentialSetUpdateProperties `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/model_credentialsetupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/model_credentialsetupdateproperties.go new file mode 100644 index 0000000000000..718731e5d24cb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/model_credentialsetupdateproperties.go @@ -0,0 +1,8 @@ +package credentialsets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CredentialSetUpdateProperties struct { + AuthCredentials *[]AuthCredential `json:"authCredentials,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/predicates.go new file mode 100644 index 0000000000000..c8e61730e35a3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/predicates.go @@ -0,0 +1,27 @@ +package credentialsets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CredentialSetOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p CredentialSetOperationPredicate) Matches(input CredentialSet) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/version.go new file mode 100644 index 0000000000000..5306294584930 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets/version.go @@ -0,0 +1,12 @@ +package credentialsets + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-06-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/credentialsets/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/README.md new file mode 100644 index 0000000000000..d1508ce1bdd75 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/README.md @@ -0,0 +1,82 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines` Documentation + +The `exportpipelines` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines" +``` + + +### Client Initialization + +```go +client := exportpipelines.NewExportPipelinesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ExportPipelinesClient.Create` + +```go +ctx := context.TODO() +id := exportpipelines.NewExportPipelineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "exportPipelineValue") + +payload := exportpipelines.ExportPipeline{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ExportPipelinesClient.Delete` + +```go +ctx := context.TODO() +id := exportpipelines.NewExportPipelineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "exportPipelineValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ExportPipelinesClient.Get` + +```go +ctx := context.TODO() +id := exportpipelines.NewExportPipelineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "exportPipelineValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ExportPipelinesClient.List` + +```go +ctx := context.TODO() +id := exportpipelines.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/id_exportpipeline.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/id_exportpipeline.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/id_exportpipeline.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/id_exportpipeline.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/id_registry.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/id_registry.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/id_registry.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/model_exportpipeline.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/model_exportpipeline.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/model_exportpipeline.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/model_exportpipeline.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/model_exportpipelineproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/model_exportpipelineproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/model_exportpipelineproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/model_exportpipelineproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/model_exportpipelinetargetproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/model_exportpipelinetargetproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/model_exportpipelinetargetproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/model_exportpipelinetargetproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/version.go new file mode 100644 index 0000000000000..cac8701d42f78 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/version.go @@ -0,0 +1,12 @@ +package exportpipelines + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-06-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/exportpipelines/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/README.md new file mode 100644 index 0000000000000..f506d2375277a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/README.md @@ -0,0 +1,82 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines` Documentation + +The `importpipelines` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines" +``` + + +### Client Initialization + +```go +client := importpipelines.NewImportPipelinesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ImportPipelinesClient.Create` + +```go +ctx := context.TODO() +id := importpipelines.NewImportPipelineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "importPipelineValue") + +payload := importpipelines.ImportPipeline{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ImportPipelinesClient.Delete` + +```go +ctx := context.TODO() +id := importpipelines.NewImportPipelineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "importPipelineValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ImportPipelinesClient.Get` + +```go +ctx := context.TODO() +id := importpipelines.NewImportPipelineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "importPipelineValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ImportPipelinesClient.List` + +```go +ctx := context.TODO() +id := importpipelines.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/id_importpipeline.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/id_importpipeline.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/id_importpipeline.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/id_importpipeline.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/id_registry.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/id_registry.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/id_registry.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/model_importpipeline.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/model_importpipeline.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/model_importpipeline.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/model_importpipeline.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/model_importpipelineproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/model_importpipelineproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/model_importpipelineproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/model_importpipelineproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/model_importpipelinesourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/model_importpipelinesourceproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/model_importpipelinesourceproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/model_importpipelinesourceproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/model_pipelinesourcetriggerproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/model_pipelinesourcetriggerproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/model_pipelinesourcetriggerproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/model_pipelinesourcetriggerproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/model_pipelinetriggerproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/model_pipelinetriggerproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/model_pipelinetriggerproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/model_pipelinetriggerproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/version.go new file mode 100644 index 0000000000000..3113dada4e436 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines/version.go @@ -0,0 +1,12 @@ +package importpipelines + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-06-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/importpipelines/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/operation/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/operation/README.md new file mode 100644 index 0000000000000..92b636a428a84 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/operation/README.md @@ -0,0 +1,42 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/operation` Documentation + +The `operation` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/operation" +``` + + +### Client Initialization + +```go +client := operation.NewOperationClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `OperationClient.RegistriesCheckNameAvailability` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +payload := operation.RegistryNameCheckRequest{ + // ... +} + + +read, err := client.RegistriesCheckNameAvailability(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/operation/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/operation/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/operation/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/operation/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/operation/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/operation/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/operation/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/operation/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/operation/method_registrieschecknameavailability.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/operation/method_registrieschecknameavailability.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/operation/method_registrieschecknameavailability.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/operation/method_registrieschecknameavailability.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/operation/model_registrynamecheckrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/operation/model_registrynamecheckrequest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/operation/model_registrynamecheckrequest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/operation/model_registrynamecheckrequest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/operation/model_registrynamestatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/operation/model_registrynamestatus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/operation/model_registrynamestatus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/operation/model_registrynamestatus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/operation/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/operation/version.go new file mode 100644 index 0000000000000..1acd5e6016dd3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/operation/version.go @@ -0,0 +1,12 @@ +package operation + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-06-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/operation/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/README.md new file mode 100644 index 0000000000000..3125c4cefce5d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/README.md @@ -0,0 +1,82 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns` Documentation + +The `pipelineruns` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns" +``` + + +### Client Initialization + +```go +client := pipelineruns.NewPipelineRunsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `PipelineRunsClient.Create` + +```go +ctx := context.TODO() +id := pipelineruns.NewPipelineRunID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "pipelineRunValue") + +payload := pipelineruns.PipelineRun{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `PipelineRunsClient.Delete` + +```go +ctx := context.TODO() +id := pipelineruns.NewPipelineRunID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "pipelineRunValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `PipelineRunsClient.Get` + +```go +ctx := context.TODO() +id := pipelineruns.NewPipelineRunID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "pipelineRunValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `PipelineRunsClient.List` + +```go +ctx := context.TODO() +id := pipelineruns.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/id_pipelinerun.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/id_pipelinerun.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/id_pipelinerun.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/id_pipelinerun.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/id_registry.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/id_registry.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/id_registry.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/model_exportpipelinetargetproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/model_exportpipelinetargetproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/model_exportpipelinetargetproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/model_exportpipelinetargetproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/model_importpipelinesourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/model_importpipelinesourceproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/model_importpipelinesourceproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/model_importpipelinesourceproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/model_pipelinerun.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/model_pipelinerun.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/model_pipelinerun.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/model_pipelinerun.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/model_pipelinerunproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/model_pipelinerunproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/model_pipelinerunproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/model_pipelinerunproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/model_pipelinerunrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/model_pipelinerunrequest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/model_pipelinerunrequest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/model_pipelinerunrequest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/model_pipelinerunresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/model_pipelinerunresponse.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/model_pipelinerunresponse.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/model_pipelinerunresponse.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/model_pipelinerunsourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/model_pipelinerunsourceproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/model_pipelinerunsourceproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/model_pipelinerunsourceproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/model_pipelineruntargetproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/model_pipelineruntargetproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/model_pipelineruntargetproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/model_pipelineruntargetproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/model_pipelinesourcetriggerdescriptor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/model_pipelinesourcetriggerdescriptor.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/model_pipelinesourcetriggerdescriptor.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/model_pipelinesourcetriggerdescriptor.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/model_pipelinetriggerdescriptor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/model_pipelinetriggerdescriptor.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/model_pipelinetriggerdescriptor.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/model_pipelinetriggerdescriptor.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/model_progressproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/model_progressproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/model_progressproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/model_progressproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/version.go new file mode 100644 index 0000000000000..c54632b8e630a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/version.go @@ -0,0 +1,12 @@ +package pipelineruns + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-06-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/pipelineruns/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/README.md new file mode 100644 index 0000000000000..b213fe8fea55b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/README.md @@ -0,0 +1,82 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections` Documentation + +The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections" +``` + + +### Client Initialization + +```go +client := privateendpointconnections.NewPrivateEndpointConnectionsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `PrivateEndpointConnectionsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := privateendpointconnections.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "privateEndpointConnectionValue") + +payload := privateendpointconnections.PrivateEndpointConnection{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `PrivateEndpointConnectionsClient.Delete` + +```go +ctx := context.TODO() +id := privateendpointconnections.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "privateEndpointConnectionValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `PrivateEndpointConnectionsClient.Get` + +```go +ctx := context.TODO() +id := privateendpointconnections.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "privateEndpointConnectionValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `PrivateEndpointConnectionsClient.List` + +```go +ctx := context.TODO() +id := privateendpointconnections.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/id_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/id_privateendpointconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/id_privateendpointconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/id_privateendpointconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/id_registry.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/id_registry.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/id_registry.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/model_privateendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/model_privateendpoint.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/model_privateendpoint.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/model_privateendpoint.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/model_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/model_privateendpointconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/model_privateendpointconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/model_privateendpointconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/model_privateendpointconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/model_privateendpointconnectionproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/model_privateendpointconnectionproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/model_privateendpointconnectionproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/model_privatelinkserviceconnectionstate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/model_privatelinkserviceconnectionstate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/model_privatelinkserviceconnectionstate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/model_privatelinkserviceconnectionstate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/version.go new file mode 100644 index 0000000000000..e5b68d8d6ceb1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/version.go @@ -0,0 +1,12 @@ +package privateendpointconnections + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-06-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/README.md new file mode 100644 index 0000000000000..d9e0e20a5bf56 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/README.md @@ -0,0 +1,237 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries` Documentation + +The `registries` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries" +``` + + +### Client Initialization + +```go +client := registries.NewRegistriesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `RegistriesClient.Create` + +```go +ctx := context.TODO() +id := registries.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") + +payload := registries.Registry{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `RegistriesClient.Delete` + +```go +ctx := context.TODO() +id := registries.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `RegistriesClient.GenerateCredentials` + +```go +ctx := context.TODO() +id := registries.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") + +payload := registries.GenerateCredentialsParameters{ + // ... +} + + +if err := client.GenerateCredentialsThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `RegistriesClient.Get` + +```go +ctx := context.TODO() +id := registries.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `RegistriesClient.GetPrivateLinkResource` + +```go +ctx := context.TODO() +id := registries.NewPrivateLinkResourceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "privateLinkResourceValue") + +read, err := client.GetPrivateLinkResource(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `RegistriesClient.ImportImage` + +```go +ctx := context.TODO() +id := registries.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") + +payload := registries.ImportImageParameters{ + // ... +} + + +if err := client.ImportImageThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `RegistriesClient.List` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `RegistriesClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `RegistriesClient.ListCredentials` + +```go +ctx := context.TODO() +id := registries.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") + +read, err := client.ListCredentials(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `RegistriesClient.ListPrivateLinkResources` + +```go +ctx := context.TODO() +id := registries.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") + +// alternatively `client.ListPrivateLinkResources(ctx, id)` can be used to do batched pagination +items, err := client.ListPrivateLinkResourcesComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `RegistriesClient.ListUsages` + +```go +ctx := context.TODO() +id := registries.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") + +read, err := client.ListUsages(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `RegistriesClient.RegenerateCredential` + +```go +ctx := context.TODO() +id := registries.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") + +payload := registries.RegenerateCredentialParameters{ + // ... +} + + +read, err := client.RegenerateCredential(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `RegistriesClient.Update` + +```go +ctx := context.TODO() +id := registries.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") + +payload := registries.RegistryUpdateParameters{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/constants.go new file mode 100644 index 0000000000000..49a9badfb0f5c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/constants.go @@ -0,0 +1,813 @@ +package registries + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Action string + +const ( + ActionAllow Action = "Allow" +) + +func PossibleValuesForAction() []string { + return []string{ + string(ActionAllow), + } +} + +func (s *Action) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAction(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAction(input string) (*Action, error) { + vals := map[string]Action{ + "allow": ActionAllow, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Action(input) + return &out, nil +} + +type ActionsRequired string + +const ( + ActionsRequiredNone ActionsRequired = "None" + ActionsRequiredRecreate ActionsRequired = "Recreate" +) + +func PossibleValuesForActionsRequired() []string { + return []string{ + string(ActionsRequiredNone), + string(ActionsRequiredRecreate), + } +} + +func (s *ActionsRequired) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseActionsRequired(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseActionsRequired(input string) (*ActionsRequired, error) { + vals := map[string]ActionsRequired{ + "none": ActionsRequiredNone, + "recreate": ActionsRequiredRecreate, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ActionsRequired(input) + return &out, nil +} + +type AzureADAuthenticationAsArmPolicyStatus string + +const ( + AzureADAuthenticationAsArmPolicyStatusDisabled AzureADAuthenticationAsArmPolicyStatus = "disabled" + AzureADAuthenticationAsArmPolicyStatusEnabled AzureADAuthenticationAsArmPolicyStatus = "enabled" +) + +func PossibleValuesForAzureADAuthenticationAsArmPolicyStatus() []string { + return []string{ + string(AzureADAuthenticationAsArmPolicyStatusDisabled), + string(AzureADAuthenticationAsArmPolicyStatusEnabled), + } +} + +func (s *AzureADAuthenticationAsArmPolicyStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAzureADAuthenticationAsArmPolicyStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAzureADAuthenticationAsArmPolicyStatus(input string) (*AzureADAuthenticationAsArmPolicyStatus, error) { + vals := map[string]AzureADAuthenticationAsArmPolicyStatus{ + "disabled": AzureADAuthenticationAsArmPolicyStatusDisabled, + "enabled": AzureADAuthenticationAsArmPolicyStatusEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AzureADAuthenticationAsArmPolicyStatus(input) + return &out, nil +} + +type ConnectionStatus string + +const ( + ConnectionStatusApproved ConnectionStatus = "Approved" + ConnectionStatusDisconnected ConnectionStatus = "Disconnected" + ConnectionStatusPending ConnectionStatus = "Pending" + ConnectionStatusRejected ConnectionStatus = "Rejected" +) + +func PossibleValuesForConnectionStatus() []string { + return []string{ + string(ConnectionStatusApproved), + string(ConnectionStatusDisconnected), + string(ConnectionStatusPending), + string(ConnectionStatusRejected), + } +} + +func (s *ConnectionStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseConnectionStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseConnectionStatus(input string) (*ConnectionStatus, error) { + vals := map[string]ConnectionStatus{ + "approved": ConnectionStatusApproved, + "disconnected": ConnectionStatusDisconnected, + "pending": ConnectionStatusPending, + "rejected": ConnectionStatusRejected, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ConnectionStatus(input) + return &out, nil +} + +type DefaultAction string + +const ( + DefaultActionAllow DefaultAction = "Allow" + DefaultActionDeny DefaultAction = "Deny" +) + +func PossibleValuesForDefaultAction() []string { + return []string{ + string(DefaultActionAllow), + string(DefaultActionDeny), + } +} + +func (s *DefaultAction) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDefaultAction(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDefaultAction(input string) (*DefaultAction, error) { + vals := map[string]DefaultAction{ + "allow": DefaultActionAllow, + "deny": DefaultActionDeny, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DefaultAction(input) + return &out, nil +} + +type EncryptionStatus string + +const ( + EncryptionStatusDisabled EncryptionStatus = "disabled" + EncryptionStatusEnabled EncryptionStatus = "enabled" +) + +func PossibleValuesForEncryptionStatus() []string { + return []string{ + string(EncryptionStatusDisabled), + string(EncryptionStatusEnabled), + } +} + +func (s *EncryptionStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseEncryptionStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseEncryptionStatus(input string) (*EncryptionStatus, error) { + vals := map[string]EncryptionStatus{ + "disabled": EncryptionStatusDisabled, + "enabled": EncryptionStatusEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EncryptionStatus(input) + return &out, nil +} + +type ExportPolicyStatus string + +const ( + ExportPolicyStatusDisabled ExportPolicyStatus = "disabled" + ExportPolicyStatusEnabled ExportPolicyStatus = "enabled" +) + +func PossibleValuesForExportPolicyStatus() []string { + return []string{ + string(ExportPolicyStatusDisabled), + string(ExportPolicyStatusEnabled), + } +} + +func (s *ExportPolicyStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseExportPolicyStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseExportPolicyStatus(input string) (*ExportPolicyStatus, error) { + vals := map[string]ExportPolicyStatus{ + "disabled": ExportPolicyStatusDisabled, + "enabled": ExportPolicyStatusEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ExportPolicyStatus(input) + return &out, nil +} + +type ImportMode string + +const ( + ImportModeForce ImportMode = "Force" + ImportModeNoForce ImportMode = "NoForce" +) + +func PossibleValuesForImportMode() []string { + return []string{ + string(ImportModeForce), + string(ImportModeNoForce), + } +} + +func (s *ImportMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseImportMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseImportMode(input string) (*ImportMode, error) { + vals := map[string]ImportMode{ + "force": ImportModeForce, + "noforce": ImportModeNoForce, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ImportMode(input) + return &out, nil +} + +type NetworkRuleBypassOptions string + +const ( + NetworkRuleBypassOptionsAzureServices NetworkRuleBypassOptions = "AzureServices" + NetworkRuleBypassOptionsNone NetworkRuleBypassOptions = "None" +) + +func PossibleValuesForNetworkRuleBypassOptions() []string { + return []string{ + string(NetworkRuleBypassOptionsAzureServices), + string(NetworkRuleBypassOptionsNone), + } +} + +func (s *NetworkRuleBypassOptions) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseNetworkRuleBypassOptions(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseNetworkRuleBypassOptions(input string) (*NetworkRuleBypassOptions, error) { + vals := map[string]NetworkRuleBypassOptions{ + "azureservices": NetworkRuleBypassOptionsAzureServices, + "none": NetworkRuleBypassOptionsNone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := NetworkRuleBypassOptions(input) + return &out, nil +} + +type PasswordName string + +const ( + PasswordNamePassword PasswordName = "password" + PasswordNamePasswordTwo PasswordName = "password2" +) + +func PossibleValuesForPasswordName() []string { + return []string{ + string(PasswordNamePassword), + string(PasswordNamePasswordTwo), + } +} + +func (s *PasswordName) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePasswordName(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePasswordName(input string) (*PasswordName, error) { + vals := map[string]PasswordName{ + "password": PasswordNamePassword, + "password2": PasswordNamePasswordTwo, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PasswordName(input) + return &out, nil +} + +type PolicyStatus string + +const ( + PolicyStatusDisabled PolicyStatus = "disabled" + PolicyStatusEnabled PolicyStatus = "enabled" +) + +func PossibleValuesForPolicyStatus() []string { + return []string{ + string(PolicyStatusDisabled), + string(PolicyStatusEnabled), + } +} + +func (s *PolicyStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePolicyStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePolicyStatus(input string) (*PolicyStatus, error) { + vals := map[string]PolicyStatus{ + "disabled": PolicyStatusDisabled, + "enabled": PolicyStatusEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PolicyStatus(input) + return &out, nil +} + +type ProvisioningState string + +const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateCanceled), + string(ProvisioningStateCreating), + string(ProvisioningStateDeleting), + string(ProvisioningStateFailed), + string(ProvisioningStateSucceeded), + string(ProvisioningStateUpdating), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "canceled": ProvisioningStateCanceled, + "creating": ProvisioningStateCreating, + "deleting": ProvisioningStateDeleting, + "failed": ProvisioningStateFailed, + "succeeded": ProvisioningStateSucceeded, + "updating": ProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} + +type PublicNetworkAccess string + +const ( + PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" + PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" +) + +func PossibleValuesForPublicNetworkAccess() []string { + return []string{ + string(PublicNetworkAccessDisabled), + string(PublicNetworkAccessEnabled), + } +} + +func (s *PublicNetworkAccess) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePublicNetworkAccess(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePublicNetworkAccess(input string) (*PublicNetworkAccess, error) { + vals := map[string]PublicNetworkAccess{ + "disabled": PublicNetworkAccessDisabled, + "enabled": PublicNetworkAccessEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PublicNetworkAccess(input) + return &out, nil +} + +type RegistryUsageUnit string + +const ( + RegistryUsageUnitBytes RegistryUsageUnit = "Bytes" + RegistryUsageUnitCount RegistryUsageUnit = "Count" +) + +func PossibleValuesForRegistryUsageUnit() []string { + return []string{ + string(RegistryUsageUnitBytes), + string(RegistryUsageUnitCount), + } +} + +func (s *RegistryUsageUnit) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRegistryUsageUnit(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRegistryUsageUnit(input string) (*RegistryUsageUnit, error) { + vals := map[string]RegistryUsageUnit{ + "bytes": RegistryUsageUnitBytes, + "count": RegistryUsageUnitCount, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RegistryUsageUnit(input) + return &out, nil +} + +type SkuName string + +const ( + SkuNameBasic SkuName = "Basic" + SkuNameClassic SkuName = "Classic" + SkuNamePremium SkuName = "Premium" + SkuNameStandard SkuName = "Standard" +) + +func PossibleValuesForSkuName() []string { + return []string{ + string(SkuNameBasic), + string(SkuNameClassic), + string(SkuNamePremium), + string(SkuNameStandard), + } +} + +func (s *SkuName) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSkuName(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSkuName(input string) (*SkuName, error) { + vals := map[string]SkuName{ + "basic": SkuNameBasic, + "classic": SkuNameClassic, + "premium": SkuNamePremium, + "standard": SkuNameStandard, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SkuName(input) + return &out, nil +} + +type SkuTier string + +const ( + SkuTierBasic SkuTier = "Basic" + SkuTierClassic SkuTier = "Classic" + SkuTierPremium SkuTier = "Premium" + SkuTierStandard SkuTier = "Standard" +) + +func PossibleValuesForSkuTier() []string { + return []string{ + string(SkuTierBasic), + string(SkuTierClassic), + string(SkuTierPremium), + string(SkuTierStandard), + } +} + +func (s *SkuTier) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSkuTier(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSkuTier(input string) (*SkuTier, error) { + vals := map[string]SkuTier{ + "basic": SkuTierBasic, + "classic": SkuTierClassic, + "premium": SkuTierPremium, + "standard": SkuTierStandard, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SkuTier(input) + return &out, nil +} + +type TokenPasswordName string + +const ( + TokenPasswordNamePasswordOne TokenPasswordName = "password1" + TokenPasswordNamePasswordTwo TokenPasswordName = "password2" +) + +func PossibleValuesForTokenPasswordName() []string { + return []string{ + string(TokenPasswordNamePasswordOne), + string(TokenPasswordNamePasswordTwo), + } +} + +func (s *TokenPasswordName) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseTokenPasswordName(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseTokenPasswordName(input string) (*TokenPasswordName, error) { + vals := map[string]TokenPasswordName{ + "password1": TokenPasswordNamePasswordOne, + "password2": TokenPasswordNamePasswordTwo, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := TokenPasswordName(input) + return &out, nil +} + +type TrustPolicyType string + +const ( + TrustPolicyTypeNotary TrustPolicyType = "Notary" +) + +func PossibleValuesForTrustPolicyType() []string { + return []string{ + string(TrustPolicyTypeNotary), + } +} + +func (s *TrustPolicyType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseTrustPolicyType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseTrustPolicyType(input string) (*TrustPolicyType, error) { + vals := map[string]TrustPolicyType{ + "notary": TrustPolicyTypeNotary, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := TrustPolicyType(input) + return &out, nil +} + +type ZoneRedundancy string + +const ( + ZoneRedundancyDisabled ZoneRedundancy = "Disabled" + ZoneRedundancyEnabled ZoneRedundancy = "Enabled" +) + +func PossibleValuesForZoneRedundancy() []string { + return []string{ + string(ZoneRedundancyDisabled), + string(ZoneRedundancyEnabled), + } +} + +func (s *ZoneRedundancy) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseZoneRedundancy(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseZoneRedundancy(input string) (*ZoneRedundancy, error) { + vals := map[string]ZoneRedundancy{ + "disabled": ZoneRedundancyDisabled, + "enabled": ZoneRedundancyEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ZoneRedundancy(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/id_privatelinkresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/id_privatelinkresource.go new file mode 100644 index 0000000000000..ebf2b8bcac5f2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/id_privatelinkresource.go @@ -0,0 +1,139 @@ +package registries + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&PrivateLinkResourceId{}) +} + +var _ resourceids.ResourceId = &PrivateLinkResourceId{} + +// PrivateLinkResourceId is a struct representing the Resource ID for a Private Link Resource +type PrivateLinkResourceId struct { + SubscriptionId string + ResourceGroupName string + RegistryName string + PrivateLinkResourceName string +} + +// NewPrivateLinkResourceID returns a new PrivateLinkResourceId struct +func NewPrivateLinkResourceID(subscriptionId string, resourceGroupName string, registryName string, privateLinkResourceName string) PrivateLinkResourceId { + return PrivateLinkResourceId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + RegistryName: registryName, + PrivateLinkResourceName: privateLinkResourceName, + } +} + +// ParsePrivateLinkResourceID parses 'input' into a PrivateLinkResourceId +func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { + parser := resourceids.NewParserFromResourceIdType(&PrivateLinkResourceId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := PrivateLinkResourceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParsePrivateLinkResourceIDInsensitively parses 'input' case-insensitively into a PrivateLinkResourceId +// note: this method should only be used for API response data and not user input +func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResourceId, error) { + parser := resourceids.NewParserFromResourceIdType(&PrivateLinkResourceId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := PrivateLinkResourceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrivateLinkResourceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) + } + + if id.PrivateLinkResourceName, ok = input.Parsed["privateLinkResourceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateLinkResourceName", input) + } + + return nil +} + +// ValidatePrivateLinkResourceID checks that 'input' can be parsed as a Private Link Resource ID +func ValidatePrivateLinkResourceID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParsePrivateLinkResourceID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Private Link Resource ID +func (id PrivateLinkResourceId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.ContainerRegistry/registries/%s/privateLinkResources/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RegistryName, id.PrivateLinkResourceName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Private Link Resource ID +func (id PrivateLinkResourceId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftContainerRegistry", "Microsoft.ContainerRegistry", "Microsoft.ContainerRegistry"), + resourceids.StaticSegment("staticRegistries", "registries", "registries"), + resourceids.UserSpecifiedSegment("registryName", "registryValue"), + resourceids.StaticSegment("staticPrivateLinkResources", "privateLinkResources", "privateLinkResources"), + resourceids.UserSpecifiedSegment("privateLinkResourceName", "privateLinkResourceValue"), + } +} + +// String returns a human-readable description of this Private Link Resource ID +func (id PrivateLinkResourceId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Registry Name: %q", id.RegistryName), + fmt.Sprintf("Private Link Resource Name: %q", id.PrivateLinkResourceName), + } + return fmt.Sprintf("Private Link Resource (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/id_registry.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/id_registry.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/id_registry.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/method_generatecredentials.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_generatecredentials.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/method_generatecredentials.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_generatecredentials.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_getprivatelinkresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_getprivatelinkresource.go new file mode 100644 index 0000000000000..1f017340494ca --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_getprivatelinkresource.go @@ -0,0 +1,54 @@ +package registries + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetPrivateLinkResourceOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *PrivateLinkResource +} + +// GetPrivateLinkResource ... +func (c RegistriesClient) GetPrivateLinkResource(ctx context.Context, id PrivateLinkResourceId) (result GetPrivateLinkResourceOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model PrivateLinkResource + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/method_importimage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_importimage.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/method_importimage.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_importimage.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_listbyresourcegroup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/method_listbyresourcegroup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_listbyresourcegroup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/method_listcredentials.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_listcredentials.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/method_listcredentials.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_listcredentials.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/method_listprivatelinkresources.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_listprivatelinkresources.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/method_listprivatelinkresources.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_listprivatelinkresources.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/method_listusages.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_listusages.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/method_listusages.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_listusages.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/method_regeneratecredential.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_regeneratecredential.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/method_regeneratecredential.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_regeneratecredential.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_azureadauthenticationasarmpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_azureadauthenticationasarmpolicy.go new file mode 100644 index 0000000000000..35c552f03415c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_azureadauthenticationasarmpolicy.go @@ -0,0 +1,8 @@ +package registries + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureADAuthenticationAsArmPolicy struct { + Status *AzureADAuthenticationAsArmPolicyStatus `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_encryptionproperty.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_encryptionproperty.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_encryptionproperty.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_encryptionproperty.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_exportpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_exportpolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_exportpolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_exportpolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_generatecredentialsparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_generatecredentialsparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_generatecredentialsparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_generatecredentialsparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_generatecredentialsresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_generatecredentialsresult.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_generatecredentialsresult.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_generatecredentialsresult.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_importimageparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_importimageparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_importimageparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_importimageparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_importsource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_importsource.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_importsource.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_importsource.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_importsourcecredentials.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_importsourcecredentials.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_importsourcecredentials.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_importsourcecredentials.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_iprule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_iprule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_iprule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_iprule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_keyvaultproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_keyvaultproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_keyvaultproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_keyvaultproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_networkruleset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_networkruleset.go new file mode 100644 index 0000000000000..dec8b58f5ced5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_networkruleset.go @@ -0,0 +1,9 @@ +package registries + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkRuleSet struct { + DefaultAction DefaultAction `json:"defaultAction"` + IPRules *[]IPRule `json:"ipRules,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_policies.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_policies.go new file mode 100644 index 0000000000000..64655913cf785 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_policies.go @@ -0,0 +1,13 @@ +package registries + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Policies struct { + AzureADAuthenticationAsArmPolicy *AzureADAuthenticationAsArmPolicy `json:"azureADAuthenticationAsArmPolicy,omitempty"` + ExportPolicy *ExportPolicy `json:"exportPolicy,omitempty"` + QuarantinePolicy *QuarantinePolicy `json:"quarantinePolicy,omitempty"` + RetentionPolicy *RetentionPolicy `json:"retentionPolicy,omitempty"` + SoftDeletePolicy *SoftDeletePolicy `json:"softDeletePolicy,omitempty"` + TrustPolicy *TrustPolicy `json:"trustPolicy,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_privateendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_privateendpoint.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_privateendpoint.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_privateendpoint.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_privateendpointconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_privateendpointconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_privateendpointconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_privateendpointconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_privateendpointconnectionproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_privateendpointconnectionproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_privateendpointconnectionproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_privatelinkresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_privatelinkresource.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_privatelinkresource.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_privatelinkresource.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_privatelinkresourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_privatelinkresourceproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_privatelinkresourceproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_privatelinkresourceproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_privatelinkserviceconnectionstate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_privatelinkserviceconnectionstate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_privatelinkserviceconnectionstate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_privatelinkserviceconnectionstate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_quarantinepolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_quarantinepolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_quarantinepolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_quarantinepolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_regeneratecredentialparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_regeneratecredentialparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_regeneratecredentialparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_regeneratecredentialparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_registry.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_registry.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_registry.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_registrylistcredentialsresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_registrylistcredentialsresult.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_registrylistcredentialsresult.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_registrylistcredentialsresult.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_registrypassword.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_registrypassword.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_registrypassword.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_registrypassword.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_registryproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_registryproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_registryproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_registryproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_registrypropertiesupdateparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_registrypropertiesupdateparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_registrypropertiesupdateparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_registrypropertiesupdateparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_registryupdateparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_registryupdateparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_registryupdateparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_registryupdateparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_registryusage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_registryusage.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_registryusage.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_registryusage.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_registryusagelistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_registryusagelistresult.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_registryusagelistresult.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_registryusagelistresult.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_retentionpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_retentionpolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_retentionpolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_retentionpolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_sku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_sku.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_sku.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_sku.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_softdeletepolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_softdeletepolicy.go new file mode 100644 index 0000000000000..992548553591e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_softdeletepolicy.go @@ -0,0 +1,28 @@ +package registries + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SoftDeletePolicy struct { + LastUpdatedTime *string `json:"lastUpdatedTime,omitempty"` + RetentionDays *int64 `json:"retentionDays,omitempty"` + Status *PolicyStatus `json:"status,omitempty"` +} + +func (o *SoftDeletePolicy) GetLastUpdatedTimeAsTime() (*time.Time, error) { + if o.LastUpdatedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.LastUpdatedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *SoftDeletePolicy) SetLastUpdatedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.LastUpdatedTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_status.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_status.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_status.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_status.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_tokenpassword.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_tokenpassword.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_tokenpassword.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_tokenpassword.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_trustpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_trustpolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/model_trustpolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/model_trustpolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/version.go new file mode 100644 index 0000000000000..957d6ac0c4dde --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries/version.go @@ -0,0 +1,12 @@ +package registries + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-06-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/registries/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/README.md new file mode 100644 index 0000000000000..e049f7af4fa9d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/README.md @@ -0,0 +1,99 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications` Documentation + +The `replications` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications" +``` + + +### Client Initialization + +```go +client := replications.NewReplicationsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ReplicationsClient.Create` + +```go +ctx := context.TODO() +id := replications.NewReplicationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "replicationValue") + +payload := replications.Replication{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationsClient.Delete` + +```go +ctx := context.TODO() +id := replications.NewReplicationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "replicationValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationsClient.Get` + +```go +ctx := context.TODO() +id := replications.NewReplicationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "replicationValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ReplicationsClient.List` + +```go +ctx := context.TODO() +id := replications.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ReplicationsClient.Update` + +```go +ctx := context.TODO() +id := replications.NewReplicationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "replicationValue") + +payload := replications.ReplicationUpdateParameters{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/id_registry.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/id_registry.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/id_registry.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/id_replication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/id_replication.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/id_replication.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/id_replication.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/model_replication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/model_replication.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/model_replication.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/model_replication.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/model_replicationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/model_replicationproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/model_replicationproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/model_replicationproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/model_replicationupdateparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/model_replicationupdateparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/model_replicationupdateparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/model_replicationupdateparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/model_replicationupdateparametersproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/model_replicationupdateparametersproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/model_replicationupdateparametersproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/model_replicationupdateparametersproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/model_status.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/model_status.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/model_status.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/model_status.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/version.go new file mode 100644 index 0000000000000..f38e9ca9c28ba --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications/version.go @@ -0,0 +1,12 @@ +package replications + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-06-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/replications/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/README.md new file mode 100644 index 0000000000000..233535ccd6f4f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/README.md @@ -0,0 +1,99 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps` Documentation + +The `scopemaps` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps" +``` + + +### Client Initialization + +```go +client := scopemaps.NewScopeMapsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ScopeMapsClient.Create` + +```go +ctx := context.TODO() +id := scopemaps.NewScopeMapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "scopeMapValue") + +payload := scopemaps.ScopeMap{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ScopeMapsClient.Delete` + +```go +ctx := context.TODO() +id := scopemaps.NewScopeMapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "scopeMapValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ScopeMapsClient.Get` + +```go +ctx := context.TODO() +id := scopemaps.NewScopeMapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "scopeMapValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ScopeMapsClient.List` + +```go +ctx := context.TODO() +id := scopemaps.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ScopeMapsClient.Update` + +```go +ctx := context.TODO() +id := scopemaps.NewScopeMapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "scopeMapValue") + +payload := scopemaps.ScopeMapUpdateParameters{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/id_registry.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/id_registry.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/id_registry.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/id_scopemap.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/id_scopemap.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/id_scopemap.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/id_scopemap.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/model_scopemap.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/model_scopemap.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/model_scopemap.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/model_scopemap.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/model_scopemapproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/model_scopemapproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/model_scopemapproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/model_scopemapproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/model_scopemappropertiesupdateparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/model_scopemappropertiesupdateparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/model_scopemappropertiesupdateparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/model_scopemappropertiesupdateparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/model_scopemapupdateparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/model_scopemapupdateparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/model_scopemapupdateparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/model_scopemapupdateparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/version.go new file mode 100644 index 0000000000000..4b3c2a8619f13 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps/version.go @@ -0,0 +1,12 @@ +package scopemaps + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-06-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/scopemaps/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/README.md new file mode 100644 index 0000000000000..4b40948e9b72c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/README.md @@ -0,0 +1,99 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens` Documentation + +The `tokens` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens" +``` + + +### Client Initialization + +```go +client := tokens.NewTokensClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `TokensClient.Create` + +```go +ctx := context.TODO() +id := tokens.NewTokenID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "tokenValue") + +payload := tokens.Token{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `TokensClient.Delete` + +```go +ctx := context.TODO() +id := tokens.NewTokenID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "tokenValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `TokensClient.Get` + +```go +ctx := context.TODO() +id := tokens.NewTokenID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "tokenValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `TokensClient.List` + +```go +ctx := context.TODO() +id := tokens.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `TokensClient.Update` + +```go +ctx := context.TODO() +id := tokens.NewTokenID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "tokenValue") + +payload := tokens.TokenUpdateParameters{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/id_registry.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/id_registry.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/id_registry.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/id_token.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/id_token.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/id_token.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/id_token.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/model_token.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/model_token.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/model_token.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/model_token.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/model_tokencertificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/model_tokencertificate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/model_tokencertificate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/model_tokencertificate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/model_tokencredentialsproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/model_tokencredentialsproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/model_tokencredentialsproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/model_tokencredentialsproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/model_tokenpassword.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/model_tokenpassword.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/model_tokenpassword.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/model_tokenpassword.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/model_tokenproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/model_tokenproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/model_tokenproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/model_tokenproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/model_tokenupdateparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/model_tokenupdateparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/model_tokenupdateparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/model_tokenupdateparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/model_tokenupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/model_tokenupdateproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/model_tokenupdateproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/model_tokenupdateproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/version.go new file mode 100644 index 0000000000000..b2dfc439841bb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens/version.go @@ -0,0 +1,12 @@ +package tokens + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-06-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/tokens/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/README.md new file mode 100644 index 0000000000000..9062845286bcc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/README.md @@ -0,0 +1,148 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks` Documentation + +The `webhooks` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks" +``` + + +### Client Initialization + +```go +client := webhooks.NewWebHooksClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `WebHooksClient.Create` + +```go +ctx := context.TODO() +id := webhooks.NewWebHookID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "webHookValue") + +payload := webhooks.WebhookCreateParameters{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebHooksClient.Delete` + +```go +ctx := context.TODO() +id := webhooks.NewWebHookID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "webHookValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebHooksClient.Get` + +```go +ctx := context.TODO() +id := webhooks.NewWebHookID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "webHookValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebHooksClient.GetCallbackConfig` + +```go +ctx := context.TODO() +id := webhooks.NewWebHookID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "webHookValue") + +read, err := client.GetCallbackConfig(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebHooksClient.List` + +```go +ctx := context.TODO() +id := webhooks.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebHooksClient.ListEvents` + +```go +ctx := context.TODO() +id := webhooks.NewWebHookID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "webHookValue") + +// alternatively `client.ListEvents(ctx, id)` can be used to do batched pagination +items, err := client.ListEventsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebHooksClient.Ping` + +```go +ctx := context.TODO() +id := webhooks.NewWebHookID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "webHookValue") + +read, err := client.Ping(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebHooksClient.Update` + +```go +ctx := context.TODO() +id := webhooks.NewWebHookID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "webHookValue") + +payload := webhooks.WebhookUpdateParameters{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/id_registry.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/id_registry.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/id_registry.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/id_webhook.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/id_webhook.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/id_webhook.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/id_webhook.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_getcallbackconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_getcallbackconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_getcallbackconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_getcallbackconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_listevents.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_listevents.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_listevents.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_listevents.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_ping.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_ping.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_ping.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_ping.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_actor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_actor.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_actor.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_actor.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_callbackconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_callbackconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_callbackconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_callbackconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_event.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_event.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_event.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_event.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_eventcontent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_eventcontent.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_eventcontent.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_eventcontent.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_eventinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_eventinfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_eventinfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_eventinfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_eventrequestmessage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_eventrequestmessage.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_eventrequestmessage.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_eventrequestmessage.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_eventresponsemessage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_eventresponsemessage.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_eventresponsemessage.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_eventresponsemessage.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_request.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_request.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_request.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_request.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_source.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_source.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_source.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_source.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_target.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_target.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_target.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_target.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_webhook.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_webhook.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_webhook.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_webhook.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_webhookcreateparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_webhookcreateparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_webhookcreateparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_webhookcreateparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_webhookproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_webhookproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_webhookproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_webhookproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_webhookpropertiescreateparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_webhookpropertiescreateparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_webhookpropertiescreateparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_webhookpropertiescreateparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_webhookpropertiesupdateparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_webhookpropertiesupdateparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_webhookpropertiesupdateparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_webhookpropertiesupdateparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_webhookupdateparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_webhookupdateparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_webhookupdateparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_webhookupdateparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/version.go new file mode 100644 index 0000000000000..1a86c1789a80e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks/version.go @@ -0,0 +1,12 @@ +package webhooks + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-06-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/webhooks/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/README.md deleted file mode 100644 index fb9f674841dfe..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/README.md +++ /dev/null @@ -1,139 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools` Documentation - -The `agentpools` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-09-02-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools" -``` - - -### Client Initialization - -```go -client := agentpools.NewAgentPoolsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `AgentPoolsClient.AbortLatestOperation` - -```go -ctx := context.TODO() -id := agentpools.NewAgentPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "agentPoolValue") - -if err := client.AbortLatestOperationThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `AgentPoolsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := agentpools.NewAgentPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "agentPoolValue") - -payload := agentpools.AgentPool{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `AgentPoolsClient.Delete` - -```go -ctx := context.TODO() -id := agentpools.NewAgentPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "agentPoolValue") - -if err := client.DeleteThenPoll(ctx, id, agentpools.DefaultDeleteOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `AgentPoolsClient.Get` - -```go -ctx := context.TODO() -id := agentpools.NewAgentPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "agentPoolValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AgentPoolsClient.GetAvailableAgentPoolVersions` - -```go -ctx := context.TODO() -id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") - -read, err := client.GetAvailableAgentPoolVersions(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AgentPoolsClient.GetUpgradeProfile` - -```go -ctx := context.TODO() -id := agentpools.NewAgentPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "agentPoolValue") - -read, err := client.GetUpgradeProfile(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AgentPoolsClient.List` - -```go -ctx := context.TODO() -id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AgentPoolsClient.UpgradeNodeImageVersion` - -```go -ctx := context.TODO() -id := agentpools.NewAgentPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "agentPoolValue") - -if err := client.UpgradeNodeImageVersionThenPoll(ctx, id); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/constants.go deleted file mode 100644 index 24305aa95a301..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/constants.go +++ /dev/null @@ -1,614 +0,0 @@ -package agentpools - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AgentPoolMode string - -const ( - AgentPoolModeSystem AgentPoolMode = "System" - AgentPoolModeUser AgentPoolMode = "User" -) - -func PossibleValuesForAgentPoolMode() []string { - return []string{ - string(AgentPoolModeSystem), - string(AgentPoolModeUser), - } -} - -func (s *AgentPoolMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAgentPoolMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAgentPoolMode(input string) (*AgentPoolMode, error) { - vals := map[string]AgentPoolMode{ - "system": AgentPoolModeSystem, - "user": AgentPoolModeUser, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AgentPoolMode(input) - return &out, nil -} - -type AgentPoolSSHAccess string - -const ( - AgentPoolSSHAccessDisabled AgentPoolSSHAccess = "Disabled" - AgentPoolSSHAccessLocalUser AgentPoolSSHAccess = "LocalUser" -) - -func PossibleValuesForAgentPoolSSHAccess() []string { - return []string{ - string(AgentPoolSSHAccessDisabled), - string(AgentPoolSSHAccessLocalUser), - } -} - -func (s *AgentPoolSSHAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAgentPoolSSHAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAgentPoolSSHAccess(input string) (*AgentPoolSSHAccess, error) { - vals := map[string]AgentPoolSSHAccess{ - "disabled": AgentPoolSSHAccessDisabled, - "localuser": AgentPoolSSHAccessLocalUser, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AgentPoolSSHAccess(input) - return &out, nil -} - -type AgentPoolType string - -const ( - AgentPoolTypeAvailabilitySet AgentPoolType = "AvailabilitySet" - AgentPoolTypeVirtualMachineScaleSets AgentPoolType = "VirtualMachineScaleSets" - AgentPoolTypeVirtualMachines AgentPoolType = "VirtualMachines" -) - -func PossibleValuesForAgentPoolType() []string { - return []string{ - string(AgentPoolTypeAvailabilitySet), - string(AgentPoolTypeVirtualMachineScaleSets), - string(AgentPoolTypeVirtualMachines), - } -} - -func (s *AgentPoolType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAgentPoolType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAgentPoolType(input string) (*AgentPoolType, error) { - vals := map[string]AgentPoolType{ - "availabilityset": AgentPoolTypeAvailabilitySet, - "virtualmachinescalesets": AgentPoolTypeVirtualMachineScaleSets, - "virtualmachines": AgentPoolTypeVirtualMachines, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AgentPoolType(input) - return &out, nil -} - -type Code string - -const ( - CodeRunning Code = "Running" - CodeStopped Code = "Stopped" -) - -func PossibleValuesForCode() []string { - return []string{ - string(CodeRunning), - string(CodeStopped), - } -} - -func (s *Code) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCode(input string) (*Code, error) { - vals := map[string]Code{ - "running": CodeRunning, - "stopped": CodeStopped, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Code(input) - return &out, nil -} - -type GPUInstanceProfile string - -const ( - GPUInstanceProfileMIGFourg GPUInstanceProfile = "MIG4g" - GPUInstanceProfileMIGOneg GPUInstanceProfile = "MIG1g" - GPUInstanceProfileMIGSeveng GPUInstanceProfile = "MIG7g" - GPUInstanceProfileMIGThreeg GPUInstanceProfile = "MIG3g" - GPUInstanceProfileMIGTwog GPUInstanceProfile = "MIG2g" -) - -func PossibleValuesForGPUInstanceProfile() []string { - return []string{ - string(GPUInstanceProfileMIGFourg), - string(GPUInstanceProfileMIGOneg), - string(GPUInstanceProfileMIGSeveng), - string(GPUInstanceProfileMIGThreeg), - string(GPUInstanceProfileMIGTwog), - } -} - -func (s *GPUInstanceProfile) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGPUInstanceProfile(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGPUInstanceProfile(input string) (*GPUInstanceProfile, error) { - vals := map[string]GPUInstanceProfile{ - "mig4g": GPUInstanceProfileMIGFourg, - "mig1g": GPUInstanceProfileMIGOneg, - "mig7g": GPUInstanceProfileMIGSeveng, - "mig3g": GPUInstanceProfileMIGThreeg, - "mig2g": GPUInstanceProfileMIGTwog, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GPUInstanceProfile(input) - return &out, nil -} - -type KubeletDiskType string - -const ( - KubeletDiskTypeOS KubeletDiskType = "OS" - KubeletDiskTypeTemporary KubeletDiskType = "Temporary" -) - -func PossibleValuesForKubeletDiskType() []string { - return []string{ - string(KubeletDiskTypeOS), - string(KubeletDiskTypeTemporary), - } -} - -func (s *KubeletDiskType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseKubeletDiskType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseKubeletDiskType(input string) (*KubeletDiskType, error) { - vals := map[string]KubeletDiskType{ - "os": KubeletDiskTypeOS, - "temporary": KubeletDiskTypeTemporary, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := KubeletDiskType(input) - return &out, nil -} - -type OSDiskType string - -const ( - OSDiskTypeEphemeral OSDiskType = "Ephemeral" - OSDiskTypeManaged OSDiskType = "Managed" -) - -func PossibleValuesForOSDiskType() []string { - return []string{ - string(OSDiskTypeEphemeral), - string(OSDiskTypeManaged), - } -} - -func (s *OSDiskType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOSDiskType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOSDiskType(input string) (*OSDiskType, error) { - vals := map[string]OSDiskType{ - "ephemeral": OSDiskTypeEphemeral, - "managed": OSDiskTypeManaged, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OSDiskType(input) - return &out, nil -} - -type OSSKU string - -const ( - OSSKUAzureLinux OSSKU = "AzureLinux" - OSSKUCBLMariner OSSKU = "CBLMariner" - OSSKUMariner OSSKU = "Mariner" - OSSKUUbuntu OSSKU = "Ubuntu" - OSSKUWindowsAnnual OSSKU = "WindowsAnnual" - OSSKUWindowsTwoZeroOneNine OSSKU = "Windows2019" - OSSKUWindowsTwoZeroTwoTwo OSSKU = "Windows2022" -) - -func PossibleValuesForOSSKU() []string { - return []string{ - string(OSSKUAzureLinux), - string(OSSKUCBLMariner), - string(OSSKUMariner), - string(OSSKUUbuntu), - string(OSSKUWindowsAnnual), - string(OSSKUWindowsTwoZeroOneNine), - string(OSSKUWindowsTwoZeroTwoTwo), - } -} - -func (s *OSSKU) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOSSKU(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOSSKU(input string) (*OSSKU, error) { - vals := map[string]OSSKU{ - "azurelinux": OSSKUAzureLinux, - "cblmariner": OSSKUCBLMariner, - "mariner": OSSKUMariner, - "ubuntu": OSSKUUbuntu, - "windowsannual": OSSKUWindowsAnnual, - "windows2019": OSSKUWindowsTwoZeroOneNine, - "windows2022": OSSKUWindowsTwoZeroTwoTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OSSKU(input) - return &out, nil -} - -type OSType string - -const ( - OSTypeLinux OSType = "Linux" - OSTypeWindows OSType = "Windows" -) - -func PossibleValuesForOSType() []string { - return []string{ - string(OSTypeLinux), - string(OSTypeWindows), - } -} - -func (s *OSType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOSType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOSType(input string) (*OSType, error) { - vals := map[string]OSType{ - "linux": OSTypeLinux, - "windows": OSTypeWindows, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OSType(input) - return &out, nil -} - -type Protocol string - -const ( - ProtocolTCP Protocol = "TCP" - ProtocolUDP Protocol = "UDP" -) - -func PossibleValuesForProtocol() []string { - return []string{ - string(ProtocolTCP), - string(ProtocolUDP), - } -} - -func (s *Protocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProtocol(input string) (*Protocol, error) { - vals := map[string]Protocol{ - "tcp": ProtocolTCP, - "udp": ProtocolUDP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Protocol(input) - return &out, nil -} - -type ScaleDownMode string - -const ( - ScaleDownModeDeallocate ScaleDownMode = "Deallocate" - ScaleDownModeDelete ScaleDownMode = "Delete" -) - -func PossibleValuesForScaleDownMode() []string { - return []string{ - string(ScaleDownModeDeallocate), - string(ScaleDownModeDelete), - } -} - -func (s *ScaleDownMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseScaleDownMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseScaleDownMode(input string) (*ScaleDownMode, error) { - vals := map[string]ScaleDownMode{ - "deallocate": ScaleDownModeDeallocate, - "delete": ScaleDownModeDelete, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ScaleDownMode(input) - return &out, nil -} - -type ScaleSetEvictionPolicy string - -const ( - ScaleSetEvictionPolicyDeallocate ScaleSetEvictionPolicy = "Deallocate" - ScaleSetEvictionPolicyDelete ScaleSetEvictionPolicy = "Delete" -) - -func PossibleValuesForScaleSetEvictionPolicy() []string { - return []string{ - string(ScaleSetEvictionPolicyDeallocate), - string(ScaleSetEvictionPolicyDelete), - } -} - -func (s *ScaleSetEvictionPolicy) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseScaleSetEvictionPolicy(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseScaleSetEvictionPolicy(input string) (*ScaleSetEvictionPolicy, error) { - vals := map[string]ScaleSetEvictionPolicy{ - "deallocate": ScaleSetEvictionPolicyDeallocate, - "delete": ScaleSetEvictionPolicyDelete, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ScaleSetEvictionPolicy(input) - return &out, nil -} - -type ScaleSetPriority string - -const ( - ScaleSetPriorityRegular ScaleSetPriority = "Regular" - ScaleSetPrioritySpot ScaleSetPriority = "Spot" -) - -func PossibleValuesForScaleSetPriority() []string { - return []string{ - string(ScaleSetPriorityRegular), - string(ScaleSetPrioritySpot), - } -} - -func (s *ScaleSetPriority) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseScaleSetPriority(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseScaleSetPriority(input string) (*ScaleSetPriority, error) { - vals := map[string]ScaleSetPriority{ - "regular": ScaleSetPriorityRegular, - "spot": ScaleSetPrioritySpot, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ScaleSetPriority(input) - return &out, nil -} - -type WorkloadRuntime string - -const ( - WorkloadRuntimeKataMshvVMIsolation WorkloadRuntime = "KataMshvVmIsolation" - WorkloadRuntimeOCIContainer WorkloadRuntime = "OCIContainer" - WorkloadRuntimeWasmWasi WorkloadRuntime = "WasmWasi" -) - -func PossibleValuesForWorkloadRuntime() []string { - return []string{ - string(WorkloadRuntimeKataMshvVMIsolation), - string(WorkloadRuntimeOCIContainer), - string(WorkloadRuntimeWasmWasi), - } -} - -func (s *WorkloadRuntime) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWorkloadRuntime(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWorkloadRuntime(input string) (*WorkloadRuntime, error) { - vals := map[string]WorkloadRuntime{ - "katamshvvmisolation": WorkloadRuntimeKataMshvVMIsolation, - "ocicontainer": WorkloadRuntimeOCIContainer, - "wasmwasi": WorkloadRuntimeWasmWasi, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WorkloadRuntime(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/method_delete.go deleted file mode 100644 index 4943dd2d43e85..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/method_delete.go +++ /dev/null @@ -1,98 +0,0 @@ -package agentpools - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type DeleteOperationOptions struct { - IgnorePodDisruptionBudget *bool -} - -func DefaultDeleteOperationOptions() DeleteOperationOptions { - return DeleteOperationOptions{} -} - -func (o DeleteOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o DeleteOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o DeleteOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.IgnorePodDisruptionBudget != nil { - out.Append("ignore-pod-disruption-budget", fmt.Sprintf("%v", *o.IgnorePodDisruptionBudget)) - } - return &out -} - -// Delete ... -func (c AgentPoolsClient) Delete(ctx context.Context, id AgentPoolId, options DeleteOperationOptions) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - }, - HttpMethod: http.MethodDelete, - OptionsObject: options, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c AgentPoolsClient) DeleteThenPoll(ctx context.Context, id AgentPoolId, options DeleteOperationOptions) error { - result, err := c.Delete(ctx, id, options) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolartifactstreamingprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolartifactstreamingprofile.go deleted file mode 100644 index 2c5eb8911dc7a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolartifactstreamingprofile.go +++ /dev/null @@ -1,8 +0,0 @@ -package agentpools - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AgentPoolArtifactStreamingProfile struct { - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolgpuprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolgpuprofile.go deleted file mode 100644 index ad7abfd97f65b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolgpuprofile.go +++ /dev/null @@ -1,8 +0,0 @@ -package agentpools - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AgentPoolGPUProfile struct { - InstallGPUDriver *bool `json:"installGPUDriver,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolsecurityprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolsecurityprofile.go deleted file mode 100644 index d3f054598f932..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolsecurityprofile.go +++ /dev/null @@ -1,8 +0,0 @@ -package agentpools - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AgentPoolSecurityProfile struct { - SshAccess *AgentPoolSSHAccess `json:"sshAccess,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_managedclusteragentpoolprofileproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_managedclusteragentpoolprofileproperties.go deleted file mode 100644 index ef2f5729d3e3a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_managedclusteragentpoolprofileproperties.go +++ /dev/null @@ -1,60 +0,0 @@ -package agentpools - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedClusterAgentPoolProfileProperties struct { - ArtifactStreamingProfile *AgentPoolArtifactStreamingProfile `json:"artifactStreamingProfile,omitempty"` - AvailabilityZones *zones.Schema `json:"availabilityZones,omitempty"` - CapacityReservationGroupID *string `json:"capacityReservationGroupID,omitempty"` - Count *int64 `json:"count,omitempty"` - CreationData *CreationData `json:"creationData,omitempty"` - CurrentOrchestratorVersion *string `json:"currentOrchestratorVersion,omitempty"` - EnableAutoScaling *bool `json:"enableAutoScaling,omitempty"` - EnableCustomCATrust *bool `json:"enableCustomCATrust,omitempty"` - EnableEncryptionAtHost *bool `json:"enableEncryptionAtHost,omitempty"` - EnableFIPS *bool `json:"enableFIPS,omitempty"` - EnableNodePublicIP *bool `json:"enableNodePublicIP,omitempty"` - EnableUltraSSD *bool `json:"enableUltraSSD,omitempty"` - GpuInstanceProfile *GPUInstanceProfile `json:"gpuInstanceProfile,omitempty"` - GpuProfile *AgentPoolGPUProfile `json:"gpuProfile,omitempty"` - HostGroupID *string `json:"hostGroupID,omitempty"` - KubeletConfig *KubeletConfig `json:"kubeletConfig,omitempty"` - KubeletDiskType *KubeletDiskType `json:"kubeletDiskType,omitempty"` - LinuxOSConfig *LinuxOSConfig `json:"linuxOSConfig,omitempty"` - MaxCount *int64 `json:"maxCount,omitempty"` - MaxPods *int64 `json:"maxPods,omitempty"` - MessageOfTheDay *string `json:"messageOfTheDay,omitempty"` - MinCount *int64 `json:"minCount,omitempty"` - Mode *AgentPoolMode `json:"mode,omitempty"` - NetworkProfile *AgentPoolNetworkProfile `json:"networkProfile,omitempty"` - NodeImageVersion *string `json:"nodeImageVersion,omitempty"` - NodeLabels *map[string]string `json:"nodeLabels,omitempty"` - NodePublicIPPrefixID *string `json:"nodePublicIPPrefixID,omitempty"` - NodeTaints *[]string `json:"nodeTaints,omitempty"` - OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` - OsDiskSizeGB *int64 `json:"osDiskSizeGB,omitempty"` - OsDiskType *OSDiskType `json:"osDiskType,omitempty"` - OsSKU *OSSKU `json:"osSKU,omitempty"` - OsType *OSType `json:"osType,omitempty"` - PodSubnetID *string `json:"podSubnetID,omitempty"` - PowerState *PowerState `json:"powerState,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` - ProximityPlacementGroupID *string `json:"proximityPlacementGroupID,omitempty"` - ScaleDownMode *ScaleDownMode `json:"scaleDownMode,omitempty"` - ScaleSetEvictionPolicy *ScaleSetEvictionPolicy `json:"scaleSetEvictionPolicy,omitempty"` - ScaleSetPriority *ScaleSetPriority `json:"scaleSetPriority,omitempty"` - SecurityProfile *AgentPoolSecurityProfile `json:"securityProfile,omitempty"` - SpotMaxPrice *float64 `json:"spotMaxPrice,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *AgentPoolType `json:"type,omitempty"` - UpgradeSettings *AgentPoolUpgradeSettings `json:"upgradeSettings,omitempty"` - VMSize *string `json:"vmSize,omitempty"` - VnetSubnetID *string `json:"vnetSubnetID,omitempty"` - WindowsProfile *AgentPoolWindowsProfile `json:"windowsProfile,omitempty"` - WorkloadRuntime *WorkloadRuntime `json:"workloadRuntime,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/version.go deleted file mode 100644 index 48761a9521579..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package agentpools - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2023-09-02-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/agentpools/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/README.md deleted file mode 100644 index 257970049ecf4..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/README.md +++ /dev/null @@ -1,91 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations` Documentation - -The `maintenanceconfigurations` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-09-02-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations" -``` - - -### Client Initialization - -```go -client := maintenanceconfigurations.NewMaintenanceConfigurationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `MaintenanceConfigurationsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := maintenanceconfigurations.NewMaintenanceConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "maintenanceConfigurationValue") - -payload := maintenanceconfigurations.MaintenanceConfiguration{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `MaintenanceConfigurationsClient.Delete` - -```go -ctx := context.TODO() -id := maintenanceconfigurations.NewMaintenanceConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "maintenanceConfigurationValue") - -read, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `MaintenanceConfigurationsClient.Get` - -```go -ctx := context.TODO() -id := maintenanceconfigurations.NewMaintenanceConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "maintenanceConfigurationValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `MaintenanceConfigurationsClient.ListByManagedCluster` - -```go -ctx := context.TODO() -id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") - -// alternatively `client.ListByManagedCluster(ctx, id)` can be used to do batched pagination -items, err := client.ListByManagedClusterComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/version.go deleted file mode 100644 index 062be9079281a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package maintenanceconfigurations - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2023-09-02-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/maintenanceconfigurations/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/README.md deleted file mode 100644 index feabd3665b6d6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/README.md +++ /dev/null @@ -1,472 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters` Documentation - -The `managedclusters` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-09-02-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters" -``` - - -### Client Initialization - -```go -client := managedclusters.NewManagedClustersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ManagedClustersClient.AbortLatestOperation` - -```go -ctx := context.TODO() -id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") - -if err := client.AbortLatestOperationThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ManagedClustersClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") - -payload := managedclusters.ManagedCluster{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ManagedClustersClient.Delete` - -```go -ctx := context.TODO() -id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") - -if err := client.DeleteThenPoll(ctx, id, managedclusters.DefaultDeleteOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `ManagedClustersClient.Get` - -```go -ctx := context.TODO() -id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ManagedClustersClient.GetAccessProfile` - -```go -ctx := context.TODO() -id := managedclusters.NewAccessProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "accessProfileValue") - -read, err := client.GetAccessProfile(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ManagedClustersClient.GetCommandResult` - -```go -ctx := context.TODO() -id := managedclusters.NewCommandResultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "commandIdValue") - -read, err := client.GetCommandResult(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ManagedClustersClient.GetGuardrailsVersions` - -```go -ctx := context.TODO() -id := managedclusters.NewGuardrailsVersionID("12345678-1234-9876-4563-123456789012", "locationValue", "guardrailsVersionValue") - -read, err := client.GetGuardrailsVersions(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ManagedClustersClient.GetMeshRevisionProfile` - -```go -ctx := context.TODO() -id := managedclusters.NewMeshRevisionProfileID("12345678-1234-9876-4563-123456789012", "locationValue", "meshRevisionProfileValue") - -read, err := client.GetMeshRevisionProfile(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ManagedClustersClient.GetMeshUpgradeProfile` - -```go -ctx := context.TODO() -id := managedclusters.NewMeshUpgradeProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "meshUpgradeProfileValue") - -read, err := client.GetMeshUpgradeProfile(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ManagedClustersClient.GetOSOptions` - -```go -ctx := context.TODO() -id := managedclusters.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -read, err := client.GetOSOptions(ctx, id, managedclusters.DefaultGetOSOptionsOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ManagedClustersClient.GetUpgradeProfile` - -```go -ctx := context.TODO() -id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") - -read, err := client.GetUpgradeProfile(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ManagedClustersClient.List` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ManagedClustersClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ManagedClustersClient.ListClusterAdminCredentials` - -```go -ctx := context.TODO() -id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") - -read, err := client.ListClusterAdminCredentials(ctx, id, managedclusters.DefaultListClusterAdminCredentialsOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ManagedClustersClient.ListClusterMonitoringUserCredentials` - -```go -ctx := context.TODO() -id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") - -read, err := client.ListClusterMonitoringUserCredentials(ctx, id, managedclusters.DefaultListClusterMonitoringUserCredentialsOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ManagedClustersClient.ListClusterUserCredentials` - -```go -ctx := context.TODO() -id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") - -read, err := client.ListClusterUserCredentials(ctx, id, managedclusters.DefaultListClusterUserCredentialsOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ManagedClustersClient.ListGuardrailsVersions` - -```go -ctx := context.TODO() -id := managedclusters.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -// alternatively `client.ListGuardrailsVersions(ctx, id)` can be used to do batched pagination -items, err := client.ListGuardrailsVersionsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ManagedClustersClient.ListKubernetesVersions` - -```go -ctx := context.TODO() -id := managedclusters.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -read, err := client.ListKubernetesVersions(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ManagedClustersClient.ListMeshRevisionProfiles` - -```go -ctx := context.TODO() -id := managedclusters.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -// alternatively `client.ListMeshRevisionProfiles(ctx, id)` can be used to do batched pagination -items, err := client.ListMeshRevisionProfilesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ManagedClustersClient.ListMeshUpgradeProfiles` - -```go -ctx := context.TODO() -id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") - -// alternatively `client.ListMeshUpgradeProfiles(ctx, id)` can be used to do batched pagination -items, err := client.ListMeshUpgradeProfilesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ManagedClustersClient.ListOutboundNetworkDependenciesEndpoints` - -```go -ctx := context.TODO() -id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") - -// alternatively `client.ListOutboundNetworkDependenciesEndpoints(ctx, id)` can be used to do batched pagination -items, err := client.ListOutboundNetworkDependenciesEndpointsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ManagedClustersClient.ResetAADProfile` - -```go -ctx := context.TODO() -id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") - -payload := managedclusters.ManagedClusterAADProfile{ - // ... -} - - -if err := client.ResetAADProfileThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ManagedClustersClient.ResetServicePrincipalProfile` - -```go -ctx := context.TODO() -id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") - -payload := managedclusters.ManagedClusterServicePrincipalProfile{ - // ... -} - - -if err := client.ResetServicePrincipalProfileThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ManagedClustersClient.RotateClusterCertificates` - -```go -ctx := context.TODO() -id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") - -if err := client.RotateClusterCertificatesThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ManagedClustersClient.RotateServiceAccountSigningKeys` - -```go -ctx := context.TODO() -id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") - -if err := client.RotateServiceAccountSigningKeysThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ManagedClustersClient.RunCommand` - -```go -ctx := context.TODO() -id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") - -payload := managedclusters.RunCommandRequest{ - // ... -} - - -if err := client.RunCommandThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ManagedClustersClient.Start` - -```go -ctx := context.TODO() -id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") - -if err := client.StartThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ManagedClustersClient.Stop` - -```go -ctx := context.TODO() -id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") - -if err := client.StopThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ManagedClustersClient.UpdateTags` - -```go -ctx := context.TODO() -id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") - -payload := managedclusters.TagsObject{ - // ... -} - - -if err := client.UpdateTagsThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/constants.go deleted file mode 100644 index a5155a2bdcb59..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/constants.go +++ /dev/null @@ -1,1854 +0,0 @@ -package managedclusters - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddonAutoscaling string - -const ( - AddonAutoscalingDisabled AddonAutoscaling = "Disabled" - AddonAutoscalingEnabled AddonAutoscaling = "Enabled" -) - -func PossibleValuesForAddonAutoscaling() []string { - return []string{ - string(AddonAutoscalingDisabled), - string(AddonAutoscalingEnabled), - } -} - -func (s *AddonAutoscaling) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAddonAutoscaling(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAddonAutoscaling(input string) (*AddonAutoscaling, error) { - vals := map[string]AddonAutoscaling{ - "disabled": AddonAutoscalingDisabled, - "enabled": AddonAutoscalingEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AddonAutoscaling(input) - return &out, nil -} - -type AgentPoolMode string - -const ( - AgentPoolModeSystem AgentPoolMode = "System" - AgentPoolModeUser AgentPoolMode = "User" -) - -func PossibleValuesForAgentPoolMode() []string { - return []string{ - string(AgentPoolModeSystem), - string(AgentPoolModeUser), - } -} - -func (s *AgentPoolMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAgentPoolMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAgentPoolMode(input string) (*AgentPoolMode, error) { - vals := map[string]AgentPoolMode{ - "system": AgentPoolModeSystem, - "user": AgentPoolModeUser, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AgentPoolMode(input) - return &out, nil -} - -type AgentPoolSSHAccess string - -const ( - AgentPoolSSHAccessDisabled AgentPoolSSHAccess = "Disabled" - AgentPoolSSHAccessLocalUser AgentPoolSSHAccess = "LocalUser" -) - -func PossibleValuesForAgentPoolSSHAccess() []string { - return []string{ - string(AgentPoolSSHAccessDisabled), - string(AgentPoolSSHAccessLocalUser), - } -} - -func (s *AgentPoolSSHAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAgentPoolSSHAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAgentPoolSSHAccess(input string) (*AgentPoolSSHAccess, error) { - vals := map[string]AgentPoolSSHAccess{ - "disabled": AgentPoolSSHAccessDisabled, - "localuser": AgentPoolSSHAccessLocalUser, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AgentPoolSSHAccess(input) - return &out, nil -} - -type AgentPoolType string - -const ( - AgentPoolTypeAvailabilitySet AgentPoolType = "AvailabilitySet" - AgentPoolTypeVirtualMachineScaleSets AgentPoolType = "VirtualMachineScaleSets" - AgentPoolTypeVirtualMachines AgentPoolType = "VirtualMachines" -) - -func PossibleValuesForAgentPoolType() []string { - return []string{ - string(AgentPoolTypeAvailabilitySet), - string(AgentPoolTypeVirtualMachineScaleSets), - string(AgentPoolTypeVirtualMachines), - } -} - -func (s *AgentPoolType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAgentPoolType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAgentPoolType(input string) (*AgentPoolType, error) { - vals := map[string]AgentPoolType{ - "availabilityset": AgentPoolTypeAvailabilitySet, - "virtualmachinescalesets": AgentPoolTypeVirtualMachineScaleSets, - "virtualmachines": AgentPoolTypeVirtualMachines, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AgentPoolType(input) - return &out, nil -} - -type BackendPoolType string - -const ( - BackendPoolTypeNodeIP BackendPoolType = "NodeIP" - BackendPoolTypeNodeIPConfiguration BackendPoolType = "NodeIPConfiguration" -) - -func PossibleValuesForBackendPoolType() []string { - return []string{ - string(BackendPoolTypeNodeIP), - string(BackendPoolTypeNodeIPConfiguration), - } -} - -func (s *BackendPoolType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseBackendPoolType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseBackendPoolType(input string) (*BackendPoolType, error) { - vals := map[string]BackendPoolType{ - "nodeip": BackendPoolTypeNodeIP, - "nodeipconfiguration": BackendPoolTypeNodeIPConfiguration, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := BackendPoolType(input) - return &out, nil -} - -type Code string - -const ( - CodeRunning Code = "Running" - CodeStopped Code = "Stopped" -) - -func PossibleValuesForCode() []string { - return []string{ - string(CodeRunning), - string(CodeStopped), - } -} - -func (s *Code) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCode(input string) (*Code, error) { - vals := map[string]Code{ - "running": CodeRunning, - "stopped": CodeStopped, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Code(input) - return &out, nil -} - -type Expander string - -const ( - ExpanderLeastNegativewaste Expander = "least-waste" - ExpanderMostNegativepods Expander = "most-pods" - ExpanderPriority Expander = "priority" - ExpanderRandom Expander = "random" -) - -func PossibleValuesForExpander() []string { - return []string{ - string(ExpanderLeastNegativewaste), - string(ExpanderMostNegativepods), - string(ExpanderPriority), - string(ExpanderRandom), - } -} - -func (s *Expander) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpander(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpander(input string) (*Expander, error) { - vals := map[string]Expander{ - "least-waste": ExpanderLeastNegativewaste, - "most-pods": ExpanderMostNegativepods, - "priority": ExpanderPriority, - "random": ExpanderRandom, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Expander(input) - return &out, nil -} - -type Format string - -const ( - FormatAzure Format = "azure" - FormatExec Format = "exec" -) - -func PossibleValuesForFormat() []string { - return []string{ - string(FormatAzure), - string(FormatExec), - } -} - -func (s *Format) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFormat(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFormat(input string) (*Format, error) { - vals := map[string]Format{ - "azure": FormatAzure, - "exec": FormatExec, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Format(input) - return &out, nil -} - -type GPUInstanceProfile string - -const ( - GPUInstanceProfileMIGFourg GPUInstanceProfile = "MIG4g" - GPUInstanceProfileMIGOneg GPUInstanceProfile = "MIG1g" - GPUInstanceProfileMIGSeveng GPUInstanceProfile = "MIG7g" - GPUInstanceProfileMIGThreeg GPUInstanceProfile = "MIG3g" - GPUInstanceProfileMIGTwog GPUInstanceProfile = "MIG2g" -) - -func PossibleValuesForGPUInstanceProfile() []string { - return []string{ - string(GPUInstanceProfileMIGFourg), - string(GPUInstanceProfileMIGOneg), - string(GPUInstanceProfileMIGSeveng), - string(GPUInstanceProfileMIGThreeg), - string(GPUInstanceProfileMIGTwog), - } -} - -func (s *GPUInstanceProfile) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGPUInstanceProfile(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGPUInstanceProfile(input string) (*GPUInstanceProfile, error) { - vals := map[string]GPUInstanceProfile{ - "mig4g": GPUInstanceProfileMIGFourg, - "mig1g": GPUInstanceProfileMIGOneg, - "mig7g": GPUInstanceProfileMIGSeveng, - "mig3g": GPUInstanceProfileMIGThreeg, - "mig2g": GPUInstanceProfileMIGTwog, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GPUInstanceProfile(input) - return &out, nil -} - -type GuardrailsSupport string - -const ( - GuardrailsSupportPreview GuardrailsSupport = "Preview" - GuardrailsSupportStable GuardrailsSupport = "Stable" -) - -func PossibleValuesForGuardrailsSupport() []string { - return []string{ - string(GuardrailsSupportPreview), - string(GuardrailsSupportStable), - } -} - -func (s *GuardrailsSupport) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGuardrailsSupport(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGuardrailsSupport(input string) (*GuardrailsSupport, error) { - vals := map[string]GuardrailsSupport{ - "preview": GuardrailsSupportPreview, - "stable": GuardrailsSupportStable, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GuardrailsSupport(input) - return &out, nil -} - -type IPFamily string - -const ( - IPFamilyIPvFour IPFamily = "IPv4" - IPFamilyIPvSix IPFamily = "IPv6" -) - -func PossibleValuesForIPFamily() []string { - return []string{ - string(IPFamilyIPvFour), - string(IPFamilyIPvSix), - } -} - -func (s *IPFamily) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPFamily(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPFamily(input string) (*IPFamily, error) { - vals := map[string]IPFamily{ - "ipv4": IPFamilyIPvFour, - "ipv6": IPFamilyIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPFamily(input) - return &out, nil -} - -type IPvsScheduler string - -const ( - IPvsSchedulerLeastConnection IPvsScheduler = "LeastConnection" - IPvsSchedulerRoundRobin IPvsScheduler = "RoundRobin" -) - -func PossibleValuesForIPvsScheduler() []string { - return []string{ - string(IPvsSchedulerLeastConnection), - string(IPvsSchedulerRoundRobin), - } -} - -func (s *IPvsScheduler) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPvsScheduler(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPvsScheduler(input string) (*IPvsScheduler, error) { - vals := map[string]IPvsScheduler{ - "leastconnection": IPvsSchedulerLeastConnection, - "roundrobin": IPvsSchedulerRoundRobin, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPvsScheduler(input) - return &out, nil -} - -type IstioIngressGatewayMode string - -const ( - IstioIngressGatewayModeExternal IstioIngressGatewayMode = "External" - IstioIngressGatewayModeInternal IstioIngressGatewayMode = "Internal" -) - -func PossibleValuesForIstioIngressGatewayMode() []string { - return []string{ - string(IstioIngressGatewayModeExternal), - string(IstioIngressGatewayModeInternal), - } -} - -func (s *IstioIngressGatewayMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIstioIngressGatewayMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIstioIngressGatewayMode(input string) (*IstioIngressGatewayMode, error) { - vals := map[string]IstioIngressGatewayMode{ - "external": IstioIngressGatewayModeExternal, - "internal": IstioIngressGatewayModeInternal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IstioIngressGatewayMode(input) - return &out, nil -} - -type KeyVaultNetworkAccessTypes string - -const ( - KeyVaultNetworkAccessTypesPrivate KeyVaultNetworkAccessTypes = "Private" - KeyVaultNetworkAccessTypesPublic KeyVaultNetworkAccessTypes = "Public" -) - -func PossibleValuesForKeyVaultNetworkAccessTypes() []string { - return []string{ - string(KeyVaultNetworkAccessTypesPrivate), - string(KeyVaultNetworkAccessTypesPublic), - } -} - -func (s *KeyVaultNetworkAccessTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseKeyVaultNetworkAccessTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseKeyVaultNetworkAccessTypes(input string) (*KeyVaultNetworkAccessTypes, error) { - vals := map[string]KeyVaultNetworkAccessTypes{ - "private": KeyVaultNetworkAccessTypesPrivate, - "public": KeyVaultNetworkAccessTypesPublic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := KeyVaultNetworkAccessTypes(input) - return &out, nil -} - -type KubeletDiskType string - -const ( - KubeletDiskTypeOS KubeletDiskType = "OS" - KubeletDiskTypeTemporary KubeletDiskType = "Temporary" -) - -func PossibleValuesForKubeletDiskType() []string { - return []string{ - string(KubeletDiskTypeOS), - string(KubeletDiskTypeTemporary), - } -} - -func (s *KubeletDiskType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseKubeletDiskType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseKubeletDiskType(input string) (*KubeletDiskType, error) { - vals := map[string]KubeletDiskType{ - "os": KubeletDiskTypeOS, - "temporary": KubeletDiskTypeTemporary, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := KubeletDiskType(input) - return &out, nil -} - -type KubernetesSupportPlan string - -const ( - KubernetesSupportPlanAKSLongTermSupport KubernetesSupportPlan = "AKSLongTermSupport" - KubernetesSupportPlanKubernetesOfficial KubernetesSupportPlan = "KubernetesOfficial" -) - -func PossibleValuesForKubernetesSupportPlan() []string { - return []string{ - string(KubernetesSupportPlanAKSLongTermSupport), - string(KubernetesSupportPlanKubernetesOfficial), - } -} - -func (s *KubernetesSupportPlan) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseKubernetesSupportPlan(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseKubernetesSupportPlan(input string) (*KubernetesSupportPlan, error) { - vals := map[string]KubernetesSupportPlan{ - "akslongtermsupport": KubernetesSupportPlanAKSLongTermSupport, - "kubernetesofficial": KubernetesSupportPlanKubernetesOfficial, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := KubernetesSupportPlan(input) - return &out, nil -} - -type Level string - -const ( - LevelEnforcement Level = "Enforcement" - LevelOff Level = "Off" - LevelWarning Level = "Warning" -) - -func PossibleValuesForLevel() []string { - return []string{ - string(LevelEnforcement), - string(LevelOff), - string(LevelWarning), - } -} - -func (s *Level) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLevel(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLevel(input string) (*Level, error) { - vals := map[string]Level{ - "enforcement": LevelEnforcement, - "off": LevelOff, - "warning": LevelWarning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Level(input) - return &out, nil -} - -type LicenseType string - -const ( - LicenseTypeNone LicenseType = "None" - LicenseTypeWindowsServer LicenseType = "Windows_Server" -) - -func PossibleValuesForLicenseType() []string { - return []string{ - string(LicenseTypeNone), - string(LicenseTypeWindowsServer), - } -} - -func (s *LicenseType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLicenseType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLicenseType(input string) (*LicenseType, error) { - vals := map[string]LicenseType{ - "none": LicenseTypeNone, - "windows_server": LicenseTypeWindowsServer, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LicenseType(input) - return &out, nil -} - -type LoadBalancerSku string - -const ( - LoadBalancerSkuBasic LoadBalancerSku = "basic" - LoadBalancerSkuStandard LoadBalancerSku = "standard" -) - -func PossibleValuesForLoadBalancerSku() []string { - return []string{ - string(LoadBalancerSkuBasic), - string(LoadBalancerSkuStandard), - } -} - -func (s *LoadBalancerSku) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerSku(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerSku(input string) (*LoadBalancerSku, error) { - vals := map[string]LoadBalancerSku{ - "basic": LoadBalancerSkuBasic, - "standard": LoadBalancerSkuStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerSku(input) - return &out, nil -} - -type ManagedClusterPodIdentityProvisioningState string - -const ( - ManagedClusterPodIdentityProvisioningStateAssigned ManagedClusterPodIdentityProvisioningState = "Assigned" - ManagedClusterPodIdentityProvisioningStateCanceled ManagedClusterPodIdentityProvisioningState = "Canceled" - ManagedClusterPodIdentityProvisioningStateDeleting ManagedClusterPodIdentityProvisioningState = "Deleting" - ManagedClusterPodIdentityProvisioningStateFailed ManagedClusterPodIdentityProvisioningState = "Failed" - ManagedClusterPodIdentityProvisioningStateSucceeded ManagedClusterPodIdentityProvisioningState = "Succeeded" - ManagedClusterPodIdentityProvisioningStateUpdating ManagedClusterPodIdentityProvisioningState = "Updating" -) - -func PossibleValuesForManagedClusterPodIdentityProvisioningState() []string { - return []string{ - string(ManagedClusterPodIdentityProvisioningStateAssigned), - string(ManagedClusterPodIdentityProvisioningStateCanceled), - string(ManagedClusterPodIdentityProvisioningStateDeleting), - string(ManagedClusterPodIdentityProvisioningStateFailed), - string(ManagedClusterPodIdentityProvisioningStateSucceeded), - string(ManagedClusterPodIdentityProvisioningStateUpdating), - } -} - -func (s *ManagedClusterPodIdentityProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseManagedClusterPodIdentityProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseManagedClusterPodIdentityProvisioningState(input string) (*ManagedClusterPodIdentityProvisioningState, error) { - vals := map[string]ManagedClusterPodIdentityProvisioningState{ - "assigned": ManagedClusterPodIdentityProvisioningStateAssigned, - "canceled": ManagedClusterPodIdentityProvisioningStateCanceled, - "deleting": ManagedClusterPodIdentityProvisioningStateDeleting, - "failed": ManagedClusterPodIdentityProvisioningStateFailed, - "succeeded": ManagedClusterPodIdentityProvisioningStateSucceeded, - "updating": ManagedClusterPodIdentityProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ManagedClusterPodIdentityProvisioningState(input) - return &out, nil -} - -type ManagedClusterSKUName string - -const ( - ManagedClusterSKUNameBase ManagedClusterSKUName = "Base" -) - -func PossibleValuesForManagedClusterSKUName() []string { - return []string{ - string(ManagedClusterSKUNameBase), - } -} - -func (s *ManagedClusterSKUName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseManagedClusterSKUName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseManagedClusterSKUName(input string) (*ManagedClusterSKUName, error) { - vals := map[string]ManagedClusterSKUName{ - "base": ManagedClusterSKUNameBase, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ManagedClusterSKUName(input) - return &out, nil -} - -type ManagedClusterSKUTier string - -const ( - ManagedClusterSKUTierFree ManagedClusterSKUTier = "Free" - ManagedClusterSKUTierPremium ManagedClusterSKUTier = "Premium" - ManagedClusterSKUTierStandard ManagedClusterSKUTier = "Standard" -) - -func PossibleValuesForManagedClusterSKUTier() []string { - return []string{ - string(ManagedClusterSKUTierFree), - string(ManagedClusterSKUTierPremium), - string(ManagedClusterSKUTierStandard), - } -} - -func (s *ManagedClusterSKUTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseManagedClusterSKUTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseManagedClusterSKUTier(input string) (*ManagedClusterSKUTier, error) { - vals := map[string]ManagedClusterSKUTier{ - "free": ManagedClusterSKUTierFree, - "premium": ManagedClusterSKUTierPremium, - "standard": ManagedClusterSKUTierStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ManagedClusterSKUTier(input) - return &out, nil -} - -type Mode string - -const ( - ModeIPTABLES Mode = "IPTABLES" - ModeIPVS Mode = "IPVS" -) - -func PossibleValuesForMode() []string { - return []string{ - string(ModeIPTABLES), - string(ModeIPVS), - } -} - -func (s *Mode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMode(input string) (*Mode, error) { - vals := map[string]Mode{ - "iptables": ModeIPTABLES, - "ipvs": ModeIPVS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Mode(input) - return &out, nil -} - -type NetworkDataplane string - -const ( - NetworkDataplaneAzure NetworkDataplane = "azure" - NetworkDataplaneCilium NetworkDataplane = "cilium" -) - -func PossibleValuesForNetworkDataplane() []string { - return []string{ - string(NetworkDataplaneAzure), - string(NetworkDataplaneCilium), - } -} - -func (s *NetworkDataplane) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkDataplane(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkDataplane(input string) (*NetworkDataplane, error) { - vals := map[string]NetworkDataplane{ - "azure": NetworkDataplaneAzure, - "cilium": NetworkDataplaneCilium, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkDataplane(input) - return &out, nil -} - -type NetworkMode string - -const ( - NetworkModeBridge NetworkMode = "bridge" - NetworkModeTransparent NetworkMode = "transparent" -) - -func PossibleValuesForNetworkMode() []string { - return []string{ - string(NetworkModeBridge), - string(NetworkModeTransparent), - } -} - -func (s *NetworkMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkMode(input string) (*NetworkMode, error) { - vals := map[string]NetworkMode{ - "bridge": NetworkModeBridge, - "transparent": NetworkModeTransparent, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkMode(input) - return &out, nil -} - -type NetworkPlugin string - -const ( - NetworkPluginAzure NetworkPlugin = "azure" - NetworkPluginKubenet NetworkPlugin = "kubenet" - NetworkPluginNone NetworkPlugin = "none" -) - -func PossibleValuesForNetworkPlugin() []string { - return []string{ - string(NetworkPluginAzure), - string(NetworkPluginKubenet), - string(NetworkPluginNone), - } -} - -func (s *NetworkPlugin) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkPlugin(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkPlugin(input string) (*NetworkPlugin, error) { - vals := map[string]NetworkPlugin{ - "azure": NetworkPluginAzure, - "kubenet": NetworkPluginKubenet, - "none": NetworkPluginNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkPlugin(input) - return &out, nil -} - -type NetworkPluginMode string - -const ( - NetworkPluginModeOverlay NetworkPluginMode = "overlay" -) - -func PossibleValuesForNetworkPluginMode() []string { - return []string{ - string(NetworkPluginModeOverlay), - } -} - -func (s *NetworkPluginMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkPluginMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkPluginMode(input string) (*NetworkPluginMode, error) { - vals := map[string]NetworkPluginMode{ - "overlay": NetworkPluginModeOverlay, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkPluginMode(input) - return &out, nil -} - -type NetworkPolicy string - -const ( - NetworkPolicyAzure NetworkPolicy = "azure" - NetworkPolicyCalico NetworkPolicy = "calico" - NetworkPolicyCilium NetworkPolicy = "cilium" - NetworkPolicyNone NetworkPolicy = "none" -) - -func PossibleValuesForNetworkPolicy() []string { - return []string{ - string(NetworkPolicyAzure), - string(NetworkPolicyCalico), - string(NetworkPolicyCilium), - string(NetworkPolicyNone), - } -} - -func (s *NetworkPolicy) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkPolicy(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkPolicy(input string) (*NetworkPolicy, error) { - vals := map[string]NetworkPolicy{ - "azure": NetworkPolicyAzure, - "calico": NetworkPolicyCalico, - "cilium": NetworkPolicyCilium, - "none": NetworkPolicyNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkPolicy(input) - return &out, nil -} - -type NodeOSUpgradeChannel string - -const ( - NodeOSUpgradeChannelNodeImage NodeOSUpgradeChannel = "NodeImage" - NodeOSUpgradeChannelNone NodeOSUpgradeChannel = "None" - NodeOSUpgradeChannelSecurityPatch NodeOSUpgradeChannel = "SecurityPatch" - NodeOSUpgradeChannelUnmanaged NodeOSUpgradeChannel = "Unmanaged" -) - -func PossibleValuesForNodeOSUpgradeChannel() []string { - return []string{ - string(NodeOSUpgradeChannelNodeImage), - string(NodeOSUpgradeChannelNone), - string(NodeOSUpgradeChannelSecurityPatch), - string(NodeOSUpgradeChannelUnmanaged), - } -} - -func (s *NodeOSUpgradeChannel) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNodeOSUpgradeChannel(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNodeOSUpgradeChannel(input string) (*NodeOSUpgradeChannel, error) { - vals := map[string]NodeOSUpgradeChannel{ - "nodeimage": NodeOSUpgradeChannelNodeImage, - "none": NodeOSUpgradeChannelNone, - "securitypatch": NodeOSUpgradeChannelSecurityPatch, - "unmanaged": NodeOSUpgradeChannelUnmanaged, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NodeOSUpgradeChannel(input) - return &out, nil -} - -type NodeProvisioningMode string - -const ( - NodeProvisioningModeAuto NodeProvisioningMode = "Auto" - NodeProvisioningModeManual NodeProvisioningMode = "Manual" -) - -func PossibleValuesForNodeProvisioningMode() []string { - return []string{ - string(NodeProvisioningModeAuto), - string(NodeProvisioningModeManual), - } -} - -func (s *NodeProvisioningMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNodeProvisioningMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNodeProvisioningMode(input string) (*NodeProvisioningMode, error) { - vals := map[string]NodeProvisioningMode{ - "auto": NodeProvisioningModeAuto, - "manual": NodeProvisioningModeManual, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NodeProvisioningMode(input) - return &out, nil -} - -type OSDiskType string - -const ( - OSDiskTypeEphemeral OSDiskType = "Ephemeral" - OSDiskTypeManaged OSDiskType = "Managed" -) - -func PossibleValuesForOSDiskType() []string { - return []string{ - string(OSDiskTypeEphemeral), - string(OSDiskTypeManaged), - } -} - -func (s *OSDiskType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOSDiskType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOSDiskType(input string) (*OSDiskType, error) { - vals := map[string]OSDiskType{ - "ephemeral": OSDiskTypeEphemeral, - "managed": OSDiskTypeManaged, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OSDiskType(input) - return &out, nil -} - -type OSSKU string - -const ( - OSSKUAzureLinux OSSKU = "AzureLinux" - OSSKUCBLMariner OSSKU = "CBLMariner" - OSSKUMariner OSSKU = "Mariner" - OSSKUUbuntu OSSKU = "Ubuntu" - OSSKUWindowsAnnual OSSKU = "WindowsAnnual" - OSSKUWindowsTwoZeroOneNine OSSKU = "Windows2019" - OSSKUWindowsTwoZeroTwoTwo OSSKU = "Windows2022" -) - -func PossibleValuesForOSSKU() []string { - return []string{ - string(OSSKUAzureLinux), - string(OSSKUCBLMariner), - string(OSSKUMariner), - string(OSSKUUbuntu), - string(OSSKUWindowsAnnual), - string(OSSKUWindowsTwoZeroOneNine), - string(OSSKUWindowsTwoZeroTwoTwo), - } -} - -func (s *OSSKU) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOSSKU(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOSSKU(input string) (*OSSKU, error) { - vals := map[string]OSSKU{ - "azurelinux": OSSKUAzureLinux, - "cblmariner": OSSKUCBLMariner, - "mariner": OSSKUMariner, - "ubuntu": OSSKUUbuntu, - "windowsannual": OSSKUWindowsAnnual, - "windows2019": OSSKUWindowsTwoZeroOneNine, - "windows2022": OSSKUWindowsTwoZeroTwoTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OSSKU(input) - return &out, nil -} - -type OSType string - -const ( - OSTypeLinux OSType = "Linux" - OSTypeWindows OSType = "Windows" -) - -func PossibleValuesForOSType() []string { - return []string{ - string(OSTypeLinux), - string(OSTypeWindows), - } -} - -func (s *OSType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOSType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOSType(input string) (*OSType, error) { - vals := map[string]OSType{ - "linux": OSTypeLinux, - "windows": OSTypeWindows, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OSType(input) - return &out, nil -} - -type OutboundType string - -const ( - OutboundTypeLoadBalancer OutboundType = "loadBalancer" - OutboundTypeManagedNATGateway OutboundType = "managedNATGateway" - OutboundTypeUserAssignedNATGateway OutboundType = "userAssignedNATGateway" - OutboundTypeUserDefinedRouting OutboundType = "userDefinedRouting" -) - -func PossibleValuesForOutboundType() []string { - return []string{ - string(OutboundTypeLoadBalancer), - string(OutboundTypeManagedNATGateway), - string(OutboundTypeUserAssignedNATGateway), - string(OutboundTypeUserDefinedRouting), - } -} - -func (s *OutboundType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOutboundType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOutboundType(input string) (*OutboundType, error) { - vals := map[string]OutboundType{ - "loadbalancer": OutboundTypeLoadBalancer, - "managednatgateway": OutboundTypeManagedNATGateway, - "userassignednatgateway": OutboundTypeUserAssignedNATGateway, - "userdefinedrouting": OutboundTypeUserDefinedRouting, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OutboundType(input) - return &out, nil -} - -type Protocol string - -const ( - ProtocolTCP Protocol = "TCP" - ProtocolUDP Protocol = "UDP" -) - -func PossibleValuesForProtocol() []string { - return []string{ - string(ProtocolTCP), - string(ProtocolUDP), - } -} - -func (s *Protocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProtocol(input string) (*Protocol, error) { - vals := map[string]Protocol{ - "tcp": ProtocolTCP, - "udp": ProtocolUDP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Protocol(input) - return &out, nil -} - -type PublicNetworkAccess string - -const ( - PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" - PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" - PublicNetworkAccessSecuredByPerimeter PublicNetworkAccess = "SecuredByPerimeter" -) - -func PossibleValuesForPublicNetworkAccess() []string { - return []string{ - string(PublicNetworkAccessDisabled), - string(PublicNetworkAccessEnabled), - string(PublicNetworkAccessSecuredByPerimeter), - } -} - -func (s *PublicNetworkAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicNetworkAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicNetworkAccess(input string) (*PublicNetworkAccess, error) { - vals := map[string]PublicNetworkAccess{ - "disabled": PublicNetworkAccessDisabled, - "enabled": PublicNetworkAccessEnabled, - "securedbyperimeter": PublicNetworkAccessSecuredByPerimeter, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicNetworkAccess(input) - return &out, nil -} - -type RestrictionLevel string - -const ( - RestrictionLevelReadOnly RestrictionLevel = "ReadOnly" - RestrictionLevelUnrestricted RestrictionLevel = "Unrestricted" -) - -func PossibleValuesForRestrictionLevel() []string { - return []string{ - string(RestrictionLevelReadOnly), - string(RestrictionLevelUnrestricted), - } -} - -func (s *RestrictionLevel) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRestrictionLevel(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRestrictionLevel(input string) (*RestrictionLevel, error) { - vals := map[string]RestrictionLevel{ - "readonly": RestrictionLevelReadOnly, - "unrestricted": RestrictionLevelUnrestricted, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RestrictionLevel(input) - return &out, nil -} - -type ScaleDownMode string - -const ( - ScaleDownModeDeallocate ScaleDownMode = "Deallocate" - ScaleDownModeDelete ScaleDownMode = "Delete" -) - -func PossibleValuesForScaleDownMode() []string { - return []string{ - string(ScaleDownModeDeallocate), - string(ScaleDownModeDelete), - } -} - -func (s *ScaleDownMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseScaleDownMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseScaleDownMode(input string) (*ScaleDownMode, error) { - vals := map[string]ScaleDownMode{ - "deallocate": ScaleDownModeDeallocate, - "delete": ScaleDownModeDelete, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ScaleDownMode(input) - return &out, nil -} - -type ScaleSetEvictionPolicy string - -const ( - ScaleSetEvictionPolicyDeallocate ScaleSetEvictionPolicy = "Deallocate" - ScaleSetEvictionPolicyDelete ScaleSetEvictionPolicy = "Delete" -) - -func PossibleValuesForScaleSetEvictionPolicy() []string { - return []string{ - string(ScaleSetEvictionPolicyDeallocate), - string(ScaleSetEvictionPolicyDelete), - } -} - -func (s *ScaleSetEvictionPolicy) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseScaleSetEvictionPolicy(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseScaleSetEvictionPolicy(input string) (*ScaleSetEvictionPolicy, error) { - vals := map[string]ScaleSetEvictionPolicy{ - "deallocate": ScaleSetEvictionPolicyDeallocate, - "delete": ScaleSetEvictionPolicyDelete, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ScaleSetEvictionPolicy(input) - return &out, nil -} - -type ScaleSetPriority string - -const ( - ScaleSetPriorityRegular ScaleSetPriority = "Regular" - ScaleSetPrioritySpot ScaleSetPriority = "Spot" -) - -func PossibleValuesForScaleSetPriority() []string { - return []string{ - string(ScaleSetPriorityRegular), - string(ScaleSetPrioritySpot), - } -} - -func (s *ScaleSetPriority) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseScaleSetPriority(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseScaleSetPriority(input string) (*ScaleSetPriority, error) { - vals := map[string]ScaleSetPriority{ - "regular": ScaleSetPriorityRegular, - "spot": ScaleSetPrioritySpot, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ScaleSetPriority(input) - return &out, nil -} - -type ServiceMeshMode string - -const ( - ServiceMeshModeDisabled ServiceMeshMode = "Disabled" - ServiceMeshModeIstio ServiceMeshMode = "Istio" -) - -func PossibleValuesForServiceMeshMode() []string { - return []string{ - string(ServiceMeshModeDisabled), - string(ServiceMeshModeIstio), - } -} - -func (s *ServiceMeshMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseServiceMeshMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseServiceMeshMode(input string) (*ServiceMeshMode, error) { - vals := map[string]ServiceMeshMode{ - "disabled": ServiceMeshModeDisabled, - "istio": ServiceMeshModeIstio, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ServiceMeshMode(input) - return &out, nil -} - -type UpgradeChannel string - -const ( - UpgradeChannelNodeNegativeimage UpgradeChannel = "node-image" - UpgradeChannelNone UpgradeChannel = "none" - UpgradeChannelPatch UpgradeChannel = "patch" - UpgradeChannelRapid UpgradeChannel = "rapid" - UpgradeChannelStable UpgradeChannel = "stable" -) - -func PossibleValuesForUpgradeChannel() []string { - return []string{ - string(UpgradeChannelNodeNegativeimage), - string(UpgradeChannelNone), - string(UpgradeChannelPatch), - string(UpgradeChannelRapid), - string(UpgradeChannelStable), - } -} - -func (s *UpgradeChannel) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseUpgradeChannel(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseUpgradeChannel(input string) (*UpgradeChannel, error) { - vals := map[string]UpgradeChannel{ - "node-image": UpgradeChannelNodeNegativeimage, - "none": UpgradeChannelNone, - "patch": UpgradeChannelPatch, - "rapid": UpgradeChannelRapid, - "stable": UpgradeChannelStable, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := UpgradeChannel(input) - return &out, nil -} - -type WorkloadRuntime string - -const ( - WorkloadRuntimeKataMshvVMIsolation WorkloadRuntime = "KataMshvVmIsolation" - WorkloadRuntimeOCIContainer WorkloadRuntime = "OCIContainer" - WorkloadRuntimeWasmWasi WorkloadRuntime = "WasmWasi" -) - -func PossibleValuesForWorkloadRuntime() []string { - return []string{ - string(WorkloadRuntimeKataMshvVMIsolation), - string(WorkloadRuntimeOCIContainer), - string(WorkloadRuntimeWasmWasi), - } -} - -func (s *WorkloadRuntime) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWorkloadRuntime(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWorkloadRuntime(input string) (*WorkloadRuntime, error) { - vals := map[string]WorkloadRuntime{ - "katamshvvmisolation": WorkloadRuntimeKataMshvVMIsolation, - "ocicontainer": WorkloadRuntimeOCIContainer, - "wasmwasi": WorkloadRuntimeWasmWasi, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WorkloadRuntime(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_guardrailsversion.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_guardrailsversion.go deleted file mode 100644 index 893637a2d7abc..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_guardrailsversion.go +++ /dev/null @@ -1,130 +0,0 @@ -package managedclusters - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&GuardrailsVersionId{}) -} - -var _ resourceids.ResourceId = &GuardrailsVersionId{} - -// GuardrailsVersionId is a struct representing the Resource ID for a Guardrails Version -type GuardrailsVersionId struct { - SubscriptionId string - LocationName string - GuardrailsVersionName string -} - -// NewGuardrailsVersionID returns a new GuardrailsVersionId struct -func NewGuardrailsVersionID(subscriptionId string, locationName string, guardrailsVersionName string) GuardrailsVersionId { - return GuardrailsVersionId{ - SubscriptionId: subscriptionId, - LocationName: locationName, - GuardrailsVersionName: guardrailsVersionName, - } -} - -// ParseGuardrailsVersionID parses 'input' into a GuardrailsVersionId -func ParseGuardrailsVersionID(input string) (*GuardrailsVersionId, error) { - parser := resourceids.NewParserFromResourceIdType(&GuardrailsVersionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := GuardrailsVersionId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseGuardrailsVersionIDInsensitively parses 'input' case-insensitively into a GuardrailsVersionId -// note: this method should only be used for API response data and not user input -func ParseGuardrailsVersionIDInsensitively(input string) (*GuardrailsVersionId, error) { - parser := resourceids.NewParserFromResourceIdType(&GuardrailsVersionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := GuardrailsVersionId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *GuardrailsVersionId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.LocationName, ok = input.Parsed["locationName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) - } - - if id.GuardrailsVersionName, ok = input.Parsed["guardrailsVersionName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "guardrailsVersionName", input) - } - - return nil -} - -// ValidateGuardrailsVersionID checks that 'input' can be parsed as a Guardrails Version ID -func ValidateGuardrailsVersionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseGuardrailsVersionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Guardrails Version ID -func (id GuardrailsVersionId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.ContainerService/locations/%s/guardrailsVersions/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName, id.GuardrailsVersionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Guardrails Version ID -func (id GuardrailsVersionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftContainerService", "Microsoft.ContainerService", "Microsoft.ContainerService"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - resourceids.StaticSegment("staticGuardrailsVersions", "guardrailsVersions", "guardrailsVersions"), - resourceids.UserSpecifiedSegment("guardrailsVersionName", "guardrailsVersionValue"), - } -} - -// String returns a human-readable description of this Guardrails Version ID -func (id GuardrailsVersionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - fmt.Sprintf("Guardrails Version Name: %q", id.GuardrailsVersionName), - } - return fmt.Sprintf("Guardrails Version (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_delete.go deleted file mode 100644 index d7cee216475a9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_delete.go +++ /dev/null @@ -1,99 +0,0 @@ -package managedclusters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type DeleteOperationOptions struct { - IgnorePodDisruptionBudget *bool -} - -func DefaultDeleteOperationOptions() DeleteOperationOptions { - return DeleteOperationOptions{} -} - -func (o DeleteOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o DeleteOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o DeleteOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.IgnorePodDisruptionBudget != nil { - out.Append("ignore-pod-disruption-budget", fmt.Sprintf("%v", *o.IgnorePodDisruptionBudget)) - } - return &out -} - -// Delete ... -func (c ManagedClustersClient) Delete(ctx context.Context, id commonids.KubernetesClusterId, options DeleteOperationOptions) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - }, - HttpMethod: http.MethodDelete, - OptionsObject: options, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ManagedClustersClient) DeleteThenPoll(ctx context.Context, id commonids.KubernetesClusterId, options DeleteOperationOptions) error { - result, err := c.Delete(ctx, id, options) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getguardrailsversions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getguardrailsversions.go deleted file mode 100644 index fbd1c0ce6c34b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getguardrailsversions.go +++ /dev/null @@ -1,54 +0,0 @@ -package managedclusters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetGuardrailsVersionsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *GuardrailsAvailableVersion -} - -// GetGuardrailsVersions ... -func (c ManagedClustersClient) GetGuardrailsVersions(ctx context.Context, id GuardrailsVersionId) (result GetGuardrailsVersionsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model GuardrailsAvailableVersion - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getosoptions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getosoptions.go deleted file mode 100644 index f255b25649c21..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getosoptions.go +++ /dev/null @@ -1,83 +0,0 @@ -package managedclusters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOSOptionsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *OSOptionProfile -} - -type GetOSOptionsOperationOptions struct { - ResourceType *string -} - -func DefaultGetOSOptionsOperationOptions() GetOSOptionsOperationOptions { - return GetOSOptionsOperationOptions{} -} - -func (o GetOSOptionsOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOSOptionsOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOSOptionsOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.ResourceType != nil { - out.Append("resource-type", fmt.Sprintf("%v", *o.ResourceType)) - } - return &out -} - -// GetOSOptions ... -func (c ManagedClustersClient) GetOSOptions(ctx context.Context, id LocationId, options GetOSOptionsOperationOptions) (result GetOSOptionsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - OptionsObject: options, - Path: fmt.Sprintf("%s/osOptions/default", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model OSOptionProfile - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listguardrailsversions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listguardrailsversions.go deleted file mode 100644 index 62283580a6ce8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listguardrailsversions.go +++ /dev/null @@ -1,105 +0,0 @@ -package managedclusters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListGuardrailsVersionsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]GuardrailsAvailableVersion -} - -type ListGuardrailsVersionsCompleteResult struct { - LatestHttpResponse *http.Response - Items []GuardrailsAvailableVersion -} - -type ListGuardrailsVersionsCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListGuardrailsVersionsCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListGuardrailsVersions ... -func (c ManagedClustersClient) ListGuardrailsVersions(ctx context.Context, id LocationId) (result ListGuardrailsVersionsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListGuardrailsVersionsCustomPager{}, - Path: fmt.Sprintf("%s/guardrailsVersions", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]GuardrailsAvailableVersion `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListGuardrailsVersionsComplete retrieves all the results into a single object -func (c ManagedClustersClient) ListGuardrailsVersionsComplete(ctx context.Context, id LocationId) (ListGuardrailsVersionsCompleteResult, error) { - return c.ListGuardrailsVersionsCompleteMatchingPredicate(ctx, id, GuardrailsAvailableVersionOperationPredicate{}) -} - -// ListGuardrailsVersionsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ManagedClustersClient) ListGuardrailsVersionsCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate GuardrailsAvailableVersionOperationPredicate) (result ListGuardrailsVersionsCompleteResult, err error) { - items := make([]GuardrailsAvailableVersion, 0) - - resp, err := c.ListGuardrailsVersions(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListGuardrailsVersionsCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_agentpoolartifactstreamingprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_agentpoolartifactstreamingprofile.go deleted file mode 100644 index df1c8baccfcbd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_agentpoolartifactstreamingprofile.go +++ /dev/null @@ -1,8 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AgentPoolArtifactStreamingProfile struct { - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_agentpoolgpuprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_agentpoolgpuprofile.go deleted file mode 100644 index 16f4747078f06..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_agentpoolgpuprofile.go +++ /dev/null @@ -1,8 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AgentPoolGPUProfile struct { - InstallGPUDriver *bool `json:"installGPUDriver,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_agentpoolsecurityprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_agentpoolsecurityprofile.go deleted file mode 100644 index 6b9b91c598d9f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_agentpoolsecurityprofile.go +++ /dev/null @@ -1,8 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AgentPoolSecurityProfile struct { - SshAccess *AgentPoolSSHAccess `json:"sshAccess,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_containerservicenetworkprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_containerservicenetworkprofile.go deleted file mode 100644 index b3a95c866098e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_containerservicenetworkprofile.go +++ /dev/null @@ -1,24 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContainerServiceNetworkProfile struct { - DnsServiceIP *string `json:"dnsServiceIP,omitempty"` - IPFamilies *[]IPFamily `json:"ipFamilies,omitempty"` - KubeProxyConfig *ContainerServiceNetworkProfileKubeProxyConfig `json:"kubeProxyConfig,omitempty"` - LoadBalancerProfile *ManagedClusterLoadBalancerProfile `json:"loadBalancerProfile,omitempty"` - LoadBalancerSku *LoadBalancerSku `json:"loadBalancerSku,omitempty"` - Monitoring *NetworkMonitoring `json:"monitoring,omitempty"` - NatGatewayProfile *ManagedClusterNATGatewayProfile `json:"natGatewayProfile,omitempty"` - NetworkDataplane *NetworkDataplane `json:"networkDataplane,omitempty"` - NetworkMode *NetworkMode `json:"networkMode,omitempty"` - NetworkPlugin *NetworkPlugin `json:"networkPlugin,omitempty"` - NetworkPluginMode *NetworkPluginMode `json:"networkPluginMode,omitempty"` - NetworkPolicy *NetworkPolicy `json:"networkPolicy,omitempty"` - OutboundType *OutboundType `json:"outboundType,omitempty"` - PodCidr *string `json:"podCidr,omitempty"` - PodCidrs *[]string `json:"podCidrs,omitempty"` - ServiceCidr *string `json:"serviceCidr,omitempty"` - ServiceCidrs *[]string `json:"serviceCidrs,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_containerservicenetworkprofilekubeproxyconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_containerservicenetworkprofilekubeproxyconfig.go deleted file mode 100644 index 5be387f7c407f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_containerservicenetworkprofilekubeproxyconfig.go +++ /dev/null @@ -1,10 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContainerServiceNetworkProfileKubeProxyConfig struct { - Enabled *bool `json:"enabled,omitempty"` - IPvsConfig *ContainerServiceNetworkProfileKubeProxyConfigIPvsConfig `json:"ipvsConfig,omitempty"` - Mode *Mode `json:"mode,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_containerservicenetworkprofilekubeproxyconfigipvsconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_containerservicenetworkprofilekubeproxyconfigipvsconfig.go deleted file mode 100644 index 96dc155e9d5cb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_containerservicenetworkprofilekubeproxyconfigipvsconfig.go +++ /dev/null @@ -1,11 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContainerServiceNetworkProfileKubeProxyConfigIPvsConfig struct { - Scheduler *IPvsScheduler `json:"scheduler,omitempty"` - TcpFinTimeoutSeconds *int64 `json:"tcpFinTimeoutSeconds,omitempty"` - TcpTimeoutSeconds *int64 `json:"tcpTimeoutSeconds,omitempty"` - UdpTimeoutSeconds *int64 `json:"udpTimeoutSeconds,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_guardrailsavailableversion.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_guardrailsavailableversion.go deleted file mode 100644 index 4018995479094..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_guardrailsavailableversion.go +++ /dev/null @@ -1,16 +0,0 @@ -package managedclusters - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GuardrailsAvailableVersion struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties GuardrailsAvailableVersionsProperties `json:"properties"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_guardrailsavailableversionsproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_guardrailsavailableversionsproperties.go deleted file mode 100644 index a029efaee5666..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_guardrailsavailableversionsproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GuardrailsAvailableVersionsProperties struct { - IsDefaultVersion *bool `json:"isDefaultVersion,omitempty"` - Support *GuardrailsSupport `json:"support,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_guardrailsprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_guardrailsprofile.go deleted file mode 100644 index 84c6c832975fc..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_guardrailsprofile.go +++ /dev/null @@ -1,11 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GuardrailsProfile struct { - ExcludedNamespaces *[]string `json:"excludedNamespaces,omitempty"` - Level Level `json:"level"` - SystemExcludedNamespaces *[]string `json:"systemExcludedNamespaces,omitempty"` - Version *string `json:"version,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_istioegressgateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_istioegressgateway.go deleted file mode 100644 index 5af1bad7023c6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_istioegressgateway.go +++ /dev/null @@ -1,9 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IstioEgressGateway struct { - Enabled bool `json:"enabled"` - NodeSelector *map[string]string `json:"nodeSelector,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusteragentpoolprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusteragentpoolprofile.go deleted file mode 100644 index ec63425385020..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusteragentpoolprofile.go +++ /dev/null @@ -1,61 +0,0 @@ -package managedclusters - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedClusterAgentPoolProfile struct { - ArtifactStreamingProfile *AgentPoolArtifactStreamingProfile `json:"artifactStreamingProfile,omitempty"` - AvailabilityZones *zones.Schema `json:"availabilityZones,omitempty"` - CapacityReservationGroupID *string `json:"capacityReservationGroupID,omitempty"` - Count *int64 `json:"count,omitempty"` - CreationData *CreationData `json:"creationData,omitempty"` - CurrentOrchestratorVersion *string `json:"currentOrchestratorVersion,omitempty"` - EnableAutoScaling *bool `json:"enableAutoScaling,omitempty"` - EnableCustomCATrust *bool `json:"enableCustomCATrust,omitempty"` - EnableEncryptionAtHost *bool `json:"enableEncryptionAtHost,omitempty"` - EnableFIPS *bool `json:"enableFIPS,omitempty"` - EnableNodePublicIP *bool `json:"enableNodePublicIP,omitempty"` - EnableUltraSSD *bool `json:"enableUltraSSD,omitempty"` - GpuInstanceProfile *GPUInstanceProfile `json:"gpuInstanceProfile,omitempty"` - GpuProfile *AgentPoolGPUProfile `json:"gpuProfile,omitempty"` - HostGroupID *string `json:"hostGroupID,omitempty"` - KubeletConfig *KubeletConfig `json:"kubeletConfig,omitempty"` - KubeletDiskType *KubeletDiskType `json:"kubeletDiskType,omitempty"` - LinuxOSConfig *LinuxOSConfig `json:"linuxOSConfig,omitempty"` - MaxCount *int64 `json:"maxCount,omitempty"` - MaxPods *int64 `json:"maxPods,omitempty"` - MessageOfTheDay *string `json:"messageOfTheDay,omitempty"` - MinCount *int64 `json:"minCount,omitempty"` - Mode *AgentPoolMode `json:"mode,omitempty"` - Name string `json:"name"` - NetworkProfile *AgentPoolNetworkProfile `json:"networkProfile,omitempty"` - NodeImageVersion *string `json:"nodeImageVersion,omitempty"` - NodeLabels *map[string]string `json:"nodeLabels,omitempty"` - NodePublicIPPrefixID *string `json:"nodePublicIPPrefixID,omitempty"` - NodeTaints *[]string `json:"nodeTaints,omitempty"` - OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` - OsDiskSizeGB *int64 `json:"osDiskSizeGB,omitempty"` - OsDiskType *OSDiskType `json:"osDiskType,omitempty"` - OsSKU *OSSKU `json:"osSKU,omitempty"` - OsType *OSType `json:"osType,omitempty"` - PodSubnetID *string `json:"podSubnetID,omitempty"` - PowerState *PowerState `json:"powerState,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` - ProximityPlacementGroupID *string `json:"proximityPlacementGroupID,omitempty"` - ScaleDownMode *ScaleDownMode `json:"scaleDownMode,omitempty"` - ScaleSetEvictionPolicy *ScaleSetEvictionPolicy `json:"scaleSetEvictionPolicy,omitempty"` - ScaleSetPriority *ScaleSetPriority `json:"scaleSetPriority,omitempty"` - SecurityProfile *AgentPoolSecurityProfile `json:"securityProfile,omitempty"` - SpotMaxPrice *float64 `json:"spotMaxPrice,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *AgentPoolType `json:"type,omitempty"` - UpgradeSettings *AgentPoolUpgradeSettings `json:"upgradeSettings,omitempty"` - VMSize *string `json:"vmSize,omitempty"` - VnetSubnetID *string `json:"vnetSubnetID,omitempty"` - WindowsProfile *AgentPoolWindowsProfile `json:"windowsProfile,omitempty"` - WorkloadRuntime *WorkloadRuntime `json:"workloadRuntime,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusteraitoolchainoperatorprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusteraitoolchainoperatorprofile.go deleted file mode 100644 index 0c2d87296e0e3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusteraitoolchainoperatorprofile.go +++ /dev/null @@ -1,8 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedClusterAIToolchainOperatorProfile struct { - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterazuremonitorprofileappmonitoring.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterazuremonitorprofileappmonitoring.go deleted file mode 100644 index bc58d221f1068..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterazuremonitorprofileappmonitoring.go +++ /dev/null @@ -1,8 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedClusterAzureMonitorProfileAppMonitoring struct { - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterazuremonitorprofileappmonitoringopentelemetrymetrics.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterazuremonitorprofileappmonitoringopentelemetrymetrics.go deleted file mode 100644 index 7bdb0e74e3ee1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterazuremonitorprofileappmonitoringopentelemetrymetrics.go +++ /dev/null @@ -1,8 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics struct { - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterazuremonitorprofilecontainerinsights.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterazuremonitorprofilecontainerinsights.go deleted file mode 100644 index 72da87a462c35..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterazuremonitorprofilecontainerinsights.go +++ /dev/null @@ -1,10 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedClusterAzureMonitorProfileContainerInsights struct { - Enabled *bool `json:"enabled,omitempty"` - LogAnalyticsWorkspaceResourceId *string `json:"logAnalyticsWorkspaceResourceId,omitempty"` - WindowsHostLogs *ManagedClusterAzureMonitorProfileWindowsHostLogs `json:"windowsHostLogs,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterazuremonitorprofilelogs.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterazuremonitorprofilelogs.go deleted file mode 100644 index a17a247e9c79d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterazuremonitorprofilelogs.go +++ /dev/null @@ -1,9 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedClusterAzureMonitorProfileLogs struct { - AppMonitoring *ManagedClusterAzureMonitorProfileAppMonitoring `json:"appMonitoring,omitempty"` - ContainerInsights *ManagedClusterAzureMonitorProfileContainerInsights `json:"containerInsights,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterazuremonitorprofilemetrics.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterazuremonitorprofilemetrics.go deleted file mode 100644 index b1ea081f91542..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterazuremonitorprofilemetrics.go +++ /dev/null @@ -1,10 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedClusterAzureMonitorProfileMetrics struct { - AppMonitoringOpenTelemetryMetrics *ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics `json:"appMonitoringOpenTelemetryMetrics,omitempty"` - Enabled bool `json:"enabled"` - KubeStateMetrics *ManagedClusterAzureMonitorProfileKubeStateMetrics `json:"kubeStateMetrics,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterazuremonitorprofilewindowshostlogs.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterazuremonitorprofilewindowshostlogs.go deleted file mode 100644 index cc9edfc6a6f5d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterazuremonitorprofilewindowshostlogs.go +++ /dev/null @@ -1,8 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedClusterAzureMonitorProfileWindowsHostLogs struct { - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterhttpproxyconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterhttpproxyconfig.go deleted file mode 100644 index b9f4678538768..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterhttpproxyconfig.go +++ /dev/null @@ -1,12 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedClusterHTTPProxyConfig struct { - EffectiveNoProxy *[]string `json:"effectiveNoProxy,omitempty"` - HTTPProxy *string `json:"httpProxy,omitempty"` - HTTPSProxy *string `json:"httpsProxy,omitempty"` - NoProxy *[]string `json:"noProxy,omitempty"` - TrustedCa *string `json:"trustedCa,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusternodeprovisioningprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusternodeprovisioningprofile.go deleted file mode 100644 index 6560753a94c9d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusternodeprovisioningprofile.go +++ /dev/null @@ -1,8 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedClusterNodeProvisioningProfile struct { - Mode *NodeProvisioningMode `json:"mode,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusternoderesourcegroupprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusternoderesourcegroupprofile.go deleted file mode 100644 index 1ae3147c26720..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusternoderesourcegroupprofile.go +++ /dev/null @@ -1,8 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedClusterNodeResourceGroupProfile struct { - RestrictionLevel *RestrictionLevel `json:"restrictionLevel,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterproperties.go deleted file mode 100644 index 9ea44adf4db0a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterproperties.go +++ /dev/null @@ -1,54 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedClusterProperties struct { - AadProfile *ManagedClusterAADProfile `json:"aadProfile,omitempty"` - AddonProfiles *map[string]ManagedClusterAddonProfile `json:"addonProfiles,omitempty"` - AgentPoolProfiles *[]ManagedClusterAgentPoolProfile `json:"agentPoolProfiles,omitempty"` - AiToolchainOperatorProfile *ManagedClusterAIToolchainOperatorProfile `json:"aiToolchainOperatorProfile,omitempty"` - ApiServerAccessProfile *ManagedClusterAPIServerAccessProfile `json:"apiServerAccessProfile,omitempty"` - AutoScalerProfile *ManagedClusterPropertiesAutoScalerProfile `json:"autoScalerProfile,omitempty"` - AutoUpgradeProfile *ManagedClusterAutoUpgradeProfile `json:"autoUpgradeProfile,omitempty"` - AzureMonitorProfile *ManagedClusterAzureMonitorProfile `json:"azureMonitorProfile,omitempty"` - AzurePortalFQDN *string `json:"azurePortalFQDN,omitempty"` - CreationData *CreationData `json:"creationData,omitempty"` - CurrentKubernetesVersion *string `json:"currentKubernetesVersion,omitempty"` - DisableLocalAccounts *bool `json:"disableLocalAccounts,omitempty"` - DiskEncryptionSetID *string `json:"diskEncryptionSetID,omitempty"` - DnsPrefix *string `json:"dnsPrefix,omitempty"` - EnableNamespaceResources *bool `json:"enableNamespaceResources,omitempty"` - EnablePodSecurityPolicy *bool `json:"enablePodSecurityPolicy,omitempty"` - EnableRBAC *bool `json:"enableRBAC,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - FqdnSubdomain *string `json:"fqdnSubdomain,omitempty"` - GuardrailsProfile *GuardrailsProfile `json:"guardrailsProfile,omitempty"` - HTTPProxyConfig *ManagedClusterHTTPProxyConfig `json:"httpProxyConfig,omitempty"` - IdentityProfile *map[string]UserAssignedIdentity `json:"identityProfile,omitempty"` - IngressProfile *ManagedClusterIngressProfile `json:"ingressProfile,omitempty"` - KubernetesVersion *string `json:"kubernetesVersion,omitempty"` - LinuxProfile *ContainerServiceLinuxProfile `json:"linuxProfile,omitempty"` - MaxAgentPools *int64 `json:"maxAgentPools,omitempty"` - MetricsProfile *ManagedClusterMetricsProfile `json:"metricsProfile,omitempty"` - NetworkProfile *ContainerServiceNetworkProfile `json:"networkProfile,omitempty"` - NodeProvisioningProfile *ManagedClusterNodeProvisioningProfile `json:"nodeProvisioningProfile,omitempty"` - NodeResourceGroup *string `json:"nodeResourceGroup,omitempty"` - NodeResourceGroupProfile *ManagedClusterNodeResourceGroupProfile `json:"nodeResourceGroupProfile,omitempty"` - OidcIssuerProfile *ManagedClusterOIDCIssuerProfile `json:"oidcIssuerProfile,omitempty"` - PodIdentityProfile *ManagedClusterPodIdentityProfile `json:"podIdentityProfile,omitempty"` - PowerState *PowerState `json:"powerState,omitempty"` - PrivateFQDN *string `json:"privateFQDN,omitempty"` - PrivateLinkResources *[]PrivateLinkResource `json:"privateLinkResources,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` - PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` - ResourceUID *string `json:"resourceUID,omitempty"` - SecurityProfile *ManagedClusterSecurityProfile `json:"securityProfile,omitempty"` - ServiceMeshProfile *ServiceMeshProfile `json:"serviceMeshProfile,omitempty"` - ServicePrincipalProfile *ManagedClusterServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"` - StorageProfile *ManagedClusterStorageProfile `json:"storageProfile,omitempty"` - SupportPlan *KubernetesSupportPlan `json:"supportPlan,omitempty"` - UpgradeSettings *ClusterUpgradeSettings `json:"upgradeSettings,omitempty"` - WindowsProfile *ManagedClusterWindowsProfile `json:"windowsProfile,omitempty"` - WorkloadAutoScalerProfile *ManagedClusterWorkloadAutoScalerProfile `json:"workloadAutoScalerProfile,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterpropertiesautoscalerprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterpropertiesautoscalerprofile.go deleted file mode 100644 index d8387a1e222ca..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterpropertiesautoscalerprofile.go +++ /dev/null @@ -1,28 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedClusterPropertiesAutoScalerProfile struct { - BalanceSimilarNodeGroups *string `json:"balance-similar-node-groups,omitempty"` - DaemonsetEvictionForEmptyNodes *bool `json:"daemonset-eviction-for-empty-nodes,omitempty"` - DaemonsetEvictionForOccupiedNodes *bool `json:"daemonset-eviction-for-occupied-nodes,omitempty"` - Expander *Expander `json:"expander,omitempty"` - Expanders *[]Expander `json:"expanders,omitempty"` - IgnoreDaemonsetsUtilization *bool `json:"ignore-daemonsets-utilization,omitempty"` - MaxEmptyBulkDelete *string `json:"max-empty-bulk-delete,omitempty"` - MaxGracefulTerminationSec *string `json:"max-graceful-termination-sec,omitempty"` - MaxNodeProvisionTime *string `json:"max-node-provision-time,omitempty"` - MaxTotalUnreadyPercentage *string `json:"max-total-unready-percentage,omitempty"` - NewPodScaleUpDelay *string `json:"new-pod-scale-up-delay,omitempty"` - OkTotalUnreadyCount *string `json:"ok-total-unready-count,omitempty"` - ScaleDownDelayAfterAdd *string `json:"scale-down-delay-after-add,omitempty"` - ScaleDownDelayAfterDelete *string `json:"scale-down-delay-after-delete,omitempty"` - ScaleDownDelayAfterFailure *string `json:"scale-down-delay-after-failure,omitempty"` - ScaleDownUnneededTime *string `json:"scale-down-unneeded-time,omitempty"` - ScaleDownUnreadyTime *string `json:"scale-down-unready-time,omitempty"` - ScaleDownUtilizationThreshold *string `json:"scale-down-utilization-threshold,omitempty"` - ScanInterval *string `json:"scan-interval,omitempty"` - SkipNodesWithLocalStorage *string `json:"skip-nodes-with-local-storage,omitempty"` - SkipNodesWithSystemPods *string `json:"skip-nodes-with-system-pods,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclustersecurityprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclustersecurityprofile.go deleted file mode 100644 index 0f300661a38d2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclustersecurityprofile.go +++ /dev/null @@ -1,14 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedClusterSecurityProfile struct { - AzureKeyVaultKms *AzureKeyVaultKms `json:"azureKeyVaultKms,omitempty"` - CustomCATrustCertificates *[]string `json:"customCATrustCertificates,omitempty"` - Defender *ManagedClusterSecurityProfileDefender `json:"defender,omitempty"` - ImageCleaner *ManagedClusterSecurityProfileImageCleaner `json:"imageCleaner,omitempty"` - ImageIntegrity *ManagedClusterSecurityProfileImageIntegrity `json:"imageIntegrity,omitempty"` - NodeRestriction *ManagedClusterSecurityProfileNodeRestriction `json:"nodeRestriction,omitempty"` - WorkloadIdentity *ManagedClusterSecurityProfileWorkloadIdentity `json:"workloadIdentity,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclustersecurityprofileimageintegrity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclustersecurityprofileimageintegrity.go deleted file mode 100644 index 3ffd0d90c19d5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclustersecurityprofileimageintegrity.go +++ /dev/null @@ -1,8 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedClusterSecurityProfileImageIntegrity struct { - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclustersecurityprofilenoderestriction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclustersecurityprofilenoderestriction.go deleted file mode 100644 index 6730a946379fa..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclustersecurityprofilenoderestriction.go +++ /dev/null @@ -1,8 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedClusterSecurityProfileNodeRestriction struct { - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterstorageprofilediskcsidriver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterstorageprofilediskcsidriver.go deleted file mode 100644 index 5a12e13453f09..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterstorageprofilediskcsidriver.go +++ /dev/null @@ -1,9 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedClusterStorageProfileDiskCSIDriver struct { - Enabled *bool `json:"enabled,omitempty"` - Version *string `json:"version,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterworkloadautoscalerprofileverticalpodautoscaler.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterworkloadautoscalerprofileverticalpodautoscaler.go deleted file mode 100644 index fe3c0d577b0f1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterworkloadautoscalerprofileverticalpodautoscaler.go +++ /dev/null @@ -1,9 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler struct { - AddonAutoscaling *AddonAutoscaling `json:"addonAutoscaling,omitempty"` - Enabled bool `json:"enabled"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_networkmonitoring.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_networkmonitoring.go deleted file mode 100644 index aced77970f490..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_networkmonitoring.go +++ /dev/null @@ -1,8 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkMonitoring struct { - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_osoptionprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_osoptionprofile.go deleted file mode 100644 index 27b0bbc0c20cf..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_osoptionprofile.go +++ /dev/null @@ -1,11 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type OSOptionProfile struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties OSOptionPropertyList `json:"properties"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_osoptionproperty.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_osoptionproperty.go deleted file mode 100644 index 4c8a976ae2d21..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_osoptionproperty.go +++ /dev/null @@ -1,9 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type OSOptionProperty struct { - EnableFipsImage bool `json:"enable-fips-image"` - OsType string `json:"os-type"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_osoptionpropertylist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_osoptionpropertylist.go deleted file mode 100644 index 5c126250b2cd0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_osoptionpropertylist.go +++ /dev/null @@ -1,8 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type OSOptionPropertyList struct { - OsOptionPropertyList []OSOptionProperty `json:"osOptionPropertyList"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/predicates.go deleted file mode 100644 index c33b6adfd4512..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/predicates.go +++ /dev/null @@ -1,114 +0,0 @@ -package managedclusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GuardrailsAvailableVersionOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p GuardrailsAvailableVersionOperationPredicate) Matches(input GuardrailsAvailableVersion) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type ManagedClusterOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p ManagedClusterOperationPredicate) Matches(input ManagedCluster) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type MeshRevisionProfileOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p MeshRevisionProfileOperationPredicate) Matches(input MeshRevisionProfile) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type MeshUpgradeProfileOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p MeshUpgradeProfileOperationPredicate) Matches(input MeshUpgradeProfile) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type OutboundEnvironmentEndpointOperationPredicate struct { - Category *string -} - -func (p OutboundEnvironmentEndpointOperationPredicate) Matches(input OutboundEnvironmentEndpoint) bool { - - if p.Category != nil && (input.Category == nil || *p.Category != *input.Category) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/version.go deleted file mode 100644 index ffcad7e8ebb0e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package managedclusters - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2023-09-02-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedclusters/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/README.md deleted file mode 100644 index bed60a5f99956..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/README.md +++ /dev/null @@ -1,129 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots` Documentation - -The `snapshots` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-09-02-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots" -``` - - -### Client Initialization - -```go -client := snapshots.NewSnapshotsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `SnapshotsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := snapshots.NewSnapshotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "snapshotValue") - -payload := snapshots.Snapshot{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `SnapshotsClient.Delete` - -```go -ctx := context.TODO() -id := snapshots.NewSnapshotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "snapshotValue") - -read, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `SnapshotsClient.Get` - -```go -ctx := context.TODO() -id := snapshots.NewSnapshotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "snapshotValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `SnapshotsClient.List` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `SnapshotsClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `SnapshotsClient.UpdateTags` - -```go -ctx := context.TODO() -id := snapshots.NewSnapshotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "snapshotValue") - -payload := snapshots.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/constants.go deleted file mode 100644 index ea209bb677add..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/constants.go +++ /dev/null @@ -1,148 +0,0 @@ -package snapshots - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type OSSKU string - -const ( - OSSKUAzureLinux OSSKU = "AzureLinux" - OSSKUCBLMariner OSSKU = "CBLMariner" - OSSKUMariner OSSKU = "Mariner" - OSSKUUbuntu OSSKU = "Ubuntu" - OSSKUWindowsAnnual OSSKU = "WindowsAnnual" - OSSKUWindowsTwoZeroOneNine OSSKU = "Windows2019" - OSSKUWindowsTwoZeroTwoTwo OSSKU = "Windows2022" -) - -func PossibleValuesForOSSKU() []string { - return []string{ - string(OSSKUAzureLinux), - string(OSSKUCBLMariner), - string(OSSKUMariner), - string(OSSKUUbuntu), - string(OSSKUWindowsAnnual), - string(OSSKUWindowsTwoZeroOneNine), - string(OSSKUWindowsTwoZeroTwoTwo), - } -} - -func (s *OSSKU) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOSSKU(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOSSKU(input string) (*OSSKU, error) { - vals := map[string]OSSKU{ - "azurelinux": OSSKUAzureLinux, - "cblmariner": OSSKUCBLMariner, - "mariner": OSSKUMariner, - "ubuntu": OSSKUUbuntu, - "windowsannual": OSSKUWindowsAnnual, - "windows2019": OSSKUWindowsTwoZeroOneNine, - "windows2022": OSSKUWindowsTwoZeroTwoTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OSSKU(input) - return &out, nil -} - -type OSType string - -const ( - OSTypeLinux OSType = "Linux" - OSTypeWindows OSType = "Windows" -) - -func PossibleValuesForOSType() []string { - return []string{ - string(OSTypeLinux), - string(OSTypeWindows), - } -} - -func (s *OSType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOSType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOSType(input string) (*OSType, error) { - vals := map[string]OSType{ - "linux": OSTypeLinux, - "windows": OSTypeWindows, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OSType(input) - return &out, nil -} - -type SnapshotType string - -const ( - SnapshotTypeManagedCluster SnapshotType = "ManagedCluster" - SnapshotTypeNodePool SnapshotType = "NodePool" -) - -func PossibleValuesForSnapshotType() []string { - return []string{ - string(SnapshotTypeManagedCluster), - string(SnapshotTypeNodePool), - } -} - -func (s *SnapshotType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSnapshotType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSnapshotType(input string) (*SnapshotType, error) { - vals := map[string]SnapshotType{ - "managedcluster": SnapshotTypeManagedCluster, - "nodepool": SnapshotTypeNodePool, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SnapshotType(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/version.go deleted file mode 100644 index ea2366fd8134b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package snapshots - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2023-09-02-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/snapshots/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/README.md new file mode 100644 index 0000000000000..4d852fa96b89c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/README.md @@ -0,0 +1,139 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools` Documentation + +The `agentpools` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-05-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools" +``` + + +### Client Initialization + +```go +client := agentpools.NewAgentPoolsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `AgentPoolsClient.AbortLatestOperation` + +```go +ctx := context.TODO() +id := agentpools.NewAgentPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "agentPoolValue") + +if err := client.AbortLatestOperationThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `AgentPoolsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := agentpools.NewAgentPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "agentPoolValue") + +payload := agentpools.AgentPool{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `AgentPoolsClient.Delete` + +```go +ctx := context.TODO() +id := agentpools.NewAgentPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "agentPoolValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `AgentPoolsClient.Get` + +```go +ctx := context.TODO() +id := agentpools.NewAgentPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "agentPoolValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AgentPoolsClient.GetAvailableAgentPoolVersions` + +```go +ctx := context.TODO() +id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") + +read, err := client.GetAvailableAgentPoolVersions(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AgentPoolsClient.GetUpgradeProfile` + +```go +ctx := context.TODO() +id := agentpools.NewAgentPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "agentPoolValue") + +read, err := client.GetUpgradeProfile(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AgentPoolsClient.List` + +```go +ctx := context.TODO() +id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `AgentPoolsClient.UpgradeNodeImageVersion` + +```go +ctx := context.TODO() +id := agentpools.NewAgentPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "agentPoolValue") + +if err := client.UpgradeNodeImageVersionThenPoll(ctx, id); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/constants.go new file mode 100644 index 0000000000000..ee5ee18ca4146 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/constants.go @@ -0,0 +1,561 @@ +package agentpools + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AgentPoolMode string + +const ( + AgentPoolModeSystem AgentPoolMode = "System" + AgentPoolModeUser AgentPoolMode = "User" +) + +func PossibleValuesForAgentPoolMode() []string { + return []string{ + string(AgentPoolModeSystem), + string(AgentPoolModeUser), + } +} + +func (s *AgentPoolMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAgentPoolMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAgentPoolMode(input string) (*AgentPoolMode, error) { + vals := map[string]AgentPoolMode{ + "system": AgentPoolModeSystem, + "user": AgentPoolModeUser, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AgentPoolMode(input) + return &out, nil +} + +type AgentPoolType string + +const ( + AgentPoolTypeAvailabilitySet AgentPoolType = "AvailabilitySet" + AgentPoolTypeVirtualMachineScaleSets AgentPoolType = "VirtualMachineScaleSets" +) + +func PossibleValuesForAgentPoolType() []string { + return []string{ + string(AgentPoolTypeAvailabilitySet), + string(AgentPoolTypeVirtualMachineScaleSets), + } +} + +func (s *AgentPoolType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAgentPoolType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAgentPoolType(input string) (*AgentPoolType, error) { + vals := map[string]AgentPoolType{ + "availabilityset": AgentPoolTypeAvailabilitySet, + "virtualmachinescalesets": AgentPoolTypeVirtualMachineScaleSets, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AgentPoolType(input) + return &out, nil +} + +type Code string + +const ( + CodeRunning Code = "Running" + CodeStopped Code = "Stopped" +) + +func PossibleValuesForCode() []string { + return []string{ + string(CodeRunning), + string(CodeStopped), + } +} + +func (s *Code) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCode(input string) (*Code, error) { + vals := map[string]Code{ + "running": CodeRunning, + "stopped": CodeStopped, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Code(input) + return &out, nil +} + +type GPUInstanceProfile string + +const ( + GPUInstanceProfileMIGFourg GPUInstanceProfile = "MIG4g" + GPUInstanceProfileMIGOneg GPUInstanceProfile = "MIG1g" + GPUInstanceProfileMIGSeveng GPUInstanceProfile = "MIG7g" + GPUInstanceProfileMIGThreeg GPUInstanceProfile = "MIG3g" + GPUInstanceProfileMIGTwog GPUInstanceProfile = "MIG2g" +) + +func PossibleValuesForGPUInstanceProfile() []string { + return []string{ + string(GPUInstanceProfileMIGFourg), + string(GPUInstanceProfileMIGOneg), + string(GPUInstanceProfileMIGSeveng), + string(GPUInstanceProfileMIGThreeg), + string(GPUInstanceProfileMIGTwog), + } +} + +func (s *GPUInstanceProfile) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseGPUInstanceProfile(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseGPUInstanceProfile(input string) (*GPUInstanceProfile, error) { + vals := map[string]GPUInstanceProfile{ + "mig4g": GPUInstanceProfileMIGFourg, + "mig1g": GPUInstanceProfileMIGOneg, + "mig7g": GPUInstanceProfileMIGSeveng, + "mig3g": GPUInstanceProfileMIGThreeg, + "mig2g": GPUInstanceProfileMIGTwog, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := GPUInstanceProfile(input) + return &out, nil +} + +type KubeletDiskType string + +const ( + KubeletDiskTypeOS KubeletDiskType = "OS" + KubeletDiskTypeTemporary KubeletDiskType = "Temporary" +) + +func PossibleValuesForKubeletDiskType() []string { + return []string{ + string(KubeletDiskTypeOS), + string(KubeletDiskTypeTemporary), + } +} + +func (s *KubeletDiskType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseKubeletDiskType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseKubeletDiskType(input string) (*KubeletDiskType, error) { + vals := map[string]KubeletDiskType{ + "os": KubeletDiskTypeOS, + "temporary": KubeletDiskTypeTemporary, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := KubeletDiskType(input) + return &out, nil +} + +type OSDiskType string + +const ( + OSDiskTypeEphemeral OSDiskType = "Ephemeral" + OSDiskTypeManaged OSDiskType = "Managed" +) + +func PossibleValuesForOSDiskType() []string { + return []string{ + string(OSDiskTypeEphemeral), + string(OSDiskTypeManaged), + } +} + +func (s *OSDiskType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOSDiskType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOSDiskType(input string) (*OSDiskType, error) { + vals := map[string]OSDiskType{ + "ephemeral": OSDiskTypeEphemeral, + "managed": OSDiskTypeManaged, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OSDiskType(input) + return &out, nil +} + +type OSSKU string + +const ( + OSSKUAzureLinux OSSKU = "AzureLinux" + OSSKUCBLMariner OSSKU = "CBLMariner" + OSSKUUbuntu OSSKU = "Ubuntu" + OSSKUWindowsTwoZeroOneNine OSSKU = "Windows2019" + OSSKUWindowsTwoZeroTwoTwo OSSKU = "Windows2022" +) + +func PossibleValuesForOSSKU() []string { + return []string{ + string(OSSKUAzureLinux), + string(OSSKUCBLMariner), + string(OSSKUUbuntu), + string(OSSKUWindowsTwoZeroOneNine), + string(OSSKUWindowsTwoZeroTwoTwo), + } +} + +func (s *OSSKU) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOSSKU(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOSSKU(input string) (*OSSKU, error) { + vals := map[string]OSSKU{ + "azurelinux": OSSKUAzureLinux, + "cblmariner": OSSKUCBLMariner, + "ubuntu": OSSKUUbuntu, + "windows2019": OSSKUWindowsTwoZeroOneNine, + "windows2022": OSSKUWindowsTwoZeroTwoTwo, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OSSKU(input) + return &out, nil +} + +type OSType string + +const ( + OSTypeLinux OSType = "Linux" + OSTypeWindows OSType = "Windows" +) + +func PossibleValuesForOSType() []string { + return []string{ + string(OSTypeLinux), + string(OSTypeWindows), + } +} + +func (s *OSType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOSType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOSType(input string) (*OSType, error) { + vals := map[string]OSType{ + "linux": OSTypeLinux, + "windows": OSTypeWindows, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OSType(input) + return &out, nil +} + +type Protocol string + +const ( + ProtocolTCP Protocol = "TCP" + ProtocolUDP Protocol = "UDP" +) + +func PossibleValuesForProtocol() []string { + return []string{ + string(ProtocolTCP), + string(ProtocolUDP), + } +} + +func (s *Protocol) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProtocol(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProtocol(input string) (*Protocol, error) { + vals := map[string]Protocol{ + "tcp": ProtocolTCP, + "udp": ProtocolUDP, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Protocol(input) + return &out, nil +} + +type ScaleDownMode string + +const ( + ScaleDownModeDeallocate ScaleDownMode = "Deallocate" + ScaleDownModeDelete ScaleDownMode = "Delete" +) + +func PossibleValuesForScaleDownMode() []string { + return []string{ + string(ScaleDownModeDeallocate), + string(ScaleDownModeDelete), + } +} + +func (s *ScaleDownMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseScaleDownMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseScaleDownMode(input string) (*ScaleDownMode, error) { + vals := map[string]ScaleDownMode{ + "deallocate": ScaleDownModeDeallocate, + "delete": ScaleDownModeDelete, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ScaleDownMode(input) + return &out, nil +} + +type ScaleSetEvictionPolicy string + +const ( + ScaleSetEvictionPolicyDeallocate ScaleSetEvictionPolicy = "Deallocate" + ScaleSetEvictionPolicyDelete ScaleSetEvictionPolicy = "Delete" +) + +func PossibleValuesForScaleSetEvictionPolicy() []string { + return []string{ + string(ScaleSetEvictionPolicyDeallocate), + string(ScaleSetEvictionPolicyDelete), + } +} + +func (s *ScaleSetEvictionPolicy) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseScaleSetEvictionPolicy(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseScaleSetEvictionPolicy(input string) (*ScaleSetEvictionPolicy, error) { + vals := map[string]ScaleSetEvictionPolicy{ + "deallocate": ScaleSetEvictionPolicyDeallocate, + "delete": ScaleSetEvictionPolicyDelete, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ScaleSetEvictionPolicy(input) + return &out, nil +} + +type ScaleSetPriority string + +const ( + ScaleSetPriorityRegular ScaleSetPriority = "Regular" + ScaleSetPrioritySpot ScaleSetPriority = "Spot" +) + +func PossibleValuesForScaleSetPriority() []string { + return []string{ + string(ScaleSetPriorityRegular), + string(ScaleSetPrioritySpot), + } +} + +func (s *ScaleSetPriority) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseScaleSetPriority(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseScaleSetPriority(input string) (*ScaleSetPriority, error) { + vals := map[string]ScaleSetPriority{ + "regular": ScaleSetPriorityRegular, + "spot": ScaleSetPrioritySpot, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ScaleSetPriority(input) + return &out, nil +} + +type WorkloadRuntime string + +const ( + WorkloadRuntimeOCIContainer WorkloadRuntime = "OCIContainer" + WorkloadRuntimeWasmWasi WorkloadRuntime = "WasmWasi" +) + +func PossibleValuesForWorkloadRuntime() []string { + return []string{ + string(WorkloadRuntimeOCIContainer), + string(WorkloadRuntimeWasmWasi), + } +} + +func (s *WorkloadRuntime) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseWorkloadRuntime(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseWorkloadRuntime(input string) (*WorkloadRuntime, error) { + vals := map[string]WorkloadRuntime{ + "ocicontainer": WorkloadRuntimeOCIContainer, + "wasmwasi": WorkloadRuntimeWasmWasi, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WorkloadRuntime(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/id_agentpool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/id_agentpool.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/id_agentpool.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/id_agentpool.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/method_abortlatestoperation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/method_abortlatestoperation.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/method_abortlatestoperation.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/method_abortlatestoperation.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/method_delete.go new file mode 100644 index 0000000000000..2cf59cf32aeba --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/method_delete.go @@ -0,0 +1,70 @@ +package agentpools + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c AgentPoolsClient) Delete(ctx context.Context, id AgentPoolId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c AgentPoolsClient) DeleteThenPoll(ctx context.Context, id AgentPoolId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/method_getavailableagentpoolversions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/method_getavailableagentpoolversions.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/method_getavailableagentpoolversions.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/method_getavailableagentpoolversions.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/method_getupgradeprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/method_getupgradeprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/method_getupgradeprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/method_getupgradeprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/method_upgradenodeimageversion.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/method_upgradenodeimageversion.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/method_upgradenodeimageversion.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/method_upgradenodeimageversion.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_agentpool.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpool.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_agentpool.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolavailableversions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_agentpoolavailableversions.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolavailableversions.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_agentpoolavailableversions.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolavailableversionsproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_agentpoolavailableversionsproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolavailableversionsproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_agentpoolavailableversionsproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolavailableversionspropertiesagentpoolversionsinlined.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_agentpoolavailableversionspropertiesagentpoolversionsinlined.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolavailableversionspropertiesagentpoolversionsinlined.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_agentpoolavailableversionspropertiesagentpoolversionsinlined.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolnetworkprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_agentpoolnetworkprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolnetworkprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_agentpoolnetworkprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolupgradeprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_agentpoolupgradeprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolupgradeprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_agentpoolupgradeprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolupgradeprofileproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_agentpoolupgradeprofileproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolupgradeprofileproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_agentpoolupgradeprofileproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolupgradeprofilepropertiesupgradesinlined.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_agentpoolupgradeprofilepropertiesupgradesinlined.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolupgradeprofilepropertiesupgradesinlined.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_agentpoolupgradeprofilepropertiesupgradesinlined.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolupgradesettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_agentpoolupgradesettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolupgradesettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_agentpoolupgradesettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolwindowsprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_agentpoolwindowsprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_agentpoolwindowsprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_agentpoolwindowsprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_creationdata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_creationdata.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_creationdata.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_creationdata.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_iptag.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_iptag.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_iptag.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_iptag.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_kubeletconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_kubeletconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_kubeletconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_kubeletconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_linuxosconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_linuxosconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_linuxosconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_linuxosconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_managedclusteragentpoolprofileproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_managedclusteragentpoolprofileproperties.go new file mode 100644 index 0000000000000..1d019b56b4d29 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_managedclusteragentpoolprofileproperties.go @@ -0,0 +1,55 @@ +package agentpools + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedClusterAgentPoolProfileProperties struct { + AvailabilityZones *zones.Schema `json:"availabilityZones,omitempty"` + CapacityReservationGroupID *string `json:"capacityReservationGroupID,omitempty"` + Count *int64 `json:"count,omitempty"` + CreationData *CreationData `json:"creationData,omitempty"` + CurrentOrchestratorVersion *string `json:"currentOrchestratorVersion,omitempty"` + EnableAutoScaling *bool `json:"enableAutoScaling,omitempty"` + EnableEncryptionAtHost *bool `json:"enableEncryptionAtHost,omitempty"` + EnableFIPS *bool `json:"enableFIPS,omitempty"` + EnableNodePublicIP *bool `json:"enableNodePublicIP,omitempty"` + EnableUltraSSD *bool `json:"enableUltraSSD,omitempty"` + GpuInstanceProfile *GPUInstanceProfile `json:"gpuInstanceProfile,omitempty"` + HostGroupID *string `json:"hostGroupID,omitempty"` + KubeletConfig *KubeletConfig `json:"kubeletConfig,omitempty"` + KubeletDiskType *KubeletDiskType `json:"kubeletDiskType,omitempty"` + LinuxOSConfig *LinuxOSConfig `json:"linuxOSConfig,omitempty"` + MaxCount *int64 `json:"maxCount,omitempty"` + MaxPods *int64 `json:"maxPods,omitempty"` + MinCount *int64 `json:"minCount,omitempty"` + Mode *AgentPoolMode `json:"mode,omitempty"` + NetworkProfile *AgentPoolNetworkProfile `json:"networkProfile,omitempty"` + NodeImageVersion *string `json:"nodeImageVersion,omitempty"` + NodeLabels *map[string]string `json:"nodeLabels,omitempty"` + NodePublicIPPrefixID *string `json:"nodePublicIPPrefixID,omitempty"` + NodeTaints *[]string `json:"nodeTaints,omitempty"` + OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` + OsDiskSizeGB *int64 `json:"osDiskSizeGB,omitempty"` + OsDiskType *OSDiskType `json:"osDiskType,omitempty"` + OsSKU *OSSKU `json:"osSKU,omitempty"` + OsType *OSType `json:"osType,omitempty"` + PodSubnetID *string `json:"podSubnetID,omitempty"` + PowerState *PowerState `json:"powerState,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + ProximityPlacementGroupID *string `json:"proximityPlacementGroupID,omitempty"` + ScaleDownMode *ScaleDownMode `json:"scaleDownMode,omitempty"` + ScaleSetEvictionPolicy *ScaleSetEvictionPolicy `json:"scaleSetEvictionPolicy,omitempty"` + ScaleSetPriority *ScaleSetPriority `json:"scaleSetPriority,omitempty"` + SpotMaxPrice *float64 `json:"spotMaxPrice,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *AgentPoolType `json:"type,omitempty"` + UpgradeSettings *AgentPoolUpgradeSettings `json:"upgradeSettings,omitempty"` + VMSize *string `json:"vmSize,omitempty"` + VnetSubnetID *string `json:"vnetSubnetID,omitempty"` + WindowsProfile *AgentPoolWindowsProfile `json:"windowsProfile,omitempty"` + WorkloadRuntime *WorkloadRuntime `json:"workloadRuntime,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_portrange.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_portrange.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_portrange.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_portrange.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_powerstate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_powerstate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_powerstate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_powerstate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_sysctlconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_sysctlconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/model_sysctlconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/model_sysctlconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/version.go new file mode 100644 index 0000000000000..be0357b8bc245 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools/version.go @@ -0,0 +1,12 @@ +package agentpools + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-05-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/agentpools/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/README.md new file mode 100644 index 0000000000000..d8dfda44d330b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/README.md @@ -0,0 +1,91 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations` Documentation + +The `maintenanceconfigurations` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-05-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations" +``` + + +### Client Initialization + +```go +client := maintenanceconfigurations.NewMaintenanceConfigurationsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `MaintenanceConfigurationsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := maintenanceconfigurations.NewMaintenanceConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "maintenanceConfigurationValue") + +payload := maintenanceconfigurations.MaintenanceConfiguration{ + // ... +} + + +read, err := client.CreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `MaintenanceConfigurationsClient.Delete` + +```go +ctx := context.TODO() +id := maintenanceconfigurations.NewMaintenanceConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "maintenanceConfigurationValue") + +read, err := client.Delete(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `MaintenanceConfigurationsClient.Get` + +```go +ctx := context.TODO() +id := maintenanceconfigurations.NewMaintenanceConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "maintenanceConfigurationValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `MaintenanceConfigurationsClient.ListByManagedCluster` + +```go +ctx := context.TODO() +id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") + +// alternatively `client.ListByManagedCluster(ctx, id)` can be used to do batched pagination +items, err := client.ListByManagedClusterComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/id_maintenanceconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/id_maintenanceconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/method_listbymanagedcluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/method_listbymanagedcluster.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/method_listbymanagedcluster.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/method_listbymanagedcluster.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/model_absolutemonthlyschedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/model_absolutemonthlyschedule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/model_absolutemonthlyschedule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/model_absolutemonthlyschedule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/model_dailyschedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/model_dailyschedule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/model_dailyschedule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/model_dailyschedule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/model_datespan.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/model_datespan.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/model_datespan.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/model_datespan.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/model_maintenanceconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/model_maintenanceconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/model_maintenanceconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/model_maintenanceconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/model_maintenanceconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/model_maintenanceconfigurationproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/model_maintenanceconfigurationproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/model_maintenanceconfigurationproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/model_maintenancewindow.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/model_maintenancewindow.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/model_maintenancewindow.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/model_maintenancewindow.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/model_relativemonthlyschedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/model_relativemonthlyschedule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/model_relativemonthlyschedule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/model_relativemonthlyschedule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/model_schedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/model_schedule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/model_schedule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/model_schedule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/model_timeinweek.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/model_timeinweek.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/model_timeinweek.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/model_timeinweek.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/model_timespan.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/model_timespan.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/model_timespan.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/model_timespan.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/model_weeklyschedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/model_weeklyschedule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/model_weeklyschedule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/model_weeklyschedule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/version.go new file mode 100644 index 0000000000000..97140e0ba21b2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/version.go @@ -0,0 +1,12 @@ +package maintenanceconfigurations + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-05-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/maintenanceconfigurations/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/README.md new file mode 100644 index 0000000000000..31f49582ea3ca --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/README.md @@ -0,0 +1,423 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters` Documentation + +The `managedclusters` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-05-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters" +``` + + +### Client Initialization + +```go +client := managedclusters.NewManagedClustersClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ManagedClustersClient.AbortLatestOperation` + +```go +ctx := context.TODO() +id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") + +if err := client.AbortLatestOperationThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedClustersClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") + +payload := managedclusters.ManagedCluster{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedClustersClient.Delete` + +```go +ctx := context.TODO() +id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedClustersClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagedClustersClient.GetAccessProfile` + +```go +ctx := context.TODO() +id := managedclusters.NewAccessProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "accessProfileValue") + +read, err := client.GetAccessProfile(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagedClustersClient.GetCommandResult` + +```go +ctx := context.TODO() +id := managedclusters.NewCommandResultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "commandIdValue") + +read, err := client.GetCommandResult(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagedClustersClient.GetMeshRevisionProfile` + +```go +ctx := context.TODO() +id := managedclusters.NewMeshRevisionProfileID("12345678-1234-9876-4563-123456789012", "locationValue", "meshRevisionProfileValue") + +read, err := client.GetMeshRevisionProfile(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagedClustersClient.GetMeshUpgradeProfile` + +```go +ctx := context.TODO() +id := managedclusters.NewMeshUpgradeProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "meshUpgradeProfileValue") + +read, err := client.GetMeshUpgradeProfile(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagedClustersClient.GetUpgradeProfile` + +```go +ctx := context.TODO() +id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") + +read, err := client.GetUpgradeProfile(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagedClustersClient.List` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ManagedClustersClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ManagedClustersClient.ListClusterAdminCredentials` + +```go +ctx := context.TODO() +id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") + +read, err := client.ListClusterAdminCredentials(ctx, id, managedclusters.DefaultListClusterAdminCredentialsOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagedClustersClient.ListClusterMonitoringUserCredentials` + +```go +ctx := context.TODO() +id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") + +read, err := client.ListClusterMonitoringUserCredentials(ctx, id, managedclusters.DefaultListClusterMonitoringUserCredentialsOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagedClustersClient.ListClusterUserCredentials` + +```go +ctx := context.TODO() +id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") + +read, err := client.ListClusterUserCredentials(ctx, id, managedclusters.DefaultListClusterUserCredentialsOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagedClustersClient.ListKubernetesVersions` + +```go +ctx := context.TODO() +id := managedclusters.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") + +read, err := client.ListKubernetesVersions(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagedClustersClient.ListMeshRevisionProfiles` + +```go +ctx := context.TODO() +id := managedclusters.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") + +// alternatively `client.ListMeshRevisionProfiles(ctx, id)` can be used to do batched pagination +items, err := client.ListMeshRevisionProfilesComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ManagedClustersClient.ListMeshUpgradeProfiles` + +```go +ctx := context.TODO() +id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") + +// alternatively `client.ListMeshUpgradeProfiles(ctx, id)` can be used to do batched pagination +items, err := client.ListMeshUpgradeProfilesComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ManagedClustersClient.ListOutboundNetworkDependenciesEndpoints` + +```go +ctx := context.TODO() +id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") + +// alternatively `client.ListOutboundNetworkDependenciesEndpoints(ctx, id)` can be used to do batched pagination +items, err := client.ListOutboundNetworkDependenciesEndpointsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ManagedClustersClient.ResetAADProfile` + +```go +ctx := context.TODO() +id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") + +payload := managedclusters.ManagedClusterAADProfile{ + // ... +} + + +if err := client.ResetAADProfileThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedClustersClient.ResetServicePrincipalProfile` + +```go +ctx := context.TODO() +id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") + +payload := managedclusters.ManagedClusterServicePrincipalProfile{ + // ... +} + + +if err := client.ResetServicePrincipalProfileThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedClustersClient.RotateClusterCertificates` + +```go +ctx := context.TODO() +id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") + +if err := client.RotateClusterCertificatesThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedClustersClient.RotateServiceAccountSigningKeys` + +```go +ctx := context.TODO() +id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") + +if err := client.RotateServiceAccountSigningKeysThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedClustersClient.RunCommand` + +```go +ctx := context.TODO() +id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") + +payload := managedclusters.RunCommandRequest{ + // ... +} + + +if err := client.RunCommandThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedClustersClient.Start` + +```go +ctx := context.TODO() +id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") + +if err := client.StartThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedClustersClient.Stop` + +```go +ctx := context.TODO() +id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") + +if err := client.StopThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedClustersClient.UpdateTags` + +```go +ctx := context.TODO() +id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue") + +payload := managedclusters.TagsObject{ + // ... +} + + +if err := client.UpdateTagsThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/constants.go new file mode 100644 index 0000000000000..58ad0a4f0bb56 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/constants.go @@ -0,0 +1,1508 @@ +package managedclusters + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AgentPoolMode string + +const ( + AgentPoolModeSystem AgentPoolMode = "System" + AgentPoolModeUser AgentPoolMode = "User" +) + +func PossibleValuesForAgentPoolMode() []string { + return []string{ + string(AgentPoolModeSystem), + string(AgentPoolModeUser), + } +} + +func (s *AgentPoolMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAgentPoolMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAgentPoolMode(input string) (*AgentPoolMode, error) { + vals := map[string]AgentPoolMode{ + "system": AgentPoolModeSystem, + "user": AgentPoolModeUser, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AgentPoolMode(input) + return &out, nil +} + +type AgentPoolType string + +const ( + AgentPoolTypeAvailabilitySet AgentPoolType = "AvailabilitySet" + AgentPoolTypeVirtualMachineScaleSets AgentPoolType = "VirtualMachineScaleSets" +) + +func PossibleValuesForAgentPoolType() []string { + return []string{ + string(AgentPoolTypeAvailabilitySet), + string(AgentPoolTypeVirtualMachineScaleSets), + } +} + +func (s *AgentPoolType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAgentPoolType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAgentPoolType(input string) (*AgentPoolType, error) { + vals := map[string]AgentPoolType{ + "availabilityset": AgentPoolTypeAvailabilitySet, + "virtualmachinescalesets": AgentPoolTypeVirtualMachineScaleSets, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AgentPoolType(input) + return &out, nil +} + +type BackendPoolType string + +const ( + BackendPoolTypeNodeIP BackendPoolType = "NodeIP" + BackendPoolTypeNodeIPConfiguration BackendPoolType = "NodeIPConfiguration" +) + +func PossibleValuesForBackendPoolType() []string { + return []string{ + string(BackendPoolTypeNodeIP), + string(BackendPoolTypeNodeIPConfiguration), + } +} + +func (s *BackendPoolType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseBackendPoolType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseBackendPoolType(input string) (*BackendPoolType, error) { + vals := map[string]BackendPoolType{ + "nodeip": BackendPoolTypeNodeIP, + "nodeipconfiguration": BackendPoolTypeNodeIPConfiguration, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := BackendPoolType(input) + return &out, nil +} + +type Code string + +const ( + CodeRunning Code = "Running" + CodeStopped Code = "Stopped" +) + +func PossibleValuesForCode() []string { + return []string{ + string(CodeRunning), + string(CodeStopped), + } +} + +func (s *Code) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCode(input string) (*Code, error) { + vals := map[string]Code{ + "running": CodeRunning, + "stopped": CodeStopped, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Code(input) + return &out, nil +} + +type Expander string + +const ( + ExpanderLeastNegativewaste Expander = "least-waste" + ExpanderMostNegativepods Expander = "most-pods" + ExpanderPriority Expander = "priority" + ExpanderRandom Expander = "random" +) + +func PossibleValuesForExpander() []string { + return []string{ + string(ExpanderLeastNegativewaste), + string(ExpanderMostNegativepods), + string(ExpanderPriority), + string(ExpanderRandom), + } +} + +func (s *Expander) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseExpander(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseExpander(input string) (*Expander, error) { + vals := map[string]Expander{ + "least-waste": ExpanderLeastNegativewaste, + "most-pods": ExpanderMostNegativepods, + "priority": ExpanderPriority, + "random": ExpanderRandom, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Expander(input) + return &out, nil +} + +type Format string + +const ( + FormatAzure Format = "azure" + FormatExec Format = "exec" +) + +func PossibleValuesForFormat() []string { + return []string{ + string(FormatAzure), + string(FormatExec), + } +} + +func (s *Format) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseFormat(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseFormat(input string) (*Format, error) { + vals := map[string]Format{ + "azure": FormatAzure, + "exec": FormatExec, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Format(input) + return &out, nil +} + +type GPUInstanceProfile string + +const ( + GPUInstanceProfileMIGFourg GPUInstanceProfile = "MIG4g" + GPUInstanceProfileMIGOneg GPUInstanceProfile = "MIG1g" + GPUInstanceProfileMIGSeveng GPUInstanceProfile = "MIG7g" + GPUInstanceProfileMIGThreeg GPUInstanceProfile = "MIG3g" + GPUInstanceProfileMIGTwog GPUInstanceProfile = "MIG2g" +) + +func PossibleValuesForGPUInstanceProfile() []string { + return []string{ + string(GPUInstanceProfileMIGFourg), + string(GPUInstanceProfileMIGOneg), + string(GPUInstanceProfileMIGSeveng), + string(GPUInstanceProfileMIGThreeg), + string(GPUInstanceProfileMIGTwog), + } +} + +func (s *GPUInstanceProfile) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseGPUInstanceProfile(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseGPUInstanceProfile(input string) (*GPUInstanceProfile, error) { + vals := map[string]GPUInstanceProfile{ + "mig4g": GPUInstanceProfileMIGFourg, + "mig1g": GPUInstanceProfileMIGOneg, + "mig7g": GPUInstanceProfileMIGSeveng, + "mig3g": GPUInstanceProfileMIGThreeg, + "mig2g": GPUInstanceProfileMIGTwog, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := GPUInstanceProfile(input) + return &out, nil +} + +type IPFamily string + +const ( + IPFamilyIPvFour IPFamily = "IPv4" + IPFamilyIPvSix IPFamily = "IPv6" +) + +func PossibleValuesForIPFamily() []string { + return []string{ + string(IPFamilyIPvFour), + string(IPFamilyIPvSix), + } +} + +func (s *IPFamily) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIPFamily(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIPFamily(input string) (*IPFamily, error) { + vals := map[string]IPFamily{ + "ipv4": IPFamilyIPvFour, + "ipv6": IPFamilyIPvSix, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IPFamily(input) + return &out, nil +} + +type IstioIngressGatewayMode string + +const ( + IstioIngressGatewayModeExternal IstioIngressGatewayMode = "External" + IstioIngressGatewayModeInternal IstioIngressGatewayMode = "Internal" +) + +func PossibleValuesForIstioIngressGatewayMode() []string { + return []string{ + string(IstioIngressGatewayModeExternal), + string(IstioIngressGatewayModeInternal), + } +} + +func (s *IstioIngressGatewayMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIstioIngressGatewayMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIstioIngressGatewayMode(input string) (*IstioIngressGatewayMode, error) { + vals := map[string]IstioIngressGatewayMode{ + "external": IstioIngressGatewayModeExternal, + "internal": IstioIngressGatewayModeInternal, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IstioIngressGatewayMode(input) + return &out, nil +} + +type KeyVaultNetworkAccessTypes string + +const ( + KeyVaultNetworkAccessTypesPrivate KeyVaultNetworkAccessTypes = "Private" + KeyVaultNetworkAccessTypesPublic KeyVaultNetworkAccessTypes = "Public" +) + +func PossibleValuesForKeyVaultNetworkAccessTypes() []string { + return []string{ + string(KeyVaultNetworkAccessTypesPrivate), + string(KeyVaultNetworkAccessTypesPublic), + } +} + +func (s *KeyVaultNetworkAccessTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseKeyVaultNetworkAccessTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseKeyVaultNetworkAccessTypes(input string) (*KeyVaultNetworkAccessTypes, error) { + vals := map[string]KeyVaultNetworkAccessTypes{ + "private": KeyVaultNetworkAccessTypesPrivate, + "public": KeyVaultNetworkAccessTypesPublic, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := KeyVaultNetworkAccessTypes(input) + return &out, nil +} + +type KubeletDiskType string + +const ( + KubeletDiskTypeOS KubeletDiskType = "OS" + KubeletDiskTypeTemporary KubeletDiskType = "Temporary" +) + +func PossibleValuesForKubeletDiskType() []string { + return []string{ + string(KubeletDiskTypeOS), + string(KubeletDiskTypeTemporary), + } +} + +func (s *KubeletDiskType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseKubeletDiskType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseKubeletDiskType(input string) (*KubeletDiskType, error) { + vals := map[string]KubeletDiskType{ + "os": KubeletDiskTypeOS, + "temporary": KubeletDiskTypeTemporary, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := KubeletDiskType(input) + return &out, nil +} + +type KubernetesSupportPlan string + +const ( + KubernetesSupportPlanAKSLongTermSupport KubernetesSupportPlan = "AKSLongTermSupport" + KubernetesSupportPlanKubernetesOfficial KubernetesSupportPlan = "KubernetesOfficial" +) + +func PossibleValuesForKubernetesSupportPlan() []string { + return []string{ + string(KubernetesSupportPlanAKSLongTermSupport), + string(KubernetesSupportPlanKubernetesOfficial), + } +} + +func (s *KubernetesSupportPlan) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseKubernetesSupportPlan(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseKubernetesSupportPlan(input string) (*KubernetesSupportPlan, error) { + vals := map[string]KubernetesSupportPlan{ + "akslongtermsupport": KubernetesSupportPlanAKSLongTermSupport, + "kubernetesofficial": KubernetesSupportPlanKubernetesOfficial, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := KubernetesSupportPlan(input) + return &out, nil +} + +type LicenseType string + +const ( + LicenseTypeNone LicenseType = "None" + LicenseTypeWindowsServer LicenseType = "Windows_Server" +) + +func PossibleValuesForLicenseType() []string { + return []string{ + string(LicenseTypeNone), + string(LicenseTypeWindowsServer), + } +} + +func (s *LicenseType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLicenseType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLicenseType(input string) (*LicenseType, error) { + vals := map[string]LicenseType{ + "none": LicenseTypeNone, + "windows_server": LicenseTypeWindowsServer, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LicenseType(input) + return &out, nil +} + +type LoadBalancerSku string + +const ( + LoadBalancerSkuBasic LoadBalancerSku = "basic" + LoadBalancerSkuStandard LoadBalancerSku = "standard" +) + +func PossibleValuesForLoadBalancerSku() []string { + return []string{ + string(LoadBalancerSkuBasic), + string(LoadBalancerSkuStandard), + } +} + +func (s *LoadBalancerSku) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLoadBalancerSku(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLoadBalancerSku(input string) (*LoadBalancerSku, error) { + vals := map[string]LoadBalancerSku{ + "basic": LoadBalancerSkuBasic, + "standard": LoadBalancerSkuStandard, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LoadBalancerSku(input) + return &out, nil +} + +type ManagedClusterPodIdentityProvisioningState string + +const ( + ManagedClusterPodIdentityProvisioningStateAssigned ManagedClusterPodIdentityProvisioningState = "Assigned" + ManagedClusterPodIdentityProvisioningStateCanceled ManagedClusterPodIdentityProvisioningState = "Canceled" + ManagedClusterPodIdentityProvisioningStateDeleting ManagedClusterPodIdentityProvisioningState = "Deleting" + ManagedClusterPodIdentityProvisioningStateFailed ManagedClusterPodIdentityProvisioningState = "Failed" + ManagedClusterPodIdentityProvisioningStateSucceeded ManagedClusterPodIdentityProvisioningState = "Succeeded" + ManagedClusterPodIdentityProvisioningStateUpdating ManagedClusterPodIdentityProvisioningState = "Updating" +) + +func PossibleValuesForManagedClusterPodIdentityProvisioningState() []string { + return []string{ + string(ManagedClusterPodIdentityProvisioningStateAssigned), + string(ManagedClusterPodIdentityProvisioningStateCanceled), + string(ManagedClusterPodIdentityProvisioningStateDeleting), + string(ManagedClusterPodIdentityProvisioningStateFailed), + string(ManagedClusterPodIdentityProvisioningStateSucceeded), + string(ManagedClusterPodIdentityProvisioningStateUpdating), + } +} + +func (s *ManagedClusterPodIdentityProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseManagedClusterPodIdentityProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseManagedClusterPodIdentityProvisioningState(input string) (*ManagedClusterPodIdentityProvisioningState, error) { + vals := map[string]ManagedClusterPodIdentityProvisioningState{ + "assigned": ManagedClusterPodIdentityProvisioningStateAssigned, + "canceled": ManagedClusterPodIdentityProvisioningStateCanceled, + "deleting": ManagedClusterPodIdentityProvisioningStateDeleting, + "failed": ManagedClusterPodIdentityProvisioningStateFailed, + "succeeded": ManagedClusterPodIdentityProvisioningStateSucceeded, + "updating": ManagedClusterPodIdentityProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ManagedClusterPodIdentityProvisioningState(input) + return &out, nil +} + +type ManagedClusterSKUName string + +const ( + ManagedClusterSKUNameBase ManagedClusterSKUName = "Base" +) + +func PossibleValuesForManagedClusterSKUName() []string { + return []string{ + string(ManagedClusterSKUNameBase), + } +} + +func (s *ManagedClusterSKUName) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseManagedClusterSKUName(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseManagedClusterSKUName(input string) (*ManagedClusterSKUName, error) { + vals := map[string]ManagedClusterSKUName{ + "base": ManagedClusterSKUNameBase, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ManagedClusterSKUName(input) + return &out, nil +} + +type ManagedClusterSKUTier string + +const ( + ManagedClusterSKUTierFree ManagedClusterSKUTier = "Free" + ManagedClusterSKUTierPremium ManagedClusterSKUTier = "Premium" + ManagedClusterSKUTierStandard ManagedClusterSKUTier = "Standard" +) + +func PossibleValuesForManagedClusterSKUTier() []string { + return []string{ + string(ManagedClusterSKUTierFree), + string(ManagedClusterSKUTierPremium), + string(ManagedClusterSKUTierStandard), + } +} + +func (s *ManagedClusterSKUTier) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseManagedClusterSKUTier(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseManagedClusterSKUTier(input string) (*ManagedClusterSKUTier, error) { + vals := map[string]ManagedClusterSKUTier{ + "free": ManagedClusterSKUTierFree, + "premium": ManagedClusterSKUTierPremium, + "standard": ManagedClusterSKUTierStandard, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ManagedClusterSKUTier(input) + return &out, nil +} + +type NetworkDataplane string + +const ( + NetworkDataplaneAzure NetworkDataplane = "azure" + NetworkDataplaneCilium NetworkDataplane = "cilium" +) + +func PossibleValuesForNetworkDataplane() []string { + return []string{ + string(NetworkDataplaneAzure), + string(NetworkDataplaneCilium), + } +} + +func (s *NetworkDataplane) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseNetworkDataplane(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseNetworkDataplane(input string) (*NetworkDataplane, error) { + vals := map[string]NetworkDataplane{ + "azure": NetworkDataplaneAzure, + "cilium": NetworkDataplaneCilium, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := NetworkDataplane(input) + return &out, nil +} + +type NetworkMode string + +const ( + NetworkModeBridge NetworkMode = "bridge" + NetworkModeTransparent NetworkMode = "transparent" +) + +func PossibleValuesForNetworkMode() []string { + return []string{ + string(NetworkModeBridge), + string(NetworkModeTransparent), + } +} + +func (s *NetworkMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseNetworkMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseNetworkMode(input string) (*NetworkMode, error) { + vals := map[string]NetworkMode{ + "bridge": NetworkModeBridge, + "transparent": NetworkModeTransparent, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := NetworkMode(input) + return &out, nil +} + +type NetworkPlugin string + +const ( + NetworkPluginAzure NetworkPlugin = "azure" + NetworkPluginKubenet NetworkPlugin = "kubenet" + NetworkPluginNone NetworkPlugin = "none" +) + +func PossibleValuesForNetworkPlugin() []string { + return []string{ + string(NetworkPluginAzure), + string(NetworkPluginKubenet), + string(NetworkPluginNone), + } +} + +func (s *NetworkPlugin) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseNetworkPlugin(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseNetworkPlugin(input string) (*NetworkPlugin, error) { + vals := map[string]NetworkPlugin{ + "azure": NetworkPluginAzure, + "kubenet": NetworkPluginKubenet, + "none": NetworkPluginNone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := NetworkPlugin(input) + return &out, nil +} + +type NetworkPluginMode string + +const ( + NetworkPluginModeOverlay NetworkPluginMode = "overlay" +) + +func PossibleValuesForNetworkPluginMode() []string { + return []string{ + string(NetworkPluginModeOverlay), + } +} + +func (s *NetworkPluginMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseNetworkPluginMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseNetworkPluginMode(input string) (*NetworkPluginMode, error) { + vals := map[string]NetworkPluginMode{ + "overlay": NetworkPluginModeOverlay, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := NetworkPluginMode(input) + return &out, nil +} + +type NetworkPolicy string + +const ( + NetworkPolicyAzure NetworkPolicy = "azure" + NetworkPolicyCalico NetworkPolicy = "calico" + NetworkPolicyCilium NetworkPolicy = "cilium" + NetworkPolicyNone NetworkPolicy = "none" +) + +func PossibleValuesForNetworkPolicy() []string { + return []string{ + string(NetworkPolicyAzure), + string(NetworkPolicyCalico), + string(NetworkPolicyCilium), + string(NetworkPolicyNone), + } +} + +func (s *NetworkPolicy) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseNetworkPolicy(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseNetworkPolicy(input string) (*NetworkPolicy, error) { + vals := map[string]NetworkPolicy{ + "azure": NetworkPolicyAzure, + "calico": NetworkPolicyCalico, + "cilium": NetworkPolicyCilium, + "none": NetworkPolicyNone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := NetworkPolicy(input) + return &out, nil +} + +type NodeOSUpgradeChannel string + +const ( + NodeOSUpgradeChannelNodeImage NodeOSUpgradeChannel = "NodeImage" + NodeOSUpgradeChannelNone NodeOSUpgradeChannel = "None" + NodeOSUpgradeChannelSecurityPatch NodeOSUpgradeChannel = "SecurityPatch" + NodeOSUpgradeChannelUnmanaged NodeOSUpgradeChannel = "Unmanaged" +) + +func PossibleValuesForNodeOSUpgradeChannel() []string { + return []string{ + string(NodeOSUpgradeChannelNodeImage), + string(NodeOSUpgradeChannelNone), + string(NodeOSUpgradeChannelSecurityPatch), + string(NodeOSUpgradeChannelUnmanaged), + } +} + +func (s *NodeOSUpgradeChannel) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseNodeOSUpgradeChannel(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseNodeOSUpgradeChannel(input string) (*NodeOSUpgradeChannel, error) { + vals := map[string]NodeOSUpgradeChannel{ + "nodeimage": NodeOSUpgradeChannelNodeImage, + "none": NodeOSUpgradeChannelNone, + "securitypatch": NodeOSUpgradeChannelSecurityPatch, + "unmanaged": NodeOSUpgradeChannelUnmanaged, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := NodeOSUpgradeChannel(input) + return &out, nil +} + +type OSDiskType string + +const ( + OSDiskTypeEphemeral OSDiskType = "Ephemeral" + OSDiskTypeManaged OSDiskType = "Managed" +) + +func PossibleValuesForOSDiskType() []string { + return []string{ + string(OSDiskTypeEphemeral), + string(OSDiskTypeManaged), + } +} + +func (s *OSDiskType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOSDiskType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOSDiskType(input string) (*OSDiskType, error) { + vals := map[string]OSDiskType{ + "ephemeral": OSDiskTypeEphemeral, + "managed": OSDiskTypeManaged, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OSDiskType(input) + return &out, nil +} + +type OSSKU string + +const ( + OSSKUAzureLinux OSSKU = "AzureLinux" + OSSKUCBLMariner OSSKU = "CBLMariner" + OSSKUUbuntu OSSKU = "Ubuntu" + OSSKUWindowsTwoZeroOneNine OSSKU = "Windows2019" + OSSKUWindowsTwoZeroTwoTwo OSSKU = "Windows2022" +) + +func PossibleValuesForOSSKU() []string { + return []string{ + string(OSSKUAzureLinux), + string(OSSKUCBLMariner), + string(OSSKUUbuntu), + string(OSSKUWindowsTwoZeroOneNine), + string(OSSKUWindowsTwoZeroTwoTwo), + } +} + +func (s *OSSKU) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOSSKU(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOSSKU(input string) (*OSSKU, error) { + vals := map[string]OSSKU{ + "azurelinux": OSSKUAzureLinux, + "cblmariner": OSSKUCBLMariner, + "ubuntu": OSSKUUbuntu, + "windows2019": OSSKUWindowsTwoZeroOneNine, + "windows2022": OSSKUWindowsTwoZeroTwoTwo, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OSSKU(input) + return &out, nil +} + +type OSType string + +const ( + OSTypeLinux OSType = "Linux" + OSTypeWindows OSType = "Windows" +) + +func PossibleValuesForOSType() []string { + return []string{ + string(OSTypeLinux), + string(OSTypeWindows), + } +} + +func (s *OSType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOSType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOSType(input string) (*OSType, error) { + vals := map[string]OSType{ + "linux": OSTypeLinux, + "windows": OSTypeWindows, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OSType(input) + return &out, nil +} + +type OutboundType string + +const ( + OutboundTypeLoadBalancer OutboundType = "loadBalancer" + OutboundTypeManagedNATGateway OutboundType = "managedNATGateway" + OutboundTypeUserAssignedNATGateway OutboundType = "userAssignedNATGateway" + OutboundTypeUserDefinedRouting OutboundType = "userDefinedRouting" +) + +func PossibleValuesForOutboundType() []string { + return []string{ + string(OutboundTypeLoadBalancer), + string(OutboundTypeManagedNATGateway), + string(OutboundTypeUserAssignedNATGateway), + string(OutboundTypeUserDefinedRouting), + } +} + +func (s *OutboundType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOutboundType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOutboundType(input string) (*OutboundType, error) { + vals := map[string]OutboundType{ + "loadbalancer": OutboundTypeLoadBalancer, + "managednatgateway": OutboundTypeManagedNATGateway, + "userassignednatgateway": OutboundTypeUserAssignedNATGateway, + "userdefinedrouting": OutboundTypeUserDefinedRouting, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OutboundType(input) + return &out, nil +} + +type Protocol string + +const ( + ProtocolTCP Protocol = "TCP" + ProtocolUDP Protocol = "UDP" +) + +func PossibleValuesForProtocol() []string { + return []string{ + string(ProtocolTCP), + string(ProtocolUDP), + } +} + +func (s *Protocol) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProtocol(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProtocol(input string) (*Protocol, error) { + vals := map[string]Protocol{ + "tcp": ProtocolTCP, + "udp": ProtocolUDP, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Protocol(input) + return &out, nil +} + +type PublicNetworkAccess string + +const ( + PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" + PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" +) + +func PossibleValuesForPublicNetworkAccess() []string { + return []string{ + string(PublicNetworkAccessDisabled), + string(PublicNetworkAccessEnabled), + } +} + +func (s *PublicNetworkAccess) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePublicNetworkAccess(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePublicNetworkAccess(input string) (*PublicNetworkAccess, error) { + vals := map[string]PublicNetworkAccess{ + "disabled": PublicNetworkAccessDisabled, + "enabled": PublicNetworkAccessEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PublicNetworkAccess(input) + return &out, nil +} + +type ScaleDownMode string + +const ( + ScaleDownModeDeallocate ScaleDownMode = "Deallocate" + ScaleDownModeDelete ScaleDownMode = "Delete" +) + +func PossibleValuesForScaleDownMode() []string { + return []string{ + string(ScaleDownModeDeallocate), + string(ScaleDownModeDelete), + } +} + +func (s *ScaleDownMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseScaleDownMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseScaleDownMode(input string) (*ScaleDownMode, error) { + vals := map[string]ScaleDownMode{ + "deallocate": ScaleDownModeDeallocate, + "delete": ScaleDownModeDelete, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ScaleDownMode(input) + return &out, nil +} + +type ScaleSetEvictionPolicy string + +const ( + ScaleSetEvictionPolicyDeallocate ScaleSetEvictionPolicy = "Deallocate" + ScaleSetEvictionPolicyDelete ScaleSetEvictionPolicy = "Delete" +) + +func PossibleValuesForScaleSetEvictionPolicy() []string { + return []string{ + string(ScaleSetEvictionPolicyDeallocate), + string(ScaleSetEvictionPolicyDelete), + } +} + +func (s *ScaleSetEvictionPolicy) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseScaleSetEvictionPolicy(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseScaleSetEvictionPolicy(input string) (*ScaleSetEvictionPolicy, error) { + vals := map[string]ScaleSetEvictionPolicy{ + "deallocate": ScaleSetEvictionPolicyDeallocate, + "delete": ScaleSetEvictionPolicyDelete, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ScaleSetEvictionPolicy(input) + return &out, nil +} + +type ScaleSetPriority string + +const ( + ScaleSetPriorityRegular ScaleSetPriority = "Regular" + ScaleSetPrioritySpot ScaleSetPriority = "Spot" +) + +func PossibleValuesForScaleSetPriority() []string { + return []string{ + string(ScaleSetPriorityRegular), + string(ScaleSetPrioritySpot), + } +} + +func (s *ScaleSetPriority) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseScaleSetPriority(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseScaleSetPriority(input string) (*ScaleSetPriority, error) { + vals := map[string]ScaleSetPriority{ + "regular": ScaleSetPriorityRegular, + "spot": ScaleSetPrioritySpot, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ScaleSetPriority(input) + return &out, nil +} + +type ServiceMeshMode string + +const ( + ServiceMeshModeDisabled ServiceMeshMode = "Disabled" + ServiceMeshModeIstio ServiceMeshMode = "Istio" +) + +func PossibleValuesForServiceMeshMode() []string { + return []string{ + string(ServiceMeshModeDisabled), + string(ServiceMeshModeIstio), + } +} + +func (s *ServiceMeshMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseServiceMeshMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseServiceMeshMode(input string) (*ServiceMeshMode, error) { + vals := map[string]ServiceMeshMode{ + "disabled": ServiceMeshModeDisabled, + "istio": ServiceMeshModeIstio, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ServiceMeshMode(input) + return &out, nil +} + +type UpgradeChannel string + +const ( + UpgradeChannelNodeNegativeimage UpgradeChannel = "node-image" + UpgradeChannelNone UpgradeChannel = "none" + UpgradeChannelPatch UpgradeChannel = "patch" + UpgradeChannelRapid UpgradeChannel = "rapid" + UpgradeChannelStable UpgradeChannel = "stable" +) + +func PossibleValuesForUpgradeChannel() []string { + return []string{ + string(UpgradeChannelNodeNegativeimage), + string(UpgradeChannelNone), + string(UpgradeChannelPatch), + string(UpgradeChannelRapid), + string(UpgradeChannelStable), + } +} + +func (s *UpgradeChannel) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseUpgradeChannel(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseUpgradeChannel(input string) (*UpgradeChannel, error) { + vals := map[string]UpgradeChannel{ + "node-image": UpgradeChannelNodeNegativeimage, + "none": UpgradeChannelNone, + "patch": UpgradeChannelPatch, + "rapid": UpgradeChannelRapid, + "stable": UpgradeChannelStable, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := UpgradeChannel(input) + return &out, nil +} + +type WorkloadRuntime string + +const ( + WorkloadRuntimeOCIContainer WorkloadRuntime = "OCIContainer" + WorkloadRuntimeWasmWasi WorkloadRuntime = "WasmWasi" +) + +func PossibleValuesForWorkloadRuntime() []string { + return []string{ + string(WorkloadRuntimeOCIContainer), + string(WorkloadRuntimeWasmWasi), + } +} + +func (s *WorkloadRuntime) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseWorkloadRuntime(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseWorkloadRuntime(input string) (*WorkloadRuntime, error) { + vals := map[string]WorkloadRuntime{ + "ocicontainer": WorkloadRuntimeOCIContainer, + "wasmwasi": WorkloadRuntimeWasmWasi, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WorkloadRuntime(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_accessprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/id_accessprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_accessprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/id_accessprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_commandresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/id_commandresult.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_commandresult.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/id_commandresult.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/id_location.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_location.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/id_location.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_meshrevisionprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/id_meshrevisionprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_meshrevisionprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/id_meshrevisionprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_meshupgradeprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/id_meshupgradeprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_meshupgradeprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/id_meshupgradeprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_abortlatestoperation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_abortlatestoperation.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_abortlatestoperation.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_abortlatestoperation.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_delete.go new file mode 100644 index 0000000000000..d864bc8572a9b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_delete.go @@ -0,0 +1,71 @@ +package managedclusters + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c ManagedClustersClient) Delete(ctx context.Context, id commonids.KubernetesClusterId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c ManagedClustersClient) DeleteThenPoll(ctx context.Context, id commonids.KubernetesClusterId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getaccessprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_getaccessprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getaccessprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_getaccessprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getcommandresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_getcommandresult.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getcommandresult.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_getcommandresult.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getmeshrevisionprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_getmeshrevisionprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getmeshrevisionprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_getmeshrevisionprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getmeshupgradeprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_getmeshupgradeprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getmeshupgradeprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_getmeshupgradeprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getupgradeprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_getupgradeprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getupgradeprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_getupgradeprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_listbyresourcegroup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listbyresourcegroup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_listbyresourcegroup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listclusteradmincredentials.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_listclusteradmincredentials.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listclusteradmincredentials.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_listclusteradmincredentials.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listclustermonitoringusercredentials.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_listclustermonitoringusercredentials.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listclustermonitoringusercredentials.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_listclustermonitoringusercredentials.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listclusterusercredentials.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_listclusterusercredentials.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listclusterusercredentials.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_listclusterusercredentials.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listkubernetesversions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_listkubernetesversions.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listkubernetesversions.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_listkubernetesversions.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listmeshrevisionprofiles.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_listmeshrevisionprofiles.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listmeshrevisionprofiles.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_listmeshrevisionprofiles.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listmeshupgradeprofiles.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_listmeshupgradeprofiles.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listmeshupgradeprofiles.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_listmeshupgradeprofiles.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listoutboundnetworkdependenciesendpoints.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_listoutboundnetworkdependenciesendpoints.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listoutboundnetworkdependenciesendpoints.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_listoutboundnetworkdependenciesendpoints.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_resetaadprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_resetaadprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_resetaadprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_resetaadprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_resetserviceprincipalprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_resetserviceprincipalprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_resetserviceprincipalprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_resetserviceprincipalprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_rotateclustercertificates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_rotateclustercertificates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_rotateclustercertificates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_rotateclustercertificates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_rotateserviceaccountsigningkeys.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_rotateserviceaccountsigningkeys.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_rotateserviceaccountsigningkeys.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_rotateserviceaccountsigningkeys.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_runcommand.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_runcommand.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_runcommand.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_runcommand.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_start.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_start.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_start.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_start.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_stop.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_stop.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_stop.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_stop.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_updatetags.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_updatetags.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_updatetags.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/method_updatetags.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_accessprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_accessprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_accessprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_accessprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_agentpoolnetworkprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_agentpoolnetworkprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_agentpoolnetworkprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_agentpoolnetworkprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_agentpoolupgradesettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_agentpoolupgradesettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_agentpoolupgradesettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_agentpoolupgradesettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_agentpoolwindowsprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_agentpoolwindowsprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_agentpoolwindowsprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_agentpoolwindowsprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_azurekeyvaultkms.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_azurekeyvaultkms.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_azurekeyvaultkms.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_azurekeyvaultkms.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_clusterupgradesettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_clusterupgradesettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_clusterupgradesettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_clusterupgradesettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_commandresultproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_commandresultproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_commandresultproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_commandresultproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_compatibleversions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_compatibleversions.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_compatibleversions.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_compatibleversions.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_containerservicelinuxprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_containerservicelinuxprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_containerservicelinuxprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_containerservicelinuxprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_containerservicenetworkprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_containerservicenetworkprofile.go new file mode 100644 index 0000000000000..c323bac872541 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_containerservicenetworkprofile.go @@ -0,0 +1,22 @@ +package managedclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ContainerServiceNetworkProfile struct { + DnsServiceIP *string `json:"dnsServiceIP,omitempty"` + IPFamilies *[]IPFamily `json:"ipFamilies,omitempty"` + LoadBalancerProfile *ManagedClusterLoadBalancerProfile `json:"loadBalancerProfile,omitempty"` + LoadBalancerSku *LoadBalancerSku `json:"loadBalancerSku,omitempty"` + NatGatewayProfile *ManagedClusterNATGatewayProfile `json:"natGatewayProfile,omitempty"` + NetworkDataplane *NetworkDataplane `json:"networkDataplane,omitempty"` + NetworkMode *NetworkMode `json:"networkMode,omitempty"` + NetworkPlugin *NetworkPlugin `json:"networkPlugin,omitempty"` + NetworkPluginMode *NetworkPluginMode `json:"networkPluginMode,omitempty"` + NetworkPolicy *NetworkPolicy `json:"networkPolicy,omitempty"` + OutboundType *OutboundType `json:"outboundType,omitempty"` + PodCidr *string `json:"podCidr,omitempty"` + PodCidrs *[]string `json:"podCidrs,omitempty"` + ServiceCidr *string `json:"serviceCidr,omitempty"` + ServiceCidrs *[]string `json:"serviceCidrs,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_containerservicesshconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_containerservicesshconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_containerservicesshconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_containerservicesshconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_containerservicesshpublickey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_containerservicesshpublickey.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_containerservicesshpublickey.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_containerservicesshpublickey.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_creationdata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_creationdata.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_creationdata.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_creationdata.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_credentialresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_credentialresult.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_credentialresult.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_credentialresult.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_credentialresults.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_credentialresults.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_credentialresults.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_credentialresults.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_endpointdependency.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_endpointdependency.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_endpointdependency.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_endpointdependency.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_endpointdetail.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_endpointdetail.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_endpointdetail.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_endpointdetail.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_iptag.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_iptag.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_iptag.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_iptag.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_istiocertificateauthority.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_istiocertificateauthority.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_istiocertificateauthority.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_istiocertificateauthority.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_istiocomponents.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_istiocomponents.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_istiocomponents.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_istiocomponents.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_istioegressgateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_istioegressgateway.go new file mode 100644 index 0000000000000..40497051c524a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_istioegressgateway.go @@ -0,0 +1,8 @@ +package managedclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IstioEgressGateway struct { + Enabled bool `json:"enabled"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_istioingressgateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_istioingressgateway.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_istioingressgateway.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_istioingressgateway.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_istioplugincertificateauthority.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_istioplugincertificateauthority.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_istioplugincertificateauthority.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_istioplugincertificateauthority.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_istioservicemesh.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_istioservicemesh.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_istioservicemesh.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_istioservicemesh.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_kubeletconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_kubeletconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_kubeletconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_kubeletconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_kubernetespatchversion.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_kubernetespatchversion.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_kubernetespatchversion.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_kubernetespatchversion.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_kubernetesversion.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_kubernetesversion.go similarity index 87% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_kubernetesversion.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_kubernetesversion.go index 2bb83ce16ee2b..d1ad17500d23b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_kubernetesversion.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_kubernetesversion.go @@ -5,6 +5,7 @@ package managedclusters type KubernetesVersion struct { Capabilities *KubernetesVersionCapabilities `json:"capabilities,omitempty"` + IsDefault *bool `json:"isDefault,omitempty"` IsPreview *bool `json:"isPreview,omitempty"` PatchVersions *map[string]KubernetesPatchVersion `json:"patchVersions,omitempty"` Version *string `json:"version,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_kubernetesversioncapabilities.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_kubernetesversioncapabilities.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_kubernetesversioncapabilities.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_kubernetesversioncapabilities.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_kubernetesversionlistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_kubernetesversionlistresult.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_kubernetesversionlistresult.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_kubernetesversionlistresult.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_linuxosconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_linuxosconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_linuxosconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_linuxosconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedcluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedcluster.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedcluster.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedcluster.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusteraadprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusteraadprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusteraadprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusteraadprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusteraccessprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusteraccessprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusteraccessprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusteraccessprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusteraddonprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusteraddonprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusteraddonprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusteraddonprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusteragentpoolprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusteragentpoolprofile.go new file mode 100644 index 0000000000000..33bb876fc63e0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusteragentpoolprofile.go @@ -0,0 +1,56 @@ +package managedclusters + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedClusterAgentPoolProfile struct { + AvailabilityZones *zones.Schema `json:"availabilityZones,omitempty"` + CapacityReservationGroupID *string `json:"capacityReservationGroupID,omitempty"` + Count *int64 `json:"count,omitempty"` + CreationData *CreationData `json:"creationData,omitempty"` + CurrentOrchestratorVersion *string `json:"currentOrchestratorVersion,omitempty"` + EnableAutoScaling *bool `json:"enableAutoScaling,omitempty"` + EnableEncryptionAtHost *bool `json:"enableEncryptionAtHost,omitempty"` + EnableFIPS *bool `json:"enableFIPS,omitempty"` + EnableNodePublicIP *bool `json:"enableNodePublicIP,omitempty"` + EnableUltraSSD *bool `json:"enableUltraSSD,omitempty"` + GpuInstanceProfile *GPUInstanceProfile `json:"gpuInstanceProfile,omitempty"` + HostGroupID *string `json:"hostGroupID,omitempty"` + KubeletConfig *KubeletConfig `json:"kubeletConfig,omitempty"` + KubeletDiskType *KubeletDiskType `json:"kubeletDiskType,omitempty"` + LinuxOSConfig *LinuxOSConfig `json:"linuxOSConfig,omitempty"` + MaxCount *int64 `json:"maxCount,omitempty"` + MaxPods *int64 `json:"maxPods,omitempty"` + MinCount *int64 `json:"minCount,omitempty"` + Mode *AgentPoolMode `json:"mode,omitempty"` + Name string `json:"name"` + NetworkProfile *AgentPoolNetworkProfile `json:"networkProfile,omitempty"` + NodeImageVersion *string `json:"nodeImageVersion,omitempty"` + NodeLabels *map[string]string `json:"nodeLabels,omitempty"` + NodePublicIPPrefixID *string `json:"nodePublicIPPrefixID,omitempty"` + NodeTaints *[]string `json:"nodeTaints,omitempty"` + OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` + OsDiskSizeGB *int64 `json:"osDiskSizeGB,omitempty"` + OsDiskType *OSDiskType `json:"osDiskType,omitempty"` + OsSKU *OSSKU `json:"osSKU,omitempty"` + OsType *OSType `json:"osType,omitempty"` + PodSubnetID *string `json:"podSubnetID,omitempty"` + PowerState *PowerState `json:"powerState,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + ProximityPlacementGroupID *string `json:"proximityPlacementGroupID,omitempty"` + ScaleDownMode *ScaleDownMode `json:"scaleDownMode,omitempty"` + ScaleSetEvictionPolicy *ScaleSetEvictionPolicy `json:"scaleSetEvictionPolicy,omitempty"` + ScaleSetPriority *ScaleSetPriority `json:"scaleSetPriority,omitempty"` + SpotMaxPrice *float64 `json:"spotMaxPrice,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *AgentPoolType `json:"type,omitempty"` + UpgradeSettings *AgentPoolUpgradeSettings `json:"upgradeSettings,omitempty"` + VMSize *string `json:"vmSize,omitempty"` + VnetSubnetID *string `json:"vnetSubnetID,omitempty"` + WindowsProfile *AgentPoolWindowsProfile `json:"windowsProfile,omitempty"` + WorkloadRuntime *WorkloadRuntime `json:"workloadRuntime,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterapiserveraccessprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterapiserveraccessprofile.go similarity index 80% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterapiserveraccessprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterapiserveraccessprofile.go index 69b53ef85a7d9..30b24b4e52d16 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterapiserveraccessprofile.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterapiserveraccessprofile.go @@ -8,7 +8,5 @@ type ManagedClusterAPIServerAccessProfile struct { DisableRunCommand *bool `json:"disableRunCommand,omitempty"` EnablePrivateCluster *bool `json:"enablePrivateCluster,omitempty"` EnablePrivateClusterPublicFQDN *bool `json:"enablePrivateClusterPublicFQDN,omitempty"` - EnableVnetIntegration *bool `json:"enableVnetIntegration,omitempty"` PrivateDNSZone *string `json:"privateDNSZone,omitempty"` - SubnetId *string `json:"subnetId,omitempty"` } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterautoupgradeprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterautoupgradeprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterautoupgradeprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterautoupgradeprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterazuremonitorprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterazuremonitorprofile.go similarity index 80% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterazuremonitorprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterazuremonitorprofile.go index d718bafe5f8de..8a18140e45a8e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterazuremonitorprofile.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterazuremonitorprofile.go @@ -4,6 +4,5 @@ package managedclusters // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ManagedClusterAzureMonitorProfile struct { - Logs *ManagedClusterAzureMonitorProfileLogs `json:"logs,omitempty"` Metrics *ManagedClusterAzureMonitorProfileMetrics `json:"metrics,omitempty"` } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterazuremonitorprofilekubestatemetrics.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterazuremonitorprofilekubestatemetrics.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterazuremonitorprofilekubestatemetrics.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterazuremonitorprofilekubestatemetrics.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterazuremonitorprofilemetrics.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterazuremonitorprofilemetrics.go new file mode 100644 index 0000000000000..5c173441517a3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterazuremonitorprofilemetrics.go @@ -0,0 +1,9 @@ +package managedclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedClusterAzureMonitorProfileMetrics struct { + Enabled bool `json:"enabled"` + KubeStateMetrics *ManagedClusterAzureMonitorProfileKubeStateMetrics `json:"kubeStateMetrics,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclustercostanalysis.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclustercostanalysis.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclustercostanalysis.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclustercostanalysis.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterhttpproxyconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterhttpproxyconfig.go new file mode 100644 index 0000000000000..33161aad96939 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterhttpproxyconfig.go @@ -0,0 +1,11 @@ +package managedclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedClusterHTTPProxyConfig struct { + HTTPProxy *string `json:"httpProxy,omitempty"` + HTTPSProxy *string `json:"httpsProxy,omitempty"` + NoProxy *[]string `json:"noProxy,omitempty"` + TrustedCa *string `json:"trustedCa,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusteringressprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusteringressprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusteringressprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusteringressprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusteringressprofilewebapprouting.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusteringressprofilewebapprouting.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusteringressprofilewebapprouting.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusteringressprofilewebapprouting.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterloadbalancerprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterloadbalancerprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterloadbalancerprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterloadbalancerprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterloadbalancerprofilemanagedoutboundips.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterloadbalancerprofilemanagedoutboundips.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterloadbalancerprofilemanagedoutboundips.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterloadbalancerprofilemanagedoutboundips.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterloadbalancerprofileoutboundipprefixes.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterloadbalancerprofileoutboundipprefixes.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterloadbalancerprofileoutboundipprefixes.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterloadbalancerprofileoutboundipprefixes.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterloadbalancerprofileoutboundips.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterloadbalancerprofileoutboundips.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterloadbalancerprofileoutboundips.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterloadbalancerprofileoutboundips.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclustermanagedoutboundipprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclustermanagedoutboundipprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclustermanagedoutboundipprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclustermanagedoutboundipprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclustermetricsprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclustermetricsprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclustermetricsprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclustermetricsprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusternatgatewayprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusternatgatewayprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusternatgatewayprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusternatgatewayprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusteroidcissuerprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusteroidcissuerprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusteroidcissuerprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusteroidcissuerprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterpodidentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterpodidentity.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterpodidentity.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterpodidentity.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterpodidentityexception.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterpodidentityexception.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterpodidentityexception.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterpodidentityexception.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterpodidentityprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterpodidentityprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterpodidentityprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterpodidentityprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterpodidentityprovisioningerror.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterpodidentityprovisioningerror.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterpodidentityprovisioningerror.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterpodidentityprovisioningerror.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterpodidentityprovisioningerrorbody.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterpodidentityprovisioningerrorbody.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterpodidentityprovisioningerrorbody.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterpodidentityprovisioningerrorbody.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterpodidentityprovisioninginfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterpodidentityprovisioninginfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterpodidentityprovisioninginfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterpodidentityprovisioninginfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterpoolupgradeprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterpoolupgradeprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterpoolupgradeprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterpoolupgradeprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterpoolupgradeprofileupgradesinlined.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterpoolupgradeprofileupgradesinlined.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterpoolupgradeprofileupgradesinlined.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterpoolupgradeprofileupgradesinlined.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterproperties.go new file mode 100644 index 0000000000000..091dcdfdde4a9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterproperties.go @@ -0,0 +1,48 @@ +package managedclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedClusterProperties struct { + AadProfile *ManagedClusterAADProfile `json:"aadProfile,omitempty"` + AddonProfiles *map[string]ManagedClusterAddonProfile `json:"addonProfiles,omitempty"` + AgentPoolProfiles *[]ManagedClusterAgentPoolProfile `json:"agentPoolProfiles,omitempty"` + ApiServerAccessProfile *ManagedClusterAPIServerAccessProfile `json:"apiServerAccessProfile,omitempty"` + AutoScalerProfile *ManagedClusterPropertiesAutoScalerProfile `json:"autoScalerProfile,omitempty"` + AutoUpgradeProfile *ManagedClusterAutoUpgradeProfile `json:"autoUpgradeProfile,omitempty"` + AzureMonitorProfile *ManagedClusterAzureMonitorProfile `json:"azureMonitorProfile,omitempty"` + AzurePortalFQDN *string `json:"azurePortalFQDN,omitempty"` + CurrentKubernetesVersion *string `json:"currentKubernetesVersion,omitempty"` + DisableLocalAccounts *bool `json:"disableLocalAccounts,omitempty"` + DiskEncryptionSetID *string `json:"diskEncryptionSetID,omitempty"` + DnsPrefix *string `json:"dnsPrefix,omitempty"` + EnablePodSecurityPolicy *bool `json:"enablePodSecurityPolicy,omitempty"` + EnableRBAC *bool `json:"enableRBAC,omitempty"` + Fqdn *string `json:"fqdn,omitempty"` + FqdnSubdomain *string `json:"fqdnSubdomain,omitempty"` + HTTPProxyConfig *ManagedClusterHTTPProxyConfig `json:"httpProxyConfig,omitempty"` + IdentityProfile *map[string]UserAssignedIdentity `json:"identityProfile,omitempty"` + IngressProfile *ManagedClusterIngressProfile `json:"ingressProfile,omitempty"` + KubernetesVersion *string `json:"kubernetesVersion,omitempty"` + LinuxProfile *ContainerServiceLinuxProfile `json:"linuxProfile,omitempty"` + MaxAgentPools *int64 `json:"maxAgentPools,omitempty"` + MetricsProfile *ManagedClusterMetricsProfile `json:"metricsProfile,omitempty"` + NetworkProfile *ContainerServiceNetworkProfile `json:"networkProfile,omitempty"` + NodeResourceGroup *string `json:"nodeResourceGroup,omitempty"` + OidcIssuerProfile *ManagedClusterOIDCIssuerProfile `json:"oidcIssuerProfile,omitempty"` + PodIdentityProfile *ManagedClusterPodIdentityProfile `json:"podIdentityProfile,omitempty"` + PowerState *PowerState `json:"powerState,omitempty"` + PrivateFQDN *string `json:"privateFQDN,omitempty"` + PrivateLinkResources *[]PrivateLinkResource `json:"privateLinkResources,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + ResourceUID *string `json:"resourceUID,omitempty"` + SecurityProfile *ManagedClusterSecurityProfile `json:"securityProfile,omitempty"` + ServiceMeshProfile *ServiceMeshProfile `json:"serviceMeshProfile,omitempty"` + ServicePrincipalProfile *ManagedClusterServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"` + StorageProfile *ManagedClusterStorageProfile `json:"storageProfile,omitempty"` + SupportPlan *KubernetesSupportPlan `json:"supportPlan,omitempty"` + UpgradeSettings *ClusterUpgradeSettings `json:"upgradeSettings,omitempty"` + WindowsProfile *ManagedClusterWindowsProfile `json:"windowsProfile,omitempty"` + WorkloadAutoScalerProfile *ManagedClusterWorkloadAutoScalerProfile `json:"workloadAutoScalerProfile,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterpropertiesautoscalerprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterpropertiesautoscalerprofile.go new file mode 100644 index 0000000000000..3f718456e6e2d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterpropertiesautoscalerprofile.go @@ -0,0 +1,27 @@ +package managedclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedClusterPropertiesAutoScalerProfile struct { + BalanceSimilarNodeGroups *string `json:"balance-similar-node-groups,omitempty"` + DaemonsetEvictionForEmptyNodes *bool `json:"daemonset-eviction-for-empty-nodes,omitempty"` + DaemonsetEvictionForOccupiedNodes *bool `json:"daemonset-eviction-for-occupied-nodes,omitempty"` + Expander *Expander `json:"expander,omitempty"` + IgnoreDaemonsetsUtilization *bool `json:"ignore-daemonsets-utilization,omitempty"` + MaxEmptyBulkDelete *string `json:"max-empty-bulk-delete,omitempty"` + MaxGracefulTerminationSec *string `json:"max-graceful-termination-sec,omitempty"` + MaxNodeProvisionTime *string `json:"max-node-provision-time,omitempty"` + MaxTotalUnreadyPercentage *string `json:"max-total-unready-percentage,omitempty"` + NewPodScaleUpDelay *string `json:"new-pod-scale-up-delay,omitempty"` + OkTotalUnreadyCount *string `json:"ok-total-unready-count,omitempty"` + ScaleDownDelayAfterAdd *string `json:"scale-down-delay-after-add,omitempty"` + ScaleDownDelayAfterDelete *string `json:"scale-down-delay-after-delete,omitempty"` + ScaleDownDelayAfterFailure *string `json:"scale-down-delay-after-failure,omitempty"` + ScaleDownUnneededTime *string `json:"scale-down-unneeded-time,omitempty"` + ScaleDownUnreadyTime *string `json:"scale-down-unready-time,omitempty"` + ScaleDownUtilizationThreshold *string `json:"scale-down-utilization-threshold,omitempty"` + ScanInterval *string `json:"scan-interval,omitempty"` + SkipNodesWithLocalStorage *string `json:"skip-nodes-with-local-storage,omitempty"` + SkipNodesWithSystemPods *string `json:"skip-nodes-with-system-pods,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclustersecurityprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclustersecurityprofile.go new file mode 100644 index 0000000000000..a7b526d795267 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclustersecurityprofile.go @@ -0,0 +1,11 @@ +package managedclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedClusterSecurityProfile struct { + AzureKeyVaultKms *AzureKeyVaultKms `json:"azureKeyVaultKms,omitempty"` + Defender *ManagedClusterSecurityProfileDefender `json:"defender,omitempty"` + ImageCleaner *ManagedClusterSecurityProfileImageCleaner `json:"imageCleaner,omitempty"` + WorkloadIdentity *ManagedClusterSecurityProfileWorkloadIdentity `json:"workloadIdentity,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclustersecurityprofiledefender.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclustersecurityprofiledefender.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclustersecurityprofiledefender.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclustersecurityprofiledefender.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclustersecurityprofiledefendersecuritymonitoring.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclustersecurityprofiledefendersecuritymonitoring.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclustersecurityprofiledefendersecuritymonitoring.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclustersecurityprofiledefendersecuritymonitoring.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclustersecurityprofileimagecleaner.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclustersecurityprofileimagecleaner.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclustersecurityprofileimagecleaner.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclustersecurityprofileimagecleaner.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclustersecurityprofileworkloadidentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclustersecurityprofileworkloadidentity.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclustersecurityprofileworkloadidentity.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclustersecurityprofileworkloadidentity.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterserviceprincipalprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterserviceprincipalprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterserviceprincipalprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterserviceprincipalprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclustersku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclustersku.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclustersku.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclustersku.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterstorageprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterstorageprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterstorageprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterstorageprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterstorageprofileblobcsidriver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterstorageprofileblobcsidriver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterstorageprofileblobcsidriver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterstorageprofileblobcsidriver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterstorageprofilediskcsidriver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterstorageprofilediskcsidriver.go new file mode 100644 index 0000000000000..11eb0e5deb1cd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterstorageprofilediskcsidriver.go @@ -0,0 +1,8 @@ +package managedclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedClusterStorageProfileDiskCSIDriver struct { + Enabled *bool `json:"enabled,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterstorageprofilefilecsidriver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterstorageprofilefilecsidriver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterstorageprofilefilecsidriver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterstorageprofilefilecsidriver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterstorageprofilesnapshotcontroller.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterstorageprofilesnapshotcontroller.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterstorageprofilesnapshotcontroller.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterstorageprofilesnapshotcontroller.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterupgradeprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterupgradeprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterupgradeprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterupgradeprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterupgradeprofileproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterupgradeprofileproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterupgradeprofileproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterupgradeprofileproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterwindowsprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterwindowsprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterwindowsprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterwindowsprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterworkloadautoscalerprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterworkloadautoscalerprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterworkloadautoscalerprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterworkloadautoscalerprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterworkloadautoscalerprofilekeda.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterworkloadautoscalerprofilekeda.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_managedclusterworkloadautoscalerprofilekeda.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterworkloadautoscalerprofilekeda.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterworkloadautoscalerprofileverticalpodautoscaler.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterworkloadautoscalerprofileverticalpodautoscaler.go new file mode 100644 index 0000000000000..baf9e23d43c79 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_managedclusterworkloadautoscalerprofileverticalpodautoscaler.go @@ -0,0 +1,8 @@ +package managedclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler struct { + Enabled bool `json:"enabled"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_meshrevision.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_meshrevision.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_meshrevision.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_meshrevision.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_meshrevisionprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_meshrevisionprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_meshrevisionprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_meshrevisionprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_meshrevisionprofileproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_meshrevisionprofileproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_meshrevisionprofileproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_meshrevisionprofileproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_meshupgradeprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_meshupgradeprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_meshupgradeprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_meshupgradeprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_outboundenvironmentendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_outboundenvironmentendpoint.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_outboundenvironmentendpoint.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_outboundenvironmentendpoint.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_portrange.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_portrange.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_portrange.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_portrange.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_powerstate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_powerstate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_powerstate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_powerstate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_privatelinkresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_privatelinkresource.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_privatelinkresource.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_privatelinkresource.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_resourcereference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_resourcereference.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_resourcereference.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_resourcereference.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_runcommandrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_runcommandrequest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_runcommandrequest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_runcommandrequest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_runcommandresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_runcommandresult.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_runcommandresult.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_runcommandresult.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_servicemeshprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_servicemeshprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_servicemeshprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_servicemeshprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_sysctlconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_sysctlconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_sysctlconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_sysctlconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_tagsobject.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_tagsobject.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_tagsobject.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_tagsobject.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_upgradeoverridesettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_upgradeoverridesettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_upgradeoverridesettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_upgradeoverridesettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_userassignedidentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_userassignedidentity.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_userassignedidentity.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_userassignedidentity.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_windowsgmsaprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_windowsgmsaprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters/model_windowsgmsaprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/model_windowsgmsaprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/predicates.go new file mode 100644 index 0000000000000..d0e36a85def41 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/predicates.go @@ -0,0 +1,91 @@ +package managedclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedClusterOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p ManagedClusterOperationPredicate) Matches(input ManagedCluster) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type MeshRevisionProfileOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p MeshRevisionProfileOperationPredicate) Matches(input MeshRevisionProfile) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type MeshUpgradeProfileOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p MeshUpgradeProfileOperationPredicate) Matches(input MeshUpgradeProfile) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type OutboundEnvironmentEndpointOperationPredicate struct { + Category *string +} + +func (p OutboundEnvironmentEndpointOperationPredicate) Matches(input OutboundEnvironmentEndpoint) bool { + + if p.Category != nil && (input.Category == nil || *p.Category != *input.Category) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/version.go new file mode 100644 index 0000000000000..6c773894558a3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters/version.go @@ -0,0 +1,12 @@ +package managedclusters + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-05-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/managedclusters/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/README.md new file mode 100644 index 0000000000000..d6b53d27f3bdf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/README.md @@ -0,0 +1,129 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots` Documentation + +The `snapshots` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-05-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots" +``` + + +### Client Initialization + +```go +client := snapshots.NewSnapshotsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `SnapshotsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := snapshots.NewSnapshotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "snapshotValue") + +payload := snapshots.Snapshot{ + // ... +} + + +read, err := client.CreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `SnapshotsClient.Delete` + +```go +ctx := context.TODO() +id := snapshots.NewSnapshotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "snapshotValue") + +read, err := client.Delete(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `SnapshotsClient.Get` + +```go +ctx := context.TODO() +id := snapshots.NewSnapshotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "snapshotValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `SnapshotsClient.List` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `SnapshotsClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `SnapshotsClient.UpdateTags` + +```go +ctx := context.TODO() +id := snapshots.NewSnapshotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "snapshotValue") + +payload := snapshots.TagsObject{ + // ... +} + + +read, err := client.UpdateTags(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/constants.go new file mode 100644 index 0000000000000..f8683c860fd9d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/constants.go @@ -0,0 +1,139 @@ +package snapshots + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OSSKU string + +const ( + OSSKUAzureLinux OSSKU = "AzureLinux" + OSSKUCBLMariner OSSKU = "CBLMariner" + OSSKUUbuntu OSSKU = "Ubuntu" + OSSKUWindowsTwoZeroOneNine OSSKU = "Windows2019" + OSSKUWindowsTwoZeroTwoTwo OSSKU = "Windows2022" +) + +func PossibleValuesForOSSKU() []string { + return []string{ + string(OSSKUAzureLinux), + string(OSSKUCBLMariner), + string(OSSKUUbuntu), + string(OSSKUWindowsTwoZeroOneNine), + string(OSSKUWindowsTwoZeroTwoTwo), + } +} + +func (s *OSSKU) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOSSKU(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOSSKU(input string) (*OSSKU, error) { + vals := map[string]OSSKU{ + "azurelinux": OSSKUAzureLinux, + "cblmariner": OSSKUCBLMariner, + "ubuntu": OSSKUUbuntu, + "windows2019": OSSKUWindowsTwoZeroOneNine, + "windows2022": OSSKUWindowsTwoZeroTwoTwo, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OSSKU(input) + return &out, nil +} + +type OSType string + +const ( + OSTypeLinux OSType = "Linux" + OSTypeWindows OSType = "Windows" +) + +func PossibleValuesForOSType() []string { + return []string{ + string(OSTypeLinux), + string(OSTypeWindows), + } +} + +func (s *OSType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOSType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOSType(input string) (*OSType, error) { + vals := map[string]OSType{ + "linux": OSTypeLinux, + "windows": OSTypeWindows, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OSType(input) + return &out, nil +} + +type SnapshotType string + +const ( + SnapshotTypeNodePool SnapshotType = "NodePool" +) + +func PossibleValuesForSnapshotType() []string { + return []string{ + string(SnapshotTypeNodePool), + } +} + +func (s *SnapshotType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSnapshotType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSnapshotType(input string) (*SnapshotType, error) { + vals := map[string]SnapshotType{ + "nodepool": SnapshotTypeNodePool, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SnapshotType(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/id_snapshot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/id_snapshot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/id_snapshot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/id_snapshot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/method_listbyresourcegroup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/method_listbyresourcegroup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/method_listbyresourcegroup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/method_updatetags.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/method_updatetags.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/method_updatetags.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/method_updatetags.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/model_creationdata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/model_creationdata.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/model_creationdata.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/model_creationdata.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/model_snapshot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/model_snapshot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/model_snapshot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/model_snapshot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/model_snapshotproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/model_snapshotproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/model_snapshotproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/model_snapshotproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/model_tagsobject.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/model_tagsobject.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/model_tagsobject.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/model_tagsobject.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/version.go new file mode 100644 index 0000000000000..5297cad0e1676 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots/version.go @@ -0,0 +1,12 @@ +package snapshots + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-05-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/snapshots/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/client.go new file mode 100644 index 0000000000000..574bca99e0854 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/client.go @@ -0,0 +1,118 @@ +package v2024_07_10 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions" + "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles" + "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses" + "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions" + "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade" + "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile" + "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines" + "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration" + "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections" + "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources" + "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +type Client struct { + Extensions *extensions.ExtensionsClient + LicenseProfiles *licenseprofiles.LicenseProfilesClient + Licenses *licenses.LicensesClient + MachineExtensions *machineextensions.MachineExtensionsClient + MachineExtensionsUpgrade *machineextensionsupgrade.MachineExtensionsUpgradeClient + MachineNetworkProfile *machinenetworkprofile.MachineNetworkProfileClient + Machines *machines.MachinesClient + NetworkSecurityPerimeterConfiguration *networksecurityperimeterconfiguration.NetworkSecurityPerimeterConfigurationClient + PrivateEndpointConnections *privateendpointconnections.PrivateEndpointConnectionsClient + PrivateLinkResources *privatelinkresources.PrivateLinkResourcesClient + PrivateLinkScopes *privatelinkscopes.PrivateLinkScopesClient +} + +func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { + extensionsClient, err := extensions.NewExtensionsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Extensions client: %+v", err) + } + configureFunc(extensionsClient.Client) + + licenseProfilesClient, err := licenseprofiles.NewLicenseProfilesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building LicenseProfiles client: %+v", err) + } + configureFunc(licenseProfilesClient.Client) + + licensesClient, err := licenses.NewLicensesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Licenses client: %+v", err) + } + configureFunc(licensesClient.Client) + + machineExtensionsClient, err := machineextensions.NewMachineExtensionsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building MachineExtensions client: %+v", err) + } + configureFunc(machineExtensionsClient.Client) + + machineExtensionsUpgradeClient, err := machineextensionsupgrade.NewMachineExtensionsUpgradeClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building MachineExtensionsUpgrade client: %+v", err) + } + configureFunc(machineExtensionsUpgradeClient.Client) + + machineNetworkProfileClient, err := machinenetworkprofile.NewMachineNetworkProfileClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building MachineNetworkProfile client: %+v", err) + } + configureFunc(machineNetworkProfileClient.Client) + + machinesClient, err := machines.NewMachinesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Machines client: %+v", err) + } + configureFunc(machinesClient.Client) + + networkSecurityPerimeterConfigurationClient, err := networksecurityperimeterconfiguration.NewNetworkSecurityPerimeterConfigurationClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building NetworkSecurityPerimeterConfiguration client: %+v", err) + } + configureFunc(networkSecurityPerimeterConfigurationClient.Client) + + privateEndpointConnectionsClient, err := privateendpointconnections.NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building PrivateEndpointConnections client: %+v", err) + } + configureFunc(privateEndpointConnectionsClient.Client) + + privateLinkResourcesClient, err := privatelinkresources.NewPrivateLinkResourcesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building PrivateLinkResources client: %+v", err) + } + configureFunc(privateLinkResourcesClient.Client) + + privateLinkScopesClient, err := privatelinkscopes.NewPrivateLinkScopesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building PrivateLinkScopes client: %+v", err) + } + configureFunc(privateLinkScopesClient.Client) + + return &Client{ + Extensions: extensionsClient, + LicenseProfiles: licenseProfilesClient, + Licenses: licensesClient, + MachineExtensions: machineExtensionsClient, + MachineExtensionsUpgrade: machineExtensionsUpgradeClient, + MachineNetworkProfile: machineNetworkProfileClient, + Machines: machinesClient, + NetworkSecurityPerimeterConfiguration: networkSecurityPerimeterConfigurationClient, + PrivateEndpointConnections: privateEndpointConnectionsClient, + PrivateLinkResources: privateLinkResourcesClient, + PrivateLinkScopes: privateLinkScopesClient, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/README.md new file mode 100644 index 0000000000000..6b1042b316494 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/README.md @@ -0,0 +1,52 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions` Documentation + +The `extensions` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-07-10`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions" +``` + + +### Client Initialization + +```go +client := extensions.NewExtensionsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ExtensionsClient.ExtensionMetadataGet` + +```go +ctx := context.TODO() +id := extensions.NewVersionID("12345678-1234-9876-4563-123456789012", "locationValue", "publisherValue", "extensionTypeValue", "versionValue") + +read, err := client.ExtensionMetadataGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ExtensionsClient.ExtensionMetadataList` + +```go +ctx := context.TODO() +id := extensions.NewExtensionTypeID("12345678-1234-9876-4563-123456789012", "locationValue", "publisherValue", "extensionTypeValue") + +read, err := client.ExtensionMetadataList(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/client.go new file mode 100644 index 0000000000000..44725ac0e8463 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/client.go @@ -0,0 +1,26 @@ +package extensions + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtensionsClient struct { + Client *resourcemanager.Client +} + +func NewExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExtensionsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "extensions", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ExtensionsClient: %+v", err) + } + + return &ExtensionsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/id_extensiontype.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/id_extensiontype.go new file mode 100644 index 0000000000000..b57b7e61a53c3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/id_extensiontype.go @@ -0,0 +1,139 @@ +package extensions + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&ExtensionTypeId{}) +} + +var _ resourceids.ResourceId = &ExtensionTypeId{} + +// ExtensionTypeId is a struct representing the Resource ID for a Extension Type +type ExtensionTypeId struct { + SubscriptionId string + LocationName string + PublisherName string + ExtensionTypeName string +} + +// NewExtensionTypeID returns a new ExtensionTypeId struct +func NewExtensionTypeID(subscriptionId string, locationName string, publisherName string, extensionTypeName string) ExtensionTypeId { + return ExtensionTypeId{ + SubscriptionId: subscriptionId, + LocationName: locationName, + PublisherName: publisherName, + ExtensionTypeName: extensionTypeName, + } +} + +// ParseExtensionTypeID parses 'input' into a ExtensionTypeId +func ParseExtensionTypeID(input string) (*ExtensionTypeId, error) { + parser := resourceids.NewParserFromResourceIdType(&ExtensionTypeId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ExtensionTypeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseExtensionTypeIDInsensitively parses 'input' case-insensitively into a ExtensionTypeId +// note: this method should only be used for API response data and not user input +func ParseExtensionTypeIDInsensitively(input string) (*ExtensionTypeId, error) { + parser := resourceids.NewParserFromResourceIdType(&ExtensionTypeId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ExtensionTypeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ExtensionTypeId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) + } + + if id.PublisherName, ok = input.Parsed["publisherName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "publisherName", input) + } + + if id.ExtensionTypeName, ok = input.Parsed["extensionTypeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "extensionTypeName", input) + } + + return nil +} + +// ValidateExtensionTypeID checks that 'input' can be parsed as a Extension Type ID +func ValidateExtensionTypeID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseExtensionTypeID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Extension Type ID +func (id ExtensionTypeId) ID() string { + fmtString := "/subscriptions/%s/providers/Microsoft.HybridCompute/locations/%s/publishers/%s/extensionTypes/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName, id.PublisherName, id.ExtensionTypeName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Extension Type ID +func (id ExtensionTypeId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftHybridCompute", "Microsoft.HybridCompute", "Microsoft.HybridCompute"), + resourceids.StaticSegment("staticLocations", "locations", "locations"), + resourceids.UserSpecifiedSegment("locationName", "locationValue"), + resourceids.StaticSegment("staticPublishers", "publishers", "publishers"), + resourceids.UserSpecifiedSegment("publisherName", "publisherValue"), + resourceids.StaticSegment("staticExtensionTypes", "extensionTypes", "extensionTypes"), + resourceids.UserSpecifiedSegment("extensionTypeName", "extensionTypeValue"), + } +} + +// String returns a human-readable description of this Extension Type ID +func (id ExtensionTypeId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Location Name: %q", id.LocationName), + fmt.Sprintf("Publisher Name: %q", id.PublisherName), + fmt.Sprintf("Extension Type Name: %q", id.ExtensionTypeName), + } + return fmt.Sprintf("Extension Type (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/id_version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/id_version.go new file mode 100644 index 0000000000000..55ff31c5d3a1c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/id_version.go @@ -0,0 +1,148 @@ +package extensions + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&VersionId{}) +} + +var _ resourceids.ResourceId = &VersionId{} + +// VersionId is a struct representing the Resource ID for a Version +type VersionId struct { + SubscriptionId string + LocationName string + PublisherName string + ExtensionTypeName string + VersionName string +} + +// NewVersionID returns a new VersionId struct +func NewVersionID(subscriptionId string, locationName string, publisherName string, extensionTypeName string, versionName string) VersionId { + return VersionId{ + SubscriptionId: subscriptionId, + LocationName: locationName, + PublisherName: publisherName, + ExtensionTypeName: extensionTypeName, + VersionName: versionName, + } +} + +// ParseVersionID parses 'input' into a VersionId +func ParseVersionID(input string) (*VersionId, error) { + parser := resourceids.NewParserFromResourceIdType(&VersionId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := VersionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseVersionIDInsensitively parses 'input' case-insensitively into a VersionId +// note: this method should only be used for API response data and not user input +func ParseVersionIDInsensitively(input string) (*VersionId, error) { + parser := resourceids.NewParserFromResourceIdType(&VersionId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := VersionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *VersionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) + } + + if id.PublisherName, ok = input.Parsed["publisherName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "publisherName", input) + } + + if id.ExtensionTypeName, ok = input.Parsed["extensionTypeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "extensionTypeName", input) + } + + if id.VersionName, ok = input.Parsed["versionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "versionName", input) + } + + return nil +} + +// ValidateVersionID checks that 'input' can be parsed as a Version ID +func ValidateVersionID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseVersionID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Version ID +func (id VersionId) ID() string { + fmtString := "/subscriptions/%s/providers/Microsoft.HybridCompute/locations/%s/publishers/%s/extensionTypes/%s/versions/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName, id.PublisherName, id.ExtensionTypeName, id.VersionName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Version ID +func (id VersionId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftHybridCompute", "Microsoft.HybridCompute", "Microsoft.HybridCompute"), + resourceids.StaticSegment("staticLocations", "locations", "locations"), + resourceids.UserSpecifiedSegment("locationName", "locationValue"), + resourceids.StaticSegment("staticPublishers", "publishers", "publishers"), + resourceids.UserSpecifiedSegment("publisherName", "publisherValue"), + resourceids.StaticSegment("staticExtensionTypes", "extensionTypes", "extensionTypes"), + resourceids.UserSpecifiedSegment("extensionTypeName", "extensionTypeValue"), + resourceids.StaticSegment("staticVersions", "versions", "versions"), + resourceids.UserSpecifiedSegment("versionName", "versionValue"), + } +} + +// String returns a human-readable description of this Version ID +func (id VersionId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Location Name: %q", id.LocationName), + fmt.Sprintf("Publisher Name: %q", id.PublisherName), + fmt.Sprintf("Extension Type Name: %q", id.ExtensionTypeName), + fmt.Sprintf("Version Name: %q", id.VersionName), + } + return fmt.Sprintf("Version (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/method_extensionmetadataget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/method_extensionmetadataget.go new file mode 100644 index 0000000000000..1f50b2ab8e60f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/method_extensionmetadataget.go @@ -0,0 +1,54 @@ +package extensions + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtensionMetadataGetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ExtensionValue +} + +// ExtensionMetadataGet ... +func (c ExtensionsClient) ExtensionMetadataGet(ctx context.Context, id VersionId) (result ExtensionMetadataGetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ExtensionValue + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/method_extensionmetadatalist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/method_extensionmetadatalist.go new file mode 100644 index 0000000000000..1d9af8e54ac4d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/method_extensionmetadatalist.go @@ -0,0 +1,55 @@ +package extensions + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtensionMetadataListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ExtensionValueListResult +} + +// ExtensionMetadataList ... +func (c ExtensionsClient) ExtensionMetadataList(ctx context.Context, id ExtensionTypeId) (result ExtensionMetadataListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/versions", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ExtensionValueListResult + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/model_extensionvalue.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/model_extensionvalue.go new file mode 100644 index 0000000000000..6dd976ec34cad --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/model_extensionvalue.go @@ -0,0 +1,16 @@ +package extensions + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtensionValue struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ExtensionValueProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/model_extensionvaluelistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/model_extensionvaluelistresult.go new file mode 100644 index 0000000000000..06a10203391d5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/model_extensionvaluelistresult.go @@ -0,0 +1,8 @@ +package extensions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtensionValueListResult struct { + Value *[]ExtensionValue `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/model_extensionvalueproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/model_extensionvalueproperties.go new file mode 100644 index 0000000000000..8b1eac1d9c683 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/model_extensionvalueproperties.go @@ -0,0 +1,10 @@ +package extensions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtensionValueProperties struct { + ExtensionType *string `json:"extensionType,omitempty"` + Publisher *string `json:"publisher,omitempty"` + Version *string `json:"version,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/version.go new file mode 100644 index 0000000000000..01cb89c542324 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions/version.go @@ -0,0 +1,12 @@ +package extensions + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-07-10" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/extensions/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/README.md new file mode 100644 index 0000000000000..4cf25ac05ae51 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/README.md @@ -0,0 +1,99 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles` Documentation + +The `licenseprofiles` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-07-10`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles" +``` + + +### Client Initialization + +```go +client := licenseprofiles.NewLicenseProfilesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `LicenseProfilesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := licenseprofiles.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue") + +payload := licenseprofiles.LicenseProfile{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `LicenseProfilesClient.Delete` + +```go +ctx := context.TODO() +id := licenseprofiles.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `LicenseProfilesClient.Get` + +```go +ctx := context.TODO() +id := licenseprofiles.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `LicenseProfilesClient.List` + +```go +ctx := context.TODO() +id := licenseprofiles.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `LicenseProfilesClient.Update` + +```go +ctx := context.TODO() +id := licenseprofiles.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue") + +payload := licenseprofiles.LicenseProfileUpdate{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/client.go new file mode 100644 index 0000000000000..5fcae28e71972 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/client.go @@ -0,0 +1,26 @@ +package licenseprofiles + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LicenseProfilesClient struct { + Client *resourcemanager.Client +} + +func NewLicenseProfilesClientWithBaseURI(sdkApi sdkEnv.Api) (*LicenseProfilesClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "licenseprofiles", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating LicenseProfilesClient: %+v", err) + } + + return &LicenseProfilesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/constants.go new file mode 100644 index 0000000000000..2c4d8a8903720 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/constants.go @@ -0,0 +1,330 @@ +package licenseprofiles + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EsuEligibility string + +const ( + EsuEligibilityEligible EsuEligibility = "Eligible" + EsuEligibilityIneligible EsuEligibility = "Ineligible" + EsuEligibilityUnknown EsuEligibility = "Unknown" +) + +func PossibleValuesForEsuEligibility() []string { + return []string{ + string(EsuEligibilityEligible), + string(EsuEligibilityIneligible), + string(EsuEligibilityUnknown), + } +} + +func (s *EsuEligibility) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseEsuEligibility(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseEsuEligibility(input string) (*EsuEligibility, error) { + vals := map[string]EsuEligibility{ + "eligible": EsuEligibilityEligible, + "ineligible": EsuEligibilityIneligible, + "unknown": EsuEligibilityUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EsuEligibility(input) + return &out, nil +} + +type EsuKeyState string + +const ( + EsuKeyStateActive EsuKeyState = "Active" + EsuKeyStateInactive EsuKeyState = "Inactive" +) + +func PossibleValuesForEsuKeyState() []string { + return []string{ + string(EsuKeyStateActive), + string(EsuKeyStateInactive), + } +} + +func (s *EsuKeyState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseEsuKeyState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseEsuKeyState(input string) (*EsuKeyState, error) { + vals := map[string]EsuKeyState{ + "active": EsuKeyStateActive, + "inactive": EsuKeyStateInactive, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EsuKeyState(input) + return &out, nil +} + +type EsuServerType string + +const ( + EsuServerTypeDatacenter EsuServerType = "Datacenter" + EsuServerTypeStandard EsuServerType = "Standard" +) + +func PossibleValuesForEsuServerType() []string { + return []string{ + string(EsuServerTypeDatacenter), + string(EsuServerTypeStandard), + } +} + +func (s *EsuServerType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseEsuServerType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseEsuServerType(input string) (*EsuServerType, error) { + vals := map[string]EsuServerType{ + "datacenter": EsuServerTypeDatacenter, + "standard": EsuServerTypeStandard, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EsuServerType(input) + return &out, nil +} + +type LicenseProfileProductType string + +const ( + LicenseProfileProductTypeWindowsIoTEnterprise LicenseProfileProductType = "WindowsIoTEnterprise" + LicenseProfileProductTypeWindowsServer LicenseProfileProductType = "WindowsServer" +) + +func PossibleValuesForLicenseProfileProductType() []string { + return []string{ + string(LicenseProfileProductTypeWindowsIoTEnterprise), + string(LicenseProfileProductTypeWindowsServer), + } +} + +func (s *LicenseProfileProductType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLicenseProfileProductType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLicenseProfileProductType(input string) (*LicenseProfileProductType, error) { + vals := map[string]LicenseProfileProductType{ + "windowsiotenterprise": LicenseProfileProductTypeWindowsIoTEnterprise, + "windowsserver": LicenseProfileProductTypeWindowsServer, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LicenseProfileProductType(input) + return &out, nil +} + +type LicenseProfileSubscriptionStatus string + +const ( + LicenseProfileSubscriptionStatusDisabled LicenseProfileSubscriptionStatus = "Disabled" + LicenseProfileSubscriptionStatusDisabling LicenseProfileSubscriptionStatus = "Disabling" + LicenseProfileSubscriptionStatusEnabled LicenseProfileSubscriptionStatus = "Enabled" + LicenseProfileSubscriptionStatusEnabling LicenseProfileSubscriptionStatus = "Enabling" + LicenseProfileSubscriptionStatusFailed LicenseProfileSubscriptionStatus = "Failed" + LicenseProfileSubscriptionStatusUnknown LicenseProfileSubscriptionStatus = "Unknown" +) + +func PossibleValuesForLicenseProfileSubscriptionStatus() []string { + return []string{ + string(LicenseProfileSubscriptionStatusDisabled), + string(LicenseProfileSubscriptionStatusDisabling), + string(LicenseProfileSubscriptionStatusEnabled), + string(LicenseProfileSubscriptionStatusEnabling), + string(LicenseProfileSubscriptionStatusFailed), + string(LicenseProfileSubscriptionStatusUnknown), + } +} + +func (s *LicenseProfileSubscriptionStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLicenseProfileSubscriptionStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLicenseProfileSubscriptionStatus(input string) (*LicenseProfileSubscriptionStatus, error) { + vals := map[string]LicenseProfileSubscriptionStatus{ + "disabled": LicenseProfileSubscriptionStatusDisabled, + "disabling": LicenseProfileSubscriptionStatusDisabling, + "enabled": LicenseProfileSubscriptionStatusEnabled, + "enabling": LicenseProfileSubscriptionStatusEnabling, + "failed": LicenseProfileSubscriptionStatusFailed, + "unknown": LicenseProfileSubscriptionStatusUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LicenseProfileSubscriptionStatus(input) + return &out, nil +} + +type LicenseProfileSubscriptionStatusUpdate string + +const ( + LicenseProfileSubscriptionStatusUpdateDisable LicenseProfileSubscriptionStatusUpdate = "Disable" + LicenseProfileSubscriptionStatusUpdateEnable LicenseProfileSubscriptionStatusUpdate = "Enable" +) + +func PossibleValuesForLicenseProfileSubscriptionStatusUpdate() []string { + return []string{ + string(LicenseProfileSubscriptionStatusUpdateDisable), + string(LicenseProfileSubscriptionStatusUpdateEnable), + } +} + +func (s *LicenseProfileSubscriptionStatusUpdate) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLicenseProfileSubscriptionStatusUpdate(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLicenseProfileSubscriptionStatusUpdate(input string) (*LicenseProfileSubscriptionStatusUpdate, error) { + vals := map[string]LicenseProfileSubscriptionStatusUpdate{ + "disable": LicenseProfileSubscriptionStatusUpdateDisable, + "enable": LicenseProfileSubscriptionStatusUpdateEnable, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LicenseProfileSubscriptionStatusUpdate(input) + return &out, nil +} + +type ProvisioningState string + +const ( + ProvisioningStateAccepted ProvisioningState = "Accepted" + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateDeleted ProvisioningState = "Deleted" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateAccepted), + string(ProvisioningStateCanceled), + string(ProvisioningStateCreating), + string(ProvisioningStateDeleted), + string(ProvisioningStateDeleting), + string(ProvisioningStateFailed), + string(ProvisioningStateSucceeded), + string(ProvisioningStateUpdating), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "accepted": ProvisioningStateAccepted, + "canceled": ProvisioningStateCanceled, + "creating": ProvisioningStateCreating, + "deleted": ProvisioningStateDeleted, + "deleting": ProvisioningStateDeleting, + "failed": ProvisioningStateFailed, + "succeeded": ProvisioningStateSucceeded, + "updating": ProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/id_machine.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/id_machine.go new file mode 100644 index 0000000000000..2ac28229684bc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/id_machine.go @@ -0,0 +1,130 @@ +package licenseprofiles + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&MachineId{}) +} + +var _ resourceids.ResourceId = &MachineId{} + +// MachineId is a struct representing the Resource ID for a Machine +type MachineId struct { + SubscriptionId string + ResourceGroupName string + MachineName string +} + +// NewMachineID returns a new MachineId struct +func NewMachineID(subscriptionId string, resourceGroupName string, machineName string) MachineId { + return MachineId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + MachineName: machineName, + } +} + +// ParseMachineID parses 'input' into a MachineId +func ParseMachineID(input string) (*MachineId, error) { + parser := resourceids.NewParserFromResourceIdType(&MachineId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MachineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseMachineIDInsensitively parses 'input' case-insensitively into a MachineId +// note: this method should only be used for API response data and not user input +func ParseMachineIDInsensitively(input string) (*MachineId, error) { + parser := resourceids.NewParserFromResourceIdType(&MachineId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MachineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MachineId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.MachineName, ok = input.Parsed["machineName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "machineName", input) + } + + return nil +} + +// ValidateMachineID checks that 'input' can be parsed as a Machine ID +func ValidateMachineID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseMachineID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Machine ID +func (id MachineId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.HybridCompute/machines/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MachineName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Machine ID +func (id MachineId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftHybridCompute", "Microsoft.HybridCompute", "Microsoft.HybridCompute"), + resourceids.StaticSegment("staticMachines", "machines", "machines"), + resourceids.UserSpecifiedSegment("machineName", "machineValue"), + } +} + +// String returns a human-readable description of this Machine ID +func (id MachineId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Machine Name: %q", id.MachineName), + } + return fmt.Sprintf("Machine (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/method_createorupdate.go new file mode 100644 index 0000000000000..cb83be0f45840 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/method_createorupdate.go @@ -0,0 +1,75 @@ +package licenseprofiles + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *LicenseProfile +} + +// CreateOrUpdate ... +func (c LicenseProfilesClient) CreateOrUpdate(ctx context.Context, id MachineId, input LicenseProfile) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: fmt.Sprintf("%s/licenseProfiles/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c LicenseProfilesClient) CreateOrUpdateThenPoll(ctx context.Context, id MachineId, input LicenseProfile) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/method_delete.go new file mode 100644 index 0000000000000..0bfcebcafef43 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/method_delete.go @@ -0,0 +1,70 @@ +package licenseprofiles + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c LicenseProfilesClient) Delete(ctx context.Context, id MachineId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + }, + HttpMethod: http.MethodDelete, + Path: fmt.Sprintf("%s/licenseProfiles/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c LicenseProfilesClient) DeleteThenPoll(ctx context.Context, id MachineId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/method_get.go new file mode 100644 index 0000000000000..dd84a8142137e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/method_get.go @@ -0,0 +1,55 @@ +package licenseprofiles + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *LicenseProfile +} + +// Get ... +func (c LicenseProfilesClient) Get(ctx context.Context, id MachineId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/licenseProfiles/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model LicenseProfile + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/method_list.go new file mode 100644 index 0000000000000..26a2001c9169b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/method_list.go @@ -0,0 +1,105 @@ +package licenseprofiles + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]LicenseProfile +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []LicenseProfile +} + +type ListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// List ... +func (c LicenseProfilesClient) List(ctx context.Context, id MachineId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListCustomPager{}, + Path: fmt.Sprintf("%s/licenseProfiles", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]LicenseProfile `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c LicenseProfilesClient) ListComplete(ctx context.Context, id MachineId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, LicenseProfileOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c LicenseProfilesClient) ListCompleteMatchingPredicate(ctx context.Context, id MachineId, predicate LicenseProfileOperationPredicate) (result ListCompleteResult, err error) { + items := make([]LicenseProfile, 0) + + resp, err := c.List(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/method_update.go new file mode 100644 index 0000000000000..df693a0faac2c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/method_update.go @@ -0,0 +1,75 @@ +package licenseprofiles + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *LicenseProfile +} + +// Update ... +func (c LicenseProfilesClient) Update(ctx context.Context, id MachineId, input LicenseProfileUpdate) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: fmt.Sprintf("%s/licenseProfiles/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c LicenseProfilesClient) UpdateThenPoll(ctx context.Context, id MachineId, input LicenseProfileUpdate) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_erroradditionalinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_erroradditionalinfo.go new file mode 100644 index 0000000000000..446674fb26634 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_erroradditionalinfo.go @@ -0,0 +1,9 @@ +package licenseprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorAdditionalInfo struct { + Info *interface{} `json:"info,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_errordetail.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_errordetail.go new file mode 100644 index 0000000000000..99884f376cfab --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_errordetail.go @@ -0,0 +1,12 @@ +package licenseprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorDetail struct { + AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` + Code *string `json:"code,omitempty"` + Details *[]ErrorDetail `json:"details,omitempty"` + Message *string `json:"message,omitempty"` + Target *string `json:"target,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_esukey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_esukey.go new file mode 100644 index 0000000000000..e8ab1175d7e7f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_esukey.go @@ -0,0 +1,9 @@ +package licenseprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EsuKey struct { + LicenseStatus *int64 `json:"licenseStatus,omitempty"` + Sku *string `json:"sku,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_esuprofileupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_esuprofileupdateproperties.go new file mode 100644 index 0000000000000..1196b4ce9ff92 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_esuprofileupdateproperties.go @@ -0,0 +1,8 @@ +package licenseprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EsuProfileUpdateProperties struct { + AssignedLicense *string `json:"assignedLicense,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_licenseprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_licenseprofile.go new file mode 100644 index 0000000000000..12fd7af9a65fc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_licenseprofile.go @@ -0,0 +1,18 @@ +package licenseprofiles + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LicenseProfile struct { + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *LicenseProfileProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_licenseprofilearmesuproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_licenseprofilearmesuproperties.go new file mode 100644 index 0000000000000..36a6e9f8eefd6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_licenseprofilearmesuproperties.go @@ -0,0 +1,13 @@ +package licenseprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LicenseProfileArmEsuProperties struct { + AssignedLicense *string `json:"assignedLicense,omitempty"` + AssignedLicenseImmutableId *string `json:"assignedLicenseImmutableId,omitempty"` + EsuEligibility *EsuEligibility `json:"esuEligibility,omitempty"` + EsuKeyState *EsuKeyState `json:"esuKeyState,omitempty"` + EsuKeys *[]EsuKey `json:"esuKeys,omitempty"` + ServerType *EsuServerType `json:"serverType,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_licenseprofilearmproductprofileproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_licenseprofilearmproductprofileproperties.go new file mode 100644 index 0000000000000..3e5f227a1fc4e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_licenseprofilearmproductprofileproperties.go @@ -0,0 +1,69 @@ +package licenseprofiles + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LicenseProfileArmProductProfileProperties struct { + BillingEndDate *string `json:"billingEndDate,omitempty"` + BillingStartDate *string `json:"billingStartDate,omitempty"` + DisenrollmentDate *string `json:"disenrollmentDate,omitempty"` + EnrollmentDate *string `json:"enrollmentDate,omitempty"` + Error *ErrorDetail `json:"error,omitempty"` + ProductFeatures *[]ProductFeature `json:"productFeatures,omitempty"` + ProductType *LicenseProfileProductType `json:"productType,omitempty"` + SubscriptionStatus *LicenseProfileSubscriptionStatus `json:"subscriptionStatus,omitempty"` +} + +func (o *LicenseProfileArmProductProfileProperties) GetBillingEndDateAsTime() (*time.Time, error) { + if o.BillingEndDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.BillingEndDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *LicenseProfileArmProductProfileProperties) SetBillingEndDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.BillingEndDate = &formatted +} + +func (o *LicenseProfileArmProductProfileProperties) GetBillingStartDateAsTime() (*time.Time, error) { + if o.BillingStartDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.BillingStartDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *LicenseProfileArmProductProfileProperties) SetBillingStartDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.BillingStartDate = &formatted +} + +func (o *LicenseProfileArmProductProfileProperties) GetDisenrollmentDateAsTime() (*time.Time, error) { + if o.DisenrollmentDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.DisenrollmentDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *LicenseProfileArmProductProfileProperties) SetDisenrollmentDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.DisenrollmentDate = &formatted +} + +func (o *LicenseProfileArmProductProfileProperties) GetEnrollmentDateAsTime() (*time.Time, error) { + if o.EnrollmentDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EnrollmentDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *LicenseProfileArmProductProfileProperties) SetEnrollmentDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EnrollmentDate = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_licenseprofileproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_licenseprofileproperties.go new file mode 100644 index 0000000000000..440ee28d7d82a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_licenseprofileproperties.go @@ -0,0 +1,11 @@ +package licenseprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LicenseProfileProperties struct { + EsuProfile *LicenseProfileArmEsuProperties `json:"esuProfile,omitempty"` + ProductProfile *LicenseProfileArmProductProfileProperties `json:"productProfile,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + SoftwareAssurance *LicenseProfilePropertiesSoftwareAssurance `json:"softwareAssurance,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_licenseprofilepropertiessoftwareassurance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_licenseprofilepropertiessoftwareassurance.go new file mode 100644 index 0000000000000..36b6491fc1b62 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_licenseprofilepropertiessoftwareassurance.go @@ -0,0 +1,8 @@ +package licenseprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LicenseProfilePropertiesSoftwareAssurance struct { + SoftwareAssuranceCustomer *bool `json:"softwareAssuranceCustomer,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_licenseprofileupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_licenseprofileupdate.go new file mode 100644 index 0000000000000..af75c3770bf9a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_licenseprofileupdate.go @@ -0,0 +1,9 @@ +package licenseprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LicenseProfileUpdate struct { + Properties *LicenseProfileUpdateProperties `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_licenseprofileupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_licenseprofileupdateproperties.go new file mode 100644 index 0000000000000..4716a59271ecb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_licenseprofileupdateproperties.go @@ -0,0 +1,10 @@ +package licenseprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LicenseProfileUpdateProperties struct { + EsuProfile *EsuProfileUpdateProperties `json:"esuProfile,omitempty"` + ProductProfile *ProductProfileUpdateProperties `json:"productProfile,omitempty"` + SoftwareAssurance *LicenseProfileUpdatePropertiesSoftwareAssurance `json:"softwareAssurance,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_licenseprofileupdatepropertiessoftwareassurance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_licenseprofileupdatepropertiessoftwareassurance.go new file mode 100644 index 0000000000000..d31a53676ec6a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_licenseprofileupdatepropertiessoftwareassurance.go @@ -0,0 +1,8 @@ +package licenseprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LicenseProfileUpdatePropertiesSoftwareAssurance struct { + SoftwareAssuranceCustomer *bool `json:"softwareAssuranceCustomer,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_productfeature.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_productfeature.go new file mode 100644 index 0000000000000..c8bb2caa8614a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_productfeature.go @@ -0,0 +1,68 @@ +package licenseprofiles + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProductFeature struct { + BillingEndDate *string `json:"billingEndDate,omitempty"` + BillingStartDate *string `json:"billingStartDate,omitempty"` + DisenrollmentDate *string `json:"disenrollmentDate,omitempty"` + EnrollmentDate *string `json:"enrollmentDate,omitempty"` + Error *ErrorDetail `json:"error,omitempty"` + Name *string `json:"name,omitempty"` + SubscriptionStatus *LicenseProfileSubscriptionStatus `json:"subscriptionStatus,omitempty"` +} + +func (o *ProductFeature) GetBillingEndDateAsTime() (*time.Time, error) { + if o.BillingEndDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.BillingEndDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *ProductFeature) SetBillingEndDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.BillingEndDate = &formatted +} + +func (o *ProductFeature) GetBillingStartDateAsTime() (*time.Time, error) { + if o.BillingStartDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.BillingStartDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *ProductFeature) SetBillingStartDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.BillingStartDate = &formatted +} + +func (o *ProductFeature) GetDisenrollmentDateAsTime() (*time.Time, error) { + if o.DisenrollmentDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.DisenrollmentDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *ProductFeature) SetDisenrollmentDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.DisenrollmentDate = &formatted +} + +func (o *ProductFeature) GetEnrollmentDateAsTime() (*time.Time, error) { + if o.EnrollmentDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EnrollmentDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *ProductFeature) SetEnrollmentDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EnrollmentDate = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_productfeatureupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_productfeatureupdate.go new file mode 100644 index 0000000000000..87884710c9f82 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_productfeatureupdate.go @@ -0,0 +1,9 @@ +package licenseprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProductFeatureUpdate struct { + Name *string `json:"name,omitempty"` + SubscriptionStatus *LicenseProfileSubscriptionStatusUpdate `json:"subscriptionStatus,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_productprofileupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_productprofileupdateproperties.go new file mode 100644 index 0000000000000..20854ac410908 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/model_productprofileupdateproperties.go @@ -0,0 +1,10 @@ +package licenseprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProductProfileUpdateProperties struct { + ProductFeatures *[]ProductFeatureUpdate `json:"productFeatures,omitempty"` + ProductType *LicenseProfileProductType `json:"productType,omitempty"` + SubscriptionStatus *LicenseProfileSubscriptionStatusUpdate `json:"subscriptionStatus,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/predicates.go new file mode 100644 index 0000000000000..60132d00c137e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/predicates.go @@ -0,0 +1,32 @@ +package licenseprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LicenseProfileOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p LicenseProfileOperationPredicate) Matches(input LicenseProfile) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/version.go new file mode 100644 index 0000000000000..a659fd183598e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles/version.go @@ -0,0 +1,12 @@ +package licenseprofiles + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-07-10" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/licenseprofiles/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/README.md new file mode 100644 index 0000000000000..a9ea84fe6096e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/README.md @@ -0,0 +1,134 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses` Documentation + +The `licenses` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-07-10`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses" +``` + + +### Client Initialization + +```go +client := licenses.NewLicensesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `LicensesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := licenses.NewLicenseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "licenseValue") + +payload := licenses.License{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `LicensesClient.Delete` + +```go +ctx := context.TODO() +id := licenses.NewLicenseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "licenseValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `LicensesClient.Get` + +```go +ctx := context.TODO() +id := licenses.NewLicenseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "licenseValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `LicensesClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `LicensesClient.ListBySubscription` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination +items, err := client.ListBySubscriptionComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `LicensesClient.Update` + +```go +ctx := context.TODO() +id := licenses.NewLicenseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "licenseValue") + +payload := licenses.LicenseUpdate{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `LicensesClient.ValidateLicense` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +payload := licenses.License{ + // ... +} + + +if err := client.ValidateLicenseThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/client.go new file mode 100644 index 0000000000000..238b65f246d6c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/client.go @@ -0,0 +1,26 @@ +package licenses + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LicensesClient struct { + Client *resourcemanager.Client +} + +func NewLicensesClientWithBaseURI(sdkApi sdkEnv.Api) (*LicensesClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "licenses", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating LicensesClient: %+v", err) + } + + return &LicensesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/constants.go new file mode 100644 index 0000000000000..9bdf6c5df3db4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/constants.go @@ -0,0 +1,315 @@ +package licenses + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LicenseCoreType string + +const ( + LicenseCoreTypePCore LicenseCoreType = "pCore" + LicenseCoreTypeVCore LicenseCoreType = "vCore" +) + +func PossibleValuesForLicenseCoreType() []string { + return []string{ + string(LicenseCoreTypePCore), + string(LicenseCoreTypeVCore), + } +} + +func (s *LicenseCoreType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLicenseCoreType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLicenseCoreType(input string) (*LicenseCoreType, error) { + vals := map[string]LicenseCoreType{ + "pcore": LicenseCoreTypePCore, + "vcore": LicenseCoreTypeVCore, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LicenseCoreType(input) + return &out, nil +} + +type LicenseEdition string + +const ( + LicenseEditionDatacenter LicenseEdition = "Datacenter" + LicenseEditionStandard LicenseEdition = "Standard" +) + +func PossibleValuesForLicenseEdition() []string { + return []string{ + string(LicenseEditionDatacenter), + string(LicenseEditionStandard), + } +} + +func (s *LicenseEdition) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLicenseEdition(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLicenseEdition(input string) (*LicenseEdition, error) { + vals := map[string]LicenseEdition{ + "datacenter": LicenseEditionDatacenter, + "standard": LicenseEditionStandard, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LicenseEdition(input) + return &out, nil +} + +type LicenseState string + +const ( + LicenseStateActivated LicenseState = "Activated" + LicenseStateDeactivated LicenseState = "Deactivated" +) + +func PossibleValuesForLicenseState() []string { + return []string{ + string(LicenseStateActivated), + string(LicenseStateDeactivated), + } +} + +func (s *LicenseState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLicenseState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLicenseState(input string) (*LicenseState, error) { + vals := map[string]LicenseState{ + "activated": LicenseStateActivated, + "deactivated": LicenseStateDeactivated, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LicenseState(input) + return &out, nil +} + +type LicenseTarget string + +const ( + LicenseTargetWindowsServerTwoZeroOneTwo LicenseTarget = "Windows Server 2012" + LicenseTargetWindowsServerTwoZeroOneTwoRTwo LicenseTarget = "Windows Server 2012 R2" +) + +func PossibleValuesForLicenseTarget() []string { + return []string{ + string(LicenseTargetWindowsServerTwoZeroOneTwo), + string(LicenseTargetWindowsServerTwoZeroOneTwoRTwo), + } +} + +func (s *LicenseTarget) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLicenseTarget(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLicenseTarget(input string) (*LicenseTarget, error) { + vals := map[string]LicenseTarget{ + "windows server 2012": LicenseTargetWindowsServerTwoZeroOneTwo, + "windows server 2012 r2": LicenseTargetWindowsServerTwoZeroOneTwoRTwo, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LicenseTarget(input) + return &out, nil +} + +type LicenseType string + +const ( + LicenseTypeESU LicenseType = "ESU" +) + +func PossibleValuesForLicenseType() []string { + return []string{ + string(LicenseTypeESU), + } +} + +func (s *LicenseType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLicenseType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLicenseType(input string) (*LicenseType, error) { + vals := map[string]LicenseType{ + "esu": LicenseTypeESU, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LicenseType(input) + return &out, nil +} + +type ProgramYear string + +const ( + ProgramYearYearOne ProgramYear = "Year 1" + ProgramYearYearThree ProgramYear = "Year 3" + ProgramYearYearTwo ProgramYear = "Year 2" +) + +func PossibleValuesForProgramYear() []string { + return []string{ + string(ProgramYearYearOne), + string(ProgramYearYearThree), + string(ProgramYearYearTwo), + } +} + +func (s *ProgramYear) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProgramYear(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProgramYear(input string) (*ProgramYear, error) { + vals := map[string]ProgramYear{ + "year 1": ProgramYearYearOne, + "year 3": ProgramYearYearThree, + "year 2": ProgramYearYearTwo, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProgramYear(input) + return &out, nil +} + +type ProvisioningState string + +const ( + ProvisioningStateAccepted ProvisioningState = "Accepted" + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateDeleted ProvisioningState = "Deleted" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateAccepted), + string(ProvisioningStateCanceled), + string(ProvisioningStateCreating), + string(ProvisioningStateDeleted), + string(ProvisioningStateDeleting), + string(ProvisioningStateFailed), + string(ProvisioningStateSucceeded), + string(ProvisioningStateUpdating), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "accepted": ProvisioningStateAccepted, + "canceled": ProvisioningStateCanceled, + "creating": ProvisioningStateCreating, + "deleted": ProvisioningStateDeleted, + "deleting": ProvisioningStateDeleting, + "failed": ProvisioningStateFailed, + "succeeded": ProvisioningStateSucceeded, + "updating": ProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/id_license.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/id_license.go new file mode 100644 index 0000000000000..f188fa4589a93 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/id_license.go @@ -0,0 +1,130 @@ +package licenses + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&LicenseId{}) +} + +var _ resourceids.ResourceId = &LicenseId{} + +// LicenseId is a struct representing the Resource ID for a License +type LicenseId struct { + SubscriptionId string + ResourceGroupName string + LicenseName string +} + +// NewLicenseID returns a new LicenseId struct +func NewLicenseID(subscriptionId string, resourceGroupName string, licenseName string) LicenseId { + return LicenseId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + LicenseName: licenseName, + } +} + +// ParseLicenseID parses 'input' into a LicenseId +func ParseLicenseID(input string) (*LicenseId, error) { + parser := resourceids.NewParserFromResourceIdType(&LicenseId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := LicenseId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseLicenseIDInsensitively parses 'input' case-insensitively into a LicenseId +// note: this method should only be used for API response data and not user input +func ParseLicenseIDInsensitively(input string) (*LicenseId, error) { + parser := resourceids.NewParserFromResourceIdType(&LicenseId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := LicenseId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LicenseId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.LicenseName, ok = input.Parsed["licenseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "licenseName", input) + } + + return nil +} + +// ValidateLicenseID checks that 'input' can be parsed as a License ID +func ValidateLicenseID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseLicenseID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted License ID +func (id LicenseId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.HybridCompute/licenses/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LicenseName) +} + +// Segments returns a slice of Resource ID Segments which comprise this License ID +func (id LicenseId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftHybridCompute", "Microsoft.HybridCompute", "Microsoft.HybridCompute"), + resourceids.StaticSegment("staticLicenses", "licenses", "licenses"), + resourceids.UserSpecifiedSegment("licenseName", "licenseValue"), + } +} + +// String returns a human-readable description of this License ID +func (id LicenseId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("License Name: %q", id.LicenseName), + } + return fmt.Sprintf("License (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/method_createorupdate.go new file mode 100644 index 0000000000000..b572729126df4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/method_createorupdate.go @@ -0,0 +1,74 @@ +package licenses + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *License +} + +// CreateOrUpdate ... +func (c LicensesClient) CreateOrUpdate(ctx context.Context, id LicenseId, input License) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c LicensesClient) CreateOrUpdateThenPoll(ctx context.Context, id LicenseId, input License) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/method_delete.go new file mode 100644 index 0000000000000..4a42150f68c2d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/method_delete.go @@ -0,0 +1,70 @@ +package licenses + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c LicensesClient) Delete(ctx context.Context, id LicenseId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c LicensesClient) DeleteThenPoll(ctx context.Context, id LicenseId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/method_get.go new file mode 100644 index 0000000000000..26b4d3c4e370d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/method_get.go @@ -0,0 +1,54 @@ +package licenses + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *License +} + +// Get ... +func (c LicensesClient) Get(ctx context.Context, id LicenseId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model License + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/method_listbyresourcegroup.go new file mode 100644 index 0000000000000..39343752c8a4f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/method_listbyresourcegroup.go @@ -0,0 +1,106 @@ +package licenses + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]License +} + +type ListByResourceGroupCompleteResult struct { + LatestHttpResponse *http.Response + Items []License +} + +type ListByResourceGroupCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByResourceGroup ... +func (c LicensesClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByResourceGroupCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.HybridCompute/licenses", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]License `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByResourceGroupComplete retrieves all the results into a single object +func (c LicensesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, LicenseOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c LicensesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate LicenseOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { + items := make([]License, 0) + + resp, err := c.ListByResourceGroup(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByResourceGroupCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/method_listbysubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/method_listbysubscription.go new file mode 100644 index 0000000000000..7b0ddcef05165 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/method_listbysubscription.go @@ -0,0 +1,106 @@ +package licenses + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListBySubscriptionOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]License +} + +type ListBySubscriptionCompleteResult struct { + LatestHttpResponse *http.Response + Items []License +} + +type ListBySubscriptionCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListBySubscriptionCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListBySubscription ... +func (c LicensesClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListBySubscriptionCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.HybridCompute/licenses", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]License `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListBySubscriptionComplete retrieves all the results into a single object +func (c LicensesClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, LicenseOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c LicensesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate LicenseOperationPredicate) (result ListBySubscriptionCompleteResult, err error) { + items := make([]License, 0) + + resp, err := c.ListBySubscription(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListBySubscriptionCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/method_update.go new file mode 100644 index 0000000000000..703baa380b251 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/method_update.go @@ -0,0 +1,74 @@ +package licenses + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *License +} + +// Update ... +func (c LicensesClient) Update(ctx context.Context, id LicenseId, input LicenseUpdate) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c LicensesClient) UpdateThenPoll(ctx context.Context, id LicenseId, input LicenseUpdate) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/method_validatelicense.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/method_validatelicense.go new file mode 100644 index 0000000000000..0806e4c02d66c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/method_validatelicense.go @@ -0,0 +1,75 @@ +package licenses + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ValidateLicenseOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *License +} + +// ValidateLicense ... +func (c LicensesClient) ValidateLicense(ctx context.Context, id commonids.SubscriptionId, input License) (result ValidateLicenseOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/providers/Microsoft.HybridCompute/validateLicense", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// ValidateLicenseThenPoll performs ValidateLicense then polls until it's completed +func (c LicensesClient) ValidateLicenseThenPoll(ctx context.Context, id commonids.SubscriptionId, input License) error { + result, err := c.ValidateLicense(ctx, id, input) + if err != nil { + return fmt.Errorf("performing ValidateLicense: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after ValidateLicense: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/model_license.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/model_license.go new file mode 100644 index 0000000000000..815628a18841b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/model_license.go @@ -0,0 +1,18 @@ +package licenses + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type License struct { + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *LicenseProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/model_licensedetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/model_licensedetails.go new file mode 100644 index 0000000000000..5f54022ca0c1d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/model_licensedetails.go @@ -0,0 +1,15 @@ +package licenses + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LicenseDetails struct { + AssignedLicenses *int64 `json:"assignedLicenses,omitempty"` + Edition *LicenseEdition `json:"edition,omitempty"` + ImmutableId *string `json:"immutableId,omitempty"` + Processors *int64 `json:"processors,omitempty"` + State *LicenseState `json:"state,omitempty"` + Target *LicenseTarget `json:"target,omitempty"` + Type *LicenseCoreType `json:"type,omitempty"` + VolumeLicenseDetails *[]VolumeLicenseDetails `json:"volumeLicenseDetails,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/model_licenseproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/model_licenseproperties.go new file mode 100644 index 0000000000000..6c006867ae2cc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/model_licenseproperties.go @@ -0,0 +1,11 @@ +package licenses + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LicenseProperties struct { + LicenseDetails *LicenseDetails `json:"licenseDetails,omitempty"` + LicenseType *LicenseType `json:"licenseType,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + TenantId *string `json:"tenantId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/model_licenseupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/model_licenseupdate.go new file mode 100644 index 0000000000000..bf63b4ceb25fe --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/model_licenseupdate.go @@ -0,0 +1,9 @@ +package licenses + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LicenseUpdate struct { + Properties *LicenseUpdateProperties `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/model_licenseupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/model_licenseupdateproperties.go new file mode 100644 index 0000000000000..e455468786a3d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/model_licenseupdateproperties.go @@ -0,0 +1,9 @@ +package licenses + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LicenseUpdateProperties struct { + LicenseDetails *LicenseUpdatePropertiesLicenseDetails `json:"licenseDetails,omitempty"` + LicenseType *LicenseType `json:"licenseType,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/model_licenseupdatepropertieslicensedetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/model_licenseupdatepropertieslicensedetails.go new file mode 100644 index 0000000000000..3e0d33eef6ba4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/model_licenseupdatepropertieslicensedetails.go @@ -0,0 +1,12 @@ +package licenses + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LicenseUpdatePropertiesLicenseDetails struct { + Edition *LicenseEdition `json:"edition,omitempty"` + Processors *int64 `json:"processors,omitempty"` + State *LicenseState `json:"state,omitempty"` + Target *LicenseTarget `json:"target,omitempty"` + Type *LicenseCoreType `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/model_volumelicensedetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/model_volumelicensedetails.go new file mode 100644 index 0000000000000..4064f981b57f1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/model_volumelicensedetails.go @@ -0,0 +1,9 @@ +package licenses + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VolumeLicenseDetails struct { + InvoiceId *string `json:"invoiceId,omitempty"` + ProgramYear *ProgramYear `json:"programYear,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/predicates.go new file mode 100644 index 0000000000000..1f36d46b8b35e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/predicates.go @@ -0,0 +1,32 @@ +package licenses + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LicenseOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p LicenseOperationPredicate) Matches(input License) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/version.go new file mode 100644 index 0000000000000..101f4caa13f64 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses/version.go @@ -0,0 +1,12 @@ +package licenses + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-07-10" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/licenses/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/README.md new file mode 100644 index 0000000000000..61065b02fec00 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/README.md @@ -0,0 +1,99 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions` Documentation + +The `machineextensions` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-07-10`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions" +``` + + +### Client Initialization + +```go +client := machineextensions.NewMachineExtensionsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `MachineExtensionsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := machineextensions.NewExtensionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue", "extensionValue") + +payload := machineextensions.MachineExtension{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `MachineExtensionsClient.Delete` + +```go +ctx := context.TODO() +id := machineextensions.NewExtensionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue", "extensionValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `MachineExtensionsClient.Get` + +```go +ctx := context.TODO() +id := machineextensions.NewExtensionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue", "extensionValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `MachineExtensionsClient.List` + +```go +ctx := context.TODO() +id := machineextensions.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue") + +// alternatively `client.List(ctx, id, machineextensions.DefaultListOperationOptions())` can be used to do batched pagination +items, err := client.ListComplete(ctx, id, machineextensions.DefaultListOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `MachineExtensionsClient.Update` + +```go +ctx := context.TODO() +id := machineextensions.NewExtensionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue", "extensionValue") + +payload := machineextensions.MachineExtensionUpdate{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/client.go new file mode 100644 index 0000000000000..a4336266a29dd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/client.go @@ -0,0 +1,26 @@ +package machineextensions + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MachineExtensionsClient struct { + Client *resourcemanager.Client +} + +func NewMachineExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*MachineExtensionsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machineextensions", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating MachineExtensionsClient: %+v", err) + } + + return &MachineExtensionsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/constants.go new file mode 100644 index 0000000000000..13d3ae86a16a9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/constants.go @@ -0,0 +1,54 @@ +package machineextensions + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StatusLevelTypes string + +const ( + StatusLevelTypesError StatusLevelTypes = "Error" + StatusLevelTypesInfo StatusLevelTypes = "Info" + StatusLevelTypesWarning StatusLevelTypes = "Warning" +) + +func PossibleValuesForStatusLevelTypes() []string { + return []string{ + string(StatusLevelTypesError), + string(StatusLevelTypesInfo), + string(StatusLevelTypesWarning), + } +} + +func (s *StatusLevelTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseStatusLevelTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseStatusLevelTypes(input string) (*StatusLevelTypes, error) { + vals := map[string]StatusLevelTypes{ + "error": StatusLevelTypesError, + "info": StatusLevelTypesInfo, + "warning": StatusLevelTypesWarning, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := StatusLevelTypes(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/id_extension.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/id_extension.go new file mode 100644 index 0000000000000..f1f0e73d09b39 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/id_extension.go @@ -0,0 +1,139 @@ +package machineextensions + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&ExtensionId{}) +} + +var _ resourceids.ResourceId = &ExtensionId{} + +// ExtensionId is a struct representing the Resource ID for a Extension +type ExtensionId struct { + SubscriptionId string + ResourceGroupName string + MachineName string + ExtensionName string +} + +// NewExtensionID returns a new ExtensionId struct +func NewExtensionID(subscriptionId string, resourceGroupName string, machineName string, extensionName string) ExtensionId { + return ExtensionId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + MachineName: machineName, + ExtensionName: extensionName, + } +} + +// ParseExtensionID parses 'input' into a ExtensionId +func ParseExtensionID(input string) (*ExtensionId, error) { + parser := resourceids.NewParserFromResourceIdType(&ExtensionId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ExtensionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseExtensionIDInsensitively parses 'input' case-insensitively into a ExtensionId +// note: this method should only be used for API response data and not user input +func ParseExtensionIDInsensitively(input string) (*ExtensionId, error) { + parser := resourceids.NewParserFromResourceIdType(&ExtensionId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ExtensionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ExtensionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.MachineName, ok = input.Parsed["machineName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "machineName", input) + } + + if id.ExtensionName, ok = input.Parsed["extensionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "extensionName", input) + } + + return nil +} + +// ValidateExtensionID checks that 'input' can be parsed as a Extension ID +func ValidateExtensionID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseExtensionID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Extension ID +func (id ExtensionId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.HybridCompute/machines/%s/extensions/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MachineName, id.ExtensionName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Extension ID +func (id ExtensionId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftHybridCompute", "Microsoft.HybridCompute", "Microsoft.HybridCompute"), + resourceids.StaticSegment("staticMachines", "machines", "machines"), + resourceids.UserSpecifiedSegment("machineName", "machineValue"), + resourceids.StaticSegment("staticExtensions", "extensions", "extensions"), + resourceids.UserSpecifiedSegment("extensionName", "extensionValue"), + } +} + +// String returns a human-readable description of this Extension ID +func (id ExtensionId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Machine Name: %q", id.MachineName), + fmt.Sprintf("Extension Name: %q", id.ExtensionName), + } + return fmt.Sprintf("Extension (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/id_machine.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/id_machine.go new file mode 100644 index 0000000000000..63c29999e3546 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/id_machine.go @@ -0,0 +1,130 @@ +package machineextensions + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&MachineId{}) +} + +var _ resourceids.ResourceId = &MachineId{} + +// MachineId is a struct representing the Resource ID for a Machine +type MachineId struct { + SubscriptionId string + ResourceGroupName string + MachineName string +} + +// NewMachineID returns a new MachineId struct +func NewMachineID(subscriptionId string, resourceGroupName string, machineName string) MachineId { + return MachineId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + MachineName: machineName, + } +} + +// ParseMachineID parses 'input' into a MachineId +func ParseMachineID(input string) (*MachineId, error) { + parser := resourceids.NewParserFromResourceIdType(&MachineId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MachineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseMachineIDInsensitively parses 'input' case-insensitively into a MachineId +// note: this method should only be used for API response data and not user input +func ParseMachineIDInsensitively(input string) (*MachineId, error) { + parser := resourceids.NewParserFromResourceIdType(&MachineId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MachineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MachineId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.MachineName, ok = input.Parsed["machineName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "machineName", input) + } + + return nil +} + +// ValidateMachineID checks that 'input' can be parsed as a Machine ID +func ValidateMachineID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseMachineID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Machine ID +func (id MachineId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.HybridCompute/machines/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MachineName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Machine ID +func (id MachineId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftHybridCompute", "Microsoft.HybridCompute", "Microsoft.HybridCompute"), + resourceids.StaticSegment("staticMachines", "machines", "machines"), + resourceids.UserSpecifiedSegment("machineName", "machineValue"), + } +} + +// String returns a human-readable description of this Machine ID +func (id MachineId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Machine Name: %q", id.MachineName), + } + return fmt.Sprintf("Machine (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/method_createorupdate.go new file mode 100644 index 0000000000000..eb11e6f510468 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/method_createorupdate.go @@ -0,0 +1,75 @@ +package machineextensions + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *MachineExtension +} + +// CreateOrUpdate ... +func (c MachineExtensionsClient) CreateOrUpdate(ctx context.Context, id ExtensionId, input MachineExtension) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c MachineExtensionsClient) CreateOrUpdateThenPoll(ctx context.Context, id ExtensionId, input MachineExtension) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/method_delete.go new file mode 100644 index 0000000000000..c816a230864cc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/method_delete.go @@ -0,0 +1,71 @@ +package machineextensions + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c MachineExtensionsClient) Delete(ctx context.Context, id ExtensionId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c MachineExtensionsClient) DeleteThenPoll(ctx context.Context, id ExtensionId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/method_get.go new file mode 100644 index 0000000000000..e21d210a448ef --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/method_get.go @@ -0,0 +1,54 @@ +package machineextensions + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *MachineExtension +} + +// Get ... +func (c MachineExtensionsClient) Get(ctx context.Context, id ExtensionId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model MachineExtension + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/method_list.go new file mode 100644 index 0000000000000..d9646c3c81e56 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/method_list.go @@ -0,0 +1,133 @@ +package machineextensions + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]MachineExtension +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []MachineExtension +} + +type ListOperationOptions struct { + Expand *string +} + +func DefaultListOperationOptions() ListOperationOptions { + return ListOperationOptions{} +} + +func (o ListOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o ListOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o ListOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.Expand != nil { + out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) + } + return &out +} + +type ListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// List ... +func (c MachineExtensionsClient) List(ctx context.Context, id MachineId, options ListOperationOptions) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Pager: &ListCustomPager{}, + Path: fmt.Sprintf("%s/extensions", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]MachineExtension `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c MachineExtensionsClient) ListComplete(ctx context.Context, id MachineId, options ListOperationOptions) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, options, MachineExtensionOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c MachineExtensionsClient) ListCompleteMatchingPredicate(ctx context.Context, id MachineId, options ListOperationOptions, predicate MachineExtensionOperationPredicate) (result ListCompleteResult, err error) { + items := make([]MachineExtension, 0) + + resp, err := c.List(ctx, id, options) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/method_update.go new file mode 100644 index 0000000000000..296ae0e28df9c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/method_update.go @@ -0,0 +1,75 @@ +package machineextensions + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *MachineExtension +} + +// Update ... +func (c MachineExtensionsClient) Update(ctx context.Context, id ExtensionId, input MachineExtensionUpdate) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c MachineExtensionsClient) UpdateThenPoll(ctx context.Context, id ExtensionId, input MachineExtensionUpdate) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/model_machineextension.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/model_machineextension.go new file mode 100644 index 0000000000000..c763dea91cab7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/model_machineextension.go @@ -0,0 +1,18 @@ +package machineextensions + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MachineExtension struct { + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *MachineExtensionProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/model_machineextensioninstanceview.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/model_machineextensioninstanceview.go new file mode 100644 index 0000000000000..b97af53820a5a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/model_machineextensioninstanceview.go @@ -0,0 +1,11 @@ +package machineextensions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MachineExtensionInstanceView struct { + Name *string `json:"name,omitempty"` + Status *MachineExtensionInstanceViewStatus `json:"status,omitempty"` + Type *string `json:"type,omitempty"` + TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/model_machineextensioninstanceviewstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/model_machineextensioninstanceviewstatus.go new file mode 100644 index 0000000000000..74e73c5018278 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/model_machineextensioninstanceviewstatus.go @@ -0,0 +1,30 @@ +package machineextensions + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MachineExtensionInstanceViewStatus struct { + Code *string `json:"code,omitempty"` + DisplayStatus *string `json:"displayStatus,omitempty"` + Level *StatusLevelTypes `json:"level,omitempty"` + Message *string `json:"message,omitempty"` + Time *string `json:"time,omitempty"` +} + +func (o *MachineExtensionInstanceViewStatus) GetTimeAsTime() (*time.Time, error) { + if o.Time == nil { + return nil, nil + } + return dates.ParseAsFormat(o.Time, "2006-01-02T15:04:05Z07:00") +} + +func (o *MachineExtensionInstanceViewStatus) SetTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.Time = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/model_machineextensionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/model_machineextensionproperties.go new file mode 100644 index 0000000000000..d8f4dd106ea99 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/model_machineextensionproperties.go @@ -0,0 +1,17 @@ +package machineextensions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MachineExtensionProperties struct { + AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"` + EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"` + ForceUpdateTag *string `json:"forceUpdateTag,omitempty"` + InstanceView *MachineExtensionInstanceView `json:"instanceView,omitempty"` + ProtectedSettings *interface{} `json:"protectedSettings,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + Publisher *string `json:"publisher,omitempty"` + Settings *interface{} `json:"settings,omitempty"` + Type *string `json:"type,omitempty"` + TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/model_machineextensionupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/model_machineextensionupdate.go new file mode 100644 index 0000000000000..a1a0b788156af --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/model_machineextensionupdate.go @@ -0,0 +1,9 @@ +package machineextensions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MachineExtensionUpdate struct { + Properties *MachineExtensionUpdateProperties `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/model_machineextensionupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/model_machineextensionupdateproperties.go new file mode 100644 index 0000000000000..d8a1ee28b6526 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/model_machineextensionupdateproperties.go @@ -0,0 +1,15 @@ +package machineextensions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MachineExtensionUpdateProperties struct { + AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"` + EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"` + ForceUpdateTag *string `json:"forceUpdateTag,omitempty"` + ProtectedSettings *interface{} `json:"protectedSettings,omitempty"` + Publisher *string `json:"publisher,omitempty"` + Settings *interface{} `json:"settings,omitempty"` + Type *string `json:"type,omitempty"` + TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/predicates.go new file mode 100644 index 0000000000000..2eae3b57239c6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/predicates.go @@ -0,0 +1,32 @@ +package machineextensions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MachineExtensionOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p MachineExtensionOperationPredicate) Matches(input MachineExtension) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/version.go new file mode 100644 index 0000000000000..80456604fd73a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions/version.go @@ -0,0 +1,12 @@ +package machineextensions + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-07-10" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/machineextensions/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/README.md new file mode 100644 index 0000000000000..8b20d3f760b90 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/README.md @@ -0,0 +1,37 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade` Documentation + +The `machineextensionsupgrade` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-07-10`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade" +``` + + +### Client Initialization + +```go +client := machineextensionsupgrade.NewMachineExtensionsUpgradeClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `MachineExtensionsUpgradeClient.UpgradeExtensions` + +```go +ctx := context.TODO() +id := machineextensionsupgrade.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue") + +payload := machineextensionsupgrade.MachineExtensionUpgrade{ + // ... +} + + +if err := client.UpgradeExtensionsThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/client.go new file mode 100644 index 0000000000000..c02524534cee8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/client.go @@ -0,0 +1,26 @@ +package machineextensionsupgrade + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MachineExtensionsUpgradeClient struct { + Client *resourcemanager.Client +} + +func NewMachineExtensionsUpgradeClientWithBaseURI(sdkApi sdkEnv.Api) (*MachineExtensionsUpgradeClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machineextensionsupgrade", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating MachineExtensionsUpgradeClient: %+v", err) + } + + return &MachineExtensionsUpgradeClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/id_machine.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/id_machine.go new file mode 100644 index 0000000000000..0ea82ab4023b2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/id_machine.go @@ -0,0 +1,130 @@ +package machineextensionsupgrade + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&MachineId{}) +} + +var _ resourceids.ResourceId = &MachineId{} + +// MachineId is a struct representing the Resource ID for a Machine +type MachineId struct { + SubscriptionId string + ResourceGroupName string + MachineName string +} + +// NewMachineID returns a new MachineId struct +func NewMachineID(subscriptionId string, resourceGroupName string, machineName string) MachineId { + return MachineId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + MachineName: machineName, + } +} + +// ParseMachineID parses 'input' into a MachineId +func ParseMachineID(input string) (*MachineId, error) { + parser := resourceids.NewParserFromResourceIdType(&MachineId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MachineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseMachineIDInsensitively parses 'input' case-insensitively into a MachineId +// note: this method should only be used for API response data and not user input +func ParseMachineIDInsensitively(input string) (*MachineId, error) { + parser := resourceids.NewParserFromResourceIdType(&MachineId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MachineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MachineId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.MachineName, ok = input.Parsed["machineName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "machineName", input) + } + + return nil +} + +// ValidateMachineID checks that 'input' can be parsed as a Machine ID +func ValidateMachineID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseMachineID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Machine ID +func (id MachineId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.HybridCompute/machines/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MachineName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Machine ID +func (id MachineId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftHybridCompute", "Microsoft.HybridCompute", "Microsoft.HybridCompute"), + resourceids.StaticSegment("staticMachines", "machines", "machines"), + resourceids.UserSpecifiedSegment("machineName", "machineValue"), + } +} + +// String returns a human-readable description of this Machine ID +func (id MachineId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Machine Name: %q", id.MachineName), + } + return fmt.Sprintf("Machine (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/method_upgradeextensions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/method_upgradeextensions.go new file mode 100644 index 0000000000000..4b6f42a914e52 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/method_upgradeextensions.go @@ -0,0 +1,74 @@ +package machineextensionsupgrade + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpgradeExtensionsOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// UpgradeExtensions ... +func (c MachineExtensionsUpgradeClient) UpgradeExtensions(ctx context.Context, id MachineId, input MachineExtensionUpgrade) (result UpgradeExtensionsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/upgradeExtensions", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpgradeExtensionsThenPoll performs UpgradeExtensions then polls until it's completed +func (c MachineExtensionsUpgradeClient) UpgradeExtensionsThenPoll(ctx context.Context, id MachineId, input MachineExtensionUpgrade) error { + result, err := c.UpgradeExtensions(ctx, id, input) + if err != nil { + return fmt.Errorf("performing UpgradeExtensions: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after UpgradeExtensions: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/model_extensiontargetproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/model_extensiontargetproperties.go new file mode 100644 index 0000000000000..b5ea39e4f2529 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/model_extensiontargetproperties.go @@ -0,0 +1,8 @@ +package machineextensionsupgrade + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtensionTargetProperties struct { + TargetVersion *string `json:"targetVersion,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/model_machineextensionupgrade.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/model_machineextensionupgrade.go new file mode 100644 index 0000000000000..1fe7a0c95cd17 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/model_machineextensionupgrade.go @@ -0,0 +1,8 @@ +package machineextensionsupgrade + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MachineExtensionUpgrade struct { + ExtensionTargets *map[string]ExtensionTargetProperties `json:"extensionTargets,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/version.go new file mode 100644 index 0000000000000..ef9d2cfc8d77c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/version.go @@ -0,0 +1,12 @@ +package machineextensionsupgrade + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-07-10" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/machineextensionsupgrade/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/README.md new file mode 100644 index 0000000000000..d779afbdd6a6e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/README.md @@ -0,0 +1,36 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile` Documentation + +The `machinenetworkprofile` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-07-10`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile" +``` + + +### Client Initialization + +```go +client := machinenetworkprofile.NewMachineNetworkProfileClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `MachineNetworkProfileClient.NetworkProfileGet` + +```go +ctx := context.TODO() +id := machinenetworkprofile.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue") + +read, err := client.NetworkProfileGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/client.go new file mode 100644 index 0000000000000..bc8fa58d8d5d2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/client.go @@ -0,0 +1,26 @@ +package machinenetworkprofile + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MachineNetworkProfileClient struct { + Client *resourcemanager.Client +} + +func NewMachineNetworkProfileClientWithBaseURI(sdkApi sdkEnv.Api) (*MachineNetworkProfileClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machinenetworkprofile", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating MachineNetworkProfileClient: %+v", err) + } + + return &MachineNetworkProfileClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/id_machine.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/id_machine.go new file mode 100644 index 0000000000000..b70ed79b4f729 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/id_machine.go @@ -0,0 +1,130 @@ +package machinenetworkprofile + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&MachineId{}) +} + +var _ resourceids.ResourceId = &MachineId{} + +// MachineId is a struct representing the Resource ID for a Machine +type MachineId struct { + SubscriptionId string + ResourceGroupName string + MachineName string +} + +// NewMachineID returns a new MachineId struct +func NewMachineID(subscriptionId string, resourceGroupName string, machineName string) MachineId { + return MachineId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + MachineName: machineName, + } +} + +// ParseMachineID parses 'input' into a MachineId +func ParseMachineID(input string) (*MachineId, error) { + parser := resourceids.NewParserFromResourceIdType(&MachineId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MachineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseMachineIDInsensitively parses 'input' case-insensitively into a MachineId +// note: this method should only be used for API response data and not user input +func ParseMachineIDInsensitively(input string) (*MachineId, error) { + parser := resourceids.NewParserFromResourceIdType(&MachineId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MachineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MachineId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.MachineName, ok = input.Parsed["machineName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "machineName", input) + } + + return nil +} + +// ValidateMachineID checks that 'input' can be parsed as a Machine ID +func ValidateMachineID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseMachineID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Machine ID +func (id MachineId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.HybridCompute/machines/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MachineName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Machine ID +func (id MachineId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftHybridCompute", "Microsoft.HybridCompute", "Microsoft.HybridCompute"), + resourceids.StaticSegment("staticMachines", "machines", "machines"), + resourceids.UserSpecifiedSegment("machineName", "machineValue"), + } +} + +// String returns a human-readable description of this Machine ID +func (id MachineId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Machine Name: %q", id.MachineName), + } + return fmt.Sprintf("Machine (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/method_networkprofileget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/method_networkprofileget.go new file mode 100644 index 0000000000000..910399bc22b61 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/method_networkprofileget.go @@ -0,0 +1,55 @@ +package machinenetworkprofile + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkProfileGetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *NetworkProfile +} + +// NetworkProfileGet ... +func (c MachineNetworkProfileClient) NetworkProfileGet(ctx context.Context, id MachineId) (result NetworkProfileGetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/networkProfile", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model NetworkProfile + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/model_ipaddress.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/model_ipaddress.go new file mode 100644 index 0000000000000..7167975f48668 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/model_ipaddress.go @@ -0,0 +1,10 @@ +package machinenetworkprofile + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IPAddress struct { + Address *string `json:"address,omitempty"` + IPAddressVersion *string `json:"ipAddressVersion,omitempty"` + Subnet *Subnet `json:"subnet,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/model_networkinterface.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/model_networkinterface.go new file mode 100644 index 0000000000000..64a556d12d43d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/model_networkinterface.go @@ -0,0 +1,8 @@ +package machinenetworkprofile + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkInterface struct { + IPAddresses *[]IPAddress `json:"ipAddresses,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/model_networkprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/model_networkprofile.go new file mode 100644 index 0000000000000..d593225563233 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/model_networkprofile.go @@ -0,0 +1,8 @@ +package machinenetworkprofile + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkProfile struct { + NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/model_subnet.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/model_subnet.go new file mode 100644 index 0000000000000..4f76d903b98d7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/model_subnet.go @@ -0,0 +1,8 @@ +package machinenetworkprofile + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Subnet struct { + AddressPrefix *string `json:"addressPrefix,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/version.go new file mode 100644 index 0000000000000..7f7c47f6f6b7e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/version.go @@ -0,0 +1,12 @@ +package machinenetworkprofile + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-07-10" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/machinenetworkprofile/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/README.md new file mode 100644 index 0000000000000..a3643758d1bbe --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/README.md @@ -0,0 +1,158 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines` Documentation + +The `machines` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-07-10`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines" +``` + + +### Client Initialization + +```go +client := machines.NewMachinesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `MachinesClient.AssessPatches` + +```go +ctx := context.TODO() +id := machines.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue") + +if err := client.AssessPatchesThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `MachinesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := machines.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue") + +payload := machines.Machine{ + // ... +} + + +read, err := client.CreateOrUpdate(ctx, id, payload, machines.DefaultCreateOrUpdateOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `MachinesClient.Delete` + +```go +ctx := context.TODO() +id := machines.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue") + +read, err := client.Delete(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `MachinesClient.Get` + +```go +ctx := context.TODO() +id := machines.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue") + +read, err := client.Get(ctx, id, machines.DefaultGetOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `MachinesClient.InstallPatches` + +```go +ctx := context.TODO() +id := machines.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue") + +payload := machines.MachineInstallPatchesParameters{ + // ... +} + + +if err := client.InstallPatchesThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `MachinesClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id, machines.DefaultListByResourceGroupOperationOptions())` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id, machines.DefaultListByResourceGroupOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `MachinesClient.ListBySubscription` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination +items, err := client.ListBySubscriptionComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `MachinesClient.Update` + +```go +ctx := context.TODO() +id := machines.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue") + +payload := machines.MachineUpdate{ + // ... +} + + +read, err := client.Update(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/client.go new file mode 100644 index 0000000000000..e0daf9080614d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/client.go @@ -0,0 +1,26 @@ +package machines + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MachinesClient struct { + Client *resourcemanager.Client +} + +func NewMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*MachinesClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machines", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating MachinesClient: %+v", err) + } + + return &MachinesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/constants.go new file mode 100644 index 0000000000000..057bb3d45c4ce --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/constants.go @@ -0,0 +1,1419 @@ +package machines + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AgentConfigurationMode string + +const ( + AgentConfigurationModeFull AgentConfigurationMode = "full" + AgentConfigurationModeMonitor AgentConfigurationMode = "monitor" +) + +func PossibleValuesForAgentConfigurationMode() []string { + return []string{ + string(AgentConfigurationModeFull), + string(AgentConfigurationModeMonitor), + } +} + +func (s *AgentConfigurationMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAgentConfigurationMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAgentConfigurationMode(input string) (*AgentConfigurationMode, error) { + vals := map[string]AgentConfigurationMode{ + "full": AgentConfigurationModeFull, + "monitor": AgentConfigurationModeMonitor, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AgentConfigurationMode(input) + return &out, nil +} + +type ArcKindEnum string + +const ( + ArcKindEnumAVS ArcKindEnum = "AVS" + ArcKindEnumAWS ArcKindEnum = "AWS" + ArcKindEnumEPS ArcKindEnum = "EPS" + ArcKindEnumGCP ArcKindEnum = "GCP" + ArcKindEnumHCI ArcKindEnum = "HCI" + ArcKindEnumSCVMM ArcKindEnum = "SCVMM" + ArcKindEnumVMware ArcKindEnum = "VMware" +) + +func PossibleValuesForArcKindEnum() []string { + return []string{ + string(ArcKindEnumAVS), + string(ArcKindEnumAWS), + string(ArcKindEnumEPS), + string(ArcKindEnumGCP), + string(ArcKindEnumHCI), + string(ArcKindEnumSCVMM), + string(ArcKindEnumVMware), + } +} + +func (s *ArcKindEnum) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseArcKindEnum(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseArcKindEnum(input string) (*ArcKindEnum, error) { + vals := map[string]ArcKindEnum{ + "avs": ArcKindEnumAVS, + "aws": ArcKindEnumAWS, + "eps": ArcKindEnumEPS, + "gcp": ArcKindEnumGCP, + "hci": ArcKindEnumHCI, + "scvmm": ArcKindEnumSCVMM, + "vmware": ArcKindEnumVMware, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ArcKindEnum(input) + return &out, nil +} + +type AssessmentModeTypes string + +const ( + AssessmentModeTypesAutomaticByPlatform AssessmentModeTypes = "AutomaticByPlatform" + AssessmentModeTypesImageDefault AssessmentModeTypes = "ImageDefault" +) + +func PossibleValuesForAssessmentModeTypes() []string { + return []string{ + string(AssessmentModeTypesAutomaticByPlatform), + string(AssessmentModeTypesImageDefault), + } +} + +func (s *AssessmentModeTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAssessmentModeTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAssessmentModeTypes(input string) (*AssessmentModeTypes, error) { + vals := map[string]AssessmentModeTypes{ + "automaticbyplatform": AssessmentModeTypesAutomaticByPlatform, + "imagedefault": AssessmentModeTypesImageDefault, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AssessmentModeTypes(input) + return &out, nil +} + +type EsuEligibility string + +const ( + EsuEligibilityEligible EsuEligibility = "Eligible" + EsuEligibilityIneligible EsuEligibility = "Ineligible" + EsuEligibilityUnknown EsuEligibility = "Unknown" +) + +func PossibleValuesForEsuEligibility() []string { + return []string{ + string(EsuEligibilityEligible), + string(EsuEligibilityIneligible), + string(EsuEligibilityUnknown), + } +} + +func (s *EsuEligibility) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseEsuEligibility(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseEsuEligibility(input string) (*EsuEligibility, error) { + vals := map[string]EsuEligibility{ + "eligible": EsuEligibilityEligible, + "ineligible": EsuEligibilityIneligible, + "unknown": EsuEligibilityUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EsuEligibility(input) + return &out, nil +} + +type EsuKeyState string + +const ( + EsuKeyStateActive EsuKeyState = "Active" + EsuKeyStateInactive EsuKeyState = "Inactive" +) + +func PossibleValuesForEsuKeyState() []string { + return []string{ + string(EsuKeyStateActive), + string(EsuKeyStateInactive), + } +} + +func (s *EsuKeyState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseEsuKeyState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseEsuKeyState(input string) (*EsuKeyState, error) { + vals := map[string]EsuKeyState{ + "active": EsuKeyStateActive, + "inactive": EsuKeyStateInactive, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EsuKeyState(input) + return &out, nil +} + +type EsuServerType string + +const ( + EsuServerTypeDatacenter EsuServerType = "Datacenter" + EsuServerTypeStandard EsuServerType = "Standard" +) + +func PossibleValuesForEsuServerType() []string { + return []string{ + string(EsuServerTypeDatacenter), + string(EsuServerTypeStandard), + } +} + +func (s *EsuServerType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseEsuServerType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseEsuServerType(input string) (*EsuServerType, error) { + vals := map[string]EsuServerType{ + "datacenter": EsuServerTypeDatacenter, + "standard": EsuServerTypeStandard, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EsuServerType(input) + return &out, nil +} + +type HotpatchEnablementStatus string + +const ( + HotpatchEnablementStatusActionRequired HotpatchEnablementStatus = "ActionRequired" + HotpatchEnablementStatusDisabled HotpatchEnablementStatus = "Disabled" + HotpatchEnablementStatusEnabled HotpatchEnablementStatus = "Enabled" + HotpatchEnablementStatusPendingEvaluation HotpatchEnablementStatus = "PendingEvaluation" + HotpatchEnablementStatusUnknown HotpatchEnablementStatus = "Unknown" +) + +func PossibleValuesForHotpatchEnablementStatus() []string { + return []string{ + string(HotpatchEnablementStatusActionRequired), + string(HotpatchEnablementStatusDisabled), + string(HotpatchEnablementStatusEnabled), + string(HotpatchEnablementStatusPendingEvaluation), + string(HotpatchEnablementStatusUnknown), + } +} + +func (s *HotpatchEnablementStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHotpatchEnablementStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHotpatchEnablementStatus(input string) (*HotpatchEnablementStatus, error) { + vals := map[string]HotpatchEnablementStatus{ + "actionrequired": HotpatchEnablementStatusActionRequired, + "disabled": HotpatchEnablementStatusDisabled, + "enabled": HotpatchEnablementStatusEnabled, + "pendingevaluation": HotpatchEnablementStatusPendingEvaluation, + "unknown": HotpatchEnablementStatusUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HotpatchEnablementStatus(input) + return &out, nil +} + +type InstanceViewTypes string + +const ( + InstanceViewTypesInstanceView InstanceViewTypes = "instanceView" +) + +func PossibleValuesForInstanceViewTypes() []string { + return []string{ + string(InstanceViewTypesInstanceView), + } +} + +func (s *InstanceViewTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseInstanceViewTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseInstanceViewTypes(input string) (*InstanceViewTypes, error) { + vals := map[string]InstanceViewTypes{ + "instanceview": InstanceViewTypesInstanceView, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := InstanceViewTypes(input) + return &out, nil +} + +type LastAttemptStatusEnum string + +const ( + LastAttemptStatusEnumFailed LastAttemptStatusEnum = "Failed" + LastAttemptStatusEnumSuccess LastAttemptStatusEnum = "Success" +) + +func PossibleValuesForLastAttemptStatusEnum() []string { + return []string{ + string(LastAttemptStatusEnumFailed), + string(LastAttemptStatusEnumSuccess), + } +} + +func (s *LastAttemptStatusEnum) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLastAttemptStatusEnum(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLastAttemptStatusEnum(input string) (*LastAttemptStatusEnum, error) { + vals := map[string]LastAttemptStatusEnum{ + "failed": LastAttemptStatusEnumFailed, + "success": LastAttemptStatusEnumSuccess, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LastAttemptStatusEnum(input) + return &out, nil +} + +type LicenseAssignmentState string + +const ( + LicenseAssignmentStateAssigned LicenseAssignmentState = "Assigned" + LicenseAssignmentStateNotAssigned LicenseAssignmentState = "NotAssigned" +) + +func PossibleValuesForLicenseAssignmentState() []string { + return []string{ + string(LicenseAssignmentStateAssigned), + string(LicenseAssignmentStateNotAssigned), + } +} + +func (s *LicenseAssignmentState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLicenseAssignmentState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLicenseAssignmentState(input string) (*LicenseAssignmentState, error) { + vals := map[string]LicenseAssignmentState{ + "assigned": LicenseAssignmentStateAssigned, + "notassigned": LicenseAssignmentStateNotAssigned, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LicenseAssignmentState(input) + return &out, nil +} + +type LicenseCoreType string + +const ( + LicenseCoreTypePCore LicenseCoreType = "pCore" + LicenseCoreTypeVCore LicenseCoreType = "vCore" +) + +func PossibleValuesForLicenseCoreType() []string { + return []string{ + string(LicenseCoreTypePCore), + string(LicenseCoreTypeVCore), + } +} + +func (s *LicenseCoreType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLicenseCoreType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLicenseCoreType(input string) (*LicenseCoreType, error) { + vals := map[string]LicenseCoreType{ + "pcore": LicenseCoreTypePCore, + "vcore": LicenseCoreTypeVCore, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LicenseCoreType(input) + return &out, nil +} + +type LicenseEdition string + +const ( + LicenseEditionDatacenter LicenseEdition = "Datacenter" + LicenseEditionStandard LicenseEdition = "Standard" +) + +func PossibleValuesForLicenseEdition() []string { + return []string{ + string(LicenseEditionDatacenter), + string(LicenseEditionStandard), + } +} + +func (s *LicenseEdition) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLicenseEdition(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLicenseEdition(input string) (*LicenseEdition, error) { + vals := map[string]LicenseEdition{ + "datacenter": LicenseEditionDatacenter, + "standard": LicenseEditionStandard, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LicenseEdition(input) + return &out, nil +} + +type LicenseProfileProductType string + +const ( + LicenseProfileProductTypeWindowsIoTEnterprise LicenseProfileProductType = "WindowsIoTEnterprise" + LicenseProfileProductTypeWindowsServer LicenseProfileProductType = "WindowsServer" +) + +func PossibleValuesForLicenseProfileProductType() []string { + return []string{ + string(LicenseProfileProductTypeWindowsIoTEnterprise), + string(LicenseProfileProductTypeWindowsServer), + } +} + +func (s *LicenseProfileProductType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLicenseProfileProductType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLicenseProfileProductType(input string) (*LicenseProfileProductType, error) { + vals := map[string]LicenseProfileProductType{ + "windowsiotenterprise": LicenseProfileProductTypeWindowsIoTEnterprise, + "windowsserver": LicenseProfileProductTypeWindowsServer, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LicenseProfileProductType(input) + return &out, nil +} + +type LicenseProfileSubscriptionStatus string + +const ( + LicenseProfileSubscriptionStatusDisabled LicenseProfileSubscriptionStatus = "Disabled" + LicenseProfileSubscriptionStatusDisabling LicenseProfileSubscriptionStatus = "Disabling" + LicenseProfileSubscriptionStatusEnabled LicenseProfileSubscriptionStatus = "Enabled" + LicenseProfileSubscriptionStatusEnabling LicenseProfileSubscriptionStatus = "Enabling" + LicenseProfileSubscriptionStatusFailed LicenseProfileSubscriptionStatus = "Failed" + LicenseProfileSubscriptionStatusUnknown LicenseProfileSubscriptionStatus = "Unknown" +) + +func PossibleValuesForLicenseProfileSubscriptionStatus() []string { + return []string{ + string(LicenseProfileSubscriptionStatusDisabled), + string(LicenseProfileSubscriptionStatusDisabling), + string(LicenseProfileSubscriptionStatusEnabled), + string(LicenseProfileSubscriptionStatusEnabling), + string(LicenseProfileSubscriptionStatusFailed), + string(LicenseProfileSubscriptionStatusUnknown), + } +} + +func (s *LicenseProfileSubscriptionStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLicenseProfileSubscriptionStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLicenseProfileSubscriptionStatus(input string) (*LicenseProfileSubscriptionStatus, error) { + vals := map[string]LicenseProfileSubscriptionStatus{ + "disabled": LicenseProfileSubscriptionStatusDisabled, + "disabling": LicenseProfileSubscriptionStatusDisabling, + "enabled": LicenseProfileSubscriptionStatusEnabled, + "enabling": LicenseProfileSubscriptionStatusEnabling, + "failed": LicenseProfileSubscriptionStatusFailed, + "unknown": LicenseProfileSubscriptionStatusUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LicenseProfileSubscriptionStatus(input) + return &out, nil +} + +type LicenseState string + +const ( + LicenseStateActivated LicenseState = "Activated" + LicenseStateDeactivated LicenseState = "Deactivated" +) + +func PossibleValuesForLicenseState() []string { + return []string{ + string(LicenseStateActivated), + string(LicenseStateDeactivated), + } +} + +func (s *LicenseState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLicenseState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLicenseState(input string) (*LicenseState, error) { + vals := map[string]LicenseState{ + "activated": LicenseStateActivated, + "deactivated": LicenseStateDeactivated, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LicenseState(input) + return &out, nil +} + +type LicenseStatus string + +const ( + LicenseStatusExtendedGrace LicenseStatus = "ExtendedGrace" + LicenseStatusLicensed LicenseStatus = "Licensed" + LicenseStatusNonGenuineGrace LicenseStatus = "NonGenuineGrace" + LicenseStatusNotification LicenseStatus = "Notification" + LicenseStatusOOBGrace LicenseStatus = "OOBGrace" + LicenseStatusOOTGrace LicenseStatus = "OOTGrace" + LicenseStatusUnlicensed LicenseStatus = "Unlicensed" +) + +func PossibleValuesForLicenseStatus() []string { + return []string{ + string(LicenseStatusExtendedGrace), + string(LicenseStatusLicensed), + string(LicenseStatusNonGenuineGrace), + string(LicenseStatusNotification), + string(LicenseStatusOOBGrace), + string(LicenseStatusOOTGrace), + string(LicenseStatusUnlicensed), + } +} + +func (s *LicenseStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLicenseStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLicenseStatus(input string) (*LicenseStatus, error) { + vals := map[string]LicenseStatus{ + "extendedgrace": LicenseStatusExtendedGrace, + "licensed": LicenseStatusLicensed, + "nongenuinegrace": LicenseStatusNonGenuineGrace, + "notification": LicenseStatusNotification, + "oobgrace": LicenseStatusOOBGrace, + "ootgrace": LicenseStatusOOTGrace, + "unlicensed": LicenseStatusUnlicensed, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LicenseStatus(input) + return &out, nil +} + +type LicenseTarget string + +const ( + LicenseTargetWindowsServerTwoZeroOneTwo LicenseTarget = "Windows Server 2012" + LicenseTargetWindowsServerTwoZeroOneTwoRTwo LicenseTarget = "Windows Server 2012 R2" +) + +func PossibleValuesForLicenseTarget() []string { + return []string{ + string(LicenseTargetWindowsServerTwoZeroOneTwo), + string(LicenseTargetWindowsServerTwoZeroOneTwoRTwo), + } +} + +func (s *LicenseTarget) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLicenseTarget(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLicenseTarget(input string) (*LicenseTarget, error) { + vals := map[string]LicenseTarget{ + "windows server 2012": LicenseTargetWindowsServerTwoZeroOneTwo, + "windows server 2012 r2": LicenseTargetWindowsServerTwoZeroOneTwoRTwo, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LicenseTarget(input) + return &out, nil +} + +type LicenseType string + +const ( + LicenseTypeESU LicenseType = "ESU" +) + +func PossibleValuesForLicenseType() []string { + return []string{ + string(LicenseTypeESU), + } +} + +func (s *LicenseType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLicenseType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLicenseType(input string) (*LicenseType, error) { + vals := map[string]LicenseType{ + "esu": LicenseTypeESU, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LicenseType(input) + return &out, nil +} + +type OsType string + +const ( + OsTypeLinux OsType = "Linux" + OsTypeWindows OsType = "Windows" +) + +func PossibleValuesForOsType() []string { + return []string{ + string(OsTypeLinux), + string(OsTypeWindows), + } +} + +func (s *OsType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOsType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOsType(input string) (*OsType, error) { + vals := map[string]OsType{ + "linux": OsTypeLinux, + "windows": OsTypeWindows, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OsType(input) + return &out, nil +} + +type PatchModeTypes string + +const ( + PatchModeTypesAutomaticByOS PatchModeTypes = "AutomaticByOS" + PatchModeTypesAutomaticByPlatform PatchModeTypes = "AutomaticByPlatform" + PatchModeTypesImageDefault PatchModeTypes = "ImageDefault" + PatchModeTypesManual PatchModeTypes = "Manual" +) + +func PossibleValuesForPatchModeTypes() []string { + return []string{ + string(PatchModeTypesAutomaticByOS), + string(PatchModeTypesAutomaticByPlatform), + string(PatchModeTypesImageDefault), + string(PatchModeTypesManual), + } +} + +func (s *PatchModeTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePatchModeTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePatchModeTypes(input string) (*PatchModeTypes, error) { + vals := map[string]PatchModeTypes{ + "automaticbyos": PatchModeTypesAutomaticByOS, + "automaticbyplatform": PatchModeTypesAutomaticByPlatform, + "imagedefault": PatchModeTypesImageDefault, + "manual": PatchModeTypesManual, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PatchModeTypes(input) + return &out, nil +} + +type PatchOperationStartedBy string + +const ( + PatchOperationStartedByPlatform PatchOperationStartedBy = "Platform" + PatchOperationStartedByUser PatchOperationStartedBy = "User" +) + +func PossibleValuesForPatchOperationStartedBy() []string { + return []string{ + string(PatchOperationStartedByPlatform), + string(PatchOperationStartedByUser), + } +} + +func (s *PatchOperationStartedBy) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePatchOperationStartedBy(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePatchOperationStartedBy(input string) (*PatchOperationStartedBy, error) { + vals := map[string]PatchOperationStartedBy{ + "platform": PatchOperationStartedByPlatform, + "user": PatchOperationStartedByUser, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PatchOperationStartedBy(input) + return &out, nil +} + +type PatchOperationStatus string + +const ( + PatchOperationStatusCompletedWithWarnings PatchOperationStatus = "CompletedWithWarnings" + PatchOperationStatusFailed PatchOperationStatus = "Failed" + PatchOperationStatusInProgress PatchOperationStatus = "InProgress" + PatchOperationStatusSucceeded PatchOperationStatus = "Succeeded" + PatchOperationStatusUnknown PatchOperationStatus = "Unknown" +) + +func PossibleValuesForPatchOperationStatus() []string { + return []string{ + string(PatchOperationStatusCompletedWithWarnings), + string(PatchOperationStatusFailed), + string(PatchOperationStatusInProgress), + string(PatchOperationStatusSucceeded), + string(PatchOperationStatusUnknown), + } +} + +func (s *PatchOperationStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePatchOperationStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePatchOperationStatus(input string) (*PatchOperationStatus, error) { + vals := map[string]PatchOperationStatus{ + "completedwithwarnings": PatchOperationStatusCompletedWithWarnings, + "failed": PatchOperationStatusFailed, + "inprogress": PatchOperationStatusInProgress, + "succeeded": PatchOperationStatusSucceeded, + "unknown": PatchOperationStatusUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PatchOperationStatus(input) + return &out, nil +} + +type PatchServiceUsed string + +const ( + PatchServiceUsedAPT PatchServiceUsed = "APT" + PatchServiceUsedUnknown PatchServiceUsed = "Unknown" + PatchServiceUsedWU PatchServiceUsed = "WU" + PatchServiceUsedWUWSUS PatchServiceUsed = "WU_WSUS" + PatchServiceUsedYUM PatchServiceUsed = "YUM" + PatchServiceUsedZypper PatchServiceUsed = "Zypper" +) + +func PossibleValuesForPatchServiceUsed() []string { + return []string{ + string(PatchServiceUsedAPT), + string(PatchServiceUsedUnknown), + string(PatchServiceUsedWU), + string(PatchServiceUsedWUWSUS), + string(PatchServiceUsedYUM), + string(PatchServiceUsedZypper), + } +} + +func (s *PatchServiceUsed) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePatchServiceUsed(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePatchServiceUsed(input string) (*PatchServiceUsed, error) { + vals := map[string]PatchServiceUsed{ + "apt": PatchServiceUsedAPT, + "unknown": PatchServiceUsedUnknown, + "wu": PatchServiceUsedWU, + "wu_wsus": PatchServiceUsedWUWSUS, + "yum": PatchServiceUsedYUM, + "zypper": PatchServiceUsedZypper, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PatchServiceUsed(input) + return &out, nil +} + +type ProgramYear string + +const ( + ProgramYearYearOne ProgramYear = "Year 1" + ProgramYearYearThree ProgramYear = "Year 3" + ProgramYearYearTwo ProgramYear = "Year 2" +) + +func PossibleValuesForProgramYear() []string { + return []string{ + string(ProgramYearYearOne), + string(ProgramYearYearThree), + string(ProgramYearYearTwo), + } +} + +func (s *ProgramYear) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProgramYear(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProgramYear(input string) (*ProgramYear, error) { + vals := map[string]ProgramYear{ + "year 1": ProgramYearYearOne, + "year 3": ProgramYearYearThree, + "year 2": ProgramYearYearTwo, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProgramYear(input) + return &out, nil +} + +type ProvisioningState string + +const ( + ProvisioningStateAccepted ProvisioningState = "Accepted" + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateDeleted ProvisioningState = "Deleted" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateAccepted), + string(ProvisioningStateCanceled), + string(ProvisioningStateCreating), + string(ProvisioningStateDeleted), + string(ProvisioningStateDeleting), + string(ProvisioningStateFailed), + string(ProvisioningStateSucceeded), + string(ProvisioningStateUpdating), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "accepted": ProvisioningStateAccepted, + "canceled": ProvisioningStateCanceled, + "creating": ProvisioningStateCreating, + "deleted": ProvisioningStateDeleted, + "deleting": ProvisioningStateDeleting, + "failed": ProvisioningStateFailed, + "succeeded": ProvisioningStateSucceeded, + "updating": ProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} + +type StatusLevelTypes string + +const ( + StatusLevelTypesError StatusLevelTypes = "Error" + StatusLevelTypesInfo StatusLevelTypes = "Info" + StatusLevelTypesWarning StatusLevelTypes = "Warning" +) + +func PossibleValuesForStatusLevelTypes() []string { + return []string{ + string(StatusLevelTypesError), + string(StatusLevelTypesInfo), + string(StatusLevelTypesWarning), + } +} + +func (s *StatusLevelTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseStatusLevelTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseStatusLevelTypes(input string) (*StatusLevelTypes, error) { + vals := map[string]StatusLevelTypes{ + "error": StatusLevelTypesError, + "info": StatusLevelTypesInfo, + "warning": StatusLevelTypesWarning, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := StatusLevelTypes(input) + return &out, nil +} + +type StatusTypes string + +const ( + StatusTypesConnected StatusTypes = "Connected" + StatusTypesDisconnected StatusTypes = "Disconnected" + StatusTypesError StatusTypes = "Error" +) + +func PossibleValuesForStatusTypes() []string { + return []string{ + string(StatusTypesConnected), + string(StatusTypesDisconnected), + string(StatusTypesError), + } +} + +func (s *StatusTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseStatusTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseStatusTypes(input string) (*StatusTypes, error) { + vals := map[string]StatusTypes{ + "connected": StatusTypesConnected, + "disconnected": StatusTypesDisconnected, + "error": StatusTypesError, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := StatusTypes(input) + return &out, nil +} + +type VMGuestPatchClassificationLinux string + +const ( + VMGuestPatchClassificationLinuxCritical VMGuestPatchClassificationLinux = "Critical" + VMGuestPatchClassificationLinuxOther VMGuestPatchClassificationLinux = "Other" + VMGuestPatchClassificationLinuxSecurity VMGuestPatchClassificationLinux = "Security" +) + +func PossibleValuesForVMGuestPatchClassificationLinux() []string { + return []string{ + string(VMGuestPatchClassificationLinuxCritical), + string(VMGuestPatchClassificationLinuxOther), + string(VMGuestPatchClassificationLinuxSecurity), + } +} + +func (s *VMGuestPatchClassificationLinux) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseVMGuestPatchClassificationLinux(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseVMGuestPatchClassificationLinux(input string) (*VMGuestPatchClassificationLinux, error) { + vals := map[string]VMGuestPatchClassificationLinux{ + "critical": VMGuestPatchClassificationLinuxCritical, + "other": VMGuestPatchClassificationLinuxOther, + "security": VMGuestPatchClassificationLinuxSecurity, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := VMGuestPatchClassificationLinux(input) + return &out, nil +} + +type VMGuestPatchClassificationWindows string + +const ( + VMGuestPatchClassificationWindowsCritical VMGuestPatchClassificationWindows = "Critical" + VMGuestPatchClassificationWindowsDefinition VMGuestPatchClassificationWindows = "Definition" + VMGuestPatchClassificationWindowsFeaturePack VMGuestPatchClassificationWindows = "FeaturePack" + VMGuestPatchClassificationWindowsSecurity VMGuestPatchClassificationWindows = "Security" + VMGuestPatchClassificationWindowsServicePack VMGuestPatchClassificationWindows = "ServicePack" + VMGuestPatchClassificationWindowsTools VMGuestPatchClassificationWindows = "Tools" + VMGuestPatchClassificationWindowsUpdateRollUp VMGuestPatchClassificationWindows = "UpdateRollUp" + VMGuestPatchClassificationWindowsUpdates VMGuestPatchClassificationWindows = "Updates" +) + +func PossibleValuesForVMGuestPatchClassificationWindows() []string { + return []string{ + string(VMGuestPatchClassificationWindowsCritical), + string(VMGuestPatchClassificationWindowsDefinition), + string(VMGuestPatchClassificationWindowsFeaturePack), + string(VMGuestPatchClassificationWindowsSecurity), + string(VMGuestPatchClassificationWindowsServicePack), + string(VMGuestPatchClassificationWindowsTools), + string(VMGuestPatchClassificationWindowsUpdateRollUp), + string(VMGuestPatchClassificationWindowsUpdates), + } +} + +func (s *VMGuestPatchClassificationWindows) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseVMGuestPatchClassificationWindows(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseVMGuestPatchClassificationWindows(input string) (*VMGuestPatchClassificationWindows, error) { + vals := map[string]VMGuestPatchClassificationWindows{ + "critical": VMGuestPatchClassificationWindowsCritical, + "definition": VMGuestPatchClassificationWindowsDefinition, + "featurepack": VMGuestPatchClassificationWindowsFeaturePack, + "security": VMGuestPatchClassificationWindowsSecurity, + "servicepack": VMGuestPatchClassificationWindowsServicePack, + "tools": VMGuestPatchClassificationWindowsTools, + "updaterollup": VMGuestPatchClassificationWindowsUpdateRollUp, + "updates": VMGuestPatchClassificationWindowsUpdates, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := VMGuestPatchClassificationWindows(input) + return &out, nil +} + +type VMGuestPatchRebootSetting string + +const ( + VMGuestPatchRebootSettingAlways VMGuestPatchRebootSetting = "Always" + VMGuestPatchRebootSettingIfRequired VMGuestPatchRebootSetting = "IfRequired" + VMGuestPatchRebootSettingNever VMGuestPatchRebootSetting = "Never" +) + +func PossibleValuesForVMGuestPatchRebootSetting() []string { + return []string{ + string(VMGuestPatchRebootSettingAlways), + string(VMGuestPatchRebootSettingIfRequired), + string(VMGuestPatchRebootSettingNever), + } +} + +func (s *VMGuestPatchRebootSetting) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseVMGuestPatchRebootSetting(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseVMGuestPatchRebootSetting(input string) (*VMGuestPatchRebootSetting, error) { + vals := map[string]VMGuestPatchRebootSetting{ + "always": VMGuestPatchRebootSettingAlways, + "ifrequired": VMGuestPatchRebootSettingIfRequired, + "never": VMGuestPatchRebootSettingNever, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := VMGuestPatchRebootSetting(input) + return &out, nil +} + +type VMGuestPatchRebootStatus string + +const ( + VMGuestPatchRebootStatusCompleted VMGuestPatchRebootStatus = "Completed" + VMGuestPatchRebootStatusFailed VMGuestPatchRebootStatus = "Failed" + VMGuestPatchRebootStatusNotNeeded VMGuestPatchRebootStatus = "NotNeeded" + VMGuestPatchRebootStatusRequired VMGuestPatchRebootStatus = "Required" + VMGuestPatchRebootStatusStarted VMGuestPatchRebootStatus = "Started" + VMGuestPatchRebootStatusUnknown VMGuestPatchRebootStatus = "Unknown" +) + +func PossibleValuesForVMGuestPatchRebootStatus() []string { + return []string{ + string(VMGuestPatchRebootStatusCompleted), + string(VMGuestPatchRebootStatusFailed), + string(VMGuestPatchRebootStatusNotNeeded), + string(VMGuestPatchRebootStatusRequired), + string(VMGuestPatchRebootStatusStarted), + string(VMGuestPatchRebootStatusUnknown), + } +} + +func (s *VMGuestPatchRebootStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseVMGuestPatchRebootStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseVMGuestPatchRebootStatus(input string) (*VMGuestPatchRebootStatus, error) { + vals := map[string]VMGuestPatchRebootStatus{ + "completed": VMGuestPatchRebootStatusCompleted, + "failed": VMGuestPatchRebootStatusFailed, + "notneeded": VMGuestPatchRebootStatusNotNeeded, + "required": VMGuestPatchRebootStatusRequired, + "started": VMGuestPatchRebootStatusStarted, + "unknown": VMGuestPatchRebootStatusUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := VMGuestPatchRebootStatus(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/id_machine.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/id_machine.go new file mode 100644 index 0000000000000..e8e33b30e0c9b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/id_machine.go @@ -0,0 +1,130 @@ +package machines + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&MachineId{}) +} + +var _ resourceids.ResourceId = &MachineId{} + +// MachineId is a struct representing the Resource ID for a Machine +type MachineId struct { + SubscriptionId string + ResourceGroupName string + MachineName string +} + +// NewMachineID returns a new MachineId struct +func NewMachineID(subscriptionId string, resourceGroupName string, machineName string) MachineId { + return MachineId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + MachineName: machineName, + } +} + +// ParseMachineID parses 'input' into a MachineId +func ParseMachineID(input string) (*MachineId, error) { + parser := resourceids.NewParserFromResourceIdType(&MachineId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MachineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseMachineIDInsensitively parses 'input' case-insensitively into a MachineId +// note: this method should only be used for API response data and not user input +func ParseMachineIDInsensitively(input string) (*MachineId, error) { + parser := resourceids.NewParserFromResourceIdType(&MachineId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MachineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MachineId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.MachineName, ok = input.Parsed["machineName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "machineName", input) + } + + return nil +} + +// ValidateMachineID checks that 'input' can be parsed as a Machine ID +func ValidateMachineID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseMachineID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Machine ID +func (id MachineId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.HybridCompute/machines/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MachineName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Machine ID +func (id MachineId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftHybridCompute", "Microsoft.HybridCompute", "Microsoft.HybridCompute"), + resourceids.StaticSegment("staticMachines", "machines", "machines"), + resourceids.UserSpecifiedSegment("machineName", "machineValue"), + } +} + +// String returns a human-readable description of this Machine ID +func (id MachineId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Machine Name: %q", id.MachineName), + } + return fmt.Sprintf("Machine (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/method_assesspatches.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/method_assesspatches.go new file mode 100644 index 0000000000000..32f5337ff3672 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/method_assesspatches.go @@ -0,0 +1,71 @@ +package machines + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AssessPatchesOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *MachineAssessPatchesResult +} + +// AssessPatches ... +func (c MachinesClient) AssessPatches(ctx context.Context, id MachineId) (result AssessPatchesOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/assessPatches", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// AssessPatchesThenPoll performs AssessPatches then polls until it's completed +func (c MachinesClient) AssessPatchesThenPoll(ctx context.Context, id MachineId) error { + result, err := c.AssessPatches(ctx, id) + if err != nil { + return fmt.Errorf("performing AssessPatches: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after AssessPatches: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/method_createorupdate.go new file mode 100644 index 0000000000000..c060ab4884955 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/method_createorupdate.go @@ -0,0 +1,87 @@ +package machines + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *Machine +} + +type CreateOrUpdateOperationOptions struct { + Expand *string +} + +func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions { + return CreateOrUpdateOperationOptions{} +} + +func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o CreateOrUpdateOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.Expand != nil { + out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) + } + return &out +} + +// CreateOrUpdate ... +func (c MachinesClient) CreateOrUpdate(ctx context.Context, id MachineId, input Machine, options CreateOrUpdateOperationOptions) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPut, + OptionsObject: options, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model Machine + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/method_delete.go new file mode 100644 index 0000000000000..60fb26d3e4878 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/method_delete.go @@ -0,0 +1,47 @@ +package machines + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c MachinesClient) Delete(ctx context.Context, id MachineId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/method_get.go new file mode 100644 index 0000000000000..4cc80ee56283f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/method_get.go @@ -0,0 +1,83 @@ +package machines + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *Machine +} + +type GetOperationOptions struct { + Expand *InstanceViewTypes +} + +func DefaultGetOperationOptions() GetOperationOptions { + return GetOperationOptions{} +} + +func (o GetOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o GetOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o GetOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.Expand != nil { + out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) + } + return &out +} + +// Get ... +func (c MachinesClient) Get(ctx context.Context, id MachineId, options GetOperationOptions) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model Machine + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/method_installpatches.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/method_installpatches.go new file mode 100644 index 0000000000000..3067cf403a610 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/method_installpatches.go @@ -0,0 +1,75 @@ +package machines + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InstallPatchesOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *MachineInstallPatchesResult +} + +// InstallPatches ... +func (c MachinesClient) InstallPatches(ctx context.Context, id MachineId, input MachineInstallPatchesParameters) (result InstallPatchesOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/installPatches", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// InstallPatchesThenPoll performs InstallPatches then polls until it's completed +func (c MachinesClient) InstallPatchesThenPoll(ctx context.Context, id MachineId, input MachineInstallPatchesParameters) error { + result, err := c.InstallPatches(ctx, id, input) + if err != nil { + return fmt.Errorf("performing InstallPatches: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after InstallPatches: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/method_listbyresourcegroup.go new file mode 100644 index 0000000000000..09ec696d1a0db --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/method_listbyresourcegroup.go @@ -0,0 +1,134 @@ +package machines + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Machine +} + +type ListByResourceGroupCompleteResult struct { + LatestHttpResponse *http.Response + Items []Machine +} + +type ListByResourceGroupOperationOptions struct { + Expand *string +} + +func DefaultListByResourceGroupOperationOptions() ListByResourceGroupOperationOptions { + return ListByResourceGroupOperationOptions{} +} + +func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o ListByResourceGroupOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.Expand != nil { + out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) + } + return &out +} + +type ListByResourceGroupCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByResourceGroup ... +func (c MachinesClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (result ListByResourceGroupOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Pager: &ListByResourceGroupCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.HybridCompute/machines", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Machine `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByResourceGroupComplete retrieves all the results into a single object +func (c MachinesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, options, MachineOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c MachinesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions, predicate MachineOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { + items := make([]Machine, 0) + + resp, err := c.ListByResourceGroup(ctx, id, options) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByResourceGroupCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/method_listbysubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/method_listbysubscription.go new file mode 100644 index 0000000000000..ea000d8d739dc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/method_listbysubscription.go @@ -0,0 +1,106 @@ +package machines + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListBySubscriptionOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Machine +} + +type ListBySubscriptionCompleteResult struct { + LatestHttpResponse *http.Response + Items []Machine +} + +type ListBySubscriptionCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListBySubscriptionCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListBySubscription ... +func (c MachinesClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListBySubscriptionCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.HybridCompute/machines", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Machine `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListBySubscriptionComplete retrieves all the results into a single object +func (c MachinesClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, MachineOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c MachinesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate MachineOperationPredicate) (result ListBySubscriptionCompleteResult, err error) { + items := make([]Machine, 0) + + resp, err := c.ListBySubscription(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListBySubscriptionCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/method_update.go new file mode 100644 index 0000000000000..f90641d69c8dc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/method_update.go @@ -0,0 +1,58 @@ +package machines + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *Machine +} + +// Update ... +func (c MachinesClient) Update(ctx context.Context, id MachineId, input MachineUpdate) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model Machine + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_agentconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_agentconfiguration.go new file mode 100644 index 0000000000000..705bcf8d415fc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_agentconfiguration.go @@ -0,0 +1,15 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AgentConfiguration struct { + ConfigMode *AgentConfigurationMode `json:"configMode,omitempty"` + ExtensionsAllowList *[]ConfigurationExtension `json:"extensionsAllowList,omitempty"` + ExtensionsBlockList *[]ConfigurationExtension `json:"extensionsBlockList,omitempty"` + ExtensionsEnabled *string `json:"extensionsEnabled,omitempty"` + GuestConfigurationEnabled *string `json:"guestConfigurationEnabled,omitempty"` + IncomingConnectionsPorts *[]string `json:"incomingConnectionsPorts,omitempty"` + ProxyBypass *[]string `json:"proxyBypass,omitempty"` + ProxyUrl *string `json:"proxyUrl,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_agentupgrade.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_agentupgrade.go new file mode 100644 index 0000000000000..a1bfbfc047203 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_agentupgrade.go @@ -0,0 +1,14 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AgentUpgrade struct { + CorrelationId *string `json:"correlationId,omitempty"` + DesiredVersion *string `json:"desiredVersion,omitempty"` + EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"` + LastAttemptDesiredVersion *string `json:"lastAttemptDesiredVersion,omitempty"` + LastAttemptMessage *string `json:"lastAttemptMessage,omitempty"` + LastAttemptStatus *LastAttemptStatusEnum `json:"lastAttemptStatus,omitempty"` + LastAttemptTimestamp *string `json:"lastAttemptTimestamp,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_availablepatchcountbyclassification.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_availablepatchcountbyclassification.go new file mode 100644 index 0000000000000..1fd8afb4296d6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_availablepatchcountbyclassification.go @@ -0,0 +1,16 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AvailablePatchCountByClassification struct { + Critical *int64 `json:"critical,omitempty"` + Definition *int64 `json:"definition,omitempty"` + FeaturePack *int64 `json:"featurePack,omitempty"` + Other *int64 `json:"other,omitempty"` + Security *int64 `json:"security,omitempty"` + ServicePack *int64 `json:"servicePack,omitempty"` + Tools *int64 `json:"tools,omitempty"` + UpdateRollup *int64 `json:"updateRollup,omitempty"` + Updates *int64 `json:"updates,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_cloudmetadata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_cloudmetadata.go new file mode 100644 index 0000000000000..292947aca13b8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_cloudmetadata.go @@ -0,0 +1,8 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CloudMetadata struct { + Provider *string `json:"provider,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_configurationextension.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_configurationextension.go new file mode 100644 index 0000000000000..a15e10a01a8cb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_configurationextension.go @@ -0,0 +1,9 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ConfigurationExtension struct { + Publisher *string `json:"publisher,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_erroradditionalinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_erroradditionalinfo.go new file mode 100644 index 0000000000000..b43823d85d244 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_erroradditionalinfo.go @@ -0,0 +1,9 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorAdditionalInfo struct { + Info *interface{} `json:"info,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_errordetail.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_errordetail.go new file mode 100644 index 0000000000000..a76af384f03a1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_errordetail.go @@ -0,0 +1,12 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorDetail struct { + AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` + Code *string `json:"code,omitempty"` + Details *[]ErrorDetail `json:"details,omitempty"` + Message *string `json:"message,omitempty"` + Target *string `json:"target,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_esukey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_esukey.go new file mode 100644 index 0000000000000..3d63017b02e49 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_esukey.go @@ -0,0 +1,9 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EsuKey struct { + LicenseStatus *int64 `json:"licenseStatus,omitempty"` + Sku *string `json:"sku,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_ipaddress.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_ipaddress.go new file mode 100644 index 0000000000000..db2622c5f01a5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_ipaddress.go @@ -0,0 +1,10 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IPAddress struct { + Address *string `json:"address,omitempty"` + IPAddressVersion *string `json:"ipAddressVersion,omitempty"` + Subnet *Subnet `json:"subnet,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_license.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_license.go new file mode 100644 index 0000000000000..cbfd8cf6a094f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_license.go @@ -0,0 +1,18 @@ +package machines + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type License struct { + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *LicenseProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_licensedetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_licensedetails.go new file mode 100644 index 0000000000000..7cb71673ece3f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_licensedetails.go @@ -0,0 +1,15 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LicenseDetails struct { + AssignedLicenses *int64 `json:"assignedLicenses,omitempty"` + Edition *LicenseEdition `json:"edition,omitempty"` + ImmutableId *string `json:"immutableId,omitempty"` + Processors *int64 `json:"processors,omitempty"` + State *LicenseState `json:"state,omitempty"` + Target *LicenseTarget `json:"target,omitempty"` + Type *LicenseCoreType `json:"type,omitempty"` + VolumeLicenseDetails *[]VolumeLicenseDetails `json:"volumeLicenseDetails,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_licenseprofilearmproductprofileproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_licenseprofilearmproductprofileproperties.go new file mode 100644 index 0000000000000..8aff278a4dd0f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_licenseprofilearmproductprofileproperties.go @@ -0,0 +1,69 @@ +package machines + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LicenseProfileArmProductProfileProperties struct { + BillingEndDate *string `json:"billingEndDate,omitempty"` + BillingStartDate *string `json:"billingStartDate,omitempty"` + DisenrollmentDate *string `json:"disenrollmentDate,omitempty"` + EnrollmentDate *string `json:"enrollmentDate,omitempty"` + Error *ErrorDetail `json:"error,omitempty"` + ProductFeatures *[]ProductFeature `json:"productFeatures,omitempty"` + ProductType *LicenseProfileProductType `json:"productType,omitempty"` + SubscriptionStatus *LicenseProfileSubscriptionStatus `json:"subscriptionStatus,omitempty"` +} + +func (o *LicenseProfileArmProductProfileProperties) GetBillingEndDateAsTime() (*time.Time, error) { + if o.BillingEndDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.BillingEndDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *LicenseProfileArmProductProfileProperties) SetBillingEndDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.BillingEndDate = &formatted +} + +func (o *LicenseProfileArmProductProfileProperties) GetBillingStartDateAsTime() (*time.Time, error) { + if o.BillingStartDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.BillingStartDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *LicenseProfileArmProductProfileProperties) SetBillingStartDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.BillingStartDate = &formatted +} + +func (o *LicenseProfileArmProductProfileProperties) GetDisenrollmentDateAsTime() (*time.Time, error) { + if o.DisenrollmentDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.DisenrollmentDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *LicenseProfileArmProductProfileProperties) SetDisenrollmentDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.DisenrollmentDate = &formatted +} + +func (o *LicenseProfileArmProductProfileProperties) GetEnrollmentDateAsTime() (*time.Time, error) { + if o.EnrollmentDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EnrollmentDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *LicenseProfileArmProductProfileProperties) SetEnrollmentDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EnrollmentDate = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_licenseprofilemachineinstanceview.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_licenseprofilemachineinstanceview.go new file mode 100644 index 0000000000000..6f0e3dd86b661 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_licenseprofilemachineinstanceview.go @@ -0,0 +1,12 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LicenseProfileMachineInstanceView struct { + EsuProfile *LicenseProfileMachineInstanceViewEsuProperties `json:"esuProfile,omitempty"` + LicenseChannel *string `json:"licenseChannel,omitempty"` + LicenseStatus *LicenseStatus `json:"licenseStatus,omitempty"` + ProductProfile *LicenseProfileArmProductProfileProperties `json:"productProfile,omitempty"` + SoftwareAssurance *LicenseProfileMachineInstanceViewSoftwareAssurance `json:"softwareAssurance,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_licenseprofilemachineinstanceviewesuproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_licenseprofilemachineinstanceviewesuproperties.go new file mode 100644 index 0000000000000..0e72c18a65f3b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_licenseprofilemachineinstanceviewesuproperties.go @@ -0,0 +1,14 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LicenseProfileMachineInstanceViewEsuProperties struct { + AssignedLicense *License `json:"assignedLicense,omitempty"` + AssignedLicenseImmutableId *string `json:"assignedLicenseImmutableId,omitempty"` + EsuEligibility *EsuEligibility `json:"esuEligibility,omitempty"` + EsuKeyState *EsuKeyState `json:"esuKeyState,omitempty"` + EsuKeys *[]EsuKey `json:"esuKeys,omitempty"` + LicenseAssignmentState *LicenseAssignmentState `json:"licenseAssignmentState,omitempty"` + ServerType *EsuServerType `json:"serverType,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_licenseprofilemachineinstanceviewsoftwareassurance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_licenseprofilemachineinstanceviewsoftwareassurance.go new file mode 100644 index 0000000000000..d3731e27270cd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_licenseprofilemachineinstanceviewsoftwareassurance.go @@ -0,0 +1,8 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LicenseProfileMachineInstanceViewSoftwareAssurance struct { + SoftwareAssuranceCustomer *bool `json:"softwareAssuranceCustomer,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_licenseproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_licenseproperties.go new file mode 100644 index 0000000000000..b1435616000e9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_licenseproperties.go @@ -0,0 +1,11 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LicenseProperties struct { + LicenseDetails *LicenseDetails `json:"licenseDetails,omitempty"` + LicenseType *LicenseType `json:"licenseType,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + TenantId *string `json:"tenantId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_linuxparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_linuxparameters.go new file mode 100644 index 0000000000000..c7157a3520a99 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_linuxparameters.go @@ -0,0 +1,10 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LinuxParameters struct { + ClassificationsToInclude *[]VMGuestPatchClassificationLinux `json:"classificationsToInclude,omitempty"` + PackageNameMasksToExclude *[]string `json:"packageNameMasksToExclude,omitempty"` + PackageNameMasksToInclude *[]string `json:"packageNameMasksToInclude,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_locationdata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_locationdata.go new file mode 100644 index 0000000000000..5d8341e5cca03 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_locationdata.go @@ -0,0 +1,11 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LocationData struct { + City *string `json:"city,omitempty"` + CountryOrRegion *string `json:"countryOrRegion,omitempty"` + District *string `json:"district,omitempty"` + Name string `json:"name"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machine.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machine.go new file mode 100644 index 0000000000000..75aefb1394deb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machine.go @@ -0,0 +1,22 @@ +package machines + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Machine struct { + Id *string `json:"id,omitempty"` + Identity *identity.SystemAssigned `json:"identity,omitempty"` + Kind *ArcKindEnum `json:"kind,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *MachineProperties `json:"properties,omitempty"` + Resources *[]MachineExtension `json:"resources,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineassesspatchesresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineassesspatchesresult.go new file mode 100644 index 0000000000000..bb14fd812f783 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineassesspatchesresult.go @@ -0,0 +1,47 @@ +package machines + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MachineAssessPatchesResult struct { + AssessmentActivityId *string `json:"assessmentActivityId,omitempty"` + AvailablePatchCountByClassification *AvailablePatchCountByClassification `json:"availablePatchCountByClassification,omitempty"` + ErrorDetails *ErrorDetail `json:"errorDetails,omitempty"` + LastModifiedDateTime *string `json:"lastModifiedDateTime,omitempty"` + OsType *OsType `json:"osType,omitempty"` + PatchServiceUsed *PatchServiceUsed `json:"patchServiceUsed,omitempty"` + RebootPending *bool `json:"rebootPending,omitempty"` + StartDateTime *string `json:"startDateTime,omitempty"` + StartedBy *PatchOperationStartedBy `json:"startedBy,omitempty"` + Status *PatchOperationStatus `json:"status,omitempty"` +} + +func (o *MachineAssessPatchesResult) GetLastModifiedDateTimeAsTime() (*time.Time, error) { + if o.LastModifiedDateTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.LastModifiedDateTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *MachineAssessPatchesResult) SetLastModifiedDateTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.LastModifiedDateTime = &formatted +} + +func (o *MachineAssessPatchesResult) GetStartDateTimeAsTime() (*time.Time, error) { + if o.StartDateTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.StartDateTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *MachineAssessPatchesResult) SetStartDateTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.StartDateTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineextension.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineextension.go new file mode 100644 index 0000000000000..f611d3226db8f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineextension.go @@ -0,0 +1,18 @@ +package machines + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MachineExtension struct { + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *MachineExtensionProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineextensioninstanceview.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineextensioninstanceview.go new file mode 100644 index 0000000000000..a1154818910c9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineextensioninstanceview.go @@ -0,0 +1,11 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MachineExtensionInstanceView struct { + Name *string `json:"name,omitempty"` + Status *MachineExtensionInstanceViewStatus `json:"status,omitempty"` + Type *string `json:"type,omitempty"` + TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineextensioninstanceviewstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineextensioninstanceviewstatus.go new file mode 100644 index 0000000000000..42ea89ad402eb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineextensioninstanceviewstatus.go @@ -0,0 +1,30 @@ +package machines + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MachineExtensionInstanceViewStatus struct { + Code *string `json:"code,omitempty"` + DisplayStatus *string `json:"displayStatus,omitempty"` + Level *StatusLevelTypes `json:"level,omitempty"` + Message *string `json:"message,omitempty"` + Time *string `json:"time,omitempty"` +} + +func (o *MachineExtensionInstanceViewStatus) GetTimeAsTime() (*time.Time, error) { + if o.Time == nil { + return nil, nil + } + return dates.ParseAsFormat(o.Time, "2006-01-02T15:04:05Z07:00") +} + +func (o *MachineExtensionInstanceViewStatus) SetTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.Time = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineextensionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineextensionproperties.go new file mode 100644 index 0000000000000..40a2c5bd9b38e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineextensionproperties.go @@ -0,0 +1,17 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MachineExtensionProperties struct { + AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"` + EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"` + ForceUpdateTag *string `json:"forceUpdateTag,omitempty"` + InstanceView *MachineExtensionInstanceView `json:"instanceView,omitempty"` + ProtectedSettings *interface{} `json:"protectedSettings,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + Publisher *string `json:"publisher,omitempty"` + Settings *interface{} `json:"settings,omitempty"` + Type *string `json:"type,omitempty"` + TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineinstallpatchesparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineinstallpatchesparameters.go new file mode 100644 index 0000000000000..6a62cd02c4241 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineinstallpatchesparameters.go @@ -0,0 +1,11 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MachineInstallPatchesParameters struct { + LinuxParameters *LinuxParameters `json:"linuxParameters,omitempty"` + MaximumDuration string `json:"maximumDuration"` + RebootSetting VMGuestPatchRebootSetting `json:"rebootSetting"` + WindowsParameters *WindowsParameters `json:"windowsParameters,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineinstallpatchesresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineinstallpatchesresult.go new file mode 100644 index 0000000000000..42cddc9b2341f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineinstallpatchesresult.go @@ -0,0 +1,52 @@ +package machines + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MachineInstallPatchesResult struct { + ErrorDetails *ErrorDetail `json:"errorDetails,omitempty"` + ExcludedPatchCount *int64 `json:"excludedPatchCount,omitempty"` + FailedPatchCount *int64 `json:"failedPatchCount,omitempty"` + InstallationActivityId *string `json:"installationActivityId,omitempty"` + InstalledPatchCount *int64 `json:"installedPatchCount,omitempty"` + LastModifiedDateTime *string `json:"lastModifiedDateTime,omitempty"` + MaintenanceWindowExceeded *bool `json:"maintenanceWindowExceeded,omitempty"` + NotSelectedPatchCount *int64 `json:"notSelectedPatchCount,omitempty"` + OsType *OsType `json:"osType,omitempty"` + PatchServiceUsed *PatchServiceUsed `json:"patchServiceUsed,omitempty"` + PendingPatchCount *int64 `json:"pendingPatchCount,omitempty"` + RebootStatus *VMGuestPatchRebootStatus `json:"rebootStatus,omitempty"` + StartDateTime *string `json:"startDateTime,omitempty"` + StartedBy *PatchOperationStartedBy `json:"startedBy,omitempty"` + Status *PatchOperationStatus `json:"status,omitempty"` +} + +func (o *MachineInstallPatchesResult) GetLastModifiedDateTimeAsTime() (*time.Time, error) { + if o.LastModifiedDateTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.LastModifiedDateTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *MachineInstallPatchesResult) SetLastModifiedDateTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.LastModifiedDateTime = &formatted +} + +func (o *MachineInstallPatchesResult) GetStartDateTimeAsTime() (*time.Time, error) { + if o.StartDateTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.StartDateTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *MachineInstallPatchesResult) SetStartDateTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.StartDateTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineproperties.go new file mode 100644 index 0000000000000..7289d0b3c5910 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineproperties.go @@ -0,0 +1,56 @@ +package machines + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MachineProperties struct { + AdFqdn *string `json:"adFqdn,omitempty"` + AgentConfiguration *AgentConfiguration `json:"agentConfiguration,omitempty"` + AgentUpgrade *AgentUpgrade `json:"agentUpgrade,omitempty"` + AgentVersion *string `json:"agentVersion,omitempty"` + ClientPublicKey *string `json:"clientPublicKey,omitempty"` + CloudMetadata *CloudMetadata `json:"cloudMetadata,omitempty"` + DetectedProperties *map[string]string `json:"detectedProperties,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + DnsFqdn *string `json:"dnsFqdn,omitempty"` + DomainName *string `json:"domainName,omitempty"` + ErrorDetails *[]ErrorDetail `json:"errorDetails,omitempty"` + Extensions *[]MachineExtensionInstanceView `json:"extensions,omitempty"` + LastStatusChange *string `json:"lastStatusChange,omitempty"` + LicenseProfile *LicenseProfileMachineInstanceView `json:"licenseProfile,omitempty"` + LocationData *LocationData `json:"locationData,omitempty"` + MachineFqdn *string `json:"machineFqdn,omitempty"` + MssqlDiscovered *string `json:"mssqlDiscovered,omitempty"` + NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` + OsEdition *string `json:"osEdition,omitempty"` + OsName *string `json:"osName,omitempty"` + OsProfile *OSProfile `json:"osProfile,omitempty"` + OsSku *string `json:"osSku,omitempty"` + OsType *string `json:"osType,omitempty"` + OsVersion *string `json:"osVersion,omitempty"` + ParentClusterResourceId *string `json:"parentClusterResourceId,omitempty"` + PrivateLinkScopeResourceId *string `json:"privateLinkScopeResourceId,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + ServiceStatuses *ServiceStatuses `json:"serviceStatuses,omitempty"` + Status *StatusTypes `json:"status,omitempty"` + VMId *string `json:"vmId,omitempty"` + VMUuid *string `json:"vmUuid,omitempty"` +} + +func (o *MachineProperties) GetLastStatusChangeAsTime() (*time.Time, error) { + if o.LastStatusChange == nil { + return nil, nil + } + return dates.ParseAsFormat(o.LastStatusChange, "2006-01-02T15:04:05Z07:00") +} + +func (o *MachineProperties) SetLastStatusChangeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.LastStatusChange = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineupdate.go new file mode 100644 index 0000000000000..52c94efdb46ee --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineupdate.go @@ -0,0 +1,15 @@ +package machines + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MachineUpdate struct { + Identity *identity.SystemAssigned `json:"identity,omitempty"` + Kind *ArcKindEnum `json:"kind,omitempty"` + Properties *MachineUpdateProperties `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineupdateproperties.go new file mode 100644 index 0000000000000..db0a87f6b7343 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_machineupdateproperties.go @@ -0,0 +1,13 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MachineUpdateProperties struct { + AgentUpgrade *AgentUpgrade `json:"agentUpgrade,omitempty"` + CloudMetadata *CloudMetadata `json:"cloudMetadata,omitempty"` + LocationData *LocationData `json:"locationData,omitempty"` + OsProfile *OSProfile `json:"osProfile,omitempty"` + ParentClusterResourceId *string `json:"parentClusterResourceId,omitempty"` + PrivateLinkScopeResourceId *string `json:"privateLinkScopeResourceId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_networkinterface.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_networkinterface.go new file mode 100644 index 0000000000000..e3f8b7ea94a26 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_networkinterface.go @@ -0,0 +1,8 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkInterface struct { + IPAddresses *[]IPAddress `json:"ipAddresses,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_networkprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_networkprofile.go new file mode 100644 index 0000000000000..4f148708f719d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_networkprofile.go @@ -0,0 +1,8 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkProfile struct { + NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_osprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_osprofile.go new file mode 100644 index 0000000000000..997d70b8aec6a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_osprofile.go @@ -0,0 +1,10 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OSProfile struct { + ComputerName *string `json:"computerName,omitempty"` + LinuxConfiguration *OSProfileLinuxConfiguration `json:"linuxConfiguration,omitempty"` + WindowsConfiguration *OSProfileWindowsConfiguration `json:"windowsConfiguration,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_osprofilelinuxconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_osprofilelinuxconfiguration.go new file mode 100644 index 0000000000000..560fd9133db9c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_osprofilelinuxconfiguration.go @@ -0,0 +1,8 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OSProfileLinuxConfiguration struct { + PatchSettings *PatchSettings `json:"patchSettings,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_osprofilewindowsconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_osprofilewindowsconfiguration.go new file mode 100644 index 0000000000000..309f073367a5d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_osprofilewindowsconfiguration.go @@ -0,0 +1,8 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OSProfileWindowsConfiguration struct { + PatchSettings *PatchSettings `json:"patchSettings,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_patchsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_patchsettings.go new file mode 100644 index 0000000000000..f478cb4568cc9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_patchsettings.go @@ -0,0 +1,11 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PatchSettings struct { + AssessmentMode *AssessmentModeTypes `json:"assessmentMode,omitempty"` + EnableHotpatching *bool `json:"enableHotpatching,omitempty"` + PatchMode *PatchModeTypes `json:"patchMode,omitempty"` + Status *PatchSettingsStatus `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_patchsettingsstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_patchsettingsstatus.go new file mode 100644 index 0000000000000..08da481b526a6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_patchsettingsstatus.go @@ -0,0 +1,9 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PatchSettingsStatus struct { + Error *ErrorDetail `json:"error,omitempty"` + HotpatchEnablementStatus *HotpatchEnablementStatus `json:"hotpatchEnablementStatus,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_productfeature.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_productfeature.go new file mode 100644 index 0000000000000..9649881a6c8b6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_productfeature.go @@ -0,0 +1,68 @@ +package machines + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProductFeature struct { + BillingEndDate *string `json:"billingEndDate,omitempty"` + BillingStartDate *string `json:"billingStartDate,omitempty"` + DisenrollmentDate *string `json:"disenrollmentDate,omitempty"` + EnrollmentDate *string `json:"enrollmentDate,omitempty"` + Error *ErrorDetail `json:"error,omitempty"` + Name *string `json:"name,omitempty"` + SubscriptionStatus *LicenseProfileSubscriptionStatus `json:"subscriptionStatus,omitempty"` +} + +func (o *ProductFeature) GetBillingEndDateAsTime() (*time.Time, error) { + if o.BillingEndDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.BillingEndDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *ProductFeature) SetBillingEndDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.BillingEndDate = &formatted +} + +func (o *ProductFeature) GetBillingStartDateAsTime() (*time.Time, error) { + if o.BillingStartDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.BillingStartDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *ProductFeature) SetBillingStartDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.BillingStartDate = &formatted +} + +func (o *ProductFeature) GetDisenrollmentDateAsTime() (*time.Time, error) { + if o.DisenrollmentDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.DisenrollmentDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *ProductFeature) SetDisenrollmentDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.DisenrollmentDate = &formatted +} + +func (o *ProductFeature) GetEnrollmentDateAsTime() (*time.Time, error) { + if o.EnrollmentDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EnrollmentDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *ProductFeature) SetEnrollmentDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EnrollmentDate = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_servicestatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_servicestatus.go new file mode 100644 index 0000000000000..8cde424d92a54 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_servicestatus.go @@ -0,0 +1,9 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServiceStatus struct { + StartupType *string `json:"startupType,omitempty"` + Status *string `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_servicestatuses.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_servicestatuses.go new file mode 100644 index 0000000000000..aff2a8351b065 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_servicestatuses.go @@ -0,0 +1,9 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServiceStatuses struct { + ExtensionService *ServiceStatus `json:"extensionService,omitempty"` + GuestConfigurationService *ServiceStatus `json:"guestConfigurationService,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_subnet.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_subnet.go new file mode 100644 index 0000000000000..2ea3502fb34d4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_subnet.go @@ -0,0 +1,8 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Subnet struct { + AddressPrefix *string `json:"addressPrefix,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_volumelicensedetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_volumelicensedetails.go new file mode 100644 index 0000000000000..fc7ef541a0739 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_volumelicensedetails.go @@ -0,0 +1,9 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VolumeLicenseDetails struct { + InvoiceId *string `json:"invoiceId,omitempty"` + ProgramYear *ProgramYear `json:"programYear,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_windowsparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_windowsparameters.go new file mode 100644 index 0000000000000..9ea4a31f314b3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/model_windowsparameters.go @@ -0,0 +1,30 @@ +package machines + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WindowsParameters struct { + ClassificationsToInclude *[]VMGuestPatchClassificationWindows `json:"classificationsToInclude,omitempty"` + ExcludeKbsRequiringReboot *bool `json:"excludeKbsRequiringReboot,omitempty"` + KbNumbersToExclude *[]string `json:"kbNumbersToExclude,omitempty"` + KbNumbersToInclude *[]string `json:"kbNumbersToInclude,omitempty"` + MaxPatchPublishDate *string `json:"maxPatchPublishDate,omitempty"` +} + +func (o *WindowsParameters) GetMaxPatchPublishDateAsTime() (*time.Time, error) { + if o.MaxPatchPublishDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.MaxPatchPublishDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *WindowsParameters) SetMaxPatchPublishDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.MaxPatchPublishDate = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/predicates.go new file mode 100644 index 0000000000000..0f0fa8b245420 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/predicates.go @@ -0,0 +1,32 @@ +package machines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MachineOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p MachineOperationPredicate) Matches(input Machine) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/version.go new file mode 100644 index 0000000000000..d870c04e962b3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines/version.go @@ -0,0 +1,12 @@ +package machines + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-07-10" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/machines/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/README.md new file mode 100644 index 0000000000000..3d150646e362f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/README.md @@ -0,0 +1,65 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration` Documentation + +The `networksecurityperimeterconfiguration` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-07-10`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration" +``` + + +### Client Initialization + +```go +client := networksecurityperimeterconfiguration.NewNetworkSecurityPerimeterConfigurationClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `NetworkSecurityPerimeterConfigurationClient.GetByPrivateLinkScope` + +```go +ctx := context.TODO() +id := networksecurityperimeterconfiguration.NewNetworkSecurityPerimeterConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkScopeValue", "networkSecurityPerimeterConfigurationValue") + +read, err := client.GetByPrivateLinkScope(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `NetworkSecurityPerimeterConfigurationClient.ListByPrivateLinkScope` + +```go +ctx := context.TODO() +id := networksecurityperimeterconfiguration.NewProviderPrivateLinkScopeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkScopeValue") + +// alternatively `client.ListByPrivateLinkScope(ctx, id)` can be used to do batched pagination +items, err := client.ListByPrivateLinkScopeComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `NetworkSecurityPerimeterConfigurationClient.ReconcileForPrivateLinkScope` + +```go +ctx := context.TODO() +id := networksecurityperimeterconfiguration.NewNetworkSecurityPerimeterConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkScopeValue", "networkSecurityPerimeterConfigurationValue") + +if err := client.ReconcileForPrivateLinkScopeThenPoll(ctx, id); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/client.go new file mode 100644 index 0000000000000..0b7238df35f96 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/client.go @@ -0,0 +1,26 @@ +package networksecurityperimeterconfiguration + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkSecurityPerimeterConfigurationClient struct { + Client *resourcemanager.Client +} + +func NewNetworkSecurityPerimeterConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkSecurityPerimeterConfigurationClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networksecurityperimeterconfiguration", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating NetworkSecurityPerimeterConfigurationClient: %+v", err) + } + + return &NetworkSecurityPerimeterConfigurationClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/constants.go new file mode 100644 index 0000000000000..27644b5afd3d4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/constants.go @@ -0,0 +1,183 @@ +package networksecurityperimeterconfiguration + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AccessMode string + +const ( + AccessModeAudit AccessMode = "audit" + AccessModeEnforced AccessMode = "enforced" + AccessModeLearning AccessMode = "learning" +) + +func PossibleValuesForAccessMode() []string { + return []string{ + string(AccessModeAudit), + string(AccessModeEnforced), + string(AccessModeLearning), + } +} + +func (s *AccessMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAccessMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAccessMode(input string) (*AccessMode, error) { + vals := map[string]AccessMode{ + "audit": AccessModeAudit, + "enforced": AccessModeEnforced, + "learning": AccessModeLearning, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AccessMode(input) + return &out, nil +} + +type AccessRuleDirection string + +const ( + AccessRuleDirectionInbound AccessRuleDirection = "Inbound" + AccessRuleDirectionOutbound AccessRuleDirection = "Outbound" +) + +func PossibleValuesForAccessRuleDirection() []string { + return []string{ + string(AccessRuleDirectionInbound), + string(AccessRuleDirectionOutbound), + } +} + +func (s *AccessRuleDirection) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAccessRuleDirection(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAccessRuleDirection(input string) (*AccessRuleDirection, error) { + vals := map[string]AccessRuleDirection{ + "inbound": AccessRuleDirectionInbound, + "outbound": AccessRuleDirectionOutbound, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AccessRuleDirection(input) + return &out, nil +} + +type ProvisioningIssueSeverity string + +const ( + ProvisioningIssueSeverityError ProvisioningIssueSeverity = "Error" + ProvisioningIssueSeverityWarning ProvisioningIssueSeverity = "Warning" +) + +func PossibleValuesForProvisioningIssueSeverity() []string { + return []string{ + string(ProvisioningIssueSeverityError), + string(ProvisioningIssueSeverityWarning), + } +} + +func (s *ProvisioningIssueSeverity) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningIssueSeverity(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningIssueSeverity(input string) (*ProvisioningIssueSeverity, error) { + vals := map[string]ProvisioningIssueSeverity{ + "error": ProvisioningIssueSeverityError, + "warning": ProvisioningIssueSeverityWarning, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningIssueSeverity(input) + return &out, nil +} + +type ProvisioningIssueType string + +const ( + ProvisioningIssueTypeConfigurationPropagationFailure ProvisioningIssueType = "ConfigurationPropagationFailure" + ProvisioningIssueTypeMissingIdentityConfiguration ProvisioningIssueType = "MissingIdentityConfiguration" + ProvisioningIssueTypeMissingPerimeterConfiguration ProvisioningIssueType = "MissingPerimeterConfiguration" + ProvisioningIssueTypeOther ProvisioningIssueType = "Other" +) + +func PossibleValuesForProvisioningIssueType() []string { + return []string{ + string(ProvisioningIssueTypeConfigurationPropagationFailure), + string(ProvisioningIssueTypeMissingIdentityConfiguration), + string(ProvisioningIssueTypeMissingPerimeterConfiguration), + string(ProvisioningIssueTypeOther), + } +} + +func (s *ProvisioningIssueType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningIssueType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningIssueType(input string) (*ProvisioningIssueType, error) { + vals := map[string]ProvisioningIssueType{ + "configurationpropagationfailure": ProvisioningIssueTypeConfigurationPropagationFailure, + "missingidentityconfiguration": ProvisioningIssueTypeMissingIdentityConfiguration, + "missingperimeterconfiguration": ProvisioningIssueTypeMissingPerimeterConfiguration, + "other": ProvisioningIssueTypeOther, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningIssueType(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/id_networksecurityperimeterconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/id_networksecurityperimeterconfiguration.go new file mode 100644 index 0000000000000..a27de93889a73 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/id_networksecurityperimeterconfiguration.go @@ -0,0 +1,139 @@ +package networksecurityperimeterconfiguration + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&NetworkSecurityPerimeterConfigurationId{}) +} + +var _ resourceids.ResourceId = &NetworkSecurityPerimeterConfigurationId{} + +// NetworkSecurityPerimeterConfigurationId is a struct representing the Resource ID for a Network Security Perimeter Configuration +type NetworkSecurityPerimeterConfigurationId struct { + SubscriptionId string + ResourceGroupName string + PrivateLinkScopeName string + NetworkSecurityPerimeterConfigurationName string +} + +// NewNetworkSecurityPerimeterConfigurationID returns a new NetworkSecurityPerimeterConfigurationId struct +func NewNetworkSecurityPerimeterConfigurationID(subscriptionId string, resourceGroupName string, privateLinkScopeName string, networkSecurityPerimeterConfigurationName string) NetworkSecurityPerimeterConfigurationId { + return NetworkSecurityPerimeterConfigurationId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + PrivateLinkScopeName: privateLinkScopeName, + NetworkSecurityPerimeterConfigurationName: networkSecurityPerimeterConfigurationName, + } +} + +// ParseNetworkSecurityPerimeterConfigurationID parses 'input' into a NetworkSecurityPerimeterConfigurationId +func ParseNetworkSecurityPerimeterConfigurationID(input string) (*NetworkSecurityPerimeterConfigurationId, error) { + parser := resourceids.NewParserFromResourceIdType(&NetworkSecurityPerimeterConfigurationId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := NetworkSecurityPerimeterConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseNetworkSecurityPerimeterConfigurationIDInsensitively parses 'input' case-insensitively into a NetworkSecurityPerimeterConfigurationId +// note: this method should only be used for API response data and not user input +func ParseNetworkSecurityPerimeterConfigurationIDInsensitively(input string) (*NetworkSecurityPerimeterConfigurationId, error) { + parser := resourceids.NewParserFromResourceIdType(&NetworkSecurityPerimeterConfigurationId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := NetworkSecurityPerimeterConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *NetworkSecurityPerimeterConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.PrivateLinkScopeName, ok = input.Parsed["privateLinkScopeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", input) + } + + if id.NetworkSecurityPerimeterConfigurationName, ok = input.Parsed["networkSecurityPerimeterConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityPerimeterConfigurationName", input) + } + + return nil +} + +// ValidateNetworkSecurityPerimeterConfigurationID checks that 'input' can be parsed as a Network Security Perimeter Configuration ID +func ValidateNetworkSecurityPerimeterConfigurationID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseNetworkSecurityPerimeterConfigurationID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Network Security Perimeter Configuration ID +func (id NetworkSecurityPerimeterConfigurationId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.HybridCompute/privateLinkScopes/%s/networkSecurityPerimeterConfigurations/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PrivateLinkScopeName, id.NetworkSecurityPerimeterConfigurationName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Network Security Perimeter Configuration ID +func (id NetworkSecurityPerimeterConfigurationId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftHybridCompute", "Microsoft.HybridCompute", "Microsoft.HybridCompute"), + resourceids.StaticSegment("staticPrivateLinkScopes", "privateLinkScopes", "privateLinkScopes"), + resourceids.UserSpecifiedSegment("privateLinkScopeName", "privateLinkScopeValue"), + resourceids.StaticSegment("staticNetworkSecurityPerimeterConfigurations", "networkSecurityPerimeterConfigurations", "networkSecurityPerimeterConfigurations"), + resourceids.UserSpecifiedSegment("networkSecurityPerimeterConfigurationName", "networkSecurityPerimeterConfigurationValue"), + } +} + +// String returns a human-readable description of this Network Security Perimeter Configuration ID +func (id NetworkSecurityPerimeterConfigurationId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Private Link Scope Name: %q", id.PrivateLinkScopeName), + fmt.Sprintf("Network Security Perimeter Configuration Name: %q", id.NetworkSecurityPerimeterConfigurationName), + } + return fmt.Sprintf("Network Security Perimeter Configuration (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/id_providerprivatelinkscope.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/id_providerprivatelinkscope.go new file mode 100644 index 0000000000000..4905047e58f41 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/id_providerprivatelinkscope.go @@ -0,0 +1,130 @@ +package networksecurityperimeterconfiguration + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&ProviderPrivateLinkScopeId{}) +} + +var _ resourceids.ResourceId = &ProviderPrivateLinkScopeId{} + +// ProviderPrivateLinkScopeId is a struct representing the Resource ID for a Provider Private Link Scope +type ProviderPrivateLinkScopeId struct { + SubscriptionId string + ResourceGroupName string + PrivateLinkScopeName string +} + +// NewProviderPrivateLinkScopeID returns a new ProviderPrivateLinkScopeId struct +func NewProviderPrivateLinkScopeID(subscriptionId string, resourceGroupName string, privateLinkScopeName string) ProviderPrivateLinkScopeId { + return ProviderPrivateLinkScopeId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + PrivateLinkScopeName: privateLinkScopeName, + } +} + +// ParseProviderPrivateLinkScopeID parses 'input' into a ProviderPrivateLinkScopeId +func ParseProviderPrivateLinkScopeID(input string) (*ProviderPrivateLinkScopeId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProviderPrivateLinkScopeId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProviderPrivateLinkScopeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseProviderPrivateLinkScopeIDInsensitively parses 'input' case-insensitively into a ProviderPrivateLinkScopeId +// note: this method should only be used for API response data and not user input +func ParseProviderPrivateLinkScopeIDInsensitively(input string) (*ProviderPrivateLinkScopeId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProviderPrivateLinkScopeId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProviderPrivateLinkScopeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProviderPrivateLinkScopeId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.PrivateLinkScopeName, ok = input.Parsed["privateLinkScopeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", input) + } + + return nil +} + +// ValidateProviderPrivateLinkScopeID checks that 'input' can be parsed as a Provider Private Link Scope ID +func ValidateProviderPrivateLinkScopeID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseProviderPrivateLinkScopeID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Provider Private Link Scope ID +func (id ProviderPrivateLinkScopeId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.HybridCompute/privateLinkScopes/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PrivateLinkScopeName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Provider Private Link Scope ID +func (id ProviderPrivateLinkScopeId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftHybridCompute", "Microsoft.HybridCompute", "Microsoft.HybridCompute"), + resourceids.StaticSegment("staticPrivateLinkScopes", "privateLinkScopes", "privateLinkScopes"), + resourceids.UserSpecifiedSegment("privateLinkScopeName", "privateLinkScopeValue"), + } +} + +// String returns a human-readable description of this Provider Private Link Scope ID +func (id ProviderPrivateLinkScopeId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Private Link Scope Name: %q", id.PrivateLinkScopeName), + } + return fmt.Sprintf("Provider Private Link Scope (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/method_getbyprivatelinkscope.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/method_getbyprivatelinkscope.go new file mode 100644 index 0000000000000..7b6e6567476de --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/method_getbyprivatelinkscope.go @@ -0,0 +1,54 @@ +package networksecurityperimeterconfiguration + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetByPrivateLinkScopeOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *NetworkSecurityPerimeterConfiguration +} + +// GetByPrivateLinkScope ... +func (c NetworkSecurityPerimeterConfigurationClient) GetByPrivateLinkScope(ctx context.Context, id NetworkSecurityPerimeterConfigurationId) (result GetByPrivateLinkScopeOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model NetworkSecurityPerimeterConfiguration + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/method_listbyprivatelinkscope.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/method_listbyprivatelinkscope.go new file mode 100644 index 0000000000000..8db33c08dcd4b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/method_listbyprivatelinkscope.go @@ -0,0 +1,105 @@ +package networksecurityperimeterconfiguration + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByPrivateLinkScopeOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]NetworkSecurityPerimeterConfiguration +} + +type ListByPrivateLinkScopeCompleteResult struct { + LatestHttpResponse *http.Response + Items []NetworkSecurityPerimeterConfiguration +} + +type ListByPrivateLinkScopeCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByPrivateLinkScopeCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByPrivateLinkScope ... +func (c NetworkSecurityPerimeterConfigurationClient) ListByPrivateLinkScope(ctx context.Context, id ProviderPrivateLinkScopeId) (result ListByPrivateLinkScopeOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByPrivateLinkScopeCustomPager{}, + Path: fmt.Sprintf("%s/networkSecurityPerimeterConfigurations", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]NetworkSecurityPerimeterConfiguration `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByPrivateLinkScopeComplete retrieves all the results into a single object +func (c NetworkSecurityPerimeterConfigurationClient) ListByPrivateLinkScopeComplete(ctx context.Context, id ProviderPrivateLinkScopeId) (ListByPrivateLinkScopeCompleteResult, error) { + return c.ListByPrivateLinkScopeCompleteMatchingPredicate(ctx, id, NetworkSecurityPerimeterConfigurationOperationPredicate{}) +} + +// ListByPrivateLinkScopeCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c NetworkSecurityPerimeterConfigurationClient) ListByPrivateLinkScopeCompleteMatchingPredicate(ctx context.Context, id ProviderPrivateLinkScopeId, predicate NetworkSecurityPerimeterConfigurationOperationPredicate) (result ListByPrivateLinkScopeCompleteResult, err error) { + items := make([]NetworkSecurityPerimeterConfiguration, 0) + + resp, err := c.ListByPrivateLinkScope(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByPrivateLinkScopeCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/method_reconcileforprivatelinkscope.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/method_reconcileforprivatelinkscope.go new file mode 100644 index 0000000000000..6d57bf1dc5a63 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/method_reconcileforprivatelinkscope.go @@ -0,0 +1,71 @@ +package networksecurityperimeterconfiguration + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ReconcileForPrivateLinkScopeOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *NetworkSecurityPerimeterConfigurationReconcileResult +} + +// ReconcileForPrivateLinkScope ... +func (c NetworkSecurityPerimeterConfigurationClient) ReconcileForPrivateLinkScope(ctx context.Context, id NetworkSecurityPerimeterConfigurationId) (result ReconcileForPrivateLinkScopeOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/reconcile", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// ReconcileForPrivateLinkScopeThenPoll performs ReconcileForPrivateLinkScope then polls until it's completed +func (c NetworkSecurityPerimeterConfigurationClient) ReconcileForPrivateLinkScopeThenPoll(ctx context.Context, id NetworkSecurityPerimeterConfigurationId) error { + result, err := c.ReconcileForPrivateLinkScope(ctx, id) + if err != nil { + return fmt.Errorf("performing ReconcileForPrivateLinkScope: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after ReconcileForPrivateLinkScope: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_accessrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_accessrule.go new file mode 100644 index 0000000000000..4c74aaef83366 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_accessrule.go @@ -0,0 +1,9 @@ +package networksecurityperimeterconfiguration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AccessRule struct { + Name *string `json:"name,omitempty"` + Properties *AccessRuleProperties `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_accessruleproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_accessruleproperties.go new file mode 100644 index 0000000000000..11e1c58bc9c62 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_accessruleproperties.go @@ -0,0 +1,9 @@ +package networksecurityperimeterconfiguration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AccessRuleProperties struct { + AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` + Direction *AccessRuleDirection `json:"direction,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_networksecurityperimeter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_networksecurityperimeter.go new file mode 100644 index 0000000000000..bcd83d98c35cf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_networksecurityperimeter.go @@ -0,0 +1,10 @@ +package networksecurityperimeterconfiguration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkSecurityPerimeter struct { + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + PerimeterGuid *string `json:"perimeterGuid,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_networksecurityperimeterconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_networksecurityperimeterconfiguration.go new file mode 100644 index 0000000000000..05100bc8f9ce1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_networksecurityperimeterconfiguration.go @@ -0,0 +1,11 @@ +package networksecurityperimeterconfiguration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkSecurityPerimeterConfiguration struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *NetworkSecurityPerimeterConfigurationProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_networksecurityperimeterconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_networksecurityperimeterconfigurationproperties.go new file mode 100644 index 0000000000000..838e3eaf619b7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_networksecurityperimeterconfigurationproperties.go @@ -0,0 +1,12 @@ +package networksecurityperimeterconfiguration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkSecurityPerimeterConfigurationProperties struct { + NetworkSecurityPerimeter *NetworkSecurityPerimeter `json:"networkSecurityPerimeter,omitempty"` + Profile *NetworkSecurityPerimeterProfile `json:"profile,omitempty"` + ProvisioningIssues *[]ProvisioningIssue `json:"provisioningIssues,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + ResourceAssociation *ResourceAssociation `json:"resourceAssociation,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_networksecurityperimeterconfigurationreconcileresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_networksecurityperimeterconfigurationreconcileresult.go new file mode 100644 index 0000000000000..46acceae0743f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_networksecurityperimeterconfigurationreconcileresult.go @@ -0,0 +1,8 @@ +package networksecurityperimeterconfiguration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkSecurityPerimeterConfigurationReconcileResult struct { + Location *string `json:"location,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_networksecurityperimeterprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_networksecurityperimeterprofile.go new file mode 100644 index 0000000000000..2061ccf6fff99 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_networksecurityperimeterprofile.go @@ -0,0 +1,12 @@ +package networksecurityperimeterconfiguration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkSecurityPerimeterProfile struct { + AccessRules *[]AccessRule `json:"accessRules,omitempty"` + AccessRulesVersion *int64 `json:"accessRulesVersion,omitempty"` + DiagnosticSettingsVersion *int64 `json:"diagnosticSettingsVersion,omitempty"` + EnabledLogCategories *[]string `json:"enabledLogCategories,omitempty"` + Name *string `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_provisioningissue.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_provisioningissue.go new file mode 100644 index 0000000000000..146309f090430 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_provisioningissue.go @@ -0,0 +1,9 @@ +package networksecurityperimeterconfiguration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProvisioningIssue struct { + Name *string `json:"name,omitempty"` + Properties *ProvisioningIssueProperties `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_provisioningissueproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_provisioningissueproperties.go new file mode 100644 index 0000000000000..c297d302bf981 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_provisioningissueproperties.go @@ -0,0 +1,12 @@ +package networksecurityperimeterconfiguration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProvisioningIssueProperties struct { + Description *string `json:"description,omitempty"` + IssueType *ProvisioningIssueType `json:"issueType,omitempty"` + Severity *ProvisioningIssueSeverity `json:"severity,omitempty"` + SuggestedAccessRules *[]AccessRule `json:"suggestedAccessRules,omitempty"` + SuggestedResourceIds *[]string `json:"suggestedResourceIds,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_resourceassociation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_resourceassociation.go new file mode 100644 index 0000000000000..15547885ecaa4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/model_resourceassociation.go @@ -0,0 +1,9 @@ +package networksecurityperimeterconfiguration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceAssociation struct { + AccessMode *AccessMode `json:"accessMode,omitempty"` + Name *string `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/predicates.go new file mode 100644 index 0000000000000..37fd5b6857943 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/predicates.go @@ -0,0 +1,27 @@ +package networksecurityperimeterconfiguration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkSecurityPerimeterConfigurationOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p NetworkSecurityPerimeterConfigurationOperationPredicate) Matches(input NetworkSecurityPerimeterConfiguration) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/version.go new file mode 100644 index 0000000000000..33af4a462d0e7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/version.go @@ -0,0 +1,12 @@ +package networksecurityperimeterconfiguration + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-07-10" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/networksecurityperimeterconfiguration/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/README.md new file mode 100644 index 0000000000000..53eba9e9a9549 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/README.md @@ -0,0 +1,82 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections` Documentation + +The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-07-10`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections" +``` + + +### Client Initialization + +```go +client := privateendpointconnections.NewPrivateEndpointConnectionsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `PrivateEndpointConnectionsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := privateendpointconnections.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkScopeValue", "privateEndpointConnectionValue") + +payload := privateendpointconnections.PrivateEndpointConnection{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `PrivateEndpointConnectionsClient.Delete` + +```go +ctx := context.TODO() +id := privateendpointconnections.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkScopeValue", "privateEndpointConnectionValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `PrivateEndpointConnectionsClient.Get` + +```go +ctx := context.TODO() +id := privateendpointconnections.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkScopeValue", "privateEndpointConnectionValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `PrivateEndpointConnectionsClient.ListByPrivateLinkScope` + +```go +ctx := context.TODO() +id := privateendpointconnections.NewProviderPrivateLinkScopeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkScopeValue") + +// alternatively `client.ListByPrivateLinkScope(ctx, id)` can be used to do batched pagination +items, err := client.ListByPrivateLinkScopeComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/client.go new file mode 100644 index 0000000000000..3bf7a6afe1ff9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/client.go @@ -0,0 +1,26 @@ +package privateendpointconnections + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnectionsClient struct { + Client *resourcemanager.Client +} + +func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) + } + + return &PrivateEndpointConnectionsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/id_privateendpointconnection.go similarity index 84% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_privateendpointconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/id_privateendpointconnection.go index a70790c378b36..ac2417fe8c83a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_privateendpointconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/id_privateendpointconnection.go @@ -1,4 +1,4 @@ -package accounts +package privateendpointconnections import ( "fmt" @@ -21,16 +21,16 @@ var _ resourceids.ResourceId = &PrivateEndpointConnectionId{} type PrivateEndpointConnectionId struct { SubscriptionId string ResourceGroupName string - MediaServiceName string + PrivateLinkScopeName string PrivateEndpointConnectionName string } // NewPrivateEndpointConnectionID returns a new PrivateEndpointConnectionId struct -func NewPrivateEndpointConnectionID(subscriptionId string, resourceGroupName string, mediaServiceName string, privateEndpointConnectionName string) PrivateEndpointConnectionId { +func NewPrivateEndpointConnectionID(subscriptionId string, resourceGroupName string, privateLinkScopeName string, privateEndpointConnectionName string) PrivateEndpointConnectionId { return PrivateEndpointConnectionId{ SubscriptionId: subscriptionId, ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, + PrivateLinkScopeName: privateLinkScopeName, PrivateEndpointConnectionName: privateEndpointConnectionName, } } @@ -79,8 +79,8 @@ func (id *PrivateEndpointConnectionId) FromParseResult(input resourceids.ParseRe return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) + if id.PrivateLinkScopeName, ok = input.Parsed["privateLinkScopeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", input) } if id.PrivateEndpointConnectionName, ok = input.Parsed["privateEndpointConnectionName"]; !ok { @@ -107,8 +107,8 @@ func ValidatePrivateEndpointConnectionID(input interface{}, key string) (warning // ID returns the formatted Private Endpoint Connection ID func (id PrivateEndpointConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/privateEndpointConnections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.PrivateEndpointConnectionName) + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.HybridCompute/privateLinkScopes/%s/privateEndpointConnections/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PrivateLinkScopeName, id.PrivateEndpointConnectionName) } // Segments returns a slice of Resource ID Segments which comprise this Private Endpoint Connection ID @@ -119,9 +119,9 @@ func (id PrivateEndpointConnectionId) Segments() []resourceids.Segment { resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), + resourceids.ResourceProviderSegment("staticMicrosoftHybridCompute", "Microsoft.HybridCompute", "Microsoft.HybridCompute"), + resourceids.StaticSegment("staticPrivateLinkScopes", "privateLinkScopes", "privateLinkScopes"), + resourceids.UserSpecifiedSegment("privateLinkScopeName", "privateLinkScopeValue"), resourceids.StaticSegment("staticPrivateEndpointConnections", "privateEndpointConnections", "privateEndpointConnections"), resourceids.UserSpecifiedSegment("privateEndpointConnectionName", "privateEndpointConnectionValue"), } @@ -132,7 +132,7 @@ func (id PrivateEndpointConnectionId) String() string { components := []string{ fmt.Sprintf("Subscription: %q", id.SubscriptionId), fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), + fmt.Sprintf("Private Link Scope Name: %q", id.PrivateLinkScopeName), fmt.Sprintf("Private Endpoint Connection Name: %q", id.PrivateEndpointConnectionName), } return fmt.Sprintf("Private Endpoint Connection (%s)", strings.Join(components, "\n")) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/id_providerprivatelinkscope.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/id_providerprivatelinkscope.go new file mode 100644 index 0000000000000..7bd8a7c1186e5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/id_providerprivatelinkscope.go @@ -0,0 +1,130 @@ +package privateendpointconnections + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&ProviderPrivateLinkScopeId{}) +} + +var _ resourceids.ResourceId = &ProviderPrivateLinkScopeId{} + +// ProviderPrivateLinkScopeId is a struct representing the Resource ID for a Provider Private Link Scope +type ProviderPrivateLinkScopeId struct { + SubscriptionId string + ResourceGroupName string + PrivateLinkScopeName string +} + +// NewProviderPrivateLinkScopeID returns a new ProviderPrivateLinkScopeId struct +func NewProviderPrivateLinkScopeID(subscriptionId string, resourceGroupName string, privateLinkScopeName string) ProviderPrivateLinkScopeId { + return ProviderPrivateLinkScopeId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + PrivateLinkScopeName: privateLinkScopeName, + } +} + +// ParseProviderPrivateLinkScopeID parses 'input' into a ProviderPrivateLinkScopeId +func ParseProviderPrivateLinkScopeID(input string) (*ProviderPrivateLinkScopeId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProviderPrivateLinkScopeId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProviderPrivateLinkScopeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseProviderPrivateLinkScopeIDInsensitively parses 'input' case-insensitively into a ProviderPrivateLinkScopeId +// note: this method should only be used for API response data and not user input +func ParseProviderPrivateLinkScopeIDInsensitively(input string) (*ProviderPrivateLinkScopeId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProviderPrivateLinkScopeId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProviderPrivateLinkScopeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProviderPrivateLinkScopeId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.PrivateLinkScopeName, ok = input.Parsed["privateLinkScopeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", input) + } + + return nil +} + +// ValidateProviderPrivateLinkScopeID checks that 'input' can be parsed as a Provider Private Link Scope ID +func ValidateProviderPrivateLinkScopeID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseProviderPrivateLinkScopeID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Provider Private Link Scope ID +func (id ProviderPrivateLinkScopeId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.HybridCompute/privateLinkScopes/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PrivateLinkScopeName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Provider Private Link Scope ID +func (id ProviderPrivateLinkScopeId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftHybridCompute", "Microsoft.HybridCompute", "Microsoft.HybridCompute"), + resourceids.StaticSegment("staticPrivateLinkScopes", "privateLinkScopes", "privateLinkScopes"), + resourceids.UserSpecifiedSegment("privateLinkScopeName", "privateLinkScopeValue"), + } +} + +// String returns a human-readable description of this Provider Private Link Scope ID +func (id ProviderPrivateLinkScopeId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Private Link Scope Name: %q", id.PrivateLinkScopeName), + } + return fmt.Sprintf("Provider Private Link Scope (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/method_createorupdate.go new file mode 100644 index 0000000000000..943007e464177 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/method_createorupdate.go @@ -0,0 +1,75 @@ +package privateendpointconnections + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *PrivateEndpointConnection +} + +// CreateOrUpdate ... +func (c PrivateEndpointConnectionsClient) CreateOrUpdate(ctx context.Context, id PrivateEndpointConnectionId, input PrivateEndpointConnection) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c PrivateEndpointConnectionsClient) CreateOrUpdateThenPoll(ctx context.Context, id PrivateEndpointConnectionId, input PrivateEndpointConnection) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/method_delete.go new file mode 100644 index 0000000000000..63c26e8f27f8e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/method_delete.go @@ -0,0 +1,71 @@ +package privateendpointconnections + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c PrivateEndpointConnectionsClient) Delete(ctx context.Context, id PrivateEndpointConnectionId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c PrivateEndpointConnectionsClient) DeleteThenPoll(ctx context.Context, id PrivateEndpointConnectionId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/method_get.go new file mode 100644 index 0000000000000..8dc28d7ff7af4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/method_get.go @@ -0,0 +1,54 @@ +package privateendpointconnections + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *PrivateEndpointConnection +} + +// Get ... +func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEndpointConnectionId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model PrivateEndpointConnection + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/method_listbyprivatelinkscope.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/method_listbyprivatelinkscope.go new file mode 100644 index 0000000000000..6f549ecb04d25 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/method_listbyprivatelinkscope.go @@ -0,0 +1,105 @@ +package privateendpointconnections + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByPrivateLinkScopeOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]PrivateEndpointConnection +} + +type ListByPrivateLinkScopeCompleteResult struct { + LatestHttpResponse *http.Response + Items []PrivateEndpointConnection +} + +type ListByPrivateLinkScopeCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByPrivateLinkScopeCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByPrivateLinkScope ... +func (c PrivateEndpointConnectionsClient) ListByPrivateLinkScope(ctx context.Context, id ProviderPrivateLinkScopeId) (result ListByPrivateLinkScopeOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByPrivateLinkScopeCustomPager{}, + Path: fmt.Sprintf("%s/privateEndpointConnections", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]PrivateEndpointConnection `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByPrivateLinkScopeComplete retrieves all the results into a single object +func (c PrivateEndpointConnectionsClient) ListByPrivateLinkScopeComplete(ctx context.Context, id ProviderPrivateLinkScopeId) (ListByPrivateLinkScopeCompleteResult, error) { + return c.ListByPrivateLinkScopeCompleteMatchingPredicate(ctx, id, PrivateEndpointConnectionOperationPredicate{}) +} + +// ListByPrivateLinkScopeCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c PrivateEndpointConnectionsClient) ListByPrivateLinkScopeCompleteMatchingPredicate(ctx context.Context, id ProviderPrivateLinkScopeId, predicate PrivateEndpointConnectionOperationPredicate) (result ListByPrivateLinkScopeCompleteResult, err error) { + items := make([]PrivateEndpointConnection, 0) + + resp, err := c.ListByPrivateLinkScope(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByPrivateLinkScopeCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/model_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/model_privateendpointconnection.go new file mode 100644 index 0000000000000..977fe056fe338 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/model_privateendpointconnection.go @@ -0,0 +1,16 @@ +package privateendpointconnections + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnection struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/model_privateendpointconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/model_privateendpointconnectionproperties.go new file mode 100644 index 0000000000000..948cf6c47dcc1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/model_privateendpointconnectionproperties.go @@ -0,0 +1,11 @@ +package privateendpointconnections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnectionProperties struct { + GroupIds *[]string `json:"groupIds,omitempty"` + PrivateEndpoint *PrivateEndpointProperty `json:"privateEndpoint,omitempty"` + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionStateProperty `json:"privateLinkServiceConnectionState,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/model_privateendpointproperty.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/model_privateendpointproperty.go new file mode 100644 index 0000000000000..b0b0ff1848297 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/model_privateendpointproperty.go @@ -0,0 +1,8 @@ +package privateendpointconnections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointProperty struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/model_privatelinkserviceconnectionstateproperty.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/model_privatelinkserviceconnectionstateproperty.go new file mode 100644 index 0000000000000..ba250769d7a56 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/model_privatelinkserviceconnectionstateproperty.go @@ -0,0 +1,10 @@ +package privateendpointconnections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkServiceConnectionStateProperty struct { + ActionsRequired *string `json:"actionsRequired,omitempty"` + Description string `json:"description"` + Status string `json:"status"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/predicates.go new file mode 100644 index 0000000000000..4a03a91ce52c4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/predicates.go @@ -0,0 +1,27 @@ +package privateendpointconnections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnectionOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p PrivateEndpointConnectionOperationPredicate) Matches(input PrivateEndpointConnection) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/version.go new file mode 100644 index 0000000000000..a0b7dbb763e44 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/version.go @@ -0,0 +1,12 @@ +package privateendpointconnections + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-07-10" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/README.md new file mode 100644 index 0000000000000..5d5d386e310b0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/README.md @@ -0,0 +1,53 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources` Documentation + +The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-07-10`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources" +``` + + +### Client Initialization + +```go +client := privatelinkresources.NewPrivateLinkResourcesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `PrivateLinkResourcesClient.Get` + +```go +ctx := context.TODO() +id := privatelinkresources.NewPrivateLinkResourceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkScopeValue", "privateLinkResourceValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `PrivateLinkResourcesClient.ListByPrivateLinkScope` + +```go +ctx := context.TODO() +id := privatelinkresources.NewProviderPrivateLinkScopeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkScopeValue") + +// alternatively `client.ListByPrivateLinkScope(ctx, id)` can be used to do batched pagination +items, err := client.ListByPrivateLinkScopeComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/client.go new file mode 100644 index 0000000000000..e6e22caa7468e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/client.go @@ -0,0 +1,26 @@ +package privatelinkresources + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkResourcesClient struct { + Client *resourcemanager.Client +} + +func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) + } + + return &PrivateLinkResourcesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/id_privatelinkresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/id_privatelinkresource.go new file mode 100644 index 0000000000000..4f61df268c865 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/id_privatelinkresource.go @@ -0,0 +1,139 @@ +package privatelinkresources + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&PrivateLinkResourceId{}) +} + +var _ resourceids.ResourceId = &PrivateLinkResourceId{} + +// PrivateLinkResourceId is a struct representing the Resource ID for a Private Link Resource +type PrivateLinkResourceId struct { + SubscriptionId string + ResourceGroupName string + PrivateLinkScopeName string + PrivateLinkResourceName string +} + +// NewPrivateLinkResourceID returns a new PrivateLinkResourceId struct +func NewPrivateLinkResourceID(subscriptionId string, resourceGroupName string, privateLinkScopeName string, privateLinkResourceName string) PrivateLinkResourceId { + return PrivateLinkResourceId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + PrivateLinkScopeName: privateLinkScopeName, + PrivateLinkResourceName: privateLinkResourceName, + } +} + +// ParsePrivateLinkResourceID parses 'input' into a PrivateLinkResourceId +func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { + parser := resourceids.NewParserFromResourceIdType(&PrivateLinkResourceId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := PrivateLinkResourceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParsePrivateLinkResourceIDInsensitively parses 'input' case-insensitively into a PrivateLinkResourceId +// note: this method should only be used for API response data and not user input +func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResourceId, error) { + parser := resourceids.NewParserFromResourceIdType(&PrivateLinkResourceId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := PrivateLinkResourceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrivateLinkResourceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.PrivateLinkScopeName, ok = input.Parsed["privateLinkScopeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", input) + } + + if id.PrivateLinkResourceName, ok = input.Parsed["privateLinkResourceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateLinkResourceName", input) + } + + return nil +} + +// ValidatePrivateLinkResourceID checks that 'input' can be parsed as a Private Link Resource ID +func ValidatePrivateLinkResourceID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParsePrivateLinkResourceID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Private Link Resource ID +func (id PrivateLinkResourceId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.HybridCompute/privateLinkScopes/%s/privateLinkResources/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PrivateLinkScopeName, id.PrivateLinkResourceName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Private Link Resource ID +func (id PrivateLinkResourceId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftHybridCompute", "Microsoft.HybridCompute", "Microsoft.HybridCompute"), + resourceids.StaticSegment("staticPrivateLinkScopes", "privateLinkScopes", "privateLinkScopes"), + resourceids.UserSpecifiedSegment("privateLinkScopeName", "privateLinkScopeValue"), + resourceids.StaticSegment("staticPrivateLinkResources", "privateLinkResources", "privateLinkResources"), + resourceids.UserSpecifiedSegment("privateLinkResourceName", "privateLinkResourceValue"), + } +} + +// String returns a human-readable description of this Private Link Resource ID +func (id PrivateLinkResourceId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Private Link Scope Name: %q", id.PrivateLinkScopeName), + fmt.Sprintf("Private Link Resource Name: %q", id.PrivateLinkResourceName), + } + return fmt.Sprintf("Private Link Resource (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/id_providerprivatelinkscope.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/id_providerprivatelinkscope.go new file mode 100644 index 0000000000000..37d15fd44e576 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/id_providerprivatelinkscope.go @@ -0,0 +1,130 @@ +package privatelinkresources + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&ProviderPrivateLinkScopeId{}) +} + +var _ resourceids.ResourceId = &ProviderPrivateLinkScopeId{} + +// ProviderPrivateLinkScopeId is a struct representing the Resource ID for a Provider Private Link Scope +type ProviderPrivateLinkScopeId struct { + SubscriptionId string + ResourceGroupName string + PrivateLinkScopeName string +} + +// NewProviderPrivateLinkScopeID returns a new ProviderPrivateLinkScopeId struct +func NewProviderPrivateLinkScopeID(subscriptionId string, resourceGroupName string, privateLinkScopeName string) ProviderPrivateLinkScopeId { + return ProviderPrivateLinkScopeId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + PrivateLinkScopeName: privateLinkScopeName, + } +} + +// ParseProviderPrivateLinkScopeID parses 'input' into a ProviderPrivateLinkScopeId +func ParseProviderPrivateLinkScopeID(input string) (*ProviderPrivateLinkScopeId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProviderPrivateLinkScopeId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProviderPrivateLinkScopeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseProviderPrivateLinkScopeIDInsensitively parses 'input' case-insensitively into a ProviderPrivateLinkScopeId +// note: this method should only be used for API response data and not user input +func ParseProviderPrivateLinkScopeIDInsensitively(input string) (*ProviderPrivateLinkScopeId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProviderPrivateLinkScopeId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProviderPrivateLinkScopeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProviderPrivateLinkScopeId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.PrivateLinkScopeName, ok = input.Parsed["privateLinkScopeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", input) + } + + return nil +} + +// ValidateProviderPrivateLinkScopeID checks that 'input' can be parsed as a Provider Private Link Scope ID +func ValidateProviderPrivateLinkScopeID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseProviderPrivateLinkScopeID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Provider Private Link Scope ID +func (id ProviderPrivateLinkScopeId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.HybridCompute/privateLinkScopes/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PrivateLinkScopeName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Provider Private Link Scope ID +func (id ProviderPrivateLinkScopeId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftHybridCompute", "Microsoft.HybridCompute", "Microsoft.HybridCompute"), + resourceids.StaticSegment("staticPrivateLinkScopes", "privateLinkScopes", "privateLinkScopes"), + resourceids.UserSpecifiedSegment("privateLinkScopeName", "privateLinkScopeValue"), + } +} + +// String returns a human-readable description of this Provider Private Link Scope ID +func (id ProviderPrivateLinkScopeId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Private Link Scope Name: %q", id.PrivateLinkScopeName), + } + return fmt.Sprintf("Provider Private Link Scope (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/method_get.go new file mode 100644 index 0000000000000..f265d7c640abf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/method_get.go @@ -0,0 +1,54 @@ +package privatelinkresources + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *PrivateLinkResource +} + +// Get ... +func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResourceId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model PrivateLinkResource + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/method_listbyprivatelinkscope.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/method_listbyprivatelinkscope.go new file mode 100644 index 0000000000000..3d0cadde9f7d1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/method_listbyprivatelinkscope.go @@ -0,0 +1,105 @@ +package privatelinkresources + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByPrivateLinkScopeOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]PrivateLinkResource +} + +type ListByPrivateLinkScopeCompleteResult struct { + LatestHttpResponse *http.Response + Items []PrivateLinkResource +} + +type ListByPrivateLinkScopeCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByPrivateLinkScopeCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByPrivateLinkScope ... +func (c PrivateLinkResourcesClient) ListByPrivateLinkScope(ctx context.Context, id ProviderPrivateLinkScopeId) (result ListByPrivateLinkScopeOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByPrivateLinkScopeCustomPager{}, + Path: fmt.Sprintf("%s/privateLinkResources", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]PrivateLinkResource `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByPrivateLinkScopeComplete retrieves all the results into a single object +func (c PrivateLinkResourcesClient) ListByPrivateLinkScopeComplete(ctx context.Context, id ProviderPrivateLinkScopeId) (ListByPrivateLinkScopeCompleteResult, error) { + return c.ListByPrivateLinkScopeCompleteMatchingPredicate(ctx, id, PrivateLinkResourceOperationPredicate{}) +} + +// ListByPrivateLinkScopeCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c PrivateLinkResourcesClient) ListByPrivateLinkScopeCompleteMatchingPredicate(ctx context.Context, id ProviderPrivateLinkScopeId, predicate PrivateLinkResourceOperationPredicate) (result ListByPrivateLinkScopeCompleteResult, err error) { + items := make([]PrivateLinkResource, 0) + + resp, err := c.ListByPrivateLinkScope(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByPrivateLinkScopeCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/model_privatelinkresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/model_privatelinkresource.go new file mode 100644 index 0000000000000..6e8c3d8148b8d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/model_privatelinkresource.go @@ -0,0 +1,16 @@ +package privatelinkresources + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkResource struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *PrivateLinkResourceProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_privatelinkresourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/model_privatelinkresourceproperties.go similarity index 93% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_privatelinkresourceproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/model_privatelinkresourceproperties.go index fb7c9a24b991d..3c98012cdd1ee 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_privatelinkresourceproperties.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/model_privatelinkresourceproperties.go @@ -1,4 +1,4 @@ -package accounts +package privatelinkresources // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/predicates.go new file mode 100644 index 0000000000000..19b771c39945c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/predicates.go @@ -0,0 +1,27 @@ +package privatelinkresources + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkResourceOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p PrivateLinkResourceOperationPredicate) Matches(input PrivateLinkResource) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/version.go new file mode 100644 index 0000000000000..9957fb21f4916 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources/version.go @@ -0,0 +1,12 @@ +package privatelinkresources + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-07-10" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/README.md new file mode 100644 index 0000000000000..22a96cc6d5bc7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/README.md @@ -0,0 +1,157 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes` Documentation + +The `privatelinkscopes` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-07-10`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes" +``` + + +### Client Initialization + +```go +client := privatelinkscopes.NewPrivateLinkScopesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `PrivateLinkScopesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := privatelinkscopes.NewProviderPrivateLinkScopeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkScopeValue") + +payload := privatelinkscopes.HybridComputePrivateLinkScope{ + // ... +} + + +read, err := client.CreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `PrivateLinkScopesClient.Delete` + +```go +ctx := context.TODO() +id := privatelinkscopes.NewProviderPrivateLinkScopeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkScopeValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `PrivateLinkScopesClient.Get` + +```go +ctx := context.TODO() +id := privatelinkscopes.NewProviderPrivateLinkScopeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkScopeValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `PrivateLinkScopesClient.GetValidationDetails` + +```go +ctx := context.TODO() +id := privatelinkscopes.NewPrivateLinkScopeID("12345678-1234-9876-4563-123456789012", "locationValue", "privateLinkScopeIdValue") + +read, err := client.GetValidationDetails(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `PrivateLinkScopesClient.GetValidationDetailsForMachine` + +```go +ctx := context.TODO() +id := privatelinkscopes.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue") + +read, err := client.GetValidationDetailsForMachine(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `PrivateLinkScopesClient.List` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `PrivateLinkScopesClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `PrivateLinkScopesClient.UpdateTags` + +```go +ctx := context.TODO() +id := privatelinkscopes.NewProviderPrivateLinkScopeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkScopeValue") + +payload := privatelinkscopes.TagsResource{ + // ... +} + + +read, err := client.UpdateTags(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/client.go new file mode 100644 index 0000000000000..c1f8540450a33 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/client.go @@ -0,0 +1,26 @@ +package privatelinkscopes + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkScopesClient struct { + Client *resourcemanager.Client +} + +func NewPrivateLinkScopesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkScopesClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkscopes", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating PrivateLinkScopesClient: %+v", err) + } + + return &PrivateLinkScopesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/constants.go new file mode 100644 index 0000000000000..89bd271900ef8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/constants.go @@ -0,0 +1,51 @@ +package privatelinkscopes + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PublicNetworkAccessType string + +const ( + PublicNetworkAccessTypeDisabled PublicNetworkAccessType = "Disabled" + PublicNetworkAccessTypeEnabled PublicNetworkAccessType = "Enabled" +) + +func PossibleValuesForPublicNetworkAccessType() []string { + return []string{ + string(PublicNetworkAccessTypeDisabled), + string(PublicNetworkAccessTypeEnabled), + } +} + +func (s *PublicNetworkAccessType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePublicNetworkAccessType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePublicNetworkAccessType(input string) (*PublicNetworkAccessType, error) { + vals := map[string]PublicNetworkAccessType{ + "disabled": PublicNetworkAccessTypeDisabled, + "enabled": PublicNetworkAccessTypeEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PublicNetworkAccessType(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/id_machine.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/id_machine.go new file mode 100644 index 0000000000000..8296e6ce9cfab --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/id_machine.go @@ -0,0 +1,130 @@ +package privatelinkscopes + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&MachineId{}) +} + +var _ resourceids.ResourceId = &MachineId{} + +// MachineId is a struct representing the Resource ID for a Machine +type MachineId struct { + SubscriptionId string + ResourceGroupName string + MachineName string +} + +// NewMachineID returns a new MachineId struct +func NewMachineID(subscriptionId string, resourceGroupName string, machineName string) MachineId { + return MachineId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + MachineName: machineName, + } +} + +// ParseMachineID parses 'input' into a MachineId +func ParseMachineID(input string) (*MachineId, error) { + parser := resourceids.NewParserFromResourceIdType(&MachineId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MachineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseMachineIDInsensitively parses 'input' case-insensitively into a MachineId +// note: this method should only be used for API response data and not user input +func ParseMachineIDInsensitively(input string) (*MachineId, error) { + parser := resourceids.NewParserFromResourceIdType(&MachineId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MachineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MachineId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.MachineName, ok = input.Parsed["machineName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "machineName", input) + } + + return nil +} + +// ValidateMachineID checks that 'input' can be parsed as a Machine ID +func ValidateMachineID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseMachineID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Machine ID +func (id MachineId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.HybridCompute/machines/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MachineName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Machine ID +func (id MachineId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftHybridCompute", "Microsoft.HybridCompute", "Microsoft.HybridCompute"), + resourceids.StaticSegment("staticMachines", "machines", "machines"), + resourceids.UserSpecifiedSegment("machineName", "machineValue"), + } +} + +// String returns a human-readable description of this Machine ID +func (id MachineId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Machine Name: %q", id.MachineName), + } + return fmt.Sprintf("Machine (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/id_privatelinkscope.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/id_privatelinkscope.go new file mode 100644 index 0000000000000..ae6a8ccdd754b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/id_privatelinkscope.go @@ -0,0 +1,130 @@ +package privatelinkscopes + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&PrivateLinkScopeId{}) +} + +var _ resourceids.ResourceId = &PrivateLinkScopeId{} + +// PrivateLinkScopeId is a struct representing the Resource ID for a Private Link Scope +type PrivateLinkScopeId struct { + SubscriptionId string + LocationName string + PrivateLinkScopeId string +} + +// NewPrivateLinkScopeID returns a new PrivateLinkScopeId struct +func NewPrivateLinkScopeID(subscriptionId string, locationName string, privateLinkScopeId string) PrivateLinkScopeId { + return PrivateLinkScopeId{ + SubscriptionId: subscriptionId, + LocationName: locationName, + PrivateLinkScopeId: privateLinkScopeId, + } +} + +// ParsePrivateLinkScopeID parses 'input' into a PrivateLinkScopeId +func ParsePrivateLinkScopeID(input string) (*PrivateLinkScopeId, error) { + parser := resourceids.NewParserFromResourceIdType(&PrivateLinkScopeId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := PrivateLinkScopeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParsePrivateLinkScopeIDInsensitively parses 'input' case-insensitively into a PrivateLinkScopeId +// note: this method should only be used for API response data and not user input +func ParsePrivateLinkScopeIDInsensitively(input string) (*PrivateLinkScopeId, error) { + parser := resourceids.NewParserFromResourceIdType(&PrivateLinkScopeId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := PrivateLinkScopeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrivateLinkScopeId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) + } + + if id.PrivateLinkScopeId, ok = input.Parsed["privateLinkScopeId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeId", input) + } + + return nil +} + +// ValidatePrivateLinkScopeID checks that 'input' can be parsed as a Private Link Scope ID +func ValidatePrivateLinkScopeID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParsePrivateLinkScopeID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Private Link Scope ID +func (id PrivateLinkScopeId) ID() string { + fmtString := "/subscriptions/%s/providers/Microsoft.HybridCompute/locations/%s/privateLinkScopes/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName, id.PrivateLinkScopeId) +} + +// Segments returns a slice of Resource ID Segments which comprise this Private Link Scope ID +func (id PrivateLinkScopeId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftHybridCompute", "Microsoft.HybridCompute", "Microsoft.HybridCompute"), + resourceids.StaticSegment("staticLocations", "locations", "locations"), + resourceids.UserSpecifiedSegment("locationName", "locationValue"), + resourceids.StaticSegment("staticPrivateLinkScopes", "privateLinkScopes", "privateLinkScopes"), + resourceids.UserSpecifiedSegment("privateLinkScopeId", "privateLinkScopeIdValue"), + } +} + +// String returns a human-readable description of this Private Link Scope ID +func (id PrivateLinkScopeId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Location Name: %q", id.LocationName), + fmt.Sprintf("Private Link Scope: %q", id.PrivateLinkScopeId), + } + return fmt.Sprintf("Private Link Scope (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/id_providerprivatelinkscope.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/id_providerprivatelinkscope.go new file mode 100644 index 0000000000000..061c9f3c4cc27 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/id_providerprivatelinkscope.go @@ -0,0 +1,130 @@ +package privatelinkscopes + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&ProviderPrivateLinkScopeId{}) +} + +var _ resourceids.ResourceId = &ProviderPrivateLinkScopeId{} + +// ProviderPrivateLinkScopeId is a struct representing the Resource ID for a Provider Private Link Scope +type ProviderPrivateLinkScopeId struct { + SubscriptionId string + ResourceGroupName string + PrivateLinkScopeName string +} + +// NewProviderPrivateLinkScopeID returns a new ProviderPrivateLinkScopeId struct +func NewProviderPrivateLinkScopeID(subscriptionId string, resourceGroupName string, privateLinkScopeName string) ProviderPrivateLinkScopeId { + return ProviderPrivateLinkScopeId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + PrivateLinkScopeName: privateLinkScopeName, + } +} + +// ParseProviderPrivateLinkScopeID parses 'input' into a ProviderPrivateLinkScopeId +func ParseProviderPrivateLinkScopeID(input string) (*ProviderPrivateLinkScopeId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProviderPrivateLinkScopeId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProviderPrivateLinkScopeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseProviderPrivateLinkScopeIDInsensitively parses 'input' case-insensitively into a ProviderPrivateLinkScopeId +// note: this method should only be used for API response data and not user input +func ParseProviderPrivateLinkScopeIDInsensitively(input string) (*ProviderPrivateLinkScopeId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProviderPrivateLinkScopeId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProviderPrivateLinkScopeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProviderPrivateLinkScopeId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.PrivateLinkScopeName, ok = input.Parsed["privateLinkScopeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", input) + } + + return nil +} + +// ValidateProviderPrivateLinkScopeID checks that 'input' can be parsed as a Provider Private Link Scope ID +func ValidateProviderPrivateLinkScopeID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseProviderPrivateLinkScopeID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Provider Private Link Scope ID +func (id ProviderPrivateLinkScopeId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.HybridCompute/privateLinkScopes/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PrivateLinkScopeName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Provider Private Link Scope ID +func (id ProviderPrivateLinkScopeId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftHybridCompute", "Microsoft.HybridCompute", "Microsoft.HybridCompute"), + resourceids.StaticSegment("staticPrivateLinkScopes", "privateLinkScopes", "privateLinkScopes"), + resourceids.UserSpecifiedSegment("privateLinkScopeName", "privateLinkScopeValue"), + } +} + +// String returns a human-readable description of this Provider Private Link Scope ID +func (id ProviderPrivateLinkScopeId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Private Link Scope Name: %q", id.PrivateLinkScopeName), + } + return fmt.Sprintf("Provider Private Link Scope (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_createorupdate.go new file mode 100644 index 0000000000000..5d8d832043959 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_createorupdate.go @@ -0,0 +1,59 @@ +package privatelinkscopes + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *HybridComputePrivateLinkScope +} + +// CreateOrUpdate ... +func (c PrivateLinkScopesClient) CreateOrUpdate(ctx context.Context, id ProviderPrivateLinkScopeId, input HybridComputePrivateLinkScope) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model HybridComputePrivateLinkScope + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_delete.go new file mode 100644 index 0000000000000..59dfe5ecb40a7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_delete.go @@ -0,0 +1,71 @@ +package privatelinkscopes + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c PrivateLinkScopesClient) Delete(ctx context.Context, id ProviderPrivateLinkScopeId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c PrivateLinkScopesClient) DeleteThenPoll(ctx context.Context, id ProviderPrivateLinkScopeId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_get.go new file mode 100644 index 0000000000000..2373e6b9b1370 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_get.go @@ -0,0 +1,54 @@ +package privatelinkscopes + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *HybridComputePrivateLinkScope +} + +// Get ... +func (c PrivateLinkScopesClient) Get(ctx context.Context, id ProviderPrivateLinkScopeId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model HybridComputePrivateLinkScope + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_getvalidationdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_getvalidationdetails.go new file mode 100644 index 0000000000000..1c1d43dd36113 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_getvalidationdetails.go @@ -0,0 +1,54 @@ +package privatelinkscopes + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetValidationDetailsOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *PrivateLinkScopeValidationDetails +} + +// GetValidationDetails ... +func (c PrivateLinkScopesClient) GetValidationDetails(ctx context.Context, id PrivateLinkScopeId) (result GetValidationDetailsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model PrivateLinkScopeValidationDetails + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_getvalidationdetailsformachine.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_getvalidationdetailsformachine.go new file mode 100644 index 0000000000000..724c45d8ae97d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_getvalidationdetailsformachine.go @@ -0,0 +1,55 @@ +package privatelinkscopes + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetValidationDetailsForMachineOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *PrivateLinkScopeValidationDetails +} + +// GetValidationDetailsForMachine ... +func (c PrivateLinkScopesClient) GetValidationDetailsForMachine(ctx context.Context, id MachineId) (result GetValidationDetailsForMachineOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/privateLinkScopes/current", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model PrivateLinkScopeValidationDetails + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_list.go new file mode 100644 index 0000000000000..cf7cb6a98b999 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_list.go @@ -0,0 +1,106 @@ +package privatelinkscopes + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]HybridComputePrivateLinkScope +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []HybridComputePrivateLinkScope +} + +type ListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// List ... +func (c PrivateLinkScopesClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.HybridCompute/privateLinkScopes", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]HybridComputePrivateLinkScope `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c PrivateLinkScopesClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, HybridComputePrivateLinkScopeOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c PrivateLinkScopesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate HybridComputePrivateLinkScopeOperationPredicate) (result ListCompleteResult, err error) { + items := make([]HybridComputePrivateLinkScope, 0) + + resp, err := c.List(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_listbyresourcegroup.go new file mode 100644 index 0000000000000..816a40b7f9ec8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_listbyresourcegroup.go @@ -0,0 +1,106 @@ +package privatelinkscopes + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]HybridComputePrivateLinkScope +} + +type ListByResourceGroupCompleteResult struct { + LatestHttpResponse *http.Response + Items []HybridComputePrivateLinkScope +} + +type ListByResourceGroupCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByResourceGroup ... +func (c PrivateLinkScopesClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByResourceGroupCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.HybridCompute/privateLinkScopes", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]HybridComputePrivateLinkScope `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByResourceGroupComplete retrieves all the results into a single object +func (c PrivateLinkScopesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, HybridComputePrivateLinkScopeOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c PrivateLinkScopesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate HybridComputePrivateLinkScopeOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { + items := make([]HybridComputePrivateLinkScope, 0) + + resp, err := c.ListByResourceGroup(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByResourceGroupCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_updatetags.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_updatetags.go new file mode 100644 index 0000000000000..69978b7733a6f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_updatetags.go @@ -0,0 +1,58 @@ +package privatelinkscopes + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateTagsOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *HybridComputePrivateLinkScope +} + +// UpdateTags ... +func (c PrivateLinkScopesClient) UpdateTags(ctx context.Context, id ProviderPrivateLinkScopeId, input TagsResource) (result UpdateTagsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model HybridComputePrivateLinkScope + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_connectiondetail.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_connectiondetail.go new file mode 100644 index 0000000000000..2370482012276 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_connectiondetail.go @@ -0,0 +1,12 @@ +package privatelinkscopes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ConnectionDetail struct { + GroupId *string `json:"groupId,omitempty"` + Id *string `json:"id,omitempty"` + LinkIdentifier *string `json:"linkIdentifier,omitempty"` + MemberName *string `json:"memberName,omitempty"` + PrivateIPAddress *string `json:"privateIpAddress,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_hybridcomputeprivatelinkscope.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_hybridcomputeprivatelinkscope.go new file mode 100644 index 0000000000000..410d4826626cb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_hybridcomputeprivatelinkscope.go @@ -0,0 +1,18 @@ +package privatelinkscopes + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HybridComputePrivateLinkScope struct { + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *HybridComputePrivateLinkScopeProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_hybridcomputeprivatelinkscopeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_hybridcomputeprivatelinkscopeproperties.go new file mode 100644 index 0000000000000..d525c698b8c9f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_hybridcomputeprivatelinkscopeproperties.go @@ -0,0 +1,11 @@ +package privatelinkscopes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HybridComputePrivateLinkScopeProperties struct { + PrivateEndpointConnections *[]PrivateEndpointConnectionDataModel `json:"privateEndpointConnections,omitempty"` + PrivateLinkScopeId *string `json:"privateLinkScopeId,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + PublicNetworkAccess *PublicNetworkAccessType `json:"publicNetworkAccess,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_privateendpointconnectiondatamodel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_privateendpointconnectiondatamodel.go new file mode 100644 index 0000000000000..954af3e5dfd84 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_privateendpointconnectiondatamodel.go @@ -0,0 +1,11 @@ +package privatelinkscopes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnectionDataModel struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_privateendpointconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_privateendpointconnectionproperties.go new file mode 100644 index 0000000000000..58abb2b571992 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_privateendpointconnectionproperties.go @@ -0,0 +1,11 @@ +package privatelinkscopes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnectionProperties struct { + GroupIds *[]string `json:"groupIds,omitempty"` + PrivateEndpoint *PrivateEndpointProperty `json:"privateEndpoint,omitempty"` + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionStateProperty `json:"privateLinkServiceConnectionState,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_privateendpointproperty.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_privateendpointproperty.go new file mode 100644 index 0000000000000..69fce723b97ae --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_privateendpointproperty.go @@ -0,0 +1,8 @@ +package privatelinkscopes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointProperty struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_privatelinkscopevalidationdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_privatelinkscopevalidationdetails.go new file mode 100644 index 0000000000000..9c6f9562dc9b2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_privatelinkscopevalidationdetails.go @@ -0,0 +1,10 @@ +package privatelinkscopes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkScopeValidationDetails struct { + ConnectionDetails *[]ConnectionDetail `json:"connectionDetails,omitempty"` + Id *string `json:"id,omitempty"` + PublicNetworkAccess *PublicNetworkAccessType `json:"publicNetworkAccess,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_privatelinkserviceconnectionstateproperty.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_privatelinkserviceconnectionstateproperty.go new file mode 100644 index 0000000000000..685eb71d83a11 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_privatelinkserviceconnectionstateproperty.go @@ -0,0 +1,10 @@ +package privatelinkscopes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkServiceConnectionStateProperty struct { + ActionsRequired *string `json:"actionsRequired,omitempty"` + Description string `json:"description"` + Status string `json:"status"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_tagsresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_tagsresource.go new file mode 100644 index 0000000000000..63d0bb4212390 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/model_tagsresource.go @@ -0,0 +1,8 @@ +package privatelinkscopes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TagsResource struct { + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/predicates.go new file mode 100644 index 0000000000000..d0efec0387614 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/predicates.go @@ -0,0 +1,32 @@ +package privatelinkscopes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HybridComputePrivateLinkScopeOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p HybridComputePrivateLinkScopeOperationPredicate) Matches(input HybridComputePrivateLinkScope) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/version.go new file mode 100644 index 0000000000000..e36a79b3d7cbd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/version.go @@ -0,0 +1,12 @@ +package privatelinkscopes + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-07-10" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkscopes/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/README.md deleted file mode 100644 index fd6548a936e4a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/README.md +++ /dev/null @@ -1,90 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles` Documentation - -The `logprofiles` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2016-03-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles" -``` - - -### Client Initialization - -```go -client := logprofiles.NewLogProfilesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `LogProfilesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := logprofiles.NewLogProfileID("12345678-1234-9876-4563-123456789012", "logProfileValue") - -payload := logprofiles.LogProfileResource{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LogProfilesClient.Delete` - -```go -ctx := context.TODO() -id := logprofiles.NewLogProfileID("12345678-1234-9876-4563-123456789012", "logProfileValue") - -read, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LogProfilesClient.Get` - -```go -ctx := context.TODO() -id := logprofiles.NewLogProfileID("12345678-1234-9876-4563-123456789012", "logProfileValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LogProfilesClient.List` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -read, err := client.List(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/client.go deleted file mode 100644 index 944b40f43d86c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package logprofiles - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LogProfilesClient struct { - Client *resourcemanager.Client -} - -func NewLogProfilesClientWithBaseURI(sdkApi sdkEnv.Api) (*LogProfilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "logprofiles", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating LogProfilesClient: %+v", err) - } - - return &LogProfilesClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/id_logprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/id_logprofile.go deleted file mode 100644 index 39c41c6a11959..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/id_logprofile.go +++ /dev/null @@ -1,121 +0,0 @@ -package logprofiles - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&LogProfileId{}) -} - -var _ resourceids.ResourceId = &LogProfileId{} - -// LogProfileId is a struct representing the Resource ID for a Log Profile -type LogProfileId struct { - SubscriptionId string - LogProfileName string -} - -// NewLogProfileID returns a new LogProfileId struct -func NewLogProfileID(subscriptionId string, logProfileName string) LogProfileId { - return LogProfileId{ - SubscriptionId: subscriptionId, - LogProfileName: logProfileName, - } -} - -// ParseLogProfileID parses 'input' into a LogProfileId -func ParseLogProfileID(input string) (*LogProfileId, error) { - parser := resourceids.NewParserFromResourceIdType(&LogProfileId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LogProfileId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseLogProfileIDInsensitively parses 'input' case-insensitively into a LogProfileId -// note: this method should only be used for API response data and not user input -func ParseLogProfileIDInsensitively(input string) (*LogProfileId, error) { - parser := resourceids.NewParserFromResourceIdType(&LogProfileId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LogProfileId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *LogProfileId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.LogProfileName, ok = input.Parsed["logProfileName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "logProfileName", input) - } - - return nil -} - -// ValidateLogProfileID checks that 'input' can be parsed as a Log Profile ID -func ValidateLogProfileID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLogProfileID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Log Profile ID -func (id LogProfileId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Insights/logProfiles/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LogProfileName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Log Profile ID -func (id LogProfileId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftInsights", "Microsoft.Insights", "Microsoft.Insights"), - resourceids.StaticSegment("staticLogProfiles", "logProfiles", "logProfiles"), - resourceids.UserSpecifiedSegment("logProfileName", "logProfileValue"), - } -} - -// String returns a human-readable description of this Log Profile ID -func (id LogProfileId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Log Profile Name: %q", id.LogProfileName), - } - return fmt.Sprintf("Log Profile (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/method_createorupdate.go deleted file mode 100644 index 2001dafa07779..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/method_createorupdate.go +++ /dev/null @@ -1,58 +0,0 @@ -package logprofiles - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *LogProfileResource -} - -// CreateOrUpdate ... -func (c LogProfilesClient) CreateOrUpdate(ctx context.Context, id LogProfileId, input LogProfileResource) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model LogProfileResource - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/method_delete.go deleted file mode 100644 index 62d6f2a79e9aa..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/method_delete.go +++ /dev/null @@ -1,46 +0,0 @@ -package logprofiles - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c LogProfilesClient) Delete(ctx context.Context, id LogProfileId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/method_get.go deleted file mode 100644 index 6a8609a2de224..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/method_get.go +++ /dev/null @@ -1,54 +0,0 @@ -package logprofiles - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *LogProfileResource -} - -// Get ... -func (c LogProfilesClient) Get(ctx context.Context, id LogProfileId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model LogProfileResource - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/method_list.go deleted file mode 100644 index d1e1760f56b40..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/method_list.go +++ /dev/null @@ -1,56 +0,0 @@ -package logprofiles - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *LogProfileCollection -} - -// List ... -func (c LogProfilesClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Insights/logProfiles", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model LogProfileCollection - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/model_logprofilecollection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/model_logprofilecollection.go deleted file mode 100644 index 9636c1e5c1033..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/model_logprofilecollection.go +++ /dev/null @@ -1,8 +0,0 @@ -package logprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LogProfileCollection struct { - Value []LogProfileResource `json:"value"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/model_logprofileproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/model_logprofileproperties.go deleted file mode 100644 index 94d98ae1b98d1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/model_logprofileproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package logprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LogProfileProperties struct { - Categories []string `json:"categories"` - Locations []string `json:"locations"` - RetentionPolicy RetentionPolicy `json:"retentionPolicy"` - ServiceBusRuleId *string `json:"serviceBusRuleId,omitempty"` - StorageAccountId *string `json:"storageAccountId,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/model_logprofileresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/model_logprofileresource.go deleted file mode 100644 index 69267488ed2dd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/model_logprofileresource.go +++ /dev/null @@ -1,13 +0,0 @@ -package logprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LogProfileResource struct { - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties LogProfileProperties `json:"properties"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/model_retentionpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/model_retentionpolicy.go deleted file mode 100644 index e96b6aec4590f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/model_retentionpolicy.go +++ /dev/null @@ -1,9 +0,0 @@ -package logprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicy struct { - Days int64 `json:"days"` - Enabled bool `json:"enabled"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/version.go deleted file mode 100644 index 338728e233f97..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package logprofiles - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2016-03-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/logprofiles/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/README.md deleted file mode 100644 index ba17399d5ec07..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/README.md +++ /dev/null @@ -1,141 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab` Documentation - -The `lab` SDK allows for interaction with the Azure Resource Manager Service `labservices` (API Version `2022-08-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab" -``` - - -### Client Initialization - -```go -client := lab.NewLabClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `LabClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := lab.NewLabID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue") - -payload := lab.Lab{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `LabClient.Delete` - -```go -ctx := context.TODO() -id := lab.NewLabID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LabClient.Get` - -```go -ctx := context.TODO() -id := lab.NewLabID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LabClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LabClient.ListBySubscription` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination -items, err := client.ListBySubscriptionComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LabClient.Publish` - -```go -ctx := context.TODO() -id := lab.NewLabID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue") - -if err := client.PublishThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LabClient.SyncGroup` - -```go -ctx := context.TODO() -id := lab.NewLabID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue") - -if err := client.SyncGroupThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LabClient.Update` - -```go -ctx := context.TODO() -id := lab.NewLabID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue") - -payload := lab.LabUpdate{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/client.go deleted file mode 100644 index 0240d2f3918af..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package lab - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LabClient struct { - Client *resourcemanager.Client -} - -func NewLabClientWithBaseURI(sdkApi sdkEnv.Api) (*LabClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "lab", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating LabClient: %+v", err) - } - - return &LabClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/constants.go deleted file mode 100644 index f873909e6c2e0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/constants.go +++ /dev/null @@ -1,371 +0,0 @@ -package lab - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionType string - -const ( - ConnectionTypeNone ConnectionType = "None" - ConnectionTypePrivate ConnectionType = "Private" - ConnectionTypePublic ConnectionType = "Public" -) - -func PossibleValuesForConnectionType() []string { - return []string{ - string(ConnectionTypeNone), - string(ConnectionTypePrivate), - string(ConnectionTypePublic), - } -} - -func (s *ConnectionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConnectionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConnectionType(input string) (*ConnectionType, error) { - vals := map[string]ConnectionType{ - "none": ConnectionTypeNone, - "private": ConnectionTypePrivate, - "public": ConnectionTypePublic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConnectionType(input) - return &out, nil -} - -type CreateOption string - -const ( - CreateOptionImage CreateOption = "Image" - CreateOptionTemplateVM CreateOption = "TemplateVM" -) - -func PossibleValuesForCreateOption() []string { - return []string{ - string(CreateOptionImage), - string(CreateOptionTemplateVM), - } -} - -func (s *CreateOption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCreateOption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCreateOption(input string) (*CreateOption, error) { - vals := map[string]CreateOption{ - "image": CreateOptionImage, - "templatevm": CreateOptionTemplateVM, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CreateOption(input) - return &out, nil -} - -type EnableState string - -const ( - EnableStateDisabled EnableState = "Disabled" - EnableStateEnabled EnableState = "Enabled" -) - -func PossibleValuesForEnableState() []string { - return []string{ - string(EnableStateDisabled), - string(EnableStateEnabled), - } -} - -func (s *EnableState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEnableState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEnableState(input string) (*EnableState, error) { - vals := map[string]EnableState{ - "disabled": EnableStateDisabled, - "enabled": EnableStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EnableState(input) - return &out, nil -} - -type LabState string - -const ( - LabStateDraft LabState = "Draft" - LabStatePublished LabState = "Published" - LabStatePublishing LabState = "Publishing" - LabStateScaling LabState = "Scaling" - LabStateSyncing LabState = "Syncing" -) - -func PossibleValuesForLabState() []string { - return []string{ - string(LabStateDraft), - string(LabStatePublished), - string(LabStatePublishing), - string(LabStateScaling), - string(LabStateSyncing), - } -} - -func (s *LabState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLabState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLabState(input string) (*LabState, error) { - vals := map[string]LabState{ - "draft": LabStateDraft, - "published": LabStatePublished, - "publishing": LabStatePublishing, - "scaling": LabStateScaling, - "syncing": LabStateSyncing, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LabState(input) - return &out, nil -} - -type OsType string - -const ( - OsTypeLinux OsType = "Linux" - OsTypeWindows OsType = "Windows" -) - -func PossibleValuesForOsType() []string { - return []string{ - string(OsTypeLinux), - string(OsTypeWindows), - } -} - -func (s *OsType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOsType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOsType(input string) (*OsType, error) { - vals := map[string]OsType{ - "linux": OsTypeLinux, - "windows": OsTypeWindows, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OsType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateCreating ProvisioningState = "Creating" - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateLocked ProvisioningState = "Locked" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateCreating), - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateLocked), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "creating": ProvisioningStateCreating, - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "locked": ProvisioningStateLocked, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type ShutdownOnIdleMode string - -const ( - ShutdownOnIdleModeLowUsage ShutdownOnIdleMode = "LowUsage" - ShutdownOnIdleModeNone ShutdownOnIdleMode = "None" - ShutdownOnIdleModeUserAbsence ShutdownOnIdleMode = "UserAbsence" -) - -func PossibleValuesForShutdownOnIdleMode() []string { - return []string{ - string(ShutdownOnIdleModeLowUsage), - string(ShutdownOnIdleModeNone), - string(ShutdownOnIdleModeUserAbsence), - } -} - -func (s *ShutdownOnIdleMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseShutdownOnIdleMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseShutdownOnIdleMode(input string) (*ShutdownOnIdleMode, error) { - vals := map[string]ShutdownOnIdleMode{ - "lowusage": ShutdownOnIdleModeLowUsage, - "none": ShutdownOnIdleModeNone, - "userabsence": ShutdownOnIdleModeUserAbsence, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ShutdownOnIdleMode(input) - return &out, nil -} - -type SkuTier string - -const ( - SkuTierBasic SkuTier = "Basic" - SkuTierFree SkuTier = "Free" - SkuTierPremium SkuTier = "Premium" - SkuTierStandard SkuTier = "Standard" -) - -func PossibleValuesForSkuTier() []string { - return []string{ - string(SkuTierBasic), - string(SkuTierFree), - string(SkuTierPremium), - string(SkuTierStandard), - } -} - -func (s *SkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSkuTier(input string) (*SkuTier, error) { - vals := map[string]SkuTier{ - "basic": SkuTierBasic, - "free": SkuTierFree, - "premium": SkuTierPremium, - "standard": SkuTierStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SkuTier(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/id_lab.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/id_lab.go deleted file mode 100644 index eb77d34b54d30..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/id_lab.go +++ /dev/null @@ -1,130 +0,0 @@ -package lab - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&LabId{}) -} - -var _ resourceids.ResourceId = &LabId{} - -// LabId is a struct representing the Resource ID for a Lab -type LabId struct { - SubscriptionId string - ResourceGroupName string - LabName string -} - -// NewLabID returns a new LabId struct -func NewLabID(subscriptionId string, resourceGroupName string, labName string) LabId { - return LabId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LabName: labName, - } -} - -// ParseLabID parses 'input' into a LabId -func ParseLabID(input string) (*LabId, error) { - parser := resourceids.NewParserFromResourceIdType(&LabId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseLabIDInsensitively parses 'input' case-insensitively into a LabId -// note: this method should only be used for API response data and not user input -func ParseLabIDInsensitively(input string) (*LabId, error) { - parser := resourceids.NewParserFromResourceIdType(&LabId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *LabId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.LabName, ok = input.Parsed["labName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "labName", input) - } - - return nil -} - -// ValidateLabID checks that 'input' can be parsed as a Lab ID -func ValidateLabID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLabID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Lab ID -func (id LabId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.LabServices/labs/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LabName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Lab ID -func (id LabId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftLabServices", "Microsoft.LabServices", "Microsoft.LabServices"), - resourceids.StaticSegment("staticLabs", "labs", "labs"), - resourceids.UserSpecifiedSegment("labName", "labValue"), - } -} - -// String returns a human-readable description of this Lab ID -func (id LabId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Lab Name: %q", id.LabName), - } - return fmt.Sprintf("Lab (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/method_createorupdate.go deleted file mode 100644 index 9eb3bb00b80cc..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/method_createorupdate.go +++ /dev/null @@ -1,76 +0,0 @@ -package lab - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *Lab -} - -// CreateOrUpdate ... -func (c LabClient) CreateOrUpdate(ctx context.Context, id LabId, input Lab) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c LabClient) CreateOrUpdateThenPoll(ctx context.Context, id LabId, input Lab) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/method_delete.go deleted file mode 100644 index 61d797ee9c9fb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package lab - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c LabClient) Delete(ctx context.Context, id LabId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c LabClient) DeleteThenPoll(ctx context.Context, id LabId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/method_get.go deleted file mode 100644 index 744e5ffbaf7f9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/method_get.go +++ /dev/null @@ -1,54 +0,0 @@ -package lab - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Lab -} - -// Get ... -func (c LabClient) Get(ctx context.Context, id LabId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Lab - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/method_listbyresourcegroup.go deleted file mode 100644 index 3c31ffbbc8742..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/method_listbyresourcegroup.go +++ /dev/null @@ -1,106 +0,0 @@ -package lab - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]Lab -} - -type ListByResourceGroupCompleteResult struct { - LatestHttpResponse *http.Response - Items []Lab -} - -type ListByResourceGroupCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListByResourceGroup ... -func (c LabClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListByResourceGroupCustomPager{}, - Path: fmt.Sprintf("%s/providers/Microsoft.LabServices/labs", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]Lab `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c LabClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, LabOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LabClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate LabOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]Lab, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/method_listbysubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/method_listbysubscription.go deleted file mode 100644 index c7543e61a46cc..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/method_listbysubscription.go +++ /dev/null @@ -1,106 +0,0 @@ -package lab - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListBySubscriptionOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]Lab -} - -type ListBySubscriptionCompleteResult struct { - LatestHttpResponse *http.Response - Items []Lab -} - -type ListBySubscriptionCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListBySubscriptionCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListBySubscription ... -func (c LabClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListBySubscriptionCustomPager{}, - Path: fmt.Sprintf("%s/providers/Microsoft.LabServices/labs", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]Lab `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListBySubscriptionComplete retrieves all the results into a single object -func (c LabClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, LabOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LabClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate LabOperationPredicate) (result ListBySubscriptionCompleteResult, err error) { - items := make([]Lab, 0) - - resp, err := c.ListBySubscription(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListBySubscriptionCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/method_publish.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/method_publish.go deleted file mode 100644 index 0f1bdd45364f2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/method_publish.go +++ /dev/null @@ -1,70 +0,0 @@ -package lab - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublishOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Publish ... -func (c LabClient) Publish(ctx context.Context, id LabId) (result PublishOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/publish", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// PublishThenPoll performs Publish then polls until it's completed -func (c LabClient) PublishThenPoll(ctx context.Context, id LabId) error { - result, err := c.Publish(ctx, id) - if err != nil { - return fmt.Errorf("performing Publish: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Publish: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/method_syncgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/method_syncgroup.go deleted file mode 100644 index 0c886d63fd4a2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/method_syncgroup.go +++ /dev/null @@ -1,70 +0,0 @@ -package lab - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SyncGroupOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// SyncGroup ... -func (c LabClient) SyncGroup(ctx context.Context, id LabId) (result SyncGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/syncGroup", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// SyncGroupThenPoll performs SyncGroup then polls until it's completed -func (c LabClient) SyncGroupThenPoll(ctx context.Context, id LabId) error { - result, err := c.SyncGroup(ctx, id) - if err != nil { - return fmt.Errorf("performing SyncGroup: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after SyncGroup: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/method_update.go deleted file mode 100644 index b4ae22ae6d191..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/method_update.go +++ /dev/null @@ -1,75 +0,0 @@ -package lab - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *Lab -} - -// Update ... -func (c LabClient) Update(ctx context.Context, id LabId, input LabUpdate) (result UpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpdateThenPoll performs Update then polls until it's completed -func (c LabClient) UpdateThenPoll(ctx context.Context, id LabId, input LabUpdate) error { - result, err := c.Update(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Update: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Update: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_autoshutdownprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_autoshutdownprofile.go deleted file mode 100644 index 06638510756e2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_autoshutdownprofile.go +++ /dev/null @@ -1,13 +0,0 @@ -package lab - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AutoShutdownProfile struct { - DisconnectDelay *string `json:"disconnectDelay,omitempty"` - IdleDelay *string `json:"idleDelay,omitempty"` - NoConnectDelay *string `json:"noConnectDelay,omitempty"` - ShutdownOnDisconnect *EnableState `json:"shutdownOnDisconnect,omitempty"` - ShutdownOnIdle *ShutdownOnIdleMode `json:"shutdownOnIdle,omitempty"` - ShutdownWhenNotConnected *EnableState `json:"shutdownWhenNotConnected,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_connectionprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_connectionprofile.go deleted file mode 100644 index 68a127f8e34a0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_connectionprofile.go +++ /dev/null @@ -1,11 +0,0 @@ -package lab - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionProfile struct { - ClientRdpAccess *ConnectionType `json:"clientRdpAccess,omitempty"` - ClientSshAccess *ConnectionType `json:"clientSshAccess,omitempty"` - WebRdpAccess *ConnectionType `json:"webRdpAccess,omitempty"` - WebSshAccess *ConnectionType `json:"webSshAccess,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_credentials.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_credentials.go deleted file mode 100644 index 6d23f8a3fba9e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_credentials.go +++ /dev/null @@ -1,9 +0,0 @@ -package lab - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Credentials struct { - Password *string `json:"password,omitempty"` - Username string `json:"username"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_imagereference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_imagereference.go deleted file mode 100644 index b58e73a3347ee..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_imagereference.go +++ /dev/null @@ -1,13 +0,0 @@ -package lab - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ImageReference struct { - ExactVersion *string `json:"exactVersion,omitempty"` - Id *string `json:"id,omitempty"` - Offer *string `json:"offer,omitempty"` - Publisher *string `json:"publisher,omitempty"` - Sku *string `json:"sku,omitempty"` - Version *string `json:"version,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_lab.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_lab.go deleted file mode 100644 index 47453834f0e70..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_lab.go +++ /dev/null @@ -1,18 +0,0 @@ -package lab - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Lab struct { - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties LabProperties `json:"properties"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_labnetworkprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_labnetworkprofile.go deleted file mode 100644 index 48ff54d74bfba..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_labnetworkprofile.go +++ /dev/null @@ -1,10 +0,0 @@ -package lab - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LabNetworkProfile struct { - LoadBalancerId *string `json:"loadBalancerId,omitempty"` - PublicIPId *string `json:"publicIpId,omitempty"` - SubnetId *string `json:"subnetId,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_labproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_labproperties.go deleted file mode 100644 index ea789c61b7ade..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_labproperties.go +++ /dev/null @@ -1,18 +0,0 @@ -package lab - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LabProperties struct { - AutoShutdownProfile *AutoShutdownProfile `json:"autoShutdownProfile,omitempty"` - ConnectionProfile *ConnectionProfile `json:"connectionProfile,omitempty"` - Description *string `json:"description,omitempty"` - LabPlanId *string `json:"labPlanId,omitempty"` - NetworkProfile *LabNetworkProfile `json:"networkProfile,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RosterProfile *RosterProfile `json:"rosterProfile,omitempty"` - SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"` - State *LabState `json:"state,omitempty"` - Title *string `json:"title,omitempty"` - VirtualMachineProfile *VirtualMachineProfile `json:"virtualMachineProfile,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_labupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_labupdate.go deleted file mode 100644 index dfa99f31c3c2d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_labupdate.go +++ /dev/null @@ -1,9 +0,0 @@ -package lab - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LabUpdate struct { - Properties *LabUpdateProperties `json:"properties,omitempty"` - Tags *[]string `json:"tags,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_labupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_labupdateproperties.go deleted file mode 100644 index eb79b4be84b32..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_labupdateproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package lab - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LabUpdateProperties struct { - AutoShutdownProfile *AutoShutdownProfile `json:"autoShutdownProfile,omitempty"` - ConnectionProfile *ConnectionProfile `json:"connectionProfile,omitempty"` - Description *string `json:"description,omitempty"` - LabPlanId *string `json:"labPlanId,omitempty"` - RosterProfile *RosterProfile `json:"rosterProfile,omitempty"` - SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"` - Title *string `json:"title,omitempty"` - VirtualMachineProfile *VirtualMachineProfile `json:"virtualMachineProfile,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_rosterprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_rosterprofile.go deleted file mode 100644 index b95ceca34af1a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_rosterprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package lab - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RosterProfile struct { - ActiveDirectoryGroupId *string `json:"activeDirectoryGroupId,omitempty"` - LmsInstance *string `json:"lmsInstance,omitempty"` - LtiClientId *string `json:"ltiClientId,omitempty"` - LtiContextId *string `json:"ltiContextId,omitempty"` - LtiRosterEndpoint *string `json:"ltiRosterEndpoint,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_securityprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_securityprofile.go deleted file mode 100644 index 9e0184755744a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_securityprofile.go +++ /dev/null @@ -1,9 +0,0 @@ -package lab - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityProfile struct { - OpenAccess *EnableState `json:"openAccess,omitempty"` - RegistrationCode *string `json:"registrationCode,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_sku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_sku.go deleted file mode 100644 index abacbe098b4fb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_sku.go +++ /dev/null @@ -1,12 +0,0 @@ -package lab - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Sku struct { - Capacity *int64 `json:"capacity,omitempty"` - Family *string `json:"family,omitempty"` - Name string `json:"name"` - Size *string `json:"size,omitempty"` - Tier *SkuTier `json:"tier,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_virtualmachineadditionalcapabilities.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_virtualmachineadditionalcapabilities.go deleted file mode 100644 index f0aff54d4319c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_virtualmachineadditionalcapabilities.go +++ /dev/null @@ -1,8 +0,0 @@ -package lab - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualMachineAdditionalCapabilities struct { - InstallGpuDrivers *EnableState `json:"installGpuDrivers,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_virtualmachineprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_virtualmachineprofile.go deleted file mode 100644 index 840aece64657b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/model_virtualmachineprofile.go +++ /dev/null @@ -1,16 +0,0 @@ -package lab - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualMachineProfile struct { - AdditionalCapabilities *VirtualMachineAdditionalCapabilities `json:"additionalCapabilities,omitempty"` - AdminUser Credentials `json:"adminUser"` - CreateOption CreateOption `json:"createOption"` - ImageReference ImageReference `json:"imageReference"` - NonAdminUser *Credentials `json:"nonAdminUser,omitempty"` - OsType *OsType `json:"osType,omitempty"` - Sku Sku `json:"sku"` - UsageQuota string `json:"usageQuota"` - UseSharedPassword *EnableState `json:"useSharedPassword,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/predicates.go deleted file mode 100644 index ddf1b2a81d84c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package lab - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LabOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p LabOperationPredicate) Matches(input Lab) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/version.go deleted file mode 100644 index 7b9e0fb1e82d9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package lab - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-08-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/lab/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/README.md deleted file mode 100644 index 1012bf36f3214..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/README.md +++ /dev/null @@ -1,117 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan` Documentation - -The `labplan` SDK allows for interaction with the Azure Resource Manager Service `labservices` (API Version `2022-08-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan" -``` - - -### Client Initialization - -```go -client := labplan.NewLabPlanClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `LabPlanClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := labplan.NewLabPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labPlanValue") - -payload := labplan.LabPlan{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `LabPlanClient.Delete` - -```go -ctx := context.TODO() -id := labplan.NewLabPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labPlanValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LabPlanClient.Get` - -```go -ctx := context.TODO() -id := labplan.NewLabPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labPlanValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LabPlanClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LabPlanClient.ListBySubscription` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination -items, err := client.ListBySubscriptionComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LabPlanClient.Update` - -```go -ctx := context.TODO() -id := labplan.NewLabPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labPlanValue") - -payload := labplan.LabPlanUpdate{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/client.go deleted file mode 100644 index c00d6ef4fdd73..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package labplan - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LabPlanClient struct { - Client *resourcemanager.Client -} - -func NewLabPlanClientWithBaseURI(sdkApi sdkEnv.Api) (*LabPlanClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "labplan", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating LabPlanClient: %+v", err) - } - - return &LabPlanClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/constants.go deleted file mode 100644 index e2f171bcf6ddb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/constants.go +++ /dev/null @@ -1,192 +0,0 @@ -package labplan - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionType string - -const ( - ConnectionTypeNone ConnectionType = "None" - ConnectionTypePrivate ConnectionType = "Private" - ConnectionTypePublic ConnectionType = "Public" -) - -func PossibleValuesForConnectionType() []string { - return []string{ - string(ConnectionTypeNone), - string(ConnectionTypePrivate), - string(ConnectionTypePublic), - } -} - -func (s *ConnectionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConnectionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConnectionType(input string) (*ConnectionType, error) { - vals := map[string]ConnectionType{ - "none": ConnectionTypeNone, - "private": ConnectionTypePrivate, - "public": ConnectionTypePublic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConnectionType(input) - return &out, nil -} - -type EnableState string - -const ( - EnableStateDisabled EnableState = "Disabled" - EnableStateEnabled EnableState = "Enabled" -) - -func PossibleValuesForEnableState() []string { - return []string{ - string(EnableStateDisabled), - string(EnableStateEnabled), - } -} - -func (s *EnableState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEnableState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEnableState(input string) (*EnableState, error) { - vals := map[string]EnableState{ - "disabled": EnableStateDisabled, - "enabled": EnableStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EnableState(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateCreating ProvisioningState = "Creating" - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateLocked ProvisioningState = "Locked" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateCreating), - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateLocked), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "creating": ProvisioningStateCreating, - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "locked": ProvisioningStateLocked, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type ShutdownOnIdleMode string - -const ( - ShutdownOnIdleModeLowUsage ShutdownOnIdleMode = "LowUsage" - ShutdownOnIdleModeNone ShutdownOnIdleMode = "None" - ShutdownOnIdleModeUserAbsence ShutdownOnIdleMode = "UserAbsence" -) - -func PossibleValuesForShutdownOnIdleMode() []string { - return []string{ - string(ShutdownOnIdleModeLowUsage), - string(ShutdownOnIdleModeNone), - string(ShutdownOnIdleModeUserAbsence), - } -} - -func (s *ShutdownOnIdleMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseShutdownOnIdleMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseShutdownOnIdleMode(input string) (*ShutdownOnIdleMode, error) { - vals := map[string]ShutdownOnIdleMode{ - "lowusage": ShutdownOnIdleModeLowUsage, - "none": ShutdownOnIdleModeNone, - "userabsence": ShutdownOnIdleModeUserAbsence, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ShutdownOnIdleMode(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/id_labplan.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/id_labplan.go deleted file mode 100644 index f0ad633137e20..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/id_labplan.go +++ /dev/null @@ -1,130 +0,0 @@ -package labplan - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&LabPlanId{}) -} - -var _ resourceids.ResourceId = &LabPlanId{} - -// LabPlanId is a struct representing the Resource ID for a Lab Plan -type LabPlanId struct { - SubscriptionId string - ResourceGroupName string - LabPlanName string -} - -// NewLabPlanID returns a new LabPlanId struct -func NewLabPlanID(subscriptionId string, resourceGroupName string, labPlanName string) LabPlanId { - return LabPlanId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LabPlanName: labPlanName, - } -} - -// ParseLabPlanID parses 'input' into a LabPlanId -func ParseLabPlanID(input string) (*LabPlanId, error) { - parser := resourceids.NewParserFromResourceIdType(&LabPlanId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LabPlanId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseLabPlanIDInsensitively parses 'input' case-insensitively into a LabPlanId -// note: this method should only be used for API response data and not user input -func ParseLabPlanIDInsensitively(input string) (*LabPlanId, error) { - parser := resourceids.NewParserFromResourceIdType(&LabPlanId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LabPlanId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *LabPlanId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.LabPlanName, ok = input.Parsed["labPlanName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "labPlanName", input) - } - - return nil -} - -// ValidateLabPlanID checks that 'input' can be parsed as a Lab Plan ID -func ValidateLabPlanID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLabPlanID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Lab Plan ID -func (id LabPlanId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.LabServices/labPlans/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LabPlanName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Lab Plan ID -func (id LabPlanId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftLabServices", "Microsoft.LabServices", "Microsoft.LabServices"), - resourceids.StaticSegment("staticLabPlans", "labPlans", "labPlans"), - resourceids.UserSpecifiedSegment("labPlanName", "labPlanValue"), - } -} - -// String returns a human-readable description of this Lab Plan ID -func (id LabPlanId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Lab Plan Name: %q", id.LabPlanName), - } - return fmt.Sprintf("Lab Plan (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/method_createorupdate.go deleted file mode 100644 index 921eaacfd1100..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/method_createorupdate.go +++ /dev/null @@ -1,76 +0,0 @@ -package labplan - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *LabPlan -} - -// CreateOrUpdate ... -func (c LabPlanClient) CreateOrUpdate(ctx context.Context, id LabPlanId, input LabPlan) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c LabPlanClient) CreateOrUpdateThenPoll(ctx context.Context, id LabPlanId, input LabPlan) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/method_delete.go deleted file mode 100644 index f48cc96554a83..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package labplan - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c LabPlanClient) Delete(ctx context.Context, id LabPlanId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c LabPlanClient) DeleteThenPoll(ctx context.Context, id LabPlanId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/method_get.go deleted file mode 100644 index 19314604754be..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/method_get.go +++ /dev/null @@ -1,54 +0,0 @@ -package labplan - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *LabPlan -} - -// Get ... -func (c LabPlanClient) Get(ctx context.Context, id LabPlanId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model LabPlan - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/method_listbyresourcegroup.go deleted file mode 100644 index 3e7aeb25debec..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/method_listbyresourcegroup.go +++ /dev/null @@ -1,106 +0,0 @@ -package labplan - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]LabPlan -} - -type ListByResourceGroupCompleteResult struct { - LatestHttpResponse *http.Response - Items []LabPlan -} - -type ListByResourceGroupCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListByResourceGroup ... -func (c LabPlanClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListByResourceGroupCustomPager{}, - Path: fmt.Sprintf("%s/providers/Microsoft.LabServices/labPlans", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]LabPlan `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c LabPlanClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, LabPlanOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LabPlanClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate LabPlanOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]LabPlan, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/method_listbysubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/method_listbysubscription.go deleted file mode 100644 index c207ff5cfae6c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/method_listbysubscription.go +++ /dev/null @@ -1,106 +0,0 @@ -package labplan - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListBySubscriptionOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]LabPlan -} - -type ListBySubscriptionCompleteResult struct { - LatestHttpResponse *http.Response - Items []LabPlan -} - -type ListBySubscriptionCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListBySubscriptionCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListBySubscription ... -func (c LabPlanClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListBySubscriptionCustomPager{}, - Path: fmt.Sprintf("%s/providers/Microsoft.LabServices/labPlans", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]LabPlan `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListBySubscriptionComplete retrieves all the results into a single object -func (c LabPlanClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, LabPlanOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LabPlanClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate LabPlanOperationPredicate) (result ListBySubscriptionCompleteResult, err error) { - items := make([]LabPlan, 0) - - resp, err := c.ListBySubscription(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListBySubscriptionCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/method_update.go deleted file mode 100644 index c896046fcf167..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/method_update.go +++ /dev/null @@ -1,75 +0,0 @@ -package labplan - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *LabPlan -} - -// Update ... -func (c LabPlanClient) Update(ctx context.Context, id LabPlanId, input LabPlanUpdate) (result UpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpdateThenPoll performs Update then polls until it's completed -func (c LabPlanClient) UpdateThenPoll(ctx context.Context, id LabPlanId, input LabPlanUpdate) error { - result, err := c.Update(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Update: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Update: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/model_autoshutdownprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/model_autoshutdownprofile.go deleted file mode 100644 index 2f68294035503..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/model_autoshutdownprofile.go +++ /dev/null @@ -1,13 +0,0 @@ -package labplan - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AutoShutdownProfile struct { - DisconnectDelay *string `json:"disconnectDelay,omitempty"` - IdleDelay *string `json:"idleDelay,omitempty"` - NoConnectDelay *string `json:"noConnectDelay,omitempty"` - ShutdownOnDisconnect *EnableState `json:"shutdownOnDisconnect,omitempty"` - ShutdownOnIdle *ShutdownOnIdleMode `json:"shutdownOnIdle,omitempty"` - ShutdownWhenNotConnected *EnableState `json:"shutdownWhenNotConnected,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/model_connectionprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/model_connectionprofile.go deleted file mode 100644 index f54cc4fc0e04e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/model_connectionprofile.go +++ /dev/null @@ -1,11 +0,0 @@ -package labplan - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionProfile struct { - ClientRdpAccess *ConnectionType `json:"clientRdpAccess,omitempty"` - ClientSshAccess *ConnectionType `json:"clientSshAccess,omitempty"` - WebRdpAccess *ConnectionType `json:"webRdpAccess,omitempty"` - WebSshAccess *ConnectionType `json:"webSshAccess,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/model_labplan.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/model_labplan.go deleted file mode 100644 index 60ba7f5473f40..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/model_labplan.go +++ /dev/null @@ -1,20 +0,0 @@ -package labplan - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LabPlan struct { - Id *string `json:"id,omitempty"` - Identity *identity.SystemAssigned `json:"identity,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties LabPlanProperties `json:"properties"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/model_labplannetworkprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/model_labplannetworkprofile.go deleted file mode 100644 index 7c4a0861b157a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/model_labplannetworkprofile.go +++ /dev/null @@ -1,8 +0,0 @@ -package labplan - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LabPlanNetworkProfile struct { - SubnetId *string `json:"subnetId,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/model_labplanproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/model_labplanproperties.go deleted file mode 100644 index 1904d39790d26..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/model_labplanproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package labplan - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LabPlanProperties struct { - AllowedRegions *[]string `json:"allowedRegions,omitempty"` - DefaultAutoShutdownProfile *AutoShutdownProfile `json:"defaultAutoShutdownProfile,omitempty"` - DefaultConnectionProfile *ConnectionProfile `json:"defaultConnectionProfile,omitempty"` - DefaultNetworkProfile *LabPlanNetworkProfile `json:"defaultNetworkProfile,omitempty"` - LinkedLmsInstance *string `json:"linkedLmsInstance,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SharedGalleryId *string `json:"sharedGalleryId,omitempty"` - SupportInfo *SupportInfo `json:"supportInfo,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/model_labplanupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/model_labplanupdate.go deleted file mode 100644 index f090f7597b965..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/model_labplanupdate.go +++ /dev/null @@ -1,14 +0,0 @@ -package labplan - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LabPlanUpdate struct { - Identity *identity.SystemAssigned `json:"identity,omitempty"` - Properties *LabPlanUpdateProperties `json:"properties,omitempty"` - Tags *[]string `json:"tags,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/model_labplanupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/model_labplanupdateproperties.go deleted file mode 100644 index bcf2660820f10..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/model_labplanupdateproperties.go +++ /dev/null @@ -1,14 +0,0 @@ -package labplan - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LabPlanUpdateProperties struct { - AllowedRegions *[]string `json:"allowedRegions,omitempty"` - DefaultAutoShutdownProfile *AutoShutdownProfile `json:"defaultAutoShutdownProfile,omitempty"` - DefaultConnectionProfile *ConnectionProfile `json:"defaultConnectionProfile,omitempty"` - DefaultNetworkProfile *LabPlanNetworkProfile `json:"defaultNetworkProfile,omitempty"` - LinkedLmsInstance *string `json:"linkedLmsInstance,omitempty"` - SharedGalleryId *string `json:"sharedGalleryId,omitempty"` - SupportInfo *SupportInfo `json:"supportInfo,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/model_supportinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/model_supportinfo.go deleted file mode 100644 index 45b8d18165b51..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/model_supportinfo.go +++ /dev/null @@ -1,11 +0,0 @@ -package labplan - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SupportInfo struct { - Email *string `json:"email,omitempty"` - Instructions *string `json:"instructions,omitempty"` - Phone *string `json:"phone,omitempty"` - Url *string `json:"url,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/predicates.go deleted file mode 100644 index 74f89d0968aa9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package labplan - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LabPlanOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p LabPlanOperationPredicate) Matches(input LabPlan) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/version.go deleted file mode 100644 index 895f38a474e04..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package labplan - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-08-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/labplan/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/README.md deleted file mode 100644 index 743d95e64113a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/README.md +++ /dev/null @@ -1,107 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule` Documentation - -The `schedule` SDK allows for interaction with the Azure Resource Manager Service `labservices` (API Version `2022-08-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule" -``` - - -### Client Initialization - -```go -client := schedule.NewScheduleClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ScheduleClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := schedule.NewScheduleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "scheduleValue") - -payload := schedule.Schedule{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ScheduleClient.Delete` - -```go -ctx := context.TODO() -id := schedule.NewScheduleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "scheduleValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ScheduleClient.Get` - -```go -ctx := context.TODO() -id := schedule.NewScheduleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "scheduleValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ScheduleClient.ListByLab` - -```go -ctx := context.TODO() -id := schedule.NewLabID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue") - -// alternatively `client.ListByLab(ctx, id)` can be used to do batched pagination -items, err := client.ListByLabComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ScheduleClient.Update` - -```go -ctx := context.TODO() -id := schedule.NewScheduleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "scheduleValue") - -payload := schedule.ScheduleUpdate{ - // ... -} - - -read, err := client.Update(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/client.go deleted file mode 100644 index 14f19f2e2d638..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package schedule - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ScheduleClient struct { - Client *resourcemanager.Client -} - -func NewScheduleClientWithBaseURI(sdkApi sdkEnv.Api) (*ScheduleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "schedule", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ScheduleClient: %+v", err) - } - - return &ScheduleClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/constants.go deleted file mode 100644 index 0ef4dd02a212e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/constants.go +++ /dev/null @@ -1,160 +0,0 @@ -package schedule - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateCreating ProvisioningState = "Creating" - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateLocked ProvisioningState = "Locked" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateCreating), - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateLocked), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "creating": ProvisioningStateCreating, - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "locked": ProvisioningStateLocked, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type RecurrenceFrequency string - -const ( - RecurrenceFrequencyDaily RecurrenceFrequency = "Daily" - RecurrenceFrequencyWeekly RecurrenceFrequency = "Weekly" -) - -func PossibleValuesForRecurrenceFrequency() []string { - return []string{ - string(RecurrenceFrequencyDaily), - string(RecurrenceFrequencyWeekly), - } -} - -func (s *RecurrenceFrequency) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRecurrenceFrequency(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRecurrenceFrequency(input string) (*RecurrenceFrequency, error) { - vals := map[string]RecurrenceFrequency{ - "daily": RecurrenceFrequencyDaily, - "weekly": RecurrenceFrequencyWeekly, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RecurrenceFrequency(input) - return &out, nil -} - -type WeekDay string - -const ( - WeekDayFriday WeekDay = "Friday" - WeekDayMonday WeekDay = "Monday" - WeekDaySaturday WeekDay = "Saturday" - WeekDaySunday WeekDay = "Sunday" - WeekDayThursday WeekDay = "Thursday" - WeekDayTuesday WeekDay = "Tuesday" - WeekDayWednesday WeekDay = "Wednesday" -) - -func PossibleValuesForWeekDay() []string { - return []string{ - string(WeekDayFriday), - string(WeekDayMonday), - string(WeekDaySaturday), - string(WeekDaySunday), - string(WeekDayThursday), - string(WeekDayTuesday), - string(WeekDayWednesday), - } -} - -func (s *WeekDay) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWeekDay(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWeekDay(input string) (*WeekDay, error) { - vals := map[string]WeekDay{ - "friday": WeekDayFriday, - "monday": WeekDayMonday, - "saturday": WeekDaySaturday, - "sunday": WeekDaySunday, - "thursday": WeekDayThursday, - "tuesday": WeekDayTuesday, - "wednesday": WeekDayWednesday, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WeekDay(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/id_lab.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/id_lab.go deleted file mode 100644 index a8736ed33641b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/id_lab.go +++ /dev/null @@ -1,130 +0,0 @@ -package schedule - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&LabId{}) -} - -var _ resourceids.ResourceId = &LabId{} - -// LabId is a struct representing the Resource ID for a Lab -type LabId struct { - SubscriptionId string - ResourceGroupName string - LabName string -} - -// NewLabID returns a new LabId struct -func NewLabID(subscriptionId string, resourceGroupName string, labName string) LabId { - return LabId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LabName: labName, - } -} - -// ParseLabID parses 'input' into a LabId -func ParseLabID(input string) (*LabId, error) { - parser := resourceids.NewParserFromResourceIdType(&LabId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseLabIDInsensitively parses 'input' case-insensitively into a LabId -// note: this method should only be used for API response data and not user input -func ParseLabIDInsensitively(input string) (*LabId, error) { - parser := resourceids.NewParserFromResourceIdType(&LabId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *LabId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.LabName, ok = input.Parsed["labName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "labName", input) - } - - return nil -} - -// ValidateLabID checks that 'input' can be parsed as a Lab ID -func ValidateLabID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLabID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Lab ID -func (id LabId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.LabServices/labs/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LabName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Lab ID -func (id LabId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftLabServices", "Microsoft.LabServices", "Microsoft.LabServices"), - resourceids.StaticSegment("staticLabs", "labs", "labs"), - resourceids.UserSpecifiedSegment("labName", "labValue"), - } -} - -// String returns a human-readable description of this Lab ID -func (id LabId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Lab Name: %q", id.LabName), - } - return fmt.Sprintf("Lab (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/id_schedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/id_schedule.go deleted file mode 100644 index fce50774e00ce..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/id_schedule.go +++ /dev/null @@ -1,139 +0,0 @@ -package schedule - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&ScheduleId{}) -} - -var _ resourceids.ResourceId = &ScheduleId{} - -// ScheduleId is a struct representing the Resource ID for a Schedule -type ScheduleId struct { - SubscriptionId string - ResourceGroupName string - LabName string - ScheduleName string -} - -// NewScheduleID returns a new ScheduleId struct -func NewScheduleID(subscriptionId string, resourceGroupName string, labName string, scheduleName string) ScheduleId { - return ScheduleId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LabName: labName, - ScheduleName: scheduleName, - } -} - -// ParseScheduleID parses 'input' into a ScheduleId -func ParseScheduleID(input string) (*ScheduleId, error) { - parser := resourceids.NewParserFromResourceIdType(&ScheduleId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseScheduleIDInsensitively parses 'input' case-insensitively into a ScheduleId -// note: this method should only be used for API response data and not user input -func ParseScheduleIDInsensitively(input string) (*ScheduleId, error) { - parser := resourceids.NewParserFromResourceIdType(&ScheduleId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *ScheduleId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.LabName, ok = input.Parsed["labName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "labName", input) - } - - if id.ScheduleName, ok = input.Parsed["scheduleName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "scheduleName", input) - } - - return nil -} - -// ValidateScheduleID checks that 'input' can be parsed as a Schedule ID -func ValidateScheduleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseScheduleID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Schedule ID -func (id ScheduleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.LabServices/labs/%s/schedules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LabName, id.ScheduleName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Schedule ID -func (id ScheduleId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftLabServices", "Microsoft.LabServices", "Microsoft.LabServices"), - resourceids.StaticSegment("staticLabs", "labs", "labs"), - resourceids.UserSpecifiedSegment("labName", "labValue"), - resourceids.StaticSegment("staticSchedules", "schedules", "schedules"), - resourceids.UserSpecifiedSegment("scheduleName", "scheduleValue"), - } -} - -// String returns a human-readable description of this Schedule ID -func (id ScheduleId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Lab Name: %q", id.LabName), - fmt.Sprintf("Schedule Name: %q", id.ScheduleName), - } - return fmt.Sprintf("Schedule (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/method_createorupdate.go deleted file mode 100644 index 06f15c27d8eb0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/method_createorupdate.go +++ /dev/null @@ -1,59 +0,0 @@ -package schedule - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Schedule -} - -// CreateOrUpdate ... -func (c ScheduleClient) CreateOrUpdate(ctx context.Context, id ScheduleId, input Schedule) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Schedule - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/method_delete.go deleted file mode 100644 index dd45b55709c62..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package schedule - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ScheduleClient) Delete(ctx context.Context, id ScheduleId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ScheduleClient) DeleteThenPoll(ctx context.Context, id ScheduleId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/method_get.go deleted file mode 100644 index 1e138129113d9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/method_get.go +++ /dev/null @@ -1,54 +0,0 @@ -package schedule - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Schedule -} - -// Get ... -func (c ScheduleClient) Get(ctx context.Context, id ScheduleId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Schedule - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/method_listbylab.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/method_listbylab.go deleted file mode 100644 index 011f93903a9b6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/method_listbylab.go +++ /dev/null @@ -1,105 +0,0 @@ -package schedule - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByLabOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]Schedule -} - -type ListByLabCompleteResult struct { - LatestHttpResponse *http.Response - Items []Schedule -} - -type ListByLabCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListByLabCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListByLab ... -func (c ScheduleClient) ListByLab(ctx context.Context, id LabId) (result ListByLabOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListByLabCustomPager{}, - Path: fmt.Sprintf("%s/schedules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]Schedule `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByLabComplete retrieves all the results into a single object -func (c ScheduleClient) ListByLabComplete(ctx context.Context, id LabId) (ListByLabCompleteResult, error) { - return c.ListByLabCompleteMatchingPredicate(ctx, id, ScheduleOperationPredicate{}) -} - -// ListByLabCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ScheduleClient) ListByLabCompleteMatchingPredicate(ctx context.Context, id LabId, predicate ScheduleOperationPredicate) (result ListByLabCompleteResult, err error) { - items := make([]Schedule, 0) - - resp, err := c.ListByLab(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByLabCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/method_update.go deleted file mode 100644 index 66c00e47ea547..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/method_update.go +++ /dev/null @@ -1,58 +0,0 @@ -package schedule - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Schedule -} - -// Update ... -func (c ScheduleClient) Update(ctx context.Context, id ScheduleId, input ScheduleUpdate) (result UpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Schedule - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/model_recurrencepattern.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/model_recurrencepattern.go deleted file mode 100644 index b5f375906fe4f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/model_recurrencepattern.go +++ /dev/null @@ -1,26 +0,0 @@ -package schedule - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RecurrencePattern struct { - ExpirationDate string `json:"expirationDate"` - Frequency RecurrenceFrequency `json:"frequency"` - Interval *int64 `json:"interval,omitempty"` - WeekDays *[]WeekDay `json:"weekDays,omitempty"` -} - -func (o *RecurrencePattern) GetExpirationDateAsTime() (*time.Time, error) { - return dates.ParseAsFormat(&o.ExpirationDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *RecurrencePattern) SetExpirationDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ExpirationDate = formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/model_schedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/model_schedule.go deleted file mode 100644 index 810453634f1dd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/model_schedule.go +++ /dev/null @@ -1,16 +0,0 @@ -package schedule - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Schedule struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties ScheduleProperties `json:"properties"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/model_scheduleproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/model_scheduleproperties.go deleted file mode 100644 index 70d5ac850ed03..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/model_scheduleproperties.go +++ /dev/null @@ -1,43 +0,0 @@ -package schedule - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ScheduleProperties struct { - Notes *string `json:"notes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RecurrencePattern *RecurrencePattern `json:"recurrencePattern,omitempty"` - StartAt *string `json:"startAt,omitempty"` - StopAt *string `json:"stopAt,omitempty"` - TimeZoneId *string `json:"timeZoneId,omitempty"` -} - -func (o *ScheduleProperties) GetStartAtAsTime() (*time.Time, error) { - if o.StartAt == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartAt, "2006-01-02T15:04:05Z07:00") -} - -func (o *ScheduleProperties) SetStartAtAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartAt = &formatted -} - -func (o *ScheduleProperties) GetStopAtAsTime() (*time.Time, error) { - if o.StopAt == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StopAt, "2006-01-02T15:04:05Z07:00") -} - -func (o *ScheduleProperties) SetStopAtAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StopAt = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/model_scheduleupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/model_scheduleupdate.go deleted file mode 100644 index 57030b33d881f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/model_scheduleupdate.go +++ /dev/null @@ -1,8 +0,0 @@ -package schedule - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ScheduleUpdate struct { - Properties *ScheduleUpdateProperties `json:"properties,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/model_scheduleupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/model_scheduleupdateproperties.go deleted file mode 100644 index 3878a8e4f38b7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/model_scheduleupdateproperties.go +++ /dev/null @@ -1,42 +0,0 @@ -package schedule - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ScheduleUpdateProperties struct { - Notes *string `json:"notes,omitempty"` - RecurrencePattern *RecurrencePattern `json:"recurrencePattern,omitempty"` - StartAt *string `json:"startAt,omitempty"` - StopAt *string `json:"stopAt,omitempty"` - TimeZoneId *string `json:"timeZoneId,omitempty"` -} - -func (o *ScheduleUpdateProperties) GetStartAtAsTime() (*time.Time, error) { - if o.StartAt == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartAt, "2006-01-02T15:04:05Z07:00") -} - -func (o *ScheduleUpdateProperties) SetStartAtAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartAt = &formatted -} - -func (o *ScheduleUpdateProperties) GetStopAtAsTime() (*time.Time, error) { - if o.StopAt == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StopAt, "2006-01-02T15:04:05Z07:00") -} - -func (o *ScheduleUpdateProperties) SetStopAtAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StopAt = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/predicates.go deleted file mode 100644 index 77fa3780f493f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package schedule - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ScheduleOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p ScheduleOperationPredicate) Matches(input Schedule) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/version.go deleted file mode 100644 index 2c94464c64c15..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package schedule - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-08-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/schedule/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/README.md deleted file mode 100644 index 8ed39f1966b45..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/README.md +++ /dev/null @@ -1,116 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user` Documentation - -The `user` SDK allows for interaction with the Azure Resource Manager Service `labservices` (API Version `2022-08-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user" -``` - - -### Client Initialization - -```go -client := user.NewUserClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `UserClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := user.NewUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "userValue") - -payload := user.User{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `UserClient.Delete` - -```go -ctx := context.TODO() -id := user.NewUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "userValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `UserClient.Get` - -```go -ctx := context.TODO() -id := user.NewUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "userValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `UserClient.Invite` - -```go -ctx := context.TODO() -id := user.NewUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "userValue") - -payload := user.InviteBody{ - // ... -} - - -if err := client.InviteThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `UserClient.ListByLab` - -```go -ctx := context.TODO() -id := user.NewLabID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue") - -// alternatively `client.ListByLab(ctx, id)` can be used to do batched pagination -items, err := client.ListByLabComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `UserClient.Update` - -```go -ctx := context.TODO() -id := user.NewUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "userValue") - -payload := user.UserUpdate{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/client.go deleted file mode 100644 index 3d1a0eb8bf355..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package user - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UserClient struct { - Client *resourcemanager.Client -} - -func NewUserClientWithBaseURI(sdkApi sdkEnv.Api) (*UserClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "user", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating UserClient: %+v", err) - } - - return &UserClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/constants.go deleted file mode 100644 index e73edfaec7cef..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/constants.go +++ /dev/null @@ -1,151 +0,0 @@ -package user - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InvitationState string - -const ( - InvitationStateFailed InvitationState = "Failed" - InvitationStateNotSent InvitationState = "NotSent" - InvitationStateSending InvitationState = "Sending" - InvitationStateSent InvitationState = "Sent" -) - -func PossibleValuesForInvitationState() []string { - return []string{ - string(InvitationStateFailed), - string(InvitationStateNotSent), - string(InvitationStateSending), - string(InvitationStateSent), - } -} - -func (s *InvitationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseInvitationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseInvitationState(input string) (*InvitationState, error) { - vals := map[string]InvitationState{ - "failed": InvitationStateFailed, - "notsent": InvitationStateNotSent, - "sending": InvitationStateSending, - "sent": InvitationStateSent, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := InvitationState(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateCreating ProvisioningState = "Creating" - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateLocked ProvisioningState = "Locked" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateCreating), - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateLocked), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "creating": ProvisioningStateCreating, - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "locked": ProvisioningStateLocked, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type RegistrationState string - -const ( - RegistrationStateNotRegistered RegistrationState = "NotRegistered" - RegistrationStateRegistered RegistrationState = "Registered" -) - -func PossibleValuesForRegistrationState() []string { - return []string{ - string(RegistrationStateNotRegistered), - string(RegistrationStateRegistered), - } -} - -func (s *RegistrationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRegistrationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRegistrationState(input string) (*RegistrationState, error) { - vals := map[string]RegistrationState{ - "notregistered": RegistrationStateNotRegistered, - "registered": RegistrationStateRegistered, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RegistrationState(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/id_lab.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/id_lab.go deleted file mode 100644 index f2191ccecc936..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/id_lab.go +++ /dev/null @@ -1,130 +0,0 @@ -package user - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&LabId{}) -} - -var _ resourceids.ResourceId = &LabId{} - -// LabId is a struct representing the Resource ID for a Lab -type LabId struct { - SubscriptionId string - ResourceGroupName string - LabName string -} - -// NewLabID returns a new LabId struct -func NewLabID(subscriptionId string, resourceGroupName string, labName string) LabId { - return LabId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LabName: labName, - } -} - -// ParseLabID parses 'input' into a LabId -func ParseLabID(input string) (*LabId, error) { - parser := resourceids.NewParserFromResourceIdType(&LabId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseLabIDInsensitively parses 'input' case-insensitively into a LabId -// note: this method should only be used for API response data and not user input -func ParseLabIDInsensitively(input string) (*LabId, error) { - parser := resourceids.NewParserFromResourceIdType(&LabId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *LabId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.LabName, ok = input.Parsed["labName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "labName", input) - } - - return nil -} - -// ValidateLabID checks that 'input' can be parsed as a Lab ID -func ValidateLabID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLabID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Lab ID -func (id LabId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.LabServices/labs/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LabName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Lab ID -func (id LabId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftLabServices", "Microsoft.LabServices", "Microsoft.LabServices"), - resourceids.StaticSegment("staticLabs", "labs", "labs"), - resourceids.UserSpecifiedSegment("labName", "labValue"), - } -} - -// String returns a human-readable description of this Lab ID -func (id LabId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Lab Name: %q", id.LabName), - } - return fmt.Sprintf("Lab (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/id_user.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/id_user.go deleted file mode 100644 index b6e22f8bc587d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/id_user.go +++ /dev/null @@ -1,139 +0,0 @@ -package user - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&UserId{}) -} - -var _ resourceids.ResourceId = &UserId{} - -// UserId is a struct representing the Resource ID for a User -type UserId struct { - SubscriptionId string - ResourceGroupName string - LabName string - UserName string -} - -// NewUserID returns a new UserId struct -func NewUserID(subscriptionId string, resourceGroupName string, labName string, userName string) UserId { - return UserId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LabName: labName, - UserName: userName, - } -} - -// ParseUserID parses 'input' into a UserId -func ParseUserID(input string) (*UserId, error) { - parser := resourceids.NewParserFromResourceIdType(&UserId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseUserIDInsensitively parses 'input' case-insensitively into a UserId -// note: this method should only be used for API response data and not user input -func ParseUserIDInsensitively(input string) (*UserId, error) { - parser := resourceids.NewParserFromResourceIdType(&UserId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *UserId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.LabName, ok = input.Parsed["labName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "labName", input) - } - - if id.UserName, ok = input.Parsed["userName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "userName", input) - } - - return nil -} - -// ValidateUserID checks that 'input' can be parsed as a User ID -func ValidateUserID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseUserID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted User ID -func (id UserId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.LabServices/labs/%s/users/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LabName, id.UserName) -} - -// Segments returns a slice of Resource ID Segments which comprise this User ID -func (id UserId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftLabServices", "Microsoft.LabServices", "Microsoft.LabServices"), - resourceids.StaticSegment("staticLabs", "labs", "labs"), - resourceids.UserSpecifiedSegment("labName", "labValue"), - resourceids.StaticSegment("staticUsers", "users", "users"), - resourceids.UserSpecifiedSegment("userName", "userValue"), - } -} - -// String returns a human-readable description of this User ID -func (id UserId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Lab Name: %q", id.LabName), - fmt.Sprintf("User Name: %q", id.UserName), - } - return fmt.Sprintf("User (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/method_createorupdate.go deleted file mode 100644 index c5a0e023dbd07..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/method_createorupdate.go +++ /dev/null @@ -1,76 +0,0 @@ -package user - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *User -} - -// CreateOrUpdate ... -func (c UserClient) CreateOrUpdate(ctx context.Context, id UserId, input User) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c UserClient) CreateOrUpdateThenPoll(ctx context.Context, id UserId, input User) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/method_delete.go deleted file mode 100644 index 879b3a49beb9a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package user - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c UserClient) Delete(ctx context.Context, id UserId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c UserClient) DeleteThenPoll(ctx context.Context, id UserId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/method_get.go deleted file mode 100644 index e8a1c1d557f0b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/method_get.go +++ /dev/null @@ -1,54 +0,0 @@ -package user - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *User -} - -// Get ... -func (c UserClient) Get(ctx context.Context, id UserId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model User - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/method_invite.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/method_invite.go deleted file mode 100644 index f9f201663b1d3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/method_invite.go +++ /dev/null @@ -1,74 +0,0 @@ -package user - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InviteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Invite ... -func (c UserClient) Invite(ctx context.Context, id UserId, input InviteBody) (result InviteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/invite", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// InviteThenPoll performs Invite then polls until it's completed -func (c UserClient) InviteThenPoll(ctx context.Context, id UserId, input InviteBody) error { - result, err := c.Invite(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Invite: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Invite: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/method_listbylab.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/method_listbylab.go deleted file mode 100644 index ff8e3ab4d410d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/method_listbylab.go +++ /dev/null @@ -1,105 +0,0 @@ -package user - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByLabOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]User -} - -type ListByLabCompleteResult struct { - LatestHttpResponse *http.Response - Items []User -} - -type ListByLabCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListByLabCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListByLab ... -func (c UserClient) ListByLab(ctx context.Context, id LabId) (result ListByLabOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListByLabCustomPager{}, - Path: fmt.Sprintf("%s/users", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]User `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByLabComplete retrieves all the results into a single object -func (c UserClient) ListByLabComplete(ctx context.Context, id LabId) (ListByLabCompleteResult, error) { - return c.ListByLabCompleteMatchingPredicate(ctx, id, UserOperationPredicate{}) -} - -// ListByLabCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c UserClient) ListByLabCompleteMatchingPredicate(ctx context.Context, id LabId, predicate UserOperationPredicate) (result ListByLabCompleteResult, err error) { - items := make([]User, 0) - - resp, err := c.ListByLab(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByLabCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/method_update.go deleted file mode 100644 index 43712e07b097d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/method_update.go +++ /dev/null @@ -1,75 +0,0 @@ -package user - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *User -} - -// Update ... -func (c UserClient) Update(ctx context.Context, id UserId, input UserUpdate) (result UpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpdateThenPoll performs Update then polls until it's completed -func (c UserClient) UpdateThenPoll(ctx context.Context, id UserId, input UserUpdate) error { - result, err := c.Update(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Update: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Update: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/model_invitebody.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/model_invitebody.go deleted file mode 100644 index ee4e0b5e9d529..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/model_invitebody.go +++ /dev/null @@ -1,8 +0,0 @@ -package user - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InviteBody struct { - Text *string `json:"text,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/model_user.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/model_user.go deleted file mode 100644 index 4f9ffc6ed7e55..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/model_user.go +++ /dev/null @@ -1,16 +0,0 @@ -package user - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type User struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties UserProperties `json:"properties"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/model_userproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/model_userproperties.go deleted file mode 100644 index 317861cc9d7b0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/model_userproperties.go +++ /dev/null @@ -1,33 +0,0 @@ -package user - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UserProperties struct { - AdditionalUsageQuota *string `json:"additionalUsageQuota,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - Email string `json:"email"` - InvitationSent *string `json:"invitationSent,omitempty"` - InvitationState *InvitationState `json:"invitationState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RegistrationState *RegistrationState `json:"registrationState,omitempty"` - TotalUsage *string `json:"totalUsage,omitempty"` -} - -func (o *UserProperties) GetInvitationSentAsTime() (*time.Time, error) { - if o.InvitationSent == nil { - return nil, nil - } - return dates.ParseAsFormat(o.InvitationSent, "2006-01-02T15:04:05Z07:00") -} - -func (o *UserProperties) SetInvitationSentAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.InvitationSent = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/model_userupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/model_userupdate.go deleted file mode 100644 index fdf61da8e3dab..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/model_userupdate.go +++ /dev/null @@ -1,8 +0,0 @@ -package user - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UserUpdate struct { - Properties *UserUpdateProperties `json:"properties,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/model_userupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/model_userupdateproperties.go deleted file mode 100644 index e1853265a7f16..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/model_userupdateproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package user - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UserUpdateProperties struct { - AdditionalUsageQuota *string `json:"additionalUsageQuota,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/predicates.go deleted file mode 100644 index 6af39b3985af3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package user - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UserOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p UserOperationPredicate) Matches(input User) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/version.go deleted file mode 100644 index 7a67a5894cd31..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package user - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-08-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/user/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/README.md deleted file mode 100644 index e856ffb42e423..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/README.md +++ /dev/null @@ -1,160 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors` Documentation - -The `monitors` SDK allows for interaction with the Azure Resource Manager Service `logz` (API Version `2020-10-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors" -``` - - -### Client Initialization - -```go -client := monitors.NewMonitorsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `MonitorsClient.Create` - -```go -ctx := context.TODO() -id := monitors.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue") - -payload := monitors.LogzMonitorResource{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `MonitorsClient.Delete` - -```go -ctx := context.TODO() -id := monitors.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `MonitorsClient.Get` - -```go -ctx := context.TODO() -id := monitors.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `MonitorsClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `MonitorsClient.ListBySubscription` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination -items, err := client.ListBySubscriptionComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `MonitorsClient.ListMonitoredResources` - -```go -ctx := context.TODO() -id := monitors.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue") - -// alternatively `client.ListMonitoredResources(ctx, id)` can be used to do batched pagination -items, err := client.ListMonitoredResourcesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `MonitorsClient.ListUserRoles` - -```go -ctx := context.TODO() -id := monitors.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue") - -payload := monitors.UserRoleRequest{ - // ... -} - - -// alternatively `client.ListUserRoles(ctx, id, payload)` can be used to do batched pagination -items, err := client.ListUserRolesComplete(ctx, id, payload) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `MonitorsClient.Update` - -```go -ctx := context.TODO() -id := monitors.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue") - -payload := monitors.LogzMonitorResourceUpdateParameters{ - // ... -} - - -read, err := client.Update(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/client.go deleted file mode 100644 index 6a08c03de8b3b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package monitors - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MonitorsClient struct { - Client *resourcemanager.Client -} - -func NewMonitorsClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "monitors", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating MonitorsClient: %+v", err) - } - - return &MonitorsClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/constants.go deleted file mode 100644 index c4cd1530ff60c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/constants.go +++ /dev/null @@ -1,280 +0,0 @@ -package monitors - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiftrResourceCategories string - -const ( - LiftrResourceCategoriesMonitorLogs LiftrResourceCategories = "MonitorLogs" - LiftrResourceCategoriesUnknown LiftrResourceCategories = "Unknown" -) - -func PossibleValuesForLiftrResourceCategories() []string { - return []string{ - string(LiftrResourceCategoriesMonitorLogs), - string(LiftrResourceCategoriesUnknown), - } -} - -func (s *LiftrResourceCategories) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLiftrResourceCategories(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLiftrResourceCategories(input string) (*LiftrResourceCategories, error) { - vals := map[string]LiftrResourceCategories{ - "monitorlogs": LiftrResourceCategoriesMonitorLogs, - "unknown": LiftrResourceCategoriesUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LiftrResourceCategories(input) - return &out, nil -} - -type ManagedIdentityTypes string - -const ( - ManagedIdentityTypesSystemAssigned ManagedIdentityTypes = "SystemAssigned" - ManagedIdentityTypesUserAssigned ManagedIdentityTypes = "UserAssigned" -) - -func PossibleValuesForManagedIdentityTypes() []string { - return []string{ - string(ManagedIdentityTypesSystemAssigned), - string(ManagedIdentityTypesUserAssigned), - } -} - -func (s *ManagedIdentityTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseManagedIdentityTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseManagedIdentityTypes(input string) (*ManagedIdentityTypes, error) { - vals := map[string]ManagedIdentityTypes{ - "systemassigned": ManagedIdentityTypesSystemAssigned, - "userassigned": ManagedIdentityTypesUserAssigned, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ManagedIdentityTypes(input) - return &out, nil -} - -type MarketplaceSubscriptionStatus string - -const ( - MarketplaceSubscriptionStatusActive MarketplaceSubscriptionStatus = "Active" - MarketplaceSubscriptionStatusSuspended MarketplaceSubscriptionStatus = "Suspended" -) - -func PossibleValuesForMarketplaceSubscriptionStatus() []string { - return []string{ - string(MarketplaceSubscriptionStatusActive), - string(MarketplaceSubscriptionStatusSuspended), - } -} - -func (s *MarketplaceSubscriptionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMarketplaceSubscriptionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMarketplaceSubscriptionStatus(input string) (*MarketplaceSubscriptionStatus, error) { - vals := map[string]MarketplaceSubscriptionStatus{ - "active": MarketplaceSubscriptionStatusActive, - "suspended": MarketplaceSubscriptionStatusSuspended, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MarketplaceSubscriptionStatus(input) - return &out, nil -} - -type MonitoringStatus string - -const ( - MonitoringStatusDisabled MonitoringStatus = "Disabled" - MonitoringStatusEnabled MonitoringStatus = "Enabled" -) - -func PossibleValuesForMonitoringStatus() []string { - return []string{ - string(MonitoringStatusDisabled), - string(MonitoringStatusEnabled), - } -} - -func (s *MonitoringStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMonitoringStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMonitoringStatus(input string) (*MonitoringStatus, error) { - vals := map[string]MonitoringStatus{ - "disabled": MonitoringStatusDisabled, - "enabled": MonitoringStatusEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MonitoringStatus(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateAccepted ProvisioningState = "Accepted" - ProvisioningStateCanceled ProvisioningState = "Canceled" - ProvisioningStateCreating ProvisioningState = "Creating" - ProvisioningStateDeleted ProvisioningState = "Deleted" - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateNotSpecified ProvisioningState = "NotSpecified" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateAccepted), - string(ProvisioningStateCanceled), - string(ProvisioningStateCreating), - string(ProvisioningStateDeleted), - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateNotSpecified), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "accepted": ProvisioningStateAccepted, - "canceled": ProvisioningStateCanceled, - "creating": ProvisioningStateCreating, - "deleted": ProvisioningStateDeleted, - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "notspecified": ProvisioningStateNotSpecified, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type UserRole string - -const ( - UserRoleAdmin UserRole = "Admin" - UserRoleNone UserRole = "None" - UserRoleUser UserRole = "User" -) - -func PossibleValuesForUserRole() []string { - return []string{ - string(UserRoleAdmin), - string(UserRoleNone), - string(UserRoleUser), - } -} - -func (s *UserRole) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseUserRole(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseUserRole(input string) (*UserRole, error) { - vals := map[string]UserRole{ - "admin": UserRoleAdmin, - "none": UserRoleNone, - "user": UserRoleUser, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := UserRole(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/id_monitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/id_monitor.go deleted file mode 100644 index 8df6cb2ed07e8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/id_monitor.go +++ /dev/null @@ -1,130 +0,0 @@ -package monitors - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&MonitorId{}) -} - -var _ resourceids.ResourceId = &MonitorId{} - -// MonitorId is a struct representing the Resource ID for a Monitor -type MonitorId struct { - SubscriptionId string - ResourceGroupName string - MonitorName string -} - -// NewMonitorID returns a new MonitorId struct -func NewMonitorID(subscriptionId string, resourceGroupName string, monitorName string) MonitorId { - return MonitorId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MonitorName: monitorName, - } -} - -// ParseMonitorID parses 'input' into a MonitorId -func ParseMonitorID(input string) (*MonitorId, error) { - parser := resourceids.NewParserFromResourceIdType(&MonitorId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseMonitorIDInsensitively parses 'input' case-insensitively into a MonitorId -// note: this method should only be used for API response data and not user input -func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { - parser := resourceids.NewParserFromResourceIdType(&MonitorId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *MonitorId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) - } - - return nil -} - -// ValidateMonitorID checks that 'input' can be parsed as a Monitor ID -func ValidateMonitorID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMonitorID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Monitor ID -func (id MonitorId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logz/monitors/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MonitorName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Monitor ID -func (id MonitorId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftLogz", "Microsoft.Logz", "Microsoft.Logz"), - resourceids.StaticSegment("staticMonitors", "monitors", "monitors"), - resourceids.UserSpecifiedSegment("monitorName", "monitorValue"), - } -} - -// String returns a human-readable description of this Monitor ID -func (id MonitorId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Monitor Name: %q", id.MonitorName), - } - return fmt.Sprintf("Monitor (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/method_create.go deleted file mode 100644 index 0567f88258400..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/method_create.go +++ /dev/null @@ -1,75 +0,0 @@ -package monitors - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *LogzMonitorResource -} - -// Create ... -func (c MonitorsClient) Create(ctx context.Context, id MonitorId, input LogzMonitorResource) (result CreateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateThenPoll performs Create then polls until it's completed -func (c MonitorsClient) CreateThenPoll(ctx context.Context, id MonitorId, input LogzMonitorResource) error { - result, err := c.Create(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Create: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Create: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/method_delete.go deleted file mode 100644 index ed121cfa76fb6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package monitors - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c MonitorsClient) Delete(ctx context.Context, id MonitorId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c MonitorsClient) DeleteThenPoll(ctx context.Context, id MonitorId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/method_get.go deleted file mode 100644 index 1f62fb9716bd5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/method_get.go +++ /dev/null @@ -1,54 +0,0 @@ -package monitors - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *LogzMonitorResource -} - -// Get ... -func (c MonitorsClient) Get(ctx context.Context, id MonitorId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model LogzMonitorResource - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/method_listbyresourcegroup.go deleted file mode 100644 index 4487a242b998f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/method_listbyresourcegroup.go +++ /dev/null @@ -1,106 +0,0 @@ -package monitors - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]LogzMonitorResource -} - -type ListByResourceGroupCompleteResult struct { - LatestHttpResponse *http.Response - Items []LogzMonitorResource -} - -type ListByResourceGroupCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListByResourceGroup ... -func (c MonitorsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListByResourceGroupCustomPager{}, - Path: fmt.Sprintf("%s/providers/Microsoft.Logz/monitors", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]LogzMonitorResource `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c MonitorsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, LogzMonitorResourceOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c MonitorsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate LogzMonitorResourceOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]LogzMonitorResource, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/method_listbysubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/method_listbysubscription.go deleted file mode 100644 index c22f4eb515115..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/method_listbysubscription.go +++ /dev/null @@ -1,106 +0,0 @@ -package monitors - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListBySubscriptionOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]LogzMonitorResource -} - -type ListBySubscriptionCompleteResult struct { - LatestHttpResponse *http.Response - Items []LogzMonitorResource -} - -type ListBySubscriptionCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListBySubscriptionCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListBySubscription ... -func (c MonitorsClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListBySubscriptionCustomPager{}, - Path: fmt.Sprintf("%s/providers/Microsoft.Logz/monitors", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]LogzMonitorResource `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListBySubscriptionComplete retrieves all the results into a single object -func (c MonitorsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, LogzMonitorResourceOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c MonitorsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate LogzMonitorResourceOperationPredicate) (result ListBySubscriptionCompleteResult, err error) { - items := make([]LogzMonitorResource, 0) - - resp, err := c.ListBySubscription(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListBySubscriptionCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/method_listmonitoredresources.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/method_listmonitoredresources.go deleted file mode 100644 index d0bd5640be23b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/method_listmonitoredresources.go +++ /dev/null @@ -1,105 +0,0 @@ -package monitors - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListMonitoredResourcesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]MonitoredResource -} - -type ListMonitoredResourcesCompleteResult struct { - LatestHttpResponse *http.Response - Items []MonitoredResource -} - -type ListMonitoredResourcesCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListMonitoredResourcesCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListMonitoredResources ... -func (c MonitorsClient) ListMonitoredResources(ctx context.Context, id MonitorId) (result ListMonitoredResourcesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Pager: &ListMonitoredResourcesCustomPager{}, - Path: fmt.Sprintf("%s/listMonitoredResources", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]MonitoredResource `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListMonitoredResourcesComplete retrieves all the results into a single object -func (c MonitorsClient) ListMonitoredResourcesComplete(ctx context.Context, id MonitorId) (ListMonitoredResourcesCompleteResult, error) { - return c.ListMonitoredResourcesCompleteMatchingPredicate(ctx, id, MonitoredResourceOperationPredicate{}) -} - -// ListMonitoredResourcesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c MonitorsClient) ListMonitoredResourcesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoredResourceOperationPredicate) (result ListMonitoredResourcesCompleteResult, err error) { - items := make([]MonitoredResource, 0) - - resp, err := c.ListMonitoredResources(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListMonitoredResourcesCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/method_listuserroles.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/method_listuserroles.go deleted file mode 100644 index 8706ea14c1435..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/method_listuserroles.go +++ /dev/null @@ -1,105 +0,0 @@ -package monitors - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListUserRolesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]UserRoleResponse -} - -type ListUserRolesCompleteResult struct { - LatestHttpResponse *http.Response - Items []UserRoleResponse -} - -type ListUserRolesCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListUserRolesCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListUserRoles ... -func (c MonitorsClient) ListUserRoles(ctx context.Context, id MonitorId, input UserRoleRequest) (result ListUserRolesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Pager: &ListUserRolesCustomPager{}, - Path: fmt.Sprintf("%s/listUserRoles", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]UserRoleResponse `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListUserRolesComplete retrieves all the results into a single object -func (c MonitorsClient) ListUserRolesComplete(ctx context.Context, id MonitorId, input UserRoleRequest) (ListUserRolesCompleteResult, error) { - return c.ListUserRolesCompleteMatchingPredicate(ctx, id, input, UserRoleResponseOperationPredicate{}) -} - -// ListUserRolesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c MonitorsClient) ListUserRolesCompleteMatchingPredicate(ctx context.Context, id MonitorId, input UserRoleRequest, predicate UserRoleResponseOperationPredicate) (result ListUserRolesCompleteResult, err error) { - items := make([]UserRoleResponse, 0) - - resp, err := c.ListUserRoles(ctx, id, input) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListUserRolesCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/method_update.go deleted file mode 100644 index 3260f929156be..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/method_update.go +++ /dev/null @@ -1,58 +0,0 @@ -package monitors - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *LogzMonitorResource -} - -// Update ... -func (c MonitorsClient) Update(ctx context.Context, id MonitorId, input LogzMonitorResourceUpdateParameters) (result UpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model LogzMonitorResource - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_identityproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_identityproperties.go deleted file mode 100644 index fe9bba0fcd432..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_identityproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package monitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IdentityProperties struct { - PrincipalId *string `json:"principalId,omitempty"` - TenantId *string `json:"tenantId,omitempty"` - Type *ManagedIdentityTypes `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_logzmonitorresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_logzmonitorresource.go deleted file mode 100644 index 4fb37b1262c99..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_logzmonitorresource.go +++ /dev/null @@ -1,19 +0,0 @@ -package monitors - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LogzMonitorResource struct { - Id *string `json:"id,omitempty"` - Identity *IdentityProperties `json:"identity,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *MonitorProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_logzmonitorresourceupdateparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_logzmonitorresourceupdateparameters.go deleted file mode 100644 index 830e8f31a4247..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_logzmonitorresourceupdateparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package monitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LogzMonitorResourceUpdateParameters struct { - Properties *MonitorUpdateProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_logzorganizationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_logzorganizationproperties.go deleted file mode 100644 index 10f84fcdcc372..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_logzorganizationproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package monitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LogzOrganizationProperties struct { - CompanyName *string `json:"companyName,omitempty"` - EnterpriseAppId *string `json:"enterpriseAppId,omitempty"` - Id *string `json:"id,omitempty"` - SingleSignOnUrl *string `json:"singleSignOnUrl,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_monitoredresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_monitoredresource.go deleted file mode 100644 index 065846c750f0f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_monitoredresource.go +++ /dev/null @@ -1,17 +0,0 @@ -package monitors - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MonitoredResource struct { - Id *string `json:"id,omitempty"` - ReasonForLogsStatus *string `json:"reasonForLogsStatus,omitempty"` - ReasonForMetricsStatus *string `json:"reasonForMetricsStatus,omitempty"` - SendingLogs *bool `json:"sendingLogs,omitempty"` - SendingMetrics *bool `json:"sendingMetrics,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_monitorproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_monitorproperties.go deleted file mode 100644 index d6729416f413a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_monitorproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package monitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MonitorProperties struct { - LiftrResourceCategory *LiftrResourceCategories `json:"liftrResourceCategory,omitempty"` - LiftrResourcePreference *int64 `json:"liftrResourcePreference,omitempty"` - LogzOrganizationProperties *LogzOrganizationProperties `json:"logzOrganizationProperties,omitempty"` - MarketplaceSubscriptionStatus *MarketplaceSubscriptionStatus `json:"marketplaceSubscriptionStatus,omitempty"` - MonitoringStatus *MonitoringStatus `json:"monitoringStatus,omitempty"` - PlanData *PlanData `json:"planData,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - UserInfo *UserInfo `json:"userInfo,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_monitorupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_monitorupdateproperties.go deleted file mode 100644 index bfd77a7ece391..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_monitorupdateproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package monitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MonitorUpdateProperties struct { - MonitoringStatus *MonitoringStatus `json:"monitoringStatus,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_plandata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_plandata.go deleted file mode 100644 index 00c8e7373ed26..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_plandata.go +++ /dev/null @@ -1,29 +0,0 @@ -package monitors - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PlanData struct { - BillingCycle *string `json:"billingCycle,omitempty"` - EffectiveDate *string `json:"effectiveDate,omitempty"` - PlanDetails *string `json:"planDetails,omitempty"` - UsageType *string `json:"usageType,omitempty"` -} - -func (o *PlanData) GetEffectiveDateAsTime() (*time.Time, error) { - if o.EffectiveDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EffectiveDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *PlanData) SetEffectiveDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EffectiveDate = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_userinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_userinfo.go deleted file mode 100644 index b79ecbab14fa8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_userinfo.go +++ /dev/null @@ -1,11 +0,0 @@ -package monitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UserInfo struct { - EmailAddress *string `json:"emailAddress,omitempty"` - FirstName *string `json:"firstName,omitempty"` - LastName *string `json:"lastName,omitempty"` - PhoneNumber *string `json:"phoneNumber,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_userrolerequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_userrolerequest.go deleted file mode 100644 index 7b1a0c898bf03..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_userrolerequest.go +++ /dev/null @@ -1,8 +0,0 @@ -package monitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UserRoleRequest struct { - EmailAddress *string `json:"emailAddress,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_userroleresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_userroleresponse.go deleted file mode 100644 index 3b01f8b22aabf..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/model_userroleresponse.go +++ /dev/null @@ -1,8 +0,0 @@ -package monitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UserRoleResponse struct { - Role *UserRole `json:"role,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/predicates.go deleted file mode 100644 index c717fd40c2633..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/predicates.go +++ /dev/null @@ -1,73 +0,0 @@ -package monitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LogzMonitorResourceOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p LogzMonitorResourceOperationPredicate) Matches(input LogzMonitorResource) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type MonitoredResourceOperationPredicate struct { - Id *string - ReasonForLogsStatus *string - ReasonForMetricsStatus *string - SendingLogs *bool - SendingMetrics *bool -} - -func (p MonitoredResourceOperationPredicate) Matches(input MonitoredResource) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.ReasonForLogsStatus != nil && (input.ReasonForLogsStatus == nil || *p.ReasonForLogsStatus != *input.ReasonForLogsStatus) { - return false - } - - if p.ReasonForMetricsStatus != nil && (input.ReasonForMetricsStatus == nil || *p.ReasonForMetricsStatus != *input.ReasonForMetricsStatus) { - return false - } - - if p.SendingLogs != nil && (input.SendingLogs == nil || *p.SendingLogs != *input.SendingLogs) { - return false - } - - if p.SendingMetrics != nil && (input.SendingMetrics == nil || *p.SendingMetrics != *input.SendingMetrics) { - return false - } - - return true -} - -type UserRoleResponseOperationPredicate struct { -} - -func (p UserRoleResponseOperationPredicate) Matches(input UserRoleResponse) bool { - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/version.go deleted file mode 100644 index af69260d8363b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package monitors - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2020-10-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/monitors/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/README.md deleted file mode 100644 index 4fbef2743e341..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount` Documentation - -The `subaccount` SDK allows for interaction with the Azure Resource Manager Service `logz` (API Version `2020-10-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount" -``` - - -### Client Initialization - -```go -client := subaccount.NewSubAccountClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `SubAccountClient.Create` - -```go -ctx := context.TODO() -id := subaccount.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "accountValue") - -payload := subaccount.LogzMonitorResource{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `SubAccountClient.Delete` - -```go -ctx := context.TODO() -id := subaccount.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "accountValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `SubAccountClient.Get` - -```go -ctx := context.TODO() -id := subaccount.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "accountValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `SubAccountClient.List` - -```go -ctx := context.TODO() -id := subaccount.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `SubAccountClient.ListMonitoredResources` - -```go -ctx := context.TODO() -id := subaccount.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "accountValue") - -// alternatively `client.ListMonitoredResources(ctx, id)` can be used to do batched pagination -items, err := client.ListMonitoredResourcesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `SubAccountClient.Update` - -```go -ctx := context.TODO() -id := subaccount.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "accountValue") - -payload := subaccount.LogzMonitorResourceUpdateParameters{ - // ... -} - - -read, err := client.Update(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/client.go deleted file mode 100644 index 3d3807e5b0b7f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package subaccount - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubAccountClient struct { - Client *resourcemanager.Client -} - -func NewSubAccountClientWithBaseURI(sdkApi sdkEnv.Api) (*SubAccountClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subaccount", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating SubAccountClient: %+v", err) - } - - return &SubAccountClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/constants.go deleted file mode 100644 index a7097ddc03d39..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/constants.go +++ /dev/null @@ -1,236 +0,0 @@ -package subaccount - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiftrResourceCategories string - -const ( - LiftrResourceCategoriesMonitorLogs LiftrResourceCategories = "MonitorLogs" - LiftrResourceCategoriesUnknown LiftrResourceCategories = "Unknown" -) - -func PossibleValuesForLiftrResourceCategories() []string { - return []string{ - string(LiftrResourceCategoriesMonitorLogs), - string(LiftrResourceCategoriesUnknown), - } -} - -func (s *LiftrResourceCategories) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLiftrResourceCategories(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLiftrResourceCategories(input string) (*LiftrResourceCategories, error) { - vals := map[string]LiftrResourceCategories{ - "monitorlogs": LiftrResourceCategoriesMonitorLogs, - "unknown": LiftrResourceCategoriesUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LiftrResourceCategories(input) - return &out, nil -} - -type ManagedIdentityTypes string - -const ( - ManagedIdentityTypesSystemAssigned ManagedIdentityTypes = "SystemAssigned" - ManagedIdentityTypesUserAssigned ManagedIdentityTypes = "UserAssigned" -) - -func PossibleValuesForManagedIdentityTypes() []string { - return []string{ - string(ManagedIdentityTypesSystemAssigned), - string(ManagedIdentityTypesUserAssigned), - } -} - -func (s *ManagedIdentityTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseManagedIdentityTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseManagedIdentityTypes(input string) (*ManagedIdentityTypes, error) { - vals := map[string]ManagedIdentityTypes{ - "systemassigned": ManagedIdentityTypesSystemAssigned, - "userassigned": ManagedIdentityTypesUserAssigned, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ManagedIdentityTypes(input) - return &out, nil -} - -type MarketplaceSubscriptionStatus string - -const ( - MarketplaceSubscriptionStatusActive MarketplaceSubscriptionStatus = "Active" - MarketplaceSubscriptionStatusSuspended MarketplaceSubscriptionStatus = "Suspended" -) - -func PossibleValuesForMarketplaceSubscriptionStatus() []string { - return []string{ - string(MarketplaceSubscriptionStatusActive), - string(MarketplaceSubscriptionStatusSuspended), - } -} - -func (s *MarketplaceSubscriptionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMarketplaceSubscriptionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMarketplaceSubscriptionStatus(input string) (*MarketplaceSubscriptionStatus, error) { - vals := map[string]MarketplaceSubscriptionStatus{ - "active": MarketplaceSubscriptionStatusActive, - "suspended": MarketplaceSubscriptionStatusSuspended, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MarketplaceSubscriptionStatus(input) - return &out, nil -} - -type MonitoringStatus string - -const ( - MonitoringStatusDisabled MonitoringStatus = "Disabled" - MonitoringStatusEnabled MonitoringStatus = "Enabled" -) - -func PossibleValuesForMonitoringStatus() []string { - return []string{ - string(MonitoringStatusDisabled), - string(MonitoringStatusEnabled), - } -} - -func (s *MonitoringStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMonitoringStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMonitoringStatus(input string) (*MonitoringStatus, error) { - vals := map[string]MonitoringStatus{ - "disabled": MonitoringStatusDisabled, - "enabled": MonitoringStatusEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MonitoringStatus(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateAccepted ProvisioningState = "Accepted" - ProvisioningStateCanceled ProvisioningState = "Canceled" - ProvisioningStateCreating ProvisioningState = "Creating" - ProvisioningStateDeleted ProvisioningState = "Deleted" - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateNotSpecified ProvisioningState = "NotSpecified" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateAccepted), - string(ProvisioningStateCanceled), - string(ProvisioningStateCreating), - string(ProvisioningStateDeleted), - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateNotSpecified), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "accepted": ProvisioningStateAccepted, - "canceled": ProvisioningStateCanceled, - "creating": ProvisioningStateCreating, - "deleted": ProvisioningStateDeleted, - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "notspecified": ProvisioningStateNotSpecified, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/id_account.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/id_account.go deleted file mode 100644 index 2183d3b07e9dd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/id_account.go +++ /dev/null @@ -1,139 +0,0 @@ -package subaccount - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&AccountId{}) -} - -var _ resourceids.ResourceId = &AccountId{} - -// AccountId is a struct representing the Resource ID for a Account -type AccountId struct { - SubscriptionId string - ResourceGroupName string - MonitorName string - AccountName string -} - -// NewAccountID returns a new AccountId struct -func NewAccountID(subscriptionId string, resourceGroupName string, monitorName string, accountName string) AccountId { - return AccountId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MonitorName: monitorName, - AccountName: accountName, - } -} - -// ParseAccountID parses 'input' into a AccountId -func ParseAccountID(input string) (*AccountId, error) { - parser := resourceids.NewParserFromResourceIdType(&AccountId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseAccountIDInsensitively parses 'input' case-insensitively into a AccountId -// note: this method should only be used for API response data and not user input -func ParseAccountIDInsensitively(input string) (*AccountId, error) { - parser := resourceids.NewParserFromResourceIdType(&AccountId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *AccountId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) - } - - if id.AccountName, ok = input.Parsed["accountName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) - } - - return nil -} - -// ValidateAccountID checks that 'input' can be parsed as a Account ID -func ValidateAccountID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseAccountID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Account ID -func (id AccountId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logz/monitors/%s/accounts/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MonitorName, id.AccountName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Account ID -func (id AccountId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftLogz", "Microsoft.Logz", "Microsoft.Logz"), - resourceids.StaticSegment("staticMonitors", "monitors", "monitors"), - resourceids.UserSpecifiedSegment("monitorName", "monitorValue"), - resourceids.StaticSegment("staticAccounts", "accounts", "accounts"), - resourceids.UserSpecifiedSegment("accountName", "accountValue"), - } -} - -// String returns a human-readable description of this Account ID -func (id AccountId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Monitor Name: %q", id.MonitorName), - fmt.Sprintf("Account Name: %q", id.AccountName), - } - return fmt.Sprintf("Account (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/id_monitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/id_monitor.go deleted file mode 100644 index dea48a125b105..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/id_monitor.go +++ /dev/null @@ -1,130 +0,0 @@ -package subaccount - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&MonitorId{}) -} - -var _ resourceids.ResourceId = &MonitorId{} - -// MonitorId is a struct representing the Resource ID for a Monitor -type MonitorId struct { - SubscriptionId string - ResourceGroupName string - MonitorName string -} - -// NewMonitorID returns a new MonitorId struct -func NewMonitorID(subscriptionId string, resourceGroupName string, monitorName string) MonitorId { - return MonitorId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MonitorName: monitorName, - } -} - -// ParseMonitorID parses 'input' into a MonitorId -func ParseMonitorID(input string) (*MonitorId, error) { - parser := resourceids.NewParserFromResourceIdType(&MonitorId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseMonitorIDInsensitively parses 'input' case-insensitively into a MonitorId -// note: this method should only be used for API response data and not user input -func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { - parser := resourceids.NewParserFromResourceIdType(&MonitorId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *MonitorId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) - } - - return nil -} - -// ValidateMonitorID checks that 'input' can be parsed as a Monitor ID -func ValidateMonitorID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMonitorID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Monitor ID -func (id MonitorId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logz/monitors/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MonitorName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Monitor ID -func (id MonitorId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftLogz", "Microsoft.Logz", "Microsoft.Logz"), - resourceids.StaticSegment("staticMonitors", "monitors", "monitors"), - resourceids.UserSpecifiedSegment("monitorName", "monitorValue"), - } -} - -// String returns a human-readable description of this Monitor ID -func (id MonitorId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Monitor Name: %q", id.MonitorName), - } - return fmt.Sprintf("Monitor (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/method_create.go deleted file mode 100644 index 985e102e3aff8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/method_create.go +++ /dev/null @@ -1,75 +0,0 @@ -package subaccount - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *LogzMonitorResource -} - -// Create ... -func (c SubAccountClient) Create(ctx context.Context, id AccountId, input LogzMonitorResource) (result CreateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateThenPoll performs Create then polls until it's completed -func (c SubAccountClient) CreateThenPoll(ctx context.Context, id AccountId, input LogzMonitorResource) error { - result, err := c.Create(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Create: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Create: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/method_delete.go deleted file mode 100644 index 884cb2dcaaa67..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package subaccount - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c SubAccountClient) Delete(ctx context.Context, id AccountId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c SubAccountClient) DeleteThenPoll(ctx context.Context, id AccountId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/method_get.go deleted file mode 100644 index 3b13cf66542f7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/method_get.go +++ /dev/null @@ -1,54 +0,0 @@ -package subaccount - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *LogzMonitorResource -} - -// Get ... -func (c SubAccountClient) Get(ctx context.Context, id AccountId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model LogzMonitorResource - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/method_list.go deleted file mode 100644 index 6c6010d5b4bb5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/method_list.go +++ /dev/null @@ -1,105 +0,0 @@ -package subaccount - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]LogzMonitorResource -} - -type ListCompleteResult struct { - LatestHttpResponse *http.Response - Items []LogzMonitorResource -} - -type ListCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// List ... -func (c SubAccountClient) List(ctx context.Context, id MonitorId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListCustomPager{}, - Path: fmt.Sprintf("%s/accounts", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]LogzMonitorResource `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c SubAccountClient) ListComplete(ctx context.Context, id MonitorId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, LogzMonitorResourceOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c SubAccountClient) ListCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate LogzMonitorResourceOperationPredicate) (result ListCompleteResult, err error) { - items := make([]LogzMonitorResource, 0) - - resp, err := c.List(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/method_listmonitoredresources.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/method_listmonitoredresources.go deleted file mode 100644 index a16fbcab8af60..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/method_listmonitoredresources.go +++ /dev/null @@ -1,105 +0,0 @@ -package subaccount - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListMonitoredResourcesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]MonitoredResource -} - -type ListMonitoredResourcesCompleteResult struct { - LatestHttpResponse *http.Response - Items []MonitoredResource -} - -type ListMonitoredResourcesCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListMonitoredResourcesCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListMonitoredResources ... -func (c SubAccountClient) ListMonitoredResources(ctx context.Context, id AccountId) (result ListMonitoredResourcesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Pager: &ListMonitoredResourcesCustomPager{}, - Path: fmt.Sprintf("%s/listMonitoredResources", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]MonitoredResource `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListMonitoredResourcesComplete retrieves all the results into a single object -func (c SubAccountClient) ListMonitoredResourcesComplete(ctx context.Context, id AccountId) (ListMonitoredResourcesCompleteResult, error) { - return c.ListMonitoredResourcesCompleteMatchingPredicate(ctx, id, MonitoredResourceOperationPredicate{}) -} - -// ListMonitoredResourcesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c SubAccountClient) ListMonitoredResourcesCompleteMatchingPredicate(ctx context.Context, id AccountId, predicate MonitoredResourceOperationPredicate) (result ListMonitoredResourcesCompleteResult, err error) { - items := make([]MonitoredResource, 0) - - resp, err := c.ListMonitoredResources(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListMonitoredResourcesCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/method_update.go deleted file mode 100644 index a019c857ff28a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/method_update.go +++ /dev/null @@ -1,58 +0,0 @@ -package subaccount - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *LogzMonitorResource -} - -// Update ... -func (c SubAccountClient) Update(ctx context.Context, id AccountId, input LogzMonitorResourceUpdateParameters) (result UpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model LogzMonitorResource - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_identityproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_identityproperties.go deleted file mode 100644 index 43ab184ac0a73..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_identityproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package subaccount - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IdentityProperties struct { - PrincipalId *string `json:"principalId,omitempty"` - TenantId *string `json:"tenantId,omitempty"` - Type *ManagedIdentityTypes `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_logzmonitorresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_logzmonitorresource.go deleted file mode 100644 index 451d808a5c067..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_logzmonitorresource.go +++ /dev/null @@ -1,19 +0,0 @@ -package subaccount - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LogzMonitorResource struct { - Id *string `json:"id,omitempty"` - Identity *IdentityProperties `json:"identity,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *MonitorProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_logzmonitorresourceupdateparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_logzmonitorresourceupdateparameters.go deleted file mode 100644 index d895e26152290..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_logzmonitorresourceupdateparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package subaccount - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LogzMonitorResourceUpdateParameters struct { - Properties *MonitorUpdateProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_logzorganizationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_logzorganizationproperties.go deleted file mode 100644 index 34e13496e8311..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_logzorganizationproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package subaccount - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LogzOrganizationProperties struct { - CompanyName *string `json:"companyName,omitempty"` - EnterpriseAppId *string `json:"enterpriseAppId,omitempty"` - Id *string `json:"id,omitempty"` - SingleSignOnUrl *string `json:"singleSignOnUrl,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_monitoredresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_monitoredresource.go deleted file mode 100644 index 19fa9006c2c64..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_monitoredresource.go +++ /dev/null @@ -1,17 +0,0 @@ -package subaccount - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MonitoredResource struct { - Id *string `json:"id,omitempty"` - ReasonForLogsStatus *string `json:"reasonForLogsStatus,omitempty"` - ReasonForMetricsStatus *string `json:"reasonForMetricsStatus,omitempty"` - SendingLogs *bool `json:"sendingLogs,omitempty"` - SendingMetrics *bool `json:"sendingMetrics,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_monitorproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_monitorproperties.go deleted file mode 100644 index 61b2f2184953a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_monitorproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package subaccount - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MonitorProperties struct { - LiftrResourceCategory *LiftrResourceCategories `json:"liftrResourceCategory,omitempty"` - LiftrResourcePreference *int64 `json:"liftrResourcePreference,omitempty"` - LogzOrganizationProperties *LogzOrganizationProperties `json:"logzOrganizationProperties,omitempty"` - MarketplaceSubscriptionStatus *MarketplaceSubscriptionStatus `json:"marketplaceSubscriptionStatus,omitempty"` - MonitoringStatus *MonitoringStatus `json:"monitoringStatus,omitempty"` - PlanData *PlanData `json:"planData,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - UserInfo *UserInfo `json:"userInfo,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_monitorupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_monitorupdateproperties.go deleted file mode 100644 index 2672ca66ba5e1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_monitorupdateproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package subaccount - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MonitorUpdateProperties struct { - MonitoringStatus *MonitoringStatus `json:"monitoringStatus,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_plandata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_plandata.go deleted file mode 100644 index b1c5ebea255ef..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_plandata.go +++ /dev/null @@ -1,29 +0,0 @@ -package subaccount - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PlanData struct { - BillingCycle *string `json:"billingCycle,omitempty"` - EffectiveDate *string `json:"effectiveDate,omitempty"` - PlanDetails *string `json:"planDetails,omitempty"` - UsageType *string `json:"usageType,omitempty"` -} - -func (o *PlanData) GetEffectiveDateAsTime() (*time.Time, error) { - if o.EffectiveDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EffectiveDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *PlanData) SetEffectiveDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EffectiveDate = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_userinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_userinfo.go deleted file mode 100644 index 52461894fb111..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/model_userinfo.go +++ /dev/null @@ -1,11 +0,0 @@ -package subaccount - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UserInfo struct { - EmailAddress *string `json:"emailAddress,omitempty"` - FirstName *string `json:"firstName,omitempty"` - LastName *string `json:"lastName,omitempty"` - PhoneNumber *string `json:"phoneNumber,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/predicates.go deleted file mode 100644 index 70c789ddee26f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/predicates.go +++ /dev/null @@ -1,65 +0,0 @@ -package subaccount - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LogzMonitorResourceOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p LogzMonitorResourceOperationPredicate) Matches(input LogzMonitorResource) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type MonitoredResourceOperationPredicate struct { - Id *string - ReasonForLogsStatus *string - ReasonForMetricsStatus *string - SendingLogs *bool - SendingMetrics *bool -} - -func (p MonitoredResourceOperationPredicate) Matches(input MonitoredResource) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.ReasonForLogsStatus != nil && (input.ReasonForLogsStatus == nil || *p.ReasonForLogsStatus != *input.ReasonForLogsStatus) { - return false - } - - if p.ReasonForMetricsStatus != nil && (input.ReasonForMetricsStatus == nil || *p.ReasonForMetricsStatus != *input.ReasonForMetricsStatus) { - return false - } - - if p.SendingLogs != nil && (input.SendingLogs == nil || *p.SendingLogs != *input.SendingLogs) { - return false - } - - if p.SendingMetrics != nil && (input.SendingMetrics == nil || *p.SendingMetrics != *input.SendingMetrics) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/version.go deleted file mode 100644 index d5ba40446d0cf..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package subaccount - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2020-10-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subaccount/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/README.md deleted file mode 100644 index 3216eac35f876..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/README.md +++ /dev/null @@ -1,160 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules` Documentation - -The `tagrules` SDK allows for interaction with the Azure Resource Manager Service `logz` (API Version `2020-10-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules" -``` - - -### Client Initialization - -```go -client := tagrules.NewTagRulesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `TagRulesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := tagrules.NewTagRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "tagRuleValue") - -payload := tagrules.MonitoringTagRules{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `TagRulesClient.Delete` - -```go -ctx := context.TODO() -id := tagrules.NewTagRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "tagRuleValue") - -read, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `TagRulesClient.Get` - -```go -ctx := context.TODO() -id := tagrules.NewTagRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "tagRuleValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `TagRulesClient.List` - -```go -ctx := context.TODO() -id := tagrules.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `TagRulesClient.SubAccountTagRulesCreateOrUpdate` - -```go -ctx := context.TODO() -id := tagrules.NewAccountTagRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "accountValue", "tagRuleValue") - -payload := tagrules.MonitoringTagRules{ - // ... -} - - -read, err := client.SubAccountTagRulesCreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `TagRulesClient.SubAccountTagRulesDelete` - -```go -ctx := context.TODO() -id := tagrules.NewAccountTagRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "accountValue", "tagRuleValue") - -read, err := client.SubAccountTagRulesDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `TagRulesClient.SubAccountTagRulesGet` - -```go -ctx := context.TODO() -id := tagrules.NewAccountTagRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "accountValue", "tagRuleValue") - -read, err := client.SubAccountTagRulesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `TagRulesClient.SubAccountTagRulesList` - -```go -ctx := context.TODO() -id := tagrules.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "accountValue") - -// alternatively `client.SubAccountTagRulesList(ctx, id)` can be used to do batched pagination -items, err := client.SubAccountTagRulesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/client.go deleted file mode 100644 index e35a62f311620..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package tagrules - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagRulesClient struct { - Client *resourcemanager.Client -} - -func NewTagRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*TagRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tagrules", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating TagRulesClient: %+v", err) - } - - return &TagRulesClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/constants.go deleted file mode 100644 index 8ff2f663e0a04..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/constants.go +++ /dev/null @@ -1,113 +0,0 @@ -package tagrules - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateAccepted ProvisioningState = "Accepted" - ProvisioningStateCanceled ProvisioningState = "Canceled" - ProvisioningStateCreating ProvisioningState = "Creating" - ProvisioningStateDeleted ProvisioningState = "Deleted" - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateNotSpecified ProvisioningState = "NotSpecified" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateAccepted), - string(ProvisioningStateCanceled), - string(ProvisioningStateCreating), - string(ProvisioningStateDeleted), - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateNotSpecified), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "accepted": ProvisioningStateAccepted, - "canceled": ProvisioningStateCanceled, - "creating": ProvisioningStateCreating, - "deleted": ProvisioningStateDeleted, - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "notspecified": ProvisioningStateNotSpecified, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type TagAction string - -const ( - TagActionExclude TagAction = "Exclude" - TagActionInclude TagAction = "Include" -) - -func PossibleValuesForTagAction() []string { - return []string{ - string(TagActionExclude), - string(TagActionInclude), - } -} - -func (s *TagAction) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTagAction(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTagAction(input string) (*TagAction, error) { - vals := map[string]TagAction{ - "exclude": TagActionExclude, - "include": TagActionInclude, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TagAction(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_account.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_account.go deleted file mode 100644 index b997e958b6fdd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_account.go +++ /dev/null @@ -1,139 +0,0 @@ -package tagrules - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&AccountId{}) -} - -var _ resourceids.ResourceId = &AccountId{} - -// AccountId is a struct representing the Resource ID for a Account -type AccountId struct { - SubscriptionId string - ResourceGroupName string - MonitorName string - AccountName string -} - -// NewAccountID returns a new AccountId struct -func NewAccountID(subscriptionId string, resourceGroupName string, monitorName string, accountName string) AccountId { - return AccountId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MonitorName: monitorName, - AccountName: accountName, - } -} - -// ParseAccountID parses 'input' into a AccountId -func ParseAccountID(input string) (*AccountId, error) { - parser := resourceids.NewParserFromResourceIdType(&AccountId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseAccountIDInsensitively parses 'input' case-insensitively into a AccountId -// note: this method should only be used for API response data and not user input -func ParseAccountIDInsensitively(input string) (*AccountId, error) { - parser := resourceids.NewParserFromResourceIdType(&AccountId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *AccountId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) - } - - if id.AccountName, ok = input.Parsed["accountName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) - } - - return nil -} - -// ValidateAccountID checks that 'input' can be parsed as a Account ID -func ValidateAccountID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseAccountID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Account ID -func (id AccountId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logz/monitors/%s/accounts/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MonitorName, id.AccountName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Account ID -func (id AccountId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftLogz", "Microsoft.Logz", "Microsoft.Logz"), - resourceids.StaticSegment("staticMonitors", "monitors", "monitors"), - resourceids.UserSpecifiedSegment("monitorName", "monitorValue"), - resourceids.StaticSegment("staticAccounts", "accounts", "accounts"), - resourceids.UserSpecifiedSegment("accountName", "accountValue"), - } -} - -// String returns a human-readable description of this Account ID -func (id AccountId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Monitor Name: %q", id.MonitorName), - fmt.Sprintf("Account Name: %q", id.AccountName), - } - return fmt.Sprintf("Account (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_accounttagrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_accounttagrule.go deleted file mode 100644 index 4b9ee646d7b1e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_accounttagrule.go +++ /dev/null @@ -1,148 +0,0 @@ -package tagrules - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&AccountTagRuleId{}) -} - -var _ resourceids.ResourceId = &AccountTagRuleId{} - -// AccountTagRuleId is a struct representing the Resource ID for a Account Tag Rule -type AccountTagRuleId struct { - SubscriptionId string - ResourceGroupName string - MonitorName string - AccountName string - TagRuleName string -} - -// NewAccountTagRuleID returns a new AccountTagRuleId struct -func NewAccountTagRuleID(subscriptionId string, resourceGroupName string, monitorName string, accountName string, tagRuleName string) AccountTagRuleId { - return AccountTagRuleId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MonitorName: monitorName, - AccountName: accountName, - TagRuleName: tagRuleName, - } -} - -// ParseAccountTagRuleID parses 'input' into a AccountTagRuleId -func ParseAccountTagRuleID(input string) (*AccountTagRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(&AccountTagRuleId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := AccountTagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseAccountTagRuleIDInsensitively parses 'input' case-insensitively into a AccountTagRuleId -// note: this method should only be used for API response data and not user input -func ParseAccountTagRuleIDInsensitively(input string) (*AccountTagRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(&AccountTagRuleId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := AccountTagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *AccountTagRuleId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) - } - - if id.AccountName, ok = input.Parsed["accountName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) - } - - if id.TagRuleName, ok = input.Parsed["tagRuleName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "tagRuleName", input) - } - - return nil -} - -// ValidateAccountTagRuleID checks that 'input' can be parsed as a Account Tag Rule ID -func ValidateAccountTagRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseAccountTagRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Account Tag Rule ID -func (id AccountTagRuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logz/monitors/%s/accounts/%s/tagRules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MonitorName, id.AccountName, id.TagRuleName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Account Tag Rule ID -func (id AccountTagRuleId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftLogz", "Microsoft.Logz", "Microsoft.Logz"), - resourceids.StaticSegment("staticMonitors", "monitors", "monitors"), - resourceids.UserSpecifiedSegment("monitorName", "monitorValue"), - resourceids.StaticSegment("staticAccounts", "accounts", "accounts"), - resourceids.UserSpecifiedSegment("accountName", "accountValue"), - resourceids.StaticSegment("staticTagRules", "tagRules", "tagRules"), - resourceids.UserSpecifiedSegment("tagRuleName", "tagRuleValue"), - } -} - -// String returns a human-readable description of this Account Tag Rule ID -func (id AccountTagRuleId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Monitor Name: %q", id.MonitorName), - fmt.Sprintf("Account Name: %q", id.AccountName), - fmt.Sprintf("Tag Rule Name: %q", id.TagRuleName), - } - return fmt.Sprintf("Account Tag Rule (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_monitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_monitor.go deleted file mode 100644 index c74a094ad2fb8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_monitor.go +++ /dev/null @@ -1,130 +0,0 @@ -package tagrules - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&MonitorId{}) -} - -var _ resourceids.ResourceId = &MonitorId{} - -// MonitorId is a struct representing the Resource ID for a Monitor -type MonitorId struct { - SubscriptionId string - ResourceGroupName string - MonitorName string -} - -// NewMonitorID returns a new MonitorId struct -func NewMonitorID(subscriptionId string, resourceGroupName string, monitorName string) MonitorId { - return MonitorId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MonitorName: monitorName, - } -} - -// ParseMonitorID parses 'input' into a MonitorId -func ParseMonitorID(input string) (*MonitorId, error) { - parser := resourceids.NewParserFromResourceIdType(&MonitorId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseMonitorIDInsensitively parses 'input' case-insensitively into a MonitorId -// note: this method should only be used for API response data and not user input -func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { - parser := resourceids.NewParserFromResourceIdType(&MonitorId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *MonitorId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) - } - - return nil -} - -// ValidateMonitorID checks that 'input' can be parsed as a Monitor ID -func ValidateMonitorID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMonitorID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Monitor ID -func (id MonitorId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logz/monitors/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MonitorName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Monitor ID -func (id MonitorId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftLogz", "Microsoft.Logz", "Microsoft.Logz"), - resourceids.StaticSegment("staticMonitors", "monitors", "monitors"), - resourceids.UserSpecifiedSegment("monitorName", "monitorValue"), - } -} - -// String returns a human-readable description of this Monitor ID -func (id MonitorId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Monitor Name: %q", id.MonitorName), - } - return fmt.Sprintf("Monitor (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_tagrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_tagrule.go deleted file mode 100644 index 8cba88a0a18c1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_tagrule.go +++ /dev/null @@ -1,139 +0,0 @@ -package tagrules - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&TagRuleId{}) -} - -var _ resourceids.ResourceId = &TagRuleId{} - -// TagRuleId is a struct representing the Resource ID for a Tag Rule -type TagRuleId struct { - SubscriptionId string - ResourceGroupName string - MonitorName string - TagRuleName string -} - -// NewTagRuleID returns a new TagRuleId struct -func NewTagRuleID(subscriptionId string, resourceGroupName string, monitorName string, tagRuleName string) TagRuleId { - return TagRuleId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MonitorName: monitorName, - TagRuleName: tagRuleName, - } -} - -// ParseTagRuleID parses 'input' into a TagRuleId -func ParseTagRuleID(input string) (*TagRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(&TagRuleId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := TagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseTagRuleIDInsensitively parses 'input' case-insensitively into a TagRuleId -// note: this method should only be used for API response data and not user input -func ParseTagRuleIDInsensitively(input string) (*TagRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(&TagRuleId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := TagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *TagRuleId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) - } - - if id.TagRuleName, ok = input.Parsed["tagRuleName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "tagRuleName", input) - } - - return nil -} - -// ValidateTagRuleID checks that 'input' can be parsed as a Tag Rule ID -func ValidateTagRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseTagRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Tag Rule ID -func (id TagRuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logz/monitors/%s/tagRules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MonitorName, id.TagRuleName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Tag Rule ID -func (id TagRuleId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftLogz", "Microsoft.Logz", "Microsoft.Logz"), - resourceids.StaticSegment("staticMonitors", "monitors", "monitors"), - resourceids.UserSpecifiedSegment("monitorName", "monitorValue"), - resourceids.StaticSegment("staticTagRules", "tagRules", "tagRules"), - resourceids.UserSpecifiedSegment("tagRuleName", "tagRuleValue"), - } -} - -// String returns a human-readable description of this Tag Rule ID -func (id TagRuleId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Monitor Name: %q", id.MonitorName), - fmt.Sprintf("Tag Rule Name: %q", id.TagRuleName), - } - return fmt.Sprintf("Tag Rule (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/method_createorupdate.go deleted file mode 100644 index 7a148251af949..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/method_createorupdate.go +++ /dev/null @@ -1,58 +0,0 @@ -package tagrules - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *MonitoringTagRules -} - -// CreateOrUpdate ... -func (c TagRulesClient) CreateOrUpdate(ctx context.Context, id TagRuleId, input MonitoringTagRules) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model MonitoringTagRules - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/method_delete.go deleted file mode 100644 index 4dc23872c5619..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/method_delete.go +++ /dev/null @@ -1,48 +0,0 @@ -package tagrules - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c TagRulesClient) Delete(ctx context.Context, id TagRuleId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/method_get.go deleted file mode 100644 index 5158a77a9acce..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/method_get.go +++ /dev/null @@ -1,54 +0,0 @@ -package tagrules - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *MonitoringTagRules -} - -// Get ... -func (c TagRulesClient) Get(ctx context.Context, id TagRuleId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model MonitoringTagRules - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/method_list.go deleted file mode 100644 index 7a91120b4e372..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/method_list.go +++ /dev/null @@ -1,105 +0,0 @@ -package tagrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]MonitoringTagRules -} - -type ListCompleteResult struct { - LatestHttpResponse *http.Response - Items []MonitoringTagRules -} - -type ListCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// List ... -func (c TagRulesClient) List(ctx context.Context, id MonitorId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListCustomPager{}, - Path: fmt.Sprintf("%s/tagRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]MonitoringTagRules `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c TagRulesClient) ListComplete(ctx context.Context, id MonitorId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, MonitoringTagRulesOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c TagRulesClient) ListCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoringTagRulesOperationPredicate) (result ListCompleteResult, err error) { - items := make([]MonitoringTagRules, 0) - - resp, err := c.List(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/method_subaccounttagrulescreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/method_subaccounttagrulescreateorupdate.go deleted file mode 100644 index 4231e4b6f6781..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/method_subaccounttagrulescreateorupdate.go +++ /dev/null @@ -1,58 +0,0 @@ -package tagrules - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubAccountTagRulesCreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *MonitoringTagRules -} - -// SubAccountTagRulesCreateOrUpdate ... -func (c TagRulesClient) SubAccountTagRulesCreateOrUpdate(ctx context.Context, id AccountTagRuleId, input MonitoringTagRules) (result SubAccountTagRulesCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model MonitoringTagRules - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/method_subaccounttagrulesdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/method_subaccounttagrulesdelete.go deleted file mode 100644 index eaae465991a00..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/method_subaccounttagrulesdelete.go +++ /dev/null @@ -1,48 +0,0 @@ -package tagrules - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubAccountTagRulesDeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// SubAccountTagRulesDelete ... -func (c TagRulesClient) SubAccountTagRulesDelete(ctx context.Context, id AccountTagRuleId) (result SubAccountTagRulesDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/method_subaccounttagrulesget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/method_subaccounttagrulesget.go deleted file mode 100644 index daa5e8f70ffd9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/method_subaccounttagrulesget.go +++ /dev/null @@ -1,54 +0,0 @@ -package tagrules - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubAccountTagRulesGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *MonitoringTagRules -} - -// SubAccountTagRulesGet ... -func (c TagRulesClient) SubAccountTagRulesGet(ctx context.Context, id AccountTagRuleId) (result SubAccountTagRulesGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model MonitoringTagRules - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/method_subaccounttagruleslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/method_subaccounttagruleslist.go deleted file mode 100644 index 39485b0dd4a68..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/method_subaccounttagruleslist.go +++ /dev/null @@ -1,105 +0,0 @@ -package tagrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubAccountTagRulesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]MonitoringTagRules -} - -type SubAccountTagRulesListCompleteResult struct { - LatestHttpResponse *http.Response - Items []MonitoringTagRules -} - -type SubAccountTagRulesListCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *SubAccountTagRulesListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// SubAccountTagRulesList ... -func (c TagRulesClient) SubAccountTagRulesList(ctx context.Context, id AccountId) (result SubAccountTagRulesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &SubAccountTagRulesListCustomPager{}, - Path: fmt.Sprintf("%s/tagRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]MonitoringTagRules `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// SubAccountTagRulesListComplete retrieves all the results into a single object -func (c TagRulesClient) SubAccountTagRulesListComplete(ctx context.Context, id AccountId) (SubAccountTagRulesListCompleteResult, error) { - return c.SubAccountTagRulesListCompleteMatchingPredicate(ctx, id, MonitoringTagRulesOperationPredicate{}) -} - -// SubAccountTagRulesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c TagRulesClient) SubAccountTagRulesListCompleteMatchingPredicate(ctx context.Context, id AccountId, predicate MonitoringTagRulesOperationPredicate) (result SubAccountTagRulesListCompleteResult, err error) { - items := make([]MonitoringTagRules, 0) - - resp, err := c.SubAccountTagRulesList(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = SubAccountTagRulesListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/model_filteringtag.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/model_filteringtag.go deleted file mode 100644 index 13b1c7f0b877f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/model_filteringtag.go +++ /dev/null @@ -1,10 +0,0 @@ -package tagrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FilteringTag struct { - Action *TagAction `json:"action,omitempty"` - Name *string `json:"name,omitempty"` - Value *string `json:"value,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/model_logrules.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/model_logrules.go deleted file mode 100644 index 376b3049d1464..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/model_logrules.go +++ /dev/null @@ -1,11 +0,0 @@ -package tagrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LogRules struct { - FilteringTags *[]FilteringTag `json:"filteringTags,omitempty"` - SendAadLogs *bool `json:"sendAadLogs,omitempty"` - SendActivityLogs *bool `json:"sendActivityLogs,omitempty"` - SendSubscriptionLogs *bool `json:"sendSubscriptionLogs,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/model_monitoringtagrules.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/model_monitoringtagrules.go deleted file mode 100644 index d30479db23b36..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/model_monitoringtagrules.go +++ /dev/null @@ -1,16 +0,0 @@ -package tagrules - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MonitoringTagRules struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *MonitoringTagRulesProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/model_monitoringtagrulesproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/model_monitoringtagrulesproperties.go deleted file mode 100644 index 46e51999784b5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/model_monitoringtagrulesproperties.go +++ /dev/null @@ -1,14 +0,0 @@ -package tagrules - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MonitoringTagRulesProperties struct { - LogRules *LogRules `json:"logRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/predicates.go deleted file mode 100644 index a75bf2a34b315..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package tagrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MonitoringTagRulesOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p MonitoringTagRulesOperationPredicate) Matches(input MonitoringTagRules) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/version.go deleted file mode 100644 index 9423ce7d16fe5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package tagrules - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2020-10-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tagrules/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/README.md new file mode 100644 index 0000000000000..ae344feb0dfb7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/README.md @@ -0,0 +1,276 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups` Documentation + +The `managementgroups` SDK allows for interaction with the Azure Resource Manager Service `managementgroups` (API Version `2020-05-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups" +``` + + +### Client Initialization + +```go +client := managementgroups.NewManagementGroupsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ManagementGroupsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewManagementGroupID("groupIdValue") + +payload := managementgroups.CreateManagementGroupRequest{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload, managementgroups.DefaultCreateOrUpdateOperationOptions()); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagementGroupsClient.Delete` + +```go +ctx := context.TODO() +id := commonids.NewManagementGroupID("groupIdValue") + +if err := client.DeleteThenPoll(ctx, id, managementgroups.DefaultDeleteOperationOptions()); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagementGroupsClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewManagementGroupID("groupIdValue") + +read, err := client.Get(ctx, id, managementgroups.DefaultGetOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagementGroupsClient.GetDescendants` + +```go +ctx := context.TODO() +id := commonids.NewManagementGroupID("groupIdValue") + +// alternatively `client.GetDescendants(ctx, id, managementgroups.DefaultGetDescendantsOperationOptions())` can be used to do batched pagination +items, err := client.GetDescendantsComplete(ctx, id, managementgroups.DefaultGetDescendantsOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ManagementGroupsClient.HierarchySettingsCreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewManagementGroupID("groupIdValue") + +payload := managementgroups.CreateOrUpdateSettingsRequest{ + // ... +} + + +read, err := client.HierarchySettingsCreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagementGroupsClient.HierarchySettingsDelete` + +```go +ctx := context.TODO() +id := commonids.NewManagementGroupID("groupIdValue") + +read, err := client.HierarchySettingsDelete(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagementGroupsClient.HierarchySettingsGet` + +```go +ctx := context.TODO() +id := commonids.NewManagementGroupID("groupIdValue") + +read, err := client.HierarchySettingsGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagementGroupsClient.HierarchySettingsList` + +```go +ctx := context.TODO() +id := commonids.NewManagementGroupID("groupIdValue") + +read, err := client.HierarchySettingsList(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagementGroupsClient.HierarchySettingsUpdate` + +```go +ctx := context.TODO() +id := commonids.NewManagementGroupID("groupIdValue") + +payload := managementgroups.CreateOrUpdateSettingsRequest{ + // ... +} + + +read, err := client.HierarchySettingsUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagementGroupsClient.List` + +```go +ctx := context.TODO() + + +// alternatively `client.List(ctx, managementgroups.DefaultListOperationOptions())` can be used to do batched pagination +items, err := client.ListComplete(ctx, managementgroups.DefaultListOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ManagementGroupsClient.SubscriptionsCreate` + +```go +ctx := context.TODO() +id := managementgroups.NewSubscriptionID("groupIdValue", "12345678-1234-9876-4563-123456789012") + +read, err := client.SubscriptionsCreate(ctx, id, managementgroups.DefaultSubscriptionsCreateOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagementGroupsClient.SubscriptionsDelete` + +```go +ctx := context.TODO() +id := managementgroups.NewSubscriptionID("groupIdValue", "12345678-1234-9876-4563-123456789012") + +read, err := client.SubscriptionsDelete(ctx, id, managementgroups.DefaultSubscriptionsDeleteOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagementGroupsClient.SubscriptionsGetSubscription` + +```go +ctx := context.TODO() +id := managementgroups.NewSubscriptionID("groupIdValue", "12345678-1234-9876-4563-123456789012") + +read, err := client.SubscriptionsGetSubscription(ctx, id, managementgroups.DefaultSubscriptionsGetSubscriptionOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagementGroupsClient.SubscriptionsGetSubscriptionsUnderManagementGroup` + +```go +ctx := context.TODO() +id := commonids.NewManagementGroupID("groupIdValue") + +// alternatively `client.SubscriptionsGetSubscriptionsUnderManagementGroup(ctx, id)` can be used to do batched pagination +items, err := client.SubscriptionsGetSubscriptionsUnderManagementGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ManagementGroupsClient.Update` + +```go +ctx := context.TODO() +id := commonids.NewManagementGroupID("groupIdValue") + +payload := managementgroups.PatchManagementGroupRequest{ + // ... +} + + +read, err := client.Update(ctx, id, payload, managementgroups.DefaultUpdateOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/client.go new file mode 100644 index 0000000000000..732b46ac1a449 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/client.go @@ -0,0 +1,26 @@ +package managementgroups + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagementGroupsClient struct { + Client *resourcemanager.Client +} + +func NewManagementGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagementGroupsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managementgroups", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ManagementGroupsClient: %+v", err) + } + + return &ManagementGroupsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/constants.go new file mode 100644 index 0000000000000..fbb80a7495229 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/constants.go @@ -0,0 +1,92 @@ +package managementgroups + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Expand string + +const ( + ExpandChildren Expand = "children" + ExpandPath Expand = "path" +) + +func PossibleValuesForExpand() []string { + return []string{ + string(ExpandChildren), + string(ExpandPath), + } +} + +func (s *Expand) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseExpand(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseExpand(input string) (*Expand, error) { + vals := map[string]Expand{ + "children": ExpandChildren, + "path": ExpandPath, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Expand(input) + return &out, nil +} + +type ManagementGroupChildType string + +const ( + ManagementGroupChildTypeMicrosoftPointManagementManagementGroups ManagementGroupChildType = "Microsoft.Management/managementGroups" + ManagementGroupChildTypeSubscriptions ManagementGroupChildType = "/subscriptions" +) + +func PossibleValuesForManagementGroupChildType() []string { + return []string{ + string(ManagementGroupChildTypeMicrosoftPointManagementManagementGroups), + string(ManagementGroupChildTypeSubscriptions), + } +} + +func (s *ManagementGroupChildType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseManagementGroupChildType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseManagementGroupChildType(input string) (*ManagementGroupChildType, error) { + vals := map[string]ManagementGroupChildType{ + "microsoft.management/managementgroups": ManagementGroupChildTypeMicrosoftPointManagementManagementGroups, + "/subscriptions": ManagementGroupChildTypeSubscriptions, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ManagementGroupChildType(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/id_subscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/id_subscription.go new file mode 100644 index 0000000000000..6359734004cd0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/id_subscription.go @@ -0,0 +1,121 @@ +package managementgroups + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&SubscriptionId{}) +} + +var _ resourceids.ResourceId = &SubscriptionId{} + +// SubscriptionId is a struct representing the Resource ID for a Subscription +type SubscriptionId struct { + GroupId string + SubscriptionId string +} + +// NewSubscriptionID returns a new SubscriptionId struct +func NewSubscriptionID(groupId string, subscriptionId string) SubscriptionId { + return SubscriptionId{ + GroupId: groupId, + SubscriptionId: subscriptionId, + } +} + +// ParseSubscriptionID parses 'input' into a SubscriptionId +func ParseSubscriptionID(input string) (*SubscriptionId, error) { + parser := resourceids.NewParserFromResourceIdType(&SubscriptionId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := SubscriptionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseSubscriptionIDInsensitively parses 'input' case-insensitively into a SubscriptionId +// note: this method should only be used for API response data and not user input +func ParseSubscriptionIDInsensitively(input string) (*SubscriptionId, error) { + parser := resourceids.NewParserFromResourceIdType(&SubscriptionId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := SubscriptionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SubscriptionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.GroupId, ok = input.Parsed["groupId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "groupId", input) + } + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + return nil +} + +// ValidateSubscriptionID checks that 'input' can be parsed as a Subscription ID +func ValidateSubscriptionID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseSubscriptionID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Subscription ID +func (id SubscriptionId) ID() string { + fmtString := "/providers/Microsoft.Management/managementGroups/%s/subscriptions/%s" + return fmt.Sprintf(fmtString, id.GroupId, id.SubscriptionId) +} + +// Segments returns a slice of Resource ID Segments which comprise this Subscription ID +func (id SubscriptionId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftManagement", "Microsoft.Management", "Microsoft.Management"), + resourceids.StaticSegment("staticManagementGroups", "managementGroups", "managementGroups"), + resourceids.UserSpecifiedSegment("groupId", "groupIdValue"), + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + } +} + +// String returns a human-readable description of this Subscription ID +func (id SubscriptionId) String() string { + components := []string{ + fmt.Sprintf("Group: %q", id.GroupId), + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + } + return fmt.Sprintf("Subscription (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_createorupdate.go new file mode 100644 index 0000000000000..ca530041f6c8f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_createorupdate.go @@ -0,0 +1,104 @@ +package managementgroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ManagementGroup +} + +type CreateOrUpdateOperationOptions struct { + CacheControl *string +} + +func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions { + return CreateOrUpdateOperationOptions{} +} + +func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + if o.CacheControl != nil { + out.Append("Cache-Control", fmt.Sprintf("%v", *o.CacheControl)) + } + return &out +} + +func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o CreateOrUpdateOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + + return &out +} + +// CreateOrUpdate ... +func (c ManagementGroupsClient) CreateOrUpdate(ctx context.Context, id commonids.ManagementGroupId, input CreateManagementGroupRequest, options CreateOrUpdateOperationOptions) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + OptionsObject: options, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c ManagementGroupsClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.ManagementGroupId, input CreateManagementGroupRequest, options CreateOrUpdateOperationOptions) error { + result, err := c.CreateOrUpdate(ctx, id, input, options) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_delete.go new file mode 100644 index 0000000000000..033a72547c17f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_delete.go @@ -0,0 +1,100 @@ +package managementgroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *AzureAsyncOperationResults +} + +type DeleteOperationOptions struct { + CacheControl *string +} + +func DefaultDeleteOperationOptions() DeleteOperationOptions { + return DeleteOperationOptions{} +} + +func (o DeleteOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + if o.CacheControl != nil { + out.Append("Cache-Control", fmt.Sprintf("%v", *o.CacheControl)) + } + return &out +} + +func (o DeleteOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o DeleteOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + + return &out +} + +// Delete ... +func (c ManagementGroupsClient) Delete(ctx context.Context, id commonids.ManagementGroupId, options DeleteOperationOptions) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + }, + HttpMethod: http.MethodDelete, + OptionsObject: options, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c ManagementGroupsClient) DeleteThenPoll(ctx context.Context, id commonids.ManagementGroupId, options DeleteOperationOptions) error { + result, err := c.Delete(ctx, id, options) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_get.go new file mode 100644 index 0000000000000..87fb2a218bc18 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_get.go @@ -0,0 +1,95 @@ +package managementgroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ManagementGroup +} + +type GetOperationOptions struct { + CacheControl *string + Expand *Expand + Filter *string + Recurse *bool +} + +func DefaultGetOperationOptions() GetOperationOptions { + return GetOperationOptions{} +} + +func (o GetOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + if o.CacheControl != nil { + out.Append("Cache-Control", fmt.Sprintf("%v", *o.CacheControl)) + } + return &out +} + +func (o GetOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o GetOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.Expand != nil { + out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) + } + if o.Filter != nil { + out.Append("$filter", fmt.Sprintf("%v", *o.Filter)) + } + if o.Recurse != nil { + out.Append("$recurse", fmt.Sprintf("%v", *o.Recurse)) + } + return &out +} + +// Get ... +func (c ManagementGroupsClient) Get(ctx context.Context, id commonids.ManagementGroupId, options GetOperationOptions) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ManagementGroup + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_getdescendants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_getdescendants.go new file mode 100644 index 0000000000000..aa6a5c1461669 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_getdescendants.go @@ -0,0 +1,134 @@ +package managementgroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetDescendantsOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]DescendantInfo +} + +type GetDescendantsCompleteResult struct { + LatestHttpResponse *http.Response + Items []DescendantInfo +} + +type GetDescendantsOperationOptions struct { + Top *int64 +} + +func DefaultGetDescendantsOperationOptions() GetDescendantsOperationOptions { + return GetDescendantsOperationOptions{} +} + +func (o GetDescendantsOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o GetDescendantsOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o GetDescendantsOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.Top != nil { + out.Append("$top", fmt.Sprintf("%v", *o.Top)) + } + return &out +} + +type GetDescendantsCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *GetDescendantsCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// GetDescendants ... +func (c ManagementGroupsClient) GetDescendants(ctx context.Context, id commonids.ManagementGroupId, options GetDescendantsOperationOptions) (result GetDescendantsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Pager: &GetDescendantsCustomPager{}, + Path: fmt.Sprintf("%s/descendants", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]DescendantInfo `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// GetDescendantsComplete retrieves all the results into a single object +func (c ManagementGroupsClient) GetDescendantsComplete(ctx context.Context, id commonids.ManagementGroupId, options GetDescendantsOperationOptions) (GetDescendantsCompleteResult, error) { + return c.GetDescendantsCompleteMatchingPredicate(ctx, id, options, DescendantInfoOperationPredicate{}) +} + +// GetDescendantsCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ManagementGroupsClient) GetDescendantsCompleteMatchingPredicate(ctx context.Context, id commonids.ManagementGroupId, options GetDescendantsOperationOptions, predicate DescendantInfoOperationPredicate) (result GetDescendantsCompleteResult, err error) { + items := make([]DescendantInfo, 0) + + resp, err := c.GetDescendants(ctx, id, options) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = GetDescendantsCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingscreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingscreateorupdate.go new file mode 100644 index 0000000000000..3f1794604e578 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingscreateorupdate.go @@ -0,0 +1,60 @@ +package managementgroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HierarchySettingsCreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *HierarchySettings +} + +// HierarchySettingsCreateOrUpdate ... +func (c ManagementGroupsClient) HierarchySettingsCreateOrUpdate(ctx context.Context, id commonids.ManagementGroupId, input CreateOrUpdateSettingsRequest) (result HierarchySettingsCreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: fmt.Sprintf("%s/settings/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model HierarchySettings + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingsdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingsdelete.go new file mode 100644 index 0000000000000..2927e428a0dbb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingsdelete.go @@ -0,0 +1,48 @@ +package managementgroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HierarchySettingsDeleteOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData +} + +// HierarchySettingsDelete ... +func (c ManagementGroupsClient) HierarchySettingsDelete(ctx context.Context, id commonids.ManagementGroupId) (result HierarchySettingsDeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: fmt.Sprintf("%s/settings/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingsget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingsget.go new file mode 100644 index 0000000000000..bb7c557f1fe8e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingsget.go @@ -0,0 +1,56 @@ +package managementgroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HierarchySettingsGetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *HierarchySettings +} + +// HierarchySettingsGet ... +func (c ManagementGroupsClient) HierarchySettingsGet(ctx context.Context, id commonids.ManagementGroupId) (result HierarchySettingsGetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/settings/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model HierarchySettings + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingslist.go new file mode 100644 index 0000000000000..038617f4220ea --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingslist.go @@ -0,0 +1,56 @@ +package managementgroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HierarchySettingsListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *HierarchySettingsList +} + +// HierarchySettingsList ... +func (c ManagementGroupsClient) HierarchySettingsList(ctx context.Context, id commonids.ManagementGroupId) (result HierarchySettingsListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/settings", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model HierarchySettingsList + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingsupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingsupdate.go new file mode 100644 index 0000000000000..6b7e694b1560c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingsupdate.go @@ -0,0 +1,60 @@ +package managementgroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HierarchySettingsUpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *HierarchySettings +} + +// HierarchySettingsUpdate ... +func (c ManagementGroupsClient) HierarchySettingsUpdate(ctx context.Context, id commonids.ManagementGroupId, input CreateOrUpdateSettingsRequest) (result HierarchySettingsUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: fmt.Sprintf("%s/settings/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model HierarchySettings + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_list.go new file mode 100644 index 0000000000000..c9660c8df44a2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_list.go @@ -0,0 +1,133 @@ +package managementgroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ManagementGroupInfo +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []ManagementGroupInfo +} + +type ListOperationOptions struct { + CacheControl *string +} + +func DefaultListOperationOptions() ListOperationOptions { + return ListOperationOptions{} +} + +func (o ListOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + if o.CacheControl != nil { + out.Append("Cache-Control", fmt.Sprintf("%v", *o.CacheControl)) + } + return &out +} + +func (o ListOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o ListOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + + return &out +} + +type ListCustomPager struct { + NextLink *odata.Link `json:"@nextLink"` +} + +func (p *ListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// List ... +func (c ManagementGroupsClient) List(ctx context.Context, options ListOperationOptions) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Pager: &ListCustomPager{}, + Path: "/providers/Microsoft.Management/managementGroups", + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ManagementGroupInfo `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c ManagementGroupsClient) ListComplete(ctx context.Context, options ListOperationOptions) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, options, ManagementGroupInfoOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ManagementGroupsClient) ListCompleteMatchingPredicate(ctx context.Context, options ListOperationOptions, predicate ManagementGroupInfoOperationPredicate) (result ListCompleteResult, err error) { + items := make([]ManagementGroupInfo, 0) + + resp, err := c.List(ctx, options) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionscreate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionscreate.go new file mode 100644 index 0000000000000..66afbb5c1494b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionscreate.go @@ -0,0 +1,83 @@ +package managementgroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SubscriptionsCreateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *SubscriptionUnderManagementGroup +} + +type SubscriptionsCreateOperationOptions struct { + CacheControl *string +} + +func DefaultSubscriptionsCreateOperationOptions() SubscriptionsCreateOperationOptions { + return SubscriptionsCreateOperationOptions{} +} + +func (o SubscriptionsCreateOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + if o.CacheControl != nil { + out.Append("Cache-Control", fmt.Sprintf("%v", *o.CacheControl)) + } + return &out +} + +func (o SubscriptionsCreateOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o SubscriptionsCreateOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + + return &out +} + +// SubscriptionsCreate ... +func (c ManagementGroupsClient) SubscriptionsCreate(ctx context.Context, id SubscriptionId, options SubscriptionsCreateOperationOptions) (result SubscriptionsCreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPut, + OptionsObject: options, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model SubscriptionUnderManagementGroup + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionsdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionsdelete.go new file mode 100644 index 0000000000000..36eb415e70974 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionsdelete.go @@ -0,0 +1,76 @@ +package managementgroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SubscriptionsDeleteOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData +} + +type SubscriptionsDeleteOperationOptions struct { + CacheControl *string +} + +func DefaultSubscriptionsDeleteOperationOptions() SubscriptionsDeleteOperationOptions { + return SubscriptionsDeleteOperationOptions{} +} + +func (o SubscriptionsDeleteOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + if o.CacheControl != nil { + out.Append("Cache-Control", fmt.Sprintf("%v", *o.CacheControl)) + } + return &out +} + +func (o SubscriptionsDeleteOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o SubscriptionsDeleteOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + + return &out +} + +// SubscriptionsDelete ... +func (c ManagementGroupsClient) SubscriptionsDelete(ctx context.Context, id SubscriptionId, options SubscriptionsDeleteOperationOptions) (result SubscriptionsDeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + OptionsObject: options, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionsgetsubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionsgetsubscription.go new file mode 100644 index 0000000000000..ff3ac1f4ec0de --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionsgetsubscription.go @@ -0,0 +1,83 @@ +package managementgroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SubscriptionsGetSubscriptionOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *SubscriptionUnderManagementGroup +} + +type SubscriptionsGetSubscriptionOperationOptions struct { + CacheControl *string +} + +func DefaultSubscriptionsGetSubscriptionOperationOptions() SubscriptionsGetSubscriptionOperationOptions { + return SubscriptionsGetSubscriptionOperationOptions{} +} + +func (o SubscriptionsGetSubscriptionOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + if o.CacheControl != nil { + out.Append("Cache-Control", fmt.Sprintf("%v", *o.CacheControl)) + } + return &out +} + +func (o SubscriptionsGetSubscriptionOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o SubscriptionsGetSubscriptionOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + + return &out +} + +// SubscriptionsGetSubscription ... +func (c ManagementGroupsClient) SubscriptionsGetSubscription(ctx context.Context, id SubscriptionId, options SubscriptionsGetSubscriptionOperationOptions) (result SubscriptionsGetSubscriptionOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model SubscriptionUnderManagementGroup + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionsgetsubscriptionsundermanagementgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionsgetsubscriptionsundermanagementgroup.go new file mode 100644 index 0000000000000..7845486b2765a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionsgetsubscriptionsundermanagementgroup.go @@ -0,0 +1,106 @@ +package managementgroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SubscriptionsGetSubscriptionsUnderManagementGroupOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]SubscriptionUnderManagementGroup +} + +type SubscriptionsGetSubscriptionsUnderManagementGroupCompleteResult struct { + LatestHttpResponse *http.Response + Items []SubscriptionUnderManagementGroup +} + +type SubscriptionsGetSubscriptionsUnderManagementGroupCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *SubscriptionsGetSubscriptionsUnderManagementGroupCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// SubscriptionsGetSubscriptionsUnderManagementGroup ... +func (c ManagementGroupsClient) SubscriptionsGetSubscriptionsUnderManagementGroup(ctx context.Context, id commonids.ManagementGroupId) (result SubscriptionsGetSubscriptionsUnderManagementGroupOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &SubscriptionsGetSubscriptionsUnderManagementGroupCustomPager{}, + Path: fmt.Sprintf("%s/subscriptions", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]SubscriptionUnderManagementGroup `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// SubscriptionsGetSubscriptionsUnderManagementGroupComplete retrieves all the results into a single object +func (c ManagementGroupsClient) SubscriptionsGetSubscriptionsUnderManagementGroupComplete(ctx context.Context, id commonids.ManagementGroupId) (SubscriptionsGetSubscriptionsUnderManagementGroupCompleteResult, error) { + return c.SubscriptionsGetSubscriptionsUnderManagementGroupCompleteMatchingPredicate(ctx, id, SubscriptionUnderManagementGroupOperationPredicate{}) +} + +// SubscriptionsGetSubscriptionsUnderManagementGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ManagementGroupsClient) SubscriptionsGetSubscriptionsUnderManagementGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ManagementGroupId, predicate SubscriptionUnderManagementGroupOperationPredicate) (result SubscriptionsGetSubscriptionsUnderManagementGroupCompleteResult, err error) { + items := make([]SubscriptionUnderManagementGroup, 0) + + resp, err := c.SubscriptionsGetSubscriptionsUnderManagementGroup(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = SubscriptionsGetSubscriptionsUnderManagementGroupCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_update.go new file mode 100644 index 0000000000000..f730bbb607ede --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/method_update.go @@ -0,0 +1,88 @@ +package managementgroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ManagementGroup +} + +type UpdateOperationOptions struct { + CacheControl *string +} + +func DefaultUpdateOperationOptions() UpdateOperationOptions { + return UpdateOperationOptions{} +} + +func (o UpdateOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + if o.CacheControl != nil { + out.Append("Cache-Control", fmt.Sprintf("%v", *o.CacheControl)) + } + return &out +} + +func (o UpdateOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o UpdateOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + + return &out +} + +// Update ... +func (c ManagementGroupsClient) Update(ctx context.Context, id commonids.ManagementGroupId, input PatchManagementGroupRequest, options UpdateOperationOptions) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + OptionsObject: options, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ManagementGroup + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_azureasyncoperationresults.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_azureasyncoperationresults.go new file mode 100644 index 0000000000000..7b6662273600c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_azureasyncoperationresults.go @@ -0,0 +1,12 @@ +package managementgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureAsyncOperationResults struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ManagementGroupInfoProperties `json:"properties,omitempty"` + Status *string `json:"status,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_createmanagementgroupchildinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_createmanagementgroupchildinfo.go new file mode 100644 index 0000000000000..cad7e9197be7f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_createmanagementgroupchildinfo.go @@ -0,0 +1,12 @@ +package managementgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateManagementGroupChildInfo struct { + Children *[]CreateManagementGroupChildInfo `json:"children,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *ManagementGroupChildType `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_createmanagementgroupdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_createmanagementgroupdetails.go new file mode 100644 index 0000000000000..310a2b87b356a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_createmanagementgroupdetails.go @@ -0,0 +1,29 @@ +package managementgroups + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateManagementGroupDetails struct { + Parent *CreateParentGroupInfo `json:"parent,omitempty"` + UpdatedBy *string `json:"updatedBy,omitempty"` + UpdatedTime *string `json:"updatedTime,omitempty"` + Version *float64 `json:"version,omitempty"` +} + +func (o *CreateManagementGroupDetails) GetUpdatedTimeAsTime() (*time.Time, error) { + if o.UpdatedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.UpdatedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *CreateManagementGroupDetails) SetUpdatedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.UpdatedTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_createmanagementgroupproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_createmanagementgroupproperties.go new file mode 100644 index 0000000000000..8c6ea42250f60 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_createmanagementgroupproperties.go @@ -0,0 +1,11 @@ +package managementgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateManagementGroupProperties struct { + Children *[]CreateManagementGroupChildInfo `json:"children,omitempty"` + Details *CreateManagementGroupDetails `json:"details,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + TenantId *string `json:"tenantId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_createmanagementgrouprequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_createmanagementgrouprequest.go new file mode 100644 index 0000000000000..b8103f9d93c34 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_createmanagementgrouprequest.go @@ -0,0 +1,11 @@ +package managementgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateManagementGroupRequest struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *CreateManagementGroupProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_createorupdatesettingsproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_createorupdatesettingsproperties.go new file mode 100644 index 0000000000000..54fe1d49b1d34 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_createorupdatesettingsproperties.go @@ -0,0 +1,9 @@ +package managementgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateSettingsProperties struct { + DefaultManagementGroup *string `json:"defaultManagementGroup,omitempty"` + RequireAuthorizationForGroupCreation *bool `json:"requireAuthorizationForGroupCreation,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_createorupdatesettingsrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_createorupdatesettingsrequest.go new file mode 100644 index 0000000000000..d4d600ef0b87e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_createorupdatesettingsrequest.go @@ -0,0 +1,8 @@ +package managementgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateSettingsRequest struct { + Properties *CreateOrUpdateSettingsProperties `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_createparentgroupinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_createparentgroupinfo.go new file mode 100644 index 0000000000000..930bf409bc786 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_createparentgroupinfo.go @@ -0,0 +1,10 @@ +package managementgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateParentGroupInfo struct { + DisplayName *string `json:"displayName,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_descendantinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_descendantinfo.go new file mode 100644 index 0000000000000..80d5f6519f601 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_descendantinfo.go @@ -0,0 +1,11 @@ +package managementgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DescendantInfo struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *DescendantInfoProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_descendantinfoproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_descendantinfoproperties.go new file mode 100644 index 0000000000000..828513c36698e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_descendantinfoproperties.go @@ -0,0 +1,9 @@ +package managementgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DescendantInfoProperties struct { + DisplayName *string `json:"displayName,omitempty"` + Parent *DescendantParentGroupInfo `json:"parent,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_descendantparentgroupinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_descendantparentgroupinfo.go new file mode 100644 index 0000000000000..fb721e9d5c651 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_descendantparentgroupinfo.go @@ -0,0 +1,8 @@ +package managementgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DescendantParentGroupInfo struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_hierarchysettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_hierarchysettings.go new file mode 100644 index 0000000000000..6f9a61f2cf79d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_hierarchysettings.go @@ -0,0 +1,11 @@ +package managementgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HierarchySettings struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *HierarchySettingsProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_hierarchysettingsinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_hierarchysettingsinfo.go new file mode 100644 index 0000000000000..61a337b299e4e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_hierarchysettingsinfo.go @@ -0,0 +1,11 @@ +package managementgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HierarchySettingsInfo struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *HierarchySettingsProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_hierarchysettingslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_hierarchysettingslist.go new file mode 100644 index 0000000000000..d9f9b853a411a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_hierarchysettingslist.go @@ -0,0 +1,9 @@ +package managementgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HierarchySettingsList struct { + NextLink *string `json:"@nextLink,omitempty"` + Value *[]HierarchySettingsInfo `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_hierarchysettingsproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_hierarchysettingsproperties.go new file mode 100644 index 0000000000000..25e8886ba170d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_hierarchysettingsproperties.go @@ -0,0 +1,10 @@ +package managementgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HierarchySettingsProperties struct { + DefaultManagementGroup *string `json:"defaultManagementGroup,omitempty"` + RequireAuthorizationForGroupCreation *bool `json:"requireAuthorizationForGroupCreation,omitempty"` + TenantId *string `json:"tenantId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroup.go new file mode 100644 index 0000000000000..57cbc9b2094bf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroup.go @@ -0,0 +1,11 @@ +package managementgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagementGroup struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ManagementGroupProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupchildinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupchildinfo.go new file mode 100644 index 0000000000000..9992212a850f1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupchildinfo.go @@ -0,0 +1,12 @@ +package managementgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagementGroupChildInfo struct { + Children *[]ManagementGroupChildInfo `json:"children,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *ManagementGroupChildType `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupdetails.go new file mode 100644 index 0000000000000..173c8e81c02cd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupdetails.go @@ -0,0 +1,30 @@ +package managementgroups + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagementGroupDetails struct { + Parent *ParentGroupInfo `json:"parent,omitempty"` + Path *[]ManagementGroupPathElement `json:"path,omitempty"` + UpdatedBy *string `json:"updatedBy,omitempty"` + UpdatedTime *string `json:"updatedTime,omitempty"` + Version *float64 `json:"version,omitempty"` +} + +func (o *ManagementGroupDetails) GetUpdatedTimeAsTime() (*time.Time, error) { + if o.UpdatedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.UpdatedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *ManagementGroupDetails) SetUpdatedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.UpdatedTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupinfo.go new file mode 100644 index 0000000000000..d6f44c383e64a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupinfo.go @@ -0,0 +1,11 @@ +package managementgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagementGroupInfo struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ManagementGroupInfoProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupinfoproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupinfoproperties.go new file mode 100644 index 0000000000000..e9c67c3e83de7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupinfoproperties.go @@ -0,0 +1,9 @@ +package managementgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagementGroupInfoProperties struct { + DisplayName *string `json:"displayName,omitempty"` + TenantId *string `json:"tenantId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgrouppathelement.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgrouppathelement.go new file mode 100644 index 0000000000000..71f71d49b9f82 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgrouppathelement.go @@ -0,0 +1,9 @@ +package managementgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagementGroupPathElement struct { + DisplayName *string `json:"displayName,omitempty"` + Name *string `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupproperties.go new file mode 100644 index 0000000000000..1236f68ef7cf6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupproperties.go @@ -0,0 +1,11 @@ +package managementgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagementGroupProperties struct { + Children *[]ManagementGroupChildInfo `json:"children,omitempty"` + Details *ManagementGroupDetails `json:"details,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + TenantId *string `json:"tenantId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_parentgroupinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_parentgroupinfo.go new file mode 100644 index 0000000000000..e376167a8ea12 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_parentgroupinfo.go @@ -0,0 +1,10 @@ +package managementgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ParentGroupInfo struct { + DisplayName *string `json:"displayName,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_patchmanagementgrouprequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_patchmanagementgrouprequest.go new file mode 100644 index 0000000000000..a34ec5f98decb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_patchmanagementgrouprequest.go @@ -0,0 +1,9 @@ +package managementgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PatchManagementGroupRequest struct { + DisplayName *string `json:"displayName,omitempty"` + ParentGroupId *string `json:"parentGroupId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_subscriptionundermanagementgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_subscriptionundermanagementgroup.go new file mode 100644 index 0000000000000..de3b510092d1d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_subscriptionundermanagementgroup.go @@ -0,0 +1,11 @@ +package managementgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SubscriptionUnderManagementGroup struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *SubscriptionUnderManagementGroupProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_subscriptionundermanagementgroupproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_subscriptionundermanagementgroupproperties.go new file mode 100644 index 0000000000000..10af6a9e8e60e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/model_subscriptionundermanagementgroupproperties.go @@ -0,0 +1,11 @@ +package managementgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SubscriptionUnderManagementGroupProperties struct { + DisplayName *string `json:"displayName,omitempty"` + Parent *DescendantParentGroupInfo `json:"parent,omitempty"` + State *string `json:"state,omitempty"` + Tenant *string `json:"tenant,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/predicates.go new file mode 100644 index 0000000000000..0ae74d4138b4e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/predicates.go @@ -0,0 +1,73 @@ +package managementgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DescendantInfoOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p DescendantInfoOperationPredicate) Matches(input DescendantInfo) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type ManagementGroupInfoOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p ManagementGroupInfoOperationPredicate) Matches(input ManagementGroupInfo) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type SubscriptionUnderManagementGroupOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p SubscriptionUnderManagementGroupOperationPredicate) Matches(input SubscriptionUnderManagementGroup) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/version.go new file mode 100644 index 0000000000000..8446424fbd4f5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups/version.go @@ -0,0 +1,12 @@ +package managementgroups + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2020-05-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/managementgroups/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/README.md deleted file mode 100644 index fa17aca6a5cce..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/README.md +++ /dev/null @@ -1,69 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations` Documentation - -The `configurations` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations" -``` - - -### Client Initialization - -```go -client := configurations.NewConfigurationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ConfigurationsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := configurations.NewConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "configurationValue") - -payload := configurations.Configuration{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ConfigurationsClient.Get` - -```go -ctx := context.TODO() -id := configurations.NewConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "configurationValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ConfigurationsClient.ListByServer` - -```go -ctx := context.TODO() -id := configurations.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -read, err := client.ListByServer(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/client.go deleted file mode 100644 index 3ced22d176bb4..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package configurations - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConfigurationsClient struct { - Client *resourcemanager.Client -} - -func NewConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurations", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ConfigurationsClient: %+v", err) - } - - return &ConfigurationsClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/id_configuration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/id_configuration.go deleted file mode 100644 index 54c88ae1f74db..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/id_configuration.go +++ /dev/null @@ -1,139 +0,0 @@ -package configurations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&ConfigurationId{}) -} - -var _ resourceids.ResourceId = &ConfigurationId{} - -// ConfigurationId is a struct representing the Resource ID for a Configuration -type ConfigurationId struct { - SubscriptionId string - ResourceGroupName string - ServerName string - ConfigurationName string -} - -// NewConfigurationID returns a new ConfigurationId struct -func NewConfigurationID(subscriptionId string, resourceGroupName string, serverName string, configurationName string) ConfigurationId { - return ConfigurationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ServerName: serverName, - ConfigurationName: configurationName, - } -} - -// ParseConfigurationID parses 'input' into a ConfigurationId -func ParseConfigurationID(input string) (*ConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(&ConfigurationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseConfigurationIDInsensitively parses 'input' case-insensitively into a ConfigurationId -// note: this method should only be used for API response data and not user input -func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(&ConfigurationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *ConfigurationId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.ServerName, ok = input.Parsed["serverName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) - } - - if id.ConfigurationName, ok = input.Parsed["configurationName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "configurationName", input) - } - - return nil -} - -// ValidateConfigurationID checks that 'input' can be parsed as a Configuration ID -func ValidateConfigurationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseConfigurationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Configuration ID -func (id ConfigurationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMariaDB/servers/%s/configurations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServerName, id.ConfigurationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Configuration ID -func (id ConfigurationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftDBforMariaDB", "Microsoft.DBforMariaDB", "Microsoft.DBforMariaDB"), - resourceids.StaticSegment("staticServers", "servers", "servers"), - resourceids.UserSpecifiedSegment("serverName", "serverValue"), - resourceids.StaticSegment("staticConfigurations", "configurations", "configurations"), - resourceids.UserSpecifiedSegment("configurationName", "configurationValue"), - } -} - -// String returns a human-readable description of this Configuration ID -func (id ConfigurationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Server Name: %q", id.ServerName), - fmt.Sprintf("Configuration Name: %q", id.ConfigurationName), - } - return fmt.Sprintf("Configuration (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/id_server.go deleted file mode 100644 index 61a6c705a1e43..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/id_server.go +++ /dev/null @@ -1,130 +0,0 @@ -package configurations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&ServerId{}) -} - -var _ resourceids.ResourceId = &ServerId{} - -// ServerId is a struct representing the Resource ID for a Server -type ServerId struct { - SubscriptionId string - ResourceGroupName string - ServerName string -} - -// NewServerID returns a new ServerId struct -func NewServerID(subscriptionId string, resourceGroupName string, serverName string) ServerId { - return ServerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ServerName: serverName, - } -} - -// ParseServerID parses 'input' into a ServerId -func ParseServerID(input string) (*ServerId, error) { - parser := resourceids.NewParserFromResourceIdType(&ServerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseServerIDInsensitively parses 'input' case-insensitively into a ServerId -// note: this method should only be used for API response data and not user input -func ParseServerIDInsensitively(input string) (*ServerId, error) { - parser := resourceids.NewParserFromResourceIdType(&ServerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *ServerId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.ServerName, ok = input.Parsed["serverName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) - } - - return nil -} - -// ValidateServerID checks that 'input' can be parsed as a Server ID -func ValidateServerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseServerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Server ID -func (id ServerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMariaDB/servers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Server ID -func (id ServerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftDBforMariaDB", "Microsoft.DBforMariaDB", "Microsoft.DBforMariaDB"), - resourceids.StaticSegment("staticServers", "servers", "servers"), - resourceids.UserSpecifiedSegment("serverName", "serverValue"), - } -} - -// String returns a human-readable description of this Server ID -func (id ServerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Server Name: %q", id.ServerName), - } - return fmt.Sprintf("Server (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/method_createorupdate.go deleted file mode 100644 index 066745e2e0cc9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/method_createorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package configurations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *Configuration -} - -// CreateOrUpdate ... -func (c ConfigurationsClient) CreateOrUpdate(ctx context.Context, id ConfigurationId, input Configuration) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ConfigurationsClient) CreateOrUpdateThenPoll(ctx context.Context, id ConfigurationId, input Configuration) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/method_get.go deleted file mode 100644 index e9c5e825e444d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/method_get.go +++ /dev/null @@ -1,54 +0,0 @@ -package configurations - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Configuration -} - -// Get ... -func (c ConfigurationsClient) Get(ctx context.Context, id ConfigurationId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Configuration - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/method_listbyserver.go deleted file mode 100644 index b51c9a09a6319..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/method_listbyserver.go +++ /dev/null @@ -1,55 +0,0 @@ -package configurations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByServerOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ConfigurationListResult -} - -// ListByServer ... -func (c ConfigurationsClient) ListByServer(ctx context.Context, id ServerId) (result ListByServerOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/configurations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ConfigurationListResult - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/model_configuration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/model_configuration.go deleted file mode 100644 index 84bf2c2812767..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/model_configuration.go +++ /dev/null @@ -1,11 +0,0 @@ -package configurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Configuration struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/model_configurationlistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/model_configurationlistresult.go deleted file mode 100644 index 98af12f5801e2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/model_configurationlistresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package configurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConfigurationListResult struct { - Value *[]Configuration `json:"value,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/model_configurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/model_configurationproperties.go deleted file mode 100644 index 51143bf6154a3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/model_configurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package configurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConfigurationProperties struct { - AllowedValues *string `json:"allowedValues,omitempty"` - DataType *string `json:"dataType,omitempty"` - DefaultValue *string `json:"defaultValue,omitempty"` - Description *string `json:"description,omitempty"` - Source *string `json:"source,omitempty"` - Value *string `json:"value,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/version.go deleted file mode 100644 index b31650f643447..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package configurations - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-06-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurations/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/README.md deleted file mode 100644 index 3685fef1934dd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/README.md +++ /dev/null @@ -1,81 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases` Documentation - -The `databases` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases" -``` - - -### Client Initialization - -```go -client := databases.NewDatabasesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `DatabasesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -payload := databases.Database{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `DatabasesClient.Delete` - -```go -ctx := context.TODO() -id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `DatabasesClient.Get` - -```go -ctx := context.TODO() -id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `DatabasesClient.ListByServer` - -```go -ctx := context.TODO() -id := databases.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -read, err := client.ListByServer(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/id_database.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/id_database.go deleted file mode 100644 index b19c256d09a20..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/id_database.go +++ /dev/null @@ -1,139 +0,0 @@ -package databases - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&DatabaseId{}) -} - -var _ resourceids.ResourceId = &DatabaseId{} - -// DatabaseId is a struct representing the Resource ID for a Database -type DatabaseId struct { - SubscriptionId string - ResourceGroupName string - ServerName string - DatabaseName string -} - -// NewDatabaseID returns a new DatabaseId struct -func NewDatabaseID(subscriptionId string, resourceGroupName string, serverName string, databaseName string) DatabaseId { - return DatabaseId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ServerName: serverName, - DatabaseName: databaseName, - } -} - -// ParseDatabaseID parses 'input' into a DatabaseId -func ParseDatabaseID(input string) (*DatabaseId, error) { - parser := resourceids.NewParserFromResourceIdType(&DatabaseId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseDatabaseIDInsensitively parses 'input' case-insensitively into a DatabaseId -// note: this method should only be used for API response data and not user input -func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { - parser := resourceids.NewParserFromResourceIdType(&DatabaseId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *DatabaseId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.ServerName, ok = input.Parsed["serverName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) - } - - if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) - } - - return nil -} - -// ValidateDatabaseID checks that 'input' can be parsed as a Database ID -func ValidateDatabaseID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseDatabaseID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Database ID -func (id DatabaseId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMariaDB/servers/%s/databases/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServerName, id.DatabaseName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Database ID -func (id DatabaseId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftDBforMariaDB", "Microsoft.DBforMariaDB", "Microsoft.DBforMariaDB"), - resourceids.StaticSegment("staticServers", "servers", "servers"), - resourceids.UserSpecifiedSegment("serverName", "serverValue"), - resourceids.StaticSegment("staticDatabases", "databases", "databases"), - resourceids.UserSpecifiedSegment("databaseName", "databaseValue"), - } -} - -// String returns a human-readable description of this Database ID -func (id DatabaseId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Server Name: %q", id.ServerName), - fmt.Sprintf("Database Name: %q", id.DatabaseName), - } - return fmt.Sprintf("Database (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/id_server.go deleted file mode 100644 index 39f562ec9bd78..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/id_server.go +++ /dev/null @@ -1,130 +0,0 @@ -package databases - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&ServerId{}) -} - -var _ resourceids.ResourceId = &ServerId{} - -// ServerId is a struct representing the Resource ID for a Server -type ServerId struct { - SubscriptionId string - ResourceGroupName string - ServerName string -} - -// NewServerID returns a new ServerId struct -func NewServerID(subscriptionId string, resourceGroupName string, serverName string) ServerId { - return ServerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ServerName: serverName, - } -} - -// ParseServerID parses 'input' into a ServerId -func ParseServerID(input string) (*ServerId, error) { - parser := resourceids.NewParserFromResourceIdType(&ServerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseServerIDInsensitively parses 'input' case-insensitively into a ServerId -// note: this method should only be used for API response data and not user input -func ParseServerIDInsensitively(input string) (*ServerId, error) { - parser := resourceids.NewParserFromResourceIdType(&ServerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *ServerId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.ServerName, ok = input.Parsed["serverName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) - } - - return nil -} - -// ValidateServerID checks that 'input' can be parsed as a Server ID -func ValidateServerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseServerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Server ID -func (id ServerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMariaDB/servers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Server ID -func (id ServerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftDBforMariaDB", "Microsoft.DBforMariaDB", "Microsoft.DBforMariaDB"), - resourceids.StaticSegment("staticServers", "servers", "servers"), - resourceids.UserSpecifiedSegment("serverName", "serverValue"), - } -} - -// String returns a human-readable description of this Server ID -func (id ServerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Server Name: %q", id.ServerName), - } - return fmt.Sprintf("Server (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_createorupdate.go deleted file mode 100644 index a3fce47deebc5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_createorupdate.go +++ /dev/null @@ -1,76 +0,0 @@ -package databases - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *Database -} - -// CreateOrUpdate ... -func (c DatabasesClient) CreateOrUpdate(ctx context.Context, id DatabaseId, input Database) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c DatabasesClient) CreateOrUpdateThenPoll(ctx context.Context, id DatabaseId, input Database) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_delete.go deleted file mode 100644 index dc03e5266110d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package databases - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c DatabasesClient) Delete(ctx context.Context, id DatabaseId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c DatabasesClient) DeleteThenPoll(ctx context.Context, id DatabaseId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_get.go deleted file mode 100644 index dcbfb4b8270ec..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_get.go +++ /dev/null @@ -1,54 +0,0 @@ -package databases - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Database -} - -// Get ... -func (c DatabasesClient) Get(ctx context.Context, id DatabaseId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Database - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_listbyserver.go deleted file mode 100644 index a4dd2fdfeed9c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_listbyserver.go +++ /dev/null @@ -1,55 +0,0 @@ -package databases - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByServerOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *DatabaseListResult -} - -// ListByServer ... -func (c DatabasesClient) ListByServer(ctx context.Context, id ServerId) (result ListByServerOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/databases", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model DatabaseListResult - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/model_database.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/model_database.go deleted file mode 100644 index a9880a7432bb0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/model_database.go +++ /dev/null @@ -1,11 +0,0 @@ -package databases - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Database struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *DatabaseProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/model_databaselistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/model_databaselistresult.go deleted file mode 100644 index 80645ead09238..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/model_databaselistresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package databases - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DatabaseListResult struct { - Value *[]Database `json:"value,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/model_databaseproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/model_databaseproperties.go deleted file mode 100644 index 85fcbd70d5781..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/model_databaseproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package databases - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DatabaseProperties struct { - Charset *string `json:"charset,omitempty"` - Collation *string `json:"collation,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/version.go deleted file mode 100644 index 6edfbce43c1b1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package databases - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-06-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databases/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/README.md deleted file mode 100644 index d46a7c5402ea7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/README.md +++ /dev/null @@ -1,81 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules` Documentation - -The `firewallrules` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules" -``` - - -### Client Initialization - -```go -client := firewallrules.NewFirewallRulesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `FirewallRulesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := firewallrules.NewFirewallRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "firewallRuleValue") - -payload := firewallrules.FirewallRule{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `FirewallRulesClient.Delete` - -```go -ctx := context.TODO() -id := firewallrules.NewFirewallRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "firewallRuleValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `FirewallRulesClient.Get` - -```go -ctx := context.TODO() -id := firewallrules.NewFirewallRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "firewallRuleValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `FirewallRulesClient.ListByServer` - -```go -ctx := context.TODO() -id := firewallrules.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -read, err := client.ListByServer(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/id_server.go deleted file mode 100644 index 19e9f481296c6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/id_server.go +++ /dev/null @@ -1,130 +0,0 @@ -package firewallrules - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&ServerId{}) -} - -var _ resourceids.ResourceId = &ServerId{} - -// ServerId is a struct representing the Resource ID for a Server -type ServerId struct { - SubscriptionId string - ResourceGroupName string - ServerName string -} - -// NewServerID returns a new ServerId struct -func NewServerID(subscriptionId string, resourceGroupName string, serverName string) ServerId { - return ServerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ServerName: serverName, - } -} - -// ParseServerID parses 'input' into a ServerId -func ParseServerID(input string) (*ServerId, error) { - parser := resourceids.NewParserFromResourceIdType(&ServerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseServerIDInsensitively parses 'input' case-insensitively into a ServerId -// note: this method should only be used for API response data and not user input -func ParseServerIDInsensitively(input string) (*ServerId, error) { - parser := resourceids.NewParserFromResourceIdType(&ServerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *ServerId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.ServerName, ok = input.Parsed["serverName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) - } - - return nil -} - -// ValidateServerID checks that 'input' can be parsed as a Server ID -func ValidateServerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseServerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Server ID -func (id ServerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMariaDB/servers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Server ID -func (id ServerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftDBforMariaDB", "Microsoft.DBforMariaDB", "Microsoft.DBforMariaDB"), - resourceids.StaticSegment("staticServers", "servers", "servers"), - resourceids.UserSpecifiedSegment("serverName", "serverValue"), - } -} - -// String returns a human-readable description of this Server ID -func (id ServerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Server Name: %q", id.ServerName), - } - return fmt.Sprintf("Server (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_createorupdate.go deleted file mode 100644 index 8a5fca1cd9f0c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_createorupdate.go +++ /dev/null @@ -1,76 +0,0 @@ -package firewallrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *FirewallRule -} - -// CreateOrUpdate ... -func (c FirewallRulesClient) CreateOrUpdate(ctx context.Context, id FirewallRuleId, input FirewallRule) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c FirewallRulesClient) CreateOrUpdateThenPoll(ctx context.Context, id FirewallRuleId, input FirewallRule) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_delete.go deleted file mode 100644 index 44b95e975c0a1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package firewallrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c FirewallRulesClient) Delete(ctx context.Context, id FirewallRuleId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c FirewallRulesClient) DeleteThenPoll(ctx context.Context, id FirewallRuleId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_listbyserver.go deleted file mode 100644 index 3d8818b6fad9e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_listbyserver.go +++ /dev/null @@ -1,55 +0,0 @@ -package firewallrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByServerOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *FirewallRuleListResult -} - -// ListByServer ... -func (c FirewallRulesClient) ListByServer(ctx context.Context, id ServerId) (result ListByServerOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/firewallRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model FirewallRuleListResult - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/model_firewallrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/model_firewallrule.go deleted file mode 100644 index 3178a13ed2c44..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/model_firewallrule.go +++ /dev/null @@ -1,11 +0,0 @@ -package firewallrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallRule struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties FirewallRuleProperties `json:"properties"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/model_firewallrulelistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/model_firewallrulelistresult.go deleted file mode 100644 index c01e91fae564e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/model_firewallrulelistresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package firewallrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallRuleListResult struct { - Value *[]FirewallRule `json:"value,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/model_firewallruleproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/model_firewallruleproperties.go deleted file mode 100644 index fca4e1c3684b4..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/model_firewallruleproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package firewallrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallRuleProperties struct { - EndIPAddress string `json:"endIpAddress"` - StartIPAddress string `json:"startIpAddress"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/version.go deleted file mode 100644 index 50bf96272aeb4..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package firewallrules - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-06-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallrules/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/README.md deleted file mode 100644 index 9660b52a520f9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules` Documentation - -The `virtualnetworkrules` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules" -``` - - -### Client Initialization - -```go -client := virtualnetworkrules.NewVirtualNetworkRulesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VirtualNetworkRulesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualnetworkrules.NewVirtualNetworkRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "virtualNetworkRuleValue") - -payload := virtualnetworkrules.VirtualNetworkRule{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkRulesClient.Delete` - -```go -ctx := context.TODO() -id := virtualnetworkrules.NewVirtualNetworkRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "virtualNetworkRuleValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkRulesClient.Get` - -```go -ctx := context.TODO() -id := virtualnetworkrules.NewVirtualNetworkRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "virtualNetworkRuleValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualNetworkRulesClient.ListByServer` - -```go -ctx := context.TODO() -id := virtualnetworkrules.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination -items, err := client.ListByServerComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/constants.go deleted file mode 100644 index 6e2ce1104f431..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/constants.go +++ /dev/null @@ -1,60 +0,0 @@ -package virtualnetworkrules - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkRuleState string - -const ( - VirtualNetworkRuleStateDeleting VirtualNetworkRuleState = "Deleting" - VirtualNetworkRuleStateInProgress VirtualNetworkRuleState = "InProgress" - VirtualNetworkRuleStateInitializing VirtualNetworkRuleState = "Initializing" - VirtualNetworkRuleStateReady VirtualNetworkRuleState = "Ready" - VirtualNetworkRuleStateUnknown VirtualNetworkRuleState = "Unknown" -) - -func PossibleValuesForVirtualNetworkRuleState() []string { - return []string{ - string(VirtualNetworkRuleStateDeleting), - string(VirtualNetworkRuleStateInProgress), - string(VirtualNetworkRuleStateInitializing), - string(VirtualNetworkRuleStateReady), - string(VirtualNetworkRuleStateUnknown), - } -} - -func (s *VirtualNetworkRuleState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkRuleState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkRuleState(input string) (*VirtualNetworkRuleState, error) { - vals := map[string]VirtualNetworkRuleState{ - "deleting": VirtualNetworkRuleStateDeleting, - "inprogress": VirtualNetworkRuleStateInProgress, - "initializing": VirtualNetworkRuleStateInitializing, - "ready": VirtualNetworkRuleStateReady, - "unknown": VirtualNetworkRuleStateUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkRuleState(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_server.go deleted file mode 100644 index ddf3caea502e9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_server.go +++ /dev/null @@ -1,130 +0,0 @@ -package virtualnetworkrules - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&ServerId{}) -} - -var _ resourceids.ResourceId = &ServerId{} - -// ServerId is a struct representing the Resource ID for a Server -type ServerId struct { - SubscriptionId string - ResourceGroupName string - ServerName string -} - -// NewServerID returns a new ServerId struct -func NewServerID(subscriptionId string, resourceGroupName string, serverName string) ServerId { - return ServerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ServerName: serverName, - } -} - -// ParseServerID parses 'input' into a ServerId -func ParseServerID(input string) (*ServerId, error) { - parser := resourceids.NewParserFromResourceIdType(&ServerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseServerIDInsensitively parses 'input' case-insensitively into a ServerId -// note: this method should only be used for API response data and not user input -func ParseServerIDInsensitively(input string) (*ServerId, error) { - parser := resourceids.NewParserFromResourceIdType(&ServerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *ServerId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.ServerName, ok = input.Parsed["serverName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) - } - - return nil -} - -// ValidateServerID checks that 'input' can be parsed as a Server ID -func ValidateServerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseServerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Server ID -func (id ServerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMariaDB/servers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Server ID -func (id ServerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftDBforMariaDB", "Microsoft.DBforMariaDB", "Microsoft.DBforMariaDB"), - resourceids.StaticSegment("staticServers", "servers", "servers"), - resourceids.UserSpecifiedSegment("serverName", "serverValue"), - } -} - -// String returns a human-readable description of this Server ID -func (id ServerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Server Name: %q", id.ServerName), - } - return fmt.Sprintf("Server (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_listbyserver.go deleted file mode 100644 index d851635e6b87e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_listbyserver.go +++ /dev/null @@ -1,105 +0,0 @@ -package virtualnetworkrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByServerOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualNetworkRule -} - -type ListByServerCompleteResult struct { - LatestHttpResponse *http.Response - Items []VirtualNetworkRule -} - -type ListByServerCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListByServerCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListByServer ... -func (c VirtualNetworkRulesClient) ListByServer(ctx context.Context, id ServerId) (result ListByServerOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListByServerCustomPager{}, - Path: fmt.Sprintf("%s/virtualNetworkRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualNetworkRule `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByServerComplete retrieves all the results into a single object -func (c VirtualNetworkRulesClient) ListByServerComplete(ctx context.Context, id ServerId) (ListByServerCompleteResult, error) { - return c.ListByServerCompleteMatchingPredicate(ctx, id, VirtualNetworkRuleOperationPredicate{}) -} - -// ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualNetworkRulesClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id ServerId, predicate VirtualNetworkRuleOperationPredicate) (result ListByServerCompleteResult, err error) { - items := make([]VirtualNetworkRule, 0) - - resp, err := c.ListByServer(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByServerCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/version.go deleted file mode 100644 index 0e53377c7b583..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworkrules - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-06-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkrules/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/README.md deleted file mode 100644 index 8f4e013480d4e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/README.md +++ /dev/null @@ -1,111 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters` Documentation - -The `accountfilters` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2021-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters" -``` - - -### Client Initialization - -```go -client := accountfilters.NewAccountFiltersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `AccountFiltersClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := accountfilters.NewAccountFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "accountFilterValue") - -payload := accountfilters.AccountFilter{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountFiltersClient.Delete` - -```go -ctx := context.TODO() -id := accountfilters.NewAccountFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "accountFilterValue") - -read, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountFiltersClient.Get` - -```go -ctx := context.TODO() -id := accountfilters.NewAccountFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "accountFilterValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountFiltersClient.List` - -```go -ctx := context.TODO() -id := accountfilters.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AccountFiltersClient.Update` - -```go -ctx := context.TODO() -id := accountfilters.NewAccountFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "accountFilterValue") - -payload := accountfilters.AccountFilter{ - // ... -} - - -read, err := client.Update(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/client.go deleted file mode 100644 index 76262494fe6d6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package accountfilters - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountFiltersClient struct { - Client *resourcemanager.Client -} - -func NewAccountFiltersClientWithBaseURI(sdkApi sdkEnv.Api) (*AccountFiltersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "accountfilters", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating AccountFiltersClient: %+v", err) - } - - return &AccountFiltersClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/constants.go deleted file mode 100644 index 39a4f9acbff6d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/constants.go +++ /dev/null @@ -1,104 +0,0 @@ -package accountfilters - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FilterTrackPropertyCompareOperation string - -const ( - FilterTrackPropertyCompareOperationEqual FilterTrackPropertyCompareOperation = "Equal" - FilterTrackPropertyCompareOperationNotEqual FilterTrackPropertyCompareOperation = "NotEqual" -) - -func PossibleValuesForFilterTrackPropertyCompareOperation() []string { - return []string{ - string(FilterTrackPropertyCompareOperationEqual), - string(FilterTrackPropertyCompareOperationNotEqual), - } -} - -func (s *FilterTrackPropertyCompareOperation) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFilterTrackPropertyCompareOperation(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFilterTrackPropertyCompareOperation(input string) (*FilterTrackPropertyCompareOperation, error) { - vals := map[string]FilterTrackPropertyCompareOperation{ - "equal": FilterTrackPropertyCompareOperationEqual, - "notequal": FilterTrackPropertyCompareOperationNotEqual, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FilterTrackPropertyCompareOperation(input) - return &out, nil -} - -type FilterTrackPropertyType string - -const ( - FilterTrackPropertyTypeBitrate FilterTrackPropertyType = "Bitrate" - FilterTrackPropertyTypeFourCC FilterTrackPropertyType = "FourCC" - FilterTrackPropertyTypeLanguage FilterTrackPropertyType = "Language" - FilterTrackPropertyTypeName FilterTrackPropertyType = "Name" - FilterTrackPropertyTypeType FilterTrackPropertyType = "Type" - FilterTrackPropertyTypeUnknown FilterTrackPropertyType = "Unknown" -) - -func PossibleValuesForFilterTrackPropertyType() []string { - return []string{ - string(FilterTrackPropertyTypeBitrate), - string(FilterTrackPropertyTypeFourCC), - string(FilterTrackPropertyTypeLanguage), - string(FilterTrackPropertyTypeName), - string(FilterTrackPropertyTypeType), - string(FilterTrackPropertyTypeUnknown), - } -} - -func (s *FilterTrackPropertyType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFilterTrackPropertyType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFilterTrackPropertyType(input string) (*FilterTrackPropertyType, error) { - vals := map[string]FilterTrackPropertyType{ - "bitrate": FilterTrackPropertyTypeBitrate, - "fourcc": FilterTrackPropertyTypeFourCC, - "language": FilterTrackPropertyTypeLanguage, - "name": FilterTrackPropertyTypeName, - "type": FilterTrackPropertyTypeType, - "unknown": FilterTrackPropertyTypeUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FilterTrackPropertyType(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/id_accountfilter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/id_accountfilter.go deleted file mode 100644 index 30d0bcfc8719a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/id_accountfilter.go +++ /dev/null @@ -1,139 +0,0 @@ -package accountfilters - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&AccountFilterId{}) -} - -var _ resourceids.ResourceId = &AccountFilterId{} - -// AccountFilterId is a struct representing the Resource ID for a Account Filter -type AccountFilterId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - AccountFilterName string -} - -// NewAccountFilterID returns a new AccountFilterId struct -func NewAccountFilterID(subscriptionId string, resourceGroupName string, mediaServiceName string, accountFilterName string) AccountFilterId { - return AccountFilterId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - AccountFilterName: accountFilterName, - } -} - -// ParseAccountFilterID parses 'input' into a AccountFilterId -func ParseAccountFilterID(input string) (*AccountFilterId, error) { - parser := resourceids.NewParserFromResourceIdType(&AccountFilterId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := AccountFilterId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseAccountFilterIDInsensitively parses 'input' case-insensitively into a AccountFilterId -// note: this method should only be used for API response data and not user input -func ParseAccountFilterIDInsensitively(input string) (*AccountFilterId, error) { - parser := resourceids.NewParserFromResourceIdType(&AccountFilterId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := AccountFilterId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *AccountFilterId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.AccountFilterName, ok = input.Parsed["accountFilterName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "accountFilterName", input) - } - - return nil -} - -// ValidateAccountFilterID checks that 'input' can be parsed as a Account Filter ID -func ValidateAccountFilterID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseAccountFilterID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Account Filter ID -func (id AccountFilterId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/accountFilters/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.AccountFilterName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Account Filter ID -func (id AccountFilterId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticAccountFilters", "accountFilters", "accountFilters"), - resourceids.UserSpecifiedSegment("accountFilterName", "accountFilterValue"), - } -} - -// String returns a human-readable description of this Account Filter ID -func (id AccountFilterId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Account Filter Name: %q", id.AccountFilterName), - } - return fmt.Sprintf("Account Filter (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/id_mediaservice.go deleted file mode 100644 index b5a8af8e24c54..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/id_mediaservice.go +++ /dev/null @@ -1,130 +0,0 @@ -package accountfilters - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&MediaServiceId{}) -} - -var _ resourceids.ResourceId = &MediaServiceId{} - -// MediaServiceId is a struct representing the Resource ID for a Media Service -type MediaServiceId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string -} - -// NewMediaServiceID returns a new MediaServiceId struct -func NewMediaServiceID(subscriptionId string, resourceGroupName string, mediaServiceName string) MediaServiceId { - return MediaServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - } -} - -// ParseMediaServiceID parses 'input' into a MediaServiceId -func ParseMediaServiceID(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseMediaServiceIDInsensitively parses 'input' case-insensitively into a MediaServiceId -// note: this method should only be used for API response data and not user input -func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *MediaServiceId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - return nil -} - -// ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID -func ValidateMediaServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMediaServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Media Service ID -func (id MediaServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Media Service ID -func (id MediaServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - } -} - -// String returns a human-readable description of this Media Service ID -func (id MediaServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - } - return fmt.Sprintf("Media Service (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/method_createorupdate.go deleted file mode 100644 index f0e49340ca08a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/method_createorupdate.go +++ /dev/null @@ -1,59 +0,0 @@ -package accountfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AccountFilter -} - -// CreateOrUpdate ... -func (c AccountFiltersClient) CreateOrUpdate(ctx context.Context, id AccountFilterId, input AccountFilter) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model AccountFilter - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/method_delete.go deleted file mode 100644 index 135b80326daf0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/method_delete.go +++ /dev/null @@ -1,47 +0,0 @@ -package accountfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c AccountFiltersClient) Delete(ctx context.Context, id AccountFilterId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/method_get.go deleted file mode 100644 index b9639b436c1ff..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/method_get.go +++ /dev/null @@ -1,54 +0,0 @@ -package accountfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AccountFilter -} - -// Get ... -func (c AccountFiltersClient) Get(ctx context.Context, id AccountFilterId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model AccountFilter - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/method_list.go deleted file mode 100644 index a297e19172b86..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/method_list.go +++ /dev/null @@ -1,105 +0,0 @@ -package accountfilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AccountFilter -} - -type ListCompleteResult struct { - LatestHttpResponse *http.Response - Items []AccountFilter -} - -type ListCustomPager struct { - NextLink *odata.Link `json:"@odata.nextLink"` -} - -func (p *ListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// List ... -func (c AccountFiltersClient) List(ctx context.Context, id MediaServiceId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListCustomPager{}, - Path: fmt.Sprintf("%s/accountFilters", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AccountFilter `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c AccountFiltersClient) ListComplete(ctx context.Context, id MediaServiceId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, AccountFilterOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AccountFiltersClient) ListCompleteMatchingPredicate(ctx context.Context, id MediaServiceId, predicate AccountFilterOperationPredicate) (result ListCompleteResult, err error) { - items := make([]AccountFilter, 0) - - resp, err := c.List(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/method_update.go deleted file mode 100644 index 7e3a2abff48ea..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/method_update.go +++ /dev/null @@ -1,58 +0,0 @@ -package accountfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AccountFilter -} - -// Update ... -func (c AccountFiltersClient) Update(ctx context.Context, id AccountFilterId, input AccountFilter) (result UpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model AccountFilter - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/model_accountfilter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/model_accountfilter.go deleted file mode 100644 index 5f99540d26e8e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/model_accountfilter.go +++ /dev/null @@ -1,16 +0,0 @@ -package accountfilters - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountFilter struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *MediaFilterProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/model_filtertrackpropertycondition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/model_filtertrackpropertycondition.go deleted file mode 100644 index ecfd372cc9cc0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/model_filtertrackpropertycondition.go +++ /dev/null @@ -1,10 +0,0 @@ -package accountfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FilterTrackPropertyCondition struct { - Operation FilterTrackPropertyCompareOperation `json:"operation"` - Property FilterTrackPropertyType `json:"property"` - Value string `json:"value"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/model_filtertrackselection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/model_filtertrackselection.go deleted file mode 100644 index d80799ed2c0f5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/model_filtertrackselection.go +++ /dev/null @@ -1,8 +0,0 @@ -package accountfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FilterTrackSelection struct { - TrackSelections []FilterTrackPropertyCondition `json:"trackSelections"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/model_firstquality.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/model_firstquality.go deleted file mode 100644 index c4854fd569692..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/model_firstquality.go +++ /dev/null @@ -1,8 +0,0 @@ -package accountfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirstQuality struct { - Bitrate int64 `json:"bitrate"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/model_mediafilterproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/model_mediafilterproperties.go deleted file mode 100644 index 70be94a287288..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/model_mediafilterproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package accountfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaFilterProperties struct { - FirstQuality *FirstQuality `json:"firstQuality,omitempty"` - PresentationTimeRange *PresentationTimeRange `json:"presentationTimeRange,omitempty"` - Tracks *[]FilterTrackSelection `json:"tracks,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/model_presentationtimerange.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/model_presentationtimerange.go deleted file mode 100644 index f36ec8315716c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/model_presentationtimerange.go +++ /dev/null @@ -1,13 +0,0 @@ -package accountfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PresentationTimeRange struct { - EndTimestamp *int64 `json:"endTimestamp,omitempty"` - ForceEndTimestamp *bool `json:"forceEndTimestamp,omitempty"` - LiveBackoffDuration *int64 `json:"liveBackoffDuration,omitempty"` - PresentationWindowDuration *int64 `json:"presentationWindowDuration,omitempty"` - StartTimestamp *int64 `json:"startTimestamp,omitempty"` - Timescale *int64 `json:"timescale,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/predicates.go deleted file mode 100644 index 0d50e33a6f362..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package accountfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountFilterOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p AccountFilterOperationPredicate) Matches(input AccountFilter) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/version.go deleted file mode 100644 index 345a27e8e7aaa..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package accountfilters - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/accountfilters/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/README.md deleted file mode 100644 index 99a29239330aa..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/README.md +++ /dev/null @@ -1,285 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts` Documentation - -The `accounts` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2021-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts" -``` - - -### Client Initialization - -```go -client := accounts.NewAccountsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `AccountsClient.LocationsCheckNameAvailability` - -```go -ctx := context.TODO() -id := accounts.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -payload := accounts.CheckNameAvailabilityInput{ - // ... -} - - -read, err := client.LocationsCheckNameAvailability(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountsClient.MediaservicesCreateOrUpdate` - -```go -ctx := context.TODO() -id := accounts.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -payload := accounts.MediaService{ - // ... -} - - -if err := client.MediaservicesCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `AccountsClient.MediaservicesDelete` - -```go -ctx := context.TODO() -id := accounts.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -read, err := client.MediaservicesDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountsClient.MediaservicesGet` - -```go -ctx := context.TODO() -id := accounts.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -read, err := client.MediaservicesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountsClient.MediaservicesList` - -```go -ctx := context.TODO() -id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.MediaservicesList(ctx, id)` can be used to do batched pagination -items, err := client.MediaservicesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AccountsClient.MediaservicesListBySubscription` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.MediaservicesListBySubscription(ctx, id)` can be used to do batched pagination -items, err := client.MediaservicesListBySubscriptionComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AccountsClient.MediaservicesListEdgePolicies` - -```go -ctx := context.TODO() -id := accounts.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -payload := accounts.ListEdgePoliciesInput{ - // ... -} - - -read, err := client.MediaservicesListEdgePolicies(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountsClient.MediaservicesSyncStorageKeys` - -```go -ctx := context.TODO() -id := accounts.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -payload := accounts.SyncStorageKeysInput{ - // ... -} - - -read, err := client.MediaservicesSyncStorageKeys(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountsClient.MediaservicesUpdate` - -```go -ctx := context.TODO() -id := accounts.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -payload := accounts.MediaServiceUpdate{ - // ... -} - - -if err := client.MediaservicesUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `AccountsClient.PrivateEndpointConnectionsCreateOrUpdate` - -```go -ctx := context.TODO() -id := accounts.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "privateEndpointConnectionValue") - -payload := accounts.PrivateEndpointConnection{ - // ... -} - - -read, err := client.PrivateEndpointConnectionsCreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountsClient.PrivateEndpointConnectionsDelete` - -```go -ctx := context.TODO() -id := accounts.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "privateEndpointConnectionValue") - -read, err := client.PrivateEndpointConnectionsDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountsClient.PrivateEndpointConnectionsGet` - -```go -ctx := context.TODO() -id := accounts.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "privateEndpointConnectionValue") - -read, err := client.PrivateEndpointConnectionsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountsClient.PrivateEndpointConnectionsList` - -```go -ctx := context.TODO() -id := accounts.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -read, err := client.PrivateEndpointConnectionsList(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountsClient.PrivateLinkResourcesGet` - -```go -ctx := context.TODO() -id := accounts.NewPrivateLinkResourceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "privateLinkResourceValue") - -read, err := client.PrivateLinkResourcesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountsClient.PrivateLinkResourcesList` - -```go -ctx := context.TODO() -id := accounts.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -read, err := client.PrivateLinkResourcesList(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/client.go deleted file mode 100644 index 8b093f7f4c736..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package accounts - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountsClient struct { - Client *resourcemanager.Client -} - -func NewAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*AccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "accounts", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating AccountsClient: %+v", err) - } - - return &AccountsClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/constants.go deleted file mode 100644 index f8969c7dae42b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/constants.go +++ /dev/null @@ -1,350 +0,0 @@ -package accounts - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountEncryptionKeyType string - -const ( - AccountEncryptionKeyTypeCustomerKey AccountEncryptionKeyType = "CustomerKey" - AccountEncryptionKeyTypeSystemKey AccountEncryptionKeyType = "SystemKey" -) - -func PossibleValuesForAccountEncryptionKeyType() []string { - return []string{ - string(AccountEncryptionKeyTypeCustomerKey), - string(AccountEncryptionKeyTypeSystemKey), - } -} - -func (s *AccountEncryptionKeyType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAccountEncryptionKeyType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAccountEncryptionKeyType(input string) (*AccountEncryptionKeyType, error) { - vals := map[string]AccountEncryptionKeyType{ - "customerkey": AccountEncryptionKeyTypeCustomerKey, - "systemkey": AccountEncryptionKeyTypeSystemKey, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AccountEncryptionKeyType(input) - return &out, nil -} - -type DefaultAction string - -const ( - DefaultActionAllow DefaultAction = "Allow" - DefaultActionDeny DefaultAction = "Deny" -) - -func PossibleValuesForDefaultAction() []string { - return []string{ - string(DefaultActionAllow), - string(DefaultActionDeny), - } -} - -func (s *DefaultAction) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDefaultAction(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDefaultAction(input string) (*DefaultAction, error) { - vals := map[string]DefaultAction{ - "allow": DefaultActionAllow, - "deny": DefaultActionDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DefaultAction(input) - return &out, nil -} - -type PrivateEndpointConnectionProvisioningState string - -const ( - PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" - PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" - PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" - PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" -) - -func PossibleValuesForPrivateEndpointConnectionProvisioningState() []string { - return []string{ - string(PrivateEndpointConnectionProvisioningStateCreating), - string(PrivateEndpointConnectionProvisioningStateDeleting), - string(PrivateEndpointConnectionProvisioningStateFailed), - string(PrivateEndpointConnectionProvisioningStateSucceeded), - } -} - -func (s *PrivateEndpointConnectionProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePrivateEndpointConnectionProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePrivateEndpointConnectionProvisioningState(input string) (*PrivateEndpointConnectionProvisioningState, error) { - vals := map[string]PrivateEndpointConnectionProvisioningState{ - "creating": PrivateEndpointConnectionProvisioningStateCreating, - "deleting": PrivateEndpointConnectionProvisioningStateDeleting, - "failed": PrivateEndpointConnectionProvisioningStateFailed, - "succeeded": PrivateEndpointConnectionProvisioningStateSucceeded, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PrivateEndpointConnectionProvisioningState(input) - return &out, nil -} - -type PrivateEndpointServiceConnectionStatus string - -const ( - PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved" - PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = "Pending" - PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected" -) - -func PossibleValuesForPrivateEndpointServiceConnectionStatus() []string { - return []string{ - string(PrivateEndpointServiceConnectionStatusApproved), - string(PrivateEndpointServiceConnectionStatusPending), - string(PrivateEndpointServiceConnectionStatusRejected), - } -} - -func (s *PrivateEndpointServiceConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePrivateEndpointServiceConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePrivateEndpointServiceConnectionStatus(input string) (*PrivateEndpointServiceConnectionStatus, error) { - vals := map[string]PrivateEndpointServiceConnectionStatus{ - "approved": PrivateEndpointServiceConnectionStatusApproved, - "pending": PrivateEndpointServiceConnectionStatusPending, - "rejected": PrivateEndpointServiceConnectionStatusRejected, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PrivateEndpointServiceConnectionStatus(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateInProgress ProvisioningState = "InProgress" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateFailed), - string(ProvisioningStateInProgress), - string(ProvisioningStateSucceeded), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "failed": ProvisioningStateFailed, - "inprogress": ProvisioningStateInProgress, - "succeeded": ProvisioningStateSucceeded, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicNetworkAccess string - -const ( - PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" - PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" -) - -func PossibleValuesForPublicNetworkAccess() []string { - return []string{ - string(PublicNetworkAccessDisabled), - string(PublicNetworkAccessEnabled), - } -} - -func (s *PublicNetworkAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicNetworkAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicNetworkAccess(input string) (*PublicNetworkAccess, error) { - vals := map[string]PublicNetworkAccess{ - "disabled": PublicNetworkAccessDisabled, - "enabled": PublicNetworkAccessEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicNetworkAccess(input) - return &out, nil -} - -type StorageAccountType string - -const ( - StorageAccountTypePrimary StorageAccountType = "Primary" - StorageAccountTypeSecondary StorageAccountType = "Secondary" -) - -func PossibleValuesForStorageAccountType() []string { - return []string{ - string(StorageAccountTypePrimary), - string(StorageAccountTypeSecondary), - } -} - -func (s *StorageAccountType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseStorageAccountType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseStorageAccountType(input string) (*StorageAccountType, error) { - vals := map[string]StorageAccountType{ - "primary": StorageAccountTypePrimary, - "secondary": StorageAccountTypeSecondary, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StorageAccountType(input) - return &out, nil -} - -type StorageAuthentication string - -const ( - StorageAuthenticationManagedIdentity StorageAuthentication = "ManagedIdentity" - StorageAuthenticationSystem StorageAuthentication = "System" -) - -func PossibleValuesForStorageAuthentication() []string { - return []string{ - string(StorageAuthenticationManagedIdentity), - string(StorageAuthenticationSystem), - } -} - -func (s *StorageAuthentication) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseStorageAuthentication(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseStorageAuthentication(input string) (*StorageAuthentication, error) { - vals := map[string]StorageAuthentication{ - "managedidentity": StorageAuthenticationManagedIdentity, - "system": StorageAuthenticationSystem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StorageAuthentication(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_location.go deleted file mode 100644 index afba47499fefd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_location.go +++ /dev/null @@ -1,121 +0,0 @@ -package accounts - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&LocationId{}) -} - -var _ resourceids.ResourceId = &LocationId{} - -// LocationId is a struct representing the Resource ID for a Location -type LocationId struct { - SubscriptionId string - LocationName string -} - -// NewLocationID returns a new LocationId struct -func NewLocationID(subscriptionId string, locationName string) LocationId { - return LocationId{ - SubscriptionId: subscriptionId, - LocationName: locationName, - } -} - -// ParseLocationID parses 'input' into a LocationId -func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(&LocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId -// note: this method should only be used for API response data and not user input -func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(&LocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.LocationName, ok = input.Parsed["locationName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) - } - - return nil -} - -// ValidateLocationID checks that 'input' can be parsed as a Location ID -func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Location ID -func (id LocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Media/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Location ID -func (id LocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Location ID -func (id LocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_mediaservice.go deleted file mode 100644 index 8f26f7543d08e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_mediaservice.go +++ /dev/null @@ -1,130 +0,0 @@ -package accounts - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&MediaServiceId{}) -} - -var _ resourceids.ResourceId = &MediaServiceId{} - -// MediaServiceId is a struct representing the Resource ID for a Media Service -type MediaServiceId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string -} - -// NewMediaServiceID returns a new MediaServiceId struct -func NewMediaServiceID(subscriptionId string, resourceGroupName string, mediaServiceName string) MediaServiceId { - return MediaServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - } -} - -// ParseMediaServiceID parses 'input' into a MediaServiceId -func ParseMediaServiceID(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseMediaServiceIDInsensitively parses 'input' case-insensitively into a MediaServiceId -// note: this method should only be used for API response data and not user input -func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *MediaServiceId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - return nil -} - -// ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID -func ValidateMediaServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMediaServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Media Service ID -func (id MediaServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Media Service ID -func (id MediaServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - } -} - -// String returns a human-readable description of this Media Service ID -func (id MediaServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - } - return fmt.Sprintf("Media Service (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_privatelinkresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_privatelinkresource.go deleted file mode 100644 index b23b07659abee..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_privatelinkresource.go +++ /dev/null @@ -1,139 +0,0 @@ -package accounts - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&PrivateLinkResourceId{}) -} - -var _ resourceids.ResourceId = &PrivateLinkResourceId{} - -// PrivateLinkResourceId is a struct representing the Resource ID for a Private Link Resource -type PrivateLinkResourceId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - PrivateLinkResourceName string -} - -// NewPrivateLinkResourceID returns a new PrivateLinkResourceId struct -func NewPrivateLinkResourceID(subscriptionId string, resourceGroupName string, mediaServiceName string, privateLinkResourceName string) PrivateLinkResourceId { - return PrivateLinkResourceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - PrivateLinkResourceName: privateLinkResourceName, - } -} - -// ParsePrivateLinkResourceID parses 'input' into a PrivateLinkResourceId -func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { - parser := resourceids.NewParserFromResourceIdType(&PrivateLinkResourceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParsePrivateLinkResourceIDInsensitively parses 'input' case-insensitively into a PrivateLinkResourceId -// note: this method should only be used for API response data and not user input -func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResourceId, error) { - parser := resourceids.NewParserFromResourceIdType(&PrivateLinkResourceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *PrivateLinkResourceId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.PrivateLinkResourceName, ok = input.Parsed["privateLinkResourceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "privateLinkResourceName", input) - } - - return nil -} - -// ValidatePrivateLinkResourceID checks that 'input' can be parsed as a Private Link Resource ID -func ValidatePrivateLinkResourceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePrivateLinkResourceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Private Link Resource ID -func (id PrivateLinkResourceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/privateLinkResources/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.PrivateLinkResourceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Private Link Resource ID -func (id PrivateLinkResourceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticPrivateLinkResources", "privateLinkResources", "privateLinkResources"), - resourceids.UserSpecifiedSegment("privateLinkResourceName", "privateLinkResourceValue"), - } -} - -// String returns a human-readable description of this Private Link Resource ID -func (id PrivateLinkResourceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Private Link Resource Name: %q", id.PrivateLinkResourceName), - } - return fmt.Sprintf("Private Link Resource (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_locationschecknameavailability.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_locationschecknameavailability.go deleted file mode 100644 index 6908d26e29534..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_locationschecknameavailability.go +++ /dev/null @@ -1,59 +0,0 @@ -package accounts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LocationsCheckNameAvailabilityOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *EntityNameAvailabilityCheckOutput -} - -// LocationsCheckNameAvailability ... -func (c AccountsClient) LocationsCheckNameAvailability(ctx context.Context, id LocationId, input CheckNameAvailabilityInput) (result LocationsCheckNameAvailabilityOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/checkNameAvailability", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model EntityNameAvailabilityCheckOutput - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_mediaservicescreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_mediaservicescreateorupdate.go deleted file mode 100644 index 675a8c60e19a5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_mediaservicescreateorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package accounts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaservicesCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *MediaService -} - -// MediaservicesCreateOrUpdate ... -func (c AccountsClient) MediaservicesCreateOrUpdate(ctx context.Context, id MediaServiceId, input MediaService) (result MediaservicesCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// MediaservicesCreateOrUpdateThenPoll performs MediaservicesCreateOrUpdate then polls until it's completed -func (c AccountsClient) MediaservicesCreateOrUpdateThenPoll(ctx context.Context, id MediaServiceId, input MediaService) error { - result, err := c.MediaservicesCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing MediaservicesCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after MediaservicesCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_mediaservicesdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_mediaservicesdelete.go deleted file mode 100644 index 1decea206324e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_mediaservicesdelete.go +++ /dev/null @@ -1,47 +0,0 @@ -package accounts - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaservicesDeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// MediaservicesDelete ... -func (c AccountsClient) MediaservicesDelete(ctx context.Context, id MediaServiceId) (result MediaservicesDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_mediaservicesget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_mediaservicesget.go deleted file mode 100644 index 23fbce7da14b0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_mediaservicesget.go +++ /dev/null @@ -1,54 +0,0 @@ -package accounts - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaservicesGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *MediaService -} - -// MediaservicesGet ... -func (c AccountsClient) MediaservicesGet(ctx context.Context, id MediaServiceId) (result MediaservicesGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model MediaService - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_mediaserviceslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_mediaserviceslist.go deleted file mode 100644 index 666c0be54d453..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_mediaserviceslist.go +++ /dev/null @@ -1,106 +0,0 @@ -package accounts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaservicesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]MediaService -} - -type MediaservicesListCompleteResult struct { - LatestHttpResponse *http.Response - Items []MediaService -} - -type MediaservicesListCustomPager struct { - NextLink *odata.Link `json:"@odata.nextLink"` -} - -func (p *MediaservicesListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// MediaservicesList ... -func (c AccountsClient) MediaservicesList(ctx context.Context, id commonids.ResourceGroupId) (result MediaservicesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &MediaservicesListCustomPager{}, - Path: fmt.Sprintf("%s/providers/Microsoft.Media/mediaServices", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]MediaService `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// MediaservicesListComplete retrieves all the results into a single object -func (c AccountsClient) MediaservicesListComplete(ctx context.Context, id commonids.ResourceGroupId) (MediaservicesListCompleteResult, error) { - return c.MediaservicesListCompleteMatchingPredicate(ctx, id, MediaServiceOperationPredicate{}) -} - -// MediaservicesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AccountsClient) MediaservicesListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate MediaServiceOperationPredicate) (result MediaservicesListCompleteResult, err error) { - items := make([]MediaService, 0) - - resp, err := c.MediaservicesList(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = MediaservicesListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_mediaserviceslistbysubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_mediaserviceslistbysubscription.go deleted file mode 100644 index 6dc5fdd923812..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_mediaserviceslistbysubscription.go +++ /dev/null @@ -1,106 +0,0 @@ -package accounts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaservicesListBySubscriptionOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]MediaService -} - -type MediaservicesListBySubscriptionCompleteResult struct { - LatestHttpResponse *http.Response - Items []MediaService -} - -type MediaservicesListBySubscriptionCustomPager struct { - NextLink *odata.Link `json:"@odata.nextLink"` -} - -func (p *MediaservicesListBySubscriptionCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// MediaservicesListBySubscription ... -func (c AccountsClient) MediaservicesListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result MediaservicesListBySubscriptionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &MediaservicesListBySubscriptionCustomPager{}, - Path: fmt.Sprintf("%s/providers/Microsoft.Media/mediaServices", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]MediaService `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// MediaservicesListBySubscriptionComplete retrieves all the results into a single object -func (c AccountsClient) MediaservicesListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (MediaservicesListBySubscriptionCompleteResult, error) { - return c.MediaservicesListBySubscriptionCompleteMatchingPredicate(ctx, id, MediaServiceOperationPredicate{}) -} - -// MediaservicesListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AccountsClient) MediaservicesListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate MediaServiceOperationPredicate) (result MediaservicesListBySubscriptionCompleteResult, err error) { - items := make([]MediaService, 0) - - resp, err := c.MediaservicesListBySubscription(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = MediaservicesListBySubscriptionCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_mediaserviceslistedgepolicies.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_mediaserviceslistedgepolicies.go deleted file mode 100644 index 6212e43dbd580..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_mediaserviceslistedgepolicies.go +++ /dev/null @@ -1,59 +0,0 @@ -package accounts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaservicesListEdgePoliciesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *EdgePolicies -} - -// MediaservicesListEdgePolicies ... -func (c AccountsClient) MediaservicesListEdgePolicies(ctx context.Context, id MediaServiceId, input ListEdgePoliciesInput) (result MediaservicesListEdgePoliciesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listEdgePolicies", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model EdgePolicies - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_mediaservicessyncstoragekeys.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_mediaservicessyncstoragekeys.go deleted file mode 100644 index 3c02fb1d62dfd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_mediaservicessyncstoragekeys.go +++ /dev/null @@ -1,51 +0,0 @@ -package accounts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaservicesSyncStorageKeysOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// MediaservicesSyncStorageKeys ... -func (c AccountsClient) MediaservicesSyncStorageKeys(ctx context.Context, id MediaServiceId, input SyncStorageKeysInput) (result MediaservicesSyncStorageKeysOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/syncStorageKeys", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_mediaservicesupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_mediaservicesupdate.go deleted file mode 100644 index 8b56e1d412c51..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_mediaservicesupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package accounts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaservicesUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *MediaService -} - -// MediaservicesUpdate ... -func (c AccountsClient) MediaservicesUpdate(ctx context.Context, id MediaServiceId, input MediaServiceUpdate) (result MediaservicesUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// MediaservicesUpdateThenPoll performs MediaservicesUpdate then polls until it's completed -func (c AccountsClient) MediaservicesUpdateThenPoll(ctx context.Context, id MediaServiceId, input MediaServiceUpdate) error { - result, err := c.MediaservicesUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing MediaservicesUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after MediaservicesUpdate: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_privateendpointconnectionscreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_privateendpointconnectionscreateorupdate.go deleted file mode 100644 index 88cbd35dbbe2e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_privateendpointconnectionscreateorupdate.go +++ /dev/null @@ -1,58 +0,0 @@ -package accounts - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionsCreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PrivateEndpointConnection -} - -// PrivateEndpointConnectionsCreateOrUpdate ... -func (c AccountsClient) PrivateEndpointConnectionsCreateOrUpdate(ctx context.Context, id PrivateEndpointConnectionId, input PrivateEndpointConnection) (result PrivateEndpointConnectionsCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model PrivateEndpointConnection - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_privateendpointconnectionsdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_privateendpointconnectionsdelete.go deleted file mode 100644 index f9d645e85060e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_privateendpointconnectionsdelete.go +++ /dev/null @@ -1,47 +0,0 @@ -package accounts - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionsDeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// PrivateEndpointConnectionsDelete ... -func (c AccountsClient) PrivateEndpointConnectionsDelete(ctx context.Context, id PrivateEndpointConnectionId) (result PrivateEndpointConnectionsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_privateendpointconnectionsget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_privateendpointconnectionsget.go deleted file mode 100644 index fddb80ecd586c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_privateendpointconnectionsget.go +++ /dev/null @@ -1,54 +0,0 @@ -package accounts - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PrivateEndpointConnection -} - -// PrivateEndpointConnectionsGet ... -func (c AccountsClient) PrivateEndpointConnectionsGet(ctx context.Context, id PrivateEndpointConnectionId) (result PrivateEndpointConnectionsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model PrivateEndpointConnection - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_privateendpointconnectionslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_privateendpointconnectionslist.go deleted file mode 100644 index 89ddb3788dad4..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_privateendpointconnectionslist.go +++ /dev/null @@ -1,55 +0,0 @@ -package accounts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PrivateEndpointConnectionListResult -} - -// PrivateEndpointConnectionsList ... -func (c AccountsClient) PrivateEndpointConnectionsList(ctx context.Context, id MediaServiceId) (result PrivateEndpointConnectionsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/privateEndpointConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model PrivateEndpointConnectionListResult - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_privatelinkresourcesget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_privatelinkresourcesget.go deleted file mode 100644 index ded606cdfebc0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_privatelinkresourcesget.go +++ /dev/null @@ -1,54 +0,0 @@ -package accounts - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkResourcesGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PrivateLinkResource -} - -// PrivateLinkResourcesGet ... -func (c AccountsClient) PrivateLinkResourcesGet(ctx context.Context, id PrivateLinkResourceId) (result PrivateLinkResourcesGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model PrivateLinkResource - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_privatelinkresourceslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_privatelinkresourceslist.go deleted file mode 100644 index 7f664570e7af2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/method_privatelinkresourceslist.go +++ /dev/null @@ -1,55 +0,0 @@ -package accounts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkResourcesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PrivateLinkResourceListResult -} - -// PrivateLinkResourcesList ... -func (c AccountsClient) PrivateLinkResourcesList(ctx context.Context, id MediaServiceId) (result PrivateLinkResourcesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/privateLinkResources", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model PrivateLinkResourceListResult - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_accesscontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_accesscontrol.go deleted file mode 100644 index cb23d677cbd7c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_accesscontrol.go +++ /dev/null @@ -1,9 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccessControl struct { - DefaultAction *DefaultAction `json:"defaultAction,omitempty"` - IPAllowList *[]string `json:"ipAllowList,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_accountencryption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_accountencryption.go deleted file mode 100644 index c8afd1e97d2c6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_accountencryption.go +++ /dev/null @@ -1,11 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountEncryption struct { - Identity *ResourceIdentity `json:"identity,omitempty"` - KeyVaultProperties *KeyVaultProperties `json:"keyVaultProperties,omitempty"` - Status *string `json:"status,omitempty"` - Type AccountEncryptionKeyType `json:"type"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_checknameavailabilityinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_checknameavailabilityinput.go deleted file mode 100644 index 707c4a0bdabaa..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_checknameavailabilityinput.go +++ /dev/null @@ -1,9 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CheckNameAvailabilityInput struct { - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_edgepolicies.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_edgepolicies.go deleted file mode 100644 index 1a11ba9b47489..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_edgepolicies.go +++ /dev/null @@ -1,8 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EdgePolicies struct { - UsageDataCollectionPolicy *EdgeUsageDataCollectionPolicy `json:"usageDataCollectionPolicy,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_edgeusagedatacollectionpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_edgeusagedatacollectionpolicy.go deleted file mode 100644 index f58117e0c59b8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_edgeusagedatacollectionpolicy.go +++ /dev/null @@ -1,11 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EdgeUsageDataCollectionPolicy struct { - DataCollectionFrequency *string `json:"dataCollectionFrequency,omitempty"` - DataReportingFrequency *string `json:"dataReportingFrequency,omitempty"` - EventHubDetails *EdgeUsageDataEventHub `json:"eventHubDetails,omitempty"` - MaxAllowedUnreportedUsageDuration *string `json:"maxAllowedUnreportedUsageDuration,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_edgeusagedataeventhub.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_edgeusagedataeventhub.go deleted file mode 100644 index 65ac7083283ad..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_edgeusagedataeventhub.go +++ /dev/null @@ -1,10 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EdgeUsageDataEventHub struct { - Name *string `json:"name,omitempty"` - Namespace *string `json:"namespace,omitempty"` - Token *string `json:"token,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_entitynameavailabilitycheckoutput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_entitynameavailabilitycheckoutput.go deleted file mode 100644 index 48f4c009d58d7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_entitynameavailabilitycheckoutput.go +++ /dev/null @@ -1,10 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EntityNameAvailabilityCheckOutput struct { - Message *string `json:"message,omitempty"` - NameAvailable bool `json:"nameAvailable"` - Reason *string `json:"reason,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_keydelivery.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_keydelivery.go deleted file mode 100644 index 029e697f45154..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_keydelivery.go +++ /dev/null @@ -1,8 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type KeyDelivery struct { - AccessControl *AccessControl `json:"accessControl,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_keyvaultproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_keyvaultproperties.go deleted file mode 100644 index f94833df69569..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_keyvaultproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type KeyVaultProperties struct { - CurrentKeyIdentifier *string `json:"currentKeyIdentifier,omitempty"` - KeyIdentifier *string `json:"keyIdentifier,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_listedgepoliciesinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_listedgepoliciesinput.go deleted file mode 100644 index accc1e3b05a72..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_listedgepoliciesinput.go +++ /dev/null @@ -1,8 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListEdgePoliciesInput struct { - DeviceId *string `json:"deviceId,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_mediaservice.go deleted file mode 100644 index 6d152f75964da..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_mediaservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package accounts - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaService struct { - Id *string `json:"id,omitempty"` - Identity *MediaServiceIdentity `json:"identity,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *MediaServiceProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_mediaserviceidentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_mediaserviceidentity.go deleted file mode 100644 index a41c4ac76cbed..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_mediaserviceidentity.go +++ /dev/null @@ -1,11 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaServiceIdentity struct { - PrincipalId *string `json:"principalId,omitempty"` - TenantId *string `json:"tenantId,omitempty"` - Type string `json:"type"` - UserAssignedIdentities *map[string]UserAssignedManagedIdentity `json:"userAssignedIdentities,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_mediaserviceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_mediaserviceproperties.go deleted file mode 100644 index ded08b3794d62..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_mediaserviceproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaServiceProperties struct { - Encryption *AccountEncryption `json:"encryption,omitempty"` - KeyDelivery *KeyDelivery `json:"keyDelivery,omitempty"` - MediaServiceId *string `json:"mediaServiceId,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` - StorageAccounts *[]StorageAccount `json:"storageAccounts,omitempty"` - StorageAuthentication *StorageAuthentication `json:"storageAuthentication,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_mediaserviceupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_mediaserviceupdate.go deleted file mode 100644 index cef382e6ba1ce..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_mediaserviceupdate.go +++ /dev/null @@ -1,10 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaServiceUpdate struct { - Identity *MediaServiceIdentity `json:"identity,omitempty"` - Properties *MediaServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_privateendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_privateendpoint.go deleted file mode 100644 index 02b184cde738b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_privateendpoint.go +++ /dev/null @@ -1,8 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Id *string `json:"id,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_privateendpointconnection.go deleted file mode 100644 index 133080ab8a2b2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_privateendpointconnection.go +++ /dev/null @@ -1,11 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_privateendpointconnectionlistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_privateendpointconnectionlistresult.go deleted file mode 100644 index 82d2b5727e1cb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_privateendpointconnectionlistresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionListResult struct { - Value *[]PrivateEndpointConnection `json:"value,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_privateendpointconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_privateendpointconnectionproperties.go deleted file mode 100644 index fbf3e1aa3377b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState"` - ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_privatelinkresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_privatelinkresource.go deleted file mode 100644 index dc2a3eb52827a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_privatelinkresource.go +++ /dev/null @@ -1,11 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkResource struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkResourceProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_privatelinkresourcelistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_privatelinkresourcelistresult.go deleted file mode 100644 index cc200b3f03a45..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_privatelinkresourcelistresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkResourceListResult struct { - Value *[]PrivateLinkResource `json:"value,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_privatelinkserviceconnectionstate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index c7ce04574ec7a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_resourceidentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_resourceidentity.go deleted file mode 100644 index 796fc46317eb8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_resourceidentity.go +++ /dev/null @@ -1,9 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceIdentity struct { - UseSystemAssignedIdentity bool `json:"useSystemAssignedIdentity"` - UserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_storageaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_storageaccount.go deleted file mode 100644 index 3afc4a12b9452..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_storageaccount.go +++ /dev/null @@ -1,11 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StorageAccount struct { - Id *string `json:"id,omitempty"` - Identity *ResourceIdentity `json:"identity,omitempty"` - Status *string `json:"status,omitempty"` - Type StorageAccountType `json:"type"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_syncstoragekeysinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_syncstoragekeysinput.go deleted file mode 100644 index af87a83128390..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_syncstoragekeysinput.go +++ /dev/null @@ -1,8 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SyncStorageKeysInput struct { - Id *string `json:"id,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_userassignedmanagedidentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_userassignedmanagedidentity.go deleted file mode 100644 index edeb611203441..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/model_userassignedmanagedidentity.go +++ /dev/null @@ -1,9 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UserAssignedManagedIdentity struct { - ClientId *string `json:"clientId,omitempty"` - PrincipalId *string `json:"principalId,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/predicates.go deleted file mode 100644 index 009ed7a3027b9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaServiceOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p MediaServiceOperationPredicate) Matches(input MediaService) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/version.go deleted file mode 100644 index 118154ce47b4f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package accounts - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/accounts/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/README.md deleted file mode 100644 index d93fecd494b1d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/README.md +++ /dev/null @@ -1,345 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters` Documentation - -The `assetsandassetfilters` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2021-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters" -``` - - -### Client Initialization - -```go -client := assetsandassetfilters.NewAssetsAndAssetFiltersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetFiltersCreateOrUpdate` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue", "assetFilterValue") - -payload := assetsandassetfilters.AssetFilter{ - // ... -} - - -read, err := client.AssetFiltersCreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetFiltersDelete` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue", "assetFilterValue") - -read, err := client.AssetFiltersDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetFiltersGet` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue", "assetFilterValue") - -read, err := client.AssetFiltersGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetFiltersList` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -// alternatively `client.AssetFiltersList(ctx, id)` can be used to do batched pagination -items, err := client.AssetFiltersListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetFiltersUpdate` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue", "assetFilterValue") - -payload := assetsandassetfilters.AssetFilter{ - // ... -} - - -read, err := client.AssetFiltersUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetsCreateOrUpdate` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -payload := assetsandassetfilters.Asset{ - // ... -} - - -read, err := client.AssetsCreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetsDelete` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -read, err := client.AssetsDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetsGet` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -read, err := client.AssetsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetsGetEncryptionKey` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -read, err := client.AssetsGetEncryptionKey(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetsList` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -// alternatively `client.AssetsList(ctx, id, assetsandassetfilters.DefaultAssetsListOperationOptions())` can be used to do batched pagination -items, err := client.AssetsListComplete(ctx, id, assetsandassetfilters.DefaultAssetsListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetsListContainerSas` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -payload := assetsandassetfilters.ListContainerSasInput{ - // ... -} - - -read, err := client.AssetsListContainerSas(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetsListStreamingLocators` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -read, err := client.AssetsListStreamingLocators(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetsUpdate` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -payload := assetsandassetfilters.Asset{ - // ... -} - - -read, err := client.AssetsUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.TracksCreateOrUpdate` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewTrackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue", "trackValue") - -payload := assetsandassetfilters.AssetTrack{ - // ... -} - - -if err := client.TracksCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.TracksDelete` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewTrackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue", "trackValue") - -if err := client.TracksDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.TracksGet` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewTrackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue", "trackValue") - -read, err := client.TracksGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.TracksList` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -read, err := client.TracksList(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.TracksUpdate` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewTrackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue", "trackValue") - -payload := assetsandassetfilters.AssetTrack{ - // ... -} - - -if err := client.TracksUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.TracksUpdateTrackData` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewTrackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue", "trackValue") - -if err := client.TracksUpdateTrackDataThenPoll(ctx, id); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/client.go deleted file mode 100644 index c1a18be1bf9c8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package assetsandassetfilters - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsAndAssetFiltersClient struct { - Client *resourcemanager.Client -} - -func NewAssetsAndAssetFiltersClientWithBaseURI(sdkApi sdkEnv.Api) (*AssetsAndAssetFiltersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "assetsandassetfilters", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating AssetsAndAssetFiltersClient: %+v", err) - } - - return &AssetsAndAssetFiltersClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/constants.go deleted file mode 100644 index d8954a48e7d70..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/constants.go +++ /dev/null @@ -1,274 +0,0 @@ -package assetsandassetfilters - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetContainerPermission string - -const ( - AssetContainerPermissionRead AssetContainerPermission = "Read" - AssetContainerPermissionReadWrite AssetContainerPermission = "ReadWrite" - AssetContainerPermissionReadWriteDelete AssetContainerPermission = "ReadWriteDelete" -) - -func PossibleValuesForAssetContainerPermission() []string { - return []string{ - string(AssetContainerPermissionRead), - string(AssetContainerPermissionReadWrite), - string(AssetContainerPermissionReadWriteDelete), - } -} - -func (s *AssetContainerPermission) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAssetContainerPermission(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAssetContainerPermission(input string) (*AssetContainerPermission, error) { - vals := map[string]AssetContainerPermission{ - "read": AssetContainerPermissionRead, - "readwrite": AssetContainerPermissionReadWrite, - "readwritedelete": AssetContainerPermissionReadWriteDelete, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AssetContainerPermission(input) - return &out, nil -} - -type AssetStorageEncryptionFormat string - -const ( - AssetStorageEncryptionFormatMediaStorageClientEncryption AssetStorageEncryptionFormat = "MediaStorageClientEncryption" - AssetStorageEncryptionFormatNone AssetStorageEncryptionFormat = "None" -) - -func PossibleValuesForAssetStorageEncryptionFormat() []string { - return []string{ - string(AssetStorageEncryptionFormatMediaStorageClientEncryption), - string(AssetStorageEncryptionFormatNone), - } -} - -func (s *AssetStorageEncryptionFormat) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAssetStorageEncryptionFormat(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAssetStorageEncryptionFormat(input string) (*AssetStorageEncryptionFormat, error) { - vals := map[string]AssetStorageEncryptionFormat{ - "mediastorageclientencryption": AssetStorageEncryptionFormatMediaStorageClientEncryption, - "none": AssetStorageEncryptionFormatNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AssetStorageEncryptionFormat(input) - return &out, nil -} - -type FilterTrackPropertyCompareOperation string - -const ( - FilterTrackPropertyCompareOperationEqual FilterTrackPropertyCompareOperation = "Equal" - FilterTrackPropertyCompareOperationNotEqual FilterTrackPropertyCompareOperation = "NotEqual" -) - -func PossibleValuesForFilterTrackPropertyCompareOperation() []string { - return []string{ - string(FilterTrackPropertyCompareOperationEqual), - string(FilterTrackPropertyCompareOperationNotEqual), - } -} - -func (s *FilterTrackPropertyCompareOperation) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFilterTrackPropertyCompareOperation(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFilterTrackPropertyCompareOperation(input string) (*FilterTrackPropertyCompareOperation, error) { - vals := map[string]FilterTrackPropertyCompareOperation{ - "equal": FilterTrackPropertyCompareOperationEqual, - "notequal": FilterTrackPropertyCompareOperationNotEqual, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FilterTrackPropertyCompareOperation(input) - return &out, nil -} - -type FilterTrackPropertyType string - -const ( - FilterTrackPropertyTypeBitrate FilterTrackPropertyType = "Bitrate" - FilterTrackPropertyTypeFourCC FilterTrackPropertyType = "FourCC" - FilterTrackPropertyTypeLanguage FilterTrackPropertyType = "Language" - FilterTrackPropertyTypeName FilterTrackPropertyType = "Name" - FilterTrackPropertyTypeType FilterTrackPropertyType = "Type" - FilterTrackPropertyTypeUnknown FilterTrackPropertyType = "Unknown" -) - -func PossibleValuesForFilterTrackPropertyType() []string { - return []string{ - string(FilterTrackPropertyTypeBitrate), - string(FilterTrackPropertyTypeFourCC), - string(FilterTrackPropertyTypeLanguage), - string(FilterTrackPropertyTypeName), - string(FilterTrackPropertyTypeType), - string(FilterTrackPropertyTypeUnknown), - } -} - -func (s *FilterTrackPropertyType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFilterTrackPropertyType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFilterTrackPropertyType(input string) (*FilterTrackPropertyType, error) { - vals := map[string]FilterTrackPropertyType{ - "bitrate": FilterTrackPropertyTypeBitrate, - "fourcc": FilterTrackPropertyTypeFourCC, - "language": FilterTrackPropertyTypeLanguage, - "name": FilterTrackPropertyTypeName, - "type": FilterTrackPropertyTypeType, - "unknown": FilterTrackPropertyTypeUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FilterTrackPropertyType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateInProgress ProvisioningState = "InProgress" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateFailed), - string(ProvisioningStateInProgress), - string(ProvisioningStateSucceeded), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "failed": ProvisioningStateFailed, - "inprogress": ProvisioningStateInProgress, - "succeeded": ProvisioningStateSucceeded, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type Visibility string - -const ( - VisibilityHidden Visibility = "Hidden" - VisibilityVisible Visibility = "Visible" -) - -func PossibleValuesForVisibility() []string { - return []string{ - string(VisibilityHidden), - string(VisibilityVisible), - } -} - -func (s *Visibility) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVisibility(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVisibility(input string) (*Visibility, error) { - vals := map[string]Visibility{ - "hidden": VisibilityHidden, - "visible": VisibilityVisible, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Visibility(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_asset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_asset.go deleted file mode 100644 index 098a1cbed8058..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_asset.go +++ /dev/null @@ -1,139 +0,0 @@ -package assetsandassetfilters - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&AssetId{}) -} - -var _ resourceids.ResourceId = &AssetId{} - -// AssetId is a struct representing the Resource ID for a Asset -type AssetId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - AssetName string -} - -// NewAssetID returns a new AssetId struct -func NewAssetID(subscriptionId string, resourceGroupName string, mediaServiceName string, assetName string) AssetId { - return AssetId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - AssetName: assetName, - } -} - -// ParseAssetID parses 'input' into a AssetId -func ParseAssetID(input string) (*AssetId, error) { - parser := resourceids.NewParserFromResourceIdType(&AssetId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := AssetId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseAssetIDInsensitively parses 'input' case-insensitively into a AssetId -// note: this method should only be used for API response data and not user input -func ParseAssetIDInsensitively(input string) (*AssetId, error) { - parser := resourceids.NewParserFromResourceIdType(&AssetId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := AssetId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *AssetId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.AssetName, ok = input.Parsed["assetName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "assetName", input) - } - - return nil -} - -// ValidateAssetID checks that 'input' can be parsed as a Asset ID -func ValidateAssetID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseAssetID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Asset ID -func (id AssetId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/assets/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.AssetName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Asset ID -func (id AssetId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticAssets", "assets", "assets"), - resourceids.UserSpecifiedSegment("assetName", "assetValue"), - } -} - -// String returns a human-readable description of this Asset ID -func (id AssetId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Asset Name: %q", id.AssetName), - } - return fmt.Sprintf("Asset (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_assetfilter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_assetfilter.go deleted file mode 100644 index 3490c79c7ec32..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_assetfilter.go +++ /dev/null @@ -1,148 +0,0 @@ -package assetsandassetfilters - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&AssetFilterId{}) -} - -var _ resourceids.ResourceId = &AssetFilterId{} - -// AssetFilterId is a struct representing the Resource ID for a Asset Filter -type AssetFilterId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - AssetName string - AssetFilterName string -} - -// NewAssetFilterID returns a new AssetFilterId struct -func NewAssetFilterID(subscriptionId string, resourceGroupName string, mediaServiceName string, assetName string, assetFilterName string) AssetFilterId { - return AssetFilterId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - AssetName: assetName, - AssetFilterName: assetFilterName, - } -} - -// ParseAssetFilterID parses 'input' into a AssetFilterId -func ParseAssetFilterID(input string) (*AssetFilterId, error) { - parser := resourceids.NewParserFromResourceIdType(&AssetFilterId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := AssetFilterId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseAssetFilterIDInsensitively parses 'input' case-insensitively into a AssetFilterId -// note: this method should only be used for API response data and not user input -func ParseAssetFilterIDInsensitively(input string) (*AssetFilterId, error) { - parser := resourceids.NewParserFromResourceIdType(&AssetFilterId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := AssetFilterId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *AssetFilterId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.AssetName, ok = input.Parsed["assetName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "assetName", input) - } - - if id.AssetFilterName, ok = input.Parsed["assetFilterName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "assetFilterName", input) - } - - return nil -} - -// ValidateAssetFilterID checks that 'input' can be parsed as a Asset Filter ID -func ValidateAssetFilterID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseAssetFilterID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Asset Filter ID -func (id AssetFilterId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/assets/%s/assetFilters/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.AssetName, id.AssetFilterName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Asset Filter ID -func (id AssetFilterId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticAssets", "assets", "assets"), - resourceids.UserSpecifiedSegment("assetName", "assetValue"), - resourceids.StaticSegment("staticAssetFilters", "assetFilters", "assetFilters"), - resourceids.UserSpecifiedSegment("assetFilterName", "assetFilterValue"), - } -} - -// String returns a human-readable description of this Asset Filter ID -func (id AssetFilterId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Asset Name: %q", id.AssetName), - fmt.Sprintf("Asset Filter Name: %q", id.AssetFilterName), - } - return fmt.Sprintf("Asset Filter (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_mediaservice.go deleted file mode 100644 index 499b0bb4565df..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_mediaservice.go +++ /dev/null @@ -1,130 +0,0 @@ -package assetsandassetfilters - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&MediaServiceId{}) -} - -var _ resourceids.ResourceId = &MediaServiceId{} - -// MediaServiceId is a struct representing the Resource ID for a Media Service -type MediaServiceId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string -} - -// NewMediaServiceID returns a new MediaServiceId struct -func NewMediaServiceID(subscriptionId string, resourceGroupName string, mediaServiceName string) MediaServiceId { - return MediaServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - } -} - -// ParseMediaServiceID parses 'input' into a MediaServiceId -func ParseMediaServiceID(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseMediaServiceIDInsensitively parses 'input' case-insensitively into a MediaServiceId -// note: this method should only be used for API response data and not user input -func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *MediaServiceId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - return nil -} - -// ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID -func ValidateMediaServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMediaServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Media Service ID -func (id MediaServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Media Service ID -func (id MediaServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - } -} - -// String returns a human-readable description of this Media Service ID -func (id MediaServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - } - return fmt.Sprintf("Media Service (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_track.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_track.go deleted file mode 100644 index 68d441933c6a6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_track.go +++ /dev/null @@ -1,148 +0,0 @@ -package assetsandassetfilters - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&TrackId{}) -} - -var _ resourceids.ResourceId = &TrackId{} - -// TrackId is a struct representing the Resource ID for a Track -type TrackId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - AssetName string - TrackName string -} - -// NewTrackID returns a new TrackId struct -func NewTrackID(subscriptionId string, resourceGroupName string, mediaServiceName string, assetName string, trackName string) TrackId { - return TrackId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - AssetName: assetName, - TrackName: trackName, - } -} - -// ParseTrackID parses 'input' into a TrackId -func ParseTrackID(input string) (*TrackId, error) { - parser := resourceids.NewParserFromResourceIdType(&TrackId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := TrackId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseTrackIDInsensitively parses 'input' case-insensitively into a TrackId -// note: this method should only be used for API response data and not user input -func ParseTrackIDInsensitively(input string) (*TrackId, error) { - parser := resourceids.NewParserFromResourceIdType(&TrackId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := TrackId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *TrackId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.AssetName, ok = input.Parsed["assetName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "assetName", input) - } - - if id.TrackName, ok = input.Parsed["trackName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "trackName", input) - } - - return nil -} - -// ValidateTrackID checks that 'input' can be parsed as a Track ID -func ValidateTrackID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseTrackID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Track ID -func (id TrackId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/assets/%s/tracks/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.AssetName, id.TrackName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Track ID -func (id TrackId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticAssets", "assets", "assets"), - resourceids.UserSpecifiedSegment("assetName", "assetValue"), - resourceids.StaticSegment("staticTracks", "tracks", "tracks"), - resourceids.UserSpecifiedSegment("trackName", "trackValue"), - } -} - -// String returns a human-readable description of this Track ID -func (id TrackId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Asset Name: %q", id.AssetName), - fmt.Sprintf("Track Name: %q", id.TrackName), - } - return fmt.Sprintf("Track (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfilterscreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfilterscreateorupdate.go deleted file mode 100644 index 1838e0969b397..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfilterscreateorupdate.go +++ /dev/null @@ -1,59 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetFiltersCreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AssetFilter -} - -// AssetFiltersCreateOrUpdate ... -func (c AssetsAndAssetFiltersClient) AssetFiltersCreateOrUpdate(ctx context.Context, id AssetFilterId, input AssetFilter) (result AssetFiltersCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model AssetFilter - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfiltersdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfiltersdelete.go deleted file mode 100644 index 224f8a35be59d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfiltersdelete.go +++ /dev/null @@ -1,47 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetFiltersDeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// AssetFiltersDelete ... -func (c AssetsAndAssetFiltersClient) AssetFiltersDelete(ctx context.Context, id AssetFilterId) (result AssetFiltersDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfiltersget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfiltersget.go deleted file mode 100644 index e7ab587e979d6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfiltersget.go +++ /dev/null @@ -1,54 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetFiltersGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AssetFilter -} - -// AssetFiltersGet ... -func (c AssetsAndAssetFiltersClient) AssetFiltersGet(ctx context.Context, id AssetFilterId) (result AssetFiltersGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model AssetFilter - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfilterslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfilterslist.go deleted file mode 100644 index 479c554baa90d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfilterslist.go +++ /dev/null @@ -1,105 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetFiltersListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AssetFilter -} - -type AssetFiltersListCompleteResult struct { - LatestHttpResponse *http.Response - Items []AssetFilter -} - -type AssetFiltersListCustomPager struct { - NextLink *odata.Link `json:"@odata.nextLink"` -} - -func (p *AssetFiltersListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// AssetFiltersList ... -func (c AssetsAndAssetFiltersClient) AssetFiltersList(ctx context.Context, id AssetId) (result AssetFiltersListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &AssetFiltersListCustomPager{}, - Path: fmt.Sprintf("%s/assetFilters", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AssetFilter `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// AssetFiltersListComplete retrieves all the results into a single object -func (c AssetsAndAssetFiltersClient) AssetFiltersListComplete(ctx context.Context, id AssetId) (AssetFiltersListCompleteResult, error) { - return c.AssetFiltersListCompleteMatchingPredicate(ctx, id, AssetFilterOperationPredicate{}) -} - -// AssetFiltersListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AssetsAndAssetFiltersClient) AssetFiltersListCompleteMatchingPredicate(ctx context.Context, id AssetId, predicate AssetFilterOperationPredicate) (result AssetFiltersListCompleteResult, err error) { - items := make([]AssetFilter, 0) - - resp, err := c.AssetFiltersList(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = AssetFiltersListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfiltersupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfiltersupdate.go deleted file mode 100644 index 2a1014b4f8f76..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfiltersupdate.go +++ /dev/null @@ -1,58 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetFiltersUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AssetFilter -} - -// AssetFiltersUpdate ... -func (c AssetsAndAssetFiltersClient) AssetFiltersUpdate(ctx context.Context, id AssetFilterId, input AssetFilter) (result AssetFiltersUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model AssetFilter - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetscreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetscreateorupdate.go deleted file mode 100644 index 89aedab7073bb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetscreateorupdate.go +++ /dev/null @@ -1,59 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsCreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Asset -} - -// AssetsCreateOrUpdate ... -func (c AssetsAndAssetFiltersClient) AssetsCreateOrUpdate(ctx context.Context, id AssetId, input Asset) (result AssetsCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Asset - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsdelete.go deleted file mode 100644 index 76ff6c7f772bf..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsdelete.go +++ /dev/null @@ -1,47 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsDeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// AssetsDelete ... -func (c AssetsAndAssetFiltersClient) AssetsDelete(ctx context.Context, id AssetId) (result AssetsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsget.go deleted file mode 100644 index 0b1148a155f4e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsget.go +++ /dev/null @@ -1,54 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Asset -} - -// AssetsGet ... -func (c AssetsAndAssetFiltersClient) AssetsGet(ctx context.Context, id AssetId) (result AssetsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Asset - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsgetencryptionkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsgetencryptionkey.go deleted file mode 100644 index afbb605bfc56c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsgetencryptionkey.go +++ /dev/null @@ -1,55 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsGetEncryptionKeyOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *StorageEncryptedAssetDecryptionData -} - -// AssetsGetEncryptionKey ... -func (c AssetsAndAssetFiltersClient) AssetsGetEncryptionKey(ctx context.Context, id AssetId) (result AssetsGetEncryptionKeyOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getEncryptionKey", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model StorageEncryptedAssetDecryptionData - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetslist.go deleted file mode 100644 index dbcabd76de419..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetslist.go +++ /dev/null @@ -1,141 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]Asset -} - -type AssetsListCompleteResult struct { - LatestHttpResponse *http.Response - Items []Asset -} - -type AssetsListOperationOptions struct { - Filter *string - Orderby *string - Top *int64 -} - -func DefaultAssetsListOperationOptions() AssetsListOperationOptions { - return AssetsListOperationOptions{} -} - -func (o AssetsListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o AssetsListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o AssetsListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Filter != nil { - out.Append("$filter", fmt.Sprintf("%v", *o.Filter)) - } - if o.Orderby != nil { - out.Append("$orderby", fmt.Sprintf("%v", *o.Orderby)) - } - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -type AssetsListCustomPager struct { - NextLink *odata.Link `json:"@odata.nextLink"` -} - -func (p *AssetsListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// AssetsList ... -func (c AssetsAndAssetFiltersClient) AssetsList(ctx context.Context, id MediaServiceId, options AssetsListOperationOptions) (result AssetsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - OptionsObject: options, - Pager: &AssetsListCustomPager{}, - Path: fmt.Sprintf("%s/assets", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]Asset `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// AssetsListComplete retrieves all the results into a single object -func (c AssetsAndAssetFiltersClient) AssetsListComplete(ctx context.Context, id MediaServiceId, options AssetsListOperationOptions) (AssetsListCompleteResult, error) { - return c.AssetsListCompleteMatchingPredicate(ctx, id, options, AssetOperationPredicate{}) -} - -// AssetsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AssetsAndAssetFiltersClient) AssetsListCompleteMatchingPredicate(ctx context.Context, id MediaServiceId, options AssetsListOperationOptions, predicate AssetOperationPredicate) (result AssetsListCompleteResult, err error) { - items := make([]Asset, 0) - - resp, err := c.AssetsList(ctx, id, options) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = AssetsListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetslistcontainersas.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetslistcontainersas.go deleted file mode 100644 index 6b260dc998e55..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetslistcontainersas.go +++ /dev/null @@ -1,59 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsListContainerSasOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AssetContainerSas -} - -// AssetsListContainerSas ... -func (c AssetsAndAssetFiltersClient) AssetsListContainerSas(ctx context.Context, id AssetId, input ListContainerSasInput) (result AssetsListContainerSasOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listContainerSas", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model AssetContainerSas - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsliststreaminglocators.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsliststreaminglocators.go deleted file mode 100644 index bf0a792bdd0ee..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsliststreaminglocators.go +++ /dev/null @@ -1,55 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsListStreamingLocatorsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ListStreamingLocatorsResponse -} - -// AssetsListStreamingLocators ... -func (c AssetsAndAssetFiltersClient) AssetsListStreamingLocators(ctx context.Context, id AssetId) (result AssetsListStreamingLocatorsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listStreamingLocators", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ListStreamingLocatorsResponse - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsupdate.go deleted file mode 100644 index 43cc39feaf762..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsupdate.go +++ /dev/null @@ -1,58 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Asset -} - -// AssetsUpdate ... -func (c AssetsAndAssetFiltersClient) AssetsUpdate(ctx context.Context, id AssetId, input Asset) (result AssetsUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Asset - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_trackscreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_trackscreateorupdate.go deleted file mode 100644 index 1ca237ed38230..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_trackscreateorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TracksCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *AssetTrack -} - -// TracksCreateOrUpdate ... -func (c AssetsAndAssetFiltersClient) TracksCreateOrUpdate(ctx context.Context, id TrackId, input AssetTrack) (result TracksCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// TracksCreateOrUpdateThenPoll performs TracksCreateOrUpdate then polls until it's completed -func (c AssetsAndAssetFiltersClient) TracksCreateOrUpdateThenPoll(ctx context.Context, id TrackId, input AssetTrack) error { - result, err := c.TracksCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing TracksCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after TracksCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_tracksdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_tracksdelete.go deleted file mode 100644 index dea7472d06a94..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_tracksdelete.go +++ /dev/null @@ -1,70 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TracksDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// TracksDelete ... -func (c AssetsAndAssetFiltersClient) TracksDelete(ctx context.Context, id TrackId) (result TracksDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// TracksDeleteThenPoll performs TracksDelete then polls until it's completed -func (c AssetsAndAssetFiltersClient) TracksDeleteThenPoll(ctx context.Context, id TrackId) error { - result, err := c.TracksDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing TracksDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after TracksDelete: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_tracksget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_tracksget.go deleted file mode 100644 index e052691664933..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_tracksget.go +++ /dev/null @@ -1,54 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TracksGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AssetTrack -} - -// TracksGet ... -func (c AssetsAndAssetFiltersClient) TracksGet(ctx context.Context, id TrackId) (result TracksGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model AssetTrack - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_trackslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_trackslist.go deleted file mode 100644 index 308afb97c935b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_trackslist.go +++ /dev/null @@ -1,55 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TracksListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AssetTrackCollection -} - -// TracksList ... -func (c AssetsAndAssetFiltersClient) TracksList(ctx context.Context, id AssetId) (result TracksListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/tracks", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model AssetTrackCollection - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_tracksupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_tracksupdate.go deleted file mode 100644 index e018c79db7658..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_tracksupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TracksUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *AssetTrack -} - -// TracksUpdate ... -func (c AssetsAndAssetFiltersClient) TracksUpdate(ctx context.Context, id TrackId, input AssetTrack) (result TracksUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// TracksUpdateThenPoll performs TracksUpdate then polls until it's completed -func (c AssetsAndAssetFiltersClient) TracksUpdateThenPoll(ctx context.Context, id TrackId, input AssetTrack) error { - result, err := c.TracksUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing TracksUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after TracksUpdate: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_tracksupdatetrackdata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_tracksupdatetrackdata.go deleted file mode 100644 index 90026bab3e36a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/method_tracksupdatetrackdata.go +++ /dev/null @@ -1,69 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TracksUpdateTrackDataOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// TracksUpdateTrackData ... -func (c AssetsAndAssetFiltersClient) TracksUpdateTrackData(ctx context.Context, id TrackId) (result TracksUpdateTrackDataOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/updateTrackData", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// TracksUpdateTrackDataThenPoll performs TracksUpdateTrackData then polls until it's completed -func (c AssetsAndAssetFiltersClient) TracksUpdateTrackDataThenPoll(ctx context.Context, id TrackId) error { - result, err := c.TracksUpdateTrackData(ctx, id) - if err != nil { - return fmt.Errorf("performing TracksUpdateTrackData: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after TracksUpdateTrackData: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_asset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_asset.go deleted file mode 100644 index e28bbc5358def..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_asset.go +++ /dev/null @@ -1,16 +0,0 @@ -package assetsandassetfilters - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Asset struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AssetProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_assetcontainersas.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_assetcontainersas.go deleted file mode 100644 index af36c40966d4e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_assetcontainersas.go +++ /dev/null @@ -1,8 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetContainerSas struct { - AssetContainerSasUrls *[]string `json:"assetContainerSasUrls,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_assetfileencryptionmetadata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_assetfileencryptionmetadata.go deleted file mode 100644 index 75b8dccb16a47..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_assetfileencryptionmetadata.go +++ /dev/null @@ -1,10 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetFileEncryptionMetadata struct { - AssetFileId string `json:"assetFileId"` - AssetFileName *string `json:"assetFileName,omitempty"` - InitializationVector *string `json:"initializationVector,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_assetfilter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_assetfilter.go deleted file mode 100644 index 21cd7a2e7724f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_assetfilter.go +++ /dev/null @@ -1,16 +0,0 @@ -package assetsandassetfilters - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetFilter struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *MediaFilterProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_assetproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_assetproperties.go deleted file mode 100644 index 5127047160b8c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_assetproperties.go +++ /dev/null @@ -1,45 +0,0 @@ -package assetsandassetfilters - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetProperties struct { - AlternateId *string `json:"alternateId,omitempty"` - AssetId *string `json:"assetId,omitempty"` - Container *string `json:"container,omitempty"` - Created *string `json:"created,omitempty"` - Description *string `json:"description,omitempty"` - LastModified *string `json:"lastModified,omitempty"` - StorageAccountName *string `json:"storageAccountName,omitempty"` - StorageEncryptionFormat *AssetStorageEncryptionFormat `json:"storageEncryptionFormat,omitempty"` -} - -func (o *AssetProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *AssetProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *AssetProperties) GetLastModifiedAsTime() (*time.Time, error) { - if o.LastModified == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModified, "2006-01-02T15:04:05Z07:00") -} - -func (o *AssetProperties) SetLastModifiedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModified = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_assetstreaminglocator.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_assetstreaminglocator.go deleted file mode 100644 index d72048fce46eb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_assetstreaminglocator.go +++ /dev/null @@ -1,57 +0,0 @@ -package assetsandassetfilters - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetStreamingLocator struct { - AssetName *string `json:"assetName,omitempty"` - Created *string `json:"created,omitempty"` - DefaultContentKeyPolicyName *string `json:"defaultContentKeyPolicyName,omitempty"` - EndTime *string `json:"endTime,omitempty"` - Name *string `json:"name,omitempty"` - StartTime *string `json:"startTime,omitempty"` - StreamingLocatorId *string `json:"streamingLocatorId,omitempty"` - StreamingPolicyName *string `json:"streamingPolicyName,omitempty"` -} - -func (o *AssetStreamingLocator) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *AssetStreamingLocator) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *AssetStreamingLocator) GetEndTimeAsTime() (*time.Time, error) { - if o.EndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *AssetStreamingLocator) SetEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndTime = &formatted -} - -func (o *AssetStreamingLocator) GetStartTimeAsTime() (*time.Time, error) { - if o.StartTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *AssetStreamingLocator) SetStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartTime = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_assettrack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_assettrack.go deleted file mode 100644 index 0e2a19301f170..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_assettrack.go +++ /dev/null @@ -1,11 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetTrack struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AssetTrackProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_assettrackcollection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_assettrackcollection.go deleted file mode 100644 index 8cf532f70dfe4..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_assettrackcollection.go +++ /dev/null @@ -1,8 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetTrackCollection struct { - Value *[]AssetTrack `json:"value,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_assettrackproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_assettrackproperties.go deleted file mode 100644 index 54fa37667d382..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_assettrackproperties.go +++ /dev/null @@ -1,40 +0,0 @@ -package assetsandassetfilters - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetTrackProperties struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Track TrackBase `json:"track"` -} - -var _ json.Unmarshaler = &AssetTrackProperties{} - -func (s *AssetTrackProperties) UnmarshalJSON(bytes []byte) error { - type alias AssetTrackProperties - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into AssetTrackProperties: %+v", err) - } - - s.ProvisioningState = decoded.ProvisioningState - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling AssetTrackProperties into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["track"]; ok { - impl, err := unmarshalTrackBaseImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Track' for 'AssetTrackProperties': %+v", err) - } - s.Track = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_audiotrack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_audiotrack.go deleted file mode 100644 index 3f575dcca9c83..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_audiotrack.go +++ /dev/null @@ -1,40 +0,0 @@ -package assetsandassetfilters - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ TrackBase = AudioTrack{} - -type AudioTrack struct { - - // Fields inherited from TrackBase -} - -var _ json.Marshaler = AudioTrack{} - -func (s AudioTrack) MarshalJSON() ([]byte, error) { - type wrapper AudioTrack - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AudioTrack: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AudioTrack: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.AudioTrack" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AudioTrack: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_filtertrackpropertycondition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_filtertrackpropertycondition.go deleted file mode 100644 index cc9cd652d8bb8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_filtertrackpropertycondition.go +++ /dev/null @@ -1,10 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FilterTrackPropertyCondition struct { - Operation FilterTrackPropertyCompareOperation `json:"operation"` - Property FilterTrackPropertyType `json:"property"` - Value string `json:"value"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_filtertrackselection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_filtertrackselection.go deleted file mode 100644 index a8a78cd8dd36b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_filtertrackselection.go +++ /dev/null @@ -1,8 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FilterTrackSelection struct { - TrackSelections []FilterTrackPropertyCondition `json:"trackSelections"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_firstquality.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_firstquality.go deleted file mode 100644 index f8043a2c2625a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_firstquality.go +++ /dev/null @@ -1,8 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirstQuality struct { - Bitrate int64 `json:"bitrate"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_hlssettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_hlssettings.go deleted file mode 100644 index 7d6ef9316b414..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_hlssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HlsSettings struct { - Characteristics *string `json:"characteristics,omitempty"` - Default *bool `json:"default,omitempty"` - Forced *bool `json:"forced,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_listcontainersasinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_listcontainersasinput.go deleted file mode 100644 index 40c9e957818b9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_listcontainersasinput.go +++ /dev/null @@ -1,27 +0,0 @@ -package assetsandassetfilters - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListContainerSasInput struct { - ExpiryTime *string `json:"expiryTime,omitempty"` - Permissions *AssetContainerPermission `json:"permissions,omitempty"` -} - -func (o *ListContainerSasInput) GetExpiryTimeAsTime() (*time.Time, error) { - if o.ExpiryTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ExpiryTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *ListContainerSasInput) SetExpiryTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ExpiryTime = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_liststreaminglocatorsresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_liststreaminglocatorsresponse.go deleted file mode 100644 index 816c7e9dc16d1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_liststreaminglocatorsresponse.go +++ /dev/null @@ -1,8 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListStreamingLocatorsResponse struct { - StreamingLocators *[]AssetStreamingLocator `json:"streamingLocators,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_mediafilterproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_mediafilterproperties.go deleted file mode 100644 index 76f8bb211d07e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_mediafilterproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaFilterProperties struct { - FirstQuality *FirstQuality `json:"firstQuality,omitempty"` - PresentationTimeRange *PresentationTimeRange `json:"presentationTimeRange,omitempty"` - Tracks *[]FilterTrackSelection `json:"tracks,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_presentationtimerange.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_presentationtimerange.go deleted file mode 100644 index 37c9d4fd171d4..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_presentationtimerange.go +++ /dev/null @@ -1,13 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PresentationTimeRange struct { - EndTimestamp *int64 `json:"endTimestamp,omitempty"` - ForceEndTimestamp *bool `json:"forceEndTimestamp,omitempty"` - LiveBackoffDuration *int64 `json:"liveBackoffDuration,omitempty"` - PresentationWindowDuration *int64 `json:"presentationWindowDuration,omitempty"` - StartTimestamp *int64 `json:"startTimestamp,omitempty"` - Timescale *int64 `json:"timescale,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_storageencryptedassetdecryptiondata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_storageencryptedassetdecryptiondata.go deleted file mode 100644 index 33ae81cea0d16..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_storageencryptedassetdecryptiondata.go +++ /dev/null @@ -1,9 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StorageEncryptedAssetDecryptionData struct { - AssetFileEncryptionMetadata *[]AssetFileEncryptionMetadata `json:"assetFileEncryptionMetadata,omitempty"` - Key *string `json:"key,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_texttrack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_texttrack.go deleted file mode 100644 index 8be1279bab0c1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_texttrack.go +++ /dev/null @@ -1,45 +0,0 @@ -package assetsandassetfilters - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ TrackBase = TextTrack{} - -type TextTrack struct { - DisplayName *string `json:"displayName,omitempty"` - FileName *string `json:"fileName,omitempty"` - HlsSettings *HlsSettings `json:"hlsSettings,omitempty"` - LanguageCode *string `json:"languageCode,omitempty"` - PlayerVisibility *Visibility `json:"playerVisibility,omitempty"` - - // Fields inherited from TrackBase -} - -var _ json.Marshaler = TextTrack{} - -func (s TextTrack) MarshalJSON() ([]byte, error) { - type wrapper TextTrack - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling TextTrack: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling TextTrack: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.TextTrack" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling TextTrack: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_trackbase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_trackbase.go deleted file mode 100644 index 46a24e0d7cc39..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_trackbase.go +++ /dev/null @@ -1,69 +0,0 @@ -package assetsandassetfilters - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrackBase interface { -} - -// RawTrackBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawTrackBaseImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalTrackBaseImplementation(input []byte) (TrackBase, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling TrackBase into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.AudioTrack") { - var out AudioTrack - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AudioTrack: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.TextTrack") { - var out TextTrack - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into TextTrack: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.VideoTrack") { - var out VideoTrack - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into VideoTrack: %+v", err) - } - return out, nil - } - - out := RawTrackBaseImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_videotrack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_videotrack.go deleted file mode 100644 index c3a2548082db6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/model_videotrack.go +++ /dev/null @@ -1,40 +0,0 @@ -package assetsandassetfilters - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ TrackBase = VideoTrack{} - -type VideoTrack struct { - - // Fields inherited from TrackBase -} - -var _ json.Marshaler = VideoTrack{} - -func (s VideoTrack) MarshalJSON() ([]byte, error) { - type wrapper VideoTrack - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling VideoTrack: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling VideoTrack: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.VideoTrack" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling VideoTrack: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/predicates.go deleted file mode 100644 index edfee529cb2b8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/predicates.go +++ /dev/null @@ -1,50 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p AssetOperationPredicate) Matches(input Asset) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type AssetFilterOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p AssetFilterOperationPredicate) Matches(input AssetFilter) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/version.go deleted file mode 100644 index f1ff0c1438e0e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package assetsandassetfilters - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/assetsandassetfilters/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/client.go deleted file mode 100644 index e89cc54e61de9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/client.go +++ /dev/null @@ -1,100 +0,0 @@ -package v2021_11_01 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -type Client struct { - AccountFilters *accountfilters.AccountFiltersClient - Accounts *accounts.AccountsClient - AssetsAndAssetFilters *assetsandassetfilters.AssetsAndAssetFiltersClient - ContentKeyPolicies *contentkeypolicies.ContentKeyPoliciesClient - Encodings *encodings.EncodingsClient - LiveEvents *liveevents.LiveEventsClient - LiveOutputs *liveoutputs.LiveOutputsClient - StreamingEndpoints *streamingendpoints.StreamingEndpointsClient - StreamingPoliciesAndStreamingLocators *streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient -} - -func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { - accountFiltersClient, err := accountfilters.NewAccountFiltersClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building AccountFilters client: %+v", err) - } - configureFunc(accountFiltersClient.Client) - - accountsClient, err := accounts.NewAccountsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Accounts client: %+v", err) - } - configureFunc(accountsClient.Client) - - assetsAndAssetFiltersClient, err := assetsandassetfilters.NewAssetsAndAssetFiltersClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building AssetsAndAssetFilters client: %+v", err) - } - configureFunc(assetsAndAssetFiltersClient.Client) - - contentKeyPoliciesClient, err := contentkeypolicies.NewContentKeyPoliciesClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ContentKeyPolicies client: %+v", err) - } - configureFunc(contentKeyPoliciesClient.Client) - - encodingsClient, err := encodings.NewEncodingsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Encodings client: %+v", err) - } - configureFunc(encodingsClient.Client) - - liveEventsClient, err := liveevents.NewLiveEventsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building LiveEvents client: %+v", err) - } - configureFunc(liveEventsClient.Client) - - liveOutputsClient, err := liveoutputs.NewLiveOutputsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building LiveOutputs client: %+v", err) - } - configureFunc(liveOutputsClient.Client) - - streamingEndpointsClient, err := streamingendpoints.NewStreamingEndpointsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building StreamingEndpoints client: %+v", err) - } - configureFunc(streamingEndpointsClient.Client) - - streamingPoliciesAndStreamingLocatorsClient, err := streamingpoliciesandstreaminglocators.NewStreamingPoliciesAndStreamingLocatorsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building StreamingPoliciesAndStreamingLocators client: %+v", err) - } - configureFunc(streamingPoliciesAndStreamingLocatorsClient.Client) - - return &Client{ - AccountFilters: accountFiltersClient, - Accounts: accountsClient, - AssetsAndAssetFilters: assetsAndAssetFiltersClient, - ContentKeyPolicies: contentKeyPoliciesClient, - Encodings: encodingsClient, - LiveEvents: liveEventsClient, - LiveOutputs: liveOutputsClient, - StreamingEndpoints: streamingEndpointsClient, - StreamingPoliciesAndStreamingLocators: streamingPoliciesAndStreamingLocatorsClient, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/README.md deleted file mode 100644 index 6ac6842aecbc2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/README.md +++ /dev/null @@ -1,127 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies` Documentation - -The `contentkeypolicies` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2021-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies" -``` - - -### Client Initialization - -```go -client := contentkeypolicies.NewContentKeyPoliciesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ContentKeyPoliciesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := contentkeypolicies.NewContentKeyPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "contentKeyPolicyValue") - -payload := contentkeypolicies.ContentKeyPolicy{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ContentKeyPoliciesClient.Delete` - -```go -ctx := context.TODO() -id := contentkeypolicies.NewContentKeyPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "contentKeyPolicyValue") - -read, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ContentKeyPoliciesClient.Get` - -```go -ctx := context.TODO() -id := contentkeypolicies.NewContentKeyPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "contentKeyPolicyValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ContentKeyPoliciesClient.GetPolicyPropertiesWithSecrets` - -```go -ctx := context.TODO() -id := contentkeypolicies.NewContentKeyPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "contentKeyPolicyValue") - -read, err := client.GetPolicyPropertiesWithSecrets(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ContentKeyPoliciesClient.List` - -```go -ctx := context.TODO() -id := contentkeypolicies.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -// alternatively `client.List(ctx, id, contentkeypolicies.DefaultListOperationOptions())` can be used to do batched pagination -items, err := client.ListComplete(ctx, id, contentkeypolicies.DefaultListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ContentKeyPoliciesClient.Update` - -```go -ctx := context.TODO() -id := contentkeypolicies.NewContentKeyPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "contentKeyPolicyValue") - -payload := contentkeypolicies.ContentKeyPolicy{ - // ... -} - - -read, err := client.Update(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/client.go deleted file mode 100644 index 528842e6d8aa1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package contentkeypolicies - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPoliciesClient struct { - Client *resourcemanager.Client -} - -func NewContentKeyPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ContentKeyPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "contentkeypolicies", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ContentKeyPoliciesClient: %+v", err) - } - - return &ContentKeyPoliciesClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/constants.go deleted file mode 100644 index 67ee725af44ce..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/constants.go +++ /dev/null @@ -1,242 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyFairPlayRentalAndLeaseKeyType string - -const ( - ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeDualExpiry ContentKeyPolicyFairPlayRentalAndLeaseKeyType = "DualExpiry" - ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentLimited ContentKeyPolicyFairPlayRentalAndLeaseKeyType = "PersistentLimited" - ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentUnlimited ContentKeyPolicyFairPlayRentalAndLeaseKeyType = "PersistentUnlimited" - ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUndefined ContentKeyPolicyFairPlayRentalAndLeaseKeyType = "Undefined" - ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUnknown ContentKeyPolicyFairPlayRentalAndLeaseKeyType = "Unknown" -) - -func PossibleValuesForContentKeyPolicyFairPlayRentalAndLeaseKeyType() []string { - return []string{ - string(ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeDualExpiry), - string(ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentLimited), - string(ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentUnlimited), - string(ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUndefined), - string(ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUnknown), - } -} - -func (s *ContentKeyPolicyFairPlayRentalAndLeaseKeyType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseContentKeyPolicyFairPlayRentalAndLeaseKeyType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseContentKeyPolicyFairPlayRentalAndLeaseKeyType(input string) (*ContentKeyPolicyFairPlayRentalAndLeaseKeyType, error) { - vals := map[string]ContentKeyPolicyFairPlayRentalAndLeaseKeyType{ - "dualexpiry": ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeDualExpiry, - "persistentlimited": ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentLimited, - "persistentunlimited": ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentUnlimited, - "undefined": ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUndefined, - "unknown": ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ContentKeyPolicyFairPlayRentalAndLeaseKeyType(input) - return &out, nil -} - -type ContentKeyPolicyPlayReadyContentType string - -const ( - ContentKeyPolicyPlayReadyContentTypeUltraVioletDownload ContentKeyPolicyPlayReadyContentType = "UltraVioletDownload" - ContentKeyPolicyPlayReadyContentTypeUltraVioletStreaming ContentKeyPolicyPlayReadyContentType = "UltraVioletStreaming" - ContentKeyPolicyPlayReadyContentTypeUnknown ContentKeyPolicyPlayReadyContentType = "Unknown" - ContentKeyPolicyPlayReadyContentTypeUnspecified ContentKeyPolicyPlayReadyContentType = "Unspecified" -) - -func PossibleValuesForContentKeyPolicyPlayReadyContentType() []string { - return []string{ - string(ContentKeyPolicyPlayReadyContentTypeUltraVioletDownload), - string(ContentKeyPolicyPlayReadyContentTypeUltraVioletStreaming), - string(ContentKeyPolicyPlayReadyContentTypeUnknown), - string(ContentKeyPolicyPlayReadyContentTypeUnspecified), - } -} - -func (s *ContentKeyPolicyPlayReadyContentType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseContentKeyPolicyPlayReadyContentType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseContentKeyPolicyPlayReadyContentType(input string) (*ContentKeyPolicyPlayReadyContentType, error) { - vals := map[string]ContentKeyPolicyPlayReadyContentType{ - "ultravioletdownload": ContentKeyPolicyPlayReadyContentTypeUltraVioletDownload, - "ultravioletstreaming": ContentKeyPolicyPlayReadyContentTypeUltraVioletStreaming, - "unknown": ContentKeyPolicyPlayReadyContentTypeUnknown, - "unspecified": ContentKeyPolicyPlayReadyContentTypeUnspecified, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ContentKeyPolicyPlayReadyContentType(input) - return &out, nil -} - -type ContentKeyPolicyPlayReadyLicenseType string - -const ( - ContentKeyPolicyPlayReadyLicenseTypeNonPersistent ContentKeyPolicyPlayReadyLicenseType = "NonPersistent" - ContentKeyPolicyPlayReadyLicenseTypePersistent ContentKeyPolicyPlayReadyLicenseType = "Persistent" - ContentKeyPolicyPlayReadyLicenseTypeUnknown ContentKeyPolicyPlayReadyLicenseType = "Unknown" -) - -func PossibleValuesForContentKeyPolicyPlayReadyLicenseType() []string { - return []string{ - string(ContentKeyPolicyPlayReadyLicenseTypeNonPersistent), - string(ContentKeyPolicyPlayReadyLicenseTypePersistent), - string(ContentKeyPolicyPlayReadyLicenseTypeUnknown), - } -} - -func (s *ContentKeyPolicyPlayReadyLicenseType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseContentKeyPolicyPlayReadyLicenseType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseContentKeyPolicyPlayReadyLicenseType(input string) (*ContentKeyPolicyPlayReadyLicenseType, error) { - vals := map[string]ContentKeyPolicyPlayReadyLicenseType{ - "nonpersistent": ContentKeyPolicyPlayReadyLicenseTypeNonPersistent, - "persistent": ContentKeyPolicyPlayReadyLicenseTypePersistent, - "unknown": ContentKeyPolicyPlayReadyLicenseTypeUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ContentKeyPolicyPlayReadyLicenseType(input) - return &out, nil -} - -type ContentKeyPolicyPlayReadyUnknownOutputPassingOption string - -const ( - ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowed ContentKeyPolicyPlayReadyUnknownOutputPassingOption = "Allowed" - ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowedWithVideoConstriction ContentKeyPolicyPlayReadyUnknownOutputPassingOption = "AllowedWithVideoConstriction" - ContentKeyPolicyPlayReadyUnknownOutputPassingOptionNotAllowed ContentKeyPolicyPlayReadyUnknownOutputPassingOption = "NotAllowed" - ContentKeyPolicyPlayReadyUnknownOutputPassingOptionUnknown ContentKeyPolicyPlayReadyUnknownOutputPassingOption = "Unknown" -) - -func PossibleValuesForContentKeyPolicyPlayReadyUnknownOutputPassingOption() []string { - return []string{ - string(ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowed), - string(ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowedWithVideoConstriction), - string(ContentKeyPolicyPlayReadyUnknownOutputPassingOptionNotAllowed), - string(ContentKeyPolicyPlayReadyUnknownOutputPassingOptionUnknown), - } -} - -func (s *ContentKeyPolicyPlayReadyUnknownOutputPassingOption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseContentKeyPolicyPlayReadyUnknownOutputPassingOption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseContentKeyPolicyPlayReadyUnknownOutputPassingOption(input string) (*ContentKeyPolicyPlayReadyUnknownOutputPassingOption, error) { - vals := map[string]ContentKeyPolicyPlayReadyUnknownOutputPassingOption{ - "allowed": ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowed, - "allowedwithvideoconstriction": ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowedWithVideoConstriction, - "notallowed": ContentKeyPolicyPlayReadyUnknownOutputPassingOptionNotAllowed, - "unknown": ContentKeyPolicyPlayReadyUnknownOutputPassingOptionUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ContentKeyPolicyPlayReadyUnknownOutputPassingOption(input) - return &out, nil -} - -type ContentKeyPolicyRestrictionTokenType string - -const ( - ContentKeyPolicyRestrictionTokenTypeJwt ContentKeyPolicyRestrictionTokenType = "Jwt" - ContentKeyPolicyRestrictionTokenTypeSwt ContentKeyPolicyRestrictionTokenType = "Swt" - ContentKeyPolicyRestrictionTokenTypeUnknown ContentKeyPolicyRestrictionTokenType = "Unknown" -) - -func PossibleValuesForContentKeyPolicyRestrictionTokenType() []string { - return []string{ - string(ContentKeyPolicyRestrictionTokenTypeJwt), - string(ContentKeyPolicyRestrictionTokenTypeSwt), - string(ContentKeyPolicyRestrictionTokenTypeUnknown), - } -} - -func (s *ContentKeyPolicyRestrictionTokenType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseContentKeyPolicyRestrictionTokenType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseContentKeyPolicyRestrictionTokenType(input string) (*ContentKeyPolicyRestrictionTokenType, error) { - vals := map[string]ContentKeyPolicyRestrictionTokenType{ - "jwt": ContentKeyPolicyRestrictionTokenTypeJwt, - "swt": ContentKeyPolicyRestrictionTokenTypeSwt, - "unknown": ContentKeyPolicyRestrictionTokenTypeUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ContentKeyPolicyRestrictionTokenType(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/id_contentkeypolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/id_contentkeypolicy.go deleted file mode 100644 index f96b6b7060829..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/id_contentkeypolicy.go +++ /dev/null @@ -1,139 +0,0 @@ -package contentkeypolicies - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&ContentKeyPolicyId{}) -} - -var _ resourceids.ResourceId = &ContentKeyPolicyId{} - -// ContentKeyPolicyId is a struct representing the Resource ID for a Content Key Policy -type ContentKeyPolicyId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - ContentKeyPolicyName string -} - -// NewContentKeyPolicyID returns a new ContentKeyPolicyId struct -func NewContentKeyPolicyID(subscriptionId string, resourceGroupName string, mediaServiceName string, contentKeyPolicyName string) ContentKeyPolicyId { - return ContentKeyPolicyId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - ContentKeyPolicyName: contentKeyPolicyName, - } -} - -// ParseContentKeyPolicyID parses 'input' into a ContentKeyPolicyId -func ParseContentKeyPolicyID(input string) (*ContentKeyPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(&ContentKeyPolicyId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ContentKeyPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseContentKeyPolicyIDInsensitively parses 'input' case-insensitively into a ContentKeyPolicyId -// note: this method should only be used for API response data and not user input -func ParseContentKeyPolicyIDInsensitively(input string) (*ContentKeyPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(&ContentKeyPolicyId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ContentKeyPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *ContentKeyPolicyId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.ContentKeyPolicyName, ok = input.Parsed["contentKeyPolicyName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "contentKeyPolicyName", input) - } - - return nil -} - -// ValidateContentKeyPolicyID checks that 'input' can be parsed as a Content Key Policy ID -func ValidateContentKeyPolicyID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseContentKeyPolicyID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Content Key Policy ID -func (id ContentKeyPolicyId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/contentKeyPolicies/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.ContentKeyPolicyName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Content Key Policy ID -func (id ContentKeyPolicyId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticContentKeyPolicies", "contentKeyPolicies", "contentKeyPolicies"), - resourceids.UserSpecifiedSegment("contentKeyPolicyName", "contentKeyPolicyValue"), - } -} - -// String returns a human-readable description of this Content Key Policy ID -func (id ContentKeyPolicyId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Content Key Policy Name: %q", id.ContentKeyPolicyName), - } - return fmt.Sprintf("Content Key Policy (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/id_mediaservice.go deleted file mode 100644 index abd916a436f9c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/id_mediaservice.go +++ /dev/null @@ -1,130 +0,0 @@ -package contentkeypolicies - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&MediaServiceId{}) -} - -var _ resourceids.ResourceId = &MediaServiceId{} - -// MediaServiceId is a struct representing the Resource ID for a Media Service -type MediaServiceId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string -} - -// NewMediaServiceID returns a new MediaServiceId struct -func NewMediaServiceID(subscriptionId string, resourceGroupName string, mediaServiceName string) MediaServiceId { - return MediaServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - } -} - -// ParseMediaServiceID parses 'input' into a MediaServiceId -func ParseMediaServiceID(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseMediaServiceIDInsensitively parses 'input' case-insensitively into a MediaServiceId -// note: this method should only be used for API response data and not user input -func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *MediaServiceId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - return nil -} - -// ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID -func ValidateMediaServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMediaServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Media Service ID -func (id MediaServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Media Service ID -func (id MediaServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - } -} - -// String returns a human-readable description of this Media Service ID -func (id MediaServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - } - return fmt.Sprintf("Media Service (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/method_createorupdate.go deleted file mode 100644 index 77d0e3abcde78..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/method_createorupdate.go +++ /dev/null @@ -1,59 +0,0 @@ -package contentkeypolicies - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ContentKeyPolicy -} - -// CreateOrUpdate ... -func (c ContentKeyPoliciesClient) CreateOrUpdate(ctx context.Context, id ContentKeyPolicyId, input ContentKeyPolicy) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ContentKeyPolicy - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/method_delete.go deleted file mode 100644 index db4ae9dd0035b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/method_delete.go +++ /dev/null @@ -1,47 +0,0 @@ -package contentkeypolicies - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ContentKeyPoliciesClient) Delete(ctx context.Context, id ContentKeyPolicyId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/method_get.go deleted file mode 100644 index 419eb2bb9a480..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/method_get.go +++ /dev/null @@ -1,54 +0,0 @@ -package contentkeypolicies - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ContentKeyPolicy -} - -// Get ... -func (c ContentKeyPoliciesClient) Get(ctx context.Context, id ContentKeyPolicyId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ContentKeyPolicy - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/method_getpolicypropertieswithsecrets.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/method_getpolicypropertieswithsecrets.go deleted file mode 100644 index 2c60617e1c92e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/method_getpolicypropertieswithsecrets.go +++ /dev/null @@ -1,55 +0,0 @@ -package contentkeypolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetPolicyPropertiesWithSecretsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ContentKeyPolicyProperties -} - -// GetPolicyPropertiesWithSecrets ... -func (c ContentKeyPoliciesClient) GetPolicyPropertiesWithSecrets(ctx context.Context, id ContentKeyPolicyId) (result GetPolicyPropertiesWithSecretsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getPolicyPropertiesWithSecrets", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ContentKeyPolicyProperties - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/method_list.go deleted file mode 100644 index 05399ba40fef9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/method_list.go +++ /dev/null @@ -1,141 +0,0 @@ -package contentkeypolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ContentKeyPolicy -} - -type ListCompleteResult struct { - LatestHttpResponse *http.Response - Items []ContentKeyPolicy -} - -type ListOperationOptions struct { - Filter *string - Orderby *string - Top *int64 -} - -func DefaultListOperationOptions() ListOperationOptions { - return ListOperationOptions{} -} - -func (o ListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Filter != nil { - out.Append("$filter", fmt.Sprintf("%v", *o.Filter)) - } - if o.Orderby != nil { - out.Append("$orderby", fmt.Sprintf("%v", *o.Orderby)) - } - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -type ListCustomPager struct { - NextLink *odata.Link `json:"@odata.nextLink"` -} - -func (p *ListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// List ... -func (c ContentKeyPoliciesClient) List(ctx context.Context, id MediaServiceId, options ListOperationOptions) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - OptionsObject: options, - Pager: &ListCustomPager{}, - Path: fmt.Sprintf("%s/contentKeyPolicies", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ContentKeyPolicy `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ContentKeyPoliciesClient) ListComplete(ctx context.Context, id MediaServiceId, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, options, ContentKeyPolicyOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ContentKeyPoliciesClient) ListCompleteMatchingPredicate(ctx context.Context, id MediaServiceId, options ListOperationOptions, predicate ContentKeyPolicyOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ContentKeyPolicy, 0) - - resp, err := c.List(ctx, id, options) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/method_update.go deleted file mode 100644 index d3b82b3e042b8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/method_update.go +++ /dev/null @@ -1,58 +0,0 @@ -package contentkeypolicies - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ContentKeyPolicy -} - -// Update ... -func (c ContentKeyPoliciesClient) Update(ctx context.Context, id ContentKeyPolicyId, input ContentKeyPolicy) (result UpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ContentKeyPolicy - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicy.go deleted file mode 100644 index ddca04cc83cba..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicy.go +++ /dev/null @@ -1,16 +0,0 @@ -package contentkeypolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicy struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ContentKeyPolicyProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyclearkeyconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyclearkeyconfiguration.go deleted file mode 100644 index 9cc26cd28e8bb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyclearkeyconfiguration.go +++ /dev/null @@ -1,40 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyConfiguration = ContentKeyPolicyClearKeyConfiguration{} - -type ContentKeyPolicyClearKeyConfiguration struct { - - // Fields inherited from ContentKeyPolicyConfiguration -} - -var _ json.Marshaler = ContentKeyPolicyClearKeyConfiguration{} - -func (s ContentKeyPolicyClearKeyConfiguration) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyClearKeyConfiguration - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyClearKeyConfiguration: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyClearKeyConfiguration: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyClearKeyConfiguration: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyconfiguration.go deleted file mode 100644 index bdd6a1d25333e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyconfiguration.go +++ /dev/null @@ -1,85 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyConfiguration interface { -} - -// RawContentKeyPolicyConfigurationImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawContentKeyPolicyConfigurationImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalContentKeyPolicyConfigurationImplementation(input []byte) (ContentKeyPolicyConfiguration, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyConfiguration into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration") { - var out ContentKeyPolicyClearKeyConfiguration - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyClearKeyConfiguration: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyFairPlayConfiguration") { - var out ContentKeyPolicyFairPlayConfiguration - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyFairPlayConfiguration: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyPlayReadyConfiguration") { - var out ContentKeyPolicyPlayReadyConfiguration - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyPlayReadyConfiguration: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyUnknownConfiguration") { - var out ContentKeyPolicyUnknownConfiguration - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyUnknownConfiguration: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyWidevineConfiguration") { - var out ContentKeyPolicyWidevineConfiguration - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyWidevineConfiguration: %+v", err) - } - return out, nil - } - - out := RawContentKeyPolicyConfigurationImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyfairplayconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyfairplayconfiguration.go deleted file mode 100644 index f7983ee301a53..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyfairplayconfiguration.go +++ /dev/null @@ -1,46 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyConfiguration = ContentKeyPolicyFairPlayConfiguration{} - -type ContentKeyPolicyFairPlayConfiguration struct { - Ask string `json:"ask"` - FairPlayPfx string `json:"fairPlayPfx"` - FairPlayPfxPassword string `json:"fairPlayPfxPassword"` - OfflineRentalConfiguration *ContentKeyPolicyFairPlayOfflineRentalConfiguration `json:"offlineRentalConfiguration,omitempty"` - RentalAndLeaseKeyType ContentKeyPolicyFairPlayRentalAndLeaseKeyType `json:"rentalAndLeaseKeyType"` - RentalDuration int64 `json:"rentalDuration"` - - // Fields inherited from ContentKeyPolicyConfiguration -} - -var _ json.Marshaler = ContentKeyPolicyFairPlayConfiguration{} - -func (s ContentKeyPolicyFairPlayConfiguration) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyFairPlayConfiguration - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyFairPlayConfiguration: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyFairPlayConfiguration: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyFairPlayConfiguration" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyFairPlayConfiguration: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyfairplayofflinerentalconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyfairplayofflinerentalconfiguration.go deleted file mode 100644 index 63337b098e7db..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyfairplayofflinerentalconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package contentkeypolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyFairPlayOfflineRentalConfiguration struct { - PlaybackDurationSeconds int64 `json:"playbackDurationSeconds"` - StorageDurationSeconds int64 `json:"storageDurationSeconds"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyopenrestriction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyopenrestriction.go deleted file mode 100644 index 4a5e74404b160..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyopenrestriction.go +++ /dev/null @@ -1,40 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyRestriction = ContentKeyPolicyOpenRestriction{} - -type ContentKeyPolicyOpenRestriction struct { - - // Fields inherited from ContentKeyPolicyRestriction -} - -var _ json.Marshaler = ContentKeyPolicyOpenRestriction{} - -func (s ContentKeyPolicyOpenRestriction) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyOpenRestriction - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyOpenRestriction: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyOpenRestriction: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyOpenRestriction" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyOpenRestriction: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyoption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyoption.go deleted file mode 100644 index 687ed9dd6c886..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyoption.go +++ /dev/null @@ -1,51 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyOption struct { - Configuration ContentKeyPolicyConfiguration `json:"configuration"` - Name *string `json:"name,omitempty"` - PolicyOptionId *string `json:"policyOptionId,omitempty"` - Restriction ContentKeyPolicyRestriction `json:"restriction"` -} - -var _ json.Unmarshaler = &ContentKeyPolicyOption{} - -func (s *ContentKeyPolicyOption) UnmarshalJSON(bytes []byte) error { - type alias ContentKeyPolicyOption - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into ContentKeyPolicyOption: %+v", err) - } - - s.Name = decoded.Name - s.PolicyOptionId = decoded.PolicyOptionId - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ContentKeyPolicyOption into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["configuration"]; ok { - impl, err := unmarshalContentKeyPolicyConfigurationImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Configuration' for 'ContentKeyPolicyOption': %+v", err) - } - s.Configuration = impl - } - - if v, ok := temp["restriction"]; ok { - impl, err := unmarshalContentKeyPolicyRestrictionImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Restriction' for 'ContentKeyPolicyOption': %+v", err) - } - s.Restriction = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadyconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadyconfiguration.go deleted file mode 100644 index 3f609b4a8da45..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadyconfiguration.go +++ /dev/null @@ -1,42 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyConfiguration = ContentKeyPolicyPlayReadyConfiguration{} - -type ContentKeyPolicyPlayReadyConfiguration struct { - Licenses []ContentKeyPolicyPlayReadyLicense `json:"licenses"` - ResponseCustomData *string `json:"responseCustomData,omitempty"` - - // Fields inherited from ContentKeyPolicyConfiguration -} - -var _ json.Marshaler = ContentKeyPolicyPlayReadyConfiguration{} - -func (s ContentKeyPolicyPlayReadyConfiguration) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyPlayReadyConfiguration - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyPlayReadyConfiguration: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyPlayReadyConfiguration: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyPlayReadyConfiguration" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyPlayReadyConfiguration: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromheader.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromheader.go deleted file mode 100644 index 1795b14bc22b3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromheader.go +++ /dev/null @@ -1,40 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyPlayReadyContentKeyLocation = ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader{} - -type ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader struct { - - // Fields inherited from ContentKeyPolicyPlayReadyContentKeyLocation -} - -var _ json.Marshaler = ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader{} - -func (s ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromkeyidentifier.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromkeyidentifier.go deleted file mode 100644 index 91ed242963b5e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromkeyidentifier.go +++ /dev/null @@ -1,41 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyPlayReadyContentKeyLocation = ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier{} - -type ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier struct { - KeyId string `json:"keyId"` - - // Fields inherited from ContentKeyPolicyPlayReadyContentKeyLocation -} - -var _ json.Marshaler = ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier{} - -func (s ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadycontentkeylocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadycontentkeylocation.go deleted file mode 100644 index 4966f524297ff..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadycontentkeylocation.go +++ /dev/null @@ -1,61 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyPlayReadyContentKeyLocation interface { -} - -// RawContentKeyPolicyPlayReadyContentKeyLocationImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawContentKeyPolicyPlayReadyContentKeyLocationImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalContentKeyPolicyPlayReadyContentKeyLocationImplementation(input []byte) (ContentKeyPolicyPlayReadyContentKeyLocation, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyPlayReadyContentKeyLocation into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader") { - var out ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier") { - var out ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier: %+v", err) - } - return out, nil - } - - out := RawContentKeyPolicyPlayReadyContentKeyLocationImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadyexplicitanalogtelevisionrestriction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadyexplicitanalogtelevisionrestriction.go deleted file mode 100644 index 8720a1e96ff07..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadyexplicitanalogtelevisionrestriction.go +++ /dev/null @@ -1,9 +0,0 @@ -package contentkeypolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction struct { - BestEffort bool `json:"bestEffort"` - ConfigurationData int64 `json:"configurationData"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadylicense.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadylicense.go deleted file mode 100644 index db772324208f2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadylicense.go +++ /dev/null @@ -1,83 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyPlayReadyLicense struct { - AllowTestDevices bool `json:"allowTestDevices"` - BeginDate *string `json:"beginDate,omitempty"` - ContentKeyLocation ContentKeyPolicyPlayReadyContentKeyLocation `json:"contentKeyLocation"` - ContentType ContentKeyPolicyPlayReadyContentType `json:"contentType"` - ExpirationDate *string `json:"expirationDate,omitempty"` - GracePeriod *string `json:"gracePeriod,omitempty"` - LicenseType ContentKeyPolicyPlayReadyLicenseType `json:"licenseType"` - PlayRight *ContentKeyPolicyPlayReadyPlayRight `json:"playRight,omitempty"` - RelativeBeginDate *string `json:"relativeBeginDate,omitempty"` - RelativeExpirationDate *string `json:"relativeExpirationDate,omitempty"` -} - -func (o *ContentKeyPolicyPlayReadyLicense) GetBeginDateAsTime() (*time.Time, error) { - if o.BeginDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.BeginDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *ContentKeyPolicyPlayReadyLicense) SetBeginDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.BeginDate = &formatted -} - -func (o *ContentKeyPolicyPlayReadyLicense) GetExpirationDateAsTime() (*time.Time, error) { - if o.ExpirationDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ExpirationDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *ContentKeyPolicyPlayReadyLicense) SetExpirationDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ExpirationDate = &formatted -} - -var _ json.Unmarshaler = &ContentKeyPolicyPlayReadyLicense{} - -func (s *ContentKeyPolicyPlayReadyLicense) UnmarshalJSON(bytes []byte) error { - type alias ContentKeyPolicyPlayReadyLicense - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into ContentKeyPolicyPlayReadyLicense: %+v", err) - } - - s.AllowTestDevices = decoded.AllowTestDevices - s.BeginDate = decoded.BeginDate - s.ContentType = decoded.ContentType - s.ExpirationDate = decoded.ExpirationDate - s.GracePeriod = decoded.GracePeriod - s.LicenseType = decoded.LicenseType - s.PlayRight = decoded.PlayRight - s.RelativeBeginDate = decoded.RelativeBeginDate - s.RelativeExpirationDate = decoded.RelativeExpirationDate - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ContentKeyPolicyPlayReadyLicense into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["contentKeyLocation"]; ok { - impl, err := unmarshalContentKeyPolicyPlayReadyContentKeyLocationImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'ContentKeyLocation' for 'ContentKeyPolicyPlayReadyLicense': %+v", err) - } - s.ContentKeyLocation = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadyplayright.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadyplayright.go deleted file mode 100644 index 315378b0a22c0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadyplayright.go +++ /dev/null @@ -1,20 +0,0 @@ -package contentkeypolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyPlayReadyPlayRight struct { - AgcAndColorStripeRestriction *int64 `json:"agcAndColorStripeRestriction,omitempty"` - AllowPassingVideoContentToUnknownOutput ContentKeyPolicyPlayReadyUnknownOutputPassingOption `json:"allowPassingVideoContentToUnknownOutput"` - AnalogVideoOpl *int64 `json:"analogVideoOpl,omitempty"` - CompressedDigitalAudioOpl *int64 `json:"compressedDigitalAudioOpl,omitempty"` - CompressedDigitalVideoOpl *int64 `json:"compressedDigitalVideoOpl,omitempty"` - DigitalVideoOnlyContentRestriction bool `json:"digitalVideoOnlyContentRestriction"` - ExplicitAnalogTelevisionOutputRestriction *ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction `json:"explicitAnalogTelevisionOutputRestriction,omitempty"` - FirstPlayExpiration *string `json:"firstPlayExpiration,omitempty"` - ImageConstraintForAnalogComponentVideoRestriction bool `json:"imageConstraintForAnalogComponentVideoRestriction"` - ImageConstraintForAnalogComputerMonitorRestriction bool `json:"imageConstraintForAnalogComputerMonitorRestriction"` - ScmsRestriction *int64 `json:"scmsRestriction,omitempty"` - UncompressedDigitalAudioOpl *int64 `json:"uncompressedDigitalAudioOpl,omitempty"` - UncompressedDigitalVideoOpl *int64 `json:"uncompressedDigitalVideoOpl,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyproperties.go deleted file mode 100644 index af3576dec79d8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyproperties.go +++ /dev/null @@ -1,42 +0,0 @@ -package contentkeypolicies - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyProperties struct { - Created *string `json:"created,omitempty"` - Description *string `json:"description,omitempty"` - LastModified *string `json:"lastModified,omitempty"` - Options []ContentKeyPolicyOption `json:"options"` - PolicyId *string `json:"policyId,omitempty"` -} - -func (o *ContentKeyPolicyProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *ContentKeyPolicyProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *ContentKeyPolicyProperties) GetLastModifiedAsTime() (*time.Time, error) { - if o.LastModified == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModified, "2006-01-02T15:04:05Z07:00") -} - -func (o *ContentKeyPolicyProperties) SetLastModifiedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModified = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyrestriction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyrestriction.go deleted file mode 100644 index 1f3ab4d83cf8e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyrestriction.go +++ /dev/null @@ -1,69 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyRestriction interface { -} - -// RawContentKeyPolicyRestrictionImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawContentKeyPolicyRestrictionImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalContentKeyPolicyRestrictionImplementation(input []byte) (ContentKeyPolicyRestriction, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyRestriction into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyOpenRestriction") { - var out ContentKeyPolicyOpenRestriction - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyOpenRestriction: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyTokenRestriction") { - var out ContentKeyPolicyTokenRestriction - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyTokenRestriction: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyUnknownRestriction") { - var out ContentKeyPolicyUnknownRestriction - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyUnknownRestriction: %+v", err) - } - return out, nil - } - - out := RawContentKeyPolicyRestrictionImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyrestrictiontokenkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyrestrictiontokenkey.go deleted file mode 100644 index 6d8a4e938da3e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyrestrictiontokenkey.go +++ /dev/null @@ -1,69 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyRestrictionTokenKey interface { -} - -// RawContentKeyPolicyRestrictionTokenKeyImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawContentKeyPolicyRestrictionTokenKeyImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalContentKeyPolicyRestrictionTokenKeyImplementation(input []byte) (ContentKeyPolicyRestrictionTokenKey, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyRestrictionTokenKey into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyRsaTokenKey") { - var out ContentKeyPolicyRsaTokenKey - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyRsaTokenKey: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicySymmetricTokenKey") { - var out ContentKeyPolicySymmetricTokenKey - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicySymmetricTokenKey: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyX509CertificateTokenKey") { - var out ContentKeyPolicyX509CertificateTokenKey - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyX509CertificateTokenKey: %+v", err) - } - return out, nil - } - - out := RawContentKeyPolicyRestrictionTokenKeyImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyrsatokenkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyrsatokenkey.go deleted file mode 100644 index 75dc037576d1f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyrsatokenkey.go +++ /dev/null @@ -1,42 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyRestrictionTokenKey = ContentKeyPolicyRsaTokenKey{} - -type ContentKeyPolicyRsaTokenKey struct { - Exponent string `json:"exponent"` - Modulus string `json:"modulus"` - - // Fields inherited from ContentKeyPolicyRestrictionTokenKey -} - -var _ json.Marshaler = ContentKeyPolicyRsaTokenKey{} - -func (s ContentKeyPolicyRsaTokenKey) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyRsaTokenKey - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyRsaTokenKey: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyRsaTokenKey: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyRsaTokenKey" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyRsaTokenKey: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicysymmetrictokenkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicysymmetrictokenkey.go deleted file mode 100644 index 97eab4e535d45..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicysymmetrictokenkey.go +++ /dev/null @@ -1,41 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyRestrictionTokenKey = ContentKeyPolicySymmetricTokenKey{} - -type ContentKeyPolicySymmetricTokenKey struct { - KeyValue string `json:"keyValue"` - - // Fields inherited from ContentKeyPolicyRestrictionTokenKey -} - -var _ json.Marshaler = ContentKeyPolicySymmetricTokenKey{} - -func (s ContentKeyPolicySymmetricTokenKey) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicySymmetricTokenKey - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicySymmetricTokenKey: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicySymmetricTokenKey: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicySymmetricTokenKey" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicySymmetricTokenKey: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicytokenclaim.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicytokenclaim.go deleted file mode 100644 index 5ce3fb3f31979..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicytokenclaim.go +++ /dev/null @@ -1,9 +0,0 @@ -package contentkeypolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyTokenClaim struct { - ClaimType *string `json:"claimType,omitempty"` - ClaimValue *string `json:"claimValue,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicytokenrestriction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicytokenrestriction.go deleted file mode 100644 index 6b5e417cc0111..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicytokenrestriction.go +++ /dev/null @@ -1,94 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyRestriction = ContentKeyPolicyTokenRestriction{} - -type ContentKeyPolicyTokenRestriction struct { - AlternateVerificationKeys *[]ContentKeyPolicyRestrictionTokenKey `json:"alternateVerificationKeys,omitempty"` - Audience string `json:"audience"` - Issuer string `json:"issuer"` - OpenIdConnectDiscoveryDocument *string `json:"openIdConnectDiscoveryDocument,omitempty"` - PrimaryVerificationKey ContentKeyPolicyRestrictionTokenKey `json:"primaryVerificationKey"` - RequiredClaims *[]ContentKeyPolicyTokenClaim `json:"requiredClaims,omitempty"` - RestrictionTokenType ContentKeyPolicyRestrictionTokenType `json:"restrictionTokenType"` - - // Fields inherited from ContentKeyPolicyRestriction -} - -var _ json.Marshaler = ContentKeyPolicyTokenRestriction{} - -func (s ContentKeyPolicyTokenRestriction) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyTokenRestriction - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyTokenRestriction: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyTokenRestriction: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyTokenRestriction" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyTokenRestriction: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &ContentKeyPolicyTokenRestriction{} - -func (s *ContentKeyPolicyTokenRestriction) UnmarshalJSON(bytes []byte) error { - type alias ContentKeyPolicyTokenRestriction - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into ContentKeyPolicyTokenRestriction: %+v", err) - } - - s.Audience = decoded.Audience - s.Issuer = decoded.Issuer - s.OpenIdConnectDiscoveryDocument = decoded.OpenIdConnectDiscoveryDocument - s.RequiredClaims = decoded.RequiredClaims - s.RestrictionTokenType = decoded.RestrictionTokenType - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ContentKeyPolicyTokenRestriction into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["alternateVerificationKeys"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling AlternateVerificationKeys into list []json.RawMessage: %+v", err) - } - - output := make([]ContentKeyPolicyRestrictionTokenKey, 0) - for i, val := range listTemp { - impl, err := unmarshalContentKeyPolicyRestrictionTokenKeyImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'AlternateVerificationKeys' for 'ContentKeyPolicyTokenRestriction': %+v", i, err) - } - output = append(output, impl) - } - s.AlternateVerificationKeys = &output - } - - if v, ok := temp["primaryVerificationKey"]; ok { - impl, err := unmarshalContentKeyPolicyRestrictionTokenKeyImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'PrimaryVerificationKey' for 'ContentKeyPolicyTokenRestriction': %+v", err) - } - s.PrimaryVerificationKey = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyunknownconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyunknownconfiguration.go deleted file mode 100644 index 9683eb34e5645..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyunknownconfiguration.go +++ /dev/null @@ -1,40 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyConfiguration = ContentKeyPolicyUnknownConfiguration{} - -type ContentKeyPolicyUnknownConfiguration struct { - - // Fields inherited from ContentKeyPolicyConfiguration -} - -var _ json.Marshaler = ContentKeyPolicyUnknownConfiguration{} - -func (s ContentKeyPolicyUnknownConfiguration) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyUnknownConfiguration - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyUnknownConfiguration: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyUnknownConfiguration: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyUnknownConfiguration" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyUnknownConfiguration: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyunknownrestriction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyunknownrestriction.go deleted file mode 100644 index a7ab64728f2fd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyunknownrestriction.go +++ /dev/null @@ -1,40 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyRestriction = ContentKeyPolicyUnknownRestriction{} - -type ContentKeyPolicyUnknownRestriction struct { - - // Fields inherited from ContentKeyPolicyRestriction -} - -var _ json.Marshaler = ContentKeyPolicyUnknownRestriction{} - -func (s ContentKeyPolicyUnknownRestriction) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyUnknownRestriction - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyUnknownRestriction: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyUnknownRestriction: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyUnknownRestriction" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyUnknownRestriction: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicywidevineconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicywidevineconfiguration.go deleted file mode 100644 index 1a79d28796456..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicywidevineconfiguration.go +++ /dev/null @@ -1,41 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyConfiguration = ContentKeyPolicyWidevineConfiguration{} - -type ContentKeyPolicyWidevineConfiguration struct { - WidevineTemplate string `json:"widevineTemplate"` - - // Fields inherited from ContentKeyPolicyConfiguration -} - -var _ json.Marshaler = ContentKeyPolicyWidevineConfiguration{} - -func (s ContentKeyPolicyWidevineConfiguration) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyWidevineConfiguration - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyWidevineConfiguration: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyWidevineConfiguration: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyWidevineConfiguration" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyWidevineConfiguration: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyx509certificatetokenkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyx509certificatetokenkey.go deleted file mode 100644 index 0810b28176e18..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyx509certificatetokenkey.go +++ /dev/null @@ -1,41 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyRestrictionTokenKey = ContentKeyPolicyX509CertificateTokenKey{} - -type ContentKeyPolicyX509CertificateTokenKey struct { - RawBody string `json:"rawBody"` - - // Fields inherited from ContentKeyPolicyRestrictionTokenKey -} - -var _ json.Marshaler = ContentKeyPolicyX509CertificateTokenKey{} - -func (s ContentKeyPolicyX509CertificateTokenKey) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyX509CertificateTokenKey - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyX509CertificateTokenKey: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyX509CertificateTokenKey: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyX509CertificateTokenKey" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyX509CertificateTokenKey: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/predicates.go deleted file mode 100644 index 4c2e5b15246bd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package contentkeypolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p ContentKeyPolicyOperationPredicate) Matches(input ContentKeyPolicy) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/version.go deleted file mode 100644 index 66b150140bac1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package contentkeypolicies - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/contentkeypolicies/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/README.md deleted file mode 100644 index a7ac50eafbcef..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/README.md +++ /dev/null @@ -1,218 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings` Documentation - -The `encodings` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2021-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings" -``` - - -### Client Initialization - -```go -client := encodings.NewEncodingsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `EncodingsClient.JobsCancelJob` - -```go -ctx := context.TODO() -id := encodings.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue", "jobValue") - -read, err := client.JobsCancelJob(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EncodingsClient.JobsCreate` - -```go -ctx := context.TODO() -id := encodings.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue", "jobValue") - -payload := encodings.Job{ - // ... -} - - -read, err := client.JobsCreate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EncodingsClient.JobsDelete` - -```go -ctx := context.TODO() -id := encodings.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue", "jobValue") - -read, err := client.JobsDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EncodingsClient.JobsGet` - -```go -ctx := context.TODO() -id := encodings.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue", "jobValue") - -read, err := client.JobsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EncodingsClient.JobsList` - -```go -ctx := context.TODO() -id := encodings.NewTransformID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue") - -// alternatively `client.JobsList(ctx, id, encodings.DefaultJobsListOperationOptions())` can be used to do batched pagination -items, err := client.JobsListComplete(ctx, id, encodings.DefaultJobsListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `EncodingsClient.JobsUpdate` - -```go -ctx := context.TODO() -id := encodings.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue", "jobValue") - -payload := encodings.Job{ - // ... -} - - -read, err := client.JobsUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EncodingsClient.TransformsCreateOrUpdate` - -```go -ctx := context.TODO() -id := encodings.NewTransformID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue") - -payload := encodings.Transform{ - // ... -} - - -read, err := client.TransformsCreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EncodingsClient.TransformsDelete` - -```go -ctx := context.TODO() -id := encodings.NewTransformID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue") - -read, err := client.TransformsDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EncodingsClient.TransformsGet` - -```go -ctx := context.TODO() -id := encodings.NewTransformID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue") - -read, err := client.TransformsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EncodingsClient.TransformsList` - -```go -ctx := context.TODO() -id := encodings.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -// alternatively `client.TransformsList(ctx, id, encodings.DefaultTransformsListOperationOptions())` can be used to do batched pagination -items, err := client.TransformsListComplete(ctx, id, encodings.DefaultTransformsListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `EncodingsClient.TransformsUpdate` - -```go -ctx := context.TODO() -id := encodings.NewTransformID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue") - -payload := encodings.Transform{ - // ... -} - - -read, err := client.TransformsUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/client.go deleted file mode 100644 index d09d3ae04edc8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package encodings - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EncodingsClient struct { - Client *resourcemanager.Client -} - -func NewEncodingsClientWithBaseURI(sdkApi sdkEnv.Api) (*EncodingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "encodings", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating EncodingsClient: %+v", err) - } - - return &EncodingsClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/constants.go deleted file mode 100644 index 1e7e0ec7d073f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/constants.go +++ /dev/null @@ -1,1382 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AacAudioProfile string - -const ( - AacAudioProfileAacLc AacAudioProfile = "AacLc" - AacAudioProfileHeAacVOne AacAudioProfile = "HeAacV1" - AacAudioProfileHeAacVTwo AacAudioProfile = "HeAacV2" -) - -func PossibleValuesForAacAudioProfile() []string { - return []string{ - string(AacAudioProfileAacLc), - string(AacAudioProfileHeAacVOne), - string(AacAudioProfileHeAacVTwo), - } -} - -func (s *AacAudioProfile) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAacAudioProfile(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAacAudioProfile(input string) (*AacAudioProfile, error) { - vals := map[string]AacAudioProfile{ - "aaclc": AacAudioProfileAacLc, - "heaacv1": AacAudioProfileHeAacVOne, - "heaacv2": AacAudioProfileHeAacVTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AacAudioProfile(input) - return &out, nil -} - -type AnalysisResolution string - -const ( - AnalysisResolutionSourceResolution AnalysisResolution = "SourceResolution" - AnalysisResolutionStandardDefinition AnalysisResolution = "StandardDefinition" -) - -func PossibleValuesForAnalysisResolution() []string { - return []string{ - string(AnalysisResolutionSourceResolution), - string(AnalysisResolutionStandardDefinition), - } -} - -func (s *AnalysisResolution) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAnalysisResolution(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAnalysisResolution(input string) (*AnalysisResolution, error) { - vals := map[string]AnalysisResolution{ - "sourceresolution": AnalysisResolutionSourceResolution, - "standarddefinition": AnalysisResolutionStandardDefinition, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AnalysisResolution(input) - return &out, nil -} - -type AttributeFilter string - -const ( - AttributeFilterAll AttributeFilter = "All" - AttributeFilterBottom AttributeFilter = "Bottom" - AttributeFilterTop AttributeFilter = "Top" - AttributeFilterValueEquals AttributeFilter = "ValueEquals" -) - -func PossibleValuesForAttributeFilter() []string { - return []string{ - string(AttributeFilterAll), - string(AttributeFilterBottom), - string(AttributeFilterTop), - string(AttributeFilterValueEquals), - } -} - -func (s *AttributeFilter) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAttributeFilter(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAttributeFilter(input string) (*AttributeFilter, error) { - vals := map[string]AttributeFilter{ - "all": AttributeFilterAll, - "bottom": AttributeFilterBottom, - "top": AttributeFilterTop, - "valueequals": AttributeFilterValueEquals, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AttributeFilter(input) - return &out, nil -} - -type AudioAnalysisMode string - -const ( - AudioAnalysisModeBasic AudioAnalysisMode = "Basic" - AudioAnalysisModeStandard AudioAnalysisMode = "Standard" -) - -func PossibleValuesForAudioAnalysisMode() []string { - return []string{ - string(AudioAnalysisModeBasic), - string(AudioAnalysisModeStandard), - } -} - -func (s *AudioAnalysisMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAudioAnalysisMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAudioAnalysisMode(input string) (*AudioAnalysisMode, error) { - vals := map[string]AudioAnalysisMode{ - "basic": AudioAnalysisModeBasic, - "standard": AudioAnalysisModeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AudioAnalysisMode(input) - return &out, nil -} - -type BlurType string - -const ( - BlurTypeBlack BlurType = "Black" - BlurTypeBox BlurType = "Box" - BlurTypeHigh BlurType = "High" - BlurTypeLow BlurType = "Low" - BlurTypeMed BlurType = "Med" -) - -func PossibleValuesForBlurType() []string { - return []string{ - string(BlurTypeBlack), - string(BlurTypeBox), - string(BlurTypeHigh), - string(BlurTypeLow), - string(BlurTypeMed), - } -} - -func (s *BlurType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseBlurType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseBlurType(input string) (*BlurType, error) { - vals := map[string]BlurType{ - "black": BlurTypeBlack, - "box": BlurTypeBox, - "high": BlurTypeHigh, - "low": BlurTypeLow, - "med": BlurTypeMed, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := BlurType(input) - return &out, nil -} - -type ChannelMapping string - -const ( - ChannelMappingBackLeft ChannelMapping = "BackLeft" - ChannelMappingBackRight ChannelMapping = "BackRight" - ChannelMappingCenter ChannelMapping = "Center" - ChannelMappingFrontLeft ChannelMapping = "FrontLeft" - ChannelMappingFrontRight ChannelMapping = "FrontRight" - ChannelMappingLowFrequencyEffects ChannelMapping = "LowFrequencyEffects" - ChannelMappingStereoLeft ChannelMapping = "StereoLeft" - ChannelMappingStereoRight ChannelMapping = "StereoRight" -) - -func PossibleValuesForChannelMapping() []string { - return []string{ - string(ChannelMappingBackLeft), - string(ChannelMappingBackRight), - string(ChannelMappingCenter), - string(ChannelMappingFrontLeft), - string(ChannelMappingFrontRight), - string(ChannelMappingLowFrequencyEffects), - string(ChannelMappingStereoLeft), - string(ChannelMappingStereoRight), - } -} - -func (s *ChannelMapping) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseChannelMapping(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseChannelMapping(input string) (*ChannelMapping, error) { - vals := map[string]ChannelMapping{ - "backleft": ChannelMappingBackLeft, - "backright": ChannelMappingBackRight, - "center": ChannelMappingCenter, - "frontleft": ChannelMappingFrontLeft, - "frontright": ChannelMappingFrontRight, - "lowfrequencyeffects": ChannelMappingLowFrequencyEffects, - "stereoleft": ChannelMappingStereoLeft, - "stereoright": ChannelMappingStereoRight, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ChannelMapping(input) - return &out, nil -} - -type Complexity string - -const ( - ComplexityBalanced Complexity = "Balanced" - ComplexityQuality Complexity = "Quality" - ComplexitySpeed Complexity = "Speed" -) - -func PossibleValuesForComplexity() []string { - return []string{ - string(ComplexityBalanced), - string(ComplexityQuality), - string(ComplexitySpeed), - } -} - -func (s *Complexity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseComplexity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseComplexity(input string) (*Complexity, error) { - vals := map[string]Complexity{ - "balanced": ComplexityBalanced, - "quality": ComplexityQuality, - "speed": ComplexitySpeed, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Complexity(input) - return &out, nil -} - -type DeinterlaceMode string - -const ( - DeinterlaceModeAutoPixelAdaptive DeinterlaceMode = "AutoPixelAdaptive" - DeinterlaceModeOff DeinterlaceMode = "Off" -) - -func PossibleValuesForDeinterlaceMode() []string { - return []string{ - string(DeinterlaceModeAutoPixelAdaptive), - string(DeinterlaceModeOff), - } -} - -func (s *DeinterlaceMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeinterlaceMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeinterlaceMode(input string) (*DeinterlaceMode, error) { - vals := map[string]DeinterlaceMode{ - "autopixeladaptive": DeinterlaceModeAutoPixelAdaptive, - "off": DeinterlaceModeOff, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeinterlaceMode(input) - return &out, nil -} - -type DeinterlaceParity string - -const ( - DeinterlaceParityAuto DeinterlaceParity = "Auto" - DeinterlaceParityBottomFieldFirst DeinterlaceParity = "BottomFieldFirst" - DeinterlaceParityTopFieldFirst DeinterlaceParity = "TopFieldFirst" -) - -func PossibleValuesForDeinterlaceParity() []string { - return []string{ - string(DeinterlaceParityAuto), - string(DeinterlaceParityBottomFieldFirst), - string(DeinterlaceParityTopFieldFirst), - } -} - -func (s *DeinterlaceParity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeinterlaceParity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeinterlaceParity(input string) (*DeinterlaceParity, error) { - vals := map[string]DeinterlaceParity{ - "auto": DeinterlaceParityAuto, - "bottomfieldfirst": DeinterlaceParityBottomFieldFirst, - "topfieldfirst": DeinterlaceParityTopFieldFirst, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeinterlaceParity(input) - return &out, nil -} - -type EncoderNamedPreset string - -const ( - EncoderNamedPresetAACGoodQualityAudio EncoderNamedPreset = "AACGoodQualityAudio" - EncoderNamedPresetAdaptiveStreaming EncoderNamedPreset = "AdaptiveStreaming" - EncoderNamedPresetContentAwareEncoding EncoderNamedPreset = "ContentAwareEncoding" - EncoderNamedPresetContentAwareEncodingExperimental EncoderNamedPreset = "ContentAwareEncodingExperimental" - EncoderNamedPresetCopyAllBitrateNonInterleaved EncoderNamedPreset = "CopyAllBitrateNonInterleaved" - EncoderNamedPresetHTwoSixFiveAdaptiveStreaming EncoderNamedPreset = "H265AdaptiveStreaming" - EncoderNamedPresetHTwoSixFiveContentAwareEncoding EncoderNamedPreset = "H265ContentAwareEncoding" - EncoderNamedPresetHTwoSixFiveSingleBitrateFourK EncoderNamedPreset = "H265SingleBitrate4K" - EncoderNamedPresetHTwoSixFiveSingleBitrateOneZeroEightZerop EncoderNamedPreset = "H265SingleBitrate1080p" - EncoderNamedPresetHTwoSixFiveSingleBitrateSevenTwoZerop EncoderNamedPreset = "H265SingleBitrate720p" - EncoderNamedPresetHTwoSixFourMultipleBitrateOneZeroEightZerop EncoderNamedPreset = "H264MultipleBitrate1080p" - EncoderNamedPresetHTwoSixFourMultipleBitrateSD EncoderNamedPreset = "H264MultipleBitrateSD" - EncoderNamedPresetHTwoSixFourMultipleBitrateSevenTwoZerop EncoderNamedPreset = "H264MultipleBitrate720p" - EncoderNamedPresetHTwoSixFourSingleBitrateOneZeroEightZerop EncoderNamedPreset = "H264SingleBitrate1080p" - EncoderNamedPresetHTwoSixFourSingleBitrateSD EncoderNamedPreset = "H264SingleBitrateSD" - EncoderNamedPresetHTwoSixFourSingleBitrateSevenTwoZerop EncoderNamedPreset = "H264SingleBitrate720p" -) - -func PossibleValuesForEncoderNamedPreset() []string { - return []string{ - string(EncoderNamedPresetAACGoodQualityAudio), - string(EncoderNamedPresetAdaptiveStreaming), - string(EncoderNamedPresetContentAwareEncoding), - string(EncoderNamedPresetContentAwareEncodingExperimental), - string(EncoderNamedPresetCopyAllBitrateNonInterleaved), - string(EncoderNamedPresetHTwoSixFiveAdaptiveStreaming), - string(EncoderNamedPresetHTwoSixFiveContentAwareEncoding), - string(EncoderNamedPresetHTwoSixFiveSingleBitrateFourK), - string(EncoderNamedPresetHTwoSixFiveSingleBitrateOneZeroEightZerop), - string(EncoderNamedPresetHTwoSixFiveSingleBitrateSevenTwoZerop), - string(EncoderNamedPresetHTwoSixFourMultipleBitrateOneZeroEightZerop), - string(EncoderNamedPresetHTwoSixFourMultipleBitrateSD), - string(EncoderNamedPresetHTwoSixFourMultipleBitrateSevenTwoZerop), - string(EncoderNamedPresetHTwoSixFourSingleBitrateOneZeroEightZerop), - string(EncoderNamedPresetHTwoSixFourSingleBitrateSD), - string(EncoderNamedPresetHTwoSixFourSingleBitrateSevenTwoZerop), - } -} - -func (s *EncoderNamedPreset) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEncoderNamedPreset(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEncoderNamedPreset(input string) (*EncoderNamedPreset, error) { - vals := map[string]EncoderNamedPreset{ - "aacgoodqualityaudio": EncoderNamedPresetAACGoodQualityAudio, - "adaptivestreaming": EncoderNamedPresetAdaptiveStreaming, - "contentawareencoding": EncoderNamedPresetContentAwareEncoding, - "contentawareencodingexperimental": EncoderNamedPresetContentAwareEncodingExperimental, - "copyallbitratenoninterleaved": EncoderNamedPresetCopyAllBitrateNonInterleaved, - "h265adaptivestreaming": EncoderNamedPresetHTwoSixFiveAdaptiveStreaming, - "h265contentawareencoding": EncoderNamedPresetHTwoSixFiveContentAwareEncoding, - "h265singlebitrate4k": EncoderNamedPresetHTwoSixFiveSingleBitrateFourK, - "h265singlebitrate1080p": EncoderNamedPresetHTwoSixFiveSingleBitrateOneZeroEightZerop, - "h265singlebitrate720p": EncoderNamedPresetHTwoSixFiveSingleBitrateSevenTwoZerop, - "h264multiplebitrate1080p": EncoderNamedPresetHTwoSixFourMultipleBitrateOneZeroEightZerop, - "h264multiplebitratesd": EncoderNamedPresetHTwoSixFourMultipleBitrateSD, - "h264multiplebitrate720p": EncoderNamedPresetHTwoSixFourMultipleBitrateSevenTwoZerop, - "h264singlebitrate1080p": EncoderNamedPresetHTwoSixFourSingleBitrateOneZeroEightZerop, - "h264singlebitratesd": EncoderNamedPresetHTwoSixFourSingleBitrateSD, - "h264singlebitrate720p": EncoderNamedPresetHTwoSixFourSingleBitrateSevenTwoZerop, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EncoderNamedPreset(input) - return &out, nil -} - -type EntropyMode string - -const ( - EntropyModeCabac EntropyMode = "Cabac" - EntropyModeCavlc EntropyMode = "Cavlc" -) - -func PossibleValuesForEntropyMode() []string { - return []string{ - string(EntropyModeCabac), - string(EntropyModeCavlc), - } -} - -func (s *EntropyMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEntropyMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEntropyMode(input string) (*EntropyMode, error) { - vals := map[string]EntropyMode{ - "cabac": EntropyModeCabac, - "cavlc": EntropyModeCavlc, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EntropyMode(input) - return &out, nil -} - -type FaceRedactorMode string - -const ( - FaceRedactorModeAnalyze FaceRedactorMode = "Analyze" - FaceRedactorModeCombined FaceRedactorMode = "Combined" - FaceRedactorModeRedact FaceRedactorMode = "Redact" -) - -func PossibleValuesForFaceRedactorMode() []string { - return []string{ - string(FaceRedactorModeAnalyze), - string(FaceRedactorModeCombined), - string(FaceRedactorModeRedact), - } -} - -func (s *FaceRedactorMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFaceRedactorMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFaceRedactorMode(input string) (*FaceRedactorMode, error) { - vals := map[string]FaceRedactorMode{ - "analyze": FaceRedactorModeAnalyze, - "combined": FaceRedactorModeCombined, - "redact": FaceRedactorModeRedact, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FaceRedactorMode(input) - return &out, nil -} - -type H264Complexity string - -const ( - H264ComplexityBalanced H264Complexity = "Balanced" - H264ComplexityQuality H264Complexity = "Quality" - H264ComplexitySpeed H264Complexity = "Speed" -) - -func PossibleValuesForH264Complexity() []string { - return []string{ - string(H264ComplexityBalanced), - string(H264ComplexityQuality), - string(H264ComplexitySpeed), - } -} - -func (s *H264Complexity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseH264Complexity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseH264Complexity(input string) (*H264Complexity, error) { - vals := map[string]H264Complexity{ - "balanced": H264ComplexityBalanced, - "quality": H264ComplexityQuality, - "speed": H264ComplexitySpeed, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := H264Complexity(input) - return &out, nil -} - -type H264RateControlMode string - -const ( - H264RateControlModeABR H264RateControlMode = "ABR" - H264RateControlModeCBR H264RateControlMode = "CBR" - H264RateControlModeCRF H264RateControlMode = "CRF" -) - -func PossibleValuesForH264RateControlMode() []string { - return []string{ - string(H264RateControlModeABR), - string(H264RateControlModeCBR), - string(H264RateControlModeCRF), - } -} - -func (s *H264RateControlMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseH264RateControlMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseH264RateControlMode(input string) (*H264RateControlMode, error) { - vals := map[string]H264RateControlMode{ - "abr": H264RateControlModeABR, - "cbr": H264RateControlModeCBR, - "crf": H264RateControlModeCRF, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := H264RateControlMode(input) - return &out, nil -} - -type H264VideoProfile string - -const ( - H264VideoProfileAuto H264VideoProfile = "Auto" - H264VideoProfileBaseline H264VideoProfile = "Baseline" - H264VideoProfileHigh H264VideoProfile = "High" - H264VideoProfileHighFourFourFour H264VideoProfile = "High444" - H264VideoProfileHighFourTwoTwo H264VideoProfile = "High422" - H264VideoProfileMain H264VideoProfile = "Main" -) - -func PossibleValuesForH264VideoProfile() []string { - return []string{ - string(H264VideoProfileAuto), - string(H264VideoProfileBaseline), - string(H264VideoProfileHigh), - string(H264VideoProfileHighFourFourFour), - string(H264VideoProfileHighFourTwoTwo), - string(H264VideoProfileMain), - } -} - -func (s *H264VideoProfile) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseH264VideoProfile(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseH264VideoProfile(input string) (*H264VideoProfile, error) { - vals := map[string]H264VideoProfile{ - "auto": H264VideoProfileAuto, - "baseline": H264VideoProfileBaseline, - "high": H264VideoProfileHigh, - "high444": H264VideoProfileHighFourFourFour, - "high422": H264VideoProfileHighFourTwoTwo, - "main": H264VideoProfileMain, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := H264VideoProfile(input) - return &out, nil -} - -type H265Complexity string - -const ( - H265ComplexityBalanced H265Complexity = "Balanced" - H265ComplexityQuality H265Complexity = "Quality" - H265ComplexitySpeed H265Complexity = "Speed" -) - -func PossibleValuesForH265Complexity() []string { - return []string{ - string(H265ComplexityBalanced), - string(H265ComplexityQuality), - string(H265ComplexitySpeed), - } -} - -func (s *H265Complexity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseH265Complexity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseH265Complexity(input string) (*H265Complexity, error) { - vals := map[string]H265Complexity{ - "balanced": H265ComplexityBalanced, - "quality": H265ComplexityQuality, - "speed": H265ComplexitySpeed, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := H265Complexity(input) - return &out, nil -} - -type H265VideoProfile string - -const ( - H265VideoProfileAuto H265VideoProfile = "Auto" - H265VideoProfileMain H265VideoProfile = "Main" - H265VideoProfileMainOneZero H265VideoProfile = "Main10" -) - -func PossibleValuesForH265VideoProfile() []string { - return []string{ - string(H265VideoProfileAuto), - string(H265VideoProfileMain), - string(H265VideoProfileMainOneZero), - } -} - -func (s *H265VideoProfile) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseH265VideoProfile(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseH265VideoProfile(input string) (*H265VideoProfile, error) { - vals := map[string]H265VideoProfile{ - "auto": H265VideoProfileAuto, - "main": H265VideoProfileMain, - "main10": H265VideoProfileMainOneZero, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := H265VideoProfile(input) - return &out, nil -} - -type InsightsType string - -const ( - InsightsTypeAllInsights InsightsType = "AllInsights" - InsightsTypeAudioInsightsOnly InsightsType = "AudioInsightsOnly" - InsightsTypeVideoInsightsOnly InsightsType = "VideoInsightsOnly" -) - -func PossibleValuesForInsightsType() []string { - return []string{ - string(InsightsTypeAllInsights), - string(InsightsTypeAudioInsightsOnly), - string(InsightsTypeVideoInsightsOnly), - } -} - -func (s *InsightsType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseInsightsType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseInsightsType(input string) (*InsightsType, error) { - vals := map[string]InsightsType{ - "allinsights": InsightsTypeAllInsights, - "audioinsightsonly": InsightsTypeAudioInsightsOnly, - "videoinsightsonly": InsightsTypeVideoInsightsOnly, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := InsightsType(input) - return &out, nil -} - -type InterleaveOutput string - -const ( - InterleaveOutputInterleavedOutput InterleaveOutput = "InterleavedOutput" - InterleaveOutputNonInterleavedOutput InterleaveOutput = "NonInterleavedOutput" -) - -func PossibleValuesForInterleaveOutput() []string { - return []string{ - string(InterleaveOutputInterleavedOutput), - string(InterleaveOutputNonInterleavedOutput), - } -} - -func (s *InterleaveOutput) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseInterleaveOutput(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseInterleaveOutput(input string) (*InterleaveOutput, error) { - vals := map[string]InterleaveOutput{ - "interleavedoutput": InterleaveOutputInterleavedOutput, - "noninterleavedoutput": InterleaveOutputNonInterleavedOutput, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := InterleaveOutput(input) - return &out, nil -} - -type JobErrorCategory string - -const ( - JobErrorCategoryConfiguration JobErrorCategory = "Configuration" - JobErrorCategoryContent JobErrorCategory = "Content" - JobErrorCategoryDownload JobErrorCategory = "Download" - JobErrorCategoryService JobErrorCategory = "Service" - JobErrorCategoryUpload JobErrorCategory = "Upload" -) - -func PossibleValuesForJobErrorCategory() []string { - return []string{ - string(JobErrorCategoryConfiguration), - string(JobErrorCategoryContent), - string(JobErrorCategoryDownload), - string(JobErrorCategoryService), - string(JobErrorCategoryUpload), - } -} - -func (s *JobErrorCategory) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseJobErrorCategory(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseJobErrorCategory(input string) (*JobErrorCategory, error) { - vals := map[string]JobErrorCategory{ - "configuration": JobErrorCategoryConfiguration, - "content": JobErrorCategoryContent, - "download": JobErrorCategoryDownload, - "service": JobErrorCategoryService, - "upload": JobErrorCategoryUpload, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := JobErrorCategory(input) - return &out, nil -} - -type JobErrorCode string - -const ( - JobErrorCodeConfigurationUnsupported JobErrorCode = "ConfigurationUnsupported" - JobErrorCodeContentMalformed JobErrorCode = "ContentMalformed" - JobErrorCodeContentUnsupported JobErrorCode = "ContentUnsupported" - JobErrorCodeDownloadNotAccessible JobErrorCode = "DownloadNotAccessible" - JobErrorCodeDownloadTransientError JobErrorCode = "DownloadTransientError" - JobErrorCodeServiceError JobErrorCode = "ServiceError" - JobErrorCodeServiceTransientError JobErrorCode = "ServiceTransientError" - JobErrorCodeUploadNotAccessible JobErrorCode = "UploadNotAccessible" - JobErrorCodeUploadTransientError JobErrorCode = "UploadTransientError" -) - -func PossibleValuesForJobErrorCode() []string { - return []string{ - string(JobErrorCodeConfigurationUnsupported), - string(JobErrorCodeContentMalformed), - string(JobErrorCodeContentUnsupported), - string(JobErrorCodeDownloadNotAccessible), - string(JobErrorCodeDownloadTransientError), - string(JobErrorCodeServiceError), - string(JobErrorCodeServiceTransientError), - string(JobErrorCodeUploadNotAccessible), - string(JobErrorCodeUploadTransientError), - } -} - -func (s *JobErrorCode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseJobErrorCode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseJobErrorCode(input string) (*JobErrorCode, error) { - vals := map[string]JobErrorCode{ - "configurationunsupported": JobErrorCodeConfigurationUnsupported, - "contentmalformed": JobErrorCodeContentMalformed, - "contentunsupported": JobErrorCodeContentUnsupported, - "downloadnotaccessible": JobErrorCodeDownloadNotAccessible, - "downloadtransienterror": JobErrorCodeDownloadTransientError, - "serviceerror": JobErrorCodeServiceError, - "servicetransienterror": JobErrorCodeServiceTransientError, - "uploadnotaccessible": JobErrorCodeUploadNotAccessible, - "uploadtransienterror": JobErrorCodeUploadTransientError, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := JobErrorCode(input) - return &out, nil -} - -type JobRetry string - -const ( - JobRetryDoNotRetry JobRetry = "DoNotRetry" - JobRetryMayRetry JobRetry = "MayRetry" -) - -func PossibleValuesForJobRetry() []string { - return []string{ - string(JobRetryDoNotRetry), - string(JobRetryMayRetry), - } -} - -func (s *JobRetry) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseJobRetry(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseJobRetry(input string) (*JobRetry, error) { - vals := map[string]JobRetry{ - "donotretry": JobRetryDoNotRetry, - "mayretry": JobRetryMayRetry, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := JobRetry(input) - return &out, nil -} - -type JobState string - -const ( - JobStateCanceled JobState = "Canceled" - JobStateCanceling JobState = "Canceling" - JobStateError JobState = "Error" - JobStateFinished JobState = "Finished" - JobStateProcessing JobState = "Processing" - JobStateQueued JobState = "Queued" - JobStateScheduled JobState = "Scheduled" -) - -func PossibleValuesForJobState() []string { - return []string{ - string(JobStateCanceled), - string(JobStateCanceling), - string(JobStateError), - string(JobStateFinished), - string(JobStateProcessing), - string(JobStateQueued), - string(JobStateScheduled), - } -} - -func (s *JobState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseJobState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseJobState(input string) (*JobState, error) { - vals := map[string]JobState{ - "canceled": JobStateCanceled, - "canceling": JobStateCanceling, - "error": JobStateError, - "finished": JobStateFinished, - "processing": JobStateProcessing, - "queued": JobStateQueued, - "scheduled": JobStateScheduled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := JobState(input) - return &out, nil -} - -type OnErrorType string - -const ( - OnErrorTypeContinueJob OnErrorType = "ContinueJob" - OnErrorTypeStopProcessingJob OnErrorType = "StopProcessingJob" -) - -func PossibleValuesForOnErrorType() []string { - return []string{ - string(OnErrorTypeContinueJob), - string(OnErrorTypeStopProcessingJob), - } -} - -func (s *OnErrorType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOnErrorType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOnErrorType(input string) (*OnErrorType, error) { - vals := map[string]OnErrorType{ - "continuejob": OnErrorTypeContinueJob, - "stopprocessingjob": OnErrorTypeStopProcessingJob, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OnErrorType(input) - return &out, nil -} - -type Priority string - -const ( - PriorityHigh Priority = "High" - PriorityLow Priority = "Low" - PriorityNormal Priority = "Normal" -) - -func PossibleValuesForPriority() []string { - return []string{ - string(PriorityHigh), - string(PriorityLow), - string(PriorityNormal), - } -} - -func (s *Priority) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePriority(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePriority(input string) (*Priority, error) { - vals := map[string]Priority{ - "high": PriorityHigh, - "low": PriorityLow, - "normal": PriorityNormal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Priority(input) - return &out, nil -} - -type Rotation string - -const ( - RotationAuto Rotation = "Auto" - RotationNone Rotation = "None" - RotationRotateNineZero Rotation = "Rotate90" - RotationRotateOneEightZero Rotation = "Rotate180" - RotationRotateTwoSevenZero Rotation = "Rotate270" - RotationRotateZero Rotation = "Rotate0" -) - -func PossibleValuesForRotation() []string { - return []string{ - string(RotationAuto), - string(RotationNone), - string(RotationRotateNineZero), - string(RotationRotateOneEightZero), - string(RotationRotateTwoSevenZero), - string(RotationRotateZero), - } -} - -func (s *Rotation) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRotation(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRotation(input string) (*Rotation, error) { - vals := map[string]Rotation{ - "auto": RotationAuto, - "none": RotationNone, - "rotate90": RotationRotateNineZero, - "rotate180": RotationRotateOneEightZero, - "rotate270": RotationRotateTwoSevenZero, - "rotate0": RotationRotateZero, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Rotation(input) - return &out, nil -} - -type StretchMode string - -const ( - StretchModeAutoFit StretchMode = "AutoFit" - StretchModeAutoSize StretchMode = "AutoSize" - StretchModeNone StretchMode = "None" -) - -func PossibleValuesForStretchMode() []string { - return []string{ - string(StretchModeAutoFit), - string(StretchModeAutoSize), - string(StretchModeNone), - } -} - -func (s *StretchMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseStretchMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseStretchMode(input string) (*StretchMode, error) { - vals := map[string]StretchMode{ - "autofit": StretchModeAutoFit, - "autosize": StretchModeAutoSize, - "none": StretchModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StretchMode(input) - return &out, nil -} - -type TrackAttribute string - -const ( - TrackAttributeBitrate TrackAttribute = "Bitrate" - TrackAttributeLanguage TrackAttribute = "Language" -) - -func PossibleValuesForTrackAttribute() []string { - return []string{ - string(TrackAttributeBitrate), - string(TrackAttributeLanguage), - } -} - -func (s *TrackAttribute) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTrackAttribute(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTrackAttribute(input string) (*TrackAttribute, error) { - vals := map[string]TrackAttribute{ - "bitrate": TrackAttributeBitrate, - "language": TrackAttributeLanguage, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TrackAttribute(input) - return &out, nil -} - -type VideoSyncMode string - -const ( - VideoSyncModeAuto VideoSyncMode = "Auto" - VideoSyncModeCfr VideoSyncMode = "Cfr" - VideoSyncModePassthrough VideoSyncMode = "Passthrough" - VideoSyncModeVfr VideoSyncMode = "Vfr" -) - -func PossibleValuesForVideoSyncMode() []string { - return []string{ - string(VideoSyncModeAuto), - string(VideoSyncModeCfr), - string(VideoSyncModePassthrough), - string(VideoSyncModeVfr), - } -} - -func (s *VideoSyncMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVideoSyncMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVideoSyncMode(input string) (*VideoSyncMode, error) { - vals := map[string]VideoSyncMode{ - "auto": VideoSyncModeAuto, - "cfr": VideoSyncModeCfr, - "passthrough": VideoSyncModePassthrough, - "vfr": VideoSyncModeVfr, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VideoSyncMode(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/id_job.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/id_job.go deleted file mode 100644 index 5530931f0fdd1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/id_job.go +++ /dev/null @@ -1,148 +0,0 @@ -package encodings - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&JobId{}) -} - -var _ resourceids.ResourceId = &JobId{} - -// JobId is a struct representing the Resource ID for a Job -type JobId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - TransformName string - JobName string -} - -// NewJobID returns a new JobId struct -func NewJobID(subscriptionId string, resourceGroupName string, mediaServiceName string, transformName string, jobName string) JobId { - return JobId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - TransformName: transformName, - JobName: jobName, - } -} - -// ParseJobID parses 'input' into a JobId -func ParseJobID(input string) (*JobId, error) { - parser := resourceids.NewParserFromResourceIdType(&JobId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseJobIDInsensitively parses 'input' case-insensitively into a JobId -// note: this method should only be used for API response data and not user input -func ParseJobIDInsensitively(input string) (*JobId, error) { - parser := resourceids.NewParserFromResourceIdType(&JobId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *JobId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.TransformName, ok = input.Parsed["transformName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "transformName", input) - } - - if id.JobName, ok = input.Parsed["jobName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "jobName", input) - } - - return nil -} - -// ValidateJobID checks that 'input' can be parsed as a Job ID -func ValidateJobID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseJobID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Job ID -func (id JobId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/transforms/%s/jobs/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.TransformName, id.JobName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Job ID -func (id JobId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticTransforms", "transforms", "transforms"), - resourceids.UserSpecifiedSegment("transformName", "transformValue"), - resourceids.StaticSegment("staticJobs", "jobs", "jobs"), - resourceids.UserSpecifiedSegment("jobName", "jobValue"), - } -} - -// String returns a human-readable description of this Job ID -func (id JobId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Transform Name: %q", id.TransformName), - fmt.Sprintf("Job Name: %q", id.JobName), - } - return fmt.Sprintf("Job (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/id_mediaservice.go deleted file mode 100644 index 2b78d8406def1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/id_mediaservice.go +++ /dev/null @@ -1,130 +0,0 @@ -package encodings - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&MediaServiceId{}) -} - -var _ resourceids.ResourceId = &MediaServiceId{} - -// MediaServiceId is a struct representing the Resource ID for a Media Service -type MediaServiceId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string -} - -// NewMediaServiceID returns a new MediaServiceId struct -func NewMediaServiceID(subscriptionId string, resourceGroupName string, mediaServiceName string) MediaServiceId { - return MediaServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - } -} - -// ParseMediaServiceID parses 'input' into a MediaServiceId -func ParseMediaServiceID(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseMediaServiceIDInsensitively parses 'input' case-insensitively into a MediaServiceId -// note: this method should only be used for API response data and not user input -func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *MediaServiceId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - return nil -} - -// ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID -func ValidateMediaServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMediaServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Media Service ID -func (id MediaServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Media Service ID -func (id MediaServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - } -} - -// String returns a human-readable description of this Media Service ID -func (id MediaServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - } - return fmt.Sprintf("Media Service (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/id_transform.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/id_transform.go deleted file mode 100644 index 21098483a3c9c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/id_transform.go +++ /dev/null @@ -1,139 +0,0 @@ -package encodings - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&TransformId{}) -} - -var _ resourceids.ResourceId = &TransformId{} - -// TransformId is a struct representing the Resource ID for a Transform -type TransformId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - TransformName string -} - -// NewTransformID returns a new TransformId struct -func NewTransformID(subscriptionId string, resourceGroupName string, mediaServiceName string, transformName string) TransformId { - return TransformId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - TransformName: transformName, - } -} - -// ParseTransformID parses 'input' into a TransformId -func ParseTransformID(input string) (*TransformId, error) { - parser := resourceids.NewParserFromResourceIdType(&TransformId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := TransformId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseTransformIDInsensitively parses 'input' case-insensitively into a TransformId -// note: this method should only be used for API response data and not user input -func ParseTransformIDInsensitively(input string) (*TransformId, error) { - parser := resourceids.NewParserFromResourceIdType(&TransformId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := TransformId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *TransformId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.TransformName, ok = input.Parsed["transformName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "transformName", input) - } - - return nil -} - -// ValidateTransformID checks that 'input' can be parsed as a Transform ID -func ValidateTransformID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseTransformID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Transform ID -func (id TransformId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/transforms/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.TransformName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Transform ID -func (id TransformId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticTransforms", "transforms", "transforms"), - resourceids.UserSpecifiedSegment("transformName", "transformValue"), - } -} - -// String returns a human-readable description of this Transform ID -func (id TransformId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Transform Name: %q", id.TransformName), - } - return fmt.Sprintf("Transform (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_jobscanceljob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_jobscanceljob.go deleted file mode 100644 index 7f31dac59ea70..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_jobscanceljob.go +++ /dev/null @@ -1,47 +0,0 @@ -package encodings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobsCancelJobOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// JobsCancelJob ... -func (c EncodingsClient) JobsCancelJob(ctx context.Context, id JobId) (result JobsCancelJobOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/cancelJob", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_jobscreate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_jobscreate.go deleted file mode 100644 index 82eb14dd50e4e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_jobscreate.go +++ /dev/null @@ -1,58 +0,0 @@ -package encodings - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobsCreateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Job -} - -// JobsCreate ... -func (c EncodingsClient) JobsCreate(ctx context.Context, id JobId, input Job) (result JobsCreateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Job - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_jobsdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_jobsdelete.go deleted file mode 100644 index bb5025fef4ef2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_jobsdelete.go +++ /dev/null @@ -1,47 +0,0 @@ -package encodings - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobsDeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// JobsDelete ... -func (c EncodingsClient) JobsDelete(ctx context.Context, id JobId) (result JobsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_jobsget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_jobsget.go deleted file mode 100644 index 6788a17b01950..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_jobsget.go +++ /dev/null @@ -1,54 +0,0 @@ -package encodings - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Job -} - -// JobsGet ... -func (c EncodingsClient) JobsGet(ctx context.Context, id JobId) (result JobsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Job - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_jobslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_jobslist.go deleted file mode 100644 index e0aea11250a83..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_jobslist.go +++ /dev/null @@ -1,137 +0,0 @@ -package encodings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]Job -} - -type JobsListCompleteResult struct { - LatestHttpResponse *http.Response - Items []Job -} - -type JobsListOperationOptions struct { - Filter *string - Orderby *string -} - -func DefaultJobsListOperationOptions() JobsListOperationOptions { - return JobsListOperationOptions{} -} - -func (o JobsListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o JobsListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o JobsListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Filter != nil { - out.Append("$filter", fmt.Sprintf("%v", *o.Filter)) - } - if o.Orderby != nil { - out.Append("$orderby", fmt.Sprintf("%v", *o.Orderby)) - } - return &out -} - -type JobsListCustomPager struct { - NextLink *odata.Link `json:"@odata.nextLink"` -} - -func (p *JobsListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// JobsList ... -func (c EncodingsClient) JobsList(ctx context.Context, id TransformId, options JobsListOperationOptions) (result JobsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - OptionsObject: options, - Pager: &JobsListCustomPager{}, - Path: fmt.Sprintf("%s/jobs", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]Job `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// JobsListComplete retrieves all the results into a single object -func (c EncodingsClient) JobsListComplete(ctx context.Context, id TransformId, options JobsListOperationOptions) (JobsListCompleteResult, error) { - return c.JobsListCompleteMatchingPredicate(ctx, id, options, JobOperationPredicate{}) -} - -// JobsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c EncodingsClient) JobsListCompleteMatchingPredicate(ctx context.Context, id TransformId, options JobsListOperationOptions, predicate JobOperationPredicate) (result JobsListCompleteResult, err error) { - items := make([]Job, 0) - - resp, err := c.JobsList(ctx, id, options) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = JobsListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_jobsupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_jobsupdate.go deleted file mode 100644 index c78187ef7ca40..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_jobsupdate.go +++ /dev/null @@ -1,58 +0,0 @@ -package encodings - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobsUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Job -} - -// JobsUpdate ... -func (c EncodingsClient) JobsUpdate(ctx context.Context, id JobId, input Job) (result JobsUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Job - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_transformscreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_transformscreateorupdate.go deleted file mode 100644 index 407d4c82052e1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_transformscreateorupdate.go +++ /dev/null @@ -1,59 +0,0 @@ -package encodings - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TransformsCreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Transform -} - -// TransformsCreateOrUpdate ... -func (c EncodingsClient) TransformsCreateOrUpdate(ctx context.Context, id TransformId, input Transform) (result TransformsCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Transform - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_transformsdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_transformsdelete.go deleted file mode 100644 index 8ff7a8d9fafd6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_transformsdelete.go +++ /dev/null @@ -1,47 +0,0 @@ -package encodings - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TransformsDeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// TransformsDelete ... -func (c EncodingsClient) TransformsDelete(ctx context.Context, id TransformId) (result TransformsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_transformsget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_transformsget.go deleted file mode 100644 index fce05d25773c6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_transformsget.go +++ /dev/null @@ -1,54 +0,0 @@ -package encodings - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TransformsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Transform -} - -// TransformsGet ... -func (c EncodingsClient) TransformsGet(ctx context.Context, id TransformId) (result TransformsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Transform - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_transformslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_transformslist.go deleted file mode 100644 index 46d8bd251cedf..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_transformslist.go +++ /dev/null @@ -1,137 +0,0 @@ -package encodings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TransformsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]Transform -} - -type TransformsListCompleteResult struct { - LatestHttpResponse *http.Response - Items []Transform -} - -type TransformsListOperationOptions struct { - Filter *string - Orderby *string -} - -func DefaultTransformsListOperationOptions() TransformsListOperationOptions { - return TransformsListOperationOptions{} -} - -func (o TransformsListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o TransformsListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o TransformsListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Filter != nil { - out.Append("$filter", fmt.Sprintf("%v", *o.Filter)) - } - if o.Orderby != nil { - out.Append("$orderby", fmt.Sprintf("%v", *o.Orderby)) - } - return &out -} - -type TransformsListCustomPager struct { - NextLink *odata.Link `json:"@odata.nextLink"` -} - -func (p *TransformsListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// TransformsList ... -func (c EncodingsClient) TransformsList(ctx context.Context, id MediaServiceId, options TransformsListOperationOptions) (result TransformsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - OptionsObject: options, - Pager: &TransformsListCustomPager{}, - Path: fmt.Sprintf("%s/transforms", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]Transform `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// TransformsListComplete retrieves all the results into a single object -func (c EncodingsClient) TransformsListComplete(ctx context.Context, id MediaServiceId, options TransformsListOperationOptions) (TransformsListCompleteResult, error) { - return c.TransformsListCompleteMatchingPredicate(ctx, id, options, TransformOperationPredicate{}) -} - -// TransformsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c EncodingsClient) TransformsListCompleteMatchingPredicate(ctx context.Context, id MediaServiceId, options TransformsListOperationOptions, predicate TransformOperationPredicate) (result TransformsListCompleteResult, err error) { - items := make([]Transform, 0) - - resp, err := c.TransformsList(ctx, id, options) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = TransformsListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_transformsupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_transformsupdate.go deleted file mode 100644 index 05a8b19d20091..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/method_transformsupdate.go +++ /dev/null @@ -1,58 +0,0 @@ -package encodings - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TransformsUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Transform -} - -// TransformsUpdate ... -func (c EncodingsClient) TransformsUpdate(ctx context.Context, id TransformId, input Transform) (result TransformsUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Transform - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_aacaudio.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_aacaudio.go deleted file mode 100644 index 067403385aedd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_aacaudio.go +++ /dev/null @@ -1,45 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = AacAudio{} - -type AacAudio struct { - Bitrate *int64 `json:"bitrate,omitempty"` - Channels *int64 `json:"channels,omitempty"` - Profile *AacAudioProfile `json:"profile,omitempty"` - SamplingRate *int64 `json:"samplingRate,omitempty"` - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = AacAudio{} - -func (s AacAudio) MarshalJSON() ([]byte, error) { - type wrapper AacAudio - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AacAudio: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AacAudio: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.AacAudio" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AacAudio: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_absolutecliptime.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_absolutecliptime.go deleted file mode 100644 index e1e8cedcd10b5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_absolutecliptime.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClipTime = AbsoluteClipTime{} - -type AbsoluteClipTime struct { - Time string `json:"time"` - - // Fields inherited from ClipTime -} - -var _ json.Marshaler = AbsoluteClipTime{} - -func (s AbsoluteClipTime) MarshalJSON() ([]byte, error) { - type wrapper AbsoluteClipTime - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AbsoluteClipTime: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AbsoluteClipTime: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.AbsoluteClipTime" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AbsoluteClipTime: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_audio.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_audio.go deleted file mode 100644 index a2007b0056c5f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_audio.go +++ /dev/null @@ -1,44 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = Audio{} - -type Audio struct { - Bitrate *int64 `json:"bitrate,omitempty"` - Channels *int64 `json:"channels,omitempty"` - SamplingRate *int64 `json:"samplingRate,omitempty"` - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = Audio{} - -func (s Audio) MarshalJSON() ([]byte, error) { - type wrapper Audio - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling Audio: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling Audio: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.Audio" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling Audio: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_audioanalyzerpreset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_audioanalyzerpreset.go deleted file mode 100644 index 45a7be9a1c1ed..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_audioanalyzerpreset.go +++ /dev/null @@ -1,43 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Preset = AudioAnalyzerPreset{} - -type AudioAnalyzerPreset struct { - AudioLanguage *string `json:"audioLanguage,omitempty"` - ExperimentalOptions *map[string]string `json:"experimentalOptions,omitempty"` - Mode *AudioAnalysisMode `json:"mode,omitempty"` - - // Fields inherited from Preset -} - -var _ json.Marshaler = AudioAnalyzerPreset{} - -func (s AudioAnalyzerPreset) MarshalJSON() ([]byte, error) { - type wrapper AudioAnalyzerPreset - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AudioAnalyzerPreset: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AudioAnalyzerPreset: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.AudioAnalyzerPreset" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AudioAnalyzerPreset: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_audiooverlay.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_audiooverlay.go deleted file mode 100644 index 3d21e6aeb1718..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_audiooverlay.go +++ /dev/null @@ -1,46 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Overlay = AudioOverlay{} - -type AudioOverlay struct { - - // Fields inherited from Overlay - AudioGainLevel *float64 `json:"audioGainLevel,omitempty"` - End *string `json:"end,omitempty"` - FadeInDuration *string `json:"fadeInDuration,omitempty"` - FadeOutDuration *string `json:"fadeOutDuration,omitempty"` - InputLabel string `json:"inputLabel"` - Start *string `json:"start,omitempty"` -} - -var _ json.Marshaler = AudioOverlay{} - -func (s AudioOverlay) MarshalJSON() ([]byte, error) { - type wrapper AudioOverlay - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AudioOverlay: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AudioOverlay: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.AudioOverlay" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AudioOverlay: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_audiotrackdescriptor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_audiotrackdescriptor.go deleted file mode 100644 index 81990a6d7d234..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_audiotrackdescriptor.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ TrackDescriptor = AudioTrackDescriptor{} - -type AudioTrackDescriptor struct { - ChannelMapping *ChannelMapping `json:"channelMapping,omitempty"` - - // Fields inherited from TrackDescriptor -} - -var _ json.Marshaler = AudioTrackDescriptor{} - -func (s AudioTrackDescriptor) MarshalJSON() ([]byte, error) { - type wrapper AudioTrackDescriptor - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AudioTrackDescriptor: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AudioTrackDescriptor: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.AudioTrackDescriptor" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AudioTrackDescriptor: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_builtinstandardencoderpreset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_builtinstandardencoderpreset.go deleted file mode 100644 index a11bfb0f219ae..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_builtinstandardencoderpreset.go +++ /dev/null @@ -1,42 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Preset = BuiltInStandardEncoderPreset{} - -type BuiltInStandardEncoderPreset struct { - Configurations *PresetConfigurations `json:"configurations,omitempty"` - PresetName EncoderNamedPreset `json:"presetName"` - - // Fields inherited from Preset -} - -var _ json.Marshaler = BuiltInStandardEncoderPreset{} - -func (s BuiltInStandardEncoderPreset) MarshalJSON() ([]byte, error) { - type wrapper BuiltInStandardEncoderPreset - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling BuiltInStandardEncoderPreset: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling BuiltInStandardEncoderPreset: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.BuiltInStandardEncoderPreset" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling BuiltInStandardEncoderPreset: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_cliptime.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_cliptime.go deleted file mode 100644 index d57cf10337b4f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_cliptime.go +++ /dev/null @@ -1,61 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClipTime interface { -} - -// RawClipTimeImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawClipTimeImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalClipTimeImplementation(input []byte) (ClipTime, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ClipTime into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.AbsoluteClipTime") { - var out AbsoluteClipTime - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AbsoluteClipTime: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.UtcClipTime") { - var out UtcClipTime - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into UtcClipTime: %+v", err) - } - return out, nil - } - - out := RawClipTimeImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_codec.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_codec.go deleted file mode 100644 index 0ac7cdcc648c8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_codec.go +++ /dev/null @@ -1,125 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Codec interface { -} - -// RawCodecImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawCodecImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalCodecImplementation(input []byte) (Codec, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling Codec into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.AacAudio") { - var out AacAudio - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AacAudio: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.Audio") { - var out Audio - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into Audio: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.CopyAudio") { - var out CopyAudio - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into CopyAudio: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.CopyVideo") { - var out CopyVideo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into CopyVideo: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.H264Video") { - var out H264Video - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into H264Video: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.H265Video") { - var out H265Video - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into H265Video: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.Image") { - var out Image - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into Image: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.JpgImage") { - var out JpgImage - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into JpgImage: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.PngImage") { - var out PngImage - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into PngImage: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.Video") { - var out Video - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into Video: %+v", err) - } - return out, nil - } - - out := RawCodecImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_copyaudio.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_copyaudio.go deleted file mode 100644 index 5d1be89597ee1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_copyaudio.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = CopyAudio{} - -type CopyAudio struct { - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = CopyAudio{} - -func (s CopyAudio) MarshalJSON() ([]byte, error) { - type wrapper CopyAudio - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling CopyAudio: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling CopyAudio: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.CopyAudio" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling CopyAudio: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_copyvideo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_copyvideo.go deleted file mode 100644 index 5f663b6d2bfe1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_copyvideo.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = CopyVideo{} - -type CopyVideo struct { - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = CopyVideo{} - -func (s CopyVideo) MarshalJSON() ([]byte, error) { - type wrapper CopyVideo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling CopyVideo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling CopyVideo: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.CopyVideo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling CopyVideo: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_deinterlace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_deinterlace.go deleted file mode 100644 index e32750ed4a714..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_deinterlace.go +++ /dev/null @@ -1,9 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Deinterlace struct { - Mode *DeinterlaceMode `json:"mode,omitempty"` - Parity *DeinterlaceParity `json:"parity,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_facedetectorpreset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_facedetectorpreset.go deleted file mode 100644 index b6b9b66de46cc..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_facedetectorpreset.go +++ /dev/null @@ -1,44 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Preset = FaceDetectorPreset{} - -type FaceDetectorPreset struct { - BlurType *BlurType `json:"blurType,omitempty"` - ExperimentalOptions *map[string]string `json:"experimentalOptions,omitempty"` - Mode *FaceRedactorMode `json:"mode,omitempty"` - Resolution *AnalysisResolution `json:"resolution,omitempty"` - - // Fields inherited from Preset -} - -var _ json.Marshaler = FaceDetectorPreset{} - -func (s FaceDetectorPreset) MarshalJSON() ([]byte, error) { - type wrapper FaceDetectorPreset - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling FaceDetectorPreset: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling FaceDetectorPreset: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.FaceDetectorPreset" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling FaceDetectorPreset: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_filters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_filters.go deleted file mode 100644 index 4e50eaa91aefa..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_filters.go +++ /dev/null @@ -1,53 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Filters struct { - Crop *Rectangle `json:"crop,omitempty"` - Deinterlace *Deinterlace `json:"deinterlace,omitempty"` - Overlays *[]Overlay `json:"overlays,omitempty"` - Rotation *Rotation `json:"rotation,omitempty"` -} - -var _ json.Unmarshaler = &Filters{} - -func (s *Filters) UnmarshalJSON(bytes []byte) error { - type alias Filters - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into Filters: %+v", err) - } - - s.Crop = decoded.Crop - s.Deinterlace = decoded.Deinterlace - s.Rotation = decoded.Rotation - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling Filters into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["overlays"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Overlays into list []json.RawMessage: %+v", err) - } - - output := make([]Overlay, 0) - for i, val := range listTemp { - impl, err := unmarshalOverlayImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Overlays' for 'Filters': %+v", i, err) - } - output = append(output, impl) - } - s.Overlays = &output - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_format.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_format.go deleted file mode 100644 index 65f94ae3b899d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_format.go +++ /dev/null @@ -1,93 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Format interface { -} - -// RawFormatImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawFormatImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalFormatImplementation(input []byte) (Format, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling Format into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ImageFormat") { - var out ImageFormat - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ImageFormat: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.JpgFormat") { - var out JpgFormat - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into JpgFormat: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.Mp4Format") { - var out Mp4Format - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into Mp4Format: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.MultiBitrateFormat") { - var out MultiBitrateFormat - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MultiBitrateFormat: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.PngFormat") { - var out PngFormat - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into PngFormat: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.TransportStreamFormat") { - var out TransportStreamFormat - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into TransportStreamFormat: %+v", err) - } - return out, nil - } - - out := RawFormatImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_fromallinputfile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_fromallinputfile.go deleted file mode 100644 index c1a7d3860e4b9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_fromallinputfile.go +++ /dev/null @@ -1,69 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ InputDefinition = FromAllInputFile{} - -type FromAllInputFile struct { - - // Fields inherited from InputDefinition - IncludedTracks *[]TrackDescriptor `json:"includedTracks,omitempty"` -} - -var _ json.Marshaler = FromAllInputFile{} - -func (s FromAllInputFile) MarshalJSON() ([]byte, error) { - type wrapper FromAllInputFile - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling FromAllInputFile: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling FromAllInputFile: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.FromAllInputFile" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling FromAllInputFile: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &FromAllInputFile{} - -func (s *FromAllInputFile) UnmarshalJSON(bytes []byte) error { - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling FromAllInputFile into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["includedTracks"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling IncludedTracks into list []json.RawMessage: %+v", err) - } - - output := make([]TrackDescriptor, 0) - for i, val := range listTemp { - impl, err := unmarshalTrackDescriptorImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'IncludedTracks' for 'FromAllInputFile': %+v", i, err) - } - output = append(output, impl) - } - s.IncludedTracks = &output - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_fromeachinputfile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_fromeachinputfile.go deleted file mode 100644 index 02137a86e8ad0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_fromeachinputfile.go +++ /dev/null @@ -1,69 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ InputDefinition = FromEachInputFile{} - -type FromEachInputFile struct { - - // Fields inherited from InputDefinition - IncludedTracks *[]TrackDescriptor `json:"includedTracks,omitempty"` -} - -var _ json.Marshaler = FromEachInputFile{} - -func (s FromEachInputFile) MarshalJSON() ([]byte, error) { - type wrapper FromEachInputFile - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling FromEachInputFile: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling FromEachInputFile: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.FromEachInputFile" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling FromEachInputFile: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &FromEachInputFile{} - -func (s *FromEachInputFile) UnmarshalJSON(bytes []byte) error { - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling FromEachInputFile into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["includedTracks"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling IncludedTracks into list []json.RawMessage: %+v", err) - } - - output := make([]TrackDescriptor, 0) - for i, val := range listTemp { - impl, err := unmarshalTrackDescriptorImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'IncludedTracks' for 'FromEachInputFile': %+v", i, err) - } - output = append(output, impl) - } - s.IncludedTracks = &output - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_h264layer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_h264layer.go deleted file mode 100644 index 6320f6b1b413e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_h264layer.go +++ /dev/null @@ -1,22 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type H264Layer struct { - AdaptiveBFrame *bool `json:"adaptiveBFrame,omitempty"` - BFrames *int64 `json:"bFrames,omitempty"` - Bitrate int64 `json:"bitrate"` - BufferWindow *string `json:"bufferWindow,omitempty"` - Crf *float64 `json:"crf,omitempty"` - EntropyMode *EntropyMode `json:"entropyMode,omitempty"` - FrameRate *string `json:"frameRate,omitempty"` - Height *string `json:"height,omitempty"` - Label *string `json:"label,omitempty"` - Level *string `json:"level,omitempty"` - MaxBitrate *int64 `json:"maxBitrate,omitempty"` - Profile *H264VideoProfile `json:"profile,omitempty"` - ReferenceFrames *int64 `json:"referenceFrames,omitempty"` - Slices *int64 `json:"slices,omitempty"` - Width *string `json:"width,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_h264video.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_h264video.go deleted file mode 100644 index fbcd311e539ce..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_h264video.go +++ /dev/null @@ -1,48 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = H264Video{} - -type H264Video struct { - Complexity *H264Complexity `json:"complexity,omitempty"` - KeyFrameInterval *string `json:"keyFrameInterval,omitempty"` - Layers *[]H264Layer `json:"layers,omitempty"` - RateControlMode *H264RateControlMode `json:"rateControlMode,omitempty"` - SceneChangeDetection *bool `json:"sceneChangeDetection,omitempty"` - StretchMode *StretchMode `json:"stretchMode,omitempty"` - SyncMode *VideoSyncMode `json:"syncMode,omitempty"` - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = H264Video{} - -func (s H264Video) MarshalJSON() ([]byte, error) { - type wrapper H264Video - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling H264Video: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling H264Video: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.H264Video" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling H264Video: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_h265layer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_h265layer.go deleted file mode 100644 index 1580e51ffcabb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_h265layer.go +++ /dev/null @@ -1,21 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type H265Layer struct { - AdaptiveBFrame *bool `json:"adaptiveBFrame,omitempty"` - BFrames *int64 `json:"bFrames,omitempty"` - Bitrate int64 `json:"bitrate"` - BufferWindow *string `json:"bufferWindow,omitempty"` - Crf *float64 `json:"crf,omitempty"` - FrameRate *string `json:"frameRate,omitempty"` - Height *string `json:"height,omitempty"` - Label *string `json:"label,omitempty"` - Level *string `json:"level,omitempty"` - MaxBitrate *int64 `json:"maxBitrate,omitempty"` - Profile *H265VideoProfile `json:"profile,omitempty"` - ReferenceFrames *int64 `json:"referenceFrames,omitempty"` - Slices *int64 `json:"slices,omitempty"` - Width *string `json:"width,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_h265video.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_h265video.go deleted file mode 100644 index 9edadac194a27..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_h265video.go +++ /dev/null @@ -1,47 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = H265Video{} - -type H265Video struct { - Complexity *H265Complexity `json:"complexity,omitempty"` - KeyFrameInterval *string `json:"keyFrameInterval,omitempty"` - Layers *[]H265Layer `json:"layers,omitempty"` - SceneChangeDetection *bool `json:"sceneChangeDetection,omitempty"` - StretchMode *StretchMode `json:"stretchMode,omitempty"` - SyncMode *VideoSyncMode `json:"syncMode,omitempty"` - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = H265Video{} - -func (s H265Video) MarshalJSON() ([]byte, error) { - type wrapper H265Video - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling H265Video: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling H265Video: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.H265Video" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling H265Video: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_image.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_image.go deleted file mode 100644 index 072a1a7537e0b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_image.go +++ /dev/null @@ -1,47 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = Image{} - -type Image struct { - KeyFrameInterval *string `json:"keyFrameInterval,omitempty"` - Range *string `json:"range,omitempty"` - Start string `json:"start"` - Step *string `json:"step,omitempty"` - StretchMode *StretchMode `json:"stretchMode,omitempty"` - SyncMode *VideoSyncMode `json:"syncMode,omitempty"` - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = Image{} - -func (s Image) MarshalJSON() ([]byte, error) { - type wrapper Image - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling Image: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling Image: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.Image" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling Image: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_imageformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_imageformat.go deleted file mode 100644 index 0e390a0c6f37c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_imageformat.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Format = ImageFormat{} - -type ImageFormat struct { - - // Fields inherited from Format - FilenamePattern string `json:"filenamePattern"` -} - -var _ json.Marshaler = ImageFormat{} - -func (s ImageFormat) MarshalJSON() ([]byte, error) { - type wrapper ImageFormat - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ImageFormat: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ImageFormat: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ImageFormat" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ImageFormat: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_inputdefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_inputdefinition.go deleted file mode 100644 index 04e0c4c26ba10..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_inputdefinition.go +++ /dev/null @@ -1,69 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InputDefinition interface { -} - -// RawInputDefinitionImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawInputDefinitionImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalInputDefinitionImplementation(input []byte) (InputDefinition, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling InputDefinition into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.FromAllInputFile") { - var out FromAllInputFile - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into FromAllInputFile: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.FromEachInputFile") { - var out FromEachInputFile - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into FromEachInputFile: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.InputFile") { - var out InputFile - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into InputFile: %+v", err) - } - return out, nil - } - - out := RawInputDefinitionImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_inputfile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_inputfile.go deleted file mode 100644 index 4c3f11b6d7f95..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_inputfile.go +++ /dev/null @@ -1,77 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ InputDefinition = InputFile{} - -type InputFile struct { - Filename *string `json:"filename,omitempty"` - - // Fields inherited from InputDefinition - IncludedTracks *[]TrackDescriptor `json:"includedTracks,omitempty"` -} - -var _ json.Marshaler = InputFile{} - -func (s InputFile) MarshalJSON() ([]byte, error) { - type wrapper InputFile - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling InputFile: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling InputFile: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.InputFile" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling InputFile: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &InputFile{} - -func (s *InputFile) UnmarshalJSON(bytes []byte) error { - type alias InputFile - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into InputFile: %+v", err) - } - - s.Filename = decoded.Filename - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling InputFile into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["includedTracks"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling IncludedTracks into list []json.RawMessage: %+v", err) - } - - output := make([]TrackDescriptor, 0) - for i, val := range listTemp { - impl, err := unmarshalTrackDescriptorImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'IncludedTracks' for 'InputFile': %+v", i, err) - } - output = append(output, impl) - } - s.IncludedTracks = &output - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_job.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_job.go deleted file mode 100644 index db973712dda3e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_job.go +++ /dev/null @@ -1,16 +0,0 @@ -package encodings - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Job struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *JobProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_joberror.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_joberror.go deleted file mode 100644 index c14b785a690b0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_joberror.go +++ /dev/null @@ -1,12 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobError struct { - Category *JobErrorCategory `json:"category,omitempty"` - Code *JobErrorCode `json:"code,omitempty"` - Details *[]JobErrorDetail `json:"details,omitempty"` - Message *string `json:"message,omitempty"` - Retry *JobRetry `json:"retry,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_joberrordetail.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_joberrordetail.go deleted file mode 100644 index 80595e90276a7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_joberrordetail.go +++ /dev/null @@ -1,9 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobErrorDetail struct { - Code *string `json:"code,omitempty"` - Message *string `json:"message,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jobinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jobinput.go deleted file mode 100644 index e4d997151def6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jobinput.go +++ /dev/null @@ -1,85 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobInput interface { -} - -// RawJobInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawJobInputImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalJobInputImplementation(input []byte) (JobInput, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling JobInput into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.JobInputAsset") { - var out JobInputAsset - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into JobInputAsset: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.JobInputClip") { - var out JobInputClip - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into JobInputClip: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.JobInputHttp") { - var out JobInputHTTP - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into JobInputHTTP: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.JobInputSequence") { - var out JobInputSequence - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into JobInputSequence: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.JobInputs") { - var out JobInputs - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into JobInputs: %+v", err) - } - return out, nil - } - - out := RawJobInputImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jobinputasset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jobinputasset.go deleted file mode 100644 index 689f8282884ed..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jobinputasset.go +++ /dev/null @@ -1,99 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ JobInput = JobInputAsset{} - -type JobInputAsset struct { - AssetName string `json:"assetName"` - End ClipTime `json:"end"` - Files *[]string `json:"files,omitempty"` - InputDefinitions *[]InputDefinition `json:"inputDefinitions,omitempty"` - Label *string `json:"label,omitempty"` - Start ClipTime `json:"start"` - - // Fields inherited from JobInput -} - -var _ json.Marshaler = JobInputAsset{} - -func (s JobInputAsset) MarshalJSON() ([]byte, error) { - type wrapper JobInputAsset - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling JobInputAsset: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling JobInputAsset: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.JobInputAsset" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling JobInputAsset: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &JobInputAsset{} - -func (s *JobInputAsset) UnmarshalJSON(bytes []byte) error { - type alias JobInputAsset - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into JobInputAsset: %+v", err) - } - - s.AssetName = decoded.AssetName - s.Files = decoded.Files - s.Label = decoded.Label - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling JobInputAsset into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["end"]; ok { - impl, err := unmarshalClipTimeImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'End' for 'JobInputAsset': %+v", err) - } - s.End = impl - } - - if v, ok := temp["inputDefinitions"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling InputDefinitions into list []json.RawMessage: %+v", err) - } - - output := make([]InputDefinition, 0) - for i, val := range listTemp { - impl, err := unmarshalInputDefinitionImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'InputDefinitions' for 'JobInputAsset': %+v", i, err) - } - output = append(output, impl) - } - s.InputDefinitions = &output - } - - if v, ok := temp["start"]; ok { - impl, err := unmarshalClipTimeImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Start' for 'JobInputAsset': %+v", err) - } - s.Start = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jobinputclip.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jobinputclip.go deleted file mode 100644 index 5136c539d5b33..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jobinputclip.go +++ /dev/null @@ -1,97 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ JobInput = JobInputClip{} - -type JobInputClip struct { - End ClipTime `json:"end"` - Files *[]string `json:"files,omitempty"` - InputDefinitions *[]InputDefinition `json:"inputDefinitions,omitempty"` - Label *string `json:"label,omitempty"` - Start ClipTime `json:"start"` - - // Fields inherited from JobInput -} - -var _ json.Marshaler = JobInputClip{} - -func (s JobInputClip) MarshalJSON() ([]byte, error) { - type wrapper JobInputClip - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling JobInputClip: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling JobInputClip: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.JobInputClip" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling JobInputClip: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &JobInputClip{} - -func (s *JobInputClip) UnmarshalJSON(bytes []byte) error { - type alias JobInputClip - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into JobInputClip: %+v", err) - } - - s.Files = decoded.Files - s.Label = decoded.Label - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling JobInputClip into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["end"]; ok { - impl, err := unmarshalClipTimeImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'End' for 'JobInputClip': %+v", err) - } - s.End = impl - } - - if v, ok := temp["inputDefinitions"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling InputDefinitions into list []json.RawMessage: %+v", err) - } - - output := make([]InputDefinition, 0) - for i, val := range listTemp { - impl, err := unmarshalInputDefinitionImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'InputDefinitions' for 'JobInputClip': %+v", i, err) - } - output = append(output, impl) - } - s.InputDefinitions = &output - } - - if v, ok := temp["start"]; ok { - impl, err := unmarshalClipTimeImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Start' for 'JobInputClip': %+v", err) - } - s.Start = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jobinputhttp.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jobinputhttp.go deleted file mode 100644 index 57beddd3fde43..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jobinputhttp.go +++ /dev/null @@ -1,99 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ JobInput = JobInputHTTP{} - -type JobInputHTTP struct { - BaseUri *string `json:"baseUri,omitempty"` - End ClipTime `json:"end"` - Files *[]string `json:"files,omitempty"` - InputDefinitions *[]InputDefinition `json:"inputDefinitions,omitempty"` - Label *string `json:"label,omitempty"` - Start ClipTime `json:"start"` - - // Fields inherited from JobInput -} - -var _ json.Marshaler = JobInputHTTP{} - -func (s JobInputHTTP) MarshalJSON() ([]byte, error) { - type wrapper JobInputHTTP - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling JobInputHTTP: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling JobInputHTTP: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.JobInputHttp" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling JobInputHTTP: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &JobInputHTTP{} - -func (s *JobInputHTTP) UnmarshalJSON(bytes []byte) error { - type alias JobInputHTTP - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into JobInputHTTP: %+v", err) - } - - s.BaseUri = decoded.BaseUri - s.Files = decoded.Files - s.Label = decoded.Label - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling JobInputHTTP into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["end"]; ok { - impl, err := unmarshalClipTimeImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'End' for 'JobInputHTTP': %+v", err) - } - s.End = impl - } - - if v, ok := temp["inputDefinitions"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling InputDefinitions into list []json.RawMessage: %+v", err) - } - - output := make([]InputDefinition, 0) - for i, val := range listTemp { - impl, err := unmarshalInputDefinitionImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'InputDefinitions' for 'JobInputHTTP': %+v", i, err) - } - output = append(output, impl) - } - s.InputDefinitions = &output - } - - if v, ok := temp["start"]; ok { - impl, err := unmarshalClipTimeImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Start' for 'JobInputHTTP': %+v", err) - } - s.Start = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jobinputs.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jobinputs.go deleted file mode 100644 index b63a141b6e04d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jobinputs.go +++ /dev/null @@ -1,69 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ JobInput = JobInputs{} - -type JobInputs struct { - Inputs *[]JobInput `json:"inputs,omitempty"` - - // Fields inherited from JobInput -} - -var _ json.Marshaler = JobInputs{} - -func (s JobInputs) MarshalJSON() ([]byte, error) { - type wrapper JobInputs - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling JobInputs: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling JobInputs: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.JobInputs" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling JobInputs: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &JobInputs{} - -func (s *JobInputs) UnmarshalJSON(bytes []byte) error { - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling JobInputs into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["inputs"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Inputs into list []json.RawMessage: %+v", err) - } - - output := make([]JobInput, 0) - for i, val := range listTemp { - impl, err := unmarshalJobInputImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Inputs' for 'JobInputs': %+v", i, err) - } - output = append(output, impl) - } - s.Inputs = &output - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jobinputsequence.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jobinputsequence.go deleted file mode 100644 index 9c85a35b73003..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jobinputsequence.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ JobInput = JobInputSequence{} - -type JobInputSequence struct { - Inputs *[]JobInputClip `json:"inputs,omitempty"` - - // Fields inherited from JobInput -} - -var _ json.Marshaler = JobInputSequence{} - -func (s JobInputSequence) MarshalJSON() ([]byte, error) { - type wrapper JobInputSequence - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling JobInputSequence: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling JobInputSequence: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.JobInputSequence" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling JobInputSequence: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_joboutput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_joboutput.go deleted file mode 100644 index 6135f1282f5c7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_joboutput.go +++ /dev/null @@ -1,53 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobOutput interface { -} - -// RawJobOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawJobOutputImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalJobOutputImplementation(input []byte) (JobOutput, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling JobOutput into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.JobOutputAsset") { - var out JobOutputAsset - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into JobOutputAsset: %+v", err) - } - return out, nil - } - - out := RawJobOutputImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_joboutputasset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_joboutputasset.go deleted file mode 100644 index ed0aa4672cc3f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_joboutputasset.go +++ /dev/null @@ -1,107 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ JobOutput = JobOutputAsset{} - -type JobOutputAsset struct { - AssetName string `json:"assetName"` - - // Fields inherited from JobOutput - EndTime *string `json:"endTime,omitempty"` - Error *JobError `json:"error,omitempty"` - Label *string `json:"label,omitempty"` - PresetOverride Preset `json:"presetOverride"` - Progress *int64 `json:"progress,omitempty"` - StartTime *string `json:"startTime,omitempty"` - State *JobState `json:"state,omitempty"` -} - -func (o *JobOutputAsset) GetEndTimeAsTime() (*time.Time, error) { - if o.EndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *JobOutputAsset) SetEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndTime = &formatted -} - -func (o *JobOutputAsset) GetStartTimeAsTime() (*time.Time, error) { - if o.StartTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *JobOutputAsset) SetStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartTime = &formatted -} - -var _ json.Marshaler = JobOutputAsset{} - -func (s JobOutputAsset) MarshalJSON() ([]byte, error) { - type wrapper JobOutputAsset - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling JobOutputAsset: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling JobOutputAsset: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.JobOutputAsset" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling JobOutputAsset: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &JobOutputAsset{} - -func (s *JobOutputAsset) UnmarshalJSON(bytes []byte) error { - type alias JobOutputAsset - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into JobOutputAsset: %+v", err) - } - - s.AssetName = decoded.AssetName - s.EndTime = decoded.EndTime - s.Error = decoded.Error - s.Label = decoded.Label - s.Progress = decoded.Progress - s.StartTime = decoded.StartTime - s.State = decoded.State - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling JobOutputAsset into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["presetOverride"]; ok { - impl, err := unmarshalPresetImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'PresetOverride' for 'JobOutputAsset': %+v", err) - } - s.PresetOverride = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jobproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jobproperties.go deleted file mode 100644 index d1d9fcd58d521..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jobproperties.go +++ /dev/null @@ -1,123 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobProperties struct { - CorrelationData *map[string]string `json:"correlationData,omitempty"` - Created *string `json:"created,omitempty"` - Description *string `json:"description,omitempty"` - EndTime *string `json:"endTime,omitempty"` - Input JobInput `json:"input"` - LastModified *string `json:"lastModified,omitempty"` - Outputs []JobOutput `json:"outputs"` - Priority *Priority `json:"priority,omitempty"` - StartTime *string `json:"startTime,omitempty"` - State *JobState `json:"state,omitempty"` -} - -func (o *JobProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *JobProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *JobProperties) GetEndTimeAsTime() (*time.Time, error) { - if o.EndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *JobProperties) SetEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndTime = &formatted -} - -func (o *JobProperties) GetLastModifiedAsTime() (*time.Time, error) { - if o.LastModified == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModified, "2006-01-02T15:04:05Z07:00") -} - -func (o *JobProperties) SetLastModifiedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModified = &formatted -} - -func (o *JobProperties) GetStartTimeAsTime() (*time.Time, error) { - if o.StartTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *JobProperties) SetStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartTime = &formatted -} - -var _ json.Unmarshaler = &JobProperties{} - -func (s *JobProperties) UnmarshalJSON(bytes []byte) error { - type alias JobProperties - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into JobProperties: %+v", err) - } - - s.CorrelationData = decoded.CorrelationData - s.Created = decoded.Created - s.Description = decoded.Description - s.EndTime = decoded.EndTime - s.LastModified = decoded.LastModified - s.Priority = decoded.Priority - s.StartTime = decoded.StartTime - s.State = decoded.State - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling JobProperties into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["input"]; ok { - impl, err := unmarshalJobInputImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Input' for 'JobProperties': %+v", err) - } - s.Input = impl - } - - if v, ok := temp["outputs"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Outputs into list []json.RawMessage: %+v", err) - } - - output := make([]JobOutput, 0) - for i, val := range listTemp { - impl, err := unmarshalJobOutputImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Outputs' for 'JobProperties': %+v", i, err) - } - output = append(output, impl) - } - s.Outputs = output - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jpgformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jpgformat.go deleted file mode 100644 index de3e7aba6df37..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jpgformat.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Format = JpgFormat{} - -type JpgFormat struct { - - // Fields inherited from Format - FilenamePattern string `json:"filenamePattern"` -} - -var _ json.Marshaler = JpgFormat{} - -func (s JpgFormat) MarshalJSON() ([]byte, error) { - type wrapper JpgFormat - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling JpgFormat: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling JpgFormat: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.JpgFormat" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling JpgFormat: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jpgimage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jpgimage.go deleted file mode 100644 index 6f2adffacd3f9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jpgimage.go +++ /dev/null @@ -1,49 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = JpgImage{} - -type JpgImage struct { - KeyFrameInterval *string `json:"keyFrameInterval,omitempty"` - Layers *[]JpgLayer `json:"layers,omitempty"` - Range *string `json:"range,omitempty"` - SpriteColumn *int64 `json:"spriteColumn,omitempty"` - Start string `json:"start"` - Step *string `json:"step,omitempty"` - StretchMode *StretchMode `json:"stretchMode,omitempty"` - SyncMode *VideoSyncMode `json:"syncMode,omitempty"` - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = JpgImage{} - -func (s JpgImage) MarshalJSON() ([]byte, error) { - type wrapper JpgImage - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling JpgImage: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling JpgImage: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.JpgImage" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling JpgImage: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jpglayer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jpglayer.go deleted file mode 100644 index dfe576acd0d43..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_jpglayer.go +++ /dev/null @@ -1,11 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JpgLayer struct { - Height *string `json:"height,omitempty"` - Label *string `json:"label,omitempty"` - Quality *int64 `json:"quality,omitempty"` - Width *string `json:"width,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_layer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_layer.go deleted file mode 100644 index 81cb006bc1560..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_layer.go +++ /dev/null @@ -1,10 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Layer struct { - Height *string `json:"height,omitempty"` - Label *string `json:"label,omitempty"` - Width *string `json:"width,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_mp4format.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_mp4format.go deleted file mode 100644 index 44e41dd94921e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_mp4format.go +++ /dev/null @@ -1,42 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Format = Mp4Format{} - -type Mp4Format struct { - OutputFiles *[]OutputFile `json:"outputFiles,omitempty"` - - // Fields inherited from Format - FilenamePattern string `json:"filenamePattern"` -} - -var _ json.Marshaler = Mp4Format{} - -func (s Mp4Format) MarshalJSON() ([]byte, error) { - type wrapper Mp4Format - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling Mp4Format: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling Mp4Format: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.Mp4Format" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling Mp4Format: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_multibitrateformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_multibitrateformat.go deleted file mode 100644 index fec53d0e6804b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_multibitrateformat.go +++ /dev/null @@ -1,42 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Format = MultiBitrateFormat{} - -type MultiBitrateFormat struct { - OutputFiles *[]OutputFile `json:"outputFiles,omitempty"` - - // Fields inherited from Format - FilenamePattern string `json:"filenamePattern"` -} - -var _ json.Marshaler = MultiBitrateFormat{} - -func (s MultiBitrateFormat) MarshalJSON() ([]byte, error) { - type wrapper MultiBitrateFormat - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MultiBitrateFormat: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MultiBitrateFormat: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.MultiBitrateFormat" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MultiBitrateFormat: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_outputfile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_outputfile.go deleted file mode 100644 index e83b5bdb27f22..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_outputfile.go +++ /dev/null @@ -1,8 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type OutputFile struct { - Labels []string `json:"labels"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_overlay.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_overlay.go deleted file mode 100644 index 160ee13ef1d0c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_overlay.go +++ /dev/null @@ -1,61 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Overlay interface { -} - -// RawOverlayImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawOverlayImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalOverlayImplementation(input []byte) (Overlay, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling Overlay into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.AudioOverlay") { - var out AudioOverlay - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AudioOverlay: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.VideoOverlay") { - var out VideoOverlay - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into VideoOverlay: %+v", err) - } - return out, nil - } - - out := RawOverlayImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_pngformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_pngformat.go deleted file mode 100644 index e9b5216bb869f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_pngformat.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Format = PngFormat{} - -type PngFormat struct { - - // Fields inherited from Format - FilenamePattern string `json:"filenamePattern"` -} - -var _ json.Marshaler = PngFormat{} - -func (s PngFormat) MarshalJSON() ([]byte, error) { - type wrapper PngFormat - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling PngFormat: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling PngFormat: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.PngFormat" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling PngFormat: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_pngimage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_pngimage.go deleted file mode 100644 index 7209b7aba304b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_pngimage.go +++ /dev/null @@ -1,48 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = PngImage{} - -type PngImage struct { - KeyFrameInterval *string `json:"keyFrameInterval,omitempty"` - Layers *[]Layer `json:"layers,omitempty"` - Range *string `json:"range,omitempty"` - Start string `json:"start"` - Step *string `json:"step,omitempty"` - StretchMode *StretchMode `json:"stretchMode,omitempty"` - SyncMode *VideoSyncMode `json:"syncMode,omitempty"` - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = PngImage{} - -func (s PngImage) MarshalJSON() ([]byte, error) { - type wrapper PngImage - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling PngImage: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling PngImage: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.PngImage" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling PngImage: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_preset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_preset.go deleted file mode 100644 index af6ef205d3345..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_preset.go +++ /dev/null @@ -1,85 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Preset interface { -} - -// RawPresetImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawPresetImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalPresetImplementation(input []byte) (Preset, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling Preset into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.AudioAnalyzerPreset") { - var out AudioAnalyzerPreset - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AudioAnalyzerPreset: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.BuiltInStandardEncoderPreset") { - var out BuiltInStandardEncoderPreset - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into BuiltInStandardEncoderPreset: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.FaceDetectorPreset") { - var out FaceDetectorPreset - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into FaceDetectorPreset: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.StandardEncoderPreset") { - var out StandardEncoderPreset - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into StandardEncoderPreset: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.VideoAnalyzerPreset") { - var out VideoAnalyzerPreset - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into VideoAnalyzerPreset: %+v", err) - } - return out, nil - } - - out := RawPresetImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_presetconfigurations.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_presetconfigurations.go deleted file mode 100644 index 56262e5ad96bf..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_presetconfigurations.go +++ /dev/null @@ -1,15 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PresetConfigurations struct { - Complexity *Complexity `json:"complexity,omitempty"` - InterleaveOutput *InterleaveOutput `json:"interleaveOutput,omitempty"` - KeyFrameIntervalInSeconds *float64 `json:"keyFrameIntervalInSeconds,omitempty"` - MaxBitrateBps *int64 `json:"maxBitrateBps,omitempty"` - MaxHeight *int64 `json:"maxHeight,omitempty"` - MaxLayers *int64 `json:"maxLayers,omitempty"` - MinBitrateBps *int64 `json:"minBitrateBps,omitempty"` - MinHeight *int64 `json:"minHeight,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_rectangle.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_rectangle.go deleted file mode 100644 index 09b1ba538a97f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_rectangle.go +++ /dev/null @@ -1,11 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Rectangle struct { - Height *string `json:"height,omitempty"` - Left *string `json:"left,omitempty"` - Top *string `json:"top,omitempty"` - Width *string `json:"width,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_selectaudiotrackbyattribute.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_selectaudiotrackbyattribute.go deleted file mode 100644 index ae6bafef50356..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_selectaudiotrackbyattribute.go +++ /dev/null @@ -1,44 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ TrackDescriptor = SelectAudioTrackByAttribute{} - -type SelectAudioTrackByAttribute struct { - Attribute TrackAttribute `json:"attribute"` - ChannelMapping *ChannelMapping `json:"channelMapping,omitempty"` - Filter AttributeFilter `json:"filter"` - FilterValue *string `json:"filterValue,omitempty"` - - // Fields inherited from TrackDescriptor -} - -var _ json.Marshaler = SelectAudioTrackByAttribute{} - -func (s SelectAudioTrackByAttribute) MarshalJSON() ([]byte, error) { - type wrapper SelectAudioTrackByAttribute - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SelectAudioTrackByAttribute: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SelectAudioTrackByAttribute: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.SelectAudioTrackByAttribute" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SelectAudioTrackByAttribute: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_selectaudiotrackbyid.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_selectaudiotrackbyid.go deleted file mode 100644 index e9b4587be0c39..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_selectaudiotrackbyid.go +++ /dev/null @@ -1,42 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ TrackDescriptor = SelectAudioTrackById{} - -type SelectAudioTrackById struct { - ChannelMapping *ChannelMapping `json:"channelMapping,omitempty"` - TrackId int64 `json:"trackId"` - - // Fields inherited from TrackDescriptor -} - -var _ json.Marshaler = SelectAudioTrackById{} - -func (s SelectAudioTrackById) MarshalJSON() ([]byte, error) { - type wrapper SelectAudioTrackById - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SelectAudioTrackById: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SelectAudioTrackById: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.SelectAudioTrackById" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SelectAudioTrackById: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_selectvideotrackbyattribute.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_selectvideotrackbyattribute.go deleted file mode 100644 index 82305909c361c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_selectvideotrackbyattribute.go +++ /dev/null @@ -1,43 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ TrackDescriptor = SelectVideoTrackByAttribute{} - -type SelectVideoTrackByAttribute struct { - Attribute TrackAttribute `json:"attribute"` - Filter AttributeFilter `json:"filter"` - FilterValue *string `json:"filterValue,omitempty"` - - // Fields inherited from TrackDescriptor -} - -var _ json.Marshaler = SelectVideoTrackByAttribute{} - -func (s SelectVideoTrackByAttribute) MarshalJSON() ([]byte, error) { - type wrapper SelectVideoTrackByAttribute - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SelectVideoTrackByAttribute: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SelectVideoTrackByAttribute: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.SelectVideoTrackByAttribute" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SelectVideoTrackByAttribute: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_selectvideotrackbyid.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_selectvideotrackbyid.go deleted file mode 100644 index 4527e73336eba..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_selectvideotrackbyid.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ TrackDescriptor = SelectVideoTrackById{} - -type SelectVideoTrackById struct { - TrackId int64 `json:"trackId"` - - // Fields inherited from TrackDescriptor -} - -var _ json.Marshaler = SelectVideoTrackById{} - -func (s SelectVideoTrackById) MarshalJSON() ([]byte, error) { - type wrapper SelectVideoTrackById - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SelectVideoTrackById: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SelectVideoTrackById: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.SelectVideoTrackById" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SelectVideoTrackById: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_standardencoderpreset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_standardencoderpreset.go deleted file mode 100644 index 35c5b09d1b45d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_standardencoderpreset.go +++ /dev/null @@ -1,95 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Preset = StandardEncoderPreset{} - -type StandardEncoderPreset struct { - Codecs []Codec `json:"codecs"` - Filters *Filters `json:"filters,omitempty"` - Formats []Format `json:"formats"` - - // Fields inherited from Preset -} - -var _ json.Marshaler = StandardEncoderPreset{} - -func (s StandardEncoderPreset) MarshalJSON() ([]byte, error) { - type wrapper StandardEncoderPreset - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling StandardEncoderPreset: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling StandardEncoderPreset: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.StandardEncoderPreset" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling StandardEncoderPreset: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &StandardEncoderPreset{} - -func (s *StandardEncoderPreset) UnmarshalJSON(bytes []byte) error { - type alias StandardEncoderPreset - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into StandardEncoderPreset: %+v", err) - } - - s.Filters = decoded.Filters - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling StandardEncoderPreset into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["codecs"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Codecs into list []json.RawMessage: %+v", err) - } - - output := make([]Codec, 0) - for i, val := range listTemp { - impl, err := unmarshalCodecImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Codecs' for 'StandardEncoderPreset': %+v", i, err) - } - output = append(output, impl) - } - s.Codecs = output - } - - if v, ok := temp["formats"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Formats into list []json.RawMessage: %+v", err) - } - - output := make([]Format, 0) - for i, val := range listTemp { - impl, err := unmarshalFormatImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Formats' for 'StandardEncoderPreset': %+v", i, err) - } - output = append(output, impl) - } - s.Formats = output - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_trackdescriptor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_trackdescriptor.go deleted file mode 100644 index 8aa3d1a50d911..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_trackdescriptor.go +++ /dev/null @@ -1,93 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrackDescriptor interface { -} - -// RawTrackDescriptorImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawTrackDescriptorImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalTrackDescriptorImplementation(input []byte) (TrackDescriptor, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling TrackDescriptor into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.AudioTrackDescriptor") { - var out AudioTrackDescriptor - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AudioTrackDescriptor: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.SelectAudioTrackByAttribute") { - var out SelectAudioTrackByAttribute - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SelectAudioTrackByAttribute: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.SelectAudioTrackById") { - var out SelectAudioTrackById - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SelectAudioTrackById: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.SelectVideoTrackByAttribute") { - var out SelectVideoTrackByAttribute - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SelectVideoTrackByAttribute: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.SelectVideoTrackById") { - var out SelectVideoTrackById - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SelectVideoTrackById: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.VideoTrackDescriptor") { - var out VideoTrackDescriptor - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into VideoTrackDescriptor: %+v", err) - } - return out, nil - } - - out := RawTrackDescriptorImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_transform.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_transform.go deleted file mode 100644 index 01cf33e348080..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_transform.go +++ /dev/null @@ -1,16 +0,0 @@ -package encodings - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Transform struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *TransformProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_transformoutput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_transformoutput.go deleted file mode 100644 index 8532442b750d1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_transformoutput.go +++ /dev/null @@ -1,42 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TransformOutput struct { - OnError *OnErrorType `json:"onError,omitempty"` - Preset Preset `json:"preset"` - RelativePriority *Priority `json:"relativePriority,omitempty"` -} - -var _ json.Unmarshaler = &TransformOutput{} - -func (s *TransformOutput) UnmarshalJSON(bytes []byte) error { - type alias TransformOutput - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into TransformOutput: %+v", err) - } - - s.OnError = decoded.OnError - s.RelativePriority = decoded.RelativePriority - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling TransformOutput into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["preset"]; ok { - impl, err := unmarshalPresetImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Preset' for 'TransformOutput': %+v", err) - } - s.Preset = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_transformproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_transformproperties.go deleted file mode 100644 index 74e7048d69610..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_transformproperties.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TransformProperties struct { - Created *string `json:"created,omitempty"` - Description *string `json:"description,omitempty"` - LastModified *string `json:"lastModified,omitempty"` - Outputs []TransformOutput `json:"outputs"` -} - -func (o *TransformProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *TransformProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *TransformProperties) GetLastModifiedAsTime() (*time.Time, error) { - if o.LastModified == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModified, "2006-01-02T15:04:05Z07:00") -} - -func (o *TransformProperties) SetLastModifiedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModified = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_transportstreamformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_transportstreamformat.go deleted file mode 100644 index 5a869925fa556..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_transportstreamformat.go +++ /dev/null @@ -1,42 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Format = TransportStreamFormat{} - -type TransportStreamFormat struct { - OutputFiles *[]OutputFile `json:"outputFiles,omitempty"` - - // Fields inherited from Format - FilenamePattern string `json:"filenamePattern"` -} - -var _ json.Marshaler = TransportStreamFormat{} - -func (s TransportStreamFormat) MarshalJSON() ([]byte, error) { - type wrapper TransportStreamFormat - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling TransportStreamFormat: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling TransportStreamFormat: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.TransportStreamFormat" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling TransportStreamFormat: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_utccliptime.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_utccliptime.go deleted file mode 100644 index 0787e406a9422..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_utccliptime.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClipTime = UtcClipTime{} - -type UtcClipTime struct { - Time string `json:"time"` - - // Fields inherited from ClipTime -} - -var _ json.Marshaler = UtcClipTime{} - -func (s UtcClipTime) MarshalJSON() ([]byte, error) { - type wrapper UtcClipTime - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling UtcClipTime: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling UtcClipTime: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.UtcClipTime" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling UtcClipTime: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_video.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_video.go deleted file mode 100644 index 35e566481c9d3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_video.go +++ /dev/null @@ -1,44 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = Video{} - -type Video struct { - KeyFrameInterval *string `json:"keyFrameInterval,omitempty"` - StretchMode *StretchMode `json:"stretchMode,omitempty"` - SyncMode *VideoSyncMode `json:"syncMode,omitempty"` - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = Video{} - -func (s Video) MarshalJSON() ([]byte, error) { - type wrapper Video - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling Video: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling Video: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.Video" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling Video: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_videoanalyzerpreset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_videoanalyzerpreset.go deleted file mode 100644 index d98ab1914de8e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_videoanalyzerpreset.go +++ /dev/null @@ -1,44 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Preset = VideoAnalyzerPreset{} - -type VideoAnalyzerPreset struct { - AudioLanguage *string `json:"audioLanguage,omitempty"` - ExperimentalOptions *map[string]string `json:"experimentalOptions,omitempty"` - InsightsToExtract *InsightsType `json:"insightsToExtract,omitempty"` - Mode *AudioAnalysisMode `json:"mode,omitempty"` - - // Fields inherited from Preset -} - -var _ json.Marshaler = VideoAnalyzerPreset{} - -func (s VideoAnalyzerPreset) MarshalJSON() ([]byte, error) { - type wrapper VideoAnalyzerPreset - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling VideoAnalyzerPreset: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling VideoAnalyzerPreset: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.VideoAnalyzerPreset" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling VideoAnalyzerPreset: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_videooverlay.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_videooverlay.go deleted file mode 100644 index 27d0f02825678..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_videooverlay.go +++ /dev/null @@ -1,49 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Overlay = VideoOverlay{} - -type VideoOverlay struct { - CropRectangle *Rectangle `json:"cropRectangle,omitempty"` - Opacity *float64 `json:"opacity,omitempty"` - Position *Rectangle `json:"position,omitempty"` - - // Fields inherited from Overlay - AudioGainLevel *float64 `json:"audioGainLevel,omitempty"` - End *string `json:"end,omitempty"` - FadeInDuration *string `json:"fadeInDuration,omitempty"` - FadeOutDuration *string `json:"fadeOutDuration,omitempty"` - InputLabel string `json:"inputLabel"` - Start *string `json:"start,omitempty"` -} - -var _ json.Marshaler = VideoOverlay{} - -func (s VideoOverlay) MarshalJSON() ([]byte, error) { - type wrapper VideoOverlay - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling VideoOverlay: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling VideoOverlay: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.VideoOverlay" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling VideoOverlay: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_videotrackdescriptor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_videotrackdescriptor.go deleted file mode 100644 index ff1f690b1d0da..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/model_videotrackdescriptor.go +++ /dev/null @@ -1,40 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ TrackDescriptor = VideoTrackDescriptor{} - -type VideoTrackDescriptor struct { - - // Fields inherited from TrackDescriptor -} - -var _ json.Marshaler = VideoTrackDescriptor{} - -func (s VideoTrackDescriptor) MarshalJSON() ([]byte, error) { - type wrapper VideoTrackDescriptor - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling VideoTrackDescriptor: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling VideoTrackDescriptor: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.VideoTrackDescriptor" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling VideoTrackDescriptor: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/predicates.go deleted file mode 100644 index 7c97ff6b81141..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/predicates.go +++ /dev/null @@ -1,50 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p JobOperationPredicate) Matches(input Job) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type TransformOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p TransformOperationPredicate) Matches(input Transform) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/version.go deleted file mode 100644 index d2a74edca26ca..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package encodings - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/encodings/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/README.md deleted file mode 100644 index 7e28b05adecc0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/README.md +++ /dev/null @@ -1,152 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents` Documentation - -The `liveevents` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2021-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents" -``` - - -### Client Initialization - -```go -client := liveevents.NewLiveEventsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `LiveEventsClient.Allocate` - -```go -ctx := context.TODO() -id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -if err := client.AllocateThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LiveEventsClient.Create` - -```go -ctx := context.TODO() -id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -payload := liveevents.LiveEvent{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload, liveevents.DefaultCreateOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `LiveEventsClient.Delete` - -```go -ctx := context.TODO() -id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LiveEventsClient.Get` - -```go -ctx := context.TODO() -id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LiveEventsClient.List` - -```go -ctx := context.TODO() -id := liveevents.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LiveEventsClient.Reset` - -```go -ctx := context.TODO() -id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -if err := client.ResetThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LiveEventsClient.Start` - -```go -ctx := context.TODO() -id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -if err := client.StartThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LiveEventsClient.Stop` - -```go -ctx := context.TODO() -id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -payload := liveevents.LiveEventActionInput{ - // ... -} - - -if err := client.StopThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `LiveEventsClient.Update` - -```go -ctx := context.TODO() -id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -payload := liveevents.LiveEvent{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/client.go deleted file mode 100644 index 85dcde5c926f3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package liveevents - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventsClient struct { - Client *resourcemanager.Client -} - -func NewLiveEventsClientWithBaseURI(sdkApi sdkEnv.Api) (*LiveEventsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "liveevents", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating LiveEventsClient: %+v", err) - } - - return &LiveEventsClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/constants.go deleted file mode 100644 index 9047af7f88fe0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/constants.go +++ /dev/null @@ -1,245 +0,0 @@ -package liveevents - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventEncodingType string - -const ( - LiveEventEncodingTypeNone LiveEventEncodingType = "None" - LiveEventEncodingTypePassthroughBasic LiveEventEncodingType = "PassthroughBasic" - LiveEventEncodingTypePassthroughStandard LiveEventEncodingType = "PassthroughStandard" - LiveEventEncodingTypePremiumOneZeroEightZerop LiveEventEncodingType = "Premium1080p" - LiveEventEncodingTypeStandard LiveEventEncodingType = "Standard" -) - -func PossibleValuesForLiveEventEncodingType() []string { - return []string{ - string(LiveEventEncodingTypeNone), - string(LiveEventEncodingTypePassthroughBasic), - string(LiveEventEncodingTypePassthroughStandard), - string(LiveEventEncodingTypePremiumOneZeroEightZerop), - string(LiveEventEncodingTypeStandard), - } -} - -func (s *LiveEventEncodingType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLiveEventEncodingType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLiveEventEncodingType(input string) (*LiveEventEncodingType, error) { - vals := map[string]LiveEventEncodingType{ - "none": LiveEventEncodingTypeNone, - "passthroughbasic": LiveEventEncodingTypePassthroughBasic, - "passthroughstandard": LiveEventEncodingTypePassthroughStandard, - "premium1080p": LiveEventEncodingTypePremiumOneZeroEightZerop, - "standard": LiveEventEncodingTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LiveEventEncodingType(input) - return &out, nil -} - -type LiveEventInputProtocol string - -const ( - LiveEventInputProtocolFragmentedMPFour LiveEventInputProtocol = "FragmentedMP4" - LiveEventInputProtocolRTMP LiveEventInputProtocol = "RTMP" -) - -func PossibleValuesForLiveEventInputProtocol() []string { - return []string{ - string(LiveEventInputProtocolFragmentedMPFour), - string(LiveEventInputProtocolRTMP), - } -} - -func (s *LiveEventInputProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLiveEventInputProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLiveEventInputProtocol(input string) (*LiveEventInputProtocol, error) { - vals := map[string]LiveEventInputProtocol{ - "fragmentedmp4": LiveEventInputProtocolFragmentedMPFour, - "rtmp": LiveEventInputProtocolRTMP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LiveEventInputProtocol(input) - return &out, nil -} - -type LiveEventResourceState string - -const ( - LiveEventResourceStateAllocating LiveEventResourceState = "Allocating" - LiveEventResourceStateDeleting LiveEventResourceState = "Deleting" - LiveEventResourceStateRunning LiveEventResourceState = "Running" - LiveEventResourceStateStandBy LiveEventResourceState = "StandBy" - LiveEventResourceStateStarting LiveEventResourceState = "Starting" - LiveEventResourceStateStopped LiveEventResourceState = "Stopped" - LiveEventResourceStateStopping LiveEventResourceState = "Stopping" -) - -func PossibleValuesForLiveEventResourceState() []string { - return []string{ - string(LiveEventResourceStateAllocating), - string(LiveEventResourceStateDeleting), - string(LiveEventResourceStateRunning), - string(LiveEventResourceStateStandBy), - string(LiveEventResourceStateStarting), - string(LiveEventResourceStateStopped), - string(LiveEventResourceStateStopping), - } -} - -func (s *LiveEventResourceState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLiveEventResourceState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLiveEventResourceState(input string) (*LiveEventResourceState, error) { - vals := map[string]LiveEventResourceState{ - "allocating": LiveEventResourceStateAllocating, - "deleting": LiveEventResourceStateDeleting, - "running": LiveEventResourceStateRunning, - "standby": LiveEventResourceStateStandBy, - "starting": LiveEventResourceStateStarting, - "stopped": LiveEventResourceStateStopped, - "stopping": LiveEventResourceStateStopping, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LiveEventResourceState(input) - return &out, nil -} - -type StreamOptionsFlag string - -const ( - StreamOptionsFlagDefault StreamOptionsFlag = "Default" - StreamOptionsFlagLowLatency StreamOptionsFlag = "LowLatency" - StreamOptionsFlagLowLatencyVTwo StreamOptionsFlag = "LowLatencyV2" -) - -func PossibleValuesForStreamOptionsFlag() []string { - return []string{ - string(StreamOptionsFlagDefault), - string(StreamOptionsFlagLowLatency), - string(StreamOptionsFlagLowLatencyVTwo), - } -} - -func (s *StreamOptionsFlag) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseStreamOptionsFlag(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseStreamOptionsFlag(input string) (*StreamOptionsFlag, error) { - vals := map[string]StreamOptionsFlag{ - "default": StreamOptionsFlagDefault, - "lowlatency": StreamOptionsFlagLowLatency, - "lowlatencyv2": StreamOptionsFlagLowLatencyVTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StreamOptionsFlag(input) - return &out, nil -} - -type StretchMode string - -const ( - StretchModeAutoFit StretchMode = "AutoFit" - StretchModeAutoSize StretchMode = "AutoSize" - StretchModeNone StretchMode = "None" -) - -func PossibleValuesForStretchMode() []string { - return []string{ - string(StretchModeAutoFit), - string(StretchModeAutoSize), - string(StretchModeNone), - } -} - -func (s *StretchMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseStretchMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseStretchMode(input string) (*StretchMode, error) { - vals := map[string]StretchMode{ - "autofit": StretchModeAutoFit, - "autosize": StretchModeAutoSize, - "none": StretchModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StretchMode(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/id_liveevent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/id_liveevent.go deleted file mode 100644 index d642499f51ee0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/id_liveevent.go +++ /dev/null @@ -1,139 +0,0 @@ -package liveevents - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&LiveEventId{}) -} - -var _ resourceids.ResourceId = &LiveEventId{} - -// LiveEventId is a struct representing the Resource ID for a Live Event -type LiveEventId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - LiveEventName string -} - -// NewLiveEventID returns a new LiveEventId struct -func NewLiveEventID(subscriptionId string, resourceGroupName string, mediaServiceName string, liveEventName string) LiveEventId { - return LiveEventId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - LiveEventName: liveEventName, - } -} - -// ParseLiveEventID parses 'input' into a LiveEventId -func ParseLiveEventID(input string) (*LiveEventId, error) { - parser := resourceids.NewParserFromResourceIdType(&LiveEventId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LiveEventId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseLiveEventIDInsensitively parses 'input' case-insensitively into a LiveEventId -// note: this method should only be used for API response data and not user input -func ParseLiveEventIDInsensitively(input string) (*LiveEventId, error) { - parser := resourceids.NewParserFromResourceIdType(&LiveEventId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LiveEventId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *LiveEventId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.LiveEventName, ok = input.Parsed["liveEventName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "liveEventName", input) - } - - return nil -} - -// ValidateLiveEventID checks that 'input' can be parsed as a Live Event ID -func ValidateLiveEventID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLiveEventID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Live Event ID -func (id LiveEventId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/liveEvents/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.LiveEventName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Live Event ID -func (id LiveEventId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticLiveEvents", "liveEvents", "liveEvents"), - resourceids.UserSpecifiedSegment("liveEventName", "liveEventValue"), - } -} - -// String returns a human-readable description of this Live Event ID -func (id LiveEventId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Live Event Name: %q", id.LiveEventName), - } - return fmt.Sprintf("Live Event (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/id_mediaservice.go deleted file mode 100644 index a7d3fc2fea95d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/id_mediaservice.go +++ /dev/null @@ -1,130 +0,0 @@ -package liveevents - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&MediaServiceId{}) -} - -var _ resourceids.ResourceId = &MediaServiceId{} - -// MediaServiceId is a struct representing the Resource ID for a Media Service -type MediaServiceId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string -} - -// NewMediaServiceID returns a new MediaServiceId struct -func NewMediaServiceID(subscriptionId string, resourceGroupName string, mediaServiceName string) MediaServiceId { - return MediaServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - } -} - -// ParseMediaServiceID parses 'input' into a MediaServiceId -func ParseMediaServiceID(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseMediaServiceIDInsensitively parses 'input' case-insensitively into a MediaServiceId -// note: this method should only be used for API response data and not user input -func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *MediaServiceId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - return nil -} - -// ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID -func ValidateMediaServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMediaServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Media Service ID -func (id MediaServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Media Service ID -func (id MediaServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - } -} - -// String returns a human-readable description of this Media Service ID -func (id MediaServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - } - return fmt.Sprintf("Media Service (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_allocate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_allocate.go deleted file mode 100644 index cdb667417081b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_allocate.go +++ /dev/null @@ -1,70 +0,0 @@ -package liveevents - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AllocateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Allocate ... -func (c LiveEventsClient) Allocate(ctx context.Context, id LiveEventId) (result AllocateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/allocate", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// AllocateThenPoll performs Allocate then polls until it's completed -func (c LiveEventsClient) AllocateThenPoll(ctx context.Context, id LiveEventId) error { - result, err := c.Allocate(ctx, id) - if err != nil { - return fmt.Errorf("performing Allocate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Allocate: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_create.go deleted file mode 100644 index db743890d4a1d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_create.go +++ /dev/null @@ -1,103 +0,0 @@ -package liveevents - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *LiveEvent -} - -type CreateOperationOptions struct { - AutoStart *bool -} - -func DefaultCreateOperationOptions() CreateOperationOptions { - return CreateOperationOptions{} -} - -func (o CreateOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o CreateOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o CreateOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.AutoStart != nil { - out.Append("autoStart", fmt.Sprintf("%v", *o.AutoStart)) - } - return &out -} - -// Create ... -func (c LiveEventsClient) Create(ctx context.Context, id LiveEventId, input LiveEvent, options CreateOperationOptions) (result CreateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - OptionsObject: options, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateThenPoll performs Create then polls until it's completed -func (c LiveEventsClient) CreateThenPoll(ctx context.Context, id LiveEventId, input LiveEvent, options CreateOperationOptions) error { - result, err := c.Create(ctx, id, input, options) - if err != nil { - return fmt.Errorf("performing Create: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Create: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_delete.go deleted file mode 100644 index 46caecc7b5717..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package liveevents - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c LiveEventsClient) Delete(ctx context.Context, id LiveEventId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c LiveEventsClient) DeleteThenPoll(ctx context.Context, id LiveEventId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_get.go deleted file mode 100644 index cdefc7b3a39de..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_get.go +++ /dev/null @@ -1,54 +0,0 @@ -package liveevents - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *LiveEvent -} - -// Get ... -func (c LiveEventsClient) Get(ctx context.Context, id LiveEventId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model LiveEvent - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_list.go deleted file mode 100644 index dc02c0b2241a6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_list.go +++ /dev/null @@ -1,105 +0,0 @@ -package liveevents - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]LiveEvent -} - -type ListCompleteResult struct { - LatestHttpResponse *http.Response - Items []LiveEvent -} - -type ListCustomPager struct { - NextLink *odata.Link `json:"@odata.nextLink"` -} - -func (p *ListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// List ... -func (c LiveEventsClient) List(ctx context.Context, id MediaServiceId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListCustomPager{}, - Path: fmt.Sprintf("%s/liveEvents", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]LiveEvent `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c LiveEventsClient) ListComplete(ctx context.Context, id MediaServiceId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, LiveEventOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LiveEventsClient) ListCompleteMatchingPredicate(ctx context.Context, id MediaServiceId, predicate LiveEventOperationPredicate) (result ListCompleteResult, err error) { - items := make([]LiveEvent, 0) - - resp, err := c.List(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_reset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_reset.go deleted file mode 100644 index cb82ff062a028..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_reset.go +++ /dev/null @@ -1,70 +0,0 @@ -package liveevents - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResetOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Reset ... -func (c LiveEventsClient) Reset(ctx context.Context, id LiveEventId) (result ResetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/reset", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ResetThenPoll performs Reset then polls until it's completed -func (c LiveEventsClient) ResetThenPoll(ctx context.Context, id LiveEventId) error { - result, err := c.Reset(ctx, id) - if err != nil { - return fmt.Errorf("performing Reset: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Reset: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_start.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_start.go deleted file mode 100644 index 157c96d2b02f1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_start.go +++ /dev/null @@ -1,70 +0,0 @@ -package liveevents - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StartOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Start ... -func (c LiveEventsClient) Start(ctx context.Context, id LiveEventId) (result StartOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/start", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StartThenPoll performs Start then polls until it's completed -func (c LiveEventsClient) StartThenPoll(ctx context.Context, id LiveEventId) error { - result, err := c.Start(ctx, id) - if err != nil { - return fmt.Errorf("performing Start: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Start: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_stop.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_stop.go deleted file mode 100644 index b16b469682972..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_stop.go +++ /dev/null @@ -1,74 +0,0 @@ -package liveevents - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StopOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Stop ... -func (c LiveEventsClient) Stop(ctx context.Context, id LiveEventId, input LiveEventActionInput) (result StopOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/stop", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StopThenPoll performs Stop then polls until it's completed -func (c LiveEventsClient) StopThenPoll(ctx context.Context, id LiveEventId, input LiveEventActionInput) error { - result, err := c.Stop(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Stop: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Stop: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_update.go deleted file mode 100644 index f5563ab6e7b41..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/method_update.go +++ /dev/null @@ -1,75 +0,0 @@ -package liveevents - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *LiveEvent -} - -// Update ... -func (c LiveEventsClient) Update(ctx context.Context, id LiveEventId, input LiveEvent) (result UpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpdateThenPoll performs Update then polls until it's completed -func (c LiveEventsClient) UpdateThenPoll(ctx context.Context, id LiveEventId, input LiveEvent) error { - result, err := c.Update(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Update: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Update: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_crosssiteaccesspolicies.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_crosssiteaccesspolicies.go deleted file mode 100644 index 48fe3ea2391bb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_crosssiteaccesspolicies.go +++ /dev/null @@ -1,9 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CrossSiteAccessPolicies struct { - ClientAccessPolicy *string `json:"clientAccessPolicy,omitempty"` - CrossDomainPolicy *string `json:"crossDomainPolicy,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_ipaccesscontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_ipaccesscontrol.go deleted file mode 100644 index ebabbd6e23e53..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_ipaccesscontrol.go +++ /dev/null @@ -1,8 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPAccessControl struct { - Allow *[]IPRange `json:"allow,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_iprange.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_iprange.go deleted file mode 100644 index f3baaf0ab14f3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_iprange.go +++ /dev/null @@ -1,10 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPRange struct { - Address *string `json:"address,omitempty"` - Name *string `json:"name,omitempty"` - SubnetPrefixLength *int64 `json:"subnetPrefixLength,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveevent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveevent.go deleted file mode 100644 index 4ce8a6c2cf8b1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveevent.go +++ /dev/null @@ -1,18 +0,0 @@ -package liveevents - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEvent struct { - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *LiveEventProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventactioninput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventactioninput.go deleted file mode 100644 index 9cefd375f15dd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventactioninput.go +++ /dev/null @@ -1,8 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventActionInput struct { - RemoveOutputsOnStop *bool `json:"removeOutputsOnStop,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventencoding.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventencoding.go deleted file mode 100644 index 5b523350a398d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventencoding.go +++ /dev/null @@ -1,11 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventEncoding struct { - EncodingType *LiveEventEncodingType `json:"encodingType,omitempty"` - KeyFrameInterval *string `json:"keyFrameInterval,omitempty"` - PresetName *string `json:"presetName,omitempty"` - StretchMode *StretchMode `json:"stretchMode,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventendpoint.go deleted file mode 100644 index 58a27757939b6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventendpoint.go +++ /dev/null @@ -1,9 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventEndpoint struct { - Protocol *string `json:"protocol,omitempty"` - Url *string `json:"url,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventinput.go deleted file mode 100644 index 0eddc34140c3a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventinput.go +++ /dev/null @@ -1,12 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventInput struct { - AccessControl *LiveEventInputAccessControl `json:"accessControl,omitempty"` - AccessToken *string `json:"accessToken,omitempty"` - Endpoints *[]LiveEventEndpoint `json:"endpoints,omitempty"` - KeyFrameIntervalDuration *string `json:"keyFrameIntervalDuration,omitempty"` - StreamingProtocol LiveEventInputProtocol `json:"streamingProtocol"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventinputaccesscontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventinputaccesscontrol.go deleted file mode 100644 index 097779e37a37c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventinputaccesscontrol.go +++ /dev/null @@ -1,8 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventInputAccessControl struct { - IP *IPAccessControl `json:"ip,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventinputtrackselection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventinputtrackselection.go deleted file mode 100644 index a5d8017c5b9e6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventinputtrackselection.go +++ /dev/null @@ -1,10 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventInputTrackSelection struct { - Operation *string `json:"operation,omitempty"` - Property *string `json:"property,omitempty"` - Value *string `json:"value,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventoutputtranscriptiontrack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventoutputtranscriptiontrack.go deleted file mode 100644 index 76d4346a238c3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventoutputtranscriptiontrack.go +++ /dev/null @@ -1,8 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventOutputTranscriptionTrack struct { - TrackName string `json:"trackName"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventpreview.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventpreview.go deleted file mode 100644 index 29f8d0caefa8b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventpreview.go +++ /dev/null @@ -1,12 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventPreview struct { - AccessControl *LiveEventPreviewAccessControl `json:"accessControl,omitempty"` - AlternativeMediaId *string `json:"alternativeMediaId,omitempty"` - Endpoints *[]LiveEventEndpoint `json:"endpoints,omitempty"` - PreviewLocator *string `json:"previewLocator,omitempty"` - StreamingPolicyName *string `json:"streamingPolicyName,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventpreviewaccesscontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventpreviewaccesscontrol.go deleted file mode 100644 index 2826ebcd73913..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventpreviewaccesscontrol.go +++ /dev/null @@ -1,8 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventPreviewAccessControl struct { - IP *IPAccessControl `json:"ip,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventproperties.go deleted file mode 100644 index c04b10ab7a4a1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventproperties.go +++ /dev/null @@ -1,50 +0,0 @@ -package liveevents - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventProperties struct { - Created *string `json:"created,omitempty"` - CrossSiteAccessPolicies *CrossSiteAccessPolicies `json:"crossSiteAccessPolicies,omitempty"` - Description *string `json:"description,omitempty"` - Encoding *LiveEventEncoding `json:"encoding,omitempty"` - HostnamePrefix *string `json:"hostnamePrefix,omitempty"` - Input LiveEventInput `json:"input"` - LastModified *string `json:"lastModified,omitempty"` - Preview *LiveEventPreview `json:"preview,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` - ResourceState *LiveEventResourceState `json:"resourceState,omitempty"` - StreamOptions *[]StreamOptionsFlag `json:"streamOptions,omitempty"` - Transcriptions *[]LiveEventTranscription `json:"transcriptions,omitempty"` - UseStaticHostname *bool `json:"useStaticHostname,omitempty"` -} - -func (o *LiveEventProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *LiveEventProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *LiveEventProperties) GetLastModifiedAsTime() (*time.Time, error) { - if o.LastModified == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModified, "2006-01-02T15:04:05Z07:00") -} - -func (o *LiveEventProperties) SetLastModifiedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModified = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventtranscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventtranscription.go deleted file mode 100644 index 0ec81c1e59c84..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/model_liveeventtranscription.go +++ /dev/null @@ -1,10 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventTranscription struct { - InputTrackSelection *[]LiveEventInputTrackSelection `json:"inputTrackSelection,omitempty"` - Language *string `json:"language,omitempty"` - OutputTranscriptionTrack *LiveEventOutputTranscriptionTrack `json:"outputTranscriptionTrack,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/predicates.go deleted file mode 100644 index 6b80594f77ef2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p LiveEventOperationPredicate) Matches(input LiveEvent) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/version.go deleted file mode 100644 index 98efdf9294afa..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package liveevents - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/liveevents/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/README.md deleted file mode 100644 index 0e5f61749cc11..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs` Documentation - -The `liveoutputs` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2021-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs" -``` - - -### Client Initialization - -```go -client := liveoutputs.NewLiveOutputsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `LiveOutputsClient.Create` - -```go -ctx := context.TODO() -id := liveoutputs.NewLiveOutputID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue", "liveOutputValue") - -payload := liveoutputs.LiveOutput{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `LiveOutputsClient.Delete` - -```go -ctx := context.TODO() -id := liveoutputs.NewLiveOutputID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue", "liveOutputValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LiveOutputsClient.Get` - -```go -ctx := context.TODO() -id := liveoutputs.NewLiveOutputID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue", "liveOutputValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LiveOutputsClient.List` - -```go -ctx := context.TODO() -id := liveoutputs.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/client.go deleted file mode 100644 index 49007d18eb8b8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package liveoutputs - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveOutputsClient struct { - Client *resourcemanager.Client -} - -func NewLiveOutputsClientWithBaseURI(sdkApi sdkEnv.Api) (*LiveOutputsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "liveoutputs", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating LiveOutputsClient: %+v", err) - } - - return &LiveOutputsClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/constants.go deleted file mode 100644 index c30a959f7b626..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/constants.go +++ /dev/null @@ -1,54 +0,0 @@ -package liveoutputs - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveOutputResourceState string - -const ( - LiveOutputResourceStateCreating LiveOutputResourceState = "Creating" - LiveOutputResourceStateDeleting LiveOutputResourceState = "Deleting" - LiveOutputResourceStateRunning LiveOutputResourceState = "Running" -) - -func PossibleValuesForLiveOutputResourceState() []string { - return []string{ - string(LiveOutputResourceStateCreating), - string(LiveOutputResourceStateDeleting), - string(LiveOutputResourceStateRunning), - } -} - -func (s *LiveOutputResourceState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLiveOutputResourceState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLiveOutputResourceState(input string) (*LiveOutputResourceState, error) { - vals := map[string]LiveOutputResourceState{ - "creating": LiveOutputResourceStateCreating, - "deleting": LiveOutputResourceStateDeleting, - "running": LiveOutputResourceStateRunning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LiveOutputResourceState(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/id_liveevent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/id_liveevent.go deleted file mode 100644 index 5b10f380efbd9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/id_liveevent.go +++ /dev/null @@ -1,139 +0,0 @@ -package liveoutputs - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&LiveEventId{}) -} - -var _ resourceids.ResourceId = &LiveEventId{} - -// LiveEventId is a struct representing the Resource ID for a Live Event -type LiveEventId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - LiveEventName string -} - -// NewLiveEventID returns a new LiveEventId struct -func NewLiveEventID(subscriptionId string, resourceGroupName string, mediaServiceName string, liveEventName string) LiveEventId { - return LiveEventId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - LiveEventName: liveEventName, - } -} - -// ParseLiveEventID parses 'input' into a LiveEventId -func ParseLiveEventID(input string) (*LiveEventId, error) { - parser := resourceids.NewParserFromResourceIdType(&LiveEventId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LiveEventId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseLiveEventIDInsensitively parses 'input' case-insensitively into a LiveEventId -// note: this method should only be used for API response data and not user input -func ParseLiveEventIDInsensitively(input string) (*LiveEventId, error) { - parser := resourceids.NewParserFromResourceIdType(&LiveEventId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LiveEventId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *LiveEventId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.LiveEventName, ok = input.Parsed["liveEventName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "liveEventName", input) - } - - return nil -} - -// ValidateLiveEventID checks that 'input' can be parsed as a Live Event ID -func ValidateLiveEventID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLiveEventID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Live Event ID -func (id LiveEventId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/liveEvents/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.LiveEventName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Live Event ID -func (id LiveEventId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticLiveEvents", "liveEvents", "liveEvents"), - resourceids.UserSpecifiedSegment("liveEventName", "liveEventValue"), - } -} - -// String returns a human-readable description of this Live Event ID -func (id LiveEventId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Live Event Name: %q", id.LiveEventName), - } - return fmt.Sprintf("Live Event (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/id_liveoutput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/id_liveoutput.go deleted file mode 100644 index 5bbae170c89a1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/id_liveoutput.go +++ /dev/null @@ -1,148 +0,0 @@ -package liveoutputs - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&LiveOutputId{}) -} - -var _ resourceids.ResourceId = &LiveOutputId{} - -// LiveOutputId is a struct representing the Resource ID for a Live Output -type LiveOutputId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - LiveEventName string - LiveOutputName string -} - -// NewLiveOutputID returns a new LiveOutputId struct -func NewLiveOutputID(subscriptionId string, resourceGroupName string, mediaServiceName string, liveEventName string, liveOutputName string) LiveOutputId { - return LiveOutputId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - LiveEventName: liveEventName, - LiveOutputName: liveOutputName, - } -} - -// ParseLiveOutputID parses 'input' into a LiveOutputId -func ParseLiveOutputID(input string) (*LiveOutputId, error) { - parser := resourceids.NewParserFromResourceIdType(&LiveOutputId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LiveOutputId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseLiveOutputIDInsensitively parses 'input' case-insensitively into a LiveOutputId -// note: this method should only be used for API response data and not user input -func ParseLiveOutputIDInsensitively(input string) (*LiveOutputId, error) { - parser := resourceids.NewParserFromResourceIdType(&LiveOutputId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LiveOutputId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *LiveOutputId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.LiveEventName, ok = input.Parsed["liveEventName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "liveEventName", input) - } - - if id.LiveOutputName, ok = input.Parsed["liveOutputName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "liveOutputName", input) - } - - return nil -} - -// ValidateLiveOutputID checks that 'input' can be parsed as a Live Output ID -func ValidateLiveOutputID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLiveOutputID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Live Output ID -func (id LiveOutputId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/liveEvents/%s/liveOutputs/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.LiveEventName, id.LiveOutputName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Live Output ID -func (id LiveOutputId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticLiveEvents", "liveEvents", "liveEvents"), - resourceids.UserSpecifiedSegment("liveEventName", "liveEventValue"), - resourceids.StaticSegment("staticLiveOutputs", "liveOutputs", "liveOutputs"), - resourceids.UserSpecifiedSegment("liveOutputName", "liveOutputValue"), - } -} - -// String returns a human-readable description of this Live Output ID -func (id LiveOutputId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Live Event Name: %q", id.LiveEventName), - fmt.Sprintf("Live Output Name: %q", id.LiveOutputName), - } - return fmt.Sprintf("Live Output (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/method_create.go deleted file mode 100644 index 396a45d9a0399..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/method_create.go +++ /dev/null @@ -1,75 +0,0 @@ -package liveoutputs - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *LiveOutput -} - -// Create ... -func (c LiveOutputsClient) Create(ctx context.Context, id LiveOutputId, input LiveOutput) (result CreateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateThenPoll performs Create then polls until it's completed -func (c LiveOutputsClient) CreateThenPoll(ctx context.Context, id LiveOutputId, input LiveOutput) error { - result, err := c.Create(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Create: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Create: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/method_delete.go deleted file mode 100644 index b2bb9febceeb9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package liveoutputs - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c LiveOutputsClient) Delete(ctx context.Context, id LiveOutputId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c LiveOutputsClient) DeleteThenPoll(ctx context.Context, id LiveOutputId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/method_get.go deleted file mode 100644 index 9502e806865b4..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/method_get.go +++ /dev/null @@ -1,54 +0,0 @@ -package liveoutputs - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *LiveOutput -} - -// Get ... -func (c LiveOutputsClient) Get(ctx context.Context, id LiveOutputId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model LiveOutput - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/method_list.go deleted file mode 100644 index 3351078747aeb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/method_list.go +++ /dev/null @@ -1,105 +0,0 @@ -package liveoutputs - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]LiveOutput -} - -type ListCompleteResult struct { - LatestHttpResponse *http.Response - Items []LiveOutput -} - -type ListCustomPager struct { - NextLink *odata.Link `json:"@odata.nextLink"` -} - -func (p *ListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// List ... -func (c LiveOutputsClient) List(ctx context.Context, id LiveEventId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListCustomPager{}, - Path: fmt.Sprintf("%s/liveOutputs", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]LiveOutput `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c LiveOutputsClient) ListComplete(ctx context.Context, id LiveEventId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, LiveOutputOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LiveOutputsClient) ListCompleteMatchingPredicate(ctx context.Context, id LiveEventId, predicate LiveOutputOperationPredicate) (result ListCompleteResult, err error) { - items := make([]LiveOutput, 0) - - resp, err := c.List(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/model_hls.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/model_hls.go deleted file mode 100644 index 8eabe19591668..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/model_hls.go +++ /dev/null @@ -1,8 +0,0 @@ -package liveoutputs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Hls struct { - FragmentsPerTsSegment *int64 `json:"fragmentsPerTsSegment,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/model_liveoutput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/model_liveoutput.go deleted file mode 100644 index 23697703092e9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/model_liveoutput.go +++ /dev/null @@ -1,16 +0,0 @@ -package liveoutputs - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveOutput struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *LiveOutputProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/model_liveoutputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/model_liveoutputproperties.go deleted file mode 100644 index b48c674681a61..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/model_liveoutputproperties.go +++ /dev/null @@ -1,47 +0,0 @@ -package liveoutputs - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveOutputProperties struct { - ArchiveWindowLength string `json:"archiveWindowLength"` - AssetName string `json:"assetName"` - Created *string `json:"created,omitempty"` - Description *string `json:"description,omitempty"` - Hls *Hls `json:"hls,omitempty"` - LastModified *string `json:"lastModified,omitempty"` - ManifestName *string `json:"manifestName,omitempty"` - OutputSnapTime *int64 `json:"outputSnapTime,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` - ResourceState *LiveOutputResourceState `json:"resourceState,omitempty"` -} - -func (o *LiveOutputProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *LiveOutputProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *LiveOutputProperties) GetLastModifiedAsTime() (*time.Time, error) { - if o.LastModified == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModified, "2006-01-02T15:04:05Z07:00") -} - -func (o *LiveOutputProperties) SetLastModifiedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModified = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/predicates.go deleted file mode 100644 index 1d83a4de68872..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package liveoutputs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveOutputOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p LiveOutputOperationPredicate) Matches(input LiveOutput) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/version.go deleted file mode 100644 index b230dc104df54..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package liveoutputs - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/liveoutputs/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/README.md deleted file mode 100644 index 1bd0157b7c318..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/README.md +++ /dev/null @@ -1,156 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints` Documentation - -The `streamingendpoints` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2021-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints" -``` - - -### Client Initialization - -```go -client := streamingendpoints.NewStreamingEndpointsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `StreamingEndpointsClient.Create` - -```go -ctx := context.TODO() -id := streamingendpoints.NewStreamingEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingEndpointValue") - -payload := streamingendpoints.StreamingEndpoint{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload, streamingendpoints.DefaultCreateOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `StreamingEndpointsClient.Delete` - -```go -ctx := context.TODO() -id := streamingendpoints.NewStreamingEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingEndpointValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `StreamingEndpointsClient.Get` - -```go -ctx := context.TODO() -id := streamingendpoints.NewStreamingEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingEndpointValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingEndpointsClient.List` - -```go -ctx := context.TODO() -id := streamingendpoints.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `StreamingEndpointsClient.Scale` - -```go -ctx := context.TODO() -id := streamingendpoints.NewStreamingEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingEndpointValue") - -payload := streamingendpoints.StreamingEntityScaleUnit{ - // ... -} - - -if err := client.ScaleThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `StreamingEndpointsClient.Skus` - -```go -ctx := context.TODO() -id := streamingendpoints.NewStreamingEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingEndpointValue") - -read, err := client.Skus(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingEndpointsClient.Start` - -```go -ctx := context.TODO() -id := streamingendpoints.NewStreamingEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingEndpointValue") - -if err := client.StartThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `StreamingEndpointsClient.Stop` - -```go -ctx := context.TODO() -id := streamingendpoints.NewStreamingEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingEndpointValue") - -if err := client.StopThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `StreamingEndpointsClient.Update` - -```go -ctx := context.TODO() -id := streamingendpoints.NewStreamingEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingEndpointValue") - -payload := streamingendpoints.StreamingEndpoint{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/client.go deleted file mode 100644 index a66794d6ca66e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package streamingendpoints - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingEndpointsClient struct { - Client *resourcemanager.Client -} - -func NewStreamingEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*StreamingEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "streamingendpoints", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating StreamingEndpointsClient: %+v", err) - } - - return &StreamingEndpointsClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/constants.go deleted file mode 100644 index 35929de3a54c1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/constants.go +++ /dev/null @@ -1,63 +0,0 @@ -package streamingendpoints - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingEndpointResourceState string - -const ( - StreamingEndpointResourceStateDeleting StreamingEndpointResourceState = "Deleting" - StreamingEndpointResourceStateRunning StreamingEndpointResourceState = "Running" - StreamingEndpointResourceStateScaling StreamingEndpointResourceState = "Scaling" - StreamingEndpointResourceStateStarting StreamingEndpointResourceState = "Starting" - StreamingEndpointResourceStateStopped StreamingEndpointResourceState = "Stopped" - StreamingEndpointResourceStateStopping StreamingEndpointResourceState = "Stopping" -) - -func PossibleValuesForStreamingEndpointResourceState() []string { - return []string{ - string(StreamingEndpointResourceStateDeleting), - string(StreamingEndpointResourceStateRunning), - string(StreamingEndpointResourceStateScaling), - string(StreamingEndpointResourceStateStarting), - string(StreamingEndpointResourceStateStopped), - string(StreamingEndpointResourceStateStopping), - } -} - -func (s *StreamingEndpointResourceState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseStreamingEndpointResourceState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseStreamingEndpointResourceState(input string) (*StreamingEndpointResourceState, error) { - vals := map[string]StreamingEndpointResourceState{ - "deleting": StreamingEndpointResourceStateDeleting, - "running": StreamingEndpointResourceStateRunning, - "scaling": StreamingEndpointResourceStateScaling, - "starting": StreamingEndpointResourceStateStarting, - "stopped": StreamingEndpointResourceStateStopped, - "stopping": StreamingEndpointResourceStateStopping, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StreamingEndpointResourceState(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/id_mediaservice.go deleted file mode 100644 index 243cdf6d8cf21..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/id_mediaservice.go +++ /dev/null @@ -1,130 +0,0 @@ -package streamingendpoints - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&MediaServiceId{}) -} - -var _ resourceids.ResourceId = &MediaServiceId{} - -// MediaServiceId is a struct representing the Resource ID for a Media Service -type MediaServiceId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string -} - -// NewMediaServiceID returns a new MediaServiceId struct -func NewMediaServiceID(subscriptionId string, resourceGroupName string, mediaServiceName string) MediaServiceId { - return MediaServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - } -} - -// ParseMediaServiceID parses 'input' into a MediaServiceId -func ParseMediaServiceID(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseMediaServiceIDInsensitively parses 'input' case-insensitively into a MediaServiceId -// note: this method should only be used for API response data and not user input -func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *MediaServiceId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - return nil -} - -// ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID -func ValidateMediaServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMediaServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Media Service ID -func (id MediaServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Media Service ID -func (id MediaServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - } -} - -// String returns a human-readable description of this Media Service ID -func (id MediaServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - } - return fmt.Sprintf("Media Service (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/id_streamingendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/id_streamingendpoint.go deleted file mode 100644 index 4d634f2efe1c3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/id_streamingendpoint.go +++ /dev/null @@ -1,139 +0,0 @@ -package streamingendpoints - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&StreamingEndpointId{}) -} - -var _ resourceids.ResourceId = &StreamingEndpointId{} - -// StreamingEndpointId is a struct representing the Resource ID for a Streaming Endpoint -type StreamingEndpointId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - StreamingEndpointName string -} - -// NewStreamingEndpointID returns a new StreamingEndpointId struct -func NewStreamingEndpointID(subscriptionId string, resourceGroupName string, mediaServiceName string, streamingEndpointName string) StreamingEndpointId { - return StreamingEndpointId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - StreamingEndpointName: streamingEndpointName, - } -} - -// ParseStreamingEndpointID parses 'input' into a StreamingEndpointId -func ParseStreamingEndpointID(input string) (*StreamingEndpointId, error) { - parser := resourceids.NewParserFromResourceIdType(&StreamingEndpointId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := StreamingEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseStreamingEndpointIDInsensitively parses 'input' case-insensitively into a StreamingEndpointId -// note: this method should only be used for API response data and not user input -func ParseStreamingEndpointIDInsensitively(input string) (*StreamingEndpointId, error) { - parser := resourceids.NewParserFromResourceIdType(&StreamingEndpointId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := StreamingEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *StreamingEndpointId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.StreamingEndpointName, ok = input.Parsed["streamingEndpointName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "streamingEndpointName", input) - } - - return nil -} - -// ValidateStreamingEndpointID checks that 'input' can be parsed as a Streaming Endpoint ID -func ValidateStreamingEndpointID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseStreamingEndpointID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Streaming Endpoint ID -func (id StreamingEndpointId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/streamingEndpoints/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.StreamingEndpointName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Streaming Endpoint ID -func (id StreamingEndpointId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticStreamingEndpoints", "streamingEndpoints", "streamingEndpoints"), - resourceids.UserSpecifiedSegment("streamingEndpointName", "streamingEndpointValue"), - } -} - -// String returns a human-readable description of this Streaming Endpoint ID -func (id StreamingEndpointId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Streaming Endpoint Name: %q", id.StreamingEndpointName), - } - return fmt.Sprintf("Streaming Endpoint (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_create.go deleted file mode 100644 index 7b9e76bac77ee..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_create.go +++ /dev/null @@ -1,103 +0,0 @@ -package streamingendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *StreamingEndpoint -} - -type CreateOperationOptions struct { - AutoStart *bool -} - -func DefaultCreateOperationOptions() CreateOperationOptions { - return CreateOperationOptions{} -} - -func (o CreateOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o CreateOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o CreateOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.AutoStart != nil { - out.Append("autoStart", fmt.Sprintf("%v", *o.AutoStart)) - } - return &out -} - -// Create ... -func (c StreamingEndpointsClient) Create(ctx context.Context, id StreamingEndpointId, input StreamingEndpoint, options CreateOperationOptions) (result CreateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - OptionsObject: options, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateThenPoll performs Create then polls until it's completed -func (c StreamingEndpointsClient) CreateThenPoll(ctx context.Context, id StreamingEndpointId, input StreamingEndpoint, options CreateOperationOptions) error { - result, err := c.Create(ctx, id, input, options) - if err != nil { - return fmt.Errorf("performing Create: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Create: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_delete.go deleted file mode 100644 index aa2cad45dd7b4..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package streamingendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c StreamingEndpointsClient) Delete(ctx context.Context, id StreamingEndpointId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c StreamingEndpointsClient) DeleteThenPoll(ctx context.Context, id StreamingEndpointId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_get.go deleted file mode 100644 index 8db082ce324ad..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_get.go +++ /dev/null @@ -1,54 +0,0 @@ -package streamingendpoints - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *StreamingEndpoint -} - -// Get ... -func (c StreamingEndpointsClient) Get(ctx context.Context, id StreamingEndpointId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model StreamingEndpoint - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_list.go deleted file mode 100644 index 322e2b6956827..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_list.go +++ /dev/null @@ -1,105 +0,0 @@ -package streamingendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]StreamingEndpoint -} - -type ListCompleteResult struct { - LatestHttpResponse *http.Response - Items []StreamingEndpoint -} - -type ListCustomPager struct { - NextLink *odata.Link `json:"@odata.nextLink"` -} - -func (p *ListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// List ... -func (c StreamingEndpointsClient) List(ctx context.Context, id MediaServiceId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListCustomPager{}, - Path: fmt.Sprintf("%s/streamingEndpoints", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]StreamingEndpoint `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c StreamingEndpointsClient) ListComplete(ctx context.Context, id MediaServiceId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, StreamingEndpointOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c StreamingEndpointsClient) ListCompleteMatchingPredicate(ctx context.Context, id MediaServiceId, predicate StreamingEndpointOperationPredicate) (result ListCompleteResult, err error) { - items := make([]StreamingEndpoint, 0) - - resp, err := c.List(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_scale.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_scale.go deleted file mode 100644 index c3f9526c5584d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_scale.go +++ /dev/null @@ -1,74 +0,0 @@ -package streamingendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ScaleOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Scale ... -func (c StreamingEndpointsClient) Scale(ctx context.Context, id StreamingEndpointId, input StreamingEntityScaleUnit) (result ScaleOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/scale", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ScaleThenPoll performs Scale then polls until it's completed -func (c StreamingEndpointsClient) ScaleThenPoll(ctx context.Context, id StreamingEndpointId, input StreamingEntityScaleUnit) error { - result, err := c.Scale(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Scale: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Scale: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_skus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_skus.go deleted file mode 100644 index 419e72eb2fa26..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_skus.go +++ /dev/null @@ -1,55 +0,0 @@ -package streamingendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SkusOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *StreamingEndpointSkuInfoListResult -} - -// Skus ... -func (c StreamingEndpointsClient) Skus(ctx context.Context, id StreamingEndpointId) (result SkusOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/skus", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model StreamingEndpointSkuInfoListResult - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_start.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_start.go deleted file mode 100644 index 01239b39b77eb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_start.go +++ /dev/null @@ -1,70 +0,0 @@ -package streamingendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StartOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Start ... -func (c StreamingEndpointsClient) Start(ctx context.Context, id StreamingEndpointId) (result StartOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/start", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StartThenPoll performs Start then polls until it's completed -func (c StreamingEndpointsClient) StartThenPoll(ctx context.Context, id StreamingEndpointId) error { - result, err := c.Start(ctx, id) - if err != nil { - return fmt.Errorf("performing Start: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Start: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_stop.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_stop.go deleted file mode 100644 index b39f1d63c37d1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_stop.go +++ /dev/null @@ -1,70 +0,0 @@ -package streamingendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StopOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Stop ... -func (c StreamingEndpointsClient) Stop(ctx context.Context, id StreamingEndpointId) (result StopOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/stop", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StopThenPoll performs Stop then polls until it's completed -func (c StreamingEndpointsClient) StopThenPoll(ctx context.Context, id StreamingEndpointId) error { - result, err := c.Stop(ctx, id) - if err != nil { - return fmt.Errorf("performing Stop: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Stop: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_update.go deleted file mode 100644 index 78be07c101afd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/method_update.go +++ /dev/null @@ -1,75 +0,0 @@ -package streamingendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *StreamingEndpoint -} - -// Update ... -func (c StreamingEndpointsClient) Update(ctx context.Context, id StreamingEndpointId, input StreamingEndpoint) (result UpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpdateThenPoll performs Update then polls until it's completed -func (c StreamingEndpointsClient) UpdateThenPoll(ctx context.Context, id StreamingEndpointId, input StreamingEndpoint) error { - result, err := c.Update(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Update: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Update: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_akamaiaccesscontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_akamaiaccesscontrol.go deleted file mode 100644 index 54db60a01f0a5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_akamaiaccesscontrol.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AkamaiAccessControl struct { - AkamaiSignatureHeaderAuthenticationKeyList *[]AkamaiSignatureHeaderAuthenticationKey `json:"akamaiSignatureHeaderAuthenticationKeyList,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_akamaisignatureheaderauthenticationkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_akamaisignatureheaderauthenticationkey.go deleted file mode 100644 index 32037bfa525e2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_akamaisignatureheaderauthenticationkey.go +++ /dev/null @@ -1,28 +0,0 @@ -package streamingendpoints - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AkamaiSignatureHeaderAuthenticationKey struct { - Base64Key *string `json:"base64Key,omitempty"` - Expiration *string `json:"expiration,omitempty"` - Identifier *string `json:"identifier,omitempty"` -} - -func (o *AkamaiSignatureHeaderAuthenticationKey) GetExpirationAsTime() (*time.Time, error) { - if o.Expiration == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Expiration, "2006-01-02T15:04:05Z07:00") -} - -func (o *AkamaiSignatureHeaderAuthenticationKey) SetExpirationAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Expiration = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_armstreamingendpointcapacity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_armstreamingendpointcapacity.go deleted file mode 100644 index 3851abde4cbbe..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_armstreamingendpointcapacity.go +++ /dev/null @@ -1,11 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ArmStreamingEndpointCapacity struct { - Default *int64 `json:"default,omitempty"` - Maximum *int64 `json:"maximum,omitempty"` - Minimum *int64 `json:"minimum,omitempty"` - ScaleType *string `json:"scaleType,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_armstreamingendpointcurrentsku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_armstreamingendpointcurrentsku.go deleted file mode 100644 index 0e0caff947bf6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_armstreamingendpointcurrentsku.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ArmStreamingEndpointCurrentSku struct { - Capacity *int64 `json:"capacity,omitempty"` - Name *string `json:"name,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_armstreamingendpointsku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_armstreamingendpointsku.go deleted file mode 100644 index ae2f8ac752bcf..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_armstreamingendpointsku.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ArmStreamingEndpointSku struct { - Name *string `json:"name,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_armstreamingendpointskuinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_armstreamingendpointskuinfo.go deleted file mode 100644 index da156a84cf016..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_armstreamingendpointskuinfo.go +++ /dev/null @@ -1,10 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ArmStreamingEndpointSkuInfo struct { - Capacity *ArmStreamingEndpointCapacity `json:"capacity,omitempty"` - ResourceType *string `json:"resourceType,omitempty"` - Sku *ArmStreamingEndpointSku `json:"sku,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_crosssiteaccesspolicies.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_crosssiteaccesspolicies.go deleted file mode 100644 index df58bc186f2cd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_crosssiteaccesspolicies.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CrossSiteAccessPolicies struct { - ClientAccessPolicy *string `json:"clientAccessPolicy,omitempty"` - CrossDomainPolicy *string `json:"crossDomainPolicy,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_ipaccesscontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_ipaccesscontrol.go deleted file mode 100644 index 68255bff449d5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_ipaccesscontrol.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPAccessControl struct { - Allow *[]IPRange `json:"allow,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_iprange.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_iprange.go deleted file mode 100644 index 07cfcae8c2bed..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_iprange.go +++ /dev/null @@ -1,10 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPRange struct { - Address *string `json:"address,omitempty"` - Name *string `json:"name,omitempty"` - SubnetPrefixLength *int64 `json:"subnetPrefixLength,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_streamingendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_streamingendpoint.go deleted file mode 100644 index 252d4fb93280b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_streamingendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package streamingendpoints - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingEndpoint struct { - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *StreamingEndpointProperties `json:"properties,omitempty"` - Sku *ArmStreamingEndpointCurrentSku `json:"sku,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_streamingendpointaccesscontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_streamingendpointaccesscontrol.go deleted file mode 100644 index 3620eaa8196bc..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_streamingendpointaccesscontrol.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingEndpointAccessControl struct { - Akamai *AkamaiAccessControl `json:"akamai,omitempty"` - IP *IPAccessControl `json:"ip,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_streamingendpointproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_streamingendpointproperties.go deleted file mode 100644 index 4431185990353..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_streamingendpointproperties.go +++ /dev/null @@ -1,65 +0,0 @@ -package streamingendpoints - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingEndpointProperties struct { - AccessControl *StreamingEndpointAccessControl `json:"accessControl,omitempty"` - AvailabilitySetName *string `json:"availabilitySetName,omitempty"` - CdnEnabled *bool `json:"cdnEnabled,omitempty"` - CdnProfile *string `json:"cdnProfile,omitempty"` - CdnProvider *string `json:"cdnProvider,omitempty"` - Created *string `json:"created,omitempty"` - CrossSiteAccessPolicies *CrossSiteAccessPolicies `json:"crossSiteAccessPolicies,omitempty"` - CustomHostNames *[]string `json:"customHostNames,omitempty"` - Description *string `json:"description,omitempty"` - FreeTrialEndTime *string `json:"freeTrialEndTime,omitempty"` - HostName *string `json:"hostName,omitempty"` - LastModified *string `json:"lastModified,omitempty"` - MaxCacheAge *int64 `json:"maxCacheAge,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` - ResourceState *StreamingEndpointResourceState `json:"resourceState,omitempty"` - ScaleUnits int64 `json:"scaleUnits"` -} - -func (o *StreamingEndpointProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *StreamingEndpointProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *StreamingEndpointProperties) GetFreeTrialEndTimeAsTime() (*time.Time, error) { - if o.FreeTrialEndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.FreeTrialEndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *StreamingEndpointProperties) SetFreeTrialEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.FreeTrialEndTime = &formatted -} - -func (o *StreamingEndpointProperties) GetLastModifiedAsTime() (*time.Time, error) { - if o.LastModified == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModified, "2006-01-02T15:04:05Z07:00") -} - -func (o *StreamingEndpointProperties) SetLastModifiedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModified = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_streamingendpointskuinfolistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_streamingendpointskuinfolistresult.go deleted file mode 100644 index d8a48852d28f0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_streamingendpointskuinfolistresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingEndpointSkuInfoListResult struct { - Value *[]ArmStreamingEndpointSkuInfo `json:"value,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_streamingentityscaleunit.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_streamingentityscaleunit.go deleted file mode 100644 index 9af1883b94334..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/model_streamingentityscaleunit.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingEntityScaleUnit struct { - ScaleUnit *int64 `json:"scaleUnit,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/predicates.go deleted file mode 100644 index 9f21dc14d9235..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingEndpointOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p StreamingEndpointOperationPredicate) Matches(input StreamingEndpoint) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/version.go deleted file mode 100644 index e80b097ef6078..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package streamingendpoints - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/streamingendpoints/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/README.md deleted file mode 100644 index 22c24938a03f6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/README.md +++ /dev/null @@ -1,192 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators` Documentation - -The `streamingpoliciesandstreaminglocators` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2021-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators" -``` - - -### Client Initialization - -```go -client := streamingpoliciesandstreaminglocators.NewStreamingPoliciesAndStreamingLocatorsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingLocatorsCreate` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewStreamingLocatorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingLocatorValue") - -payload := streamingpoliciesandstreaminglocators.StreamingLocator{ - // ... -} - - -read, err := client.StreamingLocatorsCreate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingLocatorsDelete` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewStreamingLocatorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingLocatorValue") - -read, err := client.StreamingLocatorsDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingLocatorsGet` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewStreamingLocatorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingLocatorValue") - -read, err := client.StreamingLocatorsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingLocatorsList` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -// alternatively `client.StreamingLocatorsList(ctx, id, streamingpoliciesandstreaminglocators.DefaultStreamingLocatorsListOperationOptions())` can be used to do batched pagination -items, err := client.StreamingLocatorsListComplete(ctx, id, streamingpoliciesandstreaminglocators.DefaultStreamingLocatorsListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingLocatorsListContentKeys` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewStreamingLocatorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingLocatorValue") - -read, err := client.StreamingLocatorsListContentKeys(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingLocatorsListPaths` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewStreamingLocatorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingLocatorValue") - -read, err := client.StreamingLocatorsListPaths(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingPoliciesCreate` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewStreamingPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingPolicyValue") - -payload := streamingpoliciesandstreaminglocators.StreamingPolicy{ - // ... -} - - -read, err := client.StreamingPoliciesCreate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingPoliciesDelete` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewStreamingPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingPolicyValue") - -read, err := client.StreamingPoliciesDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingPoliciesGet` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewStreamingPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingPolicyValue") - -read, err := client.StreamingPoliciesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingPoliciesList` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -// alternatively `client.StreamingPoliciesList(ctx, id, streamingpoliciesandstreaminglocators.DefaultStreamingPoliciesListOperationOptions())` can be used to do batched pagination -items, err := client.StreamingPoliciesListComplete(ctx, id, streamingpoliciesandstreaminglocators.DefaultStreamingPoliciesListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/client.go deleted file mode 100644 index ad459b8507fae..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPoliciesAndStreamingLocatorsClient struct { - Client *resourcemanager.Client -} - -func NewStreamingPoliciesAndStreamingLocatorsClientWithBaseURI(sdkApi sdkEnv.Api) (*StreamingPoliciesAndStreamingLocatorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "streamingpoliciesandstreaminglocators", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating StreamingPoliciesAndStreamingLocatorsClient: %+v", err) - } - - return &StreamingPoliciesAndStreamingLocatorsClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/constants.go deleted file mode 100644 index 3f552d6de9ea1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/constants.go +++ /dev/null @@ -1,230 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EncryptionScheme string - -const ( - EncryptionSchemeCommonEncryptionCbcs EncryptionScheme = "CommonEncryptionCbcs" - EncryptionSchemeCommonEncryptionCenc EncryptionScheme = "CommonEncryptionCenc" - EncryptionSchemeEnvelopeEncryption EncryptionScheme = "EnvelopeEncryption" - EncryptionSchemeNoEncryption EncryptionScheme = "NoEncryption" -) - -func PossibleValuesForEncryptionScheme() []string { - return []string{ - string(EncryptionSchemeCommonEncryptionCbcs), - string(EncryptionSchemeCommonEncryptionCenc), - string(EncryptionSchemeEnvelopeEncryption), - string(EncryptionSchemeNoEncryption), - } -} - -func (s *EncryptionScheme) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEncryptionScheme(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEncryptionScheme(input string) (*EncryptionScheme, error) { - vals := map[string]EncryptionScheme{ - "commonencryptioncbcs": EncryptionSchemeCommonEncryptionCbcs, - "commonencryptioncenc": EncryptionSchemeCommonEncryptionCenc, - "envelopeencryption": EncryptionSchemeEnvelopeEncryption, - "noencryption": EncryptionSchemeNoEncryption, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EncryptionScheme(input) - return &out, nil -} - -type StreamingLocatorContentKeyType string - -const ( - StreamingLocatorContentKeyTypeCommonEncryptionCbcs StreamingLocatorContentKeyType = "CommonEncryptionCbcs" - StreamingLocatorContentKeyTypeCommonEncryptionCenc StreamingLocatorContentKeyType = "CommonEncryptionCenc" - StreamingLocatorContentKeyTypeEnvelopeEncryption StreamingLocatorContentKeyType = "EnvelopeEncryption" -) - -func PossibleValuesForStreamingLocatorContentKeyType() []string { - return []string{ - string(StreamingLocatorContentKeyTypeCommonEncryptionCbcs), - string(StreamingLocatorContentKeyTypeCommonEncryptionCenc), - string(StreamingLocatorContentKeyTypeEnvelopeEncryption), - } -} - -func (s *StreamingLocatorContentKeyType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseStreamingLocatorContentKeyType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseStreamingLocatorContentKeyType(input string) (*StreamingLocatorContentKeyType, error) { - vals := map[string]StreamingLocatorContentKeyType{ - "commonencryptioncbcs": StreamingLocatorContentKeyTypeCommonEncryptionCbcs, - "commonencryptioncenc": StreamingLocatorContentKeyTypeCommonEncryptionCenc, - "envelopeencryption": StreamingLocatorContentKeyTypeEnvelopeEncryption, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StreamingLocatorContentKeyType(input) - return &out, nil -} - -type StreamingPolicyStreamingProtocol string - -const ( - StreamingPolicyStreamingProtocolDash StreamingPolicyStreamingProtocol = "Dash" - StreamingPolicyStreamingProtocolDownload StreamingPolicyStreamingProtocol = "Download" - StreamingPolicyStreamingProtocolHls StreamingPolicyStreamingProtocol = "Hls" - StreamingPolicyStreamingProtocolSmoothStreaming StreamingPolicyStreamingProtocol = "SmoothStreaming" -) - -func PossibleValuesForStreamingPolicyStreamingProtocol() []string { - return []string{ - string(StreamingPolicyStreamingProtocolDash), - string(StreamingPolicyStreamingProtocolDownload), - string(StreamingPolicyStreamingProtocolHls), - string(StreamingPolicyStreamingProtocolSmoothStreaming), - } -} - -func (s *StreamingPolicyStreamingProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseStreamingPolicyStreamingProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseStreamingPolicyStreamingProtocol(input string) (*StreamingPolicyStreamingProtocol, error) { - vals := map[string]StreamingPolicyStreamingProtocol{ - "dash": StreamingPolicyStreamingProtocolDash, - "download": StreamingPolicyStreamingProtocolDownload, - "hls": StreamingPolicyStreamingProtocolHls, - "smoothstreaming": StreamingPolicyStreamingProtocolSmoothStreaming, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StreamingPolicyStreamingProtocol(input) - return &out, nil -} - -type TrackPropertyCompareOperation string - -const ( - TrackPropertyCompareOperationEqual TrackPropertyCompareOperation = "Equal" - TrackPropertyCompareOperationUnknown TrackPropertyCompareOperation = "Unknown" -) - -func PossibleValuesForTrackPropertyCompareOperation() []string { - return []string{ - string(TrackPropertyCompareOperationEqual), - string(TrackPropertyCompareOperationUnknown), - } -} - -func (s *TrackPropertyCompareOperation) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTrackPropertyCompareOperation(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTrackPropertyCompareOperation(input string) (*TrackPropertyCompareOperation, error) { - vals := map[string]TrackPropertyCompareOperation{ - "equal": TrackPropertyCompareOperationEqual, - "unknown": TrackPropertyCompareOperationUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TrackPropertyCompareOperation(input) - return &out, nil -} - -type TrackPropertyType string - -const ( - TrackPropertyTypeFourCC TrackPropertyType = "FourCC" - TrackPropertyTypeUnknown TrackPropertyType = "Unknown" -) - -func PossibleValuesForTrackPropertyType() []string { - return []string{ - string(TrackPropertyTypeFourCC), - string(TrackPropertyTypeUnknown), - } -} - -func (s *TrackPropertyType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTrackPropertyType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTrackPropertyType(input string) (*TrackPropertyType, error) { - vals := map[string]TrackPropertyType{ - "fourcc": TrackPropertyTypeFourCC, - "unknown": TrackPropertyTypeUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TrackPropertyType(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_mediaservice.go deleted file mode 100644 index a9668bf4425a6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_mediaservice.go +++ /dev/null @@ -1,130 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&MediaServiceId{}) -} - -var _ resourceids.ResourceId = &MediaServiceId{} - -// MediaServiceId is a struct representing the Resource ID for a Media Service -type MediaServiceId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string -} - -// NewMediaServiceID returns a new MediaServiceId struct -func NewMediaServiceID(subscriptionId string, resourceGroupName string, mediaServiceName string) MediaServiceId { - return MediaServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - } -} - -// ParseMediaServiceID parses 'input' into a MediaServiceId -func ParseMediaServiceID(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseMediaServiceIDInsensitively parses 'input' case-insensitively into a MediaServiceId -// note: this method should only be used for API response data and not user input -func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *MediaServiceId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - return nil -} - -// ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID -func ValidateMediaServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMediaServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Media Service ID -func (id MediaServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Media Service ID -func (id MediaServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - } -} - -// String returns a human-readable description of this Media Service ID -func (id MediaServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - } - return fmt.Sprintf("Media Service (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_streaminglocator.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_streaminglocator.go deleted file mode 100644 index 98c5b939dd056..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_streaminglocator.go +++ /dev/null @@ -1,139 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&StreamingLocatorId{}) -} - -var _ resourceids.ResourceId = &StreamingLocatorId{} - -// StreamingLocatorId is a struct representing the Resource ID for a Streaming Locator -type StreamingLocatorId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - StreamingLocatorName string -} - -// NewStreamingLocatorID returns a new StreamingLocatorId struct -func NewStreamingLocatorID(subscriptionId string, resourceGroupName string, mediaServiceName string, streamingLocatorName string) StreamingLocatorId { - return StreamingLocatorId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - StreamingLocatorName: streamingLocatorName, - } -} - -// ParseStreamingLocatorID parses 'input' into a StreamingLocatorId -func ParseStreamingLocatorID(input string) (*StreamingLocatorId, error) { - parser := resourceids.NewParserFromResourceIdType(&StreamingLocatorId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := StreamingLocatorId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseStreamingLocatorIDInsensitively parses 'input' case-insensitively into a StreamingLocatorId -// note: this method should only be used for API response data and not user input -func ParseStreamingLocatorIDInsensitively(input string) (*StreamingLocatorId, error) { - parser := resourceids.NewParserFromResourceIdType(&StreamingLocatorId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := StreamingLocatorId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *StreamingLocatorId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.StreamingLocatorName, ok = input.Parsed["streamingLocatorName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "streamingLocatorName", input) - } - - return nil -} - -// ValidateStreamingLocatorID checks that 'input' can be parsed as a Streaming Locator ID -func ValidateStreamingLocatorID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseStreamingLocatorID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Streaming Locator ID -func (id StreamingLocatorId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/streamingLocators/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.StreamingLocatorName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Streaming Locator ID -func (id StreamingLocatorId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticStreamingLocators", "streamingLocators", "streamingLocators"), - resourceids.UserSpecifiedSegment("streamingLocatorName", "streamingLocatorValue"), - } -} - -// String returns a human-readable description of this Streaming Locator ID -func (id StreamingLocatorId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Streaming Locator Name: %q", id.StreamingLocatorName), - } - return fmt.Sprintf("Streaming Locator (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_streamingpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_streamingpolicy.go deleted file mode 100644 index 36742d553b4aa..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_streamingpolicy.go +++ /dev/null @@ -1,139 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&StreamingPolicyId{}) -} - -var _ resourceids.ResourceId = &StreamingPolicyId{} - -// StreamingPolicyId is a struct representing the Resource ID for a Streaming Policy -type StreamingPolicyId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - StreamingPolicyName string -} - -// NewStreamingPolicyID returns a new StreamingPolicyId struct -func NewStreamingPolicyID(subscriptionId string, resourceGroupName string, mediaServiceName string, streamingPolicyName string) StreamingPolicyId { - return StreamingPolicyId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - StreamingPolicyName: streamingPolicyName, - } -} - -// ParseStreamingPolicyID parses 'input' into a StreamingPolicyId -func ParseStreamingPolicyID(input string) (*StreamingPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(&StreamingPolicyId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := StreamingPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseStreamingPolicyIDInsensitively parses 'input' case-insensitively into a StreamingPolicyId -// note: this method should only be used for API response data and not user input -func ParseStreamingPolicyIDInsensitively(input string) (*StreamingPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(&StreamingPolicyId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := StreamingPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *StreamingPolicyId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.StreamingPolicyName, ok = input.Parsed["streamingPolicyName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "streamingPolicyName", input) - } - - return nil -} - -// ValidateStreamingPolicyID checks that 'input' can be parsed as a Streaming Policy ID -func ValidateStreamingPolicyID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseStreamingPolicyID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Streaming Policy ID -func (id StreamingPolicyId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/streamingPolicies/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.StreamingPolicyName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Streaming Policy ID -func (id StreamingPolicyId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticStreamingPolicies", "streamingPolicies", "streamingPolicies"), - resourceids.UserSpecifiedSegment("streamingPolicyName", "streamingPolicyValue"), - } -} - -// String returns a human-readable description of this Streaming Policy ID -func (id StreamingPolicyId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Streaming Policy Name: %q", id.StreamingPolicyName), - } - return fmt.Sprintf("Streaming Policy (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorscreate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorscreate.go deleted file mode 100644 index b4cfe3f3a7ac1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorscreate.go +++ /dev/null @@ -1,58 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorsCreateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *StreamingLocator -} - -// StreamingLocatorsCreate ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsCreate(ctx context.Context, id StreamingLocatorId, input StreamingLocator) (result StreamingLocatorsCreateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model StreamingLocator - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsdelete.go deleted file mode 100644 index 4b458c2d50180..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsdelete.go +++ /dev/null @@ -1,47 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorsDeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// StreamingLocatorsDelete ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsDelete(ctx context.Context, id StreamingLocatorId) (result StreamingLocatorsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsget.go deleted file mode 100644 index 4f9e0139c97e1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsget.go +++ /dev/null @@ -1,54 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *StreamingLocator -} - -// StreamingLocatorsGet ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsGet(ctx context.Context, id StreamingLocatorId) (result StreamingLocatorsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model StreamingLocator - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslist.go deleted file mode 100644 index 9a5c60b3080ed..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslist.go +++ /dev/null @@ -1,141 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]StreamingLocator -} - -type StreamingLocatorsListCompleteResult struct { - LatestHttpResponse *http.Response - Items []StreamingLocator -} - -type StreamingLocatorsListOperationOptions struct { - Filter *string - Orderby *string - Top *int64 -} - -func DefaultStreamingLocatorsListOperationOptions() StreamingLocatorsListOperationOptions { - return StreamingLocatorsListOperationOptions{} -} - -func (o StreamingLocatorsListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o StreamingLocatorsListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o StreamingLocatorsListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Filter != nil { - out.Append("$filter", fmt.Sprintf("%v", *o.Filter)) - } - if o.Orderby != nil { - out.Append("$orderby", fmt.Sprintf("%v", *o.Orderby)) - } - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -type StreamingLocatorsListCustomPager struct { - NextLink *odata.Link `json:"@odata.nextLink"` -} - -func (p *StreamingLocatorsListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// StreamingLocatorsList ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsList(ctx context.Context, id MediaServiceId, options StreamingLocatorsListOperationOptions) (result StreamingLocatorsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - OptionsObject: options, - Pager: &StreamingLocatorsListCustomPager{}, - Path: fmt.Sprintf("%s/streamingLocators", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]StreamingLocator `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// StreamingLocatorsListComplete retrieves all the results into a single object -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsListComplete(ctx context.Context, id MediaServiceId, options StreamingLocatorsListOperationOptions) (StreamingLocatorsListCompleteResult, error) { - return c.StreamingLocatorsListCompleteMatchingPredicate(ctx, id, options, StreamingLocatorOperationPredicate{}) -} - -// StreamingLocatorsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsListCompleteMatchingPredicate(ctx context.Context, id MediaServiceId, options StreamingLocatorsListOperationOptions, predicate StreamingLocatorOperationPredicate) (result StreamingLocatorsListCompleteResult, err error) { - items := make([]StreamingLocator, 0) - - resp, err := c.StreamingLocatorsList(ctx, id, options) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = StreamingLocatorsListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistcontentkeys.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistcontentkeys.go deleted file mode 100644 index d33f7dc9215bd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistcontentkeys.go +++ /dev/null @@ -1,55 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorsListContentKeysOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ListContentKeysResponse -} - -// StreamingLocatorsListContentKeys ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsListContentKeys(ctx context.Context, id StreamingLocatorId) (result StreamingLocatorsListContentKeysOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listContentKeys", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ListContentKeysResponse - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistpaths.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistpaths.go deleted file mode 100644 index e23e286f57526..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistpaths.go +++ /dev/null @@ -1,55 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorsListPathsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ListPathsResponse -} - -// StreamingLocatorsListPaths ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsListPaths(ctx context.Context, id StreamingLocatorId) (result StreamingLocatorsListPathsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listPaths", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ListPathsResponse - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streamingpoliciescreate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streamingpoliciescreate.go deleted file mode 100644 index 82fbc7d81195b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streamingpoliciescreate.go +++ /dev/null @@ -1,58 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPoliciesCreateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *StreamingPolicy -} - -// StreamingPoliciesCreate ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingPoliciesCreate(ctx context.Context, id StreamingPolicyId, input StreamingPolicy) (result StreamingPoliciesCreateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model StreamingPolicy - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesdelete.go deleted file mode 100644 index 289325c535834..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesdelete.go +++ /dev/null @@ -1,47 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPoliciesDeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// StreamingPoliciesDelete ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingPoliciesDelete(ctx context.Context, id StreamingPolicyId) (result StreamingPoliciesDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesget.go deleted file mode 100644 index 5ccc570abb98d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesget.go +++ /dev/null @@ -1,54 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPoliciesGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *StreamingPolicy -} - -// StreamingPoliciesGet ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingPoliciesGet(ctx context.Context, id StreamingPolicyId) (result StreamingPoliciesGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model StreamingPolicy - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streamingpolicieslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streamingpolicieslist.go deleted file mode 100644 index 3397b46a73e18..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streamingpolicieslist.go +++ /dev/null @@ -1,141 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPoliciesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]StreamingPolicy -} - -type StreamingPoliciesListCompleteResult struct { - LatestHttpResponse *http.Response - Items []StreamingPolicy -} - -type StreamingPoliciesListOperationOptions struct { - Filter *string - Orderby *string - Top *int64 -} - -func DefaultStreamingPoliciesListOperationOptions() StreamingPoliciesListOperationOptions { - return StreamingPoliciesListOperationOptions{} -} - -func (o StreamingPoliciesListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o StreamingPoliciesListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o StreamingPoliciesListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Filter != nil { - out.Append("$filter", fmt.Sprintf("%v", *o.Filter)) - } - if o.Orderby != nil { - out.Append("$orderby", fmt.Sprintf("%v", *o.Orderby)) - } - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -type StreamingPoliciesListCustomPager struct { - NextLink *odata.Link `json:"@odata.nextLink"` -} - -func (p *StreamingPoliciesListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// StreamingPoliciesList ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingPoliciesList(ctx context.Context, id MediaServiceId, options StreamingPoliciesListOperationOptions) (result StreamingPoliciesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - OptionsObject: options, - Pager: &StreamingPoliciesListCustomPager{}, - Path: fmt.Sprintf("%s/streamingPolicies", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]StreamingPolicy `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// StreamingPoliciesListComplete retrieves all the results into a single object -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingPoliciesListComplete(ctx context.Context, id MediaServiceId, options StreamingPoliciesListOperationOptions) (StreamingPoliciesListCompleteResult, error) { - return c.StreamingPoliciesListCompleteMatchingPredicate(ctx, id, options, StreamingPolicyOperationPredicate{}) -} - -// StreamingPoliciesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingPoliciesListCompleteMatchingPredicate(ctx context.Context, id MediaServiceId, options StreamingPoliciesListOperationOptions, predicate StreamingPolicyOperationPredicate) (result StreamingPoliciesListCompleteResult, err error) { - items := make([]StreamingPolicy, 0) - - resp, err := c.StreamingPoliciesList(ctx, id, options) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = StreamingPoliciesListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_cbcsdrmconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_cbcsdrmconfiguration.go deleted file mode 100644 index ae2f7e2f7b938..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_cbcsdrmconfiguration.go +++ /dev/null @@ -1,10 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CbcsDrmConfiguration struct { - FairPlay *StreamingPolicyFairPlayConfiguration `json:"fairPlay,omitempty"` - PlayReady *StreamingPolicyPlayReadyConfiguration `json:"playReady,omitempty"` - Widevine *StreamingPolicyWidevineConfiguration `json:"widevine,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_cencdrmconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_cencdrmconfiguration.go deleted file mode 100644 index 303f7515a8ba3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_cencdrmconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CencDrmConfiguration struct { - PlayReady *StreamingPolicyPlayReadyConfiguration `json:"playReady,omitempty"` - Widevine *StreamingPolicyWidevineConfiguration `json:"widevine,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_commonencryptioncbcs.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_commonencryptioncbcs.go deleted file mode 100644 index 53f1c51ac43a3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_commonencryptioncbcs.go +++ /dev/null @@ -1,11 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommonEncryptionCbcs struct { - ClearTracks *[]TrackSelection `json:"clearTracks,omitempty"` - ContentKeys *StreamingPolicyContentKeys `json:"contentKeys,omitempty"` - Drm *CbcsDrmConfiguration `json:"drm,omitempty"` - EnabledProtocols *EnabledProtocols `json:"enabledProtocols,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_commonencryptioncenc.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_commonencryptioncenc.go deleted file mode 100644 index 35fc2df90b12a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_commonencryptioncenc.go +++ /dev/null @@ -1,11 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommonEncryptionCenc struct { - ClearTracks *[]TrackSelection `json:"clearTracks,omitempty"` - ContentKeys *StreamingPolicyContentKeys `json:"contentKeys,omitempty"` - Drm *CencDrmConfiguration `json:"drm,omitempty"` - EnabledProtocols *EnabledProtocols `json:"enabledProtocols,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_defaultkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_defaultkey.go deleted file mode 100644 index 45346db27997c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_defaultkey.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DefaultKey struct { - Label *string `json:"label,omitempty"` - PolicyName *string `json:"policyName,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_enabledprotocols.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_enabledprotocols.go deleted file mode 100644 index 6df37395ce298..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_enabledprotocols.go +++ /dev/null @@ -1,11 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EnabledProtocols struct { - Dash bool `json:"dash"` - Download bool `json:"download"` - Hls bool `json:"hls"` - SmoothStreaming bool `json:"smoothStreaming"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_envelopeencryption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_envelopeencryption.go deleted file mode 100644 index 2d05cea4b5abf..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_envelopeencryption.go +++ /dev/null @@ -1,11 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EnvelopeEncryption struct { - ClearTracks *[]TrackSelection `json:"clearTracks,omitempty"` - ContentKeys *StreamingPolicyContentKeys `json:"contentKeys,omitempty"` - CustomKeyAcquisitionUrlTemplate *string `json:"customKeyAcquisitionUrlTemplate,omitempty"` - EnabledProtocols *EnabledProtocols `json:"enabledProtocols,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_listcontentkeysresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_listcontentkeysresponse.go deleted file mode 100644 index 9947072e63d64..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_listcontentkeysresponse.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListContentKeysResponse struct { - ContentKeys *[]StreamingLocatorContentKey `json:"contentKeys,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_listpathsresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_listpathsresponse.go deleted file mode 100644 index dc2d9ca8c6599..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_listpathsresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListPathsResponse struct { - DownloadPaths *[]string `json:"downloadPaths,omitempty"` - StreamingPaths *[]StreamingPath `json:"streamingPaths,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_noencryption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_noencryption.go deleted file mode 100644 index e011fdc6e91cf..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_noencryption.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NoEncryption struct { - EnabledProtocols *EnabledProtocols `json:"enabledProtocols,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streaminglocator.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streaminglocator.go deleted file mode 100644 index dfba5540db69a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streaminglocator.go +++ /dev/null @@ -1,16 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocator struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *StreamingLocatorProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streaminglocatorcontentkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streaminglocatorcontentkey.go deleted file mode 100644 index 52c78e6e9237f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streaminglocatorcontentkey.go +++ /dev/null @@ -1,13 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorContentKey struct { - Id string `json:"id"` - LabelReferenceInStreamingPolicy *string `json:"labelReferenceInStreamingPolicy,omitempty"` - PolicyName *string `json:"policyName,omitempty"` - Tracks *[]TrackSelection `json:"tracks,omitempty"` - Type *StreamingLocatorContentKeyType `json:"type,omitempty"` - Value *string `json:"value,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streaminglocatorproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streaminglocatorproperties.go deleted file mode 100644 index e9123bd921faa..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streaminglocatorproperties.go +++ /dev/null @@ -1,59 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorProperties struct { - AlternativeMediaId *string `json:"alternativeMediaId,omitempty"` - AssetName string `json:"assetName"` - ContentKeys *[]StreamingLocatorContentKey `json:"contentKeys,omitempty"` - Created *string `json:"created,omitempty"` - DefaultContentKeyPolicyName *string `json:"defaultContentKeyPolicyName,omitempty"` - EndTime *string `json:"endTime,omitempty"` - Filters *[]string `json:"filters,omitempty"` - StartTime *string `json:"startTime,omitempty"` - StreamingLocatorId *string `json:"streamingLocatorId,omitempty"` - StreamingPolicyName string `json:"streamingPolicyName"` -} - -func (o *StreamingLocatorProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *StreamingLocatorProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *StreamingLocatorProperties) GetEndTimeAsTime() (*time.Time, error) { - if o.EndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *StreamingLocatorProperties) SetEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndTime = &formatted -} - -func (o *StreamingLocatorProperties) GetStartTimeAsTime() (*time.Time, error) { - if o.StartTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *StreamingLocatorProperties) SetStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartTime = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streamingpath.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streamingpath.go deleted file mode 100644 index 72efd8a9aa27e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streamingpath.go +++ /dev/null @@ -1,10 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPath struct { - EncryptionScheme EncryptionScheme `json:"encryptionScheme"` - Paths *[]string `json:"paths,omitempty"` - StreamingProtocol StreamingPolicyStreamingProtocol `json:"streamingProtocol"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streamingpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streamingpolicy.go deleted file mode 100644 index 3dd17c8014555..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streamingpolicy.go +++ /dev/null @@ -1,16 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPolicy struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *StreamingPolicyProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streamingpolicycontentkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streamingpolicycontentkey.go deleted file mode 100644 index 2b8ff87e76868..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streamingpolicycontentkey.go +++ /dev/null @@ -1,10 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPolicyContentKey struct { - Label *string `json:"label,omitempty"` - PolicyName *string `json:"policyName,omitempty"` - Tracks *[]TrackSelection `json:"tracks,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streamingpolicycontentkeys.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streamingpolicycontentkeys.go deleted file mode 100644 index 89fc35580ed8c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streamingpolicycontentkeys.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPolicyContentKeys struct { - DefaultKey *DefaultKey `json:"defaultKey,omitempty"` - KeyToTrackMappings *[]StreamingPolicyContentKey `json:"keyToTrackMappings,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streamingpolicyfairplayconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streamingpolicyfairplayconfiguration.go deleted file mode 100644 index 08017c68e806f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streamingpolicyfairplayconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPolicyFairPlayConfiguration struct { - AllowPersistentLicense bool `json:"allowPersistentLicense"` - CustomLicenseAcquisitionUrlTemplate *string `json:"customLicenseAcquisitionUrlTemplate,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streamingpolicyplayreadyconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streamingpolicyplayreadyconfiguration.go deleted file mode 100644 index 45d779f1602e0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streamingpolicyplayreadyconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPolicyPlayReadyConfiguration struct { - CustomLicenseAcquisitionUrlTemplate *string `json:"customLicenseAcquisitionUrlTemplate,omitempty"` - PlayReadyCustomAttributes *string `json:"playReadyCustomAttributes,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streamingpolicyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streamingpolicyproperties.go deleted file mode 100644 index 69fbe59729b5c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streamingpolicyproperties.go +++ /dev/null @@ -1,31 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPolicyProperties struct { - CommonEncryptionCbcs *CommonEncryptionCbcs `json:"commonEncryptionCbcs,omitempty"` - CommonEncryptionCenc *CommonEncryptionCenc `json:"commonEncryptionCenc,omitempty"` - Created *string `json:"created,omitempty"` - DefaultContentKeyPolicyName *string `json:"defaultContentKeyPolicyName,omitempty"` - EnvelopeEncryption *EnvelopeEncryption `json:"envelopeEncryption,omitempty"` - NoEncryption *NoEncryption `json:"noEncryption,omitempty"` -} - -func (o *StreamingPolicyProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *StreamingPolicyProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streamingpolicywidevineconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streamingpolicywidevineconfiguration.go deleted file mode 100644 index 2d2ec405fb180..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_streamingpolicywidevineconfiguration.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPolicyWidevineConfiguration struct { - CustomLicenseAcquisitionUrlTemplate *string `json:"customLicenseAcquisitionUrlTemplate,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_trackpropertycondition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_trackpropertycondition.go deleted file mode 100644 index 798b212d07ced..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_trackpropertycondition.go +++ /dev/null @@ -1,10 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrackPropertyCondition struct { - Operation TrackPropertyCompareOperation `json:"operation"` - Property TrackPropertyType `json:"property"` - Value *string `json:"value,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_trackselection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_trackselection.go deleted file mode 100644 index be9009cc09e53..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/model_trackselection.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrackSelection struct { - TrackSelections *[]TrackPropertyCondition `json:"trackSelections,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/predicates.go deleted file mode 100644 index f5a87258ff4ea..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/predicates.go +++ /dev/null @@ -1,50 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p StreamingLocatorOperationPredicate) Matches(input StreamingLocator) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type StreamingPolicyOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p StreamingPolicyOperationPredicate) Matches(input StreamingPolicy) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/version.go deleted file mode 100644 index cdfd8774be644..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/streamingpoliciesandstreaminglocators/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/client.go deleted file mode 100644 index 448b2da16bda9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/client.go +++ /dev/null @@ -1,28 +0,0 @@ -package v2022_07_01 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -type Client struct { - Encodings *encodings.EncodingsClient -} - -func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { - encodingsClient, err := encodings.NewEncodingsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Encodings client: %+v", err) - } - configureFunc(encodingsClient.Client) - - return &Client{ - Encodings: encodingsClient, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/README.md deleted file mode 100644 index f0ad1b61e8f84..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/README.md +++ /dev/null @@ -1,218 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings` Documentation - -The `encodings` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2022-07-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings" -``` - - -### Client Initialization - -```go -client := encodings.NewEncodingsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `EncodingsClient.JobsCancelJob` - -```go -ctx := context.TODO() -id := encodings.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue", "jobValue") - -read, err := client.JobsCancelJob(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EncodingsClient.JobsCreate` - -```go -ctx := context.TODO() -id := encodings.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue", "jobValue") - -payload := encodings.Job{ - // ... -} - - -read, err := client.JobsCreate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EncodingsClient.JobsDelete` - -```go -ctx := context.TODO() -id := encodings.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue", "jobValue") - -read, err := client.JobsDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EncodingsClient.JobsGet` - -```go -ctx := context.TODO() -id := encodings.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue", "jobValue") - -read, err := client.JobsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EncodingsClient.JobsList` - -```go -ctx := context.TODO() -id := encodings.NewTransformID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue") - -// alternatively `client.JobsList(ctx, id, encodings.DefaultJobsListOperationOptions())` can be used to do batched pagination -items, err := client.JobsListComplete(ctx, id, encodings.DefaultJobsListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `EncodingsClient.JobsUpdate` - -```go -ctx := context.TODO() -id := encodings.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue", "jobValue") - -payload := encodings.Job{ - // ... -} - - -read, err := client.JobsUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EncodingsClient.TransformsCreateOrUpdate` - -```go -ctx := context.TODO() -id := encodings.NewTransformID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue") - -payload := encodings.Transform{ - // ... -} - - -read, err := client.TransformsCreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EncodingsClient.TransformsDelete` - -```go -ctx := context.TODO() -id := encodings.NewTransformID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue") - -read, err := client.TransformsDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EncodingsClient.TransformsGet` - -```go -ctx := context.TODO() -id := encodings.NewTransformID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue") - -read, err := client.TransformsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EncodingsClient.TransformsList` - -```go -ctx := context.TODO() -id := encodings.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -// alternatively `client.TransformsList(ctx, id, encodings.DefaultTransformsListOperationOptions())` can be used to do batched pagination -items, err := client.TransformsListComplete(ctx, id, encodings.DefaultTransformsListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `EncodingsClient.TransformsUpdate` - -```go -ctx := context.TODO() -id := encodings.NewTransformID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue") - -payload := encodings.Transform{ - // ... -} - - -read, err := client.TransformsUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/client.go deleted file mode 100644 index d09d3ae04edc8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package encodings - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EncodingsClient struct { - Client *resourcemanager.Client -} - -func NewEncodingsClientWithBaseURI(sdkApi sdkEnv.Api) (*EncodingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "encodings", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating EncodingsClient: %+v", err) - } - - return &EncodingsClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/constants.go deleted file mode 100644 index 58fc972732f31..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/constants.go +++ /dev/null @@ -1,1391 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AacAudioProfile string - -const ( - AacAudioProfileAacLc AacAudioProfile = "AacLc" - AacAudioProfileHeAacVOne AacAudioProfile = "HeAacV1" - AacAudioProfileHeAacVTwo AacAudioProfile = "HeAacV2" -) - -func PossibleValuesForAacAudioProfile() []string { - return []string{ - string(AacAudioProfileAacLc), - string(AacAudioProfileHeAacVOne), - string(AacAudioProfileHeAacVTwo), - } -} - -func (s *AacAudioProfile) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAacAudioProfile(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAacAudioProfile(input string) (*AacAudioProfile, error) { - vals := map[string]AacAudioProfile{ - "aaclc": AacAudioProfileAacLc, - "heaacv1": AacAudioProfileHeAacVOne, - "heaacv2": AacAudioProfileHeAacVTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AacAudioProfile(input) - return &out, nil -} - -type AnalysisResolution string - -const ( - AnalysisResolutionSourceResolution AnalysisResolution = "SourceResolution" - AnalysisResolutionStandardDefinition AnalysisResolution = "StandardDefinition" -) - -func PossibleValuesForAnalysisResolution() []string { - return []string{ - string(AnalysisResolutionSourceResolution), - string(AnalysisResolutionStandardDefinition), - } -} - -func (s *AnalysisResolution) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAnalysisResolution(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAnalysisResolution(input string) (*AnalysisResolution, error) { - vals := map[string]AnalysisResolution{ - "sourceresolution": AnalysisResolutionSourceResolution, - "standarddefinition": AnalysisResolutionStandardDefinition, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AnalysisResolution(input) - return &out, nil -} - -type AttributeFilter string - -const ( - AttributeFilterAll AttributeFilter = "All" - AttributeFilterBottom AttributeFilter = "Bottom" - AttributeFilterTop AttributeFilter = "Top" - AttributeFilterValueEquals AttributeFilter = "ValueEquals" -) - -func PossibleValuesForAttributeFilter() []string { - return []string{ - string(AttributeFilterAll), - string(AttributeFilterBottom), - string(AttributeFilterTop), - string(AttributeFilterValueEquals), - } -} - -func (s *AttributeFilter) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAttributeFilter(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAttributeFilter(input string) (*AttributeFilter, error) { - vals := map[string]AttributeFilter{ - "all": AttributeFilterAll, - "bottom": AttributeFilterBottom, - "top": AttributeFilterTop, - "valueequals": AttributeFilterValueEquals, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AttributeFilter(input) - return &out, nil -} - -type AudioAnalysisMode string - -const ( - AudioAnalysisModeBasic AudioAnalysisMode = "Basic" - AudioAnalysisModeStandard AudioAnalysisMode = "Standard" -) - -func PossibleValuesForAudioAnalysisMode() []string { - return []string{ - string(AudioAnalysisModeBasic), - string(AudioAnalysisModeStandard), - } -} - -func (s *AudioAnalysisMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAudioAnalysisMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAudioAnalysisMode(input string) (*AudioAnalysisMode, error) { - vals := map[string]AudioAnalysisMode{ - "basic": AudioAnalysisModeBasic, - "standard": AudioAnalysisModeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AudioAnalysisMode(input) - return &out, nil -} - -type BlurType string - -const ( - BlurTypeBlack BlurType = "Black" - BlurTypeBox BlurType = "Box" - BlurTypeHigh BlurType = "High" - BlurTypeLow BlurType = "Low" - BlurTypeMed BlurType = "Med" -) - -func PossibleValuesForBlurType() []string { - return []string{ - string(BlurTypeBlack), - string(BlurTypeBox), - string(BlurTypeHigh), - string(BlurTypeLow), - string(BlurTypeMed), - } -} - -func (s *BlurType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseBlurType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseBlurType(input string) (*BlurType, error) { - vals := map[string]BlurType{ - "black": BlurTypeBlack, - "box": BlurTypeBox, - "high": BlurTypeHigh, - "low": BlurTypeLow, - "med": BlurTypeMed, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := BlurType(input) - return &out, nil -} - -type ChannelMapping string - -const ( - ChannelMappingBackLeft ChannelMapping = "BackLeft" - ChannelMappingBackRight ChannelMapping = "BackRight" - ChannelMappingCenter ChannelMapping = "Center" - ChannelMappingFrontLeft ChannelMapping = "FrontLeft" - ChannelMappingFrontRight ChannelMapping = "FrontRight" - ChannelMappingLowFrequencyEffects ChannelMapping = "LowFrequencyEffects" - ChannelMappingStereoLeft ChannelMapping = "StereoLeft" - ChannelMappingStereoRight ChannelMapping = "StereoRight" -) - -func PossibleValuesForChannelMapping() []string { - return []string{ - string(ChannelMappingBackLeft), - string(ChannelMappingBackRight), - string(ChannelMappingCenter), - string(ChannelMappingFrontLeft), - string(ChannelMappingFrontRight), - string(ChannelMappingLowFrequencyEffects), - string(ChannelMappingStereoLeft), - string(ChannelMappingStereoRight), - } -} - -func (s *ChannelMapping) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseChannelMapping(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseChannelMapping(input string) (*ChannelMapping, error) { - vals := map[string]ChannelMapping{ - "backleft": ChannelMappingBackLeft, - "backright": ChannelMappingBackRight, - "center": ChannelMappingCenter, - "frontleft": ChannelMappingFrontLeft, - "frontright": ChannelMappingFrontRight, - "lowfrequencyeffects": ChannelMappingLowFrequencyEffects, - "stereoleft": ChannelMappingStereoLeft, - "stereoright": ChannelMappingStereoRight, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ChannelMapping(input) - return &out, nil -} - -type Complexity string - -const ( - ComplexityBalanced Complexity = "Balanced" - ComplexityQuality Complexity = "Quality" - ComplexitySpeed Complexity = "Speed" -) - -func PossibleValuesForComplexity() []string { - return []string{ - string(ComplexityBalanced), - string(ComplexityQuality), - string(ComplexitySpeed), - } -} - -func (s *Complexity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseComplexity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseComplexity(input string) (*Complexity, error) { - vals := map[string]Complexity{ - "balanced": ComplexityBalanced, - "quality": ComplexityQuality, - "speed": ComplexitySpeed, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Complexity(input) - return &out, nil -} - -type DeinterlaceMode string - -const ( - DeinterlaceModeAutoPixelAdaptive DeinterlaceMode = "AutoPixelAdaptive" - DeinterlaceModeOff DeinterlaceMode = "Off" -) - -func PossibleValuesForDeinterlaceMode() []string { - return []string{ - string(DeinterlaceModeAutoPixelAdaptive), - string(DeinterlaceModeOff), - } -} - -func (s *DeinterlaceMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeinterlaceMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeinterlaceMode(input string) (*DeinterlaceMode, error) { - vals := map[string]DeinterlaceMode{ - "autopixeladaptive": DeinterlaceModeAutoPixelAdaptive, - "off": DeinterlaceModeOff, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeinterlaceMode(input) - return &out, nil -} - -type DeinterlaceParity string - -const ( - DeinterlaceParityAuto DeinterlaceParity = "Auto" - DeinterlaceParityBottomFieldFirst DeinterlaceParity = "BottomFieldFirst" - DeinterlaceParityTopFieldFirst DeinterlaceParity = "TopFieldFirst" -) - -func PossibleValuesForDeinterlaceParity() []string { - return []string{ - string(DeinterlaceParityAuto), - string(DeinterlaceParityBottomFieldFirst), - string(DeinterlaceParityTopFieldFirst), - } -} - -func (s *DeinterlaceParity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeinterlaceParity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeinterlaceParity(input string) (*DeinterlaceParity, error) { - vals := map[string]DeinterlaceParity{ - "auto": DeinterlaceParityAuto, - "bottomfieldfirst": DeinterlaceParityBottomFieldFirst, - "topfieldfirst": DeinterlaceParityTopFieldFirst, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeinterlaceParity(input) - return &out, nil -} - -type EncoderNamedPreset string - -const ( - EncoderNamedPresetAACGoodQualityAudio EncoderNamedPreset = "AACGoodQualityAudio" - EncoderNamedPresetAdaptiveStreaming EncoderNamedPreset = "AdaptiveStreaming" - EncoderNamedPresetContentAwareEncoding EncoderNamedPreset = "ContentAwareEncoding" - EncoderNamedPresetContentAwareEncodingExperimental EncoderNamedPreset = "ContentAwareEncodingExperimental" - EncoderNamedPresetCopyAllBitrateNonInterleaved EncoderNamedPreset = "CopyAllBitrateNonInterleaved" - EncoderNamedPresetDDGoodQualityAudio EncoderNamedPreset = "DDGoodQualityAudio" - EncoderNamedPresetHTwoSixFiveAdaptiveStreaming EncoderNamedPreset = "H265AdaptiveStreaming" - EncoderNamedPresetHTwoSixFiveContentAwareEncoding EncoderNamedPreset = "H265ContentAwareEncoding" - EncoderNamedPresetHTwoSixFiveSingleBitrateFourK EncoderNamedPreset = "H265SingleBitrate4K" - EncoderNamedPresetHTwoSixFiveSingleBitrateOneZeroEightZerop EncoderNamedPreset = "H265SingleBitrate1080p" - EncoderNamedPresetHTwoSixFiveSingleBitrateSevenTwoZerop EncoderNamedPreset = "H265SingleBitrate720p" - EncoderNamedPresetHTwoSixFourMultipleBitrateOneZeroEightZerop EncoderNamedPreset = "H264MultipleBitrate1080p" - EncoderNamedPresetHTwoSixFourMultipleBitrateSD EncoderNamedPreset = "H264MultipleBitrateSD" - EncoderNamedPresetHTwoSixFourMultipleBitrateSevenTwoZerop EncoderNamedPreset = "H264MultipleBitrate720p" - EncoderNamedPresetHTwoSixFourSingleBitrateOneZeroEightZerop EncoderNamedPreset = "H264SingleBitrate1080p" - EncoderNamedPresetHTwoSixFourSingleBitrateSD EncoderNamedPreset = "H264SingleBitrateSD" - EncoderNamedPresetHTwoSixFourSingleBitrateSevenTwoZerop EncoderNamedPreset = "H264SingleBitrate720p" -) - -func PossibleValuesForEncoderNamedPreset() []string { - return []string{ - string(EncoderNamedPresetAACGoodQualityAudio), - string(EncoderNamedPresetAdaptiveStreaming), - string(EncoderNamedPresetContentAwareEncoding), - string(EncoderNamedPresetContentAwareEncodingExperimental), - string(EncoderNamedPresetCopyAllBitrateNonInterleaved), - string(EncoderNamedPresetDDGoodQualityAudio), - string(EncoderNamedPresetHTwoSixFiveAdaptiveStreaming), - string(EncoderNamedPresetHTwoSixFiveContentAwareEncoding), - string(EncoderNamedPresetHTwoSixFiveSingleBitrateFourK), - string(EncoderNamedPresetHTwoSixFiveSingleBitrateOneZeroEightZerop), - string(EncoderNamedPresetHTwoSixFiveSingleBitrateSevenTwoZerop), - string(EncoderNamedPresetHTwoSixFourMultipleBitrateOneZeroEightZerop), - string(EncoderNamedPresetHTwoSixFourMultipleBitrateSD), - string(EncoderNamedPresetHTwoSixFourMultipleBitrateSevenTwoZerop), - string(EncoderNamedPresetHTwoSixFourSingleBitrateOneZeroEightZerop), - string(EncoderNamedPresetHTwoSixFourSingleBitrateSD), - string(EncoderNamedPresetHTwoSixFourSingleBitrateSevenTwoZerop), - } -} - -func (s *EncoderNamedPreset) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEncoderNamedPreset(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEncoderNamedPreset(input string) (*EncoderNamedPreset, error) { - vals := map[string]EncoderNamedPreset{ - "aacgoodqualityaudio": EncoderNamedPresetAACGoodQualityAudio, - "adaptivestreaming": EncoderNamedPresetAdaptiveStreaming, - "contentawareencoding": EncoderNamedPresetContentAwareEncoding, - "contentawareencodingexperimental": EncoderNamedPresetContentAwareEncodingExperimental, - "copyallbitratenoninterleaved": EncoderNamedPresetCopyAllBitrateNonInterleaved, - "ddgoodqualityaudio": EncoderNamedPresetDDGoodQualityAudio, - "h265adaptivestreaming": EncoderNamedPresetHTwoSixFiveAdaptiveStreaming, - "h265contentawareencoding": EncoderNamedPresetHTwoSixFiveContentAwareEncoding, - "h265singlebitrate4k": EncoderNamedPresetHTwoSixFiveSingleBitrateFourK, - "h265singlebitrate1080p": EncoderNamedPresetHTwoSixFiveSingleBitrateOneZeroEightZerop, - "h265singlebitrate720p": EncoderNamedPresetHTwoSixFiveSingleBitrateSevenTwoZerop, - "h264multiplebitrate1080p": EncoderNamedPresetHTwoSixFourMultipleBitrateOneZeroEightZerop, - "h264multiplebitratesd": EncoderNamedPresetHTwoSixFourMultipleBitrateSD, - "h264multiplebitrate720p": EncoderNamedPresetHTwoSixFourMultipleBitrateSevenTwoZerop, - "h264singlebitrate1080p": EncoderNamedPresetHTwoSixFourSingleBitrateOneZeroEightZerop, - "h264singlebitratesd": EncoderNamedPresetHTwoSixFourSingleBitrateSD, - "h264singlebitrate720p": EncoderNamedPresetHTwoSixFourSingleBitrateSevenTwoZerop, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EncoderNamedPreset(input) - return &out, nil -} - -type EntropyMode string - -const ( - EntropyModeCabac EntropyMode = "Cabac" - EntropyModeCavlc EntropyMode = "Cavlc" -) - -func PossibleValuesForEntropyMode() []string { - return []string{ - string(EntropyModeCabac), - string(EntropyModeCavlc), - } -} - -func (s *EntropyMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEntropyMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEntropyMode(input string) (*EntropyMode, error) { - vals := map[string]EntropyMode{ - "cabac": EntropyModeCabac, - "cavlc": EntropyModeCavlc, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EntropyMode(input) - return &out, nil -} - -type FaceRedactorMode string - -const ( - FaceRedactorModeAnalyze FaceRedactorMode = "Analyze" - FaceRedactorModeCombined FaceRedactorMode = "Combined" - FaceRedactorModeRedact FaceRedactorMode = "Redact" -) - -func PossibleValuesForFaceRedactorMode() []string { - return []string{ - string(FaceRedactorModeAnalyze), - string(FaceRedactorModeCombined), - string(FaceRedactorModeRedact), - } -} - -func (s *FaceRedactorMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFaceRedactorMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFaceRedactorMode(input string) (*FaceRedactorMode, error) { - vals := map[string]FaceRedactorMode{ - "analyze": FaceRedactorModeAnalyze, - "combined": FaceRedactorModeCombined, - "redact": FaceRedactorModeRedact, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FaceRedactorMode(input) - return &out, nil -} - -type H264Complexity string - -const ( - H264ComplexityBalanced H264Complexity = "Balanced" - H264ComplexityQuality H264Complexity = "Quality" - H264ComplexitySpeed H264Complexity = "Speed" -) - -func PossibleValuesForH264Complexity() []string { - return []string{ - string(H264ComplexityBalanced), - string(H264ComplexityQuality), - string(H264ComplexitySpeed), - } -} - -func (s *H264Complexity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseH264Complexity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseH264Complexity(input string) (*H264Complexity, error) { - vals := map[string]H264Complexity{ - "balanced": H264ComplexityBalanced, - "quality": H264ComplexityQuality, - "speed": H264ComplexitySpeed, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := H264Complexity(input) - return &out, nil -} - -type H264RateControlMode string - -const ( - H264RateControlModeABR H264RateControlMode = "ABR" - H264RateControlModeCBR H264RateControlMode = "CBR" - H264RateControlModeCRF H264RateControlMode = "CRF" -) - -func PossibleValuesForH264RateControlMode() []string { - return []string{ - string(H264RateControlModeABR), - string(H264RateControlModeCBR), - string(H264RateControlModeCRF), - } -} - -func (s *H264RateControlMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseH264RateControlMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseH264RateControlMode(input string) (*H264RateControlMode, error) { - vals := map[string]H264RateControlMode{ - "abr": H264RateControlModeABR, - "cbr": H264RateControlModeCBR, - "crf": H264RateControlModeCRF, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := H264RateControlMode(input) - return &out, nil -} - -type H264VideoProfile string - -const ( - H264VideoProfileAuto H264VideoProfile = "Auto" - H264VideoProfileBaseline H264VideoProfile = "Baseline" - H264VideoProfileHigh H264VideoProfile = "High" - H264VideoProfileHighFourFourFour H264VideoProfile = "High444" - H264VideoProfileHighFourTwoTwo H264VideoProfile = "High422" - H264VideoProfileMain H264VideoProfile = "Main" -) - -func PossibleValuesForH264VideoProfile() []string { - return []string{ - string(H264VideoProfileAuto), - string(H264VideoProfileBaseline), - string(H264VideoProfileHigh), - string(H264VideoProfileHighFourFourFour), - string(H264VideoProfileHighFourTwoTwo), - string(H264VideoProfileMain), - } -} - -func (s *H264VideoProfile) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseH264VideoProfile(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseH264VideoProfile(input string) (*H264VideoProfile, error) { - vals := map[string]H264VideoProfile{ - "auto": H264VideoProfileAuto, - "baseline": H264VideoProfileBaseline, - "high": H264VideoProfileHigh, - "high444": H264VideoProfileHighFourFourFour, - "high422": H264VideoProfileHighFourTwoTwo, - "main": H264VideoProfileMain, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := H264VideoProfile(input) - return &out, nil -} - -type H265Complexity string - -const ( - H265ComplexityBalanced H265Complexity = "Balanced" - H265ComplexityQuality H265Complexity = "Quality" - H265ComplexitySpeed H265Complexity = "Speed" -) - -func PossibleValuesForH265Complexity() []string { - return []string{ - string(H265ComplexityBalanced), - string(H265ComplexityQuality), - string(H265ComplexitySpeed), - } -} - -func (s *H265Complexity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseH265Complexity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseH265Complexity(input string) (*H265Complexity, error) { - vals := map[string]H265Complexity{ - "balanced": H265ComplexityBalanced, - "quality": H265ComplexityQuality, - "speed": H265ComplexitySpeed, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := H265Complexity(input) - return &out, nil -} - -type H265VideoProfile string - -const ( - H265VideoProfileAuto H265VideoProfile = "Auto" - H265VideoProfileMain H265VideoProfile = "Main" - H265VideoProfileMainOneZero H265VideoProfile = "Main10" -) - -func PossibleValuesForH265VideoProfile() []string { - return []string{ - string(H265VideoProfileAuto), - string(H265VideoProfileMain), - string(H265VideoProfileMainOneZero), - } -} - -func (s *H265VideoProfile) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseH265VideoProfile(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseH265VideoProfile(input string) (*H265VideoProfile, error) { - vals := map[string]H265VideoProfile{ - "auto": H265VideoProfileAuto, - "main": H265VideoProfileMain, - "main10": H265VideoProfileMainOneZero, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := H265VideoProfile(input) - return &out, nil -} - -type InsightsType string - -const ( - InsightsTypeAllInsights InsightsType = "AllInsights" - InsightsTypeAudioInsightsOnly InsightsType = "AudioInsightsOnly" - InsightsTypeVideoInsightsOnly InsightsType = "VideoInsightsOnly" -) - -func PossibleValuesForInsightsType() []string { - return []string{ - string(InsightsTypeAllInsights), - string(InsightsTypeAudioInsightsOnly), - string(InsightsTypeVideoInsightsOnly), - } -} - -func (s *InsightsType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseInsightsType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseInsightsType(input string) (*InsightsType, error) { - vals := map[string]InsightsType{ - "allinsights": InsightsTypeAllInsights, - "audioinsightsonly": InsightsTypeAudioInsightsOnly, - "videoinsightsonly": InsightsTypeVideoInsightsOnly, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := InsightsType(input) - return &out, nil -} - -type InterleaveOutput string - -const ( - InterleaveOutputInterleavedOutput InterleaveOutput = "InterleavedOutput" - InterleaveOutputNonInterleavedOutput InterleaveOutput = "NonInterleavedOutput" -) - -func PossibleValuesForInterleaveOutput() []string { - return []string{ - string(InterleaveOutputInterleavedOutput), - string(InterleaveOutputNonInterleavedOutput), - } -} - -func (s *InterleaveOutput) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseInterleaveOutput(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseInterleaveOutput(input string) (*InterleaveOutput, error) { - vals := map[string]InterleaveOutput{ - "interleavedoutput": InterleaveOutputInterleavedOutput, - "noninterleavedoutput": InterleaveOutputNonInterleavedOutput, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := InterleaveOutput(input) - return &out, nil -} - -type JobErrorCategory string - -const ( - JobErrorCategoryAccount JobErrorCategory = "Account" - JobErrorCategoryConfiguration JobErrorCategory = "Configuration" - JobErrorCategoryContent JobErrorCategory = "Content" - JobErrorCategoryDownload JobErrorCategory = "Download" - JobErrorCategoryService JobErrorCategory = "Service" - JobErrorCategoryUpload JobErrorCategory = "Upload" -) - -func PossibleValuesForJobErrorCategory() []string { - return []string{ - string(JobErrorCategoryAccount), - string(JobErrorCategoryConfiguration), - string(JobErrorCategoryContent), - string(JobErrorCategoryDownload), - string(JobErrorCategoryService), - string(JobErrorCategoryUpload), - } -} - -func (s *JobErrorCategory) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseJobErrorCategory(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseJobErrorCategory(input string) (*JobErrorCategory, error) { - vals := map[string]JobErrorCategory{ - "account": JobErrorCategoryAccount, - "configuration": JobErrorCategoryConfiguration, - "content": JobErrorCategoryContent, - "download": JobErrorCategoryDownload, - "service": JobErrorCategoryService, - "upload": JobErrorCategoryUpload, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := JobErrorCategory(input) - return &out, nil -} - -type JobErrorCode string - -const ( - JobErrorCodeConfigurationUnsupported JobErrorCode = "ConfigurationUnsupported" - JobErrorCodeContentMalformed JobErrorCode = "ContentMalformed" - JobErrorCodeContentUnsupported JobErrorCode = "ContentUnsupported" - JobErrorCodeDownloadNotAccessible JobErrorCode = "DownloadNotAccessible" - JobErrorCodeDownloadTransientError JobErrorCode = "DownloadTransientError" - JobErrorCodeIdentityUnsupported JobErrorCode = "IdentityUnsupported" - JobErrorCodeServiceError JobErrorCode = "ServiceError" - JobErrorCodeServiceTransientError JobErrorCode = "ServiceTransientError" - JobErrorCodeUploadNotAccessible JobErrorCode = "UploadNotAccessible" - JobErrorCodeUploadTransientError JobErrorCode = "UploadTransientError" -) - -func PossibleValuesForJobErrorCode() []string { - return []string{ - string(JobErrorCodeConfigurationUnsupported), - string(JobErrorCodeContentMalformed), - string(JobErrorCodeContentUnsupported), - string(JobErrorCodeDownloadNotAccessible), - string(JobErrorCodeDownloadTransientError), - string(JobErrorCodeIdentityUnsupported), - string(JobErrorCodeServiceError), - string(JobErrorCodeServiceTransientError), - string(JobErrorCodeUploadNotAccessible), - string(JobErrorCodeUploadTransientError), - } -} - -func (s *JobErrorCode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseJobErrorCode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseJobErrorCode(input string) (*JobErrorCode, error) { - vals := map[string]JobErrorCode{ - "configurationunsupported": JobErrorCodeConfigurationUnsupported, - "contentmalformed": JobErrorCodeContentMalformed, - "contentunsupported": JobErrorCodeContentUnsupported, - "downloadnotaccessible": JobErrorCodeDownloadNotAccessible, - "downloadtransienterror": JobErrorCodeDownloadTransientError, - "identityunsupported": JobErrorCodeIdentityUnsupported, - "serviceerror": JobErrorCodeServiceError, - "servicetransienterror": JobErrorCodeServiceTransientError, - "uploadnotaccessible": JobErrorCodeUploadNotAccessible, - "uploadtransienterror": JobErrorCodeUploadTransientError, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := JobErrorCode(input) - return &out, nil -} - -type JobRetry string - -const ( - JobRetryDoNotRetry JobRetry = "DoNotRetry" - JobRetryMayRetry JobRetry = "MayRetry" -) - -func PossibleValuesForJobRetry() []string { - return []string{ - string(JobRetryDoNotRetry), - string(JobRetryMayRetry), - } -} - -func (s *JobRetry) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseJobRetry(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseJobRetry(input string) (*JobRetry, error) { - vals := map[string]JobRetry{ - "donotretry": JobRetryDoNotRetry, - "mayretry": JobRetryMayRetry, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := JobRetry(input) - return &out, nil -} - -type JobState string - -const ( - JobStateCanceled JobState = "Canceled" - JobStateCanceling JobState = "Canceling" - JobStateError JobState = "Error" - JobStateFinished JobState = "Finished" - JobStateProcessing JobState = "Processing" - JobStateQueued JobState = "Queued" - JobStateScheduled JobState = "Scheduled" -) - -func PossibleValuesForJobState() []string { - return []string{ - string(JobStateCanceled), - string(JobStateCanceling), - string(JobStateError), - string(JobStateFinished), - string(JobStateProcessing), - string(JobStateQueued), - string(JobStateScheduled), - } -} - -func (s *JobState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseJobState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseJobState(input string) (*JobState, error) { - vals := map[string]JobState{ - "canceled": JobStateCanceled, - "canceling": JobStateCanceling, - "error": JobStateError, - "finished": JobStateFinished, - "processing": JobStateProcessing, - "queued": JobStateQueued, - "scheduled": JobStateScheduled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := JobState(input) - return &out, nil -} - -type OnErrorType string - -const ( - OnErrorTypeContinueJob OnErrorType = "ContinueJob" - OnErrorTypeStopProcessingJob OnErrorType = "StopProcessingJob" -) - -func PossibleValuesForOnErrorType() []string { - return []string{ - string(OnErrorTypeContinueJob), - string(OnErrorTypeStopProcessingJob), - } -} - -func (s *OnErrorType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOnErrorType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOnErrorType(input string) (*OnErrorType, error) { - vals := map[string]OnErrorType{ - "continuejob": OnErrorTypeContinueJob, - "stopprocessingjob": OnErrorTypeStopProcessingJob, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OnErrorType(input) - return &out, nil -} - -type Priority string - -const ( - PriorityHigh Priority = "High" - PriorityLow Priority = "Low" - PriorityNormal Priority = "Normal" -) - -func PossibleValuesForPriority() []string { - return []string{ - string(PriorityHigh), - string(PriorityLow), - string(PriorityNormal), - } -} - -func (s *Priority) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePriority(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePriority(input string) (*Priority, error) { - vals := map[string]Priority{ - "high": PriorityHigh, - "low": PriorityLow, - "normal": PriorityNormal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Priority(input) - return &out, nil -} - -type Rotation string - -const ( - RotationAuto Rotation = "Auto" - RotationNone Rotation = "None" - RotationRotateNineZero Rotation = "Rotate90" - RotationRotateOneEightZero Rotation = "Rotate180" - RotationRotateTwoSevenZero Rotation = "Rotate270" - RotationRotateZero Rotation = "Rotate0" -) - -func PossibleValuesForRotation() []string { - return []string{ - string(RotationAuto), - string(RotationNone), - string(RotationRotateNineZero), - string(RotationRotateOneEightZero), - string(RotationRotateTwoSevenZero), - string(RotationRotateZero), - } -} - -func (s *Rotation) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRotation(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRotation(input string) (*Rotation, error) { - vals := map[string]Rotation{ - "auto": RotationAuto, - "none": RotationNone, - "rotate90": RotationRotateNineZero, - "rotate180": RotationRotateOneEightZero, - "rotate270": RotationRotateTwoSevenZero, - "rotate0": RotationRotateZero, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Rotation(input) - return &out, nil -} - -type StretchMode string - -const ( - StretchModeAutoFit StretchMode = "AutoFit" - StretchModeAutoSize StretchMode = "AutoSize" - StretchModeNone StretchMode = "None" -) - -func PossibleValuesForStretchMode() []string { - return []string{ - string(StretchModeAutoFit), - string(StretchModeAutoSize), - string(StretchModeNone), - } -} - -func (s *StretchMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseStretchMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseStretchMode(input string) (*StretchMode, error) { - vals := map[string]StretchMode{ - "autofit": StretchModeAutoFit, - "autosize": StretchModeAutoSize, - "none": StretchModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StretchMode(input) - return &out, nil -} - -type TrackAttribute string - -const ( - TrackAttributeBitrate TrackAttribute = "Bitrate" - TrackAttributeLanguage TrackAttribute = "Language" -) - -func PossibleValuesForTrackAttribute() []string { - return []string{ - string(TrackAttributeBitrate), - string(TrackAttributeLanguage), - } -} - -func (s *TrackAttribute) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTrackAttribute(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTrackAttribute(input string) (*TrackAttribute, error) { - vals := map[string]TrackAttribute{ - "bitrate": TrackAttributeBitrate, - "language": TrackAttributeLanguage, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TrackAttribute(input) - return &out, nil -} - -type VideoSyncMode string - -const ( - VideoSyncModeAuto VideoSyncMode = "Auto" - VideoSyncModeCfr VideoSyncMode = "Cfr" - VideoSyncModePassthrough VideoSyncMode = "Passthrough" - VideoSyncModeVfr VideoSyncMode = "Vfr" -) - -func PossibleValuesForVideoSyncMode() []string { - return []string{ - string(VideoSyncModeAuto), - string(VideoSyncModeCfr), - string(VideoSyncModePassthrough), - string(VideoSyncModeVfr), - } -} - -func (s *VideoSyncMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVideoSyncMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVideoSyncMode(input string) (*VideoSyncMode, error) { - vals := map[string]VideoSyncMode{ - "auto": VideoSyncModeAuto, - "cfr": VideoSyncModeCfr, - "passthrough": VideoSyncModePassthrough, - "vfr": VideoSyncModeVfr, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VideoSyncMode(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/id_job.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/id_job.go deleted file mode 100644 index 5530931f0fdd1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/id_job.go +++ /dev/null @@ -1,148 +0,0 @@ -package encodings - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&JobId{}) -} - -var _ resourceids.ResourceId = &JobId{} - -// JobId is a struct representing the Resource ID for a Job -type JobId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - TransformName string - JobName string -} - -// NewJobID returns a new JobId struct -func NewJobID(subscriptionId string, resourceGroupName string, mediaServiceName string, transformName string, jobName string) JobId { - return JobId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - TransformName: transformName, - JobName: jobName, - } -} - -// ParseJobID parses 'input' into a JobId -func ParseJobID(input string) (*JobId, error) { - parser := resourceids.NewParserFromResourceIdType(&JobId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseJobIDInsensitively parses 'input' case-insensitively into a JobId -// note: this method should only be used for API response data and not user input -func ParseJobIDInsensitively(input string) (*JobId, error) { - parser := resourceids.NewParserFromResourceIdType(&JobId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *JobId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.TransformName, ok = input.Parsed["transformName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "transformName", input) - } - - if id.JobName, ok = input.Parsed["jobName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "jobName", input) - } - - return nil -} - -// ValidateJobID checks that 'input' can be parsed as a Job ID -func ValidateJobID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseJobID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Job ID -func (id JobId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/transforms/%s/jobs/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.TransformName, id.JobName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Job ID -func (id JobId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticTransforms", "transforms", "transforms"), - resourceids.UserSpecifiedSegment("transformName", "transformValue"), - resourceids.StaticSegment("staticJobs", "jobs", "jobs"), - resourceids.UserSpecifiedSegment("jobName", "jobValue"), - } -} - -// String returns a human-readable description of this Job ID -func (id JobId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Transform Name: %q", id.TransformName), - fmt.Sprintf("Job Name: %q", id.JobName), - } - return fmt.Sprintf("Job (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/id_mediaservice.go deleted file mode 100644 index 2b78d8406def1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/id_mediaservice.go +++ /dev/null @@ -1,130 +0,0 @@ -package encodings - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&MediaServiceId{}) -} - -var _ resourceids.ResourceId = &MediaServiceId{} - -// MediaServiceId is a struct representing the Resource ID for a Media Service -type MediaServiceId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string -} - -// NewMediaServiceID returns a new MediaServiceId struct -func NewMediaServiceID(subscriptionId string, resourceGroupName string, mediaServiceName string) MediaServiceId { - return MediaServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - } -} - -// ParseMediaServiceID parses 'input' into a MediaServiceId -func ParseMediaServiceID(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseMediaServiceIDInsensitively parses 'input' case-insensitively into a MediaServiceId -// note: this method should only be used for API response data and not user input -func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *MediaServiceId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - return nil -} - -// ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID -func ValidateMediaServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMediaServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Media Service ID -func (id MediaServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Media Service ID -func (id MediaServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - } -} - -// String returns a human-readable description of this Media Service ID -func (id MediaServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - } - return fmt.Sprintf("Media Service (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/id_transform.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/id_transform.go deleted file mode 100644 index 21098483a3c9c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/id_transform.go +++ /dev/null @@ -1,139 +0,0 @@ -package encodings - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&TransformId{}) -} - -var _ resourceids.ResourceId = &TransformId{} - -// TransformId is a struct representing the Resource ID for a Transform -type TransformId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - TransformName string -} - -// NewTransformID returns a new TransformId struct -func NewTransformID(subscriptionId string, resourceGroupName string, mediaServiceName string, transformName string) TransformId { - return TransformId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - TransformName: transformName, - } -} - -// ParseTransformID parses 'input' into a TransformId -func ParseTransformID(input string) (*TransformId, error) { - parser := resourceids.NewParserFromResourceIdType(&TransformId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := TransformId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseTransformIDInsensitively parses 'input' case-insensitively into a TransformId -// note: this method should only be used for API response data and not user input -func ParseTransformIDInsensitively(input string) (*TransformId, error) { - parser := resourceids.NewParserFromResourceIdType(&TransformId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := TransformId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *TransformId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.TransformName, ok = input.Parsed["transformName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "transformName", input) - } - - return nil -} - -// ValidateTransformID checks that 'input' can be parsed as a Transform ID -func ValidateTransformID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseTransformID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Transform ID -func (id TransformId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/transforms/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.TransformName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Transform ID -func (id TransformId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticTransforms", "transforms", "transforms"), - resourceids.UserSpecifiedSegment("transformName", "transformValue"), - } -} - -// String returns a human-readable description of this Transform ID -func (id TransformId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Transform Name: %q", id.TransformName), - } - return fmt.Sprintf("Transform (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_jobscanceljob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_jobscanceljob.go deleted file mode 100644 index 7f31dac59ea70..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_jobscanceljob.go +++ /dev/null @@ -1,47 +0,0 @@ -package encodings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobsCancelJobOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// JobsCancelJob ... -func (c EncodingsClient) JobsCancelJob(ctx context.Context, id JobId) (result JobsCancelJobOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/cancelJob", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_jobscreate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_jobscreate.go deleted file mode 100644 index 82eb14dd50e4e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_jobscreate.go +++ /dev/null @@ -1,58 +0,0 @@ -package encodings - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobsCreateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Job -} - -// JobsCreate ... -func (c EncodingsClient) JobsCreate(ctx context.Context, id JobId, input Job) (result JobsCreateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Job - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_jobsdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_jobsdelete.go deleted file mode 100644 index bb5025fef4ef2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_jobsdelete.go +++ /dev/null @@ -1,47 +0,0 @@ -package encodings - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobsDeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// JobsDelete ... -func (c EncodingsClient) JobsDelete(ctx context.Context, id JobId) (result JobsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_jobsget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_jobsget.go deleted file mode 100644 index 6788a17b01950..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_jobsget.go +++ /dev/null @@ -1,54 +0,0 @@ -package encodings - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Job -} - -// JobsGet ... -func (c EncodingsClient) JobsGet(ctx context.Context, id JobId) (result JobsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Job - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_jobslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_jobslist.go deleted file mode 100644 index e0aea11250a83..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_jobslist.go +++ /dev/null @@ -1,137 +0,0 @@ -package encodings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]Job -} - -type JobsListCompleteResult struct { - LatestHttpResponse *http.Response - Items []Job -} - -type JobsListOperationOptions struct { - Filter *string - Orderby *string -} - -func DefaultJobsListOperationOptions() JobsListOperationOptions { - return JobsListOperationOptions{} -} - -func (o JobsListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o JobsListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o JobsListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Filter != nil { - out.Append("$filter", fmt.Sprintf("%v", *o.Filter)) - } - if o.Orderby != nil { - out.Append("$orderby", fmt.Sprintf("%v", *o.Orderby)) - } - return &out -} - -type JobsListCustomPager struct { - NextLink *odata.Link `json:"@odata.nextLink"` -} - -func (p *JobsListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// JobsList ... -func (c EncodingsClient) JobsList(ctx context.Context, id TransformId, options JobsListOperationOptions) (result JobsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - OptionsObject: options, - Pager: &JobsListCustomPager{}, - Path: fmt.Sprintf("%s/jobs", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]Job `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// JobsListComplete retrieves all the results into a single object -func (c EncodingsClient) JobsListComplete(ctx context.Context, id TransformId, options JobsListOperationOptions) (JobsListCompleteResult, error) { - return c.JobsListCompleteMatchingPredicate(ctx, id, options, JobOperationPredicate{}) -} - -// JobsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c EncodingsClient) JobsListCompleteMatchingPredicate(ctx context.Context, id TransformId, options JobsListOperationOptions, predicate JobOperationPredicate) (result JobsListCompleteResult, err error) { - items := make([]Job, 0) - - resp, err := c.JobsList(ctx, id, options) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = JobsListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_jobsupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_jobsupdate.go deleted file mode 100644 index c78187ef7ca40..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_jobsupdate.go +++ /dev/null @@ -1,58 +0,0 @@ -package encodings - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobsUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Job -} - -// JobsUpdate ... -func (c EncodingsClient) JobsUpdate(ctx context.Context, id JobId, input Job) (result JobsUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Job - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_transformscreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_transformscreateorupdate.go deleted file mode 100644 index 407d4c82052e1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_transformscreateorupdate.go +++ /dev/null @@ -1,59 +0,0 @@ -package encodings - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TransformsCreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Transform -} - -// TransformsCreateOrUpdate ... -func (c EncodingsClient) TransformsCreateOrUpdate(ctx context.Context, id TransformId, input Transform) (result TransformsCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Transform - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_transformsdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_transformsdelete.go deleted file mode 100644 index 8ff7a8d9fafd6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_transformsdelete.go +++ /dev/null @@ -1,47 +0,0 @@ -package encodings - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TransformsDeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// TransformsDelete ... -func (c EncodingsClient) TransformsDelete(ctx context.Context, id TransformId) (result TransformsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_transformsget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_transformsget.go deleted file mode 100644 index fce05d25773c6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_transformsget.go +++ /dev/null @@ -1,54 +0,0 @@ -package encodings - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TransformsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Transform -} - -// TransformsGet ... -func (c EncodingsClient) TransformsGet(ctx context.Context, id TransformId) (result TransformsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Transform - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_transformslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_transformslist.go deleted file mode 100644 index 46d8bd251cedf..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_transformslist.go +++ /dev/null @@ -1,137 +0,0 @@ -package encodings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TransformsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]Transform -} - -type TransformsListCompleteResult struct { - LatestHttpResponse *http.Response - Items []Transform -} - -type TransformsListOperationOptions struct { - Filter *string - Orderby *string -} - -func DefaultTransformsListOperationOptions() TransformsListOperationOptions { - return TransformsListOperationOptions{} -} - -func (o TransformsListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o TransformsListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o TransformsListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Filter != nil { - out.Append("$filter", fmt.Sprintf("%v", *o.Filter)) - } - if o.Orderby != nil { - out.Append("$orderby", fmt.Sprintf("%v", *o.Orderby)) - } - return &out -} - -type TransformsListCustomPager struct { - NextLink *odata.Link `json:"@odata.nextLink"` -} - -func (p *TransformsListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// TransformsList ... -func (c EncodingsClient) TransformsList(ctx context.Context, id MediaServiceId, options TransformsListOperationOptions) (result TransformsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - OptionsObject: options, - Pager: &TransformsListCustomPager{}, - Path: fmt.Sprintf("%s/transforms", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]Transform `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// TransformsListComplete retrieves all the results into a single object -func (c EncodingsClient) TransformsListComplete(ctx context.Context, id MediaServiceId, options TransformsListOperationOptions) (TransformsListCompleteResult, error) { - return c.TransformsListCompleteMatchingPredicate(ctx, id, options, TransformOperationPredicate{}) -} - -// TransformsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c EncodingsClient) TransformsListCompleteMatchingPredicate(ctx context.Context, id MediaServiceId, options TransformsListOperationOptions, predicate TransformOperationPredicate) (result TransformsListCompleteResult, err error) { - items := make([]Transform, 0) - - resp, err := c.TransformsList(ctx, id, options) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = TransformsListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_transformsupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_transformsupdate.go deleted file mode 100644 index 05a8b19d20091..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/method_transformsupdate.go +++ /dev/null @@ -1,58 +0,0 @@ -package encodings - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TransformsUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Transform -} - -// TransformsUpdate ... -func (c EncodingsClient) TransformsUpdate(ctx context.Context, id TransformId, input Transform) (result TransformsUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Transform - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_aacaudio.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_aacaudio.go deleted file mode 100644 index 067403385aedd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_aacaudio.go +++ /dev/null @@ -1,45 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = AacAudio{} - -type AacAudio struct { - Bitrate *int64 `json:"bitrate,omitempty"` - Channels *int64 `json:"channels,omitempty"` - Profile *AacAudioProfile `json:"profile,omitempty"` - SamplingRate *int64 `json:"samplingRate,omitempty"` - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = AacAudio{} - -func (s AacAudio) MarshalJSON() ([]byte, error) { - type wrapper AacAudio - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AacAudio: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AacAudio: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.AacAudio" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AacAudio: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_absolutecliptime.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_absolutecliptime.go deleted file mode 100644 index e1e8cedcd10b5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_absolutecliptime.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClipTime = AbsoluteClipTime{} - -type AbsoluteClipTime struct { - Time string `json:"time"` - - // Fields inherited from ClipTime -} - -var _ json.Marshaler = AbsoluteClipTime{} - -func (s AbsoluteClipTime) MarshalJSON() ([]byte, error) { - type wrapper AbsoluteClipTime - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AbsoluteClipTime: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AbsoluteClipTime: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.AbsoluteClipTime" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AbsoluteClipTime: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_audio.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_audio.go deleted file mode 100644 index a2007b0056c5f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_audio.go +++ /dev/null @@ -1,44 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = Audio{} - -type Audio struct { - Bitrate *int64 `json:"bitrate,omitempty"` - Channels *int64 `json:"channels,omitempty"` - SamplingRate *int64 `json:"samplingRate,omitempty"` - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = Audio{} - -func (s Audio) MarshalJSON() ([]byte, error) { - type wrapper Audio - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling Audio: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling Audio: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.Audio" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling Audio: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_audioanalyzerpreset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_audioanalyzerpreset.go deleted file mode 100644 index 45a7be9a1c1ed..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_audioanalyzerpreset.go +++ /dev/null @@ -1,43 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Preset = AudioAnalyzerPreset{} - -type AudioAnalyzerPreset struct { - AudioLanguage *string `json:"audioLanguage,omitempty"` - ExperimentalOptions *map[string]string `json:"experimentalOptions,omitempty"` - Mode *AudioAnalysisMode `json:"mode,omitempty"` - - // Fields inherited from Preset -} - -var _ json.Marshaler = AudioAnalyzerPreset{} - -func (s AudioAnalyzerPreset) MarshalJSON() ([]byte, error) { - type wrapper AudioAnalyzerPreset - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AudioAnalyzerPreset: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AudioAnalyzerPreset: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.AudioAnalyzerPreset" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AudioAnalyzerPreset: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_audiooverlay.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_audiooverlay.go deleted file mode 100644 index 3d21e6aeb1718..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_audiooverlay.go +++ /dev/null @@ -1,46 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Overlay = AudioOverlay{} - -type AudioOverlay struct { - - // Fields inherited from Overlay - AudioGainLevel *float64 `json:"audioGainLevel,omitempty"` - End *string `json:"end,omitempty"` - FadeInDuration *string `json:"fadeInDuration,omitempty"` - FadeOutDuration *string `json:"fadeOutDuration,omitempty"` - InputLabel string `json:"inputLabel"` - Start *string `json:"start,omitempty"` -} - -var _ json.Marshaler = AudioOverlay{} - -func (s AudioOverlay) MarshalJSON() ([]byte, error) { - type wrapper AudioOverlay - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AudioOverlay: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AudioOverlay: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.AudioOverlay" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AudioOverlay: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_audiotrackdescriptor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_audiotrackdescriptor.go deleted file mode 100644 index 81990a6d7d234..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_audiotrackdescriptor.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ TrackDescriptor = AudioTrackDescriptor{} - -type AudioTrackDescriptor struct { - ChannelMapping *ChannelMapping `json:"channelMapping,omitempty"` - - // Fields inherited from TrackDescriptor -} - -var _ json.Marshaler = AudioTrackDescriptor{} - -func (s AudioTrackDescriptor) MarshalJSON() ([]byte, error) { - type wrapper AudioTrackDescriptor - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AudioTrackDescriptor: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AudioTrackDescriptor: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.AudioTrackDescriptor" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AudioTrackDescriptor: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_builtinstandardencoderpreset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_builtinstandardencoderpreset.go deleted file mode 100644 index a11bfb0f219ae..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_builtinstandardencoderpreset.go +++ /dev/null @@ -1,42 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Preset = BuiltInStandardEncoderPreset{} - -type BuiltInStandardEncoderPreset struct { - Configurations *PresetConfigurations `json:"configurations,omitempty"` - PresetName EncoderNamedPreset `json:"presetName"` - - // Fields inherited from Preset -} - -var _ json.Marshaler = BuiltInStandardEncoderPreset{} - -func (s BuiltInStandardEncoderPreset) MarshalJSON() ([]byte, error) { - type wrapper BuiltInStandardEncoderPreset - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling BuiltInStandardEncoderPreset: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling BuiltInStandardEncoderPreset: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.BuiltInStandardEncoderPreset" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling BuiltInStandardEncoderPreset: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_cliptime.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_cliptime.go deleted file mode 100644 index d57cf10337b4f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_cliptime.go +++ /dev/null @@ -1,61 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClipTime interface { -} - -// RawClipTimeImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawClipTimeImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalClipTimeImplementation(input []byte) (ClipTime, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ClipTime into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.AbsoluteClipTime") { - var out AbsoluteClipTime - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AbsoluteClipTime: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.UtcClipTime") { - var out UtcClipTime - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into UtcClipTime: %+v", err) - } - return out, nil - } - - out := RawClipTimeImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_codec.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_codec.go deleted file mode 100644 index dac8228b1d03a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_codec.go +++ /dev/null @@ -1,133 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Codec interface { -} - -// RawCodecImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawCodecImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalCodecImplementation(input []byte) (Codec, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling Codec into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.AacAudio") { - var out AacAudio - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AacAudio: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.Audio") { - var out Audio - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into Audio: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.CopyAudio") { - var out CopyAudio - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into CopyAudio: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.CopyVideo") { - var out CopyVideo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into CopyVideo: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.DDAudio") { - var out DDAudio - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into DDAudio: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.H264Video") { - var out H264Video - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into H264Video: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.H265Video") { - var out H265Video - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into H265Video: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.Image") { - var out Image - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into Image: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.JpgImage") { - var out JpgImage - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into JpgImage: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.PngImage") { - var out PngImage - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into PngImage: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.Video") { - var out Video - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into Video: %+v", err) - } - return out, nil - } - - out := RawCodecImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_copyaudio.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_copyaudio.go deleted file mode 100644 index 5d1be89597ee1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_copyaudio.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = CopyAudio{} - -type CopyAudio struct { - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = CopyAudio{} - -func (s CopyAudio) MarshalJSON() ([]byte, error) { - type wrapper CopyAudio - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling CopyAudio: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling CopyAudio: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.CopyAudio" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling CopyAudio: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_copyvideo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_copyvideo.go deleted file mode 100644 index 5f663b6d2bfe1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_copyvideo.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = CopyVideo{} - -type CopyVideo struct { - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = CopyVideo{} - -func (s CopyVideo) MarshalJSON() ([]byte, error) { - type wrapper CopyVideo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling CopyVideo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling CopyVideo: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.CopyVideo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling CopyVideo: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_ddaudio.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_ddaudio.go deleted file mode 100644 index aac613abee847..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_ddaudio.go +++ /dev/null @@ -1,44 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = DDAudio{} - -type DDAudio struct { - Bitrate *int64 `json:"bitrate,omitempty"` - Channels *int64 `json:"channels,omitempty"` - SamplingRate *int64 `json:"samplingRate,omitempty"` - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = DDAudio{} - -func (s DDAudio) MarshalJSON() ([]byte, error) { - type wrapper DDAudio - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling DDAudio: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling DDAudio: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.DDAudio" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling DDAudio: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_deinterlace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_deinterlace.go deleted file mode 100644 index e32750ed4a714..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_deinterlace.go +++ /dev/null @@ -1,9 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Deinterlace struct { - Mode *DeinterlaceMode `json:"mode,omitempty"` - Parity *DeinterlaceParity `json:"parity,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_facedetectorpreset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_facedetectorpreset.go deleted file mode 100644 index b6b9b66de46cc..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_facedetectorpreset.go +++ /dev/null @@ -1,44 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Preset = FaceDetectorPreset{} - -type FaceDetectorPreset struct { - BlurType *BlurType `json:"blurType,omitempty"` - ExperimentalOptions *map[string]string `json:"experimentalOptions,omitempty"` - Mode *FaceRedactorMode `json:"mode,omitempty"` - Resolution *AnalysisResolution `json:"resolution,omitempty"` - - // Fields inherited from Preset -} - -var _ json.Marshaler = FaceDetectorPreset{} - -func (s FaceDetectorPreset) MarshalJSON() ([]byte, error) { - type wrapper FaceDetectorPreset - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling FaceDetectorPreset: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling FaceDetectorPreset: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.FaceDetectorPreset" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling FaceDetectorPreset: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_fade.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_fade.go deleted file mode 100644 index 9108869895d03..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_fade.go +++ /dev/null @@ -1,10 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Fade struct { - Duration string `json:"duration"` - FadeColor string `json:"fadeColor"` - Start *string `json:"start,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_filters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_filters.go deleted file mode 100644 index fb55f7a8267eb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_filters.go +++ /dev/null @@ -1,57 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Filters struct { - Crop *Rectangle `json:"crop,omitempty"` - Deinterlace *Deinterlace `json:"deinterlace,omitempty"` - FadeIn *Fade `json:"fadeIn,omitempty"` - FadeOut *Fade `json:"fadeOut,omitempty"` - Overlays *[]Overlay `json:"overlays,omitempty"` - Rotation *Rotation `json:"rotation,omitempty"` -} - -var _ json.Unmarshaler = &Filters{} - -func (s *Filters) UnmarshalJSON(bytes []byte) error { - type alias Filters - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into Filters: %+v", err) - } - - s.Crop = decoded.Crop - s.Deinterlace = decoded.Deinterlace - s.FadeIn = decoded.FadeIn - s.FadeOut = decoded.FadeOut - s.Rotation = decoded.Rotation - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling Filters into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["overlays"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Overlays into list []json.RawMessage: %+v", err) - } - - output := make([]Overlay, 0) - for i, val := range listTemp { - impl, err := unmarshalOverlayImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Overlays' for 'Filters': %+v", i, err) - } - output = append(output, impl) - } - s.Overlays = &output - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_format.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_format.go deleted file mode 100644 index 65f94ae3b899d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_format.go +++ /dev/null @@ -1,93 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Format interface { -} - -// RawFormatImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawFormatImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalFormatImplementation(input []byte) (Format, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling Format into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ImageFormat") { - var out ImageFormat - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ImageFormat: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.JpgFormat") { - var out JpgFormat - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into JpgFormat: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.Mp4Format") { - var out Mp4Format - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into Mp4Format: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.MultiBitrateFormat") { - var out MultiBitrateFormat - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MultiBitrateFormat: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.PngFormat") { - var out PngFormat - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into PngFormat: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.TransportStreamFormat") { - var out TransportStreamFormat - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into TransportStreamFormat: %+v", err) - } - return out, nil - } - - out := RawFormatImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_fromallinputfile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_fromallinputfile.go deleted file mode 100644 index c1a7d3860e4b9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_fromallinputfile.go +++ /dev/null @@ -1,69 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ InputDefinition = FromAllInputFile{} - -type FromAllInputFile struct { - - // Fields inherited from InputDefinition - IncludedTracks *[]TrackDescriptor `json:"includedTracks,omitempty"` -} - -var _ json.Marshaler = FromAllInputFile{} - -func (s FromAllInputFile) MarshalJSON() ([]byte, error) { - type wrapper FromAllInputFile - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling FromAllInputFile: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling FromAllInputFile: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.FromAllInputFile" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling FromAllInputFile: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &FromAllInputFile{} - -func (s *FromAllInputFile) UnmarshalJSON(bytes []byte) error { - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling FromAllInputFile into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["includedTracks"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling IncludedTracks into list []json.RawMessage: %+v", err) - } - - output := make([]TrackDescriptor, 0) - for i, val := range listTemp { - impl, err := unmarshalTrackDescriptorImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'IncludedTracks' for 'FromAllInputFile': %+v", i, err) - } - output = append(output, impl) - } - s.IncludedTracks = &output - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_fromeachinputfile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_fromeachinputfile.go deleted file mode 100644 index 02137a86e8ad0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_fromeachinputfile.go +++ /dev/null @@ -1,69 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ InputDefinition = FromEachInputFile{} - -type FromEachInputFile struct { - - // Fields inherited from InputDefinition - IncludedTracks *[]TrackDescriptor `json:"includedTracks,omitempty"` -} - -var _ json.Marshaler = FromEachInputFile{} - -func (s FromEachInputFile) MarshalJSON() ([]byte, error) { - type wrapper FromEachInputFile - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling FromEachInputFile: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling FromEachInputFile: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.FromEachInputFile" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling FromEachInputFile: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &FromEachInputFile{} - -func (s *FromEachInputFile) UnmarshalJSON(bytes []byte) error { - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling FromEachInputFile into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["includedTracks"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling IncludedTracks into list []json.RawMessage: %+v", err) - } - - output := make([]TrackDescriptor, 0) - for i, val := range listTemp { - impl, err := unmarshalTrackDescriptorImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'IncludedTracks' for 'FromEachInputFile': %+v", i, err) - } - output = append(output, impl) - } - s.IncludedTracks = &output - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_h264layer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_h264layer.go deleted file mode 100644 index 6320f6b1b413e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_h264layer.go +++ /dev/null @@ -1,22 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type H264Layer struct { - AdaptiveBFrame *bool `json:"adaptiveBFrame,omitempty"` - BFrames *int64 `json:"bFrames,omitempty"` - Bitrate int64 `json:"bitrate"` - BufferWindow *string `json:"bufferWindow,omitempty"` - Crf *float64 `json:"crf,omitempty"` - EntropyMode *EntropyMode `json:"entropyMode,omitempty"` - FrameRate *string `json:"frameRate,omitempty"` - Height *string `json:"height,omitempty"` - Label *string `json:"label,omitempty"` - Level *string `json:"level,omitempty"` - MaxBitrate *int64 `json:"maxBitrate,omitempty"` - Profile *H264VideoProfile `json:"profile,omitempty"` - ReferenceFrames *int64 `json:"referenceFrames,omitempty"` - Slices *int64 `json:"slices,omitempty"` - Width *string `json:"width,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_h264video.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_h264video.go deleted file mode 100644 index fbcd311e539ce..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_h264video.go +++ /dev/null @@ -1,48 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = H264Video{} - -type H264Video struct { - Complexity *H264Complexity `json:"complexity,omitempty"` - KeyFrameInterval *string `json:"keyFrameInterval,omitempty"` - Layers *[]H264Layer `json:"layers,omitempty"` - RateControlMode *H264RateControlMode `json:"rateControlMode,omitempty"` - SceneChangeDetection *bool `json:"sceneChangeDetection,omitempty"` - StretchMode *StretchMode `json:"stretchMode,omitempty"` - SyncMode *VideoSyncMode `json:"syncMode,omitempty"` - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = H264Video{} - -func (s H264Video) MarshalJSON() ([]byte, error) { - type wrapper H264Video - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling H264Video: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling H264Video: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.H264Video" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling H264Video: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_h265layer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_h265layer.go deleted file mode 100644 index 1580e51ffcabb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_h265layer.go +++ /dev/null @@ -1,21 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type H265Layer struct { - AdaptiveBFrame *bool `json:"adaptiveBFrame,omitempty"` - BFrames *int64 `json:"bFrames,omitempty"` - Bitrate int64 `json:"bitrate"` - BufferWindow *string `json:"bufferWindow,omitempty"` - Crf *float64 `json:"crf,omitempty"` - FrameRate *string `json:"frameRate,omitempty"` - Height *string `json:"height,omitempty"` - Label *string `json:"label,omitempty"` - Level *string `json:"level,omitempty"` - MaxBitrate *int64 `json:"maxBitrate,omitempty"` - Profile *H265VideoProfile `json:"profile,omitempty"` - ReferenceFrames *int64 `json:"referenceFrames,omitempty"` - Slices *int64 `json:"slices,omitempty"` - Width *string `json:"width,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_h265video.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_h265video.go deleted file mode 100644 index 9edadac194a27..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_h265video.go +++ /dev/null @@ -1,47 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = H265Video{} - -type H265Video struct { - Complexity *H265Complexity `json:"complexity,omitempty"` - KeyFrameInterval *string `json:"keyFrameInterval,omitempty"` - Layers *[]H265Layer `json:"layers,omitempty"` - SceneChangeDetection *bool `json:"sceneChangeDetection,omitempty"` - StretchMode *StretchMode `json:"stretchMode,omitempty"` - SyncMode *VideoSyncMode `json:"syncMode,omitempty"` - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = H265Video{} - -func (s H265Video) MarshalJSON() ([]byte, error) { - type wrapper H265Video - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling H265Video: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling H265Video: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.H265Video" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling H265Video: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_image.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_image.go deleted file mode 100644 index 072a1a7537e0b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_image.go +++ /dev/null @@ -1,47 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = Image{} - -type Image struct { - KeyFrameInterval *string `json:"keyFrameInterval,omitempty"` - Range *string `json:"range,omitempty"` - Start string `json:"start"` - Step *string `json:"step,omitempty"` - StretchMode *StretchMode `json:"stretchMode,omitempty"` - SyncMode *VideoSyncMode `json:"syncMode,omitempty"` - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = Image{} - -func (s Image) MarshalJSON() ([]byte, error) { - type wrapper Image - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling Image: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling Image: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.Image" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling Image: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_imageformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_imageformat.go deleted file mode 100644 index 0e390a0c6f37c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_imageformat.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Format = ImageFormat{} - -type ImageFormat struct { - - // Fields inherited from Format - FilenamePattern string `json:"filenamePattern"` -} - -var _ json.Marshaler = ImageFormat{} - -func (s ImageFormat) MarshalJSON() ([]byte, error) { - type wrapper ImageFormat - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ImageFormat: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ImageFormat: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ImageFormat" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ImageFormat: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_inputdefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_inputdefinition.go deleted file mode 100644 index 04e0c4c26ba10..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_inputdefinition.go +++ /dev/null @@ -1,69 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InputDefinition interface { -} - -// RawInputDefinitionImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawInputDefinitionImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalInputDefinitionImplementation(input []byte) (InputDefinition, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling InputDefinition into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.FromAllInputFile") { - var out FromAllInputFile - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into FromAllInputFile: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.FromEachInputFile") { - var out FromEachInputFile - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into FromEachInputFile: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.InputFile") { - var out InputFile - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into InputFile: %+v", err) - } - return out, nil - } - - out := RawInputDefinitionImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_inputfile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_inputfile.go deleted file mode 100644 index 4c3f11b6d7f95..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_inputfile.go +++ /dev/null @@ -1,77 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ InputDefinition = InputFile{} - -type InputFile struct { - Filename *string `json:"filename,omitempty"` - - // Fields inherited from InputDefinition - IncludedTracks *[]TrackDescriptor `json:"includedTracks,omitempty"` -} - -var _ json.Marshaler = InputFile{} - -func (s InputFile) MarshalJSON() ([]byte, error) { - type wrapper InputFile - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling InputFile: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling InputFile: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.InputFile" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling InputFile: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &InputFile{} - -func (s *InputFile) UnmarshalJSON(bytes []byte) error { - type alias InputFile - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into InputFile: %+v", err) - } - - s.Filename = decoded.Filename - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling InputFile into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["includedTracks"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling IncludedTracks into list []json.RawMessage: %+v", err) - } - - output := make([]TrackDescriptor, 0) - for i, val := range listTemp { - impl, err := unmarshalTrackDescriptorImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'IncludedTracks' for 'InputFile': %+v", i, err) - } - output = append(output, impl) - } - s.IncludedTracks = &output - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_job.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_job.go deleted file mode 100644 index db973712dda3e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_job.go +++ /dev/null @@ -1,16 +0,0 @@ -package encodings - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Job struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *JobProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_joberror.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_joberror.go deleted file mode 100644 index c14b785a690b0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_joberror.go +++ /dev/null @@ -1,12 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobError struct { - Category *JobErrorCategory `json:"category,omitempty"` - Code *JobErrorCode `json:"code,omitempty"` - Details *[]JobErrorDetail `json:"details,omitempty"` - Message *string `json:"message,omitempty"` - Retry *JobRetry `json:"retry,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_joberrordetail.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_joberrordetail.go deleted file mode 100644 index 80595e90276a7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_joberrordetail.go +++ /dev/null @@ -1,9 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobErrorDetail struct { - Code *string `json:"code,omitempty"` - Message *string `json:"message,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jobinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jobinput.go deleted file mode 100644 index e4d997151def6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jobinput.go +++ /dev/null @@ -1,85 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobInput interface { -} - -// RawJobInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawJobInputImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalJobInputImplementation(input []byte) (JobInput, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling JobInput into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.JobInputAsset") { - var out JobInputAsset - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into JobInputAsset: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.JobInputClip") { - var out JobInputClip - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into JobInputClip: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.JobInputHttp") { - var out JobInputHTTP - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into JobInputHTTP: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.JobInputSequence") { - var out JobInputSequence - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into JobInputSequence: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.JobInputs") { - var out JobInputs - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into JobInputs: %+v", err) - } - return out, nil - } - - out := RawJobInputImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jobinputasset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jobinputasset.go deleted file mode 100644 index 689f8282884ed..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jobinputasset.go +++ /dev/null @@ -1,99 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ JobInput = JobInputAsset{} - -type JobInputAsset struct { - AssetName string `json:"assetName"` - End ClipTime `json:"end"` - Files *[]string `json:"files,omitempty"` - InputDefinitions *[]InputDefinition `json:"inputDefinitions,omitempty"` - Label *string `json:"label,omitempty"` - Start ClipTime `json:"start"` - - // Fields inherited from JobInput -} - -var _ json.Marshaler = JobInputAsset{} - -func (s JobInputAsset) MarshalJSON() ([]byte, error) { - type wrapper JobInputAsset - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling JobInputAsset: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling JobInputAsset: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.JobInputAsset" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling JobInputAsset: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &JobInputAsset{} - -func (s *JobInputAsset) UnmarshalJSON(bytes []byte) error { - type alias JobInputAsset - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into JobInputAsset: %+v", err) - } - - s.AssetName = decoded.AssetName - s.Files = decoded.Files - s.Label = decoded.Label - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling JobInputAsset into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["end"]; ok { - impl, err := unmarshalClipTimeImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'End' for 'JobInputAsset': %+v", err) - } - s.End = impl - } - - if v, ok := temp["inputDefinitions"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling InputDefinitions into list []json.RawMessage: %+v", err) - } - - output := make([]InputDefinition, 0) - for i, val := range listTemp { - impl, err := unmarshalInputDefinitionImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'InputDefinitions' for 'JobInputAsset': %+v", i, err) - } - output = append(output, impl) - } - s.InputDefinitions = &output - } - - if v, ok := temp["start"]; ok { - impl, err := unmarshalClipTimeImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Start' for 'JobInputAsset': %+v", err) - } - s.Start = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jobinputclip.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jobinputclip.go deleted file mode 100644 index 5136c539d5b33..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jobinputclip.go +++ /dev/null @@ -1,97 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ JobInput = JobInputClip{} - -type JobInputClip struct { - End ClipTime `json:"end"` - Files *[]string `json:"files,omitempty"` - InputDefinitions *[]InputDefinition `json:"inputDefinitions,omitempty"` - Label *string `json:"label,omitempty"` - Start ClipTime `json:"start"` - - // Fields inherited from JobInput -} - -var _ json.Marshaler = JobInputClip{} - -func (s JobInputClip) MarshalJSON() ([]byte, error) { - type wrapper JobInputClip - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling JobInputClip: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling JobInputClip: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.JobInputClip" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling JobInputClip: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &JobInputClip{} - -func (s *JobInputClip) UnmarshalJSON(bytes []byte) error { - type alias JobInputClip - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into JobInputClip: %+v", err) - } - - s.Files = decoded.Files - s.Label = decoded.Label - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling JobInputClip into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["end"]; ok { - impl, err := unmarshalClipTimeImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'End' for 'JobInputClip': %+v", err) - } - s.End = impl - } - - if v, ok := temp["inputDefinitions"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling InputDefinitions into list []json.RawMessage: %+v", err) - } - - output := make([]InputDefinition, 0) - for i, val := range listTemp { - impl, err := unmarshalInputDefinitionImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'InputDefinitions' for 'JobInputClip': %+v", i, err) - } - output = append(output, impl) - } - s.InputDefinitions = &output - } - - if v, ok := temp["start"]; ok { - impl, err := unmarshalClipTimeImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Start' for 'JobInputClip': %+v", err) - } - s.Start = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jobinputhttp.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jobinputhttp.go deleted file mode 100644 index 57beddd3fde43..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jobinputhttp.go +++ /dev/null @@ -1,99 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ JobInput = JobInputHTTP{} - -type JobInputHTTP struct { - BaseUri *string `json:"baseUri,omitempty"` - End ClipTime `json:"end"` - Files *[]string `json:"files,omitempty"` - InputDefinitions *[]InputDefinition `json:"inputDefinitions,omitempty"` - Label *string `json:"label,omitempty"` - Start ClipTime `json:"start"` - - // Fields inherited from JobInput -} - -var _ json.Marshaler = JobInputHTTP{} - -func (s JobInputHTTP) MarshalJSON() ([]byte, error) { - type wrapper JobInputHTTP - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling JobInputHTTP: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling JobInputHTTP: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.JobInputHttp" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling JobInputHTTP: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &JobInputHTTP{} - -func (s *JobInputHTTP) UnmarshalJSON(bytes []byte) error { - type alias JobInputHTTP - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into JobInputHTTP: %+v", err) - } - - s.BaseUri = decoded.BaseUri - s.Files = decoded.Files - s.Label = decoded.Label - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling JobInputHTTP into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["end"]; ok { - impl, err := unmarshalClipTimeImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'End' for 'JobInputHTTP': %+v", err) - } - s.End = impl - } - - if v, ok := temp["inputDefinitions"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling InputDefinitions into list []json.RawMessage: %+v", err) - } - - output := make([]InputDefinition, 0) - for i, val := range listTemp { - impl, err := unmarshalInputDefinitionImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'InputDefinitions' for 'JobInputHTTP': %+v", i, err) - } - output = append(output, impl) - } - s.InputDefinitions = &output - } - - if v, ok := temp["start"]; ok { - impl, err := unmarshalClipTimeImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Start' for 'JobInputHTTP': %+v", err) - } - s.Start = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jobinputs.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jobinputs.go deleted file mode 100644 index b63a141b6e04d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jobinputs.go +++ /dev/null @@ -1,69 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ JobInput = JobInputs{} - -type JobInputs struct { - Inputs *[]JobInput `json:"inputs,omitempty"` - - // Fields inherited from JobInput -} - -var _ json.Marshaler = JobInputs{} - -func (s JobInputs) MarshalJSON() ([]byte, error) { - type wrapper JobInputs - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling JobInputs: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling JobInputs: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.JobInputs" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling JobInputs: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &JobInputs{} - -func (s *JobInputs) UnmarshalJSON(bytes []byte) error { - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling JobInputs into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["inputs"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Inputs into list []json.RawMessage: %+v", err) - } - - output := make([]JobInput, 0) - for i, val := range listTemp { - impl, err := unmarshalJobInputImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Inputs' for 'JobInputs': %+v", i, err) - } - output = append(output, impl) - } - s.Inputs = &output - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jobinputsequence.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jobinputsequence.go deleted file mode 100644 index 9c85a35b73003..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jobinputsequence.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ JobInput = JobInputSequence{} - -type JobInputSequence struct { - Inputs *[]JobInputClip `json:"inputs,omitempty"` - - // Fields inherited from JobInput -} - -var _ json.Marshaler = JobInputSequence{} - -func (s JobInputSequence) MarshalJSON() ([]byte, error) { - type wrapper JobInputSequence - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling JobInputSequence: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling JobInputSequence: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.JobInputSequence" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling JobInputSequence: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_joboutput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_joboutput.go deleted file mode 100644 index 6135f1282f5c7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_joboutput.go +++ /dev/null @@ -1,53 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobOutput interface { -} - -// RawJobOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawJobOutputImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalJobOutputImplementation(input []byte) (JobOutput, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling JobOutput into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.JobOutputAsset") { - var out JobOutputAsset - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into JobOutputAsset: %+v", err) - } - return out, nil - } - - out := RawJobOutputImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_joboutputasset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_joboutputasset.go deleted file mode 100644 index ed0aa4672cc3f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_joboutputasset.go +++ /dev/null @@ -1,107 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ JobOutput = JobOutputAsset{} - -type JobOutputAsset struct { - AssetName string `json:"assetName"` - - // Fields inherited from JobOutput - EndTime *string `json:"endTime,omitempty"` - Error *JobError `json:"error,omitempty"` - Label *string `json:"label,omitempty"` - PresetOverride Preset `json:"presetOverride"` - Progress *int64 `json:"progress,omitempty"` - StartTime *string `json:"startTime,omitempty"` - State *JobState `json:"state,omitempty"` -} - -func (o *JobOutputAsset) GetEndTimeAsTime() (*time.Time, error) { - if o.EndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *JobOutputAsset) SetEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndTime = &formatted -} - -func (o *JobOutputAsset) GetStartTimeAsTime() (*time.Time, error) { - if o.StartTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *JobOutputAsset) SetStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartTime = &formatted -} - -var _ json.Marshaler = JobOutputAsset{} - -func (s JobOutputAsset) MarshalJSON() ([]byte, error) { - type wrapper JobOutputAsset - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling JobOutputAsset: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling JobOutputAsset: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.JobOutputAsset" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling JobOutputAsset: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &JobOutputAsset{} - -func (s *JobOutputAsset) UnmarshalJSON(bytes []byte) error { - type alias JobOutputAsset - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into JobOutputAsset: %+v", err) - } - - s.AssetName = decoded.AssetName - s.EndTime = decoded.EndTime - s.Error = decoded.Error - s.Label = decoded.Label - s.Progress = decoded.Progress - s.StartTime = decoded.StartTime - s.State = decoded.State - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling JobOutputAsset into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["presetOverride"]; ok { - impl, err := unmarshalPresetImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'PresetOverride' for 'JobOutputAsset': %+v", err) - } - s.PresetOverride = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jobproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jobproperties.go deleted file mode 100644 index d1d9fcd58d521..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jobproperties.go +++ /dev/null @@ -1,123 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobProperties struct { - CorrelationData *map[string]string `json:"correlationData,omitempty"` - Created *string `json:"created,omitempty"` - Description *string `json:"description,omitempty"` - EndTime *string `json:"endTime,omitempty"` - Input JobInput `json:"input"` - LastModified *string `json:"lastModified,omitempty"` - Outputs []JobOutput `json:"outputs"` - Priority *Priority `json:"priority,omitempty"` - StartTime *string `json:"startTime,omitempty"` - State *JobState `json:"state,omitempty"` -} - -func (o *JobProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *JobProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *JobProperties) GetEndTimeAsTime() (*time.Time, error) { - if o.EndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *JobProperties) SetEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndTime = &formatted -} - -func (o *JobProperties) GetLastModifiedAsTime() (*time.Time, error) { - if o.LastModified == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModified, "2006-01-02T15:04:05Z07:00") -} - -func (o *JobProperties) SetLastModifiedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModified = &formatted -} - -func (o *JobProperties) GetStartTimeAsTime() (*time.Time, error) { - if o.StartTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *JobProperties) SetStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartTime = &formatted -} - -var _ json.Unmarshaler = &JobProperties{} - -func (s *JobProperties) UnmarshalJSON(bytes []byte) error { - type alias JobProperties - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into JobProperties: %+v", err) - } - - s.CorrelationData = decoded.CorrelationData - s.Created = decoded.Created - s.Description = decoded.Description - s.EndTime = decoded.EndTime - s.LastModified = decoded.LastModified - s.Priority = decoded.Priority - s.StartTime = decoded.StartTime - s.State = decoded.State - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling JobProperties into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["input"]; ok { - impl, err := unmarshalJobInputImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Input' for 'JobProperties': %+v", err) - } - s.Input = impl - } - - if v, ok := temp["outputs"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Outputs into list []json.RawMessage: %+v", err) - } - - output := make([]JobOutput, 0) - for i, val := range listTemp { - impl, err := unmarshalJobOutputImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Outputs' for 'JobProperties': %+v", i, err) - } - output = append(output, impl) - } - s.Outputs = output - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jpgformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jpgformat.go deleted file mode 100644 index de3e7aba6df37..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jpgformat.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Format = JpgFormat{} - -type JpgFormat struct { - - // Fields inherited from Format - FilenamePattern string `json:"filenamePattern"` -} - -var _ json.Marshaler = JpgFormat{} - -func (s JpgFormat) MarshalJSON() ([]byte, error) { - type wrapper JpgFormat - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling JpgFormat: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling JpgFormat: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.JpgFormat" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling JpgFormat: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jpgimage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jpgimage.go deleted file mode 100644 index 6f2adffacd3f9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jpgimage.go +++ /dev/null @@ -1,49 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = JpgImage{} - -type JpgImage struct { - KeyFrameInterval *string `json:"keyFrameInterval,omitempty"` - Layers *[]JpgLayer `json:"layers,omitempty"` - Range *string `json:"range,omitempty"` - SpriteColumn *int64 `json:"spriteColumn,omitempty"` - Start string `json:"start"` - Step *string `json:"step,omitempty"` - StretchMode *StretchMode `json:"stretchMode,omitempty"` - SyncMode *VideoSyncMode `json:"syncMode,omitempty"` - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = JpgImage{} - -func (s JpgImage) MarshalJSON() ([]byte, error) { - type wrapper JpgImage - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling JpgImage: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling JpgImage: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.JpgImage" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling JpgImage: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jpglayer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jpglayer.go deleted file mode 100644 index dfe576acd0d43..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_jpglayer.go +++ /dev/null @@ -1,11 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JpgLayer struct { - Height *string `json:"height,omitempty"` - Label *string `json:"label,omitempty"` - Quality *int64 `json:"quality,omitempty"` - Width *string `json:"width,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_layer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_layer.go deleted file mode 100644 index 81cb006bc1560..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_layer.go +++ /dev/null @@ -1,10 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Layer struct { - Height *string `json:"height,omitempty"` - Label *string `json:"label,omitempty"` - Width *string `json:"width,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_mp4format.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_mp4format.go deleted file mode 100644 index 44e41dd94921e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_mp4format.go +++ /dev/null @@ -1,42 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Format = Mp4Format{} - -type Mp4Format struct { - OutputFiles *[]OutputFile `json:"outputFiles,omitempty"` - - // Fields inherited from Format - FilenamePattern string `json:"filenamePattern"` -} - -var _ json.Marshaler = Mp4Format{} - -func (s Mp4Format) MarshalJSON() ([]byte, error) { - type wrapper Mp4Format - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling Mp4Format: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling Mp4Format: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.Mp4Format" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling Mp4Format: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_multibitrateformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_multibitrateformat.go deleted file mode 100644 index fec53d0e6804b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_multibitrateformat.go +++ /dev/null @@ -1,42 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Format = MultiBitrateFormat{} - -type MultiBitrateFormat struct { - OutputFiles *[]OutputFile `json:"outputFiles,omitempty"` - - // Fields inherited from Format - FilenamePattern string `json:"filenamePattern"` -} - -var _ json.Marshaler = MultiBitrateFormat{} - -func (s MultiBitrateFormat) MarshalJSON() ([]byte, error) { - type wrapper MultiBitrateFormat - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MultiBitrateFormat: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MultiBitrateFormat: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.MultiBitrateFormat" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MultiBitrateFormat: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_outputfile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_outputfile.go deleted file mode 100644 index e83b5bdb27f22..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_outputfile.go +++ /dev/null @@ -1,8 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type OutputFile struct { - Labels []string `json:"labels"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_overlay.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_overlay.go deleted file mode 100644 index 160ee13ef1d0c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_overlay.go +++ /dev/null @@ -1,61 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Overlay interface { -} - -// RawOverlayImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawOverlayImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalOverlayImplementation(input []byte) (Overlay, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling Overlay into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.AudioOverlay") { - var out AudioOverlay - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AudioOverlay: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.VideoOverlay") { - var out VideoOverlay - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into VideoOverlay: %+v", err) - } - return out, nil - } - - out := RawOverlayImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_pngformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_pngformat.go deleted file mode 100644 index e9b5216bb869f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_pngformat.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Format = PngFormat{} - -type PngFormat struct { - - // Fields inherited from Format - FilenamePattern string `json:"filenamePattern"` -} - -var _ json.Marshaler = PngFormat{} - -func (s PngFormat) MarshalJSON() ([]byte, error) { - type wrapper PngFormat - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling PngFormat: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling PngFormat: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.PngFormat" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling PngFormat: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_pngimage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_pngimage.go deleted file mode 100644 index 7209b7aba304b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_pngimage.go +++ /dev/null @@ -1,48 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = PngImage{} - -type PngImage struct { - KeyFrameInterval *string `json:"keyFrameInterval,omitempty"` - Layers *[]Layer `json:"layers,omitempty"` - Range *string `json:"range,omitempty"` - Start string `json:"start"` - Step *string `json:"step,omitempty"` - StretchMode *StretchMode `json:"stretchMode,omitempty"` - SyncMode *VideoSyncMode `json:"syncMode,omitempty"` - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = PngImage{} - -func (s PngImage) MarshalJSON() ([]byte, error) { - type wrapper PngImage - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling PngImage: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling PngImage: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.PngImage" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling PngImage: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_preset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_preset.go deleted file mode 100644 index af6ef205d3345..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_preset.go +++ /dev/null @@ -1,85 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Preset interface { -} - -// RawPresetImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawPresetImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalPresetImplementation(input []byte) (Preset, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling Preset into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.AudioAnalyzerPreset") { - var out AudioAnalyzerPreset - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AudioAnalyzerPreset: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.BuiltInStandardEncoderPreset") { - var out BuiltInStandardEncoderPreset - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into BuiltInStandardEncoderPreset: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.FaceDetectorPreset") { - var out FaceDetectorPreset - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into FaceDetectorPreset: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.StandardEncoderPreset") { - var out StandardEncoderPreset - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into StandardEncoderPreset: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.VideoAnalyzerPreset") { - var out VideoAnalyzerPreset - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into VideoAnalyzerPreset: %+v", err) - } - return out, nil - } - - out := RawPresetImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_presetconfigurations.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_presetconfigurations.go deleted file mode 100644 index 56262e5ad96bf..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_presetconfigurations.go +++ /dev/null @@ -1,15 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PresetConfigurations struct { - Complexity *Complexity `json:"complexity,omitempty"` - InterleaveOutput *InterleaveOutput `json:"interleaveOutput,omitempty"` - KeyFrameIntervalInSeconds *float64 `json:"keyFrameIntervalInSeconds,omitempty"` - MaxBitrateBps *int64 `json:"maxBitrateBps,omitempty"` - MaxHeight *int64 `json:"maxHeight,omitempty"` - MaxLayers *int64 `json:"maxLayers,omitempty"` - MinBitrateBps *int64 `json:"minBitrateBps,omitempty"` - MinHeight *int64 `json:"minHeight,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_rectangle.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_rectangle.go deleted file mode 100644 index 09b1ba538a97f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_rectangle.go +++ /dev/null @@ -1,11 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Rectangle struct { - Height *string `json:"height,omitempty"` - Left *string `json:"left,omitempty"` - Top *string `json:"top,omitempty"` - Width *string `json:"width,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_selectaudiotrackbyattribute.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_selectaudiotrackbyattribute.go deleted file mode 100644 index ae6bafef50356..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_selectaudiotrackbyattribute.go +++ /dev/null @@ -1,44 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ TrackDescriptor = SelectAudioTrackByAttribute{} - -type SelectAudioTrackByAttribute struct { - Attribute TrackAttribute `json:"attribute"` - ChannelMapping *ChannelMapping `json:"channelMapping,omitempty"` - Filter AttributeFilter `json:"filter"` - FilterValue *string `json:"filterValue,omitempty"` - - // Fields inherited from TrackDescriptor -} - -var _ json.Marshaler = SelectAudioTrackByAttribute{} - -func (s SelectAudioTrackByAttribute) MarshalJSON() ([]byte, error) { - type wrapper SelectAudioTrackByAttribute - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SelectAudioTrackByAttribute: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SelectAudioTrackByAttribute: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.SelectAudioTrackByAttribute" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SelectAudioTrackByAttribute: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_selectaudiotrackbyid.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_selectaudiotrackbyid.go deleted file mode 100644 index e9b4587be0c39..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_selectaudiotrackbyid.go +++ /dev/null @@ -1,42 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ TrackDescriptor = SelectAudioTrackById{} - -type SelectAudioTrackById struct { - ChannelMapping *ChannelMapping `json:"channelMapping,omitempty"` - TrackId int64 `json:"trackId"` - - // Fields inherited from TrackDescriptor -} - -var _ json.Marshaler = SelectAudioTrackById{} - -func (s SelectAudioTrackById) MarshalJSON() ([]byte, error) { - type wrapper SelectAudioTrackById - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SelectAudioTrackById: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SelectAudioTrackById: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.SelectAudioTrackById" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SelectAudioTrackById: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_selectvideotrackbyattribute.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_selectvideotrackbyattribute.go deleted file mode 100644 index 82305909c361c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_selectvideotrackbyattribute.go +++ /dev/null @@ -1,43 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ TrackDescriptor = SelectVideoTrackByAttribute{} - -type SelectVideoTrackByAttribute struct { - Attribute TrackAttribute `json:"attribute"` - Filter AttributeFilter `json:"filter"` - FilterValue *string `json:"filterValue,omitempty"` - - // Fields inherited from TrackDescriptor -} - -var _ json.Marshaler = SelectVideoTrackByAttribute{} - -func (s SelectVideoTrackByAttribute) MarshalJSON() ([]byte, error) { - type wrapper SelectVideoTrackByAttribute - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SelectVideoTrackByAttribute: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SelectVideoTrackByAttribute: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.SelectVideoTrackByAttribute" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SelectVideoTrackByAttribute: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_selectvideotrackbyid.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_selectvideotrackbyid.go deleted file mode 100644 index 4527e73336eba..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_selectvideotrackbyid.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ TrackDescriptor = SelectVideoTrackById{} - -type SelectVideoTrackById struct { - TrackId int64 `json:"trackId"` - - // Fields inherited from TrackDescriptor -} - -var _ json.Marshaler = SelectVideoTrackById{} - -func (s SelectVideoTrackById) MarshalJSON() ([]byte, error) { - type wrapper SelectVideoTrackById - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SelectVideoTrackById: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SelectVideoTrackById: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.SelectVideoTrackById" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SelectVideoTrackById: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_standardencoderpreset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_standardencoderpreset.go deleted file mode 100644 index e542f8134789a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_standardencoderpreset.go +++ /dev/null @@ -1,97 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Preset = StandardEncoderPreset{} - -type StandardEncoderPreset struct { - Codecs []Codec `json:"codecs"` - ExperimentalOptions *map[string]string `json:"experimentalOptions,omitempty"` - Filters *Filters `json:"filters,omitempty"` - Formats []Format `json:"formats"` - - // Fields inherited from Preset -} - -var _ json.Marshaler = StandardEncoderPreset{} - -func (s StandardEncoderPreset) MarshalJSON() ([]byte, error) { - type wrapper StandardEncoderPreset - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling StandardEncoderPreset: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling StandardEncoderPreset: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.StandardEncoderPreset" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling StandardEncoderPreset: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &StandardEncoderPreset{} - -func (s *StandardEncoderPreset) UnmarshalJSON(bytes []byte) error { - type alias StandardEncoderPreset - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into StandardEncoderPreset: %+v", err) - } - - s.ExperimentalOptions = decoded.ExperimentalOptions - s.Filters = decoded.Filters - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling StandardEncoderPreset into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["codecs"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Codecs into list []json.RawMessage: %+v", err) - } - - output := make([]Codec, 0) - for i, val := range listTemp { - impl, err := unmarshalCodecImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Codecs' for 'StandardEncoderPreset': %+v", i, err) - } - output = append(output, impl) - } - s.Codecs = output - } - - if v, ok := temp["formats"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Formats into list []json.RawMessage: %+v", err) - } - - output := make([]Format, 0) - for i, val := range listTemp { - impl, err := unmarshalFormatImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Formats' for 'StandardEncoderPreset': %+v", i, err) - } - output = append(output, impl) - } - s.Formats = output - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_trackdescriptor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_trackdescriptor.go deleted file mode 100644 index 8aa3d1a50d911..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_trackdescriptor.go +++ /dev/null @@ -1,93 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrackDescriptor interface { -} - -// RawTrackDescriptorImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawTrackDescriptorImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalTrackDescriptorImplementation(input []byte) (TrackDescriptor, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling TrackDescriptor into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.AudioTrackDescriptor") { - var out AudioTrackDescriptor - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AudioTrackDescriptor: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.SelectAudioTrackByAttribute") { - var out SelectAudioTrackByAttribute - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SelectAudioTrackByAttribute: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.SelectAudioTrackById") { - var out SelectAudioTrackById - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SelectAudioTrackById: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.SelectVideoTrackByAttribute") { - var out SelectVideoTrackByAttribute - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SelectVideoTrackByAttribute: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.SelectVideoTrackById") { - var out SelectVideoTrackById - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SelectVideoTrackById: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.VideoTrackDescriptor") { - var out VideoTrackDescriptor - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into VideoTrackDescriptor: %+v", err) - } - return out, nil - } - - out := RawTrackDescriptorImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_transform.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_transform.go deleted file mode 100644 index 01cf33e348080..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_transform.go +++ /dev/null @@ -1,16 +0,0 @@ -package encodings - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Transform struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *TransformProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_transformoutput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_transformoutput.go deleted file mode 100644 index 8532442b750d1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_transformoutput.go +++ /dev/null @@ -1,42 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TransformOutput struct { - OnError *OnErrorType `json:"onError,omitempty"` - Preset Preset `json:"preset"` - RelativePriority *Priority `json:"relativePriority,omitempty"` -} - -var _ json.Unmarshaler = &TransformOutput{} - -func (s *TransformOutput) UnmarshalJSON(bytes []byte) error { - type alias TransformOutput - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into TransformOutput: %+v", err) - } - - s.OnError = decoded.OnError - s.RelativePriority = decoded.RelativePriority - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling TransformOutput into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["preset"]; ok { - impl, err := unmarshalPresetImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Preset' for 'TransformOutput': %+v", err) - } - s.Preset = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_transformproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_transformproperties.go deleted file mode 100644 index 74e7048d69610..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_transformproperties.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TransformProperties struct { - Created *string `json:"created,omitempty"` - Description *string `json:"description,omitempty"` - LastModified *string `json:"lastModified,omitempty"` - Outputs []TransformOutput `json:"outputs"` -} - -func (o *TransformProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *TransformProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *TransformProperties) GetLastModifiedAsTime() (*time.Time, error) { - if o.LastModified == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModified, "2006-01-02T15:04:05Z07:00") -} - -func (o *TransformProperties) SetLastModifiedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModified = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_transportstreamformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_transportstreamformat.go deleted file mode 100644 index 5a869925fa556..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_transportstreamformat.go +++ /dev/null @@ -1,42 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Format = TransportStreamFormat{} - -type TransportStreamFormat struct { - OutputFiles *[]OutputFile `json:"outputFiles,omitempty"` - - // Fields inherited from Format - FilenamePattern string `json:"filenamePattern"` -} - -var _ json.Marshaler = TransportStreamFormat{} - -func (s TransportStreamFormat) MarshalJSON() ([]byte, error) { - type wrapper TransportStreamFormat - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling TransportStreamFormat: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling TransportStreamFormat: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.TransportStreamFormat" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling TransportStreamFormat: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_utccliptime.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_utccliptime.go deleted file mode 100644 index 0787e406a9422..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_utccliptime.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClipTime = UtcClipTime{} - -type UtcClipTime struct { - Time string `json:"time"` - - // Fields inherited from ClipTime -} - -var _ json.Marshaler = UtcClipTime{} - -func (s UtcClipTime) MarshalJSON() ([]byte, error) { - type wrapper UtcClipTime - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling UtcClipTime: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling UtcClipTime: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.UtcClipTime" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling UtcClipTime: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_video.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_video.go deleted file mode 100644 index 35e566481c9d3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_video.go +++ /dev/null @@ -1,44 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = Video{} - -type Video struct { - KeyFrameInterval *string `json:"keyFrameInterval,omitempty"` - StretchMode *StretchMode `json:"stretchMode,omitempty"` - SyncMode *VideoSyncMode `json:"syncMode,omitempty"` - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = Video{} - -func (s Video) MarshalJSON() ([]byte, error) { - type wrapper Video - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling Video: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling Video: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.Video" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling Video: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_videoanalyzerpreset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_videoanalyzerpreset.go deleted file mode 100644 index d98ab1914de8e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_videoanalyzerpreset.go +++ /dev/null @@ -1,44 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Preset = VideoAnalyzerPreset{} - -type VideoAnalyzerPreset struct { - AudioLanguage *string `json:"audioLanguage,omitempty"` - ExperimentalOptions *map[string]string `json:"experimentalOptions,omitempty"` - InsightsToExtract *InsightsType `json:"insightsToExtract,omitempty"` - Mode *AudioAnalysisMode `json:"mode,omitempty"` - - // Fields inherited from Preset -} - -var _ json.Marshaler = VideoAnalyzerPreset{} - -func (s VideoAnalyzerPreset) MarshalJSON() ([]byte, error) { - type wrapper VideoAnalyzerPreset - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling VideoAnalyzerPreset: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling VideoAnalyzerPreset: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.VideoAnalyzerPreset" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling VideoAnalyzerPreset: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_videooverlay.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_videooverlay.go deleted file mode 100644 index 27d0f02825678..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_videooverlay.go +++ /dev/null @@ -1,49 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Overlay = VideoOverlay{} - -type VideoOverlay struct { - CropRectangle *Rectangle `json:"cropRectangle,omitempty"` - Opacity *float64 `json:"opacity,omitempty"` - Position *Rectangle `json:"position,omitempty"` - - // Fields inherited from Overlay - AudioGainLevel *float64 `json:"audioGainLevel,omitempty"` - End *string `json:"end,omitempty"` - FadeInDuration *string `json:"fadeInDuration,omitempty"` - FadeOutDuration *string `json:"fadeOutDuration,omitempty"` - InputLabel string `json:"inputLabel"` - Start *string `json:"start,omitempty"` -} - -var _ json.Marshaler = VideoOverlay{} - -func (s VideoOverlay) MarshalJSON() ([]byte, error) { - type wrapper VideoOverlay - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling VideoOverlay: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling VideoOverlay: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.VideoOverlay" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling VideoOverlay: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_videotrackdescriptor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_videotrackdescriptor.go deleted file mode 100644 index ff1f690b1d0da..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/model_videotrackdescriptor.go +++ /dev/null @@ -1,40 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ TrackDescriptor = VideoTrackDescriptor{} - -type VideoTrackDescriptor struct { - - // Fields inherited from TrackDescriptor -} - -var _ json.Marshaler = VideoTrackDescriptor{} - -func (s VideoTrackDescriptor) MarshalJSON() ([]byte, error) { - type wrapper VideoTrackDescriptor - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling VideoTrackDescriptor: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling VideoTrackDescriptor: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.VideoTrackDescriptor" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling VideoTrackDescriptor: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/predicates.go deleted file mode 100644 index 7c97ff6b81141..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/predicates.go +++ /dev/null @@ -1,50 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p JobOperationPredicate) Matches(input Job) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type TransformOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p TransformOperationPredicate) Matches(input Transform) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/version.go deleted file mode 100644 index 2873abea310e1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package encodings - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-07-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/encodings/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/README.md deleted file mode 100644 index 22cec88cb0245..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/README.md +++ /dev/null @@ -1,111 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters` Documentation - -The `accountfilters` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2022-08-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters" -``` - - -### Client Initialization - -```go -client := accountfilters.NewAccountFiltersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `AccountFiltersClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := accountfilters.NewAccountFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "accountFilterValue") - -payload := accountfilters.AccountFilter{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountFiltersClient.Delete` - -```go -ctx := context.TODO() -id := accountfilters.NewAccountFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "accountFilterValue") - -read, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountFiltersClient.Get` - -```go -ctx := context.TODO() -id := accountfilters.NewAccountFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "accountFilterValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountFiltersClient.List` - -```go -ctx := context.TODO() -id := accountfilters.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AccountFiltersClient.Update` - -```go -ctx := context.TODO() -id := accountfilters.NewAccountFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "accountFilterValue") - -payload := accountfilters.AccountFilter{ - // ... -} - - -read, err := client.Update(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/client.go deleted file mode 100644 index 76262494fe6d6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package accountfilters - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountFiltersClient struct { - Client *resourcemanager.Client -} - -func NewAccountFiltersClientWithBaseURI(sdkApi sdkEnv.Api) (*AccountFiltersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "accountfilters", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating AccountFiltersClient: %+v", err) - } - - return &AccountFiltersClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/constants.go deleted file mode 100644 index 39a4f9acbff6d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/constants.go +++ /dev/null @@ -1,104 +0,0 @@ -package accountfilters - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FilterTrackPropertyCompareOperation string - -const ( - FilterTrackPropertyCompareOperationEqual FilterTrackPropertyCompareOperation = "Equal" - FilterTrackPropertyCompareOperationNotEqual FilterTrackPropertyCompareOperation = "NotEqual" -) - -func PossibleValuesForFilterTrackPropertyCompareOperation() []string { - return []string{ - string(FilterTrackPropertyCompareOperationEqual), - string(FilterTrackPropertyCompareOperationNotEqual), - } -} - -func (s *FilterTrackPropertyCompareOperation) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFilterTrackPropertyCompareOperation(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFilterTrackPropertyCompareOperation(input string) (*FilterTrackPropertyCompareOperation, error) { - vals := map[string]FilterTrackPropertyCompareOperation{ - "equal": FilterTrackPropertyCompareOperationEqual, - "notequal": FilterTrackPropertyCompareOperationNotEqual, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FilterTrackPropertyCompareOperation(input) - return &out, nil -} - -type FilterTrackPropertyType string - -const ( - FilterTrackPropertyTypeBitrate FilterTrackPropertyType = "Bitrate" - FilterTrackPropertyTypeFourCC FilterTrackPropertyType = "FourCC" - FilterTrackPropertyTypeLanguage FilterTrackPropertyType = "Language" - FilterTrackPropertyTypeName FilterTrackPropertyType = "Name" - FilterTrackPropertyTypeType FilterTrackPropertyType = "Type" - FilterTrackPropertyTypeUnknown FilterTrackPropertyType = "Unknown" -) - -func PossibleValuesForFilterTrackPropertyType() []string { - return []string{ - string(FilterTrackPropertyTypeBitrate), - string(FilterTrackPropertyTypeFourCC), - string(FilterTrackPropertyTypeLanguage), - string(FilterTrackPropertyTypeName), - string(FilterTrackPropertyTypeType), - string(FilterTrackPropertyTypeUnknown), - } -} - -func (s *FilterTrackPropertyType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFilterTrackPropertyType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFilterTrackPropertyType(input string) (*FilterTrackPropertyType, error) { - vals := map[string]FilterTrackPropertyType{ - "bitrate": FilterTrackPropertyTypeBitrate, - "fourcc": FilterTrackPropertyTypeFourCC, - "language": FilterTrackPropertyTypeLanguage, - "name": FilterTrackPropertyTypeName, - "type": FilterTrackPropertyTypeType, - "unknown": FilterTrackPropertyTypeUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FilterTrackPropertyType(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/id_accountfilter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/id_accountfilter.go deleted file mode 100644 index 30d0bcfc8719a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/id_accountfilter.go +++ /dev/null @@ -1,139 +0,0 @@ -package accountfilters - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&AccountFilterId{}) -} - -var _ resourceids.ResourceId = &AccountFilterId{} - -// AccountFilterId is a struct representing the Resource ID for a Account Filter -type AccountFilterId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - AccountFilterName string -} - -// NewAccountFilterID returns a new AccountFilterId struct -func NewAccountFilterID(subscriptionId string, resourceGroupName string, mediaServiceName string, accountFilterName string) AccountFilterId { - return AccountFilterId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - AccountFilterName: accountFilterName, - } -} - -// ParseAccountFilterID parses 'input' into a AccountFilterId -func ParseAccountFilterID(input string) (*AccountFilterId, error) { - parser := resourceids.NewParserFromResourceIdType(&AccountFilterId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := AccountFilterId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseAccountFilterIDInsensitively parses 'input' case-insensitively into a AccountFilterId -// note: this method should only be used for API response data and not user input -func ParseAccountFilterIDInsensitively(input string) (*AccountFilterId, error) { - parser := resourceids.NewParserFromResourceIdType(&AccountFilterId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := AccountFilterId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *AccountFilterId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.AccountFilterName, ok = input.Parsed["accountFilterName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "accountFilterName", input) - } - - return nil -} - -// ValidateAccountFilterID checks that 'input' can be parsed as a Account Filter ID -func ValidateAccountFilterID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseAccountFilterID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Account Filter ID -func (id AccountFilterId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/accountFilters/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.AccountFilterName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Account Filter ID -func (id AccountFilterId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticAccountFilters", "accountFilters", "accountFilters"), - resourceids.UserSpecifiedSegment("accountFilterName", "accountFilterValue"), - } -} - -// String returns a human-readable description of this Account Filter ID -func (id AccountFilterId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Account Filter Name: %q", id.AccountFilterName), - } - return fmt.Sprintf("Account Filter (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/id_mediaservice.go deleted file mode 100644 index b5a8af8e24c54..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/id_mediaservice.go +++ /dev/null @@ -1,130 +0,0 @@ -package accountfilters - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&MediaServiceId{}) -} - -var _ resourceids.ResourceId = &MediaServiceId{} - -// MediaServiceId is a struct representing the Resource ID for a Media Service -type MediaServiceId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string -} - -// NewMediaServiceID returns a new MediaServiceId struct -func NewMediaServiceID(subscriptionId string, resourceGroupName string, mediaServiceName string) MediaServiceId { - return MediaServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - } -} - -// ParseMediaServiceID parses 'input' into a MediaServiceId -func ParseMediaServiceID(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseMediaServiceIDInsensitively parses 'input' case-insensitively into a MediaServiceId -// note: this method should only be used for API response data and not user input -func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *MediaServiceId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - return nil -} - -// ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID -func ValidateMediaServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMediaServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Media Service ID -func (id MediaServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Media Service ID -func (id MediaServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - } -} - -// String returns a human-readable description of this Media Service ID -func (id MediaServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - } - return fmt.Sprintf("Media Service (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/method_createorupdate.go deleted file mode 100644 index f0e49340ca08a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/method_createorupdate.go +++ /dev/null @@ -1,59 +0,0 @@ -package accountfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AccountFilter -} - -// CreateOrUpdate ... -func (c AccountFiltersClient) CreateOrUpdate(ctx context.Context, id AccountFilterId, input AccountFilter) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model AccountFilter - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/method_delete.go deleted file mode 100644 index 135b80326daf0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/method_delete.go +++ /dev/null @@ -1,47 +0,0 @@ -package accountfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c AccountFiltersClient) Delete(ctx context.Context, id AccountFilterId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/method_get.go deleted file mode 100644 index b9639b436c1ff..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/method_get.go +++ /dev/null @@ -1,54 +0,0 @@ -package accountfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AccountFilter -} - -// Get ... -func (c AccountFiltersClient) Get(ctx context.Context, id AccountFilterId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model AccountFilter - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/method_list.go deleted file mode 100644 index a297e19172b86..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/method_list.go +++ /dev/null @@ -1,105 +0,0 @@ -package accountfilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AccountFilter -} - -type ListCompleteResult struct { - LatestHttpResponse *http.Response - Items []AccountFilter -} - -type ListCustomPager struct { - NextLink *odata.Link `json:"@odata.nextLink"` -} - -func (p *ListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// List ... -func (c AccountFiltersClient) List(ctx context.Context, id MediaServiceId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListCustomPager{}, - Path: fmt.Sprintf("%s/accountFilters", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AccountFilter `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c AccountFiltersClient) ListComplete(ctx context.Context, id MediaServiceId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, AccountFilterOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AccountFiltersClient) ListCompleteMatchingPredicate(ctx context.Context, id MediaServiceId, predicate AccountFilterOperationPredicate) (result ListCompleteResult, err error) { - items := make([]AccountFilter, 0) - - resp, err := c.List(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/method_update.go deleted file mode 100644 index 7e3a2abff48ea..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/method_update.go +++ /dev/null @@ -1,58 +0,0 @@ -package accountfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AccountFilter -} - -// Update ... -func (c AccountFiltersClient) Update(ctx context.Context, id AccountFilterId, input AccountFilter) (result UpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model AccountFilter - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/model_accountfilter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/model_accountfilter.go deleted file mode 100644 index 5f99540d26e8e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/model_accountfilter.go +++ /dev/null @@ -1,16 +0,0 @@ -package accountfilters - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountFilter struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *MediaFilterProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/model_filtertrackpropertycondition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/model_filtertrackpropertycondition.go deleted file mode 100644 index ecfd372cc9cc0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/model_filtertrackpropertycondition.go +++ /dev/null @@ -1,10 +0,0 @@ -package accountfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FilterTrackPropertyCondition struct { - Operation FilterTrackPropertyCompareOperation `json:"operation"` - Property FilterTrackPropertyType `json:"property"` - Value string `json:"value"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/model_filtertrackselection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/model_filtertrackselection.go deleted file mode 100644 index d80799ed2c0f5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/model_filtertrackselection.go +++ /dev/null @@ -1,8 +0,0 @@ -package accountfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FilterTrackSelection struct { - TrackSelections []FilterTrackPropertyCondition `json:"trackSelections"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/model_firstquality.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/model_firstquality.go deleted file mode 100644 index c4854fd569692..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/model_firstquality.go +++ /dev/null @@ -1,8 +0,0 @@ -package accountfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirstQuality struct { - Bitrate int64 `json:"bitrate"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/model_mediafilterproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/model_mediafilterproperties.go deleted file mode 100644 index 70be94a287288..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/model_mediafilterproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package accountfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaFilterProperties struct { - FirstQuality *FirstQuality `json:"firstQuality,omitempty"` - PresentationTimeRange *PresentationTimeRange `json:"presentationTimeRange,omitempty"` - Tracks *[]FilterTrackSelection `json:"tracks,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/model_presentationtimerange.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/model_presentationtimerange.go deleted file mode 100644 index f36ec8315716c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/model_presentationtimerange.go +++ /dev/null @@ -1,13 +0,0 @@ -package accountfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PresentationTimeRange struct { - EndTimestamp *int64 `json:"endTimestamp,omitempty"` - ForceEndTimestamp *bool `json:"forceEndTimestamp,omitempty"` - LiveBackoffDuration *int64 `json:"liveBackoffDuration,omitempty"` - PresentationWindowDuration *int64 `json:"presentationWindowDuration,omitempty"` - StartTimestamp *int64 `json:"startTimestamp,omitempty"` - Timescale *int64 `json:"timescale,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/predicates.go deleted file mode 100644 index 0d50e33a6f362..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package accountfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountFilterOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p AccountFilterOperationPredicate) Matches(input AccountFilter) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/version.go deleted file mode 100644 index b360b93c0a778..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package accountfilters - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-08-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/accountfilters/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/README.md deleted file mode 100644 index ed6072c7d607c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/README.md +++ /dev/null @@ -1,345 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters` Documentation - -The `assetsandassetfilters` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2022-08-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters" -``` - - -### Client Initialization - -```go -client := assetsandassetfilters.NewAssetsAndAssetFiltersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetFiltersCreateOrUpdate` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue", "assetFilterValue") - -payload := assetsandassetfilters.AssetFilter{ - // ... -} - - -read, err := client.AssetFiltersCreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetFiltersDelete` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue", "assetFilterValue") - -read, err := client.AssetFiltersDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetFiltersGet` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue", "assetFilterValue") - -read, err := client.AssetFiltersGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetFiltersList` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -// alternatively `client.AssetFiltersList(ctx, id)` can be used to do batched pagination -items, err := client.AssetFiltersListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetFiltersUpdate` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue", "assetFilterValue") - -payload := assetsandassetfilters.AssetFilter{ - // ... -} - - -read, err := client.AssetFiltersUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetsCreateOrUpdate` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -payload := assetsandassetfilters.Asset{ - // ... -} - - -read, err := client.AssetsCreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetsDelete` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -read, err := client.AssetsDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetsGet` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -read, err := client.AssetsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetsGetEncryptionKey` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -read, err := client.AssetsGetEncryptionKey(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetsList` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -// alternatively `client.AssetsList(ctx, id, assetsandassetfilters.DefaultAssetsListOperationOptions())` can be used to do batched pagination -items, err := client.AssetsListComplete(ctx, id, assetsandassetfilters.DefaultAssetsListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetsListContainerSas` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -payload := assetsandassetfilters.ListContainerSasInput{ - // ... -} - - -read, err := client.AssetsListContainerSas(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetsListStreamingLocators` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -read, err := client.AssetsListStreamingLocators(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetsUpdate` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -payload := assetsandassetfilters.Asset{ - // ... -} - - -read, err := client.AssetsUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.TracksCreateOrUpdate` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewTrackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue", "trackValue") - -payload := assetsandassetfilters.AssetTrack{ - // ... -} - - -if err := client.TracksCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.TracksDelete` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewTrackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue", "trackValue") - -if err := client.TracksDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.TracksGet` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewTrackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue", "trackValue") - -read, err := client.TracksGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.TracksList` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -read, err := client.TracksList(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.TracksUpdate` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewTrackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue", "trackValue") - -payload := assetsandassetfilters.AssetTrack{ - // ... -} - - -if err := client.TracksUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.TracksUpdateTrackData` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewTrackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue", "trackValue") - -if err := client.TracksUpdateTrackDataThenPoll(ctx, id); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/client.go deleted file mode 100644 index c1a18be1bf9c8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package assetsandassetfilters - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsAndAssetFiltersClient struct { - Client *resourcemanager.Client -} - -func NewAssetsAndAssetFiltersClientWithBaseURI(sdkApi sdkEnv.Api) (*AssetsAndAssetFiltersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "assetsandassetfilters", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating AssetsAndAssetFiltersClient: %+v", err) - } - - return &AssetsAndAssetFiltersClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/constants.go deleted file mode 100644 index d8954a48e7d70..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/constants.go +++ /dev/null @@ -1,274 +0,0 @@ -package assetsandassetfilters - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetContainerPermission string - -const ( - AssetContainerPermissionRead AssetContainerPermission = "Read" - AssetContainerPermissionReadWrite AssetContainerPermission = "ReadWrite" - AssetContainerPermissionReadWriteDelete AssetContainerPermission = "ReadWriteDelete" -) - -func PossibleValuesForAssetContainerPermission() []string { - return []string{ - string(AssetContainerPermissionRead), - string(AssetContainerPermissionReadWrite), - string(AssetContainerPermissionReadWriteDelete), - } -} - -func (s *AssetContainerPermission) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAssetContainerPermission(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAssetContainerPermission(input string) (*AssetContainerPermission, error) { - vals := map[string]AssetContainerPermission{ - "read": AssetContainerPermissionRead, - "readwrite": AssetContainerPermissionReadWrite, - "readwritedelete": AssetContainerPermissionReadWriteDelete, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AssetContainerPermission(input) - return &out, nil -} - -type AssetStorageEncryptionFormat string - -const ( - AssetStorageEncryptionFormatMediaStorageClientEncryption AssetStorageEncryptionFormat = "MediaStorageClientEncryption" - AssetStorageEncryptionFormatNone AssetStorageEncryptionFormat = "None" -) - -func PossibleValuesForAssetStorageEncryptionFormat() []string { - return []string{ - string(AssetStorageEncryptionFormatMediaStorageClientEncryption), - string(AssetStorageEncryptionFormatNone), - } -} - -func (s *AssetStorageEncryptionFormat) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAssetStorageEncryptionFormat(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAssetStorageEncryptionFormat(input string) (*AssetStorageEncryptionFormat, error) { - vals := map[string]AssetStorageEncryptionFormat{ - "mediastorageclientencryption": AssetStorageEncryptionFormatMediaStorageClientEncryption, - "none": AssetStorageEncryptionFormatNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AssetStorageEncryptionFormat(input) - return &out, nil -} - -type FilterTrackPropertyCompareOperation string - -const ( - FilterTrackPropertyCompareOperationEqual FilterTrackPropertyCompareOperation = "Equal" - FilterTrackPropertyCompareOperationNotEqual FilterTrackPropertyCompareOperation = "NotEqual" -) - -func PossibleValuesForFilterTrackPropertyCompareOperation() []string { - return []string{ - string(FilterTrackPropertyCompareOperationEqual), - string(FilterTrackPropertyCompareOperationNotEqual), - } -} - -func (s *FilterTrackPropertyCompareOperation) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFilterTrackPropertyCompareOperation(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFilterTrackPropertyCompareOperation(input string) (*FilterTrackPropertyCompareOperation, error) { - vals := map[string]FilterTrackPropertyCompareOperation{ - "equal": FilterTrackPropertyCompareOperationEqual, - "notequal": FilterTrackPropertyCompareOperationNotEqual, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FilterTrackPropertyCompareOperation(input) - return &out, nil -} - -type FilterTrackPropertyType string - -const ( - FilterTrackPropertyTypeBitrate FilterTrackPropertyType = "Bitrate" - FilterTrackPropertyTypeFourCC FilterTrackPropertyType = "FourCC" - FilterTrackPropertyTypeLanguage FilterTrackPropertyType = "Language" - FilterTrackPropertyTypeName FilterTrackPropertyType = "Name" - FilterTrackPropertyTypeType FilterTrackPropertyType = "Type" - FilterTrackPropertyTypeUnknown FilterTrackPropertyType = "Unknown" -) - -func PossibleValuesForFilterTrackPropertyType() []string { - return []string{ - string(FilterTrackPropertyTypeBitrate), - string(FilterTrackPropertyTypeFourCC), - string(FilterTrackPropertyTypeLanguage), - string(FilterTrackPropertyTypeName), - string(FilterTrackPropertyTypeType), - string(FilterTrackPropertyTypeUnknown), - } -} - -func (s *FilterTrackPropertyType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFilterTrackPropertyType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFilterTrackPropertyType(input string) (*FilterTrackPropertyType, error) { - vals := map[string]FilterTrackPropertyType{ - "bitrate": FilterTrackPropertyTypeBitrate, - "fourcc": FilterTrackPropertyTypeFourCC, - "language": FilterTrackPropertyTypeLanguage, - "name": FilterTrackPropertyTypeName, - "type": FilterTrackPropertyTypeType, - "unknown": FilterTrackPropertyTypeUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FilterTrackPropertyType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateInProgress ProvisioningState = "InProgress" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateFailed), - string(ProvisioningStateInProgress), - string(ProvisioningStateSucceeded), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "failed": ProvisioningStateFailed, - "inprogress": ProvisioningStateInProgress, - "succeeded": ProvisioningStateSucceeded, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type Visibility string - -const ( - VisibilityHidden Visibility = "Hidden" - VisibilityVisible Visibility = "Visible" -) - -func PossibleValuesForVisibility() []string { - return []string{ - string(VisibilityHidden), - string(VisibilityVisible), - } -} - -func (s *Visibility) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVisibility(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVisibility(input string) (*Visibility, error) { - vals := map[string]Visibility{ - "hidden": VisibilityHidden, - "visible": VisibilityVisible, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Visibility(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_asset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_asset.go deleted file mode 100644 index 098a1cbed8058..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_asset.go +++ /dev/null @@ -1,139 +0,0 @@ -package assetsandassetfilters - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&AssetId{}) -} - -var _ resourceids.ResourceId = &AssetId{} - -// AssetId is a struct representing the Resource ID for a Asset -type AssetId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - AssetName string -} - -// NewAssetID returns a new AssetId struct -func NewAssetID(subscriptionId string, resourceGroupName string, mediaServiceName string, assetName string) AssetId { - return AssetId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - AssetName: assetName, - } -} - -// ParseAssetID parses 'input' into a AssetId -func ParseAssetID(input string) (*AssetId, error) { - parser := resourceids.NewParserFromResourceIdType(&AssetId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := AssetId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseAssetIDInsensitively parses 'input' case-insensitively into a AssetId -// note: this method should only be used for API response data and not user input -func ParseAssetIDInsensitively(input string) (*AssetId, error) { - parser := resourceids.NewParserFromResourceIdType(&AssetId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := AssetId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *AssetId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.AssetName, ok = input.Parsed["assetName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "assetName", input) - } - - return nil -} - -// ValidateAssetID checks that 'input' can be parsed as a Asset ID -func ValidateAssetID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseAssetID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Asset ID -func (id AssetId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/assets/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.AssetName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Asset ID -func (id AssetId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticAssets", "assets", "assets"), - resourceids.UserSpecifiedSegment("assetName", "assetValue"), - } -} - -// String returns a human-readable description of this Asset ID -func (id AssetId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Asset Name: %q", id.AssetName), - } - return fmt.Sprintf("Asset (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_assetfilter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_assetfilter.go deleted file mode 100644 index 3490c79c7ec32..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_assetfilter.go +++ /dev/null @@ -1,148 +0,0 @@ -package assetsandassetfilters - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&AssetFilterId{}) -} - -var _ resourceids.ResourceId = &AssetFilterId{} - -// AssetFilterId is a struct representing the Resource ID for a Asset Filter -type AssetFilterId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - AssetName string - AssetFilterName string -} - -// NewAssetFilterID returns a new AssetFilterId struct -func NewAssetFilterID(subscriptionId string, resourceGroupName string, mediaServiceName string, assetName string, assetFilterName string) AssetFilterId { - return AssetFilterId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - AssetName: assetName, - AssetFilterName: assetFilterName, - } -} - -// ParseAssetFilterID parses 'input' into a AssetFilterId -func ParseAssetFilterID(input string) (*AssetFilterId, error) { - parser := resourceids.NewParserFromResourceIdType(&AssetFilterId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := AssetFilterId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseAssetFilterIDInsensitively parses 'input' case-insensitively into a AssetFilterId -// note: this method should only be used for API response data and not user input -func ParseAssetFilterIDInsensitively(input string) (*AssetFilterId, error) { - parser := resourceids.NewParserFromResourceIdType(&AssetFilterId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := AssetFilterId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *AssetFilterId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.AssetName, ok = input.Parsed["assetName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "assetName", input) - } - - if id.AssetFilterName, ok = input.Parsed["assetFilterName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "assetFilterName", input) - } - - return nil -} - -// ValidateAssetFilterID checks that 'input' can be parsed as a Asset Filter ID -func ValidateAssetFilterID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseAssetFilterID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Asset Filter ID -func (id AssetFilterId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/assets/%s/assetFilters/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.AssetName, id.AssetFilterName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Asset Filter ID -func (id AssetFilterId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticAssets", "assets", "assets"), - resourceids.UserSpecifiedSegment("assetName", "assetValue"), - resourceids.StaticSegment("staticAssetFilters", "assetFilters", "assetFilters"), - resourceids.UserSpecifiedSegment("assetFilterName", "assetFilterValue"), - } -} - -// String returns a human-readable description of this Asset Filter ID -func (id AssetFilterId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Asset Name: %q", id.AssetName), - fmt.Sprintf("Asset Filter Name: %q", id.AssetFilterName), - } - return fmt.Sprintf("Asset Filter (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_mediaservice.go deleted file mode 100644 index 499b0bb4565df..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_mediaservice.go +++ /dev/null @@ -1,130 +0,0 @@ -package assetsandassetfilters - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&MediaServiceId{}) -} - -var _ resourceids.ResourceId = &MediaServiceId{} - -// MediaServiceId is a struct representing the Resource ID for a Media Service -type MediaServiceId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string -} - -// NewMediaServiceID returns a new MediaServiceId struct -func NewMediaServiceID(subscriptionId string, resourceGroupName string, mediaServiceName string) MediaServiceId { - return MediaServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - } -} - -// ParseMediaServiceID parses 'input' into a MediaServiceId -func ParseMediaServiceID(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseMediaServiceIDInsensitively parses 'input' case-insensitively into a MediaServiceId -// note: this method should only be used for API response data and not user input -func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *MediaServiceId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - return nil -} - -// ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID -func ValidateMediaServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMediaServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Media Service ID -func (id MediaServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Media Service ID -func (id MediaServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - } -} - -// String returns a human-readable description of this Media Service ID -func (id MediaServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - } - return fmt.Sprintf("Media Service (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_track.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_track.go deleted file mode 100644 index 68d441933c6a6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_track.go +++ /dev/null @@ -1,148 +0,0 @@ -package assetsandassetfilters - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&TrackId{}) -} - -var _ resourceids.ResourceId = &TrackId{} - -// TrackId is a struct representing the Resource ID for a Track -type TrackId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - AssetName string - TrackName string -} - -// NewTrackID returns a new TrackId struct -func NewTrackID(subscriptionId string, resourceGroupName string, mediaServiceName string, assetName string, trackName string) TrackId { - return TrackId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - AssetName: assetName, - TrackName: trackName, - } -} - -// ParseTrackID parses 'input' into a TrackId -func ParseTrackID(input string) (*TrackId, error) { - parser := resourceids.NewParserFromResourceIdType(&TrackId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := TrackId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseTrackIDInsensitively parses 'input' case-insensitively into a TrackId -// note: this method should only be used for API response data and not user input -func ParseTrackIDInsensitively(input string) (*TrackId, error) { - parser := resourceids.NewParserFromResourceIdType(&TrackId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := TrackId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *TrackId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.AssetName, ok = input.Parsed["assetName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "assetName", input) - } - - if id.TrackName, ok = input.Parsed["trackName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "trackName", input) - } - - return nil -} - -// ValidateTrackID checks that 'input' can be parsed as a Track ID -func ValidateTrackID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseTrackID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Track ID -func (id TrackId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/assets/%s/tracks/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.AssetName, id.TrackName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Track ID -func (id TrackId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticAssets", "assets", "assets"), - resourceids.UserSpecifiedSegment("assetName", "assetValue"), - resourceids.StaticSegment("staticTracks", "tracks", "tracks"), - resourceids.UserSpecifiedSegment("trackName", "trackValue"), - } -} - -// String returns a human-readable description of this Track ID -func (id TrackId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Asset Name: %q", id.AssetName), - fmt.Sprintf("Track Name: %q", id.TrackName), - } - return fmt.Sprintf("Track (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfilterscreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfilterscreateorupdate.go deleted file mode 100644 index 1838e0969b397..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfilterscreateorupdate.go +++ /dev/null @@ -1,59 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetFiltersCreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AssetFilter -} - -// AssetFiltersCreateOrUpdate ... -func (c AssetsAndAssetFiltersClient) AssetFiltersCreateOrUpdate(ctx context.Context, id AssetFilterId, input AssetFilter) (result AssetFiltersCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model AssetFilter - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfiltersdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfiltersdelete.go deleted file mode 100644 index 224f8a35be59d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfiltersdelete.go +++ /dev/null @@ -1,47 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetFiltersDeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// AssetFiltersDelete ... -func (c AssetsAndAssetFiltersClient) AssetFiltersDelete(ctx context.Context, id AssetFilterId) (result AssetFiltersDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfiltersget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfiltersget.go deleted file mode 100644 index e7ab587e979d6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfiltersget.go +++ /dev/null @@ -1,54 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetFiltersGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AssetFilter -} - -// AssetFiltersGet ... -func (c AssetsAndAssetFiltersClient) AssetFiltersGet(ctx context.Context, id AssetFilterId) (result AssetFiltersGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model AssetFilter - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfilterslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfilterslist.go deleted file mode 100644 index 479c554baa90d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfilterslist.go +++ /dev/null @@ -1,105 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetFiltersListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AssetFilter -} - -type AssetFiltersListCompleteResult struct { - LatestHttpResponse *http.Response - Items []AssetFilter -} - -type AssetFiltersListCustomPager struct { - NextLink *odata.Link `json:"@odata.nextLink"` -} - -func (p *AssetFiltersListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// AssetFiltersList ... -func (c AssetsAndAssetFiltersClient) AssetFiltersList(ctx context.Context, id AssetId) (result AssetFiltersListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &AssetFiltersListCustomPager{}, - Path: fmt.Sprintf("%s/assetFilters", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AssetFilter `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// AssetFiltersListComplete retrieves all the results into a single object -func (c AssetsAndAssetFiltersClient) AssetFiltersListComplete(ctx context.Context, id AssetId) (AssetFiltersListCompleteResult, error) { - return c.AssetFiltersListCompleteMatchingPredicate(ctx, id, AssetFilterOperationPredicate{}) -} - -// AssetFiltersListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AssetsAndAssetFiltersClient) AssetFiltersListCompleteMatchingPredicate(ctx context.Context, id AssetId, predicate AssetFilterOperationPredicate) (result AssetFiltersListCompleteResult, err error) { - items := make([]AssetFilter, 0) - - resp, err := c.AssetFiltersList(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = AssetFiltersListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfiltersupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfiltersupdate.go deleted file mode 100644 index 2a1014b4f8f76..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfiltersupdate.go +++ /dev/null @@ -1,58 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetFiltersUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AssetFilter -} - -// AssetFiltersUpdate ... -func (c AssetsAndAssetFiltersClient) AssetFiltersUpdate(ctx context.Context, id AssetFilterId, input AssetFilter) (result AssetFiltersUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model AssetFilter - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetscreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetscreateorupdate.go deleted file mode 100644 index 89aedab7073bb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetscreateorupdate.go +++ /dev/null @@ -1,59 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsCreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Asset -} - -// AssetsCreateOrUpdate ... -func (c AssetsAndAssetFiltersClient) AssetsCreateOrUpdate(ctx context.Context, id AssetId, input Asset) (result AssetsCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Asset - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsdelete.go deleted file mode 100644 index 76ff6c7f772bf..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsdelete.go +++ /dev/null @@ -1,47 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsDeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// AssetsDelete ... -func (c AssetsAndAssetFiltersClient) AssetsDelete(ctx context.Context, id AssetId) (result AssetsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsget.go deleted file mode 100644 index 0b1148a155f4e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsget.go +++ /dev/null @@ -1,54 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Asset -} - -// AssetsGet ... -func (c AssetsAndAssetFiltersClient) AssetsGet(ctx context.Context, id AssetId) (result AssetsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Asset - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsgetencryptionkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsgetencryptionkey.go deleted file mode 100644 index afbb605bfc56c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsgetencryptionkey.go +++ /dev/null @@ -1,55 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsGetEncryptionKeyOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *StorageEncryptedAssetDecryptionData -} - -// AssetsGetEncryptionKey ... -func (c AssetsAndAssetFiltersClient) AssetsGetEncryptionKey(ctx context.Context, id AssetId) (result AssetsGetEncryptionKeyOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getEncryptionKey", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model StorageEncryptedAssetDecryptionData - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetslist.go deleted file mode 100644 index dbcabd76de419..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetslist.go +++ /dev/null @@ -1,141 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]Asset -} - -type AssetsListCompleteResult struct { - LatestHttpResponse *http.Response - Items []Asset -} - -type AssetsListOperationOptions struct { - Filter *string - Orderby *string - Top *int64 -} - -func DefaultAssetsListOperationOptions() AssetsListOperationOptions { - return AssetsListOperationOptions{} -} - -func (o AssetsListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o AssetsListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o AssetsListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Filter != nil { - out.Append("$filter", fmt.Sprintf("%v", *o.Filter)) - } - if o.Orderby != nil { - out.Append("$orderby", fmt.Sprintf("%v", *o.Orderby)) - } - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -type AssetsListCustomPager struct { - NextLink *odata.Link `json:"@odata.nextLink"` -} - -func (p *AssetsListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// AssetsList ... -func (c AssetsAndAssetFiltersClient) AssetsList(ctx context.Context, id MediaServiceId, options AssetsListOperationOptions) (result AssetsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - OptionsObject: options, - Pager: &AssetsListCustomPager{}, - Path: fmt.Sprintf("%s/assets", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]Asset `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// AssetsListComplete retrieves all the results into a single object -func (c AssetsAndAssetFiltersClient) AssetsListComplete(ctx context.Context, id MediaServiceId, options AssetsListOperationOptions) (AssetsListCompleteResult, error) { - return c.AssetsListCompleteMatchingPredicate(ctx, id, options, AssetOperationPredicate{}) -} - -// AssetsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AssetsAndAssetFiltersClient) AssetsListCompleteMatchingPredicate(ctx context.Context, id MediaServiceId, options AssetsListOperationOptions, predicate AssetOperationPredicate) (result AssetsListCompleteResult, err error) { - items := make([]Asset, 0) - - resp, err := c.AssetsList(ctx, id, options) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = AssetsListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetslistcontainersas.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetslistcontainersas.go deleted file mode 100644 index 6b260dc998e55..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetslistcontainersas.go +++ /dev/null @@ -1,59 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsListContainerSasOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AssetContainerSas -} - -// AssetsListContainerSas ... -func (c AssetsAndAssetFiltersClient) AssetsListContainerSas(ctx context.Context, id AssetId, input ListContainerSasInput) (result AssetsListContainerSasOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listContainerSas", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model AssetContainerSas - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsliststreaminglocators.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsliststreaminglocators.go deleted file mode 100644 index bf0a792bdd0ee..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsliststreaminglocators.go +++ /dev/null @@ -1,55 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsListStreamingLocatorsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ListStreamingLocatorsResponse -} - -// AssetsListStreamingLocators ... -func (c AssetsAndAssetFiltersClient) AssetsListStreamingLocators(ctx context.Context, id AssetId) (result AssetsListStreamingLocatorsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listStreamingLocators", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ListStreamingLocatorsResponse - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsupdate.go deleted file mode 100644 index 43cc39feaf762..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsupdate.go +++ /dev/null @@ -1,58 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Asset -} - -// AssetsUpdate ... -func (c AssetsAndAssetFiltersClient) AssetsUpdate(ctx context.Context, id AssetId, input Asset) (result AssetsUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Asset - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_trackscreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_trackscreateorupdate.go deleted file mode 100644 index 1ca237ed38230..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_trackscreateorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TracksCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *AssetTrack -} - -// TracksCreateOrUpdate ... -func (c AssetsAndAssetFiltersClient) TracksCreateOrUpdate(ctx context.Context, id TrackId, input AssetTrack) (result TracksCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// TracksCreateOrUpdateThenPoll performs TracksCreateOrUpdate then polls until it's completed -func (c AssetsAndAssetFiltersClient) TracksCreateOrUpdateThenPoll(ctx context.Context, id TrackId, input AssetTrack) error { - result, err := c.TracksCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing TracksCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after TracksCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_tracksdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_tracksdelete.go deleted file mode 100644 index dea7472d06a94..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_tracksdelete.go +++ /dev/null @@ -1,70 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TracksDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// TracksDelete ... -func (c AssetsAndAssetFiltersClient) TracksDelete(ctx context.Context, id TrackId) (result TracksDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// TracksDeleteThenPoll performs TracksDelete then polls until it's completed -func (c AssetsAndAssetFiltersClient) TracksDeleteThenPoll(ctx context.Context, id TrackId) error { - result, err := c.TracksDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing TracksDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after TracksDelete: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_tracksget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_tracksget.go deleted file mode 100644 index e052691664933..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_tracksget.go +++ /dev/null @@ -1,54 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TracksGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AssetTrack -} - -// TracksGet ... -func (c AssetsAndAssetFiltersClient) TracksGet(ctx context.Context, id TrackId) (result TracksGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model AssetTrack - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_trackslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_trackslist.go deleted file mode 100644 index 308afb97c935b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_trackslist.go +++ /dev/null @@ -1,55 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TracksListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AssetTrackCollection -} - -// TracksList ... -func (c AssetsAndAssetFiltersClient) TracksList(ctx context.Context, id AssetId) (result TracksListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/tracks", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model AssetTrackCollection - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_tracksupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_tracksupdate.go deleted file mode 100644 index e018c79db7658..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_tracksupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TracksUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *AssetTrack -} - -// TracksUpdate ... -func (c AssetsAndAssetFiltersClient) TracksUpdate(ctx context.Context, id TrackId, input AssetTrack) (result TracksUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// TracksUpdateThenPoll performs TracksUpdate then polls until it's completed -func (c AssetsAndAssetFiltersClient) TracksUpdateThenPoll(ctx context.Context, id TrackId, input AssetTrack) error { - result, err := c.TracksUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing TracksUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after TracksUpdate: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_tracksupdatetrackdata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_tracksupdatetrackdata.go deleted file mode 100644 index 90026bab3e36a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/method_tracksupdatetrackdata.go +++ /dev/null @@ -1,69 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TracksUpdateTrackDataOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// TracksUpdateTrackData ... -func (c AssetsAndAssetFiltersClient) TracksUpdateTrackData(ctx context.Context, id TrackId) (result TracksUpdateTrackDataOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/updateTrackData", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// TracksUpdateTrackDataThenPoll performs TracksUpdateTrackData then polls until it's completed -func (c AssetsAndAssetFiltersClient) TracksUpdateTrackDataThenPoll(ctx context.Context, id TrackId) error { - result, err := c.TracksUpdateTrackData(ctx, id) - if err != nil { - return fmt.Errorf("performing TracksUpdateTrackData: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after TracksUpdateTrackData: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_asset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_asset.go deleted file mode 100644 index e28bbc5358def..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_asset.go +++ /dev/null @@ -1,16 +0,0 @@ -package assetsandassetfilters - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Asset struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AssetProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_assetcontainersas.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_assetcontainersas.go deleted file mode 100644 index af36c40966d4e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_assetcontainersas.go +++ /dev/null @@ -1,8 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetContainerSas struct { - AssetContainerSasUrls *[]string `json:"assetContainerSasUrls,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_assetfileencryptionmetadata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_assetfileencryptionmetadata.go deleted file mode 100644 index 75b8dccb16a47..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_assetfileencryptionmetadata.go +++ /dev/null @@ -1,10 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetFileEncryptionMetadata struct { - AssetFileId string `json:"assetFileId"` - AssetFileName *string `json:"assetFileName,omitempty"` - InitializationVector *string `json:"initializationVector,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_assetfilter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_assetfilter.go deleted file mode 100644 index 21cd7a2e7724f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_assetfilter.go +++ /dev/null @@ -1,16 +0,0 @@ -package assetsandassetfilters - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetFilter struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *MediaFilterProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_assetproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_assetproperties.go deleted file mode 100644 index 5127047160b8c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_assetproperties.go +++ /dev/null @@ -1,45 +0,0 @@ -package assetsandassetfilters - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetProperties struct { - AlternateId *string `json:"alternateId,omitempty"` - AssetId *string `json:"assetId,omitempty"` - Container *string `json:"container,omitempty"` - Created *string `json:"created,omitempty"` - Description *string `json:"description,omitempty"` - LastModified *string `json:"lastModified,omitempty"` - StorageAccountName *string `json:"storageAccountName,omitempty"` - StorageEncryptionFormat *AssetStorageEncryptionFormat `json:"storageEncryptionFormat,omitempty"` -} - -func (o *AssetProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *AssetProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *AssetProperties) GetLastModifiedAsTime() (*time.Time, error) { - if o.LastModified == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModified, "2006-01-02T15:04:05Z07:00") -} - -func (o *AssetProperties) SetLastModifiedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModified = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_assetstreaminglocator.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_assetstreaminglocator.go deleted file mode 100644 index d72048fce46eb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_assetstreaminglocator.go +++ /dev/null @@ -1,57 +0,0 @@ -package assetsandassetfilters - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetStreamingLocator struct { - AssetName *string `json:"assetName,omitempty"` - Created *string `json:"created,omitempty"` - DefaultContentKeyPolicyName *string `json:"defaultContentKeyPolicyName,omitempty"` - EndTime *string `json:"endTime,omitempty"` - Name *string `json:"name,omitempty"` - StartTime *string `json:"startTime,omitempty"` - StreamingLocatorId *string `json:"streamingLocatorId,omitempty"` - StreamingPolicyName *string `json:"streamingPolicyName,omitempty"` -} - -func (o *AssetStreamingLocator) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *AssetStreamingLocator) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *AssetStreamingLocator) GetEndTimeAsTime() (*time.Time, error) { - if o.EndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *AssetStreamingLocator) SetEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndTime = &formatted -} - -func (o *AssetStreamingLocator) GetStartTimeAsTime() (*time.Time, error) { - if o.StartTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *AssetStreamingLocator) SetStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartTime = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_assettrack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_assettrack.go deleted file mode 100644 index 0e2a19301f170..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_assettrack.go +++ /dev/null @@ -1,11 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetTrack struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AssetTrackProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_assettrackcollection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_assettrackcollection.go deleted file mode 100644 index 8cf532f70dfe4..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_assettrackcollection.go +++ /dev/null @@ -1,8 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetTrackCollection struct { - Value *[]AssetTrack `json:"value,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_assettrackproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_assettrackproperties.go deleted file mode 100644 index 54fa37667d382..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_assettrackproperties.go +++ /dev/null @@ -1,40 +0,0 @@ -package assetsandassetfilters - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetTrackProperties struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Track TrackBase `json:"track"` -} - -var _ json.Unmarshaler = &AssetTrackProperties{} - -func (s *AssetTrackProperties) UnmarshalJSON(bytes []byte) error { - type alias AssetTrackProperties - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into AssetTrackProperties: %+v", err) - } - - s.ProvisioningState = decoded.ProvisioningState - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling AssetTrackProperties into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["track"]; ok { - impl, err := unmarshalTrackBaseImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Track' for 'AssetTrackProperties': %+v", err) - } - s.Track = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_audiotrack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_audiotrack.go deleted file mode 100644 index b21ad65aefe0f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_audiotrack.go +++ /dev/null @@ -1,47 +0,0 @@ -package assetsandassetfilters - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ TrackBase = AudioTrack{} - -type AudioTrack struct { - BitRate *int64 `json:"bitRate,omitempty"` - DashSettings *DashSettings `json:"dashSettings,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - FileName *string `json:"fileName,omitempty"` - HlsSettings *HlsSettings `json:"hlsSettings,omitempty"` - LanguageCode *string `json:"languageCode,omitempty"` - Mpeg4TrackId *int64 `json:"mpeg4TrackId,omitempty"` - - // Fields inherited from TrackBase -} - -var _ json.Marshaler = AudioTrack{} - -func (s AudioTrack) MarshalJSON() ([]byte, error) { - type wrapper AudioTrack - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AudioTrack: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AudioTrack: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.AudioTrack" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AudioTrack: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_dashsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_dashsettings.go deleted file mode 100644 index 9e93feeed8491..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_dashsettings.go +++ /dev/null @@ -1,8 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DashSettings struct { - Role *string `json:"role,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_filtertrackpropertycondition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_filtertrackpropertycondition.go deleted file mode 100644 index cc9cd652d8bb8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_filtertrackpropertycondition.go +++ /dev/null @@ -1,10 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FilterTrackPropertyCondition struct { - Operation FilterTrackPropertyCompareOperation `json:"operation"` - Property FilterTrackPropertyType `json:"property"` - Value string `json:"value"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_filtertrackselection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_filtertrackselection.go deleted file mode 100644 index a8a78cd8dd36b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_filtertrackselection.go +++ /dev/null @@ -1,8 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FilterTrackSelection struct { - TrackSelections []FilterTrackPropertyCondition `json:"trackSelections"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_firstquality.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_firstquality.go deleted file mode 100644 index f8043a2c2625a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_firstquality.go +++ /dev/null @@ -1,8 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirstQuality struct { - Bitrate int64 `json:"bitrate"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_hlssettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_hlssettings.go deleted file mode 100644 index 7d6ef9316b414..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_hlssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HlsSettings struct { - Characteristics *string `json:"characteristics,omitempty"` - Default *bool `json:"default,omitempty"` - Forced *bool `json:"forced,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_listcontainersasinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_listcontainersasinput.go deleted file mode 100644 index 40c9e957818b9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_listcontainersasinput.go +++ /dev/null @@ -1,27 +0,0 @@ -package assetsandassetfilters - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListContainerSasInput struct { - ExpiryTime *string `json:"expiryTime,omitempty"` - Permissions *AssetContainerPermission `json:"permissions,omitempty"` -} - -func (o *ListContainerSasInput) GetExpiryTimeAsTime() (*time.Time, error) { - if o.ExpiryTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ExpiryTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *ListContainerSasInput) SetExpiryTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ExpiryTime = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_liststreaminglocatorsresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_liststreaminglocatorsresponse.go deleted file mode 100644 index 816c7e9dc16d1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_liststreaminglocatorsresponse.go +++ /dev/null @@ -1,8 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListStreamingLocatorsResponse struct { - StreamingLocators *[]AssetStreamingLocator `json:"streamingLocators,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_mediafilterproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_mediafilterproperties.go deleted file mode 100644 index 76f8bb211d07e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_mediafilterproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaFilterProperties struct { - FirstQuality *FirstQuality `json:"firstQuality,omitempty"` - PresentationTimeRange *PresentationTimeRange `json:"presentationTimeRange,omitempty"` - Tracks *[]FilterTrackSelection `json:"tracks,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_presentationtimerange.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_presentationtimerange.go deleted file mode 100644 index 37c9d4fd171d4..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_presentationtimerange.go +++ /dev/null @@ -1,13 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PresentationTimeRange struct { - EndTimestamp *int64 `json:"endTimestamp,omitempty"` - ForceEndTimestamp *bool `json:"forceEndTimestamp,omitempty"` - LiveBackoffDuration *int64 `json:"liveBackoffDuration,omitempty"` - PresentationWindowDuration *int64 `json:"presentationWindowDuration,omitempty"` - StartTimestamp *int64 `json:"startTimestamp,omitempty"` - Timescale *int64 `json:"timescale,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_storageencryptedassetdecryptiondata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_storageencryptedassetdecryptiondata.go deleted file mode 100644 index 33ae81cea0d16..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_storageencryptedassetdecryptiondata.go +++ /dev/null @@ -1,9 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StorageEncryptedAssetDecryptionData struct { - AssetFileEncryptionMetadata *[]AssetFileEncryptionMetadata `json:"assetFileEncryptionMetadata,omitempty"` - Key *string `json:"key,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_texttrack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_texttrack.go deleted file mode 100644 index 8be1279bab0c1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_texttrack.go +++ /dev/null @@ -1,45 +0,0 @@ -package assetsandassetfilters - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ TrackBase = TextTrack{} - -type TextTrack struct { - DisplayName *string `json:"displayName,omitempty"` - FileName *string `json:"fileName,omitempty"` - HlsSettings *HlsSettings `json:"hlsSettings,omitempty"` - LanguageCode *string `json:"languageCode,omitempty"` - PlayerVisibility *Visibility `json:"playerVisibility,omitempty"` - - // Fields inherited from TrackBase -} - -var _ json.Marshaler = TextTrack{} - -func (s TextTrack) MarshalJSON() ([]byte, error) { - type wrapper TextTrack - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling TextTrack: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling TextTrack: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.TextTrack" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling TextTrack: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_trackbase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_trackbase.go deleted file mode 100644 index 46a24e0d7cc39..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_trackbase.go +++ /dev/null @@ -1,69 +0,0 @@ -package assetsandassetfilters - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrackBase interface { -} - -// RawTrackBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawTrackBaseImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalTrackBaseImplementation(input []byte) (TrackBase, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling TrackBase into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.AudioTrack") { - var out AudioTrack - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AudioTrack: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.TextTrack") { - var out TextTrack - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into TextTrack: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.VideoTrack") { - var out VideoTrack - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into VideoTrack: %+v", err) - } - return out, nil - } - - out := RawTrackBaseImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_videotrack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_videotrack.go deleted file mode 100644 index c3a2548082db6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/model_videotrack.go +++ /dev/null @@ -1,40 +0,0 @@ -package assetsandassetfilters - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ TrackBase = VideoTrack{} - -type VideoTrack struct { - - // Fields inherited from TrackBase -} - -var _ json.Marshaler = VideoTrack{} - -func (s VideoTrack) MarshalJSON() ([]byte, error) { - type wrapper VideoTrack - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling VideoTrack: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling VideoTrack: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.VideoTrack" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling VideoTrack: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/predicates.go deleted file mode 100644 index edfee529cb2b8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/predicates.go +++ /dev/null @@ -1,50 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p AssetOperationPredicate) Matches(input Asset) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type AssetFilterOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p AssetFilterOperationPredicate) Matches(input AssetFilter) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/version.go deleted file mode 100644 index 978ce80b7ca7a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package assetsandassetfilters - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-08-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/assetsandassetfilters/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/client.go deleted file mode 100644 index 6e9b2a9e02212..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/client.go +++ /dev/null @@ -1,82 +0,0 @@ -package v2022_08_01 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -type Client struct { - AccountFilters *accountfilters.AccountFiltersClient - AssetsAndAssetFilters *assetsandassetfilters.AssetsAndAssetFiltersClient - ContentKeyPolicies *contentkeypolicies.ContentKeyPoliciesClient - LiveEvents *liveevents.LiveEventsClient - LiveOutputs *liveoutputs.LiveOutputsClient - StreamingEndpoints *streamingendpoints.StreamingEndpointsClient - StreamingPoliciesAndStreamingLocators *streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient -} - -func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { - accountFiltersClient, err := accountfilters.NewAccountFiltersClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building AccountFilters client: %+v", err) - } - configureFunc(accountFiltersClient.Client) - - assetsAndAssetFiltersClient, err := assetsandassetfilters.NewAssetsAndAssetFiltersClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building AssetsAndAssetFilters client: %+v", err) - } - configureFunc(assetsAndAssetFiltersClient.Client) - - contentKeyPoliciesClient, err := contentkeypolicies.NewContentKeyPoliciesClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ContentKeyPolicies client: %+v", err) - } - configureFunc(contentKeyPoliciesClient.Client) - - liveEventsClient, err := liveevents.NewLiveEventsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building LiveEvents client: %+v", err) - } - configureFunc(liveEventsClient.Client) - - liveOutputsClient, err := liveoutputs.NewLiveOutputsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building LiveOutputs client: %+v", err) - } - configureFunc(liveOutputsClient.Client) - - streamingEndpointsClient, err := streamingendpoints.NewStreamingEndpointsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building StreamingEndpoints client: %+v", err) - } - configureFunc(streamingEndpointsClient.Client) - - streamingPoliciesAndStreamingLocatorsClient, err := streamingpoliciesandstreaminglocators.NewStreamingPoliciesAndStreamingLocatorsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building StreamingPoliciesAndStreamingLocators client: %+v", err) - } - configureFunc(streamingPoliciesAndStreamingLocatorsClient.Client) - - return &Client{ - AccountFilters: accountFiltersClient, - AssetsAndAssetFilters: assetsAndAssetFiltersClient, - ContentKeyPolicies: contentKeyPoliciesClient, - LiveEvents: liveEventsClient, - LiveOutputs: liveOutputsClient, - StreamingEndpoints: streamingEndpointsClient, - StreamingPoliciesAndStreamingLocators: streamingPoliciesAndStreamingLocatorsClient, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/README.md deleted file mode 100644 index d83c94df0911c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/README.md +++ /dev/null @@ -1,127 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies` Documentation - -The `contentkeypolicies` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2022-08-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies" -``` - - -### Client Initialization - -```go -client := contentkeypolicies.NewContentKeyPoliciesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ContentKeyPoliciesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := contentkeypolicies.NewContentKeyPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "contentKeyPolicyValue") - -payload := contentkeypolicies.ContentKeyPolicy{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ContentKeyPoliciesClient.Delete` - -```go -ctx := context.TODO() -id := contentkeypolicies.NewContentKeyPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "contentKeyPolicyValue") - -read, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ContentKeyPoliciesClient.Get` - -```go -ctx := context.TODO() -id := contentkeypolicies.NewContentKeyPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "contentKeyPolicyValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ContentKeyPoliciesClient.GetPolicyPropertiesWithSecrets` - -```go -ctx := context.TODO() -id := contentkeypolicies.NewContentKeyPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "contentKeyPolicyValue") - -read, err := client.GetPolicyPropertiesWithSecrets(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ContentKeyPoliciesClient.List` - -```go -ctx := context.TODO() -id := contentkeypolicies.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -// alternatively `client.List(ctx, id, contentkeypolicies.DefaultListOperationOptions())` can be used to do batched pagination -items, err := client.ListComplete(ctx, id, contentkeypolicies.DefaultListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ContentKeyPoliciesClient.Update` - -```go -ctx := context.TODO() -id := contentkeypolicies.NewContentKeyPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "contentKeyPolicyValue") - -payload := contentkeypolicies.ContentKeyPolicy{ - // ... -} - - -read, err := client.Update(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/client.go deleted file mode 100644 index 528842e6d8aa1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package contentkeypolicies - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPoliciesClient struct { - Client *resourcemanager.Client -} - -func NewContentKeyPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ContentKeyPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "contentkeypolicies", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ContentKeyPoliciesClient: %+v", err) - } - - return &ContentKeyPoliciesClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/constants.go deleted file mode 100644 index bddc5b53896dc..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/constants.go +++ /dev/null @@ -1,289 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyFairPlayRentalAndLeaseKeyType string - -const ( - ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeDualExpiry ContentKeyPolicyFairPlayRentalAndLeaseKeyType = "DualExpiry" - ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentLimited ContentKeyPolicyFairPlayRentalAndLeaseKeyType = "PersistentLimited" - ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentUnlimited ContentKeyPolicyFairPlayRentalAndLeaseKeyType = "PersistentUnlimited" - ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUndefined ContentKeyPolicyFairPlayRentalAndLeaseKeyType = "Undefined" - ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUnknown ContentKeyPolicyFairPlayRentalAndLeaseKeyType = "Unknown" -) - -func PossibleValuesForContentKeyPolicyFairPlayRentalAndLeaseKeyType() []string { - return []string{ - string(ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeDualExpiry), - string(ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentLimited), - string(ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentUnlimited), - string(ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUndefined), - string(ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUnknown), - } -} - -func (s *ContentKeyPolicyFairPlayRentalAndLeaseKeyType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseContentKeyPolicyFairPlayRentalAndLeaseKeyType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseContentKeyPolicyFairPlayRentalAndLeaseKeyType(input string) (*ContentKeyPolicyFairPlayRentalAndLeaseKeyType, error) { - vals := map[string]ContentKeyPolicyFairPlayRentalAndLeaseKeyType{ - "dualexpiry": ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeDualExpiry, - "persistentlimited": ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentLimited, - "persistentunlimited": ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentUnlimited, - "undefined": ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUndefined, - "unknown": ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ContentKeyPolicyFairPlayRentalAndLeaseKeyType(input) - return &out, nil -} - -type ContentKeyPolicyPlayReadyContentType string - -const ( - ContentKeyPolicyPlayReadyContentTypeUltraVioletDownload ContentKeyPolicyPlayReadyContentType = "UltraVioletDownload" - ContentKeyPolicyPlayReadyContentTypeUltraVioletStreaming ContentKeyPolicyPlayReadyContentType = "UltraVioletStreaming" - ContentKeyPolicyPlayReadyContentTypeUnknown ContentKeyPolicyPlayReadyContentType = "Unknown" - ContentKeyPolicyPlayReadyContentTypeUnspecified ContentKeyPolicyPlayReadyContentType = "Unspecified" -) - -func PossibleValuesForContentKeyPolicyPlayReadyContentType() []string { - return []string{ - string(ContentKeyPolicyPlayReadyContentTypeUltraVioletDownload), - string(ContentKeyPolicyPlayReadyContentTypeUltraVioletStreaming), - string(ContentKeyPolicyPlayReadyContentTypeUnknown), - string(ContentKeyPolicyPlayReadyContentTypeUnspecified), - } -} - -func (s *ContentKeyPolicyPlayReadyContentType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseContentKeyPolicyPlayReadyContentType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseContentKeyPolicyPlayReadyContentType(input string) (*ContentKeyPolicyPlayReadyContentType, error) { - vals := map[string]ContentKeyPolicyPlayReadyContentType{ - "ultravioletdownload": ContentKeyPolicyPlayReadyContentTypeUltraVioletDownload, - "ultravioletstreaming": ContentKeyPolicyPlayReadyContentTypeUltraVioletStreaming, - "unknown": ContentKeyPolicyPlayReadyContentTypeUnknown, - "unspecified": ContentKeyPolicyPlayReadyContentTypeUnspecified, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ContentKeyPolicyPlayReadyContentType(input) - return &out, nil -} - -type ContentKeyPolicyPlayReadyLicenseType string - -const ( - ContentKeyPolicyPlayReadyLicenseTypeNonPersistent ContentKeyPolicyPlayReadyLicenseType = "NonPersistent" - ContentKeyPolicyPlayReadyLicenseTypePersistent ContentKeyPolicyPlayReadyLicenseType = "Persistent" - ContentKeyPolicyPlayReadyLicenseTypeUnknown ContentKeyPolicyPlayReadyLicenseType = "Unknown" -) - -func PossibleValuesForContentKeyPolicyPlayReadyLicenseType() []string { - return []string{ - string(ContentKeyPolicyPlayReadyLicenseTypeNonPersistent), - string(ContentKeyPolicyPlayReadyLicenseTypePersistent), - string(ContentKeyPolicyPlayReadyLicenseTypeUnknown), - } -} - -func (s *ContentKeyPolicyPlayReadyLicenseType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseContentKeyPolicyPlayReadyLicenseType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseContentKeyPolicyPlayReadyLicenseType(input string) (*ContentKeyPolicyPlayReadyLicenseType, error) { - vals := map[string]ContentKeyPolicyPlayReadyLicenseType{ - "nonpersistent": ContentKeyPolicyPlayReadyLicenseTypeNonPersistent, - "persistent": ContentKeyPolicyPlayReadyLicenseTypePersistent, - "unknown": ContentKeyPolicyPlayReadyLicenseTypeUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ContentKeyPolicyPlayReadyLicenseType(input) - return &out, nil -} - -type ContentKeyPolicyPlayReadyUnknownOutputPassingOption string - -const ( - ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowed ContentKeyPolicyPlayReadyUnknownOutputPassingOption = "Allowed" - ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowedWithVideoConstriction ContentKeyPolicyPlayReadyUnknownOutputPassingOption = "AllowedWithVideoConstriction" - ContentKeyPolicyPlayReadyUnknownOutputPassingOptionNotAllowed ContentKeyPolicyPlayReadyUnknownOutputPassingOption = "NotAllowed" - ContentKeyPolicyPlayReadyUnknownOutputPassingOptionUnknown ContentKeyPolicyPlayReadyUnknownOutputPassingOption = "Unknown" -) - -func PossibleValuesForContentKeyPolicyPlayReadyUnknownOutputPassingOption() []string { - return []string{ - string(ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowed), - string(ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowedWithVideoConstriction), - string(ContentKeyPolicyPlayReadyUnknownOutputPassingOptionNotAllowed), - string(ContentKeyPolicyPlayReadyUnknownOutputPassingOptionUnknown), - } -} - -func (s *ContentKeyPolicyPlayReadyUnknownOutputPassingOption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseContentKeyPolicyPlayReadyUnknownOutputPassingOption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseContentKeyPolicyPlayReadyUnknownOutputPassingOption(input string) (*ContentKeyPolicyPlayReadyUnknownOutputPassingOption, error) { - vals := map[string]ContentKeyPolicyPlayReadyUnknownOutputPassingOption{ - "allowed": ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowed, - "allowedwithvideoconstriction": ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowedWithVideoConstriction, - "notallowed": ContentKeyPolicyPlayReadyUnknownOutputPassingOptionNotAllowed, - "unknown": ContentKeyPolicyPlayReadyUnknownOutputPassingOptionUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ContentKeyPolicyPlayReadyUnknownOutputPassingOption(input) - return &out, nil -} - -type ContentKeyPolicyRestrictionTokenType string - -const ( - ContentKeyPolicyRestrictionTokenTypeJwt ContentKeyPolicyRestrictionTokenType = "Jwt" - ContentKeyPolicyRestrictionTokenTypeSwt ContentKeyPolicyRestrictionTokenType = "Swt" - ContentKeyPolicyRestrictionTokenTypeUnknown ContentKeyPolicyRestrictionTokenType = "Unknown" -) - -func PossibleValuesForContentKeyPolicyRestrictionTokenType() []string { - return []string{ - string(ContentKeyPolicyRestrictionTokenTypeJwt), - string(ContentKeyPolicyRestrictionTokenTypeSwt), - string(ContentKeyPolicyRestrictionTokenTypeUnknown), - } -} - -func (s *ContentKeyPolicyRestrictionTokenType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseContentKeyPolicyRestrictionTokenType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseContentKeyPolicyRestrictionTokenType(input string) (*ContentKeyPolicyRestrictionTokenType, error) { - vals := map[string]ContentKeyPolicyRestrictionTokenType{ - "jwt": ContentKeyPolicyRestrictionTokenTypeJwt, - "swt": ContentKeyPolicyRestrictionTokenTypeSwt, - "unknown": ContentKeyPolicyRestrictionTokenTypeUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ContentKeyPolicyRestrictionTokenType(input) - return &out, nil -} - -type SecurityLevel string - -const ( - SecurityLevelSLOneFiveZero SecurityLevel = "SL150" - SecurityLevelSLThreeThousand SecurityLevel = "SL3000" - SecurityLevelSLTwoThousand SecurityLevel = "SL2000" - SecurityLevelUnknown SecurityLevel = "Unknown" -) - -func PossibleValuesForSecurityLevel() []string { - return []string{ - string(SecurityLevelSLOneFiveZero), - string(SecurityLevelSLThreeThousand), - string(SecurityLevelSLTwoThousand), - string(SecurityLevelUnknown), - } -} - -func (s *SecurityLevel) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityLevel(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityLevel(input string) (*SecurityLevel, error) { - vals := map[string]SecurityLevel{ - "sl150": SecurityLevelSLOneFiveZero, - "sl3000": SecurityLevelSLThreeThousand, - "sl2000": SecurityLevelSLTwoThousand, - "unknown": SecurityLevelUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityLevel(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/id_contentkeypolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/id_contentkeypolicy.go deleted file mode 100644 index f96b6b7060829..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/id_contentkeypolicy.go +++ /dev/null @@ -1,139 +0,0 @@ -package contentkeypolicies - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&ContentKeyPolicyId{}) -} - -var _ resourceids.ResourceId = &ContentKeyPolicyId{} - -// ContentKeyPolicyId is a struct representing the Resource ID for a Content Key Policy -type ContentKeyPolicyId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - ContentKeyPolicyName string -} - -// NewContentKeyPolicyID returns a new ContentKeyPolicyId struct -func NewContentKeyPolicyID(subscriptionId string, resourceGroupName string, mediaServiceName string, contentKeyPolicyName string) ContentKeyPolicyId { - return ContentKeyPolicyId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - ContentKeyPolicyName: contentKeyPolicyName, - } -} - -// ParseContentKeyPolicyID parses 'input' into a ContentKeyPolicyId -func ParseContentKeyPolicyID(input string) (*ContentKeyPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(&ContentKeyPolicyId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ContentKeyPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseContentKeyPolicyIDInsensitively parses 'input' case-insensitively into a ContentKeyPolicyId -// note: this method should only be used for API response data and not user input -func ParseContentKeyPolicyIDInsensitively(input string) (*ContentKeyPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(&ContentKeyPolicyId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ContentKeyPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *ContentKeyPolicyId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.ContentKeyPolicyName, ok = input.Parsed["contentKeyPolicyName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "contentKeyPolicyName", input) - } - - return nil -} - -// ValidateContentKeyPolicyID checks that 'input' can be parsed as a Content Key Policy ID -func ValidateContentKeyPolicyID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseContentKeyPolicyID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Content Key Policy ID -func (id ContentKeyPolicyId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/contentKeyPolicies/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.ContentKeyPolicyName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Content Key Policy ID -func (id ContentKeyPolicyId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticContentKeyPolicies", "contentKeyPolicies", "contentKeyPolicies"), - resourceids.UserSpecifiedSegment("contentKeyPolicyName", "contentKeyPolicyValue"), - } -} - -// String returns a human-readable description of this Content Key Policy ID -func (id ContentKeyPolicyId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Content Key Policy Name: %q", id.ContentKeyPolicyName), - } - return fmt.Sprintf("Content Key Policy (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/id_mediaservice.go deleted file mode 100644 index abd916a436f9c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/id_mediaservice.go +++ /dev/null @@ -1,130 +0,0 @@ -package contentkeypolicies - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&MediaServiceId{}) -} - -var _ resourceids.ResourceId = &MediaServiceId{} - -// MediaServiceId is a struct representing the Resource ID for a Media Service -type MediaServiceId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string -} - -// NewMediaServiceID returns a new MediaServiceId struct -func NewMediaServiceID(subscriptionId string, resourceGroupName string, mediaServiceName string) MediaServiceId { - return MediaServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - } -} - -// ParseMediaServiceID parses 'input' into a MediaServiceId -func ParseMediaServiceID(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseMediaServiceIDInsensitively parses 'input' case-insensitively into a MediaServiceId -// note: this method should only be used for API response data and not user input -func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *MediaServiceId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - return nil -} - -// ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID -func ValidateMediaServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMediaServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Media Service ID -func (id MediaServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Media Service ID -func (id MediaServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - } -} - -// String returns a human-readable description of this Media Service ID -func (id MediaServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - } - return fmt.Sprintf("Media Service (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/method_createorupdate.go deleted file mode 100644 index 77d0e3abcde78..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/method_createorupdate.go +++ /dev/null @@ -1,59 +0,0 @@ -package contentkeypolicies - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ContentKeyPolicy -} - -// CreateOrUpdate ... -func (c ContentKeyPoliciesClient) CreateOrUpdate(ctx context.Context, id ContentKeyPolicyId, input ContentKeyPolicy) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ContentKeyPolicy - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/method_delete.go deleted file mode 100644 index db4ae9dd0035b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/method_delete.go +++ /dev/null @@ -1,47 +0,0 @@ -package contentkeypolicies - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ContentKeyPoliciesClient) Delete(ctx context.Context, id ContentKeyPolicyId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/method_get.go deleted file mode 100644 index 419eb2bb9a480..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/method_get.go +++ /dev/null @@ -1,54 +0,0 @@ -package contentkeypolicies - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ContentKeyPolicy -} - -// Get ... -func (c ContentKeyPoliciesClient) Get(ctx context.Context, id ContentKeyPolicyId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ContentKeyPolicy - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/method_getpolicypropertieswithsecrets.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/method_getpolicypropertieswithsecrets.go deleted file mode 100644 index 2c60617e1c92e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/method_getpolicypropertieswithsecrets.go +++ /dev/null @@ -1,55 +0,0 @@ -package contentkeypolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetPolicyPropertiesWithSecretsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ContentKeyPolicyProperties -} - -// GetPolicyPropertiesWithSecrets ... -func (c ContentKeyPoliciesClient) GetPolicyPropertiesWithSecrets(ctx context.Context, id ContentKeyPolicyId) (result GetPolicyPropertiesWithSecretsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getPolicyPropertiesWithSecrets", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ContentKeyPolicyProperties - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/method_list.go deleted file mode 100644 index 05399ba40fef9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/method_list.go +++ /dev/null @@ -1,141 +0,0 @@ -package contentkeypolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ContentKeyPolicy -} - -type ListCompleteResult struct { - LatestHttpResponse *http.Response - Items []ContentKeyPolicy -} - -type ListOperationOptions struct { - Filter *string - Orderby *string - Top *int64 -} - -func DefaultListOperationOptions() ListOperationOptions { - return ListOperationOptions{} -} - -func (o ListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Filter != nil { - out.Append("$filter", fmt.Sprintf("%v", *o.Filter)) - } - if o.Orderby != nil { - out.Append("$orderby", fmt.Sprintf("%v", *o.Orderby)) - } - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -type ListCustomPager struct { - NextLink *odata.Link `json:"@odata.nextLink"` -} - -func (p *ListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// List ... -func (c ContentKeyPoliciesClient) List(ctx context.Context, id MediaServiceId, options ListOperationOptions) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - OptionsObject: options, - Pager: &ListCustomPager{}, - Path: fmt.Sprintf("%s/contentKeyPolicies", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ContentKeyPolicy `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ContentKeyPoliciesClient) ListComplete(ctx context.Context, id MediaServiceId, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, options, ContentKeyPolicyOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ContentKeyPoliciesClient) ListCompleteMatchingPredicate(ctx context.Context, id MediaServiceId, options ListOperationOptions, predicate ContentKeyPolicyOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ContentKeyPolicy, 0) - - resp, err := c.List(ctx, id, options) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/method_update.go deleted file mode 100644 index d3b82b3e042b8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/method_update.go +++ /dev/null @@ -1,58 +0,0 @@ -package contentkeypolicies - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ContentKeyPolicy -} - -// Update ... -func (c ContentKeyPoliciesClient) Update(ctx context.Context, id ContentKeyPolicyId, input ContentKeyPolicy) (result UpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ContentKeyPolicy - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicy.go deleted file mode 100644 index ddca04cc83cba..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicy.go +++ /dev/null @@ -1,16 +0,0 @@ -package contentkeypolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicy struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ContentKeyPolicyProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyclearkeyconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyclearkeyconfiguration.go deleted file mode 100644 index 9cc26cd28e8bb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyclearkeyconfiguration.go +++ /dev/null @@ -1,40 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyConfiguration = ContentKeyPolicyClearKeyConfiguration{} - -type ContentKeyPolicyClearKeyConfiguration struct { - - // Fields inherited from ContentKeyPolicyConfiguration -} - -var _ json.Marshaler = ContentKeyPolicyClearKeyConfiguration{} - -func (s ContentKeyPolicyClearKeyConfiguration) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyClearKeyConfiguration - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyClearKeyConfiguration: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyClearKeyConfiguration: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyClearKeyConfiguration: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyconfiguration.go deleted file mode 100644 index bdd6a1d25333e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyconfiguration.go +++ /dev/null @@ -1,85 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyConfiguration interface { -} - -// RawContentKeyPolicyConfigurationImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawContentKeyPolicyConfigurationImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalContentKeyPolicyConfigurationImplementation(input []byte) (ContentKeyPolicyConfiguration, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyConfiguration into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration") { - var out ContentKeyPolicyClearKeyConfiguration - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyClearKeyConfiguration: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyFairPlayConfiguration") { - var out ContentKeyPolicyFairPlayConfiguration - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyFairPlayConfiguration: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyPlayReadyConfiguration") { - var out ContentKeyPolicyPlayReadyConfiguration - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyPlayReadyConfiguration: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyUnknownConfiguration") { - var out ContentKeyPolicyUnknownConfiguration - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyUnknownConfiguration: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyWidevineConfiguration") { - var out ContentKeyPolicyWidevineConfiguration - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyWidevineConfiguration: %+v", err) - } - return out, nil - } - - out := RawContentKeyPolicyConfigurationImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyfairplayconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyfairplayconfiguration.go deleted file mode 100644 index f7983ee301a53..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyfairplayconfiguration.go +++ /dev/null @@ -1,46 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyConfiguration = ContentKeyPolicyFairPlayConfiguration{} - -type ContentKeyPolicyFairPlayConfiguration struct { - Ask string `json:"ask"` - FairPlayPfx string `json:"fairPlayPfx"` - FairPlayPfxPassword string `json:"fairPlayPfxPassword"` - OfflineRentalConfiguration *ContentKeyPolicyFairPlayOfflineRentalConfiguration `json:"offlineRentalConfiguration,omitempty"` - RentalAndLeaseKeyType ContentKeyPolicyFairPlayRentalAndLeaseKeyType `json:"rentalAndLeaseKeyType"` - RentalDuration int64 `json:"rentalDuration"` - - // Fields inherited from ContentKeyPolicyConfiguration -} - -var _ json.Marshaler = ContentKeyPolicyFairPlayConfiguration{} - -func (s ContentKeyPolicyFairPlayConfiguration) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyFairPlayConfiguration - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyFairPlayConfiguration: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyFairPlayConfiguration: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyFairPlayConfiguration" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyFairPlayConfiguration: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyfairplayofflinerentalconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyfairplayofflinerentalconfiguration.go deleted file mode 100644 index 63337b098e7db..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyfairplayofflinerentalconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package contentkeypolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyFairPlayOfflineRentalConfiguration struct { - PlaybackDurationSeconds int64 `json:"playbackDurationSeconds"` - StorageDurationSeconds int64 `json:"storageDurationSeconds"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyopenrestriction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyopenrestriction.go deleted file mode 100644 index 4a5e74404b160..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyopenrestriction.go +++ /dev/null @@ -1,40 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyRestriction = ContentKeyPolicyOpenRestriction{} - -type ContentKeyPolicyOpenRestriction struct { - - // Fields inherited from ContentKeyPolicyRestriction -} - -var _ json.Marshaler = ContentKeyPolicyOpenRestriction{} - -func (s ContentKeyPolicyOpenRestriction) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyOpenRestriction - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyOpenRestriction: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyOpenRestriction: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyOpenRestriction" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyOpenRestriction: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyoption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyoption.go deleted file mode 100644 index 687ed9dd6c886..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyoption.go +++ /dev/null @@ -1,51 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyOption struct { - Configuration ContentKeyPolicyConfiguration `json:"configuration"` - Name *string `json:"name,omitempty"` - PolicyOptionId *string `json:"policyOptionId,omitempty"` - Restriction ContentKeyPolicyRestriction `json:"restriction"` -} - -var _ json.Unmarshaler = &ContentKeyPolicyOption{} - -func (s *ContentKeyPolicyOption) UnmarshalJSON(bytes []byte) error { - type alias ContentKeyPolicyOption - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into ContentKeyPolicyOption: %+v", err) - } - - s.Name = decoded.Name - s.PolicyOptionId = decoded.PolicyOptionId - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ContentKeyPolicyOption into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["configuration"]; ok { - impl, err := unmarshalContentKeyPolicyConfigurationImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Configuration' for 'ContentKeyPolicyOption': %+v", err) - } - s.Configuration = impl - } - - if v, ok := temp["restriction"]; ok { - impl, err := unmarshalContentKeyPolicyRestrictionImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Restriction' for 'ContentKeyPolicyOption': %+v", err) - } - s.Restriction = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadyconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadyconfiguration.go deleted file mode 100644 index 3f609b4a8da45..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadyconfiguration.go +++ /dev/null @@ -1,42 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyConfiguration = ContentKeyPolicyPlayReadyConfiguration{} - -type ContentKeyPolicyPlayReadyConfiguration struct { - Licenses []ContentKeyPolicyPlayReadyLicense `json:"licenses"` - ResponseCustomData *string `json:"responseCustomData,omitempty"` - - // Fields inherited from ContentKeyPolicyConfiguration -} - -var _ json.Marshaler = ContentKeyPolicyPlayReadyConfiguration{} - -func (s ContentKeyPolicyPlayReadyConfiguration) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyPlayReadyConfiguration - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyPlayReadyConfiguration: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyPlayReadyConfiguration: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyPlayReadyConfiguration" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyPlayReadyConfiguration: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromheader.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromheader.go deleted file mode 100644 index 1795b14bc22b3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromheader.go +++ /dev/null @@ -1,40 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyPlayReadyContentKeyLocation = ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader{} - -type ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader struct { - - // Fields inherited from ContentKeyPolicyPlayReadyContentKeyLocation -} - -var _ json.Marshaler = ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader{} - -func (s ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromkeyidentifier.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromkeyidentifier.go deleted file mode 100644 index 91ed242963b5e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromkeyidentifier.go +++ /dev/null @@ -1,41 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyPlayReadyContentKeyLocation = ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier{} - -type ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier struct { - KeyId string `json:"keyId"` - - // Fields inherited from ContentKeyPolicyPlayReadyContentKeyLocation -} - -var _ json.Marshaler = ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier{} - -func (s ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadycontentkeylocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadycontentkeylocation.go deleted file mode 100644 index 4966f524297ff..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadycontentkeylocation.go +++ /dev/null @@ -1,61 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyPlayReadyContentKeyLocation interface { -} - -// RawContentKeyPolicyPlayReadyContentKeyLocationImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawContentKeyPolicyPlayReadyContentKeyLocationImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalContentKeyPolicyPlayReadyContentKeyLocationImplementation(input []byte) (ContentKeyPolicyPlayReadyContentKeyLocation, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyPlayReadyContentKeyLocation into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader") { - var out ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier") { - var out ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier: %+v", err) - } - return out, nil - } - - out := RawContentKeyPolicyPlayReadyContentKeyLocationImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadyexplicitanalogtelevisionrestriction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadyexplicitanalogtelevisionrestriction.go deleted file mode 100644 index 8720a1e96ff07..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadyexplicitanalogtelevisionrestriction.go +++ /dev/null @@ -1,9 +0,0 @@ -package contentkeypolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction struct { - BestEffort bool `json:"bestEffort"` - ConfigurationData int64 `json:"configurationData"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadylicense.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadylicense.go deleted file mode 100644 index 119789116b250..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadylicense.go +++ /dev/null @@ -1,85 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyPlayReadyLicense struct { - AllowTestDevices bool `json:"allowTestDevices"` - BeginDate *string `json:"beginDate,omitempty"` - ContentKeyLocation ContentKeyPolicyPlayReadyContentKeyLocation `json:"contentKeyLocation"` - ContentType ContentKeyPolicyPlayReadyContentType `json:"contentType"` - ExpirationDate *string `json:"expirationDate,omitempty"` - GracePeriod *string `json:"gracePeriod,omitempty"` - LicenseType ContentKeyPolicyPlayReadyLicenseType `json:"licenseType"` - PlayRight *ContentKeyPolicyPlayReadyPlayRight `json:"playRight,omitempty"` - RelativeBeginDate *string `json:"relativeBeginDate,omitempty"` - RelativeExpirationDate *string `json:"relativeExpirationDate,omitempty"` - SecurityLevel *SecurityLevel `json:"securityLevel,omitempty"` -} - -func (o *ContentKeyPolicyPlayReadyLicense) GetBeginDateAsTime() (*time.Time, error) { - if o.BeginDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.BeginDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *ContentKeyPolicyPlayReadyLicense) SetBeginDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.BeginDate = &formatted -} - -func (o *ContentKeyPolicyPlayReadyLicense) GetExpirationDateAsTime() (*time.Time, error) { - if o.ExpirationDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ExpirationDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *ContentKeyPolicyPlayReadyLicense) SetExpirationDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ExpirationDate = &formatted -} - -var _ json.Unmarshaler = &ContentKeyPolicyPlayReadyLicense{} - -func (s *ContentKeyPolicyPlayReadyLicense) UnmarshalJSON(bytes []byte) error { - type alias ContentKeyPolicyPlayReadyLicense - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into ContentKeyPolicyPlayReadyLicense: %+v", err) - } - - s.AllowTestDevices = decoded.AllowTestDevices - s.BeginDate = decoded.BeginDate - s.ContentType = decoded.ContentType - s.ExpirationDate = decoded.ExpirationDate - s.GracePeriod = decoded.GracePeriod - s.LicenseType = decoded.LicenseType - s.PlayRight = decoded.PlayRight - s.RelativeBeginDate = decoded.RelativeBeginDate - s.RelativeExpirationDate = decoded.RelativeExpirationDate - s.SecurityLevel = decoded.SecurityLevel - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ContentKeyPolicyPlayReadyLicense into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["contentKeyLocation"]; ok { - impl, err := unmarshalContentKeyPolicyPlayReadyContentKeyLocationImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'ContentKeyLocation' for 'ContentKeyPolicyPlayReadyLicense': %+v", err) - } - s.ContentKeyLocation = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadyplayright.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadyplayright.go deleted file mode 100644 index 315378b0a22c0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadyplayright.go +++ /dev/null @@ -1,20 +0,0 @@ -package contentkeypolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyPlayReadyPlayRight struct { - AgcAndColorStripeRestriction *int64 `json:"agcAndColorStripeRestriction,omitempty"` - AllowPassingVideoContentToUnknownOutput ContentKeyPolicyPlayReadyUnknownOutputPassingOption `json:"allowPassingVideoContentToUnknownOutput"` - AnalogVideoOpl *int64 `json:"analogVideoOpl,omitempty"` - CompressedDigitalAudioOpl *int64 `json:"compressedDigitalAudioOpl,omitempty"` - CompressedDigitalVideoOpl *int64 `json:"compressedDigitalVideoOpl,omitempty"` - DigitalVideoOnlyContentRestriction bool `json:"digitalVideoOnlyContentRestriction"` - ExplicitAnalogTelevisionOutputRestriction *ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction `json:"explicitAnalogTelevisionOutputRestriction,omitempty"` - FirstPlayExpiration *string `json:"firstPlayExpiration,omitempty"` - ImageConstraintForAnalogComponentVideoRestriction bool `json:"imageConstraintForAnalogComponentVideoRestriction"` - ImageConstraintForAnalogComputerMonitorRestriction bool `json:"imageConstraintForAnalogComputerMonitorRestriction"` - ScmsRestriction *int64 `json:"scmsRestriction,omitempty"` - UncompressedDigitalAudioOpl *int64 `json:"uncompressedDigitalAudioOpl,omitempty"` - UncompressedDigitalVideoOpl *int64 `json:"uncompressedDigitalVideoOpl,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyproperties.go deleted file mode 100644 index af3576dec79d8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyproperties.go +++ /dev/null @@ -1,42 +0,0 @@ -package contentkeypolicies - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyProperties struct { - Created *string `json:"created,omitempty"` - Description *string `json:"description,omitempty"` - LastModified *string `json:"lastModified,omitempty"` - Options []ContentKeyPolicyOption `json:"options"` - PolicyId *string `json:"policyId,omitempty"` -} - -func (o *ContentKeyPolicyProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *ContentKeyPolicyProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *ContentKeyPolicyProperties) GetLastModifiedAsTime() (*time.Time, error) { - if o.LastModified == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModified, "2006-01-02T15:04:05Z07:00") -} - -func (o *ContentKeyPolicyProperties) SetLastModifiedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModified = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyrestriction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyrestriction.go deleted file mode 100644 index 1f3ab4d83cf8e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyrestriction.go +++ /dev/null @@ -1,69 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyRestriction interface { -} - -// RawContentKeyPolicyRestrictionImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawContentKeyPolicyRestrictionImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalContentKeyPolicyRestrictionImplementation(input []byte) (ContentKeyPolicyRestriction, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyRestriction into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyOpenRestriction") { - var out ContentKeyPolicyOpenRestriction - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyOpenRestriction: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyTokenRestriction") { - var out ContentKeyPolicyTokenRestriction - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyTokenRestriction: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyUnknownRestriction") { - var out ContentKeyPolicyUnknownRestriction - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyUnknownRestriction: %+v", err) - } - return out, nil - } - - out := RawContentKeyPolicyRestrictionImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyrestrictiontokenkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyrestrictiontokenkey.go deleted file mode 100644 index 6d8a4e938da3e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyrestrictiontokenkey.go +++ /dev/null @@ -1,69 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyRestrictionTokenKey interface { -} - -// RawContentKeyPolicyRestrictionTokenKeyImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawContentKeyPolicyRestrictionTokenKeyImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalContentKeyPolicyRestrictionTokenKeyImplementation(input []byte) (ContentKeyPolicyRestrictionTokenKey, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyRestrictionTokenKey into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyRsaTokenKey") { - var out ContentKeyPolicyRsaTokenKey - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyRsaTokenKey: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicySymmetricTokenKey") { - var out ContentKeyPolicySymmetricTokenKey - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicySymmetricTokenKey: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyX509CertificateTokenKey") { - var out ContentKeyPolicyX509CertificateTokenKey - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyX509CertificateTokenKey: %+v", err) - } - return out, nil - } - - out := RawContentKeyPolicyRestrictionTokenKeyImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyrsatokenkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyrsatokenkey.go deleted file mode 100644 index 75dc037576d1f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyrsatokenkey.go +++ /dev/null @@ -1,42 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyRestrictionTokenKey = ContentKeyPolicyRsaTokenKey{} - -type ContentKeyPolicyRsaTokenKey struct { - Exponent string `json:"exponent"` - Modulus string `json:"modulus"` - - // Fields inherited from ContentKeyPolicyRestrictionTokenKey -} - -var _ json.Marshaler = ContentKeyPolicyRsaTokenKey{} - -func (s ContentKeyPolicyRsaTokenKey) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyRsaTokenKey - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyRsaTokenKey: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyRsaTokenKey: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyRsaTokenKey" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyRsaTokenKey: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicysymmetrictokenkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicysymmetrictokenkey.go deleted file mode 100644 index 97eab4e535d45..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicysymmetrictokenkey.go +++ /dev/null @@ -1,41 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyRestrictionTokenKey = ContentKeyPolicySymmetricTokenKey{} - -type ContentKeyPolicySymmetricTokenKey struct { - KeyValue string `json:"keyValue"` - - // Fields inherited from ContentKeyPolicyRestrictionTokenKey -} - -var _ json.Marshaler = ContentKeyPolicySymmetricTokenKey{} - -func (s ContentKeyPolicySymmetricTokenKey) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicySymmetricTokenKey - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicySymmetricTokenKey: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicySymmetricTokenKey: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicySymmetricTokenKey" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicySymmetricTokenKey: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicytokenclaim.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicytokenclaim.go deleted file mode 100644 index 5ce3fb3f31979..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicytokenclaim.go +++ /dev/null @@ -1,9 +0,0 @@ -package contentkeypolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyTokenClaim struct { - ClaimType *string `json:"claimType,omitempty"` - ClaimValue *string `json:"claimValue,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicytokenrestriction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicytokenrestriction.go deleted file mode 100644 index 6b5e417cc0111..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicytokenrestriction.go +++ /dev/null @@ -1,94 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyRestriction = ContentKeyPolicyTokenRestriction{} - -type ContentKeyPolicyTokenRestriction struct { - AlternateVerificationKeys *[]ContentKeyPolicyRestrictionTokenKey `json:"alternateVerificationKeys,omitempty"` - Audience string `json:"audience"` - Issuer string `json:"issuer"` - OpenIdConnectDiscoveryDocument *string `json:"openIdConnectDiscoveryDocument,omitempty"` - PrimaryVerificationKey ContentKeyPolicyRestrictionTokenKey `json:"primaryVerificationKey"` - RequiredClaims *[]ContentKeyPolicyTokenClaim `json:"requiredClaims,omitempty"` - RestrictionTokenType ContentKeyPolicyRestrictionTokenType `json:"restrictionTokenType"` - - // Fields inherited from ContentKeyPolicyRestriction -} - -var _ json.Marshaler = ContentKeyPolicyTokenRestriction{} - -func (s ContentKeyPolicyTokenRestriction) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyTokenRestriction - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyTokenRestriction: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyTokenRestriction: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyTokenRestriction" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyTokenRestriction: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &ContentKeyPolicyTokenRestriction{} - -func (s *ContentKeyPolicyTokenRestriction) UnmarshalJSON(bytes []byte) error { - type alias ContentKeyPolicyTokenRestriction - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into ContentKeyPolicyTokenRestriction: %+v", err) - } - - s.Audience = decoded.Audience - s.Issuer = decoded.Issuer - s.OpenIdConnectDiscoveryDocument = decoded.OpenIdConnectDiscoveryDocument - s.RequiredClaims = decoded.RequiredClaims - s.RestrictionTokenType = decoded.RestrictionTokenType - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ContentKeyPolicyTokenRestriction into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["alternateVerificationKeys"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling AlternateVerificationKeys into list []json.RawMessage: %+v", err) - } - - output := make([]ContentKeyPolicyRestrictionTokenKey, 0) - for i, val := range listTemp { - impl, err := unmarshalContentKeyPolicyRestrictionTokenKeyImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'AlternateVerificationKeys' for 'ContentKeyPolicyTokenRestriction': %+v", i, err) - } - output = append(output, impl) - } - s.AlternateVerificationKeys = &output - } - - if v, ok := temp["primaryVerificationKey"]; ok { - impl, err := unmarshalContentKeyPolicyRestrictionTokenKeyImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'PrimaryVerificationKey' for 'ContentKeyPolicyTokenRestriction': %+v", err) - } - s.PrimaryVerificationKey = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyunknownconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyunknownconfiguration.go deleted file mode 100644 index 9683eb34e5645..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyunknownconfiguration.go +++ /dev/null @@ -1,40 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyConfiguration = ContentKeyPolicyUnknownConfiguration{} - -type ContentKeyPolicyUnknownConfiguration struct { - - // Fields inherited from ContentKeyPolicyConfiguration -} - -var _ json.Marshaler = ContentKeyPolicyUnknownConfiguration{} - -func (s ContentKeyPolicyUnknownConfiguration) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyUnknownConfiguration - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyUnknownConfiguration: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyUnknownConfiguration: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyUnknownConfiguration" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyUnknownConfiguration: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyunknownrestriction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyunknownrestriction.go deleted file mode 100644 index a7ab64728f2fd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyunknownrestriction.go +++ /dev/null @@ -1,40 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyRestriction = ContentKeyPolicyUnknownRestriction{} - -type ContentKeyPolicyUnknownRestriction struct { - - // Fields inherited from ContentKeyPolicyRestriction -} - -var _ json.Marshaler = ContentKeyPolicyUnknownRestriction{} - -func (s ContentKeyPolicyUnknownRestriction) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyUnknownRestriction - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyUnknownRestriction: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyUnknownRestriction: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyUnknownRestriction" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyUnknownRestriction: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicywidevineconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicywidevineconfiguration.go deleted file mode 100644 index 1a79d28796456..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicywidevineconfiguration.go +++ /dev/null @@ -1,41 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyConfiguration = ContentKeyPolicyWidevineConfiguration{} - -type ContentKeyPolicyWidevineConfiguration struct { - WidevineTemplate string `json:"widevineTemplate"` - - // Fields inherited from ContentKeyPolicyConfiguration -} - -var _ json.Marshaler = ContentKeyPolicyWidevineConfiguration{} - -func (s ContentKeyPolicyWidevineConfiguration) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyWidevineConfiguration - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyWidevineConfiguration: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyWidevineConfiguration: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyWidevineConfiguration" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyWidevineConfiguration: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyx509certificatetokenkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyx509certificatetokenkey.go deleted file mode 100644 index 0810b28176e18..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyx509certificatetokenkey.go +++ /dev/null @@ -1,41 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyRestrictionTokenKey = ContentKeyPolicyX509CertificateTokenKey{} - -type ContentKeyPolicyX509CertificateTokenKey struct { - RawBody string `json:"rawBody"` - - // Fields inherited from ContentKeyPolicyRestrictionTokenKey -} - -var _ json.Marshaler = ContentKeyPolicyX509CertificateTokenKey{} - -func (s ContentKeyPolicyX509CertificateTokenKey) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyX509CertificateTokenKey - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyX509CertificateTokenKey: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyX509CertificateTokenKey: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyX509CertificateTokenKey" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyX509CertificateTokenKey: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/predicates.go deleted file mode 100644 index 4c2e5b15246bd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package contentkeypolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p ContentKeyPolicyOperationPredicate) Matches(input ContentKeyPolicy) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/version.go deleted file mode 100644 index d76814aea620a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package contentkeypolicies - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-08-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/contentkeypolicies/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/README.md deleted file mode 100644 index 7eea70baad8b7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/README.md +++ /dev/null @@ -1,168 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents` Documentation - -The `liveevents` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2022-08-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents" -``` - - -### Client Initialization - -```go -client := liveevents.NewLiveEventsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `LiveEventsClient.Allocate` - -```go -ctx := context.TODO() -id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -if err := client.AllocateThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LiveEventsClient.AsyncOperation` - -```go -ctx := context.TODO() -id := liveevents.NewLiveEventOperationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "operationIdValue") - -read, err := client.AsyncOperation(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LiveEventsClient.Create` - -```go -ctx := context.TODO() -id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -payload := liveevents.LiveEvent{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload, liveevents.DefaultCreateOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `LiveEventsClient.Delete` - -```go -ctx := context.TODO() -id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LiveEventsClient.Get` - -```go -ctx := context.TODO() -id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LiveEventsClient.List` - -```go -ctx := context.TODO() -id := liveevents.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LiveEventsClient.Reset` - -```go -ctx := context.TODO() -id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -if err := client.ResetThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LiveEventsClient.Start` - -```go -ctx := context.TODO() -id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -if err := client.StartThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LiveEventsClient.Stop` - -```go -ctx := context.TODO() -id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -payload := liveevents.LiveEventActionInput{ - // ... -} - - -if err := client.StopThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `LiveEventsClient.Update` - -```go -ctx := context.TODO() -id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -payload := liveevents.LiveEvent{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/client.go deleted file mode 100644 index 85dcde5c926f3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package liveevents - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventsClient struct { - Client *resourcemanager.Client -} - -func NewLiveEventsClientWithBaseURI(sdkApi sdkEnv.Api) (*LiveEventsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "liveevents", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating LiveEventsClient: %+v", err) - } - - return &LiveEventsClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/constants.go deleted file mode 100644 index 0265b0302c9e0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/constants.go +++ /dev/null @@ -1,289 +0,0 @@ -package liveevents - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AsyncOperationStatus string - -const ( - AsyncOperationStatusFailed AsyncOperationStatus = "Failed" - AsyncOperationStatusInProgress AsyncOperationStatus = "InProgress" - AsyncOperationStatusSucceeded AsyncOperationStatus = "Succeeded" -) - -func PossibleValuesForAsyncOperationStatus() []string { - return []string{ - string(AsyncOperationStatusFailed), - string(AsyncOperationStatusInProgress), - string(AsyncOperationStatusSucceeded), - } -} - -func (s *AsyncOperationStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAsyncOperationStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAsyncOperationStatus(input string) (*AsyncOperationStatus, error) { - vals := map[string]AsyncOperationStatus{ - "failed": AsyncOperationStatusFailed, - "inprogress": AsyncOperationStatusInProgress, - "succeeded": AsyncOperationStatusSucceeded, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AsyncOperationStatus(input) - return &out, nil -} - -type LiveEventEncodingType string - -const ( - LiveEventEncodingTypeNone LiveEventEncodingType = "None" - LiveEventEncodingTypePassthroughBasic LiveEventEncodingType = "PassthroughBasic" - LiveEventEncodingTypePassthroughStandard LiveEventEncodingType = "PassthroughStandard" - LiveEventEncodingTypePremiumOneZeroEightZerop LiveEventEncodingType = "Premium1080p" - LiveEventEncodingTypeStandard LiveEventEncodingType = "Standard" -) - -func PossibleValuesForLiveEventEncodingType() []string { - return []string{ - string(LiveEventEncodingTypeNone), - string(LiveEventEncodingTypePassthroughBasic), - string(LiveEventEncodingTypePassthroughStandard), - string(LiveEventEncodingTypePremiumOneZeroEightZerop), - string(LiveEventEncodingTypeStandard), - } -} - -func (s *LiveEventEncodingType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLiveEventEncodingType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLiveEventEncodingType(input string) (*LiveEventEncodingType, error) { - vals := map[string]LiveEventEncodingType{ - "none": LiveEventEncodingTypeNone, - "passthroughbasic": LiveEventEncodingTypePassthroughBasic, - "passthroughstandard": LiveEventEncodingTypePassthroughStandard, - "premium1080p": LiveEventEncodingTypePremiumOneZeroEightZerop, - "standard": LiveEventEncodingTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LiveEventEncodingType(input) - return &out, nil -} - -type LiveEventInputProtocol string - -const ( - LiveEventInputProtocolFragmentedMPFour LiveEventInputProtocol = "FragmentedMP4" - LiveEventInputProtocolRTMP LiveEventInputProtocol = "RTMP" -) - -func PossibleValuesForLiveEventInputProtocol() []string { - return []string{ - string(LiveEventInputProtocolFragmentedMPFour), - string(LiveEventInputProtocolRTMP), - } -} - -func (s *LiveEventInputProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLiveEventInputProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLiveEventInputProtocol(input string) (*LiveEventInputProtocol, error) { - vals := map[string]LiveEventInputProtocol{ - "fragmentedmp4": LiveEventInputProtocolFragmentedMPFour, - "rtmp": LiveEventInputProtocolRTMP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LiveEventInputProtocol(input) - return &out, nil -} - -type LiveEventResourceState string - -const ( - LiveEventResourceStateAllocating LiveEventResourceState = "Allocating" - LiveEventResourceStateDeleting LiveEventResourceState = "Deleting" - LiveEventResourceStateRunning LiveEventResourceState = "Running" - LiveEventResourceStateStandBy LiveEventResourceState = "StandBy" - LiveEventResourceStateStarting LiveEventResourceState = "Starting" - LiveEventResourceStateStopped LiveEventResourceState = "Stopped" - LiveEventResourceStateStopping LiveEventResourceState = "Stopping" -) - -func PossibleValuesForLiveEventResourceState() []string { - return []string{ - string(LiveEventResourceStateAllocating), - string(LiveEventResourceStateDeleting), - string(LiveEventResourceStateRunning), - string(LiveEventResourceStateStandBy), - string(LiveEventResourceStateStarting), - string(LiveEventResourceStateStopped), - string(LiveEventResourceStateStopping), - } -} - -func (s *LiveEventResourceState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLiveEventResourceState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLiveEventResourceState(input string) (*LiveEventResourceState, error) { - vals := map[string]LiveEventResourceState{ - "allocating": LiveEventResourceStateAllocating, - "deleting": LiveEventResourceStateDeleting, - "running": LiveEventResourceStateRunning, - "standby": LiveEventResourceStateStandBy, - "starting": LiveEventResourceStateStarting, - "stopped": LiveEventResourceStateStopped, - "stopping": LiveEventResourceStateStopping, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LiveEventResourceState(input) - return &out, nil -} - -type StreamOptionsFlag string - -const ( - StreamOptionsFlagDefault StreamOptionsFlag = "Default" - StreamOptionsFlagLowLatency StreamOptionsFlag = "LowLatency" - StreamOptionsFlagLowLatencyVTwo StreamOptionsFlag = "LowLatencyV2" -) - -func PossibleValuesForStreamOptionsFlag() []string { - return []string{ - string(StreamOptionsFlagDefault), - string(StreamOptionsFlagLowLatency), - string(StreamOptionsFlagLowLatencyVTwo), - } -} - -func (s *StreamOptionsFlag) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseStreamOptionsFlag(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseStreamOptionsFlag(input string) (*StreamOptionsFlag, error) { - vals := map[string]StreamOptionsFlag{ - "default": StreamOptionsFlagDefault, - "lowlatency": StreamOptionsFlagLowLatency, - "lowlatencyv2": StreamOptionsFlagLowLatencyVTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StreamOptionsFlag(input) - return &out, nil -} - -type StretchMode string - -const ( - StretchModeAutoFit StretchMode = "AutoFit" - StretchModeAutoSize StretchMode = "AutoSize" - StretchModeNone StretchMode = "None" -) - -func PossibleValuesForStretchMode() []string { - return []string{ - string(StretchModeAutoFit), - string(StretchModeAutoSize), - string(StretchModeNone), - } -} - -func (s *StretchMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseStretchMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseStretchMode(input string) (*StretchMode, error) { - vals := map[string]StretchMode{ - "autofit": StretchModeAutoFit, - "autosize": StretchModeAutoSize, - "none": StretchModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StretchMode(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/id_liveevent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/id_liveevent.go deleted file mode 100644 index d642499f51ee0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/id_liveevent.go +++ /dev/null @@ -1,139 +0,0 @@ -package liveevents - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&LiveEventId{}) -} - -var _ resourceids.ResourceId = &LiveEventId{} - -// LiveEventId is a struct representing the Resource ID for a Live Event -type LiveEventId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - LiveEventName string -} - -// NewLiveEventID returns a new LiveEventId struct -func NewLiveEventID(subscriptionId string, resourceGroupName string, mediaServiceName string, liveEventName string) LiveEventId { - return LiveEventId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - LiveEventName: liveEventName, - } -} - -// ParseLiveEventID parses 'input' into a LiveEventId -func ParseLiveEventID(input string) (*LiveEventId, error) { - parser := resourceids.NewParserFromResourceIdType(&LiveEventId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LiveEventId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseLiveEventIDInsensitively parses 'input' case-insensitively into a LiveEventId -// note: this method should only be used for API response data and not user input -func ParseLiveEventIDInsensitively(input string) (*LiveEventId, error) { - parser := resourceids.NewParserFromResourceIdType(&LiveEventId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LiveEventId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *LiveEventId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.LiveEventName, ok = input.Parsed["liveEventName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "liveEventName", input) - } - - return nil -} - -// ValidateLiveEventID checks that 'input' can be parsed as a Live Event ID -func ValidateLiveEventID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLiveEventID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Live Event ID -func (id LiveEventId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/liveEvents/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.LiveEventName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Live Event ID -func (id LiveEventId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticLiveEvents", "liveEvents", "liveEvents"), - resourceids.UserSpecifiedSegment("liveEventName", "liveEventValue"), - } -} - -// String returns a human-readable description of this Live Event ID -func (id LiveEventId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Live Event Name: %q", id.LiveEventName), - } - return fmt.Sprintf("Live Event (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/id_liveeventoperation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/id_liveeventoperation.go deleted file mode 100644 index c361335f6cdcb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/id_liveeventoperation.go +++ /dev/null @@ -1,139 +0,0 @@ -package liveevents - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&LiveEventOperationId{}) -} - -var _ resourceids.ResourceId = &LiveEventOperationId{} - -// LiveEventOperationId is a struct representing the Resource ID for a Live Event Operation -type LiveEventOperationId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - OperationId string -} - -// NewLiveEventOperationID returns a new LiveEventOperationId struct -func NewLiveEventOperationID(subscriptionId string, resourceGroupName string, mediaServiceName string, operationId string) LiveEventOperationId { - return LiveEventOperationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - OperationId: operationId, - } -} - -// ParseLiveEventOperationID parses 'input' into a LiveEventOperationId -func ParseLiveEventOperationID(input string) (*LiveEventOperationId, error) { - parser := resourceids.NewParserFromResourceIdType(&LiveEventOperationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LiveEventOperationId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseLiveEventOperationIDInsensitively parses 'input' case-insensitively into a LiveEventOperationId -// note: this method should only be used for API response data and not user input -func ParseLiveEventOperationIDInsensitively(input string) (*LiveEventOperationId, error) { - parser := resourceids.NewParserFromResourceIdType(&LiveEventOperationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LiveEventOperationId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *LiveEventOperationId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.OperationId, ok = input.Parsed["operationId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "operationId", input) - } - - return nil -} - -// ValidateLiveEventOperationID checks that 'input' can be parsed as a Live Event Operation ID -func ValidateLiveEventOperationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLiveEventOperationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Live Event Operation ID -func (id LiveEventOperationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/liveEventOperations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.OperationId) -} - -// Segments returns a slice of Resource ID Segments which comprise this Live Event Operation ID -func (id LiveEventOperationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticLiveEventOperations", "liveEventOperations", "liveEventOperations"), - resourceids.UserSpecifiedSegment("operationId", "operationIdValue"), - } -} - -// String returns a human-readable description of this Live Event Operation ID -func (id LiveEventOperationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Operation: %q", id.OperationId), - } - return fmt.Sprintf("Live Event Operation (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/id_mediaservice.go deleted file mode 100644 index a7d3fc2fea95d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/id_mediaservice.go +++ /dev/null @@ -1,130 +0,0 @@ -package liveevents - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&MediaServiceId{}) -} - -var _ resourceids.ResourceId = &MediaServiceId{} - -// MediaServiceId is a struct representing the Resource ID for a Media Service -type MediaServiceId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string -} - -// NewMediaServiceID returns a new MediaServiceId struct -func NewMediaServiceID(subscriptionId string, resourceGroupName string, mediaServiceName string) MediaServiceId { - return MediaServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - } -} - -// ParseMediaServiceID parses 'input' into a MediaServiceId -func ParseMediaServiceID(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseMediaServiceIDInsensitively parses 'input' case-insensitively into a MediaServiceId -// note: this method should only be used for API response data and not user input -func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *MediaServiceId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - return nil -} - -// ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID -func ValidateMediaServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMediaServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Media Service ID -func (id MediaServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Media Service ID -func (id MediaServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - } -} - -// String returns a human-readable description of this Media Service ID -func (id MediaServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - } - return fmt.Sprintf("Media Service (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_allocate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_allocate.go deleted file mode 100644 index cdb667417081b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_allocate.go +++ /dev/null @@ -1,70 +0,0 @@ -package liveevents - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AllocateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Allocate ... -func (c LiveEventsClient) Allocate(ctx context.Context, id LiveEventId) (result AllocateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/allocate", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// AllocateThenPoll performs Allocate then polls until it's completed -func (c LiveEventsClient) AllocateThenPoll(ctx context.Context, id LiveEventId) error { - result, err := c.Allocate(ctx, id) - if err != nil { - return fmt.Errorf("performing Allocate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Allocate: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_asyncoperation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_asyncoperation.go deleted file mode 100644 index c92b8be9e04fb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_asyncoperation.go +++ /dev/null @@ -1,54 +0,0 @@ -package liveevents - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AsyncOperationOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AsyncOperationResult -} - -// AsyncOperation ... -func (c LiveEventsClient) AsyncOperation(ctx context.Context, id LiveEventOperationId) (result AsyncOperationOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model AsyncOperationResult - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_create.go deleted file mode 100644 index db743890d4a1d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_create.go +++ /dev/null @@ -1,103 +0,0 @@ -package liveevents - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *LiveEvent -} - -type CreateOperationOptions struct { - AutoStart *bool -} - -func DefaultCreateOperationOptions() CreateOperationOptions { - return CreateOperationOptions{} -} - -func (o CreateOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o CreateOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o CreateOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.AutoStart != nil { - out.Append("autoStart", fmt.Sprintf("%v", *o.AutoStart)) - } - return &out -} - -// Create ... -func (c LiveEventsClient) Create(ctx context.Context, id LiveEventId, input LiveEvent, options CreateOperationOptions) (result CreateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - OptionsObject: options, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateThenPoll performs Create then polls until it's completed -func (c LiveEventsClient) CreateThenPoll(ctx context.Context, id LiveEventId, input LiveEvent, options CreateOperationOptions) error { - result, err := c.Create(ctx, id, input, options) - if err != nil { - return fmt.Errorf("performing Create: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Create: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_delete.go deleted file mode 100644 index 46caecc7b5717..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package liveevents - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c LiveEventsClient) Delete(ctx context.Context, id LiveEventId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c LiveEventsClient) DeleteThenPoll(ctx context.Context, id LiveEventId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_get.go deleted file mode 100644 index cdefc7b3a39de..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_get.go +++ /dev/null @@ -1,54 +0,0 @@ -package liveevents - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *LiveEvent -} - -// Get ... -func (c LiveEventsClient) Get(ctx context.Context, id LiveEventId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model LiveEvent - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_list.go deleted file mode 100644 index dc02c0b2241a6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_list.go +++ /dev/null @@ -1,105 +0,0 @@ -package liveevents - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]LiveEvent -} - -type ListCompleteResult struct { - LatestHttpResponse *http.Response - Items []LiveEvent -} - -type ListCustomPager struct { - NextLink *odata.Link `json:"@odata.nextLink"` -} - -func (p *ListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// List ... -func (c LiveEventsClient) List(ctx context.Context, id MediaServiceId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListCustomPager{}, - Path: fmt.Sprintf("%s/liveEvents", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]LiveEvent `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c LiveEventsClient) ListComplete(ctx context.Context, id MediaServiceId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, LiveEventOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LiveEventsClient) ListCompleteMatchingPredicate(ctx context.Context, id MediaServiceId, predicate LiveEventOperationPredicate) (result ListCompleteResult, err error) { - items := make([]LiveEvent, 0) - - resp, err := c.List(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_reset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_reset.go deleted file mode 100644 index cb82ff062a028..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_reset.go +++ /dev/null @@ -1,70 +0,0 @@ -package liveevents - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResetOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Reset ... -func (c LiveEventsClient) Reset(ctx context.Context, id LiveEventId) (result ResetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/reset", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ResetThenPoll performs Reset then polls until it's completed -func (c LiveEventsClient) ResetThenPoll(ctx context.Context, id LiveEventId) error { - result, err := c.Reset(ctx, id) - if err != nil { - return fmt.Errorf("performing Reset: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Reset: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_start.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_start.go deleted file mode 100644 index 157c96d2b02f1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_start.go +++ /dev/null @@ -1,70 +0,0 @@ -package liveevents - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StartOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Start ... -func (c LiveEventsClient) Start(ctx context.Context, id LiveEventId) (result StartOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/start", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StartThenPoll performs Start then polls until it's completed -func (c LiveEventsClient) StartThenPoll(ctx context.Context, id LiveEventId) error { - result, err := c.Start(ctx, id) - if err != nil { - return fmt.Errorf("performing Start: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Start: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_stop.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_stop.go deleted file mode 100644 index b16b469682972..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_stop.go +++ /dev/null @@ -1,74 +0,0 @@ -package liveevents - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StopOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Stop ... -func (c LiveEventsClient) Stop(ctx context.Context, id LiveEventId, input LiveEventActionInput) (result StopOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/stop", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StopThenPoll performs Stop then polls until it's completed -func (c LiveEventsClient) StopThenPoll(ctx context.Context, id LiveEventId, input LiveEventActionInput) error { - result, err := c.Stop(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Stop: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Stop: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_update.go deleted file mode 100644 index f5563ab6e7b41..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/method_update.go +++ /dev/null @@ -1,75 +0,0 @@ -package liveevents - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *LiveEvent -} - -// Update ... -func (c LiveEventsClient) Update(ctx context.Context, id LiveEventId, input LiveEvent) (result UpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpdateThenPoll performs Update then polls until it's completed -func (c LiveEventsClient) UpdateThenPoll(ctx context.Context, id LiveEventId, input LiveEvent) error { - result, err := c.Update(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Update: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Update: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_asyncoperationresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_asyncoperationresult.go deleted file mode 100644 index 9eac248c4c40c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_asyncoperationresult.go +++ /dev/null @@ -1,10 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AsyncOperationResult struct { - Error *ErrorDetail `json:"error,omitempty"` - Name *string `json:"name,omitempty"` - Status *AsyncOperationStatus `json:"status,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_crosssiteaccesspolicies.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_crosssiteaccesspolicies.go deleted file mode 100644 index 48fe3ea2391bb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_crosssiteaccesspolicies.go +++ /dev/null @@ -1,9 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CrossSiteAccessPolicies struct { - ClientAccessPolicy *string `json:"clientAccessPolicy,omitempty"` - CrossDomainPolicy *string `json:"crossDomainPolicy,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_erroradditionalinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_erroradditionalinfo.go deleted file mode 100644 index c8c0e78933ea2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_erroradditionalinfo.go +++ /dev/null @@ -1,9 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ErrorAdditionalInfo struct { - Info *interface{} `json:"info,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_errordetail.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_errordetail.go deleted file mode 100644 index 047a6f5855a32..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_errordetail.go +++ /dev/null @@ -1,12 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ErrorDetail struct { - AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` - Code *string `json:"code,omitempty"` - Details *[]ErrorDetail `json:"details,omitempty"` - Message *string `json:"message,omitempty"` - Target *string `json:"target,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_ipaccesscontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_ipaccesscontrol.go deleted file mode 100644 index ebabbd6e23e53..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_ipaccesscontrol.go +++ /dev/null @@ -1,8 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPAccessControl struct { - Allow *[]IPRange `json:"allow,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_iprange.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_iprange.go deleted file mode 100644 index f3baaf0ab14f3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_iprange.go +++ /dev/null @@ -1,10 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPRange struct { - Address *string `json:"address,omitempty"` - Name *string `json:"name,omitempty"` - SubnetPrefixLength *int64 `json:"subnetPrefixLength,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveevent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveevent.go deleted file mode 100644 index 4ce8a6c2cf8b1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveevent.go +++ /dev/null @@ -1,18 +0,0 @@ -package liveevents - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEvent struct { - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *LiveEventProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventactioninput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventactioninput.go deleted file mode 100644 index 9cefd375f15dd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventactioninput.go +++ /dev/null @@ -1,8 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventActionInput struct { - RemoveOutputsOnStop *bool `json:"removeOutputsOnStop,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventencoding.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventencoding.go deleted file mode 100644 index 5b523350a398d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventencoding.go +++ /dev/null @@ -1,11 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventEncoding struct { - EncodingType *LiveEventEncodingType `json:"encodingType,omitempty"` - KeyFrameInterval *string `json:"keyFrameInterval,omitempty"` - PresetName *string `json:"presetName,omitempty"` - StretchMode *StretchMode `json:"stretchMode,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventendpoint.go deleted file mode 100644 index 58a27757939b6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventendpoint.go +++ /dev/null @@ -1,9 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventEndpoint struct { - Protocol *string `json:"protocol,omitempty"` - Url *string `json:"url,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventinput.go deleted file mode 100644 index 0eddc34140c3a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventinput.go +++ /dev/null @@ -1,12 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventInput struct { - AccessControl *LiveEventInputAccessControl `json:"accessControl,omitempty"` - AccessToken *string `json:"accessToken,omitempty"` - Endpoints *[]LiveEventEndpoint `json:"endpoints,omitempty"` - KeyFrameIntervalDuration *string `json:"keyFrameIntervalDuration,omitempty"` - StreamingProtocol LiveEventInputProtocol `json:"streamingProtocol"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventinputaccesscontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventinputaccesscontrol.go deleted file mode 100644 index 097779e37a37c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventinputaccesscontrol.go +++ /dev/null @@ -1,8 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventInputAccessControl struct { - IP *IPAccessControl `json:"ip,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventinputtrackselection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventinputtrackselection.go deleted file mode 100644 index a5d8017c5b9e6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventinputtrackselection.go +++ /dev/null @@ -1,10 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventInputTrackSelection struct { - Operation *string `json:"operation,omitempty"` - Property *string `json:"property,omitempty"` - Value *string `json:"value,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventoutputtranscriptiontrack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventoutputtranscriptiontrack.go deleted file mode 100644 index 76d4346a238c3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventoutputtranscriptiontrack.go +++ /dev/null @@ -1,8 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventOutputTranscriptionTrack struct { - TrackName string `json:"trackName"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventpreview.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventpreview.go deleted file mode 100644 index 29f8d0caefa8b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventpreview.go +++ /dev/null @@ -1,12 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventPreview struct { - AccessControl *LiveEventPreviewAccessControl `json:"accessControl,omitempty"` - AlternativeMediaId *string `json:"alternativeMediaId,omitempty"` - Endpoints *[]LiveEventEndpoint `json:"endpoints,omitempty"` - PreviewLocator *string `json:"previewLocator,omitempty"` - StreamingPolicyName *string `json:"streamingPolicyName,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventpreviewaccesscontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventpreviewaccesscontrol.go deleted file mode 100644 index 2826ebcd73913..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventpreviewaccesscontrol.go +++ /dev/null @@ -1,8 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventPreviewAccessControl struct { - IP *IPAccessControl `json:"ip,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventproperties.go deleted file mode 100644 index c04b10ab7a4a1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventproperties.go +++ /dev/null @@ -1,50 +0,0 @@ -package liveevents - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventProperties struct { - Created *string `json:"created,omitempty"` - CrossSiteAccessPolicies *CrossSiteAccessPolicies `json:"crossSiteAccessPolicies,omitempty"` - Description *string `json:"description,omitempty"` - Encoding *LiveEventEncoding `json:"encoding,omitempty"` - HostnamePrefix *string `json:"hostnamePrefix,omitempty"` - Input LiveEventInput `json:"input"` - LastModified *string `json:"lastModified,omitempty"` - Preview *LiveEventPreview `json:"preview,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` - ResourceState *LiveEventResourceState `json:"resourceState,omitempty"` - StreamOptions *[]StreamOptionsFlag `json:"streamOptions,omitempty"` - Transcriptions *[]LiveEventTranscription `json:"transcriptions,omitempty"` - UseStaticHostname *bool `json:"useStaticHostname,omitempty"` -} - -func (o *LiveEventProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *LiveEventProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *LiveEventProperties) GetLastModifiedAsTime() (*time.Time, error) { - if o.LastModified == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModified, "2006-01-02T15:04:05Z07:00") -} - -func (o *LiveEventProperties) SetLastModifiedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModified = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventtranscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventtranscription.go deleted file mode 100644 index 0ec81c1e59c84..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/model_liveeventtranscription.go +++ /dev/null @@ -1,10 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventTranscription struct { - InputTrackSelection *[]LiveEventInputTrackSelection `json:"inputTrackSelection,omitempty"` - Language *string `json:"language,omitempty"` - OutputTranscriptionTrack *LiveEventOutputTranscriptionTrack `json:"outputTranscriptionTrack,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/predicates.go deleted file mode 100644 index 6b80594f77ef2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p LiveEventOperationPredicate) Matches(input LiveEvent) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/version.go deleted file mode 100644 index 7c906290a6b02..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package liveevents - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-08-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/liveevents/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/README.md deleted file mode 100644 index 3120b5e8d1719..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/README.md +++ /dev/null @@ -1,98 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs` Documentation - -The `liveoutputs` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2022-08-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs" -``` - - -### Client Initialization - -```go -client := liveoutputs.NewLiveOutputsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `LiveOutputsClient.AsyncOperation` - -```go -ctx := context.TODO() -id := liveoutputs.NewLiveOutputOperationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "operationIdValue") - -read, err := client.AsyncOperation(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LiveOutputsClient.Create` - -```go -ctx := context.TODO() -id := liveoutputs.NewLiveOutputID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue", "liveOutputValue") - -payload := liveoutputs.LiveOutput{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `LiveOutputsClient.Delete` - -```go -ctx := context.TODO() -id := liveoutputs.NewLiveOutputID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue", "liveOutputValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LiveOutputsClient.Get` - -```go -ctx := context.TODO() -id := liveoutputs.NewLiveOutputID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue", "liveOutputValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LiveOutputsClient.List` - -```go -ctx := context.TODO() -id := liveoutputs.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/client.go deleted file mode 100644 index 49007d18eb8b8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package liveoutputs - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveOutputsClient struct { - Client *resourcemanager.Client -} - -func NewLiveOutputsClientWithBaseURI(sdkApi sdkEnv.Api) (*LiveOutputsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "liveoutputs", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating LiveOutputsClient: %+v", err) - } - - return &LiveOutputsClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/constants.go deleted file mode 100644 index d8da85030ddf7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package liveoutputs - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AsyncOperationStatus string - -const ( - AsyncOperationStatusFailed AsyncOperationStatus = "Failed" - AsyncOperationStatusInProgress AsyncOperationStatus = "InProgress" - AsyncOperationStatusSucceeded AsyncOperationStatus = "Succeeded" -) - -func PossibleValuesForAsyncOperationStatus() []string { - return []string{ - string(AsyncOperationStatusFailed), - string(AsyncOperationStatusInProgress), - string(AsyncOperationStatusSucceeded), - } -} - -func (s *AsyncOperationStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAsyncOperationStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAsyncOperationStatus(input string) (*AsyncOperationStatus, error) { - vals := map[string]AsyncOperationStatus{ - "failed": AsyncOperationStatusFailed, - "inprogress": AsyncOperationStatusInProgress, - "succeeded": AsyncOperationStatusSucceeded, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AsyncOperationStatus(input) - return &out, nil -} - -type LiveOutputResourceState string - -const ( - LiveOutputResourceStateCreating LiveOutputResourceState = "Creating" - LiveOutputResourceStateDeleting LiveOutputResourceState = "Deleting" - LiveOutputResourceStateRunning LiveOutputResourceState = "Running" -) - -func PossibleValuesForLiveOutputResourceState() []string { - return []string{ - string(LiveOutputResourceStateCreating), - string(LiveOutputResourceStateDeleting), - string(LiveOutputResourceStateRunning), - } -} - -func (s *LiveOutputResourceState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLiveOutputResourceState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLiveOutputResourceState(input string) (*LiveOutputResourceState, error) { - vals := map[string]LiveOutputResourceState{ - "creating": LiveOutputResourceStateCreating, - "deleting": LiveOutputResourceStateDeleting, - "running": LiveOutputResourceStateRunning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LiveOutputResourceState(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/id_liveevent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/id_liveevent.go deleted file mode 100644 index 5b10f380efbd9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/id_liveevent.go +++ /dev/null @@ -1,139 +0,0 @@ -package liveoutputs - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&LiveEventId{}) -} - -var _ resourceids.ResourceId = &LiveEventId{} - -// LiveEventId is a struct representing the Resource ID for a Live Event -type LiveEventId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - LiveEventName string -} - -// NewLiveEventID returns a new LiveEventId struct -func NewLiveEventID(subscriptionId string, resourceGroupName string, mediaServiceName string, liveEventName string) LiveEventId { - return LiveEventId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - LiveEventName: liveEventName, - } -} - -// ParseLiveEventID parses 'input' into a LiveEventId -func ParseLiveEventID(input string) (*LiveEventId, error) { - parser := resourceids.NewParserFromResourceIdType(&LiveEventId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LiveEventId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseLiveEventIDInsensitively parses 'input' case-insensitively into a LiveEventId -// note: this method should only be used for API response data and not user input -func ParseLiveEventIDInsensitively(input string) (*LiveEventId, error) { - parser := resourceids.NewParserFromResourceIdType(&LiveEventId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LiveEventId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *LiveEventId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.LiveEventName, ok = input.Parsed["liveEventName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "liveEventName", input) - } - - return nil -} - -// ValidateLiveEventID checks that 'input' can be parsed as a Live Event ID -func ValidateLiveEventID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLiveEventID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Live Event ID -func (id LiveEventId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/liveEvents/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.LiveEventName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Live Event ID -func (id LiveEventId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticLiveEvents", "liveEvents", "liveEvents"), - resourceids.UserSpecifiedSegment("liveEventName", "liveEventValue"), - } -} - -// String returns a human-readable description of this Live Event ID -func (id LiveEventId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Live Event Name: %q", id.LiveEventName), - } - return fmt.Sprintf("Live Event (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/id_liveoutput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/id_liveoutput.go deleted file mode 100644 index 5bbae170c89a1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/id_liveoutput.go +++ /dev/null @@ -1,148 +0,0 @@ -package liveoutputs - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&LiveOutputId{}) -} - -var _ resourceids.ResourceId = &LiveOutputId{} - -// LiveOutputId is a struct representing the Resource ID for a Live Output -type LiveOutputId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - LiveEventName string - LiveOutputName string -} - -// NewLiveOutputID returns a new LiveOutputId struct -func NewLiveOutputID(subscriptionId string, resourceGroupName string, mediaServiceName string, liveEventName string, liveOutputName string) LiveOutputId { - return LiveOutputId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - LiveEventName: liveEventName, - LiveOutputName: liveOutputName, - } -} - -// ParseLiveOutputID parses 'input' into a LiveOutputId -func ParseLiveOutputID(input string) (*LiveOutputId, error) { - parser := resourceids.NewParserFromResourceIdType(&LiveOutputId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LiveOutputId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseLiveOutputIDInsensitively parses 'input' case-insensitively into a LiveOutputId -// note: this method should only be used for API response data and not user input -func ParseLiveOutputIDInsensitively(input string) (*LiveOutputId, error) { - parser := resourceids.NewParserFromResourceIdType(&LiveOutputId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LiveOutputId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *LiveOutputId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.LiveEventName, ok = input.Parsed["liveEventName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "liveEventName", input) - } - - if id.LiveOutputName, ok = input.Parsed["liveOutputName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "liveOutputName", input) - } - - return nil -} - -// ValidateLiveOutputID checks that 'input' can be parsed as a Live Output ID -func ValidateLiveOutputID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLiveOutputID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Live Output ID -func (id LiveOutputId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/liveEvents/%s/liveOutputs/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.LiveEventName, id.LiveOutputName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Live Output ID -func (id LiveOutputId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticLiveEvents", "liveEvents", "liveEvents"), - resourceids.UserSpecifiedSegment("liveEventName", "liveEventValue"), - resourceids.StaticSegment("staticLiveOutputs", "liveOutputs", "liveOutputs"), - resourceids.UserSpecifiedSegment("liveOutputName", "liveOutputValue"), - } -} - -// String returns a human-readable description of this Live Output ID -func (id LiveOutputId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Live Event Name: %q", id.LiveEventName), - fmt.Sprintf("Live Output Name: %q", id.LiveOutputName), - } - return fmt.Sprintf("Live Output (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/id_liveoutputoperation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/id_liveoutputoperation.go deleted file mode 100644 index bc9604d0f764c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/id_liveoutputoperation.go +++ /dev/null @@ -1,139 +0,0 @@ -package liveoutputs - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&LiveOutputOperationId{}) -} - -var _ resourceids.ResourceId = &LiveOutputOperationId{} - -// LiveOutputOperationId is a struct representing the Resource ID for a Live Output Operation -type LiveOutputOperationId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - OperationId string -} - -// NewLiveOutputOperationID returns a new LiveOutputOperationId struct -func NewLiveOutputOperationID(subscriptionId string, resourceGroupName string, mediaServiceName string, operationId string) LiveOutputOperationId { - return LiveOutputOperationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - OperationId: operationId, - } -} - -// ParseLiveOutputOperationID parses 'input' into a LiveOutputOperationId -func ParseLiveOutputOperationID(input string) (*LiveOutputOperationId, error) { - parser := resourceids.NewParserFromResourceIdType(&LiveOutputOperationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LiveOutputOperationId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseLiveOutputOperationIDInsensitively parses 'input' case-insensitively into a LiveOutputOperationId -// note: this method should only be used for API response data and not user input -func ParseLiveOutputOperationIDInsensitively(input string) (*LiveOutputOperationId, error) { - parser := resourceids.NewParserFromResourceIdType(&LiveOutputOperationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LiveOutputOperationId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *LiveOutputOperationId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.OperationId, ok = input.Parsed["operationId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "operationId", input) - } - - return nil -} - -// ValidateLiveOutputOperationID checks that 'input' can be parsed as a Live Output Operation ID -func ValidateLiveOutputOperationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLiveOutputOperationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Live Output Operation ID -func (id LiveOutputOperationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/liveOutputOperations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.OperationId) -} - -// Segments returns a slice of Resource ID Segments which comprise this Live Output Operation ID -func (id LiveOutputOperationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticLiveOutputOperations", "liveOutputOperations", "liveOutputOperations"), - resourceids.UserSpecifiedSegment("operationId", "operationIdValue"), - } -} - -// String returns a human-readable description of this Live Output Operation ID -func (id LiveOutputOperationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Operation: %q", id.OperationId), - } - return fmt.Sprintf("Live Output Operation (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/method_asyncoperation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/method_asyncoperation.go deleted file mode 100644 index e55613d9d616e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/method_asyncoperation.go +++ /dev/null @@ -1,54 +0,0 @@ -package liveoutputs - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AsyncOperationOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AsyncOperationResult -} - -// AsyncOperation ... -func (c LiveOutputsClient) AsyncOperation(ctx context.Context, id LiveOutputOperationId) (result AsyncOperationOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model AsyncOperationResult - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/method_create.go deleted file mode 100644 index 396a45d9a0399..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/method_create.go +++ /dev/null @@ -1,75 +0,0 @@ -package liveoutputs - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *LiveOutput -} - -// Create ... -func (c LiveOutputsClient) Create(ctx context.Context, id LiveOutputId, input LiveOutput) (result CreateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateThenPoll performs Create then polls until it's completed -func (c LiveOutputsClient) CreateThenPoll(ctx context.Context, id LiveOutputId, input LiveOutput) error { - result, err := c.Create(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Create: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Create: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/method_delete.go deleted file mode 100644 index b2bb9febceeb9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package liveoutputs - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c LiveOutputsClient) Delete(ctx context.Context, id LiveOutputId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c LiveOutputsClient) DeleteThenPoll(ctx context.Context, id LiveOutputId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/method_get.go deleted file mode 100644 index 9502e806865b4..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/method_get.go +++ /dev/null @@ -1,54 +0,0 @@ -package liveoutputs - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *LiveOutput -} - -// Get ... -func (c LiveOutputsClient) Get(ctx context.Context, id LiveOutputId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model LiveOutput - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/method_list.go deleted file mode 100644 index 3351078747aeb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/method_list.go +++ /dev/null @@ -1,105 +0,0 @@ -package liveoutputs - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]LiveOutput -} - -type ListCompleteResult struct { - LatestHttpResponse *http.Response - Items []LiveOutput -} - -type ListCustomPager struct { - NextLink *odata.Link `json:"@odata.nextLink"` -} - -func (p *ListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// List ... -func (c LiveOutputsClient) List(ctx context.Context, id LiveEventId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListCustomPager{}, - Path: fmt.Sprintf("%s/liveOutputs", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]LiveOutput `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c LiveOutputsClient) ListComplete(ctx context.Context, id LiveEventId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, LiveOutputOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LiveOutputsClient) ListCompleteMatchingPredicate(ctx context.Context, id LiveEventId, predicate LiveOutputOperationPredicate) (result ListCompleteResult, err error) { - items := make([]LiveOutput, 0) - - resp, err := c.List(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/model_asyncoperationresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/model_asyncoperationresult.go deleted file mode 100644 index 81e50e9c3e52e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/model_asyncoperationresult.go +++ /dev/null @@ -1,10 +0,0 @@ -package liveoutputs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AsyncOperationResult struct { - Error *ErrorDetail `json:"error,omitempty"` - Name *string `json:"name,omitempty"` - Status *AsyncOperationStatus `json:"status,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/model_erroradditionalinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/model_erroradditionalinfo.go deleted file mode 100644 index 13b76daac6b32..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/model_erroradditionalinfo.go +++ /dev/null @@ -1,9 +0,0 @@ -package liveoutputs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ErrorAdditionalInfo struct { - Info *interface{} `json:"info,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/model_errordetail.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/model_errordetail.go deleted file mode 100644 index 94aadf44459ed..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/model_errordetail.go +++ /dev/null @@ -1,12 +0,0 @@ -package liveoutputs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ErrorDetail struct { - AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` - Code *string `json:"code,omitempty"` - Details *[]ErrorDetail `json:"details,omitempty"` - Message *string `json:"message,omitempty"` - Target *string `json:"target,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/model_hls.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/model_hls.go deleted file mode 100644 index 8eabe19591668..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/model_hls.go +++ /dev/null @@ -1,8 +0,0 @@ -package liveoutputs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Hls struct { - FragmentsPerTsSegment *int64 `json:"fragmentsPerTsSegment,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/model_liveoutput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/model_liveoutput.go deleted file mode 100644 index 23697703092e9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/model_liveoutput.go +++ /dev/null @@ -1,16 +0,0 @@ -package liveoutputs - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveOutput struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *LiveOutputProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/model_liveoutputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/model_liveoutputproperties.go deleted file mode 100644 index 0ab436c24dade..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/model_liveoutputproperties.go +++ /dev/null @@ -1,48 +0,0 @@ -package liveoutputs - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveOutputProperties struct { - ArchiveWindowLength string `json:"archiveWindowLength"` - AssetName string `json:"assetName"` - Created *string `json:"created,omitempty"` - Description *string `json:"description,omitempty"` - Hls *Hls `json:"hls,omitempty"` - LastModified *string `json:"lastModified,omitempty"` - ManifestName *string `json:"manifestName,omitempty"` - OutputSnapTime *int64 `json:"outputSnapTime,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` - ResourceState *LiveOutputResourceState `json:"resourceState,omitempty"` - RewindWindowLength *string `json:"rewindWindowLength,omitempty"` -} - -func (o *LiveOutputProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *LiveOutputProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *LiveOutputProperties) GetLastModifiedAsTime() (*time.Time, error) { - if o.LastModified == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModified, "2006-01-02T15:04:05Z07:00") -} - -func (o *LiveOutputProperties) SetLastModifiedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModified = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/predicates.go deleted file mode 100644 index 1d83a4de68872..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package liveoutputs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveOutputOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p LiveOutputOperationPredicate) Matches(input LiveOutput) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/version.go deleted file mode 100644 index fa7e62970fff7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package liveoutputs - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-08-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/liveoutputs/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/README.md deleted file mode 100644 index 79856624a11e3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/README.md +++ /dev/null @@ -1,172 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints` Documentation - -The `streamingendpoints` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2022-08-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints" -``` - - -### Client Initialization - -```go -client := streamingendpoints.NewStreamingEndpointsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `StreamingEndpointsClient.AsyncOperation` - -```go -ctx := context.TODO() -id := streamingendpoints.NewStreamingEndpointOperationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "operationIdValue") - -read, err := client.AsyncOperation(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingEndpointsClient.Create` - -```go -ctx := context.TODO() -id := streamingendpoints.NewStreamingEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingEndpointValue") - -payload := streamingendpoints.StreamingEndpoint{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload, streamingendpoints.DefaultCreateOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `StreamingEndpointsClient.Delete` - -```go -ctx := context.TODO() -id := streamingendpoints.NewStreamingEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingEndpointValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `StreamingEndpointsClient.Get` - -```go -ctx := context.TODO() -id := streamingendpoints.NewStreamingEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingEndpointValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingEndpointsClient.List` - -```go -ctx := context.TODO() -id := streamingendpoints.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `StreamingEndpointsClient.Scale` - -```go -ctx := context.TODO() -id := streamingendpoints.NewStreamingEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingEndpointValue") - -payload := streamingendpoints.StreamingEntityScaleUnit{ - // ... -} - - -if err := client.ScaleThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `StreamingEndpointsClient.Skus` - -```go -ctx := context.TODO() -id := streamingendpoints.NewStreamingEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingEndpointValue") - -read, err := client.Skus(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingEndpointsClient.Start` - -```go -ctx := context.TODO() -id := streamingendpoints.NewStreamingEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingEndpointValue") - -if err := client.StartThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `StreamingEndpointsClient.Stop` - -```go -ctx := context.TODO() -id := streamingendpoints.NewStreamingEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingEndpointValue") - -if err := client.StopThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `StreamingEndpointsClient.Update` - -```go -ctx := context.TODO() -id := streamingendpoints.NewStreamingEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingEndpointValue") - -payload := streamingendpoints.StreamingEndpoint{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/client.go deleted file mode 100644 index a66794d6ca66e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package streamingendpoints - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingEndpointsClient struct { - Client *resourcemanager.Client -} - -func NewStreamingEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*StreamingEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "streamingendpoints", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating StreamingEndpointsClient: %+v", err) - } - - return &StreamingEndpointsClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/constants.go deleted file mode 100644 index 7d1bb0870b5de..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/constants.go +++ /dev/null @@ -1,107 +0,0 @@ -package streamingendpoints - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AsyncOperationStatus string - -const ( - AsyncOperationStatusFailed AsyncOperationStatus = "Failed" - AsyncOperationStatusInProgress AsyncOperationStatus = "InProgress" - AsyncOperationStatusSucceeded AsyncOperationStatus = "Succeeded" -) - -func PossibleValuesForAsyncOperationStatus() []string { - return []string{ - string(AsyncOperationStatusFailed), - string(AsyncOperationStatusInProgress), - string(AsyncOperationStatusSucceeded), - } -} - -func (s *AsyncOperationStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAsyncOperationStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAsyncOperationStatus(input string) (*AsyncOperationStatus, error) { - vals := map[string]AsyncOperationStatus{ - "failed": AsyncOperationStatusFailed, - "inprogress": AsyncOperationStatusInProgress, - "succeeded": AsyncOperationStatusSucceeded, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AsyncOperationStatus(input) - return &out, nil -} - -type StreamingEndpointResourceState string - -const ( - StreamingEndpointResourceStateDeleting StreamingEndpointResourceState = "Deleting" - StreamingEndpointResourceStateRunning StreamingEndpointResourceState = "Running" - StreamingEndpointResourceStateScaling StreamingEndpointResourceState = "Scaling" - StreamingEndpointResourceStateStarting StreamingEndpointResourceState = "Starting" - StreamingEndpointResourceStateStopped StreamingEndpointResourceState = "Stopped" - StreamingEndpointResourceStateStopping StreamingEndpointResourceState = "Stopping" -) - -func PossibleValuesForStreamingEndpointResourceState() []string { - return []string{ - string(StreamingEndpointResourceStateDeleting), - string(StreamingEndpointResourceStateRunning), - string(StreamingEndpointResourceStateScaling), - string(StreamingEndpointResourceStateStarting), - string(StreamingEndpointResourceStateStopped), - string(StreamingEndpointResourceStateStopping), - } -} - -func (s *StreamingEndpointResourceState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseStreamingEndpointResourceState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseStreamingEndpointResourceState(input string) (*StreamingEndpointResourceState, error) { - vals := map[string]StreamingEndpointResourceState{ - "deleting": StreamingEndpointResourceStateDeleting, - "running": StreamingEndpointResourceStateRunning, - "scaling": StreamingEndpointResourceStateScaling, - "starting": StreamingEndpointResourceStateStarting, - "stopped": StreamingEndpointResourceStateStopped, - "stopping": StreamingEndpointResourceStateStopping, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StreamingEndpointResourceState(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/id_mediaservice.go deleted file mode 100644 index 243cdf6d8cf21..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/id_mediaservice.go +++ /dev/null @@ -1,130 +0,0 @@ -package streamingendpoints - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&MediaServiceId{}) -} - -var _ resourceids.ResourceId = &MediaServiceId{} - -// MediaServiceId is a struct representing the Resource ID for a Media Service -type MediaServiceId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string -} - -// NewMediaServiceID returns a new MediaServiceId struct -func NewMediaServiceID(subscriptionId string, resourceGroupName string, mediaServiceName string) MediaServiceId { - return MediaServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - } -} - -// ParseMediaServiceID parses 'input' into a MediaServiceId -func ParseMediaServiceID(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseMediaServiceIDInsensitively parses 'input' case-insensitively into a MediaServiceId -// note: this method should only be used for API response data and not user input -func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *MediaServiceId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - return nil -} - -// ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID -func ValidateMediaServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMediaServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Media Service ID -func (id MediaServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Media Service ID -func (id MediaServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - } -} - -// String returns a human-readable description of this Media Service ID -func (id MediaServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - } - return fmt.Sprintf("Media Service (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/id_streamingendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/id_streamingendpoint.go deleted file mode 100644 index 4d634f2efe1c3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/id_streamingendpoint.go +++ /dev/null @@ -1,139 +0,0 @@ -package streamingendpoints - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&StreamingEndpointId{}) -} - -var _ resourceids.ResourceId = &StreamingEndpointId{} - -// StreamingEndpointId is a struct representing the Resource ID for a Streaming Endpoint -type StreamingEndpointId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - StreamingEndpointName string -} - -// NewStreamingEndpointID returns a new StreamingEndpointId struct -func NewStreamingEndpointID(subscriptionId string, resourceGroupName string, mediaServiceName string, streamingEndpointName string) StreamingEndpointId { - return StreamingEndpointId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - StreamingEndpointName: streamingEndpointName, - } -} - -// ParseStreamingEndpointID parses 'input' into a StreamingEndpointId -func ParseStreamingEndpointID(input string) (*StreamingEndpointId, error) { - parser := resourceids.NewParserFromResourceIdType(&StreamingEndpointId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := StreamingEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseStreamingEndpointIDInsensitively parses 'input' case-insensitively into a StreamingEndpointId -// note: this method should only be used for API response data and not user input -func ParseStreamingEndpointIDInsensitively(input string) (*StreamingEndpointId, error) { - parser := resourceids.NewParserFromResourceIdType(&StreamingEndpointId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := StreamingEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *StreamingEndpointId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.StreamingEndpointName, ok = input.Parsed["streamingEndpointName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "streamingEndpointName", input) - } - - return nil -} - -// ValidateStreamingEndpointID checks that 'input' can be parsed as a Streaming Endpoint ID -func ValidateStreamingEndpointID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseStreamingEndpointID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Streaming Endpoint ID -func (id StreamingEndpointId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/streamingEndpoints/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.StreamingEndpointName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Streaming Endpoint ID -func (id StreamingEndpointId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticStreamingEndpoints", "streamingEndpoints", "streamingEndpoints"), - resourceids.UserSpecifiedSegment("streamingEndpointName", "streamingEndpointValue"), - } -} - -// String returns a human-readable description of this Streaming Endpoint ID -func (id StreamingEndpointId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Streaming Endpoint Name: %q", id.StreamingEndpointName), - } - return fmt.Sprintf("Streaming Endpoint (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/id_streamingendpointoperation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/id_streamingendpointoperation.go deleted file mode 100644 index c69379aa06222..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/id_streamingendpointoperation.go +++ /dev/null @@ -1,139 +0,0 @@ -package streamingendpoints - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&StreamingEndpointOperationId{}) -} - -var _ resourceids.ResourceId = &StreamingEndpointOperationId{} - -// StreamingEndpointOperationId is a struct representing the Resource ID for a Streaming Endpoint Operation -type StreamingEndpointOperationId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - OperationId string -} - -// NewStreamingEndpointOperationID returns a new StreamingEndpointOperationId struct -func NewStreamingEndpointOperationID(subscriptionId string, resourceGroupName string, mediaServiceName string, operationId string) StreamingEndpointOperationId { - return StreamingEndpointOperationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - OperationId: operationId, - } -} - -// ParseStreamingEndpointOperationID parses 'input' into a StreamingEndpointOperationId -func ParseStreamingEndpointOperationID(input string) (*StreamingEndpointOperationId, error) { - parser := resourceids.NewParserFromResourceIdType(&StreamingEndpointOperationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := StreamingEndpointOperationId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseStreamingEndpointOperationIDInsensitively parses 'input' case-insensitively into a StreamingEndpointOperationId -// note: this method should only be used for API response data and not user input -func ParseStreamingEndpointOperationIDInsensitively(input string) (*StreamingEndpointOperationId, error) { - parser := resourceids.NewParserFromResourceIdType(&StreamingEndpointOperationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := StreamingEndpointOperationId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *StreamingEndpointOperationId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.OperationId, ok = input.Parsed["operationId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "operationId", input) - } - - return nil -} - -// ValidateStreamingEndpointOperationID checks that 'input' can be parsed as a Streaming Endpoint Operation ID -func ValidateStreamingEndpointOperationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseStreamingEndpointOperationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Streaming Endpoint Operation ID -func (id StreamingEndpointOperationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/streamingEndpointOperations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.OperationId) -} - -// Segments returns a slice of Resource ID Segments which comprise this Streaming Endpoint Operation ID -func (id StreamingEndpointOperationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticStreamingEndpointOperations", "streamingEndpointOperations", "streamingEndpointOperations"), - resourceids.UserSpecifiedSegment("operationId", "operationIdValue"), - } -} - -// String returns a human-readable description of this Streaming Endpoint Operation ID -func (id StreamingEndpointOperationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Operation: %q", id.OperationId), - } - return fmt.Sprintf("Streaming Endpoint Operation (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_asyncoperation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_asyncoperation.go deleted file mode 100644 index 9005e4039bba5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_asyncoperation.go +++ /dev/null @@ -1,54 +0,0 @@ -package streamingendpoints - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AsyncOperationOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AsyncOperationResult -} - -// AsyncOperation ... -func (c StreamingEndpointsClient) AsyncOperation(ctx context.Context, id StreamingEndpointOperationId) (result AsyncOperationOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model AsyncOperationResult - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_create.go deleted file mode 100644 index 7b9e76bac77ee..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_create.go +++ /dev/null @@ -1,103 +0,0 @@ -package streamingendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *StreamingEndpoint -} - -type CreateOperationOptions struct { - AutoStart *bool -} - -func DefaultCreateOperationOptions() CreateOperationOptions { - return CreateOperationOptions{} -} - -func (o CreateOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o CreateOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o CreateOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.AutoStart != nil { - out.Append("autoStart", fmt.Sprintf("%v", *o.AutoStart)) - } - return &out -} - -// Create ... -func (c StreamingEndpointsClient) Create(ctx context.Context, id StreamingEndpointId, input StreamingEndpoint, options CreateOperationOptions) (result CreateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - OptionsObject: options, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateThenPoll performs Create then polls until it's completed -func (c StreamingEndpointsClient) CreateThenPoll(ctx context.Context, id StreamingEndpointId, input StreamingEndpoint, options CreateOperationOptions) error { - result, err := c.Create(ctx, id, input, options) - if err != nil { - return fmt.Errorf("performing Create: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Create: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_delete.go deleted file mode 100644 index aa2cad45dd7b4..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package streamingendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c StreamingEndpointsClient) Delete(ctx context.Context, id StreamingEndpointId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c StreamingEndpointsClient) DeleteThenPoll(ctx context.Context, id StreamingEndpointId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_get.go deleted file mode 100644 index 8db082ce324ad..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_get.go +++ /dev/null @@ -1,54 +0,0 @@ -package streamingendpoints - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *StreamingEndpoint -} - -// Get ... -func (c StreamingEndpointsClient) Get(ctx context.Context, id StreamingEndpointId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model StreamingEndpoint - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_list.go deleted file mode 100644 index 322e2b6956827..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_list.go +++ /dev/null @@ -1,105 +0,0 @@ -package streamingendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]StreamingEndpoint -} - -type ListCompleteResult struct { - LatestHttpResponse *http.Response - Items []StreamingEndpoint -} - -type ListCustomPager struct { - NextLink *odata.Link `json:"@odata.nextLink"` -} - -func (p *ListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// List ... -func (c StreamingEndpointsClient) List(ctx context.Context, id MediaServiceId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListCustomPager{}, - Path: fmt.Sprintf("%s/streamingEndpoints", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]StreamingEndpoint `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c StreamingEndpointsClient) ListComplete(ctx context.Context, id MediaServiceId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, StreamingEndpointOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c StreamingEndpointsClient) ListCompleteMatchingPredicate(ctx context.Context, id MediaServiceId, predicate StreamingEndpointOperationPredicate) (result ListCompleteResult, err error) { - items := make([]StreamingEndpoint, 0) - - resp, err := c.List(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_scale.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_scale.go deleted file mode 100644 index c3f9526c5584d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_scale.go +++ /dev/null @@ -1,74 +0,0 @@ -package streamingendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ScaleOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Scale ... -func (c StreamingEndpointsClient) Scale(ctx context.Context, id StreamingEndpointId, input StreamingEntityScaleUnit) (result ScaleOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/scale", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ScaleThenPoll performs Scale then polls until it's completed -func (c StreamingEndpointsClient) ScaleThenPoll(ctx context.Context, id StreamingEndpointId, input StreamingEntityScaleUnit) error { - result, err := c.Scale(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Scale: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Scale: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_skus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_skus.go deleted file mode 100644 index 419e72eb2fa26..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_skus.go +++ /dev/null @@ -1,55 +0,0 @@ -package streamingendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SkusOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *StreamingEndpointSkuInfoListResult -} - -// Skus ... -func (c StreamingEndpointsClient) Skus(ctx context.Context, id StreamingEndpointId) (result SkusOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/skus", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model StreamingEndpointSkuInfoListResult - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_start.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_start.go deleted file mode 100644 index 01239b39b77eb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_start.go +++ /dev/null @@ -1,70 +0,0 @@ -package streamingendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StartOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Start ... -func (c StreamingEndpointsClient) Start(ctx context.Context, id StreamingEndpointId) (result StartOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/start", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StartThenPoll performs Start then polls until it's completed -func (c StreamingEndpointsClient) StartThenPoll(ctx context.Context, id StreamingEndpointId) error { - result, err := c.Start(ctx, id) - if err != nil { - return fmt.Errorf("performing Start: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Start: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_stop.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_stop.go deleted file mode 100644 index b39f1d63c37d1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_stop.go +++ /dev/null @@ -1,70 +0,0 @@ -package streamingendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StopOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Stop ... -func (c StreamingEndpointsClient) Stop(ctx context.Context, id StreamingEndpointId) (result StopOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/stop", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StopThenPoll performs Stop then polls until it's completed -func (c StreamingEndpointsClient) StopThenPoll(ctx context.Context, id StreamingEndpointId) error { - result, err := c.Stop(ctx, id) - if err != nil { - return fmt.Errorf("performing Stop: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Stop: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_update.go deleted file mode 100644 index 78be07c101afd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/method_update.go +++ /dev/null @@ -1,75 +0,0 @@ -package streamingendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *StreamingEndpoint -} - -// Update ... -func (c StreamingEndpointsClient) Update(ctx context.Context, id StreamingEndpointId, input StreamingEndpoint) (result UpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpdateThenPoll performs Update then polls until it's completed -func (c StreamingEndpointsClient) UpdateThenPoll(ctx context.Context, id StreamingEndpointId, input StreamingEndpoint) error { - result, err := c.Update(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Update: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Update: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_akamaiaccesscontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_akamaiaccesscontrol.go deleted file mode 100644 index 54db60a01f0a5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_akamaiaccesscontrol.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AkamaiAccessControl struct { - AkamaiSignatureHeaderAuthenticationKeyList *[]AkamaiSignatureHeaderAuthenticationKey `json:"akamaiSignatureHeaderAuthenticationKeyList,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_akamaisignatureheaderauthenticationkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_akamaisignatureheaderauthenticationkey.go deleted file mode 100644 index 32037bfa525e2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_akamaisignatureheaderauthenticationkey.go +++ /dev/null @@ -1,28 +0,0 @@ -package streamingendpoints - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AkamaiSignatureHeaderAuthenticationKey struct { - Base64Key *string `json:"base64Key,omitempty"` - Expiration *string `json:"expiration,omitempty"` - Identifier *string `json:"identifier,omitempty"` -} - -func (o *AkamaiSignatureHeaderAuthenticationKey) GetExpirationAsTime() (*time.Time, error) { - if o.Expiration == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Expiration, "2006-01-02T15:04:05Z07:00") -} - -func (o *AkamaiSignatureHeaderAuthenticationKey) SetExpirationAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Expiration = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_armstreamingendpointcapacity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_armstreamingendpointcapacity.go deleted file mode 100644 index 3851abde4cbbe..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_armstreamingendpointcapacity.go +++ /dev/null @@ -1,11 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ArmStreamingEndpointCapacity struct { - Default *int64 `json:"default,omitempty"` - Maximum *int64 `json:"maximum,omitempty"` - Minimum *int64 `json:"minimum,omitempty"` - ScaleType *string `json:"scaleType,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_armstreamingendpointcurrentsku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_armstreamingendpointcurrentsku.go deleted file mode 100644 index 0e0caff947bf6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_armstreamingendpointcurrentsku.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ArmStreamingEndpointCurrentSku struct { - Capacity *int64 `json:"capacity,omitempty"` - Name *string `json:"name,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_armstreamingendpointsku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_armstreamingendpointsku.go deleted file mode 100644 index ae2f8ac752bcf..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_armstreamingendpointsku.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ArmStreamingEndpointSku struct { - Name *string `json:"name,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_armstreamingendpointskuinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_armstreamingendpointskuinfo.go deleted file mode 100644 index da156a84cf016..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_armstreamingendpointskuinfo.go +++ /dev/null @@ -1,10 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ArmStreamingEndpointSkuInfo struct { - Capacity *ArmStreamingEndpointCapacity `json:"capacity,omitempty"` - ResourceType *string `json:"resourceType,omitempty"` - Sku *ArmStreamingEndpointSku `json:"sku,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_asyncoperationresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_asyncoperationresult.go deleted file mode 100644 index c38ed883abc82..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_asyncoperationresult.go +++ /dev/null @@ -1,10 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AsyncOperationResult struct { - Error *ErrorDetail `json:"error,omitempty"` - Name *string `json:"name,omitempty"` - Status *AsyncOperationStatus `json:"status,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_crosssiteaccesspolicies.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_crosssiteaccesspolicies.go deleted file mode 100644 index df58bc186f2cd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_crosssiteaccesspolicies.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CrossSiteAccessPolicies struct { - ClientAccessPolicy *string `json:"clientAccessPolicy,omitempty"` - CrossDomainPolicy *string `json:"crossDomainPolicy,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_erroradditionalinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_erroradditionalinfo.go deleted file mode 100644 index 2783726a4488a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_erroradditionalinfo.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ErrorAdditionalInfo struct { - Info *interface{} `json:"info,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_errordetail.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_errordetail.go deleted file mode 100644 index f1dd7e41f0c3e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_errordetail.go +++ /dev/null @@ -1,12 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ErrorDetail struct { - AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` - Code *string `json:"code,omitempty"` - Details *[]ErrorDetail `json:"details,omitempty"` - Message *string `json:"message,omitempty"` - Target *string `json:"target,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_ipaccesscontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_ipaccesscontrol.go deleted file mode 100644 index 68255bff449d5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_ipaccesscontrol.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPAccessControl struct { - Allow *[]IPRange `json:"allow,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_iprange.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_iprange.go deleted file mode 100644 index 07cfcae8c2bed..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_iprange.go +++ /dev/null @@ -1,10 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPRange struct { - Address *string `json:"address,omitempty"` - Name *string `json:"name,omitempty"` - SubnetPrefixLength *int64 `json:"subnetPrefixLength,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_streamingendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_streamingendpoint.go deleted file mode 100644 index 252d4fb93280b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_streamingendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package streamingendpoints - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingEndpoint struct { - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *StreamingEndpointProperties `json:"properties,omitempty"` - Sku *ArmStreamingEndpointCurrentSku `json:"sku,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_streamingendpointaccesscontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_streamingendpointaccesscontrol.go deleted file mode 100644 index 3620eaa8196bc..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_streamingendpointaccesscontrol.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingEndpointAccessControl struct { - Akamai *AkamaiAccessControl `json:"akamai,omitempty"` - IP *IPAccessControl `json:"ip,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_streamingendpointproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_streamingendpointproperties.go deleted file mode 100644 index 4431185990353..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_streamingendpointproperties.go +++ /dev/null @@ -1,65 +0,0 @@ -package streamingendpoints - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingEndpointProperties struct { - AccessControl *StreamingEndpointAccessControl `json:"accessControl,omitempty"` - AvailabilitySetName *string `json:"availabilitySetName,omitempty"` - CdnEnabled *bool `json:"cdnEnabled,omitempty"` - CdnProfile *string `json:"cdnProfile,omitempty"` - CdnProvider *string `json:"cdnProvider,omitempty"` - Created *string `json:"created,omitempty"` - CrossSiteAccessPolicies *CrossSiteAccessPolicies `json:"crossSiteAccessPolicies,omitempty"` - CustomHostNames *[]string `json:"customHostNames,omitempty"` - Description *string `json:"description,omitempty"` - FreeTrialEndTime *string `json:"freeTrialEndTime,omitempty"` - HostName *string `json:"hostName,omitempty"` - LastModified *string `json:"lastModified,omitempty"` - MaxCacheAge *int64 `json:"maxCacheAge,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` - ResourceState *StreamingEndpointResourceState `json:"resourceState,omitempty"` - ScaleUnits int64 `json:"scaleUnits"` -} - -func (o *StreamingEndpointProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *StreamingEndpointProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *StreamingEndpointProperties) GetFreeTrialEndTimeAsTime() (*time.Time, error) { - if o.FreeTrialEndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.FreeTrialEndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *StreamingEndpointProperties) SetFreeTrialEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.FreeTrialEndTime = &formatted -} - -func (o *StreamingEndpointProperties) GetLastModifiedAsTime() (*time.Time, error) { - if o.LastModified == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModified, "2006-01-02T15:04:05Z07:00") -} - -func (o *StreamingEndpointProperties) SetLastModifiedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModified = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_streamingendpointskuinfolistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_streamingendpointskuinfolistresult.go deleted file mode 100644 index d8a48852d28f0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_streamingendpointskuinfolistresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingEndpointSkuInfoListResult struct { - Value *[]ArmStreamingEndpointSkuInfo `json:"value,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_streamingentityscaleunit.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_streamingentityscaleunit.go deleted file mode 100644 index 9af1883b94334..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/model_streamingentityscaleunit.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingEntityScaleUnit struct { - ScaleUnit *int64 `json:"scaleUnit,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/predicates.go deleted file mode 100644 index 9f21dc14d9235..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingEndpointOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p StreamingEndpointOperationPredicate) Matches(input StreamingEndpoint) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/version.go deleted file mode 100644 index e58637e1a26d2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package streamingendpoints - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-08-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/streamingendpoints/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/README.md deleted file mode 100644 index 7d89cec65d891..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/README.md +++ /dev/null @@ -1,192 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators` Documentation - -The `streamingpoliciesandstreaminglocators` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2022-08-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators" -``` - - -### Client Initialization - -```go -client := streamingpoliciesandstreaminglocators.NewStreamingPoliciesAndStreamingLocatorsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingLocatorsCreate` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewStreamingLocatorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingLocatorValue") - -payload := streamingpoliciesandstreaminglocators.StreamingLocator{ - // ... -} - - -read, err := client.StreamingLocatorsCreate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingLocatorsDelete` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewStreamingLocatorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingLocatorValue") - -read, err := client.StreamingLocatorsDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingLocatorsGet` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewStreamingLocatorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingLocatorValue") - -read, err := client.StreamingLocatorsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingLocatorsList` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -// alternatively `client.StreamingLocatorsList(ctx, id, streamingpoliciesandstreaminglocators.DefaultStreamingLocatorsListOperationOptions())` can be used to do batched pagination -items, err := client.StreamingLocatorsListComplete(ctx, id, streamingpoliciesandstreaminglocators.DefaultStreamingLocatorsListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingLocatorsListContentKeys` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewStreamingLocatorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingLocatorValue") - -read, err := client.StreamingLocatorsListContentKeys(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingLocatorsListPaths` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewStreamingLocatorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingLocatorValue") - -read, err := client.StreamingLocatorsListPaths(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingPoliciesCreate` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewStreamingPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingPolicyValue") - -payload := streamingpoliciesandstreaminglocators.StreamingPolicy{ - // ... -} - - -read, err := client.StreamingPoliciesCreate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingPoliciesDelete` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewStreamingPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingPolicyValue") - -read, err := client.StreamingPoliciesDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingPoliciesGet` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewStreamingPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingPolicyValue") - -read, err := client.StreamingPoliciesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingPoliciesList` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -// alternatively `client.StreamingPoliciesList(ctx, id, streamingpoliciesandstreaminglocators.DefaultStreamingPoliciesListOperationOptions())` can be used to do batched pagination -items, err := client.StreamingPoliciesListComplete(ctx, id, streamingpoliciesandstreaminglocators.DefaultStreamingPoliciesListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/client.go deleted file mode 100644 index ad459b8507fae..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPoliciesAndStreamingLocatorsClient struct { - Client *resourcemanager.Client -} - -func NewStreamingPoliciesAndStreamingLocatorsClientWithBaseURI(sdkApi sdkEnv.Api) (*StreamingPoliciesAndStreamingLocatorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "streamingpoliciesandstreaminglocators", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating StreamingPoliciesAndStreamingLocatorsClient: %+v", err) - } - - return &StreamingPoliciesAndStreamingLocatorsClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/constants.go deleted file mode 100644 index 3f552d6de9ea1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/constants.go +++ /dev/null @@ -1,230 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EncryptionScheme string - -const ( - EncryptionSchemeCommonEncryptionCbcs EncryptionScheme = "CommonEncryptionCbcs" - EncryptionSchemeCommonEncryptionCenc EncryptionScheme = "CommonEncryptionCenc" - EncryptionSchemeEnvelopeEncryption EncryptionScheme = "EnvelopeEncryption" - EncryptionSchemeNoEncryption EncryptionScheme = "NoEncryption" -) - -func PossibleValuesForEncryptionScheme() []string { - return []string{ - string(EncryptionSchemeCommonEncryptionCbcs), - string(EncryptionSchemeCommonEncryptionCenc), - string(EncryptionSchemeEnvelopeEncryption), - string(EncryptionSchemeNoEncryption), - } -} - -func (s *EncryptionScheme) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEncryptionScheme(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEncryptionScheme(input string) (*EncryptionScheme, error) { - vals := map[string]EncryptionScheme{ - "commonencryptioncbcs": EncryptionSchemeCommonEncryptionCbcs, - "commonencryptioncenc": EncryptionSchemeCommonEncryptionCenc, - "envelopeencryption": EncryptionSchemeEnvelopeEncryption, - "noencryption": EncryptionSchemeNoEncryption, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EncryptionScheme(input) - return &out, nil -} - -type StreamingLocatorContentKeyType string - -const ( - StreamingLocatorContentKeyTypeCommonEncryptionCbcs StreamingLocatorContentKeyType = "CommonEncryptionCbcs" - StreamingLocatorContentKeyTypeCommonEncryptionCenc StreamingLocatorContentKeyType = "CommonEncryptionCenc" - StreamingLocatorContentKeyTypeEnvelopeEncryption StreamingLocatorContentKeyType = "EnvelopeEncryption" -) - -func PossibleValuesForStreamingLocatorContentKeyType() []string { - return []string{ - string(StreamingLocatorContentKeyTypeCommonEncryptionCbcs), - string(StreamingLocatorContentKeyTypeCommonEncryptionCenc), - string(StreamingLocatorContentKeyTypeEnvelopeEncryption), - } -} - -func (s *StreamingLocatorContentKeyType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseStreamingLocatorContentKeyType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseStreamingLocatorContentKeyType(input string) (*StreamingLocatorContentKeyType, error) { - vals := map[string]StreamingLocatorContentKeyType{ - "commonencryptioncbcs": StreamingLocatorContentKeyTypeCommonEncryptionCbcs, - "commonencryptioncenc": StreamingLocatorContentKeyTypeCommonEncryptionCenc, - "envelopeencryption": StreamingLocatorContentKeyTypeEnvelopeEncryption, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StreamingLocatorContentKeyType(input) - return &out, nil -} - -type StreamingPolicyStreamingProtocol string - -const ( - StreamingPolicyStreamingProtocolDash StreamingPolicyStreamingProtocol = "Dash" - StreamingPolicyStreamingProtocolDownload StreamingPolicyStreamingProtocol = "Download" - StreamingPolicyStreamingProtocolHls StreamingPolicyStreamingProtocol = "Hls" - StreamingPolicyStreamingProtocolSmoothStreaming StreamingPolicyStreamingProtocol = "SmoothStreaming" -) - -func PossibleValuesForStreamingPolicyStreamingProtocol() []string { - return []string{ - string(StreamingPolicyStreamingProtocolDash), - string(StreamingPolicyStreamingProtocolDownload), - string(StreamingPolicyStreamingProtocolHls), - string(StreamingPolicyStreamingProtocolSmoothStreaming), - } -} - -func (s *StreamingPolicyStreamingProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseStreamingPolicyStreamingProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseStreamingPolicyStreamingProtocol(input string) (*StreamingPolicyStreamingProtocol, error) { - vals := map[string]StreamingPolicyStreamingProtocol{ - "dash": StreamingPolicyStreamingProtocolDash, - "download": StreamingPolicyStreamingProtocolDownload, - "hls": StreamingPolicyStreamingProtocolHls, - "smoothstreaming": StreamingPolicyStreamingProtocolSmoothStreaming, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StreamingPolicyStreamingProtocol(input) - return &out, nil -} - -type TrackPropertyCompareOperation string - -const ( - TrackPropertyCompareOperationEqual TrackPropertyCompareOperation = "Equal" - TrackPropertyCompareOperationUnknown TrackPropertyCompareOperation = "Unknown" -) - -func PossibleValuesForTrackPropertyCompareOperation() []string { - return []string{ - string(TrackPropertyCompareOperationEqual), - string(TrackPropertyCompareOperationUnknown), - } -} - -func (s *TrackPropertyCompareOperation) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTrackPropertyCompareOperation(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTrackPropertyCompareOperation(input string) (*TrackPropertyCompareOperation, error) { - vals := map[string]TrackPropertyCompareOperation{ - "equal": TrackPropertyCompareOperationEqual, - "unknown": TrackPropertyCompareOperationUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TrackPropertyCompareOperation(input) - return &out, nil -} - -type TrackPropertyType string - -const ( - TrackPropertyTypeFourCC TrackPropertyType = "FourCC" - TrackPropertyTypeUnknown TrackPropertyType = "Unknown" -) - -func PossibleValuesForTrackPropertyType() []string { - return []string{ - string(TrackPropertyTypeFourCC), - string(TrackPropertyTypeUnknown), - } -} - -func (s *TrackPropertyType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTrackPropertyType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTrackPropertyType(input string) (*TrackPropertyType, error) { - vals := map[string]TrackPropertyType{ - "fourcc": TrackPropertyTypeFourCC, - "unknown": TrackPropertyTypeUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TrackPropertyType(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_mediaservice.go deleted file mode 100644 index a9668bf4425a6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_mediaservice.go +++ /dev/null @@ -1,130 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&MediaServiceId{}) -} - -var _ resourceids.ResourceId = &MediaServiceId{} - -// MediaServiceId is a struct representing the Resource ID for a Media Service -type MediaServiceId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string -} - -// NewMediaServiceID returns a new MediaServiceId struct -func NewMediaServiceID(subscriptionId string, resourceGroupName string, mediaServiceName string) MediaServiceId { - return MediaServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - } -} - -// ParseMediaServiceID parses 'input' into a MediaServiceId -func ParseMediaServiceID(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseMediaServiceIDInsensitively parses 'input' case-insensitively into a MediaServiceId -// note: this method should only be used for API response data and not user input -func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(&MediaServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *MediaServiceId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - return nil -} - -// ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID -func ValidateMediaServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMediaServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Media Service ID -func (id MediaServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Media Service ID -func (id MediaServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - } -} - -// String returns a human-readable description of this Media Service ID -func (id MediaServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - } - return fmt.Sprintf("Media Service (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_streaminglocator.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_streaminglocator.go deleted file mode 100644 index 98c5b939dd056..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_streaminglocator.go +++ /dev/null @@ -1,139 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&StreamingLocatorId{}) -} - -var _ resourceids.ResourceId = &StreamingLocatorId{} - -// StreamingLocatorId is a struct representing the Resource ID for a Streaming Locator -type StreamingLocatorId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - StreamingLocatorName string -} - -// NewStreamingLocatorID returns a new StreamingLocatorId struct -func NewStreamingLocatorID(subscriptionId string, resourceGroupName string, mediaServiceName string, streamingLocatorName string) StreamingLocatorId { - return StreamingLocatorId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - StreamingLocatorName: streamingLocatorName, - } -} - -// ParseStreamingLocatorID parses 'input' into a StreamingLocatorId -func ParseStreamingLocatorID(input string) (*StreamingLocatorId, error) { - parser := resourceids.NewParserFromResourceIdType(&StreamingLocatorId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := StreamingLocatorId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseStreamingLocatorIDInsensitively parses 'input' case-insensitively into a StreamingLocatorId -// note: this method should only be used for API response data and not user input -func ParseStreamingLocatorIDInsensitively(input string) (*StreamingLocatorId, error) { - parser := resourceids.NewParserFromResourceIdType(&StreamingLocatorId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := StreamingLocatorId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *StreamingLocatorId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.StreamingLocatorName, ok = input.Parsed["streamingLocatorName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "streamingLocatorName", input) - } - - return nil -} - -// ValidateStreamingLocatorID checks that 'input' can be parsed as a Streaming Locator ID -func ValidateStreamingLocatorID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseStreamingLocatorID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Streaming Locator ID -func (id StreamingLocatorId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/streamingLocators/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.StreamingLocatorName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Streaming Locator ID -func (id StreamingLocatorId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticStreamingLocators", "streamingLocators", "streamingLocators"), - resourceids.UserSpecifiedSegment("streamingLocatorName", "streamingLocatorValue"), - } -} - -// String returns a human-readable description of this Streaming Locator ID -func (id StreamingLocatorId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Streaming Locator Name: %q", id.StreamingLocatorName), - } - return fmt.Sprintf("Streaming Locator (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_streamingpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_streamingpolicy.go deleted file mode 100644 index 36742d553b4aa..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_streamingpolicy.go +++ /dev/null @@ -1,139 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&StreamingPolicyId{}) -} - -var _ resourceids.ResourceId = &StreamingPolicyId{} - -// StreamingPolicyId is a struct representing the Resource ID for a Streaming Policy -type StreamingPolicyId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - StreamingPolicyName string -} - -// NewStreamingPolicyID returns a new StreamingPolicyId struct -func NewStreamingPolicyID(subscriptionId string, resourceGroupName string, mediaServiceName string, streamingPolicyName string) StreamingPolicyId { - return StreamingPolicyId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - StreamingPolicyName: streamingPolicyName, - } -} - -// ParseStreamingPolicyID parses 'input' into a StreamingPolicyId -func ParseStreamingPolicyID(input string) (*StreamingPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(&StreamingPolicyId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := StreamingPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseStreamingPolicyIDInsensitively parses 'input' case-insensitively into a StreamingPolicyId -// note: this method should only be used for API response data and not user input -func ParseStreamingPolicyIDInsensitively(input string) (*StreamingPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(&StreamingPolicyId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := StreamingPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *StreamingPolicyId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) - } - - if id.StreamingPolicyName, ok = input.Parsed["streamingPolicyName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "streamingPolicyName", input) - } - - return nil -} - -// ValidateStreamingPolicyID checks that 'input' can be parsed as a Streaming Policy ID -func ValidateStreamingPolicyID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseStreamingPolicyID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Streaming Policy ID -func (id StreamingPolicyId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/streamingPolicies/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.StreamingPolicyName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Streaming Policy ID -func (id StreamingPolicyId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticStreamingPolicies", "streamingPolicies", "streamingPolicies"), - resourceids.UserSpecifiedSegment("streamingPolicyName", "streamingPolicyValue"), - } -} - -// String returns a human-readable description of this Streaming Policy ID -func (id StreamingPolicyId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Streaming Policy Name: %q", id.StreamingPolicyName), - } - return fmt.Sprintf("Streaming Policy (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorscreate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorscreate.go deleted file mode 100644 index b4cfe3f3a7ac1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorscreate.go +++ /dev/null @@ -1,58 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorsCreateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *StreamingLocator -} - -// StreamingLocatorsCreate ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsCreate(ctx context.Context, id StreamingLocatorId, input StreamingLocator) (result StreamingLocatorsCreateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model StreamingLocator - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsdelete.go deleted file mode 100644 index 4b458c2d50180..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsdelete.go +++ /dev/null @@ -1,47 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorsDeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// StreamingLocatorsDelete ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsDelete(ctx context.Context, id StreamingLocatorId) (result StreamingLocatorsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsget.go deleted file mode 100644 index 4f9e0139c97e1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsget.go +++ /dev/null @@ -1,54 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *StreamingLocator -} - -// StreamingLocatorsGet ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsGet(ctx context.Context, id StreamingLocatorId) (result StreamingLocatorsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model StreamingLocator - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslist.go deleted file mode 100644 index 9a5c60b3080ed..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslist.go +++ /dev/null @@ -1,141 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]StreamingLocator -} - -type StreamingLocatorsListCompleteResult struct { - LatestHttpResponse *http.Response - Items []StreamingLocator -} - -type StreamingLocatorsListOperationOptions struct { - Filter *string - Orderby *string - Top *int64 -} - -func DefaultStreamingLocatorsListOperationOptions() StreamingLocatorsListOperationOptions { - return StreamingLocatorsListOperationOptions{} -} - -func (o StreamingLocatorsListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o StreamingLocatorsListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o StreamingLocatorsListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Filter != nil { - out.Append("$filter", fmt.Sprintf("%v", *o.Filter)) - } - if o.Orderby != nil { - out.Append("$orderby", fmt.Sprintf("%v", *o.Orderby)) - } - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -type StreamingLocatorsListCustomPager struct { - NextLink *odata.Link `json:"@odata.nextLink"` -} - -func (p *StreamingLocatorsListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// StreamingLocatorsList ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsList(ctx context.Context, id MediaServiceId, options StreamingLocatorsListOperationOptions) (result StreamingLocatorsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - OptionsObject: options, - Pager: &StreamingLocatorsListCustomPager{}, - Path: fmt.Sprintf("%s/streamingLocators", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]StreamingLocator `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// StreamingLocatorsListComplete retrieves all the results into a single object -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsListComplete(ctx context.Context, id MediaServiceId, options StreamingLocatorsListOperationOptions) (StreamingLocatorsListCompleteResult, error) { - return c.StreamingLocatorsListCompleteMatchingPredicate(ctx, id, options, StreamingLocatorOperationPredicate{}) -} - -// StreamingLocatorsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsListCompleteMatchingPredicate(ctx context.Context, id MediaServiceId, options StreamingLocatorsListOperationOptions, predicate StreamingLocatorOperationPredicate) (result StreamingLocatorsListCompleteResult, err error) { - items := make([]StreamingLocator, 0) - - resp, err := c.StreamingLocatorsList(ctx, id, options) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = StreamingLocatorsListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistcontentkeys.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistcontentkeys.go deleted file mode 100644 index d33f7dc9215bd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistcontentkeys.go +++ /dev/null @@ -1,55 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorsListContentKeysOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ListContentKeysResponse -} - -// StreamingLocatorsListContentKeys ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsListContentKeys(ctx context.Context, id StreamingLocatorId) (result StreamingLocatorsListContentKeysOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listContentKeys", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ListContentKeysResponse - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistpaths.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistpaths.go deleted file mode 100644 index e23e286f57526..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistpaths.go +++ /dev/null @@ -1,55 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorsListPathsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ListPathsResponse -} - -// StreamingLocatorsListPaths ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsListPaths(ctx context.Context, id StreamingLocatorId) (result StreamingLocatorsListPathsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listPaths", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ListPathsResponse - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streamingpoliciescreate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streamingpoliciescreate.go deleted file mode 100644 index 82fbc7d81195b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streamingpoliciescreate.go +++ /dev/null @@ -1,58 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPoliciesCreateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *StreamingPolicy -} - -// StreamingPoliciesCreate ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingPoliciesCreate(ctx context.Context, id StreamingPolicyId, input StreamingPolicy) (result StreamingPoliciesCreateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model StreamingPolicy - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesdelete.go deleted file mode 100644 index 289325c535834..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesdelete.go +++ /dev/null @@ -1,47 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPoliciesDeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// StreamingPoliciesDelete ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingPoliciesDelete(ctx context.Context, id StreamingPolicyId) (result StreamingPoliciesDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesget.go deleted file mode 100644 index 5ccc570abb98d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesget.go +++ /dev/null @@ -1,54 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPoliciesGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *StreamingPolicy -} - -// StreamingPoliciesGet ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingPoliciesGet(ctx context.Context, id StreamingPolicyId) (result StreamingPoliciesGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model StreamingPolicy - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streamingpolicieslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streamingpolicieslist.go deleted file mode 100644 index 3397b46a73e18..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streamingpolicieslist.go +++ /dev/null @@ -1,141 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPoliciesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]StreamingPolicy -} - -type StreamingPoliciesListCompleteResult struct { - LatestHttpResponse *http.Response - Items []StreamingPolicy -} - -type StreamingPoliciesListOperationOptions struct { - Filter *string - Orderby *string - Top *int64 -} - -func DefaultStreamingPoliciesListOperationOptions() StreamingPoliciesListOperationOptions { - return StreamingPoliciesListOperationOptions{} -} - -func (o StreamingPoliciesListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o StreamingPoliciesListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o StreamingPoliciesListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Filter != nil { - out.Append("$filter", fmt.Sprintf("%v", *o.Filter)) - } - if o.Orderby != nil { - out.Append("$orderby", fmt.Sprintf("%v", *o.Orderby)) - } - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -type StreamingPoliciesListCustomPager struct { - NextLink *odata.Link `json:"@odata.nextLink"` -} - -func (p *StreamingPoliciesListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// StreamingPoliciesList ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingPoliciesList(ctx context.Context, id MediaServiceId, options StreamingPoliciesListOperationOptions) (result StreamingPoliciesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - OptionsObject: options, - Pager: &StreamingPoliciesListCustomPager{}, - Path: fmt.Sprintf("%s/streamingPolicies", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]StreamingPolicy `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// StreamingPoliciesListComplete retrieves all the results into a single object -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingPoliciesListComplete(ctx context.Context, id MediaServiceId, options StreamingPoliciesListOperationOptions) (StreamingPoliciesListCompleteResult, error) { - return c.StreamingPoliciesListCompleteMatchingPredicate(ctx, id, options, StreamingPolicyOperationPredicate{}) -} - -// StreamingPoliciesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingPoliciesListCompleteMatchingPredicate(ctx context.Context, id MediaServiceId, options StreamingPoliciesListOperationOptions, predicate StreamingPolicyOperationPredicate) (result StreamingPoliciesListCompleteResult, err error) { - items := make([]StreamingPolicy, 0) - - resp, err := c.StreamingPoliciesList(ctx, id, options) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = StreamingPoliciesListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_cbcsdrmconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_cbcsdrmconfiguration.go deleted file mode 100644 index ae2f7e2f7b938..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_cbcsdrmconfiguration.go +++ /dev/null @@ -1,10 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CbcsDrmConfiguration struct { - FairPlay *StreamingPolicyFairPlayConfiguration `json:"fairPlay,omitempty"` - PlayReady *StreamingPolicyPlayReadyConfiguration `json:"playReady,omitempty"` - Widevine *StreamingPolicyWidevineConfiguration `json:"widevine,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_cencdrmconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_cencdrmconfiguration.go deleted file mode 100644 index 303f7515a8ba3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_cencdrmconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CencDrmConfiguration struct { - PlayReady *StreamingPolicyPlayReadyConfiguration `json:"playReady,omitempty"` - Widevine *StreamingPolicyWidevineConfiguration `json:"widevine,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_clearkeyencryptionconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_clearkeyencryptionconfiguration.go deleted file mode 100644 index b7558837b6add..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_clearkeyencryptionconfiguration.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClearKeyEncryptionConfiguration struct { - CustomKeysAcquisitionUrlTemplate *string `json:"customKeysAcquisitionUrlTemplate,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_commonencryptioncbcs.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_commonencryptioncbcs.go deleted file mode 100644 index b1abc1922ce0e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_commonencryptioncbcs.go +++ /dev/null @@ -1,12 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommonEncryptionCbcs struct { - ClearKeyEncryptionConfiguration *ClearKeyEncryptionConfiguration `json:"clearKeyEncryptionConfiguration,omitempty"` - ClearTracks *[]TrackSelection `json:"clearTracks,omitempty"` - ContentKeys *StreamingPolicyContentKeys `json:"contentKeys,omitempty"` - Drm *CbcsDrmConfiguration `json:"drm,omitempty"` - EnabledProtocols *EnabledProtocols `json:"enabledProtocols,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_commonencryptioncenc.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_commonencryptioncenc.go deleted file mode 100644 index 9a2721d0557f7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_commonencryptioncenc.go +++ /dev/null @@ -1,12 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommonEncryptionCenc struct { - ClearKeyEncryptionConfiguration *ClearKeyEncryptionConfiguration `json:"clearKeyEncryptionConfiguration,omitempty"` - ClearTracks *[]TrackSelection `json:"clearTracks,omitempty"` - ContentKeys *StreamingPolicyContentKeys `json:"contentKeys,omitempty"` - Drm *CencDrmConfiguration `json:"drm,omitempty"` - EnabledProtocols *EnabledProtocols `json:"enabledProtocols,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_defaultkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_defaultkey.go deleted file mode 100644 index 45346db27997c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_defaultkey.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DefaultKey struct { - Label *string `json:"label,omitempty"` - PolicyName *string `json:"policyName,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_enabledprotocols.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_enabledprotocols.go deleted file mode 100644 index 6df37395ce298..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_enabledprotocols.go +++ /dev/null @@ -1,11 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EnabledProtocols struct { - Dash bool `json:"dash"` - Download bool `json:"download"` - Hls bool `json:"hls"` - SmoothStreaming bool `json:"smoothStreaming"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_envelopeencryption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_envelopeencryption.go deleted file mode 100644 index 2d05cea4b5abf..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_envelopeencryption.go +++ /dev/null @@ -1,11 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EnvelopeEncryption struct { - ClearTracks *[]TrackSelection `json:"clearTracks,omitempty"` - ContentKeys *StreamingPolicyContentKeys `json:"contentKeys,omitempty"` - CustomKeyAcquisitionUrlTemplate *string `json:"customKeyAcquisitionUrlTemplate,omitempty"` - EnabledProtocols *EnabledProtocols `json:"enabledProtocols,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_listcontentkeysresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_listcontentkeysresponse.go deleted file mode 100644 index 9947072e63d64..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_listcontentkeysresponse.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListContentKeysResponse struct { - ContentKeys *[]StreamingLocatorContentKey `json:"contentKeys,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_listpathsresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_listpathsresponse.go deleted file mode 100644 index dc2d9ca8c6599..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_listpathsresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListPathsResponse struct { - DownloadPaths *[]string `json:"downloadPaths,omitempty"` - StreamingPaths *[]StreamingPath `json:"streamingPaths,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_noencryption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_noencryption.go deleted file mode 100644 index e011fdc6e91cf..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_noencryption.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NoEncryption struct { - EnabledProtocols *EnabledProtocols `json:"enabledProtocols,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streaminglocator.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streaminglocator.go deleted file mode 100644 index dfba5540db69a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streaminglocator.go +++ /dev/null @@ -1,16 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocator struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *StreamingLocatorProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streaminglocatorcontentkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streaminglocatorcontentkey.go deleted file mode 100644 index 52c78e6e9237f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streaminglocatorcontentkey.go +++ /dev/null @@ -1,13 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorContentKey struct { - Id string `json:"id"` - LabelReferenceInStreamingPolicy *string `json:"labelReferenceInStreamingPolicy,omitempty"` - PolicyName *string `json:"policyName,omitempty"` - Tracks *[]TrackSelection `json:"tracks,omitempty"` - Type *StreamingLocatorContentKeyType `json:"type,omitempty"` - Value *string `json:"value,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streaminglocatorproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streaminglocatorproperties.go deleted file mode 100644 index e9123bd921faa..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streaminglocatorproperties.go +++ /dev/null @@ -1,59 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorProperties struct { - AlternativeMediaId *string `json:"alternativeMediaId,omitempty"` - AssetName string `json:"assetName"` - ContentKeys *[]StreamingLocatorContentKey `json:"contentKeys,omitempty"` - Created *string `json:"created,omitempty"` - DefaultContentKeyPolicyName *string `json:"defaultContentKeyPolicyName,omitempty"` - EndTime *string `json:"endTime,omitempty"` - Filters *[]string `json:"filters,omitempty"` - StartTime *string `json:"startTime,omitempty"` - StreamingLocatorId *string `json:"streamingLocatorId,omitempty"` - StreamingPolicyName string `json:"streamingPolicyName"` -} - -func (o *StreamingLocatorProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *StreamingLocatorProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *StreamingLocatorProperties) GetEndTimeAsTime() (*time.Time, error) { - if o.EndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *StreamingLocatorProperties) SetEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndTime = &formatted -} - -func (o *StreamingLocatorProperties) GetStartTimeAsTime() (*time.Time, error) { - if o.StartTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *StreamingLocatorProperties) SetStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartTime = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streamingpath.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streamingpath.go deleted file mode 100644 index 72efd8a9aa27e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streamingpath.go +++ /dev/null @@ -1,10 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPath struct { - EncryptionScheme EncryptionScheme `json:"encryptionScheme"` - Paths *[]string `json:"paths,omitempty"` - StreamingProtocol StreamingPolicyStreamingProtocol `json:"streamingProtocol"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streamingpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streamingpolicy.go deleted file mode 100644 index 3dd17c8014555..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streamingpolicy.go +++ /dev/null @@ -1,16 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPolicy struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *StreamingPolicyProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streamingpolicycontentkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streamingpolicycontentkey.go deleted file mode 100644 index 2b8ff87e76868..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streamingpolicycontentkey.go +++ /dev/null @@ -1,10 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPolicyContentKey struct { - Label *string `json:"label,omitempty"` - PolicyName *string `json:"policyName,omitempty"` - Tracks *[]TrackSelection `json:"tracks,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streamingpolicycontentkeys.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streamingpolicycontentkeys.go deleted file mode 100644 index 89fc35580ed8c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streamingpolicycontentkeys.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPolicyContentKeys struct { - DefaultKey *DefaultKey `json:"defaultKey,omitempty"` - KeyToTrackMappings *[]StreamingPolicyContentKey `json:"keyToTrackMappings,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streamingpolicyfairplayconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streamingpolicyfairplayconfiguration.go deleted file mode 100644 index 08017c68e806f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streamingpolicyfairplayconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPolicyFairPlayConfiguration struct { - AllowPersistentLicense bool `json:"allowPersistentLicense"` - CustomLicenseAcquisitionUrlTemplate *string `json:"customLicenseAcquisitionUrlTemplate,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streamingpolicyplayreadyconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streamingpolicyplayreadyconfiguration.go deleted file mode 100644 index 45d779f1602e0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streamingpolicyplayreadyconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPolicyPlayReadyConfiguration struct { - CustomLicenseAcquisitionUrlTemplate *string `json:"customLicenseAcquisitionUrlTemplate,omitempty"` - PlayReadyCustomAttributes *string `json:"playReadyCustomAttributes,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streamingpolicyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streamingpolicyproperties.go deleted file mode 100644 index 69fbe59729b5c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streamingpolicyproperties.go +++ /dev/null @@ -1,31 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPolicyProperties struct { - CommonEncryptionCbcs *CommonEncryptionCbcs `json:"commonEncryptionCbcs,omitempty"` - CommonEncryptionCenc *CommonEncryptionCenc `json:"commonEncryptionCenc,omitempty"` - Created *string `json:"created,omitempty"` - DefaultContentKeyPolicyName *string `json:"defaultContentKeyPolicyName,omitempty"` - EnvelopeEncryption *EnvelopeEncryption `json:"envelopeEncryption,omitempty"` - NoEncryption *NoEncryption `json:"noEncryption,omitempty"` -} - -func (o *StreamingPolicyProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *StreamingPolicyProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streamingpolicywidevineconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streamingpolicywidevineconfiguration.go deleted file mode 100644 index 2d2ec405fb180..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_streamingpolicywidevineconfiguration.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPolicyWidevineConfiguration struct { - CustomLicenseAcquisitionUrlTemplate *string `json:"customLicenseAcquisitionUrlTemplate,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_trackpropertycondition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_trackpropertycondition.go deleted file mode 100644 index 798b212d07ced..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_trackpropertycondition.go +++ /dev/null @@ -1,10 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrackPropertyCondition struct { - Operation TrackPropertyCompareOperation `json:"operation"` - Property TrackPropertyType `json:"property"` - Value *string `json:"value,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_trackselection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_trackselection.go deleted file mode 100644 index be9009cc09e53..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/model_trackselection.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrackSelection struct { - TrackSelections *[]TrackPropertyCondition `json:"trackSelections,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/predicates.go deleted file mode 100644 index f5a87258ff4ea..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/predicates.go +++ /dev/null @@ -1,50 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p StreamingLocatorOperationPredicate) Matches(input StreamingLocator) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type StreamingPolicyOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p StreamingPolicyOperationPredicate) Matches(input StreamingPolicy) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/version.go deleted file mode 100644 index cf48ae58f622f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-08-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/streamingpoliciesandstreaminglocators/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/README.md deleted file mode 100644 index 99f2f69829224..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/README.md +++ /dev/null @@ -1,287 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways` Documentation - -The `applicationgateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways" -``` - - -### Client Initialization - -```go -client := applicationgateways.NewApplicationGatewaysClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ApplicationGatewaysClient.BackendHealth` - -```go -ctx := context.TODO() -id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -if err := client.BackendHealthThenPoll(ctx, id, applicationgateways.DefaultBackendHealthOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `ApplicationGatewaysClient.BackendHealthOnDemand` - -```go -ctx := context.TODO() -id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -payload := applicationgateways.ApplicationGatewayOnDemandProbe{ - // ... -} - - -if err := client.BackendHealthOnDemandThenPoll(ctx, id, payload, applicationgateways.DefaultBackendHealthOnDemandOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `ApplicationGatewaysClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -payload := applicationgateways.ApplicationGateway{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ApplicationGatewaysClient.Delete` - -```go -ctx := context.TODO() -id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ApplicationGatewaysClient.Get` - -```go -ctx := context.TODO() -id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationGatewaysClient.GetSslPredefinedPolicy` - -```go -ctx := context.TODO() -id := applicationgateways.NewPredefinedPolicyID("12345678-1234-9876-4563-123456789012", "predefinedPolicyValue") - -read, err := client.GetSslPredefinedPolicy(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationGatewaysClient.List` - -```go -ctx := context.TODO() -id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ApplicationGatewaysClient.ListAll` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ApplicationGatewaysClient.ListAvailableRequestHeaders` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -read, err := client.ListAvailableRequestHeaders(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationGatewaysClient.ListAvailableResponseHeaders` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -read, err := client.ListAvailableResponseHeaders(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationGatewaysClient.ListAvailableServerVariables` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -read, err := client.ListAvailableServerVariables(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationGatewaysClient.ListAvailableSslOptions` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -read, err := client.ListAvailableSslOptions(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationGatewaysClient.ListAvailableSslPredefinedPolicies` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAvailableSslPredefinedPolicies(ctx, id)` can be used to do batched pagination -items, err := client.ListAvailableSslPredefinedPoliciesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ApplicationGatewaysClient.ListAvailableWafRuleSets` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -read, err := client.ListAvailableWafRuleSets(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationGatewaysClient.Start` - -```go -ctx := context.TODO() -id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -if err := client.StartThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ApplicationGatewaysClient.Stop` - -```go -ctx := context.TODO() -id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -if err := client.StopThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ApplicationGatewaysClient.UpdateTags` - -```go -ctx := context.TODO() -id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -payload := applicationgateways.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/client.go deleted file mode 100644 index 9608bf4710684..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package applicationgateways - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaysClient struct { - Client *resourcemanager.Client -} - -func NewApplicationGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationgateways", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ApplicationGatewaysClient: %+v", err) - } - - return &ApplicationGatewaysClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/constants.go deleted file mode 100644 index e6cef95825fa9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/constants.go +++ /dev/null @@ -1,1954 +0,0 @@ -package applicationgateways - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHealthServerHealth string - -const ( - ApplicationGatewayBackendHealthServerHealthDown ApplicationGatewayBackendHealthServerHealth = "Down" - ApplicationGatewayBackendHealthServerHealthDraining ApplicationGatewayBackendHealthServerHealth = "Draining" - ApplicationGatewayBackendHealthServerHealthPartial ApplicationGatewayBackendHealthServerHealth = "Partial" - ApplicationGatewayBackendHealthServerHealthUnknown ApplicationGatewayBackendHealthServerHealth = "Unknown" - ApplicationGatewayBackendHealthServerHealthUp ApplicationGatewayBackendHealthServerHealth = "Up" -) - -func PossibleValuesForApplicationGatewayBackendHealthServerHealth() []string { - return []string{ - string(ApplicationGatewayBackendHealthServerHealthDown), - string(ApplicationGatewayBackendHealthServerHealthDraining), - string(ApplicationGatewayBackendHealthServerHealthPartial), - string(ApplicationGatewayBackendHealthServerHealthUnknown), - string(ApplicationGatewayBackendHealthServerHealthUp), - } -} - -func (s *ApplicationGatewayBackendHealthServerHealth) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayBackendHealthServerHealth(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayBackendHealthServerHealth(input string) (*ApplicationGatewayBackendHealthServerHealth, error) { - vals := map[string]ApplicationGatewayBackendHealthServerHealth{ - "down": ApplicationGatewayBackendHealthServerHealthDown, - "draining": ApplicationGatewayBackendHealthServerHealthDraining, - "partial": ApplicationGatewayBackendHealthServerHealthPartial, - "unknown": ApplicationGatewayBackendHealthServerHealthUnknown, - "up": ApplicationGatewayBackendHealthServerHealthUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayBackendHealthServerHealth(input) - return &out, nil -} - -type ApplicationGatewayClientRevocationOptions string - -const ( - ApplicationGatewayClientRevocationOptionsNone ApplicationGatewayClientRevocationOptions = "None" - ApplicationGatewayClientRevocationOptionsOCSP ApplicationGatewayClientRevocationOptions = "OCSP" -) - -func PossibleValuesForApplicationGatewayClientRevocationOptions() []string { - return []string{ - string(ApplicationGatewayClientRevocationOptionsNone), - string(ApplicationGatewayClientRevocationOptionsOCSP), - } -} - -func (s *ApplicationGatewayClientRevocationOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayClientRevocationOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayClientRevocationOptions(input string) (*ApplicationGatewayClientRevocationOptions, error) { - vals := map[string]ApplicationGatewayClientRevocationOptions{ - "none": ApplicationGatewayClientRevocationOptionsNone, - "ocsp": ApplicationGatewayClientRevocationOptionsOCSP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayClientRevocationOptions(input) - return &out, nil -} - -type ApplicationGatewayCookieBasedAffinity string - -const ( - ApplicationGatewayCookieBasedAffinityDisabled ApplicationGatewayCookieBasedAffinity = "Disabled" - ApplicationGatewayCookieBasedAffinityEnabled ApplicationGatewayCookieBasedAffinity = "Enabled" -) - -func PossibleValuesForApplicationGatewayCookieBasedAffinity() []string { - return []string{ - string(ApplicationGatewayCookieBasedAffinityDisabled), - string(ApplicationGatewayCookieBasedAffinityEnabled), - } -} - -func (s *ApplicationGatewayCookieBasedAffinity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayCookieBasedAffinity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayCookieBasedAffinity(input string) (*ApplicationGatewayCookieBasedAffinity, error) { - vals := map[string]ApplicationGatewayCookieBasedAffinity{ - "disabled": ApplicationGatewayCookieBasedAffinityDisabled, - "enabled": ApplicationGatewayCookieBasedAffinityEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayCookieBasedAffinity(input) - return &out, nil -} - -type ApplicationGatewayCustomErrorStatusCode string - -const ( - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroTwo ApplicationGatewayCustomErrorStatusCode = "HttpStatus502" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroThree ApplicationGatewayCustomErrorStatusCode = "HttpStatus403" -) - -func PossibleValuesForApplicationGatewayCustomErrorStatusCode() []string { - return []string{ - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroTwo), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroThree), - } -} - -func (s *ApplicationGatewayCustomErrorStatusCode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayCustomErrorStatusCode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayCustomErrorStatusCode(input string) (*ApplicationGatewayCustomErrorStatusCode, error) { - vals := map[string]ApplicationGatewayCustomErrorStatusCode{ - "httpstatus502": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroTwo, - "httpstatus403": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroThree, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayCustomErrorStatusCode(input) - return &out, nil -} - -type ApplicationGatewayFirewallMode string - -const ( - ApplicationGatewayFirewallModeDetection ApplicationGatewayFirewallMode = "Detection" - ApplicationGatewayFirewallModePrevention ApplicationGatewayFirewallMode = "Prevention" -) - -func PossibleValuesForApplicationGatewayFirewallMode() []string { - return []string{ - string(ApplicationGatewayFirewallModeDetection), - string(ApplicationGatewayFirewallModePrevention), - } -} - -func (s *ApplicationGatewayFirewallMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayFirewallMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayFirewallMode(input string) (*ApplicationGatewayFirewallMode, error) { - vals := map[string]ApplicationGatewayFirewallMode{ - "detection": ApplicationGatewayFirewallModeDetection, - "prevention": ApplicationGatewayFirewallModePrevention, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayFirewallMode(input) - return &out, nil -} - -type ApplicationGatewayLoadDistributionAlgorithm string - -const ( - ApplicationGatewayLoadDistributionAlgorithmIPHash ApplicationGatewayLoadDistributionAlgorithm = "IpHash" - ApplicationGatewayLoadDistributionAlgorithmLeastConnections ApplicationGatewayLoadDistributionAlgorithm = "LeastConnections" - ApplicationGatewayLoadDistributionAlgorithmRoundRobin ApplicationGatewayLoadDistributionAlgorithm = "RoundRobin" -) - -func PossibleValuesForApplicationGatewayLoadDistributionAlgorithm() []string { - return []string{ - string(ApplicationGatewayLoadDistributionAlgorithmIPHash), - string(ApplicationGatewayLoadDistributionAlgorithmLeastConnections), - string(ApplicationGatewayLoadDistributionAlgorithmRoundRobin), - } -} - -func (s *ApplicationGatewayLoadDistributionAlgorithm) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayLoadDistributionAlgorithm(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayLoadDistributionAlgorithm(input string) (*ApplicationGatewayLoadDistributionAlgorithm, error) { - vals := map[string]ApplicationGatewayLoadDistributionAlgorithm{ - "iphash": ApplicationGatewayLoadDistributionAlgorithmIPHash, - "leastconnections": ApplicationGatewayLoadDistributionAlgorithmLeastConnections, - "roundrobin": ApplicationGatewayLoadDistributionAlgorithmRoundRobin, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayLoadDistributionAlgorithm(input) - return &out, nil -} - -type ApplicationGatewayOperationalState string - -const ( - ApplicationGatewayOperationalStateRunning ApplicationGatewayOperationalState = "Running" - ApplicationGatewayOperationalStateStarting ApplicationGatewayOperationalState = "Starting" - ApplicationGatewayOperationalStateStopped ApplicationGatewayOperationalState = "Stopped" - ApplicationGatewayOperationalStateStopping ApplicationGatewayOperationalState = "Stopping" -) - -func PossibleValuesForApplicationGatewayOperationalState() []string { - return []string{ - string(ApplicationGatewayOperationalStateRunning), - string(ApplicationGatewayOperationalStateStarting), - string(ApplicationGatewayOperationalStateStopped), - string(ApplicationGatewayOperationalStateStopping), - } -} - -func (s *ApplicationGatewayOperationalState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayOperationalState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayOperationalState(input string) (*ApplicationGatewayOperationalState, error) { - vals := map[string]ApplicationGatewayOperationalState{ - "running": ApplicationGatewayOperationalStateRunning, - "starting": ApplicationGatewayOperationalStateStarting, - "stopped": ApplicationGatewayOperationalStateStopped, - "stopping": ApplicationGatewayOperationalStateStopping, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayOperationalState(input) - return &out, nil -} - -type ApplicationGatewayProtocol string - -const ( - ApplicationGatewayProtocolHTTP ApplicationGatewayProtocol = "Http" - ApplicationGatewayProtocolHTTPS ApplicationGatewayProtocol = "Https" - ApplicationGatewayProtocolTcp ApplicationGatewayProtocol = "Tcp" - ApplicationGatewayProtocolTls ApplicationGatewayProtocol = "Tls" -) - -func PossibleValuesForApplicationGatewayProtocol() []string { - return []string{ - string(ApplicationGatewayProtocolHTTP), - string(ApplicationGatewayProtocolHTTPS), - string(ApplicationGatewayProtocolTcp), - string(ApplicationGatewayProtocolTls), - } -} - -func (s *ApplicationGatewayProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayProtocol(input string) (*ApplicationGatewayProtocol, error) { - vals := map[string]ApplicationGatewayProtocol{ - "http": ApplicationGatewayProtocolHTTP, - "https": ApplicationGatewayProtocolHTTPS, - "tcp": ApplicationGatewayProtocolTcp, - "tls": ApplicationGatewayProtocolTls, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayProtocol(input) - return &out, nil -} - -type ApplicationGatewayRedirectType string - -const ( - ApplicationGatewayRedirectTypeFound ApplicationGatewayRedirectType = "Found" - ApplicationGatewayRedirectTypePermanent ApplicationGatewayRedirectType = "Permanent" - ApplicationGatewayRedirectTypeSeeOther ApplicationGatewayRedirectType = "SeeOther" - ApplicationGatewayRedirectTypeTemporary ApplicationGatewayRedirectType = "Temporary" -) - -func PossibleValuesForApplicationGatewayRedirectType() []string { - return []string{ - string(ApplicationGatewayRedirectTypeFound), - string(ApplicationGatewayRedirectTypePermanent), - string(ApplicationGatewayRedirectTypeSeeOther), - string(ApplicationGatewayRedirectTypeTemporary), - } -} - -func (s *ApplicationGatewayRedirectType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayRedirectType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayRedirectType(input string) (*ApplicationGatewayRedirectType, error) { - vals := map[string]ApplicationGatewayRedirectType{ - "found": ApplicationGatewayRedirectTypeFound, - "permanent": ApplicationGatewayRedirectTypePermanent, - "seeother": ApplicationGatewayRedirectTypeSeeOther, - "temporary": ApplicationGatewayRedirectTypeTemporary, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayRedirectType(input) - return &out, nil -} - -type ApplicationGatewayRequestRoutingRuleType string - -const ( - ApplicationGatewayRequestRoutingRuleTypeBasic ApplicationGatewayRequestRoutingRuleType = "Basic" - ApplicationGatewayRequestRoutingRuleTypePathBasedRouting ApplicationGatewayRequestRoutingRuleType = "PathBasedRouting" -) - -func PossibleValuesForApplicationGatewayRequestRoutingRuleType() []string { - return []string{ - string(ApplicationGatewayRequestRoutingRuleTypeBasic), - string(ApplicationGatewayRequestRoutingRuleTypePathBasedRouting), - } -} - -func (s *ApplicationGatewayRequestRoutingRuleType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayRequestRoutingRuleType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayRequestRoutingRuleType(input string) (*ApplicationGatewayRequestRoutingRuleType, error) { - vals := map[string]ApplicationGatewayRequestRoutingRuleType{ - "basic": ApplicationGatewayRequestRoutingRuleTypeBasic, - "pathbasedrouting": ApplicationGatewayRequestRoutingRuleTypePathBasedRouting, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayRequestRoutingRuleType(input) - return &out, nil -} - -type ApplicationGatewaySkuName string - -const ( - ApplicationGatewaySkuNameStandardLarge ApplicationGatewaySkuName = "Standard_Large" - ApplicationGatewaySkuNameStandardMedium ApplicationGatewaySkuName = "Standard_Medium" - ApplicationGatewaySkuNameStandardSmall ApplicationGatewaySkuName = "Standard_Small" - ApplicationGatewaySkuNameStandardVTwo ApplicationGatewaySkuName = "Standard_v2" - ApplicationGatewaySkuNameWAFLarge ApplicationGatewaySkuName = "WAF_Large" - ApplicationGatewaySkuNameWAFMedium ApplicationGatewaySkuName = "WAF_Medium" - ApplicationGatewaySkuNameWAFVTwo ApplicationGatewaySkuName = "WAF_v2" -) - -func PossibleValuesForApplicationGatewaySkuName() []string { - return []string{ - string(ApplicationGatewaySkuNameStandardLarge), - string(ApplicationGatewaySkuNameStandardMedium), - string(ApplicationGatewaySkuNameStandardSmall), - string(ApplicationGatewaySkuNameStandardVTwo), - string(ApplicationGatewaySkuNameWAFLarge), - string(ApplicationGatewaySkuNameWAFMedium), - string(ApplicationGatewaySkuNameWAFVTwo), - } -} - -func (s *ApplicationGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewaySkuName(input string) (*ApplicationGatewaySkuName, error) { - vals := map[string]ApplicationGatewaySkuName{ - "standard_large": ApplicationGatewaySkuNameStandardLarge, - "standard_medium": ApplicationGatewaySkuNameStandardMedium, - "standard_small": ApplicationGatewaySkuNameStandardSmall, - "standard_v2": ApplicationGatewaySkuNameStandardVTwo, - "waf_large": ApplicationGatewaySkuNameWAFLarge, - "waf_medium": ApplicationGatewaySkuNameWAFMedium, - "waf_v2": ApplicationGatewaySkuNameWAFVTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewaySkuName(input) - return &out, nil -} - -type ApplicationGatewaySslCipherSuite string - -const ( - ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHThreeDESEDECBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightCBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" - ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixCBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_GCM_SHA256" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_GCM_SHA384" - ApplicationGatewaySslCipherSuiteTLSRSAWITHThreeDESEDECBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_3DES_EDE_CBC_SHA" -) - -func PossibleValuesForApplicationGatewaySslCipherSuite() []string { - return []string{ - string(ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHThreeDESEDECBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHThreeDESEDECBCSHA), - } -} - -func (s *ApplicationGatewaySslCipherSuite) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewaySslCipherSuite(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewaySslCipherSuite(input string) (*ApplicationGatewaySslCipherSuite, error) { - vals := map[string]ApplicationGatewaySslCipherSuite{ - "tls_dhe_dss_with_aes_128_cbc_sha": ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHA, - "tls_dhe_dss_with_aes_128_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_dhe_dss_with_aes_256_cbc_sha": ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHA, - "tls_dhe_dss_with_aes_256_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHATwoFiveSix, - "tls_dhe_dss_with_3des_ede_cbc_sha": ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHThreeDESEDECBCSHA, - "tls_dhe_rsa_with_aes_128_cbc_sha": ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightCBCSHA, - "tls_dhe_rsa_with_aes_128_gcm_sha256": ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_dhe_rsa_with_aes_256_cbc_sha": ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixCBCSHA, - "tls_dhe_rsa_with_aes_256_gcm_sha384": ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - "tls_ecdhe_ecdsa_with_aes_128_cbc_sha": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHA, - "tls_ecdhe_ecdsa_with_aes_128_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_ecdhe_ecdsa_with_aes_128_gcm_sha256": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_ecdhe_ecdsa_with_aes_256_cbc_sha": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHA, - "tls_ecdhe_ecdsa_with_aes_256_cbc_sha384": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHAThreeEightFour, - "tls_ecdhe_ecdsa_with_aes_256_gcm_sha384": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - "tls_ecdhe_rsa_with_aes_128_cbc_sha": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHA, - "tls_ecdhe_rsa_with_aes_128_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_ecdhe_rsa_with_aes_128_gcm_sha256": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_ecdhe_rsa_with_aes_256_cbc_sha": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHA, - "tls_ecdhe_rsa_with_aes_256_cbc_sha384": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour, - "tls_ecdhe_rsa_with_aes_256_gcm_sha384": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - "tls_rsa_with_aes_128_cbc_sha": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHA, - "tls_rsa_with_aes_128_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_rsa_with_aes_128_gcm_sha256": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_rsa_with_aes_256_cbc_sha": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHA, - "tls_rsa_with_aes_256_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix, - "tls_rsa_with_aes_256_gcm_sha384": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - "tls_rsa_with_3des_ede_cbc_sha": ApplicationGatewaySslCipherSuiteTLSRSAWITHThreeDESEDECBCSHA, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewaySslCipherSuite(input) - return &out, nil -} - -type ApplicationGatewaySslPolicyName string - -const ( - ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneFiveZeroFiveZeroOne ApplicationGatewaySslPolicyName = "AppGwSslPolicy20150501" - ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOne ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401" - ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOneS ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401S" - ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOne ApplicationGatewaySslPolicyName = "AppGwSslPolicy20220101" - ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOneS ApplicationGatewaySslPolicyName = "AppGwSslPolicy20220101S" -) - -func PossibleValuesForApplicationGatewaySslPolicyName() []string { - return []string{ - string(ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneFiveZeroFiveZeroOne), - string(ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOne), - string(ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOneS), - string(ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOne), - string(ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOneS), - } -} - -func (s *ApplicationGatewaySslPolicyName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewaySslPolicyName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewaySslPolicyName(input string) (*ApplicationGatewaySslPolicyName, error) { - vals := map[string]ApplicationGatewaySslPolicyName{ - "appgwsslpolicy20150501": ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneFiveZeroFiveZeroOne, - "appgwsslpolicy20170401": ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOne, - "appgwsslpolicy20170401s": ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOneS, - "appgwsslpolicy20220101": ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOne, - "appgwsslpolicy20220101s": ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOneS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewaySslPolicyName(input) - return &out, nil -} - -type ApplicationGatewaySslPolicyType string - -const ( - ApplicationGatewaySslPolicyTypeCustom ApplicationGatewaySslPolicyType = "Custom" - ApplicationGatewaySslPolicyTypeCustomVTwo ApplicationGatewaySslPolicyType = "CustomV2" - ApplicationGatewaySslPolicyTypePredefined ApplicationGatewaySslPolicyType = "Predefined" -) - -func PossibleValuesForApplicationGatewaySslPolicyType() []string { - return []string{ - string(ApplicationGatewaySslPolicyTypeCustom), - string(ApplicationGatewaySslPolicyTypeCustomVTwo), - string(ApplicationGatewaySslPolicyTypePredefined), - } -} - -func (s *ApplicationGatewaySslPolicyType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewaySslPolicyType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewaySslPolicyType(input string) (*ApplicationGatewaySslPolicyType, error) { - vals := map[string]ApplicationGatewaySslPolicyType{ - "custom": ApplicationGatewaySslPolicyTypeCustom, - "customv2": ApplicationGatewaySslPolicyTypeCustomVTwo, - "predefined": ApplicationGatewaySslPolicyTypePredefined, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewaySslPolicyType(input) - return &out, nil -} - -type ApplicationGatewaySslProtocol string - -const ( - ApplicationGatewaySslProtocolTLSvOneOne ApplicationGatewaySslProtocol = "TLSv1_1" - ApplicationGatewaySslProtocolTLSvOneThree ApplicationGatewaySslProtocol = "TLSv1_3" - ApplicationGatewaySslProtocolTLSvOneTwo ApplicationGatewaySslProtocol = "TLSv1_2" - ApplicationGatewaySslProtocolTLSvOneZero ApplicationGatewaySslProtocol = "TLSv1_0" -) - -func PossibleValuesForApplicationGatewaySslProtocol() []string { - return []string{ - string(ApplicationGatewaySslProtocolTLSvOneOne), - string(ApplicationGatewaySslProtocolTLSvOneThree), - string(ApplicationGatewaySslProtocolTLSvOneTwo), - string(ApplicationGatewaySslProtocolTLSvOneZero), - } -} - -func (s *ApplicationGatewaySslProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewaySslProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewaySslProtocol(input string) (*ApplicationGatewaySslProtocol, error) { - vals := map[string]ApplicationGatewaySslProtocol{ - "tlsv1_1": ApplicationGatewaySslProtocolTLSvOneOne, - "tlsv1_3": ApplicationGatewaySslProtocolTLSvOneThree, - "tlsv1_2": ApplicationGatewaySslProtocolTLSvOneTwo, - "tlsv1_0": ApplicationGatewaySslProtocolTLSvOneZero, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewaySslProtocol(input) - return &out, nil -} - -type ApplicationGatewayTier string - -const ( - ApplicationGatewayTierStandard ApplicationGatewayTier = "Standard" - ApplicationGatewayTierStandardVTwo ApplicationGatewayTier = "Standard_v2" - ApplicationGatewayTierWAF ApplicationGatewayTier = "WAF" - ApplicationGatewayTierWAFVTwo ApplicationGatewayTier = "WAF_v2" -) - -func PossibleValuesForApplicationGatewayTier() []string { - return []string{ - string(ApplicationGatewayTierStandard), - string(ApplicationGatewayTierStandardVTwo), - string(ApplicationGatewayTierWAF), - string(ApplicationGatewayTierWAFVTwo), - } -} - -func (s *ApplicationGatewayTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayTier(input string) (*ApplicationGatewayTier, error) { - vals := map[string]ApplicationGatewayTier{ - "standard": ApplicationGatewayTierStandard, - "standard_v2": ApplicationGatewayTierStandardVTwo, - "waf": ApplicationGatewayTierWAF, - "waf_v2": ApplicationGatewayTierWAFVTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayTier(input) - return &out, nil -} - -type ApplicationGatewayTierTypes string - -const ( - ApplicationGatewayTierTypesStandard ApplicationGatewayTierTypes = "Standard" - ApplicationGatewayTierTypesStandardVTwo ApplicationGatewayTierTypes = "Standard_v2" - ApplicationGatewayTierTypesWAF ApplicationGatewayTierTypes = "WAF" - ApplicationGatewayTierTypesWAFVTwo ApplicationGatewayTierTypes = "WAF_v2" -) - -func PossibleValuesForApplicationGatewayTierTypes() []string { - return []string{ - string(ApplicationGatewayTierTypesStandard), - string(ApplicationGatewayTierTypesStandardVTwo), - string(ApplicationGatewayTierTypesWAF), - string(ApplicationGatewayTierTypesWAFVTwo), - } -} - -func (s *ApplicationGatewayTierTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayTierTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayTierTypes(input string) (*ApplicationGatewayTierTypes, error) { - vals := map[string]ApplicationGatewayTierTypes{ - "standard": ApplicationGatewayTierTypesStandard, - "standard_v2": ApplicationGatewayTierTypesStandardVTwo, - "waf": ApplicationGatewayTierTypesWAF, - "waf_v2": ApplicationGatewayTierTypesWAFVTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayTierTypes(input) - return &out, nil -} - -type ApplicationGatewayWafRuleActionTypes string - -const ( - ApplicationGatewayWafRuleActionTypesAllow ApplicationGatewayWafRuleActionTypes = "Allow" - ApplicationGatewayWafRuleActionTypesAnomalyScoring ApplicationGatewayWafRuleActionTypes = "AnomalyScoring" - ApplicationGatewayWafRuleActionTypesBlock ApplicationGatewayWafRuleActionTypes = "Block" - ApplicationGatewayWafRuleActionTypesLog ApplicationGatewayWafRuleActionTypes = "Log" - ApplicationGatewayWafRuleActionTypesNone ApplicationGatewayWafRuleActionTypes = "None" -) - -func PossibleValuesForApplicationGatewayWafRuleActionTypes() []string { - return []string{ - string(ApplicationGatewayWafRuleActionTypesAllow), - string(ApplicationGatewayWafRuleActionTypesAnomalyScoring), - string(ApplicationGatewayWafRuleActionTypesBlock), - string(ApplicationGatewayWafRuleActionTypesLog), - string(ApplicationGatewayWafRuleActionTypesNone), - } -} - -func (s *ApplicationGatewayWafRuleActionTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayWafRuleActionTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayWafRuleActionTypes(input string) (*ApplicationGatewayWafRuleActionTypes, error) { - vals := map[string]ApplicationGatewayWafRuleActionTypes{ - "allow": ApplicationGatewayWafRuleActionTypesAllow, - "anomalyscoring": ApplicationGatewayWafRuleActionTypesAnomalyScoring, - "block": ApplicationGatewayWafRuleActionTypesBlock, - "log": ApplicationGatewayWafRuleActionTypesLog, - "none": ApplicationGatewayWafRuleActionTypesNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayWafRuleActionTypes(input) - return &out, nil -} - -type ApplicationGatewayWafRuleStateTypes string - -const ( - ApplicationGatewayWafRuleStateTypesDisabled ApplicationGatewayWafRuleStateTypes = "Disabled" - ApplicationGatewayWafRuleStateTypesEnabled ApplicationGatewayWafRuleStateTypes = "Enabled" -) - -func PossibleValuesForApplicationGatewayWafRuleStateTypes() []string { - return []string{ - string(ApplicationGatewayWafRuleStateTypesDisabled), - string(ApplicationGatewayWafRuleStateTypesEnabled), - } -} - -func (s *ApplicationGatewayWafRuleStateTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayWafRuleStateTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayWafRuleStateTypes(input string) (*ApplicationGatewayWafRuleStateTypes, error) { - vals := map[string]ApplicationGatewayWafRuleStateTypes{ - "disabled": ApplicationGatewayWafRuleStateTypesDisabled, - "enabled": ApplicationGatewayWafRuleStateTypesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayWafRuleStateTypes(input) - return &out, nil -} - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateDrain LoadBalancerBackendAddressAdminState = "Drain" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateDrain), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "drain": LoadBalancerBackendAddressAdminStateDrain, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/id_applicationgateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/id_applicationgateway.go deleted file mode 100644 index 0611edc851358..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/id_applicationgateway.go +++ /dev/null @@ -1,130 +0,0 @@ -package applicationgateways - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&ApplicationGatewayId{}) -} - -var _ resourceids.ResourceId = &ApplicationGatewayId{} - -// ApplicationGatewayId is a struct representing the Resource ID for a Application Gateway -type ApplicationGatewayId struct { - SubscriptionId string - ResourceGroupName string - ApplicationGatewayName string -} - -// NewApplicationGatewayID returns a new ApplicationGatewayId struct -func NewApplicationGatewayID(subscriptionId string, resourceGroupName string, applicationGatewayName string) ApplicationGatewayId { - return ApplicationGatewayId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ApplicationGatewayName: applicationGatewayName, - } -} - -// ParseApplicationGatewayID parses 'input' into a ApplicationGatewayId -func ParseApplicationGatewayID(input string) (*ApplicationGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(&ApplicationGatewayId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseApplicationGatewayIDInsensitively parses 'input' case-insensitively into a ApplicationGatewayId -// note: this method should only be used for API response data and not user input -func ParseApplicationGatewayIDInsensitively(input string) (*ApplicationGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(&ApplicationGatewayId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *ApplicationGatewayId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.ApplicationGatewayName, ok = input.Parsed["applicationGatewayName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", input) - } - - return nil -} - -// ValidateApplicationGatewayID checks that 'input' can be parsed as a Application Gateway ID -func ValidateApplicationGatewayID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseApplicationGatewayID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Application Gateway ID -func (id ApplicationGatewayId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/applicationGateways/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ApplicationGatewayName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Application Gateway ID -func (id ApplicationGatewayId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticApplicationGateways", "applicationGateways", "applicationGateways"), - resourceids.UserSpecifiedSegment("applicationGatewayName", "applicationGatewayValue"), - } -} - -// String returns a human-readable description of this Application Gateway ID -func (id ApplicationGatewayId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Application Gateway Name: %q", id.ApplicationGatewayName), - } - return fmt.Sprintf("Application Gateway (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/id_predefinedpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/id_predefinedpolicy.go deleted file mode 100644 index f22e541bda313..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/id_predefinedpolicy.go +++ /dev/null @@ -1,123 +0,0 @@ -package applicationgateways - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&PredefinedPolicyId{}) -} - -var _ resourceids.ResourceId = &PredefinedPolicyId{} - -// PredefinedPolicyId is a struct representing the Resource ID for a Predefined Policy -type PredefinedPolicyId struct { - SubscriptionId string - PredefinedPolicyName string -} - -// NewPredefinedPolicyID returns a new PredefinedPolicyId struct -func NewPredefinedPolicyID(subscriptionId string, predefinedPolicyName string) PredefinedPolicyId { - return PredefinedPolicyId{ - SubscriptionId: subscriptionId, - PredefinedPolicyName: predefinedPolicyName, - } -} - -// ParsePredefinedPolicyID parses 'input' into a PredefinedPolicyId -func ParsePredefinedPolicyID(input string) (*PredefinedPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(&PredefinedPolicyId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := PredefinedPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParsePredefinedPolicyIDInsensitively parses 'input' case-insensitively into a PredefinedPolicyId -// note: this method should only be used for API response data and not user input -func ParsePredefinedPolicyIDInsensitively(input string) (*PredefinedPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(&PredefinedPolicyId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := PredefinedPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *PredefinedPolicyId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.PredefinedPolicyName, ok = input.Parsed["predefinedPolicyName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "predefinedPolicyName", input) - } - - return nil -} - -// ValidatePredefinedPolicyID checks that 'input' can be parsed as a Predefined Policy ID -func ValidatePredefinedPolicyID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePredefinedPolicyID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Predefined Policy ID -func (id PredefinedPolicyId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.PredefinedPolicyName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Predefined Policy ID -func (id PredefinedPolicyId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticApplicationGatewayAvailableSslOptions", "applicationGatewayAvailableSslOptions", "applicationGatewayAvailableSslOptions"), - resourceids.StaticSegment("staticDefault", "default", "default"), - resourceids.StaticSegment("staticPredefinedPolicies", "predefinedPolicies", "predefinedPolicies"), - resourceids.UserSpecifiedSegment("predefinedPolicyName", "predefinedPolicyValue"), - } -} - -// String returns a human-readable description of this Predefined Policy ID -func (id PredefinedPolicyId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Predefined Policy Name: %q", id.PredefinedPolicyName), - } - return fmt.Sprintf("Predefined Policy (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_backendhealth.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_backendhealth.go deleted file mode 100644 index 21c25eb922c62..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_backendhealth.go +++ /dev/null @@ -1,99 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendHealthOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationGatewayBackendHealth -} - -type BackendHealthOperationOptions struct { - Expand *string -} - -func DefaultBackendHealthOperationOptions() BackendHealthOperationOptions { - return BackendHealthOperationOptions{} -} - -func (o BackendHealthOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o BackendHealthOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o BackendHealthOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// BackendHealth ... -func (c ApplicationGatewaysClient) BackendHealth(ctx context.Context, id ApplicationGatewayId, options BackendHealthOperationOptions) (result BackendHealthOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - OptionsObject: options, - Path: fmt.Sprintf("%s/backendhealth", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// BackendHealthThenPoll performs BackendHealth then polls until it's completed -func (c ApplicationGatewaysClient) BackendHealthThenPoll(ctx context.Context, id ApplicationGatewayId, options BackendHealthOperationOptions) error { - result, err := c.BackendHealth(ctx, id, options) - if err != nil { - return fmt.Errorf("performing BackendHealth: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after BackendHealth: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_backendhealthondemand.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_backendhealthondemand.go deleted file mode 100644 index 2db3547857af7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_backendhealthondemand.go +++ /dev/null @@ -1,103 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendHealthOnDemandOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationGatewayBackendHealthOnDemand -} - -type BackendHealthOnDemandOperationOptions struct { - Expand *string -} - -func DefaultBackendHealthOnDemandOperationOptions() BackendHealthOnDemandOperationOptions { - return BackendHealthOnDemandOperationOptions{} -} - -func (o BackendHealthOnDemandOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o BackendHealthOnDemandOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o BackendHealthOnDemandOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// BackendHealthOnDemand ... -func (c ApplicationGatewaysClient) BackendHealthOnDemand(ctx context.Context, id ApplicationGatewayId, input ApplicationGatewayOnDemandProbe, options BackendHealthOnDemandOperationOptions) (result BackendHealthOnDemandOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - OptionsObject: options, - Path: fmt.Sprintf("%s/getBackendHealthOnDemand", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// BackendHealthOnDemandThenPoll performs BackendHealthOnDemand then polls until it's completed -func (c ApplicationGatewaysClient) BackendHealthOnDemandThenPoll(ctx context.Context, id ApplicationGatewayId, input ApplicationGatewayOnDemandProbe, options BackendHealthOnDemandOperationOptions) error { - result, err := c.BackendHealthOnDemand(ctx, id, input, options) - if err != nil { - return fmt.Errorf("performing BackendHealthOnDemand: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after BackendHealthOnDemand: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_createorupdate.go deleted file mode 100644 index 66330483b32af..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_createorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationGateway -} - -// CreateOrUpdate ... -func (c ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, id ApplicationGatewayId, input ApplicationGateway) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ApplicationGatewaysClient) CreateOrUpdateThenPoll(ctx context.Context, id ApplicationGatewayId, input ApplicationGateway) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_delete.go deleted file mode 100644 index 6769fa69c245a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ApplicationGatewaysClient) Delete(ctx context.Context, id ApplicationGatewayId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ApplicationGatewaysClient) DeleteThenPoll(ctx context.Context, id ApplicationGatewayId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_get.go deleted file mode 100644 index 03000d91a4724..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_get.go +++ /dev/null @@ -1,54 +0,0 @@ -package applicationgateways - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationGateway -} - -// Get ... -func (c ApplicationGatewaysClient) Get(ctx context.Context, id ApplicationGatewayId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ApplicationGateway - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_getsslpredefinedpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_getsslpredefinedpolicy.go deleted file mode 100644 index 97530703e81cb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_getsslpredefinedpolicy.go +++ /dev/null @@ -1,54 +0,0 @@ -package applicationgateways - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetSslPredefinedPolicyOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationGatewaySslPredefinedPolicy -} - -// GetSslPredefinedPolicy ... -func (c ApplicationGatewaysClient) GetSslPredefinedPolicy(ctx context.Context, id PredefinedPolicyId) (result GetSslPredefinedPolicyOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ApplicationGatewaySslPredefinedPolicy - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_list.go deleted file mode 100644 index 5993122f77d64..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_list.go +++ /dev/null @@ -1,106 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ApplicationGateway -} - -type ListCompleteResult struct { - LatestHttpResponse *http.Response - Items []ApplicationGateway -} - -type ListCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// List ... -func (c ApplicationGatewaysClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListCustomPager{}, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ApplicationGateway `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ApplicationGatewaysClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ApplicationGatewayOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ApplicationGatewaysClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ApplicationGatewayOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ApplicationGateway, 0) - - resp, err := c.List(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_listall.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_listall.go deleted file mode 100644 index 2339a539153a3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_listall.go +++ /dev/null @@ -1,106 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ApplicationGateway -} - -type ListAllCompleteResult struct { - LatestHttpResponse *http.Response - Items []ApplicationGateway -} - -type ListAllCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListAllCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListAll ... -func (c ApplicationGatewaysClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListAllCustomPager{}, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ApplicationGateway `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c ApplicationGatewaysClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, ApplicationGatewayOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ApplicationGatewaysClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ApplicationGatewayOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]ApplicationGateway, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_listavailablerequestheaders.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_listavailablerequestheaders.go deleted file mode 100644 index 634799c7f7065..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_listavailablerequestheaders.go +++ /dev/null @@ -1,56 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAvailableRequestHeadersOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]string -} - -// ListAvailableRequestHeaders ... -func (c ApplicationGatewaysClient) ListAvailableRequestHeaders(ctx context.Context, id commonids.SubscriptionId) (result ListAvailableRequestHeadersOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGatewayAvailableRequestHeaders", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model []string - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_listavailableresponseheaders.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_listavailableresponseheaders.go deleted file mode 100644 index fe99c70d2e794..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_listavailableresponseheaders.go +++ /dev/null @@ -1,56 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAvailableResponseHeadersOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]string -} - -// ListAvailableResponseHeaders ... -func (c ApplicationGatewaysClient) ListAvailableResponseHeaders(ctx context.Context, id commonids.SubscriptionId) (result ListAvailableResponseHeadersOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGatewayAvailableResponseHeaders", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model []string - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_listavailableservervariables.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_listavailableservervariables.go deleted file mode 100644 index b48bb86d765be..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_listavailableservervariables.go +++ /dev/null @@ -1,56 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAvailableServerVariablesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]string -} - -// ListAvailableServerVariables ... -func (c ApplicationGatewaysClient) ListAvailableServerVariables(ctx context.Context, id commonids.SubscriptionId) (result ListAvailableServerVariablesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGatewayAvailableServerVariables", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model []string - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_listavailablessloptions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_listavailablessloptions.go deleted file mode 100644 index 386a33e5e844a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_listavailablessloptions.go +++ /dev/null @@ -1,56 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAvailableSslOptionsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationGatewayAvailableSslOptions -} - -// ListAvailableSslOptions ... -func (c ApplicationGatewaysClient) ListAvailableSslOptions(ctx context.Context, id commonids.SubscriptionId) (result ListAvailableSslOptionsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ApplicationGatewayAvailableSslOptions - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_listavailablesslpredefinedpolicies.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_listavailablesslpredefinedpolicies.go deleted file mode 100644 index 60e04b841d407..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_listavailablesslpredefinedpolicies.go +++ /dev/null @@ -1,106 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAvailableSslPredefinedPoliciesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ApplicationGatewaySslPredefinedPolicy -} - -type ListAvailableSslPredefinedPoliciesCompleteResult struct { - LatestHttpResponse *http.Response - Items []ApplicationGatewaySslPredefinedPolicy -} - -type ListAvailableSslPredefinedPoliciesCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListAvailableSslPredefinedPoliciesCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListAvailableSslPredefinedPolicies ... -func (c ApplicationGatewaysClient) ListAvailableSslPredefinedPolicies(ctx context.Context, id commonids.SubscriptionId) (result ListAvailableSslPredefinedPoliciesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListAvailableSslPredefinedPoliciesCustomPager{}, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ApplicationGatewaySslPredefinedPolicy `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAvailableSslPredefinedPoliciesComplete retrieves all the results into a single object -func (c ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesComplete(ctx context.Context, id commonids.SubscriptionId) (ListAvailableSslPredefinedPoliciesCompleteResult, error) { - return c.ListAvailableSslPredefinedPoliciesCompleteMatchingPredicate(ctx, id, ApplicationGatewaySslPredefinedPolicyOperationPredicate{}) -} - -// ListAvailableSslPredefinedPoliciesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ApplicationGatewaySslPredefinedPolicyOperationPredicate) (result ListAvailableSslPredefinedPoliciesCompleteResult, err error) { - items := make([]ApplicationGatewaySslPredefinedPolicy, 0) - - resp, err := c.ListAvailableSslPredefinedPolicies(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAvailableSslPredefinedPoliciesCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_listavailablewafrulesets.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_listavailablewafrulesets.go deleted file mode 100644 index 3df1a2db564a6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_listavailablewafrulesets.go +++ /dev/null @@ -1,56 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAvailableWafRuleSetsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationGatewayAvailableWafRuleSetsResult -} - -// ListAvailableWafRuleSets ... -func (c ApplicationGatewaysClient) ListAvailableWafRuleSets(ctx context.Context, id commonids.SubscriptionId) (result ListAvailableWafRuleSetsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGatewayAvailableWafRuleSets", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ApplicationGatewayAvailableWafRuleSetsResult - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_start.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_start.go deleted file mode 100644 index 828fc60cb3c24..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_start.go +++ /dev/null @@ -1,70 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StartOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Start ... -func (c ApplicationGatewaysClient) Start(ctx context.Context, id ApplicationGatewayId) (result StartOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/start", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StartThenPoll performs Start then polls until it's completed -func (c ApplicationGatewaysClient) StartThenPoll(ctx context.Context, id ApplicationGatewayId) error { - result, err := c.Start(ctx, id) - if err != nil { - return fmt.Errorf("performing Start: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Start: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_stop.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_stop.go deleted file mode 100644 index 75b68cdf697ae..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_stop.go +++ /dev/null @@ -1,70 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StopOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Stop ... -func (c ApplicationGatewaysClient) Stop(ctx context.Context, id ApplicationGatewayId) (result StopOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/stop", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StopThenPoll performs Stop then polls until it's completed -func (c ApplicationGatewaysClient) StopThenPoll(ctx context.Context, id ApplicationGatewayId) error { - result, err := c.Stop(ctx, id) - if err != nil { - return fmt.Errorf("performing Stop: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Stop: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_updatetags.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_updatetags.go deleted file mode 100644 index d22b36155599c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/method_updatetags.go +++ /dev/null @@ -1,58 +0,0 @@ -package applicationgateways - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationGateway -} - -// UpdateTags ... -func (c ApplicationGatewaysClient) UpdateTags(ctx context.Context, id ApplicationGatewayId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ApplicationGateway - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgateway.go deleted file mode 100644 index 26c26a8892704..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgateway.go +++ /dev/null @@ -1,21 +0,0 @@ -package applicationgateways - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Identity *identity.SystemAndUserAssignedMap `json:"identity,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayauthenticationcertificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayauthenticationcertificate.go deleted file mode 100644 index 21a1fec007fc8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayauthenticationcertificate.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayAuthenticationCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayauthenticationcertificatepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayauthenticationcertificatepropertiesformat.go deleted file mode 100644 index 37f5189d68aa5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayauthenticationcertificatepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct { - Data *string `json:"data,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayautoscaleconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayautoscaleconfiguration.go deleted file mode 100644 index e8f13521e070b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayautoscaleconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayAutoscaleConfiguration struct { - MaxCapacity *int64 `json:"maxCapacity,omitempty"` - MinCapacity int64 `json:"minCapacity"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayavailablessloptions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayavailablessloptions.go deleted file mode 100644 index 18677bfa9ada7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayavailablessloptions.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayAvailableSslOptions struct { - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayavailablessloptionspropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayavailablessloptionspropertiesformat.go deleted file mode 100644 index 552b956629b8b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayavailablessloptionspropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct { - AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"` - AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"` - DefaultPolicy *ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"` - PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayavailablewafrulesetsresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayavailablewafrulesetsresult.go deleted file mode 100644 index b960a888077ed..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayavailablewafrulesetsresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayAvailableWafRuleSetsResult struct { - Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendaddress.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 9245b4581ff5e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendaddresspool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index e62cc5f5a6aac..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 92e4b6fcae043..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendhealth.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendhealth.go deleted file mode 100644 index b84392209575c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendhealth.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHealth struct { - BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendhealthhttpsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendhealthhttpsettings.go deleted file mode 100644 index 00f4c87c142f0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendhealthhttpsettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHealthHTTPSettings struct { - BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"` - Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendhealthondemand.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendhealthondemand.go deleted file mode 100644 index 3bf6d17e80cd7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendhealthondemand.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHealthOnDemand struct { - BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"` - BackendHealthHTTPSettings *ApplicationGatewayBackendHealthHTTPSettings `json:"backendHealthHttpSettings,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendhealthpool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendhealthpool.go deleted file mode 100644 index b32fffdf6140f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendhealthpool.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHealthPool struct { - BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"` - BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendhealthserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendhealthserver.go deleted file mode 100644 index c11aed154b2f6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendhealthserver.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHealthServer struct { - Address *string `json:"address,omitempty"` - Health *ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"` - HealthProbeLog *string `json:"healthProbeLog,omitempty"` - IPConfiguration *NetworkInterfaceIPConfiguration `json:"ipConfiguration,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendhttpsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendhttpsettings.go deleted file mode 100644 index 7cfbecd350641..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendhttpsettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHTTPSettings struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendhttpsettingspropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendhttpsettingspropertiesformat.go deleted file mode 100644 index 68ccfd35301c0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendhttpsettingspropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct { - AffinityCookieName *string `json:"affinityCookieName,omitempty"` - AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"` - ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"` - CookieBasedAffinity *ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"` - HostName *string `json:"hostName,omitempty"` - Path *string `json:"path,omitempty"` - PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"` - Port *int64 `json:"port,omitempty"` - Probe *SubResource `json:"probe,omitempty"` - ProbeEnabled *bool `json:"probeEnabled,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestTimeout *int64 `json:"requestTimeout,omitempty"` - TrustedRootCertificates *[]SubResource `json:"trustedRootCertificates,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendsettings.go deleted file mode 100644 index 435626e72963e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendsettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendSettings struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendSettingsPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendsettingspropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendsettingspropertiesformat.go deleted file mode 100644 index 5d5c1275f2e63..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaybackendsettingspropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendSettingsPropertiesFormat struct { - HostName *string `json:"hostName,omitempty"` - PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"` - Port *int64 `json:"port,omitempty"` - Probe *SubResource `json:"probe,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Timeout *int64 `json:"timeout,omitempty"` - TrustedRootCertificates *[]SubResource `json:"trustedRootCertificates,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayclientauthconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayclientauthconfiguration.go deleted file mode 100644 index 7be179f89f0ae..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayclientauthconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayClientAuthConfiguration struct { - VerifyClientCertIssuerDN *bool `json:"verifyClientCertIssuerDN,omitempty"` - VerifyClientRevocation *ApplicationGatewayClientRevocationOptions `json:"verifyClientRevocation,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayconnectiondraining.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayconnectiondraining.go deleted file mode 100644 index f40777a88f841..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayconnectiondraining.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayConnectionDraining struct { - DrainTimeoutInSec int64 `json:"drainTimeoutInSec"` - Enabled bool `json:"enabled"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaycustomerror.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaycustomerror.go deleted file mode 100644 index 532de5a8e93d7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaycustomerror.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayCustomError struct { - CustomErrorPageUrl *string `json:"customErrorPageUrl,omitempty"` - StatusCode *ApplicationGatewayCustomErrorStatusCode `json:"statusCode,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfirewalldisabledrulegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfirewalldisabledrulegroup.go deleted file mode 100644 index 30534c50f525e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfirewalldisabledrulegroup.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallDisabledRuleGroup struct { - RuleGroupName string `json:"ruleGroupName"` - Rules *[]int64 `json:"rules,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfirewallexclusion.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfirewallexclusion.go deleted file mode 100644 index 77bfe2cf65c9b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfirewallexclusion.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallExclusion struct { - MatchVariable string `json:"matchVariable"` - Selector string `json:"selector"` - SelectorMatchOperator string `json:"selectorMatchOperator"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfirewallrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfirewallrule.go deleted file mode 100644 index c9a89bac6335e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfirewallrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallRule struct { - Action *ApplicationGatewayWafRuleActionTypes `json:"action,omitempty"` - Description *string `json:"description,omitempty"` - RuleId int64 `json:"ruleId"` - RuleIdString *string `json:"ruleIdString,omitempty"` - State *ApplicationGatewayWafRuleStateTypes `json:"state,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfirewallrulegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfirewallrulegroup.go deleted file mode 100644 index 06c7cbffb3893..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfirewallrulegroup.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallRuleGroup struct { - Description *string `json:"description,omitempty"` - RuleGroupName string `json:"ruleGroupName"` - Rules []ApplicationGatewayFirewallRule `json:"rules"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfirewallruleset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfirewallruleset.go deleted file mode 100644 index 3eb7435162413..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfirewallruleset.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallRuleSet struct { - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfirewallrulesetpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfirewallrulesetpropertiesformat.go deleted file mode 100644 index f0bd967c325e0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfirewallrulesetpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallRuleSetPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RuleGroups []ApplicationGatewayFirewallRuleGroup `json:"ruleGroups"` - RuleSetType string `json:"ruleSetType"` - RuleSetVersion string `json:"ruleSetVersion"` - Tiers *[]ApplicationGatewayTierTypes `json:"tiers,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfrontendipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfrontendipconfiguration.go deleted file mode 100644 index 16f3a44fe6874..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfrontendipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfrontendipconfigurationpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfrontendipconfigurationpropertiesformat.go deleted file mode 100644 index 45f83bbaa1132..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfrontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConfiguration *SubResource `json:"privateLinkConfiguration,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfrontendport.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfrontendport.go deleted file mode 100644 index 9b3c8763e014f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfrontendport.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFrontendPort struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfrontendportpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfrontendportpropertiesformat.go deleted file mode 100644 index a9399610b8b2f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayfrontendportpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFrontendPortPropertiesFormat struct { - Port *int64 `json:"port,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayglobalconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayglobalconfiguration.go deleted file mode 100644 index 8f031b6ad381a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayglobalconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayGlobalConfiguration struct { - EnableRequestBuffering *bool `json:"enableRequestBuffering,omitempty"` - EnableResponseBuffering *bool `json:"enableResponseBuffering,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayheaderconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayheaderconfiguration.go deleted file mode 100644 index cf7e02d4617bc..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayheaderconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayHeaderConfiguration struct { - HeaderName *string `json:"headerName,omitempty"` - HeaderValue *string `json:"headerValue,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayhttplistener.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayhttplistener.go deleted file mode 100644 index 457c3af7d7bb6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayhttplistener.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayHTTPListener struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayhttplistenerpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayhttplistenerpropertiesformat.go deleted file mode 100644 index 7d3436f618622..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayhttplistenerpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayHTTPListenerPropertiesFormat struct { - CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"` - FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *SubResource `json:"frontendPort,omitempty"` - HostName *string `json:"hostName,omitempty"` - HostNames *[]string `json:"hostNames,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"` - SslCertificate *SubResource `json:"sslCertificate,omitempty"` - SslProfile *SubResource `json:"sslProfile,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 7b513c5635948..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayipconfigurationpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 67b2b22486e00..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaylistener.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaylistener.go deleted file mode 100644 index eb251dad173a5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaylistener.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayListener struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayListenerPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaylistenerpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaylistenerpropertiesformat.go deleted file mode 100644 index fc21e21099b1c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaylistenerpropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayListenerPropertiesFormat struct { - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *SubResource `json:"frontendPort,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SslCertificate *SubResource `json:"sslCertificate,omitempty"` - SslProfile *SubResource `json:"sslProfile,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayloaddistributionpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayloaddistributionpolicy.go deleted file mode 100644 index 9c07ad54259c3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayloaddistributionpolicy.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayLoadDistributionPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayLoadDistributionPolicyPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayloaddistributionpolicypropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayloaddistributionpolicypropertiesformat.go deleted file mode 100644 index 9ae762454d0af..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayloaddistributionpolicypropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayLoadDistributionPolicyPropertiesFormat struct { - LoadDistributionAlgorithm *ApplicationGatewayLoadDistributionAlgorithm `json:"loadDistributionAlgorithm,omitempty"` - LoadDistributionTargets *[]ApplicationGatewayLoadDistributionTarget `json:"loadDistributionTargets,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayloaddistributiontarget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayloaddistributiontarget.go deleted file mode 100644 index 5db29bd27a5c6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayloaddistributiontarget.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayLoadDistributionTarget struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayLoadDistributionTargetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayloaddistributiontargetpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayloaddistributiontargetpropertiesformat.go deleted file mode 100644 index cd785c4126e4d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayloaddistributiontargetpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayLoadDistributionTargetPropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - WeightPerServer *int64 `json:"weightPerServer,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayondemandprobe.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayondemandprobe.go deleted file mode 100644 index 6ee19e174e2a5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayondemandprobe.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayOnDemandProbe struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` - Host *string `json:"host,omitempty"` - Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"` - Path *string `json:"path,omitempty"` - PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - Timeout *int64 `json:"timeout,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaypathrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaypathrule.go deleted file mode 100644 index ae684eb5860a1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaypathrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPathRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaypathrulepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaypathrulepropertiesformat.go deleted file mode 100644 index c0586444c8593..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaypathrulepropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPathRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` - FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` - LoadDistributionPolicy *SubResource `json:"loadDistributionPolicy,omitempty"` - Paths *[]string `json:"paths,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` - RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprivateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprivateendpointconnection.go deleted file mode 100644 index 8099219aff4ca..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprivateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprivateendpointconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprivateendpointconnectionproperties.go deleted file mode 100644 index 400c841d704ac..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprivateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprivatelinkconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprivatelinkconfiguration.go deleted file mode 100644 index 1997234fb4daa..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprivatelinkconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPrivateLinkConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprivatelinkconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprivatelinkconfigurationproperties.go deleted file mode 100644 index b86b3f170145b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprivatelinkconfigurationproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkConfigurationProperties struct { - IPConfigurations *[]ApplicationGatewayPrivateLinkIPConfiguration `json:"ipConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprivatelinkipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprivatelinkipconfiguration.go deleted file mode 100644 index ad8bfa28be729..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprivatelinkipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPrivateLinkIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprivatelinkipconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprivatelinkipconfigurationproperties.go deleted file mode 100644 index b2d2b2af23adb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprivatelinkipconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprobe.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprobe.go deleted file mode 100644 index 9b27b4f713333..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprobe.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayProbe struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprobehealthresponsematch.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprobehealthresponsematch.go deleted file mode 100644 index 68ccf1eaaaff0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprobehealthresponsematch.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayProbeHealthResponseMatch struct { - Body *string `json:"body,omitempty"` - StatusCodes *[]string `json:"statusCodes,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprobepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprobepropertiesformat.go deleted file mode 100644 index dab5ee7ae23fc..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayprobepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayProbePropertiesFormat struct { - Host *string `json:"host,omitempty"` - Interval *int64 `json:"interval,omitempty"` - Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"` - MinServers *int64 `json:"minServers,omitempty"` - Path *string `json:"path,omitempty"` - PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"` - PickHostNameFromBackendSettings *bool `json:"pickHostNameFromBackendSettings,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Timeout *int64 `json:"timeout,omitempty"` - UnhealthyThreshold *int64 `json:"unhealthyThreshold,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaypropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaypropertiesformat.go deleted file mode 100644 index 8f57d0c043f6c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaypropertiesformat.go +++ /dev/null @@ -1,42 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPropertiesFormat struct { - AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"` - AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"` - BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"` - BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"` - BackendSettingsCollection *[]ApplicationGatewayBackendSettings `json:"backendSettingsCollection,omitempty"` - CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"` - EnableFips *bool `json:"enableFips,omitempty"` - EnableHTTP2 *bool `json:"enableHttp2,omitempty"` - FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` - ForceFirewallPolicyAssociation *bool `json:"forceFirewallPolicyAssociation,omitempty"` - FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` - FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"` - GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"` - GlobalConfiguration *ApplicationGatewayGlobalConfiguration `json:"globalConfiguration,omitempty"` - HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"` - Listeners *[]ApplicationGatewayListener `json:"listeners,omitempty"` - LoadDistributionPolicies *[]ApplicationGatewayLoadDistributionPolicy `json:"loadDistributionPolicies,omitempty"` - OperationalState *ApplicationGatewayOperationalState `json:"operationalState,omitempty"` - PrivateEndpointConnections *[]ApplicationGatewayPrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - PrivateLinkConfigurations *[]ApplicationGatewayPrivateLinkConfiguration `json:"privateLinkConfigurations,omitempty"` - Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"` - RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - RewriteRuleSets *[]ApplicationGatewayRewriteRuleSet `json:"rewriteRuleSets,omitempty"` - RoutingRules *[]ApplicationGatewayRoutingRule `json:"routingRules,omitempty"` - Sku *ApplicationGatewaySku `json:"sku,omitempty"` - SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"` - SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"` - SslProfiles *[]ApplicationGatewaySslProfile `json:"sslProfiles,omitempty"` - TrustedClientCertificates *[]ApplicationGatewayTrustedClientCertificate `json:"trustedClientCertificates,omitempty"` - TrustedRootCertificates *[]ApplicationGatewayTrustedRootCertificate `json:"trustedRootCertificates,omitempty"` - UrlPathMaps *[]ApplicationGatewayUrlPathMap `json:"urlPathMaps,omitempty"` - WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayredirectconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayredirectconfiguration.go deleted file mode 100644 index 99a2df5f0de93..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayredirectconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRedirectConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayredirectconfigurationpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayredirectconfigurationpropertiesformat.go deleted file mode 100644 index 07b97214f7f72..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayredirectconfigurationpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRedirectConfigurationPropertiesFormat struct { - IncludePath *bool `json:"includePath,omitempty"` - IncludeQueryString *bool `json:"includeQueryString,omitempty"` - PathRules *[]SubResource `json:"pathRules,omitempty"` - RedirectType *ApplicationGatewayRedirectType `json:"redirectType,omitempty"` - RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"` - TargetListener *SubResource `json:"targetListener,omitempty"` - TargetUrl *string `json:"targetUrl,omitempty"` - UrlPathMaps *[]SubResource `json:"urlPathMaps,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayrequestroutingrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayrequestroutingrule.go deleted file mode 100644 index 8968674820d19..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayrequestroutingrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRequestRoutingRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayrequestroutingrulepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayrequestroutingrulepropertiesformat.go deleted file mode 100644 index d7ab0f3f4d946..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayrequestroutingrulepropertiesformat.go +++ /dev/null @@ -1,17 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRequestRoutingRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` - HTTPListener *SubResource `json:"httpListener,omitempty"` - LoadDistributionPolicy *SubResource `json:"loadDistributionPolicy,omitempty"` - Priority *int64 `json:"priority,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` - RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"` - RuleType *ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"` - UrlPathMap *SubResource `json:"urlPathMap,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayrewriterule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayrewriterule.go deleted file mode 100644 index 6ce3b9a1f5d5b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayrewriterule.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRewriteRule struct { - ActionSet *ApplicationGatewayRewriteRuleActionSet `json:"actionSet,omitempty"` - Conditions *[]ApplicationGatewayRewriteRuleCondition `json:"conditions,omitempty"` - Name *string `json:"name,omitempty"` - RuleSequence *int64 `json:"ruleSequence,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayrewriteruleactionset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayrewriteruleactionset.go deleted file mode 100644 index 02be2e1f37bf0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayrewriteruleactionset.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRewriteRuleActionSet struct { - RequestHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"requestHeaderConfigurations,omitempty"` - ResponseHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"responseHeaderConfigurations,omitempty"` - UrlConfiguration *ApplicationGatewayUrlConfiguration `json:"urlConfiguration,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayrewriterulecondition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayrewriterulecondition.go deleted file mode 100644 index c7e6af3b85a70..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayrewriterulecondition.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRewriteRuleCondition struct { - IgnoreCase *bool `json:"ignoreCase,omitempty"` - Negate *bool `json:"negate,omitempty"` - Pattern *string `json:"pattern,omitempty"` - Variable *string `json:"variable,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayrewriteruleset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayrewriteruleset.go deleted file mode 100644 index 571e90385085d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayrewriteruleset.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRewriteRuleSet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayRewriteRuleSetPropertiesFormat `json:"properties,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayrewriterulesetpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayrewriterulesetpropertiesformat.go deleted file mode 100644 index 031206c13cecb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayrewriterulesetpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRewriteRuleSetPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RewriteRules *[]ApplicationGatewayRewriteRule `json:"rewriteRules,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayroutingrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayroutingrule.go deleted file mode 100644 index 448709de6b463..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayroutingrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRoutingRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayRoutingRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayroutingrulepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayroutingrulepropertiesformat.go deleted file mode 100644 index 5be0055253416..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayroutingrulepropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRoutingRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendSettings *SubResource `json:"backendSettings,omitempty"` - Listener *SubResource `json:"listener,omitempty"` - Priority int64 `json:"priority"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RuleType *ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaysku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaysku.go deleted file mode 100644 index 99350cf8ec72e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaysku.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySku struct { - Capacity *int64 `json:"capacity,omitempty"` - Name *ApplicationGatewaySkuName `json:"name,omitempty"` - Tier *ApplicationGatewayTier `json:"tier,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaysslcertificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaysslcertificate.go deleted file mode 100644 index 1f58986786259..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaysslcertificate.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaysslcertificatepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaysslcertificatepropertiesformat.go deleted file mode 100644 index 1c92efb93bd53..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaysslcertificatepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslCertificatePropertiesFormat struct { - Data *string `json:"data,omitempty"` - KeyVaultSecretId *string `json:"keyVaultSecretId,omitempty"` - Password *string `json:"password,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicCertData *string `json:"publicCertData,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaysslpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaysslpolicy.go deleted file mode 100644 index be42ac49a1859..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaysslpolicy.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslPolicy struct { - CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"` - DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"` - MinProtocolVersion *ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"` - PolicyName *ApplicationGatewaySslPolicyName `json:"policyName,omitempty"` - PolicyType *ApplicationGatewaySslPolicyType `json:"policyType,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaysslpredefinedpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaysslpredefinedpolicy.go deleted file mode 100644 index a7932dc66dbec..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaysslpredefinedpolicy.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslPredefinedPolicy struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaysslpredefinedpolicypropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaysslpredefinedpolicypropertiesformat.go deleted file mode 100644 index 15702750dea7f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaysslpredefinedpolicypropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct { - CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"` - MinProtocolVersion *ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaysslprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaysslprofile.go deleted file mode 100644 index 609877668f8c3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaysslprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewaySslProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaysslprofilepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaysslprofilepropertiesformat.go deleted file mode 100644 index a7c5ae2c88311..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaysslprofilepropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslProfilePropertiesFormat struct { - ClientAuthConfiguration *ApplicationGatewayClientAuthConfiguration `json:"clientAuthConfiguration,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"` - TrustedClientCertificates *[]SubResource `json:"trustedClientCertificates,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaytrustedclientcertificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaytrustedclientcertificate.go deleted file mode 100644 index 731b46860d775..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaytrustedclientcertificate.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayTrustedClientCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayTrustedClientCertificatePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaytrustedclientcertificatepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaytrustedclientcertificatepropertiesformat.go deleted file mode 100644 index 67b5d91461dca..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaytrustedclientcertificatepropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayTrustedClientCertificatePropertiesFormat struct { - ClientCertIssuerDN *string `json:"clientCertIssuerDN,omitempty"` - Data *string `json:"data,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ValidatedCertData *string `json:"validatedCertData,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaytrustedrootcertificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaytrustedrootcertificate.go deleted file mode 100644 index 12343718b3585..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaytrustedrootcertificate.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayTrustedRootCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaytrustedrootcertificatepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaytrustedrootcertificatepropertiesformat.go deleted file mode 100644 index 7aeb8e0a84e6e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaytrustedrootcertificatepropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct { - Data *string `json:"data,omitempty"` - KeyVaultSecretId *string `json:"keyVaultSecretId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayurlconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayurlconfiguration.go deleted file mode 100644 index 18491c35f12a3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayurlconfiguration.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayUrlConfiguration struct { - ModifiedPath *string `json:"modifiedPath,omitempty"` - ModifiedQueryString *string `json:"modifiedQueryString,omitempty"` - Reroute *bool `json:"reroute,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayurlpathmap.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayurlpathmap.go deleted file mode 100644 index 5fc0687757846..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayurlpathmap.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayUrlPathMap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayUrlPathMapPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayurlpathmappropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayurlpathmappropertiesformat.go deleted file mode 100644 index ef8e7e8e02f70..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewayurlpathmappropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayUrlPathMapPropertiesFormat struct { - DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"` - DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"` - DefaultLoadDistributionPolicy *SubResource `json:"defaultLoadDistributionPolicy,omitempty"` - DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"` - DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"` - PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaywebapplicationfirewallconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaywebapplicationfirewallconfiguration.go deleted file mode 100644 index 561512df449c6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationgatewaywebapplicationfirewallconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayWebApplicationFirewallConfiguration struct { - DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"` - Enabled bool `json:"enabled"` - Exclusions *[]ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"` - FileUploadLimitInMb *int64 `json:"fileUploadLimitInMb,omitempty"` - FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode"` - MaxRequestBodySize *int64 `json:"maxRequestBodySize,omitempty"` - MaxRequestBodySizeInKb *int64 `json:"maxRequestBodySizeInKb,omitempty"` - RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"` - RuleSetType string `json:"ruleSetType"` - RuleSetVersion string `json:"ruleSetVersion"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationsecuritygroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationsecuritygroup.go deleted file mode 100644 index 71e4f60a5a085..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationsecuritygrouppropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index c8593cff7762f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_backendaddresspool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_backendaddresspool.go deleted file mode 100644 index 1a7d2037c6781..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_backendaddresspoolpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 7dc8222f453b6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_customdnsconfigpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 821207ea54b07..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_ddossettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_ddossettings.go deleted file mode 100644 index afe28edd8fce8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_delegation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_delegation.go deleted file mode 100644 index dde48e048ee95..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_flowlog.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_flowlog.go deleted file mode 100644 index 8d1c520da14bc..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_flowlogformatparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_flowlogformatparameters.go deleted file mode 100644 index 79d541b9318dd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_flowlogpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_flowlogpropertiesformat.go deleted file mode 100644 index 666f7fd230f61..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_frontendipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_frontendipconfiguration.go deleted file mode 100644 index 6af1ef3499136..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package applicationgateways - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_frontendipconfigurationpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index dfcbf3e5acac2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_gatewayloadbalancertunnelinterface.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index 81f7359230920..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_inboundnatrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_inboundnatrule.go deleted file mode 100644 index e8326d63cddf3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_inboundnatrulepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index e68b37342b311..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_ipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_ipconfiguration.go deleted file mode 100644 index 3035f84c59627..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_ipconfigurationprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_ipconfigurationprofile.go deleted file mode 100644 index edb884d27183f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_ipconfigurationprofilepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index 1c6df0dcda2c6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_ipconfigurationpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 5de8de82f9ec9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_iptag.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_iptag.go deleted file mode 100644 index e423a8c05939f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_loadbalancerbackendaddress.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_loadbalancerbackendaddress.go deleted file mode 100644 index a4bb848daa555..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_loadbalancerbackendaddresspropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index ab1822cd6b6aa..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_natgateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_natgateway.go deleted file mode 100644 index eb51b102cada0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package applicationgateways - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_natgatewaypropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_natgatewaypropertiesformat.go deleted file mode 100644 index 21ac8a2eca2be..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_natgatewaysku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_natgatewaysku.go deleted file mode 100644 index 54ee08d249828..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_natruleportmapping.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_natruleportmapping.go deleted file mode 100644 index 1ca2ef21443ec..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networkinterface.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networkinterface.go deleted file mode 100644 index 73b1cb41a522d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgateways - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networkinterfacednssettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networkinterfacednssettings.go deleted file mode 100644 index 92961ce7d0453..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networkinterfaceipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 1be55bfe46952..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index fed49bbe9de65..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networkinterfaceipconfigurationpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 70234aeb42fce..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networkinterfacepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 5b015dee73ff2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,28 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networkinterfacetapconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 8dc1718642664..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networkinterfacetapconfigurationpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 199c278ace045..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networksecuritygroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networksecuritygroup.go deleted file mode 100644 index 14268c44ed07e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networksecuritygrouppropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index e16fb5f6fb3cb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privateendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privateendpoint.go deleted file mode 100644 index 4ec2655966450..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgateways - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privateendpointconnection.go deleted file mode 100644 index 72911c666f832..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privateendpointconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privateendpointconnectionproperties.go deleted file mode 100644 index 4413bd3db2754..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privateendpointipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privateendpointipconfiguration.go deleted file mode 100644 index 7cae9c3cf716f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privateendpointipconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index f1f5adead6325..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privateendpointproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privateendpointproperties.go deleted file mode 100644 index 832b7f18a5d2d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privatelinkservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privatelinkservice.go deleted file mode 100644 index 238c6ee31c6f2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgateways - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privatelinkserviceconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privatelinkserviceconnection.go deleted file mode 100644 index ee88d81eb06d2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privatelinkserviceconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 26b1b21ad3275..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privatelinkserviceconnectionstate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 2d2970905b08b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privatelinkserviceipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 18d6fcdf24dc8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privatelinkserviceipconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 02fc04bab97fb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privatelinkserviceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privatelinkserviceproperties.go deleted file mode 100644 index eb5433301226d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_publicipaddress.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_publicipaddress.go deleted file mode 100644 index c17efae3e57cc..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package applicationgateways - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_publicipaddressdnssettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_publicipaddressdnssettings.go deleted file mode 100644 index bb716274972ff..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_publicipaddresspropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_publicipaddresspropertiesformat.go deleted file mode 100644 index d714bdf3daa01..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_publicipaddresssku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_publicipaddresssku.go deleted file mode 100644 index 976ba6d175a0d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_resourcenavigationlink.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_resourcenavigationlink.go deleted file mode 100644 index 0aeedfe5241ea..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_resourcenavigationlinkformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_resourcenavigationlinkformat.go deleted file mode 100644 index 540e9b96c41a0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_resourceset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_resourceset.go deleted file mode 100644 index 05c6f87a0974f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_retentionpolicyparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_retentionpolicyparameters.go deleted file mode 100644 index aed6889cbabac..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_route.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_route.go deleted file mode 100644 index 8b16e63b0d465..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_routepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_routepropertiesformat.go deleted file mode 100644 index e5c5f69887413..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_routetable.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_routetable.go deleted file mode 100644 index 6b3d63e8b6cd9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_routetablepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_routetablepropertiesformat.go deleted file mode 100644 index af2c694b5dbcb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_securityrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_securityrule.go deleted file mode 100644 index ef187da7432b9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_securityrulepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_securityrulepropertiesformat.go deleted file mode 100644 index 96f0eea52f03a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority *int64 `json:"priority,omitempty"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_serviceassociationlink.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_serviceassociationlink.go deleted file mode 100644 index fcd770e8b43f7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_serviceassociationlinkpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 74146988cafbb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_servicedelegationpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 508b02893d338..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_serviceendpointpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_serviceendpointpolicy.go deleted file mode 100644 index 3c9d04af717f8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_serviceendpointpolicydefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 3c52f56e9eadd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_serviceendpointpolicydefinitionpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 0ccd3a839f33f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_serviceendpointpolicypropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index edd49bd36a4e7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_serviceendpointpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 5cae744400570..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_subnet.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_subnet.go deleted file mode 100644 index 9bad3a3150cf5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_subnetpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_subnetpropertiesformat.go deleted file mode 100644 index be8f3c6638a86..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIpConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_trafficanalyticsconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 6576711577860..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_trafficanalyticsproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_trafficanalyticsproperties.go deleted file mode 100644 index b9b39e7b346c7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_virtualnetworktap.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_virtualnetworktap.go deleted file mode 100644 index 610065f3a8a5f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_virtualnetworktappropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index a7db53f16295d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/predicates.go deleted file mode 100644 index c51e6f7b000d2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/predicates.go +++ /dev/null @@ -1,55 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p ApplicationGatewayOperationPredicate) Matches(input ApplicationGateway) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type ApplicationGatewaySslPredefinedPolicyOperationPredicate struct { - Id *string - Name *string -} - -func (p ApplicationGatewaySslPredefinedPolicyOperationPredicate) Matches(input ApplicationGatewaySslPredefinedPolicy) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/version.go deleted file mode 100644 index 192eed3c6e924..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-07-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgateways/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/README.md new file mode 100644 index 0000000000000..88400c89ff97a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/README.md @@ -0,0 +1,234 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts` Documentation + +The `bastionhosts` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts" +``` + + +### Client Initialization + +```go +client := bastionhosts.NewBastionHostsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `BastionHostsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") + +payload := bastionhosts.BastionHost{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `BastionHostsClient.Delete` + +```go +ctx := context.TODO() +id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `BastionHostsClient.DeleteBastionShareableLink` + +```go +ctx := context.TODO() +id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") + +payload := bastionhosts.BastionShareableLinkListRequest{ + // ... +} + + +if err := client.DeleteBastionShareableLinkThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `BastionHostsClient.DeleteBastionShareableLinkByToken` + +```go +ctx := context.TODO() +id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") + +payload := bastionhosts.BastionShareableLinkTokenListRequest{ + // ... +} + + +if err := client.DeleteBastionShareableLinkByTokenThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `BastionHostsClient.DisconnectActiveSessions` + +```go +ctx := context.TODO() +id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") + +payload := bastionhosts.SessionIds{ + // ... +} + + +// alternatively `client.DisconnectActiveSessions(ctx, id, payload)` can be used to do batched pagination +items, err := client.DisconnectActiveSessionsComplete(ctx, id, payload) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `BastionHostsClient.Get` + +```go +ctx := context.TODO() +id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `BastionHostsClient.GetActiveSessions` + +```go +ctx := context.TODO() +id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") + +// alternatively `client.GetActiveSessions(ctx, id)` can be used to do batched pagination +items, err := client.GetActiveSessionsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `BastionHostsClient.GetBastionShareableLink` + +```go +ctx := context.TODO() +id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") + +payload := bastionhosts.BastionShareableLinkListRequest{ + // ... +} + + +// alternatively `client.GetBastionShareableLink(ctx, id, payload)` can be used to do batched pagination +items, err := client.GetBastionShareableLinkComplete(ctx, id, payload) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `BastionHostsClient.List` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `BastionHostsClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `BastionHostsClient.PutBastionShareableLink` + +```go +ctx := context.TODO() +id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") + +payload := bastionhosts.BastionShareableLinkListRequest{ + // ... +} + + +// alternatively `client.PutBastionShareableLink(ctx, id, payload)` can be used to do batched pagination +items, err := client.PutBastionShareableLinkComplete(ctx, id, payload) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `BastionHostsClient.UpdateTags` + +```go +ctx := context.TODO() +id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") + +payload := bastionhosts.TagsObject{ + // ... +} + + +if err := client.UpdateTagsThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/client.go new file mode 100644 index 0000000000000..95e06c7f523df --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/client.go @@ -0,0 +1,26 @@ +package bastionhosts + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BastionHostsClient struct { + Client *resourcemanager.Client +} + +func NewBastionHostsClientWithBaseURI(sdkApi sdkEnv.Api) (*BastionHostsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bastionhosts", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating BastionHostsClient: %+v", err) + } + + return &BastionHostsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/constants.go new file mode 100644 index 0000000000000..3822668195b53 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/constants.go @@ -0,0 +1,186 @@ +package bastionhosts + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BastionConnectProtocol string + +const ( + BastionConnectProtocolRDP BastionConnectProtocol = "RDP" + BastionConnectProtocolSSH BastionConnectProtocol = "SSH" +) + +func PossibleValuesForBastionConnectProtocol() []string { + return []string{ + string(BastionConnectProtocolRDP), + string(BastionConnectProtocolSSH), + } +} + +func (s *BastionConnectProtocol) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseBastionConnectProtocol(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseBastionConnectProtocol(input string) (*BastionConnectProtocol, error) { + vals := map[string]BastionConnectProtocol{ + "rdp": BastionConnectProtocolRDP, + "ssh": BastionConnectProtocolSSH, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := BastionConnectProtocol(input) + return &out, nil +} + +type BastionHostSkuName string + +const ( + BastionHostSkuNameBasic BastionHostSkuName = "Basic" + BastionHostSkuNameDeveloper BastionHostSkuName = "Developer" + BastionHostSkuNamePremium BastionHostSkuName = "Premium" + BastionHostSkuNameStandard BastionHostSkuName = "Standard" +) + +func PossibleValuesForBastionHostSkuName() []string { + return []string{ + string(BastionHostSkuNameBasic), + string(BastionHostSkuNameDeveloper), + string(BastionHostSkuNamePremium), + string(BastionHostSkuNameStandard), + } +} + +func (s *BastionHostSkuName) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseBastionHostSkuName(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseBastionHostSkuName(input string) (*BastionHostSkuName, error) { + vals := map[string]BastionHostSkuName{ + "basic": BastionHostSkuNameBasic, + "developer": BastionHostSkuNameDeveloper, + "premium": BastionHostSkuNamePremium, + "standard": BastionHostSkuNameStandard, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := BastionHostSkuName(input) + return &out, nil +} + +type IPAllocationMethod string + +const ( + IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" + IPAllocationMethodStatic IPAllocationMethod = "Static" +) + +func PossibleValuesForIPAllocationMethod() []string { + return []string{ + string(IPAllocationMethodDynamic), + string(IPAllocationMethodStatic), + } +} + +func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIPAllocationMethod(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { + vals := map[string]IPAllocationMethod{ + "dynamic": IPAllocationMethodDynamic, + "static": IPAllocationMethodStatic, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IPAllocationMethod(input) + return &out, nil +} + +type ProvisioningState string + +const ( + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateDeleting), + string(ProvisioningStateFailed), + string(ProvisioningStateSucceeded), + string(ProvisioningStateUpdating), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "deleting": ProvisioningStateDeleting, + "failed": ProvisioningStateFailed, + "succeeded": ProvisioningStateSucceeded, + "updating": ProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/id_bastionhost.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/id_bastionhost.go new file mode 100644 index 0000000000000..66012e2eda558 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/id_bastionhost.go @@ -0,0 +1,130 @@ +package bastionhosts + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&BastionHostId{}) +} + +var _ resourceids.ResourceId = &BastionHostId{} + +// BastionHostId is a struct representing the Resource ID for a Bastion Host +type BastionHostId struct { + SubscriptionId string + ResourceGroupName string + BastionHostName string +} + +// NewBastionHostID returns a new BastionHostId struct +func NewBastionHostID(subscriptionId string, resourceGroupName string, bastionHostName string) BastionHostId { + return BastionHostId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + BastionHostName: bastionHostName, + } +} + +// ParseBastionHostID parses 'input' into a BastionHostId +func ParseBastionHostID(input string) (*BastionHostId, error) { + parser := resourceids.NewParserFromResourceIdType(&BastionHostId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := BastionHostId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseBastionHostIDInsensitively parses 'input' case-insensitively into a BastionHostId +// note: this method should only be used for API response data and not user input +func ParseBastionHostIDInsensitively(input string) (*BastionHostId, error) { + parser := resourceids.NewParserFromResourceIdType(&BastionHostId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := BastionHostId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *BastionHostId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.BastionHostName, ok = input.Parsed["bastionHostName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "bastionHostName", input) + } + + return nil +} + +// ValidateBastionHostID checks that 'input' can be parsed as a Bastion Host ID +func ValidateBastionHostID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseBastionHostID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Bastion Host ID +func (id BastionHostId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/bastionHosts/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.BastionHostName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Bastion Host ID +func (id BastionHostId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), + resourceids.StaticSegment("staticBastionHosts", "bastionHosts", "bastionHosts"), + resourceids.UserSpecifiedSegment("bastionHostName", "bastionHostValue"), + } +} + +// String returns a human-readable description of this Bastion Host ID +func (id BastionHostId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Bastion Host Name: %q", id.BastionHostName), + } + return fmt.Sprintf("Bastion Host (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_createorupdate.go new file mode 100644 index 0000000000000..fe735012d1ff6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_createorupdate.go @@ -0,0 +1,75 @@ +package bastionhosts + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *BastionHost +} + +// CreateOrUpdate ... +func (c BastionHostsClient) CreateOrUpdate(ctx context.Context, id BastionHostId, input BastionHost) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c BastionHostsClient) CreateOrUpdateThenPoll(ctx context.Context, id BastionHostId, input BastionHost) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_delete.go new file mode 100644 index 0000000000000..5eebbeeeed388 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_delete.go @@ -0,0 +1,71 @@ +package bastionhosts + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c BastionHostsClient) Delete(ctx context.Context, id BastionHostId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c BastionHostsClient) DeleteThenPoll(ctx context.Context, id BastionHostId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_deletebastionshareablelink.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_deletebastionshareablelink.go new file mode 100644 index 0000000000000..24694223a115a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_deletebastionshareablelink.go @@ -0,0 +1,74 @@ +package bastionhosts + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteBastionShareableLinkOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// DeleteBastionShareableLink ... +func (c BastionHostsClient) DeleteBastionShareableLink(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (result DeleteBastionShareableLinkOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/deleteShareableLinks", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteBastionShareableLinkThenPoll performs DeleteBastionShareableLink then polls until it's completed +func (c BastionHostsClient) DeleteBastionShareableLinkThenPoll(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) error { + result, err := c.DeleteBastionShareableLink(ctx, id, input) + if err != nil { + return fmt.Errorf("performing DeleteBastionShareableLink: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after DeleteBastionShareableLink: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_deletebastionshareablelinkbytoken.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_deletebastionshareablelinkbytoken.go new file mode 100644 index 0000000000000..dd4a99222c92b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_deletebastionshareablelinkbytoken.go @@ -0,0 +1,73 @@ +package bastionhosts + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteBastionShareableLinkByTokenOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// DeleteBastionShareableLinkByToken ... +func (c BastionHostsClient) DeleteBastionShareableLinkByToken(ctx context.Context, id BastionHostId, input BastionShareableLinkTokenListRequest) (result DeleteBastionShareableLinkByTokenOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/deleteShareableLinksByToken", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteBastionShareableLinkByTokenThenPoll performs DeleteBastionShareableLinkByToken then polls until it's completed +func (c BastionHostsClient) DeleteBastionShareableLinkByTokenThenPoll(ctx context.Context, id BastionHostId, input BastionShareableLinkTokenListRequest) error { + result, err := c.DeleteBastionShareableLinkByToken(ctx, id, input) + if err != nil { + return fmt.Errorf("performing DeleteBastionShareableLinkByToken: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after DeleteBastionShareableLinkByToken: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_disconnectactivesessions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_disconnectactivesessions.go new file mode 100644 index 0000000000000..b5bf326b6c2dc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_disconnectactivesessions.go @@ -0,0 +1,105 @@ +package bastionhosts + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DisconnectActiveSessionsOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]BastionSessionState +} + +type DisconnectActiveSessionsCompleteResult struct { + LatestHttpResponse *http.Response + Items []BastionSessionState +} + +type DisconnectActiveSessionsCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *DisconnectActiveSessionsCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// DisconnectActiveSessions ... +func (c BastionHostsClient) DisconnectActiveSessions(ctx context.Context, id BastionHostId, input SessionIds) (result DisconnectActiveSessionsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Pager: &DisconnectActiveSessionsCustomPager{}, + Path: fmt.Sprintf("%s/disconnectActiveSessions", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]BastionSessionState `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// DisconnectActiveSessionsComplete retrieves all the results into a single object +func (c BastionHostsClient) DisconnectActiveSessionsComplete(ctx context.Context, id BastionHostId, input SessionIds) (DisconnectActiveSessionsCompleteResult, error) { + return c.DisconnectActiveSessionsCompleteMatchingPredicate(ctx, id, input, BastionSessionStateOperationPredicate{}) +} + +// DisconnectActiveSessionsCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c BastionHostsClient) DisconnectActiveSessionsCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input SessionIds, predicate BastionSessionStateOperationPredicate) (result DisconnectActiveSessionsCompleteResult, err error) { + items := make([]BastionSessionState, 0) + + resp, err := c.DisconnectActiveSessions(ctx, id, input) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = DisconnectActiveSessionsCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_get.go new file mode 100644 index 0000000000000..71b1a85a45fad --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_get.go @@ -0,0 +1,54 @@ +package bastionhosts + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *BastionHost +} + +// Get ... +func (c BastionHostsClient) Get(ctx context.Context, id BastionHostId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model BastionHost + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_getactivesessions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_getactivesessions.go new file mode 100644 index 0000000000000..ef9274ebcca3b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_getactivesessions.go @@ -0,0 +1,89 @@ +package bastionhosts + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetActiveSessionsOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *[]BastionActiveSession +} + +type GetActiveSessionsCompleteResult struct { + LatestHttpResponse *http.Response + Items []BastionActiveSession +} + +type GetActiveSessionsCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *GetActiveSessionsCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// GetActiveSessions ... +func (c BastionHostsClient) GetActiveSessions(ctx context.Context, id BastionHostId) (result GetActiveSessionsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Pager: &GetActiveSessionsCustomPager{}, + Path: fmt.Sprintf("%s/getActiveSessions", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// GetActiveSessionsThenPoll performs GetActiveSessions then polls until it's completed +func (c BastionHostsClient) GetActiveSessionsThenPoll(ctx context.Context, id BastionHostId) error { + result, err := c.GetActiveSessions(ctx, id) + if err != nil { + return fmt.Errorf("performing GetActiveSessions: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after GetActiveSessions: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_getbastionshareablelink.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_getbastionshareablelink.go new file mode 100644 index 0000000000000..c259811919990 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_getbastionshareablelink.go @@ -0,0 +1,105 @@ +package bastionhosts + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetBastionShareableLinkOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]BastionShareableLink +} + +type GetBastionShareableLinkCompleteResult struct { + LatestHttpResponse *http.Response + Items []BastionShareableLink +} + +type GetBastionShareableLinkCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *GetBastionShareableLinkCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// GetBastionShareableLink ... +func (c BastionHostsClient) GetBastionShareableLink(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (result GetBastionShareableLinkOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Pager: &GetBastionShareableLinkCustomPager{}, + Path: fmt.Sprintf("%s/getShareableLinks", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]BastionShareableLink `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// GetBastionShareableLinkComplete retrieves all the results into a single object +func (c BastionHostsClient) GetBastionShareableLinkComplete(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (GetBastionShareableLinkCompleteResult, error) { + return c.GetBastionShareableLinkCompleteMatchingPredicate(ctx, id, input, BastionShareableLinkOperationPredicate{}) +} + +// GetBastionShareableLinkCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c BastionHostsClient) GetBastionShareableLinkCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest, predicate BastionShareableLinkOperationPredicate) (result GetBastionShareableLinkCompleteResult, err error) { + items := make([]BastionShareableLink, 0) + + resp, err := c.GetBastionShareableLink(ctx, id, input) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = GetBastionShareableLinkCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_list.go new file mode 100644 index 0000000000000..1503bda851397 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_list.go @@ -0,0 +1,106 @@ +package bastionhosts + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]BastionHost +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []BastionHost +} + +type ListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// List ... +func (c BastionHostsClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.Network/bastionHosts", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]BastionHost `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c BastionHostsClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, BastionHostOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c BastionHostsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate BastionHostOperationPredicate) (result ListCompleteResult, err error) { + items := make([]BastionHost, 0) + + resp, err := c.List(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_listbyresourcegroup.go new file mode 100644 index 0000000000000..9be179204d2fa --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_listbyresourcegroup.go @@ -0,0 +1,106 @@ +package bastionhosts + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]BastionHost +} + +type ListByResourceGroupCompleteResult struct { + LatestHttpResponse *http.Response + Items []BastionHost +} + +type ListByResourceGroupCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByResourceGroup ... +func (c BastionHostsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByResourceGroupCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.Network/bastionHosts", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]BastionHost `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByResourceGroupComplete retrieves all the results into a single object +func (c BastionHostsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, BastionHostOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c BastionHostsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate BastionHostOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { + items := make([]BastionHost, 0) + + resp, err := c.ListByResourceGroup(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByResourceGroupCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_putbastionshareablelink.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_putbastionshareablelink.go new file mode 100644 index 0000000000000..f0a53697d665b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_putbastionshareablelink.go @@ -0,0 +1,93 @@ +package bastionhosts + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PutBastionShareableLinkOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *[]BastionShareableLink +} + +type PutBastionShareableLinkCompleteResult struct { + LatestHttpResponse *http.Response + Items []BastionShareableLink +} + +type PutBastionShareableLinkCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *PutBastionShareableLinkCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// PutBastionShareableLink ... +func (c BastionHostsClient) PutBastionShareableLink(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (result PutBastionShareableLinkOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Pager: &PutBastionShareableLinkCustomPager{}, + Path: fmt.Sprintf("%s/createShareableLinks", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// PutBastionShareableLinkThenPoll performs PutBastionShareableLink then polls until it's completed +func (c BastionHostsClient) PutBastionShareableLinkThenPoll(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) error { + result, err := c.PutBastionShareableLink(ctx, id, input) + if err != nil { + return fmt.Errorf("performing PutBastionShareableLink: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after PutBastionShareableLink: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_updatetags.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_updatetags.go new file mode 100644 index 0000000000000..697efefb0c865 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/method_updatetags.go @@ -0,0 +1,75 @@ +package bastionhosts + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateTagsOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *BastionHost +} + +// UpdateTags ... +func (c BastionHostsClient) UpdateTags(ctx context.Context, id BastionHostId, input TagsObject) (result UpdateTagsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateTagsThenPoll performs UpdateTags then polls until it's completed +func (c BastionHostsClient) UpdateTagsThenPoll(ctx context.Context, id BastionHostId, input TagsObject) error { + result, err := c.UpdateTags(ctx, id, input) + if err != nil { + return fmt.Errorf("performing UpdateTags: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after UpdateTags: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionactivesession.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionactivesession.go new file mode 100644 index 0000000000000..4f5fe8c844eb6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionactivesession.go @@ -0,0 +1,18 @@ +package bastionhosts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BastionActiveSession struct { + Protocol *BastionConnectProtocol `json:"protocol,omitempty"` + ResourceType *string `json:"resourceType,omitempty"` + SessionDurationInMins *float64 `json:"sessionDurationInMins,omitempty"` + SessionId *string `json:"sessionId,omitempty"` + StartTime *interface{} `json:"startTime,omitempty"` + TargetHostName *string `json:"targetHostName,omitempty"` + TargetIPAddress *string `json:"targetIpAddress,omitempty"` + TargetResourceGroup *string `json:"targetResourceGroup,omitempty"` + TargetResourceId *string `json:"targetResourceId,omitempty"` + TargetSubscriptionId *string `json:"targetSubscriptionId,omitempty"` + UserName *string `json:"userName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionhost.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionhost.go new file mode 100644 index 0000000000000..cdd1feb92cf9e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionhost.go @@ -0,0 +1,20 @@ +package bastionhosts + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BastionHost struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *BastionHostPropertiesFormat `json:"properties,omitempty"` + Sku *Sku `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` + Zones *zones.Schema `json:"zones,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionhostipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionhostipconfiguration.go new file mode 100644 index 0000000000000..efda704773cc6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionhostipconfiguration.go @@ -0,0 +1,12 @@ +package bastionhosts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BastionHostIPConfiguration struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *BastionHostIPConfigurationPropertiesFormat `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionhostipconfigurationpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionhostipconfigurationpropertiesformat.go new file mode 100644 index 0000000000000..34d950723a146 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionhostipconfigurationpropertiesformat.go @@ -0,0 +1,11 @@ +package bastionhosts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BastionHostIPConfigurationPropertiesFormat struct { + PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + PublicIPAddress SubResource `json:"publicIPAddress"` + Subnet SubResource `json:"subnet"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionhostpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionhostpropertiesformat.go new file mode 100644 index 0000000000000..d45d86671abcf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionhostpropertiesformat.go @@ -0,0 +1,20 @@ +package bastionhosts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BastionHostPropertiesFormat struct { + DisableCopyPaste *bool `json:"disableCopyPaste,omitempty"` + DnsName *string `json:"dnsName,omitempty"` + EnableFileCopy *bool `json:"enableFileCopy,omitempty"` + EnableIPConnect *bool `json:"enableIpConnect,omitempty"` + EnableKerberos *bool `json:"enableKerberos,omitempty"` + EnableSessionRecording *bool `json:"enableSessionRecording,omitempty"` + EnableShareableLink *bool `json:"enableShareableLink,omitempty"` + EnableTunneling *bool `json:"enableTunneling,omitempty"` + IPConfigurations *[]BastionHostIPConfiguration `json:"ipConfigurations,omitempty"` + NetworkAcls *BastionHostPropertiesFormatNetworkAcls `json:"networkAcls,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + ScaleUnits *int64 `json:"scaleUnits,omitempty"` + VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionhostpropertiesformatnetworkacls.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionhostpropertiesformatnetworkacls.go new file mode 100644 index 0000000000000..f217ff8d9ae82 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionhostpropertiesformatnetworkacls.go @@ -0,0 +1,8 @@ +package bastionhosts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BastionHostPropertiesFormatNetworkAcls struct { + IPRules *[]IPRule `json:"ipRules,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionsessionstate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionsessionstate.go new file mode 100644 index 0000000000000..f60a5f77620ae --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionsessionstate.go @@ -0,0 +1,10 @@ +package bastionhosts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BastionSessionState struct { + Message *string `json:"message,omitempty"` + SessionId *string `json:"sessionId,omitempty"` + State *string `json:"state,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionshareablelink.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionshareablelink.go new file mode 100644 index 0000000000000..4da004b8f536f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionshareablelink.go @@ -0,0 +1,11 @@ +package bastionhosts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BastionShareableLink struct { + Bsl *string `json:"bsl,omitempty"` + CreatedAt *string `json:"createdAt,omitempty"` + Message *string `json:"message,omitempty"` + VM Resource `json:"vm"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionshareablelinklistrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionshareablelinklistrequest.go new file mode 100644 index 0000000000000..925995fca6417 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionshareablelinklistrequest.go @@ -0,0 +1,8 @@ +package bastionhosts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BastionShareableLinkListRequest struct { + VMs *[]BastionShareableLink `json:"vms,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionshareablelinktokenlistrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionshareablelinktokenlistrequest.go new file mode 100644 index 0000000000000..0b7aa54ce711c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_bastionshareablelinktokenlistrequest.go @@ -0,0 +1,8 @@ +package bastionhosts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BastionShareableLinkTokenListRequest struct { + Tokens *[]string `json:"tokens,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_iprule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_iprule.go new file mode 100644 index 0000000000000..a54a84aac8e6c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_iprule.go @@ -0,0 +1,8 @@ +package bastionhosts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IPRule struct { + AddressPrefix *string `json:"addressPrefix,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_resource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_resource.go new file mode 100644 index 0000000000000..17e7756ce3c05 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_resource.go @@ -0,0 +1,12 @@ +package bastionhosts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Resource struct { + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_sessionids.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_sessionids.go new file mode 100644 index 0000000000000..a74e44a3ebde9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_sessionids.go @@ -0,0 +1,8 @@ +package bastionhosts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SessionIds struct { + SessionIds *[]string `json:"sessionIds,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_sku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_sku.go new file mode 100644 index 0000000000000..1a8a8749a4642 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_sku.go @@ -0,0 +1,8 @@ +package bastionhosts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Sku struct { + Name *BastionHostSkuName `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_subresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_subresource.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_subresource.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_subresource.go index 5e7297f22b2b6..7a0a23a149a7a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_subresource.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_subresource.go @@ -1,4 +1,4 @@ -package applicationgateways +package bastionhosts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_tagsobject.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_tagsobject.go similarity index 89% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_tagsobject.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_tagsobject.go index d5962ed5647f4..73566b88f0be1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways/model_tagsobject.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/model_tagsobject.go @@ -1,4 +1,4 @@ -package applicationgateways +package bastionhosts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/predicates.go new file mode 100644 index 0000000000000..3c3835a32d082 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/predicates.go @@ -0,0 +1,141 @@ +package bastionhosts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BastionActiveSessionOperationPredicate struct { + ResourceType *string + SessionDurationInMins *float64 + SessionId *string + StartTime *interface{} + TargetHostName *string + TargetIPAddress *string + TargetResourceGroup *string + TargetResourceId *string + TargetSubscriptionId *string + UserName *string +} + +func (p BastionActiveSessionOperationPredicate) Matches(input BastionActiveSession) bool { + + if p.ResourceType != nil && (input.ResourceType == nil || *p.ResourceType != *input.ResourceType) { + return false + } + + if p.SessionDurationInMins != nil && (input.SessionDurationInMins == nil || *p.SessionDurationInMins != *input.SessionDurationInMins) { + return false + } + + if p.SessionId != nil && (input.SessionId == nil || *p.SessionId != *input.SessionId) { + return false + } + + if p.StartTime != nil && (input.StartTime == nil || *p.StartTime != *input.StartTime) { + return false + } + + if p.TargetHostName != nil && (input.TargetHostName == nil || *p.TargetHostName != *input.TargetHostName) { + return false + } + + if p.TargetIPAddress != nil && (input.TargetIPAddress == nil || *p.TargetIPAddress != *input.TargetIPAddress) { + return false + } + + if p.TargetResourceGroup != nil && (input.TargetResourceGroup == nil || *p.TargetResourceGroup != *input.TargetResourceGroup) { + return false + } + + if p.TargetResourceId != nil && (input.TargetResourceId == nil || *p.TargetResourceId != *input.TargetResourceId) { + return false + } + + if p.TargetSubscriptionId != nil && (input.TargetSubscriptionId == nil || *p.TargetSubscriptionId != *input.TargetSubscriptionId) { + return false + } + + if p.UserName != nil && (input.UserName == nil || *p.UserName != *input.UserName) { + return false + } + + return true +} + +type BastionHostOperationPredicate struct { + Etag *string + Id *string + Location *string + Name *string + Type *string +} + +func (p BastionHostOperationPredicate) Matches(input BastionHost) bool { + + if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { + return false + } + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type BastionSessionStateOperationPredicate struct { + Message *string + SessionId *string + State *string +} + +func (p BastionSessionStateOperationPredicate) Matches(input BastionSessionState) bool { + + if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { + return false + } + + if p.SessionId != nil && (input.SessionId == nil || *p.SessionId != *input.SessionId) { + return false + } + + if p.State != nil && (input.State == nil || *p.State != *input.State) { + return false + } + + return true +} + +type BastionShareableLinkOperationPredicate struct { + Bsl *string + CreatedAt *string + Message *string +} + +func (p BastionShareableLinkOperationPredicate) Matches(input BastionShareableLink) bool { + + if p.Bsl != nil && (input.Bsl == nil || *p.Bsl != *input.Bsl) { + return false + } + + if p.CreatedAt != nil && (input.CreatedAt == nil || *p.CreatedAt != *input.CreatedAt) { + return false + } + + if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/version.go new file mode 100644 index 0000000000000..34627770e6da3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts/version.go @@ -0,0 +1,12 @@ +package bastionhosts + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-01-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/bastionhosts/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/client.go deleted file mode 100644 index dc18e41799062..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/client.go +++ /dev/null @@ -1,55 +0,0 @@ -package v2024_01_01_preview - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate" - "github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration" - "github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis" - "github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -type Client struct { - NginxCertificate *nginxcertificate.NginxCertificateClient - NginxConfiguration *nginxconfiguration.NginxConfigurationClient - NginxConfigurationAnalysis *nginxconfigurationanalysis.NginxConfigurationAnalysisClient - NginxDeployment *nginxdeployment.NginxDeploymentClient -} - -func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { - nginxCertificateClient, err := nginxcertificate.NewNginxCertificateClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building NginxCertificate client: %+v", err) - } - configureFunc(nginxCertificateClient.Client) - - nginxConfigurationAnalysisClient, err := nginxconfigurationanalysis.NewNginxConfigurationAnalysisClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building NginxConfigurationAnalysis client: %+v", err) - } - configureFunc(nginxConfigurationAnalysisClient.Client) - - nginxConfigurationClient, err := nginxconfiguration.NewNginxConfigurationClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building NginxConfiguration client: %+v", err) - } - configureFunc(nginxConfigurationClient.Client) - - nginxDeploymentClient, err := nginxdeployment.NewNginxDeploymentClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building NginxDeployment client: %+v", err) - } - configureFunc(nginxDeploymentClient.Client) - - return &Client{ - NginxCertificate: nginxCertificateClient, - NginxConfiguration: nginxConfigurationClient, - NginxConfigurationAnalysis: nginxConfigurationAnalysisClient, - NginxDeployment: nginxDeploymentClient, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/README.md deleted file mode 100644 index ed8eb84e85e4c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate` Documentation - -The `nginxcertificate` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2024-01-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate" -``` - - -### Client Initialization - -```go -client := nginxcertificate.NewNginxCertificateClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NginxCertificateClient.CertificatesCreateOrUpdate` - -```go -ctx := context.TODO() -id := nginxcertificate.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue", "certificateValue") - -payload := nginxcertificate.NginxCertificate{ - // ... -} - - -if err := client.CertificatesCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NginxCertificateClient.CertificatesDelete` - -```go -ctx := context.TODO() -id := nginxcertificate.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue", "certificateValue") - -if err := client.CertificatesDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `NginxCertificateClient.CertificatesGet` - -```go -ctx := context.TODO() -id := nginxcertificate.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue", "certificateValue") - -read, err := client.CertificatesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NginxCertificateClient.CertificatesList` - -```go -ctx := context.TODO() -id := nginxcertificate.NewNginxDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue") - -// alternatively `client.CertificatesList(ctx, id)` can be used to do batched pagination -items, err := client.CertificatesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/version.go deleted file mode 100644 index a74fdde51b503..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package nginxcertificate - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2024-01-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nginxcertificate/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/README.md deleted file mode 100644 index 6daa7e77b4046..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration` Documentation - -The `nginxconfiguration` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2024-01-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration" -``` - - -### Client Initialization - -```go -client := nginxconfiguration.NewNginxConfigurationClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NginxConfigurationClient.ConfigurationsCreateOrUpdate` - -```go -ctx := context.TODO() -id := nginxconfiguration.NewConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue", "configurationValue") - -payload := nginxconfiguration.NginxConfiguration{ - // ... -} - - -if err := client.ConfigurationsCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NginxConfigurationClient.ConfigurationsDelete` - -```go -ctx := context.TODO() -id := nginxconfiguration.NewConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue", "configurationValue") - -if err := client.ConfigurationsDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `NginxConfigurationClient.ConfigurationsGet` - -```go -ctx := context.TODO() -id := nginxconfiguration.NewConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue", "configurationValue") - -read, err := client.ConfigurationsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NginxConfigurationClient.ConfigurationsList` - -```go -ctx := context.TODO() -id := nginxconfiguration.NewNginxDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue") - -// alternatively `client.ConfigurationsList(ctx, id)` can be used to do batched pagination -items, err := client.ConfigurationsListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/version.go deleted file mode 100644 index df4fab485ba27..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package nginxconfiguration - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2024-01-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nginxconfiguration/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/README.md deleted file mode 100644 index 43108f487d63b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/README.md +++ /dev/null @@ -1,41 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis` Documentation - -The `nginxconfigurationanalysis` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2024-01-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis" -``` - - -### Client Initialization - -```go -client := nginxconfigurationanalysis.NewNginxConfigurationAnalysisClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NginxConfigurationAnalysisClient.ConfigurationsAnalysis` - -```go -ctx := context.TODO() -id := nginxconfigurationanalysis.NewConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue", "configurationValue") - -payload := nginxconfigurationanalysis.AnalysisCreate{ - // ... -} - - -read, err := client.ConfigurationsAnalysis(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/version.go deleted file mode 100644 index b9f3bc1c757e4..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package nginxconfigurationanalysis - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2024-01-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nginxconfigurationanalysis/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/README.md deleted file mode 100644 index fa64f3c78e49d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/README.md +++ /dev/null @@ -1,117 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment` Documentation - -The `nginxdeployment` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2024-01-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment" -``` - - -### Client Initialization - -```go -client := nginxdeployment.NewNginxDeploymentClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NginxDeploymentClient.DeploymentsCreateOrUpdate` - -```go -ctx := context.TODO() -id := nginxdeployment.NewNginxDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue") - -payload := nginxdeployment.NginxDeployment{ - // ... -} - - -if err := client.DeploymentsCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NginxDeploymentClient.DeploymentsDelete` - -```go -ctx := context.TODO() -id := nginxdeployment.NewNginxDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue") - -if err := client.DeploymentsDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `NginxDeploymentClient.DeploymentsGet` - -```go -ctx := context.TODO() -id := nginxdeployment.NewNginxDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue") - -read, err := client.DeploymentsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NginxDeploymentClient.DeploymentsList` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.DeploymentsList(ctx, id)` can be used to do batched pagination -items, err := client.DeploymentsListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NginxDeploymentClient.DeploymentsListByResourceGroup` - -```go -ctx := context.TODO() -id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.DeploymentsListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.DeploymentsListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NginxDeploymentClient.DeploymentsUpdate` - -```go -ctx := context.TODO() -id := nginxdeployment.NewNginxDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue") - -payload := nginxdeployment.NginxDeploymentUpdateParameters{ - // ... -} - - -if err := client.DeploymentsUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/constants.go deleted file mode 100644 index 4d2e27c3ab786..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/constants.go +++ /dev/null @@ -1,113 +0,0 @@ -package nginxdeployment - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NginxPrivateIPAllocationMethod string - -const ( - NginxPrivateIPAllocationMethodDynamic NginxPrivateIPAllocationMethod = "Dynamic" - NginxPrivateIPAllocationMethodStatic NginxPrivateIPAllocationMethod = "Static" -) - -func PossibleValuesForNginxPrivateIPAllocationMethod() []string { - return []string{ - string(NginxPrivateIPAllocationMethodDynamic), - string(NginxPrivateIPAllocationMethodStatic), - } -} - -func (s *NginxPrivateIPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNginxPrivateIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNginxPrivateIPAllocationMethod(input string) (*NginxPrivateIPAllocationMethod, error) { - vals := map[string]NginxPrivateIPAllocationMethod{ - "dynamic": NginxPrivateIPAllocationMethodDynamic, - "static": NginxPrivateIPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NginxPrivateIPAllocationMethod(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateAccepted ProvisioningState = "Accepted" - ProvisioningStateCanceled ProvisioningState = "Canceled" - ProvisioningStateCreating ProvisioningState = "Creating" - ProvisioningStateDeleted ProvisioningState = "Deleted" - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateNotSpecified ProvisioningState = "NotSpecified" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateAccepted), - string(ProvisioningStateCanceled), - string(ProvisioningStateCreating), - string(ProvisioningStateDeleted), - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateNotSpecified), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "accepted": ProvisioningStateAccepted, - "canceled": ProvisioningStateCanceled, - "creating": ProvisioningStateCreating, - "deleted": ProvisioningStateDeleted, - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "notspecified": ProvisioningStateNotSpecified, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxdeploymentproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxdeploymentproperties.go deleted file mode 100644 index 6b389e3d43fb5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxdeploymentproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package nginxdeployment - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NginxDeploymentProperties struct { - AutoUpgradeProfile *AutoUpgradeProfile `json:"autoUpgradeProfile,omitempty"` - EnableDiagnosticsSupport *bool `json:"enableDiagnosticsSupport,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - Logging *NginxLogging `json:"logging,omitempty"` - ManagedResourceGroup *string `json:"managedResourceGroup,omitempty"` - NetworkProfile *NginxNetworkProfile `json:"networkProfile,omitempty"` - NginxVersion *string `json:"nginxVersion,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ScalingProperties *NginxDeploymentScalingProperties `json:"scalingProperties,omitempty"` - UserProfile *NginxDeploymentUserProfile `json:"userProfile,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxdeploymentupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxdeploymentupdateproperties.go deleted file mode 100644 index d7963423da8ec..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxdeploymentupdateproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package nginxdeployment - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NginxDeploymentUpdateProperties struct { - AutoUpgradeProfile *AutoUpgradeProfile `json:"autoUpgradeProfile,omitempty"` - EnableDiagnosticsSupport *bool `json:"enableDiagnosticsSupport,omitempty"` - Logging *NginxLogging `json:"logging,omitempty"` - ScalingProperties *NginxDeploymentScalingProperties `json:"scalingProperties,omitempty"` - UserProfile *NginxDeploymentUserProfile `json:"userProfile,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/version.go deleted file mode 100644 index 573a5620d751e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package nginxdeployment - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2024-01-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nginxdeployment/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/client.go new file mode 100644 index 0000000000000..cc6457e0b0343 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/client.go @@ -0,0 +1,55 @@ +package v2024_06_01_preview + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate" + "github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration" + "github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis" + "github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +type Client struct { + NginxCertificate *nginxcertificate.NginxCertificateClient + NginxConfiguration *nginxconfiguration.NginxConfigurationClient + NginxConfigurationAnalysis *nginxconfigurationanalysis.NginxConfigurationAnalysisClient + NginxDeployment *nginxdeployment.NginxDeploymentClient +} + +func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { + nginxCertificateClient, err := nginxcertificate.NewNginxCertificateClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building NginxCertificate client: %+v", err) + } + configureFunc(nginxCertificateClient.Client) + + nginxConfigurationAnalysisClient, err := nginxconfigurationanalysis.NewNginxConfigurationAnalysisClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building NginxConfigurationAnalysis client: %+v", err) + } + configureFunc(nginxConfigurationAnalysisClient.Client) + + nginxConfigurationClient, err := nginxconfiguration.NewNginxConfigurationClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building NginxConfiguration client: %+v", err) + } + configureFunc(nginxConfigurationClient.Client) + + nginxDeploymentClient, err := nginxdeployment.NewNginxDeploymentClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building NginxDeployment client: %+v", err) + } + configureFunc(nginxDeploymentClient.Client) + + return &Client{ + NginxCertificate: nginxCertificateClient, + NginxConfiguration: nginxConfigurationClient, + NginxConfigurationAnalysis: nginxConfigurationAnalysisClient, + NginxDeployment: nginxDeploymentClient, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/README.md new file mode 100644 index 0000000000000..b96160dec1598 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/README.md @@ -0,0 +1,82 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate` Documentation + +The `nginxcertificate` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2024-06-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate" +``` + + +### Client Initialization + +```go +client := nginxcertificate.NewNginxCertificateClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `NginxCertificateClient.CertificatesCreateOrUpdate` + +```go +ctx := context.TODO() +id := nginxcertificate.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue", "certificateValue") + +payload := nginxcertificate.NginxCertificate{ + // ... +} + + +if err := client.CertificatesCreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `NginxCertificateClient.CertificatesDelete` + +```go +ctx := context.TODO() +id := nginxcertificate.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue", "certificateValue") + +if err := client.CertificatesDeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `NginxCertificateClient.CertificatesGet` + +```go +ctx := context.TODO() +id := nginxcertificate.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue", "certificateValue") + +read, err := client.CertificatesGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `NginxCertificateClient.CertificatesList` + +```go +ctx := context.TODO() +id := nginxcertificate.NewNginxDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue") + +// alternatively `client.CertificatesList(ctx, id)` can be used to do batched pagination +items, err := client.CertificatesListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/id_certificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/id_certificate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/id_certificate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/id_certificate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/id_nginxdeployment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/id_nginxdeployment.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/id_nginxdeployment.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/id_nginxdeployment.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/method_certificatescreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/method_certificatescreateorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/method_certificatescreateorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/method_certificatescreateorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/method_certificatesdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/method_certificatesdelete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/method_certificatesdelete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/method_certificatesdelete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/method_certificatesget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/method_certificatesget.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/method_certificatesget.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/method_certificatesget.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/method_certificateslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/method_certificateslist.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/method_certificateslist.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/method_certificateslist.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/model_nginxcertificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/model_nginxcertificate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/model_nginxcertificate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/model_nginxcertificate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/model_nginxcertificateerrorresponsebody.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/model_nginxcertificateerrorresponsebody.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/model_nginxcertificateerrorresponsebody.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/model_nginxcertificateerrorresponsebody.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/model_nginxcertificateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/model_nginxcertificateproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/model_nginxcertificateproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/model_nginxcertificateproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/version.go new file mode 100644 index 0000000000000..a7cab5e10c6dd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate/version.go @@ -0,0 +1,12 @@ +package nginxcertificate + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-06-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/nginxcertificate/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/README.md new file mode 100644 index 0000000000000..0258d9fb5dcd4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/README.md @@ -0,0 +1,82 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration` Documentation + +The `nginxconfiguration` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2024-06-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration" +``` + + +### Client Initialization + +```go +client := nginxconfiguration.NewNginxConfigurationClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `NginxConfigurationClient.ConfigurationsCreateOrUpdate` + +```go +ctx := context.TODO() +id := nginxconfiguration.NewConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue", "configurationValue") + +payload := nginxconfiguration.NginxConfiguration{ + // ... +} + + +if err := client.ConfigurationsCreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `NginxConfigurationClient.ConfigurationsDelete` + +```go +ctx := context.TODO() +id := nginxconfiguration.NewConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue", "configurationValue") + +if err := client.ConfigurationsDeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `NginxConfigurationClient.ConfigurationsGet` + +```go +ctx := context.TODO() +id := nginxconfiguration.NewConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue", "configurationValue") + +read, err := client.ConfigurationsGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `NginxConfigurationClient.ConfigurationsList` + +```go +ctx := context.TODO() +id := nginxconfiguration.NewNginxDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue") + +// alternatively `client.ConfigurationsList(ctx, id)` can be used to do batched pagination +items, err := client.ConfigurationsListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/id_configuration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/id_configuration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/id_configuration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/id_configuration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/id_nginxdeployment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/id_nginxdeployment.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/id_nginxdeployment.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/id_nginxdeployment.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/method_configurationscreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/method_configurationscreateorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/method_configurationscreateorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/method_configurationscreateorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/method_configurationsdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/method_configurationsdelete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/method_configurationsdelete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/method_configurationsdelete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/method_configurationsget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/method_configurationsget.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/method_configurationsget.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/method_configurationsget.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/method_configurationslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/method_configurationslist.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/method_configurationslist.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/method_configurationslist.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/model_nginxconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/model_nginxconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/model_nginxconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/model_nginxconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/model_nginxconfigurationfile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/model_nginxconfigurationfile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/model_nginxconfigurationfile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/model_nginxconfigurationfile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/model_nginxconfigurationpackage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/model_nginxconfigurationpackage.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/model_nginxconfigurationpackage.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/model_nginxconfigurationpackage.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/model_nginxconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/model_nginxconfigurationproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/model_nginxconfigurationproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/model_nginxconfigurationproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/version.go new file mode 100644 index 0000000000000..3fcb4bfbc88ee --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/version.go @@ -0,0 +1,12 @@ +package nginxconfiguration + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-06-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/nginxconfiguration/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/README.md new file mode 100644 index 0000000000000..959b80f7f26af --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/README.md @@ -0,0 +1,41 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis` Documentation + +The `nginxconfigurationanalysis` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2024-06-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis" +``` + + +### Client Initialization + +```go +client := nginxconfigurationanalysis.NewNginxConfigurationAnalysisClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `NginxConfigurationAnalysisClient.ConfigurationsAnalysis` + +```go +ctx := context.TODO() +id := nginxconfigurationanalysis.NewConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue", "configurationValue") + +payload := nginxconfigurationanalysis.AnalysisCreate{ + // ... +} + + +read, err := client.ConfigurationsAnalysis(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/id_configuration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/id_configuration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/id_configuration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/id_configuration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/method_configurationsanalysis.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/method_configurationsanalysis.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/method_configurationsanalysis.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/method_configurationsanalysis.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/model_analysiscreate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/model_analysiscreate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/model_analysiscreate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/model_analysiscreate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/model_analysiscreateconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/model_analysiscreateconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/model_analysiscreateconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/model_analysiscreateconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/model_analysisdiagnostic.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/model_analysisdiagnostic.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/model_analysisdiagnostic.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/model_analysisdiagnostic.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/model_analysisresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/model_analysisresult.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/model_analysisresult.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/model_analysisresult.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/model_analysisresultdata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/model_analysisresultdata.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/model_analysisresultdata.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/model_analysisresultdata.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/model_nginxconfigurationfile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/model_nginxconfigurationfile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/model_nginxconfigurationfile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/model_nginxconfigurationfile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/model_nginxconfigurationpackage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/model_nginxconfigurationpackage.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/model_nginxconfigurationpackage.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/model_nginxconfigurationpackage.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/version.go new file mode 100644 index 0000000000000..48bdd2a99c397 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/version.go @@ -0,0 +1,12 @@ +package nginxconfigurationanalysis + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-06-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/nginxconfigurationanalysis/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/README.md new file mode 100644 index 0000000000000..41cf55ca837fd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/README.md @@ -0,0 +1,117 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment` Documentation + +The `nginxdeployment` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2024-06-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment" +``` + + +### Client Initialization + +```go +client := nginxdeployment.NewNginxDeploymentClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `NginxDeploymentClient.DeploymentsCreateOrUpdate` + +```go +ctx := context.TODO() +id := nginxdeployment.NewNginxDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue") + +payload := nginxdeployment.NginxDeployment{ + // ... +} + + +if err := client.DeploymentsCreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `NginxDeploymentClient.DeploymentsDelete` + +```go +ctx := context.TODO() +id := nginxdeployment.NewNginxDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue") + +if err := client.DeploymentsDeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `NginxDeploymentClient.DeploymentsGet` + +```go +ctx := context.TODO() +id := nginxdeployment.NewNginxDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue") + +read, err := client.DeploymentsGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `NginxDeploymentClient.DeploymentsList` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.DeploymentsList(ctx, id)` can be used to do batched pagination +items, err := client.DeploymentsListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `NginxDeploymentClient.DeploymentsListByResourceGroup` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.DeploymentsListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.DeploymentsListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `NginxDeploymentClient.DeploymentsUpdate` + +```go +ctx := context.TODO() +id := nginxdeployment.NewNginxDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue") + +payload := nginxdeployment.NginxDeploymentUpdateParameters{ + // ... +} + + +if err := client.DeploymentsUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/constants.go new file mode 100644 index 0000000000000..08865eb91a2aa --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/constants.go @@ -0,0 +1,154 @@ +package nginxdeployment + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ActivationState string + +const ( + ActivationStateDisabled ActivationState = "Disabled" + ActivationStateEnabled ActivationState = "Enabled" +) + +func PossibleValuesForActivationState() []string { + return []string{ + string(ActivationStateDisabled), + string(ActivationStateEnabled), + } +} + +func (s *ActivationState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseActivationState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseActivationState(input string) (*ActivationState, error) { + vals := map[string]ActivationState{ + "disabled": ActivationStateDisabled, + "enabled": ActivationStateEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ActivationState(input) + return &out, nil +} + +type NginxPrivateIPAllocationMethod string + +const ( + NginxPrivateIPAllocationMethodDynamic NginxPrivateIPAllocationMethod = "Dynamic" + NginxPrivateIPAllocationMethodStatic NginxPrivateIPAllocationMethod = "Static" +) + +func PossibleValuesForNginxPrivateIPAllocationMethod() []string { + return []string{ + string(NginxPrivateIPAllocationMethodDynamic), + string(NginxPrivateIPAllocationMethodStatic), + } +} + +func (s *NginxPrivateIPAllocationMethod) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseNginxPrivateIPAllocationMethod(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseNginxPrivateIPAllocationMethod(input string) (*NginxPrivateIPAllocationMethod, error) { + vals := map[string]NginxPrivateIPAllocationMethod{ + "dynamic": NginxPrivateIPAllocationMethodDynamic, + "static": NginxPrivateIPAllocationMethodStatic, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := NginxPrivateIPAllocationMethod(input) + return &out, nil +} + +type ProvisioningState string + +const ( + ProvisioningStateAccepted ProvisioningState = "Accepted" + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateDeleted ProvisioningState = "Deleted" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateNotSpecified ProvisioningState = "NotSpecified" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateAccepted), + string(ProvisioningStateCanceled), + string(ProvisioningStateCreating), + string(ProvisioningStateDeleted), + string(ProvisioningStateDeleting), + string(ProvisioningStateFailed), + string(ProvisioningStateNotSpecified), + string(ProvisioningStateSucceeded), + string(ProvisioningStateUpdating), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "accepted": ProvisioningStateAccepted, + "canceled": ProvisioningStateCanceled, + "creating": ProvisioningStateCreating, + "deleted": ProvisioningStateDeleted, + "deleting": ProvisioningStateDeleting, + "failed": ProvisioningStateFailed, + "notspecified": ProvisioningStateNotSpecified, + "succeeded": ProvisioningStateSucceeded, + "updating": ProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/id_nginxdeployment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/id_nginxdeployment.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/id_nginxdeployment.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/id_nginxdeployment.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/method_deploymentscreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/method_deploymentscreateorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/method_deploymentscreateorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/method_deploymentscreateorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/method_deploymentsdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/method_deploymentsdelete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/method_deploymentsdelete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/method_deploymentsdelete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/method_deploymentsget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/method_deploymentsget.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/method_deploymentsget.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/method_deploymentsget.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/method_deploymentslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/method_deploymentslist.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/method_deploymentslist.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/method_deploymentslist.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/method_deploymentslistbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/method_deploymentslistbyresourcegroup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/method_deploymentslistbyresourcegroup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/method_deploymentslistbyresourcegroup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/method_deploymentsupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/method_deploymentsupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/method_deploymentsupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/method_deploymentsupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_autoupgradeprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_autoupgradeprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_autoupgradeprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_autoupgradeprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxdeployment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxdeployment.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxdeployment.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxdeployment.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxdeploymentproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxdeploymentproperties.go new file mode 100644 index 0000000000000..c89192b332499 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxdeploymentproperties.go @@ -0,0 +1,18 @@ +package nginxdeployment + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxDeploymentProperties struct { + AutoUpgradeProfile *AutoUpgradeProfile `json:"autoUpgradeProfile,omitempty"` + EnableDiagnosticsSupport *bool `json:"enableDiagnosticsSupport,omitempty"` + IPAddress *string `json:"ipAddress,omitempty"` + Logging *NginxLogging `json:"logging,omitempty"` + ManagedResourceGroup *string `json:"managedResourceGroup,omitempty"` + NetworkProfile *NginxNetworkProfile `json:"networkProfile,omitempty"` + NginxAppProtect *NginxDeploymentPropertiesNginxAppProtect `json:"nginxAppProtect,omitempty"` + NginxVersion *string `json:"nginxVersion,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + ScalingProperties *NginxDeploymentScalingProperties `json:"scalingProperties,omitempty"` + UserProfile *NginxDeploymentUserProfile `json:"userProfile,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxdeploymentpropertiesnginxappprotect.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxdeploymentpropertiesnginxappprotect.go new file mode 100644 index 0000000000000..326054a7d1e2a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxdeploymentpropertiesnginxappprotect.go @@ -0,0 +1,9 @@ +package nginxdeployment + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxDeploymentPropertiesNginxAppProtect struct { + WebApplicationFirewallSettings WebApplicationFirewallSettings `json:"webApplicationFirewallSettings"` + WebApplicationFirewallStatus *WebApplicationFirewallStatus `json:"webApplicationFirewallStatus,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxdeploymentscalingproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxdeploymentscalingproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxdeploymentscalingproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxdeploymentscalingproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxdeploymentscalingpropertiesautoscalesettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxdeploymentscalingpropertiesautoscalesettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxdeploymentscalingpropertiesautoscalesettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxdeploymentscalingpropertiesautoscalesettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxdeploymentupdateparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxdeploymentupdateparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxdeploymentupdateparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxdeploymentupdateparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxdeploymentupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxdeploymentupdateproperties.go new file mode 100644 index 0000000000000..837727acbc8b4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxdeploymentupdateproperties.go @@ -0,0 +1,13 @@ +package nginxdeployment + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxDeploymentUpdateProperties struct { + AutoUpgradeProfile *AutoUpgradeProfile `json:"autoUpgradeProfile,omitempty"` + EnableDiagnosticsSupport *bool `json:"enableDiagnosticsSupport,omitempty"` + Logging *NginxLogging `json:"logging,omitempty"` + NginxAppProtect *NginxDeploymentUpdatePropertiesNginxAppProtect `json:"nginxAppProtect,omitempty"` + ScalingProperties *NginxDeploymentScalingProperties `json:"scalingProperties,omitempty"` + UserProfile *NginxDeploymentUserProfile `json:"userProfile,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxdeploymentupdatepropertiesnginxappprotect.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxdeploymentupdatepropertiesnginxappprotect.go new file mode 100644 index 0000000000000..1346c7a9fa97c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxdeploymentupdatepropertiesnginxappprotect.go @@ -0,0 +1,8 @@ +package nginxdeployment + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxDeploymentUpdatePropertiesNginxAppProtect struct { + WebApplicationFirewallSettings *WebApplicationFirewallSettings `json:"webApplicationFirewallSettings,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxdeploymentuserprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxdeploymentuserprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxdeploymentuserprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxdeploymentuserprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxfrontendipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxfrontendipconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxfrontendipconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxfrontendipconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxlogging.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxlogging.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxlogging.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxlogging.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxnetworkinterfaceconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxnetworkinterfaceconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxnetworkinterfaceconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxnetworkinterfaceconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxnetworkprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxnetworkprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxnetworkprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxnetworkprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxprivateipaddress.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxprivateipaddress.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxprivateipaddress.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxprivateipaddress.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxpublicipaddress.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxpublicipaddress.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxpublicipaddress.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxpublicipaddress.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxstorageaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxstorageaccount.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_nginxstorageaccount.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_nginxstorageaccount.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_resourcesku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_resourcesku.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_resourcesku.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_resourcesku.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_scaleprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_scaleprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_scaleprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_scaleprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_scaleprofilecapacity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_scaleprofilecapacity.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/model_scaleprofilecapacity.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_scaleprofilecapacity.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_webapplicationfirewallcomponentversions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_webapplicationfirewallcomponentversions.go new file mode 100644 index 0000000000000..b3a49fdab7967 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_webapplicationfirewallcomponentversions.go @@ -0,0 +1,9 @@ +package nginxdeployment + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WebApplicationFirewallComponentVersions struct { + WafEngineVersion string `json:"wafEngineVersion"` + WafNginxVersion string `json:"wafNginxVersion"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_webapplicationfirewallpackage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_webapplicationfirewallpackage.go new file mode 100644 index 0000000000000..d86fe0ab5880d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_webapplicationfirewallpackage.go @@ -0,0 +1,24 @@ +package nginxdeployment + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WebApplicationFirewallPackage struct { + RevisionDatetime string `json:"revisionDatetime"` + Version string `json:"version"` +} + +func (o *WebApplicationFirewallPackage) GetRevisionDatetimeAsTime() (*time.Time, error) { + return dates.ParseAsFormat(&o.RevisionDatetime, "2006-01-02T15:04:05Z07:00") +} + +func (o *WebApplicationFirewallPackage) SetRevisionDatetimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.RevisionDatetime = formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_webapplicationfirewallsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_webapplicationfirewallsettings.go new file mode 100644 index 0000000000000..5fef9fad979a0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_webapplicationfirewallsettings.go @@ -0,0 +1,8 @@ +package nginxdeployment + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WebApplicationFirewallSettings struct { + ActivationState *ActivationState `json:"activationState,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_webapplicationfirewallstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_webapplicationfirewallstatus.go new file mode 100644 index 0000000000000..923f4f159dbc7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/model_webapplicationfirewallstatus.go @@ -0,0 +1,11 @@ +package nginxdeployment + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WebApplicationFirewallStatus struct { + AttackSignaturesPackage *WebApplicationFirewallPackage `json:"attackSignaturesPackage,omitempty"` + BotSignaturesPackage *WebApplicationFirewallPackage `json:"botSignaturesPackage,omitempty"` + ComponentVersions *WebApplicationFirewallComponentVersions `json:"componentVersions,omitempty"` + ThreatCampaignsPackage *WebApplicationFirewallPackage `json:"threatCampaignsPackage,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/version.go new file mode 100644 index 0000000000000..821a4a635efe3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment/version.go @@ -0,0 +1,12 @@ +package nginxdeployment + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-06-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/nginxdeployment/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/README.md deleted file mode 100644 index 78913c5e04749..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/README.md +++ /dev/null @@ -1,41 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates` Documentation - -The `vaultcertificates` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2022-10-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates" -``` - - -### Client Initialization - -```go -client := vaultcertificates.NewVaultCertificatesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VaultCertificatesClient.Create` - -```go -ctx := context.TODO() -id := vaultcertificates.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "certificateValue") - -payload := vaultcertificates.CertificateRequest{ - // ... -} - - -read, err := client.Create(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/version.go deleted file mode 100644 index 3d0b3772124b8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package vaultcertificates - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-10-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vaultcertificates/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/README.md new file mode 100644 index 0000000000000..ab60878eff125 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/README.md @@ -0,0 +1,41 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates` Documentation + +The `vaultcertificates` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-04-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates" +``` + + +### Client Initialization + +```go +client := vaultcertificates.NewVaultCertificatesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `VaultCertificatesClient.Create` + +```go +ctx := context.TODO() +id := vaultcertificates.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "certificateValue") + +payload := vaultcertificates.CertificateRequest{ + // ... +} + + +read, err := client.Create(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/id_certificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/id_certificate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/id_certificate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/id_certificate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_certificaterequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_certificaterequest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_certificaterequest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_certificaterequest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_rawcertificatedata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_rawcertificatedata.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_rawcertificatedata.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_rawcertificatedata.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_resourcecertificateandaaddetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_resourcecertificateandaaddetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_resourcecertificateandaaddetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_resourcecertificateandaaddetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_resourcecertificateandacsdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_resourcecertificateandacsdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_resourcecertificateandacsdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_resourcecertificateandacsdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_resourcecertificatedetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_resourcecertificatedetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_resourcecertificatedetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_resourcecertificatedetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_vaultcertificateresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_vaultcertificateresponse.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_vaultcertificateresponse.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_vaultcertificateresponse.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/version.go new file mode 100644 index 0000000000000..1b2b2c0b44b85 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates/version.go @@ -0,0 +1,12 @@ +package vaultcertificates + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-04-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/vaultcertificates/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/README.md deleted file mode 100644 index 1fb07e09e880f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/README.md +++ /dev/null @@ -1,152 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics` Documentation - -The `replicationfabrics` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics" -``` - - -### Client Initialization - -```go -client := replicationfabrics.NewReplicationFabricsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ReplicationFabricsClient.CheckConsistency` - -```go -ctx := context.TODO() -id := replicationfabrics.NewReplicationFabricID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue") - -if err := client.CheckConsistencyThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationFabricsClient.Create` - -```go -ctx := context.TODO() -id := replicationfabrics.NewReplicationFabricID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue") - -payload := replicationfabrics.FabricCreationInput{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationFabricsClient.Delete` - -```go -ctx := context.TODO() -id := replicationfabrics.NewReplicationFabricID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationFabricsClient.Get` - -```go -ctx := context.TODO() -id := replicationfabrics.NewReplicationFabricID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue") - -read, err := client.Get(ctx, id, replicationfabrics.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ReplicationFabricsClient.List` - -```go -ctx := context.TODO() -id := replicationfabrics.NewVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ReplicationFabricsClient.MigrateToAad` - -```go -ctx := context.TODO() -id := replicationfabrics.NewReplicationFabricID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue") - -if err := client.MigrateToAadThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationFabricsClient.Purge` - -```go -ctx := context.TODO() -id := replicationfabrics.NewReplicationFabricID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue") - -if err := client.PurgeThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationFabricsClient.ReassociateGateway` - -```go -ctx := context.TODO() -id := replicationfabrics.NewReplicationFabricID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue") - -payload := replicationfabrics.FailoverProcessServerRequest{ - // ... -} - - -if err := client.ReassociateGatewayThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationFabricsClient.RenewCertificate` - -```go -ctx := context.TODO() -id := replicationfabrics.NewReplicationFabricID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue") - -payload := replicationfabrics.RenewCertificateInput{ - // ... -} - - -if err := client.RenewCertificateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_azurefabricspecificdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_azurefabricspecificdetails.go deleted file mode 100644 index ddccad4b47882..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_azurefabricspecificdetails.go +++ /dev/null @@ -1,44 +0,0 @@ -package replicationfabrics - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ FabricSpecificDetails = AzureFabricSpecificDetails{} - -type AzureFabricSpecificDetails struct { - ContainerIds *[]string `json:"containerIds,omitempty"` - ExtendedLocations *[]A2AExtendedLocationDetails `json:"extendedLocations,omitempty"` - Location *string `json:"location,omitempty"` - Zones *[]A2AZoneDetails `json:"zones,omitempty"` - - // Fields inherited from FabricSpecificDetails -} - -var _ json.Marshaler = AzureFabricSpecificDetails{} - -func (s AzureFabricSpecificDetails) MarshalJSON() ([]byte, error) { - type wrapper AzureFabricSpecificDetails - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AzureFabricSpecificDetails: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AzureFabricSpecificDetails: %+v", err) - } - decoded["instanceType"] = "Azure" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AzureFabricSpecificDetails: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/version.go deleted file mode 100644 index 4e112c3015ee3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package replicationfabrics - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-10-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationfabrics/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/README.md deleted file mode 100644 index 5e945736182ec..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/README.md +++ /dev/null @@ -1,116 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings` Documentation - -The `replicationnetworkmappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings" -``` - - -### Client Initialization - -```go -client := replicationnetworkmappings.NewReplicationNetworkMappingsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ReplicationNetworkMappingsClient.Create` - -```go -ctx := context.TODO() -id := replicationnetworkmappings.NewReplicationNetworkMappingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationNetworkValue", "replicationNetworkMappingValue") - -payload := replicationnetworkmappings.CreateNetworkMappingInput{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationNetworkMappingsClient.Delete` - -```go -ctx := context.TODO() -id := replicationnetworkmappings.NewReplicationNetworkMappingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationNetworkValue", "replicationNetworkMappingValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationNetworkMappingsClient.Get` - -```go -ctx := context.TODO() -id := replicationnetworkmappings.NewReplicationNetworkMappingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationNetworkValue", "replicationNetworkMappingValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ReplicationNetworkMappingsClient.List` - -```go -ctx := context.TODO() -id := replicationnetworkmappings.NewVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ReplicationNetworkMappingsClient.ListByReplicationNetworks` - -```go -ctx := context.TODO() -id := replicationnetworkmappings.NewReplicationNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationNetworkValue") - -// alternatively `client.ListByReplicationNetworks(ctx, id)` can be used to do batched pagination -items, err := client.ListByReplicationNetworksComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ReplicationNetworkMappingsClient.Update` - -```go -ctx := context.TODO() -id := replicationnetworkmappings.NewReplicationNetworkMappingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationNetworkValue", "replicationNetworkMappingValue") - -payload := replicationnetworkmappings.UpdateNetworkMappingInput{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/version.go deleted file mode 100644 index b974dd5265a72..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package replicationnetworkmappings - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-10-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationnetworkmappings/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/README.md deleted file mode 100644 index b456770604c22..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/README.md +++ /dev/null @@ -1,70 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks` Documentation - -The `replicationnetworks` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks" -``` - - -### Client Initialization - -```go -client := replicationnetworks.NewReplicationNetworksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ReplicationNetworksClient.Get` - -```go -ctx := context.TODO() -id := replicationnetworks.NewReplicationNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationNetworkValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ReplicationNetworksClient.List` - -```go -ctx := context.TODO() -id := replicationnetworks.NewVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ReplicationNetworksClient.ListByReplicationFabrics` - -```go -ctx := context.TODO() -id := replicationnetworks.NewReplicationFabricID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue") - -// alternatively `client.ListByReplicationFabrics(ctx, id)` can be used to do batched pagination -items, err := client.ListByReplicationFabricsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/version.go deleted file mode 100644 index 414d543ac3c25..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package replicationnetworks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-10-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationnetworks/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/README.md deleted file mode 100644 index 79f08863b14dc..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/README.md +++ /dev/null @@ -1,99 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies` Documentation - -The `replicationpolicies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies" -``` - - -### Client Initialization - -```go -client := replicationpolicies.NewReplicationPoliciesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ReplicationPoliciesClient.Create` - -```go -ctx := context.TODO() -id := replicationpolicies.NewReplicationPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationPolicyValue") - -payload := replicationpolicies.CreatePolicyInput{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationPoliciesClient.Delete` - -```go -ctx := context.TODO() -id := replicationpolicies.NewReplicationPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationPolicyValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationPoliciesClient.Get` - -```go -ctx := context.TODO() -id := replicationpolicies.NewReplicationPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationPolicyValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ReplicationPoliciesClient.List` - -```go -ctx := context.TODO() -id := replicationpolicies.NewVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ReplicationPoliciesClient.Update` - -```go -ctx := context.TODO() -id := replicationpolicies.NewReplicationPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationPolicyValue") - -payload := replicationpolicies.UpdatePolicyInput{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/version.go deleted file mode 100644 index 78e2bf24135a6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package replicationpolicies - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-10-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationpolicies/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/README.md deleted file mode 100644 index 082404d75162c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/README.md +++ /dev/null @@ -1,373 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems` Documentation - -The `replicationprotecteditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems" -``` - - -### Client Initialization - -```go -client := replicationprotecteditems.NewReplicationProtectedItemsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ReplicationProtectedItemsClient.AddDisks` - -```go -ctx := context.TODO() -id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") - -payload := replicationprotecteditems.AddDisksInput{ - // ... -} - - -if err := client.AddDisksThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationProtectedItemsClient.ApplyRecoveryPoint` - -```go -ctx := context.TODO() -id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") - -payload := replicationprotecteditems.ApplyRecoveryPointInput{ - // ... -} - - -if err := client.ApplyRecoveryPointThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationProtectedItemsClient.Create` - -```go -ctx := context.TODO() -id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") - -payload := replicationprotecteditems.EnableProtectionInput{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationProtectedItemsClient.Delete` - -```go -ctx := context.TODO() -id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") - -payload := replicationprotecteditems.DisableProtectionInput{ - // ... -} - - -if err := client.DeleteThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationProtectedItemsClient.FailoverCancel` - -```go -ctx := context.TODO() -id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") - -if err := client.FailoverCancelThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationProtectedItemsClient.FailoverCommit` - -```go -ctx := context.TODO() -id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") - -if err := client.FailoverCommitThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationProtectedItemsClient.Get` - -```go -ctx := context.TODO() -id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ReplicationProtectedItemsClient.List` - -```go -ctx := context.TODO() -id := replicationprotecteditems.NewVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue") - -// alternatively `client.List(ctx, id, replicationprotecteditems.DefaultListOperationOptions())` can be used to do batched pagination -items, err := client.ListComplete(ctx, id, replicationprotecteditems.DefaultListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ReplicationProtectedItemsClient.ListByReplicationProtectionContainers` - -```go -ctx := context.TODO() -id := replicationprotecteditems.NewReplicationProtectionContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue") - -// alternatively `client.ListByReplicationProtectionContainers(ctx, id)` can be used to do batched pagination -items, err := client.ListByReplicationProtectionContainersComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ReplicationProtectedItemsClient.PlannedFailover` - -```go -ctx := context.TODO() -id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") - -payload := replicationprotecteditems.PlannedFailoverInput{ - // ... -} - - -if err := client.PlannedFailoverThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationProtectedItemsClient.Purge` - -```go -ctx := context.TODO() -id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") - -if err := client.PurgeThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationProtectedItemsClient.RemoveDisks` - -```go -ctx := context.TODO() -id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") - -payload := replicationprotecteditems.RemoveDisksInput{ - // ... -} - - -if err := client.RemoveDisksThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationProtectedItemsClient.RepairReplication` - -```go -ctx := context.TODO() -id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") - -if err := client.RepairReplicationThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationProtectedItemsClient.Reprotect` - -```go -ctx := context.TODO() -id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") - -payload := replicationprotecteditems.ReverseReplicationInput{ - // ... -} - - -if err := client.ReprotectThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationProtectedItemsClient.ResolveHealthErrors` - -```go -ctx := context.TODO() -id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") - -payload := replicationprotecteditems.ResolveHealthInput{ - // ... -} - - -if err := client.ResolveHealthErrorsThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationProtectedItemsClient.SwitchProvider` - -```go -ctx := context.TODO() -id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") - -payload := replicationprotecteditems.SwitchProviderInput{ - // ... -} - - -if err := client.SwitchProviderThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationProtectedItemsClient.TestFailover` - -```go -ctx := context.TODO() -id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") - -payload := replicationprotecteditems.TestFailoverInput{ - // ... -} - - -if err := client.TestFailoverThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationProtectedItemsClient.TestFailoverCleanup` - -```go -ctx := context.TODO() -id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") - -payload := replicationprotecteditems.TestFailoverCleanupInput{ - // ... -} - - -if err := client.TestFailoverCleanupThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationProtectedItemsClient.UnplannedFailover` - -```go -ctx := context.TODO() -id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") - -payload := replicationprotecteditems.UnplannedFailoverInput{ - // ... -} - - -if err := client.UnplannedFailoverThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationProtectedItemsClient.Update` - -```go -ctx := context.TODO() -id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") - -payload := replicationprotecteditems.UpdateReplicationProtectedItemInput{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationProtectedItemsClient.UpdateAppliance` - -```go -ctx := context.TODO() -id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") - -payload := replicationprotecteditems.UpdateApplianceForReplicationProtectedItemInput{ - // ... -} - - -if err := client.UpdateApplianceThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationProtectedItemsClient.UpdateMobilityService` - -```go -ctx := context.TODO() -id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") - -payload := replicationprotecteditems.UpdateMobilityServiceRequest{ - // ... -} - - -if err := client.UpdateMobilityServiceThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/constants.go deleted file mode 100644 index a2f70e2b399d0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/constants.go +++ /dev/null @@ -1,791 +0,0 @@ -package replicationprotecteditems - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AgentUpgradeBlockedReason string - -const ( - AgentUpgradeBlockedReasonAgentNoHeartbeat AgentUpgradeBlockedReason = "AgentNoHeartbeat" - AgentUpgradeBlockedReasonAlreadyOnLatestVersion AgentUpgradeBlockedReason = "AlreadyOnLatestVersion" - AgentUpgradeBlockedReasonDistroIsNotReported AgentUpgradeBlockedReason = "DistroIsNotReported" - AgentUpgradeBlockedReasonDistroNotSupportedForUpgrade AgentUpgradeBlockedReason = "DistroNotSupportedForUpgrade" - AgentUpgradeBlockedReasonIncompatibleApplianceVersion AgentUpgradeBlockedReason = "IncompatibleApplianceVersion" - AgentUpgradeBlockedReasonInvalidAgentVersion AgentUpgradeBlockedReason = "InvalidAgentVersion" - AgentUpgradeBlockedReasonInvalidDriverVersion AgentUpgradeBlockedReason = "InvalidDriverVersion" - AgentUpgradeBlockedReasonMissingUpgradePath AgentUpgradeBlockedReason = "MissingUpgradePath" - AgentUpgradeBlockedReasonNotProtected AgentUpgradeBlockedReason = "NotProtected" - AgentUpgradeBlockedReasonProcessServerNoHeartbeat AgentUpgradeBlockedReason = "ProcessServerNoHeartbeat" - AgentUpgradeBlockedReasonRcmProxyNoHeartbeat AgentUpgradeBlockedReason = "RcmProxyNoHeartbeat" - AgentUpgradeBlockedReasonRebootRequired AgentUpgradeBlockedReason = "RebootRequired" - AgentUpgradeBlockedReasonUnknown AgentUpgradeBlockedReason = "Unknown" - AgentUpgradeBlockedReasonUnsupportedProtectionScenario AgentUpgradeBlockedReason = "UnsupportedProtectionScenario" -) - -func PossibleValuesForAgentUpgradeBlockedReason() []string { - return []string{ - string(AgentUpgradeBlockedReasonAgentNoHeartbeat), - string(AgentUpgradeBlockedReasonAlreadyOnLatestVersion), - string(AgentUpgradeBlockedReasonDistroIsNotReported), - string(AgentUpgradeBlockedReasonDistroNotSupportedForUpgrade), - string(AgentUpgradeBlockedReasonIncompatibleApplianceVersion), - string(AgentUpgradeBlockedReasonInvalidAgentVersion), - string(AgentUpgradeBlockedReasonInvalidDriverVersion), - string(AgentUpgradeBlockedReasonMissingUpgradePath), - string(AgentUpgradeBlockedReasonNotProtected), - string(AgentUpgradeBlockedReasonProcessServerNoHeartbeat), - string(AgentUpgradeBlockedReasonRcmProxyNoHeartbeat), - string(AgentUpgradeBlockedReasonRebootRequired), - string(AgentUpgradeBlockedReasonUnknown), - string(AgentUpgradeBlockedReasonUnsupportedProtectionScenario), - } -} - -func (s *AgentUpgradeBlockedReason) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAgentUpgradeBlockedReason(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAgentUpgradeBlockedReason(input string) (*AgentUpgradeBlockedReason, error) { - vals := map[string]AgentUpgradeBlockedReason{ - "agentnoheartbeat": AgentUpgradeBlockedReasonAgentNoHeartbeat, - "alreadyonlatestversion": AgentUpgradeBlockedReasonAlreadyOnLatestVersion, - "distroisnotreported": AgentUpgradeBlockedReasonDistroIsNotReported, - "distronotsupportedforupgrade": AgentUpgradeBlockedReasonDistroNotSupportedForUpgrade, - "incompatibleapplianceversion": AgentUpgradeBlockedReasonIncompatibleApplianceVersion, - "invalidagentversion": AgentUpgradeBlockedReasonInvalidAgentVersion, - "invaliddriverversion": AgentUpgradeBlockedReasonInvalidDriverVersion, - "missingupgradepath": AgentUpgradeBlockedReasonMissingUpgradePath, - "notprotected": AgentUpgradeBlockedReasonNotProtected, - "processservernoheartbeat": AgentUpgradeBlockedReasonProcessServerNoHeartbeat, - "rcmproxynoheartbeat": AgentUpgradeBlockedReasonRcmProxyNoHeartbeat, - "rebootrequired": AgentUpgradeBlockedReasonRebootRequired, - "unknown": AgentUpgradeBlockedReasonUnknown, - "unsupportedprotectionscenario": AgentUpgradeBlockedReasonUnsupportedProtectionScenario, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AgentUpgradeBlockedReason(input) - return &out, nil -} - -type AutoProtectionOfDataDisk string - -const ( - AutoProtectionOfDataDiskDisabled AutoProtectionOfDataDisk = "Disabled" - AutoProtectionOfDataDiskEnabled AutoProtectionOfDataDisk = "Enabled" -) - -func PossibleValuesForAutoProtectionOfDataDisk() []string { - return []string{ - string(AutoProtectionOfDataDiskDisabled), - string(AutoProtectionOfDataDiskEnabled), - } -} - -func (s *AutoProtectionOfDataDisk) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAutoProtectionOfDataDisk(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAutoProtectionOfDataDisk(input string) (*AutoProtectionOfDataDisk, error) { - vals := map[string]AutoProtectionOfDataDisk{ - "disabled": AutoProtectionOfDataDiskDisabled, - "enabled": AutoProtectionOfDataDiskEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AutoProtectionOfDataDisk(input) - return &out, nil -} - -type DisableProtectionReason string - -const ( - DisableProtectionReasonMigrationComplete DisableProtectionReason = "MigrationComplete" - DisableProtectionReasonNotSpecified DisableProtectionReason = "NotSpecified" -) - -func PossibleValuesForDisableProtectionReason() []string { - return []string{ - string(DisableProtectionReasonMigrationComplete), - string(DisableProtectionReasonNotSpecified), - } -} - -func (s *DisableProtectionReason) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDisableProtectionReason(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDisableProtectionReason(input string) (*DisableProtectionReason, error) { - vals := map[string]DisableProtectionReason{ - "migrationcomplete": DisableProtectionReasonMigrationComplete, - "notspecified": DisableProtectionReasonNotSpecified, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DisableProtectionReason(input) - return &out, nil -} - -type DiskAccountType string - -const ( - DiskAccountTypePremiumLRS DiskAccountType = "Premium_LRS" - DiskAccountTypeStandardLRS DiskAccountType = "Standard_LRS" - DiskAccountTypeStandardSSDLRS DiskAccountType = "StandardSSD_LRS" -) - -func PossibleValuesForDiskAccountType() []string { - return []string{ - string(DiskAccountTypePremiumLRS), - string(DiskAccountTypeStandardLRS), - string(DiskAccountTypeStandardSSDLRS), - } -} - -func (s *DiskAccountType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDiskAccountType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDiskAccountType(input string) (*DiskAccountType, error) { - vals := map[string]DiskAccountType{ - "premium_lrs": DiskAccountTypePremiumLRS, - "standard_lrs": DiskAccountTypeStandardLRS, - "standardssd_lrs": DiskAccountTypeStandardSSDLRS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DiskAccountType(input) - return &out, nil -} - -type DiskReplicationProgressHealth string - -const ( - DiskReplicationProgressHealthInProgress DiskReplicationProgressHealth = "InProgress" - DiskReplicationProgressHealthNoProgress DiskReplicationProgressHealth = "NoProgress" - DiskReplicationProgressHealthNone DiskReplicationProgressHealth = "None" - DiskReplicationProgressHealthQueued DiskReplicationProgressHealth = "Queued" - DiskReplicationProgressHealthSlowProgress DiskReplicationProgressHealth = "SlowProgress" -) - -func PossibleValuesForDiskReplicationProgressHealth() []string { - return []string{ - string(DiskReplicationProgressHealthInProgress), - string(DiskReplicationProgressHealthNoProgress), - string(DiskReplicationProgressHealthNone), - string(DiskReplicationProgressHealthQueued), - string(DiskReplicationProgressHealthSlowProgress), - } -} - -func (s *DiskReplicationProgressHealth) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDiskReplicationProgressHealth(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDiskReplicationProgressHealth(input string) (*DiskReplicationProgressHealth, error) { - vals := map[string]DiskReplicationProgressHealth{ - "inprogress": DiskReplicationProgressHealthInProgress, - "noprogress": DiskReplicationProgressHealthNoProgress, - "none": DiskReplicationProgressHealthNone, - "queued": DiskReplicationProgressHealthQueued, - "slowprogress": DiskReplicationProgressHealthSlowProgress, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DiskReplicationProgressHealth(input) - return &out, nil -} - -type EthernetAddressType string - -const ( - EthernetAddressTypeDynamic EthernetAddressType = "Dynamic" - EthernetAddressTypeStatic EthernetAddressType = "Static" -) - -func PossibleValuesForEthernetAddressType() []string { - return []string{ - string(EthernetAddressTypeDynamic), - string(EthernetAddressTypeStatic), - } -} - -func (s *EthernetAddressType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEthernetAddressType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEthernetAddressType(input string) (*EthernetAddressType, error) { - vals := map[string]EthernetAddressType{ - "dynamic": EthernetAddressTypeDynamic, - "static": EthernetAddressTypeStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EthernetAddressType(input) - return &out, nil -} - -type HealthErrorCustomerResolvability string - -const ( - HealthErrorCustomerResolvabilityAllowed HealthErrorCustomerResolvability = "Allowed" - HealthErrorCustomerResolvabilityNotAllowed HealthErrorCustomerResolvability = "NotAllowed" -) - -func PossibleValuesForHealthErrorCustomerResolvability() []string { - return []string{ - string(HealthErrorCustomerResolvabilityAllowed), - string(HealthErrorCustomerResolvabilityNotAllowed), - } -} - -func (s *HealthErrorCustomerResolvability) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseHealthErrorCustomerResolvability(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseHealthErrorCustomerResolvability(input string) (*HealthErrorCustomerResolvability, error) { - vals := map[string]HealthErrorCustomerResolvability{ - "allowed": HealthErrorCustomerResolvabilityAllowed, - "notallowed": HealthErrorCustomerResolvabilityNotAllowed, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := HealthErrorCustomerResolvability(input) - return &out, nil -} - -type InMageRcmFailbackRecoveryPointType string - -const ( - InMageRcmFailbackRecoveryPointTypeApplicationConsistent InMageRcmFailbackRecoveryPointType = "ApplicationConsistent" - InMageRcmFailbackRecoveryPointTypeCrashConsistent InMageRcmFailbackRecoveryPointType = "CrashConsistent" -) - -func PossibleValuesForInMageRcmFailbackRecoveryPointType() []string { - return []string{ - string(InMageRcmFailbackRecoveryPointTypeApplicationConsistent), - string(InMageRcmFailbackRecoveryPointTypeCrashConsistent), - } -} - -func (s *InMageRcmFailbackRecoveryPointType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseInMageRcmFailbackRecoveryPointType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseInMageRcmFailbackRecoveryPointType(input string) (*InMageRcmFailbackRecoveryPointType, error) { - vals := map[string]InMageRcmFailbackRecoveryPointType{ - "applicationconsistent": InMageRcmFailbackRecoveryPointTypeApplicationConsistent, - "crashconsistent": InMageRcmFailbackRecoveryPointTypeCrashConsistent, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := InMageRcmFailbackRecoveryPointType(input) - return &out, nil -} - -type LicenseType string - -const ( - LicenseTypeNoLicenseType LicenseType = "NoLicenseType" - LicenseTypeNotSpecified LicenseType = "NotSpecified" - LicenseTypeWindowsServer LicenseType = "WindowsServer" -) - -func PossibleValuesForLicenseType() []string { - return []string{ - string(LicenseTypeNoLicenseType), - string(LicenseTypeNotSpecified), - string(LicenseTypeWindowsServer), - } -} - -func (s *LicenseType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLicenseType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLicenseType(input string) (*LicenseType, error) { - vals := map[string]LicenseType{ - "nolicensetype": LicenseTypeNoLicenseType, - "notspecified": LicenseTypeNotSpecified, - "windowsserver": LicenseTypeWindowsServer, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LicenseType(input) - return &out, nil -} - -type MobilityAgentUpgradeState string - -const ( - MobilityAgentUpgradeStateCommit MobilityAgentUpgradeState = "Commit" - MobilityAgentUpgradeStateCompleted MobilityAgentUpgradeState = "Completed" - MobilityAgentUpgradeStateNone MobilityAgentUpgradeState = "None" - MobilityAgentUpgradeStateStarted MobilityAgentUpgradeState = "Started" -) - -func PossibleValuesForMobilityAgentUpgradeState() []string { - return []string{ - string(MobilityAgentUpgradeStateCommit), - string(MobilityAgentUpgradeStateCompleted), - string(MobilityAgentUpgradeStateNone), - string(MobilityAgentUpgradeStateStarted), - } -} - -func (s *MobilityAgentUpgradeState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMobilityAgentUpgradeState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMobilityAgentUpgradeState(input string) (*MobilityAgentUpgradeState, error) { - vals := map[string]MobilityAgentUpgradeState{ - "commit": MobilityAgentUpgradeStateCommit, - "completed": MobilityAgentUpgradeStateCompleted, - "none": MobilityAgentUpgradeStateNone, - "started": MobilityAgentUpgradeStateStarted, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MobilityAgentUpgradeState(input) - return &out, nil -} - -type MultiVMGroupCreateOption string - -const ( - MultiVMGroupCreateOptionAutoCreated MultiVMGroupCreateOption = "AutoCreated" - MultiVMGroupCreateOptionUserSpecified MultiVMGroupCreateOption = "UserSpecified" -) - -func PossibleValuesForMultiVMGroupCreateOption() []string { - return []string{ - string(MultiVMGroupCreateOptionAutoCreated), - string(MultiVMGroupCreateOptionUserSpecified), - } -} - -func (s *MultiVMGroupCreateOption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMultiVMGroupCreateOption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMultiVMGroupCreateOption(input string) (*MultiVMGroupCreateOption, error) { - vals := map[string]MultiVMGroupCreateOption{ - "autocreated": MultiVMGroupCreateOptionAutoCreated, - "userspecified": MultiVMGroupCreateOptionUserSpecified, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MultiVMGroupCreateOption(input) - return &out, nil -} - -type PlannedFailoverStatus string - -const ( - PlannedFailoverStatusCancelled PlannedFailoverStatus = "Cancelled" - PlannedFailoverStatusFailed PlannedFailoverStatus = "Failed" - PlannedFailoverStatusSucceeded PlannedFailoverStatus = "Succeeded" - PlannedFailoverStatusUnknown PlannedFailoverStatus = "Unknown" -) - -func PossibleValuesForPlannedFailoverStatus() []string { - return []string{ - string(PlannedFailoverStatusCancelled), - string(PlannedFailoverStatusFailed), - string(PlannedFailoverStatusSucceeded), - string(PlannedFailoverStatusUnknown), - } -} - -func (s *PlannedFailoverStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePlannedFailoverStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePlannedFailoverStatus(input string) (*PlannedFailoverStatus, error) { - vals := map[string]PlannedFailoverStatus{ - "cancelled": PlannedFailoverStatusCancelled, - "failed": PlannedFailoverStatusFailed, - "succeeded": PlannedFailoverStatusSucceeded, - "unknown": PlannedFailoverStatusUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PlannedFailoverStatus(input) - return &out, nil -} - -type RecoveryPointType string - -const ( - RecoveryPointTypeCustom RecoveryPointType = "Custom" - RecoveryPointTypeLatestTag RecoveryPointType = "LatestTag" - RecoveryPointTypeLatestTime RecoveryPointType = "LatestTime" -) - -func PossibleValuesForRecoveryPointType() []string { - return []string{ - string(RecoveryPointTypeCustom), - string(RecoveryPointTypeLatestTag), - string(RecoveryPointTypeLatestTime), - } -} - -func (s *RecoveryPointType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRecoveryPointType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRecoveryPointType(input string) (*RecoveryPointType, error) { - vals := map[string]RecoveryPointType{ - "custom": RecoveryPointTypeCustom, - "latesttag": RecoveryPointTypeLatestTag, - "latesttime": RecoveryPointTypeLatestTime, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RecoveryPointType(input) - return &out, nil -} - -type ResyncState string - -const ( - ResyncStateNone ResyncState = "None" - ResyncStatePreparedForResynchronization ResyncState = "PreparedForResynchronization" - ResyncStateStartedResynchronization ResyncState = "StartedResynchronization" -) - -func PossibleValuesForResyncState() []string { - return []string{ - string(ResyncStateNone), - string(ResyncStatePreparedForResynchronization), - string(ResyncStateStartedResynchronization), - } -} - -func (s *ResyncState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseResyncState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseResyncState(input string) (*ResyncState, error) { - vals := map[string]ResyncState{ - "none": ResyncStateNone, - "preparedforresynchronization": ResyncStatePreparedForResynchronization, - "startedresynchronization": ResyncStateStartedResynchronization, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ResyncState(input) - return &out, nil -} - -type SqlServerLicenseType string - -const ( - SqlServerLicenseTypeAHUB SqlServerLicenseType = "AHUB" - SqlServerLicenseTypeNoLicenseType SqlServerLicenseType = "NoLicenseType" - SqlServerLicenseTypeNotSpecified SqlServerLicenseType = "NotSpecified" - SqlServerLicenseTypePAYG SqlServerLicenseType = "PAYG" -) - -func PossibleValuesForSqlServerLicenseType() []string { - return []string{ - string(SqlServerLicenseTypeAHUB), - string(SqlServerLicenseTypeNoLicenseType), - string(SqlServerLicenseTypeNotSpecified), - string(SqlServerLicenseTypePAYG), - } -} - -func (s *SqlServerLicenseType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlServerLicenseType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlServerLicenseType(input string) (*SqlServerLicenseType, error) { - vals := map[string]SqlServerLicenseType{ - "ahub": SqlServerLicenseTypeAHUB, - "nolicensetype": SqlServerLicenseTypeNoLicenseType, - "notspecified": SqlServerLicenseTypeNotSpecified, - "payg": SqlServerLicenseTypePAYG, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlServerLicenseType(input) - return &out, nil -} - -type VMEncryptionType string - -const ( - VMEncryptionTypeNotEncrypted VMEncryptionType = "NotEncrypted" - VMEncryptionTypeOnePassEncrypted VMEncryptionType = "OnePassEncrypted" - VMEncryptionTypeTwoPassEncrypted VMEncryptionType = "TwoPassEncrypted" -) - -func PossibleValuesForVMEncryptionType() []string { - return []string{ - string(VMEncryptionTypeNotEncrypted), - string(VMEncryptionTypeOnePassEncrypted), - string(VMEncryptionTypeTwoPassEncrypted), - } -} - -func (s *VMEncryptionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVMEncryptionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVMEncryptionType(input string) (*VMEncryptionType, error) { - vals := map[string]VMEncryptionType{ - "notencrypted": VMEncryptionTypeNotEncrypted, - "onepassencrypted": VMEncryptionTypeOnePassEncrypted, - "twopassencrypted": VMEncryptionTypeTwoPassEncrypted, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VMEncryptionType(input) - return &out, nil -} - -type VMReplicationProgressHealth string - -const ( - VMReplicationProgressHealthInProgress VMReplicationProgressHealth = "InProgress" - VMReplicationProgressHealthNoProgress VMReplicationProgressHealth = "NoProgress" - VMReplicationProgressHealthNone VMReplicationProgressHealth = "None" - VMReplicationProgressHealthSlowProgress VMReplicationProgressHealth = "SlowProgress" -) - -func PossibleValuesForVMReplicationProgressHealth() []string { - return []string{ - string(VMReplicationProgressHealthInProgress), - string(VMReplicationProgressHealthNoProgress), - string(VMReplicationProgressHealthNone), - string(VMReplicationProgressHealthSlowProgress), - } -} - -func (s *VMReplicationProgressHealth) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVMReplicationProgressHealth(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVMReplicationProgressHealth(input string) (*VMReplicationProgressHealth, error) { - vals := map[string]VMReplicationProgressHealth{ - "inprogress": VMReplicationProgressHealthInProgress, - "noprogress": VMReplicationProgressHealthNoProgress, - "none": VMReplicationProgressHealthNone, - "slowprogress": VMReplicationProgressHealthSlowProgress, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VMReplicationProgressHealth(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazuremanageddiskdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazuremanageddiskdetails.go deleted file mode 100644 index b4d03b24573bc..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazuremanageddiskdetails.go +++ /dev/null @@ -1,11 +0,0 @@ -package replicationprotecteditems - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HyperVReplicaAzureManagedDiskDetails struct { - DiskEncryptionSetId *string `json:"diskEncryptionSetId,omitempty"` - DiskId *string `json:"diskId,omitempty"` - ReplicaDiskType *string `json:"replicaDiskType,omitempty"` - SeedManagedDiskId *string `json:"seedManagedDiskId,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go deleted file mode 100644 index 9a2b95da94254..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go +++ /dev/null @@ -1,73 +0,0 @@ -package replicationprotecteditems - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ReplicationProviderSpecificSettings = HyperVReplicaAzureReplicationDetails{} - -type HyperVReplicaAzureReplicationDetails struct { - AzureVMDiskDetails *[]AzureVMDiskDetails `json:"azureVmDiskDetails,omitempty"` - EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"` - Encryption *string `json:"encryption,omitempty"` - InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` - LastRecoveryPointReceived *string `json:"lastRecoveryPointReceived,omitempty"` - LastReplicatedTime *string `json:"lastReplicatedTime,omitempty"` - LastRpoCalculatedTime *string `json:"lastRpoCalculatedTime,omitempty"` - LicenseType *string `json:"licenseType,omitempty"` - OSDetails *OSDetails `json:"oSDetails,omitempty"` - ProtectedManagedDisks *[]HyperVReplicaAzureManagedDiskDetails `json:"protectedManagedDisks,omitempty"` - RecoveryAvailabilitySetId *string `json:"recoveryAvailabilitySetId,omitempty"` - RecoveryAzureLogStorageAccountId *string `json:"recoveryAzureLogStorageAccountId,omitempty"` - RecoveryAzureResourceGroupId *string `json:"recoveryAzureResourceGroupId,omitempty"` - RecoveryAzureStorageAccount *string `json:"recoveryAzureStorageAccount,omitempty"` - RecoveryAzureVMName *string `json:"recoveryAzureVmName,omitempty"` - RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` - RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` - SeedManagedDiskTags *map[string]string `json:"seedManagedDiskTags,omitempty"` - SelectedRecoveryAzureNetworkId *string `json:"selectedRecoveryAzureNetworkId,omitempty"` - SelectedSourceNicId *string `json:"selectedSourceNicId,omitempty"` - SourceVMCPUCount *int64 `json:"sourceVmCpuCount,omitempty"` - SourceVMRamSizeInMB *int64 `json:"sourceVmRamSizeInMB,omitempty"` - SqlServerLicenseType *string `json:"sqlServerLicenseType,omitempty"` - TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"` - TargetManagedDiskTags *map[string]string `json:"targetManagedDiskTags,omitempty"` - TargetNicTags *map[string]string `json:"targetNicTags,omitempty"` - TargetProximityPlacementGroupId *string `json:"targetProximityPlacementGroupId,omitempty"` - TargetVMTags *map[string]string `json:"targetVmTags,omitempty"` - UseManagedDisks *string `json:"useManagedDisks,omitempty"` - VMId *string `json:"vmId,omitempty"` - VMNics *[]VMNicDetails `json:"vmNics,omitempty"` - VMProtectionState *string `json:"vmProtectionState,omitempty"` - VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` - - // Fields inherited from ReplicationProviderSpecificSettings -} - -var _ json.Marshaler = HyperVReplicaAzureReplicationDetails{} - -func (s HyperVReplicaAzureReplicationDetails) MarshalJSON() ([]byte, error) { - type wrapper HyperVReplicaAzureReplicationDetails - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling HyperVReplicaAzureReplicationDetails: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureReplicationDetails: %+v", err) - } - decoded["instanceType"] = "HyperVReplicaAzure" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling HyperVReplicaAzureReplicationDetails: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go deleted file mode 100644 index d26606cca5eaf..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go +++ /dev/null @@ -1,107 +0,0 @@ -package replicationprotecteditems - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ReplicationProviderSpecificSettings = InMageAzureV2ReplicationDetails{} - -type InMageAzureV2ReplicationDetails struct { - AgentExpiryDate *string `json:"agentExpiryDate,omitempty"` - AgentVersion *string `json:"agentVersion,omitempty"` - AzureVMDiskDetails *[]AzureVMDiskDetails `json:"azureVMDiskDetails,omitempty"` - AzureVMGeneration *string `json:"azureVmGeneration,omitempty"` - CompressedDataRateInMB *float64 `json:"compressedDataRateInMB,omitempty"` - DataStores *[]string `json:"datastores,omitempty"` - DiscoveryType *string `json:"discoveryType,omitempty"` - DiskResized *string `json:"diskResized,omitempty"` - EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"` - FirmwareType *string `json:"firmwareType,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InfrastructureVMId *string `json:"infrastructureVmId,omitempty"` - IsAdditionalStatsAvailable *bool `json:"isAdditionalStatsAvailable,omitempty"` - IsAgentUpdateRequired *string `json:"isAgentUpdateRequired,omitempty"` - IsRebootAfterUpdateRequired *string `json:"isRebootAfterUpdateRequired,omitempty"` - LastHeartbeat *string `json:"lastHeartbeat,omitempty"` - LastRecoveryPointReceived *string `json:"lastRecoveryPointReceived,omitempty"` - LastRpoCalculatedTime *string `json:"lastRpoCalculatedTime,omitempty"` - LastUpdateReceivedTime *string `json:"lastUpdateReceivedTime,omitempty"` - LicenseType *string `json:"licenseType,omitempty"` - MasterTargetId *string `json:"masterTargetId,omitempty"` - MultiVMGroupId *string `json:"multiVmGroupId,omitempty"` - MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` - MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` - OsDiskId *string `json:"osDiskId,omitempty"` - OsType *string `json:"osType,omitempty"` - OsVersion *string `json:"osVersion,omitempty"` - ProcessServerId *string `json:"processServerId,omitempty"` - ProcessServerName *string `json:"processServerName,omitempty"` - ProtectedDisks *[]InMageAzureV2ProtectedDiskDetails `json:"protectedDisks,omitempty"` - ProtectedManagedDisks *[]InMageAzureV2ManagedDiskDetails `json:"protectedManagedDisks,omitempty"` - ProtectionStage *string `json:"protectionStage,omitempty"` - RecoveryAvailabilitySetId *string `json:"recoveryAvailabilitySetId,omitempty"` - RecoveryAzureLogStorageAccountId *string `json:"recoveryAzureLogStorageAccountId,omitempty"` - RecoveryAzureResourceGroupId *string `json:"recoveryAzureResourceGroupId,omitempty"` - RecoveryAzureStorageAccount *string `json:"recoveryAzureStorageAccount,omitempty"` - RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"` - RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` - ReplicaId *string `json:"replicaId,omitempty"` - ResyncProgressPercentage *int64 `json:"resyncProgressPercentage,omitempty"` - RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` - SeedManagedDiskTags *map[string]string `json:"seedManagedDiskTags,omitempty"` - SelectedRecoveryAzureNetworkId *string `json:"selectedRecoveryAzureNetworkId,omitempty"` - SelectedSourceNicId *string `json:"selectedSourceNicId,omitempty"` - SelectedTfoAzureNetworkId *string `json:"selectedTfoAzureNetworkId,omitempty"` - SourceVMCPUCount *int64 `json:"sourceVmCpuCount,omitempty"` - SourceVMRamSizeInMB *int64 `json:"sourceVmRamSizeInMB,omitempty"` - SqlServerLicenseType *string `json:"sqlServerLicenseType,omitempty"` - SwitchProviderBlockingErrorDetails *[]InMageAzureV2SwitchProviderBlockingErrorDetails `json:"switchProviderBlockingErrorDetails,omitempty"` - SwitchProviderDetails *InMageAzureV2SwitchProviderDetails `json:"switchProviderDetails,omitempty"` - TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"` - TargetManagedDiskTags *map[string]string `json:"targetManagedDiskTags,omitempty"` - TargetNicTags *map[string]string `json:"targetNicTags,omitempty"` - TargetProximityPlacementGroupId *string `json:"targetProximityPlacementGroupId,omitempty"` - TargetVMId *string `json:"targetVmId,omitempty"` - TargetVMTags *map[string]string `json:"targetVmTags,omitempty"` - TotalDataTransferred *int64 `json:"totalDataTransferred,omitempty"` - TotalProgressHealth *string `json:"totalProgressHealth,omitempty"` - UncompressedDataRateInMB *float64 `json:"uncompressedDataRateInMB,omitempty"` - UseManagedDisks *string `json:"useManagedDisks,omitempty"` - VCenterInfrastructureId *string `json:"vCenterInfrastructureId,omitempty"` - VMId *string `json:"vmId,omitempty"` - VMNics *[]VMNicDetails `json:"vmNics,omitempty"` - VMProtectionState *string `json:"vmProtectionState,omitempty"` - VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` - ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` - VhdName *string `json:"vhdName,omitempty"` - - // Fields inherited from ReplicationProviderSpecificSettings -} - -var _ json.Marshaler = InMageAzureV2ReplicationDetails{} - -func (s InMageAzureV2ReplicationDetails) MarshalJSON() ([]byte, error) { - type wrapper InMageAzureV2ReplicationDetails - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling InMageAzureV2ReplicationDetails: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling InMageAzureV2ReplicationDetails: %+v", err) - } - decoded["instanceType"] = "InMageAzureV2" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling InMageAzureV2ReplicationDetails: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go deleted file mode 100644 index 428a0dc1aeb03..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go +++ /dev/null @@ -1,51 +0,0 @@ -package replicationprotecteditems - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ UpdateReplicationProtectedItemProviderInput = InMageRcmUpdateReplicationProtectedItemInput{} - -type InMageRcmUpdateReplicationProtectedItemInput struct { - LicenseType *LicenseType `json:"licenseType,omitempty"` - TargetAvailabilitySetId *string `json:"targetAvailabilitySetId,omitempty"` - TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"` - TargetBootDiagnosticsStorageAccountId *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"` - TargetNetworkId *string `json:"targetNetworkId,omitempty"` - TargetProximityPlacementGroupId *string `json:"targetProximityPlacementGroupId,omitempty"` - TargetResourceGroupId *string `json:"targetResourceGroupId,omitempty"` - TargetVMName *string `json:"targetVmName,omitempty"` - TargetVMSize *string `json:"targetVmSize,omitempty"` - TestNetworkId *string `json:"testNetworkId,omitempty"` - VMNics *[]InMageRcmNicInput `json:"vmNics,omitempty"` - - // Fields inherited from UpdateReplicationProtectedItemProviderInput -} - -var _ json.Marshaler = InMageRcmUpdateReplicationProtectedItemInput{} - -func (s InMageRcmUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { - type wrapper InMageRcmUpdateReplicationProtectedItemInput - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling InMageRcmUpdateReplicationProtectedItemInput: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling InMageRcmUpdateReplicationProtectedItemInput: %+v", err) - } - decoded["instanceType"] = "InMageRcm" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling InMageRcmUpdateReplicationProtectedItemInput: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_osdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_osdetails.go deleted file mode 100644 index ffe22cbffdc79..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_osdetails.go +++ /dev/null @@ -1,13 +0,0 @@ -package replicationprotecteditems - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type OSDetails struct { - OSMajorVersion *string `json:"oSMajorVersion,omitempty"` - OSMinorVersion *string `json:"oSMinorVersion,omitempty"` - OSVersion *string `json:"oSVersion,omitempty"` - OsEdition *string `json:"osEdition,omitempty"` - OsType *string `json:"osType,omitempty"` - ProductType *string `json:"productType,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/version.go deleted file mode 100644 index a8a497535e438..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package replicationprotecteditems - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-10-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotecteditems/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/README.md deleted file mode 100644 index c224864ae7bf0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/README.md +++ /dev/null @@ -1,133 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings` Documentation - -The `replicationprotectioncontainermappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings" -``` - - -### Client Initialization - -```go -client := replicationprotectioncontainermappings.NewReplicationProtectionContainerMappingsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ReplicationProtectionContainerMappingsClient.Create` - -```go -ctx := context.TODO() -id := replicationprotectioncontainermappings.NewReplicationProtectionContainerMappingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectionContainerMappingValue") - -payload := replicationprotectioncontainermappings.CreateProtectionContainerMappingInput{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationProtectionContainerMappingsClient.Delete` - -```go -ctx := context.TODO() -id := replicationprotectioncontainermappings.NewReplicationProtectionContainerMappingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectionContainerMappingValue") - -payload := replicationprotectioncontainermappings.RemoveProtectionContainerMappingInput{ - // ... -} - - -if err := client.DeleteThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationProtectionContainerMappingsClient.Get` - -```go -ctx := context.TODO() -id := replicationprotectioncontainermappings.NewReplicationProtectionContainerMappingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectionContainerMappingValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ReplicationProtectionContainerMappingsClient.List` - -```go -ctx := context.TODO() -id := replicationprotectioncontainermappings.NewVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ReplicationProtectionContainerMappingsClient.ListByReplicationProtectionContainers` - -```go -ctx := context.TODO() -id := replicationprotectioncontainermappings.NewReplicationProtectionContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue") - -// alternatively `client.ListByReplicationProtectionContainers(ctx, id)` can be used to do batched pagination -items, err := client.ListByReplicationProtectionContainersComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ReplicationProtectionContainerMappingsClient.Purge` - -```go -ctx := context.TODO() -id := replicationprotectioncontainermappings.NewReplicationProtectionContainerMappingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectionContainerMappingValue") - -if err := client.PurgeThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationProtectionContainerMappingsClient.Update` - -```go -ctx := context.TODO() -id := replicationprotectioncontainermappings.NewReplicationProtectionContainerMappingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectionContainerMappingValue") - -payload := replicationprotectioncontainermappings.UpdateProtectionContainerMappingInput{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/version.go deleted file mode 100644 index 32f35b065ffd8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package replicationprotectioncontainermappings - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-10-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectioncontainermappings/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/README.md deleted file mode 100644 index d24075d47ff0f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/README.md +++ /dev/null @@ -1,133 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers` Documentation - -The `replicationprotectioncontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers" -``` - - -### Client Initialization - -```go -client := replicationprotectioncontainers.NewReplicationProtectionContainersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ReplicationProtectionContainersClient.Create` - -```go -ctx := context.TODO() -id := replicationprotectioncontainers.NewReplicationProtectionContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue") - -payload := replicationprotectioncontainers.CreateProtectionContainerInput{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationProtectionContainersClient.Delete` - -```go -ctx := context.TODO() -id := replicationprotectioncontainers.NewReplicationProtectionContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationProtectionContainersClient.DiscoverProtectableItem` - -```go -ctx := context.TODO() -id := replicationprotectioncontainers.NewReplicationProtectionContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue") - -payload := replicationprotectioncontainers.DiscoverProtectableItemRequest{ - // ... -} - - -if err := client.DiscoverProtectableItemThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationProtectionContainersClient.Get` - -```go -ctx := context.TODO() -id := replicationprotectioncontainers.NewReplicationProtectionContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ReplicationProtectionContainersClient.List` - -```go -ctx := context.TODO() -id := replicationprotectioncontainers.NewVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ReplicationProtectionContainersClient.ListByReplicationFabrics` - -```go -ctx := context.TODO() -id := replicationprotectioncontainers.NewReplicationFabricID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue") - -// alternatively `client.ListByReplicationFabrics(ctx, id)` can be used to do batched pagination -items, err := client.ListByReplicationFabricsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ReplicationProtectionContainersClient.SwitchProtection` - -```go -ctx := context.TODO() -id := replicationprotectioncontainers.NewReplicationProtectionContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue") - -payload := replicationprotectioncontainers.SwitchProtectionInput{ - // ... -} - - -if err := client.SwitchProtectionThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/version.go deleted file mode 100644 index c815d0a783679..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package replicationprotectioncontainers - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-10-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectioncontainers/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/README.md deleted file mode 100644 index 5cc93729729f1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/README.md +++ /dev/null @@ -1,203 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans` Documentation - -The `replicationrecoveryplans` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans" -``` - - -### Client Initialization - -```go -client := replicationrecoveryplans.NewReplicationRecoveryPlansClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ReplicationRecoveryPlansClient.Create` - -```go -ctx := context.TODO() -id := replicationrecoveryplans.NewReplicationRecoveryPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationRecoveryPlanValue") - -payload := replicationrecoveryplans.CreateRecoveryPlanInput{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationRecoveryPlansClient.Delete` - -```go -ctx := context.TODO() -id := replicationrecoveryplans.NewReplicationRecoveryPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationRecoveryPlanValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationRecoveryPlansClient.FailoverCancel` - -```go -ctx := context.TODO() -id := replicationrecoveryplans.NewReplicationRecoveryPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationRecoveryPlanValue") - -if err := client.FailoverCancelThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationRecoveryPlansClient.FailoverCommit` - -```go -ctx := context.TODO() -id := replicationrecoveryplans.NewReplicationRecoveryPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationRecoveryPlanValue") - -if err := client.FailoverCommitThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationRecoveryPlansClient.Get` - -```go -ctx := context.TODO() -id := replicationrecoveryplans.NewReplicationRecoveryPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationRecoveryPlanValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ReplicationRecoveryPlansClient.List` - -```go -ctx := context.TODO() -id := replicationrecoveryplans.NewVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ReplicationRecoveryPlansClient.PlannedFailover` - -```go -ctx := context.TODO() -id := replicationrecoveryplans.NewReplicationRecoveryPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationRecoveryPlanValue") - -payload := replicationrecoveryplans.RecoveryPlanPlannedFailoverInput{ - // ... -} - - -if err := client.PlannedFailoverThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationRecoveryPlansClient.Reprotect` - -```go -ctx := context.TODO() -id := replicationrecoveryplans.NewReplicationRecoveryPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationRecoveryPlanValue") - -if err := client.ReprotectThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationRecoveryPlansClient.TestFailover` - -```go -ctx := context.TODO() -id := replicationrecoveryplans.NewReplicationRecoveryPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationRecoveryPlanValue") - -payload := replicationrecoveryplans.RecoveryPlanTestFailoverInput{ - // ... -} - - -if err := client.TestFailoverThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationRecoveryPlansClient.TestFailoverCleanup` - -```go -ctx := context.TODO() -id := replicationrecoveryplans.NewReplicationRecoveryPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationRecoveryPlanValue") - -payload := replicationrecoveryplans.RecoveryPlanTestFailoverCleanupInput{ - // ... -} - - -if err := client.TestFailoverCleanupThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationRecoveryPlansClient.UnplannedFailover` - -```go -ctx := context.TODO() -id := replicationrecoveryplans.NewReplicationRecoveryPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationRecoveryPlanValue") - -payload := replicationrecoveryplans.RecoveryPlanUnplannedFailoverInput{ - // ... -} - - -if err := client.UnplannedFailoverThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationRecoveryPlansClient.Update` - -```go -ctx := context.TODO() -id := replicationrecoveryplans.NewReplicationRecoveryPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationRecoveryPlanValue") - -payload := replicationrecoveryplans.UpdateRecoveryPlanInput{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/version.go deleted file mode 100644 index 202d9b2a45d57..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package replicationrecoveryplans - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-10-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationrecoveryplans/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/README.md deleted file mode 100644 index 692a6b869e906..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/README.md +++ /dev/null @@ -1,123 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders` Documentation - -The `replicationrecoveryservicesproviders` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders" -``` - - -### Client Initialization - -```go -client := replicationrecoveryservicesproviders.NewReplicationRecoveryServicesProvidersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ReplicationRecoveryServicesProvidersClient.Create` - -```go -ctx := context.TODO() -id := replicationrecoveryservicesproviders.NewReplicationRecoveryServicesProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationRecoveryServicesProviderValue") - -payload := replicationrecoveryservicesproviders.AddRecoveryServicesProviderInput{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationRecoveryServicesProvidersClient.Delete` - -```go -ctx := context.TODO() -id := replicationrecoveryservicesproviders.NewReplicationRecoveryServicesProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationRecoveryServicesProviderValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationRecoveryServicesProvidersClient.Get` - -```go -ctx := context.TODO() -id := replicationrecoveryservicesproviders.NewReplicationRecoveryServicesProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationRecoveryServicesProviderValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ReplicationRecoveryServicesProvidersClient.List` - -```go -ctx := context.TODO() -id := replicationrecoveryservicesproviders.NewVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ReplicationRecoveryServicesProvidersClient.ListByReplicationFabrics` - -```go -ctx := context.TODO() -id := replicationrecoveryservicesproviders.NewReplicationFabricID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue") - -// alternatively `client.ListByReplicationFabrics(ctx, id)` can be used to do batched pagination -items, err := client.ListByReplicationFabricsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ReplicationRecoveryServicesProvidersClient.Purge` - -```go -ctx := context.TODO() -id := replicationrecoveryservicesproviders.NewReplicationRecoveryServicesProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationRecoveryServicesProviderValue") - -if err := client.PurgeThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationRecoveryServicesProvidersClient.RefreshProvider` - -```go -ctx := context.TODO() -id := replicationrecoveryservicesproviders.NewReplicationRecoveryServicesProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationRecoveryServicesProviderValue") - -if err := client.RefreshProviderThenPoll(ctx, id); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/version.go deleted file mode 100644 index 66c60ffd26af3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package replicationrecoveryservicesproviders - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-10-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationrecoveryservicesproviders/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/README.md deleted file mode 100644 index eb08aa758eaf8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/README.md +++ /dev/null @@ -1,70 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting` Documentation - -The `replicationvaultsetting` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting" -``` - - -### Client Initialization - -```go -client := replicationvaultsetting.NewReplicationVaultSettingClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ReplicationVaultSettingClient.Create` - -```go -ctx := context.TODO() -id := replicationvaultsetting.NewReplicationVaultSettingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationVaultSettingValue") - -payload := replicationvaultsetting.VaultSettingCreationInput{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationVaultSettingClient.Get` - -```go -ctx := context.TODO() -id := replicationvaultsetting.NewReplicationVaultSettingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationVaultSettingValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ReplicationVaultSettingClient.List` - -```go -ctx := context.TODO() -id := replicationvaultsetting.NewVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/version.go deleted file mode 100644 index e0c2fda36ca3d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package replicationvaultsetting - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-10-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvaultsetting/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/README.md new file mode 100644 index 0000000000000..4c0d2ee87987c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/README.md @@ -0,0 +1,164 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics` Documentation + +The `replicationfabrics` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics" +``` + + +### Client Initialization + +```go +client := replicationfabrics.NewReplicationFabricsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ReplicationFabricsClient.CheckConsistency` + +```go +ctx := context.TODO() +id := replicationfabrics.NewReplicationFabricID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue") + +if err := client.CheckConsistencyThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationFabricsClient.Create` + +```go +ctx := context.TODO() +id := replicationfabrics.NewReplicationFabricID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue") + +payload := replicationfabrics.FabricCreationInput{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationFabricsClient.Delete` + +```go +ctx := context.TODO() +id := replicationfabrics.NewReplicationFabricID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationFabricsClient.Get` + +```go +ctx := context.TODO() +id := replicationfabrics.NewReplicationFabricID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue") + +read, err := client.Get(ctx, id, replicationfabrics.DefaultGetOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ReplicationFabricsClient.List` + +```go +ctx := context.TODO() +id := replicationfabrics.NewVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ReplicationFabricsClient.MigrateToAad` + +```go +ctx := context.TODO() +id := replicationfabrics.NewReplicationFabricID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue") + +if err := client.MigrateToAadThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationFabricsClient.Purge` + +```go +ctx := context.TODO() +id := replicationfabrics.NewReplicationFabricID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue") + +if err := client.PurgeThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationFabricsClient.ReassociateGateway` + +```go +ctx := context.TODO() +id := replicationfabrics.NewReplicationFabricID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue") + +payload := replicationfabrics.FailoverProcessServerRequest{ + // ... +} + + +if err := client.ReassociateGatewayThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationFabricsClient.RemoveInfra` + +```go +ctx := context.TODO() +id := replicationfabrics.NewReplicationFabricID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue") + +if err := client.RemoveInfraThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationFabricsClient.RenewCertificate` + +```go +ctx := context.TODO() +id := replicationfabrics.NewReplicationFabricID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue") + +payload := replicationfabrics.RenewCertificateInput{ + // ... +} + + +if err := client.RenewCertificateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/id_replicationfabric.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/id_replicationfabric.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/id_replicationfabric.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/id_replicationfabric.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/id_vault.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/id_vault.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/id_vault.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/method_checkconsistency.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/method_checkconsistency.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/method_checkconsistency.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/method_checkconsistency.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/method_migratetoaad.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/method_migratetoaad.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/method_migratetoaad.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/method_migratetoaad.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/method_purge.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/method_purge.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/method_purge.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/method_purge.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/method_reassociategateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/method_reassociategateway.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/method_reassociategateway.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/method_reassociategateway.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/method_removeinfra.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/method_removeinfra.go new file mode 100644 index 0000000000000..242bf25cd2b09 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/method_removeinfra.go @@ -0,0 +1,69 @@ +package replicationfabrics + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RemoveInfraOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// RemoveInfra ... +func (c ReplicationFabricsClient) RemoveInfra(ctx context.Context, id ReplicationFabricId) (result RemoveInfraOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/removeInfra", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// RemoveInfraThenPoll performs RemoveInfra then polls until it's completed +func (c ReplicationFabricsClient) RemoveInfraThenPoll(ctx context.Context, id ReplicationFabricId) error { + result, err := c.RemoveInfra(ctx, id) + if err != nil { + return fmt.Errorf("performing RemoveInfra: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after RemoveInfra: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/method_renewcertificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/method_renewcertificate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/method_renewcertificate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/method_renewcertificate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_a2aextendedlocationdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_a2aextendedlocationdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_a2aextendedlocationdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_a2aextendedlocationdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_a2afabricspecificlocationdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_a2afabricspecificlocationdetails.go new file mode 100644 index 0000000000000..cf5d60d8f0691 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_a2afabricspecificlocationdetails.go @@ -0,0 +1,23 @@ +package replicationfabrics + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type A2AFabricSpecificLocationDetails struct { + InitialPrimaryExtendedLocation *edgezones.Model `json:"initialPrimaryExtendedLocation,omitempty"` + InitialPrimaryFabricLocation *string `json:"initialPrimaryFabricLocation,omitempty"` + InitialPrimaryZone *string `json:"initialPrimaryZone,omitempty"` + InitialRecoveryExtendedLocation *edgezones.Model `json:"initialRecoveryExtendedLocation,omitempty"` + InitialRecoveryFabricLocation *string `json:"initialRecoveryFabricLocation,omitempty"` + InitialRecoveryZone *string `json:"initialRecoveryZone,omitempty"` + PrimaryExtendedLocation *edgezones.Model `json:"primaryExtendedLocation,omitempty"` + PrimaryFabricLocation *string `json:"primaryFabricLocation,omitempty"` + PrimaryZone *string `json:"primaryZone,omitempty"` + RecoveryExtendedLocation *edgezones.Model `json:"recoveryExtendedLocation,omitempty"` + RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"` + RecoveryZone *string `json:"recoveryZone,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_a2azonedetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_a2azonedetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_a2azonedetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_a2azonedetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_agentdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_agentdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_agentdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_agentdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_agentdiskdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_agentdiskdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_agentdiskdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_agentdiskdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_azurefabriccreationinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_azurefabriccreationinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_azurefabriccreationinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_azurefabriccreationinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_azurefabricspecificdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_azurefabricspecificdetails.go new file mode 100644 index 0000000000000..367bc0a49ce43 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_azurefabricspecificdetails.go @@ -0,0 +1,45 @@ +package replicationfabrics + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ FabricSpecificDetails = AzureFabricSpecificDetails{} + +type AzureFabricSpecificDetails struct { + ContainerIds *[]string `json:"containerIds,omitempty"` + ExtendedLocations *[]A2AExtendedLocationDetails `json:"extendedLocations,omitempty"` + Location *string `json:"location,omitempty"` + LocationDetails *[]A2AFabricSpecificLocationDetails `json:"locationDetails,omitempty"` + Zones *[]A2AZoneDetails `json:"zones,omitempty"` + + // Fields inherited from FabricSpecificDetails +} + +var _ json.Marshaler = AzureFabricSpecificDetails{} + +func (s AzureFabricSpecificDetails) MarshalJSON() ([]byte, error) { + type wrapper AzureFabricSpecificDetails + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureFabricSpecificDetails: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureFabricSpecificDetails: %+v", err) + } + decoded["instanceType"] = "Azure" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureFabricSpecificDetails: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_datastore.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_datastore.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_datastore.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_datastore.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_dradetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_dradetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_dradetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_dradetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_encryptiondetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_encryptiondetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_encryptiondetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_encryptiondetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabric.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabric.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabric.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabric.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabriccreationinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabriccreationinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabriccreationinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabriccreationinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabriccreationinputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabriccreationinputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabriccreationinputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabriccreationinputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabricproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabricproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabricproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabricproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabricspecificcreationinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabricspecificcreationinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabricspecificcreationinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabricspecificcreationinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabricspecificdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabricspecificdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabricspecificdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabricspecificdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_failoverprocessserverrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_failoverprocessserverrequest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_failoverprocessserverrequest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_failoverprocessserverrequest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_failoverprocessserverrequestproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_failoverprocessserverrequestproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_failoverprocessserverrequestproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_failoverprocessserverrequestproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_healtherror.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_healtherror.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_healtherror.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_healtherror.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_hypervhostdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_hypervhostdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_hypervhostdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_hypervhostdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_hypervsitedetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_hypervsitedetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_hypervsitedetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_hypervsitedetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_identityproviderdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_identityproviderdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_identityproviderdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_identityproviderdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_identityproviderinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_identityproviderinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_identityproviderinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_identityproviderinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_inmagefabricswitchproviderblockingerrordetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_inmagefabricswitchproviderblockingerrordetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_inmagefabricswitchproviderblockingerrordetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_inmagefabricswitchproviderblockingerrordetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_inmagercmfabriccreationinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_inmagercmfabriccreationinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_inmagercmfabriccreationinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_inmagercmfabriccreationinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_inmagercmfabricspecificdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_inmagercmfabricspecificdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_inmagercmfabricspecificdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_inmagercmfabricspecificdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_innerhealtherror.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_innerhealtherror.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_innerhealtherror.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_innerhealtherror.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_marsagentdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_marsagentdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_marsagentdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_marsagentdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_mastertargetserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_mastertargetserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_mastertargetserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_mastertargetserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_mobilityserviceupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_mobilityserviceupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_mobilityserviceupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_mobilityserviceupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_processserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_processserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_processserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_processserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_processserverdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_processserverdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_processserverdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_processserverdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_pushinstallerdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_pushinstallerdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_pushinstallerdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_pushinstallerdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_rcmproxydetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_rcmproxydetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_rcmproxydetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_rcmproxydetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_renewcertificateinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_renewcertificateinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_renewcertificateinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_renewcertificateinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_renewcertificateinputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_renewcertificateinputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_renewcertificateinputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_renewcertificateinputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_replicationagentdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_replicationagentdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_replicationagentdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_replicationagentdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_reprotectagentdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_reprotectagentdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_reprotectagentdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_reprotectagentdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_retentionvolume.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_retentionvolume.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_retentionvolume.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_retentionvolume.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_runasaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_runasaccount.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_runasaccount.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_runasaccount.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_versiondetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_versiondetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_versiondetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_versiondetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_vmmdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_vmmdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_vmmdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_vmmdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_vmwaredetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_vmwaredetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_vmwaredetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_vmwaredetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_vmwarev2fabriccreationinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_vmwarev2fabriccreationinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_vmwarev2fabriccreationinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_vmwarev2fabriccreationinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/version.go new file mode 100644 index 0000000000000..c1a3c00a9dec1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/version.go @@ -0,0 +1,12 @@ +package replicationfabrics + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-04-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/replicationfabrics/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/README.md new file mode 100644 index 0000000000000..c741754deab96 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/README.md @@ -0,0 +1,116 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings` Documentation + +The `replicationnetworkmappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings" +``` + + +### Client Initialization + +```go +client := replicationnetworkmappings.NewReplicationNetworkMappingsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ReplicationNetworkMappingsClient.Create` + +```go +ctx := context.TODO() +id := replicationnetworkmappings.NewReplicationNetworkMappingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationNetworkValue", "replicationNetworkMappingValue") + +payload := replicationnetworkmappings.CreateNetworkMappingInput{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationNetworkMappingsClient.Delete` + +```go +ctx := context.TODO() +id := replicationnetworkmappings.NewReplicationNetworkMappingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationNetworkValue", "replicationNetworkMappingValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationNetworkMappingsClient.Get` + +```go +ctx := context.TODO() +id := replicationnetworkmappings.NewReplicationNetworkMappingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationNetworkValue", "replicationNetworkMappingValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ReplicationNetworkMappingsClient.List` + +```go +ctx := context.TODO() +id := replicationnetworkmappings.NewVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ReplicationNetworkMappingsClient.ListByReplicationNetworks` + +```go +ctx := context.TODO() +id := replicationnetworkmappings.NewReplicationNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationNetworkValue") + +// alternatively `client.ListByReplicationNetworks(ctx, id)` can be used to do batched pagination +items, err := client.ListByReplicationNetworksComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ReplicationNetworkMappingsClient.Update` + +```go +ctx := context.TODO() +id := replicationnetworkmappings.NewReplicationNetworkMappingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationNetworkValue", "replicationNetworkMappingValue") + +payload := replicationnetworkmappings.UpdateNetworkMappingInput{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_replicationnetwork.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/id_replicationnetwork.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_replicationnetwork.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/id_replicationnetwork.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_replicationnetworkmapping.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/id_replicationnetworkmapping.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_replicationnetworkmapping.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/id_replicationnetworkmapping.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/id_vault.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_vault.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/id_vault.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/method_listbyreplicationnetworks.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/method_listbyreplicationnetworks.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/method_listbyreplicationnetworks.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/method_listbyreplicationnetworks.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_createnetworkmappinginput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_createnetworkmappinginput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_createnetworkmappinginput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_createnetworkmappinginput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_networkmapping.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_networkmapping.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_networkmapping.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_networkmapping.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_networkmappingproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_networkmappingproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_networkmappingproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_networkmappingproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_updatenetworkmappinginput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_updatenetworkmappinginput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_updatenetworkmappinginput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_updatenetworkmappinginput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/version.go new file mode 100644 index 0000000000000..279f42a5bdc75 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/version.go @@ -0,0 +1,12 @@ +package replicationnetworkmappings + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-04-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/replicationnetworkmappings/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/README.md new file mode 100644 index 0000000000000..82c9138c2c90e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/README.md @@ -0,0 +1,70 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks` Documentation + +The `replicationnetworks` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks" +``` + + +### Client Initialization + +```go +client := replicationnetworks.NewReplicationNetworksClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ReplicationNetworksClient.Get` + +```go +ctx := context.TODO() +id := replicationnetworks.NewReplicationNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationNetworkValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ReplicationNetworksClient.List` + +```go +ctx := context.TODO() +id := replicationnetworks.NewVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ReplicationNetworksClient.ListByReplicationFabrics` + +```go +ctx := context.TODO() +id := replicationnetworks.NewReplicationFabricID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue") + +// alternatively `client.ListByReplicationFabrics(ctx, id)` can be used to do batched pagination +items, err := client.ListByReplicationFabricsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_replicationfabric.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/id_replicationfabric.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_replicationfabric.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/id_replicationfabric.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_replicationnetwork.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/id_replicationnetwork.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_replicationnetwork.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/id_replicationnetwork.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/id_vault.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_vault.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/id_vault.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/method_listbyreplicationfabrics.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/method_listbyreplicationfabrics.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/method_listbyreplicationfabrics.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/method_listbyreplicationfabrics.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/model_network.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/model_network.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/model_network.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/model_network.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/model_networkproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/model_networkproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/model_networkproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/model_networkproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/model_subnet.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/model_subnet.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/model_subnet.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/model_subnet.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/version.go new file mode 100644 index 0000000000000..b806179e07903 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/version.go @@ -0,0 +1,12 @@ +package replicationnetworks + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-04-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/replicationnetworks/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/README.md new file mode 100644 index 0000000000000..9e880d8dd05f6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/README.md @@ -0,0 +1,99 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies` Documentation + +The `replicationpolicies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies" +``` + + +### Client Initialization + +```go +client := replicationpolicies.NewReplicationPoliciesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ReplicationPoliciesClient.Create` + +```go +ctx := context.TODO() +id := replicationpolicies.NewReplicationPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationPolicyValue") + +payload := replicationpolicies.CreatePolicyInput{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationPoliciesClient.Delete` + +```go +ctx := context.TODO() +id := replicationpolicies.NewReplicationPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationPolicyValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationPoliciesClient.Get` + +```go +ctx := context.TODO() +id := replicationpolicies.NewReplicationPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationPolicyValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ReplicationPoliciesClient.List` + +```go +ctx := context.TODO() +id := replicationpolicies.NewVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ReplicationPoliciesClient.Update` + +```go +ctx := context.TODO() +id := replicationpolicies.NewReplicationPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationPolicyValue") + +payload := replicationpolicies.UpdatePolicyInput{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/id_replicationpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/id_replicationpolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/id_replicationpolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/id_replicationpolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/id_vault.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/id_vault.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/id_vault.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_a2apolicycreationinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_a2apolicycreationinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_a2apolicycreationinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_a2apolicycreationinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_a2apolicydetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_a2apolicydetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_a2apolicydetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_a2apolicydetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_createpolicyinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_createpolicyinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_createpolicyinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_createpolicyinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_createpolicyinputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_createpolicyinputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_createpolicyinputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_createpolicyinputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicabasepolicydetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicabasepolicydetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicabasepolicydetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicabasepolicydetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicabluepolicydetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicabluepolicydetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicabluepolicydetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicabluepolicydetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicabluepolicyinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicabluepolicyinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicabluepolicyinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicabluepolicyinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicapolicydetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicapolicydetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicapolicydetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicapolicydetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicapolicyinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicapolicyinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicapolicyinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicapolicyinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmageazurev2policydetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmageazurev2policydetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmageazurev2policydetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmageazurev2policydetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmageazurev2policyinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmageazurev2policyinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmageazurev2policyinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmageazurev2policyinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagebasepolicydetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagebasepolicydetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagebasepolicydetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagebasepolicydetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagepolicydetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagepolicydetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagepolicydetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagepolicydetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagepolicyinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagepolicyinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagepolicyinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagepolicyinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagercmpolicycreationinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagercmpolicycreationinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagercmpolicycreationinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagercmpolicycreationinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagercmpolicydetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagercmpolicydetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagercmpolicydetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagercmpolicydetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_policy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_policy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_policy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_policy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_policyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_policyproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_policyproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_policyproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_policyproviderspecificdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_policyproviderspecificdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_policyproviderspecificdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_policyproviderspecificdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_policyproviderspecificinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_policyproviderspecificinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_policyproviderspecificinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_policyproviderspecificinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_updatepolicyinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_updatepolicyinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_updatepolicyinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_updatepolicyinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_updatepolicyinputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_updatepolicyinputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_updatepolicyinputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_updatepolicyinputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_vmwarecbtpolicydetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_vmwarecbtpolicydetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_vmwarecbtpolicydetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_vmwarecbtpolicydetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/version.go new file mode 100644 index 0000000000000..7e33d3cfddb34 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/version.go @@ -0,0 +1,12 @@ +package replicationpolicies + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-04-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/replicationpolicies/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/README.md new file mode 100644 index 0000000000000..62bce3fc75c07 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/README.md @@ -0,0 +1,373 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems` Documentation + +The `replicationprotecteditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems" +``` + + +### Client Initialization + +```go +client := replicationprotecteditems.NewReplicationProtectedItemsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ReplicationProtectedItemsClient.AddDisks` + +```go +ctx := context.TODO() +id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") + +payload := replicationprotecteditems.AddDisksInput{ + // ... +} + + +if err := client.AddDisksThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationProtectedItemsClient.ApplyRecoveryPoint` + +```go +ctx := context.TODO() +id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") + +payload := replicationprotecteditems.ApplyRecoveryPointInput{ + // ... +} + + +if err := client.ApplyRecoveryPointThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationProtectedItemsClient.Create` + +```go +ctx := context.TODO() +id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") + +payload := replicationprotecteditems.EnableProtectionInput{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationProtectedItemsClient.Delete` + +```go +ctx := context.TODO() +id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") + +payload := replicationprotecteditems.DisableProtectionInput{ + // ... +} + + +if err := client.DeleteThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationProtectedItemsClient.FailoverCancel` + +```go +ctx := context.TODO() +id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") + +if err := client.FailoverCancelThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationProtectedItemsClient.FailoverCommit` + +```go +ctx := context.TODO() +id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") + +if err := client.FailoverCommitThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationProtectedItemsClient.Get` + +```go +ctx := context.TODO() +id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ReplicationProtectedItemsClient.List` + +```go +ctx := context.TODO() +id := replicationprotecteditems.NewVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue") + +// alternatively `client.List(ctx, id, replicationprotecteditems.DefaultListOperationOptions())` can be used to do batched pagination +items, err := client.ListComplete(ctx, id, replicationprotecteditems.DefaultListOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ReplicationProtectedItemsClient.ListByReplicationProtectionContainers` + +```go +ctx := context.TODO() +id := replicationprotecteditems.NewReplicationProtectionContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue") + +// alternatively `client.ListByReplicationProtectionContainers(ctx, id)` can be used to do batched pagination +items, err := client.ListByReplicationProtectionContainersComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ReplicationProtectedItemsClient.PlannedFailover` + +```go +ctx := context.TODO() +id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") + +payload := replicationprotecteditems.PlannedFailoverInput{ + // ... +} + + +if err := client.PlannedFailoverThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationProtectedItemsClient.Purge` + +```go +ctx := context.TODO() +id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") + +if err := client.PurgeThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationProtectedItemsClient.RemoveDisks` + +```go +ctx := context.TODO() +id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") + +payload := replicationprotecteditems.RemoveDisksInput{ + // ... +} + + +if err := client.RemoveDisksThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationProtectedItemsClient.RepairReplication` + +```go +ctx := context.TODO() +id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") + +if err := client.RepairReplicationThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationProtectedItemsClient.Reprotect` + +```go +ctx := context.TODO() +id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") + +payload := replicationprotecteditems.ReverseReplicationInput{ + // ... +} + + +if err := client.ReprotectThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationProtectedItemsClient.ResolveHealthErrors` + +```go +ctx := context.TODO() +id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") + +payload := replicationprotecteditems.ResolveHealthInput{ + // ... +} + + +if err := client.ResolveHealthErrorsThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationProtectedItemsClient.SwitchProvider` + +```go +ctx := context.TODO() +id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") + +payload := replicationprotecteditems.SwitchProviderInput{ + // ... +} + + +if err := client.SwitchProviderThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationProtectedItemsClient.TestFailover` + +```go +ctx := context.TODO() +id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") + +payload := replicationprotecteditems.TestFailoverInput{ + // ... +} + + +if err := client.TestFailoverThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationProtectedItemsClient.TestFailoverCleanup` + +```go +ctx := context.TODO() +id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") + +payload := replicationprotecteditems.TestFailoverCleanupInput{ + // ... +} + + +if err := client.TestFailoverCleanupThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationProtectedItemsClient.UnplannedFailover` + +```go +ctx := context.TODO() +id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") + +payload := replicationprotecteditems.UnplannedFailoverInput{ + // ... +} + + +if err := client.UnplannedFailoverThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationProtectedItemsClient.Update` + +```go +ctx := context.TODO() +id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") + +payload := replicationprotecteditems.UpdateReplicationProtectedItemInput{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationProtectedItemsClient.UpdateAppliance` + +```go +ctx := context.TODO() +id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") + +payload := replicationprotecteditems.UpdateApplianceForReplicationProtectedItemInput{ + // ... +} + + +if err := client.UpdateApplianceThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationProtectedItemsClient.UpdateMobilityService` + +```go +ctx := context.TODO() +id := replicationprotecteditems.NewReplicationProtectedItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectedItemValue") + +payload := replicationprotecteditems.UpdateMobilityServiceRequest{ + // ... +} + + +if err := client.UpdateMobilityServiceThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/constants.go new file mode 100644 index 0000000000000..52dde56ad3796 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/constants.go @@ -0,0 +1,976 @@ +package replicationprotecteditems + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AgentUpgradeBlockedReason string + +const ( + AgentUpgradeBlockedReasonAgentNoHeartbeat AgentUpgradeBlockedReason = "AgentNoHeartbeat" + AgentUpgradeBlockedReasonAlreadyOnLatestVersion AgentUpgradeBlockedReason = "AlreadyOnLatestVersion" + AgentUpgradeBlockedReasonDistroIsNotReported AgentUpgradeBlockedReason = "DistroIsNotReported" + AgentUpgradeBlockedReasonDistroNotSupportedForUpgrade AgentUpgradeBlockedReason = "DistroNotSupportedForUpgrade" + AgentUpgradeBlockedReasonIncompatibleApplianceVersion AgentUpgradeBlockedReason = "IncompatibleApplianceVersion" + AgentUpgradeBlockedReasonInvalidAgentVersion AgentUpgradeBlockedReason = "InvalidAgentVersion" + AgentUpgradeBlockedReasonInvalidDriverVersion AgentUpgradeBlockedReason = "InvalidDriverVersion" + AgentUpgradeBlockedReasonMissingUpgradePath AgentUpgradeBlockedReason = "MissingUpgradePath" + AgentUpgradeBlockedReasonNotProtected AgentUpgradeBlockedReason = "NotProtected" + AgentUpgradeBlockedReasonProcessServerNoHeartbeat AgentUpgradeBlockedReason = "ProcessServerNoHeartbeat" + AgentUpgradeBlockedReasonRcmProxyNoHeartbeat AgentUpgradeBlockedReason = "RcmProxyNoHeartbeat" + AgentUpgradeBlockedReasonRebootRequired AgentUpgradeBlockedReason = "RebootRequired" + AgentUpgradeBlockedReasonUnknown AgentUpgradeBlockedReason = "Unknown" + AgentUpgradeBlockedReasonUnsupportedProtectionScenario AgentUpgradeBlockedReason = "UnsupportedProtectionScenario" +) + +func PossibleValuesForAgentUpgradeBlockedReason() []string { + return []string{ + string(AgentUpgradeBlockedReasonAgentNoHeartbeat), + string(AgentUpgradeBlockedReasonAlreadyOnLatestVersion), + string(AgentUpgradeBlockedReasonDistroIsNotReported), + string(AgentUpgradeBlockedReasonDistroNotSupportedForUpgrade), + string(AgentUpgradeBlockedReasonIncompatibleApplianceVersion), + string(AgentUpgradeBlockedReasonInvalidAgentVersion), + string(AgentUpgradeBlockedReasonInvalidDriverVersion), + string(AgentUpgradeBlockedReasonMissingUpgradePath), + string(AgentUpgradeBlockedReasonNotProtected), + string(AgentUpgradeBlockedReasonProcessServerNoHeartbeat), + string(AgentUpgradeBlockedReasonRcmProxyNoHeartbeat), + string(AgentUpgradeBlockedReasonRebootRequired), + string(AgentUpgradeBlockedReasonUnknown), + string(AgentUpgradeBlockedReasonUnsupportedProtectionScenario), + } +} + +func (s *AgentUpgradeBlockedReason) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAgentUpgradeBlockedReason(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAgentUpgradeBlockedReason(input string) (*AgentUpgradeBlockedReason, error) { + vals := map[string]AgentUpgradeBlockedReason{ + "agentnoheartbeat": AgentUpgradeBlockedReasonAgentNoHeartbeat, + "alreadyonlatestversion": AgentUpgradeBlockedReasonAlreadyOnLatestVersion, + "distroisnotreported": AgentUpgradeBlockedReasonDistroIsNotReported, + "distronotsupportedforupgrade": AgentUpgradeBlockedReasonDistroNotSupportedForUpgrade, + "incompatibleapplianceversion": AgentUpgradeBlockedReasonIncompatibleApplianceVersion, + "invalidagentversion": AgentUpgradeBlockedReasonInvalidAgentVersion, + "invaliddriverversion": AgentUpgradeBlockedReasonInvalidDriverVersion, + "missingupgradepath": AgentUpgradeBlockedReasonMissingUpgradePath, + "notprotected": AgentUpgradeBlockedReasonNotProtected, + "processservernoheartbeat": AgentUpgradeBlockedReasonProcessServerNoHeartbeat, + "rcmproxynoheartbeat": AgentUpgradeBlockedReasonRcmProxyNoHeartbeat, + "rebootrequired": AgentUpgradeBlockedReasonRebootRequired, + "unknown": AgentUpgradeBlockedReasonUnknown, + "unsupportedprotectionscenario": AgentUpgradeBlockedReasonUnsupportedProtectionScenario, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AgentUpgradeBlockedReason(input) + return &out, nil +} + +type AutoProtectionOfDataDisk string + +const ( + AutoProtectionOfDataDiskDisabled AutoProtectionOfDataDisk = "Disabled" + AutoProtectionOfDataDiskEnabled AutoProtectionOfDataDisk = "Enabled" +) + +func PossibleValuesForAutoProtectionOfDataDisk() []string { + return []string{ + string(AutoProtectionOfDataDiskDisabled), + string(AutoProtectionOfDataDiskEnabled), + } +} + +func (s *AutoProtectionOfDataDisk) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAutoProtectionOfDataDisk(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAutoProtectionOfDataDisk(input string) (*AutoProtectionOfDataDisk, error) { + vals := map[string]AutoProtectionOfDataDisk{ + "disabled": AutoProtectionOfDataDiskDisabled, + "enabled": AutoProtectionOfDataDiskEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AutoProtectionOfDataDisk(input) + return &out, nil +} + +type ChurnOptionSelected string + +const ( + ChurnOptionSelectedHigh ChurnOptionSelected = "High" + ChurnOptionSelectedNormal ChurnOptionSelected = "Normal" +) + +func PossibleValuesForChurnOptionSelected() []string { + return []string{ + string(ChurnOptionSelectedHigh), + string(ChurnOptionSelectedNormal), + } +} + +func (s *ChurnOptionSelected) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseChurnOptionSelected(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseChurnOptionSelected(input string) (*ChurnOptionSelected, error) { + vals := map[string]ChurnOptionSelected{ + "high": ChurnOptionSelectedHigh, + "normal": ChurnOptionSelectedNormal, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ChurnOptionSelected(input) + return &out, nil +} + +type DisableProtectionReason string + +const ( + DisableProtectionReasonMigrationComplete DisableProtectionReason = "MigrationComplete" + DisableProtectionReasonNotSpecified DisableProtectionReason = "NotSpecified" +) + +func PossibleValuesForDisableProtectionReason() []string { + return []string{ + string(DisableProtectionReasonMigrationComplete), + string(DisableProtectionReasonNotSpecified), + } +} + +func (s *DisableProtectionReason) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDisableProtectionReason(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDisableProtectionReason(input string) (*DisableProtectionReason, error) { + vals := map[string]DisableProtectionReason{ + "migrationcomplete": DisableProtectionReasonMigrationComplete, + "notspecified": DisableProtectionReasonNotSpecified, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DisableProtectionReason(input) + return &out, nil +} + +type DiskAccountType string + +const ( + DiskAccountTypePremiumLRS DiskAccountType = "Premium_LRS" + DiskAccountTypePremiumVTwoLRS DiskAccountType = "PremiumV2_LRS" + DiskAccountTypePremiumZRS DiskAccountType = "Premium_ZRS" + DiskAccountTypeStandardLRS DiskAccountType = "Standard_LRS" + DiskAccountTypeStandardSSDLRS DiskAccountType = "StandardSSD_LRS" + DiskAccountTypeStandardSSDZRS DiskAccountType = "StandardSSD_ZRS" + DiskAccountTypeUltraSSDLRS DiskAccountType = "UltraSSD_LRS" +) + +func PossibleValuesForDiskAccountType() []string { + return []string{ + string(DiskAccountTypePremiumLRS), + string(DiskAccountTypePremiumVTwoLRS), + string(DiskAccountTypePremiumZRS), + string(DiskAccountTypeStandardLRS), + string(DiskAccountTypeStandardSSDLRS), + string(DiskAccountTypeStandardSSDZRS), + string(DiskAccountTypeUltraSSDLRS), + } +} + +func (s *DiskAccountType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDiskAccountType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDiskAccountType(input string) (*DiskAccountType, error) { + vals := map[string]DiskAccountType{ + "premium_lrs": DiskAccountTypePremiumLRS, + "premiumv2_lrs": DiskAccountTypePremiumVTwoLRS, + "premium_zrs": DiskAccountTypePremiumZRS, + "standard_lrs": DiskAccountTypeStandardLRS, + "standardssd_lrs": DiskAccountTypeStandardSSDLRS, + "standardssd_zrs": DiskAccountTypeStandardSSDZRS, + "ultrassd_lrs": DiskAccountTypeUltraSSDLRS, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DiskAccountType(input) + return &out, nil +} + +type DiskReplicationProgressHealth string + +const ( + DiskReplicationProgressHealthInProgress DiskReplicationProgressHealth = "InProgress" + DiskReplicationProgressHealthNoProgress DiskReplicationProgressHealth = "NoProgress" + DiskReplicationProgressHealthNone DiskReplicationProgressHealth = "None" + DiskReplicationProgressHealthQueued DiskReplicationProgressHealth = "Queued" + DiskReplicationProgressHealthSlowProgress DiskReplicationProgressHealth = "SlowProgress" +) + +func PossibleValuesForDiskReplicationProgressHealth() []string { + return []string{ + string(DiskReplicationProgressHealthInProgress), + string(DiskReplicationProgressHealthNoProgress), + string(DiskReplicationProgressHealthNone), + string(DiskReplicationProgressHealthQueued), + string(DiskReplicationProgressHealthSlowProgress), + } +} + +func (s *DiskReplicationProgressHealth) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDiskReplicationProgressHealth(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDiskReplicationProgressHealth(input string) (*DiskReplicationProgressHealth, error) { + vals := map[string]DiskReplicationProgressHealth{ + "inprogress": DiskReplicationProgressHealthInProgress, + "noprogress": DiskReplicationProgressHealthNoProgress, + "none": DiskReplicationProgressHealthNone, + "queued": DiskReplicationProgressHealthQueued, + "slowprogress": DiskReplicationProgressHealthSlowProgress, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DiskReplicationProgressHealth(input) + return &out, nil +} + +type DiskState string + +const ( + DiskStateInitialReplicationFailed DiskState = "InitialReplicationFailed" + DiskStateInitialReplicationPending DiskState = "InitialReplicationPending" + DiskStateProtected DiskState = "Protected" + DiskStateUnavailable DiskState = "Unavailable" +) + +func PossibleValuesForDiskState() []string { + return []string{ + string(DiskStateInitialReplicationFailed), + string(DiskStateInitialReplicationPending), + string(DiskStateProtected), + string(DiskStateUnavailable), + } +} + +func (s *DiskState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDiskState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDiskState(input string) (*DiskState, error) { + vals := map[string]DiskState{ + "initialreplicationfailed": DiskStateInitialReplicationFailed, + "initialreplicationpending": DiskStateInitialReplicationPending, + "protected": DiskStateProtected, + "unavailable": DiskStateUnavailable, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DiskState(input) + return &out, nil +} + +type EthernetAddressType string + +const ( + EthernetAddressTypeDynamic EthernetAddressType = "Dynamic" + EthernetAddressTypeStatic EthernetAddressType = "Static" +) + +func PossibleValuesForEthernetAddressType() []string { + return []string{ + string(EthernetAddressTypeDynamic), + string(EthernetAddressTypeStatic), + } +} + +func (s *EthernetAddressType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseEthernetAddressType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseEthernetAddressType(input string) (*EthernetAddressType, error) { + vals := map[string]EthernetAddressType{ + "dynamic": EthernetAddressTypeDynamic, + "static": EthernetAddressTypeStatic, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EthernetAddressType(input) + return &out, nil +} + +type HealthErrorCustomerResolvability string + +const ( + HealthErrorCustomerResolvabilityAllowed HealthErrorCustomerResolvability = "Allowed" + HealthErrorCustomerResolvabilityNotAllowed HealthErrorCustomerResolvability = "NotAllowed" +) + +func PossibleValuesForHealthErrorCustomerResolvability() []string { + return []string{ + string(HealthErrorCustomerResolvabilityAllowed), + string(HealthErrorCustomerResolvabilityNotAllowed), + } +} + +func (s *HealthErrorCustomerResolvability) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHealthErrorCustomerResolvability(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHealthErrorCustomerResolvability(input string) (*HealthErrorCustomerResolvability, error) { + vals := map[string]HealthErrorCustomerResolvability{ + "allowed": HealthErrorCustomerResolvabilityAllowed, + "notallowed": HealthErrorCustomerResolvabilityNotAllowed, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HealthErrorCustomerResolvability(input) + return &out, nil +} + +type InMageRcmFailbackRecoveryPointType string + +const ( + InMageRcmFailbackRecoveryPointTypeApplicationConsistent InMageRcmFailbackRecoveryPointType = "ApplicationConsistent" + InMageRcmFailbackRecoveryPointTypeCrashConsistent InMageRcmFailbackRecoveryPointType = "CrashConsistent" +) + +func PossibleValuesForInMageRcmFailbackRecoveryPointType() []string { + return []string{ + string(InMageRcmFailbackRecoveryPointTypeApplicationConsistent), + string(InMageRcmFailbackRecoveryPointTypeCrashConsistent), + } +} + +func (s *InMageRcmFailbackRecoveryPointType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseInMageRcmFailbackRecoveryPointType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseInMageRcmFailbackRecoveryPointType(input string) (*InMageRcmFailbackRecoveryPointType, error) { + vals := map[string]InMageRcmFailbackRecoveryPointType{ + "applicationconsistent": InMageRcmFailbackRecoveryPointTypeApplicationConsistent, + "crashconsistent": InMageRcmFailbackRecoveryPointTypeCrashConsistent, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := InMageRcmFailbackRecoveryPointType(input) + return &out, nil +} + +type LicenseType string + +const ( + LicenseTypeNoLicenseType LicenseType = "NoLicenseType" + LicenseTypeNotSpecified LicenseType = "NotSpecified" + LicenseTypeWindowsServer LicenseType = "WindowsServer" +) + +func PossibleValuesForLicenseType() []string { + return []string{ + string(LicenseTypeNoLicenseType), + string(LicenseTypeNotSpecified), + string(LicenseTypeWindowsServer), + } +} + +func (s *LicenseType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLicenseType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLicenseType(input string) (*LicenseType, error) { + vals := map[string]LicenseType{ + "nolicensetype": LicenseTypeNoLicenseType, + "notspecified": LicenseTypeNotSpecified, + "windowsserver": LicenseTypeWindowsServer, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LicenseType(input) + return &out, nil +} + +type MobilityAgentUpgradeState string + +const ( + MobilityAgentUpgradeStateCommit MobilityAgentUpgradeState = "Commit" + MobilityAgentUpgradeStateCompleted MobilityAgentUpgradeState = "Completed" + MobilityAgentUpgradeStateNone MobilityAgentUpgradeState = "None" + MobilityAgentUpgradeStateStarted MobilityAgentUpgradeState = "Started" +) + +func PossibleValuesForMobilityAgentUpgradeState() []string { + return []string{ + string(MobilityAgentUpgradeStateCommit), + string(MobilityAgentUpgradeStateCompleted), + string(MobilityAgentUpgradeStateNone), + string(MobilityAgentUpgradeStateStarted), + } +} + +func (s *MobilityAgentUpgradeState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMobilityAgentUpgradeState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMobilityAgentUpgradeState(input string) (*MobilityAgentUpgradeState, error) { + vals := map[string]MobilityAgentUpgradeState{ + "commit": MobilityAgentUpgradeStateCommit, + "completed": MobilityAgentUpgradeStateCompleted, + "none": MobilityAgentUpgradeStateNone, + "started": MobilityAgentUpgradeStateStarted, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MobilityAgentUpgradeState(input) + return &out, nil +} + +type MultiVMGroupCreateOption string + +const ( + MultiVMGroupCreateOptionAutoCreated MultiVMGroupCreateOption = "AutoCreated" + MultiVMGroupCreateOptionUserSpecified MultiVMGroupCreateOption = "UserSpecified" +) + +func PossibleValuesForMultiVMGroupCreateOption() []string { + return []string{ + string(MultiVMGroupCreateOptionAutoCreated), + string(MultiVMGroupCreateOptionUserSpecified), + } +} + +func (s *MultiVMGroupCreateOption) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMultiVMGroupCreateOption(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMultiVMGroupCreateOption(input string) (*MultiVMGroupCreateOption, error) { + vals := map[string]MultiVMGroupCreateOption{ + "autocreated": MultiVMGroupCreateOptionAutoCreated, + "userspecified": MultiVMGroupCreateOptionUserSpecified, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MultiVMGroupCreateOption(input) + return &out, nil +} + +type PlannedFailoverStatus string + +const ( + PlannedFailoverStatusCancelled PlannedFailoverStatus = "Cancelled" + PlannedFailoverStatusFailed PlannedFailoverStatus = "Failed" + PlannedFailoverStatusSucceeded PlannedFailoverStatus = "Succeeded" + PlannedFailoverStatusUnknown PlannedFailoverStatus = "Unknown" +) + +func PossibleValuesForPlannedFailoverStatus() []string { + return []string{ + string(PlannedFailoverStatusCancelled), + string(PlannedFailoverStatusFailed), + string(PlannedFailoverStatusSucceeded), + string(PlannedFailoverStatusUnknown), + } +} + +func (s *PlannedFailoverStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePlannedFailoverStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePlannedFailoverStatus(input string) (*PlannedFailoverStatus, error) { + vals := map[string]PlannedFailoverStatus{ + "cancelled": PlannedFailoverStatusCancelled, + "failed": PlannedFailoverStatusFailed, + "succeeded": PlannedFailoverStatusSucceeded, + "unknown": PlannedFailoverStatusUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PlannedFailoverStatus(input) + return &out, nil +} + +type RecoveryPointType string + +const ( + RecoveryPointTypeCustom RecoveryPointType = "Custom" + RecoveryPointTypeLatestTag RecoveryPointType = "LatestTag" + RecoveryPointTypeLatestTime RecoveryPointType = "LatestTime" +) + +func PossibleValuesForRecoveryPointType() []string { + return []string{ + string(RecoveryPointTypeCustom), + string(RecoveryPointTypeLatestTag), + string(RecoveryPointTypeLatestTime), + } +} + +func (s *RecoveryPointType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRecoveryPointType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRecoveryPointType(input string) (*RecoveryPointType, error) { + vals := map[string]RecoveryPointType{ + "custom": RecoveryPointTypeCustom, + "latesttag": RecoveryPointTypeLatestTag, + "latesttime": RecoveryPointTypeLatestTime, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RecoveryPointType(input) + return &out, nil +} + +type ResyncState string + +const ( + ResyncStateNone ResyncState = "None" + ResyncStatePreparedForResynchronization ResyncState = "PreparedForResynchronization" + ResyncStateStartedResynchronization ResyncState = "StartedResynchronization" +) + +func PossibleValuesForResyncState() []string { + return []string{ + string(ResyncStateNone), + string(ResyncStatePreparedForResynchronization), + string(ResyncStateStartedResynchronization), + } +} + +func (s *ResyncState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseResyncState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseResyncState(input string) (*ResyncState, error) { + vals := map[string]ResyncState{ + "none": ResyncStateNone, + "preparedforresynchronization": ResyncStatePreparedForResynchronization, + "startedresynchronization": ResyncStateStartedResynchronization, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ResyncState(input) + return &out, nil +} + +type SecurityConfiguration string + +const ( + SecurityConfigurationDisabled SecurityConfiguration = "Disabled" + SecurityConfigurationEnabled SecurityConfiguration = "Enabled" +) + +func PossibleValuesForSecurityConfiguration() []string { + return []string{ + string(SecurityConfigurationDisabled), + string(SecurityConfigurationEnabled), + } +} + +func (s *SecurityConfiguration) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSecurityConfiguration(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSecurityConfiguration(input string) (*SecurityConfiguration, error) { + vals := map[string]SecurityConfiguration{ + "disabled": SecurityConfigurationDisabled, + "enabled": SecurityConfigurationEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SecurityConfiguration(input) + return &out, nil +} + +type SecurityType string + +const ( + SecurityTypeConfidentialVM SecurityType = "ConfidentialVM" + SecurityTypeNone SecurityType = "None" + SecurityTypeTrustedLaunch SecurityType = "TrustedLaunch" +) + +func PossibleValuesForSecurityType() []string { + return []string{ + string(SecurityTypeConfidentialVM), + string(SecurityTypeNone), + string(SecurityTypeTrustedLaunch), + } +} + +func (s *SecurityType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSecurityType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSecurityType(input string) (*SecurityType, error) { + vals := map[string]SecurityType{ + "confidentialvm": SecurityTypeConfidentialVM, + "none": SecurityTypeNone, + "trustedlaunch": SecurityTypeTrustedLaunch, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SecurityType(input) + return &out, nil +} + +type SqlServerLicenseType string + +const ( + SqlServerLicenseTypeAHUB SqlServerLicenseType = "AHUB" + SqlServerLicenseTypeNoLicenseType SqlServerLicenseType = "NoLicenseType" + SqlServerLicenseTypeNotSpecified SqlServerLicenseType = "NotSpecified" + SqlServerLicenseTypePAYG SqlServerLicenseType = "PAYG" +) + +func PossibleValuesForSqlServerLicenseType() []string { + return []string{ + string(SqlServerLicenseTypeAHUB), + string(SqlServerLicenseTypeNoLicenseType), + string(SqlServerLicenseTypeNotSpecified), + string(SqlServerLicenseTypePAYG), + } +} + +func (s *SqlServerLicenseType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSqlServerLicenseType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSqlServerLicenseType(input string) (*SqlServerLicenseType, error) { + vals := map[string]SqlServerLicenseType{ + "ahub": SqlServerLicenseTypeAHUB, + "nolicensetype": SqlServerLicenseTypeNoLicenseType, + "notspecified": SqlServerLicenseTypeNotSpecified, + "payg": SqlServerLicenseTypePAYG, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SqlServerLicenseType(input) + return &out, nil +} + +type VMEncryptionType string + +const ( + VMEncryptionTypeNotEncrypted VMEncryptionType = "NotEncrypted" + VMEncryptionTypeOnePassEncrypted VMEncryptionType = "OnePassEncrypted" + VMEncryptionTypeTwoPassEncrypted VMEncryptionType = "TwoPassEncrypted" +) + +func PossibleValuesForVMEncryptionType() []string { + return []string{ + string(VMEncryptionTypeNotEncrypted), + string(VMEncryptionTypeOnePassEncrypted), + string(VMEncryptionTypeTwoPassEncrypted), + } +} + +func (s *VMEncryptionType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseVMEncryptionType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseVMEncryptionType(input string) (*VMEncryptionType, error) { + vals := map[string]VMEncryptionType{ + "notencrypted": VMEncryptionTypeNotEncrypted, + "onepassencrypted": VMEncryptionTypeOnePassEncrypted, + "twopassencrypted": VMEncryptionTypeTwoPassEncrypted, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := VMEncryptionType(input) + return &out, nil +} + +type VMReplicationProgressHealth string + +const ( + VMReplicationProgressHealthInProgress VMReplicationProgressHealth = "InProgress" + VMReplicationProgressHealthNoProgress VMReplicationProgressHealth = "NoProgress" + VMReplicationProgressHealthNone VMReplicationProgressHealth = "None" + VMReplicationProgressHealthSlowProgress VMReplicationProgressHealth = "SlowProgress" +) + +func PossibleValuesForVMReplicationProgressHealth() []string { + return []string{ + string(VMReplicationProgressHealthInProgress), + string(VMReplicationProgressHealthNoProgress), + string(VMReplicationProgressHealthNone), + string(VMReplicationProgressHealthSlowProgress), + } +} + +func (s *VMReplicationProgressHealth) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseVMReplicationProgressHealth(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseVMReplicationProgressHealth(input string) (*VMReplicationProgressHealth, error) { + vals := map[string]VMReplicationProgressHealth{ + "inprogress": VMReplicationProgressHealthInProgress, + "noprogress": VMReplicationProgressHealthNoProgress, + "none": VMReplicationProgressHealthNone, + "slowprogress": VMReplicationProgressHealthSlowProgress, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := VMReplicationProgressHealth(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_replicationprotecteditem.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/id_replicationprotecteditem.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_replicationprotecteditem.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/id_replicationprotecteditem.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_replicationprotectioncontainer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/id_replicationprotectioncontainer.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_replicationprotectioncontainer.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/id_replicationprotectioncontainer.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/id_vault.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_vault.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/id_vault.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_adddisks.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_adddisks.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_adddisks.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_adddisks.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_applyrecoverypoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_applyrecoverypoint.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_applyrecoverypoint.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_applyrecoverypoint.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_failovercancel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_failovercancel.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_failovercancel.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_failovercancel.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_failovercommit.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_failovercommit.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_failovercommit.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_failovercommit.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_listbyreplicationprotectioncontainers.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_listbyreplicationprotectioncontainers.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_listbyreplicationprotectioncontainers.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_listbyreplicationprotectioncontainers.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_plannedfailover.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_plannedfailover.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_plannedfailover.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_plannedfailover.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_purge.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_purge.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_purge.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_purge.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_removedisks.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_removedisks.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_removedisks.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_removedisks.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_repairreplication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_repairreplication.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_repairreplication.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_repairreplication.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_reprotect.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_reprotect.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_reprotect.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_reprotect.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_resolvehealtherrors.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_resolvehealtherrors.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_resolvehealtherrors.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_resolvehealtherrors.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_switchprovider.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_switchprovider.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_switchprovider.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_switchprovider.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_testfailover.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_testfailover.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_testfailover.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_testfailover.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_testfailovercleanup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_testfailovercleanup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_testfailovercleanup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_testfailovercleanup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_unplannedfailover.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_unplannedfailover.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_unplannedfailover.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_unplannedfailover.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_updateappliance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_updateappliance.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_updateappliance.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_updateappliance.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_updatemobilityservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_updatemobilityservice.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_updatemobilityservice.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_updatemobilityservice.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aadddisksinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aadddisksinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aadddisksinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aadddisksinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aenableprotectioninput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aenableprotectioninput.go similarity index 93% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aenableprotectioninput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aenableprotectioninput.go index bd2dc9680aed1..6d6c0bf630fd4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aenableprotectioninput.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aenableprotectioninput.go @@ -13,10 +13,12 @@ import ( var _ EnableProtectionProviderSpecificInput = A2AEnableProtectionInput{} type A2AEnableProtectionInput struct { + AutoProtectionOfDataDisk *AutoProtectionOfDataDisk `json:"autoProtectionOfDataDisk,omitempty"` DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"` FabricObjectId string `json:"fabricObjectId"` MultiVMGroupId *string `json:"multiVmGroupId,omitempty"` MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` + ProtectionClusterId *string `json:"protectionClusterId,omitempty"` RecoveryAvailabilitySetId *string `json:"recoveryAvailabilitySetId,omitempty"` RecoveryAvailabilityZone *string `json:"recoveryAvailabilityZone,omitempty"` RecoveryAzureNetworkId *string `json:"recoveryAzureNetworkId,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aprotecteddiskdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aprotecteddiskdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aprotecteddiskdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aprotecteddiskdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aprotectedmanageddiskdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aprotectedmanageddiskdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aprotectedmanageddiskdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aprotectedmanageddiskdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aremovedisksinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aremovedisksinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aremovedisksinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aremovedisksinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2areplicationdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2areplicationdetails.go similarity index 95% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2areplicationdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2areplicationdetails.go index 9b0fe1bfc9165..07d37bb3696f2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2areplicationdetails.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2areplicationdetails.go @@ -17,6 +17,7 @@ type A2AReplicationDetails struct { AgentExpiryDate *string `json:"agentExpiryDate,omitempty"` AgentVersion *string `json:"agentVersion,omitempty"` AutoProtectionOfDataDisk *AutoProtectionOfDataDisk `json:"autoProtectionOfDataDisk,omitempty"` + ChurnOptionSelected *ChurnOptionSelected `json:"churnOptionSelected,omitempty"` FabricObjectId *string `json:"fabricObjectId,omitempty"` InitialPrimaryExtendedLocation *edgezones.Model `json:"initialPrimaryExtendedLocation,omitempty"` InitialPrimaryFabricLocation *string `json:"initialPrimaryFabricLocation,omitempty"` @@ -24,6 +25,7 @@ type A2AReplicationDetails struct { InitialRecoveryExtendedLocation *edgezones.Model `json:"initialRecoveryExtendedLocation,omitempty"` InitialRecoveryFabricLocation *string `json:"initialRecoveryFabricLocation,omitempty"` InitialRecoveryZone *string `json:"initialRecoveryZone,omitempty"` + IsClusterInfraReady *bool `json:"isClusterInfraReady,omitempty"` IsReplicationAgentCertificateUpdateRequired *bool `json:"isReplicationAgentCertificateUpdateRequired,omitempty"` IsReplicationAgentUpdateRequired *bool `json:"isReplicationAgentUpdateRequired,omitempty"` LastHeartbeat *string `json:"lastHeartbeat,omitempty"` @@ -41,6 +43,7 @@ type A2AReplicationDetails struct { PrimaryFabricLocation *string `json:"primaryFabricLocation,omitempty"` ProtectedDisks *[]A2AProtectedDiskDetails `json:"protectedDisks,omitempty"` ProtectedManagedDisks *[]A2AProtectedManagedDiskDetails `json:"protectedManagedDisks,omitempty"` + ProtectionClusterId *string `json:"protectionClusterId,omitempty"` RecoveryAvailabilitySet *string `json:"recoveryAvailabilitySet,omitempty"` RecoveryAvailabilityZone *string `json:"recoveryAvailabilityZone,omitempty"` RecoveryAzureGeneration *string `json:"recoveryAzureGeneration,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2areprotectinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2areprotectinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2areprotectinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2areprotectinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2atestfailoverinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2atestfailoverinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2atestfailoverinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2atestfailoverinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aunprotecteddiskdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aunprotecteddiskdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aunprotecteddiskdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aunprotecteddiskdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2avmdiskinputdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2avmdiskinputdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2avmdiskinputdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2avmdiskinputdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2avmmanageddiskinputdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2avmmanageddiskinputdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2avmmanageddiskinputdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2avmmanageddiskinputdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2avmmanageddiskupdatedetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2avmmanageddiskupdatedetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2avmmanageddiskupdatedetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2avmmanageddiskupdatedetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_adddisksinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_adddisksinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_adddisksinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_adddisksinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_adddisksinputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_adddisksinputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_adddisksinputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_adddisksinputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_adddisksproviderspecificinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_adddisksproviderspecificinput.go similarity index 85% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_adddisksproviderspecificinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_adddisksproviderspecificinput.go index a47bc604b1d1c..639d67609c515 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_adddisksproviderspecificinput.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_adddisksproviderspecificinput.go @@ -44,6 +44,14 @@ func unmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisk return out, nil } + if strings.EqualFold(value, "InMageRcm") { + var out InMageRcmAddDisksInput + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into InMageRcmAddDisksInput: %+v", err) + } + return out, nil + } + out := RawAddDisksProviderSpecificInputImpl{ Type: value, Values: temp, diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_applyrecoverypointinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_applyrecoverypointinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_applyrecoverypointinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_applyrecoverypointinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_azuretoazurevmsyncedconfigdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_azuretoazurevmsyncedconfigdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_azuretoazurevmsyncedconfigdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_azuretoazurevmsyncedconfigdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_azurevmdiskdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_azurevmdiskdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_azurevmdiskdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_azurevmdiskdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_currentscenariodetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_currentscenariodetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_currentscenariodetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_currentscenariodetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_disableprotectioninput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_disableprotectioninput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_disableprotectioninput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_disableprotectioninput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_disableprotectioninputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_disableprotectioninputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_disableprotectioninputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_disableprotectioninputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_diskdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_diskdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_diskdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_diskdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_diskencryptioninfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_diskencryptioninfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_diskencryptioninfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_diskencryptioninfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_diskencryptionkeyinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_diskencryptionkeyinfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_diskencryptionkeyinfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_diskencryptionkeyinfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_enableprotectioninput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_enableprotectioninput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_enableprotectioninput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_enableprotectioninput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_enableprotectioninputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_enableprotectioninputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_enableprotectioninputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_enableprotectioninputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_healtherror.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_healtherror.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_healtherror.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_healtherror.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazurediskinputdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazurediskinputdetails.go similarity index 87% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazurediskinputdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazurediskinputdetails.go index ed63611334a96..907f9b0c0ddc0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazurediskinputdetails.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazurediskinputdetails.go @@ -8,4 +8,5 @@ type HyperVReplicaAzureDiskInputDetails struct { DiskId *string `json:"diskId,omitempty"` DiskType *DiskAccountType `json:"diskType,omitempty"` LogStorageAccountId *string `json:"logStorageAccountId,omitempty"` + SectorSizeInBytes *int64 `json:"sectorSizeInBytes,omitempty"` } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go similarity index 95% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go index d57f1faad3e96..24d71c7008c47 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go @@ -33,10 +33,12 @@ type HyperVReplicaAzureEnableProtectionInput struct { TargetNicTags *map[string]string `json:"targetNicTags,omitempty"` TargetProximityPlacementGroupId *string `json:"targetProximityPlacementGroupId,omitempty"` TargetStorageAccountId *string `json:"targetStorageAccountId,omitempty"` + TargetVMSecurityProfile *SecurityProfileProperties `json:"targetVmSecurityProfile,omitempty"` TargetVMSize *string `json:"targetVmSize,omitempty"` TargetVMTags *map[string]string `json:"targetVmTags,omitempty"` UseManagedDisks *string `json:"useManagedDisks,omitempty"` UseManagedDisksForReplication *string `json:"useManagedDisksForReplication,omitempty"` + UserSelectedOSName *string `json:"userSelectedOSName,omitempty"` VhdId *string `json:"vhdId,omitempty"` VirtualMachineName *string `json:"vmName,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazuremanageddiskdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazuremanageddiskdetails.go new file mode 100644 index 0000000000000..ba050c877ef8e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazuremanageddiskdetails.go @@ -0,0 +1,13 @@ +package replicationprotecteditems + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HyperVReplicaAzureManagedDiskDetails struct { + DiskEncryptionSetId *string `json:"diskEncryptionSetId,omitempty"` + DiskId *string `json:"diskId,omitempty"` + ReplicaDiskType *string `json:"replicaDiskType,omitempty"` + SectorSizeInBytes *int64 `json:"sectorSizeInBytes,omitempty"` + SeedManagedDiskId *string `json:"seedManagedDiskId,omitempty"` + TargetDiskAccountType *DiskAccountType `json:"targetDiskAccountType,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go similarity index 95% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go index 27aaf79400520..2ae80dd5540ed 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go @@ -11,6 +11,7 @@ import ( var _ PlannedFailoverProviderSpecificFailoverInput = HyperVReplicaAzurePlannedFailoverProviderInput{} type HyperVReplicaAzurePlannedFailoverProviderInput struct { + OsUpgradeVersion *string `json:"osUpgradeVersion,omitempty"` PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"` RecoveryPointId *string `json:"recoveryPointId,omitempty"` SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go new file mode 100644 index 0000000000000..059d67099971a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go @@ -0,0 +1,75 @@ +package replicationprotecteditems + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ ReplicationProviderSpecificSettings = HyperVReplicaAzureReplicationDetails{} + +type HyperVReplicaAzureReplicationDetails struct { + AllAvailableOSUpgradeConfigurations *[]OSUpgradeSupportedVersions `json:"allAvailableOSUpgradeConfigurations,omitempty"` + AzureVMDiskDetails *[]AzureVMDiskDetails `json:"azureVmDiskDetails,omitempty"` + EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"` + Encryption *string `json:"encryption,omitempty"` + InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` + LastRecoveryPointReceived *string `json:"lastRecoveryPointReceived,omitempty"` + LastReplicatedTime *string `json:"lastReplicatedTime,omitempty"` + LastRpoCalculatedTime *string `json:"lastRpoCalculatedTime,omitempty"` + LicenseType *string `json:"licenseType,omitempty"` + OSDetails *OSDetails `json:"oSDetails,omitempty"` + ProtectedManagedDisks *[]HyperVReplicaAzureManagedDiskDetails `json:"protectedManagedDisks,omitempty"` + RecoveryAvailabilitySetId *string `json:"recoveryAvailabilitySetId,omitempty"` + RecoveryAzureLogStorageAccountId *string `json:"recoveryAzureLogStorageAccountId,omitempty"` + RecoveryAzureResourceGroupId *string `json:"recoveryAzureResourceGroupId,omitempty"` + RecoveryAzureStorageAccount *string `json:"recoveryAzureStorageAccount,omitempty"` + RecoveryAzureVMName *string `json:"recoveryAzureVmName,omitempty"` + RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` + RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` + SeedManagedDiskTags *map[string]string `json:"seedManagedDiskTags,omitempty"` + SelectedRecoveryAzureNetworkId *string `json:"selectedRecoveryAzureNetworkId,omitempty"` + SelectedSourceNicId *string `json:"selectedSourceNicId,omitempty"` + SourceVMCPUCount *int64 `json:"sourceVmCpuCount,omitempty"` + SourceVMRamSizeInMB *int64 `json:"sourceVmRamSizeInMB,omitempty"` + SqlServerLicenseType *string `json:"sqlServerLicenseType,omitempty"` + TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"` + TargetManagedDiskTags *map[string]string `json:"targetManagedDiskTags,omitempty"` + TargetNicTags *map[string]string `json:"targetNicTags,omitempty"` + TargetProximityPlacementGroupId *string `json:"targetProximityPlacementGroupId,omitempty"` + TargetVMSecurityProfile *SecurityProfileProperties `json:"targetVmSecurityProfile,omitempty"` + TargetVMTags *map[string]string `json:"targetVmTags,omitempty"` + UseManagedDisks *string `json:"useManagedDisks,omitempty"` + VMId *string `json:"vmId,omitempty"` + VMNics *[]VMNicDetails `json:"vmNics,omitempty"` + VMProtectionState *string `json:"vmProtectionState,omitempty"` + VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` + + // Fields inherited from ReplicationProviderSpecificSettings +} + +var _ json.Marshaler = HyperVReplicaAzureReplicationDetails{} + +func (s HyperVReplicaAzureReplicationDetails) MarshalJSON() ([]byte, error) { + type wrapper HyperVReplicaAzureReplicationDetails + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HyperVReplicaAzureReplicationDetails: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureReplicationDetails: %+v", err) + } + decoded["instanceType"] = "HyperVReplicaAzure" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HyperVReplicaAzureReplicationDetails: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go similarity index 95% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go index 6bc556ad0bfa8..c19155908d993 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go @@ -11,6 +11,7 @@ import ( var _ TestFailoverProviderSpecificInput = HyperVReplicaAzureTestFailoverInput{} type HyperVReplicaAzureTestFailoverInput struct { + OsUpgradeVersion *string `json:"osUpgradeVersion,omitempty"` PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"` RecoveryPointId *string `json:"recoveryPointId,omitempty"` SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_initialreplicationdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_initialreplicationdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_initialreplicationdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_initialreplicationdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageagentdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageagentdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageagentdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageagentdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2diskinputdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2diskinputdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2diskinputdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2diskinputdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2manageddiskdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2manageddiskdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2manageddiskdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2manageddiskdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2protecteddiskdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2protecteddiskdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2protecteddiskdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2protecteddiskdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go new file mode 100644 index 0000000000000..da843844162f7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go @@ -0,0 +1,110 @@ +package replicationprotecteditems + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ ReplicationProviderSpecificSettings = InMageAzureV2ReplicationDetails{} + +type InMageAzureV2ReplicationDetails struct { + AgentExpiryDate *string `json:"agentExpiryDate,omitempty"` + AgentVersion *string `json:"agentVersion,omitempty"` + AllAvailableOSUpgradeConfigurations *[]OSUpgradeSupportedVersions `json:"allAvailableOSUpgradeConfigurations,omitempty"` + AzureVMDiskDetails *[]AzureVMDiskDetails `json:"azureVMDiskDetails,omitempty"` + AzureVMGeneration *string `json:"azureVmGeneration,omitempty"` + CompressedDataRateInMB *float64 `json:"compressedDataRateInMB,omitempty"` + DataStores *[]string `json:"datastores,omitempty"` + DiscoveryType *string `json:"discoveryType,omitempty"` + DiskResized *string `json:"diskResized,omitempty"` + EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"` + FirmwareType *string `json:"firmwareType,omitempty"` + IPAddress *string `json:"ipAddress,omitempty"` + InfrastructureVMId *string `json:"infrastructureVmId,omitempty"` + IsAdditionalStatsAvailable *bool `json:"isAdditionalStatsAvailable,omitempty"` + IsAgentUpdateRequired *string `json:"isAgentUpdateRequired,omitempty"` + IsRebootAfterUpdateRequired *string `json:"isRebootAfterUpdateRequired,omitempty"` + LastHeartbeat *string `json:"lastHeartbeat,omitempty"` + LastRecoveryPointReceived *string `json:"lastRecoveryPointReceived,omitempty"` + LastRpoCalculatedTime *string `json:"lastRpoCalculatedTime,omitempty"` + LastUpdateReceivedTime *string `json:"lastUpdateReceivedTime,omitempty"` + LicenseType *string `json:"licenseType,omitempty"` + MasterTargetId *string `json:"masterTargetId,omitempty"` + MultiVMGroupId *string `json:"multiVmGroupId,omitempty"` + MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` + MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` + OsDiskId *string `json:"osDiskId,omitempty"` + OsName *string `json:"osName,omitempty"` + OsType *string `json:"osType,omitempty"` + OsVersion *string `json:"osVersion,omitempty"` + ProcessServerId *string `json:"processServerId,omitempty"` + ProcessServerName *string `json:"processServerName,omitempty"` + ProtectedDisks *[]InMageAzureV2ProtectedDiskDetails `json:"protectedDisks,omitempty"` + ProtectedManagedDisks *[]InMageAzureV2ManagedDiskDetails `json:"protectedManagedDisks,omitempty"` + ProtectionStage *string `json:"protectionStage,omitempty"` + RecoveryAvailabilitySetId *string `json:"recoveryAvailabilitySetId,omitempty"` + RecoveryAzureLogStorageAccountId *string `json:"recoveryAzureLogStorageAccountId,omitempty"` + RecoveryAzureResourceGroupId *string `json:"recoveryAzureResourceGroupId,omitempty"` + RecoveryAzureStorageAccount *string `json:"recoveryAzureStorageAccount,omitempty"` + RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"` + RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` + ReplicaId *string `json:"replicaId,omitempty"` + ResyncProgressPercentage *int64 `json:"resyncProgressPercentage,omitempty"` + RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` + SeedManagedDiskTags *map[string]string `json:"seedManagedDiskTags,omitempty"` + SelectedRecoveryAzureNetworkId *string `json:"selectedRecoveryAzureNetworkId,omitempty"` + SelectedSourceNicId *string `json:"selectedSourceNicId,omitempty"` + SelectedTfoAzureNetworkId *string `json:"selectedTfoAzureNetworkId,omitempty"` + SourceVMCPUCount *int64 `json:"sourceVmCpuCount,omitempty"` + SourceVMRamSizeInMB *int64 `json:"sourceVmRamSizeInMB,omitempty"` + SqlServerLicenseType *string `json:"sqlServerLicenseType,omitempty"` + SupportedOSVersions *[]string `json:"supportedOSVersions,omitempty"` + SwitchProviderBlockingErrorDetails *[]InMageAzureV2SwitchProviderBlockingErrorDetails `json:"switchProviderBlockingErrorDetails,omitempty"` + SwitchProviderDetails *InMageAzureV2SwitchProviderDetails `json:"switchProviderDetails,omitempty"` + TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"` + TargetManagedDiskTags *map[string]string `json:"targetManagedDiskTags,omitempty"` + TargetNicTags *map[string]string `json:"targetNicTags,omitempty"` + TargetProximityPlacementGroupId *string `json:"targetProximityPlacementGroupId,omitempty"` + TargetVMId *string `json:"targetVmId,omitempty"` + TargetVMTags *map[string]string `json:"targetVmTags,omitempty"` + TotalDataTransferred *int64 `json:"totalDataTransferred,omitempty"` + TotalProgressHealth *string `json:"totalProgressHealth,omitempty"` + UncompressedDataRateInMB *float64 `json:"uncompressedDataRateInMB,omitempty"` + UseManagedDisks *string `json:"useManagedDisks,omitempty"` + VCenterInfrastructureId *string `json:"vCenterInfrastructureId,omitempty"` + VMId *string `json:"vmId,omitempty"` + VMNics *[]VMNicDetails `json:"vmNics,omitempty"` + VMProtectionState *string `json:"vmProtectionState,omitempty"` + VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` + ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` + VhdName *string `json:"vhdName,omitempty"` + + // Fields inherited from ReplicationProviderSpecificSettings +} + +var _ json.Marshaler = InMageAzureV2ReplicationDetails{} + +func (s InMageAzureV2ReplicationDetails) MarshalJSON() ([]byte, error) { + type wrapper InMageAzureV2ReplicationDetails + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling InMageAzureV2ReplicationDetails: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling InMageAzureV2ReplicationDetails: %+v", err) + } + decoded["instanceType"] = "InMageAzureV2" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling InMageAzureV2ReplicationDetails: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2switchproviderblockingerrordetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2switchproviderblockingerrordetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2switchproviderblockingerrordetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2switchproviderblockingerrordetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2switchproviderdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2switchproviderdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2switchproviderdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2switchproviderdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go similarity index 90% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go index cedd7a7a713f9..ff6a69049d850 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go @@ -11,7 +11,8 @@ import ( var _ TestFailoverProviderSpecificInput = InMageAzureV2TestFailoverInput{} type InMageAzureV2TestFailoverInput struct { - RecoveryPointId *string `json:"recoveryPointId,omitempty"` + OsUpgradeVersion *string `json:"osUpgradeVersion,omitempty"` + RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go similarity index 90% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go index 5879981c9931f..1fb6ca5b17109 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go @@ -11,7 +11,8 @@ import ( var _ UnplannedFailoverProviderSpecificInput = InMageAzureV2UnplannedFailoverInput{} type InMageAzureV2UnplannedFailoverInput struct { - RecoveryPointId *string `json:"recoveryPointId,omitempty"` + OsUpgradeVersion *string `json:"osUpgradeVersion,omitempty"` + RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagediskexclusioninput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagediskexclusioninput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagediskexclusioninput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagediskexclusioninput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagedisksignatureexclusionoptions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagedisksignatureexclusionoptions.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagedisksignatureexclusionoptions.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagedisksignatureexclusionoptions.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageenableprotectioninput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageenableprotectioninput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageenableprotectioninput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageenableprotectioninput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageprotecteddiskdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageprotecteddiskdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageprotecteddiskdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageprotecteddiskdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmadddisksinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmadddisksinput.go new file mode 100644 index 0000000000000..f053ccd3c1213 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmadddisksinput.go @@ -0,0 +1,41 @@ +package replicationprotecteditems + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ AddDisksProviderSpecificInput = InMageRcmAddDisksInput{} + +type InMageRcmAddDisksInput struct { + Disks []InMageRcmDiskInput `json:"disks"` + + // Fields inherited from AddDisksProviderSpecificInput +} + +var _ json.Marshaler = InMageRcmAddDisksInput{} + +func (s InMageRcmAddDisksInput) MarshalJSON() ([]byte, error) { + type wrapper InMageRcmAddDisksInput + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling InMageRcmAddDisksInput: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling InMageRcmAddDisksInput: %+v", err) + } + decoded["instanceType"] = "InMageRcm" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling InMageRcmAddDisksInput: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmagentupgradeblockingerrordetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmagentupgradeblockingerrordetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmagentupgradeblockingerrordetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmagentupgradeblockingerrordetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmdiscoveredprotectedvmdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmdiscoveredprotectedvmdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmdiscoveredprotectedvmdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmdiscoveredprotectedvmdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmdiskinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmdiskinput.go similarity index 86% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmdiskinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmdiskinput.go index 083eabe8d9ad5..3e82fd2c7d40b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmdiskinput.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmdiskinput.go @@ -8,4 +8,5 @@ type InMageRcmDiskInput struct { DiskId string `json:"diskId"` DiskType DiskAccountType `json:"diskType"` LogStorageAccountId string `json:"logStorageAccountId"` + SectorSizeInBytes *int64 `json:"sectorSizeInBytes,omitempty"` } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmdisksdefaultinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmdisksdefaultinput.go similarity index 85% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmdisksdefaultinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmdisksdefaultinput.go index 64213070d05f7..b74d47bf9066c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmdisksdefaultinput.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmdisksdefaultinput.go @@ -7,4 +7,5 @@ type InMageRcmDisksDefaultInput struct { DiskEncryptionSetId *string `json:"diskEncryptionSetId,omitempty"` DiskType DiskAccountType `json:"diskType"` LogStorageAccountId string `json:"logStorageAccountId"` + SectorSizeInBytes *int64 `json:"sectorSizeInBytes,omitempty"` } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go similarity index 80% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go index aaf09991d8167..0da00ccef4074 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go @@ -18,17 +18,24 @@ type InMageRcmEnableProtectionInput struct { MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` ProcessServerId string `json:"processServerId"` RunAsAccountId *string `json:"runAsAccountId,omitempty"` + SeedManagedDiskTags *[]UserCreatedResourceTag `json:"seedManagedDiskTags,omitempty"` + SqlServerLicenseType *SqlServerLicenseType `json:"sqlServerLicenseType,omitempty"` TargetAvailabilitySetId *string `json:"targetAvailabilitySetId,omitempty"` TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"` TargetBootDiagnosticsStorageAccountId *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"` + TargetManagedDiskTags *[]UserCreatedResourceTag `json:"targetManagedDiskTags,omitempty"` TargetNetworkId *string `json:"targetNetworkId,omitempty"` + TargetNicTags *[]UserCreatedResourceTag `json:"targetNicTags,omitempty"` TargetProximityPlacementGroupId *string `json:"targetProximityPlacementGroupId,omitempty"` TargetResourceGroupId string `json:"targetResourceGroupId"` TargetSubnetName *string `json:"targetSubnetName,omitempty"` TargetVMName *string `json:"targetVmName,omitempty"` + TargetVMSecurityProfile *SecurityProfileProperties `json:"targetVmSecurityProfile,omitempty"` TargetVMSize *string `json:"targetVmSize,omitempty"` + TargetVMTags *[]UserCreatedResourceTag `json:"targetVmTags,omitempty"` TestNetworkId *string `json:"testNetworkId,omitempty"` TestSubnetName *string `json:"testSubnetName,omitempty"` + UserSelectedOSName *string `json:"userSelectedOSName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbackdiscoveredprotectedvmdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbackdiscoveredprotectedvmdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbackdiscoveredprotectedvmdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbackdiscoveredprotectedvmdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbackmobilityagentdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbackmobilityagentdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbackmobilityagentdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbackmobilityagentdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbacknicdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbacknicdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbacknicdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbacknicdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbackprotecteddiskdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbackprotecteddiskdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbackprotecteddiskdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbackprotecteddiskdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbacksyncdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbacksyncdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbacksyncdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbacksyncdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmlastagentupgradeerrordetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmlastagentupgradeerrordetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmlastagentupgradeerrordetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmlastagentupgradeerrordetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmmobilityagentdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmmobilityagentdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmmobilityagentdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmmobilityagentdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmnicdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmnicdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmnicdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmnicdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmnicinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmnicinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmnicinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmnicinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmprotecteddiskdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmprotecteddiskdetails.go similarity index 85% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmprotecteddiskdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmprotecteddiskdetails.go index c592b09c3dd44..9d77f1ee74da0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmprotecteddiskdetails.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmprotecteddiskdetails.go @@ -5,17 +5,20 @@ package replicationprotecteditems type InMageRcmProtectedDiskDetails struct { CapacityInBytes *int64 `json:"capacityInBytes,omitempty"` + CustomTargetDiskName *string `json:"customTargetDiskName,omitempty"` DataPendingAtSourceAgentInMB *float64 `json:"dataPendingAtSourceAgentInMB,omitempty"` DataPendingInLogDataStoreInMB *float64 `json:"dataPendingInLogDataStoreInMB,omitempty"` DiskEncryptionSetId *string `json:"diskEncryptionSetId,omitempty"` DiskId *string `json:"diskId,omitempty"` DiskName *string `json:"diskName,omitempty"` + DiskState *DiskState `json:"diskState,omitempty"` DiskType *DiskAccountType `json:"diskType,omitempty"` IrDetails *InMageRcmSyncDetails `json:"irDetails,omitempty"` IsInitialReplicationComplete *string `json:"isInitialReplicationComplete,omitempty"` IsOSDisk *string `json:"isOSDisk,omitempty"` LogStorageAccountId *string `json:"logStorageAccountId,omitempty"` ResyncDetails *InMageRcmSyncDetails `json:"resyncDetails,omitempty"` + SectorSizeInBytes *int64 `json:"sectorSizeInBytes,omitempty"` SeedBlobUri *string `json:"seedBlobUri,omitempty"` SeedManagedDiskId *string `json:"seedManagedDiskId,omitempty"` TargetManagedDiskId *string `json:"targetManagedDiskId,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmreplicationdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmreplicationdetails.go similarity index 87% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmreplicationdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmreplicationdetails.go index 8d8f494fcff61..77dcdab47c004 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmreplicationdetails.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmreplicationdetails.go @@ -37,6 +37,7 @@ type InMageRcmReplicationDetails struct { LicenseType *string `json:"licenseType,omitempty"` MobilityAgentDetails *InMageRcmMobilityAgentDetails `json:"mobilityAgentDetails,omitempty"` MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` + OsName *string `json:"osName,omitempty"` OsType *string `json:"osType,omitempty"` PrimaryNicIPAddress *string `json:"primaryNicIpAddress,omitempty"` ProcessServerId *string `json:"processServerId,omitempty"` @@ -50,18 +51,26 @@ type InMageRcmReplicationDetails struct { ResyncState *ResyncState `json:"resyncState,omitempty"` ResyncTransferredBytes *int64 `json:"resyncTransferredBytes,omitempty"` RunAsAccountId *string `json:"runAsAccountId,omitempty"` + SeedManagedDiskTags *[]UserCreatedResourceTag `json:"seedManagedDiskTags,omitempty"` + SqlServerLicenseType *string `json:"sqlServerLicenseType,omitempty"` StorageAccountId *string `json:"storageAccountId,omitempty"` + SupportedOSVersions *[]string `json:"supportedOSVersions,omitempty"` TargetAvailabilitySetId *string `json:"targetAvailabilitySetId,omitempty"` TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"` TargetBootDiagnosticsStorageAccountId *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"` TargetGeneration *string `json:"targetGeneration,omitempty"` TargetLocation *string `json:"targetLocation,omitempty"` + TargetManagedDiskTags *[]UserCreatedResourceTag `json:"targetManagedDiskTags,omitempty"` TargetNetworkId *string `json:"targetNetworkId,omitempty"` + TargetNicTags *[]UserCreatedResourceTag `json:"targetNicTags,omitempty"` TargetProximityPlacementGroupId *string `json:"targetProximityPlacementGroupId,omitempty"` TargetResourceGroupId *string `json:"targetResourceGroupId,omitempty"` TargetVMName *string `json:"targetVmName,omitempty"` + TargetVMSecurityProfile *SecurityProfileProperties `json:"targetVmSecurityProfile,omitempty"` TargetVMSize *string `json:"targetVmSize,omitempty"` + TargetVMTags *[]UserCreatedResourceTag `json:"targetVmTags,omitempty"` TestNetworkId *string `json:"testNetworkId,omitempty"` + UnprotectedDisks *[]InMageRcmUnProtectedDiskDetails `json:"unprotectedDisks,omitempty"` VMNics *[]InMageRcmNicDetails `json:"vmNics,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmreprotectinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmreprotectinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmreprotectinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmreprotectinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmsyncdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmsyncdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmsyncdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmsyncdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmunprotecteddiskdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmunprotecteddiskdetails.go new file mode 100644 index 0000000000000..95242854fa8d9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmunprotecteddiskdetails.go @@ -0,0 +1,10 @@ +package replicationprotecteditems + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InMageRcmUnProtectedDiskDetails struct { + CapacityInBytes *int64 `json:"capacityInBytes,omitempty"` + DiskId *string `json:"diskId,omitempty"` + DiskName *string `json:"diskName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go new file mode 100644 index 0000000000000..531bf039cf411 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go @@ -0,0 +1,55 @@ +package replicationprotecteditems + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ UpdateReplicationProtectedItemProviderInput = InMageRcmUpdateReplicationProtectedItemInput{} + +type InMageRcmUpdateReplicationProtectedItemInput struct { + LicenseType *LicenseType `json:"licenseType,omitempty"` + SqlServerLicenseType *SqlServerLicenseType `json:"sqlServerLicenseType,omitempty"` + TargetAvailabilitySetId *string `json:"targetAvailabilitySetId,omitempty"` + TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"` + TargetBootDiagnosticsStorageAccountId *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"` + TargetManagedDiskTags *[]UserCreatedResourceTag `json:"targetManagedDiskTags,omitempty"` + TargetNetworkId *string `json:"targetNetworkId,omitempty"` + TargetNicTags *[]UserCreatedResourceTag `json:"targetNicTags,omitempty"` + TargetProximityPlacementGroupId *string `json:"targetProximityPlacementGroupId,omitempty"` + TargetResourceGroupId *string `json:"targetResourceGroupId,omitempty"` + TargetVMName *string `json:"targetVmName,omitempty"` + TargetVMSize *string `json:"targetVmSize,omitempty"` + TargetVMTags *[]UserCreatedResourceTag `json:"targetVmTags,omitempty"` + TestNetworkId *string `json:"testNetworkId,omitempty"` + VMNics *[]InMageRcmNicInput `json:"vmNics,omitempty"` + + // Fields inherited from UpdateReplicationProtectedItemProviderInput +} + +var _ json.Marshaler = InMageRcmUpdateReplicationProtectedItemInput{} + +func (s InMageRcmUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { + type wrapper InMageRcmUpdateReplicationProtectedItemInput + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling InMageRcmUpdateReplicationProtectedItemInput: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling InMageRcmUpdateReplicationProtectedItemInput: %+v", err) + } + decoded["instanceType"] = "InMageRcm" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling InMageRcmUpdateReplicationProtectedItemInput: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagereplicationdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagereplicationdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagereplicationdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagereplicationdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagereprotectinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagereprotectinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagereprotectinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagereprotectinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagetestfailoverinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagetestfailoverinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagetestfailoverinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagetestfailoverinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagevolumeexclusionoptions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagevolumeexclusionoptions.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagevolumeexclusionoptions.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagevolumeexclusionoptions.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_innerhealtherror.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_innerhealtherror.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_innerhealtherror.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_innerhealtherror.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inputendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inputendpoint.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inputendpoint.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inputendpoint.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_ipconfigdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_ipconfigdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_ipconfigdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_ipconfigdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_ipconfiginputdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_ipconfiginputdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_ipconfiginputdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_ipconfiginputdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_keyencryptionkeyinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_keyencryptionkeyinfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_keyencryptionkeyinfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_keyencryptionkeyinfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_osdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_osdetails.go new file mode 100644 index 0000000000000..141a3f39061d9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_osdetails.go @@ -0,0 +1,14 @@ +package replicationprotecteditems + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OSDetails struct { + OSMajorVersion *string `json:"oSMajorVersion,omitempty"` + OSMinorVersion *string `json:"oSMinorVersion,omitempty"` + OSVersion *string `json:"oSVersion,omitempty"` + OsEdition *string `json:"osEdition,omitempty"` + OsType *string `json:"osType,omitempty"` + ProductType *string `json:"productType,omitempty"` + UserSelectedOSName *string `json:"userSelectedOSName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_osdiskdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_osdiskdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_osdiskdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_osdiskdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_osupgradesupportedversions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_osupgradesupportedversions.go new file mode 100644 index 0000000000000..c67f7c6cdc9a2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_osupgradesupportedversions.go @@ -0,0 +1,9 @@ +package replicationprotecteditems + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OSUpgradeSupportedVersions struct { + SupportedSourceOsVersion *string `json:"supportedSourceOsVersion,omitempty"` + SupportedTargetOsVersions *[]string `json:"supportedTargetOsVersions,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_plannedfailoverinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_plannedfailoverinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_plannedfailoverinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_plannedfailoverinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_plannedfailoverinputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_plannedfailoverinputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_plannedfailoverinputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_plannedfailoverinputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_removedisksinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_removedisksinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_removedisksinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_removedisksinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_removedisksinputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_removedisksinputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_removedisksinputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_removedisksinputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_removedisksproviderspecificinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_removedisksproviderspecificinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_removedisksproviderspecificinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_removedisksproviderspecificinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_replicationprotecteditem.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_replicationprotecteditem.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_replicationprotecteditem.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_replicationprotecteditem.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_replicationprotecteditemproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_replicationprotecteditemproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_replicationprotecteditemproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_replicationprotecteditemproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_replicationproviderspecificsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_replicationproviderspecificsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_replicationproviderspecificsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_replicationproviderspecificsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_resolvehealtherror.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_resolvehealtherror.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_resolvehealtherror.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_resolvehealtherror.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_resolvehealthinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_resolvehealthinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_resolvehealthinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_resolvehealthinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_resolvehealthinputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_resolvehealthinputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_resolvehealthinputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_resolvehealthinputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_reversereplicationinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_reversereplicationinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_reversereplicationinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_reversereplicationinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_reversereplicationinputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_reversereplicationinputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_reversereplicationinputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_reversereplicationinputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_securityprofileproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_securityprofileproperties.go new file mode 100644 index 0000000000000..d51860996d83e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_securityprofileproperties.go @@ -0,0 +1,12 @@ +package replicationprotecteditems + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecurityProfileProperties struct { + TargetVMConfidentialEncryption *SecurityConfiguration `json:"targetVmConfidentialEncryption,omitempty"` + TargetVMMonitoring *SecurityConfiguration `json:"targetVmMonitoring,omitempty"` + TargetVMSecureBoot *SecurityConfiguration `json:"targetVmSecureBoot,omitempty"` + TargetVMSecurityType *SecurityType `json:"targetVmSecurityType,omitempty"` + TargetVMTpm *SecurityConfiguration `json:"targetVmTpm,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_switchproviderinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_switchproviderinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_switchproviderinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_switchproviderinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_switchproviderinputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_switchproviderinputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_switchproviderinputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_switchproviderinputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_testfailovercleanupinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_testfailovercleanupinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_testfailovercleanupinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_testfailovercleanupinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_testfailovercleanupinputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_testfailovercleanupinputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_testfailovercleanupinputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_testfailovercleanupinputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_testfailoverinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_testfailoverinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_testfailoverinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_testfailoverinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_testfailoverinputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_testfailoverinputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_testfailoverinputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_testfailoverinputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_unplannedfailoverinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_unplannedfailoverinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_unplannedfailoverinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_unplannedfailoverinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updatediskinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updatediskinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updatediskinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updatediskinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updatemobilityservicerequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updatemobilityservicerequest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updatemobilityservicerequest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updatemobilityservicerequest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updatemobilityservicerequestproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updatemobilityservicerequestproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updatemobilityservicerequestproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updatemobilityservicerequestproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updatereplicationprotectediteminput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updatereplicationprotectediteminput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updatereplicationprotectediteminput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updatereplicationprotectediteminput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_usercreatedresourcetag.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_usercreatedresourcetag.go new file mode 100644 index 0000000000000..675f4368cc03c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_usercreatedresourcetag.go @@ -0,0 +1,9 @@ +package replicationprotecteditems + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UserCreatedResourceTag struct { + TagName *string `json:"tagName,omitempty"` + TagValue *string `json:"tagValue,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_vmnicdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_vmnicdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_vmnicdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_vmnicdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_vmnicinputdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_vmnicinputdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_vmnicinputdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_vmnicinputdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/version.go new file mode 100644 index 0000000000000..bf5c397de1c8c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/version.go @@ -0,0 +1,12 @@ +package replicationprotecteditems + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-04-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotecteditems/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/README.md new file mode 100644 index 0000000000000..55320a0d137a5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/README.md @@ -0,0 +1,133 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings` Documentation + +The `replicationprotectioncontainermappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings" +``` + + +### Client Initialization + +```go +client := replicationprotectioncontainermappings.NewReplicationProtectionContainerMappingsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ReplicationProtectionContainerMappingsClient.Create` + +```go +ctx := context.TODO() +id := replicationprotectioncontainermappings.NewReplicationProtectionContainerMappingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectionContainerMappingValue") + +payload := replicationprotectioncontainermappings.CreateProtectionContainerMappingInput{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationProtectionContainerMappingsClient.Delete` + +```go +ctx := context.TODO() +id := replicationprotectioncontainermappings.NewReplicationProtectionContainerMappingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectionContainerMappingValue") + +payload := replicationprotectioncontainermappings.RemoveProtectionContainerMappingInput{ + // ... +} + + +if err := client.DeleteThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationProtectionContainerMappingsClient.Get` + +```go +ctx := context.TODO() +id := replicationprotectioncontainermappings.NewReplicationProtectionContainerMappingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectionContainerMappingValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ReplicationProtectionContainerMappingsClient.List` + +```go +ctx := context.TODO() +id := replicationprotectioncontainermappings.NewVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ReplicationProtectionContainerMappingsClient.ListByReplicationProtectionContainers` + +```go +ctx := context.TODO() +id := replicationprotectioncontainermappings.NewReplicationProtectionContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue") + +// alternatively `client.ListByReplicationProtectionContainers(ctx, id)` can be used to do batched pagination +items, err := client.ListByReplicationProtectionContainersComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ReplicationProtectionContainerMappingsClient.Purge` + +```go +ctx := context.TODO() +id := replicationprotectioncontainermappings.NewReplicationProtectionContainerMappingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectionContainerMappingValue") + +if err := client.PurgeThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationProtectionContainerMappingsClient.Update` + +```go +ctx := context.TODO() +id := replicationprotectioncontainermappings.NewReplicationProtectionContainerMappingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationProtectionContainerMappingValue") + +payload := replicationprotectioncontainermappings.UpdateProtectionContainerMappingInput{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/id_vault.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_vault.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/id_vault.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/method_listbyreplicationprotectioncontainers.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/method_listbyreplicationprotectioncontainers.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/method_listbyreplicationprotectioncontainers.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/method_listbyreplicationprotectioncontainers.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/method_purge.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/method_purge.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/method_purge.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/method_purge.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_healtherror.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_healtherror.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_healtherror.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_healtherror.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_innerhealtherror.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_innerhealtherror.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_innerhealtherror.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_innerhealtherror.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_protectioncontainermapping.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_protectioncontainermapping.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_protectioncontainermapping.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_protectioncontainermapping.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_removeprotectioncontainermappinginput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_removeprotectioncontainermappinginput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_removeprotectioncontainermappinginput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_removeprotectioncontainermappinginput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_removeprotectioncontainermappinginputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_removeprotectioncontainermappinginputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_removeprotectioncontainermappinginputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_removeprotectioncontainermappinginputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_replicationprovidercontainerunmappinginput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_replicationprovidercontainerunmappinginput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_replicationprovidercontainerunmappinginput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_replicationprovidercontainerunmappinginput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go similarity index 95% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go index 56a78f2c528dc..29bd438cf42d5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go @@ -11,6 +11,7 @@ import ( var _ ProtectionContainerMappingProviderSpecificDetails = VMwareCbtProtectionContainerMappingDetails{} type VMwareCbtProtectionContainerMappingDetails struct { + ExcludedSkus *[]string `json:"excludedSkus,omitempty"` KeyVaultId *string `json:"keyVaultId,omitempty"` KeyVaultUri *string `json:"keyVaultUri,omitempty"` RoleSizeToNicCountMap *map[string]int64 `json:"roleSizeToNicCountMap,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/version.go new file mode 100644 index 0000000000000..bff3e96cbcb34 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/version.go @@ -0,0 +1,12 @@ +package replicationprotectioncontainermappings + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-04-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectioncontainermappings/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/README.md new file mode 100644 index 0000000000000..0ba3feccef53d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/README.md @@ -0,0 +1,150 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers` Documentation + +The `replicationprotectioncontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers" +``` + + +### Client Initialization + +```go +client := replicationprotectioncontainers.NewReplicationProtectionContainersClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ReplicationProtectionContainersClient.Create` + +```go +ctx := context.TODO() +id := replicationprotectioncontainers.NewReplicationProtectionContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue") + +payload := replicationprotectioncontainers.CreateProtectionContainerInput{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationProtectionContainersClient.Delete` + +```go +ctx := context.TODO() +id := replicationprotectioncontainers.NewReplicationProtectionContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationProtectionContainersClient.DiscoverProtectableItem` + +```go +ctx := context.TODO() +id := replicationprotectioncontainers.NewReplicationProtectionContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue") + +payload := replicationprotectioncontainers.DiscoverProtectableItemRequest{ + // ... +} + + +if err := client.DiscoverProtectableItemThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationProtectionContainersClient.Get` + +```go +ctx := context.TODO() +id := replicationprotectioncontainers.NewReplicationProtectionContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ReplicationProtectionContainersClient.List` + +```go +ctx := context.TODO() +id := replicationprotectioncontainers.NewVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ReplicationProtectionContainersClient.ListByReplicationFabrics` + +```go +ctx := context.TODO() +id := replicationprotectioncontainers.NewReplicationFabricID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue") + +// alternatively `client.ListByReplicationFabrics(ctx, id)` can be used to do batched pagination +items, err := client.ListByReplicationFabricsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ReplicationProtectionContainersClient.SwitchClusterProtection` + +```go +ctx := context.TODO() +id := replicationprotectioncontainers.NewReplicationProtectionContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue") + +payload := replicationprotectioncontainers.SwitchClusterProtectionInput{ + // ... +} + + +if err := client.SwitchClusterProtectionThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationProtectionContainersClient.SwitchProtection` + +```go +ctx := context.TODO() +id := replicationprotectioncontainers.NewReplicationProtectionContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue") + +payload := replicationprotectioncontainers.SwitchProtectionInput{ + // ... +} + + +if err := client.SwitchProtectionThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_replicationfabric.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/id_replicationfabric.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_replicationfabric.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/id_replicationfabric.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/id_vault.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_vault.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/id_vault.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/method_discoverprotectableitem.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/method_discoverprotectableitem.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/method_discoverprotectableitem.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/method_discoverprotectableitem.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/method_listbyreplicationfabrics.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/method_listbyreplicationfabrics.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/method_listbyreplicationfabrics.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/method_listbyreplicationfabrics.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/method_switchclusterprotection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/method_switchclusterprotection.go new file mode 100644 index 0000000000000..f8e1e9bde7562 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/method_switchclusterprotection.go @@ -0,0 +1,75 @@ +package replicationprotectioncontainers + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SwitchClusterProtectionOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ProtectionContainer +} + +// SwitchClusterProtection ... +func (c ReplicationProtectionContainersClient) SwitchClusterProtection(ctx context.Context, id ReplicationProtectionContainerId, input SwitchClusterProtectionInput) (result SwitchClusterProtectionOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/switchClusterProtection", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// SwitchClusterProtectionThenPoll performs SwitchClusterProtection then polls until it's completed +func (c ReplicationProtectionContainersClient) SwitchClusterProtectionThenPoll(ctx context.Context, id ReplicationProtectionContainerId, input SwitchClusterProtectionInput) error { + result, err := c.SwitchClusterProtection(ctx, id, input) + if err != nil { + return fmt.Errorf("performing SwitchClusterProtection: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after SwitchClusterProtection: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/method_switchprotection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/method_switchprotection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/method_switchprotection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/method_switchprotection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_a2acontainercreationinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2acontainercreationinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_a2acontainercreationinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2acontainercreationinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2aprotecteditemdetail.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2aprotecteditemdetail.go new file mode 100644 index 0000000000000..0bd00cf38197c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2aprotecteditemdetail.go @@ -0,0 +1,17 @@ +package replicationprotectioncontainers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type A2AProtectedItemDetail struct { + DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"` + RecoveryAvailabilitySetId *string `json:"recoveryAvailabilitySetId,omitempty"` + RecoveryAvailabilityZone *string `json:"recoveryAvailabilityZone,omitempty"` + RecoveryBootDiagStorageAccountId *string `json:"recoveryBootDiagStorageAccountId,omitempty"` + RecoveryCapacityReservationGroupId *string `json:"recoveryCapacityReservationGroupId,omitempty"` + RecoveryProximityPlacementGroupId *string `json:"recoveryProximityPlacementGroupId,omitempty"` + RecoveryResourceGroupId *string `json:"recoveryResourceGroupId,omitempty"` + RecoveryVirtualMachineScaleSetId *string `json:"recoveryVirtualMachineScaleSetId,omitempty"` + ReplicationProtectedItemName *string `json:"replicationProtectedItemName,omitempty"` + VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2aswitchclusterprotectioninput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2aswitchclusterprotectioninput.go new file mode 100644 index 0000000000000..5d52d67ba0442 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2aswitchclusterprotectioninput.go @@ -0,0 +1,43 @@ +package replicationprotectioncontainers + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ SwitchClusterProtectionProviderSpecificInput = A2ASwitchClusterProtectionInput{} + +type A2ASwitchClusterProtectionInput struct { + PolicyId *string `json:"policyId,omitempty"` + ProtectedItemsDetail *[]A2AProtectedItemDetail `json:"protectedItemsDetail,omitempty"` + RecoveryContainerId *string `json:"recoveryContainerId,omitempty"` + + // Fields inherited from SwitchClusterProtectionProviderSpecificInput +} + +var _ json.Marshaler = A2ASwitchClusterProtectionInput{} + +func (s A2ASwitchClusterProtectionInput) MarshalJSON() ([]byte, error) { + type wrapper A2ASwitchClusterProtectionInput + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling A2ASwitchClusterProtectionInput: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling A2ASwitchClusterProtectionInput: %+v", err) + } + decoded["instanceType"] = "A2A" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling A2ASwitchClusterProtectionInput: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_a2avmdiskinputdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2avmdiskinputdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_a2avmdiskinputdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2avmdiskinputdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_a2avmmanageddiskinputdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2avmmanageddiskinputdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_a2avmmanageddiskinputdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2avmmanageddiskinputdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_createprotectioncontainerinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_createprotectioncontainerinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_createprotectioncontainerinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_createprotectioncontainerinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_discoverprotectableitemrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_discoverprotectableitemrequest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_discoverprotectableitemrequest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_discoverprotectableitemrequest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_discoverprotectableitemrequestproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_discoverprotectableitemrequestproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_discoverprotectableitemrequestproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_discoverprotectableitemrequestproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_diskencryptioninfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_diskencryptioninfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_diskencryptioninfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_diskencryptioninfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_diskencryptionkeyinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_diskencryptionkeyinfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_diskencryptionkeyinfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_diskencryptionkeyinfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_keyencryptionkeyinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_keyencryptionkeyinfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_keyencryptionkeyinfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_keyencryptionkeyinfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_protectioncontainer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_protectioncontainer.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_protectioncontainer.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_protectioncontainer.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_protectioncontainerfabricspecificdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_protectioncontainerfabricspecificdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_protectioncontainerfabricspecificdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_protectioncontainerfabricspecificdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_protectioncontainerproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_protectioncontainerproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_protectioncontainerproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_protectioncontainerproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchclusterprotectioninput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchclusterprotectioninput.go new file mode 100644 index 0000000000000..7e8c500b4527b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchclusterprotectioninput.go @@ -0,0 +1,8 @@ +package replicationprotectioncontainers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SwitchClusterProtectionInput struct { + Properties *SwitchClusterProtectionInputProperties `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchclusterprotectioninputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchclusterprotectioninputproperties.go new file mode 100644 index 0000000000000..cda13d52d7f10 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchclusterprotectioninputproperties.go @@ -0,0 +1,40 @@ +package replicationprotectioncontainers + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SwitchClusterProtectionInputProperties struct { + ProviderSpecificDetails SwitchClusterProtectionProviderSpecificInput `json:"providerSpecificDetails"` + ReplicationProtectionClusterName *string `json:"replicationProtectionClusterName,omitempty"` +} + +var _ json.Unmarshaler = &SwitchClusterProtectionInputProperties{} + +func (s *SwitchClusterProtectionInputProperties) UnmarshalJSON(bytes []byte) error { + type alias SwitchClusterProtectionInputProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SwitchClusterProtectionInputProperties: %+v", err) + } + + s.ReplicationProtectionClusterName = decoded.ReplicationProtectionClusterName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SwitchClusterProtectionInputProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["providerSpecificDetails"]; ok { + impl, err := unmarshalSwitchClusterProtectionProviderSpecificInputImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'SwitchClusterProtectionInputProperties': %+v", err) + } + s.ProviderSpecificDetails = impl + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchclusterprotectionproviderspecificinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchclusterprotectionproviderspecificinput.go new file mode 100644 index 0000000000000..ed4680c5f83b4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchclusterprotectionproviderspecificinput.go @@ -0,0 +1,53 @@ +package replicationprotectioncontainers + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SwitchClusterProtectionProviderSpecificInput interface { +} + +// RawSwitchClusterProtectionProviderSpecificInputImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawSwitchClusterProtectionProviderSpecificInputImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalSwitchClusterProtectionProviderSpecificInputImplementation(input []byte) (SwitchClusterProtectionProviderSpecificInput, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling SwitchClusterProtectionProviderSpecificInput into map[string]interface: %+v", err) + } + + value, ok := temp["instanceType"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "A2A") { + var out A2ASwitchClusterProtectionInput + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into A2ASwitchClusterProtectionInput: %+v", err) + } + return out, nil + } + + out := RawSwitchClusterProtectionProviderSpecificInputImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_switchprotectioninput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchprotectioninput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_switchprotectioninput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchprotectioninput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/version.go new file mode 100644 index 0000000000000..9ba5ecedd1b39 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/version.go @@ -0,0 +1,12 @@ +package replicationprotectioncontainers + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-04-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectioncontainers/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/README.md new file mode 100644 index 0000000000000..60f04c9ca212d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/README.md @@ -0,0 +1,203 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans` Documentation + +The `replicationrecoveryplans` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans" +``` + + +### Client Initialization + +```go +client := replicationrecoveryplans.NewReplicationRecoveryPlansClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ReplicationRecoveryPlansClient.Create` + +```go +ctx := context.TODO() +id := replicationrecoveryplans.NewReplicationRecoveryPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationRecoveryPlanValue") + +payload := replicationrecoveryplans.CreateRecoveryPlanInput{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationRecoveryPlansClient.Delete` + +```go +ctx := context.TODO() +id := replicationrecoveryplans.NewReplicationRecoveryPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationRecoveryPlanValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationRecoveryPlansClient.FailoverCancel` + +```go +ctx := context.TODO() +id := replicationrecoveryplans.NewReplicationRecoveryPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationRecoveryPlanValue") + +if err := client.FailoverCancelThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationRecoveryPlansClient.FailoverCommit` + +```go +ctx := context.TODO() +id := replicationrecoveryplans.NewReplicationRecoveryPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationRecoveryPlanValue") + +if err := client.FailoverCommitThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationRecoveryPlansClient.Get` + +```go +ctx := context.TODO() +id := replicationrecoveryplans.NewReplicationRecoveryPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationRecoveryPlanValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ReplicationRecoveryPlansClient.List` + +```go +ctx := context.TODO() +id := replicationrecoveryplans.NewVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ReplicationRecoveryPlansClient.PlannedFailover` + +```go +ctx := context.TODO() +id := replicationrecoveryplans.NewReplicationRecoveryPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationRecoveryPlanValue") + +payload := replicationrecoveryplans.RecoveryPlanPlannedFailoverInput{ + // ... +} + + +if err := client.PlannedFailoverThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationRecoveryPlansClient.Reprotect` + +```go +ctx := context.TODO() +id := replicationrecoveryplans.NewReplicationRecoveryPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationRecoveryPlanValue") + +if err := client.ReprotectThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationRecoveryPlansClient.TestFailover` + +```go +ctx := context.TODO() +id := replicationrecoveryplans.NewReplicationRecoveryPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationRecoveryPlanValue") + +payload := replicationrecoveryplans.RecoveryPlanTestFailoverInput{ + // ... +} + + +if err := client.TestFailoverThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationRecoveryPlansClient.TestFailoverCleanup` + +```go +ctx := context.TODO() +id := replicationrecoveryplans.NewReplicationRecoveryPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationRecoveryPlanValue") + +payload := replicationrecoveryplans.RecoveryPlanTestFailoverCleanupInput{ + // ... +} + + +if err := client.TestFailoverCleanupThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationRecoveryPlansClient.UnplannedFailover` + +```go +ctx := context.TODO() +id := replicationrecoveryplans.NewReplicationRecoveryPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationRecoveryPlanValue") + +payload := replicationrecoveryplans.RecoveryPlanUnplannedFailoverInput{ + // ... +} + + +if err := client.UnplannedFailoverThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationRecoveryPlansClient.Update` + +```go +ctx := context.TODO() +id := replicationrecoveryplans.NewReplicationRecoveryPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationRecoveryPlanValue") + +payload := replicationrecoveryplans.UpdateRecoveryPlanInput{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/id_replicationrecoveryplan.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/id_replicationrecoveryplan.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/id_replicationrecoveryplan.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/id_replicationrecoveryplan.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/id_vault.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/id_vault.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/id_vault.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_failovercancel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_failovercancel.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_failovercancel.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_failovercancel.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_failovercommit.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_failovercommit.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_failovercommit.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_failovercommit.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_plannedfailover.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_plannedfailover.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_plannedfailover.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_plannedfailover.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_reprotect.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_reprotect.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_reprotect.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_reprotect.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_testfailover.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_testfailover.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_testfailover.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_testfailover.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_testfailovercleanup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_testfailovercleanup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_testfailovercleanup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_testfailovercleanup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_unplannedfailover.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_unplannedfailover.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_unplannedfailover.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_unplannedfailover.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_createrecoveryplaninput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_createrecoveryplaninput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_createrecoveryplaninput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_createrecoveryplaninput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_currentscenariodetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_currentscenariodetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_currentscenariodetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_currentscenariodetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplan.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplan.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplan.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplan.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplana2adetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplana2adetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplana2adetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplana2adetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplana2ainput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplana2ainput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplana2ainput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplana2ainput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanaction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanaction.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanaction.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanaction.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanactiondetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanactiondetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanactiondetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanactiondetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplangroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplangroup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplangroup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplangroup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanprotecteditem.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanprotecteditem.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanprotecteditem.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanprotecteditem.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplantestfailovercleanupinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplantestfailovercleanupinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplantestfailovercleanupinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplantestfailovercleanupinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplantestfailovercleanupinputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplantestfailovercleanupinputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplantestfailovercleanupinputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplantestfailovercleanupinputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplantestfailoverinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplantestfailoverinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplantestfailoverinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplantestfailoverinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_updaterecoveryplaninput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_updaterecoveryplaninput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_updaterecoveryplaninput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_updaterecoveryplaninput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_updaterecoveryplaninputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_updaterecoveryplaninputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_updaterecoveryplaninputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_updaterecoveryplaninputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/version.go new file mode 100644 index 0000000000000..efbdb2891f029 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/version.go @@ -0,0 +1,12 @@ +package replicationrecoveryplans + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-04-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/replicationrecoveryplans/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/README.md new file mode 100644 index 0000000000000..f94d92fc4771e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/README.md @@ -0,0 +1,123 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders` Documentation + +The `replicationrecoveryservicesproviders` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders" +``` + + +### Client Initialization + +```go +client := replicationrecoveryservicesproviders.NewReplicationRecoveryServicesProvidersClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ReplicationRecoveryServicesProvidersClient.Create` + +```go +ctx := context.TODO() +id := replicationrecoveryservicesproviders.NewReplicationRecoveryServicesProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationRecoveryServicesProviderValue") + +payload := replicationrecoveryservicesproviders.AddRecoveryServicesProviderInput{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationRecoveryServicesProvidersClient.Delete` + +```go +ctx := context.TODO() +id := replicationrecoveryservicesproviders.NewReplicationRecoveryServicesProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationRecoveryServicesProviderValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationRecoveryServicesProvidersClient.Get` + +```go +ctx := context.TODO() +id := replicationrecoveryservicesproviders.NewReplicationRecoveryServicesProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationRecoveryServicesProviderValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ReplicationRecoveryServicesProvidersClient.List` + +```go +ctx := context.TODO() +id := replicationrecoveryservicesproviders.NewVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ReplicationRecoveryServicesProvidersClient.ListByReplicationFabrics` + +```go +ctx := context.TODO() +id := replicationrecoveryservicesproviders.NewReplicationFabricID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue") + +// alternatively `client.ListByReplicationFabrics(ctx, id)` can be used to do batched pagination +items, err := client.ListByReplicationFabricsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ReplicationRecoveryServicesProvidersClient.Purge` + +```go +ctx := context.TODO() +id := replicationrecoveryservicesproviders.NewReplicationRecoveryServicesProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationRecoveryServicesProviderValue") + +if err := client.PurgeThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationRecoveryServicesProvidersClient.RefreshProvider` + +```go +ctx := context.TODO() +id := replicationrecoveryservicesproviders.NewReplicationRecoveryServicesProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationRecoveryServicesProviderValue") + +if err := client.RefreshProviderThenPoll(ctx, id); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_replicationfabric.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/id_replicationfabric.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_replicationfabric.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/id_replicationfabric.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/id_vault.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_vault.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/id_vault.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/method_listbyreplicationfabrics.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/method_listbyreplicationfabrics.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/method_listbyreplicationfabrics.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/method_listbyreplicationfabrics.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/method_purge.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/method_purge.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/method_purge.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/method_purge.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/method_refreshprovider.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/method_refreshprovider.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/method_refreshprovider.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/method_refreshprovider.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/model_addrecoveryservicesproviderinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/model_addrecoveryservicesproviderinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/model_addrecoveryservicesproviderinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/model_addrecoveryservicesproviderinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/model_addrecoveryservicesproviderinputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/model_addrecoveryservicesproviderinputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/model_addrecoveryservicesproviderinputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/model_addrecoveryservicesproviderinputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/model_healtherror.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/model_healtherror.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/model_healtherror.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/model_healtherror.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/model_identityproviderdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/model_identityproviderdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/model_identityproviderdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/model_identityproviderdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/model_identityproviderinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/model_identityproviderinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/model_identityproviderinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/model_identityproviderinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/model_innerhealtherror.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/model_innerhealtherror.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/model_innerhealtherror.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/model_innerhealtherror.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/model_recoveryservicesprovider.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/model_recoveryservicesprovider.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/model_recoveryservicesprovider.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/model_recoveryservicesprovider.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/model_recoveryservicesproviderproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/model_recoveryservicesproviderproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/model_recoveryservicesproviderproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/model_recoveryservicesproviderproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/model_versiondetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/model_versiondetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/model_versiondetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/model_versiondetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/version.go new file mode 100644 index 0000000000000..e7f28ce9a5f91 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/version.go @@ -0,0 +1,12 @@ +package replicationrecoveryservicesproviders + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-04-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/replicationrecoveryservicesproviders/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/README.md new file mode 100644 index 0000000000000..391f90a0df0d8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/README.md @@ -0,0 +1,70 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting` Documentation + +The `replicationvaultsetting` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting" +``` + + +### Client Initialization + +```go +client := replicationvaultsetting.NewReplicationVaultSettingClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ReplicationVaultSettingClient.Create` + +```go +ctx := context.TODO() +id := replicationvaultsetting.NewReplicationVaultSettingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationVaultSettingValue") + +payload := replicationvaultsetting.VaultSettingCreationInput{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationVaultSettingClient.Get` + +```go +ctx := context.TODO() +id := replicationvaultsetting.NewReplicationVaultSettingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationVaultSettingValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ReplicationVaultSettingClient.List` + +```go +ctx := context.TODO() +id := replicationvaultsetting.NewVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/id_replicationvaultsetting.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/id_replicationvaultsetting.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/id_replicationvaultsetting.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/id_replicationvaultsetting.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/id_vault.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/id_vault.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/id_vault.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/model_vaultsetting.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/model_vaultsetting.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/model_vaultsetting.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/model_vaultsetting.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/model_vaultsettingcreationinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/model_vaultsettingcreationinput.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/model_vaultsettingcreationinput.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/model_vaultsettingcreationinput.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/model_vaultsettingcreationinputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/model_vaultsettingcreationinputproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/model_vaultsettingcreationinputproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/model_vaultsettingcreationinputproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/model_vaultsettingproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/model_vaultsettingproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/model_vaultsettingproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/model_vaultsettingproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/version.go new file mode 100644 index 0000000000000..18032bc88e857 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/version.go @@ -0,0 +1,12 @@ +package replicationvaultsetting + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-04-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvaultsetting/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/README.md deleted file mode 100644 index 9e984f38753cd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/README.md +++ /dev/null @@ -1,88 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies` Documentation - -The `backupshorttermretentionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies" -``` - - -### Client Initialization - -```go -client := backupshorttermretentionpolicies.NewBackupShortTermRetentionPoliciesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `BackupShortTermRetentionPoliciesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -payload := backupshorttermretentionpolicies.BackupShortTermRetentionPolicy{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `BackupShortTermRetentionPoliciesClient.Get` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `BackupShortTermRetentionPoliciesClient.ListByDatabase` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -// alternatively `client.ListByDatabase(ctx, id)` can be used to do batched pagination -items, err := client.ListByDatabaseComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `BackupShortTermRetentionPoliciesClient.Update` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -payload := backupshorttermretentionpolicies.BackupShortTermRetentionPolicy{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/version.go deleted file mode 100644 index 5f0cc2c932f5c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package backupshorttermretentionpolicies - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2023-02-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupshorttermretentionpolicies/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/README.md deleted file mode 100644 index 4c95f4f615ae7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/README.md +++ /dev/null @@ -1,237 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases` Documentation - -The `databases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases" -``` - - -### Client Initialization - -```go -client := databases.NewDatabasesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `DatabasesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -payload := databases.Database{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `DatabasesClient.Delete` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `DatabasesClient.Export` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -payload := databases.ExportDatabaseDefinition{ - // ... -} - - -if err := client.ExportThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `DatabasesClient.Failover` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -if err := client.FailoverThenPoll(ctx, id, databases.DefaultFailoverOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `DatabasesClient.Get` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -read, err := client.Get(ctx, id, databases.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `DatabasesClient.Import` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -payload := databases.ImportExistingDatabaseDefinition{ - // ... -} - - -if err := client.ImportThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `DatabasesClient.ListByElasticPool` - -```go -ctx := context.TODO() -id := commonids.NewSqlElasticPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "elasticPoolValue") - -// alternatively `client.ListByElasticPool(ctx, id)` can be used to do batched pagination -items, err := client.ListByElasticPoolComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `DatabasesClient.ListByServer` - -```go -ctx := context.TODO() -id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination -items, err := client.ListByServerComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `DatabasesClient.ListInaccessibleByServer` - -```go -ctx := context.TODO() -id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -// alternatively `client.ListInaccessibleByServer(ctx, id)` can be used to do batched pagination -items, err := client.ListInaccessibleByServerComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `DatabasesClient.Pause` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -if err := client.PauseThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `DatabasesClient.Rename` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -payload := databases.ResourceMoveDefinition{ - // ... -} - - -read, err := client.Rename(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `DatabasesClient.Resume` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -if err := client.ResumeThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `DatabasesClient.Update` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -payload := databases.DatabaseUpdate{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `DatabasesClient.UpgradeDataWarehouse` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -if err := client.UpgradeDataWarehouseThenPoll(ctx, id); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/client.go deleted file mode 100644 index 11c4bb68fa0eb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package databases - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DatabasesClient struct { - Client *resourcemanager.Client -} - -func NewDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databases", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating DatabasesClient: %+v", err) - } - - return &DatabasesClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/version.go deleted file mode 100644 index 938f6af7f2dcb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package databases - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2023-02-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databases/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/README.md deleted file mode 100644 index f3146b2d25f56..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/README.md +++ /dev/null @@ -1,75 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies` Documentation - -The `databasesecurityalertpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies" -``` - - -### Client Initialization - -```go -client := databasesecurityalertpolicies.NewDatabaseSecurityAlertPoliciesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `DatabaseSecurityAlertPoliciesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -payload := databasesecurityalertpolicies.DatabaseSecurityAlertPolicy{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `DatabaseSecurityAlertPoliciesClient.Get` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `DatabaseSecurityAlertPoliciesClient.ListByDatabase` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -// alternatively `client.ListByDatabase(ctx, id)` can be used to do batched pagination -items, err := client.ListByDatabaseComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/version.go deleted file mode 100644 index 234cfc8c21dde..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package databasesecurityalertpolicies - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2023-02-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasesecurityalertpolicies/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/README.md deleted file mode 100644 index 2c36ef933c9c5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/README.md +++ /dev/null @@ -1,112 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools` Documentation - -The `elasticpools` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools" -``` - - -### Client Initialization - -```go -client := elasticpools.NewElasticPoolsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ElasticPoolsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := commonids.NewSqlElasticPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "elasticPoolValue") - -payload := elasticpools.ElasticPool{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ElasticPoolsClient.Delete` - -```go -ctx := context.TODO() -id := commonids.NewSqlElasticPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "elasticPoolValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ElasticPoolsClient.Failover` - -```go -ctx := context.TODO() -id := commonids.NewSqlElasticPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "elasticPoolValue") - -if err := client.FailoverThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ElasticPoolsClient.Get` - -```go -ctx := context.TODO() -id := commonids.NewSqlElasticPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "elasticPoolValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ElasticPoolsClient.ListByServer` - -```go -ctx := context.TODO() -id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -// alternatively `client.ListByServer(ctx, id, elasticpools.DefaultListByServerOperationOptions())` can be used to do batched pagination -items, err := client.ListByServerComplete(ctx, id, elasticpools.DefaultListByServerOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ElasticPoolsClient.Update` - -```go -ctx := context.TODO() -id := commonids.NewSqlElasticPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "elasticPoolValue") - -payload := elasticpools.ElasticPoolUpdate{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/model_elasticpoolperdatabasesettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/model_elasticpoolperdatabasesettings.go deleted file mode 100644 index 1f9a8fe0e6057..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/model_elasticpoolperdatabasesettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package elasticpools - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ElasticPoolPerDatabaseSettings struct { - MaxCapacity *float64 `json:"maxCapacity,omitempty"` - MinCapacity *float64 `json:"minCapacity,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/version.go deleted file mode 100644 index f26ae902547b3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package elasticpools - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2023-02-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/elasticpools/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies/README.md deleted file mode 100644 index a47f21b56f77f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies/README.md +++ /dev/null @@ -1,75 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies` Documentation - -The `geobackuppolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies" -``` - - -### Client Initialization - -```go -client := geobackuppolicies.NewGeoBackupPoliciesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `GeoBackupPoliciesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -payload := geobackuppolicies.GeoBackupPolicy{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `GeoBackupPoliciesClient.Get` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `GeoBackupPoliciesClient.List` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies/version.go deleted file mode 100644 index 2ec88f0334c3e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package geobackuppolicies - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2023-02-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/geobackuppolicies/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/README.md deleted file mode 100644 index 96dd098437a31..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/README.md +++ /dev/null @@ -1,71 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies` Documentation - -The `longtermretentionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies" -``` - - -### Client Initialization - -```go -client := longtermretentionpolicies.NewLongTermRetentionPoliciesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `LongTermRetentionPoliciesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -payload := longtermretentionpolicies.LongTermRetentionPolicy{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `LongTermRetentionPoliciesClient.Get` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LongTermRetentionPoliciesClient.ListByDatabase` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -// alternatively `client.ListByDatabase(ctx, id)` can be used to do batched pagination -items, err := client.ListByDatabaseComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/model_longtermretentionpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/model_longtermretentionpolicy.go deleted file mode 100644 index 5b848fb2f81cc..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/model_longtermretentionpolicy.go +++ /dev/null @@ -1,11 +0,0 @@ -package longtermretentionpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LongTermRetentionPolicy struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *LongTermRetentionPolicyProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/model_longtermretentionpolicyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/model_longtermretentionpolicyproperties.go deleted file mode 100644 index 373c34c43d486..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/model_longtermretentionpolicyproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package longtermretentionpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LongTermRetentionPolicyProperties struct { - MakeBackupsImmutable *bool `json:"makeBackupsImmutable,omitempty"` - MonthlyRetention *string `json:"monthlyRetention,omitempty"` - WeekOfYear *int64 `json:"weekOfYear,omitempty"` - WeeklyRetention *string `json:"weeklyRetention,omitempty"` - YearlyRetention *string `json:"yearlyRetention,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/version.go deleted file mode 100644 index cc40a438b2338..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package longtermretentionpolicies - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2023-02-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/longtermretentionpolicies/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/README.md deleted file mode 100644 index b5f3494b2dd56..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/README.md +++ /dev/null @@ -1,107 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks` Documentation - -The `replicationlinks` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks" -``` - - -### Client Initialization - -```go -client := replicationlinks.NewReplicationLinksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ReplicationLinksClient.Delete` - -```go -ctx := context.TODO() -id := replicationlinks.NewReplicationLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "linkIdValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationLinksClient.Failover` - -```go -ctx := context.TODO() -id := replicationlinks.NewReplicationLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "linkIdValue") - -if err := client.FailoverThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationLinksClient.FailoverAllowDataLoss` - -```go -ctx := context.TODO() -id := replicationlinks.NewReplicationLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "linkIdValue") - -if err := client.FailoverAllowDataLossThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ReplicationLinksClient.Get` - -```go -ctx := context.TODO() -id := replicationlinks.NewReplicationLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "linkIdValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ReplicationLinksClient.ListByDatabase` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -// alternatively `client.ListByDatabase(ctx, id)` can be used to do batched pagination -items, err := client.ListByDatabaseComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ReplicationLinksClient.ListByServer` - -```go -ctx := context.TODO() -id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination -items, err := client.ListByServerComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/version.go deleted file mode 100644 index a0ea11787b565..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package replicationlinks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2023-02-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationlinks/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/README.md deleted file mode 100644 index 2c8324300a73e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/README.md +++ /dev/null @@ -1,54 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases` Documentation - -The `restorabledroppeddatabases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases" -``` - - -### Client Initialization - -```go -client := restorabledroppeddatabases.NewRestorableDroppedDatabasesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `RestorableDroppedDatabasesClient.Get` - -```go -ctx := context.TODO() -id := restorabledroppeddatabases.NewRestorableDroppedDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "restorableDroppedDatabaseIdValue") - -read, err := client.Get(ctx, id, restorabledroppeddatabases.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `RestorableDroppedDatabasesClient.ListByServer` - -```go -ctx := context.TODO() -id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination -items, err := client.ListByServerComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/version.go deleted file mode 100644 index 1a7095dc36062..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package restorabledroppeddatabases - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2023-02-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorabledroppeddatabases/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/README.md deleted file mode 100644 index 14f5b104fa561..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/README.md +++ /dev/null @@ -1,83 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators` Documentation - -The `serverazureadadministrators` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators" -``` - - -### Client Initialization - -```go -client := serverazureadadministrators.NewServerAzureADAdministratorsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ServerAzureADAdministratorsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -payload := serverazureadadministrators.ServerAzureADAdministrator{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ServerAzureADAdministratorsClient.Delete` - -```go -ctx := context.TODO() -id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ServerAzureADAdministratorsClient.Get` - -```go -ctx := context.TODO() -id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ServerAzureADAdministratorsClient.ListByServer` - -```go -ctx := context.TODO() -id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination -items, err := client.ListByServerComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/version.go deleted file mode 100644 index 513beae11c2ee..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package serverazureadadministrators - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2023-02-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverazureadadministrators/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/README.md deleted file mode 100644 index b26883de88767..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/README.md +++ /dev/null @@ -1,83 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications` Documentation - -The `serverazureadonlyauthentications` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications" -``` - - -### Client Initialization - -```go -client := serverazureadonlyauthentications.NewServerAzureADOnlyAuthenticationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ServerAzureADOnlyAuthenticationsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -payload := serverazureadonlyauthentications.ServerAzureADOnlyAuthentication{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ServerAzureADOnlyAuthenticationsClient.Delete` - -```go -ctx := context.TODO() -id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ServerAzureADOnlyAuthenticationsClient.Get` - -```go -ctx := context.TODO() -id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ServerAzureADOnlyAuthenticationsClient.ListByServer` - -```go -ctx := context.TODO() -id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination -items, err := client.ListByServerComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/version.go deleted file mode 100644 index bb17b896c464c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package serverazureadonlyauthentications - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2023-02-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverazureadonlyauthentications/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/README.md deleted file mode 100644 index d98df9ef36fce..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/README.md +++ /dev/null @@ -1,71 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies` Documentation - -The `serverconnectionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies" -``` - - -### Client Initialization - -```go -client := serverconnectionpolicies.NewServerConnectionPoliciesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ServerConnectionPoliciesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -payload := serverconnectionpolicies.ServerConnectionPolicy{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ServerConnectionPoliciesClient.Get` - -```go -ctx := context.TODO() -id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ServerConnectionPoliciesClient.ListByServer` - -```go -ctx := context.TODO() -id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination -items, err := client.ListByServerComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/version.go deleted file mode 100644 index 96bc34509bd0e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package serverconnectionpolicies - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2023-02-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverconnectionpolicies/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/README.md deleted file mode 100644 index 5fa077033a2c4..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/README.md +++ /dev/null @@ -1,167 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers` Documentation - -The `servers` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers" -``` - - -### Client Initialization - -```go -client := servers.NewServersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ServersClient.CheckNameAvailability` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -payload := servers.CheckNameAvailabilityRequest{ - // ... -} - - -read, err := client.CheckNameAvailability(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ServersClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -payload := servers.Server{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ServersClient.Delete` - -```go -ctx := context.TODO() -id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ServersClient.Get` - -```go -ctx := context.TODO() -id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -read, err := client.Get(ctx, id, servers.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ServersClient.ImportDatabase` - -```go -ctx := context.TODO() -id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -payload := servers.ImportNewDatabaseDefinition{ - // ... -} - - -if err := client.ImportDatabaseThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ServersClient.List` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id, servers.DefaultListOperationOptions())` can be used to do batched pagination -items, err := client.ListComplete(ctx, id, servers.DefaultListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ServersClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id, servers.DefaultListByResourceGroupOperationOptions())` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id, servers.DefaultListByResourceGroupOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ServersClient.RefreshStatus` - -```go -ctx := context.TODO() -id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -if err := client.RefreshStatusThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ServersClient.Update` - -```go -ctx := context.TODO() -id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -payload := servers.ServerUpdate{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/constants.go deleted file mode 100644 index 7e942e4796366..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/constants.go +++ /dev/null @@ -1,514 +0,0 @@ -package servers - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AdministratorType string - -const ( - AdministratorTypeActiveDirectory AdministratorType = "ActiveDirectory" -) - -func PossibleValuesForAdministratorType() []string { - return []string{ - string(AdministratorTypeActiveDirectory), - } -} - -func (s *AdministratorType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAdministratorType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAdministratorType(input string) (*AdministratorType, error) { - vals := map[string]AdministratorType{ - "activedirectory": AdministratorTypeActiveDirectory, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AdministratorType(input) - return &out, nil -} - -type CheckNameAvailabilityReason string - -const ( - CheckNameAvailabilityReasonAlreadyExists CheckNameAvailabilityReason = "AlreadyExists" - CheckNameAvailabilityReasonInvalid CheckNameAvailabilityReason = "Invalid" -) - -func PossibleValuesForCheckNameAvailabilityReason() []string { - return []string{ - string(CheckNameAvailabilityReasonAlreadyExists), - string(CheckNameAvailabilityReasonInvalid), - } -} - -func (s *CheckNameAvailabilityReason) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCheckNameAvailabilityReason(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCheckNameAvailabilityReason(input string) (*CheckNameAvailabilityReason, error) { - vals := map[string]CheckNameAvailabilityReason{ - "alreadyexists": CheckNameAvailabilityReasonAlreadyExists, - "invalid": CheckNameAvailabilityReasonInvalid, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CheckNameAvailabilityReason(input) - return &out, nil -} - -type CheckNameAvailabilityResourceType string - -const ( - CheckNameAvailabilityResourceTypeMicrosoftPointSqlServers CheckNameAvailabilityResourceType = "Microsoft.Sql/servers" -) - -func PossibleValuesForCheckNameAvailabilityResourceType() []string { - return []string{ - string(CheckNameAvailabilityResourceTypeMicrosoftPointSqlServers), - } -} - -func (s *CheckNameAvailabilityResourceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCheckNameAvailabilityResourceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCheckNameAvailabilityResourceType(input string) (*CheckNameAvailabilityResourceType, error) { - vals := map[string]CheckNameAvailabilityResourceType{ - "microsoft.sql/servers": CheckNameAvailabilityResourceTypeMicrosoftPointSqlServers, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CheckNameAvailabilityResourceType(input) - return &out, nil -} - -type ExternalGovernanceStatus string - -const ( - ExternalGovernanceStatusDisabled ExternalGovernanceStatus = "Disabled" - ExternalGovernanceStatusEnabled ExternalGovernanceStatus = "Enabled" -) - -func PossibleValuesForExternalGovernanceStatus() []string { - return []string{ - string(ExternalGovernanceStatusDisabled), - string(ExternalGovernanceStatusEnabled), - } -} - -func (s *ExternalGovernanceStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExternalGovernanceStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExternalGovernanceStatus(input string) (*ExternalGovernanceStatus, error) { - vals := map[string]ExternalGovernanceStatus{ - "disabled": ExternalGovernanceStatusDisabled, - "enabled": ExternalGovernanceStatusEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExternalGovernanceStatus(input) - return &out, nil -} - -type PrincipalType string - -const ( - PrincipalTypeApplication PrincipalType = "Application" - PrincipalTypeGroup PrincipalType = "Group" - PrincipalTypeUser PrincipalType = "User" -) - -func PossibleValuesForPrincipalType() []string { - return []string{ - string(PrincipalTypeApplication), - string(PrincipalTypeGroup), - string(PrincipalTypeUser), - } -} - -func (s *PrincipalType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePrincipalType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePrincipalType(input string) (*PrincipalType, error) { - vals := map[string]PrincipalType{ - "application": PrincipalTypeApplication, - "group": PrincipalTypeGroup, - "user": PrincipalTypeUser, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PrincipalType(input) - return &out, nil -} - -type PrivateEndpointProvisioningState string - -const ( - PrivateEndpointProvisioningStateApproving PrivateEndpointProvisioningState = "Approving" - PrivateEndpointProvisioningStateDropping PrivateEndpointProvisioningState = "Dropping" - PrivateEndpointProvisioningStateFailed PrivateEndpointProvisioningState = "Failed" - PrivateEndpointProvisioningStateReady PrivateEndpointProvisioningState = "Ready" - PrivateEndpointProvisioningStateRejecting PrivateEndpointProvisioningState = "Rejecting" -) - -func PossibleValuesForPrivateEndpointProvisioningState() []string { - return []string{ - string(PrivateEndpointProvisioningStateApproving), - string(PrivateEndpointProvisioningStateDropping), - string(PrivateEndpointProvisioningStateFailed), - string(PrivateEndpointProvisioningStateReady), - string(PrivateEndpointProvisioningStateRejecting), - } -} - -func (s *PrivateEndpointProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePrivateEndpointProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePrivateEndpointProvisioningState(input string) (*PrivateEndpointProvisioningState, error) { - vals := map[string]PrivateEndpointProvisioningState{ - "approving": PrivateEndpointProvisioningStateApproving, - "dropping": PrivateEndpointProvisioningStateDropping, - "failed": PrivateEndpointProvisioningStateFailed, - "ready": PrivateEndpointProvisioningStateReady, - "rejecting": PrivateEndpointProvisioningStateRejecting, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PrivateEndpointProvisioningState(input) - return &out, nil -} - -type PrivateLinkServiceConnectionStateActionsRequire string - -const ( - PrivateLinkServiceConnectionStateActionsRequireNone PrivateLinkServiceConnectionStateActionsRequire = "None" -) - -func PossibleValuesForPrivateLinkServiceConnectionStateActionsRequire() []string { - return []string{ - string(PrivateLinkServiceConnectionStateActionsRequireNone), - } -} - -func (s *PrivateLinkServiceConnectionStateActionsRequire) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePrivateLinkServiceConnectionStateActionsRequire(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePrivateLinkServiceConnectionStateActionsRequire(input string) (*PrivateLinkServiceConnectionStateActionsRequire, error) { - vals := map[string]PrivateLinkServiceConnectionStateActionsRequire{ - "none": PrivateLinkServiceConnectionStateActionsRequireNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PrivateLinkServiceConnectionStateActionsRequire(input) - return &out, nil -} - -type PrivateLinkServiceConnectionStateStatus string - -const ( - PrivateLinkServiceConnectionStateStatusApproved PrivateLinkServiceConnectionStateStatus = "Approved" - PrivateLinkServiceConnectionStateStatusDisconnected PrivateLinkServiceConnectionStateStatus = "Disconnected" - PrivateLinkServiceConnectionStateStatusPending PrivateLinkServiceConnectionStateStatus = "Pending" - PrivateLinkServiceConnectionStateStatusRejected PrivateLinkServiceConnectionStateStatus = "Rejected" -) - -func PossibleValuesForPrivateLinkServiceConnectionStateStatus() []string { - return []string{ - string(PrivateLinkServiceConnectionStateStatusApproved), - string(PrivateLinkServiceConnectionStateStatusDisconnected), - string(PrivateLinkServiceConnectionStateStatusPending), - string(PrivateLinkServiceConnectionStateStatusRejected), - } -} - -func (s *PrivateLinkServiceConnectionStateStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePrivateLinkServiceConnectionStateStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePrivateLinkServiceConnectionStateStatus(input string) (*PrivateLinkServiceConnectionStateStatus, error) { - vals := map[string]PrivateLinkServiceConnectionStateStatus{ - "approved": PrivateLinkServiceConnectionStateStatusApproved, - "disconnected": PrivateLinkServiceConnectionStateStatusDisconnected, - "pending": PrivateLinkServiceConnectionStateStatusPending, - "rejected": PrivateLinkServiceConnectionStateStatusRejected, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PrivateLinkServiceConnectionStateStatus(input) - return &out, nil -} - -type ServerNetworkAccessFlag string - -const ( - ServerNetworkAccessFlagDisabled ServerNetworkAccessFlag = "Disabled" - ServerNetworkAccessFlagEnabled ServerNetworkAccessFlag = "Enabled" -) - -func PossibleValuesForServerNetworkAccessFlag() []string { - return []string{ - string(ServerNetworkAccessFlagDisabled), - string(ServerNetworkAccessFlagEnabled), - } -} - -func (s *ServerNetworkAccessFlag) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseServerNetworkAccessFlag(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseServerNetworkAccessFlag(input string) (*ServerNetworkAccessFlag, error) { - vals := map[string]ServerNetworkAccessFlag{ - "disabled": ServerNetworkAccessFlagDisabled, - "enabled": ServerNetworkAccessFlagEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ServerNetworkAccessFlag(input) - return &out, nil -} - -type ServerPublicNetworkAccessFlag string - -const ( - ServerPublicNetworkAccessFlagDisabled ServerPublicNetworkAccessFlag = "Disabled" - ServerPublicNetworkAccessFlagEnabled ServerPublicNetworkAccessFlag = "Enabled" - ServerPublicNetworkAccessFlagSecuredByPerimeter ServerPublicNetworkAccessFlag = "SecuredByPerimeter" -) - -func PossibleValuesForServerPublicNetworkAccessFlag() []string { - return []string{ - string(ServerPublicNetworkAccessFlagDisabled), - string(ServerPublicNetworkAccessFlagEnabled), - string(ServerPublicNetworkAccessFlagSecuredByPerimeter), - } -} - -func (s *ServerPublicNetworkAccessFlag) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseServerPublicNetworkAccessFlag(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseServerPublicNetworkAccessFlag(input string) (*ServerPublicNetworkAccessFlag, error) { - vals := map[string]ServerPublicNetworkAccessFlag{ - "disabled": ServerPublicNetworkAccessFlagDisabled, - "enabled": ServerPublicNetworkAccessFlagEnabled, - "securedbyperimeter": ServerPublicNetworkAccessFlagSecuredByPerimeter, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ServerPublicNetworkAccessFlag(input) - return &out, nil -} - -type ServerWorkspaceFeature string - -const ( - ServerWorkspaceFeatureConnected ServerWorkspaceFeature = "Connected" - ServerWorkspaceFeatureDisconnected ServerWorkspaceFeature = "Disconnected" -) - -func PossibleValuesForServerWorkspaceFeature() []string { - return []string{ - string(ServerWorkspaceFeatureConnected), - string(ServerWorkspaceFeatureDisconnected), - } -} - -func (s *ServerWorkspaceFeature) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseServerWorkspaceFeature(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseServerWorkspaceFeature(input string) (*ServerWorkspaceFeature, error) { - vals := map[string]ServerWorkspaceFeature{ - "connected": ServerWorkspaceFeatureConnected, - "disconnected": ServerWorkspaceFeatureDisconnected, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ServerWorkspaceFeature(input) - return &out, nil -} - -type StorageKeyType string - -const ( - StorageKeyTypeSharedAccessKey StorageKeyType = "SharedAccessKey" - StorageKeyTypeStorageAccessKey StorageKeyType = "StorageAccessKey" -) - -func PossibleValuesForStorageKeyType() []string { - return []string{ - string(StorageKeyTypeSharedAccessKey), - string(StorageKeyTypeStorageAccessKey), - } -} - -func (s *StorageKeyType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseStorageKeyType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseStorageKeyType(input string) (*StorageKeyType, error) { - vals := map[string]StorageKeyType{ - "sharedaccesskey": StorageKeyTypeSharedAccessKey, - "storageaccesskey": StorageKeyTypeStorageAccessKey, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StorageKeyType(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/version.go deleted file mode 100644 index 5af2cdb615bd5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package servers - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2023-02-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servers/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/README.md deleted file mode 100644 index 0f505cd6039bf..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/README.md +++ /dev/null @@ -1,71 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies` Documentation - -The `serversecurityalertpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies" -``` - - -### Client Initialization - -```go -client := serversecurityalertpolicies.NewServerSecurityAlertPoliciesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ServerSecurityAlertPoliciesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -payload := serversecurityalertpolicies.ServerSecurityAlertPolicy{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ServerSecurityAlertPoliciesClient.Get` - -```go -ctx := context.TODO() -id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ServerSecurityAlertPoliciesClient.ListByServer` - -```go -ctx := context.TODO() -id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") - -// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination -items, err := client.ListByServerComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/version.go deleted file mode 100644 index a3c4df0a3653e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package serversecurityalertpolicies - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2023-02-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serversecurityalertpolicies/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/README.md deleted file mode 100644 index 75a154ca176ca..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/README.md +++ /dev/null @@ -1,71 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions` Documentation - -The `transparentdataencryptions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions" -``` - - -### Client Initialization - -```go -client := transparentdataencryptions.NewTransparentDataEncryptionsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `TransparentDataEncryptionsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -payload := transparentdataencryptions.LogicalDatabaseTransparentDataEncryption{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `TransparentDataEncryptionsClient.Get` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `TransparentDataEncryptionsClient.ListByDatabase` - -```go -ctx := context.TODO() -id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") - -// alternatively `client.ListByDatabase(ctx, id)` can be used to do batched pagination -items, err := client.ListByDatabaseComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/version.go deleted file mode 100644 index 20757f54dd6ed..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package transparentdataencryptions - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2023-02-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/transparentdataencryptions/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/README.md new file mode 100644 index 0000000000000..bdfe198c3a350 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/README.md @@ -0,0 +1,88 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies` Documentation + +The `backupshorttermretentionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies" +``` + + +### Client Initialization + +```go +client := backupshorttermretentionpolicies.NewBackupShortTermRetentionPoliciesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `BackupShortTermRetentionPoliciesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +payload := backupshorttermretentionpolicies.BackupShortTermRetentionPolicy{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `BackupShortTermRetentionPoliciesClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `BackupShortTermRetentionPoliciesClient.ListByDatabase` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +// alternatively `client.ListByDatabase(ctx, id)` can be used to do batched pagination +items, err := client.ListByDatabaseComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `BackupShortTermRetentionPoliciesClient.Update` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +payload := backupshorttermretentionpolicies.BackupShortTermRetentionPolicy{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/method_listbydatabase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/method_listbydatabase.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/method_listbydatabase.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/method_listbydatabase.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/model_backupshorttermretentionpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/model_backupshorttermretentionpolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/model_backupshorttermretentionpolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/model_backupshorttermretentionpolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/model_backupshorttermretentionpolicyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/model_backupshorttermretentionpolicyproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/model_backupshorttermretentionpolicyproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/model_backupshorttermretentionpolicyproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/version.go new file mode 100644 index 0000000000000..1b4189b9f6566 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/version.go @@ -0,0 +1,12 @@ +package backupshorttermretentionpolicies + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/backupshorttermretentionpolicies/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/README.md new file mode 100644 index 0000000000000..be11f97b56dd0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/README.md @@ -0,0 +1,229 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing` Documentation + +The `blobauditing` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing" +``` + + +### Client Initialization + +```go +client := blobauditing.NewBlobAuditingClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `BlobAuditingClient.DatabaseBlobAuditingPoliciesCreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +payload := blobauditing.DatabaseBlobAuditingPolicy{ + // ... +} + + +read, err := client.DatabaseBlobAuditingPoliciesCreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `BlobAuditingClient.DatabaseBlobAuditingPoliciesGet` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +read, err := client.DatabaseBlobAuditingPoliciesGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `BlobAuditingClient.DatabaseBlobAuditingPoliciesListByDatabase` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +// alternatively `client.DatabaseBlobAuditingPoliciesListByDatabase(ctx, id)` can be used to do batched pagination +items, err := client.DatabaseBlobAuditingPoliciesListByDatabaseComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `BlobAuditingClient.ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +payload := blobauditing.ExtendedDatabaseBlobAuditingPolicy{ + // ... +} + + +read, err := client.ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `BlobAuditingClient.ExtendedDatabaseBlobAuditingPoliciesGet` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +read, err := client.ExtendedDatabaseBlobAuditingPoliciesGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `BlobAuditingClient.ExtendedDatabaseBlobAuditingPoliciesListByDatabase` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +// alternatively `client.ExtendedDatabaseBlobAuditingPoliciesListByDatabase(ctx, id)` can be used to do batched pagination +items, err := client.ExtendedDatabaseBlobAuditingPoliciesListByDatabaseComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `BlobAuditingClient.ExtendedServerBlobAuditingPoliciesCreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +payload := blobauditing.ExtendedServerBlobAuditingPolicy{ + // ... +} + + +if err := client.ExtendedServerBlobAuditingPoliciesCreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `BlobAuditingClient.ExtendedServerBlobAuditingPoliciesGet` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +read, err := client.ExtendedServerBlobAuditingPoliciesGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `BlobAuditingClient.ExtendedServerBlobAuditingPoliciesListByServer` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +// alternatively `client.ExtendedServerBlobAuditingPoliciesListByServer(ctx, id)` can be used to do batched pagination +items, err := client.ExtendedServerBlobAuditingPoliciesListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `BlobAuditingClient.ServerBlobAuditingPoliciesCreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +payload := blobauditing.ServerBlobAuditingPolicy{ + // ... +} + + +if err := client.ServerBlobAuditingPoliciesCreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `BlobAuditingClient.ServerBlobAuditingPoliciesGet` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +read, err := client.ServerBlobAuditingPoliciesGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `BlobAuditingClient.ServerBlobAuditingPoliciesListByServer` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +// alternatively `client.ServerBlobAuditingPoliciesListByServer(ctx, id)` can be used to do batched pagination +items, err := client.ServerBlobAuditingPoliciesListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/client.go new file mode 100644 index 0000000000000..d8c96733d85b8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/client.go @@ -0,0 +1,26 @@ +package blobauditing + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BlobAuditingClient struct { + Client *resourcemanager.Client +} + +func NewBlobAuditingClientWithBaseURI(sdkApi sdkEnv.Api) (*BlobAuditingClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "blobauditing", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating BlobAuditingClient: %+v", err) + } + + return &BlobAuditingClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/constants.go new file mode 100644 index 0000000000000..ea5c72e5e3abd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/constants.go @@ -0,0 +1,51 @@ +package blobauditing + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BlobAuditingPolicyState string + +const ( + BlobAuditingPolicyStateDisabled BlobAuditingPolicyState = "Disabled" + BlobAuditingPolicyStateEnabled BlobAuditingPolicyState = "Enabled" +) + +func PossibleValuesForBlobAuditingPolicyState() []string { + return []string{ + string(BlobAuditingPolicyStateDisabled), + string(BlobAuditingPolicyStateEnabled), + } +} + +func (s *BlobAuditingPolicyState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseBlobAuditingPolicyState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseBlobAuditingPolicyState(input string) (*BlobAuditingPolicyState, error) { + vals := map[string]BlobAuditingPolicyState{ + "disabled": BlobAuditingPolicyStateDisabled, + "enabled": BlobAuditingPolicyStateEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := BlobAuditingPolicyState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_databaseblobauditingpoliciescreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_databaseblobauditingpoliciescreateorupdate.go new file mode 100644 index 0000000000000..589911c6f42b4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_databaseblobauditingpoliciescreateorupdate.go @@ -0,0 +1,61 @@ +package blobauditing + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabaseBlobAuditingPoliciesCreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *DatabaseBlobAuditingPolicy +} + +// DatabaseBlobAuditingPoliciesCreateOrUpdate ... +func (c BlobAuditingClient) DatabaseBlobAuditingPoliciesCreateOrUpdate(ctx context.Context, id commonids.SqlDatabaseId, input DatabaseBlobAuditingPolicy) (result DatabaseBlobAuditingPoliciesCreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: fmt.Sprintf("%s/auditingSettings/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model DatabaseBlobAuditingPolicy + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_databaseblobauditingpoliciesget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_databaseblobauditingpoliciesget.go new file mode 100644 index 0000000000000..fc66178ed6e17 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_databaseblobauditingpoliciesget.go @@ -0,0 +1,56 @@ +package blobauditing + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabaseBlobAuditingPoliciesGetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *DatabaseBlobAuditingPolicy +} + +// DatabaseBlobAuditingPoliciesGet ... +func (c BlobAuditingClient) DatabaseBlobAuditingPoliciesGet(ctx context.Context, id commonids.SqlDatabaseId) (result DatabaseBlobAuditingPoliciesGetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/auditingSettings/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model DatabaseBlobAuditingPolicy + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_databaseblobauditingpolicieslistbydatabase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_databaseblobauditingpolicieslistbydatabase.go new file mode 100644 index 0000000000000..db3f09927a308 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_databaseblobauditingpolicieslistbydatabase.go @@ -0,0 +1,106 @@ +package blobauditing + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabaseBlobAuditingPoliciesListByDatabaseOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]DatabaseBlobAuditingPolicy +} + +type DatabaseBlobAuditingPoliciesListByDatabaseCompleteResult struct { + LatestHttpResponse *http.Response + Items []DatabaseBlobAuditingPolicy +} + +type DatabaseBlobAuditingPoliciesListByDatabaseCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *DatabaseBlobAuditingPoliciesListByDatabaseCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// DatabaseBlobAuditingPoliciesListByDatabase ... +func (c BlobAuditingClient) DatabaseBlobAuditingPoliciesListByDatabase(ctx context.Context, id commonids.SqlDatabaseId) (result DatabaseBlobAuditingPoliciesListByDatabaseOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &DatabaseBlobAuditingPoliciesListByDatabaseCustomPager{}, + Path: fmt.Sprintf("%s/auditingSettings", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]DatabaseBlobAuditingPolicy `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// DatabaseBlobAuditingPoliciesListByDatabaseComplete retrieves all the results into a single object +func (c BlobAuditingClient) DatabaseBlobAuditingPoliciesListByDatabaseComplete(ctx context.Context, id commonids.SqlDatabaseId) (DatabaseBlobAuditingPoliciesListByDatabaseCompleteResult, error) { + return c.DatabaseBlobAuditingPoliciesListByDatabaseCompleteMatchingPredicate(ctx, id, DatabaseBlobAuditingPolicyOperationPredicate{}) +} + +// DatabaseBlobAuditingPoliciesListByDatabaseCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c BlobAuditingClient) DatabaseBlobAuditingPoliciesListByDatabaseCompleteMatchingPredicate(ctx context.Context, id commonids.SqlDatabaseId, predicate DatabaseBlobAuditingPolicyOperationPredicate) (result DatabaseBlobAuditingPoliciesListByDatabaseCompleteResult, err error) { + items := make([]DatabaseBlobAuditingPolicy, 0) + + resp, err := c.DatabaseBlobAuditingPoliciesListByDatabase(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = DatabaseBlobAuditingPoliciesListByDatabaseCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciescreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciescreateorupdate.go new file mode 100644 index 0000000000000..03952a4b89647 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciescreateorupdate.go @@ -0,0 +1,61 @@ +package blobauditing + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ExtendedDatabaseBlobAuditingPolicy +} + +// ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdate ... +func (c BlobAuditingClient) ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdate(ctx context.Context, id commonids.SqlDatabaseId, input ExtendedDatabaseBlobAuditingPolicy) (result ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: fmt.Sprintf("%s/extendedAuditingSettings/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ExtendedDatabaseBlobAuditingPolicy + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciesget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciesget.go new file mode 100644 index 0000000000000..3e29e0f05f003 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciesget.go @@ -0,0 +1,56 @@ +package blobauditing + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtendedDatabaseBlobAuditingPoliciesGetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ExtendedDatabaseBlobAuditingPolicy +} + +// ExtendedDatabaseBlobAuditingPoliciesGet ... +func (c BlobAuditingClient) ExtendedDatabaseBlobAuditingPoliciesGet(ctx context.Context, id commonids.SqlDatabaseId) (result ExtendedDatabaseBlobAuditingPoliciesGetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/extendedAuditingSettings/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ExtendedDatabaseBlobAuditingPolicy + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendeddatabaseblobauditingpolicieslistbydatabase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendeddatabaseblobauditingpolicieslistbydatabase.go new file mode 100644 index 0000000000000..6b253b81cee28 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendeddatabaseblobauditingpolicieslistbydatabase.go @@ -0,0 +1,106 @@ +package blobauditing + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtendedDatabaseBlobAuditingPoliciesListByDatabaseOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ExtendedDatabaseBlobAuditingPolicy +} + +type ExtendedDatabaseBlobAuditingPoliciesListByDatabaseCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExtendedDatabaseBlobAuditingPolicy +} + +type ExtendedDatabaseBlobAuditingPoliciesListByDatabaseCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ExtendedDatabaseBlobAuditingPoliciesListByDatabaseCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ExtendedDatabaseBlobAuditingPoliciesListByDatabase ... +func (c BlobAuditingClient) ExtendedDatabaseBlobAuditingPoliciesListByDatabase(ctx context.Context, id commonids.SqlDatabaseId) (result ExtendedDatabaseBlobAuditingPoliciesListByDatabaseOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ExtendedDatabaseBlobAuditingPoliciesListByDatabaseCustomPager{}, + Path: fmt.Sprintf("%s/extendedAuditingSettings", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ExtendedDatabaseBlobAuditingPolicy `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ExtendedDatabaseBlobAuditingPoliciesListByDatabaseComplete retrieves all the results into a single object +func (c BlobAuditingClient) ExtendedDatabaseBlobAuditingPoliciesListByDatabaseComplete(ctx context.Context, id commonids.SqlDatabaseId) (ExtendedDatabaseBlobAuditingPoliciesListByDatabaseCompleteResult, error) { + return c.ExtendedDatabaseBlobAuditingPoliciesListByDatabaseCompleteMatchingPredicate(ctx, id, ExtendedDatabaseBlobAuditingPolicyOperationPredicate{}) +} + +// ExtendedDatabaseBlobAuditingPoliciesListByDatabaseCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c BlobAuditingClient) ExtendedDatabaseBlobAuditingPoliciesListByDatabaseCompleteMatchingPredicate(ctx context.Context, id commonids.SqlDatabaseId, predicate ExtendedDatabaseBlobAuditingPolicyOperationPredicate) (result ExtendedDatabaseBlobAuditingPoliciesListByDatabaseCompleteResult, err error) { + items := make([]ExtendedDatabaseBlobAuditingPolicy, 0) + + resp, err := c.ExtendedDatabaseBlobAuditingPoliciesListByDatabase(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ExtendedDatabaseBlobAuditingPoliciesListByDatabaseCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendedserverblobauditingpoliciescreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendedserverblobauditingpoliciescreateorupdate.go new file mode 100644 index 0000000000000..83a36bcc67f20 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendedserverblobauditingpoliciescreateorupdate.go @@ -0,0 +1,76 @@ +package blobauditing + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtendedServerBlobAuditingPoliciesCreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ExtendedServerBlobAuditingPolicy +} + +// ExtendedServerBlobAuditingPoliciesCreateOrUpdate ... +func (c BlobAuditingClient) ExtendedServerBlobAuditingPoliciesCreateOrUpdate(ctx context.Context, id commonids.SqlServerId, input ExtendedServerBlobAuditingPolicy) (result ExtendedServerBlobAuditingPoliciesCreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: fmt.Sprintf("%s/extendedAuditingSettings/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// ExtendedServerBlobAuditingPoliciesCreateOrUpdateThenPoll performs ExtendedServerBlobAuditingPoliciesCreateOrUpdate then polls until it's completed +func (c BlobAuditingClient) ExtendedServerBlobAuditingPoliciesCreateOrUpdateThenPoll(ctx context.Context, id commonids.SqlServerId, input ExtendedServerBlobAuditingPolicy) error { + result, err := c.ExtendedServerBlobAuditingPoliciesCreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing ExtendedServerBlobAuditingPoliciesCreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after ExtendedServerBlobAuditingPoliciesCreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendedserverblobauditingpoliciesget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendedserverblobauditingpoliciesget.go new file mode 100644 index 0000000000000..c0e81b5a0db5d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendedserverblobauditingpoliciesget.go @@ -0,0 +1,56 @@ +package blobauditing + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtendedServerBlobAuditingPoliciesGetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ExtendedServerBlobAuditingPolicy +} + +// ExtendedServerBlobAuditingPoliciesGet ... +func (c BlobAuditingClient) ExtendedServerBlobAuditingPoliciesGet(ctx context.Context, id commonids.SqlServerId) (result ExtendedServerBlobAuditingPoliciesGetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/extendedAuditingSettings/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ExtendedServerBlobAuditingPolicy + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendedserverblobauditingpolicieslistbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendedserverblobauditingpolicieslistbyserver.go new file mode 100644 index 0000000000000..a457eacc4b530 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendedserverblobauditingpolicieslistbyserver.go @@ -0,0 +1,106 @@ +package blobauditing + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtendedServerBlobAuditingPoliciesListByServerOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ExtendedServerBlobAuditingPolicy +} + +type ExtendedServerBlobAuditingPoliciesListByServerCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExtendedServerBlobAuditingPolicy +} + +type ExtendedServerBlobAuditingPoliciesListByServerCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ExtendedServerBlobAuditingPoliciesListByServerCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ExtendedServerBlobAuditingPoliciesListByServer ... +func (c BlobAuditingClient) ExtendedServerBlobAuditingPoliciesListByServer(ctx context.Context, id commonids.SqlServerId) (result ExtendedServerBlobAuditingPoliciesListByServerOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ExtendedServerBlobAuditingPoliciesListByServerCustomPager{}, + Path: fmt.Sprintf("%s/extendedAuditingSettings", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ExtendedServerBlobAuditingPolicy `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ExtendedServerBlobAuditingPoliciesListByServerComplete retrieves all the results into a single object +func (c BlobAuditingClient) ExtendedServerBlobAuditingPoliciesListByServerComplete(ctx context.Context, id commonids.SqlServerId) (ExtendedServerBlobAuditingPoliciesListByServerCompleteResult, error) { + return c.ExtendedServerBlobAuditingPoliciesListByServerCompleteMatchingPredicate(ctx, id, ExtendedServerBlobAuditingPolicyOperationPredicate{}) +} + +// ExtendedServerBlobAuditingPoliciesListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c BlobAuditingClient) ExtendedServerBlobAuditingPoliciesListByServerCompleteMatchingPredicate(ctx context.Context, id commonids.SqlServerId, predicate ExtendedServerBlobAuditingPolicyOperationPredicate) (result ExtendedServerBlobAuditingPoliciesListByServerCompleteResult, err error) { + items := make([]ExtendedServerBlobAuditingPolicy, 0) + + resp, err := c.ExtendedServerBlobAuditingPoliciesListByServer(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ExtendedServerBlobAuditingPoliciesListByServerCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_serverblobauditingpoliciescreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_serverblobauditingpoliciescreateorupdate.go new file mode 100644 index 0000000000000..4236b2618f45e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_serverblobauditingpoliciescreateorupdate.go @@ -0,0 +1,76 @@ +package blobauditing + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerBlobAuditingPoliciesCreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ServerBlobAuditingPolicy +} + +// ServerBlobAuditingPoliciesCreateOrUpdate ... +func (c BlobAuditingClient) ServerBlobAuditingPoliciesCreateOrUpdate(ctx context.Context, id commonids.SqlServerId, input ServerBlobAuditingPolicy) (result ServerBlobAuditingPoliciesCreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: fmt.Sprintf("%s/auditingSettings/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// ServerBlobAuditingPoliciesCreateOrUpdateThenPoll performs ServerBlobAuditingPoliciesCreateOrUpdate then polls until it's completed +func (c BlobAuditingClient) ServerBlobAuditingPoliciesCreateOrUpdateThenPoll(ctx context.Context, id commonids.SqlServerId, input ServerBlobAuditingPolicy) error { + result, err := c.ServerBlobAuditingPoliciesCreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing ServerBlobAuditingPoliciesCreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after ServerBlobAuditingPoliciesCreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_serverblobauditingpoliciesget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_serverblobauditingpoliciesget.go new file mode 100644 index 0000000000000..75e49afd4f9bf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_serverblobauditingpoliciesget.go @@ -0,0 +1,56 @@ +package blobauditing + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerBlobAuditingPoliciesGetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ServerBlobAuditingPolicy +} + +// ServerBlobAuditingPoliciesGet ... +func (c BlobAuditingClient) ServerBlobAuditingPoliciesGet(ctx context.Context, id commonids.SqlServerId) (result ServerBlobAuditingPoliciesGetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/auditingSettings/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ServerBlobAuditingPolicy + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_serverblobauditingpolicieslistbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_serverblobauditingpolicieslistbyserver.go new file mode 100644 index 0000000000000..31b78fd708665 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/method_serverblobauditingpolicieslistbyserver.go @@ -0,0 +1,106 @@ +package blobauditing + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerBlobAuditingPoliciesListByServerOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ServerBlobAuditingPolicy +} + +type ServerBlobAuditingPoliciesListByServerCompleteResult struct { + LatestHttpResponse *http.Response + Items []ServerBlobAuditingPolicy +} + +type ServerBlobAuditingPoliciesListByServerCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ServerBlobAuditingPoliciesListByServerCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ServerBlobAuditingPoliciesListByServer ... +func (c BlobAuditingClient) ServerBlobAuditingPoliciesListByServer(ctx context.Context, id commonids.SqlServerId) (result ServerBlobAuditingPoliciesListByServerOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ServerBlobAuditingPoliciesListByServerCustomPager{}, + Path: fmt.Sprintf("%s/auditingSettings", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ServerBlobAuditingPolicy `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ServerBlobAuditingPoliciesListByServerComplete retrieves all the results into a single object +func (c BlobAuditingClient) ServerBlobAuditingPoliciesListByServerComplete(ctx context.Context, id commonids.SqlServerId) (ServerBlobAuditingPoliciesListByServerCompleteResult, error) { + return c.ServerBlobAuditingPoliciesListByServerCompleteMatchingPredicate(ctx, id, ServerBlobAuditingPolicyOperationPredicate{}) +} + +// ServerBlobAuditingPoliciesListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c BlobAuditingClient) ServerBlobAuditingPoliciesListByServerCompleteMatchingPredicate(ctx context.Context, id commonids.SqlServerId, predicate ServerBlobAuditingPolicyOperationPredicate) (result ServerBlobAuditingPoliciesListByServerCompleteResult, err error) { + items := make([]ServerBlobAuditingPolicy, 0) + + resp, err := c.ServerBlobAuditingPoliciesListByServer(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ServerBlobAuditingPoliciesListByServerCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/model_databaseblobauditingpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/model_databaseblobauditingpolicy.go new file mode 100644 index 0000000000000..c49c188eb3390 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/model_databaseblobauditingpolicy.go @@ -0,0 +1,12 @@ +package blobauditing + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabaseBlobAuditingPolicy struct { + Id *string `json:"id,omitempty"` + Kind *string `json:"kind,omitempty"` + Name *string `json:"name,omitempty"` + Properties *DatabaseBlobAuditingPolicyProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/model_databaseblobauditingpolicyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/model_databaseblobauditingpolicyproperties.go new file mode 100644 index 0000000000000..86f368bfaa0eb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/model_databaseblobauditingpolicyproperties.go @@ -0,0 +1,17 @@ +package blobauditing + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabaseBlobAuditingPolicyProperties struct { + AuditActionsAndGroups *[]string `json:"auditActionsAndGroups,omitempty"` + IsAzureMonitorTargetEnabled *bool `json:"isAzureMonitorTargetEnabled,omitempty"` + IsManagedIdentityInUse *bool `json:"isManagedIdentityInUse,omitempty"` + IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"` + QueueDelayMs *int64 `json:"queueDelayMs,omitempty"` + RetentionDays *int64 `json:"retentionDays,omitempty"` + State BlobAuditingPolicyState `json:"state"` + StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` + StorageAccountSubscriptionId *string `json:"storageAccountSubscriptionId,omitempty"` + StorageEndpoint *string `json:"storageEndpoint,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/model_extendeddatabaseblobauditingpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/model_extendeddatabaseblobauditingpolicy.go new file mode 100644 index 0000000000000..89e191ff9355a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/model_extendeddatabaseblobauditingpolicy.go @@ -0,0 +1,11 @@ +package blobauditing + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtendedDatabaseBlobAuditingPolicy struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ExtendedDatabaseBlobAuditingPolicyProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/model_extendeddatabaseblobauditingpolicyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/model_extendeddatabaseblobauditingpolicyproperties.go new file mode 100644 index 0000000000000..8b01ff183bafc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/model_extendeddatabaseblobauditingpolicyproperties.go @@ -0,0 +1,18 @@ +package blobauditing + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtendedDatabaseBlobAuditingPolicyProperties struct { + AuditActionsAndGroups *[]string `json:"auditActionsAndGroups,omitempty"` + IsAzureMonitorTargetEnabled *bool `json:"isAzureMonitorTargetEnabled,omitempty"` + IsManagedIdentityInUse *bool `json:"isManagedIdentityInUse,omitempty"` + IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"` + PredicateExpression *string `json:"predicateExpression,omitempty"` + QueueDelayMs *int64 `json:"queueDelayMs,omitempty"` + RetentionDays *int64 `json:"retentionDays,omitempty"` + State BlobAuditingPolicyState `json:"state"` + StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` + StorageAccountSubscriptionId *string `json:"storageAccountSubscriptionId,omitempty"` + StorageEndpoint *string `json:"storageEndpoint,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/model_extendedserverblobauditingpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/model_extendedserverblobauditingpolicy.go new file mode 100644 index 0000000000000..7e6cc8e1443d1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/model_extendedserverblobauditingpolicy.go @@ -0,0 +1,11 @@ +package blobauditing + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtendedServerBlobAuditingPolicy struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ExtendedServerBlobAuditingPolicyProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/model_extendedserverblobauditingpolicyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/model_extendedserverblobauditingpolicyproperties.go new file mode 100644 index 0000000000000..f206ba4354b67 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/model_extendedserverblobauditingpolicyproperties.go @@ -0,0 +1,19 @@ +package blobauditing + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtendedServerBlobAuditingPolicyProperties struct { + AuditActionsAndGroups *[]string `json:"auditActionsAndGroups,omitempty"` + IsAzureMonitorTargetEnabled *bool `json:"isAzureMonitorTargetEnabled,omitempty"` + IsDevopsAuditEnabled *bool `json:"isDevopsAuditEnabled,omitempty"` + IsManagedIdentityInUse *bool `json:"isManagedIdentityInUse,omitempty"` + IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"` + PredicateExpression *string `json:"predicateExpression,omitempty"` + QueueDelayMs *int64 `json:"queueDelayMs,omitempty"` + RetentionDays *int64 `json:"retentionDays,omitempty"` + State BlobAuditingPolicyState `json:"state"` + StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` + StorageAccountSubscriptionId *string `json:"storageAccountSubscriptionId,omitempty"` + StorageEndpoint *string `json:"storageEndpoint,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/model_serverblobauditingpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/model_serverblobauditingpolicy.go new file mode 100644 index 0000000000000..0b54ee019c40b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/model_serverblobauditingpolicy.go @@ -0,0 +1,11 @@ +package blobauditing + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerBlobAuditingPolicy struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ServerBlobAuditingPolicyProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/model_serverblobauditingpolicyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/model_serverblobauditingpolicyproperties.go new file mode 100644 index 0000000000000..03316ef462ad1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/model_serverblobauditingpolicyproperties.go @@ -0,0 +1,18 @@ +package blobauditing + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerBlobAuditingPolicyProperties struct { + AuditActionsAndGroups *[]string `json:"auditActionsAndGroups,omitempty"` + IsAzureMonitorTargetEnabled *bool `json:"isAzureMonitorTargetEnabled,omitempty"` + IsDevopsAuditEnabled *bool `json:"isDevopsAuditEnabled,omitempty"` + IsManagedIdentityInUse *bool `json:"isManagedIdentityInUse,omitempty"` + IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"` + QueueDelayMs *int64 `json:"queueDelayMs,omitempty"` + RetentionDays *int64 `json:"retentionDays,omitempty"` + State BlobAuditingPolicyState `json:"state"` + StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` + StorageAccountSubscriptionId *string `json:"storageAccountSubscriptionId,omitempty"` + StorageEndpoint *string `json:"storageEndpoint,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/predicates.go new file mode 100644 index 0000000000000..0515898ea7f31 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/predicates.go @@ -0,0 +1,101 @@ +package blobauditing + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabaseBlobAuditingPolicyOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p DatabaseBlobAuditingPolicyOperationPredicate) Matches(input DatabaseBlobAuditingPolicy) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type ExtendedDatabaseBlobAuditingPolicyOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p ExtendedDatabaseBlobAuditingPolicyOperationPredicate) Matches(input ExtendedDatabaseBlobAuditingPolicy) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type ExtendedServerBlobAuditingPolicyOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p ExtendedServerBlobAuditingPolicyOperationPredicate) Matches(input ExtendedServerBlobAuditingPolicy) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type ServerBlobAuditingPolicyOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p ServerBlobAuditingPolicyOperationPredicate) Matches(input ServerBlobAuditingPolicy) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/version.go new file mode 100644 index 0000000000000..16a0414802ef8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing/version.go @@ -0,0 +1,12 @@ +package blobauditing + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/blobauditing/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/README.md new file mode 100644 index 0000000000000..9bf83cd16d238 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/README.md @@ -0,0 +1,237 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases` Documentation + +The `databases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases" +``` + + +### Client Initialization + +```go +client := databases.NewDatabasesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `DatabasesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +payload := databases.Database{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `DatabasesClient.Delete` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `DatabasesClient.Export` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +payload := databases.ExportDatabaseDefinition{ + // ... +} + + +if err := client.ExportThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `DatabasesClient.Failover` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +if err := client.FailoverThenPoll(ctx, id, databases.DefaultFailoverOperationOptions()); err != nil { + // handle the error +} +``` + + +### Example Usage: `DatabasesClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +read, err := client.Get(ctx, id, databases.DefaultGetOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `DatabasesClient.Import` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +payload := databases.ImportExistingDatabaseDefinition{ + // ... +} + + +if err := client.ImportThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `DatabasesClient.ListByElasticPool` + +```go +ctx := context.TODO() +id := commonids.NewSqlElasticPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "elasticPoolValue") + +// alternatively `client.ListByElasticPool(ctx, id)` can be used to do batched pagination +items, err := client.ListByElasticPoolComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `DatabasesClient.ListByServer` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination +items, err := client.ListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `DatabasesClient.ListInaccessibleByServer` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +// alternatively `client.ListInaccessibleByServer(ctx, id)` can be used to do batched pagination +items, err := client.ListInaccessibleByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `DatabasesClient.Pause` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +if err := client.PauseThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `DatabasesClient.Rename` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +payload := databases.ResourceMoveDefinition{ + // ... +} + + +read, err := client.Rename(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `DatabasesClient.Resume` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +if err := client.ResumeThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `DatabasesClient.Update` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +payload := databases.DatabaseUpdate{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `DatabasesClient.UpgradeDataWarehouse` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +if err := client.UpgradeDataWarehouseThenPoll(ctx, id); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_export.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_export.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_export.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_export.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_failover.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_failover.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_failover.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_failover.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_import.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_import.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_import.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_import.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_listbyelasticpool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_listbyelasticpool.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_listbyelasticpool.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_listbyelasticpool.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_listbyserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_listbyserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_listbyserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_listinaccessiblebyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_listinaccessiblebyserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_listinaccessiblebyserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_listinaccessiblebyserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_pause.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_pause.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_pause.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_pause.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_rename.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_rename.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_rename.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_rename.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_resume.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_resume.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_resume.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_resume.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_upgradedatawarehouse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_upgradedatawarehouse.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/method_upgradedatawarehouse.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/method_upgradedatawarehouse.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_database.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_database.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_database.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_database.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_databasekey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_databasekey.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_databasekey.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_databasekey.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_databaseproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_databaseproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_databaseproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_databaseproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_databaseupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_databaseupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_databaseupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_databaseupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_databaseupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_databaseupdateproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_databaseupdateproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_databaseupdateproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_exportdatabasedefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_exportdatabasedefinition.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_exportdatabasedefinition.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_exportdatabasedefinition.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_importexistingdatabasedefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_importexistingdatabasedefinition.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_importexistingdatabasedefinition.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_importexistingdatabasedefinition.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_importexportoperationresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_importexportoperationresult.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_importexportoperationresult.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_importexportoperationresult.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_importexportoperationresultproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_importexportoperationresultproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_importexportoperationresultproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_importexportoperationresultproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_networkisolationsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_networkisolationsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_networkisolationsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_networkisolationsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_privateendpointconnectionrequeststatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_privateendpointconnectionrequeststatus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_privateendpointconnectionrequeststatus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_privateendpointconnectionrequeststatus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_resourcemovedefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_resourcemovedefinition.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_resourcemovedefinition.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_resourcemovedefinition.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_sku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_sku.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/model_sku.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/model_sku.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/version.go new file mode 100644 index 0000000000000..56916000b26c6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases/version.go @@ -0,0 +1,12 @@ +package databases + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/databases/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/README.md new file mode 100644 index 0000000000000..f3d9234056fa8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/README.md @@ -0,0 +1,75 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies` Documentation + +The `databasesecurityalertpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies" +``` + + +### Client Initialization + +```go +client := databasesecurityalertpolicies.NewDatabaseSecurityAlertPoliciesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `DatabaseSecurityAlertPoliciesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +payload := databasesecurityalertpolicies.DatabaseSecurityAlertPolicy{ + // ... +} + + +read, err := client.CreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `DatabaseSecurityAlertPoliciesClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `DatabaseSecurityAlertPoliciesClient.ListByDatabase` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +// alternatively `client.ListByDatabase(ctx, id)` can be used to do batched pagination +items, err := client.ListByDatabaseComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/method_listbydatabase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/method_listbydatabase.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/method_listbydatabase.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/method_listbydatabase.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/model_databasesecurityalertpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/model_databasesecurityalertpolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/model_databasesecurityalertpolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/model_databasesecurityalertpolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/model_securityalertspolicyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/model_securityalertspolicyproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/model_securityalertspolicyproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/model_securityalertspolicyproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/version.go new file mode 100644 index 0000000000000..211964d8708f0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/version.go @@ -0,0 +1,12 @@ +package databasesecurityalertpolicies + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/databasesecurityalertpolicies/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/README.md new file mode 100644 index 0000000000000..daef0b49640c9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/README.md @@ -0,0 +1,73 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines` Documentation + +The `databasevulnerabilityassessmentrulebaselines` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines" +``` + + +### Client Initialization + +```go +client := databasevulnerabilityassessmentrulebaselines.NewDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `DatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := databasevulnerabilityassessmentrulebaselines.NewBaselineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "ruleIdValue", "default") + +payload := databasevulnerabilityassessmentrulebaselines.DatabaseVulnerabilityAssessmentRuleBaseline{ + // ... +} + + +read, err := client.CreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `DatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete` + +```go +ctx := context.TODO() +id := databasevulnerabilityassessmentrulebaselines.NewBaselineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "ruleIdValue", "default") + +read, err := client.Delete(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `DatabaseVulnerabilityAssessmentRuleBaselinesClient.Get` + +```go +ctx := context.TODO() +id := databasevulnerabilityassessmentrulebaselines.NewBaselineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "ruleIdValue", "default") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/client.go new file mode 100644 index 0000000000000..799c20cce659f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/client.go @@ -0,0 +1,26 @@ +package databasevulnerabilityassessmentrulebaselines + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabaseVulnerabilityAssessmentRuleBaselinesClient struct { + Client *resourcemanager.Client +} + +func NewDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseVulnerabilityAssessmentRuleBaselinesClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasevulnerabilityassessmentrulebaselines", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating DatabaseVulnerabilityAssessmentRuleBaselinesClient: %+v", err) + } + + return &DatabaseVulnerabilityAssessmentRuleBaselinesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/constants.go new file mode 100644 index 0000000000000..fcface1c5a4ea --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/constants.go @@ -0,0 +1,51 @@ +package databasevulnerabilityassessmentrulebaselines + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VulnerabilityAssessmentPolicyBaselineName string + +const ( + VulnerabilityAssessmentPolicyBaselineNameDefault VulnerabilityAssessmentPolicyBaselineName = "default" + VulnerabilityAssessmentPolicyBaselineNameMaster VulnerabilityAssessmentPolicyBaselineName = "master" +) + +func PossibleValuesForVulnerabilityAssessmentPolicyBaselineName() []string { + return []string{ + string(VulnerabilityAssessmentPolicyBaselineNameDefault), + string(VulnerabilityAssessmentPolicyBaselineNameMaster), + } +} + +func (s *VulnerabilityAssessmentPolicyBaselineName) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseVulnerabilityAssessmentPolicyBaselineName(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseVulnerabilityAssessmentPolicyBaselineName(input string) (*VulnerabilityAssessmentPolicyBaselineName, error) { + vals := map[string]VulnerabilityAssessmentPolicyBaselineName{ + "default": VulnerabilityAssessmentPolicyBaselineNameDefault, + "master": VulnerabilityAssessmentPolicyBaselineNameMaster, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := VulnerabilityAssessmentPolicyBaselineName(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/id_baseline.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/id_baseline.go new file mode 100644 index 0000000000000..afee2c5691aca --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/id_baseline.go @@ -0,0 +1,167 @@ +package databasevulnerabilityassessmentrulebaselines + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&BaselineId{}) +} + +var _ resourceids.ResourceId = &BaselineId{} + +// BaselineId is a struct representing the Resource ID for a Baseline +type BaselineId struct { + SubscriptionId string + ResourceGroupName string + ServerName string + DatabaseName string + RuleId string + BaselineName VulnerabilityAssessmentPolicyBaselineName +} + +// NewBaselineID returns a new BaselineId struct +func NewBaselineID(subscriptionId string, resourceGroupName string, serverName string, databaseName string, ruleId string, baselineName VulnerabilityAssessmentPolicyBaselineName) BaselineId { + return BaselineId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ServerName: serverName, + DatabaseName: databaseName, + RuleId: ruleId, + BaselineName: baselineName, + } +} + +// ParseBaselineID parses 'input' into a BaselineId +func ParseBaselineID(input string) (*BaselineId, error) { + parser := resourceids.NewParserFromResourceIdType(&BaselineId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := BaselineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseBaselineIDInsensitively parses 'input' case-insensitively into a BaselineId +// note: this method should only be used for API response data and not user input +func ParseBaselineIDInsensitively(input string) (*BaselineId, error) { + parser := resourceids.NewParserFromResourceIdType(&BaselineId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := BaselineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *BaselineId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) + } + + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) + } + + if id.RuleId, ok = input.Parsed["ruleId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "ruleId", input) + } + + if v, ok := input.Parsed["baselineName"]; true { + if !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "baselineName", input) + } + + baselineName, err := parseVulnerabilityAssessmentPolicyBaselineName(v) + if err != nil { + return fmt.Errorf("parsing %q: %+v", v, err) + } + id.BaselineName = *baselineName + } + + return nil +} + +// ValidateBaselineID checks that 'input' can be parsed as a Baseline ID +func ValidateBaselineID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseBaselineID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Baseline ID +func (id BaselineId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Sql/servers/%s/databases/%s/vulnerabilityAssessments/default/rules/%s/baselines/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServerName, id.DatabaseName, id.RuleId, string(id.BaselineName)) +} + +// Segments returns a slice of Resource ID Segments which comprise this Baseline ID +func (id BaselineId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftSql", "Microsoft.Sql", "Microsoft.Sql"), + resourceids.StaticSegment("staticServers", "servers", "servers"), + resourceids.UserSpecifiedSegment("serverName", "serverValue"), + resourceids.StaticSegment("staticDatabases", "databases", "databases"), + resourceids.UserSpecifiedSegment("databaseName", "databaseValue"), + resourceids.StaticSegment("staticVulnerabilityAssessments", "vulnerabilityAssessments", "vulnerabilityAssessments"), + resourceids.StaticSegment("vulnerabilityAssessmentName", "default", "default"), + resourceids.StaticSegment("staticRules", "rules", "rules"), + resourceids.UserSpecifiedSegment("ruleId", "ruleIdValue"), + resourceids.StaticSegment("staticBaselines", "baselines", "baselines"), + resourceids.ConstantSegment("baselineName", PossibleValuesForVulnerabilityAssessmentPolicyBaselineName(), "default"), + } +} + +// String returns a human-readable description of this Baseline ID +func (id BaselineId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Server Name: %q", id.ServerName), + fmt.Sprintf("Database Name: %q", id.DatabaseName), + fmt.Sprintf("Rule: %q", id.RuleId), + fmt.Sprintf("Baseline Name: %q", string(id.BaselineName)), + } + return fmt.Sprintf("Baseline (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/method_createorupdate.go new file mode 100644 index 0000000000000..2fc65238eb358 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/method_createorupdate.go @@ -0,0 +1,58 @@ +package databasevulnerabilityassessmentrulebaselines + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *DatabaseVulnerabilityAssessmentRuleBaseline +} + +// CreateOrUpdate ... +func (c DatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdate(ctx context.Context, id BaselineId, input DatabaseVulnerabilityAssessmentRuleBaseline) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model DatabaseVulnerabilityAssessmentRuleBaseline + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/method_delete.go new file mode 100644 index 0000000000000..cc043e8d89b58 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/method_delete.go @@ -0,0 +1,46 @@ +package databasevulnerabilityassessmentrulebaselines + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c DatabaseVulnerabilityAssessmentRuleBaselinesClient) Delete(ctx context.Context, id BaselineId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/method_get.go new file mode 100644 index 0000000000000..53027872e33b4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/method_get.go @@ -0,0 +1,54 @@ +package databasevulnerabilityassessmentrulebaselines + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *DatabaseVulnerabilityAssessmentRuleBaseline +} + +// Get ... +func (c DatabaseVulnerabilityAssessmentRuleBaselinesClient) Get(ctx context.Context, id BaselineId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model DatabaseVulnerabilityAssessmentRuleBaseline + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/model_databasevulnerabilityassessmentrulebaseline.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/model_databasevulnerabilityassessmentrulebaseline.go new file mode 100644 index 0000000000000..fe51a95a8d4ed --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/model_databasevulnerabilityassessmentrulebaseline.go @@ -0,0 +1,11 @@ +package databasevulnerabilityassessmentrulebaselines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabaseVulnerabilityAssessmentRuleBaseline struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *DatabaseVulnerabilityAssessmentRuleBaselineProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/model_databasevulnerabilityassessmentrulebaselineitem.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/model_databasevulnerabilityassessmentrulebaselineitem.go new file mode 100644 index 0000000000000..b47ec6e55787b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/model_databasevulnerabilityassessmentrulebaselineitem.go @@ -0,0 +1,8 @@ +package databasevulnerabilityassessmentrulebaselines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabaseVulnerabilityAssessmentRuleBaselineItem struct { + Result []string `json:"result"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/model_databasevulnerabilityassessmentrulebaselineproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/model_databasevulnerabilityassessmentrulebaselineproperties.go new file mode 100644 index 0000000000000..f51405f99d90f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/model_databasevulnerabilityassessmentrulebaselineproperties.go @@ -0,0 +1,8 @@ +package databasevulnerabilityassessmentrulebaselines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabaseVulnerabilityAssessmentRuleBaselineProperties struct { + BaselineResults []DatabaseVulnerabilityAssessmentRuleBaselineItem `json:"baselineResults"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/version.go new file mode 100644 index 0000000000000..593a3c8bfc89e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/version.go @@ -0,0 +1,12 @@ +package databasevulnerabilityassessmentrulebaselines + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/databasevulnerabilityassessmentrulebaselines/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/README.md new file mode 100644 index 0000000000000..ea689a198d67d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/README.md @@ -0,0 +1,112 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools` Documentation + +The `elasticpools` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools" +``` + + +### Client Initialization + +```go +client := elasticpools.NewElasticPoolsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ElasticPoolsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlElasticPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "elasticPoolValue") + +payload := elasticpools.ElasticPool{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ElasticPoolsClient.Delete` + +```go +ctx := context.TODO() +id := commonids.NewSqlElasticPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "elasticPoolValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ElasticPoolsClient.Failover` + +```go +ctx := context.TODO() +id := commonids.NewSqlElasticPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "elasticPoolValue") + +if err := client.FailoverThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ElasticPoolsClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewSqlElasticPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "elasticPoolValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ElasticPoolsClient.ListByServer` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +// alternatively `client.ListByServer(ctx, id, elasticpools.DefaultListByServerOperationOptions())` can be used to do batched pagination +items, err := client.ListByServerComplete(ctx, id, elasticpools.DefaultListByServerOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ElasticPoolsClient.Update` + +```go +ctx := context.TODO() +id := commonids.NewSqlElasticPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "elasticPoolValue") + +payload := elasticpools.ElasticPoolUpdate{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/method_failover.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/method_failover.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/method_failover.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/method_failover.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/method_listbyserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/method_listbyserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/method_listbyserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/model_elasticpool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/model_elasticpool.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/model_elasticpool.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/model_elasticpool.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/model_elasticpoolperdatabasesettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/model_elasticpoolperdatabasesettings.go new file mode 100644 index 0000000000000..6e4e9821184c0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/model_elasticpoolperdatabasesettings.go @@ -0,0 +1,10 @@ +package elasticpools + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ElasticPoolPerDatabaseSettings struct { + AutoPauseDelay *int64 `json:"autoPauseDelay,omitempty"` + MaxCapacity *float64 `json:"maxCapacity,omitempty"` + MinCapacity *float64 `json:"minCapacity,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/model_elasticpoolproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/model_elasticpoolproperties.go similarity index 94% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/model_elasticpoolproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/model_elasticpoolproperties.go index c3135e461ba4f..e9896b583d3cf 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/model_elasticpoolproperties.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/model_elasticpoolproperties.go @@ -10,6 +10,7 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ElasticPoolProperties struct { + AutoPauseDelay *int64 `json:"autoPauseDelay,omitempty"` AvailabilityZone *AvailabilityZoneType `json:"availabilityZone,omitempty"` CreationDate *string `json:"creationDate,omitempty"` HighAvailabilityReplicaCount *int64 `json:"highAvailabilityReplicaCount,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/model_elasticpoolupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/model_elasticpoolupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/model_elasticpoolupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/model_elasticpoolupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/model_elasticpoolupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/model_elasticpoolupdateproperties.go similarity index 92% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/model_elasticpoolupdateproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/model_elasticpoolupdateproperties.go index e30003e63e3d4..b2093a684dc14 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/model_elasticpoolupdateproperties.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/model_elasticpoolupdateproperties.go @@ -4,6 +4,7 @@ package elasticpools // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ElasticPoolUpdateProperties struct { + AutoPauseDelay *int64 `json:"autoPauseDelay,omitempty"` AvailabilityZone *AvailabilityZoneType `json:"availabilityZone,omitempty"` HighAvailabilityReplicaCount *int64 `json:"highAvailabilityReplicaCount,omitempty"` LicenseType *ElasticPoolLicenseType `json:"licenseType,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/model_sku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/model_sku.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/model_sku.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/model_sku.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/version.go new file mode 100644 index 0000000000000..677c093d4fe68 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools/version.go @@ -0,0 +1,12 @@ +package elasticpools + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/elasticpools/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/README.md new file mode 100644 index 0000000000000..4ca4fcd9365fc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/README.md @@ -0,0 +1,83 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors` Documentation + +The `encryptionprotectors` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors" +``` + + +### Client Initialization + +```go +client := encryptionprotectors.NewEncryptionProtectorsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `EncryptionProtectorsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +payload := encryptionprotectors.EncryptionProtector{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `EncryptionProtectorsClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `EncryptionProtectorsClient.ListByServer` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination +items, err := client.ListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `EncryptionProtectorsClient.Revalidate` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +if err := client.RevalidateThenPoll(ctx, id); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/client.go new file mode 100644 index 0000000000000..0213a8a383d97 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/client.go @@ -0,0 +1,26 @@ +package encryptionprotectors + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EncryptionProtectorsClient struct { + Client *resourcemanager.Client +} + +func NewEncryptionProtectorsClientWithBaseURI(sdkApi sdkEnv.Api) (*EncryptionProtectorsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "encryptionprotectors", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating EncryptionProtectorsClient: %+v", err) + } + + return &EncryptionProtectorsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/constants.go new file mode 100644 index 0000000000000..f798ffd8f32f9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/constants.go @@ -0,0 +1,51 @@ +package encryptionprotectors + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerKeyType string + +const ( + ServerKeyTypeAzureKeyVault ServerKeyType = "AzureKeyVault" + ServerKeyTypeServiceManaged ServerKeyType = "ServiceManaged" +) + +func PossibleValuesForServerKeyType() []string { + return []string{ + string(ServerKeyTypeAzureKeyVault), + string(ServerKeyTypeServiceManaged), + } +} + +func (s *ServerKeyType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseServerKeyType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseServerKeyType(input string) (*ServerKeyType, error) { + vals := map[string]ServerKeyType{ + "azurekeyvault": ServerKeyTypeAzureKeyVault, + "servicemanaged": ServerKeyTypeServiceManaged, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ServerKeyType(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/method_createorupdate.go new file mode 100644 index 0000000000000..91a71d0cd02aa --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/method_createorupdate.go @@ -0,0 +1,76 @@ +package encryptionprotectors + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *EncryptionProtector +} + +// CreateOrUpdate ... +func (c EncryptionProtectorsClient) CreateOrUpdate(ctx context.Context, id commonids.SqlServerId, input EncryptionProtector) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: fmt.Sprintf("%s/encryptionProtector/current", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c EncryptionProtectorsClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.SqlServerId, input EncryptionProtector) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/method_get.go new file mode 100644 index 0000000000000..659214dd4e9f4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/method_get.go @@ -0,0 +1,56 @@ +package encryptionprotectors + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *EncryptionProtector +} + +// Get ... +func (c EncryptionProtectorsClient) Get(ctx context.Context, id commonids.SqlServerId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/encryptionProtector/current", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model EncryptionProtector + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/method_listbyserver.go new file mode 100644 index 0000000000000..f7ca51c715610 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/method_listbyserver.go @@ -0,0 +1,106 @@ +package encryptionprotectors + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByServerOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]EncryptionProtector +} + +type ListByServerCompleteResult struct { + LatestHttpResponse *http.Response + Items []EncryptionProtector +} + +type ListByServerCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByServerCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByServer ... +func (c EncryptionProtectorsClient) ListByServer(ctx context.Context, id commonids.SqlServerId) (result ListByServerOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByServerCustomPager{}, + Path: fmt.Sprintf("%s/encryptionProtector", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]EncryptionProtector `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByServerComplete retrieves all the results into a single object +func (c EncryptionProtectorsClient) ListByServerComplete(ctx context.Context, id commonids.SqlServerId) (ListByServerCompleteResult, error) { + return c.ListByServerCompleteMatchingPredicate(ctx, id, EncryptionProtectorOperationPredicate{}) +} + +// ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c EncryptionProtectorsClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id commonids.SqlServerId, predicate EncryptionProtectorOperationPredicate) (result ListByServerCompleteResult, err error) { + items := make([]EncryptionProtector, 0) + + resp, err := c.ListByServer(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByServerCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/method_revalidate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/method_revalidate.go new file mode 100644 index 0000000000000..2e1da00467e68 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/method_revalidate.go @@ -0,0 +1,71 @@ +package encryptionprotectors + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RevalidateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Revalidate ... +func (c EncryptionProtectorsClient) Revalidate(ctx context.Context, id commonids.SqlServerId) (result RevalidateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/encryptionProtector/current/revalidate", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// RevalidateThenPoll performs Revalidate then polls until it's completed +func (c EncryptionProtectorsClient) RevalidateThenPoll(ctx context.Context, id commonids.SqlServerId) error { + result, err := c.Revalidate(ctx, id) + if err != nil { + return fmt.Errorf("performing Revalidate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Revalidate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/model_encryptionprotector.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/model_encryptionprotector.go new file mode 100644 index 0000000000000..48d530b87a4a6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/model_encryptionprotector.go @@ -0,0 +1,13 @@ +package encryptionprotectors + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EncryptionProtector struct { + Id *string `json:"id,omitempty"` + Kind *string `json:"kind,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *EncryptionProtectorProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/model_encryptionprotectorproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/model_encryptionprotectorproperties.go new file mode 100644 index 0000000000000..0511dedf4aa3c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/model_encryptionprotectorproperties.go @@ -0,0 +1,13 @@ +package encryptionprotectors + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EncryptionProtectorProperties struct { + AutoRotationEnabled *bool `json:"autoRotationEnabled,omitempty"` + ServerKeyName *string `json:"serverKeyName,omitempty"` + ServerKeyType ServerKeyType `json:"serverKeyType"` + Subregion *string `json:"subregion,omitempty"` + Thumbprint *string `json:"thumbprint,omitempty"` + Uri *string `json:"uri,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/predicates.go new file mode 100644 index 0000000000000..8ccad2732fb1e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/predicates.go @@ -0,0 +1,37 @@ +package encryptionprotectors + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EncryptionProtectorOperationPredicate struct { + Id *string + Kind *string + Location *string + Name *string + Type *string +} + +func (p EncryptionProtectorOperationPredicate) Matches(input EncryptionProtector) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/version.go new file mode 100644 index 0000000000000..849019339de9b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors/version.go @@ -0,0 +1,12 @@ +package encryptionprotectors + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/encryptionprotectors/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/README.md new file mode 100644 index 0000000000000..3ab4ba5ac3bb3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/README.md @@ -0,0 +1,136 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups` Documentation + +The `failovergroups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups" +``` + + +### Client Initialization + +```go +client := failovergroups.NewFailoverGroupsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `FailoverGroupsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := failovergroups.NewFailoverGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "failoverGroupValue") + +payload := failovergroups.FailoverGroup{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `FailoverGroupsClient.Delete` + +```go +ctx := context.TODO() +id := failovergroups.NewFailoverGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "failoverGroupValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `FailoverGroupsClient.Failover` + +```go +ctx := context.TODO() +id := failovergroups.NewFailoverGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "failoverGroupValue") + +if err := client.FailoverThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `FailoverGroupsClient.ForceFailoverAllowDataLoss` + +```go +ctx := context.TODO() +id := failovergroups.NewFailoverGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "failoverGroupValue") + +if err := client.ForceFailoverAllowDataLossThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `FailoverGroupsClient.Get` + +```go +ctx := context.TODO() +id := failovergroups.NewFailoverGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "failoverGroupValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `FailoverGroupsClient.ListByServer` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination +items, err := client.ListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `FailoverGroupsClient.TryPlannedBeforeForcedFailover` + +```go +ctx := context.TODO() +id := failovergroups.NewFailoverGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "failoverGroupValue") + +if err := client.TryPlannedBeforeForcedFailoverThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `FailoverGroupsClient.Update` + +```go +ctx := context.TODO() +id := failovergroups.NewFailoverGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "failoverGroupValue") + +payload := failovergroups.FailoverGroupUpdate{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/client.go new file mode 100644 index 0000000000000..edf4434aceef6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/client.go @@ -0,0 +1,26 @@ +package failovergroups + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FailoverGroupsClient struct { + Client *resourcemanager.Client +} + +func NewFailoverGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*FailoverGroupsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "failovergroups", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating FailoverGroupsClient: %+v", err) + } + + return &FailoverGroupsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/constants.go new file mode 100644 index 0000000000000..e40ab43bb0bd2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/constants.go @@ -0,0 +1,174 @@ +package failovergroups + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FailoverGroupDatabasesSecondaryType string + +const ( + FailoverGroupDatabasesSecondaryTypeGeo FailoverGroupDatabasesSecondaryType = "Geo" + FailoverGroupDatabasesSecondaryTypeStandby FailoverGroupDatabasesSecondaryType = "Standby" +) + +func PossibleValuesForFailoverGroupDatabasesSecondaryType() []string { + return []string{ + string(FailoverGroupDatabasesSecondaryTypeGeo), + string(FailoverGroupDatabasesSecondaryTypeStandby), + } +} + +func (s *FailoverGroupDatabasesSecondaryType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseFailoverGroupDatabasesSecondaryType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseFailoverGroupDatabasesSecondaryType(input string) (*FailoverGroupDatabasesSecondaryType, error) { + vals := map[string]FailoverGroupDatabasesSecondaryType{ + "geo": FailoverGroupDatabasesSecondaryTypeGeo, + "standby": FailoverGroupDatabasesSecondaryTypeStandby, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := FailoverGroupDatabasesSecondaryType(input) + return &out, nil +} + +type FailoverGroupReplicationRole string + +const ( + FailoverGroupReplicationRolePrimary FailoverGroupReplicationRole = "Primary" + FailoverGroupReplicationRoleSecondary FailoverGroupReplicationRole = "Secondary" +) + +func PossibleValuesForFailoverGroupReplicationRole() []string { + return []string{ + string(FailoverGroupReplicationRolePrimary), + string(FailoverGroupReplicationRoleSecondary), + } +} + +func (s *FailoverGroupReplicationRole) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseFailoverGroupReplicationRole(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseFailoverGroupReplicationRole(input string) (*FailoverGroupReplicationRole, error) { + vals := map[string]FailoverGroupReplicationRole{ + "primary": FailoverGroupReplicationRolePrimary, + "secondary": FailoverGroupReplicationRoleSecondary, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := FailoverGroupReplicationRole(input) + return &out, nil +} + +type ReadOnlyEndpointFailoverPolicy string + +const ( + ReadOnlyEndpointFailoverPolicyDisabled ReadOnlyEndpointFailoverPolicy = "Disabled" + ReadOnlyEndpointFailoverPolicyEnabled ReadOnlyEndpointFailoverPolicy = "Enabled" +) + +func PossibleValuesForReadOnlyEndpointFailoverPolicy() []string { + return []string{ + string(ReadOnlyEndpointFailoverPolicyDisabled), + string(ReadOnlyEndpointFailoverPolicyEnabled), + } +} + +func (s *ReadOnlyEndpointFailoverPolicy) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseReadOnlyEndpointFailoverPolicy(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseReadOnlyEndpointFailoverPolicy(input string) (*ReadOnlyEndpointFailoverPolicy, error) { + vals := map[string]ReadOnlyEndpointFailoverPolicy{ + "disabled": ReadOnlyEndpointFailoverPolicyDisabled, + "enabled": ReadOnlyEndpointFailoverPolicyEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ReadOnlyEndpointFailoverPolicy(input) + return &out, nil +} + +type ReadWriteEndpointFailoverPolicy string + +const ( + ReadWriteEndpointFailoverPolicyAutomatic ReadWriteEndpointFailoverPolicy = "Automatic" + ReadWriteEndpointFailoverPolicyManual ReadWriteEndpointFailoverPolicy = "Manual" +) + +func PossibleValuesForReadWriteEndpointFailoverPolicy() []string { + return []string{ + string(ReadWriteEndpointFailoverPolicyAutomatic), + string(ReadWriteEndpointFailoverPolicyManual), + } +} + +func (s *ReadWriteEndpointFailoverPolicy) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseReadWriteEndpointFailoverPolicy(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseReadWriteEndpointFailoverPolicy(input string) (*ReadWriteEndpointFailoverPolicy, error) { + vals := map[string]ReadWriteEndpointFailoverPolicy{ + "automatic": ReadWriteEndpointFailoverPolicyAutomatic, + "manual": ReadWriteEndpointFailoverPolicyManual, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ReadWriteEndpointFailoverPolicy(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/id_failovergroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/id_failovergroup.go new file mode 100644 index 0000000000000..b27ee1d2961d8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/id_failovergroup.go @@ -0,0 +1,139 @@ +package failovergroups + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&FailoverGroupId{}) +} + +var _ resourceids.ResourceId = &FailoverGroupId{} + +// FailoverGroupId is a struct representing the Resource ID for a Failover Group +type FailoverGroupId struct { + SubscriptionId string + ResourceGroupName string + ServerName string + FailoverGroupName string +} + +// NewFailoverGroupID returns a new FailoverGroupId struct +func NewFailoverGroupID(subscriptionId string, resourceGroupName string, serverName string, failoverGroupName string) FailoverGroupId { + return FailoverGroupId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ServerName: serverName, + FailoverGroupName: failoverGroupName, + } +} + +// ParseFailoverGroupID parses 'input' into a FailoverGroupId +func ParseFailoverGroupID(input string) (*FailoverGroupId, error) { + parser := resourceids.NewParserFromResourceIdType(&FailoverGroupId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := FailoverGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseFailoverGroupIDInsensitively parses 'input' case-insensitively into a FailoverGroupId +// note: this method should only be used for API response data and not user input +func ParseFailoverGroupIDInsensitively(input string) (*FailoverGroupId, error) { + parser := resourceids.NewParserFromResourceIdType(&FailoverGroupId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := FailoverGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FailoverGroupId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) + } + + if id.FailoverGroupName, ok = input.Parsed["failoverGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "failoverGroupName", input) + } + + return nil +} + +// ValidateFailoverGroupID checks that 'input' can be parsed as a Failover Group ID +func ValidateFailoverGroupID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseFailoverGroupID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Failover Group ID +func (id FailoverGroupId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Sql/servers/%s/failoverGroups/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServerName, id.FailoverGroupName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Failover Group ID +func (id FailoverGroupId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftSql", "Microsoft.Sql", "Microsoft.Sql"), + resourceids.StaticSegment("staticServers", "servers", "servers"), + resourceids.UserSpecifiedSegment("serverName", "serverValue"), + resourceids.StaticSegment("staticFailoverGroups", "failoverGroups", "failoverGroups"), + resourceids.UserSpecifiedSegment("failoverGroupName", "failoverGroupValue"), + } +} + +// String returns a human-readable description of this Failover Group ID +func (id FailoverGroupId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Server Name: %q", id.ServerName), + fmt.Sprintf("Failover Group Name: %q", id.FailoverGroupName), + } + return fmt.Sprintf("Failover Group (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/method_createorupdate.go new file mode 100644 index 0000000000000..945fef80170e1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/method_createorupdate.go @@ -0,0 +1,76 @@ +package failovergroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *FailoverGroup +} + +// CreateOrUpdate ... +func (c FailoverGroupsClient) CreateOrUpdate(ctx context.Context, id FailoverGroupId, input FailoverGroup) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c FailoverGroupsClient) CreateOrUpdateThenPoll(ctx context.Context, id FailoverGroupId, input FailoverGroup) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/method_delete.go new file mode 100644 index 0000000000000..6815bb47a0a30 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/method_delete.go @@ -0,0 +1,71 @@ +package failovergroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c FailoverGroupsClient) Delete(ctx context.Context, id FailoverGroupId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c FailoverGroupsClient) DeleteThenPoll(ctx context.Context, id FailoverGroupId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/method_failover.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/method_failover.go new file mode 100644 index 0000000000000..96a60e321638c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/method_failover.go @@ -0,0 +1,71 @@ +package failovergroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FailoverOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *FailoverGroup +} + +// Failover ... +func (c FailoverGroupsClient) Failover(ctx context.Context, id FailoverGroupId) (result FailoverOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/failover", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// FailoverThenPoll performs Failover then polls until it's completed +func (c FailoverGroupsClient) FailoverThenPoll(ctx context.Context, id FailoverGroupId) error { + result, err := c.Failover(ctx, id) + if err != nil { + return fmt.Errorf("performing Failover: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Failover: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/method_forcefailoverallowdataloss.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/method_forcefailoverallowdataloss.go new file mode 100644 index 0000000000000..faac1fb72a373 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/method_forcefailoverallowdataloss.go @@ -0,0 +1,71 @@ +package failovergroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ForceFailoverAllowDataLossOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *FailoverGroup +} + +// ForceFailoverAllowDataLoss ... +func (c FailoverGroupsClient) ForceFailoverAllowDataLoss(ctx context.Context, id FailoverGroupId) (result ForceFailoverAllowDataLossOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/forceFailoverAllowDataLoss", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// ForceFailoverAllowDataLossThenPoll performs ForceFailoverAllowDataLoss then polls until it's completed +func (c FailoverGroupsClient) ForceFailoverAllowDataLossThenPoll(ctx context.Context, id FailoverGroupId) error { + result, err := c.ForceFailoverAllowDataLoss(ctx, id) + if err != nil { + return fmt.Errorf("performing ForceFailoverAllowDataLoss: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after ForceFailoverAllowDataLoss: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/method_get.go new file mode 100644 index 0000000000000..ab2386fa0a566 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/method_get.go @@ -0,0 +1,54 @@ +package failovergroups + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *FailoverGroup +} + +// Get ... +func (c FailoverGroupsClient) Get(ctx context.Context, id FailoverGroupId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model FailoverGroup + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/method_listbyserver.go new file mode 100644 index 0000000000000..100e1a498b93f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/method_listbyserver.go @@ -0,0 +1,106 @@ +package failovergroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByServerOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]FailoverGroup +} + +type ListByServerCompleteResult struct { + LatestHttpResponse *http.Response + Items []FailoverGroup +} + +type ListByServerCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByServerCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByServer ... +func (c FailoverGroupsClient) ListByServer(ctx context.Context, id commonids.SqlServerId) (result ListByServerOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByServerCustomPager{}, + Path: fmt.Sprintf("%s/failoverGroups", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]FailoverGroup `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByServerComplete retrieves all the results into a single object +func (c FailoverGroupsClient) ListByServerComplete(ctx context.Context, id commonids.SqlServerId) (ListByServerCompleteResult, error) { + return c.ListByServerCompleteMatchingPredicate(ctx, id, FailoverGroupOperationPredicate{}) +} + +// ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c FailoverGroupsClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id commonids.SqlServerId, predicate FailoverGroupOperationPredicate) (result ListByServerCompleteResult, err error) { + items := make([]FailoverGroup, 0) + + resp, err := c.ListByServer(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByServerCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/method_tryplannedbeforeforcedfailover.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/method_tryplannedbeforeforcedfailover.go new file mode 100644 index 0000000000000..7416b50175721 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/method_tryplannedbeforeforcedfailover.go @@ -0,0 +1,71 @@ +package failovergroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TryPlannedBeforeForcedFailoverOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *FailoverGroup +} + +// TryPlannedBeforeForcedFailover ... +func (c FailoverGroupsClient) TryPlannedBeforeForcedFailover(ctx context.Context, id FailoverGroupId) (result TryPlannedBeforeForcedFailoverOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/tryPlannedBeforeForcedFailover", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// TryPlannedBeforeForcedFailoverThenPoll performs TryPlannedBeforeForcedFailover then polls until it's completed +func (c FailoverGroupsClient) TryPlannedBeforeForcedFailoverThenPoll(ctx context.Context, id FailoverGroupId) error { + result, err := c.TryPlannedBeforeForcedFailover(ctx, id) + if err != nil { + return fmt.Errorf("performing TryPlannedBeforeForcedFailover: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after TryPlannedBeforeForcedFailover: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/method_update.go new file mode 100644 index 0000000000000..a50d817383132 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/method_update.go @@ -0,0 +1,75 @@ +package failovergroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *FailoverGroup +} + +// Update ... +func (c FailoverGroupsClient) Update(ctx context.Context, id FailoverGroupId, input FailoverGroupUpdate) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c FailoverGroupsClient) UpdateThenPoll(ctx context.Context, id FailoverGroupId, input FailoverGroupUpdate) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/model_failovergroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/model_failovergroup.go new file mode 100644 index 0000000000000..bf4083437c2aa --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/model_failovergroup.go @@ -0,0 +1,13 @@ +package failovergroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FailoverGroup struct { + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *FailoverGroupProperties `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/model_failovergroupproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/model_failovergroupproperties.go new file mode 100644 index 0000000000000..b22786bcf59c2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/model_failovergroupproperties.go @@ -0,0 +1,14 @@ +package failovergroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FailoverGroupProperties struct { + Databases *[]string `json:"databases,omitempty"` + PartnerServers []PartnerInfo `json:"partnerServers"` + ReadOnlyEndpoint *FailoverGroupReadOnlyEndpoint `json:"readOnlyEndpoint,omitempty"` + ReadWriteEndpoint FailoverGroupReadWriteEndpoint `json:"readWriteEndpoint"` + ReplicationRole *FailoverGroupReplicationRole `json:"replicationRole,omitempty"` + ReplicationState *string `json:"replicationState,omitempty"` + SecondaryType *FailoverGroupDatabasesSecondaryType `json:"secondaryType,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/model_failovergroupreadonlyendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/model_failovergroupreadonlyendpoint.go new file mode 100644 index 0000000000000..d5fb08f6725aa --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/model_failovergroupreadonlyendpoint.go @@ -0,0 +1,9 @@ +package failovergroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FailoverGroupReadOnlyEndpoint struct { + FailoverPolicy *ReadOnlyEndpointFailoverPolicy `json:"failoverPolicy,omitempty"` + TargetServer *string `json:"targetServer,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/model_failovergroupreadwriteendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/model_failovergroupreadwriteendpoint.go new file mode 100644 index 0000000000000..a1e7d7b451063 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/model_failovergroupreadwriteendpoint.go @@ -0,0 +1,9 @@ +package failovergroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FailoverGroupReadWriteEndpoint struct { + FailoverPolicy ReadWriteEndpointFailoverPolicy `json:"failoverPolicy"` + FailoverWithDataLossGracePeriodMinutes *int64 `json:"failoverWithDataLossGracePeriodMinutes,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/model_failovergroupupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/model_failovergroupupdate.go new file mode 100644 index 0000000000000..8181ff48639c0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/model_failovergroupupdate.go @@ -0,0 +1,9 @@ +package failovergroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FailoverGroupUpdate struct { + Properties *FailoverGroupUpdateProperties `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/model_failovergroupupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/model_failovergroupupdateproperties.go new file mode 100644 index 0000000000000..3202bb694bd04 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/model_failovergroupupdateproperties.go @@ -0,0 +1,12 @@ +package failovergroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FailoverGroupUpdateProperties struct { + Databases *[]string `json:"databases,omitempty"` + PartnerServers *[]PartnerInfo `json:"partnerServers,omitempty"` + ReadOnlyEndpoint *FailoverGroupReadOnlyEndpoint `json:"readOnlyEndpoint,omitempty"` + ReadWriteEndpoint *FailoverGroupReadWriteEndpoint `json:"readWriteEndpoint,omitempty"` + SecondaryType *FailoverGroupDatabasesSecondaryType `json:"secondaryType,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/model_partnerinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/model_partnerinfo.go new file mode 100644 index 0000000000000..2fb7de037dee7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/model_partnerinfo.go @@ -0,0 +1,10 @@ +package failovergroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PartnerInfo struct { + Id string `json:"id"` + Location *string `json:"location,omitempty"` + ReplicationRole *FailoverGroupReplicationRole `json:"replicationRole,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/predicates.go new file mode 100644 index 0000000000000..bba27fb4d106f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/predicates.go @@ -0,0 +1,32 @@ +package failovergroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FailoverGroupOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p FailoverGroupOperationPredicate) Matches(input FailoverGroup) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/version.go new file mode 100644 index 0000000000000..47594b7e93d03 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups/version.go @@ -0,0 +1,12 @@ +package failovergroups + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/failovergroups/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/README.md new file mode 100644 index 0000000000000..1df2c1177a0f0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/README.md @@ -0,0 +1,112 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules` Documentation + +The `firewallrules` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules" +``` + + +### Client Initialization + +```go +client := firewallrules.NewFirewallRulesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `FirewallRulesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := firewallrules.NewFirewallRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "firewallRuleValue") + +payload := firewallrules.FirewallRule{ + // ... +} + + +read, err := client.CreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `FirewallRulesClient.Delete` + +```go +ctx := context.TODO() +id := firewallrules.NewFirewallRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "firewallRuleValue") + +read, err := client.Delete(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `FirewallRulesClient.Get` + +```go +ctx := context.TODO() +id := firewallrules.NewFirewallRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "firewallRuleValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `FirewallRulesClient.ListByServer` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination +items, err := client.ListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `FirewallRulesClient.Replace` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +payload := firewallrules.FirewallRuleList{ + // ... +} + + +read, err := client.Replace(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/id_firewallrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/id_firewallrule.go similarity index 96% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/id_firewallrule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/id_firewallrule.go index d6db872e8dc8a..36610c932a054 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/id_firewallrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/id_firewallrule.go @@ -107,7 +107,7 @@ func ValidateFirewallRuleID(input interface{}, key string) (warnings []string, e // ID returns the formatted Firewall Rule ID func (id FirewallRuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMariaDB/servers/%s/firewallRules/%s" + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Sql/servers/%s/firewallRules/%s" return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServerName, id.FirewallRuleName) } @@ -119,7 +119,7 @@ func (id FirewallRuleId) Segments() []resourceids.Segment { resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftDBforMariaDB", "Microsoft.DBforMariaDB", "Microsoft.DBforMariaDB"), + resourceids.ResourceProviderSegment("staticMicrosoftSql", "Microsoft.Sql", "Microsoft.Sql"), resourceids.StaticSegment("staticServers", "servers", "servers"), resourceids.UserSpecifiedSegment("serverName", "serverValue"), resourceids.StaticSegment("staticFirewallRules", "firewallRules", "firewallRules"), diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/method_createorupdate.go new file mode 100644 index 0000000000000..20251b56b612c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/method_createorupdate.go @@ -0,0 +1,59 @@ +package firewallrules + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *FirewallRule +} + +// CreateOrUpdate ... +func (c FirewallRulesClient) CreateOrUpdate(ctx context.Context, id FirewallRuleId, input FirewallRule) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model FirewallRule + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/method_delete.go new file mode 100644 index 0000000000000..9ba8c05de2a7c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/method_delete.go @@ -0,0 +1,47 @@ +package firewallrules + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c FirewallRulesClient) Delete(ctx context.Context, id FirewallRuleId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/method_listbyserver.go new file mode 100644 index 0000000000000..aa03997e6382e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/method_listbyserver.go @@ -0,0 +1,106 @@ +package firewallrules + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByServerOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]FirewallRule +} + +type ListByServerCompleteResult struct { + LatestHttpResponse *http.Response + Items []FirewallRule +} + +type ListByServerCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByServerCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByServer ... +func (c FirewallRulesClient) ListByServer(ctx context.Context, id commonids.SqlServerId) (result ListByServerOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByServerCustomPager{}, + Path: fmt.Sprintf("%s/firewallRules", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]FirewallRule `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByServerComplete retrieves all the results into a single object +func (c FirewallRulesClient) ListByServerComplete(ctx context.Context, id commonids.SqlServerId) (ListByServerCompleteResult, error) { + return c.ListByServerCompleteMatchingPredicate(ctx, id, FirewallRuleOperationPredicate{}) +} + +// ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c FirewallRulesClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id commonids.SqlServerId, predicate FirewallRuleOperationPredicate) (result ListByServerCompleteResult, err error) { + items := make([]FirewallRule, 0) + + resp, err := c.ListByServer(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByServerCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/method_replace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/method_replace.go new file mode 100644 index 0000000000000..5541e3df8a2d1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/method_replace.go @@ -0,0 +1,61 @@ +package firewallrules + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ReplaceOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *FirewallRule +} + +// Replace ... +func (c FirewallRulesClient) Replace(ctx context.Context, id commonids.SqlServerId, input FirewallRuleList) (result ReplaceOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: fmt.Sprintf("%s/firewallRules", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model FirewallRule + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/model_firewallrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/model_firewallrule.go new file mode 100644 index 0000000000000..d8f3c305e78bd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/model_firewallrule.go @@ -0,0 +1,11 @@ +package firewallrules + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FirewallRule struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ServerFirewallRuleProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/model_firewallrulelist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/model_firewallrulelist.go new file mode 100644 index 0000000000000..f7baf79f2af08 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/model_firewallrulelist.go @@ -0,0 +1,8 @@ +package firewallrules + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FirewallRuleList struct { + Values *[]FirewallRule `json:"values,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/model_serverfirewallruleproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/model_serverfirewallruleproperties.go new file mode 100644 index 0000000000000..328206f524134 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/model_serverfirewallruleproperties.go @@ -0,0 +1,9 @@ +package firewallrules + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerFirewallRuleProperties struct { + EndIPAddress *string `json:"endIpAddress,omitempty"` + StartIPAddress *string `json:"startIpAddress,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/predicates.go new file mode 100644 index 0000000000000..fb7011b1d3b1d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/predicates.go @@ -0,0 +1,27 @@ +package firewallrules + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FirewallRuleOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p FirewallRuleOperationPredicate) Matches(input FirewallRule) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/version.go new file mode 100644 index 0000000000000..19e5d1fde3b33 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules/version.go @@ -0,0 +1,12 @@ +package firewallrules + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/firewallrules/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies/README.md new file mode 100644 index 0000000000000..e0a7a08696371 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies/README.md @@ -0,0 +1,75 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies` Documentation + +The `geobackuppolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies" +``` + + +### Client Initialization + +```go +client := geobackuppolicies.NewGeoBackupPoliciesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `GeoBackupPoliciesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +payload := geobackuppolicies.GeoBackupPolicy{ + // ... +} + + +read, err := client.CreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `GeoBackupPoliciesClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `GeoBackupPoliciesClient.List` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies/model_geobackuppolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies/model_geobackuppolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies/model_geobackuppolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies/model_geobackuppolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies/model_geobackuppolicyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies/model_geobackuppolicyproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies/model_geobackuppolicyproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies/model_geobackuppolicyproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies/version.go new file mode 100644 index 0000000000000..098c56ed02de5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies/version.go @@ -0,0 +1,12 @@ +package geobackuppolicies + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/geobackuppolicies/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/README.md new file mode 100644 index 0000000000000..4f66bd83dfaa5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/README.md @@ -0,0 +1,106 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups` Documentation + +The `instancefailovergroups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups" +``` + + +### Client Initialization + +```go +client := instancefailovergroups.NewInstanceFailoverGroupsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `InstanceFailoverGroupsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := instancefailovergroups.NewInstanceFailoverGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "instanceFailoverGroupValue") + +payload := instancefailovergroups.InstanceFailoverGroup{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `InstanceFailoverGroupsClient.Delete` + +```go +ctx := context.TODO() +id := instancefailovergroups.NewInstanceFailoverGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "instanceFailoverGroupValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `InstanceFailoverGroupsClient.Failover` + +```go +ctx := context.TODO() +id := instancefailovergroups.NewInstanceFailoverGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "instanceFailoverGroupValue") + +if err := client.FailoverThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `InstanceFailoverGroupsClient.ForceFailoverAllowDataLoss` + +```go +ctx := context.TODO() +id := instancefailovergroups.NewInstanceFailoverGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "instanceFailoverGroupValue") + +if err := client.ForceFailoverAllowDataLossThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `InstanceFailoverGroupsClient.Get` + +```go +ctx := context.TODO() +id := instancefailovergroups.NewInstanceFailoverGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "instanceFailoverGroupValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `InstanceFailoverGroupsClient.ListByLocation` + +```go +ctx := context.TODO() +id := instancefailovergroups.NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue") + +// alternatively `client.ListByLocation(ctx, id)` can be used to do batched pagination +items, err := client.ListByLocationComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/client.go new file mode 100644 index 0000000000000..77237fd2c0a7c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/client.go @@ -0,0 +1,26 @@ +package instancefailovergroups + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InstanceFailoverGroupsClient struct { + Client *resourcemanager.Client +} + +func NewInstanceFailoverGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*InstanceFailoverGroupsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "instancefailovergroups", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating InstanceFailoverGroupsClient: %+v", err) + } + + return &InstanceFailoverGroupsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/constants.go new file mode 100644 index 0000000000000..bada7a8e899ee --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/constants.go @@ -0,0 +1,174 @@ +package instancefailovergroups + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InstanceFailoverGroupReplicationRole string + +const ( + InstanceFailoverGroupReplicationRolePrimary InstanceFailoverGroupReplicationRole = "Primary" + InstanceFailoverGroupReplicationRoleSecondary InstanceFailoverGroupReplicationRole = "Secondary" +) + +func PossibleValuesForInstanceFailoverGroupReplicationRole() []string { + return []string{ + string(InstanceFailoverGroupReplicationRolePrimary), + string(InstanceFailoverGroupReplicationRoleSecondary), + } +} + +func (s *InstanceFailoverGroupReplicationRole) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseInstanceFailoverGroupReplicationRole(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseInstanceFailoverGroupReplicationRole(input string) (*InstanceFailoverGroupReplicationRole, error) { + vals := map[string]InstanceFailoverGroupReplicationRole{ + "primary": InstanceFailoverGroupReplicationRolePrimary, + "secondary": InstanceFailoverGroupReplicationRoleSecondary, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := InstanceFailoverGroupReplicationRole(input) + return &out, nil +} + +type ReadOnlyEndpointFailoverPolicy string + +const ( + ReadOnlyEndpointFailoverPolicyDisabled ReadOnlyEndpointFailoverPolicy = "Disabled" + ReadOnlyEndpointFailoverPolicyEnabled ReadOnlyEndpointFailoverPolicy = "Enabled" +) + +func PossibleValuesForReadOnlyEndpointFailoverPolicy() []string { + return []string{ + string(ReadOnlyEndpointFailoverPolicyDisabled), + string(ReadOnlyEndpointFailoverPolicyEnabled), + } +} + +func (s *ReadOnlyEndpointFailoverPolicy) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseReadOnlyEndpointFailoverPolicy(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseReadOnlyEndpointFailoverPolicy(input string) (*ReadOnlyEndpointFailoverPolicy, error) { + vals := map[string]ReadOnlyEndpointFailoverPolicy{ + "disabled": ReadOnlyEndpointFailoverPolicyDisabled, + "enabled": ReadOnlyEndpointFailoverPolicyEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ReadOnlyEndpointFailoverPolicy(input) + return &out, nil +} + +type ReadWriteEndpointFailoverPolicy string + +const ( + ReadWriteEndpointFailoverPolicyAutomatic ReadWriteEndpointFailoverPolicy = "Automatic" + ReadWriteEndpointFailoverPolicyManual ReadWriteEndpointFailoverPolicy = "Manual" +) + +func PossibleValuesForReadWriteEndpointFailoverPolicy() []string { + return []string{ + string(ReadWriteEndpointFailoverPolicyAutomatic), + string(ReadWriteEndpointFailoverPolicyManual), + } +} + +func (s *ReadWriteEndpointFailoverPolicy) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseReadWriteEndpointFailoverPolicy(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseReadWriteEndpointFailoverPolicy(input string) (*ReadWriteEndpointFailoverPolicy, error) { + vals := map[string]ReadWriteEndpointFailoverPolicy{ + "automatic": ReadWriteEndpointFailoverPolicyAutomatic, + "manual": ReadWriteEndpointFailoverPolicyManual, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ReadWriteEndpointFailoverPolicy(input) + return &out, nil +} + +type SecondaryInstanceType string + +const ( + SecondaryInstanceTypeGeo SecondaryInstanceType = "Geo" + SecondaryInstanceTypeStandby SecondaryInstanceType = "Standby" +) + +func PossibleValuesForSecondaryInstanceType() []string { + return []string{ + string(SecondaryInstanceTypeGeo), + string(SecondaryInstanceTypeStandby), + } +} + +func (s *SecondaryInstanceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSecondaryInstanceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSecondaryInstanceType(input string) (*SecondaryInstanceType, error) { + vals := map[string]SecondaryInstanceType{ + "geo": SecondaryInstanceTypeGeo, + "standby": SecondaryInstanceTypeStandby, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SecondaryInstanceType(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/id_instancefailovergroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/id_instancefailovergroup.go new file mode 100644 index 0000000000000..56d3645eed9ab --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/id_instancefailovergroup.go @@ -0,0 +1,139 @@ +package instancefailovergroups + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&InstanceFailoverGroupId{}) +} + +var _ resourceids.ResourceId = &InstanceFailoverGroupId{} + +// InstanceFailoverGroupId is a struct representing the Resource ID for a Instance Failover Group +type InstanceFailoverGroupId struct { + SubscriptionId string + ResourceGroupName string + LocationName string + InstanceFailoverGroupName string +} + +// NewInstanceFailoverGroupID returns a new InstanceFailoverGroupId struct +func NewInstanceFailoverGroupID(subscriptionId string, resourceGroupName string, locationName string, instanceFailoverGroupName string) InstanceFailoverGroupId { + return InstanceFailoverGroupId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + LocationName: locationName, + InstanceFailoverGroupName: instanceFailoverGroupName, + } +} + +// ParseInstanceFailoverGroupID parses 'input' into a InstanceFailoverGroupId +func ParseInstanceFailoverGroupID(input string) (*InstanceFailoverGroupId, error) { + parser := resourceids.NewParserFromResourceIdType(&InstanceFailoverGroupId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := InstanceFailoverGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseInstanceFailoverGroupIDInsensitively parses 'input' case-insensitively into a InstanceFailoverGroupId +// note: this method should only be used for API response data and not user input +func ParseInstanceFailoverGroupIDInsensitively(input string) (*InstanceFailoverGroupId, error) { + parser := resourceids.NewParserFromResourceIdType(&InstanceFailoverGroupId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := InstanceFailoverGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *InstanceFailoverGroupId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) + } + + if id.InstanceFailoverGroupName, ok = input.Parsed["instanceFailoverGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "instanceFailoverGroupName", input) + } + + return nil +} + +// ValidateInstanceFailoverGroupID checks that 'input' can be parsed as a Instance Failover Group ID +func ValidateInstanceFailoverGroupID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseInstanceFailoverGroupID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Instance Failover Group ID +func (id InstanceFailoverGroupId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Sql/locations/%s/instanceFailoverGroups/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LocationName, id.InstanceFailoverGroupName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Instance Failover Group ID +func (id InstanceFailoverGroupId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftSql", "Microsoft.Sql", "Microsoft.Sql"), + resourceids.StaticSegment("staticLocations", "locations", "locations"), + resourceids.UserSpecifiedSegment("locationName", "locationValue"), + resourceids.StaticSegment("staticInstanceFailoverGroups", "instanceFailoverGroups", "instanceFailoverGroups"), + resourceids.UserSpecifiedSegment("instanceFailoverGroupName", "instanceFailoverGroupValue"), + } +} + +// String returns a human-readable description of this Instance Failover Group ID +func (id InstanceFailoverGroupId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Location Name: %q", id.LocationName), + fmt.Sprintf("Instance Failover Group Name: %q", id.InstanceFailoverGroupName), + } + return fmt.Sprintf("Instance Failover Group (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/id_providerlocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/id_providerlocation.go new file mode 100644 index 0000000000000..433544172373e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/id_providerlocation.go @@ -0,0 +1,130 @@ +package instancefailovergroups + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&ProviderLocationId{}) +} + +var _ resourceids.ResourceId = &ProviderLocationId{} + +// ProviderLocationId is a struct representing the Resource ID for a Provider Location +type ProviderLocationId struct { + SubscriptionId string + ResourceGroupName string + LocationName string +} + +// NewProviderLocationID returns a new ProviderLocationId struct +func NewProviderLocationID(subscriptionId string, resourceGroupName string, locationName string) ProviderLocationId { + return ProviderLocationId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + LocationName: locationName, + } +} + +// ParseProviderLocationID parses 'input' into a ProviderLocationId +func ParseProviderLocationID(input string) (*ProviderLocationId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProviderLocationId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProviderLocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseProviderLocationIDInsensitively parses 'input' case-insensitively into a ProviderLocationId +// note: this method should only be used for API response data and not user input +func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProviderLocationId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProviderLocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProviderLocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) + } + + return nil +} + +// ValidateProviderLocationID checks that 'input' can be parsed as a Provider Location ID +func ValidateProviderLocationID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseProviderLocationID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Provider Location ID +func (id ProviderLocationId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Sql/locations/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LocationName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Provider Location ID +func (id ProviderLocationId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftSql", "Microsoft.Sql", "Microsoft.Sql"), + resourceids.StaticSegment("staticLocations", "locations", "locations"), + resourceids.UserSpecifiedSegment("locationName", "locationValue"), + } +} + +// String returns a human-readable description of this Provider Location ID +func (id ProviderLocationId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Location Name: %q", id.LocationName), + } + return fmt.Sprintf("Provider Location (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/method_createorupdate.go new file mode 100644 index 0000000000000..2c3e879c19e92 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/method_createorupdate.go @@ -0,0 +1,76 @@ +package instancefailovergroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *InstanceFailoverGroup +} + +// CreateOrUpdate ... +func (c InstanceFailoverGroupsClient) CreateOrUpdate(ctx context.Context, id InstanceFailoverGroupId, input InstanceFailoverGroup) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c InstanceFailoverGroupsClient) CreateOrUpdateThenPoll(ctx context.Context, id InstanceFailoverGroupId, input InstanceFailoverGroup) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/method_delete.go new file mode 100644 index 0000000000000..16c9e12489a7a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/method_delete.go @@ -0,0 +1,71 @@ +package instancefailovergroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c InstanceFailoverGroupsClient) Delete(ctx context.Context, id InstanceFailoverGroupId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c InstanceFailoverGroupsClient) DeleteThenPoll(ctx context.Context, id InstanceFailoverGroupId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/method_failover.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/method_failover.go new file mode 100644 index 0000000000000..33f750aa0d77c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/method_failover.go @@ -0,0 +1,71 @@ +package instancefailovergroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FailoverOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *InstanceFailoverGroup +} + +// Failover ... +func (c InstanceFailoverGroupsClient) Failover(ctx context.Context, id InstanceFailoverGroupId) (result FailoverOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/failover", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// FailoverThenPoll performs Failover then polls until it's completed +func (c InstanceFailoverGroupsClient) FailoverThenPoll(ctx context.Context, id InstanceFailoverGroupId) error { + result, err := c.Failover(ctx, id) + if err != nil { + return fmt.Errorf("performing Failover: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Failover: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/method_forcefailoverallowdataloss.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/method_forcefailoverallowdataloss.go new file mode 100644 index 0000000000000..9634e7ef7e4a2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/method_forcefailoverallowdataloss.go @@ -0,0 +1,71 @@ +package instancefailovergroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ForceFailoverAllowDataLossOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *InstanceFailoverGroup +} + +// ForceFailoverAllowDataLoss ... +func (c InstanceFailoverGroupsClient) ForceFailoverAllowDataLoss(ctx context.Context, id InstanceFailoverGroupId) (result ForceFailoverAllowDataLossOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/forceFailoverAllowDataLoss", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// ForceFailoverAllowDataLossThenPoll performs ForceFailoverAllowDataLoss then polls until it's completed +func (c InstanceFailoverGroupsClient) ForceFailoverAllowDataLossThenPoll(ctx context.Context, id InstanceFailoverGroupId) error { + result, err := c.ForceFailoverAllowDataLoss(ctx, id) + if err != nil { + return fmt.Errorf("performing ForceFailoverAllowDataLoss: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after ForceFailoverAllowDataLoss: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/method_get.go new file mode 100644 index 0000000000000..1254e8ce94bde --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/method_get.go @@ -0,0 +1,54 @@ +package instancefailovergroups + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *InstanceFailoverGroup +} + +// Get ... +func (c InstanceFailoverGroupsClient) Get(ctx context.Context, id InstanceFailoverGroupId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model InstanceFailoverGroup + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/method_listbylocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/method_listbylocation.go new file mode 100644 index 0000000000000..b5ab352fd086d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/method_listbylocation.go @@ -0,0 +1,105 @@ +package instancefailovergroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByLocationOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]InstanceFailoverGroup +} + +type ListByLocationCompleteResult struct { + LatestHttpResponse *http.Response + Items []InstanceFailoverGroup +} + +type ListByLocationCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByLocationCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByLocation ... +func (c InstanceFailoverGroupsClient) ListByLocation(ctx context.Context, id ProviderLocationId) (result ListByLocationOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByLocationCustomPager{}, + Path: fmt.Sprintf("%s/instanceFailoverGroups", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]InstanceFailoverGroup `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByLocationComplete retrieves all the results into a single object +func (c InstanceFailoverGroupsClient) ListByLocationComplete(ctx context.Context, id ProviderLocationId) (ListByLocationCompleteResult, error) { + return c.ListByLocationCompleteMatchingPredicate(ctx, id, InstanceFailoverGroupOperationPredicate{}) +} + +// ListByLocationCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c InstanceFailoverGroupsClient) ListByLocationCompleteMatchingPredicate(ctx context.Context, id ProviderLocationId, predicate InstanceFailoverGroupOperationPredicate) (result ListByLocationCompleteResult, err error) { + items := make([]InstanceFailoverGroup, 0) + + resp, err := c.ListByLocation(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByLocationCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/model_instancefailovergroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/model_instancefailovergroup.go new file mode 100644 index 0000000000000..d143e10f5b1c4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/model_instancefailovergroup.go @@ -0,0 +1,11 @@ +package instancefailovergroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InstanceFailoverGroup struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *InstanceFailoverGroupProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/model_instancefailovergroupproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/model_instancefailovergroupproperties.go new file mode 100644 index 0000000000000..856450141870a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/model_instancefailovergroupproperties.go @@ -0,0 +1,14 @@ +package instancefailovergroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InstanceFailoverGroupProperties struct { + ManagedInstancePairs []ManagedInstancePairInfo `json:"managedInstancePairs"` + PartnerRegions []PartnerRegionInfo `json:"partnerRegions"` + ReadOnlyEndpoint *InstanceFailoverGroupReadOnlyEndpoint `json:"readOnlyEndpoint,omitempty"` + ReadWriteEndpoint InstanceFailoverGroupReadWriteEndpoint `json:"readWriteEndpoint"` + ReplicationRole *InstanceFailoverGroupReplicationRole `json:"replicationRole,omitempty"` + ReplicationState *string `json:"replicationState,omitempty"` + SecondaryType *SecondaryInstanceType `json:"secondaryType,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/model_instancefailovergroupreadonlyendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/model_instancefailovergroupreadonlyendpoint.go new file mode 100644 index 0000000000000..af9aae49c73b6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/model_instancefailovergroupreadonlyendpoint.go @@ -0,0 +1,8 @@ +package instancefailovergroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InstanceFailoverGroupReadOnlyEndpoint struct { + FailoverPolicy *ReadOnlyEndpointFailoverPolicy `json:"failoverPolicy,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/model_instancefailovergroupreadwriteendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/model_instancefailovergroupreadwriteendpoint.go new file mode 100644 index 0000000000000..6470ba23b9e09 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/model_instancefailovergroupreadwriteendpoint.go @@ -0,0 +1,9 @@ +package instancefailovergroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InstanceFailoverGroupReadWriteEndpoint struct { + FailoverPolicy ReadWriteEndpointFailoverPolicy `json:"failoverPolicy"` + FailoverWithDataLossGracePeriodMinutes *int64 `json:"failoverWithDataLossGracePeriodMinutes,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/model_managedinstancepairinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/model_managedinstancepairinfo.go new file mode 100644 index 0000000000000..2e3aef9ff300d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/model_managedinstancepairinfo.go @@ -0,0 +1,9 @@ +package instancefailovergroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstancePairInfo struct { + PartnerManagedInstanceId *string `json:"partnerManagedInstanceId,omitempty"` + PrimaryManagedInstanceId *string `json:"primaryManagedInstanceId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/model_partnerregioninfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/model_partnerregioninfo.go new file mode 100644 index 0000000000000..948ef2924592f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/model_partnerregioninfo.go @@ -0,0 +1,9 @@ +package instancefailovergroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PartnerRegionInfo struct { + Location *string `json:"location,omitempty"` + ReplicationRole *InstanceFailoverGroupReplicationRole `json:"replicationRole,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/predicates.go new file mode 100644 index 0000000000000..bc1705b3dc460 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/predicates.go @@ -0,0 +1,27 @@ +package instancefailovergroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InstanceFailoverGroupOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p InstanceFailoverGroupOperationPredicate) Matches(input InstanceFailoverGroup) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/version.go new file mode 100644 index 0000000000000..ea6b1f62688a8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups/version.go @@ -0,0 +1,12 @@ +package instancefailovergroups + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/instancefailovergroups/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/README.md new file mode 100644 index 0000000000000..cefec31899f96 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/README.md @@ -0,0 +1,100 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents` Documentation + +The `jobagents` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents" +``` + + +### Client Initialization + +```go +client := jobagents.NewJobAgentsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `JobAgentsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := jobagents.NewJobAgentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "jobAgentValue") + +payload := jobagents.JobAgent{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `JobAgentsClient.Delete` + +```go +ctx := context.TODO() +id := jobagents.NewJobAgentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "jobAgentValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `JobAgentsClient.Get` + +```go +ctx := context.TODO() +id := jobagents.NewJobAgentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "jobAgentValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `JobAgentsClient.ListByServer` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination +items, err := client.ListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `JobAgentsClient.Update` + +```go +ctx := context.TODO() +id := jobagents.NewJobAgentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "jobAgentValue") + +payload := jobagents.JobAgentUpdate{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/client.go new file mode 100644 index 0000000000000..ab27e52d87afa --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/client.go @@ -0,0 +1,26 @@ +package jobagents + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobAgentsClient struct { + Client *resourcemanager.Client +} + +func NewJobAgentsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobAgentsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobagents", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating JobAgentsClient: %+v", err) + } + + return &JobAgentsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/constants.go new file mode 100644 index 0000000000000..015cde7bdccb4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/constants.go @@ -0,0 +1,107 @@ +package jobagents + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobAgentIdentityType string + +const ( + JobAgentIdentityTypeNone JobAgentIdentityType = "None" + JobAgentIdentityTypeSystemAssigned JobAgentIdentityType = "SystemAssigned" + JobAgentIdentityTypeSystemAssignedUserAssigned JobAgentIdentityType = "SystemAssignedUserAssigned" + JobAgentIdentityTypeUserAssigned JobAgentIdentityType = "UserAssigned" +) + +func PossibleValuesForJobAgentIdentityType() []string { + return []string{ + string(JobAgentIdentityTypeNone), + string(JobAgentIdentityTypeSystemAssigned), + string(JobAgentIdentityTypeSystemAssignedUserAssigned), + string(JobAgentIdentityTypeUserAssigned), + } +} + +func (s *JobAgentIdentityType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseJobAgentIdentityType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseJobAgentIdentityType(input string) (*JobAgentIdentityType, error) { + vals := map[string]JobAgentIdentityType{ + "none": JobAgentIdentityTypeNone, + "systemassigned": JobAgentIdentityTypeSystemAssigned, + "systemassigneduserassigned": JobAgentIdentityTypeSystemAssignedUserAssigned, + "userassigned": JobAgentIdentityTypeUserAssigned, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := JobAgentIdentityType(input) + return &out, nil +} + +type JobAgentState string + +const ( + JobAgentStateCreating JobAgentState = "Creating" + JobAgentStateDeleting JobAgentState = "Deleting" + JobAgentStateDisabled JobAgentState = "Disabled" + JobAgentStateReady JobAgentState = "Ready" + JobAgentStateUpdating JobAgentState = "Updating" +) + +func PossibleValuesForJobAgentState() []string { + return []string{ + string(JobAgentStateCreating), + string(JobAgentStateDeleting), + string(JobAgentStateDisabled), + string(JobAgentStateReady), + string(JobAgentStateUpdating), + } +} + +func (s *JobAgentState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseJobAgentState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseJobAgentState(input string) (*JobAgentState, error) { + vals := map[string]JobAgentState{ + "creating": JobAgentStateCreating, + "deleting": JobAgentStateDeleting, + "disabled": JobAgentStateDisabled, + "ready": JobAgentStateReady, + "updating": JobAgentStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := JobAgentState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/id_jobagent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/id_jobagent.go new file mode 100644 index 0000000000000..35f4497a3da33 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/id_jobagent.go @@ -0,0 +1,139 @@ +package jobagents + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&JobAgentId{}) +} + +var _ resourceids.ResourceId = &JobAgentId{} + +// JobAgentId is a struct representing the Resource ID for a Job Agent +type JobAgentId struct { + SubscriptionId string + ResourceGroupName string + ServerName string + JobAgentName string +} + +// NewJobAgentID returns a new JobAgentId struct +func NewJobAgentID(subscriptionId string, resourceGroupName string, serverName string, jobAgentName string) JobAgentId { + return JobAgentId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ServerName: serverName, + JobAgentName: jobAgentName, + } +} + +// ParseJobAgentID parses 'input' into a JobAgentId +func ParseJobAgentID(input string) (*JobAgentId, error) { + parser := resourceids.NewParserFromResourceIdType(&JobAgentId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := JobAgentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseJobAgentIDInsensitively parses 'input' case-insensitively into a JobAgentId +// note: this method should only be used for API response data and not user input +func ParseJobAgentIDInsensitively(input string) (*JobAgentId, error) { + parser := resourceids.NewParserFromResourceIdType(&JobAgentId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := JobAgentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *JobAgentId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) + } + + if id.JobAgentName, ok = input.Parsed["jobAgentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "jobAgentName", input) + } + + return nil +} + +// ValidateJobAgentID checks that 'input' can be parsed as a Job Agent ID +func ValidateJobAgentID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseJobAgentID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Job Agent ID +func (id JobAgentId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Sql/servers/%s/jobAgents/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServerName, id.JobAgentName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Job Agent ID +func (id JobAgentId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftSql", "Microsoft.Sql", "Microsoft.Sql"), + resourceids.StaticSegment("staticServers", "servers", "servers"), + resourceids.UserSpecifiedSegment("serverName", "serverValue"), + resourceids.StaticSegment("staticJobAgents", "jobAgents", "jobAgents"), + resourceids.UserSpecifiedSegment("jobAgentName", "jobAgentValue"), + } +} + +// String returns a human-readable description of this Job Agent ID +func (id JobAgentId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Server Name: %q", id.ServerName), + fmt.Sprintf("Job Agent Name: %q", id.JobAgentName), + } + return fmt.Sprintf("Job Agent (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/method_createorupdate.go new file mode 100644 index 0000000000000..f120e0f623d1a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/method_createorupdate.go @@ -0,0 +1,76 @@ +package jobagents + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *JobAgent +} + +// CreateOrUpdate ... +func (c JobAgentsClient) CreateOrUpdate(ctx context.Context, id JobAgentId, input JobAgent) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c JobAgentsClient) CreateOrUpdateThenPoll(ctx context.Context, id JobAgentId, input JobAgent) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/method_delete.go new file mode 100644 index 0000000000000..8f6a62a004455 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/method_delete.go @@ -0,0 +1,71 @@ +package jobagents + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c JobAgentsClient) Delete(ctx context.Context, id JobAgentId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c JobAgentsClient) DeleteThenPoll(ctx context.Context, id JobAgentId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/method_get.go new file mode 100644 index 0000000000000..433d5a1b380d9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/method_get.go @@ -0,0 +1,54 @@ +package jobagents + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *JobAgent +} + +// Get ... +func (c JobAgentsClient) Get(ctx context.Context, id JobAgentId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model JobAgent + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/method_listbyserver.go new file mode 100644 index 0000000000000..5b82df1dd3da9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/method_listbyserver.go @@ -0,0 +1,106 @@ +package jobagents + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByServerOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]JobAgent +} + +type ListByServerCompleteResult struct { + LatestHttpResponse *http.Response + Items []JobAgent +} + +type ListByServerCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByServerCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByServer ... +func (c JobAgentsClient) ListByServer(ctx context.Context, id commonids.SqlServerId) (result ListByServerOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByServerCustomPager{}, + Path: fmt.Sprintf("%s/jobAgents", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]JobAgent `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByServerComplete retrieves all the results into a single object +func (c JobAgentsClient) ListByServerComplete(ctx context.Context, id commonids.SqlServerId) (ListByServerCompleteResult, error) { + return c.ListByServerCompleteMatchingPredicate(ctx, id, JobAgentOperationPredicate{}) +} + +// ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c JobAgentsClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id commonids.SqlServerId, predicate JobAgentOperationPredicate) (result ListByServerCompleteResult, err error) { + items := make([]JobAgent, 0) + + resp, err := c.ListByServer(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByServerCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/method_update.go new file mode 100644 index 0000000000000..c2a872a26b589 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/method_update.go @@ -0,0 +1,75 @@ +package jobagents + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *JobAgent +} + +// Update ... +func (c JobAgentsClient) Update(ctx context.Context, id JobAgentId, input JobAgentUpdate) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c JobAgentsClient) UpdateThenPoll(ctx context.Context, id JobAgentId, input JobAgentUpdate) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/model_jobagent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/model_jobagent.go new file mode 100644 index 0000000000000..f4d2138665d79 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/model_jobagent.go @@ -0,0 +1,15 @@ +package jobagents + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobAgent struct { + Id *string `json:"id,omitempty"` + Identity *JobAgentIdentity `json:"identity,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *JobAgentProperties `json:"properties,omitempty"` + Sku *Sku `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/model_jobagentidentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/model_jobagentidentity.go new file mode 100644 index 0000000000000..031109c9b52a1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/model_jobagentidentity.go @@ -0,0 +1,10 @@ +package jobagents + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobAgentIdentity struct { + TenantId *string `json:"tenantId,omitempty"` + Type JobAgentIdentityType `json:"type"` + UserAssignedIdentities *map[string]JobAgentUserAssignedIdentity `json:"userAssignedIdentities,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/model_jobagentproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/model_jobagentproperties.go new file mode 100644 index 0000000000000..e40a2a55db649 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/model_jobagentproperties.go @@ -0,0 +1,9 @@ +package jobagents + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobAgentProperties struct { + DatabaseId string `json:"databaseId"` + State *JobAgentState `json:"state,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/model_jobagentupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/model_jobagentupdate.go new file mode 100644 index 0000000000000..5c013e0cbbd5e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/model_jobagentupdate.go @@ -0,0 +1,10 @@ +package jobagents + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobAgentUpdate struct { + Identity *JobAgentIdentity `json:"identity,omitempty"` + Sku *Sku `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/model_jobagentuserassignedidentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/model_jobagentuserassignedidentity.go new file mode 100644 index 0000000000000..3dc6c7368d62b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/model_jobagentuserassignedidentity.go @@ -0,0 +1,9 @@ +package jobagents + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobAgentUserAssignedIdentity struct { + ClientId *string `json:"clientId,omitempty"` + PrincipalId *string `json:"principalId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/model_sku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/model_sku.go new file mode 100644 index 0000000000000..42a3cd79363c2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/model_sku.go @@ -0,0 +1,12 @@ +package jobagents + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Sku struct { + Capacity *int64 `json:"capacity,omitempty"` + Family *string `json:"family,omitempty"` + Name string `json:"name"` + Size *string `json:"size,omitempty"` + Tier *string `json:"tier,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/predicates.go new file mode 100644 index 0000000000000..0813f84a604b3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/predicates.go @@ -0,0 +1,32 @@ +package jobagents + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobAgentOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p JobAgentOperationPredicate) Matches(input JobAgent) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/version.go new file mode 100644 index 0000000000000..f543d9d576cc0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents/version.go @@ -0,0 +1,12 @@ +package jobagents + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/jobagents/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/README.md new file mode 100644 index 0000000000000..2c830e23f4d2f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/README.md @@ -0,0 +1,90 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials` Documentation + +The `jobcredentials` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials" +``` + + +### Client Initialization + +```go +client := jobcredentials.NewJobCredentialsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `JobCredentialsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := jobcredentials.NewCredentialID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "jobAgentValue", "credentialValue") + +payload := jobcredentials.JobCredential{ + // ... +} + + +read, err := client.CreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `JobCredentialsClient.Delete` + +```go +ctx := context.TODO() +id := jobcredentials.NewCredentialID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "jobAgentValue", "credentialValue") + +read, err := client.Delete(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `JobCredentialsClient.Get` + +```go +ctx := context.TODO() +id := jobcredentials.NewCredentialID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "jobAgentValue", "credentialValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `JobCredentialsClient.ListByAgent` + +```go +ctx := context.TODO() +id := jobcredentials.NewJobAgentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "jobAgentValue") + +// alternatively `client.ListByAgent(ctx, id)` can be used to do batched pagination +items, err := client.ListByAgentComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/client.go new file mode 100644 index 0000000000000..0977cf3d384ac --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/client.go @@ -0,0 +1,26 @@ +package jobcredentials + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobCredentialsClient struct { + Client *resourcemanager.Client +} + +func NewJobCredentialsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobCredentialsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobcredentials", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating JobCredentialsClient: %+v", err) + } + + return &JobCredentialsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/id_credential.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/id_credential.go new file mode 100644 index 0000000000000..6b7ea0b08a18e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/id_credential.go @@ -0,0 +1,148 @@ +package jobcredentials + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&CredentialId{}) +} + +var _ resourceids.ResourceId = &CredentialId{} + +// CredentialId is a struct representing the Resource ID for a Credential +type CredentialId struct { + SubscriptionId string + ResourceGroupName string + ServerName string + JobAgentName string + CredentialName string +} + +// NewCredentialID returns a new CredentialId struct +func NewCredentialID(subscriptionId string, resourceGroupName string, serverName string, jobAgentName string, credentialName string) CredentialId { + return CredentialId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ServerName: serverName, + JobAgentName: jobAgentName, + CredentialName: credentialName, + } +} + +// ParseCredentialID parses 'input' into a CredentialId +func ParseCredentialID(input string) (*CredentialId, error) { + parser := resourceids.NewParserFromResourceIdType(&CredentialId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := CredentialId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseCredentialIDInsensitively parses 'input' case-insensitively into a CredentialId +// note: this method should only be used for API response data and not user input +func ParseCredentialIDInsensitively(input string) (*CredentialId, error) { + parser := resourceids.NewParserFromResourceIdType(&CredentialId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := CredentialId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CredentialId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) + } + + if id.JobAgentName, ok = input.Parsed["jobAgentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "jobAgentName", input) + } + + if id.CredentialName, ok = input.Parsed["credentialName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "credentialName", input) + } + + return nil +} + +// ValidateCredentialID checks that 'input' can be parsed as a Credential ID +func ValidateCredentialID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseCredentialID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Credential ID +func (id CredentialId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Sql/servers/%s/jobAgents/%s/credentials/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServerName, id.JobAgentName, id.CredentialName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Credential ID +func (id CredentialId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftSql", "Microsoft.Sql", "Microsoft.Sql"), + resourceids.StaticSegment("staticServers", "servers", "servers"), + resourceids.UserSpecifiedSegment("serverName", "serverValue"), + resourceids.StaticSegment("staticJobAgents", "jobAgents", "jobAgents"), + resourceids.UserSpecifiedSegment("jobAgentName", "jobAgentValue"), + resourceids.StaticSegment("staticCredentials", "credentials", "credentials"), + resourceids.UserSpecifiedSegment("credentialName", "credentialValue"), + } +} + +// String returns a human-readable description of this Credential ID +func (id CredentialId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Server Name: %q", id.ServerName), + fmt.Sprintf("Job Agent Name: %q", id.JobAgentName), + fmt.Sprintf("Credential Name: %q", id.CredentialName), + } + return fmt.Sprintf("Credential (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/id_jobagent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/id_jobagent.go new file mode 100644 index 0000000000000..94291d1711b7b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/id_jobagent.go @@ -0,0 +1,139 @@ +package jobcredentials + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&JobAgentId{}) +} + +var _ resourceids.ResourceId = &JobAgentId{} + +// JobAgentId is a struct representing the Resource ID for a Job Agent +type JobAgentId struct { + SubscriptionId string + ResourceGroupName string + ServerName string + JobAgentName string +} + +// NewJobAgentID returns a new JobAgentId struct +func NewJobAgentID(subscriptionId string, resourceGroupName string, serverName string, jobAgentName string) JobAgentId { + return JobAgentId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ServerName: serverName, + JobAgentName: jobAgentName, + } +} + +// ParseJobAgentID parses 'input' into a JobAgentId +func ParseJobAgentID(input string) (*JobAgentId, error) { + parser := resourceids.NewParserFromResourceIdType(&JobAgentId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := JobAgentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseJobAgentIDInsensitively parses 'input' case-insensitively into a JobAgentId +// note: this method should only be used for API response data and not user input +func ParseJobAgentIDInsensitively(input string) (*JobAgentId, error) { + parser := resourceids.NewParserFromResourceIdType(&JobAgentId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := JobAgentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *JobAgentId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) + } + + if id.JobAgentName, ok = input.Parsed["jobAgentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "jobAgentName", input) + } + + return nil +} + +// ValidateJobAgentID checks that 'input' can be parsed as a Job Agent ID +func ValidateJobAgentID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseJobAgentID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Job Agent ID +func (id JobAgentId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Sql/servers/%s/jobAgents/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServerName, id.JobAgentName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Job Agent ID +func (id JobAgentId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftSql", "Microsoft.Sql", "Microsoft.Sql"), + resourceids.StaticSegment("staticServers", "servers", "servers"), + resourceids.UserSpecifiedSegment("serverName", "serverValue"), + resourceids.StaticSegment("staticJobAgents", "jobAgents", "jobAgents"), + resourceids.UserSpecifiedSegment("jobAgentName", "jobAgentValue"), + } +} + +// String returns a human-readable description of this Job Agent ID +func (id JobAgentId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Server Name: %q", id.ServerName), + fmt.Sprintf("Job Agent Name: %q", id.JobAgentName), + } + return fmt.Sprintf("Job Agent (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/method_createorupdate.go new file mode 100644 index 0000000000000..3f021789ab407 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/method_createorupdate.go @@ -0,0 +1,59 @@ +package jobcredentials + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *JobCredential +} + +// CreateOrUpdate ... +func (c JobCredentialsClient) CreateOrUpdate(ctx context.Context, id CredentialId, input JobCredential) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model JobCredential + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/method_delete.go new file mode 100644 index 0000000000000..d09d1b97d23b6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/method_delete.go @@ -0,0 +1,47 @@ +package jobcredentials + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c JobCredentialsClient) Delete(ctx context.Context, id CredentialId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/method_get.go new file mode 100644 index 0000000000000..27cbbfe355055 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/method_get.go @@ -0,0 +1,54 @@ +package jobcredentials + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *JobCredential +} + +// Get ... +func (c JobCredentialsClient) Get(ctx context.Context, id CredentialId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model JobCredential + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/method_listbyagent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/method_listbyagent.go new file mode 100644 index 0000000000000..ec10fbb726234 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/method_listbyagent.go @@ -0,0 +1,105 @@ +package jobcredentials + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByAgentOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]JobCredential +} + +type ListByAgentCompleteResult struct { + LatestHttpResponse *http.Response + Items []JobCredential +} + +type ListByAgentCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByAgentCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByAgent ... +func (c JobCredentialsClient) ListByAgent(ctx context.Context, id JobAgentId) (result ListByAgentOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByAgentCustomPager{}, + Path: fmt.Sprintf("%s/credentials", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]JobCredential `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByAgentComplete retrieves all the results into a single object +func (c JobCredentialsClient) ListByAgentComplete(ctx context.Context, id JobAgentId) (ListByAgentCompleteResult, error) { + return c.ListByAgentCompleteMatchingPredicate(ctx, id, JobCredentialOperationPredicate{}) +} + +// ListByAgentCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c JobCredentialsClient) ListByAgentCompleteMatchingPredicate(ctx context.Context, id JobAgentId, predicate JobCredentialOperationPredicate) (result ListByAgentCompleteResult, err error) { + items := make([]JobCredential, 0) + + resp, err := c.ListByAgent(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByAgentCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/model_jobcredential.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/model_jobcredential.go new file mode 100644 index 0000000000000..8756d3b74702a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/model_jobcredential.go @@ -0,0 +1,11 @@ +package jobcredentials + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobCredential struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *JobCredentialProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/model_jobcredentialproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/model_jobcredentialproperties.go new file mode 100644 index 0000000000000..6df1c01f4504a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/model_jobcredentialproperties.go @@ -0,0 +1,9 @@ +package jobcredentials + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobCredentialProperties struct { + Password string `json:"password"` + Username string `json:"username"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/predicates.go new file mode 100644 index 0000000000000..2aa2ac84e10aa --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/predicates.go @@ -0,0 +1,27 @@ +package jobcredentials + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobCredentialOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p JobCredentialOperationPredicate) Matches(input JobCredential) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/version.go new file mode 100644 index 0000000000000..554efe5721dd8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials/version.go @@ -0,0 +1,12 @@ +package jobcredentials + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/jobcredentials/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/README.md new file mode 100644 index 0000000000000..530c5a1db79a6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/README.md @@ -0,0 +1,71 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies` Documentation + +The `longtermretentionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies" +``` + + +### Client Initialization + +```go +client := longtermretentionpolicies.NewLongTermRetentionPoliciesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `LongTermRetentionPoliciesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +payload := longtermretentionpolicies.LongTermRetentionPolicy{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `LongTermRetentionPoliciesClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `LongTermRetentionPoliciesClient.ListByDatabase` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +// alternatively `client.ListByDatabase(ctx, id)` can be used to do batched pagination +items, err := client.ListByDatabaseComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/method_listbydatabase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/method_listbydatabase.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/method_listbydatabase.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/method_listbydatabase.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/model_baselongtermretentionpolicyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/model_baselongtermretentionpolicyproperties.go new file mode 100644 index 0000000000000..b867c61a72717 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/model_baselongtermretentionpolicyproperties.go @@ -0,0 +1,11 @@ +package longtermretentionpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BaseLongTermRetentionPolicyProperties struct { + MonthlyRetention *string `json:"monthlyRetention,omitempty"` + WeekOfYear *int64 `json:"weekOfYear,omitempty"` + WeeklyRetention *string `json:"weeklyRetention,omitempty"` + YearlyRetention *string `json:"yearlyRetention,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/model_longtermretentionpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/model_longtermretentionpolicy.go new file mode 100644 index 0000000000000..77f4b88aea885 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/model_longtermretentionpolicy.go @@ -0,0 +1,11 @@ +package longtermretentionpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LongTermRetentionPolicy struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *BaseLongTermRetentionPolicyProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/version.go new file mode 100644 index 0000000000000..9de8f7f05957a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/version.go @@ -0,0 +1,12 @@ +package longtermretentionpolicies + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/longtermretentionpolicies/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/README.md new file mode 100644 index 0000000000000..3c87388b7c0b6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/README.md @@ -0,0 +1,88 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies` Documentation + +The `managedbackupshorttermretentionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies" +``` + + +### Client Initialization + +```go +client := managedbackupshorttermretentionpolicies.NewManagedBackupShortTermRetentionPoliciesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ManagedBackupShortTermRetentionPoliciesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue") + +payload := managedbackupshorttermretentionpolicies.ManagedBackupShortTermRetentionPolicy{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedBackupShortTermRetentionPoliciesClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagedBackupShortTermRetentionPoliciesClient.ListByDatabase` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue") + +// alternatively `client.ListByDatabase(ctx, id)` can be used to do batched pagination +items, err := client.ListByDatabaseComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ManagedBackupShortTermRetentionPoliciesClient.Update` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue") + +payload := managedbackupshorttermretentionpolicies.ManagedBackupShortTermRetentionPolicy{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/client.go new file mode 100644 index 0000000000000..d012d8b6e323f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/client.go @@ -0,0 +1,26 @@ +package managedbackupshorttermretentionpolicies + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedBackupShortTermRetentionPoliciesClient struct { + Client *resourcemanager.Client +} + +func NewManagedBackupShortTermRetentionPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedBackupShortTermRetentionPoliciesClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedbackupshorttermretentionpolicies", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ManagedBackupShortTermRetentionPoliciesClient: %+v", err) + } + + return &ManagedBackupShortTermRetentionPoliciesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/method_createorupdate.go new file mode 100644 index 0000000000000..e7fb1a0180ed2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/method_createorupdate.go @@ -0,0 +1,76 @@ +package managedbackupshorttermretentionpolicies + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ManagedBackupShortTermRetentionPolicy +} + +// CreateOrUpdate ... +func (c ManagedBackupShortTermRetentionPoliciesClient) CreateOrUpdate(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId, input ManagedBackupShortTermRetentionPolicy) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: fmt.Sprintf("%s/backupShortTermRetentionPolicies/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c ManagedBackupShortTermRetentionPoliciesClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId, input ManagedBackupShortTermRetentionPolicy) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/method_get.go new file mode 100644 index 0000000000000..1c274cb2a2b52 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/method_get.go @@ -0,0 +1,56 @@ +package managedbackupshorttermretentionpolicies + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ManagedBackupShortTermRetentionPolicy +} + +// Get ... +func (c ManagedBackupShortTermRetentionPoliciesClient) Get(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/backupShortTermRetentionPolicies/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ManagedBackupShortTermRetentionPolicy + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/method_listbydatabase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/method_listbydatabase.go new file mode 100644 index 0000000000000..abd1880b46392 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/method_listbydatabase.go @@ -0,0 +1,106 @@ +package managedbackupshorttermretentionpolicies + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByDatabaseOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ManagedBackupShortTermRetentionPolicy +} + +type ListByDatabaseCompleteResult struct { + LatestHttpResponse *http.Response + Items []ManagedBackupShortTermRetentionPolicy +} + +type ListByDatabaseCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByDatabaseCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByDatabase ... +func (c ManagedBackupShortTermRetentionPoliciesClient) ListByDatabase(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId) (result ListByDatabaseOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByDatabaseCustomPager{}, + Path: fmt.Sprintf("%s/backupShortTermRetentionPolicies", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ManagedBackupShortTermRetentionPolicy `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByDatabaseComplete retrieves all the results into a single object +func (c ManagedBackupShortTermRetentionPoliciesClient) ListByDatabaseComplete(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId) (ListByDatabaseCompleteResult, error) { + return c.ListByDatabaseCompleteMatchingPredicate(ctx, id, ManagedBackupShortTermRetentionPolicyOperationPredicate{}) +} + +// ListByDatabaseCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ManagedBackupShortTermRetentionPoliciesClient) ListByDatabaseCompleteMatchingPredicate(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId, predicate ManagedBackupShortTermRetentionPolicyOperationPredicate) (result ListByDatabaseCompleteResult, err error) { + items := make([]ManagedBackupShortTermRetentionPolicy, 0) + + resp, err := c.ListByDatabase(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByDatabaseCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/method_update.go new file mode 100644 index 0000000000000..fa0a7cba6f899 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/method_update.go @@ -0,0 +1,76 @@ +package managedbackupshorttermretentionpolicies + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ManagedBackupShortTermRetentionPolicy +} + +// Update ... +func (c ManagedBackupShortTermRetentionPoliciesClient) Update(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId, input ManagedBackupShortTermRetentionPolicy) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: fmt.Sprintf("%s/backupShortTermRetentionPolicies/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c ManagedBackupShortTermRetentionPoliciesClient) UpdateThenPoll(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId, input ManagedBackupShortTermRetentionPolicy) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/model_managedbackupshorttermretentionpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/model_managedbackupshorttermretentionpolicy.go new file mode 100644 index 0000000000000..9550c29a4e0bf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/model_managedbackupshorttermretentionpolicy.go @@ -0,0 +1,11 @@ +package managedbackupshorttermretentionpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedBackupShortTermRetentionPolicy struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ManagedBackupShortTermRetentionPolicyProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/model_managedbackupshorttermretentionpolicyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/model_managedbackupshorttermretentionpolicyproperties.go new file mode 100644 index 0000000000000..c7e8ce4271d55 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/model_managedbackupshorttermretentionpolicyproperties.go @@ -0,0 +1,8 @@ +package managedbackupshorttermretentionpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedBackupShortTermRetentionPolicyProperties struct { + RetentionDays *int64 `json:"retentionDays,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/predicates.go new file mode 100644 index 0000000000000..fb75828a87570 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/predicates.go @@ -0,0 +1,27 @@ +package managedbackupshorttermretentionpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedBackupShortTermRetentionPolicyOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p ManagedBackupShortTermRetentionPolicyOperationPredicate) Matches(input ManagedBackupShortTermRetentionPolicy) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/version.go new file mode 100644 index 0000000000000..14b1ba1385570 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/version.go @@ -0,0 +1,12 @@ +package managedbackupshorttermretentionpolicies + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/managedbackupshorttermretentionpolicies/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/README.md new file mode 100644 index 0000000000000..ff8a9366c9bc2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/README.md @@ -0,0 +1,185 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases` Documentation + +The `manageddatabases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases" +``` + + +### Client Initialization + +```go +client := manageddatabases.NewManagedDatabasesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ManagedDatabasesClient.CancelMove` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue") + +payload := manageddatabases.ManagedDatabaseMoveDefinition{ + // ... +} + + +if err := client.CancelMoveThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedDatabasesClient.CompleteMove` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue") + +payload := manageddatabases.ManagedDatabaseMoveDefinition{ + // ... +} + + +if err := client.CompleteMoveThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedDatabasesClient.CompleteRestore` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue") + +payload := manageddatabases.CompleteDatabaseRestoreDefinition{ + // ... +} + + +if err := client.CompleteRestoreThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedDatabasesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue") + +payload := manageddatabases.ManagedDatabase{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedDatabasesClient.Delete` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedDatabasesClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagedDatabasesClient.ListByInstance` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +// alternatively `client.ListByInstance(ctx, id)` can be used to do batched pagination +items, err := client.ListByInstanceComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ManagedDatabasesClient.ListInaccessibleByInstance` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +// alternatively `client.ListInaccessibleByInstance(ctx, id)` can be used to do batched pagination +items, err := client.ListInaccessibleByInstanceComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ManagedDatabasesClient.StartMove` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue") + +payload := manageddatabases.ManagedDatabaseStartMoveDefinition{ + // ... +} + + +if err := client.StartMoveThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedDatabasesClient.Update` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue") + +payload := manageddatabases.ManagedDatabaseUpdate{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/client.go new file mode 100644 index 0000000000000..d7286c73b101f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/client.go @@ -0,0 +1,26 @@ +package manageddatabases + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedDatabasesClient struct { + Client *resourcemanager.Client +} + +func NewManagedDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabasesClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabases", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ManagedDatabasesClient: %+v", err) + } + + return &ManagedDatabasesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/constants.go new file mode 100644 index 0000000000000..9973e086db9b8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/constants.go @@ -0,0 +1,213 @@ +package manageddatabases + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CatalogCollationType string + +const ( + CatalogCollationTypeDATABASEDEFAULT CatalogCollationType = "DATABASE_DEFAULT" + CatalogCollationTypeSQLLatinOneGeneralCPOneCIAS CatalogCollationType = "SQL_Latin1_General_CP1_CI_AS" +) + +func PossibleValuesForCatalogCollationType() []string { + return []string{ + string(CatalogCollationTypeDATABASEDEFAULT), + string(CatalogCollationTypeSQLLatinOneGeneralCPOneCIAS), + } +} + +func (s *CatalogCollationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCatalogCollationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCatalogCollationType(input string) (*CatalogCollationType, error) { + vals := map[string]CatalogCollationType{ + "database_default": CatalogCollationTypeDATABASEDEFAULT, + "sql_latin1_general_cp1_ci_as": CatalogCollationTypeSQLLatinOneGeneralCPOneCIAS, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CatalogCollationType(input) + return &out, nil +} + +type ManagedDatabaseCreateMode string + +const ( + ManagedDatabaseCreateModeDefault ManagedDatabaseCreateMode = "Default" + ManagedDatabaseCreateModePointInTimeRestore ManagedDatabaseCreateMode = "PointInTimeRestore" + ManagedDatabaseCreateModeRecovery ManagedDatabaseCreateMode = "Recovery" + ManagedDatabaseCreateModeRestoreExternalBackup ManagedDatabaseCreateMode = "RestoreExternalBackup" + ManagedDatabaseCreateModeRestoreLongTermRetentionBackup ManagedDatabaseCreateMode = "RestoreLongTermRetentionBackup" +) + +func PossibleValuesForManagedDatabaseCreateMode() []string { + return []string{ + string(ManagedDatabaseCreateModeDefault), + string(ManagedDatabaseCreateModePointInTimeRestore), + string(ManagedDatabaseCreateModeRecovery), + string(ManagedDatabaseCreateModeRestoreExternalBackup), + string(ManagedDatabaseCreateModeRestoreLongTermRetentionBackup), + } +} + +func (s *ManagedDatabaseCreateMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseManagedDatabaseCreateMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseManagedDatabaseCreateMode(input string) (*ManagedDatabaseCreateMode, error) { + vals := map[string]ManagedDatabaseCreateMode{ + "default": ManagedDatabaseCreateModeDefault, + "pointintimerestore": ManagedDatabaseCreateModePointInTimeRestore, + "recovery": ManagedDatabaseCreateModeRecovery, + "restoreexternalbackup": ManagedDatabaseCreateModeRestoreExternalBackup, + "restorelongtermretentionbackup": ManagedDatabaseCreateModeRestoreLongTermRetentionBackup, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ManagedDatabaseCreateMode(input) + return &out, nil +} + +type ManagedDatabaseStatus string + +const ( + ManagedDatabaseStatusCreating ManagedDatabaseStatus = "Creating" + ManagedDatabaseStatusDbCopying ManagedDatabaseStatus = "DbCopying" + ManagedDatabaseStatusDbMoving ManagedDatabaseStatus = "DbMoving" + ManagedDatabaseStatusInaccessible ManagedDatabaseStatus = "Inaccessible" + ManagedDatabaseStatusOffline ManagedDatabaseStatus = "Offline" + ManagedDatabaseStatusOnline ManagedDatabaseStatus = "Online" + ManagedDatabaseStatusRestoring ManagedDatabaseStatus = "Restoring" + ManagedDatabaseStatusShutdown ManagedDatabaseStatus = "Shutdown" + ManagedDatabaseStatusStarting ManagedDatabaseStatus = "Starting" + ManagedDatabaseStatusStopped ManagedDatabaseStatus = "Stopped" + ManagedDatabaseStatusStopping ManagedDatabaseStatus = "Stopping" + ManagedDatabaseStatusUpdating ManagedDatabaseStatus = "Updating" +) + +func PossibleValuesForManagedDatabaseStatus() []string { + return []string{ + string(ManagedDatabaseStatusCreating), + string(ManagedDatabaseStatusDbCopying), + string(ManagedDatabaseStatusDbMoving), + string(ManagedDatabaseStatusInaccessible), + string(ManagedDatabaseStatusOffline), + string(ManagedDatabaseStatusOnline), + string(ManagedDatabaseStatusRestoring), + string(ManagedDatabaseStatusShutdown), + string(ManagedDatabaseStatusStarting), + string(ManagedDatabaseStatusStopped), + string(ManagedDatabaseStatusStopping), + string(ManagedDatabaseStatusUpdating), + } +} + +func (s *ManagedDatabaseStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseManagedDatabaseStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseManagedDatabaseStatus(input string) (*ManagedDatabaseStatus, error) { + vals := map[string]ManagedDatabaseStatus{ + "creating": ManagedDatabaseStatusCreating, + "dbcopying": ManagedDatabaseStatusDbCopying, + "dbmoving": ManagedDatabaseStatusDbMoving, + "inaccessible": ManagedDatabaseStatusInaccessible, + "offline": ManagedDatabaseStatusOffline, + "online": ManagedDatabaseStatusOnline, + "restoring": ManagedDatabaseStatusRestoring, + "shutdown": ManagedDatabaseStatusShutdown, + "starting": ManagedDatabaseStatusStarting, + "stopped": ManagedDatabaseStatusStopped, + "stopping": ManagedDatabaseStatusStopping, + "updating": ManagedDatabaseStatusUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ManagedDatabaseStatus(input) + return &out, nil +} + +type MoveOperationMode string + +const ( + MoveOperationModeCopy MoveOperationMode = "Copy" + MoveOperationModeMove MoveOperationMode = "Move" +) + +func PossibleValuesForMoveOperationMode() []string { + return []string{ + string(MoveOperationModeCopy), + string(MoveOperationModeMove), + } +} + +func (s *MoveOperationMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMoveOperationMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMoveOperationMode(input string) (*MoveOperationMode, error) { + vals := map[string]MoveOperationMode{ + "copy": MoveOperationModeCopy, + "move": MoveOperationModeMove, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MoveOperationMode(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_cancelmove.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_cancelmove.go new file mode 100644 index 0000000000000..2cc2e039670ba --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_cancelmove.go @@ -0,0 +1,75 @@ +package manageddatabases + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CancelMoveOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// CancelMove ... +func (c ManagedDatabasesClient) CancelMove(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId, input ManagedDatabaseMoveDefinition) (result CancelMoveOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/cancelMove", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CancelMoveThenPoll performs CancelMove then polls until it's completed +func (c ManagedDatabasesClient) CancelMoveThenPoll(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId, input ManagedDatabaseMoveDefinition) error { + result, err := c.CancelMove(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CancelMove: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CancelMove: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_completemove.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_completemove.go new file mode 100644 index 0000000000000..c1fd322a686d0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_completemove.go @@ -0,0 +1,75 @@ +package manageddatabases + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CompleteMoveOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// CompleteMove ... +func (c ManagedDatabasesClient) CompleteMove(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId, input ManagedDatabaseMoveDefinition) (result CompleteMoveOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/completeMove", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CompleteMoveThenPoll performs CompleteMove then polls until it's completed +func (c ManagedDatabasesClient) CompleteMoveThenPoll(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId, input ManagedDatabaseMoveDefinition) error { + result, err := c.CompleteMove(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CompleteMove: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CompleteMove: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_completerestore.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_completerestore.go new file mode 100644 index 0000000000000..3117071e7445e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_completerestore.go @@ -0,0 +1,75 @@ +package manageddatabases + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CompleteRestoreOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// CompleteRestore ... +func (c ManagedDatabasesClient) CompleteRestore(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId, input CompleteDatabaseRestoreDefinition) (result CompleteRestoreOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/completeRestore", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CompleteRestoreThenPoll performs CompleteRestore then polls until it's completed +func (c ManagedDatabasesClient) CompleteRestoreThenPoll(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId, input CompleteDatabaseRestoreDefinition) error { + result, err := c.CompleteRestore(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CompleteRestore: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CompleteRestore: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_createorupdate.go new file mode 100644 index 0000000000000..a5a8a9596cf40 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_createorupdate.go @@ -0,0 +1,77 @@ +package manageddatabases + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ManagedDatabase +} + +// CreateOrUpdate ... +func (c ManagedDatabasesClient) CreateOrUpdate(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId, input ManagedDatabase) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c ManagedDatabasesClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId, input ManagedDatabase) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_delete.go new file mode 100644 index 0000000000000..2ab242efe0d29 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_delete.go @@ -0,0 +1,72 @@ +package manageddatabases + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c ManagedDatabasesClient) Delete(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c ManagedDatabasesClient) DeleteThenPoll(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_get.go new file mode 100644 index 0000000000000..d04774f62a4a6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_get.go @@ -0,0 +1,55 @@ +package manageddatabases + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ManagedDatabase +} + +// Get ... +func (c ManagedDatabasesClient) Get(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ManagedDatabase + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_listbyinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_listbyinstance.go new file mode 100644 index 0000000000000..f22159c138dd7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_listbyinstance.go @@ -0,0 +1,106 @@ +package manageddatabases + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByInstanceOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ManagedDatabase +} + +type ListByInstanceCompleteResult struct { + LatestHttpResponse *http.Response + Items []ManagedDatabase +} + +type ListByInstanceCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByInstanceCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByInstance ... +func (c ManagedDatabasesClient) ListByInstance(ctx context.Context, id commonids.SqlManagedInstanceId) (result ListByInstanceOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByInstanceCustomPager{}, + Path: fmt.Sprintf("%s/databases", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ManagedDatabase `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByInstanceComplete retrieves all the results into a single object +func (c ManagedDatabasesClient) ListByInstanceComplete(ctx context.Context, id commonids.SqlManagedInstanceId) (ListByInstanceCompleteResult, error) { + return c.ListByInstanceCompleteMatchingPredicate(ctx, id, ManagedDatabaseOperationPredicate{}) +} + +// ListByInstanceCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ManagedDatabasesClient) ListByInstanceCompleteMatchingPredicate(ctx context.Context, id commonids.SqlManagedInstanceId, predicate ManagedDatabaseOperationPredicate) (result ListByInstanceCompleteResult, err error) { + items := make([]ManagedDatabase, 0) + + resp, err := c.ListByInstance(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByInstanceCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_listinaccessiblebyinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_listinaccessiblebyinstance.go new file mode 100644 index 0000000000000..043eeee41cedb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_listinaccessiblebyinstance.go @@ -0,0 +1,106 @@ +package manageddatabases + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListInaccessibleByInstanceOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ManagedDatabase +} + +type ListInaccessibleByInstanceCompleteResult struct { + LatestHttpResponse *http.Response + Items []ManagedDatabase +} + +type ListInaccessibleByInstanceCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListInaccessibleByInstanceCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListInaccessibleByInstance ... +func (c ManagedDatabasesClient) ListInaccessibleByInstance(ctx context.Context, id commonids.SqlManagedInstanceId) (result ListInaccessibleByInstanceOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListInaccessibleByInstanceCustomPager{}, + Path: fmt.Sprintf("%s/inaccessibleManagedDatabases", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ManagedDatabase `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListInaccessibleByInstanceComplete retrieves all the results into a single object +func (c ManagedDatabasesClient) ListInaccessibleByInstanceComplete(ctx context.Context, id commonids.SqlManagedInstanceId) (ListInaccessibleByInstanceCompleteResult, error) { + return c.ListInaccessibleByInstanceCompleteMatchingPredicate(ctx, id, ManagedDatabaseOperationPredicate{}) +} + +// ListInaccessibleByInstanceCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ManagedDatabasesClient) ListInaccessibleByInstanceCompleteMatchingPredicate(ctx context.Context, id commonids.SqlManagedInstanceId, predicate ManagedDatabaseOperationPredicate) (result ListInaccessibleByInstanceCompleteResult, err error) { + items := make([]ManagedDatabase, 0) + + resp, err := c.ListInaccessibleByInstance(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListInaccessibleByInstanceCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_startmove.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_startmove.go new file mode 100644 index 0000000000000..2167470d7cbfd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_startmove.go @@ -0,0 +1,75 @@ +package manageddatabases + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StartMoveOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// StartMove ... +func (c ManagedDatabasesClient) StartMove(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId, input ManagedDatabaseStartMoveDefinition) (result StartMoveOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/startMove", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// StartMoveThenPoll performs StartMove then polls until it's completed +func (c ManagedDatabasesClient) StartMoveThenPoll(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId, input ManagedDatabaseStartMoveDefinition) error { + result, err := c.StartMove(ctx, id, input) + if err != nil { + return fmt.Errorf("performing StartMove: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after StartMove: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_update.go new file mode 100644 index 0000000000000..84164bc95c1da --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/method_update.go @@ -0,0 +1,76 @@ +package manageddatabases + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ManagedDatabase +} + +// Update ... +func (c ManagedDatabasesClient) Update(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId, input ManagedDatabaseUpdate) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c ManagedDatabasesClient) UpdateThenPoll(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId, input ManagedDatabaseUpdate) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/model_completedatabaserestoredefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/model_completedatabaserestoredefinition.go new file mode 100644 index 0000000000000..eca7c8f98144b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/model_completedatabaserestoredefinition.go @@ -0,0 +1,8 @@ +package manageddatabases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CompleteDatabaseRestoreDefinition struct { + LastBackupName string `json:"lastBackupName"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/model_manageddatabase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/model_manageddatabase.go new file mode 100644 index 0000000000000..3fcbb3a4cd293 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/model_manageddatabase.go @@ -0,0 +1,13 @@ +package manageddatabases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedDatabase struct { + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *ManagedDatabaseProperties `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/model_manageddatabasemovedefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/model_manageddatabasemovedefinition.go new file mode 100644 index 0000000000000..5bd6dac71102d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/model_manageddatabasemovedefinition.go @@ -0,0 +1,8 @@ +package manageddatabases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedDatabaseMoveDefinition struct { + DestinationManagedDatabaseId string `json:"destinationManagedDatabaseId"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/model_manageddatabaseproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/model_manageddatabaseproperties.go new file mode 100644 index 0000000000000..e6cd3d04a2a00 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/model_manageddatabaseproperties.go @@ -0,0 +1,71 @@ +package manageddatabases + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedDatabaseProperties struct { + AutoCompleteRestore *bool `json:"autoCompleteRestore,omitempty"` + CatalogCollation *CatalogCollationType `json:"catalogCollation,omitempty"` + Collation *string `json:"collation,omitempty"` + CreateMode *ManagedDatabaseCreateMode `json:"createMode,omitempty"` + CreationDate *string `json:"creationDate,omitempty"` + CrossSubscriptionRestorableDroppedDatabaseId *string `json:"crossSubscriptionRestorableDroppedDatabaseId,omitempty"` + CrossSubscriptionSourceDatabaseId *string `json:"crossSubscriptionSourceDatabaseId,omitempty"` + CrossSubscriptionTargetManagedInstanceId *string `json:"crossSubscriptionTargetManagedInstanceId,omitempty"` + DefaultSecondaryLocation *string `json:"defaultSecondaryLocation,omitempty"` + EarliestRestorePoint *string `json:"earliestRestorePoint,omitempty"` + FailoverGroupId *string `json:"failoverGroupId,omitempty"` + IsLedgerOn *bool `json:"isLedgerOn,omitempty"` + LastBackupName *string `json:"lastBackupName,omitempty"` + LongTermRetentionBackupResourceId *string `json:"longTermRetentionBackupResourceId,omitempty"` + RecoverableDatabaseId *string `json:"recoverableDatabaseId,omitempty"` + RestorableDroppedDatabaseId *string `json:"restorableDroppedDatabaseId,omitempty"` + RestorePointInTime *string `json:"restorePointInTime,omitempty"` + SourceDatabaseId *string `json:"sourceDatabaseId,omitempty"` + Status *ManagedDatabaseStatus `json:"status,omitempty"` + StorageContainerIdentity *string `json:"storageContainerIdentity,omitempty"` + StorageContainerSasToken *string `json:"storageContainerSasToken,omitempty"` + StorageContainerUri *string `json:"storageContainerUri,omitempty"` +} + +func (o *ManagedDatabaseProperties) GetCreationDateAsTime() (*time.Time, error) { + if o.CreationDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreationDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *ManagedDatabaseProperties) SetCreationDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreationDate = &formatted +} + +func (o *ManagedDatabaseProperties) GetEarliestRestorePointAsTime() (*time.Time, error) { + if o.EarliestRestorePoint == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EarliestRestorePoint, "2006-01-02T15:04:05Z07:00") +} + +func (o *ManagedDatabaseProperties) SetEarliestRestorePointAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EarliestRestorePoint = &formatted +} + +func (o *ManagedDatabaseProperties) GetRestorePointInTimeAsTime() (*time.Time, error) { + if o.RestorePointInTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.RestorePointInTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *ManagedDatabaseProperties) SetRestorePointInTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.RestorePointInTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/model_manageddatabasestartmovedefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/model_manageddatabasestartmovedefinition.go new file mode 100644 index 0000000000000..df0652a71e10a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/model_manageddatabasestartmovedefinition.go @@ -0,0 +1,9 @@ +package manageddatabases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedDatabaseStartMoveDefinition struct { + DestinationManagedDatabaseId string `json:"destinationManagedDatabaseId"` + OperationMode *MoveOperationMode `json:"operationMode,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/model_manageddatabaseupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/model_manageddatabaseupdate.go new file mode 100644 index 0000000000000..d628179972809 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/model_manageddatabaseupdate.go @@ -0,0 +1,9 @@ +package manageddatabases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedDatabaseUpdate struct { + Properties *ManagedDatabaseProperties `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/predicates.go new file mode 100644 index 0000000000000..3841529c83ec4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/predicates.go @@ -0,0 +1,32 @@ +package manageddatabases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedDatabaseOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p ManagedDatabaseOperationPredicate) Matches(input ManagedDatabase) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/version.go new file mode 100644 index 0000000000000..d965dc2294e2b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases/version.go @@ -0,0 +1,12 @@ +package manageddatabases + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabases/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/README.md new file mode 100644 index 0000000000000..a11f59673000a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/README.md @@ -0,0 +1,83 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators` Documentation + +The `managedinstanceadministrators` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators" +``` + + +### Client Initialization + +```go +client := managedinstanceadministrators.NewManagedInstanceAdministratorsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ManagedInstanceAdministratorsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +payload := managedinstanceadministrators.ManagedInstanceAdministrator{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedInstanceAdministratorsClient.Delete` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedInstanceAdministratorsClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagedInstanceAdministratorsClient.ListByInstance` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +// alternatively `client.ListByInstance(ctx, id)` can be used to do batched pagination +items, err := client.ListByInstanceComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/client.go new file mode 100644 index 0000000000000..3f7e77dcf0f81 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/client.go @@ -0,0 +1,26 @@ +package managedinstanceadministrators + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceAdministratorsClient struct { + Client *resourcemanager.Client +} + +func NewManagedInstanceAdministratorsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceAdministratorsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstanceadministrators", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ManagedInstanceAdministratorsClient: %+v", err) + } + + return &ManagedInstanceAdministratorsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/constants.go new file mode 100644 index 0000000000000..fe42a06675835 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/constants.go @@ -0,0 +1,48 @@ +package managedinstanceadministrators + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceAdministratorType string + +const ( + ManagedInstanceAdministratorTypeActiveDirectory ManagedInstanceAdministratorType = "ActiveDirectory" +) + +func PossibleValuesForManagedInstanceAdministratorType() []string { + return []string{ + string(ManagedInstanceAdministratorTypeActiveDirectory), + } +} + +func (s *ManagedInstanceAdministratorType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseManagedInstanceAdministratorType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseManagedInstanceAdministratorType(input string) (*ManagedInstanceAdministratorType, error) { + vals := map[string]ManagedInstanceAdministratorType{ + "activedirectory": ManagedInstanceAdministratorTypeActiveDirectory, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ManagedInstanceAdministratorType(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/method_createorupdate.go new file mode 100644 index 0000000000000..9badd8f01f1e5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/method_createorupdate.go @@ -0,0 +1,77 @@ +package managedinstanceadministrators + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ManagedInstanceAdministrator +} + +// CreateOrUpdate ... +func (c ManagedInstanceAdministratorsClient) CreateOrUpdate(ctx context.Context, id commonids.SqlManagedInstanceId, input ManagedInstanceAdministrator) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: fmt.Sprintf("%s/administrators/ActiveDirectory", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c ManagedInstanceAdministratorsClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.SqlManagedInstanceId, input ManagedInstanceAdministrator) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/method_delete.go new file mode 100644 index 0000000000000..361291d663806 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/method_delete.go @@ -0,0 +1,71 @@ +package managedinstanceadministrators + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c ManagedInstanceAdministratorsClient) Delete(ctx context.Context, id commonids.SqlManagedInstanceId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: fmt.Sprintf("%s/administrators/ActiveDirectory", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c ManagedInstanceAdministratorsClient) DeleteThenPoll(ctx context.Context, id commonids.SqlManagedInstanceId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/method_get.go new file mode 100644 index 0000000000000..471776e28e8a8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/method_get.go @@ -0,0 +1,56 @@ +package managedinstanceadministrators + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ManagedInstanceAdministrator +} + +// Get ... +func (c ManagedInstanceAdministratorsClient) Get(ctx context.Context, id commonids.SqlManagedInstanceId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/administrators/ActiveDirectory", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ManagedInstanceAdministrator + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/method_listbyinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/method_listbyinstance.go new file mode 100644 index 0000000000000..9bef3057cbd17 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/method_listbyinstance.go @@ -0,0 +1,106 @@ +package managedinstanceadministrators + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByInstanceOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ManagedInstanceAdministrator +} + +type ListByInstanceCompleteResult struct { + LatestHttpResponse *http.Response + Items []ManagedInstanceAdministrator +} + +type ListByInstanceCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByInstanceCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByInstance ... +func (c ManagedInstanceAdministratorsClient) ListByInstance(ctx context.Context, id commonids.SqlManagedInstanceId) (result ListByInstanceOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByInstanceCustomPager{}, + Path: fmt.Sprintf("%s/administrators", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ManagedInstanceAdministrator `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByInstanceComplete retrieves all the results into a single object +func (c ManagedInstanceAdministratorsClient) ListByInstanceComplete(ctx context.Context, id commonids.SqlManagedInstanceId) (ListByInstanceCompleteResult, error) { + return c.ListByInstanceCompleteMatchingPredicate(ctx, id, ManagedInstanceAdministratorOperationPredicate{}) +} + +// ListByInstanceCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ManagedInstanceAdministratorsClient) ListByInstanceCompleteMatchingPredicate(ctx context.Context, id commonids.SqlManagedInstanceId, predicate ManagedInstanceAdministratorOperationPredicate) (result ListByInstanceCompleteResult, err error) { + items := make([]ManagedInstanceAdministrator, 0) + + resp, err := c.ListByInstance(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByInstanceCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/model_managedinstanceadministrator.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/model_managedinstanceadministrator.go new file mode 100644 index 0000000000000..a77cf4a72e1eb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/model_managedinstanceadministrator.go @@ -0,0 +1,11 @@ +package managedinstanceadministrators + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceAdministrator struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ManagedInstanceAdministratorProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/model_managedinstanceadministratorproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/model_managedinstanceadministratorproperties.go new file mode 100644 index 0000000000000..062aab44bdeb7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/model_managedinstanceadministratorproperties.go @@ -0,0 +1,11 @@ +package managedinstanceadministrators + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceAdministratorProperties struct { + AdministratorType ManagedInstanceAdministratorType `json:"administratorType"` + Login string `json:"login"` + Sid string `json:"sid"` + TenantId *string `json:"tenantId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/predicates.go new file mode 100644 index 0000000000000..d8dcbcc98beba --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/predicates.go @@ -0,0 +1,27 @@ +package managedinstanceadministrators + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceAdministratorOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p ManagedInstanceAdministratorOperationPredicate) Matches(input ManagedInstanceAdministrator) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/version.go new file mode 100644 index 0000000000000..47b4d51e30e5a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/version.go @@ -0,0 +1,12 @@ +package managedinstanceadministrators + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstanceadministrators/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/README.md new file mode 100644 index 0000000000000..dbdaadcfa03de --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/README.md @@ -0,0 +1,83 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications` Documentation + +The `managedinstanceazureadonlyauthentications` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications" +``` + + +### Client Initialization + +```go +client := managedinstanceazureadonlyauthentications.NewManagedInstanceAzureADOnlyAuthenticationsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ManagedInstanceAzureADOnlyAuthenticationsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +payload := managedinstanceazureadonlyauthentications.ManagedInstanceAzureADOnlyAuthentication{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedInstanceAzureADOnlyAuthenticationsClient.Delete` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedInstanceAzureADOnlyAuthenticationsClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagedInstanceAzureADOnlyAuthenticationsClient.ListByInstance` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +// alternatively `client.ListByInstance(ctx, id)` can be used to do batched pagination +items, err := client.ListByInstanceComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/client.go new file mode 100644 index 0000000000000..75cbb0831fd89 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/client.go @@ -0,0 +1,26 @@ +package managedinstanceazureadonlyauthentications + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceAzureADOnlyAuthenticationsClient struct { + Client *resourcemanager.Client +} + +func NewManagedInstanceAzureADOnlyAuthenticationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceAzureADOnlyAuthenticationsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstanceazureadonlyauthentications", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ManagedInstanceAzureADOnlyAuthenticationsClient: %+v", err) + } + + return &ManagedInstanceAzureADOnlyAuthenticationsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/method_createorupdate.go new file mode 100644 index 0000000000000..f19f00fc10ce9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/method_createorupdate.go @@ -0,0 +1,77 @@ +package managedinstanceazureadonlyauthentications + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ManagedInstanceAzureADOnlyAuthentication +} + +// CreateOrUpdate ... +func (c ManagedInstanceAzureADOnlyAuthenticationsClient) CreateOrUpdate(ctx context.Context, id commonids.SqlManagedInstanceId, input ManagedInstanceAzureADOnlyAuthentication) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: fmt.Sprintf("%s/azureADOnlyAuthentications/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c ManagedInstanceAzureADOnlyAuthenticationsClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.SqlManagedInstanceId, input ManagedInstanceAzureADOnlyAuthentication) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/method_delete.go new file mode 100644 index 0000000000000..d2e4dfa73c2e7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/method_delete.go @@ -0,0 +1,72 @@ +package managedinstanceazureadonlyauthentications + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c ManagedInstanceAzureADOnlyAuthenticationsClient) Delete(ctx context.Context, id commonids.SqlManagedInstanceId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: fmt.Sprintf("%s/azureADOnlyAuthentications/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c ManagedInstanceAzureADOnlyAuthenticationsClient) DeleteThenPoll(ctx context.Context, id commonids.SqlManagedInstanceId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/method_get.go new file mode 100644 index 0000000000000..ad7d02117cc52 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/method_get.go @@ -0,0 +1,56 @@ +package managedinstanceazureadonlyauthentications + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ManagedInstanceAzureADOnlyAuthentication +} + +// Get ... +func (c ManagedInstanceAzureADOnlyAuthenticationsClient) Get(ctx context.Context, id commonids.SqlManagedInstanceId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/azureADOnlyAuthentications/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ManagedInstanceAzureADOnlyAuthentication + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/method_listbyinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/method_listbyinstance.go new file mode 100644 index 0000000000000..4cd27d8d2714e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/method_listbyinstance.go @@ -0,0 +1,106 @@ +package managedinstanceazureadonlyauthentications + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByInstanceOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ManagedInstanceAzureADOnlyAuthentication +} + +type ListByInstanceCompleteResult struct { + LatestHttpResponse *http.Response + Items []ManagedInstanceAzureADOnlyAuthentication +} + +type ListByInstanceCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByInstanceCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByInstance ... +func (c ManagedInstanceAzureADOnlyAuthenticationsClient) ListByInstance(ctx context.Context, id commonids.SqlManagedInstanceId) (result ListByInstanceOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByInstanceCustomPager{}, + Path: fmt.Sprintf("%s/azureADOnlyAuthentications", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ManagedInstanceAzureADOnlyAuthentication `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByInstanceComplete retrieves all the results into a single object +func (c ManagedInstanceAzureADOnlyAuthenticationsClient) ListByInstanceComplete(ctx context.Context, id commonids.SqlManagedInstanceId) (ListByInstanceCompleteResult, error) { + return c.ListByInstanceCompleteMatchingPredicate(ctx, id, ManagedInstanceAzureADOnlyAuthenticationOperationPredicate{}) +} + +// ListByInstanceCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ManagedInstanceAzureADOnlyAuthenticationsClient) ListByInstanceCompleteMatchingPredicate(ctx context.Context, id commonids.SqlManagedInstanceId, predicate ManagedInstanceAzureADOnlyAuthenticationOperationPredicate) (result ListByInstanceCompleteResult, err error) { + items := make([]ManagedInstanceAzureADOnlyAuthentication, 0) + + resp, err := c.ListByInstance(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByInstanceCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/model_managedinstanceazureadonlyauthentication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/model_managedinstanceazureadonlyauthentication.go new file mode 100644 index 0000000000000..9ad59f4b07c07 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/model_managedinstanceazureadonlyauthentication.go @@ -0,0 +1,11 @@ +package managedinstanceazureadonlyauthentications + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceAzureADOnlyAuthentication struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ManagedInstanceAzureADOnlyAuthProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/model_managedinstanceazureadonlyauthproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/model_managedinstanceazureadonlyauthproperties.go new file mode 100644 index 0000000000000..ffd1c383c0259 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/model_managedinstanceazureadonlyauthproperties.go @@ -0,0 +1,8 @@ +package managedinstanceazureadonlyauthentications + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceAzureADOnlyAuthProperties struct { + AzureADOnlyAuthentication bool `json:"azureADOnlyAuthentication"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/predicates.go new file mode 100644 index 0000000000000..26056826c212b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/predicates.go @@ -0,0 +1,27 @@ +package managedinstanceazureadonlyauthentications + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceAzureADOnlyAuthenticationOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p ManagedInstanceAzureADOnlyAuthenticationOperationPredicate) Matches(input ManagedInstanceAzureADOnlyAuthentication) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/version.go new file mode 100644 index 0000000000000..c15dbd25db993 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/version.go @@ -0,0 +1,12 @@ +package managedinstanceazureadonlyauthentications + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstanceazureadonlyauthentications/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/README.md new file mode 100644 index 0000000000000..c4f23676c31a9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/README.md @@ -0,0 +1,83 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors` Documentation + +The `managedinstanceencryptionprotectors` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors" +``` + + +### Client Initialization + +```go +client := managedinstanceencryptionprotectors.NewManagedInstanceEncryptionProtectorsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ManagedInstanceEncryptionProtectorsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +payload := managedinstanceencryptionprotectors.ManagedInstanceEncryptionProtector{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedInstanceEncryptionProtectorsClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagedInstanceEncryptionProtectorsClient.ListByInstance` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +// alternatively `client.ListByInstance(ctx, id)` can be used to do batched pagination +items, err := client.ListByInstanceComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ManagedInstanceEncryptionProtectorsClient.Revalidate` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +if err := client.RevalidateThenPoll(ctx, id); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/client.go new file mode 100644 index 0000000000000..3688e97050ce5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/client.go @@ -0,0 +1,26 @@ +package managedinstanceencryptionprotectors + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceEncryptionProtectorsClient struct { + Client *resourcemanager.Client +} + +func NewManagedInstanceEncryptionProtectorsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceEncryptionProtectorsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstanceencryptionprotectors", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ManagedInstanceEncryptionProtectorsClient: %+v", err) + } + + return &ManagedInstanceEncryptionProtectorsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/constants.go new file mode 100644 index 0000000000000..334a5ec41afb6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/constants.go @@ -0,0 +1,51 @@ +package managedinstanceencryptionprotectors + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerKeyType string + +const ( + ServerKeyTypeAzureKeyVault ServerKeyType = "AzureKeyVault" + ServerKeyTypeServiceManaged ServerKeyType = "ServiceManaged" +) + +func PossibleValuesForServerKeyType() []string { + return []string{ + string(ServerKeyTypeAzureKeyVault), + string(ServerKeyTypeServiceManaged), + } +} + +func (s *ServerKeyType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseServerKeyType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseServerKeyType(input string) (*ServerKeyType, error) { + vals := map[string]ServerKeyType{ + "azurekeyvault": ServerKeyTypeAzureKeyVault, + "servicemanaged": ServerKeyTypeServiceManaged, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ServerKeyType(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/method_createorupdate.go new file mode 100644 index 0000000000000..27e82bc12a2dd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/method_createorupdate.go @@ -0,0 +1,76 @@ +package managedinstanceencryptionprotectors + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ManagedInstanceEncryptionProtector +} + +// CreateOrUpdate ... +func (c ManagedInstanceEncryptionProtectorsClient) CreateOrUpdate(ctx context.Context, id commonids.SqlManagedInstanceId, input ManagedInstanceEncryptionProtector) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: fmt.Sprintf("%s/encryptionProtector/current", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c ManagedInstanceEncryptionProtectorsClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.SqlManagedInstanceId, input ManagedInstanceEncryptionProtector) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/method_get.go new file mode 100644 index 0000000000000..067629deb84a6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/method_get.go @@ -0,0 +1,56 @@ +package managedinstanceencryptionprotectors + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ManagedInstanceEncryptionProtector +} + +// Get ... +func (c ManagedInstanceEncryptionProtectorsClient) Get(ctx context.Context, id commonids.SqlManagedInstanceId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/encryptionProtector/current", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ManagedInstanceEncryptionProtector + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/method_listbyinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/method_listbyinstance.go new file mode 100644 index 0000000000000..92441270cccf8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/method_listbyinstance.go @@ -0,0 +1,106 @@ +package managedinstanceencryptionprotectors + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByInstanceOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ManagedInstanceEncryptionProtector +} + +type ListByInstanceCompleteResult struct { + LatestHttpResponse *http.Response + Items []ManagedInstanceEncryptionProtector +} + +type ListByInstanceCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByInstanceCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByInstance ... +func (c ManagedInstanceEncryptionProtectorsClient) ListByInstance(ctx context.Context, id commonids.SqlManagedInstanceId) (result ListByInstanceOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByInstanceCustomPager{}, + Path: fmt.Sprintf("%s/encryptionProtector", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ManagedInstanceEncryptionProtector `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByInstanceComplete retrieves all the results into a single object +func (c ManagedInstanceEncryptionProtectorsClient) ListByInstanceComplete(ctx context.Context, id commonids.SqlManagedInstanceId) (ListByInstanceCompleteResult, error) { + return c.ListByInstanceCompleteMatchingPredicate(ctx, id, ManagedInstanceEncryptionProtectorOperationPredicate{}) +} + +// ListByInstanceCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ManagedInstanceEncryptionProtectorsClient) ListByInstanceCompleteMatchingPredicate(ctx context.Context, id commonids.SqlManagedInstanceId, predicate ManagedInstanceEncryptionProtectorOperationPredicate) (result ListByInstanceCompleteResult, err error) { + items := make([]ManagedInstanceEncryptionProtector, 0) + + resp, err := c.ListByInstance(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByInstanceCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/method_revalidate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/method_revalidate.go new file mode 100644 index 0000000000000..e51f2c2c41571 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/method_revalidate.go @@ -0,0 +1,71 @@ +package managedinstanceencryptionprotectors + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RevalidateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Revalidate ... +func (c ManagedInstanceEncryptionProtectorsClient) Revalidate(ctx context.Context, id commonids.SqlManagedInstanceId) (result RevalidateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/encryptionProtector/current/revalidate", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// RevalidateThenPoll performs Revalidate then polls until it's completed +func (c ManagedInstanceEncryptionProtectorsClient) RevalidateThenPoll(ctx context.Context, id commonids.SqlManagedInstanceId) error { + result, err := c.Revalidate(ctx, id) + if err != nil { + return fmt.Errorf("performing Revalidate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Revalidate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/model_managedinstanceencryptionprotector.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/model_managedinstanceencryptionprotector.go new file mode 100644 index 0000000000000..6dbec21f08daf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/model_managedinstanceencryptionprotector.go @@ -0,0 +1,12 @@ +package managedinstanceencryptionprotectors + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceEncryptionProtector struct { + Id *string `json:"id,omitempty"` + Kind *string `json:"kind,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ManagedInstanceEncryptionProtectorProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/model_managedinstanceencryptionprotectorproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/model_managedinstanceencryptionprotectorproperties.go new file mode 100644 index 0000000000000..0b78a822cea47 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/model_managedinstanceencryptionprotectorproperties.go @@ -0,0 +1,12 @@ +package managedinstanceencryptionprotectors + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceEncryptionProtectorProperties struct { + AutoRotationEnabled *bool `json:"autoRotationEnabled,omitempty"` + ServerKeyName *string `json:"serverKeyName,omitempty"` + ServerKeyType ServerKeyType `json:"serverKeyType"` + Thumbprint *string `json:"thumbprint,omitempty"` + Uri *string `json:"uri,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/predicates.go new file mode 100644 index 0000000000000..3d36552bf7fcd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/predicates.go @@ -0,0 +1,32 @@ +package managedinstanceencryptionprotectors + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceEncryptionProtectorOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p ManagedInstanceEncryptionProtectorOperationPredicate) Matches(input ManagedInstanceEncryptionProtector) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/version.go new file mode 100644 index 0000000000000..aa0f51f26d5a1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/version.go @@ -0,0 +1,12 @@ +package managedinstanceencryptionprotectors + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstanceencryptionprotectors/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/README.md new file mode 100644 index 0000000000000..fff5fc692cc75 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/README.md @@ -0,0 +1,83 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys` Documentation + +The `managedinstancekeys` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys" +``` + + +### Client Initialization + +```go +client := managedinstancekeys.NewManagedInstanceKeysClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ManagedInstanceKeysClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := managedinstancekeys.NewManagedInstanceKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "keyValue") + +payload := managedinstancekeys.ManagedInstanceKey{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedInstanceKeysClient.Delete` + +```go +ctx := context.TODO() +id := managedinstancekeys.NewManagedInstanceKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "keyValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedInstanceKeysClient.Get` + +```go +ctx := context.TODO() +id := managedinstancekeys.NewManagedInstanceKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "keyValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagedInstanceKeysClient.ListByInstance` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +// alternatively `client.ListByInstance(ctx, id, managedinstancekeys.DefaultListByInstanceOperationOptions())` can be used to do batched pagination +items, err := client.ListByInstanceComplete(ctx, id, managedinstancekeys.DefaultListByInstanceOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/client.go new file mode 100644 index 0000000000000..06797198c4d95 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/client.go @@ -0,0 +1,26 @@ +package managedinstancekeys + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceKeysClient struct { + Client *resourcemanager.Client +} + +func NewManagedInstanceKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceKeysClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstancekeys", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ManagedInstanceKeysClient: %+v", err) + } + + return &ManagedInstanceKeysClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/constants.go new file mode 100644 index 0000000000000..cb6c195b1a55a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/constants.go @@ -0,0 +1,51 @@ +package managedinstancekeys + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerKeyType string + +const ( + ServerKeyTypeAzureKeyVault ServerKeyType = "AzureKeyVault" + ServerKeyTypeServiceManaged ServerKeyType = "ServiceManaged" +) + +func PossibleValuesForServerKeyType() []string { + return []string{ + string(ServerKeyTypeAzureKeyVault), + string(ServerKeyTypeServiceManaged), + } +} + +func (s *ServerKeyType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseServerKeyType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseServerKeyType(input string) (*ServerKeyType, error) { + vals := map[string]ServerKeyType{ + "azurekeyvault": ServerKeyTypeAzureKeyVault, + "servicemanaged": ServerKeyTypeServiceManaged, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ServerKeyType(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/id_managedinstancekey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/id_managedinstancekey.go new file mode 100644 index 0000000000000..3636ab872d7d7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/id_managedinstancekey.go @@ -0,0 +1,139 @@ +package managedinstancekeys + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&ManagedInstanceKeyId{}) +} + +var _ resourceids.ResourceId = &ManagedInstanceKeyId{} + +// ManagedInstanceKeyId is a struct representing the Resource ID for a Managed Instance Key +type ManagedInstanceKeyId struct { + SubscriptionId string + ResourceGroupName string + ManagedInstanceName string + KeyName string +} + +// NewManagedInstanceKeyID returns a new ManagedInstanceKeyId struct +func NewManagedInstanceKeyID(subscriptionId string, resourceGroupName string, managedInstanceName string, keyName string) ManagedInstanceKeyId { + return ManagedInstanceKeyId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ManagedInstanceName: managedInstanceName, + KeyName: keyName, + } +} + +// ParseManagedInstanceKeyID parses 'input' into a ManagedInstanceKeyId +func ParseManagedInstanceKeyID(input string) (*ManagedInstanceKeyId, error) { + parser := resourceids.NewParserFromResourceIdType(&ManagedInstanceKeyId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ManagedInstanceKeyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseManagedInstanceKeyIDInsensitively parses 'input' case-insensitively into a ManagedInstanceKeyId +// note: this method should only be used for API response data and not user input +func ParseManagedInstanceKeyIDInsensitively(input string) (*ManagedInstanceKeyId, error) { + parser := resourceids.NewParserFromResourceIdType(&ManagedInstanceKeyId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ManagedInstanceKeyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ManagedInstanceKeyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ManagedInstanceName, ok = input.Parsed["managedInstanceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedInstanceName", input) + } + + if id.KeyName, ok = input.Parsed["keyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "keyName", input) + } + + return nil +} + +// ValidateManagedInstanceKeyID checks that 'input' can be parsed as a Managed Instance Key ID +func ValidateManagedInstanceKeyID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseManagedInstanceKeyID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Managed Instance Key ID +func (id ManagedInstanceKeyId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Sql/managedInstances/%s/keys/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ManagedInstanceName, id.KeyName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Managed Instance Key ID +func (id ManagedInstanceKeyId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftSql", "Microsoft.Sql", "Microsoft.Sql"), + resourceids.StaticSegment("staticManagedInstances", "managedInstances", "managedInstances"), + resourceids.UserSpecifiedSegment("managedInstanceName", "managedInstanceValue"), + resourceids.StaticSegment("staticKeys", "keys", "keys"), + resourceids.UserSpecifiedSegment("keyName", "keyValue"), + } +} + +// String returns a human-readable description of this Managed Instance Key ID +func (id ManagedInstanceKeyId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Managed Instance Name: %q", id.ManagedInstanceName), + fmt.Sprintf("Key Name: %q", id.KeyName), + } + return fmt.Sprintf("Managed Instance Key (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/method_createorupdate.go new file mode 100644 index 0000000000000..6e098cfdd6ecc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/method_createorupdate.go @@ -0,0 +1,76 @@ +package managedinstancekeys + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ManagedInstanceKey +} + +// CreateOrUpdate ... +func (c ManagedInstanceKeysClient) CreateOrUpdate(ctx context.Context, id ManagedInstanceKeyId, input ManagedInstanceKey) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c ManagedInstanceKeysClient) CreateOrUpdateThenPoll(ctx context.Context, id ManagedInstanceKeyId, input ManagedInstanceKey) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/method_delete.go new file mode 100644 index 0000000000000..5c7df47721e60 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/method_delete.go @@ -0,0 +1,71 @@ +package managedinstancekeys + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c ManagedInstanceKeysClient) Delete(ctx context.Context, id ManagedInstanceKeyId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c ManagedInstanceKeysClient) DeleteThenPoll(ctx context.Context, id ManagedInstanceKeyId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/method_get.go new file mode 100644 index 0000000000000..c7d5ce953d0b0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/method_get.go @@ -0,0 +1,54 @@ +package managedinstancekeys + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ManagedInstanceKey +} + +// Get ... +func (c ManagedInstanceKeysClient) Get(ctx context.Context, id ManagedInstanceKeyId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ManagedInstanceKey + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/method_listbyinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/method_listbyinstance.go new file mode 100644 index 0000000000000..140196d0475cd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/method_listbyinstance.go @@ -0,0 +1,134 @@ +package managedinstancekeys + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByInstanceOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ManagedInstanceKey +} + +type ListByInstanceCompleteResult struct { + LatestHttpResponse *http.Response + Items []ManagedInstanceKey +} + +type ListByInstanceOperationOptions struct { + Filter *string +} + +func DefaultListByInstanceOperationOptions() ListByInstanceOperationOptions { + return ListByInstanceOperationOptions{} +} + +func (o ListByInstanceOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o ListByInstanceOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o ListByInstanceOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.Filter != nil { + out.Append("$filter", fmt.Sprintf("%v", *o.Filter)) + } + return &out +} + +type ListByInstanceCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByInstanceCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByInstance ... +func (c ManagedInstanceKeysClient) ListByInstance(ctx context.Context, id commonids.SqlManagedInstanceId, options ListByInstanceOperationOptions) (result ListByInstanceOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Pager: &ListByInstanceCustomPager{}, + Path: fmt.Sprintf("%s/keys", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ManagedInstanceKey `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByInstanceComplete retrieves all the results into a single object +func (c ManagedInstanceKeysClient) ListByInstanceComplete(ctx context.Context, id commonids.SqlManagedInstanceId, options ListByInstanceOperationOptions) (ListByInstanceCompleteResult, error) { + return c.ListByInstanceCompleteMatchingPredicate(ctx, id, options, ManagedInstanceKeyOperationPredicate{}) +} + +// ListByInstanceCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ManagedInstanceKeysClient) ListByInstanceCompleteMatchingPredicate(ctx context.Context, id commonids.SqlManagedInstanceId, options ListByInstanceOperationOptions, predicate ManagedInstanceKeyOperationPredicate) (result ListByInstanceCompleteResult, err error) { + items := make([]ManagedInstanceKey, 0) + + resp, err := c.ListByInstance(ctx, id, options) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByInstanceCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/model_managedinstancekey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/model_managedinstancekey.go new file mode 100644 index 0000000000000..9be285e7e164d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/model_managedinstancekey.go @@ -0,0 +1,12 @@ +package managedinstancekeys + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceKey struct { + Id *string `json:"id,omitempty"` + Kind *string `json:"kind,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ManagedInstanceKeyProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/model_managedinstancekeyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/model_managedinstancekeyproperties.go new file mode 100644 index 0000000000000..3c2e62946d072 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/model_managedinstancekeyproperties.go @@ -0,0 +1,30 @@ +package managedinstancekeys + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceKeyProperties struct { + AutoRotationEnabled *bool `json:"autoRotationEnabled,omitempty"` + CreationDate *string `json:"creationDate,omitempty"` + ServerKeyType ServerKeyType `json:"serverKeyType"` + Thumbprint *string `json:"thumbprint,omitempty"` + Uri *string `json:"uri,omitempty"` +} + +func (o *ManagedInstanceKeyProperties) GetCreationDateAsTime() (*time.Time, error) { + if o.CreationDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreationDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *ManagedInstanceKeyProperties) SetCreationDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreationDate = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/predicates.go new file mode 100644 index 0000000000000..9d02a4bfacd13 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/predicates.go @@ -0,0 +1,32 @@ +package managedinstancekeys + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceKeyOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p ManagedInstanceKeyOperationPredicate) Matches(input ManagedInstanceKey) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/version.go new file mode 100644 index 0000000000000..843a1f45c7e09 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys/version.go @@ -0,0 +1,12 @@ +package managedinstancekeys + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstancekeys/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/README.md new file mode 100644 index 0000000000000..dbe2eb4a02bf4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/README.md @@ -0,0 +1,83 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies` Documentation + +The `managedinstancelongtermretentionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies" +``` + + +### Client Initialization + +```go +client := managedinstancelongtermretentionpolicies.NewManagedInstanceLongTermRetentionPoliciesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ManagedInstanceLongTermRetentionPoliciesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue") + +payload := managedinstancelongtermretentionpolicies.ManagedInstanceLongTermRetentionPolicy{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedInstanceLongTermRetentionPoliciesClient.Delete` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedInstanceLongTermRetentionPoliciesClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagedInstanceLongTermRetentionPoliciesClient.ListByDatabase` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue") + +// alternatively `client.ListByDatabase(ctx, id)` can be used to do batched pagination +items, err := client.ListByDatabaseComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/client.go new file mode 100644 index 0000000000000..d86d5f1cb6dce --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/client.go @@ -0,0 +1,26 @@ +package managedinstancelongtermretentionpolicies + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceLongTermRetentionPoliciesClient struct { + Client *resourcemanager.Client +} + +func NewManagedInstanceLongTermRetentionPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceLongTermRetentionPoliciesClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstancelongtermretentionpolicies", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ManagedInstanceLongTermRetentionPoliciesClient: %+v", err) + } + + return &ManagedInstanceLongTermRetentionPoliciesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/constants.go new file mode 100644 index 0000000000000..2b0562bc53c96 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/constants.go @@ -0,0 +1,51 @@ +package managedinstancelongtermretentionpolicies + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupStorageAccessTier string + +const ( + BackupStorageAccessTierArchive BackupStorageAccessTier = "Archive" + BackupStorageAccessTierHot BackupStorageAccessTier = "Hot" +) + +func PossibleValuesForBackupStorageAccessTier() []string { + return []string{ + string(BackupStorageAccessTierArchive), + string(BackupStorageAccessTierHot), + } +} + +func (s *BackupStorageAccessTier) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseBackupStorageAccessTier(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseBackupStorageAccessTier(input string) (*BackupStorageAccessTier, error) { + vals := map[string]BackupStorageAccessTier{ + "archive": BackupStorageAccessTierArchive, + "hot": BackupStorageAccessTierHot, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := BackupStorageAccessTier(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/method_createorupdate.go new file mode 100644 index 0000000000000..4ffac25baa38b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/method_createorupdate.go @@ -0,0 +1,76 @@ +package managedinstancelongtermretentionpolicies + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ManagedInstanceLongTermRetentionPolicy +} + +// CreateOrUpdate ... +func (c ManagedInstanceLongTermRetentionPoliciesClient) CreateOrUpdate(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId, input ManagedInstanceLongTermRetentionPolicy) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: fmt.Sprintf("%s/backupLongTermRetentionPolicies/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c ManagedInstanceLongTermRetentionPoliciesClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId, input ManagedInstanceLongTermRetentionPolicy) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/method_delete.go new file mode 100644 index 0000000000000..a4296652f9065 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/method_delete.go @@ -0,0 +1,72 @@ +package managedinstancelongtermretentionpolicies + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ManagedInstanceLongTermRetentionPolicy +} + +// Delete ... +func (c ManagedInstanceLongTermRetentionPoliciesClient) Delete(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: fmt.Sprintf("%s/backupLongTermRetentionPolicies/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c ManagedInstanceLongTermRetentionPoliciesClient) DeleteThenPoll(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/method_get.go new file mode 100644 index 0000000000000..5d0631421515d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/method_get.go @@ -0,0 +1,56 @@ +package managedinstancelongtermretentionpolicies + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ManagedInstanceLongTermRetentionPolicy +} + +// Get ... +func (c ManagedInstanceLongTermRetentionPoliciesClient) Get(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/backupLongTermRetentionPolicies/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ManagedInstanceLongTermRetentionPolicy + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/method_listbydatabase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/method_listbydatabase.go new file mode 100644 index 0000000000000..cf4ace8596278 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/method_listbydatabase.go @@ -0,0 +1,106 @@ +package managedinstancelongtermretentionpolicies + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByDatabaseOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ManagedInstanceLongTermRetentionPolicy +} + +type ListByDatabaseCompleteResult struct { + LatestHttpResponse *http.Response + Items []ManagedInstanceLongTermRetentionPolicy +} + +type ListByDatabaseCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByDatabaseCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByDatabase ... +func (c ManagedInstanceLongTermRetentionPoliciesClient) ListByDatabase(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId) (result ListByDatabaseOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByDatabaseCustomPager{}, + Path: fmt.Sprintf("%s/backupLongTermRetentionPolicies", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ManagedInstanceLongTermRetentionPolicy `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByDatabaseComplete retrieves all the results into a single object +func (c ManagedInstanceLongTermRetentionPoliciesClient) ListByDatabaseComplete(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId) (ListByDatabaseCompleteResult, error) { + return c.ListByDatabaseCompleteMatchingPredicate(ctx, id, ManagedInstanceLongTermRetentionPolicyOperationPredicate{}) +} + +// ListByDatabaseCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ManagedInstanceLongTermRetentionPoliciesClient) ListByDatabaseCompleteMatchingPredicate(ctx context.Context, id commonids.SqlManagedInstanceDatabaseId, predicate ManagedInstanceLongTermRetentionPolicyOperationPredicate) (result ListByDatabaseCompleteResult, err error) { + items := make([]ManagedInstanceLongTermRetentionPolicy, 0) + + resp, err := c.ListByDatabase(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByDatabaseCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/model_managedinstancelongtermretentionpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/model_managedinstancelongtermretentionpolicy.go new file mode 100644 index 0000000000000..130b2849778d6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/model_managedinstancelongtermretentionpolicy.go @@ -0,0 +1,11 @@ +package managedinstancelongtermretentionpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceLongTermRetentionPolicy struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ManagedInstanceLongTermRetentionPolicyProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/model_managedinstancelongtermretentionpolicyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/model_managedinstancelongtermretentionpolicyproperties.go new file mode 100644 index 0000000000000..1014c3709085e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/model_managedinstancelongtermretentionpolicyproperties.go @@ -0,0 +1,12 @@ +package managedinstancelongtermretentionpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceLongTermRetentionPolicyProperties struct { + BackupStorageAccessTier *BackupStorageAccessTier `json:"backupStorageAccessTier,omitempty"` + MonthlyRetention *string `json:"monthlyRetention,omitempty"` + WeekOfYear *int64 `json:"weekOfYear,omitempty"` + WeeklyRetention *string `json:"weeklyRetention,omitempty"` + YearlyRetention *string `json:"yearlyRetention,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/predicates.go new file mode 100644 index 0000000000000..8ab8e0bab1f49 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/predicates.go @@ -0,0 +1,27 @@ +package managedinstancelongtermretentionpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceLongTermRetentionPolicyOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p ManagedInstanceLongTermRetentionPolicyOperationPredicate) Matches(input ManagedInstanceLongTermRetentionPolicy) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/version.go new file mode 100644 index 0000000000000..f5e1a98083c38 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/version.go @@ -0,0 +1,12 @@ +package managedinstancelongtermretentionpolicies + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstancelongtermretentionpolicies/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/README.md new file mode 100644 index 0000000000000..7204ccc35e717 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/README.md @@ -0,0 +1,216 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances` Documentation + +The `managedinstances` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances" +``` + + +### Client Initialization + +```go +client := managedinstances.NewManagedInstancesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ManagedInstancesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +payload := managedinstances.ManagedInstance{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedInstancesClient.Delete` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedInstancesClient.Failover` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +if err := client.FailoverThenPoll(ctx, id, managedinstances.DefaultFailoverOperationOptions()); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedInstancesClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +read, err := client.Get(ctx, id, managedinstances.DefaultGetOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagedInstancesClient.List` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.List(ctx, id, managedinstances.DefaultListOperationOptions())` can be used to do batched pagination +items, err := client.ListComplete(ctx, id, managedinstances.DefaultListOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ManagedInstancesClient.ListByInstancePool` + +```go +ctx := context.TODO() +id := managedinstances.NewInstancePoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "instancePoolValue") + +// alternatively `client.ListByInstancePool(ctx, id, managedinstances.DefaultListByInstancePoolOperationOptions())` can be used to do batched pagination +items, err := client.ListByInstancePoolComplete(ctx, id, managedinstances.DefaultListByInstancePoolOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ManagedInstancesClient.ListByManagedInstance` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +// alternatively `client.ListByManagedInstance(ctx, id, managedinstances.DefaultListByManagedInstanceOperationOptions())` can be used to do batched pagination +items, err := client.ListByManagedInstanceComplete(ctx, id, managedinstances.DefaultListByManagedInstanceOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ManagedInstancesClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id, managedinstances.DefaultListByResourceGroupOperationOptions())` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id, managedinstances.DefaultListByResourceGroupOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ManagedInstancesClient.ListOutboundNetworkDependenciesByManagedInstance` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +// alternatively `client.ListOutboundNetworkDependenciesByManagedInstance(ctx, id)` can be used to do batched pagination +items, err := client.ListOutboundNetworkDependenciesByManagedInstanceComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ManagedInstancesClient.RefreshStatus` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +if err := client.RefreshStatusThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedInstancesClient.Start` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +if err := client.StartThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedInstancesClient.Stop` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +if err := client.StopThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedInstancesClient.Update` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +payload := managedinstances.ManagedInstanceUpdate{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/client.go new file mode 100644 index 0000000000000..0618c7ec8de4c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/client.go @@ -0,0 +1,26 @@ +package managedinstances + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstancesClient struct { + Client *resourcemanager.Client +} + +func NewManagedInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstancesClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstances", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ManagedInstancesClient: %+v", err) + } + + return &ManagedInstancesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/constants.go new file mode 100644 index 0000000000000..5565835790ef1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/constants.go @@ -0,0 +1,834 @@ +package managedinstances + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AdministratorType string + +const ( + AdministratorTypeActiveDirectory AdministratorType = "ActiveDirectory" +) + +func PossibleValuesForAdministratorType() []string { + return []string{ + string(AdministratorTypeActiveDirectory), + } +} + +func (s *AdministratorType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAdministratorType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAdministratorType(input string) (*AdministratorType, error) { + vals := map[string]AdministratorType{ + "activedirectory": AdministratorTypeActiveDirectory, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AdministratorType(input) + return &out, nil +} + +type AggregationFunctionType string + +const ( + AggregationFunctionTypeAvg AggregationFunctionType = "avg" + AggregationFunctionTypeMax AggregationFunctionType = "max" + AggregationFunctionTypeMin AggregationFunctionType = "min" + AggregationFunctionTypeStdev AggregationFunctionType = "stdev" + AggregationFunctionTypeSum AggregationFunctionType = "sum" +) + +func PossibleValuesForAggregationFunctionType() []string { + return []string{ + string(AggregationFunctionTypeAvg), + string(AggregationFunctionTypeMax), + string(AggregationFunctionTypeMin), + string(AggregationFunctionTypeStdev), + string(AggregationFunctionTypeSum), + } +} + +func (s *AggregationFunctionType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAggregationFunctionType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAggregationFunctionType(input string) (*AggregationFunctionType, error) { + vals := map[string]AggregationFunctionType{ + "avg": AggregationFunctionTypeAvg, + "max": AggregationFunctionTypeMax, + "min": AggregationFunctionTypeMin, + "stdev": AggregationFunctionTypeStdev, + "sum": AggregationFunctionTypeSum, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AggregationFunctionType(input) + return &out, nil +} + +type AuthMetadataLookupModes string + +const ( + AuthMetadataLookupModesAzureAD AuthMetadataLookupModes = "AzureAD" + AuthMetadataLookupModesPaired AuthMetadataLookupModes = "Paired" + AuthMetadataLookupModesWindows AuthMetadataLookupModes = "Windows" +) + +func PossibleValuesForAuthMetadataLookupModes() []string { + return []string{ + string(AuthMetadataLookupModesAzureAD), + string(AuthMetadataLookupModesPaired), + string(AuthMetadataLookupModesWindows), + } +} + +func (s *AuthMetadataLookupModes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAuthMetadataLookupModes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAuthMetadataLookupModes(input string) (*AuthMetadataLookupModes, error) { + vals := map[string]AuthMetadataLookupModes{ + "azuread": AuthMetadataLookupModesAzureAD, + "paired": AuthMetadataLookupModesPaired, + "windows": AuthMetadataLookupModesWindows, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AuthMetadataLookupModes(input) + return &out, nil +} + +type BackupStorageRedundancy string + +const ( + BackupStorageRedundancyGeo BackupStorageRedundancy = "Geo" + BackupStorageRedundancyGeoZone BackupStorageRedundancy = "GeoZone" + BackupStorageRedundancyLocal BackupStorageRedundancy = "Local" + BackupStorageRedundancyZone BackupStorageRedundancy = "Zone" +) + +func PossibleValuesForBackupStorageRedundancy() []string { + return []string{ + string(BackupStorageRedundancyGeo), + string(BackupStorageRedundancyGeoZone), + string(BackupStorageRedundancyLocal), + string(BackupStorageRedundancyZone), + } +} + +func (s *BackupStorageRedundancy) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseBackupStorageRedundancy(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseBackupStorageRedundancy(input string) (*BackupStorageRedundancy, error) { + vals := map[string]BackupStorageRedundancy{ + "geo": BackupStorageRedundancyGeo, + "geozone": BackupStorageRedundancyGeoZone, + "local": BackupStorageRedundancyLocal, + "zone": BackupStorageRedundancyZone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := BackupStorageRedundancy(input) + return &out, nil +} + +type ExternalGovernanceStatus string + +const ( + ExternalGovernanceStatusDisabled ExternalGovernanceStatus = "Disabled" + ExternalGovernanceStatusEnabled ExternalGovernanceStatus = "Enabled" +) + +func PossibleValuesForExternalGovernanceStatus() []string { + return []string{ + string(ExternalGovernanceStatusDisabled), + string(ExternalGovernanceStatusEnabled), + } +} + +func (s *ExternalGovernanceStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseExternalGovernanceStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseExternalGovernanceStatus(input string) (*ExternalGovernanceStatus, error) { + vals := map[string]ExternalGovernanceStatus{ + "disabled": ExternalGovernanceStatusDisabled, + "enabled": ExternalGovernanceStatusEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ExternalGovernanceStatus(input) + return &out, nil +} + +type FreemiumType string + +const ( + FreemiumTypeFreemium FreemiumType = "Freemium" + FreemiumTypeRegular FreemiumType = "Regular" +) + +func PossibleValuesForFreemiumType() []string { + return []string{ + string(FreemiumTypeFreemium), + string(FreemiumTypeRegular), + } +} + +func (s *FreemiumType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseFreemiumType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseFreemiumType(input string) (*FreemiumType, error) { + vals := map[string]FreemiumType{ + "freemium": FreemiumTypeFreemium, + "regular": FreemiumTypeRegular, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := FreemiumType(input) + return &out, nil +} + +type HybridSecondaryUsage string + +const ( + HybridSecondaryUsageActive HybridSecondaryUsage = "Active" + HybridSecondaryUsagePassive HybridSecondaryUsage = "Passive" +) + +func PossibleValuesForHybridSecondaryUsage() []string { + return []string{ + string(HybridSecondaryUsageActive), + string(HybridSecondaryUsagePassive), + } +} + +func (s *HybridSecondaryUsage) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHybridSecondaryUsage(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHybridSecondaryUsage(input string) (*HybridSecondaryUsage, error) { + vals := map[string]HybridSecondaryUsage{ + "active": HybridSecondaryUsageActive, + "passive": HybridSecondaryUsagePassive, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HybridSecondaryUsage(input) + return &out, nil +} + +type HybridSecondaryUsageDetected string + +const ( + HybridSecondaryUsageDetectedActive HybridSecondaryUsageDetected = "Active" + HybridSecondaryUsageDetectedPassive HybridSecondaryUsageDetected = "Passive" +) + +func PossibleValuesForHybridSecondaryUsageDetected() []string { + return []string{ + string(HybridSecondaryUsageDetectedActive), + string(HybridSecondaryUsageDetectedPassive), + } +} + +func (s *HybridSecondaryUsageDetected) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHybridSecondaryUsageDetected(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHybridSecondaryUsageDetected(input string) (*HybridSecondaryUsageDetected, error) { + vals := map[string]HybridSecondaryUsageDetected{ + "active": HybridSecondaryUsageDetectedActive, + "passive": HybridSecondaryUsageDetectedPassive, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HybridSecondaryUsageDetected(input) + return &out, nil +} + +type ManagedInstanceDatabaseFormat string + +const ( + ManagedInstanceDatabaseFormatAlwaysUpToDate ManagedInstanceDatabaseFormat = "AlwaysUpToDate" + ManagedInstanceDatabaseFormatSQLServerTwoZeroTwoTwo ManagedInstanceDatabaseFormat = "SQLServer2022" +) + +func PossibleValuesForManagedInstanceDatabaseFormat() []string { + return []string{ + string(ManagedInstanceDatabaseFormatAlwaysUpToDate), + string(ManagedInstanceDatabaseFormatSQLServerTwoZeroTwoTwo), + } +} + +func (s *ManagedInstanceDatabaseFormat) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseManagedInstanceDatabaseFormat(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseManagedInstanceDatabaseFormat(input string) (*ManagedInstanceDatabaseFormat, error) { + vals := map[string]ManagedInstanceDatabaseFormat{ + "alwaysuptodate": ManagedInstanceDatabaseFormatAlwaysUpToDate, + "sqlserver2022": ManagedInstanceDatabaseFormatSQLServerTwoZeroTwoTwo, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ManagedInstanceDatabaseFormat(input) + return &out, nil +} + +type ManagedInstanceLicenseType string + +const ( + ManagedInstanceLicenseTypeBasePrice ManagedInstanceLicenseType = "BasePrice" + ManagedInstanceLicenseTypeLicenseIncluded ManagedInstanceLicenseType = "LicenseIncluded" +) + +func PossibleValuesForManagedInstanceLicenseType() []string { + return []string{ + string(ManagedInstanceLicenseTypeBasePrice), + string(ManagedInstanceLicenseTypeLicenseIncluded), + } +} + +func (s *ManagedInstanceLicenseType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseManagedInstanceLicenseType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseManagedInstanceLicenseType(input string) (*ManagedInstanceLicenseType, error) { + vals := map[string]ManagedInstanceLicenseType{ + "baseprice": ManagedInstanceLicenseTypeBasePrice, + "licenseincluded": ManagedInstanceLicenseTypeLicenseIncluded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ManagedInstanceLicenseType(input) + return &out, nil +} + +type ManagedInstanceProxyOverride string + +const ( + ManagedInstanceProxyOverrideDefault ManagedInstanceProxyOverride = "Default" + ManagedInstanceProxyOverrideProxy ManagedInstanceProxyOverride = "Proxy" + ManagedInstanceProxyOverrideRedirect ManagedInstanceProxyOverride = "Redirect" +) + +func PossibleValuesForManagedInstanceProxyOverride() []string { + return []string{ + string(ManagedInstanceProxyOverrideDefault), + string(ManagedInstanceProxyOverrideProxy), + string(ManagedInstanceProxyOverrideRedirect), + } +} + +func (s *ManagedInstanceProxyOverride) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseManagedInstanceProxyOverride(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseManagedInstanceProxyOverride(input string) (*ManagedInstanceProxyOverride, error) { + vals := map[string]ManagedInstanceProxyOverride{ + "default": ManagedInstanceProxyOverrideDefault, + "proxy": ManagedInstanceProxyOverrideProxy, + "redirect": ManagedInstanceProxyOverrideRedirect, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ManagedInstanceProxyOverride(input) + return &out, nil +} + +type ManagedServerCreateMode string + +const ( + ManagedServerCreateModeDefault ManagedServerCreateMode = "Default" + ManagedServerCreateModePointInTimeRestore ManagedServerCreateMode = "PointInTimeRestore" +) + +func PossibleValuesForManagedServerCreateMode() []string { + return []string{ + string(ManagedServerCreateModeDefault), + string(ManagedServerCreateModePointInTimeRestore), + } +} + +func (s *ManagedServerCreateMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseManagedServerCreateMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseManagedServerCreateMode(input string) (*ManagedServerCreateMode, error) { + vals := map[string]ManagedServerCreateMode{ + "default": ManagedServerCreateModeDefault, + "pointintimerestore": ManagedServerCreateModePointInTimeRestore, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ManagedServerCreateMode(input) + return &out, nil +} + +type MetricType string + +const ( + MetricTypeCpu MetricType = "cpu" + MetricTypeDtu MetricType = "dtu" + MetricTypeDuration MetricType = "duration" + MetricTypeIo MetricType = "io" + MetricTypeLogIo MetricType = "logIo" +) + +func PossibleValuesForMetricType() []string { + return []string{ + string(MetricTypeCpu), + string(MetricTypeDtu), + string(MetricTypeDuration), + string(MetricTypeIo), + string(MetricTypeLogIo), + } +} + +func (s *MetricType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMetricType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMetricType(input string) (*MetricType, error) { + vals := map[string]MetricType{ + "cpu": MetricTypeCpu, + "dtu": MetricTypeDtu, + "duration": MetricTypeDuration, + "io": MetricTypeIo, + "logio": MetricTypeLogIo, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MetricType(input) + return &out, nil +} + +type PrincipalType string + +const ( + PrincipalTypeApplication PrincipalType = "Application" + PrincipalTypeGroup PrincipalType = "Group" + PrincipalTypeUser PrincipalType = "User" +) + +func PossibleValuesForPrincipalType() []string { + return []string{ + string(PrincipalTypeApplication), + string(PrincipalTypeGroup), + string(PrincipalTypeUser), + } +} + +func (s *PrincipalType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePrincipalType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePrincipalType(input string) (*PrincipalType, error) { + vals := map[string]PrincipalType{ + "application": PrincipalTypeApplication, + "group": PrincipalTypeGroup, + "user": PrincipalTypeUser, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrincipalType(input) + return &out, nil +} + +type ProvisioningState string + +const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreated ProvisioningState = "Created" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateInProgress ProvisioningState = "InProgress" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateCanceled), + string(ProvisioningStateCreated), + string(ProvisioningStateFailed), + string(ProvisioningStateInProgress), + string(ProvisioningStateSucceeded), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "canceled": ProvisioningStateCanceled, + "created": ProvisioningStateCreated, + "failed": ProvisioningStateFailed, + "inprogress": ProvisioningStateInProgress, + "succeeded": ProvisioningStateSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} + +type QueryMetricUnitType string + +const ( + QueryMetricUnitTypeCount QueryMetricUnitType = "count" + QueryMetricUnitTypeKB QueryMetricUnitType = "KB" + QueryMetricUnitTypeMicroseconds QueryMetricUnitType = "microseconds" + QueryMetricUnitTypePercentage QueryMetricUnitType = "percentage" +) + +func PossibleValuesForQueryMetricUnitType() []string { + return []string{ + string(QueryMetricUnitTypeCount), + string(QueryMetricUnitTypeKB), + string(QueryMetricUnitTypeMicroseconds), + string(QueryMetricUnitTypePercentage), + } +} + +func (s *QueryMetricUnitType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseQueryMetricUnitType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseQueryMetricUnitType(input string) (*QueryMetricUnitType, error) { + vals := map[string]QueryMetricUnitType{ + "count": QueryMetricUnitTypeCount, + "kb": QueryMetricUnitTypeKB, + "microseconds": QueryMetricUnitTypeMicroseconds, + "percentage": QueryMetricUnitTypePercentage, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := QueryMetricUnitType(input) + return &out, nil +} + +type QueryTimeGrainType string + +const ( + QueryTimeGrainTypePOneD QueryTimeGrainType = "P1D" + QueryTimeGrainTypePTOneH QueryTimeGrainType = "PT1H" +) + +func PossibleValuesForQueryTimeGrainType() []string { + return []string{ + string(QueryTimeGrainTypePOneD), + string(QueryTimeGrainTypePTOneH), + } +} + +func (s *QueryTimeGrainType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseQueryTimeGrainType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseQueryTimeGrainType(input string) (*QueryTimeGrainType, error) { + vals := map[string]QueryTimeGrainType{ + "p1d": QueryTimeGrainTypePOneD, + "pt1h": QueryTimeGrainTypePTOneH, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := QueryTimeGrainType(input) + return &out, nil +} + +type ReplicaType string + +const ( + ReplicaTypePrimary ReplicaType = "Primary" + ReplicaTypeReadableSecondary ReplicaType = "ReadableSecondary" +) + +func PossibleValuesForReplicaType() []string { + return []string{ + string(ReplicaTypePrimary), + string(ReplicaTypeReadableSecondary), + } +} + +func (s *ReplicaType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseReplicaType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseReplicaType(input string) (*ReplicaType, error) { + vals := map[string]ReplicaType{ + "primary": ReplicaTypePrimary, + "readablesecondary": ReplicaTypeReadableSecondary, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ReplicaType(input) + return &out, nil +} + +type ServicePrincipalType string + +const ( + ServicePrincipalTypeNone ServicePrincipalType = "None" + ServicePrincipalTypeSystemAssigned ServicePrincipalType = "SystemAssigned" +) + +func PossibleValuesForServicePrincipalType() []string { + return []string{ + string(ServicePrincipalTypeNone), + string(ServicePrincipalTypeSystemAssigned), + } +} + +func (s *ServicePrincipalType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseServicePrincipalType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseServicePrincipalType(input string) (*ServicePrincipalType, error) { + vals := map[string]ServicePrincipalType{ + "none": ServicePrincipalTypeNone, + "systemassigned": ServicePrincipalTypeSystemAssigned, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ServicePrincipalType(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/id_instancepool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/id_instancepool.go new file mode 100644 index 0000000000000..c4d1f83519fdc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/id_instancepool.go @@ -0,0 +1,130 @@ +package managedinstances + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&InstancePoolId{}) +} + +var _ resourceids.ResourceId = &InstancePoolId{} + +// InstancePoolId is a struct representing the Resource ID for a Instance Pool +type InstancePoolId struct { + SubscriptionId string + ResourceGroupName string + InstancePoolName string +} + +// NewInstancePoolID returns a new InstancePoolId struct +func NewInstancePoolID(subscriptionId string, resourceGroupName string, instancePoolName string) InstancePoolId { + return InstancePoolId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + InstancePoolName: instancePoolName, + } +} + +// ParseInstancePoolID parses 'input' into a InstancePoolId +func ParseInstancePoolID(input string) (*InstancePoolId, error) { + parser := resourceids.NewParserFromResourceIdType(&InstancePoolId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := InstancePoolId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseInstancePoolIDInsensitively parses 'input' case-insensitively into a InstancePoolId +// note: this method should only be used for API response data and not user input +func ParseInstancePoolIDInsensitively(input string) (*InstancePoolId, error) { + parser := resourceids.NewParserFromResourceIdType(&InstancePoolId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := InstancePoolId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *InstancePoolId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.InstancePoolName, ok = input.Parsed["instancePoolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "instancePoolName", input) + } + + return nil +} + +// ValidateInstancePoolID checks that 'input' can be parsed as a Instance Pool ID +func ValidateInstancePoolID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseInstancePoolID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Instance Pool ID +func (id InstancePoolId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Sql/instancePools/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.InstancePoolName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Instance Pool ID +func (id InstancePoolId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftSql", "Microsoft.Sql", "Microsoft.Sql"), + resourceids.StaticSegment("staticInstancePools", "instancePools", "instancePools"), + resourceids.UserSpecifiedSegment("instancePoolName", "instancePoolValue"), + } +} + +// String returns a human-readable description of this Instance Pool ID +func (id InstancePoolId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Instance Pool Name: %q", id.InstancePoolName), + } + return fmt.Sprintf("Instance Pool (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_createorupdate.go new file mode 100644 index 0000000000000..64419f9cc8b8e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_createorupdate.go @@ -0,0 +1,77 @@ +package managedinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ManagedInstance +} + +// CreateOrUpdate ... +func (c ManagedInstancesClient) CreateOrUpdate(ctx context.Context, id commonids.SqlManagedInstanceId, input ManagedInstance) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c ManagedInstancesClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.SqlManagedInstanceId, input ManagedInstance) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_delete.go new file mode 100644 index 0000000000000..71a0c4e1c3d81 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_delete.go @@ -0,0 +1,72 @@ +package managedinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c ManagedInstancesClient) Delete(ctx context.Context, id commonids.SqlManagedInstanceId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c ManagedInstancesClient) DeleteThenPoll(ctx context.Context, id commonids.SqlManagedInstanceId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_failover.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_failover.go new file mode 100644 index 0000000000000..6a09e24ad4104 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_failover.go @@ -0,0 +1,99 @@ +package managedinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FailoverOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +type FailoverOperationOptions struct { + ReplicaType *ReplicaType +} + +func DefaultFailoverOperationOptions() FailoverOperationOptions { + return FailoverOperationOptions{} +} + +func (o FailoverOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o FailoverOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o FailoverOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.ReplicaType != nil { + out.Append("replicaType", fmt.Sprintf("%v", *o.ReplicaType)) + } + return &out +} + +// Failover ... +func (c ManagedInstancesClient) Failover(ctx context.Context, id commonids.SqlManagedInstanceId, options FailoverOperationOptions) (result FailoverOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + OptionsObject: options, + Path: fmt.Sprintf("%s/failover", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// FailoverThenPoll performs Failover then polls until it's completed +func (c ManagedInstancesClient) FailoverThenPoll(ctx context.Context, id commonids.SqlManagedInstanceId, options FailoverOperationOptions) error { + result, err := c.Failover(ctx, id, options) + if err != nil { + return fmt.Errorf("performing Failover: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Failover: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_get.go new file mode 100644 index 0000000000000..2c318ce242db6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_get.go @@ -0,0 +1,84 @@ +package managedinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ManagedInstance +} + +type GetOperationOptions struct { + Expand *string +} + +func DefaultGetOperationOptions() GetOperationOptions { + return GetOperationOptions{} +} + +func (o GetOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o GetOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o GetOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.Expand != nil { + out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) + } + return &out +} + +// Get ... +func (c ManagedInstancesClient) Get(ctx context.Context, id commonids.SqlManagedInstanceId, options GetOperationOptions) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ManagedInstance + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_list.go new file mode 100644 index 0000000000000..55f688b91aca0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_list.go @@ -0,0 +1,134 @@ +package managedinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ManagedInstance +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []ManagedInstance +} + +type ListOperationOptions struct { + Expand *string +} + +func DefaultListOperationOptions() ListOperationOptions { + return ListOperationOptions{} +} + +func (o ListOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o ListOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o ListOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.Expand != nil { + out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) + } + return &out +} + +type ListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// List ... +func (c ManagedInstancesClient) List(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Pager: &ListCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.Sql/managedInstances", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ManagedInstance `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c ManagedInstancesClient) ListComplete(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, options, ManagedInstanceOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ManagedInstancesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions, predicate ManagedInstanceOperationPredicate) (result ListCompleteResult, err error) { + items := make([]ManagedInstance, 0) + + resp, err := c.List(ctx, id, options) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_listbyinstancepool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_listbyinstancepool.go new file mode 100644 index 0000000000000..f98c7ba290146 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_listbyinstancepool.go @@ -0,0 +1,133 @@ +package managedinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByInstancePoolOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ManagedInstance +} + +type ListByInstancePoolCompleteResult struct { + LatestHttpResponse *http.Response + Items []ManagedInstance +} + +type ListByInstancePoolOperationOptions struct { + Expand *string +} + +func DefaultListByInstancePoolOperationOptions() ListByInstancePoolOperationOptions { + return ListByInstancePoolOperationOptions{} +} + +func (o ListByInstancePoolOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o ListByInstancePoolOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o ListByInstancePoolOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.Expand != nil { + out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) + } + return &out +} + +type ListByInstancePoolCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByInstancePoolCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByInstancePool ... +func (c ManagedInstancesClient) ListByInstancePool(ctx context.Context, id InstancePoolId, options ListByInstancePoolOperationOptions) (result ListByInstancePoolOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Pager: &ListByInstancePoolCustomPager{}, + Path: fmt.Sprintf("%s/managedInstances", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ManagedInstance `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByInstancePoolComplete retrieves all the results into a single object +func (c ManagedInstancesClient) ListByInstancePoolComplete(ctx context.Context, id InstancePoolId, options ListByInstancePoolOperationOptions) (ListByInstancePoolCompleteResult, error) { + return c.ListByInstancePoolCompleteMatchingPredicate(ctx, id, options, ManagedInstanceOperationPredicate{}) +} + +// ListByInstancePoolCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ManagedInstancesClient) ListByInstancePoolCompleteMatchingPredicate(ctx context.Context, id InstancePoolId, options ListByInstancePoolOperationOptions, predicate ManagedInstanceOperationPredicate) (result ListByInstancePoolCompleteResult, err error) { + items := make([]ManagedInstance, 0) + + resp, err := c.ListByInstancePool(ctx, id, options) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByInstancePoolCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_listbymanagedinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_listbymanagedinstance.go new file mode 100644 index 0000000000000..8a7c6f76675ae --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_listbymanagedinstance.go @@ -0,0 +1,158 @@ +package managedinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByManagedInstanceOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]TopQueries +} + +type ListByManagedInstanceCompleteResult struct { + LatestHttpResponse *http.Response + Items []TopQueries +} + +type ListByManagedInstanceOperationOptions struct { + AggregationFunction *AggregationFunctionType + Databases *string + EndTime *string + Interval *QueryTimeGrainType + NumberOfQueries *int64 + ObservationMetric *MetricType + StartTime *string +} + +func DefaultListByManagedInstanceOperationOptions() ListByManagedInstanceOperationOptions { + return ListByManagedInstanceOperationOptions{} +} + +func (o ListByManagedInstanceOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o ListByManagedInstanceOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o ListByManagedInstanceOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.AggregationFunction != nil { + out.Append("aggregationFunction", fmt.Sprintf("%v", *o.AggregationFunction)) + } + if o.Databases != nil { + out.Append("databases", fmt.Sprintf("%v", *o.Databases)) + } + if o.EndTime != nil { + out.Append("endTime", fmt.Sprintf("%v", *o.EndTime)) + } + if o.Interval != nil { + out.Append("interval", fmt.Sprintf("%v", *o.Interval)) + } + if o.NumberOfQueries != nil { + out.Append("numberOfQueries", fmt.Sprintf("%v", *o.NumberOfQueries)) + } + if o.ObservationMetric != nil { + out.Append("observationMetric", fmt.Sprintf("%v", *o.ObservationMetric)) + } + if o.StartTime != nil { + out.Append("startTime", fmt.Sprintf("%v", *o.StartTime)) + } + return &out +} + +type ListByManagedInstanceCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByManagedInstanceCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByManagedInstance ... +func (c ManagedInstancesClient) ListByManagedInstance(ctx context.Context, id commonids.SqlManagedInstanceId, options ListByManagedInstanceOperationOptions) (result ListByManagedInstanceOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Pager: &ListByManagedInstanceCustomPager{}, + Path: fmt.Sprintf("%s/topqueries", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]TopQueries `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByManagedInstanceComplete retrieves all the results into a single object +func (c ManagedInstancesClient) ListByManagedInstanceComplete(ctx context.Context, id commonids.SqlManagedInstanceId, options ListByManagedInstanceOperationOptions) (ListByManagedInstanceCompleteResult, error) { + return c.ListByManagedInstanceCompleteMatchingPredicate(ctx, id, options, TopQueriesOperationPredicate{}) +} + +// ListByManagedInstanceCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ManagedInstancesClient) ListByManagedInstanceCompleteMatchingPredicate(ctx context.Context, id commonids.SqlManagedInstanceId, options ListByManagedInstanceOperationOptions, predicate TopQueriesOperationPredicate) (result ListByManagedInstanceCompleteResult, err error) { + items := make([]TopQueries, 0) + + resp, err := c.ListByManagedInstance(ctx, id, options) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByManagedInstanceCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_listbyresourcegroup.go new file mode 100644 index 0000000000000..0a8a15041c2b3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_listbyresourcegroup.go @@ -0,0 +1,134 @@ +package managedinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ManagedInstance +} + +type ListByResourceGroupCompleteResult struct { + LatestHttpResponse *http.Response + Items []ManagedInstance +} + +type ListByResourceGroupOperationOptions struct { + Expand *string +} + +func DefaultListByResourceGroupOperationOptions() ListByResourceGroupOperationOptions { + return ListByResourceGroupOperationOptions{} +} + +func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o ListByResourceGroupOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.Expand != nil { + out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) + } + return &out +} + +type ListByResourceGroupCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByResourceGroup ... +func (c ManagedInstancesClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (result ListByResourceGroupOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Pager: &ListByResourceGroupCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.Sql/managedInstances", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ManagedInstance `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByResourceGroupComplete retrieves all the results into a single object +func (c ManagedInstancesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, options, ManagedInstanceOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ManagedInstancesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions, predicate ManagedInstanceOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { + items := make([]ManagedInstance, 0) + + resp, err := c.ListByResourceGroup(ctx, id, options) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByResourceGroupCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_listoutboundnetworkdependenciesbymanagedinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_listoutboundnetworkdependenciesbymanagedinstance.go new file mode 100644 index 0000000000000..e2bcb4e0daa2a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_listoutboundnetworkdependenciesbymanagedinstance.go @@ -0,0 +1,106 @@ +package managedinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOutboundNetworkDependenciesByManagedInstanceOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]OutboundEnvironmentEndpoint +} + +type ListOutboundNetworkDependenciesByManagedInstanceCompleteResult struct { + LatestHttpResponse *http.Response + Items []OutboundEnvironmentEndpoint +} + +type ListOutboundNetworkDependenciesByManagedInstanceCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListOutboundNetworkDependenciesByManagedInstanceCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListOutboundNetworkDependenciesByManagedInstance ... +func (c ManagedInstancesClient) ListOutboundNetworkDependenciesByManagedInstance(ctx context.Context, id commonids.SqlManagedInstanceId) (result ListOutboundNetworkDependenciesByManagedInstanceOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListOutboundNetworkDependenciesByManagedInstanceCustomPager{}, + Path: fmt.Sprintf("%s/outboundNetworkDependenciesEndpoints", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]OutboundEnvironmentEndpoint `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListOutboundNetworkDependenciesByManagedInstanceComplete retrieves all the results into a single object +func (c ManagedInstancesClient) ListOutboundNetworkDependenciesByManagedInstanceComplete(ctx context.Context, id commonids.SqlManagedInstanceId) (ListOutboundNetworkDependenciesByManagedInstanceCompleteResult, error) { + return c.ListOutboundNetworkDependenciesByManagedInstanceCompleteMatchingPredicate(ctx, id, OutboundEnvironmentEndpointOperationPredicate{}) +} + +// ListOutboundNetworkDependenciesByManagedInstanceCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ManagedInstancesClient) ListOutboundNetworkDependenciesByManagedInstanceCompleteMatchingPredicate(ctx context.Context, id commonids.SqlManagedInstanceId, predicate OutboundEnvironmentEndpointOperationPredicate) (result ListOutboundNetworkDependenciesByManagedInstanceCompleteResult, err error) { + items := make([]OutboundEnvironmentEndpoint, 0) + + resp, err := c.ListOutboundNetworkDependenciesByManagedInstance(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListOutboundNetworkDependenciesByManagedInstanceCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_refreshstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_refreshstatus.go new file mode 100644 index 0000000000000..77b456fd23eec --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_refreshstatus.go @@ -0,0 +1,72 @@ +package managedinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RefreshStatusOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *RefreshExternalGovernanceStatusOperationResultMI +} + +// RefreshStatus ... +func (c ManagedInstancesClient) RefreshStatus(ctx context.Context, id commonids.SqlManagedInstanceId) (result RefreshStatusOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/refreshExternalGovernanceStatus", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// RefreshStatusThenPoll performs RefreshStatus then polls until it's completed +func (c ManagedInstancesClient) RefreshStatusThenPoll(ctx context.Context, id commonids.SqlManagedInstanceId) error { + result, err := c.RefreshStatus(ctx, id) + if err != nil { + return fmt.Errorf("performing RefreshStatus: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after RefreshStatus: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_start.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_start.go new file mode 100644 index 0000000000000..0f9420be74c43 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_start.go @@ -0,0 +1,72 @@ +package managedinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StartOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ManagedInstance +} + +// Start ... +func (c ManagedInstancesClient) Start(ctx context.Context, id commonids.SqlManagedInstanceId) (result StartOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/start", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// StartThenPoll performs Start then polls until it's completed +func (c ManagedInstancesClient) StartThenPoll(ctx context.Context, id commonids.SqlManagedInstanceId) error { + result, err := c.Start(ctx, id) + if err != nil { + return fmt.Errorf("performing Start: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Start: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_stop.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_stop.go new file mode 100644 index 0000000000000..d9c3c3ae52d79 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_stop.go @@ -0,0 +1,72 @@ +package managedinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StopOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ManagedInstance +} + +// Stop ... +func (c ManagedInstancesClient) Stop(ctx context.Context, id commonids.SqlManagedInstanceId) (result StopOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/stop", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// StopThenPoll performs Stop then polls until it's completed +func (c ManagedInstancesClient) StopThenPoll(ctx context.Context, id commonids.SqlManagedInstanceId) error { + result, err := c.Stop(ctx, id) + if err != nil { + return fmt.Errorf("performing Stop: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Stop: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_update.go new file mode 100644 index 0000000000000..f2ebe4da4fd68 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/method_update.go @@ -0,0 +1,76 @@ +package managedinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ManagedInstance +} + +// Update ... +func (c ManagedInstancesClient) Update(ctx context.Context, id commonids.SqlManagedInstanceId, input ManagedInstanceUpdate) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c ManagedInstancesClient) UpdateThenPoll(ctx context.Context, id commonids.SqlManagedInstanceId, input ManagedInstanceUpdate) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_endpointdependency.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_endpointdependency.go similarity index 92% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_endpointdependency.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_endpointdependency.go index 31b9f3bfd1809..6536aa85d3f80 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_endpointdependency.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_endpointdependency.go @@ -1,4 +1,4 @@ -package diskpools +package managedinstances // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_endpointdetail.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_endpointdetail.go new file mode 100644 index 0000000000000..54168cb31cae4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_endpointdetail.go @@ -0,0 +1,8 @@ +package managedinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EndpointDetail struct { + Port *int64 `json:"port,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_managedinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_managedinstance.go new file mode 100644 index 0000000000000..c14c46bf1ff47 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_managedinstance.go @@ -0,0 +1,19 @@ +package managedinstances + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstance struct { + Id *string `json:"id,omitempty"` + Identity *identity.LegacySystemAndUserAssignedMap `json:"identity,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *ManagedInstanceProperties `json:"properties,omitempty"` + Sku *Sku `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_managedinstanceexternaladministrator.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_managedinstanceexternaladministrator.go new file mode 100644 index 0000000000000..9844de0530710 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_managedinstanceexternaladministrator.go @@ -0,0 +1,13 @@ +package managedinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceExternalAdministrator struct { + AdministratorType *AdministratorType `json:"administratorType,omitempty"` + AzureADOnlyAuthentication *bool `json:"azureADOnlyAuthentication,omitempty"` + Login *string `json:"login,omitempty"` + PrincipalType *PrincipalType `json:"principalType,omitempty"` + Sid *string `json:"sid,omitempty"` + TenantId *string `json:"tenantId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_managedinstancepecproperty.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_managedinstancepecproperty.go new file mode 100644 index 0000000000000..4e5c5ab6e59e5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_managedinstancepecproperty.go @@ -0,0 +1,9 @@ +package managedinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstancePecProperty struct { + Id *string `json:"id,omitempty"` + Properties *ManagedInstancePrivateEndpointConnectionProperties `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_managedinstanceprivateendpointconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_managedinstanceprivateendpointconnectionproperties.go new file mode 100644 index 0000000000000..6bad8545c6139 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_managedinstanceprivateendpointconnectionproperties.go @@ -0,0 +1,10 @@ +package managedinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstancePrivateEndpointConnectionProperties struct { + PrivateEndpoint *ManagedInstancePrivateEndpointProperty `json:"privateEndpoint,omitempty"` + PrivateLinkServiceConnectionState *ManagedInstancePrivateLinkServiceConnectionStateProperty `json:"privateLinkServiceConnectionState,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_managedinstanceprivateendpointproperty.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_managedinstanceprivateendpointproperty.go new file mode 100644 index 0000000000000..0f993e64d0d49 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_managedinstanceprivateendpointproperty.go @@ -0,0 +1,8 @@ +package managedinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstancePrivateEndpointProperty struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_managedinstanceprivatelinkserviceconnectionstateproperty.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_managedinstanceprivatelinkserviceconnectionstateproperty.go new file mode 100644 index 0000000000000..6c2f28784bc7c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_managedinstanceprivatelinkserviceconnectionstateproperty.go @@ -0,0 +1,10 @@ +package managedinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstancePrivateLinkServiceConnectionStateProperty struct { + ActionsRequired *string `json:"actionsRequired,omitempty"` + Description string `json:"description"` + Status string `json:"status"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_managedinstanceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_managedinstanceproperties.go new file mode 100644 index 0000000000000..e6817c5cac205 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_managedinstanceproperties.go @@ -0,0 +1,78 @@ +package managedinstances + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceProperties struct { + AdministratorLogin *string `json:"administratorLogin,omitempty"` + AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` + Administrators *ManagedInstanceExternalAdministrator `json:"administrators,omitempty"` + AuthenticationMetadata *AuthMetadataLookupModes `json:"authenticationMetadata,omitempty"` + Collation *string `json:"collation,omitempty"` + CreateTime *string `json:"createTime,omitempty"` + CurrentBackupStorageRedundancy *BackupStorageRedundancy `json:"currentBackupStorageRedundancy,omitempty"` + DatabaseFormat *ManagedInstanceDatabaseFormat `json:"databaseFormat,omitempty"` + DnsZone *string `json:"dnsZone,omitempty"` + DnsZonePartner *string `json:"dnsZonePartner,omitempty"` + ExternalGovernanceStatus *ExternalGovernanceStatus `json:"externalGovernanceStatus,omitempty"` + FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty"` + HybridSecondaryUsage *HybridSecondaryUsage `json:"hybridSecondaryUsage,omitempty"` + HybridSecondaryUsageDetected *HybridSecondaryUsageDetected `json:"hybridSecondaryUsageDetected,omitempty"` + InstancePoolId *string `json:"instancePoolId,omitempty"` + IsGeneralPurposeV2 *bool `json:"isGeneralPurposeV2,omitempty"` + KeyId *string `json:"keyId,omitempty"` + LicenseType *ManagedInstanceLicenseType `json:"licenseType,omitempty"` + MaintenanceConfigurationId *string `json:"maintenanceConfigurationId,omitempty"` + ManagedInstanceCreateMode *ManagedServerCreateMode `json:"managedInstanceCreateMode,omitempty"` + MinimalTlsVersion *string `json:"minimalTlsVersion,omitempty"` + PricingModel *FreemiumType `json:"pricingModel,omitempty"` + PrimaryUserAssignedIdentityId *string `json:"primaryUserAssignedIdentityId,omitempty"` + PrivateEndpointConnections *[]ManagedInstancePecProperty `json:"privateEndpointConnections,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + ProxyOverride *ManagedInstanceProxyOverride `json:"proxyOverride,omitempty"` + PublicDataEndpointEnabled *bool `json:"publicDataEndpointEnabled,omitempty"` + RequestedBackupStorageRedundancy *BackupStorageRedundancy `json:"requestedBackupStorageRedundancy,omitempty"` + RestorePointInTime *string `json:"restorePointInTime,omitempty"` + ServicePrincipal *ServicePrincipal `json:"servicePrincipal,omitempty"` + SourceManagedInstanceId *string `json:"sourceManagedInstanceId,omitempty"` + State *string `json:"state,omitempty"` + StorageIOps *int64 `json:"storageIOps,omitempty"` + StorageSizeInGB *int64 `json:"storageSizeInGB,omitempty"` + StorageThroughputMBps *int64 `json:"storageThroughputMBps,omitempty"` + SubnetId *string `json:"subnetId,omitempty"` + TimezoneId *string `json:"timezoneId,omitempty"` + TotalMemoryMB *int64 `json:"totalMemoryMB,omitempty"` + VCores *int64 `json:"vCores,omitempty"` + VirtualClusterId *string `json:"virtualClusterId,omitempty"` + ZoneRedundant *bool `json:"zoneRedundant,omitempty"` +} + +func (o *ManagedInstanceProperties) GetCreateTimeAsTime() (*time.Time, error) { + if o.CreateTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreateTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *ManagedInstanceProperties) SetCreateTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreateTime = &formatted +} + +func (o *ManagedInstanceProperties) GetRestorePointInTimeAsTime() (*time.Time, error) { + if o.RestorePointInTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.RestorePointInTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *ManagedInstanceProperties) SetRestorePointInTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.RestorePointInTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_managedinstanceupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_managedinstanceupdate.go new file mode 100644 index 0000000000000..715d6f5b78427 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_managedinstanceupdate.go @@ -0,0 +1,15 @@ +package managedinstances + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceUpdate struct { + Identity *identity.LegacySystemAndUserAssignedMap `json:"identity,omitempty"` + Properties *ManagedInstanceProperties `json:"properties,omitempty"` + Sku *Sku `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_outboundenvironmentendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_outboundenvironmentendpoint.go similarity index 92% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_outboundenvironmentendpoint.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_outboundenvironmentendpoint.go index 05ee3f2426836..503d29fe9f553 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_outboundenvironmentendpoint.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_outboundenvironmentendpoint.go @@ -1,4 +1,4 @@ -package diskpools +package managedinstances // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_querymetricinterval.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_querymetricinterval.go new file mode 100644 index 0000000000000..00c5e8aa6c5be --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_querymetricinterval.go @@ -0,0 +1,11 @@ +package managedinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type QueryMetricInterval struct { + ExecutionCount *int64 `json:"executionCount,omitempty"` + IntervalStartTime *string `json:"intervalStartTime,omitempty"` + IntervalType *QueryTimeGrainType `json:"intervalType,omitempty"` + Metrics *[]QueryMetricProperties `json:"metrics,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_querymetricproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_querymetricproperties.go new file mode 100644 index 0000000000000..815192375752d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_querymetricproperties.go @@ -0,0 +1,16 @@ +package managedinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type QueryMetricProperties struct { + Avg *float64 `json:"avg,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + Max *float64 `json:"max,omitempty"` + Min *float64 `json:"min,omitempty"` + Name *string `json:"name,omitempty"` + Stdev *float64 `json:"stdev,omitempty"` + Sum *float64 `json:"sum,omitempty"` + Unit *QueryMetricUnitType `json:"unit,omitempty"` + Value *float64 `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_querystatisticsproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_querystatisticsproperties.go new file mode 100644 index 0000000000000..456cf579283d7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_querystatisticsproperties.go @@ -0,0 +1,12 @@ +package managedinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type QueryStatisticsProperties struct { + DatabaseName *string `json:"databaseName,omitempty"` + EndTime *string `json:"endTime,omitempty"` + Intervals *[]QueryMetricInterval `json:"intervals,omitempty"` + QueryId *string `json:"queryId,omitempty"` + StartTime *string `json:"startTime,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_refreshexternalgovernancestatusoperationresultmi.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_refreshexternalgovernancestatusoperationresultmi.go new file mode 100644 index 0000000000000..6534ae5095da8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_refreshexternalgovernancestatusoperationresultmi.go @@ -0,0 +1,11 @@ +package managedinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RefreshExternalGovernanceStatusOperationResultMI struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *RefreshExternalGovernanceStatusOperationResultPropertiesMI `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_refreshexternalgovernancestatusoperationresultpropertiesmi.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_refreshexternalgovernancestatusoperationresultpropertiesmi.go new file mode 100644 index 0000000000000..7e14768472b71 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_refreshexternalgovernancestatusoperationresultpropertiesmi.go @@ -0,0 +1,13 @@ +package managedinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RefreshExternalGovernanceStatusOperationResultPropertiesMI struct { + ErrorMessage *string `json:"errorMessage,omitempty"` + ManagedInstanceName *string `json:"managedInstanceName,omitempty"` + QueuedTime *string `json:"queuedTime,omitempty"` + RequestId *string `json:"requestId,omitempty"` + RequestType *string `json:"requestType,omitempty"` + Status *string `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_serviceprincipal.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_serviceprincipal.go new file mode 100644 index 0000000000000..1e7a6c0788725 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_serviceprincipal.go @@ -0,0 +1,11 @@ +package managedinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServicePrincipal struct { + ClientId *string `json:"clientId,omitempty"` + PrincipalId *string `json:"principalId,omitempty"` + TenantId *string `json:"tenantId,omitempty"` + Type *ServicePrincipalType `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_sku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_sku.go new file mode 100644 index 0000000000000..3a2fcc88d159a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_sku.go @@ -0,0 +1,12 @@ +package managedinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Sku struct { + Capacity *int64 `json:"capacity,omitempty"` + Family *string `json:"family,omitempty"` + Name string `json:"name"` + Size *string `json:"size,omitempty"` + Tier *string `json:"tier,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_topqueries.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_topqueries.go new file mode 100644 index 0000000000000..ebaf9db44e321 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/model_topqueries.go @@ -0,0 +1,14 @@ +package managedinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TopQueries struct { + AggregationFunction *string `json:"aggregationFunction,omitempty"` + EndTime *string `json:"endTime,omitempty"` + IntervalType *QueryTimeGrainType `json:"intervalType,omitempty"` + NumberOfQueries *int64 `json:"numberOfQueries,omitempty"` + ObservationMetric *string `json:"observationMetric,omitempty"` + Queries *[]QueryStatisticsProperties `json:"queries,omitempty"` + StartTime *string `json:"startTime,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/predicates.go new file mode 100644 index 0000000000000..8d70aa8a0614e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/predicates.go @@ -0,0 +1,78 @@ +package managedinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p ManagedInstanceOperationPredicate) Matches(input ManagedInstance) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type OutboundEnvironmentEndpointOperationPredicate struct { + Category *string +} + +func (p OutboundEnvironmentEndpointOperationPredicate) Matches(input OutboundEnvironmentEndpoint) bool { + + if p.Category != nil && (input.Category == nil || *p.Category != *input.Category) { + return false + } + + return true +} + +type TopQueriesOperationPredicate struct { + AggregationFunction *string + EndTime *string + NumberOfQueries *int64 + ObservationMetric *string + StartTime *string +} + +func (p TopQueriesOperationPredicate) Matches(input TopQueries) bool { + + if p.AggregationFunction != nil && (input.AggregationFunction == nil || *p.AggregationFunction != *input.AggregationFunction) { + return false + } + + if p.EndTime != nil && (input.EndTime == nil || *p.EndTime != *input.EndTime) { + return false + } + + if p.NumberOfQueries != nil && (input.NumberOfQueries == nil || *p.NumberOfQueries != *input.NumberOfQueries) { + return false + } + + if p.ObservationMetric != nil && (input.ObservationMetric == nil || *p.ObservationMetric != *input.ObservationMetric) { + return false + } + + if p.StartTime != nil && (input.StartTime == nil || *p.StartTime != *input.StartTime) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/version.go new file mode 100644 index 0000000000000..7867a271c1caa --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances/version.go @@ -0,0 +1,12 @@ +package managedinstances + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstances/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/README.md new file mode 100644 index 0000000000000..93a00ceadf0e5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/README.md @@ -0,0 +1,91 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments` Documentation + +The `managedinstancevulnerabilityassessments` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments" +``` + + +### Client Initialization + +```go +client := managedinstancevulnerabilityassessments.NewManagedInstanceVulnerabilityAssessmentsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ManagedInstanceVulnerabilityAssessmentsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +payload := managedinstancevulnerabilityassessments.ManagedInstanceVulnerabilityAssessment{ + // ... +} + + +read, err := client.CreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagedInstanceVulnerabilityAssessmentsClient.Delete` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +read, err := client.Delete(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagedInstanceVulnerabilityAssessmentsClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagedInstanceVulnerabilityAssessmentsClient.ListByInstance` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +// alternatively `client.ListByInstance(ctx, id)` can be used to do batched pagination +items, err := client.ListByInstanceComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/client.go new file mode 100644 index 0000000000000..9b83141b5c63a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/client.go @@ -0,0 +1,26 @@ +package managedinstancevulnerabilityassessments + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceVulnerabilityAssessmentsClient struct { + Client *resourcemanager.Client +} + +func NewManagedInstanceVulnerabilityAssessmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceVulnerabilityAssessmentsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstancevulnerabilityassessments", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ManagedInstanceVulnerabilityAssessmentsClient: %+v", err) + } + + return &ManagedInstanceVulnerabilityAssessmentsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/method_createorupdate.go new file mode 100644 index 0000000000000..eee4d2c431873 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/method_createorupdate.go @@ -0,0 +1,61 @@ +package managedinstancevulnerabilityassessments + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ManagedInstanceVulnerabilityAssessment +} + +// CreateOrUpdate ... +func (c ManagedInstanceVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, id commonids.SqlManagedInstanceId, input ManagedInstanceVulnerabilityAssessment) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: fmt.Sprintf("%s/vulnerabilityAssessments/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ManagedInstanceVulnerabilityAssessment + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/method_delete.go new file mode 100644 index 0000000000000..2d5068178e1b4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/method_delete.go @@ -0,0 +1,48 @@ +package managedinstancevulnerabilityassessments + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c ManagedInstanceVulnerabilityAssessmentsClient) Delete(ctx context.Context, id commonids.SqlManagedInstanceId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: fmt.Sprintf("%s/vulnerabilityAssessments/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/method_get.go new file mode 100644 index 0000000000000..d5735bb6e64ac --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/method_get.go @@ -0,0 +1,56 @@ +package managedinstancevulnerabilityassessments + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ManagedInstanceVulnerabilityAssessment +} + +// Get ... +func (c ManagedInstanceVulnerabilityAssessmentsClient) Get(ctx context.Context, id commonids.SqlManagedInstanceId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/vulnerabilityAssessments/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ManagedInstanceVulnerabilityAssessment + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/method_listbyinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/method_listbyinstance.go new file mode 100644 index 0000000000000..fd8eb23fe585d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/method_listbyinstance.go @@ -0,0 +1,106 @@ +package managedinstancevulnerabilityassessments + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByInstanceOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ManagedInstanceVulnerabilityAssessment +} + +type ListByInstanceCompleteResult struct { + LatestHttpResponse *http.Response + Items []ManagedInstanceVulnerabilityAssessment +} + +type ListByInstanceCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByInstanceCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByInstance ... +func (c ManagedInstanceVulnerabilityAssessmentsClient) ListByInstance(ctx context.Context, id commonids.SqlManagedInstanceId) (result ListByInstanceOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByInstanceCustomPager{}, + Path: fmt.Sprintf("%s/vulnerabilityAssessments", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ManagedInstanceVulnerabilityAssessment `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByInstanceComplete retrieves all the results into a single object +func (c ManagedInstanceVulnerabilityAssessmentsClient) ListByInstanceComplete(ctx context.Context, id commonids.SqlManagedInstanceId) (ListByInstanceCompleteResult, error) { + return c.ListByInstanceCompleteMatchingPredicate(ctx, id, ManagedInstanceVulnerabilityAssessmentOperationPredicate{}) +} + +// ListByInstanceCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ManagedInstanceVulnerabilityAssessmentsClient) ListByInstanceCompleteMatchingPredicate(ctx context.Context, id commonids.SqlManagedInstanceId, predicate ManagedInstanceVulnerabilityAssessmentOperationPredicate) (result ListByInstanceCompleteResult, err error) { + items := make([]ManagedInstanceVulnerabilityAssessment, 0) + + resp, err := c.ListByInstance(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByInstanceCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/model_managedinstancevulnerabilityassessment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/model_managedinstancevulnerabilityassessment.go new file mode 100644 index 0000000000000..256fafc41673e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/model_managedinstancevulnerabilityassessment.go @@ -0,0 +1,11 @@ +package managedinstancevulnerabilityassessments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceVulnerabilityAssessment struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ManagedInstanceVulnerabilityAssessmentProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/model_managedinstancevulnerabilityassessmentproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/model_managedinstancevulnerabilityassessmentproperties.go new file mode 100644 index 0000000000000..1828c8de6beaf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/model_managedinstancevulnerabilityassessmentproperties.go @@ -0,0 +1,11 @@ +package managedinstancevulnerabilityassessments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceVulnerabilityAssessmentProperties struct { + RecurringScans *VulnerabilityAssessmentRecurringScansProperties `json:"recurringScans,omitempty"` + StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` + StorageContainerPath string `json:"storageContainerPath"` + StorageContainerSasKey *string `json:"storageContainerSasKey,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/model_vulnerabilityassessmentrecurringscansproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/model_vulnerabilityassessmentrecurringscansproperties.go new file mode 100644 index 0000000000000..0acb2f6c20f89 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/model_vulnerabilityassessmentrecurringscansproperties.go @@ -0,0 +1,10 @@ +package managedinstancevulnerabilityassessments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VulnerabilityAssessmentRecurringScansProperties struct { + EmailSubscriptionAdmins *bool `json:"emailSubscriptionAdmins,omitempty"` + Emails *[]string `json:"emails,omitempty"` + IsEnabled *bool `json:"isEnabled,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/predicates.go new file mode 100644 index 0000000000000..74c244d547967 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/predicates.go @@ -0,0 +1,27 @@ +package managedinstancevulnerabilityassessments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedInstanceVulnerabilityAssessmentOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p ManagedInstanceVulnerabilityAssessmentOperationPredicate) Matches(input ManagedInstanceVulnerabilityAssessment) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/version.go new file mode 100644 index 0000000000000..889c9475c5912 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/version.go @@ -0,0 +1,12 @@ +package managedinstancevulnerabilityassessments + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstancevulnerabilityassessments/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/README.md new file mode 100644 index 0000000000000..746017e061583 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/README.md @@ -0,0 +1,71 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies` Documentation + +The `managedserversecurityalertpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies" +``` + + +### Client Initialization + +```go +client := managedserversecurityalertpolicies.NewManagedServerSecurityAlertPoliciesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ManagedServerSecurityAlertPoliciesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +payload := managedserversecurityalertpolicies.ManagedServerSecurityAlertPolicy{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ManagedServerSecurityAlertPoliciesClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ManagedServerSecurityAlertPoliciesClient.ListByInstance` + +```go +ctx := context.TODO() +id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue") + +// alternatively `client.ListByInstance(ctx, id)` can be used to do batched pagination +items, err := client.ListByInstanceComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/client.go new file mode 100644 index 0000000000000..9c1b65773ae7a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/client.go @@ -0,0 +1,26 @@ +package managedserversecurityalertpolicies + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedServerSecurityAlertPoliciesClient struct { + Client *resourcemanager.Client +} + +func NewManagedServerSecurityAlertPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedServerSecurityAlertPoliciesClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedserversecurityalertpolicies", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ManagedServerSecurityAlertPoliciesClient: %+v", err) + } + + return &ManagedServerSecurityAlertPoliciesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/constants.go new file mode 100644 index 0000000000000..7c52e21af30e0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/constants.go @@ -0,0 +1,51 @@ +package managedserversecurityalertpolicies + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecurityAlertsPolicyState string + +const ( + SecurityAlertsPolicyStateDisabled SecurityAlertsPolicyState = "Disabled" + SecurityAlertsPolicyStateEnabled SecurityAlertsPolicyState = "Enabled" +) + +func PossibleValuesForSecurityAlertsPolicyState() []string { + return []string{ + string(SecurityAlertsPolicyStateDisabled), + string(SecurityAlertsPolicyStateEnabled), + } +} + +func (s *SecurityAlertsPolicyState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSecurityAlertsPolicyState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSecurityAlertsPolicyState(input string) (*SecurityAlertsPolicyState, error) { + vals := map[string]SecurityAlertsPolicyState{ + "disabled": SecurityAlertsPolicyStateDisabled, + "enabled": SecurityAlertsPolicyStateEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SecurityAlertsPolicyState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/method_createorupdate.go new file mode 100644 index 0000000000000..57aee00323187 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/method_createorupdate.go @@ -0,0 +1,76 @@ +package managedserversecurityalertpolicies + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ManagedServerSecurityAlertPolicy +} + +// CreateOrUpdate ... +func (c ManagedServerSecurityAlertPoliciesClient) CreateOrUpdate(ctx context.Context, id commonids.SqlManagedInstanceId, input ManagedServerSecurityAlertPolicy) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: fmt.Sprintf("%s/securityAlertPolicies/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c ManagedServerSecurityAlertPoliciesClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.SqlManagedInstanceId, input ManagedServerSecurityAlertPolicy) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/method_get.go new file mode 100644 index 0000000000000..fb823b5204147 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/method_get.go @@ -0,0 +1,56 @@ +package managedserversecurityalertpolicies + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ManagedServerSecurityAlertPolicy +} + +// Get ... +func (c ManagedServerSecurityAlertPoliciesClient) Get(ctx context.Context, id commonids.SqlManagedInstanceId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/securityAlertPolicies/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ManagedServerSecurityAlertPolicy + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/method_listbyinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/method_listbyinstance.go new file mode 100644 index 0000000000000..d0588ca068fe5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/method_listbyinstance.go @@ -0,0 +1,106 @@ +package managedserversecurityalertpolicies + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByInstanceOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ManagedServerSecurityAlertPolicy +} + +type ListByInstanceCompleteResult struct { + LatestHttpResponse *http.Response + Items []ManagedServerSecurityAlertPolicy +} + +type ListByInstanceCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByInstanceCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByInstance ... +func (c ManagedServerSecurityAlertPoliciesClient) ListByInstance(ctx context.Context, id commonids.SqlManagedInstanceId) (result ListByInstanceOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByInstanceCustomPager{}, + Path: fmt.Sprintf("%s/securityAlertPolicies", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ManagedServerSecurityAlertPolicy `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByInstanceComplete retrieves all the results into a single object +func (c ManagedServerSecurityAlertPoliciesClient) ListByInstanceComplete(ctx context.Context, id commonids.SqlManagedInstanceId) (ListByInstanceCompleteResult, error) { + return c.ListByInstanceCompleteMatchingPredicate(ctx, id, ManagedServerSecurityAlertPolicyOperationPredicate{}) +} + +// ListByInstanceCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ManagedServerSecurityAlertPoliciesClient) ListByInstanceCompleteMatchingPredicate(ctx context.Context, id commonids.SqlManagedInstanceId, predicate ManagedServerSecurityAlertPolicyOperationPredicate) (result ListByInstanceCompleteResult, err error) { + items := make([]ManagedServerSecurityAlertPolicy, 0) + + resp, err := c.ListByInstance(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByInstanceCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/model_managedserversecurityalertpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/model_managedserversecurityalertpolicy.go new file mode 100644 index 0000000000000..a3a3c5f4524e2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/model_managedserversecurityalertpolicy.go @@ -0,0 +1,16 @@ +package managedserversecurityalertpolicies + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedServerSecurityAlertPolicy struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *SecurityAlertsPolicyProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/model_securityalertspolicyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/model_securityalertspolicyproperties.go new file mode 100644 index 0000000000000..7dc643f69f00e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/model_securityalertspolicyproperties.go @@ -0,0 +1,33 @@ +package managedserversecurityalertpolicies + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecurityAlertsPolicyProperties struct { + CreationTime *string `json:"creationTime,omitempty"` + DisabledAlerts *[]string `json:"disabledAlerts,omitempty"` + EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty"` + EmailAddresses *[]string `json:"emailAddresses,omitempty"` + RetentionDays *int64 `json:"retentionDays,omitempty"` + State SecurityAlertsPolicyState `json:"state"` + StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` + StorageEndpoint *string `json:"storageEndpoint,omitempty"` +} + +func (o *SecurityAlertsPolicyProperties) GetCreationTimeAsTime() (*time.Time, error) { + if o.CreationTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreationTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *SecurityAlertsPolicyProperties) SetCreationTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreationTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/predicates.go new file mode 100644 index 0000000000000..c7d46c58a0f1f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/predicates.go @@ -0,0 +1,27 @@ +package managedserversecurityalertpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedServerSecurityAlertPolicyOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p ManagedServerSecurityAlertPolicyOperationPredicate) Matches(input ManagedServerSecurityAlertPolicy) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/version.go new file mode 100644 index 0000000000000..56787f9ddb9ff --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/version.go @@ -0,0 +1,12 @@ +package managedserversecurityalertpolicies + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/managedserversecurityalertpolicies/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/README.md new file mode 100644 index 0000000000000..cd56841830ff4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/README.md @@ -0,0 +1,78 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules` Documentation + +The `outboundfirewallrules` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules" +``` + + +### Client Initialization + +```go +client := outboundfirewallrules.NewOutboundFirewallRulesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `OutboundFirewallRulesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := outboundfirewallrules.NewOutboundFirewallRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "outboundFirewallRuleValue") + +if err := client.CreateOrUpdateThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `OutboundFirewallRulesClient.Delete` + +```go +ctx := context.TODO() +id := outboundfirewallrules.NewOutboundFirewallRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "outboundFirewallRuleValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `OutboundFirewallRulesClient.Get` + +```go +ctx := context.TODO() +id := outboundfirewallrules.NewOutboundFirewallRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "outboundFirewallRuleValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `OutboundFirewallRulesClient.ListByServer` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination +items, err := client.ListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/client.go new file mode 100644 index 0000000000000..785040374ca1e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/client.go @@ -0,0 +1,26 @@ +package outboundfirewallrules + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OutboundFirewallRulesClient struct { + Client *resourcemanager.Client +} + +func NewOutboundFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*OutboundFirewallRulesClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "outboundfirewallrules", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating OutboundFirewallRulesClient: %+v", err) + } + + return &OutboundFirewallRulesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/id_outboundfirewallrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/id_outboundfirewallrule.go new file mode 100644 index 0000000000000..98acb0e9aa717 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/id_outboundfirewallrule.go @@ -0,0 +1,139 @@ +package outboundfirewallrules + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&OutboundFirewallRuleId{}) +} + +var _ resourceids.ResourceId = &OutboundFirewallRuleId{} + +// OutboundFirewallRuleId is a struct representing the Resource ID for a Outbound Firewall Rule +type OutboundFirewallRuleId struct { + SubscriptionId string + ResourceGroupName string + ServerName string + OutboundFirewallRuleName string +} + +// NewOutboundFirewallRuleID returns a new OutboundFirewallRuleId struct +func NewOutboundFirewallRuleID(subscriptionId string, resourceGroupName string, serverName string, outboundFirewallRuleName string) OutboundFirewallRuleId { + return OutboundFirewallRuleId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ServerName: serverName, + OutboundFirewallRuleName: outboundFirewallRuleName, + } +} + +// ParseOutboundFirewallRuleID parses 'input' into a OutboundFirewallRuleId +func ParseOutboundFirewallRuleID(input string) (*OutboundFirewallRuleId, error) { + parser := resourceids.NewParserFromResourceIdType(&OutboundFirewallRuleId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := OutboundFirewallRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseOutboundFirewallRuleIDInsensitively parses 'input' case-insensitively into a OutboundFirewallRuleId +// note: this method should only be used for API response data and not user input +func ParseOutboundFirewallRuleIDInsensitively(input string) (*OutboundFirewallRuleId, error) { + parser := resourceids.NewParserFromResourceIdType(&OutboundFirewallRuleId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := OutboundFirewallRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *OutboundFirewallRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) + } + + if id.OutboundFirewallRuleName, ok = input.Parsed["outboundFirewallRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "outboundFirewallRuleName", input) + } + + return nil +} + +// ValidateOutboundFirewallRuleID checks that 'input' can be parsed as a Outbound Firewall Rule ID +func ValidateOutboundFirewallRuleID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseOutboundFirewallRuleID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Outbound Firewall Rule ID +func (id OutboundFirewallRuleId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Sql/servers/%s/outboundFirewallRules/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServerName, id.OutboundFirewallRuleName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Outbound Firewall Rule ID +func (id OutboundFirewallRuleId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftSql", "Microsoft.Sql", "Microsoft.Sql"), + resourceids.StaticSegment("staticServers", "servers", "servers"), + resourceids.UserSpecifiedSegment("serverName", "serverValue"), + resourceids.StaticSegment("staticOutboundFirewallRules", "outboundFirewallRules", "outboundFirewallRules"), + resourceids.UserSpecifiedSegment("outboundFirewallRuleName", "outboundFirewallRuleValue"), + } +} + +// String returns a human-readable description of this Outbound Firewall Rule ID +func (id OutboundFirewallRuleId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Server Name: %q", id.ServerName), + fmt.Sprintf("Outbound Firewall Rule Name: %q", id.OutboundFirewallRuleName), + } + return fmt.Sprintf("Outbound Firewall Rule (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/method_createorupdate.go new file mode 100644 index 0000000000000..e1d895e1d0912 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/method_createorupdate.go @@ -0,0 +1,72 @@ +package outboundfirewallrules + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *OutboundFirewallRule +} + +// CreateOrUpdate ... +func (c OutboundFirewallRulesClient) CreateOrUpdate(ctx context.Context, id OutboundFirewallRuleId) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c OutboundFirewallRulesClient) CreateOrUpdateThenPoll(ctx context.Context, id OutboundFirewallRuleId) error { + result, err := c.CreateOrUpdate(ctx, id) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/method_delete.go new file mode 100644 index 0000000000000..898eab96d2f6e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/method_delete.go @@ -0,0 +1,71 @@ +package outboundfirewallrules + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c OutboundFirewallRulesClient) Delete(ctx context.Context, id OutboundFirewallRuleId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c OutboundFirewallRulesClient) DeleteThenPoll(ctx context.Context, id OutboundFirewallRuleId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/method_get.go new file mode 100644 index 0000000000000..beb1537e220b3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/method_get.go @@ -0,0 +1,54 @@ +package outboundfirewallrules + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *OutboundFirewallRule +} + +// Get ... +func (c OutboundFirewallRulesClient) Get(ctx context.Context, id OutboundFirewallRuleId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model OutboundFirewallRule + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/method_listbyserver.go new file mode 100644 index 0000000000000..41445efebec8d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/method_listbyserver.go @@ -0,0 +1,106 @@ +package outboundfirewallrules + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByServerOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]OutboundFirewallRule +} + +type ListByServerCompleteResult struct { + LatestHttpResponse *http.Response + Items []OutboundFirewallRule +} + +type ListByServerCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByServerCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByServer ... +func (c OutboundFirewallRulesClient) ListByServer(ctx context.Context, id commonids.SqlServerId) (result ListByServerOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByServerCustomPager{}, + Path: fmt.Sprintf("%s/outboundFirewallRules", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]OutboundFirewallRule `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByServerComplete retrieves all the results into a single object +func (c OutboundFirewallRulesClient) ListByServerComplete(ctx context.Context, id commonids.SqlServerId) (ListByServerCompleteResult, error) { + return c.ListByServerCompleteMatchingPredicate(ctx, id, OutboundFirewallRuleOperationPredicate{}) +} + +// ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c OutboundFirewallRulesClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id commonids.SqlServerId, predicate OutboundFirewallRuleOperationPredicate) (result ListByServerCompleteResult, err error) { + items := make([]OutboundFirewallRule, 0) + + resp, err := c.ListByServer(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByServerCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/model_outboundfirewallrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/model_outboundfirewallrule.go new file mode 100644 index 0000000000000..f1befbd713bfe --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/model_outboundfirewallrule.go @@ -0,0 +1,11 @@ +package outboundfirewallrules + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OutboundFirewallRule struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *OutboundFirewallRuleProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/model_outboundfirewallruleproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/model_outboundfirewallruleproperties.go new file mode 100644 index 0000000000000..22615651f94d6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/model_outboundfirewallruleproperties.go @@ -0,0 +1,8 @@ +package outboundfirewallrules + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OutboundFirewallRuleProperties struct { + ProvisioningState *string `json:"provisioningState,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/predicates.go new file mode 100644 index 0000000000000..9d87029d13c40 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/predicates.go @@ -0,0 +1,27 @@ +package outboundfirewallrules + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OutboundFirewallRuleOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p OutboundFirewallRuleOperationPredicate) Matches(input OutboundFirewallRule) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/version.go new file mode 100644 index 0000000000000..5947ff5151efe --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/version.go @@ -0,0 +1,12 @@ +package outboundfirewallrules + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/outboundfirewallrules/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/README.md new file mode 100644 index 0000000000000..f53e6b1061d67 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/README.md @@ -0,0 +1,141 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks` Documentation + +The `replicationlinks` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks" +``` + + +### Client Initialization + +```go +client := replicationlinks.NewReplicationLinksClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ReplicationLinksClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := replicationlinks.NewReplicationLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "linkIdValue") + +payload := replicationlinks.ReplicationLink{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationLinksClient.Delete` + +```go +ctx := context.TODO() +id := replicationlinks.NewReplicationLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "linkIdValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationLinksClient.Failover` + +```go +ctx := context.TODO() +id := replicationlinks.NewReplicationLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "linkIdValue") + +if err := client.FailoverThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationLinksClient.FailoverAllowDataLoss` + +```go +ctx := context.TODO() +id := replicationlinks.NewReplicationLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "linkIdValue") + +if err := client.FailoverAllowDataLossThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ReplicationLinksClient.Get` + +```go +ctx := context.TODO() +id := replicationlinks.NewReplicationLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "linkIdValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ReplicationLinksClient.ListByDatabase` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +// alternatively `client.ListByDatabase(ctx, id)` can be used to do batched pagination +items, err := client.ListByDatabaseComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ReplicationLinksClient.ListByServer` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination +items, err := client.ListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ReplicationLinksClient.Update` + +```go +ctx := context.TODO() +id := replicationlinks.NewReplicationLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "linkIdValue") + +payload := replicationlinks.ReplicationLinkUpdate{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/id_replicationlink.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/id_replicationlink.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/id_replicationlink.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/id_replicationlink.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/method_createorupdate.go new file mode 100644 index 0000000000000..b24ffacde8754 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/method_createorupdate.go @@ -0,0 +1,75 @@ +package replicationlinks + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ReplicationLink +} + +// CreateOrUpdate ... +func (c ReplicationLinksClient) CreateOrUpdate(ctx context.Context, id ReplicationLinkId, input ReplicationLink) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c ReplicationLinksClient) CreateOrUpdateThenPoll(ctx context.Context, id ReplicationLinkId, input ReplicationLink) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/method_failover.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/method_failover.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/method_failover.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/method_failover.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/method_failoverallowdataloss.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/method_failoverallowdataloss.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/method_failoverallowdataloss.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/method_failoverallowdataloss.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/method_listbydatabase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/method_listbydatabase.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/method_listbydatabase.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/method_listbydatabase.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/method_listbyserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/method_listbyserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/method_listbyserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/method_update.go new file mode 100644 index 0000000000000..bafe58d3ae55a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/method_update.go @@ -0,0 +1,75 @@ +package replicationlinks + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ReplicationLink +} + +// Update ... +func (c ReplicationLinksClient) Update(ctx context.Context, id ReplicationLinkId, input ReplicationLinkUpdate) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c ReplicationLinksClient) UpdateThenPoll(ctx context.Context, id ReplicationLinkId, input ReplicationLinkUpdate) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/model_replicationlink.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/model_replicationlink.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/model_replicationlink.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/model_replicationlink.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/model_replicationlinkproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/model_replicationlinkproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/model_replicationlinkproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/model_replicationlinkproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/model_replicationlinkupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/model_replicationlinkupdate.go new file mode 100644 index 0000000000000..c7a8d228e4505 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/model_replicationlinkupdate.go @@ -0,0 +1,11 @@ +package replicationlinks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ReplicationLinkUpdate struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ReplicationLinkUpdateProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/model_replicationlinkupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/model_replicationlinkupdateproperties.go new file mode 100644 index 0000000000000..3ecdf96347f1d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/model_replicationlinkupdateproperties.go @@ -0,0 +1,8 @@ +package replicationlinks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ReplicationLinkUpdateProperties struct { + LinkType *ReplicationLinkType `json:"linkType,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/version.go new file mode 100644 index 0000000000000..d88b66b94264e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks/version.go @@ -0,0 +1,12 @@ +package replicationlinks + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/replicationlinks/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/README.md new file mode 100644 index 0000000000000..2928bac0a38b9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/README.md @@ -0,0 +1,54 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases` Documentation + +The `restorabledroppeddatabases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases" +``` + + +### Client Initialization + +```go +client := restorabledroppeddatabases.NewRestorableDroppedDatabasesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `RestorableDroppedDatabasesClient.Get` + +```go +ctx := context.TODO() +id := restorabledroppeddatabases.NewRestorableDroppedDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "restorableDroppedDatabaseIdValue") + +read, err := client.Get(ctx, id, restorabledroppeddatabases.DefaultGetOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `RestorableDroppedDatabasesClient.ListByServer` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination +items, err := client.ListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/id_restorabledroppeddatabase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/id_restorabledroppeddatabase.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/id_restorabledroppeddatabase.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/id_restorabledroppeddatabase.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/method_listbyserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/method_listbyserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/method_listbyserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/model_databasekey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/model_databasekey.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/model_databasekey.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/model_databasekey.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/model_restorabledroppeddatabase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/model_restorabledroppeddatabase.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/model_restorabledroppeddatabase.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/model_restorabledroppeddatabase.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/model_restorabledroppeddatabaseproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/model_restorabledroppeddatabaseproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/model_restorabledroppeddatabaseproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/model_restorabledroppeddatabaseproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/model_sku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/model_sku.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/model_sku.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/model_sku.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/version.go new file mode 100644 index 0000000000000..64c066a604106 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/version.go @@ -0,0 +1,12 @@ +package restorabledroppeddatabases + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/restorabledroppeddatabases/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/README.md new file mode 100644 index 0000000000000..b8b42cd81e826 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/README.md @@ -0,0 +1,83 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators` Documentation + +The `serverazureadadministrators` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators" +``` + + +### Client Initialization + +```go +client := serverazureadadministrators.NewServerAzureADAdministratorsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ServerAzureADAdministratorsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +payload := serverazureadadministrators.ServerAzureADAdministrator{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ServerAzureADAdministratorsClient.Delete` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ServerAzureADAdministratorsClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ServerAzureADAdministratorsClient.ListByServer` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination +items, err := client.ListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/method_listbyserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/method_listbyserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/method_listbyserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/model_administratorproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/model_administratorproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/model_administratorproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/model_administratorproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/model_serverazureadadministrator.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/model_serverazureadadministrator.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/model_serverazureadadministrator.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/model_serverazureadadministrator.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/version.go new file mode 100644 index 0000000000000..fb1d3ff2173b8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/version.go @@ -0,0 +1,12 @@ +package serverazureadadministrators + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/serverazureadadministrators/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/README.md new file mode 100644 index 0000000000000..aee7e7b057526 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/README.md @@ -0,0 +1,83 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications` Documentation + +The `serverazureadonlyauthentications` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications" +``` + + +### Client Initialization + +```go +client := serverazureadonlyauthentications.NewServerAzureADOnlyAuthenticationsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ServerAzureADOnlyAuthenticationsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +payload := serverazureadonlyauthentications.ServerAzureADOnlyAuthentication{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ServerAzureADOnlyAuthenticationsClient.Delete` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ServerAzureADOnlyAuthenticationsClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ServerAzureADOnlyAuthenticationsClient.ListByServer` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination +items, err := client.ListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/method_listbyserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/method_listbyserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/method_listbyserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/model_azureadonlyauthproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/model_azureadonlyauthproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/model_azureadonlyauthproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/model_azureadonlyauthproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/model_serverazureadonlyauthentication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/model_serverazureadonlyauthentication.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/model_serverazureadonlyauthentication.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/model_serverazureadonlyauthentication.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/version.go new file mode 100644 index 0000000000000..a8c41d733c25a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/version.go @@ -0,0 +1,12 @@ +package serverazureadonlyauthentications + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/serverazureadonlyauthentications/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/README.md new file mode 100644 index 0000000000000..82d13df82b027 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/README.md @@ -0,0 +1,71 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies` Documentation + +The `serverconnectionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies" +``` + + +### Client Initialization + +```go +client := serverconnectionpolicies.NewServerConnectionPoliciesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ServerConnectionPoliciesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +payload := serverconnectionpolicies.ServerConnectionPolicy{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ServerConnectionPoliciesClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ServerConnectionPoliciesClient.ListByServer` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination +items, err := client.ListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/method_listbyserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/method_listbyserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/method_listbyserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/model_serverconnectionpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/model_serverconnectionpolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/model_serverconnectionpolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/model_serverconnectionpolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/model_serverconnectionpolicyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/model_serverconnectionpolicyproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/model_serverconnectionpolicyproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/model_serverconnectionpolicyproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/version.go new file mode 100644 index 0000000000000..74fe1fd901499 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/version.go @@ -0,0 +1,12 @@ +package serverconnectionpolicies + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/serverconnectionpolicies/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/README.md new file mode 100644 index 0000000000000..741937c83ad3d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/README.md @@ -0,0 +1,71 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit` Documentation + +The `serverdevopsaudit` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit" +``` + + +### Client Initialization + +```go +client := serverdevopsaudit.NewServerDevOpsAuditClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ServerDevOpsAuditClient.SettingsCreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +payload := serverdevopsaudit.ServerDevOpsAuditingSettings{ + // ... +} + + +if err := client.SettingsCreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ServerDevOpsAuditClient.SettingsGet` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +read, err := client.SettingsGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ServerDevOpsAuditClient.SettingsListByServer` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +// alternatively `client.SettingsListByServer(ctx, id)` can be used to do batched pagination +items, err := client.SettingsListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/client.go new file mode 100644 index 0000000000000..535c6daec99fa --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/client.go @@ -0,0 +1,26 @@ +package serverdevopsaudit + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerDevOpsAuditClient struct { + Client *resourcemanager.Client +} + +func NewServerDevOpsAuditClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerDevOpsAuditClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverdevopsaudit", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ServerDevOpsAuditClient: %+v", err) + } + + return &ServerDevOpsAuditClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/constants.go new file mode 100644 index 0000000000000..12a7c65bebfdf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/constants.go @@ -0,0 +1,51 @@ +package serverdevopsaudit + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BlobAuditingPolicyState string + +const ( + BlobAuditingPolicyStateDisabled BlobAuditingPolicyState = "Disabled" + BlobAuditingPolicyStateEnabled BlobAuditingPolicyState = "Enabled" +) + +func PossibleValuesForBlobAuditingPolicyState() []string { + return []string{ + string(BlobAuditingPolicyStateDisabled), + string(BlobAuditingPolicyStateEnabled), + } +} + +func (s *BlobAuditingPolicyState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseBlobAuditingPolicyState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseBlobAuditingPolicyState(input string) (*BlobAuditingPolicyState, error) { + vals := map[string]BlobAuditingPolicyState{ + "disabled": BlobAuditingPolicyStateDisabled, + "enabled": BlobAuditingPolicyStateEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := BlobAuditingPolicyState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/method_settingscreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/method_settingscreateorupdate.go new file mode 100644 index 0000000000000..7d3029ef8ed89 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/method_settingscreateorupdate.go @@ -0,0 +1,76 @@ +package serverdevopsaudit + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SettingsCreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ServerDevOpsAuditingSettings +} + +// SettingsCreateOrUpdate ... +func (c ServerDevOpsAuditClient) SettingsCreateOrUpdate(ctx context.Context, id commonids.SqlServerId, input ServerDevOpsAuditingSettings) (result SettingsCreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: fmt.Sprintf("%s/devOpsAuditingSettings/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// SettingsCreateOrUpdateThenPoll performs SettingsCreateOrUpdate then polls until it's completed +func (c ServerDevOpsAuditClient) SettingsCreateOrUpdateThenPoll(ctx context.Context, id commonids.SqlServerId, input ServerDevOpsAuditingSettings) error { + result, err := c.SettingsCreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing SettingsCreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after SettingsCreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/method_settingsget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/method_settingsget.go new file mode 100644 index 0000000000000..47e850924e2ca --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/method_settingsget.go @@ -0,0 +1,56 @@ +package serverdevopsaudit + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SettingsGetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ServerDevOpsAuditingSettings +} + +// SettingsGet ... +func (c ServerDevOpsAuditClient) SettingsGet(ctx context.Context, id commonids.SqlServerId) (result SettingsGetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/devOpsAuditingSettings/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ServerDevOpsAuditingSettings + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/method_settingslistbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/method_settingslistbyserver.go new file mode 100644 index 0000000000000..39e50f7940a4d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/method_settingslistbyserver.go @@ -0,0 +1,106 @@ +package serverdevopsaudit + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SettingsListByServerOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ServerDevOpsAuditingSettings +} + +type SettingsListByServerCompleteResult struct { + LatestHttpResponse *http.Response + Items []ServerDevOpsAuditingSettings +} + +type SettingsListByServerCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *SettingsListByServerCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// SettingsListByServer ... +func (c ServerDevOpsAuditClient) SettingsListByServer(ctx context.Context, id commonids.SqlServerId) (result SettingsListByServerOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &SettingsListByServerCustomPager{}, + Path: fmt.Sprintf("%s/devOpsAuditingSettings", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ServerDevOpsAuditingSettings `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// SettingsListByServerComplete retrieves all the results into a single object +func (c ServerDevOpsAuditClient) SettingsListByServerComplete(ctx context.Context, id commonids.SqlServerId) (SettingsListByServerCompleteResult, error) { + return c.SettingsListByServerCompleteMatchingPredicate(ctx, id, ServerDevOpsAuditingSettingsOperationPredicate{}) +} + +// SettingsListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ServerDevOpsAuditClient) SettingsListByServerCompleteMatchingPredicate(ctx context.Context, id commonids.SqlServerId, predicate ServerDevOpsAuditingSettingsOperationPredicate) (result SettingsListByServerCompleteResult, err error) { + items := make([]ServerDevOpsAuditingSettings, 0) + + resp, err := c.SettingsListByServer(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = SettingsListByServerCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/model_serverdevopsauditingsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/model_serverdevopsauditingsettings.go new file mode 100644 index 0000000000000..c62032b1adc77 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/model_serverdevopsauditingsettings.go @@ -0,0 +1,16 @@ +package serverdevopsaudit + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerDevOpsAuditingSettings struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ServerDevOpsAuditSettingsProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/model_serverdevopsauditsettingsproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/model_serverdevopsauditsettingsproperties.go new file mode 100644 index 0000000000000..bfed39b175bb2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/model_serverdevopsauditsettingsproperties.go @@ -0,0 +1,13 @@ +package serverdevopsaudit + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerDevOpsAuditSettingsProperties struct { + IsAzureMonitorTargetEnabled *bool `json:"isAzureMonitorTargetEnabled,omitempty"` + IsManagedIdentityInUse *bool `json:"isManagedIdentityInUse,omitempty"` + State BlobAuditingPolicyState `json:"state"` + StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` + StorageAccountSubscriptionId *string `json:"storageAccountSubscriptionId,omitempty"` + StorageEndpoint *string `json:"storageEndpoint,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/predicates.go new file mode 100644 index 0000000000000..249e3853d29d8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/predicates.go @@ -0,0 +1,27 @@ +package serverdevopsaudit + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerDevOpsAuditingSettingsOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p ServerDevOpsAuditingSettingsOperationPredicate) Matches(input ServerDevOpsAuditingSettings) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/version.go new file mode 100644 index 0000000000000..bd0493f4a08af --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/version.go @@ -0,0 +1,12 @@ +package serverdevopsaudit + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/serverdevopsaudit/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/README.md new file mode 100644 index 0000000000000..c16ab0ca89421 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/README.md @@ -0,0 +1,95 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases` Documentation + +The `serverdnsaliases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases" +``` + + +### Client Initialization + +```go +client := serverdnsaliases.NewServerDnsAliasesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ServerDnsAliasesClient.Acquire` + +```go +ctx := context.TODO() +id := serverdnsaliases.NewDnsAliasID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "dnsAliasValue") + +payload := serverdnsaliases.ServerDnsAliasAcquisition{ + // ... +} + + +if err := client.AcquireThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ServerDnsAliasesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := serverdnsaliases.NewDnsAliasID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "dnsAliasValue") + +if err := client.CreateOrUpdateThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ServerDnsAliasesClient.Delete` + +```go +ctx := context.TODO() +id := serverdnsaliases.NewDnsAliasID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "dnsAliasValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ServerDnsAliasesClient.Get` + +```go +ctx := context.TODO() +id := serverdnsaliases.NewDnsAliasID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "dnsAliasValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ServerDnsAliasesClient.ListByServer` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination +items, err := client.ListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/client.go new file mode 100644 index 0000000000000..f8e554ac6f05c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/client.go @@ -0,0 +1,26 @@ +package serverdnsaliases + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerDnsAliasesClient struct { + Client *resourcemanager.Client +} + +func NewServerDnsAliasesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerDnsAliasesClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverdnsaliases", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ServerDnsAliasesClient: %+v", err) + } + + return &ServerDnsAliasesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/id_dnsalias.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/id_dnsalias.go new file mode 100644 index 0000000000000..89703b594cdbd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/id_dnsalias.go @@ -0,0 +1,139 @@ +package serverdnsaliases + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&DnsAliasId{}) +} + +var _ resourceids.ResourceId = &DnsAliasId{} + +// DnsAliasId is a struct representing the Resource ID for a Dns Alias +type DnsAliasId struct { + SubscriptionId string + ResourceGroupName string + ServerName string + DnsAliasName string +} + +// NewDnsAliasID returns a new DnsAliasId struct +func NewDnsAliasID(subscriptionId string, resourceGroupName string, serverName string, dnsAliasName string) DnsAliasId { + return DnsAliasId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ServerName: serverName, + DnsAliasName: dnsAliasName, + } +} + +// ParseDnsAliasID parses 'input' into a DnsAliasId +func ParseDnsAliasID(input string) (*DnsAliasId, error) { + parser := resourceids.NewParserFromResourceIdType(&DnsAliasId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := DnsAliasId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseDnsAliasIDInsensitively parses 'input' case-insensitively into a DnsAliasId +// note: this method should only be used for API response data and not user input +func ParseDnsAliasIDInsensitively(input string) (*DnsAliasId, error) { + parser := resourceids.NewParserFromResourceIdType(&DnsAliasId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := DnsAliasId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DnsAliasId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) + } + + if id.DnsAliasName, ok = input.Parsed["dnsAliasName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dnsAliasName", input) + } + + return nil +} + +// ValidateDnsAliasID checks that 'input' can be parsed as a Dns Alias ID +func ValidateDnsAliasID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseDnsAliasID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Dns Alias ID +func (id DnsAliasId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Sql/servers/%s/dnsAliases/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServerName, id.DnsAliasName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Dns Alias ID +func (id DnsAliasId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftSql", "Microsoft.Sql", "Microsoft.Sql"), + resourceids.StaticSegment("staticServers", "servers", "servers"), + resourceids.UserSpecifiedSegment("serverName", "serverValue"), + resourceids.StaticSegment("staticDnsAliases", "dnsAliases", "dnsAliases"), + resourceids.UserSpecifiedSegment("dnsAliasName", "dnsAliasValue"), + } +} + +// String returns a human-readable description of this Dns Alias ID +func (id DnsAliasId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Server Name: %q", id.ServerName), + fmt.Sprintf("Dns Alias Name: %q", id.DnsAliasName), + } + return fmt.Sprintf("Dns Alias (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/method_acquire.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/method_acquire.go new file mode 100644 index 0000000000000..eb2da929734d4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/method_acquire.go @@ -0,0 +1,75 @@ +package serverdnsaliases + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AcquireOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ServerDnsAlias +} + +// Acquire ... +func (c ServerDnsAliasesClient) Acquire(ctx context.Context, id DnsAliasId, input ServerDnsAliasAcquisition) (result AcquireOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/acquire", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// AcquireThenPoll performs Acquire then polls until it's completed +func (c ServerDnsAliasesClient) AcquireThenPoll(ctx context.Context, id DnsAliasId, input ServerDnsAliasAcquisition) error { + result, err := c.Acquire(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Acquire: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Acquire: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/method_createorupdate.go new file mode 100644 index 0000000000000..e8bb8910198fe --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/method_createorupdate.go @@ -0,0 +1,72 @@ +package serverdnsaliases + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ServerDnsAlias +} + +// CreateOrUpdate ... +func (c ServerDnsAliasesClient) CreateOrUpdate(ctx context.Context, id DnsAliasId) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c ServerDnsAliasesClient) CreateOrUpdateThenPoll(ctx context.Context, id DnsAliasId) error { + result, err := c.CreateOrUpdate(ctx, id) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/method_delete.go new file mode 100644 index 0000000000000..3e1cb44e1e877 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/method_delete.go @@ -0,0 +1,71 @@ +package serverdnsaliases + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c ServerDnsAliasesClient) Delete(ctx context.Context, id DnsAliasId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c ServerDnsAliasesClient) DeleteThenPoll(ctx context.Context, id DnsAliasId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/method_get.go new file mode 100644 index 0000000000000..103cdf86db155 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/method_get.go @@ -0,0 +1,54 @@ +package serverdnsaliases + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ServerDnsAlias +} + +// Get ... +func (c ServerDnsAliasesClient) Get(ctx context.Context, id DnsAliasId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ServerDnsAlias + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/method_listbyserver.go new file mode 100644 index 0000000000000..b67f67765b713 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/method_listbyserver.go @@ -0,0 +1,106 @@ +package serverdnsaliases + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByServerOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ServerDnsAlias +} + +type ListByServerCompleteResult struct { + LatestHttpResponse *http.Response + Items []ServerDnsAlias +} + +type ListByServerCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByServerCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByServer ... +func (c ServerDnsAliasesClient) ListByServer(ctx context.Context, id commonids.SqlServerId) (result ListByServerOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByServerCustomPager{}, + Path: fmt.Sprintf("%s/dnsAliases", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ServerDnsAlias `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByServerComplete retrieves all the results into a single object +func (c ServerDnsAliasesClient) ListByServerComplete(ctx context.Context, id commonids.SqlServerId) (ListByServerCompleteResult, error) { + return c.ListByServerCompleteMatchingPredicate(ctx, id, ServerDnsAliasOperationPredicate{}) +} + +// ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ServerDnsAliasesClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id commonids.SqlServerId, predicate ServerDnsAliasOperationPredicate) (result ListByServerCompleteResult, err error) { + items := make([]ServerDnsAlias, 0) + + resp, err := c.ListByServer(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByServerCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/model_serverdnsalias.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/model_serverdnsalias.go new file mode 100644 index 0000000000000..8c713338298ff --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/model_serverdnsalias.go @@ -0,0 +1,11 @@ +package serverdnsaliases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerDnsAlias struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ServerDnsAliasProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/model_serverdnsaliasacquisition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/model_serverdnsaliasacquisition.go new file mode 100644 index 0000000000000..c8a5279af6e0c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/model_serverdnsaliasacquisition.go @@ -0,0 +1,8 @@ +package serverdnsaliases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerDnsAliasAcquisition struct { + OldServerDnsAliasId string `json:"oldServerDnsAliasId"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/model_serverdnsaliasproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/model_serverdnsaliasproperties.go new file mode 100644 index 0000000000000..a65b002fdf4ce --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/model_serverdnsaliasproperties.go @@ -0,0 +1,8 @@ +package serverdnsaliases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerDnsAliasProperties struct { + AzureDnsRecord *string `json:"azureDnsRecord,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/predicates.go new file mode 100644 index 0000000000000..964f164db6c52 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/predicates.go @@ -0,0 +1,27 @@ +package serverdnsaliases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerDnsAliasOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p ServerDnsAliasOperationPredicate) Matches(input ServerDnsAlias) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/version.go new file mode 100644 index 0000000000000..2bfa15bbd056d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases/version.go @@ -0,0 +1,12 @@ +package serverdnsaliases + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/serverdnsaliases/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/README.md new file mode 100644 index 0000000000000..6bafb740132a2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/README.md @@ -0,0 +1,83 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys` Documentation + +The `serverkeys` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys" +``` + + +### Client Initialization + +```go +client := serverkeys.NewServerKeysClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ServerKeysClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := serverkeys.NewKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "keyValue") + +payload := serverkeys.ServerKey{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ServerKeysClient.Delete` + +```go +ctx := context.TODO() +id := serverkeys.NewKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "keyValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ServerKeysClient.Get` + +```go +ctx := context.TODO() +id := serverkeys.NewKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "keyValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ServerKeysClient.ListByServer` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination +items, err := client.ListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/client.go new file mode 100644 index 0000000000000..83970b7eb35da --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/client.go @@ -0,0 +1,26 @@ +package serverkeys + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerKeysClient struct { + Client *resourcemanager.Client +} + +func NewServerKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerKeysClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverkeys", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ServerKeysClient: %+v", err) + } + + return &ServerKeysClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/constants.go new file mode 100644 index 0000000000000..4166b27bcacf8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/constants.go @@ -0,0 +1,51 @@ +package serverkeys + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerKeyType string + +const ( + ServerKeyTypeAzureKeyVault ServerKeyType = "AzureKeyVault" + ServerKeyTypeServiceManaged ServerKeyType = "ServiceManaged" +) + +func PossibleValuesForServerKeyType() []string { + return []string{ + string(ServerKeyTypeAzureKeyVault), + string(ServerKeyTypeServiceManaged), + } +} + +func (s *ServerKeyType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseServerKeyType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseServerKeyType(input string) (*ServerKeyType, error) { + vals := map[string]ServerKeyType{ + "azurekeyvault": ServerKeyTypeAzureKeyVault, + "servicemanaged": ServerKeyTypeServiceManaged, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ServerKeyType(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/id_key.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/id_key.go new file mode 100644 index 0000000000000..a6d8137a5d3cc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/id_key.go @@ -0,0 +1,139 @@ +package serverkeys + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&KeyId{}) +} + +var _ resourceids.ResourceId = &KeyId{} + +// KeyId is a struct representing the Resource ID for a Key +type KeyId struct { + SubscriptionId string + ResourceGroupName string + ServerName string + KeyName string +} + +// NewKeyID returns a new KeyId struct +func NewKeyID(subscriptionId string, resourceGroupName string, serverName string, keyName string) KeyId { + return KeyId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ServerName: serverName, + KeyName: keyName, + } +} + +// ParseKeyID parses 'input' into a KeyId +func ParseKeyID(input string) (*KeyId, error) { + parser := resourceids.NewParserFromResourceIdType(&KeyId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := KeyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseKeyIDInsensitively parses 'input' case-insensitively into a KeyId +// note: this method should only be used for API response data and not user input +func ParseKeyIDInsensitively(input string) (*KeyId, error) { + parser := resourceids.NewParserFromResourceIdType(&KeyId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := KeyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *KeyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) + } + + if id.KeyName, ok = input.Parsed["keyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "keyName", input) + } + + return nil +} + +// ValidateKeyID checks that 'input' can be parsed as a Key ID +func ValidateKeyID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseKeyID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Key ID +func (id KeyId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Sql/servers/%s/keys/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServerName, id.KeyName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Key ID +func (id KeyId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftSql", "Microsoft.Sql", "Microsoft.Sql"), + resourceids.StaticSegment("staticServers", "servers", "servers"), + resourceids.UserSpecifiedSegment("serverName", "serverValue"), + resourceids.StaticSegment("staticKeys", "keys", "keys"), + resourceids.UserSpecifiedSegment("keyName", "keyValue"), + } +} + +// String returns a human-readable description of this Key ID +func (id KeyId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Server Name: %q", id.ServerName), + fmt.Sprintf("Key Name: %q", id.KeyName), + } + return fmt.Sprintf("Key (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/method_createorupdate.go new file mode 100644 index 0000000000000..ff91afb47f74f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/method_createorupdate.go @@ -0,0 +1,76 @@ +package serverkeys + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ServerKey +} + +// CreateOrUpdate ... +func (c ServerKeysClient) CreateOrUpdate(ctx context.Context, id KeyId, input ServerKey) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c ServerKeysClient) CreateOrUpdateThenPoll(ctx context.Context, id KeyId, input ServerKey) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/method_delete.go new file mode 100644 index 0000000000000..29eafab24a1a6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/method_delete.go @@ -0,0 +1,71 @@ +package serverkeys + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c ServerKeysClient) Delete(ctx context.Context, id KeyId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c ServerKeysClient) DeleteThenPoll(ctx context.Context, id KeyId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/method_get.go new file mode 100644 index 0000000000000..cdd81e30407d2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/method_get.go @@ -0,0 +1,54 @@ +package serverkeys + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ServerKey +} + +// Get ... +func (c ServerKeysClient) Get(ctx context.Context, id KeyId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ServerKey + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/method_listbyserver.go new file mode 100644 index 0000000000000..221552cd13ff8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/method_listbyserver.go @@ -0,0 +1,106 @@ +package serverkeys + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByServerOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ServerKey +} + +type ListByServerCompleteResult struct { + LatestHttpResponse *http.Response + Items []ServerKey +} + +type ListByServerCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByServerCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByServer ... +func (c ServerKeysClient) ListByServer(ctx context.Context, id commonids.SqlServerId) (result ListByServerOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByServerCustomPager{}, + Path: fmt.Sprintf("%s/keys", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ServerKey `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByServerComplete retrieves all the results into a single object +func (c ServerKeysClient) ListByServerComplete(ctx context.Context, id commonids.SqlServerId) (ListByServerCompleteResult, error) { + return c.ListByServerCompleteMatchingPredicate(ctx, id, ServerKeyOperationPredicate{}) +} + +// ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ServerKeysClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id commonids.SqlServerId, predicate ServerKeyOperationPredicate) (result ListByServerCompleteResult, err error) { + items := make([]ServerKey, 0) + + resp, err := c.ListByServer(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByServerCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/model_serverkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/model_serverkey.go new file mode 100644 index 0000000000000..6f1037f22bddb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/model_serverkey.go @@ -0,0 +1,13 @@ +package serverkeys + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerKey struct { + Id *string `json:"id,omitempty"` + Kind *string `json:"kind,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ServerKeyProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/model_serverkeyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/model_serverkeyproperties.go new file mode 100644 index 0000000000000..217a269c6abf3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/model_serverkeyproperties.go @@ -0,0 +1,31 @@ +package serverkeys + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerKeyProperties struct { + AutoRotationEnabled *bool `json:"autoRotationEnabled,omitempty"` + CreationDate *string `json:"creationDate,omitempty"` + ServerKeyType ServerKeyType `json:"serverKeyType"` + Subregion *string `json:"subregion,omitempty"` + Thumbprint *string `json:"thumbprint,omitempty"` + Uri *string `json:"uri,omitempty"` +} + +func (o *ServerKeyProperties) GetCreationDateAsTime() (*time.Time, error) { + if o.CreationDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreationDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *ServerKeyProperties) SetCreationDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreationDate = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/predicates.go new file mode 100644 index 0000000000000..e0882f7257e5e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/predicates.go @@ -0,0 +1,37 @@ +package serverkeys + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerKeyOperationPredicate struct { + Id *string + Kind *string + Location *string + Name *string + Type *string +} + +func (p ServerKeyOperationPredicate) Matches(input ServerKey) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/version.go new file mode 100644 index 0000000000000..5f90937a4f874 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys/version.go @@ -0,0 +1,12 @@ +package serverkeys + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/serverkeys/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/README.md new file mode 100644 index 0000000000000..97dcfdfb44f0b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/README.md @@ -0,0 +1,167 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers` Documentation + +The `servers` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers" +``` + + +### Client Initialization + +```go +client := servers.NewServersClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ServersClient.CheckNameAvailability` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +payload := servers.CheckNameAvailabilityRequest{ + // ... +} + + +read, err := client.CheckNameAvailability(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ServersClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +payload := servers.Server{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ServersClient.Delete` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ServersClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +read, err := client.Get(ctx, id, servers.DefaultGetOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ServersClient.ImportDatabase` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +payload := servers.ImportNewDatabaseDefinition{ + // ... +} + + +if err := client.ImportDatabaseThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ServersClient.List` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.List(ctx, id, servers.DefaultListOperationOptions())` can be used to do batched pagination +items, err := client.ListComplete(ctx, id, servers.DefaultListOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ServersClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id, servers.DefaultListByResourceGroupOperationOptions())` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id, servers.DefaultListByResourceGroupOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ServersClient.RefreshStatus` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +if err := client.RefreshStatusThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ServersClient.Update` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +payload := servers.ServerUpdate{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/constants.go new file mode 100644 index 0000000000000..782da45a033b4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/constants.go @@ -0,0 +1,564 @@ +package servers + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AdministratorType string + +const ( + AdministratorTypeActiveDirectory AdministratorType = "ActiveDirectory" +) + +func PossibleValuesForAdministratorType() []string { + return []string{ + string(AdministratorTypeActiveDirectory), + } +} + +func (s *AdministratorType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAdministratorType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAdministratorType(input string) (*AdministratorType, error) { + vals := map[string]AdministratorType{ + "activedirectory": AdministratorTypeActiveDirectory, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AdministratorType(input) + return &out, nil +} + +type CheckNameAvailabilityReason string + +const ( + CheckNameAvailabilityReasonAlreadyExists CheckNameAvailabilityReason = "AlreadyExists" + CheckNameAvailabilityReasonInvalid CheckNameAvailabilityReason = "Invalid" +) + +func PossibleValuesForCheckNameAvailabilityReason() []string { + return []string{ + string(CheckNameAvailabilityReasonAlreadyExists), + string(CheckNameAvailabilityReasonInvalid), + } +} + +func (s *CheckNameAvailabilityReason) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCheckNameAvailabilityReason(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCheckNameAvailabilityReason(input string) (*CheckNameAvailabilityReason, error) { + vals := map[string]CheckNameAvailabilityReason{ + "alreadyexists": CheckNameAvailabilityReasonAlreadyExists, + "invalid": CheckNameAvailabilityReasonInvalid, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CheckNameAvailabilityReason(input) + return &out, nil +} + +type CheckNameAvailabilityResourceType string + +const ( + CheckNameAvailabilityResourceTypeMicrosoftPointSqlServers CheckNameAvailabilityResourceType = "Microsoft.Sql/servers" +) + +func PossibleValuesForCheckNameAvailabilityResourceType() []string { + return []string{ + string(CheckNameAvailabilityResourceTypeMicrosoftPointSqlServers), + } +} + +func (s *CheckNameAvailabilityResourceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCheckNameAvailabilityResourceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCheckNameAvailabilityResourceType(input string) (*CheckNameAvailabilityResourceType, error) { + vals := map[string]CheckNameAvailabilityResourceType{ + "microsoft.sql/servers": CheckNameAvailabilityResourceTypeMicrosoftPointSqlServers, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CheckNameAvailabilityResourceType(input) + return &out, nil +} + +type ExternalGovernanceStatus string + +const ( + ExternalGovernanceStatusDisabled ExternalGovernanceStatus = "Disabled" + ExternalGovernanceStatusEnabled ExternalGovernanceStatus = "Enabled" +) + +func PossibleValuesForExternalGovernanceStatus() []string { + return []string{ + string(ExternalGovernanceStatusDisabled), + string(ExternalGovernanceStatusEnabled), + } +} + +func (s *ExternalGovernanceStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseExternalGovernanceStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseExternalGovernanceStatus(input string) (*ExternalGovernanceStatus, error) { + vals := map[string]ExternalGovernanceStatus{ + "disabled": ExternalGovernanceStatusDisabled, + "enabled": ExternalGovernanceStatusEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ExternalGovernanceStatus(input) + return &out, nil +} + +type MinimalTlsVersion string + +const ( + MinimalTlsVersionNone MinimalTlsVersion = "None" + MinimalTlsVersionOnePointOne MinimalTlsVersion = "1.1" + MinimalTlsVersionOnePointThree MinimalTlsVersion = "1.3" + MinimalTlsVersionOnePointTwo MinimalTlsVersion = "1.2" + MinimalTlsVersionOnePointZero MinimalTlsVersion = "1.0" +) + +func PossibleValuesForMinimalTlsVersion() []string { + return []string{ + string(MinimalTlsVersionNone), + string(MinimalTlsVersionOnePointOne), + string(MinimalTlsVersionOnePointThree), + string(MinimalTlsVersionOnePointTwo), + string(MinimalTlsVersionOnePointZero), + } +} + +func (s *MinimalTlsVersion) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMinimalTlsVersion(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMinimalTlsVersion(input string) (*MinimalTlsVersion, error) { + vals := map[string]MinimalTlsVersion{ + "none": MinimalTlsVersionNone, + "1.1": MinimalTlsVersionOnePointOne, + "1.3": MinimalTlsVersionOnePointThree, + "1.2": MinimalTlsVersionOnePointTwo, + "1.0": MinimalTlsVersionOnePointZero, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MinimalTlsVersion(input) + return &out, nil +} + +type PrincipalType string + +const ( + PrincipalTypeApplication PrincipalType = "Application" + PrincipalTypeGroup PrincipalType = "Group" + PrincipalTypeUser PrincipalType = "User" +) + +func PossibleValuesForPrincipalType() []string { + return []string{ + string(PrincipalTypeApplication), + string(PrincipalTypeGroup), + string(PrincipalTypeUser), + } +} + +func (s *PrincipalType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePrincipalType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePrincipalType(input string) (*PrincipalType, error) { + vals := map[string]PrincipalType{ + "application": PrincipalTypeApplication, + "group": PrincipalTypeGroup, + "user": PrincipalTypeUser, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrincipalType(input) + return &out, nil +} + +type PrivateEndpointProvisioningState string + +const ( + PrivateEndpointProvisioningStateApproving PrivateEndpointProvisioningState = "Approving" + PrivateEndpointProvisioningStateDropping PrivateEndpointProvisioningState = "Dropping" + PrivateEndpointProvisioningStateFailed PrivateEndpointProvisioningState = "Failed" + PrivateEndpointProvisioningStateReady PrivateEndpointProvisioningState = "Ready" + PrivateEndpointProvisioningStateRejecting PrivateEndpointProvisioningState = "Rejecting" +) + +func PossibleValuesForPrivateEndpointProvisioningState() []string { + return []string{ + string(PrivateEndpointProvisioningStateApproving), + string(PrivateEndpointProvisioningStateDropping), + string(PrivateEndpointProvisioningStateFailed), + string(PrivateEndpointProvisioningStateReady), + string(PrivateEndpointProvisioningStateRejecting), + } +} + +func (s *PrivateEndpointProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePrivateEndpointProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePrivateEndpointProvisioningState(input string) (*PrivateEndpointProvisioningState, error) { + vals := map[string]PrivateEndpointProvisioningState{ + "approving": PrivateEndpointProvisioningStateApproving, + "dropping": PrivateEndpointProvisioningStateDropping, + "failed": PrivateEndpointProvisioningStateFailed, + "ready": PrivateEndpointProvisioningStateReady, + "rejecting": PrivateEndpointProvisioningStateRejecting, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateEndpointProvisioningState(input) + return &out, nil +} + +type PrivateLinkServiceConnectionStateActionsRequire string + +const ( + PrivateLinkServiceConnectionStateActionsRequireNone PrivateLinkServiceConnectionStateActionsRequire = "None" +) + +func PossibleValuesForPrivateLinkServiceConnectionStateActionsRequire() []string { + return []string{ + string(PrivateLinkServiceConnectionStateActionsRequireNone), + } +} + +func (s *PrivateLinkServiceConnectionStateActionsRequire) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePrivateLinkServiceConnectionStateActionsRequire(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePrivateLinkServiceConnectionStateActionsRequire(input string) (*PrivateLinkServiceConnectionStateActionsRequire, error) { + vals := map[string]PrivateLinkServiceConnectionStateActionsRequire{ + "none": PrivateLinkServiceConnectionStateActionsRequireNone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateLinkServiceConnectionStateActionsRequire(input) + return &out, nil +} + +type PrivateLinkServiceConnectionStateStatus string + +const ( + PrivateLinkServiceConnectionStateStatusApproved PrivateLinkServiceConnectionStateStatus = "Approved" + PrivateLinkServiceConnectionStateStatusDisconnected PrivateLinkServiceConnectionStateStatus = "Disconnected" + PrivateLinkServiceConnectionStateStatusPending PrivateLinkServiceConnectionStateStatus = "Pending" + PrivateLinkServiceConnectionStateStatusRejected PrivateLinkServiceConnectionStateStatus = "Rejected" +) + +func PossibleValuesForPrivateLinkServiceConnectionStateStatus() []string { + return []string{ + string(PrivateLinkServiceConnectionStateStatusApproved), + string(PrivateLinkServiceConnectionStateStatusDisconnected), + string(PrivateLinkServiceConnectionStateStatusPending), + string(PrivateLinkServiceConnectionStateStatusRejected), + } +} + +func (s *PrivateLinkServiceConnectionStateStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePrivateLinkServiceConnectionStateStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePrivateLinkServiceConnectionStateStatus(input string) (*PrivateLinkServiceConnectionStateStatus, error) { + vals := map[string]PrivateLinkServiceConnectionStateStatus{ + "approved": PrivateLinkServiceConnectionStateStatusApproved, + "disconnected": PrivateLinkServiceConnectionStateStatusDisconnected, + "pending": PrivateLinkServiceConnectionStateStatusPending, + "rejected": PrivateLinkServiceConnectionStateStatusRejected, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateLinkServiceConnectionStateStatus(input) + return &out, nil +} + +type ServerNetworkAccessFlag string + +const ( + ServerNetworkAccessFlagDisabled ServerNetworkAccessFlag = "Disabled" + ServerNetworkAccessFlagEnabled ServerNetworkAccessFlag = "Enabled" +) + +func PossibleValuesForServerNetworkAccessFlag() []string { + return []string{ + string(ServerNetworkAccessFlagDisabled), + string(ServerNetworkAccessFlagEnabled), + } +} + +func (s *ServerNetworkAccessFlag) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseServerNetworkAccessFlag(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseServerNetworkAccessFlag(input string) (*ServerNetworkAccessFlag, error) { + vals := map[string]ServerNetworkAccessFlag{ + "disabled": ServerNetworkAccessFlagDisabled, + "enabled": ServerNetworkAccessFlagEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ServerNetworkAccessFlag(input) + return &out, nil +} + +type ServerPublicNetworkAccessFlag string + +const ( + ServerPublicNetworkAccessFlagDisabled ServerPublicNetworkAccessFlag = "Disabled" + ServerPublicNetworkAccessFlagEnabled ServerPublicNetworkAccessFlag = "Enabled" + ServerPublicNetworkAccessFlagSecuredByPerimeter ServerPublicNetworkAccessFlag = "SecuredByPerimeter" +) + +func PossibleValuesForServerPublicNetworkAccessFlag() []string { + return []string{ + string(ServerPublicNetworkAccessFlagDisabled), + string(ServerPublicNetworkAccessFlagEnabled), + string(ServerPublicNetworkAccessFlagSecuredByPerimeter), + } +} + +func (s *ServerPublicNetworkAccessFlag) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseServerPublicNetworkAccessFlag(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseServerPublicNetworkAccessFlag(input string) (*ServerPublicNetworkAccessFlag, error) { + vals := map[string]ServerPublicNetworkAccessFlag{ + "disabled": ServerPublicNetworkAccessFlagDisabled, + "enabled": ServerPublicNetworkAccessFlagEnabled, + "securedbyperimeter": ServerPublicNetworkAccessFlagSecuredByPerimeter, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ServerPublicNetworkAccessFlag(input) + return &out, nil +} + +type ServerWorkspaceFeature string + +const ( + ServerWorkspaceFeatureConnected ServerWorkspaceFeature = "Connected" + ServerWorkspaceFeatureDisconnected ServerWorkspaceFeature = "Disconnected" +) + +func PossibleValuesForServerWorkspaceFeature() []string { + return []string{ + string(ServerWorkspaceFeatureConnected), + string(ServerWorkspaceFeatureDisconnected), + } +} + +func (s *ServerWorkspaceFeature) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseServerWorkspaceFeature(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseServerWorkspaceFeature(input string) (*ServerWorkspaceFeature, error) { + vals := map[string]ServerWorkspaceFeature{ + "connected": ServerWorkspaceFeatureConnected, + "disconnected": ServerWorkspaceFeatureDisconnected, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ServerWorkspaceFeature(input) + return &out, nil +} + +type StorageKeyType string + +const ( + StorageKeyTypeSharedAccessKey StorageKeyType = "SharedAccessKey" + StorageKeyTypeStorageAccessKey StorageKeyType = "StorageAccessKey" +) + +func PossibleValuesForStorageKeyType() []string { + return []string{ + string(StorageKeyTypeSharedAccessKey), + string(StorageKeyTypeStorageAccessKey), + } +} + +func (s *StorageKeyType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseStorageKeyType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseStorageKeyType(input string) (*StorageKeyType, error) { + vals := map[string]StorageKeyType{ + "sharedaccesskey": StorageKeyTypeSharedAccessKey, + "storageaccesskey": StorageKeyTypeStorageAccessKey, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := StorageKeyType(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/method_checknameavailability.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/method_checknameavailability.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/method_checknameavailability.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/method_checknameavailability.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/method_importdatabase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/method_importdatabase.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/method_importdatabase.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/method_importdatabase.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/method_listbyresourcegroup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/method_listbyresourcegroup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/method_listbyresourcegroup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/method_refreshstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/method_refreshstatus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/method_refreshstatus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/method_refreshstatus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_checknameavailabilityrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_checknameavailabilityrequest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_checknameavailabilityrequest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_checknameavailabilityrequest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_checknameavailabilityresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_checknameavailabilityresponse.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_checknameavailabilityresponse.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_checknameavailabilityresponse.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_importexportoperationresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_importexportoperationresult.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_importexportoperationresult.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_importexportoperationresult.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_importexportoperationresultproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_importexportoperationresultproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_importexportoperationresultproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_importexportoperationresultproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_importnewdatabasedefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_importnewdatabasedefinition.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_importnewdatabasedefinition.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_importnewdatabasedefinition.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_networkisolationsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_networkisolationsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_networkisolationsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_networkisolationsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_privateendpointconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_privateendpointconnectionproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_privateendpointconnectionproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_privateendpointconnectionproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_privateendpointconnectionrequeststatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_privateendpointconnectionrequeststatus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_privateendpointconnectionrequeststatus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_privateendpointconnectionrequeststatus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_privateendpointproperty.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_privateendpointproperty.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_privateendpointproperty.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_privateendpointproperty.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_privatelinkserviceconnectionstateproperty.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_privatelinkserviceconnectionstateproperty.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_privatelinkserviceconnectionstateproperty.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_privatelinkserviceconnectionstateproperty.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_refreshexternalgovernancestatusoperationresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_refreshexternalgovernancestatusoperationresult.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_refreshexternalgovernancestatusoperationresult.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_refreshexternalgovernancestatusoperationresult.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_refreshexternalgovernancestatusoperationresultproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_refreshexternalgovernancestatusoperationresultproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_refreshexternalgovernancestatusoperationresultproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_refreshexternalgovernancestatusoperationresultproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_server.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_server.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_server.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_serverexternaladministrator.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_serverexternaladministrator.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_serverexternaladministrator.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_serverexternaladministrator.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_serverprivateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_serverprivateendpointconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_serverprivateendpointconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_serverprivateendpointconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_serverproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_serverproperties.go similarity index 96% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_serverproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_serverproperties.go index 877120147bf3f..8429ca3813c1d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_serverproperties.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_serverproperties.go @@ -12,7 +12,7 @@ type ServerProperties struct { FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty"` IsIPv6Enabled *ServerNetworkAccessFlag `json:"isIPv6Enabled,omitempty"` KeyId *string `json:"keyId,omitempty"` - MinimalTlsVersion *string `json:"minimalTlsVersion,omitempty"` + MinimalTlsVersion *MinimalTlsVersion `json:"minimalTlsVersion,omitempty"` PrimaryUserAssignedIdentityId *string `json:"primaryUserAssignedIdentityId,omitempty"` PrivateEndpointConnections *[]ServerPrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` PublicNetworkAccess *ServerPublicNetworkAccessFlag `json:"publicNetworkAccess,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_serverupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_serverupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/model_serverupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/model_serverupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/version.go new file mode 100644 index 0000000000000..45695708a26e7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers/version.go @@ -0,0 +1,12 @@ +package servers + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/servers/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/README.md new file mode 100644 index 0000000000000..bc488ab47a29e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/README.md @@ -0,0 +1,71 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies` Documentation + +The `serversecurityalertpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies" +``` + + +### Client Initialization + +```go +client := serversecurityalertpolicies.NewServerSecurityAlertPoliciesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ServerSecurityAlertPoliciesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +payload := serversecurityalertpolicies.ServerSecurityAlertPolicy{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ServerSecurityAlertPoliciesClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ServerSecurityAlertPoliciesClient.ListByServer` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination +items, err := client.ListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/method_listbyserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/method_listbyserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/method_listbyserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/model_securityalertspolicyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/model_securityalertspolicyproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/model_securityalertspolicyproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/model_securityalertspolicyproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/model_serversecurityalertpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/model_serversecurityalertpolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/model_serversecurityalertpolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/model_serversecurityalertpolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/version.go new file mode 100644 index 0000000000000..d84cac2cff194 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/version.go @@ -0,0 +1,12 @@ +package serversecurityalertpolicies + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/serversecurityalertpolicies/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/README.md new file mode 100644 index 0000000000000..9495a712316e6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/README.md @@ -0,0 +1,91 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments` Documentation + +The `servervulnerabilityassessments` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments" +``` + + +### Client Initialization + +```go +client := servervulnerabilityassessments.NewServerVulnerabilityAssessmentsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ServerVulnerabilityAssessmentsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +payload := servervulnerabilityassessments.ServerVulnerabilityAssessment{ + // ... +} + + +read, err := client.CreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ServerVulnerabilityAssessmentsClient.Delete` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +read, err := client.Delete(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ServerVulnerabilityAssessmentsClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ServerVulnerabilityAssessmentsClient.ListByServer` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination +items, err := client.ListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/client.go new file mode 100644 index 0000000000000..5ab28ece52e4a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/client.go @@ -0,0 +1,26 @@ +package servervulnerabilityassessments + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerVulnerabilityAssessmentsClient struct { + Client *resourcemanager.Client +} + +func NewServerVulnerabilityAssessmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerVulnerabilityAssessmentsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servervulnerabilityassessments", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ServerVulnerabilityAssessmentsClient: %+v", err) + } + + return &ServerVulnerabilityAssessmentsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/method_createorupdate.go new file mode 100644 index 0000000000000..6833023e5f85d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/method_createorupdate.go @@ -0,0 +1,61 @@ +package servervulnerabilityassessments + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ServerVulnerabilityAssessment +} + +// CreateOrUpdate ... +func (c ServerVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, id commonids.SqlServerId, input ServerVulnerabilityAssessment) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: fmt.Sprintf("%s/vulnerabilityAssessments/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ServerVulnerabilityAssessment + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/method_delete.go new file mode 100644 index 0000000000000..946d840fe5953 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/method_delete.go @@ -0,0 +1,48 @@ +package servervulnerabilityassessments + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c ServerVulnerabilityAssessmentsClient) Delete(ctx context.Context, id commonids.SqlServerId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: fmt.Sprintf("%s/vulnerabilityAssessments/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/method_get.go new file mode 100644 index 0000000000000..84e9a7c324353 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/method_get.go @@ -0,0 +1,56 @@ +package servervulnerabilityassessments + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ServerVulnerabilityAssessment +} + +// Get ... +func (c ServerVulnerabilityAssessmentsClient) Get(ctx context.Context, id commonids.SqlServerId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/vulnerabilityAssessments/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ServerVulnerabilityAssessment + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/method_listbyserver.go new file mode 100644 index 0000000000000..49dc3296c3be7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/method_listbyserver.go @@ -0,0 +1,106 @@ +package servervulnerabilityassessments + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByServerOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ServerVulnerabilityAssessment +} + +type ListByServerCompleteResult struct { + LatestHttpResponse *http.Response + Items []ServerVulnerabilityAssessment +} + +type ListByServerCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByServerCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByServer ... +func (c ServerVulnerabilityAssessmentsClient) ListByServer(ctx context.Context, id commonids.SqlServerId) (result ListByServerOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByServerCustomPager{}, + Path: fmt.Sprintf("%s/vulnerabilityAssessments", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ServerVulnerabilityAssessment `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByServerComplete retrieves all the results into a single object +func (c ServerVulnerabilityAssessmentsClient) ListByServerComplete(ctx context.Context, id commonids.SqlServerId) (ListByServerCompleteResult, error) { + return c.ListByServerCompleteMatchingPredicate(ctx, id, ServerVulnerabilityAssessmentOperationPredicate{}) +} + +// ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ServerVulnerabilityAssessmentsClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id commonids.SqlServerId, predicate ServerVulnerabilityAssessmentOperationPredicate) (result ListByServerCompleteResult, err error) { + items := make([]ServerVulnerabilityAssessment, 0) + + resp, err := c.ListByServer(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByServerCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/model_servervulnerabilityassessment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/model_servervulnerabilityassessment.go new file mode 100644 index 0000000000000..7d2d82491b053 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/model_servervulnerabilityassessment.go @@ -0,0 +1,11 @@ +package servervulnerabilityassessments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerVulnerabilityAssessment struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ServerVulnerabilityAssessmentProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/model_servervulnerabilityassessmentproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/model_servervulnerabilityassessmentproperties.go new file mode 100644 index 0000000000000..2627932f4a6ee --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/model_servervulnerabilityassessmentproperties.go @@ -0,0 +1,11 @@ +package servervulnerabilityassessments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerVulnerabilityAssessmentProperties struct { + RecurringScans *VulnerabilityAssessmentRecurringScansProperties `json:"recurringScans,omitempty"` + StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` + StorageContainerPath string `json:"storageContainerPath"` + StorageContainerSasKey *string `json:"storageContainerSasKey,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/model_vulnerabilityassessmentrecurringscansproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/model_vulnerabilityassessmentrecurringscansproperties.go new file mode 100644 index 0000000000000..d2153ee760dfd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/model_vulnerabilityassessmentrecurringscansproperties.go @@ -0,0 +1,10 @@ +package servervulnerabilityassessments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VulnerabilityAssessmentRecurringScansProperties struct { + EmailSubscriptionAdmins *bool `json:"emailSubscriptionAdmins,omitempty"` + Emails *[]string `json:"emails,omitempty"` + IsEnabled *bool `json:"isEnabled,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/predicates.go new file mode 100644 index 0000000000000..cba9908c5fe9e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/predicates.go @@ -0,0 +1,27 @@ +package servervulnerabilityassessments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerVulnerabilityAssessmentOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p ServerVulnerabilityAssessmentOperationPredicate) Matches(input ServerVulnerabilityAssessment) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/version.go new file mode 100644 index 0000000000000..1eb6949794611 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/version.go @@ -0,0 +1,12 @@ +package servervulnerabilityassessments + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/servervulnerabilityassessments/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/README.md new file mode 100644 index 0000000000000..12678b2e7d5f3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/README.md @@ -0,0 +1,71 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions` Documentation + +The `transparentdataencryptions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions" +``` + + +### Client Initialization + +```go +client := transparentdataencryptions.NewTransparentDataEncryptionsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `TransparentDataEncryptionsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +payload := transparentdataencryptions.LogicalDatabaseTransparentDataEncryption{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `TransparentDataEncryptionsClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `TransparentDataEncryptionsClient.ListByDatabase` + +```go +ctx := context.TODO() +id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +// alternatively `client.ListByDatabase(ctx, id)` can be used to do batched pagination +items, err := client.ListByDatabaseComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/method_listbydatabase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/method_listbydatabase.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/method_listbydatabase.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/method_listbydatabase.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/model_logicaldatabasetransparentdataencryption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/model_logicaldatabasetransparentdataencryption.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/model_logicaldatabasetransparentdataencryption.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/model_logicaldatabasetransparentdataencryption.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/model_transparentdataencryptionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/model_transparentdataencryptionproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/model_transparentdataencryptionproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/model_transparentdataencryptionproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/version.go new file mode 100644 index 0000000000000..d8e1d4b5a1029 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/version.go @@ -0,0 +1,12 @@ +package transparentdataencryptions + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/transparentdataencryptions/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/README.md new file mode 100644 index 0000000000000..460f9322cf330 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/README.md @@ -0,0 +1,83 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules` Documentation + +The `virtualnetworkrules` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules" +``` + + +### Client Initialization + +```go +client := virtualnetworkrules.NewVirtualNetworkRulesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `VirtualNetworkRulesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := virtualnetworkrules.NewVirtualNetworkRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "virtualNetworkRuleValue") + +payload := virtualnetworkrules.VirtualNetworkRule{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualNetworkRulesClient.Delete` + +```go +ctx := context.TODO() +id := virtualnetworkrules.NewVirtualNetworkRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "virtualNetworkRuleValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualNetworkRulesClient.Get` + +```go +ctx := context.TODO() +id := virtualnetworkrules.NewVirtualNetworkRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "virtualNetworkRuleValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `VirtualNetworkRulesClient.ListByServer` + +```go +ctx := context.TODO() +id := commonids.NewSqlServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination +items, err := client.ListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/constants.go new file mode 100644 index 0000000000000..f6405438796b1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/constants.go @@ -0,0 +1,63 @@ +package virtualnetworkrules + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualNetworkRuleState string + +const ( + VirtualNetworkRuleStateDeleting VirtualNetworkRuleState = "Deleting" + VirtualNetworkRuleStateFailed VirtualNetworkRuleState = "Failed" + VirtualNetworkRuleStateInProgress VirtualNetworkRuleState = "InProgress" + VirtualNetworkRuleStateInitializing VirtualNetworkRuleState = "Initializing" + VirtualNetworkRuleStateReady VirtualNetworkRuleState = "Ready" + VirtualNetworkRuleStateUnknown VirtualNetworkRuleState = "Unknown" +) + +func PossibleValuesForVirtualNetworkRuleState() []string { + return []string{ + string(VirtualNetworkRuleStateDeleting), + string(VirtualNetworkRuleStateFailed), + string(VirtualNetworkRuleStateInProgress), + string(VirtualNetworkRuleStateInitializing), + string(VirtualNetworkRuleStateReady), + string(VirtualNetworkRuleStateUnknown), + } +} + +func (s *VirtualNetworkRuleState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseVirtualNetworkRuleState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseVirtualNetworkRuleState(input string) (*VirtualNetworkRuleState, error) { + vals := map[string]VirtualNetworkRuleState{ + "deleting": VirtualNetworkRuleStateDeleting, + "failed": VirtualNetworkRuleStateFailed, + "inprogress": VirtualNetworkRuleStateInProgress, + "initializing": VirtualNetworkRuleStateInitializing, + "ready": VirtualNetworkRuleStateReady, + "unknown": VirtualNetworkRuleStateUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := VirtualNetworkRuleState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_virtualnetworkrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/id_virtualnetworkrule.go similarity index 96% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_virtualnetworkrule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/id_virtualnetworkrule.go index fdb98ae13292a..cda6be2068fcf 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_virtualnetworkrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/id_virtualnetworkrule.go @@ -107,7 +107,7 @@ func ValidateVirtualNetworkRuleID(input interface{}, key string) (warnings []str // ID returns the formatted Virtual Network Rule ID func (id VirtualNetworkRuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMariaDB/servers/%s/virtualNetworkRules/%s" + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Sql/servers/%s/virtualNetworkRules/%s" return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServerName, id.VirtualNetworkRuleName) } @@ -119,7 +119,7 @@ func (id VirtualNetworkRuleId) Segments() []resourceids.Segment { resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftDBforMariaDB", "Microsoft.DBforMariaDB", "Microsoft.DBforMariaDB"), + resourceids.ResourceProviderSegment("staticMicrosoftSql", "Microsoft.Sql", "Microsoft.Sql"), resourceids.StaticSegment("staticServers", "servers", "servers"), resourceids.UserSpecifiedSegment("serverName", "serverValue"), resourceids.StaticSegment("staticVirtualNetworkRules", "virtualNetworkRules", "virtualNetworkRules"), diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/method_listbyserver.go new file mode 100644 index 0000000000000..fd0e442a021a1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/method_listbyserver.go @@ -0,0 +1,106 @@ +package virtualnetworkrules + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByServerOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]VirtualNetworkRule +} + +type ListByServerCompleteResult struct { + LatestHttpResponse *http.Response + Items []VirtualNetworkRule +} + +type ListByServerCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByServerCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByServer ... +func (c VirtualNetworkRulesClient) ListByServer(ctx context.Context, id commonids.SqlServerId) (result ListByServerOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByServerCustomPager{}, + Path: fmt.Sprintf("%s/virtualNetworkRules", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]VirtualNetworkRule `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByServerComplete retrieves all the results into a single object +func (c VirtualNetworkRulesClient) ListByServerComplete(ctx context.Context, id commonids.SqlServerId) (ListByServerCompleteResult, error) { + return c.ListByServerCompleteMatchingPredicate(ctx, id, VirtualNetworkRuleOperationPredicate{}) +} + +// ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c VirtualNetworkRulesClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id commonids.SqlServerId, predicate VirtualNetworkRuleOperationPredicate) (result ListByServerCompleteResult, err error) { + items := make([]VirtualNetworkRule, 0) + + resp, err := c.ListByServer(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByServerCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/model_virtualnetworkrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/model_virtualnetworkrule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/model_virtualnetworkrule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/model_virtualnetworkrule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/model_virtualnetworkruleproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/model_virtualnetworkruleproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/model_virtualnetworkruleproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/model_virtualnetworkruleproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/version.go new file mode 100644 index 0000000000000..53db2f31acfb2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/version.go @@ -0,0 +1,12 @@ +package virtualnetworkrules + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-08-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkrules/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/README.md deleted file mode 100644 index 482a7455ef767..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/README.md +++ /dev/null @@ -1,170 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools` Documentation - -The `diskpools` SDK allows for interaction with the Azure Resource Manager Service `storagepool` (API Version `2021-08-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools" -``` - - -### Client Initialization - -```go -client := diskpools.NewDiskPoolsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `DiskPoolsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := diskpools.NewDiskPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskPoolValue") - -payload := diskpools.DiskPoolCreate{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `DiskPoolsClient.Deallocate` - -```go -ctx := context.TODO() -id := diskpools.NewDiskPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskPoolValue") - -if err := client.DeallocateThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `DiskPoolsClient.Delete` - -```go -ctx := context.TODO() -id := diskpools.NewDiskPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskPoolValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `DiskPoolsClient.Get` - -```go -ctx := context.TODO() -id := diskpools.NewDiskPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskPoolValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `DiskPoolsClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `DiskPoolsClient.ListBySubscription` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination -items, err := client.ListBySubscriptionComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `DiskPoolsClient.ListOutboundNetworkDependenciesEndpoints` - -```go -ctx := context.TODO() -id := diskpools.NewDiskPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskPoolValue") - -// alternatively `client.ListOutboundNetworkDependenciesEndpoints(ctx, id)` can be used to do batched pagination -items, err := client.ListOutboundNetworkDependenciesEndpointsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `DiskPoolsClient.Start` - -```go -ctx := context.TODO() -id := diskpools.NewDiskPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskPoolValue") - -if err := client.StartThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `DiskPoolsClient.Update` - -```go -ctx := context.TODO() -id := diskpools.NewDiskPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskPoolValue") - -payload := diskpools.DiskPoolUpdate{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `DiskPoolsClient.Upgrade` - -```go -ctx := context.TODO() -id := diskpools.NewDiskPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskPoolValue") - -if err := client.UpgradeThenPoll(ctx, id); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/client.go deleted file mode 100644 index 866df7dc356fb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package diskpools - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DiskPoolsClient struct { - Client *resourcemanager.Client -} - -func NewDiskPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*DiskPoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diskpools", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating DiskPoolsClient: %+v", err) - } - - return &DiskPoolsClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/constants.go deleted file mode 100644 index 54d5276564e5d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/constants.go +++ /dev/null @@ -1,128 +0,0 @@ -package diskpools - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type OperationalStatus string - -const ( - OperationalStatusHealthy OperationalStatus = "Healthy" - OperationalStatusInvalid OperationalStatus = "Invalid" - OperationalStatusRunning OperationalStatus = "Running" - OperationalStatusStopped OperationalStatus = "Stopped" - OperationalStatusStoppedDeallocated OperationalStatus = "Stopped (deallocated)" - OperationalStatusUnhealthy OperationalStatus = "Unhealthy" - OperationalStatusUnknown OperationalStatus = "Unknown" - OperationalStatusUpdating OperationalStatus = "Updating" -) - -func PossibleValuesForOperationalStatus() []string { - return []string{ - string(OperationalStatusHealthy), - string(OperationalStatusInvalid), - string(OperationalStatusRunning), - string(OperationalStatusStopped), - string(OperationalStatusStoppedDeallocated), - string(OperationalStatusUnhealthy), - string(OperationalStatusUnknown), - string(OperationalStatusUpdating), - } -} - -func (s *OperationalStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOperationalStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOperationalStatus(input string) (*OperationalStatus, error) { - vals := map[string]OperationalStatus{ - "healthy": OperationalStatusHealthy, - "invalid": OperationalStatusInvalid, - "running": OperationalStatusRunning, - "stopped": OperationalStatusStopped, - "stopped (deallocated)": OperationalStatusStoppedDeallocated, - "unhealthy": OperationalStatusUnhealthy, - "unknown": OperationalStatusUnknown, - "updating": OperationalStatusUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OperationalStatus(input) - return &out, nil -} - -type ProvisioningStates string - -const ( - ProvisioningStatesCanceled ProvisioningStates = "Canceled" - ProvisioningStatesCreating ProvisioningStates = "Creating" - ProvisioningStatesDeleting ProvisioningStates = "Deleting" - ProvisioningStatesFailed ProvisioningStates = "Failed" - ProvisioningStatesInvalid ProvisioningStates = "Invalid" - ProvisioningStatesPending ProvisioningStates = "Pending" - ProvisioningStatesSucceeded ProvisioningStates = "Succeeded" - ProvisioningStatesUpdating ProvisioningStates = "Updating" -) - -func PossibleValuesForProvisioningStates() []string { - return []string{ - string(ProvisioningStatesCanceled), - string(ProvisioningStatesCreating), - string(ProvisioningStatesDeleting), - string(ProvisioningStatesFailed), - string(ProvisioningStatesInvalid), - string(ProvisioningStatesPending), - string(ProvisioningStatesSucceeded), - string(ProvisioningStatesUpdating), - } -} - -func (s *ProvisioningStates) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningStates(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningStates(input string) (*ProvisioningStates, error) { - vals := map[string]ProvisioningStates{ - "canceled": ProvisioningStatesCanceled, - "creating": ProvisioningStatesCreating, - "deleting": ProvisioningStatesDeleting, - "failed": ProvisioningStatesFailed, - "invalid": ProvisioningStatesInvalid, - "pending": ProvisioningStatesPending, - "succeeded": ProvisioningStatesSucceeded, - "updating": ProvisioningStatesUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningStates(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/id_diskpool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/id_diskpool.go deleted file mode 100644 index 0357ba2d53a64..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/id_diskpool.go +++ /dev/null @@ -1,130 +0,0 @@ -package diskpools - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&DiskPoolId{}) -} - -var _ resourceids.ResourceId = &DiskPoolId{} - -// DiskPoolId is a struct representing the Resource ID for a Disk Pool -type DiskPoolId struct { - SubscriptionId string - ResourceGroupName string - DiskPoolName string -} - -// NewDiskPoolID returns a new DiskPoolId struct -func NewDiskPoolID(subscriptionId string, resourceGroupName string, diskPoolName string) DiskPoolId { - return DiskPoolId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - DiskPoolName: diskPoolName, - } -} - -// ParseDiskPoolID parses 'input' into a DiskPoolId -func ParseDiskPoolID(input string) (*DiskPoolId, error) { - parser := resourceids.NewParserFromResourceIdType(&DiskPoolId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := DiskPoolId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseDiskPoolIDInsensitively parses 'input' case-insensitively into a DiskPoolId -// note: this method should only be used for API response data and not user input -func ParseDiskPoolIDInsensitively(input string) (*DiskPoolId, error) { - parser := resourceids.NewParserFromResourceIdType(&DiskPoolId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := DiskPoolId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *DiskPoolId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.DiskPoolName, ok = input.Parsed["diskPoolName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "diskPoolName", input) - } - - return nil -} - -// ValidateDiskPoolID checks that 'input' can be parsed as a Disk Pool ID -func ValidateDiskPoolID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseDiskPoolID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Disk Pool ID -func (id DiskPoolId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.StoragePool/diskPools/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.DiskPoolName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Disk Pool ID -func (id DiskPoolId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftStoragePool", "Microsoft.StoragePool", "Microsoft.StoragePool"), - resourceids.StaticSegment("staticDiskPools", "diskPools", "diskPools"), - resourceids.UserSpecifiedSegment("diskPoolName", "diskPoolValue"), - } -} - -// String returns a human-readable description of this Disk Pool ID -func (id DiskPoolId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Disk Pool Name: %q", id.DiskPoolName), - } - return fmt.Sprintf("Disk Pool (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_createorupdate.go deleted file mode 100644 index 191c3406ac7bd..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_createorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package diskpools - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *DiskPool -} - -// CreateOrUpdate ... -func (c DiskPoolsClient) CreateOrUpdate(ctx context.Context, id DiskPoolId, input DiskPoolCreate) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c DiskPoolsClient) CreateOrUpdateThenPoll(ctx context.Context, id DiskPoolId, input DiskPoolCreate) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_deallocate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_deallocate.go deleted file mode 100644 index f90c8adf5abc5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_deallocate.go +++ /dev/null @@ -1,70 +0,0 @@ -package diskpools - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeallocateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Deallocate ... -func (c DiskPoolsClient) Deallocate(ctx context.Context, id DiskPoolId) (result DeallocateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/deallocate", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeallocateThenPoll performs Deallocate then polls until it's completed -func (c DiskPoolsClient) DeallocateThenPoll(ctx context.Context, id DiskPoolId) error { - result, err := c.Deallocate(ctx, id) - if err != nil { - return fmt.Errorf("performing Deallocate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Deallocate: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_delete.go deleted file mode 100644 index d2c30ee1c6363..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package diskpools - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c DiskPoolsClient) Delete(ctx context.Context, id DiskPoolId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c DiskPoolsClient) DeleteThenPoll(ctx context.Context, id DiskPoolId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_get.go deleted file mode 100644 index bc125321b4550..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_get.go +++ /dev/null @@ -1,54 +0,0 @@ -package diskpools - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *DiskPool -} - -// Get ... -func (c DiskPoolsClient) Get(ctx context.Context, id DiskPoolId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model DiskPool - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_listbyresourcegroup.go deleted file mode 100644 index 26cd5f6096166..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_listbyresourcegroup.go +++ /dev/null @@ -1,106 +0,0 @@ -package diskpools - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]DiskPool -} - -type ListByResourceGroupCompleteResult struct { - LatestHttpResponse *http.Response - Items []DiskPool -} - -type ListByResourceGroupCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListByResourceGroup ... -func (c DiskPoolsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListByResourceGroupCustomPager{}, - Path: fmt.Sprintf("%s/providers/Microsoft.StoragePool/diskPools", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]DiskPool `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c DiskPoolsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, DiskPoolOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c DiskPoolsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate DiskPoolOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]DiskPool, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_listbysubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_listbysubscription.go deleted file mode 100644 index 3daf991aa5623..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_listbysubscription.go +++ /dev/null @@ -1,106 +0,0 @@ -package diskpools - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListBySubscriptionOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]DiskPool -} - -type ListBySubscriptionCompleteResult struct { - LatestHttpResponse *http.Response - Items []DiskPool -} - -type ListBySubscriptionCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListBySubscriptionCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListBySubscription ... -func (c DiskPoolsClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListBySubscriptionCustomPager{}, - Path: fmt.Sprintf("%s/providers/Microsoft.StoragePool/diskPools", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]DiskPool `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListBySubscriptionComplete retrieves all the results into a single object -func (c DiskPoolsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, DiskPoolOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c DiskPoolsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate DiskPoolOperationPredicate) (result ListBySubscriptionCompleteResult, err error) { - items := make([]DiskPool, 0) - - resp, err := c.ListBySubscription(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListBySubscriptionCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_listoutboundnetworkdependenciesendpoints.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_listoutboundnetworkdependenciesendpoints.go deleted file mode 100644 index 6a5479f9bd861..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_listoutboundnetworkdependenciesendpoints.go +++ /dev/null @@ -1,105 +0,0 @@ -package diskpools - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOutboundNetworkDependenciesEndpointsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]OutboundEnvironmentEndpoint -} - -type ListOutboundNetworkDependenciesEndpointsCompleteResult struct { - LatestHttpResponse *http.Response - Items []OutboundEnvironmentEndpoint -} - -type ListOutboundNetworkDependenciesEndpointsCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListOutboundNetworkDependenciesEndpointsCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListOutboundNetworkDependenciesEndpoints ... -func (c DiskPoolsClient) ListOutboundNetworkDependenciesEndpoints(ctx context.Context, id DiskPoolId) (result ListOutboundNetworkDependenciesEndpointsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListOutboundNetworkDependenciesEndpointsCustomPager{}, - Path: fmt.Sprintf("%s/outboundNetworkDependenciesEndpoints", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]OutboundEnvironmentEndpoint `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListOutboundNetworkDependenciesEndpointsComplete retrieves all the results into a single object -func (c DiskPoolsClient) ListOutboundNetworkDependenciesEndpointsComplete(ctx context.Context, id DiskPoolId) (ListOutboundNetworkDependenciesEndpointsCompleteResult, error) { - return c.ListOutboundNetworkDependenciesEndpointsCompleteMatchingPredicate(ctx, id, OutboundEnvironmentEndpointOperationPredicate{}) -} - -// ListOutboundNetworkDependenciesEndpointsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c DiskPoolsClient) ListOutboundNetworkDependenciesEndpointsCompleteMatchingPredicate(ctx context.Context, id DiskPoolId, predicate OutboundEnvironmentEndpointOperationPredicate) (result ListOutboundNetworkDependenciesEndpointsCompleteResult, err error) { - items := make([]OutboundEnvironmentEndpoint, 0) - - resp, err := c.ListOutboundNetworkDependenciesEndpoints(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListOutboundNetworkDependenciesEndpointsCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_start.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_start.go deleted file mode 100644 index 0eac65c633215..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_start.go +++ /dev/null @@ -1,70 +0,0 @@ -package diskpools - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StartOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Start ... -func (c DiskPoolsClient) Start(ctx context.Context, id DiskPoolId) (result StartOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/start", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StartThenPoll performs Start then polls until it's completed -func (c DiskPoolsClient) StartThenPoll(ctx context.Context, id DiskPoolId) error { - result, err := c.Start(ctx, id) - if err != nil { - return fmt.Errorf("performing Start: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Start: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_update.go deleted file mode 100644 index 720262e3c681c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_update.go +++ /dev/null @@ -1,75 +0,0 @@ -package diskpools - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *DiskPool -} - -// Update ... -func (c DiskPoolsClient) Update(ctx context.Context, id DiskPoolId, input DiskPoolUpdate) (result UpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpdateThenPoll performs Update then polls until it's completed -func (c DiskPoolsClient) UpdateThenPoll(ctx context.Context, id DiskPoolId, input DiskPoolUpdate) error { - result, err := c.Update(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Update: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Update: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_upgrade.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_upgrade.go deleted file mode 100644 index 73bb4469ab727..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/method_upgrade.go +++ /dev/null @@ -1,70 +0,0 @@ -package diskpools - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpgradeOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Upgrade ... -func (c DiskPoolsClient) Upgrade(ctx context.Context, id DiskPoolId) (result UpgradeOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/upgrade", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpgradeThenPoll performs Upgrade then polls until it's completed -func (c DiskPoolsClient) UpgradeThenPoll(ctx context.Context, id DiskPoolId) error { - result, err := c.Upgrade(ctx, id) - if err != nil { - return fmt.Errorf("performing Upgrade: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Upgrade: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_disk.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_disk.go deleted file mode 100644 index 5bd110a2b277d..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_disk.go +++ /dev/null @@ -1,8 +0,0 @@ -package diskpools - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Disk struct { - Id string `json:"id"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_diskpool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_diskpool.go deleted file mode 100644 index a11e02de48e9b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_diskpool.go +++ /dev/null @@ -1,21 +0,0 @@ -package diskpools - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DiskPool struct { - Id *string `json:"id,omitempty"` - Location string `json:"location"` - ManagedBy *string `json:"managedBy,omitempty"` - ManagedByExtended *[]string `json:"managedByExtended,omitempty"` - Name *string `json:"name,omitempty"` - Properties DiskPoolProperties `json:"properties"` - Sku *Sku `json:"sku,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_diskpoolcreate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_diskpoolcreate.go deleted file mode 100644 index 9156721902b05..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_diskpoolcreate.go +++ /dev/null @@ -1,16 +0,0 @@ -package diskpools - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DiskPoolCreate struct { - Id *string `json:"id,omitempty"` - Location string `json:"location"` - ManagedBy *string `json:"managedBy,omitempty"` - ManagedByExtended *[]string `json:"managedByExtended,omitempty"` - Name *string `json:"name,omitempty"` - Properties DiskPoolCreateProperties `json:"properties"` - Sku Sku `json:"sku"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_diskpoolcreateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_diskpoolcreateproperties.go deleted file mode 100644 index 770341a6995c0..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_diskpoolcreateproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package diskpools - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DiskPoolCreateProperties struct { - AdditionalCapabilities *[]string `json:"additionalCapabilities,omitempty"` - AvailabilityZones *zones.Schema `json:"availabilityZones,omitempty"` - Disks *[]Disk `json:"disks,omitempty"` - SubnetId string `json:"subnetId"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_diskpoolproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_diskpoolproperties.go deleted file mode 100644 index 201a367e624a6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_diskpoolproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package diskpools - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DiskPoolProperties struct { - AdditionalCapabilities *[]string `json:"additionalCapabilities,omitempty"` - AvailabilityZones zones.Schema `json:"availabilityZones"` - Disks *[]Disk `json:"disks,omitempty"` - ProvisioningState ProvisioningStates `json:"provisioningState"` - Status OperationalStatus `json:"status"` - SubnetId string `json:"subnetId"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_diskpoolupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_diskpoolupdate.go deleted file mode 100644 index 8abbaf0906844..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_diskpoolupdate.go +++ /dev/null @@ -1,12 +0,0 @@ -package diskpools - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DiskPoolUpdate struct { - ManagedBy *string `json:"managedBy,omitempty"` - ManagedByExtended *[]string `json:"managedByExtended,omitempty"` - Properties DiskPoolUpdateProperties `json:"properties"` - Sku *Sku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_diskpoolupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_diskpoolupdateproperties.go deleted file mode 100644 index b6ff30943ebfa..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_diskpoolupdateproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package diskpools - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DiskPoolUpdateProperties struct { - Disks *[]Disk `json:"disks,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_endpointdetail.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_endpointdetail.go deleted file mode 100644 index 3d4f7c5ec2d00..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_endpointdetail.go +++ /dev/null @@ -1,11 +0,0 @@ -package diskpools - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EndpointDetail struct { - IPAddress *string `json:"ipAddress,omitempty"` - IsAccessible *bool `json:"isAccessible,omitempty"` - Latency *float64 `json:"latency,omitempty"` - Port *int64 `json:"port,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_sku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_sku.go deleted file mode 100644 index 76bf08b41b845..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/model_sku.go +++ /dev/null @@ -1,9 +0,0 @@ -package diskpools - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Sku struct { - Name string `json:"name"` - Tier *string `json:"tier,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/predicates.go deleted file mode 100644 index 20f67c0afaa4b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/predicates.go +++ /dev/null @@ -1,50 +0,0 @@ -package diskpools - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DiskPoolOperationPredicate struct { - Id *string - Location *string - ManagedBy *string - Name *string - Type *string -} - -func (p DiskPoolOperationPredicate) Matches(input DiskPool) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.ManagedBy != nil && (input.ManagedBy == nil || *p.ManagedBy != *input.ManagedBy) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type OutboundEnvironmentEndpointOperationPredicate struct { - Category *string -} - -func (p OutboundEnvironmentEndpointOperationPredicate) Matches(input OutboundEnvironmentEndpoint) bool { - - if p.Category != nil && (input.Category == nil || *p.Category != *input.Category) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/version.go deleted file mode 100644 index 8686ee1654bfb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package diskpools - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-08-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diskpools/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/README.md deleted file mode 100644 index c652387625aa1..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/README.md +++ /dev/null @@ -1,99 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets` Documentation - -The `iscsitargets` SDK allows for interaction with the Azure Resource Manager Service `storagepool` (API Version `2021-08-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets" -``` - - -### Client Initialization - -```go -client := iscsitargets.NewIscsiTargetsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `IscsiTargetsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := iscsitargets.NewIscsiTargetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskPoolValue", "iscsiTargetValue") - -payload := iscsitargets.IscsiTargetCreate{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `IscsiTargetsClient.Delete` - -```go -ctx := context.TODO() -id := iscsitargets.NewIscsiTargetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskPoolValue", "iscsiTargetValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `IscsiTargetsClient.Get` - -```go -ctx := context.TODO() -id := iscsitargets.NewIscsiTargetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskPoolValue", "iscsiTargetValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `IscsiTargetsClient.ListByDiskPool` - -```go -ctx := context.TODO() -id := iscsitargets.NewDiskPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskPoolValue") - -// alternatively `client.ListByDiskPool(ctx, id)` can be used to do batched pagination -items, err := client.ListByDiskPoolComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `IscsiTargetsClient.Update` - -```go -ctx := context.TODO() -id := iscsitargets.NewIscsiTargetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskPoolValue", "iscsiTargetValue") - -payload := iscsitargets.IscsiTargetUpdate{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/client.go deleted file mode 100644 index fce7ac504d424..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package iscsitargets - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IscsiTargetsClient struct { - Client *resourcemanager.Client -} - -func NewIscsiTargetsClientWithBaseURI(sdkApi sdkEnv.Api) (*IscsiTargetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "iscsitargets", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating IscsiTargetsClient: %+v", err) - } - - return &IscsiTargetsClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/constants.go deleted file mode 100644 index 5993fff06af86..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/constants.go +++ /dev/null @@ -1,169 +0,0 @@ -package iscsitargets - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IscsiTargetAclMode string - -const ( - IscsiTargetAclModeDynamic IscsiTargetAclMode = "Dynamic" - IscsiTargetAclModeStatic IscsiTargetAclMode = "Static" -) - -func PossibleValuesForIscsiTargetAclMode() []string { - return []string{ - string(IscsiTargetAclModeDynamic), - string(IscsiTargetAclModeStatic), - } -} - -func (s *IscsiTargetAclMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIscsiTargetAclMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIscsiTargetAclMode(input string) (*IscsiTargetAclMode, error) { - vals := map[string]IscsiTargetAclMode{ - "dynamic": IscsiTargetAclModeDynamic, - "static": IscsiTargetAclModeStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IscsiTargetAclMode(input) - return &out, nil -} - -type OperationalStatus string - -const ( - OperationalStatusHealthy OperationalStatus = "Healthy" - OperationalStatusInvalid OperationalStatus = "Invalid" - OperationalStatusRunning OperationalStatus = "Running" - OperationalStatusStopped OperationalStatus = "Stopped" - OperationalStatusStoppedDeallocated OperationalStatus = "Stopped (deallocated)" - OperationalStatusUnhealthy OperationalStatus = "Unhealthy" - OperationalStatusUnknown OperationalStatus = "Unknown" - OperationalStatusUpdating OperationalStatus = "Updating" -) - -func PossibleValuesForOperationalStatus() []string { - return []string{ - string(OperationalStatusHealthy), - string(OperationalStatusInvalid), - string(OperationalStatusRunning), - string(OperationalStatusStopped), - string(OperationalStatusStoppedDeallocated), - string(OperationalStatusUnhealthy), - string(OperationalStatusUnknown), - string(OperationalStatusUpdating), - } -} - -func (s *OperationalStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOperationalStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOperationalStatus(input string) (*OperationalStatus, error) { - vals := map[string]OperationalStatus{ - "healthy": OperationalStatusHealthy, - "invalid": OperationalStatusInvalid, - "running": OperationalStatusRunning, - "stopped": OperationalStatusStopped, - "stopped (deallocated)": OperationalStatusStoppedDeallocated, - "unhealthy": OperationalStatusUnhealthy, - "unknown": OperationalStatusUnknown, - "updating": OperationalStatusUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OperationalStatus(input) - return &out, nil -} - -type ProvisioningStates string - -const ( - ProvisioningStatesCanceled ProvisioningStates = "Canceled" - ProvisioningStatesCreating ProvisioningStates = "Creating" - ProvisioningStatesDeleting ProvisioningStates = "Deleting" - ProvisioningStatesFailed ProvisioningStates = "Failed" - ProvisioningStatesInvalid ProvisioningStates = "Invalid" - ProvisioningStatesPending ProvisioningStates = "Pending" - ProvisioningStatesSucceeded ProvisioningStates = "Succeeded" - ProvisioningStatesUpdating ProvisioningStates = "Updating" -) - -func PossibleValuesForProvisioningStates() []string { - return []string{ - string(ProvisioningStatesCanceled), - string(ProvisioningStatesCreating), - string(ProvisioningStatesDeleting), - string(ProvisioningStatesFailed), - string(ProvisioningStatesInvalid), - string(ProvisioningStatesPending), - string(ProvisioningStatesSucceeded), - string(ProvisioningStatesUpdating), - } -} - -func (s *ProvisioningStates) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningStates(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningStates(input string) (*ProvisioningStates, error) { - vals := map[string]ProvisioningStates{ - "canceled": ProvisioningStatesCanceled, - "creating": ProvisioningStatesCreating, - "deleting": ProvisioningStatesDeleting, - "failed": ProvisioningStatesFailed, - "invalid": ProvisioningStatesInvalid, - "pending": ProvisioningStatesPending, - "succeeded": ProvisioningStatesSucceeded, - "updating": ProvisioningStatesUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningStates(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/id_diskpool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/id_diskpool.go deleted file mode 100644 index 8d9389d31f3bf..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/id_diskpool.go +++ /dev/null @@ -1,130 +0,0 @@ -package iscsitargets - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&DiskPoolId{}) -} - -var _ resourceids.ResourceId = &DiskPoolId{} - -// DiskPoolId is a struct representing the Resource ID for a Disk Pool -type DiskPoolId struct { - SubscriptionId string - ResourceGroupName string - DiskPoolName string -} - -// NewDiskPoolID returns a new DiskPoolId struct -func NewDiskPoolID(subscriptionId string, resourceGroupName string, diskPoolName string) DiskPoolId { - return DiskPoolId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - DiskPoolName: diskPoolName, - } -} - -// ParseDiskPoolID parses 'input' into a DiskPoolId -func ParseDiskPoolID(input string) (*DiskPoolId, error) { - parser := resourceids.NewParserFromResourceIdType(&DiskPoolId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := DiskPoolId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseDiskPoolIDInsensitively parses 'input' case-insensitively into a DiskPoolId -// note: this method should only be used for API response data and not user input -func ParseDiskPoolIDInsensitively(input string) (*DiskPoolId, error) { - parser := resourceids.NewParserFromResourceIdType(&DiskPoolId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := DiskPoolId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *DiskPoolId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.DiskPoolName, ok = input.Parsed["diskPoolName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "diskPoolName", input) - } - - return nil -} - -// ValidateDiskPoolID checks that 'input' can be parsed as a Disk Pool ID -func ValidateDiskPoolID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseDiskPoolID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Disk Pool ID -func (id DiskPoolId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.StoragePool/diskPools/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.DiskPoolName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Disk Pool ID -func (id DiskPoolId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftStoragePool", "Microsoft.StoragePool", "Microsoft.StoragePool"), - resourceids.StaticSegment("staticDiskPools", "diskPools", "diskPools"), - resourceids.UserSpecifiedSegment("diskPoolName", "diskPoolValue"), - } -} - -// String returns a human-readable description of this Disk Pool ID -func (id DiskPoolId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Disk Pool Name: %q", id.DiskPoolName), - } - return fmt.Sprintf("Disk Pool (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/id_iscsitarget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/id_iscsitarget.go deleted file mode 100644 index 5e041793deea6..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/id_iscsitarget.go +++ /dev/null @@ -1,139 +0,0 @@ -package iscsitargets - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&IscsiTargetId{}) -} - -var _ resourceids.ResourceId = &IscsiTargetId{} - -// IscsiTargetId is a struct representing the Resource ID for a Iscsi Target -type IscsiTargetId struct { - SubscriptionId string - ResourceGroupName string - DiskPoolName string - IscsiTargetName string -} - -// NewIscsiTargetID returns a new IscsiTargetId struct -func NewIscsiTargetID(subscriptionId string, resourceGroupName string, diskPoolName string, iscsiTargetName string) IscsiTargetId { - return IscsiTargetId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - DiskPoolName: diskPoolName, - IscsiTargetName: iscsiTargetName, - } -} - -// ParseIscsiTargetID parses 'input' into a IscsiTargetId -func ParseIscsiTargetID(input string) (*IscsiTargetId, error) { - parser := resourceids.NewParserFromResourceIdType(&IscsiTargetId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := IscsiTargetId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseIscsiTargetIDInsensitively parses 'input' case-insensitively into a IscsiTargetId -// note: this method should only be used for API response data and not user input -func ParseIscsiTargetIDInsensitively(input string) (*IscsiTargetId, error) { - parser := resourceids.NewParserFromResourceIdType(&IscsiTargetId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := IscsiTargetId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *IscsiTargetId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.DiskPoolName, ok = input.Parsed["diskPoolName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "diskPoolName", input) - } - - if id.IscsiTargetName, ok = input.Parsed["iscsiTargetName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "iscsiTargetName", input) - } - - return nil -} - -// ValidateIscsiTargetID checks that 'input' can be parsed as a Iscsi Target ID -func ValidateIscsiTargetID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseIscsiTargetID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Iscsi Target ID -func (id IscsiTargetId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.StoragePool/diskPools/%s/iscsiTargets/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.DiskPoolName, id.IscsiTargetName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Iscsi Target ID -func (id IscsiTargetId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftStoragePool", "Microsoft.StoragePool", "Microsoft.StoragePool"), - resourceids.StaticSegment("staticDiskPools", "diskPools", "diskPools"), - resourceids.UserSpecifiedSegment("diskPoolName", "diskPoolValue"), - resourceids.StaticSegment("staticIscsiTargets", "iscsiTargets", "iscsiTargets"), - resourceids.UserSpecifiedSegment("iscsiTargetName", "iscsiTargetValue"), - } -} - -// String returns a human-readable description of this Iscsi Target ID -func (id IscsiTargetId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Disk Pool Name: %q", id.DiskPoolName), - fmt.Sprintf("Iscsi Target Name: %q", id.IscsiTargetName), - } - return fmt.Sprintf("Iscsi Target (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/method_createorupdate.go deleted file mode 100644 index 1e2518dbc8929..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/method_createorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package iscsitargets - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *IscsiTarget -} - -// CreateOrUpdate ... -func (c IscsiTargetsClient) CreateOrUpdate(ctx context.Context, id IscsiTargetId, input IscsiTargetCreate) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c IscsiTargetsClient) CreateOrUpdateThenPoll(ctx context.Context, id IscsiTargetId, input IscsiTargetCreate) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/method_delete.go deleted file mode 100644 index eb9237fba2ccb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package iscsitargets - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c IscsiTargetsClient) Delete(ctx context.Context, id IscsiTargetId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c IscsiTargetsClient) DeleteThenPoll(ctx context.Context, id IscsiTargetId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/method_get.go deleted file mode 100644 index 1a4eff6b70efb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/method_get.go +++ /dev/null @@ -1,54 +0,0 @@ -package iscsitargets - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *IscsiTarget -} - -// Get ... -func (c IscsiTargetsClient) Get(ctx context.Context, id IscsiTargetId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model IscsiTarget - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/method_listbydiskpool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/method_listbydiskpool.go deleted file mode 100644 index 3af7d86a1c461..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/method_listbydiskpool.go +++ /dev/null @@ -1,105 +0,0 @@ -package iscsitargets - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByDiskPoolOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]IscsiTarget -} - -type ListByDiskPoolCompleteResult struct { - LatestHttpResponse *http.Response - Items []IscsiTarget -} - -type ListByDiskPoolCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListByDiskPoolCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListByDiskPool ... -func (c IscsiTargetsClient) ListByDiskPool(ctx context.Context, id DiskPoolId) (result ListByDiskPoolOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListByDiskPoolCustomPager{}, - Path: fmt.Sprintf("%s/iscsiTargets", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]IscsiTarget `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByDiskPoolComplete retrieves all the results into a single object -func (c IscsiTargetsClient) ListByDiskPoolComplete(ctx context.Context, id DiskPoolId) (ListByDiskPoolCompleteResult, error) { - return c.ListByDiskPoolCompleteMatchingPredicate(ctx, id, IscsiTargetOperationPredicate{}) -} - -// ListByDiskPoolCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c IscsiTargetsClient) ListByDiskPoolCompleteMatchingPredicate(ctx context.Context, id DiskPoolId, predicate IscsiTargetOperationPredicate) (result ListByDiskPoolCompleteResult, err error) { - items := make([]IscsiTarget, 0) - - resp, err := c.ListByDiskPool(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByDiskPoolCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/method_update.go deleted file mode 100644 index 304fa7d214f84..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/method_update.go +++ /dev/null @@ -1,75 +0,0 @@ -package iscsitargets - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *IscsiTarget -} - -// Update ... -func (c IscsiTargetsClient) Update(ctx context.Context, id IscsiTargetId, input IscsiTargetUpdate) (result UpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpdateThenPoll performs Update then polls until it's completed -func (c IscsiTargetsClient) UpdateThenPoll(ctx context.Context, id IscsiTargetId, input IscsiTargetUpdate) error { - result, err := c.Update(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Update: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Update: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/model_acl.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/model_acl.go deleted file mode 100644 index e226273847cda..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/model_acl.go +++ /dev/null @@ -1,9 +0,0 @@ -package iscsitargets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Acl struct { - InitiatorIqn string `json:"initiatorIqn"` - MappedLuns []string `json:"mappedLuns"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/model_iscsilun.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/model_iscsilun.go deleted file mode 100644 index 41fe11bbd4727..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/model_iscsilun.go +++ /dev/null @@ -1,10 +0,0 @@ -package iscsitargets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IscsiLun struct { - Lun *int64 `json:"lun,omitempty"` - ManagedDiskAzureResourceId string `json:"managedDiskAzureResourceId"` - Name string `json:"name"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/model_iscsitarget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/model_iscsitarget.go deleted file mode 100644 index 29d18584c2293..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/model_iscsitarget.go +++ /dev/null @@ -1,18 +0,0 @@ -package iscsitargets - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IscsiTarget struct { - Id *string `json:"id,omitempty"` - ManagedBy *string `json:"managedBy,omitempty"` - ManagedByExtended *[]string `json:"managedByExtended,omitempty"` - Name *string `json:"name,omitempty"` - Properties IscsiTargetProperties `json:"properties"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/model_iscsitargetcreate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/model_iscsitargetcreate.go deleted file mode 100644 index 26bd1fdb5f6f5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/model_iscsitargetcreate.go +++ /dev/null @@ -1,13 +0,0 @@ -package iscsitargets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IscsiTargetCreate struct { - Id *string `json:"id,omitempty"` - ManagedBy *string `json:"managedBy,omitempty"` - ManagedByExtended *[]string `json:"managedByExtended,omitempty"` - Name *string `json:"name,omitempty"` - Properties IscsiTargetCreateProperties `json:"properties"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/model_iscsitargetcreateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/model_iscsitargetcreateproperties.go deleted file mode 100644 index 7104b385e81f5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/model_iscsitargetcreateproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package iscsitargets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IscsiTargetCreateProperties struct { - AclMode IscsiTargetAclMode `json:"aclMode"` - Luns *[]IscsiLun `json:"luns,omitempty"` - StaticAcls *[]Acl `json:"staticAcls,omitempty"` - TargetIqn *string `json:"targetIqn,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/model_iscsitargetproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/model_iscsitargetproperties.go deleted file mode 100644 index 217dfacfeb49b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/model_iscsitargetproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package iscsitargets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IscsiTargetProperties struct { - AclMode IscsiTargetAclMode `json:"aclMode"` - Endpoints *[]string `json:"endpoints,omitempty"` - Luns *[]IscsiLun `json:"luns,omitempty"` - Port *int64 `json:"port,omitempty"` - ProvisioningState ProvisioningStates `json:"provisioningState"` - Sessions *[]string `json:"sessions,omitempty"` - StaticAcls *[]Acl `json:"staticAcls,omitempty"` - Status OperationalStatus `json:"status"` - TargetIqn string `json:"targetIqn"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/model_iscsitargetupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/model_iscsitargetupdate.go deleted file mode 100644 index 9117a648102d3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/model_iscsitargetupdate.go +++ /dev/null @@ -1,13 +0,0 @@ -package iscsitargets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IscsiTargetUpdate struct { - Id *string `json:"id,omitempty"` - ManagedBy *string `json:"managedBy,omitempty"` - ManagedByExtended *[]string `json:"managedByExtended,omitempty"` - Name *string `json:"name,omitempty"` - Properties IscsiTargetUpdateProperties `json:"properties"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/model_iscsitargetupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/model_iscsitargetupdateproperties.go deleted file mode 100644 index e28495520d6cf..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/model_iscsitargetupdateproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package iscsitargets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IscsiTargetUpdateProperties struct { - Luns *[]IscsiLun `json:"luns,omitempty"` - StaticAcls *[]Acl `json:"staticAcls,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/predicates.go deleted file mode 100644 index 23164b6dbb9ce..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package iscsitargets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IscsiTargetOperationPredicate struct { - Id *string - ManagedBy *string - Name *string - Type *string -} - -func (p IscsiTargetOperationPredicate) Matches(input IscsiTarget) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.ManagedBy != nil && (input.ManagedBy == nil || *p.ManagedBy != *input.ManagedBy) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/version.go deleted file mode 100644 index 61f14016ec9d3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package iscsitargets - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-08-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/iscsitargets/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/README.md deleted file mode 100644 index f2675f9250742..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/README.md +++ /dev/null @@ -1,111 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules` Documentation - -The `edgemodules` SDK allows for interaction with the Azure Resource Manager Service `videoanalyzer` (API Version `2021-05-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules" -``` - - -### Client Initialization - -```go -client := edgemodules.NewEdgeModulesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `EdgeModulesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := edgemodules.NewEdgeModuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "videoAnalyzerValue", "edgeModuleValue") - -payload := edgemodules.EdgeModuleEntity{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EdgeModulesClient.Delete` - -```go -ctx := context.TODO() -id := edgemodules.NewEdgeModuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "videoAnalyzerValue", "edgeModuleValue") - -read, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EdgeModulesClient.Get` - -```go -ctx := context.TODO() -id := edgemodules.NewEdgeModuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "videoAnalyzerValue", "edgeModuleValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EdgeModulesClient.List` - -```go -ctx := context.TODO() -id := edgemodules.NewVideoAnalyzerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "videoAnalyzerValue") - -// alternatively `client.List(ctx, id, edgemodules.DefaultListOperationOptions())` can be used to do batched pagination -items, err := client.ListComplete(ctx, id, edgemodules.DefaultListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `EdgeModulesClient.ListProvisioningToken` - -```go -ctx := context.TODO() -id := edgemodules.NewEdgeModuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "videoAnalyzerValue", "edgeModuleValue") - -payload := edgemodules.ListProvisioningTokenInput{ - // ... -} - - -read, err := client.ListProvisioningToken(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/client.go deleted file mode 100644 index 87405273a850c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package edgemodules - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EdgeModulesClient struct { - Client *resourcemanager.Client -} - -func NewEdgeModulesClientWithBaseURI(sdkApi sdkEnv.Api) (*EdgeModulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "edgemodules", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating EdgeModulesClient: %+v", err) - } - - return &EdgeModulesClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/id_edgemodule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/id_edgemodule.go deleted file mode 100644 index bbe31c301228e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/id_edgemodule.go +++ /dev/null @@ -1,139 +0,0 @@ -package edgemodules - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&EdgeModuleId{}) -} - -var _ resourceids.ResourceId = &EdgeModuleId{} - -// EdgeModuleId is a struct representing the Resource ID for a Edge Module -type EdgeModuleId struct { - SubscriptionId string - ResourceGroupName string - VideoAnalyzerName string - EdgeModuleName string -} - -// NewEdgeModuleID returns a new EdgeModuleId struct -func NewEdgeModuleID(subscriptionId string, resourceGroupName string, videoAnalyzerName string, edgeModuleName string) EdgeModuleId { - return EdgeModuleId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VideoAnalyzerName: videoAnalyzerName, - EdgeModuleName: edgeModuleName, - } -} - -// ParseEdgeModuleID parses 'input' into a EdgeModuleId -func ParseEdgeModuleID(input string) (*EdgeModuleId, error) { - parser := resourceids.NewParserFromResourceIdType(&EdgeModuleId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := EdgeModuleId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseEdgeModuleIDInsensitively parses 'input' case-insensitively into a EdgeModuleId -// note: this method should only be used for API response data and not user input -func ParseEdgeModuleIDInsensitively(input string) (*EdgeModuleId, error) { - parser := resourceids.NewParserFromResourceIdType(&EdgeModuleId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := EdgeModuleId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *EdgeModuleId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.VideoAnalyzerName, ok = input.Parsed["videoAnalyzerName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "videoAnalyzerName", input) - } - - if id.EdgeModuleName, ok = input.Parsed["edgeModuleName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "edgeModuleName", input) - } - - return nil -} - -// ValidateEdgeModuleID checks that 'input' can be parsed as a Edge Module ID -func ValidateEdgeModuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseEdgeModuleID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Edge Module ID -func (id EdgeModuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/videoAnalyzers/%s/edgeModules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VideoAnalyzerName, id.EdgeModuleName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Edge Module ID -func (id EdgeModuleId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticVideoAnalyzers", "videoAnalyzers", "videoAnalyzers"), - resourceids.UserSpecifiedSegment("videoAnalyzerName", "videoAnalyzerValue"), - resourceids.StaticSegment("staticEdgeModules", "edgeModules", "edgeModules"), - resourceids.UserSpecifiedSegment("edgeModuleName", "edgeModuleValue"), - } -} - -// String returns a human-readable description of this Edge Module ID -func (id EdgeModuleId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Video Analyzer Name: %q", id.VideoAnalyzerName), - fmt.Sprintf("Edge Module Name: %q", id.EdgeModuleName), - } - return fmt.Sprintf("Edge Module (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/id_videoanalyzer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/id_videoanalyzer.go deleted file mode 100644 index 3b95e75e7fb3a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/id_videoanalyzer.go +++ /dev/null @@ -1,130 +0,0 @@ -package edgemodules - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&VideoAnalyzerId{}) -} - -var _ resourceids.ResourceId = &VideoAnalyzerId{} - -// VideoAnalyzerId is a struct representing the Resource ID for a Video Analyzer -type VideoAnalyzerId struct { - SubscriptionId string - ResourceGroupName string - VideoAnalyzerName string -} - -// NewVideoAnalyzerID returns a new VideoAnalyzerId struct -func NewVideoAnalyzerID(subscriptionId string, resourceGroupName string, videoAnalyzerName string) VideoAnalyzerId { - return VideoAnalyzerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VideoAnalyzerName: videoAnalyzerName, - } -} - -// ParseVideoAnalyzerID parses 'input' into a VideoAnalyzerId -func ParseVideoAnalyzerID(input string) (*VideoAnalyzerId, error) { - parser := resourceids.NewParserFromResourceIdType(&VideoAnalyzerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := VideoAnalyzerId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseVideoAnalyzerIDInsensitively parses 'input' case-insensitively into a VideoAnalyzerId -// note: this method should only be used for API response data and not user input -func ParseVideoAnalyzerIDInsensitively(input string) (*VideoAnalyzerId, error) { - parser := resourceids.NewParserFromResourceIdType(&VideoAnalyzerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := VideoAnalyzerId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *VideoAnalyzerId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.VideoAnalyzerName, ok = input.Parsed["videoAnalyzerName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "videoAnalyzerName", input) - } - - return nil -} - -// ValidateVideoAnalyzerID checks that 'input' can be parsed as a Video Analyzer ID -func ValidateVideoAnalyzerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVideoAnalyzerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Video Analyzer ID -func (id VideoAnalyzerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/videoAnalyzers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VideoAnalyzerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Video Analyzer ID -func (id VideoAnalyzerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticVideoAnalyzers", "videoAnalyzers", "videoAnalyzers"), - resourceids.UserSpecifiedSegment("videoAnalyzerName", "videoAnalyzerValue"), - } -} - -// String returns a human-readable description of this Video Analyzer ID -func (id VideoAnalyzerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Video Analyzer Name: %q", id.VideoAnalyzerName), - } - return fmt.Sprintf("Video Analyzer (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_createorupdate.go deleted file mode 100644 index 76e45332fb36e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_createorupdate.go +++ /dev/null @@ -1,59 +0,0 @@ -package edgemodules - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *EdgeModuleEntity -} - -// CreateOrUpdate ... -func (c EdgeModulesClient) CreateOrUpdate(ctx context.Context, id EdgeModuleId, input EdgeModuleEntity) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model EdgeModuleEntity - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_delete.go deleted file mode 100644 index 9444373021d5e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_delete.go +++ /dev/null @@ -1,47 +0,0 @@ -package edgemodules - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c EdgeModulesClient) Delete(ctx context.Context, id EdgeModuleId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_get.go deleted file mode 100644 index 426c166398b01..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_get.go +++ /dev/null @@ -1,54 +0,0 @@ -package edgemodules - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *EdgeModuleEntity -} - -// Get ... -func (c EdgeModulesClient) Get(ctx context.Context, id EdgeModuleId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model EdgeModuleEntity - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_list.go deleted file mode 100644 index fa58a24793286..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_list.go +++ /dev/null @@ -1,141 +0,0 @@ -package edgemodules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]EdgeModuleEntity -} - -type ListCompleteResult struct { - LatestHttpResponse *http.Response - Items []EdgeModuleEntity -} - -type ListOperationOptions struct { - Filter *string - Orderby *string - Top *int64 -} - -func DefaultListOperationOptions() ListOperationOptions { - return ListOperationOptions{} -} - -func (o ListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Filter != nil { - out.Append("$filter", fmt.Sprintf("%v", *o.Filter)) - } - if o.Orderby != nil { - out.Append("$orderby", fmt.Sprintf("%v", *o.Orderby)) - } - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -type ListCustomPager struct { - NextLink *odata.Link `json:"@nextLink"` -} - -func (p *ListCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// List ... -func (c EdgeModulesClient) List(ctx context.Context, id VideoAnalyzerId, options ListOperationOptions) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - OptionsObject: options, - Pager: &ListCustomPager{}, - Path: fmt.Sprintf("%s/edgeModules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]EdgeModuleEntity `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c EdgeModulesClient) ListComplete(ctx context.Context, id VideoAnalyzerId, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, options, EdgeModuleEntityOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c EdgeModulesClient) ListCompleteMatchingPredicate(ctx context.Context, id VideoAnalyzerId, options ListOperationOptions, predicate EdgeModuleEntityOperationPredicate) (result ListCompleteResult, err error) { - items := make([]EdgeModuleEntity, 0) - - resp, err := c.List(ctx, id, options) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_listprovisioningtoken.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_listprovisioningtoken.go deleted file mode 100644 index 121378bbcc89f..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_listprovisioningtoken.go +++ /dev/null @@ -1,59 +0,0 @@ -package edgemodules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListProvisioningTokenOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *EdgeModuleProvisioningToken -} - -// ListProvisioningToken ... -func (c EdgeModulesClient) ListProvisioningToken(ctx context.Context, id EdgeModuleId, input ListProvisioningTokenInput) (result ListProvisioningTokenOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listProvisioningToken", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model EdgeModuleProvisioningToken - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/model_edgemoduleentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/model_edgemoduleentity.go deleted file mode 100644 index d1a3fa65bcb67..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/model_edgemoduleentity.go +++ /dev/null @@ -1,16 +0,0 @@ -package edgemodules - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EdgeModuleEntity struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *EdgeModuleProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/model_edgemoduleproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/model_edgemoduleproperties.go deleted file mode 100644 index dd298c382ab84..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/model_edgemoduleproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package edgemodules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EdgeModuleProperties struct { - EdgeModuleId *string `json:"edgeModuleId,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/model_edgemoduleprovisioningtoken.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/model_edgemoduleprovisioningtoken.go deleted file mode 100644 index 86022d2bf166c..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/model_edgemoduleprovisioningtoken.go +++ /dev/null @@ -1,27 +0,0 @@ -package edgemodules - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EdgeModuleProvisioningToken struct { - ExpirationDate *string `json:"expirationDate,omitempty"` - Token *string `json:"token,omitempty"` -} - -func (o *EdgeModuleProvisioningToken) GetExpirationDateAsTime() (*time.Time, error) { - if o.ExpirationDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ExpirationDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *EdgeModuleProvisioningToken) SetExpirationDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ExpirationDate = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/model_listprovisioningtokeninput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/model_listprovisioningtokeninput.go deleted file mode 100644 index ae06f6b8fdeeb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/model_listprovisioningtokeninput.go +++ /dev/null @@ -1,23 +0,0 @@ -package edgemodules - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListProvisioningTokenInput struct { - ExpirationDate string `json:"expirationDate"` -} - -func (o *ListProvisioningTokenInput) GetExpirationDateAsTime() (*time.Time, error) { - return dates.ParseAsFormat(&o.ExpirationDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *ListProvisioningTokenInput) SetExpirationDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ExpirationDate = formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/predicates.go deleted file mode 100644 index 5962467106db7..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package edgemodules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EdgeModuleEntityOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p EdgeModuleEntityOperationPredicate) Matches(input EdgeModuleEntity) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/version.go deleted file mode 100644 index 037c0dfcd38c8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package edgemodules - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-05-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/edgemodules/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/README.md deleted file mode 100644 index ee7261b7dbfea..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/README.md +++ /dev/null @@ -1,169 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers` Documentation - -The `videoanalyzers` SDK allows for interaction with the Azure Resource Manager Service `videoanalyzer` (API Version `2021-05-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers" -``` - - -### Client Initialization - -```go -client := videoanalyzers.NewVideoAnalyzersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VideoAnalyzersClient.LocationsCheckNameAvailability` - -```go -ctx := context.TODO() -id := videoanalyzers.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -payload := videoanalyzers.CheckNameAvailabilityRequest{ - // ... -} - - -read, err := client.LocationsCheckNameAvailability(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VideoAnalyzersClient.VideoAnalyzersCreateOrUpdate` - -```go -ctx := context.TODO() -id := videoanalyzers.NewVideoAnalyzerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "videoAnalyzerValue") - -payload := videoanalyzers.VideoAnalyzer{ - // ... -} - - -read, err := client.VideoAnalyzersCreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VideoAnalyzersClient.VideoAnalyzersDelete` - -```go -ctx := context.TODO() -id := videoanalyzers.NewVideoAnalyzerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "videoAnalyzerValue") - -read, err := client.VideoAnalyzersDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VideoAnalyzersClient.VideoAnalyzersGet` - -```go -ctx := context.TODO() -id := videoanalyzers.NewVideoAnalyzerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "videoAnalyzerValue") - -read, err := client.VideoAnalyzersGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VideoAnalyzersClient.VideoAnalyzersList` - -```go -ctx := context.TODO() -id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -read, err := client.VideoAnalyzersList(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VideoAnalyzersClient.VideoAnalyzersListBySubscription` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -read, err := client.VideoAnalyzersListBySubscription(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VideoAnalyzersClient.VideoAnalyzersSyncStorageKeys` - -```go -ctx := context.TODO() -id := videoanalyzers.NewVideoAnalyzerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "videoAnalyzerValue") - -payload := videoanalyzers.SyncStorageKeysInput{ - // ... -} - - -read, err := client.VideoAnalyzersSyncStorageKeys(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VideoAnalyzersClient.VideoAnalyzersUpdate` - -```go -ctx := context.TODO() -id := videoanalyzers.NewVideoAnalyzerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "videoAnalyzerValue") - -payload := videoanalyzers.VideoAnalyzerUpdate{ - // ... -} - - -read, err := client.VideoAnalyzersUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/client.go deleted file mode 100644 index eb501d36bdf0a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package videoanalyzers - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VideoAnalyzersClient struct { - Client *resourcemanager.Client -} - -func NewVideoAnalyzersClientWithBaseURI(sdkApi sdkEnv.Api) (*VideoAnalyzersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "videoanalyzers", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VideoAnalyzersClient: %+v", err) - } - - return &VideoAnalyzersClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/constants.go deleted file mode 100644 index a3434279c5899..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/constants.go +++ /dev/null @@ -1,130 +0,0 @@ -package videoanalyzers - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountEncryptionKeyType string - -const ( - AccountEncryptionKeyTypeCustomerKey AccountEncryptionKeyType = "CustomerKey" - AccountEncryptionKeyTypeSystemKey AccountEncryptionKeyType = "SystemKey" -) - -func PossibleValuesForAccountEncryptionKeyType() []string { - return []string{ - string(AccountEncryptionKeyTypeCustomerKey), - string(AccountEncryptionKeyTypeSystemKey), - } -} - -func (s *AccountEncryptionKeyType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAccountEncryptionKeyType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAccountEncryptionKeyType(input string) (*AccountEncryptionKeyType, error) { - vals := map[string]AccountEncryptionKeyType{ - "customerkey": AccountEncryptionKeyTypeCustomerKey, - "systemkey": AccountEncryptionKeyTypeSystemKey, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AccountEncryptionKeyType(input) - return &out, nil -} - -type CheckNameAvailabilityReason string - -const ( - CheckNameAvailabilityReasonAlreadyExists CheckNameAvailabilityReason = "AlreadyExists" - CheckNameAvailabilityReasonInvalid CheckNameAvailabilityReason = "Invalid" -) - -func PossibleValuesForCheckNameAvailabilityReason() []string { - return []string{ - string(CheckNameAvailabilityReasonAlreadyExists), - string(CheckNameAvailabilityReasonInvalid), - } -} - -func (s *CheckNameAvailabilityReason) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCheckNameAvailabilityReason(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCheckNameAvailabilityReason(input string) (*CheckNameAvailabilityReason, error) { - vals := map[string]CheckNameAvailabilityReason{ - "alreadyexists": CheckNameAvailabilityReasonAlreadyExists, - "invalid": CheckNameAvailabilityReasonInvalid, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CheckNameAvailabilityReason(input) - return &out, nil -} - -type VideoAnalyzerEndpointType string - -const ( - VideoAnalyzerEndpointTypeClientApi VideoAnalyzerEndpointType = "ClientApi" -) - -func PossibleValuesForVideoAnalyzerEndpointType() []string { - return []string{ - string(VideoAnalyzerEndpointTypeClientApi), - } -} - -func (s *VideoAnalyzerEndpointType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVideoAnalyzerEndpointType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVideoAnalyzerEndpointType(input string) (*VideoAnalyzerEndpointType, error) { - vals := map[string]VideoAnalyzerEndpointType{ - "clientapi": VideoAnalyzerEndpointTypeClientApi, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VideoAnalyzerEndpointType(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/id_location.go deleted file mode 100644 index 1a4d8cc23dfcb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/id_location.go +++ /dev/null @@ -1,121 +0,0 @@ -package videoanalyzers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&LocationId{}) -} - -var _ resourceids.ResourceId = &LocationId{} - -// LocationId is a struct representing the Resource ID for a Location -type LocationId struct { - SubscriptionId string - LocationName string -} - -// NewLocationID returns a new LocationId struct -func NewLocationID(subscriptionId string, locationName string) LocationId { - return LocationId{ - SubscriptionId: subscriptionId, - LocationName: locationName, - } -} - -// ParseLocationID parses 'input' into a LocationId -func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(&LocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId -// note: this method should only be used for API response data and not user input -func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(&LocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.LocationName, ok = input.Parsed["locationName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) - } - - return nil -} - -// ValidateLocationID checks that 'input' can be parsed as a Location ID -func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Location ID -func (id LocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Media/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Location ID -func (id LocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Location ID -func (id LocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/id_videoanalyzer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/id_videoanalyzer.go deleted file mode 100644 index b7a89b47507c5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/id_videoanalyzer.go +++ /dev/null @@ -1,130 +0,0 @@ -package videoanalyzers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&VideoAnalyzerId{}) -} - -var _ resourceids.ResourceId = &VideoAnalyzerId{} - -// VideoAnalyzerId is a struct representing the Resource ID for a Video Analyzer -type VideoAnalyzerId struct { - SubscriptionId string - ResourceGroupName string - VideoAnalyzerName string -} - -// NewVideoAnalyzerID returns a new VideoAnalyzerId struct -func NewVideoAnalyzerID(subscriptionId string, resourceGroupName string, videoAnalyzerName string) VideoAnalyzerId { - return VideoAnalyzerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VideoAnalyzerName: videoAnalyzerName, - } -} - -// ParseVideoAnalyzerID parses 'input' into a VideoAnalyzerId -func ParseVideoAnalyzerID(input string) (*VideoAnalyzerId, error) { - parser := resourceids.NewParserFromResourceIdType(&VideoAnalyzerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := VideoAnalyzerId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseVideoAnalyzerIDInsensitively parses 'input' case-insensitively into a VideoAnalyzerId -// note: this method should only be used for API response data and not user input -func ParseVideoAnalyzerIDInsensitively(input string) (*VideoAnalyzerId, error) { - parser := resourceids.NewParserFromResourceIdType(&VideoAnalyzerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := VideoAnalyzerId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *VideoAnalyzerId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.VideoAnalyzerName, ok = input.Parsed["videoAnalyzerName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "videoAnalyzerName", input) - } - - return nil -} - -// ValidateVideoAnalyzerID checks that 'input' can be parsed as a Video Analyzer ID -func ValidateVideoAnalyzerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVideoAnalyzerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Video Analyzer ID -func (id VideoAnalyzerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/videoAnalyzers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VideoAnalyzerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Video Analyzer ID -func (id VideoAnalyzerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticVideoAnalyzers", "videoAnalyzers", "videoAnalyzers"), - resourceids.UserSpecifiedSegment("videoAnalyzerName", "videoAnalyzerValue"), - } -} - -// String returns a human-readable description of this Video Analyzer ID -func (id VideoAnalyzerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Video Analyzer Name: %q", id.VideoAnalyzerName), - } - return fmt.Sprintf("Video Analyzer (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_locationschecknameavailability.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_locationschecknameavailability.go deleted file mode 100644 index 82f7fe624e594..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_locationschecknameavailability.go +++ /dev/null @@ -1,59 +0,0 @@ -package videoanalyzers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LocationsCheckNameAvailabilityOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *CheckNameAvailabilityResponse -} - -// LocationsCheckNameAvailability ... -func (c VideoAnalyzersClient) LocationsCheckNameAvailability(ctx context.Context, id LocationId, input CheckNameAvailabilityRequest) (result LocationsCheckNameAvailabilityOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/checkNameAvailability", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model CheckNameAvailabilityResponse - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzerscreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzerscreateorupdate.go deleted file mode 100644 index a13667a0a4cd8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzerscreateorupdate.go +++ /dev/null @@ -1,59 +0,0 @@ -package videoanalyzers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VideoAnalyzersCreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VideoAnalyzer -} - -// VideoAnalyzersCreateOrUpdate ... -func (c VideoAnalyzersClient) VideoAnalyzersCreateOrUpdate(ctx context.Context, id VideoAnalyzerId, input VideoAnalyzer) (result VideoAnalyzersCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model VideoAnalyzer - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzersdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzersdelete.go deleted file mode 100644 index 73a9e51b949f9..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzersdelete.go +++ /dev/null @@ -1,47 +0,0 @@ -package videoanalyzers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VideoAnalyzersDeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// VideoAnalyzersDelete ... -func (c VideoAnalyzersClient) VideoAnalyzersDelete(ctx context.Context, id VideoAnalyzerId) (result VideoAnalyzersDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzersget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzersget.go deleted file mode 100644 index 52b181f2bb18b..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzersget.go +++ /dev/null @@ -1,54 +0,0 @@ -package videoanalyzers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VideoAnalyzersGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VideoAnalyzer -} - -// VideoAnalyzersGet ... -func (c VideoAnalyzersClient) VideoAnalyzersGet(ctx context.Context, id VideoAnalyzerId) (result VideoAnalyzersGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model VideoAnalyzer - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzerslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzerslist.go deleted file mode 100644 index 8cd06f9f802c2..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzerslist.go +++ /dev/null @@ -1,56 +0,0 @@ -package videoanalyzers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VideoAnalyzersListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VideoAnalyzerCollection -} - -// VideoAnalyzersList ... -func (c VideoAnalyzersClient) VideoAnalyzersList(ctx context.Context, id commonids.ResourceGroupId) (result VideoAnalyzersListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Media/videoAnalyzers", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model VideoAnalyzerCollection - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzerslistbysubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzerslistbysubscription.go deleted file mode 100644 index 09fdac0d37437..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzerslistbysubscription.go +++ /dev/null @@ -1,56 +0,0 @@ -package videoanalyzers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VideoAnalyzersListBySubscriptionOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VideoAnalyzerCollection -} - -// VideoAnalyzersListBySubscription ... -func (c VideoAnalyzersClient) VideoAnalyzersListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result VideoAnalyzersListBySubscriptionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Media/videoAnalyzers", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model VideoAnalyzerCollection - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzerssyncstoragekeys.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzerssyncstoragekeys.go deleted file mode 100644 index 829fd5728e791..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzerssyncstoragekeys.go +++ /dev/null @@ -1,51 +0,0 @@ -package videoanalyzers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VideoAnalyzersSyncStorageKeysOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// VideoAnalyzersSyncStorageKeys ... -func (c VideoAnalyzersClient) VideoAnalyzersSyncStorageKeys(ctx context.Context, id VideoAnalyzerId, input SyncStorageKeysInput) (result VideoAnalyzersSyncStorageKeysOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/syncStorageKeys", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzersupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzersupdate.go deleted file mode 100644 index 24cea9da913ee..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzersupdate.go +++ /dev/null @@ -1,58 +0,0 @@ -package videoanalyzers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VideoAnalyzersUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VideoAnalyzer -} - -// VideoAnalyzersUpdate ... -func (c VideoAnalyzersClient) VideoAnalyzersUpdate(ctx context.Context, id VideoAnalyzerId, input VideoAnalyzerUpdate) (result VideoAnalyzersUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model VideoAnalyzer - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_accountencryption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_accountencryption.go deleted file mode 100644 index 34f08dfc82f07..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_accountencryption.go +++ /dev/null @@ -1,11 +0,0 @@ -package videoanalyzers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountEncryption struct { - Identity *ResourceIdentity `json:"identity,omitempty"` - KeyVaultProperties *KeyVaultProperties `json:"keyVaultProperties,omitempty"` - Status *string `json:"status,omitempty"` - Type AccountEncryptionKeyType `json:"type"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_checknameavailabilityrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_checknameavailabilityrequest.go deleted file mode 100644 index a53efdc08c7c3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_checknameavailabilityrequest.go +++ /dev/null @@ -1,9 +0,0 @@ -package videoanalyzers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CheckNameAvailabilityRequest struct { - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_checknameavailabilityresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_checknameavailabilityresponse.go deleted file mode 100644 index 6bc73d1afbba5..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_checknameavailabilityresponse.go +++ /dev/null @@ -1,10 +0,0 @@ -package videoanalyzers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CheckNameAvailabilityResponse struct { - Message *string `json:"message,omitempty"` - NameAvailable *bool `json:"nameAvailable,omitempty"` - Reason *CheckNameAvailabilityReason `json:"reason,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_endpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_endpoint.go deleted file mode 100644 index 2278823733661..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_endpoint.go +++ /dev/null @@ -1,9 +0,0 @@ -package videoanalyzers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Endpoint struct { - EndpointUrl *string `json:"endpointUrl,omitempty"` - Type VideoAnalyzerEndpointType `json:"type"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_keyvaultproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_keyvaultproperties.go deleted file mode 100644 index ef30930b304ee..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_keyvaultproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package videoanalyzers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type KeyVaultProperties struct { - CurrentKeyIdentifier *string `json:"currentKeyIdentifier,omitempty"` - KeyIdentifier string `json:"keyIdentifier"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_resourceidentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_resourceidentity.go deleted file mode 100644 index a5a1ef99e4123..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_resourceidentity.go +++ /dev/null @@ -1,8 +0,0 @@ -package videoanalyzers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceIdentity struct { - UserAssignedIdentity string `json:"userAssignedIdentity"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_storageaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_storageaccount.go deleted file mode 100644 index d450687d423ae..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_storageaccount.go +++ /dev/null @@ -1,10 +0,0 @@ -package videoanalyzers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StorageAccount struct { - Id *string `json:"id,omitempty"` - Identity *ResourceIdentity `json:"identity,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_syncstoragekeysinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_syncstoragekeysinput.go deleted file mode 100644 index c38b61caf4900..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_syncstoragekeysinput.go +++ /dev/null @@ -1,8 +0,0 @@ -package videoanalyzers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SyncStorageKeysInput struct { - Id *string `json:"id,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_userassignedmanagedidentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_userassignedmanagedidentity.go deleted file mode 100644 index dc30c306f3c68..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_userassignedmanagedidentity.go +++ /dev/null @@ -1,9 +0,0 @@ -package videoanalyzers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UserAssignedManagedIdentity struct { - ClientId *string `json:"clientId,omitempty"` - PrincipalId *string `json:"principalId,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_videoanalyzer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_videoanalyzer.go deleted file mode 100644 index 30326d205791a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_videoanalyzer.go +++ /dev/null @@ -1,19 +0,0 @@ -package videoanalyzers - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VideoAnalyzer struct { - Id *string `json:"id,omitempty"` - Identity *VideoAnalyzerIdentity `json:"identity,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *VideoAnalyzerPropertiesUpdate `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_videoanalyzercollection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_videoanalyzercollection.go deleted file mode 100644 index 100e14e5a13ff..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_videoanalyzercollection.go +++ /dev/null @@ -1,8 +0,0 @@ -package videoanalyzers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VideoAnalyzerCollection struct { - Value *[]VideoAnalyzer `json:"value,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_videoanalyzeridentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_videoanalyzeridentity.go deleted file mode 100644 index ac2da6867b3da..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_videoanalyzeridentity.go +++ /dev/null @@ -1,9 +0,0 @@ -package videoanalyzers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VideoAnalyzerIdentity struct { - Type string `json:"type"` - UserAssignedIdentities *map[string]UserAssignedManagedIdentity `json:"userAssignedIdentities,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_videoanalyzerpropertiesupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_videoanalyzerpropertiesupdate.go deleted file mode 100644 index 59fcd01795c94..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_videoanalyzerpropertiesupdate.go +++ /dev/null @@ -1,10 +0,0 @@ -package videoanalyzers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VideoAnalyzerPropertiesUpdate struct { - Encryption *AccountEncryption `json:"encryption,omitempty"` - Endpoints *[]Endpoint `json:"endpoints,omitempty"` - StorageAccounts *[]StorageAccount `json:"storageAccounts,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_videoanalyzerupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_videoanalyzerupdate.go deleted file mode 100644 index 47556dbbd88bb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/model_videoanalyzerupdate.go +++ /dev/null @@ -1,10 +0,0 @@ -package videoanalyzers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VideoAnalyzerUpdate struct { - Identity *VideoAnalyzerIdentity `json:"identity,omitempty"` - Properties *VideoAnalyzerPropertiesUpdate `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/version.go deleted file mode 100644 index 275b8e34c2eea..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package videoanalyzers - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-05-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/videoanalyzers/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/README.md deleted file mode 100644 index e632551bf3df8..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/README.md +++ /dev/null @@ -1,480 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans` Documentation - -The `appserviceplans` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans" -``` - - -### Client Initialization - -```go -client := appserviceplans.NewAppServicePlansClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `AppServicePlansClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := commonids.NewAppServicePlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue") - -payload := appserviceplans.AppServicePlan{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `AppServicePlansClient.CreateOrUpdateVnetRoute` - -```go -ctx := context.TODO() -id := appserviceplans.NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "virtualNetworkConnectionValue", "routeValue") - -payload := appserviceplans.VnetRoute{ - // ... -} - - -read, err := client.CreateOrUpdateVnetRoute(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AppServicePlansClient.Delete` - -```go -ctx := context.TODO() -id := commonids.NewAppServicePlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue") - -read, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AppServicePlansClient.DeleteHybridConnection` - -```go -ctx := context.TODO() -id := appserviceplans.NewHybridConnectionNamespaceRelayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "hybridConnectionNamespaceValue", "relayValue") - -read, err := client.DeleteHybridConnection(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AppServicePlansClient.DeleteVnetRoute` - -```go -ctx := context.TODO() -id := appserviceplans.NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "virtualNetworkConnectionValue", "routeValue") - -read, err := client.DeleteVnetRoute(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AppServicePlansClient.Get` - -```go -ctx := context.TODO() -id := commonids.NewAppServicePlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AppServicePlansClient.GetHybridConnection` - -```go -ctx := context.TODO() -id := appserviceplans.NewHybridConnectionNamespaceRelayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "hybridConnectionNamespaceValue", "relayValue") - -read, err := client.GetHybridConnection(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AppServicePlansClient.GetHybridConnectionPlanLimit` - -```go -ctx := context.TODO() -id := commonids.NewAppServicePlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue") - -read, err := client.GetHybridConnectionPlanLimit(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AppServicePlansClient.GetRouteForVnet` - -```go -ctx := context.TODO() -id := appserviceplans.NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "virtualNetworkConnectionValue", "routeValue") - -read, err := client.GetRouteForVnet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AppServicePlansClient.GetServerFarmSkus` - -```go -ctx := context.TODO() -id := commonids.NewAppServicePlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue") - -read, err := client.GetServerFarmSkus(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AppServicePlansClient.GetVnetFromServerFarm` - -```go -ctx := context.TODO() -id := appserviceplans.NewServerFarmVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "virtualNetworkConnectionValue") - -read, err := client.GetVnetFromServerFarm(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AppServicePlansClient.GetVnetGateway` - -```go -ctx := context.TODO() -id := appserviceplans.NewVirtualNetworkConnectionGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "virtualNetworkConnectionValue", "gatewayValue") - -read, err := client.GetVnetGateway(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AppServicePlansClient.List` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id, appserviceplans.DefaultListOperationOptions())` can be used to do batched pagination -items, err := client.ListComplete(ctx, id, appserviceplans.DefaultListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AppServicePlansClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AppServicePlansClient.ListCapabilities` - -```go -ctx := context.TODO() -id := commonids.NewAppServicePlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue") - -read, err := client.ListCapabilities(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AppServicePlansClient.ListHybridConnectionKeys` - -```go -ctx := context.TODO() -id := appserviceplans.NewHybridConnectionNamespaceRelayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "hybridConnectionNamespaceValue", "relayValue") - -read, err := client.ListHybridConnectionKeys(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AppServicePlansClient.ListHybridConnections` - -```go -ctx := context.TODO() -id := commonids.NewAppServicePlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue") - -// alternatively `client.ListHybridConnections(ctx, id)` can be used to do batched pagination -items, err := client.ListHybridConnectionsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AppServicePlansClient.ListRoutesForVnet` - -```go -ctx := context.TODO() -id := appserviceplans.NewServerFarmVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "virtualNetworkConnectionValue") - -read, err := client.ListRoutesForVnet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AppServicePlansClient.ListUsages` - -```go -ctx := context.TODO() -id := commonids.NewAppServicePlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue") - -// alternatively `client.ListUsages(ctx, id, appserviceplans.DefaultListUsagesOperationOptions())` can be used to do batched pagination -items, err := client.ListUsagesComplete(ctx, id, appserviceplans.DefaultListUsagesOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AppServicePlansClient.ListVnets` - -```go -ctx := context.TODO() -id := commonids.NewAppServicePlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue") - -read, err := client.ListVnets(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AppServicePlansClient.ListWebApps` - -```go -ctx := context.TODO() -id := commonids.NewAppServicePlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue") - -// alternatively `client.ListWebApps(ctx, id, appserviceplans.DefaultListWebAppsOperationOptions())` can be used to do batched pagination -items, err := client.ListWebAppsComplete(ctx, id, appserviceplans.DefaultListWebAppsOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AppServicePlansClient.ListWebAppsByHybridConnection` - -```go -ctx := context.TODO() -id := appserviceplans.NewHybridConnectionNamespaceRelayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "hybridConnectionNamespaceValue", "relayValue") - -// alternatively `client.ListWebAppsByHybridConnection(ctx, id)` can be used to do batched pagination -items, err := client.ListWebAppsByHybridConnectionComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AppServicePlansClient.RebootWorker` - -```go -ctx := context.TODO() -id := appserviceplans.NewWorkerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "workerValue") - -read, err := client.RebootWorker(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AppServicePlansClient.RestartWebApps` - -```go -ctx := context.TODO() -id := commonids.NewAppServicePlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue") - -read, err := client.RestartWebApps(ctx, id, appserviceplans.DefaultRestartWebAppsOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AppServicePlansClient.Update` - -```go -ctx := context.TODO() -id := commonids.NewAppServicePlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue") - -payload := appserviceplans.AppServicePlanPatchResource{ - // ... -} - - -read, err := client.Update(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AppServicePlansClient.UpdateVnetGateway` - -```go -ctx := context.TODO() -id := appserviceplans.NewVirtualNetworkConnectionGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "virtualNetworkConnectionValue", "gatewayValue") - -payload := appserviceplans.VnetGateway{ - // ... -} - - -read, err := client.UpdateVnetGateway(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AppServicePlansClient.UpdateVnetRoute` - -```go -ctx := context.TODO() -id := appserviceplans.NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "virtualNetworkConnectionValue", "routeValue") - -payload := appserviceplans.VnetRoute{ - // ... -} - - -read, err := client.UpdateVnetRoute(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/constants.go deleted file mode 100644 index b22d6af257f36..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/constants.go +++ /dev/null @@ -1,1089 +0,0 @@ -package appserviceplans - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AutoHealActionType string - -const ( - AutoHealActionTypeCustomAction AutoHealActionType = "CustomAction" - AutoHealActionTypeLogEvent AutoHealActionType = "LogEvent" - AutoHealActionTypeRecycle AutoHealActionType = "Recycle" -) - -func PossibleValuesForAutoHealActionType() []string { - return []string{ - string(AutoHealActionTypeCustomAction), - string(AutoHealActionTypeLogEvent), - string(AutoHealActionTypeRecycle), - } -} - -func (s *AutoHealActionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAutoHealActionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAutoHealActionType(input string) (*AutoHealActionType, error) { - vals := map[string]AutoHealActionType{ - "customaction": AutoHealActionTypeCustomAction, - "logevent": AutoHealActionTypeLogEvent, - "recycle": AutoHealActionTypeRecycle, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AutoHealActionType(input) - return &out, nil -} - -type AzureStorageState string - -const ( - AzureStorageStateInvalidCredentials AzureStorageState = "InvalidCredentials" - AzureStorageStateInvalidShare AzureStorageState = "InvalidShare" - AzureStorageStateNotValidated AzureStorageState = "NotValidated" - AzureStorageStateOk AzureStorageState = "Ok" -) - -func PossibleValuesForAzureStorageState() []string { - return []string{ - string(AzureStorageStateInvalidCredentials), - string(AzureStorageStateInvalidShare), - string(AzureStorageStateNotValidated), - string(AzureStorageStateOk), - } -} - -func (s *AzureStorageState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAzureStorageState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAzureStorageState(input string) (*AzureStorageState, error) { - vals := map[string]AzureStorageState{ - "invalidcredentials": AzureStorageStateInvalidCredentials, - "invalidshare": AzureStorageStateInvalidShare, - "notvalidated": AzureStorageStateNotValidated, - "ok": AzureStorageStateOk, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AzureStorageState(input) - return &out, nil -} - -type AzureStorageType string - -const ( - AzureStorageTypeAzureBlob AzureStorageType = "AzureBlob" - AzureStorageTypeAzureFiles AzureStorageType = "AzureFiles" -) - -func PossibleValuesForAzureStorageType() []string { - return []string{ - string(AzureStorageTypeAzureBlob), - string(AzureStorageTypeAzureFiles), - } -} - -func (s *AzureStorageType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAzureStorageType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAzureStorageType(input string) (*AzureStorageType, error) { - vals := map[string]AzureStorageType{ - "azureblob": AzureStorageTypeAzureBlob, - "azurefiles": AzureStorageTypeAzureFiles, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AzureStorageType(input) - return &out, nil -} - -type ClientCertMode string - -const ( - ClientCertModeOptional ClientCertMode = "Optional" - ClientCertModeOptionalInteractiveUser ClientCertMode = "OptionalInteractiveUser" - ClientCertModeRequired ClientCertMode = "Required" -) - -func PossibleValuesForClientCertMode() []string { - return []string{ - string(ClientCertModeOptional), - string(ClientCertModeOptionalInteractiveUser), - string(ClientCertModeRequired), - } -} - -func (s *ClientCertMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseClientCertMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseClientCertMode(input string) (*ClientCertMode, error) { - vals := map[string]ClientCertMode{ - "optional": ClientCertModeOptional, - "optionalinteractiveuser": ClientCertModeOptionalInteractiveUser, - "required": ClientCertModeRequired, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ClientCertMode(input) - return &out, nil -} - -type ConnectionStringType string - -const ( - ConnectionStringTypeApiHub ConnectionStringType = "ApiHub" - ConnectionStringTypeCustom ConnectionStringType = "Custom" - ConnectionStringTypeDocDb ConnectionStringType = "DocDb" - ConnectionStringTypeEventHub ConnectionStringType = "EventHub" - ConnectionStringTypeMySql ConnectionStringType = "MySql" - ConnectionStringTypeNotificationHub ConnectionStringType = "NotificationHub" - ConnectionStringTypePostgreSQL ConnectionStringType = "PostgreSQL" - ConnectionStringTypeRedisCache ConnectionStringType = "RedisCache" - ConnectionStringTypeSQLAzure ConnectionStringType = "SQLAzure" - ConnectionStringTypeSQLServer ConnectionStringType = "SQLServer" - ConnectionStringTypeServiceBus ConnectionStringType = "ServiceBus" -) - -func PossibleValuesForConnectionStringType() []string { - return []string{ - string(ConnectionStringTypeApiHub), - string(ConnectionStringTypeCustom), - string(ConnectionStringTypeDocDb), - string(ConnectionStringTypeEventHub), - string(ConnectionStringTypeMySql), - string(ConnectionStringTypeNotificationHub), - string(ConnectionStringTypePostgreSQL), - string(ConnectionStringTypeRedisCache), - string(ConnectionStringTypeSQLAzure), - string(ConnectionStringTypeSQLServer), - string(ConnectionStringTypeServiceBus), - } -} - -func (s *ConnectionStringType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConnectionStringType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConnectionStringType(input string) (*ConnectionStringType, error) { - vals := map[string]ConnectionStringType{ - "apihub": ConnectionStringTypeApiHub, - "custom": ConnectionStringTypeCustom, - "docdb": ConnectionStringTypeDocDb, - "eventhub": ConnectionStringTypeEventHub, - "mysql": ConnectionStringTypeMySql, - "notificationhub": ConnectionStringTypeNotificationHub, - "postgresql": ConnectionStringTypePostgreSQL, - "rediscache": ConnectionStringTypeRedisCache, - "sqlazure": ConnectionStringTypeSQLAzure, - "sqlserver": ConnectionStringTypeSQLServer, - "servicebus": ConnectionStringTypeServiceBus, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConnectionStringType(input) - return &out, nil -} - -type DaprLogLevel string - -const ( - DaprLogLevelDebug DaprLogLevel = "debug" - DaprLogLevelError DaprLogLevel = "error" - DaprLogLevelInfo DaprLogLevel = "info" - DaprLogLevelWarn DaprLogLevel = "warn" -) - -func PossibleValuesForDaprLogLevel() []string { - return []string{ - string(DaprLogLevelDebug), - string(DaprLogLevelError), - string(DaprLogLevelInfo), - string(DaprLogLevelWarn), - } -} - -func (s *DaprLogLevel) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDaprLogLevel(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDaprLogLevel(input string) (*DaprLogLevel, error) { - vals := map[string]DaprLogLevel{ - "debug": DaprLogLevelDebug, - "error": DaprLogLevelError, - "info": DaprLogLevelInfo, - "warn": DaprLogLevelWarn, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DaprLogLevel(input) - return &out, nil -} - -type DefaultAction string - -const ( - DefaultActionAllow DefaultAction = "Allow" - DefaultActionDeny DefaultAction = "Deny" -) - -func PossibleValuesForDefaultAction() []string { - return []string{ - string(DefaultActionAllow), - string(DefaultActionDeny), - } -} - -func (s *DefaultAction) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDefaultAction(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDefaultAction(input string) (*DefaultAction, error) { - vals := map[string]DefaultAction{ - "allow": DefaultActionAllow, - "deny": DefaultActionDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DefaultAction(input) - return &out, nil -} - -type FtpsState string - -const ( - FtpsStateAllAllowed FtpsState = "AllAllowed" - FtpsStateDisabled FtpsState = "Disabled" - FtpsStateFtpsOnly FtpsState = "FtpsOnly" -) - -func PossibleValuesForFtpsState() []string { - return []string{ - string(FtpsStateAllAllowed), - string(FtpsStateDisabled), - string(FtpsStateFtpsOnly), - } -} - -func (s *FtpsState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFtpsState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFtpsState(input string) (*FtpsState, error) { - vals := map[string]FtpsState{ - "allallowed": FtpsStateAllAllowed, - "disabled": FtpsStateDisabled, - "ftpsonly": FtpsStateFtpsOnly, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FtpsState(input) - return &out, nil -} - -type HostType string - -const ( - HostTypeRepository HostType = "Repository" - HostTypeStandard HostType = "Standard" -) - -func PossibleValuesForHostType() []string { - return []string{ - string(HostTypeRepository), - string(HostTypeStandard), - } -} - -func (s *HostType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseHostType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseHostType(input string) (*HostType, error) { - vals := map[string]HostType{ - "repository": HostTypeRepository, - "standard": HostTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := HostType(input) - return &out, nil -} - -type IPFilterTag string - -const ( - IPFilterTagDefault IPFilterTag = "Default" - IPFilterTagServiceTag IPFilterTag = "ServiceTag" - IPFilterTagXffProxy IPFilterTag = "XffProxy" -) - -func PossibleValuesForIPFilterTag() []string { - return []string{ - string(IPFilterTagDefault), - string(IPFilterTagServiceTag), - string(IPFilterTagXffProxy), - } -} - -func (s *IPFilterTag) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPFilterTag(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPFilterTag(input string) (*IPFilterTag, error) { - vals := map[string]IPFilterTag{ - "default": IPFilterTagDefault, - "servicetag": IPFilterTagServiceTag, - "xffproxy": IPFilterTagXffProxy, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPFilterTag(input) - return &out, nil -} - -type ManagedPipelineMode string - -const ( - ManagedPipelineModeClassic ManagedPipelineMode = "Classic" - ManagedPipelineModeIntegrated ManagedPipelineMode = "Integrated" -) - -func PossibleValuesForManagedPipelineMode() []string { - return []string{ - string(ManagedPipelineModeClassic), - string(ManagedPipelineModeIntegrated), - } -} - -func (s *ManagedPipelineMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseManagedPipelineMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseManagedPipelineMode(input string) (*ManagedPipelineMode, error) { - vals := map[string]ManagedPipelineMode{ - "classic": ManagedPipelineModeClassic, - "integrated": ManagedPipelineModeIntegrated, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ManagedPipelineMode(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateCanceled ProvisioningState = "Canceled" - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateInProgress ProvisioningState = "InProgress" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateCanceled), - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateInProgress), - string(ProvisioningStateSucceeded), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "canceled": ProvisioningStateCanceled, - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "inprogress": ProvisioningStateInProgress, - "succeeded": ProvisioningStateSucceeded, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type RedundancyMode string - -const ( - RedundancyModeActiveActive RedundancyMode = "ActiveActive" - RedundancyModeFailover RedundancyMode = "Failover" - RedundancyModeGeoRedundant RedundancyMode = "GeoRedundant" - RedundancyModeManual RedundancyMode = "Manual" - RedundancyModeNone RedundancyMode = "None" -) - -func PossibleValuesForRedundancyMode() []string { - return []string{ - string(RedundancyModeActiveActive), - string(RedundancyModeFailover), - string(RedundancyModeGeoRedundant), - string(RedundancyModeManual), - string(RedundancyModeNone), - } -} - -func (s *RedundancyMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRedundancyMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRedundancyMode(input string) (*RedundancyMode, error) { - vals := map[string]RedundancyMode{ - "activeactive": RedundancyModeActiveActive, - "failover": RedundancyModeFailover, - "georedundant": RedundancyModeGeoRedundant, - "manual": RedundancyModeManual, - "none": RedundancyModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RedundancyMode(input) - return &out, nil -} - -type RouteType string - -const ( - RouteTypeDefault RouteType = "DEFAULT" - RouteTypeINHERITED RouteType = "INHERITED" - RouteTypeSTATIC RouteType = "STATIC" -) - -func PossibleValuesForRouteType() []string { - return []string{ - string(RouteTypeDefault), - string(RouteTypeINHERITED), - string(RouteTypeSTATIC), - } -} - -func (s *RouteType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteType(input string) (*RouteType, error) { - vals := map[string]RouteType{ - "default": RouteTypeDefault, - "inherited": RouteTypeINHERITED, - "static": RouteTypeSTATIC, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteType(input) - return &out, nil -} - -type ScmType string - -const ( - ScmTypeBitbucketGit ScmType = "BitbucketGit" - ScmTypeBitbucketHg ScmType = "BitbucketHg" - ScmTypeCodePlexGit ScmType = "CodePlexGit" - ScmTypeCodePlexHg ScmType = "CodePlexHg" - ScmTypeDropbox ScmType = "Dropbox" - ScmTypeExternalGit ScmType = "ExternalGit" - ScmTypeExternalHg ScmType = "ExternalHg" - ScmTypeGitHub ScmType = "GitHub" - ScmTypeLocalGit ScmType = "LocalGit" - ScmTypeNone ScmType = "None" - ScmTypeOneDrive ScmType = "OneDrive" - ScmTypeTfs ScmType = "Tfs" - ScmTypeVSO ScmType = "VSO" - ScmTypeVSTSRM ScmType = "VSTSRM" -) - -func PossibleValuesForScmType() []string { - return []string{ - string(ScmTypeBitbucketGit), - string(ScmTypeBitbucketHg), - string(ScmTypeCodePlexGit), - string(ScmTypeCodePlexHg), - string(ScmTypeDropbox), - string(ScmTypeExternalGit), - string(ScmTypeExternalHg), - string(ScmTypeGitHub), - string(ScmTypeLocalGit), - string(ScmTypeNone), - string(ScmTypeOneDrive), - string(ScmTypeTfs), - string(ScmTypeVSO), - string(ScmTypeVSTSRM), - } -} - -func (s *ScmType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseScmType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseScmType(input string) (*ScmType, error) { - vals := map[string]ScmType{ - "bitbucketgit": ScmTypeBitbucketGit, - "bitbuckethg": ScmTypeBitbucketHg, - "codeplexgit": ScmTypeCodePlexGit, - "codeplexhg": ScmTypeCodePlexHg, - "dropbox": ScmTypeDropbox, - "externalgit": ScmTypeExternalGit, - "externalhg": ScmTypeExternalHg, - "github": ScmTypeGitHub, - "localgit": ScmTypeLocalGit, - "none": ScmTypeNone, - "onedrive": ScmTypeOneDrive, - "tfs": ScmTypeTfs, - "vso": ScmTypeVSO, - "vstsrm": ScmTypeVSTSRM, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ScmType(input) - return &out, nil -} - -type SiteAvailabilityState string - -const ( - SiteAvailabilityStateDisasterRecoveryMode SiteAvailabilityState = "DisasterRecoveryMode" - SiteAvailabilityStateLimited SiteAvailabilityState = "Limited" - SiteAvailabilityStateNormal SiteAvailabilityState = "Normal" -) - -func PossibleValuesForSiteAvailabilityState() []string { - return []string{ - string(SiteAvailabilityStateDisasterRecoveryMode), - string(SiteAvailabilityStateLimited), - string(SiteAvailabilityStateNormal), - } -} - -func (s *SiteAvailabilityState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSiteAvailabilityState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSiteAvailabilityState(input string) (*SiteAvailabilityState, error) { - vals := map[string]SiteAvailabilityState{ - "disasterrecoverymode": SiteAvailabilityStateDisasterRecoveryMode, - "limited": SiteAvailabilityStateLimited, - "normal": SiteAvailabilityStateNormal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SiteAvailabilityState(input) - return &out, nil -} - -type SiteLoadBalancing string - -const ( - SiteLoadBalancingLeastRequests SiteLoadBalancing = "LeastRequests" - SiteLoadBalancingLeastResponseTime SiteLoadBalancing = "LeastResponseTime" - SiteLoadBalancingPerSiteRoundRobin SiteLoadBalancing = "PerSiteRoundRobin" - SiteLoadBalancingRequestHash SiteLoadBalancing = "RequestHash" - SiteLoadBalancingWeightedRoundRobin SiteLoadBalancing = "WeightedRoundRobin" - SiteLoadBalancingWeightedTotalTraffic SiteLoadBalancing = "WeightedTotalTraffic" -) - -func PossibleValuesForSiteLoadBalancing() []string { - return []string{ - string(SiteLoadBalancingLeastRequests), - string(SiteLoadBalancingLeastResponseTime), - string(SiteLoadBalancingPerSiteRoundRobin), - string(SiteLoadBalancingRequestHash), - string(SiteLoadBalancingWeightedRoundRobin), - string(SiteLoadBalancingWeightedTotalTraffic), - } -} - -func (s *SiteLoadBalancing) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSiteLoadBalancing(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSiteLoadBalancing(input string) (*SiteLoadBalancing, error) { - vals := map[string]SiteLoadBalancing{ - "leastrequests": SiteLoadBalancingLeastRequests, - "leastresponsetime": SiteLoadBalancingLeastResponseTime, - "persiteroundrobin": SiteLoadBalancingPerSiteRoundRobin, - "requesthash": SiteLoadBalancingRequestHash, - "weightedroundrobin": SiteLoadBalancingWeightedRoundRobin, - "weightedtotaltraffic": SiteLoadBalancingWeightedTotalTraffic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SiteLoadBalancing(input) - return &out, nil -} - -type SslState string - -const ( - SslStateDisabled SslState = "Disabled" - SslStateIPBasedEnabled SslState = "IpBasedEnabled" - SslStateSniEnabled SslState = "SniEnabled" -) - -func PossibleValuesForSslState() []string { - return []string{ - string(SslStateDisabled), - string(SslStateIPBasedEnabled), - string(SslStateSniEnabled), - } -} - -func (s *SslState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSslState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSslState(input string) (*SslState, error) { - vals := map[string]SslState{ - "disabled": SslStateDisabled, - "ipbasedenabled": SslStateIPBasedEnabled, - "snienabled": SslStateSniEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SslState(input) - return &out, nil -} - -type StatusOptions string - -const ( - StatusOptionsCreating StatusOptions = "Creating" - StatusOptionsPending StatusOptions = "Pending" - StatusOptionsReady StatusOptions = "Ready" -) - -func PossibleValuesForStatusOptions() []string { - return []string{ - string(StatusOptionsCreating), - string(StatusOptionsPending), - string(StatusOptionsReady), - } -} - -func (s *StatusOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseStatusOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseStatusOptions(input string) (*StatusOptions, error) { - vals := map[string]StatusOptions{ - "creating": StatusOptionsCreating, - "pending": StatusOptionsPending, - "ready": StatusOptionsReady, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StatusOptions(input) - return &out, nil -} - -type SupportedTlsVersions string - -const ( - SupportedTlsVersionsOnePointOne SupportedTlsVersions = "1.1" - SupportedTlsVersionsOnePointTwo SupportedTlsVersions = "1.2" - SupportedTlsVersionsOnePointZero SupportedTlsVersions = "1.0" -) - -func PossibleValuesForSupportedTlsVersions() []string { - return []string{ - string(SupportedTlsVersionsOnePointOne), - string(SupportedTlsVersionsOnePointTwo), - string(SupportedTlsVersionsOnePointZero), - } -} - -func (s *SupportedTlsVersions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSupportedTlsVersions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSupportedTlsVersions(input string) (*SupportedTlsVersions, error) { - vals := map[string]SupportedTlsVersions{ - "1.1": SupportedTlsVersionsOnePointOne, - "1.2": SupportedTlsVersionsOnePointTwo, - "1.0": SupportedTlsVersionsOnePointZero, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SupportedTlsVersions(input) - return &out, nil -} - -type TlsCipherSuites string - -const ( - TlsCipherSuitesTLSAESOneTwoEightGCMSHATwoFiveSix TlsCipherSuites = "TLS_AES_128_GCM_SHA256" - TlsCipherSuitesTLSAESTwoFiveSixGCMSHAThreeEightFour TlsCipherSuites = "TLS_AES_256_GCM_SHA384" - TlsCipherSuitesTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix TlsCipherSuites = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" - TlsCipherSuitesTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix TlsCipherSuites = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" - TlsCipherSuitesTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour TlsCipherSuites = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" - TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightCBCSHA TlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" - TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix TlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" - TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix TlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" - TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixCBCSHA TlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" - TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour TlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" - TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour TlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" - TlsCipherSuitesTLSRSAWITHAESOneTwoEightCBCSHA TlsCipherSuites = "TLS_RSA_WITH_AES_128_CBC_SHA" - TlsCipherSuitesTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix TlsCipherSuites = "TLS_RSA_WITH_AES_128_CBC_SHA256" - TlsCipherSuitesTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix TlsCipherSuites = "TLS_RSA_WITH_AES_128_GCM_SHA256" - TlsCipherSuitesTLSRSAWITHAESTwoFiveSixCBCSHA TlsCipherSuites = "TLS_RSA_WITH_AES_256_CBC_SHA" - TlsCipherSuitesTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix TlsCipherSuites = "TLS_RSA_WITH_AES_256_CBC_SHA256" - TlsCipherSuitesTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour TlsCipherSuites = "TLS_RSA_WITH_AES_256_GCM_SHA384" -) - -func PossibleValuesForTlsCipherSuites() []string { - return []string{ - string(TlsCipherSuitesTLSAESOneTwoEightGCMSHATwoFiveSix), - string(TlsCipherSuitesTLSAESTwoFiveSixGCMSHAThreeEightFour), - string(TlsCipherSuitesTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix), - string(TlsCipherSuitesTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(TlsCipherSuitesTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - string(TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightCBCSHA), - string(TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix), - string(TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixCBCSHA), - string(TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour), - string(TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - string(TlsCipherSuitesTLSRSAWITHAESOneTwoEightCBCSHA), - string(TlsCipherSuitesTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix), - string(TlsCipherSuitesTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(TlsCipherSuitesTLSRSAWITHAESTwoFiveSixCBCSHA), - string(TlsCipherSuitesTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix), - string(TlsCipherSuitesTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - } -} - -func (s *TlsCipherSuites) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTlsCipherSuites(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTlsCipherSuites(input string) (*TlsCipherSuites, error) { - vals := map[string]TlsCipherSuites{ - "tls_aes_128_gcm_sha256": TlsCipherSuitesTLSAESOneTwoEightGCMSHATwoFiveSix, - "tls_aes_256_gcm_sha384": TlsCipherSuitesTLSAESTwoFiveSixGCMSHAThreeEightFour, - "tls_ecdhe_ecdsa_with_aes_128_cbc_sha256": TlsCipherSuitesTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_ecdhe_ecdsa_with_aes_128_gcm_sha256": TlsCipherSuitesTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_ecdhe_ecdsa_with_aes_256_gcm_sha384": TlsCipherSuitesTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - "tls_ecdhe_rsa_with_aes_128_cbc_sha": TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightCBCSHA, - "tls_ecdhe_rsa_with_aes_128_cbc_sha256": TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_ecdhe_rsa_with_aes_128_gcm_sha256": TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_ecdhe_rsa_with_aes_256_cbc_sha": TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixCBCSHA, - "tls_ecdhe_rsa_with_aes_256_cbc_sha384": TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour, - "tls_ecdhe_rsa_with_aes_256_gcm_sha384": TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - "tls_rsa_with_aes_128_cbc_sha": TlsCipherSuitesTLSRSAWITHAESOneTwoEightCBCSHA, - "tls_rsa_with_aes_128_cbc_sha256": TlsCipherSuitesTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_rsa_with_aes_128_gcm_sha256": TlsCipherSuitesTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_rsa_with_aes_256_cbc_sha": TlsCipherSuitesTLSRSAWITHAESTwoFiveSixCBCSHA, - "tls_rsa_with_aes_256_cbc_sha256": TlsCipherSuitesTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix, - "tls_rsa_with_aes_256_gcm_sha384": TlsCipherSuitesTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TlsCipherSuites(input) - return &out, nil -} - -type UsageState string - -const ( - UsageStateExceeded UsageState = "Exceeded" - UsageStateNormal UsageState = "Normal" -) - -func PossibleValuesForUsageState() []string { - return []string{ - string(UsageStateExceeded), - string(UsageStateNormal), - } -} - -func (s *UsageState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseUsageState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseUsageState(input string) (*UsageState, error) { - vals := map[string]UsageState{ - "exceeded": UsageStateExceeded, - "normal": UsageStateNormal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := UsageState(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_azurestorageinfovalue.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_azurestorageinfovalue.go deleted file mode 100644 index 857ad18284558..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_azurestorageinfovalue.go +++ /dev/null @@ -1,13 +0,0 @@ -package appserviceplans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureStorageInfoValue struct { - AccessKey *string `json:"accessKey,omitempty"` - AccountName *string `json:"accountName,omitempty"` - MountPath *string `json:"mountPath,omitempty"` - ShareName *string `json:"shareName,omitempty"` - State *AzureStorageState `json:"state,omitempty"` - Type *AzureStorageType `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_siteproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_siteproperties.go deleted file mode 100644 index cb28607e89f0a..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_siteproperties.go +++ /dev/null @@ -1,87 +0,0 @@ -package appserviceplans - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SiteProperties struct { - AvailabilityState *SiteAvailabilityState `json:"availabilityState,omitempty"` - ClientAffinityEnabled *bool `json:"clientAffinityEnabled,omitempty"` - ClientCertEnabled *bool `json:"clientCertEnabled,omitempty"` - ClientCertExclusionPaths *string `json:"clientCertExclusionPaths,omitempty"` - ClientCertMode *ClientCertMode `json:"clientCertMode,omitempty"` - CloningInfo *CloningInfo `json:"cloningInfo,omitempty"` - ContainerSize *int64 `json:"containerSize,omitempty"` - CustomDomainVerificationId *string `json:"customDomainVerificationId,omitempty"` - DailyMemoryTimeQuota *int64 `json:"dailyMemoryTimeQuota,omitempty"` - DaprConfig *DaprConfig `json:"daprConfig,omitempty"` - DefaultHostName *string `json:"defaultHostName,omitempty"` - Enabled *bool `json:"enabled,omitempty"` - EnabledHostNames *[]string `json:"enabledHostNames,omitempty"` - EndToEndEncryptionEnabled *bool `json:"endToEndEncryptionEnabled,omitempty"` - HTTPSOnly *bool `json:"httpsOnly,omitempty"` - HostNameSslStates *[]HostNameSslState `json:"hostNameSslStates,omitempty"` - HostNames *[]string `json:"hostNames,omitempty"` - HostNamesDisabled *bool `json:"hostNamesDisabled,omitempty"` - HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` - HyperV *bool `json:"hyperV,omitempty"` - InProgressOperationId *string `json:"inProgressOperationId,omitempty"` - IsDefaultContainer *bool `json:"isDefaultContainer,omitempty"` - IsXenon *bool `json:"isXenon,omitempty"` - KeyVaultReferenceIdentity *string `json:"keyVaultReferenceIdentity,omitempty"` - LastModifiedTimeUtc *string `json:"lastModifiedTimeUtc,omitempty"` - ManagedEnvironmentId *string `json:"managedEnvironmentId,omitempty"` - MaxNumberOfWorkers *int64 `json:"maxNumberOfWorkers,omitempty"` - OutboundIPAddresses *string `json:"outboundIpAddresses,omitempty"` - PossibleOutboundIPAddresses *string `json:"possibleOutboundIpAddresses,omitempty"` - PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` - RedundancyMode *RedundancyMode `json:"redundancyMode,omitempty"` - RepositorySiteName *string `json:"repositorySiteName,omitempty"` - Reserved *bool `json:"reserved,omitempty"` - ResourceConfig *ResourceConfig `json:"resourceConfig,omitempty"` - ResourceGroup *string `json:"resourceGroup,omitempty"` - ScmSiteAlsoStopped *bool `json:"scmSiteAlsoStopped,omitempty"` - ServerFarmId *string `json:"serverFarmId,omitempty"` - SiteConfig *SiteConfig `json:"siteConfig,omitempty"` - SlotSwapStatus *SlotSwapStatus `json:"slotSwapStatus,omitempty"` - State *string `json:"state,omitempty"` - StorageAccountRequired *bool `json:"storageAccountRequired,omitempty"` - SuspendedTill *string `json:"suspendedTill,omitempty"` - TargetSwapSlot *string `json:"targetSwapSlot,omitempty"` - TrafficManagerHostNames *[]string `json:"trafficManagerHostNames,omitempty"` - UsageState *UsageState `json:"usageState,omitempty"` - VirtualNetworkSubnetId *string `json:"virtualNetworkSubnetId,omitempty"` - VnetContentShareEnabled *bool `json:"vnetContentShareEnabled,omitempty"` - VnetImagePullEnabled *bool `json:"vnetImagePullEnabled,omitempty"` - VnetRouteAllEnabled *bool `json:"vnetRouteAllEnabled,omitempty"` - WorkloadProfileName *string `json:"workloadProfileName,omitempty"` -} - -func (o *SiteProperties) GetLastModifiedTimeUtcAsTime() (*time.Time, error) { - if o.LastModifiedTimeUtc == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModifiedTimeUtc, "2006-01-02T15:04:05Z07:00") -} - -func (o *SiteProperties) SetLastModifiedTimeUtcAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModifiedTimeUtc = &formatted -} - -func (o *SiteProperties) GetSuspendedTillAsTime() (*time.Time, error) { - if o.SuspendedTill == nil { - return nil, nil - } - return dates.ParseAsFormat(o.SuspendedTill, "2006-01-02T15:04:05Z07:00") -} - -func (o *SiteProperties) SetSuspendedTillAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.SuspendedTill = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/version.go deleted file mode 100644 index e1772968a905e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package appserviceplans - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2023-01-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/appserviceplans/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/README.md deleted file mode 100644 index 27c35f23e5bdb..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/README.md +++ /dev/null @@ -1,6913 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps` Documentation - -The `webapps` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps" -``` - - -### Client Initialization - -```go -client := webapps.NewWebAppsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `WebAppsClient.AddPremierAddOn` - -```go -ctx := context.TODO() -id := webapps.NewPremierAddonID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "premierAddonValue") - -payload := webapps.PremierAddOn{ - // ... -} - - -read, err := client.AddPremierAddOn(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.AddPremierAddOnSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotPremierAddonID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "premierAddonValue") - -payload := webapps.PremierAddOn{ - // ... -} - - -read, err := client.AddPremierAddOnSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.AnalyzeCustomHostname` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.AnalyzeCustomHostname(ctx, id, webapps.DefaultAnalyzeCustomHostnameOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.AnalyzeCustomHostnameSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.AnalyzeCustomHostnameSlot(ctx, id, webapps.DefaultAnalyzeCustomHostnameSlotOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ApplySlotConfigToProduction` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.CsmSlotEntity{ - // ... -} - - -read, err := client.ApplySlotConfigToProduction(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ApplySlotConfigurationSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.CsmSlotEntity{ - // ... -} - - -read, err := client.ApplySlotConfigurationSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ApproveOrRejectPrivateEndpointConnection` - -```go -ctx := context.TODO() -id := webapps.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "privateEndpointConnectionValue") - -payload := webapps.RemotePrivateEndpointConnectionARMResource{ - // ... -} - - -if err := client.ApproveOrRejectPrivateEndpointConnectionThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.ApproveOrRejectPrivateEndpointConnectionSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "privateEndpointConnectionValue") - -payload := webapps.RemotePrivateEndpointConnectionARMResource{ - // ... -} - - -if err := client.ApproveOrRejectPrivateEndpointConnectionSlotThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.Backup` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.BackupRequest{ - // ... -} - - -read, err := client.Backup(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.BackupSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.BackupRequest{ - // ... -} - - -read, err := client.BackupSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.CreateDeployment` - -```go -ctx := context.TODO() -id := webapps.NewDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "deploymentValue") - -payload := webapps.Deployment{ - // ... -} - - -read, err := client.CreateDeployment(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.CreateDeploymentSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "deploymentValue") - -payload := webapps.Deployment{ - // ... -} - - -read, err := client.CreateDeploymentSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.CreateFunction` - -```go -ctx := context.TODO() -id := webapps.NewFunctionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "functionValue") - -payload := webapps.FunctionEnvelope{ - // ... -} - - -if err := client.CreateFunctionThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.CreateInstanceFunctionSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotFunctionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "functionValue") - -payload := webapps.FunctionEnvelope{ - // ... -} - - -if err := client.CreateInstanceFunctionSlotThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.CreateInstanceMSDeployOperation` - -```go -ctx := context.TODO() -id := webapps.NewInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "instanceIdValue") - -payload := webapps.MSDeploy{ - // ... -} - - -if err := client.CreateInstanceMSDeployOperationThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.CreateInstanceMSDeployOperationSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "instanceIdValue") - -payload := webapps.MSDeploy{ - // ... -} - - -if err := client.CreateInstanceMSDeployOperationSlotThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.CreateMSDeployOperation` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.MSDeploy{ - // ... -} - - -if err := client.CreateMSDeployOperationThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.CreateMSDeployOperationSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.MSDeploy{ - // ... -} - - -if err := client.CreateMSDeployOperationSlotThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.CreateOneDeployOperation` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.CreateOneDeployOperation(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.Site{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdateConfiguration` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.SiteConfigResource{ - // ... -} - - -read, err := client.CreateOrUpdateConfiguration(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdateConfigurationSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.SiteConfigResource{ - // ... -} - - -read, err := client.CreateOrUpdateConfigurationSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdateDomainOwnershipIdentifier` - -```go -ctx := context.TODO() -id := webapps.NewDomainOwnershipIdentifierID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "domainOwnershipIdentifierValue") - -payload := webapps.Identifier{ - // ... -} - - -read, err := client.CreateOrUpdateDomainOwnershipIdentifier(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdateDomainOwnershipIdentifierSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotDomainOwnershipIdentifierID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "domainOwnershipIdentifierValue") - -payload := webapps.Identifier{ - // ... -} - - -read, err := client.CreateOrUpdateDomainOwnershipIdentifierSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdateFunctionSecret` - -```go -ctx := context.TODO() -id := webapps.NewKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "functionValue", "keyValue") - -payload := webapps.KeyInfo{ - // ... -} - - -read, err := client.CreateOrUpdateFunctionSecret(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdateFunctionSecretSlot` - -```go -ctx := context.TODO() -id := webapps.NewFunctionKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "functionValue", "keyValue") - -payload := webapps.KeyInfo{ - // ... -} - - -read, err := client.CreateOrUpdateFunctionSecretSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdateHostNameBinding` - -```go -ctx := context.TODO() -id := webapps.NewHostNameBindingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "hostNameBindingValue") - -payload := webapps.HostNameBinding{ - // ... -} - - -read, err := client.CreateOrUpdateHostNameBinding(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdateHostNameBindingSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotHostNameBindingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "hostNameBindingValue") - -payload := webapps.HostNameBinding{ - // ... -} - - -read, err := client.CreateOrUpdateHostNameBindingSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdateHostSecret` - -```go -ctx := context.TODO() -id := webapps.NewDefaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "defaultValue", "keyValue") - -payload := webapps.KeyInfo{ - // ... -} - - -read, err := client.CreateOrUpdateHostSecret(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdateHostSecretSlot` - -```go -ctx := context.TODO() -id := webapps.NewHostDefaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "defaultValue", "keyValue") - -payload := webapps.KeyInfo{ - // ... -} - - -read, err := client.CreateOrUpdateHostSecretSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdateHybridConnection` - -```go -ctx := context.TODO() -id := webapps.NewRelayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "hybridConnectionNamespaceValue", "relayValue") - -payload := webapps.HybridConnection{ - // ... -} - - -read, err := client.CreateOrUpdateHybridConnection(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdateHybridConnectionSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotHybridConnectionNamespaceRelayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "hybridConnectionNamespaceValue", "relayValue") - -payload := webapps.HybridConnection{ - // ... -} - - -read, err := client.CreateOrUpdateHybridConnectionSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdatePublicCertificate` - -```go -ctx := context.TODO() -id := webapps.NewPublicCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "publicCertificateValue") - -payload := webapps.PublicCertificate{ - // ... -} - - -read, err := client.CreateOrUpdatePublicCertificate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdatePublicCertificateSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotPublicCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "publicCertificateValue") - -payload := webapps.PublicCertificate{ - // ... -} - - -read, err := client.CreateOrUpdatePublicCertificateSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdateRelayServiceConnection` - -```go -ctx := context.TODO() -id := webapps.NewHybridConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "hybridConnectionValue") - -payload := webapps.RelayServiceConnectionEntity{ - // ... -} - - -read, err := client.CreateOrUpdateRelayServiceConnection(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdateRelayServiceConnectionSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotHybridConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "hybridConnectionValue") - -payload := webapps.RelayServiceConnectionEntity{ - // ... -} - - -read, err := client.CreateOrUpdateRelayServiceConnectionSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdateSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.Site{ - // ... -} - - -if err := client.CreateOrUpdateSlotThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdateSourceControl` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.SiteSourceControl{ - // ... -} - - -if err := client.CreateOrUpdateSourceControlThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdateSourceControlSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.SiteSourceControl{ - // ... -} - - -if err := client.CreateOrUpdateSourceControlSlotThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.SwiftVirtualNetwork{ - // ... -} - - -read, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.SwiftVirtualNetwork{ - // ... -} - - -read, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdateVnetConnection` - -```go -ctx := context.TODO() -id := webapps.NewVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "virtualNetworkConnectionValue") - -payload := webapps.VnetInfoResource{ - // ... -} - - -read, err := client.CreateOrUpdateVnetConnection(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdateVnetConnectionGateway` - -```go -ctx := context.TODO() -id := webapps.NewGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "virtualNetworkConnectionValue", "gatewayValue") - -payload := webapps.VnetGateway{ - // ... -} - - -read, err := client.CreateOrUpdateVnetConnectionGateway(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdateVnetConnectionGatewaySlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotVirtualNetworkConnectionGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "virtualNetworkConnectionValue", "gatewayValue") - -payload := webapps.VnetGateway{ - // ... -} - - -read, err := client.CreateOrUpdateVnetConnectionGatewaySlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.CreateOrUpdateVnetConnectionSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "virtualNetworkConnectionValue") - -payload := webapps.VnetInfoResource{ - // ... -} - - -read, err := client.CreateOrUpdateVnetConnectionSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.Delete` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.Delete(ctx, id, webapps.DefaultDeleteOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteBackup` - -```go -ctx := context.TODO() -id := webapps.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "backupIdValue") - -read, err := client.DeleteBackup(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteBackupConfiguration` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.DeleteBackupConfiguration(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteBackupConfigurationSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.DeleteBackupConfigurationSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteBackupSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "backupIdValue") - -read, err := client.DeleteBackupSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteContinuousWebJob` - -```go -ctx := context.TODO() -id := webapps.NewContinuousWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "continuousWebJobValue") - -read, err := client.DeleteContinuousWebJob(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteContinuousWebJobSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotContinuousWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "continuousWebJobValue") - -read, err := client.DeleteContinuousWebJobSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteDeployment` - -```go -ctx := context.TODO() -id := webapps.NewDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "deploymentValue") - -read, err := client.DeleteDeployment(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteDeploymentSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "deploymentValue") - -read, err := client.DeleteDeploymentSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteDomainOwnershipIdentifier` - -```go -ctx := context.TODO() -id := webapps.NewDomainOwnershipIdentifierID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "domainOwnershipIdentifierValue") - -read, err := client.DeleteDomainOwnershipIdentifier(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteDomainOwnershipIdentifierSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotDomainOwnershipIdentifierID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "domainOwnershipIdentifierValue") - -read, err := client.DeleteDomainOwnershipIdentifierSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteFunction` - -```go -ctx := context.TODO() -id := webapps.NewFunctionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "functionValue") - -read, err := client.DeleteFunction(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteFunctionSecret` - -```go -ctx := context.TODO() -id := webapps.NewKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "functionValue", "keyValue") - -read, err := client.DeleteFunctionSecret(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteFunctionSecretSlot` - -```go -ctx := context.TODO() -id := webapps.NewFunctionKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "functionValue", "keyValue") - -read, err := client.DeleteFunctionSecretSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteHostNameBinding` - -```go -ctx := context.TODO() -id := webapps.NewHostNameBindingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "hostNameBindingValue") - -read, err := client.DeleteHostNameBinding(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteHostNameBindingSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotHostNameBindingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "hostNameBindingValue") - -read, err := client.DeleteHostNameBindingSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteHostSecret` - -```go -ctx := context.TODO() -id := webapps.NewDefaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "defaultValue", "keyValue") - -read, err := client.DeleteHostSecret(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteHostSecretSlot` - -```go -ctx := context.TODO() -id := webapps.NewHostDefaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "defaultValue", "keyValue") - -read, err := client.DeleteHostSecretSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteHybridConnection` - -```go -ctx := context.TODO() -id := webapps.NewRelayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "hybridConnectionNamespaceValue", "relayValue") - -read, err := client.DeleteHybridConnection(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteHybridConnectionSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotHybridConnectionNamespaceRelayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "hybridConnectionNamespaceValue", "relayValue") - -read, err := client.DeleteHybridConnectionSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteInstanceFunctionSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotFunctionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "functionValue") - -read, err := client.DeleteInstanceFunctionSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteInstanceProcess` - -```go -ctx := context.TODO() -id := webapps.NewInstanceProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "instanceIdValue", "processIdValue") - -read, err := client.DeleteInstanceProcess(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteInstanceProcessSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotInstanceProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "instanceIdValue", "processIdValue") - -read, err := client.DeleteInstanceProcessSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeletePremierAddOn` - -```go -ctx := context.TODO() -id := webapps.NewPremierAddonID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "premierAddonValue") - -read, err := client.DeletePremierAddOn(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeletePremierAddOnSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotPremierAddonID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "premierAddonValue") - -read, err := client.DeletePremierAddOnSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeletePrivateEndpointConnection` - -```go -ctx := context.TODO() -id := webapps.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "privateEndpointConnectionValue") - -if err := client.DeletePrivateEndpointConnectionThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.DeletePrivateEndpointConnectionSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "privateEndpointConnectionValue") - -if err := client.DeletePrivateEndpointConnectionSlotThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.DeleteProcess` - -```go -ctx := context.TODO() -id := webapps.NewProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "processIdValue") - -read, err := client.DeleteProcess(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteProcessSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "processIdValue") - -read, err := client.DeleteProcessSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeletePublicCertificate` - -```go -ctx := context.TODO() -id := webapps.NewPublicCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "publicCertificateValue") - -read, err := client.DeletePublicCertificate(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeletePublicCertificateSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotPublicCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "publicCertificateValue") - -read, err := client.DeletePublicCertificateSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteRelayServiceConnection` - -```go -ctx := context.TODO() -id := webapps.NewHybridConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "hybridConnectionValue") - -read, err := client.DeleteRelayServiceConnection(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteRelayServiceConnectionSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotHybridConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "hybridConnectionValue") - -read, err := client.DeleteRelayServiceConnectionSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteSiteExtension` - -```go -ctx := context.TODO() -id := webapps.NewSiteExtensionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "siteExtensionIdValue") - -read, err := client.DeleteSiteExtension(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteSiteExtensionSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotSiteExtensionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "siteExtensionIdValue") - -read, err := client.DeleteSiteExtensionSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.DeleteSlot(ctx, id, webapps.DefaultDeleteSlotOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteSourceControl` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.DeleteSourceControl(ctx, id, webapps.DefaultDeleteSourceControlOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteSourceControlSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.DeleteSourceControlSlot(ctx, id, webapps.DefaultDeleteSourceControlSlotOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteSwiftVirtualNetwork` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.DeleteSwiftVirtualNetwork(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteSwiftVirtualNetworkSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.DeleteSwiftVirtualNetworkSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteTriggeredWebJob` - -```go -ctx := context.TODO() -id := webapps.NewTriggeredWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "triggeredWebJobValue") - -read, err := client.DeleteTriggeredWebJob(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteTriggeredWebJobSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotTriggeredWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "triggeredWebJobValue") - -read, err := client.DeleteTriggeredWebJobSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteVnetConnection` - -```go -ctx := context.TODO() -id := webapps.NewVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "virtualNetworkConnectionValue") - -read, err := client.DeleteVnetConnection(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeleteVnetConnectionSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "virtualNetworkConnectionValue") - -read, err := client.DeleteVnetConnectionSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeployWorkflowArtifacts` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.WorkflowArtifacts{ - // ... -} - - -read, err := client.DeployWorkflowArtifacts(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DeployWorkflowArtifactsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.WorkflowArtifacts{ - // ... -} - - -read, err := client.DeployWorkflowArtifactsSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DiscoverBackup` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.RestoreRequest{ - // ... -} - - -read, err := client.DiscoverBackup(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.DiscoverBackupSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.RestoreRequest{ - // ... -} - - -read, err := client.DiscoverBackupSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GenerateNewSitePublishingPassword` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.GenerateNewSitePublishingPassword(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GenerateNewSitePublishingPasswordSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.GenerateNewSitePublishingPasswordSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.Get` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetAppSettingKeyVaultReference` - -```go -ctx := context.TODO() -id := webapps.NewAppSettingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "appSettingKeyValue") - -read, err := client.GetAppSettingKeyVaultReference(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetAppSettingKeyVaultReferenceSlot` - -```go -ctx := context.TODO() -id := webapps.NewConfigReferenceAppSettingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "appSettingKeyValue") - -read, err := client.GetAppSettingKeyVaultReferenceSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetAppSettingsKeyVaultReferences` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.GetAppSettingsKeyVaultReferences(ctx, id)` can be used to do batched pagination -items, err := client.GetAppSettingsKeyVaultReferencesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.GetAppSettingsKeyVaultReferencesSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -// alternatively `client.GetAppSettingsKeyVaultReferencesSlot(ctx, id)` can be used to do batched pagination -items, err := client.GetAppSettingsKeyVaultReferencesSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.GetAuthSettings` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.GetAuthSettings(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetAuthSettingsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.GetAuthSettingsSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetAuthSettingsV2` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.GetAuthSettingsV2(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetAuthSettingsV2Slot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.GetAuthSettingsV2Slot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetAuthSettingsV2WithoutSecrets` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.GetAuthSettingsV2WithoutSecrets(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetAuthSettingsV2WithoutSecretsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.GetAuthSettingsV2WithoutSecretsSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetBackupConfiguration` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.GetBackupConfiguration(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetBackupConfigurationSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.GetBackupConfigurationSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetBackupStatus` - -```go -ctx := context.TODO() -id := webapps.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "backupIdValue") - -read, err := client.GetBackupStatus(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetBackupStatusSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "backupIdValue") - -read, err := client.GetBackupStatusSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetConfiguration` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.GetConfiguration(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetConfigurationSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.GetConfigurationSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetConfigurationSnapshot` - -```go -ctx := context.TODO() -id := webapps.NewSnapshotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "snapshotIdValue") - -read, err := client.GetConfigurationSnapshot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetConfigurationSnapshotSlot` - -```go -ctx := context.TODO() -id := webapps.NewWebSnapshotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "snapshotIdValue") - -read, err := client.GetConfigurationSnapshotSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetContainerLogsZip` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.GetContainerLogsZip(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetContainerLogsZipSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.GetContainerLogsZipSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetContinuousWebJob` - -```go -ctx := context.TODO() -id := webapps.NewContinuousWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "continuousWebJobValue") - -read, err := client.GetContinuousWebJob(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetContinuousWebJobSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotContinuousWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "continuousWebJobValue") - -read, err := client.GetContinuousWebJobSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetDeployment` - -```go -ctx := context.TODO() -id := webapps.NewDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "deploymentValue") - -read, err := client.GetDeployment(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetDeploymentSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "deploymentValue") - -read, err := client.GetDeploymentSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetDiagnosticLogsConfiguration` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.GetDiagnosticLogsConfiguration(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetDiagnosticLogsConfigurationSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.GetDiagnosticLogsConfigurationSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetDomainOwnershipIdentifier` - -```go -ctx := context.TODO() -id := webapps.NewDomainOwnershipIdentifierID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "domainOwnershipIdentifierValue") - -read, err := client.GetDomainOwnershipIdentifier(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetDomainOwnershipIdentifierSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotDomainOwnershipIdentifierID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "domainOwnershipIdentifierValue") - -read, err := client.GetDomainOwnershipIdentifierSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetFtpAllowed` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.GetFtpAllowed(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetFtpAllowedSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.GetFtpAllowedSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetFunction` - -```go -ctx := context.TODO() -id := webapps.NewFunctionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "functionValue") - -read, err := client.GetFunction(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetFunctionsAdminToken` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.GetFunctionsAdminToken(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetFunctionsAdminTokenSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.GetFunctionsAdminTokenSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetHostNameBinding` - -```go -ctx := context.TODO() -id := webapps.NewHostNameBindingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "hostNameBindingValue") - -read, err := client.GetHostNameBinding(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetHostNameBindingSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotHostNameBindingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "hostNameBindingValue") - -read, err := client.GetHostNameBindingSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetHybridConnection` - -```go -ctx := context.TODO() -id := webapps.NewRelayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "hybridConnectionNamespaceValue", "relayValue") - -read, err := client.GetHybridConnection(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetHybridConnectionSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotHybridConnectionNamespaceRelayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "hybridConnectionNamespaceValue", "relayValue") - -read, err := client.GetHybridConnectionSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetInstanceFunctionSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotFunctionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "functionValue") - -read, err := client.GetInstanceFunctionSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetInstanceInfo` - -```go -ctx := context.TODO() -id := webapps.NewInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "instanceIdValue") - -read, err := client.GetInstanceInfo(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetInstanceInfoSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "instanceIdValue") - -read, err := client.GetInstanceInfoSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetInstanceMSDeployLog` - -```go -ctx := context.TODO() -id := webapps.NewInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "instanceIdValue") - -read, err := client.GetInstanceMSDeployLog(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetInstanceMSDeployLogSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "instanceIdValue") - -read, err := client.GetInstanceMSDeployLogSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetInstanceMsDeployStatus` - -```go -ctx := context.TODO() -id := webapps.NewInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "instanceIdValue") - -read, err := client.GetInstanceMsDeployStatus(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetInstanceMsDeployStatusSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "instanceIdValue") - -read, err := client.GetInstanceMsDeployStatusSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetInstanceProcess` - -```go -ctx := context.TODO() -id := webapps.NewInstanceProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "instanceIdValue", "processIdValue") - -read, err := client.GetInstanceProcess(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetInstanceProcessDump` - -```go -ctx := context.TODO() -id := webapps.NewInstanceProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "instanceIdValue", "processIdValue") - -read, err := client.GetInstanceProcessDump(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetInstanceProcessDumpSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotInstanceProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "instanceIdValue", "processIdValue") - -read, err := client.GetInstanceProcessDumpSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetInstanceProcessModule` - -```go -ctx := context.TODO() -id := webapps.NewInstanceProcessModuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "instanceIdValue", "processIdValue", "moduleValue") - -read, err := client.GetInstanceProcessModule(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetInstanceProcessModuleSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotInstanceProcessModuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "instanceIdValue", "processIdValue", "moduleValue") - -read, err := client.GetInstanceProcessModuleSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetInstanceProcessSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotInstanceProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "instanceIdValue", "processIdValue") - -read, err := client.GetInstanceProcessSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetInstanceWorkflowSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotWorkflowID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "workflowValue") - -read, err := client.GetInstanceWorkflowSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetMSDeployLog` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.GetMSDeployLog(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetMSDeployLogSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.GetMSDeployLogSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetMSDeployStatus` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.GetMSDeployStatus(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetMSDeployStatusSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.GetMSDeployStatusSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetMigrateMySqlStatus` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.GetMigrateMySqlStatus(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetMigrateMySqlStatusSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.GetMigrateMySqlStatusSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetNetworkTraces` - -```go -ctx := context.TODO() -id := webapps.NewNetworkTraceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "operationIdValue") - -read, err := client.GetNetworkTraces(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetNetworkTracesSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotNetworkTraceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "operationIdValue") - -read, err := client.GetNetworkTracesSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetNetworkTracesSlotV2` - -```go -ctx := context.TODO() -id := webapps.NewSiteSlotNetworkTraceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "operationIdValue") - -read, err := client.GetNetworkTracesSlotV2(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetNetworkTracesV2` - -```go -ctx := context.TODO() -id := webapps.NewSiteNetworkTraceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "operationIdValue") - -read, err := client.GetNetworkTracesV2(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetOneDeployStatus` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.GetOneDeployStatus(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetPremierAddOn` - -```go -ctx := context.TODO() -id := webapps.NewPremierAddonID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "premierAddonValue") - -read, err := client.GetPremierAddOn(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetPremierAddOnSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotPremierAddonID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "premierAddonValue") - -read, err := client.GetPremierAddOnSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetPrivateAccess` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.GetPrivateAccess(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetPrivateAccessSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.GetPrivateAccessSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetPrivateEndpointConnection` - -```go -ctx := context.TODO() -id := webapps.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "privateEndpointConnectionValue") - -read, err := client.GetPrivateEndpointConnection(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetPrivateEndpointConnectionList` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.GetPrivateEndpointConnectionList(ctx, id)` can be used to do batched pagination -items, err := client.GetPrivateEndpointConnectionListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.GetPrivateEndpointConnectionListSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -// alternatively `client.GetPrivateEndpointConnectionListSlot(ctx, id)` can be used to do batched pagination -items, err := client.GetPrivateEndpointConnectionListSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.GetPrivateEndpointConnectionSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "privateEndpointConnectionValue") - -read, err := client.GetPrivateEndpointConnectionSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetPrivateLinkResources` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.GetPrivateLinkResources(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetPrivateLinkResourcesSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.GetPrivateLinkResourcesSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetProcess` - -```go -ctx := context.TODO() -id := webapps.NewProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "processIdValue") - -read, err := client.GetProcess(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetProcessDump` - -```go -ctx := context.TODO() -id := webapps.NewProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "processIdValue") - -read, err := client.GetProcessDump(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetProcessDumpSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "processIdValue") - -read, err := client.GetProcessDumpSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetProcessModule` - -```go -ctx := context.TODO() -id := webapps.NewModuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "processIdValue", "moduleValue") - -read, err := client.GetProcessModule(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetProcessModuleSlot` - -```go -ctx := context.TODO() -id := webapps.NewProcessModuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "processIdValue", "moduleValue") - -read, err := client.GetProcessModuleSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetProcessSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "processIdValue") - -read, err := client.GetProcessSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetPublicCertificate` - -```go -ctx := context.TODO() -id := webapps.NewPublicCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "publicCertificateValue") - -read, err := client.GetPublicCertificate(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetPublicCertificateSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotPublicCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "publicCertificateValue") - -read, err := client.GetPublicCertificateSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetRelayServiceConnection` - -```go -ctx := context.TODO() -id := webapps.NewHybridConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "hybridConnectionValue") - -read, err := client.GetRelayServiceConnection(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetRelayServiceConnectionSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotHybridConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "hybridConnectionValue") - -read, err := client.GetRelayServiceConnectionSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetScmAllowed` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.GetScmAllowed(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetScmAllowedSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.GetScmAllowedSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetSiteConnectionStringKeyVaultReference` - -```go -ctx := context.TODO() -id := webapps.NewConnectionStringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "connectionStringKeyValue") - -read, err := client.GetSiteConnectionStringKeyVaultReference(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetSiteConnectionStringKeyVaultReferenceSlot` - -```go -ctx := context.TODO() -id := webapps.NewConfigReferenceConnectionStringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "connectionStringKeyValue") - -read, err := client.GetSiteConnectionStringKeyVaultReferenceSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetSiteConnectionStringKeyVaultReferences` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.GetSiteConnectionStringKeyVaultReferences(ctx, id)` can be used to do batched pagination -items, err := client.GetSiteConnectionStringKeyVaultReferencesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.GetSiteConnectionStringKeyVaultReferencesSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -// alternatively `client.GetSiteConnectionStringKeyVaultReferencesSlot(ctx, id)` can be used to do batched pagination -items, err := client.GetSiteConnectionStringKeyVaultReferencesSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.GetSiteExtension` - -```go -ctx := context.TODO() -id := webapps.NewSiteExtensionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "siteExtensionIdValue") - -read, err := client.GetSiteExtension(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetSiteExtensionSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotSiteExtensionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "siteExtensionIdValue") - -read, err := client.GetSiteExtensionSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetSitePhpErrorLogFlag` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.GetSitePhpErrorLogFlag(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetSitePhpErrorLogFlagSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.GetSitePhpErrorLogFlagSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.GetSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetSourceControl` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.GetSourceControl(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetSourceControlSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.GetSourceControlSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetSwiftVirtualNetworkConnection` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.GetSwiftVirtualNetworkConnection(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetSwiftVirtualNetworkConnectionSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.GetSwiftVirtualNetworkConnectionSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetTriggeredWebJob` - -```go -ctx := context.TODO() -id := webapps.NewTriggeredWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "triggeredWebJobValue") - -read, err := client.GetTriggeredWebJob(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetTriggeredWebJobHistory` - -```go -ctx := context.TODO() -id := webapps.NewHistoryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "triggeredWebJobValue", "historyValue") - -read, err := client.GetTriggeredWebJobHistory(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetTriggeredWebJobHistorySlot` - -```go -ctx := context.TODO() -id := webapps.NewTriggeredWebJobHistoryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "triggeredWebJobValue", "historyValue") - -read, err := client.GetTriggeredWebJobHistorySlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetTriggeredWebJobSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotTriggeredWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "triggeredWebJobValue") - -read, err := client.GetTriggeredWebJobSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetVnetConnection` - -```go -ctx := context.TODO() -id := webapps.NewVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "virtualNetworkConnectionValue") - -read, err := client.GetVnetConnection(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetVnetConnectionGateway` - -```go -ctx := context.TODO() -id := webapps.NewGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "virtualNetworkConnectionValue", "gatewayValue") - -read, err := client.GetVnetConnectionGateway(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetVnetConnectionGatewaySlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotVirtualNetworkConnectionGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "virtualNetworkConnectionValue", "gatewayValue") - -read, err := client.GetVnetConnectionGatewaySlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetVnetConnectionSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "virtualNetworkConnectionValue") - -read, err := client.GetVnetConnectionSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetWebJob` - -```go -ctx := context.TODO() -id := webapps.NewWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "webJobValue") - -read, err := client.GetWebJob(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetWebJobSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "webJobValue") - -read, err := client.GetWebJobSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetWebSiteContainerLogs` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.GetWebSiteContainerLogs(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetWebSiteContainerLogsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.GetWebSiteContainerLogsSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.GetWorkflow` - -```go -ctx := context.TODO() -id := webapps.NewWorkflowID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "workflowValue") - -read, err := client.GetWorkflow(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.InstallSiteExtension` - -```go -ctx := context.TODO() -id := webapps.NewSiteExtensionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "siteExtensionIdValue") - -if err := client.InstallSiteExtensionThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.InstallSiteExtensionSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotSiteExtensionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "siteExtensionIdValue") - -if err := client.InstallSiteExtensionSlotThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.IsCloneable` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.IsCloneable(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.IsCloneableSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.IsCloneableSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.List` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListApplicationSettings` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.ListApplicationSettings(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListApplicationSettingsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.ListApplicationSettingsSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListAzureStorageAccounts` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.ListAzureStorageAccounts(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListAzureStorageAccountsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.ListAzureStorageAccountsSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListBackupStatusSecrets` - -```go -ctx := context.TODO() -id := webapps.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "backupIdValue") - -payload := webapps.BackupRequest{ - // ... -} - - -read, err := client.ListBackupStatusSecrets(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListBackupStatusSecretsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "backupIdValue") - -payload := webapps.BackupRequest{ - // ... -} - - -read, err := client.ListBackupStatusSecretsSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListBackups` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.ListBackups(ctx, id)` can be used to do batched pagination -items, err := client.ListBackupsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListBackupsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -// alternatively `client.ListBackupsSlot(ctx, id)` can be used to do batched pagination -items, err := client.ListBackupsSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListBasicPublishingCredentialsPolicies` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.ListBasicPublishingCredentialsPolicies(ctx, id)` can be used to do batched pagination -items, err := client.ListBasicPublishingCredentialsPoliciesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListBasicPublishingCredentialsPoliciesSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -// alternatively `client.ListBasicPublishingCredentialsPoliciesSlot(ctx, id)` can be used to do batched pagination -items, err := client.ListBasicPublishingCredentialsPoliciesSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id, webapps.DefaultListByResourceGroupOperationOptions())` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id, webapps.DefaultListByResourceGroupOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListConfigurationSnapshotInfo` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.ListConfigurationSnapshotInfo(ctx, id)` can be used to do batched pagination -items, err := client.ListConfigurationSnapshotInfoComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListConfigurationSnapshotInfoSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -// alternatively `client.ListConfigurationSnapshotInfoSlot(ctx, id)` can be used to do batched pagination -items, err := client.ListConfigurationSnapshotInfoSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListConfigurations` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.ListConfigurations(ctx, id)` can be used to do batched pagination -items, err := client.ListConfigurationsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListConfigurationsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -// alternatively `client.ListConfigurationsSlot(ctx, id)` can be used to do batched pagination -items, err := client.ListConfigurationsSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListConnectionStrings` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.ListConnectionStrings(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListConnectionStringsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.ListConnectionStringsSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListContinuousWebJobs` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.ListContinuousWebJobs(ctx, id)` can be used to do batched pagination -items, err := client.ListContinuousWebJobsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListContinuousWebJobsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -// alternatively `client.ListContinuousWebJobsSlot(ctx, id)` can be used to do batched pagination -items, err := client.ListContinuousWebJobsSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListDeploymentLog` - -```go -ctx := context.TODO() -id := webapps.NewDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "deploymentValue") - -read, err := client.ListDeploymentLog(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListDeploymentLogSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "deploymentValue") - -read, err := client.ListDeploymentLogSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListDeployments` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.ListDeployments(ctx, id)` can be used to do batched pagination -items, err := client.ListDeploymentsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListDeploymentsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -// alternatively `client.ListDeploymentsSlot(ctx, id)` can be used to do batched pagination -items, err := client.ListDeploymentsSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListDomainOwnershipIdentifiers` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.ListDomainOwnershipIdentifiers(ctx, id)` can be used to do batched pagination -items, err := client.ListDomainOwnershipIdentifiersComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListDomainOwnershipIdentifiersSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -// alternatively `client.ListDomainOwnershipIdentifiersSlot(ctx, id)` can be used to do batched pagination -items, err := client.ListDomainOwnershipIdentifiersSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListFunctionKeys` - -```go -ctx := context.TODO() -id := webapps.NewFunctionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "functionValue") - -read, err := client.ListFunctionKeys(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListFunctionKeysSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotFunctionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "functionValue") - -read, err := client.ListFunctionKeysSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListFunctionSecrets` - -```go -ctx := context.TODO() -id := webapps.NewFunctionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "functionValue") - -read, err := client.ListFunctionSecrets(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListFunctionSecretsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotFunctionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "functionValue") - -read, err := client.ListFunctionSecretsSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListFunctions` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.ListFunctions(ctx, id)` can be used to do batched pagination -items, err := client.ListFunctionsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListHostKeys` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.ListHostKeys(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListHostKeysSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.ListHostKeysSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListHostNameBindings` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.ListHostNameBindings(ctx, id)` can be used to do batched pagination -items, err := client.ListHostNameBindingsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListHostNameBindingsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -// alternatively `client.ListHostNameBindingsSlot(ctx, id)` can be used to do batched pagination -items, err := client.ListHostNameBindingsSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListHybridConnections` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.ListHybridConnections(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListHybridConnectionsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.ListHybridConnectionsSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListInstanceFunctionsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -// alternatively `client.ListInstanceFunctionsSlot(ctx, id)` can be used to do batched pagination -items, err := client.ListInstanceFunctionsSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListInstanceIdentifiers` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.ListInstanceIdentifiers(ctx, id)` can be used to do batched pagination -items, err := client.ListInstanceIdentifiersComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListInstanceIdentifiersSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -// alternatively `client.ListInstanceIdentifiersSlot(ctx, id)` can be used to do batched pagination -items, err := client.ListInstanceIdentifiersSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListInstanceProcessModules` - -```go -ctx := context.TODO() -id := webapps.NewInstanceProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "instanceIdValue", "processIdValue") - -// alternatively `client.ListInstanceProcessModules(ctx, id)` can be used to do batched pagination -items, err := client.ListInstanceProcessModulesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListInstanceProcessModulesSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotInstanceProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "instanceIdValue", "processIdValue") - -// alternatively `client.ListInstanceProcessModulesSlot(ctx, id)` can be used to do batched pagination -items, err := client.ListInstanceProcessModulesSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListInstanceProcessThreads` - -```go -ctx := context.TODO() -id := webapps.NewInstanceProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "instanceIdValue", "processIdValue") - -// alternatively `client.ListInstanceProcessThreads(ctx, id)` can be used to do batched pagination -items, err := client.ListInstanceProcessThreadsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListInstanceProcessThreadsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotInstanceProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "instanceIdValue", "processIdValue") - -// alternatively `client.ListInstanceProcessThreadsSlot(ctx, id)` can be used to do batched pagination -items, err := client.ListInstanceProcessThreadsSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListInstanceProcesses` - -```go -ctx := context.TODO() -id := webapps.NewInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "instanceIdValue") - -// alternatively `client.ListInstanceProcesses(ctx, id)` can be used to do batched pagination -items, err := client.ListInstanceProcessesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListInstanceProcessesSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "instanceIdValue") - -// alternatively `client.ListInstanceProcessesSlot(ctx, id)` can be used to do batched pagination -items, err := client.ListInstanceProcessesSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListInstanceWorkflowsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -// alternatively `client.ListInstanceWorkflowsSlot(ctx, id)` can be used to do batched pagination -items, err := client.ListInstanceWorkflowsSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListMetadata` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.ListMetadata(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListMetadataSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.ListMetadataSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListNetworkFeatures` - -```go -ctx := context.TODO() -id := webapps.NewNetworkFeatureID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "networkFeatureValue") - -read, err := client.ListNetworkFeatures(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListNetworkFeaturesSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotNetworkFeatureID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "networkFeatureValue") - -read, err := client.ListNetworkFeaturesSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListPerfMonCounters` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.ListPerfMonCounters(ctx, id, webapps.DefaultListPerfMonCountersOperationOptions())` can be used to do batched pagination -items, err := client.ListPerfMonCountersComplete(ctx, id, webapps.DefaultListPerfMonCountersOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListPerfMonCountersSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -// alternatively `client.ListPerfMonCountersSlot(ctx, id, webapps.DefaultListPerfMonCountersSlotOperationOptions())` can be used to do batched pagination -items, err := client.ListPerfMonCountersSlotComplete(ctx, id, webapps.DefaultListPerfMonCountersSlotOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListPremierAddOns` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.ListPremierAddOns(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListPremierAddOnsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.ListPremierAddOnsSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListProcessModules` - -```go -ctx := context.TODO() -id := webapps.NewProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "processIdValue") - -// alternatively `client.ListProcessModules(ctx, id)` can be used to do batched pagination -items, err := client.ListProcessModulesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListProcessModulesSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "processIdValue") - -// alternatively `client.ListProcessModulesSlot(ctx, id)` can be used to do batched pagination -items, err := client.ListProcessModulesSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListProcessThreads` - -```go -ctx := context.TODO() -id := webapps.NewProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "processIdValue") - -// alternatively `client.ListProcessThreads(ctx, id)` can be used to do batched pagination -items, err := client.ListProcessThreadsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListProcessThreadsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "processIdValue") - -// alternatively `client.ListProcessThreadsSlot(ctx, id)` can be used to do batched pagination -items, err := client.ListProcessThreadsSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListProcesses` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.ListProcesses(ctx, id)` can be used to do batched pagination -items, err := client.ListProcessesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListProcessesSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -// alternatively `client.ListProcessesSlot(ctx, id)` can be used to do batched pagination -items, err := client.ListProcessesSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListProductionSiteDeploymentStatuses` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.ListProductionSiteDeploymentStatuses(ctx, id)` can be used to do batched pagination -items, err := client.ListProductionSiteDeploymentStatusesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListPublicCertificates` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.ListPublicCertificates(ctx, id)` can be used to do batched pagination -items, err := client.ListPublicCertificatesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListPublicCertificatesSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -// alternatively `client.ListPublicCertificatesSlot(ctx, id)` can be used to do batched pagination -items, err := client.ListPublicCertificatesSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListPublishingCredentials` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -if err := client.ListPublishingCredentialsThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.ListPublishingCredentialsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -if err := client.ListPublishingCredentialsSlotThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.ListPublishingProfileXmlWithSecrets` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.CsmPublishingProfileOptions{ - // ... -} - - -read, err := client.ListPublishingProfileXmlWithSecrets(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListPublishingProfileXmlWithSecretsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.CsmPublishingProfileOptions{ - // ... -} - - -read, err := client.ListPublishingProfileXmlWithSecretsSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListRelayServiceConnections` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.ListRelayServiceConnections(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListRelayServiceConnectionsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.ListRelayServiceConnectionsSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListSiteBackups` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.ListSiteBackups(ctx, id)` can be used to do batched pagination -items, err := client.ListSiteBackupsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListSiteBackupsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -// alternatively `client.ListSiteBackupsSlot(ctx, id)` can be used to do batched pagination -items, err := client.ListSiteBackupsSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListSiteExtensions` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.ListSiteExtensions(ctx, id)` can be used to do batched pagination -items, err := client.ListSiteExtensionsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListSiteExtensionsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -// alternatively `client.ListSiteExtensionsSlot(ctx, id)` can be used to do batched pagination -items, err := client.ListSiteExtensionsSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListSitePushSettings` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.ListSitePushSettings(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListSitePushSettingsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.ListSitePushSettingsSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListSlotConfigurationNames` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.ListSlotConfigurationNames(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListSlotDifferencesFromProduction` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.CsmSlotEntity{ - // ... -} - - -// alternatively `client.ListSlotDifferencesFromProduction(ctx, id, payload)` can be used to do batched pagination -items, err := client.ListSlotDifferencesFromProductionComplete(ctx, id, payload) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListSlotDifferencesSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.CsmSlotEntity{ - // ... -} - - -// alternatively `client.ListSlotDifferencesSlot(ctx, id, payload)` can be used to do batched pagination -items, err := client.ListSlotDifferencesSlotComplete(ctx, id, payload) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListSlotSiteDeploymentStatusesSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -// alternatively `client.ListSlotSiteDeploymentStatusesSlot(ctx, id)` can be used to do batched pagination -items, err := client.ListSlotSiteDeploymentStatusesSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListSlots` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.ListSlots(ctx, id)` can be used to do batched pagination -items, err := client.ListSlotsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListSnapshots` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.ListSnapshots(ctx, id)` can be used to do batched pagination -items, err := client.ListSnapshotsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListSnapshotsFromDRSecondary` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.ListSnapshotsFromDRSecondary(ctx, id)` can be used to do batched pagination -items, err := client.ListSnapshotsFromDRSecondaryComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListSnapshotsFromDRSecondarySlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -// alternatively `client.ListSnapshotsFromDRSecondarySlot(ctx, id)` can be used to do batched pagination -items, err := client.ListSnapshotsFromDRSecondarySlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListSnapshotsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -// alternatively `client.ListSnapshotsSlot(ctx, id)` can be used to do batched pagination -items, err := client.ListSnapshotsSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListSyncFunctionTriggers` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.ListSyncFunctionTriggers(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListSyncFunctionTriggersSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.ListSyncFunctionTriggersSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListSyncStatus` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.ListSyncStatus(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListSyncStatusSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.ListSyncStatusSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListTriggeredWebJobHistory` - -```go -ctx := context.TODO() -id := webapps.NewTriggeredWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "triggeredWebJobValue") - -// alternatively `client.ListTriggeredWebJobHistory(ctx, id)` can be used to do batched pagination -items, err := client.ListTriggeredWebJobHistoryComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListTriggeredWebJobHistorySlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotTriggeredWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "triggeredWebJobValue") - -// alternatively `client.ListTriggeredWebJobHistorySlot(ctx, id)` can be used to do batched pagination -items, err := client.ListTriggeredWebJobHistorySlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListTriggeredWebJobs` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.ListTriggeredWebJobs(ctx, id)` can be used to do batched pagination -items, err := client.ListTriggeredWebJobsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListTriggeredWebJobsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -// alternatively `client.ListTriggeredWebJobsSlot(ctx, id)` can be used to do batched pagination -items, err := client.ListTriggeredWebJobsSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListUsages` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.ListUsages(ctx, id, webapps.DefaultListUsagesOperationOptions())` can be used to do batched pagination -items, err := client.ListUsagesComplete(ctx, id, webapps.DefaultListUsagesOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListUsagesSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -// alternatively `client.ListUsagesSlot(ctx, id, webapps.DefaultListUsagesSlotOperationOptions())` can be used to do batched pagination -items, err := client.ListUsagesSlotComplete(ctx, id, webapps.DefaultListUsagesSlotOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListVnetConnections` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.ListVnetConnections(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListVnetConnectionsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.ListVnetConnectionsSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListWebJobs` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.ListWebJobs(ctx, id)` can be used to do batched pagination -items, err := client.ListWebJobsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListWebJobsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -// alternatively `client.ListWebJobsSlot(ctx, id)` can be used to do batched pagination -items, err := client.ListWebJobsSlotComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListWorkflows` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -// alternatively `client.ListWorkflows(ctx, id)` can be used to do batched pagination -items, err := client.ListWorkflowsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebAppsClient.ListWorkflowsConnections` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.ListWorkflowsConnections(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ListWorkflowsConnectionsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.ListWorkflowsConnectionsSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.MigrateMySql` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.MigrateMySqlRequest{ - // ... -} - - -if err := client.MigrateMySqlThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.MigrateStorage` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.StorageMigrationOptions{ - // ... -} - - -if err := client.MigrateStorageThenPoll(ctx, id, payload, webapps.DefaultMigrateStorageOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.PutPrivateAccessVnet` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.PrivateAccess{ - // ... -} - - -read, err := client.PutPrivateAccessVnet(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.PutPrivateAccessVnetSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.PrivateAccess{ - // ... -} - - -read, err := client.PutPrivateAccessVnetSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.RecoverSiteConfigurationSnapshot` - -```go -ctx := context.TODO() -id := webapps.NewSnapshotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "snapshotIdValue") - -read, err := client.RecoverSiteConfigurationSnapshot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.RecoverSiteConfigurationSnapshotSlot` - -```go -ctx := context.TODO() -id := webapps.NewWebSnapshotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "snapshotIdValue") - -read, err := client.RecoverSiteConfigurationSnapshotSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ResetProductionSlotConfig` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.ResetProductionSlotConfig(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.ResetSlotConfigurationSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.ResetSlotConfigurationSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.Restart` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.Restart(ctx, id, webapps.DefaultRestartOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.RestartSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.RestartSlot(ctx, id, webapps.DefaultRestartSlotOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.Restore` - -```go -ctx := context.TODO() -id := webapps.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "backupIdValue") - -payload := webapps.RestoreRequest{ - // ... -} - - -if err := client.RestoreThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.RestoreFromBackupBlob` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.RestoreRequest{ - // ... -} - - -if err := client.RestoreFromBackupBlobThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.RestoreFromBackupBlobSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.RestoreRequest{ - // ... -} - - -if err := client.RestoreFromBackupBlobSlotThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.RestoreFromDeletedApp` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.DeletedAppRestoreRequest{ - // ... -} - - -if err := client.RestoreFromDeletedAppThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.RestoreFromDeletedAppSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.DeletedAppRestoreRequest{ - // ... -} - - -if err := client.RestoreFromDeletedAppSlotThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.RestoreSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "backupIdValue") - -payload := webapps.RestoreRequest{ - // ... -} - - -if err := client.RestoreSlotThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.RestoreSnapshot` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.SnapshotRestoreRequest{ - // ... -} - - -if err := client.RestoreSnapshotThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.RestoreSnapshotSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.SnapshotRestoreRequest{ - // ... -} - - -if err := client.RestoreSnapshotSlotThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.RunTriggeredWebJob` - -```go -ctx := context.TODO() -id := webapps.NewTriggeredWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "triggeredWebJobValue") - -read, err := client.RunTriggeredWebJob(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.RunTriggeredWebJobSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotTriggeredWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "triggeredWebJobValue") - -read, err := client.RunTriggeredWebJobSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.Start` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.Start(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.StartContinuousWebJob` - -```go -ctx := context.TODO() -id := webapps.NewContinuousWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "continuousWebJobValue") - -read, err := client.StartContinuousWebJob(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.StartContinuousWebJobSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotContinuousWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "continuousWebJobValue") - -read, err := client.StartContinuousWebJobSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.StartNetworkTrace` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -if err := client.StartNetworkTraceThenPoll(ctx, id, webapps.DefaultStartNetworkTraceOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.StartNetworkTraceSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -if err := client.StartNetworkTraceSlotThenPoll(ctx, id, webapps.DefaultStartNetworkTraceSlotOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.StartSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.StartSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.StartWebSiteNetworkTrace` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.StartWebSiteNetworkTrace(ctx, id, webapps.DefaultStartWebSiteNetworkTraceOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.StartWebSiteNetworkTraceOperation` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -if err := client.StartWebSiteNetworkTraceOperationThenPoll(ctx, id, webapps.DefaultStartWebSiteNetworkTraceOperationOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.StartWebSiteNetworkTraceOperationSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -if err := client.StartWebSiteNetworkTraceOperationSlotThenPoll(ctx, id, webapps.DefaultStartWebSiteNetworkTraceOperationSlotOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.StartWebSiteNetworkTraceSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.StartWebSiteNetworkTraceSlot(ctx, id, webapps.DefaultStartWebSiteNetworkTraceSlotOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.Stop` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.Stop(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.StopContinuousWebJob` - -```go -ctx := context.TODO() -id := webapps.NewContinuousWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "continuousWebJobValue") - -read, err := client.StopContinuousWebJob(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.StopContinuousWebJobSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotContinuousWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "continuousWebJobValue") - -read, err := client.StopContinuousWebJobSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.StopNetworkTrace` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.StopNetworkTrace(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.StopNetworkTraceSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.StopNetworkTraceSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.StopSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.StopSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.StopWebSiteNetworkTrace` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.StopWebSiteNetworkTrace(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.StopWebSiteNetworkTraceSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.StopWebSiteNetworkTraceSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.SwapSlotSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.CsmSlotEntity{ - // ... -} - - -if err := client.SwapSlotSlotThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.SwapSlotWithProduction` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.CsmSlotEntity{ - // ... -} - - -if err := client.SwapSlotWithProductionThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebAppsClient.SyncFunctionTriggers` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.SyncFunctionTriggers(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.SyncFunctionTriggersSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.SyncFunctionTriggersSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.SyncFunctions` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.SyncFunctions(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.SyncFunctionsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.SyncFunctionsSlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.SyncRepository` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -read, err := client.SyncRepository(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.SyncRepositorySlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -read, err := client.SyncRepositorySlot(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.Update` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.SitePatchResource{ - // ... -} - - -read, err := client.Update(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateApplicationSettings` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.StringDictionary{ - // ... -} - - -read, err := client.UpdateApplicationSettings(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateApplicationSettingsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.StringDictionary{ - // ... -} - - -read, err := client.UpdateApplicationSettingsSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateAuthSettings` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.SiteAuthSettings{ - // ... -} - - -read, err := client.UpdateAuthSettings(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateAuthSettingsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.SiteAuthSettings{ - // ... -} - - -read, err := client.UpdateAuthSettingsSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateAuthSettingsV2` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.SiteAuthSettingsV2{ - // ... -} - - -read, err := client.UpdateAuthSettingsV2(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateAuthSettingsV2Slot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.SiteAuthSettingsV2{ - // ... -} - - -read, err := client.UpdateAuthSettingsV2Slot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateAzureStorageAccounts` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.AzureStoragePropertyDictionaryResource{ - // ... -} - - -read, err := client.UpdateAzureStorageAccounts(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateAzureStorageAccountsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.AzureStoragePropertyDictionaryResource{ - // ... -} - - -read, err := client.UpdateAzureStorageAccountsSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateBackupConfiguration` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.BackupRequest{ - // ... -} - - -read, err := client.UpdateBackupConfiguration(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateBackupConfigurationSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.BackupRequest{ - // ... -} - - -read, err := client.UpdateBackupConfigurationSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateConfiguration` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.SiteConfigResource{ - // ... -} - - -read, err := client.UpdateConfiguration(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateConfigurationSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.SiteConfigResource{ - // ... -} - - -read, err := client.UpdateConfigurationSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateConnectionStrings` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.ConnectionStringDictionary{ - // ... -} - - -read, err := client.UpdateConnectionStrings(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateConnectionStringsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.ConnectionStringDictionary{ - // ... -} - - -read, err := client.UpdateConnectionStringsSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateDiagnosticLogsConfig` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.SiteLogsConfig{ - // ... -} - - -read, err := client.UpdateDiagnosticLogsConfig(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateDiagnosticLogsConfigSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.SiteLogsConfig{ - // ... -} - - -read, err := client.UpdateDiagnosticLogsConfigSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateDomainOwnershipIdentifier` - -```go -ctx := context.TODO() -id := webapps.NewDomainOwnershipIdentifierID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "domainOwnershipIdentifierValue") - -payload := webapps.Identifier{ - // ... -} - - -read, err := client.UpdateDomainOwnershipIdentifier(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateDomainOwnershipIdentifierSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotDomainOwnershipIdentifierID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "domainOwnershipIdentifierValue") - -payload := webapps.Identifier{ - // ... -} - - -read, err := client.UpdateDomainOwnershipIdentifierSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateFtpAllowed` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.CsmPublishingCredentialsPoliciesEntity{ - // ... -} - - -read, err := client.UpdateFtpAllowed(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateFtpAllowedSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.CsmPublishingCredentialsPoliciesEntity{ - // ... -} - - -read, err := client.UpdateFtpAllowedSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateHybridConnection` - -```go -ctx := context.TODO() -id := webapps.NewRelayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "hybridConnectionNamespaceValue", "relayValue") - -payload := webapps.HybridConnection{ - // ... -} - - -read, err := client.UpdateHybridConnection(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateHybridConnectionSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotHybridConnectionNamespaceRelayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "hybridConnectionNamespaceValue", "relayValue") - -payload := webapps.HybridConnection{ - // ... -} - - -read, err := client.UpdateHybridConnectionSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateMetadata` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.StringDictionary{ - // ... -} - - -read, err := client.UpdateMetadata(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateMetadataSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.StringDictionary{ - // ... -} - - -read, err := client.UpdateMetadataSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdatePremierAddOn` - -```go -ctx := context.TODO() -id := webapps.NewPremierAddonID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "premierAddonValue") - -payload := webapps.PremierAddOnPatchResource{ - // ... -} - - -read, err := client.UpdatePremierAddOn(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdatePremierAddOnSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotPremierAddonID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "premierAddonValue") - -payload := webapps.PremierAddOnPatchResource{ - // ... -} - - -read, err := client.UpdatePremierAddOnSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateRelayServiceConnection` - -```go -ctx := context.TODO() -id := webapps.NewHybridConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "hybridConnectionValue") - -payload := webapps.RelayServiceConnectionEntity{ - // ... -} - - -read, err := client.UpdateRelayServiceConnection(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateRelayServiceConnectionSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotHybridConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "hybridConnectionValue") - -payload := webapps.RelayServiceConnectionEntity{ - // ... -} - - -read, err := client.UpdateRelayServiceConnectionSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateScmAllowed` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.CsmPublishingCredentialsPoliciesEntity{ - // ... -} - - -read, err := client.UpdateScmAllowed(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateScmAllowedSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.CsmPublishingCredentialsPoliciesEntity{ - // ... -} - - -read, err := client.UpdateScmAllowedSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateSitePushSettings` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.PushSettings{ - // ... -} - - -read, err := client.UpdateSitePushSettings(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateSitePushSettingsSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.PushSettings{ - // ... -} - - -read, err := client.UpdateSitePushSettingsSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.SitePatchResource{ - // ... -} - - -read, err := client.UpdateSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateSlotConfigurationNames` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.SlotConfigNamesResource{ - // ... -} - - -read, err := client.UpdateSlotConfigurationNames(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateSourceControl` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.SiteSourceControl{ - // ... -} - - -read, err := client.UpdateSourceControl(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateSourceControlSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.SiteSourceControl{ - // ... -} - - -read, err := client.UpdateSourceControlSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheck` - -```go -ctx := context.TODO() -id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") - -payload := webapps.SwiftVirtualNetwork{ - // ... -} - - -read, err := client.UpdateSwiftVirtualNetworkConnectionWithCheck(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheckSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") - -payload := webapps.SwiftVirtualNetwork{ - // ... -} - - -read, err := client.UpdateSwiftVirtualNetworkConnectionWithCheckSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateVnetConnection` - -```go -ctx := context.TODO() -id := webapps.NewVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "virtualNetworkConnectionValue") - -payload := webapps.VnetInfoResource{ - // ... -} - - -read, err := client.UpdateVnetConnection(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateVnetConnectionGateway` - -```go -ctx := context.TODO() -id := webapps.NewGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "virtualNetworkConnectionValue", "gatewayValue") - -payload := webapps.VnetGateway{ - // ... -} - - -read, err := client.UpdateVnetConnectionGateway(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateVnetConnectionGatewaySlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotVirtualNetworkConnectionGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "virtualNetworkConnectionValue", "gatewayValue") - -payload := webapps.VnetGateway{ - // ... -} - - -read, err := client.UpdateVnetConnectionGatewaySlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebAppsClient.UpdateVnetConnectionSlot` - -```go -ctx := context.TODO() -id := webapps.NewSlotVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "virtualNetworkConnectionValue") - -payload := webapps.VnetInfoResource{ - // ... -} - - -read, err := client.UpdateVnetConnectionSlot(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/constants.go deleted file mode 100644 index ca3a1c859d090..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/constants.go +++ /dev/null @@ -1,2496 +0,0 @@ -package webapps - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AutoHealActionType string - -const ( - AutoHealActionTypeCustomAction AutoHealActionType = "CustomAction" - AutoHealActionTypeLogEvent AutoHealActionType = "LogEvent" - AutoHealActionTypeRecycle AutoHealActionType = "Recycle" -) - -func PossibleValuesForAutoHealActionType() []string { - return []string{ - string(AutoHealActionTypeCustomAction), - string(AutoHealActionTypeLogEvent), - string(AutoHealActionTypeRecycle), - } -} - -func (s *AutoHealActionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAutoHealActionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAutoHealActionType(input string) (*AutoHealActionType, error) { - vals := map[string]AutoHealActionType{ - "customaction": AutoHealActionTypeCustomAction, - "logevent": AutoHealActionTypeLogEvent, - "recycle": AutoHealActionTypeRecycle, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AutoHealActionType(input) - return &out, nil -} - -type AzureResourceType string - -const ( - AzureResourceTypeTrafficManager AzureResourceType = "TrafficManager" - AzureResourceTypeWebsite AzureResourceType = "Website" -) - -func PossibleValuesForAzureResourceType() []string { - return []string{ - string(AzureResourceTypeTrafficManager), - string(AzureResourceTypeWebsite), - } -} - -func (s *AzureResourceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAzureResourceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAzureResourceType(input string) (*AzureResourceType, error) { - vals := map[string]AzureResourceType{ - "trafficmanager": AzureResourceTypeTrafficManager, - "website": AzureResourceTypeWebsite, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AzureResourceType(input) - return &out, nil -} - -type AzureStorageState string - -const ( - AzureStorageStateInvalidCredentials AzureStorageState = "InvalidCredentials" - AzureStorageStateInvalidShare AzureStorageState = "InvalidShare" - AzureStorageStateNotValidated AzureStorageState = "NotValidated" - AzureStorageStateOk AzureStorageState = "Ok" -) - -func PossibleValuesForAzureStorageState() []string { - return []string{ - string(AzureStorageStateInvalidCredentials), - string(AzureStorageStateInvalidShare), - string(AzureStorageStateNotValidated), - string(AzureStorageStateOk), - } -} - -func (s *AzureStorageState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAzureStorageState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAzureStorageState(input string) (*AzureStorageState, error) { - vals := map[string]AzureStorageState{ - "invalidcredentials": AzureStorageStateInvalidCredentials, - "invalidshare": AzureStorageStateInvalidShare, - "notvalidated": AzureStorageStateNotValidated, - "ok": AzureStorageStateOk, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AzureStorageState(input) - return &out, nil -} - -type AzureStorageType string - -const ( - AzureStorageTypeAzureBlob AzureStorageType = "AzureBlob" - AzureStorageTypeAzureFiles AzureStorageType = "AzureFiles" -) - -func PossibleValuesForAzureStorageType() []string { - return []string{ - string(AzureStorageTypeAzureBlob), - string(AzureStorageTypeAzureFiles), - } -} - -func (s *AzureStorageType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAzureStorageType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAzureStorageType(input string) (*AzureStorageType, error) { - vals := map[string]AzureStorageType{ - "azureblob": AzureStorageTypeAzureBlob, - "azurefiles": AzureStorageTypeAzureFiles, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AzureStorageType(input) - return &out, nil -} - -type BackupItemStatus string - -const ( - BackupItemStatusCreated BackupItemStatus = "Created" - BackupItemStatusDeleteFailed BackupItemStatus = "DeleteFailed" - BackupItemStatusDeleteInProgress BackupItemStatus = "DeleteInProgress" - BackupItemStatusDeleted BackupItemStatus = "Deleted" - BackupItemStatusFailed BackupItemStatus = "Failed" - BackupItemStatusInProgress BackupItemStatus = "InProgress" - BackupItemStatusPartiallySucceeded BackupItemStatus = "PartiallySucceeded" - BackupItemStatusSkipped BackupItemStatus = "Skipped" - BackupItemStatusSucceeded BackupItemStatus = "Succeeded" - BackupItemStatusTimedOut BackupItemStatus = "TimedOut" -) - -func PossibleValuesForBackupItemStatus() []string { - return []string{ - string(BackupItemStatusCreated), - string(BackupItemStatusDeleteFailed), - string(BackupItemStatusDeleteInProgress), - string(BackupItemStatusDeleted), - string(BackupItemStatusFailed), - string(BackupItemStatusInProgress), - string(BackupItemStatusPartiallySucceeded), - string(BackupItemStatusSkipped), - string(BackupItemStatusSucceeded), - string(BackupItemStatusTimedOut), - } -} - -func (s *BackupItemStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseBackupItemStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseBackupItemStatus(input string) (*BackupItemStatus, error) { - vals := map[string]BackupItemStatus{ - "created": BackupItemStatusCreated, - "deletefailed": BackupItemStatusDeleteFailed, - "deleteinprogress": BackupItemStatusDeleteInProgress, - "deleted": BackupItemStatusDeleted, - "failed": BackupItemStatusFailed, - "inprogress": BackupItemStatusInProgress, - "partiallysucceeded": BackupItemStatusPartiallySucceeded, - "skipped": BackupItemStatusSkipped, - "succeeded": BackupItemStatusSucceeded, - "timedout": BackupItemStatusTimedOut, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := BackupItemStatus(input) - return &out, nil -} - -type BackupRestoreOperationType string - -const ( - BackupRestoreOperationTypeClone BackupRestoreOperationType = "Clone" - BackupRestoreOperationTypeCloudFS BackupRestoreOperationType = "CloudFS" - BackupRestoreOperationTypeDefault BackupRestoreOperationType = "Default" - BackupRestoreOperationTypeRelocation BackupRestoreOperationType = "Relocation" - BackupRestoreOperationTypeSnapshot BackupRestoreOperationType = "Snapshot" -) - -func PossibleValuesForBackupRestoreOperationType() []string { - return []string{ - string(BackupRestoreOperationTypeClone), - string(BackupRestoreOperationTypeCloudFS), - string(BackupRestoreOperationTypeDefault), - string(BackupRestoreOperationTypeRelocation), - string(BackupRestoreOperationTypeSnapshot), - } -} - -func (s *BackupRestoreOperationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseBackupRestoreOperationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseBackupRestoreOperationType(input string) (*BackupRestoreOperationType, error) { - vals := map[string]BackupRestoreOperationType{ - "clone": BackupRestoreOperationTypeClone, - "cloudfs": BackupRestoreOperationTypeCloudFS, - "default": BackupRestoreOperationTypeDefault, - "relocation": BackupRestoreOperationTypeRelocation, - "snapshot": BackupRestoreOperationTypeSnapshot, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := BackupRestoreOperationType(input) - return &out, nil -} - -type BuiltInAuthenticationProvider string - -const ( - BuiltInAuthenticationProviderAzureActiveDirectory BuiltInAuthenticationProvider = "AzureActiveDirectory" - BuiltInAuthenticationProviderFacebook BuiltInAuthenticationProvider = "Facebook" - BuiltInAuthenticationProviderGithub BuiltInAuthenticationProvider = "Github" - BuiltInAuthenticationProviderGoogle BuiltInAuthenticationProvider = "Google" - BuiltInAuthenticationProviderMicrosoftAccount BuiltInAuthenticationProvider = "MicrosoftAccount" - BuiltInAuthenticationProviderTwitter BuiltInAuthenticationProvider = "Twitter" -) - -func PossibleValuesForBuiltInAuthenticationProvider() []string { - return []string{ - string(BuiltInAuthenticationProviderAzureActiveDirectory), - string(BuiltInAuthenticationProviderFacebook), - string(BuiltInAuthenticationProviderGithub), - string(BuiltInAuthenticationProviderGoogle), - string(BuiltInAuthenticationProviderMicrosoftAccount), - string(BuiltInAuthenticationProviderTwitter), - } -} - -func (s *BuiltInAuthenticationProvider) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseBuiltInAuthenticationProvider(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseBuiltInAuthenticationProvider(input string) (*BuiltInAuthenticationProvider, error) { - vals := map[string]BuiltInAuthenticationProvider{ - "azureactivedirectory": BuiltInAuthenticationProviderAzureActiveDirectory, - "facebook": BuiltInAuthenticationProviderFacebook, - "github": BuiltInAuthenticationProviderGithub, - "google": BuiltInAuthenticationProviderGoogle, - "microsoftaccount": BuiltInAuthenticationProviderMicrosoftAccount, - "twitter": BuiltInAuthenticationProviderTwitter, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := BuiltInAuthenticationProvider(input) - return &out, nil -} - -type ClientCertMode string - -const ( - ClientCertModeOptional ClientCertMode = "Optional" - ClientCertModeOptionalInteractiveUser ClientCertMode = "OptionalInteractiveUser" - ClientCertModeRequired ClientCertMode = "Required" -) - -func PossibleValuesForClientCertMode() []string { - return []string{ - string(ClientCertModeOptional), - string(ClientCertModeOptionalInteractiveUser), - string(ClientCertModeRequired), - } -} - -func (s *ClientCertMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseClientCertMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseClientCertMode(input string) (*ClientCertMode, error) { - vals := map[string]ClientCertMode{ - "optional": ClientCertModeOptional, - "optionalinteractiveuser": ClientCertModeOptionalInteractiveUser, - "required": ClientCertModeRequired, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ClientCertMode(input) - return &out, nil -} - -type ClientCredentialMethod string - -const ( - ClientCredentialMethodClientSecretPost ClientCredentialMethod = "ClientSecretPost" -) - -func PossibleValuesForClientCredentialMethod() []string { - return []string{ - string(ClientCredentialMethodClientSecretPost), - } -} - -func (s *ClientCredentialMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseClientCredentialMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseClientCredentialMethod(input string) (*ClientCredentialMethod, error) { - vals := map[string]ClientCredentialMethod{ - "clientsecretpost": ClientCredentialMethodClientSecretPost, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ClientCredentialMethod(input) - return &out, nil -} - -type CloneAbilityResult string - -const ( - CloneAbilityResultCloneable CloneAbilityResult = "Cloneable" - CloneAbilityResultNotCloneable CloneAbilityResult = "NotCloneable" - CloneAbilityResultPartiallyCloneable CloneAbilityResult = "PartiallyCloneable" -) - -func PossibleValuesForCloneAbilityResult() []string { - return []string{ - string(CloneAbilityResultCloneable), - string(CloneAbilityResultNotCloneable), - string(CloneAbilityResultPartiallyCloneable), - } -} - -func (s *CloneAbilityResult) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCloneAbilityResult(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCloneAbilityResult(input string) (*CloneAbilityResult, error) { - vals := map[string]CloneAbilityResult{ - "cloneable": CloneAbilityResultCloneable, - "notcloneable": CloneAbilityResultNotCloneable, - "partiallycloneable": CloneAbilityResultPartiallyCloneable, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CloneAbilityResult(input) - return &out, nil -} - -type ConfigReferenceSource string - -const ( - ConfigReferenceSourceKeyVault ConfigReferenceSource = "KeyVault" -) - -func PossibleValuesForConfigReferenceSource() []string { - return []string{ - string(ConfigReferenceSourceKeyVault), - } -} - -func (s *ConfigReferenceSource) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConfigReferenceSource(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConfigReferenceSource(input string) (*ConfigReferenceSource, error) { - vals := map[string]ConfigReferenceSource{ - "keyvault": ConfigReferenceSourceKeyVault, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConfigReferenceSource(input) - return &out, nil -} - -type ConnectionStringType string - -const ( - ConnectionStringTypeApiHub ConnectionStringType = "ApiHub" - ConnectionStringTypeCustom ConnectionStringType = "Custom" - ConnectionStringTypeDocDb ConnectionStringType = "DocDb" - ConnectionStringTypeEventHub ConnectionStringType = "EventHub" - ConnectionStringTypeMySql ConnectionStringType = "MySql" - ConnectionStringTypeNotificationHub ConnectionStringType = "NotificationHub" - ConnectionStringTypePostgreSQL ConnectionStringType = "PostgreSQL" - ConnectionStringTypeRedisCache ConnectionStringType = "RedisCache" - ConnectionStringTypeSQLAzure ConnectionStringType = "SQLAzure" - ConnectionStringTypeSQLServer ConnectionStringType = "SQLServer" - ConnectionStringTypeServiceBus ConnectionStringType = "ServiceBus" -) - -func PossibleValuesForConnectionStringType() []string { - return []string{ - string(ConnectionStringTypeApiHub), - string(ConnectionStringTypeCustom), - string(ConnectionStringTypeDocDb), - string(ConnectionStringTypeEventHub), - string(ConnectionStringTypeMySql), - string(ConnectionStringTypeNotificationHub), - string(ConnectionStringTypePostgreSQL), - string(ConnectionStringTypeRedisCache), - string(ConnectionStringTypeSQLAzure), - string(ConnectionStringTypeSQLServer), - string(ConnectionStringTypeServiceBus), - } -} - -func (s *ConnectionStringType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConnectionStringType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConnectionStringType(input string) (*ConnectionStringType, error) { - vals := map[string]ConnectionStringType{ - "apihub": ConnectionStringTypeApiHub, - "custom": ConnectionStringTypeCustom, - "docdb": ConnectionStringTypeDocDb, - "eventhub": ConnectionStringTypeEventHub, - "mysql": ConnectionStringTypeMySql, - "notificationhub": ConnectionStringTypeNotificationHub, - "postgresql": ConnectionStringTypePostgreSQL, - "rediscache": ConnectionStringTypeRedisCache, - "sqlazure": ConnectionStringTypeSQLAzure, - "sqlserver": ConnectionStringTypeSQLServer, - "servicebus": ConnectionStringTypeServiceBus, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConnectionStringType(input) - return &out, nil -} - -type ContinuousWebJobStatus string - -const ( - ContinuousWebJobStatusInitializing ContinuousWebJobStatus = "Initializing" - ContinuousWebJobStatusPendingRestart ContinuousWebJobStatus = "PendingRestart" - ContinuousWebJobStatusRunning ContinuousWebJobStatus = "Running" - ContinuousWebJobStatusStarting ContinuousWebJobStatus = "Starting" - ContinuousWebJobStatusStopped ContinuousWebJobStatus = "Stopped" -) - -func PossibleValuesForContinuousWebJobStatus() []string { - return []string{ - string(ContinuousWebJobStatusInitializing), - string(ContinuousWebJobStatusPendingRestart), - string(ContinuousWebJobStatusRunning), - string(ContinuousWebJobStatusStarting), - string(ContinuousWebJobStatusStopped), - } -} - -func (s *ContinuousWebJobStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseContinuousWebJobStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseContinuousWebJobStatus(input string) (*ContinuousWebJobStatus, error) { - vals := map[string]ContinuousWebJobStatus{ - "initializing": ContinuousWebJobStatusInitializing, - "pendingrestart": ContinuousWebJobStatusPendingRestart, - "running": ContinuousWebJobStatusRunning, - "starting": ContinuousWebJobStatusStarting, - "stopped": ContinuousWebJobStatusStopped, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ContinuousWebJobStatus(input) - return &out, nil -} - -type CookieExpirationConvention string - -const ( - CookieExpirationConventionFixedTime CookieExpirationConvention = "FixedTime" - CookieExpirationConventionIdentityProviderDerived CookieExpirationConvention = "IdentityProviderDerived" -) - -func PossibleValuesForCookieExpirationConvention() []string { - return []string{ - string(CookieExpirationConventionFixedTime), - string(CookieExpirationConventionIdentityProviderDerived), - } -} - -func (s *CookieExpirationConvention) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCookieExpirationConvention(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCookieExpirationConvention(input string) (*CookieExpirationConvention, error) { - vals := map[string]CookieExpirationConvention{ - "fixedtime": CookieExpirationConventionFixedTime, - "identityproviderderived": CookieExpirationConventionIdentityProviderDerived, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CookieExpirationConvention(input) - return &out, nil -} - -type CustomHostNameDnsRecordType string - -const ( - CustomHostNameDnsRecordTypeA CustomHostNameDnsRecordType = "A" - CustomHostNameDnsRecordTypeCName CustomHostNameDnsRecordType = "CName" -) - -func PossibleValuesForCustomHostNameDnsRecordType() []string { - return []string{ - string(CustomHostNameDnsRecordTypeA), - string(CustomHostNameDnsRecordTypeCName), - } -} - -func (s *CustomHostNameDnsRecordType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCustomHostNameDnsRecordType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCustomHostNameDnsRecordType(input string) (*CustomHostNameDnsRecordType, error) { - vals := map[string]CustomHostNameDnsRecordType{ - "a": CustomHostNameDnsRecordTypeA, - "cname": CustomHostNameDnsRecordTypeCName, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CustomHostNameDnsRecordType(input) - return &out, nil -} - -type DaprLogLevel string - -const ( - DaprLogLevelDebug DaprLogLevel = "debug" - DaprLogLevelError DaprLogLevel = "error" - DaprLogLevelInfo DaprLogLevel = "info" - DaprLogLevelWarn DaprLogLevel = "warn" -) - -func PossibleValuesForDaprLogLevel() []string { - return []string{ - string(DaprLogLevelDebug), - string(DaprLogLevelError), - string(DaprLogLevelInfo), - string(DaprLogLevelWarn), - } -} - -func (s *DaprLogLevel) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDaprLogLevel(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDaprLogLevel(input string) (*DaprLogLevel, error) { - vals := map[string]DaprLogLevel{ - "debug": DaprLogLevelDebug, - "error": DaprLogLevelError, - "info": DaprLogLevelInfo, - "warn": DaprLogLevelWarn, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DaprLogLevel(input) - return &out, nil -} - -type DatabaseType string - -const ( - DatabaseTypeLocalMySql DatabaseType = "LocalMySql" - DatabaseTypeMySql DatabaseType = "MySql" - DatabaseTypePostgreSql DatabaseType = "PostgreSql" - DatabaseTypeSqlAzure DatabaseType = "SqlAzure" -) - -func PossibleValuesForDatabaseType() []string { - return []string{ - string(DatabaseTypeLocalMySql), - string(DatabaseTypeMySql), - string(DatabaseTypePostgreSql), - string(DatabaseTypeSqlAzure), - } -} - -func (s *DatabaseType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDatabaseType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDatabaseType(input string) (*DatabaseType, error) { - vals := map[string]DatabaseType{ - "localmysql": DatabaseTypeLocalMySql, - "mysql": DatabaseTypeMySql, - "postgresql": DatabaseTypePostgreSql, - "sqlazure": DatabaseTypeSqlAzure, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DatabaseType(input) - return &out, nil -} - -type DefaultAction string - -const ( - DefaultActionAllow DefaultAction = "Allow" - DefaultActionDeny DefaultAction = "Deny" -) - -func PossibleValuesForDefaultAction() []string { - return []string{ - string(DefaultActionAllow), - string(DefaultActionDeny), - } -} - -func (s *DefaultAction) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDefaultAction(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDefaultAction(input string) (*DefaultAction, error) { - vals := map[string]DefaultAction{ - "allow": DefaultActionAllow, - "deny": DefaultActionDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DefaultAction(input) - return &out, nil -} - -type DeploymentBuildStatus string - -const ( - DeploymentBuildStatusBuildAborted DeploymentBuildStatus = "BuildAborted" - DeploymentBuildStatusBuildFailed DeploymentBuildStatus = "BuildFailed" - DeploymentBuildStatusBuildInProgress DeploymentBuildStatus = "BuildInProgress" - DeploymentBuildStatusBuildPending DeploymentBuildStatus = "BuildPending" - DeploymentBuildStatusBuildRequestReceived DeploymentBuildStatus = "BuildRequestReceived" - DeploymentBuildStatusBuildSuccessful DeploymentBuildStatus = "BuildSuccessful" - DeploymentBuildStatusPostBuildRestartRequired DeploymentBuildStatus = "PostBuildRestartRequired" - DeploymentBuildStatusRuntimeFailed DeploymentBuildStatus = "RuntimeFailed" - DeploymentBuildStatusRuntimeStarting DeploymentBuildStatus = "RuntimeStarting" - DeploymentBuildStatusRuntimeSuccessful DeploymentBuildStatus = "RuntimeSuccessful" - DeploymentBuildStatusStartPolling DeploymentBuildStatus = "StartPolling" - DeploymentBuildStatusStartPollingWithRestart DeploymentBuildStatus = "StartPollingWithRestart" - DeploymentBuildStatusTimedOut DeploymentBuildStatus = "TimedOut" -) - -func PossibleValuesForDeploymentBuildStatus() []string { - return []string{ - string(DeploymentBuildStatusBuildAborted), - string(DeploymentBuildStatusBuildFailed), - string(DeploymentBuildStatusBuildInProgress), - string(DeploymentBuildStatusBuildPending), - string(DeploymentBuildStatusBuildRequestReceived), - string(DeploymentBuildStatusBuildSuccessful), - string(DeploymentBuildStatusPostBuildRestartRequired), - string(DeploymentBuildStatusRuntimeFailed), - string(DeploymentBuildStatusRuntimeStarting), - string(DeploymentBuildStatusRuntimeSuccessful), - string(DeploymentBuildStatusStartPolling), - string(DeploymentBuildStatusStartPollingWithRestart), - string(DeploymentBuildStatusTimedOut), - } -} - -func (s *DeploymentBuildStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeploymentBuildStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeploymentBuildStatus(input string) (*DeploymentBuildStatus, error) { - vals := map[string]DeploymentBuildStatus{ - "buildaborted": DeploymentBuildStatusBuildAborted, - "buildfailed": DeploymentBuildStatusBuildFailed, - "buildinprogress": DeploymentBuildStatusBuildInProgress, - "buildpending": DeploymentBuildStatusBuildPending, - "buildrequestreceived": DeploymentBuildStatusBuildRequestReceived, - "buildsuccessful": DeploymentBuildStatusBuildSuccessful, - "postbuildrestartrequired": DeploymentBuildStatusPostBuildRestartRequired, - "runtimefailed": DeploymentBuildStatusRuntimeFailed, - "runtimestarting": DeploymentBuildStatusRuntimeStarting, - "runtimesuccessful": DeploymentBuildStatusRuntimeSuccessful, - "startpolling": DeploymentBuildStatusStartPolling, - "startpollingwithrestart": DeploymentBuildStatusStartPollingWithRestart, - "timedout": DeploymentBuildStatusTimedOut, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeploymentBuildStatus(input) - return &out, nil -} - -type DnsVerificationTestResult string - -const ( - DnsVerificationTestResultFailed DnsVerificationTestResult = "Failed" - DnsVerificationTestResultPassed DnsVerificationTestResult = "Passed" - DnsVerificationTestResultSkipped DnsVerificationTestResult = "Skipped" -) - -func PossibleValuesForDnsVerificationTestResult() []string { - return []string{ - string(DnsVerificationTestResultFailed), - string(DnsVerificationTestResultPassed), - string(DnsVerificationTestResultSkipped), - } -} - -func (s *DnsVerificationTestResult) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDnsVerificationTestResult(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDnsVerificationTestResult(input string) (*DnsVerificationTestResult, error) { - vals := map[string]DnsVerificationTestResult{ - "failed": DnsVerificationTestResultFailed, - "passed": DnsVerificationTestResultPassed, - "skipped": DnsVerificationTestResultSkipped, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DnsVerificationTestResult(input) - return &out, nil -} - -type ForwardProxyConvention string - -const ( - ForwardProxyConventionCustom ForwardProxyConvention = "Custom" - ForwardProxyConventionNoProxy ForwardProxyConvention = "NoProxy" - ForwardProxyConventionStandard ForwardProxyConvention = "Standard" -) - -func PossibleValuesForForwardProxyConvention() []string { - return []string{ - string(ForwardProxyConventionCustom), - string(ForwardProxyConventionNoProxy), - string(ForwardProxyConventionStandard), - } -} - -func (s *ForwardProxyConvention) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseForwardProxyConvention(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseForwardProxyConvention(input string) (*ForwardProxyConvention, error) { - vals := map[string]ForwardProxyConvention{ - "custom": ForwardProxyConventionCustom, - "noproxy": ForwardProxyConventionNoProxy, - "standard": ForwardProxyConventionStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ForwardProxyConvention(input) - return &out, nil -} - -type FrequencyUnit string - -const ( - FrequencyUnitDay FrequencyUnit = "Day" - FrequencyUnitHour FrequencyUnit = "Hour" -) - -func PossibleValuesForFrequencyUnit() []string { - return []string{ - string(FrequencyUnitDay), - string(FrequencyUnitHour), - } -} - -func (s *FrequencyUnit) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFrequencyUnit(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFrequencyUnit(input string) (*FrequencyUnit, error) { - vals := map[string]FrequencyUnit{ - "day": FrequencyUnitDay, - "hour": FrequencyUnitHour, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FrequencyUnit(input) - return &out, nil -} - -type FtpsState string - -const ( - FtpsStateAllAllowed FtpsState = "AllAllowed" - FtpsStateDisabled FtpsState = "Disabled" - FtpsStateFtpsOnly FtpsState = "FtpsOnly" -) - -func PossibleValuesForFtpsState() []string { - return []string{ - string(FtpsStateAllAllowed), - string(FtpsStateDisabled), - string(FtpsStateFtpsOnly), - } -} - -func (s *FtpsState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFtpsState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFtpsState(input string) (*FtpsState, error) { - vals := map[string]FtpsState{ - "allallowed": FtpsStateAllAllowed, - "disabled": FtpsStateDisabled, - "ftpsonly": FtpsStateFtpsOnly, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FtpsState(input) - return &out, nil -} - -type HostNameType string - -const ( - HostNameTypeManaged HostNameType = "Managed" - HostNameTypeVerified HostNameType = "Verified" -) - -func PossibleValuesForHostNameType() []string { - return []string{ - string(HostNameTypeManaged), - string(HostNameTypeVerified), - } -} - -func (s *HostNameType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseHostNameType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseHostNameType(input string) (*HostNameType, error) { - vals := map[string]HostNameType{ - "managed": HostNameTypeManaged, - "verified": HostNameTypeVerified, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := HostNameType(input) - return &out, nil -} - -type HostType string - -const ( - HostTypeRepository HostType = "Repository" - HostTypeStandard HostType = "Standard" -) - -func PossibleValuesForHostType() []string { - return []string{ - string(HostTypeRepository), - string(HostTypeStandard), - } -} - -func (s *HostType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseHostType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseHostType(input string) (*HostType, error) { - vals := map[string]HostType{ - "repository": HostTypeRepository, - "standard": HostTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := HostType(input) - return &out, nil -} - -type IPFilterTag string - -const ( - IPFilterTagDefault IPFilterTag = "Default" - IPFilterTagServiceTag IPFilterTag = "ServiceTag" - IPFilterTagXffProxy IPFilterTag = "XffProxy" -) - -func PossibleValuesForIPFilterTag() []string { - return []string{ - string(IPFilterTagDefault), - string(IPFilterTagServiceTag), - string(IPFilterTagXffProxy), - } -} - -func (s *IPFilterTag) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPFilterTag(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPFilterTag(input string) (*IPFilterTag, error) { - vals := map[string]IPFilterTag{ - "default": IPFilterTagDefault, - "servicetag": IPFilterTagServiceTag, - "xffproxy": IPFilterTagXffProxy, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPFilterTag(input) - return &out, nil -} - -type LogLevel string - -const ( - LogLevelError LogLevel = "Error" - LogLevelInformation LogLevel = "Information" - LogLevelOff LogLevel = "Off" - LogLevelVerbose LogLevel = "Verbose" - LogLevelWarning LogLevel = "Warning" -) - -func PossibleValuesForLogLevel() []string { - return []string{ - string(LogLevelError), - string(LogLevelInformation), - string(LogLevelOff), - string(LogLevelVerbose), - string(LogLevelWarning), - } -} - -func (s *LogLevel) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLogLevel(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLogLevel(input string) (*LogLevel, error) { - vals := map[string]LogLevel{ - "error": LogLevelError, - "information": LogLevelInformation, - "off": LogLevelOff, - "verbose": LogLevelVerbose, - "warning": LogLevelWarning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LogLevel(input) - return &out, nil -} - -type MSDeployLogEntryType string - -const ( - MSDeployLogEntryTypeError MSDeployLogEntryType = "Error" - MSDeployLogEntryTypeMessage MSDeployLogEntryType = "Message" - MSDeployLogEntryTypeWarning MSDeployLogEntryType = "Warning" -) - -func PossibleValuesForMSDeployLogEntryType() []string { - return []string{ - string(MSDeployLogEntryTypeError), - string(MSDeployLogEntryTypeMessage), - string(MSDeployLogEntryTypeWarning), - } -} - -func (s *MSDeployLogEntryType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMSDeployLogEntryType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMSDeployLogEntryType(input string) (*MSDeployLogEntryType, error) { - vals := map[string]MSDeployLogEntryType{ - "error": MSDeployLogEntryTypeError, - "message": MSDeployLogEntryTypeMessage, - "warning": MSDeployLogEntryTypeWarning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MSDeployLogEntryType(input) - return &out, nil -} - -type MSDeployProvisioningState string - -const ( - MSDeployProvisioningStateAccepted MSDeployProvisioningState = "accepted" - MSDeployProvisioningStateCanceled MSDeployProvisioningState = "canceled" - MSDeployProvisioningStateFailed MSDeployProvisioningState = "failed" - MSDeployProvisioningStateRunning MSDeployProvisioningState = "running" - MSDeployProvisioningStateSucceeded MSDeployProvisioningState = "succeeded" -) - -func PossibleValuesForMSDeployProvisioningState() []string { - return []string{ - string(MSDeployProvisioningStateAccepted), - string(MSDeployProvisioningStateCanceled), - string(MSDeployProvisioningStateFailed), - string(MSDeployProvisioningStateRunning), - string(MSDeployProvisioningStateSucceeded), - } -} - -func (s *MSDeployProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMSDeployProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMSDeployProvisioningState(input string) (*MSDeployProvisioningState, error) { - vals := map[string]MSDeployProvisioningState{ - "accepted": MSDeployProvisioningStateAccepted, - "canceled": MSDeployProvisioningStateCanceled, - "failed": MSDeployProvisioningStateFailed, - "running": MSDeployProvisioningStateRunning, - "succeeded": MSDeployProvisioningStateSucceeded, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MSDeployProvisioningState(input) - return &out, nil -} - -type ManagedPipelineMode string - -const ( - ManagedPipelineModeClassic ManagedPipelineMode = "Classic" - ManagedPipelineModeIntegrated ManagedPipelineMode = "Integrated" -) - -func PossibleValuesForManagedPipelineMode() []string { - return []string{ - string(ManagedPipelineModeClassic), - string(ManagedPipelineModeIntegrated), - } -} - -func (s *ManagedPipelineMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseManagedPipelineMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseManagedPipelineMode(input string) (*ManagedPipelineMode, error) { - vals := map[string]ManagedPipelineMode{ - "classic": ManagedPipelineModeClassic, - "integrated": ManagedPipelineModeIntegrated, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ManagedPipelineMode(input) - return &out, nil -} - -type MySqlMigrationType string - -const ( - MySqlMigrationTypeLocalToRemote MySqlMigrationType = "LocalToRemote" - MySqlMigrationTypeRemoteToLocal MySqlMigrationType = "RemoteToLocal" -) - -func PossibleValuesForMySqlMigrationType() []string { - return []string{ - string(MySqlMigrationTypeLocalToRemote), - string(MySqlMigrationTypeRemoteToLocal), - } -} - -func (s *MySqlMigrationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMySqlMigrationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMySqlMigrationType(input string) (*MySqlMigrationType, error) { - vals := map[string]MySqlMigrationType{ - "localtoremote": MySqlMigrationTypeLocalToRemote, - "remotetolocal": MySqlMigrationTypeRemoteToLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MySqlMigrationType(input) - return &out, nil -} - -type OperationStatus string - -const ( - OperationStatusCreated OperationStatus = "Created" - OperationStatusFailed OperationStatus = "Failed" - OperationStatusInProgress OperationStatus = "InProgress" - OperationStatusSucceeded OperationStatus = "Succeeded" - OperationStatusTimedOut OperationStatus = "TimedOut" -) - -func PossibleValuesForOperationStatus() []string { - return []string{ - string(OperationStatusCreated), - string(OperationStatusFailed), - string(OperationStatusInProgress), - string(OperationStatusSucceeded), - string(OperationStatusTimedOut), - } -} - -func (s *OperationStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOperationStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOperationStatus(input string) (*OperationStatus, error) { - vals := map[string]OperationStatus{ - "created": OperationStatusCreated, - "failed": OperationStatusFailed, - "inprogress": OperationStatusInProgress, - "succeeded": OperationStatusSucceeded, - "timedout": OperationStatusTimedOut, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OperationStatus(input) - return &out, nil -} - -type PublicCertificateLocation string - -const ( - PublicCertificateLocationCurrentUserMy PublicCertificateLocation = "CurrentUserMy" - PublicCertificateLocationLocalMachineMy PublicCertificateLocation = "LocalMachineMy" - PublicCertificateLocationUnknown PublicCertificateLocation = "Unknown" -) - -func PossibleValuesForPublicCertificateLocation() []string { - return []string{ - string(PublicCertificateLocationCurrentUserMy), - string(PublicCertificateLocationLocalMachineMy), - string(PublicCertificateLocationUnknown), - } -} - -func (s *PublicCertificateLocation) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicCertificateLocation(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicCertificateLocation(input string) (*PublicCertificateLocation, error) { - vals := map[string]PublicCertificateLocation{ - "currentusermy": PublicCertificateLocationCurrentUserMy, - "localmachinemy": PublicCertificateLocationLocalMachineMy, - "unknown": PublicCertificateLocationUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicCertificateLocation(input) - return &out, nil -} - -type PublishingProfileFormat string - -const ( - PublishingProfileFormatFileZillaThree PublishingProfileFormat = "FileZilla3" - PublishingProfileFormatFtp PublishingProfileFormat = "Ftp" - PublishingProfileFormatWebDeploy PublishingProfileFormat = "WebDeploy" -) - -func PossibleValuesForPublishingProfileFormat() []string { - return []string{ - string(PublishingProfileFormatFileZillaThree), - string(PublishingProfileFormatFtp), - string(PublishingProfileFormatWebDeploy), - } -} - -func (s *PublishingProfileFormat) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublishingProfileFormat(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublishingProfileFormat(input string) (*PublishingProfileFormat, error) { - vals := map[string]PublishingProfileFormat{ - "filezilla3": PublishingProfileFormatFileZillaThree, - "ftp": PublishingProfileFormatFtp, - "webdeploy": PublishingProfileFormatWebDeploy, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublishingProfileFormat(input) - return &out, nil -} - -type RedundancyMode string - -const ( - RedundancyModeActiveActive RedundancyMode = "ActiveActive" - RedundancyModeFailover RedundancyMode = "Failover" - RedundancyModeGeoRedundant RedundancyMode = "GeoRedundant" - RedundancyModeManual RedundancyMode = "Manual" - RedundancyModeNone RedundancyMode = "None" -) - -func PossibleValuesForRedundancyMode() []string { - return []string{ - string(RedundancyModeActiveActive), - string(RedundancyModeFailover), - string(RedundancyModeGeoRedundant), - string(RedundancyModeManual), - string(RedundancyModeNone), - } -} - -func (s *RedundancyMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRedundancyMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRedundancyMode(input string) (*RedundancyMode, error) { - vals := map[string]RedundancyMode{ - "activeactive": RedundancyModeActiveActive, - "failover": RedundancyModeFailover, - "georedundant": RedundancyModeGeoRedundant, - "manual": RedundancyModeManual, - "none": RedundancyModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RedundancyMode(input) - return &out, nil -} - -type ResolveStatus string - -const ( - ResolveStatusAccessToKeyVaultDenied ResolveStatus = "AccessToKeyVaultDenied" - ResolveStatusFetchTimedOut ResolveStatus = "FetchTimedOut" - ResolveStatusInitialized ResolveStatus = "Initialized" - ResolveStatusInvalidSyntax ResolveStatus = "InvalidSyntax" - ResolveStatusMSINotEnabled ResolveStatus = "MSINotEnabled" - ResolveStatusOtherReasons ResolveStatus = "OtherReasons" - ResolveStatusResolved ResolveStatus = "Resolved" - ResolveStatusSecretNotFound ResolveStatus = "SecretNotFound" - ResolveStatusSecretVersionNotFound ResolveStatus = "SecretVersionNotFound" - ResolveStatusUnauthorizedClient ResolveStatus = "UnauthorizedClient" - ResolveStatusVaultNotFound ResolveStatus = "VaultNotFound" -) - -func PossibleValuesForResolveStatus() []string { - return []string{ - string(ResolveStatusAccessToKeyVaultDenied), - string(ResolveStatusFetchTimedOut), - string(ResolveStatusInitialized), - string(ResolveStatusInvalidSyntax), - string(ResolveStatusMSINotEnabled), - string(ResolveStatusOtherReasons), - string(ResolveStatusResolved), - string(ResolveStatusSecretNotFound), - string(ResolveStatusSecretVersionNotFound), - string(ResolveStatusUnauthorizedClient), - string(ResolveStatusVaultNotFound), - } -} - -func (s *ResolveStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseResolveStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseResolveStatus(input string) (*ResolveStatus, error) { - vals := map[string]ResolveStatus{ - "accesstokeyvaultdenied": ResolveStatusAccessToKeyVaultDenied, - "fetchtimedout": ResolveStatusFetchTimedOut, - "initialized": ResolveStatusInitialized, - "invalidsyntax": ResolveStatusInvalidSyntax, - "msinotenabled": ResolveStatusMSINotEnabled, - "otherreasons": ResolveStatusOtherReasons, - "resolved": ResolveStatusResolved, - "secretnotfound": ResolveStatusSecretNotFound, - "secretversionnotfound": ResolveStatusSecretVersionNotFound, - "unauthorizedclient": ResolveStatusUnauthorizedClient, - "vaultnotfound": ResolveStatusVaultNotFound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ResolveStatus(input) - return &out, nil -} - -type RouteType string - -const ( - RouteTypeDefault RouteType = "DEFAULT" - RouteTypeINHERITED RouteType = "INHERITED" - RouteTypeSTATIC RouteType = "STATIC" -) - -func PossibleValuesForRouteType() []string { - return []string{ - string(RouteTypeDefault), - string(RouteTypeINHERITED), - string(RouteTypeSTATIC), - } -} - -func (s *RouteType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteType(input string) (*RouteType, error) { - vals := map[string]RouteType{ - "default": RouteTypeDefault, - "inherited": RouteTypeINHERITED, - "static": RouteTypeSTATIC, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteType(input) - return &out, nil -} - -type ScmType string - -const ( - ScmTypeBitbucketGit ScmType = "BitbucketGit" - ScmTypeBitbucketHg ScmType = "BitbucketHg" - ScmTypeCodePlexGit ScmType = "CodePlexGit" - ScmTypeCodePlexHg ScmType = "CodePlexHg" - ScmTypeDropbox ScmType = "Dropbox" - ScmTypeExternalGit ScmType = "ExternalGit" - ScmTypeExternalHg ScmType = "ExternalHg" - ScmTypeGitHub ScmType = "GitHub" - ScmTypeLocalGit ScmType = "LocalGit" - ScmTypeNone ScmType = "None" - ScmTypeOneDrive ScmType = "OneDrive" - ScmTypeTfs ScmType = "Tfs" - ScmTypeVSO ScmType = "VSO" - ScmTypeVSTSRM ScmType = "VSTSRM" -) - -func PossibleValuesForScmType() []string { - return []string{ - string(ScmTypeBitbucketGit), - string(ScmTypeBitbucketHg), - string(ScmTypeCodePlexGit), - string(ScmTypeCodePlexHg), - string(ScmTypeDropbox), - string(ScmTypeExternalGit), - string(ScmTypeExternalHg), - string(ScmTypeGitHub), - string(ScmTypeLocalGit), - string(ScmTypeNone), - string(ScmTypeOneDrive), - string(ScmTypeTfs), - string(ScmTypeVSO), - string(ScmTypeVSTSRM), - } -} - -func (s *ScmType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseScmType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseScmType(input string) (*ScmType, error) { - vals := map[string]ScmType{ - "bitbucketgit": ScmTypeBitbucketGit, - "bitbuckethg": ScmTypeBitbucketHg, - "codeplexgit": ScmTypeCodePlexGit, - "codeplexhg": ScmTypeCodePlexHg, - "dropbox": ScmTypeDropbox, - "externalgit": ScmTypeExternalGit, - "externalhg": ScmTypeExternalHg, - "github": ScmTypeGitHub, - "localgit": ScmTypeLocalGit, - "none": ScmTypeNone, - "onedrive": ScmTypeOneDrive, - "tfs": ScmTypeTfs, - "vso": ScmTypeVSO, - "vstsrm": ScmTypeVSTSRM, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ScmType(input) - return &out, nil -} - -type SiteAvailabilityState string - -const ( - SiteAvailabilityStateDisasterRecoveryMode SiteAvailabilityState = "DisasterRecoveryMode" - SiteAvailabilityStateLimited SiteAvailabilityState = "Limited" - SiteAvailabilityStateNormal SiteAvailabilityState = "Normal" -) - -func PossibleValuesForSiteAvailabilityState() []string { - return []string{ - string(SiteAvailabilityStateDisasterRecoveryMode), - string(SiteAvailabilityStateLimited), - string(SiteAvailabilityStateNormal), - } -} - -func (s *SiteAvailabilityState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSiteAvailabilityState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSiteAvailabilityState(input string) (*SiteAvailabilityState, error) { - vals := map[string]SiteAvailabilityState{ - "disasterrecoverymode": SiteAvailabilityStateDisasterRecoveryMode, - "limited": SiteAvailabilityStateLimited, - "normal": SiteAvailabilityStateNormal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SiteAvailabilityState(input) - return &out, nil -} - -type SiteExtensionType string - -const ( - SiteExtensionTypeGallery SiteExtensionType = "Gallery" - SiteExtensionTypeWebRoot SiteExtensionType = "WebRoot" -) - -func PossibleValuesForSiteExtensionType() []string { - return []string{ - string(SiteExtensionTypeGallery), - string(SiteExtensionTypeWebRoot), - } -} - -func (s *SiteExtensionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSiteExtensionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSiteExtensionType(input string) (*SiteExtensionType, error) { - vals := map[string]SiteExtensionType{ - "gallery": SiteExtensionTypeGallery, - "webroot": SiteExtensionTypeWebRoot, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SiteExtensionType(input) - return &out, nil -} - -type SiteLoadBalancing string - -const ( - SiteLoadBalancingLeastRequests SiteLoadBalancing = "LeastRequests" - SiteLoadBalancingLeastResponseTime SiteLoadBalancing = "LeastResponseTime" - SiteLoadBalancingPerSiteRoundRobin SiteLoadBalancing = "PerSiteRoundRobin" - SiteLoadBalancingRequestHash SiteLoadBalancing = "RequestHash" - SiteLoadBalancingWeightedRoundRobin SiteLoadBalancing = "WeightedRoundRobin" - SiteLoadBalancingWeightedTotalTraffic SiteLoadBalancing = "WeightedTotalTraffic" -) - -func PossibleValuesForSiteLoadBalancing() []string { - return []string{ - string(SiteLoadBalancingLeastRequests), - string(SiteLoadBalancingLeastResponseTime), - string(SiteLoadBalancingPerSiteRoundRobin), - string(SiteLoadBalancingRequestHash), - string(SiteLoadBalancingWeightedRoundRobin), - string(SiteLoadBalancingWeightedTotalTraffic), - } -} - -func (s *SiteLoadBalancing) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSiteLoadBalancing(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSiteLoadBalancing(input string) (*SiteLoadBalancing, error) { - vals := map[string]SiteLoadBalancing{ - "leastrequests": SiteLoadBalancingLeastRequests, - "leastresponsetime": SiteLoadBalancingLeastResponseTime, - "persiteroundrobin": SiteLoadBalancingPerSiteRoundRobin, - "requesthash": SiteLoadBalancingRequestHash, - "weightedroundrobin": SiteLoadBalancingWeightedRoundRobin, - "weightedtotaltraffic": SiteLoadBalancingWeightedTotalTraffic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SiteLoadBalancing(input) - return &out, nil -} - -type SiteRuntimeState string - -const ( - SiteRuntimeStateREADY SiteRuntimeState = "READY" - SiteRuntimeStateSTOPPED SiteRuntimeState = "STOPPED" - SiteRuntimeStateUNKNOWN SiteRuntimeState = "UNKNOWN" -) - -func PossibleValuesForSiteRuntimeState() []string { - return []string{ - string(SiteRuntimeStateREADY), - string(SiteRuntimeStateSTOPPED), - string(SiteRuntimeStateUNKNOWN), - } -} - -func (s *SiteRuntimeState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSiteRuntimeState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSiteRuntimeState(input string) (*SiteRuntimeState, error) { - vals := map[string]SiteRuntimeState{ - "ready": SiteRuntimeStateREADY, - "stopped": SiteRuntimeStateSTOPPED, - "unknown": SiteRuntimeStateUNKNOWN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SiteRuntimeState(input) - return &out, nil -} - -type SslState string - -const ( - SslStateDisabled SslState = "Disabled" - SslStateIPBasedEnabled SslState = "IpBasedEnabled" - SslStateSniEnabled SslState = "SniEnabled" -) - -func PossibleValuesForSslState() []string { - return []string{ - string(SslStateDisabled), - string(SslStateIPBasedEnabled), - string(SslStateSniEnabled), - } -} - -func (s *SslState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSslState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSslState(input string) (*SslState, error) { - vals := map[string]SslState{ - "disabled": SslStateDisabled, - "ipbasedenabled": SslStateIPBasedEnabled, - "snienabled": SslStateSniEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SslState(input) - return &out, nil -} - -type SupportedTlsVersions string - -const ( - SupportedTlsVersionsOnePointOne SupportedTlsVersions = "1.1" - SupportedTlsVersionsOnePointTwo SupportedTlsVersions = "1.2" - SupportedTlsVersionsOnePointZero SupportedTlsVersions = "1.0" -) - -func PossibleValuesForSupportedTlsVersions() []string { - return []string{ - string(SupportedTlsVersionsOnePointOne), - string(SupportedTlsVersionsOnePointTwo), - string(SupportedTlsVersionsOnePointZero), - } -} - -func (s *SupportedTlsVersions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSupportedTlsVersions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSupportedTlsVersions(input string) (*SupportedTlsVersions, error) { - vals := map[string]SupportedTlsVersions{ - "1.1": SupportedTlsVersionsOnePointOne, - "1.2": SupportedTlsVersionsOnePointTwo, - "1.0": SupportedTlsVersionsOnePointZero, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SupportedTlsVersions(input) - return &out, nil -} - -type TlsCipherSuites string - -const ( - TlsCipherSuitesTLSAESOneTwoEightGCMSHATwoFiveSix TlsCipherSuites = "TLS_AES_128_GCM_SHA256" - TlsCipherSuitesTLSAESTwoFiveSixGCMSHAThreeEightFour TlsCipherSuites = "TLS_AES_256_GCM_SHA384" - TlsCipherSuitesTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix TlsCipherSuites = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" - TlsCipherSuitesTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix TlsCipherSuites = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" - TlsCipherSuitesTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour TlsCipherSuites = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" - TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightCBCSHA TlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" - TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix TlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" - TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix TlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" - TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixCBCSHA TlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" - TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour TlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" - TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour TlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" - TlsCipherSuitesTLSRSAWITHAESOneTwoEightCBCSHA TlsCipherSuites = "TLS_RSA_WITH_AES_128_CBC_SHA" - TlsCipherSuitesTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix TlsCipherSuites = "TLS_RSA_WITH_AES_128_CBC_SHA256" - TlsCipherSuitesTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix TlsCipherSuites = "TLS_RSA_WITH_AES_128_GCM_SHA256" - TlsCipherSuitesTLSRSAWITHAESTwoFiveSixCBCSHA TlsCipherSuites = "TLS_RSA_WITH_AES_256_CBC_SHA" - TlsCipherSuitesTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix TlsCipherSuites = "TLS_RSA_WITH_AES_256_CBC_SHA256" - TlsCipherSuitesTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour TlsCipherSuites = "TLS_RSA_WITH_AES_256_GCM_SHA384" -) - -func PossibleValuesForTlsCipherSuites() []string { - return []string{ - string(TlsCipherSuitesTLSAESOneTwoEightGCMSHATwoFiveSix), - string(TlsCipherSuitesTLSAESTwoFiveSixGCMSHAThreeEightFour), - string(TlsCipherSuitesTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix), - string(TlsCipherSuitesTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(TlsCipherSuitesTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - string(TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightCBCSHA), - string(TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix), - string(TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixCBCSHA), - string(TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour), - string(TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - string(TlsCipherSuitesTLSRSAWITHAESOneTwoEightCBCSHA), - string(TlsCipherSuitesTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix), - string(TlsCipherSuitesTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(TlsCipherSuitesTLSRSAWITHAESTwoFiveSixCBCSHA), - string(TlsCipherSuitesTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix), - string(TlsCipherSuitesTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - } -} - -func (s *TlsCipherSuites) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTlsCipherSuites(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTlsCipherSuites(input string) (*TlsCipherSuites, error) { - vals := map[string]TlsCipherSuites{ - "tls_aes_128_gcm_sha256": TlsCipherSuitesTLSAESOneTwoEightGCMSHATwoFiveSix, - "tls_aes_256_gcm_sha384": TlsCipherSuitesTLSAESTwoFiveSixGCMSHAThreeEightFour, - "tls_ecdhe_ecdsa_with_aes_128_cbc_sha256": TlsCipherSuitesTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_ecdhe_ecdsa_with_aes_128_gcm_sha256": TlsCipherSuitesTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_ecdhe_ecdsa_with_aes_256_gcm_sha384": TlsCipherSuitesTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - "tls_ecdhe_rsa_with_aes_128_cbc_sha": TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightCBCSHA, - "tls_ecdhe_rsa_with_aes_128_cbc_sha256": TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_ecdhe_rsa_with_aes_128_gcm_sha256": TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_ecdhe_rsa_with_aes_256_cbc_sha": TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixCBCSHA, - "tls_ecdhe_rsa_with_aes_256_cbc_sha384": TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour, - "tls_ecdhe_rsa_with_aes_256_gcm_sha384": TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - "tls_rsa_with_aes_128_cbc_sha": TlsCipherSuitesTLSRSAWITHAESOneTwoEightCBCSHA, - "tls_rsa_with_aes_128_cbc_sha256": TlsCipherSuitesTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_rsa_with_aes_128_gcm_sha256": TlsCipherSuitesTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_rsa_with_aes_256_cbc_sha": TlsCipherSuitesTLSRSAWITHAESTwoFiveSixCBCSHA, - "tls_rsa_with_aes_256_cbc_sha256": TlsCipherSuitesTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix, - "tls_rsa_with_aes_256_gcm_sha384": TlsCipherSuitesTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TlsCipherSuites(input) - return &out, nil -} - -type TriggeredWebJobStatus string - -const ( - TriggeredWebJobStatusError TriggeredWebJobStatus = "Error" - TriggeredWebJobStatusFailed TriggeredWebJobStatus = "Failed" - TriggeredWebJobStatusSuccess TriggeredWebJobStatus = "Success" -) - -func PossibleValuesForTriggeredWebJobStatus() []string { - return []string{ - string(TriggeredWebJobStatusError), - string(TriggeredWebJobStatusFailed), - string(TriggeredWebJobStatusSuccess), - } -} - -func (s *TriggeredWebJobStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTriggeredWebJobStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTriggeredWebJobStatus(input string) (*TriggeredWebJobStatus, error) { - vals := map[string]TriggeredWebJobStatus{ - "error": TriggeredWebJobStatusError, - "failed": TriggeredWebJobStatusFailed, - "success": TriggeredWebJobStatusSuccess, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TriggeredWebJobStatus(input) - return &out, nil -} - -type UnauthenticatedClientAction string - -const ( - UnauthenticatedClientActionAllowAnonymous UnauthenticatedClientAction = "AllowAnonymous" - UnauthenticatedClientActionRedirectToLoginPage UnauthenticatedClientAction = "RedirectToLoginPage" -) - -func PossibleValuesForUnauthenticatedClientAction() []string { - return []string{ - string(UnauthenticatedClientActionAllowAnonymous), - string(UnauthenticatedClientActionRedirectToLoginPage), - } -} - -func (s *UnauthenticatedClientAction) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseUnauthenticatedClientAction(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseUnauthenticatedClientAction(input string) (*UnauthenticatedClientAction, error) { - vals := map[string]UnauthenticatedClientAction{ - "allowanonymous": UnauthenticatedClientActionAllowAnonymous, - "redirecttologinpage": UnauthenticatedClientActionRedirectToLoginPage, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := UnauthenticatedClientAction(input) - return &out, nil -} - -type UnauthenticatedClientActionV2 string - -const ( - UnauthenticatedClientActionV2AllowAnonymous UnauthenticatedClientActionV2 = "AllowAnonymous" - UnauthenticatedClientActionV2RedirectToLoginPage UnauthenticatedClientActionV2 = "RedirectToLoginPage" - UnauthenticatedClientActionV2ReturnFourZeroOne UnauthenticatedClientActionV2 = "Return401" - UnauthenticatedClientActionV2ReturnFourZeroThree UnauthenticatedClientActionV2 = "Return403" -) - -func PossibleValuesForUnauthenticatedClientActionV2() []string { - return []string{ - string(UnauthenticatedClientActionV2AllowAnonymous), - string(UnauthenticatedClientActionV2RedirectToLoginPage), - string(UnauthenticatedClientActionV2ReturnFourZeroOne), - string(UnauthenticatedClientActionV2ReturnFourZeroThree), - } -} - -func (s *UnauthenticatedClientActionV2) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseUnauthenticatedClientActionV2(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseUnauthenticatedClientActionV2(input string) (*UnauthenticatedClientActionV2, error) { - vals := map[string]UnauthenticatedClientActionV2{ - "allowanonymous": UnauthenticatedClientActionV2AllowAnonymous, - "redirecttologinpage": UnauthenticatedClientActionV2RedirectToLoginPage, - "return401": UnauthenticatedClientActionV2ReturnFourZeroOne, - "return403": UnauthenticatedClientActionV2ReturnFourZeroThree, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := UnauthenticatedClientActionV2(input) - return &out, nil -} - -type UsageState string - -const ( - UsageStateExceeded UsageState = "Exceeded" - UsageStateNormal UsageState = "Normal" -) - -func PossibleValuesForUsageState() []string { - return []string{ - string(UsageStateExceeded), - string(UsageStateNormal), - } -} - -func (s *UsageState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseUsageState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseUsageState(input string) (*UsageState, error) { - vals := map[string]UsageState{ - "exceeded": UsageStateExceeded, - "normal": UsageStateNormal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := UsageState(input) - return &out, nil -} - -type WebJobType string - -const ( - WebJobTypeContinuous WebJobType = "Continuous" - WebJobTypeTriggered WebJobType = "Triggered" -) - -func PossibleValuesForWebJobType() []string { - return []string{ - string(WebJobTypeContinuous), - string(WebJobTypeTriggered), - } -} - -func (s *WebJobType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWebJobType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWebJobType(input string) (*WebJobType, error) { - vals := map[string]WebJobType{ - "continuous": WebJobTypeContinuous, - "triggered": WebJobTypeTriggered, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WebJobType(input) - return &out, nil -} - -type WorkflowHealthState string - -const ( - WorkflowHealthStateHealthy WorkflowHealthState = "Healthy" - WorkflowHealthStateNotSpecified WorkflowHealthState = "NotSpecified" - WorkflowHealthStateUnhealthy WorkflowHealthState = "Unhealthy" - WorkflowHealthStateUnknown WorkflowHealthState = "Unknown" -) - -func PossibleValuesForWorkflowHealthState() []string { - return []string{ - string(WorkflowHealthStateHealthy), - string(WorkflowHealthStateNotSpecified), - string(WorkflowHealthStateUnhealthy), - string(WorkflowHealthStateUnknown), - } -} - -func (s *WorkflowHealthState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWorkflowHealthState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWorkflowHealthState(input string) (*WorkflowHealthState, error) { - vals := map[string]WorkflowHealthState{ - "healthy": WorkflowHealthStateHealthy, - "notspecified": WorkflowHealthStateNotSpecified, - "unhealthy": WorkflowHealthStateUnhealthy, - "unknown": WorkflowHealthStateUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WorkflowHealthState(input) - return &out, nil -} - -type WorkflowState string - -const ( - WorkflowStateCompleted WorkflowState = "Completed" - WorkflowStateDeleted WorkflowState = "Deleted" - WorkflowStateDisabled WorkflowState = "Disabled" - WorkflowStateEnabled WorkflowState = "Enabled" - WorkflowStateNotSpecified WorkflowState = "NotSpecified" - WorkflowStateSuspended WorkflowState = "Suspended" -) - -func PossibleValuesForWorkflowState() []string { - return []string{ - string(WorkflowStateCompleted), - string(WorkflowStateDeleted), - string(WorkflowStateDisabled), - string(WorkflowStateEnabled), - string(WorkflowStateNotSpecified), - string(WorkflowStateSuspended), - } -} - -func (s *WorkflowState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWorkflowState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWorkflowState(input string) (*WorkflowState, error) { - vals := map[string]WorkflowState{ - "completed": WorkflowStateCompleted, - "deleted": WorkflowStateDeleted, - "disabled": WorkflowStateDisabled, - "enabled": WorkflowStateEnabled, - "notspecified": WorkflowStateNotSpecified, - "suspended": WorkflowStateSuspended, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WorkflowState(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_azurestorageinfovalue.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_azurestorageinfovalue.go deleted file mode 100644 index 6c3036bc81293..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_azurestorageinfovalue.go +++ /dev/null @@ -1,13 +0,0 @@ -package webapps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureStorageInfoValue struct { - AccessKey *string `json:"accessKey,omitempty"` - AccountName *string `json:"accountName,omitempty"` - MountPath *string `json:"mountPath,omitempty"` - ShareName *string `json:"shareName,omitempty"` - State *AzureStorageState `json:"state,omitempty"` - Type *AzureStorageType `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_siteproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_siteproperties.go deleted file mode 100644 index db2b3b6e3bc07..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_siteproperties.go +++ /dev/null @@ -1,87 +0,0 @@ -package webapps - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SiteProperties struct { - AvailabilityState *SiteAvailabilityState `json:"availabilityState,omitempty"` - ClientAffinityEnabled *bool `json:"clientAffinityEnabled,omitempty"` - ClientCertEnabled *bool `json:"clientCertEnabled,omitempty"` - ClientCertExclusionPaths *string `json:"clientCertExclusionPaths,omitempty"` - ClientCertMode *ClientCertMode `json:"clientCertMode,omitempty"` - CloningInfo *CloningInfo `json:"cloningInfo,omitempty"` - ContainerSize *int64 `json:"containerSize,omitempty"` - CustomDomainVerificationId *string `json:"customDomainVerificationId,omitempty"` - DailyMemoryTimeQuota *int64 `json:"dailyMemoryTimeQuota,omitempty"` - DaprConfig *DaprConfig `json:"daprConfig,omitempty"` - DefaultHostName *string `json:"defaultHostName,omitempty"` - Enabled *bool `json:"enabled,omitempty"` - EnabledHostNames *[]string `json:"enabledHostNames,omitempty"` - EndToEndEncryptionEnabled *bool `json:"endToEndEncryptionEnabled,omitempty"` - HTTPSOnly *bool `json:"httpsOnly,omitempty"` - HostNameSslStates *[]HostNameSslState `json:"hostNameSslStates,omitempty"` - HostNames *[]string `json:"hostNames,omitempty"` - HostNamesDisabled *bool `json:"hostNamesDisabled,omitempty"` - HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` - HyperV *bool `json:"hyperV,omitempty"` - InProgressOperationId *string `json:"inProgressOperationId,omitempty"` - IsDefaultContainer *bool `json:"isDefaultContainer,omitempty"` - IsXenon *bool `json:"isXenon,omitempty"` - KeyVaultReferenceIdentity *string `json:"keyVaultReferenceIdentity,omitempty"` - LastModifiedTimeUtc *string `json:"lastModifiedTimeUtc,omitempty"` - ManagedEnvironmentId *string `json:"managedEnvironmentId,omitempty"` - MaxNumberOfWorkers *int64 `json:"maxNumberOfWorkers,omitempty"` - OutboundIPAddresses *string `json:"outboundIpAddresses,omitempty"` - PossibleOutboundIPAddresses *string `json:"possibleOutboundIpAddresses,omitempty"` - PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` - RedundancyMode *RedundancyMode `json:"redundancyMode,omitempty"` - RepositorySiteName *string `json:"repositorySiteName,omitempty"` - Reserved *bool `json:"reserved,omitempty"` - ResourceConfig *ResourceConfig `json:"resourceConfig,omitempty"` - ResourceGroup *string `json:"resourceGroup,omitempty"` - ScmSiteAlsoStopped *bool `json:"scmSiteAlsoStopped,omitempty"` - ServerFarmId *string `json:"serverFarmId,omitempty"` - SiteConfig *SiteConfig `json:"siteConfig,omitempty"` - SlotSwapStatus *SlotSwapStatus `json:"slotSwapStatus,omitempty"` - State *string `json:"state,omitempty"` - StorageAccountRequired *bool `json:"storageAccountRequired,omitempty"` - SuspendedTill *string `json:"suspendedTill,omitempty"` - TargetSwapSlot *string `json:"targetSwapSlot,omitempty"` - TrafficManagerHostNames *[]string `json:"trafficManagerHostNames,omitempty"` - UsageState *UsageState `json:"usageState,omitempty"` - VirtualNetworkSubnetId *string `json:"virtualNetworkSubnetId,omitempty"` - VnetContentShareEnabled *bool `json:"vnetContentShareEnabled,omitempty"` - VnetImagePullEnabled *bool `json:"vnetImagePullEnabled,omitempty"` - VnetRouteAllEnabled *bool `json:"vnetRouteAllEnabled,omitempty"` - WorkloadProfileName *string `json:"workloadProfileName,omitempty"` -} - -func (o *SiteProperties) GetLastModifiedTimeUtcAsTime() (*time.Time, error) { - if o.LastModifiedTimeUtc == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModifiedTimeUtc, "2006-01-02T15:04:05Z07:00") -} - -func (o *SiteProperties) SetLastModifiedTimeUtcAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModifiedTimeUtc = &formatted -} - -func (o *SiteProperties) GetSuspendedTillAsTime() (*time.Time, error) { - if o.SuspendedTill == nil { - return nil, nil - } - return dates.ParseAsFormat(o.SuspendedTill, "2006-01-02T15:04:05Z07:00") -} - -func (o *SiteProperties) SetSuspendedTillAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.SuspendedTill = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/predicates.go deleted file mode 100644 index a1ca5255822a3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/predicates.go +++ /dev/null @@ -1,760 +0,0 @@ -package webapps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApiKVReferenceOperationPredicate struct { - Id *string - Kind *string - Name *string - Type *string -} - -func (p ApiKVReferenceOperationPredicate) Matches(input ApiKVReference) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type BackupItemOperationPredicate struct { - Id *string - Kind *string - Name *string - Type *string -} - -func (p BackupItemOperationPredicate) Matches(input BackupItem) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type ContinuousWebJobOperationPredicate struct { - Id *string - Kind *string - Name *string - Type *string -} - -func (p ContinuousWebJobOperationPredicate) Matches(input ContinuousWebJob) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type CsmDeploymentStatusOperationPredicate struct { - Id *string - Kind *string - Name *string - Type *string -} - -func (p CsmDeploymentStatusOperationPredicate) Matches(input CsmDeploymentStatus) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type CsmPublishingCredentialsPoliciesEntityOperationPredicate struct { - Id *string - Kind *string - Name *string - Type *string -} - -func (p CsmPublishingCredentialsPoliciesEntityOperationPredicate) Matches(input CsmPublishingCredentialsPoliciesEntity) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type CsmUsageQuotaOperationPredicate struct { - CurrentValue *int64 - Limit *int64 - NextResetTime *string - Unit *string -} - -func (p CsmUsageQuotaOperationPredicate) Matches(input CsmUsageQuota) bool { - - if p.CurrentValue != nil && (input.CurrentValue == nil || *p.CurrentValue != *input.CurrentValue) { - return false - } - - if p.Limit != nil && (input.Limit == nil || *p.Limit != *input.Limit) { - return false - } - - if p.NextResetTime != nil && (input.NextResetTime == nil || *p.NextResetTime != *input.NextResetTime) { - return false - } - - if p.Unit != nil && (input.Unit == nil || *p.Unit != *input.Unit) { - return false - } - - return true -} - -type DeploymentOperationPredicate struct { - Id *string - Kind *string - Name *string - Type *string -} - -func (p DeploymentOperationPredicate) Matches(input Deployment) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type FunctionEnvelopeOperationPredicate struct { - Id *string - Kind *string - Name *string - Type *string -} - -func (p FunctionEnvelopeOperationPredicate) Matches(input FunctionEnvelope) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type HostNameBindingOperationPredicate struct { - Id *string - Kind *string - Name *string - Type *string -} - -func (p HostNameBindingOperationPredicate) Matches(input HostNameBinding) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type IdentifierOperationPredicate struct { - Id *string - Kind *string - Name *string - Type *string -} - -func (p IdentifierOperationPredicate) Matches(input Identifier) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type PerfMonResponseOperationPredicate struct { - Code *string - Message *string -} - -func (p PerfMonResponseOperationPredicate) Matches(input PerfMonResponse) bool { - - if p.Code != nil && (input.Code == nil || *p.Code != *input.Code) { - return false - } - - if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { - return false - } - - return true -} - -type ProcessInfoOperationPredicate struct { - Id *string - Kind *string - Name *string - Type *string -} - -func (p ProcessInfoOperationPredicate) Matches(input ProcessInfo) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type ProcessModuleInfoOperationPredicate struct { - Id *string - Kind *string - Name *string - Type *string -} - -func (p ProcessModuleInfoOperationPredicate) Matches(input ProcessModuleInfo) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type ProcessThreadInfoOperationPredicate struct { - Id *string - Kind *string - Name *string - Type *string -} - -func (p ProcessThreadInfoOperationPredicate) Matches(input ProcessThreadInfo) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type PublicCertificateOperationPredicate struct { - Id *string - Kind *string - Name *string - Type *string -} - -func (p PublicCertificateOperationPredicate) Matches(input PublicCertificate) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type RemotePrivateEndpointConnectionARMResourceOperationPredicate struct { - Id *string - Kind *string - Name *string - Type *string -} - -func (p RemotePrivateEndpointConnectionARMResourceOperationPredicate) Matches(input RemotePrivateEndpointConnectionARMResource) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type SiteOperationPredicate struct { - Id *string - Kind *string - Location *string - Name *string - Type *string -} - -func (p SiteOperationPredicate) Matches(input Site) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type SiteConfigResourceOperationPredicate struct { - Id *string - Kind *string - Name *string - Type *string -} - -func (p SiteConfigResourceOperationPredicate) Matches(input SiteConfigResource) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type SiteConfigurationSnapshotInfoOperationPredicate struct { - Id *string - Kind *string - Name *string - Type *string -} - -func (p SiteConfigurationSnapshotInfoOperationPredicate) Matches(input SiteConfigurationSnapshotInfo) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type SiteExtensionInfoOperationPredicate struct { - Id *string - Kind *string - Name *string - Type *string -} - -func (p SiteExtensionInfoOperationPredicate) Matches(input SiteExtensionInfo) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type SlotDifferenceOperationPredicate struct { - Id *string - Kind *string - Name *string - Type *string -} - -func (p SlotDifferenceOperationPredicate) Matches(input SlotDifference) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type SnapshotOperationPredicate struct { - Id *string - Kind *string - Name *string - Type *string -} - -func (p SnapshotOperationPredicate) Matches(input Snapshot) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type TriggeredJobHistoryOperationPredicate struct { - Id *string - Kind *string - Name *string - Type *string -} - -func (p TriggeredJobHistoryOperationPredicate) Matches(input TriggeredJobHistory) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type TriggeredWebJobOperationPredicate struct { - Id *string - Kind *string - Name *string - Type *string -} - -func (p TriggeredWebJobOperationPredicate) Matches(input TriggeredWebJob) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type WebJobOperationPredicate struct { - Id *string - Kind *string - Name *string - Type *string -} - -func (p WebJobOperationPredicate) Matches(input WebJob) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type WebSiteInstanceStatusOperationPredicate struct { - Id *string - Kind *string - Name *string - Type *string -} - -func (p WebSiteInstanceStatusOperationPredicate) Matches(input WebSiteInstanceStatus) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type WorkflowEnvelopeOperationPredicate struct { - Id *string - Kind *string - Location *string - Name *string - Type *string -} - -func (p WorkflowEnvelopeOperationPredicate) Matches(input WorkflowEnvelope) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/version.go deleted file mode 100644 index 71c919c2360f3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapps - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2023-01-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webapps/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/README.md new file mode 100644 index 0000000000000..1ca5f17dbf3c8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/README.md @@ -0,0 +1,480 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans` Documentation + +The `appserviceplans` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans" +``` + + +### Client Initialization + +```go +client := appserviceplans.NewAppServicePlansClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `AppServicePlansClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewAppServicePlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue") + +payload := appserviceplans.AppServicePlan{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `AppServicePlansClient.CreateOrUpdateVnetRoute` + +```go +ctx := context.TODO() +id := appserviceplans.NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "virtualNetworkConnectionValue", "routeValue") + +payload := appserviceplans.VnetRoute{ + // ... +} + + +read, err := client.CreateOrUpdateVnetRoute(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AppServicePlansClient.Delete` + +```go +ctx := context.TODO() +id := commonids.NewAppServicePlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue") + +read, err := client.Delete(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AppServicePlansClient.DeleteHybridConnection` + +```go +ctx := context.TODO() +id := appserviceplans.NewHybridConnectionNamespaceRelayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "hybridConnectionNamespaceValue", "relayValue") + +read, err := client.DeleteHybridConnection(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AppServicePlansClient.DeleteVnetRoute` + +```go +ctx := context.TODO() +id := appserviceplans.NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "virtualNetworkConnectionValue", "routeValue") + +read, err := client.DeleteVnetRoute(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AppServicePlansClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewAppServicePlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AppServicePlansClient.GetHybridConnection` + +```go +ctx := context.TODO() +id := appserviceplans.NewHybridConnectionNamespaceRelayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "hybridConnectionNamespaceValue", "relayValue") + +read, err := client.GetHybridConnection(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AppServicePlansClient.GetHybridConnectionPlanLimit` + +```go +ctx := context.TODO() +id := commonids.NewAppServicePlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue") + +read, err := client.GetHybridConnectionPlanLimit(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AppServicePlansClient.GetRouteForVnet` + +```go +ctx := context.TODO() +id := appserviceplans.NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "virtualNetworkConnectionValue", "routeValue") + +read, err := client.GetRouteForVnet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AppServicePlansClient.GetServerFarmSkus` + +```go +ctx := context.TODO() +id := commonids.NewAppServicePlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue") + +read, err := client.GetServerFarmSkus(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AppServicePlansClient.GetVnetFromServerFarm` + +```go +ctx := context.TODO() +id := appserviceplans.NewServerFarmVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "virtualNetworkConnectionValue") + +read, err := client.GetVnetFromServerFarm(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AppServicePlansClient.GetVnetGateway` + +```go +ctx := context.TODO() +id := appserviceplans.NewVirtualNetworkConnectionGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "virtualNetworkConnectionValue", "gatewayValue") + +read, err := client.GetVnetGateway(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AppServicePlansClient.List` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.List(ctx, id, appserviceplans.DefaultListOperationOptions())` can be used to do batched pagination +items, err := client.ListComplete(ctx, id, appserviceplans.DefaultListOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `AppServicePlansClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `AppServicePlansClient.ListCapabilities` + +```go +ctx := context.TODO() +id := commonids.NewAppServicePlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue") + +read, err := client.ListCapabilities(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AppServicePlansClient.ListHybridConnectionKeys` + +```go +ctx := context.TODO() +id := appserviceplans.NewHybridConnectionNamespaceRelayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "hybridConnectionNamespaceValue", "relayValue") + +read, err := client.ListHybridConnectionKeys(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AppServicePlansClient.ListHybridConnections` + +```go +ctx := context.TODO() +id := commonids.NewAppServicePlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue") + +// alternatively `client.ListHybridConnections(ctx, id)` can be used to do batched pagination +items, err := client.ListHybridConnectionsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `AppServicePlansClient.ListRoutesForVnet` + +```go +ctx := context.TODO() +id := appserviceplans.NewServerFarmVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "virtualNetworkConnectionValue") + +read, err := client.ListRoutesForVnet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AppServicePlansClient.ListUsages` + +```go +ctx := context.TODO() +id := commonids.NewAppServicePlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue") + +// alternatively `client.ListUsages(ctx, id, appserviceplans.DefaultListUsagesOperationOptions())` can be used to do batched pagination +items, err := client.ListUsagesComplete(ctx, id, appserviceplans.DefaultListUsagesOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `AppServicePlansClient.ListVnets` + +```go +ctx := context.TODO() +id := commonids.NewAppServicePlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue") + +read, err := client.ListVnets(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AppServicePlansClient.ListWebApps` + +```go +ctx := context.TODO() +id := commonids.NewAppServicePlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue") + +// alternatively `client.ListWebApps(ctx, id, appserviceplans.DefaultListWebAppsOperationOptions())` can be used to do batched pagination +items, err := client.ListWebAppsComplete(ctx, id, appserviceplans.DefaultListWebAppsOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `AppServicePlansClient.ListWebAppsByHybridConnection` + +```go +ctx := context.TODO() +id := appserviceplans.NewHybridConnectionNamespaceRelayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "hybridConnectionNamespaceValue", "relayValue") + +// alternatively `client.ListWebAppsByHybridConnection(ctx, id)` can be used to do batched pagination +items, err := client.ListWebAppsByHybridConnectionComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `AppServicePlansClient.RebootWorker` + +```go +ctx := context.TODO() +id := appserviceplans.NewWorkerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "workerValue") + +read, err := client.RebootWorker(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AppServicePlansClient.RestartWebApps` + +```go +ctx := context.TODO() +id := commonids.NewAppServicePlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue") + +read, err := client.RestartWebApps(ctx, id, appserviceplans.DefaultRestartWebAppsOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AppServicePlansClient.Update` + +```go +ctx := context.TODO() +id := commonids.NewAppServicePlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue") + +payload := appserviceplans.AppServicePlanPatchResource{ + // ... +} + + +read, err := client.Update(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AppServicePlansClient.UpdateVnetGateway` + +```go +ctx := context.TODO() +id := appserviceplans.NewVirtualNetworkConnectionGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "virtualNetworkConnectionValue", "gatewayValue") + +payload := appserviceplans.VnetGateway{ + // ... +} + + +read, err := client.UpdateVnetGateway(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AppServicePlansClient.UpdateVnetRoute` + +```go +ctx := context.TODO() +id := appserviceplans.NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverFarmValue", "virtualNetworkConnectionValue", "routeValue") + +payload := appserviceplans.VnetRoute{ + // ... +} + + +read, err := client.UpdateVnetRoute(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/constants.go new file mode 100644 index 0000000000000..8891e114ff183 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/constants.go @@ -0,0 +1,1271 @@ +package appserviceplans + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AuthenticationType string + +const ( + AuthenticationTypeStorageAccountConnectionString AuthenticationType = "StorageAccountConnectionString" + AuthenticationTypeSystemAssignedIdentity AuthenticationType = "SystemAssignedIdentity" + AuthenticationTypeUserAssignedIdentity AuthenticationType = "UserAssignedIdentity" +) + +func PossibleValuesForAuthenticationType() []string { + return []string{ + string(AuthenticationTypeStorageAccountConnectionString), + string(AuthenticationTypeSystemAssignedIdentity), + string(AuthenticationTypeUserAssignedIdentity), + } +} + +func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAuthenticationType(input string) (*AuthenticationType, error) { + vals := map[string]AuthenticationType{ + "storageaccountconnectionstring": AuthenticationTypeStorageAccountConnectionString, + "systemassignedidentity": AuthenticationTypeSystemAssignedIdentity, + "userassignedidentity": AuthenticationTypeUserAssignedIdentity, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AuthenticationType(input) + return &out, nil +} + +type AutoHealActionType string + +const ( + AutoHealActionTypeCustomAction AutoHealActionType = "CustomAction" + AutoHealActionTypeLogEvent AutoHealActionType = "LogEvent" + AutoHealActionTypeRecycle AutoHealActionType = "Recycle" +) + +func PossibleValuesForAutoHealActionType() []string { + return []string{ + string(AutoHealActionTypeCustomAction), + string(AutoHealActionTypeLogEvent), + string(AutoHealActionTypeRecycle), + } +} + +func (s *AutoHealActionType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAutoHealActionType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAutoHealActionType(input string) (*AutoHealActionType, error) { + vals := map[string]AutoHealActionType{ + "customaction": AutoHealActionTypeCustomAction, + "logevent": AutoHealActionTypeLogEvent, + "recycle": AutoHealActionTypeRecycle, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AutoHealActionType(input) + return &out, nil +} + +type AzureStorageProtocol string + +const ( + AzureStorageProtocolHTTP AzureStorageProtocol = "Http" + AzureStorageProtocolNfs AzureStorageProtocol = "Nfs" + AzureStorageProtocolSmb AzureStorageProtocol = "Smb" +) + +func PossibleValuesForAzureStorageProtocol() []string { + return []string{ + string(AzureStorageProtocolHTTP), + string(AzureStorageProtocolNfs), + string(AzureStorageProtocolSmb), + } +} + +func (s *AzureStorageProtocol) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAzureStorageProtocol(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAzureStorageProtocol(input string) (*AzureStorageProtocol, error) { + vals := map[string]AzureStorageProtocol{ + "http": AzureStorageProtocolHTTP, + "nfs": AzureStorageProtocolNfs, + "smb": AzureStorageProtocolSmb, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AzureStorageProtocol(input) + return &out, nil +} + +type AzureStorageState string + +const ( + AzureStorageStateInvalidCredentials AzureStorageState = "InvalidCredentials" + AzureStorageStateInvalidShare AzureStorageState = "InvalidShare" + AzureStorageStateNotValidated AzureStorageState = "NotValidated" + AzureStorageStateOk AzureStorageState = "Ok" +) + +func PossibleValuesForAzureStorageState() []string { + return []string{ + string(AzureStorageStateInvalidCredentials), + string(AzureStorageStateInvalidShare), + string(AzureStorageStateNotValidated), + string(AzureStorageStateOk), + } +} + +func (s *AzureStorageState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAzureStorageState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAzureStorageState(input string) (*AzureStorageState, error) { + vals := map[string]AzureStorageState{ + "invalidcredentials": AzureStorageStateInvalidCredentials, + "invalidshare": AzureStorageStateInvalidShare, + "notvalidated": AzureStorageStateNotValidated, + "ok": AzureStorageStateOk, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AzureStorageState(input) + return &out, nil +} + +type AzureStorageType string + +const ( + AzureStorageTypeAzureBlob AzureStorageType = "AzureBlob" + AzureStorageTypeAzureFiles AzureStorageType = "AzureFiles" +) + +func PossibleValuesForAzureStorageType() []string { + return []string{ + string(AzureStorageTypeAzureBlob), + string(AzureStorageTypeAzureFiles), + } +} + +func (s *AzureStorageType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAzureStorageType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAzureStorageType(input string) (*AzureStorageType, error) { + vals := map[string]AzureStorageType{ + "azureblob": AzureStorageTypeAzureBlob, + "azurefiles": AzureStorageTypeAzureFiles, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AzureStorageType(input) + return &out, nil +} + +type ClientCertMode string + +const ( + ClientCertModeOptional ClientCertMode = "Optional" + ClientCertModeOptionalInteractiveUser ClientCertMode = "OptionalInteractiveUser" + ClientCertModeRequired ClientCertMode = "Required" +) + +func PossibleValuesForClientCertMode() []string { + return []string{ + string(ClientCertModeOptional), + string(ClientCertModeOptionalInteractiveUser), + string(ClientCertModeRequired), + } +} + +func (s *ClientCertMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseClientCertMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseClientCertMode(input string) (*ClientCertMode, error) { + vals := map[string]ClientCertMode{ + "optional": ClientCertModeOptional, + "optionalinteractiveuser": ClientCertModeOptionalInteractiveUser, + "required": ClientCertModeRequired, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ClientCertMode(input) + return &out, nil +} + +type ConnectionStringType string + +const ( + ConnectionStringTypeApiHub ConnectionStringType = "ApiHub" + ConnectionStringTypeCustom ConnectionStringType = "Custom" + ConnectionStringTypeDocDb ConnectionStringType = "DocDb" + ConnectionStringTypeEventHub ConnectionStringType = "EventHub" + ConnectionStringTypeMySql ConnectionStringType = "MySql" + ConnectionStringTypeNotificationHub ConnectionStringType = "NotificationHub" + ConnectionStringTypePostgreSQL ConnectionStringType = "PostgreSQL" + ConnectionStringTypeRedisCache ConnectionStringType = "RedisCache" + ConnectionStringTypeSQLAzure ConnectionStringType = "SQLAzure" + ConnectionStringTypeSQLServer ConnectionStringType = "SQLServer" + ConnectionStringTypeServiceBus ConnectionStringType = "ServiceBus" +) + +func PossibleValuesForConnectionStringType() []string { + return []string{ + string(ConnectionStringTypeApiHub), + string(ConnectionStringTypeCustom), + string(ConnectionStringTypeDocDb), + string(ConnectionStringTypeEventHub), + string(ConnectionStringTypeMySql), + string(ConnectionStringTypeNotificationHub), + string(ConnectionStringTypePostgreSQL), + string(ConnectionStringTypeRedisCache), + string(ConnectionStringTypeSQLAzure), + string(ConnectionStringTypeSQLServer), + string(ConnectionStringTypeServiceBus), + } +} + +func (s *ConnectionStringType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseConnectionStringType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseConnectionStringType(input string) (*ConnectionStringType, error) { + vals := map[string]ConnectionStringType{ + "apihub": ConnectionStringTypeApiHub, + "custom": ConnectionStringTypeCustom, + "docdb": ConnectionStringTypeDocDb, + "eventhub": ConnectionStringTypeEventHub, + "mysql": ConnectionStringTypeMySql, + "notificationhub": ConnectionStringTypeNotificationHub, + "postgresql": ConnectionStringTypePostgreSQL, + "rediscache": ConnectionStringTypeRedisCache, + "sqlazure": ConnectionStringTypeSQLAzure, + "sqlserver": ConnectionStringTypeSQLServer, + "servicebus": ConnectionStringTypeServiceBus, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ConnectionStringType(input) + return &out, nil +} + +type DaprLogLevel string + +const ( + DaprLogLevelDebug DaprLogLevel = "debug" + DaprLogLevelError DaprLogLevel = "error" + DaprLogLevelInfo DaprLogLevel = "info" + DaprLogLevelWarn DaprLogLevel = "warn" +) + +func PossibleValuesForDaprLogLevel() []string { + return []string{ + string(DaprLogLevelDebug), + string(DaprLogLevelError), + string(DaprLogLevelInfo), + string(DaprLogLevelWarn), + } +} + +func (s *DaprLogLevel) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDaprLogLevel(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDaprLogLevel(input string) (*DaprLogLevel, error) { + vals := map[string]DaprLogLevel{ + "debug": DaprLogLevelDebug, + "error": DaprLogLevelError, + "info": DaprLogLevelInfo, + "warn": DaprLogLevelWarn, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DaprLogLevel(input) + return &out, nil +} + +type DefaultAction string + +const ( + DefaultActionAllow DefaultAction = "Allow" + DefaultActionDeny DefaultAction = "Deny" +) + +func PossibleValuesForDefaultAction() []string { + return []string{ + string(DefaultActionAllow), + string(DefaultActionDeny), + } +} + +func (s *DefaultAction) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDefaultAction(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDefaultAction(input string) (*DefaultAction, error) { + vals := map[string]DefaultAction{ + "allow": DefaultActionAllow, + "deny": DefaultActionDeny, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DefaultAction(input) + return &out, nil +} + +type FtpsState string + +const ( + FtpsStateAllAllowed FtpsState = "AllAllowed" + FtpsStateDisabled FtpsState = "Disabled" + FtpsStateFtpsOnly FtpsState = "FtpsOnly" +) + +func PossibleValuesForFtpsState() []string { + return []string{ + string(FtpsStateAllAllowed), + string(FtpsStateDisabled), + string(FtpsStateFtpsOnly), + } +} + +func (s *FtpsState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseFtpsState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseFtpsState(input string) (*FtpsState, error) { + vals := map[string]FtpsState{ + "allallowed": FtpsStateAllAllowed, + "disabled": FtpsStateDisabled, + "ftpsonly": FtpsStateFtpsOnly, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := FtpsState(input) + return &out, nil +} + +type FunctionsDeploymentStorageType string + +const ( + FunctionsDeploymentStorageTypeBlobContainer FunctionsDeploymentStorageType = "blobContainer" +) + +func PossibleValuesForFunctionsDeploymentStorageType() []string { + return []string{ + string(FunctionsDeploymentStorageTypeBlobContainer), + } +} + +func (s *FunctionsDeploymentStorageType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseFunctionsDeploymentStorageType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseFunctionsDeploymentStorageType(input string) (*FunctionsDeploymentStorageType, error) { + vals := map[string]FunctionsDeploymentStorageType{ + "blobcontainer": FunctionsDeploymentStorageTypeBlobContainer, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := FunctionsDeploymentStorageType(input) + return &out, nil +} + +type HostType string + +const ( + HostTypeRepository HostType = "Repository" + HostTypeStandard HostType = "Standard" +) + +func PossibleValuesForHostType() []string { + return []string{ + string(HostTypeRepository), + string(HostTypeStandard), + } +} + +func (s *HostType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHostType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHostType(input string) (*HostType, error) { + vals := map[string]HostType{ + "repository": HostTypeRepository, + "standard": HostTypeStandard, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HostType(input) + return &out, nil +} + +type IPFilterTag string + +const ( + IPFilterTagDefault IPFilterTag = "Default" + IPFilterTagServiceTag IPFilterTag = "ServiceTag" + IPFilterTagXffProxy IPFilterTag = "XffProxy" +) + +func PossibleValuesForIPFilterTag() []string { + return []string{ + string(IPFilterTagDefault), + string(IPFilterTagServiceTag), + string(IPFilterTagXffProxy), + } +} + +func (s *IPFilterTag) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIPFilterTag(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIPFilterTag(input string) (*IPFilterTag, error) { + vals := map[string]IPFilterTag{ + "default": IPFilterTagDefault, + "servicetag": IPFilterTagServiceTag, + "xffproxy": IPFilterTagXffProxy, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IPFilterTag(input) + return &out, nil +} + +type ManagedPipelineMode string + +const ( + ManagedPipelineModeClassic ManagedPipelineMode = "Classic" + ManagedPipelineModeIntegrated ManagedPipelineMode = "Integrated" +) + +func PossibleValuesForManagedPipelineMode() []string { + return []string{ + string(ManagedPipelineModeClassic), + string(ManagedPipelineModeIntegrated), + } +} + +func (s *ManagedPipelineMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseManagedPipelineMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseManagedPipelineMode(input string) (*ManagedPipelineMode, error) { + vals := map[string]ManagedPipelineMode{ + "classic": ManagedPipelineModeClassic, + "integrated": ManagedPipelineModeIntegrated, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ManagedPipelineMode(input) + return &out, nil +} + +type ProvisioningState string + +const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateInProgress ProvisioningState = "InProgress" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateCanceled), + string(ProvisioningStateDeleting), + string(ProvisioningStateFailed), + string(ProvisioningStateInProgress), + string(ProvisioningStateSucceeded), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "canceled": ProvisioningStateCanceled, + "deleting": ProvisioningStateDeleting, + "failed": ProvisioningStateFailed, + "inprogress": ProvisioningStateInProgress, + "succeeded": ProvisioningStateSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} + +type RedundancyMode string + +const ( + RedundancyModeActiveActive RedundancyMode = "ActiveActive" + RedundancyModeFailover RedundancyMode = "Failover" + RedundancyModeGeoRedundant RedundancyMode = "GeoRedundant" + RedundancyModeManual RedundancyMode = "Manual" + RedundancyModeNone RedundancyMode = "None" +) + +func PossibleValuesForRedundancyMode() []string { + return []string{ + string(RedundancyModeActiveActive), + string(RedundancyModeFailover), + string(RedundancyModeGeoRedundant), + string(RedundancyModeManual), + string(RedundancyModeNone), + } +} + +func (s *RedundancyMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRedundancyMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRedundancyMode(input string) (*RedundancyMode, error) { + vals := map[string]RedundancyMode{ + "activeactive": RedundancyModeActiveActive, + "failover": RedundancyModeFailover, + "georedundant": RedundancyModeGeoRedundant, + "manual": RedundancyModeManual, + "none": RedundancyModeNone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RedundancyMode(input) + return &out, nil +} + +type RouteType string + +const ( + RouteTypeDefault RouteType = "DEFAULT" + RouteTypeINHERITED RouteType = "INHERITED" + RouteTypeSTATIC RouteType = "STATIC" +) + +func PossibleValuesForRouteType() []string { + return []string{ + string(RouteTypeDefault), + string(RouteTypeINHERITED), + string(RouteTypeSTATIC), + } +} + +func (s *RouteType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRouteType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRouteType(input string) (*RouteType, error) { + vals := map[string]RouteType{ + "default": RouteTypeDefault, + "inherited": RouteTypeINHERITED, + "static": RouteTypeSTATIC, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RouteType(input) + return &out, nil +} + +type RuntimeName string + +const ( + RuntimeNameCustom RuntimeName = "custom" + RuntimeNameDotnetNegativeisolated RuntimeName = "dotnet-isolated" + RuntimeNameJava RuntimeName = "java" + RuntimeNameNode RuntimeName = "node" + RuntimeNamePowershell RuntimeName = "powershell" + RuntimeNamePython RuntimeName = "python" +) + +func PossibleValuesForRuntimeName() []string { + return []string{ + string(RuntimeNameCustom), + string(RuntimeNameDotnetNegativeisolated), + string(RuntimeNameJava), + string(RuntimeNameNode), + string(RuntimeNamePowershell), + string(RuntimeNamePython), + } +} + +func (s *RuntimeName) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRuntimeName(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRuntimeName(input string) (*RuntimeName, error) { + vals := map[string]RuntimeName{ + "custom": RuntimeNameCustom, + "dotnet-isolated": RuntimeNameDotnetNegativeisolated, + "java": RuntimeNameJava, + "node": RuntimeNameNode, + "powershell": RuntimeNamePowershell, + "python": RuntimeNamePython, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RuntimeName(input) + return &out, nil +} + +type ScmType string + +const ( + ScmTypeBitbucketGit ScmType = "BitbucketGit" + ScmTypeBitbucketHg ScmType = "BitbucketHg" + ScmTypeCodePlexGit ScmType = "CodePlexGit" + ScmTypeCodePlexHg ScmType = "CodePlexHg" + ScmTypeDropbox ScmType = "Dropbox" + ScmTypeExternalGit ScmType = "ExternalGit" + ScmTypeExternalHg ScmType = "ExternalHg" + ScmTypeGitHub ScmType = "GitHub" + ScmTypeLocalGit ScmType = "LocalGit" + ScmTypeNone ScmType = "None" + ScmTypeOneDrive ScmType = "OneDrive" + ScmTypeTfs ScmType = "Tfs" + ScmTypeVSO ScmType = "VSO" + ScmTypeVSTSRM ScmType = "VSTSRM" +) + +func PossibleValuesForScmType() []string { + return []string{ + string(ScmTypeBitbucketGit), + string(ScmTypeBitbucketHg), + string(ScmTypeCodePlexGit), + string(ScmTypeCodePlexHg), + string(ScmTypeDropbox), + string(ScmTypeExternalGit), + string(ScmTypeExternalHg), + string(ScmTypeGitHub), + string(ScmTypeLocalGit), + string(ScmTypeNone), + string(ScmTypeOneDrive), + string(ScmTypeTfs), + string(ScmTypeVSO), + string(ScmTypeVSTSRM), + } +} + +func (s *ScmType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseScmType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseScmType(input string) (*ScmType, error) { + vals := map[string]ScmType{ + "bitbucketgit": ScmTypeBitbucketGit, + "bitbuckethg": ScmTypeBitbucketHg, + "codeplexgit": ScmTypeCodePlexGit, + "codeplexhg": ScmTypeCodePlexHg, + "dropbox": ScmTypeDropbox, + "externalgit": ScmTypeExternalGit, + "externalhg": ScmTypeExternalHg, + "github": ScmTypeGitHub, + "localgit": ScmTypeLocalGit, + "none": ScmTypeNone, + "onedrive": ScmTypeOneDrive, + "tfs": ScmTypeTfs, + "vso": ScmTypeVSO, + "vstsrm": ScmTypeVSTSRM, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ScmType(input) + return &out, nil +} + +type SiteAvailabilityState string + +const ( + SiteAvailabilityStateDisasterRecoveryMode SiteAvailabilityState = "DisasterRecoveryMode" + SiteAvailabilityStateLimited SiteAvailabilityState = "Limited" + SiteAvailabilityStateNormal SiteAvailabilityState = "Normal" +) + +func PossibleValuesForSiteAvailabilityState() []string { + return []string{ + string(SiteAvailabilityStateDisasterRecoveryMode), + string(SiteAvailabilityStateLimited), + string(SiteAvailabilityStateNormal), + } +} + +func (s *SiteAvailabilityState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSiteAvailabilityState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSiteAvailabilityState(input string) (*SiteAvailabilityState, error) { + vals := map[string]SiteAvailabilityState{ + "disasterrecoverymode": SiteAvailabilityStateDisasterRecoveryMode, + "limited": SiteAvailabilityStateLimited, + "normal": SiteAvailabilityStateNormal, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SiteAvailabilityState(input) + return &out, nil +} + +type SiteLoadBalancing string + +const ( + SiteLoadBalancingLeastRequests SiteLoadBalancing = "LeastRequests" + SiteLoadBalancingLeastResponseTime SiteLoadBalancing = "LeastResponseTime" + SiteLoadBalancingPerSiteRoundRobin SiteLoadBalancing = "PerSiteRoundRobin" + SiteLoadBalancingRequestHash SiteLoadBalancing = "RequestHash" + SiteLoadBalancingWeightedRoundRobin SiteLoadBalancing = "WeightedRoundRobin" + SiteLoadBalancingWeightedTotalTraffic SiteLoadBalancing = "WeightedTotalTraffic" +) + +func PossibleValuesForSiteLoadBalancing() []string { + return []string{ + string(SiteLoadBalancingLeastRequests), + string(SiteLoadBalancingLeastResponseTime), + string(SiteLoadBalancingPerSiteRoundRobin), + string(SiteLoadBalancingRequestHash), + string(SiteLoadBalancingWeightedRoundRobin), + string(SiteLoadBalancingWeightedTotalTraffic), + } +} + +func (s *SiteLoadBalancing) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSiteLoadBalancing(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSiteLoadBalancing(input string) (*SiteLoadBalancing, error) { + vals := map[string]SiteLoadBalancing{ + "leastrequests": SiteLoadBalancingLeastRequests, + "leastresponsetime": SiteLoadBalancingLeastResponseTime, + "persiteroundrobin": SiteLoadBalancingPerSiteRoundRobin, + "requesthash": SiteLoadBalancingRequestHash, + "weightedroundrobin": SiteLoadBalancingWeightedRoundRobin, + "weightedtotaltraffic": SiteLoadBalancingWeightedTotalTraffic, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SiteLoadBalancing(input) + return &out, nil +} + +type SslState string + +const ( + SslStateDisabled SslState = "Disabled" + SslStateIPBasedEnabled SslState = "IpBasedEnabled" + SslStateSniEnabled SslState = "SniEnabled" +) + +func PossibleValuesForSslState() []string { + return []string{ + string(SslStateDisabled), + string(SslStateIPBasedEnabled), + string(SslStateSniEnabled), + } +} + +func (s *SslState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSslState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSslState(input string) (*SslState, error) { + vals := map[string]SslState{ + "disabled": SslStateDisabled, + "ipbasedenabled": SslStateIPBasedEnabled, + "snienabled": SslStateSniEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SslState(input) + return &out, nil +} + +type StatusOptions string + +const ( + StatusOptionsCreating StatusOptions = "Creating" + StatusOptionsPending StatusOptions = "Pending" + StatusOptionsReady StatusOptions = "Ready" +) + +func PossibleValuesForStatusOptions() []string { + return []string{ + string(StatusOptionsCreating), + string(StatusOptionsPending), + string(StatusOptionsReady), + } +} + +func (s *StatusOptions) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseStatusOptions(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseStatusOptions(input string) (*StatusOptions, error) { + vals := map[string]StatusOptions{ + "creating": StatusOptionsCreating, + "pending": StatusOptionsPending, + "ready": StatusOptionsReady, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := StatusOptions(input) + return &out, nil +} + +type SupportedTlsVersions string + +const ( + SupportedTlsVersionsOnePointOne SupportedTlsVersions = "1.1" + SupportedTlsVersionsOnePointThree SupportedTlsVersions = "1.3" + SupportedTlsVersionsOnePointTwo SupportedTlsVersions = "1.2" + SupportedTlsVersionsOnePointZero SupportedTlsVersions = "1.0" +) + +func PossibleValuesForSupportedTlsVersions() []string { + return []string{ + string(SupportedTlsVersionsOnePointOne), + string(SupportedTlsVersionsOnePointThree), + string(SupportedTlsVersionsOnePointTwo), + string(SupportedTlsVersionsOnePointZero), + } +} + +func (s *SupportedTlsVersions) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSupportedTlsVersions(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSupportedTlsVersions(input string) (*SupportedTlsVersions, error) { + vals := map[string]SupportedTlsVersions{ + "1.1": SupportedTlsVersionsOnePointOne, + "1.3": SupportedTlsVersionsOnePointThree, + "1.2": SupportedTlsVersionsOnePointTwo, + "1.0": SupportedTlsVersionsOnePointZero, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SupportedTlsVersions(input) + return &out, nil +} + +type TlsCipherSuites string + +const ( + TlsCipherSuitesTLSAESOneTwoEightGCMSHATwoFiveSix TlsCipherSuites = "TLS_AES_128_GCM_SHA256" + TlsCipherSuitesTLSAESTwoFiveSixGCMSHAThreeEightFour TlsCipherSuites = "TLS_AES_256_GCM_SHA384" + TlsCipherSuitesTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix TlsCipherSuites = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" + TlsCipherSuitesTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix TlsCipherSuites = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" + TlsCipherSuitesTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour TlsCipherSuites = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" + TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightCBCSHA TlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" + TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix TlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" + TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix TlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" + TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixCBCSHA TlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" + TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour TlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" + TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour TlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" + TlsCipherSuitesTLSRSAWITHAESOneTwoEightCBCSHA TlsCipherSuites = "TLS_RSA_WITH_AES_128_CBC_SHA" + TlsCipherSuitesTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix TlsCipherSuites = "TLS_RSA_WITH_AES_128_CBC_SHA256" + TlsCipherSuitesTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix TlsCipherSuites = "TLS_RSA_WITH_AES_128_GCM_SHA256" + TlsCipherSuitesTLSRSAWITHAESTwoFiveSixCBCSHA TlsCipherSuites = "TLS_RSA_WITH_AES_256_CBC_SHA" + TlsCipherSuitesTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix TlsCipherSuites = "TLS_RSA_WITH_AES_256_CBC_SHA256" + TlsCipherSuitesTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour TlsCipherSuites = "TLS_RSA_WITH_AES_256_GCM_SHA384" +) + +func PossibleValuesForTlsCipherSuites() []string { + return []string{ + string(TlsCipherSuitesTLSAESOneTwoEightGCMSHATwoFiveSix), + string(TlsCipherSuitesTLSAESTwoFiveSixGCMSHAThreeEightFour), + string(TlsCipherSuitesTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix), + string(TlsCipherSuitesTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix), + string(TlsCipherSuitesTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour), + string(TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightCBCSHA), + string(TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix), + string(TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix), + string(TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixCBCSHA), + string(TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour), + string(TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour), + string(TlsCipherSuitesTLSRSAWITHAESOneTwoEightCBCSHA), + string(TlsCipherSuitesTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix), + string(TlsCipherSuitesTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix), + string(TlsCipherSuitesTLSRSAWITHAESTwoFiveSixCBCSHA), + string(TlsCipherSuitesTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix), + string(TlsCipherSuitesTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour), + } +} + +func (s *TlsCipherSuites) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseTlsCipherSuites(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseTlsCipherSuites(input string) (*TlsCipherSuites, error) { + vals := map[string]TlsCipherSuites{ + "tls_aes_128_gcm_sha256": TlsCipherSuitesTLSAESOneTwoEightGCMSHATwoFiveSix, + "tls_aes_256_gcm_sha384": TlsCipherSuitesTLSAESTwoFiveSixGCMSHAThreeEightFour, + "tls_ecdhe_ecdsa_with_aes_128_cbc_sha256": TlsCipherSuitesTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix, + "tls_ecdhe_ecdsa_with_aes_128_gcm_sha256": TlsCipherSuitesTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix, + "tls_ecdhe_ecdsa_with_aes_256_gcm_sha384": TlsCipherSuitesTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour, + "tls_ecdhe_rsa_with_aes_128_cbc_sha": TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightCBCSHA, + "tls_ecdhe_rsa_with_aes_128_cbc_sha256": TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix, + "tls_ecdhe_rsa_with_aes_128_gcm_sha256": TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix, + "tls_ecdhe_rsa_with_aes_256_cbc_sha": TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixCBCSHA, + "tls_ecdhe_rsa_with_aes_256_cbc_sha384": TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour, + "tls_ecdhe_rsa_with_aes_256_gcm_sha384": TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour, + "tls_rsa_with_aes_128_cbc_sha": TlsCipherSuitesTLSRSAWITHAESOneTwoEightCBCSHA, + "tls_rsa_with_aes_128_cbc_sha256": TlsCipherSuitesTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix, + "tls_rsa_with_aes_128_gcm_sha256": TlsCipherSuitesTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix, + "tls_rsa_with_aes_256_cbc_sha": TlsCipherSuitesTLSRSAWITHAESTwoFiveSixCBCSHA, + "tls_rsa_with_aes_256_cbc_sha256": TlsCipherSuitesTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix, + "tls_rsa_with_aes_256_gcm_sha384": TlsCipherSuitesTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := TlsCipherSuites(input) + return &out, nil +} + +type UsageState string + +const ( + UsageStateExceeded UsageState = "Exceeded" + UsageStateNormal UsageState = "Normal" +) + +func PossibleValuesForUsageState() []string { + return []string{ + string(UsageStateExceeded), + string(UsageStateNormal), + } +} + +func (s *UsageState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseUsageState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseUsageState(input string) (*UsageState, error) { + vals := map[string]UsageState{ + "exceeded": UsageStateExceeded, + "normal": UsageStateNormal, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := UsageState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/id_hybridconnectionnamespacerelay.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/id_hybridconnectionnamespacerelay.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/id_hybridconnectionnamespacerelay.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/id_hybridconnectionnamespacerelay.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/id_route.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/id_route.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/id_route.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/id_route.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/id_serverfarmvirtualnetworkconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/id_serverfarmvirtualnetworkconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/id_serverfarmvirtualnetworkconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/id_serverfarmvirtualnetworkconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/id_virtualnetworkconnectiongateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/id_virtualnetworkconnectiongateway.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/id_virtualnetworkconnectiongateway.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/id_virtualnetworkconnectiongateway.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/id_worker.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/id_worker.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/id_worker.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/id_worker.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_createorupdatevnetroute.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_createorupdatevnetroute.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_createorupdatevnetroute.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_createorupdatevnetroute.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_deletehybridconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_deletehybridconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_deletehybridconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_deletehybridconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_deletevnetroute.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_deletevnetroute.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_deletevnetroute.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_deletevnetroute.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_gethybridconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_gethybridconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_gethybridconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_gethybridconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_gethybridconnectionplanlimit.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_gethybridconnectionplanlimit.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_gethybridconnectionplanlimit.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_gethybridconnectionplanlimit.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_getrouteforvnet.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_getrouteforvnet.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_getrouteforvnet.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_getrouteforvnet.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_getserverfarmskus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_getserverfarmskus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_getserverfarmskus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_getserverfarmskus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_getvnetfromserverfarm.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_getvnetfromserverfarm.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_getvnetfromserverfarm.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_getvnetfromserverfarm.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_getvnetgateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_getvnetgateway.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_getvnetgateway.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_getvnetgateway.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_listbyresourcegroup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_listbyresourcegroup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_listbyresourcegroup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_listcapabilities.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_listcapabilities.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_listcapabilities.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_listcapabilities.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_listhybridconnectionkeys.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_listhybridconnectionkeys.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_listhybridconnectionkeys.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_listhybridconnectionkeys.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_listhybridconnections.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_listhybridconnections.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_listhybridconnections.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_listhybridconnections.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_listroutesforvnet.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_listroutesforvnet.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_listroutesforvnet.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_listroutesforvnet.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_listusages.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_listusages.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_listusages.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_listusages.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_listvnets.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_listvnets.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_listvnets.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_listvnets.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_listwebapps.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_listwebapps.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_listwebapps.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_listwebapps.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_listwebappsbyhybridconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_listwebappsbyhybridconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_listwebappsbyhybridconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_listwebappsbyhybridconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_rebootworker.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_rebootworker.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_rebootworker.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_rebootworker.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_restartwebapps.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_restartwebapps.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_restartwebapps.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_restartwebapps.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_updatevnetgateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_updatevnetgateway.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_updatevnetgateway.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_updatevnetgateway.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_updatevnetroute.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_updatevnetroute.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/method_updatevnetroute.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/method_updatevnetroute.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_apidefinitioninfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_apidefinitioninfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_apidefinitioninfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_apidefinitioninfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_apimanagementconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_apimanagementconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_apimanagementconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_apimanagementconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_appserviceplan.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_appserviceplan.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_appserviceplan.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_appserviceplan.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_appserviceplanpatchresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_appserviceplanpatchresource.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_appserviceplanpatchresource.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_appserviceplanpatchresource.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_appserviceplanpatchresourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_appserviceplanpatchresourceproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_appserviceplanpatchresourceproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_appserviceplanpatchresourceproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_appserviceplanproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_appserviceplanproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_appserviceplanproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_appserviceplanproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_autohealactions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_autohealactions.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_autohealactions.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_autohealactions.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_autohealcustomaction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_autohealcustomaction.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_autohealcustomaction.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_autohealcustomaction.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_autohealrules.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_autohealrules.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_autohealrules.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_autohealrules.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_autohealtriggers.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_autohealtriggers.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_autohealtriggers.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_autohealtriggers.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_azurestorageinfovalue.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_azurestorageinfovalue.go new file mode 100644 index 0000000000000..0c62698b97bb8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_azurestorageinfovalue.go @@ -0,0 +1,14 @@ +package appserviceplans + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureStorageInfoValue struct { + AccessKey *string `json:"accessKey,omitempty"` + AccountName *string `json:"accountName,omitempty"` + MountPath *string `json:"mountPath,omitempty"` + Protocol *AzureStorageProtocol `json:"protocol,omitempty"` + ShareName *string `json:"shareName,omitempty"` + State *AzureStorageState `json:"state,omitempty"` + Type *AzureStorageType `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_capability.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_capability.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_capability.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_capability.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_cloninginfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_cloninginfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_cloninginfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_cloninginfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_connstringinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_connstringinfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_connstringinfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_connstringinfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_corssettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_corssettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_corssettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_corssettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_csmusagequota.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_csmusagequota.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_csmusagequota.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_csmusagequota.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_daprconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_daprconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_daprconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_daprconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_experiments.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_experiments.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_experiments.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_experiments.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_extendedlocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_extendedlocation.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_extendedlocation.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_extendedlocation.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionappconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionappconfig.go new file mode 100644 index 0000000000000..5eb3b49988871 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionappconfig.go @@ -0,0 +1,10 @@ +package appserviceplans + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FunctionAppConfig struct { + Deployment *FunctionsDeployment `json:"deployment,omitempty"` + Runtime *FunctionsRuntime `json:"runtime,omitempty"` + ScaleAndConcurrency *FunctionsScaleAndConcurrency `json:"scaleAndConcurrency,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionsalwaysreadyconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionsalwaysreadyconfig.go new file mode 100644 index 0000000000000..bfd0d3eab018d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionsalwaysreadyconfig.go @@ -0,0 +1,9 @@ +package appserviceplans + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FunctionsAlwaysReadyConfig struct { + InstanceCount *int64 `json:"instanceCount,omitempty"` + Name *string `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionsdeployment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionsdeployment.go new file mode 100644 index 0000000000000..41f4213a7c667 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionsdeployment.go @@ -0,0 +1,8 @@ +package appserviceplans + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FunctionsDeployment struct { + Storage *FunctionsDeploymentStorage `json:"storage,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionsdeploymentstorage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionsdeploymentstorage.go new file mode 100644 index 0000000000000..49254f5989c50 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionsdeploymentstorage.go @@ -0,0 +1,10 @@ +package appserviceplans + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FunctionsDeploymentStorage struct { + Authentication *FunctionsDeploymentStorageAuthentication `json:"authentication,omitempty"` + Type *FunctionsDeploymentStorageType `json:"type,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionsdeploymentstorageauthentication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionsdeploymentstorageauthentication.go new file mode 100644 index 0000000000000..e194eb9b172a2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionsdeploymentstorageauthentication.go @@ -0,0 +1,10 @@ +package appserviceplans + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FunctionsDeploymentStorageAuthentication struct { + StorageAccountConnectionStringName *string `json:"storageAccountConnectionStringName,omitempty"` + Type *AuthenticationType `json:"type,omitempty"` + UserAssignedIdentityResourceId *string `json:"userAssignedIdentityResourceId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionsruntime.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionsruntime.go new file mode 100644 index 0000000000000..d04994cdbd05f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionsruntime.go @@ -0,0 +1,9 @@ +package appserviceplans + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FunctionsRuntime struct { + Name *RuntimeName `json:"name,omitempty"` + Version *string `json:"version,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionsscaleandconcurrency.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionsscaleandconcurrency.go new file mode 100644 index 0000000000000..048b6d942a7ca --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionsscaleandconcurrency.go @@ -0,0 +1,11 @@ +package appserviceplans + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FunctionsScaleAndConcurrency struct { + AlwaysReady *[]FunctionsAlwaysReadyConfig `json:"alwaysReady,omitempty"` + InstanceMemoryMB *int64 `json:"instanceMemoryMB,omitempty"` + MaximumInstanceCount *int64 `json:"maximumInstanceCount,omitempty"` + Triggers *FunctionsScaleAndConcurrencyTriggers `json:"triggers,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionsscaleandconcurrencytriggers.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionsscaleandconcurrencytriggers.go new file mode 100644 index 0000000000000..9a87d6ba0f208 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionsscaleandconcurrencytriggers.go @@ -0,0 +1,8 @@ +package appserviceplans + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FunctionsScaleAndConcurrencyTriggers struct { + HTTP *FunctionsScaleAndConcurrencyTriggersHTTP `json:"http,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionsscaleandconcurrencytriggershttp.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionsscaleandconcurrencytriggershttp.go new file mode 100644 index 0000000000000..d547bd4d367b3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_functionsscaleandconcurrencytriggershttp.go @@ -0,0 +1,8 @@ +package appserviceplans + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FunctionsScaleAndConcurrencyTriggersHTTP struct { + PerInstanceConcurrency *int64 `json:"perInstanceConcurrency,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_handlermapping.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_handlermapping.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_handlermapping.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_handlermapping.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_hostingenvironmentprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_hostingenvironmentprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_hostingenvironmentprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_hostingenvironmentprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_hostnamesslstate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_hostnamesslstate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_hostnamesslstate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_hostnamesslstate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_hybridconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_hybridconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_hybridconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_hybridconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_hybridconnectionkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_hybridconnectionkey.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_hybridconnectionkey.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_hybridconnectionkey.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_hybridconnectionkeyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_hybridconnectionkeyproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_hybridconnectionkeyproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_hybridconnectionkeyproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_hybridconnectionlimits.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_hybridconnectionlimits.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_hybridconnectionlimits.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_hybridconnectionlimits.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_hybridconnectionlimitsproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_hybridconnectionlimitsproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_hybridconnectionlimitsproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_hybridconnectionlimitsproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_hybridconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_hybridconnectionproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_hybridconnectionproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_hybridconnectionproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_ipsecurityrestriction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_ipsecurityrestriction.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_ipsecurityrestriction.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_ipsecurityrestriction.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_kubeenvironmentprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_kubeenvironmentprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_kubeenvironmentprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_kubeenvironmentprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_localizablestring.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_localizablestring.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_localizablestring.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_localizablestring.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_namevaluepair.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_namevaluepair.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_namevaluepair.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_namevaluepair.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_pushsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_pushsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_pushsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_pushsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_pushsettingsproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_pushsettingsproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_pushsettingsproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_pushsettingsproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_rampuprule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_rampuprule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_rampuprule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_rampuprule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_requestsbasedtrigger.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_requestsbasedtrigger.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_requestsbasedtrigger.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_requestsbasedtrigger.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_resourceconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_resourceconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_resourceconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_resourceconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_site.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_site.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_site.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_site.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_siteconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_siteconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_siteconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_siteconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_sitednsconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_sitednsconfig.go new file mode 100644 index 0000000000000..58beab17a2dec --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_sitednsconfig.go @@ -0,0 +1,13 @@ +package appserviceplans + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SiteDnsConfig struct { + DnsAltServer *string `json:"dnsAltServer,omitempty"` + DnsLegacySortOrder *bool `json:"dnsLegacySortOrder,omitempty"` + DnsMaxCacheTimeout *int64 `json:"dnsMaxCacheTimeout,omitempty"` + DnsRetryAttemptCount *int64 `json:"dnsRetryAttemptCount,omitempty"` + DnsRetryAttemptTimeout *int64 `json:"dnsRetryAttemptTimeout,omitempty"` + DnsServers *[]string `json:"dnsServers,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_sitelimits.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_sitelimits.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_sitelimits.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_sitelimits.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_sitemachinekey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_sitemachinekey.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_sitemachinekey.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_sitemachinekey.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_siteproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_siteproperties.go new file mode 100644 index 0000000000000..e2cb76178838f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_siteproperties.go @@ -0,0 +1,89 @@ +package appserviceplans + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SiteProperties struct { + AvailabilityState *SiteAvailabilityState `json:"availabilityState,omitempty"` + ClientAffinityEnabled *bool `json:"clientAffinityEnabled,omitempty"` + ClientCertEnabled *bool `json:"clientCertEnabled,omitempty"` + ClientCertExclusionPaths *string `json:"clientCertExclusionPaths,omitempty"` + ClientCertMode *ClientCertMode `json:"clientCertMode,omitempty"` + CloningInfo *CloningInfo `json:"cloningInfo,omitempty"` + ContainerSize *int64 `json:"containerSize,omitempty"` + CustomDomainVerificationId *string `json:"customDomainVerificationId,omitempty"` + DailyMemoryTimeQuota *int64 `json:"dailyMemoryTimeQuota,omitempty"` + DaprConfig *DaprConfig `json:"daprConfig,omitempty"` + DefaultHostName *string `json:"defaultHostName,omitempty"` + DnsConfiguration *SiteDnsConfig `json:"dnsConfiguration,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + EnabledHostNames *[]string `json:"enabledHostNames,omitempty"` + FunctionAppConfig *FunctionAppConfig `json:"functionAppConfig,omitempty"` + HTTPSOnly *bool `json:"httpsOnly,omitempty"` + HostNameSslStates *[]HostNameSslState `json:"hostNameSslStates,omitempty"` + HostNames *[]string `json:"hostNames,omitempty"` + HostNamesDisabled *bool `json:"hostNamesDisabled,omitempty"` + HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` + HyperV *bool `json:"hyperV,omitempty"` + InProgressOperationId *string `json:"inProgressOperationId,omitempty"` + IsDefaultContainer *bool `json:"isDefaultContainer,omitempty"` + IsXenon *bool `json:"isXenon,omitempty"` + KeyVaultReferenceIdentity *string `json:"keyVaultReferenceIdentity,omitempty"` + LastModifiedTimeUtc *string `json:"lastModifiedTimeUtc,omitempty"` + ManagedEnvironmentId *string `json:"managedEnvironmentId,omitempty"` + MaxNumberOfWorkers *int64 `json:"maxNumberOfWorkers,omitempty"` + OutboundIPAddresses *string `json:"outboundIpAddresses,omitempty"` + PossibleOutboundIPAddresses *string `json:"possibleOutboundIpAddresses,omitempty"` + PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` + RedundancyMode *RedundancyMode `json:"redundancyMode,omitempty"` + RepositorySiteName *string `json:"repositorySiteName,omitempty"` + Reserved *bool `json:"reserved,omitempty"` + ResourceConfig *ResourceConfig `json:"resourceConfig,omitempty"` + ResourceGroup *string `json:"resourceGroup,omitempty"` + ScmSiteAlsoStopped *bool `json:"scmSiteAlsoStopped,omitempty"` + ServerFarmId *string `json:"serverFarmId,omitempty"` + SiteConfig *SiteConfig `json:"siteConfig,omitempty"` + SlotSwapStatus *SlotSwapStatus `json:"slotSwapStatus,omitempty"` + State *string `json:"state,omitempty"` + StorageAccountRequired *bool `json:"storageAccountRequired,omitempty"` + SuspendedTill *string `json:"suspendedTill,omitempty"` + TargetSwapSlot *string `json:"targetSwapSlot,omitempty"` + TrafficManagerHostNames *[]string `json:"trafficManagerHostNames,omitempty"` + UsageState *UsageState `json:"usageState,omitempty"` + VirtualNetworkSubnetId *string `json:"virtualNetworkSubnetId,omitempty"` + VnetBackupRestoreEnabled *bool `json:"vnetBackupRestoreEnabled,omitempty"` + VnetContentShareEnabled *bool `json:"vnetContentShareEnabled,omitempty"` + VnetImagePullEnabled *bool `json:"vnetImagePullEnabled,omitempty"` + VnetRouteAllEnabled *bool `json:"vnetRouteAllEnabled,omitempty"` + WorkloadProfileName *string `json:"workloadProfileName,omitempty"` +} + +func (o *SiteProperties) GetLastModifiedTimeUtcAsTime() (*time.Time, error) { + if o.LastModifiedTimeUtc == nil { + return nil, nil + } + return dates.ParseAsFormat(o.LastModifiedTimeUtc, "2006-01-02T15:04:05Z07:00") +} + +func (o *SiteProperties) SetLastModifiedTimeUtcAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.LastModifiedTimeUtc = &formatted +} + +func (o *SiteProperties) GetSuspendedTillAsTime() (*time.Time, error) { + if o.SuspendedTill == nil { + return nil, nil + } + return dates.ParseAsFormat(o.SuspendedTill, "2006-01-02T15:04:05Z07:00") +} + +func (o *SiteProperties) SetSuspendedTillAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.SuspendedTill = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_skucapacity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_skucapacity.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_skucapacity.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_skucapacity.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_skudescription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_skudescription.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_skudescription.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_skudescription.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_slotswapstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_slotswapstatus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_slotswapstatus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_slotswapstatus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_slowrequestsbasedtrigger.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_slowrequestsbasedtrigger.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_slowrequestsbasedtrigger.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_slowrequestsbasedtrigger.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_statuscodesbasedtrigger.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_statuscodesbasedtrigger.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_statuscodesbasedtrigger.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_statuscodesbasedtrigger.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_statuscodesrangebasedtrigger.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_statuscodesrangebasedtrigger.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_statuscodesrangebasedtrigger.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_statuscodesrangebasedtrigger.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_virtualapplication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_virtualapplication.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_virtualapplication.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_virtualapplication.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_virtualdirectory.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_virtualdirectory.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_virtualdirectory.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_virtualdirectory.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_vnetgateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_vnetgateway.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_vnetgateway.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_vnetgateway.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_vnetgatewayproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_vnetgatewayproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_vnetgatewayproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_vnetgatewayproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_vnetinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_vnetinfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_vnetinfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_vnetinfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_vnetinforesource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_vnetinforesource.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_vnetinforesource.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_vnetinforesource.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_vnetroute.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_vnetroute.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_vnetroute.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_vnetroute.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_vnetrouteproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_vnetrouteproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/model_vnetrouteproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/model_vnetrouteproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/version.go new file mode 100644 index 0000000000000..c624303ad0bcd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans/version.go @@ -0,0 +1,12 @@ +package appserviceplans + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-12-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/appserviceplans/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/README.md new file mode 100644 index 0000000000000..b166355d1ddc0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/README.md @@ -0,0 +1,7053 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps` Documentation + +The `webapps` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps" +``` + + +### Client Initialization + +```go +client := webapps.NewWebAppsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `WebAppsClient.AddPremierAddOn` + +```go +ctx := context.TODO() +id := webapps.NewPremierAddonID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "premierAddonValue") + +payload := webapps.PremierAddOn{ + // ... +} + + +read, err := client.AddPremierAddOn(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.AddPremierAddOnSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotPremierAddonID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "premierAddonValue") + +payload := webapps.PremierAddOn{ + // ... +} + + +read, err := client.AddPremierAddOnSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.AnalyzeCustomHostname` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.AnalyzeCustomHostname(ctx, id, webapps.DefaultAnalyzeCustomHostnameOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.AnalyzeCustomHostnameSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.AnalyzeCustomHostnameSlot(ctx, id, webapps.DefaultAnalyzeCustomHostnameSlotOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ApplySlotConfigToProduction` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.CsmSlotEntity{ + // ... +} + + +read, err := client.ApplySlotConfigToProduction(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ApplySlotConfigurationSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.CsmSlotEntity{ + // ... +} + + +read, err := client.ApplySlotConfigurationSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ApproveOrRejectPrivateEndpointConnection` + +```go +ctx := context.TODO() +id := webapps.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "privateEndpointConnectionValue") + +payload := webapps.RemotePrivateEndpointConnectionARMResource{ + // ... +} + + +if err := client.ApproveOrRejectPrivateEndpointConnectionThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.ApproveOrRejectPrivateEndpointConnectionSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "privateEndpointConnectionValue") + +payload := webapps.RemotePrivateEndpointConnectionARMResource{ + // ... +} + + +if err := client.ApproveOrRejectPrivateEndpointConnectionSlotThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.Backup` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.BackupRequest{ + // ... +} + + +read, err := client.Backup(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.BackupSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.BackupRequest{ + // ... +} + + +read, err := client.BackupSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateDeployment` + +```go +ctx := context.TODO() +id := webapps.NewDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "deploymentValue") + +payload := webapps.Deployment{ + // ... +} + + +read, err := client.CreateDeployment(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateDeploymentSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "deploymentValue") + +payload := webapps.Deployment{ + // ... +} + + +read, err := client.CreateDeploymentSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateFunction` + +```go +ctx := context.TODO() +id := webapps.NewFunctionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "functionValue") + +payload := webapps.FunctionEnvelope{ + // ... +} + + +if err := client.CreateFunctionThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.CreateInstanceFunctionSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotFunctionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "functionValue") + +payload := webapps.FunctionEnvelope{ + // ... +} + + +if err := client.CreateInstanceFunctionSlotThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.CreateInstanceMSDeployOperation` + +```go +ctx := context.TODO() +id := webapps.NewInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "instanceIdValue") + +payload := webapps.MSDeploy{ + // ... +} + + +if err := client.CreateInstanceMSDeployOperationThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.CreateInstanceMSDeployOperationSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "instanceIdValue") + +payload := webapps.MSDeploy{ + // ... +} + + +if err := client.CreateInstanceMSDeployOperationSlotThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.CreateMSDeployOperation` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.MSDeploy{ + // ... +} + + +if err := client.CreateMSDeployOperationThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.CreateMSDeployOperationSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.MSDeploy{ + // ... +} + + +if err := client.CreateMSDeployOperationSlotThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.CreateOneDeployOperation` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.CreateOneDeployOperation(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.Site{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdateConfiguration` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.SiteConfigResource{ + // ... +} + + +read, err := client.CreateOrUpdateConfiguration(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdateConfigurationSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.SiteConfigResource{ + // ... +} + + +read, err := client.CreateOrUpdateConfigurationSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdateDomainOwnershipIdentifier` + +```go +ctx := context.TODO() +id := webapps.NewDomainOwnershipIdentifierID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "domainOwnershipIdentifierValue") + +payload := webapps.Identifier{ + // ... +} + + +read, err := client.CreateOrUpdateDomainOwnershipIdentifier(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdateDomainOwnershipIdentifierSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotDomainOwnershipIdentifierID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "domainOwnershipIdentifierValue") + +payload := webapps.Identifier{ + // ... +} + + +read, err := client.CreateOrUpdateDomainOwnershipIdentifierSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdateFunctionSecret` + +```go +ctx := context.TODO() +id := webapps.NewKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "functionValue", "keyValue") + +payload := webapps.KeyInfo{ + // ... +} + + +read, err := client.CreateOrUpdateFunctionSecret(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdateFunctionSecretSlot` + +```go +ctx := context.TODO() +id := webapps.NewFunctionKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "functionValue", "keyValue") + +payload := webapps.KeyInfo{ + // ... +} + + +read, err := client.CreateOrUpdateFunctionSecretSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdateHostNameBinding` + +```go +ctx := context.TODO() +id := webapps.NewHostNameBindingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "hostNameBindingValue") + +payload := webapps.HostNameBinding{ + // ... +} + + +read, err := client.CreateOrUpdateHostNameBinding(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdateHostNameBindingSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotHostNameBindingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "hostNameBindingValue") + +payload := webapps.HostNameBinding{ + // ... +} + + +read, err := client.CreateOrUpdateHostNameBindingSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdateHostSecret` + +```go +ctx := context.TODO() +id := webapps.NewDefaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "defaultValue", "keyValue") + +payload := webapps.KeyInfo{ + // ... +} + + +read, err := client.CreateOrUpdateHostSecret(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdateHostSecretSlot` + +```go +ctx := context.TODO() +id := webapps.NewHostDefaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "defaultValue", "keyValue") + +payload := webapps.KeyInfo{ + // ... +} + + +read, err := client.CreateOrUpdateHostSecretSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdateHybridConnection` + +```go +ctx := context.TODO() +id := webapps.NewRelayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "hybridConnectionNamespaceValue", "relayValue") + +payload := webapps.HybridConnection{ + // ... +} + + +read, err := client.CreateOrUpdateHybridConnection(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdateHybridConnectionSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotHybridConnectionNamespaceRelayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "hybridConnectionNamespaceValue", "relayValue") + +payload := webapps.HybridConnection{ + // ... +} + + +read, err := client.CreateOrUpdateHybridConnectionSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdatePublicCertificate` + +```go +ctx := context.TODO() +id := webapps.NewPublicCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "publicCertificateValue") + +payload := webapps.PublicCertificate{ + // ... +} + + +read, err := client.CreateOrUpdatePublicCertificate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdatePublicCertificateSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotPublicCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "publicCertificateValue") + +payload := webapps.PublicCertificate{ + // ... +} + + +read, err := client.CreateOrUpdatePublicCertificateSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdateRelayServiceConnection` + +```go +ctx := context.TODO() +id := webapps.NewHybridConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "hybridConnectionValue") + +payload := webapps.RelayServiceConnectionEntity{ + // ... +} + + +read, err := client.CreateOrUpdateRelayServiceConnection(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdateRelayServiceConnectionSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotHybridConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "hybridConnectionValue") + +payload := webapps.RelayServiceConnectionEntity{ + // ... +} + + +read, err := client.CreateOrUpdateRelayServiceConnectionSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdateSiteContainer` + +```go +ctx := context.TODO() +id := webapps.NewSitecontainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "sitecontainerValue") + +payload := webapps.SiteContainer{ + // ... +} + + +read, err := client.CreateOrUpdateSiteContainer(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdateSiteContainerSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotSitecontainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "sitecontainerValue") + +payload := webapps.SiteContainer{ + // ... +} + + +read, err := client.CreateOrUpdateSiteContainerSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdateSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.Site{ + // ... +} + + +if err := client.CreateOrUpdateSlotThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdateSourceControl` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.SiteSourceControl{ + // ... +} + + +if err := client.CreateOrUpdateSourceControlThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdateSourceControlSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.SiteSourceControl{ + // ... +} + + +if err := client.CreateOrUpdateSourceControlSlotThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.SwiftVirtualNetwork{ + // ... +} + + +read, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.SwiftVirtualNetwork{ + // ... +} + + +read, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdateVnetConnection` + +```go +ctx := context.TODO() +id := webapps.NewVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "virtualNetworkConnectionValue") + +payload := webapps.VnetInfoResource{ + // ... +} + + +read, err := client.CreateOrUpdateVnetConnection(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdateVnetConnectionGateway` + +```go +ctx := context.TODO() +id := webapps.NewGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "virtualNetworkConnectionValue", "gatewayValue") + +payload := webapps.VnetGateway{ + // ... +} + + +read, err := client.CreateOrUpdateVnetConnectionGateway(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdateVnetConnectionGatewaySlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotVirtualNetworkConnectionGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "virtualNetworkConnectionValue", "gatewayValue") + +payload := webapps.VnetGateway{ + // ... +} + + +read, err := client.CreateOrUpdateVnetConnectionGatewaySlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.CreateOrUpdateVnetConnectionSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "virtualNetworkConnectionValue") + +payload := webapps.VnetInfoResource{ + // ... +} + + +read, err := client.CreateOrUpdateVnetConnectionSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.Delete` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.Delete(ctx, id, webapps.DefaultDeleteOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteBackup` + +```go +ctx := context.TODO() +id := webapps.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "backupIdValue") + +read, err := client.DeleteBackup(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteBackupConfiguration` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.DeleteBackupConfiguration(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteBackupConfigurationSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.DeleteBackupConfigurationSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteBackupSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "backupIdValue") + +read, err := client.DeleteBackupSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteContinuousWebJob` + +```go +ctx := context.TODO() +id := webapps.NewContinuousWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "continuousWebJobValue") + +read, err := client.DeleteContinuousWebJob(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteContinuousWebJobSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotContinuousWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "continuousWebJobValue") + +read, err := client.DeleteContinuousWebJobSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteDeployment` + +```go +ctx := context.TODO() +id := webapps.NewDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "deploymentValue") + +read, err := client.DeleteDeployment(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteDeploymentSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "deploymentValue") + +read, err := client.DeleteDeploymentSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteDomainOwnershipIdentifier` + +```go +ctx := context.TODO() +id := webapps.NewDomainOwnershipIdentifierID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "domainOwnershipIdentifierValue") + +read, err := client.DeleteDomainOwnershipIdentifier(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteDomainOwnershipIdentifierSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotDomainOwnershipIdentifierID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "domainOwnershipIdentifierValue") + +read, err := client.DeleteDomainOwnershipIdentifierSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteFunction` + +```go +ctx := context.TODO() +id := webapps.NewFunctionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "functionValue") + +read, err := client.DeleteFunction(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteFunctionSecret` + +```go +ctx := context.TODO() +id := webapps.NewKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "functionValue", "keyValue") + +read, err := client.DeleteFunctionSecret(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteFunctionSecretSlot` + +```go +ctx := context.TODO() +id := webapps.NewFunctionKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "functionValue", "keyValue") + +read, err := client.DeleteFunctionSecretSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteHostNameBinding` + +```go +ctx := context.TODO() +id := webapps.NewHostNameBindingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "hostNameBindingValue") + +read, err := client.DeleteHostNameBinding(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteHostNameBindingSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotHostNameBindingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "hostNameBindingValue") + +read, err := client.DeleteHostNameBindingSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteHostSecret` + +```go +ctx := context.TODO() +id := webapps.NewDefaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "defaultValue", "keyValue") + +read, err := client.DeleteHostSecret(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteHostSecretSlot` + +```go +ctx := context.TODO() +id := webapps.NewHostDefaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "defaultValue", "keyValue") + +read, err := client.DeleteHostSecretSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteHybridConnection` + +```go +ctx := context.TODO() +id := webapps.NewRelayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "hybridConnectionNamespaceValue", "relayValue") + +read, err := client.DeleteHybridConnection(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteHybridConnectionSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotHybridConnectionNamespaceRelayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "hybridConnectionNamespaceValue", "relayValue") + +read, err := client.DeleteHybridConnectionSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteInstanceFunctionSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotFunctionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "functionValue") + +read, err := client.DeleteInstanceFunctionSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteInstanceProcess` + +```go +ctx := context.TODO() +id := webapps.NewInstanceProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "instanceIdValue", "processIdValue") + +read, err := client.DeleteInstanceProcess(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteInstanceProcessSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotInstanceProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "instanceIdValue", "processIdValue") + +read, err := client.DeleteInstanceProcessSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeletePremierAddOn` + +```go +ctx := context.TODO() +id := webapps.NewPremierAddonID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "premierAddonValue") + +read, err := client.DeletePremierAddOn(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeletePremierAddOnSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotPremierAddonID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "premierAddonValue") + +read, err := client.DeletePremierAddOnSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeletePrivateEndpointConnection` + +```go +ctx := context.TODO() +id := webapps.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "privateEndpointConnectionValue") + +if err := client.DeletePrivateEndpointConnectionThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.DeletePrivateEndpointConnectionSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "privateEndpointConnectionValue") + +if err := client.DeletePrivateEndpointConnectionSlotThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.DeleteProcess` + +```go +ctx := context.TODO() +id := webapps.NewProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "processIdValue") + +read, err := client.DeleteProcess(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteProcessSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "processIdValue") + +read, err := client.DeleteProcessSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeletePublicCertificate` + +```go +ctx := context.TODO() +id := webapps.NewPublicCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "publicCertificateValue") + +read, err := client.DeletePublicCertificate(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeletePublicCertificateSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotPublicCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "publicCertificateValue") + +read, err := client.DeletePublicCertificateSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteRelayServiceConnection` + +```go +ctx := context.TODO() +id := webapps.NewHybridConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "hybridConnectionValue") + +read, err := client.DeleteRelayServiceConnection(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteRelayServiceConnectionSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotHybridConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "hybridConnectionValue") + +read, err := client.DeleteRelayServiceConnectionSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteSiteContainer` + +```go +ctx := context.TODO() +id := webapps.NewSitecontainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "sitecontainerValue") + +read, err := client.DeleteSiteContainer(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteSiteContainerSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotSitecontainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "sitecontainerValue") + +read, err := client.DeleteSiteContainerSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteSiteExtension` + +```go +ctx := context.TODO() +id := webapps.NewSiteExtensionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "siteExtensionIdValue") + +read, err := client.DeleteSiteExtension(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteSiteExtensionSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotSiteExtensionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "siteExtensionIdValue") + +read, err := client.DeleteSiteExtensionSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.DeleteSlot(ctx, id, webapps.DefaultDeleteSlotOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteSourceControl` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.DeleteSourceControl(ctx, id, webapps.DefaultDeleteSourceControlOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteSourceControlSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.DeleteSourceControlSlot(ctx, id, webapps.DefaultDeleteSourceControlSlotOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteSwiftVirtualNetwork` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.DeleteSwiftVirtualNetwork(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteSwiftVirtualNetworkSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.DeleteSwiftVirtualNetworkSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteTriggeredWebJob` + +```go +ctx := context.TODO() +id := webapps.NewTriggeredWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "triggeredWebJobValue") + +read, err := client.DeleteTriggeredWebJob(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteTriggeredWebJobSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotTriggeredWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "triggeredWebJobValue") + +read, err := client.DeleteTriggeredWebJobSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteVnetConnection` + +```go +ctx := context.TODO() +id := webapps.NewVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "virtualNetworkConnectionValue") + +read, err := client.DeleteVnetConnection(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeleteVnetConnectionSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "virtualNetworkConnectionValue") + +read, err := client.DeleteVnetConnectionSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeployWorkflowArtifacts` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.WorkflowArtifacts{ + // ... +} + + +read, err := client.DeployWorkflowArtifacts(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DeployWorkflowArtifactsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.WorkflowArtifacts{ + // ... +} + + +read, err := client.DeployWorkflowArtifactsSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DiscoverBackup` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.RestoreRequest{ + // ... +} + + +read, err := client.DiscoverBackup(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.DiscoverBackupSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.RestoreRequest{ + // ... +} + + +read, err := client.DiscoverBackupSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GenerateNewSitePublishingPassword` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.GenerateNewSitePublishingPassword(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GenerateNewSitePublishingPasswordSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.GenerateNewSitePublishingPasswordSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetAppSettingKeyVaultReference` + +```go +ctx := context.TODO() +id := webapps.NewAppSettingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "appSettingKeyValue") + +read, err := client.GetAppSettingKeyVaultReference(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetAppSettingKeyVaultReferenceSlot` + +```go +ctx := context.TODO() +id := webapps.NewConfigReferenceAppSettingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "appSettingKeyValue") + +read, err := client.GetAppSettingKeyVaultReferenceSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetAppSettingsKeyVaultReferences` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.GetAppSettingsKeyVaultReferences(ctx, id)` can be used to do batched pagination +items, err := client.GetAppSettingsKeyVaultReferencesComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.GetAppSettingsKeyVaultReferencesSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.GetAppSettingsKeyVaultReferencesSlot(ctx, id)` can be used to do batched pagination +items, err := client.GetAppSettingsKeyVaultReferencesSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.GetAuthSettings` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.GetAuthSettings(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetAuthSettingsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.GetAuthSettingsSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetAuthSettingsV2` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.GetAuthSettingsV2(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetAuthSettingsV2Slot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.GetAuthSettingsV2Slot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetAuthSettingsV2WithoutSecrets` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.GetAuthSettingsV2WithoutSecrets(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetAuthSettingsV2WithoutSecretsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.GetAuthSettingsV2WithoutSecretsSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetBackupConfiguration` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.GetBackupConfiguration(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetBackupConfigurationSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.GetBackupConfigurationSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetBackupStatus` + +```go +ctx := context.TODO() +id := webapps.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "backupIdValue") + +read, err := client.GetBackupStatus(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetBackupStatusSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "backupIdValue") + +read, err := client.GetBackupStatusSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetConfiguration` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.GetConfiguration(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetConfigurationSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.GetConfigurationSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetConfigurationSnapshot` + +```go +ctx := context.TODO() +id := webapps.NewSnapshotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "snapshotIdValue") + +read, err := client.GetConfigurationSnapshot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetConfigurationSnapshotSlot` + +```go +ctx := context.TODO() +id := webapps.NewWebSnapshotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "snapshotIdValue") + +read, err := client.GetConfigurationSnapshotSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetContainerLogsZip` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.GetContainerLogsZip(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetContainerLogsZipSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.GetContainerLogsZipSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetContinuousWebJob` + +```go +ctx := context.TODO() +id := webapps.NewContinuousWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "continuousWebJobValue") + +read, err := client.GetContinuousWebJob(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetContinuousWebJobSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotContinuousWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "continuousWebJobValue") + +read, err := client.GetContinuousWebJobSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetDeployment` + +```go +ctx := context.TODO() +id := webapps.NewDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "deploymentValue") + +read, err := client.GetDeployment(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetDeploymentSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "deploymentValue") + +read, err := client.GetDeploymentSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetDiagnosticLogsConfiguration` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.GetDiagnosticLogsConfiguration(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetDiagnosticLogsConfigurationSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.GetDiagnosticLogsConfigurationSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetDomainOwnershipIdentifier` + +```go +ctx := context.TODO() +id := webapps.NewDomainOwnershipIdentifierID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "domainOwnershipIdentifierValue") + +read, err := client.GetDomainOwnershipIdentifier(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetDomainOwnershipIdentifierSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotDomainOwnershipIdentifierID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "domainOwnershipIdentifierValue") + +read, err := client.GetDomainOwnershipIdentifierSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetFtpAllowed` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.GetFtpAllowed(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetFtpAllowedSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.GetFtpAllowedSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetFunction` + +```go +ctx := context.TODO() +id := webapps.NewFunctionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "functionValue") + +read, err := client.GetFunction(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetFunctionsAdminToken` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.GetFunctionsAdminToken(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetFunctionsAdminTokenSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.GetFunctionsAdminTokenSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetHostNameBinding` + +```go +ctx := context.TODO() +id := webapps.NewHostNameBindingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "hostNameBindingValue") + +read, err := client.GetHostNameBinding(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetHostNameBindingSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotHostNameBindingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "hostNameBindingValue") + +read, err := client.GetHostNameBindingSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetHybridConnection` + +```go +ctx := context.TODO() +id := webapps.NewRelayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "hybridConnectionNamespaceValue", "relayValue") + +read, err := client.GetHybridConnection(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetHybridConnectionSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotHybridConnectionNamespaceRelayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "hybridConnectionNamespaceValue", "relayValue") + +read, err := client.GetHybridConnectionSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetInstanceFunctionSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotFunctionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "functionValue") + +read, err := client.GetInstanceFunctionSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetInstanceInfo` + +```go +ctx := context.TODO() +id := webapps.NewInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "instanceIdValue") + +read, err := client.GetInstanceInfo(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetInstanceInfoSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "instanceIdValue") + +read, err := client.GetInstanceInfoSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetInstanceMSDeployLog` + +```go +ctx := context.TODO() +id := webapps.NewInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "instanceIdValue") + +read, err := client.GetInstanceMSDeployLog(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetInstanceMSDeployLogSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "instanceIdValue") + +read, err := client.GetInstanceMSDeployLogSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetInstanceMsDeployStatus` + +```go +ctx := context.TODO() +id := webapps.NewInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "instanceIdValue") + +read, err := client.GetInstanceMsDeployStatus(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetInstanceMsDeployStatusSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "instanceIdValue") + +read, err := client.GetInstanceMsDeployStatusSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetInstanceProcess` + +```go +ctx := context.TODO() +id := webapps.NewInstanceProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "instanceIdValue", "processIdValue") + +read, err := client.GetInstanceProcess(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetInstanceProcessDump` + +```go +ctx := context.TODO() +id := webapps.NewInstanceProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "instanceIdValue", "processIdValue") + +read, err := client.GetInstanceProcessDump(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetInstanceProcessDumpSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotInstanceProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "instanceIdValue", "processIdValue") + +read, err := client.GetInstanceProcessDumpSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetInstanceProcessModule` + +```go +ctx := context.TODO() +id := webapps.NewInstanceProcessModuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "instanceIdValue", "processIdValue", "moduleValue") + +read, err := client.GetInstanceProcessModule(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetInstanceProcessModuleSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotInstanceProcessModuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "instanceIdValue", "processIdValue", "moduleValue") + +read, err := client.GetInstanceProcessModuleSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetInstanceProcessSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotInstanceProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "instanceIdValue", "processIdValue") + +read, err := client.GetInstanceProcessSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetInstanceWorkflowSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotWorkflowID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "workflowValue") + +read, err := client.GetInstanceWorkflowSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetMSDeployLog` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.GetMSDeployLog(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetMSDeployLogSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.GetMSDeployLogSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetMSDeployStatus` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.GetMSDeployStatus(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetMSDeployStatusSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.GetMSDeployStatusSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetMigrateMySqlStatus` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.GetMigrateMySqlStatus(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetMigrateMySqlStatusSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.GetMigrateMySqlStatusSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetNetworkTraces` + +```go +ctx := context.TODO() +id := webapps.NewNetworkTraceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "operationIdValue") + +read, err := client.GetNetworkTraces(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetNetworkTracesSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotNetworkTraceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "operationIdValue") + +read, err := client.GetNetworkTracesSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetNetworkTracesSlotV2` + +```go +ctx := context.TODO() +id := webapps.NewSiteSlotNetworkTraceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "operationIdValue") + +read, err := client.GetNetworkTracesSlotV2(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetNetworkTracesV2` + +```go +ctx := context.TODO() +id := webapps.NewSiteNetworkTraceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "operationIdValue") + +read, err := client.GetNetworkTracesV2(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetOneDeployStatus` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.GetOneDeployStatus(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetPremierAddOn` + +```go +ctx := context.TODO() +id := webapps.NewPremierAddonID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "premierAddonValue") + +read, err := client.GetPremierAddOn(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetPremierAddOnSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotPremierAddonID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "premierAddonValue") + +read, err := client.GetPremierAddOnSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetPrivateAccess` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.GetPrivateAccess(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetPrivateAccessSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.GetPrivateAccessSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetPrivateEndpointConnection` + +```go +ctx := context.TODO() +id := webapps.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "privateEndpointConnectionValue") + +read, err := client.GetPrivateEndpointConnection(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetPrivateEndpointConnectionList` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.GetPrivateEndpointConnectionList(ctx, id)` can be used to do batched pagination +items, err := client.GetPrivateEndpointConnectionListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.GetPrivateEndpointConnectionListSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.GetPrivateEndpointConnectionListSlot(ctx, id)` can be used to do batched pagination +items, err := client.GetPrivateEndpointConnectionListSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.GetPrivateEndpointConnectionSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "privateEndpointConnectionValue") + +read, err := client.GetPrivateEndpointConnectionSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetPrivateLinkResources` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.GetPrivateLinkResources(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetPrivateLinkResourcesSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.GetPrivateLinkResourcesSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetProcess` + +```go +ctx := context.TODO() +id := webapps.NewProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "processIdValue") + +read, err := client.GetProcess(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetProcessDump` + +```go +ctx := context.TODO() +id := webapps.NewProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "processIdValue") + +read, err := client.GetProcessDump(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetProcessDumpSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "processIdValue") + +read, err := client.GetProcessDumpSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetProcessModule` + +```go +ctx := context.TODO() +id := webapps.NewModuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "processIdValue", "moduleValue") + +read, err := client.GetProcessModule(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetProcessModuleSlot` + +```go +ctx := context.TODO() +id := webapps.NewProcessModuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "processIdValue", "moduleValue") + +read, err := client.GetProcessModuleSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetProcessSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "processIdValue") + +read, err := client.GetProcessSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetPublicCertificate` + +```go +ctx := context.TODO() +id := webapps.NewPublicCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "publicCertificateValue") + +read, err := client.GetPublicCertificate(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetPublicCertificateSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotPublicCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "publicCertificateValue") + +read, err := client.GetPublicCertificateSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetRelayServiceConnection` + +```go +ctx := context.TODO() +id := webapps.NewHybridConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "hybridConnectionValue") + +read, err := client.GetRelayServiceConnection(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetRelayServiceConnectionSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotHybridConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "hybridConnectionValue") + +read, err := client.GetRelayServiceConnectionSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetScmAllowed` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.GetScmAllowed(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetScmAllowedSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.GetScmAllowedSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetSiteConnectionStringKeyVaultReference` + +```go +ctx := context.TODO() +id := webapps.NewConnectionStringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "connectionStringKeyValue") + +read, err := client.GetSiteConnectionStringKeyVaultReference(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetSiteConnectionStringKeyVaultReferenceSlot` + +```go +ctx := context.TODO() +id := webapps.NewConfigReferenceConnectionStringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "connectionStringKeyValue") + +read, err := client.GetSiteConnectionStringKeyVaultReferenceSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetSiteConnectionStringKeyVaultReferences` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.GetSiteConnectionStringKeyVaultReferences(ctx, id)` can be used to do batched pagination +items, err := client.GetSiteConnectionStringKeyVaultReferencesComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.GetSiteConnectionStringKeyVaultReferencesSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.GetSiteConnectionStringKeyVaultReferencesSlot(ctx, id)` can be used to do batched pagination +items, err := client.GetSiteConnectionStringKeyVaultReferencesSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.GetSiteContainer` + +```go +ctx := context.TODO() +id := webapps.NewSitecontainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "sitecontainerValue") + +read, err := client.GetSiteContainer(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetSiteContainerSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotSitecontainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "sitecontainerValue") + +read, err := client.GetSiteContainerSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetSiteExtension` + +```go +ctx := context.TODO() +id := webapps.NewSiteExtensionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "siteExtensionIdValue") + +read, err := client.GetSiteExtension(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetSiteExtensionSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotSiteExtensionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "siteExtensionIdValue") + +read, err := client.GetSiteExtensionSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetSitePhpErrorLogFlag` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.GetSitePhpErrorLogFlag(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetSitePhpErrorLogFlagSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.GetSitePhpErrorLogFlagSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.GetSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetSourceControl` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.GetSourceControl(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetSourceControlSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.GetSourceControlSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetSwiftVirtualNetworkConnection` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.GetSwiftVirtualNetworkConnection(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetSwiftVirtualNetworkConnectionSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.GetSwiftVirtualNetworkConnectionSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetTriggeredWebJob` + +```go +ctx := context.TODO() +id := webapps.NewTriggeredWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "triggeredWebJobValue") + +read, err := client.GetTriggeredWebJob(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetTriggeredWebJobHistory` + +```go +ctx := context.TODO() +id := webapps.NewHistoryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "triggeredWebJobValue", "historyValue") + +read, err := client.GetTriggeredWebJobHistory(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetTriggeredWebJobHistorySlot` + +```go +ctx := context.TODO() +id := webapps.NewTriggeredWebJobHistoryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "triggeredWebJobValue", "historyValue") + +read, err := client.GetTriggeredWebJobHistorySlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetTriggeredWebJobSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotTriggeredWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "triggeredWebJobValue") + +read, err := client.GetTriggeredWebJobSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetVnetConnection` + +```go +ctx := context.TODO() +id := webapps.NewVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "virtualNetworkConnectionValue") + +read, err := client.GetVnetConnection(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetVnetConnectionGateway` + +```go +ctx := context.TODO() +id := webapps.NewGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "virtualNetworkConnectionValue", "gatewayValue") + +read, err := client.GetVnetConnectionGateway(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetVnetConnectionGatewaySlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotVirtualNetworkConnectionGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "virtualNetworkConnectionValue", "gatewayValue") + +read, err := client.GetVnetConnectionGatewaySlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetVnetConnectionSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "virtualNetworkConnectionValue") + +read, err := client.GetVnetConnectionSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetWebJob` + +```go +ctx := context.TODO() +id := webapps.NewWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "webJobValue") + +read, err := client.GetWebJob(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetWebJobSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "webJobValue") + +read, err := client.GetWebJobSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetWebSiteContainerLogs` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.GetWebSiteContainerLogs(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetWebSiteContainerLogsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.GetWebSiteContainerLogsSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.GetWorkflow` + +```go +ctx := context.TODO() +id := webapps.NewWorkflowID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "workflowValue") + +read, err := client.GetWorkflow(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.InstallSiteExtension` + +```go +ctx := context.TODO() +id := webapps.NewSiteExtensionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "siteExtensionIdValue") + +if err := client.InstallSiteExtensionThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.InstallSiteExtensionSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotSiteExtensionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "siteExtensionIdValue") + +if err := client.InstallSiteExtensionSlotThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.IsCloneable` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.IsCloneable(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.IsCloneableSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.IsCloneableSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.List` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListApplicationSettings` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.ListApplicationSettings(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListApplicationSettingsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.ListApplicationSettingsSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListAzureStorageAccounts` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.ListAzureStorageAccounts(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListAzureStorageAccountsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.ListAzureStorageAccountsSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListBackupStatusSecrets` + +```go +ctx := context.TODO() +id := webapps.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "backupIdValue") + +payload := webapps.BackupRequest{ + // ... +} + + +read, err := client.ListBackupStatusSecrets(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListBackupStatusSecretsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "backupIdValue") + +payload := webapps.BackupRequest{ + // ... +} + + +read, err := client.ListBackupStatusSecretsSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListBackups` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.ListBackups(ctx, id)` can be used to do batched pagination +items, err := client.ListBackupsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListBackupsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.ListBackupsSlot(ctx, id)` can be used to do batched pagination +items, err := client.ListBackupsSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListBasicPublishingCredentialsPolicies` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.ListBasicPublishingCredentialsPolicies(ctx, id)` can be used to do batched pagination +items, err := client.ListBasicPublishingCredentialsPoliciesComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListBasicPublishingCredentialsPoliciesSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.ListBasicPublishingCredentialsPoliciesSlot(ctx, id)` can be used to do batched pagination +items, err := client.ListBasicPublishingCredentialsPoliciesSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id, webapps.DefaultListByResourceGroupOperationOptions())` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id, webapps.DefaultListByResourceGroupOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListConfigurationSnapshotInfo` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.ListConfigurationSnapshotInfo(ctx, id)` can be used to do batched pagination +items, err := client.ListConfigurationSnapshotInfoComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListConfigurationSnapshotInfoSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.ListConfigurationSnapshotInfoSlot(ctx, id)` can be used to do batched pagination +items, err := client.ListConfigurationSnapshotInfoSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListConfigurations` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.ListConfigurations(ctx, id)` can be used to do batched pagination +items, err := client.ListConfigurationsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListConfigurationsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.ListConfigurationsSlot(ctx, id)` can be used to do batched pagination +items, err := client.ListConfigurationsSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListConnectionStrings` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.ListConnectionStrings(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListConnectionStringsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.ListConnectionStringsSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListContinuousWebJobs` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.ListContinuousWebJobs(ctx, id)` can be used to do batched pagination +items, err := client.ListContinuousWebJobsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListContinuousWebJobsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.ListContinuousWebJobsSlot(ctx, id)` can be used to do batched pagination +items, err := client.ListContinuousWebJobsSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListDeploymentLog` + +```go +ctx := context.TODO() +id := webapps.NewDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "deploymentValue") + +read, err := client.ListDeploymentLog(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListDeploymentLogSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "deploymentValue") + +read, err := client.ListDeploymentLogSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListDeployments` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.ListDeployments(ctx, id)` can be used to do batched pagination +items, err := client.ListDeploymentsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListDeploymentsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.ListDeploymentsSlot(ctx, id)` can be used to do batched pagination +items, err := client.ListDeploymentsSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListDomainOwnershipIdentifiers` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.ListDomainOwnershipIdentifiers(ctx, id)` can be used to do batched pagination +items, err := client.ListDomainOwnershipIdentifiersComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListDomainOwnershipIdentifiersSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.ListDomainOwnershipIdentifiersSlot(ctx, id)` can be used to do batched pagination +items, err := client.ListDomainOwnershipIdentifiersSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListFunctionKeys` + +```go +ctx := context.TODO() +id := webapps.NewFunctionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "functionValue") + +read, err := client.ListFunctionKeys(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListFunctionKeysSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotFunctionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "functionValue") + +read, err := client.ListFunctionKeysSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListFunctionSecrets` + +```go +ctx := context.TODO() +id := webapps.NewFunctionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "functionValue") + +read, err := client.ListFunctionSecrets(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListFunctionSecretsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotFunctionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "functionValue") + +read, err := client.ListFunctionSecretsSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListFunctions` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.ListFunctions(ctx, id)` can be used to do batched pagination +items, err := client.ListFunctionsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListHostKeys` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.ListHostKeys(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListHostKeysSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.ListHostKeysSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListHostNameBindings` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.ListHostNameBindings(ctx, id)` can be used to do batched pagination +items, err := client.ListHostNameBindingsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListHostNameBindingsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.ListHostNameBindingsSlot(ctx, id)` can be used to do batched pagination +items, err := client.ListHostNameBindingsSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListHybridConnections` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.ListHybridConnections(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListHybridConnectionsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.ListHybridConnectionsSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListInstanceFunctionsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.ListInstanceFunctionsSlot(ctx, id)` can be used to do batched pagination +items, err := client.ListInstanceFunctionsSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListInstanceIdentifiers` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.ListInstanceIdentifiers(ctx, id)` can be used to do batched pagination +items, err := client.ListInstanceIdentifiersComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListInstanceIdentifiersSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.ListInstanceIdentifiersSlot(ctx, id)` can be used to do batched pagination +items, err := client.ListInstanceIdentifiersSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListInstanceProcessModules` + +```go +ctx := context.TODO() +id := webapps.NewInstanceProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "instanceIdValue", "processIdValue") + +// alternatively `client.ListInstanceProcessModules(ctx, id)` can be used to do batched pagination +items, err := client.ListInstanceProcessModulesComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListInstanceProcessModulesSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotInstanceProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "instanceIdValue", "processIdValue") + +// alternatively `client.ListInstanceProcessModulesSlot(ctx, id)` can be used to do batched pagination +items, err := client.ListInstanceProcessModulesSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListInstanceProcessThreads` + +```go +ctx := context.TODO() +id := webapps.NewInstanceProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "instanceIdValue", "processIdValue") + +// alternatively `client.ListInstanceProcessThreads(ctx, id)` can be used to do batched pagination +items, err := client.ListInstanceProcessThreadsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListInstanceProcessThreadsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotInstanceProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "instanceIdValue", "processIdValue") + +// alternatively `client.ListInstanceProcessThreadsSlot(ctx, id)` can be used to do batched pagination +items, err := client.ListInstanceProcessThreadsSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListInstanceProcesses` + +```go +ctx := context.TODO() +id := webapps.NewInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "instanceIdValue") + +// alternatively `client.ListInstanceProcesses(ctx, id)` can be used to do batched pagination +items, err := client.ListInstanceProcessesComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListInstanceProcessesSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "instanceIdValue") + +// alternatively `client.ListInstanceProcessesSlot(ctx, id)` can be used to do batched pagination +items, err := client.ListInstanceProcessesSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListInstanceWorkflowsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.ListInstanceWorkflowsSlot(ctx, id)` can be used to do batched pagination +items, err := client.ListInstanceWorkflowsSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListMetadata` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.ListMetadata(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListMetadataSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.ListMetadataSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListNetworkFeatures` + +```go +ctx := context.TODO() +id := webapps.NewNetworkFeatureID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "networkFeatureValue") + +read, err := client.ListNetworkFeatures(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListNetworkFeaturesSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotNetworkFeatureID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "networkFeatureValue") + +read, err := client.ListNetworkFeaturesSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListPerfMonCounters` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.ListPerfMonCounters(ctx, id, webapps.DefaultListPerfMonCountersOperationOptions())` can be used to do batched pagination +items, err := client.ListPerfMonCountersComplete(ctx, id, webapps.DefaultListPerfMonCountersOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListPerfMonCountersSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.ListPerfMonCountersSlot(ctx, id, webapps.DefaultListPerfMonCountersSlotOperationOptions())` can be used to do batched pagination +items, err := client.ListPerfMonCountersSlotComplete(ctx, id, webapps.DefaultListPerfMonCountersSlotOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListPremierAddOns` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.ListPremierAddOns(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListPremierAddOnsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.ListPremierAddOnsSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListProcessModules` + +```go +ctx := context.TODO() +id := webapps.NewProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "processIdValue") + +// alternatively `client.ListProcessModules(ctx, id)` can be used to do batched pagination +items, err := client.ListProcessModulesComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListProcessModulesSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "processIdValue") + +// alternatively `client.ListProcessModulesSlot(ctx, id)` can be used to do batched pagination +items, err := client.ListProcessModulesSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListProcessThreads` + +```go +ctx := context.TODO() +id := webapps.NewProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "processIdValue") + +// alternatively `client.ListProcessThreads(ctx, id)` can be used to do batched pagination +items, err := client.ListProcessThreadsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListProcessThreadsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotProcessID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "processIdValue") + +// alternatively `client.ListProcessThreadsSlot(ctx, id)` can be used to do batched pagination +items, err := client.ListProcessThreadsSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListProcesses` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.ListProcesses(ctx, id)` can be used to do batched pagination +items, err := client.ListProcessesComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListProcessesSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.ListProcessesSlot(ctx, id)` can be used to do batched pagination +items, err := client.ListProcessesSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListProductionSiteDeploymentStatuses` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.ListProductionSiteDeploymentStatuses(ctx, id)` can be used to do batched pagination +items, err := client.ListProductionSiteDeploymentStatusesComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListPublicCertificates` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.ListPublicCertificates(ctx, id)` can be used to do batched pagination +items, err := client.ListPublicCertificatesComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListPublicCertificatesSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.ListPublicCertificatesSlot(ctx, id)` can be used to do batched pagination +items, err := client.ListPublicCertificatesSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListPublishingCredentials` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +if err := client.ListPublishingCredentialsThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.ListPublishingCredentialsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +if err := client.ListPublishingCredentialsSlotThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.ListPublishingProfileXmlWithSecrets` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.CsmPublishingProfileOptions{ + // ... +} + + +read, err := client.ListPublishingProfileXmlWithSecrets(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListPublishingProfileXmlWithSecretsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.CsmPublishingProfileOptions{ + // ... +} + + +read, err := client.ListPublishingProfileXmlWithSecretsSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListRelayServiceConnections` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.ListRelayServiceConnections(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListRelayServiceConnectionsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.ListRelayServiceConnectionsSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListSiteBackups` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.ListSiteBackups(ctx, id)` can be used to do batched pagination +items, err := client.ListSiteBackupsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListSiteBackupsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.ListSiteBackupsSlot(ctx, id)` can be used to do batched pagination +items, err := client.ListSiteBackupsSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListSiteContainers` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.ListSiteContainers(ctx, id)` can be used to do batched pagination +items, err := client.ListSiteContainersComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListSiteContainersSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.ListSiteContainersSlot(ctx, id)` can be used to do batched pagination +items, err := client.ListSiteContainersSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListSiteExtensions` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.ListSiteExtensions(ctx, id)` can be used to do batched pagination +items, err := client.ListSiteExtensionsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListSiteExtensionsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.ListSiteExtensionsSlot(ctx, id)` can be used to do batched pagination +items, err := client.ListSiteExtensionsSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListSitePushSettings` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.ListSitePushSettings(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListSitePushSettingsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.ListSitePushSettingsSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListSlotConfigurationNames` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.ListSlotConfigurationNames(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListSlotDifferencesFromProduction` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.CsmSlotEntity{ + // ... +} + + +// alternatively `client.ListSlotDifferencesFromProduction(ctx, id, payload)` can be used to do batched pagination +items, err := client.ListSlotDifferencesFromProductionComplete(ctx, id, payload) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListSlotDifferencesSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.CsmSlotEntity{ + // ... +} + + +// alternatively `client.ListSlotDifferencesSlot(ctx, id, payload)` can be used to do batched pagination +items, err := client.ListSlotDifferencesSlotComplete(ctx, id, payload) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListSlotSiteDeploymentStatusesSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.ListSlotSiteDeploymentStatusesSlot(ctx, id)` can be used to do batched pagination +items, err := client.ListSlotSiteDeploymentStatusesSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListSlots` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.ListSlots(ctx, id)` can be used to do batched pagination +items, err := client.ListSlotsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListSnapshots` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.ListSnapshots(ctx, id)` can be used to do batched pagination +items, err := client.ListSnapshotsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListSnapshotsFromDRSecondary` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.ListSnapshotsFromDRSecondary(ctx, id)` can be used to do batched pagination +items, err := client.ListSnapshotsFromDRSecondaryComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListSnapshotsFromDRSecondarySlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.ListSnapshotsFromDRSecondarySlot(ctx, id)` can be used to do batched pagination +items, err := client.ListSnapshotsFromDRSecondarySlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListSnapshotsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.ListSnapshotsSlot(ctx, id)` can be used to do batched pagination +items, err := client.ListSnapshotsSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListSyncFunctionTriggers` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.ListSyncFunctionTriggers(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListSyncFunctionTriggersSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.ListSyncFunctionTriggersSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListSyncStatus` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.ListSyncStatus(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListSyncStatusSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.ListSyncStatusSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListTriggeredWebJobHistory` + +```go +ctx := context.TODO() +id := webapps.NewTriggeredWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "triggeredWebJobValue") + +// alternatively `client.ListTriggeredWebJobHistory(ctx, id)` can be used to do batched pagination +items, err := client.ListTriggeredWebJobHistoryComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListTriggeredWebJobHistorySlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotTriggeredWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "triggeredWebJobValue") + +// alternatively `client.ListTriggeredWebJobHistorySlot(ctx, id)` can be used to do batched pagination +items, err := client.ListTriggeredWebJobHistorySlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListTriggeredWebJobs` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.ListTriggeredWebJobs(ctx, id)` can be used to do batched pagination +items, err := client.ListTriggeredWebJobsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListTriggeredWebJobsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.ListTriggeredWebJobsSlot(ctx, id)` can be used to do batched pagination +items, err := client.ListTriggeredWebJobsSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListUsages` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.ListUsages(ctx, id, webapps.DefaultListUsagesOperationOptions())` can be used to do batched pagination +items, err := client.ListUsagesComplete(ctx, id, webapps.DefaultListUsagesOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListUsagesSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.ListUsagesSlot(ctx, id, webapps.DefaultListUsagesSlotOperationOptions())` can be used to do batched pagination +items, err := client.ListUsagesSlotComplete(ctx, id, webapps.DefaultListUsagesSlotOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListVnetConnections` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.ListVnetConnections(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListVnetConnectionsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.ListVnetConnectionsSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListWebJobs` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.ListWebJobs(ctx, id)` can be used to do batched pagination +items, err := client.ListWebJobsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListWebJobsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +// alternatively `client.ListWebJobsSlot(ctx, id)` can be used to do batched pagination +items, err := client.ListWebJobsSlotComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListWorkflows` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +// alternatively `client.ListWorkflows(ctx, id)` can be used to do batched pagination +items, err := client.ListWorkflowsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebAppsClient.ListWorkflowsConnections` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.ListWorkflowsConnections(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ListWorkflowsConnectionsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.ListWorkflowsConnectionsSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.MigrateMySql` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.MigrateMySqlRequest{ + // ... +} + + +if err := client.MigrateMySqlThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.MigrateStorage` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.StorageMigrationOptions{ + // ... +} + + +if err := client.MigrateStorageThenPoll(ctx, id, payload, webapps.DefaultMigrateStorageOperationOptions()); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.PutPrivateAccessVnet` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.PrivateAccess{ + // ... +} + + +read, err := client.PutPrivateAccessVnet(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.PutPrivateAccessVnetSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.PrivateAccess{ + // ... +} + + +read, err := client.PutPrivateAccessVnetSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.RecoverSiteConfigurationSnapshot` + +```go +ctx := context.TODO() +id := webapps.NewSnapshotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "snapshotIdValue") + +read, err := client.RecoverSiteConfigurationSnapshot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.RecoverSiteConfigurationSnapshotSlot` + +```go +ctx := context.TODO() +id := webapps.NewWebSnapshotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "snapshotIdValue") + +read, err := client.RecoverSiteConfigurationSnapshotSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ResetProductionSlotConfig` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.ResetProductionSlotConfig(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.ResetSlotConfigurationSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.ResetSlotConfigurationSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.Restart` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.Restart(ctx, id, webapps.DefaultRestartOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.RestartSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.RestartSlot(ctx, id, webapps.DefaultRestartSlotOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.Restore` + +```go +ctx := context.TODO() +id := webapps.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "backupIdValue") + +payload := webapps.RestoreRequest{ + // ... +} + + +if err := client.RestoreThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.RestoreFromBackupBlob` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.RestoreRequest{ + // ... +} + + +if err := client.RestoreFromBackupBlobThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.RestoreFromBackupBlobSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.RestoreRequest{ + // ... +} + + +if err := client.RestoreFromBackupBlobSlotThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.RestoreFromDeletedApp` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.DeletedAppRestoreRequest{ + // ... +} + + +if err := client.RestoreFromDeletedAppThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.RestoreFromDeletedAppSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.DeletedAppRestoreRequest{ + // ... +} + + +if err := client.RestoreFromDeletedAppSlotThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.RestoreSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "backupIdValue") + +payload := webapps.RestoreRequest{ + // ... +} + + +if err := client.RestoreSlotThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.RestoreSnapshot` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.SnapshotRestoreRequest{ + // ... +} + + +if err := client.RestoreSnapshotThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.RestoreSnapshotSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.SnapshotRestoreRequest{ + // ... +} + + +if err := client.RestoreSnapshotSlotThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.RunTriggeredWebJob` + +```go +ctx := context.TODO() +id := webapps.NewTriggeredWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "triggeredWebJobValue") + +read, err := client.RunTriggeredWebJob(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.RunTriggeredWebJobSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotTriggeredWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "triggeredWebJobValue") + +read, err := client.RunTriggeredWebJobSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.Start` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.Start(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.StartContinuousWebJob` + +```go +ctx := context.TODO() +id := webapps.NewContinuousWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "continuousWebJobValue") + +read, err := client.StartContinuousWebJob(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.StartContinuousWebJobSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotContinuousWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "continuousWebJobValue") + +read, err := client.StartContinuousWebJobSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.StartNetworkTrace` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +if err := client.StartNetworkTraceThenPoll(ctx, id, webapps.DefaultStartNetworkTraceOperationOptions()); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.StartNetworkTraceSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +if err := client.StartNetworkTraceSlotThenPoll(ctx, id, webapps.DefaultStartNetworkTraceSlotOperationOptions()); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.StartSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.StartSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.StartWebSiteNetworkTrace` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.StartWebSiteNetworkTrace(ctx, id, webapps.DefaultStartWebSiteNetworkTraceOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.StartWebSiteNetworkTraceOperation` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +if err := client.StartWebSiteNetworkTraceOperationThenPoll(ctx, id, webapps.DefaultStartWebSiteNetworkTraceOperationOperationOptions()); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.StartWebSiteNetworkTraceOperationSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +if err := client.StartWebSiteNetworkTraceOperationSlotThenPoll(ctx, id, webapps.DefaultStartWebSiteNetworkTraceOperationSlotOperationOptions()); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.StartWebSiteNetworkTraceSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.StartWebSiteNetworkTraceSlot(ctx, id, webapps.DefaultStartWebSiteNetworkTraceSlotOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.Stop` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.Stop(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.StopContinuousWebJob` + +```go +ctx := context.TODO() +id := webapps.NewContinuousWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "continuousWebJobValue") + +read, err := client.StopContinuousWebJob(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.StopContinuousWebJobSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotContinuousWebJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "continuousWebJobValue") + +read, err := client.StopContinuousWebJobSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.StopNetworkTrace` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.StopNetworkTrace(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.StopNetworkTraceSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.StopNetworkTraceSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.StopSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.StopSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.StopWebSiteNetworkTrace` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.StopWebSiteNetworkTrace(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.StopWebSiteNetworkTraceSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.StopWebSiteNetworkTraceSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.SwapSlotSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.CsmSlotEntity{ + // ... +} + + +if err := client.SwapSlotSlotThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.SwapSlotWithProduction` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.CsmSlotEntity{ + // ... +} + + +if err := client.SwapSlotWithProductionThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebAppsClient.SyncFunctionTriggers` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.SyncFunctionTriggers(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.SyncFunctionTriggersSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.SyncFunctionTriggersSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.SyncFunctions` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.SyncFunctions(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.SyncFunctionsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.SyncFunctionsSlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.SyncRepository` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +read, err := client.SyncRepository(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.SyncRepositorySlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +read, err := client.SyncRepositorySlot(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.Update` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.SitePatchResource{ + // ... +} + + +read, err := client.Update(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateApplicationSettings` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.StringDictionary{ + // ... +} + + +read, err := client.UpdateApplicationSettings(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateApplicationSettingsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.StringDictionary{ + // ... +} + + +read, err := client.UpdateApplicationSettingsSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateAuthSettings` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.SiteAuthSettings{ + // ... +} + + +read, err := client.UpdateAuthSettings(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateAuthSettingsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.SiteAuthSettings{ + // ... +} + + +read, err := client.UpdateAuthSettingsSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateAuthSettingsV2` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.SiteAuthSettingsV2{ + // ... +} + + +read, err := client.UpdateAuthSettingsV2(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateAuthSettingsV2Slot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.SiteAuthSettingsV2{ + // ... +} + + +read, err := client.UpdateAuthSettingsV2Slot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateAzureStorageAccounts` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.AzureStoragePropertyDictionaryResource{ + // ... +} + + +read, err := client.UpdateAzureStorageAccounts(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateAzureStorageAccountsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.AzureStoragePropertyDictionaryResource{ + // ... +} + + +read, err := client.UpdateAzureStorageAccountsSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateBackupConfiguration` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.BackupRequest{ + // ... +} + + +read, err := client.UpdateBackupConfiguration(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateBackupConfigurationSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.BackupRequest{ + // ... +} + + +read, err := client.UpdateBackupConfigurationSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateConfiguration` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.SiteConfigResource{ + // ... +} + + +read, err := client.UpdateConfiguration(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateConfigurationSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.SiteConfigResource{ + // ... +} + + +read, err := client.UpdateConfigurationSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateConnectionStrings` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.ConnectionStringDictionary{ + // ... +} + + +read, err := client.UpdateConnectionStrings(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateConnectionStringsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.ConnectionStringDictionary{ + // ... +} + + +read, err := client.UpdateConnectionStringsSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateDiagnosticLogsConfig` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.SiteLogsConfig{ + // ... +} + + +read, err := client.UpdateDiagnosticLogsConfig(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateDiagnosticLogsConfigSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.SiteLogsConfig{ + // ... +} + + +read, err := client.UpdateDiagnosticLogsConfigSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateDomainOwnershipIdentifier` + +```go +ctx := context.TODO() +id := webapps.NewDomainOwnershipIdentifierID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "domainOwnershipIdentifierValue") + +payload := webapps.Identifier{ + // ... +} + + +read, err := client.UpdateDomainOwnershipIdentifier(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateDomainOwnershipIdentifierSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotDomainOwnershipIdentifierID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "domainOwnershipIdentifierValue") + +payload := webapps.Identifier{ + // ... +} + + +read, err := client.UpdateDomainOwnershipIdentifierSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateFtpAllowed` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.CsmPublishingCredentialsPoliciesEntity{ + // ... +} + + +read, err := client.UpdateFtpAllowed(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateFtpAllowedSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.CsmPublishingCredentialsPoliciesEntity{ + // ... +} + + +read, err := client.UpdateFtpAllowedSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateHybridConnection` + +```go +ctx := context.TODO() +id := webapps.NewRelayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "hybridConnectionNamespaceValue", "relayValue") + +payload := webapps.HybridConnection{ + // ... +} + + +read, err := client.UpdateHybridConnection(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateHybridConnectionSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotHybridConnectionNamespaceRelayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "hybridConnectionNamespaceValue", "relayValue") + +payload := webapps.HybridConnection{ + // ... +} + + +read, err := client.UpdateHybridConnectionSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateMetadata` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.StringDictionary{ + // ... +} + + +read, err := client.UpdateMetadata(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateMetadataSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.StringDictionary{ + // ... +} + + +read, err := client.UpdateMetadataSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdatePremierAddOn` + +```go +ctx := context.TODO() +id := webapps.NewPremierAddonID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "premierAddonValue") + +payload := webapps.PremierAddOnPatchResource{ + // ... +} + + +read, err := client.UpdatePremierAddOn(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdatePremierAddOnSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotPremierAddonID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "premierAddonValue") + +payload := webapps.PremierAddOnPatchResource{ + // ... +} + + +read, err := client.UpdatePremierAddOnSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateRelayServiceConnection` + +```go +ctx := context.TODO() +id := webapps.NewHybridConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "hybridConnectionValue") + +payload := webapps.RelayServiceConnectionEntity{ + // ... +} + + +read, err := client.UpdateRelayServiceConnection(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateRelayServiceConnectionSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotHybridConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "hybridConnectionValue") + +payload := webapps.RelayServiceConnectionEntity{ + // ... +} + + +read, err := client.UpdateRelayServiceConnectionSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateScmAllowed` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.CsmPublishingCredentialsPoliciesEntity{ + // ... +} + + +read, err := client.UpdateScmAllowed(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateScmAllowedSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.CsmPublishingCredentialsPoliciesEntity{ + // ... +} + + +read, err := client.UpdateScmAllowedSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateSitePushSettings` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.PushSettings{ + // ... +} + + +read, err := client.UpdateSitePushSettings(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateSitePushSettingsSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.PushSettings{ + // ... +} + + +read, err := client.UpdateSitePushSettingsSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.SitePatchResource{ + // ... +} + + +read, err := client.UpdateSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateSlotConfigurationNames` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.SlotConfigNamesResource{ + // ... +} + + +read, err := client.UpdateSlotConfigurationNames(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateSourceControl` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.SiteSourceControl{ + // ... +} + + +read, err := client.UpdateSourceControl(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateSourceControlSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.SiteSourceControl{ + // ... +} + + +read, err := client.UpdateSourceControlSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheck` + +```go +ctx := context.TODO() +id := commonids.NewAppServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue") + +payload := webapps.SwiftVirtualNetwork{ + // ... +} + + +read, err := client.UpdateSwiftVirtualNetworkConnectionWithCheck(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheckSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue") + +payload := webapps.SwiftVirtualNetwork{ + // ... +} + + +read, err := client.UpdateSwiftVirtualNetworkConnectionWithCheckSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateVnetConnection` + +```go +ctx := context.TODO() +id := webapps.NewVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "virtualNetworkConnectionValue") + +payload := webapps.VnetInfoResource{ + // ... +} + + +read, err := client.UpdateVnetConnection(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateVnetConnectionGateway` + +```go +ctx := context.TODO() +id := webapps.NewGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "virtualNetworkConnectionValue", "gatewayValue") + +payload := webapps.VnetGateway{ + // ... +} + + +read, err := client.UpdateVnetConnectionGateway(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateVnetConnectionGatewaySlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotVirtualNetworkConnectionGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "virtualNetworkConnectionValue", "gatewayValue") + +payload := webapps.VnetGateway{ + // ... +} + + +read, err := client.UpdateVnetConnectionGatewaySlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebAppsClient.UpdateVnetConnectionSlot` + +```go +ctx := context.TODO() +id := webapps.NewSlotVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "virtualNetworkConnectionValue") + +payload := webapps.VnetInfoResource{ + // ... +} + + +read, err := client.UpdateVnetConnectionSlot(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/constants.go new file mode 100644 index 0000000000000..9ee99a0a35e29 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/constants.go @@ -0,0 +1,2725 @@ +package webapps + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AuthType string + +const ( + AuthTypeAnonymous AuthType = "Anonymous" + AuthTypeSystemIdentity AuthType = "SystemIdentity" + AuthTypeUserAssigned AuthType = "UserAssigned" + AuthTypeUserCredentials AuthType = "UserCredentials" +) + +func PossibleValuesForAuthType() []string { + return []string{ + string(AuthTypeAnonymous), + string(AuthTypeSystemIdentity), + string(AuthTypeUserAssigned), + string(AuthTypeUserCredentials), + } +} + +func (s *AuthType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAuthType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAuthType(input string) (*AuthType, error) { + vals := map[string]AuthType{ + "anonymous": AuthTypeAnonymous, + "systemidentity": AuthTypeSystemIdentity, + "userassigned": AuthTypeUserAssigned, + "usercredentials": AuthTypeUserCredentials, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AuthType(input) + return &out, nil +} + +type AuthenticationType string + +const ( + AuthenticationTypeStorageAccountConnectionString AuthenticationType = "StorageAccountConnectionString" + AuthenticationTypeSystemAssignedIdentity AuthenticationType = "SystemAssignedIdentity" + AuthenticationTypeUserAssignedIdentity AuthenticationType = "UserAssignedIdentity" +) + +func PossibleValuesForAuthenticationType() []string { + return []string{ + string(AuthenticationTypeStorageAccountConnectionString), + string(AuthenticationTypeSystemAssignedIdentity), + string(AuthenticationTypeUserAssignedIdentity), + } +} + +func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAuthenticationType(input string) (*AuthenticationType, error) { + vals := map[string]AuthenticationType{ + "storageaccountconnectionstring": AuthenticationTypeStorageAccountConnectionString, + "systemassignedidentity": AuthenticationTypeSystemAssignedIdentity, + "userassignedidentity": AuthenticationTypeUserAssignedIdentity, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AuthenticationType(input) + return &out, nil +} + +type AutoHealActionType string + +const ( + AutoHealActionTypeCustomAction AutoHealActionType = "CustomAction" + AutoHealActionTypeLogEvent AutoHealActionType = "LogEvent" + AutoHealActionTypeRecycle AutoHealActionType = "Recycle" +) + +func PossibleValuesForAutoHealActionType() []string { + return []string{ + string(AutoHealActionTypeCustomAction), + string(AutoHealActionTypeLogEvent), + string(AutoHealActionTypeRecycle), + } +} + +func (s *AutoHealActionType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAutoHealActionType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAutoHealActionType(input string) (*AutoHealActionType, error) { + vals := map[string]AutoHealActionType{ + "customaction": AutoHealActionTypeCustomAction, + "logevent": AutoHealActionTypeLogEvent, + "recycle": AutoHealActionTypeRecycle, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AutoHealActionType(input) + return &out, nil +} + +type AzureResourceType string + +const ( + AzureResourceTypeTrafficManager AzureResourceType = "TrafficManager" + AzureResourceTypeWebsite AzureResourceType = "Website" +) + +func PossibleValuesForAzureResourceType() []string { + return []string{ + string(AzureResourceTypeTrafficManager), + string(AzureResourceTypeWebsite), + } +} + +func (s *AzureResourceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAzureResourceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAzureResourceType(input string) (*AzureResourceType, error) { + vals := map[string]AzureResourceType{ + "trafficmanager": AzureResourceTypeTrafficManager, + "website": AzureResourceTypeWebsite, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AzureResourceType(input) + return &out, nil +} + +type AzureStorageProtocol string + +const ( + AzureStorageProtocolHTTP AzureStorageProtocol = "Http" + AzureStorageProtocolNfs AzureStorageProtocol = "Nfs" + AzureStorageProtocolSmb AzureStorageProtocol = "Smb" +) + +func PossibleValuesForAzureStorageProtocol() []string { + return []string{ + string(AzureStorageProtocolHTTP), + string(AzureStorageProtocolNfs), + string(AzureStorageProtocolSmb), + } +} + +func (s *AzureStorageProtocol) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAzureStorageProtocol(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAzureStorageProtocol(input string) (*AzureStorageProtocol, error) { + vals := map[string]AzureStorageProtocol{ + "http": AzureStorageProtocolHTTP, + "nfs": AzureStorageProtocolNfs, + "smb": AzureStorageProtocolSmb, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AzureStorageProtocol(input) + return &out, nil +} + +type AzureStorageState string + +const ( + AzureStorageStateInvalidCredentials AzureStorageState = "InvalidCredentials" + AzureStorageStateInvalidShare AzureStorageState = "InvalidShare" + AzureStorageStateNotValidated AzureStorageState = "NotValidated" + AzureStorageStateOk AzureStorageState = "Ok" +) + +func PossibleValuesForAzureStorageState() []string { + return []string{ + string(AzureStorageStateInvalidCredentials), + string(AzureStorageStateInvalidShare), + string(AzureStorageStateNotValidated), + string(AzureStorageStateOk), + } +} + +func (s *AzureStorageState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAzureStorageState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAzureStorageState(input string) (*AzureStorageState, error) { + vals := map[string]AzureStorageState{ + "invalidcredentials": AzureStorageStateInvalidCredentials, + "invalidshare": AzureStorageStateInvalidShare, + "notvalidated": AzureStorageStateNotValidated, + "ok": AzureStorageStateOk, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AzureStorageState(input) + return &out, nil +} + +type AzureStorageType string + +const ( + AzureStorageTypeAzureBlob AzureStorageType = "AzureBlob" + AzureStorageTypeAzureFiles AzureStorageType = "AzureFiles" +) + +func PossibleValuesForAzureStorageType() []string { + return []string{ + string(AzureStorageTypeAzureBlob), + string(AzureStorageTypeAzureFiles), + } +} + +func (s *AzureStorageType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAzureStorageType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAzureStorageType(input string) (*AzureStorageType, error) { + vals := map[string]AzureStorageType{ + "azureblob": AzureStorageTypeAzureBlob, + "azurefiles": AzureStorageTypeAzureFiles, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AzureStorageType(input) + return &out, nil +} + +type BackupItemStatus string + +const ( + BackupItemStatusCreated BackupItemStatus = "Created" + BackupItemStatusDeleteFailed BackupItemStatus = "DeleteFailed" + BackupItemStatusDeleteInProgress BackupItemStatus = "DeleteInProgress" + BackupItemStatusDeleted BackupItemStatus = "Deleted" + BackupItemStatusFailed BackupItemStatus = "Failed" + BackupItemStatusInProgress BackupItemStatus = "InProgress" + BackupItemStatusPartiallySucceeded BackupItemStatus = "PartiallySucceeded" + BackupItemStatusSkipped BackupItemStatus = "Skipped" + BackupItemStatusSucceeded BackupItemStatus = "Succeeded" + BackupItemStatusTimedOut BackupItemStatus = "TimedOut" +) + +func PossibleValuesForBackupItemStatus() []string { + return []string{ + string(BackupItemStatusCreated), + string(BackupItemStatusDeleteFailed), + string(BackupItemStatusDeleteInProgress), + string(BackupItemStatusDeleted), + string(BackupItemStatusFailed), + string(BackupItemStatusInProgress), + string(BackupItemStatusPartiallySucceeded), + string(BackupItemStatusSkipped), + string(BackupItemStatusSucceeded), + string(BackupItemStatusTimedOut), + } +} + +func (s *BackupItemStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseBackupItemStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseBackupItemStatus(input string) (*BackupItemStatus, error) { + vals := map[string]BackupItemStatus{ + "created": BackupItemStatusCreated, + "deletefailed": BackupItemStatusDeleteFailed, + "deleteinprogress": BackupItemStatusDeleteInProgress, + "deleted": BackupItemStatusDeleted, + "failed": BackupItemStatusFailed, + "inprogress": BackupItemStatusInProgress, + "partiallysucceeded": BackupItemStatusPartiallySucceeded, + "skipped": BackupItemStatusSkipped, + "succeeded": BackupItemStatusSucceeded, + "timedout": BackupItemStatusTimedOut, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := BackupItemStatus(input) + return &out, nil +} + +type BackupRestoreOperationType string + +const ( + BackupRestoreOperationTypeClone BackupRestoreOperationType = "Clone" + BackupRestoreOperationTypeCloudFS BackupRestoreOperationType = "CloudFS" + BackupRestoreOperationTypeDefault BackupRestoreOperationType = "Default" + BackupRestoreOperationTypeRelocation BackupRestoreOperationType = "Relocation" + BackupRestoreOperationTypeSnapshot BackupRestoreOperationType = "Snapshot" +) + +func PossibleValuesForBackupRestoreOperationType() []string { + return []string{ + string(BackupRestoreOperationTypeClone), + string(BackupRestoreOperationTypeCloudFS), + string(BackupRestoreOperationTypeDefault), + string(BackupRestoreOperationTypeRelocation), + string(BackupRestoreOperationTypeSnapshot), + } +} + +func (s *BackupRestoreOperationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseBackupRestoreOperationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseBackupRestoreOperationType(input string) (*BackupRestoreOperationType, error) { + vals := map[string]BackupRestoreOperationType{ + "clone": BackupRestoreOperationTypeClone, + "cloudfs": BackupRestoreOperationTypeCloudFS, + "default": BackupRestoreOperationTypeDefault, + "relocation": BackupRestoreOperationTypeRelocation, + "snapshot": BackupRestoreOperationTypeSnapshot, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := BackupRestoreOperationType(input) + return &out, nil +} + +type BuiltInAuthenticationProvider string + +const ( + BuiltInAuthenticationProviderAzureActiveDirectory BuiltInAuthenticationProvider = "AzureActiveDirectory" + BuiltInAuthenticationProviderFacebook BuiltInAuthenticationProvider = "Facebook" + BuiltInAuthenticationProviderGithub BuiltInAuthenticationProvider = "Github" + BuiltInAuthenticationProviderGoogle BuiltInAuthenticationProvider = "Google" + BuiltInAuthenticationProviderMicrosoftAccount BuiltInAuthenticationProvider = "MicrosoftAccount" + BuiltInAuthenticationProviderTwitter BuiltInAuthenticationProvider = "Twitter" +) + +func PossibleValuesForBuiltInAuthenticationProvider() []string { + return []string{ + string(BuiltInAuthenticationProviderAzureActiveDirectory), + string(BuiltInAuthenticationProviderFacebook), + string(BuiltInAuthenticationProviderGithub), + string(BuiltInAuthenticationProviderGoogle), + string(BuiltInAuthenticationProviderMicrosoftAccount), + string(BuiltInAuthenticationProviderTwitter), + } +} + +func (s *BuiltInAuthenticationProvider) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseBuiltInAuthenticationProvider(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseBuiltInAuthenticationProvider(input string) (*BuiltInAuthenticationProvider, error) { + vals := map[string]BuiltInAuthenticationProvider{ + "azureactivedirectory": BuiltInAuthenticationProviderAzureActiveDirectory, + "facebook": BuiltInAuthenticationProviderFacebook, + "github": BuiltInAuthenticationProviderGithub, + "google": BuiltInAuthenticationProviderGoogle, + "microsoftaccount": BuiltInAuthenticationProviderMicrosoftAccount, + "twitter": BuiltInAuthenticationProviderTwitter, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := BuiltInAuthenticationProvider(input) + return &out, nil +} + +type ClientCertMode string + +const ( + ClientCertModeOptional ClientCertMode = "Optional" + ClientCertModeOptionalInteractiveUser ClientCertMode = "OptionalInteractiveUser" + ClientCertModeRequired ClientCertMode = "Required" +) + +func PossibleValuesForClientCertMode() []string { + return []string{ + string(ClientCertModeOptional), + string(ClientCertModeOptionalInteractiveUser), + string(ClientCertModeRequired), + } +} + +func (s *ClientCertMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseClientCertMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseClientCertMode(input string) (*ClientCertMode, error) { + vals := map[string]ClientCertMode{ + "optional": ClientCertModeOptional, + "optionalinteractiveuser": ClientCertModeOptionalInteractiveUser, + "required": ClientCertModeRequired, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ClientCertMode(input) + return &out, nil +} + +type ClientCredentialMethod string + +const ( + ClientCredentialMethodClientSecretPost ClientCredentialMethod = "ClientSecretPost" +) + +func PossibleValuesForClientCredentialMethod() []string { + return []string{ + string(ClientCredentialMethodClientSecretPost), + } +} + +func (s *ClientCredentialMethod) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseClientCredentialMethod(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseClientCredentialMethod(input string) (*ClientCredentialMethod, error) { + vals := map[string]ClientCredentialMethod{ + "clientsecretpost": ClientCredentialMethodClientSecretPost, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ClientCredentialMethod(input) + return &out, nil +} + +type CloneAbilityResult string + +const ( + CloneAbilityResultCloneable CloneAbilityResult = "Cloneable" + CloneAbilityResultNotCloneable CloneAbilityResult = "NotCloneable" + CloneAbilityResultPartiallyCloneable CloneAbilityResult = "PartiallyCloneable" +) + +func PossibleValuesForCloneAbilityResult() []string { + return []string{ + string(CloneAbilityResultCloneable), + string(CloneAbilityResultNotCloneable), + string(CloneAbilityResultPartiallyCloneable), + } +} + +func (s *CloneAbilityResult) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCloneAbilityResult(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCloneAbilityResult(input string) (*CloneAbilityResult, error) { + vals := map[string]CloneAbilityResult{ + "cloneable": CloneAbilityResultCloneable, + "notcloneable": CloneAbilityResultNotCloneable, + "partiallycloneable": CloneAbilityResultPartiallyCloneable, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CloneAbilityResult(input) + return &out, nil +} + +type ConfigReferenceSource string + +const ( + ConfigReferenceSourceKeyVault ConfigReferenceSource = "KeyVault" +) + +func PossibleValuesForConfigReferenceSource() []string { + return []string{ + string(ConfigReferenceSourceKeyVault), + } +} + +func (s *ConfigReferenceSource) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseConfigReferenceSource(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseConfigReferenceSource(input string) (*ConfigReferenceSource, error) { + vals := map[string]ConfigReferenceSource{ + "keyvault": ConfigReferenceSourceKeyVault, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ConfigReferenceSource(input) + return &out, nil +} + +type ConnectionStringType string + +const ( + ConnectionStringTypeApiHub ConnectionStringType = "ApiHub" + ConnectionStringTypeCustom ConnectionStringType = "Custom" + ConnectionStringTypeDocDb ConnectionStringType = "DocDb" + ConnectionStringTypeEventHub ConnectionStringType = "EventHub" + ConnectionStringTypeMySql ConnectionStringType = "MySql" + ConnectionStringTypeNotificationHub ConnectionStringType = "NotificationHub" + ConnectionStringTypePostgreSQL ConnectionStringType = "PostgreSQL" + ConnectionStringTypeRedisCache ConnectionStringType = "RedisCache" + ConnectionStringTypeSQLAzure ConnectionStringType = "SQLAzure" + ConnectionStringTypeSQLServer ConnectionStringType = "SQLServer" + ConnectionStringTypeServiceBus ConnectionStringType = "ServiceBus" +) + +func PossibleValuesForConnectionStringType() []string { + return []string{ + string(ConnectionStringTypeApiHub), + string(ConnectionStringTypeCustom), + string(ConnectionStringTypeDocDb), + string(ConnectionStringTypeEventHub), + string(ConnectionStringTypeMySql), + string(ConnectionStringTypeNotificationHub), + string(ConnectionStringTypePostgreSQL), + string(ConnectionStringTypeRedisCache), + string(ConnectionStringTypeSQLAzure), + string(ConnectionStringTypeSQLServer), + string(ConnectionStringTypeServiceBus), + } +} + +func (s *ConnectionStringType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseConnectionStringType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseConnectionStringType(input string) (*ConnectionStringType, error) { + vals := map[string]ConnectionStringType{ + "apihub": ConnectionStringTypeApiHub, + "custom": ConnectionStringTypeCustom, + "docdb": ConnectionStringTypeDocDb, + "eventhub": ConnectionStringTypeEventHub, + "mysql": ConnectionStringTypeMySql, + "notificationhub": ConnectionStringTypeNotificationHub, + "postgresql": ConnectionStringTypePostgreSQL, + "rediscache": ConnectionStringTypeRedisCache, + "sqlazure": ConnectionStringTypeSQLAzure, + "sqlserver": ConnectionStringTypeSQLServer, + "servicebus": ConnectionStringTypeServiceBus, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ConnectionStringType(input) + return &out, nil +} + +type ContinuousWebJobStatus string + +const ( + ContinuousWebJobStatusInitializing ContinuousWebJobStatus = "Initializing" + ContinuousWebJobStatusPendingRestart ContinuousWebJobStatus = "PendingRestart" + ContinuousWebJobStatusRunning ContinuousWebJobStatus = "Running" + ContinuousWebJobStatusStarting ContinuousWebJobStatus = "Starting" + ContinuousWebJobStatusStopped ContinuousWebJobStatus = "Stopped" +) + +func PossibleValuesForContinuousWebJobStatus() []string { + return []string{ + string(ContinuousWebJobStatusInitializing), + string(ContinuousWebJobStatusPendingRestart), + string(ContinuousWebJobStatusRunning), + string(ContinuousWebJobStatusStarting), + string(ContinuousWebJobStatusStopped), + } +} + +func (s *ContinuousWebJobStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseContinuousWebJobStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseContinuousWebJobStatus(input string) (*ContinuousWebJobStatus, error) { + vals := map[string]ContinuousWebJobStatus{ + "initializing": ContinuousWebJobStatusInitializing, + "pendingrestart": ContinuousWebJobStatusPendingRestart, + "running": ContinuousWebJobStatusRunning, + "starting": ContinuousWebJobStatusStarting, + "stopped": ContinuousWebJobStatusStopped, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ContinuousWebJobStatus(input) + return &out, nil +} + +type CookieExpirationConvention string + +const ( + CookieExpirationConventionFixedTime CookieExpirationConvention = "FixedTime" + CookieExpirationConventionIdentityProviderDerived CookieExpirationConvention = "IdentityProviderDerived" +) + +func PossibleValuesForCookieExpirationConvention() []string { + return []string{ + string(CookieExpirationConventionFixedTime), + string(CookieExpirationConventionIdentityProviderDerived), + } +} + +func (s *CookieExpirationConvention) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCookieExpirationConvention(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCookieExpirationConvention(input string) (*CookieExpirationConvention, error) { + vals := map[string]CookieExpirationConvention{ + "fixedtime": CookieExpirationConventionFixedTime, + "identityproviderderived": CookieExpirationConventionIdentityProviderDerived, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CookieExpirationConvention(input) + return &out, nil +} + +type CustomHostNameDnsRecordType string + +const ( + CustomHostNameDnsRecordTypeA CustomHostNameDnsRecordType = "A" + CustomHostNameDnsRecordTypeCName CustomHostNameDnsRecordType = "CName" +) + +func PossibleValuesForCustomHostNameDnsRecordType() []string { + return []string{ + string(CustomHostNameDnsRecordTypeA), + string(CustomHostNameDnsRecordTypeCName), + } +} + +func (s *CustomHostNameDnsRecordType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCustomHostNameDnsRecordType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCustomHostNameDnsRecordType(input string) (*CustomHostNameDnsRecordType, error) { + vals := map[string]CustomHostNameDnsRecordType{ + "a": CustomHostNameDnsRecordTypeA, + "cname": CustomHostNameDnsRecordTypeCName, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CustomHostNameDnsRecordType(input) + return &out, nil +} + +type DaprLogLevel string + +const ( + DaprLogLevelDebug DaprLogLevel = "debug" + DaprLogLevelError DaprLogLevel = "error" + DaprLogLevelInfo DaprLogLevel = "info" + DaprLogLevelWarn DaprLogLevel = "warn" +) + +func PossibleValuesForDaprLogLevel() []string { + return []string{ + string(DaprLogLevelDebug), + string(DaprLogLevelError), + string(DaprLogLevelInfo), + string(DaprLogLevelWarn), + } +} + +func (s *DaprLogLevel) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDaprLogLevel(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDaprLogLevel(input string) (*DaprLogLevel, error) { + vals := map[string]DaprLogLevel{ + "debug": DaprLogLevelDebug, + "error": DaprLogLevelError, + "info": DaprLogLevelInfo, + "warn": DaprLogLevelWarn, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DaprLogLevel(input) + return &out, nil +} + +type DatabaseType string + +const ( + DatabaseTypeLocalMySql DatabaseType = "LocalMySql" + DatabaseTypeMySql DatabaseType = "MySql" + DatabaseTypePostgreSql DatabaseType = "PostgreSql" + DatabaseTypeSqlAzure DatabaseType = "SqlAzure" +) + +func PossibleValuesForDatabaseType() []string { + return []string{ + string(DatabaseTypeLocalMySql), + string(DatabaseTypeMySql), + string(DatabaseTypePostgreSql), + string(DatabaseTypeSqlAzure), + } +} + +func (s *DatabaseType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDatabaseType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDatabaseType(input string) (*DatabaseType, error) { + vals := map[string]DatabaseType{ + "localmysql": DatabaseTypeLocalMySql, + "mysql": DatabaseTypeMySql, + "postgresql": DatabaseTypePostgreSql, + "sqlazure": DatabaseTypeSqlAzure, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DatabaseType(input) + return &out, nil +} + +type DefaultAction string + +const ( + DefaultActionAllow DefaultAction = "Allow" + DefaultActionDeny DefaultAction = "Deny" +) + +func PossibleValuesForDefaultAction() []string { + return []string{ + string(DefaultActionAllow), + string(DefaultActionDeny), + } +} + +func (s *DefaultAction) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDefaultAction(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDefaultAction(input string) (*DefaultAction, error) { + vals := map[string]DefaultAction{ + "allow": DefaultActionAllow, + "deny": DefaultActionDeny, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DefaultAction(input) + return &out, nil +} + +type DeploymentBuildStatus string + +const ( + DeploymentBuildStatusBuildAborted DeploymentBuildStatus = "BuildAborted" + DeploymentBuildStatusBuildFailed DeploymentBuildStatus = "BuildFailed" + DeploymentBuildStatusBuildInProgress DeploymentBuildStatus = "BuildInProgress" + DeploymentBuildStatusBuildPending DeploymentBuildStatus = "BuildPending" + DeploymentBuildStatusBuildRequestReceived DeploymentBuildStatus = "BuildRequestReceived" + DeploymentBuildStatusBuildSuccessful DeploymentBuildStatus = "BuildSuccessful" + DeploymentBuildStatusPostBuildRestartRequired DeploymentBuildStatus = "PostBuildRestartRequired" + DeploymentBuildStatusRuntimeFailed DeploymentBuildStatus = "RuntimeFailed" + DeploymentBuildStatusRuntimeStarting DeploymentBuildStatus = "RuntimeStarting" + DeploymentBuildStatusRuntimeSuccessful DeploymentBuildStatus = "RuntimeSuccessful" + DeploymentBuildStatusStartPolling DeploymentBuildStatus = "StartPolling" + DeploymentBuildStatusStartPollingWithRestart DeploymentBuildStatus = "StartPollingWithRestart" + DeploymentBuildStatusTimedOut DeploymentBuildStatus = "TimedOut" +) + +func PossibleValuesForDeploymentBuildStatus() []string { + return []string{ + string(DeploymentBuildStatusBuildAborted), + string(DeploymentBuildStatusBuildFailed), + string(DeploymentBuildStatusBuildInProgress), + string(DeploymentBuildStatusBuildPending), + string(DeploymentBuildStatusBuildRequestReceived), + string(DeploymentBuildStatusBuildSuccessful), + string(DeploymentBuildStatusPostBuildRestartRequired), + string(DeploymentBuildStatusRuntimeFailed), + string(DeploymentBuildStatusRuntimeStarting), + string(DeploymentBuildStatusRuntimeSuccessful), + string(DeploymentBuildStatusStartPolling), + string(DeploymentBuildStatusStartPollingWithRestart), + string(DeploymentBuildStatusTimedOut), + } +} + +func (s *DeploymentBuildStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDeploymentBuildStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDeploymentBuildStatus(input string) (*DeploymentBuildStatus, error) { + vals := map[string]DeploymentBuildStatus{ + "buildaborted": DeploymentBuildStatusBuildAborted, + "buildfailed": DeploymentBuildStatusBuildFailed, + "buildinprogress": DeploymentBuildStatusBuildInProgress, + "buildpending": DeploymentBuildStatusBuildPending, + "buildrequestreceived": DeploymentBuildStatusBuildRequestReceived, + "buildsuccessful": DeploymentBuildStatusBuildSuccessful, + "postbuildrestartrequired": DeploymentBuildStatusPostBuildRestartRequired, + "runtimefailed": DeploymentBuildStatusRuntimeFailed, + "runtimestarting": DeploymentBuildStatusRuntimeStarting, + "runtimesuccessful": DeploymentBuildStatusRuntimeSuccessful, + "startpolling": DeploymentBuildStatusStartPolling, + "startpollingwithrestart": DeploymentBuildStatusStartPollingWithRestart, + "timedout": DeploymentBuildStatusTimedOut, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DeploymentBuildStatus(input) + return &out, nil +} + +type DnsVerificationTestResult string + +const ( + DnsVerificationTestResultFailed DnsVerificationTestResult = "Failed" + DnsVerificationTestResultPassed DnsVerificationTestResult = "Passed" + DnsVerificationTestResultSkipped DnsVerificationTestResult = "Skipped" +) + +func PossibleValuesForDnsVerificationTestResult() []string { + return []string{ + string(DnsVerificationTestResultFailed), + string(DnsVerificationTestResultPassed), + string(DnsVerificationTestResultSkipped), + } +} + +func (s *DnsVerificationTestResult) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDnsVerificationTestResult(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDnsVerificationTestResult(input string) (*DnsVerificationTestResult, error) { + vals := map[string]DnsVerificationTestResult{ + "failed": DnsVerificationTestResultFailed, + "passed": DnsVerificationTestResultPassed, + "skipped": DnsVerificationTestResultSkipped, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DnsVerificationTestResult(input) + return &out, nil +} + +type ForwardProxyConvention string + +const ( + ForwardProxyConventionCustom ForwardProxyConvention = "Custom" + ForwardProxyConventionNoProxy ForwardProxyConvention = "NoProxy" + ForwardProxyConventionStandard ForwardProxyConvention = "Standard" +) + +func PossibleValuesForForwardProxyConvention() []string { + return []string{ + string(ForwardProxyConventionCustom), + string(ForwardProxyConventionNoProxy), + string(ForwardProxyConventionStandard), + } +} + +func (s *ForwardProxyConvention) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseForwardProxyConvention(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseForwardProxyConvention(input string) (*ForwardProxyConvention, error) { + vals := map[string]ForwardProxyConvention{ + "custom": ForwardProxyConventionCustom, + "noproxy": ForwardProxyConventionNoProxy, + "standard": ForwardProxyConventionStandard, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ForwardProxyConvention(input) + return &out, nil +} + +type FrequencyUnit string + +const ( + FrequencyUnitDay FrequencyUnit = "Day" + FrequencyUnitHour FrequencyUnit = "Hour" +) + +func PossibleValuesForFrequencyUnit() []string { + return []string{ + string(FrequencyUnitDay), + string(FrequencyUnitHour), + } +} + +func (s *FrequencyUnit) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseFrequencyUnit(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseFrequencyUnit(input string) (*FrequencyUnit, error) { + vals := map[string]FrequencyUnit{ + "day": FrequencyUnitDay, + "hour": FrequencyUnitHour, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := FrequencyUnit(input) + return &out, nil +} + +type FtpsState string + +const ( + FtpsStateAllAllowed FtpsState = "AllAllowed" + FtpsStateDisabled FtpsState = "Disabled" + FtpsStateFtpsOnly FtpsState = "FtpsOnly" +) + +func PossibleValuesForFtpsState() []string { + return []string{ + string(FtpsStateAllAllowed), + string(FtpsStateDisabled), + string(FtpsStateFtpsOnly), + } +} + +func (s *FtpsState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseFtpsState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseFtpsState(input string) (*FtpsState, error) { + vals := map[string]FtpsState{ + "allallowed": FtpsStateAllAllowed, + "disabled": FtpsStateDisabled, + "ftpsonly": FtpsStateFtpsOnly, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := FtpsState(input) + return &out, nil +} + +type FunctionsDeploymentStorageType string + +const ( + FunctionsDeploymentStorageTypeBlobContainer FunctionsDeploymentStorageType = "blobContainer" +) + +func PossibleValuesForFunctionsDeploymentStorageType() []string { + return []string{ + string(FunctionsDeploymentStorageTypeBlobContainer), + } +} + +func (s *FunctionsDeploymentStorageType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseFunctionsDeploymentStorageType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseFunctionsDeploymentStorageType(input string) (*FunctionsDeploymentStorageType, error) { + vals := map[string]FunctionsDeploymentStorageType{ + "blobcontainer": FunctionsDeploymentStorageTypeBlobContainer, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := FunctionsDeploymentStorageType(input) + return &out, nil +} + +type HostNameType string + +const ( + HostNameTypeManaged HostNameType = "Managed" + HostNameTypeVerified HostNameType = "Verified" +) + +func PossibleValuesForHostNameType() []string { + return []string{ + string(HostNameTypeManaged), + string(HostNameTypeVerified), + } +} + +func (s *HostNameType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHostNameType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHostNameType(input string) (*HostNameType, error) { + vals := map[string]HostNameType{ + "managed": HostNameTypeManaged, + "verified": HostNameTypeVerified, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HostNameType(input) + return &out, nil +} + +type HostType string + +const ( + HostTypeRepository HostType = "Repository" + HostTypeStandard HostType = "Standard" +) + +func PossibleValuesForHostType() []string { + return []string{ + string(HostTypeRepository), + string(HostTypeStandard), + } +} + +func (s *HostType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHostType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHostType(input string) (*HostType, error) { + vals := map[string]HostType{ + "repository": HostTypeRepository, + "standard": HostTypeStandard, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HostType(input) + return &out, nil +} + +type IPFilterTag string + +const ( + IPFilterTagDefault IPFilterTag = "Default" + IPFilterTagServiceTag IPFilterTag = "ServiceTag" + IPFilterTagXffProxy IPFilterTag = "XffProxy" +) + +func PossibleValuesForIPFilterTag() []string { + return []string{ + string(IPFilterTagDefault), + string(IPFilterTagServiceTag), + string(IPFilterTagXffProxy), + } +} + +func (s *IPFilterTag) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIPFilterTag(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIPFilterTag(input string) (*IPFilterTag, error) { + vals := map[string]IPFilterTag{ + "default": IPFilterTagDefault, + "servicetag": IPFilterTagServiceTag, + "xffproxy": IPFilterTagXffProxy, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IPFilterTag(input) + return &out, nil +} + +type LogLevel string + +const ( + LogLevelError LogLevel = "Error" + LogLevelInformation LogLevel = "Information" + LogLevelOff LogLevel = "Off" + LogLevelVerbose LogLevel = "Verbose" + LogLevelWarning LogLevel = "Warning" +) + +func PossibleValuesForLogLevel() []string { + return []string{ + string(LogLevelError), + string(LogLevelInformation), + string(LogLevelOff), + string(LogLevelVerbose), + string(LogLevelWarning), + } +} + +func (s *LogLevel) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLogLevel(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLogLevel(input string) (*LogLevel, error) { + vals := map[string]LogLevel{ + "error": LogLevelError, + "information": LogLevelInformation, + "off": LogLevelOff, + "verbose": LogLevelVerbose, + "warning": LogLevelWarning, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LogLevel(input) + return &out, nil +} + +type MSDeployLogEntryType string + +const ( + MSDeployLogEntryTypeError MSDeployLogEntryType = "Error" + MSDeployLogEntryTypeMessage MSDeployLogEntryType = "Message" + MSDeployLogEntryTypeWarning MSDeployLogEntryType = "Warning" +) + +func PossibleValuesForMSDeployLogEntryType() []string { + return []string{ + string(MSDeployLogEntryTypeError), + string(MSDeployLogEntryTypeMessage), + string(MSDeployLogEntryTypeWarning), + } +} + +func (s *MSDeployLogEntryType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMSDeployLogEntryType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMSDeployLogEntryType(input string) (*MSDeployLogEntryType, error) { + vals := map[string]MSDeployLogEntryType{ + "error": MSDeployLogEntryTypeError, + "message": MSDeployLogEntryTypeMessage, + "warning": MSDeployLogEntryTypeWarning, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MSDeployLogEntryType(input) + return &out, nil +} + +type MSDeployProvisioningState string + +const ( + MSDeployProvisioningStateAccepted MSDeployProvisioningState = "accepted" + MSDeployProvisioningStateCanceled MSDeployProvisioningState = "canceled" + MSDeployProvisioningStateFailed MSDeployProvisioningState = "failed" + MSDeployProvisioningStateRunning MSDeployProvisioningState = "running" + MSDeployProvisioningStateSucceeded MSDeployProvisioningState = "succeeded" +) + +func PossibleValuesForMSDeployProvisioningState() []string { + return []string{ + string(MSDeployProvisioningStateAccepted), + string(MSDeployProvisioningStateCanceled), + string(MSDeployProvisioningStateFailed), + string(MSDeployProvisioningStateRunning), + string(MSDeployProvisioningStateSucceeded), + } +} + +func (s *MSDeployProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMSDeployProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMSDeployProvisioningState(input string) (*MSDeployProvisioningState, error) { + vals := map[string]MSDeployProvisioningState{ + "accepted": MSDeployProvisioningStateAccepted, + "canceled": MSDeployProvisioningStateCanceled, + "failed": MSDeployProvisioningStateFailed, + "running": MSDeployProvisioningStateRunning, + "succeeded": MSDeployProvisioningStateSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MSDeployProvisioningState(input) + return &out, nil +} + +type ManagedPipelineMode string + +const ( + ManagedPipelineModeClassic ManagedPipelineMode = "Classic" + ManagedPipelineModeIntegrated ManagedPipelineMode = "Integrated" +) + +func PossibleValuesForManagedPipelineMode() []string { + return []string{ + string(ManagedPipelineModeClassic), + string(ManagedPipelineModeIntegrated), + } +} + +func (s *ManagedPipelineMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseManagedPipelineMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseManagedPipelineMode(input string) (*ManagedPipelineMode, error) { + vals := map[string]ManagedPipelineMode{ + "classic": ManagedPipelineModeClassic, + "integrated": ManagedPipelineModeIntegrated, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ManagedPipelineMode(input) + return &out, nil +} + +type MySqlMigrationType string + +const ( + MySqlMigrationTypeLocalToRemote MySqlMigrationType = "LocalToRemote" + MySqlMigrationTypeRemoteToLocal MySqlMigrationType = "RemoteToLocal" +) + +func PossibleValuesForMySqlMigrationType() []string { + return []string{ + string(MySqlMigrationTypeLocalToRemote), + string(MySqlMigrationTypeRemoteToLocal), + } +} + +func (s *MySqlMigrationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMySqlMigrationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMySqlMigrationType(input string) (*MySqlMigrationType, error) { + vals := map[string]MySqlMigrationType{ + "localtoremote": MySqlMigrationTypeLocalToRemote, + "remotetolocal": MySqlMigrationTypeRemoteToLocal, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MySqlMigrationType(input) + return &out, nil +} + +type OperationStatus string + +const ( + OperationStatusCreated OperationStatus = "Created" + OperationStatusFailed OperationStatus = "Failed" + OperationStatusInProgress OperationStatus = "InProgress" + OperationStatusSucceeded OperationStatus = "Succeeded" + OperationStatusTimedOut OperationStatus = "TimedOut" +) + +func PossibleValuesForOperationStatus() []string { + return []string{ + string(OperationStatusCreated), + string(OperationStatusFailed), + string(OperationStatusInProgress), + string(OperationStatusSucceeded), + string(OperationStatusTimedOut), + } +} + +func (s *OperationStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOperationStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOperationStatus(input string) (*OperationStatus, error) { + vals := map[string]OperationStatus{ + "created": OperationStatusCreated, + "failed": OperationStatusFailed, + "inprogress": OperationStatusInProgress, + "succeeded": OperationStatusSucceeded, + "timedout": OperationStatusTimedOut, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OperationStatus(input) + return &out, nil +} + +type PublicCertificateLocation string + +const ( + PublicCertificateLocationCurrentUserMy PublicCertificateLocation = "CurrentUserMy" + PublicCertificateLocationLocalMachineMy PublicCertificateLocation = "LocalMachineMy" + PublicCertificateLocationUnknown PublicCertificateLocation = "Unknown" +) + +func PossibleValuesForPublicCertificateLocation() []string { + return []string{ + string(PublicCertificateLocationCurrentUserMy), + string(PublicCertificateLocationLocalMachineMy), + string(PublicCertificateLocationUnknown), + } +} + +func (s *PublicCertificateLocation) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePublicCertificateLocation(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePublicCertificateLocation(input string) (*PublicCertificateLocation, error) { + vals := map[string]PublicCertificateLocation{ + "currentusermy": PublicCertificateLocationCurrentUserMy, + "localmachinemy": PublicCertificateLocationLocalMachineMy, + "unknown": PublicCertificateLocationUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PublicCertificateLocation(input) + return &out, nil +} + +type PublishingProfileFormat string + +const ( + PublishingProfileFormatFileZillaThree PublishingProfileFormat = "FileZilla3" + PublishingProfileFormatFtp PublishingProfileFormat = "Ftp" + PublishingProfileFormatWebDeploy PublishingProfileFormat = "WebDeploy" +) + +func PossibleValuesForPublishingProfileFormat() []string { + return []string{ + string(PublishingProfileFormatFileZillaThree), + string(PublishingProfileFormatFtp), + string(PublishingProfileFormatWebDeploy), + } +} + +func (s *PublishingProfileFormat) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePublishingProfileFormat(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePublishingProfileFormat(input string) (*PublishingProfileFormat, error) { + vals := map[string]PublishingProfileFormat{ + "filezilla3": PublishingProfileFormatFileZillaThree, + "ftp": PublishingProfileFormatFtp, + "webdeploy": PublishingProfileFormatWebDeploy, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PublishingProfileFormat(input) + return &out, nil +} + +type RedundancyMode string + +const ( + RedundancyModeActiveActive RedundancyMode = "ActiveActive" + RedundancyModeFailover RedundancyMode = "Failover" + RedundancyModeGeoRedundant RedundancyMode = "GeoRedundant" + RedundancyModeManual RedundancyMode = "Manual" + RedundancyModeNone RedundancyMode = "None" +) + +func PossibleValuesForRedundancyMode() []string { + return []string{ + string(RedundancyModeActiveActive), + string(RedundancyModeFailover), + string(RedundancyModeGeoRedundant), + string(RedundancyModeManual), + string(RedundancyModeNone), + } +} + +func (s *RedundancyMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRedundancyMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRedundancyMode(input string) (*RedundancyMode, error) { + vals := map[string]RedundancyMode{ + "activeactive": RedundancyModeActiveActive, + "failover": RedundancyModeFailover, + "georedundant": RedundancyModeGeoRedundant, + "manual": RedundancyModeManual, + "none": RedundancyModeNone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RedundancyMode(input) + return &out, nil +} + +type ResolveStatus string + +const ( + ResolveStatusAccessToKeyVaultDenied ResolveStatus = "AccessToKeyVaultDenied" + ResolveStatusFetchTimedOut ResolveStatus = "FetchTimedOut" + ResolveStatusInitialized ResolveStatus = "Initialized" + ResolveStatusInvalidSyntax ResolveStatus = "InvalidSyntax" + ResolveStatusMSINotEnabled ResolveStatus = "MSINotEnabled" + ResolveStatusOtherReasons ResolveStatus = "OtherReasons" + ResolveStatusResolved ResolveStatus = "Resolved" + ResolveStatusSecretNotFound ResolveStatus = "SecretNotFound" + ResolveStatusSecretVersionNotFound ResolveStatus = "SecretVersionNotFound" + ResolveStatusUnauthorizedClient ResolveStatus = "UnauthorizedClient" + ResolveStatusVaultNotFound ResolveStatus = "VaultNotFound" +) + +func PossibleValuesForResolveStatus() []string { + return []string{ + string(ResolveStatusAccessToKeyVaultDenied), + string(ResolveStatusFetchTimedOut), + string(ResolveStatusInitialized), + string(ResolveStatusInvalidSyntax), + string(ResolveStatusMSINotEnabled), + string(ResolveStatusOtherReasons), + string(ResolveStatusResolved), + string(ResolveStatusSecretNotFound), + string(ResolveStatusSecretVersionNotFound), + string(ResolveStatusUnauthorizedClient), + string(ResolveStatusVaultNotFound), + } +} + +func (s *ResolveStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseResolveStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseResolveStatus(input string) (*ResolveStatus, error) { + vals := map[string]ResolveStatus{ + "accesstokeyvaultdenied": ResolveStatusAccessToKeyVaultDenied, + "fetchtimedout": ResolveStatusFetchTimedOut, + "initialized": ResolveStatusInitialized, + "invalidsyntax": ResolveStatusInvalidSyntax, + "msinotenabled": ResolveStatusMSINotEnabled, + "otherreasons": ResolveStatusOtherReasons, + "resolved": ResolveStatusResolved, + "secretnotfound": ResolveStatusSecretNotFound, + "secretversionnotfound": ResolveStatusSecretVersionNotFound, + "unauthorizedclient": ResolveStatusUnauthorizedClient, + "vaultnotfound": ResolveStatusVaultNotFound, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ResolveStatus(input) + return &out, nil +} + +type RouteType string + +const ( + RouteTypeDefault RouteType = "DEFAULT" + RouteTypeINHERITED RouteType = "INHERITED" + RouteTypeSTATIC RouteType = "STATIC" +) + +func PossibleValuesForRouteType() []string { + return []string{ + string(RouteTypeDefault), + string(RouteTypeINHERITED), + string(RouteTypeSTATIC), + } +} + +func (s *RouteType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRouteType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRouteType(input string) (*RouteType, error) { + vals := map[string]RouteType{ + "default": RouteTypeDefault, + "inherited": RouteTypeINHERITED, + "static": RouteTypeSTATIC, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RouteType(input) + return &out, nil +} + +type RuntimeName string + +const ( + RuntimeNameCustom RuntimeName = "custom" + RuntimeNameDotnetNegativeisolated RuntimeName = "dotnet-isolated" + RuntimeNameJava RuntimeName = "java" + RuntimeNameNode RuntimeName = "node" + RuntimeNamePowershell RuntimeName = "powershell" + RuntimeNamePython RuntimeName = "python" +) + +func PossibleValuesForRuntimeName() []string { + return []string{ + string(RuntimeNameCustom), + string(RuntimeNameDotnetNegativeisolated), + string(RuntimeNameJava), + string(RuntimeNameNode), + string(RuntimeNamePowershell), + string(RuntimeNamePython), + } +} + +func (s *RuntimeName) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRuntimeName(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRuntimeName(input string) (*RuntimeName, error) { + vals := map[string]RuntimeName{ + "custom": RuntimeNameCustom, + "dotnet-isolated": RuntimeNameDotnetNegativeisolated, + "java": RuntimeNameJava, + "node": RuntimeNameNode, + "powershell": RuntimeNamePowershell, + "python": RuntimeNamePython, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RuntimeName(input) + return &out, nil +} + +type ScmType string + +const ( + ScmTypeBitbucketGit ScmType = "BitbucketGit" + ScmTypeBitbucketHg ScmType = "BitbucketHg" + ScmTypeCodePlexGit ScmType = "CodePlexGit" + ScmTypeCodePlexHg ScmType = "CodePlexHg" + ScmTypeDropbox ScmType = "Dropbox" + ScmTypeExternalGit ScmType = "ExternalGit" + ScmTypeExternalHg ScmType = "ExternalHg" + ScmTypeGitHub ScmType = "GitHub" + ScmTypeLocalGit ScmType = "LocalGit" + ScmTypeNone ScmType = "None" + ScmTypeOneDrive ScmType = "OneDrive" + ScmTypeTfs ScmType = "Tfs" + ScmTypeVSO ScmType = "VSO" + ScmTypeVSTSRM ScmType = "VSTSRM" +) + +func PossibleValuesForScmType() []string { + return []string{ + string(ScmTypeBitbucketGit), + string(ScmTypeBitbucketHg), + string(ScmTypeCodePlexGit), + string(ScmTypeCodePlexHg), + string(ScmTypeDropbox), + string(ScmTypeExternalGit), + string(ScmTypeExternalHg), + string(ScmTypeGitHub), + string(ScmTypeLocalGit), + string(ScmTypeNone), + string(ScmTypeOneDrive), + string(ScmTypeTfs), + string(ScmTypeVSO), + string(ScmTypeVSTSRM), + } +} + +func (s *ScmType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseScmType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseScmType(input string) (*ScmType, error) { + vals := map[string]ScmType{ + "bitbucketgit": ScmTypeBitbucketGit, + "bitbuckethg": ScmTypeBitbucketHg, + "codeplexgit": ScmTypeCodePlexGit, + "codeplexhg": ScmTypeCodePlexHg, + "dropbox": ScmTypeDropbox, + "externalgit": ScmTypeExternalGit, + "externalhg": ScmTypeExternalHg, + "github": ScmTypeGitHub, + "localgit": ScmTypeLocalGit, + "none": ScmTypeNone, + "onedrive": ScmTypeOneDrive, + "tfs": ScmTypeTfs, + "vso": ScmTypeVSO, + "vstsrm": ScmTypeVSTSRM, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ScmType(input) + return &out, nil +} + +type SiteAvailabilityState string + +const ( + SiteAvailabilityStateDisasterRecoveryMode SiteAvailabilityState = "DisasterRecoveryMode" + SiteAvailabilityStateLimited SiteAvailabilityState = "Limited" + SiteAvailabilityStateNormal SiteAvailabilityState = "Normal" +) + +func PossibleValuesForSiteAvailabilityState() []string { + return []string{ + string(SiteAvailabilityStateDisasterRecoveryMode), + string(SiteAvailabilityStateLimited), + string(SiteAvailabilityStateNormal), + } +} + +func (s *SiteAvailabilityState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSiteAvailabilityState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSiteAvailabilityState(input string) (*SiteAvailabilityState, error) { + vals := map[string]SiteAvailabilityState{ + "disasterrecoverymode": SiteAvailabilityStateDisasterRecoveryMode, + "limited": SiteAvailabilityStateLimited, + "normal": SiteAvailabilityStateNormal, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SiteAvailabilityState(input) + return &out, nil +} + +type SiteExtensionType string + +const ( + SiteExtensionTypeGallery SiteExtensionType = "Gallery" + SiteExtensionTypeWebRoot SiteExtensionType = "WebRoot" +) + +func PossibleValuesForSiteExtensionType() []string { + return []string{ + string(SiteExtensionTypeGallery), + string(SiteExtensionTypeWebRoot), + } +} + +func (s *SiteExtensionType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSiteExtensionType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSiteExtensionType(input string) (*SiteExtensionType, error) { + vals := map[string]SiteExtensionType{ + "gallery": SiteExtensionTypeGallery, + "webroot": SiteExtensionTypeWebRoot, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SiteExtensionType(input) + return &out, nil +} + +type SiteLoadBalancing string + +const ( + SiteLoadBalancingLeastRequests SiteLoadBalancing = "LeastRequests" + SiteLoadBalancingLeastResponseTime SiteLoadBalancing = "LeastResponseTime" + SiteLoadBalancingPerSiteRoundRobin SiteLoadBalancing = "PerSiteRoundRobin" + SiteLoadBalancingRequestHash SiteLoadBalancing = "RequestHash" + SiteLoadBalancingWeightedRoundRobin SiteLoadBalancing = "WeightedRoundRobin" + SiteLoadBalancingWeightedTotalTraffic SiteLoadBalancing = "WeightedTotalTraffic" +) + +func PossibleValuesForSiteLoadBalancing() []string { + return []string{ + string(SiteLoadBalancingLeastRequests), + string(SiteLoadBalancingLeastResponseTime), + string(SiteLoadBalancingPerSiteRoundRobin), + string(SiteLoadBalancingRequestHash), + string(SiteLoadBalancingWeightedRoundRobin), + string(SiteLoadBalancingWeightedTotalTraffic), + } +} + +func (s *SiteLoadBalancing) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSiteLoadBalancing(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSiteLoadBalancing(input string) (*SiteLoadBalancing, error) { + vals := map[string]SiteLoadBalancing{ + "leastrequests": SiteLoadBalancingLeastRequests, + "leastresponsetime": SiteLoadBalancingLeastResponseTime, + "persiteroundrobin": SiteLoadBalancingPerSiteRoundRobin, + "requesthash": SiteLoadBalancingRequestHash, + "weightedroundrobin": SiteLoadBalancingWeightedRoundRobin, + "weightedtotaltraffic": SiteLoadBalancingWeightedTotalTraffic, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SiteLoadBalancing(input) + return &out, nil +} + +type SiteRuntimeState string + +const ( + SiteRuntimeStateREADY SiteRuntimeState = "READY" + SiteRuntimeStateSTOPPED SiteRuntimeState = "STOPPED" + SiteRuntimeStateUNKNOWN SiteRuntimeState = "UNKNOWN" +) + +func PossibleValuesForSiteRuntimeState() []string { + return []string{ + string(SiteRuntimeStateREADY), + string(SiteRuntimeStateSTOPPED), + string(SiteRuntimeStateUNKNOWN), + } +} + +func (s *SiteRuntimeState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSiteRuntimeState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSiteRuntimeState(input string) (*SiteRuntimeState, error) { + vals := map[string]SiteRuntimeState{ + "ready": SiteRuntimeStateREADY, + "stopped": SiteRuntimeStateSTOPPED, + "unknown": SiteRuntimeStateUNKNOWN, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SiteRuntimeState(input) + return &out, nil +} + +type SslState string + +const ( + SslStateDisabled SslState = "Disabled" + SslStateIPBasedEnabled SslState = "IpBasedEnabled" + SslStateSniEnabled SslState = "SniEnabled" +) + +func PossibleValuesForSslState() []string { + return []string{ + string(SslStateDisabled), + string(SslStateIPBasedEnabled), + string(SslStateSniEnabled), + } +} + +func (s *SslState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSslState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSslState(input string) (*SslState, error) { + vals := map[string]SslState{ + "disabled": SslStateDisabled, + "ipbasedenabled": SslStateIPBasedEnabled, + "snienabled": SslStateSniEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SslState(input) + return &out, nil +} + +type SupportedTlsVersions string + +const ( + SupportedTlsVersionsOnePointOne SupportedTlsVersions = "1.1" + SupportedTlsVersionsOnePointThree SupportedTlsVersions = "1.3" + SupportedTlsVersionsOnePointTwo SupportedTlsVersions = "1.2" + SupportedTlsVersionsOnePointZero SupportedTlsVersions = "1.0" +) + +func PossibleValuesForSupportedTlsVersions() []string { + return []string{ + string(SupportedTlsVersionsOnePointOne), + string(SupportedTlsVersionsOnePointThree), + string(SupportedTlsVersionsOnePointTwo), + string(SupportedTlsVersionsOnePointZero), + } +} + +func (s *SupportedTlsVersions) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSupportedTlsVersions(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSupportedTlsVersions(input string) (*SupportedTlsVersions, error) { + vals := map[string]SupportedTlsVersions{ + "1.1": SupportedTlsVersionsOnePointOne, + "1.3": SupportedTlsVersionsOnePointThree, + "1.2": SupportedTlsVersionsOnePointTwo, + "1.0": SupportedTlsVersionsOnePointZero, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SupportedTlsVersions(input) + return &out, nil +} + +type TlsCipherSuites string + +const ( + TlsCipherSuitesTLSAESOneTwoEightGCMSHATwoFiveSix TlsCipherSuites = "TLS_AES_128_GCM_SHA256" + TlsCipherSuitesTLSAESTwoFiveSixGCMSHAThreeEightFour TlsCipherSuites = "TLS_AES_256_GCM_SHA384" + TlsCipherSuitesTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix TlsCipherSuites = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" + TlsCipherSuitesTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix TlsCipherSuites = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" + TlsCipherSuitesTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour TlsCipherSuites = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" + TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightCBCSHA TlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" + TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix TlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" + TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix TlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" + TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixCBCSHA TlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" + TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour TlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" + TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour TlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" + TlsCipherSuitesTLSRSAWITHAESOneTwoEightCBCSHA TlsCipherSuites = "TLS_RSA_WITH_AES_128_CBC_SHA" + TlsCipherSuitesTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix TlsCipherSuites = "TLS_RSA_WITH_AES_128_CBC_SHA256" + TlsCipherSuitesTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix TlsCipherSuites = "TLS_RSA_WITH_AES_128_GCM_SHA256" + TlsCipherSuitesTLSRSAWITHAESTwoFiveSixCBCSHA TlsCipherSuites = "TLS_RSA_WITH_AES_256_CBC_SHA" + TlsCipherSuitesTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix TlsCipherSuites = "TLS_RSA_WITH_AES_256_CBC_SHA256" + TlsCipherSuitesTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour TlsCipherSuites = "TLS_RSA_WITH_AES_256_GCM_SHA384" +) + +func PossibleValuesForTlsCipherSuites() []string { + return []string{ + string(TlsCipherSuitesTLSAESOneTwoEightGCMSHATwoFiveSix), + string(TlsCipherSuitesTLSAESTwoFiveSixGCMSHAThreeEightFour), + string(TlsCipherSuitesTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix), + string(TlsCipherSuitesTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix), + string(TlsCipherSuitesTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour), + string(TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightCBCSHA), + string(TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix), + string(TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix), + string(TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixCBCSHA), + string(TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour), + string(TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour), + string(TlsCipherSuitesTLSRSAWITHAESOneTwoEightCBCSHA), + string(TlsCipherSuitesTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix), + string(TlsCipherSuitesTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix), + string(TlsCipherSuitesTLSRSAWITHAESTwoFiveSixCBCSHA), + string(TlsCipherSuitesTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix), + string(TlsCipherSuitesTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour), + } +} + +func (s *TlsCipherSuites) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseTlsCipherSuites(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseTlsCipherSuites(input string) (*TlsCipherSuites, error) { + vals := map[string]TlsCipherSuites{ + "tls_aes_128_gcm_sha256": TlsCipherSuitesTLSAESOneTwoEightGCMSHATwoFiveSix, + "tls_aes_256_gcm_sha384": TlsCipherSuitesTLSAESTwoFiveSixGCMSHAThreeEightFour, + "tls_ecdhe_ecdsa_with_aes_128_cbc_sha256": TlsCipherSuitesTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix, + "tls_ecdhe_ecdsa_with_aes_128_gcm_sha256": TlsCipherSuitesTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix, + "tls_ecdhe_ecdsa_with_aes_256_gcm_sha384": TlsCipherSuitesTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour, + "tls_ecdhe_rsa_with_aes_128_cbc_sha": TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightCBCSHA, + "tls_ecdhe_rsa_with_aes_128_cbc_sha256": TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix, + "tls_ecdhe_rsa_with_aes_128_gcm_sha256": TlsCipherSuitesTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix, + "tls_ecdhe_rsa_with_aes_256_cbc_sha": TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixCBCSHA, + "tls_ecdhe_rsa_with_aes_256_cbc_sha384": TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour, + "tls_ecdhe_rsa_with_aes_256_gcm_sha384": TlsCipherSuitesTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour, + "tls_rsa_with_aes_128_cbc_sha": TlsCipherSuitesTLSRSAWITHAESOneTwoEightCBCSHA, + "tls_rsa_with_aes_128_cbc_sha256": TlsCipherSuitesTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix, + "tls_rsa_with_aes_128_gcm_sha256": TlsCipherSuitesTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix, + "tls_rsa_with_aes_256_cbc_sha": TlsCipherSuitesTLSRSAWITHAESTwoFiveSixCBCSHA, + "tls_rsa_with_aes_256_cbc_sha256": TlsCipherSuitesTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix, + "tls_rsa_with_aes_256_gcm_sha384": TlsCipherSuitesTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := TlsCipherSuites(input) + return &out, nil +} + +type TriggeredWebJobStatus string + +const ( + TriggeredWebJobStatusError TriggeredWebJobStatus = "Error" + TriggeredWebJobStatusFailed TriggeredWebJobStatus = "Failed" + TriggeredWebJobStatusSuccess TriggeredWebJobStatus = "Success" +) + +func PossibleValuesForTriggeredWebJobStatus() []string { + return []string{ + string(TriggeredWebJobStatusError), + string(TriggeredWebJobStatusFailed), + string(TriggeredWebJobStatusSuccess), + } +} + +func (s *TriggeredWebJobStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseTriggeredWebJobStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseTriggeredWebJobStatus(input string) (*TriggeredWebJobStatus, error) { + vals := map[string]TriggeredWebJobStatus{ + "error": TriggeredWebJobStatusError, + "failed": TriggeredWebJobStatusFailed, + "success": TriggeredWebJobStatusSuccess, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := TriggeredWebJobStatus(input) + return &out, nil +} + +type UnauthenticatedClientAction string + +const ( + UnauthenticatedClientActionAllowAnonymous UnauthenticatedClientAction = "AllowAnonymous" + UnauthenticatedClientActionRedirectToLoginPage UnauthenticatedClientAction = "RedirectToLoginPage" +) + +func PossibleValuesForUnauthenticatedClientAction() []string { + return []string{ + string(UnauthenticatedClientActionAllowAnonymous), + string(UnauthenticatedClientActionRedirectToLoginPage), + } +} + +func (s *UnauthenticatedClientAction) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseUnauthenticatedClientAction(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseUnauthenticatedClientAction(input string) (*UnauthenticatedClientAction, error) { + vals := map[string]UnauthenticatedClientAction{ + "allowanonymous": UnauthenticatedClientActionAllowAnonymous, + "redirecttologinpage": UnauthenticatedClientActionRedirectToLoginPage, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := UnauthenticatedClientAction(input) + return &out, nil +} + +type UnauthenticatedClientActionV2 string + +const ( + UnauthenticatedClientActionV2AllowAnonymous UnauthenticatedClientActionV2 = "AllowAnonymous" + UnauthenticatedClientActionV2RedirectToLoginPage UnauthenticatedClientActionV2 = "RedirectToLoginPage" + UnauthenticatedClientActionV2ReturnFourZeroOne UnauthenticatedClientActionV2 = "Return401" + UnauthenticatedClientActionV2ReturnFourZeroThree UnauthenticatedClientActionV2 = "Return403" +) + +func PossibleValuesForUnauthenticatedClientActionV2() []string { + return []string{ + string(UnauthenticatedClientActionV2AllowAnonymous), + string(UnauthenticatedClientActionV2RedirectToLoginPage), + string(UnauthenticatedClientActionV2ReturnFourZeroOne), + string(UnauthenticatedClientActionV2ReturnFourZeroThree), + } +} + +func (s *UnauthenticatedClientActionV2) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseUnauthenticatedClientActionV2(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseUnauthenticatedClientActionV2(input string) (*UnauthenticatedClientActionV2, error) { + vals := map[string]UnauthenticatedClientActionV2{ + "allowanonymous": UnauthenticatedClientActionV2AllowAnonymous, + "redirecttologinpage": UnauthenticatedClientActionV2RedirectToLoginPage, + "return401": UnauthenticatedClientActionV2ReturnFourZeroOne, + "return403": UnauthenticatedClientActionV2ReturnFourZeroThree, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := UnauthenticatedClientActionV2(input) + return &out, nil +} + +type UsageState string + +const ( + UsageStateExceeded UsageState = "Exceeded" + UsageStateNormal UsageState = "Normal" +) + +func PossibleValuesForUsageState() []string { + return []string{ + string(UsageStateExceeded), + string(UsageStateNormal), + } +} + +func (s *UsageState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseUsageState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseUsageState(input string) (*UsageState, error) { + vals := map[string]UsageState{ + "exceeded": UsageStateExceeded, + "normal": UsageStateNormal, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := UsageState(input) + return &out, nil +} + +type WebJobType string + +const ( + WebJobTypeContinuous WebJobType = "Continuous" + WebJobTypeTriggered WebJobType = "Triggered" +) + +func PossibleValuesForWebJobType() []string { + return []string{ + string(WebJobTypeContinuous), + string(WebJobTypeTriggered), + } +} + +func (s *WebJobType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseWebJobType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseWebJobType(input string) (*WebJobType, error) { + vals := map[string]WebJobType{ + "continuous": WebJobTypeContinuous, + "triggered": WebJobTypeTriggered, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WebJobType(input) + return &out, nil +} + +type WorkflowHealthState string + +const ( + WorkflowHealthStateHealthy WorkflowHealthState = "Healthy" + WorkflowHealthStateNotSpecified WorkflowHealthState = "NotSpecified" + WorkflowHealthStateUnhealthy WorkflowHealthState = "Unhealthy" + WorkflowHealthStateUnknown WorkflowHealthState = "Unknown" +) + +func PossibleValuesForWorkflowHealthState() []string { + return []string{ + string(WorkflowHealthStateHealthy), + string(WorkflowHealthStateNotSpecified), + string(WorkflowHealthStateUnhealthy), + string(WorkflowHealthStateUnknown), + } +} + +func (s *WorkflowHealthState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseWorkflowHealthState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseWorkflowHealthState(input string) (*WorkflowHealthState, error) { + vals := map[string]WorkflowHealthState{ + "healthy": WorkflowHealthStateHealthy, + "notspecified": WorkflowHealthStateNotSpecified, + "unhealthy": WorkflowHealthStateUnhealthy, + "unknown": WorkflowHealthStateUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WorkflowHealthState(input) + return &out, nil +} + +type WorkflowState string + +const ( + WorkflowStateCompleted WorkflowState = "Completed" + WorkflowStateDeleted WorkflowState = "Deleted" + WorkflowStateDisabled WorkflowState = "Disabled" + WorkflowStateEnabled WorkflowState = "Enabled" + WorkflowStateNotSpecified WorkflowState = "NotSpecified" + WorkflowStateSuspended WorkflowState = "Suspended" +) + +func PossibleValuesForWorkflowState() []string { + return []string{ + string(WorkflowStateCompleted), + string(WorkflowStateDeleted), + string(WorkflowStateDisabled), + string(WorkflowStateEnabled), + string(WorkflowStateNotSpecified), + string(WorkflowStateSuspended), + } +} + +func (s *WorkflowState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseWorkflowState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseWorkflowState(input string) (*WorkflowState, error) { + vals := map[string]WorkflowState{ + "completed": WorkflowStateCompleted, + "deleted": WorkflowStateDeleted, + "disabled": WorkflowStateDisabled, + "enabled": WorkflowStateEnabled, + "notspecified": WorkflowStateNotSpecified, + "suspended": WorkflowStateSuspended, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WorkflowState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_appsetting.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_appsetting.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_appsetting.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_appsetting.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_backup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_backup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_backup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_backup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_configreferenceappsetting.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_configreferenceappsetting.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_configreferenceappsetting.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_configreferenceappsetting.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_configreferenceconnectionstring.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_configreferenceconnectionstring.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_configreferenceconnectionstring.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_configreferenceconnectionstring.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_connectionstring.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_connectionstring.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_connectionstring.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_connectionstring.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_continuouswebjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_continuouswebjob.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_continuouswebjob.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_continuouswebjob.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_default.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_default.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_default.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_default.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_deployment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_deployment.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_deployment.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_deployment.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_domainownershipidentifier.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_domainownershipidentifier.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_domainownershipidentifier.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_domainownershipidentifier.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_function.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_function.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_function.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_function.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_functionkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_functionkey.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_functionkey.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_functionkey.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_gateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_gateway.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_gateway.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_gateway.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_history.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_history.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_history.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_history.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_hostdefault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_hostdefault.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_hostdefault.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_hostdefault.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_hostnamebinding.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_hostnamebinding.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_hostnamebinding.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_hostnamebinding.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_hybridconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_hybridconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_hybridconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_hybridconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_instance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_instance.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_instance.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_instance.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_instanceprocess.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_instanceprocess.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_instanceprocess.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_instanceprocess.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_instanceprocessmodule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_instanceprocessmodule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_instanceprocessmodule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_instanceprocessmodule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_key.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_key.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_key.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_key.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_module.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_module.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_module.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_module.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_networkfeature.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_networkfeature.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_networkfeature.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_networkfeature.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_networktrace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_networktrace.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_networktrace.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_networktrace.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_premieraddon.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_premieraddon.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_premieraddon.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_premieraddon.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_privateendpointconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_privateendpointconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_privateendpointconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_process.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_process.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_process.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_process.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_processmodule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_processmodule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_processmodule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_processmodule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_publiccertificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_publiccertificate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_publiccertificate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_publiccertificate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_relay.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_relay.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_relay.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_relay.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_sitecontainer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_sitecontainer.go new file mode 100644 index 0000000000000..27ca4fa3c1020 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_sitecontainer.go @@ -0,0 +1,139 @@ +package webapps + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&SitecontainerId{}) +} + +var _ resourceids.ResourceId = &SitecontainerId{} + +// SitecontainerId is a struct representing the Resource ID for a Sitecontainer +type SitecontainerId struct { + SubscriptionId string + ResourceGroupName string + SiteName string + SitecontainerName string +} + +// NewSitecontainerID returns a new SitecontainerId struct +func NewSitecontainerID(subscriptionId string, resourceGroupName string, siteName string, sitecontainerName string) SitecontainerId { + return SitecontainerId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + SiteName: siteName, + SitecontainerName: sitecontainerName, + } +} + +// ParseSitecontainerID parses 'input' into a SitecontainerId +func ParseSitecontainerID(input string) (*SitecontainerId, error) { + parser := resourceids.NewParserFromResourceIdType(&SitecontainerId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := SitecontainerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseSitecontainerIDInsensitively parses 'input' case-insensitively into a SitecontainerId +// note: this method should only be used for API response data and not user input +func ParseSitecontainerIDInsensitively(input string) (*SitecontainerId, error) { + parser := resourceids.NewParserFromResourceIdType(&SitecontainerId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := SitecontainerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SitecontainerId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.SiteName, ok = input.Parsed["siteName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "siteName", input) + } + + if id.SitecontainerName, ok = input.Parsed["sitecontainerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sitecontainerName", input) + } + + return nil +} + +// ValidateSitecontainerID checks that 'input' can be parsed as a Sitecontainer ID +func ValidateSitecontainerID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseSitecontainerID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Sitecontainer ID +func (id SitecontainerId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Web/sites/%s/sitecontainers/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.SiteName, id.SitecontainerName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Sitecontainer ID +func (id SitecontainerId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftWeb", "Microsoft.Web", "Microsoft.Web"), + resourceids.StaticSegment("staticSites", "sites", "sites"), + resourceids.UserSpecifiedSegment("siteName", "siteValue"), + resourceids.StaticSegment("staticSitecontainers", "sitecontainers", "sitecontainers"), + resourceids.UserSpecifiedSegment("sitecontainerName", "sitecontainerValue"), + } +} + +// String returns a human-readable description of this Sitecontainer ID +func (id SitecontainerId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Site Name: %q", id.SiteName), + fmt.Sprintf("Sitecontainer Name: %q", id.SitecontainerName), + } + return fmt.Sprintf("Sitecontainer (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_siteextension.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_siteextension.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_siteextension.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_siteextension.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_sitenetworktrace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_sitenetworktrace.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_sitenetworktrace.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_sitenetworktrace.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_siteslotnetworktrace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_siteslotnetworktrace.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_siteslotnetworktrace.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_siteslotnetworktrace.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotbackup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotbackup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotbackup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotbackup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotcontinuouswebjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotcontinuouswebjob.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotcontinuouswebjob.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotcontinuouswebjob.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotdeployment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotdeployment.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotdeployment.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotdeployment.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotdomainownershipidentifier.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotdomainownershipidentifier.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotdomainownershipidentifier.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotdomainownershipidentifier.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotfunction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotfunction.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotfunction.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotfunction.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slothostnamebinding.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slothostnamebinding.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slothostnamebinding.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slothostnamebinding.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slothybridconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slothybridconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slothybridconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slothybridconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slothybridconnectionnamespacerelay.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slothybridconnectionnamespacerelay.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slothybridconnectionnamespacerelay.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slothybridconnectionnamespacerelay.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotinstance.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotinstance.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotinstance.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotinstanceprocess.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotinstanceprocess.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotinstanceprocess.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotinstanceprocess.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotinstanceprocessmodule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotinstanceprocessmodule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotinstanceprocessmodule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotinstanceprocessmodule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotnetworkfeature.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotnetworkfeature.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotnetworkfeature.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotnetworkfeature.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotnetworktrace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotnetworktrace.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotnetworktrace.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotnetworktrace.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotpremieraddon.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotpremieraddon.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotpremieraddon.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotpremieraddon.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotprivateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotprivateendpointconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotprivateendpointconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotprivateendpointconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotprocess.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotprocess.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotprocess.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotprocess.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotpubliccertificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotpubliccertificate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotpubliccertificate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotpubliccertificate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotsitecontainer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotsitecontainer.go new file mode 100644 index 0000000000000..8866f09575f19 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotsitecontainer.go @@ -0,0 +1,148 @@ +package webapps + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&SlotSitecontainerId{}) +} + +var _ resourceids.ResourceId = &SlotSitecontainerId{} + +// SlotSitecontainerId is a struct representing the Resource ID for a Slot Sitecontainer +type SlotSitecontainerId struct { + SubscriptionId string + ResourceGroupName string + SiteName string + SlotName string + SitecontainerName string +} + +// NewSlotSitecontainerID returns a new SlotSitecontainerId struct +func NewSlotSitecontainerID(subscriptionId string, resourceGroupName string, siteName string, slotName string, sitecontainerName string) SlotSitecontainerId { + return SlotSitecontainerId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + SiteName: siteName, + SlotName: slotName, + SitecontainerName: sitecontainerName, + } +} + +// ParseSlotSitecontainerID parses 'input' into a SlotSitecontainerId +func ParseSlotSitecontainerID(input string) (*SlotSitecontainerId, error) { + parser := resourceids.NewParserFromResourceIdType(&SlotSitecontainerId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := SlotSitecontainerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseSlotSitecontainerIDInsensitively parses 'input' case-insensitively into a SlotSitecontainerId +// note: this method should only be used for API response data and not user input +func ParseSlotSitecontainerIDInsensitively(input string) (*SlotSitecontainerId, error) { + parser := resourceids.NewParserFromResourceIdType(&SlotSitecontainerId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := SlotSitecontainerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SlotSitecontainerId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.SiteName, ok = input.Parsed["siteName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "siteName", input) + } + + if id.SlotName, ok = input.Parsed["slotName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "slotName", input) + } + + if id.SitecontainerName, ok = input.Parsed["sitecontainerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sitecontainerName", input) + } + + return nil +} + +// ValidateSlotSitecontainerID checks that 'input' can be parsed as a Slot Sitecontainer ID +func ValidateSlotSitecontainerID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseSlotSitecontainerID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Slot Sitecontainer ID +func (id SlotSitecontainerId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Web/sites/%s/slots/%s/sitecontainers/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.SiteName, id.SlotName, id.SitecontainerName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Slot Sitecontainer ID +func (id SlotSitecontainerId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftWeb", "Microsoft.Web", "Microsoft.Web"), + resourceids.StaticSegment("staticSites", "sites", "sites"), + resourceids.UserSpecifiedSegment("siteName", "siteValue"), + resourceids.StaticSegment("staticSlots", "slots", "slots"), + resourceids.UserSpecifiedSegment("slotName", "slotValue"), + resourceids.StaticSegment("staticSitecontainers", "sitecontainers", "sitecontainers"), + resourceids.UserSpecifiedSegment("sitecontainerName", "sitecontainerValue"), + } +} + +// String returns a human-readable description of this Slot Sitecontainer ID +func (id SlotSitecontainerId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Site Name: %q", id.SiteName), + fmt.Sprintf("Slot Name: %q", id.SlotName), + fmt.Sprintf("Sitecontainer Name: %q", id.SitecontainerName), + } + return fmt.Sprintf("Slot Sitecontainer (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotsiteextension.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotsiteextension.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotsiteextension.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotsiteextension.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slottriggeredwebjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slottriggeredwebjob.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slottriggeredwebjob.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slottriggeredwebjob.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotvirtualnetworkconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotvirtualnetworkconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotvirtualnetworkconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotvirtualnetworkconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotvirtualnetworkconnectiongateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotvirtualnetworkconnectiongateway.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotvirtualnetworkconnectiongateway.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotvirtualnetworkconnectiongateway.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotwebjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotwebjob.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotwebjob.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotwebjob.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotworkflow.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotworkflow.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_slotworkflow.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_slotworkflow.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_snapshot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_snapshot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_snapshot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_snapshot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_triggeredwebjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_triggeredwebjob.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_triggeredwebjob.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_triggeredwebjob.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_triggeredwebjobhistory.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_triggeredwebjobhistory.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_triggeredwebjobhistory.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_triggeredwebjobhistory.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_virtualnetworkconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_virtualnetworkconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_virtualnetworkconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_virtualnetworkconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_webjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_webjob.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_webjob.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_webjob.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_websnapshot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_websnapshot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_websnapshot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_websnapshot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_workflow.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_workflow.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/id_workflow.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/id_workflow.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_addpremieraddon.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_addpremieraddon.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_addpremieraddon.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_addpremieraddon.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_addpremieraddonslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_addpremieraddonslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_addpremieraddonslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_addpremieraddonslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_analyzecustomhostname.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_analyzecustomhostname.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_analyzecustomhostname.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_analyzecustomhostname.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_analyzecustomhostnameslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_analyzecustomhostnameslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_analyzecustomhostnameslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_analyzecustomhostnameslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_applyslotconfigtoproduction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_applyslotconfigtoproduction.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_applyslotconfigtoproduction.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_applyslotconfigtoproduction.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_applyslotconfigurationslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_applyslotconfigurationslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_applyslotconfigurationslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_applyslotconfigurationslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_approveorrejectprivateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_approveorrejectprivateendpointconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_approveorrejectprivateendpointconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_approveorrejectprivateendpointconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_approveorrejectprivateendpointconnectionslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_approveorrejectprivateendpointconnectionslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_approveorrejectprivateendpointconnectionslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_approveorrejectprivateendpointconnectionslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_backup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_backup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_backup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_backup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_backupslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_backupslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_backupslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_backupslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createdeployment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createdeployment.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createdeployment.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createdeployment.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createdeploymentslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createdeploymentslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createdeploymentslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createdeploymentslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createfunction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createfunction.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createfunction.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createfunction.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createinstancefunctionslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createinstancefunctionslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createinstancefunctionslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createinstancefunctionslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createinstancemsdeployoperation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createinstancemsdeployoperation.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createinstancemsdeployoperation.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createinstancemsdeployoperation.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createinstancemsdeployoperationslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createinstancemsdeployoperationslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createinstancemsdeployoperationslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createinstancemsdeployoperationslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createmsdeployoperation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createmsdeployoperation.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createmsdeployoperation.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createmsdeployoperation.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createmsdeployoperationslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createmsdeployoperationslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createmsdeployoperationslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createmsdeployoperationslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createonedeployoperation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createonedeployoperation.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createonedeployoperation.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createonedeployoperation.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdateconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdateconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdateconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdateconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdateconfigurationslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdateconfigurationslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdateconfigurationslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdateconfigurationslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatedomainownershipidentifier.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatedomainownershipidentifier.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatedomainownershipidentifier.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatedomainownershipidentifier.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatedomainownershipidentifierslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatedomainownershipidentifierslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatedomainownershipidentifierslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatedomainownershipidentifierslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatefunctionsecret.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatefunctionsecret.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatefunctionsecret.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatefunctionsecret.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatefunctionsecretslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatefunctionsecretslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatefunctionsecretslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatefunctionsecretslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatehostnamebinding.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatehostnamebinding.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatehostnamebinding.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatehostnamebinding.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatehostnamebindingslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatehostnamebindingslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatehostnamebindingslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatehostnamebindingslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatehostsecret.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatehostsecret.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatehostsecret.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatehostsecret.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatehostsecretslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatehostsecretslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatehostsecretslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatehostsecretslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatehybridconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatehybridconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatehybridconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatehybridconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatehybridconnectionslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatehybridconnectionslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatehybridconnectionslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatehybridconnectionslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatepubliccertificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatepubliccertificate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatepubliccertificate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatepubliccertificate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatepubliccertificateslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatepubliccertificateslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatepubliccertificateslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatepubliccertificateslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdaterelayserviceconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdaterelayserviceconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdaterelayserviceconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdaterelayserviceconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdaterelayserviceconnectionslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdaterelayserviceconnectionslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdaterelayserviceconnectionslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdaterelayserviceconnectionslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatesitecontainer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatesitecontainer.go new file mode 100644 index 0000000000000..5d5cf5440ebb5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatesitecontainer.go @@ -0,0 +1,59 @@ +package webapps + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateSiteContainerOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *SiteContainer +} + +// CreateOrUpdateSiteContainer ... +func (c WebAppsClient) CreateOrUpdateSiteContainer(ctx context.Context, id SitecontainerId, input SiteContainer) (result CreateOrUpdateSiteContainerOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model SiteContainer + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatesitecontainerslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatesitecontainerslot.go new file mode 100644 index 0000000000000..2c906d04f9180 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatesitecontainerslot.go @@ -0,0 +1,59 @@ +package webapps + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateSiteContainerSlotOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *SiteContainer +} + +// CreateOrUpdateSiteContainerSlot ... +func (c WebAppsClient) CreateOrUpdateSiteContainerSlot(ctx context.Context, id SlotSitecontainerId, input SiteContainer) (result CreateOrUpdateSiteContainerSlotOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model SiteContainer + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdateslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdateslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdateslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdateslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatesourcecontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatesourcecontrol.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatesourcecontrol.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatesourcecontrol.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatesourcecontrolslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatesourcecontrolslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatesourcecontrolslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatesourcecontrolslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheck.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheck.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheck.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheck.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheckslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheckslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheckslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheckslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatevnetconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatevnetconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatevnetconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatevnetconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatevnetconnectiongateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatevnetconnectiongateway.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatevnetconnectiongateway.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatevnetconnectiongateway.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatevnetconnectiongatewayslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatevnetconnectiongatewayslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatevnetconnectiongatewayslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatevnetconnectiongatewayslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatevnetconnectionslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatevnetconnectionslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_createorupdatevnetconnectionslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_createorupdatevnetconnectionslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletebackup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletebackup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletebackup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletebackup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletebackupconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletebackupconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletebackupconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletebackupconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletebackupconfigurationslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletebackupconfigurationslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletebackupconfigurationslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletebackupconfigurationslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletebackupslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletebackupslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletebackupslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletebackupslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletecontinuouswebjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletecontinuouswebjob.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletecontinuouswebjob.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletecontinuouswebjob.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletecontinuouswebjobslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletecontinuouswebjobslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletecontinuouswebjobslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletecontinuouswebjobslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletedeployment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletedeployment.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletedeployment.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletedeployment.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletedeploymentslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletedeploymentslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletedeploymentslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletedeploymentslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletedomainownershipidentifier.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletedomainownershipidentifier.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletedomainownershipidentifier.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletedomainownershipidentifier.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletedomainownershipidentifierslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletedomainownershipidentifierslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletedomainownershipidentifierslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletedomainownershipidentifierslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletefunction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletefunction.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletefunction.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletefunction.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletefunctionsecret.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletefunctionsecret.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletefunctionsecret.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletefunctionsecret.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletefunctionsecretslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletefunctionsecretslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletefunctionsecretslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletefunctionsecretslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletehostnamebinding.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletehostnamebinding.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletehostnamebinding.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletehostnamebinding.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletehostnamebindingslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletehostnamebindingslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletehostnamebindingslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletehostnamebindingslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletehostsecret.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletehostsecret.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletehostsecret.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletehostsecret.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletehostsecretslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletehostsecretslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletehostsecretslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletehostsecretslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletehybridconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletehybridconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletehybridconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletehybridconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletehybridconnectionslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletehybridconnectionslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletehybridconnectionslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletehybridconnectionslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deleteinstancefunctionslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deleteinstancefunctionslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deleteinstancefunctionslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deleteinstancefunctionslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deleteinstanceprocess.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deleteinstanceprocess.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deleteinstanceprocess.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deleteinstanceprocess.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deleteinstanceprocessslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deleteinstanceprocessslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deleteinstanceprocessslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deleteinstanceprocessslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletepremieraddon.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletepremieraddon.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletepremieraddon.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletepremieraddon.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletepremieraddonslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletepremieraddonslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletepremieraddonslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletepremieraddonslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deleteprivateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deleteprivateendpointconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deleteprivateendpointconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deleteprivateendpointconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deleteprivateendpointconnectionslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deleteprivateendpointconnectionslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deleteprivateendpointconnectionslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deleteprivateendpointconnectionslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deleteprocess.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deleteprocess.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deleteprocess.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deleteprocess.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deleteprocessslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deleteprocessslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deleteprocessslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deleteprocessslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletepubliccertificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletepubliccertificate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletepubliccertificate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletepubliccertificate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletepubliccertificateslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletepubliccertificateslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletepubliccertificateslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletepubliccertificateslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deleterelayserviceconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deleterelayserviceconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deleterelayserviceconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deleterelayserviceconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deleterelayserviceconnectionslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deleterelayserviceconnectionslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deleterelayserviceconnectionslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deleterelayserviceconnectionslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletesitecontainer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletesitecontainer.go new file mode 100644 index 0000000000000..ea860f567ef6d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletesitecontainer.go @@ -0,0 +1,47 @@ +package webapps + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteSiteContainerOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData +} + +// DeleteSiteContainer ... +func (c WebAppsClient) DeleteSiteContainer(ctx context.Context, id SitecontainerId) (result DeleteSiteContainerOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletesitecontainerslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletesitecontainerslot.go new file mode 100644 index 0000000000000..f3ad5aa1a72eb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletesitecontainerslot.go @@ -0,0 +1,47 @@ +package webapps + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteSiteContainerSlotOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData +} + +// DeleteSiteContainerSlot ... +func (c WebAppsClient) DeleteSiteContainerSlot(ctx context.Context, id SlotSitecontainerId) (result DeleteSiteContainerSlotOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletesiteextension.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletesiteextension.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletesiteextension.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletesiteextension.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletesiteextensionslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletesiteextensionslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletesiteextensionslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletesiteextensionslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deleteslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deleteslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deleteslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deleteslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletesourcecontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletesourcecontrol.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletesourcecontrol.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletesourcecontrol.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletesourcecontrolslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletesourcecontrolslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletesourcecontrolslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletesourcecontrolslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deleteswiftvirtualnetwork.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deleteswiftvirtualnetwork.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deleteswiftvirtualnetwork.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deleteswiftvirtualnetwork.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deleteswiftvirtualnetworkslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deleteswiftvirtualnetworkslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deleteswiftvirtualnetworkslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deleteswiftvirtualnetworkslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletetriggeredwebjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletetriggeredwebjob.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletetriggeredwebjob.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletetriggeredwebjob.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletetriggeredwebjobslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletetriggeredwebjobslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletetriggeredwebjobslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletetriggeredwebjobslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletevnetconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletevnetconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletevnetconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletevnetconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletevnetconnectionslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletevnetconnectionslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deletevnetconnectionslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deletevnetconnectionslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deployworkflowartifacts.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deployworkflowartifacts.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deployworkflowartifacts.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deployworkflowartifacts.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deployworkflowartifactsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deployworkflowartifactsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_deployworkflowartifactsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_deployworkflowartifactsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_discoverbackup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_discoverbackup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_discoverbackup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_discoverbackup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_discoverbackupslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_discoverbackupslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_discoverbackupslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_discoverbackupslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_generatenewsitepublishingpassword.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_generatenewsitepublishingpassword.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_generatenewsitepublishingpassword.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_generatenewsitepublishingpassword.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_generatenewsitepublishingpasswordslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_generatenewsitepublishingpasswordslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_generatenewsitepublishingpasswordslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_generatenewsitepublishingpasswordslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getappsettingkeyvaultreference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getappsettingkeyvaultreference.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getappsettingkeyvaultreference.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getappsettingkeyvaultreference.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getappsettingkeyvaultreferenceslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getappsettingkeyvaultreferenceslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getappsettingkeyvaultreferenceslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getappsettingkeyvaultreferenceslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getappsettingskeyvaultreferences.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getappsettingskeyvaultreferences.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getappsettingskeyvaultreferences.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getappsettingskeyvaultreferences.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getappsettingskeyvaultreferencesslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getappsettingskeyvaultreferencesslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getappsettingskeyvaultreferencesslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getappsettingskeyvaultreferencesslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getauthsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getauthsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getauthsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getauthsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getauthsettingsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getauthsettingsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getauthsettingsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getauthsettingsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getauthsettingsv2.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getauthsettingsv2.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getauthsettingsv2.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getauthsettingsv2.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getauthsettingsv2slot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getauthsettingsv2slot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getauthsettingsv2slot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getauthsettingsv2slot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getauthsettingsv2withoutsecrets.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getauthsettingsv2withoutsecrets.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getauthsettingsv2withoutsecrets.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getauthsettingsv2withoutsecrets.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getauthsettingsv2withoutsecretsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getauthsettingsv2withoutsecretsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getauthsettingsv2withoutsecretsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getauthsettingsv2withoutsecretsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getbackupconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getbackupconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getbackupconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getbackupconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getbackupconfigurationslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getbackupconfigurationslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getbackupconfigurationslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getbackupconfigurationslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getbackupstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getbackupstatus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getbackupstatus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getbackupstatus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getbackupstatusslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getbackupstatusslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getbackupstatusslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getbackupstatusslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getconfigurationslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getconfigurationslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getconfigurationslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getconfigurationslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getconfigurationsnapshot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getconfigurationsnapshot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getconfigurationsnapshot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getconfigurationsnapshot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getconfigurationsnapshotslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getconfigurationsnapshotslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getconfigurationsnapshotslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getconfigurationsnapshotslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getcontainerlogszip.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getcontainerlogszip.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getcontainerlogszip.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getcontainerlogszip.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getcontainerlogszipslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getcontainerlogszipslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getcontainerlogszipslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getcontainerlogszipslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getcontinuouswebjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getcontinuouswebjob.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getcontinuouswebjob.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getcontinuouswebjob.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getcontinuouswebjobslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getcontinuouswebjobslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getcontinuouswebjobslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getcontinuouswebjobslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getdeployment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getdeployment.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getdeployment.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getdeployment.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getdeploymentslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getdeploymentslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getdeploymentslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getdeploymentslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getdiagnosticlogsconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getdiagnosticlogsconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getdiagnosticlogsconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getdiagnosticlogsconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getdiagnosticlogsconfigurationslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getdiagnosticlogsconfigurationslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getdiagnosticlogsconfigurationslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getdiagnosticlogsconfigurationslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getdomainownershipidentifier.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getdomainownershipidentifier.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getdomainownershipidentifier.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getdomainownershipidentifier.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getdomainownershipidentifierslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getdomainownershipidentifierslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getdomainownershipidentifierslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getdomainownershipidentifierslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getftpallowed.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getftpallowed.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getftpallowed.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getftpallowed.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getftpallowedslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getftpallowedslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getftpallowedslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getftpallowedslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getfunction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getfunction.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getfunction.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getfunction.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getfunctionsadmintoken.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getfunctionsadmintoken.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getfunctionsadmintoken.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getfunctionsadmintoken.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getfunctionsadmintokenslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getfunctionsadmintokenslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getfunctionsadmintokenslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getfunctionsadmintokenslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_gethostnamebinding.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_gethostnamebinding.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_gethostnamebinding.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_gethostnamebinding.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_gethostnamebindingslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_gethostnamebindingslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_gethostnamebindingslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_gethostnamebindingslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_gethybridconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_gethybridconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_gethybridconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_gethybridconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_gethybridconnectionslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_gethybridconnectionslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_gethybridconnectionslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_gethybridconnectionslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstancefunctionslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstancefunctionslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstancefunctionslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstancefunctionslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstanceinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstanceinfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstanceinfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstanceinfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstanceinfoslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstanceinfoslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstanceinfoslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstanceinfoslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstancemsdeploylog.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstancemsdeploylog.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstancemsdeploylog.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstancemsdeploylog.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstancemsdeploylogslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstancemsdeploylogslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstancemsdeploylogslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstancemsdeploylogslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstancemsdeploystatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstancemsdeploystatus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstancemsdeploystatus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstancemsdeploystatus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstancemsdeploystatusslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstancemsdeploystatusslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstancemsdeploystatusslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstancemsdeploystatusslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstanceprocess.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstanceprocess.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstanceprocess.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstanceprocess.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessdump.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessdump.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessdump.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessdump.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessdumpslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessdumpslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessdumpslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessdumpslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessmodule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessmodule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessmodule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessmodule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessmoduleslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessmoduleslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessmoduleslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessmoduleslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstanceworkflowslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstanceworkflowslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getinstanceworkflowslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getinstanceworkflowslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getmigratemysqlstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getmigratemysqlstatus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getmigratemysqlstatus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getmigratemysqlstatus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getmigratemysqlstatusslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getmigratemysqlstatusslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getmigratemysqlstatusslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getmigratemysqlstatusslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getmsdeploylog.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getmsdeploylog.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getmsdeploylog.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getmsdeploylog.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getmsdeploylogslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getmsdeploylogslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getmsdeploylogslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getmsdeploylogslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getmsdeploystatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getmsdeploystatus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getmsdeploystatus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getmsdeploystatus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getmsdeploystatusslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getmsdeploystatusslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getmsdeploystatusslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getmsdeploystatusslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getnetworktraces.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getnetworktraces.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getnetworktraces.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getnetworktraces.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getnetworktracesslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getnetworktracesslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getnetworktracesslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getnetworktracesslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getnetworktracesslotv2.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getnetworktracesslotv2.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getnetworktracesslotv2.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getnetworktracesslotv2.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getnetworktracesv2.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getnetworktracesv2.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getnetworktracesv2.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getnetworktracesv2.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getonedeploystatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getonedeploystatus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getonedeploystatus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getonedeploystatus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getpremieraddon.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getpremieraddon.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getpremieraddon.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getpremieraddon.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getpremieraddonslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getpremieraddonslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getpremieraddonslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getpremieraddonslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprivateaccess.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprivateaccess.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprivateaccess.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprivateaccess.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprivateaccessslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprivateaccessslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprivateaccessslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprivateaccessslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprivateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprivateendpointconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprivateendpointconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprivateendpointconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprivateendpointconnectionlist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprivateendpointconnectionlist.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprivateendpointconnectionlist.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprivateendpointconnectionlist.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprivateendpointconnectionlistslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprivateendpointconnectionlistslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprivateendpointconnectionlistslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprivateendpointconnectionlistslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprivateendpointconnectionslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprivateendpointconnectionslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprivateendpointconnectionslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprivateendpointconnectionslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprivatelinkresources.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprivatelinkresources.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprivatelinkresources.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprivatelinkresources.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprivatelinkresourcesslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprivatelinkresourcesslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprivatelinkresourcesslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprivatelinkresourcesslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprocess.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprocess.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprocess.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprocess.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprocessdump.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprocessdump.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprocessdump.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprocessdump.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprocessdumpslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprocessdumpslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprocessdumpslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprocessdumpslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprocessmodule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprocessmodule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprocessmodule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprocessmodule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprocessmoduleslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprocessmoduleslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprocessmoduleslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprocessmoduleslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprocessslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprocessslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getprocessslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getprocessslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getpubliccertificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getpubliccertificate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getpubliccertificate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getpubliccertificate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getpubliccertificateslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getpubliccertificateslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getpubliccertificateslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getpubliccertificateslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getrelayserviceconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getrelayserviceconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getrelayserviceconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getrelayserviceconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getrelayserviceconnectionslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getrelayserviceconnectionslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getrelayserviceconnectionslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getrelayserviceconnectionslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getscmallowed.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getscmallowed.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getscmallowed.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getscmallowed.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getscmallowedslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getscmallowedslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getscmallowedslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getscmallowedslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getsiteconnectionstringkeyvaultreference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsiteconnectionstringkeyvaultreference.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getsiteconnectionstringkeyvaultreference.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsiteconnectionstringkeyvaultreference.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getsiteconnectionstringkeyvaultreferences.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsiteconnectionstringkeyvaultreferences.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getsiteconnectionstringkeyvaultreferences.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsiteconnectionstringkeyvaultreferences.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getsiteconnectionstringkeyvaultreferenceslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsiteconnectionstringkeyvaultreferenceslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getsiteconnectionstringkeyvaultreferenceslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsiteconnectionstringkeyvaultreferenceslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getsiteconnectionstringkeyvaultreferencesslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsiteconnectionstringkeyvaultreferencesslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getsiteconnectionstringkeyvaultreferencesslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsiteconnectionstringkeyvaultreferencesslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsitecontainer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsitecontainer.go new file mode 100644 index 0000000000000..9c4d7d78224ae --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsitecontainer.go @@ -0,0 +1,54 @@ +package webapps + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetSiteContainerOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *SiteContainer +} + +// GetSiteContainer ... +func (c WebAppsClient) GetSiteContainer(ctx context.Context, id SitecontainerId) (result GetSiteContainerOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model SiteContainer + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsitecontainerslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsitecontainerslot.go new file mode 100644 index 0000000000000..dc65c943da913 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsitecontainerslot.go @@ -0,0 +1,54 @@ +package webapps + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetSiteContainerSlotOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *SiteContainer +} + +// GetSiteContainerSlot ... +func (c WebAppsClient) GetSiteContainerSlot(ctx context.Context, id SlotSitecontainerId) (result GetSiteContainerSlotOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model SiteContainer + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getsiteextension.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsiteextension.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getsiteextension.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsiteextension.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getsiteextensionslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsiteextensionslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getsiteextensionslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsiteextensionslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getsitephperrorlogflag.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsitephperrorlogflag.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getsitephperrorlogflag.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsitephperrorlogflag.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getsitephperrorlogflagslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsitephperrorlogflagslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getsitephperrorlogflagslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsitephperrorlogflagslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getsourcecontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsourcecontrol.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getsourcecontrol.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsourcecontrol.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getsourcecontrolslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsourcecontrolslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getsourcecontrolslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getsourcecontrolslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getswiftvirtualnetworkconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getswiftvirtualnetworkconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getswiftvirtualnetworkconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getswiftvirtualnetworkconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getswiftvirtualnetworkconnectionslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getswiftvirtualnetworkconnectionslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getswiftvirtualnetworkconnectionslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getswiftvirtualnetworkconnectionslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_gettriggeredwebjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_gettriggeredwebjob.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_gettriggeredwebjob.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_gettriggeredwebjob.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_gettriggeredwebjobhistory.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_gettriggeredwebjobhistory.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_gettriggeredwebjobhistory.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_gettriggeredwebjobhistory.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_gettriggeredwebjobhistoryslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_gettriggeredwebjobhistoryslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_gettriggeredwebjobhistoryslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_gettriggeredwebjobhistoryslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_gettriggeredwebjobslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_gettriggeredwebjobslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_gettriggeredwebjobslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_gettriggeredwebjobslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getvnetconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getvnetconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getvnetconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getvnetconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getvnetconnectiongateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getvnetconnectiongateway.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getvnetconnectiongateway.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getvnetconnectiongateway.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getvnetconnectiongatewayslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getvnetconnectiongatewayslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getvnetconnectiongatewayslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getvnetconnectiongatewayslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getvnetconnectionslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getvnetconnectionslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getvnetconnectionslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getvnetconnectionslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getwebjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getwebjob.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getwebjob.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getwebjob.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getwebjobslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getwebjobslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getwebjobslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getwebjobslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getwebsitecontainerlogs.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getwebsitecontainerlogs.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getwebsitecontainerlogs.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getwebsitecontainerlogs.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getwebsitecontainerlogsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getwebsitecontainerlogsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getwebsitecontainerlogsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getwebsitecontainerlogsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getworkflow.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getworkflow.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_getworkflow.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_getworkflow.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_installsiteextension.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_installsiteextension.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_installsiteextension.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_installsiteextension.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_installsiteextensionslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_installsiteextensionslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_installsiteextensionslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_installsiteextensionslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_iscloneable.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_iscloneable.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_iscloneable.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_iscloneable.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_iscloneableslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_iscloneableslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_iscloneableslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_iscloneableslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listapplicationsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listapplicationsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listapplicationsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listapplicationsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listapplicationsettingsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listapplicationsettingsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listapplicationsettingsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listapplicationsettingsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listazurestorageaccounts.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listazurestorageaccounts.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listazurestorageaccounts.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listazurestorageaccounts.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listazurestorageaccountsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listazurestorageaccountsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listazurestorageaccountsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listazurestorageaccountsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listbackups.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listbackups.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listbackups.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listbackups.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listbackupsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listbackupsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listbackupsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listbackupsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listbackupstatussecrets.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listbackupstatussecrets.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listbackupstatussecrets.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listbackupstatussecrets.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listbackupstatussecretsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listbackupstatussecretsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listbackupstatussecretsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listbackupstatussecretsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listbasicpublishingcredentialspolicies.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listbasicpublishingcredentialspolicies.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listbasicpublishingcredentialspolicies.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listbasicpublishingcredentialspolicies.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listbasicpublishingcredentialspoliciesslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listbasicpublishingcredentialspoliciesslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listbasicpublishingcredentialspoliciesslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listbasicpublishingcredentialspoliciesslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listbyresourcegroup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listbyresourcegroup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listbyresourcegroup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listconfigurations.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listconfigurations.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listconfigurations.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listconfigurations.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listconfigurationsnapshotinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listconfigurationsnapshotinfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listconfigurationsnapshotinfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listconfigurationsnapshotinfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listconfigurationsnapshotinfoslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listconfigurationsnapshotinfoslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listconfigurationsnapshotinfoslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listconfigurationsnapshotinfoslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listconfigurationsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listconfigurationsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listconfigurationsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listconfigurationsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listconnectionstrings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listconnectionstrings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listconnectionstrings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listconnectionstrings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listconnectionstringsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listconnectionstringsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listconnectionstringsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listconnectionstringsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listcontinuouswebjobs.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listcontinuouswebjobs.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listcontinuouswebjobs.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listcontinuouswebjobs.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listcontinuouswebjobsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listcontinuouswebjobsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listcontinuouswebjobsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listcontinuouswebjobsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listdeploymentlog.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listdeploymentlog.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listdeploymentlog.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listdeploymentlog.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listdeploymentlogslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listdeploymentlogslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listdeploymentlogslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listdeploymentlogslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listdeployments.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listdeployments.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listdeployments.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listdeployments.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listdeploymentsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listdeploymentsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listdeploymentsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listdeploymentsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listdomainownershipidentifiers.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listdomainownershipidentifiers.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listdomainownershipidentifiers.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listdomainownershipidentifiers.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listdomainownershipidentifiersslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listdomainownershipidentifiersslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listdomainownershipidentifiersslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listdomainownershipidentifiersslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listfunctionkeys.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listfunctionkeys.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listfunctionkeys.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listfunctionkeys.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listfunctionkeysslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listfunctionkeysslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listfunctionkeysslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listfunctionkeysslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listfunctions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listfunctions.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listfunctions.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listfunctions.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listfunctionsecrets.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listfunctionsecrets.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listfunctionsecrets.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listfunctionsecrets.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listfunctionsecretsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listfunctionsecretsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listfunctionsecretsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listfunctionsecretsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listhostkeys.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listhostkeys.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listhostkeys.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listhostkeys.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listhostkeysslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listhostkeysslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listhostkeysslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listhostkeysslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listhostnamebindings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listhostnamebindings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listhostnamebindings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listhostnamebindings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listhostnamebindingsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listhostnamebindingsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listhostnamebindingsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listhostnamebindingsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listhybridconnections.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listhybridconnections.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listhybridconnections.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listhybridconnections.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listhybridconnectionsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listhybridconnectionsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listhybridconnectionsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listhybridconnectionsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listinstancefunctionsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listinstancefunctionsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listinstancefunctionsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listinstancefunctionsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listinstanceidentifiers.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listinstanceidentifiers.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listinstanceidentifiers.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listinstanceidentifiers.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listinstanceidentifiersslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listinstanceidentifiersslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listinstanceidentifiersslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listinstanceidentifiersslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listinstanceprocesses.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listinstanceprocesses.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listinstanceprocesses.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listinstanceprocesses.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listinstanceprocessesslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listinstanceprocessesslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listinstanceprocessesslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listinstanceprocessesslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listinstanceprocessmodules.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listinstanceprocessmodules.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listinstanceprocessmodules.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listinstanceprocessmodules.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listinstanceprocessmodulesslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listinstanceprocessmodulesslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listinstanceprocessmodulesslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listinstanceprocessmodulesslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listinstanceprocessthreads.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listinstanceprocessthreads.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listinstanceprocessthreads.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listinstanceprocessthreads.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listinstanceprocessthreadsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listinstanceprocessthreadsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listinstanceprocessthreadsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listinstanceprocessthreadsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listinstanceworkflowsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listinstanceworkflowsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listinstanceworkflowsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listinstanceworkflowsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listmetadata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listmetadata.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listmetadata.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listmetadata.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listmetadataslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listmetadataslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listmetadataslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listmetadataslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listnetworkfeatures.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listnetworkfeatures.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listnetworkfeatures.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listnetworkfeatures.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listnetworkfeaturesslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listnetworkfeaturesslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listnetworkfeaturesslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listnetworkfeaturesslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listperfmoncounters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listperfmoncounters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listperfmoncounters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listperfmoncounters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listperfmoncountersslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listperfmoncountersslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listperfmoncountersslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listperfmoncountersslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listpremieraddons.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listpremieraddons.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listpremieraddons.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listpremieraddons.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listpremieraddonsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listpremieraddonsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listpremieraddonsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listpremieraddonsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listprocesses.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listprocesses.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listprocesses.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listprocesses.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listprocessesslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listprocessesslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listprocessesslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listprocessesslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listprocessmodules.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listprocessmodules.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listprocessmodules.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listprocessmodules.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listprocessmodulesslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listprocessmodulesslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listprocessmodulesslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listprocessmodulesslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listprocessthreads.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listprocessthreads.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listprocessthreads.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listprocessthreads.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listprocessthreadsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listprocessthreadsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listprocessthreadsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listprocessthreadsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listproductionsitedeploymentstatuses.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listproductionsitedeploymentstatuses.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listproductionsitedeploymentstatuses.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listproductionsitedeploymentstatuses.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listpubliccertificates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listpubliccertificates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listpubliccertificates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listpubliccertificates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listpubliccertificatesslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listpubliccertificatesslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listpubliccertificatesslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listpubliccertificatesslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listpublishingcredentials.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listpublishingcredentials.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listpublishingcredentials.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listpublishingcredentials.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listpublishingcredentialsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listpublishingcredentialsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listpublishingcredentialsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listpublishingcredentialsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listpublishingprofilexmlwithsecrets.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listpublishingprofilexmlwithsecrets.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listpublishingprofilexmlwithsecrets.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listpublishingprofilexmlwithsecrets.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listpublishingprofilexmlwithsecretsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listpublishingprofilexmlwithsecretsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listpublishingprofilexmlwithsecretsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listpublishingprofilexmlwithsecretsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listrelayserviceconnections.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listrelayserviceconnections.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listrelayserviceconnections.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listrelayserviceconnections.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listrelayserviceconnectionsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listrelayserviceconnectionsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listrelayserviceconnectionsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listrelayserviceconnectionsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsitebackups.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsitebackups.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsitebackups.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsitebackups.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsitebackupsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsitebackupsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsitebackupsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsitebackupsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsitecontainers.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsitecontainers.go new file mode 100644 index 0000000000000..b5451f754a5de --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsitecontainers.go @@ -0,0 +1,106 @@ +package webapps + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListSiteContainersOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]SiteContainer +} + +type ListSiteContainersCompleteResult struct { + LatestHttpResponse *http.Response + Items []SiteContainer +} + +type ListSiteContainersCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListSiteContainersCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListSiteContainers ... +func (c WebAppsClient) ListSiteContainers(ctx context.Context, id commonids.AppServiceId) (result ListSiteContainersOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListSiteContainersCustomPager{}, + Path: fmt.Sprintf("%s/sitecontainers", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]SiteContainer `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListSiteContainersComplete retrieves all the results into a single object +func (c WebAppsClient) ListSiteContainersComplete(ctx context.Context, id commonids.AppServiceId) (ListSiteContainersCompleteResult, error) { + return c.ListSiteContainersCompleteMatchingPredicate(ctx, id, SiteContainerOperationPredicate{}) +} + +// ListSiteContainersCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c WebAppsClient) ListSiteContainersCompleteMatchingPredicate(ctx context.Context, id commonids.AppServiceId, predicate SiteContainerOperationPredicate) (result ListSiteContainersCompleteResult, err error) { + items := make([]SiteContainer, 0) + + resp, err := c.ListSiteContainers(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListSiteContainersCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsitecontainersslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsitecontainersslot.go new file mode 100644 index 0000000000000..ad7e84da3efb1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsitecontainersslot.go @@ -0,0 +1,105 @@ +package webapps + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListSiteContainersSlotOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]SiteContainer +} + +type ListSiteContainersSlotCompleteResult struct { + LatestHttpResponse *http.Response + Items []SiteContainer +} + +type ListSiteContainersSlotCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListSiteContainersSlotCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListSiteContainersSlot ... +func (c WebAppsClient) ListSiteContainersSlot(ctx context.Context, id SlotId) (result ListSiteContainersSlotOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListSiteContainersSlotCustomPager{}, + Path: fmt.Sprintf("%s/sitecontainers", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]SiteContainer `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListSiteContainersSlotComplete retrieves all the results into a single object +func (c WebAppsClient) ListSiteContainersSlotComplete(ctx context.Context, id SlotId) (ListSiteContainersSlotCompleteResult, error) { + return c.ListSiteContainersSlotCompleteMatchingPredicate(ctx, id, SiteContainerOperationPredicate{}) +} + +// ListSiteContainersSlotCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c WebAppsClient) ListSiteContainersSlotCompleteMatchingPredicate(ctx context.Context, id SlotId, predicate SiteContainerOperationPredicate) (result ListSiteContainersSlotCompleteResult, err error) { + items := make([]SiteContainer, 0) + + resp, err := c.ListSiteContainersSlot(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListSiteContainersSlotCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsiteextensions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsiteextensions.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsiteextensions.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsiteextensions.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsiteextensionsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsiteextensionsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsiteextensionsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsiteextensionsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsitepushsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsitepushsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsitepushsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsitepushsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsitepushsettingsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsitepushsettingsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsitepushsettingsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsitepushsettingsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listslotconfigurationnames.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listslotconfigurationnames.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listslotconfigurationnames.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listslotconfigurationnames.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listslotdifferencesfromproduction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listslotdifferencesfromproduction.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listslotdifferencesfromproduction.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listslotdifferencesfromproduction.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listslotdifferencesslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listslotdifferencesslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listslotdifferencesslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listslotdifferencesslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listslots.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listslots.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listslots.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listslots.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listslotsitedeploymentstatusesslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listslotsitedeploymentstatusesslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listslotsitedeploymentstatusesslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listslotsitedeploymentstatusesslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsnapshots.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsnapshots.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsnapshots.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsnapshots.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsnapshotsfromdrsecondary.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsnapshotsfromdrsecondary.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsnapshotsfromdrsecondary.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsnapshotsfromdrsecondary.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsnapshotsfromdrsecondaryslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsnapshotsfromdrsecondaryslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsnapshotsfromdrsecondaryslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsnapshotsfromdrsecondaryslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsnapshotsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsnapshotsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsnapshotsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsnapshotsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsyncfunctiontriggers.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsyncfunctiontriggers.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsyncfunctiontriggers.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsyncfunctiontriggers.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsyncfunctiontriggersslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsyncfunctiontriggersslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsyncfunctiontriggersslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsyncfunctiontriggersslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsyncstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsyncstatus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsyncstatus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsyncstatus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsyncstatusslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsyncstatusslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listsyncstatusslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listsyncstatusslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listtriggeredwebjobhistory.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listtriggeredwebjobhistory.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listtriggeredwebjobhistory.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listtriggeredwebjobhistory.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listtriggeredwebjobhistoryslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listtriggeredwebjobhistoryslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listtriggeredwebjobhistoryslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listtriggeredwebjobhistoryslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listtriggeredwebjobs.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listtriggeredwebjobs.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listtriggeredwebjobs.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listtriggeredwebjobs.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listtriggeredwebjobsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listtriggeredwebjobsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listtriggeredwebjobsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listtriggeredwebjobsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listusages.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listusages.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listusages.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listusages.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listusagesslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listusagesslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listusagesslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listusagesslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listvnetconnections.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listvnetconnections.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listvnetconnections.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listvnetconnections.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listvnetconnectionsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listvnetconnectionsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listvnetconnectionsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listvnetconnectionsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listwebjobs.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listwebjobs.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listwebjobs.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listwebjobs.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listwebjobsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listwebjobsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listwebjobsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listwebjobsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listworkflows.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listworkflows.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listworkflows.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listworkflows.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listworkflowsconnections.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listworkflowsconnections.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listworkflowsconnections.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listworkflowsconnections.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listworkflowsconnectionsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listworkflowsconnectionsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_listworkflowsconnectionsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_listworkflowsconnectionsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_migratemysql.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_migratemysql.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_migratemysql.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_migratemysql.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_migratestorage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_migratestorage.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_migratestorage.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_migratestorage.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_putprivateaccessvnet.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_putprivateaccessvnet.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_putprivateaccessvnet.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_putprivateaccessvnet.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_putprivateaccessvnetslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_putprivateaccessvnetslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_putprivateaccessvnetslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_putprivateaccessvnetslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_recoversiteconfigurationsnapshot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_recoversiteconfigurationsnapshot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_recoversiteconfigurationsnapshot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_recoversiteconfigurationsnapshot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_recoversiteconfigurationsnapshotslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_recoversiteconfigurationsnapshotslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_recoversiteconfigurationsnapshotslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_recoversiteconfigurationsnapshotslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_resetproductionslotconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_resetproductionslotconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_resetproductionslotconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_resetproductionslotconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_resetslotconfigurationslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_resetslotconfigurationslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_resetslotconfigurationslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_resetslotconfigurationslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_restart.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_restart.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_restart.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_restart.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_restartslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_restartslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_restartslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_restartslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_restore.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_restore.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_restore.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_restore.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_restorefrombackupblob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_restorefrombackupblob.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_restorefrombackupblob.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_restorefrombackupblob.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_restorefrombackupblobslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_restorefrombackupblobslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_restorefrombackupblobslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_restorefrombackupblobslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_restorefromdeletedapp.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_restorefromdeletedapp.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_restorefromdeletedapp.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_restorefromdeletedapp.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_restorefromdeletedappslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_restorefromdeletedappslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_restorefromdeletedappslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_restorefromdeletedappslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_restoreslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_restoreslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_restoreslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_restoreslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_restoresnapshot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_restoresnapshot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_restoresnapshot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_restoresnapshot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_restoresnapshotslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_restoresnapshotslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_restoresnapshotslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_restoresnapshotslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_runtriggeredwebjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_runtriggeredwebjob.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_runtriggeredwebjob.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_runtriggeredwebjob.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_runtriggeredwebjobslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_runtriggeredwebjobslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_runtriggeredwebjobslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_runtriggeredwebjobslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_start.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_start.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_start.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_start.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_startcontinuouswebjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_startcontinuouswebjob.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_startcontinuouswebjob.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_startcontinuouswebjob.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_startcontinuouswebjobslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_startcontinuouswebjobslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_startcontinuouswebjobslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_startcontinuouswebjobslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_startnetworktrace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_startnetworktrace.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_startnetworktrace.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_startnetworktrace.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_startnetworktraceslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_startnetworktraceslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_startnetworktraceslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_startnetworktraceslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_startslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_startslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_startslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_startslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_startwebsitenetworktrace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_startwebsitenetworktrace.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_startwebsitenetworktrace.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_startwebsitenetworktrace.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_startwebsitenetworktraceoperation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_startwebsitenetworktraceoperation.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_startwebsitenetworktraceoperation.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_startwebsitenetworktraceoperation.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_startwebsitenetworktraceoperationslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_startwebsitenetworktraceoperationslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_startwebsitenetworktraceoperationslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_startwebsitenetworktraceoperationslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_startwebsitenetworktraceslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_startwebsitenetworktraceslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_startwebsitenetworktraceslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_startwebsitenetworktraceslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_stop.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_stop.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_stop.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_stop.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_stopcontinuouswebjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_stopcontinuouswebjob.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_stopcontinuouswebjob.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_stopcontinuouswebjob.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_stopcontinuouswebjobslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_stopcontinuouswebjobslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_stopcontinuouswebjobslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_stopcontinuouswebjobslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_stopnetworktrace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_stopnetworktrace.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_stopnetworktrace.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_stopnetworktrace.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_stopnetworktraceslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_stopnetworktraceslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_stopnetworktraceslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_stopnetworktraceslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_stopslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_stopslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_stopslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_stopslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_stopwebsitenetworktrace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_stopwebsitenetworktrace.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_stopwebsitenetworktrace.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_stopwebsitenetworktrace.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_stopwebsitenetworktraceslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_stopwebsitenetworktraceslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_stopwebsitenetworktraceslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_stopwebsitenetworktraceslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_swapslotslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_swapslotslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_swapslotslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_swapslotslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_swapslotwithproduction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_swapslotwithproduction.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_swapslotwithproduction.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_swapslotwithproduction.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_syncfunctions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_syncfunctions.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_syncfunctions.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_syncfunctions.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_syncfunctionsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_syncfunctionsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_syncfunctionsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_syncfunctionsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_syncfunctiontriggers.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_syncfunctiontriggers.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_syncfunctiontriggers.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_syncfunctiontriggers.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_syncfunctiontriggersslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_syncfunctiontriggersslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_syncfunctiontriggersslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_syncfunctiontriggersslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_syncrepository.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_syncrepository.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_syncrepository.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_syncrepository.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_syncrepositoryslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_syncrepositoryslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_syncrepositoryslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_syncrepositoryslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateapplicationsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateapplicationsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateapplicationsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateapplicationsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateapplicationsettingsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateapplicationsettingsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateapplicationsettingsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateapplicationsettingsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateauthsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateauthsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateauthsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateauthsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateauthsettingsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateauthsettingsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateauthsettingsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateauthsettingsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateauthsettingsv2.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateauthsettingsv2.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateauthsettingsv2.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateauthsettingsv2.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateauthsettingsv2slot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateauthsettingsv2slot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateauthsettingsv2slot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateauthsettingsv2slot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateazurestorageaccounts.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateazurestorageaccounts.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateazurestorageaccounts.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateazurestorageaccounts.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateazurestorageaccountsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateazurestorageaccountsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateazurestorageaccountsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateazurestorageaccountsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatebackupconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatebackupconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatebackupconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatebackupconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatebackupconfigurationslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatebackupconfigurationslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatebackupconfigurationslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatebackupconfigurationslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateconfigurationslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateconfigurationslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateconfigurationslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateconfigurationslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateconnectionstrings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateconnectionstrings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateconnectionstrings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateconnectionstrings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateconnectionstringsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateconnectionstringsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateconnectionstringsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateconnectionstringsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatediagnosticlogsconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatediagnosticlogsconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatediagnosticlogsconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatediagnosticlogsconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatediagnosticlogsconfigslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatediagnosticlogsconfigslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatediagnosticlogsconfigslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatediagnosticlogsconfigslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatedomainownershipidentifier.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatedomainownershipidentifier.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatedomainownershipidentifier.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatedomainownershipidentifier.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatedomainownershipidentifierslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatedomainownershipidentifierslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatedomainownershipidentifierslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatedomainownershipidentifierslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateftpallowed.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateftpallowed.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateftpallowed.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateftpallowed.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateftpallowedslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateftpallowedslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateftpallowedslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateftpallowedslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatehybridconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatehybridconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatehybridconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatehybridconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatehybridconnectionslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatehybridconnectionslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatehybridconnectionslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatehybridconnectionslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatemetadata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatemetadata.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatemetadata.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatemetadata.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatemetadataslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatemetadataslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatemetadataslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatemetadataslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatepremieraddon.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatepremieraddon.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatepremieraddon.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatepremieraddon.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatepremieraddonslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatepremieraddonslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatepremieraddonslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatepremieraddonslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updaterelayserviceconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updaterelayserviceconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updaterelayserviceconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updaterelayserviceconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updaterelayserviceconnectionslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updaterelayserviceconnectionslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updaterelayserviceconnectionslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updaterelayserviceconnectionslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatescmallowed.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatescmallowed.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatescmallowed.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatescmallowed.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatescmallowedslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatescmallowedslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatescmallowedslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatescmallowedslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatesitepushsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatesitepushsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatesitepushsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatesitepushsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatesitepushsettingsslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatesitepushsettingsslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatesitepushsettingsslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatesitepushsettingsslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateslotconfigurationnames.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateslotconfigurationnames.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateslotconfigurationnames.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateslotconfigurationnames.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatesourcecontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatesourcecontrol.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatesourcecontrol.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatesourcecontrol.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatesourcecontrolslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatesourcecontrolslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatesourcecontrolslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatesourcecontrolslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheck.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheck.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheck.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheck.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheckslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheckslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheckslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheckslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatevnetconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatevnetconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatevnetconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatevnetconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatevnetconnectiongateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatevnetconnectiongateway.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatevnetconnectiongateway.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatevnetconnectiongateway.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatevnetconnectiongatewayslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatevnetconnectiongatewayslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatevnetconnectiongatewayslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatevnetconnectiongatewayslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatevnetconnectionslot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatevnetconnectionslot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/method_updatevnetconnectionslot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/method_updatevnetconnectionslot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_allowedaudiencesvalidation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_allowedaudiencesvalidation.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_allowedaudiencesvalidation.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_allowedaudiencesvalidation.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_allowedprincipals.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_allowedprincipals.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_allowedprincipals.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_allowedprincipals.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_apidefinitioninfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_apidefinitioninfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_apidefinitioninfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_apidefinitioninfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_apikvreference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_apikvreference.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_apikvreference.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_apikvreference.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_apikvreferenceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_apikvreferenceproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_apikvreferenceproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_apikvreferenceproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_apimanagementconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_apimanagementconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_apimanagementconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_apimanagementconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_apple.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_apple.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_apple.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_apple.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_appleregistration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_appleregistration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_appleregistration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_appleregistration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_applicationlogsconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_applicationlogsconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_applicationlogsconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_applicationlogsconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_appregistration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_appregistration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_appregistration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_appregistration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_armidwrapper.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_armidwrapper.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_armidwrapper.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_armidwrapper.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_authplatform.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_authplatform.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_authplatform.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_authplatform.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_autohealactions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_autohealactions.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_autohealactions.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_autohealactions.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_autohealcustomaction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_autohealcustomaction.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_autohealcustomaction.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_autohealcustomaction.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_autohealrules.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_autohealrules.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_autohealrules.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_autohealrules.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_autohealtriggers.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_autohealtriggers.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_autohealtriggers.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_autohealtriggers.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_azureactivedirectory.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_azureactivedirectory.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_azureactivedirectory.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_azureactivedirectory.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_azureactivedirectorylogin.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_azureactivedirectorylogin.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_azureactivedirectorylogin.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_azureactivedirectorylogin.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_azureactivedirectoryregistration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_azureactivedirectoryregistration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_azureactivedirectoryregistration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_azureactivedirectoryregistration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_azureactivedirectoryvalidation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_azureactivedirectoryvalidation.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_azureactivedirectoryvalidation.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_azureactivedirectoryvalidation.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_azureblobstorageapplicationlogsconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_azureblobstorageapplicationlogsconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_azureblobstorageapplicationlogsconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_azureblobstorageapplicationlogsconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_azureblobstoragehttplogsconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_azureblobstoragehttplogsconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_azureblobstoragehttplogsconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_azureblobstoragehttplogsconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_azurestaticwebapps.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_azurestaticwebapps.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_azurestaticwebapps.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_azurestaticwebapps.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_azurestaticwebappsregistration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_azurestaticwebappsregistration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_azurestaticwebappsregistration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_azurestaticwebappsregistration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_azurestorageinfovalue.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_azurestorageinfovalue.go new file mode 100644 index 0000000000000..e92f9c01952a9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_azurestorageinfovalue.go @@ -0,0 +1,14 @@ +package webapps + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureStorageInfoValue struct { + AccessKey *string `json:"accessKey,omitempty"` + AccountName *string `json:"accountName,omitempty"` + MountPath *string `json:"mountPath,omitempty"` + Protocol *AzureStorageProtocol `json:"protocol,omitempty"` + ShareName *string `json:"shareName,omitempty"` + State *AzureStorageState `json:"state,omitempty"` + Type *AzureStorageType `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_azurestoragepropertydictionaryresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_azurestoragepropertydictionaryresource.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_azurestoragepropertydictionaryresource.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_azurestoragepropertydictionaryresource.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_azuretablestorageapplicationlogsconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_azuretablestorageapplicationlogsconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_azuretablestorageapplicationlogsconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_azuretablestorageapplicationlogsconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_backupitem.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_backupitem.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_backupitem.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_backupitem.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_backupitemproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_backupitemproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_backupitemproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_backupitemproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_backuprequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_backuprequest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_backuprequest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_backuprequest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_backuprequestproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_backuprequestproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_backuprequestproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_backuprequestproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_backupschedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_backupschedule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_backupschedule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_backupschedule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_blobstoragetokenstore.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_blobstoragetokenstore.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_blobstoragetokenstore.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_blobstoragetokenstore.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_clientregistration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_clientregistration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_clientregistration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_clientregistration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_cloninginfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_cloninginfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_cloninginfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_cloninginfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_connectionstringdictionary.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_connectionstringdictionary.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_connectionstringdictionary.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_connectionstringdictionary.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_connstringinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_connstringinfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_connstringinfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_connstringinfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_connstringvaluetypepair.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_connstringvaluetypepair.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_connstringvaluetypepair.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_connstringvaluetypepair.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_containercpustatistics.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_containercpustatistics.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_containercpustatistics.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_containercpustatistics.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_containercpuusage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_containercpuusage.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_containercpuusage.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_containercpuusage.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_containerinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_containerinfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_containerinfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_containerinfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_containermemorystatistics.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_containermemorystatistics.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_containermemorystatistics.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_containermemorystatistics.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_containernetworkinterfacestatistics.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_containernetworkinterfacestatistics.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_containernetworkinterfacestatistics.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_containernetworkinterfacestatistics.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_containerthrottlingdata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_containerthrottlingdata.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_containerthrottlingdata.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_containerthrottlingdata.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_continuouswebjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_continuouswebjob.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_continuouswebjob.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_continuouswebjob.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_continuouswebjobproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_continuouswebjobproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_continuouswebjobproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_continuouswebjobproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_cookieexpiration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_cookieexpiration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_cookieexpiration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_cookieexpiration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_corssettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_corssettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_corssettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_corssettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_csmdeploymentstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_csmdeploymentstatus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_csmdeploymentstatus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_csmdeploymentstatus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_csmdeploymentstatusproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_csmdeploymentstatusproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_csmdeploymentstatusproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_csmdeploymentstatusproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_csmpublishingcredentialspoliciesentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_csmpublishingcredentialspoliciesentity.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_csmpublishingcredentialspoliciesentity.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_csmpublishingcredentialspoliciesentity.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_csmpublishingcredentialspoliciesentityproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_csmpublishingcredentialspoliciesentityproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_csmpublishingcredentialspoliciesentityproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_csmpublishingcredentialspoliciesentityproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_csmpublishingprofileoptions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_csmpublishingprofileoptions.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_csmpublishingprofileoptions.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_csmpublishingprofileoptions.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_csmslotentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_csmslotentity.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_csmslotentity.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_csmslotentity.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_csmusagequota.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_csmusagequota.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_csmusagequota.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_csmusagequota.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_customhostnameanalysisresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_customhostnameanalysisresult.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_customhostnameanalysisresult.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_customhostnameanalysisresult.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_customhostnameanalysisresultproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_customhostnameanalysisresultproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_customhostnameanalysisresultproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_customhostnameanalysisresultproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_customopenidconnectprovider.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_customopenidconnectprovider.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_customopenidconnectprovider.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_customopenidconnectprovider.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_daprconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_daprconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_daprconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_daprconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_databasebackupsetting.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_databasebackupsetting.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_databasebackupsetting.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_databasebackupsetting.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_defaultauthorizationpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_defaultauthorizationpolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_defaultauthorizationpolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_defaultauthorizationpolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_deletedapprestorerequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_deletedapprestorerequest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_deletedapprestorerequest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_deletedapprestorerequest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_deletedapprestorerequestproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_deletedapprestorerequestproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_deletedapprestorerequestproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_deletedapprestorerequestproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_deployment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_deployment.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_deployment.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_deployment.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_deploymentproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_deploymentproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_deploymentproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_deploymentproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_enabledconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_enabledconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_enabledconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_enabledconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_environmentvariable.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_environmentvariable.go new file mode 100644 index 0000000000000..44c25f7e4c1ee --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_environmentvariable.go @@ -0,0 +1,9 @@ +package webapps + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EnvironmentVariable struct { + Name string `json:"name"` + Value string `json:"value"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_errorentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_errorentity.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_errorentity.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_errorentity.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_experiments.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_experiments.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_experiments.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_experiments.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_extendedlocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_extendedlocation.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_extendedlocation.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_extendedlocation.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_facebook.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_facebook.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_facebook.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_facebook.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_filesystemapplicationlogsconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_filesystemapplicationlogsconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_filesystemapplicationlogsconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_filesystemapplicationlogsconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_filesystemhttplogsconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_filesystemhttplogsconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_filesystemhttplogsconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_filesystemhttplogsconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_filesystemtokenstore.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_filesystemtokenstore.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_filesystemtokenstore.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_filesystemtokenstore.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_forwardproxy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_forwardproxy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_forwardproxy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_forwardproxy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionappconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionappconfig.go new file mode 100644 index 0000000000000..598987c0273d5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionappconfig.go @@ -0,0 +1,10 @@ +package webapps + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FunctionAppConfig struct { + Deployment *FunctionsDeployment `json:"deployment,omitempty"` + Runtime *FunctionsRuntime `json:"runtime,omitempty"` + ScaleAndConcurrency *FunctionsScaleAndConcurrency `json:"scaleAndConcurrency,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_functionenvelope.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionenvelope.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_functionenvelope.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionenvelope.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_functionenvelopeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionenvelopeproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_functionenvelopeproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionenvelopeproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsalwaysreadyconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsalwaysreadyconfig.go new file mode 100644 index 0000000000000..b8121838cd67a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsalwaysreadyconfig.go @@ -0,0 +1,9 @@ +package webapps + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FunctionsAlwaysReadyConfig struct { + InstanceCount *int64 `json:"instanceCount,omitempty"` + Name *string `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsdeployment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsdeployment.go new file mode 100644 index 0000000000000..fa7c6e12a333d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsdeployment.go @@ -0,0 +1,8 @@ +package webapps + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FunctionsDeployment struct { + Storage *FunctionsDeploymentStorage `json:"storage,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsdeploymentstorage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsdeploymentstorage.go new file mode 100644 index 0000000000000..b8752386166ff --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsdeploymentstorage.go @@ -0,0 +1,10 @@ +package webapps + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FunctionsDeploymentStorage struct { + Authentication *FunctionsDeploymentStorageAuthentication `json:"authentication,omitempty"` + Type *FunctionsDeploymentStorageType `json:"type,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsdeploymentstorageauthentication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsdeploymentstorageauthentication.go new file mode 100644 index 0000000000000..087a9f1559f06 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsdeploymentstorageauthentication.go @@ -0,0 +1,10 @@ +package webapps + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FunctionsDeploymentStorageAuthentication struct { + StorageAccountConnectionStringName *string `json:"storageAccountConnectionStringName,omitempty"` + Type *AuthenticationType `json:"type,omitempty"` + UserAssignedIdentityResourceId *string `json:"userAssignedIdentityResourceId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_functionsecrets.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsecrets.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_functionsecrets.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsecrets.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsruntime.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsruntime.go new file mode 100644 index 0000000000000..025981cf91c75 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsruntime.go @@ -0,0 +1,9 @@ +package webapps + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FunctionsRuntime struct { + Name *RuntimeName `json:"name,omitempty"` + Version *string `json:"version,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsscaleandconcurrency.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsscaleandconcurrency.go new file mode 100644 index 0000000000000..2d29b194fcc04 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsscaleandconcurrency.go @@ -0,0 +1,11 @@ +package webapps + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FunctionsScaleAndConcurrency struct { + AlwaysReady *[]FunctionsAlwaysReadyConfig `json:"alwaysReady,omitempty"` + InstanceMemoryMB *int64 `json:"instanceMemoryMB,omitempty"` + MaximumInstanceCount *int64 `json:"maximumInstanceCount,omitempty"` + Triggers *FunctionsScaleAndConcurrencyTriggers `json:"triggers,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsscaleandconcurrencytriggers.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsscaleandconcurrencytriggers.go new file mode 100644 index 0000000000000..070def9b6d2c3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsscaleandconcurrencytriggers.go @@ -0,0 +1,8 @@ +package webapps + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FunctionsScaleAndConcurrencyTriggers struct { + HTTP *FunctionsScaleAndConcurrencyTriggersHTTP `json:"http,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsscaleandconcurrencytriggershttp.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsscaleandconcurrencytriggershttp.go new file mode 100644 index 0000000000000..e5d499bf429a2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_functionsscaleandconcurrencytriggershttp.go @@ -0,0 +1,8 @@ +package webapps + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FunctionsScaleAndConcurrencyTriggersHTTP struct { + PerInstanceConcurrency *int64 `json:"perInstanceConcurrency,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_github.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_github.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_github.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_github.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_githubactioncodeconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_githubactioncodeconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_githubactioncodeconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_githubactioncodeconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_githubactionconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_githubactionconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_githubactionconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_githubactionconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_githubactioncontainerconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_githubactioncontainerconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_githubactioncontainerconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_githubactioncontainerconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_globalvalidation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_globalvalidation.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_globalvalidation.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_globalvalidation.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_google.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_google.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_google.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_google.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_handlermapping.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_handlermapping.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_handlermapping.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_handlermapping.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_hostingenvironmentprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_hostingenvironmentprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_hostingenvironmentprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_hostingenvironmentprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_hostkeys.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_hostkeys.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_hostkeys.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_hostkeys.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_hostnamebinding.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_hostnamebinding.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_hostnamebinding.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_hostnamebinding.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_hostnamebindingproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_hostnamebindingproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_hostnamebindingproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_hostnamebindingproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_hostnamesslstate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_hostnamesslstate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_hostnamesslstate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_hostnamesslstate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_httplogsconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_httplogsconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_httplogsconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_httplogsconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_httpsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_httpsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_httpsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_httpsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_httpsettingsroutes.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_httpsettingsroutes.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_httpsettingsroutes.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_httpsettingsroutes.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_hybridconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_hybridconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_hybridconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_hybridconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_hybridconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_hybridconnectionproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_hybridconnectionproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_hybridconnectionproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_identifier.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_identifier.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_identifier.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_identifier.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_identifierproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_identifierproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_identifierproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_identifierproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_identityproviders.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_identityproviders.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_identityproviders.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_identityproviders.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_ipsecurityrestriction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_ipsecurityrestriction.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_ipsecurityrestriction.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_ipsecurityrestriction.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_jwtclaimchecks.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_jwtclaimchecks.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_jwtclaimchecks.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_jwtclaimchecks.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_keyinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_keyinfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_keyinfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_keyinfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_legacymicrosoftaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_legacymicrosoftaccount.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_legacymicrosoftaccount.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_legacymicrosoftaccount.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_localizablestring.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_localizablestring.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_localizablestring.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_localizablestring.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_login.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_login.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_login.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_login.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_loginroutes.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_loginroutes.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_loginroutes.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_loginroutes.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_loginscopes.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_loginscopes.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_loginscopes.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_loginscopes.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_migratemysqlrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_migratemysqlrequest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_migratemysqlrequest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_migratemysqlrequest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_migratemysqlrequestproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_migratemysqlrequestproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_migratemysqlrequestproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_migratemysqlrequestproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_migratemysqlstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_migratemysqlstatus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_migratemysqlstatus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_migratemysqlstatus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_migratemysqlstatusproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_migratemysqlstatusproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_migratemysqlstatusproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_migratemysqlstatusproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_msdeploy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_msdeploy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_msdeploy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_msdeploy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_msdeploycore.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_msdeploycore.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_msdeploycore.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_msdeploycore.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_msdeploylog.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_msdeploylog.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_msdeploylog.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_msdeploylog.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_msdeploylogentry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_msdeploylogentry.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_msdeploylogentry.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_msdeploylogentry.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_msdeploylogproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_msdeploylogproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_msdeploylogproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_msdeploylogproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_msdeployproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_msdeployproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_msdeployproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_msdeployproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_msdeploystatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_msdeploystatus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_msdeploystatus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_msdeploystatus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_msdeploystatusproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_msdeploystatusproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_msdeploystatusproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_msdeploystatusproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_namevaluepair.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_namevaluepair.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_namevaluepair.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_namevaluepair.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_networkfeatures.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_networkfeatures.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_networkfeatures.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_networkfeatures.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_networkfeaturesproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_networkfeaturesproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_networkfeaturesproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_networkfeaturesproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_networktrace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_networktrace.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_networktrace.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_networktrace.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_nonce.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_nonce.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_nonce.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_nonce.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_openidconnectclientcredential.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_openidconnectclientcredential.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_openidconnectclientcredential.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_openidconnectclientcredential.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_openidconnectconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_openidconnectconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_openidconnectconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_openidconnectconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_openidconnectlogin.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_openidconnectlogin.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_openidconnectlogin.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_openidconnectlogin.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_openidconnectregistration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_openidconnectregistration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_openidconnectregistration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_openidconnectregistration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_operation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_operation.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_operation.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_operation.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_perfmonresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_perfmonresponse.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_perfmonresponse.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_perfmonresponse.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_perfmonsample.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_perfmonsample.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_perfmonsample.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_perfmonsample.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_perfmonset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_perfmonset.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_perfmonset.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_perfmonset.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_premieraddon.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_premieraddon.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_premieraddon.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_premieraddon.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_premieraddonpatchresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_premieraddonpatchresource.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_premieraddonpatchresource.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_premieraddonpatchresource.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_premieraddonpatchresourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_premieraddonpatchresourceproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_premieraddonpatchresourceproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_premieraddonpatchresourceproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_premieraddonproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_premieraddonproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_premieraddonproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_premieraddonproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_privateaccess.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_privateaccess.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_privateaccess.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_privateaccess.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_privateaccessproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_privateaccessproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_privateaccessproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_privateaccessproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_privateaccesssubnet.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_privateaccesssubnet.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_privateaccesssubnet.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_privateaccesssubnet.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_privateaccessvirtualnetwork.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_privateaccessvirtualnetwork.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_privateaccessvirtualnetwork.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_privateaccessvirtualnetwork.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_privatelinkconnectionstate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_privatelinkconnectionstate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_privatelinkconnectionstate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_privatelinkconnectionstate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_privatelinkresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_privatelinkresource.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_privatelinkresource.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_privatelinkresource.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_privatelinkresourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_privatelinkresourceproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_privatelinkresourceproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_privatelinkresourceproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_privatelinkresourceswrapper.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_privatelinkresourceswrapper.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_privatelinkresourceswrapper.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_privatelinkresourceswrapper.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_processinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_processinfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_processinfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_processinfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_processinfoproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_processinfoproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_processinfoproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_processinfoproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_processmoduleinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_processmoduleinfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_processmoduleinfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_processmoduleinfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_processmoduleinfoproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_processmoduleinfoproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_processmoduleinfoproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_processmoduleinfoproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_processthreadinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_processthreadinfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_processthreadinfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_processthreadinfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_processthreadinfoproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_processthreadinfoproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_processthreadinfoproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_processthreadinfoproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_publiccertificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_publiccertificate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_publiccertificate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_publiccertificate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_publiccertificateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_publiccertificateproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_publiccertificateproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_publiccertificateproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_pushsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_pushsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_pushsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_pushsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_pushsettingsproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_pushsettingsproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_pushsettingsproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_pushsettingsproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_rampuprule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_rampuprule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_rampuprule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_rampuprule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_relayserviceconnectionentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_relayserviceconnectionentity.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_relayserviceconnectionentity.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_relayserviceconnectionentity.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_relayserviceconnectionentityproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_relayserviceconnectionentityproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_relayserviceconnectionentityproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_relayserviceconnectionentityproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_remoteprivateendpointconnectionarmresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_remoteprivateendpointconnectionarmresource.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_remoteprivateendpointconnectionarmresource.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_remoteprivateendpointconnectionarmresource.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_remoteprivateendpointconnectionarmresourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_remoteprivateendpointconnectionarmresourceproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_remoteprivateendpointconnectionarmresourceproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_remoteprivateendpointconnectionarmresourceproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_requestsbasedtrigger.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_requestsbasedtrigger.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_requestsbasedtrigger.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_requestsbasedtrigger.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_resourceconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_resourceconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_resourceconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_resourceconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_restorerequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_restorerequest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_restorerequest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_restorerequest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_restorerequestproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_restorerequestproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_restorerequestproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_restorerequestproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_site.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_site.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_site.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_site.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_siteauthsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_siteauthsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_siteauthsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_siteauthsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_siteauthsettingsproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_siteauthsettingsproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_siteauthsettingsproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_siteauthsettingsproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_siteauthsettingsv2.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_siteauthsettingsv2.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_siteauthsettingsv2.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_siteauthsettingsv2.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_siteauthsettingsv2properties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_siteauthsettingsv2properties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_siteauthsettingsv2properties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_siteauthsettingsv2properties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_sitecloneability.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitecloneability.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_sitecloneability.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitecloneability.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_sitecloneabilitycriterion.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitecloneabilitycriterion.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_sitecloneabilitycriterion.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitecloneabilitycriterion.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_siteconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_siteconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_siteconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_siteconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_siteconfigresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_siteconfigresource.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_siteconfigresource.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_siteconfigresource.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_siteconfigurationsnapshotinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_siteconfigurationsnapshotinfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_siteconfigurationsnapshotinfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_siteconfigurationsnapshotinfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_siteconfigurationsnapshotinfoproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_siteconfigurationsnapshotinfoproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_siteconfigurationsnapshotinfoproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_siteconfigurationsnapshotinfoproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitecontainer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitecontainer.go new file mode 100644 index 0000000000000..ab2c105b488a7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitecontainer.go @@ -0,0 +1,12 @@ +package webapps + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SiteContainer struct { + Id *string `json:"id,omitempty"` + Kind *string `json:"kind,omitempty"` + Name *string `json:"name,omitempty"` + Properties *SiteContainerProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitecontainerproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitecontainerproperties.go new file mode 100644 index 0000000000000..ea67ce1a7e2cc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitecontainerproperties.go @@ -0,0 +1,49 @@ +package webapps + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SiteContainerProperties struct { + AuthType *AuthType `json:"authType,omitempty"` + CreatedTime *string `json:"createdTime,omitempty"` + EnvironmentVariables *[]EnvironmentVariable `json:"environmentVariables,omitempty"` + Image string `json:"image"` + IsMain bool `json:"isMain"` + LastModifiedTime *string `json:"lastModifiedTime,omitempty"` + PasswordSecret *string `json:"passwordSecret,omitempty"` + StartUpCommand *string `json:"startUpCommand,omitempty"` + TargetPort *string `json:"targetPort,omitempty"` + UserManagedIdentityClientId *string `json:"userManagedIdentityClientId,omitempty"` + UserName *string `json:"userName,omitempty"` + VolumeMounts *[]VolumeMount `json:"volumeMounts,omitempty"` +} + +func (o *SiteContainerProperties) GetCreatedTimeAsTime() (*time.Time, error) { + if o.CreatedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreatedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *SiteContainerProperties) SetCreatedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreatedTime = &formatted +} + +func (o *SiteContainerProperties) GetLastModifiedTimeAsTime() (*time.Time, error) { + if o.LastModifiedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.LastModifiedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *SiteContainerProperties) SetLastModifiedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.LastModifiedTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitednsconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitednsconfig.go new file mode 100644 index 0000000000000..e378e356c3f67 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitednsconfig.go @@ -0,0 +1,13 @@ +package webapps + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SiteDnsConfig struct { + DnsAltServer *string `json:"dnsAltServer,omitempty"` + DnsLegacySortOrder *bool `json:"dnsLegacySortOrder,omitempty"` + DnsMaxCacheTimeout *int64 `json:"dnsMaxCacheTimeout,omitempty"` + DnsRetryAttemptCount *int64 `json:"dnsRetryAttemptCount,omitempty"` + DnsRetryAttemptTimeout *int64 `json:"dnsRetryAttemptTimeout,omitempty"` + DnsServers *[]string `json:"dnsServers,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_siteextensioninfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_siteextensioninfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_siteextensioninfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_siteextensioninfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_siteextensioninfoproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_siteextensioninfoproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_siteextensioninfoproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_siteextensioninfoproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_sitelimits.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitelimits.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_sitelimits.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitelimits.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_sitelogsconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitelogsconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_sitelogsconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitelogsconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_sitelogsconfigproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitelogsconfigproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_sitelogsconfigproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitelogsconfigproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_sitemachinekey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitemachinekey.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_sitemachinekey.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitemachinekey.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_sitepatchresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitepatchresource.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_sitepatchresource.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitepatchresource.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_sitepatchresourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitepatchresourceproperties.go similarity index 98% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_sitepatchresourceproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitepatchresourceproperties.go index f9d877d4c32d6..77ba3270f28de 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_sitepatchresourceproperties.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitepatchresourceproperties.go @@ -20,6 +20,7 @@ type SitePatchResourceProperties struct { CustomDomainVerificationId *string `json:"customDomainVerificationId,omitempty"` DailyMemoryTimeQuota *int64 `json:"dailyMemoryTimeQuota,omitempty"` DefaultHostName *string `json:"defaultHostName,omitempty"` + DnsConfiguration *SiteDnsConfig `json:"dnsConfiguration,omitempty"` Enabled *bool `json:"enabled,omitempty"` EnabledHostNames *[]string `json:"enabledHostNames,omitempty"` HTTPSOnly *bool `json:"httpsOnly,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_sitephperrorlogflag.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitephperrorlogflag.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_sitephperrorlogflag.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitephperrorlogflag.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_sitephperrorlogflagproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitephperrorlogflagproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_sitephperrorlogflagproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitephperrorlogflagproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_siteproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_siteproperties.go new file mode 100644 index 0000000000000..dcb3e020b678c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_siteproperties.go @@ -0,0 +1,89 @@ +package webapps + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SiteProperties struct { + AvailabilityState *SiteAvailabilityState `json:"availabilityState,omitempty"` + ClientAffinityEnabled *bool `json:"clientAffinityEnabled,omitempty"` + ClientCertEnabled *bool `json:"clientCertEnabled,omitempty"` + ClientCertExclusionPaths *string `json:"clientCertExclusionPaths,omitempty"` + ClientCertMode *ClientCertMode `json:"clientCertMode,omitempty"` + CloningInfo *CloningInfo `json:"cloningInfo,omitempty"` + ContainerSize *int64 `json:"containerSize,omitempty"` + CustomDomainVerificationId *string `json:"customDomainVerificationId,omitempty"` + DailyMemoryTimeQuota *int64 `json:"dailyMemoryTimeQuota,omitempty"` + DaprConfig *DaprConfig `json:"daprConfig,omitempty"` + DefaultHostName *string `json:"defaultHostName,omitempty"` + DnsConfiguration *SiteDnsConfig `json:"dnsConfiguration,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + EnabledHostNames *[]string `json:"enabledHostNames,omitempty"` + FunctionAppConfig *FunctionAppConfig `json:"functionAppConfig,omitempty"` + HTTPSOnly *bool `json:"httpsOnly,omitempty"` + HostNameSslStates *[]HostNameSslState `json:"hostNameSslStates,omitempty"` + HostNames *[]string `json:"hostNames,omitempty"` + HostNamesDisabled *bool `json:"hostNamesDisabled,omitempty"` + HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` + HyperV *bool `json:"hyperV,omitempty"` + InProgressOperationId *string `json:"inProgressOperationId,omitempty"` + IsDefaultContainer *bool `json:"isDefaultContainer,omitempty"` + IsXenon *bool `json:"isXenon,omitempty"` + KeyVaultReferenceIdentity *string `json:"keyVaultReferenceIdentity,omitempty"` + LastModifiedTimeUtc *string `json:"lastModifiedTimeUtc,omitempty"` + ManagedEnvironmentId *string `json:"managedEnvironmentId,omitempty"` + MaxNumberOfWorkers *int64 `json:"maxNumberOfWorkers,omitempty"` + OutboundIPAddresses *string `json:"outboundIpAddresses,omitempty"` + PossibleOutboundIPAddresses *string `json:"possibleOutboundIpAddresses,omitempty"` + PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` + RedundancyMode *RedundancyMode `json:"redundancyMode,omitempty"` + RepositorySiteName *string `json:"repositorySiteName,omitempty"` + Reserved *bool `json:"reserved,omitempty"` + ResourceConfig *ResourceConfig `json:"resourceConfig,omitempty"` + ResourceGroup *string `json:"resourceGroup,omitempty"` + ScmSiteAlsoStopped *bool `json:"scmSiteAlsoStopped,omitempty"` + ServerFarmId *string `json:"serverFarmId,omitempty"` + SiteConfig *SiteConfig `json:"siteConfig,omitempty"` + SlotSwapStatus *SlotSwapStatus `json:"slotSwapStatus,omitempty"` + State *string `json:"state,omitempty"` + StorageAccountRequired *bool `json:"storageAccountRequired,omitempty"` + SuspendedTill *string `json:"suspendedTill,omitempty"` + TargetSwapSlot *string `json:"targetSwapSlot,omitempty"` + TrafficManagerHostNames *[]string `json:"trafficManagerHostNames,omitempty"` + UsageState *UsageState `json:"usageState,omitempty"` + VirtualNetworkSubnetId *string `json:"virtualNetworkSubnetId,omitempty"` + VnetBackupRestoreEnabled *bool `json:"vnetBackupRestoreEnabled,omitempty"` + VnetContentShareEnabled *bool `json:"vnetContentShareEnabled,omitempty"` + VnetImagePullEnabled *bool `json:"vnetImagePullEnabled,omitempty"` + VnetRouteAllEnabled *bool `json:"vnetRouteAllEnabled,omitempty"` + WorkloadProfileName *string `json:"workloadProfileName,omitempty"` +} + +func (o *SiteProperties) GetLastModifiedTimeUtcAsTime() (*time.Time, error) { + if o.LastModifiedTimeUtc == nil { + return nil, nil + } + return dates.ParseAsFormat(o.LastModifiedTimeUtc, "2006-01-02T15:04:05Z07:00") +} + +func (o *SiteProperties) SetLastModifiedTimeUtcAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.LastModifiedTimeUtc = &formatted +} + +func (o *SiteProperties) GetSuspendedTillAsTime() (*time.Time, error) { + if o.SuspendedTill == nil { + return nil, nil + } + return dates.ParseAsFormat(o.SuspendedTill, "2006-01-02T15:04:05Z07:00") +} + +func (o *SiteProperties) SetSuspendedTillAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.SuspendedTill = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_sitesourcecontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitesourcecontrol.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_sitesourcecontrol.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitesourcecontrol.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_sitesourcecontrolproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitesourcecontrolproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_sitesourcecontrolproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_sitesourcecontrolproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_slotconfignames.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_slotconfignames.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_slotconfignames.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_slotconfignames.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_slotconfignamesresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_slotconfignamesresource.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_slotconfignamesresource.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_slotconfignamesresource.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_slotdifference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_slotdifference.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_slotdifference.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_slotdifference.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_slotdifferenceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_slotdifferenceproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_slotdifferenceproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_slotdifferenceproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_slotswapstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_slotswapstatus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_slotswapstatus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_slotswapstatus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_slowrequestsbasedtrigger.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_slowrequestsbasedtrigger.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_slowrequestsbasedtrigger.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_slowrequestsbasedtrigger.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_snapshot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_snapshot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_snapshot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_snapshot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_snapshotproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_snapshotproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_snapshotproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_snapshotproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_snapshotrecoverysource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_snapshotrecoverysource.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_snapshotrecoverysource.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_snapshotrecoverysource.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_snapshotrestorerequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_snapshotrestorerequest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_snapshotrestorerequest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_snapshotrestorerequest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_snapshotrestorerequestproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_snapshotrestorerequestproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_snapshotrestorerequestproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_snapshotrestorerequestproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_statuscodesbasedtrigger.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_statuscodesbasedtrigger.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_statuscodesbasedtrigger.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_statuscodesbasedtrigger.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_statuscodesrangebasedtrigger.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_statuscodesrangebasedtrigger.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_statuscodesrangebasedtrigger.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_statuscodesrangebasedtrigger.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_storagemigrationoptions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_storagemigrationoptions.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_storagemigrationoptions.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_storagemigrationoptions.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_storagemigrationoptionsproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_storagemigrationoptionsproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_storagemigrationoptionsproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_storagemigrationoptionsproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_storagemigrationresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_storagemigrationresponse.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_storagemigrationresponse.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_storagemigrationresponse.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_storagemigrationresponseproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_storagemigrationresponseproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_storagemigrationresponseproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_storagemigrationresponseproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_stringdictionary.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_stringdictionary.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_stringdictionary.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_stringdictionary.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_swiftvirtualnetwork.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_swiftvirtualnetwork.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_swiftvirtualnetwork.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_swiftvirtualnetwork.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_swiftvirtualnetworkproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_swiftvirtualnetworkproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_swiftvirtualnetworkproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_swiftvirtualnetworkproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_tokenstore.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_tokenstore.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_tokenstore.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_tokenstore.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_triggeredjobhistory.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_triggeredjobhistory.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_triggeredjobhistory.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_triggeredjobhistory.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_triggeredjobhistoryproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_triggeredjobhistoryproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_triggeredjobhistoryproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_triggeredjobhistoryproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_triggeredjobrun.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_triggeredjobrun.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_triggeredjobrun.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_triggeredjobrun.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_triggeredwebjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_triggeredwebjob.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_triggeredwebjob.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_triggeredwebjob.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_triggeredwebjobproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_triggeredwebjobproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_triggeredwebjobproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_triggeredwebjobproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_twitter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_twitter.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_twitter.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_twitter.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_twitterregistration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_twitterregistration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_twitterregistration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_twitterregistration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_user.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_user.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_user.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_user.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_userproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_userproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_userproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_userproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_virtualapplication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_virtualapplication.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_virtualapplication.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_virtualapplication.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_virtualdirectory.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_virtualdirectory.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_virtualdirectory.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_virtualdirectory.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_vnetgateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_vnetgateway.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_vnetgateway.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_vnetgateway.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_vnetgatewayproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_vnetgatewayproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_vnetgatewayproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_vnetgatewayproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_vnetinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_vnetinfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_vnetinfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_vnetinfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_vnetinforesource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_vnetinforesource.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_vnetinforesource.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_vnetinforesource.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_vnetroute.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_vnetroute.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_vnetroute.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_vnetroute.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_vnetrouteproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_vnetrouteproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_vnetrouteproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_vnetrouteproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_volumemount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_volumemount.go new file mode 100644 index 0000000000000..fd0456dd18e56 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_volumemount.go @@ -0,0 +1,11 @@ +package webapps + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VolumeMount struct { + ContainerMountPath string `json:"containerMountPath"` + Data *string `json:"data,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` + VolumeSubPath string `json:"volumeSubPath"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_webjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_webjob.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_webjob.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_webjob.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_webjobproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_webjobproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_webjobproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_webjobproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_websiteinstancestatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_websiteinstancestatus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_websiteinstancestatus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_websiteinstancestatus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_websiteinstancestatusproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_websiteinstancestatusproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_websiteinstancestatusproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_websiteinstancestatusproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_workflowartifacts.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_workflowartifacts.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_workflowartifacts.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_workflowartifacts.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_workflowenvelope.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_workflowenvelope.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_workflowenvelope.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_workflowenvelope.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_workflowenvelopeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_workflowenvelopeproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_workflowenvelopeproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_workflowenvelopeproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_workflowhealth.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_workflowhealth.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps/model_workflowhealth.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/model_workflowhealth.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/predicates.go new file mode 100644 index 0000000000000..3961c0e0cfd5e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/predicates.go @@ -0,0 +1,788 @@ +package webapps + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ApiKVReferenceOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p ApiKVReferenceOperationPredicate) Matches(input ApiKVReference) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type BackupItemOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p BackupItemOperationPredicate) Matches(input BackupItem) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type ContinuousWebJobOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p ContinuousWebJobOperationPredicate) Matches(input ContinuousWebJob) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type CsmDeploymentStatusOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p CsmDeploymentStatusOperationPredicate) Matches(input CsmDeploymentStatus) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type CsmPublishingCredentialsPoliciesEntityOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p CsmPublishingCredentialsPoliciesEntityOperationPredicate) Matches(input CsmPublishingCredentialsPoliciesEntity) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type CsmUsageQuotaOperationPredicate struct { + CurrentValue *int64 + Limit *int64 + NextResetTime *string + Unit *string +} + +func (p CsmUsageQuotaOperationPredicate) Matches(input CsmUsageQuota) bool { + + if p.CurrentValue != nil && (input.CurrentValue == nil || *p.CurrentValue != *input.CurrentValue) { + return false + } + + if p.Limit != nil && (input.Limit == nil || *p.Limit != *input.Limit) { + return false + } + + if p.NextResetTime != nil && (input.NextResetTime == nil || *p.NextResetTime != *input.NextResetTime) { + return false + } + + if p.Unit != nil && (input.Unit == nil || *p.Unit != *input.Unit) { + return false + } + + return true +} + +type DeploymentOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p DeploymentOperationPredicate) Matches(input Deployment) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type FunctionEnvelopeOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p FunctionEnvelopeOperationPredicate) Matches(input FunctionEnvelope) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type HostNameBindingOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p HostNameBindingOperationPredicate) Matches(input HostNameBinding) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type IdentifierOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p IdentifierOperationPredicate) Matches(input Identifier) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type PerfMonResponseOperationPredicate struct { + Code *string + Message *string +} + +func (p PerfMonResponseOperationPredicate) Matches(input PerfMonResponse) bool { + + if p.Code != nil && (input.Code == nil || *p.Code != *input.Code) { + return false + } + + if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { + return false + } + + return true +} + +type ProcessInfoOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p ProcessInfoOperationPredicate) Matches(input ProcessInfo) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type ProcessModuleInfoOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p ProcessModuleInfoOperationPredicate) Matches(input ProcessModuleInfo) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type ProcessThreadInfoOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p ProcessThreadInfoOperationPredicate) Matches(input ProcessThreadInfo) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type PublicCertificateOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p PublicCertificateOperationPredicate) Matches(input PublicCertificate) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type RemotePrivateEndpointConnectionARMResourceOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p RemotePrivateEndpointConnectionARMResourceOperationPredicate) Matches(input RemotePrivateEndpointConnectionARMResource) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type SiteOperationPredicate struct { + Id *string + Kind *string + Location *string + Name *string + Type *string +} + +func (p SiteOperationPredicate) Matches(input Site) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type SiteConfigResourceOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p SiteConfigResourceOperationPredicate) Matches(input SiteConfigResource) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type SiteConfigurationSnapshotInfoOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p SiteConfigurationSnapshotInfoOperationPredicate) Matches(input SiteConfigurationSnapshotInfo) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type SiteContainerOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p SiteContainerOperationPredicate) Matches(input SiteContainer) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type SiteExtensionInfoOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p SiteExtensionInfoOperationPredicate) Matches(input SiteExtensionInfo) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type SlotDifferenceOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p SlotDifferenceOperationPredicate) Matches(input SlotDifference) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type SnapshotOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p SnapshotOperationPredicate) Matches(input Snapshot) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type TriggeredJobHistoryOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p TriggeredJobHistoryOperationPredicate) Matches(input TriggeredJobHistory) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type TriggeredWebJobOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p TriggeredWebJobOperationPredicate) Matches(input TriggeredWebJob) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type WebJobOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p WebJobOperationPredicate) Matches(input WebJob) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type WebSiteInstanceStatusOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string +} + +func (p WebSiteInstanceStatusOperationPredicate) Matches(input WebSiteInstanceStatus) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type WorkflowEnvelopeOperationPredicate struct { + Id *string + Kind *string + Location *string + Name *string + Type *string +} + +func (p WorkflowEnvelopeOperationPredicate) Matches(input WorkflowEnvelope) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/version.go new file mode 100644 index 0000000000000..3cc70e92e92f1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps/version.go @@ -0,0 +1,12 @@ +package webapps + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-12-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/webapps/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/msgraph/client.go b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/msgraph/client.go index 3cf67d08f25dc..0a74b22cad1c8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/msgraph/client.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/msgraph/client.go @@ -35,7 +35,7 @@ type Client struct { tenantId string } -func NewMsGraphClient(api environments.Api, serviceName string, apiVersion ApiVersion) (*Client, error) { +func NewClient(api environments.Api, serviceName string, apiVersion ApiVersion) (*Client, error) { endpoint, ok := api.Endpoint() if !ok { return nil, fmt.Errorf("no `endpoint` was returned for this environment") @@ -49,6 +49,11 @@ func NewMsGraphClient(api environments.Api, serviceName string, apiVersion ApiVe }, nil } +// Deprecated: use NewClient instead +func NewMsGraphClient(api environments.Api, serviceName string, apiVersion ApiVersion) (*Client, error) { + return NewClient(api, serviceName, apiVersion) +} + func (c *Client) NewRequest(ctx context.Context, input client.RequestOptions) (*client.Request, error) { // TODO move these validations to base client method if _, ok := ctx.Deadline(); !ok { diff --git a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/client.go b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/client.go index 8c9b67a9c4fe6..9cd3335f1ba84 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/client.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/client.go @@ -23,7 +23,7 @@ type Client struct { apiVersion string } -func NewResourceManagerClient(api environments.Api, serviceName, apiVersion string) (*Client, error) { +func NewClient(api environments.Api, serviceName, apiVersion string) (*Client, error) { endpoint, ok := api.Endpoint() if !ok { return nil, fmt.Errorf("no `endpoint` was returned for this environment") @@ -38,6 +38,11 @@ func NewResourceManagerClient(api environments.Api, serviceName, apiVersion stri }, nil } +// Deprecated: use NewClient instead +func NewResourceManagerClient(api environments.Api, serviceName, apiVersion string) (*Client, error) { + return NewClient(api, serviceName, apiVersion) +} + func (c *Client) NewRequest(ctx context.Context, input client.RequestOptions) (*client.Request, error) { // TODO move these validations to base client method if _, ok := ctx.Deadline(); !ok { diff --git a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/poller_lro_statuses.go b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/poller_lro_statuses.go index bc9806bed6edc..3b0ecec14ba26 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/poller_lro_statuses.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/poller_lro_statuses.go @@ -25,6 +25,9 @@ var longRunningOperationCustomStatuses = map[status]pollers.PollingStatus{ // NetAppVolumeReplication @ 2023-05-01 returns `AuthorizeReplication` during authorizing replication "AuthorizeReplication": pollers.PollingStatusInProgress, + // VMWare @ 2022-05-01 returns `Building` rather than `InProgress` during creation + "Building": pollers.PollingStatusInProgress, + // NetAppVolumeReplication @ 2023-05-01 returns `BreakReplication` during breaking replication "BreakReplication": pollers.PollingStatusInProgress, diff --git a/vendor/modules.txt b/vendor/modules.txt index 244123ac46f81..b876fa68c7f95 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -8,13 +8,10 @@ github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2020-04-01 github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2021-06-01-preview/policy github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/v3.0/security github.com/Azure/azure-sdk-for-go/services/preview/securityinsight/mgmt/2021-09-01-preview/securityinsight -github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql -github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql github.com/Azure/azure-sdk-for-go/services/preview/synapse/mgmt/v2.0/synapse github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-07-10/siterecovery github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2021-12-01/backup -github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementgroups github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-06-01/resources github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-02-01/web github.com/Azure/azure-sdk-for-go/version @@ -151,14 +148,13 @@ github.com/hashicorp/go-azure-helpers/resourcemanager/tags github.com/hashicorp/go-azure-helpers/resourcemanager/zones github.com/hashicorp/go-azure-helpers/sender github.com/hashicorp/go-azure-helpers/storage -# github.com/hashicorp/go-azure-sdk/resource-manager v0.20240731.1212841 +# github.com/hashicorp/go-azure-sdk/resource-manager v0.20240906.1232634 ## explicit; go 1.21 github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/getrecommendations -github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules -github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements +github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups @@ -239,6 +235,7 @@ github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2022-04-01/role github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2022-05-01-preview/roledefinitions github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofileassignments github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehciassignments +github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofiles github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/webhook github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/agentregistrationinformation @@ -351,8 +348,8 @@ github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmac github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachines github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesetrollingupgrades -github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesetvms +github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2019-10-01/budgets github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/certificates @@ -362,6 +359,7 @@ github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/dapr github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/jobs github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironments github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages +github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-03-01/managedenvironments github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2023-05-01/containerinstance github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview @@ -370,18 +368,22 @@ github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01- github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/runs github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/taskruns github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/tasks -github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview -github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries -github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines -github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines -github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/operation -github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns -github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections -github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries -github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications -github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps -github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens -github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks +github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview +github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives +github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions +github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules +github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries +github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets +github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines +github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines +github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/operation +github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns +github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections +github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries +github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications +github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps +github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens +github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-07-01/cacherules github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-07-01/credentialsets github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2019-08-01/containerservices @@ -395,15 +397,15 @@ github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-p github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/resolveprivatelinkserviceid github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/snapshots github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/trustedaccess -github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools -github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations -github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters -github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-04-01 github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-04-01/fleetmembers github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-04-01/fleets github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-04-01/fleetupdatestrategies github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-04-01/updateruns +github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools +github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations +github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters +github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/mongorbacs @@ -564,10 +566,21 @@ github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/mach github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/machines github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privateendpointconnections github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privatelinkscopes +github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10 +github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions +github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles +github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses +github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions +github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade +github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile +github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines +github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration +github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections +github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources +github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes github.com/hashicorp/go-azure-sdk/resource-manager/hybridkubernetes/2021-10-01/connectedclusters github.com/hashicorp/go-azure-sdk/resource-manager/hybridkubernetes/2024-01-01/connectedclusters github.com/hashicorp/go-azure-sdk/resource-manager/insights/2015-04-01/activitylogs -github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles github.com/hashicorp/go-azure-sdk/resource-manager/insights/2018-03-01/metricalerts github.com/hashicorp/go-azure-sdk/resource-manager/insights/2018-04-16/scheduledqueryrules github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources @@ -596,10 +609,6 @@ github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/managedprivateendpoints github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/scripts -github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab -github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan -github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule -github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2022-12-01 github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2022-12-01/loadtests github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2022-12-01/quotas @@ -616,9 +625,6 @@ github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrations github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers -github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors -github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount -github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/datastore github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/workspaces @@ -631,34 +637,11 @@ github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2023-01-31 github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2023-01-31/managedidentities github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2022-10-01/registrationassignments github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2022-10-01/registrationdefinitions +github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups github.com/hashicorp/go-azure-sdk/resource-manager/maps/2023-06-01/accounts github.com/hashicorp/go-azure-sdk/resource-manager/maps/2023-06-01/creators -github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations -github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases -github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers -github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules github.com/hashicorp/go-azure-sdk/resource-manager/marketplaceordering/2015-06-01/agreements -github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01 -github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters -github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts -github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters -github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies -github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings -github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents -github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs -github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints -github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators -github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01 -github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings -github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01 -github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters -github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters -github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies -github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents -github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs -github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints -github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-01-01/machines github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-01-01/runasaccounts github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource @@ -717,7 +700,6 @@ github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroup github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication -github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/applicationsecuritygroups github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/azurefirewalls github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/ddosprotectionplans @@ -846,15 +828,16 @@ github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/vpnserverc github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/vpnsites github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/webapplicationfirewallpolicies github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/webcategories +github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts github.com/hashicorp/go-azure-sdk/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors github.com/hashicorp/go-azure-sdk/resource-manager/networkfunction/2022-11-01/collectorpolicies github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/monitors github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/tagrules -github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview -github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate -github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration -github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis -github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment +github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview +github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate +github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration +github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis +github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2023-09-01/hubs github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2023-09-01/namespaces github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/querypackqueries @@ -930,8 +913,8 @@ github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/private github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/recordsets github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/virtualnetworklinks github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account -github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults +github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs @@ -939,16 +922,16 @@ github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-0 github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxy -github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics -github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings -github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks -github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies -github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems -github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings -github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers -github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans -github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders -github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting +github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics +github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings +github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks +github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies +github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems +github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings +github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers +github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans +github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders +github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting github.com/hashicorp/go-azure-sdk/resource-manager/redhatopenshift/2023-09-04/openshiftclusters github.com/hashicorp/go-azure-sdk/resource-manager/redis/2024-03-01 github.com/hashicorp/go-azure-sdk/resource-manager/redis/2024-03-01/aad @@ -1010,20 +993,44 @@ github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-11-01/ github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-11-01/frontendsinterface github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr -github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies -github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases -github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies -github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools -github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies -github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies -github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks -github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases -github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators -github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications -github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies -github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers -github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies -github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions +github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinegroups github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines @@ -1059,8 +1066,6 @@ github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/endpo github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/jobdefinitions github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/projects github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/storagemovers -github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools -github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/cloudendpointresource github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/registeredserverresource github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/serverendpointresource @@ -1093,8 +1098,6 @@ github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15 github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/geographichierarchies github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles -github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules -github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/authorizations github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/clusters github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/datastores @@ -1104,10 +1107,10 @@ github.com/hashicorp/go-azure-sdk/resource-manager/voiceservices/2023-04-03/test github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/managedapis github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceenvironments -github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/resourceproviders github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/staticsites -github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps +github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans +github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01 github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01 @@ -1122,7 +1125,7 @@ github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplands github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances -# github.com/hashicorp/go-azure-sdk/sdk v0.20240731.1212841 +# github.com/hashicorp/go-azure-sdk/sdk v0.20240906.1232634 ## explicit; go 1.21 github.com/hashicorp/go-azure-sdk/sdk/auth github.com/hashicorp/go-azure-sdk/sdk/auth/autorest diff --git a/website/allowed-subcategories b/website/allowed-subcategories index bc4c66a96283b..88d32c2f4c4db 100644 --- a/website/allowed-subcategories +++ b/website/allowed-subcategories @@ -48,7 +48,6 @@ Desktop Virtualization Dev Center Dev Test Digital Twins -Disks Elastic Elastic SAN Extended Location @@ -61,19 +60,16 @@ Hybrid Compute IoT Central IoT Hub Key Vault -Lab Service Lighthouse Load Balancer Load Test Log Analytics Logic App -Logz Machine Learning Maintenance Managed Applications Management Maps -Media Messaging Mixed Reality Mobile Network @@ -108,8 +104,6 @@ Stream Analytics Synapse System Center Virtual Machine Manager Template -Time Series Insights -Video Analyzer Voice Services Web PubSub Workloads \ No newline at end of file diff --git a/website/docs/d/app_service_environment.html.markdown b/website/docs/d/app_service_environment.html.markdown deleted file mode 100644 index 04ed30a95bf71..0000000000000 --- a/website/docs/d/app_service_environment.html.markdown +++ /dev/null @@ -1,68 +0,0 @@ ---- -subcategory: "App Service (Web Apps)" -layout: "azurerm" -page_title: "Azure Resource Manager: Data Source: azurerm_app_service_environment" -description: |- - Gets information about an existing App Service Environment. ---- - -# Data Source: azurerm_app_service_environment - -Use this data source to access information about an existing App Service Environment. - -## Example Usage - -```hcl -data "azurerm_app_service_environment" "example" { - name = "existing-ase" - resource_group_name = "existing-rg" -} - -output "id" { - value = data.azurerm_app_service_environment.example.id -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `name` - (Required) The name of this App Service Environment. - -* `resource_group_name` - (Required) The name of the Resource Group where the App Service Environment exists. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the App Service Environment. - -* `cluster_setting` - Zero or more `cluster_setting` blocks as defined below. - -* `front_end_scale_factor` - The number of app instances per App Service Environment Front End. - -* `internal_ip_address` - IP address of internal load balancer of the App Service Environment. - -* `location` - The Azure Region where the App Service Environment exists. - -* `outbound_ip_addresses` - List of outbound IP addresses of the App Service Environment. - -* `pricing_tier` - The Pricing Tier (Isolated SKU) of the App Service Environment. - -* `service_ip_address` - IP address of service endpoint of the App Service Environment. - -* `tags` - A mapping of tags assigned to the App Service Environment. - ---- - -A `cluster_setting` block exports the following: - -* `name` - The name of the Cluster Setting. - -* `value` - The value for the Cluster Setting. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `read` - (Defaults to 5 minutes) Used when retrieving the App Service Environment. diff --git a/website/docs/d/eventhub_namespace.html.markdown b/website/docs/d/eventhub_namespace.html.markdown index 061f62a243ad6..ec09aebede3e5 100644 --- a/website/docs/d/eventhub_namespace.html.markdown +++ b/website/docs/d/eventhub_namespace.html.markdown @@ -42,8 +42,6 @@ output "eventhub_namespace_id" { * `maximum_throughput_units` - Specifies the maximum number of throughput units when Auto Inflate is Enabled. -* `zone_redundant` - Is this EventHub Namespace deployed across Availability Zones? - * `dedicated_cluster_id` - The ID of the EventHub Dedicated Cluster where this Namespace exists. * `local_authentication_enabled` - Is this EventHub Namespace SAS authentication enabled? diff --git a/website/docs/d/hybrid_compute_machine.html.markdown b/website/docs/d/hybrid_compute_machine.html.markdown deleted file mode 100644 index 1305d4d924095..0000000000000 --- a/website/docs/d/hybrid_compute_machine.html.markdown +++ /dev/null @@ -1,240 +0,0 @@ ---- -subcategory: "Hybrid Compute" -layout: "azurerm" -page_title: "Azure Resource Manager: Data Source: azurerm_hybrid_compute_machine" -description: |- - Gets information about an existing hybrid compute machine. ---- - -# Data Source: azurerm_hybrid_compute_machine - -Use this data source to access information about an existing Hybrid Compute. - -## Disclaimers - --> **Note:** The Data Source `azurerm_hybrid_compute_machine` is deprecated will be removed in v4.0 of the Azure Provider - a replacement can be found in the form of the [`azurerm_arc_machine`](arc_machine.html) Data Source. - -## Example Usage - -```hcl -data "azurerm_hybrid_compute_machine" "example" { - name = "existing-hcmachine" - resource_group_name = "existing-rg" -} - -output "id" { - value = data.azurerm_hybrid_compute_machine.example.id -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `name` - (Required) The name of this hybrid compute machine. - -* `resource_group_name` - (Required) The name of the Resource Group where the Hybrid Compute exists. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the hybrid compute machine. - -* `ad_fqdn` - Specifies the AD fully qualified display name. - -* `agent_configuration` - A `agent_configuration` block as defined below. - -* `agent_version` - The hybrid machine agent full version. - -* `client_public_key` - Public Key that the client provides to be used during initial resource onboarding. - -* `cloud_metadata` - A `cloud_metadata` block as defined below. - -* `detected_properties` - A `detected_properties` block as defined below. - -* `display_name` - Specifies the hybrid machine display name. - -* `dns_fqdn` - Specifies the DNS fully qualified display name. - -* `domain_name` - Specifies the Windows domain name. - -* `error_details` - A `error_details` block as defined below. - -* `identity` - A `identity` block as defined below. - -* `last_status_change` - The time of the last status change. - -* `location` - The Azure Region where the hybrid compute machine exists. - -* `location_data` - A `location_data` block as defined below. - -* `machine_fqdn` - Specifies the hybrid machine fully qualified display name. - -* `mssql_discovered` - Specifies whether any MS SQL instance is discovered on the machine. - -* `os_name` - The Operating System running on the hybrid machine. - -* `os_profile` - A `os_profile` block as defined below. - -* `os_sku` - Specifies the Operating System product SKU. - -* `os_type` - The type of Operating System. Possible values are `windows` and `linux`. - -* `os_version` - The version of Operating System running on the hybrid machine. - -* `parent_cluster_resource_id` - The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. - -* `private_link_scope_resource_id` - The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. - -* `service_status` - A `service_status` block as defined below. - -* `status` - The status of the hybrid machine agent. - -* `tags` - A mapping of tags assigned to the Hybrid Compute. - -* `vm_id` - Specifies the hybrid machine unique ID. - -* `vm_uuid` - Specifies the Arc Machine's unique SMBIOS ID. - ---- - -A `additional_info` block exports the following: - -* `info` - The additional information message. - -* `type` - The additional information type. - ---- - -A `agent_configuration` block exports the following: - -* `extensions_allow_list` - A `extensions_allow_list` block as defined below. - -* `extensions_block_list` - A `extensions_block_list` block as defined below. - -* `extensions_enabled` - Specifies whether the extension service is enabled or disabled. - -* `guest_configuration_enabled` - Specified whether the guest configuration service is enabled or disabled. - -* `incoming_connections_ports` - Specifies the list of ports that the agent will be able to listen on. - -* `proxy_bypass` - List of service names which should not use the specified proxy server. - -* `proxy_url` - Specifies the URL of the proxy to be used. - ---- - -A `cloud_metadata` block exports the following: - -* `provider` - Specifies the cloud provider. For example `Azure`, `AWS` and `GCP`. - ---- - -A `error_details` block exports the following: - -* `additional_info` - A `additional_info` block as defined above. - -* `code` - The error code. - -* `message` - The error message. - -* `target` - The error target. - ---- - -A `extension_service` block exports the following: - -* `startup_type` - The behavior of the service when the Arc-enabled machine starts up. - -* `status` - The current status of the service. - ---- - -A `extensions_allow_list` block exports the following: - -* `publisher` - Publisher of the extension. - -* `type` - Type of the extension. - ---- - -A `extensions_block_list` block exports the following: - -* `publisher` - Publisher of the extension. - -* `type` - Type of the extension. - ---- - -A `guest_configuration_service` block exports the following: - -* `startup_type` - The behavior of the service when the Arc-enabled machine starts up. - -* `status` - The current status of the service. - ---- - -A `identity` block exports the following: - -* `principal_id` - The principal ID of resource identity. - -* `tenant_id` - The tenant ID of resource. - -* `type` - The identity type. - ---- - -A `linux_configuration` block exports the following: - -* `patch_settings` - A `patch_settings` block as defined below. - ---- - -A `location_data` block exports the following: - -* `city` - The city or locality where the resource is located. - -* `country_or_region` - The country or region where the resource is located. - -* `district` - The district, state, or province where the resource is located. - -* `name` - A canonical name for the geographic or physical location. - ---- - -A `os_profile` block exports the following: - -* `computer_name` - Specifies the host OS name of the hybrid machine. - -* `linux_configuration` - A `linux_configuration` block as defined above. - -* `windows_configuration` - A `windows_configuration` block as defined below. - ---- - -A `patch_settings` block exports the following: - -* `assessment_mode` - Specifies the assessment mode. - -* `patch_mode` - Specifies the patch mode. - ---- - -A `service_status` block exports the following: - -* `extension_service` - A `extension_service` block as defined above. - -* `guest_configuration_service` - A `guest_configuration_service` block as defined above. - ---- - -A `windows_configuration` block exports the following: - -* `patch_settings` - A `patch_settings` block as defined above. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `read` - (Defaults to 5 minutes) Used when retrieving the Hybrid Compute. diff --git a/website/docs/d/kubernetes_cluster.html.markdown b/website/docs/d/kubernetes_cluster.html.markdown index 1985203f440db..3550ec06b3f9a 100644 --- a/website/docs/d/kubernetes_cluster.html.markdown +++ b/website/docs/d/kubernetes_cluster.html.markdown @@ -130,9 +130,9 @@ An `agent_pool_profile` block exports the following: * `max_pods` - The maximum number of pods that can run on each agent. -* `enable_auto_scaling` - If the auto-scaler is enabled. +* `auto_scaling_enabled` - If the auto-scaler is enabled. -* `enable_node_public_ip` - If the Public IPs for the nodes in this Agent Pool are enabled. +* `node_public_ip_enabled` - If the Public IPs for the nodes in this Agent Pool are enabled. * `host_group_id` - The ID of a Dedicated Host Group that this Node Pool should be run on. Changing this forces a new resource to be created. @@ -164,18 +164,12 @@ An `agent_pool_profile` block exports the following: An `azure_active_directory_role_based_access_control` block exports the following: -* `managed` - Is the Azure Active Directory integration Managed, meaning that Azure will create/manage the Service Principal used for integration? - * `tenant_id` - The Tenant ID used for Azure Active Directory Application. * `admin_group_object_ids` - A list of Object IDs of Azure Active Directory Groups which should have Admin Role on the Cluster. * `azure_rbac_enabled` - Is Role Based Access Control based on Azure AD enabled? -* `client_app_id` - The Client ID of an Azure Active Directory Application. - -* `server_app_id` - The Server ID of an Azure Active Directory Application. - --- A `upgrade_settings` block exports the following: @@ -377,6 +371,9 @@ A `service_mesh_profile` block exports the following: * `mode` - The mode of the service mesh. +* `revisions` - List of revisions of the Istio control plane. When an upgrade is not in progress, this holds one value. When canary upgrade is in progress, this can only hold two consecutive values. [Learn More]( + https://learn.microsoft.com/en-us/azure/aks/istio-upgrade). + * `internal_ingress_gateway_enabled` - Is Istio Internal Ingress Gateway enabled? * `external_ingress_gateway_enabled` - Is Istio External Ingress Gateway enabled? diff --git a/website/docs/d/kubernetes_cluster_node_pool.html.markdown b/website/docs/d/kubernetes_cluster_node_pool.html.markdown index 4efb5e857408f..61a9d95d9b73e 100644 --- a/website/docs/d/kubernetes_cluster_node_pool.html.markdown +++ b/website/docs/d/kubernetes_cluster_node_pool.html.markdown @@ -40,9 +40,9 @@ In addition to the Arguments listed above - the following Attributes are exporte * `id` - The ID of the Kubernetes Cluster Node Pool. -* `enable_auto_scaling` - Does this Node Pool have Auto-Scaling enabled? +* `auto_scaling_enabled` - Does this Node Pool have Auto-Scaling enabled? -* `enable_node_public_ip` - Do nodes in this Node Pool have a Public IP Address? +* `node_public_ip_enabled` - Do nodes in this Node Pool have a Public IP Address? * `eviction_policy` - The eviction policy used for Virtual Machines in the Virtual Machine Scale Set, when `priority` is set to `Spot`. diff --git a/website/docs/d/linux_web_app.html.markdown b/website/docs/d/linux_web_app.html.markdown index 2b532f8e989f1..dd129ba2e157d 100644 --- a/website/docs/d/linux_web_app.html.markdown +++ b/website/docs/d/linux_web_app.html.markdown @@ -569,8 +569,6 @@ A `site_config` block exports the following: * `application_stack` - A `application_stack` block as defined above. -* `auto_heal_enabled` - Are Auto heal rules be enabled. - * `auto_heal_setting` - A `auto_heal_setting` block as defined above. * `auto_swap_slot_name` - The Linux Web App Slot Name to automatically swap to when deployment to that slot is successfully completed. diff --git a/website/docs/d/mariadb_server.html.markdown b/website/docs/d/mariadb_server.html.markdown deleted file mode 100644 index a75da0d4b19dd..0000000000000 --- a/website/docs/d/mariadb_server.html.markdown +++ /dev/null @@ -1,72 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_mariadb_server" -description: |- - Gets information about an existing MariaDB Server. ---- - -# Data Source: azurerm_mariadb_server - -Use this data source to access information about an existing MariaDB Server. - -## Example Usage - -```hcl -data "azurerm_mariadb_server" "db_server" { - name = "mariadb-server" - resource_group_name = azurerm_mariadb_server.example.resource_group_name -} - -output "mariadb_server_id" { - value = data.azurerm_mariadb_server.example.id -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - The name of the MariaDB Server to retrieve information about. - -* `resource_group_name` - The name of the resource group where the MariaDB Server exists. - -## Attributes Reference - -The following attributes are exported: - -* `id` - The ID of the MariaDB Server. - -* `fqdn` - The FQDN of the MariaDB Server. - -* `location` - The Azure location where the resource exists. - -* `sku_name` - The SKU Name for this MariaDB Server. - -* `storage_profile` - A `storage_profile` block as defined below. - -* `administrator_login` - The Administrator login for the MariaDB Server. - -* `version` - The version of MariaDB being used. - -* `ssl_enforcement` - The SSL being enforced on connections. - -* `tags` - A mapping of tags assigned to the resource. - ---- - -A `storage_profile` block exports the following: - -* `storage_mb` - The max storage allowed for a server. - -* `backup_retention_days` - Backup retention days for the server. - -* `geo_redundant_backup` - Whether Geo-redundant is enabled or not for server backup. - -* `auto_grow` - Whether autogrow is enabled or disabled for the storage. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `read` - (Defaults to 5 minutes) Used when retrieving the MariaDB Server. diff --git a/website/docs/d/monitor_action_group.html.markdown b/website/docs/d/monitor_action_group.html.markdown index c95b92e69707f..56f23be0678cf 100644 --- a/website/docs/d/monitor_action_group.html.markdown +++ b/website/docs/d/monitor_action_group.html.markdown @@ -95,7 +95,6 @@ output "action_group_id" { `event_hub_receiver` supports the following: * `name` - The name of the EventHub Receiver, must be unique within action group. -* `event_hub_id` - The resource ID of the respective Event Hub. * `event_hub_name` - The name of the specific Event Hub queue. * `event_hub_namespace` - The namespace name of the Event Hub. * `subscription_id` - The ID for the subscription containing this Event Hub. Default to the subscription ID of the Action Group. diff --git a/website/docs/d/monitor_diagnostic_categories.html.markdown b/website/docs/d/monitor_diagnostic_categories.html.markdown index d951551bbf6da..61fef46d7dc28 100644 --- a/website/docs/d/monitor_diagnostic_categories.html.markdown +++ b/website/docs/d/monitor_diagnostic_categories.html.markdown @@ -32,10 +32,6 @@ data "azurerm_monitor_diagnostic_categories" "example" { * `id` - The ID of the Resource. -* `logs` - A list of the Log Categories supported for this Resource. - -* ~> **NOTE:** `logs` is deprecated and will be removed in favour of the property `log_category_types` and `log_category_groups` in version 4.0 of the AzureRM Provider. - * `log_category_types` - A list of the supported log category types of this resource to send to the destination. * `log_category_groups` - A list of the supported log category groups of this resource to send to the destination. diff --git a/website/docs/d/monitor_log_profile.html.markdown b/website/docs/d/monitor_log_profile.html.markdown deleted file mode 100644 index 5738f80faa687..0000000000000 --- a/website/docs/d/monitor_log_profile.html.markdown +++ /dev/null @@ -1,57 +0,0 @@ ---- -subcategory: "Monitor" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_monitor_log_profile" -description: |- - Get information about the specified Log Profile. ---- - -# Data Source: azurerm_monitor_log_profile - -Use this data source to access the properties of a Log Profile. - -!> **NOTE:** Azure Log Profiles will be retired on 30th September 2026 and will be removed in v4.0 of the AzureRM Provider. More information on the deprecation can be found [in the Azure documentation](https://learn.microsoft.com/azure/azure-monitor/essentials/activity-log?tabs=powershell#legacy-collection-methods). - -## Example Usage - -```hcl -data "azurerm_monitor_log_profile" "example" { - name = "test-logprofile" -} - -output "log_profile_storage_account_id" { - value = data.azurerm_monitor_log_profile.example.storage_account_id -} -``` - -## Argument Reference - -* `name` - Specifies the Name of the Log Profile. - -## Attributes Reference - -* `id` - The ID of the Log Profile. - -* `storage_account_id` - The resource id of the storage account in which the Activity Log is stored. - -* `servicebus_rule_id` - The service bus (or event hub) rule ID of the service bus (or event hub) namespace in which the Activity Log is streamed to. - -* `locations` - List of regions for which Activity Log events are stored or streamed. - -* `categories` - List of categories of the logs. - -* `retention_policy`- a `retention_policy` block as documented below. - ---- - -The `retention_policy` block supports: - -* `enabled` - A boolean value indicating whether the retention policy is enabled. - -* `days` - The number of days for the retention policy. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `read` - (Defaults to 5 minutes) Used when retrieving the Log Profile. diff --git a/website/docs/d/mysql_server.html.markdown b/website/docs/d/mysql_server.html.markdown deleted file mode 100644 index 6007018bf0d79..0000000000000 --- a/website/docs/d/mysql_server.html.markdown +++ /dev/null @@ -1,105 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: Data Source: azurerm_mysql_server" -description: |- - Gets information about an existing MySQL Server. - ---- - -# azurerm_mysql_server - -Use this data source to access information about an existing MySQL Server. - -~> **Note:** Azure Database for MySQL Single Server and its sub resources are scheduled for retirement by 2024-09-16 and will migrate to using Azure Database for MySQL Flexible Server: https://go.microsoft.com/fwlink/?linkid=2216041. The `azurerm_mysql_server` data source is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `azurerm_mysql_flexible_server` data source instead. - -## Example Usage - -```hcl -data "azurerm_mysql_server" "example" { - name = "existingMySqlServer" - resource_group_name = "existingResGroup" -} - -output "id" { - value = data.azurerm_mysql_server.example.id -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) Specifies the name of the MySQL Server. - -* `resource_group_name` - (Required) The name of the resource group for the MySQL Server. - -## Attributes Reference - -* `id` - The ID of the MySQL Server. - -* `fqdn` - The FQDN of the MySQL Server. - -* `location` - The Azure location where the resource exists. - -* `sku_name` - The SKU Name for this MySQL Server. - -* `version` - The version of this MySQL Server. - -* `administrator_login` - The Administrator login for the MySQL Server. - -* `auto_grow_enabled` - The auto grow setting for this MySQL Server. - -* `backup_retention_days` - The backup retention days for this MySQL server. - -* `geo_redundant_backup_enabled` - The geo redundant backup setting for this MySQL Server. - -* `identity` - An `identity` block as defined below. - -* `infrastructure_encryption_enabled` - Whether or not infrastructure is encrypted for this MySQL Server. - -* `public_network_access_enabled` - Whether or not public network access is allowed for this MySQL Server. - -* `ssl_enforcement_enabled` - Specifies if SSL should be enforced on connections for this MySQL Server. - -* `ssl_minimal_tls_version_enforced` - The minimum TLS version to support for this MySQL Server. - -* `storage_mb` - Max storage allowed for this MySQL Server. - -* `threat_detection_policy` - Threat detection policy configuration, known in the API as Server Security Alerts Policy. The `threat_detection_policy` block exports fields documented below. - -* `tags` - A mapping of tags to assign to the resource. - ---- - -An `identity` block exports the following: - -* `principal_id` - The Principal ID associated with this Managed Service Identity. - -* `tenant_id` - The Tenant ID associated with this Managed Service Identity. - -* `type` - The identity type of this Managed Service Identity. - ---- - -A `threat_detection_policy` block exports the following: - -* `enabled` - Is the policy enabled? - -* `disabled_alerts` - Specifies a list of alerts which should be disabled. Possible values include `Access_Anomaly`, `Sql_Injection` and `Sql_Injection_Vulnerability`. - -* `email_account_admins` - Should the account administrators be emailed when this alert is triggered? - -* `email_addresses` - A list of email addresses which alerts should be sent to. - -* `retention_days` - Specifies the number of days to keep in the Threat Detection audit logs. - -* `storage_account_access_key` - Specifies the identifier key of the Threat Detection audit storage account. - -* `storage_endpoint` - Specifies the blob storage endpoint (e.g. ). This blob storage will hold all Threat Detection audit logs. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `read` - (Defaults to 5 minutes) Used when retrieving the MySQL Server. diff --git a/website/docs/d/nginx_deployment.html.markdown b/website/docs/d/nginx_deployment.html.markdown index bf8d68812b6ce..4b8d11f8bb4e3 100644 --- a/website/docs/d/nginx_deployment.html.markdown +++ b/website/docs/d/nginx_deployment.html.markdown @@ -63,7 +63,7 @@ In addition to the Arguments listed above - the following Attributes are exporte * `nginx_version` - NGINX version of the Deployment. -* `sku` - The NGINX Deployment SKU. Possible values include `standard_Monthly`. +* `sku` - The NGINX Deployment SKU. * `automatic_upgrade_channel` - The automatic upgrade channel for this NGINX deployment. diff --git a/website/docs/d/redis_cache.html.markdown b/website/docs/d/redis_cache.html.markdown index 511a4ef999339..efac25cc237c1 100644 --- a/website/docs/d/redis_cache.html.markdown +++ b/website/docs/d/redis_cache.html.markdown @@ -68,6 +68,8 @@ output "hostname" { * `secondary_connection_string` - The secondary connection string of the Redis Instance. +* `access_keys_authentication_enabled` - Specifies if access key authentication is enabled. + * `redis_configuration` - A `redis_configuration` block as defined below. * `zones` - A list of Availability Zones in which this Redis Cache is located. diff --git a/website/docs/d/role_management_policy.html.markdown b/website/docs/d/role_management_policy.html.markdown index 0b91502764d65..15584f6c0f599 100644 --- a/website/docs/d/role_management_policy.html.markdown +++ b/website/docs/d/role_management_policy.html.markdown @@ -51,7 +51,7 @@ data "azurerm_role_management_policy" "example" { ## Argument Reference * `role_definition_id` - (Required) The scoped Role Definition ID of the role for which this policy applies. -* `scope` - (Required) The scope to which this Role Management Policy applies. Can refer to a management group, a subscription or a resource group. +* `scope` - (Required) The scope to which this Role Management Policy applies. Can refer to a management group, a subscription, a resource group or a resource. ## Attributes Reference diff --git a/website/docs/d/servicebus_namespace.html.markdown b/website/docs/d/servicebus_namespace.html.markdown index 6df2db80db3e9..788b96f2f32cb 100644 --- a/website/docs/d/servicebus_namespace.html.markdown +++ b/website/docs/d/servicebus_namespace.html.markdown @@ -39,8 +39,6 @@ output "location" { * `premium_messaging_partitions` - The messaging partitions of the ServiceBus Namespace. -* `zone_redundant` - Whether or not this ServiceBus Namespace is zone redundant. - * `endpoint` - The URL to access the ServiceBus Namespace. * `tags` - A mapping of tags assigned to the resource. diff --git a/website/docs/d/servicebus_namespace_authorization_rule.html.markdown b/website/docs/d/servicebus_namespace_authorization_rule.html.markdown index 0d012761a04db..94147239334b2 100644 --- a/website/docs/d/servicebus_namespace_authorization_rule.html.markdown +++ b/website/docs/d/servicebus_namespace_authorization_rule.html.markdown @@ -27,12 +27,6 @@ output "rule_id" { * `name` - (Required) Specifies the name of the ServiceBus Namespace Authorization Rule. -* `namespace_name` - (Required) Specifies the name of the ServiceBus Namespace. - -* `resource_group_name` - (Required) Specifies the name of the Resource Group where the ServiceBus Namespace exists. - -~> **Note:** `namespace_name` and `resource_group_name` has been deprecated and will be removed in version 4.0 of the provider in favour of `namespace_id`. - * `namespace_id` - (Required) Specifies the ID of the ServiceBus Namespace where the Service Bus Namespace Authorization Rule exists. ## Attributes Reference diff --git a/website/docs/d/servicebus_queue.html.markdown b/website/docs/d/servicebus_queue.html.markdown index 558438bf5d1fb..af5c335c6ccf0 100644 --- a/website/docs/d/servicebus_queue.html.markdown +++ b/website/docs/d/servicebus_queue.html.markdown @@ -29,12 +29,6 @@ The following arguments are supported: * `name` - (Required) The name of this Service Bus Queue. -* `namespace_name` - (Required) The name of the ServiceBus Namespace. - -* `resource_group_name` - (Required) The name of the Resource Group where the Service Bus Queue exists. - -~> **Note:** `namespace_name` and `resource_group_name` has been deprecated and will be removed in version 4.0 of the provider in favour of `namespace_id`. - * `namespace_id` - (Required) The ID of the ServiceBus Namespace where the Service Bus Queue exists. ## Attributes Reference diff --git a/website/docs/d/servicebus_subscription.html.markdown b/website/docs/d/servicebus_subscription.html.markdown index b3ba5a101181c..5d430f50314a7 100644 --- a/website/docs/d/servicebus_subscription.html.markdown +++ b/website/docs/d/servicebus_subscription.html.markdown @@ -27,14 +27,6 @@ output "servicebus_subscription" { * `name` - (Required) Specifies the name of the ServiceBus Subscription. -* `resource_group_name` - (Required) Specifies the name of the Resource Group where the ServiceBus Namespace exists. - -* `namespace_name` - (Required) The name of the ServiceBus Namespace. - -* `topic_name` - (Required) The name of the ServiceBus Topic. - -~> **Note:** `namespace_name`,`resource_group_name` and `topic_name` has been deprecated and will be removed in version 4.0 of the provider in favour of `topic_id`. - * `topic_id` - (Required) The ID of the ServiceBus Topic where the Service Bus Subscription exists. ## Attributes Reference diff --git a/website/docs/d/servicebus_topic.html.markdown b/website/docs/d/servicebus_topic.html.markdown index ea9d45cdab487..caf04997191aa 100644 --- a/website/docs/d/servicebus_topic.html.markdown +++ b/website/docs/d/servicebus_topic.html.markdown @@ -29,12 +29,6 @@ The following arguments are supported: * `name` - (Required) The name of this Service Bus Topic. -* `namespace_name` - (Required) The name of the Service Bus Namespace. - -* `resource_group_name` - (Required) The name of the Resource Group where the Service Bus Topic exists. - -~> **Note:** `namespace_name` and `resource_group_name` has been deprecated and will be removed in version 4.0 of the provider in favour of `namespace_id`. - * `namespace_id` - (Required) The ID of the ServiceBus Namespace where the Service Bus Topic exists. ## Attributes Reference diff --git a/website/docs/d/shared_image.html.markdown b/website/docs/d/shared_image.html.markdown index 45278b151b806..5f244f47c5858 100644 --- a/website/docs/d/shared_image.html.markdown +++ b/website/docs/d/shared_image.html.markdown @@ -57,6 +57,18 @@ The following attributes are exported: * `release_note_uri` - The URI containing the Release Notes for this Shared Image. +* `trusted_launch_supported` - Specifies if supports creation of both Trusted Launch virtual machines and Gen2 virtual machines with standard security created from the Shared Image. + +* `trusted_launch_enabled` - Specifies if Trusted Launch has to be enabled for the Virtual Machine created from the Shared Image. + +* `confidential_vm_supported` - Specifies if supports creation of both Confidential virtual machines and Gen2 virtual machines with standard security from a compatible Gen2 OS disk VHD or Gen2 Managed image. + +* `confidential_vm_enabled` - Specifies if Confidential Virtual Machines enabled. It will enable all the features of trusted, with higher confidentiality features for isolate machines or encrypted data. Available for Gen2 machines. + +* `accelerated_network_support_enabled` - Specifies if the Shared Image supports Accelerated Network. + +* `hibernation_enabled` - Specifies if the Shared Image supports hibernation. + * `tags` - A mapping of tags assigned to the Shared Image. --- diff --git a/website/docs/d/sql_database.html.markdown b/website/docs/d/sql_database.html.markdown deleted file mode 100644 index c829ec396fc35..0000000000000 --- a/website/docs/d/sql_database.html.markdown +++ /dev/null @@ -1,73 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_sql_database" -description: |- - Gets information about an existing SQL Azure Database. ---- - -# Data Source: azurerm_sql_database - -Use this data source to access information about an existing SQL Azure Database. - --> **Note:** The `azurerm_sql_database` data source is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the [`azurerm_mssql_database`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/mssql_database) data source instead. - -## Example Usage - -```hcl -data "azurerm_sql_database" "example" { - name = "example_db" - server_name = "example_db_server" - resource_group_name = "example-resources" -} - -output "sql_database_id" { - value = data.azurerm_sql_database.example.id -} -``` - -## Argument Reference - -* `name` - The name of the SQL Database. - -* `server_name` - The name of the SQL Server. - -* `resource_group_name` - Specifies the name of the Resource Group where the Azure SQL Database exists. - -## Attributes Reference - -* `id` - The SQL Database ID. - -* `collation` - The name of the collation. - -* `creation_date` - The creation date of the SQL Database. - -* `default_secondary_location` - The default secondary location of the SQL Database. - -* `edition` - The edition of the database. - -* `elastic_pool_name` - The name of the elastic database pool the database belongs to. - -* `failover_group_id` - The ID of the failover group the database belongs to. - -* `location` - The location of the Resource Group in which the SQL Server exists. - -* `name` - The name of the database. - -* `read_scale` - Indicate if read-only connections will be redirected to a high-available replica. - -* `requested_service_objective_id` - The ID pertaining to the performance level of the database. - -* `requested_service_objective_name` - The name pertaining to the performance level of the database. - -* `resource_group_name` - The name of the resource group in which the database resides. This will always be the same resource group as the Database Server. - -* `server_name` - The name of the SQL Server on which to create the database. - -* `tags` - A mapping of tags assigned to the resource. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `read` - (Defaults to 5 minutes) Used when retrieving the SQL Azure Database. diff --git a/website/docs/d/sql_managed_instance.html.markdown b/website/docs/d/sql_managed_instance.html.markdown deleted file mode 100644 index 4d7617f0dfe28..0000000000000 --- a/website/docs/d/sql_managed_instance.html.markdown +++ /dev/null @@ -1,86 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_sql_managed_instance" -description: |- - Gets information about a SQL Managed Instance. ---- - -# Data Source: azurerm_sql_managed_instance - -Use this data source to access information about an existing SQL Managed Instance. - --> **Note:** The `azurerm_sql_managed_instance` data source is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the [`azurerm_mssql_managed_instance`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/mssql_managed_instance) data source instead. - -## Example Usage - -```hcl -data "azurerm_sql_managed_instance" "example" { - name = "example_mi" - resource_group_name = "example-resources" -} - -output "sql_instance_id" { - value = data.azurerm_sql_managed_instance.example.id -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The name of the SQL Managed Instance. - -* `resource_group_name` - (Required) The name of the Resource Group in which the SQL Managed Instance exists. - -## Attributes Reference - -* `id` - The SQL Managed Instance ID. - -* `fqdn` - The fully qualified domain name of the Azure Managed SQL Instance. - -* `location` - Location where the resource exists. - -* `sku_name` - SKU Name for the SQL Managed Instance. - -* `vcores` - Number of cores assigned to your instance. - -* `storage_size_in_gb` - Maximum storage space for your instance. - -* `license_type` - Type of license the Managed Instance uses. - -* `administrator_login` - The administrator login name for the new server. - -* `subnet_id` - The subnet resource id that the SQL Managed Instance is associated with. - -* `collation` - Specifies how the SQL Managed Instance is collated. - -* `public_data_endpoint_enabled` - Is the public data endpoint enabled? - -* `minimum_tls_version` - The Minimum TLS Version. - -* `proxy_override` - How the SQL Managed Instance is accessed. - -* `timezone_id` - The TimeZone ID that the SQL Managed Instance is operating in. - -* `dns_zone_partner_id` - The ID of the Managed Instance which is sharing the DNS zone. - -* `identity` - An `identity` block as defined below. - -* `storage_account_type` - Storage account type used to store backups for this SQL Managed Instance. - -* `tags` - A mapping of tags assigned to the resource. - ---- - -The `identity` block exports the following: - -* `principal_id` - The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance. - -* `tenant_id` - The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `read` - (Defaults to 5 minutes) Used when retrieving the SQL Azure Managed Instance. diff --git a/website/docs/d/sql_server.html.markdown b/website/docs/d/sql_server.html.markdown deleted file mode 100644 index 9d71020932d01..0000000000000 --- a/website/docs/d/sql_server.html.markdown +++ /dev/null @@ -1,64 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_sql_server" -description: |- - Gets information about an existing SQL Azure Database Server. ---- - -# Data Source: azurerm_sql_server - -Use this data source to access information about an existing SQL Azure Database Server. - --> **Note:** The `azurerm_sql_server` data source is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the [`azurerm_mssql_server`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/mssql_server) data source instead. - -## Example Usage - -```hcl -data "azurerm_sql_server" "example" { - name = "examplesqlservername" - resource_group_name = "example-resources" -} - -output "sql_server_id" { - value = data.azurerm_sql_server.example.id -} -``` - -## Argument Reference - -* `name` - The name of the SQL Server. - -* `resource_group_name` - Specifies the name of the Resource Group where the SQL Server exists. - -## Attributes Reference - -* `id` - The id of the SQL Server resource. - -* `location` - The location of the Resource Group in which the SQL Server exists. - -* `fqdn` - The fully qualified domain name of the SQL Server. - -* `version` - The version of the SQL Server. - -* `administrator_login` - The administrator username of the SQL Server. - -* `identity` - An `identity` block as defined below. - -* `tags` - A mapping of tags assigned to the resource. - ---- - -An `identity` block exports the following: - -* `principal_id` - The Principal ID associated with this Managed Service Identity. - -* `tenant_id` - The Tenant ID associated with this Managed Service Identity. - -* `type` - The identity type of this Managed Service Identity. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `read` - (Defaults to 5 minutes) Used when retrieving the SQL Azure Database Server. diff --git a/website/docs/d/static_web_app.html.markdown b/website/docs/d/static_web_app.html.markdown index 27745875df082..a87d407b2f1d5 100644 --- a/website/docs/d/static_web_app.html.markdown +++ b/website/docs/d/static_web_app.html.markdown @@ -43,6 +43,8 @@ The following arguments are supported: * `preview_environments_enabled` - Are Preview (Staging) environments enabled. +* `public_network_access_enabled` - (Optional) Should public network access be enabled for the Static Web App. Defaults to `true`. + * `sku_tier` - The SKU tier of the Static Web App. * `sku_size` - The SKU size of the Static Web App. diff --git a/website/docs/d/storage_account.html.markdown b/website/docs/d/storage_account.html.markdown index be2f87a76a4cf..f76401ddf2d1e 100644 --- a/website/docs/d/storage_account.html.markdown +++ b/website/docs/d/storage_account.html.markdown @@ -47,8 +47,7 @@ output "storage_account_tier" { * `dns_endpoint_type` - Which DNS endpoint type is used - either `Standard` or `AzureDnsZone`. -* `https_traffic_only_enabled` - Is traffic only allowed via HTTPS? See [here](https://docs.microsoft.com/azure/storage/storage-require-secure-transfer/) - for more information. +* `https_traffic_only_enabled` - Is traffic only allowed via HTTPS? See [here](https://docs.microsoft.com/azure/storage/storage-require-secure-transfer/) for more information. * `min_tls_version` - The minimum supported TLS version for this storage account. diff --git a/website/docs/d/storage_table_entities.html.markdown b/website/docs/d/storage_table_entities.html.markdown index e708dd9a970c8..9ff0afd0cccde 100644 --- a/website/docs/d/storage_table_entities.html.markdown +++ b/website/docs/d/storage_table_entities.html.markdown @@ -14,9 +14,8 @@ Use this data source to access information about an existing Storage Table Entit ```hcl data "azurerm_storage_table_entities" "example" { - table_name = "example-table-name" - storage_account_name = "example-storage-account-name" - filter = "PartitionKey eq 'example'" + storage_table_id = azurerm_storage_table.example.id + filter = "PartitionKey eq 'example'" } ``` diff --git a/website/docs/d/storage_table_entity.html.markdown b/website/docs/d/storage_table_entity.html.markdown index 41f19d34ad11d..83231e6c603f4 100644 --- a/website/docs/d/storage_table_entity.html.markdown +++ b/website/docs/d/storage_table_entity.html.markdown @@ -14,10 +14,9 @@ Use this data source to access information about an existing Storage Table Entit ```hcl data "azurerm_storage_table_entity" "example" { - table_name = "example-table-name" - storage_account_name = "example-storage-account-name" - partition_key = "example-partition-key" - row_key = "example-row-key" + storage_table_id = azurerm_storage_table.example.id + partition_key = "example-partition-key" + row_key = "example-row-key" } ``` diff --git a/website/docs/d/vpn_server_configuration.html.markdown b/website/docs/d/vpn_server_configuration.html.markdown new file mode 100644 index 0000000000000..ab160d01a70f5 --- /dev/null +++ b/website/docs/d/vpn_server_configuration.html.markdown @@ -0,0 +1,154 @@ +--- +subcategory: "Network" +layout: "azurerm" +page_title: "Azure Resource Manager: Data Source: azurerm_vpn_server_configuration" +description: |- + Gets information about an existing VPN Server Configuration. +--- + +# Data Source: azurerm_vpn_server_configuration + +Use this data source to access information about an existing VPN Server Configuration. + +## Example Usage + +```hcl +data "azurerm_vpn_server_configuration" "example" { + name = "existing-local-vpn-server-configuration" + resource_group_name = "existing-resource-group" +} + +output "azurerm_vpn_server_configuration" { + value = data.azurerm_vpn_server_configuration.example.id +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The Name of the VPN Server Configuration. + +* `resource_group_name` - (Required) The name of the Resource Group where the VPN Server Configuration exists. + +## Attributes Reference + +In addition to the Arguments listed above - the following Attributes are exported: + +* `id` - The ID of the VPN Server Configuration. + +* `location` - The Azure Region where the VPN Server Configuration exists. + +* `vpn_authentication_types` - The list of Authentication Types applicable for the VPN Server Configuration. + +* `ipsec_policy` - The `bgp_settings` block as defined below. + +* `vpn_protocols` - The list of VPN Protocols to use for the VPN Server Configuration. + +* `tags` - A mapping of tags to assign to the VPN Server Configuration. + +--- + +When `vpn_authentication_types` contains `AAD` the following arguments are exported: + +* `azure_active_directory_authentication` - A `azure_active_directory_authentication` block as defined below. + +--- + +When `vpn_authentication_types` contains `Certificate` the following arguments are supported: + +* `client_root_certificate` - One or more `client_root_certificate` blocks as defined below. + +* `client_revoked_certificate` - One or more `client_revoked_certificate` blocks as defined below. + +--- + +When `vpn_authentication_types` contains `Radius` the following arguments are exported: + +* `radius` - A `radius` block as defined below. + +A `azure_active_directory_authentication` block exports the following: + +* `audience` - The Audience which should be used for authentication. + +* `issuer` - The Issuer which should be used for authentication. + +* `tenant` - The Tenant which should be used for authentication. + +--- + +A `client_revoked_certificate` block exports the following: + +* `name` - The name used to uniquely identify this certificate. + +* `thumbprint` - The Thumbprint of the Certificate. + +--- + +A `client_root_certificate` block at the root of the resource exports the following: + +* `name` - The name used to uniquely identify this certificate. + +* `public_cert_data` - The Public Key Data associated with the Certificate. + +--- + +A `ipsec_policy` block exports the following: + +* `dh_group` - The DH Group, used in IKE Phase 1. + +* `ike_encryption` - The IKE encryption algorithm, used for IKE Phase 2. + +* `ike_integrity` - The IKE encryption integrity algorithm, used for IKE Phase 2. + +* `ipsec_encryption` - The IPSec encryption algorithm, used for IKE phase 1. + +* `ipsec_integrity` - The IPSec integrity algorithm, used for IKE phase 1. + +* `pfs_group` - The Pfs Group, used in IKE Phase 2. + +* `sa_lifetime_seconds` - The IPSec Security Association lifetime in seconds for a Site-to-Site VPN tunnel. + +* `sa_data_size_kilobytes` - The IPSec Security Association payload size in KB for a Site-to-Site VPN tunnel. + +--- + +A `radius` block exports the following: + +* `server` - One or more `server` blocks as defined below. + +* `client_root_certificate` - One or more `client_root_certificate` blocks as defined below. + +* `server_root_certificate` - One or more `server_root_certificate` blocks as defined below. + +--- + +A `server` nested within the `radius` block exports the following:: + +* `address` - The Address of the Radius Server. + +* `secret` - The Secret used to communicate with the Radius Server. + +* `score` - The Score of the Radius Server determines the priority of the server. + +--- + +A `client_root_certificate` block nested within the `radius` block exports the following: + +* `name` - The name used to uniquely identify this certificate. + +* `thumbprint` - The Thumbprint of the Certificate. + +--- + +A `server_root_certificate` block exports the following: + +* `name` - The name used to uniquely identify this certificate. + +* `public_cert_data` - The Public Key Data associated with the Certificate. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: + +* `read` - (Defaults to 5 minutes) Used when retrieving the VPN Server Configuration. diff --git a/website/docs/d/windows_web_app.html.markdown b/website/docs/d/windows_web_app.html.markdown index 03ed5f35675d9..3671c8ebe8f06 100644 --- a/website/docs/d/windows_web_app.html.markdown +++ b/website/docs/d/windows_web_app.html.markdown @@ -573,8 +573,6 @@ A `site_config` block exports the following: * `application_stack` - A `application_stack` block as defined above. -* `auto_heal_enabled` - Are Auto heal rules to be enabled. - * `auto_heal_setting` - A `auto_heal_setting` block as defined above. * `auto_swap_slot_name` - The Windows Web App Slot Name to automatically swap to when deployment to that slot is successfully completed. diff --git a/website/docs/guides/4.0-upgrade-guide.html.markdown b/website/docs/guides/4.0-upgrade-guide.html.markdown index e2eef88d6635c..d905621785deb 100644 --- a/website/docs/guides/4.0-upgrade-guide.html.markdown +++ b/website/docs/guides/4.0-upgrade-guide.html.markdown @@ -237,31 +237,31 @@ In order to provide a more reliable experience when using the Azure Provider, Mi ### Custom CA Trust -* The property `custom_ca_trust_enabled` has been removed from the `azurerm_kubernetes_cluster` and `azurerm_kubernetes_cluster_node_pool` resources. -* The property `custom_ca_trust_certificates_base64` has been removed from the `azurerm_kubernetes_cluster` resource and data source. +* The `custom_ca_trust_enabled` property has been removed from the `azurerm_kubernetes_cluster` and `azurerm_kubernetes_cluster_node_pool` resources. +* The `custom_ca_trust_certificates_base64` property has been removed from the `azurerm_kubernetes_cluster` resource and data source. ### VNet Integration -* The property `api_server_access_profile.vnet_integration_enabled` has been removed from the `azurerm_kubernetes_cluster` resource. -* The property `api_server_access_profile.subnet_id` has been removed from the `azurerm_kubernetes_cluster` resource. +* The `api_server_access_profile.vnet_integration_enabled` property has been removed from the `azurerm_kubernetes_cluster` resource. +* The `api_server_access_profile.subnet_id` property has been removed from the `azurerm_kubernetes_cluster` resource. ### Workload Runtime KataMshvVMIsolation -* The property `workload_runtime` will no longer accept `KataMshvVMIsolation` as a valid value in the `azurerm_kubernetes_cluster` and `azurerm_kubernetes_cluster_node_pool` resources. +* The `workload_runtime` property will no longer accept `KataMshvVMIsolation` as a valid value in the `azurerm_kubernetes_cluster` and `azurerm_kubernetes_cluster_node_pool` resources. ### Disk Driver Version -* The property `storage_profile.disk_driver_version` has been removed from the `azurerm_kubernetes_cluster` resource and data source. +* The `storage_profile.disk_driver_version` property has been removed from the `azurerm_kubernetes_cluster` resource and data source. ### Message Of The Day -* The property `message_of_the_day` has been removed from the `azurerm_kubernetes_cluster` and `azurerm_kubernetes_cluster_node_pool` resources. +* The `message_of_the_day` property has been removed from the `azurerm_kubernetes_cluster` and `azurerm_kubernetes_cluster_node_pool` resources. If you wish to use these or any other AKS preview features and accept the risk that comes with using preview features, the [AzAPI Provider](https://registry.terraform.io/providers/Azure/azapi/latest/docs) can be used to access these features. Please note that changes made by AzAPI to a resource managed by the Azure Provider can have unexpected behavioral outcomes in the resource, as well as Terraform configuration consequences, such as diffs or resources being marked for recreation. ## Removed Resources -### `azurerm_app_service_environment` +### `azurerm_app_service_environment` This resource will be retired by Azure by 2024-08-31, as a result this deprecated resource has been removed from the Azure Provider. @@ -333,7 +333,7 @@ This Azure Service will be retired on 2025-03-31, as a result this deprecated re This Azure Service will be retired on 2025-03-31, as a result this deprecated resource has been removed from the Azure Provider. -### `azurerm_integrated_service_environment` +### `azurerm_integration_service_environment` This Azure Service is being retired on 2024-08-31 and the provisioning of new instances has been blocked since 2022-11-01, as a result this deprecated resource has been removed from the Azure Provider. @@ -405,6 +405,10 @@ The Azure Database for Maria DB will be retired on 2024-09-19 and will migrate t [Azure Media Services will be retired June 30th, 2024](https://learn.microsoft.com/en-us/azure/media-services/latest/azure-media-services-retirement), as a result this deprecated resource has been removed from the provider. +### `azurerm_media_live_event` + +[Azure Media Services will be retired June 30th, 2024](https://learn.microsoft.com/en-us/azure/media-services/latest/azure-media-services-retirement), as a result this deprecated resource has been removed from the provider. + ### `azurerm_media_live_output` [Azure Media Services will be retired June 30th, 2024](https://learn.microsoft.com/en-us/azure/media-services/latest/azure-media-services-retirement), as a result this deprecated resource has been removed from the provider. @@ -421,11 +425,7 @@ The Azure Database for Maria DB will be retired on 2024-09-19 and will migrate t [Azure Media Services will be retired June 30th, 2024](https://learn.microsoft.com/en-us/azure/media-services/latest/azure-media-services-retirement), as a result this deprecated resource has been removed from the provider. -### `azurerm_media_streaming_live_event` - -[Azure Media Services will be retired June 30th, 2024](https://learn.microsoft.com/en-us/azure/media-services/latest/azure-media-services-retirement), as a result this deprecated resource has been removed from the provider. - -### `azurerm_media_streaming_ locator` +### `azurerm_media_streaming_locator` [Azure Media Services will be retired June 30th, 2024](https://learn.microsoft.com/en-us/azure/media-services/latest/azure-media-services-retirement), as a result this deprecated resource has been removed from the provider. @@ -583,320 +583,348 @@ The deprecated data source has been superseded by `azurerm_mssql_server` and has ### `azurerm_analysis_services_server` - * The deprecated property `enable_power_bi_service` has been removed in favour of the property `power_bi_service_enabled`. - * The property `querypool_connection_mode` now defaults to `All`. +* The deprecated `enable_power_bi_service` property has been removed in favour of the `power_bi_service_enabled` property. +* The `querypool_connection_mode` property now defaults to `All`. ### `azurerm_api_connection` -* The property `display_name` now defaults to `Service Bus`. +* The `display_name` property now defaults to `Service Bus`. ### `azurerm_api_management_api` -* The deprecated property `soap_pass_through` has been removed in favour of the property `api_type`. +* The deprecated `soap_pass_through` property has been removed in favour of the `api_type` property. -### `azurerm_api_management_api_tags` +### `azurerm_api_management_api_tag` * This resource will need to be recreated upon upgrading so that the tag revision can be included in the resource ID. ### `azurerm_api_management` -* The deprecated block `policy` has been removed in favour of the `azurerm_api_management_policy` resource. +* The deprecated `policy` block has been removed in favour of the `azurerm_api_management_policy` resource. -### `azurerm_application_insights` +### `azurerm_api_management_diagnostic` -* The property `daily_data_cap_in_gb` now defaults to `100`. -* The property `daily_data_cap_notifications_disabled` now defaults to `false`. +* The `operation_name_format` property has had the default value `Name` removed. -### `azurerm_function_app` +### `azurerm_application_gateway` + +* The `ssl_profile.ssl_policy.policy_name` property now has a default value of `AppGwSslPolicy20220101`. +* The `ssl_profile.ssl_policy.min_protocol_version` property now has a default value of `TLSv1_2`. + +### `azurerm_application_insights` -* The property `site.config.elastic_instance_minimum` no longer accepts the value 0. +* The `daily_data_cap_in_gb` property now defaults to `100`. +* The `daily_data_cap_notifications_disabled` property now defaults to `false`. ### `azurerm_attestation_provider` -* The deprecated block `policy` has been removed in favour of the `open_enclave_policy_base64`, `sgx_enclave_policy_base64`, `tpm_policy_base64` and `sev_snp_policy_base64` properties. +* The deprecated `policy` block has been removed in favour of the `open_enclave_policy_base64`, `sgx_enclave_policy_base64`, `tpm_policy_base64` and `sev_snp_policy_base64` properties. ### `azurerm_automation_account` -* The deprecated property `encryption.key_source` has been removed. +* The deprecated `encryption.key_source` property has been removed. ### `azurerm_automation_software_update_configuration` -* The deprecated property `linux.classification_included` has been removed in favour of the `linux.classifications_included` property. -* The deprecated property `windows.classification_included` has been removed in favour of the `windows.classifications_included` property. -* The deprecated property `operating_system` has been removed in favour of the `linux` or `windows` blocks. -* The deprecated property `error_meesage` has been removed in favour of the `error_message` property. +* The deprecated `linux.classification_included` property has been removed in favour of the `linux.classifications_included` property. +* The deprecated `windows.classification_included` property has been removed in favour of the `windows.classifications_included` property. +* The deprecated `operating_system` property has been removed in favour of the `linux` or `windows` blocks. +* The deprecated `error_meesage` property has been removed in favour of the `error_message` property. ### `azurerm_bot_channel_web_chat` -* The deprecated property `site_names` has been removed in favour of the `site` property. +* The deprecated `site_names` property has been removed in favour of the `site` property. ### `azurerm_bot_channels_registration` -* The deprecated property `isolated_network_enabled` has been removed in favour of the `public_network_access_enabled` property. -* The property `icon_url` now defaults to `https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png`. +* The deprecated `isolated_network_enabled` property has been removed in favour of the `public_network_access_enabled` property. +* The `icon_url` property now defaults to `https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png`. ### `azurerm_bot_connection` -* The deprecated property `tags` has been removed. +* The deprecated `tags` property has been removed. ### `azurem_cdn_endpoint` -* The property `origin_path` is no longer Computed. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. -* The property `content_types_to_compress` is no longer Computed. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. -* The property `probe_path` is no longer Computed. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. +* The `origin_path` property is no longer Computed. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. +* The `content_types_to_compress` property is no longer Computed. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. +* The `probe_path` property is no longer Computed. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. ### `azurerm_cdn_endpoint_custom_domain` -* The deprecated property `user_managed_https.key_vault_certificate_id` has been removed in favour of the `user_managed_https.key_vault_secret_id` property. +* The deprecated `user_managed_https.key_vault_certificate_id` property has been removed in favour of the `user_managed_https.key_vault_secret_id` property. +* The `user_managed_https.key_vault_secret_id` property is now Required. ### `azurerm_cdn_frontdoor_origin` -* The deprecated property `health_probes_enabled` has been removed in favour of the `enabled` property. +* The deprecated `health_probes_enabled` property has been removed in favour of the `enabled` property. +* The `enabled` property now defaults to `true`. + +### `azurerm_cognitive_account` + +* The `scale` block is no longer supported by the service and has been removed and replaced with the `sku` block. ### `azurerm_consumption_budget_management_group` -* The deprecated block `filter.not` has been removed. +* The deprecated `filter.not` block has been removed. ### `azurerm_consumption_budget_resource_group` -* The deprecated block `filter.not` has been removed. +* The deprecated `filter.not` block has been removed. ### `azurerm_consumption_budget_subscription` -* The deprecated block `filter.not` has been removed. +* The deprecated `filter.not` block has been removed. ### `azurerm_container_app_job` -* The deprecated block `secrets` has been removed in favour of the `secret` block. -* The deprecated block `registries` has been removed in favour of the `registry` block. +* The deprecated `secrets` block has been removed in favour of the `secret` block. +* The deprecated `registries` block has been removed in favour of the `registry` block. ### `azurerm_container_app` -* The deprecated block `ingress.custom_domain` is now only `Computed`. Custom Domains should be configured with the `azurerm_container_app_custom_domain` resource. +* The deprecated `ingress.custom_domain` block is now only `Computed`. Custom Domains should be configured with the `azurerm_container_app_custom_domain` resource. ### `azurerm_container_group` -* The deprecated property `network_profile_id` has been removed in favour of the `subnet_ids` property. -* The deprecated block `container.gpu` has been removed. -* The deprecated block `container.gpu_limit` has been removed. -* The property `container.liveness_probe.http_get.scheme` is now case-sensitive. You will need to update your configuration to match the casing expected by the API. -* The property `container.readiness_probe.http_get.scheme` is now case-sensitive. You will need to update your configuration to match the casing expected by the API. +* The deprecated `network_profile_id` property has been removed in favour of the `subnet_ids` property. +* The deprecated `container.gpu` block has been removed. +* The deprecated `container.gpu_limit` block has been removed. +* The `container.liveness_probe.http_get.scheme` property is now case-sensitive. You will need to update your configuration to match the casing expected by the API. +* The `container.readiness_probe.http_get.scheme` property is now case-sensitive. You will need to update your configuration to match the casing expected by the API. ### `azurerm_container_registry` -* The deprecated property `encryption.enabled` has been removed. Encryption can be toggled on and off through the presence and absence of the `encryption` block in the configuration. -* The deprecated block `retention_policy` has been removed in favour of the property `retention_policy_in_days`. -* The deprecated block `trust_policy` has been removed in favour of the property `trust_policy_enabled`. -* The deprecated block `network_rule_set.virtual_network` has been removed. +* The deprecated `encryption.enabled` property has been removed. Encryption can be toggled on and off through the presence and absence of the `encryption` block in the configuration. +* The deprecated `retention_policy` block has been removed in favour of the `retention_policy_in_days` property. +* The deprecated `trust_policy` block has been removed in favour of the `trust_policy_enabled` property. +* The deprecated `network_rule_set.virtual_network` block has been removed. ### `azurerm_cosmosdb_account` -* The deprecated property `connection_strings` has been removed in favour of the primary and secondary connection strings for sql, mongodb and readonly properties. -* The deprecated property `enable_multiple_write_locations` has been removed in favour of the `multiple_write_locations_enabled` property. -* The deprecated property `enable_free_tier` has been removed in favour of the `free_tier_enabled` property. -* The deprecated property `enable_automatic_failover` has been removed in favour of the `automatic_failover_enabled` property. +* The deprecated `connection_strings` property has been removed in favour of the primary and secondary connection strings for sql, mongodb and readonly properties. +* The deprecated `enable_multiple_write_locations` property has been removed in favour of the `multiple_write_locations_enabled` property. +* The deprecated `enable_free_tier` property has been removed in favour of the `free_tier_enabled` property. +* The deprecated `enable_automatic_failover` property has been removed in favour of the `automatic_failover_enabled` property. +* The `minimal_tls_version` property now defaults to `Tls12`. +* The `ip_range_filter` property is now a set that will only accept valid CIDR values. ### `azurerm_cosmosdb_sql_container` -* The deprecated property `partition_key_path` has been removed in favour of the `partition_key_paths` property. +* The deprecated `partition_key_path` property has been removed in favour of the `partition_key_paths` property. ### `azurerm_data_factory_integration_runtime_azure` -* The property `cleanup_enabled` now defaults to `true`. +* The `cleanup_enabled` property now defaults to `true`. ### `azurerm_data_protection_backup_policy_blob_storage` -* The deprecated property `retention_duration` has been removed in favour of the `operational_default_retention_duration` property. +* The deprecated `retention_duration` property has been removed in favour of the `operational_default_retention_duration` property. ### `azurerm_databricks_workspace` -* The property `custom_parameters.no_public_ip` now defaults to `true`. -* The property `network_security_group_rules_required` is no longer Computed. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. +* The `custom_parameters.no_public_ip` property now defaults to `true`. +* The `network_security_group_rules_required` property is no longer Computed. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. ### `azurerm_dashboard_grafana` -* The property `grafana_major_version` is now Required. +* The `grafana_major_version` property is now Required. ### `azurerm_dev_test_lab` -* The deprecated property `storage_type` has been removed. +* The deprecated `storage_type` property has been removed. ### `azurerm_digital_twins_time_series_database_connection` -* The property `kusto_table_name` now defaults to `AdtPropertyEvents`. +* The `kusto_table_name` property now defaults to `AdtPropertyEvents`. ### `azurerm_elastic_cloud_elasticsearch` -* The property `logs` is no longer Computed. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. +* The `logs` property is no longer Computed. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. ### `azurerm_eventhub_namespace` -* The deprecated property `zone_redundant` has been removed. -* The property `minimum_tls_version` now defaults to `1.2`. +* The deprecated `zone_redundant` property has been removed. +* The `minimum_tls_version` property now defaults to `1.2`. ### `azurerm_express_route_port` -* The property `billing_type` now defaults to `MeteredData`. +* The `billing_type` property now defaults to `MeteredData`. ### `azurerm_firewall_policy` -* The property `sku` now defaults to `Standard`. +* The `sku` property now defaults to `Standard`. + +### `azurerm_function_app` + +* The `site.config.elastic_instance_minimum` property no longer accepts the value 0. ### `azurerm_hdinsight_kafka_cluster` -* The deprecated property `roles.kafka_management_node` has been removed. +* The `roles.kafka_management_node.username` property is now Computed only. ### `azurerm_image` -* A new required property `storage_type` has been added to the `os_disk` and `data_disk` blocks. +* A new required `storage_type` property has been added to the `os_disk` and `data_disk` blocks. ### `azurerm_iotcentral_application` -* The property `template` now defaults to `iotc-pnp-preview@1.0.0`. +* The `template` property now defaults to `iotc-pnp-preview@1.0.0`. ### `azurerm_iothub` -* The property `event_hub_partition_count` now defaults to `4`. -* The property `event_hub_retention_in_days` now defaults to `1`. -* The property `fallback_route.enabled` now defaults to `true`. +* The `event_hub_partition_count` property now defaults to `4`. +* The `event_hub_retention_in_days` property now defaults to `1`. +* The `fallback_route.enabled` property now defaults to `true`. +* The `file_upload.sas_ttl` property now defaults to `PT1H`. +* The `file_upload.default_ttl` property now defaults to `PT1H`. +* The `file_upload.lock_duration` property now defaults to `PT1M`. ### `azurerm_key_vault_managed_hardware_security_module_role_assignment` -* The deprecated property `vault_base_url` has been removed in favour of the `managed_hsm_id` property. +* The deprecated `vault_base_url` property has been removed in favour of the `managed_hsm_id` property. ### `azurerm_kubernetes_cluster` -* The deprecated property `enable_pod_security_policy` has been removed. -* The deprecated property `network_profile.ebpf_data_plane` has been removed in favour of the property `network_profile.network_data_plane`. -* The deprecated property `api_server_authorized_ip_ranges` has been removed in favour of the property `api_server_access_profile.authorized_ip_ranges`. -* The deprecated property `network_profile.docker_bridge_cidr` has been removed. -* The deprecated property `azure_active_directory_role_based_access_control.client_app_id` has been removed. -* The deprecated property `azure_active_directory_role_based_access_control.server_app_id` has been removed. -* The deprecated property `azure_active_directory_role_based_access_control.server_app_secret` has been removed. -* The deprecated property `azure_active_directory_role_based_access_control.managed` has been removed. -* The deprecated property `workload_autoscaler_profile.vertical_pod_autoscaler_update_mode` has been removed. -* The deprecated property `workload_autoscaler_profile.vertical_pod_autoscaler_controlled_values` has been removed. -* The deprecated property `web_app_routing.dns_zone_id` has been removed in favour of the `web_app_routing.dns_zone_ids` property. -* The deprecated property `public_network_access_enabled` has been removed. -* The deprecated property `default_node_pool.node_taints` has been removed. -* The property `automatic_channel_upgrade` has been renamed to `automatic_upgrade_channel`. -* The property `node_os_channel_upgrade` has been renamed to `node_os_upgrade_channel` and now defaults to `NodeImage`. -* The property `default_node_pool.enable_auto_scaling` has been renamed to `default_node_pool.auto_scaling_enabled`. -* The property `default_node_pool.enable_node_public_ip` has been renamed to `default_node_pool.node_public_ip_enabled`. -* The property `default_node_pool.enable_host_encryption` has been renamed to `default_node_pool.host_encryption_enabled`. -* The property `default_node_pool.type` no longer accepts the value `AvailabilitySet`. -* The property `image_cleaner_interval_hours` now defaults to `0` and will only be set if `image_cleaner_enabled` has been set to `true`. -* The property `network_profile.load_balancer_profile.outbound_ip_prefix_ids` is no longer `Computed`. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. -* The property `network_profile.load_balancer_profile.outbound_ip_address_ids` is no longer `Computed`. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. -* The block `service_mesh_profile` has had the required property `revisions` added. +* The deprecated `enable_pod_security_policy` property has been removed. +* The deprecated `network_profile.ebpf_data_plane` property has been removed in favour of the `network_profile.network_data_plane` property. +* The deprecated `api_server_authorized_ip_ranges` property has been removed in favour of the `api_server_access_profile.authorized_ip_ranges` property. +* The deprecated `network_profile.docker_bridge_cidr` property has been removed. +* The deprecated `azure_active_directory_role_based_access_control.client_app_id` property has been removed. +* The deprecated `azure_active_directory_role_based_access_control.server_app_id` property has been removed. +* The deprecated `azure_active_directory_role_based_access_control.server_app_secret` property has been removed. +* The deprecated `azure_active_directory_role_based_access_control.managed` property has been removed. +* The deprecated `workload_autoscaler_profile.vertical_pod_autoscaler_update_mode` property has been removed. +* The deprecated `workload_autoscaler_profile.vertical_pod_autoscaler_controlled_values` property has been removed. +* The deprecated `web_app_routing.dns_zone_id` property has been removed in favour of the `web_app_routing.dns_zone_ids` property. +* The deprecated `public_network_access_enabled` property has been removed. +* The deprecated `default_node_pool.node_taints` property has been removed. +* The `automatic_channel_upgrade` property has been renamed to `automatic_upgrade_channel`. +* The `node_os_channel_upgrade` property has been renamed to `node_os_upgrade_channel` and now defaults to `NodeImage`. +* The `default_node_pool.enable_auto_scaling` property has been renamed to `default_node_pool.auto_scaling_enabled`. +* The `default_node_pool.enable_node_public_ip` property has been renamed to `default_node_pool.node_public_ip_enabled`. +* The `default_node_pool.enable_host_encryption` property has been renamed to `default_node_pool.host_encryption_enabled`. +* The `default_node_pool.type` property no longer accepts the value `AvailabilitySet`. +* The `image_cleaner_interval_hours` property now defaults to `0` and will only be set if `image_cleaner_enabled` has been set to `true`. +* The `network_profile.load_balancer_profile.outbound_ip_prefix_ids` property is no longer `Computed`. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. +* The `network_profile.load_balancer_profile.outbound_ip_address_ids` property is no longer `Computed`. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. +* The `service_mesh_profile` block has had the required `revisions` property added. ### `azurerm_kubernetes_fleet_manager` -* The deprecated block `hub_profile` has been removed. +* The deprecated `hub_profile` block has been removed. ### `azurerm_kubernetes_cluster_node_pool` -* The property `enable_auto_scaling` has been renamed to `auto_scaling_enabled`. -* The property `enable_node_public_ip` has been renamed to `node_public_ip_enabled`. -* The property `enable_host_encryption` has been renamed to `host_encryption_enabled`. +* The `enable_auto_scaling` property has been renamed to `auto_scaling_enabled`. +* The `enable_node_public_ip` property has been renamed to `node_public_ip_enabled`. +* The `enable_host_encryption` property has been renamed to `host_encryption_enabled`. ### `azurerm_kusto_cluster` -* The deprecated property `engine` has been removed. +* The deprecated `engine` property has been removed. ### `azurerm_lb` -* The property `sku` now defaults to `Standard`. +* The `sku` property now defaults to `Standard`. ### `azurerm_lb_nat_rule` -* The property `idle_timeout_in_minutes` now defaults to `4`. +* The `idle_timeout_in_minutes` property now defaults to `4`. ### `azurerm_lb_rule` -* The property `idle_timeout_in_minutes` now defaults to `4`. -* The property `load_distribution` now defaults to `Default`. +* The `idle_timeout_in_minutes` property now defaults to `4`. +* The `load_distribution` property now defaults to `Default`. ### `azurerm_linux_function_app` * The properties `site_config.health_check_path` and `site_config.health_check_eviction_time_in_min` must be set together. +* New `vnet_image_pull_enabled` property has been added, this property must be set to `true` if your App is running in an App Service Environment. + +### `azurerm_linux_function_app_slot` + +* New `vnet_image_pull_enabled` property has been added, this property must be set to `true` if your App is running in an App Service Environment. ### `azurerm_linux_virtual_machine_scale_set` -* The deprecated block `gallery_applications` has been removed in favour of the `gallery_application` block. -* The deprecated block `terminate_notification` has been removed in favour of the `termination_notification` block. -* The deprecated property `scale_in_policy` has been removed in favour of the `scale_in` block. -* The property `extension_operations_enabled` now defaults to `true`. +* The deprecated `gallery_applications` block has been removed in favour of the `gallery_application` block. +* The deprecated `terminate_notification` block has been removed in favour of the `termination_notification` block. +* The deprecated `scale_in_policy` property has been removed in favour of the `scale_in` block. +* The `extension_operations_enabled` property now defaults to `true`. +* The `scale_in` property is no longer Computed. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. ### `azurerm_linux_web_app` -* The deprecated property `site_config.auto_heal_setting.trigger.slow_request.path` has been removed in favour of the `site_config.auto_heal_setting.trigger.slow_request_with_path` block. -* The deprecated property `site_config.application_stack.docker_image_tag` has been removed. -* The deprecated property `site_config.application_stack.docker_image` has been removed. +* The deprecated `site_config.auto_heal_setting.trigger.slow_request.path` property has been removed in favour of the `site_config.auto_heal_setting.trigger.slow_request_with_path` block. +* The deprecated `site_config.application_stack.docker_image_tag` property has been removed. +* The deprecated `site_config.application_stack.docker_image` property has been removed. * The properties `site_config.health_check_path` and `site_config.health_check_eviction_time_in_min` must be set together. +* The property `auto_heal_enabled` has been removed and is now implied by the presence of the `auto_heal` block. ### `azurerm_linux_web_app_slot` -* The deprecated property `site_config.application_stack.docker_image_tag` has been removed. -* The deprecated property `site_config.application_stack.docker_image` has been removed. +* The deprecated `site_config.application_stack.docker_image_tag` property has been removed. +* The deprecated `site_config.application_stack.docker_image` property has been removed. +* The property `auto_heal_enabled` has been removed and is now implied by the presence of the `auto_heal` block. ### `azurerm_log_analytics_cluster` -* The property `size_gb` now defaults to `100`. +* The `size_gb` property now defaults to `100`. ### `azurerm_log_analytics_workspace` -* The property `sku` no longer supports the value `Free`. +* The `sku` property no longer supports the value `Free`. + +### `azurerm_logic_app_standard` + +* The `version` property now defaults to `~4`. ### `azurerm_machine_learning_compute_cluster` -* The property `ssh_public_access_enabled` now defaults to `false`. +* The `ssh_public_access_enabled` property now defaults to `false`. ### `azurerm_machine_learning_compute_instance` -* The deprecated property `location` has been removed. +* The deprecated `location` property has been removed. ### `azurerm_machine_learning_datastore_datalake_gen2` -* The property `authority_url` is no longer `Computed`. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. +* The `authority_url` property is no longer `Computed`. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. ### `azurerm_machine_learning_workspace` -* The deprecated property `public_access_behind_virtual_network_enabled` has been removed in favour of the `public_network_access_enabled` property. -* The property `public_network_access_enabled` now defaults to `true`. +* The deprecated `public_access_behind_virtual_network_enabled` property has been removed in favour of the `public_network_access_enabled` property. +* The `public_network_access_enabled` property now defaults to `true`. -### `azurerm_managed_applications` +### `azurerm_managed_application` -* The deprecated property `parameters` has been removed in favour of the `parameter_values` property. +* The deprecated `parameters` property has been removed in favour of the `parameter_values` property. ### `azurerm_managed_disk` -* The deprecated property `encryption_settings.enabled` has been removed, enabling and disabling encryption is controlled by the presence or absence of the `encryption_settings` block. +* The deprecated `encryption_settings.enabled` property has been removed, enabling and disabling encryption is controlled by the presence or absence of the `encryption_settings` block. ### `azurerm_management_group_policy_remediation` -* The deprecated property `policy_definition_id` has been removed in favour of the `policy_definition_reference_id` property. -* The deprecated property `resource_discovery_mode` has been removed. +* The deprecated `policy_definition_id` property has been removed in favour of the `policy_definition_reference_id` property. +* The deprecated `resource_discovery_mode` property has been removed. ### `azurerm_monitor_aad_diagnostic_setting` -* The deprecated block `log` has been removed in favour of the `enabled_log` block. +* The deprecated `log` block has been removed in favour of the `enabled_log` block. ### `azurerm_monitor_action_group` -* The deprecated property `event_hub_receiver.event_hub_id` has been removed in favour of the `event_hub_receiver.event_hub_name` and `event_hub_receiver.event_hub_namespace` properties. +* The deprecated `event_hub_receiver.event_hub_id` property has been removed in favour of the `event_hub_receiver.event_hub_name` and `event_hub_receiver.event_hub_namespace` properties. ### `azurerm_monitor_activity_log_alert` -* The property `location` is now Required. +* The `location` property is now Required. ### `azurerm_monitor_data_collection_rule` -* The property `data_sources.data_import.syslog.streams` is now Required. - -### `azurerm_monitor_diagnostic_categories` - -* The deprecated property `logs` will be removed in favour of the `log_category_types` property. +* The `data_sources.data_import.syslog.streams` property is now Required. ### `azurerm_monitor_diagnostic_setting` @@ -904,312 +932,348 @@ The deprecated data source has been superseded by `azurerm_mssql_server` and has * The deprecated `metric.retention_policy` block has been removed in favour of the `azurerm_storage_management_policy` resource. * The deprecated `log` block has been removed in favour of the `enabled_log` block. +### `azurerm_mssql_managed_database` + +* The `long_term_retention_policy.immutable_backups_enabled` property has been removed due to a breaking SDK upgrade. + +### `azurerm_mssql_database` + +* The `long_term_retention_policy.immutable_backups_enabled` property has been removed due to a breaking SDK upgrade. + ### `azurerm_netapp_pool` -* The property `qos_type` now defaults to `Auto`. +* The `qos_type` property now defaults to `Auto`. ### `azurerm_netapp_snapshot_policy` -* The property `hourly_schedule` is no longer `Computed`. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. -* The property `daily_schedule` is no longer `Computed`. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. -* The property `weekly_schedule` is no longer `Computed`. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. -* The property `monthly_schedule` is no longer `Computed`. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. +* The `hourly_schedule` property is no longer `Computed`. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. +* The `daily_schedule` property is no longer `Computed`. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. +* The `weekly_schedule` property is no longer `Computed`. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. +* The `monthly_schedule` property is no longer `Computed`. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. ### `azurerm_netapp_volume` -* The property `network_features` now defaults to `Basic`. +* The `network_features` property now defaults to `Basic`. ### `azurerm_network_connection_monitor` -* The property `output_workspace_resource_ids` is no longer `Computed`. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. +* The `output_workspace_resource_ids` property is no longer `Computed`. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. ### `azurerm_network_interface` -* The property `dns_servers` is no longer `Computed`. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. -* The deprecated property `enable_accelerated_networking` has been removed in favour of the `accelerated_networking_enabled` property. -* The deprecated property `enable_ip_forwarding` has been removed in favour of the `ip_forwarding_enabled` property. +* The `dns_servers` property is no longer `Computed`. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. +* The deprecated `enable_accelerated_networking` property has been removed in favour of the `accelerated_networking_enabled` property. +* The deprecated `enable_ip_forwarding` property has been removed in favour of the `ip_forwarding_enabled` property. ### `azurerm_network_watcher_flow_log` -* The property `version` now defaults to `1`. +* The `version` property now defaults to `1`. ### `azurerm_nginx_deployment` -* The deprecated block `configuration` has been removed in favour of the `azurerm_nginx_configuration` resource. -* The property `capacity` no longer has a default value of 20. `sku`s that support scaling now require either `capacity` or `auto_scale_profiles`. +* The deprecated `configuration` block has been removed in favour of the `azurerm_nginx_configuration` resource. +* The `capacity` property no longer has a default value of 20. `sku`s that support scaling now require either `capacity` or `auto_scale_profiles`. ### `azurerm_orchestrated_virtual_machine_scale_set` -* The property `extension_operations_enabled` now defaults to `true`. +* The `extension_operations_enabled` property now defaults to `true`. -### `azurerm_recovery_services_vault_resource_guard_association` +### `azurerm_private_dns_resolver_inbound_endpoint` + +* The `ip_configurations` block can have a maximum of one item. -* The deprecated property `name` has been removed. +### `azurerm_public_ip` -### `azurerm_recovery_services_site_recovery_replicated_vm` +* The `sku` property now defaults to `Standard`. + +### `azurerm_recovery_services_vault_resource_guard_association` -* The deprecated property `is_primary` has been removed. +* The deprecated `name` property has been removed. ### `azurerm_redis_cache` -* The deprecated property `enable_non_ssl_port` has been removed in favour of the `non_ssl_port_enabled` property. -* The deprecated property `redis_configuration.enable_authentication` has been removed in favour of the `redis_configuration.authentication_enabled` property. -* The property `family` is now case-sensitive. You will need to update your configuration to match the casing expected by the API. -* The property `redis_version` now defaults to `6`. +* The deprecated `enable_non_ssl_port` property has been removed in favour of the `non_ssl_port_enabled` property. +* The deprecated `redis_configuration.enable_authentication` property has been removed in favour of the `redis_configuration.authentication_enabled` property. +* The `redis_configuraton.data_persistence_authentication_method` property no longer defaults to `SAS`. +* The `family` property is now case-sensitive. You will need to update your configuration to match the casing expected by the API. +* The `redis_version` property now defaults to `6`. + +### `azurerm_redis_enterprise_database` + +* The deprecated `resource_group_name` property has been removed. ### `azurerm_resource_policy_remediation` -* The deprecated property `policy_definition_id` has been removed in favour of the `policy_definition_reference_id` property. +* The deprecated `policy_definition_id` property has been removed in favour of the `policy_definition_reference_id` property. ### `azurerm_resource_group_policy_remediation` -* The deprecated property `policy_definition_id` has been removed in favour of the `policy_definition_reference_id` property. +* The deprecated `policy_definition_id` property has been removed in favour of the `policy_definition_reference_id` property. ### `azurerm_route_table` -* The deprecated property `disable_bgp_route_propagation` has been removed in favour of the `bgp_route_propagation_enabled` property. +* The deprecated `disable_bgp_route_propagation` property has been removed in favour of the `bgp_route_propagation_enabled` property. + +### `azurerm_site_recovery_protection_container_mapping` + +* The `authentication_type` property now defaults to `SystemAssignedIdentity`. + +### `azurerm_site_recovery_replicated_vm` + +* The deprecated `is_primary` property has been removed. ### `azurerm_snapshot` -* The deprecated property `encryption_settings.enabled` has been removed, enabling and disabling encryption is controlled by the presence or absence of the `encryption_settings` block. +* The deprecated `encryption_settings.enabled` property has been removed, enabling and disabling encryption is controlled by the presence or absence of the `encryption_settings` block. + +### `azurerm_spring_cloud_gateway_route_config` + +* The `protocol` property has become Required. ### `azurerm_stream_analytics_job` -* The property `data_locale` now defaults to `en-US`. +* The `data_locale` property now defaults to `en-US`. ### `azurerm_subnet` -* The block `actions` has become a Set instead of a List, meaning that the order of these items no longer matters. If you're referencing these items within your Terraform Configuration, then this may require some code changes. -* The deprecated property `private_endpoint_network_policies_enabled` has been removed in favour of the `private_endpoint_network_policies` property. -* The deprecated property `enforce_private_link_endpoint_network_policies` has been removed in favour of the `private_endpoint_network_policies` property. -* The deprecated property `enforce_private_link_service_network_policies` has been removed in favour of the `private_link_service_network_policies_enabled` property. +* The `actions` block has become a Set instead of a List, meaning that the order of these items no longer matters. If you're referencing these items within your Terraform Configuration, then this may require some code changes. +* The deprecated `private_endpoint_network_policies_enabled` property has been removed in favour of the `private_endpoint_network_policies` property. +* The deprecated `enforce_private_link_endpoint_network_policies` property has been removed in favour of the `private_endpoint_network_policies` property. +* The deprecated `enforce_private_link_service_network_policies` property has been removed in favour of the `private_link_service_network_policies_enabled` property. +* The `private_endpoint_network_policies` property now defaults to `Disabled`. +* The `private_link_service_network_policies_enabled` property now defaults to `true`. ### `azurerm_subscription_policy_remediation` -* The deprecated property `policy_definition_id` has been removed in favour of the `policy_definition_reference_id` property. +* The deprecated `policy_definition_id` property has been removed in favour of the `policy_definition_reference_id` property. ### `azurerm_site_recovery_replication_recovery_plan` -* The deprecated block `recovery_group` has been removed in favour of the `shutdown_recovery_group`, `failover_recovery_group` and `boot_recovery_group` properties. +* The deprecated `recovery_group` block has been removed in favour of the `shutdown_recovery_group`, `failover_recovery_group` and `boot_recovery_group` properties. ### `azurerm_sentinel_alert_rule_ms_security_incident` -* The block `display_name_filter` is no longer Computed. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. +* The `display_name_filter` block is no longer Computed. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. ### `azurerm_sentinel_alert_rule_scheduled` -* The deprecated block `incident_configuration` has been removed in favour of the `incident` block. -* The deprecated property `incident_configuration.create_incident` has been removed in favour of the `incident.create_incident_enabled` property. -* The deprecated property `incident_configuration.group_by_entities` has been removed in favour of the `incident.by_entities` property. -* The deprecated property `incident_configuration.group_by_alert_details` has been removed in favour of the `incident.by_alert_details` property. -* The deprecated property `incident_configuration.group_by_custom_details` has been removed in favour of the `incident.by_custom_details` property. +* The deprecated `incident_configuration` block has been removed in favour of the `incident` block. +* The deprecated `incident_configuration.create_incident` property has been removed in favour of the `incident.create_incident_enabled` property. +* The deprecated `incident_configuration.group_by_entities` property has been removed in favour of the `incident.by_entities` property. +* The deprecated `incident_configuration.group_by_alert_details` property has been removed in favour of the `incident.by_alert_details` property. +* The deprecated `incident_configuration.group_by_custom_details` property has been removed in favour of the `incident.by_custom_details` property. ### `azurerm_sentinel_automation_rule` -* The deprecated property `condition` has been removed in favour of the `condition_json` property. +* The deprecated `condition` property has been removed in favour of the `condition_json` property. ### `azurerm_sentinel_data_connector_microsoft_threat_intelligence` -* The deprecated property `bing_safety_phishing_url_lookback_date` has been removed. +* The deprecated `bing_safety_phishing_url_lookback_date` property has been removed. ### `azurerm_sentinel_log_analytics_workspace_onboarding` -* The deprecated property `name` has been removed in favour of the `workspace_id` property. -* The deprecated property `resource_group_name` has been removed in favour of the `workspace_id` property. +* The deprecated `name` property has been removed in favour of the `workspace_id` property. +* The deprecated `resource_group_name` property has been removed in favour of the `workspace_id` property. ### `azurerm_servicebus_queue` -* The deprecated property `enable_batched_operations` has been removed in favour of the `batched_operations_enabled` property. -* The deprecated property `enable_express` has been removed in favour of the `express_enabled` property. -* The deprecated property `enable_partitioning` has been removed in favour of the `partitioning_enabled` property. -* The property `auto_delete_on_idle` now defaults to `P10675199DT2H48M5.4775807S`. -* The property `default_message_ttl` now defaults to `P10675199DT2H48M5.4775807S`. -* The property `duplicate_detection_history_time_window` now defaults to `PT10M`. -* The property `lock_duration` now defaults to `PT1M`. -* The property `max_message_size_in_kilobytes` now defaults to `256`. -* The property `max_size_in_megabytes` now defaults to `5120`. +* The deprecated `enable_batched_operations` property has been removed in favour of the `batched_operations_enabled` property. +* The deprecated `enable_express` property has been removed in favour of the `express_enabled` property. +* The deprecated `enable_partitioning` property has been removed in favour of the `partitioning_enabled` property. +* The `auto_delete_on_idle` property now defaults to `P10675199DT2H48M5.4775807S`. +* The `default_message_ttl` property now defaults to `P10675199DT2H48M5.4775807S`. +* The `duplicate_detection_history_time_window` property now defaults to `PT10M`. +* The `lock_duration` property now defaults to `PT1M`. +* The `max_message_size_in_kilobytes` property now defaults to `256`. +* The `max_size_in_megabytes` property now defaults to `5120`. ### `azurerm_servicebus_subscription` -* The deprecated property `enable_batched_operations` has been removed in favour of the `batched_operations_enabled` property. -* The property `auto_delete_on_idle` now defaults to `P10675199DT2H48M5.4775807S`. -* The property `default_message_ttl` now defaults to `P10675199DT2H48M5.4775807S`. -* The property `lock_duration` now defaults to `PT1M`. +* The deprecated `enable_batched_operations` property has been removed in favour of the `batched_operations_enabled` property. +* The `auto_delete_on_idle` property now defaults to `P10675199DT2H48M5.4775807S`. +* The `default_message_ttl` property now defaults to `P10675199DT2H48M5.4775807S`. +* The `lock_duration` property now defaults to `PT1M`. ### `azurerm_servicebus_topic` -* The deprecated property `enable_batched_operations` has been removed in favour of the `batched_operations_enabled` property. -* The deprecated property `enable_express` has been removed in favour of the `express_enabled` property. -* The deprecated property `enable_partitioning` has been removed in favour of the `partitioning_enabled` property. -* The property `auto_delete_on_idle` now defaults to `P10675199DT2H48M5.4775807S`. -* The property `default_message_ttl` now defaults to `P10675199DT2H48M5.4775807S`. -* The property `duplicate_detection_history_time_window` now defaults to `P10M`. -* The property `max_message_size_in_kilobytes` now defaults to `256`. -* The property `max_size_in_megabytes` now defaults to `5120`. +* The deprecated `enable_batched_operations` property has been removed in favour of the `batched_operations_enabled` property. +* The deprecated `enable_express` property has been removed in favour of the `express_enabled` property. +* The deprecated `enable_partitioning` property has been removed in favour of the `partitioning_enabled` property. +* The `auto_delete_on_idle` property now defaults to `P10675199DT2H48M5.4775807S`. +* The `default_message_ttl` property now defaults to `P10675199DT2H48M5.4775807S`. +* The `duplicate_detection_history_time_window` property now defaults to `P10M`. +* The `max_message_size_in_kilobytes` property now defaults to `256`. +* The `max_size_in_megabytes` property now defaults to `5120`. ### `azurerm_servicebus_namespace` -* The deprecated property `zone_redundant` has been removed. -* The property `minimum_tls_version` now defaults to `1.2`. +* The deprecated `zone_redundant` property has been removed. +* The `minimum_tls_version` property now defaults to `1.2`. ### `azurerm_signalr_service` -* The deprecated property `live_trace_enabled` has been removed in favour of the `live_trace` property. -* The property `cors` is no longer `Computed`. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. +* The deprecated `live_trace_enabled` property has been removed in favour of the `live_trace` property. +* The `cors` property is no longer `Computed`. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. + +### `azurerm_storage_account` + +* The deprecated `enable_https_traffic_only` property has been removed in favour of the `https_traffic_only_enabled` property. +* The `large_file_share_enabled` property is no longer defaulted to `true` as that value varies based on the value of `account_kind` +* The `cross_tenant_replication_enabled` property now defaults to `false` -### `azurerm_storage_account` +### `azurerm_storage_account_customer_managed_key` -* The deprecated property `enable_https_traffic_only` has been removed in favour of the `https_traffic_only_enabled` property. -* The property `large_file_share_enabled` is no longer defaulted to `true` as that value varies based on the value of `account_kind` -* The property `cross_tenant_replication_enabled` now defaults to `false` +* The `key_vault_id` property no longer accepts Managed HSM keys, instead please use the `managed_hsm_key_id` property. ### `azurerm_storage_share_directory` -* The deprecated property `share_name` has been removed in favour of the `storage_share_id` property. -* The deprecated property `storage_account_name` has been removed in favour of the `storage_share_id` property. +* The deprecated `share_name` property has been removed in favour of the `storage_share_id` property. +* The deprecated `storage_account_name` property has been removed in favour of the `storage_share_id` property. ### `azurerm_storage_table_entity` -* The deprecated property `table_name` has been removed in favour of the `storage_table_id` property. -* The deprecated property `storage_account_name` has been removed in favour of the `storage_table_id` property. +* The deprecated `table_name` property has been removed in favour of the `storage_table_id` property. +* The deprecated `storage_account_name` property has been removed in favour of the `storage_table_id` property. ### `azurerm_synapse_sql_pool_vulnerability_assessment` -* The property `recurring_scans.email_subscription_admins_enabled` now defaults to `true`. +* The `recurring_scans.email_subscription_admins_enabled` property now defaults to `true`. ### `azurerm_synapse_workspace_vulnerability_assessment` -* The property `recurring_scans.email_subscription_admins_enabled` now defaults to `true`. +* The `recurring_scans.email_subscription_admins_enabled` property now defaults to `true`. ### `azurerm_synapse_workspace` -* The deprecated block `aad_admin` has been removed in favour of the `azurerm_synapse_workspace_aad_admin` resource. -* The deprecated block `sqlsql_aad_admin` has been removed in favour of the `azurerm_synapse_workspace_sql_aad_admin` resource. +* The deprecated `aad_admin` block has been removed in favour of the `azurerm_synapse_workspace_aad_admin` resource. +* The deprecated `sql_aad_admin` block has been removed in favour of the `azurerm_synapse_workspace_sql_aad_admin` resource. ### `azurerm_traffic_manager_azure_endpoint` -* The property `weight` now defaults to `1`. -* The property `priority` now defaults to `1`. +* The `weight` property now defaults to `1`. +* The `priority` property now defaults to `1`. ### `azurerm_traffic_manager_external_endpoint` -* The property `weight` now defaults to `1`. -* The property `priority` now defaults to `1`. +* The `weight` property now defaults to `1`. +* The `priority` property now defaults to `1`. ### `azurerm_traffic_manager_nested_endpoint` -* The property `weight` now defaults to `1`. -* The property `priority` now defaults to `1`. +* The `weight` property now defaults to `1`. +* The `priority` property now defaults to `1`. -### `azurerm_traffic_manager_nested_endpoint` +### `azurerm_traffic_manager_profile` -* The property `profile_status` now defaults to `Enabled`. +* The `profile_status` property now defaults to `Enabled`. ### `azurerm_virtual_network` -* The property `address_space` has been changed from a list to a set. If you're referencing an element in this property then this will require code changes. +* The `address_space` property has been changed from a list to a set. If you're referencing an element in this property then this will require code changes. -### `azurerm_virtual_network_gateway_connections` +### `azurerm_virtual_network_gateway_connection` -* The property `shared_key` has become `Required`. +* The `shared_key` property has become Required. ### `azurerm_vpn_gateway` -* The property `routing_preference` now defaults to `Microsoft Network`. +* The `routing_preference` property now defaults to `Microsoft Network`. ### `azurerm_vpn_gateway_nat_rule` -* The deprecated property `external_address_space_mappings` has been removed in favour of the `external_mapping` property. -* The deprecated property `internal_address_space_mappings` has been removed in favour of the `internal_mapping` property. -* The deprecated property `resource_group_name` has been removed in favour of the `vpn_gateway_id` property. +* The deprecated `external_address_space_mappings` property has been removed in favour of the `external_mapping` property. +* The deprecated `internal_address_space_mappings` property has been removed in favour of the `internal_mapping` property. +* The deprecated `resource_group_name` property has been removed in favour of the `vpn_gateway_id` property. ### `azurerm_web_application_firewall_policy` -* The deprecated property `managed_rules.managed_rule_set.rule_group_override.disabled_rules` has been removed in favour of the `managed_rules.managed_rule_set.rule_group_override.rule` block. +* The deprecated `managed_rules.managed_rule_set.rule_group_override.disabled_rules` property has been removed in favour of the `managed_rules.managed_rule_set.rule_group_override.rule` block. +* The `managed_rules.managed_rule_set.rule_group_override.rule.enabled` property now defaults to `false`. ### `azurerm_windows_function_app` * The properties `site_config.health_check_path` and `site_config.health_check_eviction_time_in_min` must be set together. +* New `vnet_image_pull_enabled` property has been added, this property must be set to `true` if your App is running in an App Service Environment. + +### `azurerm_windows_function_app` + +* New `vnet_image_pull_enabled` property has been added, this property must be set to `true` if your App is running in an App Service Environment. ### `azurerm_windows_virtual_machine_scale_set` -* The deprecated block `gallery_applications` has been removed in favour of the `gallery_application` block. -* The deprecated block `terminate_notification` has been removed in favour of the `termination_notification` block. -* The deprecated property `scale_in_policy` has been removed in favour of the `scale_in` block. -* The property `extension_operations_enabled` now defaults to `true`. +* The deprecated `gallery_applications` block has been removed in favour of the `gallery_application` block. +* The deprecated `terminate_notification` block has been removed in favour of the `termination_notification` block. +* The deprecated `scale_in_policy` property has been removed in favour of the `scale_in` block. +* The `extension_operations_enabled` property now defaults to `true`. +* The `scale_in` property is no longer Computed. If you experience a diff as a result of this change you may need to add this to `ignore_changes`. ### `azurerm_windows_web_app` -* The deprecated property `site_config.auto_heal_setting.trigger.slow_request.path` has been removed in favour of the `site_config.auto_heal_setting.trigger.slow_request_with_path` block. -* The deprecated property `site_config.application_stack.docker_container_registry` has been removed. -* The property `site_config.application_stack.docker_container_name` has been removed. -* The property `site_config.application_stack.docker_container_tag` has been removed. +* The deprecated `site_config.auto_heal_setting.trigger.slow_request.path` property has been removed in favour of the `site_config.auto_heal_setting.trigger.slow_request_with_path` block. +* The deprecated `site_config.application_stack.docker_container_registry` property has been removed. +* The `site_config.application_stack.docker_container_name` property has been removed. +* The `site_config.application_stack.docker_container_tag` property has been removed. * The properties `site_config.health_check_path` and `site_config.health_check_eviction_time_in_min` must be set together. +* The property `auto_heal_enabled` has been removed and is now implied by the presence of the `auto_heal` block. ### `azurerm_windows_web_app_slot` -* The deprecated property `site_config.auto_heal_setting.trigger.slow_request.path` has been removed in favour of the `site_config.auto_heal_setting.trigger.slow_request_with_path` block. -* The deprecated property `site_config.application_stack.docker_container_registry` has been removed. -* The property `site_config.application_stack.docker_container_name` has been removed. -* The property `site_config.application_stack.docker_container_tag` has been removed. +* The deprecated `site_config.auto_heal_setting.trigger.slow_request.path` property has been removed in favour of the `site_config.auto_heal_setting.trigger.slow_request_with_path` block. +* The deprecated `site_config.application_stack.docker_container_registry` property has been removed. +* The `site_config.application_stack.docker_container_name` property has been removed. +* The `site_config.application_stack.docker_container_tag` property has been removed. * The properties `site_config.health_check_path` and `site_config.health_check_eviction_time_in_min` must be set together. +* The property `auto_heal_enabled` has been removed and is now implied by the presence of the `auto_heal` block. ## Behaviour changes and removed properties in Data Sources ### `azurerm_cosmosdb_account` -* The deprecated property `connection_strings` has been removed in favour of the primary and secondary connection strings for sql, mongodb and readonly properties. -* The deprecated property `enable_multiple_write_locations` has been removed in favour of the `multiple_write_locations_enabled` property. -* The deprecated property `enable_free_tier` has been removed in favour of the `free_tier_enabled` property. -* The deprecated property `enable_automatic_failover` has been removed in favour of the `automatic_failover_enabled` property. +* The deprecated `connection_strings` property has been removed in favour of the primary and secondary connection strings for sql, mongodb and readonly properties. +* The deprecated `enable_multiple_write_locations` property has been removed in favour of the `multiple_write_locations_enabled` property. +* The deprecated `enable_free_tier` property has been removed in favour of the `free_tier_enabled` property. +* The deprecated `enable_automatic_failover` property has been removed in favour of the `automatic_failover_enabled` property. ### `azurerm_eventhub_namespace` -* The deprecated property `zone_redundant` has been removed. +* The deprecated `zone_redundant` property has been removed. ### `azurerm_kubernetes_cluster` -* The deprecated property `agent_pool_profile.enable_auto_scaling` has been removed in favour of the `agent_pool_profile.auto_scaling_enabled` property. -* The deprecated property `agent_pool_profile.enable_node_public_ip` has been removed in favour of the `agent_pool_profile.node_public_ip_enabled` property. -* The deprecated property `agent_pool_profile.enable_host_encryption` has been removed in favour of the `agent_pool_profile.host_encryption_enabled` property. -* The deprecated property `azure_active_directory_role_based_access_control.client_app_id` has been removed. -* The deprecated property `azure_active_directory_role_based_access_control.server_app_id` has been removed. -* The deprecated property `azure_active_directory_role_based_access_control.managed` has been removed. +* The deprecated `agent_pool_profile.enable_auto_scaling` property has been removed in favour of the `agent_pool_profile.auto_scaling_enabled` property. +* The deprecated `agent_pool_profile.enable_node_public_ip` property has been removed in favour of the `agent_pool_profile.node_public_ip_enabled` property. +* The deprecated `agent_pool_profile.enable_host_encryption` property has been removed in favour of the `agent_pool_profile.host_encryption_enabled` property. +* The deprecated `azure_active_directory_role_based_access_control.client_app_id` property has been removed. +* The deprecated `azure_active_directory_role_based_access_control.server_app_id` property has been removed. +* The deprecated `azure_active_directory_role_based_access_control.managed` property has been removed. ### `azurerm_kubernetes_cluster_node_pool` -* The deprecated property `enable_auto_scaling` has been removed in favour of the `auto_scaling_enabled` property. -* The deprecated property `enable_node_public_ip` has been removed in favour of the `node_public_ip_enabled` property. +* The deprecated `enable_auto_scaling` property has been removed in favour of the `auto_scaling_enabled` property. +* The deprecated `enable_node_public_ip` property has been removed in favour of the `node_public_ip_enabled` property. ### `azurerm_linux_web_app` -* The deprecated property `site_config.application_stack.docker_image_tag` has been removed. -* The deprecated property `site_config.application_stack.docker_image` has been removed. +* The deprecated `site_config.application_stack.docker_image_tag` property has been removed. +* The deprecated `site_config.application_stack.docker_image` property has been removed. ### `azurerm_monitor_action_group` -* The deprecated property `event_hub_receiver.event_hub_id` has been removed in favour of the `event_hub_receiver.event_hub_name` and `event_hub_receiver.event_hub_namespace` properties. +* The deprecated `event_hub_receiver.event_hub_id` property has been removed in favour of the `event_hub_receiver.event_hub_name` and `event_hub_receiver.event_hub_namespace` properties. ### `azurerm_monitor_diagnostic_categories` -* The deprecated property `logs` has been removed in favour of the `log_category_types` property. +* The deprecated `logs` property has been removed in favour of the `log_category_types` property. ### `azurerm_network_interface` -* The deprecated property `enable_accelerated_networking` has been removed in favour of the `accelerated_networking_enabled` property. -* The deprecated property `enable_ip_forwarding` has been removed in favour of the `ip_forwarding_enabled` property. +* The deprecated `enable_accelerated_networking` property has been removed in favour of the `accelerated_networking_enabled` property. +* The deprecated `enable_ip_forwarding` property has been removed in favour of the `ip_forwarding_enabled` property. ### `azurerm_storage_account` -* The deprecated property `enable_https_traffic_only` has been removed in favour of the `https_traffic_only_enabled` property. - -### `azurerm_storage_account_customer_managed_key` - -* The property `key_vault_id` no longer accepts Managed HSM keys, instead please use the `managed_hsm_key_id` property. - -### `azurerm_storage_share_directory` - -* The deprecated properties `storage_account_name` and `share_name` have been removed in favour of the `storage_share_id` property. +* The deprecated `enable_https_traffic_only` property has been removed in favour of the `https_traffic_only_enabled` property. ### `azurerm_storage_table_entity` @@ -1221,42 +1285,37 @@ The deprecated data source has been superseded by `azurerm_mssql_server` and has ### `azurerm_subnet` -* The deprecated property `private_endpoint_network_policies_enabled` has been removed in favour of the `private_endpoint_network_policies` property. -* The deprecated property `enforce_private_link_endpoint_network_policies` has been removed in favour of the `private_endpoint_network_policies` property. -* The deprecated property `enforce_private_link_service_network_policies` has been removed in favour of the `private_link_service_network_policies_enabled` property. +* The deprecated `private_endpoint_network_policies_enabled` property has been removed in favour of the `private_endpoint_network_policies` property. +* The deprecated `enforce_private_link_endpoint_network_policies` property has been removed in favour of the `private_endpoint_network_policies` property. +* The deprecated `enforce_private_link_service_network_policies` property has been removed in favour of the `private_link_service_network_policies_enabled` property. ### `azurerm_servicebus_namespace_authorization_rule` -* The deprecated property `namespace_name` has been removed in favour of the `namespace_id` property. -* The deprecated property `resource_group_name` has been removed in favour of the `namespace_id` property. - -### `azurerm_servicebus_namespace_disaster_recovery_config` - -* The deprecated property `namespace_name` has been removed in favour of the `namespace_id` property. -* The deprecated property `resource_group_name` has been removed in favour of the `namespace_id` property. +* The deprecated `namespace_name` property has been removed in favour of the `namespace_id` property. +* The deprecated `resource_group_name` property has been removed in favour of the `namespace_id` property. ### `azurerm_servicebus_queue` -* The deprecated property `namespace_name` has been removed in favour of the `namespace_id` property. -* The deprecated property `resource_group_name` has been removed in favour of the `namespace_id` property. +* The deprecated `namespace_name` property has been removed in favour of the `namespace_id` property. +* The deprecated `resource_group_name` property has been removed in favour of the `namespace_id` property. ### `azurerm_servicebus_subscription` -* The deprecated property `namespace_name` has been removed in favour of the `topic_id` property. -* The deprecated property `resource_group_name` has been removed in favour of the `topic_id` property. -* The deprecated property `topic_name` has been removed in favour of the `topic_id` property. +* The deprecated `namespace_name` property has been removed in favour of the `topic_id` property. +* The deprecated `resource_group_name` property has been removed in favour of the `topic_id` property. +* The deprecated `topic_name` property has been removed in favour of the `topic_id` property. ### `azurerm_servicebus_topic` -* The deprecated property `namespace_name` has been removed in favour of the `namespace_id` property. -* The deprecated property `resource_group_name` has been removed in favour of the `namespace_id` property. +* The deprecated `namespace_name` property has been removed in favour of the `namespace_id` property. +* The deprecated `resource_group_name` property has been removed in favour of the `namespace_id` property. ### `azurerm_servicebus_namespace` -* The deprecated property `zone_redundant` has been removed. +* The deprecated `zone_redundant` property has been removed. ### `azurerm_windows_web_app` -* The property `site_config.application_stack.docker_container_registry` has been removed. -* The property `site_config.application_stack.docker_container_name` has been removed. -* The property `site_config.application_stack.docker_container_tag` has been removed. +* The `site_config.application_stack.docker_container_registry` property has been removed. +* The `site_config.application_stack.docker_container_name` property has been removed. +* The `site_config.application_stack.docker_container_tag` property has been removed. diff --git a/website/docs/guides/aks_workload_identity.html.markdown b/website/docs/guides/aks_workload_identity.html.markdown index 8cae35ae1abf1..636cc8871bfbb 100644 --- a/website/docs/guides/aks_workload_identity.html.markdown +++ b/website/docs/guides/aks_workload_identity.html.markdown @@ -108,7 +108,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "=3.0.0" + version = "~> 4.0" } } } @@ -130,7 +130,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "=3.0.0" + version = "~> 4.0" } } } diff --git a/website/docs/guides/azure_cli.html.markdown b/website/docs/guides/azure_cli.html.markdown index 3f0ca3a8fa03e..b513dae8d495c 100644 --- a/website/docs/guides/azure_cli.html.markdown +++ b/website/docs/guides/azure_cli.html.markdown @@ -114,6 +114,8 @@ az account set --subscription="SUBSCRIPTION_ID" Now that we're logged into the Azure CLI - we can configure Terraform to use these credentials. +-> **Note:** In version 4.0 of the Azure Provider, it's now required to specify the Azure Subscription ID when configuring a provider instance in your configuration. This can be done by specifying the `subscription_id` provider property, or by exporting the `ARM_SUBSCRIPTION_ID` environment variable. More information can be found in the [Azure Resource Manager: 4.0 Upgrade Guide](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/4.0-upgrade-guide#specifying-subscription-id-is-now-mandatory). + To configure Terraform to use the Default Subscription defined in the Azure CLI - we can use the following Provider block: ```hcl @@ -123,7 +125,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "=3.0.0" + version = "~> 4.0" } } } @@ -149,7 +151,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "=3.0.0" + version = "~> 4.0" } } } @@ -177,7 +179,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "=3.0.0" + version = "~> 4.0" } } } diff --git a/website/docs/guides/features-block.html.markdown b/website/docs/guides/features-block.html.markdown index b6f26820d816c..4067fc5c185ce 100644 --- a/website/docs/guides/features-block.html.markdown +++ b/website/docs/guides/features-block.html.markdown @@ -67,8 +67,8 @@ provider "azurerm" { } recovery_service { - retain_data_and_stop_protection_on_back_vm_destroy = true - purge_protected_items_from_vault_on_destroy = true + vm_backup_stop_protection_and_retain_data_on_destroy = true + purge_protected_items_from_vault_on_destroy = true } resource_group { diff --git a/website/docs/guides/managed_service_identity.html.markdown b/website/docs/guides/managed_service_identity.html.markdown index 730d5e11b0690..c7abc326511d6 100644 --- a/website/docs/guides/managed_service_identity.html.markdown +++ b/website/docs/guides/managed_service_identity.html.markdown @@ -98,7 +98,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "=3.0.0" + version = "~> 4.0" } } } @@ -120,7 +120,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "=3.0.0" + version = "~> 4.0" } } } diff --git a/website/docs/guides/service_principal_client_certificate.html.markdown b/website/docs/guides/service_principal_client_certificate.html.markdown index 81a932812c995..fe2c8057367bb 100644 --- a/website/docs/guides/service_principal_client_certificate.html.markdown +++ b/website/docs/guides/service_principal_client_certificate.html.markdown @@ -127,7 +127,7 @@ $ export ARM_SUBSCRIPTION_ID="20000000-0000-0000-0000-000000000000" > $env:ARM_SUBSCRIPTION_ID = "20000000-0000-0000-0000-000000000000" ``` -The following Terraform and Provider blocks can be specified - where `3.0.0` is the version of the Azure Provider that you'd like to use: +The following Terraform and Provider blocks can be specified - where `4.1.0` is the version of the Azure Provider that you'd like to use: ```hcl # We strongly recommend using the required_providers block to set the @@ -136,7 +136,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "=3.0.0" + version = "~> 4.0" } } } @@ -168,7 +168,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "=3.0.0" + version = "~> 4.0" } } } @@ -196,7 +196,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "=3.43.0" + version = "=4.1.0" } } } diff --git a/website/docs/guides/service_principal_client_secret.html.markdown b/website/docs/guides/service_principal_client_secret.html.markdown index e70d4d8e6ee11..02195d4116ef8 100644 --- a/website/docs/guides/service_principal_client_secret.html.markdown +++ b/website/docs/guides/service_principal_client_secret.html.markdown @@ -184,7 +184,7 @@ export ARM_SUBSCRIPTION_ID="20000000-0000-0000-0000-000000000000" > $env:ARM_TENANT_ID = "10000000-0000-0000-0000-000000000000" > $env:ARM_SUBSCRIPTION_ID = "20000000-0000-0000-0000-000000000000" ``` -The following Terraform and Provider blocks can be specified - where `3.0.0` is the version of the Azure Provider that you'd like to use: +The following Terraform and Provider blocks can be specified - where `4.1.0` is the version of the Azure Provider that you'd like to use: ```hcl # We strongly recommend using the required_providers block to set the @@ -193,7 +193,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "=3.0.0" + version = "~> 4.0" } } } @@ -224,7 +224,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "=3.0.0" + version = "~> 4.0" } } } diff --git a/website/docs/guides/service_principal_oidc.html.markdown b/website/docs/guides/service_principal_oidc.html.markdown index 082d551b238e0..ac70b2f17471b 100644 --- a/website/docs/guides/service_principal_oidc.html.markdown +++ b/website/docs/guides/service_principal_oidc.html.markdown @@ -164,7 +164,7 @@ Alternatively, using the `AzureCLI@2` task, you can expose the OIDC token to `id Write-Host "##vso[task.setvariable variable=ARM_TENANT_ID]$env:tenantId" ``` -The following Terraform and Provider blocks can be specified - where `3.7.0` is the version of the Azure Provider that you'd like to use: +The following Terraform and Provider blocks can be specified - where `4.1.0` is the version of the Azure Provider that you'd like to use: ```hcl # We strongly recommend using the required_providers block to set the @@ -173,7 +173,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "=3.7.0" + version = "=4.1.0" } } } @@ -211,7 +211,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "=3.7.0" + version = "=4.1.0" } } } diff --git a/website/docs/index.html.markdown b/website/docs/index.html.markdown index 5a2b71572aceb..310c527cea5fc 100644 --- a/website/docs/index.html.markdown +++ b/website/docs/index.html.markdown @@ -29,7 +29,7 @@ Terraform supports a number of different methods for authenticating to Azure: We recommend using either a Service Principal or Managed Service Identity when running Terraform non-interactively (such as when running Terraform in a CI server) - and authenticating using the Azure CLI when running Terraform locally. -->**Note:** The User, Service Principal or Managed Identity running Terraform should have permissions to register [Azure Resource Providers](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/resource-providers-and-types). If the principal running Terraform has insufficient permissions to register Resource Providers then we recommend setting the property [skip_provider_registration](#skip_provider_registration) in the provider block to prevent auto-registration. +->**Note on Permissions** The User, Service Principal or Managed Identity running Terraform should have permissions to register [Azure Resource Providers](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/resource-providers-and-types). If the principal running Terraform has insufficient permissions to register Resource Providers then we recommend setting the property [`resource_provider_registrations`](#resource_provider_registrations) to `none` in the provider block to prevent auto-registration. ## Example Usage @@ -40,14 +40,14 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "=3.0.0" + version = "~> 4.0" } } } # Configure the Microsoft Azure Provider provider "azurerm" { - skip_provider_registration = true # This is only required when the User, Service Principal, or Identity running Terraform lacks the permissions to register Azure Resource Providers. + resource_provider_registrations = "none" # This is only required when the User, Service Principal, or Identity running Terraform lacks the permissions to register Azure Resource Providers. features {} } @@ -103,14 +103,16 @@ The following arguments are supported: * `features` - (Required) A `features` block as defined below which can be used to customize the behaviour of certain Azure Provider resources. +* `subscription_id` - (Required) The Subscription ID which should be used. This can also be sourced from the `ARM_SUBSCRIPTION_ID` Environment Variable. + +-> The `subscription_id` property is required when performing a plan or apply operation, but is not required to run `terraform validate`. + * `client_id` - (Optional) The Client ID which should be used. This can also be sourced from the `ARM_CLIENT_ID` Environment Variable. * `client_id_file_path` (Optional) The path to a file containing the Client ID which should be used. This can also be sourced from the `ARM_CLIENT_ID_FILE_PATH` Environment Variable. * `environment` - (Optional) The Cloud Environment which should be used. Possible values are `public`, `usgovernment`, `german`, and `china`. Defaults to `public`. This can also be sourced from the `ARM_ENVIRONMENT` Environment Variable. Not used when `metadata_host` is specified. -* `subscription_id` - (Optional) The Subscription ID which should be used. This can also be sourced from the `ARM_SUBSCRIPTION_ID` Environment Variable. - * `tenant_id` - (Optional) The Tenant ID which should be used. This can also be sourced from the `ARM_TENANT_ID` Environment Variable. * `auxiliary_tenant_ids` - (Optional) List of auxiliary Tenant IDs required for multi-tenancy and cross-tenant scenarios. This can also be sourced from the `ARM_AUXILIARY_TENANT_IDS` Environment Variable. @@ -191,24 +193,37 @@ For some advanced scenarios, such as where more granular permissions are necessa * `auxiliary_tenant_ids` - (Optional) Contains a list of (up to 3) other Tenant IDs used for cross-tenant and multi-tenancy scenarios with multiple AzureRM provider definitions. The list of `auxiliary_tenant_ids` in a given AzureRM provider definition contains the other, remote Tenants and should not include its own `subscription_id` (or `ARM_SUBSCRIPTION_ID` Environment Variable). -* `skip_provider_registration` - (Optional) Should the AzureRM Provider skip registering the Resource Providers it supports? This can also be sourced from the `ARM_SKIP_PROVIDER_REGISTRATION` Environment Variable. Defaults to `false`. +* `resource_provider_registrations` - (Optional) Specifies a pre-determined set of [Azure Resource Providers](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/resource-providers-and-types) to automatically register when initializing the AzureRM Provider. Allowed values for this property are `core`, `extended`, `all`, or `none`. This can also be sourced from the `ARM_RESOURCE_PROVIDER_REGISTRATIONS` environment variable. For more information about which resource providers each set contains, see the [Resource Provider Registrations](#resource-provider-registrations) section below. --> By default, Terraform will attempt to register any Resource Providers that it supports, even if they're not used in your configurations to be able to display more helpful error messages. If you're running in an environment with restricted permissions, or wish to manage Resource Provider Registration outside of Terraform you may wish to disable this flag; however, please note that the error messages returned from Azure may be confusing as a result (example: `API version 2019-01-01 was not found for Microsoft.Foo`). +* `resource_providers_to_register` - (Optional) A list of arbitrary [Azure Resource Providers](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/resource-providers-and-types) to automatically register when initializing the AzureRM Provider. Can be used in combination with the `resource_provider_registrations` property. For more information, see the [Resource Provider Registrations](#resource-provider-registrations) section below. --> **Note:** When Terraform is configured to use credentials with limited permissions you *must* set `skip_provider_registration` to true (or the environment variable `ARM_SKIP_PROVIDER_REGISTRATION=true`) in order to account for this - otherwise Terraform will, as described above, try to register any Resource Providers. +-> By default, Terraform will attempt to register any Resource Providers that it supports, even if they're not used in your configurations, to be able to display more helpful error messages. If you're running in an environment with restricted permissions, or wish to manage Resource Provider Registration outside of Terraform you may wish to disable this by setting `resource_provider_registrations` to `none`; however, please note that the error messages returned from Azure may be confusing as a result. -* `storage_use_azuread` - (Optional) Should the AzureRM Provider use AzureAD to connect to the Storage Blob & Queue API's, rather than the SharedKey from the Storage Account? This can also be sourced from the `ARM_STORAGE_USE_AZUREAD` Environment Variable. Defaults to `false`. +* `storage_use_azuread` - (Optional) Should the AzureRM Provider use AzureAD to connect to the Storage Blob & Queue APIs, rather than the SharedKey from the Storage Account? This can also be sourced from the `ARM_STORAGE_USE_AZUREAD` Environment Variable. Defaults to `false`. ~> **Note:** This requires that the User/Service Principal being used has the associated `Storage` roles - which are added to new Contributor/Owner role-assignments, but **have not** been backported by Azure to existing role-assignments. ~> **Note:** The Files Storage API does not support authenticating via AzureAD and will continue to use a SharedKey when AAD authentication is enabled. -* `use_msal` - (Optional) When `true`, and when using service principal authentication, the provider will obtain [v2 authentication tokens](https://docs.microsoft.com/azure/active-directory/develop/access-tokens#token-formats-and-ownership) from the Microsoft Identity Platform. Has no effect when authenticating via Managed Identity or the Azure CLI. Can also be set via the `ARM_USE_MSAL` or `ARM_USE_MSGRAPH` environment variables. - --> **Note:** This will behaviour will be defaulted on in version 3.0 of the AzureRM (with no opt-out) due to [the deprecation of Azure Active Directory Graph](https://docs.microsoft.com/azure/active-directory/develop/msal-migration). - It's also possible to use multiple Provider blocks within a single Terraform configuration, for example, to work with resources across multiple Subscriptions - more information can be found [in the documentation for Providers](https://www.terraform.io/docs/configuration/providers.html#multiple-provider-instances). ## Features The `features` block allows configuring the behaviour of the Azure Provider, more information can be found on [the dedicated page for the `features` block](guides/features-block.html). + +## Resource Provider Registrations + +Before each plan or apply operation, the AzureRM Provider attempts to ensure that necessary Azure Resource Providers are registered. This process enables the necessary APIs and services for the provider to work with Azure. By default, the provider will attempt to register a small set of resource providers, which provides coverage for the most common resource types that are supported by the provider. + +You can customise this behavior as needed by setting the `resource_provider_registrations` provider property, or the `resource_providers_to_register` provider property, or both of these. The `resource_provider_registrations` property indicates a pre-determined set of resource providers to automatically register, and are: + +* `core` - a small set of resource providers for essential services including Compute, Networking and Storage. +* `extended` - a larger set that provides coverage for the most common supported resources. +* `all` - a set of resource providers that enables every resource in the provider to be used. +* `none` - with this setting, the provider will not attempt to register any resource providers. + +To view the latest specific Azure Resource Providers included in each set, please refer to [this page](https://github.com/hashicorp/terraform-provider-azurerm/blob/main/internal/resourceproviders/required.go) on GitHub. + +In addition to, or in place of, the sets described above, you can also configure the AzureRM Provider to register specific Azure Resource Providers, by setting the `resource_providers_to_register` provider property. This should be a list of strings, containing the exact names of Azure Resource Providers to register. For a list of all resource providers, please refer to [official Azure documentation](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/resource-providers-and-types). + +-> **Note on Permissions** The User, Service Principal or Managed Identity running Terraform should have permissions to register [Azure Resource Providers](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/resource-providers-and-types). If the principal running Terraform has insufficient permissions to register Resource Providers then we recommend setting the property [`resource_provider_registrations`](#resource_provider_registrations) to `none` in the provider block to prevent auto-registration. diff --git a/website/docs/r/advisor_suppresion.html.markdown b/website/docs/r/advisor_suppresion.html.markdown new file mode 100644 index 0000000000000..eaf9f31358f22 --- /dev/null +++ b/website/docs/r/advisor_suppresion.html.markdown @@ -0,0 +1,69 @@ +--- +subcategory: "Advisor" +layout: "azurerm" +page_title: "Azure Resource Manager: azurerm_advisor_suppression" +description: |- + Specifies a suppression for an Azure Advisor recommendation. +--- + +# azurerm_advisor_suppression + +Specifies a suppression for an Azure Advisor recommendation. + +## Example Usage + +```hcl +provider "azurerm" { + features {} +} + +data "azurerm_client_config" "current" {} + +data "azurerm_advisor_recommendations" "example" {} + +resource "azurerm_advisor_suppression" "example" { + name = "HardcodedSuppressionName" + recommendation_id = data.azurerm_advisor_recommendations.test.recommendations[0].recommendation_name + resource_id = "/subscriptions/${data.azurerm_client_config.current.subscription_id}" + ttl = "01:00:00:00" +} +``` + +## Arguments Reference + +The following arguments are supported: + +* `name` - (Required) The Name which should be used for this Advisor suppression. Changing this forces a new Advisor suppression to be created. + +* `recommendation_id` - (Required) The ID of the Advisor recommendation to suppress. Changing this forces a new Advisor suppression to be created. + +* `resource_id` - (Required) The ID of the Resource to suppress the Advisor recommendation for. Changing this forces a new Advisor suppression to be created. + +--- + +* `ttl` - (Optional) A optional time to live value. If omitted, the suppression will not expire. Changing this forces a new Advisor suppression to be created. + +## Attributes Reference + +In addition to the Arguments listed above - the following Attributes are exported: + +* `id` - The ID of the Advisor suppression. + +* `suppression_id` - The GUID of the suppression. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: + +* `create` - (Defaults to 30 minutes) Used when creating the Advisor suppression. +* `read` - (Defaults to 5 minutes) Used when retrieving the Advisor suppression. +* `update` - (Defaults to 30 minutes) Used when updating the Advisor suppression. +* `delete` - (Defaults to 30 minutes) Used when deleting the Advisor suppression. + +## Import + +Advisor suppressions can be imported using the `resource id`, e.g. + +```shell +terraform import azurerm_advisor_suppression.example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/recommendations/00000000-0000-0000-0000-000000000000/suppressions/name +``` diff --git a/website/docs/r/analysis_services_server.html.markdown b/website/docs/r/analysis_services_server.html.markdown index a81452c59619d..45ef8d0b2178d 100644 --- a/website/docs/r/analysis_services_server.html.markdown +++ b/website/docs/r/analysis_services_server.html.markdown @@ -19,12 +19,12 @@ resource "azurerm_resource_group" "example" { } resource "azurerm_analysis_services_server" "server" { - name = "analysisservicesserver" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - sku = "S0" - admin_users = ["myuser@domain.tld"] - enable_power_bi_service = true + name = "analysisservicesserver" + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name + sku = "S0" + admin_users = ["myuser@domain.tld"] + power_bi_service_enabled = true ipv4_firewall_rule { name = "myRule1" @@ -54,11 +54,11 @@ The following arguments are supported: * `admin_users` - (Optional) List of email addresses of admin users. -* `querypool_connection_mode` - (Optional) Controls how the read-write server is used in the query pool. If this value is set to `All` then read-write servers are also used for queries. Otherwise with `ReadOnly` these servers do not participate in query operations. +* `querypool_connection_mode` - (Optional) Controls how the read-write server is used in the query pool. If this value is set to `All` then read-write servers are also used for queries. Otherwise with `ReadOnly` these servers do not participate in query operations. Defaults to `All`. * `backup_blob_container_uri` - (Optional) URI and SAS token for a blob container to store backups. -* `enable_power_bi_service` - (Optional) Indicates if the Power BI service is allowed to access or not. +* `power_bi_service_enabled` - (Optional) Indicates if the Power BI service is allowed to access or not. * `ipv4_firewall_rule` - (Optional) One or more `ipv4_firewall_rule` block(s) as defined below. diff --git a/website/docs/r/api_connection.html.markdown b/website/docs/r/api_connection.html.markdown index 3369ce7cd641b..008f7a9f3207f 100644 --- a/website/docs/r/api_connection.html.markdown +++ b/website/docs/r/api_connection.html.markdown @@ -67,7 +67,7 @@ The following arguments are supported: --- -* `display_name` - (Optional) A display name for this API Connection. Changing this forces a new API Connection to be created. +* `display_name` - (Optional) A display name for this API Connection. Defaults to `Service Bus`. Changing this forces a new API Connection to be created. * `parameter_values` - (Optional) A map of parameter values associated with this API Connection. Changing this forces a new API Connection to be created. diff --git a/website/docs/r/api_management_api.html.markdown b/website/docs/r/api_management_api.html.markdown index eb9f6021fd496..57d9ed9a2dfba 100644 --- a/website/docs/r/api_management_api.html.markdown +++ b/website/docs/r/api_management_api.html.markdown @@ -82,10 +82,6 @@ The following arguments are supported: * `service_url` - (Optional) Absolute URL of the backend service implementing this API. -* `soap_pass_through` - (Optional) Should this API expose a SOAP frontend, rather than a HTTP frontend? Defaults to `false`. - --> **NOTE:** This property has been deprecated in favour of the `api_type` property and will be removed in version 4.0 of the provider. - * `subscription_key_parameter_names` - (Optional) A `subscription_key_parameter_names` block as documented below. * `subscription_required` - (Optional) Should this API require a subscription key? Defaults to `true`. diff --git a/website/docs/r/api_management_diagnostic.html.markdown b/website/docs/r/api_management_diagnostic.html.markdown index 5ff71b2f10755..e9d5b915cea46 100644 --- a/website/docs/r/api_management_diagnostic.html.markdown +++ b/website/docs/r/api_management_diagnostic.html.markdown @@ -129,7 +129,7 @@ The following arguments are supported: * `verbosity` - (Optional) Logging verbosity. Possible values are `verbose`, `information` or `error`. -* `operation_name_format` - (Optional) The format of the Operation Name for Application Insights telemetries. Possible values are `Name`, and `Url`. Defaults to `Name`. +* `operation_name_format` - (Optional) The format of the Operation Name for Application Insights telemetries. Possible values are `Name`, and `Url`. --- diff --git a/website/docs/r/api_management_logger.html.markdown b/website/docs/r/api_management_logger.html.markdown index e1c6fd705b7d6..72d9fedc04046 100644 --- a/website/docs/r/api_management_logger.html.markdown +++ b/website/docs/r/api_management_logger.html.markdown @@ -71,7 +71,11 @@ The following arguments are supported: An `application_insights` block supports the following: -* `instrumentation_key` - (Required) The instrumentation key used to push data to Application Insights. +* `connection_string` - (Optional) The connection string of Application Insights. + +* `instrumentation_key` - (Optional) The instrumentation key used to push data to Application Insights. + +~> **Note:** Either `connection_string` or `instrumentation_key` have to be specified. --- diff --git a/website/docs/r/app_configuration.html.markdown b/website/docs/r/app_configuration.html.markdown index 5d08182ab68f3..859612044af27 100644 --- a/website/docs/r/app_configuration.html.markdown +++ b/website/docs/r/app_configuration.html.markdown @@ -155,15 +155,13 @@ The following arguments are supported: * `identity` - (Optional) An `identity` block as defined below. -~> **NOTE:** Azure does not allow a downgrade from `standard` to `free`. - * `encryption` - (Optional) An `encryption` block as defined below. * `local_auth_enabled` - (Optional) Whether local authentication methods is enabled. Defaults to `true`. * `public_network_access` - (Optional) The Public Network Access setting of the App Configuration. Possible values are `Enabled` and `Disabled`. -~> **NOTE:** If `public_network_access` is not specified, the App Configuration will be created as `Automatic`. However, once a different value is defined, can not be set again as automatic. +~> **Note:** If `public_network_access` is not specified, the App Configuration will be created as `Automatic`. However, once a different value is defined, can not be set again as automatic. * `purge_protection_enabled` - (Optional) Whether Purge Protection is enabled. This field only works for `standard` sku. Defaults to `false`. @@ -173,6 +171,8 @@ The following arguments are supported: * `sku` - (Optional) The SKU name of the App Configuration. Possible values are `free` and `standard`. Defaults to `free`. +~> **Note:** Azure does not allow a downgrade from `standard` to `free`. + * `soft_delete_retention_days` - (Optional) The number of days that items should be retained for once soft-deleted. This field only works for `standard` sku. This value can be between `1` and `7` days. Defaults to `7`. Changing this forces a new resource to be created. ~> **Note:** If Purge Protection is enabled, this field can only be configured one time and cannot be updated. @@ -195,7 +195,7 @@ An `identity` block supports the following: * `identity_ids` - (Optional) A list of User Assigned Managed Identity IDs to be assigned to this App Configuration. -~> **NOTE:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. +~> **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. --- diff --git a/website/docs/r/app_service_environment.html.markdown b/website/docs/r/app_service_environment.html.markdown deleted file mode 100644 index 375f56e3ec26b..0000000000000 --- a/website/docs/r/app_service_environment.html.markdown +++ /dev/null @@ -1,119 +0,0 @@ ---- -subcategory: "App Service (Web Apps)" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_app_service_environment" -description: |- - Manages an App Service Environment. - ---- - -# azurerm_app_service_environment - -Manages an App Service Environment. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "exampleRG1" - location = "West Europe" -} - -resource "azurerm_virtual_network" "example" { - name = "example-vnet1" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - address_space = ["10.0.0.0/16"] -} - -resource "azurerm_subnet" "ase" { - name = "asesubnet" - resource_group_name = azurerm_resource_group.example.name - virtual_network_name = azurerm_virtual_network.example.name - address_prefixes = ["10.0.1.0/24"] -} - -resource "azurerm_subnet" "gateway" { - name = "gatewaysubnet" - resource_group_name = azurerm_resource_group.example.name - virtual_network_name = azurerm_virtual_network.example.name - address_prefixes = ["10.0.2.0/24"] -} - -resource "azurerm_app_service_environment" "example" { - name = "example-ase" - resource_group_name = azurerm_resource_group.example.name - subnet_id = azurerm_subnet.ase.id - pricing_tier = "I2" - front_end_scale_factor = 10 - internal_load_balancing_mode = "Web, Publishing" - allowed_user_ip_cidrs = ["11.22.33.44/32", "55.66.77.0/24"] - - cluster_setting { - name = "DisableTls1.0" - value = "1" - } -} - -``` - -## Argument Reference - -* `name` - (Required) The name of the App Service Environment. Changing this forces a new resource to be created. - -* `subnet_id` - (Required) The ID of the Subnet which the App Service Environment should be connected to. Changing this forces a new resource to be created. - -~> **NOTE** a /24 or larger CIDR is required. Once associated with an ASE this size cannot be changed. - -* `cluster_setting` - (Optional) Zero or more `cluster_setting` blocks as defined below. - -* `internal_load_balancing_mode` - (Optional) Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. Possible values are `None`, `Web`, `Publishing` and combined value `"Web, Publishing"`. Defaults to `None`. Changing this forces a new resource to be created. - -* `pricing_tier` - (Optional) Pricing tier for the front end instances. Possible values are `I1`, `I2` and `I3`. Defaults to `I1`. - -* `front_end_scale_factor` - (Optional) Scale factor for front end instances. Possible values are between `5` and `15`. Defaults to `15`. - -* `allowed_user_ip_cidrs` - (Optional) Allowed user added IP ranges on the ASE database. Use the addresses you want to set as the explicit egress address ranges. - -~> **NOTE:** `allowed_user_ip_cidrs` The addresses that will be used for all outbound traffic from your App Service Environment to the internet to avoid asymmetric routing challenge. If you're routing the traffic on premises, these addresses are your NATs or gateway IPs. If you want to route the App Service Environment outbound traffic through an NVA, the egress address is the public IP of the NVA. Please visit [Create your ASE with the egress addresses](https://docs.microsoft.com/azure/app-service/environment/forced-tunnel-support#add-your-own-ips-to-the-ase-azure-sql-firewall) - -* `resource_group_name` - (Required) The name of the Resource Group where the App Service Environment exists. Defaults to the Resource Group of the Subnet (specified by `subnet_id`). - -* `tags` - (Optional) A mapping of tags to assign to the resource. Changing this forces a new resource to be created. - ---- - -A `cluster_setting` block supports the following: - -* `name` - (Required) The name of the Cluster Setting. - -* `value` - (Required) The value for the Cluster Setting. - -## Attributes Reference - -* `id` - The ID of the App Service Environment. - -* `internal_ip_address` - IP address of internal load balancer of the App Service Environment. - -* `location` - The location where the App Service Environment exists. - -* `outbound_ip_addresses` - List of outbound IP addresses of the App Service Environment. - -* `service_ip_address` - IP address of service endpoint of the App Service Environment. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 6 hours) Used when creating the App Service Environment. -* `update` - (Defaults to 6 hours) Used when updating the App Service Environment. -* `read` - (Defaults to 5 minutes) Used when retrieving the App Service Environment. -* `delete` - (Defaults to 6 hours) Used when deleting the App Service Environment. - -## Import - -The App Service Environment can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_app_service_environment.myAppServiceEnv /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Web/hostingEnvironments/myAppServiceEnv -``` diff --git a/website/docs/r/application_gateway.html.markdown b/website/docs/r/application_gateway.html.markdown index 060e8ec6b85ce..4a28c064cb073 100644 --- a/website/docs/r/application_gateway.html.markdown +++ b/website/docs/r/application_gateway.html.markdown @@ -41,7 +41,7 @@ resource "azurerm_public_ip" "example" { name = "example-pip" resource_group_name = azurerm_resource_group.example.name location = azurerm_resource_group.example.location - allocation_method = "Dynamic" + allocation_method = "Static" } # since these variables are re-used - a locals block makes this more maintainable diff --git a/website/docs/r/application_insights.html.markdown b/website/docs/r/application_insights.html.markdown index 6628c6810465f..7cc0053fab91b 100644 --- a/website/docs/r/application_insights.html.markdown +++ b/website/docs/r/application_insights.html.markdown @@ -79,9 +79,9 @@ The following arguments are supported: * `application_type` - (Required) Specifies the type of Application Insights to create. Valid values are `ios` for _iOS_, `java` for _Java web_, `MobileCenter` for _App Center_, `Node.JS` for _Node.js_, `other` for _General_, `phone` for _Windows Phone_, `store` for _Windows Store_ and `web` for _ASP.NET_. Please note these values are case sensitive; unmatched values are treated as _ASP.NET_ by Azure. Changing this forces a new resource to be created. -* `daily_data_cap_in_gb` - (Optional) Specifies the Application Insights component daily data volume cap in GB. +* `daily_data_cap_in_gb` - (Optional) Specifies the Application Insights component daily data volume cap in GB. Defaults to `100`. -* `daily_data_cap_notifications_disabled` - (Optional) Specifies if a notification email will be send when the daily data volume cap is met. +* `daily_data_cap_notifications_disabled` - (Optional) Specifies if a notification email will be sent when the daily data volume cap is met. Defaults to `false`. * `retention_in_days` - (Optional) Specifies the retention period in days. Possible values are `30`, `60`, `90`, `120`, `180`, `270`, `365`, `550` or `730`. Defaults to `90`. diff --git a/website/docs/r/arc_machine.html.markdown b/website/docs/r/arc_machine.html.markdown new file mode 100644 index 0000000000000..4c064cf839d9b --- /dev/null +++ b/website/docs/r/arc_machine.html.markdown @@ -0,0 +1,61 @@ +--- +subcategory: "Hybrid Compute" +layout: "azurerm" +page_title: "Azure Resource Manager: azurerm_arc_machine" +description: |- + Manages a Hybrid Compute Machine. +--- + +# azurerm_arc_machine + +Manages a Hybrid Compute Machine. + +## Example Usage + +```hcl +resource "azurerm_resource_group" "example" { + name = "example-resources" + location = "West Europe" +} + +resource "azurerm_arc_machine" "example" { + name = "example-arcmachine" + resource_group_name = azurerm_resource_group.example.name + location = azurerm_resource_group.example.location + kind = "SCVMM" +} +``` + +## Arguments Reference + +The following arguments are supported: + +* `name` - (Required) The name of the Arc machine. Changing this forces a new resource to be created. + +* `resource_group_name` - (Required) The name of the Resource Group where the Arc Machine should exist. Changing this forces a new resource to be created. + +* `location` - (Required) The Azure Region where the Arc Machine should exist. Changing this forces a new resource to be created. + +* `kind` - (Required) The kind of the Arc Machine. Possible values are `AVS`, `AWS`, `EPS`, `GCP`, `HCI`, `SCVMM` and `VMware`. Changing this forces a new resource to be created. + +## Attributes Reference + +In addition to the Arguments listed above - the following Attributes are exported: + +* `id` - The ID of the Arc Machine. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) for certain actions: + +* `create` - (Defaults to 30 minutes) Used when creating this Arc Machine. +* `read` - (Defaults to 5 minutes) Used when retrieving this Arc Machine. +* `delete` - (Defaults to 30 minutes) Used when deleting this Arc Machine. + +## Import + +Arc Machines can be imported using the `resource id`, e.g. + +```shell +terraform import azurerm_arc_machine.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.HybridCompute/machines/machine1 +``` diff --git a/website/docs/r/arc_machine_automanage_configuration_assignment.html.markdown b/website/docs/r/arc_machine_automanage_configuration_assignment.html.markdown new file mode 100644 index 0000000000000..42f9d42d4b056 --- /dev/null +++ b/website/docs/r/arc_machine_automanage_configuration_assignment.html.markdown @@ -0,0 +1,78 @@ +--- +subcategory: "Automanage" +layout: "azurerm" +page_title: "Azure Resource Manager: azurerm_arc_machine_automanage_configuration_assignment" +description: |- + Manages an Arc Machine Automanage Configuration Profile Assignment. +--- + +# azurerm_arc_machine_automanage_configuration_assignment + +Manages an Arc Machine Automanage Configuration Profile Assignment. + +## Example Usage + +```hcl +provider "azurerm" { + features {} +} + +variable "arc_machine_name" { + description = "The name of the Arc Machine." +} + +resource "azurerm_resource_group" "example" { + name = "example-resources" + location = "West Europe" +} + +data "azurerm_arc_machine" "example" { + name = var.arc_machine_name + resource_group_name = azurerm_resource_group.example.name +} + +resource "azurerm_automanage_configuration" "example" { + name = "example-configuration" + resource_group_name = azurerm_resource_group.example.name + location = azurerm_resource_group.example.location +} + +resource "azurerm_arc_machine_automanage_configuration_assignment" "example" { + arc_machine_id = data.azurerm_arc_machine.example.id + configuration_id = azurerm_automanage_configuration.example.id +} + +``` + +## Arguments Reference + +The following arguments are supported: + +* `arc_machine_id` - (Required) The ARM resource ID of the Arc Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created. + +* `configuration_id` - (Required) The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created. + +~> **NOTE:** For a successful creation of this resource, locate "Automanage API Access" app within your Entra ID tenant. Make sure it's granted access to the scope that includes the arc server. + +--- +## Attributes Reference + +In addition to the Arguments listed above - the following Attributes are exported: + +* `id` - The ID of the Arc Machine Automanage Configuration Profile Assignment. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) for certain actions: + +* `create` - (Defaults to 30 minutes) Used when creating the Automanage Configuration. +* `read` - (Defaults to 5 minutes) Used when retrieving the Automanage Configuration. +* `delete` - (Defaults to 30 minutes) Used when deleting the Automanage Configuration. + +## Import + +Virtual Machine Automanage Configuration Profile Assignment can be imported using the `resource id`, e.g. + +```shell +terraform import azurerm_arc_machine_automanage_configuration_assignment.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.HybridCompute/machines/machine1/providers/Microsoft.AutoManage/configurationProfileAssignments/default +``` diff --git a/website/docs/r/automation_software_update_configuration.html.markdown b/website/docs/r/automation_software_update_configuration.html.markdown index 5eb440aba9c37..dc7bf7ad16701 100644 --- a/website/docs/r/automation_software_update_configuration.html.markdown +++ b/website/docs/r/automation_software_update_configuration.html.markdown @@ -52,13 +52,12 @@ CONTENT resource "azurerm_automation_software_update_configuration" "example" { name = "example" automation_account_id = azurerm_automation_account.example.id - operating_system = "Linux" linux { - classification_included = "Security" - excluded_packages = ["apt"] - included_packages = ["vim"] - reboot = "IfRequired" + classifications_included = "Security" + excluded_packages = ["apt"] + included_packages = ["vim"] + reboot = "IfRequired" } pre_task { @@ -222,7 +221,7 @@ In addition to the Arguments listed above - the following Attributes are exporte * `error_code` - The Error code when failed. -* `error_meesage` - The Error message indicating why the operation failed. +* `error_message` - The Error message indicating why the operation failed. ## Timeouts diff --git a/website/docs/r/azurerm_security_center_server_vulnerability_assessment.html.markdown b/website/docs/r/azurerm_security_center_server_vulnerability_assessment.html.markdown deleted file mode 100644 index b0f15d8a31db9..0000000000000 --- a/website/docs/r/azurerm_security_center_server_vulnerability_assessment.html.markdown +++ /dev/null @@ -1,120 +0,0 @@ ---- -subcategory: "Security Center" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_security_center_server_vulnerability_assessment" -description: |- - Manages an Azure Vulnerability Assessment (Qualys) to a VM or Azure ARC server. ---- - -# azurerm_security_center_server_vulnerability_assessment - -Manages an Azure Server Vulnerability Assessment (Qualys) to a VM. - --> **NOTE** This resource has been deprecated in favour of the `azurerm_security_center_server_vulnerability_assessment_virtual_machine` resource and will be removed in v4.0 of the AzureRM Provider. - --> **NOTE** Azure Defender has to be enabled on the subscription in order for this resource to work. -See this [documentation](https://docs.microsoft.com/azure/security-center/security-center-get-started) to get started. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} - -resource "azurerm_virtual_network" "example" { - name = "example-vnet" - resource_group_name = azurerm_resource_group.example.name - address_space = ["192.168.1.0/24"] - location = azurerm_resource_group.example.location -} - -resource "azurerm_subnet" "example" { - name = "example-subnet" - resource_group_name = azurerm_resource_group.example.name - virtual_network_name = azurerm_virtual_network.example.name - address_prefixes = ["192.168.1.0/24"] -} - -resource "azurerm_network_interface" "example" { - name = "example-nic" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - ip_configuration { - name = "vm-example" - subnet_id = azurerm_subnet.example.id - private_ip_address_allocation = "Dynamic" - } -} - -resource "azurerm_linux_virtual_machine" "example" { - name = "example-vm" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - size = "Standard_B1s" - admin_username = "testadmin" - admin_password = "Password1234!" - disable_password_authentication = false - - source_image_reference { - publisher = "Canonical" - offer = "0001-com-ubuntu-server-jammy" - sku = "22_04-lts" - version = "latest" - } - - os_disk { - caching = "ReadWrite" - storage_account_type = "Standard_LRS" - } - - network_interface_ids = [azurerm_network_interface.example.id] -} - -resource "azurerm_security_center_server_vulnerability_assessment" "example" { - virtual_machine_id = azurerm_linux_virtual_machine.example.id -} -``` - -## Argument Reference - -The following arguments are supported: - -* `virtual_machine_id` - (Optional) The ID of the virtual machine to be monitored by vulnerability assessment. Changing this forces a new resource to be created. - --> **NOTE:** One of either `virtual_machine_id` or `hybrid_machine_id` must be set. - -* `hybrid_machine_id` - (Optional) The ID of the Azure ARC server to be monitored by vulnerability assessment. Changing this forces a new resource to be created. - --> **NOTE:** One of either `virtual_machine_id` or `hybrid_machine_id` must be set. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Vulnerability Assessment resource. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 5 minutes) Used when creating the Advanced Threat Protection. -* `read` - (Defaults to 5 minutes) Used when retrieving the Advanced Threat Protection. -* `delete` - (Defaults to 10 minutes) Used when deleting the Advanced Threat Protection. - -## Import - -Server Vulnerability Assessments can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_security_center_server_vulnerability_assessment.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.Compute/virtualMachines/vm-name/providers/Microsoft.Security/serverVulnerabilityAssessments/Default -``` - -or - -```shell -terraform import azurerm_security_center_server_vulnerability_assessment.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.HybridCompute/machines/machine-name/providers/Microsoft.Security/serverVulnerabilityAssessments/Default -``` diff --git a/website/docs/r/bot_channel_web_chat.html.markdown b/website/docs/r/bot_channel_web_chat.html.markdown index 12943a15455ab..04f51b865a35b 100644 --- a/website/docs/r/bot_channel_web_chat.html.markdown +++ b/website/docs/r/bot_channel_web_chat.html.markdown @@ -49,10 +49,6 @@ The following arguments are supported: * `bot_name` - (Required) The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created. -* `site_names` - (Optional) A list of Web Chat Site names. - -~> **NOTE:** `site_names` is deprecated and will be removed in favour of the property `site` in version 4.0 of the AzureRM Provider. - * `site` - (Optional) A site represents a client application that you want to connect to your bot. One or more `site` blocks as defined below. --- diff --git a/website/docs/r/bot_channels_registration.html.markdown b/website/docs/r/bot_channels_registration.html.markdown index 7750021fc44b6..3216c5e54a8e7 100644 --- a/website/docs/r/bot_channels_registration.html.markdown +++ b/website/docs/r/bot_channels_registration.html.markdown @@ -63,14 +63,10 @@ The following arguments are supported: * `developer_app_insights_application_id` - (Optional) The Application Insights Application ID to associate with the Bot Channels Registration. -* `icon_url` - (Optional) The icon URL to visually identify the Bot Channels Registration. +* `icon_url` - (Optional) The icon URL to visually identify the Bot Channels Registration. Defaults to `https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png`. * `streaming_endpoint_enabled` - (Optional) Is the streaming endpoint enabled for the Bot Channels Registration. Defaults to `false`. -* `isolated_network_enabled` - (Optional) Is the Bot Channels Registration in an isolated network? - -~> **NOTE:** `isolated_network_enabled` is deprecated and will be removed in favour of the property `public_network_access_enabled` in version 4.0 of the AzureRM Provider. - * `public_network_access_enabled` - (Optional) Is the Bot Channels Registration in an isolated network? * `tags` - (Optional) A mapping of tags to assign to the resource. diff --git a/website/docs/r/bot_connection.html.markdown b/website/docs/r/bot_connection.html.markdown index f3cf039f30d96..08e36460c7e67 100644 --- a/website/docs/r/bot_connection.html.markdown +++ b/website/docs/r/bot_connection.html.markdown @@ -61,10 +61,6 @@ The following arguments are supported: * `parameters` - (Optional) A map of additional parameters to apply to the connection. -* `tags` - (Optional) A mapping of tags to assign to the resource. - --> **Note:** `tags` has been deprecated as the API no longer supports it and will be removed in version 4.0 of the provider. - ## Attributes Reference In addition to the Arguments listed above - the following Attributes are exported: diff --git a/website/docs/r/cdn_endpoint_custom_domain.html.markdown b/website/docs/r/cdn_endpoint_custom_domain.html.markdown index fcca3d2c175af..4a730e03a5d0c 100644 --- a/website/docs/r/cdn_endpoint_custom_domain.html.markdown +++ b/website/docs/r/cdn_endpoint_custom_domain.html.markdown @@ -95,11 +95,7 @@ A `cdn_managed_https` block supports the following: A `user_managed_https` block supports the following: -* `key_vault_certificate_id` - (Optional) The ID of the Key Vault Certificate that contains the HTTPS certificate. This is deprecated in favor of `key_vault_secret_id`. - -* `key_vault_secret_id` - (Optional) The ID of the Key Vault Secret that contains the HTTPS certificate. - -~> **NOTE** Either `key_vault_certificate_id` or `key_vault_secret_id` has to be specified. +* `key_vault_secret_id` - (Required) The ID of the Key Vault Secret that contains the HTTPS certificate. * `tls_version` - (Optional) The minimum TLS protocol version that is used for HTTPS. Possible values are `TLS10` (representing TLS 1.0/1.1), `TLS12` (representing TLS 1.2) and `None` (representing no minimums). Defaults to `TLS12`. diff --git a/website/docs/r/cdn_frontdoor_origin.html.markdown b/website/docs/r/cdn_frontdoor_origin.html.markdown index 56b3c79b9d305..e1c8ef61c436b 100644 --- a/website/docs/r/cdn_frontdoor_origin.html.markdown +++ b/website/docs/r/cdn_frontdoor_origin.html.markdown @@ -223,8 +223,6 @@ The following arguments are supported: * `enabled` - (Optional) Should the origin be enabled? Possible values are `true` or `false`. Defaults to `true`. --> **NOTE:** The `enabled` field will need to be explicitly set until the 4.0 provider is released due to the deprecation of the `health_probes_enabled` property in version 3.x of the AzureRM Provider. - * `http_port` - (Optional) The value of the HTTP port. Must be between `1` and `65535`. Defaults to `80`. * `https_port` - (Optional) The value of the HTTPS port. Must be between `1` and `65535`. Defaults to `443`. diff --git a/website/docs/r/cdn_frontdoor_route_disable_link_to_default_domain.html.markdown b/website/docs/r/cdn_frontdoor_route_disable_link_to_default_domain.html.markdown deleted file mode 100644 index 0bb5f5c0b85cf..0000000000000 --- a/website/docs/r/cdn_frontdoor_route_disable_link_to_default_domain.html.markdown +++ /dev/null @@ -1,55 +0,0 @@ ---- -subcategory: "CDN" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_cdn_frontdoor_route_disable_link_to_default_domain" -description: |- - Manages the Link To Default Domain property of a Front Door (standard/premium) Route. ---- - -# azurerm_cdn_frontdoor_route_disable_link_to_default_domain - -Manages the Link To Default Domain property of a Front Door (standard/premium) Route. - -!>**IMPORTANT:** This resource has been deprecated and should not be used for new deployments. The `azurerm_cdn_frontdoor_route_disable_link_to_default_domain` resource will be removed from the 4.0 AzureRM provider. Please use the `link_to_default_domain` field in the `azurerm_cdn_frontdoor_route` resource to control this value. - -## Example Usage - -```hcl -resource "azurerm_cdn_frontdoor_route_disable_link_to_default_domain" "example" { - cdn_frontdoor_route_id = azurerm_cdn_frontdoor_route.example.id - cdn_frontdoor_custom_domain_ids = [azurerm_cdn_frontdoor_custom_domain.contoso.id, azurerm_cdn_frontdoor_custom_domain.fabrikam.id] -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `cdn_frontdoor_route_id` - (Required) The resource ID of the Front Door Route where the Link To Default Domain property should be `disabled`. Changing this forces a new Front Door Route Disable Link To Default Domain to be created. - -* `cdn_frontdoor_custom_domain_ids` - (Required) The resource IDs of the Front Door Custom Domains which are associated with this Front Door Route. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Front Door Route Disable Link To Default Domain. - ---- - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Front Door Route Disable Link To Default Domain. -* `read` - (Defaults to 5 minutes) Used when retrieving the Front Door Route Disable Link To Default Domain. -* `delete` - (Defaults to 30 minutes) Used when deleting the Front Door Route Disable Link To Default Domain. -* `update` - (Defaults to 30 minutes) Used when updating the Cdn Frontdoor Route Disable Link To Default Domain. - -## Import - -FrontDoor Route Disable Link To Default Domain can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_cdn_frontdoor_route_disable_link_to_default_domain.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Cdn/profiles/profile1/afdEndpoints/endpoint1/routes/route1/disableLinkToDefaultDomain/disableLinkToDefaultDomain1 -``` diff --git a/website/docs/r/cognitive_deployment.html.markdown b/website/docs/r/cognitive_deployment.html.markdown index 59ccf76736358..f8a5891938a9d 100644 --- a/website/docs/r/cognitive_deployment.html.markdown +++ b/website/docs/r/cognitive_deployment.html.markdown @@ -35,8 +35,8 @@ resource "azurerm_cognitive_deployment" "example" { version = "1" } - scale { - type = "Standard" + sku { + name = "Standard" } } @@ -52,7 +52,7 @@ The following arguments are supported: * `model` - (Required) A `model` block as defined below. Changing this forces a new resource to be created. -* `scale` - (Required) A `scale` block as defined below. +* `sku` - (Required) A `sku` block as defined below. * `rai_policy_name` - (Optional) The name of RAI policy. @@ -70,9 +70,9 @@ A `model` block supports the following: --- -A `scale` block supports the following: +A `sku` block supports the following: -* `type` - (Required) The name of the SKU. Ex - `Standard` or `P3`. It is typically a letter+number code. Changing this forces a new resource to be created. +* `name` - (Required) The name of the SKU. Possible values include `Standard`, `GlobalBatch`, `GlobalStandard` and `ProvisionedManaged`. * `tier` - (Optional) Possible values are `Free`, `Basic`, `Standard`, `Premium`, `Enterprise`. Changing this forces a new resource to be created. diff --git a/website/docs/r/communication_service_email_domain_association.html.markdown b/website/docs/r/communication_service_email_domain_association.html.markdown index 08aa7cbdd0ee3..5336df77da787 100644 --- a/website/docs/r/communication_service_email_domain_association.html.markdown +++ b/website/docs/r/communication_service_email_domain_association.html.markdown @@ -71,4 +71,4 @@ Communication service email domain association can be imported using the `resour ```shell terraform import azurerm_communication_service_email_domain_association.example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Communication/communicationServices/communicationService1|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Communication/emailServices/emailCommunicationService1/domains/domain1" -``` \ No newline at end of file +``` diff --git a/website/docs/r/consumption_budget_management_group.html.markdown b/website/docs/r/consumption_budget_management_group.html.markdown index 6ab3a68d018c1..31dbdb2cd9c65 100644 --- a/website/docs/r/consumption_budget_management_group.html.markdown +++ b/website/docs/r/consumption_budget_management_group.html.markdown @@ -102,16 +102,6 @@ A `filter` block supports the following: * `tag` - (Optional) One or more `tag` blocks as defined below to filter the budget on. -* `not` - (Optional) A `not` block as defined below to filter the budget on. This is deprecated as the API no longer supports it and will be removed in version 4.0 of the provider. - ---- - -A `not` block supports the following: - -* `dimension` - (Optional) One `dimension` block as defined below to filter the budget on. Conflicts with `tag`. - -* `tag` - (Optional) One `tag` block as defined below to filter the budget on. Conflicts with `dimension`. - --- A `notification` block supports the following: diff --git a/website/docs/r/consumption_budget_resource_group.html.markdown b/website/docs/r/consumption_budget_resource_group.html.markdown index 03f404a7cd977..3f97005745582 100644 --- a/website/docs/r/consumption_budget_resource_group.html.markdown +++ b/website/docs/r/consumption_budget_resource_group.html.markdown @@ -112,16 +112,6 @@ A `filter` block supports the following: * `tag` - (Optional) One or more `tag` blocks as defined below to filter the budget on. -* `not` - (Optional) A `not` block as defined below to filter the budget on. This is deprecated as the API no longer supports it and will be removed in version 4.0 of the provider. - ---- - -A `not` block supports the following: - -* `dimension` - (Optional) One `dimension` block as defined below to filter the budget on. Conflicts with `tag`. - -* `tag` - (Optional) One `tag` block as defined below to filter the budget on. Conflicts with `dimension`. - --- A `notification` block supports the following: diff --git a/website/docs/r/consumption_budget_subscription.html.markdown b/website/docs/r/consumption_budget_subscription.html.markdown index 5c56e5126c379..17c20a26f1c0b 100644 --- a/website/docs/r/consumption_budget_subscription.html.markdown +++ b/website/docs/r/consumption_budget_subscription.html.markdown @@ -116,16 +116,6 @@ A `filter` block supports the following: * `tag` - (Optional) One or more `tag` blocks as defined below to filter the budget on. -* `not` - (Optional) A `not` block as defined below to filter the budget on. This is deprecated as the API no longer supports it and will be removed in version 4.0 of the provider. - ---- - -A `not` block supports the following: - -* `dimension` - (Optional) One `dimension` block as defined below to filter the budget on. Conflicts with `tag`. - -* `tag` - (Optional) One `tag` block as defined below to filter the budget on. Conflicts with `dimension`. - --- A `notification` block supports the following: diff --git a/website/docs/r/container_app.html.markdown b/website/docs/r/container_app.html.markdown index bbedda144c52d..589b63acca2c5 100644 --- a/website/docs/r/container_app.html.markdown +++ b/website/docs/r/container_app.html.markdown @@ -373,8 +373,6 @@ An `ingress` block supports the following: * `allow_insecure_connections` - (Optional) Should this ingress allow insecure connections? -* `custom_domain` - (Optional) One or more `custom_domain` block as detailed below. - * `fqdn` - The FQDN of the ingress. * `external_enabled` - (Optional) Are connections to this Ingress from outside the Container App Environment enabled? Defaults to `false`. @@ -393,16 +391,6 @@ An `ingress` block supports the following: --- -A `custom_domain` block supports the following: - -* `certificate_binding_type` - (Optional) The Binding type. Possible values include `Disabled` and `SniEnabled`. Defaults to `Disabled`. - -* `certificate_id` - (Required) The ID of the Container App Environment Certificate. - -* `name` - (Required) The hostname of the Certificate. Must be the CN or a named SAN in the certificate. - ---- - A `ip_security_restriction` block supports the following: * `action` - (Required) The IP-filter action. `Allow` or `Deny`. @@ -427,7 +415,7 @@ A `traffic_weight` block supports the following: * `revision_suffix` - (Optional) The suffix string to which this `traffic_weight` applies. -~> **Note:** `latest_revision` conflicts with `revision_suffix`, which means you shall either set `latest_revision` to `true` or specify `revision_suffix`. Especially for creation, there shall only be one `traffic_weight`, with the `latest_revision` set to `true`, and leave the `revision_suffix` empty. +~> **Note:** If `latest_revision` is `false`, the `revision_suffix` shall be specified. * `percentage` - (Required) The percentage of traffic which should be sent this revision. @@ -469,6 +457,8 @@ In addition to the Arguments listed above - the following Attributes are exporte * `custom_domain_verification_id` - The ID of the Custom Domain Verification for this Container App. +* `ingress` - An `ingress` block as detailed below. + * `latest_revision_fqdn` - The FQDN of the Latest Revision of the Container App. * `latest_revision_name` - The name of the latest Container Revision. @@ -477,6 +467,21 @@ In addition to the Arguments listed above - the following Attributes are exporte * `outbound_ip_addresses` - A list of the Public IP Addresses which the Container App uses for outbound network access. +--- + +An `ingress` block exports the following: + +* `custom_domain` - One or more `custom_domain` block as detailed below. + +--- + +A `custom_domain` block exports the following: + +* `certificate_binding_type` - The Binding type. + +* `certificate_id` - The ID of the Container App Environment Certificate. + +* `name` - The hostname of the Certificate. ## Timeouts diff --git a/website/docs/r/container_app_custom_domain.html.markdown b/website/docs/r/container_app_custom_domain.html.markdown index 1893b1c784d6b..5fa7168f5d9c9 100644 --- a/website/docs/r/container_app_custom_domain.html.markdown +++ b/website/docs/r/container_app_custom_domain.html.markdown @@ -125,6 +125,12 @@ The following arguments are supported: !> **NOTE:** If using an Azure Managed Certificate `container_app_environment_certificate_id` and `certificate_binding_type` should be added to `ignore_changes` to prevent resource recreation due to these values being modified asynchronously outside of Terraform. +## Attributes Reference + +In addition to the Arguments listed above - the following Attributes are exported: + +* `container_app_environment_managed_certificate_id` - The ID of the Container App Environment Managed Certificate to use. + ## Timeouts The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) for certain actions: diff --git a/website/docs/r/container_group.html.markdown b/website/docs/r/container_group.html.markdown index c3c80d41e9383..ed1f00c5771b6 100644 --- a/website/docs/r/container_group.html.markdown +++ b/website/docs/r/container_group.html.markdown @@ -10,8 +10,6 @@ description: |- Manages as an Azure Container Group instance. -~> **Note** `network_profile_id` is [deprecated](https://docs.microsoft.com/en-us/azure/container-instances/container-instances-vnet) by Azure. For users who want to continue to manage existing `azurerm_container_group` that rely on `network_profile_id`, please stay on provider versions prior to v3.16.0. Otherwise, use `subnet_ids` instead. - ## Example Usage This example provisions a Basic Container. Other examples of the `azurerm_container_group` resource can be found in [the `./examples/container-instance` directory within the GitHub Repository](https://github.com/hashicorp/terraform-provider-azurerm/tree/main/examples/container-instance). diff --git a/website/docs/r/container_registry.html.markdown b/website/docs/r/container_registry.html.markdown index c824ba842ecf0..caea0a5547876 100644 --- a/website/docs/r/container_registry.html.markdown +++ b/website/docs/r/container_registry.html.markdown @@ -147,7 +147,7 @@ The following arguments are supported: * `tags` - (Optional) A mapping of tags to assign to the resource. -* `georeplications` - (Optional) A `georeplications` block as documented below. +* `georeplications` - (Optional) One or more `georeplications` blocks as documented below. ~> **NOTE:** The `georeplications` is only supported on new resources with the `Premium` SKU. @@ -161,15 +161,15 @@ The following arguments are supported: * `quarantine_policy_enabled` - (Optional) Boolean value that indicates whether quarantine policy is enabled. -* `retention_policy` - (Optional) A `retention_policy` block as documented below. +* `retention_policy_in_days` - (Optional) The number of days to retain and untagged manifest after which it gets purged. Defaults to `7`. -* `trust_policy` - (Optional) A `trust_policy` block as documented below. +* `trust_policy_enabled` - (Optional) Boolean value that indicated whether trust policy is enabled. Defaults to `false`. * `zone_redundancy_enabled` - (Optional) Whether zone redundancy is enabled for this Container Registry? Changing this forces a new resource to be created. Defaults to `false`. * `export_policy_enabled` - (Optional) Boolean value that indicates whether export policy is enabled. Defaults to `true`. In order to set it to `false`, make sure the `public_network_access_enabled` is also set to `false`. - ~> **NOTE:** `quarantine_policy_enabled`, `retention_policy`, `trust_policy`, `export_policy_enabled` and `zone_redundancy_enabled` are only supported on resources with the `Premium` SKU. + ~> **NOTE:** `quarantine_policy_enabled`, `retention_policy_in_days`, `trust_policy_enabled`, `export_policy_enabled` and `zone_redundancy_enabled` are only supported on resources with the `Premium` SKU. * `identity` - (Optional) An `identity` block as defined below. @@ -217,20 +217,6 @@ The `ip_rule` block supports the following: --- -The `trust_policy` block supports the following: - -* `enabled` - (Optional) Boolean value that indicates whether the policy is enabled. - ---- - -The `retention_policy` block supports the following: - -* `days` - (Optional) The number of days to retain an untagged manifest after which it gets purged. Default is `7`. - -* `enabled` - (Optional) Boolean value that indicates whether the policy is enabled. - ---- - An `identity` block supports the following: * `type` - (Required) Specifies the type of Managed Service Identity that should be configured on this Container Registry. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both). diff --git a/website/docs/r/cosmosdb_account.html.markdown b/website/docs/r/cosmosdb_account.html.markdown index 32e4c8a72b625..64b2e38ac673e 100644 --- a/website/docs/r/cosmosdb_account.html.markdown +++ b/website/docs/r/cosmosdb_account.html.markdown @@ -136,7 +136,7 @@ The following arguments are supported: * `geo_location` - (Required) Specifies a `geo_location` resource, used to define where data should be replicated with the `failover_priority` 0 specifying the primary location. Value is a `geo_location` block as defined below. -* `ip_range_filter` - (Optional) CosmosDB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces. +* `ip_range_filter` - (Optional) A set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. For example `["55.0.1.0/24", "55.0.2.0/24"]`. ~> **Note:** To enable the "Allow access from the Azure portal" behavior, you should add the IP addresses provided by the [documentation](https://docs.microsoft.com/azure/cosmos-db/how-to-configure-firewall#allow-requests-from-the-azure-portal) to this list. @@ -214,7 +214,7 @@ The `geo_location` block Configures the geographic locations the data is replica A `capabilities` block Configures the capabilities to be enabled for this Cosmos DB account: -* `name` - (Required) The capability to enable - Possible values are `AllowSelfServeUpgradeToMongo36`, `DisableRateLimitingResponses`, `EnableAggregationPipeline`, `EnableCassandra`, `EnableGremlin`, `EnableMongo`, `EnableMongo16MBDocumentSupport`, `EnableMongoRetryableWrites`, `EnableMongoRoleBasedAccessControl`, `EnablePartialUniqueIndex`, `EnableServerless`, `EnableTable`, `EnableTtlOnCustomPath`, `EnableUniqueCompoundNestedDocs`, `MongoDBv3.4` and `mongoEnableDocLevelTTL`. +* `name` - (Required) The capability to enable - Possible values are `AllowSelfServeUpgradeToMongo36`, `DisableRateLimitingResponses`, `EnableAggregationPipeline`, `EnableCassandra`, `EnableGremlin`, `EnableMongo`, `EnableMongo16MBDocumentSupport`, `EnableMongoRetryableWrites`, `EnableMongoRoleBasedAccessControl`, `EnableNoSQLVectorSearch`, `EnablePartialUniqueIndex`, `EnableServerless`, `EnableTable`, `EnableTtlOnCustomPath`, `EnableUniqueCompoundNestedDocs`, `MongoDBv3.4` and `mongoEnableDocLevelTTL`. ~> **Note:** Setting `MongoDBv3.4` also requires setting `EnableMongo`. diff --git a/website/docs/r/cosmosdb_notebook_workspace.html.markdown b/website/docs/r/cosmosdb_notebook_workspace.html.markdown deleted file mode 100644 index 70fd8adffbda6..0000000000000 --- a/website/docs/r/cosmosdb_notebook_workspace.html.markdown +++ /dev/null @@ -1,83 +0,0 @@ ---- -subcategory: "CosmosDB (DocumentDB)" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_cosmosdb_notebook_workspace" -description: |- - Manages an SQL Notebook Workspace. ---- - -# azurerm_cosmosdb_notebook_workspace - -Manages an SQL Notebook Workspace. - -!> **Note:** CosmosDb Notebook Workspace is now Deprecated - as such the `azurerm_cosmosdb_notebook_workspace` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. - -~> **NOTE:** CosmosDb Notebook (the feature itself) is not deprecated and will return: . - -~> **NOTE:** However, CosmosDb Notebook feature no longer uses the permanent notebook workspace being referred to the public surface in the RP (have since moved to temporary notebooks workspaces which are short-lived <1 hour). - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} - -resource "azurerm_cosmosdb_account" "example" { - name = "example-cosmosdb-account" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - offer_type = "Standard" - kind = "GlobalDocumentDB" - - consistency_policy { - consistency_level = "BoundedStaleness" - } - - geo_location { - location = azurerm_resource_group.example.location - failover_priority = 0 - } -} - -resource "azurerm_cosmosdb_notebook_workspace" "example" { - name = "default" - resource_group_name = azurerm_cosmosdb_account.example.resource_group_name - account_name = azurerm_cosmosdb_account.example.name -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `name` - (Required) The name which should be used for this SQL Notebook Workspace. Possible value is `default`. Changing this forces a new SQL Notebook Workspace to be created. - -* `resource_group_name` - (Required) The name of the Resource Group where the SQL Notebook Workspace should exist. Changing this forces a new SQL Notebook Workspace to be created. - -* `account_name` - (Required) The name of the Cosmos DB Account to create the SQL Notebook Workspace within. Changing this forces a new SQL Notebook Workspace to be created. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the SQL Notebook Workspace. - -* `server_endpoint` - Specifies the endpoint of Notebook server. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the =SQL Notebook Workspace. -* `read` - (Defaults to 5 minutes) Used when retrieving the =SQL Notebook Workspace. -* `delete` - (Defaults to 30 minutes) Used when deleting the =SQL Notebook Workspace. - -## Import - -=SQL Notebook Workspaces can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_cosmosdb_notebook_workspace.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DocumentDB/databaseAccounts/account1/notebookWorkspaces/notebookWorkspace1 -``` diff --git a/website/docs/r/dashboard.html.markdown b/website/docs/r/dashboard.html.markdown deleted file mode 100644 index 3798b59a705cd..0000000000000 --- a/website/docs/r/dashboard.html.markdown +++ /dev/null @@ -1,282 +0,0 @@ ---- -subcategory: "Portal" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_dashboard" -description: |- - Manages a shared dashboard in the Azure Portal. ---- - -# azurerm_dashboard - -Manages a shared dashboard in the Azure Portal. - -!> **Note:** The `azurerm_dashboard` resource is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the [`azurerm_portal_dashboard`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/portal_dashboard) resource instead. - -## Example Usage - -```hcl -variable "md_content" { - description = "Content for the MD tile" - default = "# Hello all :)" -} - -variable "video_link" { - description = "Link to a video" - default = "https://www.youtube.com/watch?v=......" -} - -data "azurerm_subscription" "current" {} - -resource "azurerm_resource_group" "example" { - name = "mygroup" - location = "West Europe" -} - -resource "azurerm_dashboard" "my-board" { - name = "my-cool-dashboard" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - tags = { - source = "terraform" - } - dashboard_properties = < **Note**: You can specify a tag with the key `hidden-title` to set a more user-friendly title for this Dashboard. - -* `resource_group_name` - (Required) The name of the resource group in which to create the dashboard. Changing this forces a new resource to be created. - -* `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - -* `dashboard_properties` - (Optional) JSON data representing dashboard body. See above for details on how to obtain this from the Portal. - -* `tags` - (Optional) A mapping of tags to assign to the resource. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Dashboard. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Dashboard. -* `update` - (Defaults to 30 minutes) Used when updating the Dashboard. -* `read` - (Defaults to 5 minutes) Used when retrieving the Dashboard. -* `delete` - (Defaults to 30 minutes) Used when deleting the Dashboard. - -## Import - -Dashboards can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_dashboard.my-board /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Portal/dashboards/00000000-0000-0000-0000-000000000000 -``` - -Note the URI in the above sample can be found using the Resource Explorer tool in the Azure Portal. diff --git a/website/docs/r/dashboard_grafana.html.markdown b/website/docs/r/dashboard_grafana.html.markdown index c715a54e1928d..977c547694022 100644 --- a/website/docs/r/dashboard_grafana.html.markdown +++ b/website/docs/r/dashboard_grafana.html.markdown @@ -22,6 +22,7 @@ resource "azurerm_dashboard_grafana" "example" { name = "example-dg" resource_group_name = azurerm_resource_group.example.name location = "West Europe" + grafana_major_version = 10 api_key_enabled = true deterministic_outbound_ip_enabled = true public_network_access_enabled = false @@ -46,14 +47,14 @@ The following arguments are supported: * `location` - (Required) Specifies the Azure Region where the Dashboard Grafana should exist. Changing this forces a new Dashboard Grafana to be created. +* `grafana_major_version` - (Required) Which major version of Grafana to deploy. Possible values are `9`, `10`. Changing this forces a new resource to be created. + * `api_key_enabled` - (Optional) Whether to enable the api key setting of the Grafana instance. Defaults to `false`. * `auto_generated_domain_name_label_scope` - (Optional) Scope for dns deterministic name hash calculation. The only possible value is `TenantReuse`. Defaults to `TenantReuse`. * `deterministic_outbound_ip_enabled` - (Optional) Whether to enable the Grafana instance to use deterministic outbound IPs. Defaults to `false`. -* `grafana_major_version` - (Optional) Which major version of Grafana to deploy. Defaults to `9`. Possible values are `9`, `10`. Changing this forces a new resource to be created. - * `smtp` - (Optional) A `smtp` block as defined below. * `azure_monitor_workspace_integrations` - (Optional) A `azure_monitor_workspace_integrations` block as defined below. diff --git a/website/docs/r/data_factory_integration_runtime_azure.html.markdown b/website/docs/r/data_factory_integration_runtime_azure.html.markdown index fd5304f1b8af1..296ea494239b0 100644 --- a/website/docs/r/data_factory_integration_runtime_azure.html.markdown +++ b/website/docs/r/data_factory_integration_runtime_azure.html.markdown @@ -43,7 +43,7 @@ The following arguments are supported: * `description` - (Optional) Integration runtime description. -* `cleanup_enabled` - (Optional) Cluster will not be recycled and it will be used in next data flow activity run until TTL (time to live) is reached if this is set as `false`. Default is `true`. +* `cleanup_enabled` - (Optional) Cluster will not be recycled and it will be used in next data flow activity run until TTL (time to live) is reached if this is set as `false`. Defaults to `true`. * `compute_type` - (Optional) Compute type of the cluster which will execute data flow job. Valid values are `General`, `ComputeOptimized` and `MemoryOptimized`. Defaults to `General`. diff --git a/website/docs/r/data_factory_integration_runtime_managed.html.markdown b/website/docs/r/data_factory_integration_runtime_managed.html.markdown deleted file mode 100644 index 20581a02c2d42..0000000000000 --- a/website/docs/r/data_factory_integration_runtime_managed.html.markdown +++ /dev/null @@ -1,117 +0,0 @@ ---- -subcategory: "Data Factory" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_data_factory_integration_runtime_managed" -description: |- - Manages an Azure Data Factory Managed Integration Runtime. ---- - -# azurerm_data_factory_integration_runtime_managed - -Manages an Azure Data Factory Managed Integration Runtime. - -~> **NOTE:** The `azurerm_data_factory_integration_runtime_managed` resource has been superseded by the [`azurerm_data_factory_integration_runtime_azure_ssis`](data_factory_integration_runtime_azure_ssis.html) resource. The existing `azurerm_data_factory_integration_runtime_managed` resource will be deprecated (but still available) in version 3.0 of the AzureRM Terraform Provider - we recommend using the [`azurerm_data_factory_integration_runtime_azure_ssis`](data_factory_integration_runtime_azure_ssis.html) resource for new deployments. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} - -resource "azurerm_data_factory" "example" { - name = "example" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name -} - -resource "azurerm_data_factory_integration_runtime_managed" "example" { - name = "example" - data_factory_id = azurerm_data_factory.example.id - location = azurerm_resource_group.example.location - - node_size = "Standard_D8_v3" -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) Specifies the name of the Managed Integration Runtime. Changing this forces a new resource to be created. Must be globally unique. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions. - -* `data_factory_id` - (Required) The Data Factory ID in which to associate the Linked Service with. Changing this forces a new resource. - -* `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - -* `node_size` - (Required) The size of the nodes on which the Managed Integration Runtime runs. Valid values are: `Standard_D2_v3`, `Standard_D4_v3`, `Standard_D8_v3`, `Standard_D16_v3`, `Standard_D32_v3`, `Standard_D64_v3`, `Standard_E2_v3`, `Standard_E4_v3`, `Standard_E8_v3`, `Standard_E16_v3`, `Standard_E32_v3`, `Standard_E64_v3`, `Standard_D1_v2`, `Standard_D2_v2`, `Standard_D3_v2`, `Standard_D4_v2`, `Standard_A4_v2` and `Standard_A8_v2` - -* `number_of_nodes` - (Optional) Number of nodes for the Managed Integration Runtime. Max is `10`. Defaults to `1`. - -* `max_parallel_executions_per_node` - (Optional) Defines the maximum parallel executions per node. Defaults to `1`. Max is `1`. - -* `edition` - (Optional) The Managed Integration Runtime edition. Valid values are `Standard` and `Enterprise`. Defaults to `Standard`. - -* `license_type` - (Optional) The type of the license that is used. Valid values are `LicenseIncluded` and `BasePrice`. Defaults to `LicenseIncluded`. - -* `catalog_info` - (Optional) A `catalog_info` block as defined below. - -* `credential_name` - (Optional) The name of the credential to use for the Managed Integration Runtime. - -* `custom_setup_script` - (Optional) A `custom_setup_script` block as defined below. - -* `vnet_integration` - (Optional) A `vnet_integration` block as defined below. - -* `description` - (Optional) Integration runtime description. - ---- - -A `catalog_info` block supports the following: - -* `server_endpoint` - (Required) The endpoint of an Azure SQL Server that will be used to host the SSIS catalog. - -* `administrator_login` - (Optional) Administrator login name for the SQL Server. - -* `administrator_password` - (Optional) Administrator login password for the SQL Server. - -* `pricing_tier` - (Optional) Pricing tier for the database that will be created for the SSIS catalog. Valid values are: `Basic`, `Standard`, `Premium` and `PremiumRS`. Defaults to `Basic`. - ---- - -A `custom_setup_script` block supports the following: - -* `blob_container_uri` - (Required) The blob endpoint for the container which contains a custom setup script that will be run on every node on startup. See [https://docs.microsoft.com/azure/data-factory/how-to-configure-azure-ssis-ir-custom-setup](https://docs.microsoft.com/azure/data-factory/how-to-configure-azure-ssis-ir-custom-setup) for more information. - -* `sas_token` - (Required) A container SAS token that gives access to the files. See [https://docs.microsoft.com/azure/data-factory/how-to-configure-azure-ssis-ir-custom-setup](https://docs.microsoft.com/azure/data-factory/how-to-configure-azure-ssis-ir-custom-setup) for more information. - ---- - -A `vnet_integration` block supports the following: - -* `vnet_id` - (Required) ID of the virtual network to which the nodes of the Managed Integration Runtime will be added. - -* `subnet_name` - (Required) Name of the subnet to which the nodes of the Managed Integration Runtime will be added. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Data Factory Integration Managed Runtime. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Data Factory Integration Managed Runtime. -* `update` - (Defaults to 30 minutes) Used when updating the Data Factory Integration Managed Runtime. -* `read` - (Defaults to 5 minutes) Used when retrieving the Data Factory Integration Managed Runtime. -* `delete` - (Defaults to 30 minutes) Used when deleting the Data Factory Integration Managed Runtime. - -## Import - -Data Factory Integration Managed Runtimes can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_data_factory_integration_runtime_managed.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.DataFactory/factories/example/integrationruntimes/example -``` diff --git a/website/docs/r/data_factory_linked_custom_service.html.markdown b/website/docs/r/data_factory_linked_custom_service.html.markdown index 3603da2b7ba7b..de7ddfb1a2047 100644 --- a/website/docs/r/data_factory_linked_custom_service.html.markdown +++ b/website/docs/r/data_factory_linked_custom_service.html.markdown @@ -66,7 +66,7 @@ JSON * `data_factory_id` - (Required) The Data Factory ID in which to associate the Linked Service with. Changing this forces a new resource. -* `type` - (Required) The type of data stores that will be connected to Data Factory. For full list of supported data stores, please refer to [Azure Data Factory connector](https://docs.microsoft.com/azure/data-factory/connector-overview). Changing this forces a new resource to be created. +* `type` - (Required) The type of data stores that will be connected to Data Factory. For full list of supported data stores, please refer to [Azure Data Factory connector](https://docs.microsoft.com/azure/data-factory/connector-overview). Please refer to [Microsoft.DataFactory factories/linkedservices](https://learn.microsoft.com/en-us/azure/templates/microsoft.datafactory/factories/linkedservices?pivots=deployment-language-terraform) for the type values syntax. Changing this forces a new resource to be created. * `type_properties_json` - (Required) A JSON object that contains the properties of the Data Factory Linked Service. diff --git a/website/docs/r/data_protection_backup_instance_kubernetes_cluster.html.markdown b/website/docs/r/data_protection_backup_instance_kubernetes_cluster.html.markdown index 766f65464b055..dbb160633e026 100644 --- a/website/docs/r/data_protection_backup_instance_kubernetes_cluster.html.markdown +++ b/website/docs/r/data_protection_backup_instance_kubernetes_cluster.html.markdown @@ -44,10 +44,10 @@ resource "azurerm_kubernetes_cluster" "example" { dns_prefix = "dns" default_node_pool { - name = "default" - node_count = 1 - vm_size = "Standard_DS2_v2" - enable_host_encryption = true + name = "default" + node_count = 1 + vm_size = "Standard_DS2_v2" + host_encryption_enabled = true } identity { diff --git a/website/docs/r/data_protection_backup_policy_blob_storage.html.markdown b/website/docs/r/data_protection_backup_policy_blob_storage.html.markdown index 9339005464964..192f37bfd1a5a 100644 --- a/website/docs/r/data_protection_backup_policy_blob_storage.html.markdown +++ b/website/docs/r/data_protection_backup_policy_blob_storage.html.markdown @@ -27,9 +27,9 @@ resource "azurerm_data_protection_backup_vault" "example" { } resource "azurerm_data_protection_backup_policy_blob_storage" "example" { - name = "example-backup-policy" - vault_id = azurerm_data_protection_backup_vault.example.id - retention_duration = "P30D" + name = "example-backup-policy" + vault_id = azurerm_data_protection_backup_vault.example.id + operational_default_retention_duration = "P30D" } ``` @@ -45,10 +45,6 @@ The following arguments are supported: * `operational_default_retention_duration` - (Optional) The duration of operational default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Blob Storage to be created. -* `retention_duration` - (Optional) Duration of deletion after given timespan. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Blob Storage to be created. - --> **Note:** -> `retention_duration` is deprecated in version 3.0 and will be removed in version 4.0 of the AzureRM Provider. Please use the `operational_default_retention_duration` instead. - * `retention_rule` - (Optional) One or more `retention_rule` blocks as defined below. Changing this forces a new Backup Policy Blob Storage to be created. -> **Note:** Setting `retention_rule` also requires setting `vault_default_retention_duration`. @@ -57,7 +53,7 @@ The following arguments are supported: * `vault_default_retention_duration` - (Optional) The duration of vault default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Blob Storage to be created. --> **Note:** Setting `vault_default_retention_duration` also requires setting `backup_repeating_time_intervals`. At least one of `operational_default_retention_duration`, `retention_duration` or `vault_default_retention_duration` must be specified. +-> **Note:** Setting `vault_default_retention_duration` also requires setting `backup_repeating_time_intervals`. At least one of `operational_default_retention_duration` or `vault_default_retention_duration` must be specified. --- diff --git a/website/docs/r/data_protection_backup_policy_mysql_flexible_server.html.markdown b/website/docs/r/data_protection_backup_policy_mysql_flexible_server.html.markdown new file mode 100644 index 0000000000000..0defc93b937ab --- /dev/null +++ b/website/docs/r/data_protection_backup_policy_mysql_flexible_server.html.markdown @@ -0,0 +1,166 @@ +--- +subcategory: "DataProtection" +layout: "azurerm" +page_title: "Azure Resource Manager: azurerm_data_protection_backup_policy_mysql_flexible_server" +description: |- + Manages a Backup Policy to back up MySQL Flexible Server. +--- + +# azurerm_data_protection_backup_policy_mysql_flexible_server + +Manages a Backup Policy to back up MySQL Flexible Server. + +## Example Usage + +```hcl +resource "azurerm_resource_group" "example" { + name = "example-resources" + location = "West Europe" +} + +resource "azurerm_data_protection_backup_vault" "example" { + name = "example-backup-vault" + resource_group_name = azurerm_resource_group.example.name + location = azurerm_resource_group.example.location + datastore_type = "VaultStore" + redundancy = "LocallyRedundant" + + identity { + type = "SystemAssigned" + } +} + +resource "azurerm_data_protection_backup_policy_mysql_flexible_server" "example" { + name = "example-backup-policy" + vault_id = azurerm_data_protection_backup_vault.example.id + backup_repeating_time_intervals = ["R/2021-05-23T02:30:00+00:00/P1W"] + time_zone = "India Standard Time" + + default_retention_rule { + life_cycle { + duration = "P4M" + data_store_type = "VaultStore" + } + } + + retention_rule { + name = "weekly" + life_cycle { + duration = "P6M" + data_store_type = "VaultStore" + } + priority = 20 + + criteria { + absolute_criteria = "FirstOfWeek" + } + } + + retention_rule { + name = "thursday" + life_cycle { + duration = "P1W" + data_store_type = "VaultStore" + } + priority = 25 + + criteria { + days_of_week = ["Thursday"] + scheduled_backup_times = ["2021-05-23T02:30:00Z"] + } + } + + retention_rule { + name = "monthly" + life_cycle { + duration = "P1D" + data_store_type = "VaultStore" + } + priority = 15 + + criteria { + weeks_of_month = ["First", "Last"] + days_of_week = ["Tuesday"] + scheduled_backup_times = ["2021-05-23T02:30:00Z"] + } + } +} +``` + +## Arguments Reference + +The following arguments are supported: + +* `name` - (Required) Specifies the name of the Backup Policy for the MySQL Flexible Server. Changing this forces a new resource to be created. + +* `vault_id` - (Required) The ID of the Backup Vault where the Backup Policy MySQL Flexible Server should exist. Changing this forces a new resource to be created. + +* `backup_repeating_time_intervals` - (Required) Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval format. Changing this forces a new resource to be created. + +* `default_retention_rule` - (Required) A `default_retention_rule` block as defined below. Changing this forces a new resource to be created. + +* `retention_rule` - (Optional) One or more `retention_rule` blocks as defined below. Changing this forces a new resource to be created. + +* `time_zone` - (Optional) Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new resource to be created. + +--- + +A `default_retention_rule` block supports the following: + +* `life_cycle` - (Required) A `life_cycle` block as defined below. Changing this forces a new resource to be created. + +--- + +A `retention_rule` block supports the following: + +* `name` - (Required) Specifies the name of the retention rule. Changing this forces a new resource to be created. + +* `criteria` - (Required) A `criteria` block as defined below. Changing this forces a new resource to be created. + +* `life_cycle` - (Required) A `life_cycle` block as defined below. Changing this forces a new resource to be created. + +* `priority` - (Required) Specifies the priority of the rule. The priority number must be unique for each rule. The lower the priority number, the higher the priority of the rule. Changing this forces a new resource to be created. + +--- + +A `life_cycle` block supports the following: + +* `data_store_type` - (Required) The type of data store. The only possible value is `VaultStore`. Changing this forces a new resource to be created. + +* `duration` - (Required) The retention duration up to which the backups are to be retained in the data stores. It should follow `ISO 8601` duration format. Changing this forces a new resource to be created. + +--- + +A `criteria` block supports the following: + +* `absolute_criteria` - (Optional) Possible values are `AllBackup`, `FirstOfDay`, `FirstOfWeek`, `FirstOfMonth` and `FirstOfYear`. These values mean the first successful backup of the day/week/month/year. Changing this forces a new resource to be created. + +* `days_of_week` - (Optional) Possible values are `Monday`, `Tuesday`, `Thursday`, `Friday`, `Saturday` and `Sunday`. Changing this forces a new resource to be created. + +* `months_of_year` - (Optional) Possible values are `January`, `February`, `March`, `April`, `May`, `June`, `July`, `August`, `September`, `October`, `November` and `December`. Changing this forces a new resource to be created. + +* `scheduled_backup_times` - (Optional) Specifies a list of backup times for backup in the `RFC3339` format. Changing this forces a new resource to be created. + +* `weeks_of_month` - (Optional) Possible values are `First`, `Second`, `Third`, `Fourth` and `Last`. Changing this forces a new resource to be created. + +## Attributes Reference + +In addition to the Arguments listed above - the following Attributes are exported: + +* `id` - The ID of the Backup Policy MySQL Flexible Server. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: + +* `create` - (Defaults to 30 minutes) Used when creating the Backup Policy MySQL Flexible Server. +* `read` - (Defaults to 5 minutes) Used when retrieving the Backup Policy MySQL Flexible Server. +* `delete` - (Defaults to 30 minutes) Used when deleting the Backup Policy MySQL Flexible Server. + +## Import + +Backup Policy MySQL Flexible Server's can be imported using the `resource id`, e.g. + +```shell +terraform import azurerm_data_protection_backup_policy_mysql_flexible_server.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataProtection/backupVaults/vault1/backupPolicies/backupPolicy1 +``` diff --git a/website/docs/r/data_protection_backup_vault.html.markdown b/website/docs/r/data_protection_backup_vault.html.markdown index ac374ba87211d..df58c302a2b30 100644 --- a/website/docs/r/data_protection_backup_vault.html.markdown +++ b/website/docs/r/data_protection_backup_vault.html.markdown @@ -43,6 +43,10 @@ The following arguments are supported: * `redundancy` - (Required) Specifies the backup storage redundancy. Possible values are `GeoRedundant`, `LocallyRedundant` and `ZoneRedundant`. Changing this forces a new Backup Vault to be created. +* `cross_region_restore_enabled` - (Optional) Whether to enable cross-region restore for the Backup Vault. + +-> **Note:** The `cross_region_restore_enabled` can only be specified when `redundancy` is specified for `GeoRedundant`. Once `cross_region_restore_enabled` is enabled, it cannot be disabled. + --- * `identity` - (Optional) An `identity` block as defined below. diff --git a/website/docs/r/databox_edge_order.html.markdown b/website/docs/r/databox_edge_order.html.markdown deleted file mode 100644 index b155c14b3d923..0000000000000 --- a/website/docs/r/databox_edge_order.html.markdown +++ /dev/null @@ -1,169 +0,0 @@ ---- -subcategory: "Databox Edge" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_databox_edge_order" -description: |- - Manages a Databox Edge Order. ---- - -# azurerm_databox_edge_order - -Manages a Databox Edge Order. - -!> Creation of Databox Edge Order is not supported by the Azure API - as such the `azurerm_databox_edge_order` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-databoxedge" - location = "West Europe" -} - -resource "azurerm_databox_edge_device" "example" { - name = "example-device" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - - sku_name = "EdgeP_Base-Standard" -} - -resource "azurerm_databox_edge_order" "example" { - resource_group_name = azurerm_resource_group.example.name - device_name = azurerm_databox_edge_device.example.name - - contact { - name = "TerraForm Test" - emails = ["creator4983@FlynnsArcade.com"] - company_name = "Flynn's Arcade" - phone_number = "(800) 555-1234" - } - - shipment_address { - address = ["One Microsoft Way"] - city = "Redmond" - postal_code = "98052" - state = "WA" - country = "United States" - } -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `resource_group_name` - (Required) The name of the Resource Group where the Databox Edge Order should exist. Changing this forces a new Databox Edge Order to be created. - -* `device_name` - (Required) The name of the Databox Edge Device this order is for. Changing this forces a new Databox Edge Order to be created. - -* `contact` - (Required) A `contact` block as defined below. - -* `shipment_address` - (Required) A `shipment_address` block as defined below. - ---- - -An `contact` block includes the following: - -* `company_name` - (Required) The name of the company. Changing this forces a new Databox Edge Order to be created. - -* `name` - (Required) The contact person name. Changing this forces a new Databox Edge Order to be created. - -* `emails` - (Required) A list of email address to send order notification to. Changing this forces a new Databox Edge Order to be created. - -* `phone_number` - (Required) The phone number. Changing this forces a new Databox Edge Order to be created. - ---- - -An `shipment_address` block includes the following: - -* `address` - (Required) The list of upto 3 lines for address information. - -* `city` - (Required) The city name. Changing this forces a new Databox Edge Order to be created. - -* `country` - (Required) The name of the country to ship the Databox Edge Device to. Valid values are "Algeria", "Argentina", "Australia", "Austria", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belgium", "Bermuda", "Bolivia", "Bosnia and Herzegovina", "Brazil", "Bulgaria", "Canada", "Cayman Islands", "Chile", "Colombia", "Costa Rica", "Croatia", "Cyprus", "Czechia", "Côte D'ivoire", "Denmark", "Dominican Republic", "Ecuador", "Egypt", "El Salvador", "Estonia", "Ethiopia", "Finland", "France", "Georgia", "Germany", "Ghana", "Greece", "Guatemala", "Honduras", "Hong Kong SAR", "Hungary", "Iceland", "India", "Indonesia", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kuwait", "Kyrgyzstan", "Latvia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", "Macao SAR", "Malaysia", "Malta", "Mauritius", "Mexico", "Moldova", "Monaco", "Mongolia", "Montenegro", "Morocco", "Namibia", "Nepal", "Netherlands", "New Zealand", "Nicaragua", "Nigeria", "Norway", "Oman", "Pakistan", "Palestinian Authority", "Panama", "Paraguay", "Peru", "Philippines", "Poland", "Portugal", "Puerto Rico", "Qatar", "Republic of Korea", "Romania", "Russia", "Rwanda", "Saint Kitts And Nevis", "Saudi Arabia", "Senegal", "Serbia", "Singapore", "Slovakia", "Slovenia", "South Africa", "Spain", "Sri Lanka", "Sweden", "Switzerland", "Taiwan", "Tajikistan", "Tanzania", "Thailand", "Trinidad And Tobago", "Tunisia", "Turkey", "Turkmenistan", "U.S. Virgin Islands", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "Uruguay", "Uzbekistan", "Venezuela", "Vietnam", "Yemen", "Zambia" or "Zimbabwe". Changing this forces a new Databox Edge Order to be created. - -* `postal_code` - (Required) The postal code. Changing this forces a new Databox Edge Order to be created. - -* `state` - (Required) The name of the state to ship the Databox Edge Device to. Changing this forces a new Databox Edge Order to be created. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Databox Edge Order. - -* `name` - The Name of this Databox Edge Order. - -* `shipment_tracking` - Tracking information for the package delivered to the customer whether it has an original or a replacement device. A `shipment_tracking` block as defined below. - -* `status` - The current status of the order. A `status` block as defined below. - -* `shipment_history` - List of status changes in the order. A `shipment_history` block as defined below. - -* `return_tracking` - Tracking information for the package returned from the customer whether it has an original or a replacement device. A `return_tracking` block as defined below. - -* `serial_number` - Serial number of the device. - ---- - -A `shipment_tracking` block exports the following: - -* `carrier_name` - Name of the carrier used in the delivery. - -* `serial_number` - Serial number of the device being tracked. - -* `tracking_id` - The ID of the tracking. - -* `tracking_url` - Tracking URL of the shipment. - ---- - -A `status` block exports the following: - -* `info` - The current status of the order. Possible values include `Untracked`, `AwaitingFulfilment`, `AwaitingPreparation`, `AwaitingShipment`, `Shipped`, `Arriving`, `Delivered`, `ReplacementRequested`, `LostDevice`, `Declined`, `ReturnInitiated`, `AwaitingReturnShipment`, `ShippedBack` or `CollectedAtMicrosoft`. - -* `additional_details` - Dictionary to hold generic information which is not stored by the already existing properties. - -* `comments` - Comments related to this status change. - -* `last_update` - Time of status update. - ---- - -A `shipment_history` block exports the following: - -* `additional_details` - Dictionary to hold generic information which is not stored by the already existing properties. - -* `comments` - Comments related to this status change. - -* `last_update` - Time of status update. - ---- - -A `return_tracking` block exports the following: - -* `carrier_name` - Name of the carrier used in the delivery. - -* `serial_number` - Serial number of the device being tracked. - -* `tracking_id` - The ID of the tracking. - -* `tracking_url` - Tracking URL of the shipment. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating a Databox Edge Order. -* `read` - (Defaults to 5 minutes) Used when retrieving a Databox Edge Order. -* `update` - (Defaults to 30 minutes) Used when updating a Databox Edge Order. -* `delete` - (Defaults to 30 minutes) Used when deleting a Databox Edge Order. - -## Import - -Databox Edge Orders can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_databox_edge_order.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/device1 -``` diff --git a/website/docs/r/databricks_workspace.html.markdown b/website/docs/r/databricks_workspace.html.markdown index c942440549b3d..3ffab227cb89e 100644 --- a/website/docs/r/databricks_workspace.html.markdown +++ b/website/docs/r/databricks_workspace.html.markdown @@ -98,7 +98,7 @@ A `custom_parameters` block supports the following: * `public_ip_name` - (Optional) Name of the Public IP for No Public IP workspace with managed virtual network. Defaults to `nat-gw-public-ip`. Changing this forces a new resource to be created. -* `no_public_ip` - (Optional) Are public IP Addresses not allowed? Possible values are `true` or `false`. Defaults to `false`. +* `no_public_ip` - (Optional) Are public IP Addresses not allowed? Possible values are `true` or `false`. Defaults to `true`. ~> **Note:** Updating `no_public_ip` parameter is only allowed if the value is changing from `false` to `true` and only for VNet-injected workspaces. diff --git a/website/docs/r/databricks_workspace_customer_managed_key.html.markdown b/website/docs/r/databricks_workspace_customer_managed_key.html.markdown deleted file mode 100644 index 70ad0e6f5f792..0000000000000 --- a/website/docs/r/databricks_workspace_customer_managed_key.html.markdown +++ /dev/null @@ -1,149 +0,0 @@ ---- -subcategory: "Databricks" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_databricks_workspace_customer_managed_key" -description: |- - Manages a Customer Managed Key for a Databricks Workspace root DBFS ---- - -# azurerm_databricks_workspace_customer_managed_key - -Manages a Customer Managed Key for a Databricks Workspace root DBFS - -!>**IMPORTANT:** This resource has been deprecated and will be removed from the 4.0 Azure provider. Please use the `azurerm_databricks_workspace_root_dbfs_customer_managed_key` resource instead. - -## Example Usage - -```hcl -data "azurerm_client_config" "current" {} - -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} - -resource "azurerm_databricks_workspace" "example" { - name = "databricks-test" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - sku = "premium" - - customer_managed_key_enabled = true - - tags = { - Environment = "Production" - } -} - -resource "azurerm_databricks_workspace_root_dbfs_customer_managed_key" "example" { - depends_on = [azurerm_key_vault_access_policy.databricks] - - workspace_id = azurerm_databricks_workspace.example.id - key_vault_key_id = azurerm_key_vault_key.example.id -} - -resource "azurerm_key_vault" "example" { - name = "examplekeyvault" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - tenant_id = data.azurerm_client_config.current.tenant_id - sku_name = "premium" - - purge_protection_enabled = true - soft_delete_retention_days = 7 -} - -resource "azurerm_key_vault_key" "example" { - depends_on = [azurerm_key_vault_access_policy.terraform] - - name = "example-certificate" - key_vault_id = azurerm_key_vault.example.id - key_type = "RSA" - key_size = 2048 - - key_opts = [ - "decrypt", - "encrypt", - "sign", - "unwrapKey", - "verify", - "wrapKey", - ] -} - -resource "azurerm_key_vault_access_policy" "terraform" { - key_vault_id = azurerm_key_vault.example.id - tenant_id = azurerm_key_vault.example.tenant_id - object_id = data.azurerm_client_config.current.object_id - - key_permissions = [ - "Create", - "Delete", - "Get", - "Purge", - "Recover", - "Update", - "List", - "Decrypt", - "Sign", - "GetRotationPolicy", - ] -} - -resource "azurerm_key_vault_access_policy" "databricks" { - depends_on = [azurerm_databricks_workspace.example] - - key_vault_id = azurerm_key_vault.example.id - tenant_id = azurerm_databricks_workspace.example.storage_account_identity[0].tenant_id - object_id = azurerm_databricks_workspace.example.storage_account_identity[0].principal_id - - key_permissions = [ - "Create", - "Delete", - "Get", - "Purge", - "Recover", - "Update", - "List", - "Decrypt", - "Sign" - ] -} -``` - -## Example HCL Configurations - -* [Databricks Workspace with Root Databricks File System Customer Managed Keys](https://github.com/hashicorp/terraform-provider-azurerm/tree/main/examples/databricks/customer-managed-key/dbfs) -* [Databricks Workspace with Customer Managed Keys for Managed Services](https://github.com/hashicorp/terraform-provider-azurerm/tree/main/examples/databricks/customer-managed-key/managed-services) -* [Databricks Workspace with Private Endpoint, Customer Managed Keys for Managed Services and Root Databricks File System Customer Managed Keys](https://github.com/hashicorp/terraform-provider-azurerm/tree/main/examples/private-endpoint/databricks/managed-services) - -## Argument Reference - -The following arguments are supported: - -* `workspace_id` - (Required) The ID of the Databricks Workspace.. - -* `key_vault_key_id` - (Required) The ID of the Key Vault. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Databricks Workspace. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Customer Managed Key for this Databricks Workspace. -* `update` - (Defaults to 30 minutes) Used when updating the Customer Managed Key for this Databricks Workspace. -* `read` - (Defaults to 5 minutes) Used when retrieving the Customer Managed Key for this Databricks Workspace. -* `delete` - (Defaults to 30 minutes) Used when deleting the Customer Managed Key for this Databricks Workspace. - -## Import - -Databricks Workspace Customer Managed Key can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_databricks_workspace_customer_managed_key.workspace1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Databricks/workspaces/workspace1 -``` diff --git a/website/docs/r/dedicated_hardware_security_module.html.markdown b/website/docs/r/dedicated_hardware_security_module.html.markdown index ab72053808ea3..423c597584b92 100644 --- a/website/docs/r/dedicated_hardware_security_module.html.markdown +++ b/website/docs/r/dedicated_hardware_security_module.html.markdown @@ -66,7 +66,7 @@ resource "azurerm_public_ip" "example" { name = "example-pip" location = azurerm_resource_group.example.location resource_group_name = azurerm_resource_group.example.name - allocation_method = "Dynamic" + allocation_method = "Static" } resource "azurerm_virtual_network_gateway" "example" { diff --git a/website/docs/r/dev_test_lab.html.markdown b/website/docs/r/dev_test_lab.html.markdown index de7c59a7cc534..390bcd11fb423 100644 --- a/website/docs/r/dev_test_lab.html.markdown +++ b/website/docs/r/dev_test_lab.html.markdown @@ -39,10 +39,6 @@ The following arguments are supported: * `location` - (Required) Specifies the supported Azure location where the Dev Test Lab should exist. Changing this forces a new resource to be created. -* `storage_type` - (Optional) The type of storage used by the Dev Test Lab. Possible values are `Standard` and `Premium`. Defaults to `Premium`. - --> **Note:** `storage_type` has been deprecated as the API no longer supports it and will be removed in Version 4.0 of the provider. - * `tags` - (Optional) A mapping of tags to assign to the resource. ## Attributes Reference diff --git a/website/docs/r/digital_twins_time_series_database_connection.html.markdown b/website/docs/r/digital_twins_time_series_database_connection.html.markdown index 1f34b4d86d5d8..a0caecaee9123 100644 --- a/website/docs/r/digital_twins_time_series_database_connection.html.markdown +++ b/website/docs/r/digital_twins_time_series_database_connection.html.markdown @@ -136,7 +136,7 @@ The following arguments are supported: * `eventhub_consumer_group_name` - (Optional) Name of the Event Hub Consumer Group. Changing this forces a new resource to be created. Defaults to `$Default`. -* `kusto_table_name` - (Optional) Name of the Kusto Table. Changing this forces a new resource to be created. +* `kusto_table_name` - (Optional) Name of the Kusto Table. Defaults to `AdtPropertyEvents`. Changing this forces a new resource to be created. ## Attributes Reference diff --git a/website/docs/r/disk_pool.html.markdown b/website/docs/r/disk_pool.html.markdown deleted file mode 100644 index 0e796fd77d655..0000000000000 --- a/website/docs/r/disk_pool.html.markdown +++ /dev/null @@ -1,97 +0,0 @@ ---- -subcategory: "Disks" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_disk_pool" -description: |- - Manages a Disk Pool. ---- - -# azurerm_disk_pool - -Manages a Disk Pool. - -!> **Note:** Azure are officially [halting](https://learn.microsoft.com/en-us/azure/azure-vmware/attach-disk-pools-to-azure-vmware-solution-hosts?tabs=azure-cli) the preview of Azure Disk Pools, and it **will not** be made generally available. New customers will not be able to register the Microsoft.StoragePool resource provider on their subscription and deploy new Disk Pools. Existing subscriptions registered with Microsoft.StoragePool may continue to deploy and manage disk pools for the time being. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} - -resource "azurerm_virtual_network" "example" { - name = "example-network" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - address_space = ["10.0.0.0/16"] -} - -resource "azurerm_subnet" "example" { - name = "example-subnet" - resource_group_name = azurerm_virtual_network.example.resource_group_name - virtual_network_name = azurerm_virtual_network.example.name - address_prefixes = ["10.0.0.0/24"] - - delegation { - name = "diskspool" - - service_delegation { - actions = ["Microsoft.Network/virtualNetworks/read"] - name = "Microsoft.StoragePool/diskPools" - } - } -} - -resource "azurerm_disk_pool" "example" { - name = "example-disk-pool" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - sku_name = "Basic_B1" - subnet_id = azurerm_subnet.example.id - zones = ["1"] -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `name` - (Required) The name of the Disk Pool. Changing this forces a new Disk Pool to be created. - -* `resource_group_name` - (Required) The name of the Resource Group where the Disk Pool should exist. Changing this forces a new Disk Pool to be created. - -* `location` - (Required) The Azure Region where the Disk Pool should exist. Changing this forces a new Disk Pool to be created. - -* `zones` - (Required) Specifies a list of Availability Zones in which this Disk Pool should be located. Changing this forces a new Disk Pool to be created. - -* `sku_name` - (Required) The SKU of the Disk Pool. Possible values are `Basic_B1`, `Standard_S1` and `Premium_P1`. Changing this forces a new Disk Pool to be created. - -* `subnet_id` - (Required) The ID of the Subnet where the Disk Pool should be created. Changing this forces a new Disk Pool to be created. - ---- - -* `tags` - (Optional) A mapping of tags which should be assigned to the Disk Pool. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Disk Pool. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Disk Pool. -* `read` - (Defaults to 5 minutes) Used when retrieving the Disk Pool. -* `update` - (Defaults to 30 minutes) Used when updating the Disk Pool. -* `delete` - (Defaults to 30 minutes) Used when deleting the Disk Pool. - -## Import - -Disk Pools can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_disk_pool.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.StoragePool/diskPools/diskPool1 -``` diff --git a/website/docs/r/disk_pool_iscsi_target.html.markdown b/website/docs/r/disk_pool_iscsi_target.html.markdown deleted file mode 100644 index f49992148d153..0000000000000 --- a/website/docs/r/disk_pool_iscsi_target.html.markdown +++ /dev/null @@ -1,134 +0,0 @@ ---- -subcategory: "Disks" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_disk_pool_iscsi_target" -description: |- - Manages an iSCSI Target. ---- - -# azurerm_disk_pool_iscsi_target - -Manages an iSCSI Target. - -!> **Note:** Azure are officially [halting](https://learn.microsoft.com/en-us/azure/azure-vmware/attach-disk-pools-to-azure-vmware-solution-hosts?tabs=azure-cli) the preview of Azure Disk Pools, and it **will not** be made generally available. New customers will not be able to register the Microsoft.StoragePool resource provider on their subscription and deploy new Disk Pools. Existing subscriptions registered with Microsoft.StoragePool may continue to deploy and manage disk pools for the time being. - -!> **Note:** Each Disk Pool can have a maximum of 1 iSCSI Target. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example" - location = "West Europe" -} - -resource "azurerm_virtual_network" "example" { - name = "example-network" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - address_space = ["10.0.0.0/16"] -} - -resource "azurerm_subnet" "example" { - name = "example-subnet" - resource_group_name = azurerm_resource_group.example.name - virtual_network_name = azurerm_virtual_network.example.name - address_prefixes = ["10.0.0.0/24"] - delegation { - name = "diskspool" - - service_delegation { - actions = ["Microsoft.Network/virtualNetworks/read"] - name = "Microsoft.StoragePool/diskPools" - } - } -} - -resource "azurerm_disk_pool" "example" { - name = "example-pool" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - subnet_id = azurerm_subnet.example.id - zones = ["1"] - sku_name = "Basic_B1" -} - -resource "azurerm_managed_disk" "example" { - name = "example-disk" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - create_option = "Empty" - storage_account_type = "Premium_LRS" - disk_size_gb = 4 - max_shares = 2 - zone = "1" -} - -data "azuread_service_principal" "example" { - display_name = "StoragePool Resource Provider" -} - -locals { - roles = ["Disk Pool Operator", "Virtual Machine Contributor"] -} - -resource "azurerm_role_assignment" "example" { - count = length(local.roles) - principal_id = data.azuread_service_principal.example.id - role_definition_name = local.roles[count.index] - scope = azurerm_managed_disk.example.id -} - -resource "azurerm_disk_pool_managed_disk_attachment" "example" { - depends_on = [azurerm_role_assignment.example] - disk_pool_id = azurerm_disk_pool.example.id - managed_disk_id = azurerm_managed_disk.example.id -} - -resource "azurerm_disk_pool_iscsi_target" "example" { - depends_on = [azurerm_disk_pool_managed_disk_attachment.example] - name = "example" - acl_mode = "Dynamic" - disks_pool_id = azurerm_disk_pool.example.id - target_iqn = "iqn.2021-11.com.microsoft:test" -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `acl_mode` - (Required) Mode for Target connectivity. The only supported value is `Dynamic` for now. Changing this forces a new iSCSI Target to be created. - -* `disks_pool_id` - (Required) The ID of the Disk Pool. Changing this forces a new iSCSI Target to be created. - -* `name` - (Required) The name of the iSCSI Target. The name can only contain lowercase letters, numbers, periods, or hyphens, and length should between [5-223]. Changing this forces a new iSCSI Target to be created. - -* `target_iqn` - (Optional) ISCSI Target IQN (iSCSI Qualified Name); example: `iqn.2005-03.org.iscsi:server`. IQN should follow the format `iqn.yyyy-mm..[:xyz]`; supported characters include alphanumeric characters in lower case, hyphen, dot and colon, and the length should between `4` and `223`. Changing this forces a new iSCSI Target to be created. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the iSCSI Target. - -* `endpoints` - List of private IPv4 addresses to connect to the iSCSI Target. - -* `port` - The port used by iSCSI Target portal group. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 60 minutes) Used when creating the iSCSI Target. -* `read` - (Defaults to 5 minutes) Used when retrieving the iSCSI Target. -* `update` - (Defaults to 30 minutes) Used when updating the iSCSI Target. -* `delete` - (Defaults to 60 minutes) Used when deleting the iSCSI Target. - -## Import - -iSCSI Targets can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_disk_pool_iscsi_target.example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.StoragePool/diskPools/pool1/iscsiTargets/iscsiTarget1 -``` diff --git a/website/docs/r/disk_pool_iscsi_target_lun.html.markdown b/website/docs/r/disk_pool_iscsi_target_lun.html.markdown deleted file mode 100644 index 25aa48554697c..0000000000000 --- a/website/docs/r/disk_pool_iscsi_target_lun.html.markdown +++ /dev/null @@ -1,133 +0,0 @@ ---- -subcategory: "Disks" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_disk_pool_iscsi_target_lun" -description: |- - Manages an iSCSI Target Lun(Logic Unit Number). ---- - -# azurerm_disk_pool_iscsi_target_lun - -Manages an iSCSI Target lun. - -!> **Note:** Azure are officially [halting](https://learn.microsoft.com/en-us/azure/azure-vmware/attach-disk-pools-to-azure-vmware-solution-hosts?tabs=azure-cli) the preview of Azure Disk Pools, and it **will not** be made generally available. New customers will not be able to register the Microsoft.StoragePool resource provider on their subscription and deploy new Disk Pools. Existing subscriptions registered with Microsoft.StoragePool may continue to deploy and manage disk pools for the time being. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example" - location = "West Europe" -} - -resource "azurerm_virtual_network" "example" { - name = "example-network" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - address_space = ["10.0.0.0/16"] -} - -resource "azurerm_subnet" "example" { - name = "example-subnet" - resource_group_name = azurerm_resource_group.example.name - virtual_network_name = azurerm_virtual_network.example.name - address_prefixes = ["10.0.0.0/24"] - delegation { - name = "diskspool" - - service_delegation { - actions = ["Microsoft.Network/virtualNetworks/read"] - name = "Microsoft.StoragePool/diskPools" - } - } -} - -resource "azurerm_disk_pool" "example" { - name = "example-pool" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - subnet_id = azurerm_subnet.example.id - zones = ["1"] - sku_name = "Basic_B1" -} - -resource "azurerm_managed_disk" "example" { - name = "example-disk" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - create_option = "Empty" - storage_account_type = "Premium_LRS" - disk_size_gb = 4 - max_shares = 2 - zone = "1" -} - -data "azuread_service_principal" "example" { - display_name = "StoragePool Resource Provider" -} - -locals { - roles = ["Disk Pool Operator", "Virtual Machine Contributor"] -} - -resource "azurerm_role_assignment" "example" { - count = length(local.roles) - principal_id = data.azuread_service_principal.example.id - role_definition_name = local.roles[count.index] - scope = azurerm_managed_disk.example.id -} - -resource "azurerm_disk_pool_managed_disk_attachment" "example" { - depends_on = [azurerm_role_assignment.example] - disk_pool_id = azurerm_disk_pool.example.id - managed_disk_id = azurerm_managed_disk.example.id -} - -resource "azurerm_disk_pool_iscsi_target" "example" { - depends_on = [azurerm_disk_pool_managed_disk_attachment.example] - name = "example" - acl_mode = "Dynamic" - disks_pool_id = azurerm_disk_pool.example.id - target_iqn = "iqn.2021-11.com.microsoft:test" -} - -resource "azurerm_disk_pool_iscsi_target_lun" "example" { - iscsi_target_id = azurerm_disk_pool_iscsi_target.example.id - disk_pool_managed_disk_attachment_id = azurerm_disk_pool_managed_disk_attachment.example.id - name = "example-disk" -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `iscsi_target_id` - (Required) The ID of the iSCSI Target. Changing this forces a new iSCSI Target LUN to be created. - -* `disk_pool_managed_disk_attachment_id` - (Required) The ID of the `azurerm_disk_pool_managed_disk_attachment`. Changing this forces a new iSCSI Target LUN to be created. - -* `name` - (Required) User defined name for iSCSI LUN. Supported characters include uppercase letters, lowercase letters, numbers, periods, underscores or hyphens. Name should end with an alphanumeric character. The length must be between `1` and `90`. Changing this forces a new iSCSI Target LUN to be created. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the iSCSI Target LUN. - -* `lun` - The Logical Unit Number of the iSCSI Target LUN. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 60 minutes) Used when creating the iSCSI Target LUN. -* `read` - (Defaults to 5 minutes) Used when retrieving the iSCSI Target LUN. -* `delete` - (Defaults to 60 minutes) Used when deleting the iSCSI Target LUN. - -## Import - -iSCSI Target Luns can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_disk_pool_iscsi_target_lun.example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.StoragePool/diskPools/diskPoolValue/iscsiTargets/iscsiTargetValue/lun|/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/disks/disk1 -``` diff --git a/website/docs/r/disk_pool_managed_disk_attachment.html.markdown b/website/docs/r/disk_pool_managed_disk_attachment.html.markdown deleted file mode 100644 index b7e657d16f229..0000000000000 --- a/website/docs/r/disk_pool_managed_disk_attachment.html.markdown +++ /dev/null @@ -1,123 +0,0 @@ ---- -subcategory: "Disks" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_disk_pool_managed_disk_attachment" -description: |- - Manages a Disk Pool Managed Disk Attachment. ---- - -# azurerm_disk_pool_managed_disk_attachment - -Manages a Disk Pool Managed Disk Attachment. - -!> **Note:** Azure are officially [halting](https://learn.microsoft.com/en-us/azure/azure-vmware/attach-disk-pools-to-azure-vmware-solution-hosts?tabs=azure-cli) the preview of Azure Disk Pools, and it **will not** be made generally available. New customers will not be able to register the Microsoft.StoragePool resource provider on their subscription and deploy new Disk Pools. Existing subscriptions registered with Microsoft.StoragePool may continue to deploy and manage disk pools for the time being. - -~> **Note:** Must be either a premium SSD, standard SSD, or an ultra disk in the same region and availability zone as the disk pool. - -~> **Note:** Ultra disks must have a disk sector size of 512 bytes. - -~> **Note:** Must be a shared disk, with a maxShares value of two or greater. - -~> **Note:** You must provide the StoragePool resource provider RBAC permissions to the disks that will be added to the disk pool. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example" - location = "West Europe" -} - -resource "azurerm_virtual_network" "example" { - name = "example-network" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - address_space = ["10.0.0.0/16"] -} - -resource "azurerm_subnet" "example" { - name = "example-subnet" - resource_group_name = azurerm_resource_group.example.name - virtual_network_name = azurerm_virtual_network.example.name - address_prefixes = ["10.0.0.0/24"] - delegation { - name = "diskspool" - - service_delegation { - actions = ["Microsoft.Network/virtualNetworks/read"] - name = "Microsoft.StoragePool/diskPools" - } - } -} - -resource "azurerm_disk_pool" "example" { - name = "example-pool" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - subnet_id = azurerm_subnet.example.id - zones = ["1"] - sku_name = "Basic_B1" -} - -resource "azurerm_managed_disk" "example" { - name = "example-disk" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - create_option = "Empty" - storage_account_type = "Premium_LRS" - disk_size_gb = 4 - max_shares = 2 - zone = "1" -} - -data "azuread_service_principal" "example" { - display_name = "StoragePool Resource Provider" -} - -locals { - roles = ["Disk Pool Operator", "Virtual Machine Contributor"] -} - -resource "azurerm_role_assignment" "example" { - count = length(local.roles) - principal_id = data.azuread_service_principal.example.id - role_definition_name = local.roles[count.index] - scope = azurerm_managed_disk.example.id -} - -resource "azurerm_disk_pool_managed_disk_attachment" "example" { - depends_on = [azurerm_role_assignment.example] - disk_pool_id = azurerm_disk_pool.example.id - managed_disk_id = azurerm_managed_disk.example.id -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `disk_pool_id` - (Required) The ID of the Disk Pool. Changing this forces a new Disk Pool Managed Disk Attachment to be created. - -* `managed_disk_id` - (Required) The ID of the Managed Disk. Changing this forces a new Disks Pool Managed Disk Attachment to be created. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Disk Pool Managed Disk Attachment. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 60 minutes) Used when creating the Disks Pool Managed Disk Attachment. -* `read` - (Defaults to 5 minutes) Used when retrieving the Disks Pool Managed Disk Attachment. -* `delete` - (Defaults to 60 minutes) Used when deleting the Disks Pool Managed Disk Attachment. - -## Import - -Disks Pool Managed Disk Attachments can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_disk_pool_managed_disk_attachment.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.StoragePool/diskPools/storagePool1/managedDisks|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Compute/disks/disk1 -``` diff --git a/website/docs/r/eventhub_namespace.html.markdown b/website/docs/r/eventhub_namespace.html.markdown index 603e508cc1026..79e90b13946fc 100644 --- a/website/docs/r/eventhub_namespace.html.markdown +++ b/website/docs/r/eventhub_namespace.html.markdown @@ -53,10 +53,6 @@ The following arguments are supported: * `maximum_throughput_units` - (Optional) Specifies the maximum number of throughput units when Auto Inflate is Enabled. Valid values range from `1` - `20`. -* `zone_redundant` - (Optional) Specifies if the EventHub Namespace should be Zone Redundant (created across Availability Zones). Changing this forces a new resource to be created. Defaults to `false`. - -~> **Note:** For eventhub premium namespace, `zone_redundant` is computed by the api based on the availability zone feature in each region, user's input will be overridden. Please explicitly sets the property to `true` when creating the premium namespace in a region that supports availability zone since the default value is `false` in 3.0 provider. - * `tags` - (Optional) A mapping of tags to assign to the resource. * `network_rulesets` - (Optional) A `network_rulesets` block as defined below. @@ -65,7 +61,7 @@ The following arguments are supported: * `public_network_access_enabled` - (Optional) Is public network access enabled for the EventHub Namespace? Defaults to `true`. -* `minimum_tls_version` - (Optional) The minimum supported TLS version for this EventHub Namespace. Valid values are: `1.0`, `1.1` and `1.2`. The current default minimum TLS version is `1.2`. +* `minimum_tls_version` - (Optional) The minimum supported TLS version for this EventHub Namespace. Valid values are: `1.0`, `1.1` and `1.2`. Defaults to `1.2`. --- diff --git a/website/docs/r/express_route_port.html.markdown b/website/docs/r/express_route_port.html.markdown index e5088ba0c6456..18280dc5bfc9a 100644 --- a/website/docs/r/express_route_port.html.markdown +++ b/website/docs/r/express_route_port.html.markdown @@ -48,7 +48,7 @@ The following arguments are supported: * `link2` - (Optional) A list of `link` blocks as defined below. -* `billing_type` - (Optional) The billing type of the Express Route Port. Possible values are `MeteredData` and `UnlimitedData`. +* `billing_type` - (Optional) The billing type of the Express Route Port. Possible values are `MeteredData` and `UnlimitedData`. Defaults to `MeteredData`. --- diff --git a/website/docs/r/firewall_policy.html.markdown b/website/docs/r/firewall_policy.html.markdown index 15ab21f1c4f23..29b1593bba833 100644 --- a/website/docs/r/firewall_policy.html.markdown +++ b/website/docs/r/firewall_policy.html.markdown @@ -51,7 +51,7 @@ The following arguments are supported: * `auto_learn_private_ranges_enabled` - (Optional) Whether enable auto learn private ip range. -* `sku` - (Optional) The SKU Tier of the Firewall Policy. Possible values are `Standard`, `Premium` and `Basic`. Changing this forces a new Firewall Policy to be created. +* `sku` - (Optional) The SKU Tier of the Firewall Policy. Possible values are `Standard`, `Premium` and `Basic`. Defaults to `Standard`. Changing this forces a new Firewall Policy to be created. * `tags` - (Optional) A mapping of tags which should be assigned to the Firewall Policy. diff --git a/website/docs/r/function_app.html.markdown b/website/docs/r/function_app.html.markdown index 4fad99cea6024..e52e87003b556 100644 --- a/website/docs/r/function_app.html.markdown +++ b/website/docs/r/function_app.html.markdown @@ -267,7 +267,7 @@ The `site_config` block supports the following: * `dotnet_framework_version` - (Optional) The version of the .NET framework's CLR used in this function app. Possible values are `v4.0` (including .NET Core 2.1 and 3.1), `v5.0` and `v6.0`. [For more information on which .NET Framework version to use based on the runtime version you're targeting - please see this table](https://docs.microsoft.com/azure/azure-functions/functions-dotnet-class-library#supported-versions). Defaults to `v4.0`. -* `elastic_instance_minimum` - (Optional) The number of minimum instances for this function app. Only affects apps on the Premium plan. +* `elastic_instance_minimum` - (Optional) The number of minimum instances for this function app. Only affects apps on the Premium plan. Possible values are between `1` and `20`. * `ftps_state` - (Optional) State of FTP / FTPS service for this function app. Possible values include: `AllAllowed`, `FtpsOnly` and `Disabled`. Defaults to `AllAllowed`. diff --git a/website/docs/r/graph_account.html.markdown b/website/docs/r/graph_account.html.markdown deleted file mode 100644 index 95a06ce97d6a7..0000000000000 --- a/website/docs/r/graph_account.html.markdown +++ /dev/null @@ -1,72 +0,0 @@ ---- -subcategory: "Graph Services" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_graph_account" -description: |- - Manages a Microsoft Graph Services Account. ---- - -# azurerm_graph_account - -Manages a Microsoft Graph Services Account. - -!> **NOTE:** This resource has been deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use [`azurerm_graph_services_account`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/graph_services_account) resource instead. - -## Example Usage - -```hcl -resource "azuread_application" "example" { - display_name = "example-app" -} -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} -resource "azurerm_graph_account" "example" { - name = "example" - resource_group_name = azurerm_resource_group.example.name - application_id = azuread_application.example.application_id - tags = { - environment = "Production" - } -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `name` - (Required) Specifies the name of this Account. Changing this forces a new Account to be created. - -* `resource_group_name` - (Required) Specifies the name of the Resource Group within which this Account should exist. Changing this forces a new Account to be created. - -* `application_id` - (Required) Customer owned application ID. Changing this forces a new Account to be created. - -* `tags` - (Optional) A mapping of tags which should be assigned to the Account. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Account. - -* `billing_plan_id` - Billing Plan Id. - ---- - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating this Account. -* `delete` - (Defaults to 30 minutes) Used when deleting this Account. -* `read` - (Defaults to 5 minutes) Used when retrieving this Account. -* `update` - (Defaults to 30 minutes) Used when updating this Account. - -## Import - -An existing Account can be imported into Terraform using the `resource id`, e.g. - -```shell -terraform import azurerm_graph_account.example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.GraphServices/accounts/account1 -``` diff --git a/website/docs/r/hdinsight_hadoop_cluster.html.markdown b/website/docs/r/hdinsight_hadoop_cluster.html.markdown index 6219fe0a3a2f5..8202ed46c7fe6 100644 --- a/website/docs/r/hdinsight_hadoop_cluster.html.markdown +++ b/website/docs/r/hdinsight_hadoop_cluster.html.markdown @@ -147,7 +147,7 @@ A `head_node` block supports the following: * `username` - (Required) The Username of the local administrator for the Head Nodes. Changing this forces a new resource to be created. -* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Head Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. +* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Head Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_D2ads_V5`, `Standard_D4ads_V5`, `Standard_D8ads_V5`, `Standard_D16ads_V5`, `Standard_D32ads_V5`, `Standard_D48ads_V5`, `Standard_D64ads_V5`, `Standard_D96ads_V5`, `Standard_E2ads_V5`, `Standard_E4ads_V5`, `Standard_E8ads_V5`, `Standard_E16ads_V5`, `Standard_E20ads_V5`, `Standard_E32ads_V5`, `Standard_E48ads_V5`, `Standard_E64ads_V5`, `Standard_E96ads_V5`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. * `password` - (Optional) The Password associated with the local administrator for the Head Nodes. Changing this forces a new resource to be created. @@ -265,7 +265,7 @@ A `worker_node` block supports the following: * `username` - (Required) The Username of the local administrator for the Worker Nodes. Changing this forces a new resource to be created. -* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Worker Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. +* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Worker Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_D2ads_V5`, `Standard_D4ads_V5`, `Standard_D8ads_V5`, `Standard_D16ads_V5`, `Standard_D32ads_V5`, `Standard_D48ads_V5`, `Standard_D64ads_V5`, `Standard_D96ads_V5`, `Standard_E2ads_V5`, `Standard_E4ads_V5`, `Standard_E8ads_V5`, `Standard_E16ads_V5`, `Standard_E20ads_V5`, `Standard_E32ads_V5`, `Standard_E48ads_V5`, `Standard_E64ads_V5`, `Standard_E96ads_V5`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. * `password` - (Optional) The Password associated with the local administrator for the Worker Nodes. Changing this forces a new resource to be created. @@ -303,7 +303,7 @@ A `zookeeper_node` block supports the following: * `username` - (Required) The Username of the local administrator for the Zookeeper Nodes. Changing this forces a new resource to be created. -* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Zookeeper Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. +* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Zookeeper Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_D2ads_V5`, `Standard_D4ads_V5`, `Standard_D8ads_V5`, `Standard_D16ads_V5`, `Standard_D32ads_V5`, `Standard_D48ads_V5`, `Standard_D64ads_V5`, `Standard_D96ads_V5`, `Standard_E2ads_V5`, `Standard_E4ads_V5`, `Standard_E8ads_V5`, `Standard_E16ads_V5`, `Standard_E20ads_V5`, `Standard_E32ads_V5`, `Standard_E48ads_V5`, `Standard_E64ads_V5`, `Standard_E96ads_V5`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. * `password` - (Optional) The Password associated with the local administrator for the Zookeeper Nodes. Changing this forces a new resource to be created. @@ -325,7 +325,7 @@ A `edge_node` block supports the following: * `target_instance_count` - (Required) The number of instances which should be run for the Worker Nodes. -* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Edge Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. +* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Edge Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_D2ads_V5`, `Standard_D4ads_V5`, `Standard_D8ads_V5`, `Standard_D16ads_V5`, `Standard_D32ads_V5`, `Standard_D48ads_V5`, `Standard_D64ads_V5`, `Standard_D96ads_V5`, `Standard_E2ads_V5`, `Standard_E4ads_V5`, `Standard_E8ads_V5`, `Standard_E16ads_V5`, `Standard_E20ads_V5`, `Standard_E32ads_V5`, `Standard_E48ads_V5`, `Standard_E64ads_V5`, `Standard_E96ads_V5`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. * `install_script_action` - (Required) A `install_script_action` block as defined below. diff --git a/website/docs/r/hdinsight_hbase_cluster.html.markdown b/website/docs/r/hdinsight_hbase_cluster.html.markdown index 54c1879a2401c..839815673ab61 100644 --- a/website/docs/r/hdinsight_hbase_cluster.html.markdown +++ b/website/docs/r/hdinsight_hbase_cluster.html.markdown @@ -147,7 +147,7 @@ A `head_node` block supports the following: * `username` - (Required) The Username of the local administrator for the Head Nodes. Changing this forces a new resource to be created. -* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Head Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. +* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Head Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_D2ads_V5`, `Standard_D4ads_V5`, `Standard_D8ads_V5`, `Standard_D16ads_V5`, `Standard_D32ads_V5`, `Standard_D48ads_V5`, `Standard_D64ads_V5`, `Standard_D96ads_V5`, `Standard_E2ads_V5`, `Standard_E4ads_V5`, `Standard_E8ads_V5`, `Standard_E16ads_V5`, `Standard_E20ads_V5`, `Standard_E32ads_V5`, `Standard_E48ads_V5`, `Standard_E64ads_V5`, `Standard_E96ads_V5`, `Standard_E96a_V4`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. * `password` - (Optional) The Password associated with the local administrator for the Head Nodes. Changing this forces a new resource to be created. @@ -265,7 +265,7 @@ A `worker_node` block supports the following: * `username` - (Required) The Username of the local administrator for the Worker Nodes. Changing this forces a new resource to be created. -* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Worker Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. +* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Worker Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_D2ads_V5`, `Standard_D4ads_V5`, `Standard_D8ads_V5`, `Standard_D16ads_V5`, `Standard_D32ads_V5`, `Standard_D48ads_V5`, `Standard_D64ads_V5`, `Standard_D96ads_V5`, `Standard_E2ads_V5`, `Standard_E4ads_V5`, `Standard_E8ads_V5`, `Standard_E16ads_V5`, `Standard_E20ads_V5`, `Standard_E32ads_V5`, `Standard_E48ads_V5`, `Standard_E64ads_V5`, `Standard_E96ads_V5`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. * `password` - (Optional) The Password associated with the local administrator for the Worker Nodes. Changing this forces a new resource to be created. @@ -303,7 +303,7 @@ A `zookeeper_node` block supports the following: * `username` - (Required) The Username of the local administrator for the Zookeeper Nodes. Changing this forces a new resource to be created. -* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Zookeeper Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. +* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Zookeeper Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_D2ads_V5`, `Standard_D4ads_V5`, `Standard_D8ads_V5`, `Standard_D16ads_V5`, `Standard_D32ads_V5`, `Standard_D48ads_V5`, `Standard_D64ads_V5`, `Standard_D96ads_V5`, `Standard_E2ads_V5`, `Standard_E4ads_V5`, `Standard_E8ads_V5`, `Standard_E16ads_V5`, `Standard_E20ads_V5`, `Standard_E32ads_V5`, `Standard_E48ads_V5`, `Standard_E64ads_V5`, `Standard_E96ads_V5`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. * `password` - (Optional) The Password associated with the local administrator for the Zookeeper Nodes. Changing this forces a new resource to be created. diff --git a/website/docs/r/hdinsight_interactive_query_cluster.html.markdown b/website/docs/r/hdinsight_interactive_query_cluster.html.markdown index 0bcd622fd00c4..d9a76135c4982 100644 --- a/website/docs/r/hdinsight_interactive_query_cluster.html.markdown +++ b/website/docs/r/hdinsight_interactive_query_cluster.html.markdown @@ -149,7 +149,7 @@ A `head_node` block supports the following: * `username` - (Required) The Username of the local administrator for the Head Nodes. Changing this forces a new resource to be created. -* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Head Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. +* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Head Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_D2ads_V5`, `Standard_D4ads_V5`, `Standard_D8ads_V5`, `Standard_D16ads_V5`, `Standard_D32ads_V5`, `Standard_D48ads_V5`, `Standard_D64ads_V5`, `Standard_D96ads_V5`, `Standard_E2ads_V5`, `Standard_E4ads_V5`, `Standard_E8ads_V5`, `Standard_E16ads_V5`, `Standard_E20ads_V5`, `Standard_E32ads_V5`, `Standard_E48ads_V5`, `Standard_E64ads_V5`, `Standard_E96ads_V5`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. -> **NOTE:** High memory instances must be specified for the Head Node (Azure suggests a `Standard_D13_V2`). @@ -269,7 +269,7 @@ A `worker_node` block supports the following: * `username` - (Required) The Username of the local administrator for the Worker Nodes. Changing this forces a new resource to be created. -* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Worker Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. +* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Worker Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_D2ads_V5`, `Standard_D4ads_V5`, `Standard_D8ads_V5`, `Standard_D16ads_V5`, `Standard_D32ads_V5`, `Standard_D48ads_V5`, `Standard_D64ads_V5`, `Standard_D96ads_V5`, `Standard_E2ads_V5`, `Standard_E4ads_V5`, `Standard_E8ads_V5`, `Standard_E16ads_V5`, `Standard_E20ads_V5`, `Standard_E32ads_V5`, `Standard_E48ads_V5`, `Standard_E64ads_V5`, `Standard_E96ads_V5`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. -> **NOTE:** High memory instances must be specified for the Head Node (Azure suggests a `Standard_D14_V2`). @@ -309,7 +309,7 @@ A `zookeeper_node` block supports the following: * `username` - (Required) The Username of the local administrator for the Zookeeper Nodes. Changing this forces a new resource to be created. -* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Zookeeper Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. +* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Zookeeper Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_D2ads_V5`, `Standard_D4ads_V5`, `Standard_D8ads_V5`, `Standard_D16ads_V5`, `Standard_D32ads_V5`, `Standard_D48ads_V5`, `Standard_D64ads_V5`, `Standard_D96ads_V5`, `Standard_E2ads_V5`, `Standard_E4ads_V5`, `Standard_E8ads_V5`, `Standard_E16ads_V5`, `Standard_E20ads_V5`, `Standard_E32ads_V5`, `Standard_E48ads_V5`, `Standard_E64ads_V5`, `Standard_E96ads_V5`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. * `password` - (Optional) The Password associated with the local administrator for the Zookeeper Nodes. Changing this forces a new resource to be created. diff --git a/website/docs/r/hdinsight_kafka_cluster.html.markdown b/website/docs/r/hdinsight_kafka_cluster.html.markdown index 189fddda45de5..dbd24789e96d3 100644 --- a/website/docs/r/hdinsight_kafka_cluster.html.markdown +++ b/website/docs/r/hdinsight_kafka_cluster.html.markdown @@ -162,7 +162,7 @@ A `head_node` block supports the following: * `username` - (Required) The Username of the local administrator for the Head Nodes. Changing this forces a new resource to be created. -* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Head Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. +* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Head Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_D2ads_V5`, `Standard_D4ads_V5`, `Standard_D8ads_V5`, `Standard_D16ads_V5`, `Standard_D32ads_V5`, `Standard_D48ads_V5`, `Standard_D64ads_V5`, `Standard_D96ads_V5`, `Standard_E2ads_V5`, `Standard_E4ads_V5`, `Standard_E8ads_V5`, `Standard_E16ads_V5`, `Standard_E20ads_V5`, `Standard_E32ads_V5`, `Standard_E48ads_V5`, `Standard_E64ads_V5`, `Standard_E96ads_V5`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. * `password` - (Optional) The Password associated with the local administrator for the Head Nodes. Changing this forces a new resource to be created. @@ -266,7 +266,7 @@ A `worker_node` block supports the following: * `username` - (Required) The Username of the local administrator for the Worker Nodes. Changing this forces a new resource to be created. -* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Worker Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. +* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Worker Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_D2ads_V5`, `Standard_D4ads_V5`, `Standard_D8ads_V5`, `Standard_D16ads_V5`, `Standard_D32ads_V5`, `Standard_D48ads_V5`, `Standard_D64ads_V5`, `Standard_D96ads_V5`, `Standard_E2ads_V5`, `Standard_E4ads_V5`, `Standard_E8ads_V5`, `Standard_E16ads_V5`, `Standard_E20ads_V5`, `Standard_E32ads_V5`, `Standard_E48ads_V5`, `Standard_E64ads_V5`, `Standard_E96ads_V5`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. * `password` - (Optional) The Password associated with the local administrator for the Worker Nodes. Changing this forces a new resource to be created. @@ -290,7 +290,7 @@ A `zookeeper_node` block supports the following: * `username` - (Required) The Username of the local administrator for the Zookeeper Nodes. Changing this forces a new resource to be created. -* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Zookeeper Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. +* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Zookeeper Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_D2ads_V5`, `Standard_D4ads_V5`, `Standard_D8ads_V5`, `Standard_D16ads_V5`, `Standard_D32ads_V5`, `Standard_D48ads_V5`, `Standard_D64ads_V5`, `Standard_D96ads_V5`, `Standard_E2ads_V5`, `Standard_E4ads_V5`, `Standard_E8ads_V5`, `Standard_E16ads_V5`, `Standard_E20ads_V5`, `Standard_E32ads_V5`, `Standard_E48ads_V5`, `Standard_E64ads_V5`, `Standard_E96ads_V5`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. * `password` - (Optional) The Password associated with the local administrator for the Zookeeper Nodes. Changing this forces a new resource to be created. @@ -326,7 +326,7 @@ A `kafka_management_node` block supports the following: ~> **NOTE:** The `username` value is automatically generated by the service and cannot be user specified. This property will become `Computed` only in 4.0 of the provider. -* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Kafka Management Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. +* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Kafka Management Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_D2ads_V5`, `Standard_D4ads_V5`, `Standard_D8ads_V5`, `Standard_D16ads_V5`, `Standard_D32ads_V5`, `Standard_D48ads_V5`, `Standard_D64ads_V5`, `Standard_D96ads_V5`, `Standard_E2ads_V5`, `Standard_E4ads_V5`, `Standard_E8ads_V5`, `Standard_E16ads_V5`, `Standard_E20ads_V5`, `Standard_E32ads_V5`, `Standard_E48ads_V5`, `Standard_E64ads_V5`, `Standard_E96ads_V5`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. * `password` - (Optional) The Password associated with the local administrator for the Kafka Management Nodes. Changing this forces a new resource to be created. diff --git a/website/docs/r/hdinsight_spark_cluster.html.markdown b/website/docs/r/hdinsight_spark_cluster.html.markdown index 9a74d30bce3c1..b43ebe8ea21aa 100644 --- a/website/docs/r/hdinsight_spark_cluster.html.markdown +++ b/website/docs/r/hdinsight_spark_cluster.html.markdown @@ -149,7 +149,7 @@ A `head_node` block supports the following: * `username` - (Required) The Username of the local administrator for the Head Nodes. Changing this forces a new resource to be created. -* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Head Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. +* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Head Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_D2ads_V5`, `Standard_D4ads_V5`, `Standard_D8ads_V5`, `Standard_D16ads_V5`, `Standard_D32ads_V5`, `Standard_D48ads_V5`, `Standard_D64ads_V5`, `Standard_D96ads_V5`, `Standard_E2ads_V5`, `Standard_E4ads_V5`, `Standard_E8ads_V5`, `Standard_E16ads_V5`, `Standard_E20ads_V5`, `Standard_E32ads_V5`, `Standard_E48ads_V5`, `Standard_E64ads_V5`, `Standard_E96ads_V5`, `Standard_D2ads_V5`, `Standard_D4ads_V5`, `Standard_D8ads_V5`, `Standard_D16ads_V5`, `Standard_D32ads_V5`, `Standard_D48ads_V5`, `Standard_D64ads_V5`, `Standard_D96ads_V5`, `Standard_E2ads_V5`, `Standard_E4ads_V5`, `Standard_E8ads_V5`, `Standard_E16ads_V5`, `Standard_E20ads_V5`, `Standard_E32ads_V5`, `Standard_E48ads_V5`, `Standard_E64ads_V5`, `Standard_E96ads_V5`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. * `password` - (Optional) The Password associated with the local administrator for the Head Nodes. Changing this forces a new resource to be created. @@ -267,7 +267,7 @@ A `worker_node` block supports the following: * `username` - (Required) The Username of the local administrator for the Worker Nodes. Changing this forces a new resource to be created. -* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Worker Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. +* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Worker Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_D2ads_V5`, `Standard_D4ads_V5`, `Standard_D8ads_V5`, `Standard_D16ads_V5`, `Standard_D32ads_V5`, `Standard_D48ads_V5`, `Standard_D64ads_V5`, `Standard_D96ads_V5`, `Standard_E2ads_V5`, `Standard_E4ads_V5`, `Standard_E8ads_V5`, `Standard_E16ads_V5`, `Standard_E20ads_V5`, `Standard_E32ads_V5`, `Standard_E48ads_V5`, `Standard_E64ads_V5`, `Standard_E96ads_V5`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. * `password` - (Optional) The Password associated with the local administrator for the Worker Nodes. Changing this forces a new resource to be created. @@ -293,7 +293,7 @@ A `zookeeper_node` block supports the following: * `username` - (Required) The Username of the local administrator for the Zookeeper Nodes. Changing this forces a new resource to be created. -* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Zookeeper Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. +* `vm_size` - (Required) The Size of the Virtual Machine which should be used as the Zookeeper Nodes. Possible values are `ExtraSmall`, `Small`, `Medium`, `Large`, `ExtraLarge`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `A11`, `Standard_A1_V2`, `Standard_A2_V2`, `Standard_A2m_V2`, `Standard_A3`, `Standard_A4_V2`, `Standard_A4m_V2`, `Standard_A8_V2`, `Standard_A8m_V2`, `Standard_D1`, `Standard_D2`, `Standard_D3`, `Standard_D4`, `Standard_D11`, `Standard_D12`, `Standard_D13`, `Standard_D14`, `Standard_D1_V2`, `Standard_D2_V2`, `Standard_D3_V2`, `Standard_D4_V2`, `Standard_D5_V2`, `Standard_D11_V2`, `Standard_D12_V2`, `Standard_D13_V2`, `Standard_D14_V2`, `Standard_DS1_V2`, `Standard_DS2_V2`, `Standard_DS3_V2`, `Standard_DS4_V2`, `Standard_DS5_V2`, `Standard_DS11_V2`, `Standard_DS12_V2`, `Standard_DS13_V2`, `Standard_DS14_V2`, `Standard_E2_V3`, `Standard_E4_V3`, `Standard_E8_V3`, `Standard_E16_V3`, `Standard_E20_V3`, `Standard_E32_V3`, `Standard_E64_V3`, `Standard_E64i_V3`, `Standard_E2s_V3`, `Standard_E4s_V3`, `Standard_E8s_V3`, `Standard_E16s_V3`, `Standard_E20s_V3`, `Standard_E32s_V3`, `Standard_E64s_V3`, `Standard_E64is_V3`, `Standard_D2a_V4`, `Standard_D4a_V4`, `Standard_D8a_V4`, `Standard_D16a_V4`, `Standard_D32a_V4`, `Standard_D48a_V4`, `Standard_D64a_V4`, `Standard_D96a_V4`, `Standard_E2a_V4`, `Standard_E4a_V4`, `Standard_E8a_V4`, `Standard_E16a_V4`, `Standard_E20a_V4`, `Standard_E32a_V4`, `Standard_E48a_V4`, `Standard_E64a_V4`, `Standard_E96a_V4`, `Standard_D2ads_V5`, `Standard_D4ads_V5`, `Standard_D8ads_V5`, `Standard_D16ads_V5`, `Standard_D32ads_V5`, `Standard_D48ads_V5`, `Standard_D64ads_V5`, `Standard_D96ads_V5`, `Standard_E2ads_V5`, `Standard_E4ads_V5`, `Standard_E8ads_V5`, `Standard_E16ads_V5`, `Standard_E20ads_V5`, `Standard_E32ads_V5`, `Standard_E48ads_V5`, `Standard_E64ads_V5`, `Standard_E96ads_V5`, `Standard_G1`, `Standard_G2`, `Standard_G3`, `Standard_G4`, `Standard_G5`, `Standard_F2s_V2`, `Standard_F4s_V2`, `Standard_F8s_V2`, `Standard_F16s_V2`, `Standard_F32s_V2`, `Standard_F64s_V2`, `Standard_F72s_V2`, `Standard_GS1`, `Standard_GS2`, `Standard_GS3`, `Standard_GS4`, `Standard_GS5` and `Standard_NC24`. Changing this forces a new resource to be created. * `password` - (Optional) The Password associated with the local administrator for the Zookeeper Nodes. Changing this forces a new resource to be created. diff --git a/website/docs/r/image.html.markdown b/website/docs/r/image.html.markdown index 13d4072ddd221..f52cfb420c1d3 100644 --- a/website/docs/r/image.html.markdown +++ b/website/docs/r/image.html.markdown @@ -48,23 +48,26 @@ The following arguments are supported: The `os_disk` block supports the following: +* `storage_type` - (Required) The type of Storage Disk to use. Possible values are `Premium_LRS`, `PremiumV2_LRS`, `Premium_ZRS`, `Standard_LRS`, `StandardSSD_LRS`, `StandardSSD_ZRS` and `UltraSSD_LRS`. Changing this forces a new resource to be created. * `os_type` - (Optional) Specifies the type of operating system contained in the virtual machine image. Possible values are: `Windows` or `Linux`. * `os_state` - (Optional) Specifies the state of the operating system contained in the blob. Currently, the only value is Generalized. Possible values are `Generalized` and `Specialized`. * `managed_disk_id` - (Optional) Specifies the ID of the managed disk resource that you want to use to create the image. * `blob_uri` - (Optional) Specifies the URI in Azure storage of the blob that you want to use to create the image. Changing this forces a new resource to be created. * `caching` - (Optional) Specifies the caching mode as `ReadWrite`, `ReadOnly`, or `None`. The default is `None`. * `size_gb` - (Optional) Specifies the size of the image to be created. Changing this forces a new resource to be created. -* `disk_encryption_set_id` - (Optional) The ID of the Disk Encryption Set which should be used to encrypt this image. Changing this forces a new resource to be created. +* `disk_encryption_set_id` - (Optional) The ID of the Disk Encryption Set which should be used to encrypt this disk. Changing this forces a new resource to be created. --- The `data_disk` block supports the following: +* `storage_type` - (Required) The type of Storage Disk to use. Possible values are `Premium_LRS`, `PremiumV2_LRS`, `Premium_ZRS`, `Standard_LRS`, `StandardSSD_LRS`, `StandardSSD_ZRS` and `UltraSSD_LRS`. Changing this forces a new resource to be created. * `lun` - (Optional) Specifies the logical unit number of the data disk. * `managed_disk_id` - (Optional) Specifies the ID of the managed disk resource that you want to use to create the image. Changing this forces a new resource to be created. * `blob_uri` - (Optional) Specifies the URI in Azure storage of the blob that you want to use to create the image. * `caching` - (Optional) Specifies the caching mode as `ReadWrite`, `ReadOnly`, or `None`. Defaults to `None`. * `size_gb` - (Optional) Specifies the size of the image to be created. The target size can't be smaller than the source size. +* `disk_encryption_set_id` - (Optional) The ID of the Disk Encryption Set which should be used to encrypt this disk. Changing this forces a new resource to be created. ## Attributes Reference diff --git a/website/docs/r/integration_service_environment.html.markdown b/website/docs/r/integration_service_environment.html.markdown deleted file mode 100644 index bd555d40a6005..0000000000000 --- a/website/docs/r/integration_service_environment.html.markdown +++ /dev/null @@ -1,135 +0,0 @@ ---- -subcategory: "Logic App" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_integration_service_environment" -description: |- - Manages private and isolated Logic App instances within an Azure virtual network. ---- - -# azurerm_integration_service_environment - -Manages private and isolated Logic App instances within an Azure virtual network. - -!> **NOTE:** The `azurerm_integration_service_environment` resource is deprecated and will be removed in v4.0 of the Azure Provider. The underlying Azure Service is being retired on 2024-08-31 and new instances cannot be provisioned by default after 2022-11-01. More information on the retirement and how to migrate to [Logic Apps Standard](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/logic_app_standard) [can be found here](https://aka.ms/isedeprecation). - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "exampleRG1" - location = "West Europe" -} - -resource "azurerm_virtual_network" "example" { - name = "example-vnet1" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - address_space = ["10.0.0.0/22"] -} - -resource "azurerm_subnet" "isesubnet1" { - name = "isesubnet1" - resource_group_name = azurerm_resource_group.example.name - virtual_network_name = azurerm_virtual_network.example.name - address_prefixes = ["10.0.1.0/27"] - - delegation { - name = "integrationServiceEnvironments" - service_delegation { - name = "Microsoft.Logic/integrationServiceEnvironments" - } - } -} - -resource "azurerm_subnet" "isesubnet2" { - name = "isesubnet2" - resource_group_name = azurerm_resource_group.example.name - virtual_network_name = azurerm_virtual_network.example.name - address_prefixes = ["10.0.1.32/27"] -} - -resource "azurerm_subnet" "isesubnet3" { - name = "isesubnet3" - resource_group_name = azurerm_resource_group.example.name - virtual_network_name = azurerm_virtual_network.example.name - address_prefixes = ["10.0.1.64/27"] -} - -resource "azurerm_subnet" "isesubnet4" { - name = "isesubnet4" - resource_group_name = azurerm_resource_group.example.name - virtual_network_name = azurerm_virtual_network.example.name - address_prefixes = ["10.0.1.96/27"] -} - -resource "azurerm_integration_service_environment" "example" { - - name = "example-ise" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - sku_name = "Developer_0" - access_endpoint_type = "Internal" - virtual_network_subnet_ids = [ - azurerm_subnet.isesubnet1.id, - azurerm_subnet.isesubnet2.id, - azurerm_subnet.isesubnet3.id, - azurerm_subnet.isesubnet4.id - ] - tags = { - environment = "development" - } -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `name` - (Required) The name of the Integration Service Environment. Changing this forces a new Integration Service Environment to be created. - -* `resource_group_name` - (Required) The name of the Resource Group where the Integration Service Environment should exist. Changing this forces a new Integration Service Environment to be created. - -* `location` - (Required) The Azure Region where the Integration Service Environment should exist. Changing this forces a new Integration Service Environment to be created. - -* `sku_name` - (Optional) The SKU name and capacity of the Integration Service Environment. Possible values are `Developer_0`, `Premium_0`, `Premium_1`, `Premium_2`, `Premium_3`, `Premium_4`, `Premium_5`, `Premium_6`, `Premium_7`, `Premium_8`, `Premium_9` and `Premium_10`. Defaults to `Developer_0`. - -~> **NOTE** For a `sku_name` using the `Developer` `sku` the `capacity` element must be always `0`. For a `sku_name` using the `sku` of `Premium` the `capacity` element can be between `0` and `10`. - -* `access_endpoint_type` - (Required) The type of access endpoint to use for the Integration Service Environment. Possible Values are `Internal` and `External`. Changing this forces a new Integration Service Environment to be created. - -* `virtual_network_subnet_ids` - (Required) A list of virtual network subnet ids to be used by Integration Service Environment. Exactly four distinct ids to `/27` subnets must be provided. Changing this forces a new Integration Service Environment to be created. - ---- - -* `tags` - (Optional) A mapping of tags which should be assigned to the Integration Service Environment. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Integration Service Environment. - -* `connector_endpoint_ip_addresses` - The list of access endpoint IP addresses of connector. - -* `connector_outbound_ip_addresses` - The list of outgoing IP addresses of connector. - -* `workflow_endpoint_ip_addresses` - The list of access endpoint IP addresses of workflow. - -* `workflow_outbound_ip_addresses` - The list of outgoing IP addresses of workflow. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 5 hours) Used when creating the Integration Service Environment. -* `read` - (Defaults to 5 minutes) Used when retrieving the Integration Service Environment. -* `update` - (Defaults to 5 hours) Used when updating the Integration Service Environment. -* `delete` - (Defaults to 5 hours) Used when deleting the Integration Service Environment. - -## Import - -Integration Service Environments can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_integration_service_environment.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Logic/integrationServiceEnvironments/ise1 -``` diff --git a/website/docs/r/iot_time_series_insights_access_policy.html.markdown b/website/docs/r/iot_time_series_insights_access_policy.html.markdown deleted file mode 100644 index 744c81d177fa8..0000000000000 --- a/website/docs/r/iot_time_series_insights_access_policy.html.markdown +++ /dev/null @@ -1,71 +0,0 @@ ---- -subcategory: "Time Series Insights" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_iot_time_series_insights_access_policy" -description: |- - Manages an Azure IoT Time Series Insights Access Policy. ---- - -# azurerm_iot_time_series_insights_access_policy - -Manages an Azure IoT Time Series Insights Access Policy. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} -resource "azurerm_iot_time_series_insights_standard_environment" "example" { - name = "example" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - sku_name = "S1_1" - data_retention_time = "P30D" -} -resource "azurerm_iot_time_series_insights_access_policy" "example" { - name = "example" - time_series_insights_environment_id = azurerm_iot_time_series_insights_standard_environment.example.name - - principal_object_id = "aGUID" - roles = ["Reader"] -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) Specifies the name of the Azure IoT Time Series Insights Access Policy. Changing this forces a new resource to be created. Must be globally unique. - -* `time_series_insights_environment_id` - (Required) The resource ID of the Azure IoT Time Series Insights Environment in which to create the Azure IoT Time Series Insights Reference Data Set. Changing this forces a new resource to be created. - -* `principal_object_id` - (Required) The id of the principal in Azure Active Directory. Changing this forces a new resource to be created. - -* `roles` - (Required) A list of roles to apply to the Access Policy. Valid values include `Contributor` and `Reader`. - -* `description` - (Optional) The description of the Azure IoT Time Series Insights Access Policy. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the IoT Time Series Insights Access Policy. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the IoT Time Series Insights Access Policy. -* `update` - (Defaults to 30 minutes) Used when updating the IoT Time Series Insights Access Policy. -* `read` - (Defaults to 5 minutes) Used when retrieving the IoT Time Series Insights Access Policy. -* `delete` - (Defaults to 30 minutes) Used when deleting the IoT Time Series Insights Access Policy. - -## Import - -Azure IoT Time Series Insights Access Policy can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_iot_time_series_insights_access_policy.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.TimeSeriesInsights/environments/environment1/accessPolicies/example -``` diff --git a/website/docs/r/iot_time_series_insights_event_source_eventhub.html.markdown b/website/docs/r/iot_time_series_insights_event_source_eventhub.html.markdown deleted file mode 100644 index 77cee232f63a4..0000000000000 --- a/website/docs/r/iot_time_series_insights_event_source_eventhub.html.markdown +++ /dev/null @@ -1,136 +0,0 @@ ---- -subcategory: "Time Series Insights" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_iot_time_series_insights_event_source_eventhub" -description: |- - Manages an Azure IoT Time Series Insights EventHub Event Source. ---- - -# azurerm_time_series_insights_event_source_eventhub - -Manages an Azure IoT Time Series Insights EventHub Event Source. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example" - location = "West Europe" -} - -resource "azurerm_eventhub_namespace" "example" { - name = "example" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - sku = "Standard" -} - -resource "azurerm_eventhub" "example" { - name = "example" - namespace_name = azurerm_eventhub_namespace.example.name - resource_group_name = azurerm_resource_group.example.name - partition_count = 2 - message_retention = 7 -} - -resource "azurerm_eventhub_consumer_group" "example" { - name = "example" - namespace_name = azurerm_eventhub_namespace.example.name - eventhub_name = azurerm_eventhub.example.name - resource_group_name = azurerm_resource_group.example.name -} - -resource "azurerm_eventhub_authorization_rule" "example" { - name = "example" - namespace_name = azurerm_eventhub_namespace.example.name - eventhub_name = azurerm_eventhub.example.name - resource_group_name = azurerm_resource_group.example.name - - listen = true - send = false - manage = false -} - -resource "azurerm_storage_account" "example" { - name = "example" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - account_tier = "Standard" - account_replication_type = "LRS" -} - -resource "azurerm_iot_time_series_insights_gen2_environment" "example" { - name = "example" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - sku_name = "L1" - id_properties = ["id"] - - storage { - name = azurerm_storage_account.example.name - key = azurerm_storage_account.example.primary_access_key - } -} - -resource "azurerm_iot_time_series_insights_event_source_eventhub" "example" { - name = "example" - location = azurerm_resource_group.example.location - environment_id = azurerm_iot_time_series_insights_gen2_environment.example.id - eventhub_name = azurerm_eventhub.example.name - namespace_name = azurerm_eventhub_namespace.example.name - shared_access_key = azurerm_eventhub_authorization_rule.example.primary_key - shared_access_key_name = azurerm_eventhub_authorization_rule.example.name - consumer_group_name = azurerm_eventhub_consumer_group.example.name - event_source_resource_id = azurerm_eventhub.example.id -} - -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) Specifies the name of the Azure IoT Time Series Insights EventHub Event Source. Changing this forces a new resource to be created. Must be globally unique. - -* `environment_id` - (Required) Specifies the id of the IoT Time Series Insights Environment that the Event Source should be associated with. Changing this forces a new resource to created. - -* `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - -* `eventhub_name` - (Required) Specifies the name of the EventHub which will be associated with this resource. - -* `consumer_group_name` - (Required) Specifies the name of the EventHub Consumer Group that holds the partitions from which events will be read. - -* `event_source_resource_id` - (Required) Specifies the resource id where events will be coming from. - -* `namespace_name` - (Required) Specifies the EventHub Namespace name. - -* `shared_access_key_name` - (Required) Specifies the name of the Shared Access key that grants the Event Source access to the EventHub. - -* `shared_access_key` - (Required) Specifies the value of the Shared Access Policy key that grants the Time Series Insights service read access to the EventHub. - -* `timestamp_property_name` - (Optional) Specifies the value that will be used as the event source's timestamp. This value defaults to the event creation time. - -* `tags` - (Optional) A mapping of tags to assign to the resource. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the IoT Time Series Insights EventHub Event Source. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the IoT Time Series Insights EventHub Event Source. -* `update` - (Defaults to 30 minutes) Used when updating the IoT Time Series Insights EventHub Event Source. -* `read` - (Defaults to 5 minutes) Used when retrieving the IoT Time Series Insights EventHub Event Source. -* `delete` - (Defaults to 30 minutes) Used when deleting the IoT Time Series Insights EventHub Event Source. - -## Import - -Azure IoT Time Series Insights EventHub Event Source can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_iot_time_series_insights_event_source_eventhub.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.TimeSeriesInsights/environments/environment1/eventSources/example -``` diff --git a/website/docs/r/iot_time_series_insights_event_source_iothub.html.markdown b/website/docs/r/iot_time_series_insights_event_source_iothub.html.markdown deleted file mode 100644 index 71a82571a4432..0000000000000 --- a/website/docs/r/iot_time_series_insights_event_source_iothub.html.markdown +++ /dev/null @@ -1,118 +0,0 @@ ---- -subcategory: "Time Series Insights" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_iot_time_series_insights_event_source_iothub" -description: |- - Manages an Azure IoT Time Series Insights IoTHub Event Source. ---- - -# azurerm_time_series_insights_event_source_iothub - -Manages an Azure IoT Time Series Insights IoTHub Event Source. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example" - location = "West Europe" -} - -resource "azurerm_iothub" "example" { - name = "example" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - - sku { - name = "B1" - capacity = "1" - } -} - -resource "azurerm_iothub_consumer_group" "example" { - name = "example" - iothub_name = azurerm_iothub.example.name - eventhub_endpoint_name = "events" - resource_group_name = azurerm_resource_group.example.name -} - -resource "azurerm_storage_account" "storage" { - name = "example" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - account_tier = "Standard" - account_replication_type = "LRS" -} - -resource "azurerm_iot_time_series_insights_gen2_environment" "example" { - name = "example" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - sku_name = "L1" - id_properties = ["id"] - - storage { - name = azurerm_storage_account.storage.name - key = azurerm_storage_account.storage.primary_access_key - } -} - -resource "azurerm_iot_time_series_insights_event_source_iothub" "example" { - name = "example" - location = azurerm_resource_group.example.location - environment_id = azurerm_iot_time_series_insights_gen2_environment.example.id - iothub_name = azurerm_iothub.example.name - shared_access_key = azurerm_iothub.example.shared_access_policy[0].primary_key - shared_access_key_name = azurerm_iothub.example.shared_access_policy[0].key_name - consumer_group_name = azurerm_iothub_consumer_group.example.name - event_source_resource_id = azurerm_iothub.example.id -} - -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) Specifies the name of the Azure IoT Time Series Insights IoTHub Event Source. Changing this forces a new resource to be created. Must be globally unique. - -* `environment_id` - (Required) Specifies the id of the IoT Time Series Insights Environment that the Event Source should be associated with. Changing this forces a new resource to created. - -* `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - -* `iothub_name` - (Required) Specifies the name of the IotHub which will be associated with this resource. - -* `consumer_group_name` - (Required) Specifies the name of the IotHub Consumer Group that holds the partitions from which events will be read. - -* `event_source_resource_id` - (Required) Specifies the resource id where events will be coming from. - -* `shared_access_key_name` - (Required) Specifies the name of the Shared Access key that grants the Event Source access to the IotHub. - -* `shared_access_key` - (Required) Specifies the value of the Shared Access Policy key that grants the Time Series Insights service read access to the IotHub. - -* `timestamp_property_name` - (Optional) Specifies the value that will be used as the event source's timestamp. This value defaults to the event creation time. - -* `tags` - (Optional) A mapping of tags to assign to the resource. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the IoT Time Series Insights IoTHub Event Source. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the IoT Time Series Insights IoTHub Event Source. -* `update` - (Defaults to 30 minutes) Used when updating the IoT Time Series Insights IoTHub Event Source. -* `read` - (Defaults to 5 minutes) Used when retrieving the IoT Time Series Insights IoTHub Event Source. -* `delete` - (Defaults to 30 minutes) Used when deleting the IoT Time Series Insights IoTHub Event Source. - -## Import - -Azure IoT Time Series Insights IoTHub Event Source can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_iot_time_series_insights_event_source_iothub.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.TimeSeriesInsights/environments/environment1/eventSources/example -``` diff --git a/website/docs/r/iot_time_series_insights_gen2_environment.html.markdown b/website/docs/r/iot_time_series_insights_gen2_environment.html.markdown deleted file mode 100644 index 6e939f327c379..0000000000000 --- a/website/docs/r/iot_time_series_insights_gen2_environment.html.markdown +++ /dev/null @@ -1,90 +0,0 @@ ---- -subcategory: "Time Series Insights" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_iot_time_series_insights_gen2_environment" -description: |- - Manages an Azure IoT Time Series Insights Gen2 Environment. ---- - -# azurerm_time_series_insights_gen2_environment - -Manages an Azure IoT Time Series Insights Gen2 Environment. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} -resource "azurerm_storage_account" "storage" { - name = "example" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - account_tier = "Standard" - account_replication_type = "LRS" -} -resource "azurerm_iot_time_series_insights_gen2_environment" "example" { - name = "example" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - sku_name = "L1" - warm_store_data_retention_time = "P30D" - id_properties = ["id"] - storage { - name = azurerm_storage_account.storage.name - key = azurerm_storage_account.storage.primary_access_key - } -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) Specifies the name of the Azure IoT Time Series Insights Gen2 Environment. Changing this forces a new resource to be created. Must be globally unique. - -* `resource_group_name` - (Required) The name of the resource group in which to create the Azure IoT Time Series Insights Gen2 Environment. Changing this forces a new resource to be created. - -* `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - -* `sku_name` - (Required) Specifies the SKU Name for this IoT Time Series Insights Gen2 Environment. Currently it supports only `L1`. For gen2, capacity cannot be specified. Changing this forces a new resource to be created. - -* `warm_store_data_retention_time` - (Optional) Specifies the ISO8601 timespan specifying the minimum number of days the environment's events will be available for query. - -* `storage` - (Required) A `storage` block as defined below. - -* `id_properties` - (Required) A list of property ids for the Azure IoT Time Series Insights Gen2 Environment. Changing this forces a new resource to be created. - -* `tags` - (Optional) A mapping of tags to assign to the resource. - ---- - -A `storage` block supports the following: - -* `name` - (Required) Name of storage account for Azure IoT Time Series Insights Gen2 Environment. Changing this forces a new resource to be created. - -* `key` - (Required) Access key of storage account for Azure IoT Time Series Insights Gen2 Environment - -## Attributes Reference - -* `id` - The ID of the IoT Time Series Insights Gen2 Environment. - -* `data_access_fqdn` - The FQDN used to access the environment data. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the IoT Time Series Insights Gen2 Environment. -* `update` - (Defaults to 30 minutes) Used when updating the IoT Time Series Insights Gen2 Environment. -* `read` - (Defaults to 5 minutes) Used when retrieving the IoT Time Series Insights Gen2 Environment. -* `delete` - (Defaults to 30 minutes) Used when deleting the IoT Time Series Insights Gen2 Environment. - -## Import - -Azure IoT Time Series Insights Gen2 Environment can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_iot_time_series_insights_gen2_environment.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.TimeSeriesInsights/environments/example -``` diff --git a/website/docs/r/iot_time_series_insights_reference_data_set.html.markdown b/website/docs/r/iot_time_series_insights_reference_data_set.html.markdown deleted file mode 100644 index 56e9c69c7d15f..0000000000000 --- a/website/docs/r/iot_time_series_insights_reference_data_set.html.markdown +++ /dev/null @@ -1,84 +0,0 @@ ---- -subcategory: "Time Series Insights" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_iot_time_series_insights_reference_data_set" -description: |- - Manages an Azure IoT Time Series Insights Reference Data Set. ---- - -# azurerm_iot_time_series_insights_reference_data_set - -Manages an Azure IoT Time Series Insights Reference Data Set. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} -resource "azurerm_iot_time_series_insights_standard_environment" "example" { - name = "example" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - sku_name = "S1_1" - data_retention_time = "P30D" -} -resource "azurerm_iot_time_series_insights_reference_data_set" "example" { - name = "example" - time_series_insights_environment_id = azurerm_iot_time_series_insights_standard_environment.example.id - location = azurerm_resource_group.example.location - - key_property { - name = "keyProperty1" - type = "String" - } -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) Specifies the name of the Azure IoT Time Series Insights Reference Data Set. Changing this forces a new resource to be created. Must be globally unique. - -* `time_series_insights_environment_id` - (Required) The resource ID of the Azure IoT Time Series Insights Environment in which to create the Azure IoT Time Series Insights Reference Data Set. Changing this forces a new resource to be created. - -* `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - -* `data_string_comparison_behavior` - (Optional) The comparison behavior that will be used to compare keys. Valid values include `Ordinal` and `OrdinalIgnoreCase`. Defaults to `Ordinal`. Changing this forces a new resource to be created. - -* `key_property` - (Required) A `key_property` block as defined below. Changing this forces a new resource to be created. - -* `tags` - (Optional) A mapping of tags to assign to the resource. - ---- - -A `key_property` block supports the following: - -* `name` - (Required) The name of the key property. Changing this forces a new resource to be created. - -* `type` - (Required) The data type of the key property. Valid values include `Bool`, `DateTime`, `Double`, `String`. Changing this forces a new resource to be created. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the IoT Time Series Insights Reference Data Set. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the IoT Time Series Insights Reference Data Set. -* `update` - (Defaults to 30 minutes) Used when updating the IoT Time Series Insights Reference Data Set. -* `read` - (Defaults to 5 minutes) Used when retrieving the IoT Time Series Insights Reference Data Set. -* `delete` - (Defaults to 30 minutes) Used when deleting the IoT Time Series Insights Reference Data Set. - -## Import - -Azure IoT Time Series Insights Reference Data Set can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_iot_time_series_insights_reference_data_set.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.TimeSeriesInsights/environments/example/referenceDataSets/example -``` diff --git a/website/docs/r/iot_time_series_insights_standard_environment.html.markdown b/website/docs/r/iot_time_series_insights_standard_environment.html.markdown deleted file mode 100644 index 562161cc86abd..0000000000000 --- a/website/docs/r/iot_time_series_insights_standard_environment.html.markdown +++ /dev/null @@ -1,70 +0,0 @@ ---- -subcategory: "Time Series Insights" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_iot_time_series_insights_standard_environment" -description: |- - Manages an Azure IoT Time Series Insights Standard Environment. ---- - -# azurerm_time_series_insights_standard_environment - -Manages an Azure IoT Time Series Insights Standard Environment. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} -resource "azurerm_iot_time_series_insights_standard_environment" "example" { - name = "example" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - sku_name = "S1_1" - data_retention_time = "P30D" -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) Specifies the name of the Azure IoT Time Series Insights Standard Environment. Changing this forces a new resource to be created. Must be globally unique. - -* `resource_group_name` - (Required) The name of the resource group in which to create the Azure IoT Time Series Insights Standard Environment. Changing this forces a new resource to be created. - -* `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - -* `sku_name` - (Required) Specifies the SKU Name for this IoT Time Series Insights Standard Environment. It is string consisting of two parts separated by an underscore(\_).The first part is the `name`, valid values include: `S1` and `S2`. The second part is the `capacity` (e.g. the number of deployed units of the `sku`), which must be a positive `integer` (e.g. `S1_1`). Possible values are `S1_1`, `S1_2`, `S1_3`, `S1_4`, `S1_5`, `S1_6`, `S1_7`, `S1_8`, `S1_9`, `S1_10`, `S2_1`, `S2_2`, `S2_3`, `S2_4`, `S2_5`, `S2_6`, `S2_7`, `S2_8`, `S2_9` and `S2_10`. Changing this forces a new resource to be created. - -* `data_retention_time` - (Required) Specifies the ISO8601 timespan specifying the minimum number of days the environment's events will be available for query. Changing this forces a new resource to be created. - -* `storage_limit_exceeded_behavior` - (Optional) Specifies the behaviour the IoT Time Series Insights service should take when the environment's capacity has been exceeded. Valid values include `PauseIngress` and `PurgeOldData`. Defaults to `PurgeOldData`. - -* `partition_key` - (Optional) The name of the event property which will be used to partition data. Changing this forces a new resource to be created. - -* `tags` - (Optional) A mapping of tags to assign to the resource. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the IoT Time Series Insights Standard Environment. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the IoT Time Series Insights Standard Environment. -* `update` - (Defaults to 30 minutes) Used when updating the IoT Time Series Insights Standard Environment. -* `read` - (Defaults to 5 minutes) Used when retrieving the IoT Time Series Insights Standard Environment. -* `delete` - (Defaults to 30 minutes) Used when deleting the IoT Time Series Insights Standard Environment. - -## Import - -Azure IoT Time Series Insights Standard Environment can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_iot_time_series_insights_standard_environment.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.TimeSeriesInsights/environments/example -``` diff --git a/website/docs/r/iotcentral_application.html.markdown b/website/docs/r/iotcentral_application.html.markdown index f3ea5fb892d6b..7e3d0007c0e23 100644 --- a/website/docs/r/iotcentral_application.html.markdown +++ b/website/docs/r/iotcentral_application.html.markdown @@ -56,7 +56,7 @@ The following arguments are supported: * `sku` - (Optional) A `sku` name. Possible values is `ST0`, `ST1`, `ST2`, Default value is `ST1` -* `template` - (Optional) A `template` name. IoT Central application template name. Default is a custom application. Changing this forces a new resource to be created. +* `template` - (Optional) A `template` name. IoT Central application template name. Defaults to `iotc-pnp-preview@1.0.0`. Changing this forces a new resource to be created. * `tags` - (Optional) A mapping of tags to assign to the resource. diff --git a/website/docs/r/iothub.html.markdown b/website/docs/r/iothub.html.markdown index 5d11b28af1638..55d4066dc338d 100644 --- a/website/docs/r/iothub.html.markdown +++ b/website/docs/r/iothub.html.markdown @@ -145,9 +145,9 @@ The following arguments are supported: * `local_authentication_enabled` - (Optional) If false, SAS tokens with Iot hub scoped SAS keys cannot be used for authentication. Defaults to `true`. -* `event_hub_partition_count` - (Optional) The number of device-to-cloud partitions used by backing event hubs. Must be between `2` and `128`. +* `event_hub_partition_count` - (Optional) The number of device-to-cloud partitions used by backing event hubs. Must be between `2` and `128`. Defaults to `4`. -* `event_hub_retention_in_days` - (Optional) The event hub retention to use in days. Must be between `1` and `7`. +* `event_hub_retention_in_days` - (Optional) The event hub retention to use in days. Must be between `1` and `7`. Defaults to `1`. * `endpoint` - (Optional) An `endpoint` block as defined below. @@ -283,7 +283,7 @@ A `fallback_route` block supports the following: * `endpoint_names` - (Optional) The endpoints to which messages that satisfy the condition are routed. Currently only 1 endpoint is allowed. -* `enabled` - (Optional) Used to specify whether the fallback route is enabled. +* `enabled` - (Optional) Used to specify whether the fallback route is enabled. Defaults to `true`. --- diff --git a/website/docs/r/key_vault_managed_hardware_security_module_key.html.markdown b/website/docs/r/key_vault_managed_hardware_security_module_key.html.markdown index 1d5b882f16bf4..9545ea9eb9ca8 100644 --- a/website/docs/r/key_vault_managed_hardware_security_module_key.html.markdown +++ b/website/docs/r/key_vault_managed_hardware_security_module_key.html.markdown @@ -36,7 +36,7 @@ resource "azurerm_key_vault_managed_hardware_security_module" "example" { // this gives your service principal the HSM Crypto User role which lets you create and destroy hsm keys resource "azurerm_key_vault_managed_hardware_security_module_role_assignment" "hsm-crypto-user" { - vault_base_url = azurerm_key_vault_managed_hardware_security_module.test.hsm_uri + managed_hsm_id = azurerm_key_vault_managed_hardware_security_module.test.id name = "1e243909-064c-6ac3-84e9-1c8bf8d6ad22" scope = "/keys" role_definition_id = "/Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b" @@ -45,7 +45,7 @@ resource "azurerm_key_vault_managed_hardware_security_module_role_assignment" "h // this gives your service principal the HSM Crypto Officer role which lets you purge hsm keys resource "azurerm_key_vault_managed_hardware_security_module_role_assignment" "hsm-crypto-officer" { - vault_base_url = azurerm_key_vault_managed_hardware_security_module.test.hsm_uri + managed_hsm_id = azurerm_key_vault_managed_hardware_security_module.test.id name = "1e243909-064c-6ac3-84e9-1c8bf8d6ad23" scope = "/keys" role_definition_id = "/Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778" diff --git a/website/docs/r/key_vault_managed_hardware_security_module_key_rotation_policy.html.markdown b/website/docs/r/key_vault_managed_hardware_security_module_key_rotation_policy.html.markdown new file mode 100644 index 0000000000000..752781da44cec --- /dev/null +++ b/website/docs/r/key_vault_managed_hardware_security_module_key_rotation_policy.html.markdown @@ -0,0 +1,64 @@ +--- +subcategory: "Key Vault" +layout: "azurerm" +page_title: "Azure Resource Manager: azurerm_key_vault_managed_hardware_security_module_key_rotation_policy" +description: |- + Manages a Managed HSM Key rotation policy. +--- + +# azurerm_key_vault_managed_hardware_security_module_key_rotation_policy + +Manages a Managed HSM Key rotation policy. + +## Example Usage + +```hcl +resource "azurerm_key_vault_managed_hardware_security_module_key" "example" { + name = "example-key" + managed_hsm_id = azurerm_key_vault_managed_hardware_security_module.example.id + key_type = "EC-HSM" + curve = "P-521" + key_opts = ["sign"] +} + +resource "azurerm_key_vault_managed_hardware_security_module_key_rotation_policy" "example" { + managed_hsm_key_id = azurerm_key_vault_managed_hardware_security_module_key.example.id + expire_after = "P60D" + time_before_expiry = "P30D" +} +``` + +## Arguments Reference + +The following arguments are supported: + +* `managed_hsm_key_id` - (Required) The ID of the Managed HSM Key. Changing this forces a new Managed HSM Key rotation policy to be created. + +* `expire_after` - (Required) Specify the expiration duration on a newly rotated key as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `P28D`. + +* `time_after_creation` - (Optional) Rotate automatically at a duration after key creation as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Exactly one of `time_after_creation` or `time_before_expiry` should be specified. + +* `time_before_expiry` - (Optional) Rotate automatically at a duration before key expiry as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Exactly one of `time_after_creation` or `time_before_expiry` should be specified. + +## Attributes Reference + +In addition to the Arguments listed above - the following Attributes are exported: + +* `id` - The ID of the Managed HSM Key Rotation policy. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: + +* `create` - (Defaults to 30 minutes) Used when creating the Managed HSM Key rotation policy. +* `read` - (Defaults to 5 minutes) Used when retrieving the Managed HSM Key rotation policy. +* `update` - (Defaults to 30 minutes) Used when updating the Managed HSM Key rotation policy. +* `delete` - (Defaults to 30 minutes) Used when deleting the Managed HSM Key rotation policy. + +## Import + +Managed HSM Key rotation policy can be imported using the `resource id`, e.g. + +```shell +terraform import azurerm_key_vault_managed_hardware_security_module_key_rotation_policy.example https://example-hsm.managedhsm.azure.net/keys/example +``` diff --git a/website/docs/r/key_vault_managed_hardware_security_module_role_assignment.html.markdown b/website/docs/r/key_vault_managed_hardware_security_module_role_assignment.html.markdown index 1e0041f9d050c..b495ab73306f8 100644 --- a/website/docs/r/key_vault_managed_hardware_security_module_role_assignment.html.markdown +++ b/website/docs/r/key_vault_managed_hardware_security_module_role_assignment.html.markdown @@ -14,9 +14,8 @@ Manages a Managed Hardware Security Module Role Assignment. ```hcl data "azurerm_key_vault_managed_hardware_security_module_role_definition" "user" { - vault_base_url = azurerm_key_vault_managed_hardware_security_module.test.hsm_uri + managed_hsm_id = azurerm_key_vault_managed_hardware_security_module.example.id name = "21dbd100-6940-42c2-9190-5d6cb909625b" - scope = "/" } resource "azurerm_key_vault_managed_hardware_security_module_role_assignment" "example" { diff --git a/website/docs/r/kubernetes_cluster.html.markdown b/website/docs/r/kubernetes_cluster.html.markdown index bc488d45dd9b5..5691105eb90ec 100644 --- a/website/docs/r/kubernetes_cluster.html.markdown +++ b/website/docs/r/kubernetes_cluster.html.markdown @@ -83,7 +83,7 @@ In addition, one of either `identity` or `service_principal` blocks must be spec * `aci_connector_linux` - (Optional) A `aci_connector_linux` block as defined below. For more details, please visit [Create and configure an AKS cluster to use virtual nodes](https://docs.microsoft.com/azure/aks/virtual-nodes-portal). -* `automatic_channel_upgrade` - (Optional) The upgrade channel for this Kubernetes Cluster. Possible values are `patch`, `rapid`, `node-image` and `stable`. Omitting this field sets this value to `none`. +* `automatic_upgrade_channel` - (Optional) The upgrade channel for this Kubernetes Cluster. Possible values are `patch`, `rapid`, `node-image` and `stable`. Omitting this field sets this value to `none`. !> **Note:** Cluster Auto-Upgrade will update the Kubernetes Cluster (and its Node Pools) to the latest GA version of Kubernetes automatically - please [see the Azure documentation for more information](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). @@ -117,7 +117,7 @@ In addition, one of either `identity` or `service_principal` blocks must be spec * `image_cleaner_enabled` - (Optional) Specifies whether Image Cleaner is enabled. -* `image_cleaner_interval_hours` - (Optional) Specifies the interval in hours when images should be cleaned up. Defaults to `48`. +* `image_cleaner_interval_hours` - (Optional) Specifies the interval in hours when images should be cleaned up. Defaults to `0`. * `ingress_application_gateway` - (Optional) A `ingress_application_gateway` block as defined below. @@ -155,9 +155,9 @@ In addition, one of either `identity` or `service_principal` blocks must be spec -> **Note:** If `network_profile` is not defined, `kubenet` profile will be used by default. -* `node_os_channel_upgrade` - (Optional) The upgrade channel for this Kubernetes Cluster Nodes' OS Image. Possible values are `Unmanaged`, `SecurityPatch`, `NodeImage` and `None`. +* `node_os_upgrade_channel` - (Optional) The upgrade channel for this Kubernetes Cluster Nodes' OS Image. Possible values are `Unmanaged`, `SecurityPatch`, `NodeImage` and `None`. Defaults to `NodeImage`. --> **Note:** `node_os_channel_upgrade` must be set to `NodeImage` if `automatic_channel_upgrade` has been set to `node-image` +-> **Note:** `node_os_upgrade_channel` must be set to `NodeImage` if `automatic_upgrade_channel` has been set to `node-image` * `node_resource_group` - (Optional) The name of the Resource Group where the Kubernetes Nodes should exist. Changing this forces a new resource to be created. @@ -322,14 +322,8 @@ An `auto_scaler_profile` block supports the following: An `azure_active_directory_role_based_access_control` block supports the following: -* `managed` - (Optional) Is the Azure Active Directory integration Managed, meaning that Azure will create/manage the Service Principal used for integration. Defaults to `false`. - --> **Note:** The property `managed` is deprecated and will be defaulted to `true` in v4.0 of the AzureRM provider. Until the property is removed it must be specified with `true` for AKS-managed Entra Integration. - * `tenant_id` - (Optional) The Tenant ID used for Azure Active Directory Application. If this isn't specified the Tenant ID of the current Subscription is used. -When `managed` is set to `true` the following properties can be specified: - * `admin_group_object_ids` - (Optional) A list of Object IDs of Azure Active Directory Groups which should have Admin Role on the Cluster. * `azure_rbac_enabled` - (Optional) Is Role Based Access Control based on Azure AD enabled? @@ -354,7 +348,7 @@ An `monitor_metrics` block supports the following: A `default_node_pool` block supports the following: --> **Note:** Changing certain properties of the `default_node_pool` is done by cycling the system node pool of the cluster. When cycling the system node pool, it doesn't perform cordon and drain, and it will disrupt rescheduling pods currently running on the previous system node pool.`temporary_name_for_rotation` must be specified when changing any of the following properties: `enable_host_encryption`, `enable_node_public_ip`, `fips_enabled`, `kubelet_config`, `linux_os_config`, `max_pods`, `only_critical_addons_enabled`, `os_disk_size_gb`, `os_disk_type`, `os_sku`, `pod_subnet_id`, `snapshot_id`, `ultra_ssd_enabled`, `vnet_subnet_id`, `vm_size`, `zones`. +-> **Note:** Changing certain properties of the `default_node_pool` is done by cycling the system node pool of the cluster. When cycling the system node pool, it doesn't perform cordon and drain, and it will disrupt rescheduling pods currently running on the previous system node pool.`temporary_name_for_rotation` must be specified when changing any of the following properties: `host_encryption_enabled`, `node_public_ip_enabled`, `fips_enabled`, `kubelet_config`, `linux_os_config`, `max_pods`, `only_critical_addons_enabled`, `os_disk_size_gb`, `os_disk_type`, `os_sku`, `pod_subnet_id`, `snapshot_id`, `ultra_ssd_enabled`, `vnet_subnet_id`, `vm_size`, `zones`. * `name` - (Required) The name which should be used for the default Kubernetes Node Pool. @@ -362,17 +356,17 @@ A `default_node_pool` block supports the following: * `capacity_reservation_group_id` - (Optional) Specifies the ID of the Capacity Reservation Group within which this AKS Cluster should be created. Changing this forces a new resource to be created. -* `enable_auto_scaling` - (Optional) Should [the Kubernetes Auto Scaler](https://docs.microsoft.com/azure/aks/cluster-autoscaler) be enabled for this Node Pool? +* `auto_scaling_enabled` - (Optional) Should [the Kubernetes Auto Scaler](https://docs.microsoft.com/azure/aks/cluster-autoscaler) be enabled for this Node Pool? -> **Note:** This requires that the `type` is set to `VirtualMachineScaleSets`. -> **Note:** If you're using AutoScaling, you may wish to use [Terraform's `ignore_changes` functionality](https://www.terraform.io/docs/language/meta-arguments/lifecycle.html#ignore_changes) to ignore changes to the `node_count` field. -* `enable_host_encryption` - (Optional) Should the nodes in the Default Node Pool have host encryption enabled? `temporary_name_for_rotation` must be specified when changing this property. +* `host_encryption_enabled` - (Optional) Should the nodes in the Default Node Pool have host encryption enabled? `temporary_name_for_rotation` must be specified when changing this property. -> **Note:** This requires that the Feature `Microsoft.ContainerService/EnableEncryptionAtHost` is enabled and the Resource Provider is registered. -* `enable_node_public_ip` - (Optional) Should nodes in this Node Pool have a Public IP Address? `temporary_name_for_rotation` must be specified when changing this property. +* `node_public_ip_enabled` - (Optional) Should nodes in this Node Pool have a Public IP Address? `temporary_name_for_rotation` must be specified when changing this property. * `gpu_instance` - (Optional) Specifies the GPU MIG instance profile for supported GPU VM SKU. The allowed values are `MIG1g`, `MIG2g`, `MIG3g`, `MIG4g` and `MIG7g`. Changing this forces a new resource to be created. @@ -390,7 +384,7 @@ A `default_node_pool` block supports the following: * `node_network_profile` - (Optional) A `node_network_profile` block as documented below. -* `node_public_ip_prefix_id` - (Optional) Resource ID for the Public IP Addresses Prefix for the nodes in this Node Pool. `enable_node_public_ip` should be `true`. Changing this forces a new resource to be created. +* `node_public_ip_prefix_id` - (Optional) Resource ID for the Public IP Addresses Prefix for the nodes in this Node Pool. `node_public_ip_enabled` should be `true`. Changing this forces a new resource to be created. * `node_labels` - (Optional) A map of Kubernetes labels which should be applied to nodes in the Default Node Pool. @@ -416,7 +410,7 @@ A `default_node_pool` block supports the following: * `temporary_name_for_rotation` - (Optional) Specifies the name of the temporary node pool used to cycle the default node pool for VM resizing. -* `type` - (Optional) The type of Node Pool which should be created. Possible values are `AvailabilitySet` and `VirtualMachineScaleSets`. Defaults to `VirtualMachineScaleSets`. Changing this forces a new resource to be created. +* `type` - (Optional) The type of Node Pool which should be created. Possible values are `VirtualMachineScaleSets`. Defaults to `VirtualMachineScaleSets`. Changing this forces a new resource to be created. -> **Note:** When creating a cluster that supports multiple node pools, the cluster must use `VirtualMachineScaleSets`. For more information on the limitations of clusters using multiple node pools see [the documentation](https://learn.microsoft.com/en-us/azure/aks/use-multiple-node-pools#limitations). @@ -438,7 +432,7 @@ A `default_node_pool` block supports the following: -> **Note:** This requires that the `type` is set to `VirtualMachineScaleSets` and that `load_balancer_sku` is set to `standard`. -If `enable_auto_scaling` is set to `true`, then the following fields can also be configured: +If `auto_scaling_enabled` is set to `true`, then the following fields can also be configured: * `max_count` - (Optional) The maximum number of nodes which should exist in this Node Pool. If specified this must be between `1` and `1000`. @@ -448,7 +442,7 @@ If `enable_auto_scaling` is set to `true`, then the following fields can also be -> **Note:** If specified you may wish to use [Terraform's `ignore_changes` functionality](https://www.terraform.io/language/meta-arguments/lifecycle#ignore_changess) to ignore changes to this field. --> **Note:** If `enable_auto_scaling` is set to `false` both `min_count` and `max_count` fields need to be set to `null` or omitted from the configuration. +-> **Note:** If `auto_scaling_enabled` is set to `false` both `min_count` and `max_count` fields need to be set to `null` or omitted from the configuration. --- @@ -488,7 +482,7 @@ A `kubelet_config` block supports the following: * `container_log_max_size_mb` - (Optional) Specifies the maximum size (e.g. 10MB) of container log file before it is rotated. -* `cpu_cfs_quota_enabled` - (Optional) Is CPU CFS quota enforcement for containers enabled? +* `cpu_cfs_quota_enabled` - (Optional) Is CPU CFS quota enforcement for containers enabled? Defaults to `true`. * `cpu_cfs_quota_period` - (Optional) Specifies the CPU CFS quota period value. @@ -657,18 +651,12 @@ A `network_profile` block supports the following: * `dns_service_ip` - (Optional) IP address within the Kubernetes service address range that will be used by cluster service discovery (kube-dns). Changing this forces a new resource to be created. -* `docker_bridge_cidr` - (Optional) IP address (in CIDR notation) used as the Docker bridge IP address on nodes. Changing this forces a new resource to be created. - --> **Note:** `docker_bridge_cidr` has been deprecated as the API no longer supports it and will be removed in version 4.0 of the provider. - * `network_data_plane` - (Optional) Specifies the data plane used for building the Kubernetes network. Possible values are `azure` and `cilium`. Defaults to `azure`. Disabling this forces a new resource to be created. ~> **Note:** When `network_data_plane` is set to `cilium`, the `network_plugin` field can only be set to `azure`. ~> **Note:** When `network_data_plane` is set to `cilium`, one of either `network_plugin_mode = "overlay"` or `pod_subnet_id` must be specified. --> **Note:** This requires that the Preview Feature `Microsoft.ContainerService/CiliumDataplanePreview` is enabled and the Resource Provider is re-registered, see [the documentation](https://learn.microsoft.com/en-us/azure/aks/azure-cni-powered-by-cilium) for more information. - * `network_plugin_mode` - (Optional) Specifies the network plugin mode used for building the Kubernetes network. Possible value is `overlay`. ~> **Note:** When `network_plugin_mode` is set to `overlay`, the `network_plugin` field can only be set to `azure`. When upgrading from Azure CNI without overlay, `pod_subnet_id` must be specified. @@ -727,9 +715,9 @@ A `load_balancer_profile` block supports the following: A `nat_gateway_profile` block supports the following: -* `idle_timeout_in_minutes` - (Optional) Desired outbound flow idle timeout in minutes for the cluster load balancer. Must be between `4` and `120` inclusive. Defaults to `4`. +* `idle_timeout_in_minutes` - (Optional) Desired outbound flow idle timeout in minutes for the managed nat gateway. Must be between `4` and `120` inclusive. Defaults to `4`. -* `managed_outbound_ip_count` - (Optional) Count of desired managed outbound IPs for the cluster load balancer. Must be between `1` and `100` inclusive. +* `managed_outbound_ip_count` - (Optional) Count of desired managed outbound IPs for the managed nat gateway. Must be between `1` and `16` inclusive. --- @@ -761,6 +749,10 @@ A `service_mesh_profile` block supports the following: * `mode` - (Required) The mode of the service mesh. Possible value is `Istio`. +* `revisions` - (Required) Specify 1 or 2 Istio control plane revisions for managing minor upgrades using the canary upgrade process. For example, create the resource with `revisions` set to `["asm-1-20"]`, or leave it empty (the `revisions` will only be known after apply). To start the canary upgrade, change `revisions` to `["asm-1-20", "asm-1-21"]`. To roll back the canary upgrade, revert to `["asm-1-20"]`. To confirm the upgrade, change to `["asm-1-21"]`. + +-> **NOTE:** Upgrading to a new (canary) revision does not affect existing sidecar proxies. You need to apply the canary revision label to selected namespaces and restart pods with kubectl to inject the new sidecar proxy. [Learn more](https://istio.io/latest/docs/setup/upgrade/canary/#data-plane). + * `internal_ingress_gateway_enabled` - (Optional) Is Istio Internal Ingress Gateway enabled? * `external_ingress_gateway_enabled` - (Optional) Is Istio External Ingress Gateway enabled? @@ -797,7 +789,7 @@ A `service_principal` block supports the following: A `ssh_key` block supports the following: -* `key_data` - (Required) The Public SSH Key used to access the cluster. +* `key_data` - (Required) The Public SSH Key used to access the cluster. Changing this forces a new resource to be created. --- diff --git a/website/docs/r/kubernetes_cluster_node_pool.html.markdown b/website/docs/r/kubernetes_cluster_node_pool.html.markdown index ffd20bd6b8556..5eef5f3d0ef28 100644 --- a/website/docs/r/kubernetes_cluster_node_pool.html.markdown +++ b/website/docs/r/kubernetes_cluster_node_pool.html.markdown @@ -72,13 +72,13 @@ The following arguments are supported: * `capacity_reservation_group_id` - (Optional) Specifies the ID of the Capacity Reservation Group where this Node Pool should exist. Changing this forces a new resource to be created. -* `enable_auto_scaling` - (Optional) Whether to enable [auto-scaler](https://docs.microsoft.com/azure/aks/cluster-autoscaler). +* `auto_scaling_enabled` - (Optional) Whether to enable [auto-scaler](https://docs.microsoft.com/azure/aks/cluster-autoscaler). -* `enable_host_encryption` - (Optional) Should the nodes in this Node Pool have host encryption enabled? Changing this forces a new resource to be created. +* `host_encryption_enabled` - (Optional) Should the nodes in this Node Pool have host encryption enabled? Changing this forces a new resource to be created. ~> **NOTE:** Additional fields must be configured depending on the value of this field - see below. -* `enable_node_public_ip` - (Optional) Should each node have a Public IP Address? Changing this forces a new resource to be created. +* `node_public_ip_enabled` - (Optional) Should each node have a Public IP Address? Changing this forces a new resource to be created. * `eviction_policy` - (Optional) The Eviction Policy which should be used for Virtual Machines within the Virtual Machine Scale Set powering this Node Pool. Possible values are `Deallocate` and `Delete`. Changing this forces a new resource to be created. @@ -106,7 +106,7 @@ The following arguments are supported: * `node_labels` - (Optional) A map of Kubernetes labels which should be applied to nodes in this Node Pool. -* `node_public_ip_prefix_id` - (Optional) Resource ID for the Public IP Addresses Prefix for the nodes in this Node Pool. `enable_node_public_ip` should be `true`. Changing this forces a new resource to be created. +* `node_public_ip_prefix_id` - (Optional) Resource ID for the Public IP Addresses Prefix for the nodes in this Node Pool. `node_public_ip_enabled` should be `true`. Changing this forces a new resource to be created. * `node_taints` - (Optional) A list of Kubernetes taints which should be applied to nodes in the agent pool (e.g `key=value:NoSchedule`). @@ -160,7 +160,7 @@ The following arguments are supported: --- -If `enable_auto_scaling` is set to `true`, then the following fields can also be configured: +If `auto_scaling_enabled` is set to `true`, then the following fields can also be configured: * `max_count` - (Optional) The maximum number of nodes which should exist within this Node Pool. Valid values are between `0` and `1000` and must be greater than or equal to `min_count`. @@ -170,7 +170,7 @@ If `enable_auto_scaling` is set to `true`, then the following fields can also be -> **NOTE:** If you're specifying an initial number of nodes you may wish to use [Terraform's `ignore_changes` functionality](https://www.terraform.io/language/meta-arguments/lifecycle#ignore_changess) to ignore changes to this field. -If `enable_auto_scaling` is set to `false`, then the following fields can also be configured: +If `auto_scaling_enabled` is set to `false`, then the following fields can also be configured: * `node_count` - (Optional) The number of nodes which should exist within this Node Pool. Valid values are between `0` and `1000` (inclusive) for user pools and between `1` and `1000` (inclusive) for system pools. diff --git a/website/docs/r/kubernetes_fleet_manager.html.markdown b/website/docs/r/kubernetes_fleet_manager.html.markdown index 86888e10a9c5f..e271953ddcb42 100644 --- a/website/docs/r/kubernetes_fleet_manager.html.markdown +++ b/website/docs/r/kubernetes_fleet_manager.html.markdown @@ -6,8 +6,6 @@ description: |- Manages a Kubernetes Fleet Manager. --- - - # azurerm_kubernetes_fleet_manager Manages a Kubernetes Fleet Manager. @@ -44,23 +42,6 @@ In addition to the Arguments listed above - the following Attributes are exporte * `id` - The ID of the Kubernetes Fleet Manager. ---- - -## Blocks Reference - -### `hub_profile` Block - - -The `hub_profile` block supports the following arguments: - -* `dns_prefix` - (Required) - - -In addition to the arguments defined above, the `hub_profile` block exports the following attributes: - -* `fqdn` - -* `kubernetes_version` - - ## Timeouts The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) for certain actions: diff --git a/website/docs/r/lab_service_lab.html.markdown b/website/docs/r/lab_service_lab.html.markdown deleted file mode 100644 index 32b53e229d0f3..0000000000000 --- a/website/docs/r/lab_service_lab.html.markdown +++ /dev/null @@ -1,239 +0,0 @@ ---- -subcategory: "Lab Service" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_lab_service_lab" -description: |- - Manages a Lab Service Lab. ---- - -# azurerm_lab_service_lab - -Manages a Lab Service Lab. - -!> **Note:** This resource is being [deprecated by Azure](https://learn.microsoft.com/en-us/azure/lab-services/retirement-guide). This resource will be removed in version 4.0 of the provider. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} - -resource "azurerm_lab_service_lab" "example" { - name = "example-lab" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - title = "Test Title" - - security { - open_access_enabled = false - } - - virtual_machine { - admin_user { - username = "testadmin" - password = "Password1234!" - } - - image_reference { - publisher = "Canonical" - offer = "0001-com-ubuntu-server-jammy" - sku = "22_04-lts" - version = "latest" - } - - sku { - name = "Classic_Fsv2_2_4GB_128_S_SSD" - capacity = 0 - } - } -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `name` - (Required) The name which should be used for this Lab Service Lab. Changing this forces a new resource to be created. - -* `resource_group_name` - (Required) The name of the Resource Group where the Lab Service Lab should exist. Changing this forces a new resource to be created. - -* `location` - (Required) The Azure Region where the Lab Service Lab should exist. Changing this forces a new resource to be created. - -* `connection_setting` - (Required) A `connection_setting` block as defined below. - -* `security` - (Required) A `security` block as defined below. - -* `title` - (Required) The title of the Lab Service Lab. - -* `virtual_machine` - (Required) A `virtual_machine` block as defined below. - -* `auto_shutdown` - (Optional) An `auto_shutdown` block as defined below. - -* `description` - (Optional) The description of the Lab Service Lab. - -* `lab_plan_id` - (Optional) The resource ID of the Lab Plan that is used during resource creation to provide defaults and acts as a permission container when creating a Lab Service Lab via `labs.azure.com`. - -* `network` - (Optional) A `network` block as defined below. - -* `roster` - (Optional) A `roster` block as defined below. - -* `tags` - (Optional) A mapping of tags which should be assigned to the Lab Service Lab. - ---- - -An `auto_shutdown` block supports the following: - -* `disconnect_delay` - (Optional) The amount of time a VM will stay running after a user disconnects if this behavior is enabled. This value must be formatted as an ISO 8601 string. - -~> **NOTE:** The `shutdownOnDisconnect` is `Disabled` when `disconnect_delay` isn't specified. - -* `idle_delay` - (Optional) The amount of time a VM will idle before it is shutdown if this behavior is enabled. This value must be formatted as an ISO 8601 string. - -* `no_connect_delay` - (Optional) The amount of time a VM will stay running before it is shutdown if no connection is made and this behavior is enabled. This value must be formatted as an ISO 8601 string. - -~> **NOTE:** The `shutdownWhenNotConnected` is `Disabled` when `no_connect_delay` isn't specified. - -* `shutdown_on_idle` - (Optional) A VM will get shutdown when it has idled for a period of time. Possible values are `LowUsage` and `UserAbsence`. - -~> **NOTE:** This property is `None` when it isn't specified. No need to set `idle_delay` when `shutdown_on_idle` isn't specified. - ---- - -A `connection_setting` block supports the following: - -* `client_rdp_access` - (Optional) The enabled access level for Client Access over RDP. Possible value is `Public`. - -~> **NOTE:** This property is `None` when it isn't specified. - -* `client_ssh_access` - (Optional) The enabled access level for Client Access over SSH. Possible value is `Public`. - -~> **NOTE:** This property is `None` when it isn't specified. - ---- - -A `security` block supports the following: - -* `open_access_enabled` - (Required) Is open access enabled to allow any user or only specified users to register to a Lab Service Lab? - ---- - -A `virtual_machine` block supports the following: - -* `admin_user` - (Required) An `admin_user` block as defined below. - -* `image_reference` - (Required) An `image_reference` block as defined below. - -* `sku` - (Required) A `sku` block as defined below. - -* `additional_capability_gpu_drivers_installed` - (Optional) Is flagged to pre-install dedicated GPU drivers? Defaults to `false`. Changing this forces a new resource to be created. - -* `create_option` - (Optional) The create option to indicate what Lab Service Lab VMs are created from. Possible values are `Image` and `TemplateVM`. Defaults to `Image`. Changing this forces a new resource to be created. - -* `non_admin_user` - (Optional) A `non_admin_user` block as defined below. - -* `shared_password_enabled` - (Optional) Is the shared password enabled with the same password for all user VMs? Defaults to `false`. Changing this forces a new resource to be created. - -* `usage_quota` - (Optional) The initial quota allocated to each Lab Service Lab user. Defaults to `PT0S`. This value must be formatted as an ISO 8601 string. - ---- - -An `admin_user` block supports the following: - -* `username` - (Required) The username to use when signing in to Lab Service Lab VMs. Changing this forces a new resource to be created. - -* `password` - (Required) The password for the Lab user. Changing this forces a new resource to be created. - ---- - -An `image_reference` block supports the following: - -* `id` - (Optional) The resource ID of the image. Changing this forces a new resource to be created. - -* `offer` - (Optional) The image offer if applicable. Changing this forces a new resource to be created. - -* `publisher` - (Optional) The image publisher. Changing this forces a new resource to be created. - -* `sku` - (Optional) The image SKU. Changing this forces a new resource to be created. - -* `version` - (Optional) The image version specified on creation. Changing this forces a new resource to be created. - ---- - -A `non_admin_user` block supports the following: - -* `username` - (Required) The username to use when signing in to Lab Service Lab VMs. - -* `password` - (Required) The password for the user. - ---- - -A `sku` block supports the following: - -* `name` - (Required) The name of the SKU. Changing this forces a new resource to be created. - -* `capacity` - (Required) The capacity for the SKU. Possible values are between `0` and `400`. - -~> **NOTE:** Once `active_directory_group_id` is enabled, `capacity` wouldn't take effect, and it would be automatically set to the number of members in AAD Group by service API. So it has to use `ignore_changes` to avoid the difference of tf plan. - ---- - -A `network` block supports the following: - -* `subnet_id` - (Optional) The resource ID of the Subnet for the network profile of the Lab Service Lab. - ---- - -A `roster` block supports the following: - -* `active_directory_group_id` - (Optional) The AAD group ID which this Lab Service Lab roster is populated from. - -* `lms_instance` - (Optional) The base URI identifying the lms instance. - -* `lti_client_id` - (Optional) The unique id of the Azure Lab Service tool in the lms. - -* `lti_context_id` - (Optional) The unique context identifier for the Lab Service Lab in the lms. - -* `lti_roster_endpoint` - (Optional) The URI of the names and roles service endpoint on the lms for the class attached to this Lab Service Lab. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Lab Service Lab. - -* `security` - A `security` block as defined below. - -* `network` - A `network` block as defined below. - ---- - -A `security` block supports the following: - -* `registration_code` - The registration code for the Lab Service Lab. - ---- - -A `network` block supports the following: - -* `load_balancer_id` - The resource ID of the Load Balancer for the network profile of the Lab Service Lab. - -* `public_ip_id` - The resource ID of the Public IP for the network profile of the Lab Service Lab. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) for certain actions: - -* `create` - (Defaults to 90 minutes) Used when creating the Lab Service Lab. -* `read` - (Defaults to 5 minutes) Used when retrieving the Lab Service Lab. -* `update` - (Defaults to 90 minutes) Used when updating the Lab Service Lab. -* `delete` - (Defaults to 90 minutes) Used when deleting the Lab Service Lab. - -## Import - -Lab Service Labs can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_lab_service_lab.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.LabServices/labs/lab1 -``` diff --git a/website/docs/r/lab_service_plan.html.markdown b/website/docs/r/lab_service_plan.html.markdown deleted file mode 100644 index 10e0dc9279e28..0000000000000 --- a/website/docs/r/lab_service_plan.html.markdown +++ /dev/null @@ -1,126 +0,0 @@ ---- -subcategory: "Lab Service" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_lab_service_plan" -description: |- - Manages a Lab Service Plan. ---- - -# azurerm_lab_service_plan - -Manages a Lab Service Plan. - -!> **Note:** This resource is being [deprecated by Azure](https://learn.microsoft.com/en-us/azure/lab-services/retirement-guide). This resource will be removed in version 4.0 of the provider. - --> **Note:** Before using this resource, it's required to submit the request of registering the provider with Azure CLI `az provider register --namespace Microsoft.LabServices`. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} - -resource "azurerm_lab_service_plan" "example" { - name = "example-lp" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - allowed_regions = [azurerm_resource_group.example.location] -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `name` - (Required) The name of the Lab Service Plan. Changing this forces a new resource to be created. - -* `resource_group_name` - (Required) The name of the Resource Group where the Lab Service Plan should exist. Changing this forces a new resource to be created. - -* `location` - (Required) The Azure Region where the Lab Service Plan should exist. Changing this forces a new resource to be created. - -* `allowed_regions` - (Required) The allowed regions for the lab creator to use when creating labs using this Lab Service Plan. The allowed region's count must be between `1` and `28`. - -* `default_auto_shutdown` - (Optional) A `default_auto_shutdown` block as defined below. - -* `default_connection` - (Optional) A `default_connection` block as defined below. - -* `default_network_subnet_id` - (Optional) The resource ID of the Subnet for the Lab Service Plan network profile. - -* `shared_gallery_id` - (Optional) The resource ID of the Shared Image Gallery attached to this Lab Service Plan. When saving a lab template virtual machine image it will be persisted in this gallery. The shared images from the gallery can be made available to use when creating new labs. - -~> **NOTE:** The built-in `Azure Lab Services` Service Principal with role needs to be assigned to the Shared Image Gallery while using this property. - -* `support` - (Optional) A `support` block as defined below. - -* `tags` - (Optional) A mapping of tags which should be assigned to the Lab Service Plan. - ---- - -A `default_auto_shutdown` block supports the following: - -* `disconnect_delay` - (Optional) The amount of time a VM will stay running after a user disconnects if this behavior is enabled. This value must be formatted as an ISO 8601 string. - -* `idle_delay` - (Optional) The amount of time a VM will idle before it is shutdown if this behavior is enabled. This value must be formatted as an ISO 8601 string. - -* `no_connect_delay` - (Optional) The amount of time a VM will stay running before it is shutdown if no connection is made and this behavior is enabled. This value must be formatted as an ISO 8601 string. - -* `shutdown_on_idle` - (Optional) Will a VM get shutdown when it has idled for a period of time? Possible values are `LowUsage` and `UserAbsence`. - -~> **NOTE:** This property is `None` when it isn't specified. No need to set `idle_delay` when `shutdown_on_idle` isn't specified. - ---- - -A `default_connection` block supports the following: - -* `client_rdp_access` - (Optional) The enabled access level for Client Access over RDP. Possible values are `Private` and `Public`. - -~> **NOTE:** This property is `None` when it isn't specified. - -* `client_ssh_access` - (Optional) The enabled access level for Client Access over SSH. Possible values are `Private` and `Public`. - -~> **NOTE:** This property is `None` when it isn't specified. - -* `web_rdp_access` - (Optional) The enabled access level for Web Access over RDP. Possible values are `Private` and `Public`. - -~> **NOTE:** This property is `None` when it isn't specified. - -* `web_ssh_access` - (Optional) The enabled access level for Web Access over SSH. Possible values are `Private` and `Public`. - -~> **NOTE:** This property is `None` when it isn't specified. - ---- - -A `support` block supports the following: - -* `email` - (Optional) The email address for the support contact. - -* `instructions` - (Optional) The instructions for users of the Lab Service Plan. - -* `phone` - (Optional) The phone number for the support contact. - -* `url` - (Optional) The web address for users of the Lab Service Plan. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Lab Service Plan. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Lab Service Plan. -* `read` - (Defaults to 5 minutes) Used when retrieving the Lab Service Plan. -* `update` - (Defaults to 30 minutes) Used when updating the Lab Service Plan. -* `delete` - (Defaults to 30 minutes) Used when deleting the Lab Service Plan. - -## Import - -Lab Service Plans can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_lab_service_plan.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.LabServices/labPlans/labPlan1 -``` diff --git a/website/docs/r/lab_service_schedule.html.markdown b/website/docs/r/lab_service_schedule.html.markdown deleted file mode 100644 index 5e769c0958afa..0000000000000 --- a/website/docs/r/lab_service_schedule.html.markdown +++ /dev/null @@ -1,112 +0,0 @@ ---- -subcategory: "Lab Service" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_lab_service_schedule" -description: |- - Manages a Lab Service Schedule. ---- - -# azurerm_lab_service_schedule - -Manages a Lab Service Schedule. - -!> **Note:** This resource is being [deprecated by Azure](https://learn.microsoft.com/en-us/azure/lab-services/retirement-guide). This resource will be removed in version 4.0 of the provider. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} - -resource "azurerm_lab_service_lab" "example" { - name = "example-lab" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - title = "Test Title" - - security { - open_access_enabled = false - } - - virtual_machine { - admin_user { - username = "testadmin" - password = "Password1234!" - } - - image_reference { - publisher = "Canonical" - offer = "0001-com-ubuntu-server-jammy" - sku = "22_04-lts" - version = "latest" - } - - sku { - name = "Classic_Fsv2_2_4GB_128_S_SSD" - capacity = 1 - } - } -} - -resource "azurerm_lab_service_schedule" "example" { - name = "example-labschedule" - lab_id = azurerm_lab_service_lab.example.id - stop_time = "2022-11-28T00:00:00Z" - time_zone = "America/Los_Angeles" -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `name` - (Required) The name which should be used for this Lab Service Schedule. Changing this forces a new resource to be created. - -* `lab_id` - (Required) The resource ID of the Lab Service Schedule. Changing this forces a new resource to be created. - -* `stop_time` - (Required) When Lab User Virtual Machines will be stopped in RFC-3339 format. - -* `time_zone` - (Required) The IANA Time Zone ID for the Schedule. - -* `notes` - (Optional) The notes for the Schedule. - -* `recurrence` - (Optional) A `recurrence` block as defined below. - -* `start_time` - (Optional) When Lab User Virtual Machines will be started in RFC-3339 format. - ---- - -A `recurrence` block supports the following: - -* `expiration_date` - (Required) When the recurrence will expire in RFC-3339 format. - -* `frequency` - (Required) The frequency of the recurrence. Possible values are `Daily` and `Weekly`. - -* `interval` - (Optional) The interval to invoke the schedule on. Possible values are between `1` and `365`. - -* `week_days` - (Optional) The interval to invoke the schedule on. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` and `Saturday`. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Lab Service Schedule. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Lab Service Schedule. -* `read` - (Defaults to 5 minutes) Used when retrieving the Lab Service Schedule. -* `update` - (Defaults to 30 minutes) Used when updating the Lab Service Schedule. -* `delete` - (Defaults to 30 minutes) Used when deleting the Lab Service Schedule. - -## Import - -Lab Service Schedules can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_lab_service_schedule.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.LabServices/labs/lab1/schedules/schedule1 -``` diff --git a/website/docs/r/lab_service_user.html.markdown b/website/docs/r/lab_service_user.html.markdown deleted file mode 100644 index 8d22c0c02790a..0000000000000 --- a/website/docs/r/lab_service_user.html.markdown +++ /dev/null @@ -1,93 +0,0 @@ ---- -subcategory: "Lab Service" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_lab_service_user" -description: |- - Manages a Lab Service User. ---- - -# azurerm_lab_service_user - -Manages a Lab Service User. - -!> **Note:** This resource is being [deprecated by Azure](https://learn.microsoft.com/en-us/azure/lab-services/retirement-guide). This resource will be removed in version 4.0 of the provider. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} - -resource "azurerm_lab_service_lab" "example" { - name = "example-lab" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - title = "Test Title" - - security { - open_access_enabled = false - } - - virtual_machine { - admin_user { - username = "testadmin" - password = "Password1234!" - } - - image_reference { - publisher = "Canonical" - offer = "0001-com-ubuntu-server-jammy" - sku = "22_04-lts" - version = "latest" - } - - sku { - name = "Classic_Fsv2_2_4GB_128_S_SSD" - capacity = 1 - } - } -} - -resource "azurerm_lab_service_user" "example" { - name = "example-labuser" - lab_id = azurerm_lab_service_lab.example.id - email = "terraform-acctest@hashicorp.com" -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `name` - (Required) The name which should be used for this Lab Service User. Changing this forces a new resource to be created. - -* `lab_id` - (Required) The resource ID of the Lab Service Lab. Changing this forces a new resource to be created. - -* `email` - (Required) The email address of the Lab Service User. Changing this forces a new resource to be created. - -* `additional_usage_quota` - (Optional) The amount of usage quota time the Lab Service User gets in addition to the lab usage quota. Defaults to `PT0S`. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Lab Service User. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Lab Service User. -* `read` - (Defaults to 5 minutes) Used when retrieving the Lab Service User. -* `update` - (Defaults to 30 minutes) Used when updating the Lab Service User. -* `delete` - (Defaults to 30 minutes) Used when deleting the Lab Service User. - -## Import - -Lab Service Users can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_lab_service_user.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.LabServices/labs/lab1/users/user1 -``` diff --git a/website/docs/r/lb.html.markdown b/website/docs/r/lb.html.markdown index 5880fc804e2d1..a4dde32a8ac2d 100644 --- a/website/docs/r/lb.html.markdown +++ b/website/docs/r/lb.html.markdown @@ -53,11 +53,12 @@ The following arguments are supported: * `frontend_ip_configuration` - (Optional) One or more `frontend_ip_configuration` blocks as documented below. -* `sku` - (Optional) The SKU of the Azure Load Balancer. Accepted values are `Basic`, `Standard` and `Gateway`. Defaults to `Basic`. Changing this forces a new resource to be created. +* `sku` - (Optional) The SKU of the Azure Load Balancer. Accepted values are `Basic`, `Standard` and `Gateway`. Defaults to `Standard`. Changing this forces a new resource to be created. -> **NOTE:** The `Microsoft.Network/AllowGatewayLoadBalancer` feature is required to be registered in order to use the `Gateway` SKU. The feature can only be registered by the Azure service team, please submit an [Azure support ticket](https://azure.microsoft.com/en-us/support/create-ticket/) for that. * `sku_tier` - (Optional) `sku_tier` - (Optional) The SKU tier of this Load Balancer. Possible values are `Global` and `Regional`. Defaults to `Regional`. Changing this forces a new resource to be created. + * `tags` - (Optional) A mapping of tags to assign to the resource. --- diff --git a/website/docs/r/linux_virtual_machine.html.markdown b/website/docs/r/linux_virtual_machine.html.markdown index e4518f2e9a7a7..9a6128b0cf0b7 100644 --- a/website/docs/r/linux_virtual_machine.html.markdown +++ b/website/docs/r/linux_virtual_machine.html.markdown @@ -240,7 +240,7 @@ A `additional_capabilities` block supports the following: A `admin_ssh_key` block supports the following: -* `public_key` - (Required) The Public Key which should be used for authentication, which needs to be at least 2048-bit and in `ssh-rsa` format. Changing this forces a new resource to be created. +* `public_key` - (Required) The Public Key which should be used for authentication, which needs to be in `ssh-rsa` format with at least 2048-bit or in `ssh-ed25519` format. Changing this forces a new resource to be created. * `username` - (Required) The Username for which this Public SSH Key should be configured. Changing this forces a new resource to be created. diff --git a/website/docs/r/linux_virtual_machine_scale_set.html.markdown b/website/docs/r/linux_virtual_machine_scale_set.html.markdown index 10758be3293c6..767e1f56948a1 100644 --- a/website/docs/r/linux_virtual_machine_scale_set.html.markdown +++ b/website/docs/r/linux_virtual_machine_scale_set.html.markdown @@ -218,10 +218,6 @@ resource "azurerm_linux_virtual_machine_scale_set" "example" { * `tags` - (Optional) A mapping of tags which should be assigned to this Virtual Machine Scale Set. -* `terminate_notification` - (Optional) A `terminate_notification` block as defined below. - --> **Note:** This property has been deprecated in favour of the `termination_notification` property and will be removed in version 4.0 of the provider. - * `termination_notification` - (Optional) A `termination_notification` block as defined below. * `upgrade_mode` - (Optional) Specifies how Upgrades (e.g. changing the Image/SKU) should be performed to Virtual Machine Instances. Possible values are `Automatic`, `Manual` and `Rolling`. Defaults to `Manual`. Changing this forces a new resource to be created. @@ -236,7 +232,9 @@ resource "azurerm_linux_virtual_machine_scale_set" "example" { -> **Note:** This can only be set to `true` when one or more `zones` are configured. -* `zones` - (Optional) Specifies a list of Availability Zones in which this Linux Virtual Machine Scale Set should be located. Changing this forces a new Linux Virtual Machine Scale Set to be created. +* `zones` - (Optional) Specifies a list of Availability Zones in which this Linux Virtual Machine Scale Set should be located. + +-> **Note:** Updating `zones` to remove an existing zone forces a new Virtual Machine Scale Set to be created. --- @@ -248,7 +246,7 @@ An `additional_capabilities` block supports the following: An `admin_ssh_key` block supports the following: -* `public_key` - (Required) The Public Key which should be used for authentication, which needs to be at least 2048-bit and in `ssh-rsa` format. +* `public_key` - (Required) The Public Key which should be used for authentication, which needs to be in `ssh-rsa` format with at least 2048-bit or in `ssh-ed25519` format. * `username` - (Required) The Username for which this Public SSH Key should be configured. @@ -562,16 +560,6 @@ A `secret` block supports the following: --- -A `terminate_notification` block supports the following: - -* `enabled` - (Required) Should the terminate notification be enabled on this Virtual Machine Scale Set? - -* `timeout` - (Optional) Length of time (in minutes, between 5 and 15) a notification to be sent to the VM on the instance metadata server till the VM gets deleted. The time duration should be specified in ISO 8601 format. Defaults to `PT5M`. - --> **Note:** For more information about the terminate notification, please [refer to this doc](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-terminate-notification). - ---- - A `termination_notification` block supports the following: * `enabled` - (Required) Should the termination notification be enabled on this Virtual Machine Scale Set? diff --git a/website/docs/r/linux_web_app.html.markdown b/website/docs/r/linux_web_app.html.markdown index 58ec9e0ba13ff..a4a3b4cf6cf4e 100644 --- a/website/docs/r/linux_web_app.html.markdown +++ b/website/docs/r/linux_web_app.html.markdown @@ -692,8 +692,6 @@ A `site_config` block supports the following: * `application_stack` - (Optional) A `application_stack` block as defined above. -* `auto_heal_enabled` - (Optional) Should Auto heal rules be enabled? Required with `auto_heal_setting`. - * `auto_heal_setting` - (Optional) A `auto_heal_setting` block as defined above. Required with `auto_heal`. * `container_registry_managed_identity_client_id` - (Optional) The Client ID of the Managed Service Identity to use for connections to the Azure Container Registry. @@ -756,10 +754,6 @@ A `slow_request` block supports the following: * `time_taken` - (Required) The threshold of time passed to qualify as a Slow Request in `hh:mm:ss`. -* `path` - (Optional) The path for which this slow request rule applies. - -~> **NOTE:** `path` in `slow_request` block will be deprecated in 4.0 provider. Please use `slow_request_with_path` to set a slow request trigger with path specified. - --- A `slow_request_with_path` block supports the following: diff --git a/website/docs/r/linux_web_app_slot.html.markdown b/website/docs/r/linux_web_app_slot.html.markdown index f52c6b858e8ef..b1b38a7020ab9 100644 --- a/website/docs/r/linux_web_app_slot.html.markdown +++ b/website/docs/r/linux_web_app_slot.html.markdown @@ -692,8 +692,6 @@ A `site_config` block supports the following: * `application_stack` - (Optional) A `application_stack` block as defined above. -* `auto_heal_enabled` - (Optional) Should Auto heal rules be enabled? Required with `auto_heal_setting`. - * `auto_heal_setting` - (Optional) A `auto_heal_setting` block as defined above. Required with `auto_heal`. * `auto_swap_slot_name` - (Optional) The Linux Web App Slot Name to automatically swap to when deployment to that slot is successfully completed. diff --git a/website/docs/r/log_analytics_cluster.html.markdown b/website/docs/r/log_analytics_cluster.html.markdown index 154181454c257..71f5a4d534cd7 100644 --- a/website/docs/r/log_analytics_cluster.html.markdown +++ b/website/docs/r/log_analytics_cluster.html.markdown @@ -47,7 +47,7 @@ The following arguments are supported: * `identity` - (Required) An `identity` block as defined below. Changing this forces a new Log Analytics Cluster to be created. -* `size_gb` - (Optional) The capacity of the Log Analytics Cluster is specified in GB/day. Possible values include `100`, `500`, `1000`, `2000` or `5000`. Defaults to `1000`. +* `size_gb` - (Optional) The capacity of the Log Analytics Cluster is specified in GB/day. Possible values include `100`, `500`, `1000`, `2000` or `5000`. Defaults to `100`. ~> **NOTE:** The cluster capacity must start at 100 GB and can be set to 500, 1000, 2000 or 5000 GB/day. For more information on cluster costs, see [Dedicated clusters](https://docs.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#dedicated-clusters). In v3.x the default value is `1000` GB, in v4.0 of the provider this will default to `100` GB. diff --git a/website/docs/r/log_analytics_linked_storage_account.html.markdown b/website/docs/r/log_analytics_linked_storage_account.html.markdown index 46376faa52a9a..7a00799a84bbf 100644 --- a/website/docs/r/log_analytics_linked_storage_account.html.markdown +++ b/website/docs/r/log_analytics_linked_storage_account.html.markdown @@ -47,8 +47,6 @@ The following arguments are supported: * `data_source_type` - (Required) The data source type which should be used for this Log Analytics Linked Storage Account. Possible values are `CustomLogs`, `AzureWatson`, `Query`, `Ingestion` and `Alerts`. Changing this forces a new Log Analytics Linked Storage Account to be created. -> **Note:** The `data_source_type` is case-insensitive in current 3.x version. And in 4.0 or later versions, Case-sensitivity will be required. - * `resource_group_name` - (Required) The name of the Resource Group where the Log Analytics Linked Storage Account should exist. Changing this forces a new Log Analytics Linked Storage Account to be created. * `workspace_resource_id` - (Required) The resource ID of the Log Analytics Workspace. Changing this forces a new Log Analytics Linked Storage Account to be created. diff --git a/website/docs/r/log_analytics_workspace_table.html.markdown b/website/docs/r/log_analytics_workspace_table.html.markdown index 3ac000b01f92c..17089b4fc0204 100644 --- a/website/docs/r/log_analytics_workspace_table.html.markdown +++ b/website/docs/r/log_analytics_workspace_table.html.markdown @@ -46,9 +46,9 @@ The following arguments are supported: -> **Note:** The `name` of tables currently supported by the `Basic` plan can be found [here](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/basic-logs-configure?tabs=portal-1#supported-tables). -* `retention_in_days` - (Optional) The table's retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730. +* `retention_in_days` - (Optional) The table's retention in days. Possible values are either `8` (Basic Tier only) or range between `4` and `730`. -* `total_retention_in_days` - (Optional) The table's total retention in days. Possible values range between 30 and 4383. +* `total_retention_in_days` - (Optional) The table's total retention in days. Possible values range between `4` and `730`; or `1095`, `1460`, `1826`, `2191`, `2556`, `2922`, `3288`, `3653`, `4018`, or `4383`. -> **Note:** `retention_in_days` and `total_retention_in_days` will revert back to the value of azurerm_log_analytics_workspace retention_in_days when a azurerm_log_analytics_workspace_table is deleted. diff --git a/website/docs/r/logic_app_standard.html.markdown b/website/docs/r/logic_app_standard.html.markdown index 34e2df730e40a..f3343f2d5bd1d 100644 --- a/website/docs/r/logic_app_standard.html.markdown +++ b/website/docs/r/logic_app_standard.html.markdown @@ -151,7 +151,7 @@ The following arguments are supported: ~> **Note:** When using an App Service Plan in the `Free` or `Shared` Tiers `use_32_bit_worker_process` must be set to `true`. -* `version` - (Optional) The runtime version associated with the Logic App. Defaults to `~3`. +* `version` - (Optional) The runtime version associated with the Logic App. Defaults to `~4`. ~> **Note:** Logic App version `3.x` will be out of support from December 3 2022. For more details refer [Logic Apps Standard Support for Functions Runtime V4](https://azure.microsoft.com/en-us/updates/logic-apps-standard-support-for-functions-runtime-v4/) diff --git a/website/docs/r/logz_monitor.html.markdown b/website/docs/r/logz_monitor.html.markdown deleted file mode 100644 index 17503c73067ce..0000000000000 --- a/website/docs/r/logz_monitor.html.markdown +++ /dev/null @@ -1,119 +0,0 @@ ---- -subcategory: "Logz" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_logz_monitor" -description: |- - Manages a logz Monitor. ---- - -# azurerm_logz_monitor - -Manages a logz Monitor. - -!> **Note:** Logz REST API is being deprecated by Azure and new resources cannot be created. This resource will be removed in version 4.0 of the provider. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-logz" - location = "West Europe" -} - -resource "azurerm_logz_monitor" "example" { - name = "example-monitor" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - plan { - billing_cycle = "MONTHLY" - effective_date = "2022-06-06T00:00:00Z" - usage_type = "COMMITTED" - } - - user { - email = "user@example.com" - first_name = "Example" - last_name = "User" - phone_number = "+12313803556" - } -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `name` - (Required) The name which should be used for this logz Monitor. Changing this forces a new logz Monitor to be created. - -* `resource_group_name` - (Required) The name of the Resource Group where the logz Monitor should exist. Changing this forces a new logz Monitor to be created. - -* `location` - (Required) The Azure Region where the logz Monitor should exist. Changing this forces a new logz Monitor to be created. - -* `plan` - (Required) A `plan` block as defined below. Changing this forces a new resource to be created. - -* `user` - (Required) A `user` block as defined below. Changing this forces a new resource to be created. - ---- - -* `company_name` - (Optional) Name of the Logz organization. Changing this forces a new logz Monitor to be created. - -* `enterprise_app_id` - (Optional) The ID of the Enterprise App. Changing this forces a new logz Monitor to be created. - -~> **NOTE** Please follow [Set up Logz.io single sign-on](https://docs.microsoft.com/azure/partner-solutions/logzio/setup-sso) to create the ID of the Enterprise App. - -* `enabled` - (Optional) Whether the resource monitoring is enabled? Defaults to `true`. - -* `tags` - (Optional) A mapping of tags which should be assigned to the logz Monitor. - ---- - -An `plan` block exports the following: - -* `billing_cycle` - (Required) Different billing cycles. Possible values are `MONTHLY` or `WEEKLY`. Changing this forces a new logz Monitor to be created. - -* `effective_date` - (Required) Date when plan was applied. Changing this forces a new logz Monitor to be created. - -* `usage_type` - (Required) Different usage types. Possible values are `PAYG` or `COMMITTED`. Changing this forces a new logz Monitor to be created. - -* `plan_id` - (Optional) Plan id as published by Logz. The only possible value is `100gb14days`. Defaults to `100gb14days`. Changing this forces a new logz Monitor to be created. - ---- - -An `user` block exports the following: - -* `email` - (Required) Email of the user used by Logz for contacting them if needed. Changing this forces a new logz Monitor to be created. - -~> **NOTE** If you use the Azure CLI to authenticate to Azure, the Email of your Azure account needs to be granted the admin permission in your Logz.io account. Otherwise, you may not be able to delete this resource. There is no such limitation for the Service Principal authentication. - -* `first_name` - (Required) First Name of the user. Changing this forces a new logz Monitor to be created. - -* `last_name` - (Required) Last Name of the user. Changing this forces a new logz Monitor to be created. - -* `phone_number` - (Required) Phone number of the user used by Logz for contacting them if needed. Changing this forces a new logz Monitor to be created. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the logz Monitor. - -* `single_sign_on_url` - The single sign on url associated with the logz organization of this logz Monitor. - -* `logz_organization_id` - The ID associated with the logz organization of this logz Monitor. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the logz Monitor. -* `read` - (Defaults to 5 minutes) Used when retrieving the logz Monitor. -* `update` - (Defaults to 30 minutes) Used when updating the logz Monitor. -* `delete` - (Defaults to 30 minutes) Used when deleting the logz Monitor. - -## Import - -logz Monitors can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_logz_monitor.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Logz/monitors/monitor1 -``` diff --git a/website/docs/r/logz_sub_account.html.markdown b/website/docs/r/logz_sub_account.html.markdown deleted file mode 100644 index 02f0bb6a8249a..0000000000000 --- a/website/docs/r/logz_sub_account.html.markdown +++ /dev/null @@ -1,105 +0,0 @@ ---- -subcategory: "Logz" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_logz_sub_account" -description: |- - Manages a logz Sub Account. ---- - -# azurerm_logz_sub_account - -Manages a logz Sub Account. - -!> **Note:** Logz REST API is being deprecated by Azure and new resources cannot be created. This resource will be removed in version 4.0 of the provider. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-logz" - location = "West Europe" -} - -resource "azurerm_logz_monitor" "example" { - name = "example-monitor" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - plan { - billing_cycle = "MONTHLY" - effective_date = "2022-06-06T00:00:00Z" - usage_type = "COMMITTED" - } - - user { - email = "user@example.com" - first_name = "Example" - last_name = "User" - phone_number = "+12313803556" - } -} - -resource "azurerm_logz_sub_account" "example" { - name = "example-subaccount" - logz_monitor_id = azurerm_logz_monitor.example.id - - user { - email = azurerm_logz_monitor.example.user[0].email - first_name = azurerm_logz_monitor.example.user[0].first_name - last_name = azurerm_logz_monitor.example.user[0].last_name - phone_number = azurerm_logz_monitor.example.user[0].phone_number - } -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `name` - (Required) The name which should be used for this logz Sub Account. Possible values must be between 1 and 32 characters in length and may contain only letters, numbers, hyphens and underscores. Changing this forces a new logz Sub Account to be created. - -* `logz_monitor_id` - (Required) The ID of the Logz Monitor. Changing this forces a new logz Sub Account to be created. - -* `user` - (Required) A `user` block as defined below. Changing this forces a new resource to be created. - ---- - -* `enabled` - (Optional) Whether the resource monitoring is enabled? Defaults to `true`. - -* `tags` - (Optional) A mapping of tags which should be assigned to the logz Sub Account. - ---- - -An `user` block exports the following: - -* `email` - (Required) Email of the user used by Logz for contacting them if needed. A valid email address consists of an email prefix and an email domain. The prefix and domain may contain only letters, numbers, underscores, periods and dashes. Changing this forces a new logz Sub Account to be created. - -~> **NOTE** If you use the Azure CLI to authenticate to Azure, the Email of your Azure account needs to be granted the admin permission in your Logz.io account. Otherwise, you may not be able to delete this resource. There is no such limitation for the Service Principal authentication. - -* `first_name` - (Required) First Name of the user. Possible values must be between 1 and 50 characters in length. Changing this forces a new logz Sub Account to be created. - -* `last_name` - (Required) Last Name of the user. Possible values must be between 1 and 50 characters in length. Changing this forces a new logz Sub Account to be created. - -* `phone_number` - (Required) Phone number of the user used by Logz for contacting them if needed. Possible values must be between 1 and 40 characters in length. Changing this forces a new logz Sub Account to be created. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the logz Sub Account. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the logz Sub Account. -* `read` - (Defaults to 5 minutes) Used when retrieving the logz Sub Account. -* `update` - (Defaults to 30 minutes) Used when updating the logz Sub Account. -* `delete` - (Defaults to 30 minutes) Used when deleting the logz Sub Account. - -## Import - -logz SubAccounts can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_logz_sub_account.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Logz/monitors/monitor1/accounts/subAccount1 -``` diff --git a/website/docs/r/logz_sub_account_tag_rule.html.markdown b/website/docs/r/logz_sub_account_tag_rule.html.markdown deleted file mode 100644 index 51fc8e06afbff..0000000000000 --- a/website/docs/r/logz_sub_account_tag_rule.html.markdown +++ /dev/null @@ -1,120 +0,0 @@ ---- -subcategory: "Logz" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_logz_sub_account_tag_rule" -description: |- - Manages a Logz Sub Account Tag Rule. ---- - -# azurerm_logz_sub_account_tag_rule - -Manages a Logz Sub Account Tag Rule. - -!> **Note:** Logz REST API is being deprecated by Azure and new resources cannot be created. This resource will be removed in version 4.0 of the provider. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-logz" - location = "West Europe" -} - -resource "azurerm_logz_monitor" "example" { - name = "example-monitor" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - plan { - billing_cycle = "MONTHLY" - effective_date = "2022-06-06T00:00:00Z" - usage_type = "COMMITTED" - } - - user { - email = "user@example.com" - first_name = "Example" - last_name = "User" - phone_number = "+12313803556" - } -} - -resource "azurerm_logz_sub_account" "example" { - name = "example-subaccount" - logz_monitor_id = azurerm_logz_monitor.example.id - - user { - email = azurerm_logz_monitor.example.user[0].email - first_name = azurerm_logz_monitor.example.user[0].first_name - last_name = azurerm_logz_monitor.example.user[0].last_name - phone_number = azurerm_logz_monitor.example.user[0].phone_number - } -} - -resource "azurerm_logz_sub_account_tag_rule" "example" { - logz_sub_account_id = azurerm_logz_sub_account.example.id - send_aad_logs = true - send_activity_logs = true - send_subscription_logs = true - - tag_filter { - name = "name1" - action = "Include" - value = "value1" - } - - tag_filter { - name = "name2" - action = "Exclude" - value = "value2" - } -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `logz_sub_account_id` - (Required) The ID of the Logz Sub Account. Changing this forces a new Logz Sub Account Tag Rule to be created. - ---- - -* `tag_filter` - (Optional) One or more (up to 10) `tag_filter` blocks as defined below. - -* `send_aad_logs` - (Optional) Whether AAD logs should be sent to the Monitor resource? - -* `send_activity_logs` - (Optional) Whether activity logs from this Logz Sub Account Tag Rule should be sent to the Monitor resource? - -* `send_subscription_logs` - (Optional) Whether subscription logs should be sent to the Monitor resource? - ---- - -An `tag_filter` block exports the following: - -* `name` - (Required) The name of the tag to match. - -* `action` - (Required) The action is used to limit logs collection to include or exclude Azure resources with specific tags. Possible values are `Include` and `Exclude`. Note that the `Exclude` takes priority over the `Include`. - -* `value` - (Optional) The value of the tag to match. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Logz Sub Account Tag Rule. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Logz Sub Account Tag Rule. -* `read` - (Defaults to 5 minutes) Used when retrieving the Logz Sub Account Tag Rule. -* `update` - (Defaults to 30 minutes) Used when updating the Logz Sub Account Tag Rule. -* `delete` - (Defaults to 30 minutes) Used when deleting the Logz Sub Account Tag Rule. - -## Import - -Logz Sub Account Tag Rules can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_logz_sub_account_tag_rule.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Logz/monitors/monitor1/accounts/subAccount1/tagRules/ruleSet1 -``` diff --git a/website/docs/r/logz_tag_rule.html.markdown b/website/docs/r/logz_tag_rule.html.markdown deleted file mode 100644 index 39ffe6c1509aa..0000000000000 --- a/website/docs/r/logz_tag_rule.html.markdown +++ /dev/null @@ -1,107 +0,0 @@ ---- -subcategory: "Logz" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_logz_tag_rule" -description: |- - Manages a logz Tag Rule. ---- - -# azurerm_logz_tag_rule - -Manages a logz Tag Rule. - -!> **Note:** Logz REST API is being deprecated by Azure and new resources cannot be created. This resource will be removed in version 4.0 of the provider. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-logz" - location = "West Europe" -} - -resource "azurerm_logz_monitor" "example" { - name = "example-monitor" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - plan { - billing_cycle = "MONTHLY" - effective_date = "2022-06-06T00:00:00Z" - usage_type = "COMMITTED" - } - - user { - email = "user@example.com" - first_name = "Example" - last_name = "User" - phone_number = "+12313803556" - } -} - -resource "azurerm_logz_tag_rule" "example" { - logz_monitor_id = azurerm_logz_monitor.example.id - tag_filter { - name = "name1" - action = "Include" - value = "value1" - } - - tag_filter { - name = "name2" - action = "Exclude" - value = "value2" - } - send_aad_logs = true - send_activity_logs = true - send_subscription_logs = true -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `logz_monitor_id` - (Required) The ID of the Logz Monitor. Changing this forces a new logz Tag Rule to be created. - ---- - -* `tag_filter` - (Optional) One or more (up to 10) `tag_filter` blocks as defined below. - -* `send_aad_logs` - (Optional) Whether AAD logs should be sent to the Monitor resource? - -* `send_activity_logs` - (Optional) Whether activity logs from Azure resources should be sent to the Monitor resource? - -* `send_subscription_logs` - (Optional) Whether subscription logs should be sent to the Monitor resource? - ---- - -An `tag_filter` block exports the following: - -* `name` - (Required) The name of this `tag_filter`. - -* `action` - (Required) The action for a filtering tag. Possible values are `Include` and `Exclude` is allowed. Note that the `Exclude` takes priority over the `Include`. - -* `value` - (Optional) The value of this `tag_filter`. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the logz Tag Rule. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the logz Tag Rule. -* `read` - (Defaults to 5 minutes) Used when retrieving the logz Tag Rule. -* `update` - (Defaults to 30 minutes) Used when updating the logz Tag Rule. -* `delete` - (Defaults to 30 minutes) Used when deleting the logz Tag Rule. - -## Import - -logz Tag Rules can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_logz_tag_rule.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Logz/monitors/monitor1/tagRules/ruleSet1 -``` diff --git a/website/docs/r/machine_learning_compute_cluster.html.markdown b/website/docs/r/machine_learning_compute_cluster.html.markdown index 1128e7057462e..90f6e2eb2cdd1 100644 --- a/website/docs/r/machine_learning_compute_cluster.html.markdown +++ b/website/docs/r/machine_learning_compute_cluster.html.markdown @@ -125,7 +125,7 @@ The following arguments are supported: * `node_public_ip_enabled` - (Optional) Whether the compute cluster will have a public ip. To set this to false a `subnet_resource_id` needs to be set. Defaults to `true`. Changing this forces a new Machine Learning Compute Cluster to be created. -* `ssh_public_access_enabled` - (Optional) A boolean value indicating whether enable the public SSH port. Changing this forces a new Machine Learning Compute Cluster to be created. +* `ssh_public_access_enabled` - (Optional) A boolean value indicating whether enable the public SSH port. Defaults to `false`. Changing this forces a new Machine Learning Compute Cluster to be created. * `subnet_resource_id` - (Optional) The ID of the Subnet that the Compute Cluster should reside in. Changing this forces a new Machine Learning Compute Cluster to be created. diff --git a/website/docs/r/machine_learning_compute_instance.html.markdown b/website/docs/r/machine_learning_compute_instance.html.markdown index 6b8c2aa751143..ce8f89dc1a4df 100644 --- a/website/docs/r/machine_learning_compute_instance.html.markdown +++ b/website/docs/r/machine_learning_compute_instance.html.markdown @@ -104,10 +104,6 @@ The following arguments are supported: --- -* `location` - (Optional) The Azure Region where the Machine Learning Compute Instance should exist. - --> **Note:** The `location` field is not supported for Machine Learning Compute Instances and has no effect so as such will be removed in v4.0 of the AzureRM provider. For more information, please see the product [documentation](https://learn.microsoft.com/azure/machine-learning/how-to-create-attach-compute-cluster?view=azureml-api-2&tabs=python). - * `authorization_type` - (Optional) The Compute Instance Authorization type. Possible values include: `personal`. Changing this forces a new Machine Learning Compute Instance to be created. * `assign_to_user` - (Optional) A `assign_to_user` block as defined below. A user explicitly assigned to a personal compute instance. Changing this forces a new Machine Learning Compute Instance to be created. diff --git a/website/docs/r/machine_learning_workspace.html.markdown b/website/docs/r/machine_learning_workspace.html.markdown index a11d26a1be3e0..d0222ef0242cb 100644 --- a/website/docs/r/machine_learning_workspace.html.markdown +++ b/website/docs/r/machine_learning_workspace.html.markdown @@ -364,9 +364,7 @@ The following arguments are supported: -> **NOTE:** The `admin_enabled` should be `true` in order to associate the Container Registry to this Machine Learning Workspace. -* `public_access_behind_virtual_network_enabled` - (Optional) Enable public access when this Machine Learning Workspace is behind a VNet. Changing this forces a new resource to be created. - -* `public_network_access_enabled` - (Optional) Enable public access when this Machine Learning Workspace is behind VNet. +* `public_network_access_enabled` - (Optional) Enable public access when this Machine Learning Workspace is behind VNet. Defaults to `true`. ~> **NOTE:** `public_access_behind_virtual_network_enabled` is deprecated and will be removed in favour of the property `public_network_access_enabled`. diff --git a/website/docs/r/managed_application.html.markdown b/website/docs/r/managed_application.html.markdown index 3e3679087c03c..4d2bb31f026e9 100644 --- a/website/docs/r/managed_application.html.markdown +++ b/website/docs/r/managed_application.html.markdown @@ -81,10 +81,6 @@ The following arguments are supported: * `application_definition_id` - (Optional) The application definition ID to deploy. -* `parameters` - (Optional) A mapping of name and value pairs to pass to the managed application as parameters. - -~> **NOTE:** `parameters` only supports values with `string` or `secureString` type and will be deprecated in version 4.0 of the provider - please use `parameter_values` instead which supports more parameter types. - * `parameter_values` - (Optional) The parameter values to pass to the Managed Application. This field is a JSON object that allows you to assign parameters to this Managed Application. * `plan` - (Optional) One `plan` block as defined below. Changing this forces a new resource to be created. diff --git a/website/docs/r/management_group_policy_remediation.html.markdown b/website/docs/r/management_group_policy_remediation.html.markdown index ef60cbf734bdd..a3d95ac7ca0bf 100644 --- a/website/docs/r/management_group_policy_remediation.html.markdown +++ b/website/docs/r/management_group_policy_remediation.html.markdown @@ -49,18 +49,10 @@ The following arguments are supported: * `policy_assignment_id` - (Required) The ID of the Policy Assignment that should be remediated. -* `policy_definition_id` - (Optional) The unique ID for the policy definition within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. - -~> **Note:** This property has been deprecated and will be removed in version 4.0 of the provider in favour of `policy_definition_reference_id`. - * `policy_definition_reference_id` - (Optional) The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. * `location_filters` - (Optional) A list of the resource locations that will be remediated. -* `resource_discovery_mode` - (Optional) The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`. - -~> **Note:** This property has been deprecated and will be removed in version 4.0 of the provider as evaluating compliance before remediation is only supported at subscription scope and below. - * `failure_percentage` - (Optional) A number between 0.0 to 1.0 representing the percentage failure threshold. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold. * `parallel_deployments` - (Optional) Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used. diff --git a/website/docs/r/mariadb_configuration.html.markdown b/website/docs/r/mariadb_configuration.html.markdown deleted file mode 100644 index 3a121569a7937..0000000000000 --- a/website/docs/r/mariadb_configuration.html.markdown +++ /dev/null @@ -1,72 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_mariadb_configuration" -description: |- - Sets a MariaDB Configuration value on a MariaDB Server. ---- - -# azurerm_mariadb_configuration - -Sets a MariaDB Configuration value on a MariaDB Server. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "api-rg-pro" - location = "West Europe" -} - -resource "azurerm_mariadb_server" "example" { - name = "mariadb-server-1" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - sku_name = "B_Gen5_2" - ssl_enforcement_enabled = true - administrator_login = "mariadbadmin" - administrator_login_password = "H@Sh1CoR3!" - version = "10.2" -} - -resource "azurerm_mariadb_configuration" "example" { - name = "interactive_timeout" - resource_group_name = azurerm_resource_group.example.name - server_name = azurerm_mariadb_server.example.name - value = "600" -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) Specifies the name of the MariaDB Configuration, which needs [to be a valid MariaDB configuration name](https://mariadb.com/kb/en/library/server-system-variables/). Changing this forces a new resource to be created. - -* `server_name` - (Required) Specifies the name of the MariaDB Server. Changing this forces a new resource to be created. - -* `resource_group_name` - (Required) The name of the resource group in which the MariaDB Server exists. Changing this forces a new resource to be created. - -* `value` - (Required) Specifies the value of the MariaDB Configuration. See the MariaDB documentation for valid values. Changing this forces a new resource to be created. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the MariaDB Configuration. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the MariaDB Configuration. -* `read` - (Defaults to 5 minutes) Used when retrieving the MariaDB Configuration. -* `delete` - (Defaults to 30 minutes) Used when deleting the MariaDB Configuration. - -## Import - -MariaDB Configurations can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_mariadb_configuration.interactive_timeout /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforMariaDB/servers/server1/configurations/interactive_timeout -``` diff --git a/website/docs/r/mariadb_database.html.markdown b/website/docs/r/mariadb_database.html.markdown deleted file mode 100644 index 91b0d2c079bba..0000000000000 --- a/website/docs/r/mariadb_database.html.markdown +++ /dev/null @@ -1,88 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_mariadb_database" -description: |- - Manages a MariaDB Database within a MariaDB Server. ---- - -# azurerm_mariadb_database - -Manages a MariaDB Database within a MariaDB Server - -!>**IMPORTANT:** To mitigate the possibility of accidental data loss it is highly recommended that you use the `prevent_destroy` lifecycle argument in your configuration file for this resource. For more information on the `prevent_destroy` lifecycle argument please see the [terraform documentation](https://developer.hashicorp.com/terraform/tutorials/state/resource-lifecycle#prevent-resource-deletion). - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "tfex-mariadb-database-RG" - location = "West Europe" -} - -resource "azurerm_mariadb_server" "example" { - name = "mariadb-svr" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - sku_name = "B_Gen5_2" - - storage_mb = 51200 - backup_retention_days = 7 - geo_redundant_backup_enabled = false - - administrator_login = "acctestun" - administrator_login_password = "H@Sh1CoR3!" - version = "10.2" - ssl_enforcement_enabled = true -} - -resource "azurerm_mariadb_database" "example" { - name = "mariadb_database" - resource_group_name = azurerm_resource_group.example.name - server_name = azurerm_mariadb_server.example.name - charset = "utf8mb4" - collation = "utf8mb4_unicode_520_ci" - - # prevent the possibility of accidental data loss - lifecycle { - prevent_destroy = true - } -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) Specifies the name of the MariaDB Database, which needs [to be a valid MariaDB identifier](https://mariadb.com/kb/en/library/identifier-names/). Changing this forces a new resource to be created. - -* `server_name` - (Required) Specifies the name of the MariaDB Server. Changing this forces a new resource to be created. - -* `resource_group_name` - (Required) The name of the resource group in which the MariaDB Server exists. Changing this forces a new resource to be created. - -* `charset` - (Required) Specifies the Charset for the MariaDB Database, which needs [to be a valid MariaDB Charset](https://mariadb.com/kb/en/library/setting-character-sets-and-collations). Changing this forces a new resource to be created. - -* `collation` - (Required) Specifies the Collation for the MariaDB Database, which needs [to be a valid MariaDB Collation](https://mariadb.com/kb/en/library/setting-character-sets-and-collations). Changing this forces a new resource to be created. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the MariaDB Database. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 60 minutes) Used when creating the MariaDB Database. -* `read` - (Defaults to 5 minutes) Used when retrieving the MariaDB Database. -* `delete` - (Defaults to 60 minutes) Used when deleting the MariaDB Database. - -## Import - -MariaDB Database's can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_mariadb_database.database1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforMariaDB/servers/server1/databases/database1 -``` diff --git a/website/docs/r/mariadb_firewall_rule.html.markdown b/website/docs/r/mariadb_firewall_rule.html.markdown deleted file mode 100644 index beaa3525851cb..0000000000000 --- a/website/docs/r/mariadb_firewall_rule.html.markdown +++ /dev/null @@ -1,74 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_mariadb_firewall_rule" -description: |- - Manages a Firewall Rule for a MariaDB Server. ---- - -# azurerm_mariadb_firewall_rule - -Manages a Firewall Rule for a MariaDB Server - -## Example Usage (Single IP Address) - -```hcl -resource "azurerm_mariadb_firewall_rule" "example" { - name = "test-rule" - resource_group_name = "test-rg" - server_name = "test-server" - start_ip_address = "40.112.8.12" - end_ip_address = "40.112.8.12" -} -``` - -## Example Usage (IP Range) - -```hcl -resource "azurerm_mariadb_firewall_rule" "example" { - name = "test-rule" - resource_group_name = "test-rg" - server_name = "test-server" - start_ip_address = "40.112.0.0" - end_ip_address = "40.112.255.255" -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) Specifies the name of the MariaDB Firewall Rule. Changing this forces a new resource to be created. - -* `server_name` - (Required) Specifies the name of the MariaDB Server. Changing this forces a new resource to be created. - -* `resource_group_name` - (Required) The name of the resource group in which the MariaDB Server exists. Changing this forces a new resource to be created. - -* `start_ip_address` - (Required) Specifies the Start IP Address associated with this Firewall Rule. - -* `end_ip_address` - (Required) Specifies the End IP Address associated with this Firewall Rule. - --> **NOTE:** The Azure feature `Allow access to Azure services` can be enabled by setting `start_ip_address` and `end_ip_address` to `0.0.0.0` which ([is documented in the Azure API Docs](https://docs.microsoft.com/rest/api/sql/firewallrules/createorupdate)). - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the MariaDB Firewall Rule. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the MariaDB Firewall Rule. -* `update` - (Defaults to 30 minutes) Used when updating the MariaDB Firewall Rule. -* `read` - (Defaults to 5 minutes) Used when retrieving the MariaDB Firewall Rule. -* `delete` - (Defaults to 30 minutes) Used when deleting the MariaDB Firewall Rule. - -## Import - -MariaDB Firewall rules can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_mariadb_firewall_rule.rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforMariaDB/servers/server1/firewallRules/rule1 -``` diff --git a/website/docs/r/mariadb_server.html.markdown b/website/docs/r/mariadb_server.html.markdown deleted file mode 100644 index 4a65117ad2496..0000000000000 --- a/website/docs/r/mariadb_server.html.markdown +++ /dev/null @@ -1,111 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_mariadb_server" -description: |- - Manages a MariaDB Server. ---- - -# azurerm_mariadb_server - -Manages a MariaDB Server. - -## Example Usage - -```hcl -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} - -resource "azurerm_mariadb_server" "example" { - name = "example-mariadb-server" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - administrator_login = "mariadbadmin" - administrator_login_password = "H@Sh1CoR3!" - - sku_name = "B_Gen5_2" - storage_mb = 5120 - version = "10.2" - - auto_grow_enabled = true - backup_retention_days = 7 - geo_redundant_backup_enabled = false - public_network_access_enabled = false - ssl_enforcement_enabled = true - ssl_minimal_tls_version_enforced = "TLS1_2" -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) Specifies the name of the MariaDB Server. Changing this forces a new resource to be created. - -* `resource_group_name` - (Required) The name of the resource group in which to create the MariaDB Server. Changing this forces a new resource to be created. - -* `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - -* `sku_name` - (Required) Specifies the SKU Name for this MariaDB Server. The name of the SKU, follows the `tier` + `family` + `cores` pattern (e.g. `B_Gen4_1`, `GP_Gen5_8`). For more information see the [product documentation](https://docs.microsoft.com/rest/api/mariadb/servers/create#sku). Possible values are `B_Gen5_1`, `B_Gen5_2`, `GP_Gen5_2`, `GP_Gen5_4`, `GP_Gen5_8`, `GP_Gen5_16`, `GP_Gen5_32`, `MO_Gen5_2`, `MO_Gen5_4`, `MO_Gen5_8` and `MO_Gen5_16`. - -* `version` - (Required) Specifies the version of MariaDB to use. Possible values are `10.2` and `10.3`. Changing this forces a new resource to be created. - -* `administrator_login` - (Optional) The Administrator login for the MariaDB Server. Changing this forces a new resource to be created. - -* `administrator_login_password` - (Optional) The Password associated with the `administrator_login` for the MariaDB Server. - -* `auto_grow_enabled` - (Optional) Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is `true`. Defaults to `true`. - -* `backup_retention_days` - (Optional) Backup retention days for the server, supported values are between `7` and `35` days. - -* `create_mode` - (Optional) The creation mode. Can be used to restore or replicate existing servers. Possible values are `Default`, `Replica`, `GeoRestore`, and `PointInTimeRestore`. Defaults to `Default`. - -* `creation_source_server_id` - (Optional) For creation modes other than `Default`, the source server ID to use. - -* `geo_redundant_backup_enabled` - (Optional) Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier. - -* `public_network_access_enabled` - (Optional) Whether or not public network access is allowed for this server. Defaults to `true`. - -* `restore_point_in_time` - (Optional) When `create_mode` is `PointInTimeRestore`, specifies the point in time to restore from `creation_source_server_id`. It should be provided in [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) format, e.g. `2013-11-08T22:00:40Z`. - -* `ssl_enforcement_enabled` - (Required) Specifies if SSL should be enforced on connections. Possible values are `true` and `false`. - --> **NOTE:** `ssl_minimal_tls_version_enforced` must be set to `TLSEnforcementDisabled` when `ssl_enforcement_enabled` is set to `false`. - -* `ssl_minimal_tls_version_enforced` - (Optional) The minimum TLS version to support on the sever. Possible values are `TLSEnforcementDisabled`, `TLS1_0`, `TLS1_1`, and `TLS1_2`. Defaults to `TLS1_2`. - -* `storage_mb` - (Optional) Max storage allowed for a server. Possible values are between `5120` MB (5GB) and `1024000`MB (1TB) for the Basic SKU and between `5120` MB (5GB) and `4096000` MB (4TB) for General Purpose/Memory Optimized SKUs. For more information see the [product documentation](https://docs.microsoft.com/rest/api/mariadb/servers/create#storageprofile). - -* `tags` - (Optional) A mapping of tags to assign to the resource. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the MariaDB Server. - -* `fqdn` - The FQDN of the MariaDB Server. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 90 minutes) Used when creating the MariaDB Server. -* `update` - (Defaults to 60 minutes) Used when updating the MariaDB Server. -* `read` - (Defaults to 5 minutes) Used when retrieving the MariaDB Server. -* `delete` - (Defaults to 60 minutes) Used when deleting the MariaDB Server. - -## Import - -MariaDB Server's can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_mariadb_server.server1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforMariaDB/servers/server1 -``` diff --git a/website/docs/r/mariadb_virtual_network_rule.html.markdown b/website/docs/r/mariadb_virtual_network_rule.html.markdown deleted file mode 100644 index 7c909a8c3117b..0000000000000 --- a/website/docs/r/mariadb_virtual_network_rule.html.markdown +++ /dev/null @@ -1,99 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_mariadb_virtual_network_rule" -description: |- - Manages a MariaDB Virtual Network Rule. ---- - -# azurerm_mariadb_virtual_network_rule - -Manages a MariaDB Virtual Network Rule. - --> **NOTE:** MariaDB Virtual Network Rules [can only be used with SKU Tiers of `GeneralPurpose` or `MemoryOptimized`](https://docs.microsoft.com/azure/mariadb/concepts-data-access-security-vnet) - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} - -resource "azurerm_virtual_network" "example" { - name = "example-vnet" - address_space = ["10.7.29.0/29"] - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name -} - -resource "azurerm_subnet" "internal" { - name = "internal" - resource_group_name = azurerm_resource_group.example.name - virtual_network_name = azurerm_virtual_network.example.name - address_prefixes = ["10.7.29.0/29"] - service_endpoints = ["Microsoft.Sql"] -} - -resource "azurerm_mariadb_server" "example" { - name = "mariadb-server-1" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - administrator_login = "mariadbadminun" - administrator_login_password = "H@Sh1CoR3!" - version = "10.2" - ssl_enforcement_enabled = true - - sku_name = "GP_Gen5_2" -} - -resource "azurerm_mariadb_virtual_network_rule" "example" { - name = "mariadb-vnet-rule" - resource_group_name = azurerm_resource_group.example.name - server_name = azurerm_mariadb_server.example.name - subnet_id = azurerm_subnet.internal.id -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The name of the MariaDB Virtual Network Rule. Cannot be empty and must only contain alphanumeric characters and hyphens. Cannot start with a number, and cannot start or end with a hyphen. Changing this forces a new resource to be created. - -~> **NOTE:** `name` must be between 1-128 characters long and must satisfy all of the requirements below: - -1. Contains only alphanumeric and hyphen characters -2. Cannot start with a number or hyphen -3. Cannot end with a hyphen - -* `resource_group_name` - (Required) The name of the resource group where the MariaDB server resides. Changing this forces a new resource to be created. - -* `server_name` - (Required) The name of the SQL Server to which this MariaDB virtual network rule will be applied to. Changing this forces a new resource to be created. - -* `subnet_id` - (Required) The ID of the subnet that the MariaDB server will be connected to. - -~> **NOTE:** Due to [a bug in the Azure API](https://github.com/Azure/azure-rest-api-specs/issues/3719) this resource currently doesn't expose the `ignore_missing_vnet_service_endpoint` field and defaults this to `false`. Terraform will check during the provisioning of the Virtual Network Rule that the Subnet contains the Service Rule to verify that the Virtual Network Rule can be created. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the MariaDB Virtual Network Rule. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the MariaDB Virtual Network Rule. -* `update` - (Defaults to 30 minutes) Used when updating the MariaDB Virtual Network Rule. -* `read` - (Defaults to 5 minutes) Used when retrieving the MariaDB Virtual Network Rule. -* `delete` - (Defaults to 30 minutes) Used when deleting the MariaDB Virtual Network Rule. - -## Import - -MariaDB Virtual Network Rules can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_mariadb_virtual_network_rule.rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.DBforMariaDB/servers/myserver/virtualNetworkRules/vnetrulename -``` diff --git a/website/docs/r/media_asset.html.markdown b/website/docs/r/media_asset.html.markdown deleted file mode 100644 index cad45f49467bf..0000000000000 --- a/website/docs/r/media_asset.html.markdown +++ /dev/null @@ -1,90 +0,0 @@ ---- -subcategory: "Media" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_media_asset" -description: |- - Manages a Media Asset. ---- - -# azurerm_media_asset - -Manages a Media Asset. - -## Example Usage - -```hcl - -resource "azurerm_resource_group" "example" { - name = "media-resources" - location = "West Europe" -} - -resource "azurerm_storage_account" "example" { - name = "examplestoracc" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "example" { - name = "examplemediaacc" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - storage_account { - id = azurerm_storage_account.example.id - is_primary = true - } -} - -resource "azurerm_media_asset" "example" { - name = "Asset1" - resource_group_name = azurerm_resource_group.example.name - media_services_account_name = azurerm_media_services_account.example.name - description = "Asset description" -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `media_services_account_name` - (Required) Specifies the name of the Media Services Account. Changing this forces a new Media Asset to be created. - -* `name` - (Required) The name which should be used for this Media Asset. Changing this forces a new Media Asset to be created. - -* `resource_group_name` - (Required) The name of the Resource Group where the Media Asset should exist. Changing this forces a new Media Asset to be created. - ---- - -* `alternate_id` - (Optional) The alternate ID of the Asset. - -* `container` - (Optional) The name of the asset blob container. Changing this forces a new Media Asset to be created. - -* `description` - (Optional) The Asset description. - -* `storage_account_name` - (Optional) The name of the storage account where to store the media asset. Changing this forces a new Media Asset to be created. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Media Asset. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Media Asset. -* `read` - (Defaults to 5 minutes) Used when retrieving the Media Asset. -* `update` - (Defaults to 30 minutes) Used when updating the Media Asset. -* `delete` - (Defaults to 30 minutes) Used when deleting the Media Asset. - -## Import - -Media Assets can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_media_asset.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Media/mediaServices/account1/assets/asset1 -``` diff --git a/website/docs/r/media_asset_filter.html.markdown b/website/docs/r/media_asset_filter.html.markdown deleted file mode 100644 index 0a1f9e6ee4c00..0000000000000 --- a/website/docs/r/media_asset_filter.html.markdown +++ /dev/null @@ -1,174 +0,0 @@ ---- -subcategory: "Media" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_media_asset_filter" -description: |- - Manages an Azure Media Asset Filter. ---- - -# azurerm_media_asset_filter - -Manages an Azure Media Asset Filter. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "media-resources" - location = "West Europe" -} - -resource "azurerm_storage_account" "example" { - name = "examplestoracc" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "example" { - name = "examplemediaacc" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - storage_account { - id = azurerm_storage_account.example.id - is_primary = true - } -} - -resource "azurerm_media_asset" "example" { - name = "Asset1" - resource_group_name = azurerm_resource_group.example.name - media_services_account_name = azurerm_media_services_account.example.name - description = "Asset description" -} - -resource "azurerm_media_asset_filter" "example" { - name = "Filter1" - asset_id = azurerm_media_asset.example.id - first_quality_bitrate = 128000 - - presentation_time_range { - start_in_units = 0 - end_in_units = 15 - presentation_window_in_units = 90 - live_backoff_in_units = 0 - unit_timescale_in_miliseconds = 1000 - force_end = false - } - - track_selection { - condition { - property = "Type" - operation = "Equal" - value = "Audio" - } - - condition { - property = "Language" - operation = "NotEqual" - value = "en" - } - - condition { - property = "FourCC" - operation = "NotEqual" - value = "EC-3" - } - } - - - track_selection { - condition { - property = "Type" - operation = "Equal" - value = "Video" - } - - condition { - property = "Bitrate" - operation = "Equal" - value = "3000000-5000000" - } - } -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `asset_id` - (Required) The Asset ID for which the Asset Filter should be created. Changing this forces a new Asset Filter to be created. - -* `name` - (Required) The name which should be used for this Asset Filter. Changing this forces a new Asset Filter to be created. - ---- - -* `first_quality_bitrate` - (Optional) The first quality bitrate. Sets the first video track to appear in the Live Streaming playlist to allow HLS native players to start downloading from this quality level at the beginning. - -* `presentation_time_range` - (Optional) A `presentation_time_range` block as defined below. - -* `track_selection` - (Optional) One or more `track_selection` blocks as defined below. - ---- - -A `presentation_time_range` block supports the following: - -* `end_in_units` - (Optional) The absolute end time boundary. Applies to Video on Demand (VoD). -For the Live Streaming presentation, it is silently ignored and applied when the presentation ends and the stream becomes VoD. This is a long value that represents an absolute end point of the presentation, rounded to the closest next GOP start. The unit is defined by `unit_timescale_in_miliseconds`, so an `end_in_units` of 180 would be for 3 minutes. Use `start_in_units` and `end_in_units` to trim the fragments that will be in the playlist (manifest). For example, `start_in_units` set to 20 and `end_in_units` set to 60 using `unit_timescale_in_miliseconds` in 1000 will generate a playlist that contains fragments from between 20 seconds and 60 seconds of the VoD presentation. If a fragment straddles the boundary, the entire fragment will be included in the manifest. - -* `force_end` - (Optional) Indicates whether the `end_in_units` property must be present. If true, `end_in_units` must be specified or a bad request code is returned. Applies to Live Streaming only. Allowed values: false, true. - -* `live_backoff_in_units` - (Optional) The relative to end right edge. Applies to Live Streaming only. -This value defines the latest live position that a client can seek to. Using this property, you can delay live playback position and create a server-side buffer for players. The unit is defined by `unit_timescale_in_miliseconds`. The maximum live back off duration is 300 seconds. For example, a value of 20 means that the latest available content is 20 seconds delayed from the real live edge. - -* `presentation_window_in_units` - (Optional) The relative to end sliding window. Applies to Live Streaming only. Use `presentation_window_in_units` to apply a sliding window of fragments to include in a playlist. The unit is defined by `unit_timescale_in_miliseconds`. For example, set `presentation_window_in_units` to 120 to apply a two-minute sliding window. Media within 2 minutes of the live edge will be included in the playlist. If a fragment straddles the boundary, the entire fragment will be included in the playlist. The minimum presentation window duration is 60 seconds. - -* `start_in_units` - (Optional) The absolute start time boundary. Applies to Video on Demand (VoD) or Live Streaming. This is a long value that represents an absolute start point of the stream. The value gets rounded to the closest next GOP start. The unit is defined by `unit_timescale_in_miliseconds`, so a `start_in_units` of 15 would be for 15 seconds. Use `start_in_units` and `end_in_units` to trim the fragments that will be in the playlist (manifest). For example, `start_in_units` set to 20 and `end_in_units` set to 60 using `unit_timescale_in_miliseconds` in 1000 will generate a playlist that contains fragments from between 20 seconds and 60 seconds of the VoD presentation. If a fragment straddles the boundary, the entire fragment will be included in the manifest. - -* `unit_timescale_in_miliseconds` - (Optional) Specified as the number of miliseconds in one unit timescale. For example, if you want to set a `start_in_units` at 30 seconds, you would use a value of 30 when using the `unit_timescale_in_miliseconds` in 1000. Or if you want to set `start_in_units` in 30 miliseconds, you would use a value of 30 when using the `unit_timescale_in_miliseconds` in 1. Applies timescale to `start_in_units`, `start_timescale` and `presentation_window_in_timescale` and `live_backoff_in_timescale`. - - ---- - -A `track_selection` block supports the following: - -* `condition` - (Required) One or more `condition` blocks as defined above. - ---- - - ---- - -A `condition` block supports the following: - -* `operation` - (Optional) The condition operation to test a track property against. Supported values are `Equal` and `NotEqual`. - -* `property` - (Optional) The track property to compare. Supported values are `Bitrate`, `FourCC`, `Language`, `Name` and `Type`. Check [documentation](https://docs.microsoft.com/azure/media-services/latest/filters-concept) for more details. - -* `value` - (Optional) The track property value to match or not match. - - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Asset Filter. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Asset Filter. -* `read` - (Defaults to 5 minutes) Used when retrieving the Asset Filter. -* `update` - (Defaults to 30 minutes) Used when updating the Asset Filter. -* `delete` - (Defaults to 30 minutes) Used when deleting the Asset Filter. - -## Import - -Asset Filters can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_media_asset_filter.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Media/mediaServices/account1/assets/asset1/assetFilters/filter1 -``` diff --git a/website/docs/r/media_content_key_policy.html.markdown b/website/docs/r/media_content_key_policy.html.markdown deleted file mode 100644 index a44ca307731fa..0000000000000 --- a/website/docs/r/media_content_key_policy.html.markdown +++ /dev/null @@ -1,324 +0,0 @@ ---- -subcategory: "Media" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_media_content_key_policy" -description: |- - Manages a Content Key Policy. ---- - -# azurerm_media_content_key_policy - -Manages a Content Key Policy. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "media-resources" - location = "West Europe" -} - -resource "azurerm_storage_account" "example" { - name = "examplestoracc" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "example" { - name = "examplemediaacc" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - storage_account { - id = azurerm_storage_account.example.id - is_primary = true - } -} - -resource "azurerm_media_content_key_policy" "example" { - name = "example" - resource_group_name = azurerm_resource_group.example.name - media_services_account_name = azurerm_media_services_account.example.name - policy_option { - name = "fairPlay" - fairplay_configuration { - ask = "bb566284cc124a21c435a92cd3c108c4" - pfx = "MIIG7gIBAzCCBqoGCSqGSIb3DQEHAaCCBpsEggaXMIIGkzCCA7wGCSqGSIb3DQEHAaCCA60EggOpMIIDpTCCA6EGCyqGSIb3DQEMCgECoIICtjCCArIwHAYKKoZIhvcNAQwBAzAOBAiV65vFfxLDVgICB9AEggKQx2dxWefICYodVhRLSQVMJRYy5QkM1VySPAXGP744JHrb+s0Y8i/6a+a5itZGlXw3kvxyflHtSsuuBCaYJ1WOCp9jspixJEliFHXTcel96AgZlT5tB7vC6pdZnz8rb+lyxFs99x2CW52EsadoDlRsYrmkmKdnB0cx2JHJbLeXuKV/fjuRJSqCFcDa6Nre8AlBX0zKGIYGLJ1Cfpora4kNTXxu0AwEowzGmoCxqrpKbO1QDi1hZ1qHrtZ1ienAKfiTXaGH4AMQzyut0AaymxalrRbXibJYuefLRvXqx0oLZKVLAX8fR1gnac6Mrr7GkdHaKCsk4eOi98acR7bjiyRRVYYS4B6Y0tCeRJNe6zeYVmLdtatuOlOEVDT6AKrJJMFMyITVS+2D771ge6m37FbJ36K3/eT/HRq1YDsxfD/BY+X7eMIwQrVnD5nK7avXfbIni57n5oWLkE9Vco8uBlMdrx4xHt9vpe42Pz2Yh2O4WtvxcgxrAknvPpV1ZsAJCfvm9TTcg8qZpjyePn3B9TvFVSXMJHn/rzu6OJAgFgVFAe1tPGLh1XBxAvwpB8EqcycIIUUFUBy4HgYCicjI2jp6s8Kk293Uc/TA2623LrWgP/Xm5hVB7lP1k6W9LDivOlAA96D0Cbk08Yv6arkCYj7ONFO8VZbO0zKAAOLHMw/ZQRIutGLrDlqgTDeRXRuReX7TNjDBxp2rzJBY0uU5g9BMFxQrbQwEx9HsnO4dVFG4KLbHmYWhlwS2V2uZtY6D6elOXY3SX50RwhC4+0trUMi/ODtOxAc+lMQk2FNDcNeKIX5wHwFRS+sFBu5Um4Jfj6Ua4w1izmu2KiPfDd3vJsm5Dgcci3fPfdSfpIq4uR6d3JQxgdcwEwYJKoZIhvcNAQkVMQYEBAEAAAAwWwYJKoZIhvcNAQkUMU4eTAB7ADcAMQAxADAANABBADgARgAtADQAQgBFADAALQA0AEEAMgA4AC0AOAAyADIANQAtAEYANwBBADcAMwBGAEMAQQAwAEMARABEAH0wYwYJKwYBBAGCNxEBMVYeVABNAGkAYwByAG8AcwBvAGYAdAAgAEIAYQBzAGUAIABDAHIAeQBwAHQAbwBnAHIAYQBwAGgAaQBjACAAUAByAG8AdgBpAGQAZQByACAAdgAxAC4AMDCCAs8GCSqGSIb3DQEHBqCCAsAwggK8AgEAMIICtQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQISS7mG/riQJkCAgfQgIICiPSGg5axP4JM+GmiVEqOHTVAPw2AM8OPnn1q0mIw54oC2WOJw3FFThYHmxTQzQ1feVmnkVCv++eFp+BYTcWTa+ehl/3/Nvr5uLTzDxmCShacKwoWXOKtSLh6mmgydvMqSf6xv1bPsloodtrRxhprI2lBNBW2uw8az9eLdvURYmhjGPf9klEy/6OCA5jDT5XZMunwiQT5mYNMF7wAQ5PCz2dJQqm1n72A6nUHPkHEusN7iH/+mv5d3iaKxn7/ShxLKHfjMd+r/gv27ylshVHiN4mVStAg+MiLrVvr5VH46p6oosImvS3ZO4D5wTmh/6wtus803qN4QB/Y9n4rqEJ4Dn619h+6O7FChzWkx7kvYIzIxvfnj1PCFTEjUwc7jbuF013W/z9zQi2YEq9AzxMcGro0zjdt2sf30zXSfaRNt0UHHRDkLo7yFUJG5Ka1uWU8paLuXUUiiMUf24Bsfdg2A2n+3Qa7g25OvAM1QTpMwmMWL9sY2hxVUGIKVrnj8c4EKuGJjVDXrze5g9O/LfZr5VSjGu5KsN0eYI3mcePF7XM0azMtTNQYVRmeWxYW+XvK5MaoLEkrFG8C5+JccIlN588jowVIPqP321S/EyFiAmrRdAWkqrc9KH+/eINCFqjut2YPkCaTM9mnJAAqWgggUWkrOKT/ByS6IAQwyEBNFbY0TWyxKt6vZL1EW/6HgZCsxeYycNhnPr2qJNZZMNzmdMRp2GRLcfBH8KFw1rAyua0VJoTLHb23ZAsEY74BrEEiK9e/oOjXkHzQjlmrfQ9rSN2eQpRrn0W8I229WmBO2suG+AQ3aY8kDtBMkjmJno7txUh1K5D6tJTO7MQp343A2AhyJkhYA7NPnDA7MB8wBwYFKw4DAhoEFPO82HDlCzlshWlnMoQPStm62TMEBBQsPmvwbZ5OlwC9+NDF1AC+t67WTgICB9A=" - pfx_password = "password" - rental_duration_seconds = 2249 - rental_and_lease_key_type = "PersistentUnlimited" - - } - open_restriction_enabled = true - } - policy_option { - name = "playReady" - playready_configuration_license { - allow_test_devices = true - begin_date = "2017-10-16T18:22:53Z" - security_level = "SL150" - play_right { - scms_restriction = 2 - digital_video_only_content_restriction = false - image_constraint_for_analog_component_video_restriction = false - image_constraint_for_analog_computer_monitor_restriction = false - allow_passing_video_content_to_unknown_output = "NotAllowed" - uncompressed_digital_video_opl = 100 - uncompressed_digital_audio_opl = 100 - analog_video_opl = 150 - compressed_digital_audio_opl = 250 - compressed_digital_video_opl = 400 - explicit_analog_television_output_restriction { - best_effort_enforced = true - control_bits = 3 - } - } - license_type = "Persistent" - content_type = "UltraVioletDownload" - content_key_location_from_header_enabled = true - } - open_restriction_enabled = true - } - policy_option { - name = "clearKey" - clear_key_configuration_enabled = true - token_restriction { - issuer = "urn:issuer" - audience = "urn:audience" - token_type = "Swt" - primary_symmetric_token_key = "AAAAAAAAAAAAAAAAAAAAAA==" - alternate_key { - rsa_token_key_exponent = "AQAB" - rsa_token_key_modulus = "AQAD" - } - alternate_key { - symmetric_token_key = "BBAAAAAAAAAAAAAAAAAAAA==" - } - } - } - policy_option { - name = "widevine" - widevine_configuration_template = jsonencode({ - "allowed_track_types" : "SD_HD", - "content_key_specs" : [{ - "track_type" : "SD", - "security_level" : 1, - "required_output_protection" : { - "hdcp" : "HDCP_V2" - }, - }], - "policy_overrides" : { - "can_play" : true, - "can_persist" : true, - "can_renew" : false, - }, - }) - open_restriction_enabled = true - } -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `media_services_account_name` - (Required) The Media Services account name. Changing this forces a new Content Key Policy to be created. - -* `name` - (Required) The name which should be used for this Content Key Policy. Changing this forces a new Content Key Policy to be created. - -* `policy_option` - (Required) One or more `policy_option` blocks as defined below. - -* `resource_group_name` - (Required) The name of the Resource Group where the Content Key Policy should exist. Changing this forces a new Content Key Policy to be created. - ---- - -* `description` - (Optional) A description for the Policy. - ---- - -A `alternate_key` block supports the following: - -* `rsa_token_key_exponent` - (Optional) The RSA parameter exponent. - -* `rsa_token_key_modulus` - (Optional) The RSA parameter modulus. - -* `symmetric_token_key` - (Optional) The key value of the key. Specifies a symmetric key for token validation. - -* `x509_token_key_raw` - (Optional) The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET). Specifies a certificate for token validation. - --> **NOTE:** Each `alternate_key` block can only have one type of primary verification key: if you want to use RSA you must provide `rsa_token_key_exponent` and `rsa_token_key_modulus`, if you want to use symmetric you need to provide `symmetric_token_key` and for x509 you must provide `x509_token_key_raw`. - ---- - -An `explicit_analog_television_output_restriction` block supports the following: - -* `best_effort_enforced` - (Optional) Indicates whether this restriction is enforced on a best effort basis. Possible values are `true` or `false`. Defaults to `false`. - -* `control_bits` - (Required) The restriction control bits. Possible value is integer between `0` and `3` inclusive. - ---- - -A `fairplay_configuration` block supports the following: - -* `ask` - (Optional) The key that must be used as FairPlay Application Secret key. - -* `offline_rental_configuration` - (Optional) A `offline_rental_configuration` block as defined below. - -* `pfx` - (Optional) The Base64 representation of FairPlay certificate in PKCS 12 (pfx) format (including private key). - -* `pfx_password` - (Optional) The password encrypting FairPlay certificate in PKCS 12 (pfx) format. - -* `rental_and_lease_key_type` - (Optional) The rental and lease key type. Supported values are `DualExpiry`, `PersistentLimited`, `PersistentUnlimited` or `Undefined`. - -* `rental_duration_seconds` - (Optional) The rental duration. Must be greater than 0. - ---- - -A `offline_rental_configuration` block supports the following: - -* `playback_duration_seconds` - (Optional) Playback duration. - -* `storage_duration_seconds` - (Optional) Storage duration. - ---- - -A `play_right` block supports the following: - -* `agc_and_color_stripe_restriction` - (Optional) Configures Automatic Gain Control (AGC) and Color Stripe in the license. Must be between `0` and `3` inclusive. - -* `allow_passing_video_content_to_unknown_output` - (Optional) Configures Unknown output handling settings of the license. Supported values are `Allowed`, `AllowedWithVideoConstriction` or `NotAllowed`. - -* `analog_video_opl` - (Optional) Specifies the output protection level for compressed digital audio. Supported values are `100`, `150` or `200`. - -* `compressed_digital_audio_opl` - (Optional) Specifies the output protection level for compressed digital audio.Supported values are `100`, `150`, `200`, `250` or `300`. - -* `compressed_digital_video_opl` - (Optional) Specifies the output protection level for compressed digital video. Supported values are `400` or `500`. - -* `digital_video_only_content_restriction` - (Optional) Enables the Image Constraint For Analog Component Video Restriction in the license. - -* `explicit_analog_television_output_restriction` - (Optional) An `explicit_analog_television_output_restriction` block as defined above. - -* `first_play_expiration` - (Optional) The amount of time that the license is valid after the license is first used to play content. - -* `image_constraint_for_analog_component_video_restriction` - (Optional) Enables the Image Constraint For Analog Component Video Restriction in the license. - -* `image_constraint_for_analog_computer_monitor_restriction` - (Optional) Enables the Image Constraint For Analog Component Video Restriction in the license. - -* `scms_restriction` - (Optional) Configures the Serial Copy Management System (SCMS) in the license. Must be between `0` and `3` inclusive. - -* `uncompressed_digital_audio_opl` - (Optional) Specifies the output protection level for uncompressed digital audio. Supported values are `100`, `150`, `200`, `250` or `300`. - -* `uncompressed_digital_video_opl` - (Optional) Specifies the output protection level for uncompressed digital video. Supported values are `100`, `250`, `270` or `300`. - ---- - -A `playready_configuration_license` block supports the following: - -* `allow_test_devices` - (Optional) A flag indicating whether test devices can use the license. - -* `begin_date` - (Optional) The begin date of license. - -* `content_key_location_from_header_enabled` - (Optional) Specifies that the content key ID is in the PlayReady header. - -* `content_key_location_from_key_id` - (Optional) The content key ID. Specifies that the content key ID is specified in the PlayReady configuration. - --> **NOTE:** You can only specify one content key location. For example if you specify `content_key_location_from_header_enabled` in true, you shouldn't specify `content_key_location_from_key_id` and vice versa. - -* `content_type` - (Optional) The PlayReady content type. Supported values are `UltraVioletDownload`, `UltraVioletStreaming` or `Unspecified`. - -* `expiration_date` - (Optional) The expiration date of license. - -* `grace_period` - (Optional) The grace period of license. - -* `license_type` - (Optional) The license type. Supported values are `NonPersistent` or `Persistent`. - -* `play_right` - (Optional) A `play_right` block as defined above. - -* `relative_begin_date` - (Optional) The relative begin date of license. - -* `relative_expiration_date` - (Optional) The relative expiration date of license. - -* `security_level` - (Optional) The security level of the PlayReady license. Possible values are `SL150`, `SL2000` and `SL3000`. Please see [this document](https://learn.microsoft.com/en-us/rest/api/media/content-key-policies/create-or-update?tabs=HTTP#securitylevel) for more information about security level. See [this document](https://learn.microsoft.com/en-us/azure/media-services/latest/drm-playready-license-template-concept#playready-sl3000-support) for more information about `SL3000` support. - ---- - -A `policy_option` block supports the following: - -* `name` - (Required) The name which should be used for this Policy Option. - -* `clear_key_configuration_enabled` - (Optional) Enable a configuration for non-DRM keys. - -* `fairplay_configuration` - (Optional) A `fairplay_configuration` block as defined above. Check license requirements here . - -* `open_restriction_enabled` - (Optional) Enable an open restriction. License or key will be delivered on every request. - -* `playready_configuration_license` - (Optional) One or more `playready_configuration_license` blocks as defined above. - -* `playready_response_custom_data` - (Optional) The custom response data of the PlayReady configuration. This only applies when `playready_configuration_license` is specified. - -* `token_restriction` - (Optional) A `token_restriction` block as defined below. - -* `widevine_configuration_template` - (Optional) The Widevine template. - --> **NOTE:** Each policy_option can only have one type of configuration: `fairplay_configuration`, `clear_key_configuration_enabled`, `playready_configuration_license` or `widevine_configuration_template`. And is possible to assign only one type of restriction: `open_restriction_enabled` or `token_restriction`. - ---- - -A `required_claim` block supports the following: - -* `type` - (Optional) Token claim type. - -* `value` - (Optional) Token claim value. - ---- - -A `token_restriction` block supports the following: - -* `alternate_key` - (Optional) One or more `alternate_key` block as defined above. - -* `audience` - (Optional) The audience for the token. - -* `issuer` - (Optional) The token issuer. - -* `open_id_connect_discovery_document` - (Optional) The OpenID connect discovery document. - -* `primary_rsa_token_key_exponent` - (Optional) The RSA parameter exponent. - -* `primary_rsa_token_key_modulus` - (Optional) The RSA parameter modulus. - -* `primary_symmetric_token_key` - (Optional) The key value of the key. Specifies a symmetric key for token validation. - -* `primary_x509_token_key_raw` - (Optional) The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET). Specifies a certificate for token validation. - -* `required_claim` - (Optional) One or more `required_claim` blocks as defined above. - -* `token_type` - (Optional) The type of token. Supported values are `Jwt` or `Swt`. - --> **NOTE:** Each token_restriction can only have one type of primary verification key: if you want to use RSA you must provide `primary_rsa_token_key_exponent` and `primary_rsa_token_key_modulus`, if you want to use symmetric you need to provide `primary_symmetric_token_key` and for x509 you must provide `primary_x509_token_key_raw`. For more information about Token access please refer to - ---- - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Content Key Policy. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Content Key Policy. -* `read` - (Defaults to 5 minutes) Used when retrieving the Content Key Policy. -* `update` - (Defaults to 30 minutes) Used when updating the Content Key Policy. -* `delete` - (Defaults to 30 minutes) Used when deleting the Content Key Policy. - -## Import - -Content Key Policy can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_media_content_key_policy.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Media/mediaServices/account1/contentKeyPolicies/policy1 -``` diff --git a/website/docs/r/media_job.html.markdown b/website/docs/r/media_job.html.markdown deleted file mode 100644 index e0c9faccc3616..0000000000000 --- a/website/docs/r/media_job.html.markdown +++ /dev/null @@ -1,143 +0,0 @@ ---- -subcategory: "Media" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_media_job" -description: |- - Manages a Media Job. ---- - -# azurerm_media_job - -Manages a Media Job. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "media-resources" - location = "West Europe" -} - -resource "azurerm_storage_account" "example" { - name = "examplestoracc" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "example" { - name = "examplemediaacc" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - storage_account { - id = azurerm_storage_account.example.id - is_primary = true - } -} - -resource "azurerm_media_transform" "example" { - name = "transform1" - resource_group_name = azurerm_resource_group.example.name - media_services_account_name = azurerm_media_services_account.example.name - description = "My transform description" - output { - relative_priority = "Normal" - on_error_action = "ContinueJob" - builtin_preset { - preset_name = "AACGoodQualityAudio" - } - } -} - -resource "azurerm_media_asset" "input" { - name = "input" - resource_group_name = azurerm_resource_group.example.name - media_services_account_name = azurerm_media_services_account.example.name - description = "Input Asset description" -} - -resource "azurerm_media_asset" "output" { - name = "output" - resource_group_name = azurerm_resource_group.example.name - media_services_account_name = azurerm_media_services_account.example.name - description = "Output Asset description" -} - -resource "azurerm_media_job" "example" { - name = "job1" - resource_group_name = azurerm_resource_group.example.name - media_services_account_name = azurerm_media_services_account.example.name - transform_name = azurerm_media_transform.example.name - description = "My Job description" - priority = "Normal" - input_asset { - name = azurerm_media_asset.input.name - } - output_asset { - name = azurerm_media_asset.output.name - } -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `input_asset` - (Required) A `input_asset` block as defined below. Changing this forces a new Media Job to be created. - -* `media_services_account_name` - (Required) The Media Services account name. Changing this forces a new Transform to be created. - -* `name` - (Required) The name which should be used for this Media Job. Changing this forces a new Media Job to be created. - -* `output_asset` - (Required) One or more `output_asset` blocks as defined below. Changing this forces a new Media Job to be created. - -* `resource_group_name` - (Required) The name of the Resource Group where the Media Job should exist. Changing this forces a new Media Job to be created. - -* `transform_name` - (Required) The Transform name. Changing this forces a new Media Job to be created. - ---- - -* `description` - (Optional) Optional customer supplied description of the Job. - -* `priority` - (Optional) Priority with which the job should be processed. Higher priority jobs are processed before lower priority jobs. Changing this forces a new Media Job to be created. Possible values are `High`, `Normal` and `Low`. Defaults to `Normal`. - ---- - -An `input_asset` block supports the following: - -* `name` - (Required) The name of the input Asset. Changing this forces a new Media Job to be created. - -* `label` - (Optional) A label that is assigned to a JobInputClip, that is used to satisfy a reference used in the Transform. For example, a Transform can be authored so as to take an image file with the label 'xyz' and apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the JobInputs should be the image file, and it should have the label 'xyz'. Changing this forces a new resource to be created. - ---- - -An `output_asset` block supports the following: - -* `name` - (Required) The name of the output Asset. Changing this forces a new Media Job to be created. - -* `label` - (Optional) A label that is assigned to a JobOutput in order to help uniquely identify it. This is useful when your Transform has more than one TransformOutput, whereby your Job has more than one JobOutput. In such cases, when you submit the Job, you will add two or more JobOutputs, in the same order as TransformOutputs in the Transform. Subsequently, when you retrieve the Job, either through events or on a GET request, you can use the label to easily identify the JobOutput. If a label is not provided, a default value of '{presetName}_{outputIndex}' will be used, where the preset name is the name of the preset in the corresponding TransformOutput and the output index is the relative index of the this JobOutput within the Job. Note that this index is the same as the relative index of the corresponding TransformOutput within its Transform. Changing this forces a new resource to be created. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Media Job. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Media Job. -* `read` - (Defaults to 5 minutes) Used when retrieving the Media Job. -* `update` - (Defaults to 30 minutes) Used when updating the Media Job. -* `delete` - (Defaults to 30 minutes) Used when deleting the Media Job. - -## Import - -Media Jobs can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_media_job.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Media/mediaServices/account1/transforms/transform1/jobs/job1 -``` diff --git a/website/docs/r/media_live_event.html.markdown b/website/docs/r/media_live_event.html.markdown deleted file mode 100644 index 1978806f32124..0000000000000 --- a/website/docs/r/media_live_event.html.markdown +++ /dev/null @@ -1,191 +0,0 @@ ---- -subcategory: "Media" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_media_live_event" -description: |- - Manages a Live Event. ---- - -# azurerm_media_live_event - -Manages a Live Event. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "media-resources" - location = "West Europe" -} - -resource "azurerm_storage_account" "example" { - name = "examplestoracc" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "example" { - name = "examplemediaacc" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - storage_account { - id = azurerm_storage_account.example.id - is_primary = true - } -} - -resource "azurerm_media_live_event" "example" { - name = "example" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - media_services_account_name = azurerm_media_services_account.example.name - description = "My Event Description" - - input { - streaming_protocol = "RTMP" - ip_access_control_allow { - name = "AllowAll" - address = "0.0.0.0" - subnet_prefix_length = 0 - } - } - - encoding { - type = "Standard" - preset_name = "Default720p" - stretch_mode = "AutoFit" - key_frame_interval = "PT2S" - } - - preview { - ip_access_control_allow { - name = "AllowAll" - address = "0.0.0.0" - subnet_prefix_length = 0 - } - } - - stream_options = ["LowLatency"] - use_static_hostname = true - hostname_prefix = "special-event" - transcription_languages = ["en-US"] -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `input` - (Required) A `input` block as defined below. - -* `location` - (Required) The Azure Region where the Live Event should exist. Changing this forces a new Live Event to be created. - -* `media_services_account_name` - (Required) The Media Services account name. Changing this forces a new Live Event to be created. - -* `name` - (Required) The name which should be used for this Live Event. Changing this forces a new Live Event to be created. - -* `resource_group_name` - (Required) The name of the Resource Group where the Live Event should exist. Changing this forces a new Live Event to be created. - ---- - -* `auto_start_enabled` - (Optional) The flag indicates if the resource should be automatically started on creation. Changing this forces a new resource to be created. - -* `cross_site_access_policy` - (Optional) A `cross_site_access_policy` block as defined below. - -* `description` - (Optional) A description for the live event. - -* `encoding` - (Optional) A `encoding` block as defined below. - -* `hostname_prefix` - (Optional) When `use_static_hostname` is set to true, the `hostname_prefix` specifies the first part of the hostname assigned to the live event preview and ingest endpoints. The final hostname would be a combination of this prefix, the media service account name and a short code for the Azure Media Services data center. - -* `preview` - (Optional) A `preview` block as defined below. - -* `stream_options` - (Optional) A list of options to use for the LiveEvent. Possible values are `Default`, `LowLatency`, `LowLatencyV2`. Please see more at this [document](https://learn.microsoft.com/en-us/azure/media-services/latest/live-event-latency-reference#lowlatency-and-lowlatencyv2-options). Changing this forces a new resource to be created. - -* `tags` - (Optional) A mapping of tags which should be assigned to the Live Event. - -* `transcription_languages` - (Optional) Specifies a list of languages (locale) to be used for speech-to-text transcription – it should match the spoken language in the audio track. The value should be in `BCP-47` format (e.g: `en-US`). [See the Microsoft Documentation for more information about the live transcription feature and the list of supported languages](https://go.microsoft.com/fwlink/?linkid=2133742 ). - -* `use_static_hostname` - (Optional) Specifies whether a static hostname would be assigned to the live event preview and ingest endpoints. Changing this forces a new Live Event to be created. - ---- - -A `cross_site_access_policy` block supports the following: - -* `client_access_policy` - (Optional) The content of clientaccesspolicy.xml used by Silverlight. - -* `cross_domain_policy` - (Optional) The content of the Cross Domain Policy (`crossdomain.xml`). - ---- - -A `encoding` block supports the following: - -* `key_frame_interval` - (Optional) Use an `ISO 8601` time value between 0.5 to 20 seconds to specify the output fragment length for the video and audio tracks of an encoding live event. For example, use `PT2S` to indicate 2 seconds. For the video track it also defines the key frame interval, or the length of a GoP (group of pictures). The value cannot be set for pass-through live events. Defaults to `PT2S`. - -* `preset_name` - (Optional) The optional encoding preset name, used when `type` is not `None`. If the `type` is set to `Standard`, then the default preset name is `Default720p`. Else if the `type` is set to `Premium1080p`, Changing this forces a new resource to be created. - -* `stretch_mode` - (Optional) Specifies how the input video will be resized to fit the desired output resolution(s). Allowed values are `None`, `AutoFit` or `AutoSize`. Default is `None`. - -* `type` - (Optional) Live event type. Possible values are `None`, `Premium1080p`, `PassthroughBasic`, `PassthroughStandard` and `Standard`. When set to `None`, the service simply passes through the incoming video and audio layer(s) to the output. When `type` is set to `Standard` or `Premium1080p`, a live encoder transcodes the incoming stream into multiple bitrates or layers. Defaults to `None`. Changing this forces a new resource to be created. - --> [More information can be found in the Microsoft Documentation](https://go.microsoft.com/fwlink/?linkid=2095101). - ---- - -A `input` block supports the following: - -* `access_token` - (Optional) A UUID in string form to uniquely identify the stream. If omitted, the service will generate a unique value. Changing this forces a new value to be created. - -* `ip_access_control_allow` - (Optional) One or more `ip_access_control_allow` blocks as defined below. - -* `key_frame_interval_duration` - (Optional) ISO 8601 time duration of the key frame interval duration of the input. This value sets the `EXT-X-TARGETDURATION` property in the HLS output. For example, use PT2S to indicate 2 seconds. This field cannot be set when `type` is set to `Encoding`. - -* `streaming_protocol` - (Optional) The input protocol for the live event. Allowed values are `FragmentedMP4` and `RTMP`. Changing this forces a new resource to be created. - ---- - -A `ip_access_control_allow` block supports the following: - -* `address` - (Optional) The IP address or CIDR range. - -* `name` - (Optional) The friendly name for the IP address range. - -* `subnet_prefix_length` - (Optional) The subnet mask prefix length (see CIDR notation). - ---- - -A `preview` block supports the following: - -* `alternative_media_id` - (Optional) An alternative media identifier associated with the streaming locator created for the preview. The identifier can be used in the `CustomLicenseAcquisitionUrlTemplate` or the `CustomKeyAcquisitionUrlTemplate` of the Streaming Policy specified in the `streaming_policy_name` field. - -* `ip_access_control_allow` - (Optional) One or more `ip_access_control_allow` blocks as defined above. - -* `preview_locator` - (Optional) The identifier of the preview locator in GUID format. Specifying this at creation time allows the caller to know the preview locator url before the event is created. If omitted, the service will generate a random identifier. Changing this forces a new resource to be created. - -* `streaming_policy_name` - (Optional) The name of streaming policy used for the live event preview. Changing this forces a new resource to be created. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Live Event. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Live Event. -* `read` - (Defaults to 5 minutes) Used when retrieving the Live Event. -* `update` - (Defaults to 30 minutes) Used when updating the Live Event. -* `delete` - (Defaults to 30 minutes) Used when deleting the Live Event. - -## Import - -Live Events can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_media_live_event.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Media/mediaServices/account1/liveEvents/event1 -``` diff --git a/website/docs/r/media_live_output.html.markdown b/website/docs/r/media_live_output.html.markdown deleted file mode 100644 index ed88cde28a4de..0000000000000 --- a/website/docs/r/media_live_output.html.markdown +++ /dev/null @@ -1,121 +0,0 @@ ---- -subcategory: "Media" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_media_live_event_output" -description: |- - Manages an Azure Media Live Event Output. ---- - -# azurerm_media_live_event_output - -Manages a Azure Media Live Event Output. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "media-resources" - location = "West Europe" -} - -resource "azurerm_storage_account" "example" { - name = "examplestoracc" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "example" { - name = "examplemediaacc" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - storage_account { - id = azurerm_storage_account.example.id - is_primary = true - } -} - -resource "azurerm_media_asset" "example" { - name = "inputAsset" - resource_group_name = azurerm_resource_group.example.name - media_services_account_name = azurerm_media_services_account.example.name -} - -resource "azurerm_media_live_event" "example" { - name = "exampleevent" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - media_services_account_name = azurerm_media_services_account.example.name - description = "My Event Description" - - input { - streaming_protocol = "RTMP" - key_frame_interval_duration = "PT6S" - ip_access_control_allow { - name = "AllowAll" - address = "0.0.0.0" - subnet_prefix_length = 0 - } - } -} - -resource "azurerm_media_live_event_output" "example" { - name = "exampleoutput" - live_event_id = azurerm_media_live_event.example.id - archive_window_duration = "PT5M" - asset_name = azurerm_media_asset.example.name - description = "Test live output 1" - manifest_name = "testmanifest" - output_snap_time_in_seconds = 0 - hls_fragments_per_ts_segment = 5 - rewind_window_duration = "PT5M" -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `archive_window_duration` - (Required) `ISO 8601` time between 1 minute to 25 hours to indicate the maximum content length that can be archived in the asset for this live output. This also sets the maximum content length for the rewind window. For example, use `PT1H30M` to indicate 1 hour and 30 minutes of archive window. Changing this forces a new Live Output to be created. - -* `asset_name` - (Required) The asset that the live output will write to. Changing this forces a new Live Output to be created. - -* `live_event_id` - (Required) The id of the live event. Changing this forces a new Live Output to be created. - -* `name` - (Required) The name which should be used for this Live Event Output. Changing this forces a new Live Output to be created. - ---- - -* `description` - (Optional) The description of the live output. Changing this forces a new Live Output to be created. - -* `hls_fragments_per_ts_segment` - (Optional) The number of fragments in an HTTP Live Streaming (HLS) TS segment in the output of the live event. This value does not affect the packing ratio for HLS CMAF output. Changing this forces a new Live Output to be created. - -* `manifest_name` - (Optional) The manifest file name. If not provided, the service will generate one automatically. Changing this forces a new Live Output to be created. - -* `output_snap_time_in_seconds` - (Optional) The initial timestamp that the live output will start at, any content before this value will not be archived. Changing this forces a new Live Output to be created. - -* `rewind_window_duration` - (Optional) `ISO 8601` time between 1 minute to the duration of `archive_window_duration` to control seek-able window length during Live. The service won't use this property once LiveOutput stops. The archived VOD will have full content with original ArchiveWindowLength. For example, use `PT1H30M` to indicate 1 hour and 30 minutes of rewind window length. Service will use implicit default value 30m only if Live Event enables LL. Changing this forces a new Live Output to be created. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Live Output. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Live Output. -* `read` - (Defaults to 5 minutes) Used when retrieving the Live Output. -* `delete` - (Defaults to 30 minutes) Used when deleting the Live Output. - -## Import - -Live Outputs can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_media_live_event_output.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Media/mediaServices/account1/liveEvents/event1/liveOutputs/output1 -``` diff --git a/website/docs/r/media_services_account.html.markdown b/website/docs/r/media_services_account.html.markdown deleted file mode 100644 index dc4d248ef27f9..0000000000000 --- a/website/docs/r/media_services_account.html.markdown +++ /dev/null @@ -1,150 +0,0 @@ ---- -subcategory: "Media" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_media_services_account" -description: |- - Manages a Media Services Account. ---- - -# azurerm_media_services_account - -Manages a Media Services Account. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "media-resources" - location = "West Europe" -} - -resource "azurerm_storage_account" "example" { - name = "examplestoracc" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "example" { - name = "examplemediaacc" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - storage_account { - id = azurerm_storage_account.example.id - is_primary = true - } -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) Specifies the name of the Media Services Account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created. - -* `resource_group_name` - (Required) The name of the resource group in which to create the Media Services Account. Changing this forces a new resource to be created. - -* `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - -* `storage_account` - (Required) One or more `storage_account` blocks as defined below. - -* `encryption` - (Optional) An `encryption` block as defined below. - -* `identity` - (Optional) An `identity` block as defined below. - -* `public_network_access_enabled` - (Optional) Whether public network access is allowed for this server. Defaults to `true`. - -* `storage_authentication_type` - (Optional) Specifies the storage authentication type. Possible value is `ManagedIdentity` or `System`. - -* `key_delivery_access_control` - (Optional) A `key_delivery_access_control` block as defined below. - -* `tags` - (Optional) A mapping of tags assigned to the resource. - ---- - -A `storage_account` block supports the following: - -* `id` - (Required) Specifies the ID of the Storage Account that will be associated with the Media Services instance. - -* `is_primary` - (Optional) Specifies whether the storage account should be the primary account or not. Defaults to `false`. - -~> **NOTE:** Whilst multiple `storage_account` blocks can be specified - one of them must be set to the primary - -* `managed_identity` - (Optional) A `managed_identity` block as defined below. - ---- - -A `encryption` block supports the following: - -* `type` - (Optional) Specifies the type of key used to encrypt the account data. Possible values are `SystemKey` and `CustomerKey`. Defaults to `SystemKey`. - -* `key_vault_key_identifier` - (Optional) Specifies the URI of the Key Vault Key used to encrypt data. The key may either be versioned (for example https://vault/keys/mykey/version1) or reference a key without a version (for example https://vault/keys/mykey). - -* `managed_identity` - (Optional) A `managed_identity` block as defined below. - ---- - -A `identity` block supports the following: - -* `type` - (Required) Specifies the type of Managed Service Identity that should be configured on this Media Services Account. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both). - -* `identity_ids` - (Optional) Specifies a list of User Assigned Managed Identity IDs to be assigned to this Media Services Account. - ---- - -A `key_delivery_access_control` block supports the following: - -* `default_action` - (Optional) The Default Action to use when no rules match from `ip_allow_list`. Possible values are `Allow` and `Deny`. - -* `ip_allow_list` - (Optional) One or more IP Addresses, or CIDR Blocks which should be able to access the Key Delivery. - ---- - -A `managed_identity` block supports the following: - -* `user_assigned_identity_id` - (Optional) The ID of the User Assigned Identity. This value can only be set when `use_system_assigned_identity` is `false` - -* `use_system_assigned_identity` - (Optional) Whether to use System Assigned Identity. Possible Values are `true` and `false`. - ---- - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Media Services Account. - -* `identity` - An `identity` block as defined below. - ---- - -An `encryption` block exports the following: - -* `current_key_identifier` - The current key used to encrypt the Media Services Account, including the key version. - ---- - -An `identity` block exports the following: - -* `principal_id` - The Principal ID associated with this Managed Service Identity. - -* `tenant_id` - The Tenant ID associated with this Managed Service Identity. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Media Services Account. -* `update` - (Defaults to 30 minutes) Used when updating the Media Services Account. -* `read` - (Defaults to 5 minutes) Used when retrieving the Media Services Account. -* `delete` - (Defaults to 30 minutes) Used when deleting the Media Services Account. - -## Import - -Media Services Accounts can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_media_services_account.account /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Media/mediaServices/account1 -``` diff --git a/website/docs/r/media_services_account_filter.html.markdown b/website/docs/r/media_services_account_filter.html.markdown deleted file mode 100644 index 9169690e145be..0000000000000 --- a/website/docs/r/media_services_account_filter.html.markdown +++ /dev/null @@ -1,165 +0,0 @@ ---- -subcategory: "Media" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_media_services_account_filter" -description: |- - Manages a Media Services Account Filter. ---- - -# azurerm_media_services_account_filter - -Manages a Media Services Account Filter. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "media-resources" - location = "West Europe" -} - -resource "azurerm_storage_account" "example" { - name = "examplestoracc" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "example" { - name = "examplemediaacc" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - storage_account { - id = azurerm_storage_account.example.id - is_primary = true - } -} - -resource "azurerm_media_services_account_filter" "example" { - name = "Filter1" - resource_group_name = azurerm_resource_group.test.name - media_services_account_name = azurerm_media_services_account.test.name - first_quality_bitrate = 128000 - - presentation_time_range { - start_in_units = 0 - end_in_units = 15 - presentation_window_in_units = 90 - live_backoff_in_units = 0 - unit_timescale_in_milliseconds = 1000 - force_end = false - } - - track_selection { - condition { - property = "Type" - operation = "Equal" - value = "Audio" - } - - condition { - property = "Language" - operation = "NotEqual" - value = "en" - } - - condition { - property = "FourCC" - operation = "NotEqual" - value = "EC-3" - } - } - - - track_selection { - condition { - property = "Type" - operation = "Equal" - value = "Video" - } - - condition { - property = "Bitrate" - operation = "Equal" - value = "3000000-5000000" - } - } -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `name` - (Required) The name which should be used for this Account Filter. Changing this forces a new Account Filter to be created. - -* `resource_group_name` - (Required) The name of the Resource Group where the Account Filter should exist. Changing this forces a new Account Filter to be created. - -* `media_services_account_name` - (Required) The Media Services account name. Changing this forces a new Account Filter to be created. - ---- - -* `first_quality_bitrate` - (Optional) The first quality bitrate. Sets the first video track to appear in the Live Streaming playlist to allow HLS native players to start downloading from this quality level at the beginning. - -* `presentation_time_range` - (Optional) A `presentation_time_range` block as defined below. - -* `track_selection` - (Optional) One or more `track_selection` blocks as defined below. - ---- - -A `presentation_time_range` block supports the following: - -* `unit_timescale_in_milliseconds` - (Required) Specified as the number of milliseconds in one unit timescale. For example, if you want to set a `start_in_units` at 30 seconds, you would use a value of 30 when using the `unit_timescale_in_milliseconds` in 1000. Or if you want to set `start_in_units` in 30 milliseconds, you would use a value of 30 when using the `unit_timescale_in_milliseconds` in 1. Applies timescale to `start_in_units`, `start_timescale` and `presentation_window_in_timescale` and `live_backoff_in_timescale`. - -* `end_in_units` - (Optional) The absolute end time boundary. Applies to Video on Demand (VoD). -For the Live Streaming presentation, it is silently ignored and applied when the presentation ends and the stream becomes VoD. This is a long value that represents an absolute end point of the presentation, rounded to the closest next GOP start. The unit is defined by `unit_timescale_in_milliseconds`, so an `end_in_units` of 180 would be for 3 minutes. Use `start_in_units` and `end_in_units` to trim the fragments that will be in the playlist (manifest). For example, `start_in_units` set to 20 and `end_in_units` set to 60 using `unit_timescale_in_milliseconds` in 1000 will generate a playlist that contains fragments from between 20 seconds and 60 seconds of the VoD presentation. If a fragment straddles the boundary, the entire fragment will be included in the manifest. - -* `force_end` - (Optional) Indicates whether the `end_in_units` property must be present. If true, `end_in_units` must be specified or a bad request code is returned. Applies to Live Streaming only. Allowed values: `false`, `true`. - -* `live_backoff_in_units` - (Optional) The relative to end right edge. Applies to Live Streaming only. -This value defines the latest live position that a client can seek to. Using this property, you can delay live playback position and create a server-side buffer for players. The unit is defined by `unit_timescale_in_milliseconds`. The maximum live back off duration is 300 seconds. For example, a value of 20 means that the latest available content is 20 seconds delayed from the real live edge. - -* `presentation_window_in_units` - (Optional) The relative to end sliding window. Applies to Live Streaming only. Use `presentation_window_in_units` to apply a sliding window of fragments to include in a playlist. The unit is defined by `unit_timescale_in_milliseconds`. For example, set `presentation_window_in_units` to 120 to apply a two-minute sliding window. Media within 2 minutes of the live edge will be included in the playlist. If a fragment straddles the boundary, the entire fragment will be included in the playlist. The minimum presentation window duration is 60 seconds. - -* `start_in_units` - (Optional) The absolute start time boundary. Applies to Video on Demand (VoD) or Live Streaming. This is a long value that represents an absolute start point of the stream. The value gets rounded to the closest next GOP start. The unit is defined by `unit_timescale_in_milliseconds`, so a `start_in_units` of 15 would be for 15 seconds. Use `start_in_units` and `end_in_units` to trim the fragments that will be in the playlist (manifest). For example, `start_in_units` set to 20 and `end_in_units` set to 60 using `unit_timescale_in_milliseconds` in 1000 will generate a playlist that contains fragments from between 20 seconds and 60 seconds of the VoD presentation. If a fragment straddles the boundary, the entire fragment will be included in the manifest. - ---- - -A `selection` block supports the following: - -* `operation` - (Required) The condition operation to test a track property against. Supported values are `Equal` and `NotEqual`. - -* `property` - (Required) The track property to compare. Supported values are `Bitrate`, `FourCC`, `Language`, `Name` and `Type`. Check [documentation](https://docs.microsoft.com/azure/media-services/latest/filters-concept) for more details. - -* `value` - (Required) The track property value to match or not match. - ---- - -A `track_selection` block supports the following: - -* `condition` - (Required) One or more `selection` blocks as defined above. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Account Filter. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Account Filter. -* `read` - (Defaults to 5 minutes) Used when retrieving the Account Filter. -* `update` - (Defaults to 30 minutes) Used when updating the Account Filter. -* `delete` - (Defaults to 30 minutes) Used when deleting the Account Filter. - -## Import - -Account Filters can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_media_services_account_filter.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Media/mediaServices/account1/accountFilters/filter1 -``` diff --git a/website/docs/r/media_streaming_endpoint.html.markdown b/website/docs/r/media_streaming_endpoint.html.markdown deleted file mode 100644 index ec3e849ed7b0d..0000000000000 --- a/website/docs/r/media_streaming_endpoint.html.markdown +++ /dev/null @@ -1,216 +0,0 @@ ---- -subcategory: "Media" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_media_streaming_endpoint" -description: |- - Manages a Streaming Endpoint. ---- - -# azurerm_media_streaming_endpoint - -Manages a Streaming Endpoint. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "media-resources" - location = "West Europe" -} - -resource "azurerm_storage_account" "example" { - name = "examplestoracc" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "example" { - name = "examplemediaacc" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - storage_account { - id = azurerm_storage_account.example.id - is_primary = true - } -} - -resource "azurerm_media_streaming_endpoint" "example" { - name = "endpoint1" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - media_services_account_name = azurerm_media_services_account.example.name - scale_units = 2 -} -``` - -## Example Usage with Access Control - -```hcl -resource "azurerm_resource_group" "example" { - name = "media-resources" - location = "West Europe" -} - -resource "azurerm_storage_account" "example" { - name = "examplestoracc" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "example" { - name = "examplemediaacc" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - storage_account { - id = azurerm_storage_account.example.id - is_primary = true - } -} - -resource "azurerm_media_streaming_endpoint" "example" { - name = "endpoint1" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - media_services_account_name = azurerm_media_services_account.example.name - scale_units = 2 - access_control { - ip_allow { - name = "AllowedIP" - address = "192.168.1.1" - } - - ip_allow { - name = "AnotherIp" - address = "192.168.1.2" - } - - akamai_signature_header_authentication_key { - identifier = "id1" - expiration = "2030-12-31T16:00:00Z" - base64_key = "dGVzdGlkMQ==" - } - - akamai_signature_header_authentication_key { - identifier = "id2" - expiration = "2032-01-28T16:00:00Z" - base64_key = "dGVzdGlkMQ==" - } - } -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `location` - (Required) The Azure Region where the Streaming Endpoint should exist. Changing this forces a new Streaming Endpoint to be created. - -* `media_services_account_name` - (Required) The Media Services account name. Changing this forces a new Streaming Endpoint to be created. - -* `name` - (Required) The name which should be used for this Streaming Endpoint maximum length is `24`. Changing this forces a new Streaming Endpoint to be created. - -* `resource_group_name` - (Required) The name of the Resource Group where the Streaming Endpoint should exist. Changing this forces a new Streaming Endpoint to be created. - -* `scale_units` - (Required) The number of scale units. To create a Standard Streaming Endpoint set `0`. For Premium Streaming Endpoint valid values are between `1` and `10`. - ---- - -* `access_control` - (Optional) A `access_control` block as defined below. - -* `auto_start_enabled` - (Optional) The flag indicates if the resource should be automatically started on creation. - -* `cdn_enabled` - (Optional) The CDN enabled flag. - -* `cdn_profile` - (Optional) The CDN profile name. - -* `cdn_provider` - (Optional) The CDN provider name. Supported value are `StandardVerizon`,`PremiumVerizon` and `StandardAkamai` - -* `cross_site_access_policy` - (Optional) A `cross_site_access_policy` block as defined below. - -* `custom_host_names` - (Optional) The custom host names of the streaming endpoint. - -* `description` - (Optional) The streaming endpoint description. - -* `max_cache_age_seconds` - (Optional) Max cache age in seconds. - -* `tags` - (Optional) A mapping of tags which should be assigned to the Streaming Endpoint. - ---- - -A `access_control` block supports the following: - -* `akamai_signature_header_authentication_key` - (Optional) One or more `akamai_signature_header_authentication_key` blocks as defined below. - -* `ip_allow` - (Optional) A `ip_allow` block as defined below. - ---- - -A `akamai_signature_header_authentication_key` block supports the following: - -* `base64_key` - (Optional) Authentication key. - -* `expiration` - (Optional) The expiration time of the authentication key. - -* `identifier` - (Optional) Identifier of the key. - ---- - -A `ip_allow` block supports the following: - -* `address` - (Optional) The IP address to allow. - -* `name` - (Optional) The friendly name for the IP address range. - -* `subnet_prefix_length` - (Optional) The subnet mask prefix length (see CIDR notation). - ---- -A `cross_site_access_policy` block supports the following: - -* `client_access_policy` - (Optional) The content of `clientaccesspolicy.xml` used by Silverlight. - -* `cross_domain_policy` - (Optional) The content of `crossdomain.xml` used by Silverlight. - ---- - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Streaming Endpoint. - -* `host_name` - The host name of the Streaming Endpoint. - -* `sku` - A `sku` block defined as below. - ---- - -A `sku` block supports the following: - -* `name` - The sku name of Streaming Endpoint. - -* `capacity` - The sku capacity of Streaming Endpoint. - ---- - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Streaming Endpoint. -* `read` - (Defaults to 5 minutes) Used when retrieving the Streaming Endpoint. -* `update` - (Defaults to 30 minutes) Used when updating the Streaming Endpoint. -* `delete` - (Defaults to 30 minutes) Used when deleting the Streaming Endpoint. - -## Import - -Streaming Endpoints can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_media_streaming_endpoint.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Media/mediaServices/service1/streamingEndpoints/endpoint1 -``` diff --git a/website/docs/r/media_streaming_locator.html.markdown b/website/docs/r/media_streaming_locator.html.markdown deleted file mode 100644 index c0b331f8a264f..0000000000000 --- a/website/docs/r/media_streaming_locator.html.markdown +++ /dev/null @@ -1,127 +0,0 @@ ---- -subcategory: "Media" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_media_streaming_locator" -description: |- - Manages a Media Streaming Locator. ---- - -# azurerm_media_streaming_locator - -Manages a Media Streaming Locator. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "media-resources" - location = "West Europe" -} - -resource "azurerm_storage_account" "example" { - name = "examplestoracc" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "example" { - name = "examplemediaacc" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - storage_account { - id = azurerm_storage_account.example.id - is_primary = true - } -} - -resource "azurerm_media_services_account_filter" "example" { - name = "Filter1" - resource_group_name = azurerm_resource_group.example.name - media_services_account_name = azurerm_media_services_account.example.name -} - -resource "azurerm_media_asset" "example" { - name = "Asset1" - resource_group_name = azurerm_resource_group.example.name - media_services_account_name = azurerm_media_services_account.example.name - description = "Asset description" -} - -resource "azurerm_media_streaming_locator" "example" { - name = "example" - resource_group_name = azurerm_resource_group.example.name - media_services_account_name = azurerm_media_services_account.example.name - asset_name = azurerm_media_asset.example.name - streaming_policy_name = "Predefined_ClearStreamingOnly" - filter_names = [azurerm_media_services_account_filter.example.name] -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `asset_name` - (Required) Asset Name. Changing this forces a new Streaming Locator to be created. - -* `media_services_account_name` - (Required) The Media Services account name. Changing this forces a new Streaming Locator to be created. - -* `name` - (Required) The name which should be used for this Streaming Locator. Changing this forces a new Streaming Locator to be created. - -* `resource_group_name` - (Required) The name of the Resource Group where the Streaming Locator should exist. Changing this forces a new Streaming Locator to be created. - -* `streaming_policy_name` - (Required) Name of the Streaming Policy used by this Streaming Locator. Either specify the name of Streaming Policy you created or use one of the predefined Streaming Policies. The predefined Streaming Policies available are: `Predefined_DownloadOnly`, `Predefined_ClearStreamingOnly`, `Predefined_DownloadAndClearStreaming`, `Predefined_ClearKey`, `Predefined_MultiDrmCencStreaming` and `Predefined_MultiDrmStreaming`. Changing this forces a new Streaming Locator to be created. - ---- - -* `alternative_media_id` - (Optional) Alternative Media ID of this Streaming Locator. Changing this forces a new Streaming Locator to be created. - -* `content_key` - (Optional) One or more `content_key` blocks as defined below. Changing this forces a new Streaming Locator to be created. - -* `default_content_key_policy_name` - (Optional) Name of the default Content Key Policy used by this Streaming Locator.Changing this forces a new Streaming Locator to be created. - -* `end_time` - (Optional) The end time of the Streaming Locator. Changing this forces a new Streaming Locator to be created. - -* `filter_names` - (Optional) A list of names of asset or account filters which apply to this Streaming Locator. Changing this forces a new Streaming Locator to be created. - -* `start_time` - (Optional) The start time of the Streaming Locator. Changing this forces a new Streaming Locator to be created. - -* `streaming_locator_id` - (Optional) The ID of the Streaming Locator. Changing this forces a new Streaming Locator to be created. - ---- - -A `content_key` block supports the following: - -* `content_key_id` - (Optional) ID of Content Key. Changing this forces a new Streaming Locator to be created. - -* `label_reference_in_streaming_policy` - (Optional) Label of Content Key as specified in the Streaming Policy. Changing this forces a new Streaming Locator to be created. - -* `policy_name` - (Optional) Content Key Policy used by Content Key. Changing this forces a new Streaming Locator to be created. - -* `type` - (Optional) Encryption type of Content Key. Supported values are `CommonEncryptionCbcs`, `CommonEncryptionCenc` or `EnvelopeEncryption`. Changing this forces a new Streaming Locator to be created. - -* `value` - (Optional) Value of Content Key. Changing this forces a new Streaming Locator to be created. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Streaming Locator. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Streaming Locator. -* `read` - (Defaults to 5 minutes) Used when retrieving the Streaming Locator. -* `delete` - (Defaults to 30 minutes) Used when deleting the Streaming Locator. - -## Import - -Streaming Locators can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_media_streaming_locator.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Media/mediaServices/account1/streamingLocators/locator1 -``` diff --git a/website/docs/r/media_streaming_policy.html.markdown b/website/docs/r/media_streaming_policy.html.markdown deleted file mode 100644 index 534612b318561..0000000000000 --- a/website/docs/r/media_streaming_policy.html.markdown +++ /dev/null @@ -1,276 +0,0 @@ ---- -subcategory: "Media" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_media_streaming_policy" -description: |- - Manages a Streaming Policy. ---- - -# azurerm_media_streaming_policy - -Manages a Streaming Policy. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "media-resources" - location = "West Europe" -} - -resource "azurerm_storage_account" "example" { - name = "examplestoracc" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "example" { - name = "examplemediaacc" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - storage_account { - id = azurerm_storage_account.example.id - is_primary = true - } -} - -resource "azurerm_media_content_key_policy" "example" { - name = "example" - resource_group_name = azurerm_resource_group.example.name - media_services_account_name = azurerm_media_services_account.example.name - policy_option { - name = "fairPlay" - fairplay_configuration { - ask = "bb566284cc124a21c435a92cd3c108c4" - pfx = "MIIG7gIBAzCCBqoGCSqGSIb3DQEHAaCCBpsEggaXMIIGkzCCA7wGCSqGSIb3DQEHAaCCA60EggOpMIIDpTCCA6EGCyqGSIb3DQEMCgECoIICtjCCArIwHAYKKoZIhvcNAQwBAzAOBAiV65vFfxLDVgICB9AEggKQx2dxWefICYodVhRLSQVMJRYy5QkM1VySPAXGP744JHrb+s0Y8i/6a+a5itZGlXw3kvxyflHtSsuuBCaYJ1WOCp9jspixJEliFHXTcel96AgZlT5tB7vC6pdZnz8rb+lyxFs99x2CW52EsadoDlRsYrmkmKdnB0cx2JHJbLeXuKV/fjuRJSqCFcDa6Nre8AlBX0zKGIYGLJ1Cfpora4kNTXxu0AwEowzGmoCxqrpKbO1QDi1hZ1qHrtZ1ienAKfiTXaGH4AMQzyut0AaymxalrRbXibJYuefLRvXqx0oLZKVLAX8fR1gnac6Mrr7GkdHaKCsk4eOi98acR7bjiyRRVYYS4B6Y0tCeRJNe6zeYVmLdtatuOlOEVDT6AKrJJMFMyITVS+2D771ge6m37FbJ36K3/eT/HRq1YDsxfD/BY+X7eMIwQrVnD5nK7avXfbIni57n5oWLkE9Vco8uBlMdrx4xHt9vpe42Pz2Yh2O4WtvxcgxrAknvPpV1ZsAJCfvm9TTcg8qZpjyePn3B9TvFVSXMJHn/rzu6OJAgFgVFAe1tPGLh1XBxAvwpB8EqcycIIUUFUBy4HgYCicjI2jp6s8Kk293Uc/TA2623LrWgP/Xm5hVB7lP1k6W9LDivOlAA96D0Cbk08Yv6arkCYj7ONFO8VZbO0zKAAOLHMw/ZQRIutGLrDlqgTDeRXRuReX7TNjDBxp2rzJBY0uU5g9BMFxQrbQwEx9HsnO4dVFG4KLbHmYWhlwS2V2uZtY6D6elOXY3SX50RwhC4+0trUMi/ODtOxAc+lMQk2FNDcNeKIX5wHwFRS+sFBu5Um4Jfj6Ua4w1izmu2KiPfDd3vJsm5Dgcci3fPfdSfpIq4uR6d3JQxgdcwEwYJKoZIhvcNAQkVMQYEBAEAAAAwWwYJKoZIhvcNAQkUMU4eTAB7ADcAMQAxADAANABBADgARgAtADQAQgBFADAALQA0AEEAMgA4AC0AOAAyADIANQAtAEYANwBBADcAMwBGAEMAQQAwAEMARABEAH0wYwYJKwYBBAGCNxEBMVYeVABNAGkAYwByAG8AcwBvAGYAdAAgAEIAYQBzAGUAIABDAHIAeQBwAHQAbwBnAHIAYQBwAGgAaQBjACAAUAByAG8AdgBpAGQAZQByACAAdgAxAC4AMDCCAs8GCSqGSIb3DQEHBqCCAsAwggK8AgEAMIICtQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQISS7mG/riQJkCAgfQgIICiPSGg5axP4JM+GmiVEqOHTVAPw2AM8OPnn1q0mIw54oC2WOJw3FFThYHmxTQzQ1feVmnkVCv++eFp+BYTcWTa+ehl/3/Nvr5uLTzDxmCShacKwoWXOKtSLh6mmgydvMqSf6xv1bPsloodtrRxhprI2lBNBW2uw8az9eLdvURYmhjGPf9klEy/6OCA5jDT5XZMunwiQT5mYNMF7wAQ5PCz2dJQqm1n72A6nUHPkHEusN7iH/+mv5d3iaKxn7/ShxLKHfjMd+r/gv27ylshVHiN4mVStAg+MiLrVvr5VH46p6oosImvS3ZO4D5wTmh/6wtus803qN4QB/Y9n4rqEJ4Dn619h+6O7FChzWkx7kvYIzIxvfnj1PCFTEjUwc7jbuF013W/z9zQi2YEq9AzxMcGro0zjdt2sf30zXSfaRNt0UHHRDkLo7yFUJG5Ka1uWU8paLuXUUiiMUf24Bsfdg2A2n+3Qa7g25OvAM1QTpMwmMWL9sY2hxVUGIKVrnj8c4EKuGJjVDXrze5g9O/LfZr5VSjGu5KsN0eYI3mcePF7XM0azMtTNQYVRmeWxYW+XvK5MaoLEkrFG8C5+JccIlN588jowVIPqP321S/EyFiAmrRdAWkqrc9KH+/eINCFqjut2YPkCaTM9mnJAAqWgggUWkrOKT/ByS6IAQwyEBNFbY0TWyxKt6vZL1EW/6HgZCsxeYycNhnPr2qJNZZMNzmdMRp2GRLcfBH8KFw1rAyua0VJoTLHb23ZAsEY74BrEEiK9e/oOjXkHzQjlmrfQ9rSN2eQpRrn0W8I229WmBO2suG+AQ3aY8kDtBMkjmJno7txUh1K5D6tJTO7MQp343A2AhyJkhYA7NPnDA7MB8wBwYFKw4DAhoEFPO82HDlCzlshWlnMoQPStm62TMEBBQsPmvwbZ5OlwC9+NDF1AC+t67WTgICB9A=" - pfx_password = "password" - rental_duration_seconds = 2249 - rental_and_lease_key_type = "PersistentUnlimited" - - } - open_restriction_enabled = true - } -} - -resource "azurerm_media_streaming_policy" "example" { - name = "Policy-1" - resource_group_name = azurerm_resource_group.example.name - media_services_account_name = azurerm_media_services_account.example.name - common_encryption_cenc { - clear_track { - condition { - property = "FourCC" - operation = "Equal" - value = "hev2" - } - } - - enabled_protocols { - download = false - dash = true - hls = false - smooth_streaming = false - } - - default_content_key { - label = "aesDefaultKey" - policy_name = azurerm_media_content_key_policy.example.name - } - - drm_playready { - custom_license_acquisition_url_template = "https://contoso.com/{AssetAlternativeId}/playready/{ContentKeyId}" - custom_attributes = "PlayReady CustomAttributes" - } - drm_widevine_custom_license_acquisition_url_template = "https://contoso.com/{AssetAlternativeId}/widevine/{ContentKeyId}" - } - - common_encryption_cbcs { - enabled_protocols { - download = false - dash = true - hls = false - smooth_streaming = false - } - drm_fairplay { - custom_license_acquisition_url_template = "https://contoso.com/{AssetAlternativeId}/fairplay/{ContentKeyId}" - allow_persistent_license = true - } - } -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `media_services_account_name` - (Required) The Media Services account name. Changing this forces a new Streaming Policy to be created. - -* `name` - (Required) The name which should be used for this Streaming Policy. Changing this forces a new Streaming Policy to be created. - -* `resource_group_name` - (Required) The name of the Resource Group where the Streaming Policy should exist. Changing this forces a new Streaming Policy to be created. - ---- - -* `common_encryption_cbcs` - (Optional) A `common_encryption_cbcs` block as defined below. Changing this forces a new Streaming Policy to be created. - -* `common_encryption_cenc` - (Optional) A `common_encryption_cenc` block as defined below. Changing this forces a new Streaming Policy to be created. - -* `default_content_key_policy_name` - (Optional) Default Content Key used by current Streaming Policy. Changing this forces a new Streaming Policy to be created. - -* `envelope_encryption` - (Optional) A `envelope_encryption` block as defined below. Changing this forces a new Streaming Policy to be created. - -* `no_encryption_enabled_protocols` - (Optional) A `no_encryption_enabled_protocols` block as defined below. Changing this forces a new Streaming Policy to be created. - ---- - -A `common_encryption_cbcs` block supports the following: - -* `clear_key_encryption` - (Optional) A `clear_key_encryption` block as defined below. Changing this forces a new Streaming Policy to be created. - -* `default_content_key` - (Optional) A `default_content_key` block as defined below. Changing this forces a new Streaming Policy to be created. - -* `drm_fairplay` - (Optional) A `drm_fairplay` block as defined below. Changing this forces a new Streaming Policy to be created. - -* `enabled_protocols` - (Optional) A `enabled_protocols` block as defined below. Changing this forces a new Streaming Policy to be created. - ---- - -A `common_encryption_cenc` block supports the following: - -* `clear_key_encryption` - (Optional) A `clear_key_encryption` block as defined below. Changing this forces a new Streaming Policy to be created. - -* `clear_track` - (Optional) One or more `clear_track` blocks as defined below. Changing this forces a new Streaming Policy to be created. - -* `content_key_to_track_mapping` - (Optional) One or more `content_key_to_track_mapping` blocks as defined below. Changing this forces a new Streaming Policy to be created. - -* `default_content_key` - (Optional) A `default_content_key` block as defined below. Changing this forces a new Streaming Policy to be created. - -* `drm_playready` - (Optional) A `drm_playready` block as defined below. Changing this forces a new Streaming Policy to be created. - -* `drm_widevine_custom_license_acquisition_url_template` - (Optional) The URL template for the custom service that delivers licenses to the end user. This is not required when using Azure Media Services for issuing licenses. Changing this forces a new Streaming Policy to be created. - -* `enabled_protocols` - (Optional) A `enabled_protocols` block as defined below. Changing this forces a new Streaming Policy to be created. - ---- - -A `clear_key_encryption` block supports the following: - -* `custom_keys_acquisition_url_template` - (Required) The URL template for the custom service that delivers content keys to the end user. This is not required when using Azure Media Services for issuing keys. Changing this forces a new Streaming Policy to be created. - --> **Note** Either `clear_key_encryption` or `drm` must be specified. - ---- - -A `clear_track` block supports the following: - -* `condition` - (Required) One or more `condition` blocks as defined below. Changing this forces a new Streaming Policy to be created. - ---- - -A `condition` block supports the following: - -* `operation` - (Required) The track property condition operation. Possible value is `Equal`. Changing this forces a new Streaming Policy to be created. - -* `property` - (Required) The track property type. Possible value is `FourCC`. Changing this forces a new Streaming Policy to be created. - -* `value` - (Required) The track property value. Changing this forces a new Streaming Policy to be created. - ---- - -A `content_key_to_track_mapping` block supports the following: - -* `label` - (Optional) Specifies the content key when creating a Streaming Locator. Changing this forces a new Streaming Policy to be created. - -* `policy_name` - (Optional) The policy used by the default key. Changing this forces a new Streaming Policy to be created. - -* `track` - (Required) One or more `track` blocks as defined below. Changing this forces a new Streaming Policy to be created. - ---- - -A `default_content_key` block supports the following: - -* `label` - (Optional) Label can be used to specify Content Key when creating a Streaming Locator. Changing this forces a new Streaming Policy to be created. - -* `policy_name` - (Optional) Policy used by Default Key. Changing this forces a new Streaming Policy to be created. - ---- - -A `drm_fairplay` block supports the following: - -* `allow_persistent_license` - (Optional) All license to be persistent or not. Changing this forces a new Streaming Policy to be created. - -* `custom_license_acquisition_url_template` - (Optional) The URL template for the custom service that delivers licenses to the end user. This is not required when using Azure Media Services for issuing licenses. Changing this forces a new Streaming Policy to be created. - ---- - -A `drm_playready` block supports the following: - -* `custom_attributes` - (Optional) Custom attributes for PlayReady. Changing this forces a new Streaming Policy to be created. - -* `custom_license_acquisition_url_template` - (Optional) The URL template for the custom service that delivers licenses to the end user. This is not required when using Azure Media Services for issuing licenses. Changing this forces a new Streaming Policy to be created. - ---- - -A `enabled_protocols` block supports the following: - -* `dash` - (Optional) Enable DASH protocol or not. Changing this forces a new Streaming Policy to be created. - -* `download` - (Optional) Enable Download protocol or not. Changing this forces a new Streaming Policy to be created. - -* `hls` - (Optional) Enable HLS protocol or not. Changing this forces a new Streaming Policy to be created. - -* `smooth_streaming` - (Optional) Enable SmoothStreaming protocol or not. Changing this forces a new Streaming Policy to be created. - ---- - -A `envelope_encryption` block supports the following: - -* `custom_keys_acquisition_url_template` - (Optional) The URL template for the custom service that delivers content keys to the end user. This is not required when using Azure Media Services for issuing keys. Changing this forces a new Streaming Policy to be created. - -* `default_content_key` - (Optional) A `default_content_key` block as defined above. Changing this forces a new Streaming Policy to be created. - -* `enabled_protocols` - (Optional) A `enabled_protocols` block as defined above. Changing this forces a new Streaming Policy to be created. - ---- - -A `no_encryption_enabled_protocols` block supports the following: - -* `dash` - (Optional) Enable DASH protocol or not. Changing this forces a new Streaming Policy to be created. - -* `download` - (Optional) Enable Download protocol or not. Changing this forces a new Streaming Policy to be created. - -* `hls` - (Optional) Enable HLS protocol or not. Changing this forces a new Streaming Policy to be created. - -* `smooth_streaming` - (Optional) Enable SmoothStreaming protocol or not. Changing this forces a new Streaming Policy to be created. - ---- - -A `track` block supports the following: - -* `condition` - (Required) One or more `condition` blocks as defined below. Changing this forces a new Streaming Policy to be created. - - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Streaming Policy. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Streaming Policy. -* `read` - (Defaults to 5 minutes) Used when retrieving the Streaming Policy. -* `delete` - (Defaults to 30 minutes) Used when deleting the Streaming Policy. - -## Import - -Streaming Policies can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_media_streaming_policy.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Media/mediaServices/account1/streamingPolicies/policy1 -``` diff --git a/website/docs/r/media_transform.html.markdown b/website/docs/r/media_transform.html.markdown deleted file mode 100644 index ff8f1f052ee27..0000000000000 --- a/website/docs/r/media_transform.html.markdown +++ /dev/null @@ -1,884 +0,0 @@ ---- -subcategory: "Media" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_media_transform" -description: |- - Manages a Transform. ---- - -# azurerm_media_transform - -Manages a Transform. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "media-resources" - location = "West Europe" -} - -resource "azurerm_storage_account" "example" { - name = "examplestoracc" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "example" { - name = "examplemediaacc" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - storage_account { - id = azurerm_storage_account.example.id - is_primary = true - } -} - -resource "azurerm_media_transform" "example" { - name = "transform1" - resource_group_name = azurerm_resource_group.example.name - media_services_account_name = azurerm_media_services_account.example.name - description = "My transform description" - output { - relative_priority = "Normal" - on_error_action = "ContinueJob" - builtin_preset { - preset_name = "AACGoodQualityAudio" - } - } -} - -``` - -## Example Usage with Multiple Outputs - -```hcl -resource "azurerm_resource_group" "example" { - name = "media-resources" - location = "West Europe" -} - -resource "azurerm_storage_account" "example" { - name = "examplestoracc" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_media_services_account" "example" { - name = "examplemediaacc" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - storage_account { - id = azurerm_storage_account.example.id - is_primary = true - } -} - -resource "azurerm_media_transform" "example" { - name = "transform1" - resource_group_name = azurerm_resource_group.example.name - media_services_account_name = azurerm_media_services_account.example.name - description = "My transform description" - output { - relative_priority = "Normal" - on_error_action = "ContinueJob" - builtin_preset { - preset_name = "AACGoodQualityAudio" - preset_configuration { - complexity = "Balanced" - interleave_output = "NonInterleavedOutput" - key_frame_interval_in_seconds = 123122.5 - max_bitrate_bps = 300000 - max_height = 480 - max_layers = 14 - min_bitrate_bps = 200000 - min_height = 360 - } - } - } - - output { - relative_priority = "Low" - on_error_action = "ContinueJob" - audio_analyzer_preset { - audio_language = "en-US" - audio_analysis_mode = "Basic" - experimental_options = { - env = "test" - } - } - } - - output { - relative_priority = "Low" - on_error_action = "StopProcessingJob" - face_detector_preset { - analysis_resolution = "StandardDefinition" - blur_type = "Med" - face_redactor_mode = "Combined" - experimental_options = { - env = "test" - } - } - } - - output { - relative_priority = "Normal" - on_error_action = "StopProcessingJob" - video_analyzer_preset { - audio_language = "en-US" - audio_analysis_mode = "Basic" - insights_type = "AllInsights" - experimental_options = { - env = "test" - } - } - } - - output { - relative_priority = "Low" - on_error_action = "ContinueJob" - custom_preset { - codec { - aac_audio { - bitrate = 128000 - channels = 2 - sampling_rate = 48000 - profile = "AacLc" - } - } - - codec { - copy_audio { - label = "test" - } - } - - codec { - copy_video { - label = "test" - } - } - - codec { - h264_video { - key_frame_interval = "PT1S" - stretch_mode = "AutoSize" - sync_mode = "Auto" - scene_change_detection_enabled = false - rate_control_mode = "ABR" - complexity = "Quality" - layer { - width = "64" - height = "64" - bitrate = 1045000 - max_bitrate = 1045000 - b_frames = 3 - slices = 0 - adaptive_b_frame_enabled = true - profile = "Auto" - level = "auto" - buffer_window = "PT5S" - reference_frames = 4 - crf = 23 - entropy_mode = "Cabac" - } - layer { - width = "64" - height = "64" - bitrate = 1000 - max_bitrate = 1000 - b_frames = 3 - frame_rate = "32" - slices = 1 - adaptive_b_frame_enabled = true - profile = "High444" - level = "auto" - buffer_window = "PT5S" - reference_frames = 4 - crf = 23 - entropy_mode = "Cavlc" - } - } - } - - codec { - h265_video { - key_frame_interval = "PT2S" - stretch_mode = "AutoSize" - sync_mode = "Auto" - scene_change_detection_enabled = false - complexity = "Speed" - layer { - width = "64" - height = "64" - bitrate = 1045000 - max_bitrate = 1045000 - b_frames = 3 - slices = 5 - adaptive_b_frame_enabled = true - profile = "Auto" - label = "test" - level = "auto" - buffer_window = "PT5S" - frame_rate = "32" - reference_frames = 4 - crf = 23 - } - } - } - - codec { - jpg_image { - stretch_mode = "AutoSize" - sync_mode = "Auto" - start = "10" - range = "100%%" - sprite_column = 1 - step = "10" - layer { - quality = 70 - height = "180" - label = "test" - width = "120" - } - } - } - - codec { - png_image { - stretch_mode = "AutoSize" - sync_mode = "Auto" - start = "{Best}" - range = "80" - step = "10" - layer { - height = "180" - label = "test" - width = "120" - } - } - } - - format { - jpg { - filename_pattern = "test{Basename}" - } - } - - format { - mp4 { - filename_pattern = "test{Bitrate}" - output_file { - labels = ["test", "ppe"] - } - } - } - - format { - png { - filename_pattern = "test{Basename}" - } - } - - format { - transport_stream { - filename_pattern = "test{Bitrate}" - output_file { - labels = ["prod"] - } - } - } - - filter { - crop_rectangle { - height = "240" - left = "30" - top = "360" - width = "70" - } - deinterlace { - parity = "TopFieldFirst" - mode = "AutoPixelAdaptive" - } - fade_in { - duration = "PT5S" - fade_color = "0xFF0000" - start = "10" - } - fade_out { - duration = "90%%" - fade_color = "#FF0C7B" - start = "10%%" - } - rotation = "Auto" - overlay { - audio { - input_label = "label.jpg" - start = "PT5S" - end = "PT30S" - fade_in_duration = "PT1S" - fade_out_duration = "PT2S" - audio_gain_level = 1.0 - } - } - overlay { - video { - input_label = "label.jpg" - start = "PT5S" - end = "PT30S" - fade_in_duration = "PT1S" - fade_out_duration = "PT2S" - audio_gain_level = 1.0 - opacity = 1.0 - position { - height = "180" - left = "20" - top = "240" - width = "140" - } - crop_rectangle { - height = "240" - left = "30" - top = "360" - width = "70" - } - } - } - } - } - } -} - -``` - -## Arguments Reference - -The following arguments are supported: - -* `media_services_account_name` - (Required) The Media Services account name. Changing this forces a new Transform to be created. - -* `name` - (Required) The name which should be used for this Transform. Changing this forces a new Transform to be created. - -* `resource_group_name` - (Required) The name of the Resource Group where the Transform should exist. Changing this forces a new Transform to be created. - ---- - -* `description` - (Optional) An optional verbose description of the Transform. - -* `output` - (Optional) One or more `output` blocks as defined below. At least one `output` must be defined. - ---- - -A `aac_audio` block supports the following: - -* `bitrate` - (Optional) The bitrate of the audio in bits per second. Default to `128000`. - -* `channels` - (Optional) The number of audio channels. Default to `2`. - -* `label` - (Optional) Specifies the label for the codec. The label can be used to control muxing behavior. - -* `profile` - (Optional) The encoding profile to be used when encoding audio with AAC. Possible values are `AacLc`, `HeAacV1`,and `HeAacV2`. Default to `AacLc`. - -* `sampling_rate` - (Optional) The sampling rate to use for encoding in Hertz. Default to `48000`. - ---- - -A `audio_analyzer_preset` block supports the following: - -* `audio_language` - (Optional) The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). If you know the language of your content, it is recommended that you specify it. The language must be specified explicitly for AudioAnalysisMode:Basic, since automatic language detection is not included in basic mode. If the language isn't specified, automatic language detection will choose the first language detected and process with the selected language for the duration of the file. It does not currently support dynamically switching between languages after the first language is detected. The automatic detection works best with audio recordings with clearly discernible speech. If automatic detection fails to find the language, transcription would fall back to `en-US`. The list of supported languages is available here: . - -* `audio_analysis_mode` - (Optional) Possible values are `Basic` or `Standard`. Determines the set of audio analysis operations to be performed. Default to `Standard`. - -* `experimental_options` - (Optional) Dictionary containing key value pairs for parameters not exposed in the preset itself. - ---- - -An `audio` block supports the following: - -* `input_label` - (Required) The label of the job input which is to be used as an overlay. The input must specify exact one file. You can specify an image file in JPG, PNG, GIF or BMP format, or an audio file (such as a WAV, MP3, WMA or M4A file), or a video file. - -* `audio_gain_level` - (Optional) The gain level of audio in the overlay. The value should be in the range `0` to `1.0`. The default is `1.0`. - -* `end` - (Optional) The end position, with reference to the input video, at which the overlay ends. The value should be in ISO 8601 format. For example, `PT30S` to end the overlay at 30 seconds into the input video. If not specified or the value is greater than the input video duration, the overlay will be applied until the end of the input video if the overlay media duration is greater than the input video duration, else the overlay will last as long as the overlay media duration. - -* `fade_in_duration` - (Optional) The duration over which the overlay fades in onto the input video. The value should be in ISO 8601 duration format. If not specified the default behavior is to have no fade in (same as `PT0S`). - -* `fade_out_duration` - (Optional) The duration over which the overlay fades out of the input video. The value should be in ISO 8601 duration format. If not specified the default behavior is to have no fade out (same as `PT0S`). - -* `start` - (Optional) The start position, with reference to the input video, at which the overlay starts. The value should be in ISO 8601 format. For example, `PT05S` to start the overlay at 5 seconds into the input video. If not specified the overlay starts from the beginning of the input video. - ---- - -A `builtin_preset` block supports the following: - -* `preset_name` - (Required) The built-in preset to be used for encoding videos. The Possible values are `AACGoodQualityAudio`, `AdaptiveStreaming`, `ContentAwareEncoding`, `ContentAwareEncodingExperimental`, `CopyAllBitrateNonInterleaved`, `DDGoodQualityAudio`, `H265AdaptiveStreaming`, `H265ContentAwareEncoding`, `H265SingleBitrate4K`, `H265SingleBitrate1080p`, `H265SingleBitrate720p`, `H264MultipleBitrate1080p`, `H264MultipleBitrateSD`, `H264MultipleBitrate720p`, `H264SingleBitrate1080p`, `H264SingleBitrateSD` and `H264SingleBitrate720p`. - -* `preset_configuration` - (Optional) A `preset_configuration` block as defined below. - ---- - -A `codec` block supports the following: - -* `aac_audio` - (Optional) A `aac_audio` block as defined above. - -* `copy_audio` - (Optional) A `copy_audio` block as defined below. - -* `copy_video` - (Optional) A `copy_video` block as defined below. - -* `dd_audio` - (Optional) A `dd_audio` block as defined below. - -* `h264_video` - (Optional) A `h264_video` block as defined below. - -* `h265_video` - (Optional) A `h265_video` block as defined below. - -* `jpg_image` - (Optional) A `jpg_image` block as defined below. - -* `png_image` - (Optional) A `png_image` block as defined below. - --> **NOTE:** Each codec can only have one type: `aac_audio`, `copy_audio`, `copy_video`, `dd_audio`, `h264_video`, `h265_video`, `jpg_image` or `png_image`. If you need to apply different codec you must create one codec for each one. - ---- - -A `copy_audio` block supports the following: - -* `label` - (Optional) Specifies the label for the codec. The label can be used to control muxing behavior. - ---- - -A `copy_video` block supports the following: - -* `label` - (Optional) Specifies the label for the codec. The label can be used to control muxing behavior. - ---- - -A `crop_rectangle` block supports the following: - -* `height` - (Optional) The height of the rectangular region in pixels. This can be absolute pixel value (e.g `100`), or relative to the size of the video (For example, `50%`). - -* `left` - (Optional) The number of pixels from the left-margin. This can be absolute pixel value (e.g `100`), or relative to the size of the video (For example, `50%`). - -* `top` - (Optional) The number of pixels from the top-margin. This can be absolute pixel value (e.g `100`), or relative to the size of the video (For example, `50%`). - -* `width` - (Optional) The width of the rectangular region in pixels. This can be absolute pixel value (e.g` 100`), or relative to the size of the video (For example, `50%`). - ---- - -A `custom_preset` block supports the following: - -* `codec` - (Required) One or more `codec` blocks as defined above. - -* `format` - (Required) One or more `format` blocks as defined below. - -* `experimental_options` - (Optional) Dictionary containing key value pairs for parameters not exposed in the preset itself. - -* `filter` - (Optional) A `filter` block as defined below. - ---- - -A `dd_audio` block supports the following: - -* `bitrate` - (Optional) The bitrate of the audio in bits per second. Default to `192000`. - -* `channels` - (Optional) The number of audio channels. Default to `2`. - -* `label` - (Optional) Specifies the label for the codec. The label can be used to control muxing behavior. - -* `sampling_rate` - (Optional) The sampling rate to use for encoding in Hertz. Default to `48000`. - ---- - -A `deinterlace` block supports the following: - -* `parity` - (Optional) The field parity to use for deinterlacing. Possible values are `Auto`, `TopFieldFirst` or `BottomFieldFirst`. Default to `Auto`. - -* `mode` - (Optional) The deinterlacing mode. Possible values are `AutoPixelAdaptive` or `Off`. Default to `AutoPixelAdaptive`. - ---- - -A `face_detector_preset` block supports the following: - -* `analysis_resolution` - (Optional) Possible values are `SourceResolution` or `StandardDefinition`. Specifies the maximum resolution at which your video is analyzed. which will keep the input video at its original resolution when analyzed. Using `StandardDefinition` will resize input videos to standard definition while preserving the appropriate aspect ratio. It will only resize if the video is of higher resolution. For example, a 1920x1080 input would be scaled to 640x360 before processing. Switching to `StandardDefinition` will reduce the time it takes to process high resolution video. It may also reduce the cost of using this component (see for details). However, faces that end up being too small in the resized video may not be detected. Default to `SourceResolution`. - -* `blur_type` - (Optional) Specifies the type of blur to apply to faces in the output video. Possible values are `Black`, `Box`, `High`, `Low`,and `Med`. - -* `experimental_options` - (Optional) Dictionary containing key value pairs for parameters not exposed in the preset itself. - -* `face_redactor_mode` - (Optional) This mode provides the ability to choose between the following settings: 1) `Analyze` - For detection only. This mode generates a metadata JSON file marking appearances of faces throughout the video. Where possible, appearances of the same person are assigned the same ID. 2) `Combined` - Additionally redacts(blurs) detected faces. 3) `Redact` - This enables a 2-pass process, allowing for selective redaction of a subset of detected faces. It takes in the metadata file from a prior analyze pass, along with the source video, and a user-selected subset of IDs that require redaction. Default to `Analyze`. - ---- - -A `fade_in` block supports the following: - -* `duration` - (Required) The duration of the fade effect in the video. The value can be in ISO 8601 format (For example, PT05S to fade In/Out a color during 5 seconds), or a frame count (For example, 10 to fade 10 frames from the start time), or a relative value to stream duration (For example, 10% to fade 10% of stream duration). - -* `fade_color` - (Required) The color for the fade in/out. It can be on the [CSS Level1 colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color_keywords) or an RGB/hex value: e.g: `rgb(255,0,0)`, `0xFF0000` or `#FF0000`. - -* `start` - (Optional) The position in the input video from where to start fade. The value can be in ISO 8601 format (For example, `PT05S` to start at 5 seconds), or a frame count (For example, `10` to start at the 10th frame), or a relative value to stream duration (For example, `10%` to start at 10% of stream duration). Default to `0`. - ---- - -A `fade_out` block supports the following: - -* `duration` - (Required) The duration of the fade effect in the video. The value can be in ISO 8601 format (For example, PT05S to fade In/Out a color during 5 seconds), or a frame count (For example, 10 to fade 10 frames from the start time), or a relative value to stream duration (For example, 10% to fade 10% of stream duration). - -* `fade_color` - (Required) The color for the fade in/out. It can be on the [CSS Level1 colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color_keywords) or an RGB/hex value: e.g: `rgb(255,0,0)`, `0xFF0000` or `#FF0000`. - -* `start` - (Optional) The position in the input video from where to start fade. The value can be in ISO 8601 format (For example, `PT05S` to start at 5 seconds), or a frame count (For example, `10` to start at the 10th frame), or a relative value to stream duration (For example, `10%` to start at 10% of stream duration). Default to `0`. - ---- - -A `filter` block supports the following: - -* `crop_rectangle` - (Optional) A `crop_rectangle` block as defined above. - -* `deinterlace` - (Optional) A `deinterlace` block as defined below. - -* `fade_in` - (Optional) A `fade_in` block as defined above. - -* `fade_out` - (Optional) A `fade_out` block as defined above. - -* `overlay` - (Optional) One or more `overlay` blocks as defined below. - -* `rotation` - (Optional) The rotation to be applied to the input video before it is encoded. Possible values are `Auto`, `None`, `Rotate90`, `Rotate180`, `Rotate270`,or `Rotate0`. Default to `Auto`. - ---- - -A `format` block supports the following: - -* `jpg` - (Optional) A `jpg` block as defined below. - -* `mp4` - (Optional) A `mp4` block as defined below. - -* `png` - (Optional) A `png` block as defined below. - -* `transport_stream` - (Optional) A `transport_stream` block as defined below. - --> **NOTE:** Each format can only have one type: `jpg`, `mp4`, `png` or `transport_stream`. If you need to apply different type you must create one format for each one. - ---- - -A `h264_video` block supports the following: - -* `complexity` - (Optional) The complexity of the encoding. Possible values are `Balanced`, `Speed` or `Quality`. Default to `Balanced`. - -* `key_frame_interval` - (Optional) The distance between two key frames. The value should be non-zero in the range `0.5` to `20` seconds, specified in ISO 8601 format. Note that this setting is ignored if `sync_mode` is set to `Passthrough`, where the KeyFrameInterval value will follow the input source setting. Defaults to `PT2S`. - -* `label` - (Optional) Specifies the label for the codec. The label can be used to control muxing behavior. - -* `layer` - (Optional) One or more `layer` blocks as defined below. - -* `rate_control_mode` - (Optional) The rate control mode. Possible values are `ABR`, `CBR` or `CRF`. Default to `ABR`. - -* `scene_change_detection_enabled` - (Optional) Whether the encoder should insert key frames at scene changes. This flag should be set to true only when the encoder is being configured to produce a single output video. Default to `false`. - -* `stretch_mode` - (Optional) Specifies the resizing mode - how the input video will be resized to fit the desired output resolution(s). Possible values are `AutoFit`, `AutoSize` or `None`. Default to `AutoSize`. - -* `sync_mode` - (Optional) Specifies the synchronization mode for the video. Possible values are `Auto`, `Cfr`, `Passthrough` or `Vfr`. Default to `Auto`. - ---- - -A `h265_video` block supports the following: - -* `complexity` - (Optional) The complexity of the encoding. Possible values are `Balanced`, `Speed` or `Quality`. Default to `Balanced`. - -* `key_frame_interval` - (Optional) The distance between two key frames. The value should be non-zero in the range `0.5` to `20` seconds, specified in ISO 8601 format. Note that this setting is ignored if `sync_mode` is set to `Passthrough`, where the KeyFrameInterval value will follow the input source setting. Defaults to `PT2S`. - -* `label` - (Optional) Specifies the label for the codec. The label can be used to control muxing behavior. - -* `layer` - (Optional) One or more `layer` blocks as defined below. - -* `scene_change_detection_enabled` - (Optional) Whether the encoder should insert key frames at scene changes. This flag should be set to true only when the encoder is being configured to produce a single output video. Default to `false`. - -* `stretch_mode` - (Optional) Specifies the resizing mode - how the input video will be resized to fit the desired output resolution(s). Possible values are `AutoFit`, `AutoSize` or `None`. Default to `AutoSize`. - -* `sync_mode` - (Optional) Specifies the synchronization mode for the video. Possible values are `Auto`, `Cfr`, `Passthrough` or `Vfr`. Default to `Auto`. - ---- - -A `jpg` block supports the following: - -* `filename_pattern` - (Required) The file naming pattern used for the creation of output files. The following macros are supported in the file name: `{Basename}` - An expansion macro that will use the name of the input video file. If the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of input video files will be used. If the length of base name of the input video file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. `{Extension}` - The appropriate extension for this format. `{Label}` - The label assigned to the codec/layer. `{Index}` - A unique index for thumbnails. Only applicable to thumbnails. `{AudioStream}` - string "Audio" plus audio stream number(start from 1). `{Bitrate}` - The audio/video bitrate in kbps. Not applicable to thumbnails. `{Codec}` - The type of the audio/video codec. `{Resolution}` - The video resolution. Any unsubstituted macros will be collapsed and removed from the filename. - ---- - -A `jpg_image` block supports the following: - -* `start` - (Required) The position in the input video from where to start generating thumbnails. The value can be in ISO 8601 format (For example, `PT05S` to start at 5 seconds), or a frame count (For example, `10` to start at the 10th frame), or a relative value to stream duration (For example, `10%` to start at 10% of stream duration). Also supports a macro `{Best}`, which tells the encoder to select the best thumbnail from the first few seconds of the video and will only produce one thumbnail, no matter what other settings are for `step` and `range`. - -* `key_frame_interval` - (Optional) The distance between two key frames. The value should be non-zero in the range `0.5` to `20` seconds, specified in ISO 8601 format. Note that this setting is ignored if `sync_mode` is set to `Passthrough`, where the KeyFrameInterval value will follow the input source setting. Defaults to `PT2S`. - -* `label` - (Optional) Specifies the label for the codec. The label can be used to control muxing behavior. - -* `layer` - (Optional) One or more `layer` blocks as defined below. - -* `range` - (Optional) The position relative to transform preset start time in the input video at which to stop generating thumbnails. The value can be in ISO 8601 format (For example, `PT5M30S` to stop at 5 minutes and 30 seconds from start time), or a frame count (For example, `300` to stop at the 300th frame from the frame at start time. If this value is `1`, it means only producing one thumbnail at start time), or a relative value to the stream duration (For example, `50%` to stop at half of stream duration from start time). The default value is `100%`, which means to stop at the end of the stream. - -* `sprite_column` - (Optional) Sets the number of columns used in thumbnail sprite image. The number of rows are automatically calculated and a VTT file is generated with the coordinate mappings for each thumbnail in the sprite. Note: this value should be a positive integer and a proper value is recommended so that the output image resolution will not go beyond JPEG maximum pixel resolution limit `65535x65535`. - -* `step` - (Optional) The intervals at which thumbnails are generated. The value can be in ISO 8601 format (For example, `PT05S` for one image every 5 seconds), or a frame count (For example, `30` for one image every 30 frames), or a relative value to stream duration (For example, `10%` for one image every 10% of stream duration). Note: Step value will affect the first generated thumbnail, which may not be exactly the one specified at transform preset start time. This is due to the encoder, which tries to select the best thumbnail between start time and Step position from start time as the first output. As the default value is `10%`, it means if stream has long duration, the first generated thumbnail might be far away from the one specified at start time. Try to select reasonable value for Step if the first thumbnail is expected close to start time, or set Range value at `1` if only one thumbnail is needed at start time. - -* `stretch_mode` - (Optional) The resizing mode, which indicates how the input video will be resized to fit the desired output resolution(s). Possible values are `AutoFit`, `AutoSize` or `None`. Default to `AutoSize`. - -* `sync_mode` - (Optional) Specifies the synchronization mode for the video. Possible values are `Auto`, `Cfr`, `Passthrough` or `Vfr`. Default to `Auto`. - ---- - -A `layer` block within `h264_video` block supports the following: - -* `bitrate` - (Required) The average bitrate in bits per second at which to encode the input video when generating this layer. - -* `adaptive_b_frame_enabled` - (Optional) Whether adaptive B-frames are used when encoding this layer. If not specified, the encoder will turn it on whenever the video profile permits its use. Default to `true`. - -* `b_frames` - (Optional) The number of B-frames to use when encoding this layer. If not specified, the encoder chooses an appropriate number based on the video profile and level. - -* `buffer_window` - (Optional) Specifies the maximum amount of time that the encoder should buffer frames before encoding. The value should be in ISO 8601 format. The value should be in the range `0.1` to `100` seconds. Defaults to `PT5S`. - -* `crf` - (Optional) The value of CRF to be used when encoding this layer. This setting takes effect when `rate_control_mode` is set `CRF`. The range of CRF value is between `0` and `51`, where lower values would result in better quality, at the expense of higher file sizes. Higher values mean more compression, but at some point quality degradation will be noticed. Default to `23`. - -* `entropy_mode` - (Optional) The entropy mode to be used for this layer. Possible values are `Cabac` or `Cavlc`. If not specified, the encoder chooses the mode that is appropriate for the profile and level. - -* `frame_rate` - (Optional) The frame rate (in frames per second) at which to encode this layer. The value can be in the form of `M/N` where `M` and `N` are integers (For example, `30000/1001`), or in the form of a number (For example, `30`, or `29.97`). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is not specified, the encoder will use the same frame rate as the input video. - -* `height` - (Optional) The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example `50%` means the output video has half as many pixels in height as the input. - -* `label` - (Optional) The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file. - -* `level` - (Optional) The H.264 levels. Currently, the resource support Level up to `6.2`. The value can be `auto`, or a number that matches the H.264 profile. If not specified, the default is `auto`, which lets the encoder choose the Level that is appropriate for this layer. - -* `max_bitrate` - (Optional) The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults to the same value as bitrate. - -* `profile` - (Optional) The H.264 profile. Possible values are `Auto`, `Baseline`, `High`, `High422`, `High444`,or `Main`. Default to `Auto`. - -* `reference_frames` - (Optional) The number of reference frames to be used when encoding this layer. If not specified, the encoder determines an appropriate number based on the encoder complexity setting. - -* `slices` - (Optional) The number of slices to be used when encoding this layer. If not specified, default is `1`, which means that encoder will use a single slice for each frame. - -* `width` - (Optional) The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example `50%` means the output video has half as many pixels in width as the input. - ---- - -A `layer` block within `h265_video` block supports the following: - -* `bitrate` - (Required) The average bitrate in bits per second at which to encode the input video when generating this layer. - -* `adaptive_b_frame_enabled` - (Optional) Whether adaptive B-frames are used when encoding this layer. If not specified, the encoder will turn it on whenever the video profile permits its use. Default to `true`. - -* `b_frames` - (Optional) The number of B-frames to use when encoding this layer. If not specified, the encoder chooses an appropriate number based on the video profile and level. - -* `buffer_window` - (Optional) Specifies the maximum amount of time that the encoder should buffer frames before encoding. The value should be in ISO 8601 format. The value should be in the range `0.1` to `100` seconds. Defaults to `PT5S`. - -* `crf` - (Optional) The value of CRF to be used when encoding this layer. This setting takes effect when `rate_control_mode` is set `CRF`. The range of CRF value is between `0` and `51`, where lower values would result in better quality, at the expense of higher file sizes. Higher values mean more compression, but at some point quality degradation will be noticed. Default to `28`. - -* `frame_rate` - (Optional) The frame rate (in frames per second) at which to encode this layer. The value can be in the form of `M/N` where `M` and `N` are integers (For example, `30000/1001`), or in the form of a number (For example, `30`, or `29.97`). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is not specified, the encoder will use the same frame rate as the input video. - -* `height` - (Optional) The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example `50%` means the output video has half as many pixels in height as the input. - -* `label` - (Optional) The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file. - -* `level` - (Optional) The H.264 levels. Currently, the resource support Level up to `6.2`. The value can be `auto`, or a number that matches the H.264 profile. If not specified, the default is `auto`, which lets the encoder choose the Level that is appropriate for this layer. - -* `max_bitrate` - (Optional) The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults to the same value as bitrate. - -* `profile` - (Optional) The H.264 profile. Possible values are `Auto`, `Main` and `Main10`. Default to `Auto`. - -* `reference_frames` - (Optional) The number of reference frames to be used when encoding this layer. If not specified, the encoder determines an appropriate number based on the encoder complexity setting. - -* `slices` - (Optional) The number of slices to be used when encoding this layer. If not specified, default is `1`, which means that encoder will use a single slice for each frame. - -* `width` - (Optional) The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example `50%` means the output video has half as many pixels in width as the input. - ---- - -A `layer` block within `jpg_image` block supports the following: - -* `height` - (Optional) The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example `50%` means the output video has half as many pixels in height as the input. - -* `label` - (Optional) The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file. - -* `quality` - (Optional) The compression quality of the JPEG output. Range is from `0` to `100` and the default is `70`. - -* `width` - (Optional) The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example `50%` means the output video has half as many pixels in width as the input. - ---- - -A `layer` block within `png_image` block supports the following: - -* `height` - (Optional) The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example `50%` means the output video has half as many pixels in height as the input. - -* `label` - (Optional) The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file. - -* `width` - (Optional) The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example `50%` means the output video has half as many pixels in width as the input. - ---- - -A `mp4` block supports the following: - -* `filename_pattern` - (Required) The file naming pattern used for the creation of output files. The following macros are supported in the file name: `{Basename}` - An expansion macro that will use the name of the input video file. If the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of input video files will be used. If the length of base name of the input video file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. `{Extension}` - The appropriate extension for this format. `{Label}` - The label assigned to the codec/layer. `{Index}` - A unique index for thumbnails. Only applicable to thumbnails. `{AudioStream}` - string "Audio" plus audio stream number(start from 1). `{Bitrate}` - The audio/video bitrate in kbps. Not applicable to thumbnails. `{Codec}` - The type of the audio/video codec. `{Resolution}` - The video resolution. Any unsubstituted macros will be collapsed and removed from the filename. - -* `output_file` - (Optional) One or more `output_file` blocks as defined below. - ---- - -An `output` block supports the following: - -* `audio_analyzer_preset` - (Optional) An `audio_analyzer_preset` block as defined above. - -* `builtin_preset` - (Optional) A `builtin_preset` block as defined above. - -* `custom_preset` - (Optional) A `custom_preset` block as defined above. - -* `face_detector_preset` - (Optional) A `face_detector_preset` block as defined above. - -* `on_error_action` - (Optional) A Transform can define more than one outputs. This property defines what the service should do when one output fails - either continue to produce other outputs, or, stop the other outputs. The overall Job state will not reflect failures of outputs that are specified with `ContinueJob`. Possible values are `StopProcessingJob` or `ContinueJob`. Defaults to `StopProcessingJob`. - -* `relative_priority` - (Optional) Sets the relative priority of the TransformOutputs within a Transform. This sets the priority that the service uses for processing Transform Outputs. Possible values are `High`, `Normal` or `Low`. Defaults to `Normal`. - -* `video_analyzer_preset` - (Optional) A `video_analyzer_preset` block as defined below. - --> **NOTE:** Each output can only have one type of preset: `builtin_preset`, `audio_analyzer_preset`, `custom_preset`, `face_detector_preset` or `video_analyzer_preset`. If you need to apply different presets you must create one output for each one. - ---- - -An `output_file` block supports the following: - -* `labels` - (Required) The list of labels that describe how the encoder should multiplex video and audio into an output file. For example, if the encoder is producing two video layers with labels `v1` and `v2`, and one audio layer with label `a1`, then an array like `["v1", "a1"]` tells the encoder to produce an output file with the video track represented by `v1` and the audio track represented by `a1`. - ---- - -An `overlay` block supports the following: - -* `audio` - (Optional) An `audio` block as defined above. - -* `video` - (Optional) A `video` block as defined below. - --> **NOTE:** Each overlay can only have one type: `audio` or `video`. If you need to apply different type you must create one overlay for each one. - ---- - -A `png` block supports the following: - -* `filename_pattern` - (Required) The file naming pattern used for the creation of output files. The following macros are supported in the file name: `{Basename}` - An expansion macro that will use the name of the input video file. If the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of input video files will be used. If the length of base name of the input video file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. `{Extension}` - The appropriate extension for this format. `{Label}` - The label assigned to the codec/layer. `{Index}` - A unique index for thumbnails. Only applicable to thumbnails. `{AudioStream}` - string "Audio" plus audio stream number(start from 1). `{Bitrate}` - The audio/video bitrate in kbps. Not applicable to thumbnails. `{Codec}` - The type of the audio/video codec. `{Resolution}` - The video resolution. Any unsubstituted macros will be collapsed and removed from the filename. - ---- - -A `png_image` block supports the following: - -* `start` - (Required) The position in the input video from where to start generating thumbnails. The value can be in ISO 8601 format (For example, `PT05S` to start at 5 seconds), or a frame count (For example, `10` to start at the 10th frame), or a relative value to stream duration (For example, `10%` to start at 10% of stream duration). Also supports a macro `{Best}`, which tells the encoder to select the best thumbnail from the first few seconds of the video and will only produce one thumbnail, no matter what other settings are for `step` and `range`. - -* `key_frame_interval` - (Optional) The distance between two key frames. The value should be non-zero in the range `0.5` to `20` seconds, specified in ISO 8601 format. Note that this setting is ignored if `sync_mode` is set to `Passthrough`, where the KeyFrameInterval value will follow the input source setting. Defaults to `PT2S`. - -* `label` - (Optional) Specifies the label for the codec. The label can be used to control muxing behavior. - -* `layer` - (Optional) One or more `layer` blocks as defined below. - -* `range` - (Optional) The position relative to transform preset start time in the input video at which to stop generating thumbnails. The value can be in ISO 8601 format (For example, `PT5M30S` to stop at `5` minutes and `30` seconds from start time), or a frame count (For example, `300` to stop at the 300th frame from the frame at start time. If this value is `1`, it means only producing one thumbnail at start time), or a relative value to the stream duration (For example, `50%` to stop at half of stream duration from start time). The default value is `100%`, which means to stop at the end of the stream. - -* `step` - (Optional) The intervals at which thumbnails are generated. The value can be in ISO 8601 format (For example, `PT05S` for one image every 5 seconds), or a frame count (For example, `30` for one image every 30 frames), or a relative value to stream duration (For example, `10%` for one image every 10% of stream duration). Note: Step value will affect the first generated thumbnail, which may not be exactly the one specified at transform preset start time. This is due to the encoder, which tries to select the best thumbnail between start time and Step position from start time as the first output. As the default value is `10%`, it means if stream has long duration, the first generated thumbnail might be far away from the one specified at start time. Try to select reasonable value for Step if the first thumbnail is expected close to start time, or set Range value at `1` if only one thumbnail is needed at start time. - -* `stretch_mode` - (Optional) The resizing mode, which indicates how the input video will be resized to fit the desired output resolution(s). Possible values are `AutoFit`, `AutoSize` or `None`. Default to `AutoSize`. - -* `sync_mode` - (Optional) Specifies the synchronization mode for the video. Possible values are `Auto`, `Cfr`, `Passthrough` or `Vfr`. Default to `Auto`. - ---- - -A `position` block supports the following: - -* `height` - (Optional) The height of the rectangular region in pixels. This can be absolute pixel value (e.g `100`), or relative to the size of the video (For example, `50%`). - -* `left` - (Optional) The number of pixels from the left-margin. This can be absolute pixel value (e.g `100`), or relative to the size of the video (For example, `50%`). - -* `top` - (Optional) The number of pixels from the top-margin. This can be absolute pixel value (e.g `100`), or relative to the size of the video (For example, `50%`). - -* `width` - (Optional) The width of the rectangular region in pixels. This can be absolute pixel value (e.g` 100`), or relative to the size of the video (For example, `50%`). - ---- - -A `preset_configuration` block supports the following: - -* `complexity` - (Optional) The complexity of the encoding. Possible values are `Balanced`, `Speed` or `Quality`. - -* `interleave_output` - (Optional) Specifies the interleave mode of the output to control how audio are stored in the container format. Possible values are `InterleavedOutput` and `NonInterleavedOutput`. - -* `key_frame_interval_in_seconds` - (Optional) The key frame interval in seconds. Possible value is a positive float. For example, set as `2.0` to reduce the playback buffering for some players. - -* `max_bitrate_bps` - (Optional) The maximum bitrate in bits per second (threshold for the top video layer). For example, set as `6000000` to avoid producing very high bitrate outputs for contents with high complexity. - -* `max_height` - (Optional) The maximum height of output video layers. For example, set as `720` to produce output layers up to 720P even if the input is 4K. - -* `max_layers` - (Optional) The maximum number of output video layers. For example, set as `4` to make sure at most 4 output layers are produced to control the overall cost of the encoding job. - -* `min_bitrate_bps` - (Optional) The minimum bitrate in bits per second (threshold for the bottom video layer). For example, set as `200000` to have a bottom layer that covers users with low network bandwidth. - -* `min_height` - (Optional) The minimum height of output video layers. For example, set as `360` to avoid output layers of smaller resolutions like 180P. - ---- - -A `transport_stream` block supports the following: - -* `filename_pattern` - (Required) The file naming pattern used for the creation of output files. The following macros are supported in the file name: `{Basename}` - An expansion macro that will use the name of the input video file. If the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of input video files will be used. If the length of base name of the input video file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. `{Extension}` - The appropriate extension for this format. `{Label}` - The label assigned to the codec/layer. `{Index}` - A unique index for thumbnails. Only applicable to thumbnails. `{AudioStream}` - string "Audio" plus audio stream number(start from 1). `{Bitrate}` - The audio/video bitrate in kbps. Not applicable to thumbnails. `{Codec}` - The type of the audio/video codec. `{Resolution}` - The video resolution. Any unsubstituted macros will be collapsed and removed from the filename. - -* `output_file` - (Optional) One or more `output_file` blocks as defined above. - ---- - -An `video` block supports the following: - -* `input_label` - (Required) The label of the job input which is to be used as an overlay. The input must specify exact one file. You can specify an image file in JPG, PNG, GIF or BMP format, or an audio file (such as a WAV, MP3, WMA or M4A file), or a video file. - -* `audio_gain_level` - (Optional) The gain level of audio in the overlay. The value should be in range between `0` to `1.0`. The default is `1.0`. - -* `crop_rectangle` - (Optional) A `crop_rectangle` block as defined above. - -* `end` - (Optional) The end position, with reference to the input video, at which the overlay ends. The value should be in ISO 8601 format. For example, `PT30S` to end the overlay at 30 seconds into the input video. If not specified or the value is greater than the input video duration, the overlay will be applied until the end of the input video if the overlay media duration is greater than the input video duration, else the overlay will last as long as the overlay media duration. - -* `fade_in_duration` - (Optional) The duration over which the overlay fades in onto the input video. The value should be in ISO 8601 duration format. If not specified the default behavior is to have no fade in (same as `PT0S`). - -* `fade_out_duration` - (Optional) The duration over which the overlay fades out of the input video. The value should be in ISO 8601 duration format. If not specified the default behavior is to have no fade out (same as `PT0S`). - -* `opacity` - (Optional) The opacity of the overlay. The value should be in the range between `0` to `1.0`. Default to `1.0`, which means the overlay is opaque. - -* `position` - (Optional) A `position` block as defined above. - -* `start` - (Optional) The start position, with reference to the input video, at which the overlay starts. The value should be in ISO 8601 format. For example, `PT05S` to start the overlay at 5 seconds into the input video. If not specified the overlay starts from the beginning of the input video. - ---- - -A `video_analyzer_preset` block supports the following: - -* `audio_language` - (Optional) The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). If you know the language of your content, it is recommended that you specify it. The language must be specified explicitly for AudioAnalysisMode:Basic, since automatic language detection is not included in basic mode. If the language isn't specified, automatic language detection will choose the first language detected and process with the selected language for the duration of the file. It does not currently support dynamically switching between languages after the first language is detected. The automatic detection works best with audio recordings with clearly discernible speech. If automatic detection fails to find the language, transcription would fall back to `en-US`. The list of supported languages is available here: . - -* `audio_analysis_mode` - (Optional) Possible values are `Basic` or `Standard`. Determines the set of audio analysis operations to be performed. Default to `Standard`. - -* `experimental_options` - (Optional) Dictionary containing key value pairs for parameters not exposed in the preset itself. - -* `insights_type` - (Optional) Defines the type of insights that you want the service to generate. The allowed values are `AudioInsightsOnly`, `VideoInsightsOnly`, and `AllInsights`. If you set this to `AllInsights` and the input is audio only, then only audio insights are generated. Similarly, if the input is video only, then only video insights are generated. It is recommended that you not use `AudioInsightsOnly` if you expect some of your inputs to be video only; or use `VideoInsightsOnly` if you expect some of your inputs to be audio only. Your Jobs in such conditions would error out. Default to `AllInsights`. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Transform. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Transform. -* `read` - (Defaults to 5 minutes) Used when retrieving the Transform. -* `update` - (Defaults to 30 minutes) Used when updating the Transform. -* `delete` - (Defaults to 30 minutes) Used when deleting the Transform. - -## Import - -Transforms can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_media_transform.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Media/mediaServices/media1/transforms/transform1 -``` diff --git a/website/docs/r/monitor_aad_diagnostic_setting.html.markdown b/website/docs/r/monitor_aad_diagnostic_setting.html.markdown index ed005d9c0f676..1d0a8f3e904ec 100644 --- a/website/docs/r/monitor_aad_diagnostic_setting.html.markdown +++ b/website/docs/r/monitor_aad_diagnostic_setting.html.markdown @@ -72,15 +72,9 @@ resource "azurerm_monitor_aad_diagnostic_setting" "example" { The following arguments are supported: * `name` - (Required) The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created. - -* `log` - (Optional) One or more `log` blocks as defined below. - --> **NOTE:** `log` is deprecated in favour of the `enabled_log` property and will be removed in version 4.0 of the AzureRM Provider. * `enabled_log` - (Optional) One or more `enabled_log` blocks as defined below. --> **NOTE:** At least one `log` or `enabled_log` block must be specified. At least one type of Log must be enabled. - --- * `eventhub_authorization_rule_id` - (Optional) Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created. @@ -97,16 +91,6 @@ The following arguments are supported: --- -A `log` block supports the following: - -* `category` - (Required) The log category for the Azure Active Directory Diagnostic. - -* `retention_policy` - (Required) A `retention_policy` block as defined below. - -* `enabled` - (Optional) Is this Diagnostic Log enabled? Defaults to `true`. - ---- - A `enabled_log` block supports the following: * `category` - (Required) The log category for the Azure Active Directory Diagnostic. diff --git a/website/docs/r/monitor_action_group.html.markdown b/website/docs/r/monitor_action_group.html.markdown index b0d9f2b40bdf7..11bca2e9c0f59 100644 --- a/website/docs/r/monitor_action_group.html.markdown +++ b/website/docs/r/monitor_action_group.html.markdown @@ -188,13 +188,9 @@ The `email_receiver` block supports the following: The `event_hub_receiver` block supports the following: * `name` - (Required) The name of the EventHub Receiver, must be unique within action group. -* `event_hub_id` - (Optional) The resource ID of the respective Event Hub. * `event_hub_name` - (Optional) The name of the specific Event Hub queue. * `event_hub_namespace` - (Optional) The namespace name of the Event Hub. * `subscription_id` - (Optional) The ID for the subscription containing this Event Hub. Default to the subscription ID of the Action Group. - -~> **NOTE:** `event_hub_id` is deprecated in version 3.0 and will be removed in version 4.0 of the AzureRM Provider. Please use `event_hub_name`, `event_hub_name`,and `subscription_id` instead. And `event_hub_name`, `event_hub_name` will be required properties in version 4.0. - * `tenant_id` - (Optional) The Tenant ID for the subscription containing this Event Hub. * `use_common_alert_schema` - (Optional) Indicates whether to use common alert schema. diff --git a/website/docs/r/monitor_action_rule_action_group.html.markdown b/website/docs/r/monitor_action_rule_action_group.html.markdown deleted file mode 100644 index fe9f0ff258020..0000000000000 --- a/website/docs/r/monitor_action_rule_action_group.html.markdown +++ /dev/null @@ -1,170 +0,0 @@ ---- -subcategory: "Monitor" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_monitor_action_rule_action_group" -description: |- - Manages an Monitor Action Rule which type is action group. ---- - -# azurerm_monitor_action_rule_action_group - -Manages a Monitor Action Rule which type is action group. - -!> **NOTE:** This resource has been deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use [`azurerm_monitor_alert_processing_rule_action_group`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/monitor_alert_processing_rule_action_group) resource instead. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} - -resource "azurerm_monitor_action_group" "example" { - name = "example-action-group" - resource_group_name = azurerm_resource_group.example.name - short_name = "example" -} - -resource "azurerm_monitor_action_rule_action_group" "example" { - name = "example-amar" - resource_group_name = azurerm_resource_group.example.name - action_group_id = azurerm_monitor_action_group.example.id - - scope { - type = "ResourceGroup" - resource_ids = [azurerm_resource_group.example.id] - } - - tags = { - foo = "bar" - } -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) Specifies the name of the Monitor Action Rule. Changing this forces a new resource to be created. - -* `resource_group_name` - (Required) Specifies the name of the resource group in which the Monitor Action Rule should exist. Changing this forces a new resource to be created. - -* `action_group_id` - (Required) Specifies the resource id of monitor action group. - -* `description` - (Optional) Specifies a description for the Action Rule. - -* `enabled` - (Optional) Is the Action Rule enabled? Defaults to `true`. - -* `scope` - (Optional) A `scope` block as defined below. - -* `condition` - (Optional) A `condition` block as defined below. - -* `tags` - (Optional) A mapping of tags to assign to the resource. - ---- - -The `scope` block supports the following: - -* `type` - (Required) Specifies the type of target scope. Possible values are `ResourceGroup` and `Resource`. - -* `resource_ids` - (Required) A list of resource IDs of the given scope type which will be the target of action rule. - ---- - -The `condition` block supports the following: - -* `alert_context` - (Optional) A `alert_context` block as defined below. - -* `alert_rule_id` - (Optional) A `alert_rule_id` block as defined below. - -* `description` - (Optional) A `description` block as defined below. - -* `monitor` - (Optional) A `monitor` block as defined below. - -* `monitor_service` - (Optional) A `monitor_service` block as defined below. - -* `severity` - (Optional) A `severity` block as defined below. - -* `target_resource_type` - (Optional) A `target_resource_type` block as defined below. - ---- - -The `alert_context` block supports the following: - -* `operator` - (Required) The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. - -* `values` - (Required) A list of values to match for a given condition. - ---- - -The `alert_rule_id` block supports the following: - -* `operator` - (Required) The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. - -* `values` - (Required) A list of values to match for a given condition. - ---- - -The `description` block supports the following: - -* `operator` - (Required) The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. - -* `values` - (Required) A list of values to match for a given condition. - ---- - -The `monitor` block supports the following: - -* `operator` - (Required) The operator for a given condition. Possible values are `Equals` and `NotEquals`. - -* `values` - (Required) A list of values to match for a given condition. Possible values are `Fired` and `Resolved`. - ---- - -The `monitor_service` block supports the following: - -* `operator` - (Required) The operator for a given condition. Possible values are `Equals` and `NotEquals`. - -* `values` - (Required) A list of values to match for a given condition. Possible values are `ActivityLog Administrative`, `ActivityLog Autoscale`, `ActivityLog Policy`, `ActivityLog Recommendation`, `ActivityLog Security`, `Application Insights`, `Azure Backup`, `Azure Stack Edge`, `Azure Stack Hub`, `Custom`, `Data Box Gateway`, `Health Platform`, `Log Alerts V2`, `Log Analytics`, `Platform`, `Resource Health`, `Smart Detector` and `VM Insights - Health`. - ---- - -The `severity` block supports the following: - -* `operator` - (Required) The operator for a given condition. Possible values are `Equals`and `NotEquals`. - -* `values` - (Required) A list of values to match for a given condition. Possible values are `Sev0`, `Sev1`, `Sev2`, `Sev3`, and `Sev4`. - ---- - -The `target_resource_type` block supports the following: - -* `operator` - (Required) The operator for a given condition. Possible values are `Equals` and `NotEquals`. - -* `values` - (Required) A list of values to match for a given condition. The values should be valid resource types. - ---- - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Monitor Action Rule. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Monitor Action Rule. -* `read` - (Defaults to 5 minutes) Used when retrieving the Monitor Action Rule. -* `update` - (Defaults to 30 minutes) Used when updating the Monitor Action Rule. -* `delete` - (Defaults to 30 minutes) Used when deleting the Monitor Action Rule. - -## Import - -Monitor Action Rule can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_monitor_action_rule_action_group.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AlertsManagement/actionRules/actionRule1 -``` diff --git a/website/docs/r/monitor_action_rule_suppression.html.markdown b/website/docs/r/monitor_action_rule_suppression.html.markdown deleted file mode 100644 index 0c56416d94513..0000000000000 --- a/website/docs/r/monitor_action_rule_suppression.html.markdown +++ /dev/null @@ -1,193 +0,0 @@ ---- -subcategory: "Monitor" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_monitor_action_rule_suppression" -description: |- - Manages an Monitor Action Rule which type is suppression. ---- - -# azurerm_monitor_action_rule_suppression - -Manages a Monitor Action Rule which type is suppression. - -!> **NOTE:** This resource has been deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use [`azurerm_monitor_alert_processing_rule_suppression`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/monitor_alert_processing_rule_suppression) resource instead. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} - -resource "azurerm_monitor_action_rule_suppression" "example" { - name = "example-amar" - resource_group_name = azurerm_resource_group.example.name - - scope { - type = "ResourceGroup" - resource_ids = [azurerm_resource_group.example.id] - } - - suppression { - recurrence_type = "Weekly" - - schedule { - start_date_utc = "2019-01-01T01:02:03Z" - end_date_utc = "2019-01-03T15:02:07Z" - recurrence_weekly = ["Sunday", "Monday", "Friday", "Saturday"] - } - } - - tags = { - foo = "bar" - } -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) Specifies the name of the Monitor Action Rule. Changing this forces a new resource to be created. - -* `resource_group_name` - (Required) Specifies the name of the resource group in which the Monitor Action Rule should exist. Changing this forces a new resource to be created. - -* `suppression` - (Required) A `suppression` block as defined below. - -* `description` - (Optional) Specifies a description for the Action Rule. - -* `enabled` - (Optional) Is the Action Rule enabled? Defaults to `true`. - -* `scope` - (Optional) A `scope` block as defined below. - -* `condition` - (Optional) A `condition` block as defined below. - -* `tags` - (Optional) A mapping of tags to assign to the resource. - ---- - -The `suppression` block supports the following: - -* `recurrence_type` - (Required) Specifies the type of suppression. Possible values are `Always`, `Daily`, `Monthly`, `Once`, and `Weekly`. - -* `schedule` - (Optional) A `schedule` block as defined below. Required if `recurrence_type` is `Daily`, `Monthly`, `Once` or `Weekly`. - ---- - -The `schedule` block supports the following: - -* `start_date_utc` - (Required) specifies the recurrence UTC start datetime (Y-m-d'T'H:M:S'Z'). - -* `end_date_utc` - (Required) specifies the recurrence UTC end datetime (Y-m-d'T'H:M:S'Z'). - -* `recurrence_weekly` - (Optional) specifies the list of dayOfWeek to recurrence. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` and `Saturday`. - -* `recurrence_monthly` - (Optional) specifies the list of dayOfMonth to recurrence. Possible values are between `1` - `31`. Required if `recurrence_type` is `Monthly`. - ---- - -The `scope` block supports the following: - -* `type` - (Required) Specifies the type of target scope. Possible values are `ResourceGroup` and `Resource`. - -* `resource_ids` - (Required) A list of resource IDs of the given scope type which will be the target of action rule. - ---- - -The `condition` block supports the following: - -* `alert_context` - (Optional) A `alert_context` block as defined below. - -* `alert_rule_id` - (Optional) A `alert_rule_id` block as defined below. - -* `description` - (Optional) A `description` block as defined below. - -* `monitor` - (Optional) A `monitor` block as defined below. - -* `monitor_service` - (Optional) A `monitor_service` block as defined below. - -* `severity` - (Optional) A `severity` block as defined below. - -* `target_resource_type` - (Optional) A `target_resource_type` block as defined below. - ---- - -The `alert_context` block supports the following: - -* `operator` - (Required) The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. - -* `values` - (Required) A list of values to match for a given condition. - ---- - -The `alert_rule_id` block supports the following: - -* `operator` - (Required) The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. - -* `values` - (Required) A list of values to match for a given condition. - ---- - -The `description` block supports the following: - -* `operator` - (Required) The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. - -* `values` - (Required) A list of values to match for a given condition. - ---- - -The `monitor` block supports the following: - -* `operator` - (Required) The operator for a given condition. Possible values are `Equals` and `NotEquals`. - -* `values` - (Required) A list of values to match for a given condition. Possible values are `Fired` and `Resolved`. - ---- - -The `monitor_service` block supports the following: - -* `operator` - (Required) The operator for a given condition. Possible values are `Equals` and `NotEquals`. - -* `values` - (Required) A list of values to match for a given condition. Possible values are `ActivityLog Administrative`, `ActivityLog Autoscale`, `ActivityLog Policy`, `ActivityLog Recommendation`, `ActivityLog Security`, `Application Insights`, `Azure Backup`, `Azure Stack Edge`, `Azure Stack Hub`, `Custom`, `Data Box Gateway`, `Health Platform`, `Log Alerts V2`, `Log Analytics`, `Platform`, `Resource Health`, `Smart Detector` and `VM Insights - Health`. - ---- - -The `severity` block supports the following: - -* `operator` - (Required) The operator for a given condition. Possible values are `Equals`and `NotEquals`. - -* `values` - (Required) A list of values to match for a given condition. Possible values are `Sev0`, `Sev1`, `Sev2`, `Sev3`, and `Sev4`. - ---- - -The `target_resource_type` block supports the following: - -* `operator` - (Required) The operator for a given condition. Possible values are `Equals` and `NotEquals`. - -* `values` - (Required) A list of values to match for a given condition. The values should be valid resource types. - ---- - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Monitor Action Rule. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Monitor Action Rule. -* `read` - (Defaults to 5 minutes) Used when retrieving the Monitor Action Rule. -* `update` - (Defaults to 30 minutes) Used when updating the Monitor Action Rule. -* `delete` - (Defaults to 30 minutes) Used when deleting the Monitor Action Rule. - -## Import - -Monitor Action Rule can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_monitor_action_rule_suppression.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AlertsManagement/actionRules/actionRule1 -``` diff --git a/website/docs/r/monitor_activity_log_alert.html.markdown b/website/docs/r/monitor_activity_log_alert.html.markdown index 2dd9d7e10d354..64c18a4d5e2b9 100644 --- a/website/docs/r/monitor_activity_log_alert.html.markdown +++ b/website/docs/r/monitor_activity_log_alert.html.markdown @@ -40,6 +40,7 @@ resource "azurerm_storage_account" "to_monitor" { resource "azurerm_monitor_activity_log_alert" "main" { name = "example-activitylogalert" resource_group_name = azurerm_resource_group.example.name + location = azurerm_resource_group.example.location scopes = [azurerm_resource_group.example.id] description = "This alert will monitor a specific storage account updates." @@ -65,7 +66,7 @@ The following arguments are supported: * `name` - (Required) The name of the activity log alert. Changing this forces a new resource to be created. * `resource_group_name` - (Required) The name of the resource group in which to create the activity log alert instance. Changing this forces a new resource to be created. -* `location` - (Optional) The Azure Region where the activity log alert rule should exist. Changing this forces a new resource to be created. Defaults to `global`. +* `location` - (Required) The Azure Region where the activity log alert rule should exist. Changing this forces a new resource to be created. * `scopes` - (Required) The Scope at which the Activity Log should be applied. A list of strings which could be a resource group , or a subscription, or a resource ID (such as a Storage Account). * `criteria` - (Required) A `criteria` block as defined below. * `action` - (Optional) One or more `action` blocks as defined below. diff --git a/website/docs/r/monitor_alert_prometheus_rule_group.html.markdown b/website/docs/r/monitor_alert_prometheus_rule_group.html.markdown index b1ba41eb24d01..2b49b19e6fd15 100644 --- a/website/docs/r/monitor_alert_prometheus_rule_group.html.markdown +++ b/website/docs/r/monitor_alert_prometheus_rule_group.html.markdown @@ -37,10 +37,10 @@ resource "azurerm_kubernetes_cluster" "example" { dns_prefix = "example-aks" default_node_pool { - name = "default" - node_count = 1 - vm_size = "Standard_DS2_v2" - enable_host_encryption = true + name = "default" + node_count = 1 + vm_size = "Standard_DS2_v2" + host_encryption_enabled = true } identity { diff --git a/website/docs/r/monitor_autoscale_setting.html.markdown b/website/docs/r/monitor_autoscale_setting.html.markdown index fcf7c42ce2c1a..0f5095b16d812 100644 --- a/website/docs/r/monitor_autoscale_setting.html.markdown +++ b/website/docs/r/monitor_autoscale_setting.html.markdown @@ -529,13 +529,13 @@ A `fixed_date` block supports the following: * `start` - (Required) Specifies the start date for the profile, formatted as an RFC3339 date string. -* `timezone` - (Optional) The Time Zone of the `start` and `end` times. A list of [possible values can be found here](https://msdn.microsoft.com/en-us/library/azure/dn931928.aspx). Defaults to `UTC`. +* `timezone` - (Optional) The Time Zone of the `start` and `end` times. A list of [possible values can be found here](https://learn.microsoft.com/en-us/rest/api/monitor/autoscale-settings/create-or-update?view=rest-monitor-2022-10-01&tabs=HTTP#recurrentschedule). Defaults to `UTC`. --- A `recurrence` block supports the following: -* `timezone` - (Optional) The Time Zone used for the `hours` field. A list of [possible values can be found here](https://msdn.microsoft.com/en-us/library/azure/dn931928.aspx). Defaults to `UTC`. +* `timezone` - (Optional) The Time Zone used for the `hours` field. A list of [possible values can be found here]([https://msdn.microsoft.com/en-us/library/azure/dn931928.aspx](https://learn.microsoft.com/en-us/rest/api/monitor/autoscale-settings/create-or-update?view=rest-monitor-2022-10-01&tabs=HTTP#recurrentschedule)). Defaults to `UTC`. * `days` - (Required) A list of days that this profile takes effect on. Possible values include `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday` and `Sunday`. diff --git a/website/docs/r/monitor_data_collection_rule.html.markdown b/website/docs/r/monitor_data_collection_rule.html.markdown index 2fb6b26f66a2e..f0026a617a3b1 100644 --- a/website/docs/r/monitor_data_collection_rule.html.markdown +++ b/website/docs/r/monitor_data_collection_rule.html.markdown @@ -504,14 +504,12 @@ A `syslog` block supports the following: * `facility_names` - (Required) Specifies a list of facility names. Use a wildcard `*` to collect logs for all facility names. Possible values are `alert`, `*`, `audit`, `auth`, `authpriv`, `clock`, `cron`, `daemon`, `ftp`, `kern`, `local5`, `local4`, `local1`, `local7`, `local6`, `local3`, `local2`, `local0`, `lpr`, `mail`, `mark`, `news`, `nopri`, `ntp`, `syslog`, `user` and `uucp`. +* `streams` - (Required) Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values include but not limited to `Microsoft-Syslog`,and `Microsoft-CiscoAsa`, and `Microsoft-CommonSecurityLog`. + * `log_levels` - (Required) Specifies a list of log levels. Use a wildcard `*` to collect logs for all log levels. Possible values are `Debug`, `Info`, `Notice`, `Warning`, `Error`, `Critical`, `Alert`, `Emergency`,and `*`. * `name` - (Required) The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule. -* `streams` - (Optional) Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values include but not limited to `Microsoft-Syslog`,and `Microsoft-CiscoAsa`, and `Microsoft-CommonSecurityLog`. - --> **Note:** In 4.0 or later version of the provider, `streams` will be required. In 3.x version of provider, if `streams` is not specified in creation, it is default to `["Microsoft-Syslog"]`. if `streams` need to be modified (include change other value to the default value), it must be explicitly specified. - --- A `text` block within the `log_file.settings` block supports the following: diff --git a/website/docs/r/monitor_diagnostic_setting.html.markdown b/website/docs/r/monitor_diagnostic_setting.html.markdown index 03f2f27deb010..6ce94c3f965ae 100644 --- a/website/docs/r/monitor_diagnostic_setting.html.markdown +++ b/website/docs/r/monitor_diagnostic_setting.html.markdown @@ -46,18 +46,10 @@ resource "azurerm_monitor_diagnostic_setting" "example" { enabled_log { category = "AuditEvent" - - retention_policy { - enabled = false - } } metric { category = "AllMetrics" - - retention_policy { - enabled = false - } } } ``` @@ -82,13 +74,9 @@ The following arguments are supported: -> **NOTE:** At least one of `eventhub_authorization_rule_id`, `log_analytics_workspace_id`, `partner_solution_id` and `storage_account_id` must be specified. -* `log` - (Optional) One or more `log` blocks as defined below. - --> **NOTE:** `log` is deprecated in favour of the `enabled_log` property and will be removed in version 4.0 of the AzureRM Provider. - * `enabled_log` - (Optional) One or more `enabled_log` blocks as defined below. --> **NOTE:** At least one `log`, `enabled_log` or `metric` block must be specified. At least one type of Log or Metric must be enabled. +-> **NOTE:** At least one `enabled_log` or `metric` block must be specified. At least one type of Log or Metric must be enabled. * `log_analytics_workspace_id` - (Optional) Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. @@ -96,7 +84,7 @@ The following arguments are supported: * `metric` - (Optional) One or more `metric` blocks as defined below. --> **NOTE:** At least one `log`, `enabled_log` or `metric` block must be specified. +-> **NOTE:** At least one `enabled_log` or `metric` block must be specified. * `storage_account_id` - (Optional) The ID of the Storage Account where logs should be sent. @@ -112,26 +100,6 @@ The following arguments are supported: --- -A `log` block supports the following: - -* `category` - (Optional) The name of a Diagnostic Log Category for this Resource. - --> **NOTE:** The Log Categories available vary depending on the Resource being used. You may wish to use [the `azurerm_monitor_diagnostic_categories` Data Source](../d/monitor_diagnostic_categories.html) or [list of service specific schemas](https://docs.microsoft.com/azure/azure-monitor/platform/resource-logs-schema#service-specific-schemas) to identify which categories are available for a given Resource. - -* `category_group` - (Optional) The name of a Diagnostic Log Category Group for this Resource. - --> **NOTE:** Not all resources have category groups available. - --> **NOTE:** Exactly one of `category` or `category_group` must be specified. - -* `retention_policy` - (Optional) A `retention_policy` block as defined below. - -!> **NOTE:** `retention_policy` has been deprecated in favor of `azurerm_storage_management_policy` resource - to learn more information on the deprecation [in the Azure documentation](https://aka.ms/diagnostic_settings_log_retention). - -* `enabled` - (Optional) Is this Diagnostic Log enabled? Defaults to `true`. - ---- - An `enabled_log` block supports the following: * `category` - (Optional) The name of a Diagnostic Log Category for this Resource. @@ -144,10 +112,6 @@ An `enabled_log` block supports the following: -> **NOTE:** Exactly one of `category` or `category_group` must be specified. -* `retention_policy` - (Optional) A `retention_policy` block as defined below. - -!> **NOTE:** `retention_policy` has been deprecated in favor of `azurerm_storage_management_policy` resource - to learn more information on the deprecation [in the Azure documentation](https://aka.ms/diagnostic_settings_log_retention). - --- A `metric` block supports the following: @@ -156,25 +120,8 @@ A `metric` block supports the following: -> **NOTE:** The Metric Categories available vary depending on the Resource being used. You may wish to use [the `azurerm_monitor_diagnostic_categories` Data Source](../d/monitor_diagnostic_categories.html) to identify which categories are available for a given Resource. -* `retention_policy` - (Optional) A `retention_policy` block as defined below. - -!> **NOTE:** `retention_policy` has been deprecated in favor of `azurerm_storage_management_policy` resource - to learn more information on the deprecation [in the Azure documentation](https://aka.ms/diagnostic_settings_log_retention). - * `enabled` - (Optional) Is this Diagnostic Metric enabled? Defaults to `true`. ---- - -A `retention_policy` block supports the following: - -!> **NOTE:** `retention_policy` has been deprecated in favor of `azurerm_storage_management_policy` resource - to learn more information on the deprecation [in the Azure documentation](https://aka.ms/diagnostic_settings_log_retention). - -* `enabled` - (Required) Is this Retention Policy enabled? - -* `days` - (Optional) The number of days for which this Retention Policy should apply. - - --> **NOTE:** Setting this to `0` will retain the events indefinitely. - ## Attributes Reference In addition to the Arguments listed above - the following Attributes are exported: diff --git a/website/docs/r/monitor_log_profile.html.markdown b/website/docs/r/monitor_log_profile.html.markdown deleted file mode 100644 index 346c36206c316..0000000000000 --- a/website/docs/r/monitor_log_profile.html.markdown +++ /dev/null @@ -1,111 +0,0 @@ ---- -subcategory: "Monitor" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_monitor_log_profile" -description: |- - Manages a Log Profile. ---- - -# azurerm_monitor_log_profile - -Manages a [Log Profile](https://docs.microsoft.com/azure/monitoring-and-diagnostics/monitoring-overview-activity-logs#export-the-activity-log-with-a-log-profile). A Log Profile configures how Activity Logs are exported. - --> **NOTE:** It's only possible to configure one Log Profile per Subscription. If you are trying to create more than one Log Profile, an error with `StatusCode=409` will occur. - -!> **NOTE:** Azure Log Profiles will be retired on 30th September 2026 and will be removed in v4.0 of the AzureRM Provider. More information on the deprecation can be found [in the Azure documentation](https://learn.microsoft.com/azure/azure-monitor/essentials/activity-log?tabs=powershell#legacy-collection-methods). - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "logprofiletest-rg" - location = "West Europe" -} - -resource "azurerm_storage_account" "example" { - name = "afscsdfytw" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_eventhub_namespace" "example" { - name = "logprofileeventhub" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - sku = "Standard" - capacity = 2 -} - -resource "azurerm_monitor_log_profile" "example" { - name = "default" - - categories = [ - "Action", - "Delete", - "Write", - ] - - locations = [ - "westus", - "global", - ] - - # RootManageSharedAccessKey is created by default with listen, send, manage permissions - servicebus_rule_id = "${azurerm_eventhub_namespace.example.id}/authorizationrules/RootManageSharedAccessKey" - storage_account_id = azurerm_storage_account.example.id - - retention_policy { - enabled = true - days = 7 - } -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The name of the Log Profile. Changing this forces a new resource to be created. - -* `categories` - (Required) List of categories of the logs. - -* `locations` - (Required) List of regions for which Activity Log events are stored or streamed. - -* `storage_account_id` - (Optional) The resource ID of the storage account in which the Activity Log is stored. At least one of `storage_account_id` or `servicebus_rule_id` must be set. - -* `servicebus_rule_id` - (Optional) The service bus (or event hub) rule ID of the service bus (or event hub) namespace in which the Activity Log is streamed to. At least one of `storage_account_id` or `servicebus_rule_id` must be set. - -* `retention_policy` - (Required) A `retention_policy` block as documented below. A retention policy for how long Activity Logs are retained in the storage account. - ---- - -The `retention_policy` block supports: - -* `enabled` - (Required) A boolean value to indicate whether the retention policy is enabled. - -* `days` - (Optional) The number of days for the retention policy. Defaults to `0`. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Log Profile. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Log Profile. -* `update` - (Defaults to 30 minutes) Used when updating the Log Profile. -* `read` - (Defaults to 5 minutes) Used when retrieving the Log Profile. -* `delete` - (Defaults to 30 minutes) Used when deleting the Log Profile. - -## Import - -A Log Profile can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_monitor_log_profile.example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Insights/logProfiles/test -``` diff --git a/website/docs/r/mssql_database.html.markdown b/website/docs/r/mssql_database.html.markdown index b3dad69e734b7..5950a2d2df5b2 100644 --- a/website/docs/r/mssql_database.html.markdown +++ b/website/docs/r/mssql_database.html.markdown @@ -24,14 +24,6 @@ resource "azurerm_resource_group" "example" { location = "West Europe" } -resource "azurerm_storage_account" "example" { - name = "examplesa" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_tier = "Standard" - account_replication_type = "LRS" -} - resource "azurerm_mssql_server" "example" { name = "example-sqlserver" resource_group_name = azurerm_resource_group.example.name @@ -42,15 +34,13 @@ resource "azurerm_mssql_server" "example" { } resource "azurerm_mssql_database" "example" { - name = "example-db" - server_id = azurerm_mssql_server.example.id - collation = "SQL_Latin1_General_CP1_CI_AS" - license_type = "LicenseIncluded" - max_size_gb = 4 - read_scale = true - sku_name = "S0" - zone_redundant = true - enclave_type = "VBS" + name = "example-db" + server_id = azurerm_mssql_server.example.id + collation = "SQL_Latin1_General_CP1_CI_AS" + license_type = "LicenseIncluded" + max_size_gb = 2 + sku_name = "S0" + enclave_type = "VBS" tags = { foo = "bar" @@ -294,7 +284,6 @@ A `long_term_retention_policy` block supports the following: * `monthly_retention` - (Optional) The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months. e.g. `P1Y`, `P1M`, `P4W` or `P30D`. * `yearly_retention` - (Optional) The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g. `P1Y`, `P12M`, `P52W` or `P365D`. * `week_of_year` - (Optional) The week of year to take the yearly backup. Value has to be between `1` and `52`. -* `immutable_backups_enabled` - (Optional) Specifies if the backups are immutable. Defaults to `false`. --- diff --git a/website/docs/r/mssql_elasticpool.html.markdown b/website/docs/r/mssql_elasticpool.html.markdown index 7e9f474310419..ca14fee08ef8e 100644 --- a/website/docs/r/mssql_elasticpool.html.markdown +++ b/website/docs/r/mssql_elasticpool.html.markdown @@ -91,13 +91,13 @@ The following arguments are supported: The `sku` block supports the following: -* `name` - (Required) Specifies the SKU Name for this Elasticpool. The name of the SKU, will be either `vCore` based or `DTU` based. Possible `DTU` based values are `BasicPool`, `StandardPool`, `PremiumPool` while possible `vCore` based values are `GP_Gen4`, `GP_Gen5`, `GP_Fsv2`, `GP_DC`, `BC_Gen4`, `BC_Gen5`, `BC_DC`, `HS_PRMS`, or `HS_Gen5`. +* `name` - (Required) Specifies the SKU Name for this Elasticpool. The name of the SKU, will be either `vCore` based or `DTU` based. Possible `DTU` based values are `BasicPool`, `StandardPool`, `PremiumPool` while possible `vCore` based values are `GP_Gen4`, `GP_Gen5`, `GP_Fsv2`, `GP_DC`, `BC_Gen4`, `BC_Gen5`, `BC_DC`, `HS_PRMS`, `HS_MOPRMS`, or `HS_Gen5`. * `capacity` - (Required) The scale up/out capacity, representing server's compute units. For more information see the documentation for your Elasticpool configuration: [vCore-based](https://docs.microsoft.com/azure/sql-database/sql-database-vcore-resource-limits-elastic-pools) or [DTU-based](https://docs.microsoft.com/azure/sql-database/sql-database-dtu-resource-limits-elastic-pools). * `tier` - (Required) The tier of the particular SKU. Possible values are `GeneralPurpose`, `BusinessCritical`, `Basic`, `Standard`, `Premium`, or `HyperScale`. For more information see the documentation for your Elasticpool configuration: [vCore-based](https://docs.microsoft.com/azure/sql-database/sql-database-vcore-resource-limits-elastic-pools) or [DTU-based](https://docs.microsoft.com/azure/sql-database/sql-database-dtu-resource-limits-elastic-pools). -* `family` - (Optional) The `family` of hardware `Gen4`, `Gen5`, `Fsv2` or `DC`. +* `family` - (Optional) The `family` of hardware `Gen4`, `Gen5`, `Fsv2`, `MOPRMS`, or `DC`. --- diff --git a/website/docs/r/mssql_managed_database.html.markdown b/website/docs/r/mssql_managed_database.html.markdown index c84de00d39754..4b95e8185d65a 100644 --- a/website/docs/r/mssql_managed_database.html.markdown +++ b/website/docs/r/mssql_managed_database.html.markdown @@ -82,7 +82,6 @@ A `long_term_retention_policy` block supports the following: * `monthly_retention` - (Optional) The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months. e.g. `P1Y`, `P1M`, `P4W` or `P30D`. * `yearly_retention` - (Optional) The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g. `P1Y`, `P12M`, `P52W` or `P365D`. * `week_of_year` - (Optional) The week of year to take the yearly backup. Value has to be between `1` and `52`. -* `immutable_backups_enabled` - (Optional) Specifies if the backups are immutable. Defaults to `false`. --- diff --git a/website/docs/r/mssql_managed_instance.html.markdown b/website/docs/r/mssql_managed_instance.html.markdown index 58ca569e62096..e933e0ff28c9d 100644 --- a/website/docs/r/mssql_managed_instance.html.markdown +++ b/website/docs/r/mssql_managed_instance.html.markdown @@ -241,6 +241,8 @@ The following arguments are supported: * `public_data_endpoint_enabled` - (Optional) Is the public data endpoint enabled? Default value is `false`. +* `service_principal_type` - (Optional) The service principal type. The only possible value is `SystemAssigned`. + * `storage_account_type` - (Optional) Specifies the storage account type used to store backups for this database. Changing this forces a new resource to be created. Possible values are `GRS`, `GZRS`, `LRS`, and `ZRS`. Defaults to `GRS`. * `zone_redundant_enabled` - (Optional) Specifies whether or not the SQL Managed Instance is zone redundant. Defaults to `false`. diff --git a/website/docs/r/mssql_managed_instance_active_directory_administrator.html.markdown b/website/docs/r/mssql_managed_instance_active_directory_administrator.html.markdown index dee875f7fb03f..70174d993b049 100644 --- a/website/docs/r/mssql_managed_instance_active_directory_administrator.html.markdown +++ b/website/docs/r/mssql_managed_instance_active_directory_administrator.html.markdown @@ -105,7 +105,7 @@ The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/l * `create` - (Defaults to 30 minutes) Used when creating the SQL Active Directory Administrator. * `update` - (Defaults to 30 minutes) Used when updating the SQL Active Directory Administrator. * `read` - (Defaults to 5 minutes) Used when retrieving the SQL Active Directory Administrator. -* `delete` - (Defaults to 30 minutes) Used when deleting the SQL Active Directory Administrator. +* `delete` - (Defaults to 60 minutes) Used when deleting the SQL Active Directory Administrator. ## Import diff --git a/website/docs/r/mysql_active_directory_administrator.html.markdown b/website/docs/r/mysql_active_directory_administrator.html.markdown deleted file mode 100644 index cdd30517fe5de..0000000000000 --- a/website/docs/r/mysql_active_directory_administrator.html.markdown +++ /dev/null @@ -1,83 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_mysql_active_directory_administrator" -description: |- - Manages an Active Directory administrator on a MySQL server ---- - -# azurerm_mysql_active_directory_administrator - -Allows you to set a user or group as the AD administrator for an MySQL server in Azure - -~> **Note:** Azure Database for MySQL Single Server and its sub resources are scheduled for retirement by 2024-09-16 and will migrate to using Azure Database for MySQL Flexible Server: https://go.microsoft.com/fwlink/?linkid=2216041. The `azurerm_mysql_active_directory_administrator` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `azurerm_mysql_flexible_server_active_directory_administrator` resource instead. - -## Example Usage - -```hcl -data "azurerm_client_config" "current" {} - -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} - -resource "azurerm_mysql_server" "example" { - name = "example-mysqlserver" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - administrator_login = "mysqladminun" - administrator_login_password = "H@Sh1CoR3!" - ssl_enforcement_enabled = true - - sku_name = "B_Gen5_2" - storage_mb = 5120 - version = "5.7" -} - -resource "azurerm_mysql_active_directory_administrator" "example" { - server_name = azurerm_mysql_server.example.name - resource_group_name = azurerm_resource_group.example.name - login = "sqladmin" - tenant_id = data.azurerm_client_config.current.tenant_id - object_id = data.azurerm_client_config.current.object_id -} -``` - -## Argument Reference - -The following arguments are supported: - -* `server_name` - (Required) The name of the MySQL Server on which to set the administrator. Changing this forces a new resource to be created. - -* `resource_group_name` - (Required) The name of the resource group for the MySQL server. Changing this forces a new resource to be created. - -* `login` - (Required) The login name of the principal to set as the server administrator - -* `object_id` - (Required) The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity. - -* `tenant_id` - (Required) The Azure Tenant ID - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the MySQL Active Directory Administrator. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the MySQL Active Directory Administrator. -* `update` - (Defaults to 30 minutes) Used when updating the MySQL Active Directory Administrator. -* `read` - (Defaults to 5 minutes) Used when retrieving the MySQL Active Directory Administrator. -* `delete` - (Defaults to 30 minutes) Used when deleting the MySQL Active Directory Administrator. - -## Import - -A MySQL Active Directory Administrator can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_mysql_active_directory_administrator.administrator /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.DBforMySQL/servers/myserver/administrators/activeDirectory -``` diff --git a/website/docs/r/mysql_configuration.html.markdown b/website/docs/r/mysql_configuration.html.markdown deleted file mode 100644 index c3157f38c653e..0000000000000 --- a/website/docs/r/mysql_configuration.html.markdown +++ /dev/null @@ -1,92 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_mysql_configuration" -description: |- - Sets a MySQL Configuration value on a MySQL Server. ---- - -# azurerm_mysql_configuration - -Sets a MySQL Configuration value on a MySQL Server. - -~> **Note:** Azure Database for MySQL Single Server and its sub resources are scheduled for retirement by 2024-09-16 and will migrate to using Azure Database for MySQL Flexible Server: https://go.microsoft.com/fwlink/?linkid=2216041. The `azurerm_mysql_configuration` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `azurerm_mysql_flexible_server_configuration` resource instead. - -## Disclaimers - -~> **Note:** Since this resource is provisioned by default, the Azure Provider will not check for the presence of an existing resource prior to attempting to create it. - -## Example Usage - -```hcl -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} - -resource "azurerm_mysql_server" "example" { - name = "example-mysqlserver" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - administrator_login = "mysqladminun" - administrator_login_password = "H@Sh1CoR3!" - - sku_name = "B_Gen5_2" - storage_mb = 5120 - version = "5.7" - - auto_grow_enabled = true - backup_retention_days = 7 - geo_redundant_backup_enabled = true - infrastructure_encryption_enabled = true - public_network_access_enabled = false - ssl_enforcement_enabled = true - ssl_minimal_tls_version_enforced = "TLS1_2" -} - -resource "azurerm_mysql_configuration" "example" { - name = "interactive_timeout" - resource_group_name = azurerm_resource_group.example.name - server_name = azurerm_mysql_server.example.name - value = "600" -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) Specifies the name of the MySQL Configuration, which needs [to be a valid MySQL configuration name](https://dev.mysql.com/doc/refman/5.7/en/server-configuration.html). Changing this forces a new resource to be created. - -* `server_name` - (Required) Specifies the name of the MySQL Server. Changing this forces a new resource to be created. - -* `resource_group_name` - (Required) The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. - -* `value` - (Required) Specifies the value of the MySQL Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the MySQL Configuration. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the MySQL Configuration. -* `read` - (Defaults to 5 minutes) Used when retrieving the MySQL Configuration. -* `delete` - (Defaults to 30 minutes) Used when deleting the MySQL Configuration. - -## Import - -MySQL Configurations can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_mysql_configuration.interactive_timeout /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforMySQL/servers/server1/configurations/interactive_timeout -``` diff --git a/website/docs/r/mysql_database.html.markdown b/website/docs/r/mysql_database.html.markdown deleted file mode 100644 index 4917b16d650b5..0000000000000 --- a/website/docs/r/mysql_database.html.markdown +++ /dev/null @@ -1,98 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_mysql_database" -description: |- - Manages a MySQL Database within a MySQL Server. ---- - -# azurerm_mysql_database - -Manages a MySQL Database within a MySQL Server - -~> **Note:** Azure Database for MySQL Single Server and its sub resources are scheduled for retirement by 2024-09-16 and will migrate to using Azure Database for MySQL Flexible Server: https://go.microsoft.com/fwlink/?linkid=2216041. The `azurerm_mysql_database` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `azurerm_mysql_flexible_database` resource instead. - -!>**IMPORTANT:** To mitigate the possibility of accidental data loss it is highly recommended that you use the `prevent_destroy` lifecycle argument in your configuration file for this resource. For more information on the `prevent_destroy` lifecycle argument please see the [terraform documentation](https://developer.hashicorp.com/terraform/tutorials/state/resource-lifecycle#prevent-resource-deletion). - -## Example Usage - -```hcl -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} - -resource "azurerm_mysql_server" "example" { - name = "example-mysqlserver" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - administrator_login = "mysqladminun" - administrator_login_password = "H@Sh1CoR3!" - - sku_name = "GP_Gen5_2" - storage_mb = 5120 - version = "5.7" - - auto_grow_enabled = true - backup_retention_days = 7 - geo_redundant_backup_enabled = true - infrastructure_encryption_enabled = true - public_network_access_enabled = false - ssl_enforcement_enabled = true - ssl_minimal_tls_version_enforced = "TLS1_2" -} - -resource "azurerm_mysql_database" "example" { - name = "exampledb" - resource_group_name = azurerm_resource_group.example.name - server_name = azurerm_mysql_server.example.name - charset = "utf8" - collation = "utf8_unicode_ci" - - # prevent the possibility of accidental data loss - lifecycle { - prevent_destroy = true - } -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) Specifies the name of the MySQL Database, which needs [to be a valid MySQL identifier](https://dev.mysql.com/doc/refman/5.7/en/identifiers.html). Changing this forces a new resource to be created. - -* `server_name` - (Required) Specifies the name of the MySQL Server. Changing this forces a new resource to be created. - -* `resource_group_name` - (Required) The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. - -* `charset` - (Required) Specifies the Charset for the MySQL Database, which needs [to be a valid MySQL Charset](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html). Changing this forces a new resource to be created. - -* `collation` - (Required) Specifies the Collation for the MySQL Database, which needs [to be a valid MySQL Collation](https://dev.mysql.com/doc/refman/5.7/en/charset-mysql.html). Changing this forces a new resource to be created. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the MySQL Database. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 60 minutes) Used when creating the MySQL Database. -* `read` - (Defaults to 5 minutes) Used when retrieving the MySQL Database. -* `delete` - (Defaults to 60 minutes) Used when deleting the MySQL Database. - -## Import - -MySQL Database's can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_mysql_database.database1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforMySQL/servers/server1/databases/database1 -``` diff --git a/website/docs/r/mysql_firewall_rule.html.markdown b/website/docs/r/mysql_firewall_rule.html.markdown deleted file mode 100644 index 9606d52c02a89..0000000000000 --- a/website/docs/r/mysql_firewall_rule.html.markdown +++ /dev/null @@ -1,120 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_mysql_firewall_rule" -description: |- - Manages a Firewall Rule for a MySQL Server. ---- - -# azurerm_mysql_firewall_rule - -Manages a Firewall Rule for a MySQL Server. - -~> **Note:** Azure Database for MySQL Single Server and its sub resources are scheduled for retirement by 2024-09-16 and will migrate to using Azure Database for MySQL Flexible Server: https://go.microsoft.com/fwlink/?linkid=2216041. The `azurerm_mysql_firewall_rule` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `azurerm_mysql_flexible_server_firewall_rule` resource instead. - -## Example Usage (Single IP Address) - -```hcl -resource "azurerm_resource_group" "example" { - name = "api-rg-pro" - location = "West Europe" -} - -resource "azurerm_mysql_server" "example" { - name = "example" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - version = "5.7" - sku_name = "GP_Gen5_2" - ssl_enforcement_enabled = true -} - -resource "azurerm_mysql_firewall_rule" "example" { - name = "office" - resource_group_name = azurerm_resource_group.example.name - server_name = azurerm_mysql_server.example.name - start_ip_address = "40.112.8.12" - end_ip_address = "40.112.8.12" -} -``` - -## Example Usage (IP Range) - -```hcl -resource "azurerm_resource_group" "example" { - name = "api-rg-pro" - location = "West Europe" -} - -resource "azurerm_mysql_server" "example" { - # ... -} - -resource "azurerm_mysql_firewall_rule" "example" { - name = "office" - resource_group_name = azurerm_resource_group.example.name - server_name = azurerm_mysql_server.example.name - start_ip_address = "40.112.0.0" - end_ip_address = "40.112.255.255" -} -``` - -## Example Usage (Allow access to Azure services) - -```hcl -resource "azurerm_resource_group" "example" { - name = "api-rg-pro" - location = "West Europe" -} - -resource "azurerm_mysql_server" "example" { - # ... -} - -resource "azurerm_mysql_firewall_rule" "example" { - name = "office" - resource_group_name = azurerm_resource_group.example.name - server_name = azurerm_mysql_server.example.name - start_ip_address = "0.0.0.0" - end_ip_address = "0.0.0.0" -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) Specifies the name of the MySQL Firewall Rule. Changing this forces a new resource to be created. - -* `server_name` - (Required) Specifies the name of the MySQL Server. Changing this forces a new resource to be created. - -* `resource_group_name` - (Required) The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. - -* `start_ip_address` - (Required) Specifies the Start IP Address associated with this Firewall Rule. - -* `end_ip_address` - (Required) Specifies the End IP Address associated with this Firewall Rule. - --> **NOTE:** The Azure feature `Allow access to Azure services` can be enabled by setting `start_ip_address` and `end_ip_address` to `0.0.0.0` which ([is documented in the Azure API Docs](https://docs.microsoft.com/rest/api/sql/firewallrules/createorupdate)). - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the MySQL Firewall Rule. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the MySQL Firewall Rule. -* `update` - (Defaults to 30 minutes) Used when updating the MySQL Firewall Rule. -* `read` - (Defaults to 5 minutes) Used when retrieving the MySQL Firewall Rule. -* `delete` - (Defaults to 30 minutes) Used when deleting the MySQL Firewall Rule. - -## Import - -MySQL Firewall Rule's can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_mysql_firewall_rule.rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforMySQL/servers/server1/firewallRules/rule1 -``` diff --git a/website/docs/r/mysql_server.html.markdown b/website/docs/r/mysql_server.html.markdown deleted file mode 100644 index 3d6f518841a1c..0000000000000 --- a/website/docs/r/mysql_server.html.markdown +++ /dev/null @@ -1,147 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_mysql_server" -description: |- - Manages a MySQL Server. - ---- - -# azurerm_mysql_server - -Manages a MySQL Server. - -~> **Note:** Azure Database for MySQL Single Server and its sub resources are scheduled for retirement by 2024-09-16 and will migrate to using Azure Database for MySQL Flexible Server: https://go.microsoft.com/fwlink/?linkid=2216041. The `azurerm_mysql_server` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `azurerm_mysql_flexible_server` resource instead. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} - -resource "azurerm_mysql_server" "example" { - name = "example-mysqlserver" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - administrator_login = "mysqladminun" - administrator_login_password = "H@Sh1CoR3!" - - sku_name = "B_Gen5_2" - storage_mb = 5120 - version = "5.7" - - auto_grow_enabled = true - backup_retention_days = 7 - geo_redundant_backup_enabled = false - infrastructure_encryption_enabled = false - public_network_access_enabled = true - ssl_enforcement_enabled = true - ssl_minimal_tls_version_enforced = "TLS1_2" -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) Specifies the name of the MySQL Server. Changing this forces a new resource to be created. This needs to be globally unique within Azure. - -* `resource_group_name` - (Required) The name of the resource group in which to create the MySQL Server. Changing this forces a new resource to be created. - -* `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - -* `sku_name` - (Required) Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the `tier` + `family` + `cores` pattern (e.g. `B_Gen4_1`, `GP_Gen5_8`). For more information see the [product documentation](https://docs.microsoft.com/azure/mysql/concepts-pricing-tiers). Possible values are `B_Gen4_1`, `B_Gen4_2`, `B_Gen5_1`, `B_Gen5_2`, `GP_Gen4_2`, `GP_Gen4_4`, `GP_Gen4_8`, `GP_Gen4_16`, `GP_Gen4_32`, `GP_Gen5_2`, `GP_Gen5_4`, `GP_Gen5_8`, `GP_Gen5_16`, `GP_Gen5_32`, `GP_Gen5_64`, `MO_Gen5_2`, `MO_Gen5_4`, `MO_Gen5_8`, `MO_Gen5_16` and `MO_Gen5_32`. - -* `version` - (Required) Specifies the version of MySQL to use. Valid values are `5.7`, or `8.0`. Changing this forces a new resource to be created. - -* `administrator_login` - (Optional) The Administrator login for the MySQL Server. Required when `create_mode` is `Default`. Changing this forces a new resource to be created. - -* `administrator_login_password` - (Optional) The Password associated with the `administrator_login` for the MySQL Server. Required when `create_mode` is `Default`. - -* `auto_grow_enabled` - (Optional) Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. Defaults to `true`. - -* `backup_retention_days` - (Optional) Backup retention days for the server, supported values are between `7` and `35` days. - -* `create_mode` - (Optional) The creation mode. Can be used to restore or replicate existing servers. Possible values are `Default`, `Replica`, `GeoRestore`, and `PointInTimeRestore`. Defaults to `Default`. - -* `creation_source_server_id` - (Optional) For creation modes other than `Default`, the source server ID to use. - -* `geo_redundant_backup_enabled` - (Optional) Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier. - -* `identity` - (Optional) An `identity` block as defined below. - -* `infrastructure_encryption_enabled` - (Optional) Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created. - -* `public_network_access_enabled` - (Optional) Whether or not public network access is allowed for this server. Defaults to `true`. - -* `restore_point_in_time` - (Optional) When `create_mode` is `PointInTimeRestore`, specifies the point in time to restore from `creation_source_server_id`. It should be provided in [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) format, e.g. `2013-11-08T22:00:40Z`. - -* `ssl_enforcement_enabled` - (Required) Specifies if SSL should be enforced on connections. Possible values are `true` and `false`. - -* `ssl_minimal_tls_version_enforced` - (Optional) The minimum TLS version to support on the sever. Possible values are `TLSEnforcementDisabled`, `TLS1_0`, `TLS1_1`, and `TLS1_2`. Defaults to `TLS1_2`. - -* `storage_mb` - (Optional) Max storage allowed for a server. Possible values are between `5120` MB(5GB) and `1048576` MB(1TB) for the Basic SKU and between `5120` MB(5GB) and `16777216` MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the [product documentation](https://docs.microsoft.com/azure/mysql/concepts-pricing-tiers). - -* `threat_detection_policy` - (Optional) Threat detection policy configuration, known in the API as Server Security Alerts Policy. The `threat_detection_policy` block supports fields documented below. - -* `tags` - (Optional) A mapping of tags to assign to the resource. - ---- - -A `identity` block supports the following: - -* `type` - (Required) Specifies the type of Managed Service Identity that should be configured on this MySQL Server. The only possible value is `SystemAssigned`. - ---- - -a `threat_detection_policy` block supports the following: - -* `enabled` - (Optional) Is the policy enabled? - -* `disabled_alerts` - (Optional) Specifies a list of alerts which should be disabled. Possible values are `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration` and `Unsafe_Action`. - -* `email_account_admins` - (Optional) Should the account administrators be emailed when this alert is triggered? - -* `email_addresses` - (Optional) A list of email addresses which alerts should be sent to. - -* `retention_days` - (Optional) Specifies the number of days to keep in the Threat Detection audit logs. - -* `storage_account_access_key` - (Optional) Specifies the identifier key of the Threat Detection audit storage account. - -* `storage_endpoint` - (Optional) Specifies the blob storage endpoint (e.g. ). This blob storage will hold all Threat Detection audit logs. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the MySQL Server. - -* `fqdn` - The FQDN of the MySQL Server. - ---- - -An `identity` block exports the following: - -* `principal_id` - The Principal ID associated with this Managed Service Identity. - -* `tenant_id` - The Tenant ID associated with this Managed Service Identity. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 60 minutes) Used when creating the MySQL Server. -* `update` - (Defaults to 60 minutes) Used when updating the MySQL Server. -* `read` - (Defaults to 5 minutes) Used when retrieving the MySQL Server. -* `delete` - (Defaults to 60 minutes) Used when deleting the MySQL Server. - -## Import - -MySQL Server's can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_mysql_server.server1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforMySQL/servers/server1 -``` diff --git a/website/docs/r/mysql_server_key.html.markdown b/website/docs/r/mysql_server_key.html.markdown deleted file mode 100644 index 47de0b296733f..0000000000000 --- a/website/docs/r/mysql_server_key.html.markdown +++ /dev/null @@ -1,116 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_mysql_server_key" -description: |- - Manages a MySQL Server Key. ---- - -# azurerm_mysql_server_key - -Manages a Customer Managed Key for a MySQL Server. - -~> **Note:** Azure Database for MySQL Single Server and its sub resources are scheduled for retirement by 2024-09-16 and will migrate to using Azure Database for MySQL Flexible Server: https://go.microsoft.com/fwlink/?linkid=2216041. The `azurerm_mysql_server_key` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `customer_managed_key` property of the `azurerm_mysql_flexible_server` resource instead. - -## Example Usage - -```hcl -data "azurerm_client_config" "current" {} - -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} - -resource "azurerm_key_vault" "example" { - name = "examplekv" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - tenant_id = data.azurerm_client_config.current.tenant_id - sku_name = "premium" - purge_protection_enabled = true -} - -resource "azurerm_key_vault_access_policy" "server" { - key_vault_id = azurerm_key_vault.example.id - tenant_id = data.azurerm_client_config.current.tenant_id - object_id = azurerm_mysql_server.example.identity[0].principal_id - key_permissions = ["Get", "UnwrapKey", "WrapKey"] - secret_permissions = ["Get"] -} - -resource "azurerm_key_vault_access_policy" "client" { - key_vault_id = azurerm_key_vault.example.id - tenant_id = data.azurerm_client_config.current.tenant_id - object_id = data.azurerm_client_config.current.object_id - key_permissions = ["Get", "Create", "Delete", "List", "Restore", "Recover", "UnwrapKey", "WrapKey", "Purge", "Encrypt", "Decrypt", "Sign", "Verify", "GetRotationPolicy"] - secret_permissions = ["Get"] -} - -resource "azurerm_key_vault_key" "example" { - name = "tfex-key" - key_vault_id = azurerm_key_vault.example.id - key_type = "RSA" - key_size = 2048 - key_opts = ["decrypt", "encrypt", "sign", "unwrapKey", "verify", "wrapKey"] - depends_on = [ - azurerm_key_vault_access_policy.client, - azurerm_key_vault_access_policy.server, - ] -} - -resource "azurerm_mysql_server" "example" { - name = "example-mysql-server" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - sku_name = "GP_Gen5_2" - administrator_login = "acctestun" - administrator_login_password = "H@Sh1CoR3!" - ssl_enforcement_enabled = true - ssl_minimal_tls_version_enforced = "TLS1_1" - storage_mb = 51200 - version = "5.7" - - identity { - type = "SystemAssigned" - } -} - -resource "azurerm_mysql_server_key" "example" { - server_id = azurerm_mysql_server.example.id - key_vault_key_id = azurerm_key_vault_key.example.id -} -``` - -## Argument Reference - -The following arguments are supported: - -* `server_id` - (Required) The ID of the MySQL Server. Changing this forces a new resource to be created. - -* `key_vault_key_id` - (Required) The URL to a Key Vault Key. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the MySQL Server Key. - ---- - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 60 minutes) Used when creating the MySQL Server Key. -* `update` - (Defaults to 60 minutes) Used when updating the MySQL Server Key. -* `read` - (Defaults to 5 minutes) Used when retrieving the MySQL Server Key. -* `delete` - (Defaults to 60 minutes) Used when deleting the MySQL Server Key. - -## Import - -A MySQL Server Key can be imported using the `resource id` of the MySQL Server Key, e.g. - -```shell -terraform import azurerm_mysql_server_key.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DBforMySQL/servers/server1/keys/keyvaultname_key-name_keyversion -``` diff --git a/website/docs/r/mysql_virtual_network_rule.html.markdown b/website/docs/r/mysql_virtual_network_rule.html.markdown deleted file mode 100644 index a28f55218ff15..0000000000000 --- a/website/docs/r/mysql_virtual_network_rule.html.markdown +++ /dev/null @@ -1,110 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_mysql_virtual_network_rule" -description: |- - Manages a MySQL Virtual Network Rule. ---- - -# azurerm_mysql_virtual_network_rule - -Manages a MySQL Virtual Network Rule. - -~> **Note:** Azure Database for MySQL Single Server and its sub resources are scheduled for retirement by 2024-09-16 and will migrate to using Azure Database for MySQL Flexible Server: https://go.microsoft.com/fwlink/?linkid=2216041. The `azurerm_mysql_virtual_network_rule` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. - --> **NOTE:** MySQL Virtual Network Rules [can only be used with SKU Tiers of `GeneralPurpose` or `MemoryOptimized`](https://docs.microsoft.com/azure/mysql/concepts-data-access-and-security-vnet) - -## Example Usage - -```hcl -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} - -resource "azurerm_virtual_network" "example" { - name = "example-vnet" - address_space = ["10.7.29.0/29"] - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name -} - -resource "azurerm_subnet" "internal" { - name = "internal" - resource_group_name = azurerm_resource_group.example.name - virtual_network_name = azurerm_virtual_network.example.name - address_prefixes = ["10.7.29.0/29"] - service_endpoints = ["Microsoft.Sql"] -} - -resource "azurerm_mysql_server" "example" { - name = "example-mysqlserver" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - administrator_login = "mysqladminun" - administrator_login_password = "H@Sh1CoR3!" - - sku_name = "GP_Gen5_2" - storage_mb = 5120 - version = "5.7" - - backup_retention_days = 7 - geo_redundant_backup_enabled = false - ssl_enforcement_enabled = true -} - -resource "azurerm_mysql_virtual_network_rule" "example" { - name = "mysql-vnet-rule" - resource_group_name = azurerm_resource_group.example.name - server_name = azurerm_mysql_server.example.name - subnet_id = azurerm_subnet.internal.id -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The name of the MySQL Virtual Network Rule. Cannot be empty and must only contain alphanumeric characters and hyphens. Cannot start with a number, and cannot start or end with a hyphen. Changing this forces a new resource to be created. - -~> **NOTE:** `name` must be between 1-128 characters long and must satisfy all of the requirements below: - -1. Contains only alphanumeric and hyphen characters -2. Cannot start with a number or hyphen -3. Cannot end with a hyphen - -* `resource_group_name` - (Required) The name of the resource group where the MySQL server resides. Changing this forces a new resource to be created. - -* `server_name` - (Required) The name of the SQL Server to which this MySQL virtual network rule will be applied to. Changing this forces a new resource to be created. - -* `subnet_id` - (Required) The ID of the subnet that the MySQL server will be connected to. - -~> **NOTE:** Due to [a bug in the Azure API](https://github.com/Azure/azure-rest-api-specs/issues/3719) this resource currently doesn't expose the `ignore_missing_vnet_service_endpoint` field and defaults this to `false`. Terraform will check during the provisioning of the Virtual Network Rule that the Subnet contains the Service Rule to verify that the Virtual Network Rule can be created. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the MySQL Virtual Network Rule. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the MySQL Virtual Network Rule. -* `update` - (Defaults to 30 minutes) Used when updating the MySQL Virtual Network Rule. -* `read` - (Defaults to 5 minutes) Used when retrieving the MySQL Virtual Network Rule. -* `delete` - (Defaults to 30 minutes) Used when deleting the MySQL Virtual Network Rule. - -## Import - -MySQL Virtual Network Rules can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_mysql_virtual_network_rule.rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.DBforMySQL/servers/myserver/virtualNetworkRules/vnetrulename -``` diff --git a/website/docs/r/netapp_pool.html.markdown b/website/docs/r/netapp_pool.html.markdown index c7b1b2b449c40..7ecdb6a43f172 100644 --- a/website/docs/r/netapp_pool.html.markdown +++ b/website/docs/r/netapp_pool.html.markdown @@ -48,13 +48,13 @@ The following arguments are supported: * `service_level` - (Required) The service level of the file system. Valid values include `Premium`, `Standard`, and `Ultra`. Changing this forces a new resource to be created. -* `size_in_tb` - (Required) Provisioned size of the pool in TB. Value must be between `2` and `2048`. +* `size_in_tb` - (Required) Provisioned size of the pool in TB. Value must be between `1` and `2048`. ~> **NOTE** `2` TB capacity pool sizing is currently in preview. You can only take advantage of the `2` TB minimum if all the volumes in the capacity pool are using `Standard` network features. If any volume is using `Basic` network features, the minimum size is `4` TB. Please see the product [documentation](https://learn.microsoft.com/azure/azure-netapp-files/azure-netapp-files-set-up-capacity-pool) for more information. ~> **NOTE** The maximum `size_in_tb` is goverened by regional quotas. You may request additional capacity from Azure, currently up to `2048`. -* `qos_type` - (Optional) QoS Type of the pool. Valid values include `Auto` or `Manual`. +* `qos_type` - (Optional) QoS Type of the pool. Valid values include `Auto` or `Manual`. Defaults to `Auto`. * `encryption_type` - (Optional) The encryption type of the pool. Valid values include `Single`, and `Double`. Defaults to `Single`. Changing this forces a new resource to be created. diff --git a/website/docs/r/netapp_volume.html.markdown b/website/docs/r/netapp_volume.html.markdown index ec487d36fc41d..b0fb29206f7af 100644 --- a/website/docs/r/netapp_volume.html.markdown +++ b/website/docs/r/netapp_volume.html.markdown @@ -68,7 +68,6 @@ resource "azurerm_netapp_volume" "example" { volume_path = "my-unique-file-path" service_level = "Premium" subnet_id = azurerm_subnet.example.id - network_features = "Basic" protocols = ["NFSv4.1"] security_style = "unix" storage_quota_in_gb = 100 @@ -157,6 +156,8 @@ The following arguments are supported: * `smb_continuous_availability_enabled` - (Optional) Enable SMB Continuous Availability. +* `smb3_protocol_encryption_enabled` - (Optional) Enable SMB encryption. + * `tags` - (Optional) A mapping of tags to assign to the resource. -> **Note:** It is highly recommended to use the **lifecycle** property as noted in the example since it will prevent an accidental deletion of the volume if the `protocols` argument changes to a different protocol type. diff --git a/website/docs/r/network_interface_application_gateway_backend_address_pool_association.html.markdown b/website/docs/r/network_interface_application_gateway_backend_address_pool_association.html.markdown index b803e251dd96d..ef328ca886fce 100644 --- a/website/docs/r/network_interface_application_gateway_backend_address_pool_association.html.markdown +++ b/website/docs/r/network_interface_application_gateway_backend_address_pool_association.html.markdown @@ -44,7 +44,7 @@ resource "azurerm_public_ip" "example" { name = "example-pip" location = azurerm_resource_group.example.location resource_group_name = azurerm_resource_group.example.name - allocation_method = "Dynamic" + allocation_method = "Static" } # since these variables are re-used - a locals block makes this more maintainable @@ -63,14 +63,14 @@ resource "azurerm_application_gateway" "network" { location = azurerm_resource_group.example.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } gateway_ip_configuration { name = "my-gateway-ip-configuration" - subnet_id = azurerm_subnet.frontend.id + subnet_id = azurerm_subnet.backend.id } frontend_port { diff --git a/website/docs/r/network_packet_capture.html.markdown b/website/docs/r/network_packet_capture.html.markdown deleted file mode 100644 index 9e841bc8e6336..0000000000000 --- a/website/docs/r/network_packet_capture.html.markdown +++ /dev/null @@ -1,197 +0,0 @@ ---- -subcategory: "Network" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_network_packet_capture" -description: |- - Configures Packet Capturing against a Virtual Machine using a Network Watcher. - ---- - -# azurerm_network_packet_capture - -Configures Network Packet Capturing against a Virtual Machine using a Network Watcher. - -!> **NOTE:** The `azurerm_network_packet_capture` resource is deprecated and will be removed in favour of `azurerm_virtual_machine_packet_capture` and `azurerm_virtual_machine_scale_set_packet_capture` in version 4.0 of the AzureRM Provider. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "packet-capture-rg" - location = "West Europe" -} - -resource "azurerm_network_watcher" "example" { - name = "network-watcher" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name -} - -resource "azurerm_virtual_network" "example" { - name = "production-network" - address_space = ["10.0.0.0/16"] - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name -} - -resource "azurerm_subnet" "example" { - name = "internal" - resource_group_name = azurerm_resource_group.example.name - virtual_network_name = azurerm_virtual_network.example.name - address_prefixes = ["10.0.2.0/24"] -} - -resource "azurerm_network_interface" "example" { - name = "pctest-nic" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - ip_configuration { - name = "testconfiguration1" - subnet_id = azurerm_subnet.example.id - private_ip_address_allocation = "Dynamic" - } -} - -resource "azurerm_virtual_machine" "example" { - name = "pctest-vm" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - network_interface_ids = [azurerm_network_interface.example.id] - vm_size = "Standard_F2" - - storage_image_reference { - publisher = "Canonical" - offer = "0001-com-ubuntu-server-jammy" - sku = "22_04-lts" - version = "latest" - } - - storage_os_disk { - name = "osdisk" - caching = "ReadWrite" - create_option = "FromImage" - managed_disk_type = "Standard_LRS" - } - - os_profile { - computer_name = "pctest-vm" - admin_username = "testadmin" - admin_password = "Password1234!" - } - - os_profile_linux_config { - disable_password_authentication = false - } -} - -resource "azurerm_virtual_machine_extension" "example" { - name = "network-watcher" - virtual_machine_id = azurerm_virtual_machine.example.id - publisher = "Microsoft.Azure.NetworkWatcher" - type = "NetworkWatcherAgentLinux" - type_handler_version = "1.4" - auto_upgrade_minor_version = true -} - -resource "azurerm_storage_account" "example" { - name = "pctestsa" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_tier = "Standard" - account_replication_type = "LRS" -} - -resource "azurerm_network_packet_capture" "example" { - name = "pctestcapture" - network_watcher_name = azurerm_network_watcher.example.name - resource_group_name = azurerm_resource_group.example.name - target_resource_id = azurerm_virtual_machine.example.id - - storage_location { - storage_account_id = azurerm_storage_account.example.id - } - - depends_on = [azurerm_virtual_machine_extension.example] -} -``` - -~> **NOTE:** This Resource requires that [the Network Watcher Virtual Machine Extension](https://docs.microsoft.com/azure/network-watcher/network-watcher-packet-capture-manage-portal#before-you-begin) is installed on the Virtual Machine before capturing can be enabled which can be installed via [the `azurerm_virtual_machine_extension` resource](virtual_machine_extension.html). - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The name to use for this Network Packet Capture. Changing this forces a new resource to be created. - -* `network_watcher_name` - (Required) The name of the Network Watcher. Changing this forces a new resource to be created. - -* `resource_group_name` - (Required) The name of the resource group in which the Network Watcher exists. Changing this forces a new resource to be created. - -* `target_resource_id` - (Required) The ID of the Resource to capture packets from. Changing this forces a new resource to be created. - -~> **NOTE:** Currently only Virtual Machines IDs are supported. - -* `maximum_bytes_per_packet` - (Optional) The number of bytes captured per packet. The remaining bytes are truncated. Defaults to `0` (Entire Packet Captured). Changing this forces a new resource to be created. - -* `maximum_bytes_per_session` - (Optional) Maximum size of the capture in Bytes. Defaults to `1073741824` (1GB). Changing this forces a new resource to be created. - -* `maximum_capture_duration` - (Optional) The maximum duration of the capture session in seconds. Defaults to `18000` (5 hours). Changing this forces a new resource to be created. - -* `storage_location` - (Required) A `storage_location` block as defined below. Changing this forces a new resource to be created. - -* `filter` - (Optional) One or more `filter` blocks as defined below. Changing this forces a new resource to be created. - ---- - -A `storage_location` block contains: - -* `file_path` - (Optional) A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For Linux virtual machine it must start with `/var/captures`. - -* `storage_account_id` - (Optional) The ID of the storage account to save the packet capture session - -~> **NOTE:** At least one of `file_path` or `storage_account_id` must be specified. - ---- - -A `filter` block contains: - -* `local_ip_address` - (Optional) The local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Changing this forces a new resource to be created. - -* `local_port` - (Optional) The local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Changing this forces a new resource to be created. - -* `protocol` - (Required) The Protocol to be filtered on. Possible values include `Any`, `TCP` and `UDP`. Changing this forces a new resource to be created. - -* `remote_ip_address` - (Optional) The remote IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported.. Changing this forces a new resource to be created. - -* `remote_port` - (Optional) The remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Changing this forces a new resource to be created. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The Packet Capture ID. - -* `storage_location` - (Required) A `storage_location` block as defined below. - ---- - -A `storage_location` block contains: - -* `storage_path` - The URI of the storage path to save the packet capture. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Packet Capture. -* `read` - (Defaults to 5 minutes) Used when retrieving the Packet Capture. -* `delete` - (Defaults to 30 minutes) Used when deleting the Packet Capture. - -## Import - -Packet Captures can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_network_packet_capture.capture1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/networkWatchers/watcher1/packetCaptures/capture1 -``` diff --git a/website/docs/r/network_watcher_flow_log.html.markdown b/website/docs/r/network_watcher_flow_log.html.markdown index 1b744a9a13325..2241e12a3e0a5 100644 --- a/website/docs/r/network_watcher_flow_log.html.markdown +++ b/website/docs/r/network_watcher_flow_log.html.markdown @@ -97,7 +97,7 @@ The following arguments are supported: * `traffic_analytics` - (Optional) A `traffic_analytics` block as documented below. -* `version` - (Optional) The version (revision) of the flow log. Possible values are `1` and `2`. +* `version` - (Optional) The version (revision) of the flow log. Possible values are `1` and `2`. Defaults to `1`. * `tags` - (Optional) A mapping of tags which should be assigned to the Network Watcher Flow Log. @@ -107,7 +107,7 @@ The `retention_policy` block supports the following: * `enabled` - (Required) Boolean flag to enable/disable retention. * `days` - (Required) The number of days to retain flow log records. - + --- The `traffic_analytics` block supports the following: diff --git a/website/docs/r/nginx_deployment.html.markdown b/website/docs/r/nginx_deployment.html.markdown index d0a63a046532e..ba645f469acb7 100644 --- a/website/docs/r/nginx_deployment.html.markdown +++ b/website/docs/r/nginx_deployment.html.markdown @@ -57,7 +57,7 @@ resource "azurerm_subnet" "example" { resource "azurerm_nginx_deployment" "example" { name = "example-nginx" resource_group_name = azurerm_resource_group.example.name - sku = "standard_Monthly" + sku = "standardv2_Monthly" location = azurerm_resource_group.example.location managed_resource_group = "example" diagnose_support_enabled = true @@ -86,7 +86,7 @@ The following arguments are supported: * `location` - (Required) The Azure Region where the NGINX Deployment should exist. Changing this forces a new NGINX Deployment to be created. -* `sku` - (Required) Specifies the NGINX Deployment SKU. Possible values are `standard_Monthly` and `basic_Monthly`. Changing this forces a new resource to be created. +* `sku` - (Required) Specifies the NGINX Deployment SKU. Possible values are `standardv2_Monthly`, `basic_Monthly`. Changing this forces a new resource to be created. -> **NOTE:** If you are setting the `sku` to `basic_Monthly`, you cannot specify a `capacity` or `auto_scale_profile`; basic plans do not support scaling. Other `sku`s require either `capacity` or `auto_scale_profile`. If you're using `basic_Monthly` with deployments created before v4.0, you may need to use [Terraform's `ignore_changes` functionality](https://www.terraform.io/language/meta-arguments/lifecycle#ignore_changes) to ignore changes to the `capacity` field. diff --git a/website/docs/r/notification_hub.html.markdown b/website/docs/r/notification_hub.html.markdown index 06e3f57418aac..f6a6a080dc047 100644 --- a/website/docs/r/notification_hub.html.markdown +++ b/website/docs/r/notification_hub.html.markdown @@ -52,6 +52,8 @@ The following arguments are supported: ~> **NOTE:** Removing the `apns_credential` block will currently force a recreation of this resource [due to this bug in the Azure SDK for Go](https://github.com/Azure/azure-sdk-for-go/issues/2246) - we'll remove this limitation when the SDK bug is fixed. +* `browser_credential` - (Optional) A `browser_credential` block as defined below. + * `gcm_credential` - (Optional) A `gcm_credential` block as defined below. ~> **NOTE:** Removing the `gcm_credential` block will currently force a recreation of this resource [due to this bug in the Azure SDK for Go](https://github.com/Azure/azure-sdk-for-go/issues/2246) - we'll remove this limitation when the SDK bug is fixed. @@ -60,7 +62,7 @@ The following arguments are supported: --- -A `apns_credential` block contains: +A `apns_credential` supports the following: * `application_mode` - (Required) The Application Mode which defines which server the APNS Messages should be sent to. Possible values are `Production` and `Sandbox`. @@ -74,7 +76,17 @@ A `apns_credential` block contains: --- -A `gcm_credential` block contains: +A `browser_credential` supports the following: + +* `subject` - (Required) The subject name of web push. + +* `vapid_private_key` - (Required) The Voluntary Application Server Identification (VAPID) private key. + +* `vapid_public_key` - (Required) The Voluntary Application Server Identification (VAPID) public key. + +--- + +A `gcm_credential` supports the following: * `api_key` - (Required) The API Key associated with the Google Cloud Messaging service. diff --git a/website/docs/r/orchestrated_virtual_machine_scale_set.html.markdown b/website/docs/r/orchestrated_virtual_machine_scale_set.html.markdown index eb249cf4e1e57..b0ec6d52a45f3 100644 --- a/website/docs/r/orchestrated_virtual_machine_scale_set.html.markdown +++ b/website/docs/r/orchestrated_virtual_machine_scale_set.html.markdown @@ -113,7 +113,9 @@ resource "azurerm_orchestrated_virtual_machine_scale_set" "example" { -> **Note:** This can only be set to `true` when one or more `zones` are configured. -* `zones` - (Optional) Specifies a list of Availability Zones across which the Virtual Machine Scale Set will create instances. Changing this forces a new Virtual Machine Scale Set to be created. +* `zones` - (Optional) Specifies a list of Availability Zones across which the Virtual Machine Scale Set will create instances. + +-> **Note:** Updating `zones` to remove an existing zone forces a new Virtual Machine Scale Set to be created. -> **Note:** Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). @@ -237,7 +239,7 @@ A (Linux) `certificate` block supports the following: An `admin_ssh_key` block supports the following: -* `public_key` - (Required) The Public Key which should be used for authentication, which needs to be at least 2048-bit and in ssh-rsa format. +* `public_key` - (Required) The Public Key which should be used for authentication, which needs to be in `ssh-rsa` format with at least 2048-bit or in `ssh-ed25519` format. * `username` - (Required) The Username for which this Public SSH Key should be configured. diff --git a/website/docs/r/postgresql_flexible_server_virtual_endpoint.html.markdown b/website/docs/r/postgresql_flexible_server_virtual_endpoint.html.markdown index db0d453ab7619..09ccdcc8e5103 100644 --- a/website/docs/r/postgresql_flexible_server_virtual_endpoint.html.markdown +++ b/website/docs/r/postgresql_flexible_server_virtual_endpoint.html.markdown @@ -91,5 +91,5 @@ The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/l A PostgreSQL Flexible Virtual Endpoint can be imported using the `resource id`, e.g. ```shell -terraform import azurerm_postgresql_flexible_server_virtual_endpoint.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DBForPostgreSql/flexibleServers/server1/virtualendpoints/endpoint1 +terraform import azurerm_postgresql_flexible_server_virtual_endpoint.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DBforPostgreSQL/flexibleServers/server1/virtualEndpoints/endpoint1 ``` diff --git a/website/docs/r/private_dns_resolver_inbound_endpoint.html.markdown b/website/docs/r/private_dns_resolver_inbound_endpoint.html.markdown index fae9d13f87db2..59d85863a80d6 100644 --- a/website/docs/r/private_dns_resolver_inbound_endpoint.html.markdown +++ b/website/docs/r/private_dns_resolver_inbound_endpoint.html.markdown @@ -69,7 +69,7 @@ The following arguments are supported: * `private_dns_resolver_id` - (Required) Specifies the ID of the Private DNS Resolver Inbound Endpoint. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created. -* `ip_configurations` - (Required) Can be specified multiple times to define multiple IP configurations. Each `ip_configurations` block as defined below. +* `ip_configurations` - (Required) One `ip_configurations` block as defined below. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created. * `location` - (Required) Specifies the Azure Region where the Private DNS Resolver Inbound Endpoint should exist. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created. diff --git a/website/docs/r/public_ip.html.markdown b/website/docs/r/public_ip.html.markdown index 51e7e1da87c3c..1f4eccb6dec5a 100644 --- a/website/docs/r/public_ip.html.markdown +++ b/website/docs/r/public_ip.html.markdown @@ -76,7 +76,7 @@ The following arguments are supported: * `reverse_fqdn` - (Optional) A fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. -* `sku` - (Optional) The SKU of the Public IP. Accepted values are `Basic` and `Standard`. Defaults to `Basic`. Changing this forces a new resource to be created. +* `sku` - (Optional) The SKU of the Public IP. Accepted values are `Basic` and `Standard`. Defaults to `Standard`. Changing this forces a new resource to be created. -> **Note** Public IP Standard SKUs require `allocation_method` to be set to `Static`. diff --git a/website/docs/r/recovery_services_vault_resource_guard_association.html.markdown b/website/docs/r/recovery_services_vault_resource_guard_association.html.markdown index 86026b436c0be..bdcdffb473d4b 100644 --- a/website/docs/r/recovery_services_vault_resource_guard_association.html.markdown +++ b/website/docs/r/recovery_services_vault_resource_guard_association.html.markdown @@ -34,7 +34,6 @@ resource "azurerm_recovery_services_vault" "vault" { } resource "azurerm_recovery_services_vault_resource_guard_association" "test" { - name = "VaultProxy" vault_id = azurerm_recovery_services_vault.test.id resource_guard_id = azurerm_data_protection_resource_guard.test.id } @@ -44,10 +43,6 @@ resource "azurerm_recovery_services_vault_resource_guard_association" "test" { The following arguments are supported: -* `name` - (Optional) Specifies the name of the Recovery Services Vault Resource Guard Association. Changing this forces a new resource to be created. Defaults to `VaultProxy`. - --> **NOTE:** `name` has been deprecated and will be removed in version 4.0 of the provider. - * `vault_id` - (Required) ID of the Recovery Services Vault which should be associated with. Changing this forces a new resource to be created. * `resource_guard_id` - (Required) ID of the Resource Guard which should be associated with. Changing this forces a new resource to be created. diff --git a/website/docs/r/redis_cache.html.markdown b/website/docs/r/redis_cache.html.markdown index 5f504153f6d97..a90100d447f0a 100644 --- a/website/docs/r/redis_cache.html.markdown +++ b/website/docs/r/redis_cache.html.markdown @@ -25,14 +25,14 @@ resource "azurerm_resource_group" "example" { # NOTE: the Name used for Redis needs to be globally unique resource "azurerm_redis_cache" "example" { - name = "example-cache" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - capacity = 2 - family = "C" - sku_name = "Standard" - enable_non_ssl_port = false - minimum_tls_version = "1.2" + name = "example-cache" + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name + capacity = 2 + family = "C" + sku_name = "Standard" + non_ssl_port_enabled = false + minimum_tls_version = "1.2" redis_configuration { } @@ -59,7 +59,9 @@ The following arguments are supported: --- -* `enable_non_ssl_port` - (Optional) Enable the non-SSL port (6379) - disabled by default. +* `access_keys_authentication_enabled` - (Optional) Whether access key authentication is enabled? Defaults to `true`. `active_directory_authentication_enabled` must be set to `true` to disable access key authentication. + +* `non_ssl_port_enabled` - (Optional) Enable the non-SSL port (6379) - disabled by default. * `identity` - (Optional) An `identity` block as defined below. @@ -79,7 +81,7 @@ The following arguments are supported: * `replicas_per_primary` - (Optional) Amount of replicas to create per primary for this Redis Cache. If both `replicas_per_primary` and `replicas_per_master` are set, they need to be equal. -* `redis_version` - (Optional) Redis version. Only major version needed. Valid values: `4`, `6`. +* `redis_version` - (Optional) Redis version. Only major version needed. Possible values are `4` and `6`. Defaults to `6`. * `tenant_settings` - (Optional) A mapping of tenant settings to assign to the resource. @@ -136,9 +138,9 @@ redis_configuration { } ``` -* `enable_authentication` - (Optional) If set to `false`, the Redis instance will be accessible without authentication. Defaults to `true`. +* `authentication_enabled` - (Optional) If set to `false`, the Redis instance will be accessible without authentication. Defaults to `true`. --> **NOTE:** `enable_authentication` can only be set to `false` if a `subnet_id` is specified; and only works if there aren't existing instances within the subnet with `enable_authentication` set to `true`. +-> **NOTE:** `authentication_enabled` can only be set to `false` if a `subnet_id` is specified; and only works if there aren't existing instances within the subnet with `authentication_enabled` set to `true`. * `active_directory_authentication_enabled` - (Optional) Enable Microsoft Entra (AAD) authentication. Defaults to `false`. @@ -146,7 +148,7 @@ redis_configuration { * `maxmemory_delta` - (Optional) The max-memory delta for this Redis instance. Defaults are shown below. * `maxmemory_policy` - (Optional) How Redis will select what to remove when `maxmemory` is reached. Defaults to `volatile-lru`. -* `data_persistence_authentication_method` - (Optional) Preferred auth method to communicate to storage account used for data persistence. Possible values are `SAS` and `ManagedIdentity`. Defaults to `SAS`. +* `data_persistence_authentication_method` - (Optional) Preferred auth method to communicate to storage account used for data persistence. Possible values are `SAS` and `ManagedIdentity`. * `maxfragmentationmemory_reserved` - (Optional) Value in megabytes reserved to accommodate for memory fragmentation. Defaults are shown below. @@ -182,8 +184,8 @@ redis_configuration { ### Default Redis Configuration Values | Redis Value | Basic | Standard | Premium | -| ------------------------------- | ------------ | ------------ | ------------ | -| enable_authentication | true | true | true | +|---------------------------------| ------------ | ------------ | ------------ | +| authentication_enabled | true | true | true | | maxmemory_reserved | 2 | 50 | 200 | | maxfragmentationmemory_reserved | 2 | 50 | 200 | | maxmemory_delta | 2 | 50 | 200 | diff --git a/website/docs/r/redis_enterprise_database.html.markdown b/website/docs/r/redis_enterprise_database.html.markdown index 1c61c2f4ccfc7..bf9cd5ef376a9 100644 --- a/website/docs/r/redis_enterprise_database.html.markdown +++ b/website/docs/r/redis_enterprise_database.html.markdown @@ -35,8 +35,7 @@ resource "azurerm_redis_enterprise_cluster" "example1" { } resource "azurerm_redis_enterprise_database" "example" { - name = "default" - resource_group_name = azurerm_resource_group.example.name + name = "default" cluster_id = azurerm_redis_enterprise_cluster.example.id client_protocol = "Encrypted" @@ -59,8 +58,6 @@ The following arguments are supported: * `name` - (Optional) The name which should be used for this Redis Enterprise Database. Currently the acceptable value for this argument is `default`. Defaults to `default`. Changing this forces a new Redis Enterprise Database to be created. -* `resource_group_name` - (Optional) The name of the Resource Group where the Redis Enterprise Database should exist. Changing this forces a new Redis Enterprise Database to be created. - * `cluster_id` - (Required) The resource id of the Redis Enterprise Cluster to deploy this Redis Enterprise Database. Changing this forces a new Redis Enterprise Database to be created. * `client_protocol` - (Optional) Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Possible values are `Encrypted` and `Plaintext`. Defaults to `Encrypted`. Changing this forces a new Redis Enterprise Database to be created. diff --git a/website/docs/r/resource_group_policy_remediation.html.markdown b/website/docs/r/resource_group_policy_remediation.html.markdown index 11b6cd8708893..e93970c289922 100644 --- a/website/docs/r/resource_group_policy_remediation.html.markdown +++ b/website/docs/r/resource_group_policy_remediation.html.markdown @@ -76,10 +76,6 @@ The following arguments are supported: * `policy_assignment_id` - (Required) The ID of the Policy Assignment that should be remediated. -* `policy_definition_id` - (Optional) The unique ID for the policy definition within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. - -~> **Note:** This property has been deprecated and will be removed in version 4.0 of the provider in favour of `policy_definition_reference_id`. - * `policy_definition_reference_id` - (Optional) The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. * `location_filters` - (Optional) A list of the resource locations that will be remediated. diff --git a/website/docs/r/resource_policy_remediation.html.markdown b/website/docs/r/resource_policy_remediation.html.markdown index 5ca2573ec07e8..f1b83b362fe02 100644 --- a/website/docs/r/resource_policy_remediation.html.markdown +++ b/website/docs/r/resource_policy_remediation.html.markdown @@ -66,10 +66,6 @@ The following arguments are supported: * `policy_assignment_id` - (Required) The ID of the Policy Assignment that should be remediated. -* `policy_definition_id` - (Optional) The unique ID for the policy definition within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. - -~> **Note:** This property has been deprecated and will be removed in version 4.0 of the provider in favour of `policy_definition_reference_id`. - * `policy_definition_reference_id` - (Optional) The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. * `location_filters` - (Optional) A list of the resource locations that will be remediated. diff --git a/website/docs/r/role_management_policy.html.markdown b/website/docs/r/role_management_policy.html.markdown index e79d070d9a54e..a1439187bf723 100644 --- a/website/docs/r/role_management_policy.html.markdown +++ b/website/docs/r/role_management_policy.html.markdown @@ -119,7 +119,7 @@ resource "azurerm_role_management_policy" "example" { * `eligible_assignment_rules` - (Optional) An `eligible_assignment_rules` block as defined below. * `notification_rules` - (Optional) A `notification_rules` block as defined below. * `role_definition_id` - (Required) The scoped Role Definition ID of the role for which this policy will apply. Changing this forces a new resource to be created. -* `scope` - (Required) The scope to which this Role Management Policy will apply. Can refer to a management group, a subscription or a resource group. Changing this forces a new resource to be created. +* `scope` - (Required) The scope to which this Role Management Policy will apply. Can refer to a management group, a subscription, a resource group or a resource. Changing this forces a new resource to be created. --- diff --git a/website/docs/r/route_table.html.markdown b/website/docs/r/route_table.html.markdown index 253641188173c..3795e39b28986 100644 --- a/website/docs/r/route_table.html.markdown +++ b/website/docs/r/route_table.html.markdown @@ -24,10 +24,9 @@ resource "azurerm_resource_group" "example" { } resource "azurerm_route_table" "example" { - name = "example-route-table" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - disable_bgp_route_propagation = false + name = "example-route-table" + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name route { name = "route1" @@ -55,7 +54,7 @@ The following arguments are supported: -> **NOTE** Since `route` can be configured both inline and via the separate `azurerm_route` resource, we have to explicitly set it to empty slice (`[]`) to remove it. -* `disable_bgp_route_propagation` - (Optional) Boolean flag which controls propagation of routes learned by BGP on that route table. True means disable. +* `bgp_route_propagation_enabled` - (Optional) Boolean flag which controls propagation of routes learned by BGP on that route table. Defaults to `true`. * `tags` - (Optional) A mapping of tags to assign to the resource. diff --git a/website/docs/r/azurerm_sentinel_alert_rule_machine_learning_behavior_analytics.html.markdown b/website/docs/r/sentinel_alert_rule_machine_learning_behavior_analytics.html.markdown similarity index 100% rename from website/docs/r/azurerm_sentinel_alert_rule_machine_learning_behavior_analytics.html.markdown rename to website/docs/r/sentinel_alert_rule_machine_learning_behavior_analytics.html.markdown diff --git a/website/docs/r/sentinel_alert_rule_nrt.html.markdown b/website/docs/r/sentinel_alert_rule_nrt.html.markdown index 13a831433a6be..38f397bfa51fe 100644 --- a/website/docs/r/sentinel_alert_rule_nrt.html.markdown +++ b/website/docs/r/sentinel_alert_rule_nrt.html.markdown @@ -57,6 +57,8 @@ The following arguments are supported: * `display_name` - (Required) The friendly name of this Sentinel NRT Alert Rule. +* `event_grouping` - (Required) A `event_grouping` block as defined below. + * `severity` - (Required) The alert severity of this Sentinel NRT Alert Rule. Possible values are `High`, `Medium`, `Low` and `Informational`. * `query` - (Required) The query of this Sentinel NRT Alert Rule. @@ -77,10 +79,6 @@ The following arguments are supported: * `entity_mapping` - (Optional) A list of `entity_mapping` blocks as defined below. -* `event_grouping` - (Optional) A `event_grouping` block as defined below. - --> **NOTE:** `event_grouping` will be required in the next major version of the AzureRM Provider. - * `sentinel_entity_mapping` - (Optional) A list of `sentinel_entity_mapping` blocks as defined below. -> **NOTE:** `entity_mapping` and `sentinel_entity_mapping` together can't exceed 5. diff --git a/website/docs/r/sentinel_automation_rule.html.markdown b/website/docs/r/sentinel_automation_rule.html.markdown index 8e46e55f5b672..61a2f3591f306 100644 --- a/website/docs/r/sentinel_automation_rule.html.markdown +++ b/website/docs/r/sentinel_automation_rule.html.markdown @@ -65,13 +65,8 @@ The following arguments are supported: ~> **Note:** Either one `action_incident` block or `action_playbook` block has to be specified. -* `condition` - (Optional / **Deprecated** ) One or more `condition` blocks as defined below. - -~> **Note:** `condition` only supports the [`Property` condition type](https://learn.microsoft.com/en-us/rest/api/securityinsights/preview/automation-rules/create-or-update?tabs=HTTP#propertyconditionproperties). Please use `condition_json` if you want other condition types. - * `condition_json` - (Optional) A JSON array of one or more condition JSON objects as is defined [here](https://learn.microsoft.com/en-us/rest/api/securityinsights/preview/automation-rules/create-or-update?tabs=HTTP#automationruletriggeringlogic). - * `enabled` - (Optional) Whether this Sentinel Automation Rule is enabled? Defaults to `true`. * `expiration` - (Optional) The time in RFC3339 format of kind `UTC` that determines when this Automation Rule should expire and be disabled. @@ -114,16 +109,6 @@ A `action_playbook` block supports the following: * `tenant_id` - (Optional) The ID of the Tenant that owns the playbook. ---- - -A `condition` block supports the following: - -* `operator` - (Required) The operator to use for evaluate the condition. Possible values include: `Equals`, `NotEquals`, `Contains`, `NotContains`, `StartsWith`, `NotStartsWith`, `EndsWith`, `NotEndsWith`. - -* `property` - (Required) The property to use for evaluate the condition. Possible values are `AccountAadTenantId`, `AccountAadUserId`, `AccountNTDomain`, `AccountName`, `AccountObjectGuid`, `AccountPUID`, `AccountSid`, `AccountUPNSuffix`, `AlertAnalyticRuleIds`, `AlertProductNames`, `AzureResourceResourceId`, `AzureResourceSubscriptionId`, `CloudApplicationAppId`, `CloudApplicationAppName`, `DNSDomainName`, `FileDirectory`, `FileHashValue`, `FileName`, `HostAzureID`, `HostNTDomain`, `HostName`, `HostNetBiosName`, `HostOSVersion`, `IPAddress`, `IncidentCustomDetailsKey`, `IncidentCustomDetailsValue`, `IncidentDescription`, `IncidentLabel`, `IncidentProviderName`, `IncidentRelatedAnalyticRuleIds`, `IncidentSeverity`, `IncidentStatus`, `IncidentTactics`, `IncidentTitle`, `IncidentUpdatedBySource`, `IoTDeviceId`, `IoTDeviceModel`, `IoTDeviceName`, `IoTDeviceOperatingSystem`, `IoTDeviceType`, `IoTDeviceVendor`, `MailMessageDeliveryAction`, `MailMessageDeliveryLocation`, `MailMessageP1Sender`, `MailMessageP2Sender`, `MailMessageRecipient`, `MailMessageSenderIP`, `MailMessageSubject`, `MailboxDisplayName`, `MailboxPrimaryAddress`, `MailboxUPN`, `MalwareCategory`, `MalwareName`, `ProcessCommandLine`, `ProcessId`, `RegistryKey`, `RegistryValueData` and `Url`. - -* `values` - (Required) Specifies a list of values to use for evaluate the condition. - ## Attributes Reference In addition to the Arguments listed above - the following Attributes are exported: diff --git a/website/docs/r/sentinel_data_connector_microsoft_threat_intelligence.html.markdown b/website/docs/r/sentinel_data_connector_microsoft_threat_intelligence.html.markdown index c013a1ba33e95..52c1895081834 100644 --- a/website/docs/r/sentinel_data_connector_microsoft_threat_intelligence.html.markdown +++ b/website/docs/r/sentinel_data_connector_microsoft_threat_intelligence.html.markdown @@ -48,15 +48,7 @@ The following arguments are supported: * `log_analytics_workspace_id` - (Required) The ID of the Log Analytics Workspace. Changing this forces a new Data Connector to be created. -* `bing_safety_phishing_url_lookback_date` - (Optional) The lookback date for the Bing Safety Phishing Url in RFC3339. Changing this forces a new Data Connector to be created. - --> **Note:** `bing_safety_phishing_url_lookback_date` has been deprecated as the API no longer supports it and will be removed in version 4.0 of the provider. - -* `microsoft_emerging_threat_feed_lookback_date` - (Optional) The lookback date for the Microsoft Emerging Threat Feed in RFC3339. Changing this forces a new Data Connector to be created. - --> **Note:** `microsoft_emerging_threat_feed_lookback_date` will be required in version 4.0 of the provider. - --> **NOTE:** At least one of `bing_safety_phishing_url_lookback_date` and `microsoft_emerging_threat_feed_lookback_date` must be specified. +* `microsoft_emerging_threat_feed_lookback_date` - (Required) The lookback date for the Microsoft Emerging Threat Feed in RFC3339. Changing this forces a new Data Connector to be created. --- diff --git a/website/docs/r/sentinel_log_analytics_workspace_onboarding.html.markdown b/website/docs/r/sentinel_log_analytics_workspace_onboarding.html.markdown index 2df937651d572..3486c8fd09a66 100644 --- a/website/docs/r/sentinel_log_analytics_workspace_onboarding.html.markdown +++ b/website/docs/r/sentinel_log_analytics_workspace_onboarding.html.markdown @@ -49,8 +49,6 @@ In addition to the Arguments listed above - the following Attributes are exporte * `id` - The ID of the Security Insights Sentinel Onboarding States. - - ## Timeouts The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) for certain actions: diff --git a/website/docs/r/sentinel_threat_intelligence_indicator.html.markdown b/website/docs/r/sentinel_threat_intelligence_indicator.html.markdown index df855ba3d7137..f870a6153e294 100644 --- a/website/docs/r/sentinel_threat_intelligence_indicator.html.markdown +++ b/website/docs/r/sentinel_threat_intelligence_indicator.html.markdown @@ -31,19 +31,16 @@ resource "azurerm_log_analytics_workspace" "example" { } resource "azurerm_sentinel_log_analytics_workspace_onboarding" "example" { - resource_group_name = azurerm_resource_group.example.name - workspace_name = azurerm_log_analytics_workspace.example.name + workspace_id = azurerm_log_analytics_workspace.example.id } resource "azurerm_sentinel_threat_intelligence_indicator" "example" { - workspace_id = azurerm_log_analytics_workspace.example.id + workspace_id = azurerm_sentinel_log_analytics_workspace_onboarding.example.workspace_id pattern_type = "domain-name" pattern = "http://example.com" source = "Microsoft Sentinel" validate_from_utc = "2022-12-14T16:00:00Z" display_name = "example-indicator" - - depends_on = [azurerm_sentinel_log_analytics_workspace_onboarding.test] } ``` diff --git a/website/docs/r/servicebus_namespace.html.markdown b/website/docs/r/servicebus_namespace.html.markdown index cd295476d9980..94d2d20cf3c43 100644 --- a/website/docs/r/servicebus_namespace.html.markdown +++ b/website/docs/r/servicebus_namespace.html.markdown @@ -61,11 +61,7 @@ The following arguments are supported: * `public_network_access_enabled` - (Optional) Is public network access enabled for the Service Bus Namespace? Defaults to `true`. -* `minimum_tls_version` - (Optional) The minimum supported TLS version for this Service Bus Namespace. Valid values are: `1.0`, `1.1` and `1.2`. The current default minimum TLS version is `1.2`. - -* `zone_redundant` - (Optional) Whether or not this resource is zone redundant. `sku` needs to be `Premium`. Changing this forces a new resource to be created. - --> **Note:** In Azure Regions where availability zones are present, the availability zone feature is enabled by default now, which diffs from the previous behavior that need to set the `zone_redundant` to `true` manually. Existing namespaces are being migrated to availability zones as well, and the property `zone_redundant` is being deprecated. The property `zone_redundant` might still show as false, even when availability zones has been enabled. +* `minimum_tls_version` - (Optional) The minimum supported TLS version for this Service Bus Namespace. Valid values are: `1.0`, `1.1` and `1.2`. Defaults to `1.2`. * `network_rule_set` - (Optional) An `network_rule_set` block as defined below. @@ -103,6 +99,8 @@ A `network_rule_set` block supports the following: * `public_network_access_enabled` - (Optional) Whether to allow traffic over public network. Possible values are `true` and `false`. Defaults to `true`. +-> **Note:** To disable public network access, you must also configure the property `public_network_access_enabled`. + * `trusted_services_allowed` - (Optional) Are Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration? See [Trusted Microsoft Services](https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/service-bus-messaging/includes/service-bus-trusted-services.md) * `ip_rules` - (Optional) One or more IP Addresses, or CIDR Blocks which should be able to access the ServiceBus Namespace. diff --git a/website/docs/r/servicebus_namespace_network_rule_set.html.markdown b/website/docs/r/servicebus_namespace_network_rule_set.html.markdown deleted file mode 100644 index ea3fca349cabf..0000000000000 --- a/website/docs/r/servicebus_namespace_network_rule_set.html.markdown +++ /dev/null @@ -1,118 +0,0 @@ ---- -subcategory: "Messaging" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_servicebus_namespace_network_rule_set" -description: |- - Manages a ServiceBus Namespace Network Rule Set. ---- - -# azurerm_servicebus_namespace_network_rule_set - -Manages a ServiceBus Namespace Network Rule Set. - - -> The `azurerm_servicebus_namespace_network_rule_set` resource is deprecated -and will be removed in version 4.0 of the AzureRM provider. Please use -`network_rule_set` inside the `azurerm_servicebus_namespace` resource instead. - -## Example Usage - -```hcl -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} - -resource "azurerm_servicebus_namespace" "example" { - name = "example-sb-namespace" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - sku = "Premium" - - capacity = 1 -} - -resource "azurerm_virtual_network" "example" { - name = "example-vnet" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - address_space = ["172.17.0.0/16"] - dns_servers = ["10.0.0.4", "10.0.0.5"] -} - -resource "azurerm_subnet" "example" { - name = "default" - resource_group_name = azurerm_resource_group.example.name - virtual_network_name = azurerm_virtual_network.example.name - address_prefixes = ["172.17.0.0/24"] - - service_endpoints = ["Microsoft.ServiceBus"] -} - -resource "azurerm_servicebus_namespace_network_rule_set" "example" { - namespace_id = azurerm_servicebus_namespace.example.id - - default_action = "Deny" - public_network_access_enabled = true - - network_rules { - subnet_id = azurerm_subnet.example.id - ignore_missing_vnet_service_endpoint = false - } - - ip_rules = ["1.1.1.1"] -} -``` - -## Argument Reference - -The following arguments are supported: - -* `namespace_id` - (Required) Specifies the ServiceBus Namespace ID to which to attach the ServiceBus Namespace Network Rule Set. Changing this forces a new resource to be created. - -~> **NOTE:** The ServiceBus Namespace must be `Premium` in order to attach a ServiceBus Namespace Network Rule Set. - -* `default_action` - (Optional) Specifies the default action for the ServiceBus Namespace Network Rule Set. Possible values are `Allow` and `Deny`. Defaults to `Allow`. - -* `public_network_access_enabled` - (Optional) Whether to allow traffic over public network. Possible values are `true` and `false`. Defaults to `true`. - -* `trusted_services_allowed` - (Optional) If True, then Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration. See [Trusted Microsoft Services](https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/service-bus-messaging/includes/service-bus-trusted-services.md) - -* `ip_rules` - (Optional) One or more IP Addresses, or CIDR Blocks which should be able to access the ServiceBus Namespace. - -* `network_rules` - (Optional) One or more `network_rules` blocks as defined below. - ---- - -A `network_rules` block supports the following: - -* `subnet_id` - (Required) The Subnet ID which should be able to access this ServiceBus Namespace. - -* `ignore_missing_vnet_service_endpoint` - (Optional) Should the ServiceBus Namespace Network Rule Set ignore missing Virtual Network Service Endpoint option in the Subnet? Defaults to `false`. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the ServiceBus Namespace Network Rule Set. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the ServiceBus Namespace Network Rule Set. -* `update` - (Defaults to 30 minutes) Used when updating the ServiceBus Namespace Network Rule Set. -* `read` - (Defaults to 5 minutes) Used when retrieving the ServiceBus Namespace Network Rule Set. -* `delete` - (Defaults to 30 minutes) Used when deleting the ServiceBus Namespace Network Rule Set. - -## Import - -Service Bus Namespace can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_servicebus_namespace_network_rule_set.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ServiceBus/namespaces/sbns1 -``` diff --git a/website/docs/r/servicebus_queue.html.markdown b/website/docs/r/servicebus_queue.html.markdown index 0791e08ecdbb4..686b756107578 100644 --- a/website/docs/r/servicebus_queue.html.markdown +++ b/website/docs/r/servicebus_queue.html.markdown @@ -33,7 +33,7 @@ resource "azurerm_servicebus_queue" "example" { name = "tfex_servicebus_queue" namespace_id = azurerm_servicebus_namespace.example.id - enable_partitioning = true + partitioning_enabled = true } ``` @@ -45,11 +45,11 @@ The following arguments are supported: * `namespace_id` - (Required) The ID of the ServiceBus Namespace to create this queue in. Changing this forces a new resource to be created. -* `lock_duration` - (Optional) The ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. Maximum value is 5 minutes. Defaults to 1 minute (`PT1M`). +* `lock_duration` - (Optional) The ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. Maximum value is 5 minutes. Defaults to `PT1M` (1 Minute). * `max_message_size_in_kilobytes` - (Optional) Integer value which controls the maximum size of a message allowed on the queue for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview). -* `max_size_in_megabytes` - (Optional) Integer value which controls the size of memory allocated for the queue. For supported values see the "Queue or topic size" section of [Service Bus Quotas](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas). Defaults to `1024`. +* `max_size_in_megabytes` - (Optional) Integer value which controls the size of memory allocated for the queue. For supported values see the "Queue or topic size" section of [Service Bus Quotas](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas). * `requires_duplicate_detection` - (Optional) Boolean flag which controls whether the Queue requires duplicate detection. Changing this forces a new resource to be created. Defaults to `false`. @@ -59,23 +59,23 @@ The following arguments are supported: * `dead_lettering_on_message_expiration` - (Optional) Boolean flag which controls whether the Queue has dead letter support when a message expires. Defaults to `false`. -* `duplicate_detection_history_time_window` - (Optional) The ISO 8601 timespan duration during which duplicates can be detected. Defaults to 10 minutes (`PT10M`). +* `duplicate_detection_history_time_window` - (Optional) The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes). * `max_delivery_count` - (Optional) Integer value which controls when a message is automatically dead lettered. Defaults to `10`. * `status` - (Optional) The status of the Queue. Possible values are `Active`, `Creating`, `Deleting`, `Disabled`, `ReceiveDisabled`, `Renaming`, `SendDisabled`, `Unknown`. Note that `Restoring` is not accepted. Defaults to `Active`. -* `enable_batched_operations` - (Optional) Boolean flag which controls whether server-side batched operations are enabled. Defaults to `true`. +* `batched_operations_enabled` - (Optional) Boolean flag which controls whether server-side batched operations are enabled. Defaults to `true`. * `auto_delete_on_idle` - (Optional) The ISO 8601 timespan duration of the idle interval after which the Queue is automatically deleted, minimum of 5 minutes. -* `enable_partitioning` - (Optional) Boolean flag which controls whether to enable the queue to be partitioned across multiple message brokers. Changing this forces a new resource to be created. Defaults to `false` for Basic and Standard. +* `partitioning_enabled` - (Optional) Boolean flag which controls whether to enable the queue to be partitioned across multiple message brokers. Changing this forces a new resource to be created. Defaults to `false` for Basic and Standard. -> **NOTE:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. For premium namespace, partitioning is available at namespace creation, and all queues and topics in the partitioned namespace will be partitioned, for the premium namespace that has `premium_messaging_partitions` sets to `1`, the namespace is not partitioned. -* `enable_express` - (Optional) Boolean flag which controls whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage. Defaults to `false` for Basic and Standard. For Premium, it MUST be set to `false`. +* `express_enabled` - (Optional) Boolean flag which controls whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage. Defaults to `false` for Basic and Standard. For Premium, it MUST be set to `false`. -~> **NOTE:** Service Bus Premium namespaces do not support Express Entities, so `enable_express` MUST be set to `false`. +~> **NOTE:** Service Bus Premium namespaces do not support Express Entities, so `express_enabled` MUST be set to `false`. * `forward_to` - (Optional) The name of a Queue or Topic to automatically forward messages to. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-auto-forwarding) for more information. diff --git a/website/docs/r/servicebus_subscription.html.markdown b/website/docs/r/servicebus_subscription.html.markdown index 44aa620ed51f1..94003e8ab80e8 100644 --- a/website/docs/r/servicebus_subscription.html.markdown +++ b/website/docs/r/servicebus_subscription.html.markdown @@ -33,7 +33,7 @@ resource "azurerm_servicebus_topic" "example" { name = "tfex_servicebus_topic" namespace_id = azurerm_servicebus_namespace.example.id - enable_partitioning = true + partitioning_enabled = true } resource "azurerm_servicebus_subscription" "example" { @@ -53,17 +53,17 @@ The following arguments are supported: * `max_delivery_count` - (Required) The maximum number of deliveries. -* `auto_delete_on_idle` - (Optional) The idle interval after which the topic is automatically deleted as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `5` minutes or `PT5M`. +* `auto_delete_on_idle` - (Optional) The idle interval after which the topic is automatically deleted as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `5` minutes or `PT5M`. Defaults to `P10675199DT2H48M5.4775807S`. -* `default_message_ttl` - (Optional) The Default message timespan to live as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. +* `default_message_ttl` - (Optional) The Default message timespan to live as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the value used when TimeToLive is not set on a message itself. Defaults to `P10675199DT2H48M5.4775807S`. -* `lock_duration` - (Optional) The lock duration for the subscription as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The default value is `1` minute or `P0DT0H1M0S` . The maximum value is `5` minutes or `P0DT0H5M0S` . +* `lock_duration` - (Optional) The lock duration for the subscription as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The default value is `1` minute or `P0DT0H1M0S` . The maximum value is `5` minutes or `P0DT0H5M0S` . Defaults to `PT1M`. * `dead_lettering_on_message_expiration` - (Optional) Boolean flag which controls whether the Subscription has dead letter support when a message expires. * `dead_lettering_on_filter_evaluation_error` - (Optional) Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to `true`. -* `enable_batched_operations` - (Optional) Boolean flag which controls whether the Subscription supports batched operations. +* `batched_operations_enabled` - (Optional) Boolean flag which controls whether the Subscription supports batched operations. * `requires_session` - (Optional) Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created. diff --git a/website/docs/r/servicebus_topic.html.markdown b/website/docs/r/servicebus_topic.html.markdown index bc2d0ee55926d..f9a0dd284ac85 100644 --- a/website/docs/r/servicebus_topic.html.markdown +++ b/website/docs/r/servicebus_topic.html.markdown @@ -35,7 +35,7 @@ resource "azurerm_servicebus_topic" "example" { name = "tfex_servicebus_topic" namespace_id = azurerm_servicebus_namespace.example.id - enable_partitioning = true + partitioning_enabled = true } ``` @@ -49,23 +49,23 @@ The following arguments are supported: * `status` - (Optional) The Status of the Service Bus Topic. Acceptable values are `Active` or `Disabled`. Defaults to `Active`. -* `auto_delete_on_idle` - (Optional) The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. +* `auto_delete_on_idle` - (Optional) The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to `P10675199DT2H48M5.4775807S`. -* `default_message_ttl` - (Optional) The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself. +* `default_message_ttl` - (Optional) The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself. Defaults to `P10675199DT2H48M5.4775807S`. -* `duplicate_detection_history_time_window` - (Optional) The ISO 8601 timespan duration during which duplicates can be detected. Defaults to 10 minutes. (`PT10M`) +* `duplicate_detection_history_time_window` - (Optional) The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes). -* `enable_batched_operations` - (Optional) Boolean flag which controls if server-side batched operations are enabled. +* `batched_operations_enabled` - (Optional) Boolean flag which controls if server-side batched operations are enabled. -* `enable_express` - (Optional) Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage. +* `express_enabled` - (Optional) Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage. -* `enable_partitioning` - (Optional) Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers. Changing this forces a new resource to be created. +* `partitioning_enabled` - (Optional) Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers. Changing this forces a new resource to be created. -> **NOTE:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. It is not available for the Premium messaging SKU, but any previously existing partitioned entities in Premium namespaces continue to work as expected. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-partitioning) for more information. -* `max_message_size_in_kilobytes` - (Optional) Integer value which controls the maximum size of a message allowed on the topic for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview). +* `max_message_size_in_kilobytes` - (Optional) Integer value which controls the maximum size of a message allowed on the topic for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview). Defaults to `256`. -* `max_size_in_megabytes` - (Optional) Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas). +* `max_size_in_megabytes` - (Optional) Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas). Defaults to `5120`. * `requires_duplicate_detection` - (Optional) Boolean flag which controls whether the Topic requires duplicate detection. Defaults to `false`. Changing this forces a new resource to be created. diff --git a/website/docs/r/shared_image.html.markdown b/website/docs/r/shared_image.html.markdown index 92ff00bfc4898..0d794987f9a0f 100644 --- a/website/docs/r/shared_image.html.markdown +++ b/website/docs/r/shared_image.html.markdown @@ -106,6 +106,10 @@ The following arguments are supported: * `accelerated_network_support_enabled` - (Optional) Specifies if the Shared Image supports Accelerated Network. Changing this forces a new resource to be created. +* `hibernation_enabled` - (Optional) Specifies if the Shared Image supports hibernation. Changing this forces a new resource to be created. + +* `disk_controller_type_nvme_enabled` - (Optional) Specifies if the Shared Image supports NVMe disks. Changing this forces a new resource to be created. + * `tags` - (Optional) A mapping of tags to assign to the Shared Image. --- diff --git a/website/docs/r/signalr_service.html.markdown b/website/docs/r/signalr_service.html.markdown index ea6e5aa12e11f..90c61ffe39615 100644 --- a/website/docs/r/signalr_service.html.markdown +++ b/website/docs/r/signalr_service.html.markdown @@ -67,8 +67,6 @@ The following arguments are supported: * `http_request_logs_enabled` - (Optional) Specifies if Http Request Logs are enabled or not. Defaults to `false`. -* `live_trace_enabled` - (Optional) Specifies if Live Trace is enabled or not. Defaults to `false`. - * `identity` - (Optional) An `identity` block as defined below. * `public_network_access_enabled` - (Optional) Whether to enable public network access? Defaults to `true`. diff --git a/website/docs/r/site_recovery_protection_container_mapping.html.markdown b/website/docs/r/site_recovery_protection_container_mapping.html.markdown index 77229b8e0546b..3c506a8cc7881 100644 --- a/website/docs/r/site_recovery_protection_container_mapping.html.markdown +++ b/website/docs/r/site_recovery_protection_container_mapping.html.markdown @@ -109,12 +109,10 @@ An `automatic_update` block supports the following: ~> **Note:** `automation_account_id` is required when `enabled` is specified. -* `authentication_type` - (Optional) The authentication type used for automation account. Possible values are `RunAsAccount` and `SystemAssignedIdentity`. +* `authentication_type` - (Optional) The authentication type used for automation account. Possible values are `RunAsAccount` and `SystemAssignedIdentity`. Defaults to `SystemAssignedIdentity`. ~> **Note:** `RunAsAccount` of `authentication_type` is deprecated and will retire on September 30, 2023. Details could be found [here](https://learn.microsoft.com/en-us/azure/automation/whats-new#support-for-run-as-accounts). -~> **Note:**: `authentication_type` will default to `SystemAssignedIdentity` in version 4.0. - ## Attributes Reference In addition to the arguments above, the following attributes are exported: diff --git a/website/docs/r/site_recovery_replication_recovery_plan.html.markdown b/website/docs/r/site_recovery_replication_recovery_plan.html.markdown index 3e11c7fb723e0..271b90412572b 100644 --- a/website/docs/r/site_recovery_replication_recovery_plan.html.markdown +++ b/website/docs/r/site_recovery_replication_recovery_plan.html.markdown @@ -246,10 +246,6 @@ The following arguments are supported: * `target_recovery_fabric_id` - (Required) ID of target fabric to recover. Changing this forces a new Replication Plan to be created. -* `recovery_group` - (Optional) Three or more `recovery_group` block defined as below. - -~> **Note:** The `recovery_group` block is deprecated in favor of `shutdown_recovery_group`, `failover_recovery_group` and `boot_recovery_group`. It will be removed in v4.0 of the Azure Provider. - * `shutdown_recovery_group` - (Optional) One `shutdown_recovery_group` block as defined below. -> **NOTE:** `shutdown_recovery_group` will be required in the next major version of the AzureRM Provider. @@ -266,18 +262,6 @@ The following arguments are supported: --- -A `recovery_group` block supports the following: - -* `type` - (Required) The Recovery Plan Group Type. Possible values are `Boot`, `Failover` and `Shutdown`. - -* `replicated_protected_items` - (Optional) One or more protected VM IDs. It must not be specified when `type` is `Shutdown`. - -* `pre_action` - (Optional) one or more `action` block as defined below. which will be executed before the group recovery. - -* `post_action` - (Optional) one or more `action` block as defined below. which will be executed after the group recovery. - ---- - A `shutdown_recovery_group` block supports the following: * `pre_action` - (Optional) one or more `action` block as defined below. which will be executed before the group recovery. diff --git a/website/docs/r/spring_cloud_gateway.html.markdown b/website/docs/r/spring_cloud_gateway.html.markdown index 1b5e83d08fe0f..78c3bc9cedb6d 100644 --- a/website/docs/r/spring_cloud_gateway.html.markdown +++ b/website/docs/r/spring_cloud_gateway.html.markdown @@ -95,7 +95,7 @@ The following arguments are supported: * `cors` - (Optional) A `cors` block as defined below. -* `environment_variables` - (Optional) Specifies the environment variables of the Spring Cloud Gateway as a map of key-value pairs. Changing this forces a new resource to be created. +* `environment_variables` - (Optional) Specifies the environment variables of the Spring Cloud Gateway as a map of key-value pairs. * `https_only` - (Optional) is only https is allowed? @@ -109,7 +109,7 @@ The following arguments are supported: * `local_response_cache_per_route` - (Optional) A `local_response_cache_per_route` block as defined below. Only one of `local_response_cache_per_instance` or `local_response_cache_per_route` can be specified. -* `sensitive_environment_variables` - (Optional) Specifies the sensitive environment variables of the Spring Cloud Gateway as a map of key-value pairs. Changing this forces a new resource to be created. +* `sensitive_environment_variables` - (Optional) Specifies the sensitive environment variables of the Spring Cloud Gateway as a map of key-value pairs. * `sso` - (Optional) A `sso` block as defined below. diff --git a/website/docs/r/spring_cloud_gateway_route_config.html.markdown b/website/docs/r/spring_cloud_gateway_route_config.html.markdown index 3b1c1d0a5f296..d840cd2d12060 100644 --- a/website/docs/r/spring_cloud_gateway_route_config.html.markdown +++ b/website/docs/r/spring_cloud_gateway_route_config.html.markdown @@ -69,6 +69,10 @@ The following arguments are supported: * `spring_cloud_gateway_id` - (Required) The ID of the Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway Route Config to be created. +* `protocol` - (Required) Specifies the protocol of routed Spring Cloud App. Allowed values are `HTTP` and `HTTPS`. Defaults to `HTTP`. + +~> **Note:** You likely want to use `HTTPS` in a production environment, since `HTTP` offers no encryption. + * `filters` - (Optional) Specifies a list of filters which are used to modify the request before sending it to the target endpoint, or the received response in app level. * `predicates` - (Optional) Specifies a list of conditions to evaluate a route for each request in app level. Each predicate may be evaluated against request headers and parameter values. All of the predicates associated with a route must evaluate to true for the route to be matched to the request. @@ -81,10 +85,6 @@ The following arguments are supported: * `open_api` - (Optional) One or more `open_api` blocks as defined below. -* `protocol` - (Optional) Specifies the protocol of routed Spring Cloud App. Allowed values are `HTTP` and `HTTPS`. Defaults to `HTTP`. - -~> **Note:** You likely want to use `HTTPS` in a production environment, since `HTTP` offers no encryption. - * `spring_cloud_app_id` - (Optional) The ID of the Spring Cloud App. --- diff --git a/website/docs/r/sql_active_directory_administrator.html.markdown b/website/docs/r/sql_active_directory_administrator.html.markdown deleted file mode 100644 index a0cd914ab0546..0000000000000 --- a/website/docs/r/sql_active_directory_administrator.html.markdown +++ /dev/null @@ -1,80 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_sql_active_directory_administrator" -description: |- - Manages an Active Directory administrator on a SQL server ---- - -# azurerm_sql_active_directory_administrator - -Allows you to set a user or group as the AD administrator for an Azure SQL server. - --> **Note:** The `azurerm_sql_active_directory_administrator` resource is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the `azuread_administrator` block of the [`azurerm_mssql_server`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mssql_server) resource instead. - -## Example Usage - -```hcl -data "azurerm_client_config" "current" {} - -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} - -resource "azurerm_sql_server" "example" { - name = "mysqlserver" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - version = "12.0" - administrator_login = "4dm1n157r470r" - administrator_login_password = "4-v3ry-53cr37-p455w0rd" -} - -resource "azurerm_sql_active_directory_administrator" "example" { - server_name = azurerm_sql_server.example.name - resource_group_name = azurerm_resource_group.example.name - login = "sqladmin" - tenant_id = data.azurerm_client_config.current.tenant_id - object_id = data.azurerm_client_config.current.object_id -} -``` - -## Argument Reference - -The following arguments are supported: - -* `server_name` - (Required) The name of the SQL Server on which to set the administrator. Changing this forces a new resource to be created. - -* `resource_group_name` - (Required) The name of the resource group for the SQL server. Changing this forces a new resource to be created. - -* `login` - (Required) The login name of the principal to set as the server administrator - -* `object_id` - (Required) The ID of the principal to set as the server administrator - -* `tenant_id` - (Required) The Azure Tenant ID - -* `azuread_authentication_only` - (Optional) Specifies whether only AD Users and administrators can be used to login (`true`) or also local database users (`false`). - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the SQL Active Directory Administrator. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the SQL Active Directory Administrator. -* `update` - (Defaults to 30 minutes) Used when updating the SQL Active Directory Administrator. -* `read` - (Defaults to 5 minutes) Used when retrieving the SQL Active Directory Administrator. -* `delete` - (Defaults to 30 minutes) Used when deleting the SQL Active Directory Administrator. - -## Import - -A SQL Active Directory Administrator can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_sql_active_directory_administrator.administrator /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/servers/myserver/administrators/activeDirectory -``` diff --git a/website/docs/r/sql_database.html.markdown b/website/docs/r/sql_database.html.markdown deleted file mode 100644 index 7f5a4fd28d914..0000000000000 --- a/website/docs/r/sql_database.html.markdown +++ /dev/null @@ -1,152 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_sql_database" -description: |- - Manages a SQL Database. ---- - -# azurerm_sql_database - -Allows you to manage an Azure SQL Database - -!>**IMPORTANT:** To mitigate the possibility of accidental data loss it is highly recommended that you use the `prevent_destroy` lifecycle argument in your configuration file for this resource. For more information on the `prevent_destroy` lifecycle argument please see the [terraform documentation](https://developer.hashicorp.com/terraform/tutorials/state/resource-lifecycle#prevent-resource-deletion). - -->**NOTE:** The `azurerm_sql_database` resource is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the [`azurerm_mssql_database`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mssql_database) resource instead. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} - -resource "azurerm_sql_server" "example" { - name = "myexamplesqlserver" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - version = "12.0" - administrator_login = "4dm1n157r470r" - administrator_login_password = "4-v3ry-53cr37-p455w0rd" - - tags = { - environment = "production" - } -} - -resource "azurerm_storage_account" "example" { - name = "examplesa" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_tier = "Standard" - account_replication_type = "LRS" -} - -resource "azurerm_sql_database" "example" { - name = "myexamplesqldatabase" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - server_name = azurerm_sql_server.example.name - - tags = { - environment = "production" - } - - # prevent the possibility of accidental data loss - lifecycle { - prevent_destroy = true - } -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The name of the database. Changing this forces a new resource to be created. - -* `resource_group_name` - (Required) The name of the resource group in which to create the database. This must be the same as Database Server resource group currently. Changing this forces a new resource to be created. - -* `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - -* `server_name` - (Required) The name of the SQL Server on which to create the database. Changing this forces a new resource to be created. - -* `create_mode` - (Optional) Specifies how to create the database. Valid values are: `Default`, `Copy`, `OnlineSecondary`, `NonReadableSecondary`, `PointInTimeRestore`, `Recovery`, `Restore` or `RestoreLongTermRetentionBackup`. Must be `Default` to create a new database. Defaults to `Default`. Please see [Azure SQL Database REST API](https://docs.microsoft.com/rest/api/sql/databases/createorupdate#createmode) - -* `import` - (Optional) A `import` block as documented below. `create_mode` must be set to `Default`. - -* `source_database_id` - (Optional) The URI of the source database if `create_mode` value is not `Default`. - -* `restore_point_in_time` - (Optional) The point in time for the restore. Only applies if `create_mode` is `PointInTimeRestore`, it should be provided in [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) format, e.g. `2013-11-08T22:00:40Z`. - -* `edition` - (Optional) The edition of the database to be created. Applies only if `create_mode` is `Default`. Valid values are: `Basic`, `Standard`, `Premium`, `DataWarehouse`, `Business`, `BusinessCritical`, `Free`, `GeneralPurpose`, `Hyperscale`, `Premium`, `PremiumRS`, `Standard`, `Stretch`, `System`, `System2`, or `Web`. Please see [Azure SQL database models](https://docs.microsoft.com/azure/azure-sql/database/purchasing-models?view=azuresql). - -* `collation` - (Optional) The name of the collation. Applies only if `create_mode` is `Default`. Azure default is `SQL_LATIN1_GENERAL_CP1_CI_AS`. Changing this forces a new resource to be created. - -* `max_size_bytes` - (Optional) The maximum size that the database can grow to. Applies only if `create_mode` is `Default`. Please see [Azure SQL database models](https://docs.microsoft.com/azure/azure-sql/database/purchasing-models?view=azuresql). - -* `requested_service_objective_id` - (Optional) A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level. -. -* `requested_service_objective_name` - (Optional) The service objective name for the database. Valid values depend on edition and location and may include `S0`, `S1`, `S2`, `S3`, `P1`, `P2`, `P4`, `P6`, `P11` and `ElasticPool`. You can list the available names with the CLI: `shell az sql db list-editions -l westus -o table`. For further information please see [Azure CLI - az sql db](https://docs.microsoft.com/cli/azure/sql/db?view=azure-cli-latest#az-sql-db-list-editions). - -* `source_database_deletion_date` - (Optional) The deletion date time of the source database. Only applies to deleted databases where `create_mode` is `PointInTimeRestore`. - -* `elastic_pool_name` - (Optional) The name of the elastic database pool. - -* `threat_detection_policy` - (Optional) Threat detection policy configuration. The `threat_detection_policy` block supports fields documented below. - -* `read_scale` - (Optional) Read-only connections will be redirected to a high-available replica. Please see [Use read-only replicas to load-balance read-only query workloads](https://docs.microsoft.com/azure/sql-database/sql-database-read-scale-out). - -* `zone_redundant` - (Optional) Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. - -* `tags` - (Optional) A mapping of tags to assign to the resource. - ---- - -The `import` block supports the following: - -* `storage_uri` - (Required) Specifies the blob URI of the .bacpac file. -* `storage_key` - (Required) Specifies the access key for the storage account. -* `storage_key_type` - (Required) Specifies the type of access key for the storage account. Valid values are `StorageAccessKey` or `SharedAccessKey`. -* `administrator_login` - (Required) Specifies the name of the SQL administrator. -* `administrator_login_password` - (Required) Specifies the password of the SQL administrator. -* `authentication_type` - (Required) Specifies the type of authentication used to access the server. Valid values are `SQL` or `ADPassword`. -* `operation_mode` - (Optional) Specifies the type of import operation being performed. The only allowable value is `Import`. Defaults to `Import`. - ---- - -The `threat_detection_policy` block supports the following: - -* `state` - (Optional) The State of the Policy. Possible values are `Enabled`, `Disabled` or `New`. Defaults to `Disabled`. -* `disabled_alerts` - (Optional) Specifies a list of alerts which should be disabled. Possible values include `Access_Anomaly`, `Sql_Injection` and `Sql_Injection_Vulnerability`. -* `email_account_admins` - (Optional) Should the account administrators be emailed when this alert is triggered? Possible values are `Disabled` and `Enabled`. Defaults to `Disabled`. -* `email_addresses` - (Optional) A list of email addresses which alerts should be sent to. -* `retention_days` - (Optional) Specifies the number of days to keep in the Threat Detection audit logs. -* `storage_account_access_key` - (Optional) Specifies the identifier key of the Threat Detection audit storage account. Required if `state` is `Enabled`. -* `storage_endpoint` - (Optional) Specifies the blob storage endpoint (e.g. ). This blob storage will hold all Threat Detection audit logs. Required if `state` is `Enabled`. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The SQL Database ID. -* `creation_date` - The creation date of the SQL Database. -* `default_secondary_location` - The default secondary location of the SQL Database. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 60 minutes) Used when creating the SQL Database. -* `update` - (Defaults to 60 minutes) Used when updating the SQL Database. -* `read` - (Defaults to 5 minutes) Used when retrieving the SQL Database. -* `delete` - (Defaults to 60 minutes) Used when deleting the SQL Database. - -## Import - -SQL Databases can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_sql_database.database1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/servers/myserver/databases/database1 -``` diff --git a/website/docs/r/sql_elasticpool.html.markdown b/website/docs/r/sql_elasticpool.html.markdown deleted file mode 100644 index ac4415bc2a688..0000000000000 --- a/website/docs/r/sql_elasticpool.html.markdown +++ /dev/null @@ -1,94 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_sql_elasticpool" -description: |- - Manages a SQL Elastic Pool. ---- - -# azurerm_sql_elasticpool - -Allows you to manage an Azure SQL Elastic Pool. - --> **Note:** The `azurerm_sql_elasticpool` resource is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the [`azurerm_mssql_elasticpool`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mssql_elasticpool) resource instead. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "my-resource-group" - location = "West Europe" -} - -resource "azurerm_sql_server" "example" { - name = "my-sql-server" # NOTE: needs to be globally unique - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - version = "12.0" - administrator_login = "4dm1n157r470r" - administrator_login_password = "4-v3ry-53cr37-p455w0rd" -} - -resource "azurerm_sql_elasticpool" "example" { - name = "test" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - server_name = azurerm_sql_server.example.name - edition = "Basic" - dtu = 50 - db_dtu_min = 0 - db_dtu_max = 5 - pool_size = 5000 -} -``` - -~> **NOTE on `azurerm_sql_elasticpool`:** - The values of `edition`, `dtu`, and `pool_size` must be consistent with the [Azure SQL Database Service Tiers](https://docs.microsoft.com/en-gb/azure/sql-database/sql-database-service-tiers#elastic-pool-service-tiers-and-performance-in-edtus). Any inconsistent argument configuration will be rejected. - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The name of the elastic pool. This needs to be globally unique. Changing this forces a new resource to be created. - -* `resource_group_name` - (Required) The name of the resource group in which to create the elastic pool. This must be the same as the resource group of the underlying SQL server. Changing this forces a new resource to be created. - -* `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - -* `server_name` - (Required) The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created. - -* `edition` - (Required) The edition of the elastic pool to be created. Valid values are `Basic`, `Standard`, and `Premium`. Refer to [Azure SQL Database Service Tiers](https://docs.microsoft.com/en-gb/azure/sql-database/sql-database-service-tiers#elastic-pool-service-tiers-and-performance-in-edtus) for details. Changing this forces a new resource to be created. - -* `dtu` - (Required) The total shared DTU for the elastic pool. Valid values depend on the `edition` which has been defined. Refer to [Azure SQL Database Service Tiers](https://docs.microsoft.com/en-gb/azure/sql-database/sql-database-service-tiers#elastic-pool-service-tiers-and-performance-in-edtus) for valid combinations. - -* `db_dtu_min` - (Optional) The minimum DTU which will be guaranteed to all databases in the elastic pool to be created. - -* `db_dtu_max` - (Optional) The maximum DTU which will be guaranteed to all databases in the elastic pool to be created. - -* `pool_size` - (Optional) The maximum size in MB that all databases in the elastic pool can grow to. The maximum size must be consistent with combination of `edition` and `dtu` and the limits documented in [Azure SQL Database Service Tiers](https://docs.microsoft.com/en-gb/azure/sql-database/sql-database-service-tiers#elastic-pool-service-tiers-and-performance-in-edtus). If not defined when creating an elastic pool, the value is set to the size implied by `edition` and `dtu`. - -* `tags` - (Optional) A mapping of tags to assign to the resource. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The SQL Elastic Pool ID. - -* `creation_date` - The creation date of the SQL Elastic Pool. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the SQL Elastic Pool. -* `update` - (Defaults to 30 minutes) Used when updating the SQL Elastic Pool. -* `read` - (Defaults to 5 minutes) Used when retrieving the SQL Elastic Pool. -* `delete` - (Defaults to 30 minutes) Used when deleting the SQL Elastic Pool. - -## Import - -SQL Elastic Pool's can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_sql_elasticpool.pool1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/servers/myserver/elasticPools/pool1 -``` diff --git a/website/docs/r/sql_failover_group.html.markdown b/website/docs/r/sql_failover_group.html.markdown deleted file mode 100644 index 840b9c5189075..0000000000000 --- a/website/docs/r/sql_failover_group.html.markdown +++ /dev/null @@ -1,132 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_sql_failover_group" -description: |- - Manages a SQL Failover Group. ---- - -# azurerm_sql_failover_group - -Create a failover group of databases on a collection of Azure SQL servers. - --> **Note:** The `azurerm_sql_failover_group` resource is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the [`azurerm_mssql_failover_group`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mssql_failover_group) resource instead. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} - -resource "azurerm_sql_server" "primary" { - name = "sql-primary" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - version = "12.0" - administrator_login = "sqladmin" - administrator_login_password = "pa$$w0rd" -} - -resource "azurerm_sql_server" "secondary" { - name = "sql-secondary" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - version = "12.0" - administrator_login = "sqladmin" - administrator_login_password = "pa$$w0rd" -} - -resource "azurerm_sql_database" "db1" { - name = "db1" - resource_group_name = azurerm_sql_server.primary.resource_group_name - location = azurerm_sql_server.primary.location - server_name = azurerm_sql_server.primary.name -} - -resource "azurerm_sql_failover_group" "example" { - name = "example-failover-group" - resource_group_name = azurerm_sql_server.primary.resource_group_name - server_name = azurerm_sql_server.primary.name - databases = [azurerm_sql_database.db1.id] - partner_servers { - id = azurerm_sql_server.secondary.id - } - - read_write_endpoint_failover_policy { - mode = "Automatic" - grace_minutes = 60 - } -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The name of the failover group. Changing this forces a new resource to be created. - -* `resource_group_name` - (Required) The name of the resource group containing the SQL server Changing this forces a new resource to be created. - -* `server_name` - (Required) The name of the primary SQL server. Changing this forces a new resource to be created. - -* `databases` - (Optional) A list of database ids to add to the failover group - --> **NOTE:** The failover group will create a secondary database for each database listed in `databases`. If the secondary databases need to be managed through Terraform, they should be defined as resources and a dependency added to the failover group to ensure the secondary databases are created first. Please refer to the detailed example which can be found in [the `./examples/sql-azure/failover_group` directory within the GitHub Repository](https://github.com/hashicorp/terraform-provider-azurerm/tree/main/examples/sql-azure/failover_group) - -* `partner_servers` - (Required) A list of `partner_servers` blocks as documented below. - -* `read_write_endpoint_failover_policy` - (Required) A `read_write_endpoint_failover_policy` block as documented below. - -* `readonly_endpoint_failover_policy` - (Optional) A `readonly_endpoint_failover_policy` block as documented below. - -* `tags` - (Optional) A mapping of tags to assign to the resource. - ---- - -The `partner_servers` block supports the following: - -* `id` - (Required) the SQL server ID - ---- - -The `read_write_endpoint_failover_policy` block supports the following: - -* `mode` - (Required) the failover mode. Possible values are `Manual`, `Automatic` - -* `grace_minutes` - (Optional) Applies only if `mode` is `Automatic`. The grace period in minutes before failover with data loss is attempted - ---- - -The `readonly_endpoint_failover_policy` block supports the following: - -* `mode` - (Required) Failover policy for the read-only endpoint. Possible values are `Enabled`, and `Disabled` - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The failover group ID. -* `location` - the location of the failover group. -* `server_name` - (Required) the name of the primary SQL Database Server. Changing this forces a new resource to be created. -* `role` - local replication role of the failover group instance. -* `databases` - (Optional) list of databases in the failover group. -* `partner_servers` - (Required) list of partner server information for the failover group. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the SQL Failover Group. -* `update` - (Defaults to 30 minutes) Used when updating the SQL Failover Group. -* `read` - (Defaults to 5 minutes) Used when retrieving the SQL Failover Group. -* `delete` - (Defaults to 30 minutes) Used when deleting the SQL Failover Group. - -## Import - -SQL Failover Groups can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_sql_failover_group.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/servers/myserver/failoverGroups/group1 -``` diff --git a/website/docs/r/sql_firewall_rule.html.markdown b/website/docs/r/sql_firewall_rule.html.markdown deleted file mode 100644 index 3f87a275666fe..0000000000000 --- a/website/docs/r/sql_firewall_rule.html.markdown +++ /dev/null @@ -1,78 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_sql_firewall_rule" -description: |- - Manages a SQL Firewall Rule. ---- - -# azurerm_sql_firewall_rule - -Allows you to manage an Azure SQL Firewall Rule. - --> **Note:** The `azurerm_sql_firewall_rule` resource is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the [`azurerm_mssql_firewall_rule`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mssql_firewall_rule) resource instead. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} - -resource "azurerm_sql_server" "example" { - name = "mysqlserver" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - version = "12.0" - administrator_login = "4dm1n157r470r" - administrator_login_password = "4-v3ry-53cr37-p455w0rd" -} - -resource "azurerm_sql_firewall_rule" "example" { - name = "FirewallRule1" - resource_group_name = azurerm_resource_group.example.name - server_name = azurerm_sql_server.example.name - start_ip_address = "10.0.17.62" - end_ip_address = "10.0.17.62" -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The name of the firewall rule. Changing this forces a new resource to be created. - -* `resource_group_name` - (Required) The name of the resource group in which to create the SQL Server. Changing this forces a new resource to be created. - -* `server_name` - (Required) The name of the SQL Server on which to create the Firewall Rule. Changing this forces a new resource to be created. - -* `start_ip_address` - (Required) The starting IP address to allow through the firewall for this rule. - -* `end_ip_address` - (Required) The ending IP address to allow through the firewall for this rule. - --> **NOTE:** The Azure feature `Allow access to Azure services` can be enabled by setting `start_ip_address` and `end_ip_address` to `0.0.0.0` which ([is documented in the Azure API Docs](https://docs.microsoft.com/rest/api/sql/firewallrules/createorupdate)). - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The SQL Firewall Rule ID. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the SQL Firewall Rule. -* `update` - (Defaults to 30 minutes) Used when updating the SQL Firewall Rule. -* `read` - (Defaults to 5 minutes) Used when retrieving the SQL Firewall Rule. -* `delete` - (Defaults to 30 minutes) Used when deleting the SQL Firewall Rule. - -## Import - -SQL Firewall Rules can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_sql_firewall_rule.rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/servers/myserver/firewallRules/rule1 -``` diff --git a/website/docs/r/sql_managed_database.html.markdown b/website/docs/r/sql_managed_database.html.markdown deleted file mode 100644 index 0ec9d8e0e4df8..0000000000000 --- a/website/docs/r/sql_managed_database.html.markdown +++ /dev/null @@ -1,94 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_sql_managed_database" -description: |- - Manages a SQL Azure Managed Database. ---- - -# azurerm_sql_managed_database - -Manages a SQL Azure Managed Database. - -!>**IMPORTANT:** To mitigate the possibility of accidental data loss it is highly recommended that you use the `prevent_destroy` lifecycle argument in your configuration file for this resource. For more information on the `prevent_destroy` lifecycle argument please see the [terraform documentation](https://developer.hashicorp.com/terraform/tutorials/state/resource-lifecycle#prevent-resource-deletion). - -->**NOTE:** The `azurerm_sql_managed_database` resource is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the [`azurerm_mssql_managed_database`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mssql_managed_database) resource instead. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "rg-example" - location = "West Europe" -} - -resource "azurerm_virtual_network" "example" { - name = "test-network" - address_space = ["10.0.0.0/16"] - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name -} - -resource "azurerm_subnet" "example" { - name = "acctsub" - resource_group_name = azurerm_resource_group.example.name - virtual_network_name = azurerm_virtual_network.example.name - address_prefixes = ["10.0.2.0/24"] -} - -resource "azurerm_sql_managed_instance" "example" { - name = "example" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" - license_type = "BasePrice" - subnet_id = azurerm_subnet.example.id - sku_name = "GP_Gen5" - vcores = 4 - storage_size_in_gb = 32 -} - -resource "azurerm_sql_managed_database" "example" { - sql_managed_instance_id = azurerm_sql_managed_instance.example.id - name = "exampledatabase" - location = azurerm_resource_group.example.location - - # prevent the possibility of accidental data loss - lifecycle { - prevent_destroy = true - } -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The name of the SQL Managed Database. Changing this forces a new resource to be created. - -* `sql_managed_instance_id` - (Required) The SQL Managed Instance ID that this Managed Database will be associated with. Changing this forces a new resource to be created. - -* `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - ---- - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The SQL Managed Database ID. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `read` - (Defaults to 5 minutes) Used when retrieving the Sql Managed Database. -* `create` - (Defaults to 24 hours) Used when creating the Sql Managed Database. -* `delete` - (Defaults to 24 hours) Used when deleting the Sql Managed Database. - -## Import - -SQL Managed Databases can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_sql_managed_database.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/managedInstances/myserver/databases/mydatabase -``` diff --git a/website/docs/r/sql_managed_instance.html.markdown b/website/docs/r/sql_managed_instance.html.markdown deleted file mode 100644 index 6fa9e3873349c..0000000000000 --- a/website/docs/r/sql_managed_instance.html.markdown +++ /dev/null @@ -1,287 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_sql_managed_instance" -description: |- - Manages a SQL Azure Managed Instance. ---- - -# azurerm_sql_managed_instance - -Manages a SQL Azure Managed Instance. - --> **Note:** The `azurerm_sql_managed_instance` resource is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the [`azurerm_mssql_managed_instance`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mssql_managed_instance) resource instead. - -~> **Note:** All arguments including the administrator login and password will be stored in the raw state as plain-text. [Read more about sensitive data in state](https://www.terraform.io/language/state/sensitive-data). - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "database-rg" - location = "West Europe" -} - -resource "azurerm_network_security_group" "example" { - name = "mi-security-group" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name -} - - -resource "azurerm_network_security_rule" "allow_management_inbound" { - name = "allow_management_inbound" - priority = 106 - direction = "Inbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_ranges = ["9000", "9003", "1438", "1440", "1452"] - source_address_prefix = "*" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.example.name - network_security_group_name = azurerm_network_security_group.example.name -} - -resource "azurerm_network_security_rule" "allow_misubnet_inbound" { - name = "allow_misubnet_inbound" - priority = 200 - direction = "Inbound" - access = "Allow" - protocol = "*" - source_port_range = "*" - destination_port_range = "*" - source_address_prefix = "10.0.0.0/24" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.example.name - network_security_group_name = azurerm_network_security_group.example.name -} - -resource "azurerm_network_security_rule" "allow_health_probe_inbound" { - name = "allow_health_probe_inbound" - priority = 300 - direction = "Inbound" - access = "Allow" - protocol = "*" - source_port_range = "*" - destination_port_range = "*" - source_address_prefix = "AzureLoadBalancer" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.example.name - network_security_group_name = azurerm_network_security_group.example.name -} - -resource "azurerm_network_security_rule" "allow_tds_inbound" { - name = "allow_tds_inbound" - priority = 1000 - direction = "Inbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_range = "1433" - source_address_prefix = "VirtualNetwork" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.example.name - network_security_group_name = azurerm_network_security_group.example.name -} - -resource "azurerm_network_security_rule" "deny_all_inbound" { - name = "deny_all_inbound" - priority = 4096 - direction = "Inbound" - access = "Deny" - protocol = "*" - source_port_range = "*" - destination_port_range = "*" - source_address_prefix = "*" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.example.name - network_security_group_name = azurerm_network_security_group.example.name -} - -resource "azurerm_network_security_rule" "allow_management_outbound" { - name = "allow_management_outbound" - priority = 102 - direction = "Outbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_ranges = ["80", "443", "12000"] - source_address_prefix = "*" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.example.name - network_security_group_name = azurerm_network_security_group.example.name -} - -resource "azurerm_network_security_rule" "allow_misubnet_outbound" { - name = "allow_misubnet_outbound" - priority = 200 - direction = "Outbound" - access = "Allow" - protocol = "*" - source_port_range = "*" - destination_port_range = "*" - source_address_prefix = "10.0.0.0/24" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.example.name - network_security_group_name = azurerm_network_security_group.example.name -} - -resource "azurerm_network_security_rule" "deny_all_outbound" { - name = "deny_all_outbound" - priority = 4096 - direction = "Outbound" - access = "Deny" - protocol = "*" - source_port_range = "*" - destination_port_range = "*" - source_address_prefix = "*" - destination_address_prefix = "*" - resource_group_name = azurerm_resource_group.example.name - network_security_group_name = azurerm_network_security_group.example.name -} - -resource "azurerm_virtual_network" "example" { - name = "vnet-mi" - resource_group_name = azurerm_resource_group.example.name - address_space = ["10.0.0.0/16"] - location = azurerm_resource_group.example.location -} - -resource "azurerm_subnet" "example" { - name = "subnet-mi" - resource_group_name = azurerm_resource_group.example.name - virtual_network_name = azurerm_virtual_network.example.name - address_prefixes = ["10.0.0.0/24"] - - delegation { - name = "managedinstancedelegation" - - service_delegation { - name = "Microsoft.Sql/managedInstances" - actions = ["Microsoft.Network/virtualNetworks/subnets/join/action", "Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action", "Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action"] - } - } -} - -resource "azurerm_subnet_network_security_group_association" "example" { - subnet_id = azurerm_subnet.example.id - network_security_group_id = azurerm_network_security_group.example.id -} - -resource "azurerm_route_table" "example" { - name = "routetable-mi" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - disable_bgp_route_propagation = false - depends_on = [ - azurerm_subnet.example, - ] -} - -resource "azurerm_subnet_route_table_association" "example" { - subnet_id = azurerm_subnet.example.id - route_table_id = azurerm_route_table.example.id -} - -resource "azurerm_sql_managed_instance" "example" { - name = "managedsqlinstance" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" - license_type = "BasePrice" - subnet_id = azurerm_subnet.example.id - sku_name = "GP_Gen5" - vcores = 4 - storage_size_in_gb = 32 - - depends_on = [ - azurerm_subnet_network_security_group_association.example, - azurerm_subnet_route_table_association.example, - ] -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The name of the SQL Managed Instance. This needs to be globally unique within Azure. Changing this forces a new resource to be created. - -* `resource_group_name` - (Required) The name of the resource group in which to create the SQL Server. Changing this forces a new resource to be created. - -* `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - -* `sku_name` - (Required) Specifies the SKU Name for the SQL Managed Instance. Valid values include `GP_Gen4`, `GP_Gen5`, `BC_Gen4`, `BC_Gen5`. - -* `vcores` - (Required) Number of cores that should be assigned to your instance. Values can be `8`, `16`, or `24` if `sku_name` is `GP_Gen4`, or `8`, `16`, `24`, `32`, or `40` if `sku_name` is `GP_Gen5`. - -* `storage_size_in_gb` - (Required) Maximum storage space for your instance. It should be a multiple of 32GB. - -* `license_type` - (Required) What type of license the Managed Instance will use. Valid values include can be `LicenseIncluded` or `BasePrice`. - -* `administrator_login` - (Required) The administrator login name for the new server. Changing this forces a new resource to be created. - -* `administrator_login_password` - (Required) The password associated with the `administrator_login` user. Needs to comply with Azure's [Password Policy](https://msdn.microsoft.com/library/ms161959.aspx) - -* `subnet_id` - (Required) The subnet resource id that the SQL Managed Instance will be associated with. Changing this forces a new resource to be created. - -* `collation` - (Optional) Specifies how the SQL Managed Instance will be collated. Default value is `SQL_Latin1_General_CP1_CI_AS`. Changing this forces a new resource to be created. - -* `public_data_endpoint_enabled` - (Optional) Is the public data endpoint enabled? Default value is `false`. - -* `minimum_tls_version` - (Optional) The Minimum TLS Version. Default value is `1.2` Valid values include `1.0`, `1.1`, `1.2`. - -* `proxy_override` - (Optional) Specifies how the SQL Managed Instance will be accessed. Default value is `Default`. Valid values include `Default`, `Proxy`, and `Redirect`. - -* `timezone_id` - (Optional) The TimeZone ID that the SQL Managed Instance will be operating in. Default value is `UTC`. Changing this forces a new resource to be created. - -* `dns_zone_partner_id` - (Optional) The ID of the Managed Instance which will share the DNS zone. This is a prerequisite for creating a `azurerm_sql_managed_instance_failover_group`. Setting this after creation forces a new resource to be created. - -* `identity` - (Optional) An `identity` block as defined below. - -* `storage_account_type` - (Optional) Specifies the storage account type used to store backups for this database. Changing this forces a new resource to be created. Possible values are `GRS`, `LRS` and `ZRS`. Defaults to `GRS`. - -* `tags` - (Optional) A mapping of tags to assign to the resource. - ---- - -An `identity` block supports the following: - -* `type` - (Required) Specifies the type of Managed Service Identity that should be configured on this SQL Managed Instance. The only possible value is `SystemAssigned`. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The SQL Managed Instance ID. - -* `fqdn` - The fully qualified domain name of the Azure Managed SQL Instance - -* `identity` - An `identity` block as defined below. - ---- - -The `identity` block exports the following: - -* `principal_id` - The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance. - -* `tenant_id` - The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `read` - (Defaults to 5 minutes) Used when retrieving the Sql Managed Instance. -* `create` - (Defaults to 24 hours) Used when creating the Sql Managed Instance. -* `update` - (Defaults to 24 hours) Used when updating the Sql Managed Instance. -* `delete` - (Defaults to 24 hours) Used when deleting the Sql Managed Instance. - -## Import - -SQL Servers can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_sql_managed_instance.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/managedInstances/myserver -``` diff --git a/website/docs/r/sql_managed_instance_active_directory_administrator.html.markdown b/website/docs/r/sql_managed_instance_active_directory_administrator.html.markdown deleted file mode 100644 index d5c82f7f579cb..0000000000000 --- a/website/docs/r/sql_managed_instance_active_directory_administrator.html.markdown +++ /dev/null @@ -1,89 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_sql_managed_instance_active_directory_administrator" -description: |- - Manages an Active Directory administrator on a SQL Managed Instance ---- - -# azurerm_sql_managed_instance_active_directory_administrator - -Allows you to set a user or group as the AD administrator for an Azure SQL Managed Instance. - --> **Note:** The `azurerm_sql_managed_instance_active_directory_administrator` resource is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the [`azurerm_mssql_managed_instance_active_directory_administrator`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mssql_managed_instance_active_directory_administrator) resource instead. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "rg-example" - location = "West Europe" -} - -resource "azurerm_sql_managed_instance" "example" { - name = "managedsqlinstance" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" - license_type = "BasePrice" - subnet_id = azurerm_subnet.example.id - sku_name = "GP_Gen5" - vcores = 4 - storage_size_in_gb = 32 - - depends_on = [ - azurerm_subnet_network_security_group_association.example, - azurerm_subnet_route_table_association.example, - ] -} - -data "azurerm_client_config" "current" {} - -resource "azurerm_sql_managed_instance_active_directory_administrator" "example" { - managed_instance_name = azurerm_sql_managed_instance.example.name - resource_group_name = azurerm_resource_group.example.name - login = "sqladmin" - tenant_id = data.azurerm_client_config.current.tenant_id - object_id = data.azurerm_client_config.current.object_id -} -``` - -## Argument Reference - -The following arguments are supported: - -* `managed_instance_name` - (Required) The name of the SQL Managed Instance on which to set the administrator. Changing this forces a new resource to be created. - -* `resource_group_name` - (Required) The name of the resource group for the SQL Managed Instance. Changing this forces a new resource to be created. - -* `login` - (Required) The login name of the principal to set as the Managed Instance administrator - -* `object_id` - (Required) The ID of the principal to set as the Managed Instance administrator - -* `tenant_id` - (Required) The Azure Tenant ID - -* `azuread_authentication_only` - (Optional) Specifies whether only AD Users and administrators can be used to login (`true`) or also local database users (`false`). Defaults to `false`. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the SQL Managed Instance Active Directory Administrator. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the SQL Active Directory Administrator. -* `update` - (Defaults to 30 minutes) Used when updating the SQL Active Directory Administrator. -* `read` - (Defaults to 5 minutes) Used when retrieving the SQL Active Directory Administrator. -* `delete` - (Defaults to 30 minutes) Used when deleting the SQL Active Directory Administrator. - -## Import - -A SQL Active Directory Administrator can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_sql_managed_instance_active_directory_administrator.administrator /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/managedInstances/mymanagedinstance/administrators/activeDirectory -``` diff --git a/website/docs/r/sql_managed_instance_failover_group.html.markdown b/website/docs/r/sql_managed_instance_failover_group.html.markdown deleted file mode 100644 index cf5243535862c..0000000000000 --- a/website/docs/r/sql_managed_instance_failover_group.html.markdown +++ /dev/null @@ -1,142 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_sql_managed_instance_failover_group" -description: |- - Manages a SQL Instance Failover Group. ---- - -# azurerm_sql_managed_instance_failover_group - -Manages a SQL Instance Failover Group. - -## Example Usage - --> **Note:** The `azurerm_sql_managed_instance_failover_group` resource is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the [`azurerm_mssql_managed_instance_failover_group`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mssql_managed_instance_failover_group) resource instead. - -~> **Note:** For a more complete example, see the [the `examples/sql-azure/managed_instance_failover_group` directory](https://github.com/hashicorp/terraform-provider-azurerm/tree/main/examples/sql-azure/managed_instance_failover_group) within the GitHub Repository. - -```hcl -resource "azurerm_resource_group" "example" { - name = "rg-example" - location = "West Europe" -} - -resource "azurerm_sql_managed_instance" "primary" { - name = "example-primary" - resource_group_name = azurerm_resource_group.primary.name - location = azurerm_resource_group.primary.location - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" - license_type = "BasePrice" - subnet_id = azurerm_subnet.primary.id - sku_name = "GP_Gen5" - vcores = 4 - storage_size_in_gb = 32 - - depends_on = [ - azurerm_subnet_network_security_group_association.primary, - azurerm_subnet_route_table_association.primary, - ] - - tags = { - environment = "prod" - } -} - -resource "azurerm_sql_managed_instance" "secondary" { - name = "example-secondary" - resource_group_name = azurerm_resource_group.secondary.name - location = azurerm_resource_group.secondary.location - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" - license_type = "BasePrice" - subnet_id = azurerm_subnet.secondary.id - sku_name = "GP_Gen5" - vcores = 4 - storage_size_in_gb = 32 - - depends_on = [ - azurerm_subnet_network_security_group_association.secondary, - azurerm_subnet_route_table_association.secondary, - ] - - tags = { - environment = "prod" - } -} - -resource "azurerm_sql_managed_instance_failover_group" "example" { - name = "example-failover-group" - resource_group_name = azurerm_resource_group.primary.name - location = azurerm_sql_managed_instance.primary.location - managed_instance_name = azurerm_sql_managed_instance.primary.name - partner_managed_instance_id = azurerm_sql_managed_instance.secondary.id - - read_write_endpoint_failover_policy { - mode = "Automatic" - grace_minutes = 60 - } -} -``` - -## Arguments Reference - -The following arguments are supported: - -* `name` - (Required) The name which should be used for this SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created. - -* `managed_instance_name` - (Required) The name of the SQL Managed Instance which will be replicated using a SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created. - -* `location` - (Required) The Azure Region where the SQL Instance Failover Group exists. Changing this forces a new resource to be created. - -* `partner_managed_instance_id` - (Required) ID of the SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created. - -* `read_write_endpoint_failover_policy` - (Required) A `read_write_endpoint_failover_policy` block as defined below. - -* `resource_group_name` - (Required) The name of the Resource Group where the SQL Instance Failover Group should exist. Changing this forces a new SQL Instance Failover Group to be created. - -* `readonly_endpoint_failover_policy_enabled` - (Optional) Failover policy for the read-only endpoint. Defaults to `true`. - ---- - -A `read_write_endpoint_failover_policy` block supports the following: - -* `mode` - (Required) The failover mode. Possible values are `Manual`, `Automatic` - -* `grace_minutes` - (Optional) Applies only if `mode` is `Automatic`. The grace period in minutes before failover with data loss is attempted. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the SQL Instance Failover Group. - -* `partner_region` - A `partner_region` block as defined below. - -* `role` - The local replication role of the SQL Instance Failover Group. - ---- - -A `partner_region` block exports the following: - -* `location` - The Azure Region where the SQL Instance Failover Group partner exists. - -* `role` - The partner replication role of the SQL Instance Failover Group. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the SQL Instance Failover Group. -* `read` - (Defaults to 5 minutes) Used when retrieving the SQL Instance Failover Group. -* `update` - (Defaults to 30 minutes) Used when updating the SQL Instance Failover Group. -* `delete` - (Defaults to 30 minutes) Used when deleting the SQL Instance Failover Group. - -## Import - -SQL Instance Failover Groups can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_sql_managed_instance_failover_group.example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/locations/Location/instanceFailoverGroups/failoverGroup1 -``` diff --git a/website/docs/r/sql_server.html.markdown b/website/docs/r/sql_server.html.markdown deleted file mode 100644 index 8f57c91d06845..0000000000000 --- a/website/docs/r/sql_server.html.markdown +++ /dev/null @@ -1,124 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_sql_server" -description: |- - Manages a Microsoft SQL Azure Database Server. - ---- - -# azurerm_sql_server - -Manages a Microsoft SQL Azure Database Server. - -~> **Note:** The `azurerm_sql_server` resource is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the [`azurerm_mssql_server`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mssql_server) resource instead. - -~> **Note:** All arguments including the administrator login and password will be stored in the raw state as plain-text. [Read more about sensitive data in state](https://www.terraform.io/language/state/sensitive-data). - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "database-rg" - location = "West Europe" -} - -resource "azurerm_storage_account" "example" { - name = "examplesa" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_tier = "Standard" - account_replication_type = "LRS" -} - -resource "azurerm_sql_server" "example" { - name = "mssqlserver" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - version = "12.0" - administrator_login = "mradministrator" - administrator_login_password = "thisIsDog11" - - tags = { - environment = "production" - } -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The name of the Microsoft SQL Server. This needs to be globally unique within Azure. Changing this forces a new resource to be created. - -* `resource_group_name` - (Required) The name of the resource group in which to create the Microsoft SQL Server. Changing this forces a new resource to be created. - -* `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - -* `version` - (Required) The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server). Changing this forces a new resource to be created. - -* `administrator_login` - (Required) The administrator login name for the new server. Changing this forces a new resource to be created. - -* `administrator_login_password` - (Required) The password associated with the `administrator_login` user. Needs to comply with Azure's [Password Policy](https://msdn.microsoft.com/library/ms161959.aspx) - -* `connection_policy` - (Optional) The connection policy the server will use. Possible values are `Default`, `Proxy`, and `Redirect`. Defaults to `Default`. - -* `identity` - (Optional) An `identity` block as defined below. - -* `threat_detection_policy` - (Optional) Threat detection policy configuration. The `threat_detection_policy` block supports fields documented below. - -* `tags` - (Optional) A mapping of tags to assign to the resource. - ---- - -An `identity` block supports the following: - -* `type` - (Required) Specifies the type of Managed Service Identity that should be configured on this SQL Server. The only possible value is `SystemAssigned`. - -~> **NOTE:** The assigned `principal_id` and `tenant_id` can be retrieved after the identity `type` has been set to `SystemAssigned` and the Microsoft SQL Server has been created. More details are available below. - ---- - -The `threat_detection_policy` block supports the following: - -* `state` - (Optional) The State of the Policy. Possible values are `Disabled`, `Enabled` and `New`. Defaults to `Disabled`. -* `disabled_alerts` - (Optional) Specifies a list of alerts which should be disabled. Possible values include `Access_Anomaly`, `Data_Exfiltration`, `Sql_Injection`, `Sql_Injection_Vulnerability` and `Unsafe_Action"`,. -* `email_account_admins` - (Optional) Should the account administrators be emailed when this alert is triggered? -* `email_addresses` - (Optional) A list of email addresses which alerts should be sent to. -* `retention_days` - (Optional) Specifies the number of days to keep in the Threat Detection audit logs. -* `storage_account_access_key` - (Optional) Specifies the identifier key of the Threat Detection audit storage account. Required if `state` is `Enabled`. -* `storage_endpoint` - (Optional) Specifies the blob storage endpoint (e.g. ). This blob storage will hold all Threat Detection audit logs. Required if `state` is `Enabled`. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The Microsoft SQL Server ID. -* `fully_qualified_domain_name` - The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net) - ---- - -An `identity` block exports the following: - -* `principal_id` - The Principal ID for the Service Principal associated with the Identity of this SQL Server. - -* `tenant_id` - The Tenant ID for the Service Principal associated with the Identity of this SQL Server. - --> You can access the Principal ID via `${azurerm_mssql_server.example.identity[0].principal_id}` and the Tenant ID via `${azurerm_mssql_server.example.identity[0].tenant_id}` - -### Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 60 minutes) Used when creating the Microsoft SQL Server. -* `update` - (Defaults to 60 minutes) Used when updating the Microsoft SQL Server. -* `read` - (Defaults to 5 minutes) Used when retrieving the Microsoft SQL Server. -* `delete` - (Defaults to 60 minutes) Used when deleting the Microsoft SQL Server. - -## Import - -SQL Servers can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_sql_server.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/servers/myserver -``` diff --git a/website/docs/r/sql_virtual_network_rule.html.markdown b/website/docs/r/sql_virtual_network_rule.html.markdown deleted file mode 100644 index 25649ea5c5481..0000000000000 --- a/website/docs/r/sql_virtual_network_rule.html.markdown +++ /dev/null @@ -1,98 +0,0 @@ ---- -subcategory: "Database" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_sql_virtual_network_rule" -description: |- - Manages a SQL Virtual Network Rule. ---- - -# azurerm_sql_virtual_network_rule - -Allows you to add, update, or remove an Azure SQL server to a subnet of a virtual network. - --> **Note:** The `azurerm_sql_virtual_network_rule` resource is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the [`azurerm_mssql_virtual_network_rule`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mssql_virtual_network_rule) resource instead. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-sql-server-vnet-rule" - location = "West Europe" -} - -resource "azurerm_virtual_network" "vnet" { - name = "example-vnet" - address_space = ["10.7.29.0/29"] - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name -} - -resource "azurerm_subnet" "subnet" { - name = "example-subnet" - resource_group_name = azurerm_resource_group.example.name - virtual_network_name = azurerm_virtual_network.vnet.name - address_prefixes = ["10.7.29.0/29"] - service_endpoints = ["Microsoft.Sql"] -} - -resource "azurerm_sql_server" "sqlserver" { - name = "uniqueazuresqlserver" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - version = "12.0" - administrator_login = "4dm1n157r470r" - administrator_login_password = "4-v3ry-53cr37-p455w0rd" -} - -resource "azurerm_sql_virtual_network_rule" "sqlvnetrule" { - name = "sql-vnet-rule" - resource_group_name = azurerm_resource_group.example.name - server_name = azurerm_sql_server.sqlserver.name - subnet_id = azurerm_subnet.subnet.id -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The name of the SQL virtual network rule. Changing this forces a new resource to be created. Cannot be empty and must only contain alphanumeric characters and hyphens. Cannot start with a number, and cannot start or end with a hyphen. - -~> **NOTE:** `name` must be between 1-64 characters long and must satisfy all of the requirements below: - -1. Contains only alphanumeric and hyphen characters -2. Cannot start with a number or hyphen -3. Cannot end with a hyphen - -* `resource_group_name` - (Required) The name of the resource group where the SQL server resides. Changing this forces a new resource to be created. - -* `server_name` - (Required) The name of the SQL Server to which this SQL virtual network rule will be applied to. Changing this forces a new resource to be created. - -* `subnet_id` - (Required) The ID of the subnet that the SQL server will be connected to. - -* `ignore_missing_vnet_service_endpoint` - (Optional) Create the virtual network rule before the subnet has the virtual network service endpoint enabled. The default value is false. - -~> **NOTE:** If `ignore_missing_vnet_service_endpoint` is false, and the target subnet does not contain the `Microsoft.SQL` endpoint in the `service_endpoints` array, the deployment will fail when it tries to create the SQL virtual network rule. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the SQL virtual network rule. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the SQL Virtual Network Rule. -* `update` - (Defaults to 30 minutes) Used when updating the SQL Virtual Network Rule. -* `read` - (Defaults to 5 minutes) Used when retrieving the SQL Virtual Network Rule. -* `delete` - (Defaults to 30 minutes) Used when deleting the SQL Virtual Network Rule. - -## Import - -SQL Virtual Network Rules can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_sql_virtual_network_rule.rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/servers/myserver/virtualNetworkRules/vnetrulename -``` diff --git a/website/docs/r/stack_hci_deployment_setting.html.markdown b/website/docs/r/stack_hci_deployment_setting.html.markdown new file mode 100644 index 0000000000000..0619a0bb84fb3 --- /dev/null +++ b/website/docs/r/stack_hci_deployment_setting.html.markdown @@ -0,0 +1,594 @@ +--- +subcategory: "Azure Stack HCI" +layout: "azurerm" +page_title: "Azure Resource Manager: azurerm_stack_hci_deployment_setting" +description: |- + Manages a Stack HCI Deployment Setting. +--- + +# azurerm_stack_hci_deployment_setting + +Manages a Stack HCI Deployment Setting. + +-> Note: Completion of the prerequisites of deploying the Azure Stack HCI in your environment is outside the scope of this document. For more details refer to the [Azure Stack HCI deployment sequence](https://learn.microsoft.com/en-us/azure-stack/hci/deploy/deployment-introduction#deployment-sequence). If you encounter issues completing the prerequisites, we'd recommend opening a ticket with Microsoft Support. + +-> Note: During the deployment process, the service will generate additional resources, including a new Arc Bridge Appliance and a Custom Location containing several Stack HCI Storage Paths. The provider will attempt to remove these resources on the deletion or recreation of `azurerm_stack_hci_deployment_setting`. + +## Example Usage + +```hcl +provider "azuread" {} + +variable "local_admin_user" { + description = "The username of the local administrator account." + sensitive = true + type = string +} + +variable "local_admin_password" { + description = "The password of the local administrator account." + sensitive = true + type = string +} + +variable "domain_admin_user" { + description = "The username of the domain account." + sensitive = true + type = string +} + +variable "domain_admin_password" { + description = "The password of the domain account." + sensitive = true + type = string +} + +variable "deployment_user" { + sensitive = true + type = string + description = "The username for deployment user." +} + +variable "deployment_user_password" { + sensitive = true + type = string + description = "The password for deployment user." +} + +locals { + servers = [ + { + name = "AzSHOST1", + ipv4Address = "192.168.1.12" + }, + { + name = "AzSHOST2", + ipv4Address = "192.168.1.13" + } + ] + connection_roles = [ + "Azure Connected Machine Onboarding", + "Azure Connected Machine Resource Administrator", + "Azure Resource Bridge Deployment Role" + ] + machine_roles = [ + "Key Vault Secrets User", + "Azure Connected Machine Resource Manager", + "Azure Stack HCI Device Management Role", + "Reader" + ] +} + +data "azurerm_resource_group" "example" { + name = "hci-example" +} + +resource "azuread_application" "example" { + display_name = "example-hci-onboard" +} + +# https://learn.microsoft.com/en-us/azure-stack/hci/deploy/deployment-azure-resource-manager-template#create-a-service-principal-and-client-secret +resource "azuread_service_principal" "example" { + client_id = azuread_application.example.client_id +} + +resource "azuread_service_principal_password" "example" { + service_principal_id = azuread_service_principal.example.object_id +} + +resource "azurerm_role_assignment" "connect" { + count = length(local.connection_roles) + scope = data.azurerm_resource_group.example.id + role_definition_name = local.connection_roles[count.index] + principal_id = azuread_service_principal.example.object_id +} + +resource "azurerm_role_assignment" "connect" { + scope = data.azurerm_subscription.current.id + role_definition_name = "Contributor" + principal_id = azuread_service_principal.example.object_id +} + +# after preparing Active Directory and registering servers with Arc, and then the Arc VM is ready +data "azurerm_arc_machine" "server" { + count = length(local.servers) + name = local.servers[count.index].name + resource_group_name = data.azurerm_resource_group.example.name +} + +data "azurerm_client_config" "current" {} + +resource "azurerm_key_vault" "DeploymentKeyVault" { + name = "hci-examplekv" + location = data.azurerm_resource_group.example.location + resource_group_name = data.azurerm_resource_group.example.name + enabled_for_deployment = true + enabled_for_template_deployment = true + enabled_for_disk_encryption = true + tenant_id = data.azurerm_client_config.current.tenant_id + soft_delete_retention_days = 30 + enable_rbac_authorization = true + public_network_access_enabled = true + sku_name = "standard" +} + +resource "azurerm_role_assignment" "KeyVault" { + scope = azurerm_key_vault.DeploymentKeyVault.id + role_definition_name = "Key Vault Secrets Officer" + principal_id = data.azurerm_client_config.current.object_id +} + +resource "azurerm_key_vault_secret" "AzureStackLCMUserCredential" { + name = "AzureStackLCMUserCredential" + content_type = "Secret" + value = base64encode("${var.deployment_user}:${var.deployment_user_password}") + key_vault_id = azurerm_key_vault.DeploymentKeyVault.id + depends_on = [azurerm_role_assignment.KeyVault] +} + +resource "azurerm_key_vault_secret" "LocalAdminCredential" { + name = "LocalAdminCredential" + content_type = "Secret" + value = base64encode("${var.local_admin_user}:${var.local_admin_password}") + key_vault_id = azurerm_key_vault.DeploymentKeyVault.id + depends_on = [azurerm_role_assignment.KeyVault] +} + +resource "azurerm_key_vault_secret" "DefaultARBApplication" { + name = "DefaultARBApplication" + content_type = "Secret" + value = base64encode("${azuread_service_principal.example.client_id}:${azuread_service_principal_password.example.value}") + key_vault_id = azurerm_key_vault.DeploymentKeyVault.id + depends_on = [azurerm_role_assignment.KeyVault] +} + +resource "azurerm_key_vault_secret" "WitnessStorageKey" { + name = "WitnessStorageKey" + content_type = "Secret" + value = base64encode(azurerm_storage_account.witness.primary_access_key) + key_vault_id = azurerm_key_vault.DeploymentKeyVault.id + depends_on = [azurerm_role_assignment.KeyVault] +} + +resource "azurerm_storage_account" "witness" { + name = "hciexamplesta" + location = data.azurerm_resource_group.example.location + resource_group_name = data.azurerm_resource_group.example.name + account_tier = "Standard" + account_replication_type = "LRS" +} + +// service principal of 'Microsoft.AzureStackHCI Resource Provider' application +data "azuread_service_principal" "hciRp" { + client_id = "1412d89f-b8a8-4111-b4fd-e82905cbd85d" +} + +resource "azurerm_role_assignment" "MachineRoleAssign1" { + count = length(local.machine_roles) + scope = data.azurerm_resource_group.example.id + role_definition_name = local.machine_roles[count.index] + principal_id = data.azurerm_arc_machine.server[0].identity[0].principal_id +} + +resource "azurerm_role_assignment" "MachineRoleAssign2" { + count = length(local.machine_roles) + scope = data.azurerm_resource_group.example.id + role_definition_name = local.machine_roles[count.index] + principal_id = data.azurerm_arc_machine.server[1].identity[0].principal_id +} + +resource "azurerm_role_assignment" "ServicePrincipalRoleAssign" { + scope = data.azurerm_resource_group.example.id + role_definition_name = "Azure Connected Machine Resource Manager" + principal_id = data.azuread_service_principal.hciRp.object_id +} + +resource "azurerm_stack_hci_cluster" "example" { + depends_on = [ + azurerm_key_vault_secret.DefaultARBApplication, + azurerm_key_vault_secret.AzureStackLCMUserCredential, + azurerm_key_vault_secret.LocalAdminCredential, + azurerm_key_vault_secret.WitnessStorageKey, + azurerm_role_assignment.connect, + azurerm_role_assignment.connect2, + azurerm_role_assignment.ServicePrincipalRoleAssign, + azurerm_role_assignment.MachineRoleAssign1, + azurerm_role_assignment.MachineRoleAssign2, + ] + name = "hci-cl" + resource_group_name = data.azurerm_resource_group.example.name + location = data.azurerm_resource_group.example.location + identity { + type = "SystemAssigned" + } + + // the client_id will be populated after deployment + lifecycle { + ignore_changes = [ + client_id + ] + } +} + +resource "azurerm_stack_hci_deployment_setting" "example" { + stack_hci_cluster_id = azurerm_stack_hci_cluster.example.id + arc_resource_ids = [for server in data.azurerm_arc_machine.server : server.id] + version = "10.0.0.0" + + scale_unit { + active_directory_organizational_unit_path = "OU=hci,DC=jumpstart,DC=local" + domain_fqdn = "jumpstart.local" + secrets_location = azurerm_key_vault.DeploymentKeyVault.vault_uri + name_prefix = "hci" + + cluster { + azure_service_endpoint = "core.windows.net" + cloud_account_name = azurerm_storage_account.witness.name + name = azurerm_stack_hci_cluster.example.name + witness_type = "Cloud" + witness_path = "Cloud" + } + + host_network { + storage_auto_ip_enabled = true + storage_connectivity_switchless_enabled = false + intent { + name = "ManagementCompute" + adapter_property_override_enabled = false + qos_policy_override_enabled = false + virtual_switch_configuration_override_enabled = false + adapter = [ + "FABRIC", + "FABRIC2", + ] + traffic_type = [ + "Management", + "Compute", + ] + qos_policy_override { + priority_value8021_action_cluster = "7" + priority_value8021_action_smb = "3" + bandwidth_percentage_smb = "50" + } + adapter_property_override { + jumbo_packet = "9014" + network_direct = "Disabled" + network_direct_technology = "RoCEv2" + } + } + + intent { + name = "Storage" + adapter_property_override_enabled = false + qos_policy_override_enabled = false + virtual_switch_configuration_override_enabled = false + adapter = [ + "StorageA", + "StorageB", + ] + traffic_type = [ + "Storage", + ] + qos_policy_override { + priority_value8021_action_cluster = "7" + priority_value8021_action_smb = "3" + bandwidth_percentage_smb = "50" + } + adapter_property_override { + jumbo_packet = "9014" + network_direct = "Enabled" + network_direct_technology = "RoCEv2" + } + } + + storage_network { + name = "Storage1Network" + network_adapter_name = "StorageA" + vlan_id = "711" + } + + storage_network { + name = "Storage2Network" + network_adapter_name = "StorageB" + vlan_id = "712" + } + } + + infrastructure_network { + gateway = "192.168.1.1" + subnet_mask = "255.255.255.0" + dhcp_enabled = false + dns_server = [ + "192.168.1.254" + ] + ip_pool { + ending_address = "192.168.1.65" + starting_address = "192.168.1.55" + } + } + + optional_service { + custom_location = "customlocation" + } + + physical_node { + ipv4_address = "192.168.1.12" + name = "AzSHOST1" + } + + physical_node { + ipv4_address = "192.168.1.13" + name = "AzSHOST2" + } + + observability { + streaming_data_client_enabled = true + eu_location_enabled = false + episodic_data_upload_enabled = true + } + + security_setting { + bitlocker_boot_volume_enabled = true + bitlocker_data_volume_enabled = true + credential_guard_enabled = true + drift_control_enabled = true + drtm_protection_enabled = true + hvci_protection_enabled = true + side_channel_mitigation_enabled = true + smb_cluster_encryption_enabled = false + smb_signing_enabled = true + wdac_enabled = true + } + + storage { + configuration_mode = "Express" + } + } +} +``` + +## Arguments Reference + +The following arguments are supported: + +* `stack_hci_cluster_id` - (Required) The ID of the Azure Stack HCI cluster. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `arc_resource_ids` - (Required) Specifies a list of IDs of Azure ARC machine resource to be part of cluster. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `scale_unit` - (Required) One or more `scale_unit` blocks as defined below. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `version` - (Required) The deployment template version. The format must be a set of numbers separated by dots such as `10.0.0.0`. Changing this forces a new Stack HCI Deployment Setting to be created. + +--- + +A `adapter_property_override` block supports the following: + +* `jumbo_packet` - (Optional) The jumbo frame size of the adapter. This parameter should only be modified based on your OEM guidance. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `network_direct` - (Optional) The network direct of the adapter. This parameter should only be modified based on your OEM guidance. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `network_direct_technology` - (Optional) The network direct technology of the adapter. This parameter should only be modified based on your OEM guidance. Changing this forces a new Stack HCI Deployment Setting to be created. + +--- + +A `cluster` block supports the following: + +* `azure_service_endpoint` - (Required) Specifies the Azure blob service endpoint, for example, `core.windows.net`. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `cloud_account_name` - (Required) Specifies the Azure Storage account name of the cloud witness for the Azure Stack HCI cluster. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `name` - (Required) Specifies the name of the cluster. It must be 3-15 characters long and contain only letters, numbers and hyphens. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `witness_path` - (Required) Specifies the fileshare path of the local witness for the Azure Stack HCI cluster. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `witness_type` - (Required) Specifies the type of the witness. Possible values are `Cloud`, `FileShare`. Changing this forces a new Stack HCI Deployment Setting to be created. + +--- + +A `host_network` block supports the following: + +* `intent` - (Required) One or more `intent` blocks as defined below. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `storage_network` - (Required) One or more `storage_network` blocks as defined below. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `storage_auto_ip_enabled` - (Optional) Whether allows users to specify IPs and Mask for Storage NICs when Network ATC is not assigning the IPs for storage automatically. Optional parameter required only for [3 nodes switchless deployments](https://learn.microsoft.com/azure-stack/hci/concepts/physical-network-requirements?tabs=overview%2C23H2reqs#using-switchless). Possible values are `true` and `false`. Defaults to `true`. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `storage_connectivity_switchless_enabled` - (Optional) Defines how the storage adapters between nodes are connected either switch or switch less. Possible values are `true` and `false`. Defaults to `false`. Changing this forces a new Stack HCI Deployment Setting to be created. + +--- + +A `infrastructure_network` block supports the following: + +* `dns_server` - (Required) Specifies a list of IPv4 addresses of the DNS servers in your environment. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `gateway` - (Required) Specifies the default gateway that should be used for the provided IP address space. It should be in the format of an IPv4 IP address. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `ip_pool` - (Required) One or more `ip_pool` blocks as defined below. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `subnet_mask` - (Required) Specifies the subnet mask that matches the provided IP address space. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `dhcp_enabled` - (Optional) Whether DHCP is enabled for hosts and cluster IPs. Possible values are `true` and `false`. defaults to `false`. Changing this forces a new Stack HCI Deployment Setting to be created. + +-> **NOTE:** If `dhcp_enabled` is set to `false`, the deployment will use static IPs. If set to `true`, the gateway and DNS servers are not required. + +--- + +A `intent` block supports the following: + +* `name` - (Required) Specifies the name of the intent. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `adapter` - (Required) Specifies a list of ID of network interfaces used for the network intent. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `traffic_type` - (Required) Specifies a list of network traffic types. Possible values are `Compute`, `Storage`, `Management`. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `adapter_property_override` - (Optional) A `adapter_property_override` block as defined above. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `adapter_property_override_enabled` - (Optional) Whether to override adapter properties. Possible values are `true` and `false`. defaults to `false`. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `qos_policy_override` - (Optional) A `qos_policy_override` block as defined below. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `qos_policy_override_enabled` - (Optional) Whether to override QoS policy. Possible values are `true` and `false`. defaults to `false`. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `virtual_switch_configuration_override` - (Optional) A `virtual_switch_configuration_override` block as defined below. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `virtual_switch_configuration_override_enabled` - (Optional) Whether to override virtual switch configuration. Possible values are `true` and `false`. defaults to `false`. Changing this forces a new Stack HCI Deployment Setting to be created. + +--- + +A `ip_pool` block supports the following: + +* `ending_address` - (Required) Specifies starting IP address for the management network. A minimum of six free, contiguous IPv4 addresses (excluding your host IPs) are needed for infrastructure services such as clustering. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `starting_address` - (Required) Specifies ending IP address for the management network. A minimum of six free, contiguous IPv4 addresses (excluding your host IPs) are needed for infrastructure services such as clustering. Changing this forces a new Stack HCI Deployment Setting to be created. + +--- + +A `observability` block supports the following: + +* `episodic_data_upload_enabled` - (Required) Whether to collect log data to facilitate quicker issue resolution. Possible values are `true` and `false`. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `eu_location_enabled` - (Required) Whether to store log and diagnostic data sent to Microsoft in EU or outside of EU. The log and diagnostic data is sent to the appropriate diagnostics servers depending upon where your cluster resides. Setting this to `false` results in all data sent to Microsoft to be stored outside of EU. Possible values are `true` and `false`. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `streaming_data_client_enabled` - (Required) Whether the telemetry data will be sent to Microsoft. Possible values are `true` and `false`. Changing this forces a new Stack HCI Deployment Setting to be created. + +--- + +A `optional_service` block supports the following: + +* `custom_location` - (Required) Specifies the name of custom location. A custom location will be created after the deployment is completed. Changing this forces a new Stack HCI Deployment Setting to be created. + +--- + +A `physical_node` block supports the following: + +* `ipv4_address` - (Required) Specifies the IPv4 address assigned to each physical server on your Azure Stack HCI cluster. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `name` - (Required) The NETBIOS name of each physical server on your Azure Stack HCI cluster. Changing this forces a new Stack HCI Deployment Setting to be created. + +--- + +A `qos_policy_override` block supports the following: + +* `bandwidth_percentage_smb` - (Optional) Specifies the percentage of the allocated storage traffic bandwidth. This parameter should only be modified based on your OEM guidance. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `priority_value8021_action_cluster` - (Optional) Specifies the Cluster traffic priority. This parameter should only be modified based on your OEM guidance. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `priority_value8021_action_smb` - (Optional) Specifies the Priority Flow Control where Data Center Bridging (DCB) is used. This parameter should only be modified based on your OEM guidance. Changing this forces a new Stack HCI Deployment Setting to be created. + +--- + +A `scale_unit` block supports the following: + +* `active_directory_organizational_unit_path` - (Required) Specify the full name of the Active Directory Organizational Unit container object prepared for the deployment, including the domain components. For example:`OU=HCI01,DC=contoso,DC=com`. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `cluster` - (Required) A `cluster` block as defined above. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `domain_fqdn` - (Required) Specifies the FQDN for deploying cluster. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `host_network` - (Required) A `host_network` block as defined above. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `infrastructure_network` - (Required) One or more `infrastructure_network` blocks as defined above. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `name_prefix` - (Required) Specifies the name prefix to deploy cluster. It must be 1-8 characters long and contain only letters, numbers and hyphens Changing this forces a new Stack HCI Deployment Setting to be created. + +* `optional_service` - (Required) A `optional_service` block as defined above. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `physical_node` - (Required) One or more `physical_node` blocks as defined above. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `secrets_location` - (Required) The URI to the Key Vault or secret store. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `security_setting` - (Required) A `security_setting` block as defined below. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `storage` - (Required) A `storage` block as defined below. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `episodic_data_upload_enabled` - (Optional) Whether to collect log data to facilitate quicker issue resolution. Possible values are `true` and `false`. Defaults to `true`. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `eu_location_enabled` - (Optional) Whether to store data sent to Microsoft in EU. The log and diagnostic data is sent to the appropriate diagnostics servers depending upon where your cluster resides. Setting this to `false` results in all data sent to Microsoft to be stored outside of the EU. Possible values are `true` and `false`. Defaults to `false`. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `streaming_data_client_enabled` - (Optional) Whether the telemetry data will be sent to Microsoft. Possible values are `true` and `false`. Defaults to `true`. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `bitlocker_boot_volume_enabled` - (Optional) Whether to enable BitLocker for boot volume. Possible values are `true` and `false`. When set to `true`, BitLocker XTS_AES 256-bit encryption is enabled for all data-at-rest on the OS volume of your Azure Stack HCI cluster. This setting is TPM-hardware dependent. Defaults to `true`. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `bitlocker_data_volume_enabled` - (Optional) Whether to enable BitLocker for data volume. Possible values are `true` and `false`. When set to `true`, BitLocker XTS-AES 256-bit encryption is enabled for all data-at-rest on your Azure Stack HCI cluster shared volumes. Defaults to `true`. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `credential_guard_enabled` - (Optional) Whether to enable credential guard. Possible values are `true` and `false`. Defaults to `false`. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `drift_control_enabled` - (Optional) Whether to enable drift control. Possible values are `true` and `false`. When set to `true`, the security baseline is re-applied regularly. Defaults to `true`. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `drtm_protection_enabled` - (Optional) Whether to enable DRTM protection. Possible values are `true` and `false`. When set to `true`, Secure Boot is enabled on your Azure HCI cluster. This setting is hardware dependent. Defaults to `true`. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `hvci_protection_enabled` - (Optional) Whether to enable HVCI protection. Possible values are `true` and `false`. When set to `true`, Hypervisor-protected Code Integrity is enabled on your Azure HCI cluster. Defaults to `true`. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `side_channel_mitigation_enabled` - (Optional) Whether to enable side channel mitigation. Possible values are `true` and `false`. When set to `true`, all side channel mitigations are enabled on your Azure HCI cluster. Defaults to `true`. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `smb_cluster_encryption_enabled` - (Optional) Whether to enable SMB cluster encryption. Possible values are `true` and `false`. When set to `true`, cluster east-west traffic is encrypted. Defaults to `false`. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `smb_signing_enabled` - (Optional) Whether to enable SMB signing. Possible values are `true` and `false`. When set to `true`, the SMB default instance requires sign in for the client and server services. Defaults to `true`. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `wdac_enabled` - (Optional) Whether to enable WDAC. Possible values are `true` and `false`. When set to `true`, applications and the code that you can run on your Azure Stack HCI cluster are limited. Defaults to `true`. Changing this forces a new Stack HCI Deployment Setting to be created. + +--- + +A `storage` block supports the following: + +* `configuration_mode` - (Required) The configuration mode of storage. If set to `Express` and your storage is configured as per best practices based on the number of nodes in the cluster. Possible values are `Express`, `InfraOnly` and `KeepStorage`. Changing this forces a new Stack HCI Deployment Setting to be created. + +--- + +A `storage_network` block supports the following: + +* `name` - (Required) The name of the storage network. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `network_adapter_name` - (Required) The name of the network adapter. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `vlan_id` - (Required) Specifies the ID for the VLAN storage network. This setting is applied to the network interfaces that route the storage and VM migration traffic. Changing this forces a new Stack HCI Deployment Setting to be created. + +--- + +A `virtual_switch_configuration_override` block supports the following: + +* `enable_iov` - (Optional) Specifies the IoV enable status for Virtual Switch. Changing this forces a new Stack HCI Deployment Setting to be created. + +* `load_balancing_algorithm` - (Optional) Specifies the load balancing algorithm for Virtual Switch. Changing this forces a new Stack HCI Deployment Setting to be created. + +## Attributes Reference + +In addition to the Arguments listed above - the following Attributes are exported: + +* `id` - The ID of the Stack HCI Deployment Setting. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: + +* `create` - (Defaults to 6 hours) Used when creating the Stack HCI Deployment Setting. +* `read` - (Defaults to 5 minutes) Used when retrieving the Stack HCI Deployment Setting. +* `delete` - (Defaults to 1 hour) Used when deleting the Stack HCI Deployment Setting. + +## Import + +Stack HCI Deployment Settings can be imported using the `resource id`, e.g. + +```shell +terraform import azurerm_stack_hci_deployment_setting.example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.AzureStackHCI/clusters/clus1/deploymentSettings/default +``` diff --git a/website/docs/r/stack_hci_storage_path.html.markdown b/website/docs/r/stack_hci_storage_path.html.markdown new file mode 100644 index 0000000000000..9fae0bc1a8e33 --- /dev/null +++ b/website/docs/r/stack_hci_storage_path.html.markdown @@ -0,0 +1,69 @@ +--- +subcategory: "Azure Stack HCI" +layout: "azurerm" +page_title: "Azure Resource Manager: azurerm_stack_hci_storage_path" +description: |- + Manages an Azure Stack HCI Storage Path. +--- + +# azurerm_stack_hci_storage_path + +Manages an Azure Stack HCI Storage Path. + +## Example Usage + +```hcl +resource "azurerm_resource_group" "example" { + name = "example-rg" + location = "West Europe" +} +resource "azurerm_stack_hci_storage_path" "example" { + name = "example-sp" + resource_group_name = azurerm_resource_group.example.name + location = azurerm_resource_group.example.location + custom_location_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ExtendedLocation/customLocations/cl1" + path = "C:\\ClusterStorage\\UserStorage_2\\sp-example" + tags = { + foo = "bar" + } +} +``` + +## Arguments Reference + +The following arguments are supported: + +* `name` - (Required) The name which should be used for this Azure Stack HCI Storage Path. Changing this forces a new resource to be created. + +* `resource_group_name` - (Required) The name of the Resource Group where the Azure Stack HCI Storage Path should exist. Changing this forces a new resource to be created. + +* `location` - (Required) The Azure Region where the Azure Stack HCI Storage Path should exist. Changing this forces a new resource to be created. + +* `custom_location_id` - (Required) The ID of Custom Location where the Azure Stack HCI Storage Path should exist. Changing this forces a new resource to be created. + +* `path` - (Required) The file path on the disk to create the Storage Path. Changing this forces a new resource to be created. + +* `tags` - (Optional) A mapping of tags which should be assigned to the Azure Stack HCI Storage Path. + +## Attributes Reference + +In addition to the Arguments listed above - the following Attributes are exported: + +* `id` - The resource ID of the Azure Stack HCI Storage Path. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: + +* `create` - (Defaults to 30 minutes) Used when creating the Azure Stack HCI Storage Path. +* `read` - (Defaults to 5 minutes) Used when retrieving the Azure Stack HCI Storage Path. +* `update` - (Defaults to 30 minutes) Used when updating the Azure Stack HCI Storage Path. +* `delete` - (Defaults to 30 minutes) Used when deleting the Azure Stack HCI Storage Path. + +## Import + +Azure Stack HCI Storage Paths can be imported using the `resource id`, e.g. + +```shell +terraform import azurerm_stack_hci_storage_path.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AzureStackHCI/storageContainers/storage1 +``` diff --git a/website/docs/r/static_web_app.html.markdown b/website/docs/r/static_web_app.html.markdown index e05753100c951..345f562c7136b 100644 --- a/website/docs/r/static_web_app.html.markdown +++ b/website/docs/r/static_web_app.html.markdown @@ -41,6 +41,8 @@ The following arguments are supported: * `preview_environments_enabled` - (Optional) Are Preview (Staging) environments enabled. Defaults to `true`. +* `public_network_access_enabled` - (Optional) Should public network access be enabled for the Static Web App. Defaults to `true`. + * `sku_tier` - (Optional) Specifies the SKU tier of the Static Web App. Possible values are `Free` or `Standard`. Defaults to `Free`. * `sku_size` - (Optional) Specifies the SKU size of the Static Web App. Possible values are `Free` or `Standard`. Defaults to `Free`. diff --git a/website/docs/r/storage_account.html.markdown b/website/docs/r/storage_account.html.markdown index c2ee1130771a6..9fe4061d2aca3 100644 --- a/website/docs/r/storage_account.html.markdown +++ b/website/docs/r/storage_account.html.markdown @@ -202,7 +202,7 @@ The following arguments are supported: * `table_encryption_key_type` - (Optional) The encryption type of the table service. Possible values are `Service` and `Account`. Changing this forces a new resource to be created. Default value is `Service`. -~> **Note:** For the `queue_encryption_key_type` and `table_encryption_key_type`, the `Account` key type is only allowed when the `account_kind` is set to `StorageV2` +~> **Note:** `queue_encryption_key_type` and `table_encryption_key_type` cannot be set to `Account` when `account_kind` is set `Storage` * `infrastructure_encryption_enabled` - (Optional) Is infrastructure encryption enabled? Changing this forces a new resource to be created. Defaults to `false`. diff --git a/website/docs/r/storage_blob.html.markdown b/website/docs/r/storage_blob.html.markdown index d5b970d394ba4..bdc3186e4c406 100644 --- a/website/docs/r/storage_blob.html.markdown +++ b/website/docs/r/storage_blob.html.markdown @@ -69,7 +69,7 @@ The following arguments are supported: * `encryption_scope` - (Optional) The encryption scope to use for this blob. -* `source` - (Optional) An absolute path to a file on the local system. This field cannot be specified for Append blobs and cannot be specified if `source_content` or `source_uri` is specified. Changing this forces a new resource to be created. +* `source` - (Optional) An absolute path to a file on the local system. This field cannot be specified for Append blobs and cannot be specified if `source_content` or `source_uri` is specified. * `source_content` - (Optional) The content for this blob which should be defined inline. This field can only be specified for Block blobs and cannot be specified if `source` or `source_uri` is specified. Changing this forces a new resource to be created. diff --git a/website/docs/r/storage_blob_inventory_policy.html.markdown b/website/docs/r/storage_blob_inventory_policy.html.markdown index 2c41e22e56d61..c99378bed91a6 100644 --- a/website/docs/r/storage_blob_inventory_policy.html.markdown +++ b/website/docs/r/storage_blob_inventory_policy.html.markdown @@ -105,7 +105,7 @@ A `rules` block supports the following: * `schema_fields` - (Required) A list of fields to be included in the inventory. See the [Azure API reference](https://docs.microsoft.com/rest/api/storagerp/blob-inventory-policies/create-or-update#blobinventorypolicydefinition) for all the supported fields. -* `filter` - (Optional) A `filter` block as defined above. Can only be set when the `scope` is `Blob`. +* `filter` - (Optional) A `filter` block as defined above. ## Attributes Reference diff --git a/website/docs/r/storage_management_policy.html.markdown b/website/docs/r/storage_management_policy.html.markdown index e305babbe1b75..db4e1c4966b6a 100644 --- a/website/docs/r/storage_management_policy.html.markdown +++ b/website/docs/r/storage_management_policy.html.markdown @@ -121,7 +121,7 @@ The `actions` block supports the following: The `base_blob` block supports the following: -* `tier_to_cool_after_days_since_modification_greater_than` - (Optional) The age in days after last modification to tier blobs to cool storage. Supports blob currently at Hot tier. Must be between 0 and 99999. Defaults to `-1`. +* `tier_to_cool_after_days_since_modification_greater_than` - (Optional) The age in days after last modification to tier blobs to cool storage. Supports blob currently at Hot tier. Must be between `0` and `99999`. Defaults to `-1`. * `tier_to_cool_after_days_since_last_access_time_greater_than` - (Optional) The age in days after last access time to tier blobs to cool storage. Supports blob currently at Hot tier. Must be between `0` and `99999`. Defaults to `-1`. * `tier_to_cool_after_days_since_creation_greater_than` - (Optional) The age in days after creation to cool storage. Supports blob currently at Hot tier. Must be between `0` and `99999`. Defaults to `-1`. @@ -131,21 +131,21 @@ The `base_blob` block supports the following: ~> **Note:** The `auto_tier_to_hot_from_cool_enabled` must be used together with `tier_to_cool_after_days_since_last_access_time_greater_than`. -* `tier_to_archive_after_days_since_modification_greater_than` - (Optional) The age in days after last modification to tier blobs to archive storage. Supports blob currently at Hot or Cool tier. Must be between 0 and 99999. Defaults to `-1`. -* `tier_to_archive_after_days_since_last_access_time_greater_than` - (Optional) The age in days after last access time to tier blobs to archive storage. Supports blob currently at Hot or Cool tier. Must be between `0` and`99999`. Defaults to `-1`. -* `tier_to_archive_after_days_since_creation_greater_than` - (Optional) The age in days after creation to archive storage. Supports blob currently at Hot or Cool tier. Must be between `0` and`99999`. Defaults to `-1`. +* `tier_to_archive_after_days_since_modification_greater_than` - (Optional) The age in days after last modification to tier blobs to archive storage. Supports blob currently at Hot or Cool tier. Must be between `0` and `99999`. Defaults to `-1`. +* `tier_to_archive_after_days_since_last_access_time_greater_than` - (Optional) The age in days after last access time to tier blobs to archive storage. Supports blob currently at Hot or Cool tier. Must be between `0` and `99999`. Defaults to `-1`. +* `tier_to_archive_after_days_since_creation_greater_than` - (Optional) The age in days after creation to archive storage. Supports blob currently at Hot or Cool tier. Must be between `0` and `99999`. Defaults to `-1`. ~> **Note:** The `tier_to_archive_after_days_since_modification_greater_than`, `tier_to_archive_after_days_since_last_access_time_greater_than` and `tier_to_archive_after_days_since_creation_greater_than` can not be set at the same time. -* `tier_to_archive_after_days_since_last_tier_change_greater_than` - (Optional) The age in days after last tier change to the blobs to skip to be archved. Must be between 0 and 99999. Defaults to `-1`. +* `tier_to_archive_after_days_since_last_tier_change_greater_than` - (Optional) The age in days after last tier change to the blobs to skip to be archved. Must be between `0` and `99999`. Defaults to `-1`. -* `tier_to_cold_after_days_since_modification_greater_than` - (Optional) The age in days after last modification to tier blobs to cold storage. Supports blob currently at Hot tier. Must be between 0 and 99999. Defaults to `-1`. +* `tier_to_cold_after_days_since_modification_greater_than` - (Optional) The age in days after last modification to tier blobs to cold storage. Supports blob currently at Hot tier. Must be between `0` and `99999`. Defaults to `-1`. * `tier_to_cold_after_days_since_last_access_time_greater_than` - (Optional) The age in days after last access time to tier blobs to cold storage. Supports blob currently at Hot tier. Must be between `0` and `99999`. Defaults to `-1`. * `tier_to_cold_after_days_since_creation_greater_than` - (Optional) The age in days after creation to cold storage. Supports blob currently at Hot tier. Must be between `0` and `99999`. Defaults to `-1`. ~> **Note:** The `tier_to_cool_after_days_since_modification_greater_than`, `tier_to_cool_after_days_since_last_access_time_greater_than` and `tier_to_cool_after_days_since_creation_greater_than` can not be set at the same time. -* `delete_after_days_since_modification_greater_than` - (Optional) The age in days after last modification to delete the blob. Must be between 0 and 99999. Defaults to `-1`. +* `delete_after_days_since_modification_greater_than` - (Optional) The age in days after last modification to delete the blob. Must be between `0` and `99999`. Defaults to `-1`. * `delete_after_days_since_last_access_time_greater_than` - (Optional) The age in days after last access time to delete the blob. Must be between `0` and `99999`. Defaults to `-1`. * `delete_after_days_since_creation_greater_than` - (Optional) The age in days after creation to delete the blob. Must be between `0` and `99999`. Defaults to `-1`. @@ -157,21 +157,21 @@ The `base_blob` block supports the following: The `snapshot` block supports the following: -* `change_tier_to_archive_after_days_since_creation` - (Optional) The age in days after creation to tier blob snapshot to archive storage. Must be between 0 and 99999. Defaults to `-1`. -* `tier_to_archive_after_days_since_last_tier_change_greater_than` - (Optional) The age in days after last tier change to the blobs to skip to be archved. Must be between 0 and 99999. Defaults to `-1`. -* `change_tier_to_cool_after_days_since_creation` - (Optional) The age in days after creation to tier blob snapshot to cool storage. Must be between 0 and 99999. Defaults to `-1`. +* `change_tier_to_archive_after_days_since_creation` - (Optional) The age in days after creation to tier blob snapshot to archive storage. Must be between `0` and `99999`. Defaults to `-1`. +* `tier_to_archive_after_days_since_last_tier_change_greater_than` - (Optional) The age in days after last tier change to the blobs to skip to be archved. Must be between `0` and `99999`. Defaults to `-1`. +* `change_tier_to_cool_after_days_since_creation` - (Optional) The age in days after creation to tier blob snapshot to cool storage. Must be between `0` and `99999`. Defaults to `-1`. * `tier_to_cold_after_days_since_creation_greater_than` - (Optional) The age in days after creation to cold storage. Supports blob currently at Hot tier. Must be between `0` and `99999`. Defaults to `-1`. -* `delete_after_days_since_creation_greater_than` - (Optional) The age in days after creation to delete the blob snapshot. Must be between 0 and 99999. Defaults to `-1`. +* `delete_after_days_since_creation_greater_than` - (Optional) The age in days after creation to delete the blob snapshot. Must be between `0` and `99999`. Defaults to `-1`. --- The `version` block supports the following: -* `change_tier_to_archive_after_days_since_creation` - (Optional) The age in days after creation to tier blob version to archive storage. Must be between 0 and 99999. Defaults to `-1`. -* `tier_to_archive_after_days_since_last_tier_change_greater_than` - (Optional) The age in days after last tier change to the blobs to skip to be archved. Must be between 0 and 99999. Defaults to `-1`. -* `change_tier_to_cool_after_days_since_creation` - (Optional) The age in days creation create to tier blob version to cool storage. Must be between 0 and 99999. Defaults to `-1`. +* `change_tier_to_archive_after_days_since_creation` - (Optional) The age in days after creation to tier blob version to archive storage. Must be between `0` and `99999`. Defaults to `-1`. +* `tier_to_archive_after_days_since_last_tier_change_greater_than` - (Optional) The age in days after last tier change to the blobs to skip to be archved. Must be between `0` and `99999`. Defaults to `-1`. +* `change_tier_to_cool_after_days_since_creation` - (Optional) The age in days creation create to tier blob version to cool storage. Must be between `0` and `99999`. Defaults to `-1`. * `tier_to_cold_after_days_since_creation_greater_than` - (Optional) The age in days after creation to cold storage. Supports blob currently at Hot tier. Must be between `0` and `99999`. Defaults to `-1`. -* `delete_after_days_since_creation` - (Optional) The age in days after creation to delete the blob version. Must be between 0 and 99999. Defaults to `-1`. +* `delete_after_days_since_creation` - (Optional) The age in days after creation to delete the blob version. Must be between `0` and `99999`. Defaults to `-1`. --- diff --git a/website/docs/r/storage_object_replication.html.markdown b/website/docs/r/storage_object_replication.html.markdown index c0e440a8f1470..213357c1cb30e 100644 --- a/website/docs/r/storage_object_replication.html.markdown +++ b/website/docs/r/storage_object_replication.html.markdown @@ -83,9 +83,9 @@ The following arguments are supported: A `rules` block supports the following: -* `source_container_name` - (Required) The source storage container name. Changing this forces a new Storage Object Replication to be created. +* `source_container_name` - (Required) The source storage container name. -* `destination_container_name` - (Required) The destination storage container name. Changing this forces a new Storage Object Replication to be created. +* `destination_container_name` - (Required) The destination storage container name. * `copy_blobs_created_after` - (Optional) The time after which the Block Blobs created will be copies to the destination. Possible values are `OnlyNewObjects`, `Everything` and time in RFC3339 format: `2006-01-02T15:04:00Z`. Defaults to `OnlyNewObjects`. diff --git a/website/docs/r/stream_analytics_job.html.markdown b/website/docs/r/stream_analytics_job.html.markdown index 740ff31f6d5ef..d4cd727c284f0 100644 --- a/website/docs/r/stream_analytics_job.html.markdown +++ b/website/docs/r/stream_analytics_job.html.markdown @@ -29,6 +29,7 @@ resource "azurerm_stream_analytics_job" "example" { events_out_of_order_policy = "Adjust" output_error_policy = "Drop" streaming_units = 3 + sku_name = "StandardV2" tags = { environment = "Example" @@ -59,7 +60,7 @@ The following arguments are supported: -> **NOTE:** Support for Compatibility Level 1.2 is dependent on a new version of the Stream Analytics API, which [being tracked in this issue](https://github.com/Azure/azure-rest-api-specs/issues/5604). -* `data_locale` - (Optional) Specifies the Data Locale of the Job, which [should be a supported .NET Culture](https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx). +* `data_locale` - (Optional) Specifies the Data Locale of the Job, which [should be a supported .NET Culture](https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx). Defaults to `en-US`. * `events_late_arrival_max_delay_in_seconds` - (Optional) Specifies the maximum tolerable delay in seconds where events arriving late could be included. Supported range is `-1` (indefinite) to `1814399` (20d 23h 59m 59s). Default is `5`. @@ -75,7 +76,7 @@ The following arguments are supported: * `output_error_policy` - (Optional) Specifies the policy which should be applied to events which arrive at the output and cannot be written to the external storage due to being malformed (such as missing column values, column values of wrong type or size). Possible values are `Drop` and `Stop`. Default is `Drop`. -* `streaming_units` - (Optional) Specifies the number of streaming units that the streaming job uses. Supported values are `1`, `3`, `6` and multiples of `6` up to `120`. +* `streaming_units` - (Optional) Specifies the number of streaming units that the streaming job uses. Supported values are `1`, `3`, `6` and multiples of `6` up to `120`. A conversion table for V2 streaming units can be found [here](https://learn.microsoft.com/azure/stream-analytics/stream-analytics-streaming-unit-consumption#understand-streaming-unit-conversions-and-where-they-apply) -> **NOTE:** `streaming_units` must be set when `type` is `Cloud`. diff --git a/website/docs/r/subnet.html.markdown b/website/docs/r/subnet.html.markdown index c46df6182b0a6..71f4ee3d87885 100644 --- a/website/docs/r/subnet.html.markdown +++ b/website/docs/r/subnet.html.markdown @@ -99,7 +99,7 @@ A `service_delegation` block supports the following: -> **NOTE:** Delegating to services may not be available in all regions. Check that the service you are delegating to is available in your region using the [Azure CLI](https://docs.microsoft.com/cli/azure/network/vnet/subnet?view=azure-cli-latest#az-network-vnet-subnet-list-available-delegations). Also, `actions` is specific to each service type. The exact list of `actions` needs to be retrieved using the aforementioned [Azure CLI](https://docs.microsoft.com/cli/azure/network/vnet/subnet?view=azure-cli-latest#az-network-vnet-subnet-list-available-delegations). -* `name` - (Required) The name of service to delegate to. Possible values are `GitHub.Network/networkSettings`, `Microsoft.ApiManagement/service`, `Microsoft.Apollo/npu`, `Microsoft.App/environments`, `Microsoft.App/testClients`, `Microsoft.AVS/PrivateClouds`, `Microsoft.AzureCosmosDB/clusters`, `Microsoft.BareMetal/AzureHostedService`, `Microsoft.BareMetal/AzureHPC`, `Microsoft.BareMetal/AzurePaymentHSM`, `Microsoft.BareMetal/AzureVMware`, `Microsoft.BareMetal/CrayServers`, `Microsoft.BareMetal/MonitoringServers`, `Microsoft.Batch/batchAccounts`, `Microsoft.CloudTest/hostedpools`, `Microsoft.CloudTest/images`, `Microsoft.CloudTest/pools`, `Microsoft.Codespaces/plans`, `Microsoft.ContainerInstance/containerGroups`, `Microsoft.ContainerService/managedClusters`, `Microsoft.ContainerService/TestClients`, `Microsoft.Databricks/workspaces`, `Microsoft.DBforMySQL/flexibleServers`, `Microsoft.DBforMySQL/servers`, `Microsoft.DBforMySQL/serversv2`, `Microsoft.DBforPostgreSQL/flexibleServers`, `Microsoft.DBforPostgreSQL/serversv2`, `Microsoft.DBforPostgreSQL/singleServers`, `Microsoft.DelegatedNetwork/controller`, `Microsoft.DevCenter/networkConnection`, `Microsoft.DocumentDB/cassandraClusters`, `Microsoft.Fidalgo/networkSettings`, `Microsoft.HardwareSecurityModules/dedicatedHSMs`, `Microsoft.Kusto/clusters`, `Microsoft.LabServices/labplans`, `Microsoft.Logic/integrationServiceEnvironments`, `Microsoft.MachineLearningServices/workspaces`, `Microsoft.Netapp/volumes`, `Microsoft.Network/dnsResolvers`, `Microsoft.Network/managedResolvers`, `Microsoft.Network/fpgaNetworkInterfaces`, `Microsoft.Network/networkWatchers.`, `Microsoft.Network/virtualNetworkGateways`, `Microsoft.Orbital/orbitalGateways`, `Microsoft.PowerPlatform/enterprisePolicies`, `Microsoft.PowerPlatform/vnetaccesslinks`, `Microsoft.ServiceFabricMesh/networks`, `Microsoft.ServiceNetworking/trafficControllers`, `Microsoft.Singularity/accounts/networks`, `Microsoft.Singularity/accounts/npu`, `Microsoft.Sql/managedInstances`, `Microsoft.Sql/managedInstancesOnebox`, `Microsoft.Sql/managedInstancesStage`, `Microsoft.Sql/managedInstancesTest`, `Microsoft.Sql/servers`, `Microsoft.StoragePool/diskPools`, `Microsoft.StreamAnalytics/streamingJobs`, `Microsoft.Synapse/workspaces`, `Microsoft.Web/hostingEnvironments`, `Microsoft.Web/serverFarms`, `NGINX.NGINXPLUS/nginxDeployments`, `PaloAltoNetworks.Cloudngfw/firewalls`, `Qumulo.Storage/fileSystems`, and `Oracle.Database/networkAttachments`. +* `name` - (Required) The name of service to delegate to. Possible values are `GitHub.Network/networkSettings`, `Microsoft.ApiManagement/service`, `Microsoft.Apollo/npu`, `Microsoft.App/environments`, `Microsoft.App/testClients`, `Microsoft.AVS/PrivateClouds`, `Microsoft.AzureCosmosDB/clusters`, `Microsoft.BareMetal/AzureHostedService`, `Microsoft.BareMetal/AzureHPC`, `Microsoft.BareMetal/AzurePaymentHSM`, `Microsoft.BareMetal/AzureVMware`, `Microsoft.BareMetal/CrayServers`, `Microsoft.BareMetal/MonitoringServers`, `Microsoft.Batch/batchAccounts`, `Microsoft.CloudTest/hostedpools`, `Microsoft.CloudTest/images`, `Microsoft.CloudTest/pools`, `Microsoft.Codespaces/plans`, `Microsoft.ContainerInstance/containerGroups`, `Microsoft.ContainerService/managedClusters`, `Microsoft.ContainerService/TestClients`, `Microsoft.Databricks/workspaces`, `Microsoft.DBforMySQL/flexibleServers`, `Microsoft.DBforMySQL/servers`, `Microsoft.DBforMySQL/serversv2`, `Microsoft.DBforPostgreSQL/flexibleServers`, `Microsoft.DBforPostgreSQL/serversv2`, `Microsoft.DBforPostgreSQL/singleServers`, `Microsoft.DelegatedNetwork/controller`, `Microsoft.DevCenter/networkConnection`, `Microsoft.DevOpsInfrastructure/pools`, `Microsoft.DocumentDB/cassandraClusters`, `Microsoft.Fidalgo/networkSettings`, `Microsoft.HardwareSecurityModules/dedicatedHSMs`, `Microsoft.Kusto/clusters`, `Microsoft.LabServices/labplans`, `Microsoft.Logic/integrationServiceEnvironments`, `Microsoft.MachineLearningServices/workspaces`, `Microsoft.Netapp/volumes`, `Microsoft.Network/dnsResolvers`, `Microsoft.Network/managedResolvers`, `Microsoft.Network/fpgaNetworkInterfaces`, `Microsoft.Network/networkWatchers.`, `Microsoft.Network/virtualNetworkGateways`, `Microsoft.Orbital/orbitalGateways`, `Microsoft.PowerPlatform/enterprisePolicies`, `Microsoft.PowerPlatform/vnetaccesslinks`, `Microsoft.ServiceFabricMesh/networks`, `Microsoft.ServiceNetworking/trafficControllers`, `Microsoft.Singularity/accounts/networks`, `Microsoft.Singularity/accounts/npu`, `Microsoft.Sql/managedInstances`, `Microsoft.Sql/managedInstancesOnebox`, `Microsoft.Sql/managedInstancesStage`, `Microsoft.Sql/managedInstancesTest`, `Microsoft.Sql/servers`, `Microsoft.StoragePool/diskPools`, `Microsoft.StreamAnalytics/streamingJobs`, `Microsoft.Synapse/workspaces`, `Microsoft.Web/hostingEnvironments`, `Microsoft.Web/serverFarms`, `NGINX.NGINXPLUS/nginxDeployments`, `PaloAltoNetworks.Cloudngfw/firewalls`, `Qumulo.Storage/fileSystems`, and `Oracle.Database/networkAttachments`. * `actions` - (Optional) A list of Actions which should be delegated. This list is specific to the service to delegate to. Possible values are `Microsoft.Network/networkinterfaces/*`, `Microsoft.Network/publicIPAddresses/join/action`, `Microsoft.Network/publicIPAddresses/read`, `Microsoft.Network/virtualNetworks/read`, `Microsoft.Network/virtualNetworks/subnets/action`, `Microsoft.Network/virtualNetworks/subnets/join/action`, `Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action`, and `Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action`. diff --git a/website/docs/r/subscription_policy_remediation.html.markdown b/website/docs/r/subscription_policy_remediation.html.markdown index b5465164ab6f5..ba220ff8228e0 100644 --- a/website/docs/r/subscription_policy_remediation.html.markdown +++ b/website/docs/r/subscription_policy_remediation.html.markdown @@ -47,10 +47,6 @@ The following arguments are supported: * `policy_assignment_id` - (Required) The ID of the Policy Assignment that should be remediated. -* `policy_definition_id` - (Optional) The unique ID for the policy definition within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. - -~> **Note:** This property has been deprecated and will be removed in version 4.0 of the provider in favour of `policy_definition_reference_id`. - * `policy_definition_reference_id` - (Optional) The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. * `location_filters` - (Optional) A list of the resource locations that will be remediated. diff --git a/website/docs/r/synapse_sql_pool_vulnerability_assessment.html.markdown b/website/docs/r/synapse_sql_pool_vulnerability_assessment.html.markdown index ed90501d4c487..99c6029bbd4b6 100644 --- a/website/docs/r/synapse_sql_pool_vulnerability_assessment.html.markdown +++ b/website/docs/r/synapse_sql_pool_vulnerability_assessment.html.markdown @@ -95,8 +95,7 @@ resource "azurerm_synapse_sql_pool_vulnerability_assessment" "example" { storage_account_access_key = azurerm_storage_account.example.primary_access_key recurring_scans { - enabled = true - email_subscription_admins_enabled = true + enabled = true emails = [ "email@example1.com", "email@example2.com" @@ -124,7 +123,7 @@ The following arguments are supported: The `recurring_scans` block supports the following: * `enabled` - (Optional) Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to `false`. -* `email_subscription_admins_enabled` - (Optional) Boolean flag which specifies if the schedule scan notification will be sent to the subscription administrators. Defaults to `false`. +* `email_subscription_admins_enabled` - (Optional) Boolean flag which specifies if the schedule scan notification will be sent to the subscription administrators. Defaults to `true`. * `emails` - (Optional) Specifies an array of email addresses to which the scan notification is sent. ## Attributes Reference diff --git a/website/docs/r/synapse_workspace.html.markdown b/website/docs/r/synapse_workspace.html.markdown index b910e1df8a7c4..0a40f51db0882 100644 --- a/website/docs/r/synapse_workspace.html.markdown +++ b/website/docs/r/synapse_workspace.html.markdown @@ -173,9 +173,9 @@ The following arguments are supported: * `storage_data_lake_gen2_filesystem_id` - (Required) Specifies the ID of storage data lake gen2 filesystem resource. Changing this forces a new resource to be created. -* `sql_administrator_login` - (Optional) Specifies The login name of the SQL administrator. Changing this forces a new resource to be created. If this is not provided `aad_admin` or `customer_managed_key` must be provided. +* `sql_administrator_login` - (Optional) Specifies The login name of the SQL administrator. Changing this forces a new resource to be created. If this is not provided `customer_managed_key` must be provided. -* `sql_administrator_login_password` - (Optional) The Password associated with the `sql_administrator_login` for the SQL administrator. If this is not provided `aad_admin` or `customer_managed_key` must be provided. +* `sql_administrator_login_password` - (Optional) The Password associated with the `sql_administrator_login` for the SQL administrator. If this is not provided `customer_managed_key` must be provided. * `azuread_authentication_only` - (Optional) Is Azure Active Directory Authentication the only way to authenticate with resources inside this synapse Workspace. Defaults to `false`. diff --git a/website/docs/r/synapse_workspace_vulnerability_assessment.html.markdown b/website/docs/r/synapse_workspace_vulnerability_assessment.html.markdown index 09094f805a3dd..00587b5f9d6f5 100644 --- a/website/docs/r/synapse_workspace_vulnerability_assessment.html.markdown +++ b/website/docs/r/synapse_workspace_vulnerability_assessment.html.markdown @@ -88,8 +88,7 @@ resource "azurerm_synapse_workspace_vulnerability_assessment" "example" { storage_account_access_key = azurerm_storage_account.example.primary_access_key recurring_scans { - enabled = true - email_subscription_admins_enabled = true + enabled = true emails = [ "email@example1.com", "email@example2.com" @@ -117,7 +116,7 @@ The following arguments are supported: The `recurring_scans` block supports the following: * `enabled` - (Optional) Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to `false`. -* `email_subscription_admins_enabled` - (Optional) Boolean flag which specifies if the schedule scan notification will be sent to the subscription administrators. Defaults to `false`. +* `email_subscription_admins_enabled` - (Optional) Boolean flag which specifies if the schedule scan notification will be sent to the subscription administrators. Defaults to `true`. * `emails` - (Optional) Specifies an array of email addresses to which the scan notification is sent. ## Attributes Reference diff --git a/website/docs/r/template_deployment.html.markdown b/website/docs/r/template_deployment.html.markdown deleted file mode 100644 index c3ce72277d0b7..0000000000000 --- a/website/docs/r/template_deployment.html.markdown +++ /dev/null @@ -1,143 +0,0 @@ ---- -subcategory: "Template" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_template_deployment" -description: |- - Manages a template deployment of resources. ---- - -# azurerm_template_deployment - -Manages a template deployment of resources - -~> **Note:** The `azurerm_template_deployment` resource has been superseded by the [`azurerm_resource_group_template_deployment`](resource_group_template_deployment.html) resource. The existing `azurerm_template_deployment` resource will be deprecated (but still available) in version 3.0 of the AzureRM Terraform Provider - we recommend using the `azurerm_resource_group_template_deployment` resource for new deployments. - --> **Note:** This resource will not clean up nested resources deployed by the ARM Template Deployment. We recommend using the [`azurerm_resource_group_template_deployment`](resource_group_template_deployment.html) resource for new deployments, which can do this. - -## Example Usage - -~> **Note:** This example uses [Storage Accounts](storage_account.html) and [Public IP's](public_ip.html) which are natively supported by Terraform - we'd highly recommend using the Native Resources where possible instead rather than an ARM Template, for the reasons outlined above. - -```hcl -resource "azurerm_resource_group" "example" { - name = "example-resources" - location = "West Europe" -} - -resource "azurerm_template_deployment" "example" { - name = "acctesttemplate-01" - resource_group_name = azurerm_resource_group.example.name - - template_body = < **Note:** There's a [`file` function available](https://www.terraform.io/docs/configuration/functions/file.html) which allows you to read this from an external file, which helps makes this more resource more readable. - -* `parameters` - (Optional) Specifies the name and value pairs that define the deployment parameters for the template. - -* `parameters_body` - (Optional) Specifies a valid Azure JSON parameters file that define the deployment parameters. It can contain KeyVault references - -~> **Note:** There's a [`file` function available](https://www.terraform.io/docs/configuration/functions/file.html) which allows you to read this from an external file, which helps makes this more resource more readable. - -~> **Also Note:** This is NOT an Azure deployment parameters file, as defined in the [`Microsoft schema's`](https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#). It is effectively the object supplied to the "parameters" attribute in that schema. If you are providing, or generating via [`template_file`](https://www.terraform.io/docs/providers/template/d/file.html), this argument, do not provide a full deployment parameters JSON file with "$schema" and "contentVersion" attributes, just provide the object for the "parameters" attribute of that schema. - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The Template Deployment ID. - -* `outputs` - A map of supported scalar output types returned from the deployment (currently, Azure Template Deployment outputs of type String, Int and Bool are supported, and are converted to strings - others will be ignored) and can be accessed using `.outputs["name"]`. - -## Note - -Terraform does not know about the individual resources created by Azure using a deployment template and therefore cannot delete these resources during a destroy. Destroying a template deployment removes the associated deployment operations, but will not delete the Azure resources created by the deployment. In order to delete these resources, the containing resource group must also be destroyed. [More information](https://docs.microsoft.com/rest/api/resources/deployments#Deployments_Delete). - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 3 hours) Used when creating the Template Deployment. -* `update` - (Defaults to 3 hours) Used when updating the Template Deployment. -* `read` - (Defaults to 5 minutes) Used when retrieving the Template Deployment. -* `delete` - (Defaults to 3 hours) Used when deleting the Template Deployment. diff --git a/website/docs/r/traffic_manager_azure_endpoint.html.markdown b/website/docs/r/traffic_manager_azure_endpoint.html.markdown index d5e6160458684..484014c928235 100644 --- a/website/docs/r/traffic_manager_azure_endpoint.html.markdown +++ b/website/docs/r/traffic_manager_azure_endpoint.html.markdown @@ -70,7 +70,7 @@ The following arguments are supported: * `target_resource_id` - (Required) The ID of the Azure Resource which should be used as a target. -* `weight` - (Optional) Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. +* `weight` - (Optional) Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`. --- @@ -82,7 +82,7 @@ The following arguments are supported: * `geo_mappings` - (Optional) A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault). -* `priority` - (Optional) Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. +* `priority` - (Optional) Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. Defaults to `1`. * `subnet` - (Optional) One or more `subnet` blocks as defined below. Changing this forces a new resource to be created. diff --git a/website/docs/r/traffic_manager_external_endpoint.html.markdown b/website/docs/r/traffic_manager_external_endpoint.html.markdown index 65a167258f84d..51149696fa109 100644 --- a/website/docs/r/traffic_manager_external_endpoint.html.markdown +++ b/website/docs/r/traffic_manager_external_endpoint.html.markdown @@ -61,7 +61,7 @@ The following arguments are supported: * `target` - (Required) The FQDN DNS name of the target. -* `weight` - (Optional) Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. +* `weight` - (Optional) Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`. * `endpoint_location` - (Optional) Specifies the Azure location of the Endpoint, this must be specified for Profiles using the `Performance` routing method. @@ -75,7 +75,7 @@ The following arguments are supported: * `geo_mappings` - (Optional) A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault). -* `priority` - (Optional) Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. +* `priority` - (Optional) Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. Defaults to `1`. * `subnet` - (Optional) One or more `subnet` blocks as defined below. Changing this forces a new resource to be created. diff --git a/website/docs/r/traffic_manager_nested_endpoint.html.markdown b/website/docs/r/traffic_manager_nested_endpoint.html.markdown index 9adc65f8f0058..6b88fc506211d 100644 --- a/website/docs/r/traffic_manager_nested_endpoint.html.markdown +++ b/website/docs/r/traffic_manager_nested_endpoint.html.markdown @@ -92,7 +92,7 @@ The following arguments are supported: * `target_resource_id` - (Required) The resource id of an Azure resource to target. -* `weight` - (Optional) Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. +* `weight` - (Optional) Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`. --- @@ -106,7 +106,7 @@ The following arguments are supported: * `minimum_required_child_endpoints_ipv6` - (Optional) This argument specifies the minimum number of IPv6 (DNS record type AAAA) endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This argument only applies to Endpoints of type `nestedEndpoints` and -* `priority` - (Optional) Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. +* `priority` - (Optional) Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. Defaults to `1`. * `geo_mappings` - (Optional) A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault). diff --git a/website/docs/r/video_analyzer.html.markdown b/website/docs/r/video_analyzer.html.markdown deleted file mode 100644 index 66e66cd27a146..0000000000000 --- a/website/docs/r/video_analyzer.html.markdown +++ /dev/null @@ -1,132 +0,0 @@ ---- -subcategory: "Video Analyzer" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_video_analyzer" -description: |- - Manages a Video Analyzer. ---- - -# azurerm_video_analyzer - -Manages a Video Analyzer. - -!> Video Analyzer (Preview) is now Deprecated and will be Retired on 2022-11-30 - as such the `azurerm_video_analyzer` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "video-analyzer-resources" - location = "West Europe" -} - -resource "azurerm_storage_account" "example" { - name = "examplestoracc" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_user_assigned_identity" "example" { - name = "exampleidentity" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location -} - -resource "azurerm_role_assignment" "contributor" { - scope = azurerm_storage_account.example.id - role_definition_name = "Storage Blob Data Contributor" - principal_id = azurerm_user_assigned_identity.example.principal_id -} - -resource "azurerm_role_assignment" "reader" { - scope = azurerm_storage_account.example.id - role_definition_name = "Reader" - principal_id = azurerm_user_assigned_identity.example.principal_id -} - -resource "azurerm_video_analyzer" "example" { - name = "exampleanalyzer" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - storage_account { - id = azurerm_storage_account.example.id - user_assigned_identity_id = azurerm_user_assigned_identity.example.id - } - - identity { - type = "UserAssigned" - identity_ids = [ - azurerm_user_assigned_identity.example.id - ] - } - - tags = { - environment = "staging" - } - - depends_on = [ - azurerm_role_assignment.contributor, - azurerm_role_assignment.reader, - ] -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) Specifies the name of the Video Analyzer. Changing this forces a new resource to be created. - -* `resource_group_name` - (Required) The name of the resource group in which to create the Video Analyzer. Changing this forces a new resource to be created. - -* `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - -* `storage_account` - (Required) A `storage_account` block as defined below. - -* `identity` - (Required) An `identity` block as defined below. - -* `tags` - (Optional) A mapping of tags assigned to the resource. - ---- - -A `storage_account` block supports the following: - -* `id` - (Required) Specifies the ID of the Storage Account that will be associated with the Video Analyzer instance. - -* `user_assigned_identity_id` - (Required) Specifies the User Assigned Identity ID which should be assigned to access this Storage Account. - ---- - -A `identity` block supports the following: - -* `type` - (Required) Specifies the type of Managed Service Identity that should be configured on this Video Analyzer instance. Only possible value is `UserAssigned`. - -* `identity_ids` - (Required) Specifies a list of User Assigned Managed Identity IDs to be assigned to this Video Analyzer instance. - ---- - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Video Analyzer. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Video Analyzer. -* `update` - (Defaults to 30 minutes) Used when updating the Video Analyzer. -* `read` - (Defaults to 5 minutes) Used when retrieving the Video Analyzer. -* `delete` - (Defaults to 30 minutes) Used when deleting the Video Analyzer. - -## Import - -Video Analyzer can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_video_analyzer.analyzer /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Media/videoAnalyzers/analyzer1 -``` diff --git a/website/docs/r/video_analyzer_edge_module.html.markdown b/website/docs/r/video_analyzer_edge_module.html.markdown deleted file mode 100644 index b6e3df2bd24a6..0000000000000 --- a/website/docs/r/video_analyzer_edge_module.html.markdown +++ /dev/null @@ -1,117 +0,0 @@ ---- -subcategory: "Video Analyzer" -layout: "azurerm" -page_title: "Azure Resource Manager: azurerm_video_analyzer_edge_module" -description: |- - Manages a Video Analyzer Edge Module. ---- - -# azurerm_video_analyzer_edge_module - -Manages a Video Analyzer Edge Module. - -!> Video Analyzer (Preview) is now Deprecated and will be Retired on 2022-11-30 - as such the `azurerm_video_analyzer_edge_module` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. - -## Example Usage - -```hcl -resource "azurerm_resource_group" "example" { - name = "video-analyzer-resources" - location = "West Europe" -} - -resource "azurerm_storage_account" "example" { - name = "examplestoracc" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_user_assigned_identity" "example" { - name = "exampleidentity" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location -} - -resource "azurerm_role_assignment" "contributor" { - scope = azurerm_storage_account.example.id - role_definition_name = "Storage Blob Data Contributor" - principal_id = azurerm_user_assigned_identity.example.principal_id -} - -resource "azurerm_role_assignment" "reader" { - scope = azurerm_storage_account.example.id - role_definition_name = "Reader" - principal_id = azurerm_user_assigned_identity.example.principal_id -} - -resource "azurerm_video_analyzer" "example" { - name = "exampleanalyzer" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - storage_account { - id = azurerm_storage_account.example.id - user_assigned_identity_id = azurerm_user_assigned_identity.example.id - } - - identity { - type = "UserAssigned" - identity_ids = [ - azurerm_user_assigned_identity.example.id - ] - } - - tags = { - environment = "staging" - } - - depends_on = [ - azurerm_user_assigned_identity.example, - azurerm_role_assignment.contributor, - azurerm_role_assignment.reader, - ] -} - -resource "azurerm_video_analyzer_edge_module" "example" { - name = "example-edge-module" - resource_group_name = azurerm_resource_group.example.name - video_analyzer_name = azurerm_video_analyzer.example.name -} - -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) Specifies the name of the Video Analyzer Edge Module. Changing this forces a new resource to be created. - -* `resource_group_name` - (Required) The name of the resource group in which to create the Video Analyzer Edge Module. Changing this forces a new resource to be created. - -* `video_analyzer_name` - (Required) The name of the Video Analyzer in which to create the Edge Module. Changing this forces a new resource to be created. - ---- - -## Attributes Reference - -In addition to the Arguments listed above - the following Attributes are exported: - -* `id` - The ID of the Video Analyzer Edge Module. - -## Timeouts - -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: - -* `create` - (Defaults to 30 minutes) Used when creating the Video Analyzer Edge Module. -* `read` - (Defaults to 5 minutes) Used when retrieving the Video Analyzer Edge Module. -* `delete` - (Defaults to 30 minutes) Used when deleting the Video Analyzer Edge Module. - -## Import - -Video Analyzer Edge Module can be imported using the `resource id`, e.g. - -```shell -terraform import azurerm_video_analyzer_edge_module.edge /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Media/videoAnalyzers/analyzer1/edgeModules/edge1 -``` diff --git a/website/docs/r/virtual_network.html.markdown b/website/docs/r/virtual_network.html.markdown index ec5ffc78a6ad4..0f81276d3abbb 100644 --- a/website/docs/r/virtual_network.html.markdown +++ b/website/docs/r/virtual_network.html.markdown @@ -39,14 +39,14 @@ resource "azurerm_virtual_network" "example" { dns_servers = ["10.0.0.4", "10.0.0.5"] subnet { - name = "subnet1" - address_prefix = "10.0.1.0/24" + name = "subnet1" + address_prefixes = ["10.0.1.0/24"] } subnet { - name = "subnet2" - address_prefix = "10.0.2.0/24" - security_group = azurerm_network_security_group.example.id + name = "subnet2" + address_prefixes = ["10.0.2.0/24"] + security_group = azurerm_network_security_group.example.id } tags = { @@ -113,10 +113,52 @@ The `subnet` block supports: * `name` - (Required) The name of the subnet. -* `address_prefix` - (Required) The address prefix to use for the subnet. +* `address_prefixes` - (Required) The address prefixes to use for the subnet. * `security_group` - (Optional) The Network Security Group to associate with the subnet. (Referenced by `id`, ie. `azurerm_network_security_group.example.id`) +* `default_outbound_access_enabled` - (Optional) Enable default outbound access to the internet for the subnet. Defaults to `true`. + +* `delegation` - (Optional) One or more `delegation` blocks as defined below. + +* `private_endpoint_network_policies` - (Optional) Enable or Disable network policies for the private endpoint on the subnet. Possible values are `Disabled`, `Enabled`, `NetworkSecurityGroupEnabled` and `RouteTableEnabled`. Defaults to `Disabled`. + +-> **NOTE:** If you don't want to use network policies like user-defined Routes and Network Security Groups, you need to set `private_endpoint_network_policies` in the subnet to `Disabled`. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. + +-> **NOTE:** If you want to use network policies like user-defined Routes and Network Security Groups, you need to set the `private_endpoint_network_policies` in the Subnet to `Enabled`/`NetworkSecurityGroupEnabled`/`RouteTableEnabled`. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. + +-> **NOTE:** See more details from [Manage network policies for Private Endpoints](https://learn.microsoft.com/en-gb/azure/private-link/disable-private-endpoint-network-policy?tabs=network-policy-portal). + +* `private_link_service_network_policies_enabled` - (Optional) Enable or Disable network policies for the private link service on the subnet. Defaults to `true`. + +-> **NOTE:** When configuring Azure Private Link service, the explicit setting `private_link_service_network_policies_enabled` must be set to `false` in the subnet since Private Link Service does not support network policies like user-defined Routes and Network Security Groups. This setting only affects the Private Link service. For other resources in the subnet, access is controlled based on the Network Security Group which can be configured using the `azurerm_subnet_network_security_group_association` resource. See more details from [Manage network policies for Private Link Services](https://learn.microsoft.com/en-gb/azure/private-link/disable-private-link-service-network-policy?tabs=private-link-network-policy-powershell). + +* `route_table_id` - (Optional) The ID of the Route Table that should be associated with this subnet. + +* `service_endpoints` - (Optional) The list of Service endpoints to associate with the subnet. Possible values include: `Microsoft.AzureActiveDirectory`, `Microsoft.AzureCosmosDB`, `Microsoft.ContainerRegistry`, `Microsoft.EventHub`, `Microsoft.KeyVault`, `Microsoft.ServiceBus`, `Microsoft.Sql`, `Microsoft.Storage`, `Microsoft.Storage.Global` and `Microsoft.Web`. + +* `service_endpoint_policy_ids` - (Optional) The list of IDs of Service Endpoint Policies to associate with the subnet. + +--- + +A `delegation` block supports the following: + +* `name` - (Required) A name for this delegation. + +* `service_delegation` - (Required) A `service_delegation` block as defined below. + +--- + +A `service_delegation` block supports the following: + +-> **NOTE:** Delegating to services may not be available in all regions. Check that the service you are delegating to is available in your region using the [Azure CLI](https://docs.microsoft.com/cli/azure/network/vnet/subnet?view=azure-cli-latest#az-network-vnet-subnet-list-available-delegations). Also, `actions` is specific to each service type. The exact list of `actions` needs to be retrieved using the aforementioned [Azure CLI](https://docs.microsoft.com/cli/azure/network/vnet/subnet?view=azure-cli-latest#az-network-vnet-subnet-list-available-delegations). + +* `name` - (Required) The name of service to delegate to. Possible values are `GitHub.Network/networkSettings`, `Microsoft.ApiManagement/service`, `Microsoft.Apollo/npu`, `Microsoft.App/environments`, `Microsoft.App/testClients`, `Microsoft.AVS/PrivateClouds`, `Microsoft.AzureCosmosDB/clusters`, `Microsoft.BareMetal/AzureHostedService`, `Microsoft.BareMetal/AzureHPC`, `Microsoft.BareMetal/AzurePaymentHSM`, `Microsoft.BareMetal/AzureVMware`, `Microsoft.BareMetal/CrayServers`, `Microsoft.BareMetal/MonitoringServers`, `Microsoft.Batch/batchAccounts`, `Microsoft.CloudTest/hostedpools`, `Microsoft.CloudTest/images`, `Microsoft.CloudTest/pools`, `Microsoft.Codespaces/plans`, `Microsoft.ContainerInstance/containerGroups`, `Microsoft.ContainerService/managedClusters`, `Microsoft.ContainerService/TestClients`, `Microsoft.Databricks/workspaces`, `Microsoft.DBforMySQL/flexibleServers`, `Microsoft.DBforMySQL/servers`, `Microsoft.DBforMySQL/serversv2`, `Microsoft.DBforPostgreSQL/flexibleServers`, `Microsoft.DBforPostgreSQL/serversv2`, `Microsoft.DBforPostgreSQL/singleServers`, `Microsoft.DelegatedNetwork/controller`, `Microsoft.DevCenter/networkConnection`, `Microsoft.DocumentDB/cassandraClusters`, `Microsoft.Fidalgo/networkSettings`, `Microsoft.HardwareSecurityModules/dedicatedHSMs`, `Microsoft.Kusto/clusters`, `Microsoft.LabServices/labplans`, `Microsoft.Logic/integrationServiceEnvironments`, `Microsoft.MachineLearningServices/workspaces`, `Microsoft.Netapp/volumes`, `Microsoft.Network/dnsResolvers`, `Microsoft.Network/managedResolvers`, `Microsoft.Network/fpgaNetworkInterfaces`, `Microsoft.Network/networkWatchers.`, `Microsoft.Network/virtualNetworkGateways`, `Microsoft.Orbital/orbitalGateways`, `Microsoft.PowerPlatform/enterprisePolicies`, `Microsoft.PowerPlatform/vnetaccesslinks`, `Microsoft.ServiceFabricMesh/networks`, `Microsoft.ServiceNetworking/trafficControllers`, `Microsoft.Singularity/accounts/networks`, `Microsoft.Singularity/accounts/npu`, `Microsoft.Sql/managedInstances`, `Microsoft.Sql/managedInstancesOnebox`, `Microsoft.Sql/managedInstancesStage`, `Microsoft.Sql/managedInstancesTest`, `Microsoft.Sql/servers`, `Microsoft.StoragePool/diskPools`, `Microsoft.StreamAnalytics/streamingJobs`, `Microsoft.Synapse/workspaces`, `Microsoft.Web/hostingEnvironments`, `Microsoft.Web/serverFarms`, `NGINX.NGINXPLUS/nginxDeployments`, `PaloAltoNetworks.Cloudngfw/firewalls`, `Qumulo.Storage/fileSystems`, and `Oracle.Database/networkAttachments`. + +* `actions` - (Optional) A list of Actions which should be delegated. This list is specific to the service to delegate to. Possible values are `Microsoft.Network/networkinterfaces/*`, `Microsoft.Network/publicIPAddresses/join/action`, `Microsoft.Network/publicIPAddresses/read`, `Microsoft.Network/virtualNetworks/read`, `Microsoft.Network/virtualNetworks/subnets/action`, `Microsoft.Network/virtualNetworks/subnets/join/action`, `Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action`, and `Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action`. + +-> **NOTE:** Azure may add default actions depending on the service delegation name and they can't be changed. + ## Attributes Reference In addition to the Arguments listed above - the following Attributes are exported: diff --git a/website/docs/r/virtual_network_gateway_connection.html.markdown b/website/docs/r/virtual_network_gateway_connection.html.markdown index 5c534e24932e5..c8e591a1c139c 100644 --- a/website/docs/r/virtual_network_gateway_connection.html.markdown +++ b/website/docs/r/virtual_network_gateway_connection.html.markdown @@ -211,6 +211,8 @@ The following arguments are supported: * `type` - (Required) The type of connection. Valid options are `IPsec` (Site-to-Site), `ExpressRoute` (ExpressRoute), and `Vnet2Vnet` (VNet-to-VNet). Each connection type requires different mandatory arguments (refer to the examples above). Changing this forces a new resource to be created. +* `shared_key` - (Required) The shared IPSec key. A key could be provided if a Site-to-Site, VNet-to-VNet or ExpressRoute connection is created. + * `virtual_network_gateway_id` - (Required) The ID of the Virtual Network Gateway in which the connection will be created. Changing this forces a new resource to be created. * `authorization_key` - (Optional) The authorization key associated with the Express Route Circuit. This field is required only if the type is an ExpressRoute connection. @@ -227,8 +229,6 @@ The following arguments are supported: * `routing_weight` - (Optional) The routing weight. Defaults to `10`. -* `shared_key` - (Optional) The shared IPSec key. A key could be provided if a Site-to-Site, VNet-to-VNet or ExpressRoute connection is created. - * `connection_mode` - (Optional) Connection mode to use. Possible values are `Default`, `InitiatorOnly` and `ResponderOnly`. Defaults to `Default`. Changing this value will force a resource to be created. * `connection_protocol` - (Optional) The IKE protocol version to use. Possible values are `IKEv1` and `IKEv2`, values are `IKEv1` and `IKEv2`. Defaults to `IKEv2`. Changing this forces a new resource to be created. diff --git a/website/docs/r/vpn_gateway.html.markdown b/website/docs/r/vpn_gateway.html.markdown index 29b4da3986ab2..44e9b5cc27cd4 100644 --- a/website/docs/r/vpn_gateway.html.markdown +++ b/website/docs/r/vpn_gateway.html.markdown @@ -65,7 +65,7 @@ The following arguments are supported: * `bgp_settings` - (Optional) A `bgp_settings` block as defined below. -* `routing_preference` - (Optional) Azure routing preference lets you to choose how your traffic routes between Azure and the internet. You can choose to route traffic either via the Microsoft network (default value, `Microsoft Network`), or via the ISP network (public internet, set to `Internet`). More context of the configuration can be found in the [Microsoft Docs](https://docs.microsoft.com/azure/virtual-wan/virtual-wan-site-to-site-portal#gateway) to create a VPN Gateway. Changing this forces a new resource to be created. +* `routing_preference` - (Optional) Azure routing preference lets you to choose how your traffic routes between Azure and the internet. You can choose to route traffic either via the Microsoft network (default value, `Microsoft Network`), or via the ISP network (public internet, set to `Internet`). More context of the configuration can be found in the [Microsoft Docs](https://docs.microsoft.com/azure/virtual-wan/virtual-wan-site-to-site-portal#gateway) to create a VPN Gateway. Defaults to `Microsoft Network`. Changing this forces a new resource to be created. * `scale_unit` - (Optional) The Scale Unit for this VPN Gateway. Defaults to `1`. diff --git a/website/docs/r/web_application_firewall_policy.html.markdown b/website/docs/r/web_application_firewall_policy.html.markdown index dc1ece820f274..ffad314bf859d 100644 --- a/website/docs/r/web_application_firewall_policy.html.markdown +++ b/website/docs/r/web_application_firewall_policy.html.markdown @@ -190,6 +190,8 @@ The `policy_settings` block supports the following: * `log_scrubbing` - (Optional) One `log_scrubbing` block as defined below. +* `request_body_enforcement` - (Optional) Whether the firewall should block a request with body size greater then `max_request_body_size_in_kb`. Defaults to `true`. + * `request_body_inspect_limit_in_kb` - (Optional) Specifies the maximum request body inspection limit in KB for the Web Application Firewall. Defaults to `128`. * `js_challenge_cookie_expiration_in_minutes` - (Optional) Specifies the JavaScript challenge cookie validity lifetime in minutes. The user is challenged after the lifetime expires. Accepted values are in the range `5` to `1440`. Defaults to `30`. @@ -257,7 +259,7 @@ The `rule` block supports the following: * `id` - (Required) Identifier for the managed rule. -* `enabled` - (Optional) Describes if the managed rule is in enabled state or disabled state. +* `enabled` - (Optional) Describes if the managed rule is in enabled state or disabled state. Defaults to `false`. * `action` - (Optional) Describes the override action to be applied when rule matches. Possible values are `Allow`, `AnomalyScoring`, `Block`, `JSChallenge` and `Log`. `JSChallenge` is only valid for rulesets of type `Microsoft_BotManagerRuleSet`. diff --git a/website/docs/r/windows_virtual_machine_scale_set.html.markdown b/website/docs/r/windows_virtual_machine_scale_set.html.markdown index 934a2d1b6baa6..56f2efcd7ded2 100644 --- a/website/docs/r/windows_virtual_machine_scale_set.html.markdown +++ b/website/docs/r/windows_virtual_machine_scale_set.html.markdown @@ -205,10 +205,6 @@ resource "azurerm_windows_virtual_machine_scale_set" "example" { * `tags` - (Optional) A mapping of tags which should be assigned to this Virtual Machine Scale Set. -* `terminate_notification` - (Optional) A `terminate_notification` block as defined below. - --> **Note:** This property has been deprecated in favour of the `termination_notification` property and will be removed in version 4.0 of the provider. - * `termination_notification` - (Optional) A `termination_notification` block as defined below. * `timezone` - (Optional) Specifies the time zone of the virtual machine, [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). @@ -227,7 +223,9 @@ resource "azurerm_windows_virtual_machine_scale_set" "example" { -> **Note:** This can only be set to `true` when one or more `zones` are configured. -* `zones` - (Optional) Specifies a list of Availability Zones in which this Windows Virtual Machine Scale Set should be located. Changing this forces a new Windows Virtual Machine Scale Set to be created. +* `zones` - (Optional) Specifies a list of Availability Zones in which this Windows Virtual Machine Scale Set should be located. + +-> **Note:** Updating `zones` to remove an existing zone forces a new Virtual Machine Scale Set to be created. --- @@ -551,16 +549,6 @@ A `secret` block supports the following: --- -A `terminate_notification` block supports the following: - -* `enabled` - (Required) Should the terminate notification be enabled on this Virtual Machine Scale Set? - -* `timeout` - (Optional) Length of time (in minutes, between 5 and 15) a notification to be sent to the VM on the instance metadata server till the VM gets deleted. The time duration should be specified in ISO 8601 format. Defaults to `PT5M`. - --> For more information about the terminate notification, please [refer to this doc](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-terminate-notification). - ---- - A `termination_notification` block supports the following: * `enabled` - (Required) Should the termination notification be enabled on this Virtual Machine Scale Set? diff --git a/website/docs/r/windows_web_app.html.markdown b/website/docs/r/windows_web_app.html.markdown index 00c3c209bfe21..48f6a6d3418de 100644 --- a/website/docs/r/windows_web_app.html.markdown +++ b/website/docs/r/windows_web_app.html.markdown @@ -162,10 +162,6 @@ An `application_stack` block supports the following: ~> **NOTE:** `docker_registry_url`, `docker_registry_username`, and `docker_registry_password` replace the use of the `app_settings` values of `DOCKER_REGISTRY_SERVER_URL`, `DOCKER_REGISTRY_SERVER_USERNAME` and `DOCKER_REGISTRY_SERVER_PASSWORD` respectively, these values will be managed by the provider and should not be specified in the `app_settings` map. -* `docker_container_name` - (Optional) The name of the container to be used. This value is required with `docker_container_tag`. - -* `docker_container_tag` - (Optional) The tag of the container to be used. This value is required with `docker_container_name`. - * `dotnet_version` - (Optional) The version of .NET to use when `current_stack` is set to `dotnet`. Possible values include `v2.0`,`v3.0`, `v4.0`, `v5.0`, `v6.0`, `v7.0` and `v8.0`. ~> **NOTE:** The Portal displayed values and the actual underlying API values differ for this setting, as follows: @@ -715,8 +711,6 @@ A `site_config` block supports the following: * `application_stack` - (Optional) A `application_stack` block as defined above. -* `auto_heal_enabled` - (Optional) Should Auto heal rules be enabled. Required with `auto_heal_setting`. - * `auto_heal_setting` - (Optional) A `auto_heal_setting` block as defined above. Required with `auto_heal`. * `container_registry_managed_identity_client_id` - (Optional) The Client ID of the Managed Service Identity to use for connections to the Azure Container Registry. @@ -783,10 +777,6 @@ A `slow_request` block supports the following: * `time_taken` - (Required) The threshold of time passed to qualify as a Slow Request in `hh:mm:ss`. -* `path` - (Optional) The path for which this slow request rule applies. - -~> **NOTE:** The `path` property in the `slow_request` block is deprecated and will be removed in 4.0 of provider. Please use `slow_request_with_path` to set a slow request trigger with path specified. - --- A `slow_request_with_path` block supports the following: diff --git a/website/docs/r/windows_web_app_slot.html.markdown b/website/docs/r/windows_web_app_slot.html.markdown index 1bd8c8588db53..6b24dfac60f83 100644 --- a/website/docs/r/windows_web_app_slot.html.markdown +++ b/website/docs/r/windows_web_app_slot.html.markdown @@ -166,10 +166,6 @@ An `application_stack` block supports the following: ~> **NOTE:** `docker_registry_url`, `docker_registry_username`, and `docker_registry_password` replace the use of the `app_settings` values of `DOCKER_REGISTRY_SERVER_URL`, `DOCKER_REGISTRY_SERVER_USERNAME` and `DOCKER_REGISTRY_SERVER_PASSWORD` respectively, these values will be managed by the provider and should not be specified in the `app_settings` map. -* `docker_container_name` - (Optional) The name of the container to be used. This value is required with `docker_container_tag`. - -* `docker_container_tag` - (Optional) The tag of the container to be used. This value is required with `docker_container_name`. - * `dotnet_version` - (Optional) The version of .NET to use when `current_stack` is set to `dotnet`. Possible values include `v2.0`,`v3.0`, `v4.0`, `v5.0`, `v6.0`, `v7.0` and `v8.0`. * `dotnet_core_version` - (Optional) The version of .NET to use when `current_stack` is set to `dotnetcore`. Possible values include `v4.0`. @@ -708,8 +704,6 @@ A `site_config` block supports the following: * `application_stack` - (Optional) A `application_stack` block as defined above. -* `auto_heal_enabled` - (Optional) Should Auto heal rules be enabled. Required with `auto_heal_setting`. - * `auto_heal_setting` - (Optional) A `auto_heal_setting` block as defined above. Required with `auto_heal`. * `auto_swap_slot_name` - (Optional) The Windows Web App Slot Name to automatically swap to when deployment to that slot is successfully completed. @@ -780,10 +774,6 @@ A `slow_request` block supports the following: * `time_taken` - (Required) The threshold of time passed to qualify as a Slow Request in `hh:mm:ss`. -* `path` - (Optional) The path for which this slow request rule applies. - -~> **NOTE:** The `path` property in the `slow_request` block is deprecated and will be removed in 4.0 of provider. Please use `slow_request_with_path` to set a slow request trigger with path specified. - --- A `slow_request_with_path` block supports the following: